[GTK] Enable Performance Timeline, Resource Timing, Navigation Timing features
authorzandobersek@gmail.com <zandobersek@gmail.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 15 Jan 2013 19:47:31 +0000 (19:47 +0000)
committerzandobersek@gmail.com <zandobersek@gmail.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 15 Jan 2013 19:47:31 +0000 (19:47 +0000)
https://bugs.webkit.org/show_bug.cgi?id=106197

Patch by Zan Dobersek <zandobersek@gmail.com> on 2013-01-15
Reviewed by Martin Robinson.

Source/WebCore:

No new tests - existing layout tests are being unskipped, only a few fail
(but their failures are of cross-platform nature).

* GNUmakefile.features.am.in: Add feature defines for all three features.
They are disabled by default for now.
* GNUmakefile.list.am: Add missing build targets.
* bindings/gobject/GNUmakefile.am: Ditto.
* bindings/js/JSPerformanceEntryCustom.cpp: Added the necessary custom bindings.
Mimics the custom V8 bindings.
(WebCore):
(WebCore::toJS):

Tools:

* Scripts/webkitperl/FeatureList.pm: Add the configuration options for all three
features. Enable them on GTK, meaning they will be enabled in development builds
(i.e. when building with build-webkit).

LayoutTests:

Unskip related tests, add a few expectations for still-failing tests.

* platform/gtk/TestExpectations:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@139768 268f45cc-cd09-0410-ab3c-d52691b4dbfc

LayoutTests/ChangeLog
LayoutTests/platform/gtk/TestExpectations
Source/WebCore/ChangeLog
Source/WebCore/GNUmakefile.features.am.in
Source/WebCore/GNUmakefile.list.am
Source/WebCore/bindings/gobject/GNUmakefile.am
Source/WebCore/bindings/js/JSPerformanceEntryCustom.cpp [new file with mode: 0644]
Tools/ChangeLog
Tools/Scripts/webkitperl/FeatureList.pm

index bf5cafe..9bfb039 100644 (file)
@@ -1,5 +1,16 @@
 2013-01-15  Zan Dobersek  <zandobersek@gmail.com>
 
+        [GTK] Enable Performance Timeline, Resource Timing, Navigation Timing features
+        https://bugs.webkit.org/show_bug.cgi?id=106197
+
+        Reviewed by Martin Robinson.
+
+        Unskip related tests, add a few expectations for still-failing tests.
+
+        * platform/gtk/TestExpectations:
+
+2013-01-15  Zan Dobersek  <zandobersek@gmail.com>
+
         [GTK] Enable CSS Image Resolution feature
         https://bugs.webkit.org/show_bug.cgi?id=99038
 
index 73fcd5c..bd3a050 100644 (file)
@@ -417,13 +417,6 @@ webkit.org/b/95959 css3/device-adapt [ Skip ]
 # Requires HighDPI canvas support
 webkit.org/b/102180 fast/canvas/canvas-resize-reset-pixelRatio.html [ Failure ]
 
-# Fails until we enable the User Timing API.
-webkit.org/b/84893 http/tests/w3c/webperf/submission/Intel/user-timing [ Skip ]
-
-# Fails until we enable the Resource Timing API.
-webkit.org/b/61138 http/tests/w3c/webperf/submission/Intel/resource-timing [ Skip ]
-webkit.org/b/61138 http/tests/w3c/webperf/submission/resource-timing [ Skip ]
-
 # Opera-submitted tests to W3C for <track>, a lot of failures still.
 webkit.org/b/103926 media/track/opera/idl/media-idl-tests.html [ Skip ]
 webkit.org/b/103926 media/track/opera/interfaces/HTMLElement/HTMLMediaElement/crossOrigin.html [ Skip ]
@@ -1369,6 +1362,13 @@ webkit.org/b/106316 accessibility/render-counter-text.html [ Failure ]
 
 webkit.org/b/106924 accessibility/heading-level.html [ Failure ]
 
+webkit.org/b/103927 http/tests/w3c/webperf/submission/Intel/resource-timing/test_resource_timing_cross_origin_resource_request.html [ Failure ]
+webkit.org/b/103927 http/tests/w3c/webperf/submission/Intel/resource-timing/test_resource_timing_timing_allow_cross_origin_resource_request.html [ Failure ]
+webkit.org/b/103927 http/tests/w3c/webperf/submission/resource-timing/html/test_resource_dynamic_insertion.html [ Failure ]
+webkit.org/b/103927 http/tests/w3c/webperf/submission/resource-timing/html/test_resource_frame_initiator_type.html [ Failure ]
+webkit.org/b/103927 http/tests/w3c/webperf/submission/resource-timing/html/test_resource_initiator_types.html [ Failure ]
+webkit.org/b/103927 http/tests/w3c/webperf/submission/resource-timing/html/test_resource_redirects.html [ Failure ]
+
 #////////////////////////////////////////////////////////////////////////////////////////
 # End of Tests failing
 #////////////////////////////////////////////////////////////////////////////////////////
index bfd9697..bcb4c30 100644 (file)
@@ -1,3 +1,22 @@
+2013-01-15  Zan Dobersek  <zandobersek@gmail.com>
+
+        [GTK] Enable Performance Timeline, Resource Timing, Navigation Timing features
+        https://bugs.webkit.org/show_bug.cgi?id=106197
+
+        Reviewed by Martin Robinson.
+
+        No new tests - existing layout tests are being unskipped, only a few fail
+        (but their failures are of cross-platform nature).
+
+        * GNUmakefile.features.am.in: Add feature defines for all three features.
+        They are disabled by default for now.
+        * GNUmakefile.list.am: Add missing build targets.
+        * bindings/gobject/GNUmakefile.am: Ditto.
+        * bindings/js/JSPerformanceEntryCustom.cpp: Added the necessary custom bindings.
+        Mimics the custom V8 bindings.
+        (WebCore):
+        (WebCore::toJS):
+
 2013-01-15  Alexis Menard  <alexis@webkit.org>
 
         Unprefixed transitionend event doesn't seem to be implemented, which breaks many sites
index 6e8b37c..5bd37c7 100644 (file)
@@ -70,9 +70,11 @@ feature_defines_defaults += \
        ENABLE_NOTIFICATIONS=0 \
        ENABLE_ORIENTATION_EVENTS=0 \
        ENABLE_PAGE_VISIBILITY_API=0 \
+       ENABLE_PERFORMANCE_TIMELINE=0 \
        ENABLE_PROGRESS_ELEMENT=1 \
        ENABLE_PROXIMITY_EVENTS=0 \
        ENABLE_QUOTA=0 \
+       ENABLE_RESOURCE_TIMING=0 \
        ENABLE_REQUEST_ANIMATION_FRAME=1 \
        ENABLE_SCRIPTED_SPEECH=0 \
        ENABLE_SHADOW_DOM=1 \
@@ -88,6 +90,7 @@ feature_defines_defaults += \
        ENABLE_TEXT_AUTOSIZING=0 \
        ENABLE_TOUCH_EVENTS=0 \
        ENABLE_TOUCH_ICON_LOADING=0 \
+       ENABLE_USER_TIMING=0 \
        ENABLE_VIBRATION=0 \
        ENABLE_VIDEO=1 \
        ENABLE_VIDEO_TRACK=0 \
index 907bac9..c125dd4 100644 (file)
@@ -603,6 +603,8 @@ webcore_built_sources += \
        DerivedSources/WebCore/JSPerformanceMeasure.h \
        DerivedSources/WebCore/JSPerformanceNavigation.cpp \
        DerivedSources/WebCore/JSPerformanceNavigation.h \
+       DerivedSources/WebCore/JSPerformanceResourceTiming.cpp \
+       DerivedSources/WebCore/JSPerformanceResourceTiming.h \
        DerivedSources/WebCore/JSPerformanceTiming.cpp \
        DerivedSources/WebCore/JSPerformanceTiming.h \
        DerivedSources/WebCore/JSPopStateEvent.cpp \
@@ -2387,6 +2389,7 @@ webcore_sources += \
        Source/WebCore/bindings/js/JSNodeListCustom.cpp \
        Source/WebCore/bindings/js/JSOscillatorNodeCustom.cpp \
        Source/WebCore/bindings/js/JSPannerNodeCustom.cpp \
+       Source/WebCore/bindings/js/JSPerformanceEntryCustom.cpp \
        Source/WebCore/bindings/js/JSPluginElementFunctions.cpp \
        Source/WebCore/bindings/js/JSPluginElementFunctions.h \
        Source/WebCore/bindings/js/JSPopStateEventCustom.cpp \
index 67bee68..7614d47 100644 (file)
@@ -230,6 +230,10 @@ webkitgtk_gdom_built_sources += \
        DerivedSources/webkitdom/WebKitDOMNodeListPrivate.h \
        DerivedSources/webkitdom/WebKitDOMNodePrivate.h \
        DerivedSources/webkitdom/WebKitDOMPerformance.cpp \
+       DerivedSources/webkitdom/WebKitDOMPerformanceEntry.cpp \
+       DerivedSources/webkitdom/WebKitDOMPerformanceEntryList.cpp \
+       DerivedSources/webkitdom/WebKitDOMPerformanceEntryList.h \
+       DerivedSources/webkitdom/WebKitDOMPerformanceEntryPrivate.h \
        DerivedSources/webkitdom/WebKitDOMPerformancePrivate.h \
        DerivedSources/webkitdom/WebKitDOMPerformanceNavigation.cpp \
        DerivedSources/webkitdom/WebKitDOMPerformanceNavigationPrivate.h \
@@ -415,6 +419,8 @@ webkitgtk_gdom_built_h_api += \
        DerivedSources/webkitdom/WebKitDOMXPathNSResolver.h \
        DerivedSources/webkitdom/WebKitDOMXPathResult.h \
        DerivedSources/webkitdom/WebKitDOMPerformance.h \
+       DerivedSources/webkitdom/WebKitDOMPerformanceEntry.h \
+       DerivedSources/webkitdom/WebKitDOMPerformanceEntryList.h \
        DerivedSources/webkitdom/WebKitDOMPerformanceNavigation.h \
        DerivedSources/webkitdom/WebKitDOMPerformanceTiming.h \
        DerivedSources/webkitdom/webkitdom.h \
diff --git a/Source/WebCore/bindings/js/JSPerformanceEntryCustom.cpp b/Source/WebCore/bindings/js/JSPerformanceEntryCustom.cpp
new file mode 100644 (file)
index 0000000..5bcf3f8
--- /dev/null
@@ -0,0 +1,60 @@
+/*
+ * Copyright (C) 2012 Google 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:
+ *
+ *     * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *     * 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.
+ *     * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND 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 THE COPYRIGHT
+ * OWNER OR 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 "config.h"
+
+#if ENABLE(PERFORMANCE_TIMELINE)
+
+#include "JSPerformanceEntry.h"
+
+#include "JSDOMBinding.h"
+#include "JSPerformanceResourceTiming.h"
+#include "PerformanceResourceTiming.h"
+
+using namespace JSC;
+
+namespace WebCore {
+
+JSValue toJS(ExecState* exec, JSDOMGlobalObject* globalObject, PerformanceEntry* entry)
+{
+    if (!entry)
+        return jsNull();
+
+#if ENABLE(RESOURCE_TIMING)
+    if (entry->isResource())
+        return wrap<JSPerformanceResourceTiming>(exec, globalObject, static_cast<PerformanceResourceTiming*>(entry));
+#endif
+
+    return wrap<JSPerformanceEntry>(exec, globalObject, entry);
+}
+
+} // namespace WebCore
+
+#endif // ENABLE(PERFORMANCE_TIMELINE)
index 96b27ff..f6a9e98 100644 (file)
@@ -1,5 +1,16 @@
 2013-01-15  Zan Dobersek  <zandobersek@gmail.com>
 
+        [GTK] Enable Performance Timeline, Resource Timing, Navigation Timing features
+        https://bugs.webkit.org/show_bug.cgi?id=106197
+
+        Reviewed by Martin Robinson.
+
+        * Scripts/webkitperl/FeatureList.pm: Add the configuration options for all three
+        features. Enable them on GTK, meaning they will be enabled in development builds
+        (i.e. when building with build-webkit).
+
+2013-01-15  Zan Dobersek  <zandobersek@gmail.com>
+
         [GTK] Enable CSS Image Resolution feature
         https://bugs.webkit.org/show_bug.cgi?id=99038
 
index 80d2d0d..392bf50 100644 (file)
@@ -114,12 +114,14 @@ my (
     $notificationsSupport,
     $orientationEventsSupport,
     $pageVisibilityAPISupport,
+    $performanceTimelineSupport,
     $progressTagSupport,
     $proximityEventsSupport,
     $quotaSupport,
     $resolutionMediaQuerySupport,
     $registerProtocolHandlerSupport,
     $requestAnimationFrameSupport,
+    $resourceTimingSupport,
     $scriptedSpeechSupport,
     $shadowDOMSupport,
     $sharedWorkersSupport,
@@ -135,6 +137,7 @@ my (
     $touchEventsSupport,
     $touchSliderSupport,
     $touchIconLoadingSupport,
+    $userTimingSupport,
     $vibrationSupport,
     $videoSupport,
     $videoTrackSupport,
@@ -358,6 +361,9 @@ my @features = (
     { option => "page-visibility-api", desc => "Toggle Page Visibility API support",
       define => "ENABLE_PAGE_VISIBILITY_API", default => (isBlackBerry() || isEfl()), value => \$pageVisibilityAPISupport },
 
+    { option => "performance-timeline", desc => "Toggle Performance Timeline support",
+      define => "ENABLE_PERFORMANCE_TIMELINE", default => isGtk(), value => \$performanceTimelineSupport },
+
     { option => "progress-tag", desc => "Toggle Progress Tag support",
       define => "ENABLE_PROGRESS_ELEMENT", default => 1, value => \$progressTagSupport },
 
@@ -370,6 +376,9 @@ my @features = (
     { option => "resolution-media-query", desc => "Toggle resolution media query support",
       define => "ENABLE_RESOLUTION_MEDIA_QUERY", default => (isEfl() || isQt()), value => \$resolutionMediaQuerySupport },
 
+    { option => "resource-timing", desc => "Toggle Resource Timing support",
+      define => "ENABLE_RESOURCE_TIMING", default => isGtk(), value => \$resourceTimingSupport },
+
     { option => "request-animation-frame", desc => "Toggle Request Animation Frame support",
       define => "ENABLE_REQUEST_ANIMATION_FRAME", default => (isAppleMacWebKit() || isGtk() || isEfl() || isBlackBerry()), value => \$requestAnimationFrameSupport },
 
@@ -418,6 +427,9 @@ my @features = (
     { option => "touch-icon-loading", desc => "Toggle Touch Icon Loading Support",
       define => "ENABLE_TOUCH_ICON_LOADING", default => 0, value => \$touchIconLoadingSupport },
 
+    { option => "user-timing", desc => "Toggle User Timing support",
+      define => "ENABLE_USER_TIMING", default => isGtk(), value => \$userTimingSupport },
+
     { option => "vibration", desc => "Toggle Vibration support",
       define => "ENABLE_VIBRATION", default => (isEfl() || isBlackBerry()), value => \$vibrationSupport },