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

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: fixed nit. 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();
rune 2014/12/08 23:14:26 Updating the render tree synchronously immediately
MuVen 2014/12/09 09:33:07 the text reflow has been solved earlier for the cu
rune 2014/12/09 10:36:33 But this still doesn't look right. You do: upda
MuVen 2014/12/09 10:44:20 true. It makes sense for me, Ideally updateRenderT
+ // Invalidate All CustomScrollbars as CustomScrollbars supports
+ // CSS window-active attribute.
+ if (FrameView* view = document->view())
+ view->invalidateAllCustomScrollbarsOnActiveChanged();
rune 2014/12/08 23:14:26 This is still called unconditionally even when the
MuVen 2014/12/09 09:33:07 True. I would like to optimise this in my next pat
rune 2014/12/09 10:36:33 Sure.
+
// 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