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

Side by Side 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: Missed out Updating Scrollbar geometry on styleChanged: Added it now 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 unified diff | Download patch
« no previous file with comments | « Source/core/frame/FrameView.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1998, 1999 Torben Weis <weis@kde.org> 2 * Copyright (C) 1998, 1999 Torben Weis <weis@kde.org>
3 * 1999 Lars Knoll <knoll@kde.org> 3 * 1999 Lars Knoll <knoll@kde.org>
4 * 1999 Antti Koivisto <koivisto@kde.org> 4 * 1999 Antti Koivisto <koivisto@kde.org>
5 * 2000 Dirk Mueller <mueller@kde.org> 5 * 2000 Dirk Mueller <mueller@kde.org>
6 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved.
7 * (C) 2006 Graham Dennis (graham.dennis@gmail.com) 7 * (C) 2006 Graham Dennis (graham.dennis@gmail.com)
8 * (C) 2006 Alexey Proskuryakov (ap@nypop.com) 8 * (C) 2006 Alexey Proskuryakov (ap@nypop.com)
9 * Copyright (C) 2009 Google Inc. All rights reserved. 9 * Copyright (C) 2009 Google Inc. All rights reserved.
10 * 10 *
(...skipping 323 matching lines...) Expand 10 before | Expand all | Expand 10 after
334 m_verticalScrollbar->styleChanged(); 334 m_verticalScrollbar->styleChanged();
335 didStyleChange = true; 335 didStyleChange = true;
336 } 336 }
337 if (didStyleChange) { 337 if (didStyleChange) {
338 updateScrollbarGeometry(); 338 updateScrollbarGeometry();
339 updateScrollCorner(); 339 updateScrollCorner();
340 positionScrollbarLayers(); 340 positionScrollbarLayers();
341 } 341 }
342 } 342 }
343 343
344 void FrameView::invalidateAllCustomScrollbarsOnActiveChanged()
345 {
346 const ChildrenWidgetSet* viewChildren = children();
347 for (const RefPtrWillBeMember<Widget>& child : *viewChildren) {
348 Widget* widget = child.get();
349 if (widget->isFrameView()) {
350 toFrameView(widget)->recalculateCustomScrollbarStyle();
351 toFrameView(widget)->invalidateAllCustomScrollbarsOnActiveChanged();
352 } else if (widget->isScrollbar()) {
353 toScrollbar(widget)->styleChanged();
354 updateScrollbarGeometry();
MuVen 2014/12/09 11:29:48 This snippet was missed. If RootFrameView has Cust
rune 2014/12/09 11:41:33 I'm not an expert on scrollbar widgets, but doesn'
355 updateScrollCorner();
356 positionScrollbarLayers();
357 }
358 }
359 }
360
344 void FrameView::recalculateScrollbarOverlayStyle() 361 void FrameView::recalculateScrollbarOverlayStyle()
345 { 362 {
346 ScrollbarOverlayStyle oldOverlayStyle = scrollbarOverlayStyle(); 363 ScrollbarOverlayStyle oldOverlayStyle = scrollbarOverlayStyle();
347 ScrollbarOverlayStyle overlayStyle = ScrollbarOverlayStyleDefault; 364 ScrollbarOverlayStyle overlayStyle = ScrollbarOverlayStyleDefault;
348 365
349 Color backgroundColor = documentBackgroundColor(); 366 Color backgroundColor = documentBackgroundColor();
350 // Reduce the background color from RGB to a lightness value 367 // Reduce the background color from RGB to a lightness value
351 // and determine which scrollbar style to use based on a lightness 368 // and determine which scrollbar style to use based on a lightness
352 // heuristic. 369 // heuristic.
353 double hue, saturation, lightness; 370 double hue, saturation, lightness;
(...skipping 3602 matching lines...) Expand 10 before | Expand all | Expand 10 after
3956 return; 3973 return;
3957 3974
3958 ScrollableArea::setScrollOrigin(origin); 3975 ScrollableArea::setScrollOrigin(origin);
3959 3976
3960 // Update if the scroll origin changes, since our position will be different if the content size did not change. 3977 // Update if the scroll origin changes, since our position will be different if the content size did not change.
3961 if (updatePositionAtAll && updatePositionSynchronously) 3978 if (updatePositionAtAll && updatePositionSynchronously)
3962 updateScrollbars(scrollOffsetDouble()); 3979 updateScrollbars(scrollOffsetDouble());
3963 } 3980 }
3964 3981
3965 } // namespace blink 3982 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/frame/FrameView.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698