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

Side by Side Diff: Source/core/layout/line/AbstractInlineTextBox.cpp

Issue 1303413004: Convert some call sites to use explicit LayoutRect->FloatRect conversion. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 3 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 return nullptr; 92 return nullptr;
93 93
94 return getOrCreate(m_layoutText, m_inlineTextBox->nextTextBox()); 94 return getOrCreate(m_layoutText, m_inlineTextBox->nextTextBox());
95 } 95 }
96 96
97 LayoutRect AbstractInlineTextBox::bounds() const 97 LayoutRect AbstractInlineTextBox::bounds() const
98 { 98 {
99 if (!m_inlineTextBox || !m_layoutText) 99 if (!m_inlineTextBox || !m_layoutText)
100 return LayoutRect(); 100 return LayoutRect();
101 101
102 FloatRect boundaries = m_inlineTextBox->calculateBoundaries(); 102 FloatRect boundaries(m_inlineTextBox->calculateBoundaries());
103 return LayoutRect(m_layoutText->localToAbsoluteQuad(boundaries).enclosingBou ndingBox()); 103 return LayoutRect(m_layoutText->localToAbsoluteQuad(boundaries).enclosingBou ndingBox());
104 } 104 }
105 105
106 unsigned AbstractInlineTextBox::len() const 106 unsigned AbstractInlineTextBox::len() const
107 { 107 {
108 if (!m_inlineTextBox) 108 if (!m_inlineTextBox)
109 return 0; 109 return 0;
110 110
111 return m_inlineTextBox->len(); 111 return m_inlineTextBox->len();
112 } 112 }
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
202 return nullptr; 202 return nullptr;
203 203
204 InlineBox* previous = m_inlineTextBox->prevOnLine(); 204 InlineBox* previous = m_inlineTextBox->prevOnLine();
205 if (previous && previous->isInlineTextBox()) 205 if (previous && previous->isInlineTextBox())
206 return getOrCreate(&toInlineTextBox(previous)->layoutObject(), toInlineT extBox(previous)); 206 return getOrCreate(&toInlineTextBox(previous)->layoutObject(), toInlineT extBox(previous));
207 207
208 return nullptr; 208 return nullptr;
209 } 209 }
210 210
211 } // namespace blink 211 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/layout/compositing/CompositingInputsUpdater.cpp ('k') | Source/core/layout/line/RootInlineBox.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698