| OLD | NEW |
| 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 1431 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1442 { | 1442 { |
| 1443 ASSERT(!m_stackingNode); | 1443 ASSERT(!m_stackingNode); |
| 1444 if (requiresStackingNode()) | 1444 if (requiresStackingNode()) |
| 1445 m_stackingNode = adoptPtr(new PaintLayerStackingNode(this)); | 1445 m_stackingNode = adoptPtr(new PaintLayerStackingNode(this)); |
| 1446 else | 1446 else |
| 1447 m_stackingNode = nullptr; | 1447 m_stackingNode = nullptr; |
| 1448 } | 1448 } |
| 1449 | 1449 |
| 1450 void PaintLayer::updateScrollableArea() | 1450 void PaintLayer::updateScrollableArea() |
| 1451 { | 1451 { |
| 1452 ASSERT(!m_scrollableArea); | 1452 if (requiresScrollableArea()) { |
| 1453 if (requiresScrollableArea()) | 1453 if (!m_scrollableArea) |
| 1454 m_scrollableArea = PaintLayerScrollableArea::create(*this); | 1454 m_scrollableArea = PaintLayerScrollableArea::create(*this); |
| 1455 } else if (m_scrollableArea) { |
| 1456 if (m_scrollableArea) |
| 1457 m_scrollableArea->dispose(); |
| 1458 m_scrollableArea.clear(); |
| 1459 } |
| 1455 } | 1460 } |
| 1456 | 1461 |
| 1457 bool PaintLayer::hasOverflowControls() const | 1462 bool PaintLayer::hasOverflowControls() const |
| 1458 { | 1463 { |
| 1459 return m_scrollableArea && (m_scrollableArea->hasScrollbar() || m_scrollable
Area->scrollCorner() || layoutObject()->style()->resize() != RESIZE_NONE); | 1464 return m_scrollableArea && (m_scrollableArea->hasScrollbar() || m_scrollable
Area->scrollCorner() || layoutObject()->style()->resize() != RESIZE_NONE); |
| 1460 } | 1465 } |
| 1461 | 1466 |
| 1462 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) | 1467 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) |
| 1463 { | 1468 { |
| 1464 PaintLayerFragment fragment; | 1469 PaintLayerFragment fragment; |
| (...skipping 1077 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2542 } | 2547 } |
| 2543 | 2548 |
| 2544 void PaintLayer::styleChanged(StyleDifference diff, const ComputedStyle* oldStyl
e) | 2549 void PaintLayer::styleChanged(StyleDifference diff, const ComputedStyle* oldStyl
e) |
| 2545 { | 2550 { |
| 2546 if (attemptDirectCompositingUpdate(diff, oldStyle)) | 2551 if (attemptDirectCompositingUpdate(diff, oldStyle)) |
| 2547 return; | 2552 return; |
| 2548 | 2553 |
| 2549 m_stackingNode->updateIsTreatedAsStackingContext(); | 2554 m_stackingNode->updateIsTreatedAsStackingContext(); |
| 2550 m_stackingNode->updateStackingNodesAfterStyleChange(oldStyle); | 2555 m_stackingNode->updateStackingNodesAfterStyleChange(oldStyle); |
| 2551 | 2556 |
| 2557 updateScrollableArea(); |
| 2552 if (m_scrollableArea) | 2558 if (m_scrollableArea) |
| 2553 m_scrollableArea->updateAfterStyleChange(oldStyle); | 2559 m_scrollableArea->updateAfterStyleChange(oldStyle); |
| 2554 | 2560 |
| 2555 // Overlay scrollbars can make this layer self-painting so we need | 2561 // Overlay scrollbars can make this layer self-painting so we need |
| 2556 // to recompute the bit once scrollbars have been updated. | 2562 // to recompute the bit once scrollbars have been updated. |
| 2557 updateSelfPaintingLayer(); | 2563 updateSelfPaintingLayer(); |
| 2558 | 2564 |
| 2559 if (!oldStyle || !layoutObject()->style()->reflectionDataEquivalent(oldStyle
)) { | 2565 if (!oldStyle || !layoutObject()->style()->reflectionDataEquivalent(oldStyle
)) { |
| 2560 ASSERT(!oldStyle || diff.needsFullLayout()); | 2566 ASSERT(!oldStyle || diff.needsFullLayout()); |
| 2561 updateReflectionInfo(oldStyle); | 2567 updateReflectionInfo(oldStyle); |
| (...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2808 | 2814 |
| 2809 void showLayerTree(const blink::LayoutObject* layoutObject) | 2815 void showLayerTree(const blink::LayoutObject* layoutObject) |
| 2810 { | 2816 { |
| 2811 if (!layoutObject) { | 2817 if (!layoutObject) { |
| 2812 fprintf(stderr, "Cannot showLayerTree. Root is (nil)\n"); | 2818 fprintf(stderr, "Cannot showLayerTree. Root is (nil)\n"); |
| 2813 return; | 2819 return; |
| 2814 } | 2820 } |
| 2815 showLayerTree(layoutObject->enclosingLayer()); | 2821 showLayerTree(layoutObject->enclosingLayer()); |
| 2816 } | 2822 } |
| 2817 #endif | 2823 #endif |
| OLD | NEW |