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

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

Issue 2825343003: Clean compositing inputs for location APIs for sticky-affected elements. (Closed)
Patch Set: Address reviewer comments Created 3 years, 8 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/StyleBuilderCustom.cpp
diff --git a/third_party/WebKit/Source/core/css/resolver/StyleBuilderCustom.cpp b/third_party/WebKit/Source/core/css/resolver/StyleBuilderCustom.cpp
index b44925bed08f099a2ad791ae7fb6780cdcfc35e9..38515931c17f1dc4006c96b4eb4bf5ebafed77fc 100644
--- a/third_party/WebKit/Source/core/css/resolver/StyleBuilderCustom.cpp
+++ b/third_party/WebKit/Source/core/css/resolver/StyleBuilderCustom.cpp
@@ -966,10 +966,26 @@ void StyleBuilderFunctions::applyValueCSSPropertyBaselineShift(
}
}
+void StyleBuilderFunctions::applyInitialCSSPropertyPosition(
+ StyleResolverState& state) {
+ state.Style()->SetPosition(ComputedStyle::InitialPosition());
+ state.Style()->SetIsInStickySubtree(state.ParentStyle()->IsInStickySubtree());
+}
+
void StyleBuilderFunctions::applyInheritCSSPropertyPosition(
StyleResolverState& state) {
if (!state.ParentNode()->IsDocumentNode())
state.Style()->SetPosition(state.ParentStyle()->GetPosition());
+ state.Style()->SetIsInStickySubtree(state.ParentStyle()->IsInStickySubtree());
+}
+
+void StyleBuilderFunctions::applyValueCSSPropertyPosition(
+ StyleResolverState& state,
+ const CSSValue& value) {
+ EPosition position = ToCSSIdentifierValue(value).ConvertTo<EPosition>();
+ state.Style()->SetPosition(position);
+ state.Style()->SetIsInStickySubtree(position == EPosition::kSticky ||
+ state.ParentStyle()->IsInStickySubtree());
}
void StyleBuilderFunctions::applyInitialCSSPropertyCaretColor(

Powered by Google App Engine
This is Rietveld 408576698