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

Unified Diff: sky/engine/core/rendering/InlineTextBox.cpp

Issue 830273006: Delete document marker related 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/rendering/HitTestResult.cpp ('k') | sky/engine/public/web/WebWidgetClient.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/engine/core/rendering/InlineTextBox.cpp
diff --git a/sky/engine/core/rendering/InlineTextBox.cpp b/sky/engine/core/rendering/InlineTextBox.cpp
index 01c17f2dce40ade70b9f83648f42e32b9cb4a75e..cb54daf7618fe099146e88cf69cf17f5237a52f5 100644
--- a/sky/engine/core/rendering/InlineTextBox.cpp
+++ b/sky/engine/core/rendering/InlineTextBox.cpp
@@ -1039,14 +1039,6 @@ void InlineTextBox::paintDocumentMarker(GraphicsContext* pt, const FloatPoint& b
IntRect markerRect = enclosingIntRect(font.selectionRectForText(run, startPoint, selHeight, startPosition, endPosition));
start = markerRect.x() - startPoint.x();
width = markerRect.width();
-
- // Store rendered rects for bad grammar markers, so we can hit-test against it elsewhere in order to
- // display a toolTip. We don't do this for misspelling markers.
- if (grammar) {
- markerRect.move(-boxOrigin.x(), -boxOrigin.y());
- markerRect = renderer().localToAbsoluteQuad(FloatRect(markerRect)).enclosingBoundingBox();
- toRenderedDocumentMarker(marker)->setRenderedRect(markerRect);
- }
}
// IMPORTANT: The misspelling underline is not considered when calculating the text bounds, so we have to
@@ -1071,18 +1063,8 @@ void InlineTextBox::paintDocumentMarker(GraphicsContext* pt, const FloatPoint& b
void InlineTextBox::paintTextMatchMarker(GraphicsContext* pt, const FloatPoint& boxOrigin, DocumentMarker* marker, RenderStyle* style, const Font& font)
{
- // Use same y positioning and height as for selection, so that when the selection and this highlight are on
- // the same word there are no pieces sticking out.
- int selHeight = selectionHeight();
-
- int sPos = std::max(marker->startOffset() - m_start, (unsigned)0);
- int ePos = std::min(marker->endOffset() - m_start, (unsigned)m_len);
- TextRun run = constructTextRun(style, font);
-
- // Always compute and store the rect associated with this marker. The computed rect is in absolute coordinates.
- IntRect markerRect = enclosingIntRect(font.selectionRectForText(run, IntPoint(x(), selectionTop()), selHeight, sPos, ePos));
- markerRect = renderer().localToAbsoluteQuad(FloatRect(markerRect)).enclosingBoundingBox();
- toRenderedDocumentMarker(marker)->setRenderedRect(markerRect);
+ // FIXME(sky): This function didn't seem to actually paint.
+ // Do we even have TextMatch markers in sky? What are they for?
}
void InlineTextBox::paintCompositionBackgrounds(GraphicsContext* pt, const FloatPoint& boxOrigin, RenderStyle* style, const Font& font, bool useCustomUnderlines)
« no previous file with comments | « sky/engine/core/rendering/HitTestResult.cpp ('k') | sky/engine/public/web/WebWidgetClient.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698