Title: [206029] trunk/Source/WebKit2
Revision
206029
Author
commit-qu...@webkit.org
Date
2016-09-16 10:08:09 -0700 (Fri, 16 Sep 2016)

Log Message

Unreviewed, rolling out r206000.
https://bugs.webkit.org/show_bug.cgi?id=162062

inadvertent GCC requirement bump (Requested by mcatanzaro on
#webkit).

Reverted changeset:

"Add support for enum class parameters in the message
generator"
https://bugs.webkit.org/show_bug.cgi?id=162036
http://trac.webkit.org/changeset/206000

Modified Paths

Diff

Modified: trunk/Source/WebKit2/ChangeLog (206028 => 206029)


--- trunk/Source/WebKit2/ChangeLog	2016-09-16 16:45:04 UTC (rev 206028)
+++ trunk/Source/WebKit2/ChangeLog	2016-09-16 17:08:09 UTC (rev 206029)
@@ -1,3 +1,18 @@
+2016-09-16  Commit Queue  <commit-qu...@webkit.org>
+
+        Unreviewed, rolling out r206000.
+        https://bugs.webkit.org/show_bug.cgi?id=162062
+
+        inadvertent GCC requirement bump (Requested by mcatanzaro on
+        #webkit).
+
+        Reverted changeset:
+
+        "Add support for enum class parameters in the message
+        generator"
+        https://bugs.webkit.org/show_bug.cgi?id=162036
+        http://trac.webkit.org/changeset/206000
+
 2016-09-15  Brady Eidson  <beid...@apple.com>
 
         WKWebView.hasOnlySecureContent always returns "YES" after going back to a CachedPage (even if it has http resources).

Modified: trunk/Source/WebKit2/Scripts/webkit/messages.py (206028 => 206029)


--- trunk/Source/WebKit2/Scripts/webkit/messages.py	2016-09-16 16:45:04 UTC (rev 206028)
+++ trunk/Source/WebKit2/Scripts/webkit/messages.py	2016-09-16 17:08:09 UTC (rev 206029)
@@ -66,7 +66,7 @@
     return '#if %s\n%s#endif\n' % (condition, string)
 
 
-def function_parameter_type(type, kind):
+def function_parameter_type(type):
     # Don't use references for built-in types.
     builtin_types = frozenset([
         'bool',
@@ -85,9 +85,6 @@
     if type in builtin_types:
         return type
 
-    if kind == 'enum':
-        return type
-
     return 'const %s&' % type
 
 
@@ -96,7 +93,7 @@
 
 
 def arguments_type(message):
-    return 'std::tuple<%s>' % ', '.join(function_parameter_type(parameter.type, parameter.kind) for parameter in message.parameters)
+    return 'std::tuple<%s>' % ', '.join(function_parameter_type(parameter.type) for parameter in message.parameters)
 
 
 def reply_type(message):
@@ -105,7 +102,7 @@
 
 def message_to_struct_declaration(message):
     result = []
-    function_parameters = [(function_parameter_type(x.type, x.kind), x.name) for x in message.parameters]
+    function_parameters = [(function_parameter_type(x.type), x.name) for x in message.parameters]
     result.append('class %s {\n' % message.name)
     result.append('public:\n')
     result.append('    typedef %s Arguments;\n' % arguments_type(message))
@@ -116,7 +113,7 @@
     result.append('\n')
     if message.reply_parameters != None:
         if message.has_attribute(DELAYED_ATTRIBUTE):
-            send_parameters = [(function_parameter_type(x.type, x.kind), x.name) for x in message.reply_parameters]
+            send_parameters = [(function_parameter_type(x.type), x.name) for x in message.reply_parameters]
             result.append('    struct DelayedReply : public ThreadSafeRefCounted<DelayedReply> {\n')
             result.append('        DelayedReply(PassRefPtr<IPC::Connection>, std::unique_ptr<IPC::Encoder>);\n')
             result.append('        ~DelayedReply();\n')
@@ -146,21 +143,20 @@
     return surround_in_condition(''.join(result), message.condition)
 
 
-def forward_declaration(namespace, kind_and_type):
+def struct_or_class(namespace, kind_and_type):
     kind, type = kind_and_type
 
     qualified_name = '%s::%s' % (namespace, type)
     if kind == 'struct':
         return 'struct %s' % type
-    elif kind == 'enum':
-        return 'enum class %s' % type
     else:
         return 'class %s' % type
 
+
 def forward_declarations_for_namespace(namespace, kind_and_types):
     result = []
     result.append('namespace %s {\n' % namespace)
-    result += ['    %s;\n' % forward_declaration(namespace, x) for x in kind_and_types]
+    result += ['    %s;\n' % struct_or_class(namespace, x) for x in kind_and_types]
     result.append('}\n')
     return ''.join(result)
 
@@ -376,7 +372,6 @@
         'struct WebKit::WebUserStyleSheetData': ['"WebUserContentControllerDataTypes.h"'],
         'struct WebKit::WebScriptMessageHandlerData': ['"WebUserContentControllerDataTypes.h"'],
         'std::chrono::system_clock::time_point': ['<chrono>'],
-        'WebKit::LayerHostingMode': ['"LayerTreeContext.h"'],
     }
 
     headers = []
@@ -480,7 +475,7 @@
         result.append('namespace Messages {\n\nnamespace %s {\n\n' % receiver.name)
 
         for message in sync_delayed_messages:
-            send_parameters = [(function_parameter_type(x.type, x.kind), x.name) for x in message.reply_parameters]
+            send_parameters = [(function_parameter_type(x.type), x.name) for x in message.reply_parameters]
 
             if message.condition:
                 result.append('#if %s\n\n' % message.condition)

Modified: trunk/Source/WebKit2/Scripts/webkit/parser.py (206028 => 206029)


--- trunk/Source/WebKit2/Scripts/webkit/parser.py	2016-09-16 16:45:04 UTC (rev 206028)
+++ trunk/Source/WebKit2/Scripts/webkit/parser.py	2016-09-16 17:08:09 UTC (rev 206029)
@@ -133,9 +133,6 @@
         if split[0].startswith('struct '):
             parameter_kind = 'struct'
             split[0] = split[0][7:]
-        elif split[0].startswith('enum '):
-            parameter_kind = 'enum'
-            split[0] = split[0][5:]
 
         parameter_type = split[0]
         parameter_name = split[1]

Modified: trunk/Source/WebKit2/Shared/LayerTreeContext.h (206028 => 206029)


--- trunk/Source/WebKit2/Shared/LayerTreeContext.h	2016-09-16 16:45:04 UTC (rev 206028)
+++ trunk/Source/WebKit2/Shared/LayerTreeContext.h	2016-09-16 17:08:09 UTC (rev 206029)
@@ -23,10 +23,10 @@
  * THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#pragma once
+#ifndef LayerTreeContext_h
+#define LayerTreeContext_h
 
 #include <stdint.h>
-#include <wtf/EnumTraits.h>
 
 namespace IPC {
 class Decoder;
@@ -62,16 +62,6 @@
     return !(a == b);
 }
 
-}
+};
 
-namespace WTF {
-template<> struct EnumTraits<WebKit::LayerHostingMode> {
-    using values = EnumValues<
-        WebKit::LayerHostingMode,
-#if HAVE(OUT_OF_PROCESS_LAYER_HOSTING)
-        WebKit::LayerHostingMode::OutOfProcess,
-#endif
-        WebKit::LayerHostingMode::InProcess
-    >;
-};
-}
+#endif // LayerTreeContext_h

Modified: trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp (206028 => 206029)


--- trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp	2016-09-16 16:45:04 UTC (rev 206028)
+++ trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp	2016-09-16 17:08:09 UTC (rev 206029)
@@ -1503,7 +1503,7 @@
     LayerHostingMode layerHostingMode = m_pageClient.viewLayerHostingMode();
     if (m_layerHostingMode != layerHostingMode) {
         m_layerHostingMode = layerHostingMode;
-        m_process->send(Messages::WebPage::SetLayerHostingMode(layerHostingMode), m_pageID);
+        m_process->send(Messages::WebPage::SetLayerHostingMode(static_cast<unsigned>(layerHostingMode)), m_pageID);
     }
 }
 
@@ -1620,7 +1620,7 @@
         return;
 
     m_layerHostingMode = layerHostingMode;
-    m_process->send(Messages::WebPage::SetLayerHostingMode(layerHostingMode), m_pageID);
+    m_process->send(Messages::WebPage::SetLayerHostingMode(static_cast<unsigned>(layerHostingMode)), m_pageID);
 }
 
 void WebPageProxy::waitForDidUpdateViewState()

Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp (206028 => 206029)


--- trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp	2016-09-16 16:45:04 UTC (rev 206028)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp	2016-09-16 17:08:09 UTC (rev 206029)
@@ -577,7 +577,7 @@
     if (m_viewState != parameters.viewState)
         setViewState(parameters.viewState, false, Vector<uint64_t>());
     if (m_layerHostingMode != parameters.layerHostingMode)
-        setLayerHostingMode(parameters.layerHostingMode);
+        setLayerHostingMode(static_cast<unsigned>(parameters.layerHostingMode));
 }
 
 void WebPage::setPageActivityState(PageActivityState::Flags activityState)
@@ -2608,9 +2608,9 @@
         updateIsInWindow();
 }
 
-void WebPage::setLayerHostingMode(LayerHostingMode layerHostingMode)
+void WebPage::setLayerHostingMode(unsigned layerHostingMode)
 {
-    m_layerHostingMode = layerHostingMode;
+    m_layerHostingMode = static_cast<LayerHostingMode>(layerHostingMode);
 
     m_drawingArea->setLayerHostingMode(m_layerHostingMode);
 

Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h (206028 => 206029)


--- trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h	2016-09-16 16:45:04 UTC (rev 206028)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h	2016-09-16 17:08:09 UTC (rev 206029)
@@ -439,7 +439,7 @@
     bool isVisibleOrOccluded() const { return m_viewState & WebCore::ViewState::IsVisibleOrOccluded; }
 
     LayerHostingMode layerHostingMode() const { return m_layerHostingMode; }
-    void setLayerHostingMode(LayerHostingMode);
+    void setLayerHostingMode(unsigned);
 
 #if PLATFORM(COCOA)
     void updatePluginsActiveAndFocusedState();

Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebPage.messages.in (206028 => 206029)


--- trunk/Source/WebKit2/WebProcess/WebPage/WebPage.messages.in	2016-09-16 16:45:04 UTC (rev 206028)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebPage.messages.in	2016-09-16 17:08:09 UTC (rev 206029)
@@ -23,7 +23,7 @@
 messages -> WebPage LegacyReceiver {
     SetInitialFocus(bool forward, bool isKeyboardEventValid, WebKit::WebKeyboardEvent event, uint64_t callbackID)
     SetViewState(unsigned viewState, bool wantsDidUpdateViewState, Vector<uint64_t> callbackIDs)
-    SetLayerHostingMode(enum WebKit::LayerHostingMode layerHostingMode)
+    SetLayerHostingMode(unsigned layerHostingMode)
 
     SetSessionID(WebCore::SessionID sessionID)
 
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to