Remove HasOverflowModel.

Change the one callsite to query layout and visual overflow
separately.

Change-Id: Ibeb21ca7c6d244c5eddb183637a38d75380e9a80
Reviewed-on: https://chromium-review.googlesource.com/c/1407348
Reviewed-by: Aleks Totic <atotic@chromium.org>
Commit-Queue: Chris Harrelson <chrishtr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#622220}
diff --git a/third_party/blink/renderer/core/layout/api/line_layout_box.h b/third_party/blink/renderer/core/layout/api/line_layout_box.h
index d288801..4a8fef6 100644
--- a/third_party/blink/renderer/core/layout/api/line_layout_box.h
+++ b/third_party/blink/renderer/core/layout/api/line_layout_box.h
@@ -74,7 +74,8 @@
     ToBox()->Move(width, height);
   }
 
-  bool HasOverflowModel() const { return ToBox()->HasOverflowModel(); }
+  bool HasLayoutOverflow() const { return ToBox()->HasLayoutOverflow(); }
+  bool HasVisualOverflow() const { return ToBox()->HasVisualOverflow(); }
   LayoutRect LogicalVisualOverflowRectForPropagation() const {
     return ToBox()->LogicalVisualOverflowRectForPropagation();
   }
diff --git a/third_party/blink/renderer/core/layout/layout_box.h b/third_party/blink/renderer/core/layout/layout_box.h
index f7b2a79a..9a8c8f7 100644
--- a/third_party/blink/renderer/core/layout/layout_box.h
+++ b/third_party/blink/renderer/core/layout/layout_box.h
@@ -1306,8 +1306,6 @@
       LayoutObject* container) const;
   LayoutRect LayoutOverflowRectForPropagation(LayoutObject* container) const;
 
-  // TODO(chrishtr): delete callsites of this.
-  bool HasOverflowModel() const { return overflow_.get(); }
   bool HasSelfVisualOverflow() const {
     return VisualOverflowIsSet() &&
            !BorderBoxRect().Contains(
diff --git a/third_party/blink/renderer/core/layout/line/inline_box.h b/third_party/blink/renderer/core/layout/line/inline_box.h
index 853def8..9c2f786 100644
--- a/third_party/blink/renderer/core/layout/line/inline_box.h
+++ b/third_party/blink/renderer/core/layout/line/inline_box.h
@@ -362,6 +362,9 @@
   void FlipForWritingMode(LayoutRect&) const;
   LayoutPoint FlipForWritingMode(const LayoutPoint&) const;
 
+  // Returns trus if it is known that this box has no layout or visual
+  // overflow. This is used as a fast-path to skip expensive overflow
+  // recalc.
   bool KnownToHaveNoOverflow() const {
     return bitfields_.KnownToHaveNoOverflow();
   }
diff --git a/third_party/blink/renderer/core/layout/line/inline_flow_box.cc b/third_party/blink/renderer/core/layout/line/inline_flow_box.cc
index db63e72..16a18e7 100644
--- a/third_party/blink/renderer/core/layout/line/inline_flow_box.cc
+++ b/third_party/blink/renderer/core/layout/line/inline_flow_box.cc
@@ -202,7 +202,8 @@
         child->ClearKnownToHaveNoOverflow();
     } else if (child->GetLineLayoutItem().IsAtomicInlineLevel()) {
       LineLayoutBox box = LineLayoutBox(child->GetLineLayoutItem());
-      if (box.HasOverflowModel() || box.HasSelfPaintingLayer())
+      if (box.HasLayoutOverflow() || box.HasVisualOverflow() ||
+          box.HasSelfPaintingLayer())
         child->ClearKnownToHaveNoOverflow();
     } else if (!child->GetLineLayoutItem().IsBR() &&
                (child->GetLineLayoutItem()