Changeset 45723 in webkit
- Timestamp:
- Jul 10, 2009 1:32:43 PM (15 years ago)
- Location:
- trunk
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/ChangeLog
r45721 r45723 1 2009-07-10 Greg Bolsinga <bolsinga@apple.com> 2 3 Reviewed by Antti Koivisto. 4 5 Add delegate methods about focus and blur and state change 6 https://bugs.webkit.org/show_bug.cgi?id=27153 7 8 Call the appropriate new ChromeClient methods for focus and blur. 9 10 * html/HTMLFormControlElement.cpp: 11 (WebCore::HTMLFormControlElement::dispatchFocusEvent): 12 (WebCore::HTMLFormControlElement::dispatchBlurEvent): 13 * html/HTMLFormControlElement.h: 14 * loader/EmptyClients.h: 15 (WebCore::EmptyChromeClient::formDidFocus): 16 (WebCore::EmptyChromeClient::formDidBlur): 17 * page/ChromeClient.h: 18 1 19 2009-07-10 Steve Falkenburg <sfalken@apple.com> 2 20 -
trunk/WebCore/html/HTMLFormControlElement.cpp
r44758 r45723 26 26 #include "HTMLFormControlElement.h" 27 27 28 #include "ChromeClient.h" 28 29 #include "Document.h" 29 30 #include "EventHandler.h" … … 36 37 #include "HTMLTokenizer.h" 37 38 #include "MappedAttribute.h" 39 #include "Page.h" 38 40 #include "RenderBox.h" 39 41 #include "RenderTheme.h" … … 243 245 } 244 246 247 void HTMLFormControlElement::dispatchFocusEvent() 248 { 249 if (document()->frame() && document()->frame()->page()) 250 document()->frame()->page()->chrome()->client()->formDidFocus(this); 251 252 HTMLElement::dispatchFocusEvent(); 253 } 254 255 void HTMLFormControlElement::dispatchBlurEvent() 256 { 257 if (document()->frame() && document()->frame()->page()) 258 document()->frame()->page()->chrome()->client()->formDidBlur(this); 259 260 HTMLElement::dispatchBlurEvent(); 261 } 262 245 263 bool HTMLFormControlElement::supportsFocus() const 246 264 { -
trunk/WebCore/html/HTMLFormControlElement.h
r44100 r45723 101 101 void formDestroyed() { m_form = 0; } 102 102 103 virtual void dispatchFocusEvent(); 104 virtual void dispatchBlurEvent(); 105 103 106 protected: 104 107 void removeFromForm(); -
trunk/WebCore/loader/EmptyClients.h
r45679 r45723 138 138 virtual void formStateDidChange(const Node*) { } 139 139 140 virtual void formDidFocus(const Node*) { } 141 virtual void formDidBlur(const Node*) { } 142 140 143 virtual PassOwnPtr<HTMLParserQuirks> createHTMLParserQuirks() { return 0; } 141 144 -
trunk/WebCore/page/ChromeClient.h
r44096 r45723 169 169 // will be called frequently, so handling should be very fast. 170 170 virtual void formStateDidChange(const Node*) = 0; 171 172 virtual void formDidFocus(const Node*) = 0; 173 virtual void formDidBlur(const Node*) = 0; 171 174 172 175 virtual PassOwnPtr<HTMLParserQuirks> createHTMLParserQuirks() = 0; -
trunk/WebKit/mac/ChangeLog
r45712 r45723 1 2009-07-10 Greg Bolsinga <bolsinga@apple.com> 2 3 Reviewed by Antti Koivisto. 4 5 Add delegate methods about focus and blur and state change 6 https://bugs.webkit.org/show_bug.cgi?id=27153 7 8 Call the appropriate private delegate methods from the ChromeClient. 9 10 * WebCoreSupport/WebChromeClient.h: 11 * WebCoreSupport/WebChromeClient.mm: 12 (WebChromeClient::formStateDidChange): 13 (WebChromeClient::formDidFocus): 14 (WebChromeClient::formDidBlur): 15 * WebView/WebUIDelegatePrivate.h: 16 1 17 2009-07-09 Brian Weinstein <bweinstein@apple.com> 2 18 -
trunk/WebKit/mac/WebCoreSupport/WebChromeClient.h
r44096 r45723 134 134 virtual WebCore::String generateReplacementFile(const WebCore::String& path); 135 135 136 virtual void formStateDidChange(const WebCore::Node*) { } 136 virtual void formStateDidChange(const WebCore::Node*); 137 138 virtual void formDidFocus(const WebCore::Node*); 139 virtual void formDidBlur(const WebCore::Node*); 137 140 138 141 virtual PassOwnPtr<WebCore::HTMLParserQuirks> createHTMLParserQuirks() { return 0; } -
trunk/WebKit/mac/WebCoreSupport/WebChromeClient.mm
r44451 r45723 657 657 } 658 658 659 void WebChromeClient::formStateDidChange(const WebCore::Node* node) 660 { 661 CallUIDelegate(m_webView, @selector(webView:formStateDidChangeForNode:), kit(const_cast<WebCore::Node*>(node))); 662 } 663 664 void WebChromeClient::formDidFocus(const WebCore::Node* node) 665 { 666 CallUIDelegate(m_webView, @selector(webView:formStateDidFocusNode:), kit(const_cast<WebCore::Node*>(node))); 667 } 668 669 void WebChromeClient::formDidBlur(const WebCore::Node* node) 670 { 671 CallUIDelegate(m_webView, @selector(webView:formStateDidBlurNode:), kit(const_cast<WebCore::Node*>(node))); 672 } 673 659 674 #if USE(ACCELERATED_COMPOSITING) 660 675 -
trunk/WebKit/mac/WebView/WebUIDelegatePrivate.h
r44379 r45723 127 127 - (BOOL)webView:(WebView *)sender frame:(WebFrame *)frame requestGeolocationPermission:(WebGeolocation *)geolocation securityOrigin:(WebSecurityOrigin *)origin; 128 128 129 - (void)webView:(WebView *) formStateDidChangeForNode:(DOMNode *)node; 130 - (void)webView:(WebView *) formStateDidFocusNode:(DOMNode *)node; 131 - (void)webView:(WebView *) formStateDidBlurNode:(DOMNode *)node; 132 129 133 /*! 130 134 @method webView:printFrame:
Note: See TracChangeset
for help on using the changeset viewer.