mirror of
https://github.com/servo/servo.git
synced 2025-08-06 22:15:33 +01:00
Make IndependentFormattingContext a struct that owns styles
… and has a private enum for its contents. Privacy forces the rest of the code to go through methods rather than matching on the enum, reducing accidental layout-mode-specific behavior.
This commit is contained in:
parent
799057f1e6
commit
b2b3ea992c
9 changed files with 149 additions and 123 deletions
|
@ -2,13 +2,12 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
||||
|
||||
use crate::IndependentFormattingContext;
|
||||
use crate::formatting_contexts::IndependentFormattingContext;
|
||||
use servo_arc::Arc;
|
||||
use style::properties::ComputedValues;
|
||||
|
||||
#[derive(Debug)]
|
||||
pub(crate) struct FloatBox {
|
||||
pub style: Arc<ComputedValues>,
|
||||
pub contents: IndependentFormattingContext,
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue