| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights | 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights |
| 3 * reserved. | 3 * reserved. |
| 4 * | 4 * |
| 5 * Portions are Copyright (C) 1998 Netscape Communications Corporation. | 5 * Portions are Copyright (C) 1998 Netscape Communications Corporation. |
| 6 * | 6 * |
| 7 * Other contributors: | 7 * Other contributors: |
| 8 * Robert O'Callahan <roc+@cs.cmu.edu> | 8 * Robert O'Callahan <roc+@cs.cmu.edu> |
| 9 * David Baron <dbaron@fas.harvard.edu> | 9 * David Baron <dbaron@fas.harvard.edu> |
| 10 * Christian Biesinger <cbiesinger@web.de> | 10 * Christian Biesinger <cbiesinger@web.de> |
| (...skipping 2520 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2531 if (isRootLayer() && !needsCompositedScrolling()) | 2531 if (isRootLayer() && !needsCompositedScrolling()) |
| 2532 return LayoutRect(m_layoutObject->view()->documentRect()); | 2532 return LayoutRect(m_layoutObject->view()->documentRect()); |
| 2533 | 2533 |
| 2534 // The layer created for the LayoutFlowThread is just a helper for painting | 2534 // The layer created for the LayoutFlowThread is just a helper for painting |
| 2535 // and hit-testing, and should not contribute to the bounding box. The | 2535 // and hit-testing, and should not contribute to the bounding box. The |
| 2536 // LayoutMultiColumnSets will contribute the correct size for the layout | 2536 // LayoutMultiColumnSets will contribute the correct size for the layout |
| 2537 // content of the multicol container. | 2537 // content of the multicol container. |
| 2538 if (layoutObject()->isLayoutFlowThread()) | 2538 if (layoutObject()->isLayoutFlowThread()) |
| 2539 return LayoutRect(); | 2539 return LayoutRect(); |
| 2540 | 2540 |
| 2541 const_cast<PaintLayer*>(this)->stackingNode()->updateLayerListsIfNeeded(); | |
| 2542 | |
| 2543 // If there is a clip applied by an ancestor to this PaintLayer but below or | 2541 // If there is a clip applied by an ancestor to this PaintLayer but below or |
| 2544 // equal to |ancestorLayer|, use that clip as the bounds rather than the | 2542 // equal to |ancestorLayer|, use that clip as the bounds rather than the |
| 2545 // recursive bounding boxes, since the latter may be larger than the actual | 2543 // recursive bounding boxes, since the latter may be larger than the actual |
| 2546 // size. See https://bugs.webkit.org/show_bug.cgi?id=80372 for examples. | 2544 // size. See https://bugs.webkit.org/show_bug.cgi?id=80372 for examples. |
| 2547 LayoutRect result = clipper().localClipRect(ancestorLayer); | 2545 LayoutRect result = clipper().localClipRect(ancestorLayer); |
| 2548 // TODO(chrishtr): avoid converting to IntRect and back. | 2546 // TODO(chrishtr): avoid converting to IntRect and back. |
| 2549 if (result == LayoutRect(LayoutRect::infiniteIntRect())) | 2547 if (result == LayoutRect(LayoutRect::infiniteIntRect())) { |
| 2550 result = physicalBoundingBox(LayoutPoint()); | 2548 result = physicalBoundingBox(LayoutPoint()); |
| 2551 | 2549 |
| 2552 expandRectForStackingChildren(this, result, options); | 2550 const_cast<PaintLayer*>(this)->stackingNode()->updateLayerListsIfNeeded(); |
| 2553 | 2551 |
| 2554 // Only enlarge by the filter outsets if we know the filter is going to be | 2552 expandRectForStackingChildren(this, result, options); |
| 2555 // rendered in software. Accelerated filters will handle their own outsets. | 2553 |
| 2556 if (paintsWithFilters()) | 2554 // Only enlarge by the filter outsets if we know the filter is going to be |
| 2557 result = mapLayoutRectForFilter(result); | 2555 // rendered in software. Accelerated filters will handle their own outsets. |
| 2556 if (paintsWithFilters()) |
| 2557 result = mapLayoutRectForFilter(result); |
| 2558 } |
| 2558 | 2559 |
| 2559 if (transform() && (options == IncludeTransformsAndCompositedChildLayers || | 2560 if (transform() && (options == IncludeTransformsAndCompositedChildLayers || |
| 2560 ((paintsWithTransform(GlobalPaintNormalPhase) && | 2561 ((paintsWithTransform(GlobalPaintNormalPhase) && |
| 2561 (this != ancestorLayer || | 2562 (this != ancestorLayer || |
| 2562 options == MaybeIncludeTransformForAncestorLayer))))) | 2563 options == MaybeIncludeTransformForAncestorLayer))))) |
| 2563 result = transform()->mapRect(result); | 2564 result = transform()->mapRect(result); |
| 2564 | 2565 |
| 2565 if (shouldFragmentCompositedBounds(ancestorLayer)) { | 2566 if (shouldFragmentCompositedBounds(ancestorLayer)) { |
| 2566 convertFromFlowThreadToVisualBoundingBoxInAncestor(ancestorLayer, result); | 2567 convertFromFlowThreadToVisualBoundingBoxInAncestor(ancestorLayer, result); |
| 2567 return result; | 2568 return result; |
| (...skipping 660 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3228 } | 3229 } |
| 3229 | 3230 |
| 3230 void showLayerTree(const blink::LayoutObject* layoutObject) { | 3231 void showLayerTree(const blink::LayoutObject* layoutObject) { |
| 3231 if (!layoutObject) { | 3232 if (!layoutObject) { |
| 3232 fprintf(stderr, "Cannot showLayerTree. Root is (nil)\n"); | 3233 fprintf(stderr, "Cannot showLayerTree. Root is (nil)\n"); |
| 3233 return; | 3234 return; |
| 3234 } | 3235 } |
| 3235 showLayerTree(layoutObject->enclosingLayer()); | 3236 showLayerTree(layoutObject->enclosingLayer()); |
| 3236 } | 3237 } |
| 3237 #endif | 3238 #endif |
| OLD | NEW |