Title: [163902] trunk/Source/WebCore
- Revision
- 163902
- Author
- [email protected]
- Date
- 2014-02-11 13:14:16 -0800 (Tue, 11 Feb 2014)
Log Message
[MediaControls] Allow the media controls script to be debuggable by giving it a generated sourceURL
https://bugs.webkit.org/show_bug.cgi?id=127560
Reviewed by Eric Carlson.
When evaluating a script through ScriptController, if that script does not have an
explicit sourceURL, it will not appear in the resources section of the Web Inspector.
For debug builds only, give the media controls script a generated (i.e. fake) sourceURL.
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::parseAttribute):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (163901 => 163902)
--- trunk/Source/WebCore/ChangeLog 2014-02-11 21:12:48 UTC (rev 163901)
+++ trunk/Source/WebCore/ChangeLog 2014-02-11 21:14:16 UTC (rev 163902)
@@ -1,3 +1,17 @@
+2014-01-24 Jer Noble <[email protected]>
+
+ [MediaControls] Allow the media controls script to be debuggable by giving it a generated sourceURL
+ https://bugs.webkit.org/show_bug.cgi?id=127560
+
+ Reviewed by Eric Carlson.
+
+ When evaluating a script through ScriptController, if that script does not have an
+ explicit sourceURL, it will not appear in the resources section of the Web Inspector.
+ For debug builds only, give the media controls script a generated (i.e. fake) sourceURL.
+
+ * html/HTMLMediaElement.cpp:
+ (WebCore::HTMLMediaElement::parseAttribute):
+
2014-02-11 Samuel White <[email protected]>
AX: Add text replacement activity support to NSAccessibilitySelectTextWithCriteriaParameterizedAttribute.
Modified: trunk/Source/WebCore/html/HTMLMediaElement.cpp (163901 => 163902)
--- trunk/Source/WebCore/html/HTMLMediaElement.cpp 2014-02-11 21:12:48 UTC (rev 163901)
+++ trunk/Source/WebCore/html/HTMLMediaElement.cpp 2014-02-11 21:14:16 UTC (rev 163902)
@@ -5701,7 +5701,13 @@
if (overlayValue.isFunction())
return true;
- scriptController.evaluateInWorld(ScriptSourceCode(mediaControlsScript), world);
+#ifndef NDEBUG
+ // Setting a scriptURL allows the source to be debuggable in the inspector.
+ URL scriptURL = URL(ParsedURLString, ASCIILiteral("mediaControlsScript"));
+#else
+ URL scriptURL;
+#endif
+ scriptController.evaluateInWorld(ScriptSourceCode(mediaControlsScript, scriptURL), world);
if (exec->hadException()) {
exec->clearException();
return false;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes