Allow different types of ScrollingTrees to have different types of ScrollingTreeNode subclasses
https://bugs.webkit.org/show_bug.cgi?id=126445

Reviewed by Tim Horton.

Make it possible to have ScrollingTree subclasses with different subclasses of ScrollingTreeNodes,
by giving ScrollingTree a pure virtual createNode() function. ThreadedScrollingTree implements
this, and then delegates node creation to its AsyncScrollingCoordinator (since we have
a ScrollingCoordinatorMac but no real need for a ThreadedScrollingTreeMac).

Also made ThreadedScrollingTree's m_scrollingCoordinator an AsyncScrollingCoordinator,
since by definition a threaded scrolling tree uses an async coordinator.

* page/scrolling/AsyncScrollingCoordinator.h:
* page/scrolling/ScrollingTree.cpp:
(WebCore::ScrollingTree::updateTreeFromStateNode):
* page/scrolling/ScrollingTree.h:
* page/scrolling/ScrollingTreeScrollingNode.h:
* page/scrolling/ThreadedScrollingTree.cpp:
(WebCore::ThreadedScrollingTree::create):
(WebCore::ThreadedScrollingTree::ThreadedScrollingTree):
(WebCore::ThreadedScrollingTree::createNode):
* page/scrolling/ThreadedScrollingTree.h:
* page/scrolling/mac/ScrollingCoordinatorMac.h:
* page/scrolling/mac/ScrollingCoordinatorMac.mm:
(WebCore::ScrollingCoordinatorMac::createScrollingTreeNode):
* page/scrolling/mac/ScrollingTreeScrollingNodeMac.h:
* page/scrolling/mac/ScrollingTreeScrollingNodeMac.mm:
(WebCore::ScrollingTreeScrollingNodeMac::create):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@161276 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Please add a way to quick peek at failing tests at build.webkit.org/dashboard
https://bugs.webkit.org/show_bug.cgi?id=122181

* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotQueueView.js:
(BuildbotQueueView.prototype._presentNoChangePopover): Update one more place for
popover.present signature change.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@161277 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Deploy more child renderer iterators in RenderBlockFlow.
<https://webkit.org/b/126434>

Reviewed by Sam Weinig.

* rendering/RenderBlockFlow.cpp:
(WebCore::shouldCheckLines):

    Make this helper take a RenderBlockFlow instead of a RenderObject
    and simplified it a bit. RenderDeprecatedFlexibleBox does not
    derive from RenderBlockFlow so those checks can be omitted.

(WebCore::RenderBlockFlow::layoutBlock):
(WebCore::RenderBlockFlow::markAllDescendantsWithFloatsForLayout):
(WebCore::RenderBlockFlow::lineAtIndex):
(WebCore::RenderBlockFlow::lineCount):
(WebCore::RenderBlockFlow::clearTruncation):

    Use childrenOfType to iterate over block and block-flow children.
    Tweaked some early return/continue to reduce nesting.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@161278 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Allow the ChromeClient to provide a custom ScrollingCoordinator
https://bugs.webkit.org/show_bug.cgi?id=126450

Reviewed by Tim Horton.

Some platforms will want to provide a custom ScrollingCoordinator, so let
them do so by asking ChromeClient first for one.

* page/ChromeClient.h:
(WebCore::ChromeClient::createScrollingCoordinator):
* page/Page.cpp:
(WebCore::Page::scrollingCoordinator):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@161279 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[MediaControls][iOS] Enable JavaScript Media Controls on iOS.
https://bugs.webkit.org/show_bug.cgi?id=126440

Reviewed by Eric Carlson.

Drive-by misspelling fix, and add a convenience function to check if the
controls are currently hidden:
* Modules/mediacontrols/mediaControlsApple.js:
(Controller.prototype.handleWrapperMouseMove):
(Controller.prototype.handleWrapperMouseOut):
(Controller.prototype.updatePlaying):
(Controller.prototype.controlsAreHidden): Added.

Add a new subclass of Controller for iOS and a matching CSS:
* Modules/mediacontrols/mediaControlsiOS.css: Added.
* Modules/mediacontrols/mediaControlsiOS.js: Added.
(createControls): Override the createControls() in mediaControlsApple.js.
(ControllerIOS): Define a new class.
(ControllerIOS.prototype.inheritFrom): Convenience method to mixin parent
    prototype methods.
(ControllerIOS.prototype.createBase): Override, listen for touches instead of mouse events.
(ControllerIOS.prototype.createControls): Ditto.
(ControllerIOS.prototype.configureInlineControls): Override, only add play, timeline, and full
    screen butttons.
(ControllerIOS.prototype.configureFullScreenControls): Override, and add no buttons.
(ControllerIOS.prototype.handlePlayButtonTouchStart): Activate.
(ControllerIOS.prototype.handlePlayButtonTouchEnd): De-activate and do action.
(ControllerIOS.prototype.handlePlayButtonTouchCancel): De-activate and cancel.
(ControllerIOS.prototype.handleWrapperTouchStart): Show controls.
(ControllerIOS.prototype.handlePanelTouchStart): Disable video selection.
(ControllerIOS.prototype.handlePanelTouchEnd): Re-enable video selection.
(ControllerIOS.prototype.handlePanelTouchCancel): Ditto.

Drive-by fix to enable the JavaScript controls when the plugin is disabled:
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::parseAttribute):

Add the iOS JavaScript by appending it to the generic (Apple) JavaScript:
* rendering/RenderThemeIOS.mm:
(WebCore::RenderThemeIOS::mediaControlsScript):

Add new files to project:
* DerivedSources.make:
* WebCore.xcodeproj/project.pbxproj:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@161280 268f45cc-cd09-0410-ab3c-d52691b4dbfc
It feels too hard to get rid of a popover at build.webkit.org/dashboard
https://bugs.webkit.org/show_bug.cgi?id=126451

Reviewed by Simon Fraser.

* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Styles/Popover.css:
(.popover.fade-out): Reduced the timeout - 200 ms is enough to not have flicker
when moving the mouse from an element to its popover.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@161281 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Attempt to fix EFL build.

* CMakeLists.txt:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@161282 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Maybe fix Windows build.

* WebCore.vcxproj/copyForwardingHeaders.cmd:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@161283 268f45cc-cd09-0410-ab3c-d52691b4dbfc
setup-git-clone fails to get email address from git
https://bugs.webkit.org/show_bug.cgi?id=126446

Reviewed by Ryosuke Niwa.

The setup-git-clone command fails to get an email address from git
because of a bug in VCSUtils. This patch fixes that bug, and also
makes it so that when VCSUtils fails for real because of a local
misconfiguration, the error message is actually presented to the user
of setup-git-clone.

* Scripts/VCSUtils.pm:
(gitConfig): Call isGit() instead of accessing $isGit directly to make
    sure that $isGit is properly initialized.
* Scripts/webkitpy/tool/commands/setupgitclone.py:
(SetupGitClone.execute): Pull out username and email acquistion to
    it's own method.
(SetupGitClone._get_username_and_email): Catch the exception thrown
    when VCSUtils fails and print out the error message so that the
    user actually knows why the command failed.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@161284 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[WebGL] glScissor test is not accounted for when generating internal rendering textures.
https://bugs.webkit.org/show_bug.cgi?id=126455
<rdar://problem/15744206>

Reviewed by Dean Jackson.

Covered by webgl/1.0.2/conformance/rendering/gl-scissor-test.html

* platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
(WebCore::GraphicsContext3D::prepareTexture): Check state of GL_SCISSOR_TEST and GL_DITHER, deactivate them during
our internal drawing, then turn them back on for further processing.


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

Reviewed by Simon Fraser.

* css/CSSComputedStyleDeclaration.cpp:
(WebCore::ComputedStyleExtractor::propertyValue): Added iOS-specific code and FIXME comment.
* css/CSSParser.cpp:
(WebCore::CSSParserContext::CSSParserContext): Ditto.
(WebCore::CSSParser::parseValue): Ditto.
* css/CSSPropertyNames.in: Added property -webkit-composition-fill-color. Also added FIXME comment.
* css/CSSValueKeywords.in: Added iOS-specific -apple-system-* values.
* css/DeprecatedStyleBuilder.cpp:
(WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder): Added iOS-specific code and FIXME comments.
* css/MediaFeatureNames.h: Added media feature -webkit-video-playable-inline.
* css/MediaQueryEvaluator.cpp:
(WebCore::isRunningOnIPhoneOrIPod): Added. Also added FIXME comment.
(WebCore::video_playable_inlineMediaFeatureEval): Added.
* css/StyleResolver.cpp:
(WebCore::StyleResolver::canShareStyleWithElement): Substitute toHTMLMediaElement() for toMediaElement().
(WebCore::StyleResolver::applyProperty): Added iOS-specific code and FIXME comment.
* css/html.css: Added iOS-specific CSS styles.
(input, textarea, keygen, select, button, isindex):
(isindex):
(input[type="date"]):
(input[type="datetime"]):
(input[type="datetime-local"]):
(input[type="month"]):
(input[type="time"]):
(textarea):
(input:-webkit-autofill):
(input[type="radio"], input[type="checkbox"]):
(input[type="button"], input[type="submit"], input[type="reset"], input[type="file"]::-webkit-file-upload-button, button):
(input[type="range"]::-webkit-slider-thumb, input[type="range"]::-webkit-media-slider-thumb):
(input[type="range"]::-webkit-slider-thumb:active):
(input:disabled, textarea:disabled):
(input[readonly], textarea[readonly]):
(textarea::-webkit-input-placeholder):
(input[type="checkbox"]):
(input[type="radio"]):
(input[type="checkbox"]:checked, input[type="radio"]:checked):
(input[type="checkbox"]:checked:disabled, input[type="radio"]:checked:disabled):
(select:focus):
(select):
* css/mathml.css: Added iOS-specific CSS styles.
(math, mfenced > *):
(mo, mfenced):
* css/mediaControlsiOS.css: Added.
* css/svg.css: Added iOS-specific CSS styles.
(text, tspan, tref):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@161286 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Small build fix for the GTK+ CMake port

* PlatformGTK.cmake: Add an IDL file that is missing from the list of IDLs
used to generate GObject DOM bindings.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@161287 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Add lineageOfType renderer iterator and start using it.
<https://webkit.org/b/126456>

Add a convenient way to iterate over a renderers ancestry *including*
the starting point renderer (if it meets the type criteria.)

This works just like lineageOfType for Elements.

Reviewed by Geoffrey Garen.

* rendering/RenderAncestorIterator.h:
(WebCore::lineageOfType):

    Added. Returns an adapter for walking a renderer's entire lineage
    matching any renderer of the given type.

* rendering/RenderBoxModelObject.h:
* rendering/RenderLayerModelObject.h:

    Add the requisite isRendererOfType<T> helpers.

* rendering/RenderBox.cpp:
(WebCore::RenderBox::enclosingFloatPaintingLayer):
* rendering/RenderObject.cpp:
(WebCore::RenderObject::enclosingLayer):
(WebCore::RenderObject::enclosingBox):
(WebCore::RenderObject::enclosingBoxModelObject):

    Simplify with lineageOfType. Added some FIXMEs about functions
    that should return references instead of pointers.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@161288 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[WK2][CoordinatedGraphics] Removing repeated protected keyword in WebView
https://bugs.webkit.org/show_bug.cgi?id=126462

Reviewed by Simon Fraser.

* UIProcess/CoordinatedGraphics/WebView.h:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@161289 268f45cc-cd09-0410-ab3c-d52691b4dbfc
build.webkit.org/dashboard says "failed build" even if it's another step that failed
https://bugs.webkit.org/show_bug.cgi?id=126461

Reviewed by Geoffrey Garen.

* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotBuilderQueueView.js:
(BuildbotBuilderQueueView.prototype.update.appendBuilderQueueStatus): Link to main
build page if it's not the compilation that failed. Use text from buildbot for description.
Show a yellow icon if it's a different kind of failure.

* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotIteration.js:
(BuildbotIteration.prototype.update): Record whether it was compile-webkit step that failed.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@161290 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Remove SPI, user default for disabling process suppression
https://bugs.webkit.org/show_bug.cgi?id=126458

Reviewed by Sam Weinig.

* Shared/API/c/WKDeprecatedFunctions.cpp:
(WKContextGetProcessSuppressionEnabled):
(WKContextSetProcessSuppressionEnabled):
    - depracated SPI.
* UIProcess/API/C/mac/WKContextPrivateMac.mm:
    - depracated SPI.
* UIProcess/WebContext.cpp:
(WebKit::WebContext::WebContext):
    - removed m_processSuppressionEnabled.
* UIProcess/WebContext.h:
    - removed setProcessSuppressionEnabled, processSuppressionEnabled implementation,
      processSuppressionEnabledChanged, m_processSuppressionEnabled.
* UIProcess/mac/WebContextMac.mm:
(WebKit::WebContext::platformInitialize):
    - removed m_processSuppressionEnabled.
(WebKit::WebContext::processSuppressionEnabled):
    - check whether all pages in all processes are suppressible.
(WebKit::WebContext::canEnableProcessSuppressionForNetworkProcess):
    - removed call to omitProcessSuppression, m_processSuppressionEnabled -> processSuppressionEnabled().
(WebKit::WebContext::canEnableProcessSuppressionForWebProcess):
    - removed call to omitProcessSuppression, processSuppressionEnabled (we don't care if a page in a difference process is not suppresible).
(WebKit::WebContext::canEnableProcessSuppressionForGlobalChildProcesses):
    - removed call to omitProcessSuppression, s_processSuppressionEnabledForAllContexts -> processSuppressionIsEnabledForAllContexts().



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@161291 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Cocoa] Expose session state API
https://bugs.webkit.org/show_bug.cgi?id=126463

Reviewed by Sam Weinig.

* UIProcess/API/Cocoa/WKBrowsingContextController.h: Declared new property and method.
* UIProcess/API/Cocoa/WKBrowsingContextController.mm:
(-[WKBrowsingContextController sessionState]): Added. Calls WebPageProxy::sessionStateData.
(-[WKBrowsingContextController restoreFromSessionState:]): Added. Calls
WebPageProxy::restoreFromSessionState.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@161292 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Give all PlatformCALayers a PlatformLayerID, not just remote ones
https://bugs.webkit.org/show_bug.cgi?id=126466

Reviewed by Tim Horton.

Source/WebCore:

The ScrollingStateTree has references to both GraphicsLayers and PlatformLayers
which is confusing, and is necessary because the underlying PlatformLayer
inside a GraphicsLayer can change. In order to hide some of this complexity,
expose GraphicsLayer::primaryLayerID() which is a PlatformLayerID that clients
can hold onto to test for underlying layer swapping.

Also constify LayerType m_layerType on PlatformCALayer, which required
cleaning up the construction of PlatformCALayerMac in the case where a
PlatformCALayerMac is wrapping an existing CALayer (which happens for video).

* WebCore.exp.in:
* platform/graphics/GraphicsLayer.h:
(WebCore::GraphicsLayer::primaryLayerID):
* platform/graphics/ca/GraphicsLayerCA.cpp:
(WebCore::GraphicsLayerCA::primaryLayerID):
* platform/graphics/ca/GraphicsLayerCA.h:
* platform/graphics/ca/PlatformCALayer.cpp:
(WebCore::generateLayerID):
(WebCore::PlatformCALayer::PlatformCALayer):
* platform/graphics/ca/PlatformCALayer.h:
(WebCore::PlatformCALayer::layerID):
* platform/graphics/ca/mac/PlatformCALayerMac.h:
* platform/graphics/ca/mac/PlatformCALayerMac.mm:
(PlatformCALayerMac::create):
(PlatformCALayerMac::PlatformCALayerMac):
(PlatformCALayerMac::commonInit):

Source/WebKit2:

The ScrollingStateTree has references to both GraphicsLayers and PlatformLayers
which is confusing, and is necessary because the underlying PlatformLayer
inside a GraphicsLayer can change. In order to hide some of this complexity,
expose GraphicsLayer::primaryLayerID() which is a PlatformLayerID that clients
can hold onto to test for underlying layer swapping.

GraphicsLayerCARemote and PlatformCALayerRemote can now just use the
primaryLayerID() function exposed via the base class.

* WebProcess/WebPage/mac/GraphicsLayerCARemote.cpp:
* WebProcess/WebPage/mac/GraphicsLayerCARemote.h:
* WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
(PlatformCALayerRemote::PlatformCALayerRemote):
(PlatformCALayerRemote::recursiveBuildTransaction):
* WebProcess/WebPage/mac/PlatformCALayerRemote.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@161293 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[WebGL] CGLPixelFormat should specify SampleBuffer and Sample count when using MSAA
https://bugs.webkit.org/show_bug.cgi?id=126468

Reviewed by Dean Jackson.

Covered by webgl/1.0.2/resources/webgl_test_files/conformance/rendering/gl-scissor-test.html

* platform/graphics/mac/GraphicsContext3DMac.mm:
(WebCore::setPixelFormat): Add kCGLPFAMultisample, kCGLPFASampleBuffers (and count), and
kCGLPFASamples (and count) to our pixel format when 'antialias=true'.
(WebCore::GraphicsContext3D::GraphicsContext3D): Pass a new 'antialias' flag to the setPixelFormat
method so we can turn on MSAA features when needed.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@161294 268f45cc-cd09-0410-ab3c-d52691b4dbfc
It's confusing to have two elements link to the same URL at build.webkit.org/dashboard
https://bugs.webkit.org/show_bug.cgi?id=126467

Reviewed by Geoffrey Garen.

* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/StatusLineView.js:
(StatusLineView): Don't linkify the label text, the bubble is easier to target with mouse
pointer, or to tap.


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