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

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

Issue 1511143002: Reland 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 }
414 m_horizontalScrollbarNeedsPaintInvalidation = true; 409 m_horizontalScrollbarNeedsPaintInvalidation = true;
415 scrollControlWasSetNeedsPaintInvalidation(); 410 scrollControlWasSetNeedsPaintInvalidation();
416 return; 411 return;
417 } 412 }
418 if (scrollbar == verticalScrollbar()) { 413 if (scrollbar == verticalScrollbar()) {
419 if (GraphicsLayer* graphicsLayer = layerForVerticalScrollbar()) {
420 graphicsLayer->setNeedsDisplay();
421 graphicsLayer->setContentsNeedsDisplay();
422 return;
423 }
424 m_verticalScrollbarNeedsPaintInvalidation = true; 414 m_verticalScrollbarNeedsPaintInvalidation = true;
425 scrollControlWasSetNeedsPaintInvalidation(); 415 scrollControlWasSetNeedsPaintInvalidation();
426 return; 416 return;
427 } 417 }
428 // Otherwise the scrollbar is just created and has not been set as either 418 // Otherwise the scrollbar is just created and has not been set as either
429 // horizontalScrollbar() or verticalScrollbar(). 419 // horizontalScrollbar() or verticalScrollbar().
430 } 420 }
431 421
432 void ScrollableArea::setScrollCornerNeedsPaintInvalidation() 422 void ScrollableArea::setScrollCornerNeedsPaintInvalidation()
433 { 423 {
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
583 573
584 } 574 }
585 575
586 DEFINE_TRACE(ScrollableArea) 576 DEFINE_TRACE(ScrollableArea)
587 { 577 {
588 visitor->trace(m_scrollAnimator); 578 visitor->trace(m_scrollAnimator);
589 visitor->trace(m_programmaticScrollAnimator); 579 visitor->trace(m_programmaticScrollAnimator);
590 } 580 }
591 581
592 } // namespace blink 582 } // 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