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

Unified Diff: sky/engine/core/editing/FrameSelection.cpp

Issue 847303003: Delete selection paint invalidation code. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 11 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 | « sky/engine/core/editing/FrameSelection.h ('k') | sky/engine/core/rendering/RenderBlock.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
}
« no previous file with comments | « sky/engine/core/editing/FrameSelection.h ('k') | sky/engine/core/rendering/RenderBlock.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698