Source/WebCore/ChangeLog

112013-02-07 Benjamin Poulain <bpoulain@apple.com>
22
 3 Move workerThreadCount from TestRunner to WebCore Internals
 4 https://bugs.webkit.org/show_bug.cgi?id=109239
 5
 6 Reviewed by NOBODY (OOPS!).
 7
 8 Add the new read-only property workerThreadCount.
 9
 10 * testing/Internals.cpp:
 11 (WebCore::Internals::workerThreadCount):
 12 * testing/Internals.h:
 13 * testing/Internals.idl:
 14
 152013-02-07 Benjamin Poulain <bpoulain@apple.com>
 16
317 Fix two exports of WebCore symbols on iOS
418 https://bugs.webkit.org/show_bug.cgi?id=109238
519

Source/WebKit/ChangeLog

 12013-02-07 Benjamin Poulain <bpoulain@apple.com>
 2
 3 Move workerThreadCount from TestRunner to WebCore Internals
 4 https://bugs.webkit.org/show_bug.cgi?id=109239
 5
 6 Reviewed by NOBODY (OOPS!).
 7
 8 * WebKit.xcodeproj/project.pbxproj:
 9
1102013-02-06 Roger Fong <roger_fong@apple.com>
211
312 Unreviewed. Touchups to VS2010 WebKit solution.

Source/WebKit/efl/ChangeLog

112013-02-07 Benjamin Poulain <bpoulain@apple.com>
22
 3 Move workerThreadCount from TestRunner to WebCore Internals
 4 https://bugs.webkit.org/show_bug.cgi?id=109239
 5
 6 Reviewed by NOBODY (OOPS!).
 7
 8 * WebCoreSupport/DumpRenderTreeSupportEfl.cpp:
 9 * WebCoreSupport/DumpRenderTreeSupportEfl.h:
 10
 112013-02-07 Benjamin Poulain <bpoulain@apple.com>
 12
313 Move pauseAnimation/pauseTransition from TestRunner to Internals
414 https://bugs.webkit.org/show_bug.cgi?id=109107
515

Source/WebKit/gtk/ChangeLog

 12013-02-07 Benjamin Poulain <bpoulain@apple.com>
 2
 3 Move workerThreadCount from TestRunner to WebCore Internals
 4 https://bugs.webkit.org/show_bug.cgi?id=109239
 5
 6 Reviewed by NOBODY (OOPS!).
 7
 8 * WebCoreSupport/DumpRenderTreeSupportGtk.cpp:
 9 * WebCoreSupport/DumpRenderTreeSupportGtk.h:
 10 (DumpRenderTreeSupportGtk):
 11
1122013-02-07 Martin Robinson <mrobinson@igalia.com>
213
314 [GTK] Cleanup command-line defines

Source/WebKit/mac/ChangeLog

112013-02-07 Benjamin Poulain <bpoulain@apple.com>
22
 3 Move workerThreadCount from TestRunner to WebCore Internals
 4 https://bugs.webkit.org/show_bug.cgi?id=109239
 5
 6 Reviewed by NOBODY (OOPS!).
 7
 8 Get rid of WebWorkersPrivate, which was only needed for DRT.
 9
 10 * WebKit.exp:
 11 * Workers/WebWorkersPrivate.h: Removed.
 12 * Workers/WebWorkersPrivate.mm: Removed.
 13
 142013-02-07 Benjamin Poulain <bpoulain@apple.com>
 15
316 Move pauseAnimation/pauseTransition from TestRunner to Internals
417 https://bugs.webkit.org/show_bug.cgi?id=109107
518

Source/WebKit/qt/ChangeLog

112013-02-07 Benjamin Poulain <bpoulain@apple.com>
22
 3 Move workerThreadCount from TestRunner to WebCore Internals
 4 https://bugs.webkit.org/show_bug.cgi?id=109239
 5
 6 Reviewed by NOBODY (OOPS!).
 7
 8 * WebCoreSupport/DumpRenderTreeSupportQt.cpp:
 9 * WebCoreSupport/DumpRenderTreeSupportQt.h:
 10
 112013-02-07 Benjamin Poulain <bpoulain@apple.com>
 12
313 Move pauseAnimation/pauseTransition from TestRunner to Internals
414 https://bugs.webkit.org/show_bug.cgi?id=109107
515

Source/WebKit2/ChangeLog

 12013-02-07 Benjamin Poulain <bpoulain@apple.com>
 2
 3 Move workerThreadCount from TestRunner to WebCore Internals
 4 https://bugs.webkit.org/show_bug.cgi?id=109239
 5
 6 Reviewed by NOBODY (OOPS!).
 7
 8 * WebProcess/InjectedBundle/API/c/WKBundle.cpp:
 9 * WebProcess/InjectedBundle/API/c/WKBundlePrivate.h:
 10 * WebProcess/InjectedBundle/InjectedBundle.cpp:
 11 * WebProcess/InjectedBundle/InjectedBundle.h:
 12 (InjectedBundle):
 13 * WebProcess/WebPage/WebFrame.cpp: Remove a useless #include.
 14
1152013-02-07 Martin Robinson <mrobinson@igalia.com>
216
317 [GTK] Cleanup command-line defines

Source/WebCore/testing/Internals.cpp

8787#include "TreeScope.h"
8888#include "TypeConversions.h"
8989#include "ViewportArguments.h"
 90#include "WorkerThread.h"
9091#include <wtf/text/StringBuffer.h>
9192
9293#if ENABLE(INPUT_TYPE_COLOR)

@@InternalSettings* Internals::settings() const
278279 return InternalSettings::from(page);
279280}
280281
 282unsigned long Internals::workerThreadCount() const
 283{
 284#if ENABLE(WORKERS)
 285 return WorkerThread::workerThreadCount();
 286#else
 287 return 0;
 288#endif
 289}
 290
281291String Internals::address(Node* node)
282292{
283293 char buf[32];

Source/WebCore/testing/Internals.h

@@public:
206206 static const char* internalsId;
207207
208208 InternalSettings* settings() const;
 209 unsigned long workerThreadCount() const;
209210
210211 void setBatteryStatus(Document*, const String& eventType, bool charging, double chargingTime, double dischargingTime, double level, ExceptionCode&);
211212

Source/WebCore/testing/Internals.idl

172172 boolean isPageBoxVisible(in Document document, in long pageNumber) raises (DOMException);
173173
174174 readonly attribute InternalSettings settings;
 175 readonly attribute unsigned long workerThreadCount;
175176
176177 // Flags for layerTreeAsText.
177178 const unsigned short LAYER_TREE_INCLUDES_VISIBLE_RECTS = 1;

Source/WebKit/WebKit.xcodeproj/project.pbxproj

8585 3ABB3C7A1309C3B500E93D94 /* WebStorageTrackerClient.h in Headers */ = {isa = PBXBuildFile; fileRef = 3ABB3C781309C3B500E93D94 /* WebStorageTrackerClient.h */; };
8686 3ABB3C7B1309C3B500E93D94 /* WebStorageTrackerClient.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3ABB3C791309C3B500E93D94 /* WebStorageTrackerClient.mm */; };
8787 3AE15D5012DBDED4009323C8 /* WebStorageManagerInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 3AE15D4F12DBDED4009323C8 /* WebStorageManagerInternal.h */; };
88  41F4484F10338E8C0030E55E /* WebWorkersPrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = 41F4484D10338E8C0030E55E /* WebWorkersPrivate.h */; settings = {ATTRIBUTES = (Private, ); }; };
89  41F4485010338E8C0030E55E /* WebWorkersPrivate.mm in Sources */ = {isa = PBXBuildFile; fileRef = 41F4484E10338E8C0030E55E /* WebWorkersPrivate.mm */; };
9088 44BB8B141241A022001E3A22 /* WebArchiveInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 44BB8B131241A022001E3A22 /* WebArchiveInternal.h */; };
9189 4BF99F900AE050BC00815C2B /* WebEditorClient.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BF99F8E0AE050BC00815C2B /* WebEditorClient.h */; settings = {ATTRIBUTES = (); }; };
9290 4BF99F910AE050BC00815C2B /* WebEditorClient.mm in Sources */ = {isa = PBXBuildFile; fileRef = 4BF99F8F0AE050BC00815C2B /* WebEditorClient.mm */; };

481479 3ABB3C781309C3B500E93D94 /* WebStorageTrackerClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebStorageTrackerClient.h; sourceTree = "<group>"; };
482480 3ABB3C791309C3B500E93D94 /* WebStorageTrackerClient.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WebStorageTrackerClient.mm; sourceTree = "<group>"; };
483481 3AE15D4F12DBDED4009323C8 /* WebStorageManagerInternal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebStorageManagerInternal.h; sourceTree = "<group>"; };
484  41F4484D10338E8C0030E55E /* WebWorkersPrivate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = WebWorkersPrivate.h; path = mac/Workers/WebWorkersPrivate.h; sourceTree = "<group>"; };
485  41F4484E10338E8C0030E55E /* WebWorkersPrivate.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = WebWorkersPrivate.mm; path = mac/Workers/WebWorkersPrivate.mm; sourceTree = "<group>"; };
486482 449098B90F8F82DF0076A327 /* FeatureDefines.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = FeatureDefines.xcconfig; sourceTree = "<group>"; };
487483 44BB8B131241A022001E3A22 /* WebArchiveInternal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebArchiveInternal.h; sourceTree = "<group>"; };
488484 4BF99F8E0AE050BC00815C2B /* WebEditorClient.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = WebEditorClient.h; sourceTree = "<group>"; };

801797 F5B36B400281DE87018635CB /* WebCoreSupport */,
802798 9C7CABBB0190A37C0ECA16EA /* WebView */,
803799 1C68F63F095B5F9C00C2984E /* WebInspector */,
804  41F4484C10338E570030E55E /* Workers */,
805800 F7EBEE5903F9DB2203CA0DE6 /* Carbon */,
806801 089C1665FE841158C02AAC07 /* Resources */,
807802 0867D69AFE84028FC02AAC07 /* Frameworks and Libraries */,

10331028 tabWidth = 4;
10341029 usesTabs = 0;
10351030 };
1036  41F4484C10338E570030E55E /* Workers */ = {
1037  isa = PBXGroup;
1038  children = (
1039  41F4484D10338E8C0030E55E /* WebWorkersPrivate.h */,
1040  41F4484E10338E8C0030E55E /* WebWorkersPrivate.mm */,
1041  );
1042  name = Workers;
1043  sourceTree = "<group>";
1044  };
10451031 511F3FC30CECC7E200852565 /* Storage */ = {
10461032 isa = PBXGroup;
10471033 children = (

16281614 BC2E464D0FD8A96800A9D9DE /* WebViewData.h in Headers */,
16291615 9398109B0824BF01008DF038 /* WebViewInternal.h in Headers */,
16301616 939810710824BF01008DF038 /* WebViewPrivate.h in Headers */,
1631  41F4484F10338E8C0030E55E /* WebWorkersPrivate.h in Headers */,
16321617 );
16331618 runOnlyForDeploymentPostprocessing = 0;
16341619 };

20021987 C0C5B3EF1177A4A0002B0AEF /* WebUserContentURLPattern.mm in Sources */,
20031988 939811070824BF01008DF038 /* WebView.mm in Sources */,
20041989 BC2E464E0FD8A96800A9D9DE /* WebViewData.mm in Sources */,
2005  41F4485010338E8C0030E55E /* WebWorkersPrivate.mm in Sources */,
20061990 );
20071991 runOnlyForDeploymentPostprocessing = 0;
20081992 };

Source/WebKit/efl/WebCoreSupport/DumpRenderTreeSupportEfl.cpp

5858#include <TextIterator.h>
5959#include <bindings/js/GCController.h>
6060#include <history/HistoryItem.h>
61 #include <workers/WorkerThread.h>
6261#include <wtf/HashMap.h>
6362#include <wtf/UnusedParam.h>
6463

@@size_t DumpRenderTreeSupportEfl::javaScriptObjectsCount()
439438 return WebCore::JSDOMWindow::commonJSGlobalData()->heap.objectCount();
440439}
441440
442 unsigned DumpRenderTreeSupportEfl::workerThreadCount()
443 {
444 #if ENABLE(WORKERS)
445  return WebCore::WorkerThread::workerThreadCount();
446 #else
447  return 0;
448 #endif
449 }
450 
451441void DumpRenderTreeSupportEfl::setDeadDecodedDataDeletionInterval(double interval)
452442{
453443 WebCore::memoryCache()->setDeadDecodedDataDeletionInterval(interval);

Source/WebKit/efl/WebCoreSupport/DumpRenderTreeSupportEfl.h

@@public:
9595 static void garbageCollectorCollect();
9696 static void garbageCollectorCollectOnAlternateThread(bool waitUntilDone);
9797 static size_t javaScriptObjectsCount();
98  static unsigned workerThreadCount();
9998
10099 static void setDeadDecodedDataDeletionInterval(double);
101100

Source/WebKit/gtk/WebCoreSupport/DumpRenderTreeSupportGtk.cpp

6868#include "Settings.h"
6969#include "TextIterator.h"
7070#include "WebKitAccessibleWrapperAtk.h"
71 #include "WorkerThread.h"
7271#include "webkitglobalsprivate.h"
7372#include "webkitwebframe.h"
7473#include "webkitwebframeprivate.h"

@@void DumpRenderTreeSupportGtk::clearOpener(WebKitWebFrame* frame)
532531 coreFrame->loader()->setOpener(0);
533532}
534533
535 unsigned int DumpRenderTreeSupportGtk::workerThreadCount()
536 {
537 #if ENABLE(WORKERS)
538  return WebCore::WorkerThread::workerThreadCount();
539 #else
540  return 0;
541 #endif
542 }
543 
544534bool DumpRenderTreeSupportGtk::findString(WebKitWebView* webView, const gchar* targetString, WebKitFindOptions findOptions)
545535{
546536 return core(webView)->findString(String::fromUTF8(targetString), findOptions);

Source/WebKit/gtk/WebCoreSupport/DumpRenderTreeSupportGtk.h

@@public:
105105 static void whiteListAccessFromOrigin(const gchar* sourceOrigin, const gchar* destinationProtocol, const gchar* destinationHost, bool allowDestinationSubdomains);
106106 static void removeWhiteListAccessFromOrigin(const char* sourceOrigin, const char* destinationProtocol, const char* destinationHost, bool allowDestinationSubdomains);
107107 static void resetOriginAccessWhiteLists();
108  static unsigned int workerThreadCount();
109108
110109 static void resetGeolocationClientMock(WebKitWebView*);
111110 static void setMockGeolocationPermission(WebKitWebView*, bool allowed);

Source/WebKit/mac/WebKit.exp

4040.objc_class_name_WebURLsWithTitles
4141.objc_class_name_WebUserContentURLPattern
4242.objc_class_name_WebView
43 .objc_class_name_WebWorkersPrivate
4443_HIWebViewCreate
4544_HIWebViewGetWebView
4645_WebActionButtonKey

Source/WebKit/mac/Workers/WebWorkersPrivate.h

1 /*
2  * Copyright (C) 2009 Google Inc. All rights reserved.
3  *
4  * Redistribution and use in source and binary forms, with or without
5  * modification, are permitted provided that the following conditions are
6  * met:
7  *
8  * * Redistributions of source code must retain the above copyright
9  * notice, this list of conditions and the following disclaimer.
10  * * Redistributions in binary form must reproduce the above
11  * copyright notice, this list of conditions and the following disclaimer
12  * in the documentation and/or other materials provided with the
13  * distribution.
14  * * Neither the name of Google Inc. nor the names of its
15  * contributors may be used to endorse or promote products derived from
16  * this software without specific prior written permission.
17  *
18  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22  * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29  */
30 
31 @interface WebWorkersPrivate : NSObject {
32 }
33 
34 // Returns the total number of currently executing worker threads (shared + dedicated).
35 + (unsigned) workerThreadCount;
36 
37 @end

Source/WebKit/mac/Workers/WebWorkersPrivate.mm

1 /*
2  * Copyright (C) 2009 Google Inc. All rights reserved.
3  *
4  * Redistribution and use in source and binary forms, with or without
5  * modification, are permitted provided that the following conditions are
6  * met:
7  *
8  * * Redistributions of source code must retain the above copyright
9  * notice, this list of conditions and the following disclaimer.
10  * * Redistributions in binary form must reproduce the above
11  * copyright notice, this list of conditions and the following disclaimer
12  * in the documentation and/or other materials provided with the
13  * distribution.
14  * * Neither the name of Google Inc. nor the names of its
15  * contributors may be used to endorse or promote products derived from
16  * this software without specific prior written permission.
17  *
18  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22  * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29  */
30 
31 #import "WebWorkersPrivate.h"
32 
33 #import <WebCore/WorkerThread.h>
34 
35 @implementation WebWorkersPrivate
36 
37 + (unsigned) workerThreadCount
38 {
39 #if defined(ENABLE_WORKERS) && ENABLE_WORKERS
40  return WebCore::WorkerThread::workerThreadCount();
41 #else
42  return 0;
43 #endif
44 }
45 
46 @end

Source/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.cpp

7777#include "TextIterator.h"
7878#include "ThirdPartyCookiesQt.h"
7979#include "WebCoreTestSupport.h"
80 #include "WorkerThread.h"
8180#include "qt_runtime.h"
8281#include "qwebelement.h"
8382#include "qwebhistory.h"

@@void DumpRenderTreeSupportQt::overwritePluginDirectories()
209208 db->refresh();
210209}
211210
212 int DumpRenderTreeSupportQt::workerThreadCount()
213 {
214 #if ENABLE(WORKERS)
215  return WebCore::WorkerThread::workerThreadCount();
216 #else
217  return 0;
218 #endif
219 }
220 
221211void DumpRenderTreeSupportQt::setDumpRenderTreeModeEnabled(bool b)
222212{
223213 QWebPageAdapter::drtRun = b;

Source/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.h

@@public:
139139 static void setMockGeolocationPositionUnavailableError(QWebPageAdapter*, const QString& message);
140140 static int numberOfPendingGeolocationPermissionRequests(QWebPageAdapter*);
141141
142  static int workerThreadCount();
143 
144142 static QString markerTextForListItem(const QWebElement& listItem);
145143 static QVariantMap computedStyleIncludingVisitedInfo(const QWebElement&);
146144

Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundle.cpp

@@bool WKBundleIsProcessingUserGesture(WKBundleRef)
300300 return InjectedBundle::isProcessingUserGesture();
301301}
302302
303 size_t WKBundleGetWorkerThreadCount(WKBundleRef)
304 {
305  // Actually do not need argument here, keeping it however for consistency.
306  return InjectedBundle::workerThreadCount();
307 }
308 
309303void WKBundleSetUserStyleSheetLocation(WKBundleRef bundleRef, WKBundlePageGroupRef pageGroupRef, WKStringRef location)
310304{
311305 toImpl(bundleRef)->setUserStyleSheetLocation(toImpl(pageGroupRef), toWTFString(location));

Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePrivate.h

@@WK_EXPORT size_t WKBundleGetJavaScriptObjectsCount(WKBundleRef bundle);
9898
9999WK_EXPORT bool WKBundleIsProcessingUserGesture(WKBundleRef bundle);
100100
101 WK_EXPORT size_t WKBundleGetWorkerThreadCount(WKBundleRef bundle);
102 
103101WK_EXPORT void WKBundleSetTabKeyCyclesThroughElements(WKBundleRef bundle, WKBundlePageRef page, bool enabled);
104102WK_EXPORT void WKBundleSetSerialLoadingEnabled(WKBundleRef bundle, bool enabled);
105103WK_EXPORT void WKBundleSetShadowDOMEnabled(WKBundleRef bundle, bool enabled);

Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.cpp

6969#include <WebCore/SecurityPolicy.h>
7070#include <WebCore/Settings.h>
7171#include <WebCore/UserGestureIndicator.h>
72 #include <WebCore/WorkerThread.h>
7372#include <wtf/OwnArrayPtr.h>
7473#include <wtf/PassOwnArrayPtr.h>
7574

@@void InjectedBundle::didReceiveMessageToPage(WebPage* page, const String& messag
579578 m_client.didReceiveMessageToPage(this, page, messageName, messageBody);
580579}
581580
582 size_t InjectedBundle::workerThreadCount()
583 {
584 #if ENABLE(WORKERS)
585  return WebCore::WorkerThread::workerThreadCount();
586 #else
587  return 0;
588 #endif
589 }
590 
591581void InjectedBundle::setUserStyleSheetLocation(WebPageGroupProxy* pageGroup, const String& location)
592582{
593583 const HashSet<Page*>& pages = PageGroup::pageGroup(pageGroup->identifier())->pages();

Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.h

@@public:
168168
169169 static bool isProcessingUserGesture();
170170
171  static size_t workerThreadCount();
172 
173171 void setTabKeyCyclesThroughElements(WebPage*, bool enabled);
174172 void setSerialLoadingEnabled(bool);
175173 void setShadowDOMEnabled(bool);

Source/WebKit2/WebProcess/WebPage/WebFrame.cpp

4242#include <JavaScriptCore/JSContextRef.h>
4343#include <JavaScriptCore/JSLock.h>
4444#include <JavaScriptCore/JSValueRef.h>
45 #include <WebCore/AnimationController.h>
4645#include <WebCore/ArchiveResource.h>
4746#include <WebCore/CSSComputedStyleDeclaration.h>
4847#include <WebCore/Chrome.h>

Tools/ChangeLog

 12013-02-07 Benjamin Poulain <bpoulain@apple.com>
 2
 3 Move workerThreadCount from TestRunner to WebCore Internals
 4 https://bugs.webkit.org/show_bug.cgi?id=109239
 5
 6 Reviewed by NOBODY (OOPS!).
 7
 8 * DumpRenderTree/TestRunner.cpp:
 9 (TestRunner::staticValues):
 10 * DumpRenderTree/TestRunner.h:
 11 (TestRunner):
 12 * DumpRenderTree/blackberry/TestRunnerBlackBerry.cpp:
 13 * DumpRenderTree/chromium/TestRunner/src/TestRunner.cpp:
 14 (WebTestRunner::TestRunner::TestRunner):
 15 * DumpRenderTree/chromium/TestRunner/src/TestRunner.h:
 16 (TestRunner):
 17 * DumpRenderTree/efl/TestRunnerEfl.cpp:
 18 * DumpRenderTree/gtk/TestRunnerGtk.cpp:
 19 * DumpRenderTree/mac/TestRunnerMac.mm:
 20 (TestRunner::webHistoryItemCount):
 21 * DumpRenderTree/qt/TestRunnerQt.cpp:
 22 * DumpRenderTree/qt/TestRunnerQt.h:
 23 (TestRunner):
 24 * DumpRenderTree/win/TestRunnerWin.cpp:
 25 * DumpRenderTree/wx/TestRunnerWx.cpp:
 26 * WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
 27 * WebKitTestRunner/InjectedBundle/TestRunner.cpp:
 28 * WebKitTestRunner/InjectedBundle/TestRunner.h:
 29
1302013-02-07 Roger Fong <roger_fong@apple.com>
231
332 Unreviewed. Another temporary EWS bot fix. It'll totally work this time.

Tools/DumpRenderTree/TestRunner.cpp

@@static JSValueRef getWebHistoryItemCountCallback(JSContextRef context, JSObjectR
19321932 return JSValueMakeNumber(context, controller->webHistoryItemCount());
19331933}
19341934
1935 static JSValueRef getWorkerThreadCountCallback(JSContextRef context, JSObjectRef thisObject, JSStringRef propertyName, JSValueRef* exception)
1936 {
1937  TestRunner* controller = static_cast<TestRunner*>(JSObjectGetPrivate(thisObject));
1938  return JSValueMakeNumber(context, controller->workerThreadCount());
1939 }
1940 
19411935#if PLATFORM(MAC) || PLATFORM(GTK) || PLATFORM(WIN)
19421936static JSValueRef getPlatformNameCallback(JSContextRef context, JSObjectRef thisObject, JSStringRef propertyName, JSValueRef* exception)
19431937{

@@JSStaticValue* TestRunner::staticValues()
21272121 static JSStaticValue staticValues[] = {
21282122 { "globalFlag", getGlobalFlagCallback, setGlobalFlagCallback, kJSPropertyAttributeNone },
21292123 { "webHistoryItemCount", getWebHistoryItemCountCallback, 0, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
2130  { "workerThreadCount", getWorkerThreadCountCallback, 0, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
21312124#if PLATFORM(MAC) || PLATFORM(GTK) || PLATFORM(WIN)
21322125 { "platformName", getPlatformNameCallback, 0, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
21332126#endif

Tools/DumpRenderTree/TestRunner.h

@@public:
125125
126126 void waitForPolicyDelegate();
127127 size_t webHistoryItemCount();
128  unsigned workerThreadCount() const;
129128 int windowCount();
130129
131130#if PLATFORM(MAC) || PLATFORM(GTK) || PLATFORM(WIN)

Tools/DumpRenderTree/blackberry/TestRunnerBlackBerry.cpp

4242#include "Settings.h"
4343#include "WorkQueue.h"
4444#include "WorkQueueItem.h"
45 #include "WorkerThread.h"
4645
4746#include <JavaScriptCore/APICast.h>
4847#include <SharedPointer.h>

@@void TestRunner::setWindowIsKey(bool windowIsKey)
341340 notImplemented();
342341}
343342
344 unsigned TestRunner::workerThreadCount() const
345 {
346 #if ENABLE_WORKERS
347  return WebCore::WorkerThread::workerThreadCount();
348 #else
349  return 0;
350 #endif
351 }
352 
353343void TestRunner::removeAllVisitedLinks()
354344{
355345 notImplemented();

Tools/DumpRenderTree/chromium/TestRunner/src/TestRunner.cpp

5353#include "WebTask.h"
5454#include "WebTestDelegate.h"
5555#include "WebView.h"
56 #include "WebWorkerInfo.h"
5756#include "v8/include/v8.h"
5857#include <public/WebData.h>
5958#include <public/WebPoint.h>

@@TestRunner::TestRunner()
309308 bindMethod("displayInvalidatedRegion", &TestRunner::displayInvalidatedRegion);
310309
311310 // Properties.
312  bindProperty("workerThreadCount", &TestRunner::workerThreadCount);
313311 bindProperty("globalFlag", &m_globalFlag);
314312 bindProperty("titleTextDirection", &m_titleTextDirection);
315313 bindProperty("platformName", &m_platformName);

@@void TestRunner::dumpResourceResponseMIMETypes(const CppArgumentList&, CppVarian
20001998 result->setNull();
20011999}
20022000
2003 void TestRunner::workerThreadCount(CppVariant* result)
2004 {
2005  result->set(static_cast<int>(WebWorkerInfo::dedicatedWorkerCount()));
2006 }
2007 
20082001// Need these conversions because the format of the value for booleans
20092002// may vary - for example, on mac "1" and "0" are used for boolean.
20102003bool TestRunner::cppVariantToBool(const CppVariant& value)

Tools/DumpRenderTree/chromium/TestRunner/src/TestRunner.h

@@private:
487487 void display(const CppArgumentList&, CppVariant*);
488488 void displayInvalidatedRegion(const CppArgumentList&, CppVariant*);
489489
490  ///////////////////////////////////////////////////////////////////////////
491  // Properties
492  void workerThreadCount(CppVariant*);
493 
494490 //////////////////////////////////////////////////////////////////////////
495491 // Fallback and stub methods
496492

Tools/DumpRenderTree/efl/TestRunnerEfl.cpp

@@size_t TestRunner::webHistoryItemCount()
126126 return ewk_history_back_list_length(history) + ewk_history_forward_list_length(history);
127127}
128128
129 unsigned TestRunner::workerThreadCount() const
130 {
131  return DumpRenderTreeSupportEfl::workerThreadCount();
132 }
133 
134129void TestRunner::notifyDone()
135130{
136131 if (m_waitToDump && !topLoadingFrame && !WorkQueue::shared()->count())

Tools/DumpRenderTree/gtk/TestRunnerGtk.cpp

@@size_t TestRunner::webHistoryItemCount()
127127 webkit_web_back_forward_list_get_forward_length(list);
128128}
129129
130 unsigned TestRunner::workerThreadCount() const
131 {
132  return DumpRenderTreeSupportGtk::workerThreadCount();
133 }
134 
135130JSRetainPtr<JSStringRef> TestRunner::platformName() const
136131{
137132 JSRetainPtr<JSStringRef> platformName(Adopt, JSStringCreateWithUTF8CString("gtk"));

Tools/DumpRenderTree/mac/TestRunnerMac.mm

7373#import <WebKit/WebTypesInternal.h>
7474#import <WebKit/WebView.h>
7575#import <WebKit/WebViewPrivate.h>
76 #import <WebKit/WebWorkersPrivate.h>
7776#import <wtf/CurrentTime.h>
7877#import <wtf/HashMap.h>
7978#import <wtf/RetainPtr.h>

@@size_t TestRunner::webHistoryItemCount()
299298 return [[[WebHistory optionalSharedHistory] allItems] count];
300299}
301300
302 unsigned TestRunner::workerThreadCount() const
303 {
304  return [WebWorkersPrivate workerThreadCount];
305 }
306 
307301JSRetainPtr<JSStringRef> TestRunner::platformName() const
308302{
309303 JSRetainPtr<JSStringRef> platformName(Adopt, JSStringCreateWithUTF8CString("mac"));

Tools/DumpRenderTree/qt/TestRunnerQt.cpp

@@void TestRunner::setDomainRelaxationForbiddenForURLScheme(bool forbidden, const
701701 DumpRenderTreeSupportQt::setDomainRelaxationForbiddenForURLScheme(forbidden, scheme);
702702}
703703
704 int TestRunner::workerThreadCount()
705 {
706  return DumpRenderTreeSupportQt::workerThreadCount();
707 }
708 
709704bool TestRunner::callShouldCloseOnWebView()
710705{
711706 return DumpRenderTreeSupportQt::shouldClose(m_drt->mainFrameAdapter());

Tools/DumpRenderTree/qt/TestRunnerQt.h

@@class DumpRenderTree;
5656class TestRunner : public QObject {
5757 Q_OBJECT
5858 Q_PROPERTY(int webHistoryItemCount READ webHistoryItemCount)
59  Q_PROPERTY(int workerThreadCount READ workerThreadCount)
6059 Q_PROPERTY(bool globalFlag READ globalFlag WRITE setGlobalFlag)
6160public:
6261 TestRunner(WebCore::DumpRenderTree*);

@@public Q_SLOTS:
212211 void setUserStyleSheetLocation(const QString& url);
213212 void setUserStyleSheetEnabled(bool);
214213 void setDomainRelaxationForbiddenForURLScheme(bool forbidden, const QString& scheme);
215  int workerThreadCount();
216214 bool callShouldCloseOnWebView();
217215 // For now, this is a no-op. This may change depending on outcome of
218216 // https://bugs.webkit.org/show_bug.cgi?id=33333

Tools/DumpRenderTree/win/TestRunnerWin.cpp

@@size_t TestRunner::webHistoryItemCount()
225225 return count;
226226}
227227
228 unsigned TestRunner::workerThreadCount() const
229 {
230  COMPtr<IWebWorkersPrivate> workers;
231  if (FAILED(WebKitCreateInstance(CLSID_WebWorkersPrivate, 0, __uuidof(workers), reinterpret_cast<void**>(&workers))))
232  return 0;
233  unsigned count;
234  if (FAILED(workers->workerThreadCount(&count)))
235  return 0;
236  return count;
237 }
238 
239228JSRetainPtr<JSStringRef> TestRunner::platformName() const
240229{
241230 JSRetainPtr<JSStringRef> platformName(Adopt, JSStringCreateWithUTF8CString("win"));

Tools/DumpRenderTree/wx/TestRunnerWx.cpp

@@void TestRunner::setAppCacheMaximumSize(unsigned long long size)
304304 // FIXME: implement
305305}
306306
307 unsigned TestRunner::workerThreadCount() const
308 {
309  // FIXME: implement
310  return 0;
311 }
312 
313307void TestRunner::setSelectTrailingWhitespaceEnabled(bool flag)
314308{
315309 // FIXME: implement

Tools/WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl

@@interface TestRunner {
8484
8585 // Special DOM variables.
8686 attribute boolean globalFlag;
87  readonly attribute unsigned long workerThreadCount;
8887
8988 // Repaint testing.
9089 void testRepaint();

Tools/WebKitTestRunner/InjectedBundle/TestRunner.cpp

@@static void callTestRunnerCallback(unsigned index)
569569 JSValueUnprotect(context, callback);
570570}
571571
572 unsigned TestRunner::workerThreadCount()
573 {
574  return WKBundleGetWorkerThreadCount(InjectedBundle::shared().bundle());
575 }
576 
577572void TestRunner::addChromeInputField(JSValueRef callback)
578573{
579574 cacheTestRunnerCallback(AddChromeInputFieldCallbackID, callback);

Tools/WebKitTestRunner/InjectedBundle/TestRunner.h

@@public:
223223 bool globalFlag() const { return m_globalFlag; }
224224 void setGlobalFlag(bool value) { m_globalFlag = value; }
225225
226  unsigned workerThreadCount();
227 
228226 void addChromeInputField(JSValueRef);
229227 void removeChromeInputField(JSValueRef);
230228 void focusWebView(JSValueRef);

LayoutTests/ChangeLog

 12013-02-07 Benjamin Poulain <bpoulain@apple.com>
 2
 3 Move workerThreadCount from TestRunner to WebCore Internals
 4 https://bugs.webkit.org/show_bug.cgi?id=109239
 5
 6 Reviewed by NOBODY (OOPS!).
 7
 8 Update the tests testRunner->internals.
 9
 10 * fast/workers/resources/dedicated-worker-lifecycle.js:
 11 (runTests.worker.onmessage):
 12 (runTests):
 13 (orphanedWorkerExited.worker.onmessage):
 14 (orphanedWorkerExited):
 15 * fast/workers/resources/worker-lifecycle.js:
 16 (runTests.worker.onmessage):
 17 (runTests):
 18 * fast/workers/resources/worker-util.js:
 19 (.return):
 20 (waitUntilThreadCountMatches):
 21 * fast/workers/worker-close-more.html:
 22 * http/tests/workers/resources/worker-util.js:
 23 (.return):
 24 (waitUntilThreadCountMatches):
 25
1262013-02-07 Hans Muller <hmuller@adobe.com>
227
328 [CSS Exclusions] Ignore ExclusionPolygon edges above minLogicalIntervalTop

LayoutTests/fast/workers/resources/dedicated-worker-lifecycle.js

@@function runTests()
1717 worker.postMessage("ping");
1818 worker.onmessage = function(event) {
1919 if (window.testRunner) {
20  if (testRunner.workerThreadCount == 1)
 20 if (internals.workerThreadCount == 1)
2121 testPassed("Orphaned worker thread created.");
2222 else
23  testFailed("After thread creation: testRunner.workerThreadCount = " + testRunner.workerThreadCount);
 23 testFailed("After thread creation: internals.workerThreadCount = " + internals.workerThreadCount);
2424 }
2525
2626 // Orphan our worker (no more references to it) and wait for it to exit.

@@function orphanedWorkerExited()
4040 worker.postMessage("ping");
4141 worker.onmessage = function(event) {
4242 if (window.testRunner) {
43  if (testRunner.workerThreadCount == 1)
 43 if (internals.workerThreadCount == 1)
4444 testPassed("Orphaned timeout worker thread created.");
4545 else
46  testFailed("After thread creation: testRunner.workerThreadCount = " + testRunner.workerThreadCount);
 46 testFailed("After thread creation: internals.workerThreadCount = " + internals.workerThreadCount);
4747 }
4848 // Send a message that starts up an async operation, to make sure the thread exits when it completes.
4949 // FIXME: Disabled for now - re-enable when bug 28702 is fixed.

LayoutTests/fast/workers/resources/worker-lifecycle.js

@@if (window.testRunner) {
1111function runTests()
1212{
1313 if (window.testRunner)
14  log("PASS: workerThreadCount = " + testRunner.workerThreadCount);
 14 log("PASS: workerThreadCount = " + internals.workerThreadCount);
1515 var worker = createWorker();
1616 worker.postMessage("ping");
1717 worker.onmessage = function(event) {
1818 if (window.testRunner) {
19  if (testRunner.workerThreadCount == 1)
 19 if (internals.workerThreadCount == 1)
2020 log("PASS: Worker thread created");
2121 else
22  log("FAIL: After thread creation: testRunner.workerThreadCount = " + testRunner.workerThreadCount);
 22 log("FAIL: After thread creation: internals.workerThreadCount = " + internals.workerThreadCount);
2323 }
2424
2525 // Shutdown the worker.

LayoutTests/fast/workers/resources/worker-util.js

@@function waitUntilThreadCountMatches(callback, count)
3636 return;
3737 }
3838
39  if (testRunner.workerThreadCount == count) {
 39 if (internals.workerThreadCount == count) {
4040 // Worker threads have exited.
4141 callback();
4242 } else {

LayoutTests/fast/workers/worker-close-more.html

@@var worker;
1717function startWorker()
1818{
1919 if (window.testRunner)
20  log("PASS: workerThreadCount = " + testRunner.workerThreadCount);
 20 log("PASS: workerThreadCount = " + internals.workerThreadCount);
2121 worker = new Worker('resources/worker-close.js');
2222}
2323

LayoutTests/http/tests/workers/resources/worker-util.js

@@function waitUntilThreadCountMatches(callback, count)
3636 return;
3737 }
3838
39  if (testRunner.workerThreadCount == count) {
 39 if (internals.workerThreadCount == count) {
4040 // Worker threads have exited.
4141 callback();
4242 } else {