Diff
Modified: trunk/Source/WebCore/ChangeLog (155303 => 155304)
--- trunk/Source/WebCore/ChangeLog 2013-09-08 11:30:17 UTC (rev 155303)
+++ trunk/Source/WebCore/ChangeLog 2013-09-08 12:00:17 UTC (rev 155304)
@@ -1,3 +1,19 @@
+2013-09-08 Andreas Kling <[email protected]>
+
+ ScriptExecutionContext: Use FINAL instead of foo() { virtualFoo() }
+ <https://webkit.org/b/120827>
+
+ Reviewed by Darin Adler.
+
+ Now that we have FINAL, we can just use that to have fast versions of url()
+ and completeURL() when calling through a Document or WorkerGlobalScope pointer.
+
+ * dom/Document.cpp:
+ * dom/Document.h:
+ * dom/ScriptExecutionContext.h:
+ * workers/WorkerGlobalScope.cpp:
+ * workers/WorkerGlobalScope.h:
+
2013-09-08 Antti Koivisto <[email protected]>
Rename needsShadowTreeWalker
Modified: trunk/Source/WebCore/dom/Document.cpp (155303 => 155304)
--- trunk/Source/WebCore/dom/Document.cpp 2013-09-08 11:30:17 UTC (rev 155303)
+++ trunk/Source/WebCore/dom/Document.cpp 2013-09-08 12:00:17 UTC (rev 155304)
@@ -2575,16 +2575,6 @@
write("\n", ownerDocument);
}
-const KURL& Document::virtualURL() const
-{
- return m_url;
-}
-
-KURL Document::virtualCompleteURL(const String& url) const
-{
- return completeURL(url);
-}
-
double Document::minimumTimerInterval() const
{
Page* p = page();
Modified: trunk/Source/WebCore/dom/Document.h (155303 => 155304)
--- trunk/Source/WebCore/dom/Document.h 2013-09-08 11:30:17 UTC (rev 155303)
+++ trunk/Source/WebCore/dom/Document.h 2013-09-08 12:00:17 UTC (rev 155304)
@@ -577,7 +577,7 @@
bool wellFormed() const { return m_wellFormed; }
- const KURL& url() const { return m_url; }
+ virtual const KURL& url() const OVERRIDE FINAL { return m_url; }
void setURL(const KURL&);
// To understand how these concepts relate to one another, please see the
@@ -589,7 +589,7 @@
const String& baseTarget() const { return m_baseTarget; }
void processBaseElement();
- KURL completeURL(const String&) const;
+ virtual KURL completeURL(const String&) const OVERRIDE FINAL;
KURL completeURL(const String&, const KURL& baseURLOverride) const;
virtual String userAgent(const KURL&) const;
@@ -1211,9 +1211,6 @@
virtual void refScriptExecutionContext() { ref(); }
virtual void derefScriptExecutionContext() { deref(); }
- virtual const KURL& virtualURL() const; // Same as url(), but needed for ScriptExecutionContext to implement it without a performance loss for direct calls.
- virtual KURL virtualCompleteURL(const String&) const; // Same as completeURL() for the same reason as above.
-
virtual void addMessage(MessageSource, MessageLevel, const String& message, const String& sourceURL, unsigned lineNumber, unsigned columnNumber, PassRefPtr<ScriptCallStack>, ScriptState* = 0, unsigned long requestIdentifier = 0);
virtual double minimumTimerInterval() const;
Modified: trunk/Source/WebCore/dom/ScriptExecutionContext.h (155303 => 155304)
--- trunk/Source/WebCore/dom/ScriptExecutionContext.h 2013-09-08 11:30:17 UTC (rev 155303)
+++ trunk/Source/WebCore/dom/ScriptExecutionContext.h 2013-09-08 12:00:17 UTC (rev 155304)
@@ -68,8 +68,8 @@
virtual bool isContextThread() const { return true; }
virtual bool isJSExecutionForbidden() const = 0;
- const KURL& url() const { return virtualURL(); }
- KURL completeURL(const String& url) const { return virtualCompleteURL(url); }
+ virtual const KURL& url() const = 0;
+ virtual KURL completeURL(const String& url) const = 0;
virtual String userAgent(const KURL&) const = 0;
@@ -179,9 +179,6 @@
ActiveDOMObject::ReasonForSuspension reasonForSuspendingActiveDOMObjects() const { return m_reasonForSuspendingActiveDOMObjects; }
private:
- virtual const KURL& virtualURL() const = 0;
- virtual KURL virtualCompleteURL(const String&) const = 0;
-
virtual void addMessage(MessageSource, MessageLevel, const String& message, const String& sourceURL, unsigned lineNumber, unsigned columnNumber, PassRefPtr<ScriptCallStack>, ScriptState* = 0, unsigned long requestIdentifier = 0) = 0;
virtual EventTarget* errorEventTarget() = 0;
virtual void logExceptionToConsole(const String& errorMessage, const String& sourceURL, int lineNumber, int columnNumber, PassRefPtr<ScriptCallStack>) = 0;
Modified: trunk/Source/WebCore/workers/WorkerGlobalScope.cpp (155303 => 155304)
--- trunk/Source/WebCore/workers/WorkerGlobalScope.cpp 2013-09-08 11:30:17 UTC (rev 155303)
+++ trunk/Source/WebCore/workers/WorkerGlobalScope.cpp 2013-09-08 12:00:17 UTC (rev 155304)
@@ -122,16 +122,6 @@
return const_cast<WorkerGlobalScope*>(this);
}
-const KURL& WorkerGlobalScope::virtualURL() const
-{
- return m_url;
-}
-
-KURL WorkerGlobalScope::virtualCompleteURL(const String& url) const
-{
- return completeURL(url);
-}
-
KURL WorkerGlobalScope::completeURL(const String& url) const
{
// Always return a null URL when passed a null string.
Modified: trunk/Source/WebCore/workers/WorkerGlobalScope.h (155303 => 155304)
--- trunk/Source/WebCore/workers/WorkerGlobalScope.h 2013-09-08 11:30:17 UTC (rev 155303)
+++ trunk/Source/WebCore/workers/WorkerGlobalScope.h 2013-09-08 12:00:17 UTC (rev 155304)
@@ -65,8 +65,8 @@
virtual bool isSharedWorkerGlobalScope() const { return false; }
virtual bool isDedicatedWorkerGlobalScope() const { return false; }
- const KURL& url() const { return m_url; }
- KURL completeURL(const String&) const;
+ virtual const KURL& url() const OVERRIDE FINAL { return m_url; }
+ virtual KURL completeURL(const String&) const OVERRIDE FINAL;
const GroupSettings* groupSettings() { return m_groupSettings.get(); }
virtual String userAgent(const KURL&) const;
@@ -157,9 +157,6 @@
virtual EventTargetData* eventTargetData() OVERRIDE;
virtual EventTargetData& ensureEventTargetData() OVERRIDE;
- virtual const KURL& virtualURL() const OVERRIDE;
- virtual KURL virtualCompleteURL(const String&) const;
-
virtual void addMessage(MessageSource, MessageLevel, const String& message, const String& sourceURL, unsigned lineNumber, unsigned columnNumber, PassRefPtr<ScriptCallStack>, ScriptState* = 0, unsigned long requestIdentifier = 0) OVERRIDE;
virtual void addConsoleMessage(MessageSource, MessageLevel, const String& message, unsigned long requestIdentifier = 0) OVERRIDE;
Modified: trunk/Source/WebKit/WebKit.vcxproj/WebKitExportGenerator/WebKitExports.def.in (155303 => 155304)
--- trunk/Source/WebKit/WebKit.vcxproj/WebKitExportGenerator/WebKitExports.def.in 2013-09-08 11:30:17 UTC (rev 155303)
+++ trunk/Source/WebKit/WebKit.vcxproj/WebKitExportGenerator/WebKitExports.def.in 2013-09-08 12:00:17 UTC (rev 155304)
@@ -253,7 +253,6 @@
?number@String@WTF@@SA?AV12@I@Z
?number@String@WTF@@SA?AV12@NIW4TrailingZerosTruncatingPolicy@2@@Z
symbolWithPointer(?numberOfScopedHTMLStyleChildren@Node@WebCore@@QBEIXZ, ?numberOfScopedHTMLStyleChildren@Node@WebCore@@QEBA_KXZ)
- symbolWithPointer(?completeURL@Document@WebCore@@QBE?AVKURL@2@ABVString@WTF@@@Z, ?completeURL@Document@WebCore@@QEBA?AVKURL@2@AEBVString@WTF@@@Z)
symbolWithPointer(?page@Document@WebCore@@QBEPAVPage@2@XZ, ?page@Document@WebCore@@QEBAPEAVPage@2@XZ)
symbolWithPointer(?pageNumberForElement@PrintContext@WebCore@@SAHPAVElement@2@ABVFloatSize@2@@Z, ?pageNumberForElement@PrintContext@WebCore@@SAHPEAVElement@2@AEBVFloatSize@2@@Z)
symbolWithPointer(?paintControlTints@FrameView@WebCore@@AAEXXZ, ?paintControlTints@FrameView@WebCore@@AEAAXXZ)