Bug 16019 - :after pseudo-elements inserted twice
Summary: :after pseudo-elements inserted twice
Status: RESOLVED CONFIGURATION CHANGED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: 528+ (Nightly build)
Hardware: Mac OS X 10.4
: P2 Normal
Assignee: Dave Hyatt
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-11-16 14:07 PST by kennyt
Modified: 2023-02-25 08:02 PST (History)
7 users (show)

See Also:


Attachments
test case (852 bytes, application/xhtml+xml)
2007-11-16 14:08 PST, kennyt
no flags Details
Patch (will land testcase in bug as regression test) (1.23 KB, patch)
2009-02-15 18:28 PST, Dave Hyatt
hyatt: review-
Details | Formatted Diff | Diff
Another test case (1.74 KB, text/html)
2009-02-16 02:59 PST, Michael A. Puls II
no flags Details
Yet another simple test case (270 bytes, text/html)
2009-05-20 18:38 PDT, Roland Steiner
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description kennyt 2007-11-16 14:07:13 PST
div:after content is drawn after the first child of the element to which it's attached instead of after the last child node of that element.

- latest Safari 2, Safari 3 (10.4.11), and WebKit nightly
Comment 1 kennyt 2007-11-16 14:08:54 PST
Created attachment 17318 [details]
test case

Safari draws the :after content after the first child (#nav) instead of at the end of the #main element (after the <p/>).
Comment 2 Dave Hyatt 2007-11-25 15:19:11 PST
Actually it looks like in this test case it's an extra piece of generated content.  I imagine some incremental update fails to find/remove the old generated content for some reason, so you end up with two.

Comment 3 Dave Hyatt 2009-02-15 18:28:20 PST
Created attachment 27686 [details]
Patch (will land testcase in bug as regression test)
Comment 4 Dave Hyatt 2009-02-15 19:46:05 PST
Comment on attachment 27686 [details]
Patch (will land testcase in bug as regression test)

This isn't quite right.
Comment 5 Michael A. Puls II 2009-02-16 02:59:04 PST
Created attachment 27690 [details]
Another test case

Ran into an example of this bug in WebKit-SVN-r40994.

</test> and </expected_field_values> are showing up in the wrong places in Webkit compared to Presto and Gecko.
Comment 6 Roland Steiner 2009-05-20 18:38:53 PDT
Created attachment 30518 [details]
Yet another simple test case
Comment 7 Valters Švābe 2010-03-17 01:29:53 PDT
Both issues - the incorrect placement and (sometimes) duplication - have been resolved. The first one in r56033 and the second - some time earlier.

Currently all of the attached test cases render correctly, so I'm proposing to mark this bug as resolved.
Comment 8 Michael A. Puls II 2010-03-17 07:38:53 PDT
(In reply to comment #7)
> Both issues - the incorrect placement and (sometimes) duplication - have been
> resolved. The first one in r56033 and the second - some time earlier.
> 
> Currently all of the attached test cases render correctly, so I'm proposing to
> mark this bug as resolved.

I can't confirm that <https://bug-16019-attachments.webkit.org/attachment.cgi?id=27690> is fixed ("</test>" is in the wrong spot) with the latest win32 nightly 55974. However, webkit.exe often just loads safari without actually using the nightly files, so I'm not 100% it's not fixed.
Comment 9 Valters Švābe 2010-03-17 08:28:54 PDT
> I can't confirm that
> <https://bug-16019-attachments.webkit.org/attachment.cgi?id=27690> is fixed
> ("</test>" is in the wrong spot) with the latest win32 nightly 55974. However,
> webkit.exe often just loads safari without actually using the nightly files, so
> I'm not 100% it's not fixed.

The incorrect placement of ":after" generated content was fixed in 56033, so the version you are using is not recent enough.
Comment 10 Ahmad Saleem 2023-02-24 15:25:36 PST
I am not able to reproduce this bug in Safari 16.3 and STP 164 using "Yet Another simple test case", where all other browsers (Chrome Canary 112 and Firefox Nightly 112) match with Safari.

Marking this "RESOLVED CONFIGURATION CHANGED". CCing others for any other input. Thanks!
Comment 11 zalan 2023-02-25 08:02:09 PST
Yeah, this looks to be fixed. Thank you for testing!