Revision 208cfc11c0a61d6d44ec395699ff32c6dcf6ab52 authored by Manuel Rego Casasnovas on 19 March 2018, 16:01:26 UTC, committed by Chromium WPT Sync on 19 March 2018, 16:01:26 UTC
LayoutBox::FillAvailableMeasure() was not considering the case of
orthogonal elements when computing the margins.
The margins ended up being properly calculated but the size of
the orthogonal elements was wrong, as they considered
to have more or less space than the available one.

The method is modified in order to use
the containing block inline size in order to resolve the percentages:
https://www.w3.org/TR/css-writing-modes-3/#dimension-mapping

BUG=808758
TEST=external/wpt/css/css-writing-modes/sizing-orthogonal-percentage-margin-00*.html

Change-Id: Ib8c81dcd14589b3fefe806de3f8f75c000b1cac9
Reviewed-on: https://chromium-review.googlesource.com/968522
Commit-Queue: Koji Ishii <kojii@chromium.org>
Reviewed-by: Koji Ishii <kojii@chromium.org>
Cr-Commit-Position: refs/heads/master@{#544047}
1 parent 5dee619
Raw File
pointerevent_setpointercapture_inactive_button_mouse-manual.html
<!doctype html>
<html>
    <head>
        <title>setPointerCapture + inactive button state</title>
        <link rel="stylesheet" type="text/css" href="pointerevent_styles.css">
        <meta name="viewport" content="width=device-width">
        <script src="/resources/testharness.js"></script>
        <script src="/resources/testharnessreport.js"></script>
        <script src="pointerevent_support.js"></script>
    </head>
    <body onload="run()">
        <h1>setPointerCapture</h1>
        <h4>
            Test Description: This test checks if setPointerCapture works properly.
            <ol>
                <li>Put your mouse over the black rectangle
                <li>Move you mouse out to complete the test
            </ol>
        </h4>
        <p>
        <div id="target0" style="background:black; color:white;"></div>
        <script>
            var detected_pointertypes = {};

            var captureGot = false;

            setup({ explicit_done: true });
            add_completion_callback(showPointerTypes);

            function run() {
                var target0 = document.getElementById("target0");

                on_event(target0, "pointerover", function (event) {
                    detected_pointertypes[event.pointerType] = true;
                    target0.setPointerCapture(event.pointerId);
                });

                 // When the setPointerCapture method is invoked, if the specified pointer is not in active button state, then the method must have no effect on subsequent pointer events.
                 // TA: 13.2
                on_event(target0, "pointerout", function (event) {
                    test(function() {
                        assert_false(captureGot, "pointer capture is not set while button state is inactive")
                    }, "pointer capture is not set while button state is inactive");
                    done();
                });

                on_event(target0, 'gotpointercapture', function(e) {
                    captureGot = true;
                });
            }
        </script>
        <h1>Pointer Events setPointerCapture Tests</h1>
        <div id="complete-notice">
            <p>The following pointer types were detected: <span id="pointertype-log"></span>.</p>
        </div>
        <div id="log"></div>
    </body>
</html>
back to top