Unreviewed Windows build fix for r160946.

Add another file to the Windows InspectorAllInOne.cpp.

* inspector/InspectorAllInOne.cpp:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@161102 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Display EWS status on bot watcher's dashboard
https://bugs.webkit.org/show_bug.cgi?id=126224

Silence spurious exceptions, no visible behavior change.

* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/EWSQueue.js:
(EWSQueue.prototype.update): Removed code that was only needed for an experimental
feature that wasn't landed.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@161103 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Merge PageVisibilityState & ViewState::IsVisible in WebKit2
https://bugs.webkit.org/show_bug.cgi?id=126214

Reviewed by Alexey Proskuryakov.

WebKit2 redundantly tracks the visibility of the view through two mechanisms - the visibility
state, and the view state. Remove visibility state from the WebKit2 layer. The visibility
state also tracks the prerender state - so split this out and handle it separately (a change
we should make in WebCore, too).

Source/WebCore: 

WebCore - changes the API tests exposed a bug, a view should only ever come out of the
prerender state when it becomes visible - redundant notifications that the view is still
hidden should be ignored.

* page/Page.cpp:
(WebCore::Page::setVisibilityState):
    - ignore visibility state change to hidden, if the current state is prerender.

Source/WebKit2: 

Removing the redundancy also removes the ability from the API to set a fake visibility state
(IsVisible tracks the actual visibility of the view). Through private API
(WKPageSetVisibilityState) a client could previously request the view be reported as hidden or
visible, but this didn't really work - the override was not enforced and the API may reset the
state at an arbitrary point. The mechanism is only used by testing code, which instead should
actually update the view visibility (this tests more of the actual visibility mechanisms used
by the browser). The one aspect of the API relied on by existing clients is the ability to
initialize a hidden view as prerender - continue to support this specific functionality via
WKPageSetVisibilityState, to maintain backwards compatibility.

- WebKit2 - remove internal state that tracks page visibility separately from the view state
visibility. For backwards compatibility continue to support the WKPageSetVisibilityState API,
but only to initialize the state to prerender.

* UIProcess/API/C/WKPage.cpp:
(WKPageSetVisibilityState):
    - only support initializing the visibility state to prerender.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::WebPageProxy):
    - remove m_visibilityState
(WebKit::WebPageProxy::initializeWebPage):
    - no need to send initial visibility state (this is sent as a part of the creation parameters).
(WebKit::WebPageProxy::viewStateDidChange):
    - no need to send visibility state change (this is sent as a part of view state).
(WebKit::WebPageProxy::setVisibilityStatePrerender):
    - setVisibilityState -> setVisibilityStatePrerender.
* UIProcess/WebPageProxy.h:
    - remove m_visibilityState, setVisibilityState -> setVisibilityStatePrerender.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage):
    - added call to updateVisibilityState.
(WebKit::WebPage::setViewIsVisible):
    - added call to updateVisibilityState.
(WebKit::WebPage::updateVisibilityState):
    - previously setVisibilityState, updates the page visibility state according to the view state.
(WebKit::WebPage::setVisibilityStatePrerender):
    - set visibility state to prerender.
* WebProcess/WebPage/WebPage.h:
    - remove m_visibilityState, setVisibilityState -> setVisibilityStatePrerender.
* WebProcess/WebPage/WebPage.messages.in:
    - SetVisibilityState -> SetVisibilityStatePrerender.

Tools: 

Tools - WebKit2 no longer (poorly) supports a fake visibility state, so to test the page
visibility mechanisms we should actually be changing characteristics of the view that will
be detected by WebKit2 as a visibility change. This affects three things:
    1) On setVisibilityState WebKitTestRunner must actually change visibility of the view.
    2) The 'PageVisibilityState' test in the API tests is useless (as evidenced by the fact
       that page visibility has been broken in WebKit2 for a couple of months, and didn't
       catch this fact). Removed in favour of:
    3) 'PageVisibilityStateWithWindowChanges' - this is the good stuff. This actually tests
       the visibility mechanism. Beef this test up by adding coverage for: a) the prerender
    state, b) document.hidden, and c) too many state change notifications (it already looks
    for too few).

* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKit2/PageVisibilityState.cpp: Removed.
    - Removed PageVisibilityState - this test was ineffective, API no longer supports this
      test, and behaviour is covered by PageVisibilityStateWithWindowChanges.
* TestWebKitAPI/Tests/mac/PageVisibilityStateWithWindowChanges.mm:
(-[PageVisibilityStateDelegate webView:runJavaScriptAlertPanelWithMessage:initiatedByFrame:]):
(runJavaScriptAlert):
    - Add checking for too many calls to the alert.
(TestWebKitAPI::PageVisibilityStateWithWindowChanges::setPrerender):
    - Added methods to set visibility to prerender.
(TestWebKitAPI::PageVisibilityStateWithWindowChanges::runTest):
    - Added checking of 'document.hidden'.
* WebKitTestRunner/TestController.cpp:
(WTR::TestController::setVisibilityState):
* WebKitTestRunner/TestController.h:
* WebKitTestRunner/efl/TestControllerEfl.cpp:
(WTR::TestController::setHidden):
* WebKitTestRunner/gtk/TestControllerGtk.cpp:
(WTR::TestController::setHidden):
* WebKitTestRunner/mac/TestControllerMac.mm:
(WTR::TestController::setHidden):
    - Add setHidden method; call this from setVisibilityState.

LayoutTests: 

LayoutTests - remove test for notification on visibility state change to preerender. This test
was covering something nonsensical, and not supported by the spec - the page should never see
a visibility change to prerender, this should only be an initial state. WebKit2 API now only
allows the client to change the state to prerender without sending a notification, and there
is no sense in continuing to support the current test case, since the behaviour is neither
allowed by API nor available in web content.

The prerender state is now properly covered by API tests.

* fast/events/page-visibility-transition-test-expected.txt:
* fast/events/page-visibility-transition-test.html:
    - remove test for notification on visibility state change to preerender.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@161105 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[iOS] Upstream WebCore/page changes
https://bugs.webkit.org/show_bug.cgi?id=126180

Reviewed by Darin Adler.

Source/WebCore:

* WebCore.xcodeproj/project.pbxproj:
* dom/EventNames.h:
(WebCore::EventNames::isGestureEventType): Added.
* page/AlternativeTextClient.h: Do not define WTF_USE_DICTATION_ALTERNATIVES when building for iOS.
* page/Chrome.cpp:
(WebCore::Chrome::Chrome):
(WebCore::Chrome::dispatchViewportPropertiesDidChange): Added; guarded by PLATFORM(IOS).
(WebCore::Chrome::setCursor): Make this an empty function when building for iOS.
(WebCore::Chrome::setCursorHiddenUntilMouseMoves): Ditto.
(WebCore::Chrome::didReceiveDocType): Added; iOS-specific.
* page/Chrome.h:
(WebCore::Chrome::setDispatchViewportDataDidChangeSuppressed): Added; guarded by PLATFORM(IOS).
* page/ChromeClient.h:
(WebCore::ChromeClient::didFlushCompositingLayers): Added; guarded by PLATFORM(IOS).
(WebCore::ChromeClient::fetchCustomFixedPositionLayoutRect): Added; guarded by PLATFORM(IOS).
(WebCore::ChromeClient::updateViewportConstrainedLayers): Added; guarded by PLATFORM(IOS).
* page/DOMTimer.cpp:
(WebCore::DOMTimer::install): Added iOS-specific code.
(WebCore::DOMTimer::fired): Ditto.
* page/DOMWindow.cpp:
(WebCore::DOMWindow::DOMWindow): Ditto.
(WebCore::DOMWindow::innerHeight): Ditto.
(WebCore::DOMWindow::innerWidth): Ditto.
(WebCore::DOMWindow::scrollX): Ditto.
(WebCore::DOMWindow::scrollY): Ditto.
(WebCore::DOMWindow::scrollBy): Ditto.
(WebCore::DOMWindow::scrollTo): Ditto.
(WebCore::DOMWindow::clearTimeout): Ditto.
(WebCore::DOMWindow::addEventListener): Ditto.
(WebCore::DOMWindow::incrementScrollEventListenersCount): Added; guarded by PLATFORM(IOS).
(WebCore::DOMWindow::decrementScrollEventListenersCount): Added; guarded by PLATFORM(IOS).
(WebCore::DOMWindow::resetAllGeolocationPermission): Added; Also added FIXME comment.
(WebCore::DOMWindow::removeEventListener): Added iOS-specific code.
(WebCore::DOMWindow::dispatchEvent): Modified to prevent dispatching duplicate pageshow and pagehide
events per <http://www.whatwg.org/specs/web-apps/current-work/multipage/history.html#event-pageshow>.
(WebCore::DOMWindow::removeAllEventListeners): Added iOS-specific code.
* page/DOMWindow.h:
* page/DOMWindow.idl: Added IOS_GESTURE_EVENTS-guarded attributes: ongesture{change, end, start}. Also
added IOS_TOUCH_EVENTS-guarded attributes: {Touch, TouchList}Constructor.
* page/EditorClient.h:
* page/EventHandler.cpp:
(WebCore::EventHandler::EventHandler): Added iOS-specific code.
(WebCore::EventHandler::clear): Ditto.
(WebCore::EventHandler::startPanScrolling): Make this an empty function when building for iOS.
(WebCore::EventHandler::handleMousePressEvent): Modified to invalidate a click when the clicked node is
null. Also, opt out of code for updating the scrollbars as UIKit manages scrollbars on iOS.
(WebCore::EventHandler::handleMouseMoveEvent): Opt of code for updating the scrollbars and cursor when building on iOS.
(WebCore::hitTestResultInFrame): Made this a file-local static function since it's only used in EventHandler.cpp.
(WebCore::EventHandler::dispatchSyntheticTouchEventIfEnabled): Added iOS-specific code.
* page/EventHandler.h:
* page/FocusController.h:
* page/Frame.cpp:
(WebCore::Frame::Frame): Added iOS-specific code.
(WebCore::Frame::scrollOverflowLayer): Added; iOS-specific.
(WebCore::Frame::overflowAutoScrollTimerFired): Added; iOS-specific.
(WebCore::Frame::startOverflowAutoScroll): Added; iOS-specific.
(WebCore::Frame::checkOverflowScroll): Added; iOS-specific.
(WebCore::Frame::willDetachPage): Added iOS-specific code.
(WebCore::Frame::createView): Ditto.
(WebCore::Frame::setSelectionChangeCallbacksDisabled): Added; iOS-specific.
(WebCore::Frame::selectionChangeCallbacksDisabled): Added; iOS-specific.
* page/Frame.h:
(WebCore::Frame::timersPaused): Added; guarded by PLATFORM(IOS).
* page/FrameView.cpp:
(WebCore::FrameView::FrameView): Added iOS-specific code.
(WebCore::FrameView::clear): Ditto.
(WebCore::FrameView::flushCompositingStateForThisFrame): Ditto.
(WebCore::FrameView::graphicsLayerForPlatformWidget): Added.
(WebCore::FrameView::scheduleLayerFlushAllowingThrottling): Added.
(WebCore::FrameView::layout): Added iOS-specific code.
(WebCore::countRenderedCharactersInRenderObjectWithThreshold): Added; helper function used by FrameView::renderedCharactersExceed().
Also added FIXME comment.
(WebCore::FrameView::renderedCharactersExceed): Added.
(WebCore::FrameView::visibleContentsResized): Added iOS-specific code.
(WebCore::FrameView::adjustTiledBackingCoverage): Ditto.
(WebCore::FrameView::performPostLayoutTasks): Ditto.
(WebCore::FrameView::sendResizeEventIfNeeded): Ditto.
(WebCore::FrameView::paintContents): Added iOS-specific code. Also added FIXME comments.
(WebCore::FrameView::setUseCustomFixedPositionLayoutRect): Added; iOS-specific.
(WebCore::FrameView::setCustomFixedPositionLayoutRect): Added; iOS-specific.
(WebCore::FrameView::updateFixedPositionLayoutRect): Added; iOS-specific.
* page/FrameView.h:
* page/Navigator.cpp:
(WebCore::Navigator::standalone): Added; iOS-specific.
* page/Navigator.h:
* page/Navigator.idl: Added WTF_PLATFORM_IOS-guarded attribute: standalone. Also added FIXME comment.
* page/NavigatorBase.cpp:
(WebCore::NavigatorBase::platform): Added iOS-specific code.
* page/Page.h:
(WebCore::Page::hasCustomHTMLTokenizerTimeDelay): Added; guarded by PLATFORM(IOS). Also added FIXME comment
to remove this method.
(WebCore::Page::customHTMLTokenizerTimeDelay): Added; guarded by PLATFORM(IOS). Also added FIXME comment
to remove this method.
* page/PageGroup.cpp:
(WebCore::PageGroup::removeVisitedLink): Added.
* page/PageGroup.h:
* page/Settings.cpp:
(WebCore::Settings::Settings):
(WebCore::Settings::setScriptEnabled): Added; guarded by PLATFORM(IOS).
(WebCore::Settings::setStandalone): Added; guarded by PLATFORM(IOS).
(WebCore::Settings::setAudioSessionCategoryOverride): Added; guarded by PLATFORM(IOS).
(WebCore::Settings::audioSessionCategoryOverride): Added; guarded by PLATFORM(IOS).
(WebCore::Settings::setNetworkDataUsageTrackingEnabled): Added; guarded by PLATFORM(IOS).
(WebCore::Settings::networkDataUsageTrackingEnabled): Added; guarded by PLATFORM(IOS).
(WebCore::sharedNetworkInterfaceNameGlobal): Added; guarded by PLATFORM(IOS).
(WebCore::Settings::setNetworkInterfaceName): Added; guarded by PLATFORM(IOS).
(WebCore::Settings::networkInterfaceName): Added; guarded by PLATFORM(IOS).
* page/Settings.h:
(WebCore::Settings::setMaxParseDuration): Added; guarded by PLATFORM(IOS). Also added FIXME comment.
(WebCore::Settings::maxParseDuration): Added; guarded by PLATFORM(IOS). Also added FIXME comment.
(WebCore::Settings::standalone): Added; guarded by PLATFORM(IOS).
(WebCore::Settings::setTelephoneNumberParsingEnabled): Added; guarded by PLATFORM(IOS).
(WebCore::Settings::telephoneNumberParsingEnabled): Added; guarded by PLATFORM(IOS).
(WebCore::Settings::setMediaDataLoadsAutomatically): Added; guarded by PLATFORM(IOS).
(WebCore::Settings::mediaDataLoadsAutomatically): Added; guarded by PLATFORM(IOS).
(WebCore::Settings::setShouldTransformsAffectOverflow): Added; guarded by PLATFORM(IOS).
(WebCore::Settings::shouldTransformsAffectOverflow): Added; guarded by PLATFORM(IOS).
(WebCore::Settings::setShouldDispatchJavaScriptWindowOnErrorEvents): Added; guarded by PLATFORM(IOS).
(WebCore::Settings::shouldDispatchJavaScriptWindowOnErrorEvents): Added; guarded by PLATFORM(IOS).
(WebCore::Settings::setAlwaysUseBaselineOfPrimaryFont): Added; guarded by PLATFORM(IOS).
(WebCore::Settings::alwaysUseBaselineOfPrimaryFont): Added; guarded by PLATFORM(IOS).
(WebCore::Settings::setAlwaysUseAcceleratedOverflowScroll): Added; guarded by PLATFORM(IOS).
(WebCore::Settings::alwaysUseAcceleratedOverflowScroll): Added; guarded by PLATFORM(IOS).
* page/Settings.in: Added IOS_AIRPLAY-guarded setting: mediaPlaybackAllowsAirPlay.
* page/animation/CSSPropertyAnimation.cpp:
(WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap): Added iOS-specific code and FIXME comment.
* page/ios/EventHandlerIOS.mm: Added.
* page/ios/FrameIOS.mm: Added.
* page/mac/ChromeMac.mm:
* page/mac/PageMac.cpp:
(WebCore::Page::addSchedulePair): Opt out of code when building for iOS.
(WebCore::Page::removeSchedulePair): Ditto.
* page/mac/SettingsMac.mm:
(WebCore::Settings::shouldEnableScreenFontSubstitutionByDefault): Added iOS-specific code.
* page/mac/WebCoreFrameView.h:

Source/WebKit/ios:

* WebCoreSupport/WebChromeClientIOS.mm: Substitute ENABLE(IOS_TOUCH_EVENTS) for ENABLE(TOUCH_EVENTS).

Source/WebKit2:

* WebProcess/WebCoreSupport/WebChromeClient.h:
* WebProcess/WebCoreSupport/ios/WebChromeClientIOS.mm: Added.
* WebProcess/WebPage/WebPage.cpp: Include header <WebCore/HitTestResult.h>.

Source/WTF:

* wtf/FeatureDefines.h: Define ENABLE_IOS_TOUCH_EVENTS to be enabled by default
when building iOS with ENABLE(TOUCH_EVENTS).

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@161106 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Attempt to fix the Windows build after <http://trac.webkit.org/changeset/161106>
(https://bugs.webkit.org/show_bug.cgi?id=126180)

Add files platform/audio/AudioSession.{cpp, h} and platform/audio/AudioSessionListener.h
to the Visual Studio project. Note, the contents of these files are guarded by USE(AUDIO_SESSION),
which is only enabled on Mac and iOS at the time of writing.

I thought to try this approach to fix the build so as to avoid adding an extraneous
USE(AUDIO_SESSION)-guard around the #include "AudioSession.h" in Settings.cpp since
the contents of the file AudioSession.h is guarded by USE(AUDIO_SESSION).

* WebCore.vcxproj/WebCore.vcxproj:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@161107 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Another attempt to fix the Windows build after <http://trac.webkit.org/changeset/161106>
(https://bugs.webkit.org/show_bug.cgi?id=126180)

* WebCore.vcxproj/WebCore.vcxproj.filters: Add files platform/audio/{AudioSession, AudioSessionListener}.h
* WebCore.vcxproj/WebCoreCommon.props: Add directory WebCore/platform/audio to the list of
include directories.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@161108 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[GTK] Downloads are broken with the network process enabled
https://bugs.webkit.org/show_bug.cgi?id=126131

Reviewed by Martin Robinson.

The problem is that the network process crashes when trying to
convert the handle to a download, because at that point the
download has finished and the handle is NULL. This happens because
we are not implementing ResourceHandle::continueDidReceiveResponse().

* platform/network/soup/ResourceHandleSoup.cpp:
(WebCore::nextMultipartResponsePartCallback): Call
continueAfterDidReceiveResponse() when not using async callbacks.
(WebCore::sendRequestCallback): Ditto.
(WebCore::continueAfterDidReceiveResponse): Helper function that
continues the load after didReceiveResponse.
(WebCore::ResourceHandle::continueDidReceiveResponse): Call
continueAfterDidReceiveResponse().

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@161109 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[GTK] Fix release builds with NetworkProcess enabled
https://bugs.webkit.org/show_bug.cgi?id=126247

Patch by Giovanni Campagna <gcampagna@src.gnome.org> on 2013-12-28
Reviewed by Carlos Garcia Campos.

* Source/autotools/symbols.filter:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@161110 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed. Update GObject DOM symbols file after r160733.

* bindings/gobject/webkitdom.symbols:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@161111 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[WK2][SOUP] Fix handling of cookies when network process is enabled
https://bugs.webkit.org/show_bug.cgi?id=125576

Patch by Kwang Yul Seo <skyul@company100.net> on 2013-12-28
Reviewed by Carlos Garcia Campos.

Initialize the network process with cookie accept policy, persistent
storage path and type. Use
WebContext::sendToNetworkingProcessRelaunchingIfNecessary instead of
WebContext::sendToAllProcessesRelaunchingThemIfNecessary to send
SetCookiePersistentStorage message.

* NetworkProcess/soup/NetworkProcessSoup.cpp:
(WebKit::NetworkProcess::platformInitializeNetworkProcess):
* Shared/Network/NetworkProcessCreationParameters.cpp:
(WebKit::NetworkProcessCreationParameters::encode):
(WebKit::NetworkProcessCreationParameters::decode):
* Shared/Network/NetworkProcessCreationParameters.h:
* UIProcess/soup/WebContextSoup.cpp:
(WebKit::WebContext::platformInitializeNetworkProcess):
* UIProcess/soup/WebCookieManagerProxySoup.cpp:
(WebKit::WebCookieManagerProxy::setCookiePersistentStorage):
* WebProcess/soup/WebProcessSoup.cpp:
(WebKit::WebProcess::platformInitializeWebProcess):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@161112 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Add a missing include path for GTK
https://bugs.webkit.org/show_bug.cgi?id=126257

Reviewed by Philippe Normand.

* GNUmakefile.am:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@161113 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Move FilterIterator and IteratorPair to WTF and reimplement HashMap::keys() and HashMap::values() using IteratorPair
https://bugs.webkit.org/show_bug.cgi?id=126253

Reviewed by Anders Carlsson.

../WebKit2: 

* Shared/APIArray.h:
Update includes and make elementsOfType() a bit easier to read by using a typedef and some
judicial indentation.

* Shared/FilterIterator.h: Moved to WTF.
* Shared/IteratorPair.h: Moved to WTF.
        
* WebKit2.xcodeproj/project.pbxproj:
Remove the two files.

../WTF: 

* GNUmakefile.list.am:
* WTF.vcxproj/WTF.vcxproj:
* WTF.vcxproj/WTF.vcxproj.filters:
* WTF.xcodeproj/project.pbxproj:
* wtf/CMakeLists.txt:
Add new files.

* wtf/HashMap.h:
* wtf/RefPtrHashMap.h:
Remove the old implementation of keys() and values() and replace it with one
that uses IteratorPair.
        
* wtf/FilterIterator.h: Copied from Source/WebKit2/Shared/FilterIterator.h.
* wtf/IteratorPair.h: Copied from Source/WebKit2/Shared/IteratorPair.h.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@161114 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Add an owning smart pointer for RenderObjects and start using it.
<https://webkit.org/b/126251>

This patch adds a RenderPtr pointer, essentially an OwnPtr for
RenderObjects. The difference is that RenderPtr destroys the object
by calling destroy() on it.

This is necessary to implement the willBeDestroyed() mechanism in
RenderObject that notifies renderers just before they are about to
be deleted, while they can still do tree traversal, etc.

I also added a make_unique-alike helper so you can write:

    auto renderer = createRenderObject<RenderImage>(...);

Put it all to use by making ContentData::createRenderer() return
RenderPtr<RenderObject> instead of raw RenderObject*.

Reviewed by Antti Koivisto.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@161115 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Fix a typo in ChangeLog, landing a commit that won't trigger a build, and will remain
"pending" on dashboard for testing.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@161116 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Please display information about pending runs in build.webkit.org/dashboard
https://bugs.webkit.org/show_bug.cgi?id=122180

Reviewed by Timothy Hatcher.

* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotBuilderQueueView.js:
(BuildbotBuilderQueueView.prototype.update.appendBuilderQueueStatus): Added a semicolon at the end of a line.

* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotQueueView.js:
(BuildbotQueueView.prototype._latestFinishedIteration): Factored out of _appendPendingRevisionCount.
(BuildbotQueueView.prototype._appendPendingRevisionCount): Install a popover tracker over the element.
(BuildbotQueueView.prototype.lineForCommit): Build an element for a particular commit ot be shown in popover.
(BuildbotQueueView.prototype.presentPopoverForElement): Build and show popover content when PopoverTracker
asks us to.

* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/Geometry.js: Added.
Taken from WebInspector with minimal changes:
- Changed root name from WebInspector to Dashboard.
- Removed some unused functionality.
- Added Rect.containsPoint.

* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/Popover.js: Added.
Popover has extensive changes compared to WebInspector version, only drawing code is the same:
- Fixed to work in scrollable pages - WebInspector version assumes that window
and document coordinates are the same, and also erroneously dismisses a scrollable
popover if scrolling cascades out of it after reaching a bound.
- Simplified API and implementation to Dashboard needs, it is no longer possible to
change content of an existing popover.
- Rewrote visibility tracking to be more complete, and not rely on external tracker
object so much.
- Added code to flash scroll bars when showing a scrollable popover.

* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/PopoverTracker.js: Added.
Objects of this class show and hide popovers as appropriate for registered active elements.

* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/StatusLineView.js:
(StatusLineView.prototype.get messageElement): Added an accessor, so that we could
install a popover on message element. It's the only visible element in pending commit
line, but the line has different bounds, so we can't install a popover on it (it
would be incorrectly positioned if we did).

* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/Trac.js:
(Trac.prototype._convertCommitInfoElementToObject):
- Some trac installations report author in a different element, updated to support that.
- Changed to parse title out of description, because trac titles are ugly. Also,
we get a nice HTML with links from the description.

* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/Utilities.js:
(Node.prototype.isAncestor): Copied from Web Inspector, only changing the form for
consistency with the rest of this file (add a property on prototype with assignment
instead of using Object.defineProperty).
(Node.prototype.isDescendant): Ditto.
(Node.prototype.isSelfOrAncestor): Ditto.
(Node.prototype.isSelfOrDescendant): Ditto.
(DOMTokenList.prototype.contains): Ditto.

* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Styles/Popover.css: Added.
Like JS counterpart, mostly lifted from Web Inspector.

* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Styles/QueueView.css:
Added style rules for pending commits popover.

* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Styles/StatusLineView.css:
(.status-line.no-bubble .message): Changed to display:inline-block, so that it fits
to content, and we can show the popover in a correct place.

* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/index.html: Added new files.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@161120 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[GTK] [CMake] Convenience libraries that export API should be compiled with --whole-archive on Unix
https://bugs.webkit.org/show_bug.cgi?id=126232

Reviewed by Gustavo Noronha Silva.

Source/WebKit:

* PlatformGTK.cmake: Prefix libGObjectDOMBindings with --whole-archive so that
symbols are not omitted during final linking.

Source/WebKit2:

* PlatformGTK.cmake: Prefix libGObjectDOMBindings with --whole-archive so that
symbols are not omitted during final linking.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@161121 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[GTK][CMake] Translations must be built
https://bugs.webkit.org/show_bug.cgi?id=125513

Reviewed by Gustavo Noronha Silva.

.:

* Source/PlatformGTK.cmake: Add the po subdirectory.

Source/WebCore/platform/gtk/po:

* CMakeLists.txt: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@161122 268f45cc-cd09-0410-ab3c-d52691b4dbfc
RenderLayer: Store reflection renderer in a RenderPtr.
<https://webkit.org/b/126273>

Reviewed by Anders Carlsson.

* rendering/RenderLayer.h:
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::RenderLayer):
(WebCore::RenderLayer::calculateClipRects):

    Turn RenderLayer::m_reflection into a RenderPtr<RenderReplica>
    instead of a raw pointer.

* WebCore.xcodeproj/project.pbxproj:

    Add RenderPtr.h to private headers.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@161123 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Please display (and link to) revision ranges at build.webkit.org/dashboard
https://bugs.webkit.org/show_bug.cgi?id=122187

Reviewed by Timothy Hatcher.

Added popovers for revision numbers. Removed direct links, because they were misleading -
a test run covers a revision range, not just the latest revision. This also makes
selecting a revision for copy easier.

All revision numbers have the popovers for consistency, although they are most useful
for iterations that are not the last ones in a view, because the content is a delta
from previous iteration.

* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotBuilderQueueView.js:
(BuildbotBuilderQueueView.prototype.update.appendBuilderQueueStatus):
revisionLinksForIteration() is now named revisionContentForIteration().

* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotTesterQueueView.js:
(BuildbotTesterQueueView.prototype.update.appendBuilderQueueStatus):
Ditto.

* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotIteration.js:
(BuildbotIteration.prototype.get previous): Added a function to go back in iteration history.

* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotQueueView.js:
Refactored to support the new popover variation. Replaced revisionLinksForIteration()
with a function that builds an element with popover.

* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/PopoverTracker.js:
Changed to take a function for popover presentation instead of delegate object.
We only need one delegate function, and it's easier to have multiple popovers per view class
this way.

* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Styles/Main.css:
Removed a rule for selectable class. It's replaced with a semantic rule in StatusLineView.css.

* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Styles/QueueView.css:
Renamed pending-commits-popover class to commit-history-popover.

* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Styles/StatusLineView.css:
(.status-line .message .revision-number): Added a rule for revision numbers.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@161124 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Get rid of DFG forward exiting
https://bugs.webkit.org/show_bug.cgi?id=125531

Reviewed by Oliver Hunt.
        
This finally gets rid of forward exiting. Forward exiting was always a fragile concept
since it involved the compiler trying to figure out how to "roll forward" the
execution from some DFG node to the next bytecode index. It was always easy to find
counterexamples where it broke, and it has always served as an obstacle to adding
compiler improvements - the latest being http://webkit.org/b/125523, which tried to
make DCE work for more things.
        
This change finishes the work of removing forward exiting. A lot of forward exiting
was already removed in some other bugs, but SetLocal still did forward exits. SetLocal
is in many ways the hardest to remove, since the forward exiting of SetLocal also
implied that any conversion nodes inserted before the SetLocal would then also be
marked as forward-exiting. Hence SetLocal's forward-exiting made a bunch of other
things also forward-exiting, and this was always a source of weirdo bugs.
        
SetLocal must be able to exit in case it performs a hoisted type speculation. Nodes
inserted just before SetLocal must also be able to exit - for example type check
hoisting may insert a CheckStructure, or fixup phase may insert something like
Int32ToDouble. But if any of those nodes tried to backward exit, then this could lead
to the reexecution of a side-effecting operation, for example:
        
    a: Call(...)
    b: SetLocal(@a, r1)
        
For a long time it seemed like SetLocal *had* to exit forward because of this. But
this change side-steps the problem by changing the ByteCodeParser to always emit a
kind of "two-phase commit" for stores to local variables. Now when the ByteCodeParser
wishes to store to a local, it first emits a MovHint and then enqueues a SetLocal.
The SetLocal isn't actually emitted until the beginning of the next bytecode
instruction (which the exception of op_enter and op_ret, which emit theirs immediately
since it's always safe to reexecute those bytecode instructions and since deferring
SetLocals would be weird there - op_enter has many SetLocals and op_ret is a set
followed by a jump in case of inlining, so we'd have to emit the SetLocal "after" the
jump and that would be awkward). This means that the above IR snippet would look
something like:
        
    a: Call(..., bc#42)
    b: MovHint(@a, r1, bc#42)
    c: SetLocal(@a, r1, bc#47)
        
Where the SetLocal exits "backwards" but appears at the beginning of the next bytecode
instruction. This means that by the time we get to that SetLocal, the OSR exit
analysis already knows that r1 is associated with @a, and it means that the SetLocal
or anything hoisted above it can exit backwards as normal.
        
This change also means that the "forward rewiring" can be killed. Previously, we might
have inserted a conversion node on SetLocal and then the SetLocal died (i.e. turned
into a MovHint) and the conversion node either died completely or had its lifetime
truncated to be less than the actual value's bytecode lifetime. This no longer happens
since conversion nodes are only inserted at SetLocals.
        
More precisely, this change introduces two laws that we were basically already
following anyway:
        
1) A MovHint's child should never be changed except if all other uses of that child
   are also replaced. Specifically, this prohibits insertion of conversion nodes at
   MovHints.
        
2) Anytime any child is replaced with something else, and all other uses aren't also
   replaced, we must insert a Phantom use of the original child.

This is a slight compile-time regression but has no effect on code-gen. It unlocks a
bunch of optimization opportunities so I think it's worth it.

* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::dumpAssumingJITType):
* bytecode/CodeBlock.h:
(JSC::CodeBlock::instructionCount):
* dfg/DFGAbstractInterpreterInlines.h:
(JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):
* dfg/DFGArgumentsSimplificationPhase.cpp:
(JSC::DFG::ArgumentsSimplificationPhase::run):
* dfg/DFGArrayifySlowPathGenerator.h:
(JSC::DFG::ArrayifySlowPathGenerator::ArrayifySlowPathGenerator):
* dfg/DFGBackwardsPropagationPhase.cpp:
(JSC::DFG::BackwardsPropagationPhase::propagate):
* dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::setDirect):
(JSC::DFG::ByteCodeParser::DelayedSetLocal::DelayedSetLocal):
(JSC::DFG::ByteCodeParser::DelayedSetLocal::execute):
(JSC::DFG::ByteCodeParser::handleInlining):
(JSC::DFG::ByteCodeParser::parseBlock):
* dfg/DFGCSEPhase.cpp:
(JSC::DFG::CSEPhase::eliminate):
* dfg/DFGClobberize.h:
(JSC::DFG::clobberize):
* dfg/DFGCommon.h:
* dfg/DFGConstantFoldingPhase.cpp:
(JSC::DFG::ConstantFoldingPhase::foldConstants):
* dfg/DFGDCEPhase.cpp:
(JSC::DFG::DCEPhase::run):
(JSC::DFG::DCEPhase::fixupBlock):
(JSC::DFG::DCEPhase::cleanVariables):
* dfg/DFGFixupPhase.cpp:
(JSC::DFG::FixupPhase::fixupNode):
(JSC::DFG::FixupPhase::fixEdge):
(JSC::DFG::FixupPhase::injectInt32ToDoubleNode):
* dfg/DFGLICMPhase.cpp:
(JSC::DFG::LICMPhase::run):
(JSC::DFG::LICMPhase::attemptHoist):
* dfg/DFGMinifiedNode.cpp:
(JSC::DFG::MinifiedNode::fromNode):
* dfg/DFGMinifiedNode.h:
(JSC::DFG::belongsInMinifiedGraph):
(JSC::DFG::MinifiedNode::constantNumber):
(JSC::DFG::MinifiedNode::weakConstant):
* dfg/DFGNode.cpp:
(JSC::DFG::Node::hasVariableAccessData):
* dfg/DFGNode.h:
(JSC::DFG::Node::convertToPhantom):
(JSC::DFG::Node::convertToPhantomUnchecked):
(JSC::DFG::Node::convertToIdentity):
(JSC::DFG::Node::containsMovHint):
(JSC::DFG::Node::hasUnlinkedLocal):
(JSC::DFG::Node::willHaveCodeGenOrOSR):
* dfg/DFGNodeFlags.cpp:
(JSC::DFG::dumpNodeFlags):
* dfg/DFGNodeFlags.h:
* dfg/DFGNodeType.h:
* dfg/DFGOSRAvailabilityAnalysisPhase.cpp:
(JSC::DFG::OSRAvailabilityAnalysisPhase::run):
* dfg/DFGOSREntrypointCreationPhase.cpp:
(JSC::DFG::OSREntrypointCreationPhase::run):
* dfg/DFGOSRExit.cpp:
* dfg/DFGOSRExit.h:
* dfg/DFGOSRExitBase.cpp:
* dfg/DFGOSRExitBase.h:
(JSC::DFG::OSRExitBase::considerAddingAsFrequentExitSite):
* dfg/DFGPredictionPropagationPhase.cpp:
(JSC::DFG::PredictionPropagationPhase::propagate):
(JSC::DFG::PredictionPropagationPhase::doDoubleVoting):
* dfg/DFGSSAConversionPhase.cpp:
(JSC::DFG::SSAConversionPhase::run):
* dfg/DFGSafeToExecute.h:
(JSC::DFG::safeToExecute):
* dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::speculationCheck):
(JSC::DFG::SpeculativeJIT::emitInvalidationPoint):
(JSC::DFG::SpeculativeJIT::typeCheck):
(JSC::DFG::SpeculativeJIT::compileMovHint):
(JSC::DFG::SpeculativeJIT::compileCurrentBlock):
(JSC::DFG::SpeculativeJIT::checkArgumentTypes):
(JSC::DFG::SpeculativeJIT::compileInt32ToDouble):
* dfg/DFGSpeculativeJIT.h:
(JSC::DFG::SpeculativeJIT::detectPeepHoleBranch):
(JSC::DFG::SpeculativeJIT::needsTypeCheck):
* dfg/DFGSpeculativeJIT32_64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* dfg/DFGTypeCheckHoistingPhase.cpp:
(JSC::DFG::TypeCheckHoistingPhase::run):
(JSC::DFG::TypeCheckHoistingPhase::identifyRedundantStructureChecks):
(JSC::DFG::TypeCheckHoistingPhase::identifyRedundantArrayChecks):
* dfg/DFGValidate.cpp:
(JSC::DFG::Validate::validateCPS):
* dfg/DFGVariableAccessData.h:
(JSC::DFG::VariableAccessData::VariableAccessData):
* dfg/DFGVariableEventStream.cpp:
(JSC::DFG::VariableEventStream::reconstruct):
* ftl/FTLCapabilities.cpp:
(JSC::FTL::canCompile):
* ftl/FTLLowerDFGToLLVM.cpp:
(JSC::FTL::LowerDFGToLLVM::compileNode):
(JSC::FTL::LowerDFGToLLVM::compileGetArgument):
(JSC::FTL::LowerDFGToLLVM::compileSetLocal):
(JSC::FTL::LowerDFGToLLVM::compileMovHint):
(JSC::FTL::LowerDFGToLLVM::compileZombieHint):
(JSC::FTL::LowerDFGToLLVM::compileInt32ToDouble):
(JSC::FTL::LowerDFGToLLVM::speculate):
(JSC::FTL::LowerDFGToLLVM::typeCheck):
(JSC::FTL::LowerDFGToLLVM::appendTypeCheck):
(JSC::FTL::LowerDFGToLLVM::appendOSRExit):
(JSC::FTL::LowerDFGToLLVM::emitOSRExitCall):
* ftl/FTLOSRExit.cpp:
* ftl/FTLOSRExit.h:
* tests/stress/dead-int32-to-double.js: Added.
(foo):
* tests/stress/dead-uint32-to-number.js: Added.
(foo):



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