Open
Bug 728126
Opened 14 years ago
Updated 3 years ago
provide non-flush version of nsComputedDOMStyle
Categories
(Core :: DOM: CSS Object Model, defect)
Core
DOM: CSS Object Model
Tracking
()
NEW
People
(Reporter: surkov, Unassigned)
Details
(spun off bug 714579 comment#21)
It could look like:
1) add nsComputedDOMStyle* dom::Element::GetComputedStyle(bool aDoFlush = false). Bool argument points whether layout should be flushed or not.
2) extend nsComputedDOMStyle to provide methods for styling getting, for example Margin(css::Side).
2.1) one version to get a string representation of style, for example, Margin(css::Side, nsAString& aString)
2.2) second version to get a value object. That could be nsIDOMCSSValue* or preferable an instance of class similar to nsROCSSPrimitiveValue (dexpcomed version), for example, css::PrimitiveValue Margin(css::Side)
Alternatively
1a) add nsComputedDOMStyle* dom::Element::GetComputedStyle()
2a) add methods like described in 2) with layout flush argument like:
css::PrimitiveValue Margin(css::Side, bool aDoFlush)
Ah, and please remove accessible/src/base/Style.h introduced in bug 714579
We shouldn't have a non-flushing version of nsComputedDOMStyle because internal code should just be getting data it wants from style structs. Or are you referring to further exposing nsComputedDOMStyle::GetStyleContextForElementNoFlush ?
| Reporter | ||
Comment 2•14 years ago
|
||
Accessibility needs string representations of styles that's what nsComputedDOMStyle knows how to do this. So, nsComputedDOMStyle::GetStyleContextForElementNoFlush is not enough for a11y, I meant we do this (see bug 714579) but we dupe the code of nsComputedDOMStyle.
Updated•3 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•