WebKit Bugzilla
Attachment 357939 Details for
Bug 192980
: [css-lists] Fix list marker issues related to line breaks and markers disappearance
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-192980-20181221212829.patch (text/plain), 29.04 KB, created by
cathiechen
on 2018-12-21 05:28:31 PST
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
cathiechen
Created:
2018-12-21 05:28:31 PST
Size:
29.04 KB
patch
obsolete
>Subversion Revision: 239501 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 1675be7bfc8d1cb0d3cd0de663f6da41129ba0d8..8b1364dc4df3d593d1af2b8443bdd652e89a4d74 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,40 @@ >+2018-12-21 cathie chen <cathiechen@igalia.com> >+ >+ Eliminate line-breaks and disappear of list marker >+ https://bugs.webkit.org/show_bug.cgi?id=192980 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ The reason of list marker disappear in li + overflow block child page >+ is marker has been added as the child of this overflow block. And the >+ reason of line-break in li + flex, grid, etc. is that marker is the >+ sibilng of a block child. To fix these two kinds of issue: >+ 1. Create a zero-height anonymouse parent for marker(to eleminate the >+ line-break) and add it as the first child of list item. >+ 2. Reposition the position of marker after all list item's children >+ has been layout (marker has to adjust itselt to the content of li) >+ >+ Tests: fast/lists/add-inline-child-after-marker.html >+ fast/lists/li-with-overflow-hidden-change-list-style-position.html >+ fast/lists/list-and-block-textarea.html >+ fast/lists/list-and-flex.html >+ fast/lists/list-and-grid.html >+ fast/lists/list-and-margin-collapse.html >+ fast/lists/list-and-writing-mode.html >+ fast/lists/list-marker-before-overflow-hidden.html >+ fast/lists/list-marker-inside-overflow-hidden.html >+ fast/lists/list-marker-with-lineheight-and-overflow-hidden.html >+ >+ * rendering/RenderListItem.cpp: >+ (WebCore::RenderListItem::positionListMarker): >+ (WebCore::RenderListItem::alignMarkerInBlockDirection): >+ * rendering/RenderListItem.h: >+ * rendering/RenderListMarker.h: >+ * rendering/updating/RenderTreeBuilderList.cpp: >+ (WebCore::getParentOfFirstLineBox): >+ (WebCore::forceLogicalHeight): >+ (WebCore::RenderTreeBuilder::List::updateItemMarker): >+ > 2018-12-20 Justin Fan <justin_fan@apple.com> > > [WebGPU] Convert WebGPUBindGroups into MTLArgumentEncoders >diff --git a/Source/WebCore/rendering/RenderListItem.cpp b/Source/WebCore/rendering/RenderListItem.cpp >index d923eea3d053720d081071ff5334b5605605b427..9bfc3e2a41f696123fc63db8c645da2fd13e4909 100644 >--- a/Source/WebCore/rendering/RenderListItem.cpp >+++ b/Source/WebCore/rendering/RenderListItem.cpp >@@ -269,6 +269,9 @@ void RenderListItem::positionListMarker() > if (m_marker->isInside() || !m_marker->inlineBoxWrapper()) > return; > >+ if (m_needBlockDirectionAlign) >+ alignMarkerInBlockDirection(); >+ > LayoutUnit markerOldLogicalLeft = m_marker->logicalLeft(); > LayoutUnit blockOffset; > LayoutUnit lineOffset; >@@ -439,4 +442,67 @@ bool RenderListItem::isInReversedOrderedList() const > return is<HTMLOListElement>(list) && downcast<HTMLOListElement>(*list).isReversed(); > } > >+// Align marker_inline_box in block direction according to line_box_root's baseline. >+void RenderListItem::alignMarkerInBlockDirection() >+{ >+ // Specify wether need to restore to the original baseline which is the baseline of marker parent. >+ // Because we might adjust the position at the last layout pass. >+ // So if there's no line box in baselineProvider make sure it back to its original position. >+ bool backToOriginalBaseline = false; >+ auto* baselineProvider = m_baselineProvider.get(); >+ if (!baselineProvider) >+ backToOriginalBaseline = true; >+ else { >+ // Don't align marker if baselineProvider has a different writing-mode. >+ // Just let marker positioned at the left-top of baselineProvider. >+ if (baselineProvider->isWritingModeRoot()) >+ backToOriginalBaseline = true; >+ } >+ >+ InlineBox* markerInlineBox = m_marker->inlineBoxWrapper(); >+ RootInlineBox& markerRoot = markerInlineBox->root(); >+ if (baselineProvider && is<RenderBlockFlow>(baselineProvider)) { >+ // If marker_ and baselineProvider share a same RootInlineBox, no need to align marker. >+ if (downcast<RenderBlockFlow>(baselineProvider)->firstRootBox() == &markerRoot) >+ return; >+ } >+ >+ LayoutUnit offset; >+ if (!backToOriginalBaseline) { >+ RenderBox* box = baselineProvider; >+ offset = box->firstLineBaseline().value(); >+ } >+ >+ if (backToOriginalBaseline || offset == -1) { >+ baselineProvider = m_marker->containingBlock(); >+ RenderBox* box = baselineProvider; >+ offset = box->firstLineBaseline().value(); >+ } >+ >+ if (offset != -1) { >+ for (RenderBox* o = baselineProvider; o != this; o = o->parentBox()) >+ offset += o->logicalTop(); >+ >+ // Compute markerInlineBox's baseline. >+ // We shouldn't use firstLineBaseline here. firstLineBaseline is the baseline of root. >+ // We should compute markerInlineBox's baseline instead. >+ // BaselinePosition is workable when marker is an image. >+ // However, when marker is text, BaselinePosition contains lineheight information. >+ // So use markerFontMetrics.Ascent when marker is text. >+ if (m_marker->isImage()) >+ offset -= markerInlineBox->baselinePosition(markerRoot.baselineType()); >+ else { >+ const FontMetrics& markerFontMetrics = m_marker->style().fontMetrics(); >+ offset -= markerFontMetrics.ascent(markerRoot.baselineType()); >+ } >+ offset -= markerInlineBox->logicalTop(); >+ >+ for (RenderBox* o = m_marker->parentBox(); o != this; o = o->parentBox()) >+ offset -= o->logicalTop(); >+ >+ if (offset) >+ markerInlineBox->adjustBlockDirectionPosition(offset); >+ } >+} >+ > } // namespace WebCore >diff --git a/Source/WebCore/rendering/RenderListItem.h b/Source/WebCore/rendering/RenderListItem.h >index 406d80800fe9d6b97b605c93b25c3639cbd59862..b480f6017ed7ffba0a6a2d75091c399a69509648 100644 >--- a/Source/WebCore/rendering/RenderListItem.h >+++ b/Source/WebCore/rendering/RenderListItem.h >@@ -61,6 +61,10 @@ public: > > bool isInReversedOrderedList() const; > >+ void setNeedBlockDirectionAlign(bool need) { m_needBlockDirectionAlign = need; } >+ bool needBlockDirectionAlign() const { return m_needBlockDirectionAlign; } >+ void setBaselineProvider(RenderBlock* provider) { m_baselineProvider = makeWeakPtr(provider); } >+ > private: > > const char* renderName() const final { return "RenderListItem"; } >@@ -82,10 +86,14 @@ private: > void updateValueNow() const; > void explicitValueChanged(); > >+ void alignMarkerInBlockDirection(); >+ > WeakPtr<RenderListMarker> m_marker; >+ WeakPtr<RenderBlock> m_baselineProvider; > mutable Optional<int> m_value; > bool m_valueWasSetExplicitly { false }; > bool m_notInList { false }; >+ bool m_needBlockDirectionAlign { false }; > }; > > bool isHTMLListElement(const Node&); >diff --git a/Source/WebCore/rendering/RenderListMarker.h b/Source/WebCore/rendering/RenderListMarker.h >index d9498fbe92bc5906149ea01ca917350309b1013d..627d7346c44425cf03772a48a6eeb97b97fd3b2f 100644 >--- a/Source/WebCore/rendering/RenderListMarker.h >+++ b/Source/WebCore/rendering/RenderListMarker.h >@@ -47,6 +47,8 @@ public: > > void updateMarginsAndContent(); > >+ bool isImage() const override; >+ > #if !ASSERT_DISABLED > RenderListItem& listItem() const { return m_listItem; } > #endif >@@ -73,7 +75,6 @@ private: > LayoutUnit lineHeight(bool firstLine, LineDirectionMode, LinePositionMode = PositionOnContainingLine) const override; > int baselinePosition(FontBaseline, bool firstLine, LineDirectionMode, LinePositionMode = PositionOnContainingLine) const override; > >- bool isImage() const override; > bool isText() const { return !isImage(); } > > void setSelectionState(SelectionState) override; >diff --git a/Source/WebCore/rendering/updating/RenderTreeBuilderList.cpp b/Source/WebCore/rendering/updating/RenderTreeBuilderList.cpp >index be436e096629e57652d53335326ad3f6f06763fb..32464c6085ad1833ffc0f39a4fc900a80a210cb7 100644 >--- a/Source/WebCore/rendering/updating/RenderTreeBuilderList.cpp >+++ b/Source/WebCore/rendering/updating/RenderTreeBuilderList.cpp >@@ -45,10 +45,13 @@ static RenderBlock* getParentOfFirstLineBox(RenderBlock& current, RenderObject& > if (child.isFloating() || child.isOutOfFlowPositioned()) > continue; > >- if (!is<RenderBlock>(child) || is<RenderTable>(child) || is<RenderRubyAsBlock>(child)) >- break; >+ if (current.hasOverflowClip()) >+ return ¤t; >+ >+ if (is<RenderBlock>(child) && (!is<RenderBlockFlow>(child) || (is<RenderBox>(child) && downcast<RenderBox>(child).isWritingModeRoot()))) >+ return &downcast<RenderBlock>(child); > >- if (is<RenderBox>(child) && downcast<RenderBox>(child).isWritingModeRoot()) >+ if (!is<RenderBlock>(child) || is<RenderTable>(child) || is<RenderRubyAsBlock>(child)) > break; > > if (is<RenderListItem>(current) && inQuirksMode && child.node() && isHTMLListElement(*child.node())) >@@ -69,6 +72,15 @@ static RenderObject* firstNonMarkerChild(RenderBlock& parent) > return child; > } > >+void forceLogicalHeight(RenderElement& element, Length&& height) >+{ >+ if (element.style().logicalHeight() == height) >+ return; >+ auto style = RenderStyle::clone(element.style()); >+ style.setLogicalHeight(WTFMove(height)); >+ element.setStyle(WTFMove(style)); >+} >+ > RenderTreeBuilder::List::List(RenderTreeBuilder& builder) > : m_builder(builder) > { >@@ -98,27 +110,92 @@ void RenderTreeBuilder::List::updateItemMarker(RenderListItem& listItemRenderer) > > RenderElement* currentParent = markerRenderer->parent(); > RenderBlock* newParent = getParentOfFirstLineBox(listItemRenderer, *markerRenderer); >- if (!newParent) { >- // If the marker is currently contained inside an anonymous box, >- // then we are the only item in that anonymous box (since no line box >- // parent was found). It's ok to just leave the marker where it is >- // in this case. >- if (currentParent && currentParent->isAnonymousBlock()) >+ // Create a zero height parent for marker, so that marker could be displayed or no line break between marker and content. >+ // 1. Place marker as a child of <li>. Make sure don't share parent with empty inline elements which don't generate InlineBox. >+ // 2. Manage the logicalHeight of markerContainer(marker's anonymous parent): >+ // If marker is the only child of markerContainer, set LogicalHeight of markerContainer to 0px; else restore it to LogicalHeight of <li>. >+ if (!markerRenderer->isInside() && newParent && (newParent->hasOverflowClip() || !is<RenderBlockFlow>(newParent) || newParent->isWritingModeRoot())) >+ listItemRenderer.setNeedBlockDirectionAlign(true); >+ >+ // Prepare for block direction align >+ if (listItemRenderer.needBlockDirectionAlign()) { >+ // Deal with the situation of render tree changed. >+ RenderPtr<RenderObject> originalMarker; >+ if (currentParent && currentParent->isAnonymous()) { >+ // When list-position-style change from outside to inside, we need to restore LogicalHeight. >+ // So add IsInside() here. >+ if (markerRenderer->isInside() || markerRenderer->nextSibling()) { >+ // Restore LogicalHeight. >+ if (currentParent->style().logicalHeight().isZero()) >+ forceLogicalHeight(*currentParent, Length(style.logicalHeight())); >+ >+ // If currentParent isn't the ancestor of newParent, marker might generate a new empty line. >+ // We need to remove marker here.E.g: <li><span><div>text<div><span></li> >+ if (markerRenderer->isInside() || (newParent && !newParent->isDescendantOf(currentParent))) { >+ originalMarker = m_builder.detach(*currentParent, *markerRenderer); >+ currentParent = nullptr; >+ } >+ } else if (newParent) >+ forceLogicalHeight(*currentParent, Length(0, Fixed)); >+ } else if (currentParent && currentParent != &listItemRenderer) { >+ originalMarker = m_builder.detach(*currentParent, *markerRenderer); >+ currentParent = nullptr; >+ } >+ >+ // Create markerContainer, set its height to 0px, and add it to li. >+ if (!currentParent) { >+ auto* beforeChild = firstNonMarkerChild(listItemRenderer); >+ if (!markerRenderer->isInside() && beforeChild && !beforeChild->isInline()) { >+ // Create markerContainer and set its LogicalHeight to 0px. >+ auto markerContainer = listItemRenderer.createAnonymousBlock(); >+ if (newParent) >+ forceLogicalHeight(*markerContainer, Length(0, Fixed)); >+ if (originalMarker.get()) >+ m_builder.attach(*markerContainer, WTFMove(originalMarker), firstNonMarkerChild(*markerContainer)); >+ else >+ m_builder.attach(*markerContainer, WTFMove(newMarkerRenderer), firstNonMarkerChild(*markerContainer)); >+ m_builder.attach(listItemRenderer, WTFMove(markerContainer), beforeChild); >+ } else { >+ if (markerRenderer->isInside()) { >+ listItemRenderer.setNeedBlockDirectionAlign(false); >+ if (!newParent) >+ newParent = &listItemRenderer; >+ if (originalMarker.get()) >+ m_builder.attach(*newParent, WTFMove(originalMarker), firstNonMarkerChild(*newParent)); >+ else >+ m_builder.attach(*newParent, WTFMove(newMarkerRenderer), firstNonMarkerChild(*newParent)); >+ >+ } else if (originalMarker.get()) >+ m_builder.attach(listItemRenderer, WTFMove(originalMarker), beforeChild); >+ else >+ m_builder.attach(listItemRenderer, WTFMove(newMarkerRenderer), beforeChild); >+ } >+ } >+ >+ listItemRenderer.setBaselineProvider(newParent); >+ } else { >+ if (!newParent) { >+ // If the marker is currently contained inside an anonymous box, >+ // then we are the only item in that anonymous box (since no line box >+ // parent was found). It's ok to just leave the marker where it is >+ // in this case. >+ if (currentParent && currentParent->isAnonymousBlock()) >+ return; >+ if (auto* multiColumnFlow = listItemRenderer.multiColumnFlow()) >+ newParent = multiColumnFlow; >+ else >+ newParent = &listItemRenderer; >+ } >+ >+ if (newParent == currentParent) > return; >- if (auto* multiColumnFlow = listItemRenderer.multiColumnFlow()) >- newParent = multiColumnFlow; >+ >+ if (currentParent) >+ m_builder.attach(*newParent, m_builder.detach(*currentParent, *markerRenderer, RenderTreeBuilder::CanCollapseAnonymousBlock::No), firstNonMarkerChild(*newParent)); > else >- newParent = &listItemRenderer; >+ m_builder.attach(*newParent, WTFMove(newMarkerRenderer), firstNonMarkerChild(*newParent)); > } > >- if (newParent == currentParent) >- return; >- >- if (currentParent) >- m_builder.attach(*newParent, m_builder.detach(*currentParent, *markerRenderer, RenderTreeBuilder::CanCollapseAnonymousBlock::No), firstNonMarkerChild(*newParent)); >- else >- m_builder.attach(*newParent, WTFMove(newMarkerRenderer), firstNonMarkerChild(*newParent)); >- > // If current parent is an anonymous block that has lost all its children, destroy it. > if (currentParent && currentParent->isAnonymousBlock() && !currentParent->firstChild() && !downcast<RenderBlock>(*currentParent).continuation()) > m_builder.destroy(*currentParent); >diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog >index 8e7576c8febda82fe3f18b8e4383fbeaffe79249..6b7369c918f02f5e641b097c7365f39c0de74400 100644 >--- a/LayoutTests/ChangeLog >+++ b/LayoutTests/ChangeLog >@@ -1,3 +1,35 @@ >+2018-12-21 cathie chen <cathiechen@igalia.com> >+ >+ Eliminate line-breaks and disappear of list marker >+ https://bugs.webkit.org/show_bug.cgi?id=192980 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ This test cases are testing the line-break issues in li + table / flex >+ / grid / root writing-mode / block textarea, and the disappear of list >+ marker in li + block overflow:hiddlen child, and testing if the acting >+ is correct after render tree changed. >+ >+ * fast/lists/add-inline-child-after-marker-expected.html: Added. >+ * fast/lists/add-inline-child-after-marker.html: Added. >+ * fast/lists/li-with-overflow-hidden-change-list-style-position-expected.html: Added. >+ * fast/lists/li-with-overflow-hidden-change-list-style-position.html: Added. >+ * fast/lists/list-and-block-textarea-expected.html: Added. >+ * fast/lists/list-and-block-textarea.html: Added. >+ * fast/lists/list-and-flex-expected.html: Added. >+ * fast/lists/list-and-flex.html: Added. >+ * fast/lists/list-and-grid-expected.html: Added. >+ * fast/lists/list-and-grid.html: Added. >+ * fast/lists/list-and-margin-collapse.html: Added. >+ * fast/lists/list-and-writing-mode-expected.html: Added. >+ * fast/lists/list-and-writing-mode.html: Added. >+ * fast/lists/list-marker-before-overflow-hidden-expected.html: Added. >+ * fast/lists/list-marker-before-overflow-hidden.html: Added. >+ * fast/lists/list-marker-inside-overflow-hidden-expected.html: Added. >+ * fast/lists/list-marker-inside-overflow-hidden.html: Added. >+ * fast/lists/list-marker-with-lineheight-and-overflow-hidden-expected.html: Added. >+ * fast/lists/list-marker-with-lineheight-and-overflow-hidden.html: Added. >+ > 2018-12-21 Carlos Garcia Campos <cgarcia@igalia.com> > > Unreviewed GTK+ gardening. Remove platform specific files that are exactly the same as the generic expectation. >diff --git a/LayoutTests/fast/lists/add-inline-child-after-marker-expected.html b/LayoutTests/fast/lists/add-inline-child-after-marker-expected.html >new file mode 100644 >index 0000000000000000000000000000000000000000..20c879ebb7123894c57386730a39dc673eda2039 >--- /dev/null >+++ b/LayoutTests/fast/lists/add-inline-child-after-marker-expected.html >@@ -0,0 +1,8 @@ >+<head></head><body><ul> >+ <li id="liTarget"> >+ <span>inline</span> >+ <div id="divTarget" style="overflow:hidden;"> >+ <span>a</span>xxx >+ </div> >+ </li> >+</ul> >diff --git a/LayoutTests/fast/lists/add-inline-child-after-marker.html b/LayoutTests/fast/lists/add-inline-child-after-marker.html >new file mode 100644 >index 0000000000000000000000000000000000000000..c635d444db29e224ed40804803f49f4d0e1da79e >--- /dev/null >+++ b/LayoutTests/fast/lists/add-inline-child-after-marker.html >@@ -0,0 +1,17 @@ >+<ul> >+ <li id="liTarget"> >+ <div id="divTarget" style="overflow:hidden;"> >+ <span>a</span>xxx >+ </div> >+ </li> >+</ul> >+<script> >+ var new_span=document.createElement("span"); >+ var text_node=document.createTextNode("inline"); >+ new_span.appendChild(text_node); >+ >+ var div_target=document.getElementById("divTarget"); >+ var li_target=document.getElementById("liTarget"); >+ li_target.insertBefore(new_span,div_target); >+ document.body.offsetHeight; >+</script> >diff --git a/LayoutTests/fast/lists/li-with-overflow-hidden-change-list-style-position-expected.html b/LayoutTests/fast/lists/li-with-overflow-hidden-change-list-style-position-expected.html >new file mode 100644 >index 0000000000000000000000000000000000000000..aacff1bb12dac73bcc13d1a3d47dc58e943675cb >--- /dev/null >+++ b/LayoutTests/fast/lists/li-with-overflow-hidden-change-list-style-position-expected.html >@@ -0,0 +1,15 @@ >+<ul> >+ <li style="list-style-position: inside;"> >+ <div style="overflow:hidden;"> >+ outside to inside >+ </div> >+ </li> >+</ul> >+ >+<ul> >+ <li style="list-style-position: outside;"> >+ <div style="overflow:hidden;"> >+ inside to outside >+ </div> >+ </li> >+</ul> >diff --git a/LayoutTests/fast/lists/li-with-overflow-hidden-change-list-style-position.html b/LayoutTests/fast/lists/li-with-overflow-hidden-change-list-style-position.html >new file mode 100644 >index 0000000000000000000000000000000000000000..524d6db2737903cfc8a8bd88adcc72fac8322fa5 >--- /dev/null >+++ b/LayoutTests/fast/lists/li-with-overflow-hidden-change-list-style-position.html >@@ -0,0 +1,27 @@ >+<ul> >+ <li id="outSide" style="list-style-position: outside;"> >+ <div style="overflow:hidden;"> >+ outside to inside >+ </div> >+ </li> >+</ul> >+ >+<ul> >+ <li id="inSide" style="list-style-position: inside;"> >+ <div style="overflow:hidden;"> >+ inside to outside >+ </div> >+ </li> >+</ul> >+<script> >+ document.body.offsetHeight; >+ >+ var outside_li=document.getElementById("outSide"); >+ outside_li.style.listStylePosition = "inside"; >+ document.body.offsetHeight; >+ >+ var inside_li=document.getElementById("inSide"); >+ inside_li.style.listStylePosition = "outside"; >+ document.body.offsetHeight; >+ >+</script> >diff --git a/LayoutTests/fast/lists/list-and-block-textarea-expected.html b/LayoutTests/fast/lists/list-and-block-textarea-expected.html >new file mode 100644 >index 0000000000000000000000000000000000000000..2ae28399f5fda2dfb1b04405f4a3b4895f5fac1e >--- /dev/null >+++ b/LayoutTests/fast/lists/list-and-block-textarea-expected.html >@@ -0,0 +1 @@ >+pass >diff --git a/LayoutTests/fast/lists/list-and-block-textarea.html b/LayoutTests/fast/lists/list-and-block-textarea.html >new file mode 100644 >index 0000000000000000000000000000000000000000..b37979c53c68009aefe560d3a3a6ad5ee71066c9 >--- /dev/null >+++ b/LayoutTests/fast/lists/list-and-block-textarea.html >@@ -0,0 +1,15 @@ >+<ul> >+ <li id="target"> >+ <textarea rows="3" cols="20" style="display:block; height:45px"> >+ hello >+ </textarea> >+ </li> >+</ul> >+ >+<script> >+ document.body.offsetHeight; >+ if (document.getElementById("target").offsetHeight == 45) >+ document.body.innerHTML="pass"; >+ else >+ document.body.innerHTML="fail"; >+</script> >diff --git a/LayoutTests/fast/lists/list-and-flex-expected.html b/LayoutTests/fast/lists/list-and-flex-expected.html >new file mode 100644 >index 0000000000000000000000000000000000000000..07ad4cc51c5117c95ceda4a0e2adc2966abff6d1 >--- /dev/null >+++ b/LayoutTests/fast/lists/list-and-flex-expected.html >@@ -0,0 +1,9 @@ >+<ul> >+ <li> >+ <div style="border: 1px black solid;"> >+ <div style="display: inline-flex; align-items: flex-end; height: 200px;"> >+ <span style="line-height: 50px">text</span> >+ </div> >+ </div> >+ </li> >+</ul> >diff --git a/LayoutTests/fast/lists/list-and-flex.html b/LayoutTests/fast/lists/list-and-flex.html >new file mode 100644 >index 0000000000000000000000000000000000000000..19171381e64d367cc5e817a8f6ec5582b61ddca3 >--- /dev/null >+++ b/LayoutTests/fast/lists/list-and-flex.html >@@ -0,0 +1,9 @@ >+<ul> >+ <li> >+ <div style="border: 1px black solid;"> >+ <div style="display: flex; align-items: flex-end; height: 200px;"> >+ <span style="line-height: 50px">text</span> >+ </div> >+ </div> >+ </li> >+</ul> >diff --git a/LayoutTests/fast/lists/list-and-grid-expected.html b/LayoutTests/fast/lists/list-and-grid-expected.html >new file mode 100644 >index 0000000000000000000000000000000000000000..0a5686fcfa1c7a245374bcab35275bca95212583 >--- /dev/null >+++ b/LayoutTests/fast/lists/list-and-grid-expected.html >@@ -0,0 +1,8 @@ >+<ul> >+ <li> >+ <div style="display: inline-grid; grid-template-rows: 100px; align-items: center;"> >+ <div>grid</div> >+ </div> >+ </li> >+</ul> >+ >diff --git a/LayoutTests/fast/lists/list-and-grid.html b/LayoutTests/fast/lists/list-and-grid.html >new file mode 100644 >index 0000000000000000000000000000000000000000..68f727fe0c2ee0bbba1559a2544c24fbbf1a02fd >--- /dev/null >+++ b/LayoutTests/fast/lists/list-and-grid.html >@@ -0,0 +1,7 @@ >+<ul> >+ <li> >+ <div style="display: grid; grid-template-rows: 100px; align-items: center;"> >+ <div>grid</div> >+ </div> >+ </li> >+</ul> >diff --git a/LayoutTests/fast/lists/list-and-margin-collapse.html b/LayoutTests/fast/lists/list-and-margin-collapse.html >new file mode 100644 >index 0000000000000000000000000000000000000000..290572111d4c70a4705c9322b08b3e4a32733a91 >--- /dev/null >+++ b/LayoutTests/fast/lists/list-and-margin-collapse.html >@@ -0,0 +1,14 @@ >+<script src="../../resources/testharness.js"></script> >+<script src="../../resources/testharnessreport.js"></script> >+<ul id="target" style="margin-top:100px;"> >+ <li> >+ <div style="overflow:hidden; margin-top:100px; height:25px;"><a href="#">xxx</a></div> >+ </li> >+</ul> >+<div id="log"></div> >+<script> >+test(function() { >+ var height = document.getElementById("target").clientHeight; >+ assert_equals(height, 25, "the height of ul should be 25px") >+}, "list and margin collapse"); >+</script> >diff --git a/LayoutTests/fast/lists/list-and-writing-mode-expected.html b/LayoutTests/fast/lists/list-and-writing-mode-expected.html >new file mode 100644 >index 0000000000000000000000000000000000000000..2ae28399f5fda2dfb1b04405f4a3b4895f5fac1e >--- /dev/null >+++ b/LayoutTests/fast/lists/list-and-writing-mode-expected.html >@@ -0,0 +1 @@ >+pass >diff --git a/LayoutTests/fast/lists/list-and-writing-mode.html b/LayoutTests/fast/lists/list-and-writing-mode.html >new file mode 100644 >index 0000000000000000000000000000000000000000..0c45987adf14de2c7802b927635ced0d8d817df5 >--- /dev/null >+++ b/LayoutTests/fast/lists/list-and-writing-mode.html >@@ -0,0 +1,14 @@ >+<ul> >+ <li id="target"> >+ <div style="writing-mode: vertical-lr; height: 45px;">a b c</div> >+ </li> >+</ul> >+ >+<script> >+ document.body.offsetHeight; >+ if (document.getElementById("target").offsetHeight == 45) >+ document.body.innerHTML="pass"; >+ else >+ document.body.innerHTML="fail"; >+</script> >+ >diff --git a/LayoutTests/fast/lists/list-marker-before-overflow-hidden-expected.html b/LayoutTests/fast/lists/list-marker-before-overflow-hidden-expected.html >new file mode 100644 >index 0000000000000000000000000000000000000000..c27854fff9ae85eaf57cf8dc96a32568f7e8e284 >--- /dev/null >+++ b/LayoutTests/fast/lists/list-marker-before-overflow-hidden-expected.html >@@ -0,0 +1,10 @@ >+<!DOCTYPE html> >+<p>crbug.com/747695: ListMarker and "a" should be in a same line</p> >+<ul> >+ <li> >+ <div> >+ <span style="vertical-align:top; height:32px; display:inline-block;">a</span> >+ </div> >+ </li> >+</ul> >+ >diff --git a/LayoutTests/fast/lists/list-marker-before-overflow-hidden.html b/LayoutTests/fast/lists/list-marker-before-overflow-hidden.html >new file mode 100644 >index 0000000000000000000000000000000000000000..cb495a5542fab2d7662b74776e67150bcff7d484 >--- /dev/null >+++ b/LayoutTests/fast/lists/list-marker-before-overflow-hidden.html >@@ -0,0 +1,10 @@ >+<!DOCTYPE html> >+<p>crbug.com/747695: ListMarker and "a" should be in a same line</p> >+<ul> >+ <li> >+ <div> >+ <span style="vertical-align:top; overflow:hidden; height:32px; display:inline-block;">a</span> >+ </div> >+ </li> >+</ul> >+ >diff --git a/LayoutTests/fast/lists/list-marker-inside-overflow-hidden-expected.html b/LayoutTests/fast/lists/list-marker-inside-overflow-hidden-expected.html >new file mode 100644 >index 0000000000000000000000000000000000000000..20ddf82625bc0c101ff56777bdb7bbe339fefb9a >--- /dev/null >+++ b/LayoutTests/fast/lists/list-marker-inside-overflow-hidden-expected.html >@@ -0,0 +1,8 @@ >+<!DOCTYPE html> >+<p>crbug.com/626293: There should be a list item marker below.</p> >+ >+<ul> >+ <li> >+ xxx >+ </li> >+</ul> >diff --git a/LayoutTests/fast/lists/list-marker-inside-overflow-hidden.html b/LayoutTests/fast/lists/list-marker-inside-overflow-hidden.html >new file mode 100644 >index 0000000000000000000000000000000000000000..c86cec141f878b8165a190b10497f086648aadc1 >--- /dev/null >+++ b/LayoutTests/fast/lists/list-marker-inside-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/LayoutTests/fast/lists/list-marker-with-lineheight-and-overflow-hidden-expected.html b/LayoutTests/fast/lists/list-marker-with-lineheight-and-overflow-hidden-expected.html >new file mode 100644 >index 0000000000000000000000000000000000000000..049af61be3f2fa8658dd9d33fc28eff8dc1876f7 >--- /dev/null >+++ b/LayoutTests/fast/lists/list-marker-with-lineheight-and-overflow-hidden-expected.html >@@ -0,0 +1,13 @@ >+<ul> >+ <li> >+ <div style="line-height:100px;"> >+ <span>aaa</span> >+ </div> >+ </li> >+</ul> >+<ul> >+ <li style="list-style-image: url(resources/white.gif);"> >+ <div style="line-height:100px;">One</div> >+ </li> >+</ul> >+ >diff --git a/LayoutTests/fast/lists/list-marker-with-lineheight-and-overflow-hidden.html b/LayoutTests/fast/lists/list-marker-with-lineheight-and-overflow-hidden.html >new file mode 100644 >index 0000000000000000000000000000000000000000..73d3237ed37112398416a52bf2ab67632008dc2e >--- /dev/null >+++ b/LayoutTests/fast/lists/list-marker-with-lineheight-and-overflow-hidden.html >@@ -0,0 +1,13 @@ >+<ul> >+ <li> >+ <div style="overflow:hidden; line-height:100px;"> >+ <span>aaa</span> >+ </div> >+ </li> >+</ul> >+ >+<ul> >+ <li style="list-style-image: url(resources/white.gif);"> >+ <div style="overflow:hidden; line-height:100px;">One</div> >+ </li> >+</ul>
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 192980
:
357937
|
357938
|
357939
|
357940
|
357942
|
357943
|
357944
|
357945
|
357946
|
358035
|
358036
|
358037
|
358038
|
358039
|
358041
|
358063
|
358065
|
358066
|
358067
|
358068
|
358069
|
358105
|
358106
|
358109
|
358114
|
358171
|
358673
|
358674
|
358789
|
358793
|
358794
|
358797
|
358881
|
359016
|
359606
|
366487