[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc

aestes at apple.com aestes at apple.com
Wed Dec 22 13:43:27 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit 9980cc14269396614f38dec1c11ba52c0f01f3bb
Author: aestes at apple.com <aestes at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Fri Sep 24 02:28:18 2010 +0000

    2010-09-23  Andy Estes  <aestes at apple.com>
    
            Reviewed by Darin Adler.
    
            REGRESSION (r61285): some Dashboard widgets are always invisible due to
            HTML parser changes.
            https://bugs.webkit.org/show_bug.cgi?id=46435
    
            Enable pre-HTML5 parser quirks if Dashboard is in backward compatibility
            mode.
    
            * WebView/WebView.mm:
            (-[WebView _needsPreHTML5ParserQuirks]): Renamed from
            shouldUsePreHTML5ParserQuirks(). Return true if
            WebCore::Settings::usesDashboardCompatibilityMode() is true.
            (-[WebView _preferencesChangedNotification:]):
            (-[WebView _setDashboardBehavior:to:]): Enable pre-HTML5 parser quirks
            if Dashboard behavior is set to backward compatibility mode.
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@68228 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKit/mac/ChangeLog b/WebKit/mac/ChangeLog
index 4357f8c..42197fd 100644
--- a/WebKit/mac/ChangeLog
+++ b/WebKit/mac/ChangeLog
@@ -1,3 +1,22 @@
+2010-09-23  Andy Estes  <aestes at apple.com>
+
+        Reviewed by Darin Adler.
+
+        REGRESSION (r61285): some Dashboard widgets are always invisible due to
+        HTML parser changes.
+        https://bugs.webkit.org/show_bug.cgi?id=46435
+
+        Enable pre-HTML5 parser quirks if Dashboard is in backward compatibility
+        mode.
+
+        * WebView/WebView.mm:
+        (-[WebView _needsPreHTML5ParserQuirks]): Renamed from
+        shouldUsePreHTML5ParserQuirks(). Return true if
+        WebCore::Settings::usesDashboardCompatibilityMode() is true.
+        (-[WebView _preferencesChangedNotification:]):
+        (-[WebView _setDashboardBehavior:to:]): Enable pre-HTML5 parser quirks
+        if Dashboard behavior is set to backward compatibility mode.
+
 2010-09-23  Matthew Delaney  <mdelaney at apple.com>
 
         Reviewed by Simon Fraser.
diff --git a/WebKit/mac/WebView/WebView.mm b/WebKit/mac/WebView/WebView.mm
index 89d963a..a0bdcce 100644
--- a/WebKit/mac/WebView/WebView.mm
+++ b/WebKit/mac/WebView/WebView.mm
@@ -609,26 +609,6 @@ static bool coreVideoHas7228836Fix()
     return true;
 }
 
-static bool shouldUsePreHTML5ParserQuirks(WebPreferences* preferences)
-{
-    static bool webKitLinkedBeforeHTML5Parser = !WebKitLinkedOnOrAfter(WEBKIT_FIRST_VERSION_WITH_HTML5_PARSER);
-    
-    // AIM clients linked against versions of WebKit prior to the introduction
-    // of the HTML5 parser contain markup incompatible with the new parser.
-    // Enable parser quirks to remain compatible with these clients. See
-    // <https://bugs.webkit.org/show_bug.cgi?id=46134>.
-    static bool isAIMAndNeedsParserQuirks = applicationIsAOLInstantMessenger() && webKitLinkedBeforeHTML5Parser;
-    
-    // Microsoft My Day loads scripts using self-closing script tags, markup
-    // which is incompatible with the HTML5 parser. Enable parser quirks for
-    // this application. See <https://bugs.webkit.org/show_bug.cgi?id=46334>.
-    static bool isMicrosoftMyDayAndNeedsParserQuirks = applicationIsMicrosoftMyDay() && webKitLinkedBeforeHTML5Parser;
-    
-    return isAIMAndNeedsParserQuirks
-        || isMicrosoftMyDayAndNeedsParserQuirks
-        || [preferences usePreHTML5ParserQuirks];
-}
-
 static bool shouldEnableLoadDeferring()
 {
     return !applicationIsAdobeInstaller();
@@ -1378,6 +1358,27 @@ static bool fastDocumentTeardownEnabled()
     return needsQuirk;
 }
 
+
+- (BOOL)_needsPreHTML5ParserQuirks
+{    
+    // AOL Instant Messenger and Microsoft My Day contain markup incompatible
+    // with the new HTML5 parser. If these applications were linked against a
+    // version of WebKit prior to the introduction of the HTML5 parser, enable
+    // parser quirks to maintain compatibility. For details, see 
+    // <https://bugs.webkit.org/show_bug.cgi?id=46134> and
+    // <https://bugs.webkit.org/show_bug.cgi?id=46334>.
+    static bool isApplicationNeedingParserQuirks = !WebKitLinkedOnOrAfter(WEBKIT_FIRST_VERSION_WITH_HTML5_PARSER)
+        && (applicationIsAOLInstantMessenger() || applicationIsMicrosoftMyDay());
+
+    return isApplicationNeedingParserQuirks
+#if ENABLE(DASHBOARD_SUPPORT)
+        // Pre-HTML5 parser quirks are required to remain compatible with many
+        // Dashboard widgets. See <rdar://problem/8175982>.
+        || (_private->page && _private->page->settings()->usesDashboardBackwardCompatibilityMode())
+#endif
+        || [[self preferences] usePreHTML5ParserQuirks];
+}
+
 - (void)_preferencesChangedNotification:(NSNotification *)notification
 {
     WebPreferences *preferences = (WebPreferences *)[notification object];
@@ -1474,7 +1475,7 @@ static bool fastDocumentTeardownEnabled()
 #endif
     settings->setMemoryInfoEnabled([preferences memoryInfoEnabled]);
     settings->setHyperlinkAuditingEnabled([preferences hyperlinkAuditingEnabled]);
-    settings->setUsePreHTML5ParserQuirks(shouldUsePreHTML5ParserQuirks(preferences));
+    settings->setUsePreHTML5ParserQuirks([self _needsPreHTML5ParserQuirks]);
 
     // Application Cache Preferences are stored on the global cache storage manager, not in Settings.
     [WebApplicationCache setDefaultOriginQuota:[preferences applicationCacheDefaultOriginQuota]];
@@ -2004,6 +2005,11 @@ static inline IMP getMethod(id o, SEL s)
             break;
         }
     }
+
+    // Pre-HTML5 parser quirks should be enabled if Dashboard is in backward
+    // compatibility mode. See <rdar://problem/8175982>.
+    if (_private->page)
+        _private->page->settings()->setUsePreHTML5ParserQuirks([self _needsPreHTML5ParserQuirks]);
 }
 
 - (BOOL)_dashboardBehavior:(WebDashboardBehavior)behavior

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list