Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(67)

Side by Side Diff: third_party/WebKit/Source/core/layout/svg/line/SVGRootInlineBox.cpp

Issue 2391693004: Reformat comments in core/layout/svg/line (Closed)
Patch Set: Rebase w/HEAD Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « third_party/WebKit/Source/core/layout/svg/line/SVGInlineTextBox.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 reorderValueLists(); 60 reorderValueLists();
61 61
62 // Perform SVG text layout phase two (see SVGTextLayoutEngine for details). 62 // Perform SVG text layout phase two (see SVGTextLayoutEngine for details).
63 SVGTextLayoutEngine characterLayout(descendantTextNodes); 63 SVGTextLayoutEngine characterLayout(descendantTextNodes);
64 characterLayout.layoutCharactersInTextBoxes(this); 64 characterLayout.layoutCharactersInTextBoxes(this);
65 65
66 // Perform SVG text layout phase three (see SVGTextChunkBuilder for details). 66 // Perform SVG text layout phase three (see SVGTextChunkBuilder for details).
67 characterLayout.finishLayout(); 67 characterLayout.finishLayout();
68 68
69 // Perform SVG text layout phase four 69 // Perform SVG text layout phase four
70 // Position & resize all SVGInlineText/FlowBoxes in the inline box tree, resiz e the root box as well as the LayoutSVGText parent block. 70 // Position & resize all SVGInlineText/FlowBoxes in the inline box tree,
71 // resize the root box as well as the LayoutSVGText parent block.
71 LayoutRect childRect; 72 LayoutRect childRect;
72 layoutChildBoxes(this, &childRect); 73 layoutChildBoxes(this, &childRect);
73 layoutRootBox(childRect); 74 layoutRootBox(childRect);
74 } 75 }
75 76
76 void SVGRootInlineBox::layoutChildBoxes(InlineFlowBox* start, 77 void SVGRootInlineBox::layoutChildBoxes(InlineFlowBox* start,
77 LayoutRect* childRect) { 78 LayoutRect* childRect) {
78 for (InlineBox* child = start->firstChild(); child; 79 for (InlineBox* child = start->firstChild(); child;
79 child = child->nextOnLine()) { 80 child = child->nextOnLine()) {
80 LayoutRect boxRect; 81 LayoutRect boxRect;
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
185 // that the metrics map within the layoutObjects belonging to the 186 // that the metrics map within the layoutObjects belonging to the
186 // InlineBoxes are reordered as well. 187 // InlineBoxes are reordered as well.
187 while (true) { 188 while (true) {
188 if (first == last || first == --last) 189 if (first == last || first == --last)
189 return; 190 return;
190 191
191 if ((*last)->isSVGInlineTextBox() && (*first)->isSVGInlineTextBox()) { 192 if ((*last)->isSVGInlineTextBox() && (*first)->isSVGInlineTextBox()) {
192 SVGInlineTextBox* firstTextBox = toSVGInlineTextBox(*first); 193 SVGInlineTextBox* firstTextBox = toSVGInlineTextBox(*first);
193 SVGInlineTextBox* lastTextBox = toSVGInlineTextBox(*last); 194 SVGInlineTextBox* lastTextBox = toSVGInlineTextBox(*last);
194 195
195 // Reordering is only necessary for BiDi text that is _absolutely_ positio ned. 196 // Reordering is only necessary for BiDi text that is _absolutely_
197 // positioned.
196 if (firstTextBox->len() == 1 && firstTextBox->len() == lastTextBox->len()) 198 if (firstTextBox->len() == 1 && firstTextBox->len() == lastTextBox->len())
197 swapPositioningValuesInTextBoxes(firstTextBox, lastTextBox); 199 swapPositioningValuesInTextBoxes(firstTextBox, lastTextBox);
198 } 200 }
199 201
200 InlineBox* temp = *first; 202 InlineBox* temp = *first;
201 *first = *last; 203 *first = *last;
202 *last = temp; 204 *last = temp;
203 ++first; 205 ++first;
204 } 206 }
205 } 207 }
(...skipping 14 matching lines...) Expand all
220 continue; 222 continue;
221 if (leaf->nodeAtPoint(result, locationInContainer, accumulatedOffset, 223 if (leaf->nodeAtPoint(result, locationInContainer, accumulatedOffset,
222 lineTop, lineBottom)) 224 lineTop, lineBottom))
223 return true; 225 return true;
224 } 226 }
225 227
226 return false; 228 return false;
227 } 229 }
228 230
229 } // namespace blink 231 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/svg/line/SVGInlineTextBox.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698