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

Unified Diff: Source/core/layout/LayoutTheme.cpp

Issue 1280123004: Don't allow whitespace between elements with display:table-cell (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Updated Created 5 years, 4 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: Source/core/layout/LayoutTheme.cpp
diff --git a/Source/core/layout/LayoutTheme.cpp b/Source/core/layout/LayoutTheme.cpp
index dfcb3f6a64a95e55a6258867768be838bb19d292..ca24ac9e084cf46695feea4fa627ba304cfe7458 100644
--- a/Source/core/layout/LayoutTheme.cpp
+++ b/Source/core/layout/LayoutTheme.cpp
@@ -80,12 +80,13 @@ void LayoutTheme::adjustStyle(ComputedStyle& style, Element* e, const AuthorStyl
{
ASSERT(style.hasAppearance());
- // Force inline and table display styles to be inline-block (except for table- which is block)
+ // Force inline and table display styles to be inline-block (except for table- which is block, and table-cell which we handle correctly).
+ // TODO(rhogan) crbug.com/515771: Allow all table part display types on form controls and create the appropriate anonymous table parts to contain them.
ControlPart part = style.appearance();
if (style.display() == INLINE || style.display() == INLINE_TABLE || style.display() == TABLE_ROW_GROUP
|| style.display() == TABLE_HEADER_GROUP || style.display() == TABLE_FOOTER_GROUP
|| style.display() == TABLE_ROW || style.display() == TABLE_COLUMN_GROUP || style.display() == TABLE_COLUMN
- || style.display() == TABLE_CELL || style.display() == TABLE_CAPTION)
+ || style.display() == TABLE_CAPTION)
style.setDisplay(INLINE_BLOCK);
else if (style.display() == LIST_ITEM || style.display() == TABLE)
style.setDisplay(BLOCK);
« Source/core/layout/LayoutTableRow.cpp ('K') | « Source/core/layout/LayoutTableRow.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698