Simplify some has-multiple-boxes conditions in InlineFlowBoxPainter

We can use the |object_has_multiple_boxes| argument here.

Change-Id: I4e20b5e8d1af9efa8b32a13a8be1cde6ec0be1c1
Reviewed-on: https://chromium-review.googlesource.com/c/1386790
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#618263}
diff --git a/third_party/blink/renderer/core/paint/inline_flow_box_painter.cc b/third_party/blink/renderer/core/paint/inline_flow_box_painter.cc
index bd82f77..f1c8f2f 100644
--- a/third_party/blink/renderer/core/paint/inline_flow_box_painter.cc
+++ b/third_party/blink/renderer/core/paint/inline_flow_box_painter.cc
@@ -169,8 +169,7 @@
     // The simple case is where we either have no border image or we are the
     // only box for this object.  In those cases only a single call to draw is
     // required.
-    if (!has_border_image || (!inline_flow_box_.PrevForSameLayoutObject() &&
-                              !inline_flow_box_.NextForSameLayoutObject()))
+    if (!has_border_image || !object_has_multiple_boxes)
       return kPaintBordersWithoutClip;
 
     // We have a border image that spans multiple lines.
@@ -267,8 +266,7 @@
 
   // The simple case is where we are the only box for this object. In those
   // cases only a single call to draw is required.
-  if (!inline_flow_box_.PrevForSameLayoutObject() &&
-      !inline_flow_box_.NextForSameLayoutObject()) {
+  if (!object_has_multiple_boxes) {
     NinePieceImagePainter::Paint(paint_info.context, box_model,
                                  box_model.GetDocument(), GetNode(&box_model),
                                  paint_rect, box_model.StyleRef(),