Title: [194278] trunk/Source/WebCore
- Revision
- 194278
- Author
- [email protected]
- Date
- 2015-12-18 11:37:54 -0800 (Fri, 18 Dec 2015)
Log Message
Fix the !ENABLE(VIDEO) build after r192953 for <picture> element introduction
https://bugs.webkit.org/show_bug.cgi?id=152431
Since r192953, HTMLSourceElement is built even if video is disabled,
since it is used by the picture element.
But build was broken with -no-video, since HTMLMediaElement usage
should be guarded by VIDEO guards, and its JS bindings were still
under a video conditional.
Patch by Olivier Blin <[email protected]> on 2015-12-18
Reviewed by Alex Christensen.
No new tests, build fix only.
* html/HTMLSourceElement.cpp:
(WebCore::HTMLSourceElement::insertedInto):
(WebCore::HTMLSourceElement::removedFrom):
* html/HTMLSourceElement.idl:
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (194277 => 194278)
--- trunk/Source/WebCore/ChangeLog 2015-12-18 19:11:34 UTC (rev 194277)
+++ trunk/Source/WebCore/ChangeLog 2015-12-18 19:37:54 UTC (rev 194278)
@@ -1,3 +1,24 @@
+2015-12-18 Olivier Blin <[email protected]>
+
+ Fix the !ENABLE(VIDEO) build after r192953 for <picture> element introduction
+ https://bugs.webkit.org/show_bug.cgi?id=152431
+
+ Since r192953, HTMLSourceElement is built even if video is disabled,
+ since it is used by the picture element.
+
+ But build was broken with -no-video, since HTMLMediaElement usage
+ should be guarded by VIDEO guards, and its JS bindings were still
+ under a video conditional.
+
+ Reviewed by Alex Christensen.
+
+ No new tests, build fix only.
+
+ * html/HTMLSourceElement.cpp:
+ (WebCore::HTMLSourceElement::insertedInto):
+ (WebCore::HTMLSourceElement::removedFrom):
+ * html/HTMLSourceElement.idl:
+
2015-12-18 Brady Eidson <[email protected]>
Modern IDB: Refactor when opening the backing store takes place.
Modified: trunk/Source/WebCore/html/HTMLSourceElement.cpp (194277 => 194278)
--- trunk/Source/WebCore/html/HTMLSourceElement.cpp 2015-12-18 19:11:34 UTC (rev 194277)
+++ trunk/Source/WebCore/html/HTMLSourceElement.cpp 2015-12-18 19:37:54 UTC (rev 194278)
@@ -59,9 +59,12 @@
HTMLElement::insertedInto(insertionPoint);
Element* parent = parentElement();
if (parent) {
+#if ENABLE(VIDEO)
if (is<HTMLMediaElement>(*parent))
downcast<HTMLMediaElement>(*parent).sourceWasAdded(this);
- else if (is<HTMLPictureElement>(*parent))
+ else
+#endif
+ if (is<HTMLPictureElement>(*parent))
downcast<HTMLPictureElement>(*parent).sourcesChanged();
}
return InsertionDone;
@@ -73,9 +76,12 @@
if (!parent && is<Element>(removalRoot))
parent = &downcast<Element>(removalRoot);
if (parent) {
+#if ENABLE(VIDEO)
if (is<HTMLMediaElement>(*parent))
downcast<HTMLMediaElement>(*parent).sourceWasRemoved(this);
- else if (is<HTMLPictureElement>(*parent))
+ else
+#endif
+ if (is<HTMLPictureElement>(*parent))
downcast<HTMLPictureElement>(*parent).sourcesChanged();
}
HTMLElement::removedFrom(removalRoot);
Modified: trunk/Source/WebCore/html/HTMLSourceElement.idl (194277 => 194278)
--- trunk/Source/WebCore/html/HTMLSourceElement.idl 2015-12-18 19:11:34 UTC (rev 194277)
+++ trunk/Source/WebCore/html/HTMLSourceElement.idl 2015-12-18 19:37:54 UTC (rev 194278)
@@ -23,9 +23,7 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-[
- Conditional=VIDEO,
-] interface HTMLSourceElement : HTMLElement {
+interface HTMLSourceElement : HTMLElement {
[Reflect, URL] attribute DOMString src;
attribute DOMString type;
attribute DOMString media;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes