зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1446451: GetPropertyValue can indeed not return an integer if the node is not displayed. r=masayuki
MozReview-Commit-ID: Gk0PffVE7bz --HG-- extra : rebase_source : ded727b58d4184a9723d9f2d196882462384bce7
This commit is contained in:
Родитель
14e7f20734
Коммит
06bfed73ea
|
@ -69,13 +69,10 @@ GetCSSFloatValue(nsComputedDOMStyle* aComputedStyle,
|
|||
return 0;
|
||||
}
|
||||
|
||||
MOZ_ASSERT(value.Length() > 2, "Should always have a `px` suffix");
|
||||
|
||||
// We only care about resolved values, not a big deal if the element is
|
||||
// undisplayed, for example, and the value is "auto" or what not.
|
||||
int32_t val = value.ToInteger(&rv);
|
||||
MOZ_ASSERT(NS_SUCCEEDED(rv),
|
||||
"These properties should only get resolved values");
|
||||
|
||||
return val;
|
||||
return NS_SUCCEEDED(rv) ? val : 0;
|
||||
}
|
||||
|
||||
class ElementDeletionObserver final : public nsStubMutationObserver
|
||||
|
|
|
@ -0,0 +1,8 @@
|
|||
<script>
|
||||
function go() {
|
||||
document.execCommand("insertImage", false, "o")
|
||||
}
|
||||
</script>
|
||||
<body onload=go()>
|
||||
<meter contenteditable="true">
|
||||
<dialog>
|
|
@ -97,3 +97,4 @@ load 1408170.html
|
|||
load 1414581.html
|
||||
load 1415231.html
|
||||
load 1425091.html
|
||||
load 1446451.html
|
||||
|
|
Загрузка…
Ссылка в новой задаче