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 789 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
800 | 800 |
801 if (renderer()->isInline() && renderer()->isRenderInline()) { | 801 if (renderer()->isInline() && renderer()->isRenderInline()) { |
802 RenderInline* inlineFlow = toRenderInline(renderer()); | 802 RenderInline* inlineFlow = toRenderInline(renderer()); |
803 IntRect lineBox = inlineFlow->linesBoundingBox(); | 803 IntRect lineBox = inlineFlow->linesBoundingBox(); |
804 inlineBoundingBoxOffset = lineBox.location(); | 804 inlineBoundingBoxOffset = lineBox.location(); |
805 localPoint.moveBy(inlineBoundingBoxOffset); | 805 localPoint.moveBy(inlineBoundingBoxOffset); |
806 } else if (RenderBox* box = renderBox()) { | 806 } else if (RenderBox* box = renderBox()) { |
807 localPoint.moveBy(box->topLeftLocation()); | 807 localPoint.moveBy(box->topLeftLocation()); |
808 } | 808 } |
809 | 809 |
810 if (!renderer()->isOutOfFlowPositioned() && renderer()->parent()) { | 810 if (!renderer()->isOutOfFlowPositioned() && !renderer()->isColumnSpanAll() &
& renderer()->parent()) { |
811 // We must adjust our position by walking up the render tree looking for
the | 811 // We must adjust our position by walking up the render tree looking for
the |
812 // nearest enclosing object with a layer. | 812 // nearest enclosing object with a layer. |
813 RenderObject* curr = renderer()->parent(); | 813 RenderObject* curr = renderer()->parent(); |
814 while (curr && !curr->hasLayer()) { | 814 while (curr && !curr->hasLayer()) { |
815 if (curr->isBox() && !curr->isTableRow()) { | 815 if (curr->isBox() && !curr->isTableRow()) { |
816 // Rows and cells share the same coordinate space (that of the s
ection). | 816 // Rows and cells share the same coordinate space (that of the s
ection). |
817 // Omit them when computing our xpos/ypos. | 817 // Omit them when computing our xpos/ypos. |
818 localPoint.moveBy(toRenderBox(curr)->topLeftLocation()); | 818 localPoint.moveBy(toRenderBox(curr)->topLeftLocation()); |
819 } | 819 } |
820 curr = curr->parent(); | 820 curr = curr->parent(); |
(...skipping 569 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1390 | 1390 |
1391 LayoutPoint thisCoords; | 1391 LayoutPoint thisCoords; |
1392 layer->convertToLayerCoords(positionedAncestor, thisCoords); | 1392 layer->convertToLayerCoords(positionedAncestor, thisCoords); |
1393 | 1393 |
1394 LayoutPoint ancestorCoords; | 1394 LayoutPoint ancestorCoords; |
1395 ancestorLayer->convertToLayerCoords(positionedAncestor, ancestorCoor
ds); | 1395 ancestorLayer->convertToLayerCoords(positionedAncestor, ancestorCoor
ds); |
1396 | 1396 |
1397 location += (thisCoords - ancestorCoords); | 1397 location += (thisCoords - ancestorCoords); |
1398 return ancestorLayer; | 1398 return ancestorLayer; |
1399 } | 1399 } |
1400 } else | 1400 } else if (renderer->isColumnSpanAll()) { |
| 1401 RenderBlock* multicolContainer = renderer->containingBlock(); |
| 1402 ASSERT(toRenderBlockFlow(multicolContainer)->multiColumnFlowThread()); |
| 1403 parentLayer = multicolContainer->layer(); |
| 1404 ASSERT(parentLayer); |
| 1405 } else { |
1401 parentLayer = layer->parent(); | 1406 parentLayer = layer->parent(); |
| 1407 } |
1402 | 1408 |
1403 if (!parentLayer) | 1409 if (!parentLayer) |
1404 return 0; | 1410 return 0; |
1405 | 1411 |
1406 location += layer->location(); | 1412 location += layer->location(); |
1407 return parentLayer; | 1413 return parentLayer; |
1408 } | 1414 } |
1409 | 1415 |
1410 void RenderLayer::convertToLayerCoords(const RenderLayer* ancestorLayer, LayoutP
oint& location) const | 1416 void RenderLayer::convertToLayerCoords(const RenderLayer* ancestorLayer, LayoutP
oint& location) const |
1411 { | 1417 { |
(...skipping 1434 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2846 } | 2852 } |
2847 } | 2853 } |
2848 | 2854 |
2849 void showLayerTree(const blink::RenderObject* renderer) | 2855 void showLayerTree(const blink::RenderObject* renderer) |
2850 { | 2856 { |
2851 if (!renderer) | 2857 if (!renderer) |
2852 return; | 2858 return; |
2853 showLayerTree(renderer->enclosingLayer()); | 2859 showLayerTree(renderer->enclosingLayer()); |
2854 } | 2860 } |
2855 #endif | 2861 #endif |
OLD | NEW |