mirror of
https://github.com/servo/servo.git
synced 2025-08-05 21:50:18 +01:00
Auto merge of #17731 - emilio:percentage-calc, r=nox
style: Respect calc for percentages. <!-- Reviewable:start --> This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/17731) <!-- Reviewable:end -->
This commit is contained in:
commit
2d37700cf8
28 changed files with 308 additions and 176 deletions
|
@ -113,7 +113,7 @@ use style::shared_lock::{SharedRwLock, Locked};
|
|||
use style::stylearc::Arc;
|
||||
use style::thread_state;
|
||||
use style::values::{CSSFloat, Either};
|
||||
use style::values::specified;
|
||||
use style::values::{specified, computed};
|
||||
use stylesheet_loader::StylesheetOwner;
|
||||
|
||||
// TODO: Update focus state when the top-level browsing context gains or loses system focus,
|
||||
|
@ -576,7 +576,7 @@ impl LayoutElementHelpers for LayoutJS<Element> {
|
|||
LengthOrPercentageOrAuto::Auto => {}
|
||||
LengthOrPercentageOrAuto::Percentage(percentage) => {
|
||||
let width_value =
|
||||
specified::LengthOrPercentageOrAuto::Percentage(specified::Percentage(percentage));
|
||||
specified::LengthOrPercentageOrAuto::Percentage(computed::Percentage(percentage));
|
||||
hints.push(from_declaration(
|
||||
shared_lock,
|
||||
PropertyDeclaration::Width(width_value)));
|
||||
|
@ -605,7 +605,7 @@ impl LayoutElementHelpers for LayoutJS<Element> {
|
|||
LengthOrPercentageOrAuto::Auto => {}
|
||||
LengthOrPercentageOrAuto::Percentage(percentage) => {
|
||||
let height_value =
|
||||
specified::LengthOrPercentageOrAuto::Percentage(specified::Percentage(percentage));
|
||||
specified::LengthOrPercentageOrAuto::Percentage(computed::Percentage(percentage));
|
||||
hints.push(from_declaration(
|
||||
shared_lock,
|
||||
PropertyDeclaration::Height(height_value)));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue