diff options
author | bors-servo <lbergstrom+bors@mozilla.com> | 2017-02-09 02:21:36 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-02-09 02:21:36 -0800 |
commit | 5c609213d68a17f65ae4e64c34d8dc6b66d35784 (patch) | |
tree | 98d67acacfb87bbf72632c60393cd89df701b185 /components/script | |
parent | 9eaf96b73716450caba5e85b9c5d3622242f2608 (diff) | |
parent | adb6d202937457bb6ff6d24694f6c903d77370f2 (diff) | |
download | servo-5c609213d68a17f65ae4e64c34d8dc6b66d35784.tar.gz servo-5c609213d68a17f65ae4e64c34d8dc6b66d35784.zip |
Auto merge of #15411 - canaltinova:property-declaration, r=SimonSapin
Box larger specified values to avoid memmove impact
<!-- Please describe your changes on the following line: -->
Box larger specified values to avoid memmove impact.
---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #15322 (github issue number if applicable).
<!-- Either: -->
- [ ] There are tests for these changes OR
- [ ] These changes do not require tests because _____
<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
<!-- 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/15411)
<!-- Reviewable:end -->
Diffstat (limited to 'components/script')
-rw-r--r-- | components/script/dom/element.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/components/script/dom/element.rs b/components/script/dom/element.rs index cf770674e74..cf4373fbeb6 100644 --- a/components/script/dom/element.rs +++ b/components/script/dom/element.rs @@ -407,7 +407,7 @@ impl LayoutElementHelpers for LayoutJS<Element> { if let Some(color) = bgcolor { hints.push(from_declaration( PropertyDeclaration::BackgroundColor(DeclaredValue::Value( - CSSColor { parsed: Color::RGBA(color), authored: None })))); + Box::new(CSSColor { parsed: Color::RGBA(color), authored: None }))))); } let background = if let Some(this) = self.downcast::<HTMLBodyElement>() { @@ -440,10 +440,10 @@ impl LayoutElementHelpers for LayoutJS<Element> { if let Some(color) = color { hints.push(from_declaration( - PropertyDeclaration::Color(DeclaredValue::Value(CSSRGBA { + PropertyDeclaration::Color(DeclaredValue::Value(Box::new(CSSRGBA { parsed: color, authored: None, - })))); + }))))); } let font_family = if let Some(this) = self.downcast::<HTMLFontElement>() { @@ -480,10 +480,10 @@ impl LayoutElementHelpers for LayoutJS<Element> { let width_value = specified::Length::from_px(cellspacing as f32); hints.push(from_declaration( PropertyDeclaration::BorderSpacing(DeclaredValue::Value( - border_spacing::SpecifiedValue { + Box::new(border_spacing::SpecifiedValue { horizontal: width_value.clone(), vertical: width_value, - })))); + }))))); } |