Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upFix CSSStyleDeclaration::setPropertyPriority and some refactoring #6741
Conversation
hoppipolla-critic-bot
commented
Jul 24, 2015
|
Critic review: https://critic.hoppipolla.co.uk/r/5646 This is an external review system which you may optionally use for the code review of your pull request. In order to help critic track your changes, please do not make in-place history rewrites (e.g. via |
|
Reviewed 1 of 1 files at r1, 6 of 6 files at r2, 4 of 4 files at r3, 4 of 4 files at r4. components/script/dom/cssstyledeclaration.rs, line 80 [r4] (raw file): components/script/dom/cssstyledeclaration.rs, line 81 [r3] (raw file): components/script/dom/cssstyledeclaration.rs, line 81 [r5] (raw file): components/script/dom/cssstyledeclaration.rs, line 160 [r3] (raw file): components/script/dom/cssstyledeclaration.rs, line 235 [r3] (raw file): components/script/dom/cssstyledeclaration.rs, line 271 [r2] (raw file): components/style/build.rs, line 26 [r1] (raw file): components/style/properties.mako.rs, line 6186 [r2] (raw file): tests/ref/basic.list, line 280 [r2] (raw file): Comments from the review on Reviewable.io |
|
Review status: 4 of 9 files reviewed at latest revision, 8 unresolved discussions, all commit checks successful. components/script/dom/cssstyledeclaration.rs, line 81 [r3] (raw file): components/script/dom/cssstyledeclaration.rs, line 81 [r4] (raw file): components/script/dom/cssstyledeclaration.rs, line 160 [r3] (raw file): components/script/dom/cssstyledeclaration.rs, line 234 [r3] (raw file): components/style/build.rs, line 26 [r1] (raw file): components/style/properties.mako.rs, line 6194 [r2] (raw file): tests/ref/basic.list, line 280 [r2] (raw file): Comments from the review on Reviewable.io |
|
I had done something wrong when cherry-picking commits before submitting this PR, so I rebased/squashed/cherry-picked/massaged the whole thing again. r? |
|
@Ms2ger ping |
|
|
|
Rebased. |
|
Reviewed 4 of 4 files at r5, 2 of 2 files at r6, 12 of 12 files at r7. Comments from the review on Reviewable.io |
|
I could if necessary and with some time spent re-acquainting myself with the code. |
|
|
|
Rebased. |
|
@bors-servo: r+ |
|
|
Fix CSSStyleDeclaration::setPropertyPriority and some refactoring r? @Ms2ger <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6741) <!-- Reviewable:end -->
|
|
|
I didn’t remember why @bors-servo r=pcwalton 06ba62b commit 0b3e3bc3e9477e617ba784c4bb9e5b32482d0d04
Author: Simon Sapin <simon.sapin@exyr.org>
Date: Sat Jul 25 00:43:27 2015 +0200
Remove PartialEq from CSS stylesheets, rules, and declarations.
We shouldn’t be doing deep comparison of such large objects.
diff --git a/components/style/properties.mako.rs b/components/style/properties.mako.rs
index 5d15cd1..8b2d635 100644
--- a/components/style/properties.mako.rs
+++ b/components/style/properties.mako.rs
@@ -5522,7 +5522,7 @@ mod property_bit_field {
/// Declarations are stored in reverse order.
/// Overridden declarations are skipped.
-#[derive(Debug, PartialEq)]
+#[derive(Debug)]
pub struct PropertyDeclarationBlock {
pub important: Arc<Vec<PropertyDeclaration>>,
pub normal: Arc<Vec<PropertyDeclaration>>,
@@ -5669,7 +5669,6 @@ impl<T: ToCss> DeclaredValue<T> {
}
}
-#[derive(PartialEq)]
pub enum PropertyDeclaration {
% for property in LONGHANDS:
${property.camel_case}(DeclaredValue<longhands::${property.ident}::SpecifiedValue>),
diff --git a/components/style/stylesheets.rs b/components/style/stylesheets.rs
index 3093f8e..d77980d 100644
--- a/components/style/stylesheets.rs
+++ b/components/style/stylesheets.rs
@@ -38,7 +38,7 @@ pub enum Origin {
}
-#[derive(Debug, PartialEq)]
+#[derive(Debug)]
pub struct Stylesheet {
/// List of rules in the order they were found (important for
/// cascading order)
@@ -47,7 +47,7 @@ pub struct Stylesheet {
}
-#[derive(Debug, PartialEq)]
+#[derive(Debug)]
pub enum CSSRule {
Charset(String),
Namespace(Option<String>, Namespace),
@@ -57,7 +57,7 @@ pub enum CSSRule {
Viewport(ViewportRule),
}
-#[derive(Debug, PartialEq)]
+#[derive(Debug)]
pub struct MediaRule {
pub media_queries: MediaQueryList,
pub rules: Vec<CSSRule>,
@@ -70,7 +70,7 @@ impl MediaRule {
}
}
-#[derive(Debug, PartialEq)]
+#[derive(Debug)]
pub struct StyleRule {
pub selectors: Vec<Selector>,
pub declarations: PropertyDeclarationBlock, |
Fix CSSStyleDeclaration::setPropertyPriority and some refactoring r? @Ms2ger <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6741) <!-- Reviewable:end -->
|
|
|
@bors-servo retry
|
SimonSapin commentedJul 24, 2015
r? @Ms2ger