Chromium Code Reviews| Index: sky/engine/core/editing/FrameSelection.cpp |
| diff --git a/sky/engine/core/editing/FrameSelection.cpp b/sky/engine/core/editing/FrameSelection.cpp |
| index 2540b10b1c3e4593d0ca58ef8d4c5b2327d405cc..46634369bb0b774a17f72afc46a3506af587c3f1 100644 |
| --- a/sky/engine/core/editing/FrameSelection.cpp |
| +++ b/sky/engine/core/editing/FrameSelection.cpp |
| @@ -1520,19 +1520,6 @@ String FrameSelection::selectedText() const |
| return plainText(toNormalizedRange().get()).replace(0, ""); |
| } |
| -FloatRect FrameSelection::bounds() const |
| -{ |
| - m_frame->document()->updateRenderTreeIfNeeded(); |
| - |
| - FrameView* view = m_frame->view(); |
| - RenderView* renderView = m_frame->contentRenderer(); |
| - |
| - if (!view || !renderView) |
| - return FloatRect(); |
| - |
| - return renderView->selectionBounds(); |
| -} |
| - |
| void FrameSelection::revealSelection(const ScrollAlignment& alignment, RevealExtentOption revealExtentOption) |
| { |
| LayoutRect rect; |
| @@ -1544,7 +1531,8 @@ void FrameSelection::revealSelection(const ScrollAlignment& alignment, RevealExt |
| rect = absoluteCaretBounds(); |
| break; |
| case RangeSelection: |
| - rect = revealExtentOption == RevealExtent ? VisiblePosition(extent()).absoluteCaretBounds() : enclosingIntRect(bounds()); |
| + Position position = revealExtentOption == RevealExtent ? extent() : base(); |
|
ojan
2015/01/14 19:49:19
This is the only change in behavior. The rest of t
|
| + rect = VisiblePosition(position).absoluteCaretBounds(); |
| break; |
| } |