REGRESSION(r288623) MSVC reports "InspectorDOMAgent.cpp(558,40): error C2059: syntax error: ':'"
https://bugs.webkit.org/show_bug.cgi?id=235667

Unreviewed build fix.


* inspector/agents/InspectorDOMAgent.cpp:
(WebCore::InspectorDOMAgent::pushStyleableElementToFrontend):
(WebCore::InspectorDOMAgent::pushStyleablePathToFrontend):
Don't use GNU extension `?:`.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@288646 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog
index d2d19e0..c408d8b 100644
--- a/Source/WebCore/ChangeLog
+++ b/Source/WebCore/ChangeLog
@@ -1,3 +1,15 @@
+2022-01-26  Fujii Hironori  <Hironori.Fujii@sony.com>
+
+        REGRESSION(r288623) MSVC reports "InspectorDOMAgent.cpp(558,40): error C2059: syntax error: ':'"
+        https://bugs.webkit.org/show_bug.cgi?id=235667
+
+        Unreviewed build fix.
+
+        * inspector/agents/InspectorDOMAgent.cpp:
+        (WebCore::InspectorDOMAgent::pushStyleableElementToFrontend):
+        (WebCore::InspectorDOMAgent::pushStyleablePathToFrontend):
+        Don't use GNU extension `?:`.
+
 2022-01-26  Antoine Quint  <graouts@webkit.org>
 
         Add an iterator to KeyframeList
diff --git a/Source/WebCore/inspector/agents/InspectorDOMAgent.cpp b/Source/WebCore/inspector/agents/InspectorDOMAgent.cpp
index 72d152c..f2eeb49 100644
--- a/Source/WebCore/inspector/agents/InspectorDOMAgent.cpp
+++ b/Source/WebCore/inspector/agents/InspectorDOMAgent.cpp
@@ -555,7 +555,7 @@
 Protocol::DOM::NodeId InspectorDOMAgent::pushStyleableElementToFrontend(const Styleable& styleable)
 {
     auto* element = elementToPushForStyleable(styleable);
-    return pushNodeToFrontend(element ?: &styleable.element);
+    return pushNodeToFrontend(element ? element : &styleable.element);
 }
 
 Protocol::DOM::NodeId InspectorDOMAgent::pushNodeToFrontend(Node* nodeToPush)
@@ -660,7 +660,7 @@
 Ref<Protocol::DOM::Styleable> InspectorDOMAgent::pushStyleablePathToFrontend(Protocol::ErrorString errorString, const Styleable& styleable)
 {
     auto* element = elementToPushForStyleable(styleable);
-    auto nodeId = pushNodePathToFrontend(errorString, element ?: &styleable.element);
+    auto nodeId = pushNodePathToFrontend(errorString, element ? element : &styleable.element);
 
     auto protocolStyleable = Protocol::DOM::Styleable::create()
         .setNodeId(nodeId)