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

Side by Side Diff: third_party/WebKit/Source/core/layout/api/LineLayoutSVGInlineText.h

Issue 1988063002: Use SVGInlineTextMetricsIterator in updateLayoutAttributes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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 | « no previous file | third_party/WebKit/Source/core/layout/svg/SVGTextLayoutAttributesBuilder.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef LineLayoutSVGInlineText_h 5 #ifndef LineLayoutSVGInlineText_h
6 #define LineLayoutSVGInlineText_h 6 #define LineLayoutSVGInlineText_h
7 7
8 #include "core/layout/api/LineLayoutText.h" 8 #include "core/layout/api/LineLayoutText.h"
9 #include "core/layout/svg/LayoutSVGInlineText.h" 9 #include "core/layout/svg/LayoutSVGInlineText.h"
10 10
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 const LayoutSVGInlineText* toSVGInlineText() const 61 const LayoutSVGInlineText* toSVGInlineText() const
62 { 62 {
63 return toLayoutSVGInlineText(layoutObject()); 63 return toLayoutSVGInlineText(layoutObject());
64 } 64 }
65 }; 65 };
66 66
67 class SVGInlineTextMetricsIterator { 67 class SVGInlineTextMetricsIterator {
68 DISALLOW_NEW(); 68 DISALLOW_NEW();
69 public: 69 public:
70 SVGInlineTextMetricsIterator() { reset(LineLayoutSVGInlineText()); } 70 SVGInlineTextMetricsIterator() { reset(LineLayoutSVGInlineText()); }
71 explicit SVGInlineTextMetricsIterator(LineLayoutSVGInlineText textLineLayout ) { reset(textLineLayout); }
71 72
72 void advanceToTextStart(LineLayoutSVGInlineText textLineLayout, unsigned sta rtCharacterOffset) 73 void advanceToTextStart(LineLayoutSVGInlineText textLineLayout, unsigned sta rtCharacterOffset)
73 { 74 {
74 ASSERT(textLineLayout); 75 ASSERT(textLineLayout);
75 if (!m_textLineLayout || m_textLineLayout != textLineLayout) { 76 if (!m_textLineLayout || m_textLineLayout != textLineLayout) {
76 reset(textLineLayout); 77 reset(textLineLayout);
77 ASSERT(!metricsList().isEmpty()); 78 ASSERT(!metricsList().isEmpty());
78 } 79 }
79 80
80 if (m_characterOffset == startCharacterOffset) 81 if (m_characterOffset == startCharacterOffset)
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 } 117 }
117 118
118 LineLayoutSVGInlineText m_textLineLayout; 119 LineLayoutSVGInlineText m_textLineLayout;
119 unsigned m_metricsListOffset; 120 unsigned m_metricsListOffset;
120 unsigned m_characterOffset; 121 unsigned m_characterOffset;
121 }; 122 };
122 123
123 } // namespace blink 124 } // namespace blink
124 125
125 #endif // LineLayoutSVGInlineText_h 126 #endif // LineLayoutSVGInlineText_h
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/layout/svg/SVGTextLayoutAttributesBuilder.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698