Title: [244683] trunk/Source
- Revision
- 244683
- Author
- mmaxfi...@apple.com
- Date
- 2019-04-25 23:39:30 -0700 (Thu, 25 Apr 2019)
Log Message
[iOS] Add internal setting to force -webkit-text-size-adjust to "auto"
https://bugs.webkit.org/show_bug.cgi?id=197275
<rdar://problem/50211019>
Reviewed by Simon Fraser.
Source/WebCore:
This setting makes it easier to investigate the autosizing work we've been doing
in https://bugs.webkit.org/show_bug.cgi?id=197250.
* page/Settings.yaml:
* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::adjustComputedFontSizes):
* rendering/TextAutoSizing.cpp:
(WebCore::TextAutoSizingValue::adjustTextNodeSizes):
Source/WebKit:
* Shared/WebPreferences.yaml:
* UIProcess/WebPreferences.h:
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (244682 => 244683)
--- trunk/Source/WebCore/ChangeLog 2019-04-26 06:33:56 UTC (rev 244682)
+++ trunk/Source/WebCore/ChangeLog 2019-04-26 06:39:30 UTC (rev 244683)
@@ -1,5 +1,22 @@
2019-04-25 Myles C. Maxfield <mmaxfi...@apple.com>
+ [iOS] Add internal setting to force -webkit-text-size-adjust to "auto"
+ https://bugs.webkit.org/show_bug.cgi?id=197275
+ <rdar://problem/50211019>
+
+ Reviewed by Simon Fraser.
+
+ This setting makes it easier to investigate the autosizing work we've been doing
+ in https://bugs.webkit.org/show_bug.cgi?id=197250.
+
+ * page/Settings.yaml:
+ * rendering/RenderBlockFlow.cpp:
+ (WebCore::RenderBlockFlow::adjustComputedFontSizes):
+ * rendering/TextAutoSizing.cpp:
+ (WebCore::TextAutoSizingValue::adjustTextNodeSizes):
+
+2019-04-25 Myles C. Maxfield <mmaxfi...@apple.com>
+
[iOS] Implement idempotent mode for text autosizing
https://bugs.webkit.org/show_bug.cgi?id=197250
<rdar://problem/50211034>
Modified: trunk/Source/WebCore/page/Settings.yaml (244682 => 244683)
--- trunk/Source/WebCore/page/Settings.yaml 2019-04-26 06:33:56 UTC (rev 244682)
+++ trunk/Source/WebCore/page/Settings.yaml 2019-04-26 06:39:30 UTC (rev 244683)
@@ -444,6 +444,10 @@
initial: defaultTextAutosizingUsesIdempotentMode()
onChange: setNeedsRecalcStyleInAllFrames
conditional: TEXT_AUTOSIZING
+forceAutoBehaviorForTextSizeAdjust:
+ initial: false
+ onChange: setNeedsRecalcStyleInAllFrames
+ conditional: TEXT_AUTOSIZING
subpixelAntialiasedLayerTextEnabled:
initial: false
Modified: trunk/Source/WebCore/rendering/RenderBlockFlow.cpp (244682 => 244683)
--- trunk/Source/WebCore/rendering/RenderBlockFlow.cpp 2019-04-26 06:33:56 UTC (rev 244682)
+++ trunk/Source/WebCore/rendering/RenderBlockFlow.cpp 2019-04-26 06:39:30 UTC (rev 244683)
@@ -3815,7 +3815,7 @@
candidateNewSize = roundf(std::min(minFontSize, specifiedSize * lineTextMultiplier));
}
- if (candidateNewSize > specifiedSize && candidateNewSize != fontDescription.computedSize() && text.textNode() && oldStyle.textSizeAdjust().isAuto())
+ if (candidateNewSize > specifiedSize && candidateNewSize != fontDescription.computedSize() && text.textNode() && (text.document().settings().forceAutoBehaviorForTextSizeAdjust() || oldStyle.textSizeAdjust().isAuto()))
document().textAutoSizing().addTextNode(*text.textNode(), candidateNewSize);
}
Modified: trunk/Source/WebCore/rendering/TextAutoSizing.cpp (244682 => 244683)
--- trunk/Source/WebCore/rendering/TextAutoSizing.cpp 2019-04-26 06:33:56 UTC (rev 244682)
+++ trunk/Source/WebCore/rendering/TextAutoSizing.cpp 2019-04-26 06:39:30 UTC (rev 244683)
@@ -76,7 +76,7 @@
Vector<Text*> nodesForRemoval;
for (auto& textNode : m_autoSizedNodes) {
auto* renderer = textNode->renderer();
- if (!renderer || !renderer->style().textSizeAdjust().isAuto() || !renderer->candidateComputedTextSize())
+ if (!renderer || (!textNode->document().settings().forceAutoBehaviorForTextSizeAdjust() && !renderer->style().textSizeAdjust().isAuto()) || !renderer->candidateComputedTextSize())
nodesForRemoval.append(textNode.get());
}
Modified: trunk/Source/WebKit/ChangeLog (244682 => 244683)
--- trunk/Source/WebKit/ChangeLog 2019-04-26 06:33:56 UTC (rev 244682)
+++ trunk/Source/WebKit/ChangeLog 2019-04-26 06:39:30 UTC (rev 244683)
@@ -1,5 +1,16 @@
2019-04-25 Myles C. Maxfield <mmaxfi...@apple.com>
+ [iOS] Add internal setting to force -webkit-text-size-adjust to "auto"
+ https://bugs.webkit.org/show_bug.cgi?id=197275
+ <rdar://problem/50211019>
+
+ Reviewed by Simon Fraser.
+
+ * Shared/WebPreferences.yaml:
+ * UIProcess/WebPreferences.h:
+
+2019-04-25 Myles C. Maxfield <mmaxfi...@apple.com>
+
[iOS] Implement idempotent mode for text autosizing
https://bugs.webkit.org/show_bug.cgi?id=197250
<rdar://problem/50211034>
Modified: trunk/Source/WebKit/Shared/WebPreferences.yaml (244682 => 244683)
--- trunk/Source/WebKit/Shared/WebPreferences.yaml 2019-04-26 06:33:56 UTC (rev 244682)
+++ trunk/Source/WebKit/Shared/WebPreferences.yaml 2019-04-26 06:39:30 UTC (rev 244683)
@@ -433,11 +433,6 @@
type: bool
defaultValue: false
-TextAutosizingEnabled:
- type: bool
- defaultValue: WebCore::Settings::defaultTextAutosizingEnabled()
- condition: ENABLE(TEXT_AUTOSIZING)
-
AggressiveTileRetentionEnabled:
type: bool
defaultValue: false
@@ -1650,6 +1645,22 @@
humanReadableName: "Apple Pay Remote UI"
type: bool
+TextAutosizingEnabled:
+ type: bool
+ defaultValue: WebCore::Settings::defaultTextAutosizingEnabled()
+ condition: ENABLE(TEXT_AUTOSIZING)
+ humanReadableName: "Text Autosizing"
+ humanReadableDescription: "Enable text autosizing, which increases text size so as to be more easily read"
+ category: internal
+
+ForceAutoBehaviorForTextSizeAdjust:
+ type: bool
+ defaultValue: false
+ condition: ENABLE(TEXT_AUTOSIZING)
+ humanReadableName: "Force text-size-adjust to auto"
+ humanReadableDescription: "Force -webkit-text-size-adjust to behave like auto, which means web authors can't opt-out of text autosizing heuristics"
+ category: internal
+
# Deprecated
ICECandidateFilteringEnabled:
Modified: trunk/Source/WebKit/UIProcess/WebPreferences.h (244682 => 244683)
--- trunk/Source/WebKit/UIProcess/WebPreferences.h 2019-04-26 06:33:56 UTC (rev 244682)
+++ trunk/Source/WebKit/UIProcess/WebPreferences.h 2019-04-26 06:39:30 UTC (rev 244683)
@@ -30,6 +30,7 @@
#include "APIObject.h"
#include "WebPreferencesDefinitions.h"
#include "WebPreferencesStore.h"
+#include <WebCore/Settings.h>
#include <wtf/HashSet.h>
#include <wtf/RefPtr.h>
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes