mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 911201 - Do not create a bogus br node for editable areas containing non-editable block elements; r=roc
We no longer rely on the bogus br node for positioning the caret. If an editable region has a non-editable block element, we can probably rely on the block element to reserve the vertical height, so in those cases we should be able to get away without a bogus br node.
This commit is contained in:
parent
8171f332a2
commit
91b95e46ea
@ -1154,7 +1154,7 @@ nsTextEditRules::CreateBogusNodeIfNeeded(Selection* aSelection)
|
||||
bodyChild = bodyChild->GetNextSibling()) {
|
||||
if (mEditor->IsMozEditorBogusNode(bodyChild) ||
|
||||
!mEditor->IsEditable(body) || // XXX hoist out of the loop?
|
||||
mEditor->IsEditable(bodyChild)) {
|
||||
mEditor->IsEditable(bodyChild) || mEditor->IsBlockNode(bodyChild)) {
|
||||
return NS_OK;
|
||||
}
|
||||
}
|
||||
|
2
editor/reftests/911201-ref.html
Normal file
2
editor/reftests/911201-ref.html
Normal file
@ -0,0 +1,2 @@
|
||||
<!DOCTYPE html>
|
||||
<body contenteditable><div contenteditable=false>foo</div></body>
|
2
editor/reftests/911201.html
Normal file
2
editor/reftests/911201.html
Normal file
@ -0,0 +1,2 @@
|
||||
<!DOCTYPE html>
|
||||
<body contenteditable onload="document.body.innerHTML='<div contenteditable=false>foo</div>';"></body>
|
@ -125,6 +125,7 @@ needs-focus == spellcheck-contenteditable-focused-reframe.html spellcheck-conten
|
||||
== spellcheck-contenteditable-attr-dynamic-override-inherit.html spellcheck-contenteditable-disabled-ref.html
|
||||
== spellcheck-contenteditable-property-dynamic-override.html spellcheck-contenteditable-disabled-ref.html
|
||||
== spellcheck-contenteditable-property-dynamic-override-inherit.html spellcheck-contenteditable-disabled-ref.html
|
||||
== 911201.html 911201-ref.html
|
||||
needs-focus == 969773.html 969773-ref.html
|
||||
== 997805.html 997805-ref.html
|
||||
== 1088158.html 1088158-ref.html
|
||||
|
Loading…
Reference in New Issue
Block a user