Skip to content

Commit

Permalink
Reland "Rename CSS scroll-boundary-behavior to overscroll-behavior"
Browse files Browse the repository at this point in the history
This is a reland of 74e8a0f74fc589a58258655f59aa7f1efa666155
The only change is in  third_party/WebKit/Source/core/BUILD.gn
where an outdated generated file was updated with a new name.

Original change's description:
> Rename CSS scroll-boundary-behavior to overscroll-behavior
>
> The name change was decided here [1].
>
> This is the minimal patch to change the publicly exposed CSS property.
> It is intentionally small to make it easier to merge with M63. So,
> internally Blink and content still use ScrollBoundaryBehavior name which will
> be updated in the follow up patch larger patch.
>
>
> [1] https://github.com/WICG/scroll-boundary-behavior/issues/24
>
> Bug: 776776
> Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
> Change-Id: Iaa6ad62253ed7fe9ed7f0ee9865ffda852b17801
> Reviewed-on: https://chromium-review.googlesource.com/737090
> Reviewed-by: Dimitri Glazkov <dglazkov@chromium.org>
> Reviewed-by: Sandra Sun <sunyunjia@chromium.org>
> Commit-Queue: Majid Valipour <majidvp@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#511493}

Bug: 776776
TBR: dglazkov, pdr
Change-Id: If9198d1eb0c7d0a4a4955a40e03e456f21275589
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
  • Loading branch information
majido authored and chromium-wpt-export-bot committed Oct 25, 2017
1 parent 15b0fb3 commit a236476
Showing 1 changed file with 15 additions and 15 deletions.
Expand Up @@ -41,8 +41,8 @@
</div>
</div>
<input type="button" id="btnDone" value="DONE" style="width: 100px; height: 50px;"/>
<h1>scroll-boundary-behavior</h1>
<h4>Tests that scroll-boundary-behavior prevents scroll-propagation in the area and direction as specified.</h4>
<h1>overscroll-behavior</h1>
<h4>Tests that overscroll-behavior prevents scroll-propagation in the area and direction as specified.</h4>
<ol>
<li id="i1">Make two scrolls on <span style="color: blue">BLUE</span>, in this order: scroll UP (or drag down), then scroll LEFT (or drag right). Scroll (or drag) until nothing is scrolling. Then tap on DONE.</li>
<li id="i2">Repeat the same scrolls as in step 1 and then tap on DONE.</li>
Expand All @@ -55,7 +55,7 @@ <h4>Tests that scroll-boundary-behavior prevents scroll-propagation in the area
const container = document.getElementById('container');
const non_scrollable = document.getElementById('non_scrollable');
const root = document.getElementById('root');
var test = async_test("scroll-boundary-behavior prevents scroll-propagation in the area and direction as specified");
var test = async_test("overscroll-behavior prevents scroll-propagation in the area and direction as specified");
var instruction1 = document.getElementById("i1");
var instruction2 = document.getElementById("i2");
var instruction3 = document.getElementById("i3");
Expand All @@ -74,8 +74,8 @@ <h4>Tests that scroll-boundary-behavior prevents scroll-propagation in the area
function set_boundary_prevents_y() {
instruction1.style.color = 'red';
instruction1.style.fontWeight = 'bold';
container.style.scrollBoundaryBehaviorX = 'auto';
container.style.scrollBoundaryBehaviorY = 'none';
container.style.overscrollBehaviorX = 'auto';
container.style.overscrollBehaviorY = 'none';
setUpForRoot(100);
setUpForContainer(0);
}
Expand All @@ -86,10 +86,10 @@ <h4>Tests that scroll-boundary-behavior prevents scroll-propagation in the area
test.step(function() {
assert_equals(root.scrollTop, 100);
assert_equals(root.scrollLeft, 0);
}, "scroll-boundary-behavior-y: none should only prevent scroll propagation on y axis.");
}, "overscroll-behavior-y: none should only prevent scroll propagation on y axis.");

container.style.scrollBoundaryBehaviorX = 'none';
container.style.scrollBoundaryBehaviorY = 'auto';
container.style.overscrollBehaviorX = 'none';
container.style.overscrollBehaviorY = 'auto';
setUpForRoot(100);
setUpForContainer(0);
}
Expand All @@ -100,10 +100,10 @@ <h4>Tests that scroll-boundary-behavior prevents scroll-propagation in the area
test.step(function() {
assert_equals(root.scrollTop, 0);
assert_equals(root.scrollLeft, 100);
}, "scroll-boundary-behavior-x: none should only prevent scroll propagation on x axis.");
}, "overscroll-behavior-x: none should only prevent scroll propagation on x axis.");

container.style.scrollBoundaryBehaviorX = 'none';
container.style.scrollBoundaryBehaviorY = 'none';
container.style.overscrollBehaviorX = 'none';
container.style.overscrollBehaviorY = 'none';
setUpForRoot(100);
setUpForContainer(100);
}
Expand All @@ -118,18 +118,18 @@ <h4>Tests that scroll-boundary-behavior prevents scroll-propagation in the area
assert_equals(container.scrollLeft, 0);
assert_equals(root.scrollTop, 100);
assert_equals(root.scrollLeft, 100);
}, "scroll-boundary-behavior should latch the scroll to the inner container.");
}, "overscroll-behavior should latch the scroll to the inner container.");

non_scrollable.style.scrollBoundaryBehaviorX = 'none';
non_scrollable.style.scrollBoundaryBehaviorY = 'none';
non_scrollable.style.overscrollBehaviorX = 'none';
non_scrollable.style.overscrollBehaviorY = 'none';
setUpForRoot(100);
}

function verify_non_scrollable_allows_propagation() {
test.step(function() {
assert_equals(root.scrollLeft, 0);
assert_equals(root.scrollTop, 0);
}, "scroll-boundary-behavior on non-scrollable area should not affect scroll propagation.");
}, "overscroll-behavior on non-scrollable area should not affect scroll propagation.");
test.done();
}

Expand Down

0 comments on commit a236476

Please sign in to comment.