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

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

Issue 13529026: Removing a bunch of unused platform code. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix whitespace and compiler error on Mac. 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
« no previous file with comments | « Source/WebCore/html/HTMLObjectElement.cpp ('k') | Source/WebCore/html/canvas/CanvasStyle.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/WebCore/html/canvas/CanvasRenderingContext2D.cpp
diff --git a/Source/WebCore/html/canvas/CanvasRenderingContext2D.cpp b/Source/WebCore/html/canvas/CanvasRenderingContext2D.cpp
index b299a2fd078009ec97f8763ab2219cbfddff02aa..8b8490e55cf42d457d48c97235b37ba6b39deadc 100644
--- a/Source/WebCore/html/canvas/CanvasRenderingContext2D.cpp
+++ b/Source/WebCore/html/canvas/CanvasRenderingContext2D.cpp
@@ -2100,21 +2100,8 @@ void CanvasRenderingContext2D::strokeText(const String& text, float x, float y,
PassRefPtr<TextMetrics> CanvasRenderingContext2D::measureText(const String& text)
{
FontCachePurgePreventer fontCachePurgePreventer;
-
RefPtr<TextMetrics> metrics = TextMetrics::create();
-
-#if PLATFORM(QT)
- // We always use complex text shaping since it can't be turned off for QPainterPath::addText().
- Font::CodePath oldCodePath = Font::codePath();
- Font::setCodePath(Font::Complex);
-#endif
-
metrics->setWidth(accessFont().width(TextRun(text.characters(), text.length())));
-
-#if PLATFORM(QT)
- Font::setCodePath(oldCodePath);
-#endif
-
return metrics.release();
}
@@ -2250,13 +2237,6 @@ void CanvasRenderingContext2D::drawTextInternal(const String& text, float x, flo
#endif
c->setTextDrawingMode(fill ? TextModeFill : TextModeStroke);
-
-#if PLATFORM(QT)
- // We always use complex text shaping since it can't be turned off for QPainterPath::addText().
- Font::CodePath oldCodePath = Font::codePath();
- Font::setCodePath(Font::Complex);
-#endif
-
if (useMaxWidth) {
GraphicsContextStateSaver stateSaver(*c);
c->translate(location.x(), location.y());
@@ -2267,10 +2247,6 @@ void CanvasRenderingContext2D::drawTextInternal(const String& text, float x, flo
c->drawBidiText(font, textRun, location, Font::UseFallbackIfFontNotReady);
didDraw(textRect);
-
-#if PLATFORM(QT)
- Font::setCodePath(oldCodePath);
-#endif
}
void CanvasRenderingContext2D::inflateStrokeRect(FloatRect& rect) const
« no previous file with comments | « Source/WebCore/html/HTMLObjectElement.cpp ('k') | Source/WebCore/html/canvas/CanvasStyle.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698