OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2006 Oliver Hunt <ojh16@student.canterbury.ac.nz> | 2 * Copyright (C) 2006 Oliver Hunt <ojh16@student.canterbury.ac.nz> |
3 * Copyright (C) 2006 Apple Computer Inc. | 3 * Copyright (C) 2006 Apple Computer Inc. |
4 * Copyright (C) 2007 Nikolas Zimmermann <zimmermann@kde.org> | 4 * Copyright (C) 2007 Nikolas Zimmermann <zimmermann@kde.org> |
5 * Copyright (C) Research In Motion Limited 2010. All rights reserved. | 5 * Copyright (C) Research In Motion Limited 2010. All rights reserved. |
6 * Copyright (C) 2011 Torch Mobile (Beijing) CO. Ltd. All rights reserved. | 6 * Copyright (C) 2011 Torch Mobile (Beijing) CO. Ltd. All rights reserved. |
7 * | 7 * |
8 * This library is free software; you can redistribute it and/or | 8 * This library is free software; you can redistribute it and/or |
9 * modify it under the terms of the GNU Library General Public | 9 * modify it under the terms of the GNU Library General Public |
10 * License as published by the Free Software Foundation; either | 10 * License as published by the Free Software Foundation; either |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
100 if (childRect) | 100 if (childRect) |
101 childRect->unite(boxRect); | 101 childRect->unite(boxRect); |
102 } | 102 } |
103 } | 103 } |
104 | 104 |
105 void SVGRootInlineBox::layoutRootBox(const LayoutRect& childRect) | 105 void SVGRootInlineBox::layoutRootBox(const LayoutRect& childRect) |
106 { | 106 { |
107 LayoutBlockFlow& parentBlock = block(); | 107 LayoutBlockFlow& parentBlock = block(); |
108 | 108 |
109 // Finally, assign the root block position, now that all content is laid out
. | 109 // Finally, assign the root block position, now that all content is laid out
. |
110 // FIXME: the call to enclosingLayoutRect() below is temporary and should be
removed once | 110 LayoutRect boundingRect = childRect; |
111 // the transition to LayoutUnit-based types is complete (crbug.com/321237) | |
112 LayoutRect boundingRect = enclosingLayoutRect(childRect); | |
113 parentBlock.setLocation(boundingRect.location()); | 111 parentBlock.setLocation(boundingRect.location()); |
114 parentBlock.setSize(boundingRect.size()); | 112 parentBlock.setSize(boundingRect.size()); |
115 | 113 |
116 // Position all children relative to the parent block. | 114 // Position all children relative to the parent block. |
117 for (InlineBox* child = firstChild(); child; child = child->nextOnLine()) { | 115 for (InlineBox* child = firstChild(); child; child = child->nextOnLine()) { |
118 // Skip generated content. | 116 // Skip generated content. |
119 if (!child->layoutObject().node()) | 117 if (!child->layoutObject().node()) |
120 continue; | 118 continue; |
121 child->adjustPosition(-childRect.x(), -childRect.y()); | 119 child->adjustPosition(-childRect.x(), -childRect.y()); |
122 } | 120 } |
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
227 } | 225 } |
228 } | 226 } |
229 | 227 |
230 void SVGRootInlineBox::reorderValueLists(Vector<SVGTextLayoutAttributes*>& attri
butes) | 228 void SVGRootInlineBox::reorderValueLists(Vector<SVGTextLayoutAttributes*>& attri
butes) |
231 { | 229 { |
232 Vector<InlineBox*> leafBoxesInLogicalOrder; | 230 Vector<InlineBox*> leafBoxesInLogicalOrder; |
233 collectLeafBoxesInLogicalOrder(leafBoxesInLogicalOrder, reverseInlineBoxRang
eAndValueListsIfNeeded, &attributes); | 231 collectLeafBoxesInLogicalOrder(leafBoxesInLogicalOrder, reverseInlineBoxRang
eAndValueListsIfNeeded, &attributes); |
234 } | 232 } |
235 | 233 |
236 } // namespace blink | 234 } // namespace blink |
OLD | NEW |