Title: [149148] trunk/Tools
Revision
149148
Author
[email protected]
Date
2013-04-25 15:25:07 -0700 (Thu, 25 Apr 2013)

Log Message

        Pass relatedPage when creating a page in WebKitTestRunner
        https://bugs.webkit.org/show_bug.cgi?id=115206

        Reviewed by Geoffrey Garen.

        To make sure that window.open() opens in the same process even when using multiple processes.

        * WebKitTestRunner/PlatformWebView.h:
        * WebKitTestRunner/TestController.cpp:
        (WTR::TestController::createOtherPage):
        (WTR::TestController::createWebViewWithOptions):
        * WebKitTestRunner/efl/PlatformWebViewEfl.cpp:
        (WTR::PlatformWebView::PlatformWebView):
        * WebKitTestRunner/gtk/PlatformWebViewGtk.cpp:
        (WTR::PlatformWebView::PlatformWebView):
        * WebKitTestRunner/mac/PlatformWebViewMac.mm:
        (-[TestRunnerWKView initWithFrame:contextRef:pageGroupRef:relatedToPage:useTiledDrawing:]):
        (WTR::PlatformWebView::PlatformWebView):
        * WebKitTestRunner/qt/PlatformWebViewQt.cpp:
        (WTR::PlatformWebView::PlatformWebView):
        * WebKitTestRunner/win/PlatformWebViewWin.cpp:
        (WTR::PlatformWebView::PlatformWebView):

Modified Paths

Diff

Modified: trunk/Tools/ChangeLog (149147 => 149148)


--- trunk/Tools/ChangeLog	2013-04-25 22:23:39 UTC (rev 149147)
+++ trunk/Tools/ChangeLog	2013-04-25 22:25:07 UTC (rev 149148)
@@ -1,3 +1,28 @@
+2013-04-25  Alexey Proskuryakov  <[email protected]>
+
+        Pass relatedPage when creating a page in WebKitTestRunner
+        https://bugs.webkit.org/show_bug.cgi?id=115206
+
+        Reviewed by Geoffrey Garen.
+
+        To make sure that window.open() opens in the same process even when using multiple processes.
+
+        * WebKitTestRunner/PlatformWebView.h:
+        * WebKitTestRunner/TestController.cpp:
+        (WTR::TestController::createOtherPage):
+        (WTR::TestController::createWebViewWithOptions):
+        * WebKitTestRunner/efl/PlatformWebViewEfl.cpp:
+        (WTR::PlatformWebView::PlatformWebView):
+        * WebKitTestRunner/gtk/PlatformWebViewGtk.cpp:
+        (WTR::PlatformWebView::PlatformWebView):
+        * WebKitTestRunner/mac/PlatformWebViewMac.mm:
+        (-[TestRunnerWKView initWithFrame:contextRef:pageGroupRef:relatedToPage:useTiledDrawing:]):
+        (WTR::PlatformWebView::PlatformWebView):
+        * WebKitTestRunner/qt/PlatformWebViewQt.cpp:
+        (WTR::PlatformWebView::PlatformWebView):
+        * WebKitTestRunner/win/PlatformWebViewWin.cpp:
+        (WTR::PlatformWebView::PlatformWebView):
+
 2013-04-25  Ryosuke Niwa  <[email protected]>
 
         Fix autocompletion for Benjamin. The Bugzilla email address must come first.

Modified: trunk/Tools/WebKitTestRunner/PlatformWebView.h (149147 => 149148)


--- trunk/Tools/WebKitTestRunner/PlatformWebView.h	2013-04-25 22:23:39 UTC (rev 149147)
+++ trunk/Tools/WebKitTestRunner/PlatformWebView.h	2013-04-25 22:25:07 UTC (rev 149148)
@@ -68,7 +68,7 @@
 
 class PlatformWebView {
 public:
-    PlatformWebView(WKContextRef, WKPageGroupRef, WKDictionaryRef options = 0);
+    PlatformWebView(WKContextRef, WKPageGroupRef, WKPageRef relatedPage, WKDictionaryRef options = 0);
     ~PlatformWebView();
 
     WKPageRef page();

Modified: trunk/Tools/WebKitTestRunner/TestController.cpp (149147 => 149148)


--- trunk/Tools/WebKitTestRunner/TestController.cpp	2013-04-25 22:23:39 UTC (rev 149147)
+++ trunk/Tools/WebKitTestRunner/TestController.cpp	2013-04-25 22:25:07 UTC (rev 149148)
@@ -190,7 +190,7 @@
 {
     PlatformWebView* parentView = static_cast<PlatformWebView*>(const_cast<void*>(clientInfo));
 
-    PlatformWebView* view = new PlatformWebView(WKPageGetContext(oldPage), WKPageGetPageGroup(oldPage), parentView->options());
+    PlatformWebView* view = new PlatformWebView(WKPageGetContext(oldPage), WKPageGetPageGroup(oldPage), oldPage, parentView->options());
     WKPageRef newPage = view->page();
 
     view->resizeTo(800, 600);
@@ -387,7 +387,7 @@
 
 void TestController::createWebViewWithOptions(WKDictionaryRef options)
 {
-    m_mainWebView = adoptPtr(new PlatformWebView(m_context.get(), m_pageGroup.get(), options));
+    m_mainWebView = adoptPtr(new PlatformWebView(m_context.get(), m_pageGroup.get(), 0, options));
     WKPageUIClient pageUIClient = {
         kWKPageUIClientCurrentVersion,
         m_mainWebView.get(),

Modified: trunk/Tools/WebKitTestRunner/efl/PlatformWebViewEfl.cpp (149147 => 149148)


--- trunk/Tools/WebKitTestRunner/efl/PlatformWebViewEfl.cpp	2013-04-25 22:23:39 UTC (rev 149147)
+++ trunk/Tools/WebKitTestRunner/efl/PlatformWebViewEfl.cpp	2013-04-25 22:25:07 UTC (rev 149148)
@@ -54,7 +54,7 @@
     return ecoreEvas;
 }
 
-PlatformWebView::PlatformWebView(WKContextRef context, WKPageGroupRef pageGroup, WKDictionaryRef options)
+PlatformWebView::PlatformWebView(WKContextRef context, WKPageGroupRef pageGroup, WKPageRef /* relatedPage */, WKDictionaryRef options)
     : m_options(options)
 {
     WKRetainPtr<WKStringRef> useFixedLayoutKey(AdoptWK, WKStringCreateWithUTF8CString("UseFixedLayout"));

Modified: trunk/Tools/WebKitTestRunner/gtk/PlatformWebViewGtk.cpp (149147 => 149148)


--- trunk/Tools/WebKitTestRunner/gtk/PlatformWebViewGtk.cpp	2013-04-25 22:23:39 UTC (rev 149147)
+++ trunk/Tools/WebKitTestRunner/gtk/PlatformWebViewGtk.cpp	2013-04-25 22:25:07 UTC (rev 149148)
@@ -33,7 +33,7 @@
 
 namespace WTR {
 
-PlatformWebView::PlatformWebView(WKContextRef context, WKPageGroupRef pageGroup, WKDictionaryRef options)
+PlatformWebView::PlatformWebView(WKContextRef context, WKPageGroupRef pageGroup, WKPageRef /* relatedPage */, WKDictionaryRef options)
     : m_view(WKViewCreate(context, pageGroup))
     , m_window(gtk_window_new(GTK_WINDOW_POPUP))
     , m_windowIsKey(true)

Modified: trunk/Tools/WebKitTestRunner/mac/PlatformWebViewMac.mm (149147 => 149148)


--- trunk/Tools/WebKitTestRunner/mac/PlatformWebViewMac.mm	2013-04-25 22:23:39 UTC (rev 149147)
+++ trunk/Tools/WebKitTestRunner/mac/PlatformWebViewMac.mm	2013-04-25 22:25:07 UTC (rev 149148)
@@ -42,7 +42,7 @@
     BOOL _useTiledDrawing;
 }
 
-- (id)initWithFrame:(NSRect)frame contextRef:(WKContextRef)context pageGroupRef:(WKPageGroupRef)pageGroup useTiledDrawing:(BOOL)useTiledDrawing;
+- (id)initWithFrame:(NSRect)frame contextRef:(WKContextRef)context pageGroupRef:(WKPageGroupRef)pageGroup relatedToPage:(WKPageRef)relatedPage useTiledDrawing:(BOOL)useTiledDrawing;
 
 @property (nonatomic, assign) BOOL useTiledDrawing;
 @end
@@ -51,10 +51,10 @@
 
 @synthesize useTiledDrawing = _useTiledDrawing;
 
-- (id)initWithFrame:(NSRect)frame contextRef:(WKContextRef)context pageGroupRef:(WKPageGroupRef)pageGroup useTiledDrawing:(BOOL)useTiledDrawing
+- (id)initWithFrame:(NSRect)frame contextRef:(WKContextRef)context pageGroupRef:(WKPageGroupRef)pageGroup relatedToPage:(WKPageRef)relatedPage useTiledDrawing:(BOOL)useTiledDrawing
 {
     _useTiledDrawing = useTiledDrawing;
-    return [super initWithFrame:frame contextRef:context pageGroupRef:pageGroup];
+    return [super initWithFrame:frame contextRef:context pageGroupRef:pageGroup relatedToPage:relatedPage];
 }
 
 - (BOOL)_shouldUseTiledDrawingArea
@@ -116,7 +116,7 @@
 
 namespace WTR {
 
-PlatformWebView::PlatformWebView(WKContextRef contextRef, WKPageGroupRef pageGroupRef, WKDictionaryRef options)
+PlatformWebView::PlatformWebView(WKContextRef contextRef, WKPageGroupRef pageGroupRef, WKPageRef relatedPage, WKDictionaryRef options)
     : m_windowIsKey(true)
     , m_options(options)
 {
@@ -125,7 +125,7 @@
     bool useTiledDrawing = useTiledDrawingValue && WKBooleanGetValue(static_cast<WKBooleanRef>(useTiledDrawingValue));
 
     NSRect rect = NSMakeRect(0, 0, TestController::viewWidth, TestController::viewHeight);
-    m_view = [[TestRunnerWKView alloc] initWithFrame:rect contextRef:contextRef pageGroupRef:pageGroupRef useTiledDrawing:useTiledDrawing];
+    m_view = [[TestRunnerWKView alloc] initWithFrame:rect contextRef:contextRef pageGroupRef:pageGroupRef relatedToPage:relatedPage useTiledDrawing:useTiledDrawing];
     [m_view setWindowOcclusionDetectionEnabled:NO];
 
     NSRect windowRect = NSOffsetRect(rect, -10000, [(NSScreen *)[[NSScreen screens] objectAtIndex:0] frame].size.height - rect.size.height + 10000);

Modified: trunk/Tools/WebKitTestRunner/qt/PlatformWebViewQt.cpp (149147 => 149148)


--- trunk/Tools/WebKitTestRunner/qt/PlatformWebViewQt.cpp	2013-04-25 22:23:39 UTC (rev 149147)
+++ trunk/Tools/WebKitTestRunner/qt/PlatformWebViewQt.cpp	2013-04-25 22:25:07 UTC (rev 149148)
@@ -77,7 +77,7 @@
     QQuickWebView* m_view;
 };
 
-PlatformWebView::PlatformWebView(WKContextRef contextRef, WKPageGroupRef pageGroupRef, WKDictionaryRef options)
+PlatformWebView::PlatformWebView(WKContextRef contextRef, WKPageGroupRef pageGroupRef, WKPageRef /* relatedPage */, WKDictionaryRef options)
     : m_windowIsKey(true)
     , m_options(options)
     , m_modalEventLoop(0)

Modified: trunk/Tools/WebKitTestRunner/win/PlatformWebViewWin.cpp (149147 => 149148)


--- trunk/Tools/WebKitTestRunner/win/PlatformWebViewWin.cpp	2013-04-25 22:23:39 UTC (rev 149147)
+++ trunk/Tools/WebKitTestRunner/win/PlatformWebViewWin.cpp	2013-04-25 22:25:07 UTC (rev 149148)
@@ -48,7 +48,7 @@
     RegisterClassExW(&wndClass);
 }
 
-PlatformWebView::PlatformWebView(WKContextRef contextRef, WKPageGroupRef pageGroupRef, WKDictionaryRef /*options*/)
+PlatformWebView::PlatformWebView(WKContextRef contextRef, WKPageGroupRef pageGroupRef, WKPageRef /* relatedPage */, WKDictionaryRef /*options*/)
     : m_windowIsKey(true)
 {
     registerWindowClass();
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to