Closed Bug 420814 Opened 16 years ago Closed 16 years ago

selector "A ~ B C" matches greedily instead of nondeterministically

Categories

(Core :: CSS Parsing and Computation, defect)

defect
Not set
normal

Tracking

()

VERIFIED FIXED
mozilla1.9beta5

People

(Reporter: dbaron, Assigned: dbaron)

References

Details

(Keywords: testcase)

Attachments

(2 files, 1 obsolete file)

Attached file simplified testcase
This was found in test 42 on acid3.  Selectors of the form "A ~ B C" match greedily when they should be nondeterministic.  Patch should be trivial.
Attached patch patch (obsolete) — Splinter Review
Assignee: nobody → dbaron
Status: NEW → ASSIGNED
Attachment #307169 - Flags: superreview?(bzbarsky)
Attachment #307169 - Flags: review?(bzbarsky)
Comment on attachment 307169 [details] [diff] [review]
patch

>+<p id="display"><iframe id="iframe" src="empty.html"></iframe></p>

Why not just leave off the src attribute and test in the about:blank document?

Either way, run the test off a load event?

r+sr=bzbarsky with that.
Attachment #307169 - Flags: superreview?(bzbarsky)
Attachment #307169 - Flags: superreview+
Attachment #307169 - Flags: review?(bzbarsky)
Attachment #307169 - Flags: review+
tested and works, and parity with opera.
Attached patch patchSplinter Review
This addresses Boris's review comments.

As to why I was working on this in the first place: I was scared that the failure of test 42 on acid3 meant something was fundamentally wrong with the patch I wrote a few weeks ago.  Once I figured out that that wasn't the case, this was trivial to fix.  Low risk, gets us another point on acid3.
Attachment #307169 - Attachment is obsolete: true
Attachment #307172 - Flags: approval1.9?
Comment on attachment 307172 [details] [diff] [review]
patch

a1.9=beltzner
Attachment #307172 - Flags: approval1.9? → approval1.9+
Checked in to trunk, 2008-03-05 16:06 -0800.
Status: ASSIGNED → RESOLVED
Closed: 16 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9beta5
verified fixed using Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9b5pre) Gecko/2008030704 Minefield/3.0b5pre, using the test case in the bug.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: