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

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
« no previous file with comments | « Source/core/editing/Caret.cpp ('k') | Source/core/editing/markers/DocumentMarkerControllerTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/editing/Editor.cpp
diff --git a/Source/core/editing/Editor.cpp b/Source/core/editing/Editor.cpp
index a042c8226e69d676663fb34245f313ea36c33576..97587162aaced7ef78b733da6f35638cd6f89ab3 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()) {
« no previous file with comments | « Source/core/editing/Caret.cpp ('k') | Source/core/editing/markers/DocumentMarkerControllerTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698