Move progress tracking functions from FrameLoaderClient to a new ProgressTrackerClient
https://bugs.webkit.org/show_bug.cgi?id=126801
Reviewed by Sam Weinig.
Source/WebCore:
* GNUmakefile.list.am:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* loader/EmptyClients.cpp:
(WebCore::fillWithEmptyClients):
* loader/EmptyClients.h:
* loader/FrameLoaderClient.h:
* loader/ProgressTracker.cpp:
(WebCore::ProgressTracker::ProgressTracker):
(WebCore::ProgressTracker::~ProgressTracker):
(WebCore::ProgressTracker::progressStarted):
(WebCore::ProgressTracker::progressCompleted):
(WebCore::ProgressTracker::finalProgressComplete):
(WebCore::ProgressTracker::incrementProgress):
* loader/ProgressTracker.h:
* loader/ProgressTrackerClient.h: Added.
(WebCore::ProgressTrackerClient::~ProgressTrackerClient):
(WebCore::ProgressTrackerClient::progressTrackerDestroyed):
(WebCore::ProgressTrackerClient::willChangeEstimatedProgress):
(WebCore::ProgressTrackerClient::didChangeEstimatedProgress):
* page/Page.cpp:
(WebCore::Page::Page):
(WebCore::Page::PageClients::PageClients):
* page/Page.h:
Source/WebKit/efl:
* WebCoreSupport/FrameLoaderClientEfl.h:
* ewk/ewk_view.cpp:
(_ewk_view_priv_new):
Source/WebKit/gtk:
* WebCoreSupport/FrameLoaderClientGtk.h:
* webkit/webkitwebview.cpp:
(webkit_web_view_init):
Source/WebKit/mac:
* WebCoreSupport/WebFrameLoaderClient.h:
* WebView/WebView.mm:
(-[WebView _commonInitializationWithFrameName:groupName:]):
Source/WebKit/win:
* WebCoreSupport/WebFrameLoaderClient.h:
* WebView.cpp:
(WebView::initWithFrame):
Source/WebKit2:
* WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@161744 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog
index a0a187c..ab5682b 100644
--- a/Source/WebCore/ChangeLog
+++ b/Source/WebCore/ChangeLog
@@ -1,3 +1,36 @@
+2014-01-10 Anders Carlsson <andersca@apple.com>
+
+ Move progress tracking functions from FrameLoaderClient to a new ProgressTrackerClient
+ https://bugs.webkit.org/show_bug.cgi?id=126801
+
+ Reviewed by Sam Weinig.
+
+ * GNUmakefile.list.am:
+ * WebCore.vcxproj/WebCore.vcxproj:
+ * WebCore.vcxproj/WebCore.vcxproj.filters:
+ * WebCore.xcodeproj/project.pbxproj:
+ * loader/EmptyClients.cpp:
+ (WebCore::fillWithEmptyClients):
+ * loader/EmptyClients.h:
+ * loader/FrameLoaderClient.h:
+ * loader/ProgressTracker.cpp:
+ (WebCore::ProgressTracker::ProgressTracker):
+ (WebCore::ProgressTracker::~ProgressTracker):
+ (WebCore::ProgressTracker::progressStarted):
+ (WebCore::ProgressTracker::progressCompleted):
+ (WebCore::ProgressTracker::finalProgressComplete):
+ (WebCore::ProgressTracker::incrementProgress):
+ * loader/ProgressTracker.h:
+ * loader/ProgressTrackerClient.h: Added.
+ (WebCore::ProgressTrackerClient::~ProgressTrackerClient):
+ (WebCore::ProgressTrackerClient::progressTrackerDestroyed):
+ (WebCore::ProgressTrackerClient::willChangeEstimatedProgress):
+ (WebCore::ProgressTrackerClient::didChangeEstimatedProgress):
+ * page/Page.cpp:
+ (WebCore::Page::Page):
+ (WebCore::Page::PageClients::PageClients):
+ * page/Page.h:
+
2014-01-10 Joseph Pecoraro <pecoraro@apple.com>
Fix RenderObject.o for iOS. Unreviewed build fix.
diff --git a/Source/WebCore/GNUmakefile.list.am b/Source/WebCore/GNUmakefile.list.am
index cdec401..7153a3b 100644
--- a/Source/WebCore/GNUmakefile.list.am
+++ b/Source/WebCore/GNUmakefile.list.am
@@ -4027,6 +4027,7 @@
Source/WebCore/loader/PolicyChecker.h \
Source/WebCore/loader/ProgressTracker.cpp \
Source/WebCore/loader/ProgressTracker.h \
+ Source/WebCore/loader/ProgressTrackerClient.h \
Source/WebCore/loader/NavigationScheduler.cpp \
Source/WebCore/loader/NavigationScheduler.h \
Source/WebCore/loader/ResourceBuffer.cpp \
diff --git a/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj b/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj
index 7859627..d06f153 100644
--- a/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj
+++ b/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj
@@ -18959,6 +18959,7 @@
<ClInclude Include="..\loader\PolicyCallback.h" />
<ClInclude Include="..\loader\PolicyChecker.h" />
<ClInclude Include="..\loader\ProgressTracker.h" />
+ <ClInclude Include="..\loader\ProgressTrackerClient.h" />
<ClInclude Include="..\loader\ResourceBuffer.h" />
<ClInclude Include="..\loader\ResourceLoader.h" />
<ClInclude Include="..\loader\ResourceLoaderOptions.h" />
diff --git a/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters b/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters
index 6283464..f71ca41 100644
--- a/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters
+++ b/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters
@@ -7838,6 +7838,9 @@
<ClInclude Include="..\loader\ProgressTracker.h">
<Filter>loader</Filter>
</ClInclude>
+ <ClInclude Include="..\loader\ProgressTrackerClient.h">
+ <Filter>loader</Filter>
+ </ClInclude>
<ClInclude Include="..\loader\ResourceBuffer.h">
<Filter>loader</Filter>
</ClInclude>
diff --git a/Source/WebCore/WebCore.xcodeproj/project.pbxproj b/Source/WebCore/WebCore.xcodeproj/project.pbxproj
index 04ba9bf..faa8680 100644
--- a/Source/WebCore/WebCore.xcodeproj/project.pbxproj
+++ b/Source/WebCore/WebCore.xcodeproj/project.pbxproj
@@ -783,6 +783,7 @@
1AC2260D0DB69F190089B669 /* JSDOMApplicationCache.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AC2260B0DB69F190089B669 /* JSDOMApplicationCache.h */; };
1AC2D845171734A100652FC0 /* Storage.h in Headers */ = {isa = PBXBuildFile; fileRef = 51E3F9C40DA059DC00250911 /* Storage.h */; settings = {ATTRIBUTES = (Private, ); }; };
1AC69593161A1E53003732CB /* GraphicsLayerFactory.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AC69592161A1E53003732CB /* GraphicsLayerFactory.h */; settings = {ATTRIBUTES = (Private, ); }; };
+ 1ACADD791880D91C00D8B71D /* ProgressTrackerClient.h in Headers */ = {isa = PBXBuildFile; fileRef = 1ACADD781880D91C00D8B71D /* ProgressTrackerClient.h */; settings = {ATTRIBUTES = (Private, ); }; };
1ACD1B630B029739007E5016 /* DOMCSSStyleDeclarationInternal.h in Copy Generated Headers */ = {isa = PBXBuildFile; fileRef = 85E711440AC5D5340053270F /* DOMCSSStyleDeclarationInternal.h */; };
1ACE53DF0A8D18810022947D /* JSDOMParser.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1ACE53DD0A8D18810022947D /* JSDOMParser.cpp */; };
1ACE53E00A8D18810022947D /* JSDOMParser.h in Headers */ = {isa = PBXBuildFile; fileRef = 1ACE53DE0A8D18810022947D /* JSDOMParser.h */; };
@@ -7582,6 +7583,7 @@
1AC2260A0DB69F190089B669 /* JSDOMApplicationCache.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSDOMApplicationCache.cpp; sourceTree = "<group>"; };
1AC2260B0DB69F190089B669 /* JSDOMApplicationCache.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSDOMApplicationCache.h; sourceTree = "<group>"; };
1AC69592161A1E53003732CB /* GraphicsLayerFactory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GraphicsLayerFactory.h; sourceTree = "<group>"; };
+ 1ACADD781880D91C00D8B71D /* ProgressTrackerClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ProgressTrackerClient.h; sourceTree = "<group>"; };
1ACE53DD0A8D18810022947D /* JSDOMParser.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = JSDOMParser.cpp; sourceTree = "<group>"; };
1ACE53DE0A8D18810022947D /* JSDOMParser.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = JSDOMParser.h; sourceTree = "<group>"; };
1ACE53E10A8D18E70022947D /* DOMParser.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = DOMParser.cpp; sourceTree = "<group>"; };
@@ -20656,6 +20658,7 @@
97059976107D975200A50A7C /* PolicyChecker.h */,
1A2A68210B5BEDE70002A480 /* ProgressTracker.cpp */,
1A2A68220B5BEDE70002A480 /* ProgressTracker.h */,
+ 1ACADD781880D91C00D8B71D /* ProgressTrackerClient.h */,
514BC840161CF05C004D52F4 /* ResourceBuffer.cpp */,
514BC841161CF05C004D52F4 /* ResourceBuffer.h */,
93E227DE0AF589AD00D48324 /* ResourceLoader.cpp */,
@@ -24651,6 +24654,7 @@
E18256900EF2B02D00933242 /* JSWorkerGlobalScope.h in Headers */,
E1C36D350EB0A094007410BC /* JSWorkerGlobalScopeBase.h in Headers */,
E1C362EF0EAF2AA9007410BC /* JSWorkerLocation.h in Headers */,
+ 1ACADD791880D91C00D8B71D /* ProgressTrackerClient.h in Headers */,
E1271A580EEECDE400F61213 /* JSWorkerNavigator.h in Headers */,
BC348BD40DB7F804004ABAB9 /* JSXMLHttpRequest.h in Headers */,
BC60DA3A0D2A302800B9918F /* JSXMLHttpRequestException.h in Headers */,
diff --git a/Source/WebCore/loader/EmptyClients.cpp b/Source/WebCore/loader/EmptyClients.cpp
index b638d1c..faf4ce8 100644
--- a/Source/WebCore/loader/EmptyClients.cpp
+++ b/Source/WebCore/loader/EmptyClients.cpp
@@ -66,6 +66,9 @@
static NeverDestroyed<EmptyFrameLoaderClient> dummyFrameLoaderClient;
pageClients.loaderClientForMainFrame = &dummyFrameLoaderClient.get();
+
+ static NeverDestroyed<EmptyProgressTrackerClient> dummyProgressTrackerClient;
+ pageClients.progressTrackerClient = &dummyProgressTrackerClient.get();
}
class EmptyPopupMenu : public PopupMenu {
diff --git a/Source/WebCore/loader/EmptyClients.h b/Source/WebCore/loader/EmptyClients.h
index a274f6a..07653ba 100644
--- a/Source/WebCore/loader/EmptyClients.h
+++ b/Source/WebCore/loader/EmptyClients.h
@@ -41,6 +41,7 @@
#include "FrameLoaderClient.h"
#include "InspectorClient.h"
#include "Page.h"
+#include "ProgressTrackerClient.h"
#include "ResourceError.h"
#include <wtf/text/StringView.h>
@@ -316,12 +317,6 @@
virtual void revertToProvisionalState(DocumentLoader*) OVERRIDE { }
virtual void setMainDocumentError(DocumentLoader*, const ResourceError&) OVERRIDE { }
- virtual void willChangeEstimatedProgress() OVERRIDE { }
- virtual void didChangeEstimatedProgress() OVERRIDE { }
- virtual void postProgressStartedNotification() OVERRIDE { }
- virtual void postProgressEstimateChangedNotification() OVERRIDE { }
- virtual void postProgressFinishedNotification() OVERRIDE { }
-
virtual void setMainFrameDocumentReady(bool) OVERRIDE { }
virtual void startDownload(const ResourceRequest&, const String& suggestedName = String()) OVERRIDE { UNUSED_PARAM(suggestedName); }
@@ -638,6 +633,14 @@
virtual void deviceOrientationControllerDestroyed() OVERRIDE { }
};
+class EmptyProgressTrackerClient : public ProgressTrackerClient {
+ virtual void willChangeEstimatedProgress() OVERRIDE { }
+ virtual void didChangeEstimatedProgress() OVERRIDE { }
+ virtual void postProgressStartedNotification() OVERRIDE { }
+ virtual void postProgressEstimateChangedNotification() OVERRIDE { }
+ virtual void postProgressFinishedNotification() OVERRIDE { }
+};
+
void fillWithEmptyClients(Page::PageClients&);
}
diff --git a/Source/WebCore/loader/FrameLoaderClient.h b/Source/WebCore/loader/FrameLoaderClient.h
index fcbbcb7..8da6b43 100644
--- a/Source/WebCore/loader/FrameLoaderClient.h
+++ b/Source/WebCore/loader/FrameLoaderClient.h
@@ -187,13 +187,6 @@
virtual void revertToProvisionalState(DocumentLoader*) = 0;
virtual void setMainDocumentError(DocumentLoader*, const ResourceError&) = 0;
- // Maybe these should go into a ProgressTrackerClient some day
- virtual void willChangeEstimatedProgress() { }
- virtual void didChangeEstimatedProgress() { }
- virtual void postProgressStartedNotification() = 0;
- virtual void postProgressEstimateChangedNotification() = 0;
- virtual void postProgressFinishedNotification() = 0;
-
virtual void setMainFrameDocumentReady(bool) = 0;
virtual void startDownload(const ResourceRequest&, const String& suggestedName = String()) = 0;
diff --git a/Source/WebCore/loader/ProgressTracker.cpp b/Source/WebCore/loader/ProgressTracker.cpp
index fba0c12..c9443a7 100644
--- a/Source/WebCore/loader/ProgressTracker.cpp
+++ b/Source/WebCore/loader/ProgressTracker.cpp
@@ -33,6 +33,7 @@
#include "FrameLoaderClient.h"
#include "InspectorInstrumentation.h"
#include "Logging.h"
+#include "ProgressTrackerClient.h"
#include "ResourceResponse.h"
#include <wtf/text/CString.h>
#include <wtf/CurrentTime.h>
@@ -69,8 +70,9 @@
unsigned long ProgressTracker::s_uniqueIdentifier = 0;
-ProgressTracker::ProgressTracker()
- : m_totalPageAndResourceBytesToLoad(0)
+ProgressTracker::ProgressTracker(ProgressTrackerClient& client)
+ : m_client(client)
+ , m_totalPageAndResourceBytesToLoad(0)
, m_totalBytesReceived(0)
, m_lastNotifiedProgressValue(0)
, m_lastNotifiedProgressTime(0)
@@ -87,6 +89,7 @@
ProgressTracker::~ProgressTracker()
{
+ m_client.progressTrackerDestroyed();
}
double ProgressTracker::estimatedProgress() const
@@ -116,7 +119,7 @@
{
LOG(Progress, "Progress started (%p) - frame %p(\"%s\"), value %f, tracked frames %d, originating frame %p", this, &frame, frame.tree().uniqueName().string().utf8().data(), m_progressValue, m_numProgressTrackedFrames, m_originatingProgressFrame.get());
- frame.loader().client().willChangeEstimatedProgress();
+ m_client.willChangeEstimatedProgress();
if (!m_numProgressTrackedFrames || m_originatingProgressFrame == &frame) {
reset();
@@ -126,11 +129,11 @@
m_progressHeartbeatTimer.startRepeating(progressHeartbeatInterval);
m_originatingProgressFrame->loader().loadProgressingStatusChanged();
- m_originatingProgressFrame->loader().client().postProgressStartedNotification();
+ m_client.postProgressStartedNotification();
}
m_numProgressTrackedFrames++;
- frame.loader().client().didChangeEstimatedProgress();
+ m_client.didChangeEstimatedProgress();
InspectorInstrumentation::frameStartedLoading(frame);
}
@@ -141,13 +144,13 @@
if (m_numProgressTrackedFrames <= 0)
return;
- frame.loader().client().willChangeEstimatedProgress();
+ m_client.willChangeEstimatedProgress();
m_numProgressTrackedFrames--;
if (!m_numProgressTrackedFrames || m_originatingProgressFrame == &frame)
finalProgressComplete();
- frame.loader().client().didChangeEstimatedProgress();
+ m_client.didChangeEstimatedProgress();
}
void ProgressTracker::finalProgressComplete()
@@ -160,13 +163,13 @@
// with final progress value.
if (!m_finalProgressChangedSent) {
m_progressValue = 1;
- frame->loader().client().postProgressEstimateChangedNotification();
+ m_client.postProgressEstimateChangedNotification();
}
reset();
frame->loader().client().setMainFrameDocumentReady(true);
- frame->loader().client().postProgressFinishedNotification();
+ m_client.postProgressFinishedNotification();
frame->loader().loadProgressingStatusChanged();
InspectorInstrumentation::frameStoppedLoading(*frame);
@@ -205,7 +208,7 @@
RefPtr<Frame> frame = m_originatingProgressFrame;
- frame->loader().client().willChangeEstimatedProgress();
+ m_client.willChangeEstimatedProgress();
double increment, percentOfRemainingBytes;
long long remainingBytes, estimatedBytesForPendingRequests;
@@ -248,14 +251,14 @@
if (m_progressValue == 1)
m_finalProgressChangedSent = true;
- frame->loader().client().postProgressEstimateChangedNotification();
+ m_client.postProgressEstimateChangedNotification();
m_lastNotifiedProgressValue = m_progressValue;
m_lastNotifiedProgressTime = now;
}
}
- frame->loader().client().didChangeEstimatedProgress();
+ m_client.didChangeEstimatedProgress();
}
void ProgressTracker::completeProgress(unsigned long identifier)
diff --git a/Source/WebCore/loader/ProgressTracker.h b/Source/WebCore/loader/ProgressTracker.h
index e017aa8..24e9377 100644
--- a/Source/WebCore/loader/ProgressTracker.h
+++ b/Source/WebCore/loader/ProgressTracker.h
@@ -37,12 +37,13 @@
class Frame;
class ResourceResponse;
+class ProgressTrackerClient;
struct ProgressItem;
class ProgressTracker {
WTF_MAKE_NONCOPYABLE(ProgressTracker); WTF_MAKE_FAST_ALLOCATED;
public:
- ProgressTracker();
+ explicit ProgressTracker(ProgressTrackerClient&);
~ProgressTracker();
static unsigned long createUniqueIdentifier();
@@ -69,6 +70,7 @@
static unsigned long s_uniqueIdentifier;
+ ProgressTrackerClient& m_client;
long long m_totalPageAndResourceBytesToLoad;
long long m_totalBytesReceived;
double m_lastNotifiedProgressValue;
diff --git a/Source/WebCore/loader/ProgressTrackerClient.h b/Source/WebCore/loader/ProgressTrackerClient.h
new file mode 100644
index 0000000..3790498
--- /dev/null
+++ b/Source/WebCore/loader/ProgressTrackerClient.h
@@ -0,0 +1,47 @@
+/*
+ * Copyright (C) 2014 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef ProgressTrackerClient_h
+#define ProgressTrackerClient_h
+
+namespace WebCore {
+
+class ProgressTrackerClient {
+protected:
+ virtual ~ProgressTrackerClient() { }
+
+public:
+ virtual void progressTrackerDestroyed() { }
+
+ virtual void willChangeEstimatedProgress() { }
+ virtual void didChangeEstimatedProgress() { }
+ virtual void postProgressStartedNotification() = 0;
+ virtual void postProgressEstimateChangedNotification() = 0;
+ virtual void postProgressFinishedNotification() = 0;
+};
+
+} // namespace WebCore
+
+#endif // ProgressTrackerClient_h
diff --git a/Source/WebCore/page/Page.cpp b/Source/WebCore/page/Page.cpp
index 7edf34a..c3ec273 100644
--- a/Source/WebCore/page/Page.cpp
+++ b/Source/WebCore/page/Page.cpp
@@ -142,7 +142,7 @@
, m_pointerLockController(PointerLockController::create(this))
#endif
, m_settings(Settings::create(this))
- , m_progress(std::make_unique<ProgressTracker>())
+ , m_progress(std::make_unique<ProgressTracker>(*pageClients.progressTrackerClient))
, m_backForwardController(std::make_unique<BackForwardController>(*this, pageClients.backForwardClient))
, m_mainFrame(MainFrame::create(*this, *pageClients.loaderClientForMainFrame))
, m_theme(RenderTheme::themeForPage(this))
@@ -1601,17 +1601,18 @@
}
Page::PageClients::PageClients()
- : alternativeTextClient(0)
- , chromeClient(0)
+ : alternativeTextClient(nullptr)
+ , chromeClient(nullptr)
#if ENABLE(CONTEXT_MENUS)
- , contextMenuClient(0)
+ , contextMenuClient(nullptr)
#endif
- , editorClient(0)
- , dragClient(0)
- , inspectorClient(0)
- , plugInClient(0)
- , validationMessageClient(0)
- , loaderClientForMainFrame(0)
+ , editorClient(nullptr)
+ , dragClient(nullptr)
+ , inspectorClient(nullptr)
+ , plugInClient(nullptr)
+ , progressTrackerClient(nullptr)
+ , validationMessageClient(nullptr)
+ , loaderClientForMainFrame(nullptr)
{
}
diff --git a/Source/WebCore/page/Page.h b/Source/WebCore/page/Page.h
index 801badf..c39c2f7 100644
--- a/Source/WebCore/page/Page.h
+++ b/Source/WebCore/page/Page.h
@@ -93,6 +93,7 @@
class PluginViewBase;
class PointerLockController;
class ProgressTracker;
+class ProgressTrackerClient;
class Range;
class RenderObject;
class RenderTheme;
@@ -134,6 +135,7 @@
DragClient* dragClient;
InspectorClient* inspectorClient;
PlugInClient* plugInClient;
+ ProgressTrackerClient* progressTrackerClient;
RefPtr<BackForwardClient> backForwardClient;
ValidationMessageClient* validationMessageClient;
FrameLoaderClient* loaderClientForMainFrame;
diff --git a/Source/WebKit/efl/ChangeLog b/Source/WebKit/efl/ChangeLog
index e9bdbd0..8d9647f 100644
--- a/Source/WebKit/efl/ChangeLog
+++ b/Source/WebKit/efl/ChangeLog
@@ -1,3 +1,14 @@
+2014-01-10 Anders Carlsson <andersca@apple.com>
+
+ Move progress tracking functions from FrameLoaderClient to a new ProgressTrackerClient
+ https://bugs.webkit.org/show_bug.cgi?id=126801
+
+ Reviewed by Sam Weinig.
+
+ * WebCoreSupport/FrameLoaderClientEfl.h:
+ * ewk/ewk_view.cpp:
+ (_ewk_view_priv_new):
+
2014-01-08 Ryuan Choi <ryuan.choi@samsung.com>
[EFL] Merge ewk_view_single into ewk_view
diff --git a/Source/WebKit/efl/WebCoreSupport/FrameLoaderClientEfl.h b/Source/WebKit/efl/WebCoreSupport/FrameLoaderClientEfl.h
index 8686ee9..9b7bac7 100644
--- a/Source/WebKit/efl/WebCoreSupport/FrameLoaderClientEfl.h
+++ b/Source/WebKit/efl/WebCoreSupport/FrameLoaderClientEfl.h
@@ -36,6 +36,7 @@
#include "EWebKit.h"
#include "FrameLoaderClient.h"
#include "PluginView.h"
+#include "ProgressTrackerClient.h"
#include "ResourceError.h"
#include "ResourceResponse.h"
@@ -43,7 +44,7 @@
class FormState;
-class FrameLoaderClientEfl : public FrameLoaderClient {
+class FrameLoaderClientEfl : public FrameLoaderClient, public ProgressTrackerClient {
public:
explicit FrameLoaderClientEfl(Evas_Object *view);
virtual ~FrameLoaderClientEfl() { }
diff --git a/Source/WebKit/efl/ewk/ewk_view.cpp b/Source/WebKit/efl/ewk/ewk_view.cpp
index 3cf0eec..47f19ab 100644
--- a/Source/WebKit/efl/ewk/ewk_view.cpp
+++ b/Source/WebKit/efl/ewk/ewk_view.cpp
@@ -683,6 +683,7 @@
pageClients.inspectorClient = new WebCore::InspectorClientEfl(smartData->self);
#endif
pageClients.loaderClientForMainFrame = new WebCore::FrameLoaderClientEfl(smartData->self);
+ pageClients.progressTrackerClient = static_cast<WebCore::FrameLoaderClientEfl*>(pageClients.loaderClientForMainFrame);
priv->page = adoptPtr(new WebCore::Page(pageClients));
#if ENABLE(DEVICE_ORIENTATION)
diff --git a/Source/WebKit/gtk/ChangeLog b/Source/WebKit/gtk/ChangeLog
index ceece1f..37115aa 100644
--- a/Source/WebKit/gtk/ChangeLog
+++ b/Source/WebKit/gtk/ChangeLog
@@ -1,3 +1,14 @@
+2014-01-10 Anders Carlsson <andersca@apple.com>
+
+ Move progress tracking functions from FrameLoaderClient to a new ProgressTrackerClient
+ https://bugs.webkit.org/show_bug.cgi?id=126801
+
+ Reviewed by Sam Weinig.
+
+ * WebCoreSupport/FrameLoaderClientGtk.h:
+ * webkit/webkitwebview.cpp:
+ (webkit_web_view_init):
+
2014-01-08 Claudio Saavedra <csaavedra@igalia.com>
[GTK] Add xdg.origin.url extended attribute to downloads
diff --git a/Source/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.h b/Source/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.h
index db4b615..2402b9b 100644
--- a/Source/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.h
+++ b/Source/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.h
@@ -31,6 +31,7 @@
#define FrameLoaderClientGtk_h
#include "FrameLoaderClient.h"
+#include "ProgressTrackerClient.h"
#include "ResourceResponse.h"
#include "webkitwebpolicydecision.h"
@@ -42,7 +43,7 @@
namespace WebKit {
- class FrameLoaderClient : public WebCore::FrameLoaderClient {
+ class FrameLoaderClient : public WebCore::FrameLoaderClient, public WebCore::ProgressTrackerClient {
public:
FrameLoaderClient(WebKitWebFrame* = 0);
virtual ~FrameLoaderClient();
diff --git a/Source/WebKit/gtk/webkit/webkitwebview.cpp b/Source/WebKit/gtk/webkit/webkitwebview.cpp
index cc3a3d6..45c531c 100644
--- a/Source/WebKit/gtk/webkit/webkitwebview.cpp
+++ b/Source/WebKit/gtk/webkit/webkitwebview.cpp
@@ -3810,6 +3810,7 @@
#endif
pageClients.inspectorClient = new WebKit::InspectorClient(webView);
pageClients.loaderClientForMainFrame = new WebKit::FrameLoaderClient;
+ pageClients.progressTrackerClient = static_cast<WebKit::FrameLoaderClient*>(pageClients.loaderClientForMainFrame);
priv->corePage = new Page(pageClients);
diff --git a/Source/WebKit/mac/ChangeLog b/Source/WebKit/mac/ChangeLog
index df3e494..79be1bd 100644
--- a/Source/WebKit/mac/ChangeLog
+++ b/Source/WebKit/mac/ChangeLog
@@ -1,3 +1,14 @@
+2014-01-10 Anders Carlsson <andersca@apple.com>
+
+ Move progress tracking functions from FrameLoaderClient to a new ProgressTrackerClient
+ https://bugs.webkit.org/show_bug.cgi?id=126801
+
+ Reviewed by Sam Weinig.
+
+ * WebCoreSupport/WebFrameLoaderClient.h:
+ * WebView/WebView.mm:
+ (-[WebView _commonInitializationWithFrameName:groupName:]):
+
2014-01-10 David Kilzer <ddkilzer@apple.com>
Clean up architectures in xcconfig files
diff --git a/Source/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.h b/Source/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.h
index 8af7c87..4826cb6 100644
--- a/Source/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.h
+++ b/Source/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.h
@@ -27,6 +27,7 @@
*/
#import <WebCore/FrameLoaderClient.h>
+#import <WebCore/ProgressTrackerClient.h>
#import <WebCore/Timer.h>
#import <wtf/Forward.h>
#import <wtf/HashMap.h>
@@ -49,7 +50,7 @@
typedef HashMap<RefPtr<WebCore::ResourceLoader>, RetainPtr<WebResource>> ResourceMap;
-class WebFrameLoaderClient : public WebCore::FrameLoaderClient {
+class WebFrameLoaderClient : public WebCore::FrameLoaderClient, public WebCore::ProgressTrackerClient {
public:
WebFrameLoaderClient(WebFrame* = 0);
diff --git a/Source/WebKit/mac/WebView/WebView.mm b/Source/WebKit/mac/WebView/WebView.mm
index 0488900..562d63c 100644
--- a/Source/WebKit/mac/WebView/WebView.mm
+++ b/Source/WebKit/mac/WebView/WebView.mm
@@ -979,6 +979,7 @@
pageClients.editorClient = new WebEditorClient(self);
pageClients.alternativeTextClient = new WebAlternativeTextClient(self);
pageClients.loaderClientForMainFrame = new WebFrameLoaderClient;
+ pageClients.progressTrackerClient = static_cast<WebFrameLoaderClient*>(pageClients.loaderClientForMainFrame);
_private->page = new Page(pageClients);
#if ENABLE(GEOLOCATION)
WebCore::provideGeolocationTo(_private->page, new WebGeolocationClient(self));
diff --git a/Source/WebKit/win/ChangeLog b/Source/WebKit/win/ChangeLog
index 8eebd47..d5e9066 100644
--- a/Source/WebKit/win/ChangeLog
+++ b/Source/WebKit/win/ChangeLog
@@ -1,3 +1,14 @@
+2014-01-10 Anders Carlsson <andersca@apple.com>
+
+ Move progress tracking functions from FrameLoaderClient to a new ProgressTrackerClient
+ https://bugs.webkit.org/show_bug.cgi?id=126801
+
+ Reviewed by Sam Weinig.
+
+ * WebCoreSupport/WebFrameLoaderClient.h:
+ * WebView.cpp:
+ (WebView::initWithFrame):
+
2014-01-08 peavo@outlook.com <peavo@outlook.com>
[WinCairo] Compile error.
diff --git a/Source/WebKit/win/WebCoreSupport/WebFrameLoaderClient.h b/Source/WebKit/win/WebCoreSupport/WebFrameLoaderClient.h
index 2c65a01..702e77d 100644
--- a/Source/WebKit/win/WebCoreSupport/WebFrameLoaderClient.h
+++ b/Source/WebKit/win/WebCoreSupport/WebFrameLoaderClient.h
@@ -31,6 +31,7 @@
#include <WebCore/COMPtr.h>
#include <WebCore/FrameLoaderClient.h>
+#include <WebCore/ProgressTrackerClient.h>
namespace WebCore {
class PluginManualLoader;
@@ -41,7 +42,7 @@
class WebFramePolicyListener;
class WebHistory;
-class WebFrameLoaderClient : public WebCore::FrameLoaderClient {
+class WebFrameLoaderClient : public WebCore::FrameLoaderClient, public WebCore::ProgressTrackerClient {
public:
WebFrameLoaderClient(WebFrame* = 0);
~WebFrameLoaderClient();
diff --git a/Source/WebKit/win/WebView.cpp b/Source/WebKit/win/WebView.cpp
index aa7a964..0a9d427 100644
--- a/Source/WebKit/win/WebView.cpp
+++ b/Source/WebKit/win/WebView.cpp
@@ -2772,6 +2772,7 @@
pageClients.inspectorClient = m_inspectorClient;
#endif // ENABLE(INSPECTOR)
pageClients.loaderClientForMainFrame = new WebFrameLoaderClient;
+ pageClients.progressTrackerClient = static_cast<WebFrameLoaderClient*>(pageClients.loaderClientForMainFrame);
m_page = new Page(pageClients);
provideGeolocationTo(m_page, new WebGeolocationClient(this));
diff --git a/Source/WebKit2/ChangeLog b/Source/WebKit2/ChangeLog
index 40356ef..79678fc 100644
--- a/Source/WebKit2/ChangeLog
+++ b/Source/WebKit2/ChangeLog
@@ -1,5 +1,16 @@
2014-01-10 Anders Carlsson <andersca@apple.com>
+ Move progress tracking functions from FrameLoaderClient to a new ProgressTrackerClient
+ https://bugs.webkit.org/show_bug.cgi?id=126801
+
+ Reviewed by Sam Weinig.
+
+ * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
+ * WebProcess/WebPage/WebPage.cpp:
+ (WebKit::WebPage::WebPage):
+
+2014-01-10 Anders Carlsson <andersca@apple.com>
+
Remove dead code
https://bugs.webkit.org/show_bug.cgi?id=126782
diff --git a/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.h b/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.h
index 569b730..a2c8bcb 100644
--- a/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.h
+++ b/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.h
@@ -27,13 +27,14 @@
#define WebFrameLoaderClient_h
#include <WebCore/FrameLoaderClient.h>
+#include <WebCore/ProgressTrackerClient.h>
namespace WebKit {
class PluginView;
class WebFrame;
-class WebFrameLoaderClient : public WebCore::FrameLoaderClient {
+class WebFrameLoaderClient : public WebCore::FrameLoaderClient, public WebCore::ProgressTrackerClient {
public:
WebFrameLoaderClient();
~WebFrameLoaderClient();
diff --git a/Source/WebKit2/WebProcess/WebPage/WebPage.cpp b/Source/WebKit2/WebProcess/WebPage/WebPage.cpp
index 5646ac2..ab7d12e 100644
--- a/Source/WebKit2/WebProcess/WebPage/WebPage.cpp
+++ b/Source/WebKit2/WebProcess/WebPage/WebPage.cpp
@@ -309,6 +309,7 @@
#endif
pageClients.plugInClient = new WebPlugInClient(this);
pageClients.loaderClientForMainFrame = new WebFrameLoaderClient;
+ pageClients.progressTrackerClient = static_cast<WebFrameLoaderClient*>(pageClients.loaderClientForMainFrame);
m_page = adoptPtr(new Page(pageClients));