Bug 26539 - CSS sibling selector (~) does not work with :target pseudo class
Summary: CSS sibling selector (~) does not work with :target pseudo class
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: 528+ (Nightly build)
Hardware: Mac OS X 10.5
: P2 Normal
Assignee: Nobody
URL:
Keywords: HasReduction, InRadar
Depends on:
Blocks:
 
Reported: 2009-06-19 05:28 PDT by Teun
Modified: 2011-04-28 21:07 PDT (History)
11 users (show)

See Also:


Attachments
Testcase for the sibling and target css (435 bytes, text/html)
2009-06-19 05:28 PDT, Teun
no flags Details
A very detailed test case which provides testing directions for recreating the bug. (1.99 KB, text/html)
2009-08-25 11:28 PDT, Nathan Hammond
no flags Details
Updated test case to include a closely related scenario with the adjacent sibling combinator. (4.90 KB, text/html)
2009-08-25 16:34 PDT, Nathan Hammond
no flags Details
Patch. (10.01 KB, patch)
2011-01-03 09:34 PST, Yael
bdakin: review+
Details | Formatted Diff | Diff
Patch (10.04 KB, patch)
2011-04-28 16:56 PDT, Yael
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Teun 2009-06-19 05:28:02 PDT
A line of CSS that looks like this:

div:target~#second

Does not match a <div id="second"/> preceded by a <div id="first"/> with a document loaded with doc.html#first

although the ~ and the :target do work separately.
Comment 1 Teun 2009-06-19 05:28:47 PDT
Created attachment 31543 [details]
Testcase for the sibling and target css
Comment 2 Nathan Hammond 2009-08-25 11:28:05 PDT
Created attachment 38560 [details]
A very detailed test case which provides testing directions for recreating the bug.

I too just ran into this bug in the latest nightly (r47686) and have created a very detailed test case which provides testing directions for recreating the bug.
Comment 3 Mark Rowe (bdash) 2009-08-25 11:43:06 PDT
<rdar://problem/7168620>
Comment 4 Nathan Hammond 2009-08-25 16:34:05 PDT
Created attachment 38575 [details]
Updated test case to include a closely related scenario with the adjacent sibling combinator.

This bug appears to affect both sibling combinators. I've updated the test case to show the related issue as well. I believe that both issues should be part of this bug and we should rename it.
Comment 5 Stephanie Hobson 2010-04-18 21:00:17 PDT
This is related to Bug 12520
Comment 6 Yael 2011-01-03 09:34:55 PST
Created attachment 77813 [details]
Patch.

Allow style recalculation for forward siblings of elements that have a forward positional rule.
This will not change behavior or impact performance of pages that do not have forward positional riles.
Comment 7 Beth Dakin 2011-04-26 16:35:46 PDT
Comment on attachment 77813 [details]
Patch.

I was worried that this causes too much style-resolution, but I think it's okay.
Comment 8 Yael 2011-04-28 16:56:26 PDT
Created attachment 91592 [details]
Patch

Rebaseline
Comment 9 WebKit Commit Bot 2011-04-28 20:34:53 PDT
The commit-queue encountered the following flaky tests while processing attachment 91592 [details]:

http/tests/xmlhttprequest/failed-auth.html bug 51835 (author: ap@webkit.org)
The commit-queue is continuing to process your patch.
Comment 10 WebKit Commit Bot 2011-04-28 20:36:19 PDT
Comment on attachment 91592 [details]
Patch

Clearing flags on attachment: 91592

Committed r85296: <http://trac.webkit.org/changeset/85296>
Comment 11 WebKit Commit Bot 2011-04-28 20:36:26 PDT
All reviewed patches have been landed.  Closing bug.
Comment 12 WebKit Review Bot 2011-04-28 20:53:06 PDT
http://trac.webkit.org/changeset/85296 might have broken Windows 7 Release (Tests)
Comment 13 WebKit Commit Bot 2011-04-28 21:07:21 PDT
The commit-queue encountered the following flaky tests while processing attachment 91592 [details]:

http/tests/xmlhttprequest/basic-auth.html bug 51613 (authors: ap@webkit.org and eric@webkit.org)
http/tests/xmlhttprequest/xmlhttprequest-50ms-download-dispatch.html bug 52016 (author: jchaffraix@webkit.org)
The commit-queue is continuing to process your patch.