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

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

Issue 1033943002: Rename LayoutStyle to papayawhip (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: ensureComputedStyle Created 5 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
« no previous file with comments | « Source/core/html/HTMLWBRElement.cpp ('k') | Source/core/html/forms/BaseButtonInputType.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/canvas/CanvasRenderingContext2D.cpp
diff --git a/Source/core/html/canvas/CanvasRenderingContext2D.cpp b/Source/core/html/canvas/CanvasRenderingContext2D.cpp
index daf2d3538162f1d6346e39f3c6d4f0c7c3f2498e..314012b3a7c294fd6e54911fc9c572d3be546dd3 100644
--- a/Source/core/html/canvas/CanvasRenderingContext2D.cpp
+++ b/Source/core/html/canvas/CanvasRenderingContext2D.cpp
@@ -1847,9 +1847,9 @@ void CanvasRenderingContext2D::setFont(const String& newFont)
// Map the <canvas> font into the text style. If the font uses keywords like larger/smaller, these will work
// relative to the canvas.
- RefPtr<LayoutStyle> newStyle = LayoutStyle::create();
+ RefPtr<ComputedStyle> newStyle = ComputedStyle::create();
canvas()->document().updateRenderTreeIfNeeded();
- if (const LayoutStyle* computedStyle = canvas()->computedStyle()) {
+ if (const ComputedStyle* computedStyle = canvas()->ensureComputedStyle()) {
FontDescription elementFontDescription(computedStyle->fontDescription());
// Reset the computed size to avoid inheriting the zoom factor from the <canvas> element.
elementFontDescription.setComputedSize(elementFontDescription.specifiedSize());
@@ -1916,9 +1916,9 @@ void CanvasRenderingContext2D::setTextBaseline(const String& s)
modifiableState().setTextBaseline(baseline);
}
-static inline TextDirection toTextDirection(CanvasRenderingContext2DState::Direction direction, HTMLCanvasElement* canvas, const LayoutStyle** computedStyle = 0)
+static inline TextDirection toTextDirection(CanvasRenderingContext2DState::Direction direction, HTMLCanvasElement* canvas, const ComputedStyle** computedStyle = 0)
{
- const LayoutStyle* style = (computedStyle || direction == CanvasRenderingContext2DState::DirectionInherit) ? canvas->computedStyle() : nullptr;
+ const ComputedStyle* style = (computedStyle || direction == CanvasRenderingContext2DState::DirectionInherit) ? canvas->ensureComputedStyle() : nullptr;
if (computedStyle)
*computedStyle = style;
switch (direction) {
@@ -2064,7 +2064,7 @@ void CanvasRenderingContext2D::drawTextInternal(const String& text, float x, flo
// FIXME: Need to turn off font smoothing.
- const LayoutStyle* computedStyle = 0;
+ const ComputedStyle* computedStyle = 0;
TextDirection direction = toTextDirection(state().direction(), canvas(), &computedStyle);
bool isRTL = direction == RTL;
bool override = computedStyle ? isOverride(computedStyle->unicodeBidi()) : false;
« no previous file with comments | « Source/core/html/HTMLWBRElement.cpp ('k') | Source/core/html/forms/BaseButtonInputType.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698