Commit 2ed2527c authored by Rob Buis's avatar Rob Buis Committed by Commit Bot

[mathml] Fix mo-lspace-rspace-dynamic.html

In order to react to changing values for the lspace/rspace
attributes, recalc the computed style so MathLSpace/MathRSpace
internal values are updated, and do a relayout of the operator
next.

Bug: 6606
Change-Id: I08b9bad216d7902f6c6d705c748fcb0677407316
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2474354Reviewed-by: default avatarFrédéric Wang <fwang@igalia.com>
Commit-Queue: Rob Buis <rbuis@igalia.com>
Cr-Commit-Position: refs/heads/master@{#817458}
parent c5f263f5
......@@ -4,6 +4,7 @@
#include "third_party/blink/renderer/core/mathml/mathml_operator_element.h"
#include "third_party/blink/renderer/core/css/style_change_reason.h"
#include "third_party/blink/renderer/core/layout/layout_object.h"
#include "third_party/blink/renderer/core/style/computed_style.h"
#include "third_party/blink/renderer/platform/text/mathml_operator_dictionary.h"
......@@ -138,6 +139,14 @@ void MathMLOperatorElement::ParseAttribute(
} else if (param.name == mathml_names::kMovablelimitsAttr) {
SetOperatorPropertyDirtyFlagIfNeeded(
param, MathMLOperatorElement::kMovableLimits, needs_layout);
} else if (param.name == mathml_names::kLspaceAttr ||
param.name == mathml_names::kRspaceAttr) {
needs_layout = param.new_value != param.old_value;
if (needs_layout && GetLayoutObject()) {
SetNeedsStyleRecalc(
kLocalStyleChange,
StyleChangeReasonForTracing::Create(style_change_reason::kAttribute));
}
}
if (needs_layout && GetLayoutObject() && GetLayoutObject()->IsMathML()) {
GetLayoutObject()
......
......@@ -1212,7 +1212,6 @@ crbug.com/1121942 virtual/layout_ng_printing/printing/webgl-oversized-printing.h
crbug.com/626703 external/wpt/mathml/presentation-markup/fractions/frac-invalid-2.html [ Failure ]
crbug.com/626703 external/wpt/mathml/presentation-markup/fractions/frac-invalid-3.html [ Failure ]
crbug.com/626703 external/wpt/mathml/presentation-markup/operators/mo-lspace-rspace-dynamic.html [ Failure ]
crbug.com/6606 external/wpt/mathml/presentation-markup/direction/direction-006.html [ Failure ]
crbug.com/6606 external/wpt/mathml/presentation-markup/direction/direction-009.html [ Failure ]
crbug.com/6606 external/wpt/mathml/presentation-markup/direction/direction.html [ Failure ]
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment