Title: [244123] branches/safari-607-branch
Revision
244123
Author
[email protected]
Date
2019-04-10 10:11:05 -0700 (Wed, 10 Apr 2019)

Log Message

Cherry-pick r243660. rdar://problem/49725670

    [Simple line layout] Turn off inline boxtree generation for multiline content
    https://bugs.webkit.org/show_bug.cgi?id=196404
    <rdar://problem/49234033>

    Reviewed by Simon Fraser.

    Source/WebCore:

    Currently simple line layout can't provide the correct line breaking context to the inline tree when the boxtree is
    generated using the simple line runs. This patch limits the generation of such trees to single lines. Multiline content will
    go through the "let's layout this content again" codepath.
    This patch fixes disappearing content on Questar.

    Test: fast/text/simple-line-layout-and-multiline-inlineboxtree.html

    * rendering/SimpleLineLayoutFunctions.cpp:
    (WebCore::SimpleLineLayout::canUseForLineBoxTree):

    LayoutTests:

    * fast/text/simple-line-layout-and-multiline-inlineboxtree-expected.html: Added.
    * fast/text/simple-line-layout-and-multiline-inlineboxtree.html: Added.

    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@243660 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Modified Paths

Added Paths

Diff

Modified: branches/safari-607-branch/LayoutTests/ChangeLog (244122 => 244123)


--- branches/safari-607-branch/LayoutTests/ChangeLog	2019-04-10 17:11:02 UTC (rev 244122)
+++ branches/safari-607-branch/LayoutTests/ChangeLog	2019-04-10 17:11:05 UTC (rev 244123)
@@ -1,5 +1,46 @@
 2019-04-09  Alan Coon  <[email protected]>
 
+        Cherry-pick r243660. rdar://problem/49725670
+
+    [Simple line layout] Turn off inline boxtree generation for multiline content
+    https://bugs.webkit.org/show_bug.cgi?id=196404
+    <rdar://problem/49234033>
+    
+    Reviewed by Simon Fraser.
+    
+    Source/WebCore:
+    
+    Currently simple line layout can't provide the correct line breaking context to the inline tree when the boxtree is
+    generated using the simple line runs. This patch limits the generation of such trees to single lines. Multiline content will
+    go through the "let's layout this content again" codepath.
+    This patch fixes disappearing content on Questar.
+    
+    Test: fast/text/simple-line-layout-and-multiline-inlineboxtree.html
+    
+    * rendering/SimpleLineLayoutFunctions.cpp:
+    (WebCore::SimpleLineLayout::canUseForLineBoxTree):
+    
+    LayoutTests:
+    
+    * fast/text/simple-line-layout-and-multiline-inlineboxtree-expected.html: Added.
+    * fast/text/simple-line-layout-and-multiline-inlineboxtree.html: Added.
+    
+    
+    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@243660 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+    2019-03-29  Zalan Bujtas  <[email protected]>
+
+            [Simple line layout] Turn off inline boxtree generation for multiline content
+            https://bugs.webkit.org/show_bug.cgi?id=196404
+            <rdar://problem/49234033>
+
+            Reviewed by Simon Fraser.
+
+            * fast/text/simple-line-layout-and-multiline-inlineboxtree-expected.html: Added.
+            * fast/text/simple-line-layout-and-multiline-inlineboxtree.html: Added.
+
+2019-04-09  Alan Coon  <[email protected]>
+
         Cherry-pick r243605. rdar://problem/49725707
 
     [SimpleLineLayout] Disable SLL when text-underline-position is not auto.

Added: branches/safari-607-branch/LayoutTests/fast/text/simple-line-layout-and-multiline-inlineboxtree-expected.html (0 => 244123)


--- branches/safari-607-branch/LayoutTests/fast/text/simple-line-layout-and-multiline-inlineboxtree-expected.html	                        (rev 0)
+++ branches/safari-607-branch/LayoutTests/fast/text/simple-line-layout-and-multiline-inlineboxtree-expected.html	2019-04-10 17:11:05 UTC (rev 244123)
@@ -0,0 +1,15 @@
+<!DOCTYPE html>
+<html>
+<head>
+<title>This tests that we can reconstruct the line tree when a dynamic change is triggered on the block after switching out of simple line layout.</title>
+<script>
+if (window.internals)
+    internals.settings.setSimpleLineLayoutEnabled(true);
+</script>
+</head>
+<body>
+<div id=container style="width: 200px;">
+This long long long long long text should not get cut off after "extra text" is added to the end. extra text
+</div>
+</body>
+</html>

Added: branches/safari-607-branch/LayoutTests/fast/text/simple-line-layout-and-multiline-inlineboxtree.html (0 => 244123)


--- branches/safari-607-branch/LayoutTests/fast/text/simple-line-layout-and-multiline-inlineboxtree.html	                        (rev 0)
+++ branches/safari-607-branch/LayoutTests/fast/text/simple-line-layout-and-multiline-inlineboxtree.html	2019-04-10 17:11:05 UTC (rev 244123)
@@ -0,0 +1,28 @@
+<!DOCTYPE html>
+<html>
+<head>
+<title>This tests that we can reconstruct the line tree when a dynamic change is triggered on the block after switching out of simple line layout.</title>
+<script>
+if (window.internals)
+    internals.settings.setSimpleLineLayoutEnabled(true);
+</script>
+</head>
+<body>
+<div id=container style="width: 200px;">
+This long long long long long text should not get cut off after "extra text" is added to the end.
+</div>
+<script>
+const selection = window.getSelection();
+const range = document.createRange();
+range.selectNodeContents(container);
+selection.addRange(range);
+document.body.offsetHeight;
+selection.removeAllRanges();
+document.body.offsetHeight;
+
+let span = document.createElement("span");
+span.innerText = "extra text";
+container.appendChild(span);
+</script>
+</body>
+</html>

Modified: branches/safari-607-branch/Source/WebCore/ChangeLog (244122 => 244123)


--- branches/safari-607-branch/Source/WebCore/ChangeLog	2019-04-10 17:11:02 UTC (rev 244122)
+++ branches/safari-607-branch/Source/WebCore/ChangeLog	2019-04-10 17:11:05 UTC (rev 244123)
@@ -1,5 +1,53 @@
 2019-04-09  Alan Coon  <[email protected]>
 
+        Cherry-pick r243660. rdar://problem/49725670
+
+    [Simple line layout] Turn off inline boxtree generation for multiline content
+    https://bugs.webkit.org/show_bug.cgi?id=196404
+    <rdar://problem/49234033>
+    
+    Reviewed by Simon Fraser.
+    
+    Source/WebCore:
+    
+    Currently simple line layout can't provide the correct line breaking context to the inline tree when the boxtree is
+    generated using the simple line runs. This patch limits the generation of such trees to single lines. Multiline content will
+    go through the "let's layout this content again" codepath.
+    This patch fixes disappearing content on Questar.
+    
+    Test: fast/text/simple-line-layout-and-multiline-inlineboxtree.html
+    
+    * rendering/SimpleLineLayoutFunctions.cpp:
+    (WebCore::SimpleLineLayout::canUseForLineBoxTree):
+    
+    LayoutTests:
+    
+    * fast/text/simple-line-layout-and-multiline-inlineboxtree-expected.html: Added.
+    * fast/text/simple-line-layout-and-multiline-inlineboxtree.html: Added.
+    
+    
+    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@243660 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+    2019-03-29  Zalan Bujtas  <[email protected]>
+
+            [Simple line layout] Turn off inline boxtree generation for multiline content
+            https://bugs.webkit.org/show_bug.cgi?id=196404
+            <rdar://problem/49234033>
+
+            Reviewed by Simon Fraser.
+
+            Currently simple line layout can't provide the correct line breaking context to the inline tree when the boxtree is
+            generated using the simple line runs. This patch limits the generation of such trees to single lines. Multiline content will
+            go through the "let's layout this content again" codepath.
+            This patch fixes disappearing content on Questar.
+
+            Test: fast/text/simple-line-layout-and-multiline-inlineboxtree.html
+
+            * rendering/SimpleLineLayoutFunctions.cpp:
+            (WebCore::SimpleLineLayout::canUseForLineBoxTree):
+
+2019-04-09  Alan Coon  <[email protected]>
+
         Cherry-pick r243605. rdar://problem/49725707
 
     [SimpleLineLayout] Disable SLL when text-underline-position is not auto.

Modified: branches/safari-607-branch/Source/WebCore/rendering/SimpleLineLayoutFunctions.cpp (244122 => 244123)


--- branches/safari-607-branch/Source/WebCore/rendering/SimpleLineLayoutFunctions.cpp	2019-04-10 17:11:02 UTC (rev 244122)
+++ branches/safari-607-branch/Source/WebCore/rendering/SimpleLineLayoutFunctions.cpp	2019-04-10 17:11:05 UTC (rev 244123)
@@ -273,6 +273,10 @@
 
 bool canUseForLineBoxTree(RenderBlockFlow& flow, const Layout& layout)
 {
+    // Line breaking requires some context that SLL can't provide at the moment (see RootInlineBox::setLineBreakInfo).
+    if (layout.lineCount() > 1)
+        return false;
+
     if (layout.isPaginated())
         return false;
     
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to