<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>11385</bug_id>
          
          <creation_ts>2006-10-23 02:56:02 -0700</creation_ts>
          <short_desc>CSS: :last-of-type selector is applied to all elements</short_desc>
          <delta_ts>2007-01-12 09:58:59 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>CSS</component>
          <version>420+</version>
          <rep_platform>Mac</rep_platform>
          <op_sys>OS X 10.4</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>5468</dup_id>
          
          <bug_file_loc>http://www.css3.info/selectors-test/</bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>0</everconfirmed>
          <reporter name="Niels Leenheer (HTML5test)">info</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>51171</commentid>
    <comment_count>0</comment_count>
    <who name="Niels Leenheer (HTML5test)">info</who>
    <bug_when>2006-10-23 02:56:02 -0700</bug_when>
    <thetext>Current behavoir:
The :last-of-type selector matches every element.

Reason:
The reason for this is that every time a new element is added to the DOM, it is checked to see if it matches one of the CSS selectors. Because the DOM is build one element at a time, every element is at least once the last element of a certain type. 

Proper behavoir:
The selector should only match elements that are *really* the last of a certain type. Once an element is no longer the last of a certain type, it should no longer match the :last-of-type selector.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>44943</commentid>
    <comment_count>1</comment_count>
    <who name="Nicholas Shanks">nickshanks</who>
    <bug_when>2006-11-20 16:17:42 -0800</bug_when>
    <thetext>

*** This bug has been marked as a duplicate of 5468 ***</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>