Changeset 148712 in webkit


Ignore:
Timestamp:
Apr 18, 2013 4:32:20 PM (11 years ago)
Author:
aestes@apple.com
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:]):

Location:
trunk/Source
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r148708 r148712  
     12013-04-18  Andy Estes  <aestes@apple.com>
     2
     3        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
     4        https://bugs.webkit.org/show_bug.cgi?id=114833
     5
     6        Reviewed by David Kilzer.
     7
     8        Added applicationIsVersions() to RuntimeApplicationChecks.
     9
     10        * WebCore.exp.in:
     11        * platform/RuntimeApplicationChecks.cpp:
     12        (WebCore::applicationIsVersions):
     13        (WebCore):
     14        * platform/RuntimeApplicationChecks.h:
     15        (WebCore):
     16
    1172013-04-18  Sam Weinig  <sam@webkit.org>
    218
  • trunk/Source/WebCore/WebCore.exp.in

    r148696 r148712  
    18001800__ZN7WebCore21DeviceOrientationData6createEbdbdbdbb
    18011801__ZN7WebCore21applicationIsApertureEv
     1802__ZN7WebCore21applicationIsVersionsEv
    18021803__ZN7WebCore21reportThreadViolationEPKcNS_20ThreadViolationRoundE
    18031804__ZN7WebCore22applicationIsAppleMailEv
  • trunk/Source/WebCore/platform/RuntimeApplicationChecks.cpp

    r132916 r148712  
    103103}
    104104
     105bool applicationIsVersions()
     106{
     107    static bool isVersions = mainBundleIsEqualTo("com.blackpixel.versions");
     108    return isVersions;
     109}
     110
    105111} // namespace WebCore
  • trunk/Source/WebCore/platform/RuntimeApplicationChecks.h

    r96205 r148712  
    3737bool applicationIsMicrosoftOutlook();
    3838bool applicationIsSafari();
     39bool applicationIsVersions();
    3940
    4041} // namespace WebCore
  • trunk/Source/WebKit/mac/ChangeLog

    r148708 r148712  
     12013-04-18  Andy Estes  <aestes@apple.com>
     2
     3        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
     4        https://bugs.webkit.org/show_bug.cgi?id=114833
     5
     6        Reviewed by David Kilzer.
     7
     8        The Versions app specifies both a background-size and a background
     9        shorthand CSS property, and its UI is broken after r116645 which resets
     10        background-size to 'auto' if the background shorthand property is
     11        specified.
     12
     13        This patch enables the useLegacyBackgroundSizeShorthandBehavior setting
     14        added in r147034 to restore the expected behavior if the embedder is
     15        Versions.app and it was linked against a version of WebKit that had the
     16        legacy behavior.
     17
     18        * Misc/WebKitVersionChecks.h:
     19        * WebView/WebView.mm:
     20        (shouldUseLegacyBackgroundSizeShorthandBehavior):
     21        (-[WebView _commonInitializationWithFrameName:groupName:]):
     22
    1232013-04-18  Sam Weinig  <sam@webkit.org>
    224
  • trunk/Source/WebKit/mac/Misc/WebKitVersionChecks.h

    r118086 r148712  
    5959#define WEBKIT_FIRST_VERSION_WITH_CORRECT_DID_FINISH_LOAD_ORDER 0x02170304 // 535.3.4
    6060#define WEBKIT_FIRST_VERSION_WITH_CSS_ATTRIBUTE_SETTERS_IGNORING_PRIORITY 0x02170D00 // 535.13.0
     61#define WEBKIT_FIRST_VERSION_WITHOUT_LEGACY_BACKGROUNDSIZE_SHORTHAND_BEHAVIOR 0x02190100 // 537.1.0
    6162
    6263#ifdef __cplusplus
  • trunk/Source/WebKit/mac/WebView/WebView.mm

    r148590 r148712  
    674674}
    675675
     676static bool shouldUseLegacyBackgroundSizeShorthandBehavior()
     677{
     678    static bool shouldUseLegacyBackgroundSizeShorthandBehavior = applicationIsVersions()
     679        && !WebKitLinkedOnOrAfter(WEBKIT_FIRST_VERSION_WITHOUT_LEGACY_BACKGROUNDSIZE_SHORTHAND_BEHAVIOR);
     680    return shouldUseLegacyBackgroundSizeShorthandBehavior;
     681}
     682
    676683- (void)_commonInitializationWithFrameName:(NSString *)frameName groupName:(NSString *)groupName
    677684{
     
    744751    _private->page->setCanStartMedia([self window]);
    745752    _private->page->settings()->setLocalStorageDatabasePath([[self preferences] _localStorageDatabasePath]);
     753    _private->page->settings()->setUseLegacyBackgroundSizeShorthandBehavior(shouldUseLegacyBackgroundSizeShorthandBehavior());
    746754
    747755    if (needsOutlookQuirksScript()) {
Note: See TracChangeset for help on using the changeset viewer.