WebKit-https.git
5 years ago[GTK][CMake] Add support for building with Clang
zandobersek@gmail.com [Thu, 20 Mar 2014 18:22:54 +0000 (18:22 +0000)]
[GTK][CMake] Add support for building with Clang
https://bugs.webkit.org/show_bug.cgi?id=130260

Reviewed by Martin Robinson.

.:

* Source/PlatformGTK.cmake: Run the generate-gtkdoc script with the CFLAGS env set
to the list C compiler flags as constructed by CMake.
* Source/cmake/OptionsCommon.cmake: When building with Clang, use the -Qunused-arguments
compiler option to suppress verbose warnings about arguments that went unused by the driver.
* Source/cmake/OptionsGTK.cmake: Use -fno-omit-frame-pointer for both GCC and Clang.
-fno-tree-dce should be used only for GCC.
* Source/cmake/gtest/CMakeLists.txt: When building with Clang the GTest framework
should be built with GTEST_HAS_TR1_TUPLE macro defined to 0 to avoid build failures.

Tools:

* TestWebKitAPI/CMakeLists.txt: When building with Clang TestWebKitAPI should be
built with GTEST_HAS_TR1_TUPLE defined to 0 to avoid build failures occuring in the
included GTest framework headers.
* gtk/generate-gtkdoc:
(prepare_environment_for_gtkdoc_generation): Don't modify the CFLAGS env anymore
in case of using Clang since that is now set by the CMake rule.

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

5 years agoUnreviewed GTK Gardening.
mrobinson@webkit.org [Thu, 20 Mar 2014 18:18:32 +0000 (18:18 +0000)]
Unreviewed GTK Gardening.

Update expectation of accessibility/table-detection.html after r165535.
Update expectation of accessibility/aria-hidden-false-works-in-subtrees.html.

Patch by Carlos Alberto Lopez Perez <clopez@igalia.com> on 2014-03-20

* platform/gtk/accessibility/aria-hidden-false-works-in-subtrees-expected.txt:
* platform/gtk/accessibility/table-detection-expected.txt:

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

5 years agoUnreviewed Clang build fix for the GTK port after r165952.
zandobersek@gmail.com [Thu, 20 Mar 2014 18:09:52 +0000 (18:09 +0000)]
Unreviewed Clang build fix for the GTK port after r165952.

* wtf/gobject/GMainLoopSource.h: Include the <functional> header for the std::function<> objects.

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

5 years ago[Mac] Support asynchronous NSTextInputClient
ap@apple.com [Thu, 20 Mar 2014 17:45:04 +0000 (17:45 +0000)]
[Mac] Support asynchronous NSTextInputClient
https://bugs.webkit.org/show_bug.cgi?id=130479

Reviewed by Anders Carlsson.

The implementation is currently disabled, pending lower level support.
Most of the code is not under compile time guard however, to facilitate cross-platform
reuse, or at least under a PLATFORM(COCOA) guard to share the code with iOS.

* UIProcess/API/mac/WKView.mm: Added a compile time branch for USE(ASYNC_NSTEXTINPUTCLIENT).
We still implement sync NSTextInputClient here, in order to get assertions when
its methods are unexpectedly called.
The new code first sends an event to input method asynchronously, handling any callbacks
that may arrive. During this time, we no longer care about WKViewInterpretKeyEventsParameters
at all. Once done, we interpret key bindings synchronously, collecting them into
a vector.

* UIProcess/API/mac/WKViewInternal.h: We no longer expose _interpretKeyEvent outside
WKView.

* UIProcess/WebPageProxy.cpp:
* UIProcess/WebPageProxy.h:
Added async calls and callbacks. Removed unnecessary and slightly harmful .get() when moving
a callback pointer into map. Moved insertDictatedText() and getAttributedSubstringFromRange()
from PLATFORM(COCOA) to PLATFORM(MAC), because they are unused and unimplemented on
iOS, and unlikely to be needed any time soon. Changed USE(APPKIT) to PLATFORM(MAC),
because that's more accurate in this case (nothing depends on AppKit, it's just code
that we only need on Mac).

* UIProcess/WebPageProxy.messages.in: Added messages for new async IM responses.

* UIProcess/ios/WebPageProxyIOS.mm: Removed insertDictatedText() and getAttributedSubstringFromRange().

* UIProcess/mac/WebPageProxyMac.mm:
(WebKit::WebPageProxy::insertDictatedTextAsync):
(WebKit::WebPageProxy::attributedSubstringForCharacterRangeAsync):
(WebKit::WebPageProxy::attributedStringForCharacterRangeCallback):
Added async calls and callbacks that are Mac only.

* WebProcess/WebPage/WebPage.cpp:
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/mac/WebPageMac.mm:
Added async implementations (which are essentially the same as sync ones, sadly).

* WebProcess/WebPage/WebPage.messages.in: Added async messages, moved some messages
under PLATFORM(MAC).

* WebProcess/WebPage/ios/WebPageIOS.mm: More of deleting functions that are Mac only,
and cannot be easily implemented in WebPage.cpp with shared code.

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

5 years ago[iOS] Support MediaDocument when building with PLUGIN_PROXY_FOR_VIDEO
eric.carlson@apple.com [Thu, 20 Mar 2014 17:37:57 +0000 (17:37 +0000)]
[iOS] Support MediaDocument when building with PLUGIN_PROXY_FOR_VIDEO
https://bugs.webkit.org/show_bug.cgi?id=130520

Reviewed by Jer Noble.

* dom/DOMImplementation.cpp:
(WebCore::DOMImplementation::createDocument): Check the isVideoPluginProxyEnabled setting
    when building with ENABLE_PLUGIN_PROXY_FOR_VIDEO.

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

5 years ago[CSS Blending] Blending operation is not isolated when setting z-index on parent...
commit-queue@webkit.org [Thu, 20 Mar 2014 17:37:16 +0000 (17:37 +0000)]
[CSS Blending] Blending operation is not isolated when setting z-index on parent from javascript
https://bugs.webkit.org/show_bug.cgi?id=129307

Patch by Mihai Tica <mitica@adobe.com> on 2014-03-20
Reviewed by Dean Jackson.

Source/WebCore:

Reimplement the logic behind isolating blend modes. The blending operation should be limited to the
contents of the parent stacking context. The proposed solution implies adding logic in updateDescendantDependentFlags,
to track child elements that have blending and create a transparency layer that triggers isolation.

Tests: css3/compositing/blend-mode-background.html
       fast/repaint/blend-mode-isolate-stacking-context.html

* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::RenderLayer): Remove old members, add new members to constructor.
(WebCore::RenderLayer::updateBlendMode): Update parent stacking context isolation on blend mode change.
(WebCore::RenderLayer::updateNonCompositedParentStackingContextHasBlendedChild):
- Set m_hasBlendedElementInChildStackingContext for the non composited parent stacking context.
(WebCore::RenderLayer::dirtyAncestorParentStackingContextHasBlendedElement):
- Set flag so isolation should be considered in updateDescendantDependentFlags.
(WebCore::RenderLayer::nonCompositedParentStackingContextHasBlendedChild):
- Return whether the non composited parent stacking context isolates blending.
(WebCore::RenderLayer::updateDescendantDependentFlags): Add logic for isolating blending.
(WebCore::RenderLayer::addChild): Call to updateNonCompositedParentStackingContextHasBlendedChild if needed.
(WebCore::RenderLayer::removeChild): Call to dirtyAncestorParentStackingContextHasBlendedElement if needed.
(WebCore::RenderLayer::updateStackingContextsAfterStyleChange): Update isolation when a stacking context was set or unset.
(WebCore::RenderLayer::styleChanged): Removed oldStyle parameter from updateBlendMode call.
 Update parent stacking context isolation on blend mode change.
* rendering/RenderLayer.h:
- Add members, getters and setters for tracking whether the element has a blended child:
    - m_hasBlendedElementInChildStackingContext
    - m_hasBlendedElementInChildStackingContextStatusDirty
- Removed m_updateParentStackingContextShouldIsolateBlendingDirty (replaced with m_hasBlendedElementInChildStackingContextStatusDirty)
- Removed m_isolatesBlending (replaced with m_hasBlendedElementInChildStackingContext)
- Updated the isolatesBlending method to return true only when the element is a stacking context and has a blended child.
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::computeCompositingRequirements): Removed layer.updateParentStackingContextShouldIsolateBlending call.

LayoutTests:

Test if setting or unsetting stacking context or blend mode from script correctly updates blending
isolation.

* css3/compositing/blend-mode-background.html: Added.
* fast/repaint/blend-mode-isolate-stacking-context-expected.txt: Added.
* fast/repaint/blend-mode-isolate-stacking-context.html: Added.
* platform/mac/css3/compositing/blend-mode-background-expected.png: Added.
* platform/mac/css3/compositing/blend-mode-background-expected.txt: Added.

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

5 years ago[CSS Regions] Remove "visibility:hidden" from overflow-scrollable* tests
stavila@adobe.com [Thu, 20 Mar 2014 17:28:53 +0000 (17:28 +0000)]
[CSS Regions] Remove "visibility:hidden" from overflow-scrollable* tests
https://bugs.webkit.org/show_bug.cgi?id=130510

Reviewed by Andrei Bucur.

The visibility hidden option was needed to prevent these tests from failing before the
visual overflow was properly implemented (bug 118665). It is now no longer required.

* fast/regions/overflow-scrollable-rel-pos-fragment-expected.html:
* fast/regions/overflow-scrollable-rel-pos-fragment.html:
* fast/regions/overflow-scrollable-rotated-fragment-expected.html:
* fast/regions/overflow-scrollable-rotated-fragment.html:
* fast/regions/overflow-scrollable-unsplittable-fragment-expected.html:
* fast/regions/overflow-scrollable-unsplittable-fragment.html:

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

5 years agoRemove remaining GTK+ unused parameter warnings from WebKit2
mrobinson@webkit.org [Thu, 20 Mar 2014 17:20:58 +0000 (17:20 +0000)]
Remove remaining GTK+ unused parameter warnings from WebKit2
https://bugs.webkit.org/show_bug.cgi?id=130518

Reviewed by Sergio Villar Senin.

Fix almost all unused parameter warnings in the WebKit2GTK+ build.

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

5 years ago[GTK] [CMake] Do not compile ProxyResolverSoup.cpp
mrobinson@webkit.org [Thu, 20 Mar 2014 17:05:48 +0000 (17:05 +0000)]
[GTK] [CMake] Do not compile ProxyResolverSoup.cpp
https://bugs.webkit.org/show_bug.cgi?id=130516

Reviewed by Sergio Villar Senin.

* PlatformGTK.cmake: Remove the file from the source list.

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

5 years agoUnreviewed, rolling out r165962.
commit-queue@webkit.org [Thu, 20 Mar 2014 15:34:56 +0000 (15:34 +0000)]
Unreviewed, rolling out r165962.
https://bugs.webkit.org/show_bug.cgi?id=130512

It broke the build (Requested by Ossy on #webkit).

Reverted changeset:

.:

"[EFL][GTK] Get CMake to find Freetype2 properly"
https://bugs.webkit.org/show_bug.cgi?id=130150
http://trac.webkit.org/changeset/165962

Source/WebCore:

"[EFL][GTK] Get CMake to find Freetype2 properly"
https://bugs.webkit.org/show_bug.cgi?id=130150
http://trac.webkit.org/changeset/165962

Source/WebKit:

"[EFL][GTK] Get CMake to find Freetype2 properly"
https://bugs.webkit.org/show_bug.cgi?id=130150
http://trac.webkit.org/changeset/165962

Source/WebKit2:

"[EFL][GTK] Get CMake to find Freetype2 properly"
https://bugs.webkit.org/show_bug.cgi?id=130150
http://trac.webkit.org/changeset/165962

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

5 years ago"input" event is not fired when changing a select element's value
commit-queue@webkit.org [Thu, 20 Mar 2014 15:09:33 +0000 (15:09 +0000)]
"input" event is not fired when changing a select element's value
https://bugs.webkit.org/show_bug.cgi?id=117526

Patch by Lorenzo Tilve <ltilve@igalia.com> on 2014-03-20
Reviewed by Antti Koivisto.

Source/WebCore:

Add a call to dispatch input event when listbox or menulist
values are modified.

According to the spec: "When the user agent is to send select update
notifications, queue a task to first fire a simple even that bubbles
named input at the select element, and then fire a simple event that
bubbles named change at the select element, using the user interaction
task source as the task source."

Tests: fast/forms/select/listbox-oninput-fired.html
       fast/forms/select/menulist-oninput-fired.html

* html/HTMLSelectElement.cpp:
(WebCore::HTMLSelectElement::listBoxOnChange):
(WebCore::HTMLSelectElement::dispatchChangeEventForMenuList):

LayoutTests:

Add tests to verify that input event is dispatched when listbox
or menulist values are modified.

* fast/forms/select/listbox-oninput-fired-expected.txt: Added.
* fast/forms/select/listbox-oninput-fired.html: Added.
* fast/forms/select/menulist-oninput-fired-expected.txt: Added.
* fast/forms/select/menulist-oninput-fired.html: Added.

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

5 years ago[CSS Regions] The height of a scrollable element flowed inside a scrollable region...
stavila@adobe.com [Thu, 20 Mar 2014 15:01:12 +0000 (15:01 +0000)]
[CSS Regions] The height of a scrollable element flowed inside a scrollable region is not computed correctly
https://bugs.webkit.org/show_bug.cgi?id=129487

Reviewed by Andrei Bucur.

Source/WebCore:

When propagating the layout overflow from the flowed element up to the flow thread itself,
the region's logical bottom padding and the element's logical bottom margin must be taken into consideration.
However, if the flowed element has overflow, the overflow will be painted over the region's padding
and the element's margin, in order to be compatible with the non-regions case.
More info can be found here: http://lists.w3.org/Archives/Public/www-style/2014Jan/0089.html

Tests: fast/regions/scrollable-region-content-size-horiz-bt.html
       fast/regions/scrollable-region-content-size-no-overflow-horiz-bt.html
       fast/regions/scrollable-region-content-size-no-overflow-vert-rl.html
       fast/regions/scrollable-region-content-size-no-overflow.html
       fast/regions/scrollable-region-content-size-relative.html
       fast/regions/scrollable-region-content-size-vert-rl.html
       fast/regions/scrollable-region-content-size-vertical-lr.html
       fast/regions/scrollable-region-content-size.html
       fast/regions/scrollable-region-scrollable-content.html

* rendering/RenderFlowThread.cpp:
(WebCore::RenderFlowThread::addRegionsOverflowFromChild):
* rendering/RenderRegion.cpp:
(WebCore::RenderRegion::rectFlowPortionForBox):

LayoutTests:

Added tests for different situations using scrollable regions and fixed a couple existing tests.

* fast/regions/clip-to-padding-box-margins.html: overflow-x and overflow-y cannot be hidden & visible.
* fast/regions/scrollable-last-region-expected.html: "hack" no longer needed now that the scroll content size is properly computed.
* fast/regions/scrollable-region-content-size-expected.html: Added.
* fast/regions/scrollable-region-content-size-horiz-bt-expected.html: Added.
* fast/regions/scrollable-region-content-size-horiz-bt.html: Added.
* fast/regions/scrollable-region-content-size-no-overflow-expected.html: Added.
* fast/regions/scrollable-region-content-size-no-overflow-horiz-bt-expected.html: Added.
* fast/regions/scrollable-region-content-size-no-overflow-horiz-bt.html: Added.
* fast/regions/scrollable-region-content-size-no-overflow-vert-rl-expected.html: Added.
* fast/regions/scrollable-region-content-size-no-overflow-vert-rl.html: Added.
* fast/regions/scrollable-region-content-size-no-overflow.html: Added.
* fast/regions/scrollable-region-content-size-relative-expected.html: Added.
* fast/regions/scrollable-region-content-size-relative.html: Added.
* fast/regions/scrollable-region-content-size-vert-rl-expected.html: Added.
* fast/regions/scrollable-region-content-size-vert-rl.html: Added.
* fast/regions/scrollable-region-content-size-vertical-lr-expected.html: Added.
* fast/regions/scrollable-region-content-size-vertical-lr.html: Added.
* fast/regions/scrollable-region-content-size.html: Added.
* fast/regions/scrollable-region-scrollable-content-expected.html: Added.
* fast/regions/scrollable-region-scrollable-content.html: Added.

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

5 years agoSubpixel rendering: Nested layers with subpixel accumulation paint to wrong position.
zalan@apple.com [Thu, 20 Mar 2014 14:20:22 +0000 (14:20 +0000)]
Subpixel rendering: Nested layers with subpixel accumulation paint to wrong position.
https://bugs.webkit.org/show_bug.cgi?id=130153

Reviewed by Simon Fraser.

Subpixels (fractional device pixels here) can accumulate through nested layers. Subpixels
need to be propagated through the layer tree so that painting coordinates match layout coordinates.

Subpixel accumulation through nesting (absolute positioning, 2x display):
non-compositing case:
(nested boxes)  (layout pos) (norm.paint pos) (translate accumulation, subpixel accumulation, final paint pos)
div -> top: 1.3px   1.3px     1.5px      1.5px 0.2px -> snapped 0.0px -> 1.5px
 div -> top: 1.3px   2.6px     2.5px      3.0px 0.4px -> snapped 0.5px -> 2.5px
  div -> top: 1.3px   3.9px     4.0px      4.5px 0.6px -> snapped 0.5px -> 4.0px
   div -> top: 1.3px   5.2px     5.0px      6.0px 0.8px -> snapped 1.0px -> 5.0px

compositing case:
(nested boxes)  (layout pos) (norm.paint pos) (device pixel offset + fractional offset, final pos)
div -> top: 1.3px   1.3px      1.5px      1.0px + 0.3px -> snapped -> 1.5px
 div -> top: 1.3px   2.6px      2.5px      2.5px + 0.1px -> snapped -> 2.5px
  div -> top: 1.3px   3.9px      4.0px      3.5px + 0.4px -> snapped -> 4.0px
   div -> top: 1.3px   5.2px      5.0px      5.0px + 0.2px -> snapped -> 5.0px

Source/WebCore:

Tests: compositing/hidpi-nested-compositing-layers-with-subpixel-accumulation.html
       fast/layers/hidpi-nested-layers-with-subpixel-accumulation.html

* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::paintLayerByApplyingTransform):
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::updateGraphicsLayerGeometry):
* rendering/RenderLayerBacking.h:
(WebCore::RenderLayerBacking::devicePixelFractionFromRenderer):

LayoutTests:

* compositing/hidpi-nested-compositing-layers-with-subpixel-accumulation-expected.html: Added.
* compositing/hidpi-nested-compositing-layers-with-subpixel-accumulation.html: Added.
* fast/layers/hidpi-nested-layers-with-subpixel-accumulation-expected.html: Added.
* fast/layers/hidpi-nested-layers-with-subpixel-accumulation.html: Added.

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

5 years ago[EFL][GTK] Get CMake to find Freetype2 properly
thiago.lacerda@openbossa.org [Thu, 20 Mar 2014 14:19:00 +0000 (14:19 +0000)]
[EFL][GTK] Get CMake to find Freetype2 properly
https://bugs.webkit.org/show_bug.cgi?id=130150

Reviewed by Csaba Osztrogonác.

Newer versions of CMake are not able to find Freetype2 correctly.
FindFreetype2.cmake checks for the version number in freetype.h header, since it seems that bug exists in
freetype2 repo, because a completely different version number is found in freetype2.pc.

.:

* Source/cmake/FindFreetype2.cmake: Added.
* Source/cmake/OptionsEfl.cmake:
* Source/cmake/OptionsGTK.cmake:

Source/WebCore:

* PlatformEfl.cmake:
* PlatformGTK.cmake:

Source/WebKit:

* PlatformEfl.cmake:

Source/WebKit2:

* PlatformEfl.cmake:

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

5 years ago[ARM64] Fix assembler build issues and add cacheFlush support for Linux
rgabor@webkit.org [Thu, 20 Mar 2014 14:03:43 +0000 (14:03 +0000)]
[ARM64] Fix assembler build issues and add cacheFlush support for Linux
https://bugs.webkit.org/show_bug.cgi?id=130502

Reviewed by Michael Saboff.

Add limits.h for INT_MIN in ARM64Assembler(). Delete shouldBlindForSpecificArch(uintptr_t)
because on ARM64 uint64_t and uintptr_t is the same with GCC and Clang as well.
Add cacheFlush support for Linux.

* assembler/ARM64Assembler.h:
(JSC::ARM64Assembler::linuxPageFlush):
(JSC::ARM64Assembler::cacheFlush):
* assembler/MacroAssemblerARM64.h:
(JSC::MacroAssemblerARM64::shouldBlindForSpecificArch):

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

5 years ago[EFL][WK2] test_ewk2_application_cache_manager is flaky
ryuan.choi@samsung.com [Thu, 20 Mar 2014 11:04:22 +0000 (11:04 +0000)]
[EFL][WK2] test_ewk2_application_cache_manager is flaky
https://bugs.webkit.org/show_bug.cgi?id=130501

Reviewed by Gyuyoung Kim.

* UIProcess/API/efl/tests/test_ewk2_application_cache_manager.cpp:
(timerCallback): Return ECORE_CALLBACK_CANCEL to clear the timer.

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

5 years agoUnreviewed EFL gardening
k.czech@samsung.com [Thu, 20 Mar 2014 10:55:45 +0000 (10:55 +0000)]
Unreviewed EFL gardening

Update expectation of table-detection.html after r165535.

* platform/efl-wk2/accessibility/table-detection-expected.txt:

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

5 years agoVersioning.
lforschler@apple.com [Thu, 20 Mar 2014 10:19:51 +0000 (10:19 +0000)]
Versioning.

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

5 years agoRefactor checking log channel state in MediaPlayerPrivateGStreamerBase.
pmolnar.u-szeged@partner.samsung.com [Thu, 20 Mar 2014 10:07:01 +0000 (10:07 +0000)]
Refactor checking log channel state in MediaPlayerPrivateGStreamerBase.
https://bugs.webkit.org/show_bug.cgi?id=130241

Reviewed by Philippe Normand.

The channel was passed around only to check its state. Cleaned this up
by adding a method to check whether a log channel is enabled.

* platform/Logging.cpp:
(WebCore::isLogChannelEnabled):
* platform/Logging.h:
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
(WebCore::MediaPlayerPrivateGStreamerBase::createVideoSink):

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

5 years agoDispatch input event for Range element keyboard event
commit-queue@webkit.org [Thu, 20 Mar 2014 08:56:36 +0000 (08:56 +0000)]
Dispatch input event for Range element keyboard event
https://bugs.webkit.org/show_bug.cgi?id=129929

Patch by Lorenzo Tilve <ltilve@igalia.com> on 2014-03-20
Reviewed by Kent Tamura.

For any value update, dispatch both input and change event.
Also removes extra dispatch change event, as event is dispatched
from TextFieldInputType:setValue.

Merged from Blink (patch by Habib Virji):
https://src.chromium.org/viewvc/blink?revision=168558&view=revision

Source/WebCore:

Test: fast/forms/range/range-keyboard-oninput-event.html

* html/RangeInputType.cpp:
(WebCore::RangeInputType::handleKeydownEvent):

LayoutTests:

* fast/forms/range/range-keyboard-oninput-event-expected.txt: Added.
* fast/forms/range/range-keyboard-oninput-event.html: Added.

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

5 years ago Rollout r165944. Build break.
lforschler@apple.com [Thu, 20 Mar 2014 08:28:32 +0000 (08:28 +0000)]
Rollout r165944.  Build break.

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

5 years ago[GLIB] Add GMainLoopSource class to wrap idle and timeout sources
carlosgc@webkit.org [Thu, 20 Mar 2014 07:56:38 +0000 (07:56 +0000)]
[GLIB] Add GMainLoopSource class to wrap idle and timeout sources
https://bugs.webkit.org/show_bug.cgi?id=130027

Reviewed by Martin Robinson.

GLib main loop sources like idle and timeouts are sometimes
unconvenient to use and it's very common to forget canceling the
source when the object is destroyed or reset the source ID in the
callback when called. GMainLoopSource is a wrapper class to make it
easier to handle sources and also to avoid those typical mistakes.
It forces to create sources with a name and the user doesn't have
to deal with the source ID anymore. The source is cancelled when
the object is deleted or when a new source is scheduled. It uses
std::function for callbacks so that we no longer need to use the
"proxy" static callbacks either. We can use std::bind to use a
function pointer or a member or even lambda functions. It also handles
repeating sources automatically depending on whether the given
function returns a bool or not.

* GNUmakefile.list.am:
* wtf/PlatformEfl.cmake:
* wtf/PlatformGTK.cmake:
* wtf/RunLoop.h:
* wtf/gobject/GMainLoopSource.cpp: Added.
(WTF::GMainLoopSource::createAndDeleteOnDestroy):
(WTF::GMainLoopSource::GMainLoopSource):
(WTF::GMainLoopSource::~GMainLoopSource):
(WTF::GMainLoopSource::cancel):
(WTF::GMainLoopSource::reset):
(WTF::GMainLoopSource::scheduleIdleSource):
(WTF::GMainLoopSource::schedule):
(WTF::GMainLoopSource::scheduleTimeoutSource):
(WTF::GMainLoopSource::scheduleAfterDelay):
(WTF::GMainLoopSource::voidCallback):
(WTF::GMainLoopSource::boolCallback):
(WTF::GMainLoopSource::socketCallback):
(WTF::GMainLoopSource::destroy):
(WTF::GMainLoopSource::voidSourceCallback):
(WTF::GMainLoopSource::boolSourceCallback):
(WTF::GMainLoopSource::socketSourceCallback):
* wtf/gobject/GMainLoopSource.h: Added.
(WTF::GMainLoopSource::isScheduled):
* wtf/gtk/MainThreadGtk.cpp:
(WTF::scheduleDispatchFunctionsOnMainThread):
* wtf/gtk/RunLoopGtk.cpp:
(WTF::RunLoop::wakeUp):
(WTF::RunLoop::TimerBase::TimerBase):
(WTF::RunLoop::TimerBase::start):
(WTF::RunLoop::TimerBase::stop):
(WTF::RunLoop::TimerBase::isActive):

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

5 years ago[CSSRegions] Content flowed in 0px height region not displayed
mihnea@adobe.com [Thu, 20 Mar 2014 07:14:15 +0000 (07:14 +0000)]
[CSSRegions] Content flowed in 0px height region not displayed
https://bugs.webkit.org/show_bug.cgi?id=98265

After the past work on overflow, this looks fixed. Add a test to make sure
we are covered for future regressions.

Reviewed by Andrei Bucur.

* fast/regions/overflow-content-zero-height-region-expected.html: Added.
* fast/regions/overflow-content-zero-height-region.html: Added.

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

5 years agoRefine BatteryStatus module
jinwoo7.song@samsung.com [Thu, 20 Mar 2014 07:11:32 +0000 (07:11 +0000)]
Refine BatteryStatus module
https://bugs.webkit.org/show_bug.cgi?id=130495

Reviewed by Andreas Kling.

Small refinements:
 - Return PassRef instead of PassRefPtr in create method
 - Switched to nullptr instead of 0 where appropriate.
 - Removed unused function and header file.
 - Removed unnecessary empty lines.

* Modules/battery/BatteryController.h:
* Modules/battery/BatteryManager.cpp:
(WebCore::BatteryManager::create): Make return passRef.
* Modules/battery/BatteryManager.h:
(WebCore::BatteryManager::batteryControllerDestroyed): Use nullptr.
* Modules/battery/BatteryStatus.cpp:
(WebCore::BatteryStatus::create): Make return passRef.
* Modules/battery/BatteryStatus.h:
* Modules/battery/NavigatorBattery.cpp:
(WebCore::NavigatorBattery::webkitBattery): Remove batteryManager().
* Modules/battery/NavigatorBattery.h:

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

5 years agohttps://bugs.webkit.org/show_bug.cgi?id=130494
barraclough@apple.com [Thu, 20 Mar 2014 06:21:49 +0000 (06:21 +0000)]
https://bugs.webkit.org/show_bug.cgi?id=130494
EmptyUnique strings are Identifiers/Atomic

Reviewed by Geoff Garen.

EmptyUnique strings should set the Identifier/Atomic flag.

Source/JavaScriptCore:

This fixes an unreproducible bug we believe exists in Identifier handling.
Expected behaviour is that while Identifiers may reference EmptyUniques
(StringImpls allocated as UIDs for PrivateNames), these are not created
through the main Identifier constructor, the Identifier flag is not set
on PrivateNames, and we should never lookup EmptyUnique strings in the
IdentifierTable.

Unfortunately that was happening. Some tables used to implement property
access in the JIT hold StringImpl*s, and turn these back into Identifiers
using the identfiier constructor. Since the code generator will now plant
by-id (cachable) accesses to PrivateNames we can end up passing an
EmptyUnique to Identifier::add, potentially leading to PrivateNames being
uniqued together (though hard to prove, since the hash codes are random).

* runtime/PropertyName.h:
(JSC::PropertyName::PropertyName):
(JSC::PropertyName::uid):
(JSC::PropertyName::publicName):
(JSC::PropertyName::asIndex):
    - PropertyName assumed that PrivateNames are not Identifiers - instead check isEmptyUnique().
* runtime/Structure.cpp:
(JSC::Structure::getPropertyNamesFromStructure):
    - Structure assumed that PrivateNames are not Identifiers - instead check isEmptyUnique().

Source/WTF:

* wtf/text/AtomicString.h:
(WTF::AtomicString::add):
    - Previously we assumed the only StringImpl that was validly allowed to claim to be
      Atomic but not be in a table was the canonical empty string. Now that EmptyUniques
      are also marked Atomic, all empty strings may pass this condition.
* wtf/text/StringImpl.cpp:
(WTF::StringImpl::~StringImpl):
    - EmptyUnique strings are not in the Atomic/Identfiier tabels, so don't need removing.
* wtf/text/StringImpl.h:
(WTF::StringImpl::StringImpl):
    - Change EmptyUnique constructor to call hashAndFlagsForEmptyUnique.
* wtf/text/StringStatics.cpp:
(WTF::StringImpl::hashAndFlagsForEmptyUnique):
    - Allocate a sequential hash code (this should be just as good for distribution & better
      for debugging than the random value) and set flags, now including Atomic & Identifier.

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

5 years ago[iOS] Get code to compile on older iOS versions
psolanki@apple.com [Thu, 20 Mar 2014 05:10:51 +0000 (05:10 +0000)]
[iOS] Get code to compile on older iOS versions
https://bugs.webkit.org/show_bug.cgi?id=130142
<rdar://problem/16302908>

Reviewed by Darin Adler.

Source/WebCore:

* WebCore.exp.in:
* platform/ios/WebVideoFullscreenControllerAVKit.mm:
(-[WebVideoFullscreenController WebCore::]):
(-[WebVideoFullscreenController enterFullscreen:]):
(-[WebVideoFullscreenController exitFullscreen]):
* platform/ios/WebVideoFullscreenInterfaceAVKit.h:
* platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
* platform/mac/HTMLConverter.mm:
(_dateForString):
* platform/network/cf/CookieJarCFNet.cpp:
(WebCore::copyCookiesForURLWithFirstPartyURL):
* platform/text/ios/LocalizedDateCache.mm:
(WebCore::LocalizedDateCache::calculateMaximumWidth):
* platform/text/mac/LocaleMac.mm:
(WebCore::LocaleMac::LocaleMac):

Source/WebKit/mac:

* History/WebHistory.mm:
(getDayBoundaries):
* Plugins/WebPluginController.h:
* Plugins/WebPluginController.mm:
(+[WebPluginController plugInViewWithArguments:fromPluginPackage:]):
* WebCoreSupport/WebFrameLoaderClient.mm:
(pluginView):
* WebView/WebPreferences.mm:
(-[WebPreferences _setAllowCompositingLayerVisualDegradation:]):
* WebView/WebPreferencesPrivate.h:

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

5 years agoFix "WEBKIT_WEBGL_compressed_texture_pvrtc" extension support
commit-queue@webkit.org [Thu, 20 Mar 2014 03:12:51 +0000 (03:12 +0000)]
Fix "WEBKIT_WEBGL_compressed_texture_pvrtc" extension support
https://bugs.webkit.org/show_bug.cgi?id=130292

Patch by Byungseon Shin <sun.shin@lge.com> on 2014-03-19
Reviewed by Dean Jackson.

WebGLRenderingContext::getExtension was not returning WEBGL_compressed_texture_pvrtc extension.

* html/canvas/WebGLRenderingContext.cpp:
(WebCore::WebGLRenderingContext::getExtension):

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

5 years agoMerge Misc. WebVTT Updates from Blink.
bfulgham@apple.com [Thu, 20 Mar 2014 02:53:59 +0000 (02:53 +0000)]
Merge Misc. WebVTT Updates from Blink.
https://bugs.webkit.org/show_bug.cgi?id=130491

Reviewed by Eric Carlson.

Source/WebCore:

Test: media/track/track-webvtt-tc030-interspersed-non-cue.html

Merged from Blink (patch by vcarbune@chromium.org):
https://chromium.googlesource.com/chromium/blink/+/fb62b2b54944bd19026192c049a1db250756fc12
http://crbug.com/40323003
https://chromium.googlesource.com/chromium/blink/+/29176fb0b394a97e85f4dabc07e18329f3ceae41
http://crbug.com/54463002
https://chromium.googlesource.com/chromium/blink/+/29476f839a08cb17c5a3fc713f7e454e7cea9c60
http://crbug.com/55853002
https://chromium.googlesource.com/chromium/blink/+/ba2378ef873e786cf2937034e012669cdd37dfe8
http://crbug.com/65343003
https://chromium.googlesource.com/chromium/blink/+/1915b9aa1bba45aebf28531b40ae627ecf9a3d59
http://crbug.com/62833005
https://chromium.googlesource.com/chromium/blink/+/ea46dbd0f1f29779a1cd4f59b19361b803f09a9b
http://crbug.com/64273013
https://chromium.googlesource.com/chromium/blink/+/9eb4bb6b627357bb94d66386a4123ec004cccfc4
http://crbug.com/101513002
https://chromium.googlesource.com/chromium/blink/+/192a843b32eafb77bf92c50ec50d334ba935028a
http://crbug.com/102403002
https://chromium.googlesource.com/chromium/blink/+/15f9efcc952fcf73184e28fb9db79633c1fa6653
http://crbug.com/104443002
https://chromium.googlesource.com/chromium/blink/+/74fd66b451a464683f7cb748855b1740a54b2c16
http://crbug.com/75243004

* html/track/TextTrackRegion.cpp:
(WebCore::TextTrackRegion::parseSettingValue):
* html/track/VTTCue.cpp:
(WebCore::VTTCue::markFutureAndPastNodes):
(WebCore::VTTCue::setCueSettings):
* html/track/WebVTTParser.cpp:
(WebCore::scanDigits):
(WebCore::WebVTTParser::collectDigitsToInt):
(WebCore::WebVTTParser::parseFloatPercentageValue):
(WebCore::WebVTTParser::parseBytes):
(WebCore::WebVTTParser::collectMetadataHeader):
(WebCore::WebVTTParser::collectTimingsAndSettings):
(WebCore::WebVTTParser::createDocumentFragmentFromCueText):
(WebCore::WebVTTParser::createNewCue):
(WebCore::WebVTTParser::createNewRegion):
(WebCore::WebVTTParser::collectTimeStamp):
(WebCore::tokenToNodeType):
(WebCore::WebVTTParser::constructTreeFromToken):
* html/track/WebVTTParser.h:
* html/track/WebVTTToken.h:
(WebCore::WebVTTToken::name):
(WebCore::WebVTTToken::characters):
(WebCore::WebVTTToken::appendToCharacter):
(WebCore::WebVTTToken::addNewClass):
(WebCore::WebVTTToken::classes):
(WebCore::WebVTTToken::addNewAnnotation):
(WebCore::WebVTTToken::annotation):
* html/track/WebVTTTokenizer.cpp:
(WebCore::equalLiteral):
(WebCore::WebVTTTokenizer::WebVTTTokenizer):
(WebCore::WebVTTTokenizer::nextToken):
* html/track/WebVTTTokenizer.h:

LayoutTests:

Merged from Blink (patch by vcarbune@chromium.org):
https://chromium.googlesource.com/chromium/blink/+/fb62b2b54944bd19026192c049a1db250756fc12
http://crbug.com/40323003
https://chromium.googlesource.com/chromium/blink/+/29176fb0b394a97e85f4dabc07e18329f3ceae41
http://crbug.com/54463002
https://chromium.googlesource.com/chromium/blink/+/29476f839a08cb17c5a3fc713f7e454e7cea9c60
http://crbug.com/55853002
https://chromium.googlesource.com/chromium/blink/+/ba2378ef873e786cf2937034e012669cdd37dfe8
http://crbug.com/65343003
https://chromium.googlesource.com/chromium/blink/+/1915b9aa1bba45aebf28531b40ae627ecf9a3d59
http://crbug.com/62833005
https://chromium.googlesource.com/chromium/blink/+/ea46dbd0f1f29779a1cd4f59b19361b803f09a9b
http://crbug.com/64273013
https://chromium.googlesource.com/chromium/blink/+/9eb4bb6b627357bb94d66386a4123ec004cccfc4
http://crbug.com/101513002
https://chromium.googlesource.com/chromium/blink/+/192a843b32eafb77bf92c50ec50d334ba935028a
http://crbug.com/102403002
https://chromium.googlesource.com/chromium/blink/+/15f9efcc952fcf73184e28fb9db79633c1fa6653
http://crbug.com/104443002
https://chromium.googlesource.com/chromium/blink/+/74fd66b451a464683f7cb748855b1740a54b2c16
http://crbug.com/75243004

* media/track/captions-webvtt/tc030-interspersed-non-cue.vtt: Added.
* media/track/track-webvtt-tc027-empty-cue-expected.txt: Mark one test as expected to fail, since
the test (incorrectly) expects to fail on empty cues. The test will be updated in a future patch.
* media/track/track-webvtt-tc030-interspersed-non-cue-expected.txt: Added.
* media/track/track-webvtt-tc030-interspersed-non-cue.html: Added.

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

5 years agoUnreviewed, revert the DFGCommon.h change in r165938. It was not intentional.
fpizlo@apple.com [Thu, 20 Mar 2014 02:00:40 +0000 (02:00 +0000)]
Unreviewed, revert the DFGCommon.h change in r165938. It was not intentional.

* dfg/DFGCommon.h:

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

5 years agoGC timer should intelligently choose between EdenCollections and FullCollections
mhahnenberg@apple.com [Thu, 20 Mar 2014 01:56:19 +0000 (01:56 +0000)]
GC timer should intelligently choose between EdenCollections and FullCollections
https://bugs.webkit.org/show_bug.cgi?id=128261

Reviewed by Geoffrey Garen.

Source/JavaScriptCore:

Most of the GCs while browsing the web are due to the GC timer. Currently the GC timer
always does FullCollections. To reduce the impact of the GC timer on the system this patch
changes Heap so that it has two timers, one for each type of collection. The FullCollection
timer is notified at the end of EdenCollections how much the Heap has grown since the last
FullCollection and when somebody notifies the Heap of abandoned memory (which usually wouldn't
be detected by an EdenCollection).

* CMakeLists.txt:
* GNUmakefile.list.am:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters:
* JavaScriptCore.xcodeproj/project.pbxproj:
* heap/EdenGCActivityCallback.cpp: Added.
(JSC::EdenGCActivityCallback::EdenGCActivityCallback):
(JSC::EdenGCActivityCallback::doCollection):
(JSC::EdenGCActivityCallback::lastGCLength):
(JSC::EdenGCActivityCallback::deathRate):
(JSC::EdenGCActivityCallback::gcTimeSlice):
* heap/EdenGCActivityCallback.h: Added.
(JSC::GCActivityCallback::createEdenTimer):
* heap/FullGCActivityCallback.cpp: Added.
(JSC::FullGCActivityCallback::FullGCActivityCallback):
(JSC::FullGCActivityCallback::doCollection):
(JSC::FullGCActivityCallback::lastGCLength):
(JSC::FullGCActivityCallback::deathRate):
(JSC::FullGCActivityCallback::gcTimeSlice):
* heap/FullGCActivityCallback.h: Added.
(JSC::GCActivityCallback::createFullTimer):
* heap/GCActivityCallback.cpp:
(JSC::GCActivityCallback::GCActivityCallback):
(JSC::GCActivityCallback::doWork):
(JSC::GCActivityCallback::scheduleTimer):
(JSC::GCActivityCallback::cancelTimer):
(JSC::GCActivityCallback::didAllocate):
(JSC::GCActivityCallback::willCollect):
(JSC::GCActivityCallback::cancel):
* heap/GCActivityCallback.h:
* heap/Heap.cpp:
(JSC::Heap::Heap):
(JSC::Heap::reportAbandonedObjectGraph):
(JSC::Heap::didAbandon):
(JSC::Heap::collectAllGarbage):
(JSC::Heap::collect):
(JSC::Heap::willStartCollection):
(JSC::Heap::updateAllocationLimits):
(JSC::Heap::didFinishCollection):
(JSC::Heap::setFullActivityCallback):
(JSC::Heap::setEdenActivityCallback):
(JSC::Heap::fullActivityCallback):
(JSC::Heap::edenActivityCallback):
(JSC::Heap::setGarbageCollectionTimerEnabled):
(JSC::Heap::didAllocate):
(JSC::Heap::shouldDoFullCollection):
* heap/Heap.h:
(JSC::Heap::lastFullGCLength):
(JSC::Heap::lastEdenGCLength):
(JSC::Heap::increaseLastFullGCLength):
(JSC::Heap::sizeBeforeLastEdenCollection):
(JSC::Heap::sizeAfterLastEdenCollection):
(JSC::Heap::sizeBeforeLastFullCollection):
(JSC::Heap::sizeAfterLastFullCollection):
* heap/HeapOperation.h:
* heap/HeapStatistics.cpp:
(JSC::HeapStatistics::showObjectStatistics):
* heap/HeapTimer.cpp:
(JSC::HeapTimer::timerDidFire):
* jsc.cpp:
(functionFullGC):
(functionEdenGC):
* runtime/Options.h:

Source/WebCore:

No new tests.

Updated WebSafeGCActivityCallbacks for both Eden and Full timers.

* bindings/js/JSDOMWindowBase.cpp:
(WebCore::JSDOMWindowBase::commonVM):
* platform/ios/WebSafeGCActivityCallbackIOS.h:

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

5 years agoGenerated hidpi- images (actual) on ML WK2 Debug are blurry/color shifted.
zalan@apple.com [Thu, 20 Mar 2014 01:54:21 +0000 (01:54 +0000)]
Generated hidpi- images (actual) on ML WK2 Debug are blurry/color shifted.

Unreviewed TestExpectations update on ML WK2 debug.

* platform/mac-wk2/TestExpectations:

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

5 years agoFix JavaScriptCore ChangeLog
fpizlo@apple.com [Thu, 20 Mar 2014 01:49:03 +0000 (01:49 +0000)]
Fix JavaScriptCore ChangeLog

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

5 years agomedia/video-remote-control-playpause.html frequently fails on the bots
eric.carlson@apple.com [Thu, 20 Mar 2014 01:05:37 +0000 (01:05 +0000)]
media/video-remote-control-playpause.html frequently fails on the bots
https://bugs.webkit.org/show_bug.cgi?id=130490

Unreviewed TestExpectations update.

* platform/mac/TestExpectations: Mark test as flakey while I try to reproduce it.

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

5 years agoAddress late review comment and style nit after r165934.
timothy_horton@apple.com [Thu, 20 Mar 2014 00:50:26 +0000 (00:50 +0000)]
Address late review comment and style nit after r165934.

* UIProcess/ios/ViewGestureControllerIOS.mm:
(WebKit::ViewGestureController::beginSwipeGesture):

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

5 years agoFix the iOS build after r165917.
aestes@apple.com [Thu, 20 Mar 2014 00:37:46 +0000 (00:37 +0000)]
Fix the iOS build after r165917.

* platform/ios/WebCoreSystemInterfaceIOS.mm:

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

5 years ago[iOS][WebKit2] Back-forward swipe doesn't always complete with fingers down
timothy_horton@apple.com [Thu, 20 Mar 2014 00:32:32 +0000 (00:32 +0000)]
[iOS][WebKit2] Back-forward swipe doesn't always complete with fingers down
https://bugs.webkit.org/show_bug.cgi?id=130489
<rdar://problem/16027007>

Reviewed by Simon Fraser.

* UIProcess/ios/ViewGestureControllerIOS.mm:
(WebKit::ViewGestureController::beginSwipeGesture):
In order to have fingers-down swipe completion work correctly, we need
to give UIKit an empty interactive update block.

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

5 years agoUnreviewed, rolling out r165926.
commit-queue@webkit.org [Thu, 20 Mar 2014 00:18:26 +0000 (00:18 +0000)]
Unreviewed, rolling out r165926.
https://bugs.webkit.org/show_bug.cgi?id=130488

broke the iOS build (Requested by estes on #webkit).

Reverted changeset:

Source/JavaScriptCore:

"GC timer should intelligently choose between EdenCollections
and FullCollections"
https://bugs.webkit.org/show_bug.cgi?id=128261
http://trac.webkit.org/changeset/165926

Source/WebCore:

"GC timer should intelligently choose between EdenCollections
and FullCollections"
https://bugs.webkit.org/show_bug.cgi?id=128261
http://trac.webkit.org/changeset/165926

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

5 years agoUnreviewed, rolling out r165929.
commit-queue@webkit.org [Thu, 20 Mar 2014 00:13:25 +0000 (00:13 +0000)]
Unreviewed, rolling out r165929.
https://bugs.webkit.org/show_bug.cgi?id=130487

in order to roll out r165926 (Requested by estes on #webkit).

Reverted changeset:

http://trac.webkit.org/changeset/165929

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

5 years agoGet rid of two IPC::Connection functions by folding them into lambdas
andersca@apple.com [Wed, 19 Mar 2014 23:45:46 +0000 (23:45 +0000)]
Get rid of two IPC::Connection functions by folding them into lambdas
https://bugs.webkit.org/show_bug.cgi?id=130482

Reviewed by Tim Horton.

* Platform/IPC/Connection.cpp:
(IPC::Connection::addWorkQueueMessageReceiver):
(IPC::Connection::removeWorkQueueMessageReceiver):
* Platform/IPC/Connection.h:

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

5 years agoExpose text and page zoom in WK2 SPI, and hook them up in MiniBrowser
simon.fraser@apple.com [Wed, 19 Mar 2014 23:44:39 +0000 (23:44 +0000)]
Expose text and page zoom in WK2 SPI, and hook them up in MiniBrowser
https://bugs.webkit.org/show_bug.cgi?id=130476

Source/WebKit2:

Reviewed by Anders Carlsson.

Expose page and text zoom as SPI.

* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _supportsTextZoom]):
(-[WKWebView _textZoomFactor]):
(-[WKWebView _setTextZoomFactor:]):
(-[WKWebView _pageZoomFactor]):
(-[WKWebView _setPageZoomFactor:]):
* UIProcess/API/Cocoa/WKWebViewPrivate.h:

Tools:

Reviewed by Anders Carlsson.

Hook up page/text zoom in MiniBrowser, make reload work, remove some logging.

* MiniBrowser/mac/WK1BrowserWindowController.m:
(-[WK1BrowserWindowController webView:decidePolicyForNavigationAction:request:frame:decisionListener:]):
Remove log.
* MiniBrowser/mac/WK2BrowserWindowController.m:
(-[WK2BrowserWindowController awakeFromNib]):
(-[WK2BrowserWindowController validateMenuItem:]):
(-[WK2BrowserWindowController reload:]):
Hook up reload.
(-[WK2BrowserWindowController toggleZoomMode:]):
(-[WK2BrowserWindowController resetZoom:]):
(-[WK2BrowserWindowController canResetZoom]):
(-[WK2BrowserWindowController currentZoomFactor]):
(-[WK2BrowserWindowController setCurrentZoomFactor:]):
(-[WK2BrowserWindowController canZoomIn]):
(-[WK2BrowserWindowController canZoomOut]):

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

5 years agoBuild fix for iOS after r165926
mhahnenberg@apple.com [Wed, 19 Mar 2014 23:27:50 +0000 (23:27 +0000)]
Build fix for iOS after r165926

* bindings/js/JSDOMWindowBase.cpp:
(WebCore::JSDOMWindowBase::commonVM):
* platform/ios/WebSafeGCActivityCallbackIOS.h:

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

5 years agoAllow media engine to update HTMLMediaElement state when playing to external device
eric.carlson@apple.com [Wed, 19 Mar 2014 22:42:40 +0000 (22:42 +0000)]
Allow media engine to update HTMLMediaElement state when playing to external device
https://bugs.webkit.org/show_bug.cgi?id=130480

Reviewed by Jer Noble.

* html/HTMLMediaElement.h: Add mediaPlayerHandlePlaybackCommand.

* platform/graphics/MediaPlayer.cpp:
(WebCore::MediaPlayer::handlePlaybackCommand): New.
* platform/graphics/MediaPlayer.h:
(WebCore::MediaPlayerClient::mediaPlayerHandlePlaybackCommand):

* platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
(WebCore::MediaPlayerPrivateAVFoundation::rateChanged): Send Play and Pause commands when
    playing to an external device.

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

5 years agoImplement isPointInPath and isPointInStroke with Path2D argument
krit@webkit.org [Wed, 19 Mar 2014 22:39:41 +0000 (22:39 +0000)]
Implement isPointInPath and isPointInStroke with Path2D argument
https://bugs.webkit.org/show_bug.cgi?id=130473

Reviewed by Dean Jackson.

Source/WebCore:

Implement isPointInPath and isPointInStroke for 2D Canvas contxts
with Path2D argument.

Tests: fast/canvas/canvas-path-isPointInPath.html
       fast/canvas/canvas-path-isPointInStroke.html

* html/canvas/CanvasRenderingContext2D.cpp:
(WebCore::CanvasRenderingContext2D::isPointInPath):
(WebCore::CanvasRenderingContext2D::isPointInStroke):
(WebCore::CanvasRenderingContext2D::isPointInPathInternal):
(WebCore::CanvasRenderingContext2D::isPointInStrokeInternal):
* html/canvas/CanvasRenderingContext2D.h:
* html/canvas/CanvasRenderingContext2D.idl:

LayoutTests:

Test isPointInPath and isPointInStroke with Path2D argument.

* fast/canvas/canvas-path-isPointInPath-expected.txt: Added.
* fast/canvas/canvas-path-isPointInPath.html: Added.
* fast/canvas/canvas-path-isPointInStroke-expected.txt: Added.
* fast/canvas/canvas-path-isPointInStroke.html: Added.
* fast/canvas/script-tests/canvas-path-isPointInPath.js: Added.
* fast/canvas/script-tests/canvas-path-isPointInStroke.js: Added.

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

5 years agoGC timer should intelligently choose between EdenCollections and FullCollections
mhahnenberg@apple.com [Wed, 19 Mar 2014 22:21:51 +0000 (22:21 +0000)]
GC timer should intelligently choose between EdenCollections and FullCollections
https://bugs.webkit.org/show_bug.cgi?id=128261

Reviewed by Geoffrey Garen.

Source/JavaScriptCore:

Most of the GCs while browsing the web are due to the GC timer. Currently the GC timer
always does FullCollections. To reduce the impact of the GC timer on the system this patch
changes Heap so that it has two timers, one for each type of collection. The FullCollection
timer is notified at the end of EdenCollections how much the Heap has grown since the last
FullCollection and when somebody notifies the Heap of abandoned memory (which wouldn't be
detected by an EdenCollection).

* heap/GCActivityCallback.cpp:
(JSC::GCActivityCallback::GCActivityCallback):
(JSC::GCActivityCallback::doWork):
(JSC::FullGCActivityCallback::FullGCActivityCallback):
(JSC::FullGCActivityCallback::doCollection):
(JSC::EdenGCActivityCallback::EdenGCActivityCallback):
(JSC::EdenGCActivityCallback::doCollection):
(JSC::GCActivityCallback::scheduleTimer):
(JSC::GCActivityCallback::cancelTimer):
(JSC::GCActivityCallback::didAllocate):
(JSC::GCActivityCallback::willCollect):
(JSC::GCActivityCallback::cancel):
* heap/GCActivityCallback.h:
(JSC::GCActivityCallback::GCActivityCallback):
(JSC::GCActivityCallback::createFullTimer):
(JSC::GCActivityCallback::createEdenTimer):
* heap/Heap.cpp:
(JSC::Heap::Heap):
(JSC::Heap::didAbandon):
(JSC::Heap::willStartCollection):
(JSC::Heap::updateAllocationLimits):
(JSC::Heap::setFullActivityCallback):
(JSC::Heap::setEdenActivityCallback):
(JSC::Heap::fullActivityCallback):
(JSC::Heap::edenActivityCallback):
(JSC::Heap::setGarbageCollectionTimerEnabled):
(JSC::Heap::didAllocate):
* heap/Heap.h:
* heap/HeapTimer.cpp:
(JSC::HeapTimer::timerDidFire):

Source/WebCore:

No new tests.

* platform/ios/WebSafeGCActivityCallbackIOS.h: Update WebSafeGCActivityCallback
appropriately for the introduction of another type of GCActivityCallback.

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

5 years ago[iOS][WK2] Reduce the extended background's opacity when WKContentView is smaller...
benjamin@webkit.org [Wed, 19 Mar 2014 21:57:01 +0000 (21:57 +0000)]
[iOS][WK2] Reduce the extended background's opacity when WKContentView is smaller than its WKWebView
https://bugs.webkit.org/show_bug.cgi?id=130436

Patch by Benjamin Poulain <bpoulain@apple.com> on 2014-03-19
Reviewed by Beth Dakin.

* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _updateScrollViewBackground]):

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

5 years ago[iOS][WebKit2] <rdar://problem/16330387> Do not use the keyboard rect for computing...
benjamin@webkit.org [Wed, 19 Mar 2014 21:55:11 +0000 (21:55 +0000)]
[iOS][WebKit2] <rdar://problem/16330387> Do not use the keyboard rect for computing the general unobscuredRect, only use it for centering
https://bugs.webkit.org/show_bug.cgi?id=130382

Patch by Benjamin Poulain <bpoulain@apple.com> on 2014-03-19
Reviewed by Simon Fraser.

Always accumulating the keyboard rect out of the exposedRect caused some issues (see <rdar://problem/16330387>).
This patch split the rect in two: unobscured rect for WebCore, and unobscuredContentRectIncludingKeyboard for centering
UI Elements in view.

* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _zoomToRect:WebCore::atScale:origin:WebCore::]):
(-[WKWebView _scrollToRect:WebCore::origin:WebCore::minimumScrollDistance:]):
(-[WKWebView _zoomToRect:WebCore::withOrigin:WebCore::fitEntireRect:minimumScale:maximumScale:minimumScrollDistance:]):
(-[WKWebView _contentRectForUserInteraction]):
(-[WKWebView _updateVisibleContentRects]):

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

5 years agoAttempt to fix the Production build.
timothy@apple.com [Wed, 19 Mar 2014 21:50:16 +0000 (21:50 +0000)]
Attempt to fix the Production build.

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

5 years agoGet rid of WKProcessClass
andersca@apple.com [Wed, 19 Mar 2014 21:48:49 +0000 (21:48 +0000)]
Get rid of WKProcessClass
https://bugs.webkit.org/show_bug.cgi?id=130478

Reviewed by Dan Bernstein.

* UIProcess/API/Cocoa/WKProcessClass.h: Removed.
* UIProcess/API/Cocoa/WKProcessClass.mm: Removed.
* UIProcess/API/Cocoa/WKProcessClassConfiguration.h: Removed.
* UIProcess/API/Cocoa/WKProcessClassConfiguration.mm: Removed.
* UIProcess/API/Cocoa/WKProcessClassConfigurationPrivate.h: Removed.
* UIProcess/API/Cocoa/WKProcessClassPrivate.h: Removed.
* UIProcess/API/Cocoa/WKWebViewConfigurationToBeRemoved.mm: Removed.
* WebKit2.xcodeproj/project.pbxproj:

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

5 years agoCrash with long selector list
antti@apple.com [Wed, 19 Mar 2014 21:43:52 +0000 (21:43 +0000)]
Crash with long selector list
https://bugs.webkit.org/show_bug.cgi?id=123006

Reviewed by Andreas Kling.

Source/WebCore:

Test: fast/css/long-selector-list-crash.html

* css/CSSSelectorList.cpp:
(WebCore::CSSSelectorList::CSSSelectorList):
(WebCore::CSSSelectorList::adoptSelectorVector):
(WebCore::CSSSelectorList::operator=):
* css/StyleRule.cpp:
(WebCore::StyleRule::create):

    Add a bunch of asserts.

(WebCore::StyleRule::splitIntoMultipleRulesWithMaximumSelectorComponentCount):

    This could produce a zero-length selector list.

LayoutTests:

* fast/css/long-selector-list-crash-expected.txt: Added.
* fast/css/long-selector-list-crash.html: Added.

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

5 years agoRebaseline bindings tests.
akling@apple.com [Wed, 19 Mar 2014 21:42:54 +0000 (21:42 +0000)]
Rebaseline bindings tests.

* bindings/scripts/test/JS/*:

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

5 years ago[iOS][MediaControls] Reverse-pinching using the built-in controls should enter full...
jer.noble@apple.com [Wed, 19 Mar 2014 21:38:51 +0000 (21:38 +0000)]
[iOS][MediaControls] Reverse-pinching using the built-in controls should enter full screen
https://bugs.webkit.org/show_bug.cgi?id=129707

Reviewed by Eric Carlson.

The default controls on iOS should respond to a pinch gesture by entering fullscreen. Add a gesture
event listener, and enter full screen if the user does a quick (>2 velocity) reverse (>1.25 scale) pinch.

* Modules/mediacontrols/mediaControlsiOS.js:
(ControllerIOS.prototype.createBase):
(ControllerIOS.prototype.handlePlayButtonTouchEnd):
(ControllerIOS.prototype.handleBaseGestureStart):
(ControllerIOS.prototype.handleBaseGestureChange):
(ControllerIOS.prototype.handleBaseGestureEnd):

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

5 years agoREGRESSION(r156316): Scrollbar on a large document is broken
rniwa@webkit.org [Wed, 19 Mar 2014 21:36:47 +0000 (21:36 +0000)]
REGRESSION(r156316): Scrollbar on a large document is broken
https://bugs.webkit.org/show_bug.cgi?id=130474
<rdar://problem/16371523>

Reviewed by Anders Carlsson.

The bug was caused by updateArrowPlacement() doing the work even though Scrollbar Overlay API is available.
Prior to r156316, this function exited early:
http://trac.webkit.org/browser/trunk/Source/WebCore/platform/mac/ScrollbarThemeMac.mm?rev=156315#L147

Fixed the bug by deleting updateArrowPlacement() entirely.

* platform/mac/ScrollbarThemeMac.mm:
(WebCore::ScrollbarThemeMac::preferencesChanged):

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

5 years ago[Mac][EME] Query whether decoder support exists before creating a new MediaKeys object.
jer.noble@apple.com [Wed, 19 Mar 2014 21:27:10 +0000 (21:27 +0000)]
[Mac][EME] Query whether decoder support exists before creating a new MediaKeys object.
https://bugs.webkit.org/show_bug.cgi?id=130459

Reviewed by Eric Carlson.

Source/WebCore:

* WebCore.exp.in: Export the new WCSI method.
* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::supportsKeySystem): Bail early if we have no decoder support.
* platform/mac/WebCoreSystemInterface.h: Provide a WCSI wrapper for WKSI.
* platform/mac/WebCoreSystemInterface.mm: Ditto.

Source/WebKit/mac:

* WebCoreSupport/WebSystemInterface.mm:
(InitWebCoreSystemInterface): Initialize the new WCSI method.

Source/WebKit2:

* WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
(InitWebCoreSystemInterface): Initialize the new WCSI method.

WebKitLibraries:

* WebKitSystemInterface.h:
* libWebKitSystemInterfaceMavericks.a:
* libWebKitSystemInterfaceMountainLion.a:

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

5 years agoMake Remote Control commands testable
eric.carlson@apple.com [Wed, 19 Mar 2014 21:08:24 +0000 (21:08 +0000)]
Make Remote Control commands testable
https://bugs.webkit.org/show_bug.cgi?id=130358

Reviewed by Jer Noble.

Source/WebCore:

Test: media/video-remote-control-playpause.html

* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::mediaPlayerTimeChanged): Call session->clientWillPausePlayback.
(WebCore::HTMLMediaElement::didReceiveRemoteControlCommand): Log the command.

* platform/audio/MediaSession.cpp:
(WebCore::MediaSessionClient::mediaSessionTitle): Move from header file.
(WebCore::MediaSessionClient::mediaSessionDuration): Ditto.
(WebCore::MediaSessionClient::mediaSessionCurrentTime): Ditto.
* platform/audio/MediaSession.h:

* platform/audio/MediaSessionManager.cpp:
(WebCore::MediaSessionManager::MediaSessionManager): Get rid of m_activeSession.
(WebCore::MediaSessionManager::removeSession): No need to clear m_activeSession because
    we use the m_sessions vector.
(WebCore::MediaSessionManager::sessionWillBeginPlayback): setCurrentSession takes a
    MediaSession&.
(WebCore::MediaSessionManager::sessionWillEndPlayback): Keep m_sessions sorted so playing
    sessions are before paused sessions.
(WebCore::MediaSessionManager::setCurrentSession): Move the session that is beginning to
    play to the head of m_sessions.
(WebCore::MediaSessionManager::currentSession): Return m_sessions[0] or nullptr.
(WebCore::MediaSessionManager::didReceiveRemoteControlCommand):
* platform/audio/MediaSessionManager.h:

* platform/audio/ios/MediaSessionManagerIOS.mm: Include MediaPlayer.h.

* testing/Internals.cpp:
(WebCore::Internals::postRemoteControlCommand): New.
* testing/Internals.h:
* testing/Internals.idl:

LayoutTests:

* media/video-remote-control-playpause-expected.txt: Added.
* media/video-remote-control-playpause.html: Added.

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

5 years agoImproving webkitGetUserMedia error handling and error messages
thiago.lacerda@openbossa.org [Wed, 19 Mar 2014 21:06:38 +0000 (21:06 +0000)]
Improving webkitGetUserMedia error handling and error messages
https://bugs.webkit.org/show_bug.cgi?id=130452

Reviewed by Eric Carlson.

Checking if first argument of webkitGetUserMedia is a valid Dictionary. If not, throw an exception with a
clearer message of the error.

Source/WebCore:

Test updated.

* Modules/mediastream/NavigatorMediaStream.idl:
* UseJSC.cmake:
* bindings/js/JSNavigatorCustom.cpp: Added.

LayoutTests:

* fast/mediastream/argument-types-expected.txt:
* fast/mediastream/script-tests/argument-types.js:

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

5 years agoJSC bindings should use the passed-in global object for wrapper caching.
akling@apple.com [Wed, 19 Mar 2014 20:42:55 +0000 (20:42 +0000)]
JSC bindings should use the passed-in global object for wrapper caching.
<https://webkit.org/b/130458>

Take a shorter path to the DOMWrapperWorld by using the passed-in
global object instead of getting the lexical global from ExecState.
Removed an old FIXME that no longer applies since JSObjects can
always find the right global object these days.

Reviewed by Geoff Garen.

* bindings/js/JSCSSRuleCustom.cpp:
(WebCore::toJS):
* bindings/js/JSCSSStyleDeclarationCustom.cpp:
(WebCore::JSCSSStyleDeclaration::getPropertyCSSValue):
* bindings/js/JSCSSValueCustom.cpp:
(WebCore::toJS):
* bindings/js/JSDOMBinding.h:
(WebCore::createWrapper):
(WebCore::wrap):
(WebCore::getExistingWrapper):
(WebCore::createNewWrapper):
(WebCore::toJS):
* bindings/js/JSDOMWindowCustom.cpp:
(WebCore::JSDOMWindow::setTimeout):
(WebCore::JSDOMWindow::setInterval):
(WebCore::JSDOMWindow::addEventListener):
(WebCore::JSDOMWindow::removeEventListener):
* bindings/js/JSDocumentCustom.cpp:
(WebCore::JSDocument::location):
(WebCore::toJS):
* bindings/js/JSElementCustom.cpp:
(WebCore::toJSNewlyCreated):
* bindings/js/JSEventCustom.cpp:
(WebCore::toJS):
* bindings/js/JSHTMLCollectionCustom.cpp:
(WebCore::toJS):
* bindings/js/JSHTMLTemplateElementCustom.cpp:
(WebCore::JSHTMLTemplateElement::content):
* bindings/js/JSImageDataCustom.cpp:
(WebCore::toJS):
* bindings/js/JSNodeCustom.cpp:
(WebCore::createWrapperInline):
* bindings/js/JSNodeCustom.h:
(WebCore::toJS):
* bindings/js/JSSVGPathSegCustom.cpp:
(WebCore::toJS):
* bindings/js/JSStyleSheetCustom.cpp:
(WebCore::toJS):
* bindings/js/JSTextTrackCueCustom.cpp:
(WebCore::toJS):
* bindings/js/JSTrackCustom.cpp:
(WebCore::toJS):
* bindings/js/JSWorkerGlobalScopeCustom.cpp:
(WebCore::JSWorkerGlobalScope::setTimeout):
(WebCore::JSWorkerGlobalScope::setInterval):
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateImplementation):

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

5 years agoPage::setPageScaleFactor should not force the scroll view position when using delegat...
benjamin@webkit.org [Wed, 19 Mar 2014 20:41:46 +0000 (20:41 +0000)]
Page::setPageScaleFactor should not force the scroll view position when using delegatesScrolling()
https://bugs.webkit.org/show_bug.cgi?id=130429

Patch by Benjamin Poulain <bpoulain@apple.com> on 2014-03-19
Reviewed by Simon Fraser.

When setting the same scale mutliple time (for example on load), Page was asking the top scrollview
to scroll to the origin. This is bogus since the scroll view is driving Page::setDeviceScaleFactor,
not the other way around.

Simon fixed the general case in http://trac.webkit.org/changeset/165652/trunk/Source/WebCore/page/Page.cpp
but this branch was still scrolling content.

* page/Page.cpp:
(WebCore::Page::setPageScaleFactor):

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

5 years agoREGRESSION(r165459): It broke 109 jsc stress test on ARM Thumb2 and Mac 32 bit
fpizlo@apple.com [Wed, 19 Mar 2014 20:36:45 +0000 (20:36 +0000)]
REGRESSION(r165459): It broke 109 jsc stress test on ARM Thumb2 and Mac 32 bit
https://bugs.webkit.org/show_bug.cgi?id=130134

Reviewed by Mark Hahnenberg.

* dfg/DFGFixupPhase.cpp:
(JSC::DFG::FixupPhase::fixupNode): Can't do some optimizations if you don't have a lot of registers.
* dfg/DFGSpeculativeJIT32_64.cpp:
(JSC::DFG::SpeculativeJIT::cachedGetById): Move stuff around before going into the IC code to ensure that we give the IC code the invariants it needs. This only happens in case of GetByIdFlush, where we are forced into using weird combinations of registers because the results have to be in t0/t1.
(JSC::DFG::SpeculativeJIT::compile): For a normal GetById, the register allocator should just do the right thing so nobody has to move anything around.
* jit/JITInlineCacheGenerator.cpp:
(JSC::JITGetByIdGenerator::JITGetByIdGenerator): Assert the things we want.
* jit/JITInlineCacheGenerator.h:
* jit/Repatch.cpp:
(JSC::generateGetByIdStub): Remove a previous incomplete hack to try to work around the DFG's problem.

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

5 years agoFilter out editable services from image menu for non-contenteditable images
beidson@apple.com [Wed, 19 Mar 2014 20:12:24 +0000 (20:12 +0000)]
Filter out editable services from image menu for non-contenteditable images
<rdar://problem/16319645> and https://bugs.webkit.org/show_bug.cgi?id=130437

Reviewed by Tim Horton.

Source/WebCore:

* WebCore.exp.in:

Source/WebKit/mac:

* Misc/WebSharingServicePickerController.h:
* Misc/WebSharingServicePickerController.mm:
(-[WebSharingServicePickerController sharingServicePicker:sharingServicesForItems:mask:proposedSharingServices:]):
  Filter out editing services based on the includeEditorServices flag.
* WebCoreSupport/WebContextMenuClient.mm:
(WebContextMenuClient::contextMenuForEvent):

Source/WebKit2:

* UIProcess/mac/WebContextMenuProxyMac.h:
* UIProcess/mac/WebContextMenuProxyMac.mm:
(-[WKSharingServicePickerDelegate setIncludeEditorServices:]):
(-[WKSharingServicePickerDelegate sharingServicePicker:sharingServicesForItems:mask:proposedSharingServices:]):
  Filter out editing services based on the includeEditorServices flag.
(WebKit::WebContextMenuProxyMac::setupImageServicesMenu):
(WebKit::WebContextMenuProxyMac::populate):

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

5 years agoImplement method addPath for Path2D
krit@webkit.org [Wed, 19 Mar 2014 19:54:42 +0000 (19:54 +0000)]
Implement method addPath for Path2D
https://bugs.webkit.org/show_bug.cgi?id=130461

Reviewed by Dean Jackson.

Source/WebCore:

Add support for the Path2D method addPath. The method allows
to append and existing Path2D object to another one. It can be
combined with a transformation matrix SVGMatrix.

Test: fast/canvas/canvas-path-addPath.html

* html/canvas/DOMPath.h: Add new method addPath().
(WebCore::DOMPath::addPath):
* html/canvas/DOMPath.idl:
* platform/graphics/Path.h: Add support for appending paths.
* platform/graphics/cairo/PathCairo.cpp:
(WebCore::Path::addPath):
* platform/graphics/cg/PathCG.cpp:
(WebCore::Path::addPath):
* platform/graphics/wince/PathWinCE.cpp:
(WebCore::Path::addPath):

LayoutTests:

Test the addPath Path2D method.

* platform/efl/TestExpectations:
* platform/gtk/TestExpectations:
* fast/canvas/canvas-path-addPath-expected.txt: Added.
* fast/canvas/canvas-path-addPath.html: Added.

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

5 years agoNormalize some of the older JSC options
mhahnenberg@apple.com [Wed, 19 Mar 2014 19:32:43 +0000 (19:32 +0000)]
Normalize some of the older JSC options
https://bugs.webkit.org/show_bug.cgi?id=128753

Reviewed by Michael Saboff.

* runtime/Options.cpp:
(JSC::Options::initialize):

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

5 years ago[iOS] WebKit2 Quicklook.
commit-queue@webkit.org [Wed, 19 Mar 2014 19:24:30 +0000 (19:24 +0000)]
[iOS] WebKit2 Quicklook.
https://bugs.webkit.org/show_bug.cgi?id=130360

Source/WebCore:

Patch by Yongjun Zhang <yongjun_zhang@apple.com> on 2014-03-19
Reviewed by Tim Horton.

Since ResourceLoaders using WebKit2 network process don't have ResourceHandle any more, we
need to make it possible to create QuickLookHandle from ResourceLoader.

* WebCore.exp.in: Make some QuickLookHandle methods visible from WebKit2.
* loader/ResourceLoader.h: Add m_quickLookHandle data member to ResourceLoader.
(WebCore::ResourceLoader::quickLookHandle):
(WebCore::ResourceLoader::setQuickLookHandle):
* platform/network/ios/QuickLook.h: Add a new method to create QuickLookHandle from ResourceLoader.
* platform/network/ios/QuickLook.mm:
(WebCore::QuickLookHandle::create):

Source/WebKit2:

For WebKit2 resource loads, if we detect a quicklook content that QLConverter is able to
convert, handle the response data to QLConverter and use its delegate WKWebResourceQuickLookDelegate
to rounte the converted results (HTML) back into WebCore.  Thie similiar logic has been in place
for WebKit1.

Patch by Yongjun Zhang <yongjun_zhang@apple.com> on 2014-03-19
Reviewed by Tim Horton.

* WebKit2.xcodeproj/project.pbxproj: Add WebResourceLoaderIOS.mm to the project.
* WebProcess/Network/WebResourceLoadScheduler.cpp:
* WebProcess/ios/WebResourceLoaderIOS.mm: Added.
(-[WKWebResourceQuickLookDelegate initWithWebResourceLoader:WebKit::]): WKWebResourceQuickLookDelegate holds
    the original WebResourceLoader so that we could send converted result to WebCore.
(-[WKWebResourceQuickLookDelegate connection:didReceiveDataArray:]):
(-[WKWebResourceQuickLookDelegate connection:didReceiveData:lengthReceived:]):
(-[WKWebResourceQuickLookDelegate connectionDidFinishLoading:]):
(-[WKWebResourceQuickLookDelegate connection:didFailWithError:]):
(-[WKWebResourceQuickLookDelegate clearHandle]):
(WebKit::WebResourceLoader::setUpQuickLookHandleIfNeeded):

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

5 years ago[iOS] Disable the video plugin proxy by default on WK1.
jer.noble@apple.com [Wed, 19 Mar 2014 19:21:03 +0000 (19:21 +0000)]
[iOS] Disable the video plugin proxy by default on WK1.
https://bugs.webkit.org/show_bug.cgi?id=130460

Reviewed by Eric Carlson.

Update the defaults to universally enable the AVFoundationEnabled preference, disable the
VideoPluginProxyEnabled preference, and on iOS only enable the AVKitEnabled preference.

* WebView/WebPreferences.mm:
(+[WebPreferences initialize]):

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

5 years agoSmall cleanup of empty string
barraclough@apple.com [Wed, 19 Mar 2014 19:00:51 +0000 (19:00 +0000)]
Small cleanup of empty string
https://bugs.webkit.org/show_bug.cgi?id=130438

Reviewed by Anders Carlson.

The empty string is weird becuase it is used as the impl for an AtomicString, but isAtomic()
returns false.
Also, we set a valid pointer for the characters pointer due to an old PCRE bug; remove this.
Also, we currently only create one 'static' string, the empty string. Adding more might break
assumtions, inhibit the constructor from being used to create other static strings for now.

* wtf/text/AtomicString.h:
(WTF::AtomicString::add):
    - update assert.
* wtf/text/StringImpl.h:
(WTF::StringImpl::StringImpl):
    - Merge ConstructStaticString constructors, only allow the empty static string to be constructed.
* wtf/text/StringStatics.cpp:
(WTF::StringImpl::empty):
    - ConstructStaticString -> ConstructEmptyString, remove arguments, DEPRECATED_DEFINE_STATIC_LOCAL -> NeverDestroyed.

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

5 years agoFix cue rendering test and include support for left/right alignment
bfulgham@apple.com [Wed, 19 Mar 2014 19:00:14 +0000 (19:00 +0000)]
Fix cue rendering test and include support for left/right alignment
https://bugs.webkit.org/show_bug.cgi?id=130406

Reviewed by Eric Carlson.

Merged from Blink (patch by vcarbune@chromium.org):
https://chromium.googlesource.com/chromium/blink/+/e695703cb603421c741e59a557a7989113c13b94
http://crbug.com/25155003

Source/WebCore:

No new tests. Covered by media/track/track-cue-rendering-snap-to-lines-not-set.html.

* html/track/VTTCue.cpp:
(WebCore::leftKeyword): Added.
(WebCore::rightKeyword): Added.
(WebCore::VTTCueBox::applyCSSProperties): Added.
(WebCore::VTTCue::VTTCue):
(WebCore::VTTCue::align): Handle left/right alignment.
(WebCore::VTTCue::setAlign): Ditto.
(WebCore::VTTCue::calculateDisplayParameters): Refactored and revised for left/right tokens.
(WebCore::VTTCue::setCueSettings): Ditto.
(WebCore::VTTCue::getCSSAlignment): Added.
(WebCore::VTTCue::getCSSWritingMode): Added.
* html/track/VTTCue.h:

LayoutTests:

* media/track/captions-webvtt/captions-snap-to-lines-not-set.vtt: Revised for left/right alignment tags.
* media/track/track-cue-rendering-snap-to-lines-not-set-expected.txt: Ditto.
* media/track/track-cue-rendering-snap-to-lines-not-set.html: Ditto.

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

5 years agoWebKit2 View Gestures: Swipe gesture can track vertical movement instead of horizonta...
timothy_horton@apple.com [Wed, 19 Mar 2014 17:56:55 +0000 (17:56 +0000)]
WebKit2 View Gestures: Swipe gesture can track vertical movement instead of horizontal movement
https://bugs.webkit.org/show_bug.cgi?id=130441
<rdar://problem/16337279>

Reviewed by Simon Fraser.

* UIProcess/mac/ViewGestureControllerMac.mm:
(WebKit::scrollEventCanBecomeSwipe):
Factor logic that determines if a scroll event can become a swipe
out into scrollEventCanBecomeSwipe.
Use <= instead of < when comparing the axes, because we don't want
to start a swipe on a completely diagonal scroll either (because AppKit
can start tracking a vertical swipe in that case).

(WebKit::ViewGestureController::handleScrollWheelEvent):
(WebKit::ViewGestureController::wheelEventWasNotHandledByWebCore):
Make use of scrollEventCanBecomeSwipe.

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

5 years agoUpdate type of local vars to match the type of String length.
mark.lam@apple.com [Wed, 19 Mar 2014 17:53:08 +0000 (17:53 +0000)]
Update type of local vars to match the type of String length.
<https://webkit.org/b/130077>

Reviewed by Geoffrey Garen.

* runtime/JSStringJoiner.cpp:
(JSC::JSStringJoiner::join):

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

5 years agoAdd new functionality that will be required by the history item decoding
andersca@apple.com [Wed, 19 Mar 2014 17:36:37 +0000 (17:36 +0000)]
Add new functionality that will be required by the history item decoding
https://bugs.webkit.org/show_bug.cgi?id=130433

Reviewed by Sam Weinig.

Source/WebCore:

* platform/KeyedCoding.h:
(WebCore::KeyedDecoder::decodeConditionalObject):

Source/WebKit2:

* Shared/cf/KeyedDecoder.cpp:
(WebKit::KeyedDecoder::decodeUInt32):
(WebKit::KeyedDecoder::decodeInt32):
(WebKit::KeyedDecoder::decodeFloat):
* Shared/cf/KeyedDecoder.h:

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

5 years agoREGRESSION (OS X 10.9.2): PageVisibilityStateWithWindowChanges.WebKit2 API test fails
ap@apple.com [Wed, 19 Mar 2014 17:27:24 +0000 (17:27 +0000)]
REGRESSION (OS X 10.9.2): PageVisibilityStateWithWindowChanges.WebKit2 API test fails
https://bugs.webkit.org/show_bug.cgi?id=130463

* TestWebKitAPI/Tests/mac/PageVisibilityStateWithWindowChanges.mm: Disable the test.

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

5 years agoUnreviewed test system fix.
bfulgham@apple.com [Wed, 19 Mar 2014 16:47:08 +0000 (16:47 +0000)]
Unreviewed test system fix.

* TestExpectations: I mistakenly checked in the region-webvtt tests as enabled. This feature is not
ready to be turned on for all platforms yet.

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

5 years agoFix the iOS build.
timothy_horton@apple.com [Wed, 19 Mar 2014 16:00:13 +0000 (16:00 +0000)]
Fix the iOS build.

* html/BaseDateAndTimeInputType.cpp:
(WebCore::BaseDateAndTimeInputType::parseToDateComponents):
Missing a StringView().

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

5 years ago[iOS] WebPDFViewPlaceholder divides-by-zero with an empty document
timothy_horton@apple.com [Wed, 19 Mar 2014 15:39:06 +0000 (15:39 +0000)]
[iOS] WebPDFViewPlaceholder divides-by-zero with an empty document
https://bugs.webkit.org/show_bug.cgi?id=130444
<rdar://problem/15580682>

Reviewed by Sam Weinig.

* WebView/WebPDFViewPlaceholder.h:
* WebView/WebPDFViewPlaceholder.mm:
(-[WebPDFViewPlaceholder layout]):
Get rid of boundingSize, it's never assigned to anything but CGSizeZero,
which is confusing.

Don't divide by zero if we have no pages, instead return an empty bounding size.

(-[WebPDFViewPlaceholder _computePageRects:]):
If we have an empty document, set the background color to white.
Otherwise, set it to black. It's not clear that black is the ideal
background color, but this retains existing behavior.

* UIProcess/ios/WKPDFView.mm:
(-[WKPDFView web_setContentProviderData:]):
Don't make UIPDFPageViews for null pages.

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

5 years agoUnreviewed gardening.
fred.wang@free.fr [Wed, 19 Mar 2014 15:32:48 +0000 (15:32 +0000)]
Unreviewed gardening.

* platform/efl/TestExpectations: remove failures for mo/row since they are already in skipped in the main TestExpectations.
* platform/gtk/mathml/presentation/mspace-children-expected.png: Move mspace-children-expected.png to platform/gtk.
* platform/gtk/mathml/presentation/mspace-children-expected.txt: Move mspace-children-expected.txt to platform/gtk.
* platform/win/TestExpectations: remove failures for mo/row/roots since they are already in skipped in the main TestExpectations.

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

5 years agoTighten ElementRuleCollector::m_matchedRuleList typing
antti@apple.com [Wed, 19 Mar 2014 15:19:46 +0000 (15:19 +0000)]
Tighten ElementRuleCollector::m_matchedRuleList typing
https://bugs.webkit.org/show_bug.cgi?id=130446

Reviewed by Anders Carlsson.

StyleRuleBase -> StyleRule.

* css/ElementRuleCollector.cpp:
(WebCore::ElementRuleCollector::matchedRuleList):
* css/ElementRuleCollector.h:
* css/StyleResolver.cpp:
(WebCore::StyleResolver::styleRulesForElement):
(WebCore::StyleResolver::pseudoStyleRulesForElement):
* css/StyleResolver.h:
* editing/EditingStyle.cpp:
(WebCore::styleFromMatchedRulesForElement):
* inspector/InspectorCSSAgent.cpp:
(WebCore::InspectorCSSAgent::getMatchedStylesForNode):
(WebCore::InspectorCSSAgent::buildArrayForMatchedRuleList):
* inspector/InspectorCSSAgent.h:
* page/DOMWindow.cpp:
(WebCore::DOMWindow::getMatchedCSSRules):

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

5 years ago[CSSRegions] An unsplittable box is always displayed in a single region
mihnea@adobe.com [Wed, 19 Mar 2014 15:11:51 +0000 (15:11 +0000)]
[CSSRegions] An unsplittable box is always displayed in a single region
https://bugs.webkit.org/show_bug.cgi?id=130451

Reviewed by Andrei Bucur.

Add an ASSERT stating that an unsplittable box region range always contains 1 region.
No new functionality, no new tests.

* rendering/RenderFlowThread.cpp:
(WebCore::RenderFlowThread::getRegionRangeForBox):

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

5 years agoSubpixel rendering: Transform origin is miscalculated when RenderLayer's
zalan@apple.com [Wed, 19 Mar 2014 14:25:34 +0000 (14:25 +0000)]
Subpixel rendering: Transform origin is miscalculated when RenderLayer's
offsetfromRenderer has device pixel fraction value.
https://bugs.webkit.org/show_bug.cgi?id=129859

Reviewed by Simon Fraser.

We need to calculate the transformed origin using the painting coordinates to produce
pixel precise result.

Source/WebCore:

* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::updateGraphicsLayerGeometry):
(WebCore::RenderLayerBacking::computeTransformOriginForPainting):
* rendering/RenderLayerBacking.h:

LayoutTests:

* compositing/columns/composited-columns-expected.txt:
* compositing/geometry/limit-layer-bounds-opacity-transition-expected.txt:
* compositing/repaint/resize-repaint-expected.txt:
* platform/mac/compositing/repaint/invalidations-on-composited-layers-expected.txt:
* platform/mac/compositing/visibility/visibility-image-layers-dynamic-expected.txt:

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

5 years ago[GStreamer] Clean timeout source ids
csaavedra@igalia.com [Wed, 19 Mar 2014 13:49:41 +0000 (13:49 +0000)]
[GStreamer] Clean timeout source ids
https://bugs.webkit.org/show_bug.cgi?id=130450

Reviewed by Philippe Normand.

Sources IDs need to be cleaned up if the callback removes the
source, otherwise we'll be attempting to remove an empty source at
some point.

* platform/graphics/gstreamer/WebKitMediaSourceGStreamer.cpp:
(webKitMediaVideoSrcStart): Clean the source id.
(webKitMediaAudioSrcStart): Ditto.
(webKitMediaVideoSrcSeekMainCb): Ditto.
(webKitMediaAudioSrcSeekMainCb): Ditto.

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

5 years ago[CSSRegions] Compute region ranges for children of inline blocks
mihnea@adobe.com [Wed, 19 Mar 2014 12:38:51 +0000 (12:38 +0000)]
[CSSRegions] Compute region ranges for children of inline blocks
https://bugs.webkit.org/show_bug.cgi?id=130392

Reviewed by Andrei Bucur.

Source/WebCore:

Extend the region ranges computation for children of inline blocks.
When we cannot retrieve the region range for a box using cached information,
either from region range map or from the region cached on the RootInlineBox,
try to find the top most unsplittable box up to the flow thread boundary.
If we find such unsplittable box and the box has a region range, then return
this range.

Before this patch, method getRegionRangeForBox did not return true/false
if it was able to retrieve the range and the caller checked the returned
region values. I modified the method to return true if we were able to compute
the range.

Tests: fast/regions/inline-block-inline-children-flowed-in-regions.html
       fast/regions/inline-blocks-dyn-enlarged-regions.html
       fast/regions/inline-blocks-dyn-shrunk-regions.html
       fast/regions/inline-blocks-in-two-regions.html

* inspector/InspectorOverlay.cpp:
(WebCore::buildObjectForRendererFragments):
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::updateRegionRangeForBoxChild):
* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::hasNextPage):
* rendering/RenderBox.cpp:
(WebCore::RenderBox::clampToStartAndEndRegions):
(WebCore::RenderBox::borderBoxRectInRegion):
(WebCore::RenderBox::computeRectForRepaint):
(WebCore::RenderBox::layoutOverflowRectForPropagation):
* rendering/RenderBoxModelObject.cpp:
(WebCore::RenderBoxModelObject::mapAbsoluteToLocalPoint):
* rendering/RenderFlowThread.cpp:
(WebCore::RenderFlowThread::regionForCompositedLayer):
(WebCore::RenderFlowThread::adjustedPositionRelativeToOffsetParent):
(WebCore::RenderFlowThread::removeRenderBoxRegionInfo):
(WebCore::RenderFlowThread::logicalWidthChangedInRegionsForBlock):
(WebCore::RenderFlowThread::getRegionRangeForBoxFromCachedInfo):
(WebCore::RenderFlowThread::getRegionRangeForBox):
(WebCore::RenderFlowThread::objectShouldPaintInFlowRegion):
(WebCore::RenderFlowThread::objectInFlowRegion):
(WebCore::RenderFlowThread::addRegionsVisualEffectOverflow):
(WebCore::RenderFlowThread::addRegionsVisualOverflowFromTheme):
(WebCore::RenderFlowThread::addRegionsOverflowFromChild):
(WebCore::RenderFlowThread::addRegionsLayoutOverflow):
(WebCore::RenderFlowThread::addRegionsVisualOverflow):
(WebCore::RenderFlowThread::clearRegionsOverflow):
* rendering/RenderFlowThread.h:
* rendering/RenderNamedFlowThread.cpp:
(WebCore::RenderNamedFlowThread::fragmentFromAbsolutePointAndBox):
* rendering/RenderObject.cpp:
(WebCore::RenderObject::locateFlowThreadContainingBlock):
Make sure we return the right render flow thread in the case of
region-based multicolumn inside named flows.
* rendering/RenderRegion.cpp:
(WebCore::RenderRegion::rectFlowPortionForBox):

LayoutTests:

* fast/regions/inline-block-inline-children-flowed-in-regions-expected.html: Added.
* fast/regions/inline-block-inline-children-flowed-in-regions.html: Added.
* fast/regions/inline-blocks-dyn-enlarged-regions-expected.html: Added.
* fast/regions/inline-blocks-dyn-enlarged-regions.html: Added.
* fast/regions/inline-blocks-dyn-shrunk-regions-expected.html: Added.
* fast/regions/inline-blocks-dyn-shrunk-regions.html: Added.
* fast/regions/inline-blocks-in-two-regions-expected.html: Added.
* fast/regions/inline-blocks-in-two-regions.html: Added.

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

5 years agoFix reftest failure of mathml/presentation/bug95404.html.
fred.wang@free.fr [Wed, 19 Mar 2014 12:21:01 +0000 (12:21 +0000)]
Fix reftest failure of mathml/presentation/bug95404.html.

Unreviewed gardering.

After bug 116600, the test is only failing because of some difference
invisible by the naked eye, due to antialiasing of the radical symbol.

* mathml/presentation/bug95404-expected.html: add a 2px border to prevent antialiasing.
* mathml/presentation/bug95404.html: ditto.
* platform/efl/TestExpectations: remove test failure.
* platform/gtk/TestExpectations: ditto.

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

5 years ago[EFL] vibration/cancelVibration-during-pattern-vibrating.html is failing after r165598
commit-queue@webkit.org [Wed, 19 Mar 2014 09:16:47 +0000 (09:16 +0000)]
[EFL] vibration/cancelVibration-during-pattern-vibrating.html is failing after r165598
https://bugs.webkit.org/show_bug.cgi?id=130333

Patch by Krzysztof Wolanski <k.wolanski@samsung.com> on 2014-03-19
Reviewed by Gyuyoung Kim.

Added setting m_state when calling Vibration::vibrate. It was missing after
refactoring Vibration (r165598).

* Modules/vibration/Vibration.cpp:
(WebCore::Vibration::vibrate):

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

5 years agoRewrite WebHTMLConverter::_colorForNode in C++
commit-queue@webkit.org [Wed, 19 Mar 2014 08:04:52 +0000 (08:04 +0000)]
Rewrite WebHTMLConverter::_colorForNode in C++
https://bugs.webkit.org/show_bug.cgi?id=130443

Patch by Sam Weinig <sam@webkit.org> on 2014-03-19
Reviewed by Andreas Kling.

* platform/mac/HTMLConverter.mm:
(_platformColor):
Rename from _colorForRGBColor and simplify to just do the platform conversion.

(normalizedColor):
Extract normalization out of _colorForRGBColor and remove cases that are impossible to hit
due to us only ever using the device color space.

(HTMLConverterCaches::colorPropertyValueForNode):
(-[WebHTMLConverter _colorForNode:property:]):
Convert to C++.

(-[WebHTMLConverter dealloc]):
(-[WebHTMLConverter init]):
Remove caches, we already cache in ColorMac.

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

5 years ago[l10n] Updated Polish translation of WebKitGTK+
berto@igalia.com [Wed, 19 Mar 2014 07:13:37 +0000 (07:13 +0000)]
[l10n] Updated Polish translation of WebKitGTK+
https://bugs.webkit.org/show_bug.cgi?id=130334

Patch by Piotr Drąg <piotrdrag@gmail.com> on 2014-03-19
Reviewed by Gustavo Noronha Silva.

* pl.po: updated.

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

5 years ago[CSS Regions] Strange layout for content with region breaks
abucur@adobe.com [Wed, 19 Mar 2014 06:57:17 +0000 (06:57 +0000)]
[CSS Regions] Strange layout for content with region breaks
https://bugs.webkit.org/show_bug.cgi?id=121318

Reviewed by Mihnea Ovidenie.

Source/WebCore:

When break-inside: avoid is used on an element, the implementation tries to
force it inside a single fragmentation container even though the descendants
of the element specify forced breaks. This leads to unexpected results and
unstable layout.

The change extends the definition of unsplittable elements for flow threads
using the same conditions found inside RenderBlockFlow::adjustForUnsplittableChild.
This change forces elements that require break avoidance to have a single region
in the region range. As a result, forced breaks have no effect inside them.

It should be noted this may not the behavior defined by the CSS3 Fragmentation spec.
From my understanding of the text, forced breaks override any avoidance specified
by ancestor elements. However, implementing this is a larger change that will require
a fundamental new approach in handling break avoidance. This patch just brings
consistency to the API.

Test: fast/regions/forced-break-inside-avoid-break.html

* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::childBoxIsUnsplittableForFragmentation):
(WebCore::RenderBlock::computeRegionRangeForBoxChild):
(WebCore::RenderBlock::estimateRegionRangeForBoxChild):
* rendering/RenderBlock.h:
* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::adjustForUnsplittableChild): Move the avoidance conditions inside
a helper method RenderBlock::childBoxIsUnsplittableForFragmentation.

LayoutTests:

The test verifies that elements specifying break-inside: avoid can't
be splitted by forced breaks applied inside of them.

* fast/regions/forced-break-inside-avoid-break-expected.txt: Added.
* fast/regions/forced-break-inside-avoid-break.html: Added.

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

5 years ago[iOS][WebKit2] Provide generic software-snapshotting API
timothy_horton@apple.com [Wed, 19 Mar 2014 06:55:29 +0000 (06:55 +0000)]
[iOS][WebKit2] Provide generic software-snapshotting API
https://bugs.webkit.org/show_bug.cgi?id=130385
<rdar://problem/16005957>

Reviewed by Sam Weinig.

* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _didCommitLayerTree:WebKit::]):
(-[WKWebView _snapshotRect:intoImageOfWidth:completionHandler:]):
* UIProcess/API/Cocoa/WKWebViewPrivate.h:
* UIProcess/API/Cocoa/_WKThumbnailView.mm:
(-[_WKThumbnailView initWithFrame:fromWKView:]):
(-[_WKThumbnailView _requestSnapshotIfNeeded]):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::internalShowContextMenu):
* UIProcess/WebPageProxy.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::takeSnapshot):
(WebKit::WebPage::scaledSnapshotWithOptions):
(WebKit::WebPage::snapshotAtSize):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
Rename TakeThumbnailSnapshot message to TakeSnapshot.

Fill the snapshot image with the FrameView's background color, to avoid
half-pixel alpha around the edges.

Factor snapshotAtSize out of scaledSnapshotWithOptions.

Don't apply both the custom and device scale factor to the base CTM,
only the device scale factor. Custom scale factor should only be
applied to the user CTM.

* Shared/ImageOptions.h:
Add a snapshot option, RespectDrawingAreaTransform, that maps
the rect through the drawing area's root layer transform.
Use this in place of the thumbnail-specific code in TakeThumbnailSnapshot.
Add a snapshot option, ExcludeDeviceScaleFactor, which means that
snapshotting will not factor the device scale in (useful for drawing
to a bitmap at an exact requested size).

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

5 years agoAX: Not able to use arrow keys to read text with VoiceOver before selection is set...
samuel_white@apple.com [Wed, 19 Mar 2014 06:16:40 +0000 (06:16 +0000)]
AX: Not able to use arrow keys to read text with VoiceOver before selection is set someplace (anyplace).
https://bugs.webkit.org/show_bug.cgi?id=130250

Reviewed by Chris Fleizach.

Source/WebCore:

If initial selection isn't set when we handle selection movement for accessibility, we need to set it. If we don't, using arrow
keys to read text with VoiceOver doesn't work as expected. Things will only start working after the user holds shift and arrows
around to select any arbitrary thing to force selection to get set. This logic handles that special case more gracefully.

Test: platform/mac/accessibility/selection-initial.html

* page/EventHandler.cpp:
(WebCore::handleKeyboardSelectionMovement):
(WebCore::EventHandler::handleKeyboardSelectionMovementForAccessibility):
* testing/Internals.cpp:
(WebCore::Internals::resetToConsistentState):

Source/WebKit:

* WebKit.vcxproj/WebKitExportGenerator/WebKitExports.def.in:

Source/WebKit/mac:

Added ability to toggle enhanced accessibility on and off to support tests that require it.

* WebView/WebFrame.mm:
(-[WebFrame enhancedAccessibilityEnabled]):
(-[WebFrame setEnhancedAccessibility:]):
* WebView/WebFramePrivate.h:

Source/WebKit2:

Added ability to toggle enhanced accessibility on and off to support tests that require it.

* WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
(WKAccessibilityEnableEnhancedAccessibility):
(WKAccessibilityEnhancedAccessibilityEnabled):
* WebProcess/InjectedBundle/API/c/WKBundlePagePrivate.h:

Tools:

Added ability to toggle enhanced accessibility on and off to support tests that require it.

* DumpRenderTree/AccessibilityController.cpp:
(enableEnhancedAccessibilityCallback):
(getEnhancedAccessibilityEnabledCallback):
(AccessibilityController::getJSClass):
* DumpRenderTree/AccessibilityController.h:
* DumpRenderTree/atk/AccessibilityControllerAtk.cpp:
(AccessibilityController::enableEnhancedAccessibility):
(AccessibilityController::enhancedAccessibilityEnabled):
* DumpRenderTree/ios/AccessibilityControllerIOS.mm:
(AccessibilityController::enableEnhancedAccessibility):
(AccessibilityController::enhancedAccessibilityEnabled):
* DumpRenderTree/mac/AccessibilityControllerMac.mm:
(AccessibilityController::enableEnhancedAccessibility):
(AccessibilityController::enhancedAccessibilityEnabled):
* DumpRenderTree/win/AccessibilityControllerWin.cpp:
(AccessibilityController::enableEnhancedAccessibility):
(AccessibilityController::enhancedAccessibilityEnabled):
* WebKitTestRunner/InjectedBundle/AccessibilityController.cpp:
(WTR::AccessibilityController::enableEnhancedAccessibility):
(WTR::AccessibilityController::enhancedAccessibilityEnabled):
* WebKitTestRunner/InjectedBundle/AccessibilityController.h:
* WebKitTestRunner/InjectedBundle/Bindings/AccessibilityController.idl:

LayoutTests:

Added test to ensure that initial selection gets set when enhanced accessibility is enabled and an arrow key is pressed.

* platform/mac/accessibility/selection-initial-expected.txt: Added.
* platform/mac/accessibility/selection-initial.html: Added.

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

5 years agoGet rid of Flush in SSA
fpizlo@apple.com [Wed, 19 Mar 2014 04:44:22 +0000 (04:44 +0000)]
Get rid of Flush in SSA
https://bugs.webkit.org/show_bug.cgi?id=130440

Reviewed by Sam Weinig.

This is basically a red patch. We used to use backwards flow for determining what was
flushed, until it became clear that this doesn't make sense. Now the Flush nodes don't
accomplish anything. Keeping them around in SSA can only make things hard.

* CMakeLists.txt:
* GNUmakefile.list.am:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
* JavaScriptCore.xcodeproj/project.pbxproj:
* dfg/DFGBasicBlock.cpp:
(JSC::DFG::BasicBlock::SSAData::SSAData):
* dfg/DFGBasicBlock.h:
* dfg/DFGFlushLivenessAnalysisPhase.cpp: Removed.
* dfg/DFGFlushLivenessAnalysisPhase.h: Removed.
* dfg/DFGGraph.cpp:
(JSC::DFG::Graph::dump):
* dfg/DFGPlan.cpp:
(JSC::DFG::Plan::compileInThreadImpl):
* dfg/DFGSSAConversionPhase.cpp:
(JSC::DFG::SSAConversionPhase::run):
* ftl/FTLLowerDFGToLLVM.cpp:
(JSC::FTL::LowerDFGToLLVM::compileNode):

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

5 years agoUnreviewed, add some contributors, and fix Nadav's entry (he's not really a reviewer
fpizlo@apple.com [Wed, 19 Mar 2014 03:07:27 +0000 (03:07 +0000)]
Unreviewed, add some contributors, and fix Nadav's entry (he's not really a reviewer
yet).

* Scripts/webkitpy/common/config/contributors.json:

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

5 years agoTextTrackRegion Not Implemented
bfulgham@apple.com [Wed, 19 Mar 2014 02:54:16 +0000 (02:54 +0000)]
TextTrackRegion Not Implemented
https://bugs.webkit.org/show_bug.cgi?id=116546

Reviewed by Eric Carlson.

Merged from Blink (patch by vcarbune@chromium.org):
https://chromium.googlesource.com/chromium/blink/+/4940f89a087fea5b5ea628e98d0b355d398a9eea
http://crbug.com/25798003

Source/WebCore:

Tests: media/track/regions-webvtt/text-track-region-display.html
       media/track/regions-webvtt/text-track-region-dom-layout.html

* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::parseAttribute):
* html/track/LoadableTextTrack.cpp:
(WebCore::LoadableTextTrack::newRegionsAvailable):
* html/track/TextTrack.cpp:
* html/track/TextTrack.h:
* html/track/TextTrackRegion.cpp:
(WebCore::TextTrackRegion::TextTrackRegion):
(WebCore::TextTrackRegion::appendTextTrackCueBox):
* html/track/TextTrackRegion.h:
* html/track/VTTCue.cpp:
(WebCore::VTTCue::VTTCue):
(WebCore::VTTCue::notifyRegionWhenRemovingDisplayTree):
(WebCore::VTTCue::removeDisplayTree):
* html/track/VTTCue.h:
* html/track/WebVTTParser.cpp:
(WebCore::WebVTTParser::parseBytes):
(WebCore::WebVTTParser::collectMetadataHeader):
* html/track/WebVTTParser.h:

LayoutTests:

* media/track/captions-webvtt/captions-regions.vtt: Added.
* media/track/regions-webvtt/text-track-cue-region-attribute-expected.txt: Rebaseline.
* media/track/regions-webvtt/text-track-region-display-expected.txt: Added.
* media/track/regions-webvtt/text-track-region-display.html: Added.
* media/track/regions-webvtt/text-track-region-dom-layout-expected.txt: Added.
* media/track/regions-webvtt/text-track-region-dom-layout.html: Added.
* media/track/regions-webvtt/text-track-region-list-expected.txt: Rebaseline.
* media/track/regions-webvtt/text-track-region-parser-expected.txt: Rebaseline.

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

5 years agoShare MemoryPressureHandler::releaseMemory() between platforms.
akling@apple.com [Wed, 19 Mar 2014 02:33:27 +0000 (02:33 +0000)]
Share MemoryPressureHandler::releaseMemory() between platforms.
<https://webkit.org/b/130416>

Move the code that scours WebKit for things we can free up right now
to the common part of MemoryPressureHandler. This will enable other
platforms to do the same thing under pressure.

There's now also a platformReleaseMemory() where platform-specific
pressure relief stuff can go.

Reviewed by Antti Koivisto.

* platform/MemoryPressureHandler.cpp:
(WebCore::MemoryPressureHandler::releaseMemory):
(WebCore::MemoryPressureHandler::platformReleaseMemory):
* platform/MemoryPressureHandler.h:
* platform/mac/MemoryPressureHandlerMac.mm:
(WebCore::MemoryPressureHandler::respondToMemoryPressure):
(WebCore::MemoryPressureHandler::platformReleaseMemory):

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

5 years ago[WebGL] Destroy EAGLContext's backing store
dino@apple.com [Wed, 19 Mar 2014 02:02:00 +0000 (02:02 +0000)]
[WebGL] Destroy EAGLContext's backing store
https://bugs.webkit.org/show_bug.cgi?id=130439
<rdar://problem/16295217>

Reviewed by Tim Horton.

When a GraphicsContext3D is being destroyed, we should
also remove any EAGLContext backing store.

* platform/graphics/mac/GraphicsContext3DMac.mm:
(WebCore::GraphicsContext3D::~GraphicsContext3D):

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

5 years ago[EFL][WK2] Rename async APIs for better consistency with EFL
ryuan.choi@samsung.com [Wed, 19 Mar 2014 01:57:35 +0000 (01:57 +0000)]
[EFL][WK2] Rename async APIs for better consistency with EFL
https://bugs.webkit.org/show_bug.cgi?id=130319

Reviewed by Gyuyoung Kim.

There are inconsistency with async keyword in several ewebkit2 APIs.
This patch rename them to {module/feature}_async_{verb} for better consistency with EFL.
In addition, added Async keyword into their callback name.

* UIProcess/API/efl/ewk_application_cache_manager.cpp:
(EwkApplicationCacheOriginsAsyncData::EwkApplicationCacheOriginsAsyncData):
(getApplicationCacheOriginsCallback):
(ewk_application_cache_manager_origins_async_get):
* UIProcess/API/efl/ewk_application_cache_manager.h:
* UIProcess/API/efl/ewk_cookie_manager.cpp:
(EwkCookiePolicyAsyncData::EwkCookiePolicyAsyncData):
(getAcceptPolicyCallback):
(ewk_cookie_manager_accept_policy_async_get):
(EwkCookieHostnamesAsyncData::EwkCookieHostnamesAsyncData):
(getHostnamesWithCookiesCallback):
(ewk_cookie_manager_hostnames_with_cookies_async_get):
* UIProcess/API/efl/ewk_cookie_manager.h:
* UIProcess/API/efl/ewk_database_manager.cpp:
(EwkDatabaseOriginsAsyncData::EwkDatabaseOriginsAsyncData):
(getDatabaseOriginsCallback):
(ewk_database_manager_origins_async_get):
* UIProcess/API/efl/ewk_database_manager.h:
* UIProcess/API/efl/ewk_storage_manager.cpp:
(EwkStorageOriginsAsyncData::EwkStorageOriginsAsyncData):
(getStorageOriginsCallback):
(ewk_storage_manager_origins_async_get):
* UIProcess/API/efl/ewk_storage_manager.h:
* UIProcess/API/efl/tests/test_ewk2_application_cache_manager.cpp:
(timerCallback):
* UIProcess/API/efl/tests/test_ewk2_cookie_manager.cpp:
(EWK2CookieManagerTest::getAcceptPolicy):
(EWK2CookieManagerTest::getHostnamesWithCookies):
* UIProcess/API/efl/tests/test_ewk2_database_manager.cpp:
(EWK2DatabaseManagerTest::timerCallback):
(TEST_F):
* UIProcess/API/efl/tests/test_ewk2_storage_manager.cpp:
(EWK2StorageManagerTest::timerCallback):
(TEST_F):

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

5 years ago[iOS][WebKit2] Mark layer contents as being opaque if they are
timothy_horton@apple.com [Wed, 19 Mar 2014 01:51:56 +0000 (01:51 +0000)]
[iOS][WebKit2] Mark layer contents as being opaque if they are
https://bugs.webkit.org/show_bug.cgi?id=130427
<rdar://problem/15540434>

Reviewed by Simon Fraser.

* Shared/mac/RemoteLayerBackingStore.h:
(WebKit::RemoteLayerBackingStore::isOpaque):
* Shared/mac/RemoteLayerBackingStore.mm:
(RemoteLayerBackingStore::RemoteLayerBackingStore):
(RemoteLayerBackingStore::ensureBackingStore):
(RemoteLayerBackingStore::encode):
(RemoteLayerBackingStore::decode):
(RemoteLayerBackingStore::display):
(RemoteLayerBackingStore::applyBackingStoreToLayer):
Move the code to set a RemoteLayerBackingStore as a CALayer's contents
from RemoteLayerTreePropertyApplier to RemoteLayerBackingStore (mostly
as a way to keep the USE(IOSURFACE) #ifs in one place).
Remove the surface() getter, because it's no longer needed, and make
image() private as it can be now (and rename it to createImageForFrontBuffer
for clarity's sake).

Add an isOpaque argument to ensureBackingStore, encode/decode it, and
add a getter. If isOpaque is true when applying backing store to the
CALayer on the UI process side, set CALayer.contentsOpaque to let CA know.

Make opaque bitmaps if not using accelerated drawing. For the IOSurface
case, we can't make opaque IOSurfaces, but telling CA that we have filled
the whole bitmap still enables similar optimizations.

* Shared/mac/RemoteLayerTreePropertyApplier.mm:
(WebKit::applyPropertiesToLayer):
Reset contentsOpaque if the layer loses its backing store.

* Shared/mac/RemoteLayerTreeTransaction.mm:
(WebKit::RemoteLayerTreeTextStream::operator<<):
(WebKit::dumpChangedLayers):
Add a bit more logging about RemoteLayerBackingStore's opaqueness
and acceleratedness.

* WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
(PlatformCALayerRemote::updateBackingStore):
(PlatformCALayerRemote::setOpaque):
Invalidate the RemoteLayerBackingStore if layer opaqueness changes.

* platform/graphics/GraphicsLayerClient.h:
(WebCore::GraphicsLayerClient::paintsOpaquelyAtNonIntegralScales):
* platform/graphics/ca/GraphicsLayerCA.cpp:
(WebCore::GraphicsLayerCA::updateContentsOpaque):
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::paintsOpaquelyAtNonIntegralScales):
* rendering/RenderLayerBacking.h:
r159463 stopped us from setting layers opaque if they were being painted
at non-integral scale. This makes sense for compositing layers, which
are painted by arbitrary elements, but the main frame's RenderView
will always paint its entire contents. To restore the opaque contents
optimization to the main frame's tiles, don't de-opaquify layers
belonging to the main frame's RenderView.

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

5 years agoUnify <media> element callback registration and unregistration
jpfau@apple.com [Wed, 19 Mar 2014 01:48:54 +0000 (01:48 +0000)]
Unify <media> element callback registration and unregistration
https://bugs.webkit.org/show_bug.cgi?id=130417

Reviewed by Eric Carlson.

* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::HTMLMediaElement):
(WebCore::HTMLMediaElement::~HTMLMediaElement):
(WebCore::HTMLMediaElement::registerWithDocument):
(WebCore::HTMLMediaElement::unregisterWithDocument):
(WebCore::HTMLMediaElement::didMoveToNewDocument):
* html/HTMLMediaElement.h:

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

5 years agoUnreviewed, fix iOS production build.
fpizlo@apple.com [Wed, 19 Mar 2014 01:36:17 +0000 (01:36 +0000)]
Unreviewed, fix iOS production build.

* JavaScriptCore.xcodeproj/project.pbxproj:

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

5 years agoMediaDocument should set a max-width on its <video> element.
jer.noble@apple.com [Wed, 19 Mar 2014 00:38:01 +0000 (00:38 +0000)]
MediaDocument should set a max-width on its <video> element.
https://bugs.webkit.org/show_bug.cgi?id=114691

Reviewed by Eric Carlson.

Set a style attribute containing max-width:100% and max-height:100% so that large videos
are entirely visible within the browser window bounds.

* html/MediaDocument.cpp:
(WebCore::MediaDocumentParser::createDocumentStructure):

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

5 years ago[WebRTC] Fix layering violation in RTCStatsRequest
thiago.lacerda@openbossa.org [Wed, 19 Mar 2014 00:28:29 +0000 (00:28 +0000)]
[WebRTC] Fix layering violation in RTCStatsRequest
https://bugs.webkit.org/show_bug.cgi?id=130426

Reviewed by Eric Carlson.

RTCStatsRequest::track() should return a MediaStreamTrackPrivate*.

No new tests needed.

* Modules/mediastream/RTCPeerConnection.cpp:
(WebCore::RTCPeerConnection::getStats):
* Modules/mediastream/RTCStatsRequestImpl.cpp:
(WebCore::RTCStatsRequestImpl::create):
(WebCore::RTCStatsRequestImpl::RTCStatsRequestImpl):
(WebCore::RTCStatsRequestImpl::track):
* Modules/mediastream/RTCStatsRequestImpl.h:
* platform/mediastream/RTCStatsRequest.h:

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

5 years agoAttempt to fix the Production build.
timothy@apple.com [Wed, 19 Mar 2014 00:01:41 +0000 (00:01 +0000)]
Attempt to fix the Production build.

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

5 years agoMake image controls menu work in WK2
beidson@apple.com [Tue, 18 Mar 2014 23:54:30 +0000 (23:54 +0000)]
Make image controls menu work in WK2
<rdar://problem/16294412> and https://bugs.webkit.org/show_bug.cgi?id=130424

Reviewed by Tim Horton.

* Platform/SharedMemory.h:
* Platform/mac/SharedMemoryMac.cpp:
(WebKit::SharedMemory::Handle::~Handle):
(WebKit::SharedMemory::Handle::clear):

* Platform/unix/SharedMemoryUnix.cpp:
(WebKit::SharedMemory::Handle::~Handle):
(WebKit::SharedMemory::Handle::clear):

* Shared/ContextMenuContextData.cpp:
(WebKit::ContextMenuContextData::ContextMenuContextData):
(WebKit::ContextMenuContextData::operator=):
(WebKit::ContextMenuContextData::encode):
(WebKit::ContextMenuContextData::decode):
* Shared/ContextMenuContextData.h:
(WebKit::ContextMenuContextData::controlledImageHandle):

* Shared/ShareableBitmap.cpp:
(WebKit::ShareableBitmap::Handle::clear):
* Shared/ShareableBitmap.h:
* UIProcess/WebContextMenuProxy.h:

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::internalShowContextMenu):
(WebKit::WebPageProxy::replaceControlledImage):
* UIProcess/WebPageProxy.h:

* UIProcess/efl/WebContextMenuProxyEfl.cpp:
(WebKit::WebContextMenuProxyEfl::showContextMenu):
* UIProcess/efl/WebContextMenuProxyEfl.h:

* UIProcess/gtk/WebContextMenuProxyGtk.cpp:
(WebKit::WebContextMenuProxyGtk::showContextMenu):
* UIProcess/gtk/WebContextMenuProxyGtk.h:

Add a sharing service context menu that lives side-by-side with the normal one:
* UIProcess/mac/WebContextMenuProxyMac.h:
* UIProcess/mac/WebContextMenuProxyMac.mm:
(+[WKSharingServicePickerDelegate sharedSharingServicePickerDelegate]):
(-[WKSharingServicePickerDelegate setMenuProxy:WebKit::]):
(-[WKSharingServicePickerDelegate setPicker:]):
(-[WKSharingServicePickerDelegate sharingServicePicker:delegateForSharingService:]):
(-[WKSharingServicePickerDelegate sharingService:willShareItems:]):
(-[WKSharingServicePickerDelegate sharingService:didShareItems:]):
(-[WKSharingServicePickerDelegate sharingService:sourceFrameOnScreenForShareItem:]):
(-[WKSharingServicePickerDelegate sharingService:transitionImageForShareItem:contentRect:]):
(-[WKSharingServicePickerDelegate sharingService:sourceWindowForShareItems:sharingContentScope:]):
(WebKit::WebContextMenuProxyMac::contextMenuItemSelected):
(WebKit::WebContextMenuProxyMac::setupImageServicesMenu):
(WebKit::WebContextMenuProxyMac::clearImageServicesMenu):
(WebKit::WebContextMenuProxyMac::populate):
(WebKit::WebContextMenuProxyMac::showContextMenu):
(WebKit::WebContextMenuProxyMac::window):
(WebKit::WebContextMenuProxyMac::replaceControlledImage):

* WebProcess/WebPage/WebContextMenu.cpp:
(WebKit::WebContextMenu::show):
(WebKit::WebContextMenu::replaceControlledImage):
* WebProcess/WebPage/WebContextMenu.h:

Teach the WebProcess how to accept the replaced image.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::replaceControlledImage):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:

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

5 years agoUpdate RegExp Tracing code
msaboff@apple.com [Tue, 18 Mar 2014 23:53:49 +0000 (23:53 +0000)]
Update RegExp Tracing code
https://bugs.webkit.org/show_bug.cgi?id=130381

Reviewed by Andreas Kling.

Updated the regular expression tracing code for 8/16 bit JIT as
well as match only entry points.  Also added average string length
metric.

* runtime/RegExp.cpp:
(JSC::RegExp::RegExp):
(JSC::RegExp::match):
(JSC::RegExp::printTraceData):
* runtime/RegExp.h:
* runtime/VM.cpp:
(JSC::VM::addRegExpToTrace):
(JSC::VM::dumpRegExpTrace):
* runtime/VM.h:
* yarr/YarrJIT.h:
(JSC::Yarr::YarrCodeBlock::get8BitMatchOnlyAddr):
(JSC::Yarr::YarrCodeBlock::get16BitMatchOnlyAddr):
(JSC::Yarr::YarrCodeBlock::get8BitMatchAddr):
(JSC::Yarr::YarrCodeBlock::get16BitMatchAddr):

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

5 years agoFix a trivial FIXME
andersca@apple.com [Tue, 18 Mar 2014 23:09:44 +0000 (23:09 +0000)]
Fix a trivial FIXME
https://bugs.webkit.org/show_bug.cgi?id=130432

Reviewed by Tim Horton.

* history/HistoryItem.cpp:
(WebCore::HistoryItem::encodeBackForwardTreeNode):

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