Index: third_party/WebKit/Source/core/editing/FrameSelection.cpp |
diff --git a/third_party/WebKit/Source/core/editing/FrameSelection.cpp b/third_party/WebKit/Source/core/editing/FrameSelection.cpp |
index ba35c21327c2446370d882ac6b0c8ecd5866fe96..6467d40158b462f9ef3272f1b678b2bd85edc4b7 100644 |
--- a/third_party/WebKit/Source/core/editing/FrameSelection.cpp |
+++ b/third_party/WebKit/Source/core/editing/FrameSelection.cpp |
@@ -435,9 +435,7 @@ void FrameSelection::DocumentAttached(Document* document) { |
void FrameSelection::ContextDestroyed(Document* document) { |
granularity_ = kCharacterGranularity; |
- LayoutViewItem view = frame_->ContentLayoutItem(); |
- if (!view.IsNull()) |
- view.ClearSelection(); |
+ layout_selection_->OnDocumentShutdown(); |
frame_->GetEditor().ClearTypingStyle(); |
} |
@@ -709,7 +707,7 @@ void FrameSelection::FocusedOrActiveStateChanged() { |
// we have to update places those colors were painted. |
LayoutViewItem view = GetDocument().GetLayoutViewItem(); |
if (!view.IsNull()) |
- view.InvalidatePaintForSelection(); |
+ layout_selection_->InvalidatePaintForSelection(); |
// Caret appears in the active frame. |
if (active_and_focused) |
@@ -886,7 +884,7 @@ LayoutRect FrameSelection::UnclippedBounds() const { |
return LayoutRect(); |
view->UpdateLifecycleToLayoutClean(); |
- return LayoutRect(layout_view.SelectionBounds()); |
+ return LayoutRect(layout_selection_->SelectionBounds()); |
} |
static inline HTMLFormElement* AssociatedFormElement(HTMLElement& element) { |
@@ -1147,6 +1145,14 @@ void FrameSelection::ClearDocumentCachedRange() { |
selection_editor_->ClearDocumentCachedRange(); |
} |
+void FrameSelection::LayoutSelectionStartEnd(int& start_pos, int& end_pos) { |
+ layout_selection_->SelectionStartEnd(start_pos, end_pos); |
+} |
+ |
+void FrameSelection::ClearLayoutSelection() { |
+ layout_selection_->ClearSelection(); |
+} |
+ |
} // namespace blink |
#ifndef NDEBUG |