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

Unified Diff: third_party/WebKit/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: Make sticky vertical ref tests expectations not dependent on font size. Created 4 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 | « third_party/WebKit/Source/core/core.gypi ('k') | third_party/WebKit/Source/core/frame/FrameView.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 cabca2c1c9c6e0f596ff47b762509922b00891f9..e0efef1f3ab0fa946032b0f71f5abc2142c9d848 100644
--- a/third_party/WebKit/Source/core/css/resolver/StyleAdjuster.cpp
+++ b/third_party/WebKit/Source/core/css/resolver/StyleAdjuster.cpp
@@ -199,7 +199,7 @@ void StyleAdjuster::adjustComputedStyle(ComputedStyle& style, const ComputedStyl
|| style.hasFilter()
|| style.hasBlendMode()
|| style.hasIsolation()
- || style.position() == FixedPosition
+ || style.hasViewportConstrainedPosition()
|| isInTopLayer(element, style)
|| hasWillChangeThatCreatesStackingContext(style)
|| style.containsPaint()))
@@ -431,6 +431,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
« no previous file with comments | « third_party/WebKit/Source/core/core.gypi ('k') | third_party/WebKit/Source/core/frame/FrameView.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698