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

Unified Diff: third_party/WebKit/Source/core/layout/svg/SVGTextLayoutEngine.cpp

Issue 1625683003: [Line Layout API] Some harder SVGTextLayoutEngine changes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@3_api_easy_svg
Patch Set: readd null check with new isNull() method on LineLayoutItem Created 4 years, 10 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/core/layout/svg/SVGTextLayoutEngine.cpp
diff --git a/third_party/WebKit/Source/core/layout/svg/SVGTextLayoutEngine.cpp b/third_party/WebKit/Source/core/layout/svg/SVGTextLayoutEngine.cpp
index d8b3a66a73aa676ec94efc5d53faed9f17d75b5d..7b3f998d33b94bad4717ba23e50e129c56bca77a 100644
--- a/third_party/WebKit/Source/core/layout/svg/SVGTextLayoutEngine.cpp
+++ b/third_party/WebKit/Source/core/layout/svg/SVGTextLayoutEngine.cpp
@@ -191,7 +191,7 @@ void SVGTextLayoutEngine::beginTextPathLayout(SVGInlineFlowBox* flowBox)
SVGLengthAdjustType lengthAdjust = SVGLengthAdjustUnknown;
float desiredTextLength = 0;
- if (SVGTextContentElement* textContentElement = SVGTextContentElement::elementFromLayoutObject(LineLayoutAPIShim::layoutObjectFrom(textPath))) {
+ if (SVGTextContentElement* textContentElement = SVGTextContentElement::elementFromLineLayoutItem(textPath)) {
SVGLengthContext lengthContext(textContentElement);
lengthAdjust = textContentElement->lengthAdjust()->currentValue()->enumValue();
if (textContentElement->textLengthIsSpecifiedByUser())
@@ -245,7 +245,7 @@ void SVGTextLayoutEngine::layoutInlineTextBox(SVGInlineTextBox* textBox)
static bool definesTextLengthWithSpacing(const InlineFlowBox* start)
{
- SVGTextContentElement* textContentElement = SVGTextContentElement::elementFromLayoutObject(&start->layoutObject());
+ SVGTextContentElement* textContentElement = SVGTextContentElement::elementFromLineLayoutItem(start->lineLayoutItem());
return textContentElement
&& textContentElement->lengthAdjust()->currentValue()->enumValue() == SVGLengthAdjustSpacing
&& textContentElement->textLengthIsSpecifiedByUser();

Powered by Google App Engine
This is Rietveld 408576698