WebKit Bugzilla
Attachment 368817 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]
Rebased
bug-197275-20190502135453.patch (text/plain), 5.98 KB, created by
Myles C. Maxfield
on 2019-05-02 13:54:54 PDT
(
hide
)
Description:
Rebased
Filename:
MIME Type:
Creator:
Myles C. Maxfield
Created:
2019-05-02 13:54:54 PDT
Size:
5.98 KB
patch
obsolete
>Subversion Revision: 244881 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 797f67621fbdbe1ebbb6d9b6bc4266df8214fdc3..a53e8a34171cd45add4987039e681d34256dc87d 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,19 @@ >+2019-05-02 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 >+ >+ 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-05-02 Don Olmstead <don.olmstead@sony.com> > > [CMake] Refactor WEBKIT_MAKE_FORWARDING_HEADERS into WEBKIT_COPY_FILES >diff --git a/Source/WebKit/ChangeLog b/Source/WebKit/ChangeLog >index 15c4569490266caaaeedbd31e8a79d10ae9008ae..98a313f507a0bc21073bd32ca1dbab05920a0a4b 100644 >--- a/Source/WebKit/ChangeLog >+++ b/Source/WebKit/ChangeLog >@@ -1,3 +1,13 @@ >+2019-05-02 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 >+ >+ Reviewed by Simon Fraser. >+ >+ * Shared/WebPreferences.yaml: >+ * UIProcess/WebPreferences.h: >+ > 2019-05-02 Don Olmstead <don.olmstead@sony.com> > > [CMake] Refactor WEBKIT_MAKE_FORWARDING_HEADERS into WEBKIT_COPY_FILES >diff --git a/Source/WebCore/page/Settings.yaml b/Source/WebCore/page/Settings.yaml >index d30c815e9cc68eb27367111619f49a712bb80225..13270f693d850d67dfef565b718ddc9f9199816f 100644 >--- a/Source/WebCore/page/Settings.yaml >+++ b/Source/WebCore/page/Settings.yaml >@@ -444,6 +444,10 @@ textAutosizingUsesIdempotentMode: > initial: defaultTextAutosizingUsesIdempotentMode() > onChange: setNeedsRecalcStyleInAllFrames > conditional: TEXT_AUTOSIZING >+forceAutoBehaviorForTextSizeAdjust: >+ initial: false >+ onChange: setNeedsRecalcStyleInAllFrames >+ conditional: TEXT_AUTOSIZING > > subpixelAntialiasedLayerTextEnabled: > initial: false >diff --git a/Source/WebCore/rendering/RenderBlockFlow.cpp b/Source/WebCore/rendering/RenderBlockFlow.cpp >index 766591cc9fecaa23e56374524c81f75c79097510..af5ce7c07c298d098906ed92d8e092025fbd9877 100644 >--- a/Source/WebCore/rendering/RenderBlockFlow.cpp >+++ b/Source/WebCore/rendering/RenderBlockFlow.cpp >@@ -3815,7 +3815,7 @@ void RenderBlockFlow::adjustComputedFontSizes(float size, float visibleWidth, fl > 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); > } > >diff --git a/Source/WebCore/rendering/TextAutoSizing.cpp b/Source/WebCore/rendering/TextAutoSizing.cpp >index 3ba130d4559d7292d891f553cf1480f866bb2bad..a15efa0aa70fe4f4fdb5176cff3827025da682fc 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().forceAutoBehaviorForTextSizeAdjust() && !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 20156d0d1068e002efd5b32671fa7b28c068bf4d..5888e7aa95b4f8ac1ba0a3c7d01f067e121571c8 100644 >--- a/Source/WebKit/Shared/WebPreferences.yaml >+++ b/Source/WebKit/Shared/WebPreferences.yaml >@@ -433,11 +433,6 @@ UsesEncodingDetector: > type: bool > defaultValue: false > >-TextAutosizingEnabled: >- type: bool >- defaultValue: WebCore::Settings::defaultTextAutosizingEnabled() >- condition: ENABLE(TEXT_AUTOSIZING) >- > AggressiveTileRetentionEnabled: > type: bool > defaultValue: false >@@ -1665,6 +1660,22 @@ ApplePayRemoteUIEnabled: > 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: >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
Flags:
ews-watchlist
:
commit-queue-
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 197275
:
368215
|
368272
|
368275
|
368276
|
368289
| 368817 |
368832