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

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

Issue 196413002: Don't allow position:sticky for table columns. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Updated by review comments. Created 6 years, 9 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
« no previous file with comments | « LayoutTests/fast/css/sticky/sticky-table-col-crash-expected.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/css/resolver/StyleAdjuster.cpp
diff --git a/Source/core/css/resolver/StyleAdjuster.cpp b/Source/core/css/resolver/StyleAdjuster.cpp
index 215d499af052796dcfadab339bcc6cb48c84e9c4..7e5e771659a892b3409f328374f2a316cce052fc 100644
--- a/Source/core/css/resolver/StyleAdjuster.cpp
+++ b/Source/core/css/resolver/StyleAdjuster.cpp
@@ -260,14 +260,20 @@ void StyleAdjuster::adjustRenderStyle(RenderStyle* style, RenderStyle* parentSty
if (style->display() == INLINE && style->styleType() == NOPSEUDO && style->writingMode() != parentStyle->writingMode())
style->setDisplay(INLINE_BLOCK);
- // After performing the display mutation, check table rows. We do not honor position:relative or position:sticky on
- // table rows or cells. This has been established for position:relative in CSS2.1 (and caused a crash in containingBlock()
+ // After performing the display mutation, check table rows. We do not honor position: relative table rows or cells.
+ // This has been established for position: relative in CSS2.1 (and caused a crash in containingBlock()
// on some sites).
if ((style->display() == TABLE_HEADER_GROUP || style->display() == TABLE_ROW_GROUP
|| style->display() == TABLE_FOOTER_GROUP || style->display() == TABLE_ROW)
&& style->position() == RelativePosition)
style->setPosition(StaticPosition);
+ // Cannot support position: sticky for table columns and column groups because current code is only doing
+ // background painting through columns / column groups
+ if ((style->display() == TABLE_COLUMN_GROUP || style->display() == TABLE_COLUMN)
+ && style->position() == StickyPosition)
+ style->setPosition(StaticPosition);
+
// writing-mode does not apply to table row groups, table column groups, table rows, and table columns.
// FIXME: Table cells should be allowed to be perpendicular or flipped with respect to the table, though.
if (style->display() == TABLE_COLUMN || style->display() == TABLE_COLUMN_GROUP || style->display() == TABLE_FOOTER_GROUP
« no previous file with comments | « LayoutTests/fast/css/sticky/sticky-table-col-crash-expected.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698