Fix the Apple Windows build after <http://trac.webkit.org/changeset/160113>
(https://bugs.webkit.org/show_bug.cgi?id=125193)

* rendering/RenderThemeWin.cpp:
(WebCore::RenderThemeWin::paintMenuList): Substitute paintInfo for i.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160114 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Remove unneeded semicolons.
https://bugs.webkit.org/show_bug.cgi?id=125083.

Rubber-stamped by Filip Pizlo.

* debugger/Debugger.h:
(JSC::Debugger::detach):
(JSC::Debugger::sourceParsed):
(JSC::Debugger::exception):
(JSC::Debugger::atStatement):
(JSC::Debugger::callEvent):
(JSC::Debugger::returnEvent):
(JSC::Debugger::willExecuteProgram):
(JSC::Debugger::didExecuteProgram):
(JSC::Debugger::didReachBreakpoint):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160115 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Use ThreadingOnce class to encapsulate pthread_once functionality.
https://bugs.webkit.org/show_bug.cgi?id=125228

Patch by peavo@outlook.com <peavo@outlook.com> on 2013-12-04
Reviewed by Brent Fulgham.

* runtime/InitializeThreading.cpp:
(JSC::initializeThreading):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160116 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Replace USE(SECURITY_FRAMEWORK) with finer-grained defines
https://bugs.webkit.org/show_bug.cgi?id=125242

Reviewed by Sam Weinig.

Source/WebKit2: 

* Configurations/WebKit2.xcconfig: Removed “-framework Security” from the linker flags, now
that it’s included in the target’s Link Binary with Libraries build phase.
* NetworkProcess/NetworkProcess.cpp:
(WebKit::NetworkProcess::initializeConnection): Changed to use ENABLE(SEC_ITEM_SHIM).
* NetworkProcess/mac/NetworkProcessMac.mm:
(WebKit::NetworkProcess::platformInitializeNetworkProcess): Ditto.
* Shared/Authentication/AuthenticationManager.cpp: Changed to use HAVE(SEC_IDENTITY).
* Shared/Authentication/mac/AuthenticationManager.mac.mm: Ditto.
* Shared/cf/ArgumentCodersCF.cpp:
(CoreIPC::typeFromCFTypeRef): Removed use of USE(SECURITY_FRAMEWORK) since all CF platforms
use it. Added HAVE(SEC_KEYCHAIN) where needed.
(CoreIPC::encode): Ditto.
(CoreIPC::decode): Ditto.
* Shared/cf/ArgumentCodersCF.h: Ditto.
* Shared/mac/SecItemShim.cpp: Chanegd to use ENABLE(SEC_ITEM_SHIM).
* Shared/mac/SecItemShim.h: Ditto.
* Shared/mac/SecItemShim.messages.in: Ditto.
* UIProcess/Network/NetworkProcessProxy.cpp:
(WebKit::NetworkProcessProxy::connectionWillOpen): Ditto.
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::connectionWillOpen): Ditto.
* UIProcess/mac/SecItemShimProxy.cpp: Ditto.
* UIProcess/mac/SecItemShimProxy.h: Ditto,
* UIProcess/mac/SecItemShimProxy.messages.in: Ditto.
* WebKit2.xcodeproj/project.pbxproj: Link Security.framework unconditionally.
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::initializeConnection): Changed to use ENABLE(SEC_ITEM_SHIM).
* WebProcess/mac/WebProcessMac.mm:
(WebKit::WebProcess::platformInitializeProcess): Ditto.
* config.h: Defined ENABLE_SEC_ITEM_SHIM.

Source/WTF: 

* wtf/Platform.h: Removed definitions of WTF_USE_SECURITY_FRAMEWORK, and defined
HAVE_SEC_IDENTITY and HAVE_SEC_KEYCHAIN.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160117 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Win] Correct WebKit.make copy command to land resources in proper directory.
https://bugs.webkit.org/show_bug.cgi?id=125249

Reviewed by Tim Horton.

* WebKit.vcxproj/WebKit.make: Correct the copy command.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160118 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore: [WebGL] Support for texImage2D of type HALF_FLOAT_OES
https://bugs.webkit.org/show_bug.cgi?id=110936

Reviewed by Brent Fulgham.

Add support for the HALF_FLOAT_OES texture format from texImage2D
and texSubImage2D.

A lot of this patch comes from the original patch on the bug
by Nayan Kumar, and the Blink commit:
https://codereview.chromium.org/13842017

Tests: fast/canvas/webgl/oes-texture-half-float-with-canvas.html
       fast/canvas/webgl/oes-texture-half-float-with-image.html
       fast/canvas/webgl/oes-texture-half-float-with-video.html

* html/canvas/OESTextureHalfFloat.idl: New HALF_FLOAT_OES constant value.
* html/canvas/WebGLRenderingContext.cpp:
(WebCore::WebGLRenderingContext::validateTexFunc): Remove the code that
would bail if half-float values were used.
* platform/graphics/GraphicsContext3D.cpp:
- Return appropriate DataFormats for half floating point types.
- Copy the float -> half-float code from Blink
- New pack functions for half floats
* platform/graphics/GraphicsContext3D.h: New format types.
* platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
(WebCore::GraphicsContext3D::texSubImage2D): Use GL_HALF_FLOAT_ARB if we're passed
a HALF_FLOAT_OES.

LayoutTests: [WebGL] Support for texImage2D/texSubImage2D of type HALF_FLOAT_OES
https://bugs.webkit.org/show_bug.cgi?id=110936

Reviewed by Brent Fulgham.

New tests for half-float textures.

* fast/canvas/webgl/oes-texture-half-float-expected.txt:
* fast/canvas/webgl/oes-texture-half-float-not-supported-expected.txt: Removed.
* fast/canvas/webgl/oes-texture-half-float-not-supported.html: Removed.
* fast/canvas/webgl/oes-texture-half-float-with-canvas-expected.txt: Added.
* fast/canvas/webgl/oes-texture-half-float-with-canvas.html: Added.
* fast/canvas/webgl/oes-texture-half-float-with-image-expected.txt: Added.
* fast/canvas/webgl/oes-texture-half-float-with-image.html: Added.
* fast/canvas/webgl/oes-texture-half-float-with-video-expected.txt: Added.
* fast/canvas/webgl/oes-texture-half-float-with-video.html: Added.
* fast/canvas/webgl/oes-texture-half-float.html:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160119 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Allow ImageBuffer to use an IOSurface that is larger than necessary
https://bugs.webkit.org/show_bug.cgi?id=124626

Patch by Myles C. Maxfield <mmaxfield@apple.com> on 2013-12-04
Reviewed by Simon Fraser.

Source/WebCore:

Because creating ImageBuffer's backing store can be so expensive, it
would be beneficial to have a pool of pre-created backing stores
available. However, this means that ImageBuffer might have to use a
backing store that is larger than the exact dimensions that it needs.
This patch adds a field, m_backingStoreSize, to CG's ImageBufferData
class, and uses this new field when performing ImageBuffer operations
to allow for larger-than-necessary backing stores. Content is always
drawn in the top left corner of the backing store.

No new tests are necessary because there is no behavior change.

* platform/graphics/ImageBuffer.h:
(WebCore::ImageBuffer::baseTransform): The base transform has to put
content at the top left corner instead of bottom left
* platform/graphics/cg/ImageBufferCG.cpp:
(WebCore::createCroppedImageIfNecessary): Convenience function to figure out
the dimensions of the backing texture in user space
(WebCore::ImageBuffer::ImageBuffer): Set up new m_backingStoreSize member
(WebCore::maybeCropToBounds): Some ImageBuffer API functions require
outputting an image with logical size. This function performs the cropping
(WebCore::ImageBuffer::copyImage): Updated for larger-than-necessary
backing stores
(WebCore::ImageBuffer::copyNativeImage): Ditto
(WebCore::ImageBuffer::draw): Ditto
(WebCore::ImageBuffer::clip): Ditto
(WebCore::ImageBuffer::putByteArray): Ditto
(WebCore::ImageBuffer::toDataURL): Ditto
* platform/graphics/cg/ImageBufferDataCG.cpp:
(WebCore::ImageBufferData::getData): Ditto
(WebCore::ImageBufferData::putData): Ditto
* platform/graphics/cg/ImageBufferDataCG.h: New m_backingStoreSize field

LayoutTests:

Update tests to be more robust with respect to accelerated vs
non-accelerated ImageBuffers.

* fast/canvas/script-tests/canvas-fillPath-shadow.js: Don't sample a canvas at exactly
the corner of a drawn shape (because the corner might be antialiased). Instead, sample
a single pixel inside the shape
* fast/canvas/script-tests/canvas-scale-shadowBlur.js: Don't sample a canvas at exactly
the edge of the blur radius. Instead, sample a single pixel past the blur radius.
* fast/canvas/script-tests/canvas-scale-strokePath-shadow.js:
(shouldBeAround): Allow this test to be less strict when sampling inside a blurred region
* platform/mac/fast/canvas/canvas-scale-shadowBlur-expected.txt: Matching update w/r/t
canvas-scale-shadowBlur.js

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160121 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Mac] When NSError user info is missing NSErrorPeerCertificateChainKey, ArgumentCoder should extract it from NSURLErrorFailingURLPeerTrustErrorKey
https://bugs.webkit.org/show_bug.cgi?id=125251

Reviewed by Anders Carlsson.

* Shared/mac/WebCoreArgumentCodersMac.mm:
(CoreIPC::::encodePlatformData): If the user info doesn’t include
NSURLErrorFailingURLPeerTrustErrorKey, copy the peer certificate chain from the peer trust
under NSURLErrorFailingURLPeerTrustErrorKey. On the decoding side, it will appear under the
NSURLErrorFailingURLPeerTrustErrorKey, because a trust object can’t be fully serialized.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160122 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Fixed the 32-bit Mac build.

* Shared/mac/WebCoreArgumentCodersMac.mm:
(CoreIPC::::encodePlatformData):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160123 268f45cc-cd09-0410-ab3c-d52691b4dbfc
check-webkit-style detected some ternary statements as initialization lists
https://bugs.webkit.org/show_bug.cgi?id=125246

Patch by Myles C. Maxfield <mmaxfield@apple.com> on 2013-12-04
Reviewed by Dean Jackson.

The regular expression that check-webkit-tests uses to detect initialization
lists was too broad, resulting in false positives. This patch makes the
regex more specific

* Scripts/webkitpy/style/checkers/cpp.py:
(check_member_initialization_list):
* Scripts/webkitpy/style/checkers/cpp_unittest.py:
(WebKitStyleTest.test_member_initialization_list):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160124 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[GTK][WK2] Fix build after r160104
https://bugs.webkit.org/show_bug.cgi?id=125240

Patch by Nick Diego Yamane <nick.yamane@openbossa.org> on 2013-12-04
Reviewed by Anders Carlsson.

Using specific version of API client when instantiating them.
Applied that same change to the following files:

* UIProcess/API/gtk/WebKitContextMenuClient.cpp:
* UIProcess/API/gtk/WebKitCookieManager.cpp:
* UIProcess/API/gtk/WebKitDownloadClient.cpp:
* UIProcess/API/gtk/WebKitFaviconDatabase.cpp:
* UIProcess/API/gtk/WebKitFindController.cpp:
* UIProcess/API/gtk/WebKitFormClient.cpp:
* UIProcess/API/gtk/WebKitGeolocationProvider.cpp:
* UIProcess/API/gtk/WebKitInjectedBundleClient.cpp:
* UIProcess/API/gtk/WebKitLoaderClient.cpp:
* UIProcess/API/gtk/WebKitPolicyClient.cpp:
* UIProcess/API/gtk/WebKitUIClient.cpp:
* WebProcess/InjectedBundle/API/gtk/WebKitWebExtension.cpp:
* WebProcess/InjectedBundle/API/gtk/WebKitWebPage.cpp:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160125 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[CSS Shapes] Remove explicit numbering from BasicShape::Type and CSSBasicShape::Type enums
https://bugs.webkit.org/show_bug.cgi?id=125163

Reviewed by Rob Buis.

I don't see any reason to have explicit numbering for the Type enum in our [CSS]BasicShape classes.
I removed numbering, which will decrease for instance the merge conflicts on Type changes.

No new tests, no behavior change.

* css/CSSBasicShapes.h:
* rendering/style/BasicShapes.h:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160126 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: [CSS Shapes] Support raster shape visualizations
https://bugs.webkit.org/show_bug.cgi?id=124080

Reviewed by Joseph Pecoraro.

Source/WebCore:

Create an inspector visualization for a shape created from an image.
The visualization takes each line of the image, combining where possible.

Test added to inspector-protocol/model/highlight-shape-outside.html

* rendering/shapes/RasterShape.cpp:
(WebCore::RasterShapeIntervals::buildBoundsPath): Create a path representing the
RasterShapeIntervals.
* rendering/shapes/RasterShape.h:

LayoutTests:

Add a test for data sent to the inspector for a raster shape.

* inspector-protocol/model/highlight-shape-outside-expected.txt:
* inspector-protocol/model/highlight-shape-outside.html:


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