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 upIssue #10284 Ignore alternate stylesheets #10319
Conversation
highfive
commented
Mar 31, 2016
|
Heads up! This PR modifies the following files:
|
|
The change to MANIFEST.json looks very wrong; did you use |
|
Yes, I have used |
|
The manifest thing is a known issue and won't cause any problems being merged. |
|
components/script/dom/htmllinkelement.rs, line 93 [r2] (raw file): let mut substrings = value.split(HTML_SPACE_CHARACTERS);
let mut substrings2 = substrings.clone();
substrings.any(|s| s.eq_ignore_ascii_case("stylesheet"))
&& !substrings2.any(|s| s.eq_ignore_ascii_case("alternate"))Comments from the review on Reviewable.io |
|
|
|
There is a merge conflict in MANIFEST.json, what should I do ? I have error if I keep my changes or if I keep the new ones. |
|
@mylainos It's usually easiest to keep the new changes and run |
|
There is a lot of errors like this one:
|
|
Oh, that wasn't supposed to end up running any tests. Odd. Anyways, you can ignore those (and feel free to interrupt it in the future if it starts running tests when you're not trying to do so). |
|
There is no error when I do |
|
Debug builds in particular are known to have problems with tests in 2dcontext/, so I wouldn't worry about it too much. Running the full testsuite locally usually isn't a great use of your time; it's better to focus on particular tests or directories that are relevant. |
|
Ok thanks. |
|
How could I avoid this error |
|
That happens when the build machines run |
|
Done ! |
|
Can you squash the commits? They look good to me! :) |
|
-S-awaiting-review Reviewed 4 of 6 files at r1, 1 of 1 files at r2, 1 of 1 files at r4. components/script/dom/htmllinkelement.rs, line 93 [r2] (raw file): let mut found_stylesheet = false;
for s in value.split(HTML_SPACE_CHARACTERS).iter() {
match_ignore_ascii_case! { s,
"stylesheet" => found_stylesheet = true,
"alternate" => return false, // We don't load alternate stylesheets
_ => {},
}
}
found_stylesheetThough arguably less readable. In practice, I don't think it matters too much, since I don't think we expect a huge amount of values in a Comments from Reviewable |
|
I have this error when I test your code |
|
Yeah, sorry, it's defined in cssparser and we're on script so it's not on scope. The inner part of the loop is equivalent to: if s.eq_ignore_ascii_case("alternate") {
return false;
}
if s.eq_ignore_ascii_case("stylesheet") {
found_stylesheet = true;
} |
|
|
|
Looks great, thanks! @bors-servo: r+ |
|
|
Issue #10284 Ignore alternate stylesheets <!-- Reviewable:start --> This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10319) <!-- Reviewable:end -->
| return false; | ||
| } | ||
|
|
||
| if s.eq_ignore_ascii_case("stylesheet") == true { |
This comment has been minimized.
This comment has been minimized.
KiChjang
Apr 5, 2016
Member
@bors-servo r-
nit: You can drop the == true here and the one above as well.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
mylainos
Apr 5, 2016
Author
Contributor
I forgot to remove it. I had a an error when I was using .iter() which said it didn't know the type.
|
Now there it goes! @bors-servo: r+ |
|
|
Issue #10284 Ignore alternate stylesheets <!-- Reviewable:start --> This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10319) <!-- Reviewable:end -->
|
|
mylainos commentedMar 31, 2016
This change is