-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for overscroll-behavior logical longhands
Flow relative longhands have been added to overscroll-behavior specification [1]. This CL implements the relevant css parsing and matching tests. minor change: collapse all overscrollBehavior related case statements in parser fast path. intent-to-ship: https://groups.google.com/a/chromium.org/d/msg/blink-dev/V86fOkIaEQA/JydSaafqBwAJ [1] https://drafts.csswg.org/css-overscroll-behavior-1/#overscroll-behavior-longhands-logical TESTS: wpt/css/css-overscroll-behavior/ovescroll-behavior-logical.html, wpt/css/css-overscroll-behavior/parsing/* Bug: 833953 Change-Id: I5ceefa0afb1913472c0e134b2ec07405154abfae
- Loading branch information
1 parent
9e1ff30
commit 38e8c30
Showing
4 changed files
with
54 additions
and
3 deletions.
There are no files selected for viewing
49 changes: 49 additions & 0 deletions
49
css/css-overscroll-behavior/overscroll-behavior-logical.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
<!DOCTYPE html> | ||
<meta charset="utf-8"> | ||
<title>Test flow-relative versions of overscroll-behavior properties</title> | ||
<link rel="author" title="Majid Valipour"> | ||
<link rel="help" href="https://drafts.csswg.org/css-overscroll-behavior-1/#overscroll-behavior-longhands-logical"> | ||
<link rel="help" href="https://drafts.csswg.org/css-logical/#box"> | ||
<script src="/resources/testharness.js"></script> | ||
<script src="/resources/testharnessreport.js"></script> | ||
<style> | ||
div { | ||
overscroll-behavior-block: contain; | ||
overscroll-behavior-inline: none; | ||
} | ||
#horizontal { | ||
writing-mode: horizontal-tb; | ||
} | ||
#vertical { | ||
writing-mode: vertical-rl; | ||
} | ||
#horizontalreversed { | ||
writing-mode: horizontal-tb; | ||
direction: rtl; | ||
} | ||
</style> | ||
<body> | ||
<div id="horizontal"></div> | ||
<div id="vertical"></div> | ||
<div id="horizontalreversed"></div> | ||
</body> | ||
|
||
<script> | ||
test(function() { | ||
var element = document.getElementById("horizontal"); | ||
assert_equals(getComputedStyle(element).overscrollBehaviorX, "none"); | ||
assert_equals(getComputedStyle(element).overscrollBehaviorY, "contain"); | ||
}, "Logical overscroll-behavior maps correctly when element has horizontal-tb writing mode"); | ||
|
||
test(function() { | ||
var element = document.getElementById("vertical"); | ||
assert_equals(getComputedStyle(element).overscrollBehaviorX, "contain"); | ||
assert_equals(getComputedStyle(element).overscrollBehaviorY, "none"); | ||
}, "Logical overscroll-behavior maps correctly when element has vertical-rl writing mode"); | ||
|
||
test(function() { | ||
var element = document.getElementById("horizontalreversed"); | ||
assert_equals(getComputedStyle(element).overscrollBehaviorX, "none"); | ||
assert_equals(getComputedStyle(element).overscrollBehaviorY, "contain"); | ||
}, "Logical overscroll-behavior maps correctly when element has horizontal-tb writing mode and is not affected by rtl direction"); | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters