mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Backout changeset 269ee0275709 (bug 688438) because of bug 688423
This commit is contained in:
parent
441646faaa
commit
037b12b7d1
@ -1348,12 +1348,7 @@ PRUint32
|
||||
nsIContent::GetDesiredIMEState()
|
||||
{
|
||||
if (!IsEditableInternal()) {
|
||||
// Check for the special case where we're dealing with elements which don't
|
||||
// have the editable flag set, but are readwrite (such as text controls).
|
||||
if (!IsElement() ||
|
||||
!AsElement()->State().HasState(NS_EVENT_STATE_MOZ_READWRITE)) {
|
||||
return IME_STATUS_DISABLE;
|
||||
}
|
||||
return IME_STATUS_DISABLE;
|
||||
}
|
||||
// NOTE: The content for independent editors (e.g., input[type=text],
|
||||
// textarea) must override this method, so, we don't need to worry about
|
||||
|
@ -646,24 +646,13 @@ nsTextStateManager::ContentRemoved(nsIDocument* aDocument,
|
||||
new TextChangeEvent(mWidget, offset, offset + childOffset, offset));
|
||||
}
|
||||
|
||||
static bool IsEditable(nsINode* node) {
|
||||
if (node->IsEditable()) {
|
||||
return true;
|
||||
}
|
||||
// |node| might be readwrite (for example, a text control)
|
||||
if (node->IsElement() && node->AsElement()->State().HasState(NS_EVENT_STATE_MOZ_READWRITE)) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
static nsINode* GetRootEditableNode(nsPresContext* aPresContext,
|
||||
nsIContent* aContent)
|
||||
{
|
||||
if (aContent) {
|
||||
nsINode* root = nsnull;
|
||||
nsINode* node = aContent;
|
||||
while (node && IsEditable(node)) {
|
||||
while (node && node->IsEditable()) {
|
||||
root = node;
|
||||
node = node->GetNodeParent();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user