aboutsummaryrefslogtreecommitdiffstats
path: root/components/layout/query.rs
diff options
context:
space:
mode:
authorMartin Robinson <mrobinson@igalia.com>2017-08-24 09:37:49 +0200
committerMartin Robinson <mrobinson@igalia.com>2017-09-05 09:10:55 +0200
commitbc455c8a1f5f355323c63e5d1639df2fcaaba5df (patch)
tree8cbe1bfbe8145242736759ed39c1cdd8b42eb683 /components/layout/query.rs
parent4725a05bfba0b588d19af8bc5cfe960bda1ea880 (diff)
downloadservo-bc455c8a1f5f355323c63e5d1639df2fcaaba5df.tar.gz
servo-bc455c8a1f5f355323c63e5d1639df2fcaaba5df.zip
Add support for position:sticky
This leverages the position:sticky support in WebRender to bring basic support for position:sticky in Servo. There are still some issues with nested sticky flows as well as a few other corner cases. Tests are imported from WPT and can be removed once we update to the latest version.
Diffstat (limited to 'components/layout/query.rs')
-rw-r--r--components/layout/query.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/components/layout/query.rs b/components/layout/query.rs
index 5803a247e19..f3040376f60 100644
--- a/components/layout/query.rs
+++ b/components/layout/query.rs
@@ -598,6 +598,7 @@ impl FragmentBorderBoxIterator for ParentOffsetBorderBoxIterator {
(true, _, _) |
(false, computed_values::position::T::static_, &SpecificFragmentInfo::Table) |
(false, computed_values::position::T::static_, &SpecificFragmentInfo::TableCell) |
+ (false, computed_values::position::T::sticky, _) |
(false, computed_values::position::T::absolute, _) |
(false, computed_values::position::T::relative, _) |
(false, computed_values::position::T::fixed, _) => true,
@@ -766,7 +767,7 @@ where
let positioned = match style.get_box().position {
position::computed_value::T::relative |
- /*position::computed_value::T::sticky |*/
+ position::computed_value::T::sticky |
position::computed_value::T::fixed |
position::computed_value::T::absolute => true,
_ => false