Remove newBlockInsideInlineModel and anonymous inline block
authorantti@apple.com <antti@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 31 Aug 2017 23:27:02 +0000 (23:27 +0000)
committerantti@apple.com <antti@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 31 Aug 2017 23:27:02 +0000 (23:27 +0000)
https://bugs.webkit.org/show_bug.cgi?id=176181

Reviewed by Zalan Bujtas.

Source/WebCore:

Anonymous inline block exists to support newBlockInsideInlineModel which was planned as the replacement for continuations.
It has never been enabled and it is time to remove it.

* page/Settings.in:
* rendering/InlineElementBox.cpp:
(WebCore::InlineElementBox::paint):
(WebCore::InlineElementBox::nodeAtPoint):
* rendering/InlineFlowBox.cpp:
(WebCore::InlineFlowBox::addToLine):
(WebCore::InlineFlowBox::placeBoxesInBlockDirection):
(WebCore::InlineFlowBox::nodeAtPoint):
(WebCore::InlineFlowBox::paint):
(WebCore::InlineFlowBox::anonymousInlineBlock const): Deleted.
* rendering/InlineFlowBox.h:
(WebCore::InlineFlowBox::InlineFlowBox):
(WebCore::InlineFlowBox::hasAnonymousInlineBlock const): Deleted.
(WebCore::InlineFlowBox::setHasAnonymousInlineBlock): Deleted.
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::lineHeight const):
(WebCore::RenderBlock::baselinePosition const):
(WebCore::RenderBlock::renderName const):
* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::rebuildFloatingObjectSetFromIntrudingFloats):
(WebCore::RenderBlockFlow::childrenPreventSelfCollapsing const):
(WebCore::RenderBlockFlow::adjustLinePositionForPagination):
(WebCore::RenderBlockFlow::computeInlinePreferredLogicalWidths const):
* rendering/RenderBlockFlow.h:
* rendering/RenderBlockLineLayout.cpp:
(WebCore::updateLogicalInlinePositions):
(WebCore::RenderBlockFlow::computeInlineDirectionPositionsForLine):
(WebCore::RenderBlockFlow::layoutRunsAndFloats):
(WebCore::RenderBlockFlow::layoutRunsAndFloatsInRange):
(WebCore::RenderBlockFlow::layoutLineBoxes):
(WebCore::RenderBlockFlow::determineStartPosition):
(WebCore::RenderBlockFlow::matchedEndLine):
(WebCore::RenderBlockFlow::marginCollapseLinesFromStart): Deleted.
* rendering/RenderBox.cpp:
(WebCore::RenderBox::sizesLogicalWidthToFitContent const):
(WebCore::RenderBox::createsNewFormattingContext const):
(WebCore::RenderBox::avoidsFloats const):
* rendering/RenderInline.cpp:
(WebCore::RenderInline::addChildIgnoringContinuation):
* rendering/RenderObject.cpp:
(WebCore::RenderObject::isAnonymousInlineBlock const): Deleted.
* rendering/RenderObject.h:
(WebCore::RenderObject::isAnonymousBlock const):
* rendering/RootInlineBox.cpp:
(WebCore::RootInlineBox::alignBoxesInBlockDirection):
(WebCore::RootInlineBox::ascentAndDescentForBox const):
* rendering/line/BreakingContext.h:
(WebCore::BreakingContext::BreakingContext):
(WebCore::BreakingContext::handleReplaced):
* rendering/line/LineBreaker.cpp:
(WebCore::LineBreaker::nextLineBreak):
* rendering/line/LineBreaker.h:
* rendering/line/LineLayoutState.h:
(WebCore::LineLayoutState::marginInfo):
(WebCore::LineLayoutState::prevFloatBottomFromAnonymousInlineBlock): Deleted.
(WebCore::LineLayoutState::maxFloatBottomFromAnonymousInlineBlock): Deleted.

LayoutTests:

* TestExpectations:
* fast/block/inside-inlines/crash-on-first-line-change.html:

    Don't set newBlockInsideInlineModel.

* fast/block/inside-inlines/new-model: Removed.
* fast/block/inside-inlines/new-model/basic-float-intrusion-expected.html: Removed.
* fast/block/inside-inlines/new-model/basic-float-intrusion.html: Removed.
* fast/block/inside-inlines/new-model/block-width-check-expected.html: Removed.
* fast/block/inside-inlines/new-model/block-width-check.html: Removed.
* fast/block/inside-inlines/new-model/breaking-behavior-expected.html: Removed.
* fast/block/inside-inlines/new-model/breaking-behavior.html: Removed.
* fast/block/inside-inlines/new-model/empty-block-expected.html: Removed.
* fast/block/inside-inlines/new-model/empty-block.html: Removed.
* fast/block/inside-inlines/new-model/margin-collapse: Removed.
* fast/block/inside-inlines/new-model/margin-collapse/001-expected.html: Removed.
* fast/block/inside-inlines/new-model/margin-collapse/001.html: Removed.
* fast/block/inside-inlines/new-model/margin-collapse/002-expected.html: Removed.
* fast/block/inside-inlines/new-model/margin-collapse/002.html: Removed.
* fast/block/inside-inlines/new-model/margin-collapse/003-expected.html: Removed.
* fast/block/inside-inlines/new-model/margin-collapse/003.html: Removed.
* fast/block/inside-inlines/new-model/margin-collapse/004-expected.html: Removed.
* fast/block/inside-inlines/new-model/margin-collapse/004.html: Removed.
* fast/block/inside-inlines/new-model/margins-pushing-below-float-expected.html: Removed.
* fast/block/inside-inlines/new-model/margins-pushing-below-float.html: Removed.
* fast/block/inside-inlines/new-model/paint-order-expected.html: Removed.
* fast/block/inside-inlines/new-model/paint-order.html: Removed.
* fast/block/inside-inlines/new-model/self-collapsing-test-expected.html: Removed.
* fast/block/inside-inlines/new-model/self-collapsing-test.html: Removed.

    These are reftests comparing newBlockInsideInlineModel and the current model and don't have value anymore.

* fast/block/inside-inlines/opacity-on-inline.html:

    Don't set newBlockInsideInlineModel.
    Marked this as failing since it only worked with newBlockInsideInlineModel enabled.
    The test passes in Firefox and fails in Chrome.

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

48 files changed:
LayoutTests/ChangeLog
LayoutTests/TestExpectations
LayoutTests/fast/block/inside-inlines/crash-on-first-line-change.html
LayoutTests/fast/block/inside-inlines/new-model/basic-float-intrusion-expected.html [deleted file]
LayoutTests/fast/block/inside-inlines/new-model/basic-float-intrusion.html [deleted file]
LayoutTests/fast/block/inside-inlines/new-model/block-width-check-expected.html [deleted file]
LayoutTests/fast/block/inside-inlines/new-model/block-width-check.html [deleted file]
LayoutTests/fast/block/inside-inlines/new-model/breaking-behavior-expected.html [deleted file]
LayoutTests/fast/block/inside-inlines/new-model/breaking-behavior.html [deleted file]
LayoutTests/fast/block/inside-inlines/new-model/empty-block-expected.html [deleted file]
LayoutTests/fast/block/inside-inlines/new-model/empty-block.html [deleted file]
LayoutTests/fast/block/inside-inlines/new-model/margin-collapse/001-expected.html [deleted file]
LayoutTests/fast/block/inside-inlines/new-model/margin-collapse/001.html [deleted file]
LayoutTests/fast/block/inside-inlines/new-model/margin-collapse/002-expected.html [deleted file]
LayoutTests/fast/block/inside-inlines/new-model/margin-collapse/002.html [deleted file]
LayoutTests/fast/block/inside-inlines/new-model/margin-collapse/003-expected.html [deleted file]
LayoutTests/fast/block/inside-inlines/new-model/margin-collapse/003.html [deleted file]
LayoutTests/fast/block/inside-inlines/new-model/margin-collapse/004-expected.html [deleted file]
LayoutTests/fast/block/inside-inlines/new-model/margin-collapse/004.html [deleted file]
LayoutTests/fast/block/inside-inlines/new-model/margins-pushing-below-float-expected.html [deleted file]
LayoutTests/fast/block/inside-inlines/new-model/margins-pushing-below-float.html [deleted file]
LayoutTests/fast/block/inside-inlines/new-model/paint-order-expected.html [deleted file]
LayoutTests/fast/block/inside-inlines/new-model/paint-order.html [deleted file]
LayoutTests/fast/block/inside-inlines/new-model/self-collapsing-test-expected.html [deleted file]
LayoutTests/fast/block/inside-inlines/new-model/self-collapsing-test.html [deleted file]
LayoutTests/fast/block/inside-inlines/opacity-on-inline.html
LayoutTests/platform/ios-wk1/TestExpectations
Source/WebCore/ChangeLog
Source/WebCore/page/Settings.in
Source/WebCore/rendering/InlineElementBox.cpp
Source/WebCore/rendering/InlineFlowBox.cpp
Source/WebCore/rendering/InlineFlowBox.h
Source/WebCore/rendering/RenderBlock.cpp
Source/WebCore/rendering/RenderBlockFlow.cpp
Source/WebCore/rendering/RenderBlockFlow.h
Source/WebCore/rendering/RenderBlockLineLayout.cpp
Source/WebCore/rendering/RenderBox.cpp
Source/WebCore/rendering/RenderInline.cpp
Source/WebCore/rendering/RenderObject.cpp
Source/WebCore/rendering/RenderObject.h
Source/WebCore/rendering/RootInlineBox.cpp
Source/WebCore/rendering/line/BreakingContext.h
Source/WebCore/rendering/line/LineBreaker.cpp
Source/WebCore/rendering/line/LineBreaker.h
Source/WebCore/rendering/line/LineLayoutState.h
Source/WebKit/Shared/WebPreferencesDefinitions.h
Source/WebKit/UIProcess/API/C/WKPreferences.cpp
Source/WebKit/WebProcess/WebPage/WebPage.cpp

index 70cb7ed..a919c29 100644 (file)
@@ -1,3 +1,48 @@
+2017-08-31  Antti Koivisto  <antti@apple.com>
+
+        Remove newBlockInsideInlineModel and anonymous inline block
+        https://bugs.webkit.org/show_bug.cgi?id=176181
+
+        Reviewed by Zalan Bujtas.
+
+        * TestExpectations:
+        * fast/block/inside-inlines/crash-on-first-line-change.html:
+
+            Don't set newBlockInsideInlineModel.
+
+        * fast/block/inside-inlines/new-model: Removed.
+        * fast/block/inside-inlines/new-model/basic-float-intrusion-expected.html: Removed.
+        * fast/block/inside-inlines/new-model/basic-float-intrusion.html: Removed.
+        * fast/block/inside-inlines/new-model/block-width-check-expected.html: Removed.
+        * fast/block/inside-inlines/new-model/block-width-check.html: Removed.
+        * fast/block/inside-inlines/new-model/breaking-behavior-expected.html: Removed.
+        * fast/block/inside-inlines/new-model/breaking-behavior.html: Removed.
+        * fast/block/inside-inlines/new-model/empty-block-expected.html: Removed.
+        * fast/block/inside-inlines/new-model/empty-block.html: Removed.
+        * fast/block/inside-inlines/new-model/margin-collapse: Removed.
+        * fast/block/inside-inlines/new-model/margin-collapse/001-expected.html: Removed.
+        * fast/block/inside-inlines/new-model/margin-collapse/001.html: Removed.
+        * fast/block/inside-inlines/new-model/margin-collapse/002-expected.html: Removed.
+        * fast/block/inside-inlines/new-model/margin-collapse/002.html: Removed.
+        * fast/block/inside-inlines/new-model/margin-collapse/003-expected.html: Removed.
+        * fast/block/inside-inlines/new-model/margin-collapse/003.html: Removed.
+        * fast/block/inside-inlines/new-model/margin-collapse/004-expected.html: Removed.
+        * fast/block/inside-inlines/new-model/margin-collapse/004.html: Removed.
+        * fast/block/inside-inlines/new-model/margins-pushing-below-float-expected.html: Removed.
+        * fast/block/inside-inlines/new-model/margins-pushing-below-float.html: Removed.
+        * fast/block/inside-inlines/new-model/paint-order-expected.html: Removed.
+        * fast/block/inside-inlines/new-model/paint-order.html: Removed.
+        * fast/block/inside-inlines/new-model/self-collapsing-test-expected.html: Removed.
+        * fast/block/inside-inlines/new-model/self-collapsing-test.html: Removed.
+
+            These are reftests comparing newBlockInsideInlineModel and the current model and don't have value anymore.
+
+        * fast/block/inside-inlines/opacity-on-inline.html:
+
+            Don't set newBlockInsideInlineModel.
+            Marked this as failing since it only worked with newBlockInsideInlineModel enabled.
+            The test passes in Firefox and fails in Chrome.
+
 2017-08-31  Youenn Fablet  <youenn@apple.com>
 
         Add support for Request body stream cloning
index a9c106b..7d100a3 100644 (file)
@@ -1457,3 +1457,5 @@ inspector/dom/content-node-region-info.html [ Skip ]
 fast/shapes/shape-outside-floats/shape-outside-floats-layout-after-initial-layout-pass.html [ Skip ]
 
 webkit.org/b/171945 perf/class-list-remove.html [ Pass Failure Timeout ]
+
+webkit.org/b/176183 fast/block/inside-inlines/opacity-on-inline.html [ ImageOnlyFailure ]
index d537de8..6dc7c90 100644 (file)
@@ -17,9 +17,6 @@ div {
 PASS if no crash.
 <div class=container><span><div id=foo></div></div></div>
 <script>
-if (window.internals)
-    internals.settings.setNewBlockInsideInlineModelEnabled(true)
-
 if (window.testRunner) {
     testRunner.dumpAsText();
     testRunner.waitUntilDone();  
diff --git a/LayoutTests/fast/block/inside-inlines/new-model/basic-float-intrusion-expected.html b/LayoutTests/fast/block/inside-inlines/new-model/basic-float-intrusion-expected.html
deleted file mode 100644 (file)
index f61465a..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-<!doctype html>
-<head>
-<style>
-.box { border:1px solid black; padding:3px; margin:3px }
-.nowrap { white-space: nowrap; }
-.float { float: left; }
-.box div { height:40px;  }
-.float { width:100px; height:100px; background-color:cyan }
-</style>
-<body>
-
-<div class="float"></div>
-
-<div class="box"><div>Avoid the float!</div></div>
diff --git a/LayoutTests/fast/block/inside-inlines/new-model/basic-float-intrusion.html b/LayoutTests/fast/block/inside-inlines/new-model/basic-float-intrusion.html
deleted file mode 100644 (file)
index 3b556d0..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-<!doctype html>
-<head>
-<style>
-.box { border:1px solid black; padding:3px; margin:3px }
-.nowrap { white-space: nowrap; }
-.float { float: left; }
-.box div { height:40px;  }
-.float { width:100px; height:100px; background-color:cyan }
-</style>
-<script>
-if (window.internals)
-    window.internals.settings.setNewBlockInsideInlineModelEnabled(true)
-</script>
-<body>
-
-<div class="float"></div>
-
-<div class="box"><a><div>Avoid the float!</div></a></div>
diff --git a/LayoutTests/fast/block/inside-inlines/new-model/block-width-check-expected.html b/LayoutTests/fast/block/inside-inlines/new-model/block-width-check-expected.html
deleted file mode 100644 (file)
index 257667e..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-<!doctype html>
-<head>
-<style>
-.box { border:1px solid black; padding:3px; margin:3px }
-.nowrap { white-space: nowrap; }
-.float { float: left; }
-.cont { background-color:lime; height:40px; border:1px solid black }
-</style>
-<body>
-
-<div class="box"><div><a>One </a></div><div class="cont"></div><div><a> Two</a></div></div>
-
-<div class="box"><div><a>One<br></a></div><div class="cont"></div><div><a><br>Two</a></div></div>
-
-<div class="box float"><div><a>One </a></div><div class="cont"></div><div><a> Two</a></div></div>
\ No newline at end of file
diff --git a/LayoutTests/fast/block/inside-inlines/new-model/block-width-check.html b/LayoutTests/fast/block/inside-inlines/new-model/block-width-check.html
deleted file mode 100644 (file)
index 01fd5aa..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-<!doctype html>
-<head>
-<style>
-.box { border:1px solid black; padding:3px; margin:3px }
-.nowrap { white-space: nowrap; }
-.float { float: left; }
-.box div { background-color:lime; height:40px; border:1px solid black }
-</style>
-<script>
-if (window.internals)
-    window.internals.settings.setNewBlockInsideInlineModelEnabled(true)
-</script>
-<body>
-
-<div class="box"><a>One <div></div> Two</a></div>
-
-<div class="box"><a>One<br><div></div><br>Two</a></div>
-
-<div class="box float"><a>One <div></div> Two</a></div>
\ No newline at end of file
diff --git a/LayoutTests/fast/block/inside-inlines/new-model/breaking-behavior-expected.html b/LayoutTests/fast/block/inside-inlines/new-model/breaking-behavior-expected.html
deleted file mode 100644 (file)
index adfd0ce..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-<!doctype html>
-<head>
-<style>
-.box { border:1px solid black; padding:3px; margin:3px }
-.nowrap { white-space: nowrap; }
-.float { float: left; }
-</style>
-<body>
-
-<div class="box"><a>One <br> Two</a></div>
-
-<div class="box"><a>One<br><br>Two</a></div>
-
-<div class="box nowrap"><a>One <br> Two</a></div>
-
-<div class="box float"><a>One<br> Two</a></div>
\ No newline at end of file
diff --git a/LayoutTests/fast/block/inside-inlines/new-model/breaking-behavior.html b/LayoutTests/fast/block/inside-inlines/new-model/breaking-behavior.html
deleted file mode 100644 (file)
index 42b5f47..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-<!doctype html>
-<head>
-<style>
-.box { border:1px solid black; padding:3px; margin:3px }
-.nowrap { white-space: nowrap; }
-.float { float: left; }
-</style>
-<script>
-if (window.internals)
-    window.internals.settings.setNewBlockInsideInlineModelEnabled(true)
-</script>
-</head>
-<body>
-
-<div class="box"><a>One <div></div> Two</a></div>
-
-<div class="box"><a>One<br><div></div><br>Two</a></div>
-
-<div class="box nowrap"><a>One <div></div> Two</a></div>
-
-<div class="box float"><a>One <div></div> Two</a></div>
\ No newline at end of file
diff --git a/LayoutTests/fast/block/inside-inlines/new-model/empty-block-expected.html b/LayoutTests/fast/block/inside-inlines/new-model/empty-block-expected.html
deleted file mode 100644 (file)
index be38bc7..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-<!doctype html>
-
-The two lines below should look identical.
-
-<div>
-
-<a style="line-height:2; background-color:green; padding:0 100px">&nbsp;&nbsp;<br>
-&nbsp;&nbsp;</a>
-</div>
\ No newline at end of file
diff --git a/LayoutTests/fast/block/inside-inlines/new-model/empty-block.html b/LayoutTests/fast/block/inside-inlines/new-model/empty-block.html
deleted file mode 100644 (file)
index f1ac790..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-<!doctype html>
-<head>
-<script>
-if (window.internals)
-    window.internals.settings.setNewBlockInsideInlineModelEnabled(true)
-</script>
-</head>
-
-The two lines below should look identical.
-
-<div>
-
-<a style="line-height:2; background-color:green; padding:0 100px">&nbsp;&nbsp;<br>
-<div></div>&nbsp;&nbsp;</a>
-</div>
\ No newline at end of file
diff --git a/LayoutTests/fast/block/inside-inlines/new-model/margin-collapse/001-expected.html b/LayoutTests/fast/block/inside-inlines/new-model/margin-collapse/001-expected.html
deleted file mode 100644 (file)
index 8ad3965..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
-<html lang="en">
- <head>
-  <title>Margin Collapsing: in flow (block-inside-inline version)</title>
-  <style type="text/css">
-   table { border-spacing: 0; font-size: 50px; border: solid; }
-   td { background: orange; padding: 0; }
-   div { margin: 1em 0; }
-   .a { background: yellow; }
-   .b { background: lime; }
-   .c { background: aqua; }
-   .d { background: blue; }
-   .red { background: red; }
-  </style>
- </head>
- <body>
-  <p>The following two columns should be pixel perfect identical with no red visible.</p>
-  <table>
-   <tr>
-    <td class="test">
-     <span><div class="d">
-      <span><div class="red"><span><div class="red"><span><div class="a">A</div></span></div><span><div class="red"></div></span></div></span>
-      <span><div class="red"></div></span>
-      <span><div class="red"><span><div class="red"></div></span></div></span>
-      <span><div class="red"><span><div class="b"><span><div class="red"></div></span>B</div></span></div></span>
-      <span><div class="c">C</div></span>
-     </div></span>
-    </td>
-    <td class="control">
-     <div class="d">
-      <div class="a">A</div>
-      <div class="b">B</div>
-      <div class="c">C</div>
-     </div>
-    </td>
-   </tr>
-  </table>
-  <p>This test is meaningless if you don't pass <a href="006.html#">test 006</a>.</p>
- </body>
-</html>
diff --git a/LayoutTests/fast/block/inside-inlines/new-model/margin-collapse/001.html b/LayoutTests/fast/block/inside-inlines/new-model/margin-collapse/001.html
deleted file mode 100644 (file)
index d00a714..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
-<html lang="en">
- <head>
-  <title>Margin Collapsing: in flow (block-inside-inline version)</title>
-  <style type="text/css">
-   table { border-spacing: 0; font-size: 50px; border: solid; }
-   td { background: orange; padding: 0; }
-   div { margin: 1em 0; }
-   .a { background: yellow; }
-   .b { background: lime; }
-   .c { background: aqua; }
-   .d { background: blue; }
-   .red { background: red; }
-  </style>
-    <script>
-if (window.internals)
-    window.internals.settings.setNewBlockInsideInlineModelEnabled(true)
-</script>
- </head>
- <body>
-  <p>The following two columns should be pixel perfect identical with no red visible.</p>
-  <table>
-   <tr>
-    <td class="test">
-     <span><div class="d">
-      <span><div class="red"><span><div class="red"><span><div class="a">A</div></span></div><span><div class="red"></div></span></div></span>
-      <span><div class="red"></div></span>
-      <span><div class="red"><span><div class="red"></div></span></div></span>
-      <span><div class="red"><span><div class="b"><span><div class="red"></div></span>B</div></span></div></span>
-      <span><div class="c">C</div></span>
-     </div></span>
-    </td>
-    <td class="control">
-     <div class="d">
-      <div class="a">A</div>
-      <div class="b">B</div>
-      <div class="c">C</div>
-     </div>
-    </td>
-   </tr>
-  </table>
-  <p>This test is meaningless if you don't pass <a href="006.html#">test 006</a>.</p>
- </body>
-</html>
diff --git a/LayoutTests/fast/block/inside-inlines/new-model/margin-collapse/002-expected.html b/LayoutTests/fast/block/inside-inlines/new-model/margin-collapse/002-expected.html
deleted file mode 100644 (file)
index 2d84e07..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
-<html lang="en">
- <head>
-  <title>Margin Collapsing: absolutely positioned (block-inside-inline version)</title>
-  <style type="text/css">
-   div.test { background: green; position: absolute; }
-   div.test div { background: red; margin: 5em 2.5em; }
-   div.control { height: 5em; width: 5em; background: red; position: absolute; }
-  </style>
- </head>
- <body>
-  <p>This page should have one square green block and no red.</p>
-  <div class="control"></div>
-  <div class="test"><span><div></div></span></div>
- </body>
-</html>
diff --git a/LayoutTests/fast/block/inside-inlines/new-model/margin-collapse/002.html b/LayoutTests/fast/block/inside-inlines/new-model/margin-collapse/002.html
deleted file mode 100644 (file)
index 96f8eee..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
-<html lang="en">
- <head>
-  <title>Margin Collapsing: absolutely positioned (block-inside-inline version)</title>
-  <style type="text/css">
-   div.test { background: green; position: absolute; }
-   div.test div { background: red; margin: 5em 2.5em; }
-   div.control { height: 5em; width: 5em; background: red; position: absolute; }
-  </style>
-    <script>
-if (window.internals)
-    window.internals.settings.setNewBlockInsideInlineModelEnabled(true)
-</script>
- </head>
- <body>
-  <p>This page should have one square green block and no red.</p>
-  <div class="control"></div>
-  <div class="test"><span><div></div></span></div>
- </body>
-</html>
diff --git a/LayoutTests/fast/block/inside-inlines/new-model/margin-collapse/003-expected.html b/LayoutTests/fast/block/inside-inlines/new-model/margin-collapse/003-expected.html
deleted file mode 100644 (file)
index 25dc8a0..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
-<html lang="en">
- <head>
-  <title>Margin Collapsing: fixed positioned (block-inside-inline version)</title>
-  <style type="text/css">
-   div.test { background: green; position: fixed; top: 4em; }
-   div.test div { background: red; margin: 5em 2.5em; }
-   div.control { height: 5em; width: 5em; background: red; position: fixed; top: 4em; }
-  </style>
- </head>
- <body>
-  <p>This page should have one square green block and no red.</p>
-  <div class="control"></div>
-  <div class="test"><span>
-   <div></div>
-  </span>   
-  </div>
- </body>
-</html>
diff --git a/LayoutTests/fast/block/inside-inlines/new-model/margin-collapse/003.html b/LayoutTests/fast/block/inside-inlines/new-model/margin-collapse/003.html
deleted file mode 100644 (file)
index 216a83b..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
-<html lang="en">
- <head>
-  <title>Margin Collapsing: fixed positioned (block-inside-inline version)</title>
-  <style type="text/css">
-   div.test { background: green; position: fixed; top: 4em; }
-   div.test div { background: red; margin: 5em 2.5em; }
-   div.control { height: 5em; width: 5em; background: red; position: fixed; top: 4em; }
-  </style>
-    <script>
-if (window.internals)
-    window.internals.settings.setNewBlockInsideInlineModelEnabled(true)
-</script>
- </head>
- <body>
-  <p>This page should have one square green block and no red.</p>
-  <div class="control"></div>
-  <div class="test"><span>
-   <div></div>
-  </span>   
-  </div>
- </body>
-</html>
diff --git a/LayoutTests/fast/block/inside-inlines/new-model/margin-collapse/004-expected.html b/LayoutTests/fast/block/inside-inlines/new-model/margin-collapse/004-expected.html
deleted file mode 100644 (file)
index 6abfd65..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
-<html lang="en">
- <head>
-  <title>Margin Collapsing: floats (block-inside-inline version)</title>
-  <style type="text/css">
-   div.test { background: green; float: left; }
-   div.test div { background: red; margin: 5em 2.5em; }
-   div.control { height: 5em; width: 5em; margin: 0 0 -5em 0; background: red; }
-  </style>
- </head>
- <body>
-  <p>This page should have one square green block and no red.</p>
-  <div class="control"></div>
-  <div class="test">
-   <span><div></div></span>
-  </div>
- </body>
-</html>
diff --git a/LayoutTests/fast/block/inside-inlines/new-model/margin-collapse/004.html b/LayoutTests/fast/block/inside-inlines/new-model/margin-collapse/004.html
deleted file mode 100644 (file)
index 071b555..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
-<html lang="en">
- <head>
-  <title>Margin Collapsing: floats (block-inside-inline version)</title>
-  <style type="text/css">
-   div.test { background: green; float: left; }
-   div.test div { background: red; margin: 5em 2.5em; }
-   div.control { height: 5em; width: 5em; margin: 0 0 -5em 0; background: red; }
-  </style>
-  <script>
-if (window.internals)
-    window.internals.settings.setNewBlockInsideInlineModelEnabled(true)
-</script>
- </head>
- <body>
-  <p>This page should have one square green block and no red.</p>
-  <div class="control"></div>
-  <div class="test">
-   <span><div></div></span>
-  </div>
- </body>
-</html>
diff --git a/LayoutTests/fast/block/inside-inlines/new-model/margins-pushing-below-float-expected.html b/LayoutTests/fast/block/inside-inlines/new-model/margins-pushing-below-float-expected.html
deleted file mode 100644 (file)
index 578afb6..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-<!doctype html>
-<head>
-<style>
-.float { float:left; height:100px; width:100px; background-color:green }
-.half { display:inline-block; width:50px; background-color:lime; height:50px }
-.bordered { width:150px; border:2px solid black; }
-.margins { height:50px; margin-bottom:50px }
-</style>
-<body>
-
-<div class="bordered">
-<div class="float"></div>
-<div class="margins"></div><div class="half"></div><div class="half"></div>
-</div>
diff --git a/LayoutTests/fast/block/inside-inlines/new-model/margins-pushing-below-float.html b/LayoutTests/fast/block/inside-inlines/new-model/margins-pushing-below-float.html
deleted file mode 100644 (file)
index 495234e..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-<!doctype html>
-<head>
-<style>
-.float { float:left; height:100px; width:100px; background-color:green }
-.half { display:inline-block; width:50px; background-color:lime; height:50px }
-.bordered { width:150px; border:2px solid black; }
-.margins { height:50px; margin-bottom:50px }
-</style>
-<script>
-if (window.internals)
-    window.internals.settings.setNewBlockInsideInlineModelEnabled(true)
-</script>
-<body>
-
-<div class="bordered">
-<div class="float"></div>
-<span><div class="margins"></div></span><div class="half"></div><div class="half"></div>
-</div>
diff --git a/LayoutTests/fast/block/inside-inlines/new-model/paint-order-expected.html b/LayoutTests/fast/block/inside-inlines/new-model/paint-order-expected.html
deleted file mode 100644 (file)
index 4b7e6ff..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-<!doctype html>
-<head>
-<style>
-.box { padding:3px; margin:3px }
-.nowrap { white-space: nowrap; }
-.float { float: left; }
-.box div { height:40px; border:2px solid black }
-.float { width:100px; height:100px; background-color:yellow }
-.shift { margin-top:-48px; height:40px; background-color:orange; margin-right:8px }
-</style>
-<body>
-
-<div class="float"></div>
-
-<div class="box"><div>This line of text should avoid the float and paint on top of the orange background.  The black border should paint behind the float.</div></div>
-<div class="shift"></div>
\ No newline at end of file
diff --git a/LayoutTests/fast/block/inside-inlines/new-model/paint-order.html b/LayoutTests/fast/block/inside-inlines/new-model/paint-order.html
deleted file mode 100644 (file)
index d20ea6a..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-<!doctype html>
-<head>
-<style>
-.box { padding:3px; margin:3px }
-.nowrap { white-space: nowrap; }
-.float { float: left; }
-.box div { height:40px; border:2px solid black; background-color:red }
-.float { width:100px; height:100px; background-color:yellow }
-.shift { margin-top:-48px; height:40px; background-color:orange; margin-right:8px }
-</style>
-<script>
-if (window.internals)
-    window.internals.settings.setNewBlockInsideInlineModelEnabled(true)
-</script>
-<body>
-
-<div class="float"></div>
-
-<div class="box"><a><div>This line of text should avoid the float and paint on top of the orange background. The black border should paint behind the float.</div></a></div>
-<div class="shift"></div>
\ No newline at end of file
diff --git a/LayoutTests/fast/block/inside-inlines/new-model/self-collapsing-test-expected.html b/LayoutTests/fast/block/inside-inlines/new-model/self-collapsing-test-expected.html
deleted file mode 100644 (file)
index 66339e3..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-<!doctype html>
-<head>
-<style>
-.margin { margin:20px 0 }
-p { margin:0 }
-span { clear:left; float:left; width:20px; height:20px; background-color:green }
-</style>
-<body>
-The two green floats should be stacked right on top of one another.
-<div>
-<span></span>
-<span></span>
-</div>
\ No newline at end of file
diff --git a/LayoutTests/fast/block/inside-inlines/new-model/self-collapsing-test.html b/LayoutTests/fast/block/inside-inlines/new-model/self-collapsing-test.html
deleted file mode 100644 (file)
index 36541ea..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-<!doctype html>
-<head>
-<style>
-.margin { margin:20px 0 }
-p { margin:0 }
-span { float:left; width:20px; height:20px; background-color:green }
-</style>
-<script>
-if (window.internals)
-    window.internals.settings.setNewBlockInsideInlineModelEnabled(true)
-</script>
-<body>
-The two green floats should be stacked right on top of one another.
-<p><span></span></p>
-<div class="margin">
-<i>
-<div></div>
-</i>
-</div>
-<p><span></span></p>
\ No newline at end of file
index cfc4daf..5d88a6d 100644 (file)
@@ -5,10 +5,6 @@
 .box div { height:40px; border:2px solid black; background-color:orange }
 a { opacity:0.5 }
 </style>
-<script>
-if (window.internals)
-    window.internals.settings.setNewBlockInsideInlineModelEnabled(true)
-</script>
 <body>
 
 <div class="box"><a><div>This block should be partially transparent.</div></a></div>
index e58cafa..6170da5 100644 (file)
@@ -1418,7 +1418,6 @@ compositing/scrolling/touch-scrolling-repaint.html [ ImageOnlyFailure Pass ]
 compositing/tiling/offscreen-tiled-layer.html [ Pass Failure ]
 compositing/visible-rect/backing-change-height-from-zero.html [ Pass Failure ]
 css3/calc/transforms-translate.html [ ImageOnlyFailure Pass ]
-fast/block/inside-inlines/new-model/margin-collapse/003.html [ ImageOnlyFailure Pass ]
 fast/css-generated-content/after-with-inline-continuation.html [ ImageOnlyFailure Pass ]
 fast/css/cascade/background-clip-and-webkit-background-clip-cascade-order.html [ ImageOnlyFailure Pass ]
 fast/css3-text/font-synthesis.html [ ImageOnlyFailure Pass ]
index 46fe88f..5254728 100644 (file)
@@ -1,3 +1,70 @@
+2017-08-31  Antti Koivisto  <antti@apple.com>
+
+        Remove newBlockInsideInlineModel and anonymous inline block
+        https://bugs.webkit.org/show_bug.cgi?id=176181
+
+        Reviewed by Zalan Bujtas.
+
+        Anonymous inline block exists to support newBlockInsideInlineModel which was planned as the replacement for continuations.
+        It has never been enabled and it is time to remove it.
+
+        * page/Settings.in:
+        * rendering/InlineElementBox.cpp:
+        (WebCore::InlineElementBox::paint):
+        (WebCore::InlineElementBox::nodeAtPoint):
+        * rendering/InlineFlowBox.cpp:
+        (WebCore::InlineFlowBox::addToLine):
+        (WebCore::InlineFlowBox::placeBoxesInBlockDirection):
+        (WebCore::InlineFlowBox::nodeAtPoint):
+        (WebCore::InlineFlowBox::paint):
+        (WebCore::InlineFlowBox::anonymousInlineBlock const): Deleted.
+        * rendering/InlineFlowBox.h:
+        (WebCore::InlineFlowBox::InlineFlowBox):
+        (WebCore::InlineFlowBox::hasAnonymousInlineBlock const): Deleted.
+        (WebCore::InlineFlowBox::setHasAnonymousInlineBlock): Deleted.
+        * rendering/RenderBlock.cpp:
+        (WebCore::RenderBlock::lineHeight const):
+        (WebCore::RenderBlock::baselinePosition const):
+        (WebCore::RenderBlock::renderName const):
+        * rendering/RenderBlockFlow.cpp:
+        (WebCore::RenderBlockFlow::rebuildFloatingObjectSetFromIntrudingFloats):
+        (WebCore::RenderBlockFlow::childrenPreventSelfCollapsing const):
+        (WebCore::RenderBlockFlow::adjustLinePositionForPagination):
+        (WebCore::RenderBlockFlow::computeInlinePreferredLogicalWidths const):
+        * rendering/RenderBlockFlow.h:
+        * rendering/RenderBlockLineLayout.cpp:
+        (WebCore::updateLogicalInlinePositions):
+        (WebCore::RenderBlockFlow::computeInlineDirectionPositionsForLine):
+        (WebCore::RenderBlockFlow::layoutRunsAndFloats):
+        (WebCore::RenderBlockFlow::layoutRunsAndFloatsInRange):
+        (WebCore::RenderBlockFlow::layoutLineBoxes):
+        (WebCore::RenderBlockFlow::determineStartPosition):
+        (WebCore::RenderBlockFlow::matchedEndLine):
+        (WebCore::RenderBlockFlow::marginCollapseLinesFromStart): Deleted.
+        * rendering/RenderBox.cpp:
+        (WebCore::RenderBox::sizesLogicalWidthToFitContent const):
+        (WebCore::RenderBox::createsNewFormattingContext const):
+        (WebCore::RenderBox::avoidsFloats const):
+        * rendering/RenderInline.cpp:
+        (WebCore::RenderInline::addChildIgnoringContinuation):
+        * rendering/RenderObject.cpp:
+        (WebCore::RenderObject::isAnonymousInlineBlock const): Deleted.
+        * rendering/RenderObject.h:
+        (WebCore::RenderObject::isAnonymousBlock const):
+        * rendering/RootInlineBox.cpp:
+        (WebCore::RootInlineBox::alignBoxesInBlockDirection):
+        (WebCore::RootInlineBox::ascentAndDescentForBox const):
+        * rendering/line/BreakingContext.h:
+        (WebCore::BreakingContext::BreakingContext):
+        (WebCore::BreakingContext::handleReplaced):
+        * rendering/line/LineBreaker.cpp:
+        (WebCore::LineBreaker::nextLineBreak):
+        * rendering/line/LineBreaker.h:
+        * rendering/line/LineLayoutState.h:
+        (WebCore::LineLayoutState::marginInfo):
+        (WebCore::LineLayoutState::prevFloatBottomFromAnonymousInlineBlock): Deleted.
+        (WebCore::LineLayoutState::maxFloatBottomFromAnonymousInlineBlock): Deleted.
+
 2017-08-31  Ryan Haddad  <ryanhaddad@apple.com>
 
         Unreviewed, rolling out r221445.
index 9c35418..a8cfa9f 100644 (file)
@@ -244,8 +244,6 @@ appleMailPaginationQuirkEnabled initial=false
 
 attachmentElementEnabled initial=true, conditional=ATTACHMENT_ELEMENT
 
-newBlockInsideInlineModelEnabled initial=false, setNeedsStyleRecalcInAllFrames=1
-
 deferredCSSParserEnabled initial=false
 
 repaintOutsideLayoutEnabled initial=false
index 680cb6b..14a486f 100644 (file)
@@ -68,19 +68,6 @@ void InlineElementBox::paint(PaintInfo& paintInfo, const LayoutPoint& paintOffse
     if (!paintInfo.shouldPaintWithinRoot(renderer()))
         return;
 
-    if (renderer().isAnonymousInlineBlock()) {
-        // Treat painting of a special inline-block line like the painting of a normal block and go through all phases.
-        PaintPhase newPhase = (paintInfo.phase == PaintPhaseChildOutlines) ? PaintPhaseOutline : paintInfo.phase;
-        newPhase = (newPhase == PaintPhaseChildBlockBackgrounds) ? PaintPhaseChildBlockBackground : newPhase;
-        
-        PaintInfo info(paintInfo);
-        info.phase = newPhase;
-        info.updateSubtreePaintRootForChildren(&renderer());
-        ASSERT(!renderer().hasSelfPaintingLayer());
-        renderer().paint(info, paintOffset);
-        return;
-    }
-
     if (paintInfo.phase != PaintPhaseForeground && paintInfo.phase != PaintPhaseSelection)
         return;
 
@@ -92,17 +79,9 @@ void InlineElementBox::paint(PaintInfo& paintInfo, const LayoutPoint& paintOffse
 }
 
 bool InlineElementBox::nodeAtPoint(const HitTestRequest& request, HitTestResult& result, const HitTestLocation& locationInContainer, const LayoutPoint& accumulatedOffset, LayoutUnit /* lineTop */, LayoutUnit /*lineBottom*/,
-    HitTestAction hitTestAction)
+    HitTestAction)
 {
-    // If we are an anonymous inline block, honor hit test phases.
-    if (renderer().isAnonymousInlineBlock()) {
-        HitTestAction childHitTest = hitTestAction;
-        if (hitTestAction == HitTestChildBlockBackgrounds)
-            childHitTest = HitTestChildBlockBackground;
-        return renderer().nodeAtPoint(request, result, locationInContainer, accumulatedOffset, childHitTest);
-    }
-
-    // Otherwise hit test all phases of replaced elements atomically, as though the replaced element established its
+    // Hit test all phases of replaced elements atomically, as though the replaced element established its
     // own stacking context.  (See Appendix E.2, section 6.4 on inline block/table elements in the CSS2.1
     // specification.)
     LayoutPoint childPoint = accumulatedOffset;
index 2c82375..38a0d40 100644 (file)
@@ -69,17 +69,6 @@ void InlineFlowBox::setHasBadChildList()
 
 #endif
 
-RenderBlockFlow* InlineFlowBox::anonymousInlineBlock() const
-{
-    if (!m_hasAnonymousInlineBlock || !firstChild())
-        return nullptr;
-    if (is<InlineFlowBox>(*firstChild()))
-        return downcast<InlineFlowBox>(*firstChild()).anonymousInlineBlock();
-    if (firstChild()->renderer().isAnonymousInlineBlock())
-        return &downcast<RenderBlockFlow>(firstChild()->renderer());
-    return nullptr;
-}
-
 LayoutUnit InlineFlowBox::getFlowSpacingLogicalWidth()
 {
     LayoutUnit totalWidth = marginBorderPaddingLogicalLeft() + marginBorderPaddingLogicalRight();
@@ -123,12 +112,7 @@ void InlineFlowBox::addToLine(InlineBox* child)
     } else if (is<InlineFlowBox>(*child)) {
         if (downcast<InlineFlowBox>(*child).hasTextDescendants())
             setHasTextDescendantsOnAncestors(this);
-        if (downcast<InlineFlowBox>(*child).hasAnonymousInlineBlock())
-            setHasAnonymousInlineBlock(true);
     }
-    if (child->renderer().isAnonymousInlineBlock())
-        setHasAnonymousInlineBlock(true);
-
     if (descendantsHaveSameLineHeightAndBaseline() && !child->renderer().isOutOfFlowPositioned()) {
         const RenderStyle& parentStyle = lineStyle();
         const RenderStyle& childStyle = child->lineStyle();
@@ -663,11 +647,6 @@ void InlineFlowBox::placeBoxesInBlockDirection(LayoutUnit top, LayoutUnit maxHei
             LayoutUnit posAdjust = maxAscent - child->baselinePosition(baselineType);
             child->setLogicalTop(child->logicalTop() + top + posAdjust);
         }
-        
-        if (child->renderer().isAnonymousInlineBlock()) {
-            const auto& box = downcast<RenderBox>(child->renderer());
-            child->setLogicalTop(box.logicalTop());
-        }
 
         LayoutUnit newLogicalTop = child->logicalTop();
         LayoutUnit newLogicalTopIncludingMargins = newLogicalTop;
@@ -685,7 +664,7 @@ void InlineFlowBox::placeBoxesInBlockDirection(LayoutUnit top, LayoutUnit maxHei
                     : boxObject.borderRight() + boxObject.paddingRight();
             }
             newLogicalTopIncludingMargins = newLogicalTop;
-        } else if (!child->renderer().isBR() && !child->renderer().isAnonymousInlineBlock()) {
+        } else if (!child->renderer().isBR()) {
             const auto& box = downcast<RenderBox>(child->renderer());
             newLogicalTopIncludingMargins = newLogicalTop;
             LayoutUnit overSideMargin = child->isHorizontal() ? box.marginTop() : box.marginRight();
@@ -744,7 +723,7 @@ void InlineFlowBox::placeBoxesInBlockDirection(LayoutUnit top, LayoutUnit maxHei
     }
 
     if (isRootBox) {
-        if (!hasAnonymousInlineBlock() && (strictMode || hasTextChildren() || (descendantsHaveSameLineHeightAndBaseline() && hasTextDescendants()))) {
+        if (strictMode || hasTextChildren() || (descendantsHaveSameLineHeightAndBaseline() && hasTextDescendants())) {
             if (!setLineTop) {
                 setLineTop = true;
                 lineTop = logicalTop();
@@ -1064,8 +1043,7 @@ void InlineFlowBox::setOverflowFromLogicalRects(const LayoutRect& logicalLayoutO
 
 bool InlineFlowBox::nodeAtPoint(const HitTestRequest& request, HitTestResult& result, const HitTestLocation& locationInContainer, const LayoutPoint& accumulatedOffset, LayoutUnit lineTop, LayoutUnit lineBottom, HitTestAction hitTestAction)
 {
-    // As long as we don't have an anonymous inline block on our line, we restrict our hit testing only to the foreground phase.
-    if (!hasAnonymousInlineBlock() && hitTestAction != HitTestForeground)
+    if (hitTestAction != HitTestForeground)
         return false;
 
     LayoutRect overflowRect(visualOverflowRect(lineTop, lineBottom));
@@ -1159,8 +1137,7 @@ bool InlineFlowBox::nodeAtPoint(const HitTestRequest& request, HitTestResult& re
 
 void InlineFlowBox::paint(PaintInfo& paintInfo, const LayoutPoint& paintOffset, LayoutUnit lineTop, LayoutUnit lineBottom)
 {
-    // As long as we don't have an anonymous inline block on our line, we restrict our painting only to a few phases.
-    if (!hasAnonymousInlineBlock() && (paintInfo.phase != PaintPhaseForeground && paintInfo.phase != PaintPhaseSelection && paintInfo.phase != PaintPhaseOutline && paintInfo.phase != PaintPhaseSelfOutline && paintInfo.phase != PaintPhaseChildOutlines && paintInfo.phase != PaintPhaseTextClip && paintInfo.phase != PaintPhaseMask))
+    if (paintInfo.phase != PaintPhaseForeground && paintInfo.phase != PaintPhaseSelection && paintInfo.phase != PaintPhaseOutline && paintInfo.phase != PaintPhaseSelfOutline && paintInfo.phase != PaintPhaseChildOutlines && paintInfo.phase != PaintPhaseTextClip && paintInfo.phase != PaintPhaseMask)
         return;
 
     LayoutRect overflowRect(visualOverflowRect(lineTop, lineBottom));
@@ -1204,14 +1181,11 @@ void InlineFlowBox::paint(PaintInfo& paintInfo, const LayoutPoint& paintOffset,
                 } else if (!inlineFlow.isInlineElementContinuation())
                     paintInfo.outlineObjects->add(&inlineFlow);
             }
-        } else if (paintInfo.phase == PaintPhaseMask) {
-            if (!hasAnonymousInlineBlock())
-                paintMask(paintInfo, paintOffset);
-            return;
-        } else {
+        } else if (paintInfo.phase == PaintPhaseMask)
+            paintMask(paintInfo, paintOffset);
+        else {
             // Paint our background, border and box-shadow.
-            if (!hasAnonymousInlineBlock())
-                paintBoxDecorations(paintInfo, paintOffset);
+            paintBoxDecorations(paintInfo, paintOffset);
         }
     }
 
index 3921915..1257f53 100644 (file)
@@ -52,7 +52,6 @@ public:
         , m_hasAnnotationsBefore(false)
         , m_hasAnnotationsAfter(false)
         , m_isFirstAfterPageBreak(false)
-        , m_hasAnonymousInlineBlock(false)
 #if !ASSERT_WITH_SECURITY_IMPLICATION_DISABLED
         , m_hasBadChildList(false)
 #endif
@@ -211,10 +210,6 @@ public:
     void setHasTextChildren() { m_hasTextChildren = true; setHasTextDescendants(); }
     void setHasTextDescendants() { m_hasTextDescendants = true; }
     
-    bool hasAnonymousInlineBlock() const { return m_hasAnonymousInlineBlock; }
-    void setHasAnonymousInlineBlock(bool b) { m_hasAnonymousInlineBlock = b; }
-    RenderBlockFlow* anonymousInlineBlock() const;
-    
     void checkConsistency() const;
     void setHasBadChildList();
 
@@ -343,7 +338,6 @@ protected:
     unsigned m_lineBreakBidiStatusLast : 5; // UCharDirection
 
     unsigned m_isFirstAfterPageBreak : 1;
-    unsigned m_hasAnonymousInlineBlock : 1;
 
     // End of RootInlineBox-specific members.
 
index e63b146..b12e8ab 100644 (file)
@@ -2934,10 +2934,6 @@ bool RenderBlock::hasLineIfEmpty() const
 
 LayoutUnit RenderBlock::lineHeight(bool firstLine, LineDirectionMode direction, LinePositionMode linePositionMode) const
 {
-    // Anonymous inline blocks don't include margins or any real line height.
-    if (isAnonymousInlineBlock() && linePositionMode == PositionOnContainingLine)
-        return direction == HorizontalLine ? height() : width();
-    
     // Inline blocks are replaced elements. Otherwise, just pass off to
     // the base class.  If we're being queried as though we're the root line
     // box, then the fact that we're an inline-block is irrelevant, and we behave
@@ -2961,9 +2957,6 @@ int RenderBlock::baselinePosition(FontBaseline baselineType, bool firstLine, Lin
     // box, then the fact that we're an inline-block is irrelevant, and we behave
     // just like a block.
     if (isReplaced() && linePositionMode == PositionOnContainingLine) {
-        if (isAnonymousInlineBlock())
-            return direction == HorizontalLine ? height() : width();
-        
         // For "leaf" theme objects, let the theme decide what the baseline position is.
         // FIXME: Might be better to have a custom CSS property instead, so that if the theme
         // is turned off, checkboxes/radios will still have decent baselines.
@@ -3608,8 +3601,6 @@ const char* RenderBlock::renderName() const
         return "RenderBlock (positioned)";
     if (isAnonymousBlock())
         return "RenderBlock (anonymous)";
-    if (isAnonymousInlineBlock())
-        return "RenderBlock (anonymous inline-block)";
     // FIXME: Temporary hack while the new generated content system is being implemented.
     if (isPseudoElement())
         return "RenderBlock (generated)";
index 506bcf0..5a37a17 100644 (file)
@@ -241,17 +241,14 @@ void RenderBlockFlow::rebuildFloatingObjectSetFromIntrudingFloats()
     // We should not process floats if the parent node is not a RenderBlock. Otherwise, we will add 
     // floats in an invalid context. This will cause a crash arising from a bad cast on the parent.
     // See <rdar://problem/8049753>, where float property is applied on a text node in a SVG.
-    bool isBlockInsideInline = isAnonymousInlineBlock();
-    if (!is<RenderBlockFlow>(parent()) && !isBlockInsideInline)
+    if (!is<RenderBlockFlow>(parent()))
         return;
 
     // First add in floats from the parent. Self-collapsing blocks let their parent track any floats that intrude into
     // them (as opposed to floats they contain themselves) so check for those here too.
-    RenderBlockFlow& parentBlock = downcast<RenderBlockFlow>(isBlockInsideInline ? *containingBlock() : *parent());
-    bool parentHasFloats = isBlockInsideInline ? parentBlock.containsFloats() : false;
-    RenderBlockFlow* previousBlock = nullptr;
-    if (!isBlockInsideInline)
-        previousBlock = previousSiblingWithOverhangingFloats(parentHasFloats);
+    auto& parentBlock = downcast<RenderBlockFlow>(*parent());
+    bool parentHasFloats = false;
+    RenderBlockFlow* previousBlock = previousSiblingWithOverhangingFloats(parentHasFloats);
     LayoutUnit logicalTopOffset = logicalTop();
     if (parentHasFloats || (parentBlock.lowestFloatLogicalBottom() > logicalTopOffset && previousBlock && previousBlock->isSelfCollapsingBlock()))
         addIntrudingFloats(&parentBlock, &parentBlock, parentBlock.logicalLeftOffsetForContent(), logicalTopOffset);
@@ -995,20 +992,7 @@ bool RenderBlockFlow::childrenPreventSelfCollapsing() const
     if (!childrenInline())
         return RenderBlock::childrenPreventSelfCollapsing();
 
-    // If the block has inline children, see if we generated any line boxes. If we have any
-    // line boxes, then we can only be self-collapsing if we have nothing but anonymous inline blocks
-    // that are also self-collapsing inside us.
-    if (!hasLines())
-        return false;
-    
-    if (simpleLineLayout())
-        return true; // We have simple line layout lines, so we can't be self-collapsing.
-    
-    for (auto* child = firstRootBox(); child; child = child->nextRootBox()) {
-        if (!child->hasAnonymousInlineBlock() || !child->anonymousInlineBlock()->isSelfCollapsingBlock())
-            return true;
-    }
-    return false; // We have no line boxes, so we must be self-collapsing.
+    return hasLines();
 }
 
 LayoutUnit RenderBlockFlow::collapseMargins(RenderBox& child, MarginInfo& marginInfo)
@@ -1704,8 +1688,6 @@ static void clearShouldBreakAtLineToAvoidWidowIfNeeded(RenderBlockFlow& blockFlo
 
 void RenderBlockFlow::adjustLinePositionForPagination(RootInlineBox* lineBox, LayoutUnit& delta, bool& overflowsRegion, RenderFlowThread* flowThread)
 {
-    // FIXME: Ignore anonymous inline blocks. Handle the delta already having been set because of
-    // collapsing margins from a previous anonymous inline block.
     // FIXME: For now we paginate using line overflow. This ensures that lines don't overlap at all when we
     // put a strut between them for pagination purposes. However, this really isn't the desired rendering, since
     // the line on the top of the next page will appear too far down relative to the same kind of line at the top
@@ -4223,8 +4205,6 @@ void RenderBlockFlow::computeInlinePreferredLogicalWidths(LayoutUnit& minLogical
     while (RenderObject* child = childIterator.next()) {
         bool autoWrap = child->isReplaced() ? child->parent()->style().autoWrap() :
             child->style().autoWrap();
-        bool isAnonymousInlineBlock = child->isAnonymousInlineBlock();
-        
         if (!child->isBR()) {
             // Step One: determine whether or not we need to terminate our current line.
             // Each discrete chunk can become the new min-width, if it is the widest chunk
@@ -4315,21 +4295,19 @@ void RenderBlockFlow::computeInlinePreferredLogicalWidths(LayoutUnit& minLogical
                     clearPreviousFloat = false;
 
                 bool canBreakReplacedElement = !child->isImage() || allowImagesToBreak;
-                if (((canBreakReplacedElement && (autoWrap || oldAutoWrap) && (!isPrevChildInlineFlow || shouldBreakLineAfterText)) || clearPreviousFloat) || isAnonymousInlineBlock) {
-                    if (child->isAnonymousInlineBlock() && styleToUse.collapseWhiteSpace())
-                        stripTrailingSpace(inlineMax, inlineMin, trailingSpaceChild);
+                if (((canBreakReplacedElement && (autoWrap || oldAutoWrap) && (!isPrevChildInlineFlow || shouldBreakLineAfterText)) || clearPreviousFloat)) {
                     minLogicalWidth = preferredWidth(minLogicalWidth, inlineMin);
                     inlineMin = 0;
                 }
 
                 // If we're supposed to clear the previous float, then terminate maxwidth as well.
-                if (clearPreviousFloat || isAnonymousInlineBlock) {
+                if (clearPreviousFloat) {
                     maxLogicalWidth = preferredWidth(maxLogicalWidth, inlineMax);
                     inlineMax = 0;
                 }
 
                 // Add in text-indent. This is added in only once.
-                if (!addedTextIndent && !child->isFloating() && !isAnonymousInlineBlock) {
+                if (!addedTextIndent && !child->isFloating()) {
                     LayoutUnit ceiledIndent = textIndent.ceilToFloat();
                     childMin += ceiledIndent;
                     childMax += ceiledIndent;
@@ -4340,13 +4318,13 @@ void RenderBlockFlow::computeInlinePreferredLogicalWidths(LayoutUnit& minLogical
                         addedTextIndent = true;
                 }
                 
-                if (canHangPunctuationAtStart && !addedStartPunctuationHang && !child->isFloating() && !isAnonymousInlineBlock)
+                if (canHangPunctuationAtStart && !addedStartPunctuationHang && !child->isFloating())
                     addedStartPunctuationHang = true;
 
                 // Add our width to the max.
                 inlineMax += std::max<float>(0, childMax);
 
-                if ((!autoWrap || !canBreakReplacedElement || (isPrevChildInlineFlow && !shouldBreakLineAfterText)) && !isAnonymousInlineBlock) {
+                if ((!autoWrap || !canBreakReplacedElement || (isPrevChildInlineFlow && !shouldBreakLineAfterText))) {
                     if (child->isFloating())
                         minLogicalWidth = preferredWidth(minLogicalWidth, childMin);
                     else
@@ -4356,13 +4334,7 @@ void RenderBlockFlow::computeInlinePreferredLogicalWidths(LayoutUnit& minLogical
                     minLogicalWidth = preferredWidth(minLogicalWidth, childMin);
 
                     // Now start a new line.
-                    inlineMin = 0;
-                    
-                    if (child->isAnonymousInlineBlock()) {
-                        // Terminate max width as well.
-                        maxLogicalWidth = preferredWidth(maxLogicalWidth, childMax);
-                        inlineMax = 0;
-                    }
+                    inlineMin = 0;                    
                 }
 
                 if (autoWrap && canBreakReplacedElement && isPrevChildInlineFlow) {
@@ -4488,8 +4460,8 @@ void RenderBlockFlow::computeInlinePreferredLogicalWidths(LayoutUnit& minLogical
                     inlineMax += std::max<float>(0, childMax);
             }
 
-            // Ignore spaces after a list marker and also after an anonymous inline block.
-            if (child->isListMarker() || isAnonymousInlineBlock)
+            // Ignore spaces after a list marker.
+            if (child->isListMarker())
                 stripFrontSpaces = true;
         } else {
             minLogicalWidth = preferredWidth(minLogicalWidth, inlineMin);
index 1f20f4f..686005a 100644 (file)
@@ -592,7 +592,6 @@ private:
     // line, i.e., that it can't be re-used.
     bool lineWidthForPaginatedLineChanged(RootInlineBox*, LayoutUnit lineDelta, RenderFlowThread*) const;
     void updateLogicalWidthForAlignment(const ETextAlign&, const RootInlineBox*, BidiRun* trailingSpaceRun, float& logicalLeft, float& totalLogicalWidth, float& availableLogicalWidth, int expansionOpportunityCount);
-    void marginCollapseLinesFromStart(LineLayoutState&, RootInlineBox* stopLine);
 // END METHODS DEFINED IN RenderBlockLineLayout
 
     bool namedFlowFragmentNeedsUpdate() const;
index ac7cfbe..bfdddbb 100644 (file)
@@ -669,16 +669,11 @@ void RenderBlockFlow::updateLogicalWidthForAlignment(const ETextAlign& textAlign
 }
 
 static void updateLogicalInlinePositions(RenderBlockFlow& block, float& lineLogicalLeft, float& lineLogicalRight, float& availableLogicalWidth, bool firstLine,
-    IndentTextOrNot shouldIndentText, LayoutUnit boxLogicalHeight, RootInlineBox* rootBox)
+    IndentTextOrNot shouldIndentText, LayoutUnit boxLogicalHeight)
 {
     LayoutUnit lineLogicalHeight = block.minLineHeightForReplacedRenderer(firstLine, boxLogicalHeight);
-    if (rootBox->hasAnonymousInlineBlock()) {
-        lineLogicalLeft = block.logicalLeftOffsetForContent(block.logicalHeight());
-        lineLogicalRight = block.logicalRightOffsetForContent(block.logicalHeight());
-    } else {
-        lineLogicalLeft = block.logicalLeftOffsetForLine(block.logicalHeight(), shouldIndentText, lineLogicalHeight);
-        lineLogicalRight = block.logicalRightOffsetForLine(block.logicalHeight(), shouldIndentText, lineLogicalHeight);
-    }
+    lineLogicalLeft = block.logicalLeftOffsetForLine(block.logicalHeight(), shouldIndentText, lineLogicalHeight);
+    lineLogicalRight = block.logicalRightOffsetForLine(block.logicalHeight(), shouldIndentText, lineLogicalHeight);
     availableLogicalWidth = lineLogicalRight - lineLogicalLeft;
 }
 
@@ -696,12 +691,12 @@ void RenderBlockFlow::computeInlineDirectionPositionsForLine(RootInlineBox* line
     float lineLogicalLeft;
     float lineLogicalRight;
     float availableLogicalWidth;
-    updateLogicalInlinePositions(*this, lineLogicalLeft, lineLogicalRight, availableLogicalWidth, isFirstLine, shouldIndentText, 0, lineBox);
+    updateLogicalInlinePositions(*this, lineLogicalLeft, lineLogicalRight, availableLogicalWidth, isFirstLine, shouldIndentText, 0);
     bool needsWordSpacing;
 
     if (firstRun && firstRun->renderer().isReplaced()) {
         RenderBox& renderBox = downcast<RenderBox>(firstRun->renderer());
-        updateLogicalInlinePositions(*this, lineLogicalLeft, lineLogicalRight, availableLogicalWidth, isFirstLine, shouldIndentText, renderBox.logicalHeight(), lineBox);
+        updateLogicalInlinePositions(*this, lineLogicalLeft, lineLogicalRight, availableLogicalWidth, isFirstLine, shouldIndentText, renderBox.logicalHeight());
     }
 
     computeInlineDirectionPositionsForSegment(lineBox, lineInfo, textAlign, lineLogicalLeft, availableLogicalWidth, firstRun, trailingSpaceRun, textBoxDataMap, verticalPositionCache, wordMeasurements);
@@ -1267,9 +1262,6 @@ void RenderBlockFlow::layoutRunsAndFloats(LineLayoutState& layoutState, bool has
     InlineBidiResolver resolver;
     RootInlineBox* startLine = determineStartPosition(layoutState, resolver);
     
-    if (startLine)
-        marginCollapseLinesFromStart(layoutState, startLine);
-
     unsigned consecutiveHyphenatedLines = 0;
     if (startLine) {
         for (RootInlineBox* line = startLine->prevRootBox(); line && line->isHyphenated(); line = line->prevRootBox())
@@ -1369,7 +1361,7 @@ void RenderBlockFlow::layoutRunsAndFloatsInRange(LineLayoutState& layoutState, I
         FloatingObject* lastFloatFromPreviousLine = (containsFloats()) ? m_floatingObjects->set().last().get() : nullptr;
 
         WordMeasurements wordMeasurements;
-        end = lineBreaker.nextLineBreak(resolver, layoutState.lineInfo(), layoutState, renderTextInfo, lastFloatFromPreviousLine, consecutiveHyphenatedLines, wordMeasurements);
+        end = lineBreaker.nextLineBreak(resolver, layoutState.lineInfo(), renderTextInfo, lastFloatFromPreviousLine, consecutiveHyphenatedLines, wordMeasurements);
         cachePriorCharactersIfNeeded(renderTextInfo.lineBreakIterator);
         renderTextInfo.lineBreakIterator.resetPriorContext();
         if (resolver.position().atEnd()) {
@@ -1427,21 +1419,7 @@ void RenderBlockFlow::layoutRunsAndFloatsInRange(LineLayoutState& layoutState, I
                 LayoutUnit adjustment = 0;
                 bool overflowsRegion = false;
                 
-                // If our previous line was an anonymous block and we are not an anonymous block,
-                // simulate a margin collapse now so that we get the proper
-                // increased height. We also have to simulate a margin collapse to propagate margins
-                // through to the top of our block.
-                if (!lineBox->hasAnonymousInlineBlock()) {
-                    RootInlineBox* prevRoot = lineBox->prevRootBox();
-                    if (prevRoot && prevRoot->hasAnonymousInlineBlock()) {
-                        LayoutUnit currentLogicalHeight = logicalHeight();
-                        setLogicalHeight(oldLogicalHeight);
-                        collapseMarginsWithChildInfo(nullptr, nullptr, layoutState.marginInfo());
-                        adjustment = logicalHeight() - oldLogicalHeight;
-                        setLogicalHeight(currentLogicalHeight);
-                    }
-                    layoutState.marginInfo().setAtBeforeSideOfBlock(false);
-                }
+                layoutState.marginInfo().setAtBeforeSideOfBlock(false);
 
                 if (paginated)
                     adjustLinePositionForPagination(lineBox, adjustment, overflowsRegion, layoutState.flowThread());
@@ -1735,12 +1713,10 @@ void RenderBlockFlow::layoutLineBoxes(bool relayoutChildren, LayoutUnit& repaint
                         setMarginEndForChild(box, 0);
                     }
                     box.dirtyLineBoxes(isFullLayout);
-                    if (!o.isAnonymousInlineBlock()) {
-                        if (isFullLayout)
-                            replacedChildren.append(&box);
-                        else
-                            box.layoutIfNeeded();
-                    }
+                    if (isFullLayout)
+                        replacedChildren.append(&box);
+                    else
+                        box.layoutIfNeeded();
                 }
             } else if (o.isTextOrLineBreak() || (is<RenderInline>(o) && !walker.atEndOfInline())) {
                 if (is<RenderInline>(o))
@@ -1771,12 +1747,8 @@ void RenderBlockFlow::layoutLineBoxes(bool relayoutChildren, LayoutUnit& repaint
     // determining the correct collapsed bottom margin information. This collapse is only necessary
     // if our last child was an anonymous inline block that might need to propagate margin information out to
     // us.
-    LayoutUnit beforeEdge = borderAndPaddingBefore();
     LayoutUnit afterEdge = borderAndPaddingAfter() + scrollbarLogicalHeight() + lastLineAnnotationsAdjustment;
-    if (lastRootBox() && lastRootBox()->hasAnonymousInlineBlock())
-        handleAfterSideOfBlock(beforeEdge, afterEdge, layoutState.marginInfo());
-    else
-        setLogicalHeight(logicalHeight() + afterEdge);
+    setLogicalHeight(logicalHeight() + afterEdge);
 
     if (!firstRootBox() && hasLineIfEmpty())
         setLogicalHeight(logicalHeight() + lineHeight(true, isHorizontalWritingMode() ? HorizontalLine : VerticalLine, PositionOfInteriorLineBoxes));
@@ -1884,7 +1856,7 @@ RootInlineBox* RenderBlockFlow::determineStartPosition(LineLayoutState& layoutSt
             // We have a dirty line.
             if (RootInlineBox* prevRootBox = currentLine->prevRootBox()) {
                 // We have a previous line.
-                if (!dirtiedByFloat && !currentLine->hasAnonymousInlineBlock() && (!prevRootBox->endsWithBreak()
+                if (!dirtiedByFloat && (!prevRootBox->endsWithBreak()
                     || !prevRootBox->lineBreakObj()
                     || (is<RenderText>(*prevRootBox->lineBreakObj())
                     && prevRootBox->lineBreakPos() >= downcast<RenderText>(*prevRootBox->lineBreakObj()).textLength()))) {
@@ -2062,7 +2034,7 @@ bool RenderBlockFlow::matchedEndLine(LineLayoutState& layoutState, const InlineB
     RootInlineBox* originalEndLine = layoutState.endLine();
     RootInlineBox* line = originalEndLine;
     for (int i = 0; i < numLines && line; i++, line = line->nextRootBox()) {
-        if (line->lineBreakObj() == resolver.position().renderer() && line->lineBreakPos() == resolver.position().offset() && !line->hasAnonymousInlineBlock()) {
+        if (line->lineBreakObj() == resolver.position().renderer() && line->lineBreakPos() == resolver.position().offset()) {
             // We have a match.
             if (line->lineBreakBidiStatus() != resolver.status())
                 return false; // ...but the bidi state doesn't match.
@@ -2309,46 +2281,4 @@ void RenderBlockFlow::updateRegionForLine(RootInlineBox* lineBox) const
         lineBox->setIsFirstAfterPageBreak(true);
 }
 
-void RenderBlockFlow::marginCollapseLinesFromStart(LineLayoutState& layoutState, RootInlineBox* stopLine)
-{
-    // We have to handle an anonymous inline block streak at the start of the block in order to make sure our own margins are
-    // correct. We only have to do this if the children can propagate margins out to us.
-    bool resetLogicalHeight = false;
-    if (layoutState.marginInfo().canCollapseWithMarginBefore()) {
-        RootInlineBox* startLine = firstRootBox();
-        RootInlineBox* curr;
-        for (curr = startLine; curr && curr->hasAnonymousInlineBlock() && layoutState.marginInfo().canCollapseWithMarginBefore(); curr = curr->nextRootBox()) {
-            if (curr == stopLine)
-                return;
-            if (!resetLogicalHeight) {
-                setLogicalHeight(borderAndPaddingBefore());
-                resetLogicalHeight = true;
-            }
-            layoutBlockChild(*curr->anonymousInlineBlock(), layoutState.marginInfo(),
-                layoutState.prevFloatBottomFromAnonymousInlineBlock(), layoutState.maxFloatBottomFromAnonymousInlineBlock());
-        }
-    }
-    
-    // Now that we've handled the top of the block, if the stopLine isn't an anonymous block, then we're done.
-    if (!stopLine->hasAnonymousInlineBlock())
-        return;
-
-    // We already handled top of block with startLine.
-    if (stopLine == firstRootBox())
-        return;
-
-    // Re-run margin collapsing on the block sequence that stopLine is a part of.
-    // First go backwards to get the entire sequence.
-    RootInlineBox* prev = stopLine;
-    for ( ; prev->hasAnonymousInlineBlock(); prev = prev->prevRootBox()) {
-    };
-
-    // Update the block height to the correct state.
-    setLogicalHeight(prev->lineBottomWithLeading());
-    
-    // Now run margin collapsing on those lines.
-    for (prev = prev->nextRootBox(); prev != stopLine; prev = prev->nextRootBox())
-        layoutBlockChild(*prev->anonymousInlineBlock(), layoutState.marginInfo(), layoutState.prevFloatBottomFromAnonymousInlineBlock(), layoutState.maxFloatBottomFromAnonymousInlineBlock());
-}
-
 }
index d8b8429..8272aee 100644 (file)
@@ -2561,10 +2561,6 @@ bool RenderBox::hasStretchedLogicalWidth() const
 
 bool RenderBox::sizesLogicalWidthToFitContent(SizeType widthType) const
 {
-    // Anonymous inline blocks always fill the width of their containing block.
-    if (isAnonymousInlineBlock())
-        return false;
-
     // Marquees in WinIE are like a mixture of blocks and inline-blocks.  They size as though they're blocks,
     // but they allow text to sit on the same line as the marquee.
     if (isFloating() || (isInlineBlockOrInlineTable() && !isHTMLMarquee()))
@@ -4582,14 +4578,14 @@ bool RenderBox::shrinkToAvoidFloats() const
 
 bool RenderBox::createsNewFormattingContext() const
 {
-    return (isInlineBlockOrInlineTable() && !isAnonymousInlineBlock()) || isFloatingOrOutOfFlowPositioned() || hasOverflowClip() || isFlexItemIncludingDeprecated()
+    return isInlineBlockOrInlineTable() || isFloatingOrOutOfFlowPositioned() || hasOverflowClip() || isFlexItemIncludingDeprecated()
         || isTableCell() || isTableCaption() || isFieldset() || isWritingModeRoot() || isDocumentElementRenderer() || isRenderFlowThread() || isRenderRegion()
         || isGridItem() || style().specifiesColumns() || style().columnSpan();
 }
 
 bool RenderBox::avoidsFloats() const
 {
-    return (isReplaced() && !isAnonymousInlineBlock()) || isHR() || isLegend() || isFieldset() || createsNewFormattingContext();
+    return isReplaced() || isHR() || isLegend() || isFieldset() || createsNewFormattingContext();
 }
 
 void RenderBox::addVisualEffectOverflow()
index ad8d345..32a8329 100644 (file)
@@ -326,10 +326,9 @@ void RenderInline::addChildIgnoringContinuation(RenderObject* newChild, RenderOb
     if (!beforeChild && isAfterContent(lastChild()))
         beforeChild = lastChild();
     
-    bool useNewBlockInsideInlineModel = settings().newBlockInsideInlineModelEnabled();
     bool childInline = newChildIsInline(*newChild, *this);
     // This code is for the old block-inside-inline model that uses continuations.
-    if (!useNewBlockInsideInlineModel && !childInline && !newChild->isFloatingOrOutOfFlowPositioned()) {
+    if (!childInline && !newChild->isFloatingOrOutOfFlowPositioned()) {
         // We are placing a block inside an inline. We have to perform a split of this
         // inline into continuations.  This involves creating an anonymous block box to hold
         // |newChild|.  We then make that block box a continuation of this inline.  We take all of
@@ -350,67 +349,7 @@ void RenderInline::addChildIgnoringContinuation(RenderObject* newChild, RenderOb
         return;
     }
     
-    if (!useNewBlockInsideInlineModel) {
-        RenderBoxModelObject::addChild(newChild, beforeChild);
-        newChild->setNeedsLayoutAndPrefWidthsRecalc();
-        return;
-    }
-
-    // This code is for the new block-inside-inline model that uses anonymous inline blocks.
-    // If the requested beforeChild is not one of our children, then this is most likely because
-    // there is an anonymous inline-block box within this object that contains the beforeChild.
-    // Insert the child into the anonymous inline-block box instead of here.
-    // A second possibility is that the beforeChild is an anonymous block inside the anonymous inline block.
-    // This can happen if inlines are inserted in between two of the anonymous inline block's block-level
-    // children after it has been created.
-    if (beforeChild && beforeChild->parent() != this) {
-        ASSERT(beforeChild->parent());
-        ASSERT(beforeChild->parent()->isAnonymousInlineBlock() || beforeChild->parent()->isAnonymousBlock());
-        if (beforeChild->parent()->isAnonymousInlineBlock()) {
-            if (!childInline || (childInline && beforeChild->parent()->firstChild() != beforeChild))
-                beforeChild->parent()->addChild(newChild, beforeChild);
-            else
-                addChild(newChild, beforeChild->parent());
-        } else if (beforeChild->parent()->isAnonymousBlock()) {
-            ASSERT(!beforeChild->parent()->parent() || beforeChild->parent()->parent()->isAnonymousInlineBlock());
-            ASSERT(childInline);
-            if (childInline || (!childInline && beforeChild->parent()->firstChild() != beforeChild))
-                beforeChild->parent()->addChild(newChild, beforeChild);
-            else
-                addChild(newChild, beforeChild->parent());
-        }
-        return;
-    }
-
-    if (!childInline) {
-        // We are placing a block inside an inline. We have to place the block inside an anonymous inline-block.
-        // This inline-block can house a sequence of contiguous block-level children, and they will all sit on the
-        // same "line" together. We try to reuse an existing inline-block if possible.
-        if (beforeChild) {
-            if (beforeChild->previousSibling() && beforeChild->previousSibling()->isAnonymousInlineBlock()) {
-                downcast<RenderBlockFlow>(beforeChild->previousSibling())->addChild(newChild);
-                return;
-            }
-        } else {
-            if (lastChild() && lastChild()->isAnonymousInlineBlock()) {
-                downcast<RenderBlockFlow>(lastChild())->addChild(newChild);
-                return;
-            }
-        }
-        if (!newChild->isFloatingOrOutOfFlowPositioned()) {
-            // There was no suitable existing anonymous inline-block. Create a new one.
-            RenderBlockFlow* anonymousInlineBlock = new RenderBlockFlow(document(), RenderStyle::createAnonymousStyleWithDisplay(style(), INLINE_BLOCK));
-            anonymousInlineBlock->initializeStyle();
-    
-            RenderBoxModelObject::addChild(anonymousInlineBlock, beforeChild);
-            anonymousInlineBlock->addChild(newChild);
-            return;
-        }
-    }
-
     RenderBoxModelObject::addChild(newChild, beforeChild);
-
     newChild->setNeedsLayoutAndPrefWidthsRecalc();
 }
 
index c2dbef9..b311ecc 100644 (file)
@@ -1595,11 +1595,6 @@ bool RenderObject::isComposited() const
     return hasLayer() && downcast<RenderLayerModelObject>(*this).layer()->isComposited();
 }
 
-bool RenderObject::isAnonymousInlineBlock() const
-{
-    return isAnonymous() && style().display() == INLINE_BLOCK && style().styleType() == NOPSEUDO && isRenderBlockFlow() && !isRubyRun() && !isRubyBase() && !isRuby(parent());
-}
-
 bool RenderObject::hitTest(const HitTestRequest& request, HitTestResult& result, const HitTestLocation& locationInContainer, const LayoutPoint& accumulatedOffset, HitTestFilter hitTestFilter)
 {
     bool inside = false;
index 7aaffff..5e7e1e6 100644 (file)
@@ -417,7 +417,6 @@ public:
 #endif
             ;
     }
-    bool isAnonymousInlineBlock() const;
     bool isElementContinuation() const { return node() && node()->renderer() != this; }
     bool isInlineElementContinuation() const { return isElementContinuation() && isInline(); }
     bool isBlockElementContinuation() const { return isElementContinuation() && !isInline(); }
index 37c0ae4..1f14928 100644 (file)
@@ -284,8 +284,8 @@ LayoutUnit RootInlineBox::alignBoxesInBlockDirection(LayoutUnit heightOfBlock, G
     
     maxHeight = std::max<LayoutUnit>(0, maxHeight); // FIXME: Is this really necessary?
 
-    LayoutUnit lineTopWithLeading = !hasAnonymousInlineBlock() ? heightOfBlock : lineTop;
-    LayoutUnit lineBottomWithLeading = !hasAnonymousInlineBlock() ? heightOfBlock + maxHeight : lineBottom;
+    LayoutUnit lineTopWithLeading = heightOfBlock;
+    LayoutUnit lineBottomWithLeading = heightOfBlock + maxHeight;
     setLineTopBottomPositions(lineTop, lineBottom, lineTopWithLeading, lineBottomWithLeading);
     setPaginatedLineWidth(blockFlow().availableLogicalWidthForContent(heightOfBlock));
 
@@ -890,14 +890,6 @@ void RootInlineBox::ascentAndDescentForBox(InlineBox& box, GlyphOverflowAndFallb
     // Replaced boxes will return 0 for the line-height if line-box-contain says they are
     // not to be included.
     if (box.renderer().isReplaced()) {
-        if (hasAnonymousInlineBlock()) {
-            ascent = 0; // Margins exist "outside" the line, since they have to collapse.
-            descent = 0;
-            affectsAscent = true;
-            affectsDescent = true;
-            return;
-        }
-            
         if (lineStyle().lineBoxContain() & LineBoxContainReplaced) {
             ascent = box.baselinePosition(baselineType());
             descent = box.lineHeight() - ascent;
@@ -908,9 +900,6 @@ void RootInlineBox::ascentAndDescentForBox(InlineBox& box, GlyphOverflowAndFallb
         }
         return;
     }
-    
-    if (hasAnonymousInlineBlock())
-        return;
 
     Vector<const Font*>* usedFonts = nullptr;
     GlyphOverflow* glyphOverflow = nullptr;
index 2c365f8..d405bbf 100644 (file)
@@ -93,7 +93,7 @@ private:
 
 class BreakingContext {
 public:
-    BreakingContext(LineBreaker& lineBreaker, InlineBidiResolver& resolver, LineInfo& inLineInfo, LineLayoutState& layoutState, LineWidth& lineWidth, RenderTextInfo& inRenderTextInfo, FloatingObject* inLastFloatFromPreviousLine, bool appliedStartWidth, RenderBlockFlow& block)
+    BreakingContext(LineBreaker& lineBreaker, InlineBidiResolver& resolver, LineInfo& inLineInfo, LineWidth& lineWidth, RenderTextInfo& inRenderTextInfo, FloatingObject* inLastFloatFromPreviousLine, bool appliedStartWidth, RenderBlockFlow& block)
         : m_lineBreaker(lineBreaker)
         , m_resolver(resolver)
         , m_current(resolver.position())
@@ -111,7 +111,6 @@ public:
         , m_renderTextInfo(inRenderTextInfo)
         , m_lastFloatFromPreviousLine(inLastFloatFromPreviousLine)
         , m_width(lineWidth)
-        , m_lineLayoutState(layoutState)
         , m_currWS(NORMAL)
         , m_lastWS(NORMAL)
         , m_preservesNewline(false)
@@ -268,8 +267,6 @@ private:
     FloatingObject* m_lastFloatFromPreviousLine;
 
     LineWidth m_width;
-    
-    LineLayoutState& m_lineLayoutState;
 
     EWhiteSpace m_currWS;
     EWhiteSpace m_lastWS;
@@ -542,24 +539,14 @@ inline void BreakingContext::handleReplaced()
         m_width.updateAvailableWidth(replacedBox.logicalHeight());
 
     // Break on replaced elements if either has normal white-space.
-    if (((m_autoWrap || RenderStyle::autoWrap(m_lastWS)) && (!replacedBox.isImage() || m_allowImagesToBreak)
-        && (!is<RenderRubyRun>(replacedBox) || downcast<RenderRubyRun>(replacedBox).canBreakBefore(m_renderTextInfo.lineBreakIterator))) || replacedBox.isAnonymousInlineBlock()) {
+    if ((m_autoWrap || RenderStyle::autoWrap(m_lastWS)) && (!replacedBox.isImage() || m_allowImagesToBreak)
+        && (!is<RenderRubyRun>(replacedBox) || downcast<RenderRubyRun>(replacedBox).canBreakBefore(m_renderTextInfo.lineBreakIterator))) {
         if (auto* renderer = m_current.renderer())
             commitLineBreakAtCurrentWidth(*renderer);
         else
             commitLineBreakClear();
-        if (m_width.committedWidth() && replacedBox.isAnonymousInlineBlock()) {
-            // Always force a break before an anonymous inline block if there is content on the line
-            // already.
-            m_atEnd = true;
-            return;
-        }
     } else
         m_hangsAtEnd = false;
-    
-    if (replacedBox.isAnonymousInlineBlock())
-        m_block.layoutBlockChild(replacedBox, m_lineLayoutState.marginInfo(),
-            m_lineLayoutState.prevFloatBottomFromAnonymousInlineBlock(), m_lineLayoutState.maxFloatBottomFromAnonymousInlineBlock());
 
     if (m_ignoringSpaces)
         m_lineWhitespaceCollapsingState.stopIgnoringSpaces(InlineIterator(0, &replacedBox, 0));
@@ -591,12 +578,7 @@ inline void BreakingContext::handleReplaced()
     } else {
         // Update prior line break context characters, using U+FFFD (OBJECT REPLACEMENT CHARACTER) for replaced element.
         m_renderTextInfo.lineBreakIterator.updatePriorContext(replacementCharacter);
-    }
-    
-    if (replacedBox.isAnonymousInlineBlock()) {
-        m_atEnd = true;
-        m_lineInfo.setPreviousLineBrokeCleanly(true);
-    }
+    }    
 }
 
 inline float firstPositiveWidth(const WordMeasurements& wordMeasurements)
index af873be..f64cd36 100644 (file)
@@ -77,7 +77,7 @@ void LineBreaker::skipLeadingWhitespace(InlineBidiResolver& resolver, LineInfo&
     resolver.commitExplicitEmbedding();
 }
 
-InlineIterator LineBreaker::nextLineBreak(InlineBidiResolver& resolver, LineInfo& lineInfo, LineLayoutState& layoutState, RenderTextInfo& renderTextInfo, FloatingObject* lastFloatFromPreviousLine, unsigned consecutiveHyphenatedLines, WordMeasurements& wordMeasurements)
+InlineIterator LineBreaker::nextLineBreak(InlineBidiResolver& resolver, LineInfo& lineInfo, RenderTextInfo& renderTextInfo, FloatingObject* lastFloatFromPreviousLine, unsigned consecutiveHyphenatedLines, WordMeasurements& wordMeasurements)
 {
     reset();
 
@@ -92,7 +92,7 @@ InlineIterator LineBreaker::nextLineBreak(InlineBidiResolver& resolver, LineInfo
     if (resolver.position().atEnd())
         return resolver.position();
 
-    BreakingContext context(*this, resolver, lineInfo, layoutState, width, renderTextInfo, lastFloatFromPreviousLine, appliedStartWidth, m_block);
+    BreakingContext context(*this, resolver, lineInfo, width, renderTextInfo, lastFloatFromPreviousLine, appliedStartWidth, m_block);
 
     while (context.currentObject()) {
         context.initializeForCurrentObject();
index 6585877..da8b245 100644 (file)
@@ -51,7 +51,7 @@ public:
         reset();
     }
 
-    InlineIterator nextLineBreak(InlineBidiResolver&, LineInfo&, LineLayoutState&, RenderTextInfo&, FloatingObject* lastFloatFromPreviousLine, unsigned consecutiveHyphenatedLines, WordMeasurements&);
+    InlineIterator nextLineBreak(InlineBidiResolver&, LineInfo&, RenderTextInfo&, FloatingObject* lastFloatFromPreviousLine, unsigned consecutiveHyphenatedLines, WordMeasurements&);
 
     bool lineWasHyphenated() { return m_hyphenated; }
     const Vector<RenderBox*>& positionedObjects() { return m_positionedObjects; }
index 6788218..c650fb3 100644 (file)
@@ -152,8 +152,6 @@ public:
     }
 
     RenderBlockFlow::MarginInfo& marginInfo() { return m_marginInfo; }
-    LayoutUnit& prevFloatBottomFromAnonymousInlineBlock() { return m_prevFloatBottomFromAnonymousInlineBlock; }
-    LayoutUnit& maxFloatBottomFromAnonymousInlineBlock() { return m_maxFloatBottomFromAnonymousInlineBlock; }
 
     FloatList& floatList() { return m_floatList; }
 
@@ -172,8 +170,6 @@ private:
     LayoutUnit& m_repaintLogicalBottom;
 
     RenderBlockFlow::MarginInfo m_marginInfo;
-    LayoutUnit m_prevFloatBottomFromAnonymousInlineBlock;
-    LayoutUnit m_maxFloatBottomFromAnonymousInlineBlock;
 
     bool m_endLineMatched : 1;
     bool m_checkForFloatsFromLastLine : 1;
index 1b92dd6..c6621c7 100644 (file)
     macro(ImageControlsEnabled, imageControlsEnabled, Bool, bool, false, "", "") \
     macro(EnableInheritURIQueryComponent, enableInheritURIQueryComponent, Bool, bool, false, "", "") \
     macro(ServiceControlsEnabled, serviceControlsEnabled, Bool, bool, false, "", "") \
-    macro(NewBlockInsideInlineModelEnabled, newBlockInsideInlineModelEnabled, Bool, bool, false, "", "") \
     macro(DeferredCSSParserEnabled, deferredCSSParserEnabled, Bool, bool, false, "", "") \
     macro(HTTPEquivEnabled, httpEquivEnabled, Bool, bool, true, "", "") \
     macro(MockCaptureDevicesEnabled, mockCaptureDevicesEnabled, Bool, bool, false, "", "") \
index db9cde5..8aba41e 100644 (file)
@@ -1329,14 +1329,15 @@ bool WKPreferencesGetSimpleLineLayoutDebugBordersEnabled(WKPreferencesRef prefer
     return toImpl(preferencesRef)->simpleLineLayoutDebugBordersEnabled();
 }
 
-void WKPreferencesSetNewBlockInsideInlineModelEnabled(WKPreferencesRef preferencesRef, bool flag)
+void WKPreferencesSetNewBlockInsideInlineModelEnabled(WKPreferencesRef, bool)
 {
-    toImpl(preferencesRef)->setNewBlockInsideInlineModelEnabled(flag);
+    // FIXME: Remove Safari call to this.
 }
 
-bool WKPreferencesGetNewBlockInsideInlineModelEnabled(WKPreferencesRef preferencesRef)
+bool WKPreferencesGetNewBlockInsideInlineModelEnabled(WKPreferencesRef)
 {
-    return toImpl(preferencesRef)->newBlockInsideInlineModelEnabled();
+    // FIXME: Remove Safari call for this.
+    return false;
 }
 
 void WKPreferencesSetDeferredCSSParserEnabled(WKPreferencesRef preferencesRef, bool flag)
index a166cde..554484c 100644 (file)
@@ -3254,7 +3254,6 @@ void WebPage::updatePreferences(const WebPreferencesStore& store)
     settings.setSimpleLineLayoutEnabled(store.getBoolValueForKey(WebPreferencesKey::simpleLineLayoutEnabledKey()));
     settings.setSimpleLineLayoutDebugBordersEnabled(store.getBoolValueForKey(WebPreferencesKey::simpleLineLayoutDebugBordersEnabledKey()));
     
-    settings.setNewBlockInsideInlineModelEnabled(store.getBoolValueForKey(WebPreferencesKey::newBlockInsideInlineModelEnabledKey()));
     settings.setDeferredCSSParserEnabled(store.getBoolValueForKey(WebPreferencesKey::deferredCSSParserEnabledKey()));
 
     settings.setSubpixelCSSOMElementMetricsEnabled(store.getBoolValueForKey(WebPreferencesKey::subpixelCSSOMElementMetricsEnabledKey()));