Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(985)

Unified Diff: Source/core/page/FocusController.cpp

Issue 397023003: Preparing Blink for cross-process frame tree replication (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Removed extra blank line Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/core/page/FocusController.cpp
diff --git a/Source/core/page/FocusController.cpp b/Source/core/page/FocusController.cpp
index 2f3173962b8c6d642cf89752a69ac69d50b2852b..43545931fb5b40824853c79e25541018579abfe3 100644
--- a/Source/core/page/FocusController.cpp
+++ b/Source/core/page/FocusController.cpp
@@ -304,6 +304,12 @@ Frame* FocusController::focusedOrMainFrame() const
{
if (Frame* frame = focusedFrame())
return frame;
+
+ for (Frame* frame = m_page->mainFrame()->tree().top(); frame; frame = frame->tree().traverseNext()) {
dcheng 2014/07/16 21:09:08 Can we somehow annotate this as a horrible hack? P
kenrb 2014/07/17 14:57:02 I have added a comment. I don't think it is worth
+ if (frame->isLocalRoot())
+ return frame;
+ }
+
return m_page->mainFrame();
}
@@ -730,7 +736,9 @@ void FocusController::setActive(bool active)
view->updateControlTints();
}
- toLocalFrame(focusedOrMainFrame())->selection().pageActivationChanged();
+ Frame* frame = focusedOrMainFrame();
+ if (frame->isLocalFrame())
+ toLocalFrame(frame)->selection().pageActivationChanged();
}
static void updateFocusCandidateIfNeeded(FocusType type, const FocusCandidate& current, FocusCandidate& candidate, FocusCandidate& closest)
« no previous file with comments | « no previous file | Source/core/rendering/compositing/RenderLayerCompositor.cpp » ('j') | Source/web/WebRemoteFrameImpl.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698