WebKit-https.git
6 years ago[GTK] invalid application of 'sizeof' to incomplete type
commit-queue@webkit.org [Sat, 2 Nov 2013 10:10:36 +0000 (10:10 +0000)]
[GTK] invalid application of 'sizeof' to incomplete type
https://bugs.webkit.org/show_bug.cgi?id=123502

Patch by Vitaly Katunin <vkatunin@luxoft.com> on 2013-11-02
Reviewed by Carlos Garcia Campos.

* Shared/WebCoreArgumentCoders.cpp:

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

6 years agoAdd WebCrypto AES-CBC
ap@apple.com [Sat, 2 Nov 2013 06:59:40 +0000 (06:59 +0000)]
Add WebCrypto AES-CBC
https://bugs.webkit.org/show_bug.cgi?id=123647

Reviewed by Anders Carlsson.

Source/WebCore:

Tests: crypto/subtle/aes-cbc-192-encrypt-decrypt.html
       crypto/subtle/aes-cbc-256-encrypt-decrypt.html
       crypto/subtle/aes-cbc-encrypt-decrypt-with-padding.html
       crypto/subtle/aes-cbc-encrypt-decrypt.html
       crypto/subtle/aes-cbc-invalid-length.html
       crypto/subtle/aes-cbc-wrong-key-class.html

* WebCore.xcodeproj/project.pbxproj: Added new files.
* bindings/js/JSCryptoAlgorithmDictionary.cpp:
(WebCore::getProperty): Factored out a function to get a property as JSValue.
(WebCore::getHashAlgorithm): Use it.
(WebCore::createAesCbcParams): Added converter for AesCbcParams.
(WebCore::JSCryptoAlgorithmDictionary::createParametersForEncrypt): Support AES_CBC.
(WebCore::JSCryptoAlgorithmDictionary::createParametersForDecrypt): Ditto.
(WebCore::JSCryptoAlgorithmDictionary::createParametersForImportKey): Support all
algorithms, all the new ones just have trivial dictionaries.
(WebCore::JSCryptoAlgorithmDictionary::createParametersForExportKey): Ditto.

* bindings/js/JSCryptoOperationData.cpp: Added.
(WebCore::sequenceOfCryptoOperationDataFromJSValue):
(WebCore::cryptoOperationDataFromJSValue):
* bindings/js/JSCryptoOperationData.h: Added.
Moved CryptoOperationData bindings out of JSSubtleCryptoCustom.cpp, so that we
could use them in JSCryptoAlgorithmDictionary.cpp.

* bindings/js/JSDOMPromise.h: (WebCore::PromiseWrapper::reject): Added a specialization
to reject with null result. The spec doesn't actually say how algorithms fail.

* bindings/js/JSSubtleCryptoCustom.cpp:
(WebCore::JSSubtleCrypto::encrypt): Added.
(WebCore::JSSubtleCrypto::decrypt): Ditto.
(WebCore::JSSubtleCrypto::sign): Style fix.

* crypto/CryptoAlgorithmAesCbcParams.h: Added.

* crypto/CryptoKey.h:
(WebCore::CryptoKeyClass):
* crypto/keys/CryptoKeyHMAC.h:
(WebCore::asCryptoKeyHMAC):
Added poor man's RTTI, so that we can safely upcast Keys passed fro JavaScript code.

* crypto/CryptoKeyAES.cpp: Added.
(WebCore::CryptoKeyAES::CryptoKeyAES):
(WebCore::CryptoKeyAES::~CryptoKeyAES):
(WebCore::CryptoKeyAES::buildAlgorithmDescription):
* crypto/CryptoKeyAES.h: Added.
(WebCore::asCryptoKeyAES):
AES keys are the same for all algorithms, but they still need to remember the algorithm.

* crypto/SubtleCrypto.idl: Added encrypt/decrypt.

* crypto/algorithms/CryptoAlgorithmAES_CBC.cpp: Added.
(WebCore::CryptoAlgorithmAES_CBC::CryptoAlgorithmAES_CBC):
(WebCore::CryptoAlgorithmAES_CBC::~CryptoAlgorithmAES_CBC):
(WebCore::CryptoAlgorithmAES_CBC::create):
(WebCore::CryptoAlgorithmAES_CBC::identifier):
(WebCore::CryptoAlgorithmAES_CBC::importKey):
(WebCore::CryptoAlgorithmAES_CBC::exportKey):
* crypto/algorithms/CryptoAlgorithmAES_CBC.h: Added.
* crypto/mac/CryptoAlgorithmAES_CBCMac.cpp: Added.
(WebCore::transformAES_CBC):
(WebCore::CryptoAlgorithmAES_CBC::encrypt):
(WebCore::CryptoAlgorithmAES_CBC::decrypt):
(WebCore::CryptoAlgorithmAES_CBC::generateKey):
Added.

* crypto/mac/CryptoAlgorithmHMACMac.cpp:
(WebCore::CryptoAlgorithmHMAC::sign):
(WebCore::CryptoAlgorithmHMAC::verify):
Check key class before casting it to CryptoKeyHMAC.

* crypto/mac/CryptoAlgorithmRegistryMac.cpp:
(WebCore::CryptoAlgorithmRegistry::platformRegisterAlgorithms): Register AES-CBC
on Mac, so that it can be used.

Source/WTF:

* wtf/FixedArray.h: (WTF::FixedArray::data): Added a const version of the function.

* wtf/Vector.h: Added a comment to Vector constructor about how it is different
from std::vector.

LayoutTests:

Part of aes-cbc-encrypt-decrypt.html test was taken from Blink.

* crypto/subtle/aes-cbc-192-encrypt-decrypt-expected.txt: Added.
* crypto/subtle/aes-cbc-192-encrypt-decrypt.html: Added.
* crypto/subtle/aes-cbc-256-encrypt-decrypt-expected.txt: Added.
* crypto/subtle/aes-cbc-256-encrypt-decrypt.html: Added.
* crypto/subtle/aes-cbc-encrypt-decrypt-expected.txt: Added.
* crypto/subtle/aes-cbc-encrypt-decrypt-with-padding-expected.txt: Added.
* crypto/subtle/aes-cbc-encrypt-decrypt-with-padding.html: Added.
* crypto/subtle/aes-cbc-encrypt-decrypt.html: Added.
* crypto/subtle/aes-cbc-invalid-length-expected.txt: Added.
* crypto/subtle/aes-cbc-invalid-length.html: Added.
* crypto/subtle/aes-cbc-wrong-key-class-expected.txt: Added.
* crypto/subtle/aes-cbc-wrong-key-class.html: Added.

* crypto/subtle/hmac-sign-verify-expected.txt:
* crypto/subtle/hmac-sign-verify.html:
Corrected a description.

* crypto/subtle/resources/common.js: (hexToArrayBuffer): Added a helper.

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

6 years agoSVGRenderStyle accessors should return references.
akling@apple.com [Sat, 2 Nov 2013 05:01:08 +0000 (05:01 +0000)]
SVGRenderStyle accessors should return references.
<https://webkit.org/b/123656>

RenderStyle::svgStyle() and accessSVGStyle() never return null,
so make them return references instead.

This flushed out a myriad of pointless null checks and assertions.

Reviewed by Anders Carlsson.

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

6 years agoUpdate layout test results after CSS calc() simplification
ljaehun.lim@samsung.com [Sat, 2 Nov 2013 02:28:41 +0000 (02:28 +0000)]
Update layout test results after CSS calc() simplification
https://bugs.webkit.org/show_bug.cgi?id=123654

Reviewed by Andreas Kling.

r156586 simplified CSS calc expressions.
Update layout test results for calc().

* fast/css3-text/css3-text-indent/getComputedStyle/getComputedStyle-text-indent-expected.txt:
* fast/css3-text/css3-text-indent/getComputedStyle/script-tests/getComputedStyle-text-indent.js:
(valueSettingTest):
* platform/efl/TestExpectations: gardening

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

6 years agoFTL should use a simple optimization pipeline by default
fpizlo@apple.com [Sat, 2 Nov 2013 02:24:51 +0000 (02:24 +0000)]
FTL should use a simple optimization pipeline by default
https://bugs.webkit.org/show_bug.cgi?id=123638

Reviewed by Geoffrey Garen.

20% speed-up on imagine-gaussian-blur, when combined with --ftlUsesStackmaps=true.

* ftl/FTLCompile.cpp:
(JSC::FTL::compile):
* runtime/Options.h:

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

6 years agoRemote Layer Tree: Crashes allocating incredibly large backing store for tiled backin...
timothy_horton@apple.com [Sat, 2 Nov 2013 02:23:00 +0000 (02:23 +0000)]
Remote Layer Tree: Crashes allocating incredibly large backing store for tiled backing layers
https://bugs.webkit.org/show_bug.cgi?id=123651

Reviewed by Simon Fraser.

* Shared/mac/RemoteLayerBackingStore.mm:
(RemoteLayerBackingStore::display):
(RemoteLayerBackingStore::drawInContext):
We can't dirty the whole layer if we have no existing front buffer if
we have no paints, because that will lead to layers which were never
setNeedsDisplay()'d getting backing store. Added back an assertion
that will catch this, too.

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

6 years agoRemoving MediaStreamTrackVector and MediaStreamSourceVector typedefs
commit-queue@webkit.org [Sat, 2 Nov 2013 02:13:19 +0000 (02:13 +0000)]
Removing MediaStreamTrackVector and MediaStreamSourceVector typedefs
https://bugs.webkit.org/show_bug.cgi?id=123648

Patch by Thiago de Barros Lacerda <thiago.lacerda@openbossa.org> on 2013-11-01
Reviewed by Eric Carlson.

Source/WebCore:

No new tests needed.

* Modules/mediastream/MediaStream.cpp:
(WebCore::MediaStream::create):
(WebCore::MediaStream::clone):
(WebCore::MediaStream::cloneMediaStreamTrackVector):
(WebCore::MediaStream::addTrack):
(WebCore::MediaStream::removeTrack):
(WebCore::MediaStream::haveTrackWithSource):
(WebCore::MediaStream::getTrackById):
(WebCore::MediaStream::trackVectorForType):
* Modules/mediastream/MediaStream.h:
* Modules/mediastream/MediaStreamTrack.h:
* Modules/mediastream/UserMediaRequest.cpp:
(WebCore::UserMediaRequest::callSuccessHandler):
* Modules/webaudio/AudioContext.cpp:
(WebCore::AudioContext::createMediaStreamSource):
* Modules/webaudio/MediaStreamAudioDestinationNode.cpp:
(WebCore::MediaStreamAudioDestinationNode::MediaStreamAudioDestinationNode):
* platform/mediastream/MediaStreamDescriptor.cpp:
(WebCore::MediaStreamDescriptor::create):
(WebCore::MediaStreamDescriptor::MediaStreamDescriptor):
* platform/mediastream/MediaStreamDescriptor.h:
* platform/mediastream/MediaStreamSource.h:

Source/WebKit/blackberry:

* WebCoreSupport/UserMediaClientImpl.cpp:
(WebCore::toMediaStreamDescriptor):
(WebCore::UserMediaClientImpl::requestUserMedia):
* WebCoreSupport/UserMediaClientImpl.h:

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

6 years agoUnreviewed extended attempt at Windows build fix after r158471.
joepeck@webkit.org [Sat, 2 Nov 2013 02:09:04 +0000 (02:09 +0000)]
Unreviewed extended attempt at Windows build fix after r158471.

* wtf/text/cf/AtomicStringCF.cpp:
* wtf/text/cf/StringCF.cpp:
* wtf/text/cf/StringImplCF.cpp:

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

6 years agocreateFontFaceValue() should be smarter about overgrown cache.
akling@apple.com [Sat, 2 Nov 2013 01:53:22 +0000 (01:53 +0000)]
createFontFaceValue() should be smarter about overgrown cache.
<https://webkit.org/b/123643>

Instead of clearing the whole font-face value cache when it passes
128 entries, just delete one entry at random.

Reviewed by Geoffrey Garen.

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

6 years agoFixing mac code to use new MediaStreamDescriptor create method
commit-queue@webkit.org [Sat, 2 Nov 2013 01:51:00 +0000 (01:51 +0000)]
Fixing mac code to use new MediaStreamDescriptor create method
https://bugs.webkit.org/show_bug.cgi?id=123653

Patch by Thiago de Barros Lacerda <thiago.lacerda@openbossa.org> on 2013-11-01
Reviewed by Eric Carlson.

No new tests needed.

* platform/mediastream/mac/MediaStreamCenterMac.cpp:
(WebCore::MediaStreamCenterMac::createMediaStream):

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

6 years agoRe-use existing RenderStyle local in textWidth().
akling@apple.com [Sat, 2 Nov 2013 01:50:17 +0000 (01:50 +0000)]
Re-use existing RenderStyle local in textWidth().
<https://webkit.org/b/123392>

We already have the RenderStyle cached in a local here, so avoid
getting it from RenderText since that has to go via the parent.

Reviewed by Antti Koivisto.

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

6 years agoUnreviewed attempt at Windows build fix after r158471.
joepeck@webkit.org [Sat, 2 Nov 2013 01:49:26 +0000 (01:49 +0000)]
Unreviewed attempt at Windows build fix after r158471.

* wtf/text/cf/AtomicStringCF.cpp:
* wtf/text/cf/StringCF.cpp:
* wtf/text/cf/StringImplCF.cpp:

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

6 years agoMake more StringImpl construction helpers return PassRef.
akling@apple.com [Sat, 2 Nov 2013 01:45:10 +0000 (01:45 +0000)]
Make more StringImpl construction helpers return PassRef.
<https://webkit.org/b/123652>

Tweak another handful of StringImpl constructor functions to return
PassRef<StringImpl> instead of PassRefPtr.

Reviewed by Anders Carlsson.

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

6 years agoNeuter WTF_MAKE_FAST_ALLOCATED in GLOBAL_FASTMALLOC_NEW builds.
akling@apple.com [Sat, 2 Nov 2013 01:38:01 +0000 (01:38 +0000)]
Neuter WTF_MAKE_FAST_ALLOCATED in GLOBAL_FASTMALLOC_NEW builds.
<https://webkit.org/b/123639>

Source/JavaScriptCore:

JSC::ParserArenaRefCounted really needed to have the new/delete
operators overridden, in order for JSC::ScopeNode to be able to
choose that "operator new" out of the two it inherits.

Reviewed by Anders Carlsson.

Source/WebCore:

WebCore::TimerBase really needed to have the new/delete operators
overridden, in order for WebCore::SuspendableTimer to be able to
choose that "operator new" out of the two it inherits.

Reviewed by Anders Carlsson.

Source/WTF:

When building with GLOBAL_FASTMALLOC_NEW, we don't need to expand
operator new/delete overrides in every class.

This change makes allocations group up nicely in Instruments,
instead of being split between "WTF::fastMalloc" and "operator new"
depending on whether the class had WTF_MAKE_FAST_ALLOCATED.

Reviewed by Anders Carlsson.

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

6 years agoCSSCanvasValue construction helper should return PassRef.
akling@apple.com [Sat, 2 Nov 2013 01:23:53 +0000 (01:23 +0000)]
CSSCanvasValue construction helper should return PassRef.
<https://webkit.org/b/123650>

Return PassRef instead of PassRefPtr from functions that return
ownership-passing pointers that are known to be non-null.

Reviewed by Anders Carlsson.

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

6 years agoMove CF/Mac WTF String implementations down into WTF
commit-queue@webkit.org [Sat, 2 Nov 2013 01:22:42 +0000 (01:22 +0000)]
Move CF/Mac WTF String implementations down into WTF
https://bugs.webkit.org/show_bug.cgi?id=123635

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2013-11-01
Reviewed by Sam Weinig.

Source/WebCore:

* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:

Source/WTF:

* WTF.vcxproj/WTF.vcxproj:
* WTF.vcxproj/WTF.vcxproj.filters:
* WTF.xcodeproj/project.pbxproj:
* wtf/text/AtomicString.h:
* wtf/text/StringImpl.h:
* wtf/text/WTFString.h:
* wtf/text/cf/AtomicStringCF.cpp: Renamed from Source/WebCore/platform/text/cf/AtomicStringCF.cpp.
(WTF::AtomicString::add):
* wtf/text/cf/StringCF.cpp: Renamed from Source/WebCore/platform/text/cf/StringCF.cpp.
(WTF::String::String):
(WTF::String::createCFString):
* wtf/text/cf/StringImplCF.cpp: Renamed from Source/WebCore/platform/text/cf/StringImplCF.cpp.
(garbageCollectionEnabled):
(WTF::StringWrapperCFAllocator::retain):
(WTF::StringWrapperCFAllocator::release):
(WTF::StringWrapperCFAllocator::copyDescription):
(WTF::StringWrapperCFAllocator::allocate):
(WTF::StringWrapperCFAllocator::reallocate):
(WTF::StringWrapperCFAllocator::deallocateOnMainThread):
(WTF::StringWrapperCFAllocator::deallocate):
(WTF::StringWrapperCFAllocator::preferredSize):
(WTF::StringWrapperCFAllocator::create):
(WTF::StringWrapperCFAllocator::allocator):
(WTF::StringImpl::createCFString):
* wtf/text/mac/StringImplMac.mm: Renamed from Source/WebCore/platform/text/mac/StringImplMac.mm.
(WTF::StringImpl::operator NSString *):
* wtf/text/mac/StringMac.mm: Renamed from Source/WebCore/platform/text/mac/StringMac.mm.
(WTF::String::String):

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

6 years agoRemoving unnecessary early returns in addTrack, removeTrack and removeRemoteSource...
commit-queue@webkit.org [Sat, 2 Nov 2013 01:20:50 +0000 (01:20 +0000)]
Removing unnecessary early returns in addTrack, removeTrack and removeRemoteSource methods
https://bugs.webkit.org/show_bug.cgi?id=123644

Patch by Thiago de Barros Lacerda <thiago.lacerda@openbossa.org> on 2013-11-01
Reviewed by Eric Carlson.

No new tests needed.

* Modules/mediastream/MediaStream.cpp:
(WebCore::MediaStream::addTrack):
(WebCore::MediaStream::removeTrack):
(WebCore::MediaStream::removeRemoteSource):
(WebCore::MediaStream::trackVectorForType):
* Modules/mediastream/MediaStream.h:

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

6 years agoCSSAspectRatioValue construction helper should return PassRef.
akling@apple.com [Sat, 2 Nov 2013 01:03:21 +0000 (01:03 +0000)]
CSSAspectRatioValue construction helper should return PassRef.
<https://webkit.org/b/123645>

Return PassRef instead of PassRefPtr from functions that return
ownership-passing pointers that are known to be non-null.

Reviewed by Darin Adler.

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

6 years agoInitial implementation of text-decoration-skip ink
commit-queue@webkit.org [Fri, 1 Nov 2013 23:46:54 +0000 (23:46 +0000)]
Initial implementation of text-decoration-skip ink
https://bugs.webkit.org/show_bug.cgi?id=121806

Patch by Myles C. Maxfield <mmaxfield@apple.com> on 2013-11-01
Reviewed by Darin Adler.

Source/WebCore:

text-decoration-skip: ink is implemented by the following steps:
1. Before drawing any decorations, figure out the bounding box for the decorations that will be drawn
2. Create an ImageBuffer with these dimensions
3. Draw text into this ImageBuffer with a thicker stroke
4. Apply the ImageBuffer as a mask to the context
5. Draw decorations like normal
6. Clean up

Test: fast/css3-text/css3-text-decoration/text-decoration-skip/text-decoration-skip-ink.html

* platform/graphics/cg/GraphicsContextCG.cpp:
(WebCore::computeLineBoundsAndAntialiasingModeForText): Don't call GraphicsContext::roundToDevicePixels
when painting is disabled
* rendering/InlineTextBox.cpp:
(WebCore::InlineTextBox::paint): Pass the TextPainter to paintDecoration
(WebCore::computeUnderlineOffset): Small cleanup
(WebCore::getWavyStrokeControlPointDistance): Pulling out of strokeWavyTextDecoration()
(WebCore::getWavyStrokeStep): Ditto
(WebCore::strokeWavyTextDecoration): Use the previous 2 functions
(WebCore::getSingleDecorationBoundingBox): Pulling out repeated code into a function
(WebCore::getDecorationBoundingBox): Compute the bounding box for an underline which
hasn't been drawn yet
(WebCore::InlineTextBox::paintDecoration): Construct a mask and apply it to the GraphicsContext
* rendering/InlineTextBox.h: paintDecoration needs the TextPainter
* rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::changeRequiresRepaintIfTextOrBorderOrOutline): Redraw the underline when
text-decoration-skip changes

LayoutTests:

Adding a test which draws a very large "p" with text-decoration-skip:ink. The
viewport is restricted to be just hugging the place where an underline would
intersect the descender of the "p". This should look the same as if there was
no underline at all (because of the skipping underline).

* fast/css3-text/css3-text-decoration/text-decoration-skip/text-decoration-skip-ink-expected.html: Added.
* fast/css3-text/css3-text-decoration/text-decoration-skip/text-decoration-skip-ink.html: Added.

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

6 years ago[CSS Shapes] Fix typo in simple-polygon.js LayoutTest helper
hmuller@adobe.com [Fri, 1 Nov 2013 23:38:54 +0000 (23:38 +0000)]
[CSS Shapes] Fix typo in simple-polygon.js LayoutTest helper
https://bugs.webkit.org/show_bug.cgi?id=123595

Reviewed by Darin Adler.

* fast/shapes/resources/simple-polygon.js:
(generatePolygonContentString): Fixed a typo: the lineHeight parameter generatePolygonContentString() is now lineHeight.

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

6 years agoCSS 'initial' and 'inherit' value constructors should return PassRef.
akling@apple.com [Fri, 1 Nov 2013 23:34:47 +0000 (23:34 +0000)]
CSS 'initial' and 'inherit' value constructors should return PassRef.
<https://webkit.org/b/123641>

Make the helpers involved in constructing CSS{Initial,Inherited}Value
all return PassRef instead of PassRefPtr. This avoids generating
pointless null checks at the call sites.

Reviewed by Darin Adler.

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

6 years agoRemote Layer Tree: Move RemoteLayerBackingStore to Shared/
timothy_horton@apple.com [Fri, 1 Nov 2013 23:24:49 +0000 (23:24 +0000)]
Remote Layer Tree: Move RemoteLayerBackingStore to Shared/
https://bugs.webkit.org/show_bug.cgi?id=123646

Reviewed by Darin Adler.

Move RemoteLayerBackingStore to Shared/, since it is
used on both the UI and Web process side of things.

* Shared/mac/RemoteLayerBackingStore.h: Renamed from Source/WebKit2/WebProcess/WebPage/mac/RemoteLayerBackingStore.h.
* Shared/mac/RemoteLayerBackingStore.mm: Renamed from Source/WebKit2/WebProcess/WebPage/mac/RemoteLayerBackingStore.mm.
* WebKit2.xcodeproj/project.pbxproj:

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

6 years agoKill RenderArena.
akling@apple.com [Fri, 1 Nov 2013 22:22:28 +0000 (22:22 +0000)]
Kill RenderArena.
<https://webkit.org/b/123634>

There are no remaining users of the RenderArena allocator.

Reviewed by Geoffrey Garen.

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

6 years ago[Cocoa] WKObject seems to be initializing its target in a thread-safe manner, but...
mitz@apple.com [Fri, 1 Nov 2013 22:14:38 +0000 (22:14 +0000)]
[Cocoa] WKObject seems to be initializing its target in a thread-safe manner, but really is not
https://bugs.webkit.org/show_bug.cgi?id=123640

Reviewed by Darin Adler.

* Shared/Cocoa/WKObject.mm:
(initializeTargetIfNeeded): Removed misleading incorrect code.

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

6 years agoOSR exit profiling should be robust against all code being cleared
fpizlo@apple.com [Fri, 1 Nov 2013 22:10:52 +0000 (22:10 +0000)]
OSR exit profiling should be robust against all code being cleared
https://bugs.webkit.org/show_bug.cgi?id=123629
<rdar://problem/15365476>

Reviewed by Michael Saboff.

The problem here is two-fold:

1) A watchpoint (i.e. ProfiledCodeBlockJettisoningWatchpoint) may be fired after we
have cleared the CodeBlock for all or some Executables.  This means that doing
codeBlock->baselineVersion() would either crash or return a bogus CodeBlock, since
there wasn't a baseline code block reachable from the Executable anymore.  The
solution is that we shouldn't be asking for the baseline code block reachable from
the owning executable (what baselineVersion did), but instead we should be asking
for the baseline version reachable from the code block being watchpointed (basically
what CodeBlock::alternative() did).

2) If dealing with inlined code, baselienCodeBlockForOriginAndBaselineCodeBlock()
may return null, for the same reason as above - we might have cleared the baseline
codeblock for the executable that was inlined.  The solution is to just not do
profiling if there isn't a baseline code block anymore.

* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::baselineAlternative):
(JSC::CodeBlock::baselineVersion):
(JSC::CodeBlock::jettison):
* bytecode/CodeBlock.h:
* bytecode/CodeBlockJettisoningWatchpoint.cpp:
(JSC::CodeBlockJettisoningWatchpoint::fireInternal):
* bytecode/ProfiledCodeBlockJettisoningWatchpoint.cpp:
(JSC::ProfiledCodeBlockJettisoningWatchpoint::fireInternal):
* dfg/DFGOSRExitBase.cpp:
(JSC::DFG::OSRExitBase::considerAddingAsFrequentExitSiteSlow):
* jit/AssemblyHelpers.h:
(JSC::AssemblyHelpers::AssemblyHelpers):
* runtime/Executable.cpp:
(JSC::FunctionExecutable::baselineCodeBlockFor):

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

6 years agoTeach check-for-webkit-framework-include-consistency to ignore stale iOS Private...
aestes@apple.com [Fri, 1 Nov 2013 21:29:45 +0000 (21:29 +0000)]
Teach check-for-webkit-framework-include-consistency to ignore stale iOS Private headers that might exist in build directories due to r158443
https://bugs.webkit.org/show_bug.cgi?id=123636

Reviewed by Andreas Kling.

* Scripts/check-for-webkit-framework-include-consistency:

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

6 years ago[WK2] Create a unique identifier for WebPageGroup if the input name is empty
benjamin@webkit.org [Fri, 1 Nov 2013 21:28:38 +0000 (21:28 +0000)]
[WK2] Create a unique identifier for WebPageGroup if the input name is empty
https://bugs.webkit.org/show_bug.cgi?id=123606

Reviewed by Andreas Kling.

Strengthen the "public" API of page group.
If someone uses WKBrowsingContextGroup with a nil or empty string, the related WKString
would be empty, and all the WKBrowsingContextGroup end up with the same identifier.

* UIProcess/WebPageGroup.cpp:
(WebKit::WebPageGroup::WebPageGroup):

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

6 years ago[Cocoa] Avoid some double-wrapping of strings and URLs
mitz@apple.com [Fri, 1 Nov 2013 21:26:50 +0000 (21:26 +0000)]
[Cocoa] Avoid some double-wrapping of strings and URLs
https://bugs.webkit.org/show_bug.cgi?id=123632

Reviewed by Anders Carlsson.

* Shared/API/c/cf/WKStringCF.cpp: Removed.
* Shared/API/c/cf/WKStringCF.mm: Copied from Source/WebKit2/Shared/API/c/cf/WKStringCF.cpp.
(wkNSStringClass): Added this helper.
(WKStringCreateWithCFString): If the passed-in CFString is already wrapping a WebString,
then retain it and return it.
* Shared/API/c/cf/WKURLCF.cpp: Removed.
* Shared/API/c/cf/WKURLCF.mm: Copied from Source/WebKit2/Shared/API/c/cf/WKURLCF.cpp.
(wkNSURLClass): Added this helper.
(WKURLCreateWithCFURL): If the passed-in CFURL is already wrapping a WebURL, then retain it
and return it.
* WebKit2.xcodeproj/project.pbxproj: Updated for renames.

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

6 years agoAX: Regression: media controls are no longer accessible
commit-queue@webkit.org [Fri, 1 Nov 2013 21:23:51 +0000 (21:23 +0000)]
AX: Regression: media controls are no longer accessible
https://bugs.webkit.org/show_bug.cgi?id=121990

Patch by James Craig <jcraig@apple.com> on 2013-11-01
Reviewed by Jer Noble.

Source/WebCore:

Updated existing test coverage.
Added ARIA roles, attrs, and labels to the new media controls shadow DOM.
Localization will be handled in http://webkit.org/b/120956

* Modules/mediacontrols/mediaControlsApple.js:
(Controller.prototype.UIString):
(Controller.prototype.createControls):
(Controller.prototype.handleLoadStart):
(Controller.prototype.handleError):
(Controller.prototype.handleAbort):
(Controller.prototype.handleSuspend):
(Controller.prototype.handleStalled):
(Controller.prototype.handleWaiting):
(Controller.prototype.handleFullscreenChange):
(Controller.prototype.handleMuteButtonClicked):
(Controller.prototype.handleMinButtonClicked):
(Controller.prototype.handleMaxButtonClicked):
(Controller.prototype.handleVolumeSliderChange):
(Controller.prototype.updatePlaying):

LayoutTests:

Removed failure expectation and updated expected render dump output.

* platform/mac/TestExpectations:
* platform/mac/accessibility/media-element-expected.txt:

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

6 years ago[iOS] Make some headers Private
aestes@apple.com [Fri, 1 Nov 2013 21:06:46 +0000 (21:06 +0000)]
[iOS] Make some headers Private
https://bugs.webkit.org/show_bug.cgi?id=123626

Reviewed by Andreas Kling.

Source/WebKit:

* WebKit.xcodeproj/project.pbxproj:

Source/WebKit/mac:

* Configurations/WebKit.xcconfig: Exclude iOS Private headers from the Mac build.

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

6 years agoTake BidiRuns out of the arena.
akling@apple.com [Fri, 1 Nov 2013 21:04:06 +0000 (21:04 +0000)]
Take BidiRuns out of the arena.
<https://webkit.org/b/123630>

Stop arena-allocating BidiRun objects and use regular new/delete.

With this, there are no remaining clients of RenderArena.
It will be removed in a subsequent patch.

Reviewed by Anders Carlsson.

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

6 years agoBegin work on encoding argument types
andersca@apple.com [Fri, 1 Nov 2013 21:00:13 +0000 (21:00 +0000)]
Begin work on encoding argument types
https://bugs.webkit.org/show_bug.cgi?id=123631

Reviewed by Dan Bernstein.

Source/WebKit2:

* Shared/API/Cocoa/WKRemoteObjectCoder.mm:
(-[WKRemoteObjectEncoder _encodeInvocation:forKey:]):
Encode argument types in an array.

(-[WKRemoteObjectEncoder _encodedObjectUsingBlock:]):
Add new helper method that encodes an object and returns the dictionary.

(-[WKRemoteObjectEncoder _encodeObjectForKey:usingBlock:]):
Implement this in terms of _encodedObjectUsingBlock:.

* Shared/MutableArray.cpp:
(WebKit::MutableArray::append):
* Shared/MutableArray.h:
Change append to take a PassRefPtr.

Tools:

Add another test method.

* TestWebKitAPI/Tests/WebKit2ObjC/WKRemoteObjectRegistry.mm:
* TestWebKitAPI/Tests/mac/WKRemoteObjectRegistry_Shared.h:

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

6 years agoRename InWindowState -> ViewState
barraclough@apple.com [Fri, 1 Nov 2013 20:42:25 +0000 (20:42 +0000)]
Rename InWindowState -> ViewState
https://bugs.webkit.org/show_bug.cgi?id=123584

Rubber stamped by Sam Weinig.

WebPageProxy::setViewState offers the option to wait for a reply. Previously this option
was only available via setIsInWindow, hence the mechanism to wait to the update has
'InWindowState' in method and variable names (i.e.
'WebPageProxy::waitForDidUpdateInWindowState'). Since the mechanism is now applicable to
all ViewState changes, rename to reflect this.

* UIProcess/API/mac/WKView.mm:
(-[WKView endDeferringViewInWindowChangesSync]):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::WebPageProxy):
(WebKit::WebPageProxy::waitForDidUpdateViewState):
(WebKit::WebPageProxy::resetStateAfterProcessExited):
* UIProcess/WebPageProxy.h:
(WebKit::WebPageProxy::didUpdateViewState):
* UIProcess/WebPageProxy.messages.in:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage):
(WebKit::WebPage::didUpdateViewStateTimerFired):
(WebKit::WebPage::setViewState):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::didUpdateViewStateTimerFired):

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

6 years agoExpose setApplicationCacheOriginQuota via window.internals
commit-queue@webkit.org [Fri, 1 Nov 2013 20:15:27 +0000 (20:15 +0000)]
Expose setApplicationCacheOriginQuota via window.internals
https://bugs.webkit.org/show_bug.cgi?id=87838

Patch by Afonso R. Costa Jr. <afonso.costa@samsung.com> on 2013-11-01
Reviewed by Joseph Pecoraro.

Source/WebCore:

Also reset the default origin quota in resetToConsistentState().

* testing/Internals.cpp: Add setApplicationCacheOriginQuota.
(WebCore::Internals::resetToConsistentState): Reset the default origin
quota.
(WebCore::Internals::setApplicationCacheOriginQuota): Added.
* testing/Internals.h: Add setApplicationCacheOriginQuota.
* testing/Internals.idl: Ditto.

Source/WebKit:

* WebKit.vcxproj/WebKitExportGenerator/WebKitExports.def.in: Add
symbols for setApplicationCacheOriginQuota from Internals.

Tools:

* DumpRenderTree/TestRunner.cpp: Move setApplicationCacheOriginQuota
to window.internals
(TestRunner::staticFunctions):
* DumpRenderTree/TestRunner.h: Ditto.
* DumpRenderTree/blackberry/TestRunnerBlackBerry.cpp: Remove setApplicationCacheOriginQuota.
* DumpRenderTree/efl/TestRunnerEfl.cpp: Ditto.
* DumpRenderTree/gtk/TestRunnerGtk.cpp: Ditto.
* DumpRenderTree/mac/TestRunnerMac.mm: Ditto.
* DumpRenderTree/win/TestRunnerWin.cpp: Ditto.
* WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl: Ditto.
* WebKitTestRunner/InjectedBundle/TestRunner.cpp: Ditto.
* WebKitTestRunner/InjectedBundle/TestRunner.h: Ditto.

LayoutTests:

* http/tests/appcache/origin-quota-continued-download-multiple-manifests.html: Updated
to use setApplicationCacheOriginQuota from window.internals
* http/tests/appcache/origin-quota-continued-download.html: Ditto.
* http/tests/appcache/origin-quota.html: Ditto.

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

6 years agoRemote Layer Tree: Vend layer contents via IOSurfaces
timothy_horton@apple.com [Fri, 1 Nov 2013 19:46:56 +0000 (19:46 +0000)]
Remote Layer Tree: Vend layer contents via IOSurfaces
https://bugs.webkit.org/show_bug.cgi?id=123600

Reviewed by Anders Carlsson.

Address some review comments from Darin (and subsequently Anders).

* WebProcess/WebPage/mac/RemoteLayerBackingStore.h:
(WebKit::RemoteLayerBackingStore::surface):
No need for .get() here.

* WebProcess/WebPage/mac/RemoteLayerBackingStore.mm:
(RemoteLayerBackingStore::ensureBackingStore):
All on one line for readability.

(createIOSurfaceContext):
This 'if' is meaningless.

(createIOSurface):
No need for a RetainPtr here, the dictionary is autoreleased.

(RemoteLayerBackingStore::display):
Snuggle 'context' up next to the other declarations.

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

6 years agoDon't use the C API in WKRemoteObjectCoder
andersca@apple.com [Fri, 1 Nov 2013 19:35:39 +0000 (19:35 +0000)]
Don't use the C API in WKRemoteObjectCoder
https://bugs.webkit.org/show_bug.cgi?id=123627

Reviewed by Dan Bernstein.

* Shared/API/Cocoa/WKRemoteObjectCoder.mm:
(-[WKRemoteObjectEncoder init]):
(-[WKRemoteObjectEncoder encodeBytes:length:forKey:]):
(-[WKRemoteObjectEncoder _encodeObjectForKey:usingBlock:]):
* Shared/ImmutableDictionary.h:
* Shared/MutableDictionary.cpp:
(WebKit::MutableDictionary::add):
(WebKit::MutableDictionary::set):
* Shared/MutableDictionary.h:

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

6 years agoREGRESSION: Crashes in -[UIDelegate webView:frame:exceededDatabaseQuotaForSecurityOri...
mark.lam@apple.com [Fri, 1 Nov 2013 19:18:27 +0000 (19:18 +0000)]
REGRESSION: Crashes in -[UIDelegate webView:frame:exceededDatabaseQuotaForSecurityOrigin:database:].
https://bugs.webkit.org/show_bug.cgi?id=123383.

Reviewed by Geoffrey Garen.

Tools:

Removed an inappropriate assertion in DumpRenderTree/mac/UIDelegate.mm and
added 2 attributes (databaseDefaultQuota and databaseMaxQuota) to allow
tests to set appropriate quota settings to exercise quota expansion tests
when needed.

* DumpRenderTree/TestRunner.cpp:
(TestRunner::TestRunner):
(getDatabaseDefaultQuotaCallback):
(getDatabaseMaxQuotaCallback):
(setDatabaseDefaultQuotaCallback):
(setDatabaseMaxQuotaCallback):
(TestRunner::staticValues):
* DumpRenderTree/TestRunner.h:
(TestRunner::databaseDefaultQuota):
(TestRunner::setDatabaseDefaultQuota):
(TestRunner::databaseMaxQuota):
(TestRunner::setDatabaseMaxQuota):
* DumpRenderTree/blackberry/DumpRenderTree.cpp:
(BlackBerry::WebKit::DumpRenderTree::exceededDatabaseQuota):
* DumpRenderTree/efl/DumpRenderTreeView.cpp:
(onExceededDatabaseQuota):
* DumpRenderTree/mac/UIDelegate.mm:
(-[UIDelegate webView:frame:exceededDatabaseQuotaForSecurityOrigin:database:]):
* DumpRenderTree/win/UIDelegate.cpp:
(UIDelegate::exceededDatabaseQuota):
* WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
* WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:
(WTR::InjectedBundlePage::didExceedDatabaseQuota):
* WebKitTestRunner/InjectedBundle/TestRunner.cpp:
(WTR::TestRunner::TestRunner):
* WebKitTestRunner/InjectedBundle/TestRunner.h:
(WTR::TestRunner::databaseDefaultQuota):
(WTR::TestRunner::setDatabaseDefaultQuota):
(WTR::TestRunner::databaseMaxQuota):
(WTR::TestRunner::setDatabaseMaxQuota):
* WebKitTestRunner/TestController.cpp:
(WTR::TestController::createOtherPage):
(WTR::TestController::createWebViewWithOptions):

LayoutTests:

Removed an inappropriate assertion in DumpRenderTree/mac/UIDelegate.mm and
added 2 attributes (databaseDefaultQuota and databaseMaxQuota) to allow
tests to set appropriate quota settings to exercise quota expansion tests
when needed.

* storage/websql/open-database-expand-quota.html:
- Set databaseDefaultQuota and databaseMaxQuota as needed for this test.
* storage/websql/open-database-over-quota-expected.txt:
* storage/websql/open-database-over-quota.html:
- Revert the change from r157874 which is no longer needed for this test.

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

6 years agoReverted r158443. It broke the build.
aestes@apple.com [Fri, 1 Nov 2013 19:10:59 +0000 (19:10 +0000)]
Reverted r158443. It broke the build.

* WebKit.xcodeproj/project.pbxproj:

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

6 years agoHPPA build fixes
commit-queue@webkit.org [Fri, 1 Nov 2013 18:59:54 +0000 (18:59 +0000)]
HPPA build fixes
https://bugs.webkit.org/show_bug.cgi?id=123625

Original patch from John David Anglin <dave.anglin@bell.net>

Patch by Emilio Pozuelo Monfort <pochu27@gmail.com> on 2013-11-01
Reviewed by Darin Adler.

* wtf/Platform.h:
* wtf/dtoa/utils.h:

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

6 years agoFix build on non-linux platforms
commit-queue@webkit.org [Fri, 1 Nov 2013 18:48:19 +0000 (18:48 +0000)]
Fix build on non-linux platforms
https://bugs.webkit.org/show_bug.cgi?id=123622

Patch by Emilio Pozuelo Monfort <pochu27@gmail.com> on 2013-11-01
Reviewed by Darin Adler.

* UIProcess/Launcher/gtk/ProcessLauncherGtk.cpp:

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

6 years ago[iOS] Make some headers Private
aestes@apple.com [Fri, 1 Nov 2013 18:37:42 +0000 (18:37 +0000)]
[iOS] Make some headers Private
https://bugs.webkit.org/show_bug.cgi?id=123626

Reviewed by Sam Weinig.

* WebKit.xcodeproj/project.pbxproj:

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

6 years agoExplicitly initialize RefCounted base class in MediaStreamTrack's constructors
commit-queue@webkit.org [Fri, 1 Nov 2013 18:30:04 +0000 (18:30 +0000)]
Explicitly initialize RefCounted base class in MediaStreamTrack's constructors
https://bugs.webkit.org/show_bug.cgi?id=123620

Patch by Nick Diego Yamane <nick.yamane@openbossa.org> on 2013-11-01
Reviewed by Andreas Kling.

No new tests needed.

* Modules/mediastream/MediaStreamTrack.cpp:
(WebCore::MediaStreamTrack::MediaStreamTrack):

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

6 years ago[css shapes] Pull in upstream fixes to shape-outside margin and clipping tests
bjonesbe@adobe.com [Fri, 1 Nov 2013 18:17:51 +0000 (18:17 +0000)]
[css shapes] Pull in upstream fixes to shape-outside margin and clipping tests
https://bugs.webkit.org/show_bug.cgi?id=123588

Reviewed by Alexandru Chiculita.

Fix some typos in the tests, add better explanation, and generally
make the tests clearer.

* csswg/contributors/adobe/submitted/shapes/shape-outside/resources/w3c-import.log:
* csswg/contributors/adobe/submitted/shapes/shape-outside/shape-outside-floats-clipped-001-expected.html:
* csswg/contributors/adobe/submitted/shapes/shape-outside/shape-outside-floats-clipped-001.html:
* csswg/contributors/adobe/submitted/shapes/shape-outside/shape-outside-floats-clipped-003-expected.html:
* csswg/contributors/adobe/submitted/shapes/shape-outside/shape-outside-floats-clipped-003.html:
* csswg/contributors/adobe/submitted/shapes/shape-outside/shape-outside-floats-clipped-004.html:
* csswg/contributors/adobe/submitted/shapes/shape-outside/shape-outside-floats-clipped-005.html:
* csswg/contributors/adobe/submitted/shapes/shape-outside/shape-outside-floats-clipped-006.html:
* csswg/contributors/adobe/submitted/shapes/shape-outside/shape-outside-floats-margin-000-expected.html:
* csswg/contributors/adobe/submitted/shapes/shape-outside/shape-outside-floats-margin-000.html:
* csswg/contributors/adobe/submitted/shapes/shape-outside/shape-outside-floats-margin-001-expected.html:
* csswg/contributors/adobe/submitted/shapes/shape-outside/shape-outside-floats-margin-001.html:
* csswg/contributors/adobe/submitted/shapes/shape-outside/shape-outside-floats-margin-002-expected.html:
* csswg/contributors/adobe/submitted/shapes/shape-outside/shape-outside-floats-margin-002.html:
* csswg/contributors/adobe/submitted/shapes/shape-outside/shape-outside-floats-margin-003-expected.html:
* csswg/contributors/adobe/submitted/shapes/shape-outside/shape-outside-floats-margin-003.html:
* csswg/contributors/adobe/submitted/shapes/shape-outside/shape-outside-floats-margin-004-expected.html:
* csswg/contributors/adobe/submitted/shapes/shape-outside/shape-outside-floats-margin-004.html:
* csswg/contributors/adobe/submitted/shapes/shape-outside/shape-outside-floats-margin-005-expected.html:
* csswg/contributors/adobe/submitted/shapes/shape-outside/shape-outside-floats-margin-005.html:
* csswg/contributors/adobe/submitted/shapes/shape-outside/shape-outside-floats-margin-006-expected.html:
* csswg/contributors/adobe/submitted/shapes/shape-outside/shape-outside-floats-margin-006.html:
* csswg/contributors/adobe/submitted/shapes/shape-outside/shape-outside-floats-margin-007-expected.html:
* csswg/contributors/adobe/submitted/shapes/shape-outside/shape-outside-floats-margin-007.html:
* csswg/contributors/adobe/submitted/shapes/shape-outside/shape-outside-floats-margin-008-expected.html:
* csswg/contributors/adobe/submitted/shapes/shape-outside/shape-outside-floats-margin-008.html:
* csswg/contributors/adobe/submitted/shapes/shape-outside/shape-outside-floats-margin-009-expected.html:
* csswg/contributors/adobe/submitted/shapes/shape-outside/shape-outside-floats-margin-009.html:
* csswg/contributors/adobe/submitted/shapes/shape-outside/shape-outside-floats-margin-010-expected.html:
* csswg/contributors/adobe/submitted/shapes/shape-outside/shape-outside-floats-margin-010.html:
* csswg/contributors/adobe/submitted/shapes/shape-outside/shape-outside-floats-margin-011-expected.html:
* csswg/contributors/adobe/submitted/shapes/shape-outside/shape-outside-floats-margin-011.html:
* csswg/contributors/adobe/submitted/shapes/shape-outside/shape-outside-floats-margin-012-expected.html:
* csswg/contributors/adobe/submitted/shapes/shape-outside/shape-outside-floats-margin-012.html:
* csswg/contributors/adobe/submitted/shapes/shape-outside/shape-outside-floats-margin-013-expected.html:
* csswg/contributors/adobe/submitted/shapes/shape-outside/shape-outside-floats-margin-013.html:
* csswg/contributors/adobe/submitted/shapes/shape-outside/shape-outside-floats-margin-014-expected.html:
* csswg/contributors/adobe/submitted/shapes/shape-outside/shape-outside-floats-margin-014.html:
* csswg/contributors/adobe/submitted/shapes/shape-outside/shape-outside-floats-margin-015-expected.html:
* csswg/contributors/adobe/submitted/shapes/shape-outside/shape-outside-floats-margin-015.html:
* csswg/contributors/adobe/submitted/shapes/shape-outside/shape-outside-floats-margin-016-expected.html:
* csswg/contributors/adobe/submitted/shapes/shape-outside/shape-outside-floats-margin-016.html:
* csswg/contributors/adobe/submitted/shapes/shape-outside/shape-outside-floats-margin-017-expected.html:
* csswg/contributors/adobe/submitted/shapes/shape-outside/shape-outside-floats-margin-017.html:
* csswg/contributors/adobe/submitted/shapes/shape-outside/shape-outside-floats-margin-018-expected.html:
* csswg/contributors/adobe/submitted/shapes/shape-outside/shape-outside-floats-margin-018.html:
* csswg/contributors/adobe/submitted/shapes/shape-outside/shape-outside-floats-margin-019-expected.html:
* csswg/contributors/adobe/submitted/shapes/shape-outside/shape-outside-floats-margin-019.html:
* csswg/contributors/adobe/submitted/shapes/shape-outside/shape-outside-floats-margin-020-expected.html:
* csswg/contributors/adobe/submitted/shapes/shape-outside/shape-outside-floats-margin-020.html:
* csswg/contributors/adobe/submitted/shapes/shape-outside/shape-outside-floats-margin-021-expected.html:
* csswg/contributors/adobe/submitted/shapes/shape-outside/shape-outside-floats-margin-021.html:
* csswg/contributors/adobe/submitted/shapes/shape-outside/w3c-import.log:

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

6 years agoRemove custom Function.prototype.bind() in favor of native version
graouts@apple.com [Fri, 1 Nov 2013 18:13:42 +0000 (18:13 +0000)]
Remove custom Function.prototype.bind() in favor of native version
https://bugs.webkit.org/show_bug.cgi?id=123608

Reviewed by Joseph Pecoraro.

* UserInterface/Utilities.js:

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

6 years agoError trying to serialize a color created without an alpha component to RGBA or HSLA
graouts@apple.com [Fri, 1 Nov 2013 18:06:08 +0000 (18:06 +0000)]
Error trying to serialize a color created without an alpha component to RGBA or HSLA
https://bugs.webkit.org/show_bug.cgi?id=123623

Reviewed by Joseph Pecoraro.

Check whether we have .rgba and .hsla ivars before trying to retrieve them to serialize
the color to RGBA or HSLA format.

* UserInterface/Color.js:
(WebInspector.Color.prototype.toString):

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

6 years agoAdding addRemoteTrack and removeRemoteTrack functions to MediaStreamDescriptor and...
commit-queue@webkit.org [Fri, 1 Nov 2013 18:03:18 +0000 (18:03 +0000)]
Adding addRemoteTrack and removeRemoteTrack functions to MediaStreamDescriptor and MediaStream
https://bugs.webkit.org/show_bug.cgi?id=123477

Patch by Thiago de Barros Lacerda <thiago.lacerda@openbossa.org> on 2013-11-01
Reviewed by Eric Carlson.

When the backend report that a remote track has been added or removed by a remote peer, we must be able to add
it to its MediaStream

No new tests needed.

* Modules/mediastream/MediaStream.cpp:
(WebCore::MediaStream::addTrack): Splitted in two parts that can be used by old addTrack and new addRemoteTrack.
(WebCore::MediaStream::removeTrack): Splitted in two parts that can be used by old removeTrack and new
removeRemoteTrack.
(WebCore::MediaStream::addRemoteSource): Reusing code in new addTrack method.
(WebCore::MediaStream::removeRemoteSource): Refactored.
(WebCore::MediaStream::addRemoteTrack): Added.
(WebCore::MediaStream::removeRemoteTrack): Added.
(WebCore::MediaStream::getTrackVectorForType): Helper method that returns a vector of tracks according to
track's type (Audio or Video).

* Modules/mediastream/MediaStream.h:
* Modules/mediastream/MediaStreamTrack.cpp:
(WebCore::MediaStreamTrack::MediaStreamTrack):
* platform/mediastream/MediaStreamDescriptor.cpp:
(WebCore::MediaStreamDescriptor::addRemoteTrack): Added.
(WebCore::MediaStreamDescriptor::removeRemoteTrack): Added.
* platform/mediastream/MediaStreamDescriptor.h:

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

6 years ago[GTK] [WK2] Crash in webkitWebViewLoadFailedWithTLSErrors
commit-queue@webkit.org [Fri, 1 Nov 2013 17:44:00 +0000 (17:44 +0000)]
[GTK] [WK2] Crash in webkitWebViewLoadFailedWithTLSErrors
https://bugs.webkit.org/show_bug.cgi?id=123618

Patch by Brian Holt <brian.holt@samsung.com> on 2013-11-01
Reviewed by Mario Sanchez Prada.

The GOwnPtrSoup header was not included which meant that the
specialization for GOwnPtr<SoupURI> was not used and instead the
default freeOwnedGPtr which calls g_free is used and crashes.

* UIProcess/API/gtk/WebKitWebView.cpp:

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

6 years ago[GStreamer] Support audio and video tracks
commit-queue@webkit.org [Fri, 1 Nov 2013 16:30:03 +0000 (16:30 +0000)]
[GStreamer] Support audio and video tracks
https://bugs.webkit.org/show_bug.cgi?id=117039

Patch by Brendan Long <b.long@cablelabs.com> on 2013-11-01
Reviewed by Philippe Normand.

Source/WebCore:

Tests: media/track/audio/audio-track-mkv-vorbis-addtrack.html
       media/track/audio/audio-track-mkv-vorbis-enabled.html
       media/track/audio/audio-track-mkv-vorbis-language.html
       media/track/in-band/track-in-band-kate-ogg-addtrack.html
       media/track/in-band/track-in-band-srt-mkv-addtrack.html
       media/track/video/video-track-mkv-theora-addtrack.html
       media/track/video/video-track-mkv-theora-language.html
       media/track/video/video-track-mkv-theora-selected.html

* GNUmakefile.list.am: Add audio and video track files.
* PlatformEfl.cmake: Same.
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::audioTrackEnabledChanged): Schedule "change" event.
(WebCore::HTMLMediaElement::videoTrackSelectedChanged): Same.
* html/track/AudioTrack.cpp:
(WebCore::AudioTrack::setEnabled): Call m_private->setEnabled
(WebCore::AudioTrack::enabledChanged): Added callback.
(WebCore::AudioTrack::labelChanged): Same.
(WebCore::AudioTrack::languageChanged): Same.
(WebCore::AudioTrack::willRemoveAudioTrackPrivate): Use ASSERT_UNUSED for consistence.
* html/track/AudioTrack.h: Add new enabled, label and language callbacks.
* html/track/VideoTrack.cpp:
(WebCore::VideoTrack::setSelected): Call m_private->setEnabled
(WebCore::VideoTrack::selectedChanged): Added callback.
(WebCore::VideoTrack::labelChanged): Same.
(WebCore::VideoTrack::languageChanged): Same.
(WebCore::VideoTrack::willRemoveVideoTrackPrivate): Use ASSERT_UNUSED for consistence.
* html/track/VideoTrack.h: Add new selected, label and language callbacks.
* platform/graphics/AudioTrackPrivate.h:
(WebCore::AudioTrackPrivate::setEnabled): Call m_client->enabledChanged
* platform/graphics/VideoTrackPrivate.h:
(WebCore::VideoTrackPrivate::setSelected): Call m_client->selectedChanged
* platform/graphics/gstreamer/InbandTextTrackPrivateGStreamer.cpp:
(WebCore::InbandTextTrackPrivateGStreamer::InbandTextTrackPrivateGStreamer): Add ASSERT(m_pad)
(WebCore::InbandTextTrackPrivateGStreamer::notifyTrackOfTagsChanged): Look at all tag events instead of just the first one.
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::mediaPlayerPrivateVideoSinkCapsChangedCallback): Separated callback when caps change from callback when number of videos change.
(WebCore::mediaPlayerPrivateVideoCapsChangeTimeoutCallback): Same.
(WebCore::MediaPlayerPrivateGStreamer::MediaPlayerPrivateGStreamer): Initialize m_videoCapsTimerHandler.
(WebCore::MediaPlayerPrivateGStreamer::~MediaPlayerPrivateGStreamer): Disconnect audio and video tracks and remove callbacks.
(WebCore::MediaPlayerPrivateGStreamer::videoCapsChanged): Separated callback when caps change from callback when number of videos change.
(WebCore::MediaPlayerPrivateGStreamer::notifyPlayerOfVideo): Create video tracks for each stream.
(WebCore::MediaPlayerPrivateGStreamer::notifyPlayerOfVideoCaps): Separated callback when caps change from callback when number of videos change.
(WebCore::MediaPlayerPrivateGStreamer::notifyPlayerOfAudio): Create audio tracks for each stream.
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h: Add audio and video tracks, and a pointer to keep track of the default audio stream.
* platform/graphics/gstreamer/AudioTrackPrivateGStreamer.cpp: Added.
* platform/graphics/gstreamer/AudioTrackPrivateGStreamer.h: Added.
* platform/graphics/gstreamer/GRefPtrGStreamer.cpp: Add GRefPtr<GstTagList>
* platform/graphics/gstreamer/TrackPrivateBaseGStreamer.cpp: Added, handles tags and "active" property of audio and video tracks.
* platform/graphics/gstreamer/TrackPrivateBaseGStreamer.h: Added.
* platform/graphics/gstreamer/VideoTrackPrivateGStreamer.cpp: Added.
* platform/graphics/gstreamer/VideoTrackPrivateGStreamer.h: Added.

LayoutTests:

* media/content/two-audio-and-video-tracks.mkv: Added.
* media/in-band-tracks.js: Renamed from LayoutTests/media/in-band-cues.js.
(testAddTrack): Tests addtrack events.
(testAttribute): Added "type" parameter so we can use this for audio and video tracks.
(testTextTrackMode): Renamed to make it clear that this only applies to text tracks.
(testCueStyle): Same.
(testTextTrackOrder): Same.
* media/track/audio/audio-track-mkv-vorbis-addtrack-expected.txt: Added.
* media/track/audio/audio-track-mkv-vorbis-addtrack.html: Copied from LayoutTests/media/track/in-band/track-in-band-srt-mkv-track-order.html.
* media/track/audio/audio-track-mkv-vorbis-enabled-expected.txt: Added.
* media/track/audio/audio-track-mkv-vorbis-enabled.html: Added.
* media/track/audio/audio-track-mkv-vorbis-language-expected.txt: Added.
* media/track/audio/audio-track-mkv-vorbis-language.html: Copied from LayoutTests/media/track/in-band/track-in-band-kate-ogg-track-order.html.
* media/track/in-band/track-in-band-kate-ogg-addtrack-expected.txt: Added.
* media/track/in-band/track-in-band-kate-ogg-addtrack.html: Copied from LayoutTests/media/track/in-band/track-in-band-srt-mkv-track-order.html.
* media/track/in-band/track-in-band-kate-ogg-cues-added-once.html: Added.
* media/track/in-band/track-in-band-kate-ogg-kind.html: Added.
* media/track/in-band/track-in-band-kate-ogg-language.html: Added.
* media/track/in-band/track-in-band-kate-ogg-mode.html: Added.
* media/track/in-band/track-in-band-kate-ogg-style.html: Added.
* media/track/in-band/track-in-band-kate-ogg-track-order.html: Added.
* media/track/in-band/track-in-band-srt-mkv-addtrack-expected.txt: Added.
* media/track/in-band/track-in-band-srt-mkv-addtrack.html: Copied from LayoutTests/media/track/in-band/track-in-band-srt-mkv-track-order.html.
* media/track/in-band/track-in-band-srt-mkv-cues-added-once.html: Added.
* media/track/in-band/track-in-band-srt-mkv-kind.html: Added.
* media/track/in-band/track-in-band-srt-mkv-language.html: Added.
* media/track/in-band/track-in-band-srt-mkv-mode.html: Added.
* media/track/in-band/track-in-band-srt-mkv-style.html: Added.
* media/track/in-band/track-in-band-srt-mkv-track-order.html: Added.
* media/track/video/video-track-mkv-theora-addtrack-expected.txt: Added.
* media/track/video/video-track-mkv-theora-addtrack.html: Copied from LayoutTests/media/track/in-band/track-in-band-srt-mkv-track-order.html.
* media/track/video/video-track-mkv-theora-language-expected.txt: Added.
* media/track/video/video-track-mkv-theora-language.html: Copied from LayoutTests/media/track/in-band/track-in-band-kate-ogg-track-order.html.
* media/track/video/video-track-mkv-theora-selected-expected.txt: Added.
* media/track/video/video-track-mkv-theora-selected.html: Added.
* platform/mac/TestExpectations: Ignore audio and video track tests on mac.

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

6 years agoRemove custom Element.prototype.remove() in favor of native version
graouts@apple.com [Fri, 1 Nov 2013 14:40:49 +0000 (14:40 +0000)]
Remove custom Element.prototype.remove() in favor of native version
https://bugs.webkit.org/show_bug.cgi?id=123607

Reviewed by Timothy Hatcher.

* UserInterface/Utilities.js:

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

6 years ago[WIN] Reduce usage of CFSTR() in WebPreferences
paroga@webkit.org [Fri, 1 Nov 2013 14:09:03 +0000 (14:09 +0000)]
[WIN] Reduce usage of CFSTR() in WebPreferences
https://bugs.webkit.org/show_bug.cgi?id=121827

Reviewed by Brent Fulgham.

This moved the dependency on CF to a few functions only
and is a first step to make it compile without CF.

* WebPreferences.cpp:
* WebPreferences.h:

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

6 years agoBuildfix for !USE(ICU_UNICODE) after 156968.
paroga@webkit.org [Fri, 1 Nov 2013 13:57:51 +0000 (13:57 +0000)]
Buildfix for !USE(ICU_UNICODE) after 156968.

* wtf/unicode/CollatorDefault.cpp:
(WTF::Collator::userDefault):

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

6 years agoBuildfix for !ENABLE(INSPECTOR) after 157288.
paroga@webkit.org [Fri, 1 Nov 2013 12:48:51 +0000 (12:48 +0000)]
Buildfix for !ENABLE(INSPECTOR) after 157288.

* inspector/InspectorInstrumentation.h:
(WebCore::InspectorInstrumentation::willDispatchEvent):

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

6 years agoUnreviewed, EFL gardening. Skip webgl tests because EFL port doesn't fully support...
gyuyoung.kim@samsung.com [Fri, 1 Nov 2013 12:43:04 +0000 (12:43 +0000)]
Unreviewed, EFL gardening. Skip webgl tests because EFL port doesn't fully support webgl yet.

* platform/efl/TestExpectations:

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

6 years agoUnreviewed, EFL gardening. css3 text tests are failing since r158389
gyuyoung.kim@samsung.com [Fri, 1 Nov 2013 12:09:11 +0000 (12:09 +0000)]
Unreviewed, EFL gardening. css3 text tests are failing since r158389

* platform/efl/TestExpectations: Add failure tests.

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

6 years agoUnreviewed GTK gardening. Tests passing after r158273 and r158352
mario@webkit.org [Fri, 1 Nov 2013 11:54:21 +0000 (11:54 +0000)]
Unreviewed GTK gardening. Tests passing after r158273 and r158352
and rebaseline needed after r158195.

* platform/gtk/TestExpectations: Removed tests now passing.
* platform/gtk/accessibility/media-element-expected.txt: Rebaseline.

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

6 years ago[ATK] Avoid explicit traversal of text controls and the render tree in AtkText implem...
mario@webkit.org [Fri, 1 Nov 2013 10:59:33 +0000 (10:59 +0000)]
[ATK] Avoid explicit traversal of text controls and the render tree in AtkText implementation
https://bugs.webkit.org/show_bug.cgi?id=123153

Reviewed by Chris Fleizach.

Source/WebCore:

Remove functions from the AtkText implementation that manually
walk the render tree to compose the text for a exposed objects in
certain cases (e.g. anonymous blocks, text controls).

The reason for this change is that the current implementation
follows an error-prone approach, since by doing things like
manually walking the render tree from here we are not properly
considering all the possible scenarios that might happen when
traversing text. This, however, is a task that is better suited
for the TextIterator, which is already written to consider all
those cases and to emit the proper character in every single
situation: text nodes, replaced objects and so on.

So, by removing all that too specific code (textForObject() and
textForRenderer() mainly) from WebKitAccessibleInterfaceText.cpp
and relying in AccessibilityObject::textUnderElement(), which it
ends up using the TextIterator for certain cases, we have a much
better and robust method of retrieving the text associated with an
instance of AtkObject implementing the AtkText interface.

* accessibility/atk/WebKitAccessibleInterfaceText.cpp:
(webkitAccessibleTextGetText): Removed call to textForObject(), now that
we have just removed that function, together with textForRenderer().

Make AccessibilityRenderObject::textUnderElement() able to deal with
anonymous blocks directly, by creating a range based in the boundaries
defined by the first and last child renderers for that block. This will
make possible to treat an anonymous block as a whole instead of having
to rely in the concatenation of each of its children, as it does now.

* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::textUnderElement): Added a new code
path to deal with anonymous blocks for text renderers, or when including
all the children is explicitly requested.

Modified TextIterator so text for children of replaced objects are
ignored if we are emmiting the special character for those objects.

* editing/TextIterator.cpp:
(WebCore::TextIterator::handleReplacedElement): Make sure no children are
handled a replaced object if m_emitsObjectReplacementCharacters is set.
* editing/TextIterator.h: Updated m_emitsObjectReplacementCharacters
description to reflect the new behavior.

LayoutTests:

Updated test expectations to properly reflect the new reality when it
comes to exposing replaced objects and anymous blocks.

* platform/gtk/accessibility/table-with-rules-expected.txt: Updated to
print <\n> explicitly for the two instances of <BR> that are present in the
test, that will be included as part of an anonymous block.
* platform/efl/accessibility/table-with-rules-expected.txt: Ditto.
* platform/efl-wk2/accessibility/table-with-rules-expected.txt: Ditto.

* platform/efl/accessibility/deleting-iframe-destroys-axcache-expected.txt: Updated
expectations not to expect the text of a button to be shown.
* platform/gtk/accessibility/deleting-iframe-destroys-axcache-expected.txt: Ditto.
* platform/gtk/accessibility/replaced-objects-in-anonymous-blocks-expected.txt: Ditto.

* platform/gtk/TestExpectations: Removed replaced-objects-in-anonymous-blocks.html
from the list of expected failures, as it's now being properly exposed.

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

6 years agoAdd a Mac WebCrypto implementation of HMAC importKey/sign/verify
ap@apple.com [Fri, 1 Nov 2013 07:15:45 +0000 (07:15 +0000)]
Add a Mac WebCrypto implementation of HMAC importKey/sign/verify
https://bugs.webkit.org/show_bug.cgi?id=123598

Reviewed by Anders Carlsson.

Source/WebCore:

Test: crypto/subtle/hmac-sign-verify.html

* WebCore.xcodeproj/project.pbxproj:
* bindings/js/JSSubtleCryptoCustom.cpp: Added property svn:eol-style.
(WebCore::createAlgorithmFromJSValue):
(WebCore::cryptoOperationDataFromJSValue):
(WebCore::cryptoKeyFormatFromJSValue):
(WebCore::cryptoKeyUsagesFromJSValue):
(WebCore::JSSubtleCrypto::sign):
(WebCore::JSSubtleCrypto::verify):
(WebCore::JSSubtleCrypto::digest):
(WebCore::JSSubtleCrypto::importKey):
* crypto/SubtleCrypto.idl:
* crypto/algorithms/CryptoAlgorithmHMAC.cpp: Added.
(WebCore::CryptoAlgorithmHMAC::CryptoAlgorithmHMAC):
(WebCore::CryptoAlgorithmHMAC::~CryptoAlgorithmHMAC):
(WebCore::CryptoAlgorithmHMAC::create):
(WebCore::CryptoAlgorithmHMAC::identifier):
(WebCore::CryptoAlgorithmHMAC::importKey):
(WebCore::CryptoAlgorithmHMAC::exportKey):
* crypto/algorithms/CryptoAlgorithmHMAC.h: Added.
* crypto/keys: Added.
* crypto/keys/CryptoKeyHMAC.cpp: Added.
(WebCore::CryptoKeyHMAC::CryptoKeyHMAC):
(WebCore::CryptoKeyHMAC::~CryptoKeyHMAC):
(WebCore::CryptoKeyHMAC::buildAlgorithmDescription):
* crypto/keys/CryptoKeyHMAC.h: Added.
* crypto/mac/CryptoAlgorithmHMACMac.cpp: Added.
(WebCore::getCommonCryptoAlgorithm):
(WebCore::calculateSignature):
(WebCore::CryptoAlgorithmHMAC::sign):
(WebCore::CryptoAlgorithmHMAC::verify):
(WebCore::CryptoAlgorithmHMAC::generateKey):
* crypto/mac/CryptoAlgorithmRegistryMac.cpp:
(WebCore::CryptoAlgorithmRegistry::platformRegisterAlgorithms):

LayoutTests:

* crypto/subtle/hmac-sign-verify-expected.txt: Added.
* crypto/subtle/hmac-sign-verify.html: Added.

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

6 years ago[EFL][WK1] Rendering is broken when scrolled ewk_view_single repeatedly
ryuan.choi@samsung.com [Fri, 1 Nov 2013 07:15:33 +0000 (07:15 +0000)]
[EFL][WK1] Rendering is broken when scrolled ewk_view_single repeatedly
https://bugs.webkit.org/show_bug.cgi?id=123609

Reviewed by Gyuyoung Kim.

ewk_view_single adds wrong updateRects except last one in scrolls_process,
because previous updateRects are not considered accumulated scrollOffsets.

* ewk/ewk_view_single.cpp:
(_ewk_view_single_smart_scrolls_process):
Merged scrollOffsets to calculate updateRects once.
It will also reduce unnecessary memory copy operations.

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

6 years agoJavaScript parser bug
oliver@apple.com [Fri, 1 Nov 2013 05:13:49 +0000 (05:13 +0000)]
JavaScript parser bug
https://bugs.webkit.org/show_bug.cgi?id=123506

Reviewed by Mark Lam.

Source/JavaScriptCore:

Add ParserState as an abstraction and use that to save and restore
the parser state around nested functions (We'll need to use this in
more places in future).  Also fix a minor error typo this testcases
hit.

* parser/Parser.cpp:
(JSC::::parseFunctionInfo):
(JSC::::parseAssignmentExpression):
* parser/Parser.h:
(JSC::Parser::saveState):
(JSC::Parser::restoreState):

LayoutTests:

Update and add tests

* js/dom/assign-expected.txt:
* js/function-toString-parentheses-expected.txt:
* js/parser-syntax-check-expected.txt:
* js/script-tests/parser-syntax-check.js:

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

6 years agoUpdate the test expectations for the bug 121452.
rniwa@webkit.org [Fri, 1 Nov 2013 03:28:59 +0000 (03:28 +0000)]
Update the test expectations for the bug 121452.

fast/frames/lots-of-objects.html and lots-of-iframes.html are timing out everywhere on Mac.

* platform/mac-wk2/TestExpectations:
* platform/mac/TestExpectations:

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

6 years agoUpdate the Mac test expectation for the mac-future.
rniwa@webkit.org [Fri, 1 Nov 2013 02:47:45 +0000 (02:47 +0000)]
Update the Mac test expectation for the mac-future.

* platform/mac/TestExpectations:

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

6 years agoWindows build fix attempt after r158421.
rniwa@webkit.org [Fri, 1 Nov 2013 02:32:01 +0000 (02:32 +0000)]
Windows build fix attempt after r158421.

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

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

6 years agoWeb Inspector: Clean up a few Inspector interfaces
commit-queue@webkit.org [Fri, 1 Nov 2013 02:05:06 +0000 (02:05 +0000)]
Web Inspector: Clean up a few Inspector interfaces
https://bugs.webkit.org/show_bug.cgi?id=123594

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2013-10-31
Reviewed by Timothy Hatcher.

* WebCore.exp.in:
* inspector/InjectedScriptHost.cpp:
* inspector/InspectorBaseAgent.h:
(WebCore::InspectorBaseAgentInterface::name):
* inspector/InspectorConsoleAgent.cpp:
* inspector/InspectorConsoleAgent.h:
(WebCore::InspectorConsoleAgent::enabled):
* inspector/InspectorController.cpp:
(WebCore::InspectorController::profilerEnabled):
* inspector/InspectorController.h:
* inspector/InspectorDebuggerAgent.cpp:
* inspector/InspectorDebuggerAgent.h:
(WebCore::InspectorDebuggerAgent::enabled):
* inspector/InspectorRuntimeAgent.h:
(WebCore::InspectorRuntimeAgent::enabled):

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

6 years agoFix a typo/review comment from Dan, in http://trac.webkit.org/changeset/158413
timothy_horton@apple.com [Fri, 1 Nov 2013 01:27:08 +0000 (01:27 +0000)]
Fix a typo/review comment from Dan, in trac.webkit.org/changeset/158413

* Shared/API/Cocoa/WKRemoteObjectCoder.mm:

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

6 years agoRemote Layer Tree: Vend layer contents via IOSurfaces
timothy_horton@apple.com [Fri, 1 Nov 2013 01:16:33 +0000 (01:16 +0000)]
Remote Layer Tree: Vend layer contents via IOSurfaces
https://bugs.webkit.org/show_bug.cgi?id=123600

Reviewed by Anders Carlsson.

* Configurations/WebKit2.xcconfig:
Link WebKit2 against IOSurface.

* Shared/mac/RemoteLayerTreeTransaction.mm:
(WebKit::dumpChangedLayers):
Dump the size of the backing store instead of the pointer of its
SharedBitmap, because that's slightly more useful.

* UIProcess/mac/RemoteLayerTreeHost.mm:
(WebKit::RemoteLayerTreeHost::commit):
If a layer's backing store uses accelerated drawing, hand the IOSurface
to the CALayer for display.

* WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
(PlatformCALayerRemote::PlatformCALayerRemote):
Initialize contentsScale to 1 to match CA. Other properties will follow.

(PlatformCALayerRemote::ensureBackingStore):
Instead of replacing the RemoteLayerBackingStore when its properties
change, allow it to update them on the fly. Replacing them caused
us to throw away repaint rects when the accelerated drawing
flag was flipped.

(PlatformCALayerRemote::acceleratesDrawing):
(PlatformCALayerRemote::setAcceleratesDrawing):
Store the accelerated drawing flag and mark it dirty when it changes.

* WebProcess/WebPage/mac/PlatformCALayerRemote.h:
* WebProcess/WebPage/mac/RemoteLayerBackingStore.h:
(WebKit::RemoteLayerBackingStore::image):
Rename bitmap() to image() and have it create a CGImageRef from
the ShareableBitmap, ready for direct application to a CALayer.

(WebKit::RemoteLayerBackingStore::surface):
Return a IOSurface ready for direct application to a CALayer.

(WebKit::RemoteLayerBackingStore::acceleratesDrawing):
(WebKit::RemoteLayerBackingStore::hasFrontBuffer):
Return whether or not we have a front buffer/surface.

* WebProcess/WebPage/mac/RemoteLayerBackingStore.mm:
Forward-declare some CGIOSurface SPI.

(RemoteLayerBackingStore::RemoteLayerBackingStore):
(RemoteLayerBackingStore::ensureBackingStore):
Throw away our front image and reset flags if needed.

(RemoteLayerBackingStore::encode):
(RemoteLayerBackingStore::decode):
En/decode the front surface instead of the ShareableBitmap if needed,
using CoreIPC::MachPort. Destroy the port on receipt.

(createIOSurfaceContext):
Create a CGIOSurfaceContext from an IOSurface.

(createIOSurface):
Create an IOSurface of the given size.

(RemoteLayerBackingStore::image):
Return a CGImageRef, if we're not using accelerated drawing.
Moved from the header.

(RemoteLayerBackingStore::display):
(RemoteLayerBackingStore::drawInContext):
If using accelerated drawing, create and paint into an IOSurface.
Reorganize some code to make the copying-from-the-front-image code
work for both software and IOSurfaces.
Flush the context when completed, to ensure that any asynchronous
painting is complete before we vend the surface to the UI process.

* WebCore.exp.in:
Export sRGBColorSpaceRef.

* WebCore.xcodeproj/project.pbxproj:
Expose GraphicsContextCG.h.

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

6 years agoRemove unused Page::setDebuggerForAllPages
commit-queue@webkit.org [Fri, 1 Nov 2013 01:11:54 +0000 (01:11 +0000)]
Remove unused Page::setDebuggerForAllPages
https://bugs.webkit.org/show_bug.cgi?id=123602

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2013-10-31
Reviewed by Timothy Hatcher.

* page/Page.cpp:
* page/Page.h:

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

6 years agoWeb Inspector: Remove InspectorState
commit-queue@webkit.org [Fri, 1 Nov 2013 01:07:29 +0000 (01:07 +0000)]
Web Inspector: Remove InspectorState
https://bugs.webkit.org/show_bug.cgi?id=123547

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2013-10-31
Reviewed by Timothy Hatcher.

Source/WebCore:

* CMakeLists.txt:
* GNUmakefile.list.am:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* inspector/InspectorAgent.cpp:
(WebCore::InspectorAgent::InspectorAgent):
* inspector/InspectorAgent.h:
(WebCore::InspectorAgent::create):
* inspector/InspectorAllInOne.cpp:
* inspector/InspectorApplicationCacheAgent.cpp:
(WebCore::InspectorApplicationCacheAgent::InspectorApplicationCacheAgent):
* inspector/InspectorApplicationCacheAgent.h:
(WebCore::InspectorApplicationCacheAgent::create):
* inspector/InspectorBaseAgent.cpp:
(WebCore::InspectorBaseAgentInterface::InspectorBaseAgentInterface):
* inspector/InspectorBaseAgent.h:
(WebCore::InspectorBaseAgent::InspectorBaseAgent):
* inspector/InspectorCSSAgent.cpp:
(WebCore::InspectorCSSAgent::InspectorCSSAgent):
* inspector/InspectorCSSAgent.h:
(WebCore::InspectorCSSAgent::create):
* inspector/InspectorCanvasAgent.cpp:
(WebCore::InspectorCanvasAgent::InspectorCanvasAgent):
* inspector/InspectorCanvasAgent.h:
(WebCore::InspectorCanvasAgent::create):
* inspector/InspectorClient.h:
* inspector/InspectorConsoleAgent.cpp:
(WebCore::InspectorConsoleAgent::InspectorConsoleAgent):
* inspector/InspectorConsoleAgent.h:
* inspector/InspectorController.cpp:
(WebCore::InspectorController::InspectorController):
(WebCore::InspectorController::connectFrontend):
(WebCore::InspectorController::disconnectFrontend):
* inspector/InspectorController.h:
* inspector/InspectorDOMAgent.cpp:
(WebCore::InspectorDOMAgent::InspectorDOMAgent):
* inspector/InspectorDOMAgent.h:
(WebCore::InspectorDOMAgent::create):
* inspector/InspectorDOMDebuggerAgent.cpp:
(WebCore::InspectorDOMDebuggerAgent::create):
(WebCore::InspectorDOMDebuggerAgent::InspectorDOMDebuggerAgent):
* inspector/InspectorDOMDebuggerAgent.h:
* inspector/InspectorDOMStorageAgent.cpp:
(WebCore::InspectorDOMStorageAgent::InspectorDOMStorageAgent):
* inspector/InspectorDOMStorageAgent.h:
(WebCore::InspectorDOMStorageAgent::create):
* inspector/InspectorDatabaseAgent.cpp:
(WebCore::InspectorDatabaseAgent::InspectorDatabaseAgent):
* inspector/InspectorDatabaseAgent.h:
(WebCore::InspectorDatabaseAgent::create):
* inspector/InspectorDebuggerAgent.cpp:
(WebCore::InspectorDebuggerAgent::InspectorDebuggerAgent):
* inspector/InspectorDebuggerAgent.h:
* inspector/InspectorHeapProfilerAgent.cpp:
(WebCore::InspectorHeapProfilerAgent::create):
(WebCore::InspectorHeapProfilerAgent::InspectorHeapProfilerAgent):
* inspector/InspectorHeapProfilerAgent.h:
* inspector/InspectorIndexedDBAgent.cpp:
(WebCore::InspectorIndexedDBAgent::InspectorIndexedDBAgent):
* inspector/InspectorIndexedDBAgent.h:
(WebCore::InspectorIndexedDBAgent::create):
* inspector/InspectorInputAgent.cpp:
(WebCore::InspectorInputAgent::InspectorInputAgent):
* inspector/InspectorInputAgent.h:
(WebCore::InspectorInputAgent::create):
* inspector/InspectorLayerTreeAgent.cpp:
(WebCore::InspectorLayerTreeAgent::InspectorLayerTreeAgent):
* inspector/InspectorLayerTreeAgent.h:
(WebCore::InspectorLayerTreeAgent::create):
* inspector/InspectorMemoryAgent.cpp:
(WebCore::InspectorMemoryAgent::InspectorMemoryAgent):
(WebCore::InspectorMemoryAgent::create):
* inspector/InspectorMemoryAgent.h:
* inspector/InspectorPageAgent.cpp:
(WebCore::InspectorPageAgent::create):
(WebCore::InspectorPageAgent::InspectorPageAgent):
* inspector/InspectorPageAgent.h:
* inspector/InspectorProfilerAgent.cpp:
(WebCore::PageProfilerAgent::PageProfilerAgent):
(WebCore::InspectorProfilerAgent::create):
(WebCore::WorkerProfilerAgent::WorkerProfilerAgent):
(WebCore::InspectorProfilerAgent::InspectorProfilerAgent):
* inspector/InspectorProfilerAgent.h:
* inspector/InspectorResourceAgent.cpp:
(WebCore::InspectorResourceAgent::InspectorResourceAgent):
* inspector/InspectorResourceAgent.h:
(WebCore::InspectorResourceAgent::create):
* inspector/InspectorRuntimeAgent.cpp:
(WebCore::InspectorRuntimeAgent::InspectorRuntimeAgent):
* inspector/InspectorRuntimeAgent.h:
* inspector/InspectorState.cpp: Removed.
* inspector/InspectorState.h: Removed.
* inspector/InspectorStateClient.h: Removed.
* inspector/InspectorTimelineAgent.cpp:
(WebCore::InspectorTimelineAgent::InspectorTimelineAgent):
* inspector/InspectorTimelineAgent.h:
(WebCore::InspectorTimelineAgent::create):
* inspector/InspectorWorkerAgent.cpp:
(WebCore::InspectorWorkerAgent::create):
(WebCore::InspectorWorkerAgent::InspectorWorkerAgent):
* inspector/InspectorWorkerAgent.h:
* inspector/PageConsoleAgent.cpp:
(WebCore::PageConsoleAgent::PageConsoleAgent):
* inspector/PageConsoleAgent.h:
(WebCore::PageConsoleAgent::create):
* inspector/PageDebuggerAgent.cpp:
(WebCore::PageDebuggerAgent::create):
(WebCore::PageDebuggerAgent::PageDebuggerAgent):
* inspector/PageDebuggerAgent.h:
* inspector/PageRuntimeAgent.cpp:
(WebCore::PageRuntimeAgent::PageRuntimeAgent):
* inspector/PageRuntimeAgent.h:
(WebCore::PageRuntimeAgent::create):
* inspector/WorkerConsoleAgent.cpp:
(WebCore::WorkerConsoleAgent::WorkerConsoleAgent):
* inspector/WorkerConsoleAgent.h:
(WebCore::WorkerConsoleAgent::create):
* inspector/WorkerDebuggerAgent.cpp:
(WebCore::WorkerDebuggerAgent::create):
(WebCore::WorkerDebuggerAgent::WorkerDebuggerAgent):
* inspector/WorkerDebuggerAgent.h:
* inspector/WorkerInspectorController.cpp:
(WebCore::WorkerInspectorController::WorkerInspectorController):
(WebCore::WorkerInspectorController::connectFrontend):
(WebCore::WorkerInspectorController::disconnectFrontend):
* inspector/WorkerInspectorController.h:
* inspector/WorkerRuntimeAgent.cpp:
(WebCore::WorkerRuntimeAgent::WorkerRuntimeAgent):
* inspector/WorkerRuntimeAgent.h:
(WebCore::WorkerRuntimeAgent::create):
* workers/DefaultSharedWorkerRepository.cpp:
(WebCore::SharedWorkerProxy::postMessageToPageInspector):
* workers/WorkerMessagingProxy.cpp:
(WebCore::WorkerMessagingProxy::postMessageToPageInspector):
* workers/WorkerMessagingProxy.h:
* workers/WorkerReportingProxy.h:

Source/WebKit/blackberry:

* WebCoreSupport/InspectorClientBlackBerry.cpp:
* WebCoreSupport/InspectorClientBlackBerry.h:

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

6 years agoCompile fix for VS2012.
commit-queue@webkit.org [Fri, 1 Nov 2013 01:01:18 +0000 (01:01 +0000)]
Compile fix for VS2012.
https://bugs.webkit.org/show_bug.cgi?id=123599

Patch by Alex Christensen <achristensen@webkit.org> on 2013-10-31
Reviewed by Brent Fulgham.

* WebCoreSupport/WebFrameLoaderClient.cpp:
(WebFrameLoaderClient::WebFramePolicyListenerPrivate::WebFramePolicyListenerPrivate):
(WebFrameLoaderClient::cancelPolicyCheck):
(WebFrameLoaderClient::receivedPolicyDecision):
Use nullptr instead of 0 for m_policyFunction, which is a std::function.

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

6 years agoBegin stubbing out the WKRemoteObjectCoder NSCoder subclass
andersca@apple.com [Fri, 1 Nov 2013 00:48:49 +0000 (00:48 +0000)]
Begin stubbing out the WKRemoteObjectCoder NSCoder subclass
https://bugs.webkit.org/show_bug.cgi?id=123596

Reviewed by Tim Horton.

* Shared/API/Cocoa/WKRemoteObject.mm:
(-[WKRemoteObject forwardInvocation:]):
Call through to the WKRemoteObjectRegistry.

* Shared/API/Cocoa/WKRemoteObjectCoder.h: Added.
* Shared/API/Cocoa/WKRemoteObjectCoder.mm: Added.
(-[WKRemoteObjectEncoder init]):
Create a root WKDictionary.

(-[WKRemoteObjectEncoder dealloc]):
Assert that the current dictionary is the root dictionary; that we're back where we started.

(-[WKRemoteObjectEncoder allowsKeyedCoding]):
Return YES.

(-[WKRemoteObjectEncoder encodeObject:forKey:]):
Check that the object is valid and then encode it.

(-[WKRemoteObjectEncoder _encodeInvocation:forKey:]):
Encode the method type string and invocation selector.

(-[WKRemoteObjectEncoder encodeBytes:length:forKey:]):
Create a WKDataRef and add it to the dictionary.

(-[WKRemoteObjectEncoder _encodeObjectForKey:usingBlock:]):
Create a new dictionary and call the block.

* Shared/API/Cocoa/WKRemoteObjectRegistry.mm:
(-[WKRemoteObjectRegistry _sendInvocation:interface:]):
Create an encoder and encode the invocation and interface.

* Shared/API/Cocoa/WKRemoteObjectRegistryInternal.h: Added.
Add IPI header.

* WebKit2.xcodeproj/project.pbxproj:
Add new files.

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

6 years agoFTL Int32ToDouble should handle the forward type check case where you need a recovery
fpizlo@apple.com [Fri, 1 Nov 2013 00:45:47 +0000 (00:45 +0000)]
FTL Int32ToDouble should handle the forward type check case where you need a recovery
https://bugs.webkit.org/show_bug.cgi?id=123605

Reviewed by Mark Hahnenberg.

If you have a Int32ToDouble that needs to do a type check and it's required to do a
forward exit, then it needs to manually pass in a value recovery for itself in the
OSR exit - since this is one of those forward-exiting nodes that doesn't have a
preceding MovHint.

* ftl/FTLLowerDFGToLLVM.cpp:
(JSC::FTL::LowerDFGToLLVM::compileInt32ToDouble):
(JSC::FTL::LowerDFGToLLVM::forwardTypeCheck):

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

6 years agoAddress review comments.
andersca@apple.com [Fri, 1 Nov 2013 00:31:27 +0000 (00:31 +0000)]
Address review comments.

* Shared/API/Cocoa/WKRemoteObject.h:
* Shared/API/Cocoa/WKRemoteObject.mm:
(-[WKRemoteObject conformsToProtocol:]):

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

6 years agoSplit PendingDeleteCall into its own header
beidson@apple.com [Fri, 1 Nov 2013 00:05:53 +0000 (00:05 +0000)]
Split PendingDeleteCall into its own header
https://bugs.webkit.org/show_bug.cgi?id=123597

Reviewed by Beth “Okay I guess so, bro” Dakin.

* GNUmakefile.list.am:
* WebCore.xcodeproj/project.pbxproj:

* Modules/indexeddb/IDBDatabaseBackendImpl.cpp:
(WebCore::IDBDatabaseBackendImpl::processPendingCalls):
(WebCore::IDBDatabaseBackendImpl::deleteDatabase):
* Modules/indexeddb/IDBDatabaseBackendImpl.h:

* Modules/indexeddb/IDBPendingDeleteCall.h: Added.
(WebCore::IDBPendingDeleteCall::create):
(WebCore::IDBPendingDeleteCall::callbacks):
(WebCore::IDBPendingDeleteCall::IDBPendingDeleteCall):

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

6 years agoWeb Inspector: Convert some InspectorObject member variables to HashSet/HashMap
commit-queue@webkit.org [Fri, 1 Nov 2013 00:01:16 +0000 (00:01 +0000)]
Web Inspector: Convert some InspectorObject member variables to HashSet/HashMap
https://bugs.webkit.org/show_bug.cgi?id=123579

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2013-10-31
Reviewed by Timothy Hatcher.

* inspector/InspectorDOMDebuggerAgent.h:
* inspector/InspectorDOMDebuggerAgent.cpp:
(WebCore::InspectorDOMDebuggerAgent::InspectorDOMDebuggerAgent):
(WebCore::InspectorDOMDebuggerAgent::setBreakpoint):
(WebCore::InspectorDOMDebuggerAgent::removeBreakpoint):
(WebCore::InspectorDOMDebuggerAgent::pauseOnNativeEventIfNeeded):
(WebCore::InspectorDOMDebuggerAgent::setXHRBreakpoint):
(WebCore::InspectorDOMDebuggerAgent::removeXHRBreakpoint):
(WebCore::InspectorDOMDebuggerAgent::willSendXMLHttpRequest):
Make m_eventListenerBreakpoints and m_xhrBreakpoints HashSet.

* inspector/InspectorDebuggerAgent.h:
* inspector/InspectorDebuggerAgent.cpp:
(WebCore::InspectorDebuggerAgent::InspectorDebuggerAgent):
(WebCore::InspectorDebuggerAgent::disable):
(WebCore::InspectorDebuggerAgent::setBreakpointByUrl):
(WebCore::InspectorDebuggerAgent::removeBreakpoint):
(WebCore::InspectorDebuggerAgent::didParseSource):
Make m_javaScriptBreakpoints a HashMap.

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

6 years agoAdd a WKRemoteObject class
andersca@apple.com [Thu, 31 Oct 2013 23:56:18 +0000 (23:56 +0000)]
Add a WKRemoteObject class
https://bugs.webkit.org/show_bug.cgi?id=123586

Reviewed by Dan Bernstein.

Source/WebKit2:

* Shared/API/Cocoa/WKRemoteObject.h: Added.
* Shared/API/Cocoa/WKRemoteObject.mm: Added.
(-[WKRemoteObject _initWithObjectRegistry:interface:]):
Add designated initializer.

(-[WKRemoteObject conformsToProtocol:]):
Check if the interface protocol conforms to our protocol.

(methodArgumentTypeEncodingForSelector):
Helper function that looks up a method in a given protocol and returns its type encoding.

(-[WKRemoteObject methodSignatureForSelector:]):
Try to find the method argument type encoding for the given selector and return its NSMethodSignature.

(-[WKRemoteObject forwardInvocation:]):
Add stub.

* Shared/API/Cocoa/WKRemoteObjectInterface.mm:
Remove a newline.

* Shared/API/Cocoa/WKRemoteObjectRegistry.mm:
(-[WKRemoteObjectRegistry remoteObjectProxyWithInterface:]):
Establish a mapping between interface identifiers and remote object proxies.

* WebKit2.xcodeproj/project.pbxproj:

Tools:

* TestWebKitAPI/Tests/WebKit2ObjC/WKRemoteObjectRegistry.mm:
(TestWebKitAPI::TEST):
Add a conformsToProtocol: test.

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

6 years agoCorrect the elapsedTime calculation in SVG animations
commit-queue@webkit.org [Thu, 31 Oct 2013 23:23:11 +0000 (23:23 +0000)]
Correct the elapsedTime calculation in SVG animations
https://bugs.webkit.org/show_bug.cgi?id=119289

Patch by Youenn Fablet <youennf@gmail.com> on 2013-10-31
Reviewed by Brent Fulgham.

Blink: https://chromium.googlesource.com/chromium/blink/+/338f9badca7fb7880abdb0cecd5f02493c1f7d2e
Source/WebCore:

Test: svg/animations/getCurrentTime-pause-unpause.html

* svg/animation/SMILTimeContainer.cpp:
(WebCore::SMILTimeContainer::SMILTimeContainer):
(WebCore::SMILTimeContainer::elapsed):
(WebCore::SMILTimeContainer::begin):
(WebCore::SMILTimeContainer::pause):
(WebCore::SMILTimeContainer::resume):
(WebCore::SMILTimeContainer::setElapsed):
* svg/animation/SMILTimeContainer.h:

LayoutTests:

* svg/animations/getCurrentTime-pause-unpause-expected.txt: Added.
* svg/animations/getCurrentTime-pause-unpause.html: Added.

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

6 years agoWeb Inspector: Breakpoints in auto-formatted JavaScript editors are not working
commit-queue@webkit.org [Thu, 31 Oct 2013 23:12:10 +0000 (23:12 +0000)]
Web Inspector: Breakpoints in auto-formatted JavaScript editors are not working
https://bugs.webkit.org/show_bug.cgi?id=123589

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2013-10-31
Reviewed by Timothy Hatcher.

The internal this._ignoreCodeMirrorContentDidChangeEvent flag was being used
in two places that could be nested, meaning the flag was deleted while it
was still expected to be set. Change it instead to a counter, to handle nesting.

* UserInterface/TextEditor.js:
(WebInspector.TextEditor):
(WebInspector.TextEditor.prototype.set string):
(WebInspector.TextEditor.prototype.set formatted):
(WebInspector.TextEditor.prototype._contentChanged):

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

6 years agoFTL should implement InvalidationPoint in terms of llvm.stackmap
fpizlo@apple.com [Thu, 31 Oct 2013 22:49:51 +0000 (22:49 +0000)]
FTL should implement InvalidationPoint in terms of llvm.stackmap
https://bugs.webkit.org/show_bug.cgi?id=113647

Reviewed by Mark Hahnenberg.

This is pretty straightforward now that InvalidationPoint has exactly the semantics
that agree with llvm.stackmap.

* ftl/FTLCompile.cpp:
(JSC::FTL::fixFunctionBasedOnStackMaps):
* ftl/FTLLowerDFGToLLVM.cpp:
(JSC::FTL::LowerDFGToLLVM::compileInvalidationPoint):
(JSC::FTL::LowerDFGToLLVM::emitOSRExitCall):
(JSC::FTL::LowerDFGToLLVM::buildExitArguments):
(JSC::FTL::LowerDFGToLLVM::callStackmap):
* ftl/FTLOSRExitCompilationInfo.h:
(JSC::FTL::OSRExitCompilationInfo::OSRExitCompilationInfo):

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

6 years agoSource/JavaScriptCore: Implement basic ES6 Math functions
oliver@apple.com [Thu, 31 Oct 2013 22:38:05 +0000 (22:38 +0000)]
Source/JavaScriptCore: Implement basic ES6 Math functions
https://bugs.webkit.org/show_bug.cgi?id=123536

Reviewed by Michael Saboff.

Fairly trivial patch to implement the core ES6 Math functions.

This doesn't implement Math.hypot as it is not a trivial function.
I've also skipped Math.sign as I am yet to be convinced the spec
behaviour is good.  Everything else is trivial.

* runtime/MathObject.cpp:
(JSC::MathObject::finishCreation):
(JSC::mathProtoFuncACosh):
(JSC::mathProtoFuncASinh):
(JSC::mathProtoFuncATanh):
(JSC::mathProtoFuncCbrt):
(JSC::mathProtoFuncCosh):
(JSC::mathProtoFuncExpm1):
(JSC::mathProtoFuncFround):
(JSC::mathProtoFuncLog1p):
(JSC::mathProtoFuncLog10):
(JSC::mathProtoFuncLog2):
(JSC::mathProtoFuncSinh):
(JSC::mathProtoFuncTanh):
(JSC::mathProtoFuncTrunc):

Source/WTF: Implement basic ES6 Math functions
https://bugs.webkit.org/show_bug.cgi?id=123536

Reviewed by Michael Saboff.

Add basic implementations of necessary methods to MathExtras to
deal with MSVC not supplying them

* wtf/MathExtras.h:
(asinh):
(acosh):
(atanh):
(expm1):
(log1p):
(cbrt):

LayoutTests: Implement ES6 Math functions
https://bugs.webkit.org/show_bug.cgi?id=123536

Reviewed by Michael Saboff.

Add tests for new math functions

* js/Object-getOwnPropertyNames-expected.txt:
* js/math-expected.txt:
* js/script-tests/Object-getOwnPropertyNames.js:
* js/script-tests/math.js:

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

6 years agoFTL::Location::restoreInto() doesn't handle stack-related registers correctly if...
fpizlo@apple.com [Thu, 31 Oct 2013 22:29:39 +0000 (22:29 +0000)]
FTL::Location::restoreInto() doesn't handle stack-related registers correctly if you're using it after pushing a new stack frame
https://bugs.webkit.org/show_bug.cgi?id=123591

Reviewed by Mark Hahnenberg.

This gets us to pass more tests with ftlUsesStackmaps.

* ftl/FTLLocation.cpp:
(JSC::FTL::Location::restoreInto):
* ftl/FTLLocation.h:
* ftl/FTLThunks.cpp:
(JSC::FTL::osrExitGenerationWithStackMapThunkGenerator):

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

6 years agoManage line-grid RootInlineBox with unique_ptr.
akling@apple.com [Thu, 31 Oct 2013 21:59:49 +0000 (21:59 +0000)]
Manage line-grid RootInlineBox with unique_ptr.
<https://webkit.org/b/123583>

Use smart pointers for the RenderBlockFlow's optional line-grid box
instead of manual new/delete.

Reviewed by Antti Koivisto.

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

6 years agoEnable WebCrypto on Mac
ap@apple.com [Thu, 31 Oct 2013 21:50:01 +0000 (21:50 +0000)]
Enable WebCrypto on Mac
https://bugs.webkit.org/show_bug.cgi?id=123587

Reviewed by Anders Carlsson.

Source/JavaScriptCore:

* Configurations/FeatureDefines.xcconfig: Do it.

Source/WebCore:

* Configurations/FeatureDefines.xcconfig: Enable it.

* bindings/js/JSCryptoAlgorithmDictionary.cpp: Build fix.

* crypto/CryptoAlgorithmRegistry.cpp: (WebCore::CryptoAlgorithmRegistry::getIdentifierForName):
Special case empty keys to avoid upsetting HashMap.

* crypto/algorithms/CryptoAlgorithmSHA1.cpp: (WebCore::CryptoAlgorithmSHA1::create):
Build fix. Can't use make_unique, because constructor is private.

Source/WebKit/mac:

* Configurations/FeatureDefines.xcconfig: Do it.

Source/WebKit2:

* Configurations/FeatureDefines.xcconfig: Do it.

LayoutTests:

* TestExpectations:
* platform/efl/TestExpectations:
* platform/gtk/TestExpectations:
* platform/win/TestExpectations:
* platform/wincairo/TestExpectations:
Only skipping on specific platforms now.

* crypto: Added.
* crypto/crypto-gc-expected.txt: Copied from LayoutTests/security/crypto-gc-expected.txt.
* crypto/crypto-gc.html: Copied from LayoutTests/security/crypto-gc.html.
* crypto/crypto-random-values-expected.txt: Copied from LayoutTests/security/crypto-random-values-expected.txt.
* crypto/crypto-random-values-limits-expected.txt: Copied from LayoutTests/security/crypto-random-values-limits-expected.txt.
* crypto/crypto-random-values-limits.html: Copied from LayoutTests/security/crypto-random-values-limits.html.
* crypto/crypto-random-values-types-expected.txt: Copied from LayoutTests/security/crypto-random-values-types-expected.txt.
* crypto/crypto-random-values-types.html: Copied from LayoutTests/security/crypto-random-values-types.html.
* crypto/crypto-random-values.html: Copied from LayoutTests/security/crypto-random-values.html.
* crypto/subtle: Added.
* crypto/subtle/argument-conversion-expected.txt: Copied from LayoutTests/security/crypto-subtle-arguments-expected.txt.
* crypto/subtle/argument-conversion.html: Copied from LayoutTests/security/crypto-subtle-arguments.html.
* crypto/subtle/gc-2-expected.txt: Copied from LayoutTests/security/crypto-subtle-gc-2-expected.txt.
* crypto/subtle/gc-2.html: Copied from LayoutTests/security/crypto-subtle-gc-2.html.
* crypto/subtle/gc-3-expected.txt: Copied from LayoutTests/security/crypto-subtle-gc-3-expected.txt.
* crypto/subtle/gc-3.html: Copied from LayoutTests/security/crypto-subtle-gc-3.html.
* crypto/subtle/gc-expected.txt: Copied from LayoutTests/security/crypto-subtle-gc-expected.txt.
* crypto/subtle/gc.html: Copied from LayoutTests/security/crypto-subtle-gc.html.
* crypto/subtle/resources: Added.
* crypto/subtle/resources/common.js: Copied from LayoutTests/security/resources/common.js.
* crypto/subtle/sha-1-expected.txt: Copied from LayoutTests/security/crypto-subtle-sha1-expected.txt.
* crypto/subtle/sha-1.html: Copied from LayoutTests/security/crypto-subtle-sha1.html.
* security/crypto-gc-expected.txt: Removed.
* security/crypto-gc.html: Removed.
* security/crypto-random-values-expected.txt: Removed.
* security/crypto-random-values-limits-expected.txt: Removed.
* security/crypto-random-values-limits.html: Removed.
* security/crypto-random-values-types-expected.txt: Removed.
* security/crypto-random-values-types.html: Removed.
* security/crypto-random-values.html: Removed.
* security/crypto-subtle-arguments-expected.txt: Removed.
* security/crypto-subtle-arguments.html: Removed.
* security/crypto-subtle-gc-2-expected.txt: Removed.
* security/crypto-subtle-gc-2.html: Removed.
* security/crypto-subtle-gc-3-expected.txt: Removed.
* security/crypto-subtle-gc-3.html: Removed.
* security/crypto-subtle-gc-expected.txt: Removed.
* security/crypto-subtle-gc.html: Removed.
* security/crypto-subtle-sha1-expected.txt: Removed.
* security/crypto-subtle-sha1.html: Removed.
* security/resources/common.js: Removed.
Moved tests from security/ to crypto/.

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

6 years agobuild.webkit.org should have a clean build button
rniwa@webkit.org [Thu, 31 Oct 2013 21:15:08 +0000 (21:15 +0000)]
build.webkit.org should have a clean build button
https://bugs.webkit.org/show_bug.cgi?id=123559

Reviewed by Darin Adler.

Add a new "clean" forced scheduler. When a build was created by this scheduler, CleanBuildIfScheduled
step executes clean-build script that removes the WebKitBuild directory.

Also added make-passwords-json.py which creates a fake passwords.json from config.json for testing purposes.

* BuildSlaveSupport/build.webkit.org-config/make-passwords-json.py: Added.
* BuildSlaveSupport/build.webkit.org-config/master.cfg:
(CleanBuildIfScheduled): Added.
(CleanBuildIfScheduled.start): Added. Don't do a clean build if if this build wasn't schecueld by
the clean build scheduler.
(DeleteStaleBuildFiles): Added.
(DeleteStaleBuildFiles.start): Added. Don't delete stale build files if this build was scheduled by
the clean build scheduler since everything in the WebKitBuild directory had already been removed.
(Factory.__init__): Always add CleanBuildIfScheduled.  The step itself checks whether to run
clean-build script or hide itself.
(loadBuilderConfig): Added the new clean build scheduler. Also make ForceScheduler future proof; in newer
versions of buildbot, builderNames needs to be a list of regular strings.
* BuildSlaveSupport/clean-build: Added.

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

6 years agoUnderline bounds cannot be queried before underline itself is drawn
commit-queue@webkit.org [Thu, 31 Oct 2013 21:14:26 +0000 (21:14 +0000)]
Underline bounds cannot be queried before underline itself is drawn
https://bugs.webkit.org/show_bug.cgi?id=123310

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

GraphicsContext's drawLineForText function is used to draw underlines,
strikethroughs, and overlines. Before drawing the line, this function
modifies the bounds given to it in order to make underlines crisp. However,
this means that it is impossible to know where an underline will be drawn
before drawing it. This patch pulls out this adjustment computation into
GraphicsContext::computeLineBoundsForText, then passes the result to
drawLineForText

Because there should be no observable difference, no tests need to be updated.

* platform/graphics/GraphicsContext.h: Signature of new computeLineBoundsForText
function
* platform/graphics/blackberry/PathBlackBerry.cpp:
(WebCore::GraphicsContext::computeLineBoundsForText): Implement new function
* platform/graphics/cairo/GraphicsContextCairo.cpp:
(WebCore::GraphicsContext::computeLineBoundsForText): Ditto
(WebCore::GraphicsContext::drawLineForText): Use computeLineBoundsForText
* platform/graphics/cg/GraphicsContextCG.cpp:
(WebCore::computeLineBoundsAndAntialiasingModeForText): Static function that
performs the actual bounds computation
(WebCore::GraphicsContext::computeLineBoundsForText): Calls
computeLineBoundsAndAntialiasingModeForText
(WebCore::GraphicsContext::drawLineForText): Use new function
* platform/graphics/wince/GraphicsContextWinCE.cpp:
(WebCore::GraphicsContext::computeLineBoundsForText): Implement new function

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

6 years agoRepro scrolling crash with scrollbars that use setPresentationValue on the
bdakin@apple.com [Thu, 31 Oct 2013 21:03:15 +0000 (21:03 +0000)]
Repro scrolling crash with scrollbars that use setPresentationValue on the
scrolling thread
https://bugs.webkit.org/show_bug.cgi?id=123549
-and corresponding-
<rdar://problem/15246606>

Reviewed by Brady Eidson.

Here's another speculative fix. If a scrollbar was removed, we would not properly
inform the scrolling thread. Instead of checking supportsUpdateOnSecondaryThread()
before calling setScrollbarPaintersFromScrollbars(), check it from within
setScrollbarPaintersFromScrollbars(), and this will allow the ScrollbarPainter to
be properly updated.

* page/scrolling/mac/ScrollingCoordinatorMac.mm:
(WebCore::ScrollingCoordinatorMac::frameViewLayoutUpdated):
* page/scrolling/mac/ScrollingStateScrollingNodeMac.mm:
(WebCore::ScrollingStateScrollingNode::setScrollbarPaintersFromScrollbars):

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

6 years agoUnreviewed typo fix after 158386. (buildfix after r158365)
ossy@webkit.org [Thu, 31 Oct 2013 20:13:45 +0000 (20:13 +0000)]
Unreviewed typo fix after 158386. (buildfix after r158365)

* Modules/mediastream/UserMediaRequest.cpp:
(WebCore::UserMediaRequest::callSuccessHandler):

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

6 years agoMove CSS3 text decoration implementation behind ENABLE(CSS3_TEXT_DECORATION)
commit-queue@webkit.org [Thu, 31 Oct 2013 20:11:53 +0000 (20:11 +0000)]
Move CSS3 text decoration implementation behind ENABLE(CSS3_TEXT_DECORATION)
https://bugs.webkit.org/show_bug.cgi?id=123541

Patch by Myles C. Maxfield <mmaxfield@apple.com> on 2013-10-31
Reviewed by Tim Horton.

Source/WebCore:

Enabled CSS3 text decoration tests

* css/CSSComputedStyleDeclaration.cpp:
(WebCore::renderTextDecorationStyleFlagsToCSSValue): Mapping internal
representation to a CSSValue
(WebCore::ComputedStyleExtractor::propertyValue): Ditto
* css/CSSParser.cpp: Moving parsing functions behind new flag
(WebCore::isColorPropertyID):
(WebCore::CSSParser::parseValue):
(WebCore::CSSParser::addTextDecorationProperty):
(WebCore::CSSParser::parseTextDecorationSkip):
(WebCore::CSSParser::parseTextUnderlinePosition):
* css/CSSParser.h:
* css/CSSPrimitiveValueMappings.h:
* css/CSSPropertyNames.in: Marking the new properties behind new flag
* css/CSSValueKeywords.in: Marking new values behind new flag
* css/DeprecatedStyleBuilder.cpp:
(WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
* css/StylePropertyShorthand.cpp:
(WebCore::shorthandForProperty): Move text decoration shorthand
(WebCore::matchingShorthandsForLonghand):
* css/StylePropertyShorthand.h:
* css/StyleResolver.cpp:
(WebCore::isValidVisitedLinkProperty):
(WebCore::StyleResolver::applyProperty):
* platform/graphics/GraphicsContext.h:
* platform/graphics/cairo/GraphicsContextCairo.cpp:
(WebCore::GraphicsContext::setPlatformStrokeStyle):
* platform/graphics/cg/GraphicsContextCG.cpp:
(WebCore::GraphicsContext::drawLine):
* platform/graphics/wince/GraphicsContextWinCE.cpp:
(WebCore::createPen):
* rendering/InlineFlowBox.cpp:
* rendering/InlineFlowBox.h:
* rendering/InlineTextBox.cpp:
(WebCore::textDecorationStyleToStrokeStyle):
(WebCore::computeUnderlineOffset):
(WebCore::InlineTextBox::paintDecoration):
* rendering/RenderObject.cpp:
(WebCore::decorationColor):
* rendering/RootInlineBox.cpp:
* rendering/RootInlineBox.h:
* rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::changeRequiresRepaintIfTextOrBorderOrOutline):
(WebCore::RenderStyle::colorIncludingFallback):
(WebCore::RenderStyle::visitedDependentColor):
* rendering/style/RenderStyle.h:
* rendering/style/RenderStyleConstants.h:
* rendering/style/StyleRareInheritedData.cpp:
(WebCore::StyleRareInheritedData::StyleRareInheritedData):
(WebCore::StyleRareInheritedData::operator==):
* rendering/style/StyleRareInheritedData.h:
* rendering/style/StyleRareNonInheritedData.cpp:
(WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
(WebCore::StyleRareNonInheritedData::operator==):
* rendering/style/StyleRareNonInheritedData.h:

LayoutTests:

* platform/mac/TestExpectations: Enable CSS3 text decoration tests
(since CSS3_TEXT_DECORATION is enabled by default)

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

6 years ago[WK2] Convert SeccompFilters to using unique_ptr instead of OwnPtr/PassOwnPtr
commit-queue@webkit.org [Thu, 31 Oct 2013 19:50:04 +0000 (19:50 +0000)]
[WK2] Convert SeccompFilters to using unique_ptr instead of OwnPtr/PassOwnPtr
https://bugs.webkit.org/show_bug.cgi?id=122883

Patch by Sergio Correia <sergio.correia@openbossa.org> on 2013-10-31
Reviewed by Darin Adler.

* Shared/linux/SeccompFilters/OpenSyscall.cpp:
(WebKit::OpenSyscall::createFromOpenatContext):
(WebKit::OpenSyscall::createFromCreatContext):
(WebKit::OpenSyscall::execute):
* Shared/linux/SeccompFilters/OpenSyscall.h:
* Shared/linux/SeccompFilters/SeccompBroker.cpp:
(WebKit::SIGSYSHandler):
(WebKit::SeccompBrokerClient::dispatch):
(WebKit::SeccompBroker::runLoop):
* Shared/linux/SeccompFilters/SigactionSyscall.cpp:
(WebKit::SigactionSyscall::createFromContext):
* Shared/linux/SeccompFilters/SigactionSyscall.h:
* Shared/linux/SeccompFilters/SigprocmaskSyscall.cpp:
(WebKit::SigprocmaskSyscall::createFromContext):
* Shared/linux/SeccompFilters/SigprocmaskSyscall.h:
* Shared/linux/SeccompFilters/Syscall.cpp:
(WebKit::Syscall::createFromContext):
(WebKit::Syscall::createFromDecoder):
(WebKit::SyscallResult::createFromDecoder):
* Shared/linux/SeccompFilters/Syscall.h:
* Shared/linux/SeccompFilters/SyscallPolicy.cpp:

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

6 years ago[WebCrypto] Add SHA-1
ap@apple.com [Thu, 31 Oct 2013 19:31:43 +0000 (19:31 +0000)]
[WebCrypto] Add SHA-1
https://bugs.webkit.org/show_bug.cgi?id=123582

Reviewed by Anders Carlsson.

Source/WebCore:

Tests: security/crypto-subtle-arguments.html
       security/crypto-subtle-sha1.html

* WebCore.xcodeproj/project.pbxproj: Added new files.

* bindings/js/JSSubtleCryptoCustom.cpp:
(WebCore::createAlgorithmFromJSValue):
(WebCore::sequenceOfCryptoOperationDataFromJSValue):
(WebCore::JSSubtleCrypto::digest):
* crypto/SubtleCrypto.idl:
Added bindings for crypto.digest.

* crypto/algorithms: Added.
* crypto/algorithms/CryptoAlgorithmSHA1.cpp: Added.
* crypto/algorithms/CryptoAlgorithmSHA1.h: Added.
* crypto/mac/CryptoAlgorithmRegistryMac.cpp:
(WebCore::CryptoAlgorithmRegistry::platformRegisterAlgorithms): Register SHA-1.

* crypto/mac/CryptoAlgorithmSHA1Mac.cpp: Added.
(WebCore::CryptoAlgorithmSHA1::digest): Performs the work synchronously, because
otherwise we'd have to copy the data first, which is crazy for something as simple
as hashing. We can change to a dispatch queue later if we find that it's actually
better to copy and do the work asynchronously.

LayoutTests:

* security/resources/common.js: Added from Blink.
(importTestKeys):
(asciiToArrayBuffer):
(printRejectedResult):
(printAcceptedResult):
(failAndFinishJSTest):

* security/crypto-subtle-arguments-expected.txt: Added.
* security/crypto-subtle-arguments.html: Added.
Added tests for how bindings treat crazy arguments. Heavily based on a test from Blink.

* security/crypto-subtle-sha1-expected.txt: Added.
* security/crypto-subtle-sha1.html: Added.
Test that SHA-1 works.

* TestExpectations: Skip these tests everywhere for now.

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

6 years agoOne more speculative buildfix after r158365.
ossy@webkit.org [Thu, 31 Oct 2013 19:22:41 +0000 (19:22 +0000)]
One more speculative buildfix after r158365.

* Modules/mediastream/UserMediaRequest.cpp:
(WebCore::UserMediaRequest::callSuccessHandler):

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

6 years agoUnreviewed, really remove CachedTranscendentalFunction.h.
fpizlo@apple.com [Thu, 31 Oct 2013 19:20:21 +0000 (19:20 +0000)]
Unreviewed, really remove CachedTranscendentalFunction.h.

* GNUmakefile.list.am:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:

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

6 years agoRemove CachedTranscendentalFunction because caching math functions is an ugly idea
fpizlo@apple.com [Thu, 31 Oct 2013 19:19:15 +0000 (19:19 +0000)]
Remove CachedTranscendentalFunction because caching math functions is an ugly idea
https://bugs.webkit.org/show_bug.cgi?id=123574

Source/JavaScriptCore:

Reviewed by Mark Hahnenberg.

This is performance-neutral because I also make Math.cos/sin intrinsic. This means that
we gain the "overhead" of actually computing sin and cos but we lose the overhead of
going through the native call thunks.

Caching transcendental functions is a really ugly idea. It works for SunSpider because
that benchmark makes very predictable calls into Math.sin. But I don't believe that this
is representative of any kind of reality, and so for sensible uses of Math.sin/cos all
that this was doing was adding more call overhead and some hashing overhead.

* JavaScriptCore.xcodeproj/project.pbxproj:
* dfg/DFGAbstractInterpreterInlines.h:
(JSC::DFG::::executeEffects):
* dfg/DFGBackwardsPropagationPhase.cpp:
(JSC::DFG::BackwardsPropagationPhase::propagate):
* dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::handleIntrinsic):
* dfg/DFGCSEPhase.cpp:
(JSC::DFG::CSEPhase::performNodeCSE):
* dfg/DFGClobberize.h:
(JSC::DFG::clobberize):
* dfg/DFGFixupPhase.cpp:
(JSC::DFG::FixupPhase::fixupNode):
* dfg/DFGNodeType.h:
* dfg/DFGPredictionPropagationPhase.cpp:
(JSC::DFG::PredictionPropagationPhase::propagate):
(JSC::DFG::PredictionPropagationPhase::doDoubleVoting):
* dfg/DFGSafeToExecute.h:
(JSC::DFG::safeToExecute):
* dfg/DFGSpeculativeJIT.h:
(JSC::DFG::SpeculativeJIT::callOperation):
* dfg/DFGSpeculativeJIT32_64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* jit/JITOperations.h:
* runtime/CachedTranscendentalFunction.h: Removed.
* runtime/DateInstanceCache.h:
* runtime/Intrinsic.h:
* runtime/MathObject.cpp:
(JSC::MathObject::finishCreation):
(JSC::mathProtoFuncCos):
(JSC::mathProtoFuncSin):
* runtime/VM.h:

Tools:

Reviewed by Mark Hahnenberg.

Make it easier to see that a test doesn't have an -expected file.

* Scripts/run-jsc-stress-tests:

LayoutTests:

Reviewed by Mark Hahnenberg.

* js/dfg-cos-constant-expected.txt: Added.
* js/dfg-cos-constant.html: Added.
* js/dfg-sin-constant-expected.txt: Added.
* js/dfg-sin-constant.html: Added.
* js/script-tests/dfg-cos-constant.js: Added.
(foo):
* js/script-tests/dfg-sin-constant.js: Added.
(foo):

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

6 years agoREGRESSION(r158348): Breaks Debug build
commit-queue@webkit.org [Thu, 31 Oct 2013 19:17:45 +0000 (19:17 +0000)]
REGRESSION(r158348): Breaks Debug build
https://bugs.webkit.org/show_bug.cgi?id=123562

Patch by Sudarsana Nagineni <sudarsana.nagineni@intel.com> on 2013-10-31
Reviewed by Brady Eidson.

Remove an unnecessary check that cause compilation failure.

No new tests since this just fixes the build failure.

* Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.cpp:
(WebCore::IDBBackingStoreLevelDB::updateIDBDatabaseVersion):

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

6 years agoOne more speculative buildfix after r158365.
ossy@webkit.org [Thu, 31 Oct 2013 19:16:57 +0000 (19:16 +0000)]
One more speculative buildfix after r158365.

* Modules/mediastream/RTCPeerConnection.cpp:
(WebCore::RTCPeerConnection::didAddRemoteStream):

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

6 years agoSpeculative buildfix after r158365.
ossy@webkit.org [Thu, 31 Oct 2013 19:08:41 +0000 (19:08 +0000)]
Speculative buildfix after r158365.

* Modules/mediastream/VideoStreamTrack.cpp:
(WebCore::VideoStreamTrack::create):
(WebCore::VideoStreamTrack::VideoStreamTrack):
* Modules/mediastream/VideoStreamTrack.h:

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

6 years agoDecorated text sometimes does not draw its decorations
commit-queue@webkit.org [Thu, 31 Oct 2013 18:47:00 +0000 (18:47 +0000)]
Decorated text sometimes does not draw its decorations
https://bugs.webkit.org/show_bug.cgi?id=123539

Patch by Myles C. Maxfield <mmaxfield@apple.com> on 2013-10-31
Reviewed by Antti Koivisto.

Decorated text should opt-out of the simple line layout, because
SimpleLineLayout::paintFlow doesn't draw decorations

Fixes fast/css3-text/css3-text-decoration/text-decoration-color.html

* rendering/SimpleLineLayout.cpp:
(WebCore::SimpleLineLayout::canUseFor):

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

6 years agoWeb Inspector: Remove last member variable uses of InspectorState from Agents
commit-queue@webkit.org [Thu, 31 Oct 2013 18:33:47 +0000 (18:33 +0000)]
Web Inspector: Remove last member variable uses of InspectorState from Agents
https://bugs.webkit.org/show_bug.cgi?id=123540

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2013-10-31
Reviewed by Timothy Hatcher.

* inspector/InspectorDOMDebuggerAgent.h:
* inspector/InspectorDOMDebuggerAgent.cpp:
(WebCore::InspectorDOMDebuggerAgent::InspectorDOMDebuggerAgent):
(WebCore::InspectorDOMDebuggerAgent::setBreakpoint):
(WebCore::InspectorDOMDebuggerAgent::removeBreakpoint):
(WebCore::InspectorDOMDebuggerAgent::pauseOnNativeEventIfNeeded):
(WebCore::InspectorDOMDebuggerAgent::setXHRBreakpoint):
(WebCore::InspectorDOMDebuggerAgent::removeXHRBreakpoint):
(WebCore::InspectorDOMDebuggerAgent::willSendXMLHttpRequest):
DOMDebuggerAgentState::eventListenerBreakpoints -> m_eventListenerBreakpoints.
DOMDebuggerAgentState::xhrBreakpoints -> m_xhrBreakpoints.

* inspector/InspectorDebuggerAgent.h:
* inspector/InspectorDebuggerAgent.cpp:
(WebCore::InspectorDebuggerAgent::InspectorDebuggerAgent):
(WebCore::InspectorDebuggerAgent::disable):
(WebCore::InspectorDebuggerAgent::setBreakpointByUrl):
(WebCore::InspectorDebuggerAgent::removeBreakpoint):
(WebCore::InspectorDebuggerAgent::didParseSource):
DebuggerAgentState::javaScriptBreakpoints -> m_javaScriptBreakpoints.

* inspector/InspectorPageAgent.h:
* inspector/InspectorPageAgent.cpp:
(WebCore::InspectorPageAgent::disable):
(WebCore::InspectorPageAgent::addScriptToEvaluateOnLoad):
(WebCore::InspectorPageAgent::removeScriptToEvaluateOnLoad):
(WebCore::InspectorPageAgent::didClearWindowObjectInWorld):
PageAgentState::pageAgentScriptsToEvaluateOnLoad -> m_scriptsToEvaluateOnLoad.
This is a lazily created InspectorObject member variable.

* inspector/InspectorResourceAgent.h:
* inspector/InspectorResourceAgent.cpp:
(WebCore::InspectorResourceAgent::willSendRequest):
(WebCore::InspectorResourceAgent::disable):
(WebCore::InspectorResourceAgent::setExtraHTTPHeaders):
ResourceAgentState::extraRequestHeaders -> m_extraRequestHeaders.
This is a lazily created InspectorObject member variable.

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

6 years agoUnreviewed, one more build fix after r158365.
philn@webkit.org [Thu, 31 Oct 2013 18:29:47 +0000 (18:29 +0000)]
Unreviewed, one more build fix after r158365.

* Modules/webaudio/MediaStreamAudioDestinationNode.cpp:
(WebCore::MediaStreamAudioDestinationNode::MediaStreamAudioDestinationNode):

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

6 years agoRepro scrolling crash with scrollbars that use setPresentationValue on the
bdakin@apple.com [Thu, 31 Oct 2013 18:26:21 +0000 (18:26 +0000)]
Repro scrolling crash with scrollbars that use setPresentationValue on the
scrolling thread
https://bugs.webkit.org/show_bug.cgi?id=123549
-and corresponding-
<rdar://problem/15246606>

Reviewed by Darin Adler.

Speculative fix. I think if we retain the ScrollbarPainters, we should avoid this
crash.

* page/scrolling/mac/ScrollingTreeScrollingNodeMac.h:

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

6 years agoUnreviewed, MediaStream build fix after r158365.
philn@webkit.org [Thu, 31 Oct 2013 18:18:44 +0000 (18:18 +0000)]
Unreviewed, MediaStream build fix after r158365.

* Modules/mediastream/MediaStream.cpp:
(WebCore::MediaStream::clone):

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

6 years agoRun tests as if they are expected to pass when --force is given.
commit-queue@webkit.org [Thu, 31 Oct 2013 18:13:10 +0000 (18:13 +0000)]
Run tests as if they are expected to pass when --force is given.
https://bugs.webkit.org/show_bug.cgi?id=112890

Patch by Tamas Gergely <gertom@inf.u-szeged.hu> on 2013-10-31
Reviewed by Ryosuke Niwa.

The --force switch of new-run-webkit-tests is now forces all tests to
be run with 'PASS' as expected result.

* Scripts/webkitpy/layout_tests/controllers/manager.py:
(Manager.run):
* Scripts/webkitpy/layout_tests/models/test_expectations.py:
(TestExpectations.__init__):
(TestExpectations._add_expectations):
* Scripts/webkitpy/layout_tests/run_webkit_tests.py:
(parse_args):
(_set_up_derived_options):

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