<!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>[211406] trunk</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/211406">211406</a></dd>
<dt>Author</dt> <dd>joepeck@webkit.org</dd>
<dt>Date</dt> <dd>2017-01-30 22:21:35 -0800 (Mon, 30 Jan 2017)</dd>
</dl>

<h3>Log Message</h3>
<pre>Implement PerformanceObserver
https://bugs.webkit.org/show_bug.cgi?id=167546
&lt;rdar://problem/30247959&gt;

Reviewed by Ryosuke Niwa.

Source/JavaScriptCore:

* runtime/CommonIdentifiers.h:

Source/WebCore:

This implements PerformanceObserver from Performance Timeline Level 2:
https://w3c.github.io/performance-timeline/

Tests: performance-api/performance-observer-api.html
       performance-api/performance-observer-basic.html
       performance-api/performance-observer-callback-mutate.html
       performance-api/performance-observer-callback-task.html
       performance-api/performance-observer-entry-sort.html
       performance-api/performance-observer-exception.html
       performance-api/performance-observer-nested.html
       performance-api/performance-observer-order.html
       performance-api/performance-observer-periodic.html
       performance-api/performance-timeline-api.html

* CMakeLists.txt:
* DerivedSources.make:
* WebCore.xcodeproj/project.pbxproj:
New files.

* page/Performance.h:
* page/Performance.cpp:
(WebCore::Performance::mark):
(WebCore::Performance::measure):
(WebCore::Performance::registerPerformanceObserver):
(WebCore::Performance::unregisterPerformanceObserver):
(WebCore::Performance::queueEntry):
Register PerformanceObservers with the Performance object.
When new PerformanceEntries are created (Mark and Measure
right now) check them against observers.

* page/PerformanceEntry.cpp:
(WebCore::PerformanceEntry::PerformanceEntry):
(WebCore::PerformanceEntry::typeForEntryTypeString):
* page/PerformanceEntry.h:
(WebCore::PerformanceEntry::type):
Give PerformanceEntry a convenience enum for easy comparison
and to know if it is one of the built-in known types (which the
PerformanceObserver API takes into account).

* page/PerformanceObserver.cpp: Added.
(WebCore::PerformanceObserver::PerformanceObserver):
(WebCore::PerformanceObserver::observe):
(WebCore::PerformanceObserver::disconnect):
(WebCore::PerformanceObserver::queueEntry):
(WebCore::PerformanceObserver::deliver):
* page/PerformanceObserver.h:
(WebCore::PerformanceObserver::create):
(WebCore::PerformanceObserver::typeFilter):
- TypeErrors on observe bad behavior
- Completely replace types filter on observe
- Handle register and unregister
- Handle calling the callback

* page/PerformanceObserverCallback.idl: Added.
* page/PerformanceObserverEntryList.cpp: Added.
(WebCore::PerformanceObserverEntryList::PerformanceObserverEntryList):
(WebCore::PerformanceObserverEntryList::getEntries):
(WebCore::PerformanceObserverEntryList::getEntriesByType):
(WebCore::PerformanceObserverEntryList::getEntriesByName):
* page/PerformanceObserverEntryList.h:
(WebCore::PerformanceObserverEntryList::create):
* page/PerformanceObserverEntryList.idl: Added.
Implement sorting and filtering of entries.

* page/PerformanceObserver.idl: Added.
* page/PerformanceObserverCallback.h:
(WebCore::PerformanceObserverCallback::~PerformanceObserverCallback):
Mostly autogenerated.

* page/PerformanceUserTiming.cpp:
(WebCore::UserTiming::mark):
(WebCore::UserTiming::measure):
* page/PerformanceUserTiming.h:
Update these to return the entry so it can be passed on to
any interested PerformanceObservers.

Source/WebInspectorUI:

* UserInterface/Models/NativeFunctionParameters.js:
Improve API view display of built-in performance methods.

LayoutTests:

* performance-api/performance-observer-api-expected.txt: Added.
* performance-api/performance-observer-api.html: Added.
* performance-api/performance-observer-basic-expected.txt: Added.
* performance-api/performance-observer-basic.html: Added.
* performance-api/performance-observer-callback-mutate-expected.txt: Added.
* performance-api/performance-observer-callback-mutate.html: Added.
* performance-api/performance-observer-callback-task-expected.txt: Added.
* performance-api/performance-observer-callback-task.html: Added.
* performance-api/performance-observer-entry-sort-expected.txt: Added.
* performance-api/performance-observer-entry-sort.html: Added.
* performance-api/performance-observer-exception-expected.txt: Added.
* performance-api/performance-observer-exception.html: Added.
* performance-api/performance-observer-nested-expected.txt: Added.
* performance-api/performance-observer-nested.html: Added.
* performance-api/performance-observer-order-expected.txt: Added.
* performance-api/performance-observer-order.html: Added.
* performance-api/performance-observer-periodic-expected.txt: Added.
* performance-api/performance-observer-periodic.html: Added.
PerformanceObserver tests.

* performance-api/performance-timeline-api-expected.txt: Added.
* performance-api/performance-timeline-api.html: Added.
Performance timeline tests.

* platform/efl/js/dom/global-constructors-attributes-expected.txt:
* platform/gtk/js/dom/global-constructors-attributes-expected.txt:
* platform/mac-elcapitan/js/dom/global-constructors-attributes-expected.txt:
* platform/mac-wk1/js/dom/global-constructors-attributes-expected.txt:
* platform/mac-yosemite/js/dom/global-constructors-attributes-expected.txt:
* platform/mac/js/dom/global-constructors-attributes-expected.txt:
* platform/win/js/dom/global-constructors-attributes-expected.txt:
New global constructors.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsplatformefljsdomglobalconstructorsattributesexpectedtxt">trunk/LayoutTests/platform/efl/js/dom/global-constructors-attributes-expected.txt</a></li>
<li><a href="#trunkLayoutTestsplatformgtkjsdomglobalconstructorsattributesexpectedtxt">trunk/LayoutTests/platform/gtk/js/dom/global-constructors-attributes-expected.txt</a></li>
<li><a href="#trunkLayoutTestsplatformmacjsdomglobalconstructorsattributesexpectedtxt">trunk/LayoutTests/platform/mac/js/dom/global-constructors-attributes-expected.txt</a></li>
<li><a href="#trunkLayoutTestsplatformmacelcapitanjsdomglobalconstructorsattributesexpectedtxt">trunk/LayoutTests/platform/mac-elcapitan/js/dom/global-constructors-attributes-expected.txt</a></li>
<li><a href="#trunkLayoutTestsplatformmacwk1jsdomglobalconstructorsattributesexpectedtxt">trunk/LayoutTests/platform/mac-wk1/js/dom/global-constructors-attributes-expected.txt</a></li>
<li><a href="#trunkLayoutTestsplatformmacyosemitejsdomglobalconstructorsattributesexpectedtxt">trunk/LayoutTests/platform/mac-yosemite/js/dom/global-constructors-attributes-expected.txt</a></li>
<li><a href="#trunkLayoutTestsplatformwinjsdomglobalconstructorsattributesexpectedtxt">trunk/LayoutTests/platform/win/js/dom/global-constructors-attributes-expected.txt</a></li>
<li><a href="#trunkSourceJavaScriptCoreChangeLog">trunk/Source/JavaScriptCore/ChangeLog</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeCommonIdentifiersh">trunk/Source/JavaScriptCore/runtime/CommonIdentifiers.h</a></li>
<li><a href="#trunkSourceWebCoreCMakeListstxt">trunk/Source/WebCore/CMakeLists.txt</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreDerivedSourcesmake">trunk/Source/WebCore/DerivedSources.make</a></li>
<li><a href="#trunkSourceWebCoreWebCorexcodeprojprojectpbxproj">trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj</a></li>
<li><a href="#trunkSourceWebCorehtmlHTMLMediaElementcpp">trunk/Source/WebCore/html/HTMLMediaElement.cpp</a></li>
<li><a href="#trunkSourceWebCoreloadercacheCachedResourceLoadercpp">trunk/Source/WebCore/loader/cache/CachedResourceLoader.cpp</a></li>
<li><a href="#trunkSourceWebCorepageIntersectionObserverh">trunk/Source/WebCore/page/IntersectionObserver.h</a></li>
<li><a href="#trunkSourceWebCorepagePerformancecpp">trunk/Source/WebCore/page/Performance.cpp</a></li>
<li><a href="#trunkSourceWebCorepagePerformanceh">trunk/Source/WebCore/page/Performance.h</a></li>
<li><a href="#trunkSourceWebCorepagePerformanceEntrycpp">trunk/Source/WebCore/page/PerformanceEntry.cpp</a></li>
<li><a href="#trunkSourceWebCorepagePerformanceEntryh">trunk/Source/WebCore/page/PerformanceEntry.h</a></li>
<li><a href="#trunkSourceWebCorepagePerformanceMarkh">trunk/Source/WebCore/page/PerformanceMark.h</a></li>
<li><a href="#trunkSourceWebCorepagePerformanceMeasureh">trunk/Source/WebCore/page/PerformanceMeasure.h</a></li>
<li><a href="#trunkSourceWebCorepagePerformanceResourceTimingcpp">trunk/Source/WebCore/page/PerformanceResourceTiming.cpp</a></li>
<li><a href="#trunkSourceWebCorepagePerformanceUserTimingcpp">trunk/Source/WebCore/page/PerformanceUserTiming.cpp</a></li>
<li><a href="#trunkSourceWebCorepagePerformanceUserTimingh">trunk/Source/WebCore/page/PerformanceUserTiming.h</a></li>
<li><a href="#trunkSourceWebInspectorUIChangeLog">trunk/Source/WebInspectorUI/ChangeLog</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceModelsNativeFunctionParametersjs">trunk/Source/WebInspectorUI/UserInterface/Models/NativeFunctionParameters.js</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li>trunk/LayoutTests/performance-api/</li>
<li><a href="#trunkLayoutTestsperformanceapiperformanceobserverapiexpectedtxt">trunk/LayoutTests/performance-api/performance-observer-api-expected.txt</a></li>
<li><a href="#trunkLayoutTestsperformanceapiperformanceobserverapihtml">trunk/LayoutTests/performance-api/performance-observer-api.html</a></li>
<li><a href="#trunkLayoutTestsperformanceapiperformanceobserverbasicexpectedtxt">trunk/LayoutTests/performance-api/performance-observer-basic-expected.txt</a></li>
<li><a href="#trunkLayoutTestsperformanceapiperformanceobserverbasichtml">trunk/LayoutTests/performance-api/performance-observer-basic.html</a></li>
<li><a href="#trunkLayoutTestsperformanceapiperformanceobservercallbackmutateexpectedtxt">trunk/LayoutTests/performance-api/performance-observer-callback-mutate-expected.txt</a></li>
<li><a href="#trunkLayoutTestsperformanceapiperformanceobservercallbackmutatehtml">trunk/LayoutTests/performance-api/performance-observer-callback-mutate.html</a></li>
<li><a href="#trunkLayoutTestsperformanceapiperformanceobservercallbacktaskexpectedtxt">trunk/LayoutTests/performance-api/performance-observer-callback-task-expected.txt</a></li>
<li><a href="#trunkLayoutTestsperformanceapiperformanceobservercallbacktaskhtml">trunk/LayoutTests/performance-api/performance-observer-callback-task.html</a></li>
<li><a href="#trunkLayoutTestsperformanceapiperformanceobserverentrysortexpectedtxt">trunk/LayoutTests/performance-api/performance-observer-entry-sort-expected.txt</a></li>
<li><a href="#trunkLayoutTestsperformanceapiperformanceobserverentrysorthtml">trunk/LayoutTests/performance-api/performance-observer-entry-sort.html</a></li>
<li><a href="#trunkLayoutTestsperformanceapiperformanceobserverexceptionexpectedtxt">trunk/LayoutTests/performance-api/performance-observer-exception-expected.txt</a></li>
<li><a href="#trunkLayoutTestsperformanceapiperformanceobserverexceptionhtml">trunk/LayoutTests/performance-api/performance-observer-exception.html</a></li>
<li><a href="#trunkLayoutTestsperformanceapiperformanceobservernestedexpectedtxt">trunk/LayoutTests/performance-api/performance-observer-nested-expected.txt</a></li>
<li><a href="#trunkLayoutTestsperformanceapiperformanceobservernestedhtml">trunk/LayoutTests/performance-api/performance-observer-nested.html</a></li>
<li><a href="#trunkLayoutTestsperformanceapiperformanceobserverorderexpectedtxt">trunk/LayoutTests/performance-api/performance-observer-order-expected.txt</a></li>
<li><a href="#trunkLayoutTestsperformanceapiperformanceobserverorderhtml">trunk/LayoutTests/performance-api/performance-observer-order.html</a></li>
<li><a href="#trunkLayoutTestsperformanceapiperformanceobserverperiodicexpectedtxt">trunk/LayoutTests/performance-api/performance-observer-periodic-expected.txt</a></li>
<li><a href="#trunkLayoutTestsperformanceapiperformanceobserverperiodichtml">trunk/LayoutTests/performance-api/performance-observer-periodic.html</a></li>
<li><a href="#trunkLayoutTestsperformanceapiperformancetimelineapiexpectedtxt">trunk/LayoutTests/performance-api/performance-timeline-api-expected.txt</a></li>
<li><a href="#trunkLayoutTestsperformanceapiperformancetimelineapihtml">trunk/LayoutTests/performance-api/performance-timeline-api.html</a></li>
<li><a href="#trunkSourceWebCorepagePerformanceObservercpp">trunk/Source/WebCore/page/PerformanceObserver.cpp</a></li>
<li><a href="#trunkSourceWebCorepagePerformanceObserverh">trunk/Source/WebCore/page/PerformanceObserver.h</a></li>
<li><a href="#trunkSourceWebCorepagePerformanceObserveridl">trunk/Source/WebCore/page/PerformanceObserver.idl</a></li>
<li><a href="#trunkSourceWebCorepagePerformanceObserverCallbackh">trunk/Source/WebCore/page/PerformanceObserverCallback.h</a></li>
<li><a href="#trunkSourceWebCorepagePerformanceObserverCallbackidl">trunk/Source/WebCore/page/PerformanceObserverCallback.idl</a></li>
<li><a href="#trunkSourceWebCorepagePerformanceObserverEntryListcpp">trunk/Source/WebCore/page/PerformanceObserverEntryList.cpp</a></li>
<li><a href="#trunkSourceWebCorepagePerformanceObserverEntryListh">trunk/Source/WebCore/page/PerformanceObserverEntryList.h</a></li>
<li><a href="#trunkSourceWebCorepagePerformanceObserverEntryListidl">trunk/Source/WebCore/page/PerformanceObserverEntryList.idl</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (211405 => 211406)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2017-01-31 04:50:40 UTC (rev 211405)
+++ trunk/LayoutTests/ChangeLog        2017-01-31 06:21:35 UTC (rev 211406)
</span><span class="lines">@@ -1,3 +1,44 @@
</span><ins>+2017-01-30  Joseph Pecoraro  &lt;pecoraro@apple.com&gt;
+
+        Implement PerformanceObserver
+        https://bugs.webkit.org/show_bug.cgi?id=167546
+        &lt;rdar://problem/30247959&gt;
+
+        Reviewed by Ryosuke Niwa.
+
+        * performance-api/performance-observer-api-expected.txt: Added.
+        * performance-api/performance-observer-api.html: Added.
+        * performance-api/performance-observer-basic-expected.txt: Added.
+        * performance-api/performance-observer-basic.html: Added.
+        * performance-api/performance-observer-callback-mutate-expected.txt: Added.
+        * performance-api/performance-observer-callback-mutate.html: Added.
+        * performance-api/performance-observer-callback-task-expected.txt: Added.
+        * performance-api/performance-observer-callback-task.html: Added.
+        * performance-api/performance-observer-entry-sort-expected.txt: Added.
+        * performance-api/performance-observer-entry-sort.html: Added.
+        * performance-api/performance-observer-exception-expected.txt: Added.
+        * performance-api/performance-observer-exception.html: Added.
+        * performance-api/performance-observer-nested-expected.txt: Added.
+        * performance-api/performance-observer-nested.html: Added.
+        * performance-api/performance-observer-order-expected.txt: Added.
+        * performance-api/performance-observer-order.html: Added.
+        * performance-api/performance-observer-periodic-expected.txt: Added.
+        * performance-api/performance-observer-periodic.html: Added.
+        PerformanceObserver tests.
+
+        * performance-api/performance-timeline-api-expected.txt: Added.
+        * performance-api/performance-timeline-api.html: Added.
+        Performance timeline tests.
+
+        * platform/efl/js/dom/global-constructors-attributes-expected.txt:
+        * platform/gtk/js/dom/global-constructors-attributes-expected.txt:
+        * platform/mac-elcapitan/js/dom/global-constructors-attributes-expected.txt:
+        * platform/mac-wk1/js/dom/global-constructors-attributes-expected.txt:
+        * platform/mac-yosemite/js/dom/global-constructors-attributes-expected.txt:
+        * platform/mac/js/dom/global-constructors-attributes-expected.txt:
+        * platform/win/js/dom/global-constructors-attributes-expected.txt:
+        New global constructors.
+
</ins><span class="cx"> 2017-01-30  Youenn Fablet  &lt;youenn@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         [WebRTC] getStats does not support legacy callback
</span></span></pre></div>
<a id="trunkLayoutTestsperformanceapiperformanceobserverapiexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/performance-api/performance-observer-api-expected.txt (0 => 211406)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/performance-api/performance-observer-api-expected.txt                                (rev 0)
+++ trunk/LayoutTests/performance-api/performance-observer-api-expected.txt        2017-01-31 06:21:35 UTC (rev 211406)
</span><span class="lines">@@ -0,0 +1,35 @@
</span><ins>+Basic Interface test for PerformanceObserver APIs.
+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
+PerformanceObserver
+PASS PerformanceObserver is defined.
+PASS PerformanceObserver.prototype.observe is defined.
+PASS PerformanceObserver.prototype.disconnect is defined.
+PASS PerformanceObserver() threw exception TypeError: Constructor requires 'new' operator.
+PASS new PerformanceObserver() threw exception TypeError: Not enough arguments.
+PASS new PerformanceObserver(1) threw exception TypeError: Argument 1 ('callback') to the PerformanceObserver constructor must be a function.
+PASS observer = new PerformanceObserver(function() {}) did not throw exception.
+PASS observer.observe() threw exception TypeError: Not enough arguments.
+PASS observer.observe(&quot;mark&quot;) threw exception TypeError: Type error.
+PASS observer.observe({}) threw exception TypeError: Member PerformanceObserverInit.entryTypes is required and must be an instance of sequence.
+PASS observer.observe({entryTypes:&quot;mark&quot;}) threw exception TypeError: Value is not a sequence.
+PASS observer.observe({entryTypes:[]}) threw exception TypeError: entryTypes cannot be an empty list.
+PASS observer.observe({entryTypes:[&quot;not-real&quot;]}) threw exception TypeError: entryTypes contained only unsupported types.
+PASS observer.observe({entryTypes:[&quot;mark&quot;]}) did not throw exception.
+PASS observer.observe({entryTypes:[&quot;mark&quot;, &quot;not-real&quot;]}) did not throw exception.
+PASS observer.observe({entryTypes:[&quot;mark&quot;, &quot;measure&quot;]}) did not throw exception.
+PASS observer.disconnect() did not throw exception.
+PASS observer.disconnect() did not throw exception.
+
+PerformanceObserverEntryList
+PASS PerformanceObserverEntryList is defined.
+PASS PerformanceObserverEntryList.prototype.getEntries is defined.
+PASS PerformanceObserverEntryList.prototype.getEntriesByType is defined.
+PASS PerformanceObserverEntryList.prototype.getEntriesByName is defined.
+PASS new PerformanceObserverEntryList() threw exception TypeError: function is not a constructor (evaluating 'new PerformanceObserverEntryList()').
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsperformanceapiperformanceobserverapihtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/performance-api/performance-observer-api.html (0 => 211406)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/performance-api/performance-observer-api.html                                (rev 0)
+++ trunk/LayoutTests/performance-api/performance-observer-api.html        2017-01-31 06:21:35 UTC (rev 211406)
</span><span class="lines">@@ -0,0 +1,40 @@
</span><ins>+&lt;!DOCTYPE HTML&gt;
+&lt;html&gt;
+&lt;head&gt;
+&lt;script src=&quot;../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
+&lt;script&gt;
+description(&quot;Basic Interface test for PerformanceObserver APIs.&quot;);
+
+debug(&quot;PerformanceObserver&quot;);
+shouldBeDefined(`PerformanceObserver`);
+shouldBeDefined(`PerformanceObserver.prototype.observe`);
+shouldBeDefined(`PerformanceObserver.prototype.disconnect`);
+shouldThrow(`PerformanceObserver()`);
+shouldThrow(`new PerformanceObserver()`);
+shouldThrow(`new PerformanceObserver(1)`);
+shouldNotThrow(`observer = new PerformanceObserver(function() {})`);
+shouldThrow(`observer.observe()`);
+shouldThrow(`observer.observe(&quot;mark&quot;)`);
+shouldThrow(`observer.observe({})`);
+shouldThrow(`observer.observe({entryTypes:&quot;mark&quot;})`);
+shouldThrow(`observer.observe({entryTypes:[]})`);
+shouldThrow(`observer.observe({entryTypes:[&quot;not-real&quot;]})`);
+shouldNotThrow(`observer.observe({entryTypes:[&quot;mark&quot;]})`);
+shouldNotThrow(`observer.observe({entryTypes:[&quot;mark&quot;, &quot;not-real&quot;]})`);
+shouldNotThrow(`observer.observe({entryTypes:[&quot;mark&quot;, &quot;measure&quot;]})`);
+shouldNotThrow(`observer.disconnect()`);
+shouldNotThrow(`observer.disconnect()`);
+
+debug(&quot;&quot;);
+debug(&quot;PerformanceObserverEntryList&quot;);
+shouldBeDefined(`PerformanceObserverEntryList`);
+shouldBeDefined(`PerformanceObserverEntryList.prototype.getEntries`);
+shouldBeDefined(`PerformanceObserverEntryList.prototype.getEntriesByType`);
+shouldBeDefined(`PerformanceObserverEntryList.prototype.getEntriesByName`);
+shouldThrow(`new PerformanceObserverEntryList()`);
+&lt;/script&gt;
+&lt;script src=&quot;../resources/js-test-post.js&quot;&gt;&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsperformanceapiperformanceobserverbasicexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/performance-api/performance-observer-basic-expected.txt (0 => 211406)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/performance-api/performance-observer-basic-expected.txt                                (rev 0)
+++ trunk/LayoutTests/performance-api/performance-observer-basic-expected.txt        2017-01-31 06:21:35 UTC (rev 211406)
</span><span class="lines">@@ -0,0 +1,52 @@
</span><ins>+Basic Behavior test for PerformanceObserver APIs.
+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
+Inside PerformanceObserver callback
+PASS argumentsLength === 2 is true
+PASS list instanceof PerformanceObserverEntryList is true
+PASS obs instanceof PerformanceObserver is true
+PASS obs === observer is true
+FAIL thisObject instanceof PerformanceObserver should be true. Was false.
+FAIL thisObject === observer should be true. Was false.
+
+PerformanceObserverEntryList APIs
+PASS list.getEntries() instanceof Array is true
+PASS list.getEntries().length === 2 is true
+PASS list.getEntries()[0] instanceof PerformanceEntry is true
+PASS list.getEntries()[0].name is &quot;mark3&quot;
+PASS list.getEntries()[1].name is &quot;mark4&quot;
+PASS list.getEntries()[0].startTime &lt;= list.getEntries()[1].startTime is true
+PASS list.getEntriesByType() threw exception TypeError: Not enough arguments.
+PASS list.getEntriesByType(&quot;not-real&quot;).length === 0 is true
+PASS list.getEntriesByType(&quot;mark&quot;).length === 2 is true
+PASS list.getEntriesByType(&quot;mark&quot;)[0] instanceof PerformanceEntry is true
+PASS list.getEntriesByType(&quot;mark&quot;)[0].name is &quot;mark3&quot;
+PASS list.getEntriesByType(&quot;mark&quot;)[1].name is &quot;mark4&quot;
+PASS list.getEntriesByName() threw exception TypeError: Not enough arguments.
+PASS list.getEntriesByName(&quot;not-real&quot;).length === 0 is true
+PASS list.getEntriesByName(&quot;mark1&quot;).length === 0 is true
+PASS list.getEntriesByName(&quot;mark3&quot;).length === 1 is true
+PASS list.getEntriesByName(&quot;mark3&quot;)[0] instanceof PerformanceEntry is true
+PASS list.getEntriesByName(&quot;mark3&quot;)[0].name is &quot;mark3&quot;
+PASS list.getEntriesByName(&quot;mark4&quot;).length === 1 is true
+PASS list.getEntriesByName(&quot;mark4&quot;)[0] instanceof PerformanceEntry is true
+PASS list.getEntriesByName(&quot;mark4&quot;)[0].name is &quot;mark4&quot;
+PASS list.getEntriesByName() threw exception TypeError: Not enough arguments.
+PASS list.getEntriesByName(&quot;not-real&quot;).length === 0 is true
+PASS list.getEntriesByName(&quot;mark1&quot;).length === 0 is true
+PASS list.getEntriesByName(&quot;mark3&quot;).length === 1 is true
+PASS list.getEntriesByName(&quot;mark3&quot;)[0] instanceof PerformanceEntry is true
+PASS list.getEntriesByName(&quot;mark3&quot;)[0].name is &quot;mark3&quot;
+PASS list.getEntriesByName(&quot;mark4&quot;).length === 1 is true
+PASS list.getEntriesByName(&quot;mark4&quot;)[0] instanceof PerformanceEntry is true
+PASS list.getEntriesByName(&quot;mark4&quot;)[0].name is &quot;mark4&quot;
+PASS list.getEntriesByName(&quot;mark3&quot;, &quot;not-real&quot;).length === 0 is true
+PASS list.getEntriesByName(&quot;mark3&quot;, &quot;mark&quot;).length === 1 is true
+PASS list.getEntriesByName(null, &quot;mark&quot;).length === 0 is true
+PASS list.getEntriesByName(undefined, &quot;mark&quot;).length === 0 is true
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsperformanceapiperformanceobserverbasichtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/performance-api/performance-observer-basic.html (0 => 211406)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/performance-api/performance-observer-basic.html                                (rev 0)
+++ trunk/LayoutTests/performance-api/performance-observer-basic.html        2017-01-31 06:21:35 UTC (rev 211406)
</span><span class="lines">@@ -0,0 +1,95 @@
</span><ins>+&lt;!DOCTYPE HTML&gt;
+&lt;html&gt;
+&lt;head&gt;
+&lt;script src=&quot;../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
+&lt;script&gt;
+description(&quot;Basic Behavior test for PerformanceObserver APIs.&quot;);
+window.jsTestIsAsync = true;
+
+// PerformanceObservers that are not actively observing should not fire.
+let observerNotObserving = new PerformanceObserver(function() {
+    testFailed(&quot;PerformanceObserver never registered should not be called&quot;);
+});
+
+let observerNotObserving2 = new PerformanceObserver(function() {
+    testFailed(&quot;PerformanceObserver not actively observing should not be called&quot;);
+});
+observerNotObserving2.observe({entryTypes: [&quot;mark&quot;]});
+observerNotObserving2.disconnect();
+
+// PerformanceObservers for different entry types should not fire.
+let observerNotMarks = new PerformanceObserver(function() {
+    testFailed(&quot;PerformanceObserver observing measures should not be called&quot;);
+});
+
+// Observer sees marks while it is registered.
+performance.mark(&quot;mark1&quot;);
+window.observer = new PerformanceObserver(function(list, obs) {
+    window.argumentsLength = arguments.length;
+    window.list = list;
+    window.obs = obs;
+    window.thisObject = this;
+
+    debug(&quot;Inside PerformanceObserver callback&quot;);
+    shouldBeTrue(`argumentsLength === 2`);
+    shouldBeTrue(`list instanceof PerformanceObserverEntryList`);
+    shouldBeTrue(`obs instanceof PerformanceObserver`);
+    shouldBeTrue(`obs === observer`);
+    // FIXME: &lt;https://webkit.org/b/167549&gt; Invoking generated callback should allow setting the `this` object
+    shouldBeTrue(`thisObject instanceof PerformanceObserver`);
+    shouldBeTrue(`thisObject === observer`);
+
+    debug(&quot;&quot;);
+    debug(&quot;PerformanceObserverEntryList APIs&quot;);
+
+    shouldBeTrue(`list.getEntries() instanceof Array`);
+    shouldBeTrue(`list.getEntries().length === 2`);
+    shouldBeTrue(`list.getEntries()[0] instanceof PerformanceEntry`);
+    shouldBeEqualToString(`list.getEntries()[0].name`, &quot;mark3&quot;);
+    shouldBeEqualToString(`list.getEntries()[1].name`, &quot;mark4&quot;);
+    shouldBeTrue(`list.getEntries()[0].startTime &lt;= list.getEntries()[1].startTime`);
+
+    shouldThrow(`list.getEntriesByType()`);
+    shouldBeTrue(`list.getEntriesByType(&quot;not-real&quot;).length === 0`);
+    shouldBeTrue(`list.getEntriesByType(&quot;mark&quot;).length === 2`);
+    shouldBeTrue(`list.getEntriesByType(&quot;mark&quot;)[0] instanceof PerformanceEntry`);
+    shouldBeEqualToString(`list.getEntriesByType(&quot;mark&quot;)[0].name`, &quot;mark3&quot;);
+    shouldBeEqualToString(`list.getEntriesByType(&quot;mark&quot;)[1].name`, &quot;mark4&quot;);
+
+    shouldThrow(`list.getEntriesByName()`);
+    shouldBeTrue(`list.getEntriesByName(&quot;not-real&quot;).length === 0`);
+    shouldBeTrue(`list.getEntriesByName(&quot;mark1&quot;).length === 0`);
+    shouldBeTrue(`list.getEntriesByName(&quot;mark3&quot;).length === 1`);
+    shouldBeTrue(`list.getEntriesByName(&quot;mark3&quot;)[0] instanceof PerformanceEntry`);
+    shouldBeEqualToString(`list.getEntriesByName(&quot;mark3&quot;)[0].name`, &quot;mark3&quot;);
+    shouldBeTrue(`list.getEntriesByName(&quot;mark4&quot;).length === 1`);
+    shouldBeTrue(`list.getEntriesByName(&quot;mark4&quot;)[0] instanceof PerformanceEntry`);
+    shouldBeEqualToString(`list.getEntriesByName(&quot;mark4&quot;)[0].name`, &quot;mark4&quot;);
+
+    shouldThrow(`list.getEntriesByName()`);
+    shouldBeTrue(`list.getEntriesByName(&quot;not-real&quot;).length === 0`);
+    shouldBeTrue(`list.getEntriesByName(&quot;mark1&quot;).length === 0`);
+    shouldBeTrue(`list.getEntriesByName(&quot;mark3&quot;).length === 1`);
+    shouldBeTrue(`list.getEntriesByName(&quot;mark3&quot;)[0] instanceof PerformanceEntry`);
+    shouldBeEqualToString(`list.getEntriesByName(&quot;mark3&quot;)[0].name`, &quot;mark3&quot;);
+    shouldBeTrue(`list.getEntriesByName(&quot;mark4&quot;).length === 1`);
+    shouldBeTrue(`list.getEntriesByName(&quot;mark4&quot;)[0] instanceof PerformanceEntry`);
+    shouldBeEqualToString(`list.getEntriesByName(&quot;mark4&quot;)[0].name`, &quot;mark4&quot;);
+
+    shouldBeTrue(`list.getEntriesByName(&quot;mark3&quot;, &quot;not-real&quot;).length === 0`);
+    shouldBeTrue(`list.getEntriesByName(&quot;mark3&quot;, &quot;mark&quot;).length === 1`);
+    shouldBeTrue(`list.getEntriesByName(null, &quot;mark&quot;).length === 0`);
+    shouldBeTrue(`list.getEntriesByName(undefined, &quot;mark&quot;).length === 0`);
+
+    finishJSTest();
+});
+performance.mark(&quot;mark2&quot;);
+observer.observe({entryTypes: [&quot;mark&quot;]});
+performance.mark(&quot;mark3&quot;);
+performance.mark(&quot;mark4&quot;);
+&lt;/script&gt;
+&lt;script src=&quot;../resources/js-test-post.js&quot;&gt;&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsperformanceapiperformanceobservercallbackmutateexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/performance-api/performance-observer-callback-mutate-expected.txt (0 => 211406)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/performance-api/performance-observer-callback-mutate-expected.txt                                (rev 0)
+++ trunk/LayoutTests/performance-api/performance-observer-callback-mutate-expected.txt        2017-01-31 06:21:35 UTC (rev 211406)
</span><span class="lines">@@ -0,0 +1,42 @@
</span><ins>+Test PerformanceObserver mutating itself while in its callback.
+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
+Observering: [&quot;measure&quot;]
+PASS PerformanceObserver callback fired
+PASS list.getEntries().length is 1
+PASS list.getEntries()[0].entryType is &quot;measure&quot;
+PASS list.getEntries()[0].name is &quot;measure1&quot;
+Observering: [&quot;mark&quot;]
+ - measure1
+PASS PerformanceObserver callback fired
+PASS list.getEntries().length is 1
+PASS list.getEntries()[0].entryType is &quot;mark&quot;
+PASS list.getEntries()[0].name is &quot;mark2&quot;
+Observering: [&quot;measure&quot;]
+ - mark2
+PASS PerformanceObserver callback fired
+PASS list.getEntries().length is 2
+PASS list.getEntries()[0].entryType is &quot;measure&quot;
+PASS list.getEntries()[0].name is &quot;measure3&quot;
+PASS list.getEntries()[1].entryType is &quot;mark&quot;
+PASS list.getEntries()[1].name is &quot;mark-before-change-observe-state-to-measure&quot;
+Observering: [&quot;mark&quot;,&quot;measure&quot;]
+ - measure3
+ - mark-before-change-observe-state-to-measure
+PASS PerformanceObserver callback fired
+PASS list.getEntries().length is 3
+PASS list.getEntries()[0].entryType is &quot;measure&quot;
+PASS list.getEntries()[0].name is &quot;measure-before-change-observe-state-to-both&quot;
+PASS list.getEntries()[1].entryType is &quot;measure&quot;
+PASS list.getEntries()[1].name is &quot;measure4&quot;
+PASS list.getEntries()[2].entryType is &quot;mark&quot;
+PASS list.getEntries()[2].name is &quot;mark4&quot;
+ - measure-before-change-observe-state-to-both
+ - measure4
+ - mark4
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsperformanceapiperformanceobservercallbackmutatehtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/performance-api/performance-observer-callback-mutate.html (0 => 211406)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/performance-api/performance-observer-callback-mutate.html                                (rev 0)
+++ trunk/LayoutTests/performance-api/performance-observer-callback-mutate.html        2017-01-31 06:21:35 UTC (rev 211406)
</span><span class="lines">@@ -0,0 +1,97 @@
</span><ins>+&lt;!DOCTYPE HTML&gt;
+&lt;html&gt;
+&lt;head&gt;
+&lt;script src=&quot;../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
+&lt;script&gt;
+description(&quot;Test PerformanceObserver mutating itself while in its callback.&quot;);
+window.jsTestIsAsync = true;
+
+// Observer is first watching measures =&gt; then marks =&gt; measures =&gt; both.
+// NOTE: Measures are sorted before marks due to startTime.
+
+window.callbackCount = 0;
+window.list = null;
+
+let observer = new PerformanceObserver((list) =&gt; {
+    window.list = list;
+    callbackCount++;
+    testPassed(&quot;PerformanceObserver callback fired&quot;);
+
+    if (callbackCount === 1) {
+        // Expected: [measure1]
+        shouldBe(`list.getEntries().length`, `1`);
+        shouldBeEqualToString(`list.getEntries()[0].entryType`, &quot;measure&quot;);
+        shouldBeEqualToString(`list.getEntries()[0].name`, &quot;measure1&quot;);
+
+        updateObserver([&quot;mark&quot;]);
+
+        performance.mark(&quot;mark2&quot;);
+        performance.measure(&quot;measure2&quot;);
+    } else if (callbackCount === 2) {
+        // Expected: [mark2]
+        shouldBe(`list.getEntries().length`, `1`);
+        shouldBeEqualToString(`list.getEntries()[0].entryType`, &quot;mark&quot;);
+        shouldBeEqualToString(`list.getEntries()[0].name`, &quot;mark2&quot;);
+
+        performance.mark(&quot;mark-before-change-observe-state-to-measure&quot;);
+        performance.measure(&quot;measure-before-change-observe-state-to-measure&quot;);
+
+        updateObserver([&quot;measure&quot;]);
+
+        performance.mark(&quot;mark3&quot;);
+        performance.measure(&quot;measure3&quot;);
+    } else if (callbackCount === 3) {
+        // Expected: [measure3, mark-before-change-observe-state-to-measure]
+        shouldBe(`list.getEntries().length`, `2`);
+        shouldBeEqualToString(`list.getEntries()[0].entryType`, &quot;measure&quot;);
+        shouldBeEqualToString(`list.getEntries()[0].name`, &quot;measure3&quot;);
+        shouldBeEqualToString(`list.getEntries()[1].entryType`, &quot;mark&quot;);
+        shouldBeEqualToString(`list.getEntries()[1].name`, &quot;mark-before-change-observe-state-to-measure&quot;);
+
+        performance.mark(&quot;mark-before-change-observe-state-to-both&quot;);
+        performance.measure(&quot;measure-before-change-observe-state-to-both&quot;);
+
+        updateObserver([&quot;mark&quot;, &quot;measure&quot;]);
+
+        performance.mark(&quot;mark4&quot;);
+        performance.measure(&quot;measure4&quot;);
+    } else if (callbackCount === 4) {
+        // Expected: [measure-before-change-observe-state-to-both, measure4, mark4]
+        shouldBe(`list.getEntries().length`, `3`);
+        shouldBeEqualToString(`list.getEntries()[0].entryType`, &quot;measure&quot;);
+        shouldBeEqualToString(`list.getEntries()[0].name`, &quot;measure-before-change-observe-state-to-both&quot;);
+        shouldBeEqualToString(`list.getEntries()[1].entryType`, &quot;measure&quot;);
+        shouldBeEqualToString(`list.getEntries()[1].name`, &quot;measure4&quot;);
+        shouldBeEqualToString(`list.getEntries()[2].entryType`, &quot;mark&quot;);
+        shouldBeEqualToString(`list.getEntries()[2].name`, &quot;mark4&quot;);
+
+        performance.mark(&quot;mark-before-disconnect&quot;);
+        performance.measure(&quot;measure-before-disconnect&quot;);
+
+        observer.disconnect();
+
+        performance.mark(&quot;mark-after-disconnect&quot;);
+        performance.measure(&quot;measure-after-disconnect&quot;);
+
+        setTimeout(finishJSTest, 50);
+    } else if (callbackCount === 5)
+        testFailed(&quot;Should not have received another callback, the observer was disconnected&quot;);
+
+    for (let mark of list.getEntries())
+        debug(&quot; - &quot; + mark.name);
+});
+
+function updateObserver(entryTypes) {
+    debug(&quot;Observering: &quot; + JSON.stringify(entryTypes));
+    observer.observe({entryTypes});
+}
+
+updateObserver([&quot;measure&quot;]);
+performance.mark(&quot;mark1&quot;);
+performance.measure(&quot;measure1&quot;);
+&lt;/script&gt;
+&lt;script src=&quot;../resources/js-test-post.js&quot;&gt;&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsperformanceapiperformanceobservercallbacktaskexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/performance-api/performance-observer-callback-task-expected.txt (0 => 211406)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/performance-api/performance-observer-callback-task-expected.txt                                (rev 0)
+++ trunk/LayoutTests/performance-api/performance-observer-callback-task-expected.txt        2017-01-31 06:21:35 UTC (rev 211406)
</span><span class="lines">@@ -0,0 +1,16 @@
</span><ins>+Test PerformanceObserver callback is a task, not a microtask.
+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
+PASS PerformanceObserver callback fired
+PASS microtaskExecuted is false
+PASS list.getEntries().length is 1
+PASS Promise microtask fired
+PASS PerformanceObserver callback fired
+PASS list.getEntries().length is 2
+PASS microtaskExecuted is true
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsperformanceapiperformanceobservercallbacktaskhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/performance-api/performance-observer-callback-task.html (0 => 211406)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/performance-api/performance-observer-callback-task.html                                (rev 0)
+++ trunk/LayoutTests/performance-api/performance-observer-callback-task.html        2017-01-31 06:21:35 UTC (rev 211406)
</span><span class="lines">@@ -0,0 +1,48 @@
</span><ins>+&lt;!DOCTYPE HTML&gt;
+&lt;html&gt;
+&lt;head&gt;
+&lt;script src=&quot;../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
+&lt;script&gt;
+description(&quot;Test PerformanceObserver callback is a task, not a microtask.&quot;);
+window.jsTestIsAsync = true;
+
+window.microtaskExecuted = false;
+window.callbackCount = 0;
+window.list = null;
+
+let observer = new PerformanceObserver((list) =&gt; {
+    window.list = list;
+    callbackCount++;
+
+    testPassed(&quot;PerformanceObserver callback fired&quot;);
+
+    if (callbackCount === 1) {
+        shouldBeFalse(`microtaskExecuted`);
+        shouldBe(`list.getEntries().length`, `1`);
+        performance.mark(&quot;mark2&quot;);
+        Promise.resolve().then(() =&gt; {
+            testPassed(&quot;Promise microtask fired&quot;);
+            microtaskExecuted = true;
+            performance.mark(&quot;mark3&quot;);
+        });
+        return;
+    }
+
+    if (callbackCount === 2) {
+        shouldBe(`list.getEntries().length`, `2`);
+        shouldBeTrue(`microtaskExecuted`);
+        finishJSTest();
+        return;
+    }
+
+    testFailed(&quot;Callback should not have fired again&quot;);
+});
+
+observer.observe({entryTypes: [&quot;mark&quot;]});
+performance.mark(&quot;mark1&quot;);
+&lt;/script&gt;
+&lt;script src=&quot;../resources/js-test-post.js&quot;&gt;&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsperformanceapiperformanceobserverentrysortexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/performance-api/performance-observer-entry-sort-expected.txt (0 => 211406)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/performance-api/performance-observer-entry-sort-expected.txt                                (rev 0)
+++ trunk/LayoutTests/performance-api/performance-observer-entry-sort-expected.txt        2017-01-31 06:21:35 UTC (rev 211406)
</span><span class="lines">@@ -0,0 +1,27 @@
</span><ins>+Test PerformanceObserver mutating itself while in its callback.
+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
+PASS PerformanceObserver callback fired
+PASS list.getEntries().length is 8
+PASS sorted is true
+PASS list.getEntries()[0].entryType is &quot;measure&quot;
+PASS list.getEntries()[1].entryType is &quot;measure&quot;
+PASS list.getEntries()[2].entryType is &quot;measure&quot;
+PASS list.getEntries()[3].entryType is &quot;mark&quot;
+PASS list.getEntries()[3].name is &quot;mark1&quot;
+PASS list.getEntries()[7].entryType is &quot;mark&quot;
+PASS list.getEntries()[7].name is &quot;mark3&quot;
+PASS list.getEntries()[0].name is &quot;measure1&quot;
+PASS list.getEntries()[1].name is &quot;measure2&quot;
+PASS list.getEntries()[2].name is &quot;measure3&quot;
+PASS list.getEntries()[3].name is &quot;mark1&quot;
+PASS list.getEntries()[4].name is &quot;mark2&quot;
+PASS list.getEntries()[5].name is &quot;measure-matching-mark2-1&quot;
+PASS list.getEntries()[6].name is &quot;measure-matching-mark2-2&quot;
+PASS list.getEntries()[7].name is &quot;mark3&quot;
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsperformanceapiperformanceobserverentrysorthtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/performance-api/performance-observer-entry-sort.html (0 => 211406)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/performance-api/performance-observer-entry-sort.html                                (rev 0)
+++ trunk/LayoutTests/performance-api/performance-observer-entry-sort.html        2017-01-31 06:21:35 UTC (rev 211406)
</span><span class="lines">@@ -0,0 +1,78 @@
</span><ins>+&lt;!DOCTYPE HTML&gt;
+&lt;html&gt;
+&lt;head&gt;
+&lt;script src=&quot;../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
+&lt;script&gt;
+description(&quot;Test PerformanceObserver mutating itself while in its callback.&quot;);
+window.jsTestIsAsync = true;
+
+function wait() {
+    let now = performance.now();
+    while (now === performance.now())
+        continue;
+}
+
+let observer = new PerformanceObserver((list) =&gt; {
+    testPassed(&quot;PerformanceObserver callback fired&quot;);
+
+    window.list = list;
+    window.sorted = true;
+
+    let entries = list.getEntries();
+    let lastStartTime = entries[0].startTime;
+    for (let i = 0; i &lt; entries.length; ++i) {
+        let currentStartTime = entries[i].startTime;
+        if (lastStartTime &gt; currentStartTime) {
+            sorted = false;
+            break;
+        }
+        lastStartTime = currentStartTime;
+    }
+
+    shouldBe(`list.getEntries().length`, `8`);
+    shouldBeTrue(`sorted`);
+
+    // Regardless of how identical start time elements are sorted,
+    // the first three values should be measures1,2,3 with 0 start time,
+    // followed by mark1. The last entry will be mark3.
+    shouldBeEqualToString(`list.getEntries()[0].entryType`, &quot;measure&quot;);
+    shouldBeEqualToString(`list.getEntries()[1].entryType`, &quot;measure&quot;);
+    shouldBeEqualToString(`list.getEntries()[2].entryType`, &quot;measure&quot;);
+    shouldBeEqualToString(`list.getEntries()[3].entryType`, &quot;mark&quot;);
+    shouldBeEqualToString(`list.getEntries()[3].name`, &quot;mark1&quot;);
+    shouldBeEqualToString(`list.getEntries()[7].entryType`, &quot;mark&quot;);
+    shouldBeEqualToString(`list.getEntries()[7].name`, &quot;mark3&quot;);
+
+    // WebKit wants a stable sort based matching user expectations.
+    // The spec is currently imprecise here.
+    // &lt;https://github.com/w3c/performance-timeline/issues/67&gt;
+    shouldBeEqualToString(`list.getEntries()[0].name`, &quot;measure1&quot;);
+    shouldBeEqualToString(`list.getEntries()[1].name`, &quot;measure2&quot;);
+    shouldBeEqualToString(`list.getEntries()[2].name`, &quot;measure3&quot;);
+    shouldBeEqualToString(`list.getEntries()[3].name`, &quot;mark1&quot;);
+    shouldBeEqualToString(`list.getEntries()[4].name`, &quot;mark2&quot;);
+    shouldBeEqualToString(`list.getEntries()[5].name`, &quot;measure-matching-mark2-1&quot;);
+    shouldBeEqualToString(`list.getEntries()[6].name`, &quot;measure-matching-mark2-2&quot;);
+    shouldBeEqualToString(`list.getEntries()[7].name`, &quot;mark3&quot;);
+
+    finishJSTest();
+});
+
+observer.observe({entryTypes: [&quot;mark&quot;, &quot;measure&quot;]});
+
+performance.mark(&quot;mark1&quot;);
+performance.measure(&quot;measure1&quot;);
+wait(); // Ensure mark1 !== mark2 startTime by making sure performance.now advances.
+performance.mark(&quot;mark2&quot;);
+performance.measure(&quot;measure2&quot;);
+performance.measure(&quot;measure-matching-mark2-1&quot;, &quot;mark2&quot;);
+wait(); // Ensure mark2 !== mark3 startTime by making sure performance.now advances.
+performance.mark(&quot;mark3&quot;);
+performance.measure(&quot;measure3&quot;);
+performance.measure(&quot;measure-matching-mark2-2&quot;, &quot;mark2&quot;);
+&lt;/script&gt;
+&lt;script src=&quot;../resources/js-test-post.js&quot;&gt;&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsperformanceapiperformanceobserverexceptionexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/performance-api/performance-observer-exception-expected.txt (0 => 211406)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/performance-api/performance-observer-exception-expected.txt                                (rev 0)
+++ trunk/LayoutTests/performance-api/performance-observer-exception-expected.txt        2017-01-31 06:21:35 UTC (rev 211406)
</span><span class="lines">@@ -0,0 +1,13 @@
</span><ins>+CONSOLE MESSAGE: line 23: EXCEPTION MESSAGE IN CALLBACK
+Ensure PerformanceObserver Exceptions are propogated.
+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
+PerformanceObserver callback fired
+PASS onerror: EXCEPTION MESSAGE IN CALLBACK
+PASS onerror: TypeError: Cannot call a class constructor without |new|
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsperformanceapiperformanceobserverexceptionhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/performance-api/performance-observer-exception.html (0 => 211406)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/performance-api/performance-observer-exception.html                                (rev 0)
+++ trunk/LayoutTests/performance-api/performance-observer-exception.html        2017-01-31 06:21:35 UTC (rev 211406)
</span><span class="lines">@@ -0,0 +1,35 @@
</span><ins>+&lt;!DOCTYPE HTML&gt;
+&lt;html&gt;
+&lt;head&gt;
+&lt;script src=&quot;../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
+&lt;script&gt;
+description(&quot;Ensure PerformanceObserver Exceptions are propogated.&quot;);
+window.jsTestIsAsync = true;
+
+let seenExceptions = 0;
+
+window.onerror = function(message) {
+    testPassed(&quot;onerror: &quot; + message);
+
+    seenExceptions++;
+    if (seenExceptions === 2)
+        finishJSTest();
+}
+
+let observer1 = new PerformanceObserver((list) =&gt; {
+    debug(&quot;PerformanceObserver callback fired&quot;);
+    throw &quot;EXCEPTION MESSAGE IN CALLBACK&quot;;
+});
+
+class MyObserver {};
+let observer2 = new PerformanceObserver(MyObserver);
+
+observer1.observe({entryTypes: [&quot;mark&quot;]});
+observer2.observe({entryTypes: [&quot;mark&quot;]});
+performance.mark(&quot;mark1&quot;);
+&lt;/script&gt;
+&lt;script src=&quot;../resources/js-test-post.js&quot;&gt;&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsperformanceapiperformanceobservernestedexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/performance-api/performance-observer-nested-expected.txt (0 => 211406)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/performance-api/performance-observer-nested-expected.txt                                (rev 0)
+++ trunk/LayoutTests/performance-api/performance-observer-nested-expected.txt        2017-01-31 06:21:35 UTC (rev 211406)
</span><span class="lines">@@ -0,0 +1,23 @@
</span><ins>+Test PerformanceObserver handling of entries added while in callback.
+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
+PASS PerformanceObserver 1 callback fired
+PASS list.getEntries().length is 1
+ - mark1
+PASS PerformanceObserver 2 callback fired
+PASS list.getEntries().length is 2
+ - mark1
+ - mark2
+PASS PerformanceObserver 1 callback fired
+PASS list.getEntries().length is 2
+ - mark2
+ - mark3
+PASS PerformanceObserver 2 callback fired
+PASS list.getEntries().length is 1
+ - mark3
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsperformanceapiperformanceobservernestedhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/performance-api/performance-observer-nested.html (0 => 211406)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/performance-api/performance-observer-nested.html                                (rev 0)
+++ trunk/LayoutTests/performance-api/performance-observer-nested.html        2017-01-31 06:21:35 UTC (rev 211406)
</span><span class="lines">@@ -0,0 +1,61 @@
</span><ins>+&lt;!DOCTYPE HTML&gt;
+&lt;html&gt;
+&lt;head&gt;
+&lt;script src=&quot;../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
+&lt;script&gt;
+description(&quot;Test PerformanceObserver handling of entries added while in callback.&quot;);
+window.jsTestIsAsync = true;
+
+window.callbackCount = 0;
+window.list = null;
+
+let observer1 = new PerformanceObserver((list) =&gt; {
+    window.list = list;
+    callbackCount++;
+    testPassed(&quot;PerformanceObserver 1 callback fired&quot;);
+
+    if (callbackCount === 1) {
+        performance.mark(&quot;mark2&quot;);
+        shouldBe(`list.getEntries().length`, `1`);
+    } else if (callbackCount === 3) {
+        shouldBe(`list.getEntries().length`, `2`);
+    } else {
+        testFailed(&quot;Unexpected callback count&quot;);
+        finishJSTest();
+    }
+
+    for (let mark of list.getEntries())
+        debug(&quot; - &quot; + mark.name);
+});
+
+let observer2 = new PerformanceObserver((list) =&gt; {
+    window.list = list;
+    callbackCount++;
+    testPassed(&quot;PerformanceObserver 2 callback fired&quot;);
+
+    if (callbackCount === 2) {
+        performance.mark(&quot;mark3&quot;);
+        shouldBe(`list.getEntries().length`, `2`);
+    } else if (callbackCount === 4) {
+        shouldBe(`list.getEntries().length`, `1`);
+    } else {
+        testFailed(&quot;Unexpected callback count&quot;);
+        finishJSTest();
+    }
+
+    for (let mark of list.getEntries())
+        debug(&quot; - &quot; + mark.name);
+
+    if (callbackCount === 4)
+        finishJSTest();
+});
+
+observer1.observe({entryTypes: [&quot;mark&quot;]});
+observer2.observe({entryTypes: [&quot;mark&quot;]});
+performance.mark(&quot;mark1&quot;);
+&lt;/script&gt;
+&lt;script src=&quot;../resources/js-test-post.js&quot;&gt;&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsperformanceapiperformanceobserverorderexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/performance-api/performance-observer-order-expected.txt (0 => 211406)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/performance-api/performance-observer-order-expected.txt                                (rev 0)
+++ trunk/LayoutTests/performance-api/performance-observer-order-expected.txt        2017-01-31 06:21:35 UTC (rev 211406)
</span><span class="lines">@@ -0,0 +1,21 @@
</span><ins>+Ensure PerformanceObservers are notified in order of registration (observe).
+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
+PASS PerformanceObserver 1 callback fired
+PASS count is 1
+PASS PerformanceObserver 2 callback fired
+PASS count is 2
+PASS PerformanceObserver 3 callback fired
+PASS count is 3
+PASS PerformanceObserver 4 callback fired
+PASS count is 4
+PASS PerformanceObserver 5 callback fired
+PASS count is 5
+PASS PerformanceObserver 6 callback fired
+PASS count is 6
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsperformanceapiperformanceobserverorderhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/performance-api/performance-observer-order.html (0 => 211406)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/performance-api/performance-observer-order.html                                (rev 0)
+++ trunk/LayoutTests/performance-api/performance-observer-order.html        2017-01-31 06:21:35 UTC (rev 211406)
</span><span class="lines">@@ -0,0 +1,63 @@
</span><ins>+&lt;!DOCTYPE HTML&gt;
+&lt;html&gt;
+&lt;head&gt;
+&lt;script src=&quot;../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
+&lt;script&gt;
+description(&quot;Ensure PerformanceObservers are notified in order of registration (observe).&quot;);
+window.jsTestIsAsync = true;
+
+window.count = 0;
+
+let observer1 = new PerformanceObserver((list) =&gt; {
+    count++;
+    testPassed(&quot;PerformanceObserver 1 callback fired&quot;);
+    shouldBe(`count`, `1`);
+});
+
+let observer2 = new PerformanceObserver((list) =&gt; {
+    count++;
+    testPassed(&quot;PerformanceObserver 2 callback fired&quot;);
+    shouldBe(`count`, `2`);
+});
+
+// Ensure creation doesn't impact order.
+let observerSpecial = new PerformanceObserver((list) =&gt; {
+    count++;
+    testPassed(&quot;PerformanceObserver 6 callback fired&quot;);
+    shouldBe(`count`, `6`);
+    finishJSTest();
+});
+
+let observer3 = new PerformanceObserver((list) =&gt; {
+    count++;
+    testPassed(&quot;PerformanceObserver 3 callback fired&quot;);
+    shouldBe(`count`, `3`);
+});
+
+let observer4 = new PerformanceObserver((list) =&gt; {
+    count++;
+    testPassed(&quot;PerformanceObserver 4 callback fired&quot;);
+    shouldBe(`count`, `4`);
+});
+
+let observer5 = new PerformanceObserver((list) =&gt; {
+    count++;
+    testPassed(&quot;PerformanceObserver 5 callback fired&quot;);
+    shouldBe(`count`, `5`);
+});
+
+// Register all in order.
+for (let o of [observer1, observer2, observerSpecial, observer3, observer4, observer5])
+    o.observe({entryTypes: [&quot;mark&quot;]});
+
+// Unregister and re-register moves this to the back of the line.
+observerSpecial.disconnect();
+observerSpecial.observe({entryTypes: [&quot;mark&quot;]});
+
+performance.mark(&quot;mark1&quot;);
+&lt;/script&gt;
+&lt;script src=&quot;../resources/js-test-post.js&quot;&gt;&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsperformanceapiperformanceobserverperiodicexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/performance-api/performance-observer-periodic-expected.txt (0 => 211406)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/performance-api/performance-observer-periodic-expected.txt                                (rev 0)
+++ trunk/LayoutTests/performance-api/performance-observer-periodic-expected.txt        2017-01-31 06:21:35 UTC (rev 211406)
</span><span class="lines">@@ -0,0 +1,16 @@
</span><ins>+Ensure PerformanceObserver callback fires for all observed entries between observe/disconnect calls.
+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
+PerformanceObserver callback fired: 1 entries
+PASS mark1
+PerformanceObserver callback fired: 2 entries
+PASS mark2
+PASS mark3
+PerformanceObserver callback fired: 1 entries
+PASS mark7
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsperformanceapiperformanceobserverperiodichtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/performance-api/performance-observer-periodic.html (0 => 211406)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/performance-api/performance-observer-periodic.html                                (rev 0)
+++ trunk/LayoutTests/performance-api/performance-observer-periodic.html        2017-01-31 06:21:35 UTC (rev 211406)
</span><span class="lines">@@ -0,0 +1,50 @@
</span><ins>+&lt;!DOCTYPE HTML&gt;
+&lt;html&gt;
+&lt;head&gt;
+&lt;script src=&quot;../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
+&lt;script&gt;
+description(&quot;Ensure PerformanceObserver callback fires for all observed entries between observe/disconnect calls.&quot;);
+window.jsTestIsAsync = true;
+
+let shouldEnd = false;
+
+let observer = new PerformanceObserver((list) =&gt; {
+    debug(&quot;PerformanceObserver callback fired: &quot; + list.getEntries().length + &quot; entries&quot;);
+    for (let mark of list.getEntries()) {
+        if (mark.name === &quot;mark5&quot; || mark.name === &quot;mark6&quot;)
+            testFailed(&quot;Should not have observed &quot; + mark.name);
+        else
+            testPassed(mark.name);
+    }
+    if (shouldEnd)
+        finishJSTest();
+});
+observer.observe({entryTypes: [&quot;mark&quot;]});
+
+// ---
+
+performance.mark(&quot;mark1&quot;);
+
+setTimeout(() =&gt; {
+    performance.mark(&quot;mark2&quot;);
+    performance.mark(&quot;mark3&quot;);
+}, 50);
+
+setTimeout(() =&gt; {
+    performance.mark(&quot;mark4&quot;);
+    observer.disconnect();
+    performance.mark(&quot;mark5&quot;); // NOT seen.
+}, 100);
+
+setTimeout(() =&gt; {
+    performance.mark(&quot;mark6&quot;); // NOT seen.
+    observer.observe({entryTypes: [&quot;mark&quot;]});
+    performance.mark(&quot;mark7&quot;);
+    shouldEnd = true;
+}, 150);
+&lt;/script&gt;
+&lt;script src=&quot;../resources/js-test-post.js&quot;&gt;&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsperformanceapiperformancetimelineapiexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/performance-api/performance-timeline-api-expected.txt (0 => 211406)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/performance-api/performance-timeline-api-expected.txt                                (rev 0)
+++ trunk/LayoutTests/performance-api/performance-timeline-api-expected.txt        2017-01-31 06:21:35 UTC (rev 211406)
</span><span class="lines">@@ -0,0 +1,48 @@
</span><ins>+Basic Interface test for performance-timeline APIs.
+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
+PerformanceEntry
+PASS PerformanceEntry is defined.
+PASS &quot;name&quot; in PerformanceEntry.prototype is true
+PASS &quot;entryType&quot; in PerformanceEntry.prototype is true
+PASS &quot;startTime&quot; in PerformanceEntry.prototype is true
+PASS &quot;duration&quot; in PerformanceEntry.prototype is true
+PASS new PerformanceEntry() threw exception TypeError: function is not a constructor (evaluating 'new PerformanceEntry()').
+
+Performance extensions
+PASS Performance.prototype.getEntries is defined.
+PASS Performance.prototype.getEntriesByType is defined.
+PASS Performance.prototype.getEntriesByName is defined.
+PASS performance.getEntries() instanceof Array is true
+PASS performance.getEntries().length === 0 is true
+PASS performance.mark(&quot;test&quot;); did not throw exception.
+PASS performance.getEntries().length === 1 is true
+PASS performance.getEntries()[0] instanceof PerformanceEntry is true
+PASS performance.getEntries()[0].name is &quot;test&quot;
+PASS performance.getEntries()[0].entryType is &quot;mark&quot;
+PASS typeof performance.getEntries()[0].startTime === &quot;number&quot; is true
+PASS typeof performance.getEntries()[0].duration === &quot;number&quot; is true
+PASS performance.getEntriesByType() threw exception TypeError: Not enough arguments.
+PASS performance.getEntriesByType(&quot;not-real&quot;).length === 0 is true
+PASS performance.getEntriesByType(&quot;mark&quot;).length === 1 is true
+PASS performance.getEntriesByType(&quot;mark&quot;)[0] instanceof PerformanceEntry is true
+PASS performance.getEntriesByType(&quot;mark&quot;)[0].name is &quot;test&quot;
+PASS performance.getEntriesByType(&quot;mark&quot;)[0].entryType is &quot;mark&quot;
+PASS typeof performance.getEntriesByType(&quot;mark&quot;)[0].startTime === &quot;number&quot; is true
+PASS typeof performance.getEntriesByType(&quot;mark&quot;)[0].duration === &quot;number&quot; is true
+PASS performance.getEntriesByName() threw exception TypeError: Not enough arguments.
+PASS performance.getEntriesByName(&quot;not-real&quot;).length === 0 is true
+PASS performance.getEntriesByName(&quot;test&quot;).length === 1 is true
+PASS performance.getEntriesByName(&quot;test&quot;)[0] instanceof PerformanceEntry is true
+PASS performance.getEntriesByName(&quot;test&quot;)[0].name is &quot;test&quot;
+PASS performance.getEntriesByName(&quot;test&quot;)[0].entryType is &quot;mark&quot;
+PASS typeof performance.getEntriesByName(&quot;test&quot;)[0].startTime === &quot;number&quot; is true
+PASS typeof performance.getEntriesByName(&quot;test&quot;)[0].duration === &quot;number&quot; is true
+PASS performance.getEntriesByName(&quot;test&quot;, &quot;not-real&quot;).length === 0 is true
+PASS performance.getEntriesByName(&quot;test&quot;, &quot;mark&quot;).length === 1 is true
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsperformanceapiperformancetimelineapihtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/performance-api/performance-timeline-api.html (0 => 211406)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/performance-api/performance-timeline-api.html                                (rev 0)
+++ trunk/LayoutTests/performance-api/performance-timeline-api.html        2017-01-31 06:21:35 UTC (rev 211406)
</span><span class="lines">@@ -0,0 +1,58 @@
</span><ins>+&lt;!DOCTYPE HTML&gt;
+&lt;html&gt;
+&lt;head&gt;
+&lt;script src=&quot;../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
+&lt;script&gt;
+description(&quot;Basic Interface test for performance-timeline APIs.&quot;);
+
+debug(&quot;PerformanceEntry&quot;);
+shouldBeDefined(&quot;PerformanceEntry&quot;);
+shouldBeTrue(`&quot;name&quot; in PerformanceEntry.prototype`);
+shouldBeTrue(`&quot;entryType&quot; in PerformanceEntry.prototype`);
+shouldBeTrue(`&quot;startTime&quot; in PerformanceEntry.prototype`);
+shouldBeTrue(`&quot;duration&quot; in PerformanceEntry.prototype`);
+shouldThrow(`new PerformanceEntry()`);
+
+// NOTE: The APIs below may be going away. Replaced by PerformanceObserver.
+
+debug(&quot;&quot;);
+debug(&quot;Performance extensions&quot;);
+shouldBeDefined(`Performance.prototype.getEntries`);
+shouldBeDefined(`Performance.prototype.getEntriesByType`);
+shouldBeDefined(`Performance.prototype.getEntriesByName`);
+
+shouldBeTrue(`performance.getEntries() instanceof Array`);
+shouldBeTrue(`performance.getEntries().length === 0`);
+shouldNotThrow(`performance.mark(&quot;test&quot;);`);
+shouldBeTrue(`performance.getEntries().length === 1`);
+shouldBeTrue(`performance.getEntries()[0] instanceof PerformanceEntry`);
+shouldBeEqualToString(`performance.getEntries()[0].name`, &quot;test&quot;);
+shouldBeEqualToString(`performance.getEntries()[0].entryType`, &quot;mark&quot;);
+shouldBeTrue(`typeof performance.getEntries()[0].startTime === &quot;number&quot;`);
+shouldBeTrue(`typeof performance.getEntries()[0].duration === &quot;number&quot;`);
+
+shouldThrow(`performance.getEntriesByType()`);
+shouldBeTrue(`performance.getEntriesByType(&quot;not-real&quot;).length === 0`);
+shouldBeTrue(`performance.getEntriesByType(&quot;mark&quot;).length === 1`);
+shouldBeTrue(`performance.getEntriesByType(&quot;mark&quot;)[0] instanceof PerformanceEntry`);
+shouldBeEqualToString(`performance.getEntriesByType(&quot;mark&quot;)[0].name`, &quot;test&quot;);
+shouldBeEqualToString(`performance.getEntriesByType(&quot;mark&quot;)[0].entryType`, &quot;mark&quot;);
+shouldBeTrue(`typeof performance.getEntriesByType(&quot;mark&quot;)[0].startTime === &quot;number&quot;`);
+shouldBeTrue(`typeof performance.getEntriesByType(&quot;mark&quot;)[0].duration === &quot;number&quot;`);
+
+shouldThrow(`performance.getEntriesByName()`);
+shouldBeTrue(`performance.getEntriesByName(&quot;not-real&quot;).length === 0`);
+shouldBeTrue(`performance.getEntriesByName(&quot;test&quot;).length === 1`);
+shouldBeTrue(`performance.getEntriesByName(&quot;test&quot;)[0] instanceof PerformanceEntry`);
+shouldBeEqualToString(`performance.getEntriesByName(&quot;test&quot;)[0].name`, &quot;test&quot;);
+shouldBeEqualToString(`performance.getEntriesByName(&quot;test&quot;)[0].entryType`, &quot;mark&quot;);
+shouldBeTrue(`typeof performance.getEntriesByName(&quot;test&quot;)[0].startTime === &quot;number&quot;`);
+shouldBeTrue(`typeof performance.getEntriesByName(&quot;test&quot;)[0].duration === &quot;number&quot;`);
+shouldBeTrue(`performance.getEntriesByName(&quot;test&quot;, &quot;not-real&quot;).length === 0`);
+shouldBeTrue(`performance.getEntriesByName(&quot;test&quot;, &quot;mark&quot;).length === 1`);
+&lt;/script&gt;
+&lt;script src=&quot;../resources/js-test-post.js&quot;&gt;&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsplatformefljsdomglobalconstructorsattributesexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/efl/js/dom/global-constructors-attributes-expected.txt (211405 => 211406)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/efl/js/dom/global-constructors-attributes-expected.txt        2017-01-31 04:50:40 UTC (rev 211405)
+++ trunk/LayoutTests/platform/efl/js/dom/global-constructors-attributes-expected.txt        2017-01-31 06:21:35 UTC (rev 211406)
</span><span class="lines">@@ -1028,6 +1028,16 @@
</span><span class="cx"> PASS Object.getOwnPropertyDescriptor(global, 'PerformanceNavigation').hasOwnProperty('set') is false
</span><span class="cx"> PASS Object.getOwnPropertyDescriptor(global, 'PerformanceNavigation').enumerable is false
</span><span class="cx"> PASS Object.getOwnPropertyDescriptor(global, 'PerformanceNavigation').configurable is true
</span><ins>+PASS Object.getOwnPropertyDescriptor(global, 'PerformanceObserver').value is PerformanceObserver
+PASS Object.getOwnPropertyDescriptor(global, 'PerformanceObserver').hasOwnProperty('get') is false
+PASS Object.getOwnPropertyDescriptor(global, 'PerformanceObserver').hasOwnProperty('set') is false
+PASS Object.getOwnPropertyDescriptor(global, 'PerformanceObserver').enumerable is false
+PASS Object.getOwnPropertyDescriptor(global, 'PerformanceObserver').configurable is true
+PASS Object.getOwnPropertyDescriptor(global, 'PerformanceObserverEntryList').value is PerformanceObserverEntryList
+PASS Object.getOwnPropertyDescriptor(global, 'PerformanceObserverEntryList').hasOwnProperty('get') is false
+PASS Object.getOwnPropertyDescriptor(global, 'PerformanceObserverEntryList').hasOwnProperty('set') is false
+PASS Object.getOwnPropertyDescriptor(global, 'PerformanceObserverEntryList').enumerable is false
+PASS Object.getOwnPropertyDescriptor(global, 'PerformanceObserverEntryList').configurable is true
</ins><span class="cx"> PASS Object.getOwnPropertyDescriptor(global, 'PerformanceTiming').value is PerformanceTiming
</span><span class="cx"> PASS Object.getOwnPropertyDescriptor(global, 'PerformanceTiming').hasOwnProperty('get') is false
</span><span class="cx"> PASS Object.getOwnPropertyDescriptor(global, 'PerformanceTiming').hasOwnProperty('set') is false
</span></span></pre></div>
<a id="trunkLayoutTestsplatformgtkjsdomglobalconstructorsattributesexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/gtk/js/dom/global-constructors-attributes-expected.txt (211405 => 211406)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/gtk/js/dom/global-constructors-attributes-expected.txt        2017-01-31 04:50:40 UTC (rev 211405)
+++ trunk/LayoutTests/platform/gtk/js/dom/global-constructors-attributes-expected.txt        2017-01-31 06:21:35 UTC (rev 211406)
</span><span class="lines">@@ -1158,6 +1158,16 @@
</span><span class="cx"> PASS Object.getOwnPropertyDescriptor(global, 'PerformanceNavigation').hasOwnProperty('set') is false
</span><span class="cx"> PASS Object.getOwnPropertyDescriptor(global, 'PerformanceNavigation').enumerable is false
</span><span class="cx"> PASS Object.getOwnPropertyDescriptor(global, 'PerformanceNavigation').configurable is true
</span><ins>+PASS Object.getOwnPropertyDescriptor(global, 'PerformanceObserver').value is PerformanceObserver
+PASS Object.getOwnPropertyDescriptor(global, 'PerformanceObserver').hasOwnProperty('get') is false
+PASS Object.getOwnPropertyDescriptor(global, 'PerformanceObserver').hasOwnProperty('set') is false
+PASS Object.getOwnPropertyDescriptor(global, 'PerformanceObserver').enumerable is false
+PASS Object.getOwnPropertyDescriptor(global, 'PerformanceObserver').configurable is true
+PASS Object.getOwnPropertyDescriptor(global, 'PerformanceObserverEntryList').value is PerformanceObserverEntryList
+PASS Object.getOwnPropertyDescriptor(global, 'PerformanceObserverEntryList').hasOwnProperty('get') is false
+PASS Object.getOwnPropertyDescriptor(global, 'PerformanceObserverEntryList').hasOwnProperty('set') is false
+PASS Object.getOwnPropertyDescriptor(global, 'PerformanceObserverEntryList').enumerable is false
+PASS Object.getOwnPropertyDescriptor(global, 'PerformanceObserverEntryList').configurable is true
</ins><span class="cx"> PASS Object.getOwnPropertyDescriptor(global, 'PerformanceTiming').value is PerformanceTiming
</span><span class="cx"> PASS Object.getOwnPropertyDescriptor(global, 'PerformanceTiming').hasOwnProperty('get') is false
</span><span class="cx"> PASS Object.getOwnPropertyDescriptor(global, 'PerformanceTiming').hasOwnProperty('set') is false
</span></span></pre></div>
<a id="trunkLayoutTestsplatformmacjsdomglobalconstructorsattributesexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/mac/js/dom/global-constructors-attributes-expected.txt (211405 => 211406)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac/js/dom/global-constructors-attributes-expected.txt        2017-01-31 04:50:40 UTC (rev 211405)
+++ trunk/LayoutTests/platform/mac/js/dom/global-constructors-attributes-expected.txt        2017-01-31 06:21:35 UTC (rev 211406)
</span><span class="lines">@@ -1198,6 +1198,16 @@
</span><span class="cx"> PASS Object.getOwnPropertyDescriptor(global, 'PerformanceNavigation').hasOwnProperty('set') is false
</span><span class="cx"> PASS Object.getOwnPropertyDescriptor(global, 'PerformanceNavigation').enumerable is false
</span><span class="cx"> PASS Object.getOwnPropertyDescriptor(global, 'PerformanceNavigation').configurable is true
</span><ins>+PASS Object.getOwnPropertyDescriptor(global, 'PerformanceObserver').value is PerformanceObserver
+PASS Object.getOwnPropertyDescriptor(global, 'PerformanceObserver').hasOwnProperty('get') is false
+PASS Object.getOwnPropertyDescriptor(global, 'PerformanceObserver').hasOwnProperty('set') is false
+PASS Object.getOwnPropertyDescriptor(global, 'PerformanceObserver').enumerable is false
+PASS Object.getOwnPropertyDescriptor(global, 'PerformanceObserver').configurable is true
+PASS Object.getOwnPropertyDescriptor(global, 'PerformanceObserverEntryList').value is PerformanceObserverEntryList
+PASS Object.getOwnPropertyDescriptor(global, 'PerformanceObserverEntryList').hasOwnProperty('get') is false
+PASS Object.getOwnPropertyDescriptor(global, 'PerformanceObserverEntryList').hasOwnProperty('set') is false
+PASS Object.getOwnPropertyDescriptor(global, 'PerformanceObserverEntryList').enumerable is false
+PASS Object.getOwnPropertyDescriptor(global, 'PerformanceObserverEntryList').configurable is true
</ins><span class="cx"> PASS Object.getOwnPropertyDescriptor(global, 'PerformanceTiming').value is PerformanceTiming
</span><span class="cx"> PASS Object.getOwnPropertyDescriptor(global, 'PerformanceTiming').hasOwnProperty('get') is false
</span><span class="cx"> PASS Object.getOwnPropertyDescriptor(global, 'PerformanceTiming').hasOwnProperty('set') is false
</span></span></pre></div>
<a id="trunkLayoutTestsplatformmacelcapitanjsdomglobalconstructorsattributesexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/mac-elcapitan/js/dom/global-constructors-attributes-expected.txt (211405 => 211406)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac-elcapitan/js/dom/global-constructors-attributes-expected.txt        2017-01-31 04:50:40 UTC (rev 211405)
+++ trunk/LayoutTests/platform/mac-elcapitan/js/dom/global-constructors-attributes-expected.txt        2017-01-31 06:21:35 UTC (rev 211406)
</span><span class="lines">@@ -1193,6 +1193,16 @@
</span><span class="cx"> PASS Object.getOwnPropertyDescriptor(global, 'PerformanceNavigation').hasOwnProperty('set') is false
</span><span class="cx"> PASS Object.getOwnPropertyDescriptor(global, 'PerformanceNavigation').enumerable is false
</span><span class="cx"> PASS Object.getOwnPropertyDescriptor(global, 'PerformanceNavigation').configurable is true
</span><ins>+PASS Object.getOwnPropertyDescriptor(global, 'PerformanceObserver').value is PerformanceObserver
+PASS Object.getOwnPropertyDescriptor(global, 'PerformanceObserver').hasOwnProperty('get') is false
+PASS Object.getOwnPropertyDescriptor(global, 'PerformanceObserver').hasOwnProperty('set') is false
+PASS Object.getOwnPropertyDescriptor(global, 'PerformanceObserver').enumerable is false
+PASS Object.getOwnPropertyDescriptor(global, 'PerformanceObserver').configurable is true
+PASS Object.getOwnPropertyDescriptor(global, 'PerformanceObserverEntryList').value is PerformanceObserverEntryList
+PASS Object.getOwnPropertyDescriptor(global, 'PerformanceObserverEntryList').hasOwnProperty('get') is false
+PASS Object.getOwnPropertyDescriptor(global, 'PerformanceObserverEntryList').hasOwnProperty('set') is false
+PASS Object.getOwnPropertyDescriptor(global, 'PerformanceObserverEntryList').enumerable is false
+PASS Object.getOwnPropertyDescriptor(global, 'PerformanceObserverEntryList').configurable is true
</ins><span class="cx"> PASS Object.getOwnPropertyDescriptor(global, 'PerformanceTiming').value is PerformanceTiming
</span><span class="cx"> PASS Object.getOwnPropertyDescriptor(global, 'PerformanceTiming').hasOwnProperty('get') is false
</span><span class="cx"> PASS Object.getOwnPropertyDescriptor(global, 'PerformanceTiming').hasOwnProperty('set') is false
</span></span></pre></div>
<a id="trunkLayoutTestsplatformmacwk1jsdomglobalconstructorsattributesexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/mac-wk1/js/dom/global-constructors-attributes-expected.txt (211405 => 211406)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac-wk1/js/dom/global-constructors-attributes-expected.txt        2017-01-31 04:50:40 UTC (rev 211405)
+++ trunk/LayoutTests/platform/mac-wk1/js/dom/global-constructors-attributes-expected.txt        2017-01-31 06:21:35 UTC (rev 211406)
</span><span class="lines">@@ -1193,6 +1193,16 @@
</span><span class="cx"> PASS Object.getOwnPropertyDescriptor(global, 'PerformanceNavigation').hasOwnProperty('set') is false
</span><span class="cx"> PASS Object.getOwnPropertyDescriptor(global, 'PerformanceNavigation').enumerable is false
</span><span class="cx"> PASS Object.getOwnPropertyDescriptor(global, 'PerformanceNavigation').configurable is true
</span><ins>+PASS Object.getOwnPropertyDescriptor(global, 'PerformanceObserver').value is PerformanceObserver
+PASS Object.getOwnPropertyDescriptor(global, 'PerformanceObserver').hasOwnProperty('get') is false
+PASS Object.getOwnPropertyDescriptor(global, 'PerformanceObserver').hasOwnProperty('set') is false
+PASS Object.getOwnPropertyDescriptor(global, 'PerformanceObserver').enumerable is false
+PASS Object.getOwnPropertyDescriptor(global, 'PerformanceObserver').configurable is true
+PASS Object.getOwnPropertyDescriptor(global, 'PerformanceObserverEntryList').value is PerformanceObserverEntryList
+PASS Object.getOwnPropertyDescriptor(global, 'PerformanceObserverEntryList').hasOwnProperty('get') is false
+PASS Object.getOwnPropertyDescriptor(global, 'PerformanceObserverEntryList').hasOwnProperty('set') is false
+PASS Object.getOwnPropertyDescriptor(global, 'PerformanceObserverEntryList').enumerable is false
+PASS Object.getOwnPropertyDescriptor(global, 'PerformanceObserverEntryList').configurable is true
</ins><span class="cx"> PASS Object.getOwnPropertyDescriptor(global, 'PerformanceTiming').value is PerformanceTiming
</span><span class="cx"> PASS Object.getOwnPropertyDescriptor(global, 'PerformanceTiming').hasOwnProperty('get') is false
</span><span class="cx"> PASS Object.getOwnPropertyDescriptor(global, 'PerformanceTiming').hasOwnProperty('set') is false
</span></span></pre></div>
<a id="trunkLayoutTestsplatformmacyosemitejsdomglobalconstructorsattributesexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/mac-yosemite/js/dom/global-constructors-attributes-expected.txt (211405 => 211406)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac-yosemite/js/dom/global-constructors-attributes-expected.txt        2017-01-31 04:50:40 UTC (rev 211405)
+++ trunk/LayoutTests/platform/mac-yosemite/js/dom/global-constructors-attributes-expected.txt        2017-01-31 06:21:35 UTC (rev 211406)
</span><span class="lines">@@ -1188,6 +1188,16 @@
</span><span class="cx"> PASS Object.getOwnPropertyDescriptor(global, 'PerformanceNavigation').hasOwnProperty('set') is false
</span><span class="cx"> PASS Object.getOwnPropertyDescriptor(global, 'PerformanceNavigation').enumerable is false
</span><span class="cx"> PASS Object.getOwnPropertyDescriptor(global, 'PerformanceNavigation').configurable is true
</span><ins>+PASS Object.getOwnPropertyDescriptor(global, 'PerformanceObserver').value is PerformanceObserver
+PASS Object.getOwnPropertyDescriptor(global, 'PerformanceObserver').hasOwnProperty('get') is false
+PASS Object.getOwnPropertyDescriptor(global, 'PerformanceObserver').hasOwnProperty('set') is false
+PASS Object.getOwnPropertyDescriptor(global, 'PerformanceObserver').enumerable is false
+PASS Object.getOwnPropertyDescriptor(global, 'PerformanceObserver').configurable is true
+PASS Object.getOwnPropertyDescriptor(global, 'PerformanceObserverEntryList').value is PerformanceObserverEntryList
+PASS Object.getOwnPropertyDescriptor(global, 'PerformanceObserverEntryList').hasOwnProperty('get') is false
+PASS Object.getOwnPropertyDescriptor(global, 'PerformanceObserverEntryList').hasOwnProperty('set') is false
+PASS Object.getOwnPropertyDescriptor(global, 'PerformanceObserverEntryList').enumerable is false
+PASS Object.getOwnPropertyDescriptor(global, 'PerformanceObserverEntryList').configurable is true
</ins><span class="cx"> PASS Object.getOwnPropertyDescriptor(global, 'PerformanceTiming').value is PerformanceTiming
</span><span class="cx"> PASS Object.getOwnPropertyDescriptor(global, 'PerformanceTiming').hasOwnProperty('get') is false
</span><span class="cx"> PASS Object.getOwnPropertyDescriptor(global, 'PerformanceTiming').hasOwnProperty('set') is false
</span></span></pre></div>
<a id="trunkLayoutTestsplatformwinjsdomglobalconstructorsattributesexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/win/js/dom/global-constructors-attributes-expected.txt (211405 => 211406)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/win/js/dom/global-constructors-attributes-expected.txt        2017-01-31 04:50:40 UTC (rev 211405)
+++ trunk/LayoutTests/platform/win/js/dom/global-constructors-attributes-expected.txt        2017-01-31 06:21:35 UTC (rev 211406)
</span><span class="lines">@@ -888,6 +888,16 @@
</span><span class="cx"> PASS Object.getOwnPropertyDescriptor(global, 'PerformanceNavigation').hasOwnProperty('set') is false
</span><span class="cx"> PASS Object.getOwnPropertyDescriptor(global, 'PerformanceNavigation').enumerable is false
</span><span class="cx"> PASS Object.getOwnPropertyDescriptor(global, 'PerformanceNavigation').configurable is true
</span><ins>+PASS Object.getOwnPropertyDescriptor(global, 'PerformanceObserver').value is PerformanceObserver
+PASS Object.getOwnPropertyDescriptor(global, 'PerformanceObserver').hasOwnProperty('get') is false
+PASS Object.getOwnPropertyDescriptor(global, 'PerformanceObserver').hasOwnProperty('set') is false
+PASS Object.getOwnPropertyDescriptor(global, 'PerformanceObserver').enumerable is false
+PASS Object.getOwnPropertyDescriptor(global, 'PerformanceObserver').configurable is true
+PASS Object.getOwnPropertyDescriptor(global, 'PerformanceObserverEntryList').value is PerformanceObserverEntryList
+PASS Object.getOwnPropertyDescriptor(global, 'PerformanceObserverEntryList').hasOwnProperty('get') is false
+PASS Object.getOwnPropertyDescriptor(global, 'PerformanceObserverEntryList').hasOwnProperty('set') is false
+PASS Object.getOwnPropertyDescriptor(global, 'PerformanceObserverEntryList').enumerable is false
+PASS Object.getOwnPropertyDescriptor(global, 'PerformanceObserverEntryList').configurable is true
</ins><span class="cx"> PASS Object.getOwnPropertyDescriptor(global, 'PerformanceTiming').value is PerformanceTiming
</span><span class="cx"> PASS Object.getOwnPropertyDescriptor(global, 'PerformanceTiming').hasOwnProperty('get') is false
</span><span class="cx"> PASS Object.getOwnPropertyDescriptor(global, 'PerformanceTiming').hasOwnProperty('set') is false
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/ChangeLog (211405 => 211406)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/ChangeLog        2017-01-31 04:50:40 UTC (rev 211405)
+++ trunk/Source/JavaScriptCore/ChangeLog        2017-01-31 06:21:35 UTC (rev 211406)
</span><span class="lines">@@ -1,3 +1,13 @@
</span><ins>+2017-01-30  Joseph Pecoraro  &lt;pecoraro@apple.com&gt;
+
+        Implement PerformanceObserver
+        https://bugs.webkit.org/show_bug.cgi?id=167546
+        &lt;rdar://problem/30247959&gt;
+
+        Reviewed by Ryosuke Niwa.
+
+        * runtime/CommonIdentifiers.h:
+
</ins><span class="cx"> 2017-01-30  Matt Baker  &lt;mattbaker@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Web Inspector: Need some limit on Async Call Stacks for async loops (rAF loops)
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeCommonIdentifiersh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/CommonIdentifiers.h (211405 => 211406)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/CommonIdentifiers.h        2017-01-31 04:50:40 UTC (rev 211405)
+++ trunk/Source/JavaScriptCore/runtime/CommonIdentifiers.h        2017-01-31 06:21:35 UTC (rev 211406)
</span><span class="lines">@@ -89,6 +89,8 @@
</span><span class="cx">     macro(PerformanceEntryList) \
</span><span class="cx">     macro(PerformanceMark) \
</span><span class="cx">     macro(PerformanceMeasure) \
</span><ins>+    macro(PerformanceObserver) \
+    macro(PerformanceObserverEntryList) \
</ins><span class="cx">     macro(PerformanceResourceTiming) \
</span><span class="cx">     macro(Promise) \
</span><span class="cx">     macro(Proxy) \
</span></span></pre></div>
<a id="trunkSourceWebCoreCMakeListstxt"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/CMakeLists.txt (211405 => 211406)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/CMakeLists.txt        2017-01-31 04:50:40 UTC (rev 211405)
+++ trunk/Source/WebCore/CMakeLists.txt        2017-01-31 06:21:35 UTC (rev 211406)
</span><span class="lines">@@ -601,6 +601,9 @@
</span><span class="cx">     page/PerformanceEntry.idl
</span><span class="cx">     page/PerformanceMark.idl
</span><span class="cx">     page/PerformanceMeasure.idl
</span><ins>+    page/PerformanceObserver.idl
+    page/PerformanceObserverCallback.idl
+    page/PerformanceObserverEntryList.idl
</ins><span class="cx">     page/PerformanceNavigation.idl
</span><span class="cx">     page/PerformanceResourceTiming.idl
</span><span class="cx">     page/PerformanceTiming.idl
</span><span class="lines">@@ -1993,6 +1996,8 @@
</span><span class="cx">     page/PerformanceLogging.cpp
</span><span class="cx">     page/PerformanceMonitor.cpp
</span><span class="cx">     page/PerformanceNavigation.cpp
</span><ins>+    page/PerformanceObserver.cpp
+    page/PerformanceObserverEntryList.cpp
</ins><span class="cx">     page/PerformanceResourceTiming.cpp
</span><span class="cx">     page/PerformanceTiming.cpp
</span><span class="cx">     page/PerformanceUserTiming.cpp
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (211405 => 211406)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2017-01-31 04:50:40 UTC (rev 211405)
+++ trunk/Source/WebCore/ChangeLog        2017-01-31 06:21:35 UTC (rev 211406)
</span><span class="lines">@@ -1,3 +1,87 @@
</span><ins>+2017-01-30  Joseph Pecoraro  &lt;pecoraro@apple.com&gt;
+
+        Implement PerformanceObserver
+        https://bugs.webkit.org/show_bug.cgi?id=167546
+        &lt;rdar://problem/30247959&gt;
+
+        Reviewed by Ryosuke Niwa.
+
+        This implements PerformanceObserver from Performance Timeline Level 2:
+        https://w3c.github.io/performance-timeline/
+
+        Tests: performance-api/performance-observer-api.html
+               performance-api/performance-observer-basic.html
+               performance-api/performance-observer-callback-mutate.html
+               performance-api/performance-observer-callback-task.html
+               performance-api/performance-observer-entry-sort.html
+               performance-api/performance-observer-exception.html
+               performance-api/performance-observer-nested.html
+               performance-api/performance-observer-order.html
+               performance-api/performance-observer-periodic.html
+               performance-api/performance-timeline-api.html
+
+        * CMakeLists.txt:
+        * DerivedSources.make:
+        * WebCore.xcodeproj/project.pbxproj:
+        New files.
+
+        * page/Performance.h:
+        * page/Performance.cpp:
+        (WebCore::Performance::mark):
+        (WebCore::Performance::measure):
+        (WebCore::Performance::registerPerformanceObserver):
+        (WebCore::Performance::unregisterPerformanceObserver):
+        (WebCore::Performance::queueEntry):
+        Register PerformanceObservers with the Performance object.
+        When new PerformanceEntries are created (Mark and Measure
+        right now) check them against observers.
+
+        * page/PerformanceEntry.cpp:
+        (WebCore::PerformanceEntry::PerformanceEntry):
+        (WebCore::PerformanceEntry::typeForEntryTypeString):
+        * page/PerformanceEntry.h:
+        (WebCore::PerformanceEntry::type):
+        Give PerformanceEntry a convenience enum for easy comparison
+        and to know if it is one of the built-in known types (which the
+        PerformanceObserver API takes into account).
+
+        * page/PerformanceObserver.cpp: Added.
+        (WebCore::PerformanceObserver::PerformanceObserver):
+        (WebCore::PerformanceObserver::observe):
+        (WebCore::PerformanceObserver::disconnect):
+        (WebCore::PerformanceObserver::queueEntry):
+        (WebCore::PerformanceObserver::deliver):
+        * page/PerformanceObserver.h:
+        (WebCore::PerformanceObserver::create):
+        (WebCore::PerformanceObserver::typeFilter):
+        - TypeErrors on observe bad behavior
+        - Completely replace types filter on observe
+        - Handle register and unregister
+        - Handle calling the callback
+
+        * page/PerformanceObserverCallback.idl: Added.
+        * page/PerformanceObserverEntryList.cpp: Added.
+        (WebCore::PerformanceObserverEntryList::PerformanceObserverEntryList):
+        (WebCore::PerformanceObserverEntryList::getEntries):
+        (WebCore::PerformanceObserverEntryList::getEntriesByType):
+        (WebCore::PerformanceObserverEntryList::getEntriesByName):
+        * page/PerformanceObserverEntryList.h:
+        (WebCore::PerformanceObserverEntryList::create):
+        * page/PerformanceObserverEntryList.idl: Added.
+        Implement sorting and filtering of entries.
+
+        * page/PerformanceObserver.idl: Added.
+        * page/PerformanceObserverCallback.h:
+        (WebCore::PerformanceObserverCallback::~PerformanceObserverCallback):
+        Mostly autogenerated.
+
+        * page/PerformanceUserTiming.cpp:
+        (WebCore::UserTiming::mark):
+        (WebCore::UserTiming::measure):
+        * page/PerformanceUserTiming.h:
+        Update these to return the entry so it can be passed on to
+        any interested PerformanceObservers.
+
</ins><span class="cx"> 2017-01-30  Youenn Fablet  &lt;youenn@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         [WebRTC] getStats does not support legacy callback
</span></span></pre></div>
<a id="trunkSourceWebCoreDerivedSourcesmake"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/DerivedSources.make (211405 => 211406)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/DerivedSources.make        2017-01-31 04:50:40 UTC (rev 211405)
+++ trunk/Source/WebCore/DerivedSources.make        2017-01-31 06:21:35 UTC (rev 211406)
</span><span class="lines">@@ -584,6 +584,9 @@
</span><span class="cx">     $(WebCore)/page/PerformanceMark.idl \
</span><span class="cx">     $(WebCore)/page/PerformanceMeasure.idl \
</span><span class="cx">     $(WebCore)/page/PerformanceNavigation.idl \
</span><ins>+    $(WebCore)/page/PerformanceObserver.idl \
+    $(WebCore)/page/PerformanceObserverCallback.idl \
+    $(WebCore)/page/PerformanceObserverEntryList.idl \
</ins><span class="cx">     $(WebCore)/page/PerformanceResourceTiming.idl \
</span><span class="cx">     $(WebCore)/page/PerformanceTiming.idl \
</span><span class="cx">     $(WebCore)/page/Screen.idl \
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCorexcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (211405 => 211406)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2017-01-31 04:50:40 UTC (rev 211405)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2017-01-31 06:21:35 UTC (rev 211406)
</span><span class="lines">@@ -4068,6 +4068,17 @@
</span><span class="cx">                 A5A2AF0B1829734300DE1729 /* PageDebuggable.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A5A2AF091829734300DE1729 /* PageDebuggable.cpp */; };
</span><span class="cx">                 A5A2AF0C1829734300DE1729 /* PageDebuggable.h in Headers */ = {isa = PBXBuildFile; fileRef = A5A2AF0A1829734300DE1729 /* PageDebuggable.h */; };
</span><span class="cx">                 A5A7AA43132F0ECC00D3A3C2 /* AutocapitalizeTypes.h in Headers */ = {isa = PBXBuildFile; fileRef = A5A7AA42132F0ECC00D3A3C2 /* AutocapitalizeTypes.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><ins>+                A5A9933D1E37FB19005B5E4D /* PerformanceObserver.h in Headers */ = {isa = PBXBuildFile; fileRef = A5A993361E37FAFD005B5E4D /* PerformanceObserver.h */; };
+                A5A9933E1E37FB1C005B5E4D /* PerformanceObserver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A5A993351E37FAFD005B5E4D /* PerformanceObserver.cpp */; };
+                A5A9933F1E37FB1F005B5E4D /* PerformanceObserverCallback.h in Headers */ = {isa = PBXBuildFile; fileRef = A5A993381E37FAFD005B5E4D /* PerformanceObserverCallback.h */; };
+                A5A993401E37FB25005B5E4D /* PerformanceObserverEntryList.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A5A9933A1E37FAFD005B5E4D /* PerformanceObserverEntryList.cpp */; };
+                A5A993411E37FB28005B5E4D /* PerformanceObserverEntryList.h in Headers */ = {isa = PBXBuildFile; fileRef = A5A9933B1E37FAFD005B5E4D /* PerformanceObserverEntryList.h */; };
+                A5A993481E3809C6005B5E4D /* JSPerformanceObserver.h in Headers */ = {isa = PBXBuildFile; fileRef = A5A993431E380999005B5E4D /* JSPerformanceObserver.h */; };
+                A5A993491E3809C9005B5E4D /* JSPerformanceObserverCallback.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A5A993441E380999005B5E4D /* JSPerformanceObserverCallback.cpp */; };
+                A5A9934A1E3809CB005B5E4D /* JSPerformanceObserverCallback.h in Headers */ = {isa = PBXBuildFile; fileRef = A5A993451E380999005B5E4D /* JSPerformanceObserverCallback.h */; };
+                A5A9934B1E3809CD005B5E4D /* JSPerformanceObserverEntryList.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A5A993461E380999005B5E4D /* JSPerformanceObserverEntryList.cpp */; };
+                A5A9934C1E3809CF005B5E4D /* JSPerformanceObserverEntryList.h in Headers */ = {isa = PBXBuildFile; fileRef = A5A993471E380999005B5E4D /* JSPerformanceObserverEntryList.h */; };
+                A5A9934D1E3809D7005B5E4D /* JSPerformanceObserver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A5A993421E380999005B5E4D /* JSPerformanceObserver.cpp */; };
</ins><span class="cx">                 A5AFB34F115151A700B045CB /* StepRange.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A5AFB34D115151A700B045CB /* StepRange.cpp */; };
</span><span class="cx">                 A5AFB350115151A700B045CB /* StepRange.h in Headers */ = {isa = PBXBuildFile; fileRef = A5AFB34E115151A700B045CB /* StepRange.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 A5DEBDA316FB908700836FE0 /* WebKitPlaybackTargetAvailabilityEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A5DEBD9F16FB908700836FE0 /* WebKitPlaybackTargetAvailabilityEvent.cpp */; };
</span><span class="lines">@@ -11791,6 +11802,20 @@
</span><span class="cx">                 A5A2AF091829734300DE1729 /* PageDebuggable.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PageDebuggable.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 A5A2AF0A1829734300DE1729 /* PageDebuggable.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PageDebuggable.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 A5A7AA42132F0ECC00D3A3C2 /* AutocapitalizeTypes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AutocapitalizeTypes.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><ins>+                A5A993351E37FAFD005B5E4D /* PerformanceObserver.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PerformanceObserver.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
+                A5A993361E37FAFD005B5E4D /* PerformanceObserver.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PerformanceObserver.h; sourceTree = &quot;&lt;group&gt;&quot;; };
+                A5A993371E37FAFD005B5E4D /* PerformanceObserver.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = PerformanceObserver.idl; sourceTree = &quot;&lt;group&gt;&quot;; };
+                A5A993381E37FAFD005B5E4D /* PerformanceObserverCallback.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PerformanceObserverCallback.h; sourceTree = &quot;&lt;group&gt;&quot;; };
+                A5A993391E37FAFD005B5E4D /* PerformanceObserverCallback.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = PerformanceObserverCallback.idl; sourceTree = &quot;&lt;group&gt;&quot;; };
+                A5A9933A1E37FAFD005B5E4D /* PerformanceObserverEntryList.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PerformanceObserverEntryList.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
+                A5A9933B1E37FAFD005B5E4D /* PerformanceObserverEntryList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PerformanceObserverEntryList.h; sourceTree = &quot;&lt;group&gt;&quot;; };
+                A5A9933C1E37FAFD005B5E4D /* PerformanceObserverEntryList.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = PerformanceObserverEntryList.idl; sourceTree = &quot;&lt;group&gt;&quot;; };
+                A5A993421E380999005B5E4D /* JSPerformanceObserver.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSPerformanceObserver.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
+                A5A993431E380999005B5E4D /* JSPerformanceObserver.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSPerformanceObserver.h; sourceTree = &quot;&lt;group&gt;&quot;; };
+                A5A993441E380999005B5E4D /* JSPerformanceObserverCallback.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSPerformanceObserverCallback.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
+                A5A993451E380999005B5E4D /* JSPerformanceObserverCallback.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSPerformanceObserverCallback.h; sourceTree = &quot;&lt;group&gt;&quot;; };
+                A5A993461E380999005B5E4D /* JSPerformanceObserverEntryList.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSPerformanceObserverEntryList.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
+                A5A993471E380999005B5E4D /* JSPerformanceObserverEntryList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSPerformanceObserverEntryList.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</ins><span class="cx">                 A5AFB34D115151A700B045CB /* StepRange.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = StepRange.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 A5AFB34E115151A700B045CB /* StepRange.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = StepRange.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 A5C974CF11485FF10066F2AB /* KeyEventCocoa.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = KeyEventCocoa.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="lines">@@ -15329,12 +15354,12 @@
</span><span class="cx">                                 0744ECEC1E0C4AE5000D0944 /* MockRealtimeAudioSourceMac.mm */,
</span><span class="cx">                                 07EE76ED1BEA619800F89133 /* MockRealtimeVideoSourceMac.h */,
</span><span class="cx">                                 07EE76EE1BEA619800F89133 /* MockRealtimeVideoSourceMac.mm */,
</span><ins>+                                41103AAA1E39790A00769F03 /* RealtimeIncomingAudioSource.cpp */,
+                                41103AA91E39790A00769F03 /* RealtimeIncomingAudioSource.h */,
</ins><span class="cx">                                 4A0FFAA31AAF5EF60062803B /* RealtimeMediaSourceCenterMac.cpp */,
</span><span class="cx">                                 4A0FFAA41AAF5EF60062803B /* RealtimeMediaSourceCenterMac.h */,
</span><span class="cx">                                 41103AA71E39790A00769F03 /* RealtimeOutgoingAudioSource.cpp */,
</span><span class="cx">                                 41103AA81E39790A00769F03 /* RealtimeOutgoingAudioSource.h */,
</span><del>-                                41103AA91E39790A00769F03 /* RealtimeIncomingAudioSource.h */,
-                                41103AAA1E39790A00769F03 /* RealtimeIncomingAudioSource.cpp */,
</del><span class="cx">                                 07D6373E1BB0B11300256CE9 /* WebAudioSourceProviderAVFObjC.h */,
</span><span class="cx">                                 07D6373F1BB0B11300256CE9 /* WebAudioSourceProviderAVFObjC.mm */,
</span><span class="cx">                         );
</span><span class="lines">@@ -16733,8 +16758,8 @@
</span><span class="cx">                                 51058AD81D679257009A538C /* MockGamepad.h */,
</span><span class="cx">                                 51058AD91D679257009A538C /* MockGamepadProvider.cpp */,
</span><span class="cx">                                 51058ADA1D679257009A538C /* MockGamepadProvider.h */,
</span><ins>+                                4157EBF91E3AB06800AC9FE9 /* MockLibWebRTCPeerConnection.cpp */,
</ins><span class="cx">                                 4157EBF81E3AB06800AC9FE9 /* MockLibWebRTCPeerConnection.h */,
</span><del>-                                4157EBF91E3AB06800AC9FE9 /* MockLibWebRTCPeerConnection.cpp */,
</del><span class="cx">                                 2D6F3E8A1C1ECB1C0061DBD4 /* MockPageOverlay.cpp */,
</span><span class="cx">                                 2D6F3E8B1C1ECB1C0061DBD4 /* MockPageOverlay.h */,
</span><span class="cx">                                 2D6F3E8C1C1ECB1C0061DBD4 /* MockPageOverlay.idl */,
</span><span class="lines">@@ -18145,6 +18170,14 @@
</span><span class="cx">                                 8AF4E55211DC5A36000ED3DE /* PerformanceNavigation.cpp */,
</span><span class="cx">                                 8AF4E55311DC5A36000ED3DE /* PerformanceNavigation.h */,
</span><span class="cx">                                 8AF4E55411DC5A36000ED3DE /* PerformanceNavigation.idl */,
</span><ins>+                                A5A993351E37FAFD005B5E4D /* PerformanceObserver.cpp */,
+                                A5A993361E37FAFD005B5E4D /* PerformanceObserver.h */,
+                                A5A993371E37FAFD005B5E4D /* PerformanceObserver.idl */,
+                                A5A993381E37FAFD005B5E4D /* PerformanceObserverCallback.h */,
+                                A5A993391E37FAFD005B5E4D /* PerformanceObserverCallback.idl */,
+                                A5A9933A1E37FAFD005B5E4D /* PerformanceObserverEntryList.cpp */,
+                                A5A9933B1E37FAFD005B5E4D /* PerformanceObserverEntryList.h */,
+                                A5A9933C1E37FAFD005B5E4D /* PerformanceObserverEntryList.idl */,
</ins><span class="cx">                                 86512EDB154A2AEE00A90426 /* PerformanceResourceTiming.cpp */,
</span><span class="cx">                                 86512EDC154A2AEF00A90426 /* PerformanceResourceTiming.h */,
</span><span class="cx">                                 86512EDD154A2AEF00A90426 /* PerformanceResourceTiming.idl */,
</span><span class="lines">@@ -19834,8 +19867,8 @@
</span><span class="cx">                 A59E3C1B11580F340072928E /* ios */ = {
</span><span class="cx">                         isa = PBXGroup;
</span><span class="cx">                         children = (
</span><ins>+                                A148328B187F506800DA63A6 /* wak */,
</ins><span class="cx">                                 F48223121E386E240066FC79 /* AbstractPasteboard.h */,
</span><del>-                                A148328B187F506800DA63A6 /* wak */,
</del><span class="cx">                                 2655414B1489AA2B000DFC5D /* CursorIOS.cpp */,
</span><span class="cx">                                 A1ED778A1BE3293F00DC1791 /* Device.cpp */,
</span><span class="cx">                                 A1ED778B1BE3294000DC1791 /* Device.h */,
</span><span class="lines">@@ -19892,6 +19925,8 @@
</span><span class="cx">                                 E45390380EAFD637003695C8 /* WebCoreSystemInterfaceIOS.mm */,
</span><span class="cx">                                 FE0D84E810484348001A179E /* WebEvent.h */,
</span><span class="cx">                                 FE0D84EA1048436E001A179E /* WebEvent.mm */,
</span><ins>+                                F482230F1E3869B80066FC79 /* WebItemProviderPasteboard.h */,
+                                F482230E1E3869B80066FC79 /* WebItemProviderPasteboard.mm */,
</ins><span class="cx">                                 CDA29A2E1CBF73FC00901CCF /* WebPlaybackSessionInterfaceAVKit.h */,
</span><span class="cx">                                 CDA29A2F1CBF73FC00901CCF /* WebPlaybackSessionInterfaceAVKit.mm */,
</span><span class="cx">                                 3F42B31B1881191B00278AAC /* WebVideoFullscreenControllerAVKit.h */,
</span><span class="lines">@@ -19899,8 +19934,6 @@
</span><span class="cx">                                 3FBC4AF2189881560046EE38 /* WebVideoFullscreenInterfaceAVKit.h */,
</span><span class="cx">                                 3FBC4AF1189881560046EE38 /* WebVideoFullscreenInterfaceAVKit.mm */,
</span><span class="cx">                                 E453903C0EAFD637003695C8 /* WidgetIOS.mm */,
</span><del>-                                F482230E1E3869B80066FC79 /* WebItemProviderPasteboard.mm */,
-                                F482230F1E3869B80066FC79 /* WebItemProviderPasteboard.h */,
</del><span class="cx">                         );
</span><span class="cx">                         path = ios;
</span><span class="cx">                         sourceTree = &quot;&lt;group&gt;&quot;;
</span><span class="lines">@@ -22428,6 +22461,12 @@
</span><span class="cx">                                 A58C59CF1E382EA90047859C /* JSPerformanceMeasure.h */,
</span><span class="cx">                                 8A9A586E11E84C35008ACFD1 /* JSPerformanceNavigation.cpp */,
</span><span class="cx">                                 8A9A586F11E84C36008ACFD1 /* JSPerformanceNavigation.h */,
</span><ins>+                                A5A993421E380999005B5E4D /* JSPerformanceObserver.cpp */,
+                                A5A993431E380999005B5E4D /* JSPerformanceObserver.h */,
+                                A5A993441E380999005B5E4D /* JSPerformanceObserverCallback.cpp */,
+                                A5A993451E380999005B5E4D /* JSPerformanceObserverCallback.h */,
+                                A5A993461E380999005B5E4D /* JSPerformanceObserverEntryList.cpp */,
+                                A5A993471E380999005B5E4D /* JSPerformanceObserverEntryList.h */,
</ins><span class="cx">                                 CB38FD581CD2314500592A3F /* JSPerformanceResourceTiming.cpp */,
</span><span class="cx">                                 CB38FD591CD2314500592A3F /* JSPerformanceResourceTiming.h */,
</span><span class="cx">                                 0F43C85E189E15A600019AE2 /* JSPerformanceTiming.cpp */,
</span><span class="lines">@@ -24955,6 +24994,7 @@
</span><span class="cx">                                 A1B5B29F1AAA846F008B6042 /* MockContentFilterSettings.h in Headers */,
</span><span class="cx">                                 51058ADC1D6792C1009A538C /* MockGamepad.h in Headers */,
</span><span class="cx">                                 51058ADE1D6792C1009A538C /* MockGamepadProvider.h in Headers */,
</span><ins>+                                4157EBFB1E3AB67F00AC9FE9 /* MockLibWebRTCPeerConnection.h in Headers */,
</ins><span class="cx">                                 2D6F3E911C1ECB2F0061DBD4 /* MockPageOverlay.h in Headers */,
</span><span class="cx">                                 2D97F04819DD4140001EE9C3 /* MockPageOverlayClient.h in Headers */,
</span><span class="cx">                                 A140618C1E2ECA0A0032B34E /* MockQuickLookHandleClient.h in Headers */,
</span><span class="lines">@@ -24961,7 +25001,6 @@
</span><span class="cx">                                 AA5F3B8D16CC33D100455EB0 /* PlatformSpeechSynthesizerMock.h in Headers */,
</span><span class="cx">                                 A1763F3F1E205234001D58DE /* WebArchiveDumpSupport.h in Headers */,
</span><span class="cx">                                 41815C1F138319830057AAA4 /* WebCoreTestSupport.h in Headers */,
</span><del>-                                4157EBFB1E3AB67F00AC9FE9 /* MockLibWebRTCPeerConnection.h in Headers */,
</del><span class="cx">                         );
</span><span class="cx">                         runOnlyForDeploymentPostprocessing = 0;
</span><span class="cx">                 };
</span><span class="lines">@@ -24969,6 +25008,7 @@
</span><span class="cx">                         isa = PBXHeadersBuildPhase;
</span><span class="cx">                         buildActionMask = 2147483647;
</span><span class="cx">                         files = (
</span><ins>+                                F48223131E386E240066FC79 /* AbstractPasteboard.h in Headers */,
</ins><span class="cx">                                 41E1B1D10FF5986900576B3B /* AbstractWorker.h in Headers */,
</span><span class="cx">                                 29A8122E0FBB9C1D00510293 /* AccessibilityARIAGridCell.h in Headers */,
</span><span class="cx">                                 29A812330FBB9C1D00510293 /* AccessibilityARIAGridRow.h in Headers */,
</span><span class="lines">@@ -25021,7 +25061,6 @@
</span><span class="cx">                                 319848011A1D817B00A13318 /* AnimationEvent.h in Headers */,
</span><span class="cx">                                 49E912AD0EFAC906009D0CAF /* AnimationList.h in Headers */,
</span><span class="cx">                                 31DCD29D1AB4FBDE0072E817 /* AnimationTrigger.h in Headers */,
</span><del>-                                417612B01E3A994000C3D81D /* LibWebRTCMediaEndpoint.h in Headers */,
</del><span class="cx">                                 0F580FAF149800D400FB5BD8 /* AnimationUtilities.h in Headers */,
</span><span class="cx">                                 93309DD7099E64920056E581 /* AppendNodeCommand.h in Headers */,
</span><span class="cx">                                 7C6579E31E00827000E3A27A /* ApplePayLineItem.h in Headers */,
</span><span class="lines">@@ -25303,7 +25342,6 @@
</span><span class="cx">                                 CE799FA81C6A50570097B518 /* ContentSecurityPolicyMediaListDirective.h in Headers */,
</span><span class="cx">                                 CE6DADFA1C591E6A003F6A88 /* ContentSecurityPolicyResponseHeaders.h in Headers */,
</span><span class="cx">                                 CE799FA01C6A4C160097B518 /* ContentSecurityPolicySource.h in Headers */,
</span><del>-                                F48223131E386E240066FC79 /* AbstractPasteboard.h in Headers */,
</del><span class="cx">                                 CE799F981C6A46BC0097B518 /* ContentSecurityPolicySourceList.h in Headers */,
</span><span class="cx">                                 CE799FAC1C6A50660097B518 /* ContentSecurityPolicySourceListDirective.h in Headers */,
</span><span class="cx">                                 41D015CA0F4B5C71004A662F /* ContentType.h in Headers */,
</span><span class="lines">@@ -25810,7 +25848,6 @@
</span><span class="cx">                                 085B92BB0EFDE73D00E6123C /* FormDataBuilder.h in Headers */,
</span><span class="cx">                                 A8136D380973A8E700D74463 /* FormDataList.h in Headers */,
</span><span class="cx">                                 7EE6846712D26E3800E79415 /* FormDataStreamCFNet.h in Headers */,
</span><del>-                                4157474A1E3869AD00E914D8 /* LibWebRTCUtils.h in Headers */,
</del><span class="cx">                                 514C764E0CE9234E007EF3CD /* FormDataStreamMac.h in Headers */,
</span><span class="cx">                                 9B50B1DE17CD4C0F0087F63C /* FormNamedItem.h in Headers */,
</span><span class="cx">                                 656D373A0ADBA5DE00A4554D /* FormState.h in Headers */,
</span><span class="lines">@@ -25869,7 +25906,6 @@
</span><span class="cx">                                 A80D67080E9E9DEB00E420F0 /* GraphicsContextPlatformPrivateCG.h in Headers */,
</span><span class="cx">                                 0F580B0D0F12A2690051D689 /* GraphicsLayer.h in Headers */,
</span><span class="cx">                                 499B3ED7128CD31400E726C2 /* GraphicsLayerCA.h in Headers */,
</span><del>-                                41103AAD1E39791000769F03 /* RealtimeIncomingAudioSource.h in Headers */,
</del><span class="cx">                                 0F580B0E0F12A2690051D689 /* GraphicsLayerClient.h in Headers */,
</span><span class="cx">                                 1AC69593161A1E53003732CB /* GraphicsLayerFactory.h in Headers */,
</span><span class="cx">                                 0FA24D7A162DF91900A3F4C0 /* GraphicsLayerUpdater.h in Headers */,
</span><span class="lines">@@ -25885,7 +25921,6 @@
</span><span class="cx">                                 26EA89A71B4F2B75008C5FD2 /* HashableActionList.h in Headers */,
</span><span class="cx">                                 8482B7461198C35400BFB005 /* HashChangeEvent.h in Headers */,
</span><span class="cx">                                 A8748BE012CBF2DC001FBA41 /* HashTools.h in Headers */,
</span><del>-                                E3E4E2A81E3B17100023BB8A /* ScriptElementCachedScriptFetcher.h in Headers */,
</del><span class="cx">                                 F55B3DC01251F12D003EF269 /* HiddenInputType.h in Headers */,
</span><span class="cx">                                 515BE19C1D54F6C100DD7C68 /* HIDGamepad.h in Headers */,
</span><span class="cx">                                 515BE19E1D54F6C100DD7C68 /* HIDGamepadProvider.h in Headers */,
</span><span class="lines">@@ -25895,7 +25930,6 @@
</span><span class="cx">                                 4969B0F313D0B33F00DF3521 /* HitTestingTransformState.h in Headers */,
</span><span class="cx">                                 2D8287F716E4A0380086BD00 /* HitTestLocation.h in Headers */,
</span><span class="cx">                                 930908910AF7EDE40081DF01 /* HitTestRequest.h in Headers */,
</span><del>-                                415747471E3869A400E914D8 /* LibWebRTCMacros.h in Headers */,
</del><span class="cx">                                 9307F1D80AF2D59000DBA31A /* HitTestResult.h in Headers */,
</span><span class="cx">                                 BC3BC29C0E91AB0F00835588 /* HostWindow.h in Headers */,
</span><span class="cx">                                 FD31609912B026F700C1A359 /* HRTFDatabase.h in Headers */,
</span><span class="lines">@@ -26560,6 +26594,9 @@
</span><span class="cx">                                 A58C59D11E382EAE0047859C /* JSPerformanceMark.h in Headers */,
</span><span class="cx">                                 A58C59D31E382EB20047859C /* JSPerformanceMeasure.h in Headers */,
</span><span class="cx">                                 8A9A587111E84C36008ACFD1 /* JSPerformanceNavigation.h in Headers */,
</span><ins>+                                A5A993481E3809C6005B5E4D /* JSPerformanceObserver.h in Headers */,
+                                A5A9934A1E3809CB005B5E4D /* JSPerformanceObserverCallback.h in Headers */,
+                                A5A9934C1E3809CF005B5E4D /* JSPerformanceObserverEntryList.h in Headers */,
</ins><span class="cx">                                 CB38FD5B1CD2325B00592A3F /* JSPerformanceResourceTiming.h in Headers */,
</span><span class="cx">                                 8A9A588811E84F37008ACFD1 /* JSPerformanceTiming.h in Headers */,
</span><span class="cx">                                 FDEA6247152102FC00479DF0 /* JSPeriodicWave.h in Headers */,
</span><span class="lines">@@ -26897,6 +26934,11 @@
</span><span class="cx">                                 E5BA7D63151437CA00FE1E3F /* LengthFunctions.h in Headers */,
</span><span class="cx">                                 0F8716701C869D83004FF0DE /* LengthPoint.h in Headers */,
</span><span class="cx">                                 BCFF64920EAD15C200C1D6F7 /* LengthSize.h in Headers */,
</span><ins>+                                415747471E3869A400E914D8 /* LibWebRTCMacros.h in Headers */,
+                                417612B01E3A994000C3D81D /* LibWebRTCMediaEndpoint.h in Headers */,
+                                417612B21E3A994000C3D81D /* LibWebRTCPeerConnectionBackend.h in Headers */,
+                                415747481E3869A700E914D8 /* LibWebRTCProvider.h in Headers */,
+                                4157474A1E3869AD00E914D8 /* LibWebRTCUtils.h in Headers */,
</ins><span class="cx">                                 84730D911248F0B300D3A9C9 /* LightSource.h in Headers */,
</span><span class="cx">                                 B22279650D00BF220071B782 /* LinearGradientAttributes.h in Headers */,
</span><span class="cx">                                 AB31C91E10AE1B8E000C7B92 /* LineClampValue.h in Headers */,
</span><span class="lines">@@ -27275,6 +27317,9 @@
</span><span class="cx">                                 AD5A0C251DECACCC00707054 /* PerformanceLogging.h in Headers */,
</span><span class="cx">                                 83FE90271E307C30003E9199 /* PerformanceMonitor.h in Headers */,
</span><span class="cx">                                 8AF4E55611DC5A36000ED3DE /* PerformanceNavigation.h in Headers */,
</span><ins>+                                A5A9933D1E37FB19005B5E4D /* PerformanceObserver.h in Headers */,
+                                A5A9933F1E37FB1F005B5E4D /* PerformanceObserverCallback.h in Headers */,
+                                A5A993411E37FB28005B5E4D /* PerformanceObserverEntryList.h in Headers */,
</ins><span class="cx">                                 86512EDF154A2AEF00A90426 /* PerformanceResourceTiming.h in Headers */,
</span><span class="cx">                                 8AF4E55C11DC5A63000ED3DE /* PerformanceTiming.h in Headers */,
</span><span class="cx">                                 A554B5F31E38393A001D4E03 /* PerformanceUserTiming.h in Headers */,
</span><span class="lines">@@ -27384,6 +27429,7 @@
</span><span class="cx">                                 416E6FE91BBD12E5000A6043 /* ReadableStreamBuiltins.h in Headers */,
</span><span class="cx">                                 416E6FE81BBD12DF000A3F64 /* ReadableStreamInternalsBuiltins.h in Headers */,
</span><span class="cx">                                 FD31603C12B0267600C1A359 /* RealtimeAnalyser.h in Headers */,
</span><ins>+                                41103AAD1E39791000769F03 /* RealtimeIncomingAudioSource.h in Headers */,
</ins><span class="cx">                                 4A4F65711AA997F100E38CDD /* RealtimeMediaSource.h in Headers */,
</span><span class="cx">                                 4A4F65721AA997F100E38CDD /* RealtimeMediaSourceCapabilities.h in Headers */,
</span><span class="cx">                                 4A0FFAA21AAF5EA20062803B /* RealtimeMediaSourceCenter.h in Headers */,
</span><span class="lines">@@ -27390,6 +27436,7 @@
</span><span class="cx">                                 4A0FFAA61AAF5EF60062803B /* RealtimeMediaSourceCenterMac.h in Headers */,
</span><span class="cx">                                 4A4F65741AA997F100E38CDD /* RealtimeMediaSourceSettings.h in Headers */,
</span><span class="cx">                                 07C1C0E51BFB60ED00BD2256 /* RealtimeMediaSourceSupportedConstraints.h in Headers */,
</span><ins>+                                41103AAC1E39791000769F03 /* RealtimeOutgoingAudioSource.h in Headers */,
</ins><span class="cx">                                 BC4368E80C226E32005EFB5F /* Rect.h in Headers */,
</span><span class="cx">                                 FD45A958175D414C00C21EC8 /* RectangleShape.h in Headers */,
</span><span class="cx">                                 9831AE4A154225C900FE2644 /* ReferrerPolicy.h in Headers */,
</span><span class="lines">@@ -27557,7 +27604,6 @@
</span><span class="cx">                                 4998AEC613F9D0EA0090B1AA /* RequestAnimationFrameCallback.h in Headers */,
</span><span class="cx">                                 F55B3DD01251F12D003EF269 /* ResetInputType.h in Headers */,
</span><span class="cx">                                 7EE6846A12D26E3800E79415 /* ResourceError.h in Headers */,
</span><del>-                                415747481E3869A700E914D8 /* LibWebRTCProvider.h in Headers */,
</del><span class="cx">                                 934F713C0D5A6F1900018D69 /* ResourceErrorBase.h in Headers */,
</span><span class="cx">                                 514C76790CE923A1007EF3CD /* ResourceHandle.h in Headers */,
</span><span class="cx">                                 26FAE4CD1852E3A5004C8C46 /* ResourceHandleCFURLConnectionDelegate.h in Headers */,
</span><span class="lines">@@ -27649,6 +27695,7 @@
</span><span class="cx">                                 93B70D7009EB0C7C009D8468 /* ScriptController.h in Headers */,
</span><span class="cx">                                 4998AED213FB224D0090B1AA /* ScriptedAnimationController.h in Headers */,
</span><span class="cx">                                 08A484780E5272C500C3FE76 /* ScriptElement.h in Headers */,
</span><ins>+                                E3E4E2A81E3B17100023BB8A /* ScriptElementCachedScriptFetcher.h in Headers */,
</ins><span class="cx">                                 E11C9D9B0EB3681200E409DB /* ScriptExecutionContext.h in Headers */,
</span><span class="cx">                                 41F066E40F64BCF600A07EAC /* ScriptGlobalObject.h in Headers */,
</span><span class="cx">                                 E38838991BAD145F00D62EE3 /* ScriptModuleLoader.h in Headers */,
</span><span class="lines">@@ -27843,7 +27890,6 @@
</span><span class="cx">                                 414B82051D6DF0E50077EBE3 /* StructuredClone.h in Headers */,
</span><span class="cx">                                 BC5EB6A30E81DC4F00B25965 /* StyleBackgroundData.h in Headers */,
</span><span class="cx">                                 BC5EB67B0E81D3BE00B25965 /* StyleBoxData.h in Headers */,
</span><del>-                                F48223111E3869B80066FC79 /* WebItemProviderPasteboard.h in Headers */,
</del><span class="cx">                                 8386A96D19F61B2E00E1EC4A /* StyleBuilder.h in Headers */,
</span><span class="cx">                                 83B9687B19F8AB83004EF7AF /* StyleBuilderConverter.h in Headers */,
</span><span class="cx">                                 835D363719FF6193004C93AB /* StyleBuilderCustom.h in Headers */,
</span><span class="lines">@@ -27887,7 +27933,6 @@
</span><span class="cx">                                 A8EA800C0A19516E00A8EF5F /* StyleSheet.h in Headers */,
</span><span class="cx">                                 E4F9EEF3156DA00700D23E7E /* StyleSheetContents.h in Headers */,
</span><span class="cx">                                 A8EA800A0A19516E00A8EF5F /* StyleSheetList.h in Headers */,
</span><del>-                                417612B21E3A994000C3D81D /* LibWebRTCPeerConnectionBackend.h in Headers */,
</del><span class="cx">                                 BC5EB5E50E81BF6D00B25965 /* StyleSurroundData.h in Headers */,
</span><span class="cx">                                 BC5EB8100E81F2CE00B25965 /* StyleTransformData.h in Headers */,
</span><span class="cx">                                 E4DEAA1817A93DC3000E0430 /* StyleTreeResolver.h in Headers */,
</span><span class="lines">@@ -27955,7 +28000,6 @@
</span><span class="cx">                                 B22279AE0D00BF220071B782 /* SVGDefsElement.h in Headers */,
</span><span class="cx">                                 B22279B10D00BF220071B782 /* SVGDescElement.h in Headers */,
</span><span class="cx">                                 B22279B40D00BF220071B782 /* SVGDocument.h in Headers */,
</span><del>-                                41103AAC1E39791000769F03 /* RealtimeOutgoingAudioSource.h in Headers */,
</del><span class="cx">                                 B28C6A280D00C44800334AA4 /* SVGDocumentExtensions.h in Headers */,
</span><span class="cx">                                 B22279B70D00BF220071B782 /* SVGElement.h in Headers */,
</span><span class="cx">                                 656581FE09D1508D000E61D7 /* SVGElementFactory.h in Headers */,
</span><span class="lines">@@ -28436,6 +28480,7 @@
</span><span class="cx">                                 77A17A7812F28642004E02F6 /* WebGLVertexArrayObjectOES.h in Headers */,
</span><span class="cx">                                 A5840E25187B8AC200843B10 /* WebInjectedScriptHost.h in Headers */,
</span><span class="cx">                                 A584FE301864CB8400843B10 /* WebInjectedScriptManager.h in Headers */,
</span><ins>+                                F48223111E3869B80066FC79 /* WebItemProviderPasteboard.h in Headers */,
</ins><span class="cx">                                 31C0FF220E4CEB6E007D6FE5 /* WebKitAnimationEvent.h in Headers */,
</span><span class="cx">                                 5DFEBAB718592B6D00C75BEB /* WebKitAvailability.h in Headers */,
</span><span class="cx">                                 498391590F1E776900C23782 /* WebKitCSSMatrix.h in Headers */,
</span><span class="lines">@@ -28890,7 +28935,6 @@
</span><span class="cx">                                 51714EB01CF665CE004723C4 /* JSGCObservation.cpp in Sources */,
</span><span class="cx">                                 417DA71D13735DFA007C57FB /* JSInternals.cpp in Sources */,
</span><span class="cx">                                 A740B5A714C935AF00A77FA4 /* JSInternalSettings.cpp in Sources */,
</span><del>-                                4157EBFA1E3AB67900AC9FE9 /* MockLibWebRTCPeerConnection.cpp in Sources */,
</del><span class="cx">                                 53ED3FDE167A88E7006762E6 /* JSInternalSettingsGenerated.cpp in Sources */,
</span><span class="cx">                                 A740B59714C935AF00A77FA4 /* JSMallocStatistics.cpp in Sources */,
</span><span class="cx">                                 CDF4B7331E03D14900E235A2 /* JSMediaKeysRequirement.cpp in Sources */,
</span><span class="lines">@@ -28906,6 +28950,7 @@
</span><span class="cx">                                 A1B5B29E1AAA846E008B6042 /* MockContentFilterSettings.cpp in Sources */,
</span><span class="cx">                                 51058ADB1D6792C1009A538C /* MockGamepad.cpp in Sources */,
</span><span class="cx">                                 51058ADD1D6792C1009A538C /* MockGamepadProvider.cpp in Sources */,
</span><ins>+                                4157EBFA1E3AB67900AC9FE9 /* MockLibWebRTCPeerConnection.cpp in Sources */,
</ins><span class="cx">                                 2D6F3E901C1ECB270061DBD4 /* MockPageOverlay.cpp in Sources */,
</span><span class="cx">                                 2D97F04719DD413C001EE9C3 /* MockPageOverlayClient.cpp in Sources */,
</span><span class="cx">                                 A140618B1E2ECA0A0032B34E /* MockQuickLookHandleClient.cpp in Sources */,
</span><span class="lines">@@ -29216,7 +29261,6 @@
</span><span class="cx">                                 E1B4CD2510B322E200BFFD7E /* CredentialStorageMac.mm in Sources */,
</span><span class="cx">                                 2D481F00146B5C4C00AA7834 /* CrossfadeGeneratedImage.cpp in Sources */,
</span><span class="cx">                                 E1C416170F6563180092D2FB /* CrossOriginAccessControl.cpp in Sources */,
</span><del>-                                417612B11E3A994000C3D81D /* LibWebRTCPeerConnectionBackend.cpp in Sources */,
</del><span class="cx">                                 41ABE67C1D0580E0006D862D /* CrossOriginPreflightChecker.cpp in Sources */,
</span><span class="cx">                                 E1C415DE0F655D7C0092D2FB /* CrossOriginPreflightResultCache.cpp in Sources */,
</span><span class="cx">                                 E16980491133644700894115 /* CRuntimeObject.cpp in Sources */,
</span><span class="lines">@@ -29309,7 +29353,6 @@
</span><span class="cx">                                 9418278E1D8CAF9200492764 /* CSSPendingSubstitutionValue.cpp in Sources */,
</span><span class="cx">                                 977B3862122883E900B81FF8 /* CSSPreloadScanner.cpp in Sources */,
</span><span class="cx">                                 A80E6D050A1989CA007FB8C5 /* CSSPrimitiveValue.cpp in Sources */,
</span><del>-                                F48223101E3869B80066FC79 /* WebItemProviderPasteboard.mm in Sources */,
</del><span class="cx">                                 A80E6CF70A1989CA007FB8C5 /* CSSProperty.cpp in Sources */,
</span><span class="cx">                                 78D02BC5154A18DF00B62D05 /* CSSPropertyAnimation.cpp in Sources */,
</span><span class="cx">                                 1ABA76CA11D20E50004C201C /* CSSPropertyNames.cpp in Sources */,
</span><span class="lines">@@ -29464,7 +29507,6 @@
</span><span class="cx">                                 15FCC9FC1B4DF7F200E72326 /* DOMURLMediaStream.cpp in Sources */,
</span><span class="cx">                                 1403B99809EB13AF00797C7F /* DOMWindow.cpp in Sources */,
</span><span class="cx">                                 517FBA1E151AB17C00B57959 /* DOMWindowExtension.cpp in Sources */,
</span><del>-                                41103AAE1E39791000769F03 /* RealtimeIncomingAudioSource.cpp in Sources */,
</del><span class="cx">                                 418C39561C8DAC7F0051C8A3 /* DOMWindowFetch.cpp in Sources */,
</span><span class="cx">                                 5185FC741BB4C4E80012898F /* DOMWindowIndexedDatabase.cpp in Sources */,
</span><span class="cx">                                 97B38E28151C4273004622E9 /* DOMWindowNotifications.cpp in Sources */,
</span><span class="lines">@@ -30368,6 +30410,9 @@
</span><span class="cx">                                 A58C59D01E382EAC0047859C /* JSPerformanceMark.cpp in Sources */,
</span><span class="cx">                                 A58C59D21E382EB00047859C /* JSPerformanceMeasure.cpp in Sources */,
</span><span class="cx">                                 8A9A587011E84C36008ACFD1 /* JSPerformanceNavigation.cpp in Sources */,
</span><ins>+                                A5A9934D1E3809D7005B5E4D /* JSPerformanceObserver.cpp in Sources */,
+                                A5A993491E3809C9005B5E4D /* JSPerformanceObserverCallback.cpp in Sources */,
+                                A5A9934B1E3809CD005B5E4D /* JSPerformanceObserverEntryList.cpp in Sources */,
</ins><span class="cx">                                 CB38FD5A1CD2325800592A3F /* JSPerformanceResourceTiming.cpp in Sources */,
</span><span class="cx">                                 0F43C85F189E15A600019AE2 /* JSPerformanceTiming.cpp in Sources */,
</span><span class="cx">                                 FDEA6246152102FC00479DF0 /* JSPeriodicWave.cpp in Sources */,
</span><span class="lines">@@ -30535,7 +30580,6 @@
</span><span class="cx">                                 B2FA3DBA0AB75A6F000E5AC4 /* JSSVGPathSegArcRel.cpp in Sources */,
</span><span class="cx">                                 B2FA3DBC0AB75A6F000E5AC4 /* JSSVGPathSegClosePath.cpp in Sources */,
</span><span class="cx">                                 B2FA3DBE0AB75A6F000E5AC4 /* JSSVGPathSegCurvetoCubicAbs.cpp in Sources */,
</span><del>-                                417612AF1E3A994000C3D81D /* LibWebRTCMediaEndpoint.cpp in Sources */,
</del><span class="cx">                                 B2FA3DC00AB75A6F000E5AC4 /* JSSVGPathSegCurvetoCubicRel.cpp in Sources */,
</span><span class="cx">                                 B2FA3DC20AB75A6F000E5AC4 /* JSSVGPathSegCurvetoCubicSmoothAbs.cpp in Sources */,
</span><span class="cx">                                 B2FA3DC40AB75A6F000E5AC4 /* JSSVGPathSegCurvetoCubicSmoothRel.cpp in Sources */,
</span><span class="lines">@@ -30739,6 +30783,9 @@
</span><span class="cx">                                 E55F497A151B888000BB67DB /* LengthFunctions.cpp in Sources */,
</span><span class="cx">                                 0F87166F1C869D83004FF0DE /* LengthPoint.cpp in Sources */,
</span><span class="cx">                                 0FEF20CE1BD4A24100128E5D /* LengthSize.cpp in Sources */,
</span><ins>+                                417612AF1E3A994000C3D81D /* LibWebRTCMediaEndpoint.cpp in Sources */,
+                                417612B11E3A994000C3D81D /* LibWebRTCPeerConnectionBackend.cpp in Sources */,
+                                415747491E3869AA00E914D8 /* LibWebRTCUtils.cpp in Sources */,
</ins><span class="cx">                                 FFB698CC1833EE0D00158A31 /* LineBreaker.cpp in Sources */,
</span><span class="cx">                                 89B5EAA111E8003D00F2367E /* LineEnding.cpp in Sources */,
</span><span class="cx">                                 FFB698CF183402BB00158A31 /* LineInfo.cpp in Sources */,
</span><span class="lines">@@ -31030,6 +31077,8 @@
</span><span class="cx">                                 AD5A0C231DECACC000707054 /* PerformanceLoggingCocoa.mm in Sources */,
</span><span class="cx">                                 83FE90281E307C33003E9199 /* PerformanceMonitor.cpp in Sources */,
</span><span class="cx">                                 8AF4E55511DC5A36000ED3DE /* PerformanceNavigation.cpp in Sources */,
</span><ins>+                                A5A9933E1E37FB1C005B5E4D /* PerformanceObserver.cpp in Sources */,
+                                A5A993401E37FB25005B5E4D /* PerformanceObserverEntryList.cpp in Sources */,
</ins><span class="cx">                                 86512EDE154A2AEF00A90426 /* PerformanceResourceTiming.cpp in Sources */,
</span><span class="cx">                                 0F43C85D189E10CF00019AE2 /* PerformanceTiming.cpp in Sources */,
</span><span class="cx">                                 A554B5F21E383938001D4E03 /* PerformanceUserTiming.cpp in Sources */,
</span><span class="lines">@@ -31103,11 +31152,13 @@
</span><span class="cx">                                 6E84E9E017668BEE00815B68 /* RasterShape.cpp in Sources */,
</span><span class="cx">                                 418C39611C8F0AB10051C8A3 /* ReadableStreamDefaultController.cpp in Sources */,
</span><span class="cx">                                 FD31603B12B0267600C1A359 /* RealtimeAnalyser.cpp in Sources */,
</span><ins>+                                41103AAE1E39791000769F03 /* RealtimeIncomingAudioSource.cpp in Sources */,
</ins><span class="cx">                                 4A4F65701AA997F100E38CDD /* RealtimeMediaSource.cpp in Sources */,
</span><span class="cx">                                 4A0FFAA11AAF5EA20062803B /* RealtimeMediaSourceCenter.cpp in Sources */,
</span><span class="cx">                                 4A0FFAA51AAF5EF60062803B /* RealtimeMediaSourceCenterMac.cpp in Sources */,
</span><span class="cx">                                 4A4F65731AA997F100E38CDD /* RealtimeMediaSourceSettings.cpp in Sources */,
</span><span class="cx">                                 2EC41DE41C0410A300D294FE /* RealtimeMediaSourceSupportedConstraints.cpp in Sources */,
</span><ins>+                                41103AAB1E39791000769F03 /* RealtimeOutgoingAudioSource.cpp in Sources */,
</ins><span class="cx">                                 FD45A95A175D417100C21EC8 /* RectangleShape.cpp in Sources */,
</span><span class="cx">                                 BCAB418113E356E800D8AAF3 /* Region.cpp in Sources */,
</span><span class="cx">                                 CDFC360518CA61C20026E56F /* RemoteCommandListener.cpp in Sources */,
</span><span class="lines">@@ -31318,6 +31369,7 @@
</span><span class="cx">                                 A83E1C740E49042C00140B9C /* ScriptControllerMac.mm in Sources */,
</span><span class="cx">                                 4998AED113FB224D0090B1AA /* ScriptedAnimationController.cpp in Sources */,
</span><span class="cx">                                 08A484770E5272C500C3FE76 /* ScriptElement.cpp in Sources */,
</span><ins>+                                E3E4E2A71E3B17100023BB8A /* ScriptElementCachedScriptFetcher.cpp in Sources */,
</ins><span class="cx">                                 E11C9DB00EB3699500E409DB /* ScriptExecutionContext.cpp in Sources */,
</span><span class="cx">                                 41F066E50F64BCF600A07EAC /* ScriptGlobalObject.cpp in Sources */,
</span><span class="cx">                                 E38838981BAD145F00D62EE3 /* ScriptModuleLoader.cpp in Sources */,
</span><span class="lines">@@ -31411,7 +31463,6 @@
</span><span class="cx">                                 512DD8E30D91E2B4000F89EE /* SharedBufferCF.cpp in Sources */,
</span><span class="cx">                                 97B1F02E13B025CA00F5103F /* SharedBufferChunkReader.cpp in Sources */,
</span><span class="cx">                                 1A4A95520B4EDCFF002D8C3C /* SharedBufferCocoa.mm in Sources */,
</span><del>-                                415747491E3869AA00E914D8 /* LibWebRTCUtils.cpp in Sources */,
</del><span class="cx">                                 163E88F7118A39D200ED9231 /* SimpleFontDataCoreText.cpp in Sources */,
</span><span class="cx">                                 E48944A2180B57D800F165D8 /* SimpleLineLayout.cpp in Sources */,
</span><span class="cx">                                 585D6E031A1A792E00FA4F12 /* SimpleLineLayoutFlowContents.cpp in Sources */,
</span><span class="lines">@@ -31747,7 +31798,6 @@
</span><span class="cx">                                 93309E1B099E64920056E581 /* TextIterator.cpp in Sources */,
</span><span class="cx">                                 E4D988B617BFEB210084FB88 /* TextNodeTraversal.cpp in Sources */,
</span><span class="cx">                                 1C18DA58181AF6A500C4EF22 /* TextPainter.cpp in Sources */,
</span><del>-                                41103AAB1E39791000769F03 /* RealtimeOutgoingAudioSource.cpp in Sources */,
</del><span class="cx">                                 E4C91A101802343900A17F6D /* TextPaintStyle.cpp in Sources */,
</span><span class="cx">                                 93F19A9D08245E59001E9ABC /* TextResourceDecoder.cpp in Sources */,
</span><span class="cx">                                 376DCCE113B4F966002EBEFC /* TextRun.cpp in Sources */,
</span><span class="lines">@@ -31878,7 +31928,6 @@
</span><span class="cx">                                 29A8124A0FBB9CA900510293 /* WebAccessibilityObjectWrapperBase.mm in Sources */,
</span><span class="cx">                                 AAA728F816D1D8BC00D3BBC6 /* WebAccessibilityObjectWrapperIOS.mm in Sources */,
</span><span class="cx">                                 AA478A8016CD70C3007D1BB4 /* WebAccessibilityObjectWrapperMac.mm in Sources */,
</span><del>-                                E3E4E2A71E3B17100023BB8A /* ScriptElementCachedScriptFetcher.cpp in Sources */,
</del><span class="cx">                                 2D3EF4491917915C00034184 /* WebActionDisablingCALayerDelegate.mm in Sources */,
</span><span class="cx">                                 120DE3ED1C86CA3E00B6D4DD /* WebAnimation.cpp in Sources */,
</span><span class="cx">                                 07D637411BB0B11300256CE9 /* WebAudioSourceProviderAVFObjC.mm in Sources */,
</span><span class="lines">@@ -31951,6 +32000,7 @@
</span><span class="cx">                                 77A17A7712F28642004E02F6 /* WebGLVertexArrayObjectOES.cpp in Sources */,
</span><span class="cx">                                 A5840E24187B8AC200843B10 /* WebInjectedScriptHost.cpp in Sources */,
</span><span class="cx">                                 A584FE2F1864CB8400843B10 /* WebInjectedScriptManager.cpp in Sources */,
</span><ins>+                                F48223101E3869B80066FC79 /* WebItemProviderPasteboard.mm in Sources */,
</ins><span class="cx">                                 31C0FF210E4CEB6E007D6FE5 /* WebKitAnimationEvent.cpp in Sources */,
</span><span class="cx">                                 498391580F1E776900C23782 /* WebKitCSSMatrix.cpp in Sources */,
</span><span class="cx">                                 8AA61CFF144D595B00F37350 /* WebKitCSSRegionRule.cpp in Sources */,
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLMediaElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLMediaElement.cpp (211405 => 211406)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLMediaElement.cpp        2017-01-31 04:50:40 UTC (rev 211405)
+++ trunk/Source/WebCore/html/HTMLMediaElement.cpp        2017-01-31 06:21:35 UTC (rev 211406)
</span><span class="lines">@@ -134,7 +134,6 @@
</span><span class="cx"> #if ENABLE(MEDIA_SOURCE)
</span><span class="cx"> #include &quot;DOMWindow.h&quot;
</span><span class="cx"> #include &quot;MediaSource.h&quot;
</span><del>-#include &quot;Performance.h&quot;
</del><span class="cx"> #include &quot;VideoPlaybackQuality.h&quot;
</span><span class="cx"> #endif
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreloadercacheCachedResourceLoadercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/loader/cache/CachedResourceLoader.cpp (211405 => 211406)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/loader/cache/CachedResourceLoader.cpp        2017-01-31 04:50:40 UTC (rev 211405)
+++ trunk/Source/WebCore/loader/cache/CachedResourceLoader.cpp        2017-01-31 06:21:35 UTC (rev 211406)
</span><span class="lines">@@ -57,7 +57,6 @@
</span><span class="cx"> #include &quot;MainFrame.h&quot;
</span><span class="cx"> #include &quot;MemoryCache.h&quot;
</span><span class="cx"> #include &quot;Page.h&quot;
</span><del>-#include &quot;Performance.h&quot;
</del><span class="cx"> #include &quot;PingLoader.h&quot;
</span><span class="cx"> #include &quot;PlatformStrategies.h&quot;
</span><span class="cx"> #include &quot;RenderElement.h&quot;
</span></span></pre></div>
<a id="trunkSourceWebCorepageIntersectionObserverh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/IntersectionObserver.h (211405 => 211406)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/IntersectionObserver.h        2017-01-31 04:50:40 UTC (rev 211405)
+++ trunk/Source/WebCore/page/IntersectionObserver.h        2017-01-31 06:21:35 UTC (rev 211406)
</span><span class="lines">@@ -29,7 +29,6 @@
</span><span class="cx"> 
</span><span class="cx"> #include &quot;IntersectionObserverCallback.h&quot;
</span><span class="cx"> #include &quot;IntersectionObserverEntry.h&quot;
</span><del>-#include &lt;wtf/Optional.h&gt;
</del><span class="cx"> #include &lt;wtf/RefCounted.h&gt;
</span><span class="cx"> #include &lt;wtf/Variant.h&gt;
</span><span class="cx"> #include &lt;wtf/text/WTFString.h&gt;
</span></span></pre></div>
<a id="trunkSourceWebCorepagePerformancecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/Performance.cpp (211405 => 211406)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/Performance.cpp        2017-01-31 04:50:40 UTC (rev 211405)
+++ trunk/Source/WebCore/page/Performance.cpp        2017-01-31 06:21:35 UTC (rev 211406)
</span><span class="lines">@@ -41,6 +41,7 @@
</span><span class="cx"> #include &quot;Frame.h&quot;
</span><span class="cx"> #include &quot;PerformanceEntry.h&quot;
</span><span class="cx"> #include &quot;PerformanceNavigation.h&quot;
</span><ins>+#include &quot;PerformanceObserver.h&quot;
</ins><span class="cx"> #include &quot;PerformanceResourceTiming.h&quot;
</span><span class="cx"> #include &quot;PerformanceTiming.h&quot;
</span><span class="cx"> #include &quot;PerformanceUserTiming.h&quot;
</span><span class="lines">@@ -171,7 +172,14 @@
</span><span class="cx"> {
</span><span class="cx">     if (!m_userTiming)
</span><span class="cx">         m_userTiming = std::make_unique&lt;UserTiming&gt;(*this);
</span><del>-    return m_userTiming-&gt;mark(markName);
</del><ins>+
+    auto result = m_userTiming-&gt;mark(markName);
+    if (result.hasException())
+        return result.releaseException();
+
+    queueEntry(result.releaseReturnValue());
+
+    return { };
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void Performance::clearMarks(const String&amp; markName)
</span><span class="lines">@@ -185,7 +193,14 @@
</span><span class="cx"> {
</span><span class="cx">     if (!m_userTiming)
</span><span class="cx">         m_userTiming = std::make_unique&lt;UserTiming&gt;(*this);
</span><del>-    return m_userTiming-&gt;measure(measureName, startMark, endMark);
</del><ins>+
+    auto result = m_userTiming-&gt;measure(measureName, startMark, endMark);
+    if (result.hasException())
+        return result.releaseException();
+
+    queueEntry(result.releaseReturnValue());
+
+    return { };
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void Performance::clearMeasures(const String&amp; measureName)
</span><span class="lines">@@ -195,6 +210,16 @@
</span><span class="cx">     m_userTiming-&gt;clearMeasures(measureName);
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+void Performance::registerPerformanceObserver(PerformanceObserver&amp; observer)
+{
+    m_observers.add(&amp;observer);
+}
+
+void Performance::unregisterPerformanceObserver(PerformanceObserver&amp; observer)
+{
+    m_observers.remove(&amp;observer);
+}
+
</ins><span class="cx"> double Performance::now() const
</span><span class="cx"> {
</span><span class="cx">     double nowSeconds = monotonicallyIncreasingTime() - m_referenceTime;
</span><span class="lines">@@ -207,6 +232,30 @@
</span><span class="cx">     return std::floor(seconds / resolutionSeconds) * resolutionSeconds;
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+void Performance::queueEntry(PerformanceEntry&amp; entry)
+{
+    bool shouldScheduleTask = false;
+    for (auto&amp; observer : m_observers) {
+        if (observer-&gt;typeFilter().contains(entry.type())) {
+            observer-&gt;queueEntry(entry);
+            shouldScheduleTask = true;
+        }
+    }
+
+    if (!shouldScheduleTask)
+        return;
+
+    if (m_performanceTimelineTaskQueue.hasPendingTasks())
+        return;
+
+    m_performanceTimelineTaskQueue.enqueueTask([this] () {
+        Vector&lt;RefPtr&lt;PerformanceObserver&gt;&gt; observers;
+        copyToVector(m_observers, observers);
+        for (auto&amp; observer : observers)
+            observer-&gt;deliver();
+    });
+}
+
</ins><span class="cx"> } // namespace WebCore
</span><span class="cx"> 
</span><span class="cx"> #endif // ENABLE(WEB_TIMING)
</span></span></pre></div>
<a id="trunkSourceWebCorepagePerformanceh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/Performance.h (211405 => 211406)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/Performance.h        2017-01-31 04:50:40 UTC (rev 211405)
+++ trunk/Source/WebCore/page/Performance.h        2017-01-31 06:21:35 UTC (rev 211406)
</span><span class="lines">@@ -37,6 +37,8 @@
</span><span class="cx"> #include &quot;DOMWindowProperty.h&quot;
</span><span class="cx"> #include &quot;EventTarget.h&quot;
</span><span class="cx"> #include &quot;ExceptionOr.h&quot;
</span><ins>+#include &quot;GenericTaskQueue.h&quot;
+#include &lt;wtf/ListHashSet.h&gt;
</ins><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><span class="lines">@@ -44,6 +46,7 @@
</span><span class="cx"> class LoadTiming;
</span><span class="cx"> class PerformanceEntry;
</span><span class="cx"> class PerformanceNavigation;
</span><ins>+class PerformanceObserver;
</ins><span class="cx"> class PerformanceTiming;
</span><span class="cx"> class ResourceResponse;
</span><span class="cx"> class URL;
</span><span class="lines">@@ -67,9 +70,6 @@
</span><span class="cx"> 
</span><span class="cx">     void addResourceTiming(const String&amp; initiatorName, Document*, const URL&amp; originalURL, const ResourceResponse&amp;, const LoadTiming&amp;);
</span><span class="cx"> 
</span><del>-    using RefCounted::ref;
-    using RefCounted::deref;
-
</del><span class="cx">     ExceptionOr&lt;void&gt; mark(const String&amp; markName);
</span><span class="cx">     void clearMarks(const String&amp; markName);
</span><span class="cx"> 
</span><span class="lines">@@ -76,8 +76,14 @@
</span><span class="cx">     ExceptionOr&lt;void&gt; measure(const String&amp; measureName, const String&amp; startMark, const String&amp; endMark);
</span><span class="cx">     void clearMeasures(const String&amp; measureName);
</span><span class="cx"> 
</span><ins>+    void registerPerformanceObserver(PerformanceObserver&amp;);
+    void unregisterPerformanceObserver(PerformanceObserver&amp;);
+
</ins><span class="cx">     static double reduceTimeResolution(double seconds);
</span><span class="cx"> 
</span><ins>+    using RefCounted::ref;
+    using RefCounted::deref;
+
</ins><span class="cx"> private:
</span><span class="cx">     explicit Performance(Frame&amp;);
</span><span class="cx"> 
</span><span class="lines">@@ -89,6 +95,8 @@
</span><span class="cx"> 
</span><span class="cx">     bool isResourceTimingBufferFull() const;
</span><span class="cx"> 
</span><ins>+    void queueEntry(PerformanceEntry&amp;);
+
</ins><span class="cx">     mutable RefPtr&lt;PerformanceNavigation&gt; m_navigation;
</span><span class="cx">     mutable RefPtr&lt;PerformanceTiming&gt; m_timing;
</span><span class="cx"> 
</span><span class="lines">@@ -99,6 +107,9 @@
</span><span class="cx">     double m_referenceTime;
</span><span class="cx"> 
</span><span class="cx">     std::unique_ptr&lt;UserTiming&gt; m_userTiming;
</span><ins>+
+    GenericTaskQueue&lt;Timer&gt; m_performanceTimelineTaskQueue;
+    ListHashSet&lt;RefPtr&lt;PerformanceObserver&gt;&gt; m_observers;
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCorepagePerformanceEntrycpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/PerformanceEntry.cpp (211405 => 211406)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/PerformanceEntry.cpp        2017-01-31 04:50:40 UTC (rev 211405)
+++ trunk/Source/WebCore/page/PerformanceEntry.cpp        2017-01-31 06:21:35 UTC (rev 211406)
</span><span class="lines">@@ -33,13 +33,16 @@
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(WEB_TIMING)
</span><span class="cx"> 
</span><ins>+#include &quot;RuntimeEnabledFeatures.h&quot;
+
</ins><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><del>-PerformanceEntry::PerformanceEntry(const String&amp; name, const String&amp; entryType, double startTime, double finishTime)
</del><ins>+PerformanceEntry::PerformanceEntry(Type type, const String&amp; name, const String&amp; entryType, double startTime, double finishTime)
</ins><span class="cx">     : m_name(name)
</span><span class="cx">     , m_entryType(entryType)
</span><span class="cx">     , m_startTime(startTime)
</span><span class="cx">     , m_duration(finishTime - startTime)
</span><ins>+    , m_type(type)
</ins><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -47,6 +50,26 @@
</span><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+std::optional&lt;PerformanceEntry::Type&gt; PerformanceEntry::parseEntryTypeString(const String&amp; entryType)
+{
+    if (entryType == &quot;navigation&quot;)
+        return std::optional&lt;Type&gt;(Type::Navigation);
+
+    if (RuntimeEnabledFeatures::sharedFeatures().userTimingEnabled()) {
+        if (entryType == &quot;mark&quot;)
+            return std::optional&lt;Type&gt;(Type::Mark);
+        if (entryType == &quot;measure&quot;)
+            return std::optional&lt;Type&gt;(Type::Measure);
+    }
+
+    if (RuntimeEnabledFeatures::sharedFeatures().resourceTimingEnabled()) {
+        if (entryType == &quot;resource&quot;)
+            return std::optional&lt;Type&gt;(Type::Resource);
+    }
+
+    return std::nullopt;
+}
+
</ins><span class="cx"> } // namespace WebCore
</span><span class="cx"> 
</span><span class="cx"> #endif // ENABLE(WEB_TIMING)
</span></span></pre></div>
<a id="trunkSourceWebCorepagePerformanceEntryh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/PerformanceEntry.h (211405 => 211406)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/PerformanceEntry.h        2017-01-31 04:50:40 UTC (rev 211405)
+++ trunk/Source/WebCore/page/PerformanceEntry.h        2017-01-31 06:21:35 UTC (rev 211406)
</span><span class="lines">@@ -34,6 +34,7 @@
</span><span class="cx"> #if ENABLE(WEB_TIMING)
</span><span class="cx"> 
</span><span class="cx"> #include &quot;Performance.h&quot;
</span><ins>+#include &lt;wtf/Optional.h&gt;
</ins><span class="cx"> #include &lt;wtf/RefCounted.h&gt;
</span><span class="cx"> #include &lt;wtf/TypeCasts.h&gt;
</span><span class="cx"> #include &lt;wtf/text/WTFString.h&gt;
</span><span class="lines">@@ -49,6 +50,17 @@
</span><span class="cx">     double startTime() const { return m_startTime; }
</span><span class="cx">     double duration() const { return m_duration; }
</span><span class="cx"> 
</span><ins>+    enum class Type {
+        Navigation = 1 &lt;&lt; 0,
+        Mark = 1 &lt;&lt; 1,
+        Measure = 1 &lt;&lt; 2,
+        Resource = 1 &lt;&lt; 3,
+    };
+
+    Type type() const { return m_type; }
+
+    static std::optional&lt;Type&gt; parseEntryTypeString(const String&amp; entryType);
+
</ins><span class="cx">     virtual bool isResource() const { return false; }
</span><span class="cx">     virtual bool isMark() const { return false; }
</span><span class="cx">     virtual bool isMeasure() const { return false; }
</span><span class="lines">@@ -59,7 +71,7 @@
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx"> protected:
</span><del>-    PerformanceEntry(const String&amp; name, const String&amp; entryType, double startTime, double finishTime);
</del><ins>+    PerformanceEntry(Type, const String&amp; name, const String&amp; entryType, double startTime, double finishTime);
</ins><span class="cx"> 
</span><span class="cx"> private:
</span><span class="cx">     const String m_name;
</span><span class="lines">@@ -66,6 +78,7 @@
</span><span class="cx">     const String m_entryType;
</span><span class="cx">     const double m_startTime;
</span><span class="cx">     const double m_duration;
</span><ins>+    const Type m_type;
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCorepagePerformanceMarkh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/PerformanceMark.h (211405 => 211406)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/PerformanceMark.h        2017-01-31 04:50:40 UTC (rev 211405)
+++ trunk/Source/WebCore/page/PerformanceMark.h        2017-01-31 06:21:35 UTC (rev 211406)
</span><span class="lines">@@ -39,7 +39,11 @@
</span><span class="cx">     bool isMark() const override { return true; }
</span><span class="cx">     
</span><span class="cx"> private:
</span><del>-    PerformanceMark(const String&amp; name, double startTime) : PerformanceEntry(name, ASCIILiteral(&quot;mark&quot;), startTime, startTime) { }
</del><ins>+    PerformanceMark(const String&amp; name, double startTime)
+        : PerformanceEntry(PerformanceEntry::Type::Mark, name, ASCIILiteral(&quot;mark&quot;), startTime, startTime)
+    {
+    }
+
</ins><span class="cx">     ~PerformanceMark() { }
</span><span class="cx"> };
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorepagePerformanceMeasureh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/PerformanceMeasure.h (211405 => 211406)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/PerformanceMeasure.h        2017-01-31 04:50:40 UTC (rev 211405)
+++ trunk/Source/WebCore/page/PerformanceMeasure.h        2017-01-31 06:21:35 UTC (rev 211406)
</span><span class="lines">@@ -39,7 +39,11 @@
</span><span class="cx">     bool isMeasure() const override { return true; }
</span><span class="cx"> 
</span><span class="cx"> private:
</span><del>-    PerformanceMeasure(const String&amp; name, double startTime, double duration) : PerformanceEntry(name, ASCIILiteral(&quot;measure&quot;), startTime, duration) { }
</del><ins>+    PerformanceMeasure(const String&amp; name, double startTime, double duration)
+        : PerformanceEntry(PerformanceEntry::Type::Measure, name, ASCIILiteral(&quot;measure&quot;), startTime, duration)
+    {
+    }
+
</ins><span class="cx">     ~PerformanceMeasure() { }
</span><span class="cx"> };
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorepagePerformanceObservercpp"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/page/PerformanceObserver.cpp (0 => 211406)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/PerformanceObserver.cpp                                (rev 0)
+++ trunk/Source/WebCore/page/PerformanceObserver.cpp        2017-01-31 06:21:35 UTC (rev 211406)
</span><span class="lines">@@ -0,0 +1,106 @@
</span><ins>+/*
+ * Copyright (C) 2017 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include &quot;config.h&quot;
+#include &quot;PerformanceObserver.h&quot;
+
+#if ENABLE(WEB_TIMING)
+
+#include &quot;DOMWindow.h&quot;
+#include &quot;Document.h&quot;
+#include &quot;ExceptionCode.h&quot;
+#include &quot;Performance.h&quot;
+#include &quot;PerformanceObserverEntryList.h&quot;
+#include &quot;WorkerGlobalScope.h&quot;
+
+namespace WebCore {
+
+PerformanceObserver::PerformanceObserver(ScriptExecutionContext&amp; scriptExecutionContext, Ref&lt;PerformanceObserverCallback&gt;&amp;&amp; callback)
+    : m_callback(WTFMove(callback))
+{
+    if (is&lt;Document&gt;(scriptExecutionContext)) {
+        auto&amp; document = downcast&lt;Document&gt;(scriptExecutionContext);
+        if (DOMWindow* window = document.domWindow())
+            m_performance = window-&gt;performance();
+    } else if (is&lt;WorkerGlobalScope&gt;(scriptExecutionContext)) {
+        // FIXME: Support Performance Timeline for Workers.
+    } else
+        ASSERT_NOT_REACHED();
+}
+
+ExceptionOr&lt;void&gt; PerformanceObserver::observe(Init&amp;&amp; init)
+{
+    if (!m_performance)
+        return Exception { TypeError };
+
+    if (init.entryTypes.isEmpty())
+        return Exception { TypeError, ASCIILiteral(&quot;entryTypes cannot be an empty list&quot;) };
+
+    OptionSet&lt;PerformanceEntry::Type&gt; filter;
+    for (const String&amp; entryType : init.entryTypes) {
+        if (auto type = PerformanceEntry::parseEntryTypeString(entryType))
+            filter |= *type;
+    }
+
+    if (filter.isEmpty())
+        return Exception { TypeError, ASCIILiteral(&quot;entryTypes contained only unsupported types&quot;) };
+
+    m_typeFilter = filter;
+
+    if (!m_registered) {
+        m_performance-&gt;registerPerformanceObserver(*this);
+        m_registered = true;
+    }
+
+    return { };
+}
+
+void PerformanceObserver::disconnect()
+{
+    if (m_performance)
+        m_performance-&gt;unregisterPerformanceObserver(*this);
+
+    m_registered = false;
+    m_entriesToDeliver.clear();
+}
+
+void PerformanceObserver::queueEntry(PerformanceEntry&amp; entry)
+{
+    m_entriesToDeliver.append(&amp;entry);
+}
+
+void PerformanceObserver::deliver()
+{
+    if (m_entriesToDeliver.isEmpty())
+        return;
+
+    Vector&lt;RefPtr&lt;PerformanceEntry&gt;&gt; entries = WTFMove(m_entriesToDeliver);
+    auto list = PerformanceObserverEntryList::create(WTFMove(entries));
+    m_callback-&gt;handleEvent(list.ptr(), this);
+}
+
+} // namespace WebCore
+
+#endif // ENABLE(WEB_TIMING)
</ins></span></pre></div>
<a id="trunkSourceWebCorepagePerformanceObserverhfromrev211405trunkSourceWebCorepageIntersectionObserverh"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebCore/page/PerformanceObserver.h (from rev 211405, trunk/Source/WebCore/page/IntersectionObserver.h) (0 => 211406)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/PerformanceObserver.h                                (rev 0)
+++ trunk/Source/WebCore/page/PerformanceObserver.h        2017-01-31 06:21:35 UTC (rev 211406)
</span><span class="lines">@@ -0,0 +1,74 @@
</span><ins>+/*
+ * Copyright (C) 2017 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#pragma once
+
+#if ENABLE(WEB_TIMING)
+
+#include &quot;ExceptionOr.h&quot;
+#include &quot;PerformanceEntry.h&quot;
+#include &quot;PerformanceObserverCallback.h&quot;
+#include &lt;wtf/OptionSet.h&gt;
+#include &lt;wtf/RefCounted.h&gt;
+#include &lt;wtf/Vector.h&gt;
+#include &lt;wtf/text/WTFString.h&gt;
+
+namespace WebCore {
+
+class Performance;
+class ScriptExecutionContext;
+
+class PerformanceObserver : public RefCounted&lt;PerformanceObserver&gt; {
+public:
+    struct Init {
+        Vector&lt;String&gt; entryTypes;
+    };
+
+    static Ref&lt;PerformanceObserver&gt; create(ScriptExecutionContext&amp; context, Ref&lt;PerformanceObserverCallback&gt;&amp;&amp; callback)
+    {
+        return adoptRef(*new PerformanceObserver(context, WTFMove(callback)));
+    }
+
+    ExceptionOr&lt;void&gt; observe(Init&amp;&amp;);
+    void disconnect();
+
+    OptionSet&lt;PerformanceEntry::Type&gt; typeFilter() const { return m_typeFilter; }
+
+    void queueEntry(PerformanceEntry&amp;);
+    void deliver();
+
+private:
+    PerformanceObserver(ScriptExecutionContext&amp;, Ref&lt;PerformanceObserverCallback&gt;&amp;&amp;);
+
+    RefPtr&lt;Performance&gt; m_performance;
+    Vector&lt;RefPtr&lt;PerformanceEntry&gt;&gt; m_entriesToDeliver;
+    Ref&lt;PerformanceObserverCallback&gt; m_callback;
+    OptionSet&lt;PerformanceEntry::Type&gt; m_typeFilter;
+    bool m_registered { false };
+};
+
+} // namespace WebCore
+
+#endif // ENABLE(WEB_TIMING)
</ins></span></pre></div>
<a id="trunkSourceWebCorepagePerformanceObserveridl"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/page/PerformanceObserver.idl (0 => 211406)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/PerformanceObserver.idl                                (rev 0)
+++ trunk/Source/WebCore/page/PerformanceObserver.idl        2017-01-31 06:21:35 UTC (rev 211406)
</span><span class="lines">@@ -0,0 +1,44 @@
</span><ins>+/*
+ * Copyright (C) 2017 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+// https://w3c.github.io/performance-timeline/
+
+[
+    Conditional=WEB_TIMING,
+    Constructor(PerformanceObserverCallback callback),
+    ConstructorCallWith=ScriptExecutionContext,
+    EnabledAtRuntime=PerformanceTimeline,
+    ImplementationLacksVTable,
+] interface PerformanceObserver {
+    [MayThrowException] void observe(PerformanceObserverInit options);
+    void disconnect();
+};
+
+[
+    Conditional=WEB_TIMING,
+]
+dictionary PerformanceObserverInit {
+    required sequence&lt;DOMString&gt; entryTypes;
+};
</ins></span></pre></div>
<a id="trunkSourceWebCorepagePerformanceObserverCallbackhfromrev211405trunkSourceWebCorepageIntersectionObserverh"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebCore/page/PerformanceObserverCallback.h (from rev 211405, trunk/Source/WebCore/page/IntersectionObserver.h) (0 => 211406)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/PerformanceObserverCallback.h                                (rev 0)
+++ trunk/Source/WebCore/page/PerformanceObserverCallback.h        2017-01-31 06:21:35 UTC (rev 211406)
</span><span class="lines">@@ -0,0 +1,45 @@
</span><ins>+/*
+ * Copyright (C) 2016 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#pragma once
+
+#if ENABLE(WEB_TIMING)
+
+#include &lt;wtf/RefCounted.h&gt;
+
+namespace WebCore {
+
+class PerformanceObserver;
+class PerformanceObserverEntryList;
+
+class PerformanceObserverCallback : public RefCounted&lt;PerformanceObserverCallback&gt; {
+public:
+    virtual ~PerformanceObserverCallback() { }
+    virtual bool handleEvent(PerformanceObserverEntryList*, PerformanceObserver*) = 0;
+};
+
+} // namespace WebCore
+
+#endif // ENABLE(WEB_TIMING)
</ins></span></pre></div>
<a id="trunkSourceWebCorepagePerformanceObserverCallbackidl"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/page/PerformanceObserverCallback.idl (0 => 211406)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/PerformanceObserverCallback.idl                                (rev 0)
+++ trunk/Source/WebCore/page/PerformanceObserverCallback.idl        2017-01-31 06:21:35 UTC (rev 211406)
</span><span class="lines">@@ -0,0 +1,30 @@
</span><ins>+/*
+ * Copyright (C) 2017 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+// https://w3c.github.io/performance-timeline/
+
+[
+    Conditional=WEB_TIMING,
+] callback PerformanceObserverCallback = void (PerformanceObserverEntryList entries, PerformanceObserver observer);
</ins></span></pre></div>
<a id="trunkSourceWebCorepagePerformanceObserverEntryListcpp"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/page/PerformanceObserverEntryList.cpp (0 => 211406)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/PerformanceObserverEntryList.cpp                                (rev 0)
+++ trunk/Source/WebCore/page/PerformanceObserverEntryList.cpp        2017-01-31 06:21:35 UTC (rev 211406)
</span><span class="lines">@@ -0,0 +1,79 @@
</span><ins>+/*
+ * Copyright (C) 2017 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include &quot;config.h&quot;
+#include &quot;PerformanceObserverEntryList.h&quot;
+
+#if ENABLE(WEB_TIMING)
+
+#include &quot;PerformanceEntry.h&quot;
+
+namespace WebCore {
+
+Ref&lt;PerformanceObserverEntryList&gt; PerformanceObserverEntryList::create(Vector&lt;RefPtr&lt;PerformanceEntry&gt;&gt;&amp;&amp; entries)
+{
+    return adoptRef(*new PerformanceObserverEntryList(WTFMove(entries)));
+}
+
+PerformanceObserverEntryList::PerformanceObserverEntryList(Vector&lt;RefPtr&lt;PerformanceEntry&gt;&gt;&amp;&amp; entries)
+    : m_entries(WTFMove(entries))
+{
+    ASSERT(!m_entries.isEmpty());
+
+    std::stable_sort(m_entries.begin(), m_entries.end(), PerformanceEntry::startTimeCompareLessThan);
+}
+
+Vector&lt;RefPtr&lt;PerformanceEntry&gt;&gt; PerformanceObserverEntryList::getEntriesByType(const String&amp; entryType) const
+{
+    return getEntriesByName(String(), entryType);
+}
+
+Vector&lt;RefPtr&lt;PerformanceEntry&gt;&gt; PerformanceObserverEntryList::getEntriesByName(const String&amp; name, const String&amp; entryType) const
+{
+    Vector&lt;RefPtr&lt;PerformanceEntry&gt;&gt; entries;
+
+    // PerformanceObservers can only be registered for valid types.
+    // So if the incoming entryType is an unknown type, there will be no matches.
+    std::optional&lt;PerformanceEntry::Type&gt; type;
+    if (!entryType.isNull()) {
+        type = PerformanceEntry::parseEntryTypeString(entryType);
+        if (!type)
+            return entries;
+    }
+
+    for (auto&amp; entry : m_entries) {
+        if (!name.isNull() &amp;&amp; entry-&gt;name() != name)
+            continue;
+        if (type &amp;&amp; entry-&gt;type() != *type)
+            continue;
+        entries.append(entry.copyRef());
+    }
+
+    return entries;
+}
+
+} // namespace WebCore
+
+#endif // ENABLE(WEB_TIMING)
</ins></span></pre></div>
<a id="trunkSourceWebCorepagePerformanceObserverEntryListhfromrev211405trunkSourceWebCorepageIntersectionObserverh"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebCore/page/PerformanceObserverEntryList.h (from rev 211405, trunk/Source/WebCore/page/IntersectionObserver.h) (0 => 211406)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/PerformanceObserverEntryList.h                                (rev 0)
+++ trunk/Source/WebCore/page/PerformanceObserverEntryList.h        2017-01-31 06:21:35 UTC (rev 211406)
</span><span class="lines">@@ -0,0 +1,55 @@
</span><ins>+/*
+ * Copyright (C) 2017 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#pragma once
+
+#if ENABLE(WEB_TIMING)
+
+#include &lt;wtf/RefCounted.h&gt;
+#include &lt;wtf/Vector.h&gt;
+#include &lt;wtf/text/WTFString.h&gt;
+
+namespace WebCore {
+
+class PerformanceEntry;
+
+class PerformanceObserverEntryList : public RefCounted&lt;PerformanceObserverEntryList&gt; {
+    WTF_MAKE_FAST_ALLOCATED;
+public:
+    static Ref&lt;PerformanceObserverEntryList&gt; create(Vector&lt;RefPtr&lt;PerformanceEntry&gt;&gt;&amp;&amp; entries);
+
+    const Vector&lt;RefPtr&lt;PerformanceEntry&gt;&gt;&amp; getEntries() const { return m_entries; }
+    Vector&lt;RefPtr&lt;PerformanceEntry&gt;&gt; getEntriesByType(const String&amp; entryType) const;
+    Vector&lt;RefPtr&lt;PerformanceEntry&gt;&gt; getEntriesByName(const String&amp; name, const String&amp; entryType) const;
+
+private:
+    PerformanceObserverEntryList(Vector&lt;RefPtr&lt;PerformanceEntry&gt;&gt;&amp;&amp; entries);
+
+    Vector&lt;RefPtr&lt;PerformanceEntry&gt;&gt; m_entries;
+};
+
+} // namespace WebCore
+
+#endif // ENABLE(WEB_TIMING)
</ins></span></pre></div>
<a id="trunkSourceWebCorepagePerformanceObserverEntryListidl"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/page/PerformanceObserverEntryList.idl (0 => 211406)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/PerformanceObserverEntryList.idl                                (rev 0)
+++ trunk/Source/WebCore/page/PerformanceObserverEntryList.idl        2017-01-31 06:21:35 UTC (rev 211406)
</span><span class="lines">@@ -0,0 +1,38 @@
</span><ins>+/*
+ * Copyright (C) 2017 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+// https://w3c.github.io/performance-timeline/
+
+[
+    Conditional=WEB_TIMING,
+    EnabledAtRuntime=PerformanceTimeline,
+    ImplementationLacksVTable,
+] interface PerformanceObserverEntryList {
+    PerformanceEntryList getEntries();
+    PerformanceEntryList getEntriesByType(DOMString type);
+    PerformanceEntryList getEntriesByName(DOMString name, optional DOMString type);
+};
+
+typedef sequence&lt;PerformanceEntry&gt; PerformanceEntryList;
</ins></span></pre></div>
<a id="trunkSourceWebCorepagePerformanceResourceTimingcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/PerformanceResourceTiming.cpp (211405 => 211406)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/PerformanceResourceTiming.cpp        2017-01-31 04:50:40 UTC (rev 211405)
+++ trunk/Source/WebCore/page/PerformanceResourceTiming.cpp        2017-01-31 06:21:35 UTC (rev 211406)
</span><span class="lines">@@ -76,7 +76,7 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> PerformanceResourceTiming::PerformanceResourceTiming(const AtomicString&amp; initiatorType, const URL&amp; originalURL, const ResourceResponse&amp; response, LoadTiming loadTiming, Document* requestingDocument)
</span><del>-    : PerformanceEntry(originalURL.string(), ASCIILiteral(&quot;resource&quot;), monotonicTimeToDocumentMilliseconds(requestingDocument, loadTiming.startTime()), monotonicTimeToDocumentMilliseconds(requestingDocument, loadTiming.responseEnd()))
</del><ins>+    : PerformanceEntry(PerformanceEntry::Type::Resource, originalURL.string(), ASCIILiteral(&quot;resource&quot;), monotonicTimeToDocumentMilliseconds(requestingDocument, loadTiming.startTime()), monotonicTimeToDocumentMilliseconds(requestingDocument, loadTiming.responseEnd()))
</ins><span class="cx">     , m_initiatorType(initiatorType)
</span><span class="cx">     , m_timing(response.networkLoadTiming())
</span><span class="cx">     , m_loadTiming(loadTiming)
</span></span></pre></div>
<a id="trunkSourceWebCorepagePerformanceUserTimingcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/PerformanceUserTiming.cpp (211405 => 211406)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/PerformanceUserTiming.cpp        2017-01-31 04:50:40 UTC (rev 211405)
+++ trunk/Source/WebCore/page/PerformanceUserTiming.cpp        2017-01-31 06:21:35 UTC (rev 211406)
</span><span class="lines">@@ -30,9 +30,6 @@
</span><span class="cx"> 
</span><span class="cx"> #include &quot;ExceptionCode.h&quot;
</span><span class="cx"> #include &quot;Performance.h&quot;
</span><del>-#include &quot;PerformanceEntry.h&quot;
-#include &quot;PerformanceMark.h&quot;
-#include &quot;PerformanceMeasure.h&quot;
</del><span class="cx"> #include &quot;PerformanceTiming.h&quot;
</span><span class="cx"> #include &lt;array&gt;
</span><span class="cx"> #include &lt;wtf/NeverDestroyed.h&gt;
</span><span class="lines">@@ -98,15 +95,15 @@
</span><span class="cx">     performanceEntryMap.remove(name);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-ExceptionOr&lt;void&gt; UserTiming::mark(const String&amp; markName)
</del><ins>+ExceptionOr&lt;Ref&lt;PerformanceMark&gt;&gt; UserTiming::mark(const String&amp; markName)
</ins><span class="cx"> {
</span><span class="cx">     if (restrictedMarkFunction(markName))
</span><span class="cx">         return Exception { SYNTAX_ERR };
</span><span class="cx"> 
</span><span class="cx">     auto&amp; performanceEntryList = m_marksMap.ensure(markName, [] { return Vector&lt;RefPtr&lt;PerformanceEntry&gt;&gt;(); }).iterator-&gt;value;
</span><del>-    performanceEntryList.append(PerformanceMark::create(markName, m_performance.now()));
-
-    return { };
</del><ins>+    auto entry = PerformanceMark::create(markName, m_performance.now());
+    performanceEntryList.append(entry.copyRef());
+    return WTFMove(entry);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void UserTiming::clearMarks(const String&amp; markName)
</span><span class="lines">@@ -129,7 +126,7 @@
</span><span class="cx">     return Exception { SYNTAX_ERR };
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-ExceptionOr&lt;void&gt; UserTiming::measure(const String&amp; measureName, const String&amp; startMark, const String&amp; endMark)
</del><ins>+ExceptionOr&lt;Ref&lt;PerformanceMeasure&gt;&gt; UserTiming::measure(const String&amp; measureName, const String&amp; startMark, const String&amp; endMark)
</ins><span class="cx"> {
</span><span class="cx">     double startTime = 0.0;
</span><span class="cx">     double endTime = 0.0;
</span><span class="lines">@@ -154,9 +151,9 @@
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     auto&amp; performanceEntryList = m_measuresMap.ensure(measureName, [] { return Vector&lt;RefPtr&lt;PerformanceEntry&gt;&gt;(); }).iterator-&gt;value;
</span><del>-    performanceEntryList.append(PerformanceMeasure::create(measureName, startTime, endTime));
-
-    return { };
</del><ins>+    auto entry = PerformanceMeasure::create(measureName, startTime, endTime);
+    performanceEntryList.append(entry.copyRef());
+    return WTFMove(entry);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void UserTiming::clearMeasures(const String&amp; measureName)
</span></span></pre></div>
<a id="trunkSourceWebCorepagePerformanceUserTimingh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/PerformanceUserTiming.h (211405 => 211406)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/PerformanceUserTiming.h        2017-01-31 04:50:40 UTC (rev 211405)
+++ trunk/Source/WebCore/page/PerformanceUserTiming.h        2017-01-31 06:21:35 UTC (rev 211406)
</span><span class="lines">@@ -28,6 +28,8 @@
</span><span class="cx"> #if ENABLE(WEB_TIMING)
</span><span class="cx"> 
</span><span class="cx"> #include &quot;ExceptionOr.h&quot;
</span><ins>+#include &quot;PerformanceMark.h&quot;
+#include &quot;PerformanceMeasure.h&quot;
</ins><span class="cx"> #include &lt;wtf/HashMap.h&gt;
</span><span class="cx"> #include &lt;wtf/text/StringHash.h&gt;
</span><span class="cx"> 
</span><span class="lines">@@ -34,7 +36,6 @@
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><span class="cx"> class Performance;
</span><del>-class PerformanceEntry;
</del><span class="cx"> 
</span><span class="cx"> using PerformanceEntryMap = HashMap&lt;String, Vector&lt;RefPtr&lt;PerformanceEntry&gt;&gt;&gt;;
</span><span class="cx"> 
</span><span class="lines">@@ -42,10 +43,10 @@
</span><span class="cx"> public:
</span><span class="cx">     explicit UserTiming(Performance&amp;);
</span><span class="cx"> 
</span><del>-    ExceptionOr&lt;void&gt; mark(const String&amp; markName);
</del><ins>+    ExceptionOr&lt;Ref&lt;PerformanceMark&gt;&gt; mark(const String&amp; markName);
</ins><span class="cx">     void clearMarks(const String&amp; markName);
</span><span class="cx"> 
</span><del>-    ExceptionOr&lt;void&gt; measure(const String&amp; measureName, const String&amp; startMark, const String&amp; endMark);
</del><ins>+    ExceptionOr&lt;Ref&lt;PerformanceMeasure&gt;&gt; measure(const String&amp; measureName, const String&amp; startMark, const String&amp; endMark);
</ins><span class="cx">     void clearMeasures(const String&amp; measureName);
</span><span class="cx"> 
</span><span class="cx">     Vector&lt;RefPtr&lt;PerformanceEntry&gt;&gt; getMarks() const;
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/ChangeLog (211405 => 211406)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/ChangeLog        2017-01-31 04:50:40 UTC (rev 211405)
+++ trunk/Source/WebInspectorUI/ChangeLog        2017-01-31 06:21:35 UTC (rev 211406)
</span><span class="lines">@@ -1,3 +1,14 @@
</span><ins>+2017-01-30  Joseph Pecoraro  &lt;pecoraro@apple.com&gt;
+
+        Implement PerformanceObserver
+        https://bugs.webkit.org/show_bug.cgi?id=167546
+        &lt;rdar://problem/30247959&gt;
+
+        Reviewed by Ryosuke Niwa.
+
+        * UserInterface/Models/NativeFunctionParameters.js:
+        Improve API view display of built-in performance methods.
+
</ins><span class="cx"> 2017-01-30  Matt Baker  &lt;mattbaker@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Web Inspector: Need some limit on Async Call Stacks for async loops (rAF loops)
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceModelsNativeFunctionParametersjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Models/NativeFunctionParameters.js (211405 => 211406)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Models/NativeFunctionParameters.js        2017-01-31 04:50:40 UTC (rev 211405)
+++ trunk/Source/WebInspectorUI/UserInterface/Models/NativeFunctionParameters.js        2017-01-31 06:21:35 UTC (rev 211406)
</span><span class="lines">@@ -1231,6 +1231,27 @@
</span><span class="cx">         __proto__: null,
</span><span class="cx">     },
</span><span class="cx"> 
</span><ins>+    Performance: {
+        clearMarks: &quot;[name]&quot;,
+        clearMeasures: &quot;name&quot;,
+        getEntriesByName: &quot;name, [type]&quot;,
+        getEntriesByType: &quot;type&quot;,
+        mark: &quot;name&quot;,
+        measure: &quot;name, [startMark], [endMark]&quot;,
+        __proto__: null,
+    },
+
+    PerformanceObserver: {
+        observe: &quot;options&quot;,
+        __proto__: null,
+    },
+
+    PerformanceObserverEntryList: {
+        getEntriesByName: &quot;name, [type]&quot;,
+        getEntriesByType: &quot;type&quot;,
+        __proto__: null,
+    },
+
</ins><span class="cx">     Plugin: {
</span><span class="cx">         item: &quot;[index]&quot;,
</span><span class="cx">         namedItem: &quot;[name]&quot;,
</span></span></pre>
</div>
</div>

</body>
</html>