Title: [118885] trunk/Source/WebCore
Revision
118885
Author
macpher...@chromium.org
Date
2012-05-29 20:30:23 -0700 (Tue, 29 May 2012)

Log Message

Implement post-landing feedback for WebKitCSSTransformValue::customCSSText().
https://bugs.webkit.org/show_bug.cgi?id=87684

Reviewed by Darin Adler.

Darin provided some style suggesting on https://bugs.webkit.org/show_bug.cgi?id=87462 after it landed.
This patch incorporates those suggestions, namely using 0 instead of empty string for UnknownTransformOperation
and WTF_ARRAY_LENGTH instead of hard coding the array length.

Covered by existing transform tests.

* css/WebKitCSSTransformValue.cpp:
(WebCore):
(WebCore::WebKitCSSTransformValue::customCssText):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (118884 => 118885)


--- trunk/Source/WebCore/ChangeLog	2012-05-30 03:15:25 UTC (rev 118884)
+++ trunk/Source/WebCore/ChangeLog	2012-05-30 03:30:23 UTC (rev 118885)
@@ -1,3 +1,20 @@
+2012-05-29  Luke Macpherson  <macpher...@chromium.org>
+
+        Implement post-landing feedback for WebKitCSSTransformValue::customCSSText().
+        https://bugs.webkit.org/show_bug.cgi?id=87684
+
+        Reviewed by Darin Adler.
+
+        Darin provided some style suggesting on https://bugs.webkit.org/show_bug.cgi?id=87462 after it landed.
+        This patch incorporates those suggestions, namely using 0 instead of empty string for UnknownTransformOperation
+        and WTF_ARRAY_LENGTH instead of hard coding the array length.
+
+        Covered by existing transform tests.
+
+        * css/WebKitCSSTransformValue.cpp:
+        (WebCore):
+        (WebCore::WebKitCSSTransformValue::customCssText):
+
 2012-05-29  Eric Seidel  <e...@webkit.org>
 
         Fix ENABLE_IFRAME_SEAMLESS to actually fully disable <iframe seamless>

Modified: trunk/Source/WebCore/css/WebKitCSSTransformValue.cpp (118884 => 118885)


--- trunk/Source/WebCore/css/WebKitCSSTransformValue.cpp	2012-05-30 03:15:25 UTC (rev 118884)
+++ trunk/Source/WebCore/css/WebKitCSSTransformValue.cpp	2012-05-30 03:30:23 UTC (rev 118885)
@@ -33,9 +33,9 @@
 
 namespace WebCore {
 
-const int transformNameSize = 22;
-const char* const transformName[transformNameSize] = {
-     "",
+// These names must be kept in sync with TransformOperationType.
+const char* const transformName[] = {
+     0,
      "translate",
      "translateX",
      "translateY",
@@ -69,7 +69,7 @@
 {
     StringBuilder result;
     if (m_type != UnknownTransformOperation) {
-        ASSERT(m_type < transformNameSize);
+        ASSERT(static_cast<size_t>(m_type) < WTF_ARRAY_LENGTH(transformName));
         result.append(transformName[m_type]);
         result.append('(');
         result.append(CSSValueList::customCssText());
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to