Changeset 149148 in webkit


Ignore:
Timestamp:
Apr 25, 2013 3:25:07 PM (11 years ago)
Author:
ap@apple.com
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):
Location:
trunk/Tools
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/Tools/ChangeLog

    r149143 r149148  
     12013-04-25  Alexey Proskuryakov  <ap@apple.com>
     2
     3        Pass relatedPage when creating a page in WebKitTestRunner
     4        https://bugs.webkit.org/show_bug.cgi?id=115206
     5
     6        Reviewed by Geoffrey Garen.
     7
     8        To make sure that window.open() opens in the same process even when using multiple processes.
     9
     10        * WebKitTestRunner/PlatformWebView.h:
     11        * WebKitTestRunner/TestController.cpp:
     12        (WTR::TestController::createOtherPage):
     13        (WTR::TestController::createWebViewWithOptions):
     14        * WebKitTestRunner/efl/PlatformWebViewEfl.cpp:
     15        (WTR::PlatformWebView::PlatformWebView):
     16        * WebKitTestRunner/gtk/PlatformWebViewGtk.cpp:
     17        (WTR::PlatformWebView::PlatformWebView):
     18        * WebKitTestRunner/mac/PlatformWebViewMac.mm:
     19        (-[TestRunnerWKView initWithFrame:contextRef:pageGroupRef:relatedToPage:useTiledDrawing:]):
     20        (WTR::PlatformWebView::PlatformWebView):
     21        * WebKitTestRunner/qt/PlatformWebViewQt.cpp:
     22        (WTR::PlatformWebView::PlatformWebView):
     23        * WebKitTestRunner/win/PlatformWebViewWin.cpp:
     24        (WTR::PlatformWebView::PlatformWebView):
     25
    1262013-04-25  Ryosuke Niwa  <rniwa@webkit.org>
    227
  • trunk/Tools/WebKitTestRunner/PlatformWebView.h

    r147197 r149148  
    6969class PlatformWebView {
    7070public:
    71     PlatformWebView(WKContextRef, WKPageGroupRef, WKDictionaryRef options = 0);
     71    PlatformWebView(WKContextRef, WKPageGroupRef, WKPageRef relatedPage, WKDictionaryRef options = 0);
    7272    ~PlatformWebView();
    7373
  • trunk/Tools/WebKitTestRunner/TestController.cpp

    r149087 r149148  
    191191    PlatformWebView* parentView = static_cast<PlatformWebView*>(const_cast<void*>(clientInfo));
    192192
    193     PlatformWebView* view = new PlatformWebView(WKPageGetContext(oldPage), WKPageGetPageGroup(oldPage), parentView->options());
     193    PlatformWebView* view = new PlatformWebView(WKPageGetContext(oldPage), WKPageGetPageGroup(oldPage), oldPage, parentView->options());
    194194    WKPageRef newPage = view->page();
    195195
     
    388388void TestController::createWebViewWithOptions(WKDictionaryRef options)
    389389{
    390     m_mainWebView = adoptPtr(new PlatformWebView(m_context.get(), m_pageGroup.get(), options));
     390    m_mainWebView = adoptPtr(new PlatformWebView(m_context.get(), m_pageGroup.get(), 0, options));
    391391    WKPageUIClient pageUIClient = {
    392392        kWKPageUIClientCurrentVersion,
  • trunk/Tools/WebKitTestRunner/efl/PlatformWebViewEfl.cpp

    r148963 r149148  
    5555}
    5656
    57 PlatformWebView::PlatformWebView(WKContextRef context, WKPageGroupRef pageGroup, WKDictionaryRef options)
     57PlatformWebView::PlatformWebView(WKContextRef context, WKPageGroupRef pageGroup, WKPageRef /* relatedPage */, WKDictionaryRef options)
    5858    : m_options(options)
    5959{
  • trunk/Tools/WebKitTestRunner/gtk/PlatformWebViewGtk.cpp

    r145869 r149148  
    3434namespace WTR {
    3535
    36 PlatformWebView::PlatformWebView(WKContextRef context, WKPageGroupRef pageGroup, WKDictionaryRef options)
     36PlatformWebView::PlatformWebView(WKContextRef context, WKPageGroupRef pageGroup, WKPageRef /* relatedPage */, WKDictionaryRef options)
    3737    : m_view(WKViewCreate(context, pageGroup))
    3838    , m_window(gtk_window_new(GTK_WINDOW_POPUP))
  • trunk/Tools/WebKitTestRunner/mac/PlatformWebViewMac.mm

    r149087 r149148  
    4343}
    4444
    45 - (id)initWithFrame:(NSRect)frame contextRef:(WKContextRef)context pageGroupRef:(WKPageGroupRef)pageGroup useTiledDrawing:(BOOL)useTiledDrawing;
     45- (id)initWithFrame:(NSRect)frame contextRef:(WKContextRef)context pageGroupRef:(WKPageGroupRef)pageGroup relatedToPage:(WKPageRef)relatedPage useTiledDrawing:(BOOL)useTiledDrawing;
    4646
    4747@property (nonatomic, assign) BOOL useTiledDrawing;
     
    5252@synthesize useTiledDrawing = _useTiledDrawing;
    5353
    54 - (id)initWithFrame:(NSRect)frame contextRef:(WKContextRef)context pageGroupRef:(WKPageGroupRef)pageGroup useTiledDrawing:(BOOL)useTiledDrawing
     54- (id)initWithFrame:(NSRect)frame contextRef:(WKContextRef)context pageGroupRef:(WKPageGroupRef)pageGroup relatedToPage:(WKPageRef)relatedPage useTiledDrawing:(BOOL)useTiledDrawing
    5555{
    5656    _useTiledDrawing = useTiledDrawing;
    57     return [super initWithFrame:frame contextRef:context pageGroupRef:pageGroup];
     57    return [super initWithFrame:frame contextRef:context pageGroupRef:pageGroup relatedToPage:relatedPage];
    5858}
    5959
     
    117117namespace WTR {
    118118
    119 PlatformWebView::PlatformWebView(WKContextRef contextRef, WKPageGroupRef pageGroupRef, WKDictionaryRef options)
     119PlatformWebView::PlatformWebView(WKContextRef contextRef, WKPageGroupRef pageGroupRef, WKPageRef relatedPage, WKDictionaryRef options)
    120120    : m_windowIsKey(true)
    121121    , m_options(options)
     
    126126
    127127    NSRect rect = NSMakeRect(0, 0, TestController::viewWidth, TestController::viewHeight);
    128     m_view = [[TestRunnerWKView alloc] initWithFrame:rect contextRef:contextRef pageGroupRef:pageGroupRef useTiledDrawing:useTiledDrawing];
     128    m_view = [[TestRunnerWKView alloc] initWithFrame:rect contextRef:contextRef pageGroupRef:pageGroupRef relatedToPage:relatedPage useTiledDrawing:useTiledDrawing];
    129129    [m_view setWindowOcclusionDetectionEnabled:NO];
    130130
  • trunk/Tools/WebKitTestRunner/qt/PlatformWebViewQt.cpp

    r145869 r149148  
    7878};
    7979
    80 PlatformWebView::PlatformWebView(WKContextRef contextRef, WKPageGroupRef pageGroupRef, WKDictionaryRef options)
     80PlatformWebView::PlatformWebView(WKContextRef contextRef, WKPageGroupRef pageGroupRef, WKPageRef /* relatedPage */, WKDictionaryRef options)
    8181    : m_windowIsKey(true)
    8282    , m_options(options)
  • trunk/Tools/WebKitTestRunner/win/PlatformWebViewWin.cpp

    r145869 r149148  
    4949}
    5050
    51 PlatformWebView::PlatformWebView(WKContextRef contextRef, WKPageGroupRef pageGroupRef, WKDictionaryRef /*options*/)
     51PlatformWebView::PlatformWebView(WKContextRef contextRef, WKPageGroupRef pageGroupRef, WKPageRef /* relatedPage */, WKDictionaryRef /*options*/)
    5252    : m_windowIsKey(true)
    5353{
Note: See TracChangeset for help on using the changeset viewer.