зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1442506: Adjust assertion to allow empty appends. r=xidorn
Deletion at the end of a text-node ends up translated to an empty append. It's harmless though. Reviewers: xidorn Bug #: 1442506 Differential Revision: https://phabricator.services.mozilla.com/D667 MozReview-Commit-ID: DqheOYVWx8o
This commit is contained in:
Родитель
32245cbe28
Коммит
549e302e25
|
@ -207,7 +207,7 @@ WhitespaceOnlyChangedOnAppend(const CharT* aBuffer,
|
|||
size_t aOldLength,
|
||||
size_t aNewLength)
|
||||
{
|
||||
MOZ_ASSERT(aOldLength < aNewLength);
|
||||
MOZ_ASSERT(aOldLength <= aNewLength);
|
||||
if (!WhitespaceOnly(aBuffer, aOldLength)) {
|
||||
// The old text was already not whitespace-only.
|
||||
return false;
|
||||
|
|
|
@ -0,0 +1,10 @@
|
|||
<script>
|
||||
function go() {
|
||||
var b = window.getSelection();
|
||||
var c = document.getSelection();
|
||||
b.setBaseAndExtent(document.getElementById("a"), 0, document.body.firstChild, 1);
|
||||
c.deleteFromDocument();
|
||||
}
|
||||
</script>
|
||||
<body onload=go()>
|
||||
<p id="a">
|
|
@ -525,3 +525,4 @@ load 1429961.html
|
|||
load 1435015.html
|
||||
load 1429962.html
|
||||
pref(dom.webcomponents.shadowdom.enabled,true) load 1439016.html
|
||||
load 1442506.html
|
||||
|
|
Загрузка…
Ссылка в новой задаче