[CSS Shapes] Simplify FloatRoundedRect, BoxShape construction
https://bugs.webkit.org/show_bug.cgi?id=125995

Reviewed by Andreas Kling.

Cleanup of various internal Shape issues:
- Removed unnecessary Shape() initialization list entries in Shape subclasses
  per https://bugs.webkit.org/show_bug.cgi?id=125548#c2.
- Used const references instead of pointers for non-deprecated Shape:createShape() logic.
- Replaced createShape() overloads for Rasters and Boxes with functions named
  createRasterShape() and createBoxShape().
- Added a FloatRoundedRect::Radii() constructor to reduce the parameter list
  length of the FloatRoundedRect constructor in createBoxShape().

There are no new tests, this is just internal refactoring.

* platform/graphics/FloatRoundedRect.h:
(WebCore::FloatRoundedRect::Radii::Radii):
* rendering/shapes/BoxShape.h:
(WebCore::BoxShape::BoxShape):
* rendering/shapes/PolygonShape.h:
(WebCore::PolygonShape::PolygonShape):
* rendering/shapes/RasterShape.h:
(WebCore::RasterShape::RasterShape):
* rendering/shapes/RectangleShape.h:
(WebCore::RectangleShape::RectangleShape):
* rendering/shapes/Shape.cpp:
(WebCore::createInsetShape):
(WebCore::Shape::createShape):
(WebCore::Shape::createRasterShape):
(WebCore::Shape::createBoxShape):
* rendering/shapes/Shape.h:
* rendering/shapes/ShapeInfo.cpp:
(WebCore::ShapeInfo<RenderType>::computedShape):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@161260 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Provide a visual clue when element has a popover at build.webkit.org/dashboard
https://bugs.webkit.org/show_bug.cgi?id=126281

Reviewed by Timothy Hatcher.

* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/PopoverTracker.js:
(PopoverTracker): Add a class name to elements with popovers.

* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Styles/Main.css:
(*): We have -webkit-user-select:none, so let's also not show text selection cursor.
I might have broke that recently.
(*:link): Show hand cursor over links.
(.popover-tracking:hover): Put a shadow on hover over element with popovers.

* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Styles/StatusLineView.css:
(.status-line .message .revision-number): Show text selection cursor on our only
selectable text element.
(.status-line .bubble.popover-tracking:hover): Text in a bubble looks better with
a white shadow than with a dark one on hover.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@161261 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[CMake] Build TestWebKitAPI tests into a directory structure
https://bugs.webkit.org/show_bug.cgi?id=126358

Reviewed by Gyuyoung Kim.

WebKitGTK+ builds the TestWebKitAPI tests into a "TestWebKitAPI" directory. This
is useful for keeping the "bin" directory tidy during building and will make it easier
to integrate the CMake build into the existing WebKitGTK+ scripts.

* TestWebKitAPI/CMakeLists.txt: Set the output directory of all TestWebKitAPI binaries
and make the names simpler now that the directory identifies what category the test is in.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@161262 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[CMake] The forwarding headers generated by WebKitMacros.m4 are incompatible with the headers generated by generate-forwarding-headers.pl
https://bugs.webkit.org/show_bug.cgi?id=126361

Reviewed by Philippe Normand.

Make the forwarding headers generated by WebKitMacros.m4 compatible with the headers
generated by the WebKit2 forwarding headers generation script.

* Source/cmake/WebKitMacros.cmake: Try to convert absolute paths in the forwarding headers
to ones that are relative to the Source directory.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@161263 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[WinCairo] Compile error.
https://bugs.webkit.org/show_bug.cgi?id=126428

Patch by peavo@outlook.com <peavo@outlook.com> on 2014-01-03
Reviewed by Brent Fulgham.

The NativeImagePtr type is not an CGImageRef on WinCairo, cannot use CFRetain.

* loader/cache/MemoryCache.cpp: Replace USE(CF) with USE(CG).
* loader/cache/MemoryCache.h: Ditto.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@161264 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Added GStreamer to list of required tools for compiling webkit.
https://bugs.webkit.org/show_bug.cgi?id=126319

Reviewed by Philippe Normand.

* building/tools.html:
Mentioned that QuickTime and QuickTime SDK are only required for AppleWin.
Added GStreamer installers to list of required tools for WinCairo.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@161265 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[WinCairo] Enable video using GStreamer.
https://bugs.webkit.org/show_bug.cgi?id=126015

Reviewed by Darin Adler.

* win/tools/vsprops/FeatureDefinesCairo.props:
Define ENABLE_MEDIA_CONTROLS_SCRIPT, ENABLE_VIDEO_TRACK, and ENABLE_VIDEO.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@161266 268f45cc-cd09-0410-ab3c-d52691b4dbfc
WebKit-GTK 1.8.1 does not build on OS X 10.7
https://bugs.webkit.org/show_bug.cgi?id=88407

Reviewed by Carlos Garcia Campos.

Replace non-portable 'echo -n' with 'true'.

* GNUmakefile.am:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@161267 268f45cc-cd09-0410-ab3c-d52691b4dbfc
REGRESSION(r161214): [GTK] WebKit2 C API tests fail to run after r161214
https://bugs.webkit.org/show_bug.cgi?id=126430

Reviewed by Martin Robinson.

* Scripts/run-gtk-tests:
(TestRunner._setup_testing_environment):
* gtk/common.py: Use common.tests_library_build_path() instead.
(tests_library_build_path): Helper funtion that returns the path
where the tests libraries are built.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@161268 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Line ending conversion should be able to handle strings with null chars
https://bugs.webkit.org/show_bug.cgi?id=126202

This is a merge from Blink.

Reviewed by Alexey Proskuryakov.

Source/WebCore:

Test: http/tests/local/formdata/send-form-data-with-string-containing-null.html

* platform/text/LineEnding.cpp: (WebCore::normalizeToCROrLF): Do it right.

LayoutTests:

* http/tests/local/formdata/send-form-data-with-string-containing-null-expected.txt: Added.
* http/tests/local/formdata/send-form-data-with-string-containing-null.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@161269 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore: Refactor NSActivity handling code from ChildProcess to UserActivity
https://bugs.webkit.org/show_bug.cgi?id=126330

Reviewed by Sam Weinig.

UserActivity is a mechanism to express to the operating system (where appropriate)
that a user initiated activity is taking place, and as such that resources should be
made available to the process accordingly.

Currently we hold a single NSActivity, at the WebKit layer. This refactoring allows us
to hold different activity tokens for different user actions (which simplifies the
handling, and aides debugging since the token can more accurately express the activity
taking place), and also will allow us to avoid the layering difficulty of calling back
up the stack to WebKit to register that an activity is taking place.

* WebCore.xcodeproj/project.pbxproj:
    - added new files.
* platform/UserActivity.cpp: Added.
(WebCore::UserActivity::UserActivity):
    - nop implementation - ignore description.
(WebCore::UserActivity::beginActivity):
(WebCore::UserActivity::endActivity):
    - nop implementation - just inc/dec m_count.
* platform/UserActivity.h: Added.
(WebCore::UserActivity::isActive):
    - returns true if one or more instance of this activity is in progress.
* platform/mac/UserActivityMac.mm: Added.
(WebCore::UserActivity::UserActivity):
    - constructor accepts one argument, a description string.
(WebCore::UserActivity::isValid):
    - used by assertions.
(WebCore::UserActivity::beginActivity):
(WebCore::UserActivity::endActivity):
    - track start/end of an activity - calls to these methods should be balanced.
(WebCore::UserActivity::hysteresisTimerFired):
      - used to implement hysteresis in releasing  NSActivity.

Source/WebKit2: VibrationPattern should allocate an single vector instance for single integer input
https://bugs.webkit.org/show_bug.cgi?id=126417

Patch by Jinwoo Song <jinwoo7.song@samsung.com> on 2014-01-03
Reviewed by Gyuyoung Kim.

Fix a vibration unit test regression after r161139. Also remove unnecessary test cases. 

* UIProcess/API/efl/tests/test_ewk2_view.cpp:
(EWK2ViewTest::loadVibrationHTMLString):
(TEST_F):

Source/WTF: Refactor NSActivity handling code from ChildProcess to UserActivity
https://bugs.webkit.org/show_bug.cgi?id=126330

Reviewed by Sam Weinig.

UserActivity is a mechanism to express to the operating system (where appropriate)
that a user initiated activity is taking place, and as such that resources should be
made available to the process accordingly.

Currently we hold a single NSActivity, at the WebKit layer. This refactoring allows us
to hold different activity tokens for different user actions (which simplifies the
handling, and aides debugging since the token can more accurately express the activity
taking place), and also will allow us to avoid the layering difficulty of calling back
up the stack to WebKit to register that an activity is taking place.

* wtf/Platform.h:
    - added HAVE_NS_ACTIVITY.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@161271 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Define WebProcess::usesNetworkProcess unconditionally
https://bugs.webkit.org/show_bug.cgi?id=126208

Reviewed by Martin Robinson.

Returning false when network process is not enabled like
WebContext does. This way we reduce the amount of ifdefs used when
checking whether network process is in use.

* UIProcess/gtk/WebContextGtk.cpp:
(WebKit::WebContext::platformInitializeWebProcess): Remove #ifdef
and only setup network features when not using network process.
* WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
(WebKit::WebPlatformStrategies::isAvailable): Remove #ifdef.
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::downloadManager):
(WebKit::WebProcess::shouldTerminate):
(WebKit::WebProcess::usesNetworkProcess):
* WebProcess/WebProcess.h:
* WebProcess/mac/WebProcessMac.mm:
(WebKit::WebProcess::platformSetCacheModel): Remove #ifdef.
(WebKit::WebProcess::platformInitializeWebProcess): Ditto.
* WebProcess/soup/WebProcessSoup.cpp:
(WebKit::WebProcess::platformSetCacheModel): Ditto.
(WebKit::WebProcess::platformClearResourceCaches): Ditto.
(WebKit::WebProcess::platformInitializeWebProcess): Ditto.
(WebKit::WebProcess::platformTerminate): Only remove the language
observer when not using network process.
(WebKit::WebProcess::setIgnoreTLSErrors): Assert when this is
called with network process enabled.
(WebKit::WebProcess::allowSpecificHTTPSCertificateForHost): Ditto.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@161272 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

Reviewed by Timothy Hatcher and Timothy Horton.

Detailed results are saved by run-webkit-tests to full_results.json (which is actually
JSONP). Dashboard will load them on demand.

* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/Buildbot.js:
(Buildbot.prototype.layoutTestResultsURLForIteration): Moved from WebKitBuildbot.js
and made it use a function from WebKitBuildbot that builds results directory path.
(Buildbot.prototype.layoutTestFullResultsURLForIteration): Added a function that builds
a URL for full_results.json.
(Buildbot.prototype.layoutTestCrashLogForIteration): Added a function that builds
a URL for a crash log.

* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotIteration.js:
(BuildbotIteration.prototype.loadLayoutTestResults): Load and cache layout test results for
the iteration.

* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotQueueView.js:        
(BuildbotQueueView.prototype._presentPopoverForPendingCommits): Updated for changed
popover API (see below).
(BuildbotQueueView.prototype._presentPopoverForRevisionRange): Ditto.

* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotTesterQueueView.js:
(BuildbotTesterQueueView.prototype.update.appendBuilderQueueStatus): Added a check
for iterations that were interrupted (previously, they were displayed incorrectly,
often as passes). Install popover trackers for failure bubbles for which we can currently
display something useful.
(BuildbotTesterQueueView.prototype._popoverContentForLayoutTestRegressions): Build
a popover for layout test regressions when we have the data loaded on demand.
We have test paths, special indicators for crashes/timeouts, and links to test history
at flakiness dashboard.
(BuildbotTesterQueueView.prototype._presentPopoverForLayoutTestRegressions): Show
the popover for layout test regressions. Just shows "Loading..." until the data is
loaded.
(BuildbotTesterQueueView.prototype._presentPopoverForMultipleFailureKinds): List
types of failures if there are multiple. There is a lot of similarity with
appendBuilderQueueStatus(), but I couldn't find a good way to share the code.

* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/Initialization.js:
Create a global test history object, which is used for links in layout test popover.

* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/Popover.js:
Changed the API to be more like WebInspector again, allowing for changing content
of an existing popover. As the size of a popover can change, making the mouse pointer
enter it without a mousenter event, install a handler for mousewheel instead, and block
document scrolling from this event handler when needed.

* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/StatusLineView.js:
(StatusLineView.prototype.get statusBubbleElement): Added an accessor for status
bubble element, making it possible to install a popover on it.

* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/Utilities.js:
(JSON.load): Added the ability to load JSONP by providing an optional callback name.

* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/WebKitBuildbot.js:
(WebKitBuildbot.prototype.layoutTestResultsDirectoryURLForIteration): Switched from
building a complete results URL to only building one for root results path. This is
the part that depends on specific buildbot installation, everything relative to it
is the same.

* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/WebKitTestHistory.js: Added.
Build a path to test history page. In the future, we may consider adding code to
load the data and display it inline.

* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Styles/QueueView.css:
Added styles for this new popover.

* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/index.html: Added
a new file, WebKitTestHistory.js.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@161273 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Revise WebGL DataView test to match ECMAScript Draft Specification
https://bugs.webkit.org/show_bug.cgi?id=126032

Based on the ECMAScript specification, we believe that the current test is wrong. We are working to get this
fixed upstream. 

Reviewed by Dean Jackson.

* webgl/1.0.2/resources/webgl_test_files/conformance/typedarrays/data-view-test.html: Do not
prohibit using DataView as a function.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@161274 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Refactor NSActivity handling code from ChildProcess to UserActivity
https://bugs.webkit.org/show_bug.cgi?id=126330

Unreviewed build fix.

* platform/UserActivity.h:
    - case fix.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@161275 268f45cc-cd09-0410-ab3c-d52691b4dbfc
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