WebKit Bugzilla
Attachment 368272 Details for
Bug 197275
: [iOS] Add internal setting to force -webkit-text-size-adjust to "auto"
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-197275-20190425150054.patch (text/plain), 5.66 KB, created by
Myles C. Maxfield
on 2019-04-25 15:00:55 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Myles C. Maxfield
Created:
2019-04-25 15:00:55 PDT
Size:
5.66 KB
patch
obsolete
>Subversion Revision: 244666 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 392a5b91bb7cffa7a5f1952d2080cb02fa243f76..a0b1c558e3871bb20fa917cf9af3b1e6fc0d0fb7 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,20 @@ >+2019-04-25 Myles C. Maxfield <mmaxfield@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 NOBODY (OOPS!). >+ >+ 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 Timothy Hatcher <timothy@apple.com> > > Disable ContentChangeObserver on iOSMac. >diff --git a/Source/WebKit/ChangeLog b/Source/WebKit/ChangeLog >index d1fa1044df15919894f9cbe4c539c1cb92025e5f..6affc755f39cc79b7c0ac82cbaf9b45398034b6d 100644 >--- a/Source/WebKit/ChangeLog >+++ b/Source/WebKit/ChangeLog >@@ -1,3 +1,14 @@ >+2019-04-25 Myles C. Maxfield <mmaxfield@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 NOBODY (OOPS!). >+ >+ * Shared/WebPreferences.yaml: >+ * UIProcess/WebPreferences.h: >+ > 2019-04-25 Timothy Hatcher <timothy@apple.com> > > Disable date and time inputs on iOSMac. >diff --git a/Source/WebCore/page/Settings.yaml b/Source/WebCore/page/Settings.yaml >index e3e09eead5c005a84635342802ee3bcca93b0d59..2a3fea8ae1506f4e6ad71b2a3938a9034d62e340 100644 >--- a/Source/WebCore/page/Settings.yaml >+++ b/Source/WebCore/page/Settings.yaml >@@ -440,6 +440,10 @@ minimumZoomFontSize: > type: float > initial: defaultMinimumZoomFontSize() > conditional: TEXT_AUTOSIZING >+forceTextSizeAdjustHeuristics: >+ initial: true >+ onChange: setNeedsRecalcStyleInAllFrames >+ conditional: TEXT_AUTOSIZING > > subpixelAntialiasedLayerTextEnabled: > initial: false >diff --git a/Source/WebCore/rendering/RenderBlockFlow.cpp b/Source/WebCore/rendering/RenderBlockFlow.cpp >index 0ecf11fa2a62e80af165ea09abfbce021dce501c..d05d7629b4c7052bd951aa7f18c8a51db363f641 100644 >--- a/Source/WebCore/rendering/RenderBlockFlow.cpp >+++ b/Source/WebCore/rendering/RenderBlockFlow.cpp >@@ -3776,7 +3776,7 @@ void RenderBlockFlow::adjustComputedFontSizes(float size, float visibleWidth) > > float lineTextMultiplier = lineCount == ONE_LINE ? oneLineTextMultiplier(text, specifiedSize) : textMultiplier(text, specifiedSize); > float 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().forceTextSizeAdjustHeuristics() || oldStyle.textSizeAdjust().isAuto())) > document().textAutoSizing().addTextNode(*text.textNode(), candidateNewSize); > } > >diff --git a/Source/WebCore/rendering/TextAutoSizing.cpp b/Source/WebCore/rendering/TextAutoSizing.cpp >index 3ba130d4559d7292d891f553cf1480f866bb2bad..ab907c7034d4433771bf16395ccc3023c33bfe48 100644 >--- a/Source/WebCore/rendering/TextAutoSizing.cpp >+++ b/Source/WebCore/rendering/TextAutoSizing.cpp >@@ -76,7 +76,7 @@ auto TextAutoSizingValue::adjustTextNodeSizes() -> StillHasNodes > 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().forceTextSizeAdjustHeuristics() && !renderer->style().textSizeAdjust().isAuto()) || !renderer->candidateComputedTextSize()) > nodesForRemoval.append(textNode.get()); > } > >diff --git a/Source/WebKit/Shared/WebPreferences.yaml b/Source/WebKit/Shared/WebPreferences.yaml >index ff9da3b51ae89d7bf38f5f9cd8116fb81b711c1c..ee8e949ff9b52ec9236b510b1946f6f7fe203232 100644 >--- a/Source/WebKit/Shared/WebPreferences.yaml >+++ b/Source/WebKit/Shared/WebPreferences.yaml >@@ -437,6 +437,17 @@ 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 >+ >+ForceTextSizeAdjustHeuristics: >+ type: bool >+ defaultValue: true >+ condition: ENABLE(TEXT_AUTOSIZING) >+ humanReadableName: "Force text-size-adjust heuristics" >+ humanReadableDescription: "Force -webkit-text-size-adjust to auto, which means web authors can't opt-out of text autosizing heuristics" >+ category: internal > > AggressiveTileRetentionEnabled: > type: bool >diff --git a/Source/WebKit/UIProcess/WebPreferences.h b/Source/WebKit/UIProcess/WebPreferences.h >index 317f740afe19f30801bce720cdb64b57d1da66b0..e7f7f8a3ce9948868f8efa026dab0c929670e4ca 100644 >--- a/Source/WebKit/UIProcess/WebPreferences.h >+++ b/Source/WebKit/UIProcess/WebPreferences.h >@@ -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> >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 197275
:
368215
|
368272
|
368275
|
368276
|
368289
|
368817
|
368832