Changeset 19411 in webkit
- Timestamp:
- Feb 5, 2007 2:55:25 PM (17 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r19408 r19411 1 2007-02-05 Mitz Pettel <mitz@webkit.org> 2 3 Reviewed by Adele. 4 5 - test for http://bugs.webkit.org/show_bug.cgi?id=12618 6 REGRESSION (SearchField): Dragging across the text and releasing over the clear button clears the field 7 8 * fast/forms/search-cancel-button-mouseup-expected.txt: Added. 9 * fast/forms/search-cancel-button-mouseup.html: Added. 10 1 11 2007-02-05 Geoffrey Garen <ggaren@apple.com> 2 12 -
trunk/WebCore/ChangeLog
r19407 r19411 1 2007-02-05 Mitz Pettel <mitz@webkit.org> 2 3 Reviewed by Adele. 4 5 - fix http://bugs.webkit.org/show_bug.cgi?id=12618 6 REGRESSION (SearchField): Dragging across the text and releasing over the clear button clears the field 7 8 Test: fast/forms/search-cancel-button-mouseup.html 9 10 Made the cancel button capturing. 11 12 * html/HTMLTextFieldInnerElement.cpp: 13 (WebCore::HTMLSearchFieldCancelButtonElement::HTMLSearchFieldCancelButtonElement): 14 (WebCore::HTMLSearchFieldCancelButtonElement::defaultEventHandler): 15 * html/HTMLTextFieldInnerElement.h: 16 1 17 2007-02-05 Mitz Pettel <mitz@webkit.org> 2 18 -
trunk/WebCore/html/HTMLTextFieldInnerElement.cpp
r18877 r19411 28 28 29 29 #include "BeforeTextInsertedEvent.h" 30 #include "Document.h" 31 #include "EventHandler.h" 30 32 #include "EventNames.h" 33 #include "Frame.h" 31 34 #include "HTMLInputElement.h" 32 35 #include "HTMLTextAreaElement.h" … … 89 92 HTMLSearchFieldCancelButtonElement::HTMLSearchFieldCancelButtonElement(Document* doc) 90 93 : HTMLTextFieldInnerElement(doc) 94 , m_capturing(false) 91 95 { 92 96 } … … 100 104 input->select(); 101 105 evt->setDefaultHandled(); 106 if (Frame* frame = document()->frame()) 107 frame->eventHandler()->setCapturingMouseEventsNode(this); 108 m_capturing = true; 102 109 } else if (evt->type() == mouseupEvent) { 103 if (renderer() && renderer()->style()->visibility() == VISIBLE) { 104 input->setValue(""); 105 input->onSearch(); 106 evt->setDefaultHandled(); 110 if (m_capturing && renderer() && renderer()->style()->visibility() == VISIBLE) { 111 if (hovered()) { 112 input->setValue(""); 113 input->onSearch(); 114 evt->setDefaultHandled(); 115 } 116 if (Frame* frame = document()->frame()) 117 frame->eventHandler()->setCapturingMouseEventsNode(0); 118 m_capturing = false; 107 119 } 108 120 } -
trunk/WebCore/html/HTMLTextFieldInnerElement.h
r18874 r19411 63 63 HTMLSearchFieldCancelButtonElement(Document*); 64 64 virtual void defaultEventHandler(Event*); 65 private: 66 bool m_capturing; 65 67 }; 66 68
Note: See TracChangeset
for help on using the changeset viewer.