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

Unified Diff: Source/core/html/canvas/CanvasRenderingContext2D.cpp

Issue 14160005: Track the region where text is painted. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebase with TOT Created 7 years, 8 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: Source/core/html/canvas/CanvasRenderingContext2D.cpp
diff --git a/Source/core/html/canvas/CanvasRenderingContext2D.cpp b/Source/core/html/canvas/CanvasRenderingContext2D.cpp
index a26ab56f27bf2f7cc25c9019d06bf016b721835b..536f09816064331a3fa43099ea59fc42a4af6857 100644
--- a/Source/core/html/canvas/CanvasRenderingContext2D.cpp
+++ b/Source/core/html/canvas/CanvasRenderingContext2D.cpp
@@ -2201,9 +2201,9 @@ void CanvasRenderingContext2D::drawTextInternal(const String& text, float x, flo
c->translate(location.x(), location.y());
// We draw when fontWidth is 0 so compositing operations (eg, a "copy" op) still work.
c->scale(FloatSize((fontWidth > 0 ? (width / fontWidth) : 0), 1));
- c->drawBidiText(font, textRun, FloatPoint(0, 0), Font::UseFallbackIfFontNotReady);
+ c->drawBidiText(font, textRun, FloatPoint(0, 0), textRect, Font::UseFallbackIfFontNotReady);
} else
- c->drawBidiText(font, textRun, location, Font::UseFallbackIfFontNotReady);
+ c->drawBidiText(font, textRun, location, textRect, Font::UseFallbackIfFontNotReady);
didDraw(textRect);
}

Powered by Google App Engine
This is Rietveld 408576698