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

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

Issue 792233004: Invalidate Custom Scrollbars irrespective of focused frame. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: addressed review comments Created 6 years 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/editing/FrameSelection.cpp ('k') | no next file » | 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 61733ddb1d39229cdc54caa798018f0abb312a5c..4382f680fb5796be7026505d992dd3478f2ea719 100644
--- a/Source/core/page/FocusController.cpp
+++ b/Source/core/page/FocusController.cpp
@@ -725,8 +725,14 @@ void FocusController::setActive(bool active)
m_isActive = active;
Frame* frame = focusedOrMainFrame();
- if (frame->isLocalFrame())
+ if (frame->isLocalFrame()) {
+ // Invalidate all custom scrollbars because they support the CSS
+ // window-active attribute. This should be applied to the entire page so
+ // we invalidate from the root FrameView instead of just the focused.
+ if (FrameView* view = toLocalFrame(frame)->localFrameRoot()->document()->view())
+ view->invalidateAllCustomScrollbarsOnActiveChanged();
toLocalFrame(frame)->selection().pageActivationChanged();
+ }
}
static void updateFocusCandidateIfNeeded(FocusType type, const FocusCandidate& current, FocusCandidate& candidate, FocusCandidate& closest)
« no previous file with comments | « Source/core/editing/FrameSelection.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698