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

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

Issue 1360083003: Tweak asserts for dominant-baseline in SVGTextLayoutEngineBaseline (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 3 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/LayoutTests/svg/custom/dominant-baseline-propagation-crash-expected.txt ('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/layout/svg/SVGTextLayoutEngineBaseline.cpp
diff --git a/third_party/WebKit/Source/core/layout/svg/SVGTextLayoutEngineBaseline.cpp b/third_party/WebKit/Source/core/layout/svg/SVGTextLayoutEngineBaseline.cpp
index 831a70c461c86330e7ef441051a5809021bc7942..29408f96e8ce26975f3eca1b2caf11adbe7094bd 100644
--- a/third_party/WebKit/Source/core/layout/svg/SVGTextLayoutEngineBaseline.cpp
+++ b/third_party/WebKit/Source/core/layout/svg/SVGTextLayoutEngineBaseline.cpp
@@ -57,8 +57,6 @@ EAlignmentBaseline SVGTextLayoutEngineBaseline::dominantBaselineToAlignmentBasel
{
ASSERT(textLayoutObject);
ASSERT(textLayoutObject->style());
- ASSERT(textLayoutObject->parent());
- ASSERT(textLayoutObject->parent()->style());
const SVGComputedStyle& style = textLayoutObject->style()->svgStyle();
@@ -72,11 +70,15 @@ EAlignmentBaseline SVGTextLayoutEngineBaseline::dominantBaselineToAlignmentBasel
switch (baseline) {
case DB_USE_SCRIPT:
- // FIXME: The dominant-baseline and the baseline-table components are set by determining the predominant script of the character data content.
+ // TODO(fs): The dominant-baseline and the baseline-table components
+ // are set by determining the predominant script of the character data
+ // content.
return AB_ALPHABETIC;
case DB_NO_CHANGE:
+ ASSERT(textLayoutObject->parent());
return dominantBaselineToAlignmentBaseline(isVerticalText, textLayoutObject->parent());
case DB_RESET_SIZE:
+ ASSERT(textLayoutObject->parent());
return dominantBaselineToAlignmentBaseline(isVerticalText, textLayoutObject->parent());
case DB_IDEOGRAPHIC:
return AB_IDEOGRAPHIC;
« no previous file with comments | « third_party/WebKit/LayoutTests/svg/custom/dominant-baseline-propagation-crash-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698