Title: [167745] trunk/Source/WebKit/mac
- Revision
- 167745
- Author
- akl...@apple.com
- Date
- 2014-04-23 21:42:32 -0700 (Wed, 23 Apr 2014)
Log Message
Remove Apple Dictionary workaround in WebFrameLoaderClient.
<https://webkit.org/b/132095>
Kill a hack to work around a WK1 client bug that got fixed years ago.
See <rdar://problem/6471058> for backstory.
Reviewed by Darin Adler.
* WebCoreSupport/WebFrameLoaderClient.mm:
(WebFrameLoaderClient::dispatchDidLoadResourceFromMemoryCache):
(WebFrameLoaderClient::dispatchWillSendRequest):
(applyAppleDictionaryApplicationQuirkNonInlinePart): Deleted.
(applyAppleDictionaryApplicationQuirk): Deleted.
Modified Paths
Diff
Modified: trunk/Source/WebKit/mac/ChangeLog (167744 => 167745)
--- trunk/Source/WebKit/mac/ChangeLog 2014-04-24 04:24:30 UTC (rev 167744)
+++ trunk/Source/WebKit/mac/ChangeLog 2014-04-24 04:42:32 UTC (rev 167745)
@@ -1,3 +1,19 @@
+2014-04-23 Andreas Kling <akl...@apple.com>
+
+ Remove Apple Dictionary workaround in WebFrameLoaderClient.
+ <https://webkit.org/b/132095>
+
+ Kill a hack to work around a WK1 client bug that got fixed years ago.
+ See <rdar://problem/6471058> for backstory.
+
+ Reviewed by Darin Adler.
+
+ * WebCoreSupport/WebFrameLoaderClient.mm:
+ (WebFrameLoaderClient::dispatchDidLoadResourceFromMemoryCache):
+ (WebFrameLoaderClient::dispatchWillSendRequest):
+ (applyAppleDictionaryApplicationQuirkNonInlinePart): Deleted.
+ (applyAppleDictionaryApplicationQuirk): Deleted.
+
2014-04-23 Anders Carlsson <ander...@apple.com>
Don't migrate the WKView.h header from WebCore to WebKit
Modified: trunk/Source/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm (167744 => 167745)
--- trunk/Source/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm 2014-04-24 04:24:30 UTC (rev 167744)
+++ trunk/Source/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm 2014-04-24 04:42:32 UTC (rev 167745)
@@ -98,7 +98,6 @@
#import <WebCore/HTMLFormElement.h>
#import <WebCore/HTMLFrameElement.h>
#import <WebCore/HTMLFrameOwnerElement.h>
-#import <WebCore/HTMLHeadElement.h>
#import <WebCore/HTMLNames.h>
#import <WebCore/HTMLParserIdioms.h>
#import <WebCore/HTMLPlugInElement.h>
@@ -188,52 +187,6 @@
return loader ? static_cast<WebDocumentLoaderMac*>(loader)->dataSource() : nil;
}
-#if !PLATFORM(IOS)
-// Quirk for the Apple Dictionary application.
-//
-// If a top level frame has a <script> element in its <head> for a script named MainPageJavaScript.js,
-// then for that frame's document, ignore changes to the scrolling attribute of frames. That script
-// has a bug in it where it sets the scrolling attribute on frames, and that erroneous scrolling
-// attribute needs to be ignored to avoid showing extra scroll bars in the window.
-// This quirk can be removed when Apple Dictionary is fixed (see <rdar://problem/6471058>).
-
-static void applyAppleDictionaryApplicationQuirkNonInlinePart(WebFrameLoaderClient* client, const ResourceRequest& request)
-{
- if (!request.url().isLocalFile())
- return;
- if (!request.url().string().endsWith("MainPageJavaScript.js"))
- return;
- Frame* frame = core(client->webFrame());
- if (!frame)
- return;
- if (frame->tree().parent())
- return;
- Document* document = frame->document();
- if (!document)
- return;
- HTMLHeadElement* head = document->head();
- if (!head)
- return;
- for (Node* c = head->firstChild(); c; c = c->nextSibling()) {
- if (c->hasTagName(scriptTag) && toElement(c)->getAttribute(srcAttr) == "MainPageJavaScript.js") {
- document->setFrameElementsShouldIgnoreScrolling(true);
- return;
- }
- }
-}
-#endif
-
-static inline void applyAppleDictionaryApplicationQuirk(WebFrameLoaderClient* client, const ResourceRequest& request)
-{
-#if !PLATFORM(IOS)
- // Use a one-time-initialized global variable so we can quickly determine there's nothing to do in
- // all applications other than Apple Dictionary.
- static bool isAppleDictionary = [[[NSBundle mainBundle] bundleIdentifier] isEqualToString:@"com.apple.Dictionary"];
- if (isAppleDictionary)
- applyAppleDictionaryApplicationQuirkNonInlinePart(client, request);
-#endif
-}
-
WebFrameLoaderClient::WebFrameLoaderClient(WebFrame *webFrame)
: m_webFrame(webFrame)
{
@@ -346,8 +299,6 @@
bool WebFrameLoaderClient::dispatchDidLoadResourceFromMemoryCache(DocumentLoader* loader, const ResourceRequest& request, const ResourceResponse& response, int length)
{
- applyAppleDictionaryApplicationQuirk(this, request);
-
WebView *webView = getWebView(m_webFrame.get());
WebResourceDelegateImplementationCache* implementations = WebViewGetResourceLoadDelegateImplementations(webView);
#if PLATFORM(IOS)
@@ -390,8 +341,6 @@
void WebFrameLoaderClient::dispatchWillSendRequest(DocumentLoader* loader, unsigned long identifier, ResourceRequest& request, const ResourceResponse& redirectResponse)
{
- applyAppleDictionaryApplicationQuirk(this, request);
-
WebView *webView = getWebView(m_webFrame.get());
WebResourceDelegateImplementationCache* implementations = WebViewGetResourceLoadDelegateImplementations(webView);
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes