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

Unified Diff: Source/core/frame/FrameView.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
« Source/core/editing/FrameSelection.cpp ('K') | « Source/core/frame/FrameView.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/frame/FrameView.cpp
diff --git a/Source/core/frame/FrameView.cpp b/Source/core/frame/FrameView.cpp
index 80bbf1b9c1caa164c41519188afb2ff8c9b8d76d..935c93faba4cdf7ad1669cd5c6132697c0669f2d 100644
--- a/Source/core/frame/FrameView.cpp
+++ b/Source/core/frame/FrameView.cpp
@@ -341,6 +341,19 @@ void FrameView::recalculateCustomScrollbarStyle()
}
}
+void FrameView::invalidateAllCustomScrollbarsOnActiveChanged()
+{
+ const ChildrenWidgetSet* viewChildren = children();
+ for (const RefPtrWillBeMember<Widget>& child : *viewChildren) {
+ Widget* widget = child.get();
+ if (widget->isFrameView()) {
+ toFrameView(widget)->recalculateCustomScrollbarStyle();
pdr. 2014/12/06 04:17:53 Just to make sure I understand: we don't need to c
MuVen 2014/12/06 13:27:03 Good Catch !!! thanks, we have to call invalidateA
+ } else if (widget->isScrollbar()) {
+ toScrollbar(widget)->styleChanged();
+ }
+ }
+}
+
void FrameView::recalculateScrollbarOverlayStyle()
{
ScrollbarOverlayStyle oldOverlayStyle = scrollbarOverlayStyle();
« Source/core/editing/FrameSelection.cpp ('K') | « Source/core/frame/FrameView.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698