mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1022741 - Use CrossShadowCurrentDoc() in Element::UpdateState. r=smaug
This commit is contained in:
parent
d0501e85e9
commit
4ea70e9814
@ -216,7 +216,7 @@ Element::UpdateState(bool aNotify)
|
||||
if (aNotify) {
|
||||
EventStates changedStates = oldState ^ mState;
|
||||
if (!changedStates.IsEmpty()) {
|
||||
nsIDocument* doc = GetCurrentDoc();
|
||||
nsIDocument* doc = GetCrossShadowCurrentDoc();
|
||||
if (doc) {
|
||||
nsAutoScriptBlocker scriptBlocker;
|
||||
doc->ContentStateChanged(this, changedStates);
|
||||
|
@ -0,0 +1,6 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<body>
|
||||
<input type="checkbox" checked><div style="height: 50px; width: 50px; background: green;"></div>
|
||||
</body>
|
||||
</html>
|
23
layout/reftests/webcomponents/input-transition-1.html
Normal file
23
layout/reftests/webcomponents/input-transition-1.html
Normal file
@ -0,0 +1,23 @@
|
||||
<!DOCTYPE html>
|
||||
<html class="reftest-wait">
|
||||
<head>
|
||||
</head>
|
||||
<body>
|
||||
<div id="host"></div>
|
||||
<script>
|
||||
var host = document.getElementById("host");
|
||||
var root = host.createShadowRoot();
|
||||
root.innerHTML = '<style>input ~ div { background: red; transition: background 100ms; } input:checked ~ div { background: green; }</style><input id="one" type="checkbox"><div style="height: 50px; width: 50px;"></div>';
|
||||
|
||||
function tweak() {
|
||||
var el = root.getElementById("one");
|
||||
el.checked = true;
|
||||
el.nextSibling.addEventListener("transitionend", function() {
|
||||
document.documentElement.removeAttribute("class");
|
||||
}, false);
|
||||
}
|
||||
|
||||
window.addEventListener("MozReftestInvalidate", tweak, false);
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
@ -13,3 +13,4 @@ pref(dom.webcomponents.enabled,true) == nested-insertion-point-1.html nested-ins
|
||||
pref(dom.webcomponents.enabled,true) == basic-shadow-element-1.html basic-shadow-element-1-ref.html
|
||||
pref(dom.webcomponents.enabled,true) == nested-shadow-element-1.html nested-shadow-element-1-ref.html
|
||||
pref(dom.webcomponents.enabled,true) == update-dist-node-descendants-1.html update-dist-node-descendants-1-ref.html
|
||||
pref(dom.webcomponents.enabled,true) random-if(B2G&&browserIsRemote) == input-transition-1.html input-transition-1-ref.html # Failure on B2G emulator due to Bug 1018381
|
||||
|
@ -943,7 +943,7 @@ nsTransitionManager::FlushTransitions(FlushFlags aFlags)
|
||||
CommonElementAnimationData::CanAnimateFlags(0)) &&
|
||||
et->CanThrottleAnimation(now);
|
||||
|
||||
NS_ABORT_IF_FALSE(et->mElement->GetCurrentDoc() ==
|
||||
NS_ABORT_IF_FALSE(et->mElement->GetCrossShadowCurrentDoc() ==
|
||||
mPresContext->Document(),
|
||||
"Element::UnbindFromTree should have "
|
||||
"destroyed the element transitions object");
|
||||
|
Loading…
Reference in New Issue
Block a user