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

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

Issue 1308273010: Adapt and reland old position sticky implementation (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fix style errors and remaining layout tests. Created 5 years, 3 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/css/resolver/StyleAdjuster.cpp
diff --git a/Source/core/css/resolver/StyleAdjuster.cpp b/Source/core/css/resolver/StyleAdjuster.cpp
index 54c662e6857c4b45f531022d87f8e73c0d21fe53..2da7dce0a1867c0549115fc9cf830ceba65a5052 100644
--- a/Source/core/css/resolver/StyleAdjuster.cpp
+++ b/Source/core/css/resolver/StyleAdjuster.cpp
@@ -196,7 +196,7 @@ void StyleAdjuster::adjustComputedStyle(ComputedStyle& style, const ComputedStyl
|| style.hasFilter()
|| style.hasBlendMode()
|| style.hasIsolation()
- || style.position() == FixedPosition
+ || style.hasViewportConstrainedPosition()
|| isInTopLayer(e, style)
|| hasWillChangeThatCreatesStackingContext(style)))
style.setZIndex(0);
@@ -463,6 +463,12 @@ void StyleAdjuster::adjustStyleForDisplay(ComputedStyle& style, const ComputedSt
&& 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

Powered by Google App Engine
This is Rietveld 408576698