Fix for 3800316, test 37 for tables is failing on the layout tests. Make sure we...
authorhyatt <hyatt@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 24 Sep 2004 22:14:45 +0000 (22:14 +0000)
committerhyatt <hyatt@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 24 Sep 2004 22:14:45 +0000 (22:14 +0000)
non-HTML elements with HTML tag selectors in CSS.

        Reviewed by rjw

        * khtml/css/cssstyleselector.cpp:
        (khtml::CSSStyleSelector::checkOneSelector):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7676 268f45cc-cd09-0410-ab3c-d52691b4dbfc

WebCore/ChangeLog-2005-08-23
WebCore/khtml/css/cssstyleselector.cpp

index 8a2d4bcafa38bf75ce51c229d2f7d32f205df10a..497b39f5b52eee57007629a48e6b5f5bd7f694b6 100644 (file)
@@ -1,3 +1,13 @@
+2004-09-24  David Hyatt  <hyatt@apple.com>
+
+       Fix for 3800316, test 37 for tables is failing on the layout tests.  Make sure we don't incorrectly match
+       non-HTML elements with HTML tag selectors in CSS.
+       
+        Reviewed by rjw
+
+        * khtml/css/cssstyleselector.cpp:
+        (khtml::CSSStyleSelector::checkOneSelector):
+
 2004-09-23  David Hyatt  <hyatt@apple.com>
 
        Fix for 3601920, CSS "tabs" not switching properly on zen garden design.  Improve the repainting to account
index 65c2e98b18de0a2013047d0c95866accfc7753a5..76647b85ac86cc6cddeab086d3cddbb60274652b 100644 (file)
@@ -1048,8 +1048,9 @@ bool CSSStyleSelector::checkOneSelector(DOM::CSSSelector *sel, DOM::ElementImpl
         Q_UINT16 selLocalName = localNamePart(sel->tag);
         Q_UINT16 selNS = namespacePart(sel->tag);
         
-        if (selNS == xhtmlNamespace && localName < ID_LAST_TAG)
-            selNS = anyNamespace; // Always match HTML elements even when in HTML docs.
+        if (localName < ID_LAST_TAG && e->isHTMLElement())
+            ns = xhtmlNamespace; // FIXME: Really want to move away from this complicated hackery and just
+                                 // switch tags and attr names over to AtomicStrings.
         
         if ((selLocalName != anyLocalName && localName != selLocalName) ||
             (selNS != anyNamespace && ns != selNS))