[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,
LayoutTests/imported/w3c:
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
Patch by Frederic Wang <fwang@igalia.com> on 2019-05-02
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.
Source/WebCore:
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
Patch by Frederic Wang <fwang@igalia.com> on 2019-05-02
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.
Source/WebKit:
these features are only disabled on GTK and WPE ports.
[1] https://mathml-refresh.github.io/mathml-core/
Patch by Frederic Wang <fwang@igalia.com> on 2019-05-02
Reviewed by Rob Buis.
* Shared/WebPreferences.yaml:
* Shared/WebPreferencesDefaultValues.h:
Source/WebKitLegacy/mac:
these features are only disabled on GTK and WPE ports.
[1] https://mathml-refresh.github.io/mathml-core/
Patch by Frederic Wang <fwang@igalia.com> on 2019-05-02
Reviewed by Rob Buis.
* WebView/WebPreferenceKeysPrivate.h:
* WebView/WebPreferences.mm:
(+[WebPreferences initialize]):
(-[WebPreferences coreMathMLEnabled]):
(-[WebPreferences setCoreMathMLEnabled:]):
* WebView/WebPreferencesPrivate.h:
* WebView/WebView.mm:
(-[WebView _preferencesChanged:]):
Source/WebKitLegacy/win:
these features are only disabled on GTK and WPE ports.
[1] https://mathml-refresh.github.io/mathml-core/
Patch by Frederic Wang <fwang@igalia.com> on 2019-05-02
Reviewed by Rob Buis.
* Interfaces/IWebPreferencesPrivate.idl:
* WebPreferenceKeysPrivate.h:
* WebPreferences.cpp:
(WebPreferences::initializeDefaultSettings):
(WebPreferences::coreMathMLEnabled):
(WebPreferences::setCoreMathMLEnabled):
* WebPreferences.h:
* WebView.cpp:
(WebView::notifyPreferencesChanged):
Tools:
these features are only disabled on GTK and WPE ports.
[1] https://mathml-refresh.github.io/mathml-core/
Patch by Frederic Wang <fwang@igalia.com> on 2019-05-02
Reviewed by Rob Buis.
* DumpRenderTree/TestOptions.cpp:
(TestOptions::TestOptions):
* DumpRenderTree/TestOptions.h:
* DumpRenderTree/mac/DumpRenderTree.mm:
(setWebPreferencesForTestOptions):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@244869 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/Source/WebKitLegacy/mac/WebView/WebPreferences.mm b/Source/WebKitLegacy/mac/WebView/WebPreferences.mm
index fc524f7..9f1c226 100644
--- a/Source/WebKitLegacy/mac/WebView/WebPreferences.mm
+++ b/Source/WebKitLegacy/mac/WebView/WebPreferences.mm
@@ -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)