Revision 1b5ce4ad3817e7b7247d7ff0f76b81877fce0d89 authored by Andrew Comminos on 21 December 2018, 21:45:26 UTC, committed by Chromium WPT Sync on 21 December 2018, 21:45:26 UTC
When two child elements of a flexbox overlap (for example, due to negative margins), the element drawn in the foreground may not actually capture the hit if the element underneath it is hit-tested in an earlier phase (e.g. foreground before child block background), despite being occluded. This is because painting of flexbox children is done atomically (all phases at once). This change makes hit testing atomic as well, in accordance with the spec [1]. [1] https://www.w3.org/TR/css-flexbox-1/#painting Bug: 844505 Change-Id: Iceab80b42f19488dcb59565ea3c0ce40d48c483b
1 parent f3cbe03
touch-retargeting.html
<!DOCTYPE HTML>
<html>
<head>
<title>TouchEvent Retargeting Tests</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
</head>
<body>
<div id="host0"></div>
<div id="host1"></div>
<script>
var host0 = document.getElementById('host0');
var root0 = host0.attachShadow({ mode: 'open' });
var target0 = document.createElement('div');
root0.appendChild(target0);
var host1 = document.getElementById('host1');
var root1 = host1.attachShadow({ mode: 'open' });
var target1 = document.createElement('div');
root1.appendChild(target1);
async_test(function(t) {
var touch0 = new Touch({
identifier: 0,
target: target0,
});
var touch1 = new Touch({
identifier: 1,
target: target1,
});
var touchEvent = new TouchEvent("touchstart", {
touches: [touch0, touch1],
targetTouches: [touch1],
changedTouches: [touch1],
});
target0.addEventListener('touchstart', t.step_func_done(function(e) {
assert_equals(e.touches.length, 2);
assert_equals(e.touches[0].target, target0);
assert_equals(e.touches[1].target, host1);
assert_equals(e.targetTouches.length, 1);
assert_equals(e.targetTouches[0].target, host1);
assert_equals(e.changedTouches.length, 1);
assert_equals(e.changedTouches[0].target, host1);
}));
target0.dispatchEvent(touchEvent, { composed: true });
}, "TouchEvent's touches, targetTouches, and changedTouches should be retargeted.");
</script>
</body>
</html>
![swh spinner](/static/img/swh-spinner.gif)
Computing file changes ...