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

Unified Diff: sky/engine/core/rendering/RenderText.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
Index: sky/engine/core/rendering/RenderText.cpp
diff --git a/sky/engine/core/rendering/RenderText.cpp b/sky/engine/core/rendering/RenderText.cpp
index 1d93cf21c58d33c1fc2a749a22e2b28e29cda156..7e672a0f0843bad99bed97264be9fb3fc3a9130a 100644
--- a/sky/engine/core/rendering/RenderText.cpp
+++ b/sky/engine/core/rendering/RenderText.cpp
@@ -1364,49 +1364,6 @@ LayoutRect RenderText::linesVisualOverflowBoundingBox() const
return rect;
}
-LayoutRect RenderText::selectionRectForPaintInvalidation(const RenderLayerModelObject* paintInvalidationContainer, bool clipToVisibleContent)
-{
- ASSERT(!needsLayout());
-
- if (selectionState() == SelectionNone)
- return LayoutRect();
- RenderBlock* cb = containingBlock();
- if (!cb)
- return LayoutRect();
-
- // Now calculate startPos and endPos for painting selection.
- // We include a selection while endPos > 0
- int startPos, endPos;
- if (selectionState() == SelectionInside) {
- // We are fully selected.
- startPos = 0;
- endPos = textLength();
- } else {
- selectionStartEnd(startPos, endPos);
- if (selectionState() == SelectionStart)
- endPos = textLength();
- else if (selectionState() == SelectionEnd)
- startPos = 0;
- }
-
- if (startPos == endPos)
- return IntRect();
-
- LayoutRect rect;
- for (InlineTextBox* box = firstTextBox(); box; box = box->nextTextBox()) {
- rect.unite(box->localSelectionRect(startPos, endPos));
- rect.unite(ellipsisRectForBox(box, startPos, endPos));
- }
-
- if (clipToVisibleContent) {
- mapRectToPaintInvalidationBacking(paintInvalidationContainer, rect, 0);
- } else {
- rect = localToContainerQuad(FloatRect(rect), paintInvalidationContainer).enclosingBoundingBox();
- }
-
- return rect;
-}
-
int RenderText::caretMinOffset() const
{
InlineTextBox* box = firstTextBox();

Powered by Google App Engine
This is Rietveld 408576698