Diff
Modified: trunk/Source/WebCore/ChangeLog (154264 => 154265)
--- trunk/Source/WebCore/ChangeLog 2013-08-19 06:40:25 UTC (rev 154264)
+++ trunk/Source/WebCore/ChangeLog 2013-08-19 08:24:08 UTC (rev 154265)
@@ -1,3 +1,11 @@
+2013-08-19 Andreas Kling <[email protected]>
+
+ <https://webkit.org/b/119997> Page::progress() should return a reference.
+
+ Reviewed by Antti Koivisto.
+
+ Page::m_progress is never null.
+
2013-08-18 Darin Adler <[email protected]>
<https://webkit.org/b/119989> Make use of Node::ownerDocument a compile time error
Modified: trunk/Source/WebCore/Modules/websockets/WebSocketChannel.cpp (154264 => 154265)
--- trunk/Source/WebCore/Modules/websockets/WebSocketChannel.cpp 2013-08-19 06:40:25 UTC (rev 154264)
+++ trunk/Source/WebCore/Modules/websockets/WebSocketChannel.cpp 2013-08-19 08:24:08 UTC (rev 154265)
@@ -92,7 +92,7 @@
#endif
{
if (Page* page = m_document->page())
- m_identifier = page->progress()->createUniqueIdentifier();
+ m_identifier = page->progress().createUniqueIdentifier();
}
WebSocketChannel::~WebSocketChannel()
Modified: trunk/Source/WebCore/accessibility/AccessibilityRenderObject.cpp (154264 => 154265)
--- trunk/Source/WebCore/accessibility/AccessibilityRenderObject.cpp 2013-08-19 06:40:25 UTC (rev 154264)
+++ trunk/Source/WebCore/accessibility/AccessibilityRenderObject.cpp 2013-08-19 08:24:08 UTC (rev 154265)
@@ -1338,7 +1338,7 @@
if (!page)
return 0;
- return page->progress()->estimatedProgress();
+ return page->progress().estimatedProgress();
}
int AccessibilityRenderObject::layoutCount() const
Modified: trunk/Source/WebCore/inspector/InspectorResourceAgent.cpp (154264 => 154265)
--- trunk/Source/WebCore/inspector/InspectorResourceAgent.cpp 2013-08-19 06:40:25 UTC (rev 154264)
+++ trunk/Source/WebCore/inspector/InspectorResourceAgent.cpp 2013-08-19 08:24:08 UTC (rev 154265)
@@ -336,7 +336,7 @@
{
String loaderId = m_pageAgent->loaderId(loader);
String frameId = m_pageAgent->frameId(loader->frame());
- unsigned long identifier = loader->frame()->page()->progress()->createUniqueIdentifier();
+ unsigned long identifier = loader->frame()->page()->progress().createUniqueIdentifier();
String requestId = IdentifiersFactory::requestId(identifier);
m_resourcesData->resourceCreated(requestId, loaderId);
m_resourcesData->addCachedResource(requestId, resource);
Modified: trunk/Source/WebCore/loader/DocumentLoader.cpp (154264 => 154265)
--- trunk/Source/WebCore/loader/DocumentLoader.cpp 2013-08-19 06:40:25 UTC (rev 154264)
+++ trunk/Source/WebCore/loader/DocumentLoader.cpp 2013-08-19 08:24:08 UTC (rev 154265)
@@ -1378,7 +1378,7 @@
m_applicationCacheHost->maybeLoadMainResource(m_request, m_substituteData);
if (m_substituteData.isValid()) {
- m_identifierForLoadWithoutResourceLoader = m_frame->page()->progress()->createUniqueIdentifier();
+ m_identifierForLoadWithoutResourceLoader = m_frame->page()->progress().createUniqueIdentifier();
frameLoader()->notifier()->assignIdentifierToInitialRequest(m_identifierForLoadWithoutResourceLoader, this, m_request);
frameLoader()->notifier()->dispatchWillSendRequest(this, m_identifierForLoadWithoutResourceLoader, m_request, ResourceResponse());
handleSubstituteDataLoadSoon();
@@ -1401,7 +1401,7 @@
}
if (!mainResourceLoader()) {
- m_identifierForLoadWithoutResourceLoader = m_frame->page()->progress()->createUniqueIdentifier();
+ m_identifierForLoadWithoutResourceLoader = m_frame->page()->progress().createUniqueIdentifier();
frameLoader()->notifier()->assignIdentifierToInitialRequest(m_identifierForLoadWithoutResourceLoader, this, request);
frameLoader()->notifier()->dispatchWillSendRequest(this, m_identifierForLoadWithoutResourceLoader, request, ResourceResponse());
}
Modified: trunk/Source/WebCore/loader/FrameLoader.cpp (154264 => 154265)
--- trunk/Source/WebCore/loader/FrameLoader.cpp 2013-08-19 06:40:25 UTC (rev 154264)
+++ trunk/Source/WebCore/loader/FrameLoader.cpp 2013-08-19 08:24:08 UTC (rev 154265)
@@ -179,14 +179,14 @@
{
ASSERT(!m_inProgress || m_frame->page());
if (m_inProgress)
- m_frame->page()->progress()->progressCompleted(m_frame);
+ m_frame->page()->progress().progressCompleted(m_frame);
}
void progressStarted()
{
ASSERT(m_frame->page());
if (!m_inProgress)
- m_frame->page()->progress()->progressStarted(m_frame);
+ m_frame->page()->progress().progressStarted(m_frame);
m_inProgress = true;
}
@@ -195,7 +195,7 @@
ASSERT(m_inProgress);
ASSERT(m_frame->page());
m_inProgress = false;
- m_frame->page()->progress()->progressCompleted(m_frame);
+ m_frame->page()->progress().progressCompleted(m_frame);
}
private:
@@ -2923,7 +2923,7 @@
identifier = 0;
if (Page* page = m_frame->page()) {
- identifier = page->progress()->createUniqueIdentifier();
+ identifier = page->progress().createUniqueIdentifier();
notifier()->assignIdentifierToInitialRequest(identifier, m_documentLoader.get(), request);
}
Modified: trunk/Source/WebCore/loader/PingLoader.cpp (154264 => 154265)
--- trunk/Source/WebCore/loader/PingLoader.cpp 2013-08-19 06:40:25 UTC (rev 154264)
+++ trunk/Source/WebCore/loader/PingLoader.cpp 2013-08-19 08:24:08 UTC (rev 154265)
@@ -129,7 +129,7 @@
PingLoader::PingLoader(Frame* frame, ResourceRequest& request)
: m_timeout(this, &PingLoader::timeout)
{
- unsigned long identifier = frame->page()->progress()->createUniqueIdentifier();
+ unsigned long identifier = frame->page()->progress().createUniqueIdentifier();
// FIXME: Why activeDocumentLoader? I would have expected documentLoader().
// Itseems like the PingLoader should be associated with the current
// Document in the Frame, but the activeDocumentLoader will be associated
Modified: trunk/Source/WebCore/loader/ResourceLoadNotifier.cpp (154264 => 154265)
--- trunk/Source/WebCore/loader/ResourceLoadNotifier.cpp 2013-08-19 06:40:25 UTC (rev 154264)
+++ trunk/Source/WebCore/loader/ResourceLoadNotifier.cpp 2013-08-19 08:24:08 UTC (rev 154265)
@@ -69,7 +69,7 @@
loader->documentLoader()->addResponse(r);
if (Page* page = m_frame->page())
- page->progress()->incrementProgress(loader->identifier(), r);
+ page->progress().incrementProgress(loader->identifier(), r);
dispatchDidReceiveResponse(loader->documentLoader(), loader->identifier(), r, loader);
}
@@ -77,7 +77,7 @@
void ResourceLoadNotifier::didReceiveData(ResourceLoader* loader, const char* data, int dataLength, int encodedDataLength)
{
if (Page* page = m_frame->page())
- page->progress()->incrementProgress(loader->identifier(), data, dataLength);
+ page->progress().incrementProgress(loader->identifier(), data, dataLength);
dispatchDidReceiveData(loader->documentLoader(), loader->identifier(), data, dataLength, encodedDataLength);
}
@@ -85,14 +85,14 @@
void ResourceLoadNotifier::didFinishLoad(ResourceLoader* loader, double finishTime)
{
if (Page* page = m_frame->page())
- page->progress()->completeProgress(loader->identifier());
+ page->progress().completeProgress(loader->identifier());
dispatchDidFinishLoading(loader->documentLoader(), loader->identifier(), finishTime);
}
void ResourceLoadNotifier::didFailToLoad(ResourceLoader* loader, const ResourceError& error)
{
if (Page* page = m_frame->page())
- page->progress()->completeProgress(loader->identifier());
+ page->progress().completeProgress(loader->identifier());
if (!error.isNull())
m_frame->loader().client()->dispatchDidFailLoading(loader->documentLoader(), loader->identifier(), error);
Modified: trunk/Source/WebCore/loader/ResourceLoader.cpp (154264 => 154265)
--- trunk/Source/WebCore/loader/ResourceLoader.cpp 2013-08-19 06:40:25 UTC (rev 154264)
+++ trunk/Source/WebCore/loader/ResourceLoader.cpp 2013-08-19 08:24:08 UTC (rev 154265)
@@ -231,7 +231,7 @@
// We need a resource identifier for all requests, even if FrameLoader is never going to see it (such as with CORS preflight requests).
bool createdResourceIdentifier = false;
if (!m_identifier) {
- m_identifier = m_frame->page()->progress()->createUniqueIdentifier();
+ m_identifier = m_frame->page()->progress().createUniqueIdentifier();
createdResourceIdentifier = true;
}
Modified: trunk/Source/WebCore/loader/appcache/ApplicationCacheGroup.cpp (154264 => 154265)
--- trunk/Source/WebCore/loader/appcache/ApplicationCacheGroup.cpp 2013-08-19 06:40:25 UTC (rev 154264)
+++ trunk/Source/WebCore/loader/appcache/ApplicationCacheGroup.cpp 2013-08-19 08:24:08 UTC (rev 154265)
@@ -522,7 +522,7 @@
#if ENABLE(INSPECTOR)
// Because willSendRequest only gets called during redirects, we initialize
// the identifier and the first willSendRequest here.
- m_currentResourceIdentifier = m_frame->page()->progress()->createUniqueIdentifier();
+ m_currentResourceIdentifier = m_frame->page()->progress().createUniqueIdentifier();
ResourceResponse redirectResponse = ResourceResponse();
InspectorInstrumentation::willSendRequest(m_frame, m_currentResourceIdentifier, m_frame->loader().documentLoader(), request, redirectResponse);
#endif
Modified: trunk/Source/WebCore/page/FrameView.cpp (154264 => 154265)
--- trunk/Source/WebCore/page/FrameView.cpp 2013-08-19 06:40:25 UTC (rev 154264)
+++ trunk/Source/WebCore/page/FrameView.cpp 2013-08-19 08:24:08 UTC (rev 154265)
@@ -2346,7 +2346,7 @@
void FrameView::updateLayerFlushThrottlingInAllFrames()
{
#if USE(ACCELERATED_COMPOSITING)
- bool isMainLoadProgressing = frame().page()->progress()->isMainLoadProgressing();
+ bool isMainLoadProgressing = frame().page()->progress().isMainLoadProgressing();
for (Frame* frame = m_frame.get(); frame; frame = frame->tree()->traverseNext(m_frame.get())) {
if (RenderView* renderView = frame->contentRenderer())
renderView->compositor()->setLayerFlushThrottlingEnabled(isMainLoadProgressing);
Modified: trunk/Source/WebCore/page/Page.h (154264 => 154265)
--- trunk/Source/WebCore/page/Page.h 2013-08-19 06:40:25 UTC (rev 154264)
+++ trunk/Source/WebCore/page/Page.h 2013-08-19 08:24:08 UTC (rev 154265)
@@ -208,7 +208,7 @@
PassRefPtr<ClientRectList> nonFastScrollableRects(const Frame*);
Settings& settings() const { return *m_settings; }
- ProgressTracker* progress() const { return m_progress.get(); }
+ ProgressTracker& progress() const { return *m_progress; }
BackForwardController* backForward() const { return m_backForwardController.get(); }
FeatureObserver* featureObserver() { return &m_featureObserver; }
@@ -458,7 +458,7 @@
RefPtr<ScrollingCoordinator> m_scrollingCoordinator;
const RefPtr<Settings> m_settings;
- OwnPtr<ProgressTracker> m_progress;
+ const OwnPtr<ProgressTracker> m_progress;
OwnPtr<BackForwardController> m_backForwardController;
RefPtr<Frame> m_mainFrame;
Modified: trunk/Source/WebCore/rendering/RenderLayerBacking.cpp (154264 => 154265)
--- trunk/Source/WebCore/rendering/RenderLayerBacking.cpp 2013-08-19 06:40:25 UTC (rev 154264)
+++ trunk/Source/WebCore/rendering/RenderLayerBacking.cpp 2013-08-19 08:24:08 UTC (rev 154265)
@@ -221,7 +221,7 @@
bool useMinimalTilesDuringLoading = false;
// Avoid churn.
if (!backing->didSwitchToFullTileCoverageDuringLoading()) {
- useMinimalTilesDuringLoading = !frameView->isVisuallyNonEmpty() || (frame->page()->progress()->isMainLoadProgressing() && !frameView->wasScrolledByUser());
+ useMinimalTilesDuringLoading = !frameView->isVisuallyNonEmpty() || (frame->page()->progress().isMainLoadProgressing() && !frameView->wasScrolledByUser());
if (!useMinimalTilesDuringLoading)
backing->setDidSwitchToFullTileCoverageDuringLoading();
}
Modified: trunk/Source/WebKit/blackberry/WebCoreSupport/FrameLoaderClientBlackBerry.cpp (154264 => 154265)
--- trunk/Source/WebKit/blackberry/WebCoreSupport/FrameLoaderClientBlackBerry.cpp 2013-08-19 06:40:25 UTC (rev 154264)
+++ trunk/Source/WebKit/blackberry/WebCoreSupport/FrameLoaderClientBlackBerry.cpp 2013-08-19 08:24:08 UTC (rev 154265)
@@ -865,7 +865,7 @@
if (!isMainFrame() || !m_frame->page())
return;
- m_webPagePrivate->m_client->notifyLoadProgress(m_frame->page()->progress()->estimatedProgress() * 100);
+ m_webPagePrivate->m_client->notifyLoadProgress(m_frame->page()->progress().estimatedProgress() * 100);
}
void FrameLoaderClientBlackBerry::dispatchDidLayout(LayoutMilestones milestones)
Modified: trunk/Source/WebKit/efl/ewk/ewk_frame.cpp (154264 => 154265)
--- trunk/Source/WebKit/efl/ewk/ewk_frame.cpp 2013-08-19 06:40:25 UTC (rev 154264)
+++ trunk/Source/WebKit/efl/ewk/ewk_frame.cpp 2013-08-19 08:24:08 UTC (rev 154265)
@@ -1513,7 +1513,7 @@
EINA_SAFETY_ON_NULL_RETURN(smartData->frame);
// TODO: this is per page, there should be a way to have per-frame.
- double progress = smartData->frame->page()->progress()->estimatedProgress();
+ double progress = smartData->frame->page()->progress().estimatedProgress();
DBG("ewkFrame=%p (p=%0.3f)", ewkFrame, progress);
Modified: trunk/Source/WebKit/efl/ewk/ewk_view.cpp (154264 => 154265)
--- trunk/Source/WebKit/efl/ewk/ewk_view.cpp 2013-08-19 06:40:25 UTC (rev 154264)
+++ trunk/Source/WebKit/efl/ewk/ewk_view.cpp 2013-08-19 08:24:08 UTC (rev 154265)
@@ -1644,7 +1644,7 @@
{
EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData, -1.0);
EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv, -1.0);
- return priv->page->progress()->estimatedProgress();
+ return priv->page->progress().estimatedProgress();
}
Eina_Bool ewk_view_stop(Evas_Object* ewkView)
@@ -3173,7 +3173,7 @@
EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv);
// Evas_Coord width, height;
- double progress = priv->page->progress()->estimatedProgress();
+ double progress = priv->page->progress().estimatedProgress();
DBG("ewkView=%p (p=%0.3f)", ewkView, progress);
Modified: trunk/Source/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp (154264 => 154265)
--- trunk/Source/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp 2013-08-19 06:40:25 UTC (rev 154264)
+++ trunk/Source/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp 2013-08-19 08:24:08 UTC (rev 154265)
@@ -296,7 +296,7 @@
WebKitWebView* webView = getViewFromFrame(m_frame);
Page* corePage = core(webView);
- g_signal_emit_by_name(webView, "load-progress-changed", lround(corePage->progress()->estimatedProgress()*100));
+ g_signal_emit_by_name(webView, "load-progress-changed", lround(corePage->progress().estimatedProgress()*100));
g_object_notify(G_OBJECT(webView), "progress");
}
Modified: trunk/Source/WebKit/gtk/webkit/webkitwebview.cpp (154264 => 154265)
--- trunk/Source/WebKit/gtk/webkit/webkitwebview.cpp 2013-08-19 06:40:25 UTC (rev 154264)
+++ trunk/Source/WebKit/gtk/webkit/webkitwebview.cpp 2013-08-19 08:24:08 UTC (rev 154265)
@@ -4924,7 +4924,7 @@
{
g_return_val_if_fail(WEBKIT_IS_WEB_VIEW(webView), 1.0);
- return core(webView)->progress()->estimatedProgress();
+ return core(webView)->progress().estimatedProgress();
}
/**
Modified: trunk/Source/WebKit/mac/WebView/WebView.mm (154264 => 154265)
--- trunk/Source/WebKit/mac/WebView/WebView.mm 2013-08-19 06:40:25 UTC (rev 154264)
+++ trunk/Source/WebKit/mac/WebView/WebView.mm 2013-08-19 08:24:08 UTC (rev 154265)
@@ -4463,7 +4463,7 @@
{
if (!_private->page)
return 0.0;
- return _private->page->progress()->estimatedProgress();
+ return _private->page->progress().estimatedProgress();
}
- (NSArray *)pasteboardTypesForSelection
Modified: trunk/Source/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp (154264 => 154265)
--- trunk/Source/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp 2013-08-19 06:40:25 UTC (rev 154264)
+++ trunk/Source/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp 2013-08-19 08:24:08 UTC (rev 154265)
@@ -571,7 +571,7 @@
void FrameLoaderClientQt::postProgressEstimateChangedNotification()
{
if (m_webFrame && m_frame->page())
- emit loadProgress(qRound(m_frame->page()->progress()->estimatedProgress() * 100));
+ emit loadProgress(qRound(m_frame->page()->progress().estimatedProgress() * 100));
}
void FrameLoaderClientQt::postProgressFinishedNotification()
Modified: trunk/Source/WebKit/qt/WebCoreSupport/QWebPageAdapter.cpp (154264 => 154265)
--- trunk/Source/WebKit/qt/WebCoreSupport/QWebPageAdapter.cpp 2013-08-19 06:40:25 UTC (rev 154264)
+++ trunk/Source/WebKit/qt/WebCoreSupport/QWebPageAdapter.cpp 2013-08-19 08:24:08 UTC (rev 154265)
@@ -971,8 +971,8 @@
void QWebPageAdapter::_q_onLoadProgressChanged(int)
{
- m_totalBytes = page->progress()->totalPageAndResourceBytesToLoad();
- m_bytesReceived = page->progress()->totalBytesReceived();
+ m_totalBytes = page->progress().totalPageAndResourceBytesToLoad();
+ m_bytesReceived = page->progress().totalBytesReceived();
}
bool QWebPageAdapter::supportsContentType(const QString& mimeType) const
Modified: trunk/Source/WebKit/win/WebView.cpp (154264 => 154265)
--- trunk/Source/WebKit/win/WebView.cpp 2013-08-19 06:40:25 UTC (rev 154264)
+++ trunk/Source/WebKit/win/WebView.cpp 2013-08-19 08:24:08 UTC (rev 154265)
@@ -3621,7 +3621,7 @@
HRESULT STDMETHODCALLTYPE WebView::estimatedProgress(
/* [retval][out] */ double* estimatedProgress)
{
- *estimatedProgress = m_page->progress()->estimatedProgress();
+ *estimatedProgress = m_page->progress().estimatedProgress();
return S_OK;
}
Modified: trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp (154264 => 154265)
--- trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp 2013-08-19 06:40:25 UTC (rev 154264)
+++ trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp 2013-08-19 08:24:08 UTC (rev 154265)
@@ -807,7 +807,7 @@
{
if (WebPage* webPage = m_frame->page()) {
if (m_frame->isMainFrame()) {
- double progress = webPage->corePage()->progress()->estimatedProgress();
+ double progress = webPage->corePage()->progress().estimatedProgress();
webPage->send(Messages::WebPageProxy::DidChangeProgress(progress));
}
}