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

Side by Side Diff: third_party/WebKit/Source/platform/scroll/ScrollableArea.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: 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) 2010, Google Inc. All rights reserved. 2 * Copyright (c) 2010, Google Inc. All rights reserved.
3 * Copyright (C) 2008, 2011 Apple Inc. All Rights Reserved. 3 * Copyright (C) 2008, 2011 Apple Inc. All Rights Reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are 6 * modification, are permitted provided that the following conditions are
7 * met: 7 * met:
8 * 8 *
9 * * Redistributions of source code must retain the above copyright 9 * * Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 383 matching lines...) Expand 10 before | Expand all | Expand 10 after
394 Scrollbar* hScrollbar = horizontalScrollbar(); 394 Scrollbar* hScrollbar = horizontalScrollbar();
395 return hScrollbar && hScrollbar->isOverlayScrollbar(); 395 return hScrollbar && hScrollbar->isOverlayScrollbar();
396 } 396 }
397 397
398 void ScrollableArea::setScrollbarOverlayStyle(ScrollbarOverlayStyle overlayStyle ) 398 void ScrollableArea::setScrollbarOverlayStyle(ScrollbarOverlayStyle overlayStyle )
399 { 399 {
400 m_scrollbarOverlayStyle = overlayStyle; 400 m_scrollbarOverlayStyle = overlayStyle;
401 401
402 if (Scrollbar* scrollbar = horizontalScrollbar()) { 402 if (Scrollbar* scrollbar = horizontalScrollbar()) {
403 ScrollbarTheme::theme().updateScrollbarOverlayStyle(*scrollbar); 403 ScrollbarTheme::theme().updateScrollbarOverlayStyle(*scrollbar);
404 setScrollbarNeedsPaintInvalidation(HorizontalScrollbar); 404 scrollbar->setNeedsPaintInvalidation(AllParts);
405 } 405 }
406 406
407 if (Scrollbar* scrollbar = verticalScrollbar()) { 407 if (Scrollbar* scrollbar = verticalScrollbar()) {
408 ScrollbarTheme::theme().updateScrollbarOverlayStyle(*scrollbar); 408 ScrollbarTheme::theme().updateScrollbarOverlayStyle(*scrollbar);
409 setScrollbarNeedsPaintInvalidation(VerticalScrollbar); 409 scrollbar->setNeedsPaintInvalidation(AllParts);
410 } 410 }
411 } 411 }
412 412
413 void ScrollableArea::setScrollbarNeedsPaintInvalidation(ScrollbarOrientation ori entation) 413 void ScrollableArea::setScrollbarNeedsPaintInvalidation(ScrollbarOrientation ori entation)
414 { 414 {
415 if (orientation == HorizontalScrollbar) { 415 if (orientation == HorizontalScrollbar) {
416 if (GraphicsLayer* graphicsLayer = layerForHorizontalScrollbar()) { 416 if (GraphicsLayer* graphicsLayer = layerForHorizontalScrollbar()) {
417 graphicsLayer->setNeedsDisplay(); 417 graphicsLayer->setNeedsDisplay();
418 graphicsLayer->setContentsNeedsDisplay(); 418 graphicsLayer->setContentsNeedsDisplay();
419 } 419 }
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
609 std::max(0, size.height() - horizontalScrollbarHeight)); 609 std::max(0, size.height() - horizontalScrollbarHeight));
610 } 610 }
611 611
612 DEFINE_TRACE(ScrollableArea) 612 DEFINE_TRACE(ScrollableArea)
613 { 613 {
614 visitor->trace(m_scrollAnimator); 614 visitor->trace(m_scrollAnimator);
615 visitor->trace(m_programmaticScrollAnimator); 615 visitor->trace(m_programmaticScrollAnimator);
616 } 616 }
617 617
618 } // namespace blink 618 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698