mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
Factor out ClipRect type into values; use Either for clip
MozReview-Commit-ID: C3R1erJdiID
This commit is contained in:
parent
8b7bb97aa9
commit
6b0d3902de
10 changed files with 223 additions and 238 deletions
|
@ -1176,10 +1176,11 @@ impl FragmentDisplayListBuilding for Fragment {
|
|||
fn adjust_clip_for_style(&self,
|
||||
parent_clip: &mut ClippingRegion,
|
||||
stacking_relative_border_box: &Rect<Au>) {
|
||||
use style::values::Either;
|
||||
// Account for `clip` per CSS 2.1 § 11.1.2.
|
||||
let style_clip_rect = match (self.style().get_box().position,
|
||||
self.style().get_effects().clip.0) {
|
||||
(position::T::absolute, Some(style_clip_rect)) => style_clip_rect,
|
||||
self.style().get_effects().clip) {
|
||||
(position::T::absolute, Either::First(style_clip_rect)) => style_clip_rect,
|
||||
_ => return,
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue