diff options
author | The Android Open Source Project <initial-contribution@android.com> | 2009-01-09 17:51:23 -0800 |
---|---|---|
committer | The Android Open Source Project <initial-contribution@android.com> | 2009-01-09 17:51:23 -0800 |
commit | e933faefa1e899dbd5bf371f499cc682aff46c83 (patch) | |
tree | 8fb31ff5c9a41aec9912d0253be7ef0445e2f58a /WebCore/dom | |
parent | 1cbdecfa9fc428ac2d8aca0fa91c9580b3d57353 (diff) | |
download | external_webkit-e933faefa1e899dbd5bf371f499cc682aff46c83.zip external_webkit-e933faefa1e899dbd5bf371f499cc682aff46c83.tar.gz external_webkit-e933faefa1e899dbd5bf371f499cc682aff46c83.tar.bz2 |
auto import from //branches/cupcake/...@125939
Diffstat (limited to 'WebCore/dom')
-rw-r--r-- | WebCore/dom/ContainerNode.cpp | 10 | ||||
-rw-r--r-- | WebCore/dom/Document.cpp | 13 | ||||
-rw-r--r-- | WebCore/dom/Element.h | 8 | ||||
-rw-r--r-- | WebCore/dom/Node.cpp | 2 |
4 files changed, 1 insertions, 32 deletions
diff --git a/WebCore/dom/ContainerNode.cpp b/WebCore/dom/ContainerNode.cpp index cef9b7d..bcd54c1 100644 --- a/WebCore/dom/ContainerNode.cpp +++ b/WebCore/dom/ContainerNode.cpp @@ -182,16 +182,6 @@ bool ContainerNode::replaceChild(PassRefPtr<Node> newChild, Node* oldChild, Exce if (oldChild == newChild) // nothing to do return true; -#ifdef ANDROID_FIX - // if oldChild is null, it will cause crash in checkReplaceChild(). We - // should check null first. - // Fix Android bug, http://b/issue?id=847893 - if (!oldChild) { - ec = NOT_FOUND_ERR; - return false; - } -#endif - // Make sure replacing the old child with the new is ok checkReplaceChild(newChild.get(), oldChild, ec); if (ec) diff --git a/WebCore/dom/Document.cpp b/WebCore/dom/Document.cpp index 3e866a6..c35177a 100644 --- a/WebCore/dom/Document.cpp +++ b/WebCore/dom/Document.cpp @@ -2510,19 +2510,6 @@ bool Document::setFocusedNode(PassRefPtr<Node> newFocusedNode) if (m_inPageCache) return false; -#ifdef ANDROID_RESET_SELECTION - WebCore::Node* oldFocus = frame()->getCacheBuilder().currentFocus(); - if (oldFocus) { - if (oldFocus->hasTagName(WebCore::HTMLNames::inputTag)) { - WebCore::HTMLInputElement* input = static_cast<WebCore::HTMLInputElement*>(oldFocus); - if (input->isTextField()) - input->setSelectionRange(-1, -1); - } else if (oldFocus->hasTagName(WebCore::HTMLNames::textareaTag)) { - WebCore::HTMLTextAreaElement* textArea = static_cast<WebCore::HTMLTextAreaElement*>(oldFocus); - textArea->setSelectionRange(-1, -1); - } - } -#endif bool focusChangeBlocked = false; RefPtr<Node> oldFocusedNode = m_focusedNode; m_focusedNode = 0; diff --git a/WebCore/dom/Element.h b/WebCore/dom/Element.h index 3aae0b5..b9dc0fd 100644 --- a/WebCore/dom/Element.h +++ b/WebCore/dom/Element.h @@ -157,15 +157,7 @@ public: virtual bool isURLAttribute(Attribute*) const; virtual const QualifiedName& imageSourceAttributeName() const; virtual String target() const { return String(); } -#ifdef ANDROID_DO_NOT_RESTORE_PREVIOUS_SELECTION - // Set the default to not restore the previous selection, since - // we want the selection to cover the whole textfield. - // FIXME: Would it be a better fix to simply ignore the input - // value in the implementation? - virtual void focus(bool restorePreviousSelection = false); -#else virtual void focus(bool restorePreviousSelection = true); -#endif virtual void updateFocusAppearance(bool restorePreviousSelection); void blur(); diff --git a/WebCore/dom/Node.cpp b/WebCore/dom/Node.cpp index 6a16b3c..214a19e 100644 --- a/WebCore/dom/Node.cpp +++ b/WebCore/dom/Node.cpp @@ -1876,8 +1876,8 @@ void Node::showTreeAndMark(const Node* markedNode1, const char* markedLabel1, co #else for (const Node* tmpNode = node; tmpNode && tmpNode != rootNode; tmpNode = tmpNode->parentNode()) fprintf(stderr, "\t"); -#endif node->showNode(); +#endif } } |