mirror of
https://github.com/servo/servo.git
synced 2025-07-23 07:13:52 +01:00
Introduce MaxRect trait
It is implemented for LayoutRect and Rect<Au>. Replaces the max_rect() function from servo_geometry.
This commit is contained in:
parent
8c7c5f6e79
commit
af52233ae5
9 changed files with 56 additions and 28 deletions
|
@ -108,7 +108,7 @@ use servo_atoms::Atom;
|
|||
use servo_config::opts;
|
||||
use servo_config::prefs::PREFS;
|
||||
use servo_config::resource_files::read_resource_file;
|
||||
use servo_geometry::max_rect;
|
||||
use servo_geometry::MaxRect;
|
||||
use servo_url::ServoUrl;
|
||||
use std::borrow::ToOwned;
|
||||
use std::cell::{Cell, RefCell};
|
||||
|
@ -1467,7 +1467,7 @@ impl LayoutThread {
|
|||
|
||||
if let Some(mut root_flow) = self.root_flow.borrow().clone() {
|
||||
let reflow_info = Reflow {
|
||||
page_clip_rect: max_rect(),
|
||||
page_clip_rect: Rect::max_rect(),
|
||||
};
|
||||
|
||||
// Unwrap here should not panic since self.root_flow is only ever set to Some(_)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue