Title: [125330] trunk
Revision
125330
Author
[email protected]
Date
2012-08-10 14:48:04 -0700 (Fri, 10 Aug 2012)

Log Message

Part 1 of: Extend -webkit-user-select with a new value "all"
<rdar://problem/10161404>
https://bugs.webkit.org/show_bug.cgi?id=93562

Patch by Alice Cheng <[email protected]> on 2012-08-10
Reviewed by Dan Bernstein.

Source/WebCore:

Parse the new "all" value for -webkit-user-select

Test: editing/selection/user-select-all-parsing.html

* css/CSSParser.cpp:
(WebCore::isValidKeywordPropertyAndValue): Add new value all
* css/CSSPrimitiveValueMappings.h:
(WebCore::CSSPrimitiveValue::CSSPrimitiveValue): Add new value all
(WebCore::CSSPrimitiveValue::operator EUserSelect): Add one more bit to store the new property value
* rendering/style/RenderStyleConstants.h: Add new value all
* rendering/style/StyleRareInheritedData.h: Add new value all
(StyleRareInheritedData):

Source/WebKit/gtk:

Modify the enum to resolve ambiguous reference

* webkit/webkitwebview.cpp:
(webkit_web_view_class_init): Modify the ambiguous enum
(webkit_web_view_select_all): Modify the ambiguous enum

LayoutTests:

Add a test to verify that the new "all" value is parsed correctly.

* editing/selection/user-select-all-parsing-expected.txt: Added.
* editing/selection/user-select-all-parsing.html: Added.

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (125329 => 125330)


--- trunk/LayoutTests/ChangeLog	2012-08-10 21:45:43 UTC (rev 125329)
+++ trunk/LayoutTests/ChangeLog	2012-08-10 21:48:04 UTC (rev 125330)
@@ -1,3 +1,16 @@
+2012-08-10  Alice Cheng  <[email protected]>
+
+        Part 1 of: Extend -webkit-user-select with a new value "all"
+        <rdar://problem/10161404>
+        https://bugs.webkit.org/show_bug.cgi?id=93562
+
+        Reviewed by Dan Bernstein.
+
+        Add a test to verify that the new "all" value is parsed correctly.
+
+        * editing/selection/user-select-all-parsing-expected.txt: Added.
+        * editing/selection/user-select-all-parsing.html: Added.
+
 2012-08-10  Florin Malita  <[email protected]>
 
         [Chromium] Updated results for fast/borders/border-shadow-large-radius.html.

Added: trunk/LayoutTests/editing/selection/user-select-all-parsing-expected.txt (0 => 125330)


--- trunk/LayoutTests/editing/selection/user-select-all-parsing-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/editing/selection/user-select-all-parsing-expected.txt	2012-08-10 21:48:04 UTC (rev 125330)
@@ -0,0 +1,11 @@
+this is text of -webkit-user-select all
+Test for Parsing new value all for -webkit-user-select
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS userSelect.getPropertyValue("-webkit-user-select") is "all"
+PASS successfullyParsed is true
+
+TEST COMPLETE
+

Added: trunk/LayoutTests/editing/selection/user-select-all-parsing.html (0 => 125330)


--- trunk/LayoutTests/editing/selection/user-select-all-parsing.html	                        (rev 0)
+++ trunk/LayoutTests/editing/selection/user-select-all-parsing.html	2012-08-10 21:48:04 UTC (rev 125330)
@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+    <head>
+        <style>
+        .userSelectAll {-webkit-user-select: all;}
+        </style>
+        <script src=""
+    </head>
+    <body contentEditable="true">
+        <div class="userSelectAll" id ="allArea">
+            this is text of -webkit-user-select all
+        </div>
+        <div id="console"></div>
+            
+        <script>
+            description("Test for Parsing new value all for -webkit-user-select");
+            var userSelect = document.defaultView.getComputedStyle(document.getElementById("allArea"),null);
+            shouldBeEqualToString('userSelect.getPropertyValue("-webkit-user-select")', 'all');
+        </script>
+        <script src=""
+    </body>
+</html>

Modified: trunk/Source/WebCore/ChangeLog (125329 => 125330)


--- trunk/Source/WebCore/ChangeLog	2012-08-10 21:45:43 UTC (rev 125329)
+++ trunk/Source/WebCore/ChangeLog	2012-08-10 21:48:04 UTC (rev 125330)
@@ -1,3 +1,24 @@
+2012-08-10  Alice Cheng  <[email protected]>
+
+        Part 1 of: Extend -webkit-user-select with a new value "all"
+        <rdar://problem/10161404>
+        https://bugs.webkit.org/show_bug.cgi?id=93562
+
+        Reviewed by Dan Bernstein.
+
+        Parse the new "all" value for -webkit-user-select
+
+        Test: editing/selection/user-select-all-parsing.html
+
+        * css/CSSParser.cpp:
+        (WebCore::isValidKeywordPropertyAndValue): Add new value all
+        * css/CSSPrimitiveValueMappings.h:
+        (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): Add new value all
+        (WebCore::CSSPrimitiveValue::operator EUserSelect): Add one more bit to store the new property value
+        * rendering/style/RenderStyleConstants.h: Add new value all
+        * rendering/style/StyleRareInheritedData.h: Add new value all
+        (StyleRareInheritedData):
+
 2012-08-10  Iain Merrick  <[email protected]>
 
         [chromium] Upstream Android changes to WebFrameImpl::selectRange

Modified: trunk/Source/WebCore/css/CSSParser.cpp (125329 => 125330)


--- trunk/Source/WebCore/css/CSSParser.cpp	2012-08-10 21:45:43 UTC (rev 125329)
+++ trunk/Source/WebCore/css/CSSParser.cpp	2012-08-10 21:48:04 UTC (rev 125330)
@@ -836,8 +836,8 @@
         if (valueID == CSSValueReadOnly || valueID == CSSValueReadWrite || valueID == CSSValueReadWritePlaintextOnly)
             return true;
         break;
-    case CSSPropertyWebkitUserSelect: // auto | none | text
-        if (valueID == CSSValueAuto || valueID == CSSValueNone || valueID == CSSValueText)
+    case CSSPropertyWebkitUserSelect: // auto | none | text | all
+        if (valueID == CSSValueAuto || valueID == CSSValueNone || valueID == CSSValueText || valueID == CSSValueAll)
             return true;
         break;
 #if ENABLE(CSS_EXCLUSIONS)

Modified: trunk/Source/WebCore/css/CSSPrimitiveValueMappings.h (125329 => 125330)


--- trunk/Source/WebCore/css/CSSPrimitiveValueMappings.h	2012-08-10 21:45:43 UTC (rev 125329)
+++ trunk/Source/WebCore/css/CSSPrimitiveValueMappings.h	2012-08-10 21:48:04 UTC (rev 125330)
@@ -2366,6 +2366,9 @@
         case SELECT_TEXT:
             m_value.ident = CSSValueText;
             break;
+        case SELECT_ALL:
+            m_value.ident = CSSValueAll;
+            break;
     }
 }
 
@@ -2378,6 +2381,8 @@
             return SELECT_NONE;
         case CSSValueText:
             return SELECT_TEXT;
+        case CSSValueAll:
+            return SELECT_ALL;
         default:
             ASSERT_NOT_REACHED();
             return SELECT_TEXT;

Modified: trunk/Source/WebCore/rendering/style/RenderStyleConstants.h (125329 => 125330)


--- trunk/Source/WebCore/rendering/style/RenderStyleConstants.h	2012-08-10 21:45:43 UTC (rev 125329)
+++ trunk/Source/WebCore/rendering/style/RenderStyleConstants.h	2012-08-10 21:48:04 UTC (rev 125330)
@@ -198,7 +198,7 @@
 // CSS3 User Select Values
 
 enum EUserSelect {
-    SELECT_NONE, SELECT_TEXT
+    SELECT_NONE, SELECT_TEXT, SELECT_ALL
 };
 
 // Word Break Values. Matches WinIE, rather than CSS3

Modified: trunk/Source/WebCore/rendering/style/StyleRareInheritedData.h (125329 => 125330)


--- trunk/Source/WebCore/rendering/style/StyleRareInheritedData.h	2012-08-10 21:45:43 UTC (rev 125329)
+++ trunk/Source/WebCore/rendering/style/StyleRareInheritedData.h	2012-08-10 21:48:04 UTC (rev 125330)
@@ -89,7 +89,7 @@
     unsigned khtmlLineBreak : 1; // EKHTMLLineBreak
     unsigned textSizeAdjust : 1; // An Apple extension.
     unsigned resize : 2; // EResize
-    unsigned userSelect : 1;  // EUserSelect
+    unsigned userSelect : 2; // EUserSelect
     unsigned colorSpace : 1; // ColorSpace
     unsigned speak : 3; // ESpeak
     unsigned hyphens : 2; // Hyphens

Modified: trunk/Source/WebKit/gtk/ChangeLog (125329 => 125330)


--- trunk/Source/WebKit/gtk/ChangeLog	2012-08-10 21:45:43 UTC (rev 125329)
+++ trunk/Source/WebKit/gtk/ChangeLog	2012-08-10 21:48:04 UTC (rev 125330)
@@ -1,3 +1,17 @@
+2012-08-10  Alice Cheng  <[email protected]>
+
+        Part 1 of: Extend -webkit-user-select with a new value "all"
+        <rdar://problem/10161404>
+        https://bugs.webkit.org/show_bug.cgi?id=93562
+
+        Reviewed by Dan Bernstein.
+
+        Modify the enum to resolve ambiguous reference
+
+        * webkit/webkitwebview.cpp:
+        (webkit_web_view_class_init): Modify the ambiguous enum
+        (webkit_web_view_select_all): Modify the ambiguous enum
+
 2012-08-10  Mario Sanchez Prada  <[email protected]>
 
         [GTK] Broken implementation of AtkText and AtkEditableText for password fields

Modified: trunk/Source/WebKit/gtk/webkit/webkitwebview.cpp (125329 => 125330)


--- trunk/Source/WebKit/gtk/webkit/webkitwebview.cpp	2012-08-10 21:45:43 UTC (rev 125329)
+++ trunk/Source/WebKit/gtk/webkit/webkitwebview.cpp	2012-08-10 21:48:04 UTC (rev 125330)
@@ -2290,7 +2290,7 @@
      *
      * The default bindings for this signal is Ctrl-a.
      */
-    webkit_web_view_signals[SELECT_ALL] = g_signal_new("select-all",
+    webkit_web_view_signals[::SELECT_ALL] = g_signal_new("select-all",
             G_TYPE_FROM_CLASS(webViewClass),
             (GSignalFlags)(G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION),
             G_STRUCT_OFFSET(WebKitWebViewClass, select_all),
@@ -4419,7 +4419,7 @@
 {
     g_return_if_fail(WEBKIT_IS_WEB_VIEW(webView));
 
-    g_signal_emit(webView, webkit_web_view_signals[SELECT_ALL], 0);
+    g_signal_emit(webView, webkit_web_view_signals[::SELECT_ALL], 0);
 }
 
 /**
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to