Commit 1ae77fba authored by Manuel Rego Casasnovas's avatar Manuel Rego Casasnovas Committed by Commit Bot

[css-contain] Disable size containment for tables

The CSSWG resolved about it in the last meeting:
https://github.com/w3c/csswg-drafts/issues/2746

BUG=843329
TEST=external/wpt/css/css-contain/contain-size-012.html

Change-Id: Ibb037f9ab1b95bed03e46fdbeb0e68520ff741b4
Reviewed-on: https://chromium-review.googlesource.com/1100824Reviewed-by: default avatarMorten Stenshorne <mstensho@chromium.org>
Commit-Queue: Manuel Rego Casasnovas <rego@igalia.com>
Cr-Commit-Position: refs/heads/master@{#567289}
parent 73e546d2
...@@ -3,8 +3,8 @@ ...@@ -3,8 +3,8 @@
<title>CSS Containment Test: Size containment on table</title> <title>CSS Containment Test: Size containment on table</title>
<link rel="author" title="Manuel Rego Casasnovas" href="mailto:rego@igalia.com"> <link rel="author" title="Manuel Rego Casasnovas" href="mailto:rego@igalia.com">
<link rel="help" href="https://drafts.csswg.org/css-contain-1/#containment-size"> <link rel="help" href="https://drafts.csswg.org/css-contain-1/#containment-size">
<link rel="match" href="reference/contain-paint-014-ref.html"> <link rel="match" href="reference/contain-size-001-ref.html">
<meta name=assert content="Size containment does apply to table elements."> <meta name=assert content="Size containment doesn't apply to table elements.">
<style> <style>
div { div {
display: table; display: table;
...@@ -13,5 +13,5 @@ div { ...@@ -13,5 +13,5 @@ div {
} }
</style> </style>
<p>This test passes if you can NOT see the word FAIL below.</p> <p>This test passes if you can see the word PASS below.</p>
<div>FAIL</div> <div>PASS</div>
...@@ -451,7 +451,7 @@ class CORE_EXPORT LayoutObject : public ImageResourceObserver, ...@@ -451,7 +451,7 @@ class CORE_EXPORT LayoutObject : public ImageResourceObserver,
inline bool ShouldApplySizeContainment() const { inline bool ShouldApplySizeContainment() const {
return StyleRef().ContainsSize() && return StyleRef().ContainsSize() &&
(!IsInline() || IsAtomicInlineLevel()) && !IsRubyText() && (!IsInline() || IsAtomicInlineLevel()) && !IsRubyText() &&
(!IsTablePart() || IsTableCaption()); (!IsTablePart() || IsTableCaption()) && !IsTable();
} }
private: private:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment