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

Side by Side Diff: third_party/WebKit/Source/core/layout/LayoutBox.cpp

Issue 1738503003: Fix overlay scroll bar color on elements with dark background (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix issue with custom scroll bar style Created 4 years, 9 months 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) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2005 Allan Sandfeld Jensen (kde@carewolf.com) 4 * (C) 2005 Allan Sandfeld Jensen (kde@carewolf.com)
5 * (C) 2005, 2006 Samuel Weinig (sam.weinig@gmail.com) 5 * (C) 2005, 2006 Samuel Weinig (sam.weinig@gmail.com)
6 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserv ed. 6 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserv ed.
7 * Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved. 7 * Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved.
8 * 8 *
9 * This library is free software; you can redistribute it and/or 9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Library General Public 10 * modify it under the terms of the GNU Library General Public
(...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after
269 // Our opaqueness might have changed without triggering layout. 269 // Our opaqueness might have changed without triggering layout.
270 if (diff.needsPaintInvalidation()) { 270 if (diff.needsPaintInvalidation()) {
271 LayoutObject* parentToInvalidate = parent(); 271 LayoutObject* parentToInvalidate = parent();
272 for (unsigned i = 0; i < backgroundObscurationTestMaxDepth && parentToIn validate; ++i) { 272 for (unsigned i = 0; i < backgroundObscurationTestMaxDepth && parentToIn validate; ++i) {
273 parentToInvalidate->invalidateBackgroundObscurationStatus(); 273 parentToInvalidate->invalidateBackgroundObscurationStatus();
274 parentToInvalidate = parentToInvalidate->parent(); 274 parentToInvalidate = parentToInvalidate->parent();
275 } 275 }
276 } 276 }
277 277
278 if (isDocumentElement() || isBody()) { 278 if (isDocumentElement() || isBody()) {
279 document().view()->recalculateScrollbarOverlayStyle(); 279 document().view()->recalculateScrollbarOverlayStyle(document().view()->d ocumentBackgroundColor());
280 document().view()->recalculateCustomScrollbarStyle(); 280 document().view()->recalculateCustomScrollbarStyle();
281 if (LayoutView* layoutView = view()) { 281 if (LayoutView* layoutView = view()) {
282 if (PaintLayerScrollableArea* scrollableArea = layoutView->scrollabl eArea()) { 282 if (PaintLayerScrollableArea* scrollableArea = layoutView->scrollabl eArea()) {
283 if (scrollableArea->horizontalScrollbar() && scrollableArea->hor izontalScrollbar()->isCustomScrollbar()) 283 if (scrollableArea->horizontalScrollbar() && scrollableArea->hor izontalScrollbar()->isCustomScrollbar())
284 scrollableArea->horizontalScrollbar()->styleChanged(); 284 scrollableArea->horizontalScrollbar()->styleChanged();
285 if (scrollableArea->verticalScrollbar() && scrollableArea->verti calScrollbar()->isCustomScrollbar()) 285 if (scrollableArea->verticalScrollbar() && scrollableArea->verti calScrollbar()->isCustomScrollbar())
286 scrollableArea->verticalScrollbar()->styleChanged(); 286 scrollableArea->verticalScrollbar()->styleChanged();
287 } 287 }
288 } 288 }
289 } 289 }
(...skipping 4392 matching lines...) Expand 10 before | Expand all | Expand 10 after
4682 } 4682 }
4683 4683
4684 void LayoutBox::IntrinsicSizingInfo::transpose() 4684 void LayoutBox::IntrinsicSizingInfo::transpose()
4685 { 4685 {
4686 size = size.transposedSize(); 4686 size = size.transposedSize();
4687 aspectRatio = aspectRatio.transposedSize(); 4687 aspectRatio = aspectRatio.transposedSize();
4688 std::swap(hasWidth, hasHeight); 4688 std::swap(hasWidth, hasHeight);
4689 } 4689 }
4690 4690
4691 } // namespace blink 4691 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698