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

Side by Side Diff: third_party/WebKit/Source/core/page/scrolling/ScrollingCoordinator.cpp

Issue 1636563003: Put rare PaintLayer fields into PaintLayerRareData (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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) 2011 Apple Inc. All rights reserved. 2 * Copyright (C) 2011 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 639 matching lines...) Expand 10 before | Expand all | Expand 10 after
650 650
651 // FIXME: scheduleAnimation() is just a method of forcing the compositor to realize that it 651 // FIXME: scheduleAnimation() is just a method of forcing the compositor to realize that it
652 // needs to commit here. We should expose a cleaner API for this. 652 // needs to commit here. We should expose a cleaner API for this.
653 LayoutView* layoutView = m_page->deprecatedLocalMainFrame()->contentLayoutOb ject(); 653 LayoutView* layoutView = m_page->deprecatedLocalMainFrame()->contentLayoutOb ject();
654 if (layoutView && layoutView->compositor() && layoutView->compositor()->stal eInCompositingMode()) 654 if (layoutView && layoutView->compositor() && layoutView->compositor()->stal eInCompositingMode())
655 m_page->deprecatedLocalMainFrame()->view()->scheduleAnimation(); 655 m_page->deprecatedLocalMainFrame()->view()->scheduleAnimation();
656 656
657 m_touchEventTargetRectsAreDirty = true; 657 m_touchEventTargetRectsAreDirty = true;
658 } 658 }
659 659
660 void ScrollingCoordinator::updateScrollParentForGraphicsLayer(GraphicsLayer* chi ld, PaintLayer* parent) 660 void ScrollingCoordinator::updateScrollParentForGraphicsLayer(GraphicsLayer* chi ld, const PaintLayer* parent)
661 { 661 {
662 WebLayer* scrollParentWebLayer = nullptr; 662 WebLayer* scrollParentWebLayer = nullptr;
663 if (parent && parent->hasCompositedLayerMapping()) 663 if (parent && parent->hasCompositedLayerMapping())
664 scrollParentWebLayer = toWebLayer(parent->compositedLayerMapping()->scro llingContentsLayer()); 664 scrollParentWebLayer = toWebLayer(parent->compositedLayerMapping()->scro llingContentsLayer());
665 665
666 child->setScrollParent(scrollParentWebLayer); 666 child->setScrollParent(scrollParentWebLayer);
667 } 667 }
668 668
669 void ScrollingCoordinator::updateClipParentForGraphicsLayer(GraphicsLayer* child , PaintLayer* parent) 669 void ScrollingCoordinator::updateClipParentForGraphicsLayer(GraphicsLayer* child , const PaintLayer* parent)
670 { 670 {
671 WebLayer* clipParentWebLayer = nullptr; 671 WebLayer* clipParentWebLayer = nullptr;
672 if (parent && parent->hasCompositedLayerMapping()) 672 if (parent && parent->hasCompositedLayerMapping())
673 clipParentWebLayer = toWebLayer(parent->compositedLayerMapping()->parent ForSublayers()); 673 clipParentWebLayer = toWebLayer(parent->compositedLayerMapping()->parent ForSublayers());
674 674
675 child->setClipParent(clipParentWebLayer); 675 child->setClipParent(clipParentWebLayer);
676 } 676 }
677 677
678 void ScrollingCoordinator::willDestroyLayer(PaintLayer* layer) 678 void ScrollingCoordinator::willDestroyLayer(PaintLayer* layer)
679 { 679 {
(...skipping 402 matching lines...) Expand 10 before | Expand all | Expand 10 after
1082 bool frameIsScrollable = frameView && frameView->isScrollable(); 1082 bool frameIsScrollable = frameView && frameView->isScrollable();
1083 if (frameIsScrollable != m_wasFrameScrollable) 1083 if (frameIsScrollable != m_wasFrameScrollable)
1084 return true; 1084 return true;
1085 1085
1086 if (WebLayer* scrollLayer = frameView ? toWebLayer(frameView->layerForScroll ing()) : nullptr) 1086 if (WebLayer* scrollLayer = frameView ? toWebLayer(frameView->layerForScroll ing()) : nullptr)
1087 return WebSize(frameView->contentsSize()) != scrollLayer->bounds(); 1087 return WebSize(frameView->contentsSize()) != scrollLayer->bounds();
1088 return false; 1088 return false;
1089 } 1089 }
1090 1090
1091 } // namespace blink 1091 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698