VERIFIED FIXED 3317
REGRESSION: CSS2: outline is applied to both <li> element and its enclosing text with context dependent selector
https://bugs.webkit.org/show_bug.cgi?id=3317
Summary REGRESSION: CSS2: outline is applied to both <li> element and its enclosing t...
Hanspeter Schaub
Reported 2005-06-07 16:11:23 PDT
Starting with Safary 1.3/2.0, I found that the CSS outline command appears to be applied twice when used on a list element. I'm using a hover command on the <ul> <li> element, and it used to cause the list entry to be highlighted with a outline when the mouse was over it. Starting with 1.3/2.0, now the outline is still there, but there is a 2nd, inner outline right around the text entry itself? This bug still seems to be there in the latest build I tried today. thanks, Hanspeter Schaub
Attachments
Reduced test case (416 bytes, text/html)
2005-06-08 21:47 PDT, Chris Petersen
no flags
simple test case to see "outline" error with lists (548 bytes, text/html)
2005-06-09 13:31 PDT, Hanspeter Schaub
no flags
proposed patch (855 bytes, patch)
2005-06-18 12:28 PDT, Hanspeter Schaub
hyatt: review-
list outline regression test (395 bytes, text/html)
2005-06-18 12:30 PDT, Hanspeter Schaub
no flags
Actual behavior (47.86 KB, image/png)
2005-06-19 12:03 PDT, David Kilzer (:ddkilzer)
no flags
Expected behavior (47.74 KB, image/png)
2005-06-19 12:04 PDT, David Kilzer (:ddkilzer)
no flags
fixes the issue where the outline is applied to the list text element (987 bytes, patch)
2005-06-22 17:04 PDT, Hanspeter Schaub
hyatt: review+
minor revision to patch, removed space between closing parentheses (986 bytes, patch)
2005-06-26 19:46 PDT, Hanspeter Schaub
hyatt: review+
Nicholas Shanks
Comment 1 2005-06-07 16:58:34 PDT
Could you please post a public URL or attach the "conferences.html" file to this bug - we are unable to see what's on your private iDisk !
Chris Petersen
Comment 2 2005-06-08 21:45:27 PDT
I have reduced the page to a simple text case that reproduces the problem. The test case contains a simple ordered list uses class='test': <ol class="test"> <li> OL element with a single child LI element </li> </ol> A CSS rule is applied to the OL: ol.test li:hover { outline: dashed; padding:0.5em; } The problem occurs when padding is specified (padding: 0.5em) If you open the test case "outline_sample.html" and hover over the OL, both the OL and LI appear with a dashed outline. If padding is removed, this issue will no longer reproduce. Under Firefox 1.0.4 , this test case is rendered with just the outline for the OL.
Chris Petersen
Comment 3 2005-06-08 21:47:42 PDT
Created attachment 2167 [details] Reduced test case
Hanspeter Schaub
Comment 4 2005-06-09 13:31:07 PDT
Created attachment 2188 [details] simple test case to see "outline" error with lists
Hanspeter Schaub
Comment 5 2005-06-18 12:28:23 PDT
Created attachment 2463 [details] proposed patch I found that the code in renderflow.cpp was causing the erroneous outline to be drawn on the list elements. In this patch I simply commented out the old code. Please not, I'm not a professional programmer, but an engineer :-) I found this fix by searching through the code for anything related to drawing outlines and testing those code sections. I did run the regression test and the modified code passes all the test.
Hanspeter Schaub
Comment 6 2005-06-18 12:30:28 PDT
Created attachment 2464 [details] list outline regression test This is the regression test for the proposed patch. It shows a simple unordered list with the outline applied to the list element. If the test is successful, then a single outline should appear over the list element. If the browser fails, then two outlines are visible.
David Kilzer (:ddkilzer)
Comment 7 2005-06-19 12:03:13 PDT
Created attachment 2474 [details] Actual behavior
David Kilzer (:ddkilzer)
Comment 8 2005-06-19 12:04:38 PDT
Created attachment 2475 [details] Expected behavior Expected behavior (seen after patch in Attachment 2463 [details] is applied).
David Kilzer (:ddkilzer)
Comment 9 2005-06-19 12:32:54 PDT
After looking into this bug, it appears that the outline property is being applied to both the <li> element as well as its enclosing text. Updated title to reflect this.
David Kilzer (:ddkilzer)
Comment 10 2005-06-19 12:33:59 PDT
See also Bug 3611 for another outline property issue.
Dave Hyatt
Comment 11 2005-06-19 21:41:30 PDT
Comment on attachment 2463 [details] proposed patch This patch is incorrect and will break all non-auto outline styles on inlines. The real bug occurs in render_line.cpp around line 754. Root lines should not be adding their block objects to the outlineObjects dict.
Hanspeter Schaub
Comment 12 2005-06-22 17:04:37 PDT
Created attachment 2559 [details] fixes the issue where the outline is applied to the list text element Following Dave Hyatt's suggestion, I added a check to render_line.cpp (line 754) to check that the object is not a root object. The previously supplied regression test case renders properly, and running run-webkit-tests passes all previous tests.
Dave Hyatt
Comment 13 2005-06-25 13:11:47 PDT
+ is not what you should set. ? is how you ask for review. + means the patch received review.
Darin Adler
Comment 14 2005-06-26 16:49:32 PDT
Comment on attachment 2559 [details] fixes the issue where the outline is applied to the list text element Dave Hyatt should be the one to review this.
Dave Hyatt
Comment 15 2005-06-26 17:45:12 PDT
Comment on attachment 2559 [details] fixes the issue where the outline is applied to the list text element Style is wrong. Make sure to remove the extra space between the two close parentheses. Other than that, r=me.
Hanspeter Schaub
Comment 16 2005-06-26 19:46:57 PDT
Created attachment 2661 [details] minor revision to patch, removed space between closing parentheses fixes a small style error in the earlier patch. The space between the two closing parentheses has been removed in this version.
Dave Hyatt
Comment 17 2005-06-26 19:51:22 PDT
Comment on attachment 2661 [details] minor revision to patch, removed space between closing parentheses r=me
Note You need to log in before you can comment on or make changes to this bug.