Title: [102175] branches/safari-534.53-branch/Source/WebCore
Revision
102175
Author
lforsch...@apple.com
Date
2011-12-06 13:54:02 -0800 (Tue, 06 Dec 2011)

Log Message

Merge 95099.

Modified Paths


Diff

Modified: branches/safari-534.53-branch/Source/WebCore/ChangeLog (102174 => 102175)


--- branches/safari-534.53-branch/Source/WebCore/ChangeLog	2011-12-06 21:37:29 UTC (rev 102174)
+++ branches/safari-534.53-branch/Source/WebCore/ChangeLog	2011-12-06 21:54:02 UTC (rev 102175)
@@ -1,5 +1,42 @@
 2011-12-06  Lucas Forschler  <lforsch...@apple.com>
 
+    Merge 95099
+
+    2011-09-14  David Hyatt  <hy...@apple.com>
+
+            https://bugs.webkit.org/show_bug.cgi?id=68040
+
+            Make sure border image sub-properties can be specified in any order.
+
+            Reviewed by Beth Dakin.
+
+            New tests in fast/borders.
+
+            * css/CSSParser.cpp:
+            (WebCore::BorderImageParseContext::BorderImageParseContext):
+            (WebCore::BorderImageParseContext::canAdvance):
+            (WebCore::BorderImageParseContext::setCanAdvance):
+            (WebCore::BorderImageParseContext::allowCommit):
+            (WebCore::BorderImageParseContext::allowImage):
+            (WebCore::BorderImageParseContext::allowImageSlice):
+            (WebCore::BorderImageParseContext::allowSlash):
+            (WebCore::BorderImageParseContext::requireWidth):
+            (WebCore::BorderImageParseContext::requireOutset):
+            (WebCore::BorderImageParseContext::commitImage):
+            (WebCore::BorderImageParseContext::commitImageSlice):
+            (WebCore::BorderImageParseContext::commitSlash):
+            (WebCore::BorderImageParseContext::commitBorderWidth):
+            (WebCore::BorderImageParseContext::commitBorderOutset):
+            (WebCore::BorderImageParseContext::commitRepeat):
+            (WebCore::CSSParser::parseBorderImage):
+            (WebCore::CSSParser::parseBorderImageRepeat):
+            (WebCore::CSSParser::parseBorderImageSlice):
+            (WebCore::CSSParser::parseBorderImageQuad):
+            * css/CSSParserValues.h:
+            (WebCore::CSSParserValueList::previous):
+
+2011-12-06  Lucas Forschler  <lforsch...@apple.com>
+
     Merge 95096
 
     2011-09-13  David Hyatt  <hy...@apple.com>

Modified: branches/safari-534.53-branch/Source/WebCore/css/CSSParser.cpp (102174 => 102175)


--- branches/safari-534.53-branch/Source/WebCore/css/CSSParser.cpp	2011-12-06 21:37:29 UTC (rev 102174)
+++ branches/safari-534.53-branch/Source/WebCore/css/CSSParser.cpp	2011-12-06 21:54:02 UTC (rev 102175)
@@ -4803,33 +4803,24 @@
         m_image = image;
         m_canAdvance = true;
         m_allowCommit = true;
-        m_allowImage = false;
-        m_allowSlash = false;
-        m_requireWidth = false;
-        m_requireOutset = false;
+        m_allowImage = m_allowSlash = m_requireWidth = m_requireOutset = false;
         m_allowImageSlice = !m_imageSlice;
         m_allowRepeat = !m_repeat;
     }
+
     void commitImageSlice(PassRefPtr<CSSBorderImageSliceValue> slice)
     {
         m_imageSlice = slice;
         m_canAdvance = true;
-        m_allowCommit = true;
-        m_allowSlash = true;
-        m_allowImageSlice = false;
-        m_requireWidth = false;
-        m_requireOutset = false;
+        m_allowCommit = m_allowSlash = true;
+        m_allowImageSlice = m_requireWidth = m_requireOutset = false;
         m_allowImage = !m_image;
         m_allowRepeat = !m_repeat;
     }
     void commitSlash()
     {
         m_canAdvance = true;
-        m_allowCommit = false;
-        m_allowImage = false;
-        m_allowImageSlice = false;
-        m_allowRepeat = false;
-        m_allowSlash = false;
+        m_allowCommit = m_allowImage = m_allowImageSlice = m_allowRepeat = m_allowSlash = false;
         if (!m_borderSlice) {
             m_requireWidth = true;
             m_requireOutset = false;
@@ -4842,11 +4833,8 @@
     {
         m_borderSlice = slice;
         m_canAdvance = true;
-        m_allowCommit = true;
-        m_allowSlash = true;
-        m_allowImageSlice = false;
-        m_requireWidth = false;
-        m_requireOutset = false;
+        m_allowCommit = m_allowSlash = true;
+        m_allowImageSlice = m_requireWidth = m_requireOutset = false;
         m_allowImage = !m_image;
         m_allowRepeat = !m_repeat;
     }
@@ -4855,10 +4843,7 @@
         m_outset = outset;
         m_canAdvance = true;
         m_allowCommit = true;
-        m_allowImageSlice = false;
-        m_allowSlash = false;
-        m_requireWidth = false;
-        m_requireOutset = false;
+        m_allowImageSlice = m_allowSlash = m_requireWidth = m_requireOutset = false;
         m_allowImage = !m_image;
         m_allowRepeat = !m_repeat;
     }
@@ -4867,10 +4852,7 @@
         m_repeat = repeat;
         m_canAdvance = true;
         m_allowCommit = true;
-        m_allowRepeat = false;
-        m_allowSlash = false;
-        m_requireWidth = false;
-        m_requireOutset = false;
+        m_allowRepeat = m_allowSlash = m_requireWidth = m_requireOutset = false;
         m_allowImageSlice = !m_imageSlice;
         m_allowImage = !m_image;
     }
@@ -4907,6 +4889,8 @@
     ShorthandScope scope(this, propId);
     BorderImageParseContext context(primitiveValueCache());
     while (CSSParserValue* val = m_valueList->current()) {
+        context.setCanAdvance(false);
+
         if (!context.canAdvance() && context.allowSlash() && val->unit == CSSParserValue::Operator && val->iValue == '/')
             context.commitSlash();
         
@@ -4949,10 +4933,10 @@
                 context.commitBorderOutset(borderOutset.release());
         } 
         
-        if (context.canAdvance()) {
-            m_valueList->next();
-            context.setCanAdvance(false);
-        }
+        if (!context.canAdvance())
+            return false;
+
+        m_valueList->next();
     }
 
     if (context.allowCommit()) {
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to