Index: third_party/WebKit/Source/core/layout/svg/line/SVGInlineTextBox.cpp |
diff --git a/third_party/WebKit/Source/core/layout/svg/line/SVGInlineTextBox.cpp b/third_party/WebKit/Source/core/layout/svg/line/SVGInlineTextBox.cpp |
index 3a8fd042b940d86f6e1127148d54e0e258a0f0d6..c580232666fef220b39dbdb56da24acf93137290 100644 |
--- a/third_party/WebKit/Source/core/layout/svg/line/SVGInlineTextBox.cpp |
+++ b/third_party/WebKit/Source/core/layout/svg/line/SVGInlineTextBox.cpp |
@@ -1,4 +1,4 @@ |
-/** |
+/* |
* Copyright (C) 2007 Rob Buis <buis@kde.org> |
* Copyright (C) 2007 Nikolas Zimmermann <zimmermann@kde.org> |
* Copyright (C) Research In Motion Limited 2010. All rights reserved. |
@@ -47,19 +47,20 @@ SVGInlineTextBox::SVGInlineTextBox(LineLayoutItem item, |
void SVGInlineTextBox::dirtyLineBoxes() { |
InlineTextBox::dirtyLineBoxes(); |
- // Clear the now stale text fragments |
+ // Clear the now stale text fragments. |
clearTextFragments(); |
- // And clear any following text fragments as the text on which they |
- // depend may now no longer exist, or glyph positions may be wrong |
+ // And clear any following text fragments as the text on which they depend may |
+ // now no longer exist, or glyph positions may be wrong. |
InlineTextBox* nextBox = nextTextBox(); |
if (nextBox) |
nextBox->dirtyLineBoxes(); |
} |
int SVGInlineTextBox::offsetForPosition(LayoutUnit, bool) const { |
- // SVG doesn't use the standard offset <-> position selection system, as it's not suitable for SVGs complex needs. |
- // vertical text selection, inline boxes spanning multiple lines (contrary to HTML, etc.) |
+ // SVG doesn't use the standard offset <-> position selection system, as it's |
+ // not suitable for SVGs complex needs. Vertical text selection, inline boxes |
+ // spanning multiple lines (contrary to HTML, etc.) |
ASSERT_NOT_REACHED(); |
return 0; |
} |
@@ -175,21 +176,19 @@ TextRun SVGInlineTextBox::constructTextRun( |
const SVGTextFragment& fragment) const { |
LineLayoutText text = getLineLayoutItem(); |
- // FIXME(crbug.com/264211): This should not be necessary but can occur if we |
- // layout during layout. Remove this when 264211 is fixed. |
+ // FIXME: This should not be necessary but can occur if we layout during |
pdr.
2016/10/04 22:05:41
I will be fixing this in https://codereview.chromi
|
+ // layout. Remove this when crbug.com/264211 is fixed. |
RELEASE_ASSERT(!text.needsLayout()); |
TextRun run( |
- static_cast<const LChar*>( |
- nullptr) // characters, will be set below if non-zero. |
- , |
- 0 // length, will be set below if non-zero. |
- , |
- 0 // xPos, only relevant with allowTabs=true |
- , |
- 0 // padding, only relevant for justified text, not relevant for SVG |
- , |
- TextRun::AllowTrailingExpansion, direction(), |
+ // Characters, will be set below if non-zero. |
+ static_cast<const LChar*>(nullptr), |
+ // Length, will be set below if non-zero. |
+ 0, |
+ // xPos, only relevant with allowTabs=true. |
+ 0, |
+ // Padding, only relevant for justified text, not relevant for SVG. |
+ 0, TextRun::AllowTrailingExpansion, direction(), |
dirOverride() || |
style.rtlOrdering() == VisualOrder /* directionalOverride */); |
@@ -205,7 +204,8 @@ TextRun SVGInlineTextBox::constructTextRun( |
// We handle letter & word spacing ourselves. |
run.disableSpacing(); |
- // Propagate the maximum length of the characters buffer to the TextRun, even when we're only processing a substring. |
+ // Propagate the maximum length of the characters buffer to the TextRun, even |
+ // when we're only processing a substring. |
run.setCharactersLength(text.textLength() - fragment.characterOffset); |
ASSERT(run.charactersLength() >= run.length()); |
return run; |
@@ -235,7 +235,8 @@ void SVGInlineTextBox::paintDocumentMarker(GraphicsContext&, |
const ComputedStyle&, |
const Font&, |
bool) const { |
- // SVG does not have support for generic document markers (e.g., spellchecking, etc). |
+ // SVG does not have support for generic document markers (e.g., |
+ // spellchecking, etc). |
} |
void SVGInlineTextBox::paintTextMatchMarkerForeground( |