Title: [154409] trunk/Source

Diff

Modified: trunk/Source/WebCore/ChangeLog (154408 => 154409)


--- trunk/Source/WebCore/ChangeLog	2013-08-21 20:53:57 UTC (rev 154408)
+++ trunk/Source/WebCore/ChangeLog	2013-08-21 20:54:20 UTC (rev 154409)
@@ -1,3 +1,11 @@
+2013-08-21  Andreas Kling  <[email protected]>
+
+        <https://webkit.org/b/120132> Frame::navigationScheduler() should return a reference.
+
+        Reviewed by Anders Carlzon.
+
+        Frame::m_navigationScheduler is an inline member, not a pointer.
+
 2013-08-21  Tim Horton  <[email protected]>
 
         REGRESSION(r154399): broke Mac ML debug WK1 tests > 50 crashes (Requested by thorton on #webkit).

Modified: trunk/Source/WebCore/dom/Document.cpp (154408 => 154409)


--- trunk/Source/WebCore/dom/Document.cpp	2013-08-21 20:53:57 UTC (rev 154408)
+++ trunk/Source/WebCore/dom/Document.cpp	2013-08-21 20:54:20 UTC (rev 154409)
@@ -2325,7 +2325,7 @@
         return;
     }
 
-    bool wasLocationChangePending = frame() && frame()->navigationScheduler()->locationChangePending();
+    bool wasLocationChangePending = frame() && frame()->navigationScheduler().locationChangePending();
     bool doload = !parsing() && m_parser && !m_processingLoadEvent && !wasLocationChangePending;
     
     if (!doload)
@@ -2391,7 +2391,7 @@
     // fires. This will improve onload scores, and other browsers do it.
     // If they wanna cheat, we can too. -dwh
 
-    if (frame()->navigationScheduler()->locationChangePending() && elapsedTime() < cLayoutScheduleThreshold) {
+    if (frame()->navigationScheduler().locationChangePending() && elapsedTime() < cLayoutScheduleThreshold) {
         // Just bail out. Before or during the onload we were shifted to another page.
         // The old i-Bench suite does this. When this happens don't bother painting or laying out.        
         m_processingLoadEvent = false;
@@ -2801,7 +2801,7 @@
                 url = ""
             else
                 url = ""
-            frame->navigationScheduler()->scheduleRedirect(delay, url);
+            frame->navigationScheduler().scheduleRedirect(delay, url);
         }
     } else if (equalIgnoringCase(equiv, "set-cookie")) {
         // FIXME: make setCookie work on XML documents too; e.g. in case of <html:meta .....>
@@ -2825,7 +2825,7 @@
                 // Stopping the loader isn't enough, as we're already parsing the document; to honor the header's
                 // intent, we must navigate away from the possibly partially-rendered document to a location that
                 // doesn't inherit the parent's SecurityOrigin.
-                frame->navigationScheduler()->scheduleLocationChange(securityOrigin(), SecurityOrigin::urlWithUniqueSecurityOrigin(), String());
+                frame->navigationScheduler().scheduleLocationChange(securityOrigin(), SecurityOrigin::urlWithUniqueSecurityOrigin(), String());
                 addConsoleMessage(SecurityMessageSource, ErrorMessageLevel, message, requestIdentifier);
             }
         }

Modified: trunk/Source/WebCore/html/parser/HTMLDocumentParser.cpp (154408 => 154409)


--- trunk/Source/WebCore/html/parser/HTMLDocumentParser.cpp	2013-08-21 20:53:57 UTC (rev 154408)
+++ trunk/Source/WebCore/html/parser/HTMLDocumentParser.cpp	2013-08-21 20:54:20 UTC (rev 154409)
@@ -299,7 +299,7 @@
     //        parser to stop parsing cleanly.  The problem is we're not
     //        perpared to do that at every point where we run _javascript_.
     if (!isParsingFragment()
-        && document()->frame() && document()->frame()->navigationScheduler()->locationChangePending())
+        && document()->frame() && document()->frame()->navigationScheduler().locationChangePending())
         return false;
 
     if (mode == AllowYield)
@@ -415,7 +415,7 @@
         ASSERT(!isWaitingForScripts());
 
         if (!isParsingFragment()
-            && document()->frame() && document()->frame()->navigationScheduler()->locationChangePending()) {
+            && document()->frame() && document()->frame()->navigationScheduler().locationChangePending()) {
 
             // To match main-thread parser behavior (which never checks locationChangePending on the EOF path)
             // we peek to see if this chunk has an EOF and process it anyway.

Modified: trunk/Source/WebCore/html/parser/XSSAuditorDelegate.cpp (154408 => 154409)


--- trunk/Source/WebCore/html/parser/XSSAuditorDelegate.cpp	2013-08-21 20:53:57 UTC (rev 154408)
+++ trunk/Source/WebCore/html/parser/XSSAuditorDelegate.cpp	2013-08-21 20:54:20 UTC (rev 154409)
@@ -113,7 +113,7 @@
     }
 
     if (xssInfo.m_didBlockEntirePage)
-        m_document->frame()->navigationScheduler()->scheduleLocationChange(m_document->securityOrigin(), SecurityOrigin::urlWithUniqueSecurityOrigin(), String());
+        m_document->frame()->navigationScheduler().scheduleLocationChange(m_document->securityOrigin(), SecurityOrigin::urlWithUniqueSecurityOrigin(), String());
 }
 
 } // namespace WebCore

Modified: trunk/Source/WebCore/loader/FrameLoader.cpp (154408 => 154409)


--- trunk/Source/WebCore/loader/FrameLoader.cpp	2013-08-21 20:53:57 UTC (rev 154408)
+++ trunk/Source/WebCore/loader/FrameLoader.cpp	2013-08-21 20:54:20 UTC (rev 154409)
@@ -280,7 +280,7 @@
     history()->setDefersLoading(defers);
 
     if (!defers) {
-        m_frame->navigationScheduler()->startTimer();
+        m_frame->navigationScheduler().startTimer();
         startCheckCompleteTimer();
     }
 }
@@ -391,7 +391,7 @@
     submission->setReferrer(outgoingReferrer());
     submission->setOrigin(outgoingOrigin());
 
-    targetFrame->navigationScheduler()->scheduleFormSubmission(submission);
+    targetFrame->navigationScheduler().scheduleFormSubmission(submission);
 }
 
 void FrameLoader::stopLoading(UnloadEventPolicy unloadEventPolicy)
@@ -469,7 +469,7 @@
     }
 
     // FIXME: This will cancel redirection timer, which really needs to be restarted when restoring the frame from b/f cache.
-    m_frame->navigationScheduler()->cancel();
+    m_frame->navigationScheduler().cancel();
 }
 
 void FrameLoader::stop()
@@ -512,13 +512,13 @@
 
 bool FrameLoader::didOpenURL()
 {
-    if (m_frame->navigationScheduler()->redirectScheduledDuringLoad()) {
+    if (m_frame->navigationScheduler().redirectScheduledDuringLoad()) {
         // A redirect was scheduled before the document was created.
         // This can happen when one frame changes another frame's location.
         return false;
     }
 
-    m_frame->navigationScheduler()->cancel();
+    m_frame->navigationScheduler().cancel();
     m_frame->editor().clearLastEditCommand();
 
     m_isComplete = false;
@@ -551,13 +551,13 @@
     // from a subsequent window.document.open / window.document.write call. 
     // Canceling redirection here works for all cases because document.open 
     // implicitly precedes document.write.
-    m_frame->navigationScheduler()->cancel();
+    m_frame->navigationScheduler().cancel();
 }
 
 
 void FrameLoader::cancelAndClear()
 {
-    m_frame->navigationScheduler()->cancel();
+    m_frame->navigationScheduler().cancel();
 
     if (!m_isComplete)
         closeURL();
@@ -606,7 +606,7 @@
 
     m_frame->script().enableEval();
 
-    m_frame->navigationScheduler()->clear();
+    m_frame->navigationScheduler().clear();
 
     m_checkTimer.stop();
     m_shouldCallCheckCompleted = false;
@@ -643,7 +643,7 @@
     else
         url = ""
 
-    m_frame->navigationScheduler()->scheduleRedirect(delay, url);
+    m_frame->navigationScheduler().scheduleRedirect(delay, url);
 }
 
 void FrameLoader::setOutgoingReferrer(const KURL& url)
@@ -792,7 +792,7 @@
 
     checkCallImplicitClose(); // if we didn't do it before
 
-    m_frame->navigationScheduler()->startTimer();
+    m_frame->navigationScheduler().startTimer();
 
     completed();
     if (m_frame->page())
@@ -994,7 +994,7 @@
 {
     if (m_stateMachine.firstLayoutDone())
         m_stateMachine.advanceTo(FrameLoaderStateMachine::CommittedFirstRealLoad);
-    m_frame->navigationScheduler()->cancel(true);
+    m_frame->navigationScheduler().cancel(true);
     m_client->provisionalLoadStarted();
 }
 
@@ -1094,7 +1094,7 @@
     RefPtr<Frame> protect(m_frame);
 
     for (Frame* descendant = m_frame->tree()->traverseNext(m_frame); descendant; descendant = descendant->tree()->traverseNext(m_frame))
-        descendant->navigationScheduler()->startTimer();
+        descendant->navigationScheduler().startTimer();
 
     if (Frame* parent = m_frame->tree()->parent())
         parent->loader().checkCompleted();
@@ -1964,7 +1964,7 @@
     ASSERT(m_frame->page());
     ASSERT(m_frame->page()->mainFrame() == m_frame);
 
-    m_frame->navigationScheduler()->cancel();
+    m_frame->navigationScheduler().cancel();
 
     // We still have to close the previous part page.
     closeURL();

Modified: trunk/Source/WebCore/loader/SubframeLoader.cpp (154408 => 154409)


--- trunk/Source/WebCore/loader/SubframeLoader.cpp	2013-08-21 20:53:57 UTC (rev 154408)
+++ trunk/Source/WebCore/loader/SubframeLoader.cpp	2013-08-21 20:54:20 UTC (rev 154409)
@@ -333,7 +333,7 @@
 {
     Frame* frame = ownerElement->contentFrame();
     if (frame)
-        frame->navigationScheduler()->scheduleLocationChange(m_frame->document()->securityOrigin(), url.string(), m_frame->loader().outgoingReferrer(), lockHistory, lockBackForwardList);
+        frame->navigationScheduler().scheduleLocationChange(m_frame->document()->securityOrigin(), url.string(), m_frame->loader().outgoingReferrer(), lockHistory, lockBackForwardList);
     else
         frame = loadSubframe(ownerElement, url, frameName, m_frame->loader().outgoingReferrer());
 

Modified: trunk/Source/WebCore/loader/appcache/ApplicationCacheGroup.cpp (154408 => 154409)


--- trunk/Source/WebCore/loader/appcache/ApplicationCacheGroup.cpp	2013-08-21 20:53:57 UTC (rev 154408)
+++ trunk/Source/WebCore/loader/appcache/ApplicationCacheGroup.cpp	2013-08-21 20:54:20 UTC (rev 154409)
@@ -179,7 +179,7 @@
             // Restart the current navigation from the top of the navigation algorithm, undoing any changes that were made
             // as part of the initial load.
             // The navigation will not result in the same resource being loaded, because "foreign" entries are never picked during navigation.
-            frame->navigationScheduler()->scheduleLocationChange(frame->document()->securityOrigin(), documentLoader->url(), frame->loader().referrer());
+            frame->navigationScheduler().scheduleLocationChange(frame->document()->securityOrigin(), documentLoader->url(), frame->loader().referrer());
         }
         
         return;

Modified: trunk/Source/WebCore/page/DOMWindow.cpp (154408 => 154409)


--- trunk/Source/WebCore/page/DOMWindow.cpp	2013-08-21 20:53:57 UTC (rev 154408)
+++ trunk/Source/WebCore/page/DOMWindow.cpp	2013-08-21 20:54:20 UTC (rev 154409)
@@ -1810,7 +1810,7 @@
         return;
 
     // We want a new history item if we are processing a user gesture.
-    m_frame->navigationScheduler()->scheduleLocationChange(activeDocument->securityOrigin(),
+    m_frame->navigationScheduler().scheduleLocationChange(activeDocument->securityOrigin(),
         // FIXME: What if activeDocument()->frame() is 0?
         completedURL, activeDocument->frame()->loader().outgoingReferrer(),
         locking != LockHistoryBasedOnGestureState || !ScriptController::processingUserGesture(),
@@ -1929,7 +1929,7 @@
         newFrame->loader().changeLocation(activeWindow->document()->securityOrigin(), completedURL, referrer, false, false);
     else if (!urlString.isEmpty()) {
         bool lockHistory = !ScriptController::processingUserGesture();
-        newFrame->navigationScheduler()->scheduleLocationChange(activeWindow->document()->securityOrigin(), completedURL.string(), referrer, lockHistory, false);
+        newFrame->navigationScheduler().scheduleLocationChange(activeWindow->document()->securityOrigin(), completedURL.string(), referrer, lockHistory, false);
     }
 
     // Navigating the new frame could result in it being detached from its page by a navigation policy delegate.
@@ -1984,7 +1984,7 @@
         // For whatever reason, Firefox uses the first window rather than the active window to
         // determine the outgoing referrer. We replicate that behavior here.
         bool lockHistory = !ScriptController::processingUserGesture();
-        targetFrame->navigationScheduler()->scheduleLocationChange(
+        targetFrame->navigationScheduler().scheduleLocationChange(
             activeDocument->securityOrigin(),
             completedURL,
             firstFrame->loader().outgoingReferrer(),

Modified: trunk/Source/WebCore/page/Frame.h (154408 => 154409)


--- trunk/Source/WebCore/page/Frame.h	2013-08-21 20:53:57 UTC (rev 154408)
+++ trunk/Source/WebCore/page/Frame.h	2013-08-21 20:54:20 UTC (rev 154409)
@@ -117,7 +117,7 @@
         Editor& editor() const;
         EventHandler& eventHandler() const;
         FrameLoader& loader() const;
-        NavigationScheduler* navigationScheduler() const;
+        NavigationScheduler& navigationScheduler() const;
         FrameSelection& selection() const;
         FrameTree* tree() const;
         AnimationController& animation() const;
@@ -266,9 +266,9 @@
         return m_loader;
     }
 
-    inline NavigationScheduler* Frame::navigationScheduler() const
+    inline NavigationScheduler& Frame::navigationScheduler() const
     {
-        return &m_navigationScheduler;
+        return m_navigationScheduler;
     }
 
     inline FrameView* Frame::view() const

Modified: trunk/Source/WebCore/page/History.cpp (154408 => 154409)


--- trunk/Source/WebCore/page/History.cpp	2013-08-21 20:53:57 UTC (rev 154408)
+++ trunk/Source/WebCore/page/History.cpp	2013-08-21 20:54:20 UTC (rev 154409)
@@ -108,7 +108,7 @@
     if (!m_frame)
         return;
 
-    m_frame->navigationScheduler()->scheduleHistoryNavigation(distance);
+    m_frame->navigationScheduler().scheduleHistoryNavigation(distance);
 }
 
 void History::go(ScriptExecutionContext* context, int distance)
@@ -124,7 +124,7 @@
     if (!activeDocument->canNavigate(m_frame))
         return;
 
-    m_frame->navigationScheduler()->scheduleHistoryNavigation(distance);
+    m_frame->navigationScheduler().scheduleHistoryNavigation(distance);
 }
 
 KURL History::urlForState(const String& urlString)

Modified: trunk/Source/WebCore/page/Location.cpp (154408 => 154409)


--- trunk/Source/WebCore/page/Location.cpp	2013-08-21 20:53:57 UTC (rev 154408)
+++ trunk/Source/WebCore/page/Location.cpp	2013-08-21 20:54:20 UTC (rev 154409)
@@ -258,7 +258,7 @@
     }
     if (protocolIsJavaScript(m_frame->document()->url()))
         return;
-    m_frame->navigationScheduler()->scheduleRefresh();
+    m_frame->navigationScheduler().scheduleRefresh();
 }
 
 void Location::setLocation(const String& url, DOMWindow* activeWindow, DOMWindow* firstWindow)

Modified: trunk/Source/WebKit/qt/WebCoreSupport/QWebFrameAdapter.cpp (154408 => 154409)


--- trunk/Source/WebKit/qt/WebCoreSupport/QWebFrameAdapter.cpp	2013-08-21 20:53:57 UTC (rev 154408)
+++ trunk/Source/WebKit/qt/WebCoreSupport/QWebFrameAdapter.cpp	2013-08-21 20:54:20 UTC (rev 154409)
@@ -808,7 +808,7 @@
 
 void QWebFrameAdapter::cancelLoad()
 {
-    frame->navigationScheduler()->cancel();
+    frame->navigationScheduler().cancel();
 }
 
 // ========== QWebHitTestResultPrivate implementation ===========
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to