Index: third_party/WebKit/Source/core/editing/Editor.cpp |
diff --git a/third_party/WebKit/Source/core/editing/Editor.cpp b/third_party/WebKit/Source/core/editing/Editor.cpp |
index 6a66aa9d0db49ff014f509bfa78e2cf6c5cc1c1c..fb4d38efb0921a32a6cbb6442e0da96eb1549ef5 100644 |
--- a/third_party/WebKit/Source/core/editing/Editor.cpp |
+++ b/third_party/WebKit/Source/core/editing/Editor.cpp |
@@ -1163,14 +1163,17 @@ void Editor::changeSelectionAfterCommand(const VisibleSelection& newSelection, |
IntRect Editor::firstRectForRange(const EphemeralRange& range) const |
{ |
+ DCHECK(!frame().document()->needsLayoutTreeUpdate()); |
+ DocumentLifecycle::DisallowTransitionScope disallowTransition(frame().document()->lifecycle()); |
+ |
LayoutUnit extraWidthToEndOfLine; |
DCHECK(range.isNotNull()); |
- IntRect startCaretRect = RenderedPosition(createVisiblePositionDeprecated(range.startPosition()).deepEquivalent(), TextAffinity::Downstream).absoluteRect(&extraWidthToEndOfLine); |
+ IntRect startCaretRect = RenderedPosition(createVisiblePosition(range.startPosition()).deepEquivalent(), TextAffinity::Downstream).absoluteRect(&extraWidthToEndOfLine); |
if (startCaretRect.isEmpty()) |
return IntRect(); |
- IntRect endCaretRect = RenderedPosition(createVisiblePositionDeprecated(range.endPosition()).deepEquivalent(), TextAffinity::Upstream).absoluteRect(); |
+ IntRect endCaretRect = RenderedPosition(createVisiblePosition(range.endPosition()).deepEquivalent(), TextAffinity::Upstream).absoluteRect(); |
if (endCaretRect.isEmpty()) |
return IntRect(); |
@@ -1189,12 +1192,6 @@ IntRect Editor::firstRectForRange(const EphemeralRange& range) const |
startCaretRect.height()); |
} |
-IntRect Editor::firstRectForRange(const Range* range) const |
-{ |
- DCHECK(range); |
- return firstRectForRange(EphemeralRange(range)); |
-} |
- |
void Editor::computeAndSetTypingStyle(StylePropertySet* style, InputEvent::InputType inputType) |
{ |
if (!style || style->isEmpty()) { |