Closed
Bug 1405427
Opened 7 years ago
Closed 7 years ago
Clarify Stylesheet IsComplete and IsModified invariants
Categories
(Core :: CSS Parsing and Computation, enhancement, P3)
Core
CSS Parsing and Computation
Tracking
()
RESOLVED
INVALID
Tracking | Status | |
---|---|---|
firefox57 | --- | wontfix |
People
(Reporter: bradwerth, Assigned: bradwerth)
References
Details
There are some poorly-named and incompletely enforced invariants in StyleSheet that should be corrected:
1) Incomplete sheets must not modify their inners. This is enforced by having almost all callers of WillDirty() assert or throw exceptions if the sheet is incomplete. One exception is StyleSheet::PrependStyleSheet, which works on incomplete sheets but doesn't change the inner. There are other functions which should enforce this invariant, but don't:
* CSSStyleSheet::AppendStyleRule
* CSSStyleSheet::DeleteRuleInternal
* MediaList::DoMediaChange
* DOMCSSDeclarationImpl::GetCSSDeclaration -- this can only come after a successful EnsureSafeToHandoutCSSRules, so probably fine.
It would be more clear to rename mDirty into mInnerDirty, since that's what it actually means. Possibly this flag should even move into the inner itself.
2) EnsureUniqueInner currently marks an inner as modified, even if nothing is actually changed (if inner is already unique). DidDirty asserts IsModified, and that should be relaxed to account for the cases where WillDirty early exits.
Updated•7 years ago
|
status-firefox57:
--- → wontfix
Priority: -- → P3
Assignee | ||
Comment 1•7 years ago
|
||
(In reply to Brad Werth [:bradwerth] from comment #0)
> There are some poorly-named and incompletely enforced invariants in
> StyleSheet that should be corrected:
These issues were all addressed as non-issues by Xidorn in Bug 1374181#c22. None of this work is needed.
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → INVALID
You need to log in
before you can comment on or make changes to this bug.
Description
•