WebKit-https.git
6 years agoQuery directly for cache partition names
jpfau@apple.com [Sat, 13 Apr 2013 01:09:47 +0000 (01:09 +0000)]
Query directly for cache partition names
https://bugs.webkit.org/show_bug.cgi?id=114538

Reviewed by David Kilzer.

Source/WebKit2:

Call back into WebKitSystemInterface to ask it for the cache
partition names instead of trying to figure them out.

* WebProcess/ResourceCache/WebResourceCacheManager.cpp:
(WebKit::WebResourceCacheManager::getCacheOrigins):
(WebKit):
(WebKit::WebResourceCacheManager::returnCacheOrigins):
* WebProcess/ResourceCache/WebResourceCacheManager.h:
(WebResourceCacheManager):
* WebProcess/ResourceCache/cf/WebResourceCacheManagerCFNet.cpp:
(WebKit::WebResourceCacheManager::cfURLCacheHostNames):
(WebKit):
(WebKit::WebResourceCacheManager::cfURLCacheHostNamesWithCallback):

WebKitLibraries:

* WebKitSystemInterface.h:
* libWebKitSystemInterfaceLion.a:
* libWebKitSystemInterfaceMountainLion.a:

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

6 years agoBUILD FIX: Make AccessibilityUIElementIOS.mm build on iOS
ddkilzer@apple.com [Sat, 13 Apr 2013 01:02:54 +0000 (01:02 +0000)]
BUILD FIX: Make AccessibilityUIElementIOS.mm build on iOS

Reviewed by Chris Fleizach.

* DumpRenderTree/ios/AccessibilityUIElementIOS.mm: Declare
-_accessibilityPath from the WebAccessibilityObjectWrapper
class.
(_CGPathEnumerationIteration): Remove unused CGPoint* variable.

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

6 years agoBuild fix - too soon!
barraclough@apple.com [Sat, 13 Apr 2013 00:37:46 +0000 (00:37 +0000)]
Build fix - too soon!

* UIProcess/API/mac/WKViewPrivate.h:

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

6 years agoUpdate AVFoundationCF code following http://trac.webkit.org/changeset/148291.
roger_fong@apple.com [Sat, 13 Apr 2013 00:33:41 +0000 (00:33 +0000)]
Update AVFoundationCF code following trac.webkit.org/changeset/148291.
https://bugs.webkit.org/show_bug.cgi?id=114548.

Reviewed by Eric Carlson.

* platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
(WebCore::MediaPlayerPrivateAVFoundationCF::seekToTime):
(WebCore::MediaPlayerPrivateAVFoundationCF::platformMinTimeSeekable):
(WebCore):
(WebCore::MediaPlayerPrivateAVFoundationCF::platformMaxTimeSeekable):
* platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.h:
(MediaPlayerPrivateAVFoundationCF):

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

6 years agoBuild fix - too soon!
barraclough@apple.com [Sat, 13 Apr 2013 00:15:58 +0000 (00:15 +0000)]
Build fix - too soon!

* UIProcess/API/mac/WKView.mm:
(-[WKView setFrameSize:]):

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

6 years agoUnreviewed, remove an old email address for myself.
jpfau@apple.com [Fri, 12 Apr 2013 23:55:44 +0000 (23:55 +0000)]
Unreviewed, remove an old email address for myself.

* Scripts/webkitpy/common/config/committers.py:

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

6 years agoDemystify some code in RenderLayer::updateScrollableAreaSet()
simon.fraser@apple.com [Fri, 12 Apr 2013 23:47:12 +0000 (23:47 +0000)]
Demystify some code in RenderLayer::updateScrollableAreaSet()
https://bugs.webkit.org/show_bug.cgi?id=114543

Reviewed by Tim Horton.

Clean up some code that called functions with important side effects
inside a ternary operator, and clean up the #ifdefs.

* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::updateScrollableAreaSet):

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

6 years agoBlock freeing thread should call Region::destroy instead of delete
mhahnenberg@apple.com [Fri, 12 Apr 2013 23:43:13 +0000 (23:43 +0000)]
Block freeing thread should call Region::destroy instead of delete
https://bugs.webkit.org/show_bug.cgi?id=114544

Reviewed by Oliver Hunt.

Since Region doesn't have a virtual destructor, calling delete will not properly clean up all of
the state of the Region. We should call destroy() instead.

* heap/BlockAllocator.cpp:
(JSC::BlockAllocator::releaseFreeRegions):
(JSC::BlockAllocator::blockFreeingThreadMain):

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

6 years ago[WK2] WebPageProxy loadURL() won't work when called just after terminateProcess()
benjamin@webkit.org [Fri, 12 Apr 2013 23:29:13 +0000 (23:29 +0000)]
[WK2] WebPageProxy loadURL() won't work when called just after terminateProcess()
https://bugs.webkit.org/show_bug.cgi?id=110743

Patch by Adenilson Cavalcanti <cavalcantii@gmail.com> on 2013-04-12
Reviewed by Benjamin Poulain.

Source/WebKit2:

A call to loadURL() just after terminating WebProcess will fail thanks to
WebPageProxy being in an undefined state since it is in the middle of its own
cleanup after process termination.

To properly fix this, not only WebPageProxy cleanup should be made
at WebProcess termination request, but also WebProcessProxy needs
to only return to its caller after terminating the process and
closing connections. Otherwise, WebPageProxy can even be able to
detect that WebProcess is no longer running, but a call to respawn
the process will fail.

To fix these issues, this patch moves the cleanup code to a shared private function
that is used for both the cases i.e. user termination and real crash. WebProcess
shutdown is done using a new method that ensures that all cleanup was done before
returning.

A last change introduced in this patch is that for user requested termination,
clients are no longer notified of a crash (since it is not a crash).

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::terminateProcess):
(WebKit::WebPageProxy::processDidCrash):
(WebKit):
(WebKit::WebPageProxy::resetStateAfterProcessExited):
* UIProcess/WebPageProxy.h:
(WebPageProxy):
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::userRequestedTerminate):
(WebKit):
* UIProcess/WebProcessProxy.h:
(WebProcessProxy):

Tools:

Adding a new test file to check if loading a page just after WebProcess
has crashed (or was terminated) works. The test executes the
following steps (Load, Crash, Load), thus stressing WebProcess
reattach and process termination code path.

* TestWebKitAPI/GNUmakefile.am:
* TestWebKitAPI/PlatformEfl.cmake:
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKit2/MouseMoveAfterCrash.cpp:
(TestWebKitAPI::setPageLoaderClient):
(TestWebKitAPI::TEST):
* TestWebKitAPI/Tests/WebKit2/LoadPageOnCrash.cpp: Added.
(TestWebKitAPI):
(WebKit2CrashLoader):
(TestWebKitAPI::WebKit2CrashLoader::WebKit2CrashLoader):
(TestWebKitAPI::WebKit2CrashLoader::loadUrl):
(TestWebKitAPI::WebKit2CrashLoader::crashWebProcess):
(TestWebKitAPI::didFinishLoad):
(TestWebKitAPI::TEST):
* TestWebKitAPI/Tests/WebKit2/WebKit2.pro:

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

6 years agoAdd contentAnchor to WKView
barraclough@apple.com [Fri, 12 Apr 2013 23:18:50 +0000 (23:18 +0000)]
Add contentAnchor to WKView
http://bugs.webkit.org/show_bug.cgi?id=114469

Currently if you call setFrameSize: while frame size updates are disabled, or if the geometry
update times out, then the previously rendered page content will be rendered anchored to the
top left corner of the frame.

This is appropriate if the frame is being resized from the bottom right corner. In order to
achieve a more desirable appearance if the frame is being resized from another corner we
should allow the corner at which the content anchors to be specified.

Reviewed by Simon Fraser.

* UIProcess/API/mac/WKView.mm:
(-[WKView setFrameSize:]):
    - If the content anchor has been set, then updating the frame size moves the origin within the layer.
(-[WKView _setDrawingAreaSize:]):
    - Instruct the drawing area to paint at the correct position within the layer.
(-[WKView _setAcceleratedCompositingModeRootLayer:]):
    - If the root layer is cleared this implicitly resets any origin position we had set within it.
(-[WKView initWithFrame:contextRef:pageGroupRef:relatedToPage:]):
    - initialize new data members.
(-[WKView setContentAnchor:]):
(-[WKView contentAnchor]):
    - Accessor implementation for @property contentAnchor.

* UIProcess/API/mac/WKViewPrivate.h:
(NS_ENUM):
    - Added WKContentAnchor enum type, and @property contentAnchor.

* UIProcess/DrawingAreaProxy.cpp:
(WebKit::DrawingAreaProxy::setSize):
    - Don't suppress geometry updates where the layer poistion has changed.

* UIProcess/DrawingAreaProxy.h:
(DrawingAreaProxy):
    - Added m_layerPosition, layerPosition argument to setSize

* UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.h:
(TiledCoreAnimationDrawingAreaProxy):
    - Added m_lastSentLayerPosition

* UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm:
(WebKit::TiledCoreAnimationDrawingAreaProxy::didUpdateGeometry):
    - Don't suppress geometry updates where the layer poistion has changed.

(WebKit::TiledCoreAnimationDrawingAreaProxy::sendUpdateGeometry):
    - Pass layer position in UpdateGeometry message.

* WebProcess/WebPage/DrawingArea.h:
(WebKit::DrawingArea::updateGeometry):
    - Added layerPosition argument to updateGeometry

* WebProcess/WebPage/DrawingArea.messages.in:
    - Added layerPosition argument to updateGeometry

* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
(TiledCoreAnimationDrawingArea):
    - Added layerPosition argument to updateGeometry

* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
(WebKit::TiledCoreAnimationDrawingArea::updateGeometry):
    - Added layerPosition argument to updateGeometry

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

6 years ago <rdar://problem/13277362> REGRESSION (r141981): Crash when closing a Google...
ap@apple.com [Fri, 12 Apr 2013 23:11:29 +0000 (23:11 +0000)]
    <rdar://problem/13277362> REGRESSION (r141981): Crash when closing a Google Docs document
        https://bugs.webkit.org/show_bug.cgi?id=114541

        Reviewed by Brady Eidson.

        Test: http/tests/ssl/ping-with-unsafe-redirect.html

        * loader/FrameNetworkingContext.h:
        (WebCore::FrameNetworkingContext::shouldClearReferrerOnHTTPSToHTTPRedirect):
        Added a null check. All NetworkingContext functions except for this one had it already.

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

6 years agoUnreviewed. Don't forget to skip the test in WebKit2 for now.
rniwa@webkit.org [Fri, 12 Apr 2013 22:50:05 +0000 (22:50 +0000)]
Unreviewed. Don't forget to skip the test in WebKit2 for now.

* platform/mac-wk2/TestExpectations:

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

6 years ago[Mac] REGRESSION: Auto substitution strips new lines
rniwa@webkit.org [Fri, 12 Apr 2013 22:46:01 +0000 (22:46 +0000)]
[Mac] REGRESSION: Auto substitution strips new lines
https://bugs.webkit.org/show_bug.cgi?id=114537

Reviewed by Enrica Casucci.

Source/WebCore:

The bug was caused by SpellingCorrectionCommand's use of InsertTextCommand. This command can't insert
new lines and there's even an assertion for it. Use TypingCommand::insertText instead.

Since TypingCommand::insertText calls appliedEditing on its own, we need to avoid calling that again in
CompositeEditCommand::apply after SpellingCorrectionCommand::doApply. Replaced the check in apply to use
callsAppliedEditingInDoApply instead of isTypingCommand, and added callsAppliedEditingInDoApply to both
TypingCommand and SpellingCorrectionCommand to return true (it returns false by default).

Test: platform/mac/editing/spelling/autocorrection-with-multi-line-text.html

* editing/CompositeEditCommand.cpp:
(WebCore::CompositeEditCommand::apply): Use TypingCommand::insertText instead of InsertTextCommand
(WebCore::CompositeEditCommand::callsAppliedEditingInDoApply): Added. Returns false.
* editing/CompositeEditCommand.h:
(CompositeEditCommand):
* editing/SpellingCorrectionCommand.cpp:
(WebCore::SpellingCorrectionCommand::doApply):
(WebCore::SpellingCorrectionCommand::callsAppliedEditingInDoApply): Added. Returns true.
* editing/SpellingCorrectionCommand.h:
(SpellingCorrectionCommand):
* editing/TypingCommand.cpp:
(WebCore::TypingCommand::callsAppliedEditingInDoApply): Added. Returns true.
* editing/TypingCommand.h:
(TypingCommand):

Tools:

Add a rule to replace "helloleworld" by "hello\nworld" for testing purpose.

* DumpRenderTree/mac/DumpRenderTree.mm:
(resetDefaultsToConsistentValues):

LayoutTests:

Added a regression test. Unfortunately, we can't setup text substituion in DumpRenderTree
so use NSSpellChecker to exercise the relevant code path.

* platform/mac/editing/spelling/autocorrection-with-multi-line-text-expected.txt: Added.
* platform/mac/editing/spelling/autocorrection-with-multi-line-text.html: Added.

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

6 years agoRefactor TextTrack and TextTrackList to make it easier to add audio and video tracks
commit-queue@webkit.org [Fri, 12 Apr 2013 22:04:38 +0000 (22:04 +0000)]
Refactor TextTrack and TextTrackList to make it easier to add audio and video tracks
https://bugs.webkit.org/show_bug.cgi?id=114330

Patch by Brendan Long <b.long@cablelabs.com> on 2013-04-12
Reviewed by Jer Noble.

No new tests because this doesn't add new functionality.

* CMakeLists.txt: Only compile text track files if ENABLE(VIDEO_TRACK), and add TrackListBase
* Target.pri: Add TrackListBase
* WebCore.vcproj/WebCore.vcproj: Correct InbandTextTrackPrivate.h's location and add TrackListBase
* WebCore.xcodeproj/project.pbxproj: Add TrackListBase
* html/HTMLMediaElement.cpp: Renamed "track" functions to "textTrack"
(WebCore::HTMLMediaElement::mediaPlayerDidAddTextTrack): Renamed.
(WebCore::HTMLMediaElement::mediaPlayerDidRemoveTextTrack): Renamed.
(WebCore::HTMLMediaElement::addTextTrack): Renamed.
(WebCore::HTMLMediaElement::removeTextTrack): Renamed.
(WebCore::HTMLMediaElement::removeAllInbandTracks): Use renamed functions.
(WebCore::HTMLMediaElement::didAddTextTrack): Renamed.
(WebCore::HTMLMediaElement::didRemoveTextTrack): Renamed.
* html/HTMLMediaElement.h:
Renamed "track" functions to "textTrack" and only forward-declare TextTrackList if ENABLE(VIDEO_TRACK)
* html/HTMLTrackElement.cpp: Renamed "track" functions to "textTrack"
(WebCore::HTMLTrackElement::insertedInto):
(WebCore::HTMLTrackElement::removedFrom):
* html/track/TextTrack.cpp:
Move media element, label, language and kind into TrackBase and move EventTarget functions into TextTrack.
(WebCore::TextTrack::TextTrack): Added.
(WebCore::TextTrack::interfaceName): Added.
(WebCore::TextTrack::scriptExecutionContext): Added.
(WebCore::TextTrack::eventTargetData): Added.
(WebCore::TextTrack::ensureEventTargetData): Added.
(WebCore::TextTrack::isValidKind): Added to support TrackBase::setKind()
(WebCore::TextTrack::setKind): Override to support textTrackKindChanged()
(WebCore::TextTrack::isRendered): Use kind(), label() and language() instead of m_kind, etc.
(WebCore::TextTrack::platformTextTrack): Ditto.
(WebCore::TextTrack::isMainProgramContent): Ditto.
* html/track/TextTrack.h:
Same as TextTrack.cpp, plus added defaultKindKeyword() so TrackBase::setKind() will work and added
toTextTrack().
* html/track/TextTrackList.cpp:
Move functionality into TrackListBase, add toTextTrack() casts, use
TrackBase where necesssary and use owner() instead of m_owner.

Moved EventTarget functions into TrackListBase.
(TextTrackList::TextTrackList):
(TextTrackList::getTrackIndexRelativeToRenderedTracks):
(TextTrackList::item):
(TextTrackList::invalidateTrackIndexesAfterTrack):
(TextTrackList::append):
(TextTrackList::remove):
(TextTrackList::contains):
* html/track/TextTrackList.h:
Move EventTarget, RefCounted and m_inbandTracks into TrackListBase.
Override length(), contains() and remove().
* html/track/TrackBase.cpp: Remove EventTarget functions.
(WebCore::TrackBase::TrackBase):
Remove EventTarget, add label and language
(WebCore::TrackBase::setKind): Added
* html/track/TrackBase.h:
Don't extend EventTarget (AudioTrack and VideoTrack aren't). Handle
kind, label, language and media element.
(WebCore::TrackBase::setMediaElement): Added.
(WebCore::TrackBase::mediaElement): Added.
(WebCore::TrackBase::kind): Added.
(WebCore::TrackBase::label): Added.
(WebCore::TrackBase::setLabel): Added.
(WebCore::TrackBase::language): Added.
(WebCore::TrackBase::setLanguage): Added.
* html/track/TrackListBase.cpp:
Added. Handles functionality common to TextTrackList, AudioTrackList and
VideoTrackList.
(TrackListBase::TrackListBase): Added.
(TrackListBase::~TrackListBase): Added.
(TrackListBase::length): Added.
(TrackListBase::remove): Added.
(TrackListBase::contains): Added.
(TrackListBase::scheduleAddTrackEvent): Added.
(TrackListBase::scheduleRemoveTrackEvent): Added.
(TrackListBase::scheduleChangeEvent): Added.
(TrackListBase::asyncEventTimerFired): Added.
* html/track/TrackListBase.h:
Copied from Source/WebCore/html/track/TextTrackList.h. Handles
functionality common to TextTrackList, AudioTrackList and VideoTrackList.
(WebCore::TrackListBase::scriptExecutionContext): Added.
(WebCore::TrackListBase::clearOwner): Added.
(WebCore::TrackListBase::owner): Added.
(WebCore::TrackListBase::isFiringEventListeners): Added.
* platform/graphics/MediaPlayer.cpp:
(WebCore::MediaPlayer::addTextTrack): Renamed (was addTrack)
(WebCore::MediaPlayer::removeTextTrack): Renamed (was removeTrack)
* platform/graphics/MediaPlayer.h:
(WebCore::MediaPlayerClient::mediaPlayerDidAddTextTrack): Renamed (was mediaPlayerDidAddTrack)
(WebCore::MediaPlayerClient::mediaPlayerDidRemoveTextTrack): Renamed (was mediaPlayerDidRemoveTrack)

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

6 years agoUnreviewed, rolling out r148296 and r148297.
rniwa@webkit.org [Fri, 12 Apr 2013 21:54:11 +0000 (21:54 +0000)]
Unreviewed, rolling out r148296 and r148297.
http://trac.webkit.org/changeset/148296
http://trac.webkit.org/changeset/148297
https://bugs.webkit.org/show_bug.cgi?id=114536

Needs more thought (Requested by ap on #webkit).

* NetworkProcess/mac/com.apple.WebKit.NetworkProcess.sb.in:

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

6 years agomake the codegenerator actually emit polymorphism check in the "no vtable" path
oliver@apple.com [Fri, 12 Apr 2013 21:39:09 +0000 (21:39 +0000)]
make the codegenerator actually emit polymorphism check in the "no vtable" path
https://bugs.webkit.org/show_bug.cgi?id=114533

Reviewed by David Kilzer.

Make the "no vtable" check correct so that we actually plant a polymorphism
check.  Update a few interfaces to have the correct validation attributes.

* Modules/webdatabase/SQLTransaction.idl:
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateImplementation):
* bindings/scripts/test/JS/JSTestInterface.cpp:
(WebCore::toJS):
* bindings/scripts/test/TestInterface.idl:
* html/track/TextTrackCue.idl:
* svg/SVGAnimatedAngle.idl:
* svg/SVGAnimatedBoolean.idl:
* svg/SVGAnimatedEnumeration.idl:
* svg/SVGAnimatedInteger.idl:
* svg/SVGAnimatedLength.idl:
* svg/SVGAnimatedLengthList.idl:
* svg/SVGAnimatedNumber.idl:
* svg/SVGAnimatedNumberList.idl:
* svg/SVGAnimatedPreserveAspectRatio.idl:
* svg/SVGAnimatedRect.idl:
* svg/SVGAnimatedString.idl:
* svg/SVGAnimatedTransformList.idl:

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

6 years ago[BlackBerry] Enable selecting text in single line input field without selection point...
commit-queue@webkit.org [Fri, 12 Apr 2013 20:44:38 +0000 (20:44 +0000)]
[BlackBerry] Enable selecting text in single line input field without selection point being actually on the targeted text vertically
https://bugs.webkit.org/show_bug.cgi?id=114515

Patch by Yongxin Dai <yodai@rim.com> on 2013-04-12
Reviewed by Rob Buis.

PR #317924.
Internally reviewed by Mike Fenton.

It was still hard to select text in URL bar with an inverted selection handle.
We improve the issue by replacing the Y coordinate of selection point with Y
coordinate of start caret for single line input filed. Thus, the Y coordinate
is always valid regardless of the actual location of the selection handle.

* WebKitSupport/SelectionHandler.cpp:
(BlackBerry::WebKit::SelectionHandler::setSelection):
(BlackBerry::WebKit::SelectionHandler::startCaretViewportRect):
(WebKit):
(BlackBerry::WebKit::SelectionHandler::caretPositionChanged):
* WebKitSupport/SelectionHandler.h:
(SelectionHandler):

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

6 years agoMake CodeGeneratorJS plant comments to explain failures in the binding validation
oliver@apple.com [Fri, 12 Apr 2013 20:28:55 +0000 (20:28 +0000)]
Make CodeGeneratorJS plant comments to explain failures in the binding validation
https://bugs.webkit.org/show_bug.cgi?id=114528

Reviewed by Sam Weinig.

No change in behaviour, just make the generated bindings include comments
to aid diagnosing issues that may be non-obvious.

* bindings/scripts/CodeGeneratorJS.pm:
(GenerateImplementation):
* bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
(WebCore::toJS):
* bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
(WebCore::toJS):
* bindings/scripts/test/JS/JSTestEventConstructor.cpp:
(WebCore::toJS):
* bindings/scripts/test/JS/JSTestEventTarget.cpp:
(WebCore::toJS):
* bindings/scripts/test/JS/JSTestException.cpp:
(WebCore::toJS):
* bindings/scripts/test/JS/JSTestInterface.cpp:
(WebCore::toJS):
* bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
(WebCore::toJS):
* bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
(WebCore::toJS):
* bindings/scripts/test/JS/JSTestObj.cpp:
(WebCore::toJS):
* bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
(WebCore::toJS):
* bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
(WebCore::toJS):
* bindings/scripts/test/JS/JSTestTypedefs.cpp:
(WebCore::toJS):

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

6 years agoREGRESSION (r138858): GIFs don't start playing when they come out of background tabs
timothy_horton@apple.com [Fri, 12 Apr 2013 20:17:00 +0000 (20:17 +0000)]
REGRESSION (r138858): GIFs don't start playing when they come out of background tabs
https://bugs.webkit.org/show_bug.cgi?id=108864
<rdar://problem/13140489>

Reviewed by Antti Koivisto.

Don't repaint the world when animations resume; instead, FrameView
will cause all animated images to repaint. This line also had no effect for
TiledCoreAnimationDrawingArea, which does not implement setNeedsDisplay.

* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::resumeActiveDOMObjectsAndAnimations):

* loader/cache/CachedImage.cpp:
(WebCore::CachedImage::resumeAnimatingImagesForLoader): Added.
Iterate through all of the loader's cached resources. If they are bitmap images
which claim to be animatable, notify the image's observers that the animation advanced
by one frame. In reality, the image is still on the same frame, but will now be repainted,
restarting the animation loop.
* loader/cache/CachedImage.h:
* page/FrameView.cpp:
(WebCore::FrameView::setIsInWindow):
When the FrameView is brought into a window, repaint all animated images.
* platform/graphics/BitmapImage.cpp:
(WebCore::BitmapImage::canAnimate): Added.
Return whether or not the image should animate (claims to animate, has not already
finished its animation, and has an ImageObserver) *and* has more than one frame.
* platform/graphics/BitmapImage.h:
(BitmapImage): Add canAnimate.

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

6 years agoRe-enable WinEWS tests.
roger_fong@apple.com [Fri, 12 Apr 2013 20:10:30 +0000 (20:10 +0000)]
Re-enable WinEWS tests.

* Scripts/webkitpy/tool/commands/earlywarningsystem.py:
(WinEWS):

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

6 years agor148197 broke the GTK+ build
mrobinson@webkit.org [Fri, 12 Apr 2013 19:35:33 +0000 (19:35 +0000)]
r148197 broke the GTK+ build
https://bugs.webkit.org/show_bug.cgi?id=114525

Reviewed by Anders Carlsson.

Re-add the ENABLE(SCROLLING_THREAD) guards to scrolling thread files
and extend them with USE(COORDINATED_GRAPHICS). This code is unused
by other configurations currently.

* page/scrolling/ScrollingStateFixedNode.cpp: Re-add guards.
* page/scrolling/ScrollingStateFixedNode.h: Ditto.
* page/scrolling/ScrollingStateNode.cpp: Ditto.
* page/scrolling/ScrollingStateNode.h: Ditto.
* page/scrolling/ScrollingStateScrollingNode.cpp: Ditto.
* page/scrolling/ScrollingStateScrollingNode.h: Ditto.
* page/scrolling/ScrollingStateStickyNode.cpp: Ditto.
* page/scrolling/ScrollingStateStickyNode.h: Ditto.
* page/scrolling/ScrollingStateTree.cpp: Ditto.
* page/scrolling/ScrollingStateTree.h: Ditto.
* page/scrolling/mac/ScrollingStateNodeMac.mm: Ditto.
* page/scrolling/mac/ScrollingStateScrollingNodeMac.mm: Ditto.

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

6 years ago <rdar://problem/13334446> [Mac] Tweak sandbox profile.
ap@apple.com [Fri, 12 Apr 2013 19:28:21 +0000 (19:28 +0000)]
    <rdar://problem/13334446> [Mac] Tweak sandbox profile.

        Apply a post-landing review comment.

        * NetworkProcess/mac/com.apple.WebKit.NetworkProcess.sb.in:

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

6 years ago <rdar://problem/13334446> [Mac] Tweak sandbox profile.
ap@apple.com [Fri, 12 Apr 2013 19:14:21 +0000 (19:14 +0000)]
    <rdar://problem/13334446> [Mac] Tweak sandbox profile.

        Reviewed by Jessie Berlin.

        * NetworkProcess/mac/com.apple.WebKit.NetworkProcess.sb.in:

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

6 years ago(AVFoundation) WebKit fails to detect live stream.
jer.noble@apple.com [Fri, 12 Apr 2013 19:09:23 +0000 (19:09 +0000)]
(AVFoundation) WebKit fails to detect live stream.
https://bugs.webkit.org/show_bug.cgi?id=114474

Reviewed by Eric Carlson.

Remove a workaround (added by r88944) for an error in an Apple.com javascript
media controller. The error has been fixed, and the workaround is causing problems
with other media streams.

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

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

6 years ago[GTK] Split GtkAuthenticationDialog in two widgets
carlosgc@webkit.org [Fri, 12 Apr 2013 18:57:38 +0000 (18:57 +0000)]
[GTK] Split GtkAuthenticationDialog in two widgets
https://bugs.webkit.org/show_bug.cgi?id=103644

Reviewed by Xan Lopez.

Source/WebCore:

The current GtkAuthenticationDialog implements both the common
logic and widgets to implement a real GtkDialog and a widget to be
embedded in any container. WebKit1 uses a GtkDialog while WebKit2
embeds the dialog in the WebView. This patch splits the code to
leave in Platform only the code that is actually common, leaving
the widget implementation to the WebKit layer, using a dialog in
WebKit1 and embedding auth widget in the WebView in WebKit2.

* GNUmakefile.list.am: Add new files to compilation.
* platform/gtk/GtkAuthenticationDialog.cpp: Removed.
* platform/gtk/GtkAuthenticationDialog.h: Removed.
* platform/gtk/WebKitAuthenticationWidget.cpp: Added.
(_WebKitAuthenticationWidgetPrivate):
(packTwoColumnLayoutInBox):
(createLabel):
(createEntry):
(webkitAuthenticationWidgetInitialize):
(webkitAuthenticationWidgetFinalize):
(webkit_authentication_widget_init):
(webkit_authentication_widget_class_init):
(webkitAuthenticationWidgetNew):
(webkitAuthenticationWidgetCreateCredential):
(webkitAuthenticationWidgetGetChallenge):
* platform/gtk/WebKitAuthenticationWidget.h: Added.
(_WebKitAuthenticationWidget):
(_WebKitAuthenticationWidgetClass):

Source/WebKit/gtk:

* GNUmakefile.am: Add new files to compilation.
* WebCoreSupport/FrameLoaderClientGtk.cpp:
(WebKit::FrameLoaderClient::dispatchDidReceiveAuthenticationChallenge):
Use helper createAuthenticationDialog() to create and show the
auth dialog.
* webkit/webkitauthenticationdialog.cpp: Added.
(authenticationDialogResponseCallback):
(createAuthenticationDialog):
* webkit/webkitauthenticationdialog.h: Added.
* webkit/webkitsoupauthdialog.cpp:
(sessionAuthenticate): Ditto.

Source/WebKit2:

* GNUmakefile.list.am: Add new files to compilation.
* UIProcess/API/gtk/WebKit2GtkAuthenticationDialog.cpp: Removed.
* UIProcess/API/gtk/WebKit2GtkAuthenticationDialog.h: Removed.
* UIProcess/API/gtk/WebKitAuthenticationDialog.cpp: Added.
(webkitAuthenticationDialogAuthenticate): Use the
AuthenticationChallengeProxy to authenticate and destroy the dialog.
(okButtonClicked): Call webkitAuthenticationDialogAuthenticate()
with the credential.
(cancelButtonClicked): Call
webkitAuthenticationDialogAuthenticate() with a NULL credential to
continue without credential.
(webkitAuthenticationDialogInitialize): Build the UI.
(webkitAuthenticationDialogDraw): Draw a background.
(webkitAuthenticationDialogMap): Grab default button.
(webkitAuthenticationDialogConstructed): Create a GtkStyleContext
with the GtkWindow path to draw the widget background like a real
dialog.
(webkit_authentication_dialog_class_init):
(webkitAuthenticationDialogNew): Create a new
WebKitAuthenticationDialog widget.
* UIProcess/API/gtk/WebKitAuthenticationDialog.h: Added.
* UIProcess/API/gtk/WebKitLoaderClient.cpp:
* UIProcess/API/gtk/WebKitWebView.cpp:
(webkitWebViewHandleAuthenticationChallenge): Create a
WebKitAuthenticationDialog widget and pass add it to the
container.
* UIProcess/API/gtk/WebKitWebViewBase.cpp:
(_WebKitWebViewBasePrivate): Updated to use the widget directly.
(webkitWebViewChildIsInternalWidget): Ditto.
(webkitWebViewBaseAddAuthenticationDialog): Ditto.
(webkitWebViewBaseCancelAuthenticationDialog): Ditto.
(webkitWebViewBaseContainerRemove): Ditto.
(webkitWebViewBaseContainerForall): Ditto.
(resizeWebKitWebViewBaseFromAllocation): Ditto.
(webkitWebViewBaseFocus): Ditto.
(webkitWebViewBaseDestroy): Destroy the auth widget is present.
(webkit_web_view_base_class_init): Add implementation for
GtkWidgetClass::destroy.
* UIProcess/API/gtk/WebKitWebViewBasePrivate.h:

Tools:

* gtk/generate-gtkdoc:
(get_webkit2_options): Do not generate api docs for
WebKitAuthenticationDialog which is private in WebKit2.
(get_webkit1_options): Do not generate api docs for
webkitauthenticationdialog which is private in WebKit1.

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

6 years ago[GTK] Lower the pango dependency
mrobinson@webkit.org [Fri, 12 Apr 2013 18:45:02 +0000 (18:45 +0000)]
[GTK] Lower the pango dependency
https://bugs.webkit.org/show_bug.cgi?id=114520

Reviewed by Carlos Garcia Campos.

* Source/autotools/Versions.m4: Only depend on Pango 1.30.0 instead of
Pango 1.32.0. 1.32.0 isn't strictly necessary and the version of GTK+ that
we depend on (3.6.0) depends on 1.30.0.

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

6 years agoWebKit Queues should capitalize K in Wk2
rniwa@webkit.org [Fri, 12 Apr 2013 18:43:16 +0000 (18:43 +0000)]
WebKit Queues should capitalize K in Wk2
https://bugs.webkit.org/show_bug.cgi?id=114524

Reviewed by Philippe Normand.

* QueueStatusServer/model/queues.py:
(Queue.display_name):

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

6 years agoAdd support for MediaPlayer::minTimeSeekable()
jer.noble@apple.com [Fri, 12 Apr 2013 18:39:37 +0000 (18:39 +0000)]
Add support for MediaPlayer::minTimeSeekable()
https://bugs.webkit.org/show_bug.cgi?id=114484

Reviewed by Eric Carlson.

Plumb a new minTimeSeekable() method through MediaPlayer and
MediaPlayerPrivate and use this new method in the existing
HTMLMediaElement::minTimeSeekable() method.

* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::minTimeSeekable): Pass to MediaPlayer.
* platform/graphics/MediaPlayer.cpp:
(WebCore::NullMediaPlayerPrivate::minTimeSeekable): Return 0.
(WebCore::MediaPlayer::minTimeSeekable): Pass to MediaPlayerPrivate.
* platform/graphics/MediaPlayer.h:
* platform/graphics/MediaPlayerPrivate.h:
(WebCore::MediaPlayerPrivateInterface::seekable): Define in terms of
    minTimeSeekable()
(WebCore::MediaPlayerPrivateInterface::minTimeSeekable): Default to 0.
* platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
(WebCore::MediaPlayerPrivateAVFoundation::MediaPlayerPrivateAVFoundation):
    Initialize new m_cachedMinTimeSeekable ivar.
(WebCore::MediaPlayerPrivateAVFoundation::maxTimeSeekableDouble):
    Renamed from maxTimeSeekable().
(WebCore::MediaPlayerPrivateAVFoundation::minTimeSeekable): Added.
    Cache value of platformMinTimeSeekable().
(WebCore::MediaPlayerPrivateAVFoundation::seekableTimeRangesChanged):
    Reset m_cachedMinTimeSeekable.
* platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::seekToTime): float -> double.
(WebCore::MediaPlayerPrivateAVFoundationObjC::platformMinTimeSeekable):
    Added. Retrieve the lowest value from -[m_playerItem seekableTimeRanges].
(WebCore::MediaPlayerPrivateAVFoundationObjC::platformMaxTimeSeekable):
    float -> double.

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

6 years agoAll tests crash on Windows
andersca@apple.com [Fri, 12 Apr 2013 18:36:30 +0000 (18:36 +0000)]
All tests crash on Windows
https://bugs.webkit.org/show_bug.cgi?id=114522

Reviewed by Ryosuke Niwa.

In the MSVC++ ABI, a member function pointer will have a different size depending on whether the
class it belongs to is defined or not. Because of this, when passing member function pointers as parameters
it's important to ensure that the class is known by both the caller and the callee.

* WebFrame.cpp:
Include PolicyChecker.h

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

6 years agoUnreviewed, rolling out r147942, r148026, and r148092.
rniwa@webkit.org [Fri, 12 Apr 2013 18:06:35 +0000 (18:06 +0000)]
Unreviewed, rolling out r147942, r148026, and r148092.
http://trac.webkit.org/changeset/147942
http://trac.webkit.org/changeset/148026
http://trac.webkit.org/changeset/148092
https://bugs.webkit.org/show_bug.cgi?id=114521

"r147942 is buggy. Rollback all the patches depending on it."
(Requested by abucur on #webkit).

Source/WebCore:

* dom/ContainerNode.cpp:
(WebCore::willRemoveChildren):
(WebCore):
(WebCore::ContainerNode::removeChildren):
* dom/Document.cpp:
(WebCore::Document::nodeChildrenWillBeRemoved):
(WebCore):
* dom/Document.h:
(Document):
* dom/Node.cpp:
* dom/Node.h:
(Node):
* dom/NodeTraversal.cpp:
* dom/NodeTraversal.h:
(ElementTraversal):
(NodeTraversal):
* dom/Range.cpp:
(WebCore::boundaryNodeChildrenWillBeRemoved):
(WebCore):
(WebCore::Range::nodeChildrenWillBeRemoved):
* dom/Range.h:
* html/HTMLLIElement.cpp:
(WebCore::HTMLLIElement::attach):
* html/HTMLOListElement.cpp:
(WebCore::HTMLOListElement::updateItemValues):
(WebCore::HTMLOListElement::recalculateItemCount):
* rendering/RenderCounter.cpp:
(WebCore::previousInPreOrder):
(WebCore::previousSiblingOrParent):
(WebCore::parentElement):
(WebCore::nextInPreOrder):
* rendering/RenderListItem.cpp:
(WebCore::enclosingList):
(WebCore::RenderListItem::nextListItem):
(WebCore::previousListItem):
(WebCore::RenderListItem::calcValue):
(WebCore::RenderListItem::explicitValueChanged):
(WebCore::previousOrNextItem):
(WebCore::RenderListItem::updateListMarkerNumbers):
* rendering/RenderListItem.h:
(RenderListItem):

LayoutTests:

* fast/dom/MutationObserver/added-out-of-order-expected.txt:
* fast/dom/MutationObserver/added-out-of-order.html:
* fast/dom/Range/range-remove-children-event-expected.txt: Removed.
* fast/dom/Range/range-remove-children-event.html: Removed.
* fast/dom/containerNode-expected.txt: Added.
* fast/dom/containerNode.html: Added.
* fast/dom/shadow/shadow-and-list-elements-expected.html:
* fast/events/mutation-during-innerHTML-expected.txt: Removed.
* fast/events/mutation-during-innerHTML.html: Removed.
* fast/lists/positioned-count-crash-expected.txt:
* fast/regions/counters/extract-list-items-001-expected.html: Removed.
* fast/regions/counters/extract-list-items-001.html: Removed.
* fast/regions/counters/extract-list-items-002-expected.html: Removed.
* fast/regions/counters/extract-list-items-002.html: Removed.
* fast/regions/counters/extract-list-items-003-expected.html: Removed.
* fast/regions/counters/extract-list-items-003.html: Removed.
* fast/regions/counters/extract-list-items-004-expected.html: Removed.
* fast/regions/counters/extract-list-items-004.html: Removed.
* fast/regions/counters/extract-list-items-005-expected.html: Removed.
* fast/regions/counters/extract-list-items-005.html: Removed.
* fast/regions/counters/extract-list-items-006-expected.html: Removed.
* fast/regions/counters/extract-list-items-006.html: Removed.
* fast/regions/counters/extract-list-items-007-expected.html: Removed.
* fast/regions/counters/extract-list-items-007.html: Removed.
* fast/regions/counters/extract-list-items-008-expected.html: Removed.
* fast/regions/counters/extract-list-items-008.html: Removed.
* fast/regions/counters/extract-list-items-009-expected.html: Removed.
* fast/regions/counters/extract-list-items-009.html: Removed.
* fast/regions/counters/extract-list-items-010-expected.html: Removed.
* fast/regions/counters/extract-list-items-010.html: Removed.
* fast/regions/counters/extract-list-items-011-expected.html: Removed.
* fast/regions/counters/extract-list-items-011.html: Removed.
* fast/regions/counters/extract-list-items-012-expected.html: Removed.
* fast/regions/counters/extract-list-items-012.html: Removed.
* fast/regions/counters/extract-list-items-013-expected.html: Removed.
* fast/regions/counters/extract-list-items-013.html: Removed.
* fast/regions/counters/extract-list-items-014-expected.html: Removed.
* fast/regions/counters/extract-list-items-014.html: Removed.
* fast/regions/counters/extract-list-items-015-expected.html: Removed.
* fast/regions/counters/extract-list-items-015.html: Removed.
* fast/regions/counters/extract-numbered-paragraphs-divs-001-expected.html: Removed.
* fast/regions/counters/extract-numbered-paragraphs-divs-001.html: Removed.
* fast/regions/counters/extract-numbered-paragraphs-divs-002-expected.html: Removed.
* fast/regions/counters/extract-numbered-paragraphs-divs-002.html: Removed.
* fast/regions/counters/extract-numbered-paragraphs-expected.html: Removed.
* fast/regions/counters/extract-numbered-paragraphs.html: Removed.
* fast/regions/counters/extract-numbered-spans-display-only-some-expected.html: Removed.
* fast/regions/counters/extract-numbered-spans-display-only-some.html: Removed.
* fast/regions/counters/extract-ordered-lists-in-regions-001-expected.html: Removed.
* fast/regions/counters/extract-ordered-lists-in-regions-001.html: Removed.
* fast/regions/counters/extract-ordered-lists-in-regions-002-expected.html: Removed.
* fast/regions/counters/extract-ordered-lists-in-regions-002.html: Removed.
* fast/regions/counters/extract-ordered-lists-in-regions-003-expected.html: Removed.
* fast/regions/counters/extract-ordered-lists-in-regions-003.html: Removed.
* fast/regions/counters/extract-ordered-lists-in-regions-explicit-counters-001-expected.html: Removed.
* fast/regions/counters/extract-ordered-lists-in-regions-explicit-counters-001.html: Removed.
* fast/regions/counters/extract-ordered-lists-in-regions-explicit-counters-002-expected.html: Removed.
* fast/regions/counters/extract-ordered-lists-in-regions-explicit-counters-002.html: Removed.
* fast/regions/counters/extract-ordered-lists-in-regions-explicit-counters-003-expected.html: Removed.
* fast/regions/counters/extract-ordered-lists-in-regions-explicit-counters-003.html: Removed.
* fast/regions/counters/extract-ordered-lists-in-regions-explicit-counters-004-expected.html: Removed.
* fast/regions/counters/extract-ordered-lists-in-regions-explicit-counters-004.html: Removed.
* fast/regions/counters/extract-ordered-lists-in-regions-explicit-counters-005-expected.html: Removed.
* fast/regions/counters/extract-ordered-lists-in-regions-explicit-counters-005.html: Removed.
* fast/regions/counters/extract-unordered-lists-in-regions-expected.html: Removed.
* fast/regions/counters/extract-unordered-lists-in-regions.html: Removed.

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

6 years agoTimeRanges::nearest() returns incorrect results.
jer.noble@apple.com [Fri, 12 Apr 2013 17:58:13 +0000 (17:58 +0000)]
TimeRanges::nearest() returns incorrect results.
https://bugs.webkit.org/show_bug.cgi?id=114483

Reviewed by Eric Carlson.

.:

Add symbols needed by WebCoreTestSupport to exports list.

* Source/autotools/symbols.filter:

Source/WebCore:

Test: media/timeranges-nearest.html

TimeRanges::nearest() has had an incorrect algorithm since its
addition, which has gone unnoticed because no media engine supports
seekable ranges with greater than one entry, and no media engine
seekable ranges with startTime values > 0.

Fix the algorithm used to walk a TimeRanges object; return the closest
time, not the smallest delta between range and target time.
* html/TimeRanges.cpp:
(TimeRanges::nearest):

Add some internal functions to allow us to write LayoutTests for
TimeRanges objects:
* WebCore.exp.in:
* testing/Internals.cpp:
(WebCore::Internals::createTimeRanges):
(WebCore::Internals::closestTimeToTimeRanges):
* testing/Internals.h:
* testing/Internals.idl:

Source/WebKit:

Add symbols needed by WebCoreTestSupport to the exports list.

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

Source/WebKit/win:

Add symbols needed by WebCoreTestSupport to the exports list.

* WebKit.vcproj/WebKitExports.def.in:

LayoutTests:

* media/timeranges-nearest-expected.txt: Added.
* media/timeranges-nearest.html: Added.

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

6 years agoRemove bogus change
oliver@apple.com [Fri, 12 Apr 2013 17:40:29 +0000 (17:40 +0000)]
Remove bogus change

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

6 years ago[GTK] Web Process crash when the UI process finishes too early
carlosgc@webkit.org [Fri, 12 Apr 2013 17:24:19 +0000 (17:24 +0000)]
[GTK] Web Process crash when the UI process finishes too early
https://bugs.webkit.org/show_bug.cgi?id=112729

Reviewed by Anders Carlsson.

The problem is when creating the GSocket in the WorkQeue for the
socket descriptor. GLib considers a programmer error to create a
GSocket providing an invalid socket and finishes the process with
g_error(). We are actually providing a valid socket when creating
the GSocket, but it can be invalidated by the worker thread while
the GSocket is being created. This is because
registerEventSourceHandler is called from the main thread and
unregisterEventSourceHandler can be called from the worker
thread. We are currently registering two event handlers, one to
read data from the socket and another one to close the CoreIPC
connection when the socket connection is broken. Every event
source registered uses its own GSocket (even if the file
descriptor is actually the same), so that when the UI process
finishes too early, the first event handler can be executed in the
worker thread, closing the socket descriptor, while the main
thread is creating the GSocket for the second one.
We don't really need to use a separate event handler to monitor
the connection, because GSocket always notifies when condition is
G_IO_HUP and G_IO_ERR even if they haven't been explicitly set in
g_socket_create_source(). We can register socket event sources
differently, providing also a function to be called when the
connection is closed, using a single socket and the same even source.

* Platform/CoreIPC/unix/ConnectionUnix.cpp:
(CoreIPC::Connection::platformInvalidate):
(CoreIPC::Connection::open): Register a single socket event
handler providing also a function to be called when the connection
is closed.
* Platform/WorkQueue.h:
(WorkQueue):
* Platform/gtk/WorkQueueGtk.cpp: The EventSource class has been
split, moving everyting specific to socket event source to a
derived class SocketEventSource.
(WorkQueue::EventSource::EventSource):
(WorkQueue::EventSource::performWork):
(WorkQueue::EventSource::performWorkOnce):
(WorkQueue::EventSource::performWorkOnTermination):
(WorkQueue::EventSource::deleteEventSource):
(WorkQueue::EventSource):
(WorkQueue::SocketEventSource):
(WorkQueue::SocketEventSource::SocketEventSource):
(WorkQueue::SocketEventSource::cancel):
(WorkQueue::SocketEventSource::didClose):
(WorkQueue::SocketEventSource::checkCondition):
(WorkQueue::SocketEventSource::eventCallback):
(WorkQueue::registerSocketEventHandler):
(WorkQueue::unregisterSocketEventHandler):
(WorkQueue::dispatchOnSource):

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

6 years agoSupport "forced" subtitles
eric.carlson@apple.com [Fri, 12 Apr 2013 17:23:42 +0000 (17:23 +0000)]
Support "forced" subtitles
https://bugs.webkit.org/show_bug.cgi?id=114460

Reviewed by Jer Noble.

Source/WebCore:

Test: media/track/track-forced-subtitles.html

* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::configureTextTrackGroup): Enable a forced track if nothing else is enabled.
(WebCore::HTMLMediaElement::configureTextTracks): Include forced tracks with captions+subtitles.

* html/track/InbandTextTrack.cpp:
(WebCore::InbandTextTrack::InbandTextTrack): Deal with kind=forced.

* html/track/TextTrack.cpp:
(WebCore::TextTrack::forcedKeyword): New keyword.
(WebCore::TextTrack::isValidKindKeyword): Include forced.
(WebCore::TextTrack::platformTextTrack): Ditto.
* html/track/TextTrack.h:

* page/CaptionUserPreferences.cpp:
(WebCore::CaptionUserPreferences::primaryAudioTrackLanguageOverride): New override to support testing.
* page/CaptionUserPreferences.h:

* page/CaptionUserPreferencesMac.mm:
(WebCore::CaptionUserPreferencesMac::textTrackSelectionScore): Support forced tracks.
* platform/graphics/InbandTextTrackPrivate.h:

* platform/graphics/PlatformTextTrack.h: Add Forced, minor cleanup.

* platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp:
(WebCore::InbandTextTrackPrivateAVF::processCue): Drive-by enhancement: log cue position.

* platform/graphics/avfoundation/objc/InbandTextTrackPrivateAVFObjC.mm:
(WebCore::InbandTextTrackPrivateAVFObjC::kind): Support forced.
(WebCore::InbandTextTrackPrivateAVFObjC::label): Drive-by cleanup.

* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::processTextTracks): Don't filter out forced tracks.
(WebCore::MediaPlayerPrivateAVFoundationObjC::languageOfPrimaryAudioTrack): Log the language returned.

* testing/Internals.cpp:
(WebCore::Internals::setPrimaryAudioTrackLanguageOverride): New.
(WebCore::Internals::setCaptionDisplayMode): New.
* testing/Internals.h:
* testing/Internals.idl:

LayoutTests:

* media/content/CC+Subtitles.m4v: Added.
* media/track/track-forced-subtitles-in-band-expected.txt: Added.
* media/track/track-forced-subtitles-in-band.html: Added.
* media/trackmenu-test.js:

* platform/efl/TestExpectations: Skip new test.
* platform/gtk/TestExpectations: Ditto.
* platform/mac/TestExpectations: Ditto.
* platform/qt/TestExpectations: Ditto.
* platform/win/TestExpectations: Ditto.

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

6 years ago <rdar://problem/13126204> [Mac] Tweak sandbox profile.
ap@apple.com [Fri, 12 Apr 2013 17:06:39 +0000 (17:06 +0000)]
    <rdar://problem/13126204> [Mac] Tweak sandbox profile.

        Reviewed by Anders Carlsson.

        * NetworkProcess/mac/com.apple.WebKit.NetworkProcess.sb.in:
        * WebProcess/com.apple.WebProcess.sb.in:

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

6 years ago[Mac] Some ligatures are applied across different fronts
rniwa@webkit.org [Fri, 12 Apr 2013 16:54:01 +0000 (16:54 +0000)]
[Mac] Some ligatures are applied across different fronts
https://bugs.webkit.org/show_bug.cgi?id=113604

Reviewed by Darin Adler.

The bug was caused by applyFontTransforms applying ligatures without updating the font data in the glyph buffer.

Suppose we have characters AB and A uses font X and B uses font Y. Further suppose that we have ligatures for AB
in Y. The problem was that WithIterator::advanceInternal calls applyFontTransforms on AB to apply this ligature
even though A and B use different fonts. Since X doesn't contain the same ligature for A to be paired with that
of B in X, we get a blank A.

Fixed the bug by resetting lastGlyphCount after calling applyFontTransforms. This ensures that we don't call
applyFontTransforms across different fonts.

No new tests since this requires a variant of Osaka font that doesn't come with OS X.

The bug 114482 tracks the effort to add a test for this bug fix. I've already asked someone to create a custom
font for us so that we can test this bug fix but that's going to a while.

* platform/graphics/WidthIterator.cpp:
(WebCore::WidthIterator::advanceInternal):

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

6 years ago[Mac] Enable spellchecking tests added in r141471
rniwa@webkit.org [Fri, 12 Apr 2013 16:52:38 +0000 (16:52 +0000)]
[Mac] Enable spellchecking tests added in r141471
https://bugs.webkit.org/show_bug.cgi?id=108525

Reviewed by Darin Adler.

Source/WebCore:

Made automatic quote substitution, dash substitution, text replacement, and spelling correction
togglable via internals object. These functions are no-op when text replacement is not used.

This allows us to disable automatic spelling correction in spellcheck tests.

Enabled several tests added in r141471.

* WebCore.exp.in:
* testing/Internals.cpp:
(WebCore::Internals::setContinuousSpellCheckingEnabled): Don't null check editor() since it's not
null whenever frame() is not null.
(WebCore::Internals::setAutomaticQuoteSubstitutionEnabled): Added.
(WebCore::Internals::setAutomaticLinkDetectionEnabled): Added.
(WebCore::Internals::setAutomaticDashSubstitutionEnabled): Added.
(WebCore::Internals::setAutomaticTextReplacementEnabled): Added.
(WebCore::Internals::setAutomaticSpellingCorrectionEnabled): Added.
* testing/Internals.h:
* testing/Internals.idl:

Tools:

* DumpRenderTree/mac/DumpRenderTree.mm:
(createWebViewAndOffscreenWindow):
(resetDefaultsToConsistentValues):
* WebKitTestRunner/TestController.cpp:
(WTR::TestController::resetStateToConsistentValues):

LayoutTests:

Updated the tests not to assume spelling correction suggestions were listed in a context menu since
only Chromium port did this.

* editing/spelling/resources/util.js:
(initSpellTest): Disable automatic text replacements.

* editing/spelling/spelling-with-underscore-selection-expected.txt: Removed.
* editing/spelling/spelling-with-underscore-selection.html: Removed.

This test erroneously assumed a specific word breaking behavior that doesn't include the underscore
when selecting a word especially since Chromium was the only port that was running these tests.

* editing/spelling/spelling-double-clicked-word-with-underscores-expected.txt: Removed.
* editing/spelling/spelling-double-clicked-word-with-underscores.html: Removed.

Ditto.

* editing/spelling/spelling-should-select-single-word-expected.txt: Removed.
* editing/spelling/spelling-should-select-single-word.html: Removed.

Removed since this test doesn't do anything useful without the assertion for the context menu.

* editing/spelling/spelling-double-clicked-word-expected.txt:
* editing/spelling/spelling-double-clicked-word.html:
* editing/spelling/spelling-exactly-selected-word-expected.txt:
* editing/spelling/spelling-exactly-selected-word.html:
* editing/spelling/spelling-with-punctuation-selection-expected.txt:
* editing/spelling/spelling-with-punctuation-selection.html:
* editing/spelling/spelling-with-whitespace-selection-expected.txt:
* editing/spelling/spelling-with-whitespace-selection.html:

* platform/efl/TestExpectations:
* platform/gtk/TestExpectations:
* platform/mac/TestExpectations:
* platform/qt/TestExpectations:
* platform/win/TestExpectations:
* platform/wincairo/TestExpectations:
* platform/wk2/TestExpectations:

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

6 years ago[GTK][WK2] Add document-loaded signal to WebKitWebPage
commit-queue@webkit.org [Fri, 12 Apr 2013 16:33:48 +0000 (16:33 +0000)]
[GTK][WK2] Add document-loaded signal to WebKitWebPage
https://bugs.webkit.org/show_bug.cgi?id=110614

Patch by Manuel Rego Casasnovas <rego@igalia.com> on 2013-04-12
Reviewed by Carlos Garcia Campos.

Add a new signal document-loaded to WebKitWebPage that will be emitted
when the DOM document has been loaded for the main frame.

* UIProcess/API/gtk/tests/TestWebExtensions.cpp:
(documentLoadedCallback):
(testDocumentLoadedSignal):
(beforeAll): Add test for document-loaded signal.
* UIProcess/API/gtk/tests/WebExtensionTest.cpp:
(documentLoadedCallback):
(pageCreatedCallback):
(methodCallCallback): Add new D-Bus signal DocumentLoaded in order to
test document-loaded signal.
* WebProcess/InjectedBundle/API/gtk/WebKitWebPage.cpp:
(webkit_web_page_class_init):
(webkitWebPageCreate): Add document-loaded signal and emit it when
didFinishDocumentLoadForFrame is called.

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

6 years ago[Qt][Win] r148257 broke the build
oliver@apple.com [Fri, 12 Apr 2013 16:19:00 +0000 (16:19 +0000)]
[Qt][Win] r148257 broke the build
https://bugs.webkit.org/show_bug.cgi?id=114512

Build fix.

* wtf/Platform.h:

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

6 years ago[GTK] Webkit fails to build webkit2gtk-tests-resources.gresource.
commit-queue@webkit.org [Fri, 12 Apr 2013 16:07:29 +0000 (16:07 +0000)]
[GTK] Webkit fails to build webkit2gtk-tests-resources.gresource.
https://bugs.webkit.org/show_bug.cgi?id=114485

Patch by Hanyee Kim <choco@company100.net> on 2013-04-12
Reviewed by Martin Robinson.

Generating webkit2gtk-tests-resources.gresource can be failed due to
the non-existing target directory.
We need to make target directory before generating it.

* UIProcess/API/gtk/tests/GNUmakefile.am:

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

6 years agoREGRESSION(r145869): Right-click on SWF contents displays the context menu at the...
akling@apple.com [Fri, 12 Apr 2013 15:13:49 +0000 (15:13 +0000)]
REGRESSION(r145869): Right-click on SWF contents displays the context menu at the wrong place.
<http://webkit.org/b/113836>
<rdar://problem/13587624>

Reviewed by Anders "Wesley Crusher" Carlsson.

Mac plugins expect flipped-Y screen coordinates, while DOM APIs speak in unflipped coordinates,
and we were mixing them up in the window frame caching optimization.

Solve this by having the UIProcess send both flipped and unflipped window frames to the WebProcess.
The flipped frame is passed on to plugins, and the unflipped frame is used for window.screenX/Y etc.

* UIProcess/API/mac/WKView.mm:
(-[WKView _updateWindowAndViewFrames]):

    No need to retrieve the window frame here as WebPageProxy::windowAndViewFramesChanged() will
    always override it anyway.

* UIProcess/mac/WebPageProxyMac.mm:
(WebKit::WebPageProxy::windowAndViewFramesChanged):
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::windowRect):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::windowAndViewFramesChanged):
* WebProcess/WebPage/WebPage.h:
(WebKit::WebPage::windowFrameInUnflippedScreenCoordinates):
* WebProcess/WebPage/WebPage.messages.in:

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

6 years ago[BlackBerry] Crash running layout tests
commit-queue@webkit.org [Fri, 12 Apr 2013 14:05:19 +0000 (14:05 +0000)]
[BlackBerry] Crash running layout tests
https://bugs.webkit.org/show_bug.cgi?id=114503

Patch by Carlos Garcia Campos <cgarcia@igalia.com> on 2013-04-12
Reviewed by Xan Lopez.

Hit an assertion in ~GuardedPointerBase when DRT is
deleted. DumpRenderTree class derives from
BlackBerry::Platform::LayoutTestClient that derives from
BlackBerry::Platform::GuardedPointerBase, so the DRT pointer
should no be released with delete but with
BlackBerry::Platform::deleteGuardedObject().

* Api/WebPage.cpp:
(BlackBerry::WebKit::WebPagePrivate::~WebPagePrivate):

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

6 years ago[GTK] Enable WebKit2 building on GTK EWSs
commit-queue@webkit.org [Fri, 12 Apr 2013 13:50:58 +0000 (13:50 +0000)]
[GTK] Enable WebKit2 building on GTK EWSs
https://bugs.webkit.org/show_bug.cgi?id=114500

Patch by Manuel Rego Casasnovas <rego@igalia.com> on 2013-04-12
Reviewed by Philippe Normand.

Add configuration in order to be able to setup GTK EWSs building
WebKit2. A new queue gtk-wk2-ews is added.

* QueueStatusServer/config/queues.py:
* Scripts/webkitpy/common/config/ports.py:
(DeprecatedPort.port):
(GtkWK2Port):
(GtkWK2Port.build_webkit_command):
(GtkWK2Port.run_webkit_tests_command):
* Scripts/webkitpy/common/config/ports_unittest.py:
(DeprecatedPortTest.test_gtk_port):
(DeprecatedPortTest):
(DeprecatedPortTest.test_gtk_wk2_port):
* Scripts/webkitpy/tool/commands/earlywarningsystem.py:
(GtkWK2EWS):

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

6 years ago[BlackBerry] Upstream the filesystem code
commit-queue@webkit.org [Fri, 12 Apr 2013 13:22:16 +0000 (13:22 +0000)]
[BlackBerry] Upstream the filesystem code
https://bugs.webkit.org/show_bug.cgi?id=114437

Patch by Alberto Garcia <agarcia@igalia.com> on 2013-04-12
Reviewed by Rob Buis.

These are the changes for AsyncFileSystemBlackBerry.

This patch contains contributions from many members of the
BlackBerry WebKit team.

* platform/blackberry/AsyncFileSystemBlackBerry.cpp:
(WebCore::AsyncFileSystem::isAvailable):
(WebCore):
(WebCore::AsyncFileSystem::create):
(WebCore::AsyncFileSystem::openFileSystem):
(WebCore::AsyncFileSystemBlackBerry::openFileSystem):
(WebCore::AsyncFileSystem::deleteFileSystem):
(WebCore::AsyncFileSystemBlackBerry::AsyncFileSystemBlackBerry):
(WebCore::AsyncFileSystemBlackBerry::~AsyncFileSystemBlackBerry):
(WebCore::AsyncFileSystemBlackBerry::move):
(WebCore::AsyncFileSystemBlackBerry::copy):
(WebCore::AsyncFileSystemBlackBerry::remove):
(WebCore::AsyncFileSystemBlackBerry::removeRecursively):
(WebCore::AsyncFileSystemBlackBerry::readMetadata):
(WebCore::AsyncFileSystemBlackBerry::createFile):
(WebCore::AsyncFileSystemBlackBerry::createDirectory):
(WebCore::AsyncFileSystemBlackBerry::fileExists):
(WebCore::AsyncFileSystemBlackBerry::directoryExists):
(WebCore::AsyncFileSystemBlackBerry::readDirectory):
(WebCore::AsyncFileSystemBlackBerry::createWriter):
(WebCore::AsyncFileSystemBlackBerry::createSnapshotFileAndReadMetadata):
(WebCore::AsyncFileSystemBlackBerry::fileSystemURLToPath):
* platform/blackberry/AsyncFileSystemBlackBerry.h:
(WTF):
(WTF::BlackBerry::Platform::WebFileSystem):
(WebCore::AsyncFileSystemBlackBerry::create):
(AsyncFileSystemBlackBerry):

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

6 years ago[WK2][EFL] WebView: Add callbacks to the WKViewClient to handle page viewport update
mikhail.pozdnyakov@intel.com [Fri, 12 Apr 2013 13:10:28 +0000 (13:10 +0000)]
[WK2][EFL] WebView: Add callbacks to the WKViewClient to handle page viewport update
https://bugs.webkit.org/show_bug.cgi?id=110463

Reviewed by Anders Carlsson.

* UIProcess/efl/ViewClientEfl.h:
(ViewClientEfl):
* UIProcess/efl/WebView.cpp:
(WebKit::WebView::didChangeViewportProperties):
* UIProcess/efl/WebViewClient.cpp:
(WebKit::WebViewClient::didChangeViewportAttributes):
(WebKit):
* UIProcess/efl/WebViewClient.h:

    Added didChangeViewportAttributes callback to the WKViewClient to
    handle page viewport updates.

* CMakeLists.txt:
* Shared/API/c/WKBase.h:
* Shared/APIObject.h:
* UIProcess/API/C/WKAPICast.h:
(WebKit):
* UIProcess/API/C/WKViewportAttributes.cpp: Added.
(WKViewportAttributesGetTypeID):
* UIProcess/API/C/WKViewportAttributes.h: Added.
* UIProcess/API/C/efl/WKView.h:
* UIProcess/WebViewportAttributes.cpp: Added.
(WebKit):
(WebKit::WebViewportAttributes::WebViewportAttributes):
(WebKit::WebViewportAttributes::~WebViewportAttributes):
* UIProcess/WebViewportAttributes.h: Added.
(WebKit):
(WebViewportAttributes):
(WebKit::WebViewportAttributes::create):
(WebKit::WebViewportAttributes::originalAttributes):
(WebKit::WebViewportAttributes::type):

    Added WKViewportAttributesRef - WK2 C API object that is wrapping
    WebCore::ViewportAttributes structure and is passed in didChangeViewportAttributes
    WKViewClient callback.

* UIProcess/efl/ViewClientEfl.cpp:
(WebKit::ViewClientEfl::didChangeViewportAttributes):
(WebKit):

    Added implementaion of didChangeViewportAttributes WKViewClient
    callback so that existing EFL WK2 funtionality is kept.

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

6 years agoApply our MSVC 2012 optimizer bug workaround to all minor releases
jocelyn.turcotte@digia.com [Fri, 12 Apr 2013 10:54:21 +0000 (10:54 +0000)]
Apply our MSVC 2012 optimizer bug workaround to all minor releases
https://bugs.webkit.org/show_bug.cgi?id=114436

Reviewed by Alexey Proskuryakov.

The bug has only been partially fixed in Update 2 but our Update 1 workaround
still avoids the crash.

* platform/text/TextEncodingRegistry.cpp:
(WebCore::TextEncodingNameHash::equal):

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

6 years agoAnd again, with the correct case this time.
mrowe@apple.com [Fri, 12 Apr 2013 10:28:09 +0000 (10:28 +0000)]
And again, with the correct case this time.

* platform/graphics/avfoundation/objc/WebCoreAVFResourceLoader.h:

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

6 years agoBuild fix.
mrowe@apple.com [Fri, 12 Apr 2013 10:22:05 +0000 (10:22 +0000)]
Build fix.

* platform/graphics/avfoundation/objc/WebCoreAVFResourceLoader.h:
Add missing #include and forward declaration.

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

6 years ago[BlackBerry] Crash running layout tests when WebPage is destroyed
commit-queue@webkit.org [Fri, 12 Apr 2013 09:03:09 +0000 (09:03 +0000)]
[BlackBerry] Crash running layout tests when WebPage is destroyed
https://bugs.webkit.org/show_bug.cgi?id=114497

Patch by Carlos Garcia Campos <cgarcia@igalia.com> on 2013-04-12
Reviewed by Xan Lopez.

PR 324649
Internally reviewed by Konrad Piascik and Rob Buis.

Use a bool member to keep track of whether the inspector is
enabled or not instead of relaying on the enable developer extras
setting, that can be set in other places than enableWebInspector().

* Api/WebPage.cpp:
(BlackBerry::WebKit::WebPagePrivate::WebPagePrivate): Initialize
m_inspectorEnabled.
(BlackBerry::WebKit::WebPage::enableWebInspector): Return early if
inspector is already enabled and set m_inspectorEnabled to true.
(BlackBerry::WebKit::WebPage::disableWebInspector): Return early
if inspector is not enabled and set m_inspectorEnabled to false.
(BlackBerry::WebKit::WebPage::isWebInspectorEnabled): Check the
current value of m_inspectorEnabled instead of the developer
extras setting.
* Api/WebPage_p.h:
(WebPagePrivate): Add m_inspectorEnabled.

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

6 years agoUnreviewed functionality fix for ports enabling the MicroData feature.
zandobersek@gmail.com [Fri, 12 Apr 2013 08:55:23 +0000 (08:55 +0000)]
Unreviewed functionality fix for ports enabling the MicroData feature.

* html/DOMSettableTokenList.idl: Add the SkipVTableValidation IDL attribute to the DOMSettableTokenList interface.
This removes crashes in the MicroData layout tests that are occurring on EFL and GTK builders, the two ports being
the only ports that enable this feature.

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

6 years ago[Qt] Unreviewed gardening.
zarvai@inf.u-szeged.hu [Fri, 12 Apr 2013 08:17:30 +0000 (08:17 +0000)]
[Qt] Unreviewed gardening.

* platform/qt/TestExpectations:
* platform/qt/fast/js/global-constructors-expected.txt: Rebaselining after r148236.

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

6 years ago[GTK] The style of visited links doesn't change in WebKit2
carlosgc@webkit.org [Fri, 12 Apr 2013 08:12:46 +0000 (08:12 +0000)]
[GTK] The style of visited links doesn't change in WebKit2
https://bugs.webkit.org/show_bug.cgi?id=112175

Reviewed by Benjamin Poulain.

The problem is that visited links were not tracked by the web
process. There's a web process initial parameter to set whether
web process should track visited links or not and it's disabled by
default.

* UIProcess/gtk/WebContextGtk.cpp:
(WebKit::WebContext::platformInitializeWebProcess): Always set
shouldTrackVisitedLinks to true.

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

6 years agoRemove Chromium scripts
rniwa@webkit.org [Fri, 12 Apr 2013 07:38:15 +0000 (07:38 +0000)]
Remove Chromium scripts
https://bugs.webkit.org/show_bug.cgi?id=114492

Reviewed by Benjamin Poulain.

* Scripts/run-chromium-webkit-unit-tests: Removed.
* Scripts/update-webkit-chromium: Removed.

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

6 years ago Move CachedRawResourceClient into a separate file
ap@apple.com [Fri, 12 Apr 2013 07:15:57 +0000 (07:15 +0000)]
    Move CachedRawResourceClient into a separate file
        https://bugs.webkit.org/show_bug.cgi?id=114491

        Reviewed by Mark Rowe.

        * GNUmakefile.list.am:
        * Target.pri:
        * WebCore.vcproj/WebCore.vcproj:
        * WebCore.vcxproj/WebCore.vcxproj:
        * WebCore.vcxproj/WebCore.vcxproj.filters:
        * WebCore.xcodeproj/project.pbxproj:
        * loader/DocumentLoader.cpp:
        * loader/DocumentLoader.h:
        * loader/DocumentThreadableLoader.h:
        * loader/archive/cf/LegacyWebArchive.cpp:
        * loader/cache/CachedRawResource.cpp:
        * loader/cache/CachedRawResource.h:
        * loader/cache/CachedRawResourceClient.h: Added.
        * loader/icon/IconLoader.h:
        * platform/graphics/avfoundation/objc/WebCoreAVFResourceLoader.h:

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

6 years agoUnreviewed, rolling out r148262.
zandobersek@gmail.com [Fri, 12 Apr 2013 07:14:02 +0000 (07:14 +0000)]
Unreviewed, rolling out r148262.
http://trac.webkit.org/changeset/148262
https://bugs.webkit.org/show_bug.cgi?id=114493

Cairo dep should now build, rolling r148247 back in (Requested
by zdobersek on #webkit).

Patch by Commit Queue <rniwa@webkit.org> on 2013-04-12

.:

* Source/autotools/FindDependencies.m4:
* Source/autotools/PrintBuildConfiguration.m4:
* Source/autotools/SetupWebKitFeatures.m4:

Source/WebCore:

* platform/graphics/GraphicsContext.cpp:
(WebCore):
* platform/graphics/ImageBuffer.cpp:
(WebCore):
* platform/graphics/cairo/GLContext.h:
(GLContext):
* platform/graphics/cairo/GraphicsContextCairo.cpp:
(WebCore::GraphicsContext::isAcceleratedContext):
(WebCore):
* platform/graphics/cairo/ImageBufferCairo.cpp:
(WebCore::ImageBufferData::ImageBufferData):
(WebCore):
(WebCore::createCairoGLSurface):
(WebCore::ImageBuffer::ImageBuffer):
(WebCore::ImageBuffer::platformTransformColorSpace):
(WebCore::mapSurfaceToImage):
(WebCore::unmapSurfaceFromImage):
(WebCore::getImageData):
(WebCore::ImageBuffer::putByteArray):
(WebCore::ImageBufferData::paintToTextureMapper):
(WebCore::ImageBuffer::platformLayer):
* platform/graphics/cairo/ImageBufferDataCairo.h:
(ImageBufferData):
* platform/graphics/egl/GLContextEGL.cpp:
(WebCore::GLContextEGL::GLContextEGL):
(WebCore::GLContextEGL::~GLContextEGL):
(WebCore::GLContextEGL::cairoDevice):
(WebCore):
* platform/graphics/egl/GLContextEGL.h:
* platform/graphics/glx/GLContextGLX.cpp:
(WebCore::GLContextGLX::GLContextGLX):
(WebCore::GLContextGLX::~GLContextGLX):
(WebCore::GLContextGLX::cairoDevice):
(WebCore):
* platform/graphics/glx/GLContextGLX.h:
(GLContextGLX):

Tools:

* Scripts/webkitdirs.pm:
(buildAutotoolsProject):
* gtk/jhbuild.modules:

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

6 years ago Reduce includes of CachedSVGDocument.h
ap@apple.com [Fri, 12 Apr 2013 06:11:46 +0000 (06:11 +0000)]
    Reduce includes of CachedSVGDocument.h
        https://bugs.webkit.org/show_bug.cgi?id=114489

        Reviewed by Jon Honeycutt.

        * loader/cache/CachedSVGDocumentReference.cpp: Added.
        * loader/cache/CachedSVGDocumentReference.h:
        Moved function implementations to newly added .cpp file, and removed an include
        of CachedSVGDocument.h.

        * css/WebKitCSSSVGDocumentValue.h: Just removed an unnecessary include.

        * CMakeLists.txt:
        * GNUmakefile.list.am:
        * Target.pri:
        * WebCore.vcproj/WebCore.vcproj:
        * WebCore.vcxproj/WebCore.vcxproj:
        * WebCore.vcxproj/WebCore.vcxproj.filters:
        * WebCore.xcodeproj/project.pbxproj:

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

6 years agoUnreviewed, rolling out r148247.
zandobersek@gmail.com [Fri, 12 Apr 2013 06:04:40 +0000 (06:04 +0000)]
Unreviewed, rolling out r148247.
http://trac.webkit.org/changeset/148247
https://bugs.webkit.org/show_bug.cgi?id=114490

Cairo dep fails to build on builders due to missing EGL
headers (Requested by zdobersek on #webkit).

Patch by Commit Queue <rniwa@webkit.org> on 2013-04-11

.:

* Source/autotools/FindDependencies.m4:
* Source/autotools/PrintBuildConfiguration.m4:
* Source/autotools/SetupWebKitFeatures.m4:

Source/WebCore:

* platform/graphics/GraphicsContext.cpp:
(WebCore):
* platform/graphics/ImageBuffer.cpp:
(WebCore):
* platform/graphics/cairo/GLContext.h:
(GLContext):
* platform/graphics/cairo/GraphicsContextCairo.cpp:
* platform/graphics/cairo/ImageBufferCairo.cpp:
(WebCore::ImageBufferData::ImageBufferData):
(WebCore::ImageBuffer::ImageBuffer):
(WebCore::ImageBuffer::platformTransformColorSpace):
(WebCore::getImageData):
(WebCore::ImageBuffer::putByteArray):
(WebCore):
* platform/graphics/cairo/ImageBufferDataCairo.h:
(ImageBufferData):
* platform/graphics/egl/GLContextEGL.cpp:
(WebCore::GLContextEGL::GLContextEGL):
(WebCore::GLContextEGL::~GLContextEGL):
* platform/graphics/egl/GLContextEGL.h:
* platform/graphics/glx/GLContextGLX.cpp:
(WebCore::GLContextGLX::GLContextGLX):
(WebCore::GLContextGLX::~GLContextGLX):
* platform/graphics/glx/GLContextGLX.h:
(GLContextGLX):

Tools:

* Scripts/webkitdirs.pm:
(buildAutotoolsProject):
* gtk/jhbuild.modules:

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

6 years agoRemove debugging code that is no longer used with current mac sdks.
thakis@chromium.org [Fri, 12 Apr 2013 05:03:18 +0000 (05:03 +0000)]
Remove debugging code that is no longer used with current mac sdks.
https://bugs.webkit.org/show_bug.cgi?id=114486

Reviewed by Dan Bernstein.

This code compared __MAC_OS_X_VERSION_MAX_ALLOWED and friends to
107 and 106 instead of the correct 1070 and 1060. Instead of fixing
this, rip the code out completely: Since WebKit now only targets
current systems, the ifdef is always false anyways.

No tests, as this only removes debugging code.

* platform/graphics/mac/SimpleFontDataMac.mm:
(WebCore::SimpleFontData::platformInit):

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

6 years agoFix windows build and land new binding test results
oliver@apple.com [Fri, 12 Apr 2013 04:21:45 +0000 (04:21 +0000)]
Fix windows build and land new binding test results

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

6 years agoMerge CharacterClassTable into CharacterClass
benjamin@webkit.org [Fri, 12 Apr 2013 03:42:46 +0000 (03:42 +0000)]
Merge CharacterClassTable into CharacterClass
https://bugs.webkit.org/show_bug.cgi?id=114409

Patch by Benjamin Poulain <bpoulain@apple.com> on 2013-04-11
Reviewed by Darin Adler.

CharacterClassTable is only a pointer and a boolean.
It is a little overkill to make a separate allocation
for that.

* create_regex_tables:
* yarr/YarrJIT.cpp:
(JSC::Yarr::YarrGenerator::matchCharacterClass):
* yarr/YarrPattern.cpp:
(JSC::Yarr::CharacterClassConstructor::charClass):
* yarr/YarrPattern.h:
(CharacterClass):
(JSC::Yarr::CharacterClass::CharacterClass):

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

6 years agoSelection gaps don't repaint correctly with transforms
commit-queue@webkit.org [Fri, 12 Apr 2013 02:38:32 +0000 (02:38 +0000)]
Selection gaps don't repaint correctly with transforms
https://bugs.webkit.org/show_bug.cgi?id=111000

Patch by Shezan Baig <sbaig1@bloomberg.net> on 2013-04-11
Reviewed by Simon Fraser.

Source/WebCore:

When computing offsetFromRepaintContainer, we need to add UseTransforms
to the MapCoordinateFlags argument. Note that ApplyContainerFlip is
the default value for the flag, so this change effectively only adds
the UseTransforms flag.

Tests: fast/repaint/selection-gap-absolute-child.html
       fast/repaint/selection-gap-fixed-child.html
       fast/repaint/selection-gap-flipped-absolute-child.html
       fast/repaint/selection-gap-flipped-fixed-child.html
       fast/repaint/selection-gap-transformed-absolute-child.html
       fast/repaint/selection-gap-transformed-fixed-child.html

* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::selectionGapRectsForRepaint):

LayoutTests:

* fast/repaint/selection-gap-absolute-child-expected.txt: Added.
* fast/repaint/selection-gap-absolute-child.html: Added.
* fast/repaint/selection-gap-fixed-child-expected.txt: Added.
* fast/repaint/selection-gap-fixed-child.html: Added.
* fast/repaint/selection-gap-flipped-absolute-child-expected.txt: Added.
* fast/repaint/selection-gap-flipped-absolute-child.html: Added.
* fast/repaint/selection-gap-flipped-fixed-child-expected.txt: Added.
* fast/repaint/selection-gap-flipped-fixed-child.html: Added.
* fast/repaint/selection-gap-transformed-absolute-child-expected.txt: Added.
* fast/repaint/selection-gap-transformed-absolute-child.html: Added.
* fast/repaint/selection-gap-transformed-fixed-child-expected.txt: Added.
* fast/repaint/selection-gap-transformed-fixed-child.html: Added.

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

6 years agoAdd more type validation to debug builds
oliver@apple.com [Fri, 12 Apr 2013 01:43:23 +0000 (01:43 +0000)]
Add more type validation to debug builds
https://bugs.webkit.org/show_bug.cgi?id=114478

Reviewed by Mark Hahnenberg.

Source/WebCore:

Add a bunch more type checks to the JS DOM bindings.

* Modules/mediastream/MediaStream.idl:
* Modules/webaudio/AudioDestinationNode.idl:
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/JSDOMBinding.h:
(WebCore::getExistingWrapper):
(WebCore):
(WebCore::createNewWrapper):
* bindings/scripts/CodeGeneratorJS.pm:
(GetNativeTypeForConversions):
(GetGnuVTableRefForInterface):
(GetGnuVTableNameForInterface):
(GetGnuMangledNameForInterface):
(GetGnuVTableOffsetForType):
(GetWinVTableRefForInterface):
(GetWinVTableNameForInterface):
(GetWinMangledNameForInterface):
(GetNamespaceForInterface):
(GetImplementationLacksVTableForInterface):
(GetSkipVTableValidationForInterface):
(GenerateImplementation):
* bindings/scripts/IDLAttributes.txt:
* css/CSSRuleList.idl:
* css/CSSStyleDeclaration.idl:
* dom/Clipboard.idl:
* dom/DOMStringMap.idl:
* dom/MutationRecord.idl:
* dom/NodeList.idl:
* html/DOMTokenList.idl:
* html/track/TextTrack.idl:
* inspector/ScriptProfileNode.idl:
* storage/Storage.idl:
* xml/XPathNSResolver.idl:

Source/WTF:

Add BINDING_VALIDATION flag and make RELEASE_ASSERT use UNLIKELY.

* wtf/Assertions.h:
* wtf/Platform.h:

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

6 years agoRemove ResourceLoadInfo
rniwa@webkit.org [Fri, 12 Apr 2013 00:50:48 +0000 (00:50 +0000)]
Remove ResourceLoadInfo
https://bugs.webkit.org/show_bug.cgi?id=113302

Reviewed by Benjamin Poulain.

Co-authored by Christophe Dumez.

Removed ResourceLoadInfo since it had been only used by Chromium port.

* GNUmakefile.list.am:
* Target.pri:
* WebCore.order:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* inspector/InspectorResourceAgent.cpp:
(WebCore::buildObjectForResourceResponse):
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::loadResourceSynchronously):
* platform/network/ResourceLoadInfo.h: Removed.
* platform/network/ResourceResponseBase.cpp:
(WebCore):
(WebCore::ResourceResponseBase::reportMemoryUsage):
* platform/network/ResourceResponseBase.h:
(ResourceResponseBase):

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

6 years agoRemove passing test expectations for ietestcenter/css3/grid/grid-items-003.htm since...
rniwa@webkit.org [Fri, 12 Apr 2013 00:50:24 +0000 (00:50 +0000)]
Remove passing test expectations for ietestcenter/css3/grid/grid-items-003.htm since it started failing on
Mountain Lion WebKit2 bots after a slave reboot as well.

* platform/mac-wk2/TestExpectations:

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

6 years agoSubmission Notes.
lforschler@apple.com [Fri, 12 Apr 2013 00:47:46 +0000 (00:47 +0000)]
Submission Notes.

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

6 years agoREGRESSION (r146956): ASSERTion failure: WebKit::WebProcess::pageWillLeaveWindow
timothy_horton@apple.com [Fri, 12 Apr 2013 00:39:36 +0000 (00:39 +0000)]
REGRESSION (r146956): ASSERTion failure: WebKit::WebProcess::pageWillLeaveWindow
https://bugs.webkit.org/show_bug.cgi?id=114481
<rdar://problem/13534784>

Reviewed by Simon Fraser.

Inform the WebProcess of WebPages which are already in a window when created.

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

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

6 years agoAnother Mac Lion build fix attempt after r148197.
rniwa@webkit.org [Fri, 12 Apr 2013 00:20:45 +0000 (00:20 +0000)]
Another Mac Lion build fix attempt after r148197.

* page/scrolling/mac/ScrollingStateScrollingNodeMac.mm:

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

6 years agoUnable to paste twice in input field when specific CSS present
commit-queue@webkit.org [Fri, 12 Apr 2013 00:08:55 +0000 (00:08 +0000)]
Unable to paste twice in input field when specific CSS present
https://bugs.webkit.org/show_bug.cgi?id=108675

Patch by Sukolsak Sakshuwong <sukolsak@gmail.com> on 2013-04-11
Reviewed by Ryosuke Niwa.

Source/WebCore:

When we are pre-rendering text in ReplaceSelectionCommand, we shouldn't care
whether the content is clipped by its ancestors or not. This bug was caused
by the fact the plainText() method returned an empty string because the text
was fully clipped by its ancestors. Make plainText ignore style visibility.

Test: editing/inserting/insert-text-into-text-field.html

* editing/ReplaceSelectionCommand.cpp:
(WebCore::ReplacementFragment::ReplacementFragment):

LayoutTests:

* editing/inserting/insert-text-into-text-field-expected.txt: Added.
* editing/inserting/insert-text-into-text-field.html: Added.

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

6 years agoAdd support for clearing storage areas
andersca@apple.com [Thu, 11 Apr 2013 23:55:03 +0000 (23:55 +0000)]
Add support for clearing storage areas
https://bugs.webkit.org/show_bug.cgi?id=114479

Reviewed by Beth Dakin.

* UIProcess/Storage/StorageManager.cpp:
(WebKit::StorageManager::StorageArea::StorageArea):
Store the quota size so we can recreate the underlying StorageMap when clearing.

(WebKit::StorageManager::StorageArea::clear):
Create a new storage map and dispatch events.

(WebKit::StorageManager::clear):
Find the right storage area and call clear.

* UIProcess/Storage/StorageManager.messages.in:
Add Clear message.

* WebProcess/Storage/StorageAreaImpl.cpp:
(WebKit::StorageAreaImpl::clear):
Call the storage map.

* WebProcess/Storage/StorageAreaMap.cpp:
(WebKit::StorageAreaMap::clear):
Reset the cached values and send a clear message.

(WebKit::StorageAreaMap::resetValues):
New helper function.

(WebKit::StorageAreaMap::didClear):
New stub.

* WebProcess/Storage/StorageAreaMap.messages.in:
Add DidClear message.

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

6 years agoWebKit should set the header and footer layers' contentsScale when the device
bdakin@apple.com [Thu, 11 Apr 2013 23:51:51 +0000 (23:51 +0000)]
WebKit should set the header and footer layers' contentsScale when the device
scale factor changes
https://bugs.webkit.org/show_bug.cgi?id=114471
-and corresponding-
<rdar://problem/13621288>

Reviewed by Simon Fraser.

Update the header and footer contentsScale when the device scale factor has
changed.

* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::setDeviceScaleFactor):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::updateHeaderAndFooterLayersForDeviceScaleChange):

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

6 years ago[GTK] Webkit fails to build with MinGW compiler after changeset 146468
commit-queue@webkit.org [Thu, 11 Apr 2013 23:46:33 +0000 (23:46 +0000)]
[GTK] Webkit fails to build with MinGW compiler after changeset 146468
https://bugs.webkit.org/show_bug.cgi?id=114473

Patch by PaweĊ‚ Forysiuk <tuxator@o2.pl> on 2013-04-11
Reviewed by Martin Robinson.

* Source/autotools/CheckSystemAndBasicDependencies.m4: Fix typo.

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

6 years ago[GTK] Add accelerated 2D canvas support using cairo-gl
mrobinson@webkit.org [Thu, 11 Apr 2013 23:39:44 +0000 (23:39 +0000)]
[GTK] Add accelerated 2D canvas support using cairo-gl
https://bugs.webkit.org/show_bug.cgi?id=104672

Reviewed by Alejandro G. Castro.

.:

Detect that we can activate accelerated canvas when CairoGL is present and
TextureMapperGL is enabled.

* Source/autotools/FindDependencies.m4: Look for CairoGL.
* Source/autotools/PrintBuildConfiguration.m4: Print the status of accelerated canvas activation.
* Source/autotools/SetupWebKitFeatures.m4: Set the feature.

Source/WebCore:

No new tests. We do not yet have the ability to run tests against
accelerated content.

* platform/graphics/GraphicsContext.cpp:
(WebCore): We don't use the stub implementation of isAcceleratedContext any longer.
* platform/graphics/ImageBuffer.cpp:
(WebCore): Ditto for ImageBuffer::platformLayer.
* platform/graphics/cairo/GLContext.h:
(GLContext): Added method to get a cairo_device_t from the context.
* platform/graphics/cairo/GraphicsContextCairo.cpp:
(WebCore::GraphicsContext::isAcceleratedContext): Return true when we are a CairoGL surface.
* platform/graphics/cairo/ImageBufferCairo.cpp:
(WebCore::ImageBufferData::ImageBufferData): Initialize the size and the texture to 0.
(WebCore::createCairoGLSurface): Added this helper.
(WebCore::ImageBuffer::ImageBuffer): When we are in accelerated rendering mode, create
a CairoGL surface.
(WebCore::ImageBuffer::platformTransformColorSpace): Do not implement this for accelerated
contexts yet.
(WebCore::mapSurfaceToImage): Added this helper, since we don't require Cairo 1.12 yet,
which provides an builtin implementation.
(WebCore::unmapSurfaceFromImage): Ditto.
(WebCore::getImageData): Map the surface to an image surface first.
(WebCore::ImageBuffer::putByteArray): Ditto.
(WebCore::ImageBufferData::paintToTextureMapper): Connect the accelerated canvas into the
TextureMapper infrastructure.
(WebCore::ImageBuffer::platformLayer): This lets the TextureMapper at the ImageBufferData.
* platform/graphics/cairo/ImageBufferDataCairo.h:
(ImageBufferData): Subclass TexturMapperPlatformLayer where appropriate.
* platform/graphics/egl/GLContextEGL.cpp: Added implementation of cairoDevice.
* platform/graphics/egl/GLContextEGL.h: Ditto.
* platform/graphics/glx/GLContextGLX.cpp: Ditto
* platform/graphics/glx/GLContextGLX.h: Ditto.

Tools:

Since the value of ACCELERATED_2D_CANVAS relies on some somewhat unusual
dependencies, don't override value of the setting determined by configure.
This will make it easier for people using build-webkit, but not the
WebKit JHBuild.

* Scripts/webkitdirs.pm:
(buildAutotoolsProject): Add a blacklist for settings to never override.
* gtk/jhbuild.modules: Build CairoGL.

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

6 years agobuild.webkit.org should link to webkit-queues instead of webkit-commit-queue
rniwa@webkit.org [Thu, 11 Apr 2013 23:31:20 +0000 (23:31 +0000)]
build.webkit.org should link to webkit-queues instead of webkit-commit-queue
https://bugs.webkit.org/show_bug.cgi?id=114477

Reviewed by Benjamin Poulain.

* BuildSlaveSupport/build.webkit.org-config/templates/root.html:

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

6 years agoImplement removing storage area items
andersca@apple.com [Thu, 11 Apr 2013 23:26:58 +0000 (23:26 +0000)]
Implement removing storage area items
https://bugs.webkit.org/show_bug.cgi?id=114472

Reviewed by Beth Dakin.

Source/WebCore:

Export StorageMap::removeItem.

* WebCore.exp.in:

Source/WebKit2:

* UIProcess/Storage/StorageManager.cpp:
(StorageManager::StorageArea):
(WebKit::StorageManager::StorageArea::setItem):
Rename connection to sourceConnection.

(WebKit::StorageManager::StorageArea::removeItem):
Remove the item from the map and dispatch events if needed.

(WebKit::StorageManager::removeItem):
Find the right storage area, remove the item and send back a DidRemoveItem message.

* UIProcess/Storage/StorageManager.messages.in:
Add RemoveItem message.

* WebProcess/Storage/StorageAreaImpl.cpp:
(WebKit::StorageAreaImpl::removeItem):
Call StorageAreaMap::removeItem.

* WebProcess/Storage/StorageAreaMap.cpp:
(WebKit::StorageAreaMap::removeItem):
Send a RemoveItem message to the storage manager.

(WebKit::StorageAreaMap::didRemoveItem):
Add empty stub.

* WebProcess/Storage/StorageAreaMap.messages.in:
Add DidRemoveItem message.

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

6 years agoTextTrackList's .onremovetrack is missing from IDL
commit-queue@webkit.org [Thu, 11 Apr 2013 23:25:50 +0000 (23:25 +0000)]
TextTrackList's .onremovetrack is missing from IDL
https://bugs.webkit.org/show_bug.cgi?id=103421

Patch by Brendan Long <b.long@cablelabs.com> on 2013-04-11
Reviewed by Eric Carlson.

Source/WebCore:

Fixed test media/track/opera/interfaces/TextTrackList/onremovetrack.html

* html/track/TextTrackList.cpp:
(TextTrackList::remove):
(TextTrackList::scheduleRemoveTrackEvent):
* html/track/TextTrackList.h:
(TextTrackList):
* html/track/TextTrackList.idl:

LayoutTests:

* media/track/opera/interfaces/TextTrackList/onremovetrack-expected.txt: Added.

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

6 years agoLeaks builder should not be triggered upon new commits
rniwa@webkit.org [Thu, 11 Apr 2013 23:20:57 +0000 (23:20 +0000)]
Leaks builder should not be triggered upon new commits
https://bugs.webkit.org/show_bug.cgi?id=114475

Reviewed by Jessie Berlin.

Don't trigger them on new checkins wait for Mountaion Lion (Build), which already triggers
the leak builder when builds are done.

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

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

6 years ago[BlackBerry] Upstream the filesystem code
commit-queue@webkit.org [Thu, 11 Apr 2013 23:09:49 +0000 (23:09 +0000)]
[BlackBerry] Upstream the filesystem code
https://bugs.webkit.org/show_bug.cgi?id=114437

Patch by Alberto Garcia <agarcia@igalia.com> on 2013-04-11
Reviewed by Rob Buis.

This patch contains contributions from many members of the
BlackBerry WebKit team.

* platform/blackberry/AsyncFileWriterBlackBerry.cpp: Added.
(WebCore):
(WebCore::AsyncFileWriterBlackBerry::write):
* platform/blackberry/AsyncFileWriterBlackBerry.h: Added.
(WTF):
(WTF::BlackBerry::Platform::WebFileWriter):
(WebCore):
* platform/blackberry/DOMFileSystemBlackBerry.cpp: Added.
(WebCore):
(WebCore::DOMFileSystemBase::createFileSystemURL):
(WebCore::DOMFileSystemBase::crackFileSystemURL):
(WebCore::DOMFileSystemBase::supportsToURL):
(WebCore::DOMFileSystemBase::isValidType):
* platform/blackberry/LocalFileSystemBlackBerry.cpp: Added.
(WebCore):
(WebCore::fileSystemTypeString):
(WebCore::openFileSystem):
(WebCore::LocalFileSystem::deleteFileSystem):
(WebCore::LocalFileSystem::readFileSystem):
(WebCore::LocalFileSystem::requestFileSystem):
* platform/blackberry/PlatformAsyncFileSystemCallbacks.cpp: Added.
(WebCore):
(WebCore::PlatformAsyncFileSystemCallbacks::notifyOpenFileSystem):
(WebCore::PlatformAsyncFileSystemCallbacks::notifySucceed):
(WebCore::PlatformAsyncFileSystemCallbacks::notifyFail):
(WebCore::getFileMetadata):
(WebCore::PlatformAsyncFileSystemCallbacks::notifyReadMetadata):
(WebCore::PlatformAsyncFileSystemCallbacks::notifyCreateSnapshotFileAndReadMetadata):
(WebCore::PlatformAsyncFileSystemCallbacks::notifyReadDirectory):
(WebCore::PlatformAsyncFileSystemCallbacks::notifyCreateFileWriter):
(WebCore::PlatformAsyncFileSystemCallbacks::createAsyncFileSystem):
(WebCore::PlatformAsyncFileSystemCallbacks::createAsyncFileWriter):
(WebCore::PlatformAsyncFileSystemCallbacks::deleteMe):
* platform/blackberry/PlatformAsyncFileSystemCallbacks.h: Added.
(WebCore):
* platform/blackberry/PlatformBlob.cpp: Added.
(WebCore):
(WebCore::PlatformBlob::nextDataItem):
* platform/blackberry/PlatformBlob.h: Added.
(WebCore):
* platform/blackberry/PlatformFileWriterClient.cpp: Added.
(WebCore):
(WebCore::PlatformFileWriterClient::notifyWrite):
(WebCore::PlatformFileWriterClient::notifyTruncate):
(WebCore::PlatformFileWriterClient::notifyFail):
* platform/blackberry/PlatformFileWriterClient.h: Added.
(WebCore):
(WTF):
(WTF::WebCore::PlatformFileWriterClient):
* platform/blackberry/WorkerAsyncFileSystemBlackBerry.cpp: Added.
(WebCore):
(WebCore::WorkerAsyncFileSystemBlackBerry::WorkerAsyncFileSystemBlackBerry):
(WebCore::WorkerAsyncFileSystemBlackBerry::~WorkerAsyncFileSystemBlackBerry):
(WebCore::WorkerAsyncFileSystemBlackBerry::waitForOperationToComplete):
(WebCore::WorkerAsyncFileSystemBlackBerry::openFileSystemOnMainThread):
(WebCore::WorkerAsyncFileSystemBlackBerry::deleteFileSystemOnMainThread):
(WebCore::WorkerAsyncFileSystemBlackBerry::moveOnMainThread):
(WebCore::WorkerAsyncFileSystemBlackBerry::copyOnMainThread):
(WebCore::WorkerAsyncFileSystemBlackBerry::removeOnMainThread):
(WebCore::WorkerAsyncFileSystemBlackBerry::removeRecursivelyOnMainThread):
(WebCore::WorkerAsyncFileSystemBlackBerry::readMetadataOnMainThread):
(WebCore::WorkerAsyncFileSystemBlackBerry::createFileOnMainThread):
(WebCore::WorkerAsyncFileSystemBlackBerry::createDirectoryOnMainThread):
(WebCore::WorkerAsyncFileSystemBlackBerry::fileExistsOnMainThread):
(WebCore::WorkerAsyncFileSystemBlackBerry::directoryExistsOnMainThread):
(WebCore::WorkerAsyncFileSystemBlackBerry::readDirectoryOnMainThread):
(WebCore::WorkerAsyncFileSystemBlackBerry::createWriterOnMainThread):
(WebCore::WorkerAsyncFileSystemBlackBerry::createSnapshotFileAndReadMetadataOnMainThread):
(WebCore::WorkerAsyncFileSystemBlackBerry::openFileSystem):
(WebCore::WorkerAsyncFileSystemBlackBerry::deleteFileSystem):
(WebCore::WorkerAsyncFileSystemBlackBerry::move):
(WebCore::WorkerAsyncFileSystemBlackBerry::copy):
(WebCore::WorkerAsyncFileSystemBlackBerry::remove):
(WebCore::WorkerAsyncFileSystemBlackBerry::removeRecursively):
(WebCore::WorkerAsyncFileSystemBlackBerry::readMetadata):
(WebCore::WorkerAsyncFileSystemBlackBerry::createFile):
(WebCore::WorkerAsyncFileSystemBlackBerry::createDirectory):
(WebCore::WorkerAsyncFileSystemBlackBerry::fileExists):
(WebCore::WorkerAsyncFileSystemBlackBerry::directoryExists):
(WebCore::WorkerAsyncFileSystemBlackBerry::readDirectory):
(WebCore::WorkerAsyncFileSystemBlackBerry::createWriter):
(WebCore::WorkerAsyncFileSystemBlackBerry::createSnapshotFileAndReadMetadata):
* platform/blackberry/WorkerAsyncFileSystemBlackBerry.h: Added.
(WebCore):
(WorkerAsyncFileSystemBlackBerry):
(WebCore::WorkerAsyncFileSystemBlackBerry::create):
* platform/blackberry/WorkerAsyncFileWriterBlackBerry.cpp: Added.
(WebCore):
(WebCore::WorkerAsyncFileWriterBlackBerry::writeOnMainThread):
(WebCore::WorkerAsyncFileWriterBlackBerry::truncateOnMainThread):
(WebCore::WorkerAsyncFileWriterBlackBerry::abortOnMainThread):
(WebCore::WorkerAsyncFileWriterBlackBerry::write):
(WebCore::WorkerAsyncFileWriterBlackBerry::truncate):
(WebCore::WorkerAsyncFileWriterBlackBerry::abort):
(WebCore::WorkerAsyncFileWriterBlackBerry::waitForOperationToComplete):
(WebCore::WorkerAsyncFileWriterBlackBerry::platformWriterClient):
* platform/blackberry/WorkerAsyncFileWriterBlackBerry.h: Added.
(WebCore):
* platform/blackberry/WorkerPlatformAsyncFileSystemCallbacks.cpp: Added.
(WebCore):
(WebCore::performTaskOnMainThread):
(WebCore::postTaskToMainThread):
(WebCore::WorkerPlatformAsyncFileSystemCallbacks::notifyStop):
(WebCore::WorkerPlatformAsyncFileSystemCallbacks::notifyOpenFileSystem):
(WebCore::WorkerPlatformAsyncFileSystemCallbacks::notifySucceed):
(WebCore::WorkerPlatformAsyncFileSystemCallbacks::notifyFail):
(WebCore::WorkerPlatformAsyncFileSystemCallbacks::notifyReadMetadata):
(WebCore::WorkerPlatformAsyncFileSystemCallbacks::notifyReadDirectory):
(WebCore::WorkerPlatformAsyncFileSystemCallbacks::notifyCreateFileWriter):
(WebCore::WorkerPlatformAsyncFileSystemCallbacks::createAsyncFileSystem):
(WebCore::WorkerPlatformAsyncFileSystemCallbacks::createAsyncFileWriter):
(WebCore::WorkerPlatformAsyncFileSystemCallbacks::deleteMe):
(WebCore::WorkerPlatformAsyncFileSystemCallbacks::postTaskToWorkerThread):
(WebCore::WorkerPlatformAsyncFileSystemCallbacks::notifyOpenFileSystemOnWorkerThread):
(WebCore::WorkerPlatformAsyncFileSystemCallbacks::notifySucceedOnWorkerThread):
(WebCore::WorkerPlatformAsyncFileSystemCallbacks::notifyFailOnWorkerThread):
(WebCore::WorkerPlatformAsyncFileSystemCallbacks::notifyReadMetadataOnWorkerThread):
(WebCore::WorkerPlatformAsyncFileSystemCallbacks::notifyReadDirectoryEntryOnWorkerThread):
(WebCore::WorkerPlatformAsyncFileSystemCallbacks::notifyCreateFileWriterOnWorkerThread):
* platform/blackberry/WorkerPlatformAsyncFileSystemCallbacks.h: Added.
(WebCore):
* platform/blackberry/WorkerPlatformFileWriterClient.cpp: Added.
(WebCore):
(WebCore::WorkerPlatformFileWriterClient::notifyWriteOnWorkerThread):
(WebCore::WorkerPlatformFileWriterClient::notifyFailOnWorkerThread):
(WebCore::WorkerPlatformFileWriterClient::notifyTruncateOnWorkerThread):
(WebCore::WorkerPlatformFileWriterClient::notifyWrite):
(WebCore::WorkerPlatformFileWriterClient::notifyTruncate):
(WebCore::WorkerPlatformFileWriterClient::notifyFail):
(WebCore::WorkerPlatformFileWriterClient::postTaskToWorkerThreadIfNeeded):
* platform/blackberry/WorkerPlatformFileWriterClient.h: Added.
(WebCore):
(WTF):
(WTF::WebCore::WorkerPlatformFileWriterClient):

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

6 years agoBuild fix.
roger_fong@apple.com [Thu, 11 Apr 2013 23:04:31 +0000 (23:04 +0000)]
Build fix.

* win/include/WebKitSystemInterface/WebKitSystemInterface.h:
* win/lib/WebKitSystemInterface.lib:

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

6 years ago <rdar://problem/10416316> [Mac] WebSocket doesn't work with authenticating...
ap@apple.com [Thu, 11 Apr 2013 22:56:53 +0000 (22:56 +0000)]
    <rdar://problem/10416316> [Mac] WebSocket doesn't work with authenticating proxies
        https://bugs.webkit.org/show_bug.cgi?id=114464

        Update WebKitSystemInterface.

        * WebKitSystemInterface.h:
        * libWebKitSystemInterfaceLion.a:
        * libWebKitSystemInterfaceMountainLion.a:

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

6 years agoMac Lion build fix attempt after r148197.
rniwa@webkit.org [Thu, 11 Apr 2013 22:17:57 +0000 (22:17 +0000)]
Mac Lion build fix attempt after r148197.

* page/scrolling/mac/ScrollingStateNodeMac.mm:

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

6 years agoInjectedBundleNodeHandle::imageForRect doesn't respect device scale factor or highlig...
timothy_horton@apple.com [Thu, 11 Apr 2013 21:50:03 +0000 (21:50 +0000)]
InjectedBundleNodeHandle::imageForRect doesn't respect device scale factor or highlighting option
https://bugs.webkit.org/show_bug.cgi?id=114466
<rdar://problem/13508513>

Reviewed by Simon Fraser.

Respect the device scale factor when creating the snapshot image.
Clear the snapshot image before drawing into it.
Respect SnapshotOptionsExcludeSelectionHighlighting.

* WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp:
(WebKit::imageForRect):

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

6 years ago <rdar://problem/10416316> [Mac] WebSocket doesn't work with authenticating...
ap@apple.com [Thu, 11 Apr 2013 21:42:44 +0000 (21:42 +0000)]
    <rdar://problem/10416316> [Mac] WebSocket doesn't work with authenticating proxies
        https://bugs.webkit.org/show_bug.cgi?id=114464

        Reviewed by Brady Eidson.

        * platform/mac/WebCoreSystemInterface.h:
        * platform/mac/WebCoreSystemInterface.mm:
        Updated for new wkCopyCONNECTProxyResponse signature.

        * platform/network/cf/SocketStreamHandleCFNet.cpp:
        (WebCore::SocketStreamHandle::executePACFileURL): Fixed a typo in a comment.
        (WebCore::SocketStreamHandle::addCONNECTCredentials): Don't crash even if the rest
        of the fix didn't work (which would be the case on some OS versions).
        (WebCore::SocketStreamHandle::readStreamCallback): Replaced most breaks with returns,
        because breaks were confusing in such a huge switch. Changed null proxyResponse
        to not be treated as authentication success, because it's not. Merged two parts
        of WaitingForConnect state handling for clarity.
        (WebCore::SocketStreamHandle::writeStreamCallback): Don't blindly assume that we
        can start WebSocket handshake after kCFStreamEventCanAcceptBytes. Perhaps it's
        nothing but a failed CONNECT, and a read callback still needs to send authentication.
        Without this, establishing connections was flaky. Added a check for Closed state,
        matching read callback.

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

6 years agoMutationRecord is not exposed
commit-queue@webkit.org [Thu, 11 Apr 2013 21:41:28 +0000 (21:41 +0000)]
MutationRecord is not exposed
https://bugs.webkit.org/show_bug.cgi?id=114288

Patch by Sukolsak Sakshuwong <sukolsak@gmail.com> on 2013-04-11
Reviewed by Darin Adler.

Source/WebCore:

Expose MutationRecord on DOMWindow. This patch is copied from a patch
by Adam Klein. https://codereview.chromium.org/13861028

Test: fast/dom/MutationObserver/mutation-record-constructor.html

* page/DOMWindow.idl:

LayoutTests:

This test is copied from a patch by Adam Klein.
https://codereview.chromium.org/13861028
The test expectation of "typeof MutationRecord" is changed from
"function" to "object". (See bug 114457)

* fast/dom/MutationObserver/mutation-record-constructor-expected.txt: Added.
* fast/dom/MutationObserver/mutation-record-constructor.html: Added.

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

6 years agoCannot scroll to footer on a page with overflow:hidden on the body
bdakin@apple.com [Thu, 11 Apr 2013 21:01:07 +0000 (21:01 +0000)]
Cannot scroll to footer on a page with overflow:hidden on the body
https://bugs.webkit.org/show_bug.cgi?id=114462
-and corresponding-
<rdar://problem/13530042>

Reviewed by Simon Fraser.

Add a new scenario in which we want to overrideHidden -- whenever we are the
mainFrame and there is a header or footer.

* page/FrameView.cpp:
(WebCore::FrameView::applyOverflowToViewport):

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

6 years agoUnreviewed, rolling out r148034, r148052, r148097, and
rniwa@webkit.org [Thu, 11 Apr 2013 20:53:25 +0000 (20:53 +0000)]
Unreviewed, rolling out r148034, r148052, r148097, and
r148194.
http://trac.webkit.org/changeset/148034
http://trac.webkit.org/changeset/148052
http://trac.webkit.org/changeset/148097
http://trac.webkit.org/changeset/148194
https://bugs.webkit.org/show_bug.cgi?id=114463

broke mutiresolution favicons, among other things (Requested
by thorton on #webkit).

Source/WebCore:

* loader/icon/IconDatabase.cpp:
(WebCore::IconDatabase::setIconDataForIconURL):
* loader/icon/IconDatabase.h:
(IconDatabase):
* loader/icon/IconDatabaseBase.h:
* loader/icon/IconRecord.cpp:
* loader/icon/IconRecord.h:
(IconRecord):

Source/WebKit2:

* UIProcess/WebIconDatabase.cpp:
(WebKit::WebIconDatabase::setIconDataForIconURL):
* UIProcess/WebIconDatabase.h:
(WebIconDatabase):
* UIProcess/WebIconDatabase.messages.in:
* WebProcess/IconDatabase/WebIconDatabaseProxy.cpp:
(WebKit::WebIconDatabaseProxy::setIconDataForIconURL):
* WebProcess/Plugins/PDF/PDFPlugin.mm:
(WebKit::PDFPlugin::destroy):

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

6 years ago[GTK][AC] Implement GraphicsLayerClutter::moveOrCopyAnimations
commit-queue@webkit.org [Thu, 11 Apr 2013 20:51:50 +0000 (20:51 +0000)]
[GTK][AC] Implement GraphicsLayerClutter::moveOrCopyAnimations
https://bugs.webkit.org/show_bug.cgi?id=114019

Patch by ChangSeok Oh <changseok.oh@collabora.com> on 2013-04-11
Reviewed by Gustavo Noronha Silva.

Fill moveOrCopyAnimations that is based on Mac port implementation.

Tests: animations/3d/change-transform-in-end-event.html
       animations/3d/transform-origin-vs-functions.html
       compositing/animation/state-at-end-event-transform-layer.html

* platform/graphics/clutter/GraphicsLayerClutter.cpp:
(WebCore::GraphicsLayerClutter::moveOrCopyLayerAnimation):
(WebCore):
(WebCore::GraphicsLayerClutter::moveOrCopyAnimations):
* platform/graphics/clutter/GraphicsLayerClutter.h:

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

6 years agoImplement StorageManager::getValues
andersca@apple.com [Thu, 11 Apr 2013 20:34:00 +0000 (20:34 +0000)]
Implement StorageManager::getValues
https://bugs.webkit.org/show_bug.cgi?id=114461

Reviewed by Beth Dakin.

Source/WebCore:

Expose the item hash map.

* storage/StorageMap.h:
(WebCore::StorageMap::items):

Source/WebKit2:

* UIProcess/Storage/StorageManager.cpp:
(WebKit::StorageManager::StorageArea::items):
(WebKit::StorageManager::getValues):
Return the items from the right storage area.

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

6 years ago[GTK] Windows build failure after r136056
commit-queue@webkit.org [Thu, 11 Apr 2013 20:22:34 +0000 (20:22 +0000)]
[GTK] Windows build failure after r136056
https://bugs.webkit.org/show_bug.cgi?id=114121

Patch by Kalev Lember <kalevlember@gmail.com> on 2013-04-11
Reviewed by Martin Robinson.

* TestWebKitAPI/config.h: Make sure defines are correct for other
Windows ports than apple-win.

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

6 years agoClean up related storage areas when a connection is destroyed
andersca@apple.com [Thu, 11 Apr 2013 20:14:45 +0000 (20:14 +0000)]
Clean up related storage areas when a connection is destroyed
https://bugs.webkit.org/show_bug.cgi?id=114459

Reviewed by Beth Dakin.

* UIProcess/Storage/StorageManager.cpp:
(WebKit::StorageManager::processWillCloseConnection):
Dispatch invalidateConnectionInternal on the work queue.

(WebKit::StorageManager::createStorageMap):
(WebKit::StorageManager::destroyStorageMap):
Rename m_storageAreas to m_storageAreasByConnection.

(WebKit::StorageManager::invalidateConnectionInternal):
Go over all known storage areas and remove this connection as a listener.

(WebKit::StorageManager::findStorageArea):
Rename m_storageAreas to m_storageAreasByConnection.

* UIProcess/Storage/StorageManager.h:
Rename m_storageAreas to m_storageAreasByConnection.

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

6 years ago[BlackBerry] Use the platform list of languages with fonts instead of hardcoding
commit-queue@webkit.org [Thu, 11 Apr 2013 20:08:32 +0000 (20:08 +0000)]
[BlackBerry] Use the platform list of languages with fonts instead of hardcoding
https://bugs.webkit.org/show_bug.cgi?id=114452

Patch by Eli Fidler <efidler@blackberry.com> on 2013-04-11
Reviewed by Rob Buis.

BlackBerry PR 325244
Internally reviewed by Jeff Rogers

No functional change, but platform font changes won't need a WebKit change
going forward.

* page/blackberry/SettingsBlackBerry.cpp:
(WebCore::Settings::initializeDefaultFontFamilies):

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

6 years ago[CSS Shaders] Parse parameters descriptor
krit@webkit.org [Thu, 11 Apr 2013 20:05:17 +0000 (20:05 +0000)]
[CSS Shaders] Parse parameters descriptor
https://bugs.webkit.org/show_bug.cgi?id=114455

Reviewed by Dean Jackson.

Source/WebCore:

Add support for the 'parameters' descriptor in the filter at-rule to support
parameterization of CSS Shaders.

https://dvcs.w3.org/hg/FXTF/raw-file/tip/filters/index.html#custom-filter-parameters

Tests: css3/filters/custom-with-at-rule-syntax/parsing-parameters-property-invalid.html
       css3/filters/custom-with-at-rule-syntax/parsing-parameters-property-valid.html

* css/CSSComputedStyleDeclaration.cpp:
(WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
* css/CSSParser.cpp: Added 'parameters' property and fail parsing if not inside
    of an @filter rule.
(WebCore::CSSParser::parseValue):
(WebCore::CSSParser::parseFilterRuleParameters): New helper function to verify
    values.
(WebCore):
* css/CSSParser.h:
* css/CSSProperty.cpp:
(WebCore::CSSProperty::isInheritedProperty):
* css/CSSPropertyNames.in: Added new property name 'parameters'.
* css/StyleResolver.cpp:
(WebCore::StyleResolver::applyProperty):

LayoutTests:

Tests for the 'parameters' descriptor on @filter rule.

* css3/filters/custom-with-at-rule-syntax/parsing-parameters-property-invalid-expected.txt: Added.
* css3/filters/custom-with-at-rule-syntax/parsing-parameters-property-invalid.html: Added.
* css3/filters/custom-with-at-rule-syntax/parsing-parameters-property-valid-expected.txt: Added.
* css3/filters/custom-with-at-rule-syntax/parsing-parameters-property-valid.html: Added.
* css3/filters/custom-with-at-rule-syntax/script-tests/parsing-parameters-property-invalid.js: Added.
(testInvalidParametersProperty):
* css3/filters/custom-with-at-rule-syntax/script-tests/parsing-parameters-property-valid.js: Added.
(testParametersProperty):

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

6 years agoGet rid of the 10ms delay between test executions
fpizlo@apple.com [Thu, 11 Apr 2013 20:01:55 +0000 (20:01 +0000)]
Get rid of the 10ms delay between test executions
https://bugs.webkit.org/show_bug.cgi?id=114458
<rdar://problem/13631112>

Reviewed by Darin Adler and Geoffrey Garen.

More details on this in the bug. Long story short, I don't know why the 10ms delay is
there, and it appears to be the root of some noisyness and unreliability in the results.
Removing it makes results more consistent, which is a good thing.

* resources/driver-TEMPLATE.html:

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

6 years ago[BlackBerry] Initial scale changes depending on the order of page navigations
zhajiang@rim.com [Thu, 11 Apr 2013 19:56:36 +0000 (19:56 +0000)]
[BlackBerry] Initial scale changes depending on the order of page navigations
https://bugs.webkit.org/show_bug.cgi?id=114448

Patch by Jacky Jiang <zhajiang@rim.com>.
Reviewed by Rob Buis.

PR: 323941
During page transitions, absoluteVisibleOverflowSize() and contentsSize()
in fixedLayoutSize() were based on the old page when we just started or
committed provisinal load. In that case, fixedLayoutSize() is very old
page dependent and can cause inconsistent behaviors. For example, if
the old page contents width is 4000, we will get DEFAULT_MAX_LAYOUT_WIDTH 1024
as the new page's fixedLayoutSize; however, we will get 768 if we
navigate to the new page directly.
To fix that, return default layout size if the page doesn't have
virtual viewport and m_loadState is Provisional.

* Api/WebPage.cpp:
(BlackBerry::WebKit::WebPagePrivate::fixedLayoutSize):

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

6 years agoDefault Implementation of toString for NPObject shouldn't return NPClass & NPObject...
commit-queue@webkit.org [Thu, 11 Apr 2013 19:37:22 +0000 (19:37 +0000)]
Default Implementation of toString for NPObject shouldn't return NPClass & NPObject address as String
https://bugs.webkit.org/show_bug.cgi?id=114450

Patch by Arunprasad Rajkumar <arunprasadr@nds.com> on 2013-04-11
Reviewed by Anders Carlsson.

* bridge/c/c_instance.cpp:
(JSC::Bindings::CInstance::stringValue):

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

6 years agoREGRESSION (142152): ensure we skip past out-of-flow objects when detecting whitespac...
robert@webkit.org [Thu, 11 Apr 2013 19:17:12 +0000 (19:17 +0000)]
REGRESSION (142152): ensure we skip past out-of-flow objects when detecting whitespace to ignore after leading empty inlines
https://bugs.webkit.org/show_bug.cgi?id=114311

Reviewed by Emil A Eklund.

Source/WebCore:

When we hit an empty inline in line layout and try to detect whether it has any whitespace after it that we ought to ignore, then
we need to skip past out-of-flow and floating objects when looking for that whitespace. Failure to do so will result in us
adding the width from the first space we encounter to our line width and over-estimating the real width of the line.

We're hitting this bug now because we have broadened the category of empty inlines that get lineboxes so we go into line layout
and have to deal with them and their subsequent whitespace there. Previously this sort of whitespace would have been simply
consumed by |skipLeadingWhitespace|.

Test: fast/inline/out-of-flow-objects-and-whitespace-after-empty-inline.html

* rendering/RenderBlockLineLayout.cpp:
(WebCore::shouldSkipWhitespaceAfterStartObject):

LayoutTests:

* fast/inline/out-of-flow-objects-and-whitespace-after-empty-inline-expected.txt: Added.
* fast/inline/out-of-flow-objects-and-whitespace-after-empty-inline.html: Added.

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

6 years agoRemove myself from watchlists.
ojan@chromium.org [Thu, 11 Apr 2013 19:14:01 +0000 (19:14 +0000)]
Remove myself from watchlists.
* Scripts/webkitpy/common/config/watchlist:

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

6 years agoAutocorrected text doesn't have a marker of type autocorrected
rniwa@webkit.org [Thu, 11 Apr 2013 18:56:16 +0000 (18:56 +0000)]
Autocorrected text doesn't have a marker of type autocorrected
https://bugs.webkit.org/show_bug.cgi?id=114337

Reviewed by Darin Adler.

Source/WebCore:

The bug was caused by markAndReplaceFor's text replacement errornously assuming that there are
no other text checking result starting at the same offset. That resulted in us adjusting location
offsets of the subsequent results pointing at the replaced text, hit an assertion, and blow up.

Fixed the bug by skipping all remaining results for the replaced text since they're no longer
applicable.

Tests: Existing autocorection tests have been updated to assert new behavior.

* editing/Editor.cpp:
(WebCore::Editor::markAndReplaceFor):

LayoutTests:

Updated tests to assert the existence of "autocorrected" markers.

* platform/mac/editing/spelling/click-autocorrected-word-expected.png:
* platform/mac/editing/spelling/click-autocorrected-word-expected.txt:
* platform/mac/editing/spelling/click-autocorrected-word.html:
* platform/mac/editing/spelling/delete-into-autocorrected-word-expected.png:
* platform/mac/editing/spelling/delete-into-autocorrected-word-expected.txt:
* platform/mac/editing/spelling/delete-into-autocorrected-word.html:
* platform/mac/editing/spelling/forward-delete-into-autocorrected-word-expected.png:
* platform/mac/editing/spelling/forward-delete-into-autocorrected-word-expected.txt:
* platform/mac/editing/spelling/forward-delete-into-autocorrected-word.html:
* platform/mac/editing/spelling/move-cursor-to-autocorrected-word-expected.png:
* platform/mac/editing/spelling/move-cursor-to-autocorrected-word-expected.txt:
* platform/mac/editing/spelling/move-cursor-to-autocorrected-word.html:
* platform/mac/editing/spelling/move-cursor-to-beginning-of-autocorrected-word-expected.png:
* platform/mac/editing/spelling/move-cursor-to-beginning-of-autocorrected-word-expected.txt:
* platform/mac/editing/spelling/move-cursor-to-beginning-of-autocorrected-word.html:

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

6 years ago[CSS Shaders] Parse the geometry descriptor
michelangelo@webkit.org [Thu, 11 Apr 2013 18:54:09 +0000 (18:54 +0000)]
[CSS Shaders] Parse the geometry descriptor
https://bugs.webkit.org/show_bug.cgi?id=110815

Source/WebCore:

Added initial parsing for the "geometry" descriptor, as per specification:
https://dvcs.w3.org/hg/FXTF/raw-file/tip/filters/index.html#geometry
This descriptor allows to specify the mesh geometry for custom filters.

Reviewed by Dirk Schulze.

Tests: css3/filters/custom-with-at-rule-syntax/parsing-geometry-property-invalid.html
       css3/filters/custom-with-at-rule-syntax/parsing-geometry-property-valid.html

* css/CSSComputedStyleDeclaration.cpp:
(WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
* css/CSSParser.cpp:
(WebCore::CSSParser::parseValue):
(WebCore::CSSParser::parseGeometry): New method that parses the geometry
descriptor (grid()).
(WebCore):
* css/CSSParser.h:
* css/CSSProperty.cpp:
(WebCore::CSSProperty::isInheritedProperty):
* css/CSSPropertyNames.in: Added conditional "geometry" property.
* css/CSSValueKeywords.in: Added conditional "attached" value keyword; detached
was already there.

LayoutTests:

Positive and negative parsing tests for the "geometry" descriptor as
per specification:
https://dvcs.w3.org/hg/FXTF/raw-file/tip/filters/index.html#geometry

Reviewed by Dirk Schulze.

* css3/filters/custom-with-at-rule-syntax/parsing-geometry-property-invalid-expected.txt: Added.
* css3/filters/custom-with-at-rule-syntax/parsing-geometry-property-invalid.html: Added.
* css3/filters/custom-with-at-rule-syntax/parsing-geometry-property-valid-expected.txt: Added.
* css3/filters/custom-with-at-rule-syntax/parsing-geometry-property-valid.html: Added.
* css3/filters/custom-with-at-rule-syntax/script-tests/parsing-geometry-property-invalid.js: Added.
(testInvalidGeometryProperty):
* css3/filters/custom-with-at-rule-syntax/script-tests/parsing-geometry-property-valid.js: Added.
(testGeometryProperty):

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

6 years agoMake StorageAreaMap dispatch session storage events
andersca@apple.com [Thu, 11 Apr 2013 18:43:40 +0000 (18:43 +0000)]
Make StorageAreaMap dispatch session storage events
https://bugs.webkit.org/show_bug.cgi?id=114454

Reviewed by Beth Dakin.

Source/WebCore:

Export storage symbols and headers needed by WebKit2.

* WebCore.exp.in:
* WebCore.xcodeproj/project.pbxproj:

Source/WebKit2:

* WebProcess/Storage/StorageAreaMap.cpp:
(WebKit::StorageAreaMap::dispatchStorageEvent):
Depending on the storage area type, call dispatchSessionStorageEvent or dispatchLocalStorageEvent.

(WebKit::StorageAreaMap::dispatchSessionStorageEvent):
Enumerate all the frames in our page and dispatch the event to the relevant ones.

(WebKit::StorageAreaMap::dispatchLocalStorageEvent):
Add empty stub for now.

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

6 years agoUnreviewed.
zandobersek@gmail.com [Thu, 11 Apr 2013 18:39:06 +0000 (18:39 +0000)]
Unreviewed.

* Source/autotools/symbols.filter: Stop exporting redundant symbols.

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