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

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

Issue 348833005: [DO NOT COMMIT] Random hacks to unblock work on replication. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: More random hacks, including also dcheng's https://codereview.chromium.org/346403002 Created 6 years, 6 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
« no previous file with comments | « Source/core/frame/FrameView.cpp ('k') | Source/core/page/Page.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/page/FocusController.cpp
diff --git a/Source/core/page/FocusController.cpp b/Source/core/page/FocusController.cpp
index 8981bcc33633ebf533a999f94f1b02b4d79b7201..c11e09d6c95b15cff3657ad44fbe244ac567c438 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()) {
+ if (frame->isLocalRoot())
+ return frame;
+ }
+
return m_page->mainFrame();
}
@@ -727,7 +733,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 | « Source/core/frame/FrameView.cpp ('k') | Source/core/page/Page.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698