Changeset 165790 in webkit


Ignore:
Timestamp:
Mar 17, 2014, 7:30:59 PM (11 years ago)
Author:
matthew_hanson@apple.com
Message:

Merge r165753.

Location:
branches/safari-537.75-branch/Source
Files:
25 edited

Legend:

Unmodified
Added
Removed
  • branches/safari-537.75-branch/Source/WebCore/ChangeLog

    r165783 r165790  
     12014-03-17  Matthew Hanson  <matthew_hanson@apple.com>
     2
     3        Merge r165753.
     4
     5    2014-03-16  Brent Fulgham  <bfulgham@apple.com>
     6   
     7            Provide preference to enable additional AVFoundation options
     8            https://bugs.webkit.org/show_bug.cgi?id=130275
     9   
     10            Reviewed by Eric Carlson.
     11   
     12            * html/HTMLMediaElement.cpp:
     13            (WebCore::HTMLMediaElement::doesHaveAttribute): Added.
     14            * html/HTMLMediaElement.h:
     15            * page/Settings.in: Add new attribute.
     16            * platform/graphics/MediaPlayer.cpp:
     17            (WebCore::MediaPlayer::doesHaveAttribute): Added stub to call private player object's
     18            implementation of doesHaveAttribute.
     19            * platform/graphics/MediaPlayer.h:
     20            (WebCore::MediaPlayerClient::doesHaveAttribute):
     21            * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
     22            (WebCore::MediaPlayerPrivateAVFoundationCF::AVFWrapper::createAssetForURL): Check the <media> object,
     23            and notify AVFoundationCF to use URI option if relevant.
     24            * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
     25            (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVAssetForURL): Check the <media> object,
     26            and notify AVFoundation to use URI option if relevant.
     27   
    1282014-03-17  Joseph Pecoraro  <pecoraro@apple.com>
    229
  • branches/safari-537.75-branch/Source/WebCore/html/HTMLAttributeNames.in

    r149173 r165790  
    308308sortdirection
    309309span
     310x-itunes-inherit-uri-query-component
    310311x-webkit-speech
    311312x-webkit-grammar
  • branches/safari-537.75-branch/Source/WebCore/html/HTMLMediaElement.cpp

    r163833 r165790  
    51365136}
    51375137
    5138 }
    5139 #endif
     5138bool HTMLMediaElement::doesHaveAttribute(const AtomicString& attribute) const
     5139{
     5140    QualifiedName attributeName(nullAtom, attribute, nullAtom);
     5141    if (!fastHasAttribute(attributeName))
     5142        return false;
     5143
     5144    if (Settings* settings = document()->settings()) {
     5145        if (attributeName == HTMLNames::x_itunes_inherit_uri_query_componentAttr)
     5146            return settings->enableInheritURIQueryComponent();
     5147    }
     5148
     5149    return true;
     5150}
     5151
     5152bool MediaPlayer::doesHaveAttribute(const AtomicString& attribute) const
     5153{
     5154    if (!m_mediaPlayerClient)
     5155        return false;
     5156   
     5157    return m_mediaPlayerClient->doesHaveAttribute(attribute);
     5158}
     5159
     5160}
     5161
     5162#endif
  • branches/safari-537.75-branch/Source/WebCore/html/HTMLMediaElement.h

    r157973 r165790  
    119119    virtual bool supportsScanning() const;
    120120   
     121    virtual bool doesHaveAttribute(const AtomicString&) const override;
     122
    121123    PlatformMedia platformMedia() const;
    122124#if USE(ACCELERATED_COMPOSITING)
  • branches/safari-537.75-branch/Source/WebCore/page/Settings.in

    r160423 r165790  
    208208selectionIncludesAltImageText initial=true
    209209useLegacyBackgroundSizeShorthandBehavior initial=false
     210
     211enableInheritURIQueryComponent initial=false
  • branches/safari-537.75-branch/Source/WebCore/platform/graphics/MediaPlayer.h

    r158023 r165790  
    219219    virtual IntRect mediaPlayerWindowClipRect() { return IntRect(); }
    220220    virtual CachedResourceLoader* mediaPlayerCachedResourceLoader() { return 0; }
     221    virtual bool doesHaveAttribute(const AtomicString&) const { return false; }
    221222
    222223#if ENABLE(VIDEO_TRACK)
     
    264265    bool supportsScanning() const;
    265266    bool requiresImmediateCompositing() const;
     267    bool doesHaveAttribute(const AtomicString&) const;
    266268    PlatformMedia platformMedia() const;
    267269#if USE(ACCELERATED_COMPOSITING)
  • branches/safari-537.75-branch/Source/WebCore/platform/graphics/avfoundation/cf/AVFoundationCFSoftLinking.h

    r164680 r165790  
    385385#define AVCFPlayerItemLegibleOutputTextStylingResolutionSourceAndRulesOnly getAVCFPlayerItemLegibleOutputTextStylingResolutionSourceAndRulesOnly()
    386386
     387SOFT_LINK_VARIABLE_DLL_IMPORT(AVFoundationCF, AVCFURLAssetInheritURIQueryComponentFromReferencingURIKey, const CFStringRef);
     388#define AVCFURLAssetInheritURIQueryComponentFromReferencingURIKey getAVCFURLAssetInheritURIQueryComponentFromReferencingURIKey()
     389
    387390#endif
  • branches/safari-537.75-branch/Source/WebCore/platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp

    r164680 r165790  
    11/*
    2  * Copyright (C) 2011, 2012, 2013 Apple Inc. All rights reserved.
     2 * Copyright (C) 2011-2014 Apple Inc. All rights reserved.
    33 *
    44 * Redistribution and use in source and binary forms, with or without
     
    9393    RetainPtr<CGImageRef> createImageForTimeInRect(float, const IntRect&);
    9494
    95     void createAssetForURL(const String& url);
     95    void createAssetForURL(const String& url, bool inheritURI);
    9696    void setAsset(AVCFURLAssetRef);
    9797   
     
    399399    setDelayCallbacks(true);
    400400
     401    bool inheritURI = player()->doesHaveAttribute("x-itunes-inherit-uri-query-component");
     402
    401403    m_avfWrapper = new AVFWrapper(this);
    402     m_avfWrapper->createAssetForURL(url);
     404    m_avfWrapper->createAssetForURL(url, inheritURI);
    403405    setDelayCallbacks(false);
    404406}
     
    13121314}
    13131315
    1314 void AVFWrapper::createAssetForURL(const String& url)
     1316void AVFWrapper::createAssetForURL(const String& url, bool inheritURI)
    13151317{
    13161318    ASSERT(!avAsset());
     
    13181320    RetainPtr<CFURLRef> urlRef = KURL(ParsedURLString, url).createCFURL();
    13191321
    1320     AVCFURLAssetRef assetRef = AVCFURLAssetCreateWithURLAndOptions(kCFAllocatorDefault, urlRef.get(), 0, m_notificationQueue);
     1322    RetainPtr<CFMutableDictionaryRef> optionsRef = adoptCF(CFDictionaryCreateMutable(kCFAllocatorDefault, 0, &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks));
     1323
     1324    if (inheritURI)
     1325        CFDictionarySetValue(optionsRef.get(), AVCFURLAssetInheritURIQueryComponentFromReferencingURIKey, kCFBooleanTrue);
     1326
     1327    AVCFURLAssetRef assetRef = AVCFURLAssetCreateWithURLAndOptions(kCFAllocatorDefault, urlRef.get(), optionsRef.get(), m_notificationQueue);
    13211328    m_avAsset = adoptCF(assetRef);
    13221329}
  • branches/safari-537.75-branch/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm

    r157977 r165790  
    5353#import <wtf/Uint8Array.h>
    5454#import <wtf/text/CString.h>
     55#import <wtf/text/StringBuilder.h>
    5556
    5657#import <AVFoundation/AVFoundation.h>
     
    9596SOFT_LINK_POINTER(AVFoundation, AVMediaTypeAudio, NSString *)
    9697SOFT_LINK_POINTER(AVFoundation, AVPlayerItemDidPlayToEndTimeNotification, NSString *)
     98SOFT_LINK_POINTER(AVFoundation, AVURLAssetInheritURIQueryComponentFromReferencingURIKey, NSString *)
    9799SOFT_LINK_POINTER(AVFoundation, AVAssetImageGeneratorApertureModeCleanAperture, NSString *)
    98100SOFT_LINK_POINTER(AVFoundation, AVURLAssetReferenceRestrictionsKey, NSString *)
     
    113115#define AVMediaTypeAudio getAVMediaTypeAudio()
    114116#define AVPlayerItemDidPlayToEndTimeNotification getAVPlayerItemDidPlayToEndTimeNotification()
     117#define AVURLAssetInheritURIQueryComponentFromReferencingURIKey getAVURLAssetInheritURIQueryComponentFromReferencingURIKey()
    115118#define AVAssetImageGeneratorApertureModeCleanAperture getAVAssetImageGeneratorApertureModeCleanAperture()
    116119#define AVURLAssetReferenceRestrictionsKey getAVURLAssetReferenceRestrictionsKey()
     
    418421    if ([headerFields.get() count])
    419422        [options.get() setObject:headerFields.get() forKey:@"AVURLAssetHTTPHeaderFieldsKey"];
     423
     424    if (player()->doesHaveAttribute("x-itunes-inherit-uri-query-component"))
     425        [options.get() setObject: [NSNumber numberWithBool: TRUE] forKey: AVURLAssetInheritURIQueryComponentFromReferencingURIKey];
     426
    420427#endif
    421428
  • branches/safari-537.75-branch/Source/WebKit/mac/ChangeLog

    r164003 r165790  
     12014-03-17  Matthew Hanson  <matthew_hanson@apple.com>
     2
     3        Merge r165753.
     4
     5    2014-03-16  Brent Fulgham  <bfulgham@apple.com>
     6   
     7            Provide preference to enable additional AVFoundation options
     8            https://bugs.webkit.org/show_bug.cgi?id=130275
     9   
     10            Reviewed by Eric Carlson.
     11   
     12            * WebView/WebPreferenceKeysPrivate.h: Added new preference.
     13            * WebView/WebPreferences.mm:
     14            (+[WebPreferences initialize]): Initialize preference to false.
     15            (-[WebPreferences isInheritURIQueryComponentEnabled]): Added.
     16            (-[WebPreferences setEnableInheritURIQueryComponent:]): Added.
     17            * WebView/WebPreferencesPrivate.h:
     18            * WebView/WebView.mm:
     19            (-[WebView _preferencesChanged:]): Handle new preference.
     20   
    1212014-02-12  Matthew Hanson  <matthew_hanson@apple.com>
    222
  • branches/safari-537.75-branch/Source/WebKit/mac/WebView/WebPreferenceKeysPrivate.h

    r160423 r165790  
    161161#define WebKitObjectCacheSizePreferenceKey @"WebKitObjectCacheSizePreferenceKey"
    162162#define WebKitDebugFullPageZoomPreferenceKey @"WebKitDebugFullPageZoomPreferenceKey"
     163
     164#define WebKitEnableInheritURIQueryComponentPreferenceKey @"WebKitEnableInheritURIQueryComponent"
  • branches/safari-537.75-branch/Source/WebKit/mac/WebView/WebPreferences.mm

    r160423 r165790  
    11/*
    2  * Copyright (C) 2005, 2006, 2007, 2011, 2012 Apple Inc. All rights reserved.
     2 * Copyright (C) 2005, 2006, 2007, 2011, 2012, 2014 Apple Inc. All rights reserved.
    33 *           (C) 2006 Graham Dennis (graham.dennis@gmail.com)
    44 *
     
    422422       
    423423        [NSNumber numberWithBool:NO], WebKitUseLegacyTextAlignPositionedElementBehaviorPreferenceKey,
    424        
     424        [NSNumber numberWithBool:NO], WebKitEnableInheritURIQueryComponentPreferenceKey,
    425425        nil];
    426426
     
    16001600}
    16011601
     1602- (BOOL)isInheritURIQueryComponentEnabled
     1603{
     1604    return [self _boolValueForKey: WebKitEnableInheritURIQueryComponentPreferenceKey];
     1605}
     1606
     1607- (void)setEnableInheritURIQueryComponent:(BOOL)flag
     1608{
     1609    [self _setBoolValue:flag forKey: WebKitEnableInheritURIQueryComponentPreferenceKey];
     1610}
     1611
    16021612- (BOOL)mediaPlaybackRequiresUserGesture
    16031613{
  • branches/safari-537.75-branch/Source/WebKit/mac/WebView/WebPreferencesPrivate.h

    r160423 r165790  
    241241- (void)setSeamlessIFramesEnabled:(BOOL)enabled;
    242242
     243- (BOOL)isInheritURIQueryComponentEnabled;
     244- (void)setEnableInheritURIQueryComponent:(BOOL)flag;
     245
    243246// Other private methods
    244247- (void)_postPreferencesChangedNotification;
  • branches/safari-537.75-branch/Source/WebKit/mac/WebView/WebView.mm

    r160423 r165790  
    15591559    settings->setUseLegacyTextAlignPositionedElementBehavior([preferences useLegacyTextAlignPositionedElementBehavior]);
    15601560
     1561    settings->setEnableInheritURIQueryComponent([preferences isInheritURIQueryComponentEnabled]);
     1562
    15611563    switch ([preferences storageBlockingPolicy]) {
    15621564    case WebAllowAllStorage:
  • branches/safari-537.75-branch/Source/WebKit/win/ChangeLog

    r163571 r165790  
     12014-03-17  Matthew Hanson  <matthew_hanson@apple.com>
     2
     3        Merge r165753.
     4
     5    2014-03-17  Brent Fulgham  <bfulgham@apple.com>
     6   
     7            Provide preference to enable additional AVFoundation options
     8            https://bugs.webkit.org/show_bug.cgi?id=130275
     9   
     10            Reviewed by Eric Carlson.
     11   
     12            * Interfaces/IWebPreferencesPrivate.idl: Added new preference.
     13            * WebPreferenceKeysPrivate.h: Ditto.
     14            * WebPreferences.cpp:
     15            (WebPreferences::initializeDefaultSettings): Initialize preference to false.
     16            (WebPreferences::isInheritURIQueryComponentEnabled): Added.
     17            (WebPreferences::setEnableInheritURIQueryComponent): Added.
     18            * WebPreferences.h:
     19            * WebView.cpp:
     20            (WebView::notifyPreferencesChanged): Handle new preference.
     21   
    1222014-02-06  Brent Fulgham  <bfulgham@apple.com>
    223
  • branches/safari-537.75-branch/Source/WebKit/win/Interfaces/IWebPreferencesPrivate.idl

    r151491 r165790  
    143143    HRESULT setRequestAnimationFrameEnabled([in] BOOL);
    144144    HRESULT requestAnimationFrameEnabled([out, retval] BOOL*);
     145
     146    HRESULT isInheritURIQueryComponentEnabled([out, retval] BOOL* enabled);
     147    HRESULT setEnableInheritURIQueryComponent([in] BOOL enabled);
    145148}
  • branches/safari-537.75-branch/Source/WebKit/win/WebPreferenceKeysPrivate.h

    r151491 r165790  
    166166#define WebKitRequestAnimationFrameEnabledPreferenceKey "WebKitRequestAnimationFrameEnabled"
    167167
     168#define WebKitEnableInheritURIQueryComponentPreferenceKey "WebKitEnableInheritURIQueryComponent"
  • branches/safari-537.75-branch/Source/WebKit/win/WebPreferences.cpp

    r153717 r165790  
    281281    CFDictionaryAddValue(defaults, CFSTR(WebKitFullScreenEnabledPreferenceKey), kCFBooleanFalse);
    282282
     283    CFDictionaryAddValue(defaults, CFSTR(WebKitRequestAnimationFrameEnabledPreferenceKey), kCFBooleanFalse);
     284
    283285    defaultSettings = defaults;
    284286}
     
    17671769}
    17681770
     1771HRESULT WebPreferences::isInheritURIQueryComponentEnabled(BOOL* enabled)
     1772{
     1773    *enabled = boolValueForKey(WebKitEnableInheritURIQueryComponentPreferenceKey);
     1774    return S_OK;
     1775}
     1776
     1777HRESULT WebPreferences::setEnableInheritURIQueryComponent(BOOL enabled)
     1778{
     1779    setBoolValue(WebKitEnableInheritURIQueryComponentPreferenceKey, enabled);
     1780    return S_OK;
     1781}
  • branches/safari-537.75-branch/Source/WebKit/win/WebPreferences.h

    r151491 r165790  
    481481    virtual HRESULT STDMETHODCALLTYPE setRequestAnimationFrameEnabled(BOOL);
    482482
     483    virtual HRESULT STDMETHODCALLTYPE isInheritURIQueryComponentEnabled(BOOL*);
     484    virtual HRESULT STDMETHODCALLTYPE setEnableInheritURIQueryComponent(BOOL);
     485
    483486    // WebPreferences
    484487
  • branches/safari-537.75-branch/Source/WebKit/win/WebView.cpp

    r163571 r165790  
    50365036    settings->setRequestAnimationFrameEnabled(enabled);
    50375037
     5038    hr = prefsPrivate->isInheritURIQueryComponentEnabled(&enabled);
     5039    if (FAILED(hr))
     5040        return hr;
     5041    settings.setEnableInheritURIQueryComponent(enabled);
     5042
    50385043    return S_OK;
    50395044}
  • branches/safari-537.75-branch/Source/WebKit2/ChangeLog

    r165774 r165790  
     12014-03-17  Matthew Hanson  <matthew_hanson@apple.com>
     2
     3        Merge r165753.
     4
     5    2014-03-17  Brent Fulgham  <bfulgham@apple.com>
     6   
     7            Provide preference to enable additional AVFoundation options
     8            https://bugs.webkit.org/show_bug.cgi?id=130275
     9   
     10            Reviewed by Eric Carlson.
     11   
     12            * Shared/WebPreferencesStore.h: Added new preference.
     13            * UIProcess/API/C/WKPreferences.cpp:
     14            (WKPreferencesSetEnableInheritURIQueryComponent): Added.
     15            (WKPreferencesGetEnableInheritURIQueryComponent): Added.
     16            * UIProcess/API/C/WKPreferencesPrivate.h:
     17            * WebProcess/WebPage/WebPage.cpp:
     18            (WebKit::WebPage::updatePreferences): Handle new preference.
     19   
    1202014-03-17  Matthew Hanson  <matthew_hanson@apple.com>
    221
  • branches/safari-537.75-branch/Source/WebKit2/Shared/WebPreferencesStore.h

    r160423 r165790  
    164164    macro(UseLegacyTextAlignPositionedElementBehavior, useLegacyTextAlignPositionedElementBehavior, Bool, bool, false) \
    165165    \
     166    macro(EnableInheritURIQueryComponent, enableInheritURIQueryComponent, Bool, bool, false) \
    166167
    167168#define FOR_EACH_WEBKIT_DOUBLE_PREFERENCE(macro) \
  • branches/safari-537.75-branch/Source/WebKit2/UIProcess/API/C/WKPreferences.cpp

    r160423 r165790  
    11551155    return toAPI(toImpl(preferencesRef)->incrementalRenderingSuppressionTimeout());
    11561156}
     1157
     1158void WKPreferencesSetEnableInheritURIQueryComponent(WKPreferencesRef preferencesRef, bool enabled)
     1159{
     1160    toImpl(preferencesRef)->setEnableInheritURIQueryComponent(enabled);
     1161}
     1162
     1163bool WKPreferencesGetEnableInheritURIQueryComponent(WKPreferencesRef preferencesRef)
     1164{
     1165    return toImpl(preferencesRef)->enableInheritURIQueryComponent();
     1166}
  • branches/safari-537.75-branch/Source/WebKit2/UIProcess/API/C/WKPreferencesPrivate.h

    r160423 r165790  
    11/*
    2  * Copyright (C) 2010 Apple Inc. All rights reserved.
     2 * Copyright (C) 2010, 2014 Apple Inc. All rights reserved.
    33 *
    44 * Redistribution and use in source and binary forms, with or without
     
    294294WK_EXPORT bool WKPreferencesUseLegacyTextAlignPositionedElementBehavior(WKPreferencesRef preferencesRef);
    295295
     296// Default to false.
     297WK_EXPORT void WKPreferencesSetEnableInheritURIQueryComponent(WKPreferencesRef preferencesRef, bool enabled);
     298WK_EXPORT bool WKPreferencesGetEnableInheritURIQueryComponent(WKPreferencesRef preferencesRef);
     299
    296300#ifdef __cplusplus
    297301}
  • branches/safari-537.75-branch/Source/WebKit2/WebProcess/WebPage/WebPage.cpp

    r160423 r165790  
    26092609    settings->setShowsURLsInToolTips(store.getBoolValueForKey(WebPreferencesKey::showsURLsInToolTipsEnabledKey()));
    26102610
     2611    settings->setEnableInheritURIQueryComponent(store.getBoolValueForKey(WebPreferencesKey::enableInheritURIQueryComponentKey()));
     2612
    26112613#if ENABLE(HIDDEN_PAGE_DOM_TIMER_THROTTLING)
    26122614    settings->setHiddenPageDOMTimerThrottlingEnabled(store.getBoolValueForKey(WebPreferencesKey::hiddenPageDOMTimerThrottlingEnabledKey()));
Note: See TracChangeset for help on using the changeset viewer.