Bug 53574

Summary: REGRESSION (r76012): :last-child:after not working as expected
Product: WebKit Reporter: Darth <priyajeet.hora>
Component: CSSAssignee: Antti Koivisto <koivisto>
Status: RESOLVED FIXED    
Severity: Normal CC: aestes, dglazkov, hyatt, koivisto, priyajeet.hora, simon.fraser
Priority: P2 Keywords: HasReduction, InRadar, Regression
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Bug Depends on: 52370    
Bug Blocks:    
Attachments:
Description Flags
testcase
none
patch dglazkov: review+

Description Darth 2011-02-01 21:52:13 PST
Created attachment 80888 [details]
testcase

Downstream bug: http://code.google.com/p/chromium/issues/detail?id=71213
Test case attached.
Expected:

*1X
*2X
*3

Actual

*1X
*2X
*3X

Happens in r77333 of webkit nightly, seems fine in r77224.


<!DOCTYPE html>
  <html>
    <head>
      <title>:last-child:after</title>
      <style>
        li:after {
          content:"X";
        }
    
        li:last-child:after{
          content:"";
        }
      </style>
    </head>
    <body>
      <ul>
        <li>1</li>
        <li>2</li>
        <li>3</li>
      </ul>
    </body>
  </html>
Comment 1 Alexey Proskuryakov 2011-02-02 09:15:00 PST
<rdar://problem/8948643>
Comment 2 Andy Estes 2011-02-02 11:09:58 PST
Caused by <http://trac.webkit.org/changeset/76012>.
Comment 3 Dimitri Glazkov (Google) 2011-02-04 10:27:31 PST
Here's another reduction:

http://jsfiddle.net/dglazkov/NmKkQ/

Should display 1234.
Comment 4 Antti Koivisto 2011-02-04 13:08:44 PST
Created attachment 81274 [details]
patch
Comment 5 Dimitri Glazkov (Google) 2011-02-04 13:10:15 PST
Comment on attachment 81274 [details]
patch

yay!
Comment 6 Antti Koivisto 2011-02-04 13:11:57 PST
also fixes Bug 53610
Comment 7 Antti Koivisto 2011-02-04 13:17:27 PST
http://trac.webkit.org/changeset/77664