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

Side by Side Diff: third_party/WebKit/Source/core/paint/PaintLayer.cpp

Issue 1755243002: Partly revert of Conditionally create PaintLayer's scrollable area object (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@PaintLayerClipper
Patch Set: Partly revert 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
« no previous file with comments | « third_party/WebKit/Source/core/paint/PaintLayer.h ('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) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights reserved.
3 * 3 *
4 * Portions are Copyright (C) 1998 Netscape Communications Corporation. 4 * Portions are Copyright (C) 1998 Netscape Communications Corporation.
5 * 5 *
6 * Other contributors: 6 * Other contributors:
7 * Robert O'Callahan <roc+@cs.cmu.edu> 7 * Robert O'Callahan <roc+@cs.cmu.edu>
8 * David Baron <dbaron@fas.harvard.edu> 8 * David Baron <dbaron@fas.harvard.edu>
9 * Christian Biesinger <cbiesinger@web.de> 9 * Christian Biesinger <cbiesinger@web.de>
10 * Randall Jesup <rjesup@wgate.com> 10 * Randall Jesup <rjesup@wgate.com>
(...skipping 1451 matching lines...) Expand 10 before | Expand all | Expand 10 after
1462 { 1462 {
1463 ASSERT(!m_stackingNode); 1463 ASSERT(!m_stackingNode);
1464 if (requiresStackingNode()) 1464 if (requiresStackingNode())
1465 m_stackingNode = adoptPtr(new PaintLayerStackingNode(this)); 1465 m_stackingNode = adoptPtr(new PaintLayerStackingNode(this));
1466 else 1466 else
1467 m_stackingNode = nullptr; 1467 m_stackingNode = nullptr;
1468 } 1468 }
1469 1469
1470 void PaintLayer::updateScrollableArea() 1470 void PaintLayer::updateScrollableArea()
1471 { 1471 {
1472 if (requiresScrollableArea()) { 1472 ASSERT(!m_scrollableArea);
1473 if (!m_scrollableArea) 1473 if (requiresScrollableArea())
1474 m_scrollableArea = PaintLayerScrollableArea::create(*this); 1474 m_scrollableArea = PaintLayerScrollableArea::create(*this);
1475 } else if (m_scrollableArea) {
1476 if (m_scrollableArea)
1477 m_scrollableArea->dispose();
1478 m_scrollableArea.clear();
1479 }
1480 } 1475 }
1481 1476
1482 bool PaintLayer::hasOverflowControls() const 1477 bool PaintLayer::hasOverflowControls() const
1483 { 1478 {
1484 return m_scrollableArea && (m_scrollableArea->hasScrollbar() || m_scrollable Area->scrollCorner() || layoutObject()->style()->resize() != RESIZE_NONE); 1479 return m_scrollableArea && (m_scrollableArea->hasScrollbar() || m_scrollable Area->scrollCorner() || layoutObject()->style()->resize() != RESIZE_NONE);
1485 } 1480 }
1486 1481
1487 void PaintLayer::appendSingleFragmentIgnoringPagination(PaintLayerFragments& fra gments, const PaintLayer* rootLayer, const LayoutRect& dirtyRect, ClipRectsCache Slot clipRectsCacheSlot, OverlayScrollbarSizeRelevancy inOverlayScrollbarSizeRel evancy, ShouldRespectOverflowClip respectOverflowClip, const LayoutPoint* offset FromRoot, const LayoutSize& subPixelAccumulation) 1482 void PaintLayer::appendSingleFragmentIgnoringPagination(PaintLayerFragments& fra gments, const PaintLayer* rootLayer, const LayoutRect& dirtyRect, ClipRectsCache Slot clipRectsCacheSlot, OverlayScrollbarSizeRelevancy inOverlayScrollbarSizeRel evancy, ShouldRespectOverflowClip respectOverflowClip, const LayoutPoint* offset FromRoot, const LayoutSize& subPixelAccumulation)
1488 { 1483 {
1489 PaintLayerFragment fragment; 1484 PaintLayerFragment fragment;
(...skipping 1085 matching lines...) Expand 10 before | Expand all | Expand 10 after
2575 } 2570 }
2576 2571
2577 void PaintLayer::styleChanged(StyleDifference diff, const ComputedStyle* oldStyl e) 2572 void PaintLayer::styleChanged(StyleDifference diff, const ComputedStyle* oldStyl e)
2578 { 2573 {
2579 if (attemptDirectCompositingUpdate(diff, oldStyle)) 2574 if (attemptDirectCompositingUpdate(diff, oldStyle))
2580 return; 2575 return;
2581 2576
2582 m_stackingNode->updateIsTreatedAsStackingContext(); 2577 m_stackingNode->updateIsTreatedAsStackingContext();
2583 m_stackingNode->updateStackingNodesAfterStyleChange(oldStyle); 2578 m_stackingNode->updateStackingNodesAfterStyleChange(oldStyle);
2584 2579
2585 updateScrollableArea();
2586 if (m_scrollableArea) 2580 if (m_scrollableArea)
2587 m_scrollableArea->updateAfterStyleChange(oldStyle); 2581 m_scrollableArea->updateAfterStyleChange(oldStyle);
2588 2582
2589 // Overlay scrollbars can make this layer self-painting so we need 2583 // Overlay scrollbars can make this layer self-painting so we need
2590 // to recompute the bit once scrollbars have been updated. 2584 // to recompute the bit once scrollbars have been updated.
2591 updateSelfPaintingLayer(); 2585 updateSelfPaintingLayer();
2592 2586
2593 if (!oldStyle || !layoutObject()->style()->reflectionDataEquivalent(oldStyle )) { 2587 if (!oldStyle || !layoutObject()->style()->reflectionDataEquivalent(oldStyle )) {
2594 ASSERT(!oldStyle || diff.needsFullLayout()); 2588 ASSERT(!oldStyle || diff.needsFullLayout());
2595 updateReflectionInfo(oldStyle); 2589 updateReflectionInfo(oldStyle);
(...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after
2842 2836
2843 void showLayerTree(const blink::LayoutObject* layoutObject) 2837 void showLayerTree(const blink::LayoutObject* layoutObject)
2844 { 2838 {
2845 if (!layoutObject) { 2839 if (!layoutObject) {
2846 fprintf(stderr, "Cannot showLayerTree. Root is (nil)\n"); 2840 fprintf(stderr, "Cannot showLayerTree. Root is (nil)\n");
2847 return; 2841 return;
2848 } 2842 }
2849 showLayerTree(layoutObject->enclosingLayer()); 2843 showLayerTree(layoutObject->enclosingLayer());
2850 } 2844 }
2851 #endif 2845 #endif
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/paint/PaintLayer.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698