Roll out r81593 Need WebKit2 API for creating a page with a specific main frame name
authorweinig@apple.com <weinig@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 23 Mar 2011 22:29:40 +0000 (22:29 +0000)
committerweinig@apple.com <weinig@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 23 Mar 2011 22:29:40 +0000 (22:29 +0000)
Reviewed by Anders Carlsson.

This API is not necessary.

* Shared/WebPageCreationParameters.cpp:
(WebKit::WebPageCreationParameters::encode):
(WebKit::WebPageCreationParameters::decode):
* Shared/WebPageCreationParameters.h:
* UIProcess/API/mac/WKView.h:
* UIProcess/API/mac/WKView.mm:
(-[WKView initWithFrame:]):
(-[WKView initWithFrame:contextRef:]):
(-[WKView initWithFrame:contextRef:pageGroupRef:]):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::creationParameters):
* UIProcess/WebPageProxy.h:
* WebProcess/WebPage/WebFrame.cpp:
(WebKit::WebFrame::createMainFrame):
* WebProcess/WebPage/WebFrame.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage):

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

Source/WebKit2/ChangeLog
Source/WebKit2/Shared/WebPageCreationParameters.cpp
Source/WebKit2/Shared/WebPageCreationParameters.h
Source/WebKit2/UIProcess/API/mac/WKView.h
Source/WebKit2/UIProcess/API/mac/WKView.mm
Source/WebKit2/UIProcess/WebPageProxy.cpp
Source/WebKit2/UIProcess/WebPageProxy.h
Source/WebKit2/WebProcess/WebPage/WebFrame.cpp
Source/WebKit2/WebProcess/WebPage/WebFrame.h
Source/WebKit2/WebProcess/WebPage/WebPage.cpp

index 149878f5aa8a34bc901f675fa9179f1f0332e9cb..b51045400756bfb930d8360ed1ff0ecb6e5ee68b 100644 (file)
@@ -1,3 +1,29 @@
+2011-03-23  Sam Weinig  <sam@webkit.org>
+
+        Reviewed by Anders Carlsson.
+
+        Roll out r81593 Need WebKit2 API for creating a page with a specific main frame name
+
+        This API is not necessary.
+
+        * Shared/WebPageCreationParameters.cpp:
+        (WebKit::WebPageCreationParameters::encode):
+        (WebKit::WebPageCreationParameters::decode):
+        * Shared/WebPageCreationParameters.h:
+        * UIProcess/API/mac/WKView.h:
+        * UIProcess/API/mac/WKView.mm:
+        (-[WKView initWithFrame:]):
+        (-[WKView initWithFrame:contextRef:]):
+        (-[WKView initWithFrame:contextRef:pageGroupRef:]):
+        * UIProcess/WebPageProxy.cpp:
+        (WebKit::WebPageProxy::creationParameters):
+        * UIProcess/WebPageProxy.h:
+        * WebProcess/WebPage/WebFrame.cpp:
+        (WebKit::WebFrame::createMainFrame):
+        * WebProcess/WebPage/WebFrame.h:
+        * WebProcess/WebPage/WebPage.cpp:
+        (WebKit::WebPage::WebPage):
+
 2011-03-23  Balazs Kelemen  <kbalazs@webkit.org>
 
         Reviewed by Andreas Kling.
index eb52f106e63944c493a2eafbba4103d138578556..33b53e31d9e1e6f3ba8bf8e7b6e762f21ac2b05d 100644 (file)
@@ -47,7 +47,6 @@ void WebPageCreationParameters::encode(CoreIPC::ArgumentEncoder* encoder) const
     encoder->encode(useFixedLayout);
     encoder->encode(fixedLayoutSize);
     encoder->encode(userAgent);
-    encoder->encode(mainFrameName);
     encoder->encode(sessionState);
     encoder->encode(highestUsedBackForwardItemID);
     encoder->encode(canRunBeforeUnloadConfirmPanel);
@@ -92,8 +91,6 @@ bool WebPageCreationParameters::decode(CoreIPC::ArgumentDecoder* decoder, WebPag
         return false;
     if (!decoder->decode(parameters.userAgent))
         return false;
-    if (!decoder->decode(parameters.mainFrameName))
-        return false;
     if (!decoder->decode(parameters.sessionState))
         return false;
     if (!decoder->decode(parameters.highestUsedBackForwardItemID))
index fbc1953730191c9c4ee814b0d86c195cc0b057bb..31759e14f32f271475d8d90eace79e35e9b0341d 100644 (file)
@@ -64,7 +64,6 @@ struct WebPageCreationParameters {
     WebCore::IntSize fixedLayoutSize;
 
     String userAgent;
-    String mainFrameName;
 
     SessionState sessionState;
     uint64_t highestUsedBackForwardItemID;
index e230f83809be473915a1b8ce41458b7ee0aee81e..8c1826c6a8384b9d80ecb4474b6d4d19832a12ef 100644 (file)
@@ -36,7 +36,6 @@ WK_EXPORT
 
 - (id)initWithFrame:(NSRect)frame contextRef:(WKContextRef)contextRef;
 - (id)initWithFrame:(NSRect)frame contextRef:(WKContextRef)contextRef pageGroupRef:(WKPageGroupRef)pageGroupRef;
-- (id)initWithFrame:(NSRect)frame contextRef:(WKContextRef)contextRef pageGroupRef:(WKPageGroupRef)pageGroupRef mainFrameName:(NSString *)mainFrameName;
 
 - (NSPrintOperation *)printOperationWithPrintInfo:(NSPrintInfo *)printInfo forFrame:(WKFrameRef)frameRef;
 - (BOOL)canChangeFrameLayout:(WKFrameRef)frameRef;
index 2a42319b4a9b48981f570090cc7bfbda6a06f003..95fba8a75c2976081572723c3599ce1cda3c4583 100644 (file)
@@ -162,6 +162,16 @@ typedef HashMap<String, ValidationVector> ValidationMap;
 
 @implementation WKView
 
+- (id)initWithFrame:(NSRect)frame
+{
+    return [self initWithFrame:frame contextRef:toAPI(WebContext::sharedProcessContext())];
+}
+
+- (id)initWithFrame:(NSRect)frame contextRef:(WKContextRef)contextRef
+{   
+    return [self initWithFrame:frame contextRef:contextRef pageGroupRef:nil];
+}
+
 - (void)_registerDraggedTypes
 {
     NSMutableSet *types = [[NSMutableSet alloc] initWithArray:PasteboardTypes::forEditing()];
@@ -188,22 +198,7 @@ typedef HashMap<String, ValidationVector> ValidationMap;
 #endif
 }
 
-- (id)initWithFrame:(NSRect)frame
-{
-    return [self initWithFrame:frame contextRef:toAPI(WebContext::sharedProcessContext())];
-}
-
-- (id)initWithFrame:(NSRect)frame contextRef:(WKContextRef)contextRef
-{   
-    return [self initWithFrame:frame contextRef:contextRef pageGroupRef:nil];
-}
-
 - (id)initWithFrame:(NSRect)frame contextRef:(WKContextRef)contextRef pageGroupRef:(WKPageGroupRef)pageGroupRef
-{
-    return [self initWithFrame:frame contextRef:contextRef pageGroupRef:pageGroupRef mainFrameName:nil];
-}
-
-- (id)initWithFrame:(NSRect)frame contextRef:(WKContextRef)contextRef pageGroupRef:(WKPageGroupRef)pageGroupRef mainFrameName:(NSString *)mainFrameName
 {
     self = [super initWithFrame:frame];
     if (!self)
@@ -225,9 +220,7 @@ typedef HashMap<String, ValidationVector> ValidationMap;
 
     _data->_pageClient = PageClientImpl::create(self);
     _data->_page = toImpl(contextRef)->createWebPage(_data->_pageClient.get(), toImpl(pageGroupRef));
-    _data->_page->setMainFrameName(mainFrameName);
     _data->_page->initializeWebPage();
-
 #if ENABLE(FULLSCREEN_API)
     _data->_page->fullScreenManager()->setWebView(self);
 #endif
index 29e8e8a20e3b4e2e1f784b25da437dab1761023d..daa26c15d0c3641a92f7591a8de2f6fd40694fa9 100644 (file)
@@ -935,11 +935,6 @@ void WebPageProxy::setCustomTextEncodingName(const String& encodingName)
     process()->send(Messages::WebPage::SetCustomTextEncodingName(encodingName), m_pageID);
 }
 
-void WebPageProxy::setMainFrameName(const String& mainFrameName)
-{
-    m_mainFrameName = mainFrameName;
-}
-
 void WebPageProxy::terminateProcess()
 {
     if (!isValid())
@@ -2578,7 +2573,6 @@ WebPageCreationParameters WebPageProxy::creationParameters() const
     parameters.useFixedLayout = m_useFixedLayout;
     parameters.fixedLayoutSize = m_fixedLayoutSize;
     parameters.userAgent = userAgent();
-    parameters.mainFrameName = m_mainFrameName;
     parameters.sessionState = SessionState(m_backForwardList->entries(), m_backForwardList->currentIndex());
     parameters.highestUsedBackForwardItemID = WebBackForwardListItem::highedUsedItemID();
     parameters.canRunBeforeUnloadConfirmPanel = m_uiClient.canRunBeforeUnloadConfirmPanel();
index 5e82c2d9e072cb187c29607405b4e5dd0b4c92d9..85400f5a4bbcc6334398b1a17973956339655496 100644 (file)
@@ -291,8 +291,6 @@ public:
     void setCustomTextEncodingName(const String&);
     String customTextEncodingName() const { return m_customTextEncodingName; }
 
-    void setMainFrameName(const String&);
-
     double estimatedProgress() const;
 
     void terminateProcess();
@@ -663,7 +661,6 @@ private:
     String m_applicationNameForUserAgent;
     String m_customUserAgent;
     String m_customTextEncodingName;
-    String m_mainFrameName;
 
 #if ENABLE(INSPECTOR)
     RefPtr<WebInspectorProxy> m_inspector;
index dad54b440b46703e8a11cff614231cd84a1340e4..574634f0c9663269c1a9529d3c0e70990c56ca4d 100644 (file)
@@ -80,13 +80,13 @@ static uint64_t generateListenerID()
     return uniqueListenerID++;
 }
 
-PassRefPtr<WebFrame> WebFrame::createMainFrame(WebPage* page, const String& frameName)
+PassRefPtr<WebFrame> WebFrame::createMainFrame(WebPage* page)
 {
     RefPtr<WebFrame> frame = create();
 
     page->send(Messages::WebPageProxy::DidCreateMainFrame(frame->frameID()));
 
-    frame->init(page, frameName, 0);
+    frame->init(page, String(), 0);
 
     return frame.release();
 }
index 6699318ad5b8c594958c8e235b0210535fd840bc..3c63cf3ad8dc2203de44550963a7db1bf1a72d2d 100644 (file)
@@ -54,7 +54,7 @@ class WebFrame : public APIObject {
 public:
     static const Type APIType = TypeBundleFrame;
 
-    static PassRefPtr<WebFrame> createMainFrame(WebPage*, const String& frameName);
+    static PassRefPtr<WebFrame> createMainFrame(WebPage*);
     static PassRefPtr<WebFrame> createSubframe(WebPage*, const String& frameName, WebCore::HTMLFrameOwnerElement*);
     ~WebFrame();
 
index da77b0b4998c65ac6fadf3a9edb66fa06e989088..a0a67967aa331c258692ed7b1fcdd39831a207ec 100644 (file)
@@ -196,7 +196,7 @@ WebPage::WebPage(uint64_t pageID, const WebPageCreationParameters& parameters)
     Settings::setDefaultMinDOMTimerInterval(0.004);
 
     m_drawingArea = DrawingArea::create(this, parameters);
-    m_mainFrame = WebFrame::createMainFrame(this, parameters.mainFrameName);
+    m_mainFrame = WebFrame::createMainFrame(this);
 
     setDrawsBackground(parameters.drawsBackground);
     setDrawsTransparentBackground(parameters.drawsTransparentBackground);