Add client callbacks to notify of changes of associated from controls
https://bugs.webkit.org/show_bug.cgi?id=110375

Patch by Dane Wallinga <dgwallinga@chromium.org> on 2013-03-22
Reviewed by Ryosuke Niwa.

Source/WebCore:

Hook FormAssociatedElement, HTMLFormElement to notify EditorClient of form changes after a page has loaded.
Will be used to add autofill support for ajax-y webpages. e.g if while filling out a form, new fields
are dynamically created, autofill can know to re-query the autofill server and keep going.
https://bugs.webkit.org/show_bug.cgi?id=110375

* dom/Document.cpp:
(WebCore::Document::Document):
(WebCore::Document::didAssociateFormControl):
(WebCore):
(WebCore::Document::didAssociateFormControlsTimerFired):
* dom/Document.h:
(Document):
added method didAssociateFormControl, which batches form changes
and calls out to ChromeClient on a timer.
* html/FormAssociatedElement.cpp:
(WebCore::FormAssociatedElement::resetFormOwner):
(WebCore::FormAssociatedElement::formAttributeChanged):
(WebCore):
* html/FormAssociatedElement.h:
(FormAssociatedElement):
add calls to Document::didAssociateFormControl when form changes
* html/HTMLFormElement.cpp:
(WebCore::HTMLFormElement::insertedInto):
(WebCore):
* html/HTMLFormElement.h:
add call to Document::didAssociateFormControl
* loader/EmptyClients.h:
(EmptyChromeClient):
(WebCore::EmptyChromeClient::didAssociateFormControls):
(WebCore::EmptyChromeClient::shouldNotifyOnFormChanges):
* page/ChromeClient.h:
(ChromeClient):
add new method didAssociateFormControls

Source/WebKit/chromium:

Implement form association methods of ChromeClient
to inform autofill of form changes after a page has loaded

* public/WebAutofillClient.h:
(WebAutofillClient):
(WebKit::WebAutofillClient::didAssociateInput):
(WebKit::WebAutofillClient::didAddForm):
(WebKit::WebAutofillClient::didAssociateFormControls):
* src/ChromeClientImpl.cpp:
(WebKit::ChromeClientImpl::didAssociateFormControls):
(WebKit):
(WebKit::ChromeClientImpl::shouldNotifyOnFormChanges):
* src/ChromeClientImpl.h:
(ChromeClientImpl):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146672 268f45cc-cd09-0410-ab3c-d52691b4dbfc
After switching to another space and back, video races to catch up with audio
https://bugs.webkit.org/show_bug.cgi?id=113006

Reviewed by Anders Carlsson.

Add an observer for the NSWorkspaceActiveSpaceDidChangeNotification notification, and trigger
a visibility update when that notification is observed.

* UIProcess/API/mac/WKView.mm:
(-[WKView dealloc]): Unregister the observer.
(-[WKView _activeSpaceDidChange:]): Notify the view that its visibility may have changed.
(-[WKView initWithFrame:contextRef:pageGroupRef:relatedToPage:]): Add the observer.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146673 268f45cc-cd09-0410-ab3c-d52691b4dbfc