Revision 15b0fb362111166b6d279074071e27dbae6aee37 authored by Majid Valipour on 25 October 2017, 18:18:27 UTC, committed by Blink WPT Bot on 25 October 2017, 18:28:47 UTC
This reverts commit 74e8a0f74fc589a58258655f59aa7f1efa666155.

Reason for revert: This caused an issue on Linux64 no-op build.
Bug: 778310

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}

TBR=majidvp@chromium.org,sunyunjia@chromium.org,dglazkov@chromium.org

Change-Id: I1d71b71c5d3c263fb2ff13c9d7a9184399df946f
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 776776
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Reviewed-on: https://chromium-review.googlesource.com/738294
Reviewed-by: Majid Valipour <majidvp@chromium.org>
Commit-Queue: Majid Valipour <majidvp@chromium.org>
Cr-Commit-Position: refs/heads/master@{#511515}
1 parent 511cb08
Raw File
html-collection.html
<!DOCTYPE html>
<html>
<head>
<meta name='author' title='Google' href='http://www.google.com'>
<meta name='assert' content='document attributes that returns HTMLCollection should not expose nodes in shadow tree.'>
<link rel='help' href='https://w3c.github.io/webcomponents/spec/shadow/'>
<script src='/resources/testharness.js'></script>
<script src='/resources/testharnessreport.js'></script>
</head>
<body>
<template id='collection-template'>
  <img>
  <embed></embed>
  <applet></applet>
  <object type='application/x-java-applet'></object>
  <a href='http://example.com'></a>
  <a name='test'></a>
  <form name='test'></form>
  <script></script>
</template>
<div id='doc'></div>
<div id='host-open'></div>
<div id='host-closed'></div>
</body>
<script>
'use strict';

function fillTemplate(root, prefix) {
    var tmpl = document.getElementById('collection-template');
    root.appendChild(document.importNode(tmpl.content, true));
    for (var i = 0; i < root.childNodes.length; ++i) {
	var el = root.childNodes[i];
	if (el.nodeType != 1)
	    continue;
	el.id = prefix + el.tagName.toLowerCase();
    }
}

// Construct subtree with 'doc-*' ids.
var doc = document.getElementById('doc');
fillTemplate(doc, 'doc-');

// Construct shadow subtree with 'shadow-*' ids.
var host = document.getElementById('host-open');
var shadow = host.attachShadow({mode: 'open'});
fillTemplate(shadow, 'shadow-open-');

host = document.getElementById('host-closed');
shadow = host.attachShadow({mode: 'closed'});
fillTemplate(shadow, 'shadow-closed-');

function testCollection(collection) {
    var elements = document[collection];
    assert_greater_than(elements.length, 0, 'document.' + collection + ' should have at least 1 element.');
    for (var i = 0; i < elements.length; ++i) {
        if (elements[i].id) {
            assert_equals(elements[i].id.indexOf('shadow-'), -1, 'document.' + collection + ' should not contain elements in shadow tree.');
        }
    }
}

var testParams = [
    ['document.scripts should not contain shadow nodes', 'scripts'],
    ['document.all should not contain shadow nodes', 'all'],
    ['document.forms should not contain shadow nodes', 'forms'],
    ['document.images should not contain shadow nodes', 'images'],
    ['document.links should not contain shadow nodes', 'links'],
    ['document.anchors should not contain shadow nodes', 'anchors'],
    ['document.embeds should not contain shadow nodes', 'embeds'],
    ['document.plugins should not contain shadow nodes', 'plugins'],
    ['document.applets should not contain shadow nodes', 'applets']];

generate_tests(testCollection, testParams);

</script>
</html>
back to top