[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.15-1-40151-g37bb677

hyatt hyatt at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 06:25:11 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit f05fe32762a6ed76ae1880c819e53f3ccffdc5a2
Author: hyatt <hyatt at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Thu Jul 18 18:22:35 2002 +0000

            Small change that gives us 25% speedup (uncached) on the cvs-base suite.
    
            * khtml/css/cssstyleselector.cpp:
            Optimized CLASS style comparison to avoid allocing QStrings when the CLASS
            attribute only contains one entry (as opposed to a list of entries).
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@1589 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog-2002-12-03 b/WebCore/ChangeLog-2002-12-03
index f148ece..2d845ae 100644
--- a/WebCore/ChangeLog-2002-12-03
+++ b/WebCore/ChangeLog-2002-12-03
@@ -1,3 +1,11 @@
+2002-07-18  David Hyatt  <hyatt at apple.com>
+
+        Small change that gives us 25% speedup (uncached) on the cvs-base suite.
+
+        * khtml/css/cssstyleselector.cpp:
+        Optimized CLASS style comparison to avoid allocing QStrings when the CLASS
+        attribute only contains one entry (as opposed to a list of entries).
+        
 === Alexander-13 ===
 
 2002-07-17  Darin Adler  <darin at apple.com>
diff --git a/WebCore/ChangeLog-2003-10-25 b/WebCore/ChangeLog-2003-10-25
index f148ece..2d845ae 100644
--- a/WebCore/ChangeLog-2003-10-25
+++ b/WebCore/ChangeLog-2003-10-25
@@ -1,3 +1,11 @@
+2002-07-18  David Hyatt  <hyatt at apple.com>
+
+        Small change that gives us 25% speedup (uncached) on the cvs-base suite.
+
+        * khtml/css/cssstyleselector.cpp:
+        Optimized CLASS style comparison to avoid allocing QStrings when the CLASS
+        attribute only contains one entry (as opposed to a list of entries).
+        
 === Alexander-13 ===
 
 2002-07-17  Darin Adler  <darin at apple.com>
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index f148ece..2d845ae 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,3 +1,11 @@
+2002-07-18  David Hyatt  <hyatt at apple.com>
+
+        Small change that gives us 25% speedup (uncached) on the cvs-base suite.
+
+        * khtml/css/cssstyleselector.cpp:
+        Optimized CLASS style comparison to avoid allocing QStrings when the CLASS
+        attribute only contains one entry (as opposed to a list of entries).
+        
 === Alexander-13 ===
 
 2002-07-17  Darin Adler  <darin at apple.com>
diff --git a/WebCore/khtml/css/cssstyleselector.cpp b/WebCore/khtml/css/cssstyleselector.cpp
index ed020c8..dd00723 100644
--- a/WebCore/khtml/css/cssstyleselector.cpp
+++ b/WebCore/khtml/css/cssstyleselector.cpp
@@ -660,6 +660,16 @@ bool CSSStyleSelector::checkOneSelector(DOM::CSSSelector *sel, DOM::ElementImpl
             break;
         case CSSSelector::List:
         {
+            int spacePos = value.find(' ', 0);
+            if (spacePos == -1) {
+                // There is no list, just a single item.  We can avoid
+                // allocing QStrings and just treat this as an exact
+                // match check.
+                if( (strictParsing && strcmp(sel->value, value) ) ||
+                     (!strictParsing && strcasecmp(sel->value, value)))
+                    return false;
+                break;
+            }
             QString str = value.string();
             QString selStr = sel->value.string();
             int pos = str.find(selStr, 0, strictParsing);

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list