<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[178631] trunk/Source</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/178631">178631</a></dd>
<dt>Author</dt> <dd>burg@cs.washington.edu</dd>
<dt>Date</dt> <dd>2015-01-18 09:07:05 -0800 (Sun, 18 Jan 2015)</dd>
</dl>

<h3>Log Message</h3>
<pre>Web Inspector: highlight data for overlay should use protocol type builders
https://bugs.webkit.org/show_bug.cgi?id=129441

Reviewed by Timothy Hatcher.

Source/JavaScriptCore:

Add a new domain for overlay types.

* CMakeLists.txt:
* DerivedSources.make:
* inspector/protocol/OverlayTypes.json: Added.

Source/WebCore:

As a first step towards cleaning up the inspector overlay, convert highlight
data construction to use protocol type builders. It's now really obvious what
data is being sent to the inspector overlay page.

This change paves the way towards using inspector protocol commands and events
if we want to support more interactive functionality in the inspector overlay.

This patch makes a few style cleanups, such as standardizing variable names,
using default member initializers, passing by reference, and fixing casts.

No new tests, no behavior changed.

* WebCore.exp.in:
* inspector/InspectorController.cpp:
(WebCore::InspectorController::getHighlight):
(WebCore::InspectorController::buildObjectForHighlightedNode):
(WebCore::InspectorController::inspect): Deleted.
* inspector/InspectorController.h:
* inspector/InspectorOverlay.cpp:
(WebCore::buildRendererHighlight):
(WebCore::buildNodeHighlight):
(WebCore::buildQuadHighlight):
(WebCore::InspectorOverlay::InspectorOverlay):
(WebCore::InspectorOverlay::getHighlight):
(WebCore::buildObjectForPoint):
(WebCore::buildObjectForRect):
(WebCore::buildArrayForQuad):
(WebCore::buildObjectForHighlight):
(WebCore::buildObjectForRegion):
(WebCore::buildObjectForFlowRegions):
(WebCore::buildObjectForSize):
(WebCore::buildQuadObjectForCSSRegionContentClip):
Simplify how the clipping area is encoded. It's now 'regionClippingArea'
stored on a FragmentHighlightData instance.

(WebCore::InspectorOverlay::updatePaintRectsTimerFired):
(WebCore::InspectorOverlay::drawPaintRects):
(WebCore::buildArrayForRendererFragments):
(WebCore::appendPathCommandAndPoints):
(WebCore::appendPathSegment):
(WebCore::buildObjectForShapeOutside):
(WebCore::buildObjectForElementData):
(WebCore::InspectorOverlay::buildObjectForHighlightedNode):
(WebCore::InspectorOverlay::drawNodeHighlight):
(WebCore::InspectorOverlay::drawQuadHighlight):
(WebCore::InspectorOverlay::reset):
(WebCore::buildObjectForRegionHighlight): Deleted.
(WebCore::buildObjectForCSSRegionsHighlight): Deleted.
(WebCore::buildObjectForCSSRegionContentClip): Deleted.
(WebCore::buildObjectForRendererFragments): Deleted.
(WebCore::buildObjectForElementInfo): Deleted.
* inspector/InspectorOverlay.h:
(WebCore::Highlight::Highlight):
* inspector/InspectorOverlayPage.js:
(_createElementTitle):
(_drawElementTitle):
(_drawFragmentHighlight):
(drawNodeHighlight):
* testing/Internals.cpp:
(WebCore::Internals::inspectorHighlightRects):
(WebCore::Internals::inspectorHighlightObject):

Source/WebKit:

* WebKit.vcxproj/WebKitExportGenerator/WebKitExports.def.in: Update symbol.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceJavaScriptCoreCMakeListstxt">trunk/Source/JavaScriptCore/CMakeLists.txt</a></li>
<li><a href="#trunkSourceJavaScriptCoreChangeLog">trunk/Source/JavaScriptCore/ChangeLog</a></li>
<li><a href="#trunkSourceJavaScriptCoreDerivedSourcesmake">trunk/Source/JavaScriptCore/DerivedSources.make</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreWebCoreexpin">trunk/Source/WebCore/WebCore.exp.in</a></li>
<li><a href="#trunkSourceWebCoreinspectorInspectorControllercpp">trunk/Source/WebCore/inspector/InspectorController.cpp</a></li>
<li><a href="#trunkSourceWebCoreinspectorInspectorControllerh">trunk/Source/WebCore/inspector/InspectorController.h</a></li>
<li><a href="#trunkSourceWebCoreinspectorInspectorOverlaycpp">trunk/Source/WebCore/inspector/InspectorOverlay.cpp</a></li>
<li><a href="#trunkSourceWebCoreinspectorInspectorOverlayh">trunk/Source/WebCore/inspector/InspectorOverlay.h</a></li>
<li><a href="#trunkSourceWebCoreinspectorInspectorOverlayPagejs">trunk/Source/WebCore/inspector/InspectorOverlayPage.js</a></li>
<li><a href="#trunkSourceWebCoretestingInternalscpp">trunk/Source/WebCore/testing/Internals.cpp</a></li>
<li><a href="#trunkSourceWebKitChangeLog">trunk/Source/WebKit/ChangeLog</a></li>
<li><a href="#trunkSourceWebKitWebKitvcxprojWebKitExportGeneratorWebKitExportsdefin">trunk/Source/WebKit/WebKit.vcxproj/WebKitExportGenerator/WebKitExports.def.in</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkSourceJavaScriptCoreinspectorprotocolOverlayTypesjson">trunk/Source/JavaScriptCore/inspector/protocol/OverlayTypes.json</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceJavaScriptCoreCMakeListstxt"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/CMakeLists.txt (178630 => 178631)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/CMakeLists.txt        2015-01-18 01:41:15 UTC (rev 178630)
+++ trunk/Source/JavaScriptCore/CMakeLists.txt        2015-01-18 17:07:05 UTC (rev 178631)
</span><span class="lines">@@ -1024,6 +1024,7 @@
</span><span class="cx">     ${JAVASCRIPTCORE_DIR}/inspector/protocol/Inspector.json
</span><span class="cx">     ${JAVASCRIPTCORE_DIR}/inspector/protocol/LayerTree.json
</span><span class="cx">     ${JAVASCRIPTCORE_DIR}/inspector/protocol/Network.json
</span><ins>+    ${JAVASCRIPTCORE_DIR}/inspector/protocol/OverlayTypes.json
</ins><span class="cx">     ${JAVASCRIPTCORE_DIR}/inspector/protocol/Page.json
</span><span class="cx">     ${JAVASCRIPTCORE_DIR}/inspector/protocol/Runtime.json
</span><span class="cx">     ${JAVASCRIPTCORE_DIR}/inspector/protocol/Timeline.json
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/ChangeLog (178630 => 178631)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/ChangeLog        2015-01-18 01:41:15 UTC (rev 178630)
+++ trunk/Source/JavaScriptCore/ChangeLog        2015-01-18 17:07:05 UTC (rev 178631)
</span><span class="lines">@@ -1,3 +1,16 @@
</span><ins>+2015-01-17  Brian J. Burg  &lt;burg@cs.washington.edu&gt;
+
+        Web Inspector: highlight data for overlay should use protocol type builders
+        https://bugs.webkit.org/show_bug.cgi?id=129441
+
+        Reviewed by Timothy Hatcher.
+
+        Add a new domain for overlay types.
+
+        * CMakeLists.txt:
+        * DerivedSources.make:
+        * inspector/protocol/OverlayTypes.json: Added.
+
</ins><span class="cx"> 2015-01-17  Michael Saboff  &lt;msaboff@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Crash in JSScope::resolve() on tools.ups.com
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreDerivedSourcesmake"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/DerivedSources.make (178630 => 178631)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/DerivedSources.make        2015-01-18 01:41:15 UTC (rev 178630)
+++ trunk/Source/JavaScriptCore/DerivedSources.make        2015-01-18 17:07:05 UTC (rev 178631)
</span><span class="lines">@@ -125,6 +125,7 @@
</span><span class="cx">     $(JavaScriptCore)/inspector/protocol/Inspector.json \
</span><span class="cx">     $(JavaScriptCore)/inspector/protocol/LayerTree.json \
</span><span class="cx">     $(JavaScriptCore)/inspector/protocol/Network.json \
</span><ins>+    $(JavaScriptCore)/inspector/protocol/OverlayTypes.json \
</ins><span class="cx">     $(JavaScriptCore)/inspector/protocol/Page.json \
</span><span class="cx">     $(JavaScriptCore)/inspector/protocol/Runtime.json \
</span><span class="cx">     $(JavaScriptCore)/inspector/protocol/Timeline.json \
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreinspectorprotocolOverlayTypesjson"></a>
<div class="addfile"><h4>Added: trunk/Source/JavaScriptCore/inspector/protocol/OverlayTypes.json (0 => 178631)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/inspector/protocol/OverlayTypes.json                                (rev 0)
+++ trunk/Source/JavaScriptCore/inspector/protocol/OverlayTypes.json        2015-01-18 17:07:05 UTC (rev 178631)
</span><span class="lines">@@ -0,0 +1,129 @@
</span><ins>+{
+    &quot;domain&quot;: &quot;OverlayTypes&quot;,
+    &quot;description&quot;: &quot;Exposes types to be used by the inspector overlay.&quot;,
+    &quot;types&quot;: [
+        {
+            &quot;id&quot;: &quot;Point&quot;,
+            &quot;type&quot;: &quot;object&quot;,
+            &quot;properties&quot;: [
+                { &quot;name&quot;: &quot;x&quot;, &quot;type&quot;: &quot;number&quot; },
+                { &quot;name&quot;: &quot;y&quot;, &quot;type&quot;: &quot;number&quot; }
+            ]
+        },
+        {
+            &quot;id&quot;: &quot;Size&quot;,
+            &quot;type&quot;: &quot;object&quot;,
+            &quot;properties&quot;: [
+                { &quot;name&quot;: &quot;width&quot;, &quot;type&quot;: &quot;integer&quot; },
+                { &quot;name&quot;: &quot;height&quot;, &quot;type&quot;: &quot;integer&quot; }
+            ]
+        },
+        {
+            &quot;id&quot;: &quot;Quad&quot;,
+            &quot;description&quot;: &quot;A quad is a collection of 4 points. When initialized from a rect, the points are in clockwise order from top left.&quot;,
+            &quot;type&quot;: &quot;array&quot;,
+            &quot;items&quot;: { &quot;$ref&quot;: &quot;Point&quot; }
+        },
+        {
+            &quot;id&quot;: &quot;Rect&quot;,
+            &quot;description&quot;: &quot;A rectangle specified by a reference coordinate and width/height offsets.&quot;,
+            &quot;type&quot;: &quot;object&quot;,
+            &quot;properties&quot;: [
+                { &quot;name&quot;: &quot;x&quot;, &quot;type&quot;: &quot;number&quot; },
+                { &quot;name&quot;: &quot;y&quot;, &quot;type&quot;: &quot;number&quot; },
+                { &quot;name&quot;: &quot;width&quot;, &quot;type&quot;: &quot;number&quot; },
+                { &quot;name&quot;: &quot;height&quot;, &quot;type&quot;: &quot;number&quot; }
+            ]
+        },
+        {
+            &quot;id&quot;: &quot;Region&quot;,
+            &quot;description&quot;: &quot;A single region in a flow thread.&quot;,
+            &quot;type&quot;: &quot;object&quot;,
+            &quot;properties&quot;: [
+                { &quot;name&quot;: &quot;borderQuad&quot;, &quot;$ref&quot;: &quot;Quad&quot; },
+                { &quot;name&quot;: &quot;incomingQuad&quot;, &quot;$ref&quot;: &quot;Quad&quot; },
+                { &quot;name&quot;: &quot;outgoingQuad&quot;, &quot;$ref&quot;: &quot;Quad&quot; },
+                { &quot;name&quot;: &quot;isHighlighted&quot;, &quot;type&quot;: &quot;boolean&quot;, &quot;optional&quot;: true }
+            ]
+        },
+        {
+            &quot;id&quot;: &quot;DisplayPath&quot;,
+            &quot;description&quot;: &quot;A vector path described using SVG path syntax.&quot;,
+            &quot;type&quot;: &quot;array&quot;,
+            &quot;items&quot;: { &quot;type&quot;: &quot;any&quot; }
+        },
+        {
+            &quot;id&quot;: &quot;RegionFlowData&quot;,
+            &quot;type&quot;: &quot;object&quot;,
+            &quot;properties&quot;: [
+                { &quot;name&quot;: &quot;regions&quot;, &quot;type&quot;: &quot;array&quot;, &quot;items&quot;: { &quot;$ref&quot;: &quot;Region&quot;} },
+                { &quot;name&quot;: &quot;name&quot;, &quot;type&quot;: &quot;string&quot; }
+            ]
+        },
+        {
+            &quot;id&quot;: &quot;ContentFlowData&quot;,
+            &quot;type&quot;: &quot;object&quot;,
+            &quot;properties&quot;: [
+                { &quot;name&quot;: &quot;name&quot;, &quot;type&quot;: &quot;string&quot; }
+            ]
+        },
+        {
+            &quot;id&quot;: &quot;ShapeOutsideData&quot;,
+            &quot;type&quot;: &quot;object&quot;,
+            &quot;properties&quot;: [
+                { &quot;name&quot;: &quot;bounds&quot;, &quot;$ref&quot;: &quot;Quad&quot;, &quot;description&quot;: &quot;Bounds for the shape-outside paths.&quot; },
+                { &quot;name&quot;: &quot;shape&quot;, &quot;$ref&quot;: &quot;DisplayPath&quot;, &quot;description&quot;: &quot;Path for the element's shape.&quot;, &quot;optional&quot;: true },
+                { &quot;name&quot;: &quot;marginShape&quot;, &quot;$ref&quot;: &quot;DisplayPath&quot;, &quot;description&quot;: &quot;Path for the element's margin shape.&quot;, &quot;optional&quot;: true }
+            ]
+        },
+        {
+            &quot;id&quot;: &quot;ElementData&quot;,
+            &quot;description&quot;: &quot;Data that describes an element to be highlighted.&quot;,
+            &quot;type&quot;: &quot;object&quot;,
+            &quot;properties&quot;: [
+                { &quot;name&quot;: &quot;tagName&quot;, &quot;type&quot;: &quot;string&quot; },
+                { &quot;name&quot;: &quot;idValue&quot;, &quot;type&quot;: &quot;string&quot;, &quot;description&quot;: &quot;The value of the element's 'id' attribute.&quot; },
+                { &quot;name&quot;: &quot;className&quot;, &quot;type&quot;: &quot;string&quot;, &quot;optional&quot;: true },
+                { &quot;name&quot;: &quot;size&quot;, &quot;$ref&quot;: &quot;Size&quot;, &quot;optional&quot;: true },
+                { &quot;name&quot;: &quot;role&quot;, &quot;type&quot;: &quot;string&quot;, &quot;description&quot;: &quot;Computed accessibility role for the element.&quot;, &quot;optional&quot;: true },
+                { &quot;name&quot;: &quot;regionFlowData&quot;, &quot;$ref&quot;: &quot;RegionFlowData&quot;, &quot;optional&quot;: true },
+                { &quot;name&quot;: &quot;contentFlowData&quot;, &quot;$ref&quot;: &quot;ContentFlowData&quot;, &quot;optional&quot;: true },
+                { &quot;name&quot;: &quot;shapeOutsideData&quot;, &quot;$ref&quot;: &quot;ShapeOutsideData&quot;, &quot;optional&quot;: true }
+            ]
+        },
+        {
+            &quot;id&quot;: &quot;FragmentHighlightData&quot;,
+            &quot;description&quot;: &quot;Data required to highlight multiple quads.&quot;,
+            &quot;type&quot;: &quot;object&quot;,
+            &quot;properties&quot;: [
+                { &quot;name&quot;: &quot;quads&quot;, &quot;type&quot;: &quot;array&quot;, &quot;items&quot;: { &quot;$ref&quot;: &quot;Quad&quot; }, &quot;description&quot;: &quot;Quads for which the highlight should be applied.&quot;},
+                { &quot;name&quot;: &quot;contentColor&quot;, &quot;type&quot;: &quot;string&quot; },
+                { &quot;name&quot;: &quot;contentOutlineColor&quot;, &quot;type&quot;: &quot;string&quot; },
+                { &quot;name&quot;: &quot;paddingColor&quot;, &quot;type&quot;: &quot;string&quot; },
+                { &quot;name&quot;: &quot;borderColor&quot;, &quot;type&quot;: &quot;string&quot; },
+                { &quot;name&quot;: &quot;marginColor&quot;, &quot;type&quot;: &quot;string&quot; },
+                { &quot;name&quot;: &quot;regionClippingArea&quot;, &quot;$ref&quot;: &quot;Quad&quot;, &quot;optional&quot;: true }
+            ]
+        },
+        {
+            &quot;id&quot;: &quot;NodeHighlightData&quot;,
+            &quot;description&quot;: &quot;Data required to highlight a DOM node.&quot;,
+            &quot;type&quot;: &quot;object&quot;,
+            &quot;properties&quot;: [
+                { &quot;name&quot;: &quot;scrollOffset&quot;, &quot;$ref&quot;: &quot;Point&quot;, &quot;description&quot;: &quot;Scroll offset for the MainFrame's FrameView that is shared across all quads.&quot; },
+                { &quot;name&quot;: &quot;fragments&quot;, &quot;type&quot;: &quot;array&quot;, &quot;items&quot;: { &quot;$ref&quot;: &quot;FragmentHighlightData&quot; } },
+                { &quot;name&quot;: &quot;elementData&quot;, &quot;$ref&quot;: &quot;ElementData&quot;, &quot;optional&quot;: true }
+            ]
+        },
+        {
+            &quot;id&quot;: &quot;OverlayConfiguration&quot;,
+            &quot;description&quot;: &quot;Data required to configure the overlay's size and scaling behavior.&quot;,
+            &quot;type&quot;: &quot;object&quot;,
+            &quot;properties&quot;: [
+                { &quot;name&quot;: &quot;deviceScaleFactor&quot;, &quot;type&quot;: &quot;number&quot; },
+                { &quot;name&quot;: &quot;viewportSize&quot;, &quot;$ref&quot;: &quot;Size&quot; },
+                { &quot;name&quot;: &quot;frameViewFullSize&quot;, &quot;$ref&quot;: &quot;Size&quot; }
+            ]
+        }
+    ]
+}
</ins></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (178630 => 178631)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2015-01-18 01:41:15 UTC (rev 178630)
+++ trunk/Source/WebCore/ChangeLog        2015-01-18 17:07:05 UTC (rev 178631)
</span><span class="lines">@@ -1,3 +1,72 @@
</span><ins>+2015-01-17  Brian J. Burg  &lt;burg@cs.washington.edu&gt;
+
+        Web Inspector: highlight data for overlay should use protocol type builders
+        https://bugs.webkit.org/show_bug.cgi?id=129441
+
+        Reviewed by Timothy Hatcher.
+
+        As a first step towards cleaning up the inspector overlay, convert highlight
+        data construction to use protocol type builders. It's now really obvious what
+        data is being sent to the inspector overlay page.
+
+        This change paves the way towards using inspector protocol commands and events
+        if we want to support more interactive functionality in the inspector overlay.
+
+        This patch makes a few style cleanups, such as standardizing variable names,
+        using default member initializers, passing by reference, and fixing casts.
+
+        No new tests, no behavior changed.
+
+        * WebCore.exp.in:
+        * inspector/InspectorController.cpp:
+        (WebCore::InspectorController::getHighlight):
+        (WebCore::InspectorController::buildObjectForHighlightedNode):
+        (WebCore::InspectorController::inspect): Deleted.
+        * inspector/InspectorController.h:
+        * inspector/InspectorOverlay.cpp:
+        (WebCore::buildRendererHighlight):
+        (WebCore::buildNodeHighlight):
+        (WebCore::buildQuadHighlight):
+        (WebCore::InspectorOverlay::InspectorOverlay):
+        (WebCore::InspectorOverlay::getHighlight):
+        (WebCore::buildObjectForPoint):
+        (WebCore::buildObjectForRect):
+        (WebCore::buildArrayForQuad):
+        (WebCore::buildObjectForHighlight):
+        (WebCore::buildObjectForRegion):
+        (WebCore::buildObjectForFlowRegions):
+        (WebCore::buildObjectForSize):
+        (WebCore::buildQuadObjectForCSSRegionContentClip):
+        Simplify how the clipping area is encoded. It's now 'regionClippingArea'
+        stored on a FragmentHighlightData instance.
+
+        (WebCore::InspectorOverlay::updatePaintRectsTimerFired):
+        (WebCore::InspectorOverlay::drawPaintRects):
+        (WebCore::buildArrayForRendererFragments):
+        (WebCore::appendPathCommandAndPoints):
+        (WebCore::appendPathSegment):
+        (WebCore::buildObjectForShapeOutside):
+        (WebCore::buildObjectForElementData):
+        (WebCore::InspectorOverlay::buildObjectForHighlightedNode):
+        (WebCore::InspectorOverlay::drawNodeHighlight):
+        (WebCore::InspectorOverlay::drawQuadHighlight):
+        (WebCore::InspectorOverlay::reset):
+        (WebCore::buildObjectForRegionHighlight): Deleted.
+        (WebCore::buildObjectForCSSRegionsHighlight): Deleted.
+        (WebCore::buildObjectForCSSRegionContentClip): Deleted.
+        (WebCore::buildObjectForRendererFragments): Deleted.
+        (WebCore::buildObjectForElementInfo): Deleted.
+        * inspector/InspectorOverlay.h:
+        (WebCore::Highlight::Highlight):
+        * inspector/InspectorOverlayPage.js:
+        (_createElementTitle):
+        (_drawElementTitle):
+        (_drawFragmentHighlight):
+        (drawNodeHighlight):
+        * testing/Internals.cpp:
+        (WebCore::Internals::inspectorHighlightRects):
+        (WebCore::Internals::inspectorHighlightObject):
+
</ins><span class="cx"> 2015-01-17  Myles C. Maxfield  &lt;mmaxfield@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         [SVG -&gt; OTF Converter] Crashes when SVG font is invalid
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCoreexpin"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.exp.in (178630 => 178631)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.exp.in        2015-01-18 01:41:15 UTC (rev 178630)
+++ trunk/Source/WebCore/WebCore.exp.in        2015-01-18 17:07:05 UTC (rev 178631)
</span><span class="lines">@@ -1859,7 +1859,7 @@
</span><span class="cx"> __ZNK7WebCore19HTMLOptGroupElement14groupLabelTextEv
</span><span class="cx"> __ZNK7WebCore19HTMLTextAreaElement5valueEv
</span><span class="cx"> __ZNK7WebCore19IDBDatabaseMetadata12isolatedCopyEv
</span><del>-__ZNK7WebCore19InspectorController12getHighlightEPNS_9HighlightENS_16InspectorOverlay16CoordinateSystemE
</del><ins>+__ZNK7WebCore19InspectorController12getHighlightERNS_9HighlightENS_16InspectorOverlay16CoordinateSystemE
</ins><span class="cx"> __ZNK7WebCore19InspectorController29buildObjectForHighlightedNodeEv
</span><span class="cx"> __ZNK7WebCore19MediaSessionManager30applicationWillEnterBackgroundEv
</span><span class="cx"> __ZNK7WebCore19MediaSessionManager30applicationWillEnterForegroundEv
</span></span></pre></div>
<a id="trunkSourceWebCoreinspectorInspectorControllercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/inspector/InspectorController.cpp (178630 => 178631)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/inspector/InspectorController.cpp        2015-01-18 01:41:15 UTC (rev 178630)
+++ trunk/Source/WebCore/inspector/InspectorController.cpp        2015-01-18 17:07:05 UTC (rev 178631)
</span><span class="lines">@@ -321,12 +321,12 @@
</span><span class="cx">     m_overlay-&gt;paint(context);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void InspectorController::getHighlight(Highlight* highlight, InspectorOverlay::CoordinateSystem coordinateSystem) const
</del><ins>+void InspectorController::getHighlight(Highlight&amp; highlight, InspectorOverlay::CoordinateSystem coordinateSystem) const
</ins><span class="cx"> {
</span><span class="cx">     m_overlay-&gt;getHighlight(highlight, coordinateSystem);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-RefPtr&lt;InspectorObject&gt; InspectorController::buildObjectForHighlightedNode() const
</del><ins>+RefPtr&lt;Inspector::Protocol::OverlayTypes::NodeHighlightData&gt; InspectorController::buildObjectForHighlightedNode() const
</ins><span class="cx"> {
</span><span class="cx">     return m_overlay-&gt;buildObjectForHighlightedNode();
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCoreinspectorInspectorControllerh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/inspector/InspectorController.h (178630 => 178631)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/inspector/InspectorController.h        2015-01-18 01:41:15 UTC (rev 178630)
+++ trunk/Source/WebCore/inspector/InspectorController.h        2015-01-18 17:07:05 UTC (rev 178631)
</span><span class="lines">@@ -48,7 +48,13 @@
</span><span class="cx"> class InspectorBackendDispatcher;
</span><span class="cx"> class InspectorFrontendChannel;
</span><span class="cx"> class InspectorObject;
</span><ins>+
+namespace Protocol {
+namespace OverlayTypes {
+class NodeHighlightData;
</ins><span class="cx"> }
</span><ins>+}
+}
</ins><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><span class="lines">@@ -104,13 +110,13 @@
</span><span class="cx"> 
</span><span class="cx">     void inspect(Node*);
</span><span class="cx">     WEBCORE_EXPORT void drawHighlight(GraphicsContext&amp;) const;
</span><del>-    WEBCORE_EXPORT void getHighlight(Highlight*, InspectorOverlay::CoordinateSystem) const;
</del><ins>+    WEBCORE_EXPORT void getHighlight(Highlight&amp;, InspectorOverlay::CoordinateSystem) const;
</ins><span class="cx">     void hideHighlight();
</span><span class="cx">     Node* highlightedNode() const;
</span><span class="cx"> 
</span><span class="cx">     void setIndicating(bool);
</span><span class="cx"> 
</span><del>-    WEBCORE_EXPORT RefPtr&lt;Inspector::InspectorObject&gt; buildObjectForHighlightedNode() const;
</del><ins>+    WEBCORE_EXPORT RefPtr&lt;Inspector::Protocol::OverlayTypes::NodeHighlightData&gt; buildObjectForHighlightedNode() const;
</ins><span class="cx"> 
</span><span class="cx">     bool isUnderTest() const { return m_isUnderTest; }
</span><span class="cx">     void setIsUnderTest(bool isUnderTest) { m_isUnderTest = isUnderTest; }
</span></span></pre></div>
<a id="trunkSourceWebCoreinspectorInspectorOverlaycpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/inspector/InspectorOverlay.cpp (178630 => 178631)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/inspector/InspectorOverlay.cpp        2015-01-18 01:41:15 UTC (rev 178630)
+++ trunk/Source/WebCore/inspector/InspectorOverlay.cpp        2015-01-18 17:07:05 UTC (rev 178631)
</span><span class="lines">@@ -57,6 +57,7 @@
</span><span class="cx"> #include &quot;Settings.h&quot;
</span><span class="cx"> #include &quot;StyledElement.h&quot;
</span><span class="cx"> #include &lt;bindings/ScriptValue.h&gt;
</span><ins>+#include &lt;inspector/InspectorProtocolObjects.h&gt;
</ins><span class="cx"> #include &lt;inspector/InspectorValues.h&gt;
</span><span class="cx"> #include &lt;wtf/text/StringBuilder.h&gt;
</span><span class="cx"> 
</span><span class="lines">@@ -80,13 +81,13 @@
</span><span class="cx">     contentsQuadToCoordinateSystem(mainView, view, quad, InspectorOverlay::CoordinateSystem::View);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static void buildRendererHighlight(RenderObject* renderer, RenderRegion* region, const HighlightConfig&amp; highlightConfig, Highlight* highlight, InspectorOverlay::CoordinateSystem coordinateSystem)
</del><ins>+static void buildRendererHighlight(RenderObject* renderer, RenderRegion* region, const HighlightConfig&amp; highlightConfig, Highlight&amp; highlight, InspectorOverlay::CoordinateSystem coordinateSystem)
</ins><span class="cx"> {
</span><span class="cx">     Frame* containingFrame = renderer-&gt;document().frame();
</span><span class="cx">     if (!containingFrame)
</span><span class="cx">         return;
</span><span class="cx"> 
</span><del>-    highlight-&gt;setDataFromConfig(highlightConfig);
</del><ins>+    highlight.setDataFromConfig(highlightConfig);
</ins><span class="cx">     FrameView* containingView = containingFrame-&gt;view();
</span><span class="cx">     FrameView* mainView = containingFrame-&gt;page()-&gt;mainFrame().view();
</span><span class="cx"> 
</span><span class="lines">@@ -94,10 +95,10 @@
</span><span class="cx">     bool isSVGRenderer = renderer-&gt;node() &amp;&amp; renderer-&gt;node()-&gt;isSVGElement() &amp;&amp; !renderer-&gt;isSVGRoot();
</span><span class="cx"> 
</span><span class="cx">     if (isSVGRenderer) {
</span><del>-        highlight-&gt;type = HighlightTypeRects;
-        renderer-&gt;absoluteQuads(highlight-&gt;quads);
-        for (size_t i = 0; i &lt; highlight-&gt;quads.size(); ++i)
-            contentsQuadToCoordinateSystem(mainView, containingView, highlight-&gt;quads[i], coordinateSystem);
</del><ins>+        highlight.type = HighlightType::Rects;
+        renderer-&gt;absoluteQuads(highlight.quads);
+        for (size_t i = 0; i &lt; highlight.quads.size(); ++i)
+            contentsQuadToCoordinateSystem(mainView, containingView, highlight.quads[i], coordinateSystem);
</ins><span class="cx">     } else if (is&lt;RenderBox&gt;(*renderer) || is&lt;RenderInline&gt;(*renderer)) {
</span><span class="cx">         LayoutRect contentBox;
</span><span class="cx">         LayoutRect paddingBox;
</span><span class="lines">@@ -178,35 +179,34 @@
</span><span class="cx">         contentsQuadToCoordinateSystem(mainView, containingView, absBorderQuad, coordinateSystem);
</span><span class="cx">         contentsQuadToCoordinateSystem(mainView, containingView, absMarginQuad, coordinateSystem);
</span><span class="cx"> 
</span><del>-        highlight-&gt;type = HighlightTypeNode;
-        highlight-&gt;quads.append(absMarginQuad);
-        highlight-&gt;quads.append(absBorderQuad);
-        highlight-&gt;quads.append(absPaddingQuad);
-        highlight-&gt;quads.append(absContentQuad);
</del><ins>+        highlight.type = HighlightType::Node;
+        highlight.quads.append(absMarginQuad);
+        highlight.quads.append(absBorderQuad);
+        highlight.quads.append(absPaddingQuad);
+        highlight.quads.append(absContentQuad);
</ins><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static void buildNodeHighlight(Node* node, RenderRegion* region, const HighlightConfig&amp; highlightConfig, Highlight* highlight, InspectorOverlay::CoordinateSystem coordinateSystem)
</del><ins>+static void buildNodeHighlight(Node&amp; node, RenderRegion* region, const HighlightConfig&amp; highlightConfig, Highlight&amp; highlight, InspectorOverlay::CoordinateSystem coordinateSystem)
</ins><span class="cx"> {
</span><del>-    RenderObject* renderer = node-&gt;renderer();
</del><ins>+    RenderObject* renderer = node.renderer();
</ins><span class="cx">     if (!renderer)
</span><span class="cx">         return;
</span><ins>+
</ins><span class="cx">     buildRendererHighlight(renderer, region, highlightConfig, highlight, coordinateSystem);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static void buildQuadHighlight(const FloatQuad&amp; quad, const HighlightConfig&amp; highlightConfig, Highlight *highlight)
</del><ins>+static void buildQuadHighlight(const FloatQuad&amp; quad, const HighlightConfig&amp; highlightConfig, Highlight&amp; highlight)
</ins><span class="cx"> {
</span><del>-    highlight-&gt;setDataFromConfig(highlightConfig);
-    highlight-&gt;type = HighlightTypeRects;
-    highlight-&gt;quads.append(quad);
</del><ins>+    highlight.setDataFromConfig(highlightConfig);
+    highlight.type = HighlightType::Rects;
+    highlight.quads.append(quad);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> InspectorOverlay::InspectorOverlay(Page&amp; page, InspectorClient* client)
</span><span class="cx">     : m_page(page)
</span><span class="cx">     , m_client(client)
</span><span class="cx">     , m_paintRectUpdateTimer(*this, &amp;InspectorOverlay::updatePaintRectsTimerFired)
</span><del>-    , m_indicating(false)
-    , m_showingPaintRects(false)
</del><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -225,14 +225,14 @@
</span><span class="cx">     view-&gt;paint(&amp;context, IntRect(0, 0, view-&gt;width(), view-&gt;height()));
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void InspectorOverlay::getHighlight(Highlight* highlight, InspectorOverlay::CoordinateSystem coordinateSystem) const
</del><ins>+void InspectorOverlay::getHighlight(Highlight&amp; highlight, InspectorOverlay::CoordinateSystem coordinateSystem) const
</ins><span class="cx"> {
</span><span class="cx">     if (!m_highlightNode &amp;&amp; !m_highlightQuad)
</span><span class="cx">         return;
</span><span class="cx"> 
</span><del>-    highlight-&gt;type = HighlightTypeRects;
</del><ins>+    highlight.type = HighlightType::Rects;
</ins><span class="cx">     if (m_highlightNode)
</span><del>-        buildNodeHighlight(m_highlightNode.get(), nullptr, m_nodeHighlightConfig, highlight, coordinateSystem);
</del><ins>+        buildNodeHighlight(*m_highlightNode, nullptr, m_nodeHighlightConfig, highlight, coordinateSystem);
</ins><span class="cx">     else
</span><span class="cx">         buildQuadHighlight(*m_highlightQuad, m_quadHighlightConfig, highlight);
</span><span class="cx"> }
</span><span class="lines">@@ -331,50 +331,51 @@
</span><span class="cx">     forcePaint();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static Ref&lt;InspectorObject&gt; buildObjectForPoint(const FloatPoint&amp; point)
</del><ins>+static Ref&lt;Inspector::Protocol::OverlayTypes::Point&gt; buildObjectForPoint(const FloatPoint&amp; point)
</ins><span class="cx"> {
</span><del>-    Ref&lt;InspectorObject&gt; object = InspectorObject::create();
-    object-&gt;setDouble(ASCIILiteral(&quot;x&quot;), point.x());
-    object-&gt;setDouble(ASCIILiteral(&quot;y&quot;), point.y());
-    return WTF::move(object);
</del><ins>+    return Inspector::Protocol::OverlayTypes::Point::create()
+        .setX(point.x())
+        .setY(point.y())
+        .release();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-static Ref&lt;InspectorObject&gt; buildObjectForRect(const FloatRect&amp; rect)
</del><ins>+static Ref&lt;Inspector::Protocol::OverlayTypes::Rect&gt; buildObjectForRect(const FloatRect&amp; rect)
</ins><span class="cx"> {
</span><del>-    Ref&lt;InspectorObject&gt; object = InspectorObject::create();
-    object-&gt;setDouble(ASCIILiteral(&quot;x&quot;), rect.x());
-    object-&gt;setDouble(ASCIILiteral(&quot;y&quot;), rect.y());
-    object-&gt;setDouble(ASCIILiteral(&quot;width&quot;), rect.width());
-    object-&gt;setDouble(ASCIILiteral(&quot;height&quot;), rect.height());
-    return WTF::move(object);
</del><ins>+    return Inspector::Protocol::OverlayTypes::Rect::create()
+        .setX(rect.x())
+        .setY(rect.y())
+        .setWidth(rect.width())
+        .setHeight(rect.height())
+        .release();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-static Ref&lt;InspectorArray&gt; buildArrayForQuad(const FloatQuad&amp; quad)
</del><ins>+static Ref&lt;Inspector::Protocol::OverlayTypes::Quad&gt; buildArrayForQuad(const FloatQuad&amp; quad)
</ins><span class="cx"> {
</span><del>-    Ref&lt;InspectorArray&gt; array = InspectorArray::create();
-    array-&gt;pushObject(buildObjectForPoint(quad.p1()));
-    array-&gt;pushObject(buildObjectForPoint(quad.p2()));
-    array-&gt;pushObject(buildObjectForPoint(quad.p3()));
-    array-&gt;pushObject(buildObjectForPoint(quad.p4()));
</del><ins>+    auto array = Inspector::Protocol::OverlayTypes::Quad::create();
+    array-&gt;addItem(buildObjectForPoint(quad.p1()));
+    array-&gt;addItem(buildObjectForPoint(quad.p2()));
+    array-&gt;addItem(buildObjectForPoint(quad.p3()));
+    array-&gt;addItem(buildObjectForPoint(quad.p4()));
</ins><span class="cx">     return WTF::move(array);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static Ref&lt;InspectorObject&gt; buildObjectForHighlight(const Highlight&amp; highlight)
</del><ins>+static Ref&lt;Inspector::Protocol::OverlayTypes::FragmentHighlightData&gt; buildObjectForHighlight(const Highlight&amp; highlight)
</ins><span class="cx"> {
</span><del>-    Ref&lt;InspectorObject&gt; object = InspectorObject::create();
-    Ref&lt;InspectorArray&gt; array = InspectorArray::create();
</del><ins>+    auto arrayOfQuads = Inspector::Protocol::Array&lt;Inspector::Protocol::OverlayTypes::Quad&gt;::create();
</ins><span class="cx">     for (size_t i = 0; i &lt; highlight.quads.size(); ++i)
</span><del>-        array-&gt;pushArray(buildArrayForQuad(highlight.quads[i]));
-    object-&gt;setArray(&quot;quads&quot;, WTF::move(array));
-    object-&gt;setString(&quot;contentColor&quot;, highlight.contentColor.serialized());
-    object-&gt;setString(&quot;contentOutlineColor&quot;, highlight.contentOutlineColor.serialized());
-    object-&gt;setString(&quot;paddingColor&quot;, highlight.paddingColor.serialized());
-    object-&gt;setString(&quot;borderColor&quot;, highlight.borderColor.serialized());
-    object-&gt;setString(&quot;marginColor&quot;, highlight.marginColor.serialized());
-    return WTF::move(object);
</del><ins>+        arrayOfQuads-&gt;addItem(buildArrayForQuad(highlight.quads[i]));
+
+    return Inspector::Protocol::OverlayTypes::FragmentHighlightData::create()
+        .setQuads(WTF::move(arrayOfQuads))
+        .setContentColor(highlight.contentColor.serialized())
+        .setContentOutlineColor(highlight.contentOutlineColor.serialized())
+        .setPaddingColor(highlight.paddingColor.serialized())
+        .setBorderColor(highlight.borderColor.serialized())
+        .setMarginColor(highlight.marginColor.serialized())
+        .release();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-static RefPtr&lt;InspectorObject&gt; buildObjectForRegionHighlight(FrameView* mainView, RenderRegion* region)
</del><ins>+static RefPtr&lt;Inspector::Protocol::OverlayTypes::Region&gt; buildObjectForRegion(FrameView* mainView, RenderRegion* region)
</ins><span class="cx"> {
</span><span class="cx">     FrameView* containingView = region-&gt;frame().view();
</span><span class="cx">     if (!containingView)
</span><span class="lines">@@ -388,7 +389,7 @@
</span><span class="cx">     // Create incoming and outgoing boxes that we use to chain the regions toghether.
</span><span class="cx">     const LayoutSize linkBoxSize(10, 10);
</span><span class="cx">     const LayoutSize linkBoxMidpoint(linkBoxSize.width() / 2, linkBoxSize.height() / 2);
</span><del>-    
</del><ins>+
</ins><span class="cx">     LayoutRect incomingRectBox = LayoutRect(borderBox.location() - linkBoxMidpoint, linkBoxSize);
</span><span class="cx">     LayoutRect outgoingRectBox = LayoutRect(borderBox.location() - linkBoxMidpoint + borderBox.size(), linkBoxSize);
</span><span class="cx"> 
</span><span class="lines">@@ -406,47 +407,45 @@
</span><span class="cx">     contentsQuadToPage(mainView, containingView, incomingRectQuad);
</span><span class="cx">     contentsQuadToPage(mainView, containingView, outgoingRectQuad);
</span><span class="cx"> 
</span><del>-    Ref&lt;InspectorObject&gt; regionObject = InspectorObject::create();
-
-    regionObject-&gt;setArray(&quot;borderQuad&quot;, buildArrayForQuad(borderRectQuad));
-    regionObject-&gt;setArray(&quot;incomingQuad&quot;, buildArrayForQuad(incomingRectQuad));
-    regionObject-&gt;setArray(&quot;outgoingQuad&quot;, buildArrayForQuad(outgoingRectQuad));
-
-    return WTF::move(regionObject);
</del><ins>+    return Inspector::Protocol::OverlayTypes::Region::create()
+        .setBorderQuad(buildArrayForQuad(borderRectQuad))
+        .setIncomingQuad(buildArrayForQuad(incomingRectQuad))
+        .setOutgoingQuad(buildArrayForQuad(outgoingRectQuad))
+        .release();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-static Ref&lt;InspectorArray&gt; buildObjectForCSSRegionsHighlight(RenderRegion* region, RenderFlowThread* flowThread)
</del><ins>+static Ref&lt;Inspector::Protocol::Array&lt;Inspector::Protocol::OverlayTypes::Region&gt;&gt; buildObjectForFlowRegions(RenderRegion* region, RenderFlowThread* flowThread)
</ins><span class="cx"> {
</span><span class="cx">     FrameView* mainFrameView = region-&gt;document().page()-&gt;mainFrame().view();
</span><span class="cx"> 
</span><del>-    Ref&lt;InspectorArray&gt; array = InspectorArray::create();
</del><ins>+    auto arrayOfRegions = Inspector::Protocol::Array&lt;Inspector::Protocol::OverlayTypes::Region&gt;::create();
</ins><span class="cx"> 
</span><span class="cx">     const RenderRegionList&amp; regionList = flowThread-&gt;renderRegionList();
</span><span class="cx">     for (auto&amp; iterRegion : regionList) {
</span><span class="cx">         if (!iterRegion-&gt;isValid())
</span><span class="cx">             continue;
</span><del>-        RefPtr&lt;InspectorObject&gt; regionHighlightObject = buildObjectForRegionHighlight(mainFrameView, iterRegion);
-        if (!regionHighlightObject)
</del><ins>+        RefPtr&lt;Inspector::Protocol::OverlayTypes::Region&gt; regionObject = buildObjectForRegion(mainFrameView, iterRegion);
+        if (!regionObject)
</ins><span class="cx">             continue;
</span><span class="cx">         if (region == iterRegion) {
</span><span class="cx">             // Let the script know that this is the currently highlighted node.
</span><del>-            regionHighlightObject-&gt;setBoolean(&quot;isHighlighted&quot;, true);
</del><ins>+            regionObject-&gt;setIsHighlighted(true);
</ins><span class="cx">         }
</span><del>-        array-&gt;pushObject(regionHighlightObject.release());
</del><ins>+        arrayOfRegions-&gt;addItem(WTF::move(regionObject));
</ins><span class="cx">     }
</span><span class="cx"> 
</span><del>-    return WTF::move(array);
</del><ins>+    return WTF::move(arrayOfRegions);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-static Ref&lt;InspectorObject&gt; buildObjectForSize(const IntSize&amp; size)
</del><ins>+static Ref&lt;Inspector::Protocol::OverlayTypes::Size&gt; buildObjectForSize(const IntSize&amp; size)
</ins><span class="cx"> {
</span><del>-    Ref&lt;InspectorObject&gt; result = InspectorObject::create();
-    result-&gt;setInteger(&quot;width&quot;, size.width());
-    result-&gt;setInteger(&quot;height&quot;, size.height());
-    return WTF::move(result);
</del><ins>+    return Inspector::Protocol::OverlayTypes::Size::create()
+        .setWidth(size.width())
+        .setHeight(size.height())
+        .release();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-static RefPtr&lt;InspectorObject&gt; buildObjectForCSSRegionContentClip(RenderRegion* region)
</del><ins>+static RefPtr&lt;Inspector::Protocol::OverlayTypes::Quad&gt; buildQuadObjectForCSSRegionContentClip(RenderRegion* region)
</ins><span class="cx"> {
</span><span class="cx">     Frame* containingFrame = region-&gt;document().frame();
</span><span class="cx">     if (!containingFrame)
</span><span class="lines">@@ -466,9 +465,7 @@
</span><span class="cx">     FloatQuad clipQuad = region-&gt;localToAbsoluteQuad(FloatRect(flippedRegionRect));
</span><span class="cx">     contentsQuadToPage(mainView, containingView, clipQuad);
</span><span class="cx"> 
</span><del>-    Ref&lt;InspectorObject&gt; regionObject = InspectorObject::create();
-    regionObject-&gt;setArray(&quot;quad&quot;, buildArrayForQuad(clipQuad));
-    return WTF::move(regionObject);
</del><ins>+    return buildArrayForQuad(clipQuad);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void InspectorOverlay::setShowingPaintRects(bool showingPaintRects)
</span><span class="lines">@@ -514,7 +511,7 @@
</span><span class="cx">         m_paintRects.removeFirst();
</span><span class="cx">         rectsChanged = true;
</span><span class="cx">     }
</span><del>-    
</del><ins>+
</ins><span class="cx">     if (m_paintRects.isEmpty())
</span><span class="cx">         m_paintRectUpdateTimer.stop();
</span><span class="cx"> 
</span><span class="lines">@@ -526,11 +523,11 @@
</span><span class="cx"> 
</span><span class="cx"> void InspectorOverlay::drawPaintRects()
</span><span class="cx"> {
</span><del>-    Ref&lt;InspectorArray&gt; fragmentsArray = InspectorArray::create();
</del><ins>+    auto arrayOfRects = Inspector::Protocol::Array&lt;Inspector::Protocol::OverlayTypes::Rect&gt;::create();
</ins><span class="cx">     for (const auto&amp; pair : m_paintRects)
</span><del>-        fragmentsArray-&gt;pushObject(buildObjectForRect(pair.second));
</del><ins>+        arrayOfRects-&gt;addItem(buildObjectForRect(pair.second));
</ins><span class="cx"> 
</span><del>-    evaluateInOverlay(ASCIILiteral(&quot;updatePaintRects&quot;), WTF::move(fragmentsArray));
</del><ins>+    evaluateInOverlay(ASCIILiteral(&quot;updatePaintRects&quot;), WTF::move(arrayOfRects));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void InspectorOverlay::drawGutter()
</span><span class="lines">@@ -538,15 +535,15 @@
</span><span class="cx">     evaluateInOverlay(ASCIILiteral(&quot;drawGutter&quot;));
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static RefPtr&lt;InspectorArray&gt; buildObjectForRendererFragments(RenderObject* renderer, const HighlightConfig&amp; config)
</del><ins>+static RefPtr&lt;Inspector::Protocol::Array&lt;Inspector::Protocol::OverlayTypes::FragmentHighlightData&gt;&gt; buildArrayForRendererFragments(RenderObject* renderer, const HighlightConfig&amp; config)
</ins><span class="cx"> {
</span><del>-    Ref&lt;InspectorArray&gt; fragmentsArray = InspectorArray::create();
</del><ins>+    auto arrayOfFragments = Inspector::Protocol::Array&lt;Inspector::Protocol::OverlayTypes::FragmentHighlightData&gt;::create();
</ins><span class="cx"> 
</span><span class="cx">     RenderFlowThread* containingFlowThread = renderer-&gt;flowThreadContainingBlock();
</span><span class="cx">     if (!containingFlowThread) {
</span><span class="cx">         Highlight highlight;
</span><del>-        buildRendererHighlight(renderer, nullptr, config, &amp;highlight, InspectorOverlay::CoordinateSystem::View);
-        fragmentsArray-&gt;pushObject(buildObjectForHighlight(highlight));
</del><ins>+        buildRendererHighlight(renderer, nullptr, config, highlight, InspectorOverlay::CoordinateSystem::View);
+        arrayOfFragments-&gt;addItem(buildObjectForHighlight(highlight));
</ins><span class="cx">     } else {
</span><span class="cx">         RenderRegion* startRegion = nullptr;
</span><span class="cx">         RenderRegion* endRegion = nullptr;
</span><span class="lines">@@ -561,19 +558,19 @@
</span><span class="cx">             if (region-&gt;isValid()) {
</span><span class="cx">                 // Compute the highlight of the fragment inside the current region.
</span><span class="cx">                 Highlight highlight;
</span><del>-                buildRendererHighlight(renderer, region, config, &amp;highlight, InspectorOverlay::CoordinateSystem::View);
-                Ref&lt;InspectorObject&gt; fragmentObject = buildObjectForHighlight(highlight);
</del><ins>+                buildRendererHighlight(renderer, region, config, highlight, InspectorOverlay::CoordinateSystem::View);
+                Ref&lt;Inspector::Protocol::OverlayTypes::FragmentHighlightData&gt; fragmentHighlight = buildObjectForHighlight(highlight);
</ins><span class="cx"> 
</span><span class="cx">                 // Compute the clipping area of the region.
</span><del>-                fragmentObject-&gt;setObject(&quot;region&quot;, buildObjectForCSSRegionContentClip(region));
-                fragmentsArray-&gt;pushObject(WTF::move(fragmentObject));
</del><ins>+                fragmentHighlight-&gt;setRegionClippingArea(buildQuadObjectForCSSRegionContentClip(region));
+                arrayOfFragments-&gt;addItem(WTF::move(fragmentHighlight));
</ins><span class="cx">             }
</span><span class="cx">             if (region == endRegion)
</span><span class="cx">                 break;
</span><span class="cx">         }
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    return WTF::move(fragmentsArray);
</del><ins>+    return WTF::move(arrayOfFragments);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(CSS_SHAPES)
</span><span class="lines">@@ -588,26 +585,27 @@
</span><span class="cx"> struct PathApplyInfo {
</span><span class="cx">     FrameView* rootView;
</span><span class="cx">     FrameView* view;
</span><del>-    InspectorArray* array;
</del><ins>+    Inspector::Protocol::OverlayTypes::DisplayPath* pathArray;
</ins><span class="cx">     RenderObject* renderer;
</span><span class="cx">     const ShapeOutsideInfo* shapeOutsideInfo;
</span><span class="cx"> };
</span><span class="cx"> 
</span><del>-static void appendPathCommandAndPoints(PathApplyInfo* info, const String&amp; command, const FloatPoint points[], unsigned length)
</del><ins>+static void appendPathCommandAndPoints(PathApplyInfo&amp; info, const String&amp; command, const FloatPoint points[], unsigned length)
</ins><span class="cx"> {
</span><span class="cx">     FloatPoint point;
</span><del>-    info-&gt;array-&gt;pushString(command);
</del><ins>+    info.pathArray-&gt;addItem(command);
</ins><span class="cx">     for (unsigned i = 0; i &lt; length; i++) {
</span><del>-        point = info-&gt;shapeOutsideInfo-&gt;shapeToRendererPoint(points[i]);
-        point = localPointToRoot(info-&gt;renderer, info-&gt;rootView, info-&gt;view, point);
-        info-&gt;array-&gt;pushDouble(point.x());
-        info-&gt;array-&gt;pushDouble(point.y());
</del><ins>+        point = info.shapeOutsideInfo-&gt;shapeToRendererPoint(points[i]);
+        point = localPointToRoot(info.renderer, info.rootView, info.view, point);
+        info.pathArray-&gt;addItem(point.x());
+        info.pathArray-&gt;addItem(point.y());
</ins><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+// Used as a functor for Shape::apply, which has not been cleaned up to use modern C++.
</ins><span class="cx"> static void appendPathSegment(void* info, const PathElement* pathElement)
</span><span class="cx"> {
</span><del>-    PathApplyInfo* pathApplyInfo = static_cast&lt;PathApplyInfo*&gt;(info);
</del><ins>+    PathApplyInfo&amp; pathApplyInfo = *static_cast&lt;PathApplyInfo*&gt;(info);
</ins><span class="cx">     FloatPoint point;
</span><span class="cx">     switch (pathElement-&gt;type) {
</span><span class="cx">     // The points member will contain 1 value.
</span><span class="lines">@@ -633,41 +631,43 @@
</span><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static RefPtr&lt;InspectorObject&gt; buildObjectForShapeOutside(Frame* containingFrame, RenderBox* renderer)
</del><ins>+static RefPtr&lt;Inspector::Protocol::OverlayTypes::ShapeOutsideData&gt; buildObjectForShapeOutside(Frame* containingFrame, RenderBox* renderer)
</ins><span class="cx"> {
</span><span class="cx">     const ShapeOutsideInfo* shapeOutsideInfo = renderer-&gt;shapeOutsideInfo();
</span><span class="cx">     if (!shapeOutsideInfo)
</span><span class="cx">         return nullptr;
</span><span class="cx"> 
</span><del>-    Ref&lt;InspectorObject&gt; shapeObject = InspectorObject::create();
</del><span class="cx">     LayoutRect shapeBounds = shapeOutsideInfo-&gt;computedShapePhysicalBoundingBox();
</span><span class="cx">     FloatQuad shapeQuad = renderer-&gt;localToAbsoluteQuad(FloatRect(shapeBounds));
</span><span class="cx">     contentsQuadToPage(containingFrame-&gt;page()-&gt;mainFrame().view(), containingFrame-&gt;view(), shapeQuad);
</span><del>-    shapeObject-&gt;setArray(ASCIILiteral(&quot;bounds&quot;), buildArrayForQuad(shapeQuad));
</del><span class="cx"> 
</span><ins>+    auto shapeObject = Inspector::Protocol::OverlayTypes::ShapeOutsideData::create()
+        .setBounds(buildArrayForQuad(shapeQuad))
+        .release();
+
</ins><span class="cx">     Shape::DisplayPaths paths;
</span><span class="cx">     shapeOutsideInfo-&gt;computedShape().buildDisplayPaths(paths);
</span><span class="cx"> 
</span><span class="cx">     if (paths.shape.length()) {
</span><del>-        Ref&lt;InspectorArray&gt; shapePath = InspectorArray::create();
</del><ins>+        auto shapePath = Inspector::Protocol::OverlayTypes::DisplayPath::create();
</ins><span class="cx">         PathApplyInfo info;
</span><span class="cx">         info.rootView = containingFrame-&gt;page()-&gt;mainFrame().view();
</span><span class="cx">         info.view = containingFrame-&gt;view();
</span><del>-        info.array = &amp;shapePath.get();
</del><ins>+        info.pathArray = &amp;shapePath.get();
</ins><span class="cx">         info.renderer = renderer;
</span><span class="cx">         info.shapeOutsideInfo = shapeOutsideInfo;
</span><span class="cx"> 
</span><span class="cx">         paths.shape.apply(&amp;info, &amp;appendPathSegment);
</span><span class="cx"> 
</span><del>-        shapeObject-&gt;setArray(ASCIILiteral(&quot;shape&quot;), shapePath.copyRef());
</del><ins>+        shapeObject-&gt;setShape(shapePath.copyRef());
</ins><span class="cx"> 
</span><span class="cx">         if (paths.marginShape.length()) {
</span><del>-            shapePath = InspectorArray::create();
-            info.array = &amp;shapePath.get();
</del><ins>+            auto marginShapePath = Inspector::Protocol::OverlayTypes::DisplayPath::create();
+            info.pathArray = &amp;marginShapePath.get();
</ins><span class="cx"> 
</span><span class="cx">             paths.marginShape.apply(&amp;info, &amp;appendPathSegment);
</span><span class="cx"> 
</span><del>-            shapeObject-&gt;setArray(ASCIILiteral(&quot;marginShape&quot;), shapePath.copyRef());
</del><ins>+            shapeObject-&gt;setMarginShape(shapePath.copyRef());
</ins><span class="cx">         }
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="lines">@@ -675,18 +675,19 @@
</span><span class="cx"> }
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-static RefPtr&lt;InspectorObject&gt; buildObjectForElementInfo(Node* node)
</del><ins>+static RefPtr&lt;Inspector::Protocol::OverlayTypes::ElementData&gt; buildObjectForElementData(Node* node)
</ins><span class="cx"> {
</span><del>-    ASSERT(node);
-    if (!is&lt;Element&gt;(*node) || !node-&gt;document().frame())
</del><ins>+    if (!is&lt;Element&gt;(node) || !node-&gt;document().frame())
</ins><span class="cx">         return nullptr;
</span><span class="cx"> 
</span><del>-    Ref&lt;InspectorObject&gt; elementInfo = InspectorObject::create();
-
</del><span class="cx">     Element&amp; element = downcast&lt;Element&gt;(*node);
</span><span class="cx">     bool isXHTML = element.document().isXHTMLDocument();
</span><del>-    elementInfo-&gt;setString(&quot;tagName&quot;, isXHTML ? element.nodeName() : element.nodeName().lower());
-    elementInfo-&gt;setString(&quot;idValue&quot;, element.getIdAttribute());
</del><ins>+
+    auto elementData = Inspector::Protocol::OverlayTypes::ElementData::create()
+        .setTagName(isXHTML ? element.nodeName() : element.nodeName().lower())
+        .setIdValue(element.getIdAttribute())
+        .release();
+
</ins><span class="cx">     HashSet&lt;AtomicString&gt; usedClassNames;
</span><span class="cx">     if (element.hasClass() &amp;&amp; is&lt;StyledElement&gt;(element)) {
</span><span class="cx">         StringBuilder classNames;
</span><span class="lines">@@ -700,40 +701,49 @@
</span><span class="cx">             classNames.append('.');
</span><span class="cx">             classNames.append(className);
</span><span class="cx">         }
</span><del>-        elementInfo-&gt;setString(&quot;className&quot;, classNames.toString());
</del><ins>+        elementData-&gt;setClassName(classNames.toString());
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     RenderElement* renderer = element.renderer();
</span><ins>+    if (!renderer)
+        return nullptr;
+
</ins><span class="cx">     Frame* containingFrame = node-&gt;document().frame();
</span><span class="cx">     FrameView* containingView = containingFrame-&gt;view();
</span><span class="cx">     IntRect boundingBox = snappedIntRect(containingView-&gt;contentsToRootView(renderer-&gt;absoluteBoundingBoxRect()));
</span><span class="cx">     RenderBoxModelObject* modelObject = is&lt;RenderBoxModelObject&gt;(*renderer) ? downcast&lt;RenderBoxModelObject&gt;(renderer) : nullptr;
</span><del>-    elementInfo-&gt;setString(&quot;nodeWidth&quot;, String::number(modelObject ? adjustForAbsoluteZoom(modelObject-&gt;pixelSnappedOffsetWidth(), *modelObject) : boundingBox.width()));
-    elementInfo-&gt;setString(&quot;nodeHeight&quot;, String::number(modelObject ? adjustForAbsoluteZoom(modelObject-&gt;pixelSnappedOffsetHeight(), *modelObject) : boundingBox.height()));
-    
</del><ins>+    auto sizeObject = Inspector::Protocol::OverlayTypes::Size::create()
+        .setWidth(modelObject ? adjustForAbsoluteZoom(modelObject-&gt;pixelSnappedOffsetWidth(), *modelObject) : boundingBox.width())
+        .setHeight(modelObject ? adjustForAbsoluteZoom(modelObject-&gt;pixelSnappedOffsetHeight(), *modelObject) : boundingBox.height())
+        .release();
+    elementData-&gt;setSize(WTF::move(sizeObject));
+
</ins><span class="cx">     if (renderer-&gt;isRenderNamedFlowFragmentContainer()) {
</span><span class="cx">         RenderNamedFlowFragment&amp; region = *downcast&lt;RenderBlockFlow&gt;(*renderer).renderNamedFlowFragment();
</span><span class="cx">         if (region.isValid()) {
</span><span class="cx">             RenderFlowThread* flowThread = region.flowThread();
</span><del>-            RefPtr&lt;InspectorObject&gt; regionFlowInfo = InspectorObject::create();
-            regionFlowInfo-&gt;setString(&quot;name&quot;, downcast&lt;RenderNamedFlowThread&gt;(*flowThread).flowThreadName());
-            regionFlowInfo-&gt;setArray(&quot;regions&quot;, buildObjectForCSSRegionsHighlight(&amp;region, flowThread));
-            elementInfo-&gt;setObject(&quot;regionFlowInfo&quot;, regionFlowInfo.release());
</del><ins>+            auto regionFlowData = Inspector::Protocol::OverlayTypes::RegionFlowData::create()
+                .setName(downcast&lt;RenderNamedFlowThread&gt;(*flowThread).flowThreadName())
+                .setRegions(buildObjectForFlowRegions(&amp;region, flowThread))
+                .release();
+            elementData-&gt;setRegionFlowData(WTF::move(regionFlowData));
</ins><span class="cx">         }
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     RenderFlowThread* containingFlowThread = renderer-&gt;flowThreadContainingBlock();
</span><span class="cx">     if (is&lt;RenderNamedFlowThread&gt;(containingFlowThread)) {
</span><del>-        RefPtr&lt;InspectorObject&gt; contentFlowInfo = InspectorObject::create();
-        contentFlowInfo-&gt;setString(&quot;name&quot;, downcast&lt;RenderNamedFlowThread&gt;(*containingFlowThread).flowThreadName());
-        elementInfo-&gt;setObject(&quot;contentFlowInfo&quot;, contentFlowInfo.release());
</del><ins>+        auto contentFlowData = Inspector::Protocol::OverlayTypes::ContentFlowData::create()
+            .setName(downcast&lt;RenderNamedFlowThread&gt;(*containingFlowThread).flowThreadName())
+            .release();
+
+        elementData-&gt;setContentFlowData(WTF::move(contentFlowData));
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(CSS_SHAPES)
</span><span class="cx">     if (is&lt;RenderBox&gt;(*renderer)) {
</span><span class="cx">         auto&amp; renderBox = downcast&lt;RenderBox&gt;(*renderer);
</span><del>-        if (RefPtr&lt;InspectorObject&gt; shapeObject = buildObjectForShapeOutside(containingFrame, &amp;renderBox))
-            elementInfo-&gt;setObject(&quot;shapeOutsideInfo&quot;, shapeObject.release());
</del><ins>+        if (RefPtr&lt;Inspector::Protocol::OverlayTypes::ShapeOutsideData&gt; shapeObject = buildObjectForShapeOutside(containingFrame, &amp;renderBox))
+            elementData-&gt;setShapeOutsideData(WTF::move(shapeObject));
</ins><span class="cx">     }
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="lines">@@ -743,13 +753,13 @@
</span><span class="cx"> 
</span><span class="cx">     if (AXObjectCache* axObjectCache = node-&gt;document().axObjectCache()) {
</span><span class="cx">         if (AccessibilityObject* axObject = axObjectCache-&gt;getOrCreate(node))
</span><del>-            elementInfo-&gt;setString(&quot;role&quot;, axObject-&gt;computedRoleString());
</del><ins>+            elementData-&gt;setRole(axObject-&gt;computedRoleString());
</ins><span class="cx">     }
</span><span class="cx"> 
</span><del>-    return WTF::move(elementInfo);
</del><ins>+    return WTF::move(elementData);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-RefPtr&lt;InspectorObject&gt; InspectorOverlay::buildObjectForHighlightedNode() const
</del><ins>+RefPtr&lt;Inspector::Protocol::OverlayTypes::NodeHighlightData&gt; InspectorOverlay::buildObjectForHighlightedNode() const
</ins><span class="cx"> {
</span><span class="cx">     if (!m_highlightNode)
</span><span class="cx">         return nullptr;
</span><span class="lines">@@ -759,33 +769,30 @@
</span><span class="cx">     if (!renderer)
</span><span class="cx">         return nullptr;
</span><span class="cx"> 
</span><del>-    RefPtr&lt;InspectorArray&gt; highlightFragments = buildObjectForRendererFragments(renderer, m_nodeHighlightConfig);
-    if (!highlightFragments)
</del><ins>+    RefPtr&lt;Inspector::Protocol::Array&lt;Inspector::Protocol::OverlayTypes::FragmentHighlightData&gt;&gt; arrayOfFragmentHighlights = buildArrayForRendererFragments(renderer, m_nodeHighlightConfig);
+    if (!arrayOfFragmentHighlights)
</ins><span class="cx">         return nullptr;
</span><span class="cx"> 
</span><del>-    Ref&lt;InspectorObject&gt; highlightObject = InspectorObject::create();
-
</del><span class="cx">     // The main view's scroll offset is shared across all quads.
</span><span class="cx">     FrameView* mainView = m_page.mainFrame().view();
</span><del>-    highlightObject-&gt;setObject(&quot;scroll&quot;, buildObjectForPoint(!mainView-&gt;delegatesScrolling() ? mainView-&gt;visibleContentRect().location() : FloatPoint()));
</del><span class="cx"> 
</span><del>-    highlightObject-&gt;setArray(&quot;fragments&quot;, highlightFragments.release());
</del><ins>+    auto nodeHighlightObject = Inspector::Protocol::OverlayTypes::NodeHighlightData::create()
+        .setScrollOffset(buildObjectForPoint(!mainView-&gt;delegatesScrolling() ? mainView-&gt;visibleContentRect().location() : FloatPoint()))
+        .setFragments(WTF::move(arrayOfFragmentHighlights))
+        .release();
</ins><span class="cx"> 
</span><span class="cx">     if (m_nodeHighlightConfig.showInfo) {
</span><del>-        RefPtr&lt;InspectorObject&gt; elementInfo = buildObjectForElementInfo(node);
-        if (elementInfo)
-            highlightObject-&gt;setObject(&quot;elementInfo&quot;, elementInfo.release());
</del><ins>+        if (RefPtr&lt;Inspector::Protocol::OverlayTypes::ElementData&gt; elementData = buildObjectForElementData(node))
+            nodeHighlightObject-&gt;setElementData(WTF::move(elementData));
</ins><span class="cx">     }
</span><del>-        
-    return WTF::move(highlightObject);
</del><ins>+
+    return WTF::move(nodeHighlightObject);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void InspectorOverlay::drawNodeHighlight()
</span><span class="cx"> {
</span><del>-    RefPtr&lt;InspectorObject&gt; highlightObject = buildObjectForHighlightedNode();
-    if (!highlightObject)
-        return;
-    evaluateInOverlay(&quot;drawNodeHighlight&quot;, highlightObject);
</del><ins>+    if (RefPtr&lt;Inspector::Protocol::OverlayTypes::NodeHighlightData&gt; highlightObject = buildObjectForHighlightedNode())
+        evaluateInOverlay(&quot;drawNodeHighlight&quot;, WTF::move(highlightObject));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void InspectorOverlay::drawQuadHighlight()
</span><span class="lines">@@ -794,7 +801,7 @@
</span><span class="cx">         return;
</span><span class="cx"> 
</span><span class="cx">     Highlight highlight;
</span><del>-    buildQuadHighlight(*m_highlightQuad, m_quadHighlightConfig, &amp;highlight);
</del><ins>+    buildQuadHighlight(*m_highlightQuad, m_quadHighlightConfig, highlight);
</ins><span class="cx">     evaluateInOverlay(&quot;drawQuadHighlight&quot;, buildObjectForHighlight(highlight));
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -859,11 +866,12 @@
</span><span class="cx"> 
</span><span class="cx"> void InspectorOverlay::reset(const IntSize&amp; viewportSize, const IntSize&amp; frameViewFullSize)
</span><span class="cx"> {
</span><del>-    Ref&lt;InspectorObject&gt; resetData = InspectorObject::create();
-    resetData-&gt;setDouble(&quot;deviceScaleFactor&quot;, m_page.deviceScaleFactor());
-    resetData-&gt;setObject(&quot;viewportSize&quot;, buildObjectForSize(viewportSize));
-    resetData-&gt;setObject(&quot;frameViewFullSize&quot;, buildObjectForSize(frameViewFullSize));
-    evaluateInOverlay(&quot;reset&quot;, WTF::move(resetData));
</del><ins>+    auto configObject = Inspector::Protocol::OverlayTypes::OverlayConfiguration::create()
+        .setDeviceScaleFactor(m_page.deviceScaleFactor())
+        .setViewportSize(buildObjectForSize(viewportSize))
+        .setFrameViewFullSize(buildObjectForSize(frameViewFullSize))
+        .release();
+    evaluateInOverlay(&quot;reset&quot;, WTF::move(configObject));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void InspectorOverlay::evaluateInOverlay(const String&amp; method)
</span></span></pre></div>
<a id="trunkSourceWebCoreinspectorInspectorOverlayh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/inspector/InspectorOverlay.h (178630 => 178631)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/inspector/InspectorOverlay.h        2015-01-18 01:41:15 UTC (rev 178630)
+++ trunk/Source/WebCore/inspector/InspectorOverlay.h        2015-01-18 17:07:05 UTC (rev 178631)
</span><span class="lines">@@ -41,7 +41,13 @@
</span><span class="cx"> namespace Inspector {
</span><span class="cx"> class InspectorObject;
</span><span class="cx"> class InspectorValue;
</span><ins>+
+namespace Protocol {
+namespace OverlayTypes {
+class NodeHighlightData;
</ins><span class="cx"> }
</span><ins>+}
+}
</ins><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><span class="lines">@@ -64,17 +70,13 @@
</span><span class="cx">     bool usePageCoordinates;
</span><span class="cx"> };
</span><span class="cx"> 
</span><del>-enum HighlightType {
-    HighlightTypeNode,
-    HighlightTypeRects,
</del><ins>+enum class HighlightType {
+    Node, // Provides 4 quads: margin, border, padding, content.
+    Rects, // Provides a list of quads.
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> struct Highlight {
</span><del>-    Highlight()
-        : type(HighlightTypeNode)
-        , usePageCoordinates(true)
-    {
-    }
</del><ins>+    Highlight() { }
</ins><span class="cx"> 
</span><span class="cx">     void setDataFromConfig(const HighlightConfig&amp; highlightConfig)
</span><span class="cx">     {
</span><span class="lines">@@ -92,11 +94,9 @@
</span><span class="cx">     Color borderColor;
</span><span class="cx">     Color marginColor;
</span><span class="cx"> 
</span><del>-    // When the type is Node, there are 4 quads (margin, border, padding, content).
-    // When the type is Rects, this is just a list of quads.
-    HighlightType type;
</del><ins>+    HighlightType type {HighlightType::Node};
</ins><span class="cx">     Vector&lt;FloatQuad&gt; quads;
</span><del>-    bool usePageCoordinates;
</del><ins>+    bool usePageCoordinates {true};
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> class InspectorOverlay {
</span><span class="lines">@@ -112,7 +112,7 @@
</span><span class="cx"> 
</span><span class="cx">     void update();
</span><span class="cx">     void paint(GraphicsContext&amp;);
</span><del>-    void getHighlight(Highlight*, CoordinateSystem) const;
</del><ins>+    void getHighlight(Highlight&amp;, CoordinateSystem) const;
</ins><span class="cx"> 
</span><span class="cx">     void setPausedInDebuggerMessage(const String*);
</span><span class="cx"> 
</span><span class="lines">@@ -129,7 +129,7 @@
</span><span class="cx"> 
</span><span class="cx">     void setIndicating(bool indicating);
</span><span class="cx"> 
</span><del>-    RefPtr&lt;Inspector::InspectorObject&gt; buildObjectForHighlightedNode() const;
</del><ins>+    RefPtr&lt;Inspector::Protocol::OverlayTypes::NodeHighlightData&gt; buildObjectForHighlightedNode() const;
</ins><span class="cx"> 
</span><span class="cx">     void freePage();
</span><span class="cx"> private:
</span><span class="lines">@@ -161,8 +161,8 @@
</span><span class="cx">     typedef std::pair&lt;std::chrono::steady_clock::time_point, FloatRect&gt; TimeRectPair;
</span><span class="cx">     Deque&lt;TimeRectPair&gt; m_paintRects;
</span><span class="cx">     Timer m_paintRectUpdateTimer;
</span><del>-    bool m_indicating;
-    bool m_showingPaintRects;
</del><ins>+    bool m_indicating {false};
+    bool m_showingPaintRects {false};
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCoreinspectorInspectorOverlayPagejs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/inspector/InspectorOverlayPage.js (178630 => 178631)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/inspector/InspectorOverlayPage.js        2015-01-18 01:41:15 UTC (rev 178630)
+++ trunk/Source/WebCore/inspector/InspectorOverlayPage.js        2015-01-18 17:07:05 UTC (rev 178631)
</span><span class="lines">@@ -261,37 +261,37 @@
</span><span class="cx">     return value &amp;&amp; value.length &gt; maxLength ? value.substring(0, 50) + &quot;\u2026&quot; : value;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-function _createElementTitle(elementInfo)
</del><ins>+function _createElementTitle(elementData)
</ins><span class="cx"> {
</span><span class="cx">     var builder = new DOMBuilder(&quot;div&quot;, &quot;element-title&quot;);
</span><span class="cx">     
</span><del>-    builder.appendSpanIfNotNull(&quot;tag-name&quot;, elementInfo.tagName);
-    builder.appendSpanIfNotNull(&quot;node-id&quot;, elementInfo.idValue, &quot;#&quot;);
-    builder.appendSpanIfNotNull(&quot;class-name&quot;, _truncateString(elementInfo.className, 50));
</del><ins>+    builder.appendSpanIfNotNull(&quot;tag-name&quot;, elementData.tagName);
+    builder.appendSpanIfNotNull(&quot;node-id&quot;, elementData.idValue, &quot;#&quot;);
+    builder.appendSpanIfNotNull(&quot;class-name&quot;, _truncateString(elementData.className, 50));
</ins><span class="cx"> 
</span><span class="cx">     builder.appendTextNode(&quot; &quot;);
</span><del>-    builder.appendSpan(&quot;node-width&quot;, elementInfo.nodeWidth);
</del><ins>+    builder.appendSpan(&quot;node-width&quot;, elementData.size.width);
</ins><span class="cx">     // \xd7 is the code for the &amp;times; HTML entity.
</span><span class="cx">     builder.appendSpan(&quot;px&quot;, &quot;px \xd7 &quot;);
</span><del>-    builder.appendSpan(&quot;node-height&quot;, elementInfo.nodeHeight);
</del><ins>+    builder.appendSpan(&quot;node-height&quot;, elementData.size.height);
</ins><span class="cx">     builder.appendSpan(&quot;px&quot;, &quot;px&quot;);
</span><span class="cx"> 
</span><del>-    builder.appendPropertyIfNotNull(&quot;role-name&quot;, &quot;Role&quot;, elementInfo.role);
-    builder.appendPropertyIfNotNull(&quot;region-flow-name&quot;, &quot;Region Flow&quot;, elementInfo.regionFlowInfo ? elementInfo.regionFlowInfo.name : null);
-    builder.appendPropertyIfNotNull(&quot;content-flow-name&quot;, &quot;Content Flow&quot;, elementInfo.contentFlowInfo ? elementInfo.contentFlowInfo.name : null);
</del><ins>+    builder.appendPropertyIfNotNull(&quot;role-name&quot;, &quot;Role&quot;, elementData.role);
+    builder.appendPropertyIfNotNull(&quot;region-flow-name&quot;, &quot;Region Flow&quot;, elementData.regionFlowData ? elementData.regionFlowData.name : null);
+    builder.appendPropertyIfNotNull(&quot;content-flow-name&quot;, &quot;Content Flow&quot;, elementData.contentFlowData ? elementData.contentFlowData.name : null);
</ins><span class="cx"> 
</span><span class="cx">     document.getElementById(&quot;element-title-container&quot;).appendChild(builder.element);
</span><span class="cx"> 
</span><span class="cx">     return builder.element;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-function _drawElementTitle(elementInfo, fragmentHighlight, scroll)
</del><ins>+function _drawElementTitle(elementData, fragmentHighlight, scroll)
</ins><span class="cx"> {
</span><del>-    if (!elementInfo || !fragmentHighlight.quads.length)
</del><ins>+    if (!elementData || !fragmentHighlight.quads.length)
</ins><span class="cx">         return;
</span><del>-    
-    var elementTitle = _createElementTitle(elementInfo);
</del><span class="cx"> 
</span><ins>+    var elementTitle = _createElementTitle(elementData);
+
</ins><span class="cx">     var marginQuad = fragmentHighlight.quads[0];
</span><span class="cx"> 
</span><span class="cx">     var titleWidth = elementTitle.offsetWidth + 6;
</span><span class="lines">@@ -305,11 +305,10 @@
</span><span class="cx">     var renderArrowDown = false;
</span><span class="cx"> 
</span><span class="cx">     var boxX = marginQuad[0].x;
</span><del>-    
-    var containingRegion = fragmentHighlight.region;
-    if (containingRegion) {
</del><ins>+
+    var clipQuad = fragmentHighlight.regionClippingArea;
+    if (clipQuad) {
</ins><span class="cx">         // Restrict the position of the title box to the area of the containing region.
</span><del>-        var clipQuad = containingRegion.quad;
</del><span class="cx">         anchorTop = Math.max(anchorTop, Math.min(clipQuad[0].y, clipQuad[1].y, clipQuad[2].y, clipQuad[3].y));
</span><span class="cx">         anchorBottom = Math.min(anchorBottom, Math.max(clipQuad[0].y, clipQuad[1].y, clipQuad[2].y, clipQuad[3].y));
</span><span class="cx">         boxX = Math.max(boxX, Math.min(clipQuad[0].x, clipQuad[1].x, clipQuad[2].x, clipQuad[3].x));
</span><span class="lines">@@ -430,9 +429,9 @@
</span><span class="cx"> 
</span><span class="cx">     context.save();
</span><span class="cx"> 
</span><del>-    if (highlight.region) {
</del><ins>+    if (highlight.regionClippingArea) {
</ins><span class="cx">         // Clip to the containing region to avoid showing fragments that are not rendered by this region.
</span><del>-        quadToPath(highlight.region.quad).clip();
</del><ins>+        quadToPath(highlight.regionClippingArea).clip();
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     var quads = highlight.quads.slice();
</span><span class="lines">@@ -491,23 +490,23 @@
</span><span class="cx"> function drawNodeHighlight(highlight)
</span><span class="cx"> {
</span><span class="cx">     context.save();
</span><del>-    context.translate(-highlight.scroll.x, -highlight.scroll.y);
</del><ins>+    context.translate(-highlight.scrollOffset.x, -highlight.scrollOffset.y);
</ins><span class="cx"> 
</span><span class="cx">     for (var i = 0; i &lt; highlight.fragments.length; ++i)
</span><span class="cx">         _drawFragmentHighlight(highlight.fragments[i]);
</span><span class="cx"> 
</span><del>-    if (highlight.elementInfo &amp;&amp; highlight.elementInfo.regionFlowInfo)
-        _drawRegionsHighlight(highlight.elementInfo.regionFlowInfo.regions);
</del><ins>+    if (highlight.elementData &amp;&amp; highlight.elementData.regionFlowData)
+        _drawRegionsHighlight(highlight.elementData.regionFlowData.regions);
</ins><span class="cx"> 
</span><del>-    if (highlight.elementInfo &amp;&amp; highlight.elementInfo.shapeOutsideInfo)
-        _drawShapeHighlight(highlight.elementInfo.shapeOutsideInfo);
</del><ins>+    if (highlight.elementData &amp;&amp; highlight.elementData.shapeOutsideData)
+        _drawShapeHighlight(highlight.elementData.shapeOutsideData);
</ins><span class="cx"> 
</span><span class="cx">     context.restore();
</span><span class="cx"> 
</span><span class="cx">     var elementTitleContainer = document.getElementById(&quot;element-title-container&quot;);
</span><span class="cx">     elementTitleContainer.innerHTML = &quot;&quot;;
</span><span class="cx">     for (var i = 0; i &lt; highlight.fragments.length; ++i)
</span><del>-        _drawElementTitle(highlight.elementInfo, highlight.fragments[i], highlight.scroll);
</del><ins>+        _drawElementTitle(highlight.elementData, highlight.fragments[i], highlight.scrollOffset);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> function drawQuadHighlight(highlight)
</span></span></pre></div>
<a id="trunkSourceWebCoretestingInternalscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/testing/Internals.cpp (178630 => 178631)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/testing/Internals.cpp        2015-01-18 01:41:15 UTC (rev 178630)
+++ trunk/Source/WebCore/testing/Internals.cpp        2015-01-18 17:07:05 UTC (rev 178631)
</span><span class="lines">@@ -785,7 +785,7 @@
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     Highlight highlight;
</span><del>-    document-&gt;page()-&gt;inspectorController().getHighlight(&amp;highlight, InspectorOverlay::CoordinateSystem::View);
</del><ins>+    document-&gt;page()-&gt;inspectorController().getHighlight(highlight, InspectorOverlay::CoordinateSystem::View);
</ins><span class="cx">     return ClientRectList::create(highlight.quads);
</span><span class="cx"> #else
</span><span class="cx">     UNUSED_PARAM(ec);
</span><span class="lines">@@ -801,7 +801,7 @@
</span><span class="cx">         ec = INVALID_ACCESS_ERR;
</span><span class="cx">         return String();
</span><span class="cx">     }
</span><del>-    RefPtr&lt;InspectorObject&gt; object = document-&gt;page()-&gt;inspectorController().buildObjectForHighlightedNode();
</del><ins>+    auto object = document-&gt;page()-&gt;inspectorController().buildObjectForHighlightedNode();
</ins><span class="cx">     return object ? object-&gt;toJSONString() : String();
</span><span class="cx"> #else
</span><span class="cx">     UNUSED_PARAM(ec);
</span></span></pre></div>
<a id="trunkSourceWebKitChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/ChangeLog (178630 => 178631)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/ChangeLog        2015-01-18 01:41:15 UTC (rev 178630)
+++ trunk/Source/WebKit/ChangeLog        2015-01-18 17:07:05 UTC (rev 178631)
</span><span class="lines">@@ -1,3 +1,12 @@
</span><ins>+2015-01-17  Brian J. Burg  &lt;burg@cs.washington.edu&gt;
+
+        Web Inspector: highlight data for overlay should use protocol type builders
+        https://bugs.webkit.org/show_bug.cgi?id=129441
+
+        Reviewed by Timothy Hatcher.
+
+        * WebKit.vcxproj/WebKitExportGenerator/WebKitExports.def.in: Update symbol.
+
</ins><span class="cx"> 2015-01-14  Brent Fulgham  &lt;bfulgham@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         [Win] Unreviewed build fix after r178459 and r178462.
</span></span></pre></div>
<a id="trunkSourceWebKitWebKitvcxprojWebKitExportGeneratorWebKitExportsdefin"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/WebKit.vcxproj/WebKitExportGenerator/WebKitExports.def.in (178630 => 178631)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/WebKit.vcxproj/WebKitExportGenerator/WebKitExports.def.in        2015-01-18 01:41:15 UTC (rev 178630)
+++ trunk/Source/WebKit/WebKit.vcxproj/WebKitExportGenerator/WebKitExports.def.in        2015-01-18 17:07:05 UTC (rev 178631)
</span><span class="lines">@@ -208,8 +208,8 @@
</span><span class="cx">         symbolWithPointer(?item@StaticNodeList@WebCore@@UBEPAVNode@2@I@Z, ?item@StaticNodeList@WebCore@@UEBAPEAVNode@2@I@Z)
</span><span class="cx">         ?selectTag@HTMLNames@WebCore@@3VHTMLQualifiedName@2@B
</span><span class="cx"> #if ENABLE(INSPECTOR)
</span><del>-        symbolWithPointer(?buildObjectForHighlightedNode@InspectorController@WebCore@@QBE?AV?$RefPtr@VInspectorObject@Inspector@@@WTF@@XZ, ?buildObjectForHighlightedNode@InspectorController@WebCore@@QEBA?AV?$RefPtr@VInspectorObject@Inspector@@@WTF@@XZ)
-        symbolWithPointer(?getHighlight@InspectorController@WebCore@@QBEXPAUHighlight@2@W4CoordinateSystem@InspectorOverlay@2@@Z, ?getHighlight@InspectorController@WebCore@@QEBAXPEAUHighlight@2@W4CoordinateSystem@InspectorOverlay@2@@Z)
</del><ins>+        symbolWithPointer(?buildObjectForHighlightedNode@InspectorController@WebCore@@QBE?AV?$RefPtr@VNodeHighlightData@OverlayTypes@Protocol@Inspector@@@WTF@@XZ, ?buildObjectForHighlightedNode@InspectorController@WebCore@@QBEA?AV?$RefPtr@VNodeHighlightData@OverlayTypes@Protocol@Inspector@@@WTF@@XZ)
+        symbolWithPointer(?getHighlight@InspectorController@WebCore@@QBEXAAUHighlight@2@W4CoordinateSystem@InspectorOverlay@2@@Z, ?getHighlight@InspectorController@WebCore@@QBEXEAAUHighlight@2@W4CoordinateSystem@InspectorOverlay@2@@Z)
</ins><span class="cx">         symbolWithPointer(?instrumentingAgentsForPage@InspectorInstrumentation@WebCore@@SAPAVInstrumentingAgents@2@PAVPage@2@@Z, ?instrumentingAgentsForPage@InspectorInstrumentation@WebCore@@SAPEAVInstrumentingAgents@2@PEAVPage@2@@Z)
</span><span class="cx">         ?s_frontendCounter@InspectorInstrumentation@WebCore@@0HA
</span><span class="cx">         symbolWithPointer(?isUnderTest@InspectorFrontendClientLocal@WebCore@@UAE_NXZ, ?isUnderTest@InspectorFrontendClientLocal@WebCore@@UEAA_NXZ)
</span></span></pre>
</div>
</div>

</body>
</html>