mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1139937 - Don't try accessing the computedStyle of pseudo elements on reflow; r=miker
In some situations the WalkerActor tries to access the computed-style (via css-logic.css) of pseudo (after or before) elements in the DOM. It does this on reflows to update the visibility indicator on nodes in the inspector-panel. This fixes early checks in the reflows event handler to avoid trying to get the style if the node isn't an element.
This commit is contained in:
parent
0c9336dbb9
commit
84737b3f2a
@ -324,9 +324,15 @@ var NodeActor = exports.NodeActor = protocol.ActorClass({
|
||||
* Is the node's display computed style value other than "none"
|
||||
*/
|
||||
get isDisplayed() {
|
||||
// Consider all non-element nodes as displayed.
|
||||
if (this.rawNode.nodeType !== Ci.nsIDOMNode.ELEMENT_NODE ||
|
||||
this.isAfterPseudoElement ||
|
||||
this.isBeforePseudoElement) {
|
||||
return true;
|
||||
}
|
||||
|
||||
let style = this.computedStyle;
|
||||
if (!style) {
|
||||
// Consider all non-element nodes as displayed
|
||||
return true;
|
||||
} else {
|
||||
return style.display !== "none";
|
||||
|
Loading…
Reference in New Issue
Block a user