Changeset 194278 in webkit


Ignore:
Timestamp:
Dec 18, 2015 11:37:54 AM (8 years ago)
Author:
commit-queue@webkit.org
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 <Olivier Blin> 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:
Location:
trunk/Source/WebCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r194275 r194278  
     12015-12-18  Olivier Blin  <olivier.blin@softathome.com>
     2
     3        Fix the !ENABLE(VIDEO) build after r192953 for <picture> element introduction
     4        https://bugs.webkit.org/show_bug.cgi?id=152431
     5
     6        Since r192953, HTMLSourceElement is built even if video is disabled,
     7        since it is used by the picture element.
     8
     9        But build was broken with -no-video, since HTMLMediaElement usage
     10        should be guarded by VIDEO guards, and its JS bindings were still
     11        under a video conditional.
     12
     13        Reviewed by Alex Christensen.
     14
     15        No new tests, build fix only.
     16
     17        * html/HTMLSourceElement.cpp:
     18        (WebCore::HTMLSourceElement::insertedInto):
     19        (WebCore::HTMLSourceElement::removedFrom):
     20        * html/HTMLSourceElement.idl:
     21
    1222015-12-18  Brady Eidson  <beidson@apple.com>
    223
  • trunk/Source/WebCore/html/HTMLSourceElement.cpp

    r193859 r194278  
    6060    Element* parent = parentElement();
    6161    if (parent) {
     62#if ENABLE(VIDEO)
    6263        if (is<HTMLMediaElement>(*parent))
    6364            downcast<HTMLMediaElement>(*parent).sourceWasAdded(this);
    64         else if (is<HTMLPictureElement>(*parent))
     65        else
     66#endif
     67        if (is<HTMLPictureElement>(*parent))
    6568            downcast<HTMLPictureElement>(*parent).sourcesChanged();
    6669    }
     
    7477        parent = &downcast<Element>(removalRoot);
    7578    if (parent) {
     79#if ENABLE(VIDEO)
    7680        if (is<HTMLMediaElement>(*parent))
    7781            downcast<HTMLMediaElement>(*parent).sourceWasRemoved(this);
    78         else if (is<HTMLPictureElement>(*parent))
     82        else
     83#endif
     84        if (is<HTMLPictureElement>(*parent))
    7985            downcast<HTMLPictureElement>(*parent).sourcesChanged();
    8086    }
  • trunk/Source/WebCore/html/HTMLSourceElement.idl

    r165676 r194278  
    2424 */
    2525
    26 [
    27     Conditional=VIDEO,
    28 ] interface HTMLSourceElement : HTMLElement {
     26interface HTMLSourceElement : HTMLElement {
    2927[Reflect, URL] attribute DOMString src;
    3028attribute DOMString type;
Note: See TracChangeset for help on using the changeset viewer.