Assert self.node_offset_box is None if fragment.node == self.node_address

This commit is contained in:
Permutator 2017-01-04 15:46:48 -08:00
parent 6a76525107
commit fa0cb7c8da
No known key found for this signature in database
GPG key ID: 62D7A8D792C3B058

View file

@ -549,6 +549,10 @@ impl FragmentBorderBoxIterator for ParentOffsetBorderBoxIterator {
if fragment.node == self.node_address { if fragment.node == self.node_address {
// Found the fragment in the flow tree that matches the // Found the fragment in the flow tree that matches the
// DOM node being looked for. // DOM node being looked for.
// If self.node_offset_box is Some, we were treating this as an inline node!
assert!(self.node_offset_box.is_none());
self.has_processed_node = true; self.has_processed_node = true;
self.node_offset_box = Some(NodeOffsetBoxInfo { self.node_offset_box = Some(NodeOffsetBoxInfo {
offset: border_box.origin, offset: border_box.origin,