mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Back out bac4434b31d2 for test failures
This commit is contained in:
parent
da0b199401
commit
b1a4eb7966
@ -1,20 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<script>
|
||||
|
||||
function boom()
|
||||
{
|
||||
window.getSelection().removeAllRanges();
|
||||
var r = document.createRange();
|
||||
r.setStart(document.getElementById("x"), 1);
|
||||
r.setEnd(document.getElementById("y"), 0);
|
||||
window.getSelection().addRange(r);
|
||||
document.execCommand("insertorderedlist", false, null);
|
||||
}
|
||||
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body onload="boom();"><div id="x" contenteditable="true">a</div><div id="y" contenteditable="true"></div></body>
|
||||
</html>
|
@ -30,4 +30,3 @@ load 759748.html
|
||||
load 761861.html
|
||||
load 766795.html
|
||||
load 766305.html
|
||||
load 766387.html
|
||||
|
@ -3598,36 +3598,6 @@ nsHTMLEditor::IsModifiableNode(nsINode *aNode)
|
||||
return !aNode || aNode->IsEditable();
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsHTMLEditor::GetIsSelectionEditable(bool* aIsSelectionEditable)
|
||||
{
|
||||
MOZ_ASSERT(aIsSelectionEditable);
|
||||
|
||||
nsRefPtr<Selection> selection = GetSelection();
|
||||
NS_ENSURE_TRUE(selection, NS_ERROR_NULL_POINTER);
|
||||
|
||||
// Per the editing spec as of June 2012: we have to have a selection whose
|
||||
// start and end nodes are editable, and which share an ancestor editing
|
||||
// host. (Bug 766387.)
|
||||
*aIsSelectionEditable = selection->GetRangeCount() &&
|
||||
selection->GetAnchorNode()->IsEditable() &&
|
||||
selection->GetFocusNode()->IsEditable();
|
||||
|
||||
if (*aIsSelectionEditable) {
|
||||
nsINode* commonAncestor =
|
||||
selection->GetAnchorFocusRange()->GetCommonAncestor();
|
||||
while (commonAncestor && !commonAncestor->IsEditable()) {
|
||||
commonAncestor = commonAncestor->GetNodeParent();
|
||||
}
|
||||
if (!commonAncestor) {
|
||||
// No editable common ancestor
|
||||
*aIsSelectionEditable = false;
|
||||
}
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
static nsresult
|
||||
SetSelectionAroundHeadChildren(nsISelection* aSelection,
|
||||
nsIWeakReference* aDocWeak)
|
||||
|
@ -310,8 +310,6 @@ public:
|
||||
NS_IMETHOD_(bool) IsModifiableNode(nsIDOMNode *aNode);
|
||||
virtual bool IsModifiableNode(nsINode *aNode);
|
||||
|
||||
NS_IMETHOD GetIsSelectionEditable(bool* aIsSelectionEditable);
|
||||
|
||||
NS_IMETHOD SelectAll();
|
||||
|
||||
NS_IMETHOD GetRootElement(nsIDOMElement **aRootElement);
|
||||
|
Loading…
Reference in New Issue
Block a user