Title: [229049] trunk/Source/WebCore
Revision
229049
Author
wenson_hs...@apple.com
Date
2018-02-26 17:32:06 -0800 (Mon, 26 Feb 2018)

Log Message

[Extra zoom mode] Tweak UA stylesheet to improve legibility of rendered text
https://bugs.webkit.org/show_bug.cgi?id=183142
<rdar://problem/37912966>

Reviewed by Tim Horton.

Force text-size-adjust and hyphens to be always on in EXTRA_ZOOM_MODE. To accomplish this, we override the extra
style sheet in RenderTheme to include these two style rules.

* rendering/RenderThemeIOS.h:
* rendering/RenderThemeIOS.mm:
(WebCore::RenderThemeIOS::extraDefaultStyleSheet):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (229048 => 229049)


--- trunk/Source/WebCore/ChangeLog	2018-02-27 01:31:41 UTC (rev 229048)
+++ trunk/Source/WebCore/ChangeLog	2018-02-27 01:32:06 UTC (rev 229049)
@@ -1,3 +1,18 @@
+2018-02-26  Wenson Hsieh  <wenson_hs...@apple.com>
+
+        [Extra zoom mode] Tweak UA stylesheet to improve legibility of rendered text
+        https://bugs.webkit.org/show_bug.cgi?id=183142
+        <rdar://problem/37912966>
+
+        Reviewed by Tim Horton.
+
+        Force text-size-adjust and hyphens to be always on in EXTRA_ZOOM_MODE. To accomplish this, we override the extra
+        style sheet in RenderTheme to include these two style rules.
+
+        * rendering/RenderThemeIOS.h:
+        * rendering/RenderThemeIOS.mm:
+        (WebCore::RenderThemeIOS::extraDefaultStyleSheet):
+
 2018-02-26  Don Olmstead  <don.olmst...@sony.com>
 
         Fix WebCore includes within WebKitLegacy

Modified: trunk/Source/WebCore/rendering/RenderThemeIOS.h (229048 => 229049)


--- trunk/Source/WebCore/rendering/RenderThemeIOS.h	2018-02-27 01:31:41 UTC (rev 229048)
+++ trunk/Source/WebCore/rendering/RenderThemeIOS.h	2018-02-27 01:32:06 UTC (rev 229049)
@@ -128,6 +128,10 @@
 
     void purgeCaches() override;
 
+#if ENABLE(EXTRA_ZOOM_MODE)
+    String extraDefaultStyleSheet() final;
+#endif
+
     const Color& shadowColor() const;
     FloatRect addRoundedBorderClip(const RenderObject& box, GraphicsContext&, const IntRect&);
 

Modified: trunk/Source/WebCore/rendering/RenderThemeIOS.mm (229048 => 229049)


--- trunk/Source/WebCore/rendering/RenderThemeIOS.mm	2018-02-27 01:31:41 UTC (rev 229048)
+++ trunk/Source/WebCore/rendering/RenderThemeIOS.mm	2018-02-27 01:32:06 UTC (rev 229049)
@@ -1799,6 +1799,15 @@
 
 #endif // ENABLE(ATTACHMENT_ELEMENT)
 
+#if ENABLE(EXTRA_ZOOM_MODE)
+
+String RenderThemeIOS::extraDefaultStyleSheet()
+{
+    return "* { -webkit-text-size-adjust: auto !important; -webkit-hyphens: auto !important; }";
+}
+
+#endif
+
 } // namespace WebCore
 
 #endif //PLATFORM(IOS)
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to