Changeset 183038 in webkit
- Timestamp:
- Apr 20, 2015, 5:43:23 PM (10 years ago)
- Location:
- trunk/Source/WebKit2
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit2/ChangeLog
r183031 r183038 1 2015-04-20 Dan Bernstein <mitz@apple.com> 2 3 Expose more bundle form client functions as WKWebProcessPlugInFormDelegatePrivate methods 4 https://bugs.webkit.org/show_bug.cgi?id=143973 5 6 Reviewed by Anders Carlsson. 7 8 * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFormDelegatePrivate.h: Declared new 9 delegate methods. 10 11 * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInNodeHandle.h: Declared new frame 12 property. 13 * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInNodeHandle.mm: 14 (-[WKWebProcessPlugInNodeHandle frame]): Added. Returns the node’s document’s frame. This is 15 useful to delegates getting an array of nodes via the new method. 16 17 * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm: 18 (-[WKWebProcessPlugInBrowserContextController _setFormDelegate:]): Added overrides of 19 shouldNotifyOnFormChanges and didAssociateFormControls, which call the new delegate methods. 20 1 21 2015-04-20 Joseph Pecoraro <pecoraro@apple.com> 2 22 -
trunk/Source/WebKit2/WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFormDelegatePrivate.h
r168541 r183038 46 46 - (NSObject <NSSecureCoding> *)_webProcessPlugInBrowserContextController:(WKWebProcessPlugInBrowserContextController *)controller willBeginInputSessionForElement:(WKWebProcessPlugInNodeHandle *)node inFrame:(WKWebProcessPlugInFrame *)frame; 47 47 48 - (BOOL)_webProcessPlugInBrowserContextControllerShouldNotifyOnFormChanges:(WKWebProcessPlugInBrowserContextController *)controller; 49 - (void)_webProcessPlugInBrowserContextController:(WKWebProcessPlugInBrowserContextController *)controller didAssociateFormControls:(NSArray *)elements; 50 48 51 @end 49 52 -
trunk/Source/WebKit2/WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInNodeHandle.h
r182327 r183038 55 55 @property (nonatomic, readonly) BOOL HTMLTextAreaElementIsUserEdited; 56 56 @property (nonatomic, readonly) WKWebProcessPlugInNodeHandle *HTMLTableCellElementCellAbove; 57 @property (nonatomic, readonly) WKWebProcessPlugInFrame *frame; 57 58 58 59 - (BOOL)isTextField; -
trunk/Source/WebKit2/WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInNodeHandle.mm
r182327 r183038 126 126 } 127 127 128 - (WKWebProcessPlugInFrame *)frame 129 { 130 return [wrapper(*_nodeHandle->document()->documentFrame().leakRef()) autorelease]; 131 } 132 128 133 - (InjectedBundleNodeHandle&)_nodeHandle 129 134 { -
trunk/Source/WebKit2/WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm
r182267 r183038 524 524 } 525 525 526 virtual bool shouldNotifyOnFormChanges(WebKit::WebPage*) override 527 { 528 auto formDelegate = m_controller->_formDelegate.get(); 529 530 if (![formDelegate respondsToSelector:@selector(_webProcessPlugInBrowserContextControllerShouldNotifyOnFormChanges:)]) 531 return false; 532 533 return [formDelegate _webProcessPlugInBrowserContextControllerShouldNotifyOnFormChanges:m_controller]; 534 } 535 536 virtual void didAssociateFormControls(WebKit::WebPage*, const Vector<RefPtr<WebCore::Element>>& elements) override 537 { 538 auto formDelegate = m_controller->_formDelegate.get(); 539 540 if (![formDelegate respondsToSelector:@selector(_webProcessPlugInBrowserContextController:didAssociateFormControls:)]) 541 return; 542 543 auto controls = adoptNS([[NSMutableArray alloc] initWithCapacity:elements.size()]); 544 for (const auto& element : elements) 545 [controls addObject:wrapper(*WebKit::InjectedBundleNodeHandle::getOrCreate(element.get()))]; 546 return [formDelegate _webProcessPlugInBrowserContextController:m_controller didAssociateFormControls:controls.get()]; 547 } 548 526 549 private: 527 550 WKWebProcessPlugInBrowserContextController *m_controller;
Note:
See TracChangeset
for help on using the changeset viewer.