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

Unified Diff: third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2D.cpp

Issue 1774943003: blink: Rename platform/ methods to prefix with get when they collide. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: clash-platform: rebase-yayyyyyyyy Created 4 years, 9 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: third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2D.cpp
diff --git a/third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2D.cpp b/third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2D.cpp
index ff96cb51b82b8ed1c31afd54261f3311c7d0e1ea..41f1a5bed32d85ae4440cda4255a131818d73fe3 100644
--- a/third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2D.cpp
+++ b/third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2D.cpp
@@ -409,7 +409,7 @@ String CanvasRenderingContext2D::font() const
canvas()->document().canvasFontCache()->willUseCurrentFont();
StringBuilder serializedFont;
- const FontDescription& fontDescription = state().font().fontDescription();
+ const FontDescription& fontDescription = state().font().getFontDescription();
if (fontDescription.style() == FontStyleItalic)
serializedFont.appendLiteral("italic ");
@@ -473,11 +473,11 @@ void CanvasRenderingContext2D::setFont(const String& newFont)
if (!parsedStyle)
return;
fontStyle = ComputedStyle::create();
- FontDescription elementFontDescription(computedStyle->fontDescription());
+ FontDescription elementFontDescription(computedStyle->getFontDescription());
// Reset the computed size to avoid inheriting the zoom factor from the <canvas> element.
elementFontDescription.setComputedSize(elementFontDescription.specifiedSize());
fontStyle->setFontDescription(elementFontDescription);
- fontStyle->font().update(fontStyle->font().fontSelector());
+ fontStyle->font().update(fontStyle->font().getFontSelector());
canvas()->document().ensureStyleResolver().computeFont(fontStyle.get(), *parsedStyle);
m_fontsResolvedUsingCurrentStyle.add(newFont, fontStyle->font());
ASSERT(!m_fontLRUList.contains(newFont));
@@ -688,7 +688,7 @@ TextMetrics* CanvasRenderingContext2D::measureText(const String& text)
direction = toTextDirection(state().getDirection(), canvas());
TextRun textRun(text, 0, 0, TextRun::AllowTrailingExpansion | TextRun::ForbidLeadingExpansion, direction, false);
textRun.setNormalizeSpace(true);
- FloatRect textBounds = font.selectionRectForText(textRun, FloatPoint(), font.fontDescription().computedSize(), 0, -1, true);
+ FloatRect textBounds = font.selectionRectForText(textRun, FloatPoint(), font.getFontDescription().computedSize(), 0, -1, true);
// x direction
metrics->setWidth(font.width(textRun));
@@ -696,7 +696,7 @@ TextMetrics* CanvasRenderingContext2D::measureText(const String& text)
metrics->setActualBoundingBoxRight(textBounds.maxX());
// y direction
- const FontMetrics& fontMetrics = font.fontMetrics();
+ const FontMetrics& fontMetrics = font.getFontMetrics();
const float ascent = fontMetrics.floatAscent();
const float descent = fontMetrics.floatDescent();
const float baselineY = getFontBaseline(fontMetrics);
@@ -748,7 +748,7 @@ void CanvasRenderingContext2D::drawTextInternal(const String& text, double x, do
if (!font.primaryFont())
return;
- const FontMetrics& fontMetrics = font.fontMetrics();
+ const FontMetrics& fontMetrics = font.getFontMetrics();
// FIXME: Need to turn off font smoothing.
@@ -915,7 +915,7 @@ void CanvasRenderingContext2D::drawFocusRing(const Path& path)
SkColor color = LayoutTheme::theme().focusRingColor().rgb();
const int focusRingWidth = 5;
- drawPlatformFocusRing(path.skPath(), drawingCanvas(), color, focusRingWidth);
+ drawPlatformFocusRing(path.getSkPath(), drawingCanvas(), color, focusRingWidth);
// We need to add focusRingWidth to dirtyRect.
StrokeData strokeData;

Powered by Google App Engine
This is Rietveld 408576698