diff options
author | Steve Block <steveblock@google.com> | 2010-08-27 11:02:25 +0100 |
---|---|---|
committer | Steve Block <steveblock@google.com> | 2010-09-02 17:17:20 +0100 |
commit | e8b154fd68f9b33be40a3590e58347f353835f5c (patch) | |
tree | 0733ce26384183245aaa5656af26c653636fe6c1 /WebKit/mac/WebView | |
parent | da56157816334089526a7a115a85fd85a6e9a1dc (diff) | |
download | external_webkit-e8b154fd68f9b33be40a3590e58347f353835f5c.zip external_webkit-e8b154fd68f9b33be40a3590e58347f353835f5c.tar.gz external_webkit-e8b154fd68f9b33be40a3590e58347f353835f5c.tar.bz2 |
Merge WebKit at r66079 : Initial merge by git
Change-Id: Ie2e1440fb9d487d24e52c247342c076fecaecac7
Diffstat (limited to 'WebKit/mac/WebView')
-rw-r--r-- | WebKit/mac/WebView/WebFrame.mm | 4 | ||||
-rw-r--r-- | WebKit/mac/WebView/WebHTMLView.mm | 8 | ||||
-rw-r--r-- | WebKit/mac/WebView/WebPDFView.mm | 1 | ||||
-rw-r--r-- | WebKit/mac/WebView/WebPreferenceKeysPrivate.h | 2 | ||||
-rw-r--r-- | WebKit/mac/WebView/WebPreferences.mm | 22 | ||||
-rw-r--r-- | WebKit/mac/WebView/WebPreferencesPrivate.h | 7 | ||||
-rw-r--r-- | WebKit/mac/WebView/WebView.mm | 14 |
7 files changed, 20 insertions, 38 deletions
diff --git a/WebKit/mac/WebView/WebFrame.mm b/WebKit/mac/WebView/WebFrame.mm index 82df7bc..dff9ff7 100644 --- a/WebKit/mac/WebView/WebFrame.mm +++ b/WebKit/mac/WebView/WebFrame.mm @@ -395,7 +395,7 @@ WebView *getWebView(WebFrame *webFrame) Frame* coreFrame = _private->coreFrame; for (Frame* frame = coreFrame; frame; frame = frame->tree()->traverseNext(coreFrame)) { if (Document* document = frame->document()) - document->removeMarkers(DocumentMarker::Grammar); + document->markers()->removeMarkers(DocumentMarker::Grammar); } } #endif @@ -405,7 +405,7 @@ WebView *getWebView(WebFrame *webFrame) Frame* coreFrame = _private->coreFrame; for (Frame* frame = coreFrame; frame; frame = frame->tree()->traverseNext(coreFrame)) { if (Document* document = frame->document()) - document->removeMarkers(DocumentMarker::Spelling); + document->markers()->removeMarkers(DocumentMarker::Spelling); } } diff --git a/WebKit/mac/WebView/WebHTMLView.mm b/WebKit/mac/WebView/WebHTMLView.mm index 77df9d1..a619f18 100644 --- a/WebKit/mac/WebView/WebHTMLView.mm +++ b/WebKit/mac/WebView/WebHTMLView.mm @@ -167,9 +167,11 @@ static bool needsCursorRectsSupportAtPoint(NSWindow* window, NSPoint point) if ([view isKindOfClass:[WebHTMLView class]]) return false; +#if ENABLE(NETSCAPE_PLUGIN_API) // Neither do NPAPI plug-ins. if ([view isKindOfClass:[WebBaseNetscapePluginView class]]) return false; +#endif // Non-Web content, WebPDFView, and WebKit plug-ins use normal cursor handling. return true; @@ -5174,7 +5176,7 @@ static BOOL writingDirectionKeyBindingsEnabled() if (coreFrame->selection()->isContentRichlyEditable()) [self _pasteWithPasteboard:[NSPasteboard generalPasteboard] allowPlainText:YES]; else - coreFrame->editor()->pasteAsPlainText(); + coreFrame->editor()->pasteAsPlainTextBypassingDHTML(); } - (void)closeIfNotCurrentView @@ -6228,7 +6230,7 @@ static void extractUnderlines(NSAttributedString *string, Vector<CompositionUnde Document* document = coreFrame->document(); if (!document) return; - document->removeMarkers(DocumentMarker::TextMatch); + document->markers()->removeMarkers(DocumentMarker::TextMatch); } - (NSArray *)rectsForTextMatches @@ -6240,7 +6242,7 @@ static void extractUnderlines(NSAttributedString *string, Vector<CompositionUnde if (!document) return [NSArray array]; - Vector<IntRect> rects = document->renderedRectsForMarkers(DocumentMarker::TextMatch); + Vector<IntRect> rects = document->markers()->renderedRectsForMarkers(DocumentMarker::TextMatch); unsigned count = rects.size(); NSMutableArray *result = [NSMutableArray arrayWithCapacity:count]; for (unsigned index = 0; index < count; ++index) diff --git a/WebKit/mac/WebView/WebPDFView.mm b/WebKit/mac/WebView/WebPDFView.mm index 1be3033..5e7b73c 100644 --- a/WebKit/mac/WebView/WebPDFView.mm +++ b/WebKit/mac/WebView/WebPDFView.mm @@ -193,6 +193,7 @@ static BOOL _PDFSelectionsAreEqual(PDFSelection *selectionA, PDFSelection *selec { [dataSource release]; [previewView release]; + [PDFSubview setDelegate:nil]; [PDFSubview release]; [path release]; [PDFSubviewProxy release]; diff --git a/WebKit/mac/WebView/WebPreferenceKeysPrivate.h b/WebKit/mac/WebView/WebPreferenceKeysPrivate.h index a8ebdca..86f6d85 100644 --- a/WebKit/mac/WebView/WebPreferenceKeysPrivate.h +++ b/WebKit/mac/WebView/WebPreferenceKeysPrivate.h @@ -95,8 +95,6 @@ #define WebKitUsesProxiedOpenPanelPreferenceKey @"WebKitUsesProxiedOpenPanel" #define WebKitPluginAllowedRunTimePreferenceKey @"WebKitPluginAllowedRunTime" #define WebKitFrameFlatteningEnabledPreferenceKey @"WebKitFrameFlatteningEnabled" -#define WebKitHTML5ParserEnabledPreferenceKey @"WebKitHTML5ParserEnabled" -#define WebKitHTML5TreeBuilderEnabledPreferenceKey @"WebKitHTML5TreeBuilderEnabled" // Temporary, do not use. #define WebKitPaginateDuringLayoutEnabledPreferenceKey @"WebKitPaginateDuringLayoutEnabled" #define WebKitDNSPrefetchingEnabledPreferenceKey @"WebKitDNSPrefetchingEnabled" #define WebKitMemoryInfoEnabledPreferenceKey @"WebKitMemoryInfoEnabled" diff --git a/WebKit/mac/WebView/WebPreferences.mm b/WebKit/mac/WebView/WebPreferences.mm index c46dca7..eae2d8d 100644 --- a/WebKit/mac/WebView/WebPreferences.mm +++ b/WebKit/mac/WebView/WebPreferences.mm @@ -364,8 +364,6 @@ static WebCacheModel cacheModelForMainBundle(void) [NSNumber numberWithBool:NO], WebKitUsesProxiedOpenPanelPreferenceKey, [NSNumber numberWithUnsignedInt:4], WebKitPluginAllowedRunTimePreferenceKey, [NSNumber numberWithBool:NO], WebKitFrameFlatteningEnabledPreferenceKey, - [NSNumber numberWithBool:YES], WebKitHTML5ParserEnabledPreferenceKey, - [NSNumber numberWithBool:NO], WebKitHTML5TreeBuilderEnabledPreferenceKey, [NSNumber numberWithBool:YES], WebKitDNSPrefetchingEnabledPreferenceKey, [NSNumber numberWithBool:NO], WebKitMemoryInfoEnabledPreferenceKey, [NSNumber numberWithLongLong:WebCore::ApplicationCacheStorage::noQuota()], WebKitApplicationCacheTotalQuota, @@ -1298,26 +1296,6 @@ static NSString *classIBCreatorID = nil; [self _setBoolValue:flag forKey:WebKitFrameFlatteningEnabledPreferenceKey]; } -- (BOOL)html5ParserEnabled -{ - return [self _boolValueForKey:WebKitHTML5ParserEnabledPreferenceKey]; -} - -- (void)setHTML5ParserEnabled:(BOOL)flag -{ - [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 01f2aa8..45c2a24 100644 --- a/WebKit/mac/WebView/WebPreferencesPrivate.h +++ b/WebKit/mac/WebView/WebPreferencesPrivate.h @@ -184,13 +184,6 @@ extern NSString *WebPreferencesRemovedNotification; - (BOOL)webGLEnabled; - (void)setWebGLEnabled:(BOOL)enabled; -- (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/WebView.mm b/WebKit/mac/WebView/WebView.mm index d6faeca..2d3dbfa 100644 --- a/WebKit/mac/WebView/WebView.mm +++ b/WebKit/mac/WebView/WebView.mm @@ -1437,8 +1437,6 @@ static bool fastDocumentTeardownEnabled() settings->setWebGLEnabled([preferences webGLEnabled]); settings->setLoadDeferringEnabled(shouldEnableLoadDeferring()); settings->setFrameFlatteningEnabled([preferences isFrameFlatteningEnabled]); - settings->setHTML5ParserEnabled([preferences html5ParserEnabled]); - settings->setHTML5TreeBuilderEnabled_DO_NOT_USE([preferences html5TreeBuilderEnabled]); settings->setPaginateDuringLayoutEnabled([preferences paginateDuringLayoutEnabled]); settings->setMemoryInfoEnabled([preferences memoryInfoEnabled]); @@ -2291,6 +2289,7 @@ static inline IMP getMethod(id o, SEL s) return _private->includesFlattenedCompositingLayersWhenDrawingToBitmap; } +#if ENABLE(NETSCAPE_PLUGIN_API) static WebBaseNetscapePluginView *_pluginViewForNode(DOMNode *node) { if (!node) @@ -2314,22 +2313,33 @@ static WebBaseNetscapePluginView *_pluginViewForNode(DOMNode *node) return (WebBaseNetscapePluginView *)view; } +#endif // ENABLE(NETSCAPE_PLUGIN_API) + (BOOL)_isNodeHaltedPlugin:(DOMNode *)node { +#if ENABLE(NETSCAPE_PLUGIN_API) return [_pluginViewForNode(node) isHalted]; +#else + return YES; +#endif } + (BOOL)_hasPluginForNodeBeenHalted:(DOMNode *)node { +#if ENABLE(NETSCAPE_PLUGIN_API) return [_pluginViewForNode(node) hasBeenHalted]; +#else + return YES; +#endif } + (void)_restartHaltedPluginForNode:(DOMNode *)node { +#if ENABLE(NETSCAPE_PLUGIN_API) if (!node) return; [_pluginViewForNode(node) resumeFromHalt]; +#endif } - (NSPasteboard *)_insertionPasteboard |