It might be useful to have a flag which, when enabled, highlights detected ad iframes (e.g., a red border or mask) and prints detected resources to the console.
Would it be more useful to have this as an option/checkbox in devtools?
It would. Good idea.
A quick prototype of what this could look like.
Nice! This looks promising to me.
Removed element info from highlight.
Example of a broken scroll.
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/96ecaa525da6b407fec0376628429ae8a7c2e43f commit 96ecaa525da6b407fec0376628429ae8a7c2e43f Author: John Delaney <johnidel@chromium.org> Date: Wed Dec 05 22:09:16 2018 Replace PageColorOverlay with a per-frame overlay This patch adds an optional PageOverlay to each LocalFrame. This functions the same as PageColorOverlay, so PageColorOverlay can be removed and replaced with an overlay on the main frame. Per-frame overlays are desirable for: https://chromium-review.googlesource.com/c/chromium/src/+/1277928. Bug: 893666 Change-Id: Icb418e92c31b05189212385d158c64b3a5509675 Reviewed-on: https://chromium-review.googlesource.com/c/1352471 Reviewed-by: David Bokan <bokan@chromium.org> Reviewed-by: Istiaque Ahmed <lazyboy@chromium.org> Reviewed-by: Dmitry Gozman <dgozman@chromium.org> Reviewed-by: Philip Rogers <pdr@chromium.org> Commit-Queue: John Delaney <johnidel@chromium.org> Cr-Commit-Position: refs/heads/master@{#614122} [modify] https://crrev.com/96ecaa525da6b407fec0376628429ae8a7c2e43f/cc/input/main_thread_scrolling_reason.cc [modify] https://crrev.com/96ecaa525da6b407fec0376628429ae8a7c2e43f/cc/input/main_thread_scrolling_reason.h [modify] https://crrev.com/96ecaa525da6b407fec0376628429ae8a7c2e43f/cc/input/main_thread_scrolling_reason_unittest.cc [modify] https://crrev.com/96ecaa525da6b407fec0376628429ae8a7c2e43f/cc/layers/layer_unittest.cc [modify] https://crrev.com/96ecaa525da6b407fec0376628429ae8a7c2e43f/content/shell/test_runner/test_runner_for_specific_view.cc [modify] https://crrev.com/96ecaa525da6b407fec0376628429ae8a7c2e43f/extensions/renderer/extensions_render_frame_observer.cc [modify] https://crrev.com/96ecaa525da6b407fec0376628429ae8a7c2e43f/third_party/blink/public/web/web_view.h [modify] https://crrev.com/96ecaa525da6b407fec0376628429ae8a7c2e43f/third_party/blink/renderer/core/BUILD.gn [modify] https://crrev.com/96ecaa525da6b407fec0376628429ae8a7c2e43f/third_party/blink/renderer/core/exported/web_view_impl.cc [modify] https://crrev.com/96ecaa525da6b407fec0376628429ae8a7c2e43f/third_party/blink/renderer/core/exported/web_view_impl.h [modify] https://crrev.com/96ecaa525da6b407fec0376628429ae8a7c2e43f/third_party/blink/renderer/core/frame/BUILD.gn [rename] https://crrev.com/96ecaa525da6b407fec0376628429ae8a7c2e43f/third_party/blink/renderer/core/frame/frame_overlay.cc [rename] https://crrev.com/96ecaa525da6b407fec0376628429ae8a7c2e43f/third_party/blink/renderer/core/frame/frame_overlay.h [rename] https://crrev.com/96ecaa525da6b407fec0376628429ae8a7c2e43f/third_party/blink/renderer/core/frame/frame_overlay_test.cc [modify] https://crrev.com/96ecaa525da6b407fec0376628429ae8a7c2e43f/third_party/blink/renderer/core/frame/local_frame_view.cc [modify] https://crrev.com/96ecaa525da6b407fec0376628429ae8a7c2e43f/third_party/blink/renderer/core/frame/local_frame_view.h [modify] https://crrev.com/96ecaa525da6b407fec0376628429ae8a7c2e43f/third_party/blink/renderer/core/inspector/inspector_layer_tree_agent.h [modify] https://crrev.com/96ecaa525da6b407fec0376628429ae8a7c2e43f/third_party/blink/renderer/core/inspector/inspector_overlay_agent.cc [modify] https://crrev.com/96ecaa525da6b407fec0376628429ae8a7c2e43f/third_party/blink/renderer/core/inspector/inspector_overlay_agent.h [modify] https://crrev.com/96ecaa525da6b407fec0376628429ae8a7c2e43f/third_party/blink/renderer/core/page/BUILD.gn [modify] https://crrev.com/96ecaa525da6b407fec0376628429ae8a7c2e43f/third_party/blink/renderer/core/page/page.cc [modify] https://crrev.com/96ecaa525da6b407fec0376628429ae8a7c2e43f/third_party/blink/renderer/core/page/page.h [modify] https://crrev.com/96ecaa525da6b407fec0376628429ae8a7c2e43f/third_party/blink/renderer/core/page/validation_message_client_impl.cc [modify] https://crrev.com/96ecaa525da6b407fec0376628429ae8a7c2e43f/third_party/blink/renderer/core/page/validation_message_client_impl.h [modify] https://crrev.com/96ecaa525da6b407fec0376628429ae8a7c2e43f/third_party/blink/renderer/core/page/validation_message_overlay_delegate.cc [modify] https://crrev.com/96ecaa525da6b407fec0376628429ae8a7c2e43f/third_party/blink/renderer/core/page/validation_message_overlay_delegate.h [modify] https://crrev.com/96ecaa525da6b407fec0376628429ae8a7c2e43f/third_party/blink/renderer/platform/graphics/paint/display_item.cc [modify] https://crrev.com/96ecaa525da6b407fec0376628429ae8a7c2e43f/third_party/blink/renderer/platform/graphics/paint/display_item.h [modify] https://crrev.com/96ecaa525da6b407fec0376628429ae8a7c2e43f/ui/events/blink/input_handler_proxy_unittest.cc
FrameOverlayColor broken for sub frames with an element using hover causing a lot of ads to not be highlighted.
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/74efc1ddfa7c804529026d516a598e9509895623 commit 74efc1ddfa7c804529026d516a598e9509895623 Author: John Delaney <johnidel@chromium.org> Date: Thu Dec 20 18:29:18 2018 Propagate parent_is_ad bit to LocalFrames Currently there is no way for a LocalFrame to discern if it's remote parent frame is an ad without asking the browser. When a provisional frame is set as an ad, also propagate a bit for whether or not its parent was detected to be an ad. Bug: 893666 Change-Id: I1d4e05d83348cd7e035541c92a80ae4d7bce1d0d Reviewed-on: https://chromium-review.googlesource.com/c/1351541 Commit-Queue: John Delaney <johnidel@chromium.org> Reviewed-by: Daniel Cheng <dcheng@chromium.org> Reviewed-by: Josh Karlin <jkarlin@chromium.org> Cr-Commit-Position: refs/heads/master@{#618276} [modify] https://crrev.com/74efc1ddfa7c804529026d516a598e9509895623/chrome/browser/page_load_metrics/observers/ads_page_load_metrics_observer_browsertest.cc [modify] https://crrev.com/74efc1ddfa7c804529026d516a598e9509895623/chrome/browser/subresource_filter/chrome_subresource_filter_client.cc [modify] https://crrev.com/74efc1ddfa7c804529026d516a598e9509895623/chrome/browser/subresource_filter/subresource_filter_browsertest.cc [modify] https://crrev.com/74efc1ddfa7c804529026d516a598e9509895623/chrome/browser/subresource_filter/subresource_filter_configuration_unittest.cc [modify] https://crrev.com/74efc1ddfa7c804529026d516a598e9509895623/chrome/browser/subresource_filter/subresource_filter_test_harness.cc [modify] https://crrev.com/74efc1ddfa7c804529026d516a598e9509895623/chrome/browser/subresource_filter/subresource_filter_unittest.cc [modify] https://crrev.com/74efc1ddfa7c804529026d516a598e9509895623/components/subresource_filter/content/DEPS [modify] https://crrev.com/74efc1ddfa7c804529026d516a598e9509895623/components/subresource_filter/content/browser/BUILD.gn [modify] https://crrev.com/74efc1ddfa7c804529026d516a598e9509895623/components/subresource_filter/content/browser/activation_state_computing_navigation_throttle.h [modify] https://crrev.com/74efc1ddfa7c804529026d516a598e9509895623/components/subresource_filter/content/browser/activation_state_computing_navigation_throttle_unittest.cc [modify] https://crrev.com/74efc1ddfa7c804529026d516a598e9509895623/components/subresource_filter/content/browser/async_document_subresource_filter.h [modify] https://crrev.com/74efc1ddfa7c804529026d516a598e9509895623/components/subresource_filter/content/browser/async_document_subresource_filter_test_utils.h [modify] https://crrev.com/74efc1ddfa7c804529026d516a598e9509895623/components/subresource_filter/content/browser/content_subresource_filter_throttle_manager.cc [modify] https://crrev.com/74efc1ddfa7c804529026d516a598e9509895623/components/subresource_filter/content/browser/content_subresource_filter_throttle_manager.h [modify] https://crrev.com/74efc1ddfa7c804529026d516a598e9509895623/components/subresource_filter/content/browser/content_subresource_filter_throttle_manager_unittest.cc [modify] https://crrev.com/74efc1ddfa7c804529026d516a598e9509895623/components/subresource_filter/content/browser/page_load_statistics.h [modify] https://crrev.com/74efc1ddfa7c804529026d516a598e9509895623/components/subresource_filter/content/browser/subframe_navigation_filtering_throttle_unittest.cc [modify] https://crrev.com/74efc1ddfa7c804529026d516a598e9509895623/components/subresource_filter/content/browser/subresource_filter_client.h [modify] https://crrev.com/74efc1ddfa7c804529026d516a598e9509895623/components/subresource_filter/content/browser/subresource_filter_observer_manager.cc [modify] https://crrev.com/74efc1ddfa7c804529026d516a598e9509895623/components/subresource_filter/content/browser/subresource_filter_observer_test_utils.cc [modify] https://crrev.com/74efc1ddfa7c804529026d516a598e9509895623/components/subresource_filter/content/browser/subresource_filter_observer_test_utils.h [modify] https://crrev.com/74efc1ddfa7c804529026d516a598e9509895623/components/subresource_filter/content/browser/subresource_filter_safe_browsing_activation_throttle_unittest.cc [add] https://crrev.com/74efc1ddfa7c804529026d516a598e9509895623/components/subresource_filter/content/mojom/BUILD.gn [copy] https://crrev.com/74efc1ddfa7c804529026d516a598e9509895623/components/subresource_filter/content/mojom/OWNERS [add] https://crrev.com/74efc1ddfa7c804529026d516a598e9509895623/components/subresource_filter/content/mojom/subresource_filter_agent.mojom [modify] https://crrev.com/74efc1ddfa7c804529026d516a598e9509895623/components/subresource_filter/content/renderer/BUILD.gn [modify] https://crrev.com/74efc1ddfa7c804529026d516a598e9509895623/components/subresource_filter/content/renderer/subresource_filter_agent.cc [modify] https://crrev.com/74efc1ddfa7c804529026d516a598e9509895623/components/subresource_filter/content/renderer/subresource_filter_agent.h [modify] https://crrev.com/74efc1ddfa7c804529026d516a598e9509895623/components/subresource_filter/content/renderer/subresource_filter_agent_unittest.cc [modify] https://crrev.com/74efc1ddfa7c804529026d516a598e9509895623/components/subresource_filter/content/renderer/web_document_subresource_filter_impl.cc [modify] https://crrev.com/74efc1ddfa7c804529026d516a598e9509895623/components/subresource_filter/core/browser/subresource_filter_features.h [modify] https://crrev.com/74efc1ddfa7c804529026d516a598e9509895623/components/subresource_filter/core/common/BUILD.gn [modify] https://crrev.com/74efc1ddfa7c804529026d516a598e9509895623/components/subresource_filter/core/common/document_subresource_filter.h [rename] https://crrev.com/74efc1ddfa7c804529026d516a598e9509895623/components/subresource_filter/core/mojom/BUILD.gn [rename] https://crrev.com/74efc1ddfa7c804529026d516a598e9509895623/components/subresource_filter/core/mojom/OWNERS [rename] https://crrev.com/74efc1ddfa7c804529026d516a598e9509895623/components/subresource_filter/core/mojom/subresource_filter.mojom [modify] https://crrev.com/74efc1ddfa7c804529026d516a598e9509895623/components/subresource_filter/tools/filter_tool.cc [modify] https://crrev.com/74efc1ddfa7c804529026d516a598e9509895623/third_party/blink/public/mojom/BUILD.gn [copy] https://crrev.com/74efc1ddfa7c804529026d516a598e9509895623/third_party/blink/public/mojom/ad_tagging/OWNERS [add] https://crrev.com/74efc1ddfa7c804529026d516a598e9509895623/third_party/blink/public/mojom/ad_tagging/ad_frame.mojom [modify] https://crrev.com/74efc1ddfa7c804529026d516a598e9509895623/third_party/blink/public/web/web_local_frame.h [modify] https://crrev.com/74efc1ddfa7c804529026d516a598e9509895623/third_party/blink/renderer/controller/oom_intervention_impl_test.cc [modify] https://crrev.com/74efc1ddfa7c804529026d516a598e9509895623/third_party/blink/renderer/core/frame/local_frame.cc [modify] https://crrev.com/74efc1ddfa7c804529026d516a598e9509895623/third_party/blink/renderer/core/frame/local_frame.h [modify] https://crrev.com/74efc1ddfa7c804529026d516a598e9509895623/third_party/blink/renderer/core/frame/web_local_frame_impl.cc [modify] https://crrev.com/74efc1ddfa7c804529026d516a598e9509895623/third_party/blink/renderer/core/frame/web_local_frame_impl.h
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/096b7a789ab79730336bc21d465481110171c088 commit 096b7a789ab79730336bc21d465481110171c088 Author: John Delaney <johnidel@chromium.org> Date: Fri Jan 18 18:43:24 2019 Add devtools setting to highlight ad frames With ad tagging rolled out, it will be useful to manually check what frames are being tagged as ads on a page. Add a devtools option that will highlight all adframes on the page allowing us to see what types of ads are circumventing our detection. Bug: 893666 Change-Id: Ib727200a5089b10099443722c4855a16a3961114 Reviewed-on: https://chromium-review.googlesource.com/c/1376730 Reviewed-by: Dmitry Gozman <dgozman@chromium.org> Reviewed-by: Philip Rogers <pdr@chromium.org> Commit-Queue: John Delaney <johnidel@chromium.org> Cr-Commit-Position: refs/heads/master@{#624211} [modify] https://crrev.com/096b7a789ab79730336bc21d465481110171c088/content/shell/test_runner/mock_web_document_subresource_filter.cc [modify] https://crrev.com/096b7a789ab79730336bc21d465481110171c088/content/shell/test_runner/mock_web_document_subresource_filter.h [modify] https://crrev.com/096b7a789ab79730336bc21d465481110171c088/content/shell/test_runner/test_runner.cc [modify] https://crrev.com/096b7a789ab79730336bc21d465481110171c088/content/shell/test_runner/test_runner.h [modify] https://crrev.com/096b7a789ab79730336bc21d465481110171c088/content/shell/test_runner/test_runner_for_specific_view.cc [modify] https://crrev.com/096b7a789ab79730336bc21d465481110171c088/content/shell/test_runner/test_runner_for_specific_view.h [modify] https://crrev.com/096b7a789ab79730336bc21d465481110171c088/third_party/blink/public/web/web_settings.h [modify] https://crrev.com/096b7a789ab79730336bc21d465481110171c088/third_party/blink/renderer/core/exported/web_settings_impl.cc [modify] https://crrev.com/096b7a789ab79730336bc21d465481110171c088/third_party/blink/renderer/core/exported/web_settings_impl.h [modify] https://crrev.com/096b7a789ab79730336bc21d465481110171c088/third_party/blink/renderer/core/frame/frame_overlay.cc [modify] https://crrev.com/096b7a789ab79730336bc21d465481110171c088/third_party/blink/renderer/core/frame/frame_overlay.h [modify] https://crrev.com/096b7a789ab79730336bc21d465481110171c088/third_party/blink/renderer/core/frame/local_frame.cc [modify] https://crrev.com/096b7a789ab79730336bc21d465481110171c088/third_party/blink/renderer/core/frame/local_frame.h [modify] https://crrev.com/096b7a789ab79730336bc21d465481110171c088/third_party/blink/renderer/core/frame/local_frame_view.cc [modify] https://crrev.com/096b7a789ab79730336bc21d465481110171c088/third_party/blink/renderer/core/frame/settings.json5 [modify] https://crrev.com/096b7a789ab79730336bc21d465481110171c088/third_party/blink/renderer/core/frame/settings_delegate.h [modify] https://crrev.com/096b7a789ab79730336bc21d465481110171c088/third_party/blink/renderer/core/inspector/browser_protocol.pdl [modify] https://crrev.com/096b7a789ab79730336bc21d465481110171c088/third_party/blink/renderer/core/inspector/inspector_overlay_agent.cc [modify] https://crrev.com/096b7a789ab79730336bc21d465481110171c088/third_party/blink/renderer/core/inspector/inspector_overlay_agent.h [modify] https://crrev.com/096b7a789ab79730336bc21d465481110171c088/third_party/blink/renderer/core/page/page.cc [modify] https://crrev.com/096b7a789ab79730336bc21d465481110171c088/third_party/blink/renderer/devtools/front_end/inspector_main/RenderingOptions.js [modify] https://crrev.com/096b7a789ab79730336bc21d465481110171c088/third_party/blink/renderer/devtools/front_end/sdk/OverlayModel.js [modify] https://crrev.com/096b7a789ab79730336bc21d465481110171c088/third_party/blink/renderer/devtools/front_end/sdk/module.json [add] https://crrev.com/096b7a789ab79730336bc21d465481110171c088/third_party/blink/web_tests/http/tests/subresource_filter/ad-highlight-expected.png [add] https://crrev.com/096b7a789ab79730336bc21d465481110171c088/third_party/blink/web_tests/http/tests/subresource_filter/ad-highlight-frame-larger-than-viewport-expected.png [add] https://crrev.com/096b7a789ab79730336bc21d465481110171c088/third_party/blink/web_tests/http/tests/subresource_filter/ad-highlight-frame-larger-than-viewport.html [add] https://crrev.com/096b7a789ab79730336bc21d465481110171c088/third_party/blink/web_tests/http/tests/subresource_filter/ad-highlight-frame-resized-expected.png [add] https://crrev.com/096b7a789ab79730336bc21d465481110171c088/third_party/blink/web_tests/http/tests/subresource_filter/ad-highlight-frame-resized.html [add] https://crrev.com/096b7a789ab79730336bc21d465481110171c088/third_party/blink/web_tests/http/tests/subresource_filter/ad-highlight.html [modify] https://crrev.com/096b7a789ab79730336bc21d465481110171c088/third_party/blink/web_tests/http/tests/subresource_filter/collapsed-image-style-crash.html [modify] https://crrev.com/096b7a789ab79730336bc21d465481110171c088/third_party/blink/web_tests/http/tests/subresource_filter/image-allow-disallow-transitions.html [modify] https://crrev.com/096b7a789ab79730336bc21d465481110171c088/third_party/blink/web_tests/http/tests/subresource_filter/image-disallowed-after-redirect.html [modify] https://crrev.com/096b7a789ab79730336bc21d465481110171c088/third_party/blink/web_tests/http/tests/subresource_filter/image-disallowed.html [modify] https://crrev.com/096b7a789ab79730336bc21d465481110171c088/third_party/blink/web_tests/http/tests/subresource_filter/picture-disallowed.html [modify] https://crrev.com/096b7a789ab79730336bc21d465481110171c088/third_party/blink/web_tests/http/tests/subresource_filter/resource-disallowed-after-redirect.html [modify] https://crrev.com/096b7a789ab79730336bc21d465481110171c088/third_party/blink/web_tests/http/tests/subresource_filter/resource-disallowed.html [modify] https://crrev.com/096b7a789ab79730336bc21d465481110171c088/third_party/blink/web_tests/http/tests/subresource_filter/resource-in-import-disallowed.html [add] https://crrev.com/096b7a789ab79730336bc21d465481110171c088/third_party/blink/web_tests/http/tests/subresource_filter/resources/ad-iframe-writer.js [modify] https://crrev.com/096b7a789ab79730336bc21d465481110171c088/third_party/blink/web_tests/http/tests/websocket/subresource-filter-disallows.html
Comment 1 by johnidel@chromium.org
, Oct 10