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

Side by Side Diff: third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp

Issue 2426793002: Aura overlay scrollbars adjust color for dark backgrounds (Closed)
Patch Set: fix Created 4 years, 1 month 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights
3 * reserved. 3 * reserved.
4 * 4 *
5 * Portions are Copyright (C) 1998 Netscape Communications Corporation. 5 * Portions are Copyright (C) 1998 Netscape Communications Corporation.
6 * 6 *
7 * Other contributors: 7 * Other contributors:
8 * Robert O'Callahan <roc+@cs.cmu.edu> 8 * Robert O'Callahan <roc+@cs.cmu.edu>
9 * David Baron <dbaron@fas.harvard.edu> 9 * David Baron <dbaron@fas.harvard.edu>
10 * Christian Biesinger <cbiesinger@gmail.com> 10 * Christian Biesinger <cbiesinger@gmail.com>
(...skipping 955 matching lines...) Expand 10 before | Expand all | Expand 10 after
966 // overlay style might need to be changed to have contrast against the 966 // overlay style might need to be changed to have contrast against the
967 // background. 967 // background.
968 Color oldBackground; 968 Color oldBackground;
969 if (oldStyle) { 969 if (oldStyle) {
970 oldBackground = oldStyle->visitedDependentColor(CSSPropertyBackgroundColor); 970 oldBackground = oldStyle->visitedDependentColor(CSSPropertyBackgroundColor);
971 } 971 }
972 Color newBackground = 972 Color newBackground =
973 box().style()->visitedDependentColor(CSSPropertyBackgroundColor); 973 box().style()->visitedDependentColor(CSSPropertyBackgroundColor);
974 974
975 if (newBackground != oldBackground) { 975 if (newBackground != oldBackground) {
976 recalculateScrollbarOverlayStyle(newBackground); 976 recalculateScrollbarOverlayColorTheme(newBackground);
977 } 977 }
978 } 978 }
979 979
980 bool PaintLayerScrollableArea::updateAfterCompositingChange() { 980 bool PaintLayerScrollableArea::updateAfterCompositingChange() {
981 layer()->updateScrollingStateAfterCompositingChange(); 981 layer()->updateScrollingStateAfterCompositingChange();
982 const bool layersChanged = m_topmostScrollChild != m_nextTopmostScrollChild; 982 const bool layersChanged = m_topmostScrollChild != m_nextTopmostScrollChild;
983 m_topmostScrollChild = m_nextTopmostScrollChild; 983 m_topmostScrollChild = m_nextTopmostScrollChild;
984 m_nextTopmostScrollChild = nullptr; 984 m_nextTopmostScrollChild = nullptr;
985 return layersChanged; 985 return layersChanged;
986 } 986 }
(...skipping 996 matching lines...) Expand 10 before | Expand all | Expand 10 after
1983 1983
1984 void PaintLayerScrollableArea::DelayScrollOffsetClampScope:: 1984 void PaintLayerScrollableArea::DelayScrollOffsetClampScope::
1985 clampScrollableAreas() { 1985 clampScrollableAreas() {
1986 for (auto& scrollableArea : *s_needsClamp) 1986 for (auto& scrollableArea : *s_needsClamp)
1987 scrollableArea->clampScrollOffsetsAfterLayout(); 1987 scrollableArea->clampScrollOffsetsAfterLayout();
1988 delete s_needsClamp; 1988 delete s_needsClamp;
1989 s_needsClamp = nullptr; 1989 s_needsClamp = nullptr;
1990 } 1990 }
1991 1991
1992 } // namespace blink 1992 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698