aboutsummaryrefslogtreecommitdiffstats
path: root/components/layout_2020/fragment_tree/base_fragment.rs
diff options
context:
space:
mode:
authorMartin Robinson <mrobinson@igalia.com>2024-06-10 17:05:57 +0200
committerGitHub <noreply@github.com>2024-06-10 15:05:57 +0000
commitf4c9b310d509155ec207f99426d9ba22dd8a06fd (patch)
tree8831a32d0c856172e58e5ffb632a450e18fa6120 /components/layout_2020/fragment_tree/base_fragment.rs
parent35bbcc0d9519411dd1112dece8df19ddca51276c (diff)
downloadservo-f4c9b310d509155ec207f99426d9ba22dd8a06fd.tar.gz
servo-f4c9b310d509155ec207f99426d9ba22dd8a06fd.zip
layout: Take into account `display: table` etc in offset* queries (#32448)
* layout: Take into account `display: table` etc in offset* queries The specification says that for deciding whether an element should be used for offset* queries, a browser should take into account whether the element is a table cell or table. This change makes that happen. Co-authored-by: Oriol Brufau <obrufau@igalia.com> * Only tag HTML elements if they are in the HTML namespace --------- Co-authored-by: Oriol Brufau <obrufau@igalia.com>
Diffstat (limited to 'components/layout_2020/fragment_tree/base_fragment.rs')
-rw-r--r--components/layout_2020/fragment_tree/base_fragment.rs10
1 files changed, 7 insertions, 3 deletions
diff --git a/components/layout_2020/fragment_tree/base_fragment.rs b/components/layout_2020/fragment_tree/base_fragment.rs
index d7081cd0403..dacc082581d 100644
--- a/components/layout_2020/fragment_tree/base_fragment.rs
+++ b/components/layout_2020/fragment_tree/base_fragment.rs
@@ -88,15 +88,19 @@ bitflags! {
const IS_BODY_ELEMENT_OF_HTML_ELEMENT_ROOT = 0b00000001;
/// Whether or not the node that created this Fragment is a `<br>` element.
const IS_BR_ELEMENT = 0b00000010;
+ /// Whether or not the node that created was a `<table>`, `<th>` or
+ /// `<td>` element. Note that this does *not* include elements with
+ /// `display: table` or `display: table-cell`.
+ const IS_TABLE_TH_OR_TD_ELEMENT = 0b00000100;
/// Whether or not this Fragment was created to contain a replaced element or is
/// a replaced element.
- const IS_REPLACED = 0b00000100;
+ const IS_REPLACED = 0b00001000;
/// Whether or not this Fragment was created to contain a list item marker
/// with a used value of `list-style-position: outside`.
- const IS_OUTSIDE_LIST_ITEM_MARKER = 0b00001000;
+ const IS_OUTSIDE_LIST_ITEM_MARKER = 0b00010000;
/// Avoid painting the fragment, this is used for empty table cells when 'empty-cells' is 'hide'.
/// This flag doesn't avoid hit-testing.
- const DO_NOT_PAINT = 0b00010000;
+ const DO_NOT_PAINT = 0b00100000;
}
}