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 upImplement CSSOM APIs for hierarchical stylesheet investigation and manipulation #11420
Comments
|
I've completed said "interesting part of the project" (all the above interfaces know about each other), now all that's left is working on individual attributes. Not sure if this needs to be closed. |
This was referenced Nov 16, 2016
Merged
bors-servo
added a commit
that referenced
this issue
Nov 16, 2016
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 -->
bors-servo
added a commit
that referenced
this issue
Nov 16, 2016
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 -->
bors-servo
added a commit
that referenced
this issue
Nov 16, 2016
Immutable CSSOM This PR is intended to add basic support for all CSSOM interfaces, with the ability to index `document.styleSheets` and css rule lists, and serializing individual css rules. Handling individual interface methods for CSSRule subclasses can probably be done with easy/medium bugs. Mutation safety isn't dealt with here; if the css rule list is mutated the CSSOM will be in an inconsistent state. I intend to deal with this via zero sized tokens, see https://groups.google.com/forum/#!topic/mozilla.dev.servo/AnxJoVmtMXQ . I'll handle that when I start making the CSSOM mutable. (Getting the immutable bit landed first opens this up for easy bugs) This doesn't really change style aside from adding an extra arc in the CSS rule list as discussed in the linked thread. So far this same design can be used by stylo as well when the time comes. f? @SimonSapin @emilio cc @upsuper part of #11420 Todo: - [x] Stubs for rest of the CSSRule subclasses - [x] <s>ToCSS impls for CSSRules.</s> May make into easy bugs and stub out in this PR #14195 - [x] Cache CSSStyleSheet on the relevant node <!-- 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/14190) <!-- Reviewable:end -->
bors-servo
added a commit
that referenced
this issue
Nov 16, 2016
Immutable CSSOM This PR is intended to add basic support for all CSSOM interfaces, with the ability to index `document.styleSheets` and css rule lists, and serializing individual css rules. Handling individual interface methods for CSSRule subclasses can probably be done with easy/medium bugs. Mutation safety isn't dealt with here; if the css rule list is mutated the CSSOM will be in an inconsistent state. I intend to deal with this via zero sized tokens, see https://groups.google.com/forum/#!topic/mozilla.dev.servo/AnxJoVmtMXQ . I'll handle that when I start making the CSSOM mutable. (Getting the immutable bit landed first opens this up for easy bugs) This doesn't really change style aside from adding an extra arc in the CSS rule list as discussed in the linked thread. So far this same design can be used by stylo as well when the time comes. f? @SimonSapin @emilio cc @upsuper part of #11420 Todo: - [x] Stubs for rest of the CSSRule subclasses - [x] <s>ToCSS impls for CSSRules.</s> May make into easy bugs and stub out in this PR #14195 - [x] Cache CSSStyleSheet on the relevant node <!-- 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/14190) <!-- Reviewable:end -->
bors-servo
added a commit
that referenced
this issue
Nov 16, 2016
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 -->
bors-servo
added a commit
that referenced
this issue
Nov 17, 2016
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 -->
bors-servo
added a commit
that referenced
this issue
Nov 18, 2016
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 -->
bors-servo
added a commit
that referenced
this issue
Nov 23, 2016
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 -->
bors-servo
added a commit
that referenced
this issue
Nov 23, 2016
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 -->
|
We have these now, and can open new issues for any particular missing pieces. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
For more information, see the specification introduction.
Components:
CSSRule)#10765 was an attempt at this, but it got stuck on hooking up the actual relationships between the various DOM objects which is the most interesting part of this project.