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

Unified Diff: third_party/WebKit/Source/core/svg/SVGTextContentElement.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
« no previous file with comments | « third_party/WebKit/Source/core/svg/SVGTextContentElement.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..cf975e5bc596ac0f92e435b043b94cf2a51de364 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)
dgrogan 2016/02/11 23:36:02 In the meantime this nullptr check lives on as isN
+ if (lineLayoutItem.isNull() || (!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;
}
« no previous file with comments | « third_party/WebKit/Source/core/svg/SVGTextContentElement.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698