mirror of
https://github.com/servo/servo.git
synced 2025-06-15 03:44:30 +00:00
Broke up some comment lines that were a bit too long
This commit is contained in:
parent
74e34d69f0
commit
cb0d43a993
1 changed files with 9 additions and 8 deletions
|
@ -541,8 +541,9 @@ impl FragmentBorderBoxIterator for UnioningFragmentScrollAreaIterator {
|
||||||
impl FragmentBorderBoxIterator for ParentOffsetBorderBoxIterator {
|
impl FragmentBorderBoxIterator for ParentOffsetBorderBoxIterator {
|
||||||
fn process(&mut self, fragment: &Fragment, level: i32, border_box: &Rect<Au>) {
|
fn process(&mut self, fragment: &Fragment, level: i32, border_box: &Rect<Au>) {
|
||||||
if self.node_offset_box.is_none() {
|
if self.node_offset_box.is_none() {
|
||||||
// We haven't found the node yet, so we're still looking for its parent.
|
// We haven't found the node yet, so we're still looking
|
||||||
// Remove all nodes at this level or higher, as they can't be parents of this node.
|
// for its parent. Remove all nodes at this level or
|
||||||
|
// higher, as they can't be parents of this node.
|
||||||
self.parent_nodes.truncate(level as usize);
|
self.parent_nodes.truncate(level as usize);
|
||||||
assert_eq!(self.parent_nodes.len(), level as usize,
|
assert_eq!(self.parent_nodes.len(), level as usize,
|
||||||
"Skipped at least one level in the flow tree!");
|
"Skipped at least one level in the flow tree!");
|
||||||
|
@ -586,17 +587,17 @@ impl FragmentBorderBoxIterator for ParentOffsetBorderBoxIterator {
|
||||||
// element. This will likely be impossible until
|
// element. This will likely be impossible until
|
||||||
// https://github.com/servo/servo/issues/13982 is fixed.
|
// https://github.com/servo/servo/issues/13982 is fixed.
|
||||||
|
|
||||||
// Found a fragment in the flow tree whose inline context contains
|
// Found a fragment in the flow tree whose inline context
|
||||||
// the DOM node we're looking for, i.e. the node is inline and
|
// contains the DOM node we're looking for, i.e. the node
|
||||||
// contains this fragment.
|
// is inline and contains this fragment.
|
||||||
match self.node_offset_box {
|
match self.node_offset_box {
|
||||||
Some(NodeOffsetBoxInfo { ref mut rectangle, .. }) => {
|
Some(NodeOffsetBoxInfo { ref mut rectangle, .. }) => {
|
||||||
*rectangle = rectangle.union(border_box);
|
*rectangle = rectangle.union(border_box);
|
||||||
},
|
},
|
||||||
None => {
|
None => {
|
||||||
// https://github.com/servo/servo/issues/13982 will cause
|
// https://github.com/servo/servo/issues/13982 will
|
||||||
// this assertion to fail sometimes, so it's commented out
|
// cause this assertion to fail sometimes, so it's
|
||||||
// for now.
|
// commented out for now.
|
||||||
/*assert!(node.flags.contains(FIRST_FRAGMENT_OF_ELEMENT),
|
/*assert!(node.flags.contains(FIRST_FRAGMENT_OF_ELEMENT),
|
||||||
"First fragment of inline node found wasn't its first fragment!");*/
|
"First fragment of inline node found wasn't its first fragment!");*/
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue