summaryrefslogtreecommitdiffstats
path: root/extensions/renderer
diff options
context:
space:
mode:
Diffstat (limited to 'extensions/renderer')
-rw-r--r--extensions/renderer/content_watcher.cc9
1 files changed, 7 insertions, 2 deletions
diff --git a/extensions/renderer/content_watcher.cc b/extensions/renderer/content_watcher.cc
index 7cb1851..3ab9e59 100644
--- a/extensions/renderer/content_watcher.cc
+++ b/extensions/renderer/content_watcher.cc
@@ -49,9 +49,14 @@ void ContentWatcher::OnWatchPages(
: css_selectors_(css_selectors) {}
bool Visit(content::RenderView* view) override {
+ // TODO(dcheng): This should be rewritten to be frame-oriented. It
+ // probably breaks declarative content for OOPI.
for (blink::WebFrame* frame = view->GetWebView()->mainFrame(); frame;
- frame = frame->traverseNext(/*wrap=*/false))
- frame->document().watchCSSSelectors(css_selectors_);
+ frame = frame->traverseNext(/*wrap=*/false)) {
+ if (frame->isWebRemoteFrame())
+ continue;
+ frame->toWebLocalFrame()->document().watchCSSSelectors(css_selectors_);
+ }
return true; // Continue visiting.
}