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

Unified Diff: Source/core/editing/Editor.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, 4 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 side-by-side diff with in-line comments
Download patch
Index: Source/core/editing/Editor.cpp
diff --git a/Source/core/editing/Editor.cpp b/Source/core/editing/Editor.cpp
index 2414b6525e8db3143cbade4554f5c20f031421a3..41c48c5c1f82c348a6982729c357d9ebf2e45db7 100644
--- a/Source/core/editing/Editor.cpp
+++ b/Source/core/editing/Editor.cpp
@@ -1086,11 +1086,11 @@ IntRect Editor::firstRectForRange(const EphemeralRange& range) const
ASSERT(range.isNotNull());
IntRect startCaretRect = RenderedPosition(VisiblePosition(range.startPosition()).deepEquivalent(), TextAffinity::Downstream).absoluteRect(&extraWidthToEndOfLine);
- if (startCaretRect == LayoutRect())
+ if (startCaretRect.isEmpty())
return IntRect();
IntRect endCaretRect = RenderedPosition(VisiblePosition(range.endPosition()).deepEquivalent(), TextAffinity::Upstream).absoluteRect();
- if (endCaretRect == LayoutRect())
+ if (endCaretRect.isEmpty())
return IntRect();
if (startCaretRect.y() == endCaretRect.y()) {

Powered by Google App Engine
This is Rietveld 408576698