Get markers back while list items have overflow:hidden children

Add marker into list item not overflow:hidden child while construct
layout tree.

BUG=626293

Review-Url: https://codereview.chromium.org/2759883002
Cr-Commit-Position: refs/heads/master@{#459372}
diff --git a/third_party/WebKit/LayoutTests/fast/lists/list-marker-before-overflow-hidden-expected.html b/third_party/WebKit/LayoutTests/fast/lists/list-marker-before-overflow-hidden-expected.html
new file mode 100644
index 0000000..7f3c96e
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/fast/lists/list-marker-before-overflow-hidden-expected.html
@@ -0,0 +1,9 @@
+<!DOCTYPE html>
+<p>crbug.com/626293: There should be a list item marker below.</p>
+
+<ul>
+  <li>
+    <br>
+    xxx
+  </li>
+</ul>
diff --git a/third_party/WebKit/LayoutTests/fast/lists/list-marker-before-overflow-hidden.html b/third_party/WebKit/LayoutTests/fast/lists/list-marker-before-overflow-hidden.html
new file mode 100644
index 0000000..c86cec1
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/fast/lists/list-marker-before-overflow-hidden.html
@@ -0,0 +1,8 @@
+<!DOCTYPE html>
+<p>crbug.com/626293: There should be a list item marker below.</p>
+
+<ul>
+  <li>
+    <div style='overflow:hidden'>xxx</div>
+  </li>
+</ul>
diff --git a/third_party/WebKit/Source/core/layout/LayoutListItem.cpp b/third_party/WebKit/Source/core/layout/LayoutListItem.cpp
index 6c98974..4dbf2a7 100644
--- a/third_party/WebKit/Source/core/layout/LayoutListItem.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutListItem.cpp
@@ -257,6 +257,11 @@
     if (currChild == marker)
       continue;
 
+    // Shouldn't add marker into Overflow box, instead, add marker
+    // into listitem
+    if (currChild->hasOverflowClip())
+      break;
+
     if (currChild->isInline() &&
         (!currChild->isLayoutInline() ||
          curr->generatesLineBoxesForInlineChild(currChild)))