[Webkit-unassigned] [Bug 100451] New: [Shadow DOM]: If DOM element affecting distribution changed, the distribution don't reoccur

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Oct 25 21:00:13 PDT 2012


https://bugs.webkit.org/show_bug.cgi?id=100451

           Summary: [Shadow DOM]: If DOM element affecting distribution
                    changed, the distribution don't reoccur
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: Unspecified
        OS/Version: Unspecified
            Status: UNCONFIRMED
          Severity: Normal
          Priority: P2
         Component: HTML DOM
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: sgrekhov at unipro.ru


Found in Chrome  22.0.1229.94 m

The following test (in fact rewritten Bob-developer example from Shadow DOM spec) fails:

    var iframe = document.createElement('iframe');
    document.body.appendChild(iframe);


    iframe.contentDocument.body.innerHTML = "<ul class='stories'>" +
    "<li id='li1'><a href='#1'>Link1</a></li>" +
    "<li id='li2'><a href='#2'>Link 2</a></li>" +
    "<li id='li3' class='shadow'><a href='#3'>Link 3 Shadow</a></li>" +
    "<li id='li4'><a href='#4'>Link 4</a></li>" +
    "<li id='li5'><a href='#5'>Link 5</a></li>" +
    "<li id='li6' class='shadow'><a href='#5'>Link 6 Shadow</a></li>" +
      "</ul>";

var d = iframe.contentDocument;
var ul = d.querySelector("ul.stories");
var SR = window.ShadowRoot ||
         window.WebKitShadowRoot;  
var s = new SR(ul);

  //make shadow subtree  
  var subdiv1 = document.createElement('div');
  subdiv1.innerHTML = "<ul><content select='.shadow'></content></ul>";
  s.appendChild(subdiv1);

    assert_true(d.querySelector('#li3').offsetTop < d.querySelector('#li6').offsetTop,
        'Point 1: Elements that match insertion point criteria don\'t participate in distribution');
    assert_true(d.querySelector('#li3').offsetTop > 0,
        'Point 2: Elements that match insertion point criteria don\'t participate in distribution');
    assert_equals(d.querySelector('#li1').offsetTop, 0,
        'Point 3: Elements that don\'t match insertion point criteria participate in distribution');
    assert_equals(d.querySelector('#li2').offsetTop, 0,
        'Point 4: Elements that don\'t match insertion point criteria participate in distribution');
    assert_equals(d.querySelector('#li4').offsetTop, 0,
        'Point 5: Elements that don\'t match insertion point criteria participate in distribution');
    assert_equals(d.querySelector('#li5').offsetTop, 0,
        'Point 6: Elements that don\'t match insertion point criteria participate in distribution');

    var li5 = d.querySelector('#li5');
    li5.className = 'shadow';

    assert_true(li5.offsetTop > 0,
        'Distribution should reoccur if a variable affecting it is changed');

Class name of li5 was changed to the one that matches insertion point criteria, so the distribution should reoccur but it doesn't.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list