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

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

Issue 2636253002: Handle nested position:sticky elements (Closed)
Patch Set: Rebase Created 3 years, 10 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 127e05c930c7092e5c882155c9ac68d0d255469f..40b67722e2ba4da97e0180ac68793c5886c6c176 100644
--- a/third_party/WebKit/Source/core/css/resolver/StyleAdjuster.cpp
+++ b/third_party/WebKit/Source/core/css/resolver/StyleAdjuster.cpp
@@ -336,14 +336,16 @@ static void adjustStyleForDisplay(ComputedStyle& style,
style.getWritingMode() != parentStyle.getWritingMode())
style.setDisplay(EDisplay::InlineBlock);
- // After performing the display mutation, check table rows. We do not honor
- // position: relative table rows. This has been established for position:
- // relative in CSS2.1 (and caused a crash in containingBlock() on some sites).
+ // We do not honor position: relative or sticky for table rows, headers, and
+ // footers. This is correct for position: relative in CSS2.1 (and caused a
+ // crash in containingBlock() on some sites) and position: sticky is defined
+ // as following position: relative behavior for table elements. It is
+ // incorrect for CSS3.
if ((style.display() == EDisplay::TableHeaderGroup ||
style.display() == EDisplay::TableRowGroup ||
style.display() == EDisplay::TableFooterGroup ||
style.display() == EDisplay::TableRow) &&
- style.position() == EPosition::kRelative)
+ style.hasInFlowPosition())
style.setPosition(EPosition::kStatic);
// Cannot support position: sticky for table columns and column groups because

Powered by Google App Engine
This is Rietveld 408576698