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
onerror-event.html
<!DOCTYPE html>
<html>
<head></head>
<body>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/preload/resources/preload_helper.js"></script>
<script>
var t = async_test('Makes sure that preloaded resources trigger the onerror event');
var scriptFailed = false;
var styleFailed = false;
var imageFailed = false;
var fontFailed = false;
var videoFailed = false;
var audioFailed = false;
var trackFailed = false;
var gibberishFailed = false;
var fetchFailed = false;
var emptyFailed = false;
</script>
<link rel=preload href="non-existent/dummy.js" as=script onerror="scriptFailed = true;">
<link rel=preload href="non-existent/dummy.css" as=style onerror="styleFailed = true;">
<link rel=preload href="non-existent/square.png" as=image onerror="imageFailed = true;">
<link rel=preload href="non-existent/Ahem.ttf" as=font crossorigin onerror="fontFailed = true;">
<link rel=preload href="non-existent/test.mp4" as=video onerror="videoFailed = true;">
<link rel=preload href="non-existent/test.oga" as=audio onerror="audioFailed = true;">
<link rel=preload href="non-existent/security/captions.vtt" as=track onerror="trackFailed = true;">
<link rel=preload href="non-existent/dummy.xml?foo" as=foobarxmlthing onerror="gibberishFailed = true;">
<link rel=preload href="non-existent/dummy.xml?fetch" as=fetch onerror="fetchFailed = true;">
<link rel=preload href="non-existent/dummy.xml?empty" onerror="emptyFailed = true;">
<script src="resources/dummy.js?pipe=trickle(d5)&onerror-event"></script>
<script>
window.onload = t.step_func(function() {
verifyPreloadAndRTSupport();
assert_true(styleFailed, "style triggered error event");
assert_true(scriptFailed, "script triggered error event");
assert_true(imageFailed, "image triggered error event");
assert_true(fontFailed, "font triggered error event");
assert_true(videoFailed, "video triggered error event");
assert_true(audioFailed, "audio triggered error event");
assert_true(trackFailed, "track triggered error event");
assert_false(gibberishFailed, "gibberish as value did not trigger error event");
assert_true(fetchFailed, "fetch as triggered error event");
assert_false(emptyFailed, "empty as triggered error event");
t.done();
});
</script>
</body>
</html>
![swh spinner](/static/img/swh-spinner.gif)
Computing file changes ...