Swiping back from a Twitter image to Twitter flashes to the wrong position
https://bugs.webkit.org/show_bug.cgi?id=136798
<rdar://problem/18324338>

Reviewed by Darin Adler and Sam Weinig.

* UIProcess/mac/ViewGestureController.h:
* UIProcess/mac/ViewGestureControllerMac.mm:
(WebKit::ViewGestureController::ViewGestureController):
(WebKit::ViewGestureController::didFinishLoadForMainFrame):
(WebKit::ViewGestureController::didSameDocumentNavigationForMainFrame):
Add a 250ms repeating timer that we start in didFinishLoadForMainFrame
if we are for some reason still loading, and in didSameDocumentNavigationForMainFrame
unconditionally, to match behavior of the old swipe implementation.

Also, do the active gesture check in both of those places so that we don't
start the timer if we're in the middle of a live swipe or have already torn
down the snapshot (removeSwipeSnapshotAfterRepaint does this as well, so
this isn't really a behavior change).

(WebKit::ViewGestureController::activeLoadMonitoringTimerFired):
Every time the timer fires, check if we're still loading; if not,
tear down the swipe snapshot (after repainting).

(WebKit::ViewGestureController::removeSwipeSnapshotAfterRepaint):
Stop the active load monitoring timer.

* wtf/RunLoop.h:
(WTF::RunLoop::TimerBase::startRepeating):
Add a std::chrono veresion of RunLoop::TimerBase::startRepeating.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@173595 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Re-add the request autocomplete feature

<https://bugs.webkit.org/show_bug.cgi?id=136730>

This feature was rolled out in r148731 because it was only used by
Chromium. As we consider supporting this feature, roll it back in, but
leave it disabled.

This rolls out r148731 (which removed the feature) with small changes
Source/JavaScriptCore:

needed to make the code build in ToT, to match modern style, to make
the tests run, and to remove unused code.

Reviewed by Andy Estes.

* Configurations/FeatureDefines.xcconfig:

Source/WebCore:

needed to make the code build in ToT, to match modern style, to make
the tests run, and to remove unused code.

Reviewed by Andy Estes.

Tests: fast/events/constructors/autocomplete-error-event-constructor.html
       fast/forms/form-request-autocomplete.html

* Configurations/FeatureDefines.xcconfig:
* DerivedSources.make:
* WebCore.xcodeproj/project.pbxproj:
* dom/AutocompleteErrorEvent.h: Added.
(WebCore::AutocompleteErrorEvent::create):
(WebCore::AutocompleteErrorEvent::reason):
(WebCore::AutocompleteErrorEvent::AutocompleteErrorEvent):
* dom/AutocompleteErrorEvent.idl: Added.
* dom/EventNames.h:
* dom/EventNames.in:
* html/HTMLAttributeNames.in:
* html/HTMLFormElement.cpp:
(WebCore::HTMLFormElement::HTMLFormElement):
(WebCore::HTMLFormElement::requestAutocomplete):
(WebCore::HTMLFormElement::finishRequestAutocomplete):
(WebCore::HTMLFormElement::requestAutocompleteTimerFired):
(WebCore::HTMLFormElement::parseAttribute):
* html/HTMLFormElement.h:
* html/HTMLFormElement.idl:
* loader/EmptyClients.h:
* loader/FrameLoaderClient.h:
* page/DOMWindow.idl:

Source/WebKit/mac:

needed to make the code build in ToT, to match modern style, to make
the tests run, and to remove unused code.

Reviewed by Andy Estes.

* Configurations/FeatureDefines.xcconfig:
* WebCoreSupport/WebFrameLoaderClient.h:

Source/WebKit2:

needed to make the code build in ToT, to match modern style, to make
the tests run, and to remove unused code.

Reviewed by Andy Estes.

* Configurations/FeatureDefines.xcconfig:
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::didRequestAutocomplete):
* WebProcess/WebCoreSupport/WebFrameLoaderClient.h:

Source/WTF:

needed to make the code build in ToT, to make the tests run, and to
remove unused code.

Reviewed by Andy Estes.

* wtf/FeatureDefines.h:

LayoutTests:

needed to make the code build in ToT, to match modern style, to make
the tests run, and to remove unused code.

Reviewed by Andy Estes.

* fast/events/constructors/autocomplete-error-event-constructor-expected.txt: Added.
* fast/events/constructors/autocomplete-error-event-constructor.html: Added.
* fast/events/event-creation.html:
* fast/forms/form-request-autocomplete-expected.txt: Added.
* fast/forms/form-request-autocomplete.html: Added.
* js/dom/constructor-length.html:
* platform/efl/js/dom/constructor-length-expected.txt:
* platform/gtk/js/dom/constructor-length-expected.txt:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@173596 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Build fix with REQUEST_AUTOCOMPLETE enabled

* html/HTMLFormElement.cpp:
(WebCore::HTMLFormElement::requestAutocomplete):
(WebCore::HTMLFormElement::finishRequestAutocomplete):

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