From 8da1b3fb4151a2a2324f356b3327e405f5e46f00 Mon Sep 17 00:00:00 2001 From: Kiwi Browser <40272275+kiwibrowser@users.noreply.github.com> Date: Fri, 23 Oct 2020 07:47:33 +0300 Subject: [PATCH] Add new element hiding rules when filtering is enabled --- .../renderer/core/layout/layout_object.cc | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/third_party/blink/renderer/core/layout/layout_object.cc b/third_party/blink/renderer/core/layout/layout_object.cc index 6186d13a8df..62b87870d83 100644 --- a/third_party/blink/renderer/core/layout/layout_object.cc +++ b/third_party/blink/renderer/core/layout/layout_object.cc @@ -443,6 +443,28 @@ LayoutObject* LayoutObject::CreateObject(Element* element, || element->getAttribute(HTMLNames::classAttr).Contains("inlineOverlay") || element->getAttribute(HTMLNames::classAttr).Contains("inlinePopup") || element->getAttribute(HTMLNames::classAttr).Contains("popup_tosEdition") + || element->nodeName() == "ytm-companion-slot" + || element->nodeName() == "ytd-companion-slot-renderer" + || element->nodeName() == "ytd-promoted-sparkles-web-renderer" + || element->nodeName() == "ytd-single-option-survey-renderer" + || element->getAttribute(HTMLNames::classAttr).Contains("ytd-display-ad-") + || element->getAttribute(HTMLNames::classAttr).Contains("masthead-ad") + || element->getAttribute(HTMLNames::classAttr).Contains("ytd-companion-slot-renderer") + || element->getAttribute(HTMLNames::classAttr).Contains("ytd-video-masthead-ad-v3-renderer") + || element->getAttribute(HTMLNames::classAttr).Contains("ytm-promoted-sparkles-text-search-renderer") + || element->getAttribute(HTMLNames::classAttr).Contains("ytm-promoted-sparkles-web-renderer") + || element->getAttribute(HTMLNames::classAttr).Contains("ytp-ad-image-overlay") + || element->getAttribute(HTMLNames::classAttr).Contains("ytd-action-companion-ad-renderer") + || element->getAttribute(HTMLNames::classAttr).Contains("ytp-ad-overlay-container") + || element->getAttribute(HTMLNames::classAttr).Contains("ytp-ad-progress") + || element->getAttribute(HTMLNames::classAttr).Contains("ytd-carousel-ad-renderer") + || element->getAttribute(HTMLNames::classAttr).Contains("ytd-player-legacy-desktop-watch-ads-renderer") + || element->getAttribute(HTMLNames::classAttr).Contains("ytd-promoted-sparkles-text-search-renderer") + || element->getAttribute(HTMLNames::classAttr).Contains("ytd-search-pyv-renderer") + || element->getAttribute(HTMLNames::classAttr).Contains("ytp-ad-message-container") + || element->getAttribute(HTMLNames::classAttr).Contains("ytp-ad-player-overlay-flyout-cta") + || element->getAttribute(HTMLNames::classAttr).Contains("ytp-paid-content-overlay-text") + || element->getAttribute(HTMLNames::classAttr).Contains("ytp-paid-content-overlay-text") || element->getAttribute(HTMLNames::typeAttr).Contains("24smi") || element->getAttribute(HTMLNames::typeAttr).Contains("a8") || element->getAttribute(HTMLNames::typeAttr).Contains("a9")