From ece605540c0fbbc81b7f1b15fca100c12e815a20 Mon Sep 17 00:00:00 2001 From: Manuel Rego Casasnovas Date: Tue, 1 May 2018 17:15:30 +0000 Subject: [PATCH] Bug 1457123 [wpt PR 10651] - [css-writing-modes] Fix percentages on orthogonal replaced children, a=testonly Automatic update from web-platform-tests[css-writing-modes] Fix percentages on orthogonal replaced children This patch modifies LayoutBox::ComputeReplacedLogicalWidth|HeightUsing() so it's aware of the orthogonal flow cases. For example to compute the relative widths of replaced elements, if the element direction is perpendicular to its containing block it should use the containing block height instead of the width. BUG=837146 TEST=external/wpt/css/css-writing-modes/sizing-percentages-replaced-orthogonal-001.html Change-Id: I655c984703e2073be9a3a649ac79a63f8c136cc0 Reviewed-on: https://chromium-review.googlesource.com/1029852 Reviewed-by: Javier Fernandez Commit-Queue: Manuel Rego Casasnovas Cr-Commit-Position: refs/heads/master@{#554731} -- wpt-commits: 435b33acfe825349ac7c18262a8e0b11e2be38e5 wpt-pr: 10651 --- testing/web-platform/meta/MANIFEST.json | 25 ++++++++++ ...rcentages-replaced-orthogonal-001-ref.html | 39 ++++++++++++++++ ...g-percentages-replaced-orthogonal-001.html | 46 +++++++++++++++++++ 3 files changed, 110 insertions(+) create mode 100644 testing/web-platform/tests/css/css-writing-modes/sizing-percentages-replaced-orthogonal-001-ref.html create mode 100644 testing/web-platform/tests/css/css-writing-modes/sizing-percentages-replaced-orthogonal-001.html diff --git a/testing/web-platform/meta/MANIFEST.json b/testing/web-platform/meta/MANIFEST.json index e18cb5d9dbca..76cf5f9708c0 100644 --- a/testing/web-platform/meta/MANIFEST.json +++ b/testing/web-platform/meta/MANIFEST.json @@ -160439,6 +160439,18 @@ {} ] ], + "css/css-writing-modes/sizing-percentages-replaced-orthogonal-001.html": [ + [ + "/css/css-writing-modes/sizing-percentages-replaced-orthogonal-001.html", + [ + [ + "/css/css-writing-modes/sizing-percentages-replaced-orthogonal-001-ref.html", + "==" + ] + ], + {} + ] + ], "css/css-writing-modes/svg-aliasing-001.html": [ [ "/css/css-writing-modes/svg-aliasing-001.html", @@ -262911,6 +262923,11 @@ {} ] ], + "css/css-writing-modes/sizing-percentages-replaced-orthogonal-001-ref.html": [ + [ + {} + ] + ], "css/css-writing-modes/support/100x100-lime.png": [ [ {} @@ -538360,6 +538377,14 @@ "2543ef7b6e41b2b0614c32167f4e0a85319dae0c", "reftest" ], + "css/css-writing-modes/sizing-percentages-replaced-orthogonal-001-ref.html": [ + "59177963e949b6c60b3e919f87de243a5ca24522", + "support" + ], + "css/css-writing-modes/sizing-percentages-replaced-orthogonal-001.html": [ + "c558b746bdc80a28371146de9a54ba4822e91088", + "reftest" + ], "css/css-writing-modes/support/100x100-lime.png": [ "b02fc2d0ad1d95a2aeb6011022e63928841b183f", "support" diff --git a/testing/web-platform/tests/css/css-writing-modes/sizing-percentages-replaced-orthogonal-001-ref.html b/testing/web-platform/tests/css/css-writing-modes/sizing-percentages-replaced-orthogonal-001-ref.html new file mode 100644 index 000000000000..0fd818c5a355 --- /dev/null +++ b/testing/web-platform/tests/css/css-writing-modes/sizing-percentages-replaced-orthogonal-001-ref.html @@ -0,0 +1,39 @@ + + +CSS Reftest Reference: Percentage size on orthogonal replaced elements + + + +

The test passes if you see four filled lime rectangles with black border and no red.

+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
diff --git a/testing/web-platform/tests/css/css-writing-modes/sizing-percentages-replaced-orthogonal-001.html b/testing/web-platform/tests/css/css-writing-modes/sizing-percentages-replaced-orthogonal-001.html new file mode 100644 index 000000000000..6829920c8026 --- /dev/null +++ b/testing/web-platform/tests/css/css-writing-modes/sizing-percentages-replaced-orthogonal-001.html @@ -0,0 +1,46 @@ + + +CSS Writing Modes Test: Percentage size on orthogonal replaced elements + + + + + + +

The test passes if you see four filled lime rectangles with black border and no red.

+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +