X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=src%2Fthird_party%2FWebKit%2FSource%2Fcore%2Frendering%2Fsvg%2FSVGTextMetrics.cpp;h=3ab52797f77fa27b7f9b2c8fd12992fcf40ec402;hb=004985e17e624662a4c85c76a7654039dc83f028;hp=e9bacb475efa3bb09d4aff152610f9d86a10aad6;hpb=2f108dbacb161091e42a3479f4e171339b7e7623;p=platform%2Fframework%2Fweb%2Fcrosswalk.git diff --git a/src/third_party/WebKit/Source/core/rendering/svg/SVGTextMetrics.cpp b/src/third_party/WebKit/Source/core/rendering/svg/SVGTextMetrics.cpp index e9bacb4..3ab5279 100644 --- a/src/third_party/WebKit/Source/core/rendering/svg/SVGTextMetrics.cpp +++ b/src/third_party/WebKit/Source/core/rendering/svg/SVGTextMetrics.cpp @@ -62,6 +62,12 @@ SVGTextMetrics::SVGTextMetrics(RenderSVGInlineText* textRenderer, const TextRun& TextRun SVGTextMetrics::constructTextRun(RenderSVGInlineText* text, unsigned position, unsigned length) { + ASSERT(text->style()); + return constructTextRun(text, position, length, text->style()->direction()); +} + +TextRun SVGTextMetrics::constructTextRun(RenderSVGInlineText* text, unsigned position, unsigned length, TextDirection textDirection) +{ RenderStyle* style = text->style(); ASSERT(style); @@ -70,7 +76,7 @@ TextRun SVGTextMetrics::constructTextRun(RenderSVGInlineText* text, unsigned pos , 0 // xPos, only relevant with allowTabs=true , 0 // padding, only relevant for justified text, not relevant for SVG , TextRun::AllowTrailingExpansion - , style->direction() + , textDirection , isOverride(style->unicodeBidi()) /* directionalOverride */); if (length) { @@ -94,6 +100,12 @@ TextRun SVGTextMetrics::constructTextRun(RenderSVGInlineText* text, unsigned pos return run; } +SVGTextMetrics SVGTextMetrics::measureCharacterRange(RenderSVGInlineText* text, unsigned position, unsigned length, TextDirection textDirection) +{ + ASSERT(text); + return SVGTextMetrics(text, constructTextRun(text, position, length, textDirection)); +} + SVGTextMetrics SVGTextMetrics::measureCharacterRange(RenderSVGInlineText* text, unsigned position, unsigned length) { ASSERT(text);