Diff
Modified: branches/safari-537.74-branch/LayoutTests/ChangeLog (160422 => 160423)
--- branches/safari-537.74-branch/LayoutTests/ChangeLog 2013-12-11 12:00:40 UTC (rev 160422)
+++ branches/safari-537.74-branch/LayoutTests/ChangeLog 2013-12-11 12:12:06 UTC (rev 160423)
@@ -1,3 +1,21 @@
+2013-12-11 Lucas Forschler <[email protected]>
+
+ Merge r159460
+
+ 2013-11-18 David Hyatt <[email protected]>
+
+ Add a quirk to not respect center text-align when positioning
+
+ <rdar://problem/15427571>
+ https://bugs.webkit.org/show_bug.cgi?id=124522
+
+ Reviewed by Simon Fraser.
+
+ Added fast/block/legacy-text-align-position-quirk.html
+
+ * fast/block/legacy-text-align-position-quirk-expected.html: Added.
+ * fast/block/legacy-text-align-position-quirk.html: Added.
+
2013-11-20 Lucas Forschler <[email protected]>
Merge r159481
Copied: branches/safari-537.74-branch/LayoutTests/fast/block/legacy-text-align-position-quirk-expected.html (from rev 159460, trunk/LayoutTests/fast/block/legacy-text-align-position-quirk-expected.html) (0 => 160423)
--- branches/safari-537.74-branch/LayoutTests/fast/block/legacy-text-align-position-quirk-expected.html (rev 0)
+++ branches/safari-537.74-branch/LayoutTests/fast/block/legacy-text-align-position-quirk-expected.html 2013-12-11 12:12:06 UTC (rev 160423)
@@ -0,0 +1,24 @@
+<html>
+<head>
+ <style>
+ #block {
+ margin: 0px;
+ padding: 0px;
+ position: absolute;
+ width: 200px;
+ background: blue;
+ height: 20px;
+ display: inline-block;
+ }
+ </style>
+</head>
+<body style="width: 800px;">
+ <p> The two blue bars should be aligned with each other. </p>
+ <div>
+ <span style="position: absolute; top: 44px;">
+ <div id="block"></div>
+ </span>
+ </div>
+ <div id="block" style="position: absolute; top: 80px;"></div>
+</body>
+</html>
Copied: branches/safari-537.74-branch/LayoutTests/fast/block/legacy-text-align-position-quirk.html (from rev 159460, trunk/LayoutTests/fast/block/legacy-text-align-position-quirk.html) (0 => 160423)
--- branches/safari-537.74-branch/LayoutTests/fast/block/legacy-text-align-position-quirk.html (rev 0)
+++ branches/safari-537.74-branch/LayoutTests/fast/block/legacy-text-align-position-quirk.html 2013-12-11 12:12:06 UTC (rev 160423)
@@ -0,0 +1,28 @@
+<html>
+<head>
+ <style>
+ #block {
+ margin: 0px;
+ padding: 0px;
+ position: absolute;
+ width: 200px;
+ background: blue;
+ height: 20px;
+ display: inline-block;
+ }
+ </style>
+ <script>
+ if (internals)
+ internals.settings.setUseLegacyTextAlignPositionedElementBehavior(true)
+ </script>
+</head>
+<body style="width: 800px;">
+ <p> The two blue bars should be aligned with each other. </p>
+ <div style="text-align: center" >
+ <span style="position: absolute; top: 44px;">
+ <div id="block"></div>
+ </span>
+ </div>
+ <div id="block" style="position: absolute; top: 80px;"></div>
+</body>
+</html>
Modified: branches/safari-537.74-branch/Source/WebCore/ChangeLog (160422 => 160423)
--- branches/safari-537.74-branch/Source/WebCore/ChangeLog 2013-12-11 12:00:40 UTC (rev 160422)
+++ branches/safari-537.74-branch/Source/WebCore/ChangeLog 2013-12-11 12:12:06 UTC (rev 160423)
@@ -1,3 +1,25 @@
+2013-12-11 Lucas Forschler <[email protected]>
+
+ Merge r159460
+
+ 2013-11-18 David Hyatt <[email protected]>
+
+ Add a quirk to not respect center text-align when positioning
+
+ <rdar://problem/15427571>
+ https://bugs.webkit.org/show_bug.cgi?id=124522
+
+ Reviewed by Simon Fraser.
+
+ Added fast/block/legacy-text-align-position-quirk.html
+
+ * page/Settings.in:
+ Add the quirk setting.
+
+ * rendering/RenderBlockLineLayout.cpp:
+ (WebCore::RenderBlock::startAlignedOffsetForLine):
+ Don't pay attention to center text-align when the quirk is set.
+
2013-12-10 Matthew Hanson <[email protected]>
Merge 154333
Modified: branches/safari-537.74-branch/Source/WebCore/page/Settings.in (160422 => 160423)
--- branches/safari-537.74-branch/Source/WebCore/page/Settings.in 2013-12-11 12:00:40 UTC (rev 160422)
+++ branches/safari-537.74-branch/Source/WebCore/page/Settings.in 2013-12-11 12:12:06 UTC (rev 160423)
@@ -87,6 +87,7 @@
acceleratedFiltersEnabled initial=false
regionBasedColumnsEnabled initial=false
cssGridLayoutEnabled initial=false
+useLegacyTextAlignPositionedElementBehavior initial=false
# FIXME: This should really be disabled by default as it makes platforms that don't support the feature download files
# they can't use by. Leaving enabled for now to not change existing behavior.
Modified: branches/safari-537.74-branch/Source/WebCore/rendering/RenderBlockLineLayout.cpp (160422 => 160423)
--- branches/safari-537.74-branch/Source/WebCore/rendering/RenderBlockLineLayout.cpp 2013-12-11 12:00:40 UTC (rev 160422)
+++ branches/safari-537.74-branch/Source/WebCore/rendering/RenderBlockLineLayout.cpp 2013-12-11 12:12:06 UTC (rev 160423)
@@ -3663,7 +3663,11 @@
{
ETextAlign textAlign = style()->textAlign();
- if (textAlign == TASTART) // FIXME: Handle TAEND here
+ // <rdar://problem/15427571>
+ // https://bugs.webkit.org/show_bug.cgi?id=124522
+ // This quirk is for legacy content that doesn't work properly with the center positioning scheme
+ // being honored (e.g., epubs).
+ if (textAlign == TASTART || document()->settings()->useLegacyTextAlignPositionedElementBehavior()) // FIXME: Handle TAEND here
return startOffsetForLine(position, firstLine);
// updateLogicalWidthForAlignment() handles the direction of the block so no need to consider it here
Modified: branches/safari-537.74-branch/Source/WebKit/mac/ChangeLog (160422 => 160423)
--- branches/safari-537.74-branch/Source/WebKit/mac/ChangeLog 2013-12-11 12:00:40 UTC (rev 160422)
+++ branches/safari-537.74-branch/Source/WebKit/mac/ChangeLog 2013-12-11 12:12:06 UTC (rev 160423)
@@ -1,5 +1,29 @@
2013-12-11 Lucas Forschler <[email protected]>
+ Merge r159460
+
+ 2013-11-18 David Hyatt <[email protected]>
+
+ Add a quirk to not respect center text-align when positioning
+
+ <rdar://problem/15427571>
+ https://bugs.webkit.org/show_bug.cgi?id=124522
+
+ Reviewed by Simon Fraser.
+
+ Added fast/block/legacy-text-align-position-quirk.html
+
+ * WebView/WebPreferenceKeysPrivate.h:
+ * WebView/WebPreferences.mm:
+ (+[WebPreferences initialize]):
+ (-[WebPreferences useLegacyTextAlignPositionedElementBehavior]):
+ (-[WebPreferences setUseLegacyTextAlignPositionedElementBehavior:]):
+ * WebView/WebPreferencesPrivate.h:
+ * WebView/WebView.mm:
+ (-[WebView _preferencesChanged:]):
+
+2013-12-11 Lucas Forschler <[email protected]>
+
Merge r157279
2013-10-10 Simon Fraser <[email protected]>
Modified: branches/safari-537.74-branch/Source/WebKit/mac/WebView/WebPreferenceKeysPrivate.h (160422 => 160423)
--- branches/safari-537.74-branch/Source/WebKit/mac/WebView/WebPreferenceKeysPrivate.h 2013-12-11 12:00:40 UTC (rev 160422)
+++ branches/safari-537.74-branch/Source/WebKit/mac/WebView/WebPreferenceKeysPrivate.h 2013-12-11 12:12:06 UTC (rev 160423)
@@ -133,6 +133,7 @@
#define WebKitHiddenPageDOMTimerThrottlingEnabledPreferenceKey @"WebKitHiddenPageDOMTimerThrottlingEnabled"
#define WebKitHiddenPageCSSAnimationSuspensionEnabledPreferenceKey @"WebKitHiddenPageCSSAnimationSuspensionEnabled"
#define WebKitLowPowerVideoAudioBufferSizeEnabledPreferenceKey @"WebKitLowPowerVideoAudioBufferSizeEnabled"
+#define WebKitUseLegacyTextAlignPositionedElementBehaviorPreferenceKey @"WebKitUseLegacyTextAlignPositionedElementBehavior"
// These are private both because callers should be using the cover methods and because the
// cover methods themselves are private.
Modified: branches/safari-537.74-branch/Source/WebKit/mac/WebView/WebPreferences.mm (160422 => 160423)
--- branches/safari-537.74-branch/Source/WebKit/mac/WebView/WebPreferences.mm 2013-12-11 12:00:40 UTC (rev 160422)
+++ branches/safari-537.74-branch/Source/WebKit/mac/WebView/WebPreferences.mm 2013-12-11 12:12:06 UTC (rev 160423)
@@ -419,6 +419,9 @@
[NSNumber numberWithBool:NO], WebKitHiddenPageDOMTimerThrottlingEnabledPreferenceKey,
[NSNumber numberWithBool:NO], WebKitHiddenPageCSSAnimationSuspensionEnabledPreferenceKey,
[NSNumber numberWithBool:NO], WebKitLowPowerVideoAudioBufferSizeEnabledPreferenceKey,
+
+ [NSNumber numberWithBool:NO], WebKitUseLegacyTextAlignPositionedElementBehaviorPreferenceKey,
+
nil];
@@ -1840,6 +1843,16 @@
[self _setBoolValue:enabled forKey:WebKitLowPowerVideoAudioBufferSizeEnabledPreferenceKey];
}
+- (BOOL)useLegacyTextAlignPositionedElementBehavior
+{
+ return [self _boolValueForKey:WebKitUseLegacyTextAlignPositionedElementBehaviorPreferenceKey];
+}
+
+- (void)setUseLegacyTextAlignPositionedElementBehavior:(BOOL)enabled
+{
+ [self _setBoolValue:enabled forKey:WebKitUseLegacyTextAlignPositionedElementBehaviorPreferenceKey];
+}
+
@end
@implementation WebPreferences (WebInternal)
Modified: branches/safari-537.74-branch/Source/WebKit/mac/WebView/WebPreferencesPrivate.h (160422 => 160423)
--- branches/safari-537.74-branch/Source/WebKit/mac/WebView/WebPreferencesPrivate.h 2013-12-11 12:00:40 UTC (rev 160422)
+++ branches/safari-537.74-branch/Source/WebKit/mac/WebView/WebPreferencesPrivate.h 2013-12-11 12:12:06 UTC (rev 160423)
@@ -338,5 +338,7 @@
- (BOOL)lowPowerVideoAudioBufferSizeEnabled;
- (void)setLowPowerVideoAudioBufferSizeEnabled:(BOOL)enabled;
+- (void)setUseLegacyTextAlignPositionedElementBehavior:(BOOL)flag;
+- (BOOL)useLegacyTextAlignPositionedElementBehavior;
@end
Modified: branches/safari-537.74-branch/Source/WebKit/mac/WebView/WebView.mm (160422 => 160423)
--- branches/safari-537.74-branch/Source/WebKit/mac/WebView/WebView.mm 2013-12-11 12:00:40 UTC (rev 160422)
+++ branches/safari-537.74-branch/Source/WebKit/mac/WebView/WebView.mm 2013-12-11 12:12:06 UTC (rev 160423)
@@ -1556,6 +1556,8 @@
settings->setDiagnosticLoggingEnabled([preferences diagnosticLoggingEnabled]);
settings->setLowPowerVideoAudioBufferSizeEnabled([preferences lowPowerVideoAudioBufferSizeEnabled]);
+ settings->setUseLegacyTextAlignPositionedElementBehavior([preferences useLegacyTextAlignPositionedElementBehavior]);
+
switch ([preferences storageBlockingPolicy]) {
case WebAllowAllStorage:
settings->setStorageBlockingPolicy(SecurityOrigin::AllowAllStorage);
Modified: branches/safari-537.74-branch/Source/WebKit2/ChangeLog (160422 => 160423)
--- branches/safari-537.74-branch/Source/WebKit2/ChangeLog 2013-12-11 12:00:40 UTC (rev 160422)
+++ branches/safari-537.74-branch/Source/WebKit2/ChangeLog 2013-12-11 12:12:06 UTC (rev 160423)
@@ -1,5 +1,28 @@
2013-12-11 Lucas Forschler <[email protected]>
+ Merge r159460
+
+ 2013-11-18 David Hyatt <[email protected]>
+
+ Add a quirk to not respect center text-align when positioning
+
+ <rdar://problem/15427571>
+ https://bugs.webkit.org/show_bug.cgi?id=124522
+
+ Reviewed by Simon Fraser.
+
+ Added fast/block/legacy-text-align-position-quirk.html
+
+ * Shared/WebPreferencesStore.h:
+ * UIProcess/API/C/WKPreferences.cpp:
+ (WKPreferencesUseLegacyTextAlignPositionedElementBehavior):
+ (WKPreferencesSetUseLegacyTextAlignPositionedElementBehavior):
+ * UIProcess/API/C/WKPreferencesPrivate.h:
+ * WebProcess/WebPage/WebPage.cpp:
+ (WebKit::WebPage::updatePreferences):
+
+2013-12-11 Lucas Forschler <[email protected]>
+
Merge r159173
2013-11-12 Anders Carlsson <[email protected]>
Modified: branches/safari-537.74-branch/Source/WebKit2/Shared/WebPreferencesStore.h (160422 => 160423)
--- branches/safari-537.74-branch/Source/WebKit2/Shared/WebPreferencesStore.h 2013-12-11 12:00:40 UTC (rev 160422)
+++ branches/safari-537.74-branch/Source/WebKit2/Shared/WebPreferencesStore.h 2013-12-11 12:12:06 UTC (rev 160423)
@@ -161,6 +161,7 @@
macro(HiddenPageDOMTimerThrottlingEnabled, hiddenPageDOMTimerThrottlingEnabled, Bool, bool, DEFAULT_HIDDEN_PAGE_DOM_TIMER_THROTTLING_ENABLED) \
macro(HiddenPageCSSAnimationSuspensionEnabled, hiddenPageCSSAnimationSuspensionEnabled, Bool, bool, DEFAULT_HIDDEN_PAGE_CSS_ANIMATION_SUSPENSION_ENABLED) \
macro(LowPowerVideoAudioBufferSizeEnabled, lowPowerVideoAudioBufferSizeEnabled, Bool, bool, false) \
+ macro(UseLegacyTextAlignPositionedElementBehavior, useLegacyTextAlignPositionedElementBehavior, Bool, bool, false) \
\
#define FOR_EACH_WEBKIT_DOUBLE_PREFERENCE(macro) \
Modified: branches/safari-537.74-branch/Source/WebKit2/UIProcess/API/C/WKPreferences.cpp (160422 => 160423)
--- branches/safari-537.74-branch/Source/WebKit2/UIProcess/API/C/WKPreferences.cpp 2013-12-11 12:00:40 UTC (rev 160422)
+++ branches/safari-537.74-branch/Source/WebKit2/UIProcess/API/C/WKPreferences.cpp 2013-12-11 12:12:06 UTC (rev 160423)
@@ -524,6 +524,16 @@
toImpl(preferencesRef)->setNeedsSiteSpecificQuirks(flag);
}
+bool WKPreferencesUseLegacyTextAlignPositionedElementBehavior(WKPreferencesRef preferencesRef)
+{
+ return toImpl(preferencesRef)->useLegacyTextAlignPositionedElementBehavior();
+}
+
+void WKPreferencesSetUseLegacyTextAlignPositionedElementBehavior(WKPreferencesRef preferencesRef, bool flag)
+{
+ toImpl(preferencesRef)->setUseLegacyTextAlignPositionedElementBehavior(flag);
+}
+
bool WKPreferencesGetNeedsSiteSpecificQuirks(WKPreferencesRef preferencesRef)
{
return toImpl(preferencesRef)->needsSiteSpecificQuirks();
Modified: branches/safari-537.74-branch/Source/WebKit2/UIProcess/API/C/WKPreferencesPrivate.h (160422 => 160423)
--- branches/safari-537.74-branch/Source/WebKit2/UIProcess/API/C/WKPreferencesPrivate.h 2013-12-11 12:00:40 UTC (rev 160422)
+++ branches/safari-537.74-branch/Source/WebKit2/UIProcess/API/C/WKPreferencesPrivate.h 2013-12-11 12:12:06 UTC (rev 160423)
@@ -289,6 +289,10 @@
WK_EXPORT void WKPreferencesResetTestRunnerOverrides(WKPreferencesRef preferencesRef);
+// Defaults to false.
+WK_EXPORT void WKPreferencesSetUseLegacyTextAlignPositionedElementBehavior(WKPreferencesRef preferencesRef, bool enabled);
+WK_EXPORT bool WKPreferencesUseLegacyTextAlignPositionedElementBehavior(WKPreferencesRef preferencesRef);
+
#ifdef __cplusplus
}
#endif
Modified: branches/safari-537.74-branch/Source/WebKit2/WebProcess/WebPage/WebPage.cpp (160422 => 160423)
--- branches/safari-537.74-branch/Source/WebKit2/WebProcess/WebPage/WebPage.cpp 2013-12-11 12:00:40 UTC (rev 160422)
+++ branches/safari-537.74-branch/Source/WebKit2/WebProcess/WebPage/WebPage.cpp 2013-12-11 12:12:06 UTC (rev 160423)
@@ -2617,6 +2617,8 @@
settings->setLowPowerVideoAudioBufferSizeEnabled(store.getBoolValueForKey(WebPreferencesKey::lowPowerVideoAudioBufferSizeEnabledKey()));
+ settings->setUseLegacyTextAlignPositionedElementBehavior(store.getBoolValueForKey(WebPreferencesKey::useLegacyTextAlignPositionedElementBehaviorKey()));
+
platformPreferencesDidChange(store);
if (m_drawingArea)