Title: [123688] trunk/Source/WebKit/win
Revision
123688
Author
commit-qu...@webkit.org
Date
2012-07-25 18:01:24 -0700 (Wed, 25 Jul 2012)

Log Message

Changes to the WebFrame API cause dependent apps to crash.
https://bugs.webkit.org/show_bug.cgi?id=91656
<rdar://problem/11904605>

Patch by Roger Fong <roger_f...@apple.com> on 2012-07-25
Reviewed by Jon Honeycutt.

Changes to the WebFrame API cause certain apps to crash because of inconsistencies in the COM interface.
The resumeAnimations and suspendAnimations are removed, which are still needed.
The counterValueByElementId method was also removed, although is not needed there.
However, for all of these methods, no method stubs were added where appropriate after removal.

* Interfaces/IWebFramePrivate.idl:
Added resumeAnimations() and suspendAnimations() methods back in. Added unused method stub for counterValueByElementId method.

* WebFrame.cpp:
(WebFrame::resumeAnimations):
Added this method back in.
(WebFrame::suspendAnimations):
Added this method back in.

* WebFrame.h:
(Re)added methods and unused method stubs.

Modified Paths

Diff

Modified: trunk/Source/WebKit/win/ChangeLog (123687 => 123688)


--- trunk/Source/WebKit/win/ChangeLog	2012-07-26 01:01:08 UTC (rev 123687)
+++ trunk/Source/WebKit/win/ChangeLog	2012-07-26 01:01:24 UTC (rev 123688)
@@ -1,3 +1,28 @@
+2012-07-25  Roger Fong  <roger_f...@apple.com>
+
+        Changes to the WebFrame API cause dependent apps to crash.
+        https://bugs.webkit.org/show_bug.cgi?id=91656
+        <rdar://problem/11904605>
+        
+        Reviewed by Jon Honeycutt.
+        
+        Changes to the WebFrame API cause certain apps to crash because of inconsistencies in the COM interface.
+        The resumeAnimations and suspendAnimations are removed, which are still needed.
+        The counterValueByElementId method was also removed, although is not needed there.
+        However, for all of these methods, no method stubs were added where appropriate after removal.
+        
+        * Interfaces/IWebFramePrivate.idl:
+        Added resumeAnimations() and suspendAnimations() methods back in. Added unused method stub for counterValueByElementId method.
+        
+        * WebFrame.cpp:
+        (WebFrame::resumeAnimations):
+        Added this method back in.
+        (WebFrame::suspendAnimations):
+        Added this method back in.
+        
+        * WebFrame.h:
+        (Re)added methods and unused method stubs. 
+
 2012-07-23  Patrick Gansterer  <par...@webkit.org>
 
         Build fix if NOMINMAX is defined by the build system.

Modified: trunk/Source/WebKit/win/Interfaces/IWebFramePrivate.idl (123687 => 123688)


--- trunk/Source/WebKit/win/Interfaces/IWebFramePrivate.idl	2012-07-26 01:01:08 UTC (rev 123687)
+++ trunk/Source/WebKit/win/Interfaces/IWebFramePrivate.idl	2012-07-26 01:01:24 UTC (rev 123688)
@@ -96,6 +96,8 @@
 
     [local] JSGlobalContextRef globalContextForScriptWorld([in] IWebScriptWorld*);
 
+    HRESULT unused3([in] BSTR, [out, retval] BSTR*);
+
     HRESULT visibleContentRect([out, retval] RECT*);
 
     HRESULT pageNumberForElementById([in] BSTR id, [in] float pageWidthInPixels, [in] float pageHeightInPixels, [out, retval] int* pageNumber);
@@ -108,9 +110,13 @@
 
     HRESULT renderTreeAsExternalRepresentation([in] BOOL forPrinting, [out, retval] BSTR* result);
 
+    HRESULT suspendAnimations();
+    HRESULT resumeAnimations(); 
+
     HRESULT loadPlainTextString([in] BSTR string, [in] BSTR url);
 
     HRESULT clearOpener();
 
     HRESULT setTextDirection([in] BSTR direction);
+
 }

Modified: trunk/Source/WebKit/win/WebFrame.cpp (123687 => 123688)


--- trunk/Source/WebKit/win/WebFrame.cpp	2012-07-26 01:01:08 UTC (rev 123687)
+++ trunk/Source/WebKit/win/WebFrame.cpp	2012-07-26 01:01:24 UTC (rev 123688)
@@ -1198,6 +1198,26 @@
     return S_OK;
 }
 
+HRESULT STDMETHODCALLTYPE WebFrame::resumeAnimations()
+{
+    Frame* frame = core(this);
+    if (!frame)
+        return E_FAIL;
+
+    frame->animation()->resumeAnimations();
+    return S_OK;
+}
+
+HRESULT STDMETHODCALLTYPE WebFrame::suspendAnimations()
+{
+    Frame* frame = core(this);
+    if (!frame)
+        return E_FAIL;
+
+    frame->animation()->suspendAnimations();
+    return S_OK;
+}
+
 HRESULT WebFrame::pauseAnimation(BSTR animationName, IDOMNode* node, double secondsFromNow, BOOL* animationWasRunning)
 {
     if (!node || !animationWasRunning)

Modified: trunk/Source/WebKit/win/WebFrame.h (123687 => 123688)


--- trunk/Source/WebKit/win/WebFrame.h	2012-07-26 01:01:08 UTC (rev 123687)
+++ trunk/Source/WebKit/win/WebFrame.h	2012-07-26 01:01:24 UTC (rev 123688)
@@ -280,6 +280,12 @@
 
     virtual HRESULT STDMETHODCALLTYPE setTextDirection(BSTR);
 
+    virtual HRESULT STDMETHODCALLTYPE unused3(BSTR, BSTR*) { return E_NOTIMPL; }
+
+    virtual HRESULT STDMETHODCALLTYPE resumeAnimations();
+
+    virtual HRESULT STDMETHODCALLTYPE suspendAnimations();
+
     // IWebDocumentText
     virtual HRESULT STDMETHODCALLTYPE supportsTextEncoding( 
         /* [retval][out] */ BOOL* result);
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to