aboutsummaryrefslogtreecommitdiffstats
path: root/components/layout/construct.rs
diff options
context:
space:
mode:
authorbors-servo <lbergstrom+bors@mozilla.com>2018-04-03 18:12:13 -0400
committerGitHub <noreply@github.com>2018-04-03 18:12:13 -0400
commitd744e35d38ce84f7209eb1fc41d2d9f38545d0de (patch)
tree4358de73814b0ab509fd896482f26ca45b99ebad /components/layout/construct.rs
parentd0a9fdb92b1476bc42603b495a01bd10da18d978 (diff)
parentcc838f54e5042668259ddd9235d8af34230a9fd8 (diff)
downloadservo-d744e35d38ce84f7209eb1fc41d2d9f38545d0de.tar.gz
servo-d744e35d38ce84f7209eb1fc41d2d9f38545d0de.zip
Auto merge of #20482 - brainlessdeveloper:list-style-image-computed, r=emilio
Implement a URL-generic type for ListStyleImage <!-- Please describe your changes on the following line: --> This should fix the following two "expected to fail" tests described in https://github.com/servo/servo/issues/18015: - getComputedStyle(elem) for url() listStyleImage uses the resolved URL and elem.style uses the original URL - getComputedStyle(elem) for url() listStyle uses the resolved URL and elem.style uses the original URL I updated the test failure expectations by removing the corresponding `.ini` file. --- <!-- 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 #18015 (github issue number if applicable). <!-- Either: --> - [x] There are tests for these changes OR - [ ] These changes do not require tests because _____ <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- 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/20482) <!-- Reviewable:end -->
Diffstat (limited to 'components/layout/construct.rs')
-rw-r--r--components/layout/construct.rs7
1 files changed, 3 insertions, 4 deletions
diff --git a/components/layout/construct.rs b/components/layout/construct.rs
index 3849e43ad51..291e8941e7d 100644
--- a/components/layout/construct.rs
+++ b/components/layout/construct.rs
@@ -52,11 +52,10 @@ use style::context::SharedStyleContext;
use style::dom::TElement;
use style::logical_geometry::Direction;
use style::properties::ComputedValues;
-use style::properties::longhands::list_style_image;
use style::selector_parser::{PseudoElement, RestyleDamage};
use style::servo::restyle_damage::ServoRestyleDamage;
-use style::values::Either;
use style::values::computed::counters::ContentItem;
+use style::values::generics::url::UrlOrNone as ImageUrlOrNone;
use table::TableFlow;
use table_caption::TableCaptionFlow;
use table_cell::TableCellFlow;
@@ -1278,13 +1277,13 @@ impl<'a, ConcreteThreadSafeLayoutNode: ThreadSafeLayoutNode>
-> ConstructionResult {
let flotation = FloatKind::from_property(flotation);
let marker_fragments = match node.style(self.style_context()).get_list().list_style_image {
- list_style_image::computed_value::T(Either::First(ref url_value)) => {
+ ImageUrlOrNone::Url(ref url_value) => {
let image_info = Box::new(ImageFragmentInfo::new(
url_value.url().map(|u| u.clone()), node, &self.layout_context
));
vec![Fragment::new(node, SpecificFragmentInfo::Image(image_info), self.layout_context)]
}
- list_style_image::computed_value::T(Either::Second(_none)) => {
+ ImageUrlOrNone::None => {
match ListStyleTypeContent::from_list_style_type(node.style(self.style_context())
.get_list()
.list_style_type) {