Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(449)

Unified Diff: third_party/WebKit/Source/core/css/resolver/StyleAdjuster.cpp

Issue 2443693003: Add parsing support for display: contents, and minimum behavior similar to display: none (Closed)
Patch Set: Add parsing support for display: contents, and minimum behavior similar to display: none Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/css/resolver/StyleAdjuster.cpp
diff --git a/third_party/WebKit/Source/core/css/resolver/StyleAdjuster.cpp b/third_party/WebKit/Source/core/css/resolver/StyleAdjuster.cpp
index 74dda2f08ca881ceefd5a07b98ea1e4a8a47194a..c2dfde0609a0f1e5b40695b6cc498bca10869194 100644
--- a/third_party/WebKit/Source/core/css/resolver/StyleAdjuster.cpp
+++ b/third_party/WebKit/Source/core/css/resolver/StyleAdjuster.cpp
@@ -85,8 +85,9 @@ static EDisplay equivalentBlockDisplay(EDisplay display) {
case EDisplay::TableCaption:
return EDisplay::Block;
case EDisplay::None:
+ case EDisplay::Contents:
ASSERT_NOT_REACHED();
- return EDisplay::None;
+ return display;
}
ASSERT_NOT_REACHED();
return EDisplay::Block;
@@ -369,7 +370,8 @@ static void adjustStyleForDisplay(ComputedStyle& style,
void StyleAdjuster::adjustComputedStyle(ComputedStyle& style,
const ComputedStyle& parentStyle,
Element* element) {
- if (style.display() != EDisplay::None) {
+ if (style.display() != EDisplay::None &&
+ style.display() != EDisplay::Contents) {
if (element && element->isHTMLElement())
adjustStyleForHTMLElement(style, toHTMLElement(*element));
« no previous file with comments | « third_party/WebKit/Source/core/css/parser/CSSParserFastPaths.cpp ('k') | third_party/WebKit/Source/core/layout/LayoutObject.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698