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

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

Issue 1656743002: Removing more implicit LayoutUnit construction (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix additional test Created 4 years, 10 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
OLDNEW
1 /** 1 /**
2 * Copyright (C) 2007 Rob Buis <buis@kde.org> 2 * Copyright (C) 2007 Rob Buis <buis@kde.org>
3 * Copyright (C) 2007 Nikolas Zimmermann <zimmermann@kde.org> 3 * Copyright (C) 2007 Nikolas Zimmermann <zimmermann@kde.org>
4 * Copyright (C) Research In Motion Limited 2010. All rights reserved. 4 * Copyright (C) Research In Motion Limited 2010. All rights reserved.
5 * 5 *
6 * This library is free software; you can redistribute it and/or 6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public 7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either 8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version. 9 * version 2 of the License, or (at your option) any later version.
10 * 10 *
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 textRun.setHorizontalGlyphStretch(narrowPrecisionToFloat(fragmentTransfo rm.xScale())); 93 textRun.setHorizontalGlyphStretch(narrowPrecisionToFloat(fragmentTransfo rm.xScale()));
94 } 94 }
95 95
96 return fragment.characterOffset - start() + lineLayoutItem.scaledFont().offs etForPosition(textRun, position * scalingFactor, includePartialGlyphs); 96 return fragment.characterOffset - start() + lineLayoutItem.scaledFont().offs etForPosition(textRun, position * scalingFactor, includePartialGlyphs);
97 } 97 }
98 98
99 LayoutUnit SVGInlineTextBox::positionForOffset(int) const 99 LayoutUnit SVGInlineTextBox::positionForOffset(int) const
100 { 100 {
101 // SVG doesn't use the offset <-> position selection system. 101 // SVG doesn't use the offset <-> position selection system.
102 ASSERT_NOT_REACHED(); 102 ASSERT_NOT_REACHED();
103 return 0; 103 return LayoutUnit();
104 } 104 }
105 105
106 FloatRect SVGInlineTextBox::selectionRectForTextFragment(const SVGTextFragment& fragment, int startPosition, int endPosition, const ComputedStyle& style) const 106 FloatRect SVGInlineTextBox::selectionRectForTextFragment(const SVGTextFragment& fragment, int startPosition, int endPosition, const ComputedStyle& style) const
107 { 107 {
108 ASSERT(startPosition < endPosition); 108 ASSERT(startPosition < endPosition);
109 109
110 LineLayoutSVGInlineText lineLayoutItem = LineLayoutSVGInlineText(this->lineL ayoutItem()); 110 LineLayoutSVGInlineText lineLayoutItem = LineLayoutSVGInlineText(this->lineL ayoutItem());
111 111
112 float scalingFactor = lineLayoutItem.scalingFactor(); 112 float scalingFactor = lineLayoutItem.scalingFactor();
113 ASSERT(scalingFactor); 113 ASSERT(scalingFactor);
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
270 return true; 270 return true;
271 } 271 }
272 } 272 }
273 } 273 }
274 } 274 }
275 } 275 }
276 return false; 276 return false;
277 } 277 }
278 278
279 } // namespace blink 279 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698