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

Side by Side Diff: third_party/WebKit/Source/platform/scroll/ScrollableArea.cpp

Issue 1513573004: Revert of Fix several corner case issues of scrollbar paint invalidation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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 | « third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp ('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) 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 388 matching lines...) Expand 10 before | Expand all | Expand 10 after
399 399
400 if (Scrollbar* scrollbar = verticalScrollbar()) { 400 if (Scrollbar* scrollbar = verticalScrollbar()) {
401 ScrollbarTheme::theme()->updateScrollbarOverlayStyle(scrollbar); 401 ScrollbarTheme::theme()->updateScrollbarOverlayStyle(scrollbar);
402 setScrollbarNeedsPaintInvalidation(scrollbar); 402 setScrollbarNeedsPaintInvalidation(scrollbar);
403 } 403 }
404 } 404 }
405 405
406 void ScrollableArea::setScrollbarNeedsPaintInvalidation(Scrollbar* scrollbar) 406 void ScrollableArea::setScrollbarNeedsPaintInvalidation(Scrollbar* scrollbar)
407 { 407 {
408 if (scrollbar == horizontalScrollbar()) { 408 if (scrollbar == horizontalScrollbar()) {
409 if (GraphicsLayer* graphicsLayer = layerForHorizontalScrollbar()) {
410 graphicsLayer->setNeedsDisplay();
411 graphicsLayer->setContentsNeedsDisplay();
412 return;
413 }
409 m_horizontalScrollbarNeedsPaintInvalidation = true; 414 m_horizontalScrollbarNeedsPaintInvalidation = true;
410 scrollControlWasSetNeedsPaintInvalidation(); 415 scrollControlWasSetNeedsPaintInvalidation();
411 return; 416 return;
412 } 417 }
413 if (scrollbar == verticalScrollbar()) { 418 if (scrollbar == verticalScrollbar()) {
419 if (GraphicsLayer* graphicsLayer = layerForVerticalScrollbar()) {
420 graphicsLayer->setNeedsDisplay();
421 graphicsLayer->setContentsNeedsDisplay();
422 return;
423 }
414 m_verticalScrollbarNeedsPaintInvalidation = true; 424 m_verticalScrollbarNeedsPaintInvalidation = true;
415 scrollControlWasSetNeedsPaintInvalidation(); 425 scrollControlWasSetNeedsPaintInvalidation();
416 return; 426 return;
417 } 427 }
418 // Otherwise the scrollbar is just created and has not been set as either 428 // Otherwise the scrollbar is just created and has not been set as either
419 // horizontalScrollbar() or verticalScrollbar(). 429 // horizontalScrollbar() or verticalScrollbar().
420 } 430 }
421 431
422 void ScrollableArea::setScrollCornerNeedsPaintInvalidation() 432 void ScrollableArea::setScrollCornerNeedsPaintInvalidation()
423 { 433 {
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
573 583
574 } 584 }
575 585
576 DEFINE_TRACE(ScrollableArea) 586 DEFINE_TRACE(ScrollableArea)
577 { 587 {
578 visitor->trace(m_scrollAnimator); 588 visitor->trace(m_scrollAnimator);
579 visitor->trace(m_programmaticScrollAnimator); 589 visitor->trace(m_programmaticScrollAnimator);
580 } 590 }
581 591
582 } // namespace blink 592 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698