diff options
Diffstat (limited to 'Source/WebCore/html/HTMLElement.cpp')
-rw-r--r-- | Source/WebCore/html/HTMLElement.cpp | 37 |
1 files changed, 4 insertions, 33 deletions
diff --git a/Source/WebCore/html/HTMLElement.cpp b/Source/WebCore/html/HTMLElement.cpp index b3981c8..e3b5043 100644 --- a/Source/WebCore/html/HTMLElement.cpp +++ b/Source/WebCore/html/HTMLElement.cpp @@ -654,44 +654,15 @@ void HTMLElement::addHTMLAlignmentToStyledElement(StyledElement* element, Attrib bool HTMLElement::supportsFocus() const { - return Element::supportsFocus() || (isContentEditable() && parentNode() && !parentNode()->isContentEditable()); + return Element::supportsFocus() || (rendererIsEditable() && parentNode() && !parentNode()->rendererIsEditable()); } -bool HTMLElement::isContentEditable() const +bool HTMLElement::isContentEditable() const { - if (document()->inDesignMode()) - return true; - - // Ideally we'd call ASSERT!needsStyleRecalc()) here, but - // ContainerNode::setFocus() calls setNeedsStyleRecalc(), so the assertion - // would fire in the middle of Document::setFocusedNode(). - - if (!renderer()) { - if (parentNode()) - return parentNode()->isContentEditable(); - else - return false; - } - - return renderer()->style()->userModify() == READ_WRITE || renderer()->style()->userModify() == READ_WRITE_PLAINTEXT_ONLY; -} - -bool HTMLElement::isContentRichlyEditable() const -{ - if (document()->inDesignMode()) - return true; - - if (!renderer()) { - if (parentNode()) - return parentNode()->isContentEditable(); - else - return false; - } - - return renderer()->style()->userModify() == READ_WRITE; + return rendererIsEditable(); } -String HTMLElement::contentEditable() const +String HTMLElement::contentEditable() const { const AtomicString& value = fastGetAttribute(contenteditableAttr); |