Diff
Modified: trunk/LayoutTests/ChangeLog (199151 => 199152)
--- trunk/LayoutTests/ChangeLog 2016-04-07 10:11:39 UTC (rev 199151)
+++ trunk/LayoutTests/ChangeLog 2016-04-07 10:21:25 UTC (rev 199152)
@@ -1,3 +1,9 @@
+2016-04-07 Antti Koivisto <[email protected]>
+
+ Reverting previous due to bad LayoutTest ChangeLog.
+
+ * platform/mac/TestExpectations:
+
2016-04-06 Myles C. Maxfield <[email protected]>
REGRESSION (r188591): thingiverse.com direct messaging UI is not rendered properly
Modified: trunk/LayoutTests/platform/mac/TestExpectations (199151 => 199152)
--- trunk/LayoutTests/platform/mac/TestExpectations 2016-04-07 10:11:39 UTC (rev 199151)
+++ trunk/LayoutTests/platform/mac/TestExpectations 2016-04-07 10:21:25 UTC (rev 199152)
@@ -1229,6 +1229,7 @@
webkit.org/b/148695 fast/shadow-dom [ Pass ]
webkit.org/b/149440 fast/shadow-dom/css-scoping-shadow-host-functional-rule.html [ ImageOnlyFailure ]
+webkit.org/b/149441 fast/shadow-dom/css-scoping-shadow-slot-display-override.html [ ImageOnlyFailure ]
# Touch events is not enabled on Mac
webkit.org/b/149592 fast/shadow-dom/touch-event-ios.html [ Failure ]
Modified: trunk/Source/WebCore/ChangeLog (199151 => 199152)
--- trunk/Source/WebCore/ChangeLog 2016-04-07 10:11:39 UTC (rev 199151)
+++ trunk/Source/WebCore/ChangeLog 2016-04-07 10:21:25 UTC (rev 199152)
@@ -1,3 +1,7 @@
+2016-04-07 Antti Koivisto <[email protected]>
+
+ Reverting previous due to bad LayoutTest ChangeLog.
+
2016-04-06 Antti Koivisto <[email protected]>
Shadow DOM: Implement display: contents for slots
Modified: trunk/Source/WebCore/css/CSSParser.cpp (199151 => 199152)
--- trunk/Source/WebCore/css/CSSParser.cpp 2016-04-07 10:11:39 UTC (rev 199151)
+++ trunk/Source/WebCore/css/CSSParser.cpp 2016-04-07 10:21:25 UTC (rev 199152)
@@ -669,8 +669,8 @@
// inline | block | list-item | inline-block | table |
// inline-table | table-row-group | table-header-group | table-footer-group | table-row |
// table-column-group | table-column | table-cell | table-caption | -webkit-box | -webkit-inline-box | none | inherit
- // flex | -webkit-flex | inline-flex | -webkit-inline-flex | -webkit-grid | -webkit-inline-grid | contents
- if ((valueID >= CSSValueInline && valueID <= CSSValueContents) || valueID == CSSValueNone)
+ // flex | -webkit-flex | inline-flex | -webkit-inline-flex | -webkit-grid | -webkit-inline-grid
+ if ((valueID >= CSSValueInline && valueID <= CSSValueWebkitInlineFlex) || valueID == CSSValueNone)
return true;
#if ENABLE(CSS_GRID_LAYOUT)
if (valueID == CSSValueWebkitGrid || valueID == CSSValueWebkitInlineGrid)
Modified: trunk/Source/WebCore/css/CSSPrimitiveValueMappings.h (199151 => 199152)
--- trunk/Source/WebCore/css/CSSPrimitiveValueMappings.h 2016-04-07 10:11:39 UTC (rev 199151)
+++ trunk/Source/WebCore/css/CSSPrimitiveValueMappings.h 2016-04-07 10:21:25 UTC (rev 199152)
@@ -1388,9 +1388,6 @@
case NONE:
m_value.valueID = CSSValueNone;
break;
- case CONTENTS:
- m_value.valueID = CSSValueContents;
- break;
}
}
Modified: trunk/Source/WebCore/css/CSSValueKeywords.in (199151 => 199152)
--- trunk/Source/WebCore/css/CSSValueKeywords.in 2016-04-07 10:11:39 UTC (rev 199151)
+++ trunk/Source/WebCore/css/CSSValueKeywords.in 2016-04-07 10:21:25 UTC (rev 199152)
@@ -417,7 +417,6 @@
-webkit-flex
inline-flex
-webkit-inline-flex
-contents
-webkit-grid
-webkit-inline-grid
//none
@@ -1185,7 +1184,7 @@
// will-change
scroll-position
-//contents
+contents
#if defined(ENABLE_TOUCH_EVENTS) && ENABLE_TOUCH_EVENTS
// touch-action
Modified: trunk/Source/WebCore/css/StyleResolver.cpp (199151 => 199152)
--- trunk/Source/WebCore/css/StyleResolver.cpp 2016-04-07 10:11:39 UTC (rev 199151)
+++ trunk/Source/WebCore/css/StyleResolver.cpp 2016-04-07 10:21:25 UTC (rev 199152)
@@ -723,7 +723,6 @@
case TABLE_COLUMN:
case TABLE_CELL:
case TABLE_CAPTION:
- case CONTENTS:
return BLOCK;
case NONE:
ASSERT_NOT_REACHED();
@@ -766,15 +765,6 @@
style.setOriginalDisplay(style.display());
if (style.display() != NONE) {
- if (style.display() == CONTENTS) {
- // FIXME: Enable for all elements.
- bool elementSupportsDisplayContents = false;
-#if ENABLE(SHADOW_DOM) || ENABLE(DETAILS_ELEMENT)
- elementSupportsDisplayContents = is<HTMLSlotElement>(e);
-#endif
- if (!elementSupportsDisplayContents)
- style.setDisplay(INLINE);
- }
// If we have a <td> that specifies a float property, in quirks mode we just drop the float
// property.
// Sites also commonly use display:inline/block on <td>s and <table>s. In quirks mode we force
Modified: trunk/Source/WebCore/css/html.css (199151 => 199152)
--- trunk/Source/WebCore/css/html.css 2016-04-07 10:11:39 UTC (rev 199151)
+++ trunk/Source/WebCore/css/html.css 2016-04-07 10:21:25 UTC (rev 199152)
@@ -1223,10 +1223,6 @@
unicode-bidi: bidi-override;
}
-slot {
- display: contents;
-}
-
#if defined(WTF_PLATFORM_IOS) && WTF_PLATFORM_IOS
applet, embed, object, img {
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
Modified: trunk/Source/WebCore/dom/Element.cpp (199151 => 199152)
--- trunk/Source/WebCore/dom/Element.cpp 2016-04-07 10:11:39 UTC (rev 199151)
+++ trunk/Source/WebCore/dom/Element.cpp 2016-04-07 10:21:25 UTC (rev 199152)
@@ -1375,18 +1375,6 @@
return styleResolver().styleForElement(*this, parentStyle);
}
-bool Element::hasDisplayContents() const
-{
- return hasRareData() && elementRareData()->hasDisplayContents();
-}
-
-void Element::setHasDisplayContents(bool value)
-{
- if (hasDisplayContents() == value)
- return;
- ensureElementRareData().setHasDisplayContents(value);
-}
-
// Returns true is the given attribute is an event handler.
// We consider an event handler any attribute that begins with "on".
// It is a simple solution that has the advantage of not requiring any
@@ -1490,7 +1478,7 @@
bool Element::rendererIsNeeded(const RenderStyle& style)
{
- return style.display() != NONE && style.display() != CONTENTS;
+ return style.display() != NONE;
}
RenderPtr<RenderElement> Element::createElementRenderer(Ref<RenderStyle>&& style, const RenderTreePosition&)
Modified: trunk/Source/WebCore/dom/Element.h (199151 => 199152)
--- trunk/Source/WebCore/dom/Element.h 2016-04-07 10:11:39 UTC (rev 199151)
+++ trunk/Source/WebCore/dom/Element.h 2016-04-07 10:21:25 UTC (rev 199152)
@@ -501,9 +501,6 @@
StyleResolver& styleResolver();
ElementStyle resolveStyle(RenderStyle* parentStyle);
- bool hasDisplayContents() const;
- void setHasDisplayContents(bool);
-
virtual void isVisibleInViewportChanged() { }
using ContainerNode::setAttributeEventListener;
Modified: trunk/Source/WebCore/dom/ElementAndTextDescendantIterator.h (199151 => 199152)
--- trunk/Source/WebCore/dom/ElementAndTextDescendantIterator.h 2016-04-07 10:11:39 UTC (rev 199151)
+++ trunk/Source/WebCore/dom/ElementAndTextDescendantIterator.h 2016-04-07 10:21:25 UTC (rev 199152)
@@ -50,8 +50,8 @@
bool operator==(const ElementAndTextDescendantIterator& other) const;
bool operator!=(const ElementAndTextDescendantIterator& other) const;
- bool operator!() const { return !m_depth; }
- explicit operator bool() const { return m_depth; }
+ bool operator!() const { return !m_current; }
+ explicit operator bool() const { return m_current; }
void dropAssertions();
@@ -115,7 +115,7 @@
}
inline ElementAndTextDescendantIterator::ElementAndTextDescendantIterator(ContainerNode& root, Node* current)
- : m_current(current)
+ : m_current(current != &root ? current : nullptr)
#if !ASSERT_DISABLED
, m_assertions(m_current)
#endif
@@ -123,8 +123,6 @@
if (!m_current)
return;
ASSERT(isElementOrText(*m_current));
- if (m_current == &root)
- return;
Vector<Node*, 20> ancestorStack;
auto* ancestor = m_current->parentNode();
@@ -287,7 +285,7 @@
inline bool ElementAndTextDescendantIterator::operator==(const ElementAndTextDescendantIterator& other) const
{
ASSERT(!m_assertions.domTreeHasMutated());
- return m_current == other.m_current || (!m_depth && !other.m_depth);
+ return m_current == other.m_current;
}
inline bool ElementAndTextDescendantIterator::operator!=(const ElementAndTextDescendantIterator& other) const
Modified: trunk/Source/WebCore/dom/ElementRareData.h (199151 => 199152)
--- trunk/Source/WebCore/dom/ElementRareData.h 2016-04-07 10:11:39 UTC (rev 199151)
+++ trunk/Source/WebCore/dom/ElementRareData.h 2016-04-07 10:21:25 UTC (rev 199152)
@@ -107,9 +107,6 @@
bool hasPendingResources() const { return m_hasPendingResources; }
void setHasPendingResources(bool has) { m_hasPendingResources = has; }
- bool hasDisplayContents() const { return m_hasDisplayContents; }
- void setHasDisplayContents(bool value) { m_hasDisplayContents = value; }
-
private:
int m_tabIndex;
unsigned short m_childIndex;
@@ -129,7 +126,6 @@
unsigned m_childrenAffectedByLastChildRules : 1;
unsigned m_childrenAffectedByBackwardPositionalRules : 1;
unsigned m_childrenAffectedByPropertyBasedBackwardPositionalRules : 1;
- unsigned m_hasDisplayContents : 1;
RegionOversetState m_regionOversetState;
@@ -170,7 +166,6 @@
, m_childrenAffectedByLastChildRules(false)
, m_childrenAffectedByBackwardPositionalRules(false)
, m_childrenAffectedByPropertyBasedBackwardPositionalRules(false)
- , m_hasDisplayContents(false)
, m_regionOversetState(RegionUndefined)
, m_minimumSizeForResizing(defaultMinimumSizeForResizing())
{
@@ -198,7 +193,6 @@
inline void ElementRareData::resetComputedStyle()
{
m_computedStyle = nullptr;
- m_hasDisplayContents = false;
setStyleAffectedByEmpty(false);
setChildIndex(0);
}
Modified: trunk/Source/WebCore/html/HTMLSlotElement.h (199151 => 199152)
--- trunk/Source/WebCore/html/HTMLSlotElement.h 2016-04-07 10:11:39 UTC (rev 199151)
+++ trunk/Source/WebCore/html/HTMLSlotElement.h 2016-04-07 10:21:25 UTC (rev 199152)
@@ -53,7 +53,18 @@
bool m_hasEnqueuedSlotChangeEvent { false };
};
+// Slots have implicit display:contents until it is supported for reals.
+inline bool hasImplicitDisplayContents(const Element& element) { return is<HTMLSlotElement>(element); }
+
}
+#else
+
+namespace WebCore {
+
+inline bool hasImplicitDisplayContents(const Element&) { return false; }
+
+}
+
#endif
#endif
Modified: trunk/Source/WebCore/rendering/RenderElement.cpp (199151 => 199152)
--- trunk/Source/WebCore/rendering/RenderElement.cpp 2016-04-07 10:11:39 UTC (rev 199151)
+++ trunk/Source/WebCore/rendering/RenderElement.cpp 2016-04-07 10:21:25 UTC (rev 199152)
@@ -161,7 +161,6 @@
switch (style.get().display()) {
case NONE:
- case CONTENTS:
return nullptr;
case INLINE:
return createRenderer<RenderInline>(element, WTFMove(style));
Modified: trunk/Source/WebCore/rendering/style/RenderStyleConstants.h (199151 => 199152)
--- trunk/Source/WebCore/rendering/style/RenderStyleConstants.h 2016-04-07 10:11:39 UTC (rev 199151)
+++ trunk/Source/WebCore/rendering/style/RenderStyleConstants.h 2016-04-07 10:21:25 UTC (rev 199152)
@@ -563,7 +563,6 @@
TABLE_COLUMN_GROUP, TABLE_COLUMN, TABLE_CELL,
TABLE_CAPTION, BOX, INLINE_BOX,
FLEX, WEBKIT_FLEX, INLINE_FLEX, WEBKIT_INLINE_FLEX,
- CONTENTS,
#if ENABLE(CSS_GRID_LAYOUT)
GRID, INLINE_GRID,
#endif
Modified: trunk/Source/WebCore/style/RenderTreePosition.cpp (199151 => 199152)
--- trunk/Source/WebCore/style/RenderTreePosition.cpp 2016-04-07 10:11:39 UTC (rev 199151)
+++ trunk/Source/WebCore/style/RenderTreePosition.cpp 2016-04-07 10:21:25 UTC (rev 199152)
@@ -89,7 +89,7 @@
while (it != end) {
auto& node = *it;
- bool hasDisplayContents = is<Element>(node) && downcast<Element>(node).hasDisplayContents();
+ bool hasDisplayContents = is<Element>(node) && hasImplicitDisplayContents(downcast<Element>(node));
if (hasDisplayContents) {
it.traverseNext();
continue;
Modified: trunk/Source/WebCore/style/RenderTreeUpdater.cpp (199151 => 199152)
--- trunk/Source/WebCore/style/RenderTreeUpdater.cpp 2016-04-07 10:11:39 UTC (rev 199151)
+++ trunk/Source/WebCore/style/RenderTreeUpdater.cpp 2016-04-07 10:21:25 UTC (rev 199152)
@@ -68,7 +68,7 @@
for (auto& ancestor : composedTreeAncestors(node)) {
if (ancestor.renderer())
return &ancestor;
- if (!ancestor.hasDisplayContents())
+ if (!hasImplicitDisplayContents(ancestor))
return nullptr;
}
return &node.document();
@@ -151,7 +151,7 @@
updateElementRenderer(element, *elementUpdate);
- bool mayHaveRenderedDescendants = element.renderer() || (element.hasDisplayContents() && shouldCreateRenderer(element, renderTreePosition().parent()));
+ bool mayHaveRenderedDescendants = element.renderer() || (hasImplicitDisplayContents(element) && shouldCreateRenderer(element, renderTreePosition().parent()));
if (!mayHaveRenderedDescendants) {
it.traverseNextSkippingChildren();
continue;
@@ -244,10 +244,7 @@
if (shouldTearDownRenderers)
tearDownRenderers(element, TeardownType::KeepHoverAndActive);
- bool hasDisplayContest = update.style && update.style->display() == CONTENTS;
- element.setHasDisplayContents(hasDisplayContest);
-
- bool shouldCreateNewRenderer = !element.renderer() && update.style && !hasDisplayContest;
+ bool shouldCreateNewRenderer = !element.renderer() && update.style && !hasImplicitDisplayContents(element);
if (shouldCreateNewRenderer) {
if (element.hasCustomStyleResolveCallbacks())
element.willAttachRenderers();
Modified: trunk/Source/WebCore/style/StyleTreeResolver.cpp (199151 => 199152)
--- trunk/Source/WebCore/style/StyleTreeResolver.cpp 2016-04-07 10:11:39 UTC (rev 199151)
+++ trunk/Source/WebCore/style/StyleTreeResolver.cpp 2016-04-07 10:21:25 UTC (rev 199152)
@@ -172,6 +172,9 @@
return true;
if (newStyle.display() != NONE)
return true;
+ // FIXME: Make 'contents' an actual display property value.
+ if (hasImplicitDisplayContents(element))
+ return true;
if (element.rendererIsNeeded(newStyle))
return true;
if (element.shouldMoveToFlowThread(newStyle))
@@ -373,7 +376,7 @@
ElementUpdate update;
update.style = element.renderStyle();
- bool shouldResolve = parent.change >= Inherit || element.needsStyleRecalc() || shouldResolveForPseudoElement || affectedByPreviousSibling || element.hasDisplayContents();
+ bool shouldResolve = parent.change >= Inherit || element.needsStyleRecalc() || shouldResolveForPseudoElement || affectedByPreviousSibling || hasImplicitDisplayContents(element);
if (shouldResolve) {
#if PLATFORM(IOS)
CheckForVisibilityChangeOnRecalcStyle checkForVisibilityChange(&element, element.renderStyle());