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 742 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
753 return has3DTransform(); | 753 return has3DTransform(); |
754 } | 754 } |
755 | 755 |
756 void PaintLayer::updateLayerPosition() | 756 void PaintLayer::updateLayerPosition() |
757 { | 757 { |
758 LayoutPoint localPoint; | 758 LayoutPoint localPoint; |
759 LayoutPoint inlineBoundingBoxOffset; // We don't put this into the Layer x/y
for inlines, so we need to subtract it out when done. | 759 LayoutPoint inlineBoundingBoxOffset; // We don't put this into the Layer x/y
for inlines, so we need to subtract it out when done. |
760 | 760 |
761 if (layoutObject()->isInline() && layoutObject()->isLayoutInline()) { | 761 if (layoutObject()->isInline() && layoutObject()->isLayoutInline()) { |
762 LayoutInline* inlineFlow = toLayoutInline(layoutObject()); | 762 LayoutInline* inlineFlow = toLayoutInline(layoutObject()); |
763 IntRect lineBox = inlineFlow->linesBoundingBox(); | 763 IntRect lineBox = enclosingIntRect(inlineFlow->linesBoundingBox()); |
764 m_size = lineBox.size(); | 764 m_size = lineBox.size(); |
765 inlineBoundingBoxOffset = lineBox.location(); | 765 inlineBoundingBoxOffset = lineBox.location(); |
766 localPoint.moveBy(inlineBoundingBoxOffset); | 766 localPoint.moveBy(inlineBoundingBoxOffset); |
767 } else if (LayoutBox* box = layoutBox()) { | 767 } else if (LayoutBox* box = layoutBox()) { |
768 m_size = pixelSnappedIntSize(box->size(), box->location()); | 768 m_size = pixelSnappedIntSize(box->size(), box->location()); |
769 localPoint.moveBy(box->topLeftLocation()); | 769 localPoint.moveBy(box->topLeftLocation()); |
770 } | 770 } |
771 | 771 |
772 if (!layoutObject()->isOutOfFlowPositioned() && !layoutObject()->isColumnSpa
nAll() && layoutObject()->parent()) { | 772 if (!layoutObject()->isOutOfFlowPositioned() && !layoutObject()->isColumnSpa
nAll() && layoutObject()->parent()) { |
773 // We must adjust our position by walking up the layout tree looking for
the | 773 // We must adjust our position by walking up the layout tree looking for
the |
(...skipping 2136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2910 | 2910 |
2911 void showLayerTree(const blink::LayoutObject* layoutObject) | 2911 void showLayerTree(const blink::LayoutObject* layoutObject) |
2912 { | 2912 { |
2913 if (!layoutObject) { | 2913 if (!layoutObject) { |
2914 fprintf(stderr, "Cannot showLayerTree. Root is (nil)\n"); | 2914 fprintf(stderr, "Cannot showLayerTree. Root is (nil)\n"); |
2915 return; | 2915 return; |
2916 } | 2916 } |
2917 showLayerTree(layoutObject->enclosingLayer()); | 2917 showLayerTree(layoutObject->enclosingLayer()); |
2918 } | 2918 } |
2919 #endif | 2919 #endif |
OLD | NEW |