Diff
Modified: trunk/LayoutTests/imported/w3c/ChangeLog (244868 => 244869)
--- trunk/LayoutTests/imported/w3c/ChangeLog 2019-05-02 06:27:07 UTC (rev 244868)
+++ trunk/LayoutTests/imported/w3c/ChangeLog 2019-05-02 10:12:14 UTC (rev 244869)
@@ -1,3 +1,24 @@
+2019-05-02 Frederic Wang <[email protected]>
+
+ [GTK][WPE] Disable "thin", "thick", "medium" values of mfrac@linethickness at runtime
+ https://bugs.webkit.org/show_bug.cgi?id=196142
+
+ This patch introduces some experimental runtime flag to let users
+ disable MathML features that are removed from MathML Core [1]. For now,
+ these features are only disabled on GTK and WPE ports. This patch also
+ adds a condition to disable "thin", "thick", "medium" values of
+ mfrac@linethickness at runtime as agreed in [2].
+
+ [1] https://mathml-refresh.github.io/mathml-core/
+ [2] https://github.com/mathml-refresh/mathml/issues/4
+
+ Reviewed by Rob Buis.
+
+ * web-platform-tests/mathml/presentation-markup/fractions/frac-linethickness-001.html:
+ Explicitly enable deprecated features in this test. It should be moved
+ back to WebKit's test suite if/when it is updated in the upstream WPT
+ repository so also add a reminder for the next synchronization.
+
2019-05-01 Darin Adler <[email protected]>
WebKit has too much of its own UTF-8 code and should rely more on ICU's UTF-8 support
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/mathml/presentation-markup/fractions/frac-linethickness-001.html (244868 => 244869)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/mathml/presentation-markup/fractions/frac-linethickness-001.html 2019-05-02 06:27:07 UTC (rev 244868)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/mathml/presentation-markup/fractions/frac-linethickness-001.html 2019-05-02 10:12:14 UTC (rev 244869)
@@ -1,4 +1,6 @@
-<!DOCTYPE html>
+<!DOCTYPE html> <!-- webkit-test-runner [ experimental:CoreMathMLEnabled=false ] -->
+<!-- FIXME: Ensure that thin/medium/thick/unitless values are still tested in LayoutTests/mathml with
+ CoreMathMLEnabled=false if/when this test is updated in the upstream WPT repository. -->
<html>
<head>
<meta charset="utf-8">
Modified: trunk/Source/WebCore/ChangeLog (244868 => 244869)
--- trunk/Source/WebCore/ChangeLog 2019-05-02 06:27:07 UTC (rev 244868)
+++ trunk/Source/WebCore/ChangeLog 2019-05-02 10:12:14 UTC (rev 244869)
@@ -1,3 +1,26 @@
+2019-05-02 Frederic Wang <[email protected]>
+
+ [GTK][WPE] Disable "thin", "thick", "medium" values of mfrac@linethickness at runtime
+ https://bugs.webkit.org/show_bug.cgi?id=196142
+
+ This patch introduces some experimental runtime flag to let users
+ disable MathML features that are removed from MathML Core [1]. For now,
+ these features are only disabled on GTK and WPE ports. This patch also
+ adds a condition to disable "thin", "thick", "medium" values of
+ mfrac@linethickness at runtime as agreed in [2].
+
+ [1] https://mathml-refresh.github.io/mathml-core/
+ [2] https://github.com/mathml-refresh/mathml/issues/4
+
+ Reviewed by Rob Buis.
+
+ No new tests, covered by frac-linethickness-0001.html
+
+ * mathml/MathMLFractionElement.cpp:
+ (WebCore::MathMLFractionElement::lineThickness): Just do standard
+ parsing for MathML lengths when non-core MathML features are disabled.
+ * page/Settings.yaml: Add WebCore setting.
+
2019-05-01 Jiewen Tan <[email protected]>
[WebAuthN] Adopt SecurityOrigin::isMatchingRegistrableDomainSuffix()
Modified: trunk/Source/WebCore/mathml/MathMLFractionElement.cpp (244868 => 244869)
--- trunk/Source/WebCore/mathml/MathMLFractionElement.cpp 2019-05-02 06:27:07 UTC (rev 244868)
+++ trunk/Source/WebCore/mathml/MathMLFractionElement.cpp 2019-05-02 10:12:14 UTC (rev 244869)
@@ -30,6 +30,7 @@
#if ENABLE(MATHML)
#include "RenderMathMLFraction.h"
+#include "Settings.h"
#include <wtf/IsoMallocInlines.h>
namespace WebCore {
@@ -53,10 +54,15 @@
if (m_lineThickness)
return m_lineThickness.value();
+ auto& thickness = attributeWithoutSynchronization(linethicknessAttr);
+ if (document().settings().coreMathMLEnabled()) {
+ m_lineThickness = parseMathMLLength(thickness);
+ return m_lineThickness.value();
+ }
+
// The MathML3 recommendation states that "medium" is the default thickness.
// However, it only states that "thin" and "thick" are respectively thiner and thicker.
// The MathML in HTML5 implementation note suggests 50% and 200% and these values are also used in Gecko.
- auto& thickness = attributeWithoutSynchronization(linethicknessAttr);
m_lineThickness = Length();
if (equalLettersIgnoringASCIICase(thickness, "thin")) {
m_lineThickness.value().type = LengthType::UnitLess;
Modified: trunk/Source/WebCore/page/Settings.yaml (244868 => 244869)
--- trunk/Source/WebCore/page/Settings.yaml 2019-05-02 06:27:07 UTC (rev 244868)
+++ trunk/Source/WebCore/page/Settings.yaml 2019-05-02 10:12:14 UTC (rev 244869)
@@ -824,6 +824,10 @@
adClickAttributionEnabled:
initial: false
+coreMathMLEnabled:
+ initial: false
+ onChange: setNeedsRecalcStyleInAllFrames
+
blockingOfSmallPluginsEnabled:
initial: true
Modified: trunk/Source/WebKit/ChangeLog (244868 => 244869)
--- trunk/Source/WebKit/ChangeLog 2019-05-02 06:27:07 UTC (rev 244868)
+++ trunk/Source/WebKit/ChangeLog 2019-05-02 10:12:14 UTC (rev 244869)
@@ -1,3 +1,19 @@
+2019-05-02 Frederic Wang <[email protected]>
+
+ [GTK][WPE] Disable "thin", "thick", "medium" values of mfrac@linethickness at runtime
+ https://bugs.webkit.org/show_bug.cgi?id=196142
+
+ This patch introduces some experimental runtime flag to let users
+ disable MathML features that are removed from MathML Core [1]. For now,
+ these features are only disabled on GTK and WPE ports.
+
+ [1] https://mathml-refresh.github.io/mathml-core/
+
+ Reviewed by Rob Buis.
+
+ * Shared/WebPreferences.yaml:
+ * Shared/WebPreferencesDefaultValues.h:
+
2019-05-01 Wenson Hsieh <[email protected]>
Add the ability to import WebKitAdditions snippets in WebKit.apinotes
Modified: trunk/Source/WebKit/Shared/WebPreferences.yaml (244868 => 244869)
--- trunk/Source/WebKit/Shared/WebPreferences.yaml 2019-05-02 06:27:07 UTC (rev 244868)
+++ trunk/Source/WebKit/Shared/WebPreferences.yaml 2019-05-02 10:12:14 UTC (rev 244869)
@@ -1650,6 +1650,13 @@
category: experimental
webcoreBinding: RuntimeEnabledFeatures
+CoreMathMLEnabled:
+ type: bool
+ defaultValue: DEFAULT_CORE_MATHML_ENABLED
+ humanReadableName: "MathML Core"
+ humanReadableDescription: "Disable features removed from the MathML Core spec."
+ category: experimental
+
ApplePayRemoteUIEnabled:
category: internal
condition: ENABLE(APPLE_PAY_REMOTE_UI)
Modified: trunk/Source/WebKit/Shared/WebPreferencesDefaultValues.h (244868 => 244869)
--- trunk/Source/WebKit/Shared/WebPreferencesDefaultValues.h 2019-05-02 06:27:07 UTC (rev 244868)
+++ trunk/Source/WebKit/Shared/WebPreferencesDefaultValues.h 2019-05-02 10:12:14 UTC (rev 244869)
@@ -31,6 +31,12 @@
#define DEFAULT_WEBKIT_TABSTOLINKS_ENABLED false
#endif
+#if PLATFORM(GTK) || PLATFORM(WPE)
+#define DEFAULT_CORE_MATHML_ENABLED true
+#else
+#define DEFAULT_CORE_MATHML_ENABLED false
+#endif
+
#if ENABLE(SMOOTH_SCROLLING)
#define DEFAULT_WEBKIT_SCROLL_ANIMATOR_ENABLED true
#else
Modified: trunk/Source/WebKitLegacy/mac/ChangeLog (244868 => 244869)
--- trunk/Source/WebKitLegacy/mac/ChangeLog 2019-05-02 06:27:07 UTC (rev 244868)
+++ trunk/Source/WebKitLegacy/mac/ChangeLog 2019-05-02 10:12:14 UTC (rev 244869)
@@ -1,3 +1,25 @@
+2019-05-02 Frederic Wang <[email protected]>
+
+ [GTK][WPE] Disable "thin", "thick", "medium" values of mfrac@linethickness at runtime
+ https://bugs.webkit.org/show_bug.cgi?id=196142
+
+ This patch introduces some experimental runtime flag to let users
+ disable MathML features that are removed from MathML Core [1]. For now,
+ these features are only disabled on GTK and WPE ports.
+
+ [1] https://mathml-refresh.github.io/mathml-core/
+
+ Reviewed by Rob Buis.
+
+ * WebView/WebPreferenceKeysPrivate.h:
+ * WebView/WebPreferences.mm:
+ (+[WebPreferences initialize]):
+ (-[WebPreferences coreMathMLEnabled]):
+ (-[WebPreferences setCoreMathMLEnabled:]):
+ * WebView/WebPreferencesPrivate.h:
+ * WebView/WebView.mm:
+ (-[WebView _preferencesChanged:]):
+
2019-04-29 Alex Christensen <[email protected]>
<rdar://problem/50299396> Fix internal High Sierra build
Modified: trunk/Source/WebKitLegacy/mac/WebView/WebPreferenceKeysPrivate.h (244868 => 244869)
--- trunk/Source/WebKitLegacy/mac/WebView/WebPreferenceKeysPrivate.h 2019-05-02 06:27:07 UTC (rev 244868)
+++ trunk/Source/WebKitLegacy/mac/WebView/WebPreferenceKeysPrivate.h 2019-05-02 10:12:14 UTC (rev 244869)
@@ -268,3 +268,5 @@
#define WebKitAdClickAttributionEnabledPreferenceKey @"WebKitAdClickAttributionEnabled"
#define WebKitReferrerPolicyAttributeEnabledPreferenceKey @"WebKitReferrerPolicyAttributeEnabled"
#define WebKitResizeObserverEnabledPreferenceKey @"WebKitResizeObserverEnabled"
+#define WebKitCoreMathMLEnabledPreferenceKey @"WebKitCoreMathMLEnabled"
+
Modified: trunk/Source/WebKitLegacy/mac/WebView/WebPreferences.mm (244868 => 244869)
--- trunk/Source/WebKitLegacy/mac/WebView/WebPreferences.mm 2019-05-02 06:27:07 UTC (rev 244868)
+++ trunk/Source/WebKitLegacy/mac/WebView/WebPreferences.mm 2019-05-02 10:12:14 UTC (rev 244869)
@@ -691,6 +691,7 @@
#if ENABLE(RESIZE_OBSERVER)
@NO, WebKitResizeObserverEnabledPreferenceKey,
#endif
+ @NO, WebKitCoreMathMLEnabledPreferenceKey,
nil];
#if !PLATFORM(IOS_FAMILY)
@@ -3456,6 +3457,17 @@
{
[self _setBoolValue:flag forKey:WebKitResizeObserverEnabledPreferenceKey];
}
+
+- (BOOL)coreMathMLEnabled
+{
+ return [self _boolValueForKey:WebKitCoreMathMLEnabledPreferenceKey];
+}
+
+- (void)setCoreMathMLEnabled:(BOOL)flag
+{
+ [self _setBoolValue:flag forKey:WebKitCoreMathMLEnabledPreferenceKey];
+}
+
@end
@implementation WebPreferences (WebInternal)
Modified: trunk/Source/WebKitLegacy/mac/WebView/WebPreferencesPrivate.h (244868 => 244869)
--- trunk/Source/WebKitLegacy/mac/WebView/WebPreferencesPrivate.h 2019-05-02 06:27:07 UTC (rev 244868)
+++ trunk/Source/WebKitLegacy/mac/WebView/WebPreferencesPrivate.h 2019-05-02 10:12:14 UTC (rev 244869)
@@ -603,6 +603,9 @@
- (void)setReferrerPolicyAttributeEnabled:(BOOL)flag;
- (BOOL)referrerPolicyAttributeEnabled;
+- (void)setCoreMathMLEnabled:(BOOL)flag;
+- (BOOL)coreMathMLEnabled;
+
@property (nonatomic) BOOL visualViewportAPIEnabled;
@property (nonatomic) BOOL CSSOMViewScrollingAPIEnabled;
@property (nonatomic) BOOL largeImageAsyncDecodingEnabled;
@@ -635,6 +638,7 @@
@property (nonatomic) BOOL sourceBufferChangeTypeEnabled;
@property (nonatomic) BOOL referrerPolicyAttributeEnabled;
@property (nonatomic) BOOL resizeObserverEnabled;
+@property (nonatomic) BOOL coreMathMLEnabled;
#if TARGET_OS_IPHONE
@property (nonatomic) BOOL quickLookDocumentSavingEnabled;
Modified: trunk/Source/WebKitLegacy/mac/WebView/WebView.mm (244868 => 244869)
--- trunk/Source/WebKitLegacy/mac/WebView/WebView.mm 2019-05-02 06:27:07 UTC (rev 244868)
+++ trunk/Source/WebKitLegacy/mac/WebView/WebView.mm 2019-05-02 10:12:14 UTC (rev 244869)
@@ -3214,6 +3214,8 @@
settings.setAnimatedImageAsyncDecodingEnabled([preferences animatedImageAsyncDecodingEnabled]);
settings.setMediaCapabilitiesEnabled([preferences mediaCapabilitiesEnabled]);
+ settings.setCoreMathMLEnabled([preferences coreMathMLEnabled]);
+
RuntimeEnabledFeatures::sharedFeatures().setServerTimingEnabled([preferences serverTimingEnabled]);
settings.setSelectionAcrossShadowBoundariesEnabled(preferences.selectionAcrossShadowBoundariesEnabled);
Modified: trunk/Source/WebKitLegacy/win/ChangeLog (244868 => 244869)
--- trunk/Source/WebKitLegacy/win/ChangeLog 2019-05-02 06:27:07 UTC (rev 244868)
+++ trunk/Source/WebKitLegacy/win/ChangeLog 2019-05-02 10:12:14 UTC (rev 244869)
@@ -1,3 +1,26 @@
+2019-05-02 Frederic Wang <[email protected]>
+
+ [GTK][WPE] Disable "thin", "thick", "medium" values of mfrac@linethickness at runtime
+ https://bugs.webkit.org/show_bug.cgi?id=196142
+
+ This patch introduces some experimental runtime flag to let users
+ disable MathML features that are removed from MathML Core [1]. For now,
+ these features are only disabled on GTK and WPE ports.
+
+ [1] https://mathml-refresh.github.io/mathml-core/
+
+ Reviewed by Rob Buis.
+
+ * Interfaces/IWebPreferencesPrivate.idl:
+ * WebPreferenceKeysPrivate.h:
+ * WebPreferences.cpp:
+ (WebPreferences::initializeDefaultSettings):
+ (WebPreferences::coreMathMLEnabled):
+ (WebPreferences::setCoreMathMLEnabled):
+ * WebPreferences.h:
+ * WebView.cpp:
+ (WebView::notifyPreferencesChanged):
+
2019-04-24 Zalan Bujtas <[email protected]>
Regression (r244291): Broken API Test AutoLayoutRenderingProgressRelativeOrdering
Modified: trunk/Source/WebKitLegacy/win/Interfaces/IWebPreferencesPrivate.idl (244868 => 244869)
--- trunk/Source/WebKitLegacy/win/Interfaces/IWebPreferencesPrivate.idl 2019-05-02 06:27:07 UTC (rev 244868)
+++ trunk/Source/WebKitLegacy/win/Interfaces/IWebPreferencesPrivate.idl 2019-05-02 10:12:14 UTC (rev 244869)
@@ -240,4 +240,6 @@
HRESULT setCrossOriginWindowPolicySupportEnabled([in] BOOL enabled);
HRESULT resizeObserverEnabled([out, retval] BOOL*);
HRESULT setResizeObserverEnabled([in] BOOL enabled);
+ HRESULT coreMathMLEnabled([out, retval] BOOL* enabled);
+ HRESULT setCoreMathMLEnabled([in] BOOL enabled);
}
Modified: trunk/Source/WebKitLegacy/win/WebPreferenceKeysPrivate.h (244868 => 244869)
--- trunk/Source/WebKitLegacy/win/WebPreferenceKeysPrivate.h 2019-05-02 06:27:07 UTC (rev 244868)
+++ trunk/Source/WebKitLegacy/win/WebPreferenceKeysPrivate.h 2019-05-02 10:12:14 UTC (rev 244869)
@@ -207,3 +207,5 @@
#define WebKitCSSOMViewScrollingAPIEnabledPreferenceKey "WebKitCSSOMViewScrollingAPIEnabled"
#define WebKitResizeObserverEnabledPreferenceKey "WebKitResizeObserverEnabled"
+
+#define WebKitCoreMathMLEnabledPreferenceKey "WebKitCoreMathMLEnabled"
Modified: trunk/Source/WebKitLegacy/win/WebPreferences.cpp (244868 => 244869)
--- trunk/Source/WebKitLegacy/win/WebPreferences.cpp 2019-05-02 06:27:07 UTC (rev 244868)
+++ trunk/Source/WebKitLegacy/win/WebPreferences.cpp 2019-05-02 10:12:14 UTC (rev 244869)
@@ -331,6 +331,8 @@
CFDictionaryAddValue(defaults, CFSTR(WebKitResizeObserverEnabledPreferenceKey), kCFBooleanFalse);
+ CFDictionaryAddValue(defaults, CFSTR(WebKitCoreMathMLEnabledPreferenceKey), kCFBooleanFalse);
+
defaultSettings = defaults;
}
@@ -2201,6 +2203,20 @@
return S_OK;
}
+HRESULT WebPreferences::coreMathMLEnabled(_Out_ BOOL* enabled)
+{
+ if (!enabled)
+ return E_POINTER;
+ *enabled = boolValueForKey(WebKitCoreMathMLEnabledPreferenceKey);
+ return S_OK;
+}
+
+HRESULT WebPreferences::setCoreMathMLEnabled(BOOL enabled)
+{
+ setBoolValue(WebKitCoreMathMLEnabledPreferenceKey, enabled);
+ return S_OK;
+}
+
HRESULT WebPreferences::setApplicationId(BSTR applicationId)
{
m_applicationId = String(applicationId).createCFString();
Modified: trunk/Source/WebKitLegacy/win/WebPreferences.h (244868 => 244869)
--- trunk/Source/WebKitLegacy/win/WebPreferences.h 2019-05-02 06:27:07 UTC (rev 244868)
+++ trunk/Source/WebKitLegacy/win/WebPreferences.h 2019-05-02 10:12:14 UTC (rev 244869)
@@ -285,6 +285,8 @@
virtual HRESULT STDMETHODCALLTYPE setCrossOriginWindowPolicySupportEnabled(BOOL);
virtual HRESULT STDMETHODCALLTYPE resizeObserverEnabled(_Out_ BOOL*);
virtual HRESULT STDMETHODCALLTYPE setResizeObserverEnabled(BOOL);
+ virtual HRESULT STDMETHODCALLTYPE coreMathMLEnabled(_Out_ BOOL*);
+ virtual HRESULT STDMETHODCALLTYPE setCoreMathMLEnabled(BOOL);
// WebPreferences
Modified: trunk/Source/WebKitLegacy/win/WebView.cpp (244868 => 244869)
--- trunk/Source/WebKitLegacy/win/WebView.cpp 2019-05-02 06:27:07 UTC (rev 244868)
+++ trunk/Source/WebKitLegacy/win/WebView.cpp 2019-05-02 10:12:14 UTC (rev 244869)
@@ -5601,6 +5601,11 @@
return hr;
settings.setResizeObserverEnabled(!!enabled);
+ hr = prefsPrivate->coreMathMLEnabled(&enabled);
+ if (FAILED(hr))
+ return hr;
+ settings.setCoreMathMLEnabled(!!enabled);
+
return S_OK;
}
Modified: trunk/Tools/ChangeLog (244868 => 244869)
--- trunk/Tools/ChangeLog 2019-05-02 06:27:07 UTC (rev 244868)
+++ trunk/Tools/ChangeLog 2019-05-02 10:12:14 UTC (rev 244869)
@@ -1,3 +1,22 @@
+2019-05-02 Frederic Wang <[email protected]>
+
+ [GTK][WPE] Disable "thin", "thick", "medium" values of mfrac@linethickness at runtime
+ https://bugs.webkit.org/show_bug.cgi?id=196142
+
+ This patch introduces some experimental runtime flag to let users
+ disable MathML features that are removed from MathML Core [1]. For now,
+ these features are only disabled on GTK and WPE ports.
+
+ [1] https://mathml-refresh.github.io/mathml-core/
+
+ Reviewed by Rob Buis.
+
+ * DumpRenderTree/TestOptions.cpp:
+ (TestOptions::TestOptions):
+ * DumpRenderTree/TestOptions.h:
+ * DumpRenderTree/mac/DumpRenderTree.mm:
+ (setWebPreferencesForTestOptions):
+
2019-05-01 Don Olmstead <[email protected]>
TestWebKitAPI config.h should be aware of what suite is being built
Modified: trunk/Tools/DumpRenderTree/TestOptions.cpp (244868 => 244869)
--- trunk/Tools/DumpRenderTree/TestOptions.cpp 2019-05-02 06:27:07 UTC (rev 244868)
+++ trunk/Tools/DumpRenderTree/TestOptions.cpp 2019-05-02 10:12:14 UTC (rev 244869)
@@ -113,6 +113,8 @@
adClickAttributionEnabled = parseBooleanTestHeaderValue(value);
else if (key == "experimental:ResizeObserverEnabled")
enableResizeObserver = parseBooleanTestHeaderValue(value);
+ else if (key == "experimental:CoreMathMLEnabled")
+ enableCoreMathML = parseBooleanTestHeaderValue(value);
pairStart = pairEnd + 1;
}
}
Modified: trunk/Tools/DumpRenderTree/TestOptions.h (244868 => 244869)
--- trunk/Tools/DumpRenderTree/TestOptions.h 2019-05-02 06:27:07 UTC (rev 244868)
+++ trunk/Tools/DumpRenderTree/TestOptions.h 2019-05-02 10:12:14 UTC (rev 244869)
@@ -47,6 +47,7 @@
bool enableCSSLogical { false };
bool adClickAttributionEnabled { false };
bool enableResizeObserver { false };
+ bool enableCoreMathML { false };
std::string jscOptions;
TestOptions(const std::string& pathOrURL, const std::string& absolutePath);
Modified: trunk/Tools/DumpRenderTree/mac/DumpRenderTree.mm (244868 => 244869)
--- trunk/Tools/DumpRenderTree/mac/DumpRenderTree.mm 2019-05-02 06:27:07 UTC (rev 244868)
+++ trunk/Tools/DumpRenderTree/mac/DumpRenderTree.mm 2019-05-02 10:12:14 UTC (rev 244869)
@@ -1019,6 +1019,7 @@
preferences.CSSLogicalEnabled = options.enableCSSLogical;
preferences.adClickAttributionEnabled = options.adClickAttributionEnabled;
preferences.resizeObserverEnabled = options.enableResizeObserver;
+ preferences.coreMathMLEnabled = options.enableCoreMathML;
}
// Called once on DumpRenderTree startup.