Unreviewed GTK build fix; include StringPrintStream to pull in toString().

* html/HTMLMediaElement.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@173337 268f45cc-cd09-0410-ab3c-d52691b4dbfc
bmalloc should honor the FastMalloc scavenging API
https://bugs.webkit.org/show_bug.cgi?id=136588

Reviewed by Andreas Kling.

* wtf/FastMalloc.cpp:
(WTF::releaseFastMallocFreeMemory):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@173338 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Add test after r173324

Rubber-stamped by Simon Fraser.

* storage/indexeddb/version-change-event-expected.txt: Added.
* storage/indexeddb/version-change-event.html: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@173339 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Remove PLATFORM(IOS) from WebCore/editing (Part 3).
https://bugs.webkit.org/show_bug.cgi?id=136474

Reviewed by Benjamin Poulain.

This patch removes the use of PLATFORM(IOS) from TextAffinity.h
and removes the assumption that EAffinity values match NSSelectionAffinity
values. It also removes the includes in TextAffinity.h, creating the need to
include explicitly the files when necessary. It also removes the unnecessary
use of platform specific types, replacing them with WebCore types.

Source/WebCore:

* editing/TextAffinity.h:
(kit): Deleted.
(core): Deleted.
* editing/cocoa/HTMLConverter.mm:
* page/mac/WebCoreFrameView.h:
* platform/ios/ScrollViewIOS.mm:
(WebCore::ScrollView::platformSetScrollPosition):
(WebCore::ScrollView::platformSetScrollOrigin):
* platform/ios/wak/WAKScrollView.mm:
(-[WAKScrollView setScrollOrigin:updatePositionAtAll:immediately:]):
(-[WAKScrollView scrollOrigin]):

Source/WebKit/mac:

* WebCoreSupport/WebEditorClient.h: Added kit and core for EAffinity.
* WebView/WebFrameView.mm:
(-[WebFrameView _scrollToBeginningOfDocument]):
(-[WebFrameView _scrollToEndOfDocument]):

Source/WebKit2:

* WebProcess/InjectedBundle/API/mac/WKDOMInternals.mm:
* WebProcess/WebPage/WKAccessibilityWebPageObjectIOS.mm:
(-[WKAccessibilityWebPageObject accessibilityHitTest:]):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@173340 268f45cc-cd09-0410-ab3c-d52691b4dbfc
<https://webkit.org/b/136586> Add bots to Apple build/test queues

Reviewed by Daniel Bates.

* BuildSlaveSupport/build.webkit.org-config/config.json:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@173341 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Build fix after r173340.

* WebCoreSupport/WebEditorClient.h:
(kit):
(core):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@173342 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed, skip tests for a feature that isn't supported

* platform/mac/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@173343 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Doing a navigation on a non-opaque WKWebView can result in an empty layer tree
https://bugs.webkit.org/show_bug.cgi?id=136590
<rdar://problem/18234000>

Reviewed by Simon Fraser.

* page/FrameView.cpp:
(WebCore::FrameView::setTransparent):
Avoid scheduling a compositing layer update if the RenderView isn't the
one associated with this FrameView. This can happen during a navigation,
before the new Document (and RenderView) is swapped in. This is particularly
bad in the case of setTransparent because it is called from Frame::createView,
which is right in the middle of that transition window. If we let the compositing
layer update go ahead, it can end up detaching the new Document's layer tree,
and we have no mechanism that would cause it to reattach.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@173344 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[iOS] Work around bug 136593 by disabling the PDFDocumentImage live resize optimization there
https://bugs.webkit.org/show_bug.cgi?id=136594
rdar://problem/17457013

Reviewed by Simon Fraser.

* platform/graphics/cg/PDFDocumentImage.cpp:
(WebCore::PDFDocumentImage::updateCachedImageIfNeeded):
Disable the optimization on iOS, because bug 136593 rears its head
most often on iOS because it is more common to have contexts that always
use low-quality image interpolation on that platform.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@173345 268f45cc-cd09-0410-ab3c-d52691b4dbfc
bmalloc should honor the FastMalloc statistics API
https://bugs.webkit.org/show_bug.cgi?id=136592

Reviewed by Gavin Barraclough.

Source/bmalloc:

We do this by tracking "size" and "capacity" in the VM heap.

The VM heap's "capacity" is all the VM we ever allocated.

The VM heap's "size" the subset of VM currently held onto by the
VM heap (and therefore not in use by the regular heap).

Somewhat ironically, reducing the process's memory footprint, increases
the size of the VM heap, since the VM heap holds the pages that are
purely virtual and not physical.

* bmalloc/Heap.cpp:
(bmalloc::Heap::size):
(bmalloc::Heap::capacity):
* bmalloc/Heap.h:
* bmalloc/VMHeap.cpp:
(bmalloc::VMHeap::VMHeap):
(bmalloc::VMHeap::allocateSmallChunk):
(bmalloc::VMHeap::allocateMediumChunk):
(bmalloc::VMHeap::allocateLargeChunk):
* bmalloc/VMHeap.h:
(bmalloc::VMHeap::size):
(bmalloc::VMHeap::capacity):
(bmalloc::VMHeap::allocateSmallPage):
(bmalloc::VMHeap::allocateMediumPage):
(bmalloc::VMHeap::allocateLargeRange):
(bmalloc::VMHeap::deallocateSmallPage):
(bmalloc::VMHeap::deallocateMediumPage):
(bmalloc::VMHeap::deallocateLargeRange):
* bmalloc/bmalloc.h:
(bmalloc::api::heapSize):
(bmalloc::api::heapCapacity):

Source/WTF:

* wtf/FastMalloc.cpp:
(WTF::fastMallocStatistics):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@173346 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Change this test not to use a percentage width, and to use a non-blurred
shadow to avoid different results on Retina display systems.

* platform/mac-wk2/tiled-drawing/scrolling/frames/fixed-inside-frame-expected.txt:
* platform/mac-wk2/tiled-drawing/scrolling/frames/fixed-inside-frame.html:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@173347 268f45cc-cd09-0410-ab3c-d52691b4dbfc
REGRESSION (r169407): Calls to RenderStyle::getRoundedBorderFor() in computeRoundedRectForBoxShape() still include RenderView pointer
<http://webkit.org/b/136591>
<rdar://problem/18143731>

Reviewed by Simon Fraser.

In r169407, the RenderView* argument was removed from
RenderStyle::getRoundedBorderFor().  This argument was not
removed from these calls in computeRoundedRectForBoxShape(), but
because getRoundedBorderFor() always returned a reference, and
because the default for the next argument was true, there was no
actual change in behavior from this bug.

No new tests since there is no change in behavior.

* rendering/shapes/BoxShape.cpp:
(WebCore::computeRoundedRectForBoxShape): Remove RenderView*
arguments from calls to getRoundedBorderFor().


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@173348 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Laying out a TextRun using an SVG font is O(n^2)
https://bugs.webkit.org/show_bug.cgi?id=136584

Reviewed by Andreas Kling.

PerformanceTests:

Time how long it takes to lay out and render some text using an SVG font.

* SVG/SVG-Text.html: Added.
* SVG/resources/graffiti.svg: Added.

Source/WebCore:

Caching the version of the run with normalized spaces leads to a 5x speedup on the
performance test this patch adds.

Note that SVGFontData::applySVGGlyphSelection() is still unnecesarrily O(n), so more
work can be done here. In particular, the call to collectGlyphsForString() can likely
be sped up.

No new correctness tests because there is no behavior change.
Performance Test: SVG/SVG-Text.html

* platform/graphics/Font.h:
(WebCore::Font::treatAsSpace): Make inline.
(WebCore::Font::treatAsZeroWidthSpace): Ditto.
(WebCore::Font::treatAsZeroWidthSpaceInComplexScript): Ditto.
* platform/graphics/SimpleFontData.h: Add String cache argument.
* platform/graphics/TextRun.h: Move member variables around for better packing.
(WebCore::TextRun::TextRun): Ditto.
* platform/graphics/WidthIterator.cpp: Add String cache argument.
(WebCore::WidthIterator::glyphDataForCharacter): Ditto.
(WebCore::WidthIterator::advanceInternal): Create String cache and pass it to
glyphDataForCharacter.
* platform/graphics/WidthIterator.h: Add String cache argument.
* rendering/svg/SVGTextRunRenderingContext.cpp: Ditto.
(WebCore::SVGTextRunRenderingContext::glyphDataForCharacter): Ditto.
* rendering/svg/SVGTextRunRenderingContext.h: Ditto.
* svg/SVGFontData.cpp:
(WebCore::SVGFontData::applySVGGlyphSelection): Call computeNormalizedSpaces
to consult with the cache.
(WebCore::computeNormalizedSpaces): Compute cached String value.
* svg/SVGFontData.h: Add String cache argument.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@173349 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Use WTFString::split(char) in more places
https://bugs.webkit.org/show_bug.cgi?id=136543

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2014-09-05
Reviewed by Sam Weinig.

Source/WebCore:

* inspector/InspectorDOMAgent.cpp:
(WebCore::InspectorDOMAgent::nodeForPath):
* mathml/MathMLMencloseElement.cpp:
(WebCore::MathMLMencloseElement::collectStyleForPresentationAttribute):
* page/PerformanceResourceTiming.cpp:
(WebCore::passesTimingAllowCheck):
* platform/graphics/opengl/Extensions3DOpenGLCommon.cpp:
(WebCore::Extensions3DOpenGLCommon::initializeAvailableExtensions):
* platform/graphics/opengl/GLPlatformContext.cpp:
(WebCore::parseExtensions):
* platform/gtk/PasteboardHelper.cpp:
(WebCore::PasteboardHelper::fillDataObjectFromDropData):
* platform/network/curl/CurlCacheEntry.cpp:
(WebCore::CurlCacheEntry::loadResponseHeaders):
* platform/network/curl/CurlCacheManager.cpp:
(WebCore::CurlCacheManager::loadIndex):

Source/WebKit2:

* Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm:
(WebKit::PluginVersion::parse):
* UIProcess/gtk/WebContextGtk.cpp:
(WebKit::initInspectorServer):
* WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
(WebKit::isTransparentSilverlightBackgroundValue):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@173350 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed, rolling out r173340 and r173342.
https://bugs.webkit.org/show_bug.cgi?id=136596

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

Reverted changesets:

"Remove PLATFORM(IOS) from WebCore/editing (Part 3)."
https://bugs.webkit.org/show_bug.cgi?id=136474
http://trac.webkit.org/changeset/173340

"Build fix after r173340."
http://trac.webkit.org/changeset/173342

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

Broke webgl/1.0.2/conformance/glsl/misc/shader-varying-
packing-restrictions.html (Requested by ap on #webkit).

Reverted changeset:

"Remove statically used varyings from packing restrictions
check."
https://bugs.webkit.org/show_bug.cgi?id=136585
http://trac.webkit.org/changeset/173335

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@173352 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed, EFL build fix when SHARED_CORE is on.

* TestWebKitAPI/PlatformEfl.cmake:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@173353 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[EFL] Drop evas object cursor support
https://bugs.webkit.org/show_bug.cgi?id=136324

Reviewed by Gyuyoung Kim.

Removed evas object cursor because there are some bugs.
ewebkit will only support ecore_x_cursor because ewebkit is available with X, now.

Source/WebCore:

* platform/efl/DefaultTheme/CMakeLists.txt: Removed cursor related code.
* platform/efl/DefaultTheme/default.edc: Ditto.
* platform/efl/DefaultTheme/widget/cursor/cursor.edc: Removed.
* platform/efl/EflScreenUtilities.cpp:
(WebCore::getEcoreCursor):
(WebCore::applyCursorFromEcoreX): Renamed applyFallbackCursor.
(WebCore::createCustomCursor): Added to make custom cursor.
(WebCore::applyFallbackCursor): Deleted.
* platform/efl/EflScreenUtilities.h:

Source/WebKit2:

* UIProcess/API/efl/EwkView.cpp:
(EwkViewEventHandler<EVAS_CALLBACK_MOUSE_IN>::handleEvent):
(EwkView::EwkView):
(EwkView::updateCursor): Simplifies not to use evas object cursor.
(EwkView::setCursor): Ditto.
* UIProcess/API/efl/EwkView.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@173354 268f45cc-cd09-0410-ab3c-d52691b4dbfc
HTMLElement.cpp does not compile with new clang
<http://webkit.org/b/136600>

Reviewed by Chris Fleizach.

Fixes the following static analyzer warning:

    Source/WebCore/html/HTMLElement.cpp:545:10: error: 'this' pointer cannot be null in well-defined C++ code; pointer may be assumed to always convert to true [-Werror,-Wundefined-bool-conversion]
        if (!this || !parentNode())
            ~^~~~

* html/HTMLElement.cpp:
(WebCore::HTMLElement::setOuterText): Remove "!this" check added
in r75738.  It would only cover up real bugs, and isn't even hit
in layout tests.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@173355 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Serialize ResourceResponses using WebKit types
https://bugs.webkit.org/show_bug.cgi?id=136545

Reviewed by Alexey Proskuryakov.

Source/WebCore:

Serialization is faster and we can mostly avoid having NSURLResponses in web process.

* WebCore.exp.in:
* platform/network/ResourceLoadTiming.h:
(WebCore::ResourceLoadTiming::encode):
(WebCore::ResourceLoadTiming::decode):
* platform/network/ResourceResponseBase.h:
(WebCore::ResourceResponseBase::encode):
(WebCore::ResourceResponseBase::decode):

    Serialize from the WebCore data instead of serializing NSURLResponse.

* platform/network/cf/ResourceResponseCFNet.cpp:
(WebCore::ResourceResponse::cfURLResponse):

    Synthesize CFURLResponse by creating NSURLResponse on Cocoa platforms so we don't need copy code.
    This has negligible performance impact, NSURLResponse is just a wrapper around CFURLResponse.

* platform/network/mac/ResourceResponseMac.mm:
(WebCore::ResourceResponse::nsURLResponse):
(WebCore::ResourceResponse::setCertificateChain):

    Avoid unnecessary NSURLRequest instantiation in debug builds.

Source/WebKit2:

Remove the WK2 serialization code for responses. It moves to the types itself in WebCore where it is
close to the data being serialized and less likely to get out of sync.

* Shared/WebCoreArgumentCoders.cpp:
(IPC::ArgumentCoder<ResourceResponse>::encode): Deleted.
(IPC::ArgumentCoder<ResourceResponse>::decode): Deleted.
* Shared/WebCoreArgumentCoders.h:
* Shared/mac/WebCoreArgumentCodersMac.mm:
(IPC::ArgumentCoder<ResourceResponse>::encodePlatformData): Deleted.
(IPC::ArgumentCoder<ResourceResponse>::decodePlatformData): Deleted.

LayoutTests:

Remove failure expectations for tests fixed by this patch.

http/tests/xmlhttprequest/web-apps/012.html
http/tests/xmlhttprequest/web-apps/013.html

* platform/mac-wk2/TestExpectations:



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