| Index: third_party/WebKit/Source/core/layout/LayoutBlockFlow.cpp
|
| diff --git a/third_party/WebKit/Source/core/layout/LayoutBlockFlow.cpp b/third_party/WebKit/Source/core/layout/LayoutBlockFlow.cpp
|
| index 9fd14255efb568cc83fcfc7da64129b8aba15919..344c09729556d43bca860682ff1c9790dd5c16de 100644
|
| --- a/third_party/WebKit/Source/core/layout/LayoutBlockFlow.cpp
|
| +++ b/third_party/WebKit/Source/core/layout/LayoutBlockFlow.cpp
|
| @@ -2827,6 +2827,13 @@
|
| // TODO(mstensho): figure out if we need this. We have no test coverage for
|
| // it. It looks like all line boxes have been removed at this point.
|
| if (FirstLineBox()) {
|
| + // We can't wait for LayoutBox::destroy to clear the selection,
|
| + // because by then we will have nuked the line boxes.
|
| + // FIXME: The FrameSelection should be responsible for this when it
|
| + // is notified of DOM mutations.
|
| + if (IsSelectionBorder())
|
| + View()->ClearSelection();
|
| +
|
| // If we are an anonymous block, then our line boxes might have children
|
| // that will outlast this block. In the non-anonymous block case those
|
| // children will be destroyed by the time we return from this function.
|
|
|