Title: [148712] trunk/Source
- Revision
- 148712
- Author
- aes...@apple.com
- Date
- 2013-04-18 16:32:20 -0700 (Thu, 18 Apr 2013)
Log Message
REGRESSION (r116645): Versions app's UI is munged in HiDPI due to background-size being reset to 'auto' when background short-hand is also specified
https://bugs.webkit.org/show_bug.cgi?id=114833
Reviewed by David Kilzer.
Source/WebCore:
Added applicationIsVersions() to RuntimeApplicationChecks.
* WebCore.exp.in:
* platform/RuntimeApplicationChecks.cpp:
(WebCore::applicationIsVersions):
(WebCore):
* platform/RuntimeApplicationChecks.h:
(WebCore):
Source/WebKit/mac:
The Versions app specifies both a background-size and a background
shorthand CSS property, and its UI is broken after r116645 which resets
background-size to 'auto' if the background shorthand property is
specified.
This patch enables the useLegacyBackgroundSizeShorthandBehavior setting
added in r147034 to restore the expected behavior if the embedder is
Versions.app and it was linked against a version of WebKit that had the
legacy behavior.
* Misc/WebKitVersionChecks.h:
* WebView/WebView.mm:
(shouldUseLegacyBackgroundSizeShorthandBehavior):
(-[WebView _commonInitializationWithFrameName:groupName:]):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (148711 => 148712)
--- trunk/Source/WebCore/ChangeLog 2013-04-18 22:52:06 UTC (rev 148711)
+++ trunk/Source/WebCore/ChangeLog 2013-04-18 23:32:20 UTC (rev 148712)
@@ -1,3 +1,19 @@
+2013-04-18 Andy Estes <aes...@apple.com>
+
+ REGRESSION (r116645): Versions app's UI is munged in HiDPI due to background-size being reset to 'auto' when background short-hand is also specified
+ https://bugs.webkit.org/show_bug.cgi?id=114833
+
+ Reviewed by David Kilzer.
+
+ Added applicationIsVersions() to RuntimeApplicationChecks.
+
+ * WebCore.exp.in:
+ * platform/RuntimeApplicationChecks.cpp:
+ (WebCore::applicationIsVersions):
+ (WebCore):
+ * platform/RuntimeApplicationChecks.h:
+ (WebCore):
+
2013-04-18 Sam Weinig <s...@webkit.org>
Network Process crashing trying to read in IDNScriptWhiteList.txt
Modified: trunk/Source/WebCore/WebCore.exp.in (148711 => 148712)
--- trunk/Source/WebCore/WebCore.exp.in 2013-04-18 22:52:06 UTC (rev 148711)
+++ trunk/Source/WebCore/WebCore.exp.in 2013-04-18 23:32:20 UTC (rev 148712)
@@ -1799,6 +1799,7 @@
__ZN7WebCore20builtInPDFPluginNameEv
__ZN7WebCore21DeviceOrientationData6createEbdbdbdbb
__ZN7WebCore21applicationIsApertureEv
+__ZN7WebCore21applicationIsVersionsEv
__ZN7WebCore21reportThreadViolationEPKcNS_20ThreadViolationRoundE
__ZN7WebCore22applicationIsAppleMailEv
__ZN7WebCore22contextMenuItemTagBoldEv
Modified: trunk/Source/WebCore/platform/RuntimeApplicationChecks.cpp (148711 => 148712)
--- trunk/Source/WebCore/platform/RuntimeApplicationChecks.cpp 2013-04-18 22:52:06 UTC (rev 148711)
+++ trunk/Source/WebCore/platform/RuntimeApplicationChecks.cpp 2013-04-18 23:32:20 UTC (rev 148712)
@@ -102,4 +102,10 @@
return isAperture;
}
+bool applicationIsVersions()
+{
+ static bool isVersions = mainBundleIsEqualTo("com.blackpixel.versions");
+ return isVersions;
+}
+
} // namespace WebCore
Modified: trunk/Source/WebCore/platform/RuntimeApplicationChecks.h (148711 => 148712)
--- trunk/Source/WebCore/platform/RuntimeApplicationChecks.h 2013-04-18 22:52:06 UTC (rev 148711)
+++ trunk/Source/WebCore/platform/RuntimeApplicationChecks.h 2013-04-18 23:32:20 UTC (rev 148712)
@@ -36,6 +36,7 @@
bool applicationIsMicrosoftMyDay();
bool applicationIsMicrosoftOutlook();
bool applicationIsSafari();
+bool applicationIsVersions();
} // namespace WebCore
Modified: trunk/Source/WebKit/mac/ChangeLog (148711 => 148712)
--- trunk/Source/WebKit/mac/ChangeLog 2013-04-18 22:52:06 UTC (rev 148711)
+++ trunk/Source/WebKit/mac/ChangeLog 2013-04-18 23:32:20 UTC (rev 148712)
@@ -1,3 +1,25 @@
+2013-04-18 Andy Estes <aes...@apple.com>
+
+ REGRESSION (r116645): Versions app's UI is munged in HiDPI due to background-size being reset to 'auto' when background short-hand is also specified
+ https://bugs.webkit.org/show_bug.cgi?id=114833
+
+ Reviewed by David Kilzer.
+
+ The Versions app specifies both a background-size and a background
+ shorthand CSS property, and its UI is broken after r116645 which resets
+ background-size to 'auto' if the background shorthand property is
+ specified.
+
+ This patch enables the useLegacyBackgroundSizeShorthandBehavior setting
+ added in r147034 to restore the expected behavior if the embedder is
+ Versions.app and it was linked against a version of WebKit that had the
+ legacy behavior.
+
+ * Misc/WebKitVersionChecks.h:
+ * WebView/WebView.mm:
+ (shouldUseLegacyBackgroundSizeShorthandBehavior):
+ (-[WebView _commonInitializationWithFrameName:groupName:]):
+
2013-04-18 Sam Weinig <s...@webkit.org>
Network Process crashing trying to read in IDNScriptWhiteList.txt
Modified: trunk/Source/WebKit/mac/Misc/WebKitVersionChecks.h (148711 => 148712)
--- trunk/Source/WebKit/mac/Misc/WebKitVersionChecks.h 2013-04-18 22:52:06 UTC (rev 148711)
+++ trunk/Source/WebKit/mac/Misc/WebKitVersionChecks.h 2013-04-18 23:32:20 UTC (rev 148712)
@@ -58,6 +58,7 @@
#define WEBKIT_FIRST_VERSION_WITH_GET_MATCHED_CSS_RULES_RESTRICTIONS 0x02160B00 // 534.11.0
#define WEBKIT_FIRST_VERSION_WITH_CORRECT_DID_FINISH_LOAD_ORDER 0x02170304 // 535.3.4
#define WEBKIT_FIRST_VERSION_WITH_CSS_ATTRIBUTE_SETTERS_IGNORING_PRIORITY 0x02170D00 // 535.13.0
+#define WEBKIT_FIRST_VERSION_WITHOUT_LEGACY_BACKGROUNDSIZE_SHORTHAND_BEHAVIOR 0x02190100 // 537.1.0
#ifdef __cplusplus
extern "C" {
Modified: trunk/Source/WebKit/mac/WebView/WebView.mm (148711 => 148712)
--- trunk/Source/WebKit/mac/WebView/WebView.mm 2013-04-18 22:52:06 UTC (rev 148711)
+++ trunk/Source/WebKit/mac/WebView/WebView.mm 2013-04-18 23:32:20 UTC (rev 148712)
@@ -673,6 +673,13 @@
return isIAdProducerNeedingAttributeSetterQuirk;
}
+static bool shouldUseLegacyBackgroundSizeShorthandBehavior()
+{
+ static bool shouldUseLegacyBackgroundSizeShorthandBehavior = applicationIsVersions()
+ && !WebKitLinkedOnOrAfter(WEBKIT_FIRST_VERSION_WITHOUT_LEGACY_BACKGROUNDSIZE_SHORTHAND_BEHAVIOR);
+ return shouldUseLegacyBackgroundSizeShorthandBehavior;
+}
+
- (void)_commonInitializationWithFrameName:(NSString *)frameName groupName:(NSString *)groupName
{
WebCoreThreadViolationCheckRoundTwo();
@@ -743,6 +750,7 @@
_private->page->setCanStartMedia([self window]);
_private->page->settings()->setLocalStorageDatabasePath([[self preferences] _localStorageDatabasePath]);
+ _private->page->settings()->setUseLegacyBackgroundSizeShorthandBehavior(shouldUseLegacyBackgroundSizeShorthandBehavior());
if (needsOutlookQuirksScript()) {
_private->page->settings()->setShouldInjectUserScriptsInInitialEmptyDocument(true);
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes