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 800 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
811 RenderInline* inlineFlow = toRenderInline(renderer()); | 811 RenderInline* inlineFlow = toRenderInline(renderer()); |
812 IntRect lineBox = inlineFlow->linesBoundingBox(); | 812 IntRect lineBox = inlineFlow->linesBoundingBox(); |
813 m_size = lineBox.size(); | 813 m_size = lineBox.size(); |
814 inlineBoundingBoxOffset = lineBox.location(); | 814 inlineBoundingBoxOffset = lineBox.location(); |
815 localPoint.moveBy(inlineBoundingBoxOffset); | 815 localPoint.moveBy(inlineBoundingBoxOffset); |
816 } else if (RenderBox* box = renderBox()) { | 816 } else if (RenderBox* box = renderBox()) { |
817 m_size = pixelSnappedIntSize(box->size(), box->location()); | 817 m_size = pixelSnappedIntSize(box->size(), box->location()); |
818 localPoint.moveBy(box->topLeftLocation()); | 818 localPoint.moveBy(box->topLeftLocation()); |
819 } | 819 } |
820 | 820 |
821 if (!renderer()->isOutOfFlowPositioned() && renderer()->parent()) { | 821 if (!renderer()->isOutOfFlowPositioned() && !renderer()->isColumnSpanAll() &
& renderer()->parent()) { |
822 // We must adjust our position by walking up the render tree looking for
the | 822 // We must adjust our position by walking up the render tree looking for
the |
823 // nearest enclosing object with a layer. | 823 // nearest enclosing object with a layer. |
824 RenderObject* curr = renderer()->parent(); | 824 RenderObject* curr = renderer()->parent(); |
825 while (curr && !curr->hasLayer()) { | 825 while (curr && !curr->hasLayer()) { |
826 if (curr->isBox() && !curr->isTableRow()) { | 826 if (curr->isBox() && !curr->isTableRow()) { |
827 // Rows and cells share the same coordinate space (that of the s
ection). | 827 // Rows and cells share the same coordinate space (that of the s
ection). |
828 // Omit them when computing our xpos/ypos. | 828 // Omit them when computing our xpos/ypos. |
829 localPoint.moveBy(toRenderBox(curr)->topLeftLocation()); | 829 localPoint.moveBy(toRenderBox(curr)->topLeftLocation()); |
830 } | 830 } |
831 curr = curr->parent(); | 831 curr = curr->parent(); |
(...skipping 588 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1420 | 1420 |
1421 LayoutPoint thisCoords; | 1421 LayoutPoint thisCoords; |
1422 layer->convertToLayerCoords(positionedAncestor, thisCoords); | 1422 layer->convertToLayerCoords(positionedAncestor, thisCoords); |
1423 | 1423 |
1424 LayoutPoint ancestorCoords; | 1424 LayoutPoint ancestorCoords; |
1425 ancestorLayer->convertToLayerCoords(positionedAncestor, ancestorCoor
ds); | 1425 ancestorLayer->convertToLayerCoords(positionedAncestor, ancestorCoor
ds); |
1426 | 1426 |
1427 location += (thisCoords - ancestorCoords); | 1427 location += (thisCoords - ancestorCoords); |
1428 return ancestorLayer; | 1428 return ancestorLayer; |
1429 } | 1429 } |
1430 } else | 1430 } else if (renderer->isColumnSpanAll()) { |
| 1431 RenderBlock* multicolContainer = renderer->containingBlock(); |
| 1432 ASSERT(toRenderBlockFlow(multicolContainer)->multiColumnFlowThread()); |
| 1433 parentLayer = multicolContainer->layer(); |
| 1434 ASSERT(parentLayer); |
| 1435 } else { |
1431 parentLayer = layer->parent(); | 1436 parentLayer = layer->parent(); |
| 1437 } |
1432 | 1438 |
1433 if (!parentLayer) | 1439 if (!parentLayer) |
1434 return 0; | 1440 return 0; |
1435 | 1441 |
1436 location += layer->location(); | 1442 location += layer->location(); |
1437 return parentLayer; | 1443 return parentLayer; |
1438 } | 1444 } |
1439 | 1445 |
1440 void RenderLayer::convertToLayerCoords(const RenderLayer* ancestorLayer, LayoutP
oint& location) const | 1446 void RenderLayer::convertToLayerCoords(const RenderLayer* ancestorLayer, LayoutP
oint& location) const |
1441 { | 1447 { |
(...skipping 1433 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2875 } | 2881 } |
2876 } | 2882 } |
2877 | 2883 |
2878 void showLayerTree(const blink::RenderObject* renderer) | 2884 void showLayerTree(const blink::RenderObject* renderer) |
2879 { | 2885 { |
2880 if (!renderer) | 2886 if (!renderer) |
2881 return; | 2887 return; |
2882 showLayerTree(renderer->enclosingLayer()); | 2888 showLayerTree(renderer->enclosingLayer()); |
2883 } | 2889 } |
2884 #endif | 2890 #endif |
OLD | NEW |