WebKit-https.git
6 years agoUnreviewed. Reorder my e-mail addresses in contributors.json
ryuan.choi@navercorp.com [Fri, 7 Nov 2014 00:18:54 +0000 (00:18 +0000)]
Unreviewed. Reorder my e-mail addresses in contributors.json

Patch by Ryuan Choi <ryuan.choi@navercorp.com> on 2014-11-06

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

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

6 years agoslow_path_get_direct_pname() needs to be hardened against a constant baseValue.
mark.lam@apple.com [Fri, 7 Nov 2014 00:18:23 +0000 (00:18 +0000)]
slow_path_get_direct_pname() needs to be hardened against a constant baseValue.
<https://webkit.org/b/138476>

Reviewed by Michael Saboff.

Source/JavaScriptCore:

slow_path_get_direct_pname() currently assumes that the baseValue is always a
non-constant virtual register.  However, this is not always the case like in the
following:

    function foo() {
        var o = { a:1 };
        for (var n in o)
            0[n];
    }
    foo();

This patch fixes it to also check for constant virtual register indexes.

* runtime/CommonSlowPaths.cpp:
(JSC::SLOW_PATH_DECL):

LayoutTests:

* js/get-by-pname-expected.txt:
* js/script-tests/get-by-pname.js:
(getByPnameOnConstant):
(getByPnameOnVar):
- Added more test cases.

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

6 years agoRefactor the get-by-pname.js test.
mark.lam@apple.com [Thu, 6 Nov 2014 23:53:50 +0000 (23:53 +0000)]
Refactor the get-by-pname.js test.
<https://webkit.org/b/138483>

Reviewed by Geoffrey Garen.

Refactored the test code to:
1. make it easier to add more test cases.
2. test each case against different tier JITs.
3. print only one set of results for each tier being tested.

* js/get-by-pname-expected.txt:
* js/script-tests/get-by-pname.js:
(getByPnameOnConstant):
(getByPnameOnVar):
(testExpr):
(testExpectedResult):
(isTierIteration):
(tierName):

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

6 years ago[CSS Shapes] the spec-examples reftests are off by a few pixels
bjonesbe@adobe.com [Thu, 6 Nov 2014 23:20:53 +0000 (23:20 +0000)]
[CSS Shapes] the spec-examples reftests are off by a few pixels
https://bugs.webkit.org/show_bug.cgi?id=135927

Reviewed by Zoltan Horvath.

Import new versions of the spec example tests that are js tests
instead of ref tests so that they can properly handle the small pixel
differences in rendering between platforms.

* TestExpectations:
* css3/shapes/spec-examples/shape-outside-010-expected.html: Removed.
* css3/shapes/spec-examples/shape-outside-010-expected.txt: Added.
* css3/shapes/spec-examples/shape-outside-010.html:
* css3/shapes/spec-examples/shape-outside-011-expected.html: Removed.
* css3/shapes/spec-examples/shape-outside-011-expected.txt: Added.
* css3/shapes/spec-examples/shape-outside-011.html:
* css3/shapes/spec-examples/shape-outside-012-expected.html: Removed.
* css3/shapes/spec-examples/shape-outside-012-expected.txt: Added.
* css3/shapes/spec-examples/shape-outside-012.html:
* css3/shapes/spec-examples/shape-outside-013-expected.html: Removed.
* css3/shapes/spec-examples/shape-outside-013-expected.txt: Added.
* css3/shapes/spec-examples/shape-outside-013.html:
* css3/shapes/spec-examples/shape-outside-014-expected.html: Removed.
* css3/shapes/spec-examples/shape-outside-014-expected.txt: Added.
* css3/shapes/spec-examples/shape-outside-014.html:
* css3/shapes/spec-examples/shape-outside-015-expected.html: Removed.
* css3/shapes/spec-examples/shape-outside-015-expected.txt: Added.
* css3/shapes/spec-examples/shape-outside-015.html:
* css3/shapes/spec-examples/shape-outside-016-expected.html: Removed.
* css3/shapes/spec-examples/shape-outside-016-expected.txt: Added.
* css3/shapes/spec-examples/shape-outside-016.html:
* css3/shapes/spec-examples/shape-outside-017-expected.html: Removed.
* css3/shapes/spec-examples/shape-outside-017-expected.txt: Added.
* css3/shapes/spec-examples/shape-outside-017.html:
* css3/shapes/spec-examples/shape-outside-018-expected.html: Removed.
* css3/shapes/spec-examples/shape-outside-018-expected.txt: Added.
* css3/shapes/spec-examples/shape-outside-018.html:
* css3/shapes/spec-examples/shape-outside-019-expected.html: Removed.
* css3/shapes/spec-examples/shape-outside-019-expected.txt: Added.
* css3/shapes/spec-examples/shape-outside-019.html:
* css3/shapes/spec-examples/support/spec-example-utils.js: Added.
(.runTest):
(approxShapeTest):
* css3/shapes/spec-examples/support/w3c-import.log:
* css3/shapes/spec-examples/w3c-import.log:

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

6 years agoStop special-casing wbr elements in HTMLElement::createElementRenderer()
cdumez@apple.com [Thu, 6 Nov 2014 23:17:32 +0000 (23:17 +0000)]
Stop special-casing wbr elements in HTMLElement::createElementRenderer()
https://bugs.webkit.org/show_bug.cgi?id=138474

Reviewed by Ryosuke Niwa.

Stop special-casing wbr elements in HTMLElement::createElementRenderer()
and move the code to a HTMLWBRElement subclass instead, that is
overriding createElementRenderer(). This function is already virtual.

No new tests, no behavior change.

* CMakeLists.txt:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.xcodeproj/project.pbxproj:
* html/HTMLElement.cpp:
(WebCore::HTMLElement::createElementRenderer):
* html/HTMLElementsAllInOne.cpp:
* html/HTMLTagNames.in:
* html/HTMLWBRElement.cpp: Added.
(WebCore::HTMLWBRElement::create):
(WebCore::HTMLWBRElement::HTMLWBRElement):
(WebCore::HTMLWBRElement::createElementRenderer):
* html/HTMLWBRElement.h: Added.
* rendering/RenderLineBreak.cpp:
(WebCore::RenderLineBreak::RenderLineBreak):

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

6 years agoDe-templatize Timer
jer.noble@apple.com [Thu, 6 Nov 2014 23:06:03 +0000 (23:06 +0000)]
De-templatize Timer
https://bugs.webkit.org/show_bug.cgi?id=138450

Reviewed by Anders Carlsson.

Source/WebCore:

Timer does not need to be a templated class; only it's constructors need to be templated.
Remove the template specifier from Timer and add same to its two class method
constructors. Replace the function pointer typedefs with using statements. Add a
helper typedef which allows invalid combinations of TimerFiredClass and
TimerFiredFunction to be caught early by the compiler, while still allowing
valid combinations (such as when the caller specifies a function on a subclass of
TimerFiredClass).

* Modules/encryptedmedia/MediaKeySession.cpp:
(WebCore::MediaKeySession::keyRequestTimerFired):
(WebCore::MediaKeySession::addKeyTimerFired):
* Modules/encryptedmedia/MediaKeySession.h:
* Modules/geolocation/Geolocation.cpp:
(WebCore::Geolocation::GeoNotifier::timerFired):
(WebCore::Geolocation::resumeTimerFired):
* Modules/geolocation/Geolocation.h:
* Modules/indexeddb/IDBTransactionBackend.cpp:
(WebCore::IDBTransactionBackend::taskTimerFired):
* Modules/indexeddb/IDBTransactionBackend.h:
* Modules/mediasource/SourceBuffer.cpp:
(WebCore::SourceBuffer::appendBufferTimerFired):
(WebCore::SourceBuffer::removeTimerFired):
* Modules/mediasource/SourceBuffer.h:
* Modules/mediastream/MediaStream.cpp:
(WebCore::MediaStream::scheduledEventTimerFired):
* Modules/mediastream/MediaStream.h:
* Modules/mediastream/RTCDTMFSender.cpp:
(WebCore::RTCDTMFSender::scheduledEventTimerFired):
* Modules/mediastream/RTCDTMFSender.h:
* Modules/mediastream/RTCDataChannel.cpp:
(WebCore::RTCDataChannel::scheduledEventTimerFired):
* Modules/mediastream/RTCDataChannel.h:
* Modules/mediastream/RTCPeerConnection.cpp:
(WebCore::RTCPeerConnection::scheduledEventTimerFired):
* Modules/mediastream/RTCPeerConnection.h:
* Modules/notifications/Notification.cpp:
(WebCore::Notification::Notification):
(WebCore::Notification::taskTimerFired):
* Modules/notifications/Notification.h:
* Modules/notifications/NotificationCenter.cpp:
(WebCore::NotificationCenter::NotificationRequestCallback::timerFired):
* Modules/notifications/NotificationCenter.h:
* Modules/vibration/Vibration.cpp:
(WebCore::Vibration::timerFired):
* Modules/vibration/Vibration.h:
* Modules/websockets/WebSocketChannel.cpp:
(WebCore::WebSocketChannel::resumeTimerFired):
(WebCore::WebSocketChannel::closingTimerFired):
* Modules/websockets/WebSocketChannel.h:
* accessibility/AXObjectCache.cpp:
(WebCore::AXObjectCache::notificationPostTimerFired):
* accessibility/AXObjectCache.h:
(WebCore::AXObjectCache::AXObjectCache):
* bindings/js/GCController.cpp:
(WebCore::GCController::gcTimerFired):
* bindings/js/GCController.h:
* css/CSSFontFaceSource.h:
* css/CSSFontSelector.cpp:
(WebCore::CSSFontSelector::beginLoadTimerFired):
* css/CSSFontSelector.h:
* css/StyleResolver.cpp:
(WebCore::StyleResolver::sweepMatchedPropertiesCache):
* css/StyleResolver.h:
* dom/Document.cpp:
(WebCore::Document::visualUpdatesSuppressionTimerFired):
(WebCore::Document::styleRecalcTimerFired):
(WebCore::Document::optimizedStyleSheetUpdateTimerFired):
(WebCore::Document::sharedObjectPoolClearTimerFired):
(WebCore::Document::updateFocusAppearanceTimerFired):
(WebCore::Document::pendingTasksTimerFired):
(WebCore::Document::fullScreenChangeDelayTimerFired):
(WebCore::Document::loadEventDelayTimerFired):
(WebCore::Document::didAssociateFormControlsTimerFired):
(WebCore::Document::domCookieCacheExpiryTimerFired):
* dom/Document.h:
* dom/EventSender.h:
(WebCore::EventSender::timerFired):
* dom/GenericEventQueue.cpp:
(WebCore::GenericEventQueue::timerFired):
* dom/GenericEventQueue.h:
* dom/ScriptRunner.cpp:
(WebCore::ScriptRunner::timerFired):
* dom/ScriptRunner.h:
* dom/ScriptedAnimationController.cpp:
(WebCore::ScriptedAnimationController::animationTimerFired):
* dom/ScriptedAnimationController.h:
* dom/StyledElement.cpp:
(WebCore::PresentationAttributeCacheCleaner::cleanCache):
* editing/AlternativeTextController.cpp:
(WebCore::AlternativeTextController::timerFired):
* editing/AlternativeTextController.h:
* editing/Editor.cpp:
(WebCore::Editor::scanSelectionForTelephoneNumbers):
(WebCore::Editor::editorUIUpdateTimerFired):
* editing/Editor.h:
* editing/FrameSelection.cpp:
(WebCore::FrameSelection::caretBlinkTimerFired):
* editing/FrameSelection.h:
* editing/SpellChecker.cpp:
(WebCore::SpellChecker::timerFiredToProcessQueuedRequest):
* editing/SpellChecker.h:
* html/HTMLFormElement.cpp:
(WebCore::HTMLFormElement::requestAutocompleteTimerFired):
* html/HTMLFormElement.h:
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::parseAttribute):
* html/HTMLMediaElement.h:
* html/HTMLPlugInElement.cpp:
(WebCore::HTMLPlugInElement::swapRendererTimerFired):
* html/HTMLPlugInElement.h:
* html/HTMLPlugInImageElement.cpp:
(WebCore::HTMLPlugInImageElement::removeSnapshotTimerFired):
* html/HTMLPlugInImageElement.h:
* html/HTMLSourceElement.cpp:
(WebCore::HTMLSourceElement::errorEventTimerFired):
* html/HTMLSourceElement.h:
* html/HTMLTrackElement.cpp:
(WebCore::HTMLTrackElement::loadTimerFired):
* html/HTMLTrackElement.h:
* html/MediaController.cpp:
(MediaController::asyncEventTimerFired):
(MediaController::clearPositionTimerFired):
(MediaController::timeupdateTimerFired):
* html/MediaController.h:
* html/MediaDocument.cpp:
(WebCore::MediaDocument::replaceMediaElementTimerFired):
* html/MediaDocument.h:
* html/SearchInputType.cpp:
(WebCore::SearchInputType::searchEventTimerFired):
* html/SearchInputType.h:
* html/ValidationMessage.cpp:
(WebCore::ValidationMessage::setMessage):
(WebCore::ValidationMessage::setMessageDOMAndStartTimer):
(WebCore::ValidationMessage::buildBubbleTree):
(WebCore::ValidationMessage::requestToHideMessage):
(WebCore::ValidationMessage::deleteBubbleTree):
* html/ValidationMessage.h:
* html/canvas/WebGLRenderingContext.cpp:
(WebCore::WebGLRenderingContext::dispatchContextLostEvent):
(WebCore::WebGLRenderingContext::maybeRestoreContext):
* html/canvas/WebGLRenderingContext.h:
* html/parser/HTMLParserScheduler.cpp:
(WebCore::HTMLParserScheduler::continueNextChunkTimerFired):
* html/parser/HTMLParserScheduler.h:
* html/shadow/MediaControlElements.cpp:
(WebCore::MediaControlPanelElement::transitionTimerFired):
(WebCore::MediaControlTextTrackContainerElement::updateTimerFired):
* html/shadow/MediaControlElements.h:
* html/shadow/MediaControls.cpp:
(WebCore::MediaControls::hideFullscreenControlsTimerFired):
* html/shadow/MediaControls.h:
* html/shadow/SpinButtonElement.cpp:
(WebCore::SpinButtonElement::repeatingTimerFired):
* html/shadow/SpinButtonElement.h:
* html/track/LoadableTextTrack.cpp:
(WebCore::LoadableTextTrack::loadTimerFired):
* html/track/LoadableTextTrack.h:
* html/track/VTTRegion.cpp:
(WebCore::VTTRegion::scrollTimerFired):
* html/track/VTTRegion.h:
* inspector/InspectorCSSAgent.cpp:
(WebCore::ChangeRegionOversetTask::timerFired):
* inspector/InspectorDOMAgent.cpp:
(WebCore::RevalidateStyleAttributeTask::timerFired):
* inspector/InspectorFrontendClientLocal.cpp:
(WebCore::InspectorBackendDispatchTask::timerFired):
* inspector/InspectorOverlay.cpp:
(WebCore::InspectorOverlay::updatePaintRectsTimerFired):
* inspector/InspectorOverlay.h:
* loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::substituteResourceDeliveryTimerFired):
* loader/DocumentLoader.h:
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::checkTimerFired):
* loader/FrameLoader.h:
* loader/ImageLoader.cpp:
(WebCore::ImageLoader::timerFired):
* loader/ImageLoader.h:
* loader/LinkLoader.cpp:
(WebCore::LinkLoader::linkLoadTimerFired):
(WebCore::LinkLoader::linkLoadingErrorTimerFired):
* loader/LinkLoader.h:
* loader/NavigationScheduler.cpp:
(WebCore::ScheduledNavigation::didStartTimer):
(WebCore::NavigationScheduler::timerFired):
* loader/NavigationScheduler.h:
* loader/PingLoader.h:
(WebCore::PingLoader::timeoutTimerFired):
* loader/ProgressTracker.cpp:
(WebCore::ProgressTracker::progressHeartbeatTimerFired):
* loader/ProgressTracker.h:
* loader/ResourceLoadScheduler.cpp:
(WebCore::ResourceLoadScheduler::requestTimerFired):
* loader/ResourceLoadScheduler.h:
* loader/TextTrackLoader.cpp:
(WebCore::TextTrackLoader::cueLoadTimerFired):
* loader/TextTrackLoader.h:
* loader/cache/CachedResource.cpp:
(WebCore::CachedResource::Callback::timerFired):
* loader/cache/CachedResource.h:
* loader/cache/CachedResourceLoader.cpp:
(WebCore::CachedResourceLoader::garbageCollectDocumentResourcesTimerFired):
* loader/cache/CachedResourceLoader.h:
* loader/icon/IconDatabase.cpp:
(WebCore::IconDatabase::syncTimerFired):
* loader/icon/IconDatabase.h:
* page/AutoscrollController.cpp:
(WebCore::AutoscrollController::autoscrollTimerFired):
* page/AutoscrollController.h:
* page/CaptionUserPreferences.cpp:
(WebCore::CaptionUserPreferences::timerFired):
* page/CaptionUserPreferences.h:
* page/CaptionUserPreferencesMediaAF.cpp:
(WebCore::CaptionUserPreferencesMediaAF::updateTimerFired):
* page/CaptionUserPreferencesMediaAF.h:
* page/DeviceController.cpp:
(WebCore::DeviceController::fireDeviceEvent):
* page/DeviceController.h:
* page/EventHandler.cpp:
(WebCore::EventHandler::cursorUpdateTimerFired):
(WebCore::EventHandler::autoHideCursorTimerFired):
(WebCore::EventHandler::recognizeLongMousePress):
(WebCore::EventHandler::fakeMouseMoveEventTimerFired):
(WebCore::EventHandler::hoverTimerFired):
* page/EventHandler.h:
* page/EventSource.cpp:
(WebCore::EventSource::connectTimerFired):
* page/EventSource.h:
* page/FocusController.cpp:
(WebCore::FocusController::focusRepaintTimerFired):
* page/FocusController.h:
* page/Frame.cpp:
(WebCore::Frame::overflowAutoScrollTimerFired):
* page/Frame.h:
* page/FrameView.cpp:
(WebCore::FrameView::delayedScrollEventTimerFired):
(WebCore::FrameView::speculativeTilingEnableTimerFired):
(WebCore::FrameView::layoutTimerFired):
(WebCore::FrameView::updateEmbeddedObjectsTimerFired):
(WebCore::FrameView::postLayoutTimerFired):
* page/FrameView.h:
* page/PageOverlay.cpp:
(WebCore::PageOverlay::fadeAnimationTimerFired):
* page/PageOverlay.h:
* page/Settings.cpp:
(WebCore::Settings::imageLoadingSettingsTimerFired):
* page/Settings.h:
* page/animation/AnimationController.cpp:
(WebCore::AnimationControllerPrivate::updateStyleIfNeededDispatcherFired):
(WebCore::AnimationControllerPrivate::animationTimerFired):
* page/animation/AnimationControllerPrivate.h:
* page/mac/ServicesOverlayController.h:
* page/mac/ServicesOverlayController.mm:
(WebCore::ServicesOverlayController::determineActiveHighlightTimerFired):
* page/scrolling/AsyncScrollingCoordinator.cpp:
(WebCore::AsyncScrollingCoordinator::updateScrollPositionAfterAsyncScrollTimerFired):
* page/scrolling/AsyncScrollingCoordinator.h:
* page/scrolling/ios/ScrollingCoordinatorIOS.h:
* page/scrolling/ios/ScrollingCoordinatorIOS.mm:
(WebCore::ScrollingCoordinatorIOS::scrollingStateTreeCommitterTimerFired):
* page/scrolling/mac/ScrollingCoordinatorMac.h:
* page/scrolling/mac/ScrollingCoordinatorMac.mm:
(WebCore::ScrollingCoordinatorMac::scrollingStateTreeCommitterTimerFired):
* platform/HysteresisActivity.h:
(WebCore::HysteresisActivity::hysteresisTimerFired):
* platform/ScrollAnimator.cpp:
(WebCore::ScrollAnimator::updateScrollAnimatorsAndTimers):
(WebCore::ScrollAnimator::startScrollSnapTimer):
(WebCore::ScrollAnimator::stopScrollSnapTimer):
(WebCore::ScrollAnimator::horizontalScrollSnapTimerFired):
(WebCore::ScrollAnimator::verticalScrollSnapTimerFired):
* platform/ScrollAnimator.h:
* platform/ScrollAnimatorNone.cpp:
(WebCore::ScrollAnimatorNone::animationTimerFired):
* platform/ScrollAnimatorNone.h:
* platform/Scrollbar.cpp:
(WebCore::Scrollbar::autoscrollTimerFired):
* platform/Scrollbar.h:
* platform/Timer.h:
(WebCore::Timer::Timer):
* platform/audio/MediaSession.cpp:
(WebCore::MediaSession::clientDataBufferingTimerFired):
* platform/audio/MediaSession.h:
* platform/efl/BatteryProviderEfl.cpp:
(WebCore::BatteryProviderEfl::timerFired):
* platform/efl/BatteryProviderEfl.h:
* platform/graphics/BitmapImage.cpp:
(WebCore::BitmapImage::startAnimation):
(WebCore::BitmapImage::advanceAnimation):
* platform/graphics/BitmapImage.h:
* platform/graphics/MediaPlayer.cpp:
(WebCore::MediaPlayer::reloadTimerFired):
* platform/graphics/MediaPlayer.h:
* platform/graphics/ShadowBlur.cpp:
(WebCore::ScratchBuffer::timerFired):
* platform/graphics/TiledBackingStore.cpp:
(WebCore::TiledBackingStore::tileBufferUpdateTimerFired):
(WebCore::TiledBackingStore::backingStoreUpdateTimerFired):
* platform/graphics/TiledBackingStore.h:
* platform/graphics/avfoundation/MediaSelectionGroupAVFObjC.h:
* platform/graphics/avfoundation/MediaSelectionGroupAVFObjC.mm:
(WebCore::MediaSelectionGroupAVFObjC::selectionTimerFired):
* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::seekTimerFired):
* platform/graphics/ca/LayerPool.cpp:
(WebCore::LayerPool::pruneTimerFired):
* platform/graphics/ca/LayerPool.h:
* platform/graphics/ca/TileController.cpp:
(WebCore::TileController::tileRevalidationTimerFired):
* platform/graphics/ca/TileController.h:
* platform/graphics/ca/TileGrid.cpp:
(WebCore::TileGrid::cohortRemovalTimerFired):
* platform/graphics/ca/TileGrid.h:
* platform/graphics/ca/win/LegacyCACFLayerTreeHost.cpp:
(WebCore::LegacyCACFLayerTreeHost::renderTimerFired):
* platform/graphics/ca/win/LegacyCACFLayerTreeHost.h:
* platform/graphics/cg/IOSurfacePool.cpp:
(WebCore::IOSurfacePool::collectionTimerFired):
* platform/graphics/cg/IOSurfacePool.h:
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::MediaPlayerPrivateGStreamer::fillTimerFired):
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
* platform/graphics/mac/MediaPlayerPrivateQTKit.h:
* platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
(WebCore::MediaPlayerPrivateQTKit::seekTimerFired):
* platform/graphics/texmap/TextureMapper.cpp:
(WebCore::BitmapTexturePool::releaseUnusedTexturesTimerFired):
* platform/graphics/texmap/coordinated/CompositingCoordinator.cpp:
(WebCore::CompositingCoordinator::releaseInactiveAtlasesTimerFired):
* platform/graphics/texmap/coordinated/CompositingCoordinator.h:
* platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
(WebCore::CoordinatedGraphicsLayer::animationStartedTimerFired):
* platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h:
* platform/graphics/texmap/coordinated/CoordinatedImageBacking.cpp:
(WebCore::CoordinatedImageBacking::clearContentsTimerFired):
* platform/graphics/texmap/coordinated/CoordinatedImageBacking.h:
* platform/ios/LegacyTileCache.h:
* platform/ios/LegacyTileCache.mm:
(WebCore::LegacyTileCache::tileCreationTimerFired):
* platform/mac/HIDGamepadProvider.cpp:
(WebCore::HIDGamepadProvider::connectionDelayTimerFired):
(WebCore::HIDGamepadProvider::inputNotificationTimerFired):
* platform/mac/HIDGamepadProvider.h:
* platform/mac/ScrollAnimatorMac.h:
* platform/mac/ScrollAnimatorMac.mm:
(WebCore::ScrollAnimatorMac::snapRubberBandTimerFired):
(WebCore::ScrollAnimatorMac::initialScrollbarPaintTimerFired):
(WebCore::ScrollAnimatorMac::sendContentAreaScrolledTimerFired):
* platform/mock/DeviceMotionClientMock.cpp:
(WebCore::DeviceMotionClientMock::timerFired):
* platform/mock/DeviceMotionClientMock.h:
* platform/mock/DeviceOrientationClientMock.cpp:
(WebCore::DeviceOrientationClientMock::timerFired):
* platform/mock/DeviceOrientationClientMock.h:
* platform/mock/GeolocationClientMock.cpp:
(WebCore::GeolocationClientMock::permissionTimerFired):
(WebCore::GeolocationClientMock::controllerTimerFired):
* platform/mock/GeolocationClientMock.h:
* platform/mock/PlatformSpeechSynthesizerMock.cpp:
(WebCore::PlatformSpeechSynthesizerMock::speakingFinished):
* platform/mock/PlatformSpeechSynthesizerMock.h:
* platform/mock/TimerEventBasedMock.h:
(WebCore::TimerEvent::timerFired):
* platform/network/DNSResolveQueue.cpp:
(WebCore::DNSResolveQueue::timerFired):
* platform/network/DNSResolveQueue.h:
* platform/network/NetworkStateNotifier.h:
* platform/network/ResourceHandle.cpp:
(WebCore::ResourceHandle::failureTimerFired):
* platform/network/ResourceHandle.h:
* platform/network/ResourceHandleInternal.h:
* platform/network/curl/ResourceHandleManager.cpp:
(WebCore::ResourceHandleManager::downloadTimerCallback):
* platform/network/curl/ResourceHandleManager.h:
* platform/network/mac/NetworkStateNotifierMac.cpp:
(WebCore::NetworkStateNotifier::networkStateChangeTimerFired):
* platform/network/win/ResourceHandleWin.cpp:
(WebCore::ResourceHandle::fileLoadTimer):
* plugins/PluginPackage.cpp:
(WebCore::PluginPackage::freeLibraryTimerFired):
* plugins/PluginPackage.h:
* plugins/PluginStream.cpp:
(WebCore::PluginStream::delayDeliveryTimerFired):
* plugins/PluginStream.h:
* plugins/PluginView.cpp:
(WebCore::PluginView::popPopupsStateTimerFired):
(WebCore::PluginView::requestTimerFired):
(WebCore::PluginView::invalidateTimerFired):
(WebCore::PluginView::lifeSupportTimerFired):
* plugins/PluginView.h:
* plugins/win/PluginMessageThrottlerWin.cpp:
(WebCore::PluginMessageThrottlerWin::messageThrottleTimerFired):
* plugins/win/PluginMessageThrottlerWin.h:
* rendering/ImageQualityController.cpp:
(WebCore::ImageQualityController::highQualityRepaintTimerFired):
* rendering/ImageQualityController.h:
* rendering/RenderButton.cpp:
(WebCore::RenderButton::styleDidChange):
(WebCore::RenderButton::timerFired):
* rendering/RenderButton.h:
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::updateCompositingLayersTimerFired):
(WebCore::RenderLayerCompositor::layerFlushTimerFired):
(WebCore::RenderLayerCompositor::paintRelatedMilestonesTimerFired):
* rendering/RenderLayerCompositor.h:
* rendering/RenderMarquee.cpp:
(WebCore::RenderMarquee::timerFired):
* rendering/RenderMarquee.h:
* rendering/RenderNamedFlowThread.cpp:
(WebCore::RenderNamedFlowThread::regionOversetChangeEventTimerFired):
* rendering/RenderNamedFlowThread.h:
* rendering/RenderProgress.cpp:
(WebCore::RenderProgress::animationTimerFired):
* rendering/RenderProgress.h:
* rendering/RenderView.cpp:
(WebCore::RenderView::lazyRepaintTimerFired):
* rendering/RenderView.h:
* replay/EventLoopInputDispatcher.cpp:
(WebCore::EventLoopInputDispatcher::timerFired):
* replay/EventLoopInputDispatcher.h:
* storage/StorageAreaImpl.cpp:
(WebCore::StorageAreaImpl::closeDatabaseTimerFired):
* storage/StorageAreaImpl.h:
* storage/StorageAreaSync.cpp:
(WebCore::StorageAreaSync::syncTimerFired):
* storage/StorageAreaSync.h:
* svg/SVGElement.cpp:
(WebCore::SVGElement::svgLoadEventTimerFired):
(WebCore::SVGElement::svgLoadEventTimer):
* svg/SVGElement.h:
* svg/SVGScriptElement.h:
* svg/SVGStyleElement.h:
* svg/SVGUseElement.h:
* svg/animation/SMILTimeContainer.cpp:
(WebCore::SMILTimeContainer::timerFired):
* svg/animation/SMILTimeContainer.h:
* xml/XMLHttpRequestProgressEventThrottle.cpp:
(WebCore::XMLHttpRequestProgressEventThrottle::dispatchDeferredEvents):
* xml/XMLHttpRequestProgressEventThrottle.h:

Source/WebKit/mac:

Remove template specifiers from Timer.

* Plugins/Hosted/NetscapePluginInstanceProxy.h:
* Plugins/Hosted/NetscapePluginInstanceProxy.mm:
(WebKit::NetscapePluginInstanceProxy::requestTimerFired):
* Plugins/WebNetscapePluginStream.h:
* Plugins/WebNetscapePluginStream.mm:
(WebNetscapePluginStream::deliverDataTimerFired):

Source/WebKit/win:

* FullscreenVideoController.cpp:
(FullscreenVideoController::timerFired):
* FullscreenVideoController.h:

Source/WebKit2:

Remove template specifiers from Timer.

* NetworkProcess/NetworkResourceLoader.cpp:
(WebKit::NetworkResourceLoader::bufferingTimerFired):
* NetworkProcess/NetworkResourceLoader.h:
* Shared/WebMemorySampler.cpp:
(WebKit::WebMemorySampler::sampleTimerFired):
(WebKit::WebMemorySampler::stopTimerFired):
* Shared/WebMemorySampler.h:
* Shared/mac/RemoteLayerBackingStoreCollection.h:
* Shared/mac/RemoteLayerBackingStoreCollection.mm:
(WebKit::RemoteLayerBackingStoreCollection::volatilityTimerFired):
* UIProcess/API/efl/EwkView.cpp:
(EwkView::displayTimerFired):
* UIProcess/API/efl/EwkView.h:
* UIProcess/efl/TextCheckerClientEfl.cpp:
(TextCheckerClientEfl::languagesUpdateTimerFired):
(TextCheckerClientEfl::spellCheckingSettingChangeTimerFired):
* UIProcess/efl/TextCheckerClientEfl.h:
* WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
(WebKit::CoordinatedLayerTreeHost::layerFlushTimerFired):
* WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h:
* WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
* WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
(WebKit::RemoteLayerTreeDrawingArea::layerFlushTimerFired):
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::processSuspensionCleanupTimerFired):
(WebKit::WebProcess::nonVisibleProcessCleanupTimerFired):
* WebProcess/WebProcess.h:

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

6 years agoDon't send identifierForInitialRequest callback method for request with DoNotSendCall...
commit-queue@webkit.org [Thu, 6 Nov 2014 22:51:34 +0000 (22:51 +0000)]
Don't send identifierForInitialRequest callback method for request with DoNotSendCallbacks option.
https://bugs.webkit.org/show_bug.cgi?id=138473

The iOS specific code that sets up a valid m_identifier is not needed any more, since this
will be done later in ResourceLoader::willSendRequest. This also matches the behavior that
we don't call assignIdentifierToInitialRequest callback method if the reqeust has
DoNotSendCallbacks option.

Patch by Yongjun Zhang <yongjun_zhang@apple.com> on 2014-11-06
Reviewed by Pratik Solanki.

* loader/ResourceLoader.cpp:
(WebCore::ResourceLoader::willSendRequest): Remove iOS specific block for setting up a valid
    m_identifier. In iOS, also make sure we still bail out if the resource loader was stopped
    in assignIdentifierToInitialRequest callback by a client.

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

6 years agoRemove code that prepends a leading 'r' to the first argument of _run_git_svn_find_rev
matthew_hanson@apple.com [Thu, 6 Nov 2014 22:41:31 +0000 (22:41 +0000)]
Remove code that prepends a leading 'r' to the first argument of _run_git_svn_find_rev
https://bugs.webkit.org/show_bug.cgi?id=138475

Reviewed by Ryosuke Niwa.

The change in https://trac.webkit.org/175603 introduced broke compatibility with svn_revision_from_git_commit.
This patch reverts the part of that change that broke compatibility. In addition, this patch adds a comment to
explain that SVN revisions require a leading 'r', moves an existing comment to a more appropriate location and
renames the positional argument to better reflect that it can represent either an SVN revision or a Git tree-ish.

* Scripts/webkitpy/common/checkout/scm/git.py:
(Git._run_git_svn_find_rev):
Add comment mentioning that svn_revisions need to begin with 'r'.
Move comment (explaining that git svn find-rev exits with code 0 when no match is found) to a more appropriate location.
Rename the argument 'revision' to 'revision_or_treeish' to reflect the dual form that argument can take.
Remove code that coerced the revision/treeish into a string and prepended an 'r'.

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

6 years ago[filters2] Support for backdrop-filter
dino@apple.com [Thu, 6 Nov 2014 22:23:16 +0000 (22:23 +0000)]
[filters2] Support for backdrop-filter
https://bugs.webkit.org/show_bug.cgi?id=138384
<rdar://problem/18874494>

Reviewed by Simon Fraser.

Take 2!! Previous patch was rolled out.

Source/WebCore:

Add prototype support for backdrop-filter
http://dev.w3.org/fxtf/filters-2/#BackdropFilterProperty

This adds support for parsing the new CSS property, adding
the value to RenderStyle, noticing that on the layer tree,
and the platform code in GraphicsLayer to render a backdrop
and apply an effect to the result.

Some things are missing:
- animation of the backdrop-filter is not yet supported
- backdrops will not work in cloned layers yet (e.g. reflections)

Tests: css3/filters/backdrop/backdropfilter-property-computed-style.html
       css3/filters/backdrop/backdropfilter-property-parsing-invalid.html
       css3/filters/backdrop/backdropfilter-property-parsing.html
       css3/filters/backdrop/backdropfilter-property.html
       css3/filters/backdrop/effect-hw.html

* WebCore.exp.in: Export the setBackdropFilters method so it can
be used from WebKit.

* css/CSSComputedStyleDeclaration.cpp: New property name.
(WebCore::isLayoutDependent):
(WebCore::ComputedStyleExtractor::propertyValue): Use the existing valueForFilter method.

* css/CSSParser.cpp:
(WebCore::CSSParser::parseValue): Piggyback on the filter parser.

* css/CSSPropertyNames.in: Add -webkit-backdrop-filter.

* css/StyleResolver.cpp:
(WebCore::StyleResolver::adjustRenderStyle): Add test for backdrop.
(WebCore::StyleResolver::applyProperty): Support new property.

* platform/graphics/GraphicsLayer.h:
(WebCore::GraphicsLayer::needsBackdrop): New method to test for existence of values.
(WebCore::GraphicsLayer::backdropFilters): Keeps the list of filters.
(WebCore::GraphicsLayer::setBackdropFilters):
(WebCore::GraphicsLayer::clearBackdropFilters):

* platform/graphics/ca/GraphicsLayerCA.cpp: This adds a new m_backdropLayer CALayer
that will sit behind the contents layer and provide the element's backdrop.
(WebCore::GraphicsLayerCA::willBeDestroyed):
(WebCore::GraphicsLayerCA::moveOrCopyAnimations):
(WebCore::GraphicsLayerCA::setBackdropFilters): Set a custom appearance so
remote layer hosts will notice the special layer. Also set the actual
layer properties.
(WebCore::GraphicsLayerCA::addAnimation): Remove whitespace.
(WebCore::GraphicsLayerCA::commitLayerChangesBeforeSublayers): Update backdrop if necessary.
(WebCore::GraphicsLayerCA::updateLayerNames): Give the new layer a name.
(WebCore::GraphicsLayerCA::updateSublayerList):
(WebCore::GraphicsLayerCA::updateGeometry): Make the backdrop layer match the contents
layer geometry.
(WebCore::GraphicsLayerCA::updateBackdropFilters): Create the backdrop layer if necessary,
and copy the filter values to any clones.
(WebCore::GraphicsLayerCA::ensureStructuralLayer): We need a structural layer if we
have backdrop filters.
(WebCore::GraphicsLayerCA::structuralLayerPurpose):
(WebCore::GraphicsLayerCA::createAnimationFromKeyframes):
(WebCore::GraphicsLayerCA::swapFromOrToTiledLayer):
* platform/graphics/ca/GraphicsLayerCA.h: New StructuralLayerPurpose, new LayerChangeFlag.

* platform/graphics/ca/PlatformCALayer.h: New LayerType.

* platform/graphics/ca/mac/PlatformCALayerMac.mm: Define CABackdropLayer.
(PlatformCALayerMac::PlatformCALayerMac): Create the correct CALayer type.

* rendering/RenderElement.h:
(WebCore::RenderElement::createsGroup):
(WebCore::RenderElement::hasBackdropFilter): This method is always around, but
only can return true when FILTERS_LEVEL_2 is enabled.

* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::paintsWithFilters): Remove an unnecessary comment.
(WebCore::RenderLayer::calculateClipRects):

* rendering/RenderLayer.h: Add hasBackdropFilter.

* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::RenderLayerBacking):
(WebCore::RenderLayerBacking::createPrimaryGraphicsLayer): Update the backdrop filters.
(WebCore::RenderLayerBacking::updateBackdropFilters): Set the filters on the GraphicsLayer.
(WebCore::RenderLayerBacking::updateGeometry):
* rendering/RenderLayerBacking.h:

* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::requiresOwnBackingStore): Needs backingstore if it has a backdrop filter.
(WebCore::RenderLayerCompositor::reasonsForCompositing):
(WebCore::RenderLayerCompositor::requiresCompositingForFilters): Return early if we have
a backdrop filter, because currently we absolutely require compositing.

* rendering/RenderLayerModelObject.cpp:
(WebCore::RenderLayerModelObject::styleWillChange): Add hasBackdropFilter().

* rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::changeRequiresLayout): Check backdrops for change.

* rendering/style/RenderStyle.h: Add the backdropFilter style stuff.
* rendering/style/StyleRareNonInheritedData.cpp:
(WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
(WebCore::StyleRareNonInheritedData::operator==):
(WebCore::StyleRareNonInheritedData::hasBackdropFilters):
* rendering/style/StyleRareNonInheritedData.h:

Source/WebKit2:

* Shared/mac/RemoteLayerBackingStore.mm:
(WebKit::RemoteLayerBackingStore::drawInContext): Handle LayerTypeBackdropLayer in the switch.
* Shared/mac/RemoteLayerTreeTransaction.mm:
(WebKit::RemoteLayerTreeTransaction::description): Describe a backdrop layer.
* UIProcess/ios/RemoteLayerTreeHostIOS.mm:
(+[WKBackdropView layerClass]): Define CABackdropLayer and use it as the class.
(WebKit::RemoteLayerTreeHost::createLayer):
* UIProcess/mac/RemoteLayerTreeHost.mm: Ditto.
(WebKit::RemoteLayerTreeHost::createLayer):

LayoutTests:

Tests for backdrop-filter. These are skipped on non-Apple platforms.

* platform/win/TestExpections: Skip these tests.
* platform/efl/TestExpections:
* platform/gtk/TestExpections:
* platform/mac-mavericks/TestExpectations: Yosemite only.

* css3/filters/backdrop/backdropfilter-property-computed-style-expected.txt: Added.
* css3/filters/backdrop/backdropfilter-property-computed-style.html: Added.
* css3/filters/backdrop/backdropfilter-property-expected.txt: Added.
* css3/filters/backdrop/backdropfilter-property-parsing-expected.txt: Added.
* css3/filters/backdrop/backdropfilter-property-parsing-invalid-expected.txt: Added.
* css3/filters/backdrop/backdropfilter-property-parsing-invalid.html: Added.
* css3/filters/backdrop/backdropfilter-property-parsing.html: Added.
* css3/filters/backdrop/backdropfilter-property.html: Added.
* css3/filters/backdrop/effect-hw-expected.html: Added.
* css3/filters/backdrop/effect-hw.html: Added.
* css3/filters/backdrop/script-tests/backdropfilter-property-computed-style.js: Added.
(testComputedFilterRule):
* css3/filters/backdrop/script-tests/backdropfilter-property-parsing-invalid.js: Added.
(testInvalidFilterRule):
* css3/filters/backdrop/script-tests/backdropfilter-property-parsing.js: Added.
(jsWrapperClass):
(shouldBeType):
(testFilterRule):
* css3/filters/backdrop/script-tests/backdropfilter-property.js: Added.

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

6 years agoGive pseudo elements the correct specificity
benjamin@webkit.org [Thu, 6 Nov 2014 22:07:19 +0000 (22:07 +0000)]
Give pseudo elements the correct specificity
https://bugs.webkit.org/show_bug.cgi?id=138378

Patch by Benjamin Poulain <bpoulain@apple.com> on 2014-11-06
Reviewed by Dean Jackson.

Source/WebCore:

WebKit had an old silly bug where pseudo elements were given specificity in the class B
instead of the class C.

Now that the inspector shows the specificity, this bug is much more visible which is why
I fix it now.

Test: fast/css/pseudo-element-specificity.html

* css/CSSSelector.cpp:
(WebCore::CSSSelector::specificityForOneSelector):
Give pseudo-elements the right specificity.

* Modules/mediacontrols/mediaControlsApple.css:
(video::-webkit-media-controls-volume-slider):
(audio::-webkit-media-controls-volume-slider::-webkit-slider-thumb):
(audio::-webkit-media-controls-volume-slider::-webkit-slider-thumb:active::-webkit-slider-thumb):
(audio::-webkit-media-controls-timeline):
(audio::-webkit-media-controls-timeline::-webkit-slider-thumb):
(audio::-webkit-media-controls-timeline:active::-webkit-slider-thumb,):
(video:-webkit-full-screen::-webkit-media-controls-volume-slider):
(video:-webkit-full-screen::-webkit-media-controls-volume-slider::-webkit-slider-thumb):
* Modules/mediacontrols/mediaControlsBase.css:
(video::-webkit-media-controls-volume-slider):
(audio::-webkit-media-controls-volume-slider::-webkit-slider-thumb):
(audio::-webkit-media-controls-volume-slider::-webkit-slider-thumb:active::-webkit-slider-thumb):
(audio::-webkit-media-controls-timeline):
(audio::-webkit-media-controls-timeline::-webkit-slider-thumb):
(audio::-webkit-media-controls-timeline:active::-webkit-slider-thumb,):
(video:-webkit-full-screen::-webkit-media-controls-volume-slider):
(video:-webkit-full-screen::-webkit-media-controls-volume-slider::-webkit-slider-thumb):
* css/mediaControls.css:
(audio::-webkit-media-controls-volume-slider, video::-webkit-media-controls-volume-slider):
(audio::-webkit-media-controls-volume-slider-mute-button, video::-webkit-media-controls-volume-slider-mute-button):
* css/mediaControlsGtk.css:
(audio::-webkit-media-controls-timeline, video::-webkit-media-controls-timeline):
(audio::-webkit-media-controls-timeline[disabled], video::-webkit-media-controls-timeline[disabled]):
(audio::-webkit-media-controls-volume-slider, video::-webkit-media-controls-volume-slider):
The media controls were relying on the bug to override the style of input[type=range].

Ideally we should either:
-Implement some kind of high level style isolation (e.g. CSS Scoping).
-Fix the media control tree to use regular CSS scoped by a shadow pseudo ID.

Until we have one of those, I just fixed the styling by forcing the properties with lower
specificity with !important.

LayoutTests:

* fast/css/pseudo-element-specificity-expected.html: Added.
* fast/css/pseudo-element-specificity.html: Added.
Given that all selector affecting the pseudo element were offset by one,
it is impossible to use a pseudo element directly to affect the order, making the bug
hard to test.

What I did here for testing is use the stauration at 255 of any specificity field.
With 255 class + 1 pseudo element, the old code would saturate at (0, 255, 0), while
the fixed code would correctly give (0, 255, 1). By comparing that to a non-saturated
selector, I can show the fix is correct.

* inspector/css/selector-specificity-expected.txt:

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

6 years agoData detectors popover points at the first line of the detected item
timothy_horton@apple.com [Thu, 6 Nov 2014 21:35:11 +0000 (21:35 +0000)]
Data detectors popover points at the first line of the detected item
https://bugs.webkit.org/show_bug.cgi?id=138471
<rdar://problem/18893079>

Reviewed by Sam Weinig.

* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::scanForDataDetectedItems):
Determine the bounding box of all quads of the detected item's text.
This way, the popover will point at the border of the item, instead of
right at the very first line.

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

6 years agoPreview views often misplaced inside popover
bdakin@apple.com [Thu, 6 Nov 2014 21:03:36 +0000 (21:03 +0000)]
Preview views often misplaced inside popover
https://bugs.webkit.org/show_bug.cgi?id=138472

Reviewed by Tim Horton.

Source/WebCore:

* WebCore.exp.in:

Source/WebKit2:

This patch makes the popover maintain aspect ratio, and it uses the final scale of
that popover to scale the preview view as well.

* UIProcess/mac/WKActionMenuController.mm:
(-[WKPagePreviewViewController initWithPageURL:mainViewSize:popoverToViewScale:]):
(-[WKPagePreviewViewController loadView]):
(-[WKActionMenuController _createPreviewPopoverForURL:originRect:]):
(-[WKActionMenuController _targetSize:fitsInAvailableSpace:]):
(-[WKActionMenuController _preferredSizeForPopoverPresentedFromOriginRect:]):
(-[WKPagePreviewViewController initWithPageURL:]): Deleted.

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

6 years agoinspector-protocol/debugger/setPauseOnExceptions-uncaught.html frequently times out...
ap@apple.com [Thu, 6 Nov 2014 20:03:52 +0000 (20:03 +0000)]
inspector-protocol/debugger/setPauseOnExceptions-uncaught.html frequently times out on Yosemite
https://bugs.webkit.org/show_bug.cgi?id=138097

* platform/mac-wk2/TestExpectations: Marking it as such.

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

6 years agoREGRESSION (r174985-174986): Site display disappears
msaboff@apple.com [Thu, 6 Nov 2014 19:47:17 +0000 (19:47 +0000)]
REGRESSION (r174985-174986): Site display disappears
https://bugs.webkit.org/show_bug.cgi?id=138082

Reviewed by Geoffrey Garen.

Source/JavaScriptCore:

In support of the change in WebCore, this adds a new functor class to unwind to our
caller's frame possibly skipping of intermediate C++ frames.

* interpreter/StackVisitor.h:
(JSC::CallerFunctor::CallerFunctor):
(JSC::CallerFunctor::callerFrame):
(JSC::CallerFunctor::operator()):

Source/WebCore:

This effectively reverts to the behavior before r174985 by using the
lexical global object of the caller's frame to find the active document.
Before r174985, native functions are invoked with the ScopeShain of their
caller.  The lexical global object is accessed from the ScopeChain.

* bindings/js/JSHTMLDocumentCustom.cpp:
(WebCore::JSHTMLDocument::getOwnPropertySlot):
(WebCore::findOwningDocument):
(WebCore::documentWrite):
(WebCore::JSHTMLDocument::write):
(WebCore::JSHTMLDocument::writeln):
* html/HTMLDocument.idl:

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

6 years agoTextIndicatorWindow's bounce animation is lopsided when indicating two short lines...
timothy_horton@apple.com [Thu, 6 Nov 2014 19:38:51 +0000 (19:38 +0000)]
TextIndicatorWindow's bounce animation is lopsided when indicating two short lines of text
https://bugs.webkit.org/show_bug.cgi?id=138458

Reviewed by Simon Fraser.

Previously, the TextIndicator's frame() covered the entire selection highlight bounds.
This was undesirable in cases where the highlight included areas far outside the
bounds of the selected text, as the TextIndicatorWindow's 'bounce' animation
would be misaligned (centered on the highlight instead of on the text).

* Shared/TextIndicator.cpp:
Get rid of the many-argument TextIndicator::create, because it was only used
internally, and have createWithSelectionInFrame make a ::Data instead.

(WebKit::TextIndicator::createWithSelectionInFrame):
Compute and store the bounding rect of all of the selected text rects, and store
all of the text rects relative to that bounding rect instead of relative to the
selection highlight bounds. We do this because the selection highlight bounds
often includes area which is far outside of the text bounds (in the case of a
selection that spans multiple lines), and causes the text indicator bounce
animation to bounce in a lopsided manner.

(WebKit::TextIndicator::TextIndicator):
Adjust to the rename of textRectsInSelectionRectCoordinates -> textRectsInBoundingRectCoordinates.

(WebKit::TextIndicator::frameRect):
Instead of the TextIndicator's frame being the selection highlight bounds,
it is now the bounds of all of the text rects.

(WebKit::TextIndicator::draw):
Translate into the image by the difference between the selection highlight bounds
and the text bounding rect. This is necessary because the content image is still generated
covering the entire selection highlight bounds, but the text rects are in text-rect-bounds coordinates.

(WebKit::TextIndicator::Data::encode):
(WebKit::TextIndicator::Data::decode):
Adjust to the rename of textRectsInSelectionRectCoordinates -> textRectsInBoundingRectCoordinates.
Encode/decode textBoundingRectInWindowCoordinates.

* Shared/TextIndicator.h:
(WebKit::TextIndicator::contentImage): Deleted.
Get rid of an unnecessary getter and constructor.

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

6 years agoOnly provide a single result to the action menu DDActionContext
timothy_horton@apple.com [Thu, 6 Nov 2014 19:04:02 +0000 (19:04 +0000)]
Only provide a single result to the action menu DDActionContext
https://bugs.webkit.org/show_bug.cgi?id=138469
<rdar://problem/18869036>

Reviewed by Anders Carlsson.

* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::scanForDataDetectedItems):
Only provide one result; secondary results can be extremely unrelated to
the primary one and confuse Data Detectors further down the line.

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

6 years agoNull deref in rangeForDictionaryLookupAtHitTestResult on occasion
timothy_horton@apple.com [Thu, 6 Nov 2014 18:58:33 +0000 (18:58 +0000)]
Null deref in rangeForDictionaryLookupAtHitTestResult on occasion
https://bugs.webkit.org/show_bug.cgi?id=138459
<rdar://problem/18872825>

Reviewed by Andreas Kling.

* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::rangeForDictionaryLookupAtHitTestResult):
rangeExpandedAroundPositionByCharacters can return null.

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

6 years agoPrefer link action menus over images
timothy_horton@apple.com [Thu, 6 Nov 2014 18:57:04 +0000 (18:57 +0000)]
Prefer link action menus over images
https://bugs.webkit.org/show_bug.cgi?id=138461
<rdar://problem/18768377>

Reviewed by Anders Carlsson.

* UIProcess/mac/WKActionMenuController.mm:
(-[WKActionMenuController _defaultMenuItems:]):
Swap the priority of links and images.

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

6 years agoUse std::unique_ptr for TileController
weinig@apple.com [Thu, 6 Nov 2014 18:46:51 +0000 (18:46 +0000)]
Use std::unique_ptr for TileController
https://bugs.webkit.org/show_bug.cgi?id=138429

Reviewed by Anders Carlsson.

Source/WebCore:

* WebCore.exp.in:
* platform/graphics/ca/TileController.cpp:
(WebCore::TileController::create): Deleted.
* platform/graphics/ca/TileController.h:
* platform/graphics/ca/mac/WebTiledBackingLayer.h:
* platform/graphics/ca/mac/WebTiledBackingLayer.mm:
(-[WebTiledBackingLayer createTileController:]):
* platform/graphics/ca/win/PlatformCALayerWinInternal.cpp:
(PlatformCALayerWinInternal::createTileController):
* platform/graphics/ca/win/PlatformCALayerWinInternal.h:

Source/WebKit2:

* WebProcess/WebPage/mac/PlatformCALayerRemoteTiledBacking.cpp:
(WebKit::PlatformCALayerRemoteTiledBacking::PlatformCALayerRemoteTiledBacking):
* WebProcess/WebPage/mac/PlatformCALayerRemoteTiledBacking.h:

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

6 years agoiOS build fix.
mitz@apple.com [Thu, 6 Nov 2014 18:05:07 +0000 (18:05 +0000)]
iOS build fix.

* WebProcess/Plugins/PluginController.h:

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

6 years ago[iOS] WebProcess needs to take a background task assertion to prevent being killed
dbates@webkit.org [Thu, 6 Nov 2014 16:40:28 +0000 (16:40 +0000)]
[iOS] WebProcess needs to take a background task assertion to prevent being killed
for "suspended with locked system files"
https://bugs.webkit.org/show_bug.cgi?id=138155
<rdar://problem/17939303>

Reviewed by Anders Carlsson.

Mitigates an issue where the WebProcess may be killed when suspended holding locked files
by allowing the WebProcess to notify the UIProcess when it is holding such files so that
both can continue to run for a period of time after the UIProcess transitions to the
background. In particular, the WebProcess notifies the UIProcess that it is holding- or
relinquished- a locked file when it begins and ends a sequence of SQLite transactions,
respectively.

* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::disconnect): Relinquish an existing background task assertion
when the WebProcess disconnects. Among other situations, the WebProcess may disconnect as
a result of being suspended holding locked files even when the UIProcess requested a
background task assertion (i.e. it may have exceeded its background time limit).
(WebKit::WebProcessProxy::setIsHoldingLockedFiles): Added. Either acquires a new background
task assertion or relinquishes an existing one.
* UIProcess/WebProcessProxy.h:
* UIProcess/WebProcessProxy.messages.in: Added message SetIsHoldingLockedFiles(bool). The WebProcess
dispatches this message to inform the UIProcess that it is holding- or relinquished- a locked file.
* WebKit2.xcodeproj/project.pbxproj: Added files WebSQLiteDatabaseTracker.{cpp, h}.
* WebProcess/WebCoreSupport/WebSQLiteDatabaseTracker.cpp: Added.
(WebKit::WebSQLiteDatabaseTracker::supplementName): Added.
(WebKit::WebSQLiteDatabaseTracker::WebSQLiteDatabaseTracker): Added.
(WebKit::WebSQLiteDatabaseTracker::initialize): Register to receive SQLiteDatabaseTrackerClient callbacks.
(WebKit::WebSQLiteDatabaseTracker::willBeginFirstTransaction): Inform the HysteresisActivity object on
the main thread that we began a transaction so that it calls WebSQLiteDatabaseTracker::started().
(WebKit::WebSQLiteDatabaseTracker::didFinishLastTransaction): Inform the HysteresisActivity object on
the main thread that we finished a transaction so that it may eventually call WebSQLiteDatabaseTracker::stopped().
(WebKit::WebSQLiteDatabaseTracker::started): Notify the UIProcess that the WebProcess is holding
a locked file.
(WebKit::WebSQLiteDatabaseTracker::stopped): Notify the UIProcess that the WebProcess has
relinquished the locked file.
* WebProcess/WebCoreSupport/WebSQLiteDatabaseTracker.h: Added. We use a HysteresisActivity object
to coalesce SetIsHoldingLockedFiles(false) messages as an optimization to minimize the number of
messages exchanged between the UIProcess and WebProcess when a web page performs SQLite transactions
in batches.
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::WebProcess): Instantiate the supplement WebSQLiteDatabaseTracker when building
for iOS.

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

6 years agoUse lambda functions in DocumentOrderedMap
cdumez@apple.com [Thu, 6 Nov 2014 16:00:24 +0000 (16:00 +0000)]
Use lambda functions in DocumentOrderedMap
https://bugs.webkit.org/show_bug.cgi?id=138376

Reviewed by Darin Adler.

Use lambda functions in DocumentOrderedMap instead of separate named
functions.

No new tests, no behavior change.

* dom/DocumentOrderedMap.cpp:
(WebCore::DocumentOrderedMap::get):
(WebCore::DocumentOrderedMap::getElementById):
(WebCore::DocumentOrderedMap::getElementByName):
(WebCore::DocumentOrderedMap::getElementByMapName):
(WebCore::DocumentOrderedMap::getElementByLowercasedMapName):
(WebCore::DocumentOrderedMap::getElementByLowercasedUsemap):
(WebCore::DocumentOrderedMap::getElementByLabelForAttribute):
(WebCore::DocumentOrderedMap::getElementByWindowNamedItem):
(WebCore::DocumentOrderedMap::getElementByDocumentNamedItem):
(WebCore::DocumentOrderedMap::getAllElementsById):
(WebCore::keyMatchesId): Deleted.
(WebCore::keyMatchesName): Deleted.
(WebCore::keyMatchesMapName): Deleted.
(WebCore::keyMatchesLowercasedMapName): Deleted.
(WebCore::keyMatchesLowercasedUsemap): Deleted.
(WebCore::keyMatchesLabelForAttribute): Deleted.
(WebCore::keyMatchesWindowNamedItem): Deleted.
(WebCore::keyMatchesDocumentNamedItem): Deleted.
* dom/DocumentOrderedMap.h:

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

6 years ago[GTK] [Stable] webkitgtk 2.6.1 fails to load flashplugin
berto@igalia.com [Thu, 6 Nov 2014 15:46:34 +0000 (15:46 +0000)]
[GTK] [Stable] webkitgtk 2.6.1 fails to load flashplugin
https://bugs.webkit.org/show_bug.cgi?id=137849

Reviewed by Carlos Garcia Campos.

NPPVpluginNeedsXEmbed is a boolean value, so it should normally
use an NPBool (1 byte). However some plugins (the Flash player in
particular) are using an int instead, so we have to do it as well
else we'll end up corrupting the stack.

* WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp:
(WebKit::NetscapePlugin::platformPostInitialize):

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

6 years agoUpdate testharness.js to the latest version
bjonesbe@adobe.com [Thu, 6 Nov 2014 15:22:15 +0000 (15:22 +0000)]
Update testharness.js to the latest version
https://bugs.webkit.org/show_bug.cgi?id=138446

Reviewed by Ryosuke Niwa.

The only change I've made from upstream is to set output to false by
default.

* resources/testharness.js:

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

6 years ago[GTK] Add context menu API to Web Process Extensions
carlosgc@webkit.org [Thu, 6 Nov 2014 15:08:07 +0000 (15:08 +0000)]
[GTK] Add context menu API to Web Process Extensions
https://bugs.webkit.org/show_bug.cgi?id=138311

Reviewed by Gustavo Noronha Silva.

Source/WebKit2:

Add WebKitWebPage::context-menu signal, similar to the
WebKitWebView one, but that receives a WebKitWebHitTestResult, a
class that extends WebKitTestResult to provide the WebKitDOMNode
from the Web Process Extensions API. This makes WebKitContextMenu,
WebKitContextMenuItem and WebKitTestResult classes shared between
UI and Web Extensions APIs. In addition to be able to customize
the context menu, it also provides API to set user data, as a
GVariant, in the Web Process that is sent to the UI Process.

* PlatformGTK.cmake: Add new files.
* UIProcess/API/gtk/WebKitContextMenu.cpp:
(webkit_context_menu_set_user_data): Add user data to the context
menu as a GVariant.
(webkit_context_menu_get_user_data): Get the user data previously
set with webkit_context_menu_set_user_data() either from the Web
or UI processes.
* UIProcess/API/gtk/WebKitContextMenu.h:
* UIProcess/API/gtk/WebKitContextMenuActions.h:
* UIProcess/API/gtk/WebKitContextMenuClient.cpp:
(getContextMenuFromProposedMenu): Convert the received user data
into a GVariant and pass it to webkitWebViewPopulateContextMenu().
* UIProcess/API/gtk/WebKitContextMenuItem.h:
* UIProcess/API/gtk/WebKitForwardDeclarations.h:
* UIProcess/API/gtk/WebKitHitTestResult.h:
* UIProcess/API/gtk/WebKitWebView.cpp:
(webkitWebViewPopulateContextMenu): Set the user data received
from the Web Process to the WebKitContextMenu before emitting
WebKitWebView::context-menu.
* UIProcess/API/gtk/WebKitWebViewPrivate.h:
* UIProcess/API/gtk/docs/webkit2gtk-docs.sgml: Add new section for WebKitWebHitTestResult.
* UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Add new symbols.
* UIProcess/API/gtk/docs/webkit2gtk.types: Add webkit_web_hit_test_result_get_type.
* WebProcess/InjectedBundle/API/gtk/WebKitWebHitTestResult.cpp: Added.
(webkitWebHitTestResultGetProperty): Add getter for node property.
(webkitWebHitTestResultSetProperty): Add setter for node property.
(webkit_web_hit_test_result_class_init): Add node property.
(webkitWebHitTestResultCreate): Create a new
WebKitWebHitTestResult for the given InjectedBundleHitTestResult.
(webkit_web_hit_test_result_get_node): Return the WebKitDOMNode.
* WebProcess/InjectedBundle/API/gtk/WebKitWebHitTestResult.h: Added.
* WebProcess/InjectedBundle/API/gtk/WebKitWebHitTestResultPrivate.h: Added.
* WebProcess/InjectedBundle/API/gtk/WebKitWebPage.cpp:
(getContextMenuFromDefaultMenu): Build a WebKitContextMenu and
WebKitWebHitTestResult and emit WebKitWebPage::context-menu signal.
(webkit_web_page_class_init): Add WebKitWebPage::context-menu signal.
(webkitWebPageCreate): Add implementation for getContextMenuFromDefaultMenu.
* WebProcess/InjectedBundle/API/gtk/webkit-web-extension.h:

Tools:

Add tests cases for WebKitWebPage::context-menu signal.

* TestWebKitAPI/Tests/WebKit2Gtk/TestContextMenu.cpp:
(testContextMenuWebExtensionMenu):
(testContextMenuWebExtensionNode):
(beforeAll):
* TestWebKitAPI/Tests/WebKit2Gtk/WebExtensionTest.cpp:
(serializeContextMenu):
(serializeNode):
(contextMenuCallback):
(pageCreatedCallback):

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

6 years agoUnreviewed, rolling out r175690.
commit-queue@webkit.org [Thu, 6 Nov 2014 10:31:53 +0000 (10:31 +0000)]
Unreviewed, rolling out r175690.
https://bugs.webkit.org/show_bug.cgi?id=138460

We are not ready to run layout tests using the network process
yet (Requested by KaL on #webkit).

Reverted changeset:

"[GTK] Run layout tests using the network process"
https://bugs.webkit.org/show_bug.cgi?id=138428
http://trac.webkit.org/changeset/175690

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

6 years ago[EFL] Remove m_scrollPosition from CoordinatedGraphicsScene
ryuan.choi@gmail.com [Thu, 6 Nov 2014 10:08:54 +0000 (10:08 +0000)]
[EFL] Remove m_scrollPosition from CoordinatedGraphicsScene
https://bugs.webkit.org/show_bug.cgi?id=138419

Reviewed by Gyuyoung Kim.

m_scrollPosition of CoordinatedGraphicsScene is only to adjust the position
of fixed element. But this adjustment is only called by paintToCurrentGLContext()
and WebView can pass same information to the parameter of that method.

* UIProcess/CoordinatedGraphics/CoordinatedGraphicsScene.cpp:
(WebCore::CoordinatedGraphicsScene::paintToCurrentGLContext):
(WebCore::CoordinatedGraphicsScene::adjustPositionForFixedLayers):
(WebCore::CoordinatedGraphicsScene::setScrollPosition): Deleted.
* UIProcess/CoordinatedGraphics/CoordinatedGraphicsScene.h:
* UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.cpp:
(WebKit::CoordinatedLayerTreeHostProxy::setVisibleContentsRect):
* UIProcess/CoordinatedGraphics/WebView.cpp:
(WebKit::WebView::paintToCurrentGLContext):

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

6 years agoUse std::unique_ptr in CodeBlock class
gyuyoung.kim@samsung.com [Thu, 6 Nov 2014 08:50:38 +0000 (08:50 +0000)]
Use std::unique_ptr in CodeBlock class
https://bugs.webkit.org/show_bug.cgi?id=138395

Reviewed by Darin Adler.

* bytecode/CodeBlock.h: Use std::unique_ptr.
(JSC::CodeBlock::setJITCodeMap):
* jit/CompactJITCodeMap.h: Use std::unique_ptr instead of OwnPtr|PassOwnPtr.
(JSC::CompactJITCodeMap::CompactJITCodeMap):
(JSC::CompactJITCodeMap::Encoder::finish): Use std::unique_ptr instead of PassOwnPtr.

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

6 years ago[GTK] Run layout tests using the network process
carlosgc@webkit.org [Thu, 6 Nov 2014 08:47:38 +0000 (08:47 +0000)]
[GTK] Run layout tests using the network process
https://bugs.webkit.org/show_bug.cgi?id=138428

Reviewed by Martin Robinson.

Shared secondary process is the default in the GTK+ port, but we
should run the tests using the network process to ensure
everything works with the network process. In the future, the
shared secondary process model might be a special case of multiple
processes with 1 as maximum number of processes, but always using
the network process.

* WebKitTestRunner/TestController.cpp:
(WTR::TestController::initialize):

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

6 years agoUnreviewed, fix nits after r175688.
cdumez@apple.com [Thu, 6 Nov 2014 08:07:21 +0000 (08:07 +0000)]
Unreviewed, fix nits after r175688.

Just a couple of non-functional fixes to the layout test.

* fast/dom/Text/splitText.html:

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

6 years agosplitText API does not match DOM specification.
commit-queue@webkit.org [Thu, 6 Nov 2014 07:53:01 +0000 (07:53 +0000)]
splitText API does not match DOM specification.
https://bugs.webkit.org/show_bug.cgi?id=138405

Patch by Shivakumar JM <shiva.jm@samsung.com> on 2014-11-05
Reviewed by Chris Dumez.
Source/WebCore:

Make the offset argument for splitText API as mandatory (and thus throw if it is omitted) and stop throwing if the offset argument is
negative (and wraps to a valid index) as per specification: https://w3c.github.io/dom/#interface-text. Also This matches the behavior
of both Firefox 33 and Chrome 38.

Test: fast/dom/Text/splitText.html

* dom/Text.idl:

LayoutTests:

* fast/dom/Text/splitText-expected.txt: Added.
* fast/dom/Text/splitText.html: Added.
* fast/dom/non-numeric-values-numeric-parameters-expected.txt:
* fast/dom/script-tests/non-numeric-values-numeric-parameters.js:

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

6 years agoUnreviewed, rolling out r175672.
commit-queue@webkit.org [Thu, 6 Nov 2014 07:43:41 +0000 (07:43 +0000)]
Unreviewed, rolling out r175672.
https://bugs.webkit.org/show_bug.cgi?id=138455

Tries to make backdrop layers on every layer, asserts on
Mavericks (Requested by smfr on #webkit).

Reverted changeset:

"[filters2] Support for backdrop-filter"
https://bugs.webkit.org/show_bug.cgi?id=138384
http://trac.webkit.org/changeset/175672

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

6 years agoFigure out whether a plug-in is playing audio.
adachan@apple.com [Thu, 6 Nov 2014 07:21:54 +0000 (07:21 +0000)]
Figure out whether a plug-in is playing audio.
https://bugs.webkit.org/show_bug.cgi?id=137219

Reviewed by Anders Carlsson.

Source/WebCore:

Add NPPVpluginIsPlayingAudio. Export some WebCore methods that will be used in WebKit2.

No new tests, but manually tested with an example plugin.

* WebCore.exp.in:
* plugins/npapi.h:

Source/WebKit2:

Handle the setting of the NPPVpluginIsPlayingAudio variable.

* PluginProcess/PluginControllerProxy.cpp:
(WebKit::PluginControllerProxy::setPluginIsPlayingAudio):
Send a SetPluginIsPlayingAudio message to the WebProcess.
* PluginProcess/PluginControllerProxy.h:
* WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
(WebKit::NPN_SetValue):
Handle NPPVpluginIsPlayingAudio. Call NetscapePlugin::setIsPlayingAudio().
* WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
(WebKit::NetscapePlugin::setIsPlayingAudio):
Call PluginControllerProxy::setPluginIsPlayingAudio().
* WebProcess/Plugins/Netscape/NetscapePlugin.h:
* WebProcess/Plugins/PluginController.h:
* WebProcess/Plugins/PluginProxy.cpp:
(WebKit::PluginProxy::setPluginIsPlayingAudio):
Call PluginView::setPluginIsPlayingAudio().
* WebProcess/Plugins/PluginProxy.h:
* WebProcess/Plugins/PluginProxy.messages.in:
Add the SetPluginIsPlayingAudio message.
* WebProcess/Plugins/PluginView.cpp:
(WebKit::PluginView::PluginView):
Initialize m_pluginIsPlayingAudio.
(WebKit::PluginView::~PluginView):
Remove itself from the Document's list of AudioProducers.
(WebKit::PluginView::initializePlugin):
Add itself to the Document's list of AudioProducers.
(WebKit::PluginView::pageMutedStateDidChange):
Add a FIXME.
(WebKit::PluginView::setPluginIsPlayingAudio):
If m_pluginIsPlayingAudio has changed, tell the Document to update its audio playing state.
* WebProcess/Plugins/PluginView.h:
Now inherits AudioProducer.

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

6 years agoFix crash introduced in r175656
simon.fraser@apple.com [Thu, 6 Nov 2014 06:07:06 +0000 (06:07 +0000)]
Fix crash introduced in r175656
https://bugs.webkit.org/show_bug.cgi?id=138453

Reviewed by Dan Bernstein.

repaintContainer can be null sometimes.

Covered by existing tests.

* rendering/RenderLayerCompositor.cpp:
(WebCore::styleChangeRequiresLayerRebuild):

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

6 years agoSource/WebKit:
mitz@apple.com [Thu, 6 Nov 2014 06:03:01 +0000 (06:03 +0000)]
Source/WebKit:
Removed references to deletion UI resources that have been removed.

* WebKit.vcxproj/WebKit/WebKit.vcxproj:
* WebKit.vcxproj/WebKit/WebKit.vcxproj.filters:

Source/WebKit2:
Tried to fix the GTK build.

* PlatformGTK.cmake: Removed references to deletion UI resources that have been removed.

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

6 years agoTried to fix the Windows build after removing the deletion UI.
mitz@apple.com [Thu, 6 Nov 2014 05:59:43 +0000 (05:59 +0000)]
Tried to fix the Windows build after removing the deletion UI.

* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* editing/EditingAllInOne.cpp:

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

6 years ago[filters2] Support for backdrop-filter
dino@apple.com [Thu, 6 Nov 2014 05:50:50 +0000 (05:50 +0000)]
[filters2] Support for backdrop-filter
https://bugs.webkit.org/show_bug.cgi?id=138384
<rdar://problem/18874494>

Reviewed by Simon Fraser.

Source/WebCore:

Add prototype support for backdrop-filter
http://dev.w3.org/fxtf/filters-2/#BackdropFilterProperty

This adds support for parsing the new CSS property, adding
the value to RenderStyle, noticing that on the layer tree,
and the platform code in GraphicsLayer to render a backdrop
and apply an effect to the result.

Some things are missing:
- animation of the backdrop-filter is not yet supported
- backdrops will not work in cloned layers yet (e.g. reflections)

Tests: css3/filters/backdrop/backdropfilter-property-computed-style.html
       css3/filters/backdrop/backdropfilter-property-parsing-invalid.html
       css3/filters/backdrop/backdropfilter-property-parsing.html
       css3/filters/backdrop/backdropfilter-property.html
       css3/filters/backdrop/effect-hw.html

* WebCore.exp.in: Export the setBackdropFilters method so it can
be used from WebKit.

* css/CSSComputedStyleDeclaration.cpp: New property name.
(WebCore::isLayoutDependent):
(WebCore::ComputedStyleExtractor::propertyValue): Use the existing valueForFilter method.

* css/CSSParser.cpp:
(WebCore::CSSParser::parseValue): Piggyback on the filter parser.

* css/CSSPropertyNames.in: Add -webkit-backdrop-filter.

* css/StyleResolver.cpp:
(WebCore::StyleResolver::adjustRenderStyle): Add test for backdrop.
(WebCore::StyleResolver::applyProperty): Support new property.

* platform/graphics/GraphicsLayer.h:
(WebCore::GraphicsLayer::needsBackdrop): New method to test for existence of values.
(WebCore::GraphicsLayer::backdropFilters): Keeps the list of filters.
(WebCore::GraphicsLayer::setBackdropFilters):
(WebCore::GraphicsLayer::clearBackdropFilters):

* platform/graphics/ca/GraphicsLayerCA.cpp: This adds a new m_backdropLayer CALayer
that will sit behind the contents layer and provide the element's backdrop.
(WebCore::GraphicsLayerCA::willBeDestroyed):
(WebCore::GraphicsLayerCA::moveOrCopyAnimations):
(WebCore::GraphicsLayerCA::setBackdropFilters): Set a custom appearance so
remote layer hosts will notice the special layer. Also set the actual
layer properties.
(WebCore::GraphicsLayerCA::addAnimation): Remove whitespace.
(WebCore::GraphicsLayerCA::commitLayerChangesBeforeSublayers): Update backdrop if necessary.
(WebCore::GraphicsLayerCA::updateLayerNames): Give the new layer a name.
(WebCore::GraphicsLayerCA::updateSublayerList):
(WebCore::GraphicsLayerCA::updateGeometry): Make the backdrop layer match the contents
layer geometry.
(WebCore::GraphicsLayerCA::updateBackdropFilters): Create the backdrop layer if necessary,
and copy the filter values to any clones.
(WebCore::GraphicsLayerCA::ensureStructuralLayer): We need a structural layer if we
have backdrop filters.
(WebCore::GraphicsLayerCA::structuralLayerPurpose):
(WebCore::GraphicsLayerCA::createAnimationFromKeyframes):
(WebCore::GraphicsLayerCA::swapFromOrToTiledLayer):
* platform/graphics/ca/GraphicsLayerCA.h: New StructuralLayerPurpose, new LayerChangeFlag.

* platform/graphics/ca/PlatformCALayer.h: New LayerType.

* platform/graphics/ca/mac/PlatformCALayerMac.mm: Define CABackdropLayer.
(PlatformCALayerMac::PlatformCALayerMac): Create the correct CALayer type.

* rendering/RenderElement.h:
(WebCore::RenderElement::createsGroup):
(WebCore::RenderElement::hasBackdropFilter): This method is always around, but
only can return true when FILTERS_LEVEL_2 is enabled.

* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::paintsWithFilters): Remove an unnecessary comment.
(WebCore::RenderLayer::calculateClipRects):

* rendering/RenderLayer.h: Add hasBackdropFilter.

* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::RenderLayerBacking):
(WebCore::RenderLayerBacking::createPrimaryGraphicsLayer): Update the backdrop filters.
(WebCore::RenderLayerBacking::updateBackdropFilters): Set the filters on the GraphicsLayer.
(WebCore::RenderLayerBacking::updateGeometry):
* rendering/RenderLayerBacking.h:

* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::requiresOwnBackingStore): Needs backingstore if it has a backdrop filter.
(WebCore::RenderLayerCompositor::reasonsForCompositing):
(WebCore::RenderLayerCompositor::requiresCompositingForFilters): Return early if we have
a backdrop filter, because currently we absolutely require compositing.

* rendering/RenderLayerModelObject.cpp:
(WebCore::RenderLayerModelObject::styleWillChange): Add hasBackdropFilter().

* rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::changeRequiresLayout): Check backdrops for change.

* rendering/style/RenderStyle.h: Add the backdropFilter style stuff.
* rendering/style/StyleRareNonInheritedData.cpp:
(WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
(WebCore::StyleRareNonInheritedData::operator==):
(WebCore::StyleRareNonInheritedData::hasBackdropFilters):
* rendering/style/StyleRareNonInheritedData.h:

Source/WebKit2:

* Shared/mac/RemoteLayerBackingStore.mm:
(WebKit::RemoteLayerBackingStore::drawInContext): Handle LayerTypeBackdropLayer in the switch.
* Shared/mac/RemoteLayerTreeTransaction.mm:
(WebKit::RemoteLayerTreeTransaction::description): Describe a backdrop layer.
* UIProcess/ios/RemoteLayerTreeHostIOS.mm:
(+[WKBackdropView layerClass]): Define CABackdropLayer and use it as the class.
(WebKit::RemoteLayerTreeHost::createLayer):
* UIProcess/mac/RemoteLayerTreeHost.mm: Ditto.
(WebKit::RemoteLayerTreeHost::createLayer):

LayoutTests:

Tests for backdrop-filter. These are skipped on non-Apple platforms.

* platform/win/TestExpections: Skip these tests.
* platform/efl/TestExpections:
* platform/gtk/TestExpections:
* platform/mac-mavericks/TestExpectations: Yosemite only.

* css3/filters/backdrop/backdropfilter-property-computed-style-expected.txt: Added.
* css3/filters/backdrop/backdropfilter-property-computed-style.html: Added.
* css3/filters/backdrop/backdropfilter-property-expected.txt: Added.
* css3/filters/backdrop/backdropfilter-property-parsing-expected.txt: Added.
* css3/filters/backdrop/backdropfilter-property-parsing-invalid-expected.txt: Added.
* css3/filters/backdrop/backdropfilter-property-parsing-invalid.html: Added.
* css3/filters/backdrop/backdropfilter-property-parsing.html: Added.
* css3/filters/backdrop/backdropfilter-property.html: Added.
* css3/filters/backdrop/effect-hw-expected.html: Added.
* css3/filters/backdrop/effect-hw.html: Added.
* css3/filters/backdrop/script-tests/backdropfilter-property-computed-style.js: Added.
(testComputedFilterRule):
* css3/filters/backdrop/script-tests/backdropfilter-property-parsing-invalid.js: Added.
(testInvalidFilterRule):
* css3/filters/backdrop/script-tests/backdropfilter-property-parsing.js: Added.
(jsWrapperClass):
(shouldBeType):
(testFilterRule):
* css3/filters/backdrop/script-tests/backdropfilter-property.js: Added.

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

6 years ago[EFL] Improve previous temporary fix against drawing (0,0) position before rendering...
ryuan.choi@gmail.com [Thu, 6 Nov 2014 05:35:02 +0000 (05:35 +0000)]
[EFL] Improve previous temporary fix against drawing (0,0) position before rendering content of next web page
https://bugs.webkit.org/show_bug.cgi?id=138305

Reviewed by Gyuyoung Kim.

WebKit2 has freezed layer tree until frame load completion since r101838.
In EFL port, we unfreeze it when PageViewportController::pageTransitionViewportReady() is called though,
UIProcess on EFL port updates cairo surface during the freezing time of layer tree.
Thus UIProcess should not update the layer trees until the layerTreeState is unfrozen.

* UIProcess/API/efl/EwkView.h: Removed previous workarounds.
(EwkView::setWaitingForNewPage): Deleted.
(EwkView::waitingForNewPage): Deleted.
(EwkView::didCommitNewPage): Deleted.
* UIProcess/CoordinatedGraphics/PageViewportController.cpp:
(WebKit::PageViewportController::PageViewportController):
(WebKit::PageViewportController::didCommitLoad):
(WebKit::PageViewportController::didRenderFrame):
(WebKit::PageViewportController::syncVisibleContents):
* UIProcess/CoordinatedGraphics/PageViewportController.h:
* UIProcess/efl/PageLoadClientEfl.cpp:
(WebKit::PageLoadClientEfl::didCommitLoadForFrame):
* UIProcess/efl/PageViewportControllerClientEfl.cpp:
(WebKit::PageViewportControllerClientEfl::didChangeVisibleContents):
* UIProcess/efl/ViewClientEfl.cpp:
(WebKit::ViewClientEfl::didRenderFrame):

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

6 years agoMove 'size' CSS property to the new StyleBuilder
cdumez@apple.com [Thu, 6 Nov 2014 04:09:25 +0000 (04:09 +0000)]
Move 'size' CSS property to the new StyleBuilder
https://bugs.webkit.org/show_bug.cgi?id=138337

Reviewed by Andreas Kling.

Move 'size' CSS property from DeprecatedStyleBuilder to the new
StyleBuilder by using custom code as it requires special handling.

No new tests, new behavior change.

* css/CSSPropertyNames.in:
* css/DeprecatedStyleBuilder.cpp:
(WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
(WebCore::ApplyPropertyPageSize::mmLength): Deleted.
(WebCore::ApplyPropertyPageSize::inchLength): Deleted.
(WebCore::ApplyPropertyPageSize::getPageSizeFromName): Deleted.
(WebCore::ApplyPropertyPageSize::applyInheritValue): Deleted.
(WebCore::ApplyPropertyPageSize::applyInitialValue): Deleted.
(WebCore::ApplyPropertyPageSize::applyValue): Deleted.
(WebCore::ApplyPropertyPageSize::createHandler): Deleted.
* css/StyleBuilderCustom.h:
(WebCore::StyleBuilderFunctions::mmLength):
(WebCore::StyleBuilderFunctions::inchLength):
(WebCore::StyleBuilderFunctions::getPageSizeFromName):
(WebCore::StyleBuilderFunctions::applyInheritSize):
(WebCore::StyleBuilderFunctions::applyInitialSize):
(WebCore::StyleBuilderFunctions::applyValueSize):

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

6 years agoUnreviewed, rolling out r175628.
commit-queue@webkit.org [Thu, 6 Nov 2014 04:06:27 +0000 (04:06 +0000)]
Unreviewed, rolling out r175628.
https://bugs.webkit.org/show_bug.cgi?id=138451

Totally borked the web inspector (Requested by smfr on
#webkit).

Reverted changeset:

"Web Inspector: Add infrastructure for eslint based static
analyzer"
https://bugs.webkit.org/show_bug.cgi?id=137890
http://trac.webkit.org/changeset/175628

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

6 years agoRevert r175441 as it seems to be causing intermittent crashes in DOMTimer
cdumez@apple.com [Thu, 6 Nov 2014 02:37:45 +0000 (02:37 +0000)]
Revert r175441 as it seems to be causing intermittent crashes in DOMTimer
https://bugs.webkit.org/show_bug.cgi?id=138449

Unreviewed roll out.

Revert r175441 as it seems to be causing intermittent crashes in DOMTimer due
to the scriptExecutionContext going away. See <rdar://problem/18883681>.

* page/DOMTimer.cpp:
(WebCore::DOMTimer::install):
(WebCore::DOMTimer::fired):
(WebCore::NestedTimersVector::NestedTimersVector): Deleted.
(WebCore::NestedTimersVector::~NestedTimersVector): Deleted.
(WebCore::NestedTimersVector::registerTimer): Deleted.
(WebCore::NestedTimersVector::begin): Deleted.
(WebCore::NestedTimersVector::end): Deleted.

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

6 years agoAvoid backing store for opacity:0 descendant layers
simon.fraser@apple.com [Thu, 6 Nov 2014 02:21:51 +0000 (02:21 +0000)]
Avoid backing store for opacity:0 descendant layers
https://bugs.webkit.org/show_bug.cgi?id=138448

Reviewed by Dean Jackson.

Source/WebCore:

If a composited layer has no rendered content but a painting zero-opacity descendant
layer, than we can avoid making backing store.

When the opacity on such a child changes, we need to trigger a tree rebuild
to force the backing store to come back (this could be optimized later).

Tests: compositing/backing/no-backing-for-opacity-0-child.html
       compositing/backing/toggle-opacity-0-child.html

* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::calculateClipRects):
* rendering/RenderLayerCompositor.cpp:
(WebCore::styleChangeRequiresLayerRebuild):
* rendering/RenderObject.cpp:
(WebCore::RenderObject::containerForRepaint):

LayoutTests:

Test for no backing store with opacity:0 child, and that we get backing
store when dynamically changing the opacity to non-0.

* compositing/backing/no-backing-for-opacity-0-child-expected.txt: Added.
* compositing/backing/no-backing-for-opacity-0-child.html: Added.
* compositing/backing/toggle-opacity-0-child-expected.txt: Added.
* compositing/backing/toggle-opacity-0-child.html: Added.

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

6 years agoAssertion hit DOMTimer::updateTimerIntervalIfNecessary()
cdumez@apple.com [Thu, 6 Nov 2014 02:21:14 +0000 (02:21 +0000)]
Assertion hit DOMTimer::updateTimerIntervalIfNecessary()
https://bugs.webkit.org/show_bug.cgi?id=138440

Reviewed by Geoffrey Garen.

Source/WebCore:

We sometimes hit the ASSERT(repeatInterval() == previousInterval)
assertion in DOMTimer::updateTimerIntervalIfNecessary() when visiting
the following pages:
http://lifehacker.com/the-healthiest-foods-for-one-handed-snacking-while-gami-1654728164
http://longform.org/posts/like-something-the-lord-made

After debugging, the issue turned out to be that we are comparing
floating point numbers using ==, and the check sometimes fails even
though the values really close to each other. This patch updates the
DOMTimer code to use WTF::withinEpsilon() instead of operator==()
to compare the floating point intervals.

I confirmed manually that the assertion is no longer hit.

* page/DOMTimer.cpp:
(WebCore::DOMTimer::updateTimerIntervalIfNecessary):
* platform/graphics/FloatQuad.cpp:
(WebCore::FloatQuad::isRectilinear):
(WebCore::withinEpsilon): Deleted.

Source/WTF:

Move the withinEpsilon() function to WTF to avoid code duplication.

* wtf/MathExtras.h:
(WTF::withinEpsilon):

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

6 years agoAX: add "alt" as an overriding synonym of "-webkit-alt" (now in the CSS4 spec)
cfleizach@apple.com [Thu, 6 Nov 2014 02:16:09 +0000 (02:16 +0000)]
AX: add "alt" as an overriding synonym of "-webkit-alt" (now in the CSS4 spec)
https://bugs.webkit.org/show_bug.cgi?id=138393

Reviewed by Dean Jackson.

Source/WebCore:

Add official "alt" CSS keyword and map -webkit-alt to that.

Test: platform/mac/accessibility/alt-for-css-content.html

* css/CSSComputedStyleDeclaration.cpp:
(WebCore::ComputedStyleExtractor::propertyValue):
* css/CSSParser.cpp:
(WebCore::CSSParser::parseValue):
* css/CSSPropertyNames.in:
* css/StyleResolver.cpp:
(WebCore::StyleResolver::applyProperty):

LayoutTests:

* platform/mac/accessibility/alt-for-css-content-expected.txt: Added.
* platform/mac/accessibility/alt-for-css-content.html: Added.

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

6 years agoPutById inline caches should have a store barrier when it triggers a structure transi...
mark.lam@apple.com [Thu, 6 Nov 2014 01:53:25 +0000 (01:53 +0000)]
PutById inline caches should have a store barrier when it triggers a structure transition.
<https://webkit.org/b/138441>

Reviewed by Geoffrey Garen.

After r174025, we no longer insert DFG store barriers when the payload of a
PutById operation is not a cell.  However, this can lead to a crash when we have
PutById inline cache code transitioning the structure and re-allocating the
butterfly of an old gen object.  The lack of a store barrier in that inline
cache results in the old gen object not being noticed during an eden GC scan.
As a result, its newly allocated butterfly will not be kept alive, which leads
to a stale butterfly pointer and, eventually, a crash.

It is also possible that the new structure can be collected by the eden GC if
(at GC time):
1. It is in the eden gen.
2. The inline cache that installed it has been evicted.
3. There are no live eden gen objects referring to it.

The chances of this should be more rare than the butterfly re-allocation, but
it is still possible.  Hence, the fix is to always add a store barrier if the
inline caches performs a structure transition.

* jit/Repatch.cpp:
(JSC::emitPutTransitionStub):
- Added store barrier code based on SpeculativeJIT::storeToWriteBarrierBuffer()'s
  implementation.

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

6 years agoUnreviewed, EFL build fix since r175647
gyuyoung.kim@samsung.com [Thu, 6 Nov 2014 01:37:45 +0000 (01:37 +0000)]
Unreviewed, EFL build fix since r175647

* CMakeLists.txt: Remove DeleteButton.cpp and DeleteButtonController.cpp.

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

6 years agoUse std::unique_ptr in JSClassRef and JSCallbackObject
gyuyoung.kim@samsung.com [Thu, 6 Nov 2014 01:21:52 +0000 (01:21 +0000)]
Use std::unique_ptr in JSClassRef and JSCallbackObject
https://bugs.webkit.org/show_bug.cgi?id=138402

Reviewed by Geoffrey Garen.

* API/JSCallbackObject.h: Use std::unique_ptr instead of OwnPtr|PassOwnPtr.
(JSC::JSCallbackObjectData::setPrivateProperty): ditto.
* API/JSClassRef.cpp: ditto.
* API/JSClassRef.h: ditto.

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

6 years agoFix the build.
timothy_horton@apple.com [Thu, 6 Nov 2014 00:18:58 +0000 (00:18 +0000)]
Fix the build.

* UIProcess/mac/WKActionMenuController.mm:

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

6 years agoAllow constructing a PassRef from a Ref
cdumez@apple.com [Thu, 6 Nov 2014 00:16:27 +0000 (00:16 +0000)]
Allow constructing a PassRef from a Ref
https://bugs.webkit.org/show_bug.cgi?id=138389

Reviewed by Andreas Kling.

Source/WebCore:

Remove calls to Ref::get() now that a PassRef can be directly
constructed from a Ref.

No new tests, no behavior change.

* css/CSSValuePool.cpp:
(WebCore::CSSValuePool::createColorValue):
* css/CSSValuePool.h:
(WebCore::CSSValuePool::createInheritedValue):
(WebCore::CSSValuePool::createImplicitInitialValue):
(WebCore::CSSValuePool::createExplicitInitialValue):
* html/HTMLLinkElement.cpp:
(WebCore::HTMLLinkElement::setCSSStyleSheet):

Source/WTF:

Allow constructing a PassRef from a Ref, similarly to PassRefPtr that
can be constructed from a RefPtr already. This avoids having to call
Ref::get() and simplifies the code a bit.

* wtf/PassRef.h:
(WTF::PassRef<T>::PassRef):

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

6 years agoRemove the unused deletion UI feature
mitz@apple.com [Thu, 6 Nov 2014 00:09:49 +0000 (00:09 +0000)]
Remove the unused deletion UI feature
https://bugs.webkit.org/show_bug.cgi?id=138442

Rubber-stamped by Alexey Proskuryakov.

Source/WebCore:

* Resources/deleteButton.png: Removed.
* Resources/deleteButton@2x.png: Removed.
* Resources/deleteButtonPressed.png: Removed.
* Resources/deleteButtonPressed@2x.png: Removed.

* WebCore.xcodeproj/project.pbxproj: Removed references to removed files.

* dom/ContainerNode.cpp:
(WebCore::ContainerNode::cloneChildNodes): Folded the below helper function into this member
function, after removing the deleteButtonContainerElement parameter.
(WebCore::cloneChildNodesAvoidingDeleteButton): Deleted.

* editing/CompositeEditCommand.cpp:
(WebCore::EditCommandComposition::unapply): Removed use of
DeleteButtonControllerDisableScope.
(WebCore::EditCommandComposition::reapply): Ditto.
(WebCore::CompositeEditCommand::apply): Ditto.

* editing/DeleteButton.cpp: Removed.
* editing/DeleteButton.h: Removed.
* editing/DeleteButtonController.cpp: Removed.
* editing/DeleteButtonController.h: Removed.

* editing/EditCommand.cpp:
(WebCore::EditCommand::EditCommand): Removed use of
Editor::avoidIntersectionWithDeleteButtonController.

* editing/Editor.cpp:
(WebCore::Editor::Editor): Removed initialization of m_deleteButtonController.
(WebCore::Editor::rangeForPoint): Removed use of avoidIntersectionWithDeleteButtonController.
(WebCore::Editor::editorUIUpdateTimerFired): Removed call to DeleteButtonController function.
(WebCore::Editor::avoidIntersectionWithDeleteButtonController): Deleted.
(WebCore::Editor::deviceScaleFactorChanged): Deleted.

* editing/Editor.h:
(WebCore::Editor::deleteButtonController): Deleted.
(WebCore::Editor::avoidIntersectionWithDeleteButtonController): Deleted.

* editing/MarkupAccumulator.cpp:
(WebCore::MarkupAccumulator::serializeNodes): Removed nodeToSkip parameter.
(WebCore::MarkupAccumulator::serializeNodesWithNamespaces): Ditto.

* editing/MarkupAccumulator.h:

* editing/markup.cpp:
(WebCore::createMarkupInternal): Removed updateRange parameter, which had become identical
to the range parameter, and changed to use the latter everywhere instead.
(WebCore::createMarkup): Don’t compute and pass separate updateRanage parameter.

* loader/EmptyClients.h: Removed shouldShowDeleteInterface override.
* page/EditorClient.h: Removed shouldShowDeleteInterface.

* page/Page.cpp:
(WebCore::Page::setDeviceScaleFactor): Removed call to Editor::deviceScaleFactorChanged.

* page/PageSerializer.cpp:
(WebCore::PageSerializer::serializeFrame): Updated for MarkupAccumulator::serializeNodes change.

* testing/Internals.cpp:
(WebCore::Internals::findEditingDeleteButton): Deleted.
* testing/Internals.h:
* testing/Internals.idl:

Source/WebKit/mac:

* DefaultDelegates/WebDefaultEditingDelegate.m:
(-[WebDefaultEditingDelegate webView:shouldShowDeleteInterfaceForElement:]): Deleted.
* WebCoreSupport/WebEditorClient.h:
* WebCoreSupport/WebEditorClient.mm:
(WebEditorClient::shouldShowDeleteInterface): Deleted.
* WebView/WebEditingDelegatePrivate.h: Removed declaration of
-webView:shouldShowDeleteInterfaceForElement:.

Source/WebKit2:

* WebProcess/WebCoreSupport/WebEditorClient.cpp:
(WebKit::WebEditorClient::shouldShowDeleteInterface): Deleted.
* WebProcess/WebCoreSupport/WebEditorClient.h:

Source/WTF:

* wtf/FeatureDefines.h: Removed definition of ENABLE_DELETION_UI.

Tools:

* DumpRenderTree/mac/EditingDelegate.mm:
(-[EditingDelegate webView:shouldShowDeleteInterfaceForElement:]): Deleted implementation of
delegate method that’s been removed.

LayoutTests:

Removed tests, expected results, and support files for this feature.

* platform/mac/editing/deleting/deletionUI-borders-expected.txt: Removed.
* platform/mac/editing/deleting/deletionUI-borders.html: Removed.
* platform/mac/editing/deleting/deletionUI-click-on-delete-button-expected.txt: Removed.
* platform/mac/editing/deleting/deletionUI-click-on-delete-button.html: Removed.
* platform/mac/editing/deleting/deletionUI-differing-background-expected.txt: Removed.
* platform/mac/editing/deleting/deletionUI-differing-background.html: Removed.
* platform/mac/editing/deleting/deletionUI-minimum-size-expected.txt: Removed.
* platform/mac/editing/deleting/deletionUI-minimum-size.html: Removed.
* platform/mac/editing/deleting/deletionUI-single-instance-expected.png: Removed.
* platform/mac/editing/deleting/deletionUI-single-instance-expected.txt: Removed.
* platform/mac/editing/deleting/deletionUI-single-instance.html: Removed.
* platform/mac/editing/deleting/deletionUI-successful-deletion-expected.txt: Removed.
* platform/mac/editing/deleting/deletionUI-successful-deletion.html: Removed.
* platform/mac/editing/deleting/id-in-deletebutton-expected.txt: Removed.
* platform/mac/editing/deleting/id-in-deletebutton.html: Removed.
* platform/mac/editing/deleting/resources: Removed.
* platform/mac/editing/deleting/resources/deletionUI-helpers.js: Removed.
* platform/wk2/TestExpectations:

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

6 years agoIt should be possible to open a page preview by clicking on it
timothy_horton@apple.com [Wed, 5 Nov 2014 23:53:44 +0000 (23:53 +0000)]
It should be possible to open a page preview by clicking on it
https://bugs.webkit.org/show_bug.cgi?id=138445

Reviewed by Tim Horton.
Patch by Conrad Shultz.

Add a click recognizer to WKPagePreviewViewController and plumb it through to WKActionMenuController.

* UIProcess/mac/WKActionMenuController.mm:
Declare <WKPagePreviewViewControllerDelegate>, currently home to just a single method.
(-[WKPagePreviewViewController loadView]):
Configure and add a click gesture recognizer to the WKWebView.
(-[WKPagePreviewViewController _clickRecognized:]):
Gesture recognizer action; send -pagePreviewViewControllerWasClicked: to the delegate.
(-[WKActionMenuController willDestroyView:]):
Extract code to -_clearPreviewPopover.
(-[WKActionMenuController didCloseMenu:withEvent:]):
Ditto.
(-[WKActionMenuController _createPreviewPopoverForURL:]):
Set ourself as the delegate of the page preview controller.
(-[WKActionMenuController _clearPreviewPopover]):
Extracted from various other methods; if appropriate, nil out the preview view controller's delegate.
(-[WKActionMenuController popoverWillClose:]):
Extract code to -_clearPreviewPopover.
(-[WKActionMenuController pagePreviewViewControllerWasClicked:]):
WKPagePreviewViewControllerDelegate method; open the URL of the clicked page.

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

6 years agoPage preview popover should show scaled-down web content
bdakin@apple.com [Wed, 5 Nov 2014 23:31:38 +0000 (23:31 +0000)]
Page preview popover should show scaled-down web content
https://bugs.webkit.org/show_bug.cgi?id=138444

Reviewed by Anders Carlsson.

Instead of keeping the preferred size in the controller, keep the main view’s
size, and then scale the bounds of the popover’s view using that and the scale
factor as a constant. Set the size of the popover explicitly so that it doesn’t
get the view’s size. This will cause it to scale the WKWebView.
* UIProcess/mac/WKActionMenuController.mm:
(-[WKPagePreviewViewController initWithPageURL:]):
(-[WKPagePreviewViewController loadView]):
(-[WKActionMenuController _createPreviewPopoverForURL:originRect:]):
(-[WKActionMenuController _preferredSizeForPopoverPresentedFromOriginRect:]):

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

6 years agoDisable flakey float32-repeat-out-of-bounds.js and int8-repeat-out-of-bounds.js tests...
msaboff@apple.com [Wed, 5 Nov 2014 23:20:28 +0000 (23:20 +0000)]
Disable flakey float32-repeat-out-of-bounds.js and int8-repeat-out-of-bounds.js tests for ARM64
https://bugs.webkit.org/show_bug.cgi?id=138381

Reviewed by Mark Lam.

Disabled these test for ARM64.  Will address the failures and then re-enable.

* tests/stress/float32-repeat-out-of-bounds.js:
* tests/stress/int8-repeat-out-of-bounds.js:

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

6 years agoPage preview popovers sometimes cover their originating element
bdakin@apple.com [Wed, 5 Nov 2014 22:52:42 +0000 (22:52 +0000)]
Page preview popovers sometimes cover their originating element
https://bugs.webkit.org/show_bug.cgi?id=138437

Patch by Conrad Shultz <conrad_shultz@apple.com> on 2014-11-05
Reviewed by Beth Dakin.

If a popover is sufficiently large, and the originating element is in a particular location, it's
possible that the popover can't be positioned in a manner that doesn't occlude the originating element.
Address this by scaling down the popover content if it can't fit entirely between the originating
element and the screen edge.

* UIProcess/mac/WKActionMenuController.mm:
(-[WKActionMenuController _previewURLFromActionMenu:]):
Update to use -_createPreviewPopoverForURL:originRect:.
(-[WKActionMenuController _createPreviewPopoverForURL:originRect:]):
Renamed from -_createPreviewPopoverForURL:; extract code to -_preferredSizeForPopoverPresentedFromOriginRect:.
(-[WKActionMenuController _preferredSizeForPopoverPresentedFromOriginRect:]):
Compute a size that is as large as possible while keeping the popover between the origin rect and screen edge
(with an arbitrary padding applied to keep from directly abutting the screen edge).
(-[WKActionMenuController _createPreviewPopoverForURL:]): Deleted.

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

6 years agoWeb Inspector: Specificity not shown for pseudo element styles
commit-queue@webkit.org [Wed, 5 Nov 2014 22:50:33 +0000 (22:50 +0000)]
Web Inspector: Specificity not shown for pseudo element styles
https://bugs.webkit.org/show_bug.cgi?id=138436

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2014-11-05
Reviewed by Benjamin Poulain.

* UserInterface/Views/CSSStyleDeclarationSection.js:
(WebInspector.CSSStyleDeclarationSection.prototype.refresh):
Previously we were skipping the pre-selector <span>s when we were
not getting a listing of matched selector indices, and missing out
on the opportunity to give each selector a specificity. Now, always
loop over selectors if we have them.

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

6 years agoDescendant ends up in wrong flow thread with nested columns and spans.
hyatt@apple.com [Wed, 5 Nov 2014 21:26:28 +0000 (21:26 +0000)]
Descendant ends up in wrong flow thread with nested columns and spans.
https://bugs.webkit.org/show_bug.cgi?id=137273

Reviewed by Simon Fraser.

Unskipped the two problematic span tests.

Source/WebCore:

* rendering/RenderMultiColumnFlowThread.cpp:
(WebCore::isValidColumnSpanner):
Remove the guard and comment and added the assertion back in.

(WebCore::RenderMultiColumnFlowThread::flowThreadDescendantInserted):
Changed to no longer use handleSpannerRemoval. Because the spanner was removed from the flow thread's map,
handleSpannerRemoval was a no-op. So instead I just removed the placeholder by hand.

The second fix was to stop destroying the placeholder. Since the placeholder can just have been inserted, you
can't delete it, since otherwise code further up the stack will access the deleted object. For now, we just
leak the placeholder.

The third fix is to make sure the subtreeRoot is properly updated to be the new placeholder.

LayoutTests:

* TestExpectations:

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

6 years agoRenderBlock shouldn't need a pre-destructor hook.
akling@apple.com [Wed, 5 Nov 2014 21:22:53 +0000 (21:22 +0000)]
RenderBlock shouldn't need a pre-destructor hook.
<https://webkit.org/b/138430>

Reviewed by Antti Koivisto.

All that was interesting in RenderBlock::willBeDestroyed() has migrated
to RenderBlockFlow. removeFromUpdateScrollInfoAfterLayoutTransaction()
can be called from the plain destructor, so just move it there.

We don't have to worry about destroyLeftoverChildren(), since RenderElement
will take care of that for us.

* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::~RenderBlock):
(WebCore::RenderBlock::willBeDestroyed): Deleted.
* rendering/RenderBlock.h:

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

6 years agoRemove 2 unnecessary virtual functions on InputType
cdumez@apple.com [Wed, 5 Nov 2014 21:21:58 +0000 (21:21 +0000)]
Remove 2 unnecessary virtual functions on InputType
https://bugs.webkit.org/show_bug.cgi?id=138433

Reviewed by Andreas Kling.

Remove 2 unused virtual functions on InputType:
- valueAttributeChanged()
- updateClearButtonVisibility()

No new tests, no behavior change.

* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::parseAttribute):
(WebCore::HTMLInputElement::updateClearButtonVisibility): Deleted.
* html/HTMLInputElement.h:
* html/InputType.cpp:
(WebCore::InputType::valueAttributeChanged): Deleted.
(WebCore::InputType::updateClearButtonVisibility): Deleted.
* html/InputType.h:

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

6 years agofast/dom/remove-body-during-body-replacement2.html fails on WK2
ap@apple.com [Wed, 5 Nov 2014 21:21:45 +0000 (21:21 +0000)]
fast/dom/remove-body-during-body-replacement2.html fails on WK2
https://bugs.webkit.org/show_bug.cgi?id=138334

Reviewed by Anders Carlsson.

Source/WebKit2:

Added an SPI to focus a frame.

* WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
(WKBundleFrameFocus):
* WebProcess/InjectedBundle/API/c/WKBundleFramePrivate.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::setViewState):

Tools:

Reset focus to main frame between tests. DumpRenderTree does this via -makeFirstResponder
calls, which works because each frame is an NSView in WK1. WK2 makes equivalent
-makeFirstResponder calls, which may or may not be needed for other reasons, but
it also needs to reset internal focus explicitly.

It's not clear if this is the right long-term fix or a workaround for a WebKit bug.
WebKit behavior appears wrong, but it matches Firefox.

* WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:
(WTR::InjectedBundlePage::resetAfterTest):

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

6 years agoSelect Data Detectors results instead of just highlighting them
timothy_horton@apple.com [Wed, 5 Nov 2014 21:13:29 +0000 (21:13 +0000)]
Select Data Detectors results instead of just highlighting them
https://bugs.webkit.org/show_bug.cgi?id=138435
<rdar://problem/18877675>

Reviewed by Beth Dakin.

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::selectLastActionMenuRange):
(WebKit::WebPageProxy::selectLookupTextAtLocation): Deleted.
Rename selectLookupTextAtLocation to selectLastActionMenuRange.

* UIProcess/WebPageProxy.h:
* UIProcess/mac/WKActionMenuController.mm:
(-[WKActionMenuController willOpenMenu:withEvent:]):
Do a real selection for single-item Data Detector menus; show the yellow highlight otherwise.
Adopt selectLastActionMenuRange for non-detected text.

* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::performActionMenuHitTestAtLocation):
(WebKit::WebPage::selectLastActionMenuRange):
(WebKit::WebPage::selectLookupTextAtLocation): Deleted.
Store the last (detected data or Lookup-derived) action menu range.
Select it upon selectLastActionMenuRange.

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

6 years agoWebContent crash in WebPage::selectWithGesture()
jhoneycutt@apple.com [Wed, 5 Nov 2014 20:55:23 +0000 (20:55 +0000)]
WebContent crash in WebPage::selectWithGesture()

<https://bugs.webkit.org/show_bug.cgi?id=138399>
<rdar://problem/18550631>

This crash occurs when the web process receives a "TapAndAHalf" gesture
with the "Changed" state without having received a "TapAndAHalf"
gesture with the "Began" state.

No test possible.

Reviewed by Simon Fraser.

* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::selectWithGesture):
Null check m_currentWordRange before dereferencing it.

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

6 years agoDisable action menus on page previews
commit-queue@webkit.org [Wed, 5 Nov 2014 20:48:37 +0000 (20:48 +0000)]
Disable action menus on page previews
https://bugs.webkit.org/show_bug.cgi?id=138431

Patch by Conrad Shultz <conrad_shultz@apple.com> on 2014-11-05
Reviewed by Anders Carlsson.

* UIProcess/API/mac/WKView.mm:
(-[WKView _shouldIgnoreMouseEvents]):
Renamed from -shouldIgnoreMouseEvents since this isn't actually public.
(-[WKView swipeWithEvent:]):
(-[WKView mouseMoved:]):
(-[WKView mouseDown:]):
(-[WKView mouseUp:]):
(-[WKView mouseDragged:]):
Updated to reflect method rename.
(-[WKView shouldIgnoreMouseEvents]): Deleted.

* UIProcess/API/mac/WKViewInternal.h:
Expose -_shouldIgnoreMouseEvents.

* UIProcess/mac/WKActionMenuController.mm:
(-[WKActionMenuController prepareForMenu:withEvent:]):
Cancel the menu if the presenting WKView should ignore mouse events.

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

6 years ago[CSS Shapes] Positioned polygon reftests failing again
bjonesbe@adobe.com [Wed, 5 Nov 2014 20:28:03 +0000 (20:28 +0000)]
[CSS Shapes] Positioned polygon reftests failing again
https://bugs.webkit.org/show_bug.cgi?id=138058

Reviewed by Anders Carlsson.

Remove these tests from TestExpectations since they do pass.

* TestExpectations:

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

6 years agoAction menu URL preview should "peek," i.e. appear when the menu item is
bdakin@apple.com [Wed, 5 Nov 2014 20:15:13 +0000 (20:15 +0000)]
Action menu URL preview should "peek," i.e. appear when the menu item is
highlighted
https://bugs.webkit.org/show_bug.cgi?id=138432
-and corresponding-
rdar://problem/18774264

Reviewed by Anders Carlsson.

New ivars. Keep a reference to the popover, and a BOOL that indicates whether we
should close the popover when the menu goes away.
* UIProcess/mac/WKActionMenuController.h:
* UIProcess/mac/WKActionMenuController.mm:

Re-set the preview bool to NO whenever we are about to pop up a new menu.
(-[WKActionMenuController prepareForMenu:withEvent:]):

Close the popover when the menu closes unless _shouldKeepPreviewPopoverOpen has
been set.
(-[WKActionMenuController didCloseMenu:withEvent:]):

Set _shouldKeepPreviewPopoverOpen.
(-[WKActionMenuController _keepPreviewOpen:]):

Re-factored to use ivar.
(-[WKActionMenuController _previewURLFromActionMenu:]):
(-[WKActionMenuController _createPreviewPopoverForURL:]):

Now call _previewURLFromActionMenu on menu item highlight.
(-[WKActionMenuController menu:willHighlightItem:]):

NSPopover delegate method so that we can keep our BOOL and ivar accurate in the
case where the popover is closed by some other mechanism than the action menu
going away.
(-[WKActionMenuController popoverWillClose:]):

New selector for the preview. Now when this item is actually selected, we just
want to set the BOOL _shouldKeepPreviewPopoverOpen to YES so that we keep the
preview open.
(-[WKActionMenuController _createActionMenuItemForTag:]):

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

6 years ago[CSS Shapes] shape-image-threshold parsing tests have a few failures
bjonesbe@adobe.com [Wed, 5 Nov 2014 20:10:56 +0000 (20:10 +0000)]
[CSS Shapes] shape-image-threshold parsing tests have a few failures
https://bugs.webkit.org/show_bug.cgi?id=138060

Reviewed by Dirk Schulze.

Remove testing for inline style from the CSSWG test because it isn't
specified and isn't consistent across browsers. This has been updated
upstream as well.

Add inline style tests to the WebKit test suite to make sure that
WebKIt doesn't lose coverage with this change.

* TestExpectations:
* css3/shapes/shape-outside/values/shape-image-threshold-001-expected.txt:
* css3/shapes/shape-outside/values/shape-image-threshold-001.html:
* fast/shapes/parsing/parsing-shape-image-threshold-expected.txt:
* fast/shapes/parsing/parsing-shape-image-threshold.html:

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

6 years agoDisable interaction with action menu page previews
commit-queue@webkit.org [Wed, 5 Nov 2014 20:09:26 +0000 (20:09 +0000)]
Disable interaction with action menu page previews
https://bugs.webkit.org/show_bug.cgi?id=138400

Patch by Conrad Shultz <conrad_shultz@apple.com> on 2014-11-05
Reviewed by Tim Horton.

Expand on the existing -[WKView shouldIgnoreMouseEvents] by adding facilities to suppress handling
of all non-wheel events, effectively creating a scroll-only web view. Deploy this in
WKPagePreviewViewController.

* UIProcess/API/Cocoa/WKViewPrivate.h:
Declare the OS X-only ignoresNonWheelMouseEvents SPI.

* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _ignoresNonWheelMouseEvents]):
(-[WKWebView _setIgnoresNonWheelMouseEvents:]):
Wrap the underlying WKView methods.

* UIProcess/API/Cocoa/WKWebViewInternal.h:
Declare the OS X-only ignoresNonWheelMouseEvents property.

* UIProcess/API/mac/WKView.mm:
Add _ignoresNonWheelMouseEvents to WKViewData.
(-[WKView shouldIgnoreMouseEvents]):
Include a check for _ignoresNonWheelMouseEvents.
(-[WKView _setIgnoresNonWheelMouseEvents:]):
Set the ivar in WKViewData.
(-[WKView _ignoresNonWheelMouseEvents]):
Fetch the ivar in WKViewData.
(-[WKView _shouldIgnoreWheelEvents]):
Implement the old -shouldIgnoreMouseEvents behavior.
(-[WKView scrollWheel:]):
-shouldIgnoreMouseEvents -> -_shouldIgnoreWheelEvents.

* UIProcess/mac/WKActionMenuController.mm:
(-[WKPagePreviewViewController loadView]):
Configure the WKWebView to ignore non-wheel mouse events; use RetainPtr for the WKWebView.

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

6 years agoIncorrect sandbox_check in RemoteInspector.mm
ap@apple.com [Wed, 5 Nov 2014 19:57:27 +0000 (19:57 +0000)]
Incorrect sandbox_check in RemoteInspector.mm
https://bugs.webkit.org/show_bug.cgi?id=138408

Reviewed by Joseph Pecoraro.

* inspector/remote/RemoteInspector.mm:
(Inspector::canAccessWebInspectorMachPort):

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

6 years agoWeb Inspector: Add infrastructure for eslint based static analyzer
jonowells@apple.com [Wed, 5 Nov 2014 18:43:30 +0000 (18:43 +0000)]
Web Inspector: Add infrastructure for eslint based static analyzer
https://bugs.webkit.org/show_bug.cgi?id=137890

Reviewed by Timothy Hatcher.

Adding a manager to analyze source code, return warnings (AnalyzerMessages), and cache warnings.

* UserInterface/Base/Main.js: Create analyzerManager singleton.
* UserInterface/Controllers/AnalyzerManager.js: Added.
(WebInspector.AnalyzerManager):
(set WebInspector.AnalyzerManager.prototype.getAnalyzerMessagesForSourceCode.):
(set WebInspector.AnalyzerManager.prototype.getAnalyzerMessagesForSourceCode):
(set WebInspector.AnalyzerManager.prototype.set get sourceCodeCanBeAnalyzed):
(set WebInspector.AnalyzerManager.prototype._handleSourceCodeContentDidChange):
* UserInterface/Main.html: Add new files.
* UserInterface/Models/AnalyzerMessage.js: Added.
(WebInspector.AnalyzerMessage):
(WebInspector.AnalyzerMessage.prototype.get sourceCodeLocation):
(WebInspector.AnalyzerMessage.prototype.get sourceCode):
(WebInspector.AnalyzerMessage.prototype.get text):
(WebInspector.AnalyzerMessage.prototype.get ruleIdentifier):
* UserInterface/Models/SourceCode.js: Added call to WebInspector.Object.addConstructorFunctions().

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

6 years agoRe-evaluate if a repetitive timer should be throttled upon firing
cdumez@apple.com [Wed, 5 Nov 2014 18:43:19 +0000 (18:43 +0000)]
Re-evaluate if a repetitive timer should be throttled upon firing
https://bugs.webkit.org/show_bug.cgi?id=138339

Reviewed by Gavin Barraclough.

Re-evaluate if a repetitive timer should be throttled upon firing in
case the plugin observability state has changed:
- It used to be visible but now isn't and thus the timer can be throttled
- It used to play audio but now doesn't and thus the timer can be throttled

We already stopped throttling if the plugin became observable. However,
we didn't start throttling if the plugin became non-observable.

* page/DOMTimer.cpp:
(WebCore::DOMTimer::updateThrottlingStateIfNecessary):

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

6 years agoAdd ENABLE_FILTERS_LEVEL_2 feature guard.
dino@apple.com [Wed, 5 Nov 2014 18:27:12 +0000 (18:27 +0000)]
Add ENABLE_FILTERS_LEVEL_2 feature guard.
https://bugs.webkit.org/show_bug.cgi?id=138362

Reviewed by Tim Horton.

Add a new feature define for Level 2 of CSS Filters.
http://dev.w3.org/fxtf/filters-2/

.:

* Source/cmake/OptionsEfl.cmake:
* Source/cmake/OptionsGTK.cmake:
* Source/cmake/OptionsMac.cmake:
* Source/cmake/WebKitFeatures.cmake:
* Source/cmakeconfig.h.cmake:

Source/JavaScriptCore:

* Configurations/FeatureDefines.xcconfig:

Source/WebCore:

* Configurations/FeatureDefines.xcconfig:

Source/WebKit/mac:

* Configurations/FeatureDefines.xcconfig:

Source/WebKit2:

* Configurations/FeatureDefines.xcconfig:

Source/WTF:

* wtf/FeatureDefines.h:

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

6 years agoMove text-align CSS property to the new StyleBuilder
cdumez@apple.com [Wed, 5 Nov 2014 18:24:57 +0000 (18:24 +0000)]
Move text-align CSS property to the new StyleBuilder
https://bugs.webkit.org/show_bug.cgi?id=138398

Reviewed by Antti Koivisto.

Move text-align CSS property from DeprecatedStyleBuilder to the new
StyleBuilder so that it is now generated from CSSPropertyNames.in.
This patch adds a TextAlign Converter to support this.

No new tests, no behavior change.

* css/CSSPropertyNames.in:
* css/DeprecatedStyleBuilder.cpp:
(WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
(WebCore::ApplyPropertyTextAlign::applyValue): Deleted.
(WebCore::ApplyPropertyTextAlign::createHandler): Deleted.
* css/StyleBuilderConverter.h:
(WebCore::StyleBuilderConverter::convertTextAlign):

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

6 years agoEnable ARMv7 disassembler for all platforms
ossy@webkit.org [Wed, 5 Nov 2014 17:45:38 +0000 (17:45 +0000)]
Enable ARMv7 disassembler for all platforms
https://bugs.webkit.org/show_bug.cgi?id=138415

Reviewed by Darin Adler.

* wtf/Platform.h:

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

6 years agoFix build warning in SVGMarkerElement.cpp
commit-queue@webkit.org [Wed, 5 Nov 2014 17:42:38 +0000 (17:42 +0000)]
Fix build warning in SVGMarkerElement.cpp
https://bugs.webkit.org/show_bug.cgi?id=138407

Patch by Sanghyup Lee <sh53.lee@samsung.com> on 2014-11-05
Reviewed by Darin Adler.

Build warning in debug cause 'comparison of unsigned expression >= 0 is always true [-Wtype-limits]'

* svg/SVGMarkerElement.cpp:
(WebCore::SVGMarkerElement::orientType): Removed useless condition in ASSERT.

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

6 years agoStop special-casing the empty string in HTMLInputElement.type setter
cdumez@apple.com [Wed, 5 Nov 2014 17:41:08 +0000 (17:41 +0000)]
Stop special-casing the empty string in HTMLInputElement.type setter
https://bugs.webkit.org/show_bug.cgi?id=138403

Reviewed by Ryosuke Niwa.

Source/WebCore:

Stop special-casing the empty string in HTMLInputElement.type setter.
Previously, if input.type is set to "", we would remove the type
attribute. This is inconsistent with the specification and the behavior
of other browsers (tested Firefox 33 and Chrome 38). Instead, we should
set the attribute to the empty string.

Also stop treating null as a null string to align with the
specification and other browsers (tested Firefox 33 and Chrome 38).

Finally, update HTMLInputElement::setType() to take an AtomicString in
argument instead of a String as it ends up calling setAttribute(), and
thus needing an AtomicString.

Test: fast/dom/HTMLInputElement/input-type-attribute.html

* html/FileInputType.cpp:
(WebCore::UploadButtonElement::UploadButtonElement):
* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::setType):
* html/HTMLInputElement.h:
* html/HTMLInputElement.idl:

LayoutTests:

Add layout test to check the functionality of the HTMLInputElement.type
getter and setter.

* fast/dom/HTMLInputElement/input-type-attribute-expected.txt: Added.
* fast/dom/HTMLInputElement/input-type-attribute.html: Added.

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

6 years ago[WinCairo] Compile error, missing guard.
commit-queue@webkit.org [Wed, 5 Nov 2014 17:35:17 +0000 (17:35 +0000)]
[WinCairo] Compile error, missing guard.
https://bugs.webkit.org/show_bug.cgi?id=138421

Patch by peavo@outlook.com <peavo@outlook.com> on 2014-11-05
Reviewed by Brent Fulgham.

There is missing a guard for CSS_SELECTORS_LEVEL4 in CSSParserValues.cpp.

* css/CSSParserValues.cpp:

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

6 years agoREGRESSION(r175601): Assertion failures in SimpleLineLayout
antti@apple.com [Wed, 5 Nov 2014 15:07:24 +0000 (15:07 +0000)]
REGRESSION(r175601): Assertion failures in SimpleLineLayout
https://bugs.webkit.org/show_bug.cgi?id=138422

Check for end.

* rendering/SimpleLineLayout.cpp:
(WebCore::SimpleLineLayout::FlowContentIterator::isNewlineCharacter):
(WebCore::SimpleLineLayout::removeTrailingWhitespace):

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

6 years agoNetscapePlugin: NPP_GetValue should receive a pointer to NPBool, not bool
berto@igalia.com [Wed, 5 Nov 2014 13:29:21 +0000 (13:29 +0000)]
NetscapePlugin: NPP_GetValue should receive a pointer to NPBool, not bool
https://bugs.webkit.org/show_bug.cgi?id=138418

Reviewed by Carlos Garcia Campos.

Replace bool with NPBool, which is actually an unsigned char.

* WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp:
(WebKit::NetscapePlugin::platformPostInitialize):

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

6 years ago[GTK] Add WebKitWebResource::failed-with-tls-errors signal
carlosgc@webkit.org [Wed, 5 Nov 2014 10:54:05 +0000 (10:54 +0000)]
[GTK] Add WebKitWebResource::failed-with-tls-errors signal
https://bugs.webkit.org/show_bug.cgi?id=137862

Reviewed by Gustavo Noronha Silva.

Source/WebKit2:

When a resource load fails due to TLS errors emit WebKitWebResource::failed-with-tls-errors
signal instead of WebKitWebResource::failed so that TLS errors information and certificate
are provided.

* UIProcess/API/gtk/WebKitInjectedBundleClient.cpp:
(didReceiveWebViewMessageFromInjectedBundle): Check if the error
is a TLS failure to emit failed-with-tls-errors instead of failed.
* UIProcess/API/gtk/WebKitWebResource.cpp:
(webkit_web_resource_class_init): Add WebKitWebResource::failed-with-tls-errors signal.
(webkitWebResourceFailedWithTLSErrors): Emit failed-with-tls-errors and finish signals.
* UIProcess/API/gtk/WebKitWebResourcePrivate.h:

Tools:

Add a test case to check that WebKitWebResource::failed-with-tls-errors
is emitted when a subresource load fails due to TLS errors.

* TestWebKitAPI/Tests/WebKit2Gtk/TestSSL.cpp:
(TLSSubresourceTest::resourceLoadStartedCallback):
(TLSSubresourceTest::TLSSubresourceTest):
(TLSSubresourceTest::subresourceFailedCallback):
(TLSSubresourceTest::subresourceFailedWithTLSErrorsCallback):
(TLSSubresourceTest::subresourceLoadStarted):
(TLSSubresourceTest::subresourceFailedWithTLSErrors):
(TLSSubresourceTest::waitUntilSubresourceLoadFail):
(testSubresourceLoadFailedWithTLSErrors):
(httpsServerCallback):
(httpServerCallback):
(beforeAll):

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

6 years agoSimple line layout: support text-transform: lowercase|uppercase|capitalize
akling@apple.com [Wed, 5 Nov 2014 10:12:42 +0000 (10:12 +0000)]
Simple line layout: support text-transform: lowercase|uppercase|capitalize
<https://webkit.org/b/138406>

Reviewed by Antti Koivisto.

Source/WebCore:

Expand the simple line layout coverage to include all text-transform values.
Since the property works on the text string level, it's really only a matter
of removing the short-circuit.

Test: fast/text/simple-lines-text-transform.html

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

LayoutTests:

Add ref test for simple line layout with all text-transform values.

* fast/text/simple-lines-text-transform-expected.html: Added.
* fast/text/simple-lines-text-transform.html: Added.

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

6 years agoFix build warning in WebKit2/WebProcess module.
commit-queue@webkit.org [Wed, 5 Nov 2014 10:01:24 +0000 (10:01 +0000)]
Fix build warning in WebKit2/WebProcess module.
https://bugs.webkit.org/show_bug.cgi?id=138410

Patch by Shivakumar JM <shiva.jm@samsung.com> on 2014-11-05
Reviewed by Alexey Proskuryakov.

Fix build warning by removing parameter name

* WebProcess/WebPage/WebPageOverlay.h:
(WebKit::WebPageOverlay::Client::prepareForActionMenu):

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

6 years ago[EME][Mac] Allow the client to specify FPS protocol versions in the keySystem type...
jer.noble@apple.com [Wed, 5 Nov 2014 09:56:37 +0000 (09:56 +0000)]
[EME][Mac] Allow the client to specify FPS protocol versions in the keySystem type field.
https://bugs.webkit.org/show_bug.cgi?id=138380

Reviewed by Eric Carlson.

Parse out the requested FPS protocol version of the keySystem type string and pass it to
AVStreamDataParser as an options dictionary.

* platform/graphics/avfoundation/CDMPrivateMediaSourceAVFObjC.mm:
(WebCore::validKeySystemRE): Added, match comma-separated version suffixes.
(WebCore::CDMPrivateMediaSourceAVFObjC::supportsKeySystem): Call above.
(WebCore::CDMPrivateMediaSourceAVFObjC::createSession): Parse out the version numbers
    and pass into the session as a vector.
* platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.h:
* platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.mm:
(WebCore::CDMSessionMediaSourceAVFObjC::CDMSessionMediaSourceAVFObjC): Take a vector of
    protocol version numbers.
(WebCore::CDMSessionMediaSourceAVFObjC::update): Create an NSArray and pass into
    the key request creation method in an options dictionary.

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

6 years agoMove HTTPHeaderMap encoding to the class
antti@apple.com [Wed, 5 Nov 2014 09:26:51 +0000 (09:26 +0000)]
Move HTTPHeaderMap encoding to the class
https://bugs.webkit.org/show_bug.cgi?id=138412

Reviewed by Andreas Kling.

Source/WebCore:

* platform/network/HTTPHeaderMap.h:
(WebCore::HTTPHeaderMap::encode):
(WebCore::HTTPHeaderMap::decode):

    Use generic encoding for the uncommon header map. Common headers still require custom code due to the enum class.

Source/WebKit2:

* PluginProcess/PluginControllerProxy.cpp:
* Shared/WebCoreArgumentCoders.cpp:
(IPC::ArgumentCoder<HTTPHeaderMap>::encode): Deleted.
(IPC::ArgumentCoder<HTTPHeaderMap>::decode): Deleted.

    Make these HTTPHeaderMap members instead so they can access internals and can be used elsewhere.

* Shared/WebCoreArgumentCoders.h:

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

6 years agoBuild fix for some compiler versions.
ap@apple.com [Wed, 5 Nov 2014 08:17:42 +0000 (08:17 +0000)]
Build fix for some compiler versions.

* TestWebKitAPI/Tests/mac/TypingStyleCrash.mm: (TestWebKitAPI::TEST): Compiler was
unhappy because this is a getter, and these shouldn't have side effects.

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

6 years agoVersioning.
bshafiei@apple.com [Wed, 5 Nov 2014 06:22:43 +0000 (06:22 +0000)]
Versioning.

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

6 years agoSpeculative build fix.
bdakin@apple.com [Wed, 5 Nov 2014 05:52:05 +0000 (05:52 +0000)]
Speculative build fix.

* UIProcess/API/mac/WKView.mm:
(-[WKView _dismissActionMenuDataDetectorPopovers]):
* UIProcess/API/mac/WKViewInternal.h:

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

6 years agoUn-anchor data detector popovers on scroll
bdakin@apple.com [Wed, 5 Nov 2014 05:42:29 +0000 (05:42 +0000)]
Un-anchor data detector popovers on scroll
https://bugs.webkit.org/show_bug.cgi?id=138385
-and corresponding-
rdar://problem/18869345

Reviewed by Tim Horton.

Source/WebCore:

* platform/spi/mac/DataDetectorsSPI.h:

Source/WebKit2:

Whenever we dismiss the dictionary popover, and on scroll, we should try to
dismiss the data detector popovers. Right now we don’t have the ability to know if
a dismiss succeeded, so we will settle for un-anchoring the popover.

* UIProcess/API/mac/WKView.mm:
(-[WKView viewDidMoveToWindow]):
(-[WKView _dismissActionMenuDataDetetcorPopovers]):
* UIProcess/API/mac/WKViewInternal.h:
* UIProcess/PageClient.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::didCommitLoadForFrame):
(WebKit::WebPageProxy::pageDidScroll):
(WebKit::WebPageProxy::resetStateAfterProcessExited):
* UIProcess/mac/PageClientImpl.h:
* UIProcess/mac/PageClientImpl.mm:
(WebKit::PageClientImpl::dismissActionMenuDataDetetcorPopovers):
* UIProcess/mac/WKActionMenuController.h:
* UIProcess/mac/WKActionMenuController.mm:
(-[WKActionMenuController dismissActionMenuDataDetetcorPopovers]):

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

6 years ago[iOS] WKPDFView should scroll to a fragment when loading a PDF
aestes@apple.com [Wed, 5 Nov 2014 05:36:08 +0000 (05:36 +0000)]
[iOS] WKPDFView should scroll to a fragment when loading a PDF
https://bugs.webkit.org/show_bug.cgi?id=138404

Reviewed by Tim Horton.

WKPDFView already knew how to scroll to a page number fragment during a same-document navigation, but it didn't
know to do so when loading a PDF whose URL already contained a page number fragment. This could happen if the
user long-presses a page number link and taps 'Open in New Tab'.

* UIProcess/ios/WKPDFView.mm:
(-[WKPDFView web_setContentProviderData:suggestedFilename:]): Called _scrollToFragment:.
(-[WKPDFView _scrollToFragment:]): Moved fragment scrolling code to here from web_didSameDocumentNavigation:.
(-[WKPDFView web_didSameDocumentNavigation:]): Called _scrollToFragment.

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

6 years ago[iOS] Stop using +[NSURL _web_URLWithWTFString:relativeToURL:] in WKPDFView
aestes@apple.com [Wed, 5 Nov 2014 04:56:27 +0000 (04:56 +0000)]
[iOS] Stop using +[NSURL _web_URLWithWTFString:relativeToURL:] in WKPDFView
https://bugs.webkit.org/show_bug.cgi?id=138357

Rubber-stamped by Dan Bernstein.

During patch review for r175595 I changed from using +URLWithString:relativeToURL: to using
+_web_URLWithWTFString:relativeToURL: to append a page number fragment to the document URL.
If the base URL already contains a fragment, +_web_URLWithWTFString:relativeToURL: appends to the existing
fragment whereas +URLWithString:relativeToURL: replaces the existing fragment. I want the latter behavior.

* UIProcess/ios/WKPDFView.mm:
(-[WKPDFView _URLForLinkAnnotation:]):

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

6 years agoAdd a method for performing cherrypick-merges.
matthew_hanson@apple.com [Wed, 5 Nov 2014 04:49:52 +0000 (04:49 +0000)]
Add a method for performing cherrypick-merges.
https://bugs.webkit.org/show_bug.cgi?id=138375

Adds support for cherrypick-merges.

Reviewed by NOBODY (OOPS!).

* Scripts/webkitpy/common/checkout/scm/git.py:
(Git.cherrypick_merge): Added.

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

6 years agoAdd a way to ascertain the SVN URL associated with a Git branch.
matthew_hanson@apple.com [Wed, 5 Nov 2014 04:49:49 +0000 (04:49 +0000)]
Add a way to ascertain the SVN URL associated with a Git branch.
https://bugs.webkit.org/show_bug.cgi?id=138374

The svn_url method returns the SVN URL associated with the current Git branch.

Reviewed by NOBODY (OOPS!).

* Scripts/webkitpy/common/checkout/scm/git.py:
(Git.svn_url): Added.

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

6 years agoAdd the ability to search for modifications that are staged for commit.
matthew_hanson@apple.com [Wed, 5 Nov 2014 04:49:46 +0000 (04:49 +0000)]
Add the ability to search for modifications that are staged for commit.
https://bugs.webkit.org/show_bug.cgi?id=138373

This makes is easy to do identify files that require merge post-processing,
in addition to stand-alone utility.

Reviewed by NOBODY (OOPS!).

* Scripts/webkitpy/common/checkout/scm/git.py:
(Git.modifications_staged_for_commit): Added.

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

6 years agoAdd a branch keyword argument to _run_git_svn_find_rev.
matthew_hanson@apple.com [Wed, 5 Nov 2014 04:49:42 +0000 (04:49 +0000)]
Add a branch keyword argument to _run_git_svn_find_rev.
https://bugs.webkit.org/show_bug.cgi?id=138372

Reviewed by NOBODY (OOPS!).

The addition of this keyword argument allows clients to determine the Git hash
of commits made on an SVN branch, provided that branch has been fetched locally.

* Scripts/webkitpy/common/checkout/scm/git.py:
(Git._run_git_svn_find_rev):
Add a branch keyword argument that is added to the end of the command, if present.

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

6 years agoAvoid double hash table lookup in SpaceSplitStringData::create()
cdumez@apple.com [Wed, 5 Nov 2014 03:58:19 +0000 (03:58 +0000)]
Avoid double hash table lookup in SpaceSplitStringData::create()
https://bugs.webkit.org/show_bug.cgi?id=138396

Reviewed by Ryosuke Niwa.

Avoid double hash table lookup in SpaceSplitStringData::create() by
calling HashMap::add() and using the AddResult, instead of calling
HashMap::get() then HashMap::add().

No new tests, no behavior change.

* dom/SpaceSplitString.cpp:
(WebCore::SpaceSplitStringData::create):

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

6 years agoSimple line layout: Abstract out content iteration and text handling in general.
zalan@apple.com [Wed, 5 Nov 2014 03:47:45 +0000 (03:47 +0000)]
Simple line layout: Abstract out content iteration and text handling in general.
https://bugs.webkit.org/show_bug.cgi?id=138346

Reviewed by Antti Koivisto.

Add a class that can act as the primary iterator/fragment handling interface to the line parser.
This helps adding support multiple renderer elements without changing the parser logic.
Currently it operates strictly on the first child of the RenderBlockFlow.

Covered by existing tests.

* rendering/SimpleLineLayout.cpp:
(WebCore::SimpleLineLayout::FlowContentIterator::FlowContentIterator):
(WebCore::SimpleLineLayout::FlowContentIterator::findNextBreakablePosition):
(WebCore::SimpleLineLayout::FlowContentIterator::findNextNonWhitespacePosition):
(WebCore::SimpleLineLayout::FlowContentIterator::textWidth):
(WebCore::SimpleLineLayout::FlowContentIterator::isNewlineCharacter):
(WebCore::SimpleLineLayout::FlowContentIterator::isEndOfContent):
(WebCore::SimpleLineLayout::FlowContentIterator::style):
(WebCore::SimpleLineLayout::computeLineLeft):
(WebCore::SimpleLineLayout::TextFragment::TextFragment):
(WebCore::SimpleLineLayout::removeTrailingWhitespace):
(WebCore::SimpleLineLayout::initializeNewLine):
(WebCore::SimpleLineLayout::splitFragmentToFitLine):
(WebCore::SimpleLineLayout::nextFragment):
(WebCore::SimpleLineLayout::createLineRuns):
(WebCore::SimpleLineLayout::closeLineEndingAndAdjustRuns):
(WebCore::SimpleLineLayout::createTextRuns):
(WebCore::SimpleLineLayout::create):
(WebCore::SimpleLineLayout::skipWhitespace): Deleted.
(WebCore::SimpleLineLayout::textWidth): Deleted.
* rendering/SimpleLineLayout.h:

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

6 years agoFix build after r138351
jeremyj-wk@apple.com [Wed, 5 Nov 2014 03:32:52 +0000 (03:32 +0000)]
Fix build after r138351
https://bugs.webkit.org/show_bug.cgi?id=138401

Ureviewed. Make return type match.

* platform/ios/WebCoreSystemInterfaceIOS.mm:

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

6 years agoWeb Inspector: Too much whitespace in resource details sidebar in groups
commit-queue@webkit.org [Wed, 5 Nov 2014 03:18:13 +0000 (03:18 +0000)]
Web Inspector: Too much whitespace in resource details sidebar in groups
https://bugs.webkit.org/show_bug.cgi?id=138386

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

* UserInterface/Views/DetailsSection.css:
(.details-section > .content > .group:first-child > .row.simple:first-child > *):
(body.mac-platform.legacy .details-section > .content > .group:first-child > .row.simple:first-child > *):
(body.mac-platform.legacy .details-section > .content > .group > .row.text):
(.details-section > .content > .group > .row.properties:not(.empty)):
(body.mac-platform.legacy .details-section > .content > .group > .row.properties:not(.empty)):
Adjust top and bottom padding.

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

6 years agoWeb Inspector: Lots of TimelineDataGridNode asserts on reloads
commit-queue@webkit.org [Wed, 5 Nov 2014 02:31:57 +0000 (02:31 +0000)]
Web Inspector: Lots of TimelineDataGridNode asserts on reloads
https://bugs.webkit.org/show_bug.cgi?id=138387

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2014-11-04
Reviewed by Brian Burg.

The TimelineRuler.secondsPerPixel in the TimelineOverview is initialized
with a non-0 value and saved in a setting. However the TimelineRuler in
the OverviewTimelineView is not initialized with this value, and instead
initialized to 0. This patch initializes them to the same non-0 value.

* UserInterface/Views/OverviewTimelineView.js:
(WebInspector.OverviewTimelineView.prototype.set secondsPerPixel):
* UserInterface/Views/TimelineContentView.js:

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

6 years agoAdd bundle SPI allowing PageOverlay to customize the action menu
timothy_horton@apple.com [Wed, 5 Nov 2014 01:39:47 +0000 (01:39 +0000)]
Add bundle SPI allowing PageOverlay to customize the action menu
https://bugs.webkit.org/show_bug.cgi?id=138388
<rdar://problem/18875579>

Reviewed by Anders Carlsson.

* WebProcess/InjectedBundle/API/c/WKBundlePageOverlay.cpp:
Bump the BundlePageOverlay client version.

(WKBundlePageOverlayCreate):
(WKBundlePageOverlaySetAccessibilityClient):
Don't return if we have a version; the version check happens later anyway,
and now it is valid to have a version >0.

* WebProcess/InjectedBundle/API/c/WKBundlePageOverlay.h:
Bump the BundlePageOverlay client version.
Add prepareForActionMenu callback.

* WebProcess/WebPage/WebPageOverlay.h:
(WebKit::WebPageOverlay::Client::prepareForActionMenu):
* WebProcess/WebPage/WebPageOverlay.cpp:
(WebKit::overlayMap):
(WebKit::WebPageOverlay::WebPageOverlay):
(WebKit::WebPageOverlay::~WebPageOverlay):
(WebKit::WebPageOverlay::fromCoreOverlay):
(WebKit::WebPageOverlay::pageOverlayDestroyed):
Keep track of a map of PageOverlay to WebPageOverlay.

(WebKit::WebPageOverlay::prepareForActionMenu):
Forward prepareForActionMenu to the client.

* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::performActionMenuHitTestAtLocation):
Iterate through the overlays and let them prepareForActionMenu;
the first overlay that returns true wins. If no overlays want to
do anything, hand preparation along to the context menu client.

* page/PageOverlayController.h:
Expose the list of all overlays.

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

6 years agoAdd button and enable optimized fullscreen.
jeremyj-wk@apple.com [Wed, 5 Nov 2014 01:36:42 +0000 (01:36 +0000)]
Add button and enable optimized fullscreen.
https://bugs.webkit.org/show_bug.cgi?id=138351

Reviewed by Eric Carlson.

Added optimizedFullscreenButton to js media element controls. Remove #if conditional
and use optimizedFullscreenSupported to enable feature at runtime

* Modules/mediacontrols/MediaControlsHost.cpp:
(WebCore::MediaControlsHost::enterFullscreenOptimized): enable
(WebCore::MediaControlsHost::optimizedFullscreenSupported): added
* Modules/mediacontrols/MediaControlsHost.h: add optimizedFullscreenSupported
* Modules/mediacontrols/MediaControlsHost.idl: ditto
* Modules/mediacontrols/mediaControlsApple.css:
(audio::-webkit-media-controls-optimized-fullscreen-button): added
* Modules/mediacontrols/mediaControlsApple.js:
(Controller.prototype.createControls): add button
(Controller.prototype.handleReadyStateChange): update button
(Controller.prototype.updateOptimizedFullscreenButton): added
* Modules/mediacontrols/mediaControlsiOS.css:
(audio::-webkit-media-controls-optimized-fullscreen-button): added
(video::-webkit-media-controls-optimized-fullscreen-button): added
(video::-webkit-media-controls-optimized-fullscreen-button:active): added
* Modules/mediacontrols/mediaControlsiOS.js:
(ControllerIOS.prototype.createControls): listen for events from optimizedFullscreenButton
(ControllerIOS.prototype.configureInlineControls): add button for non-audio when supported.
(ControllerIOS.prototype.handleBaseGestureChange): 2-finger double-tap gesture for optimized fullscreen
(ControllerIOS.prototype.handleWrapperTouchStart): ditto
(ControllerIOS.prototype.handleOptimizedFullscreenButtonClicked): added
(ControllerIOS.prototype.handleOptimizedFullscreenTouchStart): added
(ControllerIOS.prototype.handleOptimizedFullscreenTouchEnd): added
(ControllerIOS.prototype.handleOptimizedFullscreenTouchCancel): added
(ControllerIOS.prototype.handleStartPlaybackButtonTouchStart): fix typo
(ControllerIOS.prototype.handleStartPlaybackButtonTouchEnd): fix typo
(ControllerIOS.prototype.handleStartPlaybackButtonTouchCancel): fix typo
* WebCore.exp.in:
* platform/ios/WebCoreSystemInterfaceIOS.h: added wkIsOptimizedFullscreenSupported
* platform/ios/WebCoreSystemInterfaceIOS.mm: added wkIsOptimizedFullscreenSupported
* platform/ios/WebVideoFullscreenInterfaceAVKit.h:
* platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
(WebVideoFullscreenInterfaceAVKit::enterFullscreen): enable feature
(WebVideoFullscreenInterfaceAVKit::exitFullscreen): enable feature
(WebVideoFullscreenInterfaceAVKit::cleanupFullscreen): only request exit when entered and not requested exit
(WebVideoFullscreenInterfaceAVKit::requestHideAndExitFullscreen): ditto
* WebCoreSupport/WebSystemInterface.mm:
(InitWebCoreSystemInterface): added
* WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
(InitWebCoreSystemInterface): add IsOptimizedFullscreenSupported

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

6 years ago[iOS] Add long press support for links in WKPDFView
aestes@apple.com [Wed, 5 Nov 2014 01:24:20 +0000 (01:24 +0000)]
[iOS] Add long press support for links in WKPDFView
https://bugs.webkit.org/show_bug.cgi?id=138357

Reviewed by Dan Bernstein.

Use WKActionSheetAssistant to show a link action sheet in response to long-pressing on a link. Have WKPDFView
conform to WKActionSheetAssistantDelegate in order to respond to the open and copy actions as well as to
provide the link's URL and position information to WKActionSheetAssistant. The long-pressed link is highlighted
for .75 seconds before the sheet is displayed in order to match UIWebPDFView.

* UIProcess/ios/WKActionSheetAssistant.h: Made protocol methods that WKPDFView doesn't implement optional.
* UIProcess/ios/WKActionSheetAssistant.mm:
(-[WKActionSheetAssistant updatePositionInformation]): Checked if delegate responds to
updatePositionInformationForActionSheetAssistant: before calling.
(-[WKActionSheetAssistant _createSheetWithElementActions:showLinkTitle:]): Checked if delegate responds to
actionSheetAssistant:willStartInteractionWithElement: before calling.
(-[WKActionSheetAssistant cleanupSheet]): Checked if delegate responds to actionSheetAssistantDidStopInteraction:
before calling.
* UIProcess/ios/WKPDFView.h: Conformed to WKActionSheetAssistantDelegate.
* UIProcess/ios/WKPDFView.mm:
(-[WKPDFView web_initWithFrame:webView:]): Instantiated a WKActionSheetAssistant and set self as its delegate.
(-[WKPDFView _highlightLinkAnnotation:forDuration:completionHandler:]): Moved highlight drawing to here from
annotation:wasTouchedAtPoint:controller: in order to be reused for long-press.
(-[WKPDFView _URLForLinkAnnotation:]): Moved URL creation to here from annotation:wasTouchedAtPoint:controller:
in order to be reused for long-press. Generated an absolute URL since this URL might go into the pasteboard.
(-[WKPDFView annotation:wasTouchedAtPoint:controller:]): Changed to call
_highlightLinkAnnotation:forDuration:completionHandler: and _URLForLinkAnnotation:.
(-[WKPDFView annotation:isBeingPressedAtPoint:controller:]): Set values on _positionInformation and called
-[WKActionSheetAssistant showLinkSheet] after showing a highlight for .75 seconds.
(-[WKPDFView positionInformation]): Returned _positionInformation.
(-[WKPDFView performAction:]): Added a UTF-8 text and URL representation of the pressed URL to the pasteboard.
(-[WKPDFView openElementAtLocation:]): Called WebPage::navigateToURLWithSimulatedClick().
(-[WKPDFView actionsForElement:defaultActions:]): Returned actions from UIClient::actionsForElement().
(-[WKPDFView _createHighlightViewWithFrame:]): Deleted.

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