Changeset 269603 in webkit


Ignore:
Timestamp:
Nov 9, 2020 2:28:13 PM (3 years ago)
Author:
Alan Bujtas
Message:

Show legacy line layout visual coverage instead of "simple line" layout.
https://bugs.webkit.org/show_bug.cgi?id=218695

Reviewed by Antti Koivisto.

Source/WebCore:

Paint legacy line layout content with the debug shadow instead of the modern one (and use red instead of blue).

  • layout/integration/LayoutIntegrationLineLayout.cpp:

(WebCore::LayoutIntegration::LineLayout::paint):
(WebCore::LayoutIntegration::LineLayout::debugTextShadow): Deleted.

  • layout/integration/LayoutIntegrationLineLayout.h:
  • rendering/InlineTextBox.cpp:

(WebCore::InlineTextBox::paintMarkedTextForeground):
(WebCore::InlineTextBox::debugTextShadow):

  • rendering/InlineTextBox.h:

Source/WebKit:

  • UIProcess/API/C/WKPreferences.cpp:

(WKPreferencesSetLegacyLineLayoutVisualCoverageEnabled):
(WKPreferencesGetLegacyLineLayoutVisualCoverageEnabled):
(WKPreferencesSetSimpleLineLayoutDebugBordersEnabled): Deleted.
(WKPreferencesGetSimpleLineLayoutDebugBordersEnabled): Deleted.

  • UIProcess/API/C/WKPreferencesRefPrivate.h:
  • UIProcess/API/Cocoa/WKPreferences.mm:

(-[WKPreferences _legacyLineLayoutVisualCoverageEnabled]):
(-[WKPreferences _setLegacyLineLayoutVisualCoverageEnabled:]):
(-[WKPreferences _simpleLineLayoutDebugBordersEnabled]): Deleted.
(-[WKPreferences _setSimpleLineLayoutDebugBordersEnabled:]): Deleted.

  • UIProcess/API/Cocoa/WKPreferencesPrivate.h:

Source/WebKitLegacy/mac:

  • WebView/WebPreferenceKeysPrivate.h:
  • WebView/WebPreferences.mm:

(-[WebPreferences legacyLineLayoutVisualCoverageEnabled]):
(-[WebPreferences setLegacyLineLayoutVisualCoverageEnabled:]):
(-[WebPreferences simpleLineLayoutDebugBordersEnabled]): Deleted.
(-[WebPreferences setSimpleLineLayoutDebugBordersEnabled:]): Deleted.

  • WebView/WebPreferencesPrivate.h:

Source/WTF:

  • Scripts/Preferences/WebPreferencesDebug.yaml:

Tools:

  • MiniBrowser/mac/SettingsController.h:
  • MiniBrowser/mac/SettingsController.m:

(-[SettingsController _populateMenu]):
(-[SettingsController validateMenuItem:]):
(-[SettingsController toggleLegacyLineLayoutVisualCoverageEnabled:]):
(-[SettingsController legacyLineLayoutVisualCoverageEnabled]):
(-[SettingsController toggleSimpleLineLayoutDebugBordersEnabled:]): Deleted.
(-[SettingsController simpleLineLayoutDebugBordersEnabled]): Deleted.

  • MiniBrowser/mac/WK1BrowserWindowController.m:

(-[WK1BrowserWindowController didChangeSettings]):

  • MiniBrowser/mac/WK2BrowserWindowController.m:

(-[WK2BrowserWindowController didChangeSettings]):

LayoutTests:

  • fast/inline/simple-line-layout-16bit-content-expected-mismatch.html: Removed.
  • fast/inline/simple-line-layout-16bit-content.html:
  • fast/text/simple-line-layout-do-not-support-unicode-range-expected.html:
  • fast/text/simple-line-layout-do-not-support-unicode-range.html:
  • fast/text/simple-line-layout-line-box-contain-glyphs-expected.html:
  • fast/text/simple-line-layout-line-box-contain-glyphs.html:
  • fast/text/simple-line-layout-no-surrogate-pairs-expected.html:
  • fast/text/simple-line-layout-no-surrogate-pairs.html:
  • fast/text/simple-line-layout-simple-text-but-complex-font-path-expected.html:
  • fast/text/simple-line-layout-simple-text-but-complex-font-path.html:
  • fast/text/simple-line-layout-with-text-underline-position-expected.html:
  • fast/text/simple-line-layout-with-text-underline-position.html:
  • fast/text/simple-lines-float-expected.html:
  • fast/text/simple-lines-float.html:
  • fast/text/simple-lines-hover-expected.html:
  • fast/text/simple-lines-hover.html:
  • fast/text/simple-lines-multiple-renderers-expected.html:
  • fast/text/simple-lines-multiple-renderers.html:
Location:
trunk
Files:
1 deleted
39 edited
1 copied

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r269600 r269603  
     12020-11-09  Zalan Bujtas  <zalan@apple.com>
     2
     3        Show legacy line layout visual coverage instead of "simple line" layout.
     4        https://bugs.webkit.org/show_bug.cgi?id=218695
     5
     6        Reviewed by Antti Koivisto.
     7
     8        * fast/inline/simple-line-layout-16bit-content-expected-mismatch.html: Removed.
     9        * fast/inline/simple-line-layout-16bit-content.html:
     10        * fast/text/simple-line-layout-do-not-support-unicode-range-expected.html:
     11        * fast/text/simple-line-layout-do-not-support-unicode-range.html:
     12        * fast/text/simple-line-layout-line-box-contain-glyphs-expected.html:
     13        * fast/text/simple-line-layout-line-box-contain-glyphs.html:
     14        * fast/text/simple-line-layout-no-surrogate-pairs-expected.html:
     15        * fast/text/simple-line-layout-no-surrogate-pairs.html:
     16        * fast/text/simple-line-layout-simple-text-but-complex-font-path-expected.html:
     17        * fast/text/simple-line-layout-simple-text-but-complex-font-path.html:
     18        * fast/text/simple-line-layout-with-text-underline-position-expected.html:
     19        * fast/text/simple-line-layout-with-text-underline-position.html:
     20        * fast/text/simple-lines-float-expected.html:
     21        * fast/text/simple-lines-float.html:
     22        * fast/text/simple-lines-hover-expected.html:
     23        * fast/text/simple-lines-hover.html:
     24        * fast/text/simple-lines-multiple-renderers-expected.html:
     25        * fast/text/simple-lines-multiple-renderers.html:
     26
    1272020-11-09  Zalan Bujtas  <zalan@apple.com>
    228
  • trunk/LayoutTests/fast/inline/simple-line-layout-16bit-content-expected.html

    r269602 r269603  
    1010</style>
    1111<script>
    12   if (window.internals)
    13     internals.settings.setSimpleLineLayoutDebugBordersEnabled(true);
     12  if (window.internals) {
     13    internals.settings.setLegacyLineLayoutVisualCoverageEnabled(false);
     14    internals.settings.setSimpleLineLayoutEnabled(false);
     15  }
    1416</script>
    1517</head>
  • trunk/LayoutTests/fast/inline/simple-line-layout-16bit-content.html

    r215878 r269603  
    1111<script>
    1212  if (window.internals)
    13     internals.settings.setSimpleLineLayoutDebugBordersEnabled(true);
     13    internals.settings.setLegacyLineLayoutVisualCoverageEnabled(true);
    1414</script>
    1515</head>
  • trunk/LayoutTests/fast/text/simple-line-layout-do-not-support-unicode-range-expected.html

    r211661 r269603  
    1212<script>
    1313if (window.internals) {
    14     internals.settings.setSimpleLineLayoutDebugBordersEnabled(true);
     14    internals.settings.setLegacyLineLayoutVisualCoverageEnabled(true);
    1515    internals.settings.setSimpleLineLayoutEnabled(false);
    1616}
     
    1818</head>
    1919<body>
    20 <p style="font-family: Monaco;">THIS SHOULD NOT HAVE GREEN simple line layout borders.</p>
     20<p style="font-family: Monaco;">THIS SHOULD HAVE legacy line layout coverage indicator.</p>
    2121</body>
    2222</html>
  • trunk/LayoutTests/fast/text/simple-line-layout-do-not-support-unicode-range.html

    r211661 r269603  
    1212<script>
    1313if (window.internals) {
    14     internals.settings.setSimpleLineLayoutDebugBordersEnabled(true);
     14    internals.settings.setLegacyLineLayoutVisualCoverageEnabled(true);
    1515    internals.settings.setSimpleLineLayoutEnabled(true);
    1616}
     
    1818</head>
    1919<body>
    20 <p style="font-family: Monaco;">THIS SHOULD NOT HAVE GREEN simple line layout borders.</p>
     20<p style="font-family: Monaco;">THIS SHOULD HAVE legacy line layout coverage indicator.</p>
    2121</body>
    2222</html>
  • trunk/LayoutTests/fast/text/simple-line-layout-line-box-contain-glyphs-expected.html

    r211292 r269603  
    1010</style>
    1111<script>
    12   if (window.internals)
    13     internals.settings.setSimpleLineLayoutDebugBordersEnabled(false);
     12  if (window.internals) {
     13    internals.settings.setLegacyLineLayoutVisualCoverageEnabled(true);
     14    internals.settings.setSimpleLineLayoutEnabled(false);
     15 }
    1416</script>
    1517</head>
  • trunk/LayoutTests/fast/text/simple-line-layout-line-box-contain-glyphs.html

    r211292 r269603  
    1010</style>
    1111<script>
    12   if (window.internals)
    13     internals.settings.setSimpleLineLayoutDebugBordersEnabled(true);
     12  if (window.internals) {
     13    internals.settings.setLegacyLineLayoutVisualCoverageEnabled(true);
     14    internals.settings.setSimpleLineLayoutEnabled(true);
     15 }
    1416</script>
    1517</head>
  • trunk/LayoutTests/fast/text/simple-line-layout-no-surrogate-pairs-expected.html

    r211680 r269603  
    22<html>
    33<head>
     4<meta charset="utf-8">
    45<title>This tests that we don't use simple line layout for surrogate pairs.</title>
     6<style>
     7div {
     8    color: white;
     9    font-family: Arial;
     10}
     11</style>
     12<script>
     13if (window.internals) {
     14    internals.settings.setLegacyLineLayoutVisualCoverageEnabled(true);
     15    internals.settings.setSimpleLineLayoutEnabled(false);
     16}
     17</script>
    518</head>
    6 <body></body>
     19<body>
     20<div>&#xd800;</div>
     21<div>&#x1D306;</div>
     22<div>&#xdb7f;</div>
     23</body>
    724</html>
  • trunk/LayoutTests/fast/text/simple-line-layout-no-surrogate-pairs.html

    r211680 r269603  
    1212<script>
    1313if (window.internals) {
    14     internals.settings.setSimpleLineLayoutDebugBordersEnabled(true);
    1514    internals.settings.setSimpleLineLayoutEnabled(true);
     15    internals.settings.setLegacyLineLayoutVisualCoverageEnabled(true);
    1616}
    1717</script>
  • trunk/LayoutTests/fast/text/simple-line-layout-simple-text-but-complex-font-path-expected.html

    r211682 r269603  
    33<head>
    44<title>This tests that we don't try to use simple line layout for simple text but complex font path related properties.</title>
     5<style>
     6div {
     7    color: white;
     8}
     9.common-ligatures-disabled {
     10    font-variant-ligatures: no-common-ligatures;
     11}
     12
     13.common-ligatures-enabled {
     14    font-variant-ligatures: common-ligatures;
     15}
     16</style>
     17<script>
     18if (window.internals) {
     19    internals.settings.setLegacyLineLayoutVisualCoverageEnabled(true);
     20    internals.settings.setSimpleLineLayoutEnabled(false);
     21}
     22</script>
    523</head>
    6 <body></body>
     24<body>
     25    <div>
     26        <div class="common-ligatures-disabled">file</div>
     27        <div class="common-ligatures-enabled">file</div>
     28    </div>
     29    <div style="text-rendering: optimizelegibility">
     30        <div class="common-ligatures-disabled">file</div>
     31        <div class="common-ligatures-enabled">file</div>
     32    </div>
     33</body>
    734</html>
  • trunk/LayoutTests/fast/text/simple-line-layout-simple-text-but-complex-font-path.html

    r211682 r269603  
    1717<script>
    1818if (window.internals) {
    19     internals.settings.setSimpleLineLayoutDebugBordersEnabled(true);
     19    internals.settings.setLegacyLineLayoutVisualCoverageEnabled(true);
    2020    internals.settings.setSimpleLineLayoutEnabled(true);
    2121}
  • trunk/LayoutTests/fast/text/simple-line-layout-with-text-underline-position-expected.html

    r243605 r269603  
    33<head>
    44<title>This tests that simple line layout is disabled for text-underline-position: under</title>
     5<style>
     6div {
     7    color: white;
     8}
     9
     10.first {
     11    overflow: hidden;
     12}
     13.second, .first {
     14        text-underline-position: under;
     15}
     16</style>
     17<script>
     18if (window.internals) {
     19    internals.settings.setLegacyLineLayoutVisualCoverageEnabled(true);
     20    internals.settings.setSimpleLineLayoutEnabled(false);
     21}
     22</script>
    523</head>
    6 <body></body>
     24<body>
     25<div class=first>Pass if after selecting these 2 lines</div>
     26<div class=second>this line is still visible</div>
     27</body>
    728</html>
  • trunk/LayoutTests/fast/text/simple-line-layout-with-text-underline-position.html

    r243605 r269603  
    1717<script>
    1818if (window.internals) {
    19     internals.settings.setSimpleLineLayoutDebugBordersEnabled(true);
     19    internals.settings.setLegacyLineLayoutVisualCoverageEnabled(true);
    2020    internals.settings.setSimpleLineLayoutEnabled(true);
    2121}
  • trunk/LayoutTests/fast/text/simple-lines-float-expected.html

    r269360 r269603  
    22<script>
    33if (window.internals)
    4     internals.settings.setSimpleLineLayoutDebugBordersEnabled(true);
     4    internals.settings.setLegacyLineLayoutVisualCoverageEnabled(true);
    55</script>
    66<div style="position:relative">
  • trunk/LayoutTests/fast/text/simple-lines-float.html

    r269360 r269603  
    22<script>
    33if (window.internals)
    4     internals.settings.setSimpleLineLayoutDebugBordersEnabled(true);
     4    internals.settings.setLegacyLineLayoutVisualCoverageEnabled(true);
    55</script>
    66<div style="float:left; border:1px solid blue; width:50px; height:200px"></div>
  • trunk/LayoutTests/fast/text/simple-lines-hover-expected.html

    r159345 r269603  
    33    internals.settings.setSimpleLineLayoutDebugBordersEnabled(true);
    44</script>
    5 <div id="target">This text should have border around it indicating it is in simple line layout mode</div>
     5<div>This text should not have legacy line layout visual indicator.</div>
  • trunk/LayoutTests/fast/text/simple-lines-hover.html

    r167870 r269603  
    22function test() {
    33    if (window.internals)
    4         internals.settings.setSimpleLineLayoutDebugBordersEnabled(true);
     4        internals.settings.setLegacyLineLayoutVisualCoverageEnabled(true);
    55    var target = document.getElementById("target");
    66    eventSender.mouseMoveTo(target.offsetLeft + 5, target.offsetTop + 5);
     
    88</script>
    99<body onload="test()">
    10 <div id="target">This text should have border around it indicating it is in simple line layout mode</div>
     10<div id="target">This text should not have legacy line layout visual indicator.</div>
  • trunk/LayoutTests/fast/text/simple-lines-multiple-renderers-expected.html

    r176525 r269603  
    55<script>
    66  if (window.internals)
    7     internals.settings.setSimpleLineLayoutDebugBordersEnabled(true);
     7    internals.settings.setLegacyLineLayoutVisualCoverageEnabled(true);
    88</script>
    99</head>
  • trunk/LayoutTests/fast/text/simple-lines-multiple-renderers.html

    r176525 r269603  
    55<script>
    66  if (window.internals)
    7     internals.settings.setSimpleLineLayoutDebugBordersEnabled(true);
     7    internals.settings.setLegacyLineLayoutVisualCoverageEnabled(true);
    88</script>
    99</head>
  • trunk/Source/WTF/ChangeLog

    r269584 r269603  
     12020-11-09  Zalan Bujtas  <zalan@apple.com>
     2
     3        Show legacy line layout visual coverage instead of "simple line" layout.
     4        https://bugs.webkit.org/show_bug.cgi?id=218695
     5
     6        Reviewed by Antti Koivisto.
     7
     8        * Scripts/Preferences/WebPreferencesDebug.yaml:
     9
    1102020-11-09  Per Arne Vollan  <pvollan@apple.com>
    211
  • trunk/Source/WTF/Scripts/Preferences/WebPreferencesDebug.yaml

    r268313 r269603  
    106106      default: false
    107107
     108LegacyLineLayoutVisualCoverageEnabled:
     109  type: bool
     110  webcoreOnChange: setNeedsRecalcStyleInAllFrames
     111  defaultValue:
     112    WebKitLegacy:
     113      default: false
     114    WebKit:
     115      default: false
     116    WebCore:
     117      default: false
     118
    108119LogsPageMessagesToSystemConsoleEnabled:
    109120  type: bool
     
    134145  condition: ENABLE(RESOURCE_USAGE)
    135146  webcoreOnChange: resourceUsageOverlayVisibleChanged
    136   defaultValue:
    137     WebKitLegacy:
    138       default: false
    139     WebKit:
    140       default: false
    141     WebCore:
    142       default: false
    143 
    144 SimpleLineLayoutDebugBordersEnabled:
    145   type: bool
    146   webcoreOnChange: setNeedsRecalcStyleInAllFrames
    147147  defaultValue:
    148148    WebKitLegacy:
  • trunk/Source/WebCore/ChangeLog

    r269601 r269603  
     12020-11-09  Zalan Bujtas  <zalan@apple.com>
     2
     3        Show legacy line layout visual coverage instead of "simple line" layout.
     4        https://bugs.webkit.org/show_bug.cgi?id=218695
     5
     6        Reviewed by Antti Koivisto.
     7
     8        Paint legacy line layout content with the debug shadow instead of the modern one (and use red instead of blue).
     9
     10        * layout/integration/LayoutIntegrationLineLayout.cpp:
     11        (WebCore::LayoutIntegration::LineLayout::paint):
     12        (WebCore::LayoutIntegration::LineLayout::debugTextShadow): Deleted.
     13        * layout/integration/LayoutIntegrationLineLayout.h:
     14        * rendering/InlineTextBox.cpp:
     15        (WebCore::InlineTextBox::paintMarkedTextForeground):
     16        (WebCore::InlineTextBox::debugTextShadow):
     17        * rendering/InlineTextBox.h:
     18
    1192020-11-09  Simon Fraser  <simon.fraser@apple.com>
    220
  • trunk/Source/WebCore/layout/integration/LayoutIntegrationLineLayout.cpp

    r269562 r269603  
    404404        textPainter.setFont(style.fontCascade());
    405405        textPainter.setStyle(computeTextPaintStyle(flow().frame(), style, paintInfo));
    406         if (auto* debugShadow = debugTextShadow())
    407             textPainter.setShadow(debugShadow);
    408406
    409407        textPainter.setGlyphDisplayListIfNeeded(run, paintInfo, style.fontCascade(), paintInfo.context(), textRun);
     
    467465}
    468466
    469 ShadowData* LineLayout::debugTextShadow()
    470 {
    471     if (!flow().settings().simpleLineLayoutDebugBordersEnabled())
    472         return nullptr;
    473 
    474     static NeverDestroyed<ShadowData> debugTextShadow(IntPoint(0, 0), 10, 20, ShadowStyle::Normal, true, SRGBA<uint8_t> { 0, 0, 150, 150 });
    475     return &debugTextShadow.get();
    476 }
    477 
    478467void LineLayout::releaseCaches(RenderView& view)
    479468{
  • trunk/Source/WebCore/layout/integration/LayoutIntegrationLineLayout.h

    r269145 r269603  
    107107    const Layout::ContainerBox& rootLayoutBox() const;
    108108    Layout::ContainerBox& rootLayoutBox();
    109     ShadowData* debugTextShadow();
    110109    void releaseInlineItemCache();
    111110
  • trunk/Source/WebCore/rendering/InlineTextBox.cpp

    r268774 r269603  
    11641164    }
    11651165    textPainter.setEmphasisMark(emphasisMark, emphasisMarkOffset, combinedText());
     1166    if (auto* debugShadow = debugTextShadow())
     1167        textPainter.setShadow(debugShadow);
    11661168
    11671169    TextRun textRun = createTextRun();
     
    14301432}
    14311433
     1434ShadowData* InlineTextBox::debugTextShadow()
     1435{
     1436    if (!renderer().settings().legacyLineLayoutVisualCoverageEnabled())
     1437        return nullptr;
     1438
     1439    static NeverDestroyed<ShadowData> debugTextShadow(IntPoint(0, 0), 10, 20, ShadowStyle::Normal, true, SRGBA<uint8_t> { 150, 0, 0, 190 });
     1440    return &debugTextShadow.get();
     1441}
     1442
    14321443ExpansionBehavior InlineTextBox::expansionBehavior() const
    14331444{
  • trunk/Source/WebCore/rendering/InlineTextBox.h

    r269301 r269603  
    200200    const FontCascade& lineFont() const;
    201201
     202    ShadowData* debugTextShadow();
     203
    202204    String text(bool ignoreCombinedText = false, bool ignoreHyphen = false) const; // The effective text for the run.
    203205    TextRun createTextRun(bool ignoreCombinedText = false, bool ignoreHyphen = false) const;
  • trunk/Source/WebKit/ChangeLog

    r269593 r269603  
     12020-11-09  Zalan Bujtas  <zalan@apple.com>
     2
     3        Show legacy line layout visual coverage instead of "simple line" layout.
     4        https://bugs.webkit.org/show_bug.cgi?id=218695
     5
     6        Reviewed by Antti Koivisto.
     7
     8        * UIProcess/API/C/WKPreferences.cpp:
     9        (WKPreferencesSetLegacyLineLayoutVisualCoverageEnabled):
     10        (WKPreferencesGetLegacyLineLayoutVisualCoverageEnabled):
     11        (WKPreferencesSetSimpleLineLayoutDebugBordersEnabled): Deleted.
     12        (WKPreferencesGetSimpleLineLayoutDebugBordersEnabled): Deleted.
     13        * UIProcess/API/C/WKPreferencesRefPrivate.h:
     14        * UIProcess/API/Cocoa/WKPreferences.mm:
     15        (-[WKPreferences _legacyLineLayoutVisualCoverageEnabled]):
     16        (-[WKPreferences _setLegacyLineLayoutVisualCoverageEnabled:]):
     17        (-[WKPreferences _simpleLineLayoutDebugBordersEnabled]): Deleted.
     18        (-[WKPreferences _setSimpleLineLayoutDebugBordersEnabled:]): Deleted.
     19        * UIProcess/API/Cocoa/WKPreferencesPrivate.h:
     20
    1212020-11-09  Per Arne Vollan  <pvollan@apple.com>
    222
  • trunk/Source/WebKit/UIProcess/API/C/WKPreferences.cpp

    r269111 r269603  
    12801280}
    12811281
    1282 void WKPreferencesSetSimpleLineLayoutDebugBordersEnabled(WKPreferencesRef preferencesRef, bool flag)
    1283 {
    1284     toImpl(preferencesRef)->setSimpleLineLayoutDebugBordersEnabled(flag);
    1285 }
    1286 
    1287 bool WKPreferencesGetSimpleLineLayoutDebugBordersEnabled(WKPreferencesRef preferencesRef)
    1288 {
    1289     return toImpl(preferencesRef)->simpleLineLayoutDebugBordersEnabled();
     1282void WKPreferencesSetLegacyLineLayoutVisualCoverageEnabled(WKPreferencesRef preferencesRef, bool flag)
     1283{
     1284    toImpl(preferencesRef)->setLegacyLineLayoutVisualCoverageEnabled(flag);
     1285}
     1286
     1287bool WKPreferencesGetLegacyLineLayoutVisualCoverageEnabled(WKPreferencesRef preferencesRef)
     1288{
     1289    return toImpl(preferencesRef)->legacyLineLayoutVisualCoverageEnabled();
    12901290}
    12911291
  • trunk/Source/WebKit/UIProcess/API/C/WKPreferencesRefPrivate.h

    r269111 r269603  
    318318
    319319// Defaults to false.
    320 WK_EXPORT void WKPreferencesSetSimpleLineLayoutDebugBordersEnabled(WKPreferencesRef, bool);
    321 WK_EXPORT bool WKPreferencesGetSimpleLineLayoutDebugBordersEnabled(WKPreferencesRef);
     320WK_EXPORT void WKPreferencesSetLegacyLineLayoutVisualCoverageEnabled(WKPreferencesRef, bool);
     321WK_EXPORT bool WKPreferencesGetLegacyLineLayoutVisualCoverageEnabled(WKPreferencesRef);
    322322
    323323WK_EXPORT void WKPreferencesSetContentChangeObserverEnabled(WKPreferencesRef, bool);
  • trunk/Source/WebKit/UIProcess/API/Cocoa/WKPreferences.mm

    r268214 r269603  
    306306}
    307307
    308 - (BOOL)_simpleLineLayoutDebugBordersEnabled
    309 {
    310     return _preferences->simpleLineLayoutDebugBordersEnabled();
    311 }
    312 
    313 - (void)_setSimpleLineLayoutDebugBordersEnabled:(BOOL)simpleLineLayoutDebugBordersEnabled
    314 {
    315     _preferences->setSimpleLineLayoutDebugBordersEnabled(simpleLineLayoutDebugBordersEnabled);
     308- (BOOL)_legacyLineLayoutVisualCoverageEnabled
     309{
     310    return _preferences->legacyLineLayoutVisualCoverageEnabled();
     311}
     312
     313- (void)_setLegacyLineLayoutVisualCoverageEnabled:(BOOL)legacyLineLayoutVisualCoverageEnabled
     314{
     315    _preferences->setLegacyLineLayoutVisualCoverageEnabled(legacyLineLayoutVisualCoverageEnabled);
    316316}
    317317
  • trunk/Source/WebKit/UIProcess/API/Cocoa/WKPreferencesPrivate.h

    r268214 r269603  
    7070@property (nonatomic, setter=_setVisibleDebugOverlayRegions:) _WKDebugOverlayRegions _visibleDebugOverlayRegions WK_API_AVAILABLE(macos(10.11), ios(9.0));
    7171@property (nonatomic, setter=_setSimpleLineLayoutEnabled:) BOOL _simpleLineLayoutEnabled WK_API_AVAILABLE(macos(10.12), ios(10.0));
    72 @property (nonatomic, setter=_setSimpleLineLayoutDebugBordersEnabled:) BOOL _simpleLineLayoutDebugBordersEnabled WK_API_AVAILABLE(macos(10.11), ios(9.0));
     72@property (nonatomic, setter=_setLegacyLineLayoutVisualCoverageEnabled:) BOOL _legacyLineLayoutVisualCoverageEnabled WK_API_AVAILABLE(macos(10.11), ios(9.0));
    7373@property (nonatomic, setter=_setContentChangeObserverEnabled:) BOOL _contentChangeObserverEnabled WK_API_AVAILABLE(macos(10.15), ios(13.0));
    7474@property (nonatomic, setter=_setAcceleratedDrawingEnabled:) BOOL _acceleratedDrawingEnabled WK_API_AVAILABLE(macos(10.12), ios(10.0));
  • trunk/Source/WebKitLegacy/mac/ChangeLog

    r269557 r269603  
     12020-11-09  Zalan Bujtas  <zalan@apple.com>
     2
     3        Show legacy line layout visual coverage instead of "simple line" layout.
     4        https://bugs.webkit.org/show_bug.cgi?id=218695
     5
     6        Reviewed by Antti Koivisto.
     7
     8        * WebView/WebPreferenceKeysPrivate.h:
     9        * WebView/WebPreferences.mm:
     10        (-[WebPreferences legacyLineLayoutVisualCoverageEnabled]):
     11        (-[WebPreferences setLegacyLineLayoutVisualCoverageEnabled:]):
     12        (-[WebPreferences simpleLineLayoutDebugBordersEnabled]): Deleted.
     13        (-[WebPreferences setSimpleLineLayoutDebugBordersEnabled:]): Deleted.
     14        * WebView/WebPreferencesPrivate.h:
     15
    1162020-11-06  Peng Liu  <peng.liu6@apple.com>
    217
  • trunk/Source/WebKitLegacy/mac/WebView/WebPreferenceKeysPrivate.h

    r269416 r269603  
    110110#define WebKitSubpixelAntialiasedLayerTextEnabledPreferenceKey @"WebKitSubpixelAntialiasedLayerTextEnabled"
    111111#define WebKitSimpleLineLayoutEnabledPreferenceKey @"WebKitSimpleLineLayoutEnabled"
    112 #define WebKitSimpleLineLayoutDebugBordersEnabledPreferenceKey @"WebKitSimpleLineLayoutDebugBordersEnabled"
     112#define WebKitLegacyLineLayoutVisualCoverageEnabledPreferenceKey @"WebKitLegacyLineLayoutVisualCoverageEnabled"
    113113#define WebKitContentChangeObserverEnabledPreferenceKey @"WebKitContentChangeObserverEnabled"
    114114#define WebKitShowRepaintCounterPreferenceKey @"WebKitShowRepaintCounter"
  • trunk/Source/WebKitLegacy/mac/WebView/WebPreferences.mm

    r269416 r269603  
    18101810}
    18111811
    1812 - (BOOL)simpleLineLayoutDebugBordersEnabled
    1813 {
    1814     return [self _boolValueForKey:WebKitSimpleLineLayoutDebugBordersEnabledPreferenceKey];
    1815 }
    1816 
    1817 - (void)setSimpleLineLayoutDebugBordersEnabled:(BOOL)enabled
    1818 {
    1819     [self _setBoolValue:enabled forKey:WebKitSimpleLineLayoutDebugBordersEnabledPreferenceKey];
     1812- (BOOL)legacyLineLayoutVisualCoverageEnabled
     1813{
     1814    return [self _boolValueForKey:WebKitLegacyLineLayoutVisualCoverageEnabledPreferenceKey];
     1815}
     1816
     1817- (void)setLegacyLineLayoutVisualCoverageEnabled:(BOOL)enabled
     1818{
     1819    [self _setBoolValue:enabled forKey:WebKitLegacyLineLayoutVisualCoverageEnabledPreferenceKey];
    18201820}
    18211821
  • trunk/Source/WebKitLegacy/mac/WebView/WebPreferencesPrivate.h

    r269416 r269603  
    153153@property (nonatomic) BOOL showDebugBorders;
    154154@property (nonatomic) BOOL simpleLineLayoutEnabled;
    155 @property (nonatomic) BOOL simpleLineLayoutDebugBordersEnabled;
     155@property (nonatomic) BOOL legacyLineLayoutVisualCoverageEnabled;
    156156@property (nonatomic) BOOL showRepaintCounter;
    157157@property (nonatomic) BOOL webAudioEnabled;
  • trunk/Tools/ChangeLog

    r269602 r269603  
     12020-11-09  Zalan Bujtas  <zalan@apple.com>
     2
     3        Show legacy line layout visual coverage instead of "simple line" layout.
     4        https://bugs.webkit.org/show_bug.cgi?id=218695
     5
     6        Reviewed by Antti Koivisto.
     7
     8        * MiniBrowser/mac/SettingsController.h:
     9        * MiniBrowser/mac/SettingsController.m:
     10        (-[SettingsController _populateMenu]):
     11        (-[SettingsController validateMenuItem:]):
     12        (-[SettingsController toggleLegacyLineLayoutVisualCoverageEnabled:]):
     13        (-[SettingsController legacyLineLayoutVisualCoverageEnabled]):
     14        (-[SettingsController toggleSimpleLineLayoutDebugBordersEnabled:]): Deleted.
     15        (-[SettingsController simpleLineLayoutDebugBordersEnabled]): Deleted.
     16        * MiniBrowser/mac/WK1BrowserWindowController.m:
     17        (-[WK1BrowserWindowController didChangeSettings]):
     18        * MiniBrowser/mac/WK2BrowserWindowController.m:
     19        (-[WK2BrowserWindowController didChangeSettings]):
     20
    1212020-11-09  Diego Pino Garcia  <dpino@igalia.com>
    222
  • trunk/Tools/MiniBrowser/mac/SettingsController.h

    r267970 r269603  
    3838@property (nonatomic, readonly) BOOL layerBordersVisible;
    3939@property (nonatomic, readonly) BOOL simpleLineLayoutEnabled;
    40 @property (nonatomic, readonly) BOOL simpleLineLayoutDebugBordersEnabled;
     40@property (nonatomic, readonly) BOOL legacyLineLayoutVisualCoverageEnabled;
    4141@property (nonatomic, readonly) BOOL incrementalRenderingSuppressed;
    4242@property (nonatomic, readonly) BOOL tiledScrollingIndicatorVisible;
  • trunk/Tools/MiniBrowser/mac/SettingsController.m

    r267970 r269603  
    4343static NSString * const LayerBordersVisiblePreferenceKey = @"LayerBordersVisible";
    4444static NSString * const SimpleLineLayoutEnabledPreferenceKey = @"SimpleLineLayoutEnabled";
    45 static NSString * const SimpleLineLayoutDebugBordersEnabledPreferenceKey = @"SimpleLineLayoutDebugBordersEnabled";
     45static NSString * const LegacyLineLayoutVisualCoverageEnabledPreferenceKey = @"LegacyLineLayoutVisualCoverageEnabled";
    4646static NSString * const TiledScrollingIndicatorVisiblePreferenceKey = @"TiledScrollingIndicatorVisible";
    4747static NSString * const ReserveSpaceForBannersPreferenceKey = @"ReserveSpaceForBanners";
     
    162162    [self _addItemWithTitle:@"Show Layer Borders" action:@selector(toggleShowLayerBorders:) indented:NO];
    163163    [self _addItemWithTitle:@"Disable Simple Line Layout" action:@selector(toggleSimpleLineLayoutEnabled:) indented:NO];
    164     [self _addItemWithTitle:@"Show Simple Line Layout Borders" action:@selector(toggleSimpleLineLayoutDebugBordersEnabled:) indented:NO];
     164    [self _addItemWithTitle:@"Enable Legacy Line Layout Visual Coverage" action:@selector(toggleLegacyLineLayoutVisualCoverageEnabled:) indented:NO];
    165165    [self _addItemWithTitle:@"Suppress Incremental Rendering in New Windows" action:@selector(toggleIncrementalRenderingSuppressed:) indented:NO];
    166166    [self _addItemWithTitle:@"Enable Accelerated Drawing" action:@selector(toggleAcceleratedDrawingEnabled:) indented:NO];
     
    347347    else if (action == @selector(toggleSimpleLineLayoutEnabled:))
    348348        [menuItem setState:[self simpleLineLayoutEnabled] ? NSControlStateValueOff : NSControlStateValueOn];
    349     else if (action == @selector(toggleSimpleLineLayoutDebugBordersEnabled:))
    350         [menuItem setState:[self simpleLineLayoutDebugBordersEnabled] ? NSControlStateValueOn : NSControlStateValueOff];
     349    else if (action == @selector(toggleLegacyLineLayoutVisualCoverageEnabled:))
     350        [menuItem setState:[self legacyLineLayoutVisualCoverageEnabled] ? NSControlStateValueOn : NSControlStateValueOff];
    351351    else if (action == @selector(toggleIncrementalRenderingSuppressed:))
    352352        [menuItem setState:[self incrementalRenderingSuppressed] ? NSControlStateValueOn : NSControlStateValueOff];
     
    524524}
    525525
    526 - (void)toggleSimpleLineLayoutDebugBordersEnabled:(id)sender
    527 {
    528     [self _toggleBooleanDefault:SimpleLineLayoutDebugBordersEnabledPreferenceKey];
    529 }
    530 
    531 - (BOOL)simpleLineLayoutDebugBordersEnabled
    532 {
    533     return [[NSUserDefaults standardUserDefaults] boolForKey:SimpleLineLayoutDebugBordersEnabledPreferenceKey];
     526- (void)toggleLegacyLineLayoutVisualCoverageEnabled:(id)sender
     527{
     528    [self _toggleBooleanDefault:LegacyLineLayoutVisualCoverageEnabledPreferenceKey];
     529}
     530
     531- (BOOL)legacyLineLayoutVisualCoverageEnabled
     532{
     533    return [[NSUserDefaults standardUserDefaults] boolForKey:LegacyLineLayoutVisualCoverageEnabledPreferenceKey];
    534534}
    535535
  • trunk/Tools/MiniBrowser/mac/WK1BrowserWindowController.m

    r267970 r269603  
    327327    [[WebPreferences standardPreferences] setShowDebugBorders:settings.layerBordersVisible];
    328328    [[WebPreferences standardPreferences] setSimpleLineLayoutEnabled:settings.simpleLineLayoutEnabled];
    329     [[WebPreferences standardPreferences] setSimpleLineLayoutDebugBordersEnabled:settings.simpleLineLayoutDebugBordersEnabled];
     329    [[WebPreferences standardPreferences] setLegacyLineLayoutVisualCoverageEnabled:settings.legacyLineLayoutVisualCoverageEnabled];
    330330    [[WebPreferences standardPreferences] setShowRepaintCounter:settings.layerBordersVisible];
    331331    [[WebPreferences standardPreferences] setSuppressesIncrementalRendering:settings.incrementalRenderingSuppressed];
  • trunk/Tools/MiniBrowser/mac/WK2BrowserWindowController.m

    r267414 r269603  
    473473    preferences._compositingRepaintCountersVisible = settings.layerBordersVisible;
    474474    preferences._simpleLineLayoutEnabled = settings.simpleLineLayoutEnabled;
    475     preferences._simpleLineLayoutDebugBordersEnabled = settings.simpleLineLayoutDebugBordersEnabled;
     475    preferences._legacyLineLayoutVisualCoverageEnabled = settings.legacyLineLayoutVisualCoverageEnabled;
    476476    preferences._acceleratedDrawingEnabled = settings.acceleratedDrawingEnabled;
    477477    preferences._resourceUsageOverlayVisible = settings.resourceUsageOverlayVisible;
Note: See TracChangeset for help on using the changeset viewer.