Chromium Code Reviews| Index: third_party/WebKit/Source/core/svg/SVGTextContentElement.cpp |
| diff --git a/third_party/WebKit/Source/core/svg/SVGTextContentElement.cpp b/third_party/WebKit/Source/core/svg/SVGTextContentElement.cpp |
| index 7f134aca6fdab2c5f0ed47e0f1936b624bf86703..feb591fe1d108d349de704c482d1e02b3a9054b1 100644 |
| --- a/third_party/WebKit/Source/core/svg/SVGTextContentElement.cpp |
| +++ b/third_party/WebKit/Source/core/svg/SVGTextContentElement.cpp |
| @@ -31,6 +31,7 @@ |
| #include "core/frame/LocalFrame.h" |
| #include "core/frame/UseCounter.h" |
| #include "core/layout/LayoutObject.h" |
| +#include "core/layout/api/LineLayoutAPIShim.h" |
| #include "core/layout/svg/SVGTextQuery.h" |
| namespace blink { |
| @@ -250,15 +251,12 @@ bool SVGTextContentElement::selfHasRelativeLengths() const |
| return true; |
| } |
| -SVGTextContentElement* SVGTextContentElement::elementFromLayoutObject(LayoutObject* layoutObject) |
| +SVGTextContentElement* SVGTextContentElement::elementFromLineLayoutItem(LineLayoutItem lineLayoutItem) |
| { |
| - if (!layoutObject) |
|
pilgrim_google
2016/02/11 18:19:28
Yeah, that worries me too. Levi needs to weigh in
dgrogan
2016/02/11 19:12:33
What operators are you referring to? I only see 1:
leviw_travelin_and_unemployed
2016/02/11 21:35:02
Ahh, allow me to introduce you to the magical worl
dgrogan
2016/02/11 23:36:02
For anyone following along at home, Levi and I dis
|
| + if (!lineLayoutItem.isSVGText() && !lineLayoutItem.isSVGInline()) |
| return nullptr; |
| - if (!layoutObject->isSVGText() && !layoutObject->isSVGInline()) |
| - return nullptr; |
| - |
| - SVGElement* element = toSVGElement(layoutObject->node()); |
| + SVGElement* element = toSVGElement(lineLayoutItem.node()); |
| ASSERT(element); |
| return isSVGTextContentElement(*element) ? toSVGTextContentElement(element) : 0; |
| } |