aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--components/layout/block.rs3
-rw-r--r--components/layout/display_list_builder.rs6
-rw-r--r--components/layout/fragment.rs5
-rw-r--r--components/layout/inline.rs3
4 files changed, 8 insertions, 9 deletions
diff --git a/components/layout/block.rs b/components/layout/block.rs
index 519a76c08e7..103ac4c679c 100644
--- a/components/layout/block.rs
+++ b/components/layout/block.rs
@@ -1921,8 +1921,7 @@ impl Flow for BlockFlow {
CoordinateSystem::Own);
self.fragment.adjust_clipping_region_for_children(
&mut clip,
- &stacking_relative_border_box,
- self.base.flags.contains(IS_ABSOLUTELY_POSITIONED));
+ &stacking_relative_border_box);
// Process children.
for kid in self.base.child_iter() {
diff --git a/components/layout/display_list_builder.rs b/components/layout/display_list_builder.rs
index 8832eac31bc..729063c3872 100644
--- a/components/layout/display_list_builder.rs
+++ b/components/layout/display_list_builder.rs
@@ -229,8 +229,7 @@ pub trait FragmentDisplayListBuilding {
/// Adjusts the clipping region for descendants of this fragment as appropriate.
fn adjust_clipping_region_for_children(&self,
current_clip: &mut ClippingRegion,
- stacking_relative_border_box: &Rect<Au>,
- is_absolutely_positioned: bool);
+ stacking_relative_border_box: &Rect<Au>);
/// Adjusts the clipping rectangle for a fragment to take the `clip` property into account
/// per CSS 2.1 § 11.1.2.
@@ -1444,8 +1443,7 @@ impl FragmentDisplayListBuilding for Fragment {
fn adjust_clipping_region_for_children(&self,
current_clip: &mut ClippingRegion,
- stacking_relative_border_box: &Rect<Au>,
- is_absolutely_positioned: bool) {
+ stacking_relative_border_box: &Rect<Au>) {
// Don't clip if we're text.
if self.is_scanned_text_fragment() {
return
diff --git a/components/layout/fragment.rs b/components/layout/fragment.rs
index 42fe28d29e9..439e8a79f60 100644
--- a/components/layout/fragment.rs
+++ b/components/layout/fragment.rs
@@ -2347,7 +2347,10 @@ impl Fragment {
modified = true;
continue
}
- new_text_string.push_str(&unscanned_text_fragment_info.text[i..]);
+ // Finished processing leading control chars and whitespace.
+ if modified {
+ new_text_string.push_str(&unscanned_text_fragment_info.text[i..]);
+ }
break
}
if modified {
diff --git a/components/layout/inline.rs b/components/layout/inline.rs
index 94a61bdd061..d9d750b0e83 100644
--- a/components/layout/inline.rs
+++ b/components/layout/inline.rs
@@ -1682,8 +1682,7 @@ impl Flow for InlineFlow {
fragment.stacking_relative_content_box(&stacking_relative_border_box);
let mut clip = self.base.clip.clone();
fragment.adjust_clipping_region_for_children(&mut clip,
- &stacking_relative_border_box,
- false);
+ &stacking_relative_border_box);
let is_positioned = fragment.is_positioned();
match fragment.specific {
SpecificFragmentInfo::InlineBlock(ref mut info) => {