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

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

Issue 952273006: Make the constructor of a LayoutRect from an IntRect explicit. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/layout/svg/SVGLayoutSupport.cpp ('k') | Source/core/paint/FramePainter.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 /** 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 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
155 155
156 FloatRectWillBeLayoutRect fragmentRect = selectionRectForTextFragment(fr agment, fragmentStartPosition, fragmentEndPosition, style); 156 FloatRectWillBeLayoutRect fragmentRect = selectionRectForTextFragment(fr agment, fragmentStartPosition, fragmentEndPosition, style);
157 fragment.buildFragmentTransform(fragmentTransform); 157 fragment.buildFragmentTransform(fragmentTransform);
158 fragmentRect = fragmentTransform.mapRect(fragmentRect.toFloatRect()); 158 fragmentRect = fragmentTransform.mapRect(fragmentRect.toFloatRect());
159 159
160 selectionRect.unite(fragmentRect); 160 selectionRect.unite(fragmentRect);
161 } 161 }
162 162
163 // FIXME: the call to rawValue() below is temporary and should be removed on ce the transition 163 // FIXME: the call to rawValue() below is temporary and should be removed on ce the transition
164 // to LayoutUnit-based types is complete (crbug.com/321237) 164 // to LayoutUnit-based types is complete (crbug.com/321237)
165 return enclosingIntRect(selectionRect.rawValue()); 165 return LayoutRect(enclosingIntRect(selectionRect.rawValue()));
166 } 166 }
167 167
168 void SVGInlineTextBox::paint(const PaintInfo& paintInfo, const LayoutPoint& pain tOffset, LayoutUnit, LayoutUnit) 168 void SVGInlineTextBox::paint(const PaintInfo& paintInfo, const LayoutPoint& pain tOffset, LayoutUnit, LayoutUnit)
169 { 169 {
170 SVGInlineTextBoxPainter(*this).paint(paintInfo, paintOffset); 170 SVGInlineTextBoxPainter(*this).paint(paintInfo, paintOffset);
171 } 171 }
172 172
173 TextRun SVGInlineTextBox::constructTextRun(const LayoutStyle& style, const SVGTe xtFragment& fragment) const 173 TextRun SVGInlineTextBox::constructTextRun(const LayoutStyle& style, const SVGTe xtFragment& fragment) const
174 { 174 {
175 RenderText* text = &renderer(); 175 RenderText* text = &renderer();
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
284 renderer().updateHitTestResult(result, locationInContainer.point () - toLayoutSize(accumulatedOffset)); 284 renderer().updateHitTestResult(result, locationInContainer.point () - toLayoutSize(accumulatedOffset));
285 if (!result.addNodeToListBasedTestResult(renderer().node(), requ est, locationInContainer, rect.rawValue())) 285 if (!result.addNodeToListBasedTestResult(renderer().node(), requ est, locationInContainer, rect.rawValue()))
286 return true; 286 return true;
287 } 287 }
288 } 288 }
289 } 289 }
290 return false; 290 return false;
291 } 291 }
292 292
293 } // namespace blink 293 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/layout/svg/SVGLayoutSupport.cpp ('k') | Source/core/paint/FramePainter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698