Title: [104440] trunk/Source/WebCore
Revision
104440
Author
[email protected]
Date
2012-01-09 00:42:44 -0800 (Mon, 09 Jan 2012)

Log Message

CSSStyleSelector: Any attribute with a decl() can be assumed to be mapped.
<http://webkit.org/b/75832>

Reviewed by Antti Koivisto.

Replace isMappedAttribute() check with an assertion. Only a mapped attribute
will have an associated style declaration.

* css/CSSStyleSelector.cpp:
(WebCore::CSSStyleSelector::matchAllRules):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (104439 => 104440)


--- trunk/Source/WebCore/ChangeLog	2012-01-09 08:32:48 UTC (rev 104439)
+++ trunk/Source/WebCore/ChangeLog	2012-01-09 08:42:44 UTC (rev 104440)
@@ -1,3 +1,16 @@
+2012-01-09  Andreas Kling  <[email protected]>
+
+        CSSStyleSelector: Any attribute with a decl() can be assumed to be mapped.
+        <http://webkit.org/b/75832>
+
+        Reviewed by Antti Koivisto.
+
+        Replace isMappedAttribute() check with an assertion. Only a mapped attribute
+        will have an associated style declaration.
+
+        * css/CSSStyleSelector.cpp:
+        (WebCore::CSSStyleSelector::matchAllRules):
+
 2012-01-09  Kentaro Hara  <[email protected]>
 
         [Refactoring] Use join(", ", @arguments) to build a method argument

Modified: trunk/Source/WebCore/css/CSSStyleSelector.cpp (104439 => 104440)


--- trunk/Source/WebCore/css/CSSStyleSelector.cpp	2012-01-09 08:32:48 UTC (rev 104439)
+++ trunk/Source/WebCore/css/CSSStyleSelector.cpp	2012-01-09 08:42:44 UTC (rev 104440)
@@ -815,7 +815,8 @@
             const NamedNodeMap* map = m_styledElement->attributeMap();
             for (unsigned i = 0; i < map->length(); ++i) {
                 Attribute* attr = map->attributeItem(i);
-                if (attr->isMappedAttribute() && attr->decl()) {
+                if (attr->decl()) {
+                    ASSERT(attr->isMappedAttribute());
                     result.lastAuthorRule = m_matchedDecls.size();
                     if (result.firstAuthorRule == -1)
                         result.firstAuthorRule = result.lastAuthorRule;
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to