[MSVC] Add .natvis support of WebKit types
https://bugs.webkit.org/show_bug.cgi?id=193119

Reviewed by Don Olmstead.

To help the WebKit developer while debugging, this file defines how
WebKit types are displayed in debugger of Visual Studio.
Very limited set of WebKit types, but it changes the world.

* VisualStudio/WebKit.natvis: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@257906 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/Tools/VisualStudio/WebKit.natvis b/Tools/VisualStudio/WebKit.natvis
new file mode 100644
index 0000000..c043c75
--- /dev/null
+++ b/Tools/VisualStudio/WebKit.natvis
@@ -0,0 +1,84 @@
+<?xml version="1.0" encoding="utf-8"?> 

+<AutoVisualizer xmlns="http://schemas.microsoft.com/vstudio/debugger/natvis/2010">

+  <!--

+    Place this file to %USERPROFILE%\Documents\Visual Studio 2019\Visualizers

+    For more info:

+      https://docs.microsoft.com/en-us/visualstudio/debugger/create-custom-views-of-native-objects?view=vs-2019

+  -->

+  <Type Name="WTF::RefPtr&lt;*&gt;">

+    <DisplayString Condition="m_ptr == 0">empty</DisplayString>

+    <DisplayString>{*m_ptr}</DisplayString>

+  </Type>

+  <Type Name="WTF::UniqueRef&lt;*&gt;">

+    <DisplayString>{m_ref}</DisplayString>

+  </Type>

+  

+  <Type Name="WTF::StringImplShape">

+    <!-- AtomString -->

+    <DisplayString Condition="(m_hashAndFlags &amp; 0x10) &amp;&amp; (m_hashAndFlags &amp; 4)">

+      Atom:{m_data8,[m_length]s}

+    </DisplayString>

+    <DisplayString Condition="(m_hashAndFlags &amp; 0x10)">

+      Atom:{m_data16,[m_length]su}

+    </DisplayString>

+

+    <!-- Symbol -->

+    <DisplayString Condition="(m_hashAndFlags &amp; 0x20) &amp;&amp; (m_hashAndFlags &amp; 4)">

+      &lt;{m_data8,[m_length]s}&gt;

+    </DisplayString>

+    <DisplayString Condition="(m_hashAndFlags &amp; 0x20)">

+      &lt;{m_data16,[m_length]su}&gt;

+    </DisplayString>

+

+    <DisplayString Condition="(m_hashAndFlags &amp; 4)">

+      {m_data8,[m_length]s}

+    </DisplayString>

+    <DisplayString Condition="!(m_hashAndFlags &amp; 4)">

+      {m_data16,[m_length]su}

+    </DisplayString>

+

+    <DisplayString>not supported ({m_hashAndFlags})</DisplayString>

+  </Type>

+  

+  <Type Name="WTF::String">

+    <DisplayString>{m_impl}</DisplayString>

+  </Type>

+

+  <Type Name="IPC::StringReference">

+    <DisplayString Condition="!m_size">empty</DisplayString>

+    <DisplayString>{m_data,[m_size]s8}</DisplayString>

+  </Type>

+  

+  <Type Name="IPC::Decoder">

+    <DisplayString>{m_messageReceiverName}::{m_messageName}(ID={m_destination})</DisplayString>

+  </Type>

+  

+  <Type Name="WTF::URL">

+    <DisplayString>{m_string}</DisplayString>

+  </Type>

+  <Type Name="WTF::AtomString">

+    <DisplayString>{m_string} (Atom)</DisplayString>

+  </Type>

+ 

+  <Type Name="PAL::SessionID">

+    <DisplayString>{m_identifier}</DisplayString>

+  </Type>

+  

+  <Type Name="WTF::ObjectIdentifier&lt;*&gt;">

+    <DisplayString>{m_identifier}</DisplayString>

+  </Type>

+

+  <Type Name="WTF::OptionSet&lt;*&gt;">

+    <DisplayString>{m_storage,x}</DisplayString>

+  </Type>

+

+  <Type Name="WebCore::IntSize">

+    <DisplayString>({m_width} x {m_height})</DisplayString>

+  </Type>

+

+  <!-- Networking -->

+

+  <Type Name="WebCore::ResourceRequest">

+    <DisplayString>{m_httpMethod} {m_url} {m_httpBody}</DisplayString>

+  </Type>  

+</AutoVisualizer>