Changeset 96679 in webkit


Ignore:
Timestamp:
Oct 4, 2011 11:07:51 PM (12 years ago)
Author:
tkent@chromium.org
Message:

Remove Node::willBlur()
https://bugs.webkit.org/show_bug.cgi?id=69395

Reviewed by Ryosuke Niwa.

Revert the WebCore part of r87371 because
FrameSelection::textWillBeReplaced() doesn't set focus anymore.
No new tests. Covered by fast/forms/input-number-blur-twice.html.

  • dom/Document.cpp:

(WebCore::Document::setFocusedNode): Revert r87371.

  • dom/Node.cpp: ditto.
  • dom/Node.h: ditto.
  • html/HTMLInputElement.cpp:

(WebCore::HTMLInputElement::handleBlurEvent): ditto.

  • html/HTMLInputElement.h: ditto.
  • html/InputType.cpp:

(WebCore::InputType::handleBlurEvent): ditto.

  • html/InputType.h: ditto.
  • html/NumberInputType.cpp:

(WebCore::NumberInputType::handleBlurEvent): ditto.

  • html/NumberInputType.h: ditto.
Location:
trunk/Source/WebCore
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r96678 r96679  
     12011-10-04  Kent Tamura  <tkent@chromium.org>
     2
     3        Remove Node::willBlur()
     4        https://bugs.webkit.org/show_bug.cgi?id=69395
     5
     6        Reviewed by Ryosuke Niwa.
     7
     8        Revert the WebCore part of r87371 because
     9        FrameSelection::textWillBeReplaced() doesn't set focus anymore.
     10        No new tests. Covered by fast/forms/input-number-blur-twice.html.
     11
     12        * dom/Document.cpp:
     13        (WebCore::Document::setFocusedNode): Revert r87371.
     14        * dom/Node.cpp: ditto.
     15        * dom/Node.h: ditto.
     16        * html/HTMLInputElement.cpp:
     17        (WebCore::HTMLInputElement::handleBlurEvent): ditto.
     18        * html/HTMLInputElement.h: ditto.
     19        * html/InputType.cpp:
     20        (WebCore::InputType::handleBlurEvent): ditto.
     21        * html/InputType.h: ditto.
     22        * html/NumberInputType.cpp:
     23        (WebCore::NumberInputType::handleBlurEvent): ditto.
     24        * html/NumberInputType.h: ditto.
     25
    1262011-10-04  Kent Tamura  <tkent@chromium.org>
    227
  • trunk/Source/WebCore/dom/Document.cpp

    r96667 r96679  
    31693169    bool focusChangeBlocked = false;
    31703170    RefPtr<Node> oldFocusedNode = m_focusedNode;
     3171    m_focusedNode = 0;
    31713172
    31723173    // Remove focus from the existing focus node (if any)
    31733174    if (oldFocusedNode && !oldFocusedNode->inDetach()) {
    3174         // willBlur() should be called before any status changes.
    3175         oldFocusedNode->willBlur();
    3176         m_focusedNode = 0;
    31773175        if (oldFocusedNode->active())
    31783176            oldFocusedNode->setActive(false);
     
    32193217                view()->setFocus(false);
    32203218        }
    3221     } else
    3222         m_focusedNode = 0;
     3219    }
    32233220
    32243221    if (newFocusedNode) {
  • trunk/Source/WebCore/dom/Node.cpp

    r96353 r96679  
    27432743}
    27442744
    2745 void Node::willBlur()
    2746 {
    2747 }
    2748 
    27492745void Node::dispatchBlurEvent(PassRefPtr<Node> newFocusedNode)
    27502746{
  • trunk/Source/WebCore/dom/Node.h

    r96353 r96679  
    564564
    565565    virtual void dispatchFocusEvent(PassRefPtr<Node> oldFocusedNode);
    566     virtual void willBlur();
    567566    virtual void dispatchBlurEvent(PassRefPtr<Node> newFocusedNode);
    568567    virtual void dispatchChangeEvent();
  • trunk/Source/WebCore/html/HTMLInputElement.cpp

    r96552 r96679  
    514514}
    515515
    516 void HTMLInputElement::willBlur()
    517 {
    518     m_inputType->willBlur();
    519     HTMLTextFormControlElement::willBlur();
    520 }
    521 
    522516void HTMLInputElement::handleBlurEvent()
    523517{
     518    m_inputType->handleBlurEvent();
    524519    if (!isTextField())
    525520        return;
  • trunk/Source/WebCore/html/HTMLInputElement.h

    r95911 r96679  
    308308    virtual bool isEmptySuggestedValue() const { return suggestedValue().isEmpty(); }
    309309    virtual void handleFocusEvent();
    310     virtual void willBlur();
    311310    virtual void handleBlurEvent();
    312311
  • trunk/Source/WebCore/html/InputType.cpp

    r96678 r96679  
    437437}
    438438
    439 void InputType::willBlur()
     439void InputType::handleBlurEvent()
    440440{
    441441}
  • trunk/Source/WebCore/html/InputType.h

    r95901 r96679  
    183183    virtual bool isKeyboardFocusable() const;
    184184    virtual bool shouldUseInputMethod() const;
    185     virtual void willBlur();
     185    virtual void handleBlurEvent();
    186186    virtual void accessKeyAction(bool sendToAnyElement);
    187187    virtual bool canBeSuccessfulSubmitButton();
  • trunk/Source/WebCore/html/NumberInputType.cpp

    r95901 r96679  
    274274}
    275275
    276 void NumberInputType::willBlur()
     276void NumberInputType::handleBlurEvent()
    277277{
    278278    // Reset the renderer value, which might be unmatched with the element value.
  • trunk/Source/WebCore/html/NumberInputType.h

    r95901 r96679  
    6565    virtual String serialize(double) const;
    6666    virtual double acceptableError(double) const;
    67     virtual void willBlur();
     67    virtual void handleBlurEvent() OVERRIDE;
    6868    virtual String visibleValue() const;
    6969    virtual String convertFromVisibleValue(const String&) const;
Note: See TracChangeset for help on using the changeset viewer.