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

Unified Diff: Source/core/editing/FrameSelection.cpp

Issue 748513006: Trigger style recalc when the window's active state change (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Invalidatin all the CustomScrolllbars on window-inactive 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
Index: Source/core/editing/FrameSelection.cpp
diff --git a/Source/core/editing/FrameSelection.cpp b/Source/core/editing/FrameSelection.cpp
index b2948ef0d254de143ce815d6e4c9383fec615569..91434f7b6572eae154c737b6a3a7b859aacbda81 100644
--- a/Source/core/editing/FrameSelection.cpp
+++ b/Source/core/editing/FrameSelection.cpp
@@ -1466,6 +1466,11 @@ void FrameSelection::focusedOrActiveStateChanged()
RefPtrWillBeRawPtr<Document> document = m_frame->document();
document->updateRenderTreeIfNeeded();
+ // Invalidate All CustomScrollbars as CustomScrollbars supports
+ // CSS window-active attribute.
+ if (FrameView* view = document->view())
+ view->invalidateAllCustomScrollbarsOnActiveChanged();
pdr. 2014/12/06 04:17:53 Should this be here or in pageActivationChanged?
MuVen 2014/12/06 13:27:03 I think its better to be here, as all window-inact
+
// Because RenderObject::selectionBackgroundColor() and
// RenderObject::selectionForegroundColor() check if the frame is active,
// we have to update places those colors were painted.

Powered by Google App Engine
This is Rietveld 408576698