WebKit-https.git
4 years agoAdd ChromeClient::isPlayingAudioDidChange().
adachan@apple.com [Mon, 6 Oct 2014 21:36:31 +0000 (21:36 +0000)]
Add ChromeClient::isPlayingAudioDidChange().
https://bugs.webkit.org/show_bug.cgi?id=137220

Reviewed by Jer Noble.

This is called when the Page's m_isPlayingAudio changes.

No new tests, no behavior change.

* page/ChromeClient.h:
(WebCore::ChromeClient::isPlayingAudioDidChange):
* page/Page.cpp:
(WebCore::Page::updateIsPlayingAudio):

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

4 years agoOne more case of incorrect comparison in recordpatchevent.py
ap@apple.com [Mon, 6 Oct 2014 20:58:26 +0000 (20:58 +0000)]
One more case of incorrect comparison in recordpatchevent.py
https://bugs.webkit.org/show_bug.cgi?id=137459

Reviewed by Tim Horton.

* QueueStatusServer/app.yaml:
* QueueStatusServer/loggers/recordpatchevent.py:
(RecordPatchEvent.started):

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

4 years agoUnreviewed, rolling out r174336.
benjamin@webkit.org [Mon, 6 Oct 2014 20:45:02 +0000 (20:45 +0000)]
Unreviewed, rolling out r174336.

Mozilla's Dromaeo still relies on the deprecated function.

Reverted changeset:

"Add a deprecation warning for Element.webkitMatchesSelector"
https://bugs.webkit.org/show_bug.cgi?id=137417
http://trac.webkit.org/changeset/174336

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

4 years agoRemove incorrect assertion.
oliver@apple.com [Mon, 6 Oct 2014 20:42:21 +0000 (20:42 +0000)]
Remove incorrect assertion.

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

4 years agoFix cloop build.
oliver@apple.com [Mon, 6 Oct 2014 20:27:16 +0000 (20:27 +0000)]
Fix cloop build.

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

4 years agoUnreviewed build fix.
mark.lam@apple.com [Mon, 6 Oct 2014 20:18:05 +0000 (20:18 +0000)]
Unreviewed build fix.
<https://webkit.org/b/137279>

* jit/CCallHelpers.h:
(JSC::CCallHelpers::setupArgumentsWithExecState):

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

4 years agoREGRESSION(r174226): [JSC] Crash when running the perf test Speedometer/Full.html
oliver@apple.com [Mon, 6 Oct 2014 19:29:27 +0000 (19:29 +0000)]
REGRESSION(r174226): [JSC] Crash when running the perf test Speedometer/Full.html
https://bugs.webkit.org/show_bug.cgi?id=137404

Reviewed by Michael Saboff.

Update the Arguments object to recognise that it must always have an
environment record if the referenced callee has one, and if such is not
present it should not try to extract one from the callframe, as that
path leads to madness.

Happily this makes some of the other code more sensible, and removes a
bunch of unnecessary and icky logic.

* interpreter/Interpreter.cpp:
(JSC::unwindCallFrame):
* jit/JITOperations.cpp:
* llint/LLIntSlowPaths.cpp:
(JSC::LLInt::LLINT_SLOW_PATH_DECL):
* runtime/Arguments.cpp:
(JSC::Arguments::tearOff):
(JSC::Arguments::didTearOffActivation): Deleted.
* runtime/Arguments.h:
(JSC::Arguments::argument):
(JSC::Arguments::finishCreation):

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

4 years agoUse is<>() / downcast<>() for CryptoKey subclasses
cdumez@apple.com [Mon, 6 Oct 2014 19:20:19 +0000 (19:20 +0000)]
Use is<>() / downcast<>() for CryptoKey subclasses
https://bugs.webkit.org/show_bug.cgi?id=137436

Reviewed by Ryosuke Niwa.

Use is<>() / downcast<>() for CryptoKey subclasses.

No new tests, no behavior change.

* bindings/js/JSCryptoKeySerializationJWK.cpp:
(WebCore::addJWKAlgorithmToJSON):
* bindings/js/SerializedScriptValue.cpp:
(WebCore::CloneSerializer::write):
* crypto/CryptoKey.h:
* crypto/algorithms/CryptoAlgorithmAES_CBC.cpp:
(WebCore::CryptoAlgorithmAES_CBC::keyAlgorithmMatches):
(WebCore::CryptoAlgorithmAES_CBC::encrypt):
(WebCore::CryptoAlgorithmAES_CBC::decrypt):
* crypto/algorithms/CryptoAlgorithmAES_KW.cpp:
(WebCore::CryptoAlgorithmAES_KW::keyAlgorithmMatches):
(WebCore::CryptoAlgorithmAES_KW::encryptForWrapKey):
(WebCore::CryptoAlgorithmAES_KW::decryptForUnwrapKey):
* crypto/algorithms/CryptoAlgorithmHMAC.cpp:
(WebCore::CryptoAlgorithmHMAC::keyAlgorithmMatches):
(WebCore::CryptoAlgorithmHMAC::sign):
(WebCore::CryptoAlgorithmHMAC::verify):
* crypto/algorithms/CryptoAlgorithmRSAES_PKCS1_v1_5.cpp:
(WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::keyAlgorithmMatches):
(WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::encrypt):
(WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::decrypt):
* crypto/algorithms/CryptoAlgorithmRSASSA_PKCS1_v1_5.cpp:
(WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::keyAlgorithmMatches):
(WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::sign):
(WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::verify):
* crypto/algorithms/CryptoAlgorithmRSA_OAEP.cpp:
(WebCore::CryptoAlgorithmRSA_OAEP::keyAlgorithmMatches):
(WebCore::CryptoAlgorithmRSA_OAEP::encrypt):
(WebCore::CryptoAlgorithmRSA_OAEP::decrypt):
* crypto/keys/CryptoKeyAES.h:
(WebCore::isCryptoKeyAES): Deleted.
* crypto/keys/CryptoKeyHMAC.h:
(WebCore::isCryptoKeyHMAC): Deleted.
* crypto/keys/CryptoKeyRSA.h:
(WebCore::isCryptoKeyRSA): Deleted.

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

4 years agowebkit-queues PatchLog is incorrect for patches that took less than a second
ap@apple.com [Mon, 6 Oct 2014 19:09:55 +0000 (19:09 +0000)]
webkit-queues PatchLog is incorrect for patches that took less than a second
https://bugs.webkit.org/show_bug.cgi?id=137453

Reviewed by Tim Horton.

* QueueStatusServer/app.yaml: Updated app version.

* QueueStatusServer/loggers/recordpatchevent.py: (RecordPatchEvent.stopped):
Don't bail out for patches that took 0 seconds to process (as frequently happens
when a patch is obsolete).

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

4 years agoSome compositing logic cleanup
simon.fraser@apple.com [Mon, 6 Oct 2014 18:57:59 +0000 (18:57 +0000)]
Some compositing logic cleanup
https://bugs.webkit.org/show_bug.cgi?id=133060

Reviewed by Zalan Bujtas.

Move compositing-related code from RenderLayer::styleChanged() to
RenderLayerCompositor::layerStyleChanged(). Combine various tests
(many clip-related) for changes that require layer rebuilding into
styleChangeRequiresLayerRebuild().

Remove code that calls setBackingNeedsRepaint() after filters change
between being composited or not; I verified that existing "repaint after
style change" code takes care those repaints.

* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::calculateClipRects):
(WebCore::RenderLayer::checkIfDescendantClippingContextNeedsUpdate): Deleted.
* rendering/RenderLayer.h:
* rendering/RenderLayerCompositor.cpp:
(WebCore::checkIfDescendantClippingContextNeedsUpdate):
(WebCore::styleChangeRequiresLayerRebuild):
(WebCore::RenderLayerCompositor::layerStyleChanged):
* rendering/RenderLayerCompositor.h:

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

4 years agoFix the iOS build after https://trac.webkit.org/changeset/174353.
adachan@apple.com [Mon, 6 Oct 2014 18:56:44 +0000 (18:56 +0000)]
Fix the iOS build after https://trac.webkit.org/changeset/174353.

* platform/audio/ios/AudioDestinationIOS.h:

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

4 years agoBuild fix.
mitz@apple.com [Mon, 6 Oct 2014 18:39:08 +0000 (18:39 +0000)]
Build fix.

* Misc/WebCache.mm:
(+[WebCache imageForURL:]):

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

4 years agoImplement Page::isPlayingAudio().
adachan@apple.com [Mon, 6 Oct 2014 18:22:27 +0000 (18:22 +0000)]
Implement Page::isPlayingAudio().
https://bugs.webkit.org/show_bug.cgi?id=137218

Reviewed by Eric Carlson.

- Add a hasMediaCharacteristics() method to MediaSession. There are three characteristics:
audible, visual, and legible. MediaSession gets the media characteristics information from
its MediaSessionClient.
- Add a mediaStateDidChange() method to MediaSessionClient that MediaSession can call when its
state changes.
- Each Document keeps a set of MediaSessions it contains. When that set changes, or when a MediaSession
changes state, or when its characteristics change, Document::updateIsPlayingAudio() is called. That method
iterates through all its MediaSessions to check if the overall isPlayingAudio state has changed in the Document.
- Each Page caches its overall isPlayingAudio state. Whenever a Document's isPlayingAudio state changes,
it calls Page::updateIsPlayingAudio() which iterates through its frames' documents to calculate its
overall isPlayingAudio state.

No new tests, no behavior change.

* dom/Document.cpp:
(WebCore::Document::Document):
Initialize m_isPlayingAudio.
(WebCore::Document::registerMediaSession):
Add the MediaSession to m_mediaSessions. Call updateIsPlayingAudio().
(WebCore::Document::unregisterMediaSession):
Remove the MediaSession from m_mediaSessions. Call updateIsPlayingAudio().
(WebCore::Document::updateIsPlayingAudio):
Go through all the MediaSessions in this Document and check if any has the Audible characteristic
and is playing. If the overall isPlayingAudio state changes, call Page::updateIsPlayingAudio().
* dom/Document.h:
(WebCore::Document::isPlayingAudio):

* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::registerWithDocument):
Call Document::registerMediaSession().
(WebCore::HTMLMediaElement::unregisterWithDocument):
Call Document::unregisterMediaSession().
(WebCore::HTMLMediaElement::mediaPlayerCharacteristicChanged):
Call Document::updateIsPlayingAudio().
(WebCore::HTMLMediaElement::stop):
Call MediaSession::clientWillPausePlayback() so the MediaSession's state can be set back to Paused.
(WebCore::HTMLMediaElement::hasMediaCharacteristics):
Call hasAudio() to check if the HTMLMediaElement has the Audible characteristic. Call hasVideo()
to check if it has the Visual characteristic. Call hasClosedCaptions() to check if it has the
Legible characteristic.
(WebCore::HTMLMediaElement::mediaStateDidChange):
Call Document::updateIsPlayingAudio().
* html/HTMLMediaElement.h:

* page/Page.cpp:
(WebCore::Page::Page):
Initialize m_isPlayingAudio.
(WebCore::Page::updateIsPlayingAudio):
Iterate through all its frames' documents to check if any has audio playing. If the overall isPlayingAudio
state has changed, update m_isPlayingAudio.
* page/Page.h:
(WebCore::Page::isPlayingAudio):

* platform/audio/MediaSession.cpp:
(WebCore::MediaSession::setState):
If the MediaSession's state has changed, call Document::updateIsPlayingAudio().
(WebCore::MediaSession::hasMediaCharacteristics):
Call MediaSessionClient::hasMediaCharacteristics().
* platform/audio/MediaSession.h:
(WebCore::MediaSessionClient::mediaStateDidChange):

* platform/audio/mac/AudioDestinationMac.h:
AudioDestination only has the Audible characteristic.

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

4 years agoUnreviewed build fix after r174333.
cdumez@apple.com [Mon, 6 Oct 2014 18:09:20 +0000 (18:09 +0000)]
Unreviewed build fix after r174333.

Forgot explicit WebCore:: namespace.

* Misc/WebCache.mm:
(+[WebCache imageForURL:]):

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

4 years agoUse is<>() / downcast<>() for ScrollingTree subclasses
cdumez@apple.com [Mon, 6 Oct 2014 18:08:42 +0000 (18:08 +0000)]
Use is<>() / downcast<>() for ScrollingTree subclasses
https://bugs.webkit.org/show_bug.cgi?id=137449

Reviewed by Ryosuke Niwa.

Use is<>() / downcast<>() for ScrollingTree subclasses.

Source/WebCore:

No new tests, no behavior change.

* page/scrolling/ScrollingTree.h:
* page/scrolling/ThreadedScrollingTree.h:
* page/scrolling/ios/ScrollingTreeIOS.h:
* page/scrolling/mac/ScrollingCoordinatorMac.mm:
(WebCore::ScrollingCoordinatorMac::handleWheelEvent):
(WebCore::ScrollingCoordinatorMac::commitTreeState):

Source/WebKit2:

* UIProcess/Scrolling/RemoteScrollingTree.h:
* WebProcess/WebPage/EventDispatcher.cpp:
(WebKit::EventDispatcher::addScrollingTreeForPage):

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

4 years ago[Win] Build fix aftr r174347.
bfulgham@apple.com [Mon, 6 Oct 2014 18:01:20 +0000 (18:01 +0000)]
[Win] Build fix aftr r174347.

* platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp: Use correct build
macro to prevent build break when ENCRYPTED_MEDIA_V2 is not enabled.

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

4 years ago[Windows] Skip remaining failing media tests after adding audio devices to the bots...
roger_fong@apple.com [Mon, 6 Oct 2014 17:55:54 +0000 (17:55 +0000)]
[Windows] Skip remaining failing media tests after adding audio devices to the bots Part 2.
* platform/win/TestExpectations:

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

4 years ago[Win] Project file gardening.
bfulgham@apple.com [Mon, 6 Oct 2014 17:55:09 +0000 (17:55 +0000)]
[Win] Project file gardening.

* WTF.vcxproj/WTF.vcxproj.filters: Move HashMethod.h and
FastBitVector.cpp to proper places in hierarchy.

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

4 years ago[Win] Project file gardening.
bfulgham@apple.com [Mon, 6 Oct 2014 17:53:20 +0000 (17:53 +0000)]
[Win] Project file gardening.

* WebCore.vcxproj/WebCore.vcxproj.filters: Move EditorWin.cpp and
  MediatTimeAVFoundation to proper folder locations in project.

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

4 years ago[Win] Extend AVFoundationCF Media Implementation
bfulgham@apple.com [Mon, 6 Oct 2014 17:49:24 +0000 (17:49 +0000)]
[Win] Extend AVFoundationCF Media Implementation
https://bugs.webkit.org/show_bug.cgi?id=137409

Reviewed by Eric Carlson.

This code is not yet being built and tested by our system. Appropriate
tests will be activated when we enable the build.

Most of this patch involves correcting some misuse of the AVFoundationCF API.
1. It is never appropriate in AVCF to pass a null CFErrorRef; instead you must
   pass a CFErrorRef with error type kCFURLErrorUnknown.
2. Because of the asynchronous way we handle the request/response, it is possible
   for AVCF to make two AVCF requests while negotiating the key exchange.

* platform/graphics/avfoundation/cf/AVFoundationCFSoftLinking.h: Add
missing declaration.
* platform/graphics/avfoundation/cf/CDMSessionAVFoundationCF.cpp:
(WebCore::CDMSessionAVFoundationCF::generateKeyRequest): Tighten up scope
of 'underlyingError'.
(WebCore::CDMSessionAVFoundationCF::update): Add call to complete the
loading process.
* platform/graphics/avfoundation/cf/InbandTextTrackPrivateAVCF.cpp:
(WebCore::InbandTextTrackPrivateAVCF::label): Handle null titles CFArray
found during testing.
(WebCore::InbandTextTrackPrivateAVCF::language): Ditto for a null locale.
* platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
(WebCore::MediaPlayerPrivateAVFoundationCF::registerMediaEngine): Add support
for the new 'supportsKeySystem' method.
(WebCore::MediaPlayerPrivateAVFoundationCF::createContextVideoRenderer): Add
assertion for mainThread.
(WebCore::MediaPlayerPrivateAVFoundationCF::destroyContextVideoRenderer): Ditto.
(WebCore::MediaPlayerPrivateAVFoundationCF::createVideoLayer): Ditto.
(WebCore::MediaPlayerPrivateAVFoundationCF::destroyVideoLayer): Ditto.
(WebCore::MediaPlayerPrivateAVFoundationCF::createAVPlayer): Ditto.
(WebCore::MediaPlayerPrivateAVFoundationCF::createAVPlayerItem): Ditto.
(WebCore::MediaPlayerPrivateAVFoundationCF::platformLayer): Ditto.
(WebCore::MediaPlayerPrivateAVFoundationCF::platformSetVisible): Ditto.
(WebCore::MediaPlayerPrivateAVFoundationCF::paintCurrentFrameInContext): Ditto.
(WebCore::MediaPlayerPrivateAVFoundationCF::paint): Ditto.
(WebCore::MediaPlayerPrivateAVFoundationCF::supportsKeySystem): Added.
(WebCore::MediaPlayerPrivateAVFoundationCF::sizeChanged): Add assertion that this
is being called on the main thread.
(WebCore::MediaPlayerPrivateAVFoundationCF::processMediaSelectionOptions): Handle
the allows empty media selection properly based on test behavior.
(WebCore::AVFWrapper::AVFWrapper): Initialize resource loader callback structure
when building with AVFOUNDATION_LOADER_DELEGATE.
(WebCore::AVFWrapper::createAssetForURL): Use AVFWrapper's loader callback struct,
rather than passing the address of a temporary value.
(WebCore::AVFWrapper::processNotification): Stop using the deprecated
'dispatch_get_current_queue' function.
(WebCore::AVFWrapper::processCue): Ditto.
(WebCore::AVFWrapper::legibleOutputCallback): Ditto.
(WebCore::AVFWrapper::processShouldWaitForLoadingOfResource): Pass a valid CFError
object; nullptr is not allowed as an argument to the "...FinishedLoadingWithError"
method.
(WebCore::AVFWrapper::shouldWaitForLoadingOfResource): Add support for multiple
in-flight requests.
(WebCore::AVFWrapper::platformLayer): Assert we are on the main thread.
(WebCore::AVFWrapper::setRequestForKey): Add support for multiple in-flight requests.
(WebCore::AVFWrapper::takeRequestForKeyURI): Ditto.
(WebCore::LayerClient::platformCALayerLayoutSublayersOfLayer): Ditto.
* platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.h:
* platform/graphics/avfoundation/cf/WebCoreAVCFResourceLoader.cpp: Make sure we pass
valid CFError objects, rather than nullptr.

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

4 years agoAX: Performance: Certain Web site causes Safari to hang completely while entering...
cfleizach@apple.com [Mon, 6 Oct 2014 16:39:54 +0000 (16:39 +0000)]
AX: Performance: Certain Web site causes Safari to hang completely while entering form data
https://bugs.webkit.org/show_bug.cgi?id=137420

Reviewed by Mario Sanchez Prada.

If a website has multiple nested tables that are not "accessibility" tables, the performance of accessibility slows to a crawl because:
  1) We are re-computing accessibilityIsIgnored many times.
       As a solution, we can enable the isIgnoredCache when updating children.
  2) When asking if an object isTableCell, we'd go up the parent chain, asking each of those parents the same question, which exploded into calling this many times.
      As a solution, I've changed our determination of isTableCell to instead check if the parent is an accessibiltyTable which should be much faster.

No new functionality. Existing tests cover changes.

* accessibility/AccessibilityObject.cpp:
(WebCore::AccessibilityObject::updateChildrenIfNecessary):
(WebCore::AccessibilityObject::accessibilityIsIgnored):
* accessibility/AccessibilityTableCell.cpp:
(WebCore::AccessibilityTableCell::parentTable):
(WebCore::AccessibilityTableCell::isTableCell):

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

4 years agoUnreviewed, touch testing/Internals.idl to try to fix Windows EWS after r174315.
ossy@webkit.org [Mon, 6 Oct 2014 16:25:51 +0000 (16:25 +0000)]
Unreviewed, touch testing/Internals.idl to try to fix Windows EWS after r174315.

* testing/Internals.idl: Remove unnecessary whitespaces.

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

4 years agoEWS bubble hover shows wrong timestamps
ossy@webkit.org [Mon, 6 Oct 2014 14:34:59 +0000 (14:34 +0000)]
EWS bubble hover shows wrong timestamps
https://bugs.webkit.org/show_bug.cgi?id=137252

Reviewed by Alexey Proskuryakov.

Add "Z" suffix to timestamps to make sure if it is handled as UTC time.

* QueueStatusServer/handlers/queuestatusjson.py:
(QueueStatusJSON.get):
* QueueStatusServer/handlers/statusbubble.py:
(StatusBubble._iso_time):

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

4 years agoUnreviewed, updated list of email addresses in contributors.json
mario@webkit.org [Mon, 6 Oct 2014 12:47:26 +0000 (12:47 +0000)]
Unreviewed, updated list of email addresses in contributors.json

* Scripts/webkitpy/common/config/contributors.json: Added my former
email address in Igalia, for the sake of completeness.

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

4 years agoUnreviewed, moved myself to the list of committers.
zsborbely.u-szeged@partner.samsung.com [Mon, 6 Oct 2014 09:10:55 +0000 (09:10 +0000)]
Unreviewed, moved myself to the list of committers.

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

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

4 years agoUse is<>() / downcast<>() for ScrollingCoordinator / ScrollingStateNode subclasses
cdumez@apple.com [Mon, 6 Oct 2014 05:14:36 +0000 (05:14 +0000)]
Use is<>() / downcast<>() for ScrollingCoordinator / ScrollingStateNode subclasses
https://bugs.webkit.org/show_bug.cgi?id=137440

Reviewed by Ryosuke Niwa.

Use is<>() / downcast<>() for ScrollingCoordinator / ScrollingStateNode subclasses.

Source/WebCore:

No new tests, no behavior change.

* page/scrolling/AsyncScrollingCoordinator.cpp:
(WebCore::AsyncScrollingCoordinator::frameViewLayoutUpdated):
(WebCore::AsyncScrollingCoordinator::frameViewRootLayerDidChange):
(WebCore::AsyncScrollingCoordinator::requestScrollPositionUpdate):
(WebCore::AsyncScrollingCoordinator::updateFrameScrollingNode):
(WebCore::AsyncScrollingCoordinator::updateOverflowScrollingNode):
(WebCore::AsyncScrollingCoordinator::updateViewportConstrainedNode):
(WebCore::AsyncScrollingCoordinator::recomputeWheelEventHandlerCountForFrameView):
* page/scrolling/AsyncScrollingCoordinator.h:
* page/scrolling/ScrollingCoordinator.h:
* page/scrolling/ScrollingStateFixedNode.h:
* page/scrolling/ScrollingStateFrameScrollingNode.h:
* page/scrolling/ScrollingStateNode.h:
* page/scrolling/ScrollingStateOverflowScrollingNode.h:
* page/scrolling/ScrollingStateScrollingNode.h:
* page/scrolling/ScrollingStateStickyNode.h:
* page/scrolling/ScrollingTreeFrameScrollingNode.cpp:
(WebCore::ScrollingTreeFrameScrollingNode::updateBeforeChildren):
* page/scrolling/ScrollingTreeScrollingNode.cpp:
(WebCore::ScrollingTreeScrollingNode::updateBeforeChildren):
(WebCore::ScrollingTreeScrollingNode::updateAfterChildren):
* page/scrolling/coordinatedgraphics/ScrollingCoordinatorCoordinatedGraphics.cpp:
(WebCore::ScrollingCoordinatorCoordinatedGraphics::updateViewportConstrainedNode):
* page/scrolling/ios/ScrollingTreeFrameScrollingNodeIOS.mm:
(WebCore::ScrollingTreeFrameScrollingNodeIOS::updateBeforeChildren):
(WebCore::ScrollingTreeFrameScrollingNodeIOS::updateAfterChildren):
* page/scrolling/mac/ScrollingTreeFixedNode.mm:
(WebCore::ScrollingTreeFixedNode::updateBeforeChildren):
* page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm:
(WebCore::ScrollingTreeFrameScrollingNodeMac::updateBeforeChildren):
(WebCore::ScrollingTreeFrameScrollingNodeMac::updateAfterChildren):
* page/scrolling/mac/ScrollingTreeStickyNode.mm:
(WebCore::ScrollingTreeStickyNode::updateBeforeChildren):

Source/WebKit2:

* Shared/Scrolling/RemoteScrollingCoordinatorTransaction.cpp:
(WebKit::encodeNodeAndDescendants):
(WebKit::RemoteScrollingCoordinatorTransaction::decode):
(WebKit::RemoteScrollingTreeTextStream::dump):
* UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.cpp:
(WebKit::RemoteScrollingCoordinatorProxy::connectStateNodeLayers):
* UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.mm:
(WebKit::ScrollingTreeOverflowScrollingNodeIOS::updateBeforeChildren):
(WebKit::ScrollingTreeOverflowScrollingNodeIOS::updateAfterChildren):
* UIProcess/ios/RemoteScrollingCoordinatorProxyIOS.mm:
(WebKit::RemoteScrollingCoordinatorProxy::connectStateNodeLayers):
* WebProcess/Scrolling/RemoteScrollingCoordinator.h:
* WebProcess/WebPage/EventDispatcher.cpp:
(WebKit::EventDispatcher::addScrollingTreeForPage):
* WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
(WebKit::RemoteLayerTreeDrawingArea::flushLayers):
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
(WebKit::TiledCoreAnimationDrawingArea::updatePreferences):

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

4 years agoUse is<>() / downcast<>() for CachedRawResource
cdumez@apple.com [Mon, 6 Oct 2014 05:13:09 +0000 (05:13 +0000)]
Use is<>() / downcast<>() for CachedRawResource
https://bugs.webkit.org/show_bug.cgi?id=137439

Reviewed by Ryosuke Niwa.

Use is<>() / downcast<>() for CachedRawResource.

No new tests, no behavior change.

* inspector/InspectorResourceAgent.cpp:
(WebCore::InspectorResourceAgent::didLoadResourceFromMemoryCache):
* loader/cache/CachedRawResource.cpp:
(WebCore::CachedRawResource::switchClientsToRevalidatedResource):
* loader/cache/CachedRawResource.h:
(isType):
* loader/cache/CachedResourceLoader.cpp:
(WebCore::CachedResourceLoader::requestRawResource):
(WebCore::CachedResourceLoader::requestMainResource):

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

4 years agoUse is<>() / downcast<>() for TextTrack subclasses
cdumez@apple.com [Mon, 6 Oct 2014 05:10:55 +0000 (05:10 +0000)]
Use is<>() / downcast<>() for TextTrack subclasses
https://bugs.webkit.org/show_bug.cgi?id=137438

Reviewed by Ryosuke Niwa.

Use is<>() / downcast<>() for TextTrack subclasses.

No new tests, no behavior change.

* Modules/mediasource/SourceBuffer.cpp:
(WebCore::SourceBuffer::sourceBufferPrivateDidReceiveInitializationSegment):
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::parseAttribute):
* html/track/InbandTextTrack.h:
(isType):
* html/track/LoadableTextTrack.h:
(isType):
* html/track/TextTrackList.cpp:
(TextTrackList::getTrackIndex):
(TextTrackList::append): Deleted.

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

4 years agoUse is<>() / downcast<>() for CryptoKeyData subclasses
cdumez@apple.com [Mon, 6 Oct 2014 05:08:31 +0000 (05:08 +0000)]
Use is<>() / downcast<>() for CryptoKeyData subclasses
https://bugs.webkit.org/show_bug.cgi?id=137437

Reviewed by Ryosuke Niwa.

Use is<>() / downcast<>() for CryptoKeyData subclasses.

No new tests, no behavior change.

* bindings/js/JSCryptoKeySerializationJWK.cpp:
(WebCore::JSCryptoKeySerializationJWK::serialize):
* bindings/js/SerializedScriptValue.cpp:
(WebCore::CloneSerializer::write):
* crypto/CryptoKeyData.h:
* crypto/algorithms/CryptoAlgorithmAES_CBC.cpp:
(WebCore::CryptoAlgorithmAES_CBC::importKey):
* crypto/algorithms/CryptoAlgorithmAES_KW.cpp:
(WebCore::CryptoAlgorithmAES_KW::importKey):
* crypto/algorithms/CryptoAlgorithmHMAC.cpp:
(WebCore::CryptoAlgorithmHMAC::importKey):
* crypto/algorithms/CryptoAlgorithmRSAES_PKCS1_v1_5.cpp:
(WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::importKey):
* crypto/algorithms/CryptoAlgorithmRSASSA_PKCS1_v1_5.cpp:
(WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::importKey):
* crypto/algorithms/CryptoAlgorithmRSA_OAEP.cpp:
(WebCore::CryptoAlgorithmRSA_OAEP::importKey):
* crypto/keys/CryptoKeyDataOctetSequence.h:
(WebCore::isCryptoKeyDataOctetSequence): Deleted.
* crypto/keys/CryptoKeyDataRSAComponents.h:
(WebCore::isCryptoKeyDataRSAComponents): Deleted.
* crypto/keys/CryptoKeySerializationRaw.cpp:
(WebCore::CryptoKeySerializationRaw::serialize):

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

4 years agoAdd a deprecation warning for Element.webkitMatchesSelector
benjamin@webkit.org [Mon, 6 Oct 2014 02:08:53 +0000 (02:08 +0000)]
Add a deprecation warning for Element.webkitMatchesSelector
https://bugs.webkit.org/show_bug.cgi?id=137417

Patch by Benjamin Poulain <bpoulain@apple.com> on 2014-10-05
Reviewed by Christophe Dumez.

Source/WebCore:

Many scripts have assumed that the unprefixed version of ElementwebkitMatchesSelector
would be Element.matchesSelector. Feature detection scripts too often test
for Element.matchesSelector instead of Element.matches before calling Element.webkitMatchesSelector.

This patch add a deprecation warning for Element.webkitMatchesSelector with the hope
that it will push the adoption of the unprefixed version.

* dom/Element.cpp:
(WebCore::Element::webkitMatchesSelector):
* dom/Element.h:
* dom/Element.idl:

LayoutTests:

* jquery/resources/src/sizzle/sizzle.js:
This is a great example of library that needs fixing. The old sizzle
we have in WebKit used "matchesSelector" instead of "matches".

* fast/dom/SelectorAPI/attrname-case-insensitive-expected.txt:
* fast/dom/SelectorAPI/attrname-case-sensitive-expected.txt:
* fast/dom/SelectorAPI/caseID-almost-strict-expected.txt:
* fast/dom/SelectorAPI/caseID-expected.txt:
* fast/dom/SelectorAPI/caseID-strict-expected.txt:
* fast/dom/SelectorAPI/caseTag-expected.txt:
* fast/dom/SelectorAPI/caseTagX-expected.txt:
* fast/dom/SelectorAPI/detached-element-expected.txt:
* fast/dom/SelectorAPI/not-supported-namespace-in-selector-expected.txt:
* fast/dom/SelectorAPI/undefined-null-stringify-expected.txt:
Update the test results due to the warning.

* fast/forms/radio/radio-live-validation-style-expected.txt:
* fast/forms/radio/radio-live-validation-style.html:
That duplicate I added back when I unprefixed Element.matches() is useless.

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

4 years ago[EFL] Introduce EWebKit_Extension
ryuan.choi@gmail.com [Mon, 6 Oct 2014 00:47:04 +0000 (00:47 +0000)]
[EFL] Introduce EWebKit_Extension
https://bugs.webkit.org/show_bug.cgi?id=134921

Reviewed by Gyuyoung Kim.

Source/WebKit2:

EWebKit2 does not provide the functionality to extend WebProcess.
Although there is ewk_context_new_with_injected_bundle_path() in ewebkit2 APIs,
application developers can not make bundle object without touching WK APIs
which ewebkit2 does not expose.

This patch introduces EWebKit_Extension, basic structure for the extension of WebProcess.

* PlatformEfl.cmake:
Added files for the EWebKit_Extension and install them properly.
* UIProcess/API/efl/ewk_context.cpp:
(EwkContext::EwkContext):
(bundlePathForExtension):
(EwkContext::create):
(EwkContext::getInjectedBundleInitializationUserData):
(EwkContext::setMessageFromInjectedBundleCallback):
(ewk_context_new_with_extensions_path):
Deleted because ewebkit2 does not have a way to make injected bundle.
Instead, Ewk_Extension will cover the same functionalities.
(ewk_context_new_with_injected_bundle_path): Deleted.
* UIProcess/API/efl/ewk_context.h:
* UIProcess/API/efl/ewk_context_private.h:
(EwkContext::extensionsPath):
* UIProcess/API/efl/tests/InjectedBundle/injected_bundle_sample.cpp: Removed.
* UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestEnvironment.cpp:
(EWK2UnitTest::EWK2UnitTestEnvironment::extensionSample):
(EWK2UnitTest::EWK2UnitTestEnvironment::injectedBundleSample): Renamed injectedBundleSample to extensionSample.
* UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestEnvironment.h:
* UIProcess/API/efl/tests/extensions/extension_sample.cpp: Copied from Source/WebKit2/UIProcess/API/efl/tests/InjectedBundle/injected_bundle_sample.cpp.
* UIProcess/API/efl/tests/test_ewk2_context.cpp: Renamed ewk_context_new_with_injected_bundle_path to ewk_context_new_with_extensions_path.
(TEST_F):
* WebProcess/InjectedBundle/API/efl/EWebKit_Extension.h: Added.
* WebProcess/InjectedBundle/API/efl/ewk_extension.cpp: Added.
(EwkExtension::append):
(EwkExtension::remove):
(ewk_extension_client_add):
(ewk_extension_client_del):
* WebProcess/InjectedBundle/API/efl/ewk_extension.h: Added.
* WebProcess/InjectedBundle/API/efl/ewk_extension_private.h: Added.
(EwkExtension::EwkExtension):
(EwkExtension::~EwkExtension):
* WebProcess/efl/ExtensionManagerEfl.cpp: Added.
(WebKit::ExtensionManagerEfl::shared):
(WebKit::ExtensionManagerEfl::ExtensionManagerEfl):
(WebKit::ExtensionManagerEfl::initialize):
* WebProcess/efl/ExtensionManagerEfl.h: Added.
* WebProcess/efl/WebInjectedBundleMainEfl.cpp: Added.
(WKBundleInitialize):
* efl/ewebkit2-extension.pc.in: Added.

Tools:

* MiniBrowser/efl/main.c: Added x option to test extension path.
(window_create):
(elm_main):
* Scripts/webkitpy/common/config/watchlist:
Added Source/WebKit2/WebProcess/InjectedBundle/API/efl/ into EFLWebKit2PublicAPI.
* Scripts/webkitpy/style/checker.py:
Added Source/WebKit2/WebProcess/InjectedBundle/API/efl/ into EFL exceptions.

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

4 years agoElement.matches()'s argument is not supposed to be optional
benjamin@webkit.org [Mon, 6 Oct 2014 00:41:09 +0000 (00:41 +0000)]
Element.matches()'s argument is not supposed to be optional
https://bugs.webkit.org/show_bug.cgi?id=137427

Reviewed by Christophe Dumez.

Source/WebCore:

The argument was marked as optional, it is not supposed to:
https://dom.spec.whatwg.org/#interface-element

Also update the webkit-prefixed version: webkitMatchesSelector().

Tests: fast/dom/SelectorAPI/closest-definition.html
       fast/dom/SelectorAPI/closest-null-undefined.html
       fast/dom/SelectorAPI/matches-definition.html
       fast/dom/SelectorAPI/matches-null-undefined.html

* dom/Element.idl:

LayoutTests:

* fast/dom/SelectorAPI/matches-definition.html: Added.
* fast/dom/SelectorAPI/matches-null-undefined.html: Added.
Test for the bug.

* fast/dom/SelectorAPI/closest-definition.html: Added.
* fast/dom/SelectorAPI/closest-null-undefined.html: Added.
Similar tests for Element.closest() since those are similar APIs.

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

4 years agoUse is<>() / downcast<>() for CachedResource subclasses
cdumez@apple.com [Mon, 6 Oct 2014 00:31:05 +0000 (00:31 +0000)]
Use is<>() / downcast<>() for CachedResource subclasses
https://bugs.webkit.org/show_bug.cgi?id=137431

Reviewed by Benjamin Poulain.

Use is<>() / downcast<>() for CachedResource subclasses.

Source/WebCore:

No new tests, no behavior change.

* inspector/InspectorPageAgent.cpp:
(WebCore::InspectorPageAgent::cachedResourceContent):
* loader/cache/CachedCSSStyleSheet.h:
* loader/cache/CachedFont.h:
* loader/cache/CachedImage.cpp:
(WebCore::CachedImage::switchClientsToRevalidatedResource):
* loader/cache/CachedImage.h:
* loader/cache/CachedResource.h:
* loader/cache/CachedResourceLoader.cpp:
(WebCore::CachedResourceLoader::requestImage):
(WebCore::CachedResourceLoader::requestFont):
(WebCore::CachedResourceLoader::requestTextTrack):
(WebCore::CachedResourceLoader::requestCSSStyleSheet):
(WebCore::CachedResourceLoader::requestUserCSSStyleSheet):
(WebCore::CachedResourceLoader::requestScript):
(WebCore::CachedResourceLoader::requestXSLStyleSheet):
(WebCore::CachedResourceLoader::requestSVGDocument):
(WebCore::CachedResourceLoader::reloadImagesIfNotDeferred):
* loader/cache/CachedSVGDocument.h:
* loader/cache/CachedScript.h:
* loader/cache/CachedTextTrack.h:
* loader/cache/CachedXSLStyleSheet.h:
* loader/cache/MemoryCache.cpp:
(WebCore::MemoryCache::removeImageFromCache):

Source/WebKit/mac:

* Misc/WebCache.mm:
(+[WebCache imageForURL:]):

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

4 years agoUse is<>() / downcast<>() for StyleSheet subclasses
cdumez@apple.com [Mon, 6 Oct 2014 00:23:58 +0000 (00:23 +0000)]
Use is<>() / downcast<>() for StyleSheet subclasses
https://bugs.webkit.org/show_bug.cgi?id=137429

Reviewed by Benjamin Poulain.

Use is<>() / downcast<>() for StyleSheet subclasses.

No new tests, no behavior change.

* bindings/gobject/WebKitDOMPrivate.cpp:
(WebKit::wrap):
* css/CSSStyleSheet.h:
(isType):
* css/StyleSheet.h:
* dom/Document.cpp:
(WebCore::Document::applyXSLTransform):
* dom/DocumentStyleSheetCollection.cpp:
(WebCore::filterEnabledNonemptyCSSStyleSheets):
* dom/ProcessingInstruction.cpp:
(WebCore::ProcessingInstruction::parseStyleSheet):
* inspector/InspectorCSSAgent.cpp:
(WebCore::InspectorCSSAgent::getAllStyleSheets):
* xml/XSLStyleSheet.h:
(isType):

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

4 years agoUse is<>() / downcast<>() for CryptoAlgorithmParameters subclasses
cdumez@apple.com [Sun, 5 Oct 2014 23:27:48 +0000 (23:27 +0000)]
Use is<>() / downcast<>() for CryptoAlgorithmParameters subclasses
https://bugs.webkit.org/show_bug.cgi?id=137432

Reviewed by Benjamin Poulain.

Use is<>() / downcast<>() for CryptoAlgorithmParameters subclasses.

No new tests, no behavior change.

* bindings/js/JSCryptoKeySerializationJWK.cpp:
(WebCore::JSCryptoKeySerializationJWK::reconcileAlgorithm):
* crypto/CryptoAlgorithmParameters.h:
* crypto/algorithms/CryptoAlgorithmAES_CBC.cpp:
(WebCore::CryptoAlgorithmAES_CBC::encrypt):
(WebCore::CryptoAlgorithmAES_CBC::decrypt):
(WebCore::CryptoAlgorithmAES_CBC::generateKey):
* crypto/algorithms/CryptoAlgorithmAES_KW.cpp:
(WebCore::CryptoAlgorithmAES_KW::generateKey):
* crypto/algorithms/CryptoAlgorithmHMAC.cpp:
(WebCore::CryptoAlgorithmHMAC::sign):
(WebCore::CryptoAlgorithmHMAC::verify):
(WebCore::CryptoAlgorithmHMAC::generateKey):
(WebCore::CryptoAlgorithmHMAC::importKey):
* crypto/algorithms/CryptoAlgorithmRSAES_PKCS1_v1_5.cpp:
(WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::generateKey):
* crypto/algorithms/CryptoAlgorithmRSASSA_PKCS1_v1_5.cpp:
(WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::sign):
(WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::verify):
(WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::generateKey):
(WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::importKey):
* crypto/algorithms/CryptoAlgorithmRSA_OAEP.cpp:
(WebCore::CryptoAlgorithmRSA_OAEP::encrypt):
(WebCore::CryptoAlgorithmRSA_OAEP::decrypt):
(WebCore::CryptoAlgorithmRSA_OAEP::generateKey):
(WebCore::CryptoAlgorithmRSA_OAEP::importKey):
* crypto/parameters/CryptoAlgorithmAesCbcParams.h:
* crypto/parameters/CryptoAlgorithmAesKeyGenParams.h:
* crypto/parameters/CryptoAlgorithmHmacKeyParams.h:
* crypto/parameters/CryptoAlgorithmHmacParams.h:
* crypto/parameters/CryptoAlgorithmRsaKeyGenParams.h:
* crypto/parameters/CryptoAlgorithmRsaKeyParamsWithHash.h:
* crypto/parameters/CryptoAlgorithmRsaOaepParams.h:
* crypto/parameters/CryptoAlgorithmRsaSsaParams.h:

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

4 years agoAX: iOS8: Crash at -[WebAccessibilityObjectWrapper accessibilityElementAtIndex:]
cfleizach@apple.com [Sun, 5 Oct 2014 23:09:59 +0000 (23:09 +0000)]
AX: iOS8: Crash at -[WebAccessibilityObjectWrapper accessibilityElementAtIndex:]
https://bugs.webkit.org/show_bug.cgi?id=137289

Reviewed by Mario Sanchez Prada.

Source/WebCore:

Casting a NSInteger to an unsigned can bypass the check we were hoping to achieve,
because size_t is not the same as unsigned.

Test: platform/ios-sim/accessibility/out-of-bounds-child-access.html

* accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
(-[WebAccessibilityObjectWrapper accessibilityElementAtIndex:]):

LayoutTests:

* platform/ios-sim/accessibility/out-of-bounds-child-access-expected.txt: Added.
* platform/ios-sim/accessibility/out-of-bounds-child-access.html: Added.

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

4 years agoUse is<>() / downcast<>() for ElementData subclasses
cdumez@apple.com [Sun, 5 Oct 2014 22:14:47 +0000 (22:14 +0000)]
Use is<>() / downcast<>() for ElementData subclasses
https://bugs.webkit.org/show_bug.cgi?id=137430

Reviewed by Benjamin Poulain.

Use is<>() / downcast<>() for ElementData subclasses.

No new tests, no behavior change.

* dom/Element.cpp:
(WebCore::Element::cloneAttributesFromElement):
(WebCore::Element::createUniqueElementData):
* dom/ElementData.cpp:
(WebCore::ElementData::destroy):
* dom/ElementData.h:
(WebCore::ElementData::length):
(WebCore::ElementData::attributeBase):
(WebCore::ElementData::presentationAttributeStyle):
(WebCore::ElementData::attributesIterator):
(WebCore::ElementData::findAttributeByName):
(isType):

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

4 years ago[GTK] Fix build when DRAG_SUPPORT is disabled
commit-queue@webkit.org [Sun, 5 Oct 2014 11:28:30 +0000 (11:28 +0000)]
[GTK] Fix build when DRAG_SUPPORT is disabled
https://bugs.webkit.org/show_bug.cgi?id=137361

Patch by Lorenzo Tilve <ltilve@igalia.com> on 2014-10-05
Reviewed by Carlos Garcia Campos.

Flag out unbuildable code without DRAG_SUPPORT.

Source/WebCore:

* platform/gtk/GtkDragAndDropHelper.cpp:
* platform/gtk/GtkDragAndDropHelper.h:

Source/WebKit2:

* Shared/gtk/ArgumentCodersGtk.cpp:
* Shared/gtk/ArgumentCodersGtk.h:
* UIProcess/API/gtk/PageClientImpl.cpp:
* UIProcess/API/gtk/PageClientImpl.h:
* UIProcess/API/gtk/WebKitWebViewBase.cpp:
(webkitWebViewBaseConstructed):
* UIProcess/PageClient.h:

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

4 years ago[GTK] The new web inspector can't be docked again once undocked
carlosgc@webkit.org [Sun, 5 Oct 2014 08:17:51 +0000 (08:17 +0000)]
[GTK] The new web inspector can't be docked again once undocked
https://bugs.webkit.org/show_bug.cgi?id=121544

Reviewed by Martin Robinson.

Use a GtkHeaderBar for the inspector window to add dock buttons
when building with GTK+ >= 3.10.

* UIProcess/WebInspectorProxy.cpp:
(WebKit::WebInspectorProxy::WebInspectorProxy):
* UIProcess/WebInspectorProxy.h:
* UIProcess/gtk/WebInspectorProxyGtk.cpp:
(WebKit::WebInspectorProxy::dockButtonClicked):
(WebKit::WebInspectorProxy::createInspectorWindow):
(WebKit::WebInspectorProxy::updateInspectorWindowTitle):
(WebKit::WebInspectorProxy::platformInspectedURLChanged):
(WebKit::WebInspectorProxy::platformAttachAvailabilityChanged):

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

4 years ago[GTK] Do not generate a symlink in derived sources for every header in WebCore/bindin...
carlosgc@webkit.org [Sun, 5 Oct 2014 07:41:13 +0000 (07:41 +0000)]
[GTK] Do not generate a symlink in derived sources for every header in WebCore/bindings/gobject
https://bugs.webkit.org/show_bug.cgi?id=137389

Reviewed by Martin Robinson.

We only need a symlink for static sources that are included in
public generated headers, because they are added with as
<webkitdom/WebKitDOMFoo.h> so they need to be inside a webkitdom
directory. Also use proper targets and commands to create the
symlinks only when needed instead of for every build.

* PlatformGTK.cmake:

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

4 years ago[SVG -> OTF Converter] Arabic forms are not substituted correctly
mmaxfield@apple.com [Sun, 5 Oct 2014 06:34:07 +0000 (06:34 +0000)]
[SVG -> OTF Converter] Arabic forms are not substituted correctly
https://bugs.webkit.org/show_bug.cgi?id=137092

Reviewed by Darin Adler.

Tests: svg/W3C-SVG-1.1/fonts-glyph-02-t.svg
       svg/custom/glyph-selection-arabic-forms.svg

* svg/SVGToOTFFontConversion.cpp:
(WebCore::SVGToOTFFontConverter::appendArabicReplacementSubtable): Invoked for each of the three
Arabic form substitutions.
(WebCore::SVGToOTFFontConverter::appendGSUBTable): OpenType "Advanced Typographic Table":
"Glyph substitution data"
(WebCore::SVGToOTFFontConverter::SVGToOTFFontConverter): Re-order the m_codepointsToIndicesMap
to prefer isolated forms of glyphs.
(WebCore::SVGToOTFFontConverter::convertSVGToOTFFont): Append the GSUB table.
(WebCore::calculateChecksum): Deleted.

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

4 years agoImplement Element.closest() API
commit-queue@webkit.org [Sat, 4 Oct 2014 22:24:21 +0000 (22:24 +0000)]
Implement Element.closest() API
https://bugs.webkit.org/show_bug.cgi?id=137418

Patch by Dhi Aurrahman <diorahman@rockybars.com> on 2014-10-04
Reviewed by Benjamin Poulain.

Source/WebCore:

Implement Element.closest() API as specified in [1].

[1]: https://dom.spec.whatwg.org/#dom-element-closest

Tests: fast/selectors/closest-general.html
       fast/selectors/closest-scope.html

* dom/Element.cpp:
(WebCore::Element::closest):
* dom/Element.h:
* dom/Element.idl:
* dom/SelectorQuery.cpp:
(WebCore::SelectorDataList::selectorClosest):
(WebCore::SelectorDataList::closest):
* dom/SelectorQuery.h:
(WebCore::SelectorQuery::closest):

LayoutTests:

Add test cases for Element.closest() API

* fast/selectors/closest-general-expected.txt: Added.
* fast/selectors/closest-general.html: Added.
* fast/selectors/closest-scope-expected.txt: Added.
* fast/selectors/closest-scope.html: Added.

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

4 years agoWeb Inspector: Add PrettyPrinter CSS tests
commit-queue@webkit.org [Sat, 4 Oct 2014 22:11:57 +0000 (22:11 +0000)]
Web Inspector: Add PrettyPrinter CSS tests
https://bugs.webkit.org/show_bug.cgi?id=134005

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

Add CSS pretty printing tests. Improve pretty printing of calc()
expressions and media-queries with whitespace around operators
and keywords. Also fix the debug output in the tool for CSS.

* Tools/PrettyPrinting/CodeMirrorFormatters.js:
* Tools/PrettyPrinting/FormatterContentBuilder.js:
(FormatterContentBuilder.prototype._appendIndent):
* Tools/PrettyPrinting/FormatterDebug.js:
(.debugToken):
(Formatter.prototype.debug):
* Tools/PrettyPrinting/css-tests/basic-expected.css: Added.
* Tools/PrettyPrinting/css-tests/basic.css: Added.
* Tools/PrettyPrinting/css-tests/calc-expected.css: Added.
* Tools/PrettyPrinting/css-tests/calc.css: Added.
* Tools/PrettyPrinting/css-tests/media-query-expected.css: Added.
* Tools/PrettyPrinting/css-tests/media-query.css: Added.
* Tools/PrettyPrinting/css-tests/selectors-expected.css: Added.
* Tools/PrettyPrinting/css-tests/selectors.css: Added.
* Tools/PrettyPrinting/index.html:
* UserInterface/Views/CodeMirrorFormatters.js:

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

4 years agoUnreviewed, rolling out r174319.
burg@cs.washington.edu [Sat, 4 Oct 2014 21:55:58 +0000 (21:55 +0000)]
Unreviewed, rolling out r174319.

Causes assertions in fast/profiler tests. Needs nontrivial
investigation, will take offline.

Reverted changeset:

"Web Inspector: timelines should not count time elapsed while
paused in the debugger"
https://bugs.webkit.org/show_bug.cgi?id=136351
http://trac.webkit.org/changeset/174319

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

4 years agoTry to fix the Windows build after r174315.
timothy_horton@apple.com [Sat, 4 Oct 2014 19:55:49 +0000 (19:55 +0000)]
Try to fix the Windows build after r174315.

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

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

4 years agoTry to fix the Windows build after r174315.
timothy_horton@apple.com [Sat, 4 Oct 2014 19:35:06 +0000 (19:35 +0000)]
Try to fix the Windows build after r174315.

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

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

4 years agoWeb Inspector: timelines should not count time elapsed while paused in the debugger
burg@cs.washington.edu [Sat, 4 Oct 2014 19:18:38 +0000 (19:18 +0000)]
Web Inspector: timelines should not count time elapsed while paused in the debugger
https://bugs.webkit.org/show_bug.cgi?id=136351

Reviewed by Timothy Hatcher.

Source/JavaScriptCore:

Now that we have a stopwatch to provide pause-aware timing data, we can remove the
profiler's handling of debugger pause/continue callbacks. The timeline agent accounts
for debugger pauses by pausing and resuming the stopwatch.

* API/JSProfilerPrivate.cpp:
(JSStartProfiling): Use a fresh stopwatch when profiling from the JSC API.
* inspector/ScriptDebugServer.cpp:
(Inspector::ScriptDebugServer::handlePause):
* profiler/LegacyProfiler.cpp:
(JSC::LegacyProfiler::profiler): Use nullptr.
(JSC::LegacyProfiler::startProfiling): Hand off a stopwatch to the profile generator.
(JSC::LegacyProfiler::stopProfiling): Use nullptr.
(JSC::LegacyProfiler::didPause): Deleted.
(JSC::LegacyProfiler::didContinue): Deleted.
* profiler/LegacyProfiler.h:
* profiler/ProfileGenerator.cpp: Remove debugger pause/continue callbacks and the
timestamp member that was used to track time elapsed by the debugger. Just use the
stopwatch's elapsed times to generate start/elapsed times for function calls.
(JSC::ProfileGenerator::create):
(JSC::ProfileGenerator::ProfileGenerator):
(JSC::ProfileGenerator::beginCallEntry):
(JSC::ProfileGenerator::endCallEntry):
(JSC::ProfileGenerator::didPause): Deleted.
(JSC::ProfileGenerator::didContinue): Deleted.
* profiler/ProfileGenerator.h:

Source/WebCore:

To avoid counting time elapsed while the debugger is paused, timeline records should
keep track of time elapsed since the start of timeline capturing, rather than wall clock
timestamps. We can easily compute elapsed time by sharing Stopwatch instance among
all timeline record-generating code. The stopwatch is paused while the debugger is paused,
so subsequent time measurements will not include time elapsed while the debugger is paused.

Agents use the shared stopwatch to generate timestamps if the timeline agent is active
(i.e., a timeline recording is being captured). If not, use a zero timestamp since the timing data is only revealed through the Timeline interface.

This refactoring is safe because start and end times are only used to graph records; the
timestamp's actual value is irrelevant and is not displayed in the user interface. Date
timestamps are still included with network-related records as part of their header data.

No new tests, because we cannot reliably test timing changes induced by debugger pauses.
It is possible for records to accrue time before the debugger pauses or after it resumes.

* inspector/InspectorCSSAgent.cpp: Remove unused include.
* inspector/InspectorPageAgent.cpp: Use timestamps from the shared stopwatch.
(WebCore::InspectorPageAgent::timestamp):
(WebCore::InspectorPageAgent::domContentEventFired):
(WebCore::InspectorPageAgent::loadEventFired):
* inspector/InspectorPageAgent.h:
* inspector/InspectorResourceAgent.cpp: Use timestamps from the shared stopwatch.
(WebCore::InspectorResourceAgent::timestamp):
(WebCore::InspectorResourceAgent::willSendRequest):
(WebCore::InspectorResourceAgent::didReceiveResponse):
(WebCore::InspectorResourceAgent::didReceiveData):
(WebCore::InspectorResourceAgent::didFinishLoading):
(WebCore::InspectorResourceAgent::didFailLoading):
(WebCore::InspectorResourceAgent::didLoadResourceFromMemoryCache):
(WebCore::InspectorResourceAgent::willSendWebSocketHandshakeRequest):
(WebCore::InspectorResourceAgent::didReceiveWebSocketHandshakeResponse):
(WebCore::InspectorResourceAgent::didCloseWebSocket):
(WebCore::InspectorResourceAgent::didReceiveWebSocketFrame):
(WebCore::InspectorResourceAgent::didSendWebSocketFrame):
(WebCore::InspectorResourceAgent::didReceiveWebSocketFrameError):
* inspector/InspectorResourceAgent.h:
* inspector/InspectorTimelineAgent.cpp: Add calls to reset, start, and stop the stopwatch.
(WebCore::InspectorTimelineAgent::didCreateFrontendAndBackend):
(WebCore::InspectorTimelineAgent::internalStart):
(WebCore::InspectorTimelineAgent::internalStop):
(WebCore::startProfiling):
(WebCore::InspectorTimelineAgent::startFromConsole):
(WebCore::InspectorTimelineAgent::willCallFunction):
(WebCore::InspectorTimelineAgent::willEvaluateScript):
(WebCore::InspectorTimelineAgent::didPause):
(WebCore::InspectorTimelineAgent::didContinue):
(WebCore::InspectorTimelineAgent::InspectorTimelineAgent):
(WebCore::InspectorTimelineAgent::timestamp):
(WebCore::TimelineTimeConverter::reset): Deleted.
* inspector/InspectorTimelineAgent.h: Make timestamp() public, and remove old timepieces.
(WebCore::TimelineTimeConverter::TimelineTimeConverter): Deleted.
(WebCore::TimelineTimeConverter::fromMonotonicallyIncreasingTime): Deleted.
(WebCore::InspectorTimelineAgent::timeConverter): Deleted.
* inspector/TimelineRecordFactory.cpp:

Source/WebInspectorUI:

Don't update the timeline's current time when the debugger is paused.

Start and end times for timeline records are now in seconds elapsed since timeline
recording started, rather than milliseconds since the epoch. Add a workaround to
preserve compatibility with old backends.

* UserInterface/Controllers/TimelineManager.js:
(WebInspector.TimelineManager.prototype.capturingStarted):
(WebInspector.TimelineManager.prototype.eventRecorded.processRecord):
(WebInspector.TimelineManager.prototype.eventRecorded):
* UserInterface/Views/TimelineContentView.js:
(WebInspector.TimelineContentView.prototype._debuggerPaused):
(WebInspector.TimelineContentView.prototype._debuggerResumed):

Source/WTF:

* WTF.vcxproj/WTF.vcxproj:
* WTF.vcxproj/WTF.vcxproj.filters:
* WTF.xcodeproj/project.pbxproj:
* wtf/CMakeLists.txt:
* wtf/Stopwatch.h: Added. This implements a refcounted monotonic stopwatch.
(WTF::Stopwatch::reset):
(WTF::Stopwatch::start):
(WTF::Stopwatch::stop):

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

4 years agoFTL should sink PutLocals
fpizlo@apple.com [Sat, 4 Oct 2014 17:18:25 +0000 (17:18 +0000)]
FTL should sink PutLocals
https://bugs.webkit.org/show_bug.cgi?id=137168

Reviewed by Oliver Hunt.
Source/JavaScriptCore:

We've known for a while that our PutLocal situation was sub-optimal. We emit them anytime we
"pass" arguments to an inlined function call, because we need to enable the runtime to grab
those arguments when doing foo.arguments where foo is inlined: our engine doesn't deoptimize
in that case but rather just relies on the arguments being flushed (i.e. a copy of their
values is spilled) at a well-known place in a well-known format.

The PutLocals incur two costs: (1) they are store instructions and stores ain't free, and (2)
they look like escaping sites and so they inhibit object allocation sinking.

But in most cases, the PutLocals are unnecessary because the inlined code never performs any
side effect that could transitively lead to function.arguments. Even if the inlined code
could do such a side effect, it may be on a rare path so there is no need to penalize the
entire function.

This patch implements one solution to the PutLocal problem: it aggressively sinks PutLocals
to the latest possible point. This is even more aggressive than the object allocation
sinking. That sinking algorithm avoids creating situations where an object could be
materialized more than one along any path. PutLocal sinking, on the other hand, doesn't avoid
this at all - both to make the phase cheaper and simpler and to make it more aggressive.
Every PutLocal is sunk no matter what.

The upside of this patch is that it eliminates many PutLocals: many of them are sunk "past
their death", thus eliminating them completely. Others are sunk to rare paths. This enables a
lot of object allocation sinking and it removes a lot of pointless store instructions.

It also has downsites. Sinking PutLocals increases register pressure because it increases the
live ranges of things like inlined arguments.

This patch is a net performance win in its current form: 1% SunSpider regression, 2% OctaneV2
progression, 0.6% Kraken regression, 1% AsmBench progression, and 0.5% CompressionBench
regression. The biggest win is on Octane/raytrace, which improves by 27%.

Relanding after fixing internal builds. We have to be careful about implicit casts from int64
to int32.

* CMakeLists.txt:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
* JavaScriptCore.xcodeproj/project.pbxproj:
* bytecode/CodeBlock.h:
* bytecode/Operands.h:
(JSC::Operands::dump): Deleted.
* bytecode/OperandsInlines.h:
(JSC::Traits>::dump):
* bytecode/VirtualRegister.h:
(JSC::VirtualRegister::isHeader):
* dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::InlineStackEntry::InlineStackEntry):
* dfg/DFGClobberSet.h:
(JSC::DFG::ClobberSetAdd::operator()):
(JSC::DFG::ClobberSetOverlaps::operator()):
* dfg/DFGClobberize.h:
(JSC::DFG::clobberize):
(JSC::DFG::NoOpClobberize::operator()):
(JSC::DFG::CheckClobberize::operator()):
(JSC::DFG::AbstractHeapOverlaps::operator()):
(JSC::DFG::ReadMethodClobberize::operator()):
(JSC::DFG::WriteMethodClobberize::operator()):
(JSC::DFG::DefMethodClobberize::operator()):
* dfg/DFGFlushFormat.h:
(JSC::DFG::merge):
* dfg/DFGGraph.cpp:
(JSC::DFG::Graph::Graph):
* dfg/DFGGraph.h:
(JSC::DFG::Graph::capturedVarsFor):
* dfg/DFGObjectAllocationSinkingPhase.cpp:
(JSC::DFG::ObjectAllocationSinkingPhase::determineMaterializationPoints):
(JSC::DFG::ObjectAllocationSinkingPhase::placeMaterializationPoints):
* dfg/DFGPlan.cpp:
(JSC::DFG::Plan::compileInThreadImpl):
* dfg/DFGPreciseLocalClobberize.h: Added.
(JSC::DFG::PreciseLocalClobberizeAdaptor::PreciseLocalClobberizeAdaptor):
(JSC::DFG::PreciseLocalClobberizeAdaptor::read):
(JSC::DFG::PreciseLocalClobberizeAdaptor::write):
(JSC::DFG::PreciseLocalClobberizeAdaptor::def):
(JSC::DFG::PreciseLocalClobberizeAdaptor::callIfAppropriate):
(JSC::DFG::PreciseLocalClobberizeAdaptor::readTop):
(JSC::DFG::PreciseLocalClobberizeAdaptor::writeTop):
(JSC::DFG::forEachLocalReadByUnwind):
(JSC::DFG::preciseLocalClobberize):
* dfg/DFGPutLocalSinkingPhase.cpp: Added.
(JSC::DFG::performPutLocalSinking):
* dfg/DFGPutLocalSinkingPhase.h: Added.
* dfg/DFGSSACalculator.h:
(JSC::DFG::SSACalculator::computePhis):
* dfg/DFGValidate.cpp:

Source/WTF:

Make the set bits of a BitVector iterable.

* wtf/BitVector.h:
(WTF::BitVector::SetBitsIterable::SetBitsIterable):
(WTF::BitVector::SetBitsIterable::iterator::iterator):
(WTF::BitVector::SetBitsIterable::iterator::operator*):
(WTF::BitVector::SetBitsIterable::iterator::operator++):
(WTF::BitVector::SetBitsIterable::iterator::operator==):
(WTF::BitVector::SetBitsIterable::iterator::operator!=):
(WTF::BitVector::SetBitsIterable::begin):
(WTF::BitVector::SetBitsIterable::end):
(WTF::BitVector::setBits):

LayoutTests:

* js/regress/elidable-new-object-then-call-expected.txt: Added.
* js/regress/elidable-new-object-then-call.html: Added.
* js/regress/script-tests/elidable-new-object-then-call.js: Added.
(sumOfArithSeries):
(bar):
(foo):

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

4 years ago[jhbuild] Simplify platform detection in update-webkit-libs-jhbuild
ossy@webkit.org [Sat, 4 Oct 2014 10:04:47 +0000 (10:04 +0000)]
[jhbuild] Simplify platform detection in update-webkit-libs-jhbuild
https://bugs.webkit.org/show_bug.cgi?id=137390

Reviewed by Carlos Garcia Campos.

* Scripts/update-webkit-libs-jhbuild:

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

4 years agoUnreviewed. Add missing inspector files to compilation.
carlosgc@webkit.org [Sat, 4 Oct 2014 09:07:36 +0000 (09:07 +0000)]
Unreviewed. Add missing inspector files to compilation.

* PlatformGTK.cmake: Add javascript sources in
WebInspectorUI/UserInterface/External/Esprima to the list of
inspector files.

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

4 years agoMake it possible to test page overlays
timothy_horton@apple.com [Sat, 4 Oct 2014 08:47:04 +0000 (08:47 +0000)]
Make it possible to test page overlays
https://bugs.webkit.org/show_bug.cgi?id=137339

Reviewed by Dan Bernstein.

Tests: pageoverlay/overlay-installation.html
       pageoverlay/overlay-large-document-scrolled.html
       pageoverlay/overlay-large-document.html

Do some initial work to make page overlays testable.
There are many more tests to be written, but this lays the groundwork.

* WebCore.exp.in:
* WebCore.xcodeproj/project.pbxproj:
* WebCore.vcxproj/WebCoreTestSupport.vcxproj:
* WebCore.vcxproj/WebCoreTestSupport.vcxproj.filters:
* CMakeLists.txt:
Add MockPageOverlayClient.

* platform/graphics/GraphicsLayer.h:
* page/PageOverlayController.h:
* page/PageOverlayController.cpp:
(WebCore::PageOverlayController::shouldSkipLayerInDump):
Don't skip PageOverlayController-owned layers in the layer tree dump if the
layerTreeAsText behavior says that we should include them.

* platform/graphics/GraphicsLayer.cpp:
(WebCore::dumpChildren):

* platform/graphics/GraphicsLayerClient.h:
(WebCore::GraphicsLayerClient::shouldSkipLayerInDump):
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::shouldSkipLayerInDump):
* rendering/RenderLayerBacking.h:
Pass the LayerTreeAsTextBehavior through shouldSkipLayerInDump.

* testing/Internals.cpp:
(WebCore::Internals::resetToConsistentState):
Uninstall all page overlays when resetting to a consistent state.

(WebCore::Internals::installMockPageOverlay):
(WebCore::Internals::pageOverlayLayerTreeAsText):
Expose two new internals functions.
installMockPageOverlay takes "view" or "document", allowing script
to choose the appropriate overlay type.
pageOverlayLayerTreeAsText dumps both view and document-relative
overlays, from each overlay container layer.

* testing/Internals.h:
* testing/Internals.idl:
Fix some typos.

* testing/MockPageOverlayClient.cpp: Added.
(WebCore::MockPageOverlayClient::shared):
(WebCore::MockPageOverlayClient::MockPageOverlayClient):
(WebCore::MockPageOverlayClient::installOverlay):
(WebCore::MockPageOverlayClient::uninstallAllOverlays):
(WebCore::MockPageOverlayClient::layerTreeAsText):
(WebCore::MockPageOverlayClient::pageOverlayDestroyed):
(WebCore::MockPageOverlayClient::willMoveToPage):
(WebCore::MockPageOverlayClient::didMoveToPage):
When the overlay is parented, mark it as needing repaint.
Future tests might want to test overlays without content,
but for now this is a reasonable default behavior.

(WebCore::MockPageOverlayClient::drawRect):
Paint the overlay rects as described in the LayoutTests ChangeLog.

(WebCore::MockPageOverlayClient::mouseEvent):
(WebCore::MockPageOverlayClient::didScrollFrame):
(WebCore::MockPageOverlayClient::copyAccessibilityAttributeStringValueForPoint):
(WebCore::MockPageOverlayClient::copyAccessibilityAttributeBoolValueForPoint):
(WebCore::MockPageOverlayClient::copyAccessibilityAttributeNames):

* testing/MockPageOverlayClient.h: Added.

* pageoverlay/overlay-installation.html: Added.
Add a test which just installs one view-relative and one document-relative
overlay, and dumps the layer tree and pixel results. The mock overlay
strokes a blue rectangle (inset a little from the overlay bounds) for
view-relative overlays, and a green rectangle (inset a bit more) for
document-relative overlays.

* pageoverlay/overlay-large-document.html: Added.
* pageoverlay/overlay-large-document-scrolled.html: Added.
Tests that do the same as the -installation test, but with a larger document;
the view-relative overlay should be the same size (or slightly smaller,
because we have scrollbars now), but the document-relative overlay should
be the size of the document. The second test scrolls to maxX, maxY, and
the document-relative overlay should scroll along with it, while the
view-relative overlay should remain fixed.

* pageoverlay/overlay-installation-expected.txt: Added.
* pageoverlay/overlay-large-document-expected.txt: Added.
* pageoverlay/overlay-large-document-scrolled-expected.txt: Added.
"Normal" layer tree expectations.

* platform/mac-wk1/pageoverlay/overlay-installation-expected.png: Added.
* platform/mac-wk1/pageoverlay/overlay-installation-expected.txt: Added.
* platform/mac-wk1/pageoverlay/overlay-large-document-expected.png: Added.
* platform/mac-wk1/pageoverlay/overlay-large-document-expected.txt: Added.
* platform/mac-wk1/pageoverlay/overlay-large-document-scrolled-expected.png: Added.
* platform/mac-wk1/pageoverlay/overlay-large-document-scrolled-expected.txt: Added.
Expected results for WebKit1 differ for view-relative overlays, because
we don't currently hook up view-relative overlays for WebKit1.

* platform/mac/pageoverlay/overlay-installation-expected.png: Added.
* platform/mac/pageoverlay/overlay-large-document-expected.png: Added.
* platform/mac/pageoverlay/overlay-large-document-scrolled-expected.png: Added.
"Normal" pixel dump expectations.

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

4 years agoMove DragController::createFragmentFromDragData implementation to the editor
carlosgc@webkit.org [Sat, 4 Oct 2014 08:37:57 +0000 (08:37 +0000)]
Move DragController::createFragmentFromDragData implementation to the editor
https://bugs.webkit.org/show_bug.cgi?id=136819

Reviewed by Darin Adler.

Make Editor::webContentFromPasteboard() common to all ports and
add a implementation for every port.

* PlatformWin.cmake: Add new files to compilation.
* WebCore.vcxproj/WebCore.vcxproj: Ditto.
* editing/Editor.cpp:
(WebCore::Editor::pasteWithPasteboard): Move to EditorWin.cpp
since this is only used by windows port.
* editing/Editor.h:
* editing/efl/EditorEfl.cpp:
(WebCore::Editor::webContentFromPasteboard):
* editing/gtk/EditorGtk.cpp:
(WebCore::Editor::webContentFromPasteboard):
* editing/win/EditorWin.cpp: Added.
(WebCore::Editor::pasteWithPasteboard):
(WebCore::Editor::webContentFromPasteboard):
* page/DragController.cpp:
(WebCore::documentFragmentFromDragData): Use the editor instead of
createFragmentFromDragData() that has been removed. Also made this
method a static funtion again.
* page/DragController.h:
* page/efl/DragControllerEfl.cpp: Remove createFragmentFromDragData().
* page/gtk/DragControllerGtk.cpp: Ditto.
* page/mac/DragControllerMac.mm: Ditto.
* page/win/DragControllerWin.cpp: Ditto.
* platform/Pasteboard.h:
(WebCore::Pasteboard::dragDataMap): Add a getter for m_dragDataMap
as required by Editor::webContentFromPasteboard for windows.

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

4 years agoUse is<>() / downcast<>() for CSS StyleProperties
cdumez@apple.com [Sat, 4 Oct 2014 08:30:15 +0000 (08:30 +0000)]
Use is<>() / downcast<>() for CSS StyleProperties
https://bugs.webkit.org/show_bug.cgi?id=137398

Reviewed by Benjamin Poulain.

Use is<>() / downcast<>() for CSS StyleProperties subclasses.

No new tests, no behavior change.

* css/StyleProperties.cpp:
(WebCore::StyleProperties::immutableCopyIfNeeded):
(WebCore::MutableStyleProperties::MutableStyleProperties):
(WebCore::StyleProperties::hasCSSOMWrapper):
* css/StyleProperties.h:
(WebCore::StyleProperties::PropertyReference::propertyMetadata):
(WebCore::StyleProperties::PropertyReference::propertyValue):
(WebCore::StyleProperties::propertyCount):
(WebCore::StyleProperties::deref):
(WebCore::StyleProperties::findPropertyIndex):
(isType):
(WebCore::toMutableStyleProperties): Deleted.
(WebCore::toImmutableStyleProperties): Deleted.
* css/StyleRule.cpp:
(WebCore::StyleRule::mutableProperties):
(WebCore::StyleRulePage::mutableProperties):
(WebCore::StyleRuleFontFace::mutableProperties):
* css/WebKitCSSKeyframeRule.cpp:
(WebCore::StyleKeyframe::mutableProperties):
* dom/StyledElement.cpp:
(WebCore::StyledElement::ensureMutableInlineStyle):
(WebCore::StyledElement::setInlineStyleFromString):

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

4 years ago[Windows] Skip remaining failing media tests after adding audio devices to the bots.
roger_fong@apple.com [Sat, 4 Oct 2014 08:05:22 +0000 (08:05 +0000)]
[Windows] Skip remaining failing media tests after adding audio devices to the bots.

* platform/win/TestExpectations:

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

4 years ago[TexMap] Clean up GraphicsLayerTextureMapper::prepareBackingStoreIfNeeded()
zandobersek@gmail.com [Sat, 4 Oct 2014 07:56:23 +0000 (07:56 +0000)]
[TexMap] Clean up GraphicsLayerTextureMapper::prepareBackingStoreIfNeeded()
https://bugs.webkit.org/show_bug.cgi?id=137263

Reviewed by Darin Adler.

* platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
(WebCore::GraphicsLayerTextureMapper::prepareBackingStoreIfNeeded): Clean up
the method a bit. When the backing store will not be in use the change mask
should only get updated if there was a backing store present beforehand.

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

4 years ago[GTK] Do not generate webkit2gtk-tests-resources.gresource unconditionally
carlosgc@webkit.org [Sat, 4 Oct 2014 07:46:42 +0000 (07:46 +0000)]
[GTK] Do not generate webkit2gtk-tests-resources.gresource unconditionally
https://bugs.webkit.org/show_bug.cgi?id=137391

Reviewed by Martin Robinson.

Add a custom command to only re-generate
webkit2gtk-tests-resources.gresource when any of its dependencies changes.

* TestWebKitAPI/Tests/WebKit2Gtk/CMakeLists.txt:

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

4 years ago[GTK] generate-gtkdoc crashes when generating HTML due to encoding issues
carlosgc@webkit.org [Sat, 4 Oct 2014 07:35:47 +0000 (07:35 +0000)]
[GTK] generate-gtkdoc crashes when generating HTML due to encoding issues
https://bugs.webkit.org/show_bug.cgi?id=135502

Reviewed by Martin Robinson.

When writing to stdout/stderr fails due to a UnicodeDecodeError
exception, try again without encoding the output.

* gtk/gtkdoc.py:
(GTKDoc._run_command):

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

4 years ago[TexMap] Remove QDoc comments in GraphicsLayerTextureMapper
zandobersek@gmail.com [Sat, 4 Oct 2014 07:14:35 +0000 (07:14 +0000)]
[TexMap] Remove QDoc comments in GraphicsLayerTextureMapper
https://bugs.webkit.org/show_bug.cgi?id=137264

Reviewed by Andreas Kling.

Remove all the QDoc comments in the class that were
left over by the Qt port.

* platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
(WebCore::GraphicsLayerTextureMapper::setNeedsDisplay):

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

4 years agoIntroduce Promise A+ tests into WebKit
utatane.tea@gmail.com [Sat, 4 Oct 2014 02:41:42 +0000 (02:41 +0000)]
Introduce Promise A+ tests into WebKit
https://bugs.webkit.org/show_bug.cgi?id=136878

Reviewed by Sam Weinig.

To ensure WebKit Promise stability, introducing Promise A+ tests[1] into WebKit.
It's also used to test V8 Promise[2].
So the tests guarantee that WebKit Promise's spec validity and interchangeability
to the other browser's Promise implementation.

Promise A+ tests assumes that it works on the Node.js environment. To work it on
LayoutTests correctly, we need to transform Node.js styled JavaScript code into
browser styled code. In this patch, we use browserify[3] to transform the test code.
Through transforming pipeline, some dependent JS code is bundled into the produced code.
So added SinonJS[4] and browserify's license files into the test directory.

And tests assume that it is used with Mocha[5] test runner. So introducing mocha.js and
added LICENSE file into this directory.

And since Promises/A+ 2.3.3 has many tests, it consumes much time (13s in GTK debug build).
So mark it as a Slow test.

[1]: https://github.com/promises-aplus/promises-tests
[2]: https://code.google.com/p/v8/source/browse#svn%2Ftrunk%2Ftest%2Fpromises-aplus
[3]: http://browserify.org/
[4]: http://sinonjs.org/
[5]: http://visionmedia.github.io/mocha/

* TestExpectations:
* js/promises-tests/README: Added.
* js/promises-tests/browserify-entry-point.js: Added.
(.):
* js/promises-tests/browserify.LICENSE: Added.
* js/promises-tests/mocha.LICENSE: Added.
* js/promises-tests/promises-tests-2-1-2-expected.txt: Added.
* js/promises-tests/promises-tests-2-1-2.html: Added.
* js/promises-tests/promises-tests-2-1-3-expected.txt: Added.
* js/promises-tests/promises-tests-2-1-3.html: Added.
* js/promises-tests/promises-tests-2-2-1-expected.txt: Added.
* js/promises-tests/promises-tests-2-2-1.html: Added.
* js/promises-tests/promises-tests-2-2-2-expected.txt: Added.
* js/promises-tests/promises-tests-2-2-2.html: Added.
* js/promises-tests/promises-tests-2-2-3-expected.txt: Added.
* js/promises-tests/promises-tests-2-2-3.html: Added.
* js/promises-tests/promises-tests-2-2-4-expected.txt: Added.
* js/promises-tests/promises-tests-2-2-4.html: Added.
* js/promises-tests/promises-tests-2-2-5-expected.txt: Added.
* js/promises-tests/promises-tests-2-2-5.html: Added.
* js/promises-tests/promises-tests-2-2-6-expected.txt: Added.
* js/promises-tests/promises-tests-2-2-6.html: Added.
* js/promises-tests/promises-tests-2-2-7-expected.txt: Added.
* js/promises-tests/promises-tests-2-2-7.html: Added.
* js/promises-tests/promises-tests-2-3-1-expected.txt: Added.
* js/promises-tests/promises-tests-2-3-1.html: Added.
* js/promises-tests/promises-tests-2-3-2-expected.txt: Added.
* js/promises-tests/promises-tests-2-3-2.html: Added.
* js/promises-tests/promises-tests-2-3-3-expected.txt: Added.
* js/promises-tests/promises-tests-2-3-3.html: Added.
* js/promises-tests/promises-tests-2-3-4-expected.txt: Added.
* js/promises-tests/promises-tests-2-3-4.html: Added.
* js/promises-tests/promises-tests.LICENSE: Added.
* js/promises-tests/promises-tests.js: Added.
(.):
* js/promises-tests/promises-tests/.gitignore: Added.
* js/promises-tests/promises-tests/.jshintrc: Added.
* js/promises-tests/promises-tests/.npmignore: Added.
* js/promises-tests/promises-tests/LICENSE.txt: Added.
* js/promises-tests/promises-tests/README.md: Added.
* js/promises-tests/promises-tests/lib/cli.js: Added.
(getAdapterFilePath):
(adapterObjectFromFilePath):
* js/promises-tests/promises-tests/lib/getMochaOpts.js: Added.
(module.exports):
* js/promises-tests/promises-tests/lib/programmaticRunner.js: Added.
(normalizeAdapter.adapter.resolved):
(normalizeAdapter.adapter.rejected):
(normalizeAdapter):
(.cb):
(.):
(module.exports):
(module.exports.mocha):
* js/promises-tests/promises-tests/lib/tests/2.1.2.js: Added.
(.):
* js/promises-tests/promises-tests/lib/tests/2.1.3.js: Added.
(.):
* js/promises-tests/promises-tests/lib/tests/2.2.1.js: Added.
* js/promises-tests/promises-tests/lib/tests/2.2.2.js: Added.
(.):
* js/promises-tests/promises-tests/lib/tests/2.2.3.js: Added.
(.):
* js/promises-tests/promises-tests/lib/tests/2.2.4.js: Added.
(.):
* js/promises-tests/promises-tests/lib/tests/2.2.5.js: Added.
* js/promises-tests/promises-tests/lib/tests/2.2.6.js: Added.
(.return.if):
(callbackAggregator):
(.):
* js/promises-tests/promises-tests/lib/tests/2.2.7.js: Added.
(.):
* js/promises-tests/promises-tests/lib/tests/2.3.1.js: Added.
(.):
* js/promises-tests/promises-tests/lib/tests/2.3.2.js: Added.
(.):
(testPromiseResolution):
* js/promises-tests/promises-tests/lib/tests/2.3.3.js: Added.
(.):
(testPromiseResolution):
(testCallingResolvePromiseRejectsWith):
(testCallingRejectPromiseRejectsWith):
(describe):
* js/promises-tests/promises-tests/lib/tests/2.3.4.js: Added.
(.):
* js/promises-tests/promises-tests/lib/tests/helpers/reasons.js: Added.
(exports.string_appeared_here):
(exports.string_appeared_here.return.then):
* js/promises-tests/promises-tests/lib/tests/helpers/testThreeCases.js: Added.
(.specify):
(.):
(exports.testFulfilled):
(exports.testRejected):
* js/promises-tests/promises-tests/lib/tests/helpers/thenables.js: Added.
(exports.fulfilled.string_appeared_here.return.then):
(exports.fulfilled.string_appeared_here):
(exports.fulfilled.string_appeared_here.):
(exports.fulfilled.get string_appeared_here.return.then):
(exports.fulfilled.get string_appeared_here):
(exports.rejected.string_appeared_here.return.then):
(exports.rejected.string_appeared_here):
(exports.rejected.string_appeared_here.):
(exports.rejected.get string_appeared_here.return.then):
(exports.rejected.get string_appeared_here):
* js/promises-tests/promises-tests/package.json: Added.
* js/promises-tests/promises-tests/test/getMochaOptsTest.js: Added.
* js/promises-tests/resources/adapter.js: Added.
(LayoutTestsReporter.runner):
(window.adapter.resolved):
(window.adapter.rejected):
(window.adapter.deferred):
* js/promises-tests/resources/mocha.js: Added.
(.):
* js/promises-tests/sinonjs.LICENSE: Added.

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

4 years agoBugzilla status bubble displays an exception showing attachment 175738
ap@apple.com [Fri, 3 Oct 2014 23:48:52 +0000 (23:48 +0000)]
Bugzilla status bubble displays an exception showing attachment 175738
https://bugs.webkit.org/show_bug.cgi?id=137410

Reviewed by Tim Horton.

* QueueStatusServer/app.yaml: Update version.

* QueueStatusServer/handlers/statusbubble.py: (StatusBubble._build_bubble):
Don't fail even if expected status message is missing.

* QueueStatusServer/model/patchlog.py: (PatchLog): Quick unrelated fix - define
the field in the same way it's defined in QueueStatus table.

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

4 years agoBugzilla status bubble displays an exception showing attachment 175738
ap@apple.com [Fri, 3 Oct 2014 23:36:54 +0000 (23:36 +0000)]
Bugzilla status bubble displays an exception showing attachment 175738
https://bugs.webkit.org/show_bug.cgi?id=137410

Reviewed by Tim Horton.

* QueueStatusServer/app.yaml: Update version.

* QueueStatusServer/handlers/statusbubble.py: (StatusBubble._build_bubble):
Don't fail even if expected status message is missing.

* QueueStatusServer/model/patchlog.py: (PatchLog): Quick unrelated fix - define
the field in the same way it's defined in QueueStatus table.

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

4 years agoRecord latest message in PatchLog for quick access
ap@apple.com [Fri, 3 Oct 2014 23:27:52 +0000 (23:27 +0000)]
Record latest message in PatchLog for quick access
https://bugs.webkit.org/show_bug.cgi?id=137405

Fixing a typo.

* QueueStatusServer/app.yaml:
* QueueStatusServer/handlers/releasepatch.py:

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

4 years agoREGRESSION(r174216): CodeBlock::dumpByteCodes crashes on op_push_name_scope
msaboff@apple.com [Fri, 3 Oct 2014 23:22:21 +0000 (23:22 +0000)]
REGRESSION(r174216): CodeBlock::dumpByteCodes crashes on op_push_name_scope
https://bugs.webkit.org/show_bug.cgi?id=137412

Reviewed by Mark Lam.

Added support for the JSNameScope::type opcode parameter in dumpBytecode().

* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::dumpBytecode):

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

4 years agoUse is<>() / downcast<>() for CSSValue subclasses
cdumez@apple.com [Fri, 3 Oct 2014 23:17:00 +0000 (23:17 +0000)]
Use is<>() / downcast<>() for CSSValue subclasses
https://bugs.webkit.org/show_bug.cgi?id=137381

Reviewed by Benjamin Poulain.

Use is<>() / downcast<>() for CSSValue subclasses.

No new tests, no behavior change.

* css/CSSAspectRatioValue.h:
* css/CSSBorderImageSliceValue.h:
* css/CSSCalculationValue.cpp:
(WebCore::CSSCalcExpressionNodeParser::parseValue):
* css/CSSCalculationValue.h:
* css/CSSCanvasValue.h:
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::getBorderRadiusShorthandValue):
(WebCore::ComputedStyleExtractor::propertyMatches):
* css/CSSCrossfadeValue.cpp:
(WebCore::subimageKnownToBeOpaque):
* css/CSSCrossfadeValue.h:
* css/CSSCursorImageValue.cpp:
(WebCore::CSSCursorImageValue::~CSSCursorImageValue):
(WebCore::CSSCursorImageValue::updateIfSVGCursorIsUsed):
(WebCore::CSSCursorImageValue::cachedImage):
(WebCore::CSSCursorImageValue::cachedOrPendingImage):
(WebCore::CSSCursorImageValue::isSVGCursor):
* css/CSSCursorImageValue.h:
* css/CSSFilterImageValue.h:
* css/CSSFontFaceSrcValue.h:
* css/CSSFontFeatureValue.h:
* css/CSSFontSelector.cpp:
(WebCore::CSSFontSelector::addFontFaceRule):
* css/CSSFontValue.h:
* css/CSSFunctionValue.h:
* css/CSSGradientValue.cpp:
(WebCore::CSSGradientValue::image):
(WebCore::CSSGradientValue::gradientWithStylesResolved):
* css/CSSGradientValue.h:
* css/CSSGridLineNamesValue.h:
* css/CSSGridTemplateAreasValue.h:
* css/CSSImageGeneratorValue.cpp:
(WebCore::CSSImageGeneratorValue::image):
(WebCore::CSSImageGeneratorValue::isFixedSize):
(WebCore::CSSImageGeneratorValue::fixedSize):
(WebCore::CSSImageGeneratorValue::isPending):
(WebCore::CSSImageGeneratorValue::knownToBeOpaque):
(WebCore::CSSImageGeneratorValue::loadSubimages):
(WebCore::CSSImageGeneratorValue::subimageIsPending):
(WebCore::CSSImageGeneratorValue::cachedImageForCSSValue):
* css/CSSImageGeneratorValue.h:
* css/CSSImageSetValue.cpp:
(WebCore::CSSImageSetValue::fillImageSet):
* css/CSSImageSetValue.h:
* css/CSSImageValue.h:
* css/CSSInheritedValue.h:
* css/CSSInitialValue.h:
* css/CSSLineBoxContainValue.h:
* css/CSSParser.cpp:
(WebCore::CSSParser::parseColor):
(WebCore::CSSParser::addFillValue):
(WebCore::CSSParser::addAnimationValue):
(WebCore::CSSParser::parse3ValuesFillPosition):
(WebCore::CSSParser::parseFillPosition):
(WebCore::CSSParser::parseFillRepeat):
(WebCore::gridMissingGridPositionValue):
(WebCore::CSSParser::parseGridTemplateRowsAndAreas):
(WebCore::CSSParser::parseBasicShapeCircle):
(WebCore::CSSParser::parseBasicShapeEllipse):
(WebCore::CSSParser::parseDeprecatedGradient):
(WebCore::CSSParser::parseDeprecatedRadialGradient):
(WebCore::CSSParser::parseRadialGradient):
(WebCore::CSSParser::createFontFaceRule):
* css/CSSPrimitiveValue.h:
* css/CSSReflectValue.h:
* css/CSSShadowValue.h:
* css/CSSTimingFunctionValue.h:
* css/CSSToStyleMap.cpp:
(WebCore::CSSToStyleMap::mapFillAttachment):
(WebCore::CSSToStyleMap::mapFillClip):
(WebCore::CSSToStyleMap::mapFillComposite):
(WebCore::CSSToStyleMap::mapFillBlendMode):
(WebCore::CSSToStyleMap::mapFillOrigin):
(WebCore::CSSToStyleMap::mapFillRepeatX):
(WebCore::CSSToStyleMap::mapFillRepeatY):
(WebCore::CSSToStyleMap::mapFillSize):
(WebCore::CSSToStyleMap::mapFillXPosition):
(WebCore::CSSToStyleMap::mapFillYPosition):
(WebCore::CSSToStyleMap::mapFillMaskSourceType):
(WebCore::CSSToStyleMap::mapAnimationDelay):
(WebCore::CSSToStyleMap::mapAnimationDirection):
(WebCore::CSSToStyleMap::mapAnimationDuration):
(WebCore::CSSToStyleMap::mapAnimationFillMode):
(WebCore::CSSToStyleMap::mapAnimationIterationCount):
(WebCore::CSSToStyleMap::mapAnimationName):
(WebCore::CSSToStyleMap::mapAnimationPlayState):
(WebCore::CSSToStyleMap::mapAnimationProperty):
(WebCore::CSSToStyleMap::mapAnimationTimingFunction):
(WebCore::CSSToStyleMap::mapNinePieceImage):
(WebCore::CSSToStyleMap::mapNinePieceImageSlice):
(WebCore::CSSToStyleMap::mapNinePieceImageQuad):
(WebCore::CSSToStyleMap::mapNinePieceImageRepeat):
* css/CSSUnicodeRangeValue.h:
* css/CSSValue.cpp:
(WebCore::CSSValue::isImplicitInitialValue):
(WebCore::CSSValue::addSubresourceStyleURLs):
(WebCore::CSSValue::hasFailedOrCanceledSubresources):
(WebCore::CSSValue::equals):
(WebCore::CSSValue::cssText):
(WebCore::CSSValue::destroy):
(WebCore::CSSValue::cloneForCSSOM):
* css/CSSValue.h:
* css/CSSValueList.h:
(WebCore::CSSValueListInspector::CSSValueListInspector):
* css/DeprecatedStyleBuilder.cpp:
(WebCore::ApplyPropertyDefault::applyValue):
(WebCore::ApplyPropertyNumber::applyValue):
(WebCore::ApplyPropertyAuto::applyValue):
(WebCore::ApplyPropertyClip::applyValue):
(WebCore::ApplyPropertyColor::applyValue):
(WebCore::ApplyPropertyLength::applyValue):
(WebCore::ApplyPropertyString::applyValue):
(WebCore::ApplyPropertyBorderRadius::applyValue):
(WebCore::ApplyPropertyFillLayer::applyValue):
(WebCore::ApplyPropertyComputeLength::applyValue):
(WebCore::ApplyPropertyFont::applyValue):
(WebCore::ApplyPropertyFontFamily::applyValue):
(WebCore::ApplyPropertyFontSize::applyValue):
(WebCore::ApplyPropertyFontWeight::applyValue):
(WebCore::ApplyPropertyFontVariantLigatures::applyValue):
(WebCore::ApplyPropertyCounter::applyValue):
(WebCore::ApplyPropertyCursor::applyValue):
(WebCore::ApplyPropertyTextAlign::applyValue):
(WebCore::ApplyPropertyTextDecoration::applyValue):
(WebCore::ApplyPropertyTextDecorationSkip::applyValue):
(WebCore::ApplyPropertyMarqueeIncrement::applyValue):
(WebCore::ApplyPropertyMarqueeRepetition::applyValue):
(WebCore::ApplyPropertyMarqueeSpeed::applyValue):
(WebCore::ApplyPropertyTextUnderlinePosition::applyValue):
(WebCore::ApplyPropertyLineHeight::applyValue):
(WebCore::ApplyPropertyLineHeightForIOSTextAutosizing::applyValue):
(WebCore::ApplyPropertyWordSpacing::applyValue):
(WebCore::ApplyPropertyPageSize::applyValue):
(WebCore::ApplyPropertyTextEmphasisStyle::applyValue):
(WebCore::ApplyPropertyTextEmphasisPosition::applyValue):
(WebCore::ApplyPropertyResize::applyValue):
(WebCore::ApplyPropertyVerticalAlign::applyValue):
(WebCore::ApplyPropertyAspectRatio::applyValue):
(WebCore::ApplyPropertyZoom::applyValue):
(WebCore::ApplyPropertyDisplay::applyValue):
(WebCore::ApplyPropertyClipPath::applyValue):
(WebCore::ApplyPropertyShape::applyValue):
(WebCore::ApplyPropertyImageResolution::applyValue):
(WebCore::ApplyPropertyTextIndent::applyValue):
* css/MediaList.cpp:
(WebCore::reportMediaQueryWarningIfNeeded):
* css/MediaQueryEvaluator.cpp:
(WebCore::compareAspectRatioValue):
(WebCore::numberValue):
(WebCore::orientationMediaFeatureEval):
(WebCore::evalResolution):
(WebCore::device_pixel_ratioMediaFeatureEval):
(WebCore::resolutionMediaFeatureEval):
(WebCore::computeLength):
(WebCore::view_modeMediaFeatureEval):
(WebCore::pointerMediaFeatureEval):
* css/SVGCSSComputedStyleDeclaration.cpp:
(WebCore::strokeDashArrayToCSSValueList):
(WebCore::ComputedStyleExtractor::svgPropertyValue):
* css/SVGCSSStyleSelector.cpp:
(WebCore::StyleResolver::applySVGProperty):
* css/SourceSizeList.cpp:
(WebCore::computeLength):
* css/StyleProperties.cpp:
(WebCore::StyleProperties::getLayeredShorthandValue):
* css/StyleResolver.cpp:
(WebCore::extractDirectionAndWritingMode):
(WebCore::createGridTrackSize):
(WebCore::createGridTrackList):
(WebCore::createGridPosition):
(WebCore::StyleResolver::parseSnapCoordinate):
(WebCore::StyleResolver::parseSnapPoints):
(WebCore::StyleResolver::applyProperty):
(WebCore::StyleResolver::styleImage):
(WebCore::StyleResolver::generatedOrPendingFromValue):
(WebCore::StyleResolver::createFilterOperations):
* css/TransformFunctions.cpp:
(WebCore::transformsForValue):
* css/ViewportStyleResolver.cpp:
(WebCore::ViewportStyleResolver::getViewportArgumentValue):
* css/WebKitCSSFilterValue.h:
* css/WebKitCSSMatrix.cpp:
(WebCore::WebKitCSSMatrix::setMatrixValue):
* css/WebKitCSSTransformValue.h:
(WebCore::toWebKitCSSTransformValue): Deleted.
* editing/ApplyStyleCommand.cpp:
(WebCore::ApplyStyleCommand::computedFontSize):
* editing/EditingStyle.cpp:
(WebCore::identifierForStyleProperty):
(WebCore::HTMLElementEquivalent::valueIsPresentInStyle):
(WebCore::HTMLTextDecorationEquivalent::valueIsPresentInStyle):
(WebCore::cssValueToRGBA):
(WebCore::EditingStyle::extractFontSizeDelta):
(WebCore::EditingStyle::textDirection):
(WebCore::EditingStyle::prepareToApplyAt):
(WebCore::EditingStyle::mergeStyle):
(WebCore::EditingStyle::mergeStyleFromRulesForSerialization):
(WebCore::EditingStyle::legacyFontSize):
(WebCore::EditingStyle::textDirectionForSelection):
(WebCore::StyleChange::extractTextStyles):
(WebCore::diffTextDecorations):
(WebCore::fontWeightIsBold):
(WebCore::isTransparentColorValue):
* editing/EditorCommand.cpp:
(WebCore::executeToggleStyleInList):
* editing/cocoa/HTMLConverter.mm:
(stringFromCSSValue):
(HTMLConverterCaches::floatPropertyValueForNode):
(HTMLConverterCaches::colorPropertyValueForNode):
* editing/markup.cpp:
(WebCore::propertyMissingOrEqualToNone):
* page/PageSerializer.cpp:
(WebCore::PageSerializer::retrieveResourcesForProperties):
* page/animation/CSSPropertyAnimation.cpp:
(WebCore::blendFunc):
* rendering/RenderTextControl.cpp:
(WebCore::RenderTextControl::adjustInnerTextStyle):
* rendering/style/StylePendingImage.h:
(WebCore::StylePendingImage::cssImageValue):
(WebCore::StylePendingImage::cssCursorImageValue):
(WebCore::StylePendingImage::cssImageSetValue):
* svg/SVGColor.h:
* svg/SVGFontFaceElement.cpp:
(WebCore::SVGFontFaceElement::rebuildFontFace):
* svg/SVGPaint.h:

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

4 years agoRemove a workaround for a bug that's been fixed
andersca@apple.com [Fri, 3 Oct 2014 23:05:07 +0000 (23:05 +0000)]
Remove a workaround for a bug that's been fixed
https://bugs.webkit.org/show_bug.cgi?id=137411

Reviewed by Dan Bernstein.

* mac/rewrite-availability-macros.sh:

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

4 years agoImplement op_profile_type in the 32-bit baseline JIT
saambarati1@gmail.com [Fri, 3 Oct 2014 22:19:33 +0000 (22:19 +0000)]
Implement op_profile_type in the 32-bit baseline JIT
https://bugs.webkit.org/show_bug.cgi?id=137181

Reviewed by Michael Saboff.

Generate inline code to write to the TypeProfilerLog inside the 32-bit
baseline JIT instead of unconditionally bailing out to the slow path
for op_profile_type.

* jit/JITOpcodes32_64.cpp:
(JSC::JIT::emit_op_profile_type):

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

4 years agoClean up interface to Font::expansionOpportunityCount()
mmaxfield@apple.com [Fri, 3 Oct 2014 22:07:42 +0000 (22:07 +0000)]
Clean up interface to Font::expansionOpportunityCount()
https://bugs.webkit.org/show_bug.cgi?id=137355

Reviewed by Dean Jackson.

There are two overloads of Font::expansionOpportunityCount() which perform the same
operation. One overload takes a UChar*, the other takes an LChar*, and they both
take a length. This is the abstraction that StringView was designed to be. Instead
of forcing each caller to take a different overload based on if their data is
8 bit or not, allow the caller to construct a StringView and pass that into
Font::expansionOpportunityCount() instead of a raw pointer/length.

No new tests because there is no behavior change.

* platform/graphics/Font.cpp:
(WebCore::Font::expansionOpportunityCountInternal): Original two functions,
renamed.
(WebCore::Font::expansionOpportunityCount): Takes a StringView, calls
expansionOpportunityCountInternal().
* platform/graphics/Font.h: Update signatures.
* platform/graphics/WidthIterator.cpp:
(WebCore::WidthIterator::WidthIterator): Use new signature to
Font::expansionOpportunityCount().
* platform/graphics/mac/ComplexTextController.cpp:
(WebCore::ComplexTextController::ComplexTextController): Ditto.
* rendering/RenderBlockLineLayout.cpp:
(WebCore::RenderBlockFlow::computeInlineDirectionPositionsForSegment): Ditto.
* rendering/RenderText.cpp:
(WebCore::RenderText::stringView): Accessor to encapsulate character pointer
and length.
* rendering/RenderText.h: Signature of new accessor.

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

4 years agoUnreviewed, rolling out r174275.
bdakin@apple.com [Fri, 3 Oct 2014 22:05:22 +0000 (22:05 +0000)]
Unreviewed, rolling out r174275.
https://bugs.webkit.org/show_bug.cgi?id=137408

Build failures on the internal bots. (Requested by dethbakin
on #webkit).

Reverted changeset:

"FTL should sink PutLocals"
https://bugs.webkit.org/show_bug.cgi?id=137168
http://trac.webkit.org/changeset/174275

Patch by Commit Queue <commit-queue@webkit.org> on 2014-10-03

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

4 years ago[Win] Unreviewed build fix for MSVC 2013 SP 3.
bfulgham@apple.com [Fri, 3 Oct 2014 22:03:59 +0000 (22:03 +0000)]
[Win] Unreviewed build fix for MSVC 2013 SP 3.

The std::array initializer is not fully implemented in SP3 and causes a
build error.

* platform/graphics/transforms/AffineTransform.cpp: Use old style assignment
initialization for MSVC builds until this bug is fixed.

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

4 years agotearoff_arguments should always refer to the unmodified arguments register
oliver@apple.com [Fri, 3 Oct 2014 21:46:14 +0000 (21:46 +0000)]
tearoff_arguments should always refer to the unmodified arguments register
https://bugs.webkit.org/show_bug.cgi?id=137406

Reviewed by Michael Saboff.

To simplify subsequent work, and remove unnecessary work from
actual execution this patch simply ensures that tear_off_arguments
refers to the actual unmodified arguments register.

* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::emitReturn):
* dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::parseBlock):
* jit/JITOpcodes.cpp:
(JSC::JIT::emit_op_tear_off_arguments):
* jit/JITOpcodes32_64.cpp:
(JSC::JIT::emit_op_tear_off_arguments):
* llint/LLIntSlowPaths.cpp:
(JSC::LLInt::LLINT_SLOW_PATH_DECL):
* llint/LowLevelInterpreter32_64.asm:
* llint/LowLevelInterpreter64.asm:

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

4 years agoAdd TypeCasts.h to xcodeproject
cdumez@apple.com [Fri, 3 Oct 2014 21:43:18 +0000 (21:43 +0000)]
Add TypeCasts.h to xcodeproject
https://bugs.webkit.org/show_bug.cgi?id=137403

Reviewed by Benjamin Poulain.

Add TypeCasts.h to xcodeproject.

* WTF.xcodeproj/project.pbxproj:

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

4 years agoWeb Inspector: Move the computation that results in UI strings from JSC to the Web...
saambarati1@gmail.com [Fri, 3 Oct 2014 21:35:20 +0000 (21:35 +0000)]
Web Inspector: Move the computation that results in UI strings from JSC to the Web Inspector
https://bugs.webkit.org/show_bug.cgi?id=137295

Reviewed by Timothy Hatcher.

Source/JavaScriptCore:

Remove unnecessary functions and properties from JSC that are
now being computed inside the Web Inspector.

* inspector/agents/InspectorRuntimeAgent.cpp:
(Inspector::InspectorRuntimeAgent::getRuntimeTypesForVariablesAtOffsets):
* inspector/protocol/Runtime.json:
* runtime/TypeSet.cpp:
(JSC::TypeSet::allPrimitiveTypeNames): Deleted.
* runtime/TypeSet.h:

Source/WebInspectorUI:

The inspector now computes a set of properties that was previously
computed inside JSC.

This patch also addresses the weird experience of the
type of an expression claiming to be both a Number and
an Integer. This could be a bit confusing because Number
is supposed to represent Double|Integer and the previous
UI implied that Number was equivalent to Double. The new UI only
ever shows either the type of Number or Integer when showing
the type information of an expression. It never shows both Number
and Integer simultaneously to describe a single expression.

* UserInterface/Models/TypeSet.js:
(WebInspector.TypeSet):
(WebInspector.TypeSet.prototype.isContainedIn):
(WebInspector.TypeSet.prototype.get primitiveTypeNames):
* UserInterface/Views/TypePropertiesSection.js:
(WebInspector.TypePropertiesSection):
(WebInspector.TypePropertiesSection.prototype.onpopulate):
* UserInterface/Views/TypeTokenView.js:
(WebInspector.TypeTokenView):
(WebInspector.TypeTokenView.prototype.update):
(WebInspector.TypeTokenView.prototype._shouldShowPopover):
(WebInspector.TypeTokenView.prototype._displayTypeName):

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

4 years agoRecord latest message in PatchLog for quick access
ap@apple.com [Fri, 3 Oct 2014 21:35:16 +0000 (21:35 +0000)]
Record latest message in PatchLog for quick access
https://bugs.webkit.org/show_bug.cgi?id=137405

Reviewed by Ryosuke Niwa.

It's no SQL...

* QueueStatusServer/handlers/releasepatch.py:
* QueueStatusServer/handlers/updatestatus.py:
* QueueStatusServer/loggers/recordpatchevent.py:
* QueueStatusServer/model/patchlog.py:

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

4 years ago-asan-blacklist option also renamed to generic -fsanitize-blacklist
dfarler@apple.com [Fri, 3 Oct 2014 21:18:12 +0000 (21:18 +0000)]
-asan-blacklist option also renamed to generic -fsanitize-blacklist
https://bugs.webkit.org/show_bug.cgi?id=137377

Reviewed by Daniel Bates.

* asan/asan.xcconfig:
-asan-blacklist -> -fsanitize-blacklist

http://llvm.org/viewvc/llvm-project?view=revision&revision=212505

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

4 years agoFTL should sink PutLocals
betravis@adobe.com [Fri, 3 Oct 2014 20:47:25 +0000 (20:47 +0000)]
FTL should sink PutLocals
https://bugs.webkit.org/show_bug.cgi?id=137168

Patch by Filip Pizlo <fpizlo@apple.com> on 2014-10-02
Reviewed by Oliver Hunt.

* js/regress/elidable-new-object-then-call-expected.txt: Added.
* js/regress/elidable-new-object-then-call.html: Added.
* js/regress/script-tests/elidable-new-object-then-call.js: Added.
(sumOfArithSeries):
(bar):
(foo):

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

4 years agoRevert an accidental change introduced by r173318.
jer.noble@apple.com [Fri, 3 Oct 2014 20:45:29 +0000 (20:45 +0000)]
Revert an accidental change introduced by r173318.

Rubber-stamped by Tim Horton.

* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
(WebKit::TiledCoreAnimationDrawingArea::suspendPainting):
(WebKit::TiledCoreAnimationDrawingArea::resumePainting):

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

4 years agoWKWebView snapshot of Daring Fireball has the wrong color in the obscured inset
timothy_horton@apple.com [Fri, 3 Oct 2014 20:36:51 +0000 (20:36 +0000)]
WKWebView snapshot of Daring Fireball has the wrong color in the obscured inset
https://bugs.webkit.org/show_bug.cgi?id=137383
<rdar://problem/18535439>

Reviewed by Sam Weinig.

* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::snapshotAtSize):
Use documentBackgroundColor instead of baseBackgroundColor if backgroundShouldExtendBeyondPage is set.

* rendering/RenderView.cpp:
(WebCore::RenderView::paintBoxDecorations):
Use documentBackgroundColor instead of baseBackgroundColor if backgroundShouldExtendBeyondPage is set.

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

4 years ago[iOS] Highlight clicked links in WKPDFView
aestes@apple.com [Fri, 3 Oct 2014 20:32:34 +0000 (20:32 +0000)]
[iOS] Highlight clicked links in WKPDFView
https://bugs.webkit.org/show_bug.cgi?id=137400

Reviewed by Tim Horton.

Show a _UIHighlightView on top of clicked links for 200 ms before starting the navigation. This matches the behavior of UIWebPDFView.

* UIProcess/ios/WKPDFView.mm:
(-[WKPDFView _createHighlightViewWithFrame:]): Created a _UIHighlightView with a color and border radius matching the values used by UIWebPDFView.
(-[WKPDFView annotation:wasTouchedAtPoint:controller:]): Displayed the highlight, then removed it after the navigation began.

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

4 years ago[Windows] Include batch size argument to layout tests on Windows.
roger_fong@apple.com [Fri, 3 Oct 2014 20:29:29 +0000 (20:29 +0000)]
[Windows] Include batch size argument to layout tests on Windows.

* BuildSlaveSupport/build.webkit.org-config/master.cfg:
(RunWebKitTests.start):
This is a speculative fix for the the inconsistent crashes we are seeing on Windows.
These crashes seem to happen on random tests though generally in a spread out fashion.
It seems possible that the DRT instance is being clobbered somehow after running too many
tests in a row so we will try to mitigate this by just forcing DRT to restart periodically.

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

4 years agoREGRESSION (r165896): UIWebView PDFs have a forced black background
timothy_horton@apple.com [Fri, 3 Oct 2014 20:28:04 +0000 (20:28 +0000)]
REGRESSION (r165896): UIWebView PDFs have a forced black background
https://bugs.webkit.org/show_bug.cgi?id=137387
<rdar://problem/17948411>

Reviewed by David Kilzer.

* WebView/WebPDFViewPlaceholder.h:
* WebView/WebPDFViewPlaceholder.mm:
(-[WebPDFViewPlaceholder layout]):
Remove an ill-advised attempt to force the PDF background color from WebKit.
The idea was that we would maintain Safari's black background except if there
were no pages in the PDF, in which case we would use white instead to avoid
having an all-black view. However, this broke clients who didn't want a black
background, because we were now forcing it to black. Also, we don't need to
maintain the black color in Safari because it doesn't use WebPDFViewPlaceholder anymore.
This wasn't an important part of the patch, in any case.

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

4 years agowebkit-appearance: default-button styling does not set the button font color to white
dino@apple.com [Fri, 3 Oct 2014 20:27:28 +0000 (20:27 +0000)]
webkit-appearance: default-button styling does not set the button font color to white
https://bugs.webkit.org/show_bug.cgi?id=137399
rdar://problem/17788616

Reviewed by Dave Hyatt.

When a button is styled with -webkit-appearance: default-button, it should
use the CSSValueActivebuttontext value for its text color when the window
is active, and the normal value when the window is inactive.

Since activating (focus/blur) windows doesn't cause a style recalculation, this
is applied as a paint-time operation. However, the render tree children that
paint the text don't know that they are contained within a RenderButton
and that the button is a default type. So I added an inherited flag, similar
to what we use for visited links, to remember if we're in a button. And then
computeTextPaintStyle chooses the correct value.

We can't test this because our LayoutTest system doesn't have
an active window, and thus the default button renders like a normal
button. This should cause no regressions though. Also, the appearance is
protected behind an SPI (or Setting), so this is not exposed to the Web.

* rendering/RenderTheme.cpp:
(WebCore::RenderTheme::adjustStyle): Set the flag if we're inside a default button.
* rendering/TextPaintStyle.cpp:
(WebCore::computeTextPaintStyle): If we're in a default button inside an active window,
use the CSSValueActivebuttontext color.
* rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::RenderStyle): Add and expose the new inherited flag: ._insideDefaultButton.
(WebCore::RenderStyle::changeRequiresRepaint): Ditto.
* rendering/style/RenderStyle.h: Ditto.

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

4 years agoREGRESSION (r173265): UIWebView PDF loading is completely broken
timothy_horton@apple.com [Fri, 3 Oct 2014 20:26:41 +0000 (20:26 +0000)]
REGRESSION (r173265): UIWebView PDF loading is completely broken
https://bugs.webkit.org/show_bug.cgi?id=137386
<rdar://problem/18524717>

Reviewed by David Kilzer.

* WebView/WebPDFViewPlaceholder.h:
* WebView/WebPDFViewPlaceholder.mm:
(-[WebPDFViewPlaceholder layout]):
(-[WebPDFViewPlaceholder finishedLoadingWithDataSource:]):
Restore important code that creates the CGDataProvider and sets _didFinishLoad
and calls _doPostLoadOrUnlockTasks after finishing a load, which was haphazardly
removed in the aforementioned revision.

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

4 years ago[SVG -> OTF Converter] Support non-BMP codepoints
mmaxfield@apple.com [Fri, 3 Oct 2014 20:10:56 +0000 (20:10 +0000)]
[SVG -> OTF Converter] Support non-BMP codepoints
https://bugs.webkit.org/show_bug.cgi?id=137097

Patch by Myles C. Maxfield <mmaxfield@apple.com> on 2014-09-28
Reviewed by Darin Adler.

This patch has two pieces:

1) Moves write16(), overwrite32() and overwrite16() inside SVGToOTFFontConverter. This
is so that we don't have to keep passing around references to m_result everywhere. Instead,
put the output vector inside the class as an instance member variable. In addition, rename
write32() and write16() to append32() and append16(), and provide a copy of append32 inside
SVGToOTFFontConverter.

2) Change the "Codepoint" typedef to be a String, and rename it to Codepoints. This is so that
we can implement ligatures later on. Update all the places that use this variable to work with
a String of multiple codepoints.

This patch updates the CMAP table to use format 12 instead of format 4. It currently only maps
single codepoints to glyph IDs and skips all multi-codepoint glyphs. We will implement
ligatures in another patch.

Test: svg/custom/glyph-selection-non-bmp.svg

* svg/SVGToOTFFontConversion.cpp:
(WebCore::append32): Append a result to a given vector. This is for the path transcoder.
(WebCore::SVGToOTFFontConverter::releaseResult): WTF::move()'s the result.
(WebCore::SVGToOTFFontConverter::GlyphData::GlyphData): Update to take Codepoints instead of Codepoint.
(WebCore::SVGToOTFFontConverter::append32): Piece 1 above.
(WebCore::SVGToOTFFontConverter::append16): Ditto.
(WebCore::SVGToOTFFontConverter::append4ByteCode): Convenience function.
(WebCore::SVGToOTFFontConverter::overwrite32): Piece 1 above.
(WebCore::SVGToOTFFontConverter::overwrite16): Ditto.
(WebCore::SVGToOTFFontConverter::appendCMAPTable): Update to format 12.
(WebCore::SVGToOTFFontConverter::appendHEADTable): Passing in a result vector is no longer necessary.
(WebCore::SVGToOTFFontConverter::appendHHEATable): Ditto.
(WebCore::SVGToOTFFontConverter::appendHMTXTable): Ditto.
(WebCore::SVGToOTFFontConverter::appendMAXPTable): Ditto.
(WebCore::SVGToOTFFontConverter::appendNAMETable): Ditto.
(WebCore::SVGToOTFFontConverter::appendOS2Table): Ditto.
(WebCore::SVGToOTFFontConverter::appendPOSTTable): Ditto.
(WebCore::isValidStringForCFF): Ditto.
(WebCore::SVGToOTFFontConverter::appendCFFValidString): Ditto.
(WebCore::SVGToOTFFontConverter::appendCFFTable): Ditto.
(WebCore::SVGToOTFFontConverter::appendVORGTable): Ditto.
(WebCore::SVGToOTFFontConverter::appendVHEATable): Ditto.
(WebCore::SVGToOTFFontConverter::appendVMTXTable): Ditto.
(WebCore::SVGToOTFFontConverter::addCodepointRanges): Update for Codepoints.
(WebCore::SVGToOTFFontConverter::addCodepoints): Ditto.
(WebCore::SVGToOTFFontConverter::addGlyphNames): Ditto.
(WebCore::SVGToOTFFontConverter::appendKERNSubtable): Ditto.
(WebCore::SVGToOTFFontConverter::appendKERNTable): Ditto.
(WebCore::writeCFFEncodedNumber): Passing in a result vector is no longer necessary.
(WebCore::SVGToOTFFontConverter::appendGlyphData): Update for Codepoints.
(WebCore::SVGToOTFFontConverter::processGlyphElement): Update for Codepoints.
(WebCore::SVGToOTFFontConverter::compareCodepointsLexicographically): Comparing Codepoints
(WebCore::SVGToOTFFontConverter::SVGToOTFFontConverter): Update for Codepoints.
(WebCore::SVGToOTFFontConverter::calculateChecksum): Passing in a result vector is no longer necessary.
(WebCore::SVGToOTFFontConverter::appendTable): Ditto.
(WebCore::SVGToOTFFontConverter::convertSVGToOTFFont): Ditto.
(WebCore::convertSVGToOTFFont): Move out of the result vector.
(WebCore::write32): Deleted.
(WebCore::write16): Deleted.
(WebCore::overwrite32): Deleted.
(WebCore::appendCFFValidString): Deleted.
(WebCore::transcodeGlyphPaths): Deleted.
(WebCore::calculateChecksum): Deleted.

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

4 years agoUnreviewed, rolling out r174270.
bdakin@apple.com [Fri, 3 Oct 2014 20:08:32 +0000 (20:08 +0000)]
Unreviewed, rolling out r174270.
https://bugs.webkit.org/show_bug.cgi?id=137397

crashes on the bots (Requested by dethbakin on #webkit).

Reverted changeset:

"EventSender dispatches should be per-Document"
https://bugs.webkit.org/show_bug.cgi?id=136051
http://trac.webkit.org/changeset/174270

Patch by Commit Queue <commit-queue@webkit.org> on 2014-10-03

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

4 years ago[iOS] Back-to-back fullscreen videos result in incorrectly sized videos
jer.noble@apple.com [Fri, 3 Oct 2014 20:07:01 +0000 (20:07 +0000)]
[iOS] Back-to-back fullscreen videos result in incorrectly sized videos
https://bugs.webkit.org/show_bug.cgi?id=137380

Reviewed by Eric Carlson.

During a normal workflow, a <video> element will create an AVPlayerLayer, then it will get a
fullscreen (hosted) parent layer, then it will be told an explicit fullscreen size. But when
a <video> element creates an AVPlayerLayer after the <video> element is already in
fullscreen mode, it sets that AVPlayerLayer's frame using the size of the hosted parent
layer, rather than the explicit fullscreen size. Instead, use the (already set) explicit
fullscreen size after creating the AVPlayerLayer.

* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::ensureAVPlayerLayer):
(WebCore::MediaPlayerPrivateAVFoundationObjC::platformLayer):

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

4 years ago[Windows] Settle for 2 chid processes running NRWT on Windows.
roger_fong@apple.com [Fri, 3 Oct 2014 19:58:52 +0000 (19:58 +0000)]
[Windows] Settle for 2 chid processes running NRWT on Windows.
* Scripts/webkitpy/port/win.py:
(WinPort.default_child_processes): 3 child processes reintroduces the sporadic crashing, will settle for 2.

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

4 years agoFTL should sink PutLocals
fpizlo@apple.com [Fri, 3 Oct 2014 19:38:06 +0000 (19:38 +0000)]
FTL should sink PutLocals
https://bugs.webkit.org/show_bug.cgi?id=137168

Reviewed by Oliver Hunt.
Source/JavaScriptCore:

We've known for a while that our PutLocal situation was sub-optimal. We emit them anytime we
"pass" arguments to an inlined function call, because we need to enable the runtime to grab
those arguments when doing foo.arguments where foo is inlined: our engine doesn't deoptimize
in that case but rather just relies on the arguments being flushed (i.e. a copy of their
values is spilled) at a well-known place in a well-known format.

The PutLocals incur two costs: (1) they are store instructions and stores ain't free, and (2)
they look like escaping sites and so they inhibit object allocation sinking.

But in most cases, the PutLocals are unnecessary because the inlined code never performs any
side effect that could transitively lead to function.arguments. Even if the inlined code
could do such a side effect, it may be on a rare path so there is no need to penalize the
entire function.

This patch implements one solution to the PutLocal problem: it aggressively sinks PutLocals
to the latest possible point. This is even more aggressive than the object allocation
sinking. That sinking algorithm avoids creating situations where an object could be
materialized more than one along any path. PutLocal sinking, on the other hand, doesn't avoid
this at all - both to make the phase cheaper and simpler and to make it more aggressive.
Every PutLocal is sunk no matter what.

The upside of this patch is that it eliminates many PutLocals: many of them are sunk "past
their death", thus eliminating them completely. Others are sunk to rare paths. This enables a
lot of object allocation sinking and it removes a lot of pointless store instructions.

It also has downsites. Sinking PutLocals increases register pressure because it increases the
live ranges of things like inlined arguments.

This patch is a net performance win in its current form: 1% SunSpider regression, 2% OctaneV2
progression, 0.6% Kraken regression, 1% AsmBench progression, and 0.5% CompressionBench
regression. The biggest win is on Octane/raytrace, which improves by 27%.

* CMakeLists.txt:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
* JavaScriptCore.xcodeproj/project.pbxproj:
* bytecode/CodeBlock.h:
* bytecode/Operands.h:
(JSC::Operands::dump): Deleted.
* bytecode/OperandsInlines.h:
(JSC::Traits>::dump):
* bytecode/VirtualRegister.h:
(JSC::VirtualRegister::isHeader):
* dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::InlineStackEntry::InlineStackEntry):
* dfg/DFGClobberSet.h:
(JSC::DFG::ClobberSetAdd::operator()):
(JSC::DFG::ClobberSetOverlaps::operator()):
* dfg/DFGClobberize.h:
(JSC::DFG::clobberize):
(JSC::DFG::NoOpClobberize::operator()):
(JSC::DFG::CheckClobberize::operator()):
(JSC::DFG::AbstractHeapOverlaps::operator()):
(JSC::DFG::ReadMethodClobberize::operator()):
(JSC::DFG::WriteMethodClobberize::operator()):
(JSC::DFG::DefMethodClobberize::operator()):
* dfg/DFGFlushFormat.h:
(JSC::DFG::merge):
* dfg/DFGGraph.cpp:
(JSC::DFG::Graph::Graph):
* dfg/DFGGraph.h:
(JSC::DFG::Graph::capturedVarsFor):
* dfg/DFGObjectAllocationSinkingPhase.cpp:
(JSC::DFG::ObjectAllocationSinkingPhase::determineMaterializationPoints):
(JSC::DFG::ObjectAllocationSinkingPhase::placeMaterializationPoints):
* dfg/DFGPlan.cpp:
(JSC::DFG::Plan::compileInThreadImpl):
* dfg/DFGPreciseLocalClobberize.h: Added.
(JSC::DFG::PreciseLocalClobberizeAdaptor::PreciseLocalClobberizeAdaptor):
(JSC::DFG::PreciseLocalClobberizeAdaptor::read):
(JSC::DFG::PreciseLocalClobberizeAdaptor::write):
(JSC::DFG::PreciseLocalClobberizeAdaptor::def):
(JSC::DFG::PreciseLocalClobberizeAdaptor::callIfAppropriate):
(JSC::DFG::PreciseLocalClobberizeAdaptor::readTop):
(JSC::DFG::PreciseLocalClobberizeAdaptor::writeTop):
(JSC::DFG::forEachLocalReadByUnwind):
(JSC::DFG::preciseLocalClobberize):
* dfg/DFGPutLocalSinkingPhase.cpp: Added.
(JSC::DFG::performPutLocalSinking):
* dfg/DFGPutLocalSinkingPhase.h: Added.
* dfg/DFGSSACalculator.h:
(JSC::DFG::SSACalculator::computePhis):
* dfg/DFGValidate.cpp:

Source/WTF:

Make the set bits of a BitVector iterable.

* wtf/BitVector.h:
(WTF::BitVector::SetBitsIterable::SetBitsIterable):
(WTF::BitVector::SetBitsIterable::iterator::iterator):
(WTF::BitVector::SetBitsIterable::iterator::operator*):
(WTF::BitVector::SetBitsIterable::iterator::operator++):
(WTF::BitVector::SetBitsIterable::iterator::operator==):
(WTF::BitVector::SetBitsIterable::iterator::operator!=):
(WTF::BitVector::SetBitsIterable::begin):
(WTF::BitVector::SetBitsIterable::end):
(WTF::BitVector::setBits):

LayoutTests:

* js/regress/elidable-new-object-then-call-expected.txt: Added.
* js/regress/elidable-new-object-then-call.html: Added.
* js/regress/script-tests/elidable-new-object-then-call.js: Added.
(sumOfArithSeries):
(bar):
(foo):

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

4 years ago[GTK] Bump up and patch dependencies to allow building for aarch64
commit-queue@webkit.org [Fri, 3 Oct 2014 18:38:40 +0000 (18:38 +0000)]
[GTK] Bump up and patch dependencies to allow building for aarch64
https://bugs.webkit.org/show_bug.cgi?id=137147

Patch by Akos Kiss <akiss@inf.u-szeged.hu> on 2014-10-03
Reviewed by Martin Robinson.

The currently used versions of pixman, libffi, librsvg, glib,
glib-networking, fontconfig, libxml2, gst-plugins-base fail to configure
and/or build for aarch64, so they are bumped up and patched where
necessary. Wherever possible, the same versions and patches were used as
for the EFL port bump-up
(https://bugs.webkit.org/show_bug.cgi?id=135885).

After the bump-up, a hitherto hidden bug in gst-plugins-good caused a
regression by crashing http/tests/media/video-redirect.html . A patch
already in upstream fixes that bug.

This change does not touch xserver, which also needs bumping up, but
will be dealt with later.

* gtk/jhbuild.modules:
Specified versions and patches necessary to correctly build for aarch64.
* gtk/patches/gst-events-arent-gstobjects.patch:
Added. Patches gst-plugins-good to fix a bug in .mov file demuxing.
* gtk/patches/gst-prevent-neon-check-in-configure-from-passing-under-aarch64.patch:
Added. Patches gst-plugins-base to configure correctly for aarch64.
* gtk/patches/librsvg-2.36.1-bump-up-config.guess-to-support-aarch64.patch:
Added. Bumps up config.guess and config.sub in librsvg to recognize
aarch64.
* gtk/patches/libxml2-2.9.0-dtd.patch:
Removed. Not necessary for libxml2 v2.9.1 anymore.

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

4 years agoREGRESSION (r173531): Use after free in WebCore::RenderStyle::fontMetrics /
betravis@adobe.com [Fri, 3 Oct 2014 18:35:53 +0000 (18:35 +0000)]
REGRESSION (r173531): Use after free in WebCore::RenderStyle::fontMetrics /
WebCore::CSSPrimitiveValue::computeLengthDouble
https://bugs.webkit.org/show_bug.cgi?id=136864

Reviewed by Andreas Kling.

Source/WebCore:

FontLoader previously called updateDocumentStyleIfNeeded,
which would reset styles currently in use as part of
the tabIndex calculation. The FontLoader should instead
wait for pending stylesheets to load.

Tests: fast/css/fontloader-tab-index.html

* css/FontLoader.cpp:
(WebCore::FontLoader::notifyWhenFontsReady): Do not immediately
call loadingDone().
(WebCore::FontLoader::loadingDone): Wait for stylesheets to
finish loading rather than updating document styles.
* css/FontLoader.h:
(WebCore::FontLoader::loading): Include JS font loads when testing
for the loading state.

LayoutTests:

Test that getting the tab index on a body element with
font-relative measurements to a local @font-face do not
cause a crash.

* fast/css/fontloader-tab-index-expected.html: Added.
* fast/css/fontloader-tab-index.html: Added.

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

4 years agoUnreviewed build fix.
mmaxfield@apple.com [Fri, 3 Oct 2014 17:55:17 +0000 (17:55 +0000)]
Unreviewed build fix.

Fixing the Windows build after r174269.

Patch by Myles C. Maxfield <mmaxfield@apple.com> on 2014-10-03

* platform/graphics/win/UniscribeController.cpp:
(WebCore::UniscribeController::shapeAndPlaceItem):

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

4 years agoSupport modern for loops over StringViews
mmaxfield@apple.com [Fri, 3 Oct 2014 17:43:32 +0000 (17:43 +0000)]
Support modern for loops over StringViews
https://bugs.webkit.org/show_bug.cgi?id=137165

Patch by Myles C. Maxfield <mmaxfield@apple.com> on 2014-10-03
Reviewed by Darin Adler.

This patch adds two functions, codePoints() and codeUnits(), on StringView.
These two functions return small objects which have begin() and end() functions,
which means it can be used by the modern for loop style. This small class also
has an inner iterator class which can be incremented, dereferenced, and
compared.

Using these new objects looks like this:
for (UChar codeunit : stringView.codeUnits()) { } and
for (UChar32 codepoint : stringView.codePoints()) { }.

* wtf/text/StringView.h:
(WTF::StringView::codepoints):
(WTF::StringView::codeunits):
(WTF::StringViewCodePointIterator::StringViewCodePointIterator):
(WTF::StringViewCodePointIterator::Iterator::Iterator):
(WTF::StringViewCodePointIterator::Iterator::operator*):
(WTF::StringViewCodePointIterator::Iterator::operator!=):
(WTF::StringViewCodeUnitIterator::StringViewCodeUnitIterator):
(WTF::StringViewCodeUnitIterator::Iterator::Iterator):
(WTF::StringViewCodeUnitIterator::Iterator::operator*):
(WTF::StringViewCodeUnitIterator::Iterator::operator!=):

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

4 years agoEventSender dispatches should be per-Document
burg@cs.washington.edu [Fri, 3 Oct 2014 17:15:51 +0000 (17:15 +0000)]
EventSender dispatches should be per-Document
https://bugs.webkit.org/show_bug.cgi?id=136051

Reviewed by Andreas Kling.

EventSender uses a Timer to asynchronously dispatch the same event to multiple
elements of the same type on a future run loop. However, we previously dispatched events
to elements from any Document rather than the one that requested the event send.

This patch changes EventSender to be associated with a single Document. EventSenders
for each Document are lazily allocated. Further per-Document or global optimizations
are possible.

This change also lays the groundwork for making EventSender-related DOM events
deterministic during web replay, tracked at <https://webkit.org/b/137090>.

No new tests, covered by fast/text/svg-font-trigger-load-event.html.

* CMakeLists.txt:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* dom/DOMAllInOne.cpp:
* dom/Document.cpp:
(WebCore::Document::Document):
(WebCore::Document::implicitClose):
Dispatch pending events for this document only. Rename local variable f to frame.

* dom/Document.h:
(WebCore::Document::sharedEventSenders):
* dom/EventSender.h:
(WebCore::EventSender::EventSender):
(WebCore::EventSender::hasPendingEvents):
(WebCore::EventSender<T>::dispatchEventSoon):
(WebCore::EventSender<T>::cancelEvent):
(WebCore::EventSender<T>::dispatchPendingEvents):
(WebCore::EventSender<T>::EventSender): Deleted. The type argument was not necessary.
* dom/SharedEventSenders.cpp: Added. Lazily creates event senders as they are requested.
(WebCore::SharedEventSenders::linkLoadEventSender):
(WebCore::SharedEventSenders::styleLoadEventSender):
(WebCore::SharedEventSenders::imageBeforeloadEventSender):
(WebCore::SharedEventSenders::imageLoadEventSender):
(WebCore::SharedEventSenders::imageErrorEventSender):
* dom/SharedEventSenders.h: Added.
(WebCore::SharedEventSenders::SharedEventSenders):
* html/HTMLLinkElement.cpp:
(WebCore::HTMLLinkElement::~HTMLLinkElement):
(WebCore::HTMLLinkElement::dispatchPendingEvent):
(WebCore::HTMLLinkElement::notifyLoadedSheetAndAllCriticalSubresources):
(WebCore::linkLoadEventSender): Deleted.
(WebCore::HTMLLinkElement::dispatchPendingLoadEvents): Deleted.
* html/HTMLLinkElement.h:
* html/HTMLStyleElement.cpp:
(WebCore::HTMLStyleElement::~HTMLStyleElement):
(WebCore::HTMLStyleElement::dispatchPendingEvent):
(WebCore::HTMLStyleElement::notifyLoadedSheetAndAllCriticalSubresources):
(WebCore::styleLoadEventSender): Deleted.
(WebCore::HTMLStyleElement::dispatchPendingLoadEvents): Deleted.
* html/HTMLStyleElement.h:
* loader/ImageLoader.cpp:
(WebCore::ImageLoader::beforeLoadEventSender):
(WebCore::ImageLoader::loadEventSender):
(WebCore::ImageLoader::errorEventSender):
(WebCore::ImageLoader::dispatchPendingEvent):
(WebCore::beforeLoadEventSender): Deleted.
(WebCore::loadEventSender): Deleted.
(WebCore::errorEventSender): Deleted.
(WebCore::ImageLoader::dispatchPendingBeforeLoadEvents): Deleted.
(WebCore::ImageLoader::dispatchPendingLoadEvents): Deleted.
(WebCore::ImageLoader::dispatchPendingErrorEvents): Deleted.
* loader/ImageLoader.h:
* xml/parser/XMLDocumentParser.cpp:
(WebCore::XMLDocumentParser::append): Remove an early call to the EventSender for image
beforeload events. This was a performance optimization, but is no longer safe since the
document (and thus the event sender) may not be available in a synchronous document write.

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

4 years agoTextRun::length() should return an unsigned
mmaxfield@apple.com [Fri, 3 Oct 2014 16:57:10 +0000 (16:57 +0000)]
TextRun::length() should return an unsigned
https://bugs.webkit.org/show_bug.cgi?id=137354

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

Currently, the m_len instance variable that backs the TextRun::length() function is
an unsigned, but the length() function implicitly casts that to an int when
returning it. This patch makes the function return an unsigned, and makes the
do any casting if necessary.

No new tests because there is no behavior change.

* platform/graphics/Font.cpp:
(WebCore::Font::drawText): Cast result to int.
(WebCore::Font::drawEmphasisMarks): Ditto.
(WebCore::Font::adjustSelectionRectForText): Ditto.
(WebCore::computeUnderlineType): Update internal type to be unsigned.
* platform/graphics/GlyphBuffer.h:
(WebCore::GlyphBuffer::add): Update sentinel value to be unsigned.
(WebCore::GlyphBuffer::saveOffsetsInString): Ditto.
* platform/graphics/GraphicsContext.cpp: Update internal type to be unsigned.
* platform/graphics/TextRun.h:
(WebCore::TextRun::length): Update return type.
(WebCore::TextRun::charactersLength): Ditto.
* platform/graphics/WidthIterator.cpp:
(WebCore::WidthIterator::advanceInternal): Cast result to int.
* rendering/svg/SVGTextMetricsBuilder.cpp:
(WebCore::SVGTextMetricsBuilder::currentCharacterStartsSurrogatePair): Remove
unnecessary casts.
(WebCore::SVGTextMetricsBuilder::advance): Ditto.
* svg/SVGFontData.cpp:
(WebCore::SVGFontData::applySVGGlyphSelection): Cast result to int.

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

4 years agoRemove RefPtrHashMap
weinig@apple.com [Fri, 3 Oct 2014 16:47:06 +0000 (16:47 +0000)]
Remove RefPtrHashMap
https://bugs.webkit.org/show_bug.cgi?id=137200

Reviewed by Darin Adler.

Source/WTF:

HashMap now has all the features of the RefPtr specialization of HashMap
(which lived in RefPtrHashMap.h) and is in fact more efficient when moving
items into it. For instance:

For HashMap<RefPtr<Foo>, Bar> map:

RefPtr<Foo> foo = ...;
map.add(WTF::move(foo), Bar());

will now not cause a ref() / deref(), but will successfully move the item in
without churn. The same is true if foo.release() was used.

* WTF.vcxproj/WTF.vcxproj:
* WTF.vcxproj/WTF.vcxproj.filters:
* WTF.xcodeproj/project.pbxproj:
* wtf/CMakeLists.txt:
Remove references to RefPtrHashMap.h.

* wtf/RefPtrHashMap.h: Removed.

* wtf/HashMap.h:
Remove #include of RefPtrHashMap.h and add inlineGet to match the interface
exposed by the RefPtrHashMap specialization.

Tools:

* TestWebKitAPI/Tests/WTF/HashMap.cpp:
(TestWebKitAPI::TEST):
Add tests for using a HashMap with RefPtr keys, focusing on ensuring that
a minimum of refcount churn occurs.

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

4 years ago[GTK] Unreviewed GTK gardening.
clopez@igalia.com [Fri, 3 Oct 2014 16:43:06 +0000 (16:43 +0000)]
[GTK] Unreviewed GTK gardening.

* platform/gtk/TestExpectations: Update test name for bug 136673 after r173418.
* platform/gtk/css1/box_properties/clear_float-expected.txt: Rebaseline after r174233.
* platform/gtk/css1/box_properties/float_on_text_elements-expected.txt: Rebaseline after r174233.
* platform/gtk/css2.1/t0905-c5525-fltcont-00-d-g-expected.txt: Rebaseline after r174233.
* platform/gtk/css2.1/t0905-c5525-fltwidth-00-c-g-expected.txt: Rebaseline after r174233.
* platform/gtk/css2.1/t1602-c546-txt-align-00-b-expected.txt: Rebaseline after r174233.
* platform/gtk/fast/multicol/float-avoidance-expected.txt: Rebaseline after r174233.
* platform/gtk/fast/multicol/overflow-across-columns-expected.txt: Rebaseline after r174233.
* platform/gtk/fast/multicol/overflow-across-columns-percent-height-expected.txt: Rebaseline after r174233.
* platform/gtk/fast/multicol/overflow-unsplittable-expected.txt: Rebaseline after r174233.
* platform/gtk/fast/multicol/positive-leading-expected.txt: Rebaseline after r174233.
* platform/gtk/fast/multicol/vertical-lr/float-avoidance-expected.txt: Rebaseline after r174233.
* platform/gtk/fast/multicol/vertical-rl/float-avoidance-expected.txt: Rebaseline after r174233.
* platform/gtk/fast/regions/multiple-directionality-changes-in-variable-width-regions-expected.txt: Rebaseline after r174233.
* platform/gtk/fast/regions/repaint/line-flow-with-floats-in-regions-expected.txt: Rebaseline after r174233.
* platform/gtk/fast/repaint/line-flow-with-floats-1-expected.txt: Rebaseline after r174233.
* platform/gtk/fast/repaint/line-flow-with-floats-10-expected.txt: Rebaseline after r174233.
* platform/gtk/fast/repaint/line-flow-with-floats-2-expected.txt: Rebaseline after r174233.
* platform/gtk/fast/repaint/line-flow-with-floats-3-expected.txt: Rebaseline after r174233.
* platform/gtk/fast/repaint/line-flow-with-floats-4-expected.txt: Rebaseline after r174233.
* platform/gtk/fast/repaint/line-flow-with-floats-5-expected.txt: Rebaseline after r174233.
* platform/gtk/fast/repaint/line-flow-with-floats-6-expected.txt: Rebaseline after r174233.
* platform/gtk/fast/repaint/line-flow-with-floats-7-expected.txt: Rebaseline after r174233.
* platform/gtk/fast/repaint/line-flow-with-floats-8-expected.txt: Rebaseline after r174233.
* platform/gtk/fast/repaint/line-flow-with-floats-9-expected.txt: Rebaseline after r174233.
* platform/gtk/fast/text/justified-selection-at-edge-expected.txt: Rebaseline after r174233.
* platform/gtk/fast/text/justify-ideograph-leading-expansion-expected.txt: Rebaseline after r174233.
* platform/gtk/fast/text/justify-nbsp-expected.txt: Added. Rebaseline after r174233.
* platform/gtk/fast/text/trailing-white-space-2-expected.txt: Rebaseline after r174233.
* platform/gtk/tables/mozilla/marvin/x_tbody_align_justify-expected.txt: Rebaseline after r174233.
* platform/gtk/tables/mozilla/marvin/x_td_align_justify-expected.txt: Rebaseline after r174233.
* platform/gtk/tables/mozilla/marvin/x_tfoot_align_justify-expected.txt: Rebaseline after r174233.
* platform/gtk/tables/mozilla/marvin/x_th_align_justify-expected.txt: Rebaseline after r174233.
* platform/gtk/tables/mozilla/marvin/x_thead_align_justify-expected.txt: Rebaseline after r174233.
* platform/gtk/tables/mozilla/marvin/x_tr_align_justify-expected.txt: Rebaseline after r174233.

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

4 years agoRemove workarounds for versions of Python before 2.7
evab.u-szeged@partner.samsung.com [Fri, 3 Oct 2014 15:03:27 +0000 (15:03 +0000)]
Remove workarounds for versions of Python before 2.7
https://bugs.webkit.org/show_bug.cgi?id=137338

Reviewed by Csaba Osztrogon√°c.

* Scripts/webkitpy/common/system/autoinstall.py:
(AutoInstaller._extract_targz):
(AutoInstaller._unzip):
(AutoInstaller): Deleted.
(AutoInstaller._extract_all): Deleted.
* Scripts/webkitpy/common/webkitunittest.py:
(TestCase.setUp): Deleted.
* Scripts/webkitpy/layout_tests/models/test_configuration.py:
(TestConfigurationConverter.collapse_macros):
(TestConfigurationConverter.to_specifiers_list.try_collapsing):
(TestConfigurationConverter.to_specifiers_list.try_abbreviating):
(TestConfigurationConverter):
(TestConfigurationConverter.combinations): Deleted.
* Scripts/webkitpy/layout_tests/models/test_expectations_unittest.py:
* Scripts/webkitpy/port/base.py:

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

4 years agoUnreviewed, rolling out r174264.
evab.u-szeged@partner.samsung.com [Fri, 3 Oct 2014 12:26:32 +0000 (12:26 +0000)]
Unreviewed, rolling out r174264.
https://bugs.webkit.org/show_bug.cgi?id=137392

It broke run-webkit-tests (Requested by ebalazsfalvi on
#webkit).

Reverted changeset:

"Remove workarounds for versions of Python before 2.7"
https://bugs.webkit.org/show_bug.cgi?id=137338
http://trac.webkit.org/changeset/174264

Patch by Commit Queue <commit-queue@webkit.org> on 2014-10-03

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

4 years agoRemove workarounds for versions of Python before 2.7
evab.u-szeged@partner.samsung.com [Fri, 3 Oct 2014 10:14:36 +0000 (10:14 +0000)]
Remove workarounds for versions of Python before 2.7
https://bugs.webkit.org/show_bug.cgi?id=137338

Reviewed by Csaba Osztrogon√°c.

* Scripts/webkitpy/common/system/autoinstall.py:
(AutoInstaller._extract_targz):
(AutoInstaller._unzip):
(AutoInstaller): Deleted.
(AutoInstaller._extract_all): Deleted.
* Scripts/webkitpy/common/webkitunittest.py:
(TestCase.setUp): Deleted.
* Scripts/webkitpy/layout_tests/models/test_configuration.py:
(TestConfigurationConverter.collapse_macros):
(TestConfigurationConverter.to_specifiers_list.try_collapsing):
(TestConfigurationConverter.to_specifiers_list.try_abbreviating):
(TestConfigurationConverter):
(TestConfigurationConverter.combinations): Deleted.
* Scripts/webkitpy/layout_tests/models/test_expectations_unittest.py:
* Scripts/webkitpy/port/base.py:
* Scripts/webkitpy/port/driver.py:
(ContentBlock.__init__):
* Scripts/webkitpy/port/server_process.py:
(ServerProcess._reset):

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

4 years agoRemove autoinstaller workaround for python 2.6
evab.u-szeged@partner.samsung.com [Fri, 3 Oct 2014 10:13:41 +0000 (10:13 +0000)]
Remove autoinstaller workaround for python 2.6
https://bugs.webkit.org/show_bug.cgi?id=137343

Reviewed by Daniel Bates.

Reverting <http://trac.webkit.org/changeset/124928>, neither Python
2.6, nor Snow Leopard is supported anymore, so the workaround is not
needed anymore.

* Scripts/webkitpy/common/system/autoinstall.py:
(AutoInstaller.install):
* Scripts/webkitpy/test/main.py:
(Tester._run_tests):
* Scripts/webkitpy/thirdparty/__init__.py:
(AutoinstallImportHook._install_mechanize):
(AutoinstallImportHook._install_pep8):
(AutoinstallImportHook._install_pylint):
(AutoinstallImportHook._install_buildbot):
(AutoinstallImportHook._install_coverage):
(AutoinstallImportHook._install_eliza):
(AutoinstallImportHook._install_irc):
(AutoinstallImportHook._install):
(autoinstall_everything):

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

4 years ago[GTK] URTBF after r174231.
ossy@webkit.org [Fri, 3 Oct 2014 09:25:08 +0000 (09:25 +0000)]
[GTK] URTBF after r174231.

* WebProcess/InjectedBundle/API/gtk/WebKitWebPage.cpp:
(webkit_web_page_get_dom_document):
* WebProcess/WebPage/DrawingAreaImpl.cpp:
(WebKit::DrawingAreaImpl::didInstallPageOverlay): Deleted.
(WebKit::DrawingAreaImpl::didUninstallPageOverlay): Deleted.
(WebKit::DrawingAreaImpl::setPageOverlayNeedsDisplay): Deleted.
(WebKit::DrawingAreaImpl::setPageOverlayOpacity): Deleted.
* WebProcess/WebPage/DrawingAreaImpl.h:
* WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp:
(WebKit::LayerTreeHostGtk::createPageOverlayLayer):
(WebKit::LayerTreeHostGtk::destroyPageOverlayLayer):
(WebKit::LayerTreeHostGtk::didInstallPageOverlay): Deleted.
(WebKit::LayerTreeHostGtk::didUninstallPageOverlay): Deleted.
(WebKit::LayerTreeHostGtk::setPageOverlayNeedsDisplay): Deleted.
* WebProcess/WebPage/gtk/LayerTreeHostGtk.h:

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