Closed
Bug 870845
Opened 12 years ago
Closed 12 years ago
API for helping get all CSS property names missing a bunch of properties
Categories
(Core :: CSS Parsing and Computation, defect)
Core
CSS Parsing and Computation
Tracking
()
RESOLVED
FIXED
mozilla24
People
(Reporter: miker, Assigned: bzbarsky)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
1.33 KB,
patch
|
heycam
:
review+
|
Details | Diff | Splinter Review |
In bug 839443 platform created domUtils.getCSSPropertyNames() but the output is missing a bunch of properties (the full list would be the properties returned by getComputedStyle()).
STR:
1. Ensure that devtools.chrome.enabled is true
2. Open the web console
3. Open Scratchpad
4. From Environment menu select Browser.
5. Paste the following code into Scratchpad:
############################
let domUtils = Cc["@mozilla.org/inspector/dom-utils;1"].getService(Ci.inIDOMUtils);
let names = domUtils.getCSSPropertyNames(domUtils.INCLUDE_ALIASES & domUtils.EXCLUDE_SHORTHANDS);
content.console.log(names.length + " properties from getCSSPropertyNames():");
content.console.log(names.sort());
let computed = content.getComputedStyle(content.document.body);
content.console.log("There are " + computed.length + " properties from getComputedStyle()");
content.console.log(computed);
let missingFromGetCSSPropertyNames = [];
for (let prop of computed) {
if (names.indexOf(prop) == -1) {
missingFromGetCSSPropertyNames.push(prop);
}
}
content.console.log(missingFromGetCSSPropertyNames.length + " properties missing from getCSSPropertyNames():");
content.console.log(missingFromGetCSSPropertyNames);
############################
6. Run the code and you will see that 146 property names are missing when using getCSSPropertyNames().
Assignee | ||
Comment 1•12 years ago
|
||
Ouch. PARSE_INACCESSIBLE doesn't work the way I thought it worked. Fix coming up.
Assignee | ||
Comment 2•12 years ago
|
||
Attachment #748020 -
Flags: review?(cam)
Assignee | ||
Updated•12 years ago
|
Assignee: nobody → bzbarsky
Assignee | ||
Updated•12 years ago
|
Whiteboard: [need review]
Comment 3•12 years ago
|
||
Comment on attachment 748020 [details] [diff] [review]
Correctly check or parse-inaccessible properties in inDOMUtils::GetCSSPropertyNames.
Since it doesn't make sense to treat the CSS_PROPERTY_PARSE_* values as flags, can you add an assertion to nsCSSProps::PropHasFlags that it doesn't have any of those bits set in aFlags? And similar assertions in PropertyParseType and ValueRestrictions to maek sure we only pass in values that have bits set in the right places. r=me with that.
Attachment #748020 -
Flags: review?(cam) → review+
Assignee | ||
Comment 4•12 years ago
|
||
PropertyParseType and PropertyParseType don't take flags; they just return them.
I added an assert to PropHasFlags.
https://hg.mozilla.org/integration/mozilla-inbound/rev/267fe0d9c201
Flags: in-testsuite?
Whiteboard: [need review]
Target Milestone: --- → mozilla24
Comment 5•12 years ago
|
||
Backed out for mochitest-bc, mochitest-other, and xpcshell orange.
https://hg.mozilla.org/integration/mozilla-inbound/rev/9182c3e6a967
Assignee | ||
Comment 6•12 years ago
|
||
The problem was from bug 869195.
Relanded: https://hg.mozilla.org/integration/mozilla-inbound/rev/1835839d5a61
Comment 7•12 years ago
|
||
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•