Diff
Modified: trunk/Source/WebCore/ChangeLog (165752 => 165753)
--- trunk/Source/WebCore/ChangeLog 2014-03-17 20:32:10 UTC (rev 165752)
+++ trunk/Source/WebCore/ChangeLog 2014-03-17 20:33:20 UTC (rev 165753)
@@ -1,3 +1,26 @@
+2014-03-16 Brent Fulgham <[email protected]>
+
+ Provide preference to enable additional AVFoundation options
+ https://bugs.webkit.org/show_bug.cgi?id=130275
+
+ Reviewed by Eric Carlson.
+
+ * html/HTMLMediaElement.cpp:
+ (WebCore::HTMLMediaElement::doesHaveAttribute): Added.
+ * html/HTMLMediaElement.h:
+ * page/Settings.in: Add new attribute.
+ * platform/graphics/MediaPlayer.cpp:
+ (WebCore::MediaPlayer::doesHaveAttribute): Added stub to call private player object's
+ implementation of doesHaveAttribute.
+ * platform/graphics/MediaPlayer.h:
+ (WebCore::MediaPlayerClient::doesHaveAttribute):
+ * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
+ (WebCore::MediaPlayerPrivateAVFoundationCF::AVFWrapper::createAssetForURL): Check the <media> object,
+ and notify AVFoundationCF to use URI option if relevant.
+ * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
+ (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVAssetForURL): Check the <media> object,
+ and notify AVFoundation to use URI option if relevant.
+
2014-03-17 Jer Noble <[email protected]>
[EME] Add NULL protections in SourceBuffer and MediaSource.
Modified: trunk/Source/WebCore/html/HTMLAttributeNames.in (165752 => 165753)
--- trunk/Source/WebCore/html/HTMLAttributeNames.in 2014-03-17 20:32:10 UTC (rev 165752)
+++ trunk/Source/WebCore/html/HTMLAttributeNames.in 2014-03-17 20:33:20 UTC (rev 165753)
@@ -356,3 +356,4 @@
webkit-playsinline
x-webkit-airplay
x-webkit-wirelessvideoplaybackdisabled
+x-itunes-inherit-uri-query-component
Modified: trunk/Source/WebCore/html/HTMLMediaElement.cpp (165752 => 165753)
--- trunk/Source/WebCore/html/HTMLMediaElement.cpp 2014-03-17 20:32:10 UTC (rev 165752)
+++ trunk/Source/WebCore/html/HTMLMediaElement.cpp 2014-03-17 20:33:20 UTC (rev 165753)
@@ -5973,6 +5973,20 @@
}
}
+bool HTMLMediaElement::doesHaveAttribute(const AtomicString& attribute) const
+{
+ QualifiedName attributeName(nullAtom, attribute, nullAtom);
+ if (!fastHasAttribute(attributeName))
+ return false;
+
+ if (Settings* settings = document().settings()) {
+ if (attributeName == HTMLNames::x_itunes_inherit_uri_query_componentAttr)
+ return settings->enableInheritURIQueryComponent();
+ }
+
+ return true;
}
+
+}
#endif
Modified: trunk/Source/WebCore/html/HTMLMediaElement.h (165752 => 165753)
--- trunk/Source/WebCore/html/HTMLMediaElement.h 2014-03-17 20:32:10 UTC (rev 165752)
+++ trunk/Source/WebCore/html/HTMLMediaElement.h 2014-03-17 20:33:20 UTC (rev 165753)
@@ -131,6 +131,8 @@
virtual bool supportsSave() const;
virtual bool supportsScanning() const override;
+ virtual bool doesHaveAttribute(const AtomicString&) const override;
+
PlatformMedia platformMedia() const;
PlatformLayer* platformLayer() const;
#if PLATFORM(IOS)
Modified: trunk/Source/WebCore/page/Settings.in (165752 => 165753)
--- trunk/Source/WebCore/page/Settings.in 2014-03-17 20:32:10 UTC (rev 165752)
+++ trunk/Source/WebCore/page/Settings.in 2014-03-17 20:33:20 UTC (rev 165753)
@@ -218,3 +218,5 @@
# FIXME: This is unneeded and should be removed.
alwaysUseBaselineOfPrimaryFont initial=false
+
+enableInheritURIQueryComponent initial=false
Modified: trunk/Source/WebCore/platform/graphics/MediaPlayer.cpp (165752 => 165753)
--- trunk/Source/WebCore/platform/graphics/MediaPlayer.cpp 2014-03-17 20:32:10 UTC (rev 165752)
+++ trunk/Source/WebCore/platform/graphics/MediaPlayer.cpp 2014-03-17 20:33:20 UTC (rev 165753)
@@ -1404,6 +1404,14 @@
registerMediaEngine(addMediaEngine);
}
+bool MediaPlayer::doesHaveAttribute(const AtomicString& attribute) const
+{
+ if (!m_mediaPlayerClient)
+ return false;
+
+ return m_mediaPlayerClient->doesHaveAttribute(attribute);
}
+}
+
#endif
Modified: trunk/Source/WebCore/platform/graphics/MediaPlayer.h (165752 => 165753)
--- trunk/Source/WebCore/platform/graphics/MediaPlayer.h 2014-03-17 20:32:10 UTC (rev 165752)
+++ trunk/Source/WebCore/platform/graphics/MediaPlayer.h 2014-03-17 20:33:20 UTC (rev 165753)
@@ -247,6 +247,7 @@
virtual HostWindow* mediaPlayerHostWindow() { return 0; }
virtual IntRect mediaPlayerWindowClipRect() { return IntRect(); }
virtual CachedResourceLoader* mediaPlayerCachedResourceLoader() { return 0; }
+ virtual bool doesHaveAttribute(const AtomicString&) const { return false; }
#if ENABLE(VIDEO_TRACK)
virtual void mediaPlayerDidAddAudioTrack(PassRefPtr<AudioTrackPrivate>) { }
@@ -262,7 +263,6 @@
#endif
#endif
-
virtual bool mediaPlayerShouldWaitForResponseToAuthenticationChallenge(const AuthenticationChallenge&) { return false; }
};
@@ -298,6 +298,7 @@
bool supportsSave() const;
bool supportsScanning() const;
bool requiresImmediateCompositing() const;
+ bool doesHaveAttribute(const AtomicString&) const;
PlatformMedia platformMedia() const;
PlatformLayer* platformLayer() const;
#if PLATFORM(IOS)
Modified: trunk/Source/WebCore/platform/graphics/avfoundation/cf/AVFoundationCFSoftLinking.h (165752 => 165753)
--- trunk/Source/WebCore/platform/graphics/avfoundation/cf/AVFoundationCFSoftLinking.h 2014-03-17 20:32:10 UTC (rev 165752)
+++ trunk/Source/WebCore/platform/graphics/avfoundation/cf/AVFoundationCFSoftLinking.h 2014-03-17 20:33:20 UTC (rev 165753)
@@ -384,4 +384,7 @@
SOFT_LINK_VARIABLE_DLL_IMPORT(AVFoundationCF, AVCFPlayerItemLegibleOutputTextStylingResolutionSourceAndRulesOnly, const CFStringRef);
#define AVCFPlayerItemLegibleOutputTextStylingResolutionSourceAndRulesOnly getAVCFPlayerItemLegibleOutputTextStylingResolutionSourceAndRulesOnly()
+SOFT_LINK_VARIABLE_DLL_IMPORT(AVFoundationCF, AVCFURLAssetInheritURIQueryComponentFromReferencingURIKey, const CFStringRef);
+#define AVCFURLAssetInheritURIQueryComponentFromReferencingURIKey getAVCFURLAssetInheritURIQueryComponentFromReferencingURIKey()
+
#endif
Modified: trunk/Source/WebCore/platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp (165752 => 165753)
--- trunk/Source/WebCore/platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp 2014-03-17 20:32:10 UTC (rev 165752)
+++ trunk/Source/WebCore/platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp 2014-03-17 20:33:20 UTC (rev 165753)
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2011, 2012, 2013 Apple Inc. All rights reserved.
+ * Copyright (C) 2011-2014 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -98,7 +98,7 @@
void destroyImageGenerator();
RetainPtr<CGImageRef> createImageForTimeInRect(float, const IntRect&);
- void createAssetForURL(const String& url);
+ void createAssetForURL(const String& url, bool inheritURI);
void setAsset(AVCFURLAssetRef);
void createPlayer(IDirect3DDevice9*);
@@ -412,8 +412,10 @@
setDelayCallbacks(true);
+ bool inheritURI = player()->doesHaveAttribute("x-itunes-inherit-uri-query-component");
+
m_avfWrapper = new AVFWrapper(this);
- m_avfWrapper->createAssetForURL(url);
+ m_avfWrapper->createAssetForURL(url, inheritURI);
setDelayCallbacks(false);
}
@@ -1324,13 +1326,18 @@
dispatch_async_f(dispatch_get_main_queue(), context, destroyAVFWrapper);
}
-void AVFWrapper::createAssetForURL(const String& url)
+void AVFWrapper::createAssetForURL(const String& url, bool inheritURI)
{
ASSERT(!avAsset());
RetainPtr<CFURLRef> urlRef = URL(ParsedURLString, url).createCFURL();
- AVCFURLAssetRef assetRef = AVCFURLAssetCreateWithURLAndOptions(kCFAllocatorDefault, urlRef.get(), 0, m_notificationQueue);
+ RetainPtr<CFMutableDictionaryRef> optionsRef = adoptCF(CFDictionaryCreateMutable(kCFAllocatorDefault, 0, &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks));
+
+ if (inheritURI)
+ CFDictionarySetValue(optionsRef.get(), AVCFURLAssetInheritURIQueryComponentFromReferencingURIKey, kCFBooleanTrue);
+
+ AVCFURLAssetRef assetRef = AVCFURLAssetCreateWithURLAndOptions(kCFAllocatorDefault, urlRef.get(), optionsRef.get(), m_notificationQueue);
m_avAsset = adoptCF(assetRef);
}
Modified: trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm (165752 => 165753)
--- trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm 2014-03-17 20:32:10 UTC (rev 165752)
+++ trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm 2014-03-17 20:33:20 UTC (rev 165753)
@@ -62,6 +62,7 @@
#import <wtf/CurrentTime.h>
#import <wtf/Functional.h>
#import <wtf/text/CString.h>
+#import <wtf/text/StringBuilder.h>
#if ENABLE(AVF_CAPTIONS)
#include "TextTrack.h"
@@ -132,6 +133,7 @@
SOFT_LINK_POINTER(AVFoundation, AVMediaTypeVideo, NSString *)
SOFT_LINK_POINTER(AVFoundation, AVMediaTypeAudio, NSString *)
SOFT_LINK_POINTER(AVFoundation, AVPlayerItemDidPlayToEndTimeNotification, NSString *)
+SOFT_LINK_POINTER(AVFoundation, AVURLAssetInheritURIQueryComponentFromReferencingURIKey, NSString *)
SOFT_LINK_POINTER(AVFoundation, AVAssetImageGeneratorApertureModeCleanAperture, NSString *)
SOFT_LINK_POINTER(AVFoundation, AVURLAssetReferenceRestrictionsKey, NSString *)
SOFT_LINK_POINTER(AVFoundation, AVLayerVideoGravityResizeAspect, NSString *)
@@ -153,6 +155,7 @@
#define AVMediaTypeVideo getAVMediaTypeVideo()
#define AVMediaTypeAudio getAVMediaTypeAudio()
#define AVPlayerItemDidPlayToEndTimeNotification getAVPlayerItemDidPlayToEndTimeNotification()
+#define AVURLAssetInheritURIQueryComponentFromReferencingURIKey getAVURLAssetInheritURIQueryComponentFromReferencingURIKey()
#define AVAssetImageGeneratorApertureModeCleanAperture getAVAssetImageGeneratorApertureModeCleanAperture()
#define AVURLAssetReferenceRestrictionsKey getAVURLAssetReferenceRestrictionsKey()
#define AVLayerVideoGravityResizeAspect getAVLayerVideoGravityResizeAspect()
@@ -610,6 +613,9 @@
if ([headerFields.get() count])
[options.get() setObject:headerFields.get() forKey:@"AVURLAssetHTTPHeaderFieldsKey"];
+ if (player()->doesHaveAttribute("x-itunes-inherit-uri-query-component"))
+ [options.get() setObject: [NSNumber numberWithBool: TRUE] forKey: AVURLAssetInheritURIQueryComponentFromReferencingURIKey];
+
#if ENABLE(AVF_CAPTIONS)
const Vector<RefPtr<PlatformTextTrack>>& outOfBandTrackSources = player()->outOfBandTrackSources();
if (!outOfBandTrackSources.isEmpty()) {
Modified: trunk/Source/WebKit/mac/ChangeLog (165752 => 165753)
--- trunk/Source/WebKit/mac/ChangeLog 2014-03-17 20:32:10 UTC (rev 165752)
+++ trunk/Source/WebKit/mac/ChangeLog 2014-03-17 20:33:20 UTC (rev 165753)
@@ -1,3 +1,19 @@
+2014-03-16 Brent Fulgham <[email protected]>
+
+ Provide preference to enable additional AVFoundation options
+ https://bugs.webkit.org/show_bug.cgi?id=130275
+
+ Reviewed by Eric Carlson.
+
+ * WebView/WebPreferenceKeysPrivate.h: Added new preference.
+ * WebView/WebPreferences.mm:
+ (+[WebPreferences initialize]): Initialize preference to false.
+ (-[WebPreferences isInheritURIQueryComponentEnabled]): Added.
+ (-[WebPreferences setEnableInheritURIQueryComponent:]): Added.
+ * WebView/WebPreferencesPrivate.h:
+ * WebView/WebView.mm:
+ (-[WebView _preferencesChanged:]): Handle new preference.
+
2014-03-16 Darin Adler <[email protected]>
Remove all deprecatedCharacters use from WebKit directory
Modified: trunk/Source/WebKit/mac/WebView/WebPreferenceKeysPrivate.h (165752 => 165753)
--- trunk/Source/WebKit/mac/WebView/WebPreferenceKeysPrivate.h 2014-03-17 20:32:10 UTC (rev 165752)
+++ trunk/Source/WebKit/mac/WebView/WebPreferenceKeysPrivate.h 2014-03-17 20:33:20 UTC (rev 165753)
@@ -209,3 +209,5 @@
#define WebKitTextFieldRemoteInspectionEnabledPreferenceKey @"WebKitTextFieldRemoteInspectionEnabled"
#endif
#endif
+
+#define WebKitEnableInheritURIQueryComponentPreferenceKey @"WebKitEnableInheritURIQueryComponent"
Modified: trunk/Source/WebKit/mac/WebView/WebPreferences.mm (165752 => 165753)
--- trunk/Source/WebKit/mac/WebView/WebPreferences.mm 2014-03-17 20:32:10 UTC (rev 165752)
+++ trunk/Source/WebKit/mac/WebView/WebPreferences.mm 2014-03-17 20:33:20 UTC (rev 165753)
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2005, 2006, 2007, 2011, 2012 Apple Inc. All rights reserved.
+ * Copyright (C) 2005, 2006, 2007, 2011, 2012, 2014 Apple Inc. All rights reserved.
* (C) 2006 Graham Dennis ([email protected])
*
* Redistribution and use in source and binary forms, with or without
@@ -598,6 +598,7 @@
#if ENABLE(IMAGE_CONTROLS)
[NSNumber numberWithBool:NO], WebKitImageControlsEnabledPreferenceKey,
#endif
+ [NSNumber numberWithBool:NO], WebKitEnableInheritURIQueryComponentPreferenceKey,
nil];
#if !PLATFORM(IOS)
@@ -2156,6 +2157,16 @@
return false;
}
+- (BOOL)isInheritURIQueryComponentEnabled
+{
+ return [self _boolValueForKey: WebKitEnableInheritURIQueryComponentPreferenceKey];
+}
+
+- (void)setEnableInheritURIQueryComponent:(BOOL)flag
+{
+ [self _setBoolValue:flag forKey: WebKitEnableInheritURIQueryComponentPreferenceKey];
+}
+
#if PLATFORM(IOS)
- (BOOL)mediaPlaybackAllowsAirPlay
{
Modified: trunk/Source/WebKit/mac/WebView/WebPreferencesPrivate.h (165752 => 165753)
--- trunk/Source/WebKit/mac/WebView/WebPreferencesPrivate.h 2014-03-17 20:32:10 UTC (rev 165752)
+++ trunk/Source/WebKit/mac/WebView/WebPreferencesPrivate.h 2014-03-17 20:33:20 UTC (rev 165753)
@@ -287,6 +287,9 @@
- (BOOL)mediaPlaybackAllowsAirPlay;
#endif
+- (BOOL)isInheritURIQueryComponentEnabled;
+- (void)setEnableInheritURIQueryComponent:(BOOL)flag;
+
// Other private methods
#if TARGET_OS_IPHONE
- (size_t)_maximumImageSize;
Modified: trunk/Source/WebKit/mac/WebView/WebView.mm (165752 => 165753)
--- trunk/Source/WebKit/mac/WebView/WebView.mm 2014-03-17 20:32:10 UTC (rev 165752)
+++ trunk/Source/WebKit/mac/WebView/WebView.mm 2014-03-17 20:33:20 UTC (rev 165753)
@@ -2392,6 +2392,8 @@
settings.setShouldConvertPositionStyleOnCopy([preferences shouldConvertPositionStyleOnCopy]);
+ settings.setEnableInheritURIQueryComponent([preferences isInheritURIQueryComponentEnabled]);
+
switch ([preferences storageBlockingPolicy]) {
case WebAllowAllStorage:
settings.setStorageBlockingPolicy(SecurityOrigin::AllowAllStorage);
Modified: trunk/Source/WebKit/win/ChangeLog (165752 => 165753)
--- trunk/Source/WebKit/win/ChangeLog 2014-03-17 20:32:10 UTC (rev 165752)
+++ trunk/Source/WebKit/win/ChangeLog 2014-03-17 20:33:20 UTC (rev 165753)
@@ -1,3 +1,20 @@
+2014-03-17 Brent Fulgham <[email protected]>
+
+ Provide preference to enable additional AVFoundation options
+ https://bugs.webkit.org/show_bug.cgi?id=130275
+
+ Reviewed by Eric Carlson.
+
+ * Interfaces/IWebPreferencesPrivate.idl: Added new preference.
+ * WebPreferenceKeysPrivate.h: Ditto.
+ * WebPreferences.cpp:
+ (WebPreferences::initializeDefaultSettings): Initialize preference to false.
+ (WebPreferences::isInheritURIQueryComponentEnabled): Added.
+ (WebPreferences::setEnableInheritURIQueryComponent): Added.
+ * WebPreferences.h:
+ * WebView.cpp:
+ (WebView::notifyPreferencesChanged): Handle new preference.
+
2014-03-16 Darin Adler <[email protected]>
Remove all deprecatedCharacters use from WebKit
Modified: trunk/Source/WebKit/win/Interfaces/IWebPreferencesPrivate.idl (165752 => 165753)
--- trunk/Source/WebKit/win/Interfaces/IWebPreferencesPrivate.idl 2014-03-17 20:32:10 UTC (rev 165752)
+++ trunk/Source/WebKit/win/Interfaces/IWebPreferencesPrivate.idl 2014-03-17 20:33:20 UTC (rev 165753)
@@ -148,4 +148,7 @@
HRESULT screenFontSubstitutionEnabled([out, retval] BOOL* enabled);
HRESULT setScreenFontSubstitutionEnabled([in] BOOL enabled);
+
+ HRESULT isInheritURIQueryComponentEnabled([out, retval] BOOL* enabled);
+ HRESULT setEnableInheritURIQueryComponent([in] BOOL enabled);
}
Modified: trunk/Source/WebKit/win/WebPreferenceKeysPrivate.h (165752 => 165753)
--- trunk/Source/WebKit/win/WebPreferenceKeysPrivate.h 2014-03-17 20:32:10 UTC (rev 165752)
+++ trunk/Source/WebKit/win/WebPreferenceKeysPrivate.h 2014-03-17 20:33:20 UTC (rev 165753)
@@ -166,3 +166,5 @@
#define WebKitMockScrollbarsEnabledPreferenceKey "WebKitMockScrollbarsEnabled"
#define WebKitScreenFontSubstitutionEnabledPreferenceKey "WebKitScreenFontSubstitutionEnabledPreferenceKey"
+
+#define WebKitEnableInheritURIQueryComponentPreferenceKey "WebKitEnableInheritURIQueryComponent"
Modified: trunk/Source/WebKit/win/WebPreferences.cpp (165752 => 165753)
--- trunk/Source/WebKit/win/WebPreferences.cpp 2014-03-17 20:32:10 UTC (rev 165752)
+++ trunk/Source/WebKit/win/WebPreferences.cpp 2014-03-17 20:33:20 UTC (rev 165753)
@@ -280,6 +280,8 @@
CFDictionaryAddValue(defaults, CFSTR(WebKitFullScreenEnabledPreferenceKey), kCFBooleanFalse);
+ CFDictionaryAddValue(defaults, CFSTR(WebKitRequestAnimationFrameEnabledPreferenceKey), kCFBooleanFalse);
+
defaultSettings = defaults;
}
@@ -1802,3 +1804,14 @@
return S_OK;
}
+HRESULT WebPreferences::isInheritURIQueryComponentEnabled(BOOL* enabled)
+{
+ *enabled = boolValueForKey(WebKitEnableInheritURIQueryComponentPreferenceKey);
+ return S_OK;
+}
+
+HRESULT WebPreferences::setEnableInheritURIQueryComponent(BOOL enabled)
+{
+ setBoolValue(WebKitEnableInheritURIQueryComponentPreferenceKey, enabled);
+ return S_OK;
+}
Modified: trunk/Source/WebKit/win/WebPreferences.h (165752 => 165753)
--- trunk/Source/WebKit/win/WebPreferences.h 2014-03-17 20:32:10 UTC (rev 165752)
+++ trunk/Source/WebKit/win/WebPreferences.h 2014-03-17 20:33:20 UTC (rev 165753)
@@ -483,6 +483,9 @@
virtual HRESULT STDMETHODCALLTYPE screenFontSubstitutionEnabled(BOOL*);
virtual HRESULT STDMETHODCALLTYPE setScreenFontSubstitutionEnabled(BOOL);
+ virtual HRESULT STDMETHODCALLTYPE isInheritURIQueryComponentEnabled(BOOL*);
+ virtual HRESULT STDMETHODCALLTYPE setEnableInheritURIQueryComponent(BOOL);
+
// WebPreferences
// This method accesses a different preference key than developerExtrasEnabled.
Modified: trunk/Source/WebKit/win/WebView.cpp (165752 => 165753)
--- trunk/Source/WebKit/win/WebView.cpp 2014-03-17 20:32:10 UTC (rev 165752)
+++ trunk/Source/WebKit/win/WebView.cpp 2014-03-17 20:33:20 UTC (rev 165753)
@@ -5052,6 +5052,11 @@
return hr;
settings.setMockScrollbarsEnabled(enabled);
+ hr = prefsPrivate->isInheritURIQueryComponentEnabled(&enabled);
+ if (FAILED(hr))
+ return hr;
+ settings.setEnableInheritURIQueryComponent(enabled);
+
hr = prefsPrivate->screenFontSubstitutionEnabled(&enabled);
if (FAILED(hr))
return hr;
Modified: trunk/Source/WebKit2/ChangeLog (165752 => 165753)
--- trunk/Source/WebKit2/ChangeLog 2014-03-17 20:32:10 UTC (rev 165752)
+++ trunk/Source/WebKit2/ChangeLog 2014-03-17 20:33:20 UTC (rev 165753)
@@ -1,3 +1,18 @@
+2014-03-17 Brent Fulgham <[email protected]>
+
+ Provide preference to enable additional AVFoundation options
+ https://bugs.webkit.org/show_bug.cgi?id=130275
+
+ Reviewed by Eric Carlson.
+
+ * Shared/WebPreferencesStore.h: Added new preference.
+ * UIProcess/API/C/WKPreferences.cpp:
+ (WKPreferencesSetEnableInheritURIQueryComponent): Added.
+ (WKPreferencesGetEnableInheritURIQueryComponent): Added.
+ * UIProcess/API/C/WKPreferencesPrivate.h:
+ * WebProcess/WebPage/WebPage.cpp:
+ (WebKit::WebPage::updatePreferences): Handle new preference.
+
2014-03-17 Alexey Proskuryakov <[email protected]>
[Mac] getAttributedSubstringFromRange arguments are incorrectly named
Modified: trunk/Source/WebKit2/Shared/WebPreferencesStore.h (165752 => 165753)
--- trunk/Source/WebKit2/Shared/WebPreferencesStore.h 2014-03-17 20:32:10 UTC (rev 165752)
+++ trunk/Source/WebKit2/Shared/WebPreferencesStore.h 2014-03-17 20:33:20 UTC (rev 165753)
@@ -214,6 +214,7 @@
macro(AlwaysUseAcceleratedOverflowScroll, alwaysUseAcceleratedOverflowScroll, Bool, bool, false) \
macro(PasswordEchoEnabled, passwordEchoEnabled, Bool, bool, DEFAULT_PASSWORD_ECHO_ENABLED) \
macro(ImageControlsEnabled, imageControlsEnabled, Bool, bool, false) \
+ macro(EnableInheritURIQueryComponent, enableInheritURIQueryComponent, Bool, bool, false) \
#define FOR_EACH_WEBKIT_DOUBLE_PREFERENCE(macro) \
macro(PDFScaleFactor, pdfScaleFactor, Double, double, 0) \
Modified: trunk/Source/WebKit2/UIProcess/API/C/WKPreferences.cpp (165752 => 165753)
--- trunk/Source/WebKit2/UIProcess/API/C/WKPreferences.cpp 2014-03-17 20:32:10 UTC (rev 165752)
+++ trunk/Source/WebKit2/UIProcess/API/C/WKPreferences.cpp 2014-03-17 20:33:20 UTC (rev 165753)
@@ -1255,3 +1255,13 @@
{
return toImpl(preferencesRef)->telephoneNumberParsingEnabled();
}
+
+void WKPreferencesSetEnableInheritURIQueryComponent(WKPreferencesRef preferencesRef, bool enabled)
+{
+ toImpl(preferencesRef)->setEnableInheritURIQueryComponent(enabled);
+}
+
+bool WKPreferencesGetEnableInheritURIQueryComponent(WKPreferencesRef preferencesRef)
+{
+ return toImpl(preferencesRef)->enableInheritURIQueryComponent();
+}
Modified: trunk/Source/WebKit2/UIProcess/API/C/WKPreferencesPrivate.h (165752 => 165753)
--- trunk/Source/WebKit2/UIProcess/API/C/WKPreferencesPrivate.h 2014-03-17 20:32:10 UTC (rev 165752)
+++ trunk/Source/WebKit2/UIProcess/API/C/WKPreferencesPrivate.h 2014-03-17 20:33:20 UTC (rev 165753)
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2010 Apple Inc. All rights reserved.
+ * Copyright (C) 2010, 2014 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -322,6 +322,10 @@
WK_EXPORT void WKPreferencesSetTelephoneNumberParsingEnabled(WKPreferencesRef preferencesRef, bool enabled);
WK_EXPORT bool WKPreferencesGetTelephoneNumberParsingEnabled(WKPreferencesRef preferencesRef);
+// Default to false.
+WK_EXPORT void WKPreferencesSetEnableInheritURIQueryComponent(WKPreferencesRef preferencesRef, bool enabled);
+WK_EXPORT bool WKPreferencesGetEnableInheritURIQueryComponent(WKPreferencesRef preferencesRef);
+
#ifdef __cplusplus
}
#endif
Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp (165752 => 165753)
--- trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp 2014-03-17 20:32:10 UTC (rev 165752)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp 2014-03-17 20:33:20 UTC (rev 165753)
@@ -2638,6 +2638,8 @@
settings.setLayoutInterval(std::chrono::duration_cast<std::chrono::milliseconds>(std::chrono::duration<double>(store.getDoubleValueForKey(WebPreferencesKey::layoutIntervalKey()))));
settings.setMaxParseDuration(store.getDoubleValueForKey(WebPreferencesKey::maxParseDurationKey()));
+ settings.setEnableInheritURIQueryComponent(store.getBoolValueForKey(WebPreferencesKey::enableInheritURIQueryComponentKey()));
+
if (store.getBoolValueForKey(WebPreferencesKey::pageVisibilityBasedProcessSuppressionEnabledKey()))
m_processSuppressionDisabledByWebPreference.stop();
else