Changeset 114736 in webkit
- Timestamp:
- Apr 20, 2012 3:54:06 AM (12 years ago)
- Location:
- trunk
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r114735 r114736 1 2012-04-20 Sergio Villar Senin <svillar@igalia.com> 2 3 [GTK] Enable Web Timing 4 https://bugs.webkit.org/show_bug.cgi?id=42432 5 6 Reviewed by Gustavo Noronha Silva. 7 8 Removed some tests that are working fine now after adding Web 9 Timing support. 10 11 * platform/gtk/test_expectations.txt: 12 1 13 2012-04-20 Mikhail Naganov <mnaganov@chromium.org> 2 14 -
trunk/LayoutTests/platform/gtk/test_expectations.txt
r114667 r114736 142 142 BUGWKGTK SKIP : fast/events/constructors/speech-recognition-event-constructor.html = FAIL 143 143 144 // Web Timing is not enabled. 145 BUGWK42432 : fast/dom/Window/window-properties-performance.html = FAIL 146 BUGWK42432 : fast/dom/navigation-type-back-forward.html = FAIL 147 BUGWK42432 : fast/dom/navigation-type-navigate.html = FAIL 148 BUGWK42432 : fast/dom/navigation-type-reload.html = FAIL 149 BUGWK42432 : fast/dom/webtiming.html = FAIL 150 BUGWK42432 : fast/dom/webtiming-navigate-within-document.html = FAIL 151 BUGWK42432 : fast/dom/webtiming-document-open.html = FAIL 152 BUGWK42432 : http/tests/misc/webtiming-origins.html = FAIL 153 BUGWK42432 : http/tests/misc/webtiming-one-redirect.php = FAIL 154 BUGWK42432 : http/tests/misc/webtiming-slow-load.php = FAIL 155 BUGWK42432 : http/tests/misc/webtiming-ssl.php = FAIL 156 BUGWK42432 : http/tests/misc/webtiming-two-redirects.php = FAIL 144 // Web Timing issues. 145 BUGWKGTK : fast/dom/Window/window-properties-performance.html = FAIL 146 BUGWKGTK : http/tests/misc/webtiming-origins.html = FAIL 147 BUGWKGTK : http/tests/misc/webtiming-ssl.php = FAIL 157 148 158 149 // FileSystem API is not supported. -
trunk/Source/WebCore/ChangeLog
r114734 r114736 1 2012-04-20 Sergio Villar Senin <svillar@igalia.com> 2 3 [GTK] Enable Web Timing 4 https://bugs.webkit.org/show_bug.cgi?id=42432 5 6 Reviewed by Gustavo Noronha Silva. 7 8 Added WebTiming support to the GTK+ port. WebTiming allows 9 developers to collect detailed network timing information per 10 resource. It requires the new SoupMessage's "network-event" 11 signal. 12 13 * GNUmakefile.am: 14 * bindings/gobject/GNUmakefile.am: 15 * platform/network/soup/ResourceHandleSoup.cpp: 16 (WebCore): 17 (WebCore::restartedCallback): 18 (WebCore::sendRequestCallback): 19 (WebCore::milisecondsSinceRequest): 20 (WebCore::wroteBodyCallback): 21 (WebCore::requestStartedCallback): 22 (WebCore::networkEventCallback): 23 (WebCore::startHTTPRequest): 24 (WebCore::ResourceHandle::platformSetDefersLoading): 25 (WebCore::ResourceHandle::defaultSession): 26 1 27 2012-04-20 'Pavel Feldman' <pfeldman@chromium.org> 2 28 -
trunk/Source/WebCore/GNUmakefile.am
r113560 r114736 640 640 webcore_cppflags += -DENABLE_DEVICE_ORIENTATION=1 641 641 endif # END ENABLE_DEVICE_ORIENTATION 642 643 # --- 644 # Web Timing support 645 # --- 646 if ENABLE_WEB_TIMING 647 FEATURE_DEFINES += ENABLE_WEB_TIMING=1 648 webcore_cppflags += -DENABLE_WEB_TIMING=1 649 endif # END ENABLE_WEB_TIMING 642 650 643 651 DerivedSources/WebCore/CSSPropertyNames.cpp: DerivedSources/WebCore/CSSPropertyNames.h -
trunk/Source/WebCore/bindings/gobject/GNUmakefile.am
r111914 r114736 429 429 endif 430 430 431 432 if ENABLE_WEB_TIMING 433 webkitgtk_built_h_api += \ 434 $(top_builddir)/DerivedSources/webkit/WebKitDOMPerformance.h \ 435 $(top_builddir)/DerivedSources/webkit/WebKitDOMPerformanceNavigation.h \ 436 $(top_builddir)/DerivedSources/webkit/WebKitDOMPerformanceTiming.h 437 webkitgtk_gdom_built_sources += \ 438 DerivedSources/webkit/WebKitDOMPerformance.cpp \ 439 DerivedSources/webkit/WebKitDOMPerformancePrivate.h \ 440 DerivedSources/webkit/WebKitDOMPerformanceNavigation.cpp \ 441 DerivedSources/webkit/WebKitDOMPerformanceNavigationPrivate.h \ 442 DerivedSources/webkit/WebKitDOMPerformanceTiming.cpp \ 443 DerivedSources/webkit/WebKitDOMPerformanceTimingPrivate.h 444 endif 445 431 446 gdom_class_list := $(subst WebKitDOM,, $(filter-out %Private, $(basename $(notdir $(webkitgtk_gdom_built_sources))))) 432 447 gdom_class_list += Custom EventTarget Object -
trunk/Source/WebCore/platform/network/soup/ResourceHandleSoup.cpp
r113604 r114736 144 144 static void closeCallback(GObject*, GAsyncResult*, gpointer); 145 145 static bool startNonHTTPRequest(ResourceHandle*, KURL); 146 #if ENABLE(WEB_TIMING) 147 static int milisecondsSinceRequest(double requestTime); 148 #endif 146 149 147 150 ResourceHandleInternal::~ResourceHandleInternal() … … 220 223 return; 221 224 225 #if ENABLE(WEB_TIMING) 226 d->m_response.setResourceLoadTiming(ResourceLoadTiming::create()); 227 d->m_response.resourceLoadTiming()->requestTime = monotonicallyIncreasingTime(); 228 #endif 229 222 230 // Update the first party in case the base URL changed with the redirect 223 231 String firstPartyString = request.firstPartyForCookies().string(); … … 306 314 return; 307 315 } 316 317 #if ENABLE(WEB_TIMING) 318 if (d->m_response.resourceLoadTiming()) 319 d->m_response.resourceLoadTiming()->receiveHeadersEnd = milisecondsSinceRequest(d->m_response.resourceLoadTiming()->requestTime); 320 #endif 308 321 309 322 GOwnPtr<GError> error; … … 445 458 } 446 459 460 #if ENABLE(WEB_TIMING) 461 static int milisecondsSinceRequest(double requestTime) 462 { 463 return static_cast<int>((monotonicallyIncreasingTime() - requestTime) * 1000.0); 464 } 465 466 static void wroteBodyCallback(SoupMessage*, gpointer data) 467 { 468 RefPtr<ResourceHandle> handle = static_cast<ResourceHandle*>(data); 469 if (!handle) 470 return; 471 472 ResourceHandleInternal* d = handle->getInternal(); 473 if (!d->m_response.resourceLoadTiming()) 474 return; 475 476 d->m_response.resourceLoadTiming()->sendEnd = milisecondsSinceRequest(d->m_response.resourceLoadTiming()->requestTime); 477 } 478 479 static void requestStartedCallback(SoupSession*, SoupMessage* soupMessage, SoupSocket*, gpointer data) 480 { 481 RefPtr<ResourceHandle> handle = static_cast<ResourceHandle*>(g_object_get_data(G_OBJECT(soupMessage), "handle")); 482 if (!handle) 483 return; 484 485 ResourceHandleInternal* d = handle->getInternal(); 486 if (!d->m_response.resourceLoadTiming()) 487 return; 488 489 d->m_response.resourceLoadTiming()->sendStart = milisecondsSinceRequest(d->m_response.resourceLoadTiming()->requestTime); 490 if (d->m_response.resourceLoadTiming()->sslStart != -1) { 491 // WebCore/inspector/front-end/RequestTimingView.js assumes 492 // that SSL time is included in connection time so must 493 // substract here the SSL delta that will be added later (see 494 // WebInspector.RequestTimingView.createTimingTable in the 495 // file above for more details). 496 d->m_response.resourceLoadTiming()->sendStart -= 497 d->m_response.resourceLoadTiming()->sslEnd - d->m_response.resourceLoadTiming()->sslStart; 498 } 499 } 500 501 static void networkEventCallback(SoupMessage*, GSocketClientEvent event, GIOStream*, gpointer data) 502 { 503 ResourceHandle* handle = static_cast<ResourceHandle*>(data); 504 if (!handle) 505 return; 506 ResourceHandleInternal* d = handle->getInternal(); 507 if (d->m_cancelled) 508 return; 509 510 int deltaTime = milisecondsSinceRequest(d->m_response.resourceLoadTiming()->requestTime); 511 switch (event) { 512 case G_SOCKET_CLIENT_RESOLVING: 513 d->m_response.resourceLoadTiming()->dnsStart = deltaTime; 514 break; 515 case G_SOCKET_CLIENT_RESOLVED: 516 d->m_response.resourceLoadTiming()->dnsEnd = deltaTime; 517 break; 518 case G_SOCKET_CLIENT_CONNECTING: 519 d->m_response.resourceLoadTiming()->connectStart = deltaTime; 520 if (d->m_response.resourceLoadTiming()->dnsStart != -1) 521 // WebCore/inspector/front-end/RequestTimingView.js assumes 522 // that DNS time is included in connection time so must 523 // substract here the DNS delta that will be added later (see 524 // WebInspector.RequestTimingView.createTimingTable in the 525 // file above for more details). 526 d->m_response.resourceLoadTiming()->connectStart -= 527 d->m_response.resourceLoadTiming()->dnsEnd - d->m_response.resourceLoadTiming()->dnsStart; 528 break; 529 case G_SOCKET_CLIENT_CONNECTED: 530 // Web Timing considers that connection time involves dns, proxy & TLS negotiation... 531 // so we better pick G_SOCKET_CLIENT_COMPLETE for connectEnd 532 break; 533 case G_SOCKET_CLIENT_PROXY_NEGOTIATING: 534 d->m_response.resourceLoadTiming()->proxyStart = deltaTime; 535 break; 536 case G_SOCKET_CLIENT_PROXY_NEGOTIATED: 537 d->m_response.resourceLoadTiming()->proxyEnd = deltaTime; 538 break; 539 case G_SOCKET_CLIENT_TLS_HANDSHAKING: 540 d->m_response.resourceLoadTiming()->sslStart = deltaTime; 541 break; 542 case G_SOCKET_CLIENT_TLS_HANDSHAKED: 543 d->m_response.resourceLoadTiming()->sslEnd = deltaTime; 544 break; 545 case G_SOCKET_CLIENT_COMPLETE: 546 d->m_response.resourceLoadTiming()->connectEnd = deltaTime; 547 break; 548 default: 549 ASSERT_NOT_REACHED(); 550 break; 551 } 552 } 553 #endif 554 447 555 static bool startHTTPRequest(ResourceHandle* handle) 448 556 { … … 479 587 g_signal_connect(soupMessage, "restarted", G_CALLBACK(restartedCallback), handle); 480 588 g_signal_connect(soupMessage, "wrote-body-data", G_CALLBACK(wroteBodyDataCallback), handle); 589 590 #if ENABLE(WEB_TIMING) 591 g_signal_connect(soupMessage, "network-event", G_CALLBACK(networkEventCallback), handle); 592 g_signal_connect(soupMessage, "wrote-body", G_CALLBACK(wroteBodyCallback), handle); 593 g_object_set_data(G_OBJECT(soupMessage), "handle", handle); 594 #endif 481 595 482 596 String firstPartyString = request.firstPartyForCookies().string(); … … 499 613 handle->ref(); 500 614 615 #if ENABLE(WEB_TIMING) 616 d->m_response.setResourceLoadTiming(ResourceLoadTiming::create()); 617 #endif 618 501 619 // Make sure we have an Accept header for subresources; some sites 502 620 // want this to serve some of their subresources … … 515 633 // Send the request only if it's not been explicitly deferred. 516 634 if (!d->m_defersLoading) { 635 #if ENABLE(WEB_TIMING) 636 d->m_response.resourceLoadTiming()->requestTime = monotonicallyIncreasingTime(); 637 #endif 517 638 d->m_cancellable = adoptGRef(g_cancellable_new()); 518 639 soup_request_send_async(d->m_soupRequest.get(), d->m_cancellable.get(), sendRequestCallback, handle); … … 594 715 // soon as the failure event is fired. 595 716 if (!hasBeenSent(this) && d->m_soupRequest) { 717 #if ENABLE(WEB_TIMING) 718 if (d->m_response.resourceLoadTiming()) 719 d->m_response.resourceLoadTiming()->requestTime = monotonicallyIncreasingTime(); 720 #endif 596 721 d->m_cancellable = adoptGRef(g_cancellable_new()); 597 722 soup_request_send_async(d->m_soupRequest.get(), d->m_cancellable.get(), sendRequestCallback, this); … … 761 886 SOUP_SESSION_USE_THREAD_CONTEXT, TRUE, 762 887 NULL); 888 #if ENABLE(WEB_TIMING) 889 g_signal_connect(G_OBJECT(session), "request-started", G_CALLBACK(requestStartedCallback), 0); 890 #endif 763 891 } 764 892 -
trunk/Tools/ChangeLog
r114733 r114736 1 2012-04-20 Sergio Villar Senin <svillar@igalia.com> 2 3 [GTK] Enable Web Timing 4 https://bugs.webkit.org/show_bug.cgi?id=42432 5 6 Reviewed by Gustavo Noronha Silva. 7 8 Build web timing by default whenever build-webkit is used. 9 10 * Scripts/build-webkit: 11 1 12 2012-04-20 Kamil Blank <k.blank@samsung.com> 2 13 -
trunk/Tools/Scripts/build-webkit
r114257 r114736 363 363 364 364 { option => "web-timing", desc => "Toggle Web Timing support", 365 define => "ENABLE_WEB_TIMING", default => isBlackBerry(), value=> \$webTimingSupport },365 define => "ENABLE_WEB_TIMING", default => (isBlackBerry() || isGtk()), value=> \$webTimingSupport }, 366 366 367 367 { option => "workers", desc => "Toggle Web Workers support",
Note: See TracChangeset
for help on using the changeset viewer.