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_disabled_form_control-manual.html
<!doctype html>
<html>
    <head>
        <title>Pointer Events properties tests</title>
        <meta name="viewport" content="width=device-width">
        <link rel="stylesheet" type="text/css" href="pointerevent_styles.css">
        <script src="/resources/testharness.js"></script>
        <script src="/resources/testharnessreport.js"></script>
        <!-- Additional helper script for common checks across event types -->
        <script type="text/javascript" src="pointerevent_support.js"></script>
        <script>
            var detected_pointertypes = {};
            var detected_eventTypes = {};
            var eventList = ['pointerout', 'pointerover', 'pointerenter', 'pointermove', 'pointerdown', 'pointerup', 'pointerleave'];

            function resetTestState() {
                detected_eventTypes = {};
            }
            function run() {
                var test_pointerEvent = setup_pointerevent_test("pointerevent attributes", ALL_POINTERS);
                var target = document.getElementById("target0");

                eventList.forEach(function(eventName) {
                on_event(target, eventName, function (event) {
                        detected_eventTypes[event.type] = true;
                        detected_pointertypes[event.pointerType] = true;

                        if (Object.keys(detected_eventTypes).length == eventList.length) {
                            test_pointerEvent.done();
                        }
                    });
                });
                on_event(target, "click", function (event) {
                    assert_unreached("click should not fire on disabled element");
                });
            }
        </script>
        <style>
            #target0 {
            background: purple;
            border: 1px solid orange;
            touch-action: none;
            width: 200px;
            height: 100px;
            }
        </style>
    </head>
    <body onload="run()">
        <h1> Pointer Event: pointerevents fire to disabled form controls</h1>
        <h2 id="pointerTypeDescription"></h2>
        <h4>
            Test Description:
            Pointerevents are dispatched to disabled form controls.
        </h4>
        <div id="instructions">
            Use the mouse or pen to press on the purple button. Or with touch, tap on the purple box.
        </div>
        <button id="target0" disabled>Disabled button</button>
        <div id="complete-notice">
            <p>Test complete: Scroll to Summary to view Pass/Fail Results.</p>
            <p>The following pointer types were detected: <span id="pointertype-log"></span>.</p>
            <p>Refresh the page to run the tests again with a different pointer type.</p>
        </div>
        <div id="log"></div>
    </body>
</html>
back to top