summaryrefslogtreecommitdiffstats
path: root/WebKit/mac
diff options
context:
space:
mode:
Diffstat (limited to 'WebKit/mac')
-rw-r--r--WebKit/mac/ChangeLog141
-rw-r--r--WebKit/mac/Configurations/FeatureDefines.xcconfig4
-rw-r--r--WebKit/mac/Configurations/Version.xcconfig2
-rw-r--r--WebKit/mac/MigrateHeaders.make2
-rw-r--r--WebKit/mac/Misc/WebCoreStatistics.h3
-rw-r--r--WebKit/mac/Misc/WebCoreStatistics.mm9
-rw-r--r--WebKit/mac/Plugins/Hosted/NetscapePluginInstanceProxy.h14
-rw-r--r--WebKit/mac/Plugins/Hosted/NetscapePluginInstanceProxy.mm9
-rw-r--r--WebKit/mac/WebCoreSupport/WebChromeClient.h1
-rw-r--r--WebKit/mac/WebCoreSupport/WebChromeClient.mm5
-rw-r--r--WebKit/mac/WebView/WebPreferenceKeysPrivate.h2
-rw-r--r--WebKit/mac/WebView/WebPreferences.mm24
-rw-r--r--WebKit/mac/WebView/WebPreferencesPrivate.h7
-rw-r--r--WebKit/mac/WebView/WebUIDelegatePrivate.h1
-rw-r--r--WebKit/mac/WebView/WebView.mm57
-rw-r--r--WebKit/mac/WebView/WebViewData.h3
-rw-r--r--WebKit/mac/WebView/WebViewInternal.h4
17 files changed, 273 insertions, 15 deletions
diff --git a/WebKit/mac/ChangeLog b/WebKit/mac/ChangeLog
index ea2393a..c59d8b4 100644
--- a/WebKit/mac/ChangeLog
+++ b/WebKit/mac/ChangeLog
@@ -1,3 +1,144 @@
+2010-06-23 Philippe Normand <pnormand@igalia.com>
+
+ Reviewed by Eric Carlson.
+
+ [GStreamer] on Mac OS use a runloop observer to process the glib context iterations
+ https://bugs.webkit.org/show_bug.cgi?id=35747
+
+ If VIDEO and GSTREAMER are enabled, make the WebView start a
+ runloop observer that will trigger the glib main context
+ iterations. Those are needed by the GStreamer player only at the
+ moment but could later be used for other GLib-dependant components
+ if required.
+
+ * WebView/WebView.mm:
+ (-[WebView _commonInitializationWithFrameName:groupName:usesDocumentViews:]):
+ (-[WebView _close]):
+ (-[WebView _clearGlibLoopObserver]):
+ (glibContextIterationCallback):
+ (-[WebView _scheduleGlibContextIterations]):
+ * WebView/WebViewData.h:
+ * WebView/WebViewInternal.h:
+
+2010-07-03 Jon Honeycutt <jhoneycutt@apple.com>
+
+ The missing plug-in indicator should be clickable
+
+ https://bugs.webkit.org/show_bug.cgi?id=41550
+ <rdar://problem/8132162>
+
+ From an original patch by Kevin Decker.
+
+ Reviewed by Darin Adler.
+
+ * WebCoreSupport/WebChromeClient.h:
+ Declare an override of missingPluginButtonClicked().
+
+ * WebCoreSupport/WebChromeClient.mm:
+ (WebChromeClient::missingPluginButtonClicked):
+ Call the UIDelegate's method.
+
+ * WebView/WebUIDelegatePrivate.h:
+ Declare didPressMissingPluginButton.
+
+2010-07-01 Timothy Hatcher <timothy@apple.com>
+
+ Provide a WebView preference to disable DNS prefetching.
+
+ https://bugs.webkit.org/show_bug.cgi?id=28825
+ rdar://problem/7181249
+
+ Reviewed by Darin Adler.
+
+ * WebView/WebPreferenceKeysPrivate.h: Added WebKitDNSPrefetchingEnabledPreferenceKey.
+ * WebView/WebPreferences.mm:
+ (+[WebPreferences initialize]): Set WebKitDNSPrefetchingEnabledPreferenceKey to YES.
+ (-[WebPreferences isDNSPrefetchingEnabled]): Added. Return WebKitDNSPrefetchingEnabledPreferenceKey's value.
+ (-[WebPreferences setDNSPrefetchingEnabled:]): Added. Set WebKitDNSPrefetchingEnabledPreferenceKey's value.
+ * WebView/WebPreferencesPrivate.h: Added isDNSPrefetchingEnabled and setDNSPrefetchingEnabled:.
+ * WebView/WebView.mm:
+ (-[WebView _preferencesChangedNotification:]): Call WebCore::Settings::setDNSPrefetchingEnabled.
+
+2010-07-01 Alexey Proskuryakov <ap@apple.com>
+
+ Reviewed by Anders Carlsson.
+
+ <rdar://problem/8148656> <https://bugs.webkit.org/show_bug.cgi?id=41431>
+ REGRESSION (r49411): Various crashes due to JavaScript execution during plug-in destruction
+
+ Strengthen m_inDestroy "swipe under the carpet" fix.
+
+ * Plugins/Hosted/NetscapePluginInstanceProxy.h: Added a long comment about m_inDestroy, and
+ changed it to static.
+
+ * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
+ (WebKit::NetscapePluginInstanceProxy::NetscapePluginInstanceProxy): m_inDestroy is now
+ static, so we don't initialize it in constructor.
+ (WebKit::NetscapePluginInstanceProxy::destroy): Assert that we aren't already destroying
+ some plug-in.
+ (WebKit::NetscapePluginInstanceProxy::evaluate): This function accidentally lacked an
+ m_inDestroy check in r42789.
+
+2010-06-29 Zoltan Herczeg <zherczeg@webkit.org>
+
+ Reviewed by Nikolas Zimmermann.
+
+ Add ConvolveMatrixElement to MigrateHeaders.make
+ https://bugs.webkit.org/show_bug.cgi?id=5861
+
+ * MigrateHeaders.make:
+
+2010-06-23 John Gregg <johnnyg@google.com>
+
+ Reviewed by Kent Tamura.
+
+ add ENABLE_DIRECTORY_UPLOAD build support
+ https://bugs.webkit.org/show_bug.cgi?id=41100
+
+ * Configurations/FeatureDefines.xcconfig:
+
+2010-06-28 Eric Seidel <eric@webkit.org>
+
+ Reviewed by Adam Barth.
+
+ Make it possible to test the new HTML5 TreeBuilder
+ https://bugs.webkit.org/show_bug.cgi?id=41276
+
+ Adam was concerned that someone might make their port
+ depend on this setting (I guess we had some trouble with that
+ with the HTML5Parser setting), so I littered the code with warnings.
+
+ test-html5-parser now tests this code path.
+
+ * WebView/WebPreferenceKeysPrivate.h:
+ * WebView/WebPreferences.mm:
+ (+[WebPreferences initialize]):
+ (-[WebPreferences html5TreeBuilderEnabled]):
+ (-[WebPreferences setHTML5TreeBuilderEnabled:]):
+ * WebView/WebPreferencesPrivate.h:
+ * WebView/WebView.mm:
+ (-[WebView _preferencesChangedNotification:]):
+
+2010-06-25 Yuzo Fujishima <yuzo@google.com>
+
+ Reviewed by Shinichiro Hamaji.
+
+ Improve default value handling for page format properties.
+ https://bugs.webkit.org/show_bug.cgi?id=41150
+
+ * Misc/WebCoreStatistics.h:
+ * Misc/WebCoreStatistics.mm:
+ (-[WebFrame pageSizeAndMarginsInPixels:pageNumber:width:height:marginTop:marginRight:marginBottom:]):
+
+2010-06-26 Tony Gentilcore <tonyg@chromium.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ Add an ENABLE_WEB_TIMING option for enabling Web Timing support.
+ https://bugs.webkit.org/show_bug.cgi?id=38924
+
+ * Configurations/FeatureDefines.xcconfig:
+
2010-06-24 Jer Noble <jer.noble@apple.com>
Reviewed by Eric Carlson.
diff --git a/WebKit/mac/Configurations/FeatureDefines.xcconfig b/WebKit/mac/Configurations/FeatureDefines.xcconfig
index 08d9ef9..8d2ff72 100644
--- a/WebKit/mac/Configurations/FeatureDefines.xcconfig
+++ b/WebKit/mac/Configurations/FeatureDefines.xcconfig
@@ -48,6 +48,7 @@ ENABLE_DATABASE = ENABLE_DATABASE;
ENABLE_DATAGRID = ;
ENABLE_DATALIST = ENABLE_DATALIST;
ENABLE_DEVICE_ORIENTATION = ;
+ENABLE_DIRECTORY_UPLOAD = ;
ENABLE_DOM_STORAGE = ENABLE_DOM_STORAGE;
ENABLE_EVENTSOURCE = ENABLE_EVENTSOURCE;
ENABLE_FILTERS = ENABLE_FILTERS;
@@ -76,10 +77,11 @@ ENABLE_SVG_FOREIGN_OBJECT = ENABLE_SVG_FOREIGN_OBJECT;
ENABLE_SVG_USE = ENABLE_SVG_USE;
ENABLE_VIDEO = ENABLE_VIDEO;
ENABLE_WEB_SOCKETS = ENABLE_WEB_SOCKETS;
+ENABLE_WEB_TIMING = ;
ENABLE_WML = ;
ENABLE_WORKERS = ENABLE_WORKERS;
ENABLE_XHTMLMP = ;
ENABLE_XPATH = ENABLE_XPATH;
ENABLE_XSLT = ENABLE_XSLT;
-FEATURE_DEFINES = $(ENABLE_3D_CANVAS) $(ENABLE_3D_RENDERING) $(ENABLE_BLOB_SLICE) $(ENABLE_CHANNEL_MESSAGING) $(ENABLE_CLIENT_BASED_GEOLOCATION) $(ENABLE_DATABASE) $(ENABLE_DATAGRID) $(ENABLE_DATALIST) $(ENABLE_DEVICE_ORIENTATION) $(ENABLE_DOM_STORAGE) $(ENABLE_EVENTSOURCE) $(ENABLE_FILTERS) $(ENABLE_FILE_READER) $(ENABLE_FILE_WRITER) $(ENABLE_GEOLOCATION) $(ENABLE_ICONDATABASE) $(ENABLE_IMAGE_RESIZER) $(ENABLE_INDEXED_DATABASE) $(ENABLE_INPUT_SPEECH) $(ENABLE_JAVASCRIPT_DEBUGGER) $(ENABLE_MATHML) $(ENABLE_METER_TAG) $(ENABLE_NOTIFICATIONS) $(ENABLE_OFFLINE_WEB_APPLICATIONS) $(ENABLE_PROGRESS_TAG) $(ENABLE_RUBY) $(ENABLE_SANDBOX) $(ENABLE_SHARED_WORKERS) $(ENABLE_SVG) $(ENABLE_SVG_ANIMATION) $(ENABLE_SVG_AS_IMAGE) $(ENABLE_SVG_DOM_OBJC_BINDINGS) $(ENABLE_SVG_FONTS) $(ENABLE_SVG_FOREIGN_OBJECT) $(ENABLE_SVG_USE) $(ENABLE_VIDEO) $(ENABLE_WEB_SOCKETS) $(ENABLE_WML) $(ENABLE_WORKERS) $(ENABLE_XHTMLMP) $(ENABLE_XPATH) $(ENABLE_XSLT);
+FEATURE_DEFINES = $(ENABLE_3D_CANVAS) $(ENABLE_3D_RENDERING) $(ENABLE_BLOB_SLICE) $(ENABLE_CHANNEL_MESSAGING) $(ENABLE_CLIENT_BASED_GEOLOCATION) $(ENABLE_DATABASE) $(ENABLE_DATAGRID) $(ENABLE_DATALIST) $(ENABLE_DEVICE_ORIENTATION) $(ENABLE_DIRECTORY_UPLOAD) $(ENABLE_DOM_STORAGE) $(ENABLE_EVENTSOURCE) $(ENABLE_FILTERS) $(ENABLE_FILE_READER) $(ENABLE_FILE_WRITER) $(ENABLE_GEOLOCATION) $(ENABLE_ICONDATABASE) $(ENABLE_IMAGE_RESIZER) $(ENABLE_INDEXED_DATABASE) $(ENABLE_INPUT_SPEECH) $(ENABLE_JAVASCRIPT_DEBUGGER) $(ENABLE_MATHML) $(ENABLE_METER_TAG) $(ENABLE_NOTIFICATIONS) $(ENABLE_OFFLINE_WEB_APPLICATIONS) $(ENABLE_PROGRESS_TAG) $(ENABLE_RUBY) $(ENABLE_SANDBOX) $(ENABLE_SHARED_WORKERS) $(ENABLE_SVG) $(ENABLE_SVG_ANIMATION) $(ENABLE_SVG_AS_IMAGE) $(ENABLE_SVG_DOM_OBJC_BINDINGS) $(ENABLE_SVG_FONTS) $(ENABLE_SVG_FOREIGN_OBJECT) $(ENABLE_SVG_USE) $(ENABLE_VIDEO) $(ENABLE_WEB_SOCKETS) $(ENABLE_WEB_TIMING) $(ENABLE_WML) $(ENABLE_WORKERS) $(ENABLE_XHTMLMP) $(ENABLE_XPATH) $(ENABLE_XSLT);
diff --git a/WebKit/mac/Configurations/Version.xcconfig b/WebKit/mac/Configurations/Version.xcconfig
index f775a54..2749545 100644
--- a/WebKit/mac/Configurations/Version.xcconfig
+++ b/WebKit/mac/Configurations/Version.xcconfig
@@ -22,7 +22,7 @@
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
MAJOR_VERSION = 534;
-MINOR_VERSION = 2;
+MINOR_VERSION = 3;
TINY_VERSION = 0;
FULL_VERSION = $(MAJOR_VERSION).$(MINOR_VERSION);
diff --git a/WebKit/mac/MigrateHeaders.make b/WebKit/mac/MigrateHeaders.make
index 96c0a71..83e2e08 100644
--- a/WebKit/mac/MigrateHeaders.make
+++ b/WebKit/mac/MigrateHeaders.make
@@ -268,6 +268,8 @@ all : \
$(INTERNAL_HEADERS_DIR)/DOMSVGFEComponentTransferElementInternal.h \
$(PRIVATE_HEADERS_DIR)/DOMSVGFECompositeElement.h \
$(INTERNAL_HEADERS_DIR)/DOMSVGFECompositeElementInternal.h \
+ $(PRIVATE_HEADERS_DIR)/DOMSVGFEConvolveMatrixElement.h \
+ $(INTERNAL_HEADERS_DIR)/DOMSVGFEConvolveMatrixElementInternal.h \
$(PRIVATE_HEADERS_DIR)/DOMSVGFEDiffuseLightingElement.h \
$(INTERNAL_HEADERS_DIR)/DOMSVGFEDiffuseLightingElementInternal.h \
$(PRIVATE_HEADERS_DIR)/DOMSVGFEDisplacementMapElement.h \
diff --git a/WebKit/mac/Misc/WebCoreStatistics.h b/WebKit/mac/Misc/WebCoreStatistics.h
index e357b72..33e3e0f 100644
--- a/WebKit/mac/Misc/WebCoreStatistics.h
+++ b/WebKit/mac/Misc/WebCoreStatistics.h
@@ -89,6 +89,5 @@
- (int)numberOfPages:(float)pageWidthInPixels:(float)pageHeightInPixels;
- (NSString *)pageProperty:(const char*)propertyName:(int)pageNumber;
- (bool)isPageBoxVisible:(int)pageNumber;
-- (NSString *)pageAreaRectInPixels:(int)pageNumber;
-- (NSString *)preferredPageSizeInPixels:(int)pageNumber;
+- (NSString *)pageSizeAndMarginsInPixels:(int)pageNumber:(int)width:(int)height:(int)marginTop:(int)marginRight:(int)marginBottom:(int)marginLeft;
@end
diff --git a/WebKit/mac/Misc/WebCoreStatistics.mm b/WebKit/mac/Misc/WebCoreStatistics.mm
index 9112d21..bbe07d5 100644
--- a/WebKit/mac/Misc/WebCoreStatistics.mm
+++ b/WebKit/mac/Misc/WebCoreStatistics.mm
@@ -285,13 +285,8 @@ using namespace WebCore;
return PrintContext::isPageBoxVisible(_private->coreFrame, pageNumber);
}
-- (NSString *)pageAreaRectInPixels:(int)pageNumber
+- (NSString *)pageSizeAndMarginsInPixels:(int)pageNumber:(int)width:(int)height:(int)marginTop:(int)marginRight:(int)marginBottom:(int)marginLeft
{
- return PrintContext::pageAreaRectInPixels(_private->coreFrame, pageNumber);
-}
-
-- (NSString *)preferredPageSizeInPixels:(int)pageNumber;
-{
- return PrintContext::preferredPageSizeInPixels(_private->coreFrame, pageNumber);
+ return PrintContext::pageSizeAndMarginsInPixels(_private->coreFrame, pageNumber, width, height, marginTop, marginRight, marginBottom, marginLeft);
}
@end
diff --git a/WebKit/mac/Plugins/Hosted/NetscapePluginInstanceProxy.h b/WebKit/mac/Plugins/Hosted/NetscapePluginInstanceProxy.h
index 5900b02..9ca5b5a 100644
--- a/WebKit/mac/Plugins/Hosted/NetscapePluginInstanceProxy.h
+++ b/WebKit/mac/Plugins/Hosted/NetscapePluginInstanceProxy.h
@@ -342,7 +342,19 @@ private:
unsigned m_pluginFunctionCallDepth;
bool m_shouldStopSoon;
uint32_t m_currentRequestID;
- bool m_inDestroy;
+
+ // All NPRuntime functions will return false when destroying a plug-in. This is necessary because there may be unhandled messages waiting,
+ // and spinning in processRequests() will unexpectedly execute them from inside destroy(). That's not a good time to execute arbitrary JavaScript,
+ // since both loading and rendering data structures may be in inconsistent state.
+ // This suppresses calls from all plug-ins, even those in different pages, since JS might affect the frame with plug-in that's being stopped.
+ //
+ // FIXME: Plug-ins can execute arbitrary JS from destroy() in same process case, and other browsers also support that.
+ // A better fix may be to make sure that unrelated messages are postponed until after destroy() returns.
+ // Another possible fix may be to send destroy message at a time when internal structures are consistent.
+ //
+ // FIXME: We lack similar message suppression in other cases - resize() is also triggered by layout, so executing arbitrary JS is also problematic.
+ static bool m_inDestroy;
+
bool m_pluginIsWaitingForDraw;
RefPtr<HostedNetscapePluginStream> m_manualStream;
diff --git a/WebKit/mac/Plugins/Hosted/NetscapePluginInstanceProxy.mm b/WebKit/mac/Plugins/Hosted/NetscapePluginInstanceProxy.mm
index ca012ee..8354c06 100644
--- a/WebKit/mac/Plugins/Hosted/NetscapePluginInstanceProxy.mm
+++ b/WebKit/mac/Plugins/Hosted/NetscapePluginInstanceProxy.mm
@@ -206,6 +206,8 @@ bool NetscapePluginInstanceProxy::LocalObjectMap::forget(uint32_t objectID)
static uint32_t pluginIDCounter;
+bool NetscapePluginInstanceProxy::m_inDestroy;
+
#ifndef NDEBUG
static WTF::RefCountedLeakCounter netscapePluginInstanceProxyCounter("NetscapePluginInstanceProxy");
#endif
@@ -222,7 +224,6 @@ NetscapePluginInstanceProxy::NetscapePluginInstanceProxy(NetscapePluginHostProxy
, m_pluginFunctionCallDepth(0)
, m_shouldStopSoon(false)
, m_currentRequestID(0)
- , m_inDestroy(false)
, m_pluginIsWaitingForDraw(false)
{
ASSERT(m_pluginView);
@@ -321,7 +322,8 @@ void NetscapePluginInstanceProxy::invalidate()
void NetscapePluginInstanceProxy::destroy()
{
uint32_t requestID = nextRequestID();
-
+
+ ASSERT(!m_inDestroy);
m_inDestroy = true;
FrameLoadMap::iterator end = m_pendingFrameLoads.end();
@@ -848,6 +850,9 @@ bool NetscapePluginInstanceProxy::evaluate(uint32_t objectID, const String& scri
resultData = 0;
resultLength = 0;
+ if (m_inDestroy)
+ return false;
+
if (!m_localObjects.contains(objectID)) {
LOG_ERROR("NetscapePluginInstanceProxy::evaluate: local object %u doesn't exist.", objectID);
return false;
diff --git a/WebKit/mac/WebCoreSupport/WebChromeClient.h b/WebKit/mac/WebCoreSupport/WebChromeClient.h
index 7deea79..5587a8d 100644
--- a/WebKit/mac/WebCoreSupport/WebChromeClient.h
+++ b/WebKit/mac/WebCoreSupport/WebChromeClient.h
@@ -105,6 +105,7 @@ public:
virtual void setStatusbarText(const WebCore::String&);
virtual void scrollbarsModeDidChange() const { }
+ virtual void missingPluginButtonClicked(WebCore::Element*) const;
virtual void mouseDidMoveOverElement(const WebCore::HitTestResult&, unsigned modifierFlags);
virtual void setToolTip(const WebCore::String&, WebCore::TextDirection);
diff --git a/WebKit/mac/WebCoreSupport/WebChromeClient.mm b/WebKit/mac/WebCoreSupport/WebChromeClient.mm
index 0a52a9f..e426f05 100644
--- a/WebKit/mac/WebCoreSupport/WebChromeClient.mm
+++ b/WebKit/mac/WebCoreSupport/WebChromeClient.mm
@@ -516,6 +516,11 @@ void WebChromeClient::scrollRectIntoView(const IntRect& r, const ScrollView*) co
// End host window methods.
+void WebChromeClient::missingPluginButtonClicked(Element* element) const
+{
+ CallUIDelegate(m_webView, @selector(webView:didPressMissingPluginButton:), kit(element));
+}
+
void WebChromeClient::mouseDidMoveOverElement(const HitTestResult& result, unsigned modifierFlags)
{
WebElementDictionary *element = [[WebElementDictionary alloc] initWithHitTestResult:result];
diff --git a/WebKit/mac/WebView/WebPreferenceKeysPrivate.h b/WebKit/mac/WebView/WebPreferenceKeysPrivate.h
index c38b395..a28be49 100644
--- a/WebKit/mac/WebView/WebPreferenceKeysPrivate.h
+++ b/WebKit/mac/WebView/WebPreferenceKeysPrivate.h
@@ -94,7 +94,9 @@
#define WebKitPluginAllowedRunTimePreferenceKey @"WebKitPluginAllowedRunTime"
#define WebKitFrameFlatteningEnabledPreferenceKey @"WebKitFrameFlatteningEnabled"
#define WebKitHTML5ParserEnabledPreferenceKey @"WebKitHTML5ParserEnabled"
+#define WebKitHTML5TreeBuilderEnabledPreferenceKey @"WebKitHTML5TreeBuilderEnabled" // Temporary, do not use.
#define WebKitPaginateDuringLayoutEnabledPreferenceKey @"WebKitPaginateDuringLayoutEnabled"
+#define WebKitDNSPrefetchingEnabledPreferenceKey @"WebKitDNSPrefetchingEnabled"
// These are private both because callers should be using the cover methods and because the
// cover methods themselves are private.
diff --git a/WebKit/mac/WebView/WebPreferences.mm b/WebKit/mac/WebView/WebPreferences.mm
index 0a192f9..a376458 100644
--- a/WebKit/mac/WebView/WebPreferences.mm
+++ b/WebKit/mac/WebView/WebPreferences.mm
@@ -360,7 +360,9 @@ static WebCacheModel cacheModelForMainBundle(void)
[NSNumber numberWithBool:NO], WebKitUsesProxiedOpenPanelPreferenceKey,
[NSNumber numberWithUnsignedInt:4], WebKitPluginAllowedRunTimePreferenceKey,
[NSNumber numberWithBool:NO], WebKitFrameFlatteningEnabledPreferenceKey,
- [NSNumber numberWithBool:YES], WebKitHTML5ParserEnabledPreferenceKey,
+ [NSNumber numberWithBool:YES], WebKitHTML5ParserEnabledPreferenceKey,
+ [NSNumber numberWithBool:NO], WebKitHTML5TreeBuilderEnabledPreferenceKey,
+ [NSNumber numberWithBool:YES], WebKitDNSPrefetchingEnabledPreferenceKey,
nil];
// This value shouldn't ever change, which is assumed in the initialization of WebKitPDFDisplayModePreferenceKey above
@@ -755,6 +757,16 @@ static WebCacheModel cacheModelForMainBundle(void)
@implementation WebPreferences (WebPrivate)
+- (BOOL)isDNSPrefetchingEnabled
+{
+ return [self _boolValueForKey:WebKitDNSPrefetchingEnabledPreferenceKey];
+}
+
+- (void)setDNSPrefetchingEnabled:(BOOL)flag
+{
+ [self _setBoolValue:flag forKey:WebKitDNSPrefetchingEnabledPreferenceKey];
+}
+
- (BOOL)developerExtrasEnabled
{
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
@@ -1249,6 +1261,16 @@ static NSString *classIBCreatorID = nil;
[self _setBoolValue:flag forKey:WebKitHTML5ParserEnabledPreferenceKey];
}
+- (BOOL)html5TreeBuilderEnabled
+{
+ return [self _boolValueForKey:WebKitHTML5TreeBuilderEnabledPreferenceKey];
+}
+
+- (void)setHTML5TreeBuilderEnabled:(BOOL)flag
+{
+ [self _setBoolValue:flag forKey:WebKitHTML5TreeBuilderEnabledPreferenceKey];
+}
+
- (BOOL)paginateDuringLayoutEnabled
{
return [self _boolValueForKey:WebKitPaginateDuringLayoutEnabledPreferenceKey];
diff --git a/WebKit/mac/WebView/WebPreferencesPrivate.h b/WebKit/mac/WebView/WebPreferencesPrivate.h
index c9a89ee..e94943f 100644
--- a/WebKit/mac/WebView/WebPreferencesPrivate.h
+++ b/WebKit/mac/WebView/WebPreferencesPrivate.h
@@ -55,6 +55,9 @@ extern NSString *WebPreferencesRemovedNotification;
// Preferences that might be public in a future release
+- (BOOL)isDNSPrefetchingEnabled;
+- (void)setDNSPrefetchingEnabled:(BOOL)flag;
+
- (BOOL)developerExtrasEnabled;
- (void)setDeveloperExtrasEnabled:(BOOL)flag;
@@ -178,6 +181,10 @@ extern NSString *WebPreferencesRemovedNotification;
- (BOOL)html5ParserEnabled;
- (void)setHTML5ParserEnabled:(BOOL)flag;
+// Will be deleted soon, do not use.
+- (BOOL)html5TreeBuilderEnabled;
+- (void)setHTML5TreeBuilderEnabled:(BOOL)flag;
+
- (BOOL)paginateDuringLayoutEnabled;
- (void)setPaginateDuringLayoutEnabled:(BOOL)flag;
diff --git a/WebKit/mac/WebView/WebUIDelegatePrivate.h b/WebKit/mac/WebView/WebUIDelegatePrivate.h
index 327a745..eccb10f 100644
--- a/WebKit/mac/WebView/WebUIDelegatePrivate.h
+++ b/WebKit/mac/WebView/WebUIDelegatePrivate.h
@@ -115,6 +115,7 @@ enum {
- (void)webView:(WebView *)sender contextMenuItemSelected:(NSMenuItem *)item forElement:(NSDictionary *)element;
- (void)webView:(WebView *)sender saveFrameView:(WebFrameView *)frameView showingPanel:(BOOL)showingPanel;
- (BOOL)webView:(WebView *)sender shouldHaltPlugin:(DOMNode *)pluginNode isWindowed:(BOOL)isWindowed pluginName:(NSString *)pluginName;
+- (BOOL)webView:(WebView *)sender didPressMissingPluginButton:(DOMElement *)element;
/*!
@method webView:frame:exceededDatabaseQuotaForSecurityOrigin:database:
@param sender The WebView sending the delegate method.
diff --git a/WebKit/mac/WebView/WebView.mm b/WebKit/mac/WebView/WebView.mm
index 631dd63..ada00b5 100644
--- a/WebKit/mac/WebView/WebView.mm
+++ b/WebKit/mac/WebView/WebView.mm
@@ -178,6 +178,10 @@
#import <WebCore/GeolocationError.h>
#endif
+#if ENABLE(VIDEO) && USE(GSTREAMER)
+#import <glib.h>
+#endif
+
@interface NSSpellChecker (WebNSSpellCheckerDetails)
- (void)_preflightChosenSpellServer;
@end
@@ -369,6 +373,9 @@ static const char webViewIsOpen[] = "At least one WebView is still open.";
#if USE(ACCELERATED_COMPOSITING)
- (void)_clearLayerSyncLoopObserver;
#endif
+#if ENABLE(VIDEO) && USE(GSTREAMER)
+- (void)_clearGlibLoopObserver;
+#endif
@end
static void patchMailRemoveAttributesMethod();
@@ -722,6 +729,11 @@ static bool shouldEnableLoadDeferring()
if (!WebKitLinkedOnOrAfter(WEBKIT_FIRST_VERSION_WITHOUT_CONTENT_SNIFFING_FOR_FILE_URLS))
ResourceHandle::forceContentSniffing();
+
+#if ENABLE(VIDEO) && USE(GSTREAMER)
+ [self _scheduleGlibContextIterations];
+#endif
+
}
- (id)_initWithFrame:(NSRect)f frameName:(NSString *)frameName groupName:(NSString *)groupName usesDocumentViews:(BOOL)usesDocumentViews
@@ -1119,6 +1131,10 @@ static bool fastDocumentTeardownEnabled()
[self _clearLayerSyncLoopObserver];
#endif
+#if ENABLE(VIDEO) && USE(GSTREAMER)
+ [self _clearGlibLoopObserver];
+#endif
+
[[NSDistributedNotificationCenter defaultCenter] removeObserver:self];
[[NSNotificationCenter defaultCenter] removeObserver:self];
@@ -1403,6 +1419,7 @@ static bool fastDocumentTeardownEnabled()
settings->setJavaScriptCanAccessClipboard([preferences javaScriptCanAccessClipboard]);
settings->setXSSAuditorEnabled([preferences isXSSAuditorEnabled]);
settings->setEnforceCSSMIMETypeInStrictMode(!WKAppVersionCheckLessThan(@"com.apple.iWeb", -1, 2.1));
+ settings->setDNSPrefetchingEnabled([preferences isDNSPrefetchingEnabled]);
// FIXME: Enabling accelerated compositing when WebGL is enabled causes tests to fail on Leopard which expect HW compositing to be disabled.
// Until we fix that, I will comment out the test (CFM)
@@ -1414,6 +1431,7 @@ static bool fastDocumentTeardownEnabled()
settings->setLoadDeferringEnabled(shouldEnableLoadDeferring());
settings->setFrameFlatteningEnabled([preferences isFrameFlatteningEnabled]);
settings->setHTML5ParserEnabled([preferences html5ParserEnabled]);
+ settings->setHTML5TreeBuilderEnabled_DO_NOT_USE([preferences html5TreeBuilderEnabled]);
settings->setPaginateDuringLayoutEnabled([preferences paginateDuringLayoutEnabled]);
}
@@ -5456,6 +5474,18 @@ static WebFrameView *containingFrameView(NSView *view)
_private->layerSyncRunLoopObserver = 0;
}
#endif
+
+#if ENABLE(VIDEO) && USE(GSTREAMER)
+- (void)_clearGlibLoopObserver
+{
+ if (!_private->glibRunLoopObserver)
+ return;
+
+ CFRunLoopObserverInvalidate(_private->glibRunLoopObserver);
+ CFRelease(_private->glibRunLoopObserver);
+ _private->glibRunLoopObserver = 0;
+}
+#endif
@end
@implementation WebView (WebViewInternal)
@@ -5763,6 +5793,33 @@ static void layerSyncRunLoopObserverCallBack(CFRunLoopObserverRef, CFRunLoopActi
#endif
+#if ENABLE(VIDEO) && USE(GSTREAMER)
+
+static void glibContextIterationCallback(CFRunLoopObserverRef, CFRunLoopActivity, void*)
+{
+ g_main_context_iteration(0, FALSE);
+}
+
+- (void)_scheduleGlibContextIterations
+{
+ if (_private->glibRunLoopObserver)
+ return;
+
+ NSRunLoop* myRunLoop = [NSRunLoop currentRunLoop];
+
+ // Create a run loop observer and attach it to the run loop.
+ CFRunLoopObserverContext context = {0, self, 0, 0, 0};
+ _private->glibRunLoopObserver = CFRunLoopObserverCreate(kCFAllocatorDefault, kCFRunLoopBeforeWaiting, YES, 0, &glibContextIterationCallback, &context);
+
+ if (_private->glibRunLoopObserver) {
+ CFRunLoopRef cfLoop = [myRunLoop getCFRunLoop];
+ CFRunLoopAddObserver(cfLoop, _private->glibRunLoopObserver, kCFRunLoopDefaultMode);
+ }
+
+}
+#endif
+
+
@end
@implementation WebView (WebViewGeolocation)
diff --git a/WebKit/mac/WebView/WebViewData.h b/WebKit/mac/WebView/WebViewData.h
index 2b51f3c..06fee4f 100644
--- a/WebKit/mac/WebView/WebViewData.h
+++ b/WebKit/mac/WebView/WebViewData.h
@@ -169,6 +169,9 @@ extern int pluginDatabaseClientCount;
WebVideoFullscreenController *fullscreenController;
#endif
+#if ENABLE(VIDEO) && USE(GSTREAMER)
+ CFRunLoopObserverRef glibRunLoopObserver;
+#endif
id<WebGeolocationProvider> _geolocationProvider;
}
@end
diff --git a/WebKit/mac/WebView/WebViewInternal.h b/WebKit/mac/WebView/WebViewInternal.h
index 4643573..bf9b732 100644
--- a/WebKit/mac/WebView/WebViewInternal.h
+++ b/WebKit/mac/WebView/WebViewInternal.h
@@ -86,6 +86,10 @@ namespace WebCore {
- (void)_scheduleCompositingLayerSync;
#endif
+#if ENABLE(VIDEO) && USE(GSTREAMER)
+- (void)_scheduleGlibContextIterations;
+#endif
+
@end
#endif