Title: [184816] trunk/Source/WebCore
Revision
184816
Author
[email protected]
Date
2015-05-22 20:54:32 -0700 (Fri, 22 May 2015)

Log Message

Document::ensurePlugInsInjectedScript() should evaluate the injected script on its own frame.
https://bugs.webkit.org/show_bug.cgi?id=145328

Reviewed by Jon Lee.

trac.webkit.org/r184329 fixed HTMLPlugInImageElement::didAddUserAgentShadowRoot()
to use the document's frame instead of the page's main frame.  However,
Document::ensurePlugInsInjectedScript() is still evaluating the injected script on
the main frame.

As a result, HTMLPlugInImageElement::didAddUserAgentShadowRoot()'s attempt to get
the injected createOverlay function from the document frame's global object will
fail.  Fixing Document::ensurePlugInsInjectedScript() to evaluating the injected
script on the document's frame fixes the issue.

No new tests.

* dom/Document.cpp:
(WebCore::Document::ensurePlugInsInjectedScript):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (184815 => 184816)


--- trunk/Source/WebCore/ChangeLog	2015-05-23 02:12:50 UTC (rev 184815)
+++ trunk/Source/WebCore/ChangeLog	2015-05-23 03:54:32 UTC (rev 184816)
@@ -1,3 +1,25 @@
+2015-05-22  Mark Lam  <[email protected]>
+
+        Document::ensurePlugInsInjectedScript() should evaluate the injected script on its own frame.
+        https://bugs.webkit.org/show_bug.cgi?id=145328
+
+        Reviewed by Jon Lee.
+
+        trac.webkit.org/r184329 fixed HTMLPlugInImageElement::didAddUserAgentShadowRoot()
+        to use the document's frame instead of the page's main frame.  However,
+        Document::ensurePlugInsInjectedScript() is still evaluating the injected script on
+        the main frame.
+
+        As a result, HTMLPlugInImageElement::didAddUserAgentShadowRoot()'s attempt to get
+        the injected createOverlay function from the document frame's global object will
+        fail.  Fixing Document::ensurePlugInsInjectedScript() to evaluating the injected
+        script on the document's frame fixes the issue.
+
+        No new tests.
+
+        * dom/Document.cpp:
+        (WebCore::Document::ensurePlugInsInjectedScript):
+
 2015-05-22  Eric Carlson  <[email protected]>
 
         MediaPlayer doesn't need isPlayingToWirelessPlaybackTarget and isCurrentPlaybackTargetWireless

Modified: trunk/Source/WebCore/dom/Document.cpp (184815 => 184816)


--- trunk/Source/WebCore/dom/Document.cpp	2015-05-23 02:12:50 UTC (rev 184815)
+++ trunk/Source/WebCore/dom/Document.cpp	2015-05-23 03:54:32 UTC (rev 184816)
@@ -6490,7 +6490,7 @@
     if (!jsString)
         jsString = String(plugInsJavaScript, sizeof(plugInsJavaScript));
 
-    m_frame->mainFrame().script().evaluateInWorld(ScriptSourceCode(jsString), world);
+    frame()->script().evaluateInWorld(ScriptSourceCode(jsString), world);
 
     m_hasInjectedPlugInsScript = true;
 }
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to