[iOS] Hook up screen.{availHeight, availWidth, height, width}
https://bugs.webkit.org/show_bug.cgi?id=131821
<rdar://problem/16413795>

Reviewed by Benjamin Poulain and Tim Horton.

Source/WebCore:
Implement support for screen.{availHeight, availWidth, height, width} in WebKit2 for iOS.

Additionally substitute "screenSize" for "viewporScreenSize" to make the code more understandable.

* WebCore.exp.in: Export symbol for WebCore System Interface function
_wkGetViewportAvailableScreenSize.
* dom/Document.cpp:
(WebCore::Document::processViewport): Modified to call Chrome::screenSize(); formerly it
called ChromeClient::viewportScreenSize().
* page/Chrome.cpp:
(WebCore::Chrome::screenSize): Added; turns around and calls ChromeClient::screenSize().
(WebCore::Chrome::availableScreenSize): Added; turns around and calls ChromeClient::availableScreenSize().
* page/Chrome.h:
* page/ChromeClient.h:
(WebCore::ChromeClient::screenSize): Renamed; formerly named viewportScreenSize.
(WebCore::ChromeClient::availableScreenSize): Added; default implementation, which
returns the size of Chrome::windowRect().
* page/ViewportConfiguration.cpp:
(WebCore::ViewportConfiguration::textDocumentParameters):
* platform/HostWindow.h: Added declarations for availableScreenSize() and screenSize()
so that a caller (e.g. WebCore::screenRect()) can query for such screen information using
only the HostWindow interface. That is, a caller doesn't need to know about ChromeClient.
* platform/ios/PlatformScreenIOS.mm:
(WebCore::screenRect): Modified to query HostWindow::screenSize() when computing the
screen rectangle in WebKit2 for iOS.
(WebCore::screenAvailableRect): Modified to query HostWindow::availableScreenSize()
when computing the available screen rectangle in WebKit2 for iOS.
* platform/ios/WebCoreSystemInterfaceIOS.mm:
* platform/mac/WebCoreSystemInterface.h:

Source/WebKit/ios:
Provide iOS-specific WebKit1 implementation for ChromeClient::availableScreenSize().

Additionally substitute "screenSize" for "viewporScreenSize" to make the code more understandable.

* WebCoreSupport/WebChromeClientIOS.h:
* WebCoreSupport/WebChromeClientIOS.mm:
(WebChromeClientIOS::screenSize): Renamed; formerly named viewportScreenSize.
(WebChromeClientIOS::availableScreenSize): Added; ASSERT_NOT_REACHED() as a widget
should consult it's associated WAKWindow for the available screen size.

Source/WebKit/mac:
Add declaration for WKGetViewportAvailableScreenSize() to return the available screen size.

Additionally substitute "ScreenSize" for "ViewportScreenSize" to make the code more understandable.

* WebCoreSupport/WebSystemInterface.mm:
(InitWebCoreSystemInterface):

Source/WebKit2:
Implement WebKit2-specific support infrastructure.

Additionally substitute "screenSize" for "viewporScreenSize" to make the code more understandable.

* Shared/WebPageCreationParameters.cpp:
(WebKit::WebPageCreationParameters::encode): Modified to encode the available screen size
creation parameter.
(WebKit::WebPageCreationParameters::decode): Modified to decode the available screen size
creation parameter.
* Shared/WebPageCreationParameters.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::creationParameters): Initialize the available screen size
parameter.
* UIProcess/WebPageProxy.h:
* UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::screenSize): Renamed; formerly named viewportScreenSize.
(WebKit::WebPageProxy::availableScreenSize): Added.
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::screenSize): Renamed; formerly named viewportScreenSize.
(WebKit::WebChromeClient::availableScreenSize): Added; turns around and calls WebPage::availableScreenSize().
* WebProcess/WebCoreSupport/WebChromeClient.h:
* WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
(InitWebCoreSystemInterface): Hook up WebKit System Interface function WKGetAvailableScreenSize.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage): Initialize available screen size instance variable.
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::screenSize):
(WebKit::WebPage::availableScreenSize):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@167481 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[GTK] YouCompleteMe doesn't work for cmake build system.
https://bugs.webkit.org/show_bug.cgi?id=131591

Reviewed by Martin Robinson.

Add cmake build system support for YouCompleteMe. It should work regardless of
using make or ninja. In addition, autotools related code is removed since it's
not used anymore in WebKit.

* Scripts/webkitdirs.pm:
(generateBuildSystemFromCMakeProject):
* gtk/ycm_extra_conf.py:
(transform_relative_paths_to_absolute_paths):
(FlagsForFile):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@167482 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed, rolling out r167478.
https://bugs.webkit.org/show_bug.cgi?id=131840

Broke multicol tests (Requested by ap on #webkit).

Reverted changeset:

"[New Multicolumn] Pagination mode messed up with non-inline
axis and reversed direction."
https://bugs.webkit.org/show_bug.cgi?id=131811
http://trac.webkit.org/changeset/167478

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@167483 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Remove NETWORK_INFO support
https://bugs.webkit.org/show_bug.cgi?id=131841

.:
Reviewed by Gyuyoung Kim.

* Source/cmake/OptionsEfl.cmake:
* Source/cmake/OptionsGTK.cmake:
* Source/cmake/WebKitFeatures.cmake:
* Source/cmakeconfig.h.cmake:

Source/WebCore:
Reviewed by Gyuyoung Kim.

* CMakeLists.txt:
* Modules/networkinfo/NavigatorNetworkInfoConnection.cpp: Removed.
* Modules/networkinfo/NavigatorNetworkInfoConnection.h: Removed.
* Modules/networkinfo/NavigatorNetworkInfoConnection.idl: Removed.
* Modules/networkinfo/NetworkInfo.cpp: Removed.
* Modules/networkinfo/NetworkInfo.h: Removed.
* Modules/networkinfo/NetworkInfoClient.h: Removed.
* Modules/networkinfo/NetworkInfoConnection.cpp: Removed.
* Modules/networkinfo/NetworkInfoConnection.h: Removed.
* Modules/networkinfo/NetworkInfoConnection.idl: Removed.
* Modules/networkinfo/NetworkInfoController.cpp: Removed.
* Modules/networkinfo/NetworkInfoController.h: Removed.
* PlatformEfl.cmake:
* dom/EventTargetFactory.in:
* platform/efl/NetworkInfoProviderEfl.cpp: Removed.
* platform/efl/NetworkInfoProviderEfl.h: Removed.
* testing/Internals.cpp:
(WebCore::Internals::setNetworkInformation): Deleted.
* testing/Internals.h:
* testing/Internals.idl:

Source/WebKit:
Reviewed by NOBODY (OOPS!).

* PlatformEfl.cmake:

Source/WebKit/efl:
Reviewed by Gyuyoung Kim.

* WebCoreSupport/NetworkInfoClientEfl.cpp: Removed.
* WebCoreSupport/NetworkInfoClientEfl.h: Removed.
* ewk/ewk_view.cpp:
(_ewk_view_priv_new):

Source/WebKit2:
Reviewed by Gyuyoung Kim.

* CMakeLists.txt:
* PlatformEfl.cmake:
* Shared/API/c/WKBase.h:
* Shared/APIObject.h:
* Shared/WebNetworkInfo.cpp: Removed.
* Shared/WebNetworkInfo.h: Removed.
* UIProcess/API/C/WKAPICast.h:
* UIProcess/API/C/WKContext.cpp:
(WKContextGetNetworkInfoManager): Deleted.
* UIProcess/API/C/WKContext.h:
* UIProcess/API/C/WKNetworkInfo.cpp: Removed.
* UIProcess/API/C/WKNetworkInfo.h: Removed.
* UIProcess/API/C/WKNetworkInfoManager.cpp: Removed.
* UIProcess/API/C/WKNetworkInfoManager.h: Removed.
* UIProcess/API/efl/ewk_context.cpp:
(EwkContext::EwkContext):
* UIProcess/API/efl/ewk_context_private.h:
* UIProcess/WebContext.cpp:
(WebKit::WebContext::WebContext):
* UIProcess/WebContext.h:
* UIProcess/WebNetworkInfoManagerProxy.cpp: Removed.
* UIProcess/WebNetworkInfoManagerProxy.h: Removed.
* UIProcess/WebNetworkInfoManagerProxy.messages.in: Removed.
* UIProcess/WebNetworkInfoProvider.cpp: Removed.
* UIProcess/WebNetworkInfoProvider.h: Removed.
* UIProcess/efl/NetworkInfoProvider.cpp: Removed.
* UIProcess/efl/NetworkInfoProvider.h: Removed.
* WebProcess/NetworkInfo/WebNetworkInfoManager.cpp: Removed.
* WebProcess/NetworkInfo/WebNetworkInfoManager.h: Removed.
* WebProcess/NetworkInfo/WebNetworkInfoManager.messages.in: Removed.
* WebProcess/WebCoreSupport/WebNetworkInfoClient.cpp: Removed.
* WebProcess/WebCoreSupport/WebNetworkInfoClient.h: Removed.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage):
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::WebProcess):

Source/WTF:
Reviewed by Gyuyoung Kim.

* wtf/FeatureDefines.h:

Tools:
Reviewed by Gyuyoung Kim.

* Scripts/webkitperl/FeatureList.pm:

LayoutTests:
Reviewed by Gyuyoung Kim.

* networkinformation/add-listener-from-callback-expected.txt: Removed.
* networkinformation/add-listener-from-callback.html: Removed.
* networkinformation/basic-all-types-of-events-expected.txt: Removed.
* networkinformation/basic-all-types-of-events.html: Removed.
* networkinformation/basic-operation-expected.txt: Removed.
* networkinformation/basic-operation.html: Removed.
* networkinformation/event-after-navigation-expected.txt: Removed.
* networkinformation/event-after-navigation.html: Removed.
* networkinformation/multiple-frames-expected.txt: Removed.
* networkinformation/multiple-frames.html: Removed.
* networkinformation/resources/event-after-navigation-new.html: Removed.
* networkinformation/script-tests/add-listener-from-callback.js: Removed.
* networkinformation/script-tests/basic-all-types-of-events.js: Removed.
* networkinformation/script-tests/basic-operation.js: Removed.
* networkinformation/script-tests/event-after-navigation.js: Removed.
* networkinformation/script-tests/multiple-frames.js: Removed.
* networkinformation/script-tests/updates.js: Removed.
* networkinformation/script-tests/window-property.js: Removed.
* networkinformation/updates-expected.txt: Removed.
* networkinformation/updates.html: Removed.
* networkinformation/window-property-expected.txt: Removed.
* networkinformation/window-property.html: Removed.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@167488 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[CSSRegions] Incorrect background paint on positioned element hover
https://bugs.webkit.org/show_bug.cgi?id=131617

Reviewed by Andrei Bucur.

Source/WebCore:
When computing the repaint rect for absolute elements flowed into regions, the Y location of the
region within the flow thread must no longer be added to the repaint rect's location because absolute
positioned elements get pushed down through the regions by their absolute top. So adding the region's
position in the flow thread and then adding the element's absolute top would cause us to add
something twice.

Tests: fast/regions/repaint/repaint-absolute-pushed-to-next-region.html

* rendering/RenderBox.cpp:
(WebCore::RenderBox::computeRectForRepaint):

LayoutTests:
Added test for the proper repainting of absolute positioned elements in regions when the
absolute top of the elements causes it to be pushed to the next region.

* fast/regions/repaint/repaint-absolute-pushed-to-next-region-expected.txt: Added.
* fast/regions/repaint/repaint-absolute-pushed-to-next-region.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@167489 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed. ARM64 buildfix after r167473.

* platform/audio/DenormalDisabler.h: Put back the MathExtras.h include.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@167490 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Mac] AttributedStringTest API tests fail with async text input
https://bugs.webkit.org/show_bug.cgi?id=131833

Reviewed by Enrica Casucci.

Don't run sync NSTextInputClient tests where we don't implement these calls.

* TestWebKitAPI/Tests/mac/AttributedString.mm:
(TestWebKitAPI::AttributedStringTest_CustomFont::didLoadURL):
(TestWebKitAPI::AttributedStringTest_CustomFont::runSyncTest):
(TestWebKitAPI::AttributedStringTest_Strikethrough::didLoadURL):
(TestWebKitAPI::AttributedStringTest_Strikethrough::runSyncTest):
(TestWebKitAPI::AttributedStringTest_CustomFont::runTest): Deleted.
(TestWebKitAPI::AttributedStringTest_Strikethrough::runTest): Deleted.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@167491 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[CSS Regions] Content overflowing a transformed region is clipped
https://bugs.webkit.org/show_bug.cgi?id=116833

Reviewed by Mihnea Ovidenie.

Added test for overflow of content in 3d transformed regions.

* fast/regions/overflow-3dtransformed-region-expected.txt: Added.
* fast/regions/overflow-3dtransformed-region.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@167492 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed. ARM64 buildfix after r167473.

Patch by Gabor Rapcsanyi <rgabor@webkit.org> on 2014-04-18

* platform/audio/DenormalDisabler.h: Put back the MathExtras.h include.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@167493 268f45cc-cd09-0410-ab3c-d52691b4dbfc
DownloadDecideDestinationCrash API test uses an incorrect value for path
https://bugs.webkit.org/show_bug.cgi?id=131845
<rdar://problem/15925560>

Reviewed by Enrica Casucci.

* TestWebKitAPI/Tests/WebKit2/DownloadDecideDestinationCrash.cpp:
(TestWebKitAPI::decideDestinationWithSuggestedFilename):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@167494 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Cocoa] Add a navigation delegate method corresponding to didFinishDocumentLoadForFrame for the main frame
https://bugs.webkit.org/show_bug.cgi?id=131847

Reviewed by Anders Carlsson.

* UIProcess/API/APILoaderClient.h:
(API::LoaderClient::didFinishDocumentLoadForFrame): Added a navigationID parameter.
* UIProcess/API/C/WKPage.cpp:
(WKPageSetPageLoaderClient): Updated for the above change in paramerers.
* UIProcess/API/Cocoa/WKNavigationDelegatePrivate.h: Declared new delegate method.
* UIProcess/Cocoa/NavigationState.h: Declare override of didFinishDocumentLoadForFrame.
* UIProcess/Cocoa/NavigationState.mm:
(WebKit::NavigationState::setNavigationDelegate): Initialize
webViewNavigationDidFinishDocumentLoad flag in the delegate methods struct.
(WebKit::NavigationState::LoaderClient::didFinishDocumentLoadForFrame): Added override
of the client function which calls the delegate.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::didFinishDocumentLoadForFrame): Get and pass the navigation ID to
the client.
* UIProcess/WebPageProxy.h: Added navigationID parameter.
* UIProcess/WebPageProxy.messages.in: Ditto.
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::dispatchDidFinishDocumentLoad): Get and send the navigation
ID to the UI process.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@167496 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Remove some includes from image-related headers, and Document.h
https://bugs.webkit.org/show_bug.cgi?id=131797

Reviewed by Martin Robinson.

Remove some #includes from Document.h, DragImage.h, GradientImage.h,
Image.h, and ImageBuffer.h and deal with the fallout.

* dom/ContainerNode.h:
* dom/Document.cpp:
(WebCore::Document::setInputCursor):
* dom/Document.h:
(WebCore::Document::inputCursor):
* dom/MutationObserverRegistration.cpp:
* html/canvas/WebGLRenderingContext.cpp:
* page/FrameSnapshotting.cpp:
* page/Page.cpp:
* platform/DragImage.h:
* platform/graphics/BitmapImage.cpp:
* platform/graphics/GradientImage.cpp:
(WebCore::GradientImage::GradientImage):
(WebCore::GradientImage::~GradientImage):
* platform/graphics/GradientImage.h:
* platform/graphics/Image.h:
* platform/graphics/ImageBuffer.cpp:
* platform/graphics/ImageBuffer.h:
(WebCore::ImageBuffer::create):
(WebCore::ImageBuffer::internalSize):
(WebCore::ImageBuffer::logicalSize):
(WebCore::ImageBuffer::baseTransform):
(WebCore::ImageBuffer::spaceSize):
(WebCore::ImageBuffer::setSpaceSize):
* rendering/RenderThemeMac.mm:
* rendering/shapes/Shape.cpp:
* rendering/svg/RenderSVGContainer.cpp:
* svg/SVGURIReference.h:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@167497 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Worse animation performance on pages with 3D transforms
https://bugs.webkit.org/show_bug.cgi?id=131838
<rdar://problem/16428630&15705876>

Reviewed by Dean Jackson.

Source/WebCore:
r155977 added logic to adjust the contentsScale of compositing layers
based on a root-relative transform. However, this resulted in
the contentsScale continually changing on layers whose transforms
are changed dynamically, which caused lots of expensive painting.

Fix by bucketing the part of the scale computed from the root-relative transform
into buckets of 0.25 via rounding.

Test: compositing/contents-scale/rounded-contents-scale.html

* platform/graphics/ca/GraphicsLayerCA.cpp:
(WebCore::clampedContentsScaleForScale):
(WebCore::GraphicsLayerCA::updateContentsOpaque):
(WebCore::GraphicsLayerCA::updateContentsScale):
(WebCore::GraphicsLayerCA::updateContentsVisibility): Deleted.
(WebCore::GraphicsLayerCA::animatedLayerClones): Deleted.

LayoutTests:
Testcase having layers at various z translates which shows the bucketing
of contentsScale, and fix results affected by the patch.

* compositing/contents-scale/rounded-contents-scale-expected.txt: Added.
* compositing/contents-scale/rounded-contents-scale.html: Added.
* compositing/contents-scale/z-translate-expected.txt:
* platform/mac-wk2/compositing/tiling/rotated-tiled-clamped-expected.txt:
* platform/mac-wk2/compositing/tiling/rotated-tiled-preserve3d-clamped-expected.txt:
* platform/mac/compositing/overflow/composited-scrolling-paint-phases-expected.txt:
* platform/mac/compositing/tiling/rotated-tiled-clamped-expected.txt:
* platform/mac/compositing/tiling/rotated-tiled-preserve3d-clamped-expected.txt:
* platform/mac/compositing/visible-rect/3d-transform-style-expected.txt:
* platform/mac/compositing/visible-rect/3d-transformed-expected.txt:
* platform/mac/compositing/visible-rect/nested-transform-expected.txt:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@167498 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Handle pluginOrigin being null
https://bugs.webkit.org/show_bug.cgi?id=131849
<rdar://problem/16655898>

Reviewed by Alexey Proskuryakov.

* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::shouldPlugInAutoStartFromOrigin):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@167499 268f45cc-cd09-0410-ab3c-d52691b4dbfc
http/tests/multipart/policy-ignore-crash.php erroneously depends on http stack quirks
https://bugs.webkit.org/show_bug.cgi?id=131853

Reviewed by Brady Eidson.

* http/tests/multipart/policy-ignore-crash.php: Produce a nice multipart response
with boundaries on their own lines.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@167500 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Deleting properties poisons objects
https://bugs.webkit.org/show_bug.cgi?id=131551

Reviewed by Geoffrey Garen.


Source/JavaScriptCore: 
This is ~3% progression on Dromaeo with a ~6% progression on the jslib portion of Dromaeo in particular.

* runtime/Structure.cpp:
(JSC::Structure::Structure):
(JSC::Structure::materializePropertyMap): We now re-use deleted properties when materializing the property map.
(JSC::Structure::removePropertyTransition): We allow up to 5 deletes for a particular path through the tree of 
Structure transitions. After that, we convert to an uncacheable dictionary like we used to. We don't cache 
delete transitions, but we allow transitioning from them.
(JSC::Structure::changePrototypeTransition):
(JSC::Structure::despecifyFunctionTransition):
(JSC::Structure::attributeChangeTransition):
(JSC::Structure::toDictionaryTransition):
(JSC::Structure::preventExtensionsTransition):
(JSC::Structure::addPropertyWithoutTransition):
(JSC::Structure::removePropertyWithoutTransition):
(JSC::Structure::pin): Now does only what it says it does--marks the property table as pinned.
(JSC::Structure::pinAndPreventTransitions): More descriptive version of what the old pin() was doing.
* runtime/Structure.h:
* runtime/StructureInlines.h:
(JSC::Structure::checkOffsetConsistency): Rearranged variables to be more sensible.

LayoutTests: 
New JS regress test. We're ~3.5x faster on this microbenchmark now.

* js/regress/delete-a-few-properties-then-get-by-id-expected.txt: Added.
* js/regress/delete-a-few-properties-then-get-by-id.html: Added.
* js/regress/script-tests/delete-a-few-properties-then-get-by-id.js: Added.
(MyObject):
(foo):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@167501 268f45cc-cd09-0410-ab3c-d52691b4dbfc
bmalloc: Added an XSmall line size
https://bugs.webkit.org/show_bug.cgi?id=131851

Reviewed by Sam Weinig.

Reduces malloc footprint on Membuster recordings by 10%.

This is a throughput regression, but we're still way ahead of TCMalloc.
I have some ideas for how to recover the regression -- but I wanted to
get this win in first.

Full set of benchmark results:

        bmalloc> ~/webkit/PerformanceTests/MallocBench/run-malloc-benchmarks --measure-heap nopatch:~/scratch/Build-nopatch/Release/ patch:~/webkit/WebKitBuild/Release/
                                                                                                
                                                       nopatch                      patch                                Δ
        Peak Memory:
            reddit_memory_warning                      7,896kB                    7,532kB                  ^ 1.05x smaller
            flickr_memory_warning                     12,968kB                   12,324kB                  ^ 1.05x smaller
            theverge_memory_warning                   16,672kB                   15,200kB                   ^ 1.1x smaller

            <geometric mean>                          11,952kB                   11,216kB                  ^ 1.07x smaller
            <arithmetic mean>                         12,512kB                   11,685kB                  ^ 1.07x smaller
            <harmonic mean>                           11,375kB                   10,726kB                  ^ 1.06x smaller

        Memory at End:
            reddit_memory_warning                      7,320kB                    6,856kB                  ^ 1.07x smaller
            flickr_memory_warning                     10,848kB                    9,692kB                  ^ 1.12x smaller
            theverge_memory_warning                   16,380kB                   14,872kB                   ^ 1.1x smaller

            <geometric mean>                          10,916kB                    9,961kB                   ^ 1.1x smaller
            <arithmetic mean>                         11,516kB                   10,473kB                   ^ 1.1x smaller
            <harmonic mean>                           10,350kB                    9,485kB                  ^ 1.09x smaller

        MallocBench> ~/webkit/PerformanceTests/MallocBench/run-malloc-benchmarks nopatch:~/scratch/Build-nopatch/Release/ patch:~/webkit/WebKitBuild/Release/
                                                                                                
                                           nopatch                patch                         Δ
        Execution Time:
            churn                            127ms                151ms            ! 1.19x slower
            list_allocate                    130ms                164ms            ! 1.26x slower
            tree_allocate                    109ms                127ms            ! 1.17x slower
            tree_churn                       115ms                120ms            ! 1.04x slower
            facebook                         240ms                259ms            ! 1.08x slower
            fragment                          91ms                131ms            ! 1.44x slower
            fragment_iterate                 105ms                106ms            ! 1.01x slower
            message_one                      260ms                259ms             ^ 1.0x faster
            message_many                     149ms                154ms            ! 1.03x slower
            medium                           194ms                248ms            ! 1.28x slower
            big                              157ms                160ms            ! 1.02x slower

            <geometric mean>                 144ms                163ms            ! 1.13x slower
            <arithmetic mean>                152ms                171ms            ! 1.12x slower
            <harmonic mean>                  137ms                156ms            ! 1.14x slower

        MallocBench> ~/webkit/PerformanceTests/MallocBench/run-malloc-benchmarks nopatch:~/scratch/Build-nopatch/Release/ patch:~/webkit/WebKitBuild/Release/
                                                                                                
                                                               nopatch                          patch                                     Δ
        Execution Time:
            churn                                                126ms                          148ms                        ! 1.17x slower
            churn --parallel                                      62ms                           76ms                        ! 1.23x slower
            list_allocate                                        130ms                          164ms                        ! 1.26x slower
            list_allocate --parallel                             120ms                          175ms                        ! 1.46x slower
            tree_allocate                                        111ms                          127ms                        ! 1.14x slower
            tree_allocate --parallel                              95ms                          135ms                        ! 1.42x slower
            tree_churn                                           115ms                          124ms                        ! 1.08x slower
            tree_churn --parallel                                107ms                          126ms                        ! 1.18x slower
            facebook                                             240ms                          276ms                        ! 1.15x slower
            facebook --parallel                                  802ms                        1,088ms                        ! 1.36x slower
            fragment                                              92ms                          130ms                        ! 1.41x slower
            fragment --parallel                                   66ms                          124ms                        ! 1.88x slower
            fragment_iterate                                     109ms                          127ms                        ! 1.17x slower
            fragment_iterate --parallel                           55ms                           64ms                        ! 1.16x slower
            message_one                                          260ms                          260ms                                      
            message_many                                         170ms                          238ms                         ! 1.4x slower
            medium                                               185ms                          250ms                        ! 1.35x slower
            medium --parallel                                    210ms                          334ms                        ! 1.59x slower
            big                                                  150ms                          169ms                        ! 1.13x slower
            big --parallel                                       138ms                          144ms                        ! 1.04x slower

            <geometric mean>                                     135ms                          170ms                        ! 1.26x slower
            <arithmetic mean>                                    167ms                          214ms                        ! 1.28x slower
            <harmonic mean>                                      117ms                          148ms                        ! 1.26x slower

        MallocBench> ~/webkit/PerformanceTests/MallocBench/run-malloc-benchmarks TC:~/scratch/Build-TCMalloc/Release/ patch:~/webkit/WebKitBuild/Release/

                                                            TC                      patch                                Δ
        Peak Memory:
            reddit_memory_warning                     13,836kB                   13,436kB                  ^ 1.03x smaller
            flickr_memory_warning                     24,868kB                   25,188kB                   ! 1.01x bigger
            theverge_memory_warning                   24,504kB                   26,636kB                   ! 1.09x bigger

            <geometric mean>                          20,353kB                   20,812kB                   ! 1.02x bigger
            <arithmetic mean>                         21,069kB                   21,753kB                   ! 1.03x bigger
            <harmonic mean>                           19,570kB                   19,780kB                   ! 1.01x bigger

        Memory at End:
            reddit_memory_warning                      8,656kB                   10,016kB                   ! 1.16x bigger
            flickr_memory_warning                     11,844kB                   13,784kB                   ! 1.16x bigger
            theverge_memory_warning                   18,516kB                   22,748kB                   ! 1.23x bigger

            <geometric mean>                          12,382kB                   14,644kB                   ! 1.18x bigger
            <arithmetic mean>                         13,005kB                   15,516kB                   ! 1.19x bigger
            <harmonic mean>                           11,813kB                   13,867kB                   ! 1.17x bigger

        MallocBench> ~/webkit/PerformanceTests/MallocBench/run-malloc-benchmarks TC:~/scratch/Build-TCMalloc/Release/ patch:~/webkit/WebKitBuild/Release/
                                                                                                
                                                TC                patch                         Δ
        Execution Time:
            churn                            416ms                148ms            ^ 2.81x faster
            list_allocate                    463ms                164ms            ^ 2.82x faster
            tree_allocate                    292ms                127ms             ^ 2.3x faster
            tree_churn                       157ms                120ms            ^ 1.31x faster
            facebook                         327ms                276ms            ^ 1.18x faster
            fragment                         335ms                129ms             ^ 2.6x faster
            fragment_iterate                 344ms                108ms            ^ 3.19x faster
            message_one                      386ms                258ms             ^ 1.5x faster
            message_many                     410ms                154ms            ^ 2.66x faster
            medium                           391ms                245ms             ^ 1.6x faster
            big                              261ms                167ms            ^ 1.56x faster

            <geometric mean>                 332ms                164ms            ^ 2.02x faster
            <arithmetic mean>                344ms                172ms            ^ 1.99x faster
            <harmonic mean>                  317ms                157ms            ^ 2.02x faster

* bmalloc.xcodeproj/project.pbxproj:
* bmalloc/Allocator.cpp:
(bmalloc::Allocator::Allocator): Don't assume that each allocator's
index corresponds with its size. Instead, use the size selection function
explicitly. Now that we have XSmall, some small allocator entries are
unused.

(bmalloc::Allocator::scavenge):
(bmalloc::Allocator::log):
(bmalloc::Allocator::processXSmallAllocatorLog):
(bmalloc::Allocator::allocateSlowCase):
* bmalloc/Allocator.h:
(bmalloc::Allocator::xSmallAllocatorFor):
(bmalloc::Allocator::allocateFastCase):
* bmalloc/Chunk.h:
* bmalloc/Deallocator.cpp:
(bmalloc::Deallocator::scavenge):
(bmalloc::Deallocator::processObjectLog):
(bmalloc::Deallocator::deallocateSlowCase):
(bmalloc::Deallocator::deallocateXSmallLine):
(bmalloc::Deallocator::allocateXSmallLine):
* bmalloc/Deallocator.h:
(bmalloc::Deallocator::deallocateFastCase):
* bmalloc/Heap.cpp:
(bmalloc::Heap::scavenge):
(bmalloc::Heap::scavengeXSmallPages):
(bmalloc::Heap::allocateXSmallLineSlowCase):
* bmalloc/Heap.h:
(bmalloc::Heap::deallocateXSmallLine):
(bmalloc::Heap::allocateXSmallLine):
* bmalloc/LargeChunk.h:
(bmalloc::LargeChunk::get):
(bmalloc::LargeChunk::endTag):
* bmalloc/Line.h:
* bmalloc/MediumAllocator.h:
(bmalloc::MediumAllocator::allocate):
(bmalloc::MediumAllocator::refill):
* bmalloc/ObjectType.cpp:
(bmalloc::objectType):
* bmalloc/ObjectType.h:
(bmalloc::isXSmall):
(bmalloc::isSmall):
(bmalloc::isMedium):
(bmalloc::isLarge):
(bmalloc::isSmallOrMedium): Deleted.
* bmalloc/SegregatedFreeList.h: I boiler-plate copied existing code for
handling small objects. There's probably a reasonable way to share this
code in the future -- I'll look into that once it's stopped changing.

* bmalloc/Sizes.h: Tweaked size classes to make Membuster happy. This
is the main reason things got slower.

* bmalloc/SmallAllocator.h:
(bmalloc::SmallAllocator::allocate):
* bmalloc/SmallTraits.h:
* bmalloc/VMHeap.cpp:
(bmalloc::VMHeap::allocateXSmallChunk):
* bmalloc/VMHeap.h:
(bmalloc::VMHeap::allocateXSmallPage):
(bmalloc::VMHeap::deallocateXSmallPage):
* bmalloc/XSmallAllocator.h: Added.
(bmalloc::XSmallAllocator::isNull):
(bmalloc::XSmallAllocator::canAllocate):
(bmalloc::XSmallAllocator::XSmallAllocator):
(bmalloc::XSmallAllocator::line):
(bmalloc::XSmallAllocator::allocate):
(bmalloc::XSmallAllocator::objectCount):
(bmalloc::XSmallAllocator::derefCount):
(bmalloc::XSmallAllocator::refill):
* bmalloc/XSmallChunk.h: Added.
* bmalloc/XSmallLine.h: Added.
* bmalloc/XSmallPage.h: Added.
* bmalloc/XSmallTraits.h: Added.
* bmalloc/bmalloc.h:
(bmalloc::api::realloc): Boiler-plate copy, as above.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@167502 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[iOS WK2] Make window.scroll() and window.scrollBy() work
https://bugs.webkit.org/show_bug.cgi?id=131848
<rdar://problem/16638319>

Reviewed by Beth Dakin.

The scrolling-related functions in DOMWindow were #ifdeffed for iOS
to use the hacky WK1-specific "actual scroll" functions, which do nothing
in WK2.

Fix by adding a scroll position wrapper (contentsScrollPosition) which does
the right thing on WK1 and WK2, and change almost all the places that used "actualScrollPosition"
to us it (with the exception of contentsScrollOffset() in MouseRelatedEvent.cpp, which has
confusing scaling behavior).

* dom/MouseRelatedEvent.cpp:
(WebCore::MouseRelatedEvent::MouseRelatedEvent):
* dom/TreeScope.cpp:
(WebCore::nodeFromPoint): Remove #ifdefs.
* html/HTMLBodyElement.cpp:
(WebCore::HTMLBodyElement::scrollLeft):
(WebCore::HTMLBodyElement::scrollTop):
* page/DOMWindow.cpp:
(WebCore::DOMWindow::scrollX):
(WebCore::DOMWindow::scrollY):
(WebCore::DOMWindow::scrollBy):
(WebCore::DOMWindow::scrollTo):
* platform/ScrollView.cpp:
(WebCore::ScrollView::contentsScrollPosition):
(WebCore::ScrollView::setContentsScrollPosition):
* platform/ScrollView.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@167503 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Forgot to check in this file with <http://trac.webkit.org/changeset/167500>.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@167504 268f45cc-cd09-0410-ab3c-d52691b4dbfc
MallocBench: removed the --measure-heap option
https://bugs.webkit.org/show_bug.cgi?id=131854

Reviewed by Sam Weinig.

As of <https://bugs.webkit.org/show_bug.cgi?id=131661>, measuring the
heap is fast, so there's no reason to disable it.

* MallocBench/MallocBench/Benchmark.cpp:
(Benchmark::Benchmark):
(Benchmark::run):
(Benchmark::printReport):
* MallocBench/MallocBench/Benchmark.h:
* MallocBench/MallocBench/CommandLine.cpp:
(CommandLine::printUsage):
* MallocBench/MallocBench/CommandLine.h:
(CommandLine::heapSize):
(CommandLine::measureHeap): Deleted.
* MallocBench/MallocBench/main.cpp:
(main):


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