зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1404140 - Return early when trying to flush to get the style of a disconnected element. r=heycam
We just don't return a styles for them anyway, and this simplifies the following patches a bit. Differential Revision: https://phabricator.services.mozilla.com/D40297
This commit is contained in:
Родитель
d53b9edd1d
Коммит
ac6ac81c6f
|
@ -828,6 +828,13 @@ void nsComputedDOMStyle::UpdateCurrentStyleSources(bool aNeedsLayoutFlush) {
|
|||
return;
|
||||
}
|
||||
|
||||
// We don't return styles for disconnected elements anymore, so don't go
|
||||
// through the trouble of flushing or what not.
|
||||
if (!mElement->IsInComposedDoc()) {
|
||||
ClearComputedStyle();
|
||||
return;
|
||||
}
|
||||
|
||||
// TODO(emilio): We may want to handle a few special-cases here:
|
||||
//
|
||||
// * https://github.com/w3c/csswg-drafts/issues/1964
|
||||
|
|
Загрузка…
Ссылка в новой задаче