WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
87349
REGRESSION(
r96517
): Attribute selector fails to match dynamically modified style attribute
https://bugs.webkit.org/show_bug.cgi?id=87349
Summary
REGRESSION(r96517): Attribute selector fails to match dynamically modified st...
Mike Lawther
Reported
2012-05-24 00:03:34 PDT
As reported in at
http://crbug.com/127655
Attached is a not-quite-minimal repro of a selector not working ('#container > div[style] img[border="0"]'). I've bisected it down to between 96490 and 96521, and 96517 seems most likely within that range. The original reporter also notes that in his live site (
http://winfuture.de
): - open console - type document.querySelector('#container > div[style] img[border="0"]') -> you get NULL - type document.querySelector('img[border="0"]') -> you get the first element - type document.querySelector('#container > div[style] img[border="0"]') -> you get the first element It looks like the second line does something to a cache somewhere so the querySelector works the second time. I tried to repro this with a simple static page, but could not. It appears important that the elements are added dynamically.
Attachments
repro
(2.90 KB, text/html)
2012-05-24 00:04 PDT
,
Mike Lawther
no flags
Details
minimal repro
(1.16 KB, text/html)
2012-05-24 16:22 PDT
,
Mike Lawther
no flags
Details
patch
(3.87 KB, patch)
2012-05-28 09:02 PDT
,
Antti Koivisto
kling
: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Mike Lawther
Comment 1
2012-05-24 00:04:19 PDT
Created
attachment 143749
[details]
repro
Mike Lawther
Comment 2
2012-05-24 16:22:18 PDT
Created
attachment 143916
[details]
minimal repro Here is a minimal repro, courtesy of geki007 (from the original crbug report).
Antti Koivisto
Comment 3
2012-05-28 09:02:07 PDT
Created
attachment 144374
[details]
patch Thanks for the repro!
Andreas Kling
Comment 4
2012-05-28 09:09:05 PDT
Comment on
attachment 144374
[details]
patch View in context:
https://bugs.webkit.org/attachment.cgi?id=144374&action=review
> Source/WebCore/css/SelectorChecker.cpp:407 > + // Style attribute is generated lazily but the fast path doesn't do trigger that.
This comment doesn't do English :(
> LayoutTests/fast/css/dynamic-style-attribute-query.html:12 > +document.addEventListener("DOMContentLoaded", test , false);
Silly space after 'test'.
Andreas Kling
Comment 5
2012-05-28 09:10:15 PDT
Funny problem btw! r=me, etc.
Antti Koivisto
Comment 6
2012-05-28 09:22:34 PDT
http://trac.webkit.org/changeset/118688
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug