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 upCSSOM: Whole ton of things #14241
CSSOM: Whole ton of things #14241
Conversation
highfive
commented
Nov 16, 2016
|
Heads up! This PR modifies the following files:
|
|
|
||
| // Step 1, 2 | ||
| // XXXManishearth get url from correct location | ||
| // XXXManishearth should we also store the namespace map? |
This comment has been minimized.
This comment has been minimized.
| return Err(Error::IndexSize); | ||
| } | ||
|
|
||
| // XXXManishearth Step 5 (throw HierarchyRequestError in invalid situations) |
This comment has been minimized.
This comment has been minimized.
Manishearth
Nov 16, 2016
Author
Member
spec is very vague here. will have to check against gecko (and file an issue)
|
@bors-servo try |
|
|
CSSOM: Add insertRule() and deleteRule() on CSSStyleSheet; LinkStyle impls on <style> and <link> CSSOM is now starting to be useful! Based on #14190. Only the <s>last commit</s> last two commits need review. cc @Xidorn . This doesn't change the style API, but adds useful methods. part of #11420 r? @SimonSapin <!-- 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/14241) <!-- Reviewable:end -->
|
|
|
|
CSSOM: Add insertRule() and deleteRule() on CSSStyleSheet; LinkStyle impls on <style> and <link> CSSOM is now starting to be useful! Based on #14190. Only the <s>last commit</s> last two commits need review. cc @Xidorn . This doesn't change the style API, but adds useful methods. part of #11420 r? @SimonSapin <!-- 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/14241) <!-- Reviewable:end -->
|
|
|
Looks good modulo inline comments. (Opening this before #14190 is merged makes review slightly harder…) Review status: 0 of 75 files reviewed at latest revision, 7 unresolved discussions. components/script/dom/cssrulelist.rs, line 79 at r6 (raw file):
|
|
Review status: 0 of 75 files reviewed at latest revision, 7 unresolved discussions. components/script/dom/cssrulelist.rs, line 115 at r6 (raw file):
|
|
Made it handle state (and other review fixups) |
|
@bors-servo try |
CSSOM: Add insertRule() and deleteRule() on CSSStyleSheet; LinkStyle impls on <style> and <link> CSSOM is now starting to be useful! Based on #14190. Only the <s>last commit</s> last two commits need review. cc @Xidorn . This doesn't change the style API, but adds useful methods. part of #11420 r? @SimonSapin <!-- 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/14241) <!-- Reviewable:end -->
|
Added support for keyframe-backed |
|
@bors-servo r=SimonSapin |
|
|
CSSOM: Whole ton of things CSSOM is now starting to be useful! Based on #14190. Only the <s>last commit</s> last two commits need review. cc @Xidorn . This doesn't change the style API, but adds useful methods. part of #11420 This adds: - `insertRule()` and `deleteRule()` on `CSSStyleSheet`, `CSSGroupingRule` - `.style` getters on link and style elements - Keyframes-backed `CSSRules` and `CSSKeyframesRule.cssRules` - `CSSGroupingRule.cssRules` - `prefix` and `namespaceURI` attributes of `CSSNamespaceRule` - Fixups regarding parent stylesheets r? @SimonSapin <!-- 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/14241) <!-- Reviewable:end -->
|
|
|
You didn't successfully cc'ed me... The algorithm of |
|
I tried to make it as reusable as possible. Because of the parallel dom tree the algorithm involves DOM code as well and is hard to separate. The parsing/insertion validity algorithms are in stylesheets.rs though. |
Manishearth commentedNov 16, 2016
•
edited
CSSOM is now starting to be useful!
Based on #14190. Only the
last commitlast two commits need review.cc @Xidorn . This doesn't change the style API, but adds useful methods.
part of #11420
This adds:
insertRule()anddeleteRule()onCSSStyleSheet,CSSGroupingRule.stylegetters on link and style elementsCSSRulesandCSSKeyframesRule.cssRulesCSSGroupingRule.cssRulesprefixandnamespaceURIattributes ofCSSNamespaceRuler? @SimonSapin
This change is