ASSERTION FAILED: object->style()->overflowX() == object->style()->overflowY()

Overriding overflow values to VISIBLE if they are different.

BUG=362510

Review URL: https://codereview.chromium.org/235043003

git-svn-id: svn://svn.chromium.org/blink/trunk@171446 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent 4e108d80
This test checks the overflow equality in case of SVG.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
PASS computedStyle1.getPropertyValue('overflow-x') is computedStyle1.getPropertyValue('overflow-y')
PASS computedStyle2.getPropertyValue('overflow-x') is computedStyle2.getPropertyValue('overflow-y')
PASS computedStyle3.getPropertyValue('overflow-x') is computedStyle3.getPropertyValue('overflow-y')
PASS successfullyParsed is true
TEST COMPLETE
<!DOCTYPE html>
<script src="../../resources/js-test.js"></script>
<svg id="svg1"/>
<svg id="svg2" style="overflow-x: auto"/>
<svg id="svg3" style="overflow-x: visible; overflow-y: hidden"/>
<script>
description("This test checks the overflow equality in case of SVG.")
svg = document.getElementById("svg1");
computedStyle1 = getComputedStyle(svg);
shouldBe("computedStyle1.getPropertyValue('overflow-x')", "computedStyle1.getPropertyValue('overflow-y')");
svg = document.getElementById("svg2");
computedStyle2 = getComputedStyle(svg);
shouldBe("computedStyle2.getPropertyValue('overflow-x')", "computedStyle2.getPropertyValue('overflow-y')");
svg = document.getElementById("svg3");
computedStyle3 = getComputedStyle(svg);
shouldBe("computedStyle3.getPropertyValue('overflow-x')", "computedStyle3.getPropertyValue('overflow-y')");
</script>
\ No newline at end of file
...@@ -419,6 +419,14 @@ void StyleAdjuster::adjustOverflow(RenderStyle* style, Element* element) ...@@ -419,6 +419,14 @@ void StyleAdjuster::adjustOverflow(RenderStyle* style, Element* element)
style->setOverflowX(OHIDDEN); style->setOverflowX(OHIDDEN);
else if (style->overflowX() == OAUTO) else if (style->overflowX() == OAUTO)
style->setOverflowX(OVISIBLE); style->setOverflowX(OVISIBLE);
if (style->overflowX() == style->overflowY())
return;
if (style->overflowX() != OVISIBLE)
style->setOverflowX(OVISIBLE);
else
style->setOverflowY(OVISIBLE);
} }
} }
......
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