Changeset 219234 in webkit


Ignore:
Timestamp:
Jul 6, 2017 8:37:17 PM (7 years ago)
Author:
yoav@yoav.ws
Message:

[preload] Avoid reflecting "video" and "audio" when they are not supported as value
https://bugs.webkit.org/show_bug.cgi?id=174199

Reviewed by Youenn Fablet.

No new tests as video/audio is supported in tests. I tested this manually.

  • html/HTMLLinkElement.cpp:

(WebCore::HTMLLinkElement::as): Make sure "video" and "audio" will not be reflected when they are not supported.

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r219231 r219234  
     12017-07-06  Yoav Weiss  <yoav@yoav.ws>
     2
     3        [preload] Avoid reflecting "video" and "audio" when they are not supported `as` value
     4        https://bugs.webkit.org/show_bug.cgi?id=174199
     5
     6        Reviewed by Youenn Fablet.
     7
     8        No new tests as video/audio is supported in tests. I tested this manually.
     9
     10        * html/HTMLLinkElement.cpp:
     11        (WebCore::HTMLLinkElement::as): Make sure "video" and "audio" will not be reflected when they are not supported.
     12
    1132017-07-06  Chris Dumez  <cdumez@apple.com>
    214
  • trunk/Source/WebCore/html/HTMLLinkElement.cpp

    r218045 r219234  
    4949#include "MouseEvent.h"
    5050#include "RenderStyle.h"
     51#include "RuntimeEnabledFeatures.h"
    5152#include "SecurityOrigin.h"
    5253#include "Settings.h"
     
    232233        || equalLettersIgnoringASCIICase(as, "script")
    233234        || equalLettersIgnoringASCIICase(as, "style")
    234         || equalLettersIgnoringASCIICase(as, "video")
    235         || equalLettersIgnoringASCIICase(as, "audio")
     235        || (RuntimeEnabledFeatures::sharedFeatures().mediaPreloadingEnabled()
     236            && (equalLettersIgnoringASCIICase(as, "video")
     237                || equalLettersIgnoringASCIICase(as, "audio")))
    236238#if ENABLE(VIDEO_TRACK)
    237239        || equalLettersIgnoringASCIICase(as, "track")
Note: See TracChangeset for help on using the changeset viewer.