blob: 2c99ca77e19961c6f150e8583dd3ae767c1d124d [file] [log] [blame]
2014-11-21 Anders Carlsson <andersca@apple.com>
Remove the Timer parameters from timer callbacks
https://bugs.webkit.org/show_bug.cgi?id=138974
Reviewed by Antti Koivisto.
* Modules/encryptedmedia/MediaKeySession.cpp:
(WebCore::MediaKeySession::MediaKeySession):
(WebCore::MediaKeySession::keyRequestTimerFired):
(WebCore::MediaKeySession::addKeyTimerFired):
* Modules/encryptedmedia/MediaKeySession.h:
* Modules/geolocation/Geolocation.cpp:
(WebCore::Geolocation::GeoNotifier::GeoNotifier):
(WebCore::Geolocation::GeoNotifier::timerFired):
(WebCore::Geolocation::Geolocation):
(WebCore::Geolocation::resumeTimerFired):
* Modules/geolocation/Geolocation.h:
* Modules/indexeddb/IDBTransactionBackend.cpp:
(WebCore::IDBTransactionBackend::IDBTransactionBackend):
(WebCore::IDBTransactionBackend::taskTimerFired):
* Modules/indexeddb/IDBTransactionBackend.h:
* Modules/mediasource/SourceBuffer.cpp:
(WebCore::SourceBuffer::SourceBuffer):
(WebCore::SourceBuffer::appendBufferTimerFired):
(WebCore::SourceBuffer::removeTimerFired):
* Modules/mediasource/SourceBuffer.h:
* Modules/mediastream/MediaStream.cpp:
(WebCore::MediaStream::MediaStream):
(WebCore::MediaStream::scheduledEventTimerFired):
* Modules/mediastream/MediaStream.h:
* Modules/mediastream/RTCDTMFSender.cpp:
(WebCore::RTCDTMFSender::RTCDTMFSender):
(WebCore::RTCDTMFSender::scheduledEventTimerFired):
* Modules/mediastream/RTCDTMFSender.h:
* Modules/mediastream/RTCDataChannel.cpp:
(WebCore::RTCDataChannel::RTCDataChannel):
(WebCore::RTCDataChannel::scheduledEventTimerFired):
* Modules/mediastream/RTCDataChannel.h:
* Modules/mediastream/RTCPeerConnection.cpp:
(WebCore::RTCPeerConnection::RTCPeerConnection):
(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::NotificationRequestCallback):
(WebCore::NotificationCenter::NotificationRequestCallback::timerFired):
* Modules/notifications/NotificationCenter.h:
* Modules/websockets/WebSocketChannel.cpp:
(WebCore::WebSocketChannel::WebSocketChannel):
(WebCore::WebSocketChannel::resumeTimerFired):
(WebCore::WebSocketChannel::closingTimerFired):
* Modules/websockets/WebSocketChannel.h:
* accessibility/AXObjectCache.cpp:
(WebCore::AXObjectCache::AXObjectCache):
(WebCore::AXObjectCache::notificationPostTimerFired):
* accessibility/AXObjectCache.h:
* bindings/js/GCController.cpp:
(WebCore::GCController::GCController):
(WebCore::GCController::gcTimerFired):
* bindings/js/GCController.h:
* css/CSSFontFaceSource.h:
* css/CSSFontSelector.cpp:
(WebCore::CSSFontSelector::CSSFontSelector):
(WebCore::CSSFontSelector::beginLoadTimerFired):
* css/CSSFontSelector.h:
* css/CSSImageGeneratorValue.cpp:
(WebCore::CSSImageGeneratorValue::CachedGeneratedImage::CachedGeneratedImage):
* css/StyleResolver.cpp:
(WebCore::StyleResolver::StyleResolver):
(WebCore::StyleResolver::sweepMatchedPropertiesCache):
* css/StyleResolver.h:
* dom/Document.cpp:
(WebCore::Document::Document):
(WebCore::Document::visualUpdatesSuppressionTimerFired):
(WebCore::Document::styleRecalcTimerFired):
(WebCore::Document::optimizedStyleSheetUpdateTimerFired):
(WebCore::Document::sharedObjectPoolClearTimerFired):
(WebCore::Document::updateFocusAppearanceTimerFired):
(WebCore::Document::pendingTasksTimerFired):
(WebCore::Document::webkitWillEnterFullScreenForElement):
(WebCore::Document::webkitDidExitFullScreenForElement):
(WebCore::Document::fullScreenChangeDelayTimerFired):
(WebCore::Document::loadEventDelayTimerFired):
(WebCore::Document::didAssociateFormControlsTimerFired):
(WebCore::Document::domCookieCacheExpiryTimerFired):
* dom/Document.h:
* dom/EventSender.h:
(WebCore::EventSender::timerFired):
(WebCore::EventSender<T>::EventSender):
* dom/ScriptRunner.cpp:
(WebCore::ScriptRunner::ScriptRunner):
(WebCore::ScriptRunner::timerFired):
* dom/ScriptRunner.h:
* dom/ScriptedAnimationController.cpp:
(WebCore::ScriptedAnimationController::ScriptedAnimationController):
(WebCore::ScriptedAnimationController::animationTimerFired):
* dom/ScriptedAnimationController.h:
* dom/StyledElement.cpp:
(WebCore::PresentationAttributeCacheCleaner::PresentationAttributeCacheCleaner):
(WebCore::PresentationAttributeCacheCleaner::cleanCache):
* editing/AlternativeTextController.cpp:
(WebCore::AlternativeTextController::AlternativeTextController):
(WebCore::AlternativeTextController::timerFired):
* editing/AlternativeTextController.h:
* editing/Editor.cpp:
(WebCore::Editor::Editor):
(WebCore::Editor::updateEditorUINowIfScheduled):
(WebCore::Editor::editorUIUpdateTimerFired):
(WebCore::Editor::scanSelectionForTelephoneNumbers): Deleted.
* editing/Editor.h:
* editing/FrameSelection.cpp:
(WebCore::FrameSelection::FrameSelection):
(WebCore::FrameSelection::caretBlinkTimerFired):
* editing/FrameSelection.h:
* editing/SpellChecker.cpp:
(WebCore::SpellChecker::SpellChecker):
(WebCore::SpellChecker::timerFiredToProcessQueuedRequest):
* editing/SpellChecker.h:
* html/HTMLFormElement.cpp:
(WebCore::HTMLFormElement::HTMLFormElement):
(WebCore::HTMLFormElement::requestAutocompleteTimerFired):
* html/HTMLFormElement.h:
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::HTMLMediaElement):
(WebCore::HTMLMediaElement::parseAttribute):
* html/HTMLMediaElement.h:
* html/HTMLPlugInElement.cpp:
(WebCore::HTMLPlugInElement::HTMLPlugInElement):
(WebCore::HTMLPlugInElement::swapRendererTimerFired):
* html/HTMLPlugInElement.h:
* html/HTMLPlugInImageElement.cpp:
(WebCore::HTMLPlugInImageElement::HTMLPlugInImageElement):
(WebCore::HTMLPlugInImageElement::removeSnapshotTimerFired):
* html/HTMLPlugInImageElement.h:
* html/HTMLSourceElement.cpp:
(WebCore::HTMLSourceElement::HTMLSourceElement):
(WebCore::HTMLSourceElement::errorEventTimerFired):
* html/HTMLSourceElement.h:
* html/HTMLTrackElement.cpp:
(WebCore::HTMLTrackElement::HTMLTrackElement):
(WebCore::HTMLTrackElement::loadTimerFired):
* html/HTMLTrackElement.h:
* html/MediaController.cpp:
(MediaController::MediaController):
(MediaController::asyncEventTimerFired):
(MediaController::clearPositionTimerFired):
(MediaController::timeupdateTimerFired):
* html/MediaController.h:
* html/MediaDocument.cpp:
(WebCore::MediaDocument::MediaDocument):
(WebCore::MediaDocument::replaceMediaElementTimerFired):
* html/MediaDocument.h:
* html/SearchInputType.cpp:
(WebCore::SearchInputType::SearchInputType):
(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::WebGLRenderingContext):
(WebCore::WebGLRenderingContext::dispatchContextLostEvent):
(WebCore::WebGLRenderingContext::maybeRestoreContext):
* html/canvas/WebGLRenderingContext.h:
* html/parser/HTMLParserScheduler.cpp:
(WebCore::HTMLParserScheduler::HTMLParserScheduler):
(WebCore::HTMLParserScheduler::continueNextChunkTimerFired):
* html/parser/HTMLParserScheduler.h:
* html/shadow/MediaControlElements.cpp:
(WebCore::MediaControlPanelElement::MediaControlPanelElement):
(WebCore::MediaControlPanelElement::transitionTimerFired):
(WebCore::MediaControlTextTrackContainerElement::MediaControlTextTrackContainerElement):
(WebCore::MediaControlTextTrackContainerElement::updateTimerFired):
* html/shadow/MediaControlElements.h:
* html/shadow/MediaControls.cpp:
(WebCore::MediaControls::MediaControls):
(WebCore::MediaControls::hideFullscreenControlsTimerFired):
* html/shadow/MediaControls.h:
* html/shadow/SpinButtonElement.cpp:
(WebCore::SpinButtonElement::SpinButtonElement):
(WebCore::SpinButtonElement::repeatingTimerFired):
* html/shadow/SpinButtonElement.h:
* html/track/LoadableTextTrack.cpp:
(WebCore::LoadableTextTrack::LoadableTextTrack):
(WebCore::LoadableTextTrack::loadTimerFired):
* html/track/LoadableTextTrack.h:
* html/track/VTTRegion.cpp:
(WebCore::VTTRegion::VTTRegion):
(WebCore::VTTRegion::scrollTimerFired):
* html/track/VTTRegion.h:
* inspector/InspectorCSSAgent.cpp:
(WebCore::ChangeRegionOversetTask::ChangeRegionOversetTask):
(WebCore::ChangeRegionOversetTask::timerFired):
* inspector/InspectorDOMAgent.cpp:
(WebCore::RevalidateStyleAttributeTask::RevalidateStyleAttributeTask):
(WebCore::RevalidateStyleAttributeTask::timerFired):
* inspector/InspectorFrontendClientLocal.cpp:
(WebCore::InspectorBackendDispatchTask::InspectorBackendDispatchTask):
(WebCore::InspectorBackendDispatchTask::timerFired):
* inspector/InspectorOverlay.cpp:
(WebCore::InspectorOverlay::InspectorOverlay):
(WebCore::InspectorOverlay::updatePaintRectsTimerFired):
* inspector/InspectorOverlay.h:
* loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::DocumentLoader):
(WebCore::DocumentLoader::handleSubstituteDataLoadNow):
(WebCore::DocumentLoader::handleSubstituteDataLoadSoon):
(WebCore::DocumentLoader::substituteResourceDeliveryTimerFired):
* loader/DocumentLoader.h:
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::FrameLoader):
(WebCore::FrameLoader::checkTimerFired):
* loader/FrameLoader.h:
* loader/ImageLoader.cpp:
(WebCore::ImageLoader::ImageLoader):
(WebCore::ImageLoader::timerFired):
* loader/ImageLoader.h:
* loader/LinkLoader.cpp:
(WebCore::LinkLoader::LinkLoader):
(WebCore::LinkLoader::linkLoadTimerFired):
(WebCore::LinkLoader::linkLoadingErrorTimerFired):
* loader/LinkLoader.h:
* loader/NavigationScheduler.cpp:
(WebCore::NavigationScheduler::NavigationScheduler):
(WebCore::NavigationScheduler::timerFired):
* loader/NavigationScheduler.h:
* loader/PingLoader.cpp:
(WebCore::PingLoader::PingLoader):
* loader/PingLoader.h:
(WebCore::PingLoader::timeoutTimerFired):
* loader/ProgressTracker.cpp:
(WebCore::ProgressTracker::ProgressTracker):
(WebCore::ProgressTracker::progressHeartbeatTimerFired):
* loader/ProgressTracker.h:
* loader/ResourceLoadScheduler.cpp:
(WebCore::ResourceLoadScheduler::ResourceLoadScheduler):
(WebCore::ResourceLoadScheduler::requestTimerFired):
* loader/ResourceLoadScheduler.h:
* loader/TextTrackLoader.cpp:
(WebCore::TextTrackLoader::TextTrackLoader):
(WebCore::TextTrackLoader::cueLoadTimerFired):
* loader/TextTrackLoader.h:
* loader/cache/CachedResource.cpp:
(WebCore::CachedResource::CachedResource):
(WebCore::CachedResource::Callback::Callback):
(WebCore::CachedResource::Callback::timerFired):
* loader/cache/CachedResource.h:
* loader/cache/CachedResourceLoader.cpp:
(WebCore::CachedResourceLoader::CachedResourceLoader):
(WebCore::CachedResourceLoader::garbageCollectDocumentResourcesTimerFired):
* loader/cache/CachedResourceLoader.h:
* loader/icon/IconDatabase.cpp:
(WebCore::IconDatabase::IconDatabase):
(WebCore::IconDatabase::syncTimerFired):
* loader/icon/IconDatabase.h:
* page/AutoscrollController.cpp:
(WebCore::AutoscrollController::AutoscrollController):
(WebCore::AutoscrollController::autoscrollTimerFired):
* page/AutoscrollController.h:
* page/CaptionUserPreferences.cpp:
(WebCore::CaptionUserPreferences::CaptionUserPreferences):
(WebCore::CaptionUserPreferences::timerFired):
* page/CaptionUserPreferences.h:
* page/CaptionUserPreferencesMediaAF.cpp:
(WebCore::CaptionUserPreferencesMediaAF::CaptionUserPreferencesMediaAF):
(WebCore::CaptionUserPreferencesMediaAF::updateTimerFired):
* page/CaptionUserPreferencesMediaAF.h:
* page/DeviceController.cpp:
(WebCore::DeviceController::DeviceController):
(WebCore::DeviceController::fireDeviceEvent):
* page/DeviceController.h:
* page/EventHandler.cpp:
(WebCore::EventHandler::EventHandler):
(WebCore::EventHandler::cursorUpdateTimerFired):
(WebCore::EventHandler::autoHideCursorTimerFired):
(WebCore::EventHandler::recognizeLongMousePress):
(WebCore::EventHandler::fakeMouseMoveEventTimerFired):
(WebCore::EventHandler::hoverTimerFired):
* page/EventHandler.h:
* page/EventSource.cpp:
(WebCore::EventSource::EventSource):
(WebCore::EventSource::connectTimerFired):
* page/EventSource.h:
* page/FocusController.cpp:
(WebCore::FocusController::FocusController):
(WebCore::FocusController::focusRepaintTimerFired):
* page/FocusController.h:
* page/Frame.cpp:
(WebCore::Frame::Frame):
(WebCore::Frame::overflowAutoScrollTimerFired):
* page/Frame.h:
* page/FrameView.cpp:
(WebCore::FrameView::FrameView):
(WebCore::FrameView::delayedScrollEventTimerFired):
(WebCore::FrameView::speculativeTilingEnableTimerFired):
(WebCore::FrameView::layoutTimerFired):
(WebCore::FrameView::updateEmbeddedObjectsTimerFired):
(WebCore::FrameView::flushAnyPendingPostLayoutTasks):
(WebCore::FrameView::postLayoutTimerFired):
* page/FrameView.h:
* page/PageOverlay.cpp:
(WebCore::PageOverlay::PageOverlay):
(WebCore::PageOverlay::fadeAnimationTimerFired):
* page/PageOverlay.h:
* page/Settings.cpp:
(WebCore::Settings::Settings):
(WebCore::Settings::imageLoadingSettingsTimerFired):
* page/Settings.h:
* page/animation/AnimationController.cpp:
(WebCore::AnimationControllerPrivate::AnimationControllerPrivate):
(WebCore::AnimationControllerPrivate::updateStyleIfNeededDispatcherFired):
(WebCore::AnimationControllerPrivate::animationTimerFired):
* page/animation/AnimationControllerPrivate.h:
* page/mac/ServicesOverlayController.h:
* page/mac/ServicesOverlayController.mm:
(WebCore::ServicesOverlayController::ServicesOverlayController):
(WebCore::ServicesOverlayController::determineActiveHighlightTimerFired):
* page/scrolling/AsyncScrollingCoordinator.cpp:
(WebCore::AsyncScrollingCoordinator::AsyncScrollingCoordinator):
(WebCore::AsyncScrollingCoordinator::updateScrollPositionAfterAsyncScrollTimerFired):
* page/scrolling/AsyncScrollingCoordinator.h:
* page/scrolling/ios/ScrollingCoordinatorIOS.h:
* page/scrolling/ios/ScrollingCoordinatorIOS.mm:
(WebCore::ScrollingCoordinatorIOS::ScrollingCoordinatorIOS):
(WebCore::ScrollingCoordinatorIOS::scrollingStateTreeCommitterTimerFired):
* page/scrolling/mac/ScrollingCoordinatorMac.h:
* page/scrolling/mac/ScrollingCoordinatorMac.mm:
(WebCore::ScrollingCoordinatorMac::ScrollingCoordinatorMac):
(WebCore::ScrollingCoordinatorMac::scrollingStateTreeCommitterTimerFired):
* platform/HysteresisActivity.h:
(WebCore::HysteresisActivity::HysteresisActivity):
(WebCore::HysteresisActivity::hysteresisTimerFired):
* platform/ScrollAnimator.cpp:
(WebCore::ScrollAnimator::updateScrollAnimatorsAndTimers):
(WebCore::ScrollAnimator::horizontalScrollSnapTimerFired):
(WebCore::ScrollAnimator::verticalScrollSnapTimerFired):
* platform/ScrollAnimator.h:
* platform/Scrollbar.cpp:
(WebCore::Scrollbar::Scrollbar):
(WebCore::Scrollbar::autoscrollTimerFired):
* platform/Scrollbar.h:
* platform/Timer.h:
(WebCore::DeferrableOneShotTimer::DeferrableOneShotTimer):
(WebCore::Timer::Timer): Deleted.
* platform/audio/MediaSession.cpp:
(WebCore::MediaSession::MediaSession):
(WebCore::MediaSession::clientDataBufferingTimerFired):
* platform/audio/MediaSession.h:
* platform/graphics/BitmapImage.cpp:
(WebCore::BitmapImage::startAnimation):
(WebCore::BitmapImage::advanceAnimation):
* platform/graphics/BitmapImage.h:
* platform/graphics/MediaPlayer.cpp:
(WebCore::MediaPlayer::MediaPlayer):
(WebCore::MediaPlayer::reloadTimerFired):
* platform/graphics/MediaPlayer.h:
* platform/graphics/ShadowBlur.cpp:
(WebCore::ScratchBuffer::ScratchBuffer):
(WebCore::ScratchBuffer::timerFired):
* platform/graphics/avfoundation/MediaSelectionGroupAVFObjC.h:
* platform/graphics/avfoundation/MediaSelectionGroupAVFObjC.mm:
(WebCore::MediaSelectionGroupAVFObjC::MediaSelectionGroupAVFObjC):
(WebCore::MediaSelectionGroupAVFObjC::selectionTimerFired):
* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::MediaPlayerPrivateMediaSourceAVFObjC):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::seekTimerFired):
* platform/graphics/ca/LayerPool.cpp:
(WebCore::LayerPool::LayerPool):
(WebCore::LayerPool::pruneTimerFired):
* platform/graphics/ca/LayerPool.h:
* platform/graphics/ca/TileController.cpp:
(WebCore::TileController::TileController):
(WebCore::TileController::tileRevalidationTimerFired):
* platform/graphics/ca/TileController.h:
* platform/graphics/ca/TileGrid.cpp:
(WebCore::TileGrid::TileGrid):
(WebCore::TileGrid::cohortRemovalTimerFired):
* platform/graphics/ca/TileGrid.h:
* platform/graphics/cg/IOSurfacePool.cpp:
(WebCore::IOSurfacePool::IOSurfacePool):
(WebCore::IOSurfacePool::collectionTimerFired):
* platform/graphics/cg/IOSurfacePool.h:
* platform/graphics/cg/SubimageCacheWithTimer.cpp:
(WebCore::SubimageCacheWithTimer::SubimageCacheWithTimer):
* platform/graphics/mac/MediaPlayerPrivateQTKit.h:
* platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
(WebCore::MediaPlayerPrivateQTKit::MediaPlayerPrivateQTKit):
(WebCore::MediaPlayerPrivateQTKit::seekTimerFired):
* platform/ios/LegacyTileCache.h:
* platform/ios/LegacyTileCache.mm:
(WebCore::LegacyTileCache::LegacyTileCache):
(WebCore::LegacyTileCache::tileCreationTimerFired):
* platform/mac/HIDGamepadProvider.cpp:
(WebCore::HIDGamepadProvider::HIDGamepadProvider):
(WebCore::HIDGamepadProvider::connectionDelayTimerFired):
(WebCore::HIDGamepadProvider::inputNotificationTimerFired):
* platform/mac/HIDGamepadProvider.h:
* platform/mac/ScrollAnimatorMac.h:
* platform/mac/ScrollAnimatorMac.mm:
(WebCore::ScrollAnimatorMac::ScrollAnimatorMac):
(WebCore::ScrollAnimatorMac::snapRubberBandTimerFired):
(WebCore::ScrollAnimatorMac::initialScrollbarPaintTimerFired):
(WebCore::ScrollAnimatorMac::sendContentAreaScrolledTimerFired):
* platform/mock/DeviceOrientationClientMock.cpp:
(WebCore::DeviceOrientationClientMock::DeviceOrientationClientMock):
(WebCore::DeviceOrientationClientMock::timerFired):
* platform/mock/DeviceOrientationClientMock.h:
* platform/mock/PlatformSpeechSynthesizerMock.cpp:
(WebCore::PlatformSpeechSynthesizerMock::PlatformSpeechSynthesizerMock):
(WebCore::PlatformSpeechSynthesizerMock::speakingFinished):
* platform/mock/PlatformSpeechSynthesizerMock.h:
* platform/network/DNSResolveQueue.cpp:
(WebCore::DNSResolveQueue::DNSResolveQueue):
(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:
(WebCore::ResourceHandleInternal::ResourceHandleInternal):
* platform/network/mac/NetworkStateNotifierMac.cpp:
(WebCore::NetworkStateNotifier::networkStateChangeTimerFired):
(WebCore::NetworkStateNotifier::NetworkStateNotifier):
* rendering/ImageQualityController.cpp:
(WebCore::ImageQualityController::ImageQualityController):
(WebCore::ImageQualityController::highQualityRepaintTimerFired):
* rendering/ImageQualityController.h:
* rendering/RenderButton.cpp:
(WebCore::RenderButton::styleDidChange):
(WebCore::RenderButton::timerFired):
* rendering/RenderButton.h:
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::RenderLayerCompositor):
(WebCore::RenderLayerCompositor::updateCompositingLayersTimerFired):
(WebCore::RenderLayerCompositor::layerFlushTimerFired):
(WebCore::RenderLayerCompositor::paintRelatedMilestonesTimerFired):
* rendering/RenderLayerCompositor.h:
* rendering/RenderMarquee.cpp:
(WebCore::RenderMarquee::RenderMarquee):
(WebCore::RenderMarquee::timerFired):
* rendering/RenderMarquee.h:
* rendering/RenderNamedFlowThread.cpp:
(WebCore::RenderNamedFlowThread::RenderNamedFlowThread):
(WebCore::RenderNamedFlowThread::regionOversetChangeEventTimerFired):
* rendering/RenderNamedFlowThread.h:
* rendering/RenderProgress.cpp:
(WebCore::RenderProgress::RenderProgress):
(WebCore::RenderProgress::animationTimerFired):
* rendering/RenderProgress.h:
* rendering/RenderView.cpp:
(WebCore::RenderView::RenderView):
(WebCore::RenderView::lazyRepaintTimerFired):
* rendering/RenderView.h:
* replay/EventLoopInputDispatcher.cpp:
(WebCore::EventLoopInputDispatcher::EventLoopInputDispatcher):
(WebCore::EventLoopInputDispatcher::timerFired):
* replay/EventLoopInputDispatcher.h:
* storage/StorageAreaImpl.cpp:
(WebCore::StorageAreaImpl::StorageAreaImpl):
(WebCore::StorageAreaImpl::closeDatabaseTimerFired):
(WebCore::StorageAreaImpl::closeDatabaseIfIdle):
* storage/StorageAreaImpl.h:
* storage/StorageAreaSync.cpp:
(WebCore::StorageAreaSync::StorageAreaSync):
(WebCore::StorageAreaSync::scheduleFinalSync):
(WebCore::StorageAreaSync::syncTimerFired):
(WebCore::StorageAreaSync::scheduleSync):
* storage/StorageAreaSync.h:
* svg/SVGElement.cpp:
(WebCore::SVGElement::svgLoadEventTimerFired):
* svg/SVGElement.h:
* svg/SVGScriptElement.cpp:
(WebCore::SVGScriptElement::SVGScriptElement):
* svg/SVGStyleElement.cpp:
(WebCore::SVGStyleElement::SVGStyleElement):
* svg/SVGUseElement.cpp:
(WebCore::SVGUseElement::SVGUseElement):
* svg/animation/SMILTimeContainer.cpp:
(WebCore::SMILTimeContainer::SMILTimeContainer):
(WebCore::SMILTimeContainer::timerFired):
* svg/animation/SMILTimeContainer.h:
* xml/XMLHttpRequestProgressEventThrottle.cpp:
(WebCore::XMLHttpRequestProgressEventThrottle::XMLHttpRequestProgressEventThrottle):
(WebCore::XMLHttpRequestProgressEventThrottle::dispatchDeferredEvents):
* xml/XMLHttpRequestProgressEventThrottle.h:
2014-11-21 Anders Carlsson <andersca@apple.com>
Remove the Timer parameters from timer callbacks
https://bugs.webkit.org/show_bug.cgi?id=138974
Reviewed by Antti Koivisto.
* Modules/encryptedmedia/MediaKeySession.cpp:
(WebCore::MediaKeySession::MediaKeySession):
(WebCore::MediaKeySession::keyRequestTimerFired):
(WebCore::MediaKeySession::addKeyTimerFired):
* Modules/encryptedmedia/MediaKeySession.h:
* Modules/geolocation/Geolocation.cpp:
(WebCore::Geolocation::GeoNotifier::GeoNotifier):
(WebCore::Geolocation::GeoNotifier::timerFired):
(WebCore::Geolocation::Geolocation):
(WebCore::Geolocation::resumeTimerFired):
* Modules/geolocation/Geolocation.h:
* Modules/indexeddb/IDBTransactionBackend.cpp:
(WebCore::IDBTransactionBackend::IDBTransactionBackend):
(WebCore::IDBTransactionBackend::taskTimerFired):
* Modules/indexeddb/IDBTransactionBackend.h:
* Modules/mediasource/SourceBuffer.cpp:
(WebCore::SourceBuffer::SourceBuffer):
(WebCore::SourceBuffer::appendBufferTimerFired):
(WebCore::SourceBuffer::removeTimerFired):
* Modules/mediasource/SourceBuffer.h:
* Modules/mediastream/MediaStream.cpp:
(WebCore::MediaStream::MediaStream):
(WebCore::MediaStream::scheduledEventTimerFired):
* Modules/mediastream/MediaStream.h:
* Modules/mediastream/RTCDTMFSender.cpp:
(WebCore::RTCDTMFSender::RTCDTMFSender):
(WebCore::RTCDTMFSender::scheduledEventTimerFired):
* Modules/mediastream/RTCDTMFSender.h:
* Modules/mediastream/RTCDataChannel.cpp:
(WebCore::RTCDataChannel::RTCDataChannel):
(WebCore::RTCDataChannel::scheduledEventTimerFired):
* Modules/mediastream/RTCDataChannel.h:
* Modules/mediastream/RTCPeerConnection.cpp:
(WebCore::RTCPeerConnection::RTCPeerConnection):
(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::NotificationRequestCallback):
(WebCore::NotificationCenter::NotificationRequestCallback::timerFired):
* Modules/notifications/NotificationCenter.h:
* Modules/websockets/WebSocketChannel.cpp:
(WebCore::WebSocketChannel::WebSocketChannel):
(WebCore::WebSocketChannel::resumeTimerFired):
(WebCore::WebSocketChannel::closingTimerFired):
* Modules/websockets/WebSocketChannel.h:
* accessibility/AXObjectCache.cpp:
(WebCore::AXObjectCache::AXObjectCache):
(WebCore::AXObjectCache::notificationPostTimerFired):
* accessibility/AXObjectCache.h:
* bindings/js/GCController.cpp:
(WebCore::GCController::GCController):
(WebCore::GCController::gcTimerFired):
* bindings/js/GCController.h:
* css/CSSFontFaceSource.h:
* css/CSSFontSelector.cpp:
(WebCore::CSSFontSelector::CSSFontSelector):
(WebCore::CSSFontSelector::beginLoadTimerFired):
* css/CSSFontSelector.h:
* css/CSSImageGeneratorValue.cpp:
(WebCore::CSSImageGeneratorValue::CachedGeneratedImage::CachedGeneratedImage):
* css/StyleResolver.cpp:
(WebCore::StyleResolver::StyleResolver):
(WebCore::StyleResolver::sweepMatchedPropertiesCache):
* css/StyleResolver.h:
* dom/Document.cpp:
(WebCore::Document::Document):
(WebCore::Document::visualUpdatesSuppressionTimerFired):
(WebCore::Document::styleRecalcTimerFired):
(WebCore::Document::optimizedStyleSheetUpdateTimerFired):
(WebCore::Document::sharedObjectPoolClearTimerFired):
(WebCore::Document::updateFocusAppearanceTimerFired):
(WebCore::Document::pendingTasksTimerFired):
(WebCore::Document::webkitWillEnterFullScreenForElement):
(WebCore::Document::webkitDidExitFullScreenForElement):
(WebCore::Document::fullScreenChangeDelayTimerFired):
(WebCore::Document::loadEventDelayTimerFired):
(WebCore::Document::didAssociateFormControlsTimerFired):
(WebCore::Document::domCookieCacheExpiryTimerFired):
* dom/Document.h:
* dom/EventSender.h:
(WebCore::EventSender::timerFired):
(WebCore::EventSender<T>::EventSender):
* dom/ScriptRunner.cpp:
(WebCore::ScriptRunner::ScriptRunner):
(WebCore::ScriptRunner::timerFired):
* dom/ScriptRunner.h:
* dom/ScriptedAnimationController.cpp:
(WebCore::ScriptedAnimationController::ScriptedAnimationController):
(WebCore::ScriptedAnimationController::animationTimerFired):
* dom/ScriptedAnimationController.h:
* dom/StyledElement.cpp:
(WebCore::PresentationAttributeCacheCleaner::PresentationAttributeCacheCleaner):
(WebCore::PresentationAttributeCacheCleaner::cleanCache):
* editing/AlternativeTextController.cpp:
(WebCore::AlternativeTextController::AlternativeTextController):
(WebCore::AlternativeTextController::timerFired):
* editing/AlternativeTextController.h:
* editing/Editor.cpp:
(WebCore::Editor::Editor):
(WebCore::Editor::updateEditorUINowIfScheduled):
(WebCore::Editor::editorUIUpdateTimerFired):
(WebCore::Editor::scanSelectionForTelephoneNumbers): Deleted.
* editing/Editor.h:
* editing/FrameSelection.cpp:
(WebCore::FrameSelection::FrameSelection):
(WebCore::FrameSelection::caretBlinkTimerFired):
* editing/FrameSelection.h:
* editing/SpellChecker.cpp:
(WebCore::SpellChecker::SpellChecker):
(WebCore::SpellChecker::timerFiredToProcessQueuedRequest):
* editing/SpellChecker.h:
* html/HTMLFormElement.cpp:
(WebCore::HTMLFormElement::HTMLFormElement):
(WebCore::HTMLFormElement::requestAutocompleteTimerFired):
* html/HTMLFormElement.h:
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::HTMLMediaElement):
(WebCore::HTMLMediaElement::parseAttribute):
* html/HTMLMediaElement.h:
* html/HTMLPlugInElement.cpp:
(WebCore::HTMLPlugInElement::HTMLPlugInElement):
(WebCore::HTMLPlugInElement::swapRendererTimerFired):
* html/HTMLPlugInElement.h:
* html/HTMLPlugInImageElement.cpp:
(WebCore::HTMLPlugInImageElement::HTMLPlugInImageElement):
(WebCore::HTMLPlugInImageElement::removeSnapshotTimerFired):
* html/HTMLPlugInImageElement.h:
* html/HTMLSourceElement.cpp:
(WebCore::HTMLSourceElement::HTMLSourceElement):
(WebCore::HTMLSourceElement::errorEventTimerFired):
* html/HTMLSourceElement.h:
* html/HTMLTrackElement.cpp:
(WebCore::HTMLTrackElement::HTMLTrackElement):
(WebCore::HTMLTrackElement::loadTimerFired):
* html/HTMLTrackElement.h:
* html/MediaController.cpp:
(MediaController::MediaController):
(MediaController::asyncEventTimerFired):
(MediaController::clearPositionTimerFired):
(MediaController::timeupdateTimerFired):
* html/MediaController.h:
* html/MediaDocument.cpp:
(WebCore::MediaDocument::MediaDocument):
(WebCore::MediaDocument::replaceMediaElementTimerFired):
* html/MediaDocument.h:
* html/SearchInputType.cpp:
(WebCore::SearchInputType::SearchInputType):
(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::WebGLRenderingContext):
(WebCore::WebGLRenderingContext::dispatchContextLostEvent):
(WebCore::WebGLRenderingContext::maybeRestoreContext):
* html/canvas/WebGLRenderingContext.h:
* html/parser/HTMLParserScheduler.cpp:
(WebCore::HTMLParserScheduler::HTMLParserScheduler):
(WebCore::HTMLParserScheduler::continueNextChunkTimerFired):
* html/parser/HTMLParserScheduler.h:
* html/shadow/MediaControlElements.cpp:
(WebCore::MediaControlPanelElement::MediaControlPanelElement):
(WebCore::MediaControlPanelElement::transitionTimerFired):
(WebCore::MediaControlTextTrackContainerElement::MediaControlTextTrackContainerElement):
(WebCore::MediaControlTextTrackContainerElement::updateTimerFired):
* html/shadow/MediaControlElements.h:
* html/shadow/MediaControls.cpp:
(WebCore::MediaControls::MediaControls):
(WebCore::MediaControls::hideFullscreenControlsTimerFired):
* html/shadow/MediaControls.h:
* html/shadow/SpinButtonElement.cpp:
(WebCore::SpinButtonElement::SpinButtonElement):
(WebCore::SpinButtonElement::repeatingTimerFired):
* html/shadow/SpinButtonElement.h:
* html/track/LoadableTextTrack.cpp:
(WebCore::LoadableTextTrack::LoadableTextTrack):
(WebCore::LoadableTextTrack::loadTimerFired):
* html/track/LoadableTextTrack.h:
* html/track/VTTRegion.cpp:
(WebCore::VTTRegion::VTTRegion):
(WebCore::VTTRegion::scrollTimerFired):
* html/track/VTTRegion.h:
* inspector/InspectorCSSAgent.cpp:
(WebCore::ChangeRegionOversetTask::ChangeRegionOversetTask):
(WebCore::ChangeRegionOversetTask::timerFired):
* inspector/InspectorDOMAgent.cpp:
(WebCore::RevalidateStyleAttributeTask::RevalidateStyleAttributeTask):
(WebCore::RevalidateStyleAttributeTask::timerFired):
* inspector/InspectorFrontendClientLocal.cpp:
(WebCore::InspectorBackendDispatchTask::InspectorBackendDispatchTask):
(WebCore::InspectorBackendDispatchTask::timerFired):
* inspector/InspectorOverlay.cpp:
(WebCore::InspectorOverlay::InspectorOverlay):
(WebCore::InspectorOverlay::updatePaintRectsTimerFired):
* inspector/InspectorOverlay.h:
* loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::DocumentLoader):
(WebCore::DocumentLoader::handleSubstituteDataLoadNow):
(WebCore::DocumentLoader::handleSubstituteDataLoadSoon):
(WebCore::DocumentLoader::substituteResourceDeliveryTimerFired):
* loader/DocumentLoader.h:
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::FrameLoader):
(WebCore::FrameLoader::checkTimerFired):
* loader/FrameLoader.h:
* loader/ImageLoader.cpp:
(WebCore::ImageLoader::ImageLoader):
(WebCore::ImageLoader::timerFired):
* loader/ImageLoader.h:
* loader/LinkLoader.cpp:
(WebCore::LinkLoader::LinkLoader):
(WebCore::LinkLoader::linkLoadTimerFired):
(WebCore::LinkLoader::linkLoadingErrorTimerFired):
* loader/LinkLoader.h:
* loader/NavigationScheduler.cpp:
(WebCore::NavigationScheduler::NavigationScheduler):
(WebCore::NavigationScheduler::timerFired):
* loader/NavigationScheduler.h:
* loader/PingLoader.cpp:
(WebCore::PingLoader::PingLoader):
* loader/PingLoader.h:
(WebCore::PingLoader::timeoutTimerFired):
* loader/ProgressTracker.cpp:
(WebCore::ProgressTracker::ProgressTracker):
(WebCore::ProgressTracker::progressHeartbeatTimerFired):
* loader/ProgressTracker.h:
* loader/ResourceLoadScheduler.cpp:
(WebCore::ResourceLoadScheduler::ResourceLoadScheduler):
(WebCore::ResourceLoadScheduler::requestTimerFired):
* loader/ResourceLoadScheduler.h:
* loader/TextTrackLoader.cpp:
(WebCore::TextTrackLoader::TextTrackLoader):
(WebCore::TextTrackLoader::cueLoadTimerFired):
* loader/TextTrackLoader.h:
* loader/cache/CachedResource.cpp:
(WebCore::CachedResource::CachedResource):
(WebCore::CachedResource::Callback::Callback):
(WebCore::CachedResource::Callback::timerFired):
* loader/cache/CachedResource.h:
* loader/cache/CachedResourceLoader.cpp:
(WebCore::CachedResourceLoader::CachedResourceLoader):
(WebCore::CachedResourceLoader::garbageCollectDocumentResourcesTimerFired):
* loader/cache/CachedResourceLoader.h:
* loader/icon/IconDatabase.cpp:
(WebCore::IconDatabase::IconDatabase):
(WebCore::IconDatabase::syncTimerFired):
* loader/icon/IconDatabase.h:
* page/AutoscrollController.cpp:
(WebCore::AutoscrollController::AutoscrollController):
(WebCore::AutoscrollController::autoscrollTimerFired):
* page/AutoscrollController.h:
* page/CaptionUserPreferences.cpp:
(WebCore::CaptionUserPreferences::CaptionUserPreferences):
(WebCore::CaptionUserPreferences::timerFired):
* page/CaptionUserPreferences.h:
* page/CaptionUserPreferencesMediaAF.cpp:
(WebCore::CaptionUserPreferencesMediaAF::CaptionUserPreferencesMediaAF):
(WebCore::CaptionUserPreferencesMediaAF::updateTimerFired):
* page/CaptionUserPreferencesMediaAF.h:
* page/DeviceController.cpp:
(WebCore::DeviceController::DeviceController):
(WebCore::DeviceController::fireDeviceEvent):
* page/DeviceController.h:
* page/EventHandler.cpp:
(WebCore::EventHandler::EventHandler):
(WebCore::EventHandler::cursorUpdateTimerFired):
(WebCore::EventHandler::autoHideCursorTimerFired):
(WebCore::EventHandler::recognizeLongMousePress):
(WebCore::EventHandler::fakeMouseMoveEventTimerFired):
(WebCore::EventHandler::hoverTimerFired):
* page/EventHandler.h:
* page/EventSource.cpp:
(WebCore::EventSource::EventSource):
(WebCore::EventSource::connectTimerFired):
* page/EventSource.h:
* page/FocusController.cpp:
(WebCore::FocusController::FocusController):
(WebCore::FocusController::focusRepaintTimerFired):
* page/FocusController.h:
* page/Frame.cpp:
(WebCore::Frame::Frame):
(WebCore::Frame::overflowAutoScrollTimerFired):
* page/Frame.h:
* page/FrameView.cpp:
(WebCore::FrameView::FrameView):
(WebCore::FrameView::delayedScrollEventTimerFired):
(WebCore::FrameView::speculativeTilingEnableTimerFired):
(WebCore::FrameView::layoutTimerFired):
(WebCore::FrameView::updateEmbeddedObjectsTimerFired):
(WebCore::FrameView::flushAnyPendingPostLayoutTasks):
(WebCore::FrameView::postLayoutTimerFired):
* page/FrameView.h:
* page/PageOverlay.cpp:
(WebCore::PageOverlay::PageOverlay):
(WebCore::PageOverlay::fadeAnimationTimerFired):
* page/PageOverlay.h:
* page/Settings.cpp:
(WebCore::Settings::Settings):
(WebCore::Settings::imageLoadingSettingsTimerFired):
* page/Settings.h:
* page/animation/AnimationController.cpp:
(WebCore::AnimationControllerPrivate::AnimationControllerPrivate):
(WebCore::AnimationControllerPrivate::updateStyleIfNeededDispatcherFired):
(WebCore::AnimationControllerPrivate::animationTimerFired):
* page/animation/AnimationControllerPrivate.h:
* page/mac/ServicesOverlayController.h:
* page/mac/ServicesOverlayController.mm:
(WebCore::ServicesOverlayController::ServicesOverlayController):
(WebCore::ServicesOverlayController::determineActiveHighlightTimerFired):
* page/scrolling/AsyncScrollingCoordinator.cpp:
(WebCore::AsyncScrollingCoordinator::AsyncScrollingCoordinator):
(WebCore::AsyncScrollingCoordinator::updateScrollPositionAfterAsyncScrollTimerFired):
* page/scrolling/AsyncScrollingCoordinator.h:
* page/scrolling/ios/ScrollingCoordinatorIOS.h:
* page/scrolling/ios/ScrollingCoordinatorIOS.mm:
(WebCore::ScrollingCoordinatorIOS::ScrollingCoordinatorIOS):
(WebCore::ScrollingCoordinatorIOS::scrollingStateTreeCommitterTimerFired):
* page/scrolling/mac/ScrollingCoordinatorMac.h:
* page/scrolling/mac/ScrollingCoordinatorMac.mm:
(WebCore::ScrollingCoordinatorMac::ScrollingCoordinatorMac):
(WebCore::ScrollingCoordinatorMac::scrollingStateTreeCommitterTimerFired):
* platform/HysteresisActivity.h:
(WebCore::HysteresisActivity::HysteresisActivity):
(WebCore::HysteresisActivity::hysteresisTimerFired):
* platform/ScrollAnimator.cpp:
(WebCore::ScrollAnimator::updateScrollAnimatorsAndTimers):
(WebCore::ScrollAnimator::horizontalScrollSnapTimerFired):
(WebCore::ScrollAnimator::verticalScrollSnapTimerFired):
* platform/ScrollAnimator.h:
* platform/Scrollbar.cpp:
(WebCore::Scrollbar::Scrollbar):
(WebCore::Scrollbar::autoscrollTimerFired):
* platform/Scrollbar.h:
* platform/Timer.h:
(WebCore::DeferrableOneShotTimer::DeferrableOneShotTimer):
(WebCore::Timer::Timer): Deleted.
* platform/audio/MediaSession.cpp:
(WebCore::MediaSession::MediaSession):
(WebCore::MediaSession::clientDataBufferingTimerFired):
* platform/audio/MediaSession.h:
* platform/graphics/BitmapImage.cpp:
(WebCore::BitmapImage::startAnimation):
(WebCore::BitmapImage::advanceAnimation):
* platform/graphics/BitmapImage.h:
* platform/graphics/MediaPlayer.cpp:
(WebCore::MediaPlayer::MediaPlayer):
(WebCore::MediaPlayer::reloadTimerFired):
* platform/graphics/MediaPlayer.h:
* platform/graphics/ShadowBlur.cpp:
(WebCore::ScratchBuffer::ScratchBuffer):
(WebCore::ScratchBuffer::timerFired):
* platform/graphics/avfoundation/MediaSelectionGroupAVFObjC.h:
* platform/graphics/avfoundation/MediaSelectionGroupAVFObjC.mm:
(WebCore::MediaSelectionGroupAVFObjC::MediaSelectionGroupAVFObjC):
(WebCore::MediaSelectionGroupAVFObjC::selectionTimerFired):
* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::MediaPlayerPrivateMediaSourceAVFObjC):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::seekTimerFired):
* platform/graphics/ca/LayerPool.cpp:
(WebCore::LayerPool::LayerPool):
(WebCore::LayerPool::pruneTimerFired):
* platform/graphics/ca/LayerPool.h:
* platform/graphics/ca/TileController.cpp:
(WebCore::TileController::TileController):
(WebCore::TileController::tileRevalidationTimerFired):
* platform/graphics/ca/TileController.h:
* platform/graphics/ca/TileGrid.cpp:
(WebCore::TileGrid::TileGrid):
(WebCore::TileGrid::cohortRemovalTimerFired):
* platform/graphics/ca/TileGrid.h:
* platform/graphics/cg/IOSurfacePool.cpp:
(WebCore::IOSurfacePool::IOSurfacePool):
(WebCore::IOSurfacePool::collectionTimerFired):
* platform/graphics/cg/IOSurfacePool.h:
* platform/graphics/cg/SubimageCacheWithTimer.cpp:
(WebCore::SubimageCacheWithTimer::SubimageCacheWithTimer):
* platform/graphics/mac/MediaPlayerPrivateQTKit.h:
* platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
(WebCore::MediaPlayerPrivateQTKit::MediaPlayerPrivateQTKit):
(WebCore::MediaPlayerPrivateQTKit::seekTimerFired):
* platform/ios/LegacyTileCache.h:
* platform/ios/LegacyTileCache.mm:
(WebCore::LegacyTileCache::LegacyTileCache):
(WebCore::LegacyTileCache::tileCreationTimerFired):
* platform/mac/HIDGamepadProvider.cpp:
(WebCore::HIDGamepadProvider::HIDGamepadProvider):
(WebCore::HIDGamepadProvider::connectionDelayTimerFired):
(WebCore::HIDGamepadProvider::inputNotificationTimerFired):
* platform/mac/HIDGamepadProvider.h:
* platform/mac/ScrollAnimatorMac.h:
* platform/mac/ScrollAnimatorMac.mm:
(WebCore::ScrollAnimatorMac::ScrollAnimatorMac):
(WebCore::ScrollAnimatorMac::snapRubberBandTimerFired):
(WebCore::ScrollAnimatorMac::initialScrollbarPaintTimerFired):
(WebCore::ScrollAnimatorMac::sendContentAreaScrolledTimerFired):
* platform/mock/DeviceOrientationClientMock.cpp:
(WebCore::DeviceOrientationClientMock::DeviceOrientationClientMock):
(WebCore::DeviceOrientationClientMock::timerFired):
* platform/mock/DeviceOrientationClientMock.h:
* platform/mock/PlatformSpeechSynthesizerMock.cpp:
(WebCore::PlatformSpeechSynthesizerMock::PlatformSpeechSynthesizerMock):
(WebCore::PlatformSpeechSynthesizerMock::speakingFinished):
* platform/mock/PlatformSpeechSynthesizerMock.h:
* platform/network/DNSResolveQueue.cpp:
(WebCore::DNSResolveQueue::DNSResolveQueue):
(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:
(WebCore::ResourceHandleInternal::ResourceHandleInternal):
* platform/network/mac/NetworkStateNotifierMac.cpp:
(WebCore::NetworkStateNotifier::networkStateChangeTimerFired):
(WebCore::NetworkStateNotifier::NetworkStateNotifier):
* rendering/ImageQualityController.cpp:
(WebCore::ImageQualityController::ImageQualityController):
(WebCore::ImageQualityController::highQualityRepaintTimerFired):
* rendering/ImageQualityController.h:
* rendering/RenderButton.cpp:
(WebCore::RenderButton::styleDidChange):
(WebCore::RenderButton::timerFired):
* rendering/RenderButton.h:
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::RenderLayerCompositor):
(WebCore::RenderLayerCompositor::updateCompositingLayersTimerFired):
(WebCore::RenderLayerCompositor::layerFlushTimerFired):
(WebCore::RenderLayerCompositor::paintRelatedMilestonesTimerFired):
* rendering/RenderLayerCompositor.h:
* rendering/RenderMarquee.cpp:
(WebCore::RenderMarquee::RenderMarquee):
(WebCore::RenderMarquee::timerFired):
* rendering/RenderMarquee.h:
* rendering/RenderNamedFlowThread.cpp:
(WebCore::RenderNamedFlowThread::RenderNamedFlowThread):
(WebCore::RenderNamedFlowThread::regionOversetChangeEventTimerFired):
* rendering/RenderNamedFlowThread.h:
* rendering/RenderProgress.cpp:
(WebCore::RenderProgress::RenderProgress):
(WebCore::RenderProgress::animationTimerFired):
* rendering/RenderProgress.h:
* rendering/RenderView.cpp:
(WebCore::RenderView::RenderView):
(WebCore::RenderView::lazyRepaintTimerFired):
* rendering/RenderView.h:
* replay/EventLoopInputDispatcher.cpp:
(WebCore::EventLoopInputDispatcher::EventLoopInputDispatcher):
(WebCore::EventLoopInputDispatcher::timerFired):
* replay/EventLoopInputDispatcher.h:
* storage/StorageAreaImpl.cpp:
(WebCore::StorageAreaImpl::StorageAreaImpl):
(WebCore::StorageAreaImpl::closeDatabaseTimerFired):
(WebCore::StorageAreaImpl::closeDatabaseIfIdle):
* storage/StorageAreaImpl.h:
* storage/StorageAreaSync.cpp:
(WebCore::StorageAreaSync::StorageAreaSync):
(WebCore::StorageAreaSync::scheduleFinalSync):
(WebCore::StorageAreaSync::syncTimerFired):
(WebCore::StorageAreaSync::scheduleSync):
* storage/StorageAreaSync.h:
* svg/SVGElement.cpp:
(WebCore::SVGElement::svgLoadEventTimerFired):
* svg/SVGElement.h:
* svg/SVGScriptElement.cpp:
(WebCore::SVGScriptElement::SVGScriptElement):
* svg/SVGStyleElement.cpp:
(WebCore::SVGStyleElement::SVGStyleElement):
* svg/SVGUseElement.cpp:
(WebCore::SVGUseElement::SVGUseElement):
* svg/animation/SMILTimeContainer.cpp:
(WebCore::SMILTimeContainer::SMILTimeContainer):
(WebCore::SMILTimeContainer::timerFired):
* svg/animation/SMILTimeContainer.h:
* xml/XMLHttpRequestProgressEventThrottle.cpp:
(WebCore::XMLHttpRequestProgressEventThrottle::XMLHttpRequestProgressEventThrottle):
(WebCore::XMLHttpRequestProgressEventThrottle::dispatchDeferredEvents):
* xml/XMLHttpRequestProgressEventThrottle.h:
2014-11-21 Chris Dumez <cdumez@apple.com>
Crash when setting 'transition-delay' CSS property to a calculated value
https://bugs.webkit.org/show_bug.cgi?id=138784
Reviewed by Sam Weinig.
Update CSSPrimitiveValue::computeTime() to use primitiveType() instead
of m_primitiveUnitType so that it properly handles calculated values.
Without this, we would hit the ASSERT_NOT_REACHED() assertion in
computeTime() for calculated values.
Test: fast/css/transition-delay-calculated-value.html
* css/CSSPrimitiveValue.h:
(WebCore::CSSPrimitiveValue::computeTime):
2014-11-21 Chris Dumez <cdumez@apple.com>
Regression(r175381): -webkit-mask-box-image is broken
https://bugs.webkit.org/show_bug.cgi?id=138969
<rdar://problem/19054471>
Reviewed by Simon Fraser.
After r175381, the StyleBuilder would call NinePieceImage::setMaskDefaults()
*after* calling CSSToStyleMap::mapNinePieceImage(), instead of *before*, for
-webkit-mask-box-image CSS property. This was causing the mask defaults to
overwrite what was set by mapNinePieceImage().
Test: fast/css/webkit-mask-box-image.html
* css/StyleBuilderConverter.h:
(WebCore::StyleBuilderConverter::convertBorderMask):
2014-11-21 Chris Dumez <cdumez@apple.com>
Crash when setting 'font' CSS property to 'calc(2 * 3)'
https://bugs.webkit.org/show_bug.cgi?id=138933
Reviewed by Darin Adler.
The CSS Parser was not handling calculated values when parsing the font
weight. This would lead us to hit an assertion when parsing a font
property whose weight is set to a calculated value.
This patch updates parseFontWeight() to properly handle calculated
values.
Test: fast/css/font-calculated-value.html
* css/CSSParser.cpp:
(WebCore::CSSParser::parseFontWeight):
2014-11-21 Bear Travis <betravis@gmail.com>
[CSS Font Loading] Switch to dispatching events asynchronously
https://bugs.webkit.org/show_bug.cgi?id=138755
Reviewed by Simon Fraser.
Moving FontLoader to dispatch events and notify callbacks similarly
to EventSender or the GenericEventQueue. Several bugs have popped
up in the past because FontLoader has been sending events during
layout, and there is no need for that to be the case.
Covered by existing font loader event tests. Added an additional
test for the svg case, fontloader-svg-select.
* css/FontLoader.cpp:
(WebCore::FontLoader::didLayout):
(WebCore::FontLoader::timerFired): Adding asynchronous callback.
(WebCore::FontLoader::scheduleEvent): Add an event to the dispatch
queue.
(WebCore::FontLoader::firePendingEvents): Modified to handle the
loading done event and callbacks.
(WebCore::FontLoader::loadingDone): Modified to spin up the timer
rather than immediately dispatching events.
* css/FontLoader.h:
2014-11-21 Daniel Bates <dabates@apple.com>
Attempt to fix the internal Apple Mavericks build after <https://trac.webkit.org/changeset/176448>
(https://bugs.webkit.org/show_bug.cgi?id=138930)
Declare NSCachedURLResponse SPI when building without the Apple Internal SDK and with the Apple
Internal SDK when building for OS X Mavericks or earlier.
* platform/spi/cf/CFNetworkSPI.h:
2014-11-21 Anders Carlsson <andersca@apple.com>
Make memoryCache() return a reference
https://bugs.webkit.org/show_bug.cgi?id=138939
Reviewed by Antti Koivisto.
* inspector/InspectorPageAgent.cpp:
(WebCore::InspectorPageAgent::cachedResource):
* inspector/InspectorResourceAgent.cpp:
(WebCore::InspectorResourceAgent::replayXHR):
(WebCore::InspectorResourceAgent::setCacheDisabled):
(WebCore::InspectorResourceAgent::mainFrameNavigated):
* loader/DocumentLoader.cpp:
(WebCore::areAllLoadersPageCacheAcceptable):
(WebCore::DocumentLoader::finishedLoading):
(WebCore::DocumentLoader::responseReceived):
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::tellClientAboutPastMemoryCacheLoads):
* loader/SubresourceLoader.cpp:
(WebCore::SubresourceLoader::willSendRequest):
(WebCore::SubresourceLoader::didReceiveResponse):
(WebCore::SubresourceLoader::didFail):
(WebCore::SubresourceLoader::willCancel):
* loader/archive/cf/LegacyWebArchive.cpp:
(WebCore::LegacyWebArchive::create):
* loader/cache/CachedImage.cpp:
(WebCore::CachedImage::addIncrementalDataBuffer):
(WebCore::CachedImage::finishLoading):
* loader/cache/CachedResource.cpp:
(WebCore::deadDecodedDataDeletionIntervalForResourceType):
(WebCore::CachedResource::~CachedResource):
(WebCore::CachedResource::failBeforeStarting):
(WebCore::CachedResource::addClientToSet):
(WebCore::CachedResource::removeClient):
(WebCore::CachedResource::destroyDecodedDataIfNeeded):
(WebCore::CachedResource::setDecodedSize):
(WebCore::CachedResource::setEncodedSize):
(WebCore::CachedResource::didAccessDecodedData):
* loader/cache/CachedResourceLoader.cpp:
(WebCore::CachedResourceLoader::requestUserCSSStyleSheet):
(WebCore::CachedResourceLoader::requestResource):
(WebCore::CachedResourceLoader::revalidateResource):
(WebCore::CachedResourceLoader::loadResource):
(WebCore::CachedResourceLoader::clearPreloads):
(WebCore::CachedResourceLoader::printPreloadStats):
* loader/cache/MemoryCache.cpp:
(WebCore::memoryCache):
(WebCore::MemoryCache::removeRequestFromCache):
(WebCore::MemoryCache::removeRequestFromSessionCaches):
* loader/cache/MemoryCache.h:
* loader/cocoa/DiskCacheMonitorCocoa.mm:
(WebCore::DiskCacheMonitor::resourceBecameFileBacked):
* page/FrameView.cpp:
(WebCore::FrameView::willPaintContents):
(WebCore::FrameView::didPaintContents):
* platform/MemoryPressureHandler.cpp:
(WebCore::MemoryPressureHandler::releaseCriticalMemory):
* testing/Internals.cpp:
(WebCore::Internals::isLoadingFromMemoryCache):
2014-11-21 Daniel Bates <dabates@apple.com>
[iOS] WebKit2 fails to build with public SDK due to missing SPI from CFNetwork, QuartzCore, MediaPlayer, XPC
https://bugs.webkit.org/show_bug.cgi?id=138930
Reviewed by Anders Carlsson.
* WebCore.xcodeproj/project.pbxproj: Rename header MPAVRoutingControllerSPI.h to MediaPlayerSPI.h.
* loader/cocoa/SubresourceLoaderCocoa.mm: Move NSCachedURLResponse forward declarations to file
CFNetworkSPI.h and include header CFNetworkSPI.h.
* loader/mac/ResourceLoaderMac.mm: Ditto.
* platform/audio/ios/MediaSessionManagerIOS.mm: Substitute MediaPlayerSPI.h for MPAVRoutingControllerSPI.h.
* platform/spi/cf/CFNetworkSPI.h: Add more SPI.
* platform/spi/cg/CoreGraphicsSPI.h: Ditto.
* platform/spi/cocoa/QuartzCoreSPI.h: Ditto.
* platform/spi/ios/MediaPlayerSPI.h: Renamed from Source/WebCore/platform/spi/ios/MPAVRoutingControllerSPI.h.
2014-11-21 Chris Fleizach <cfleizach@apple.com>
AX: MathML expressions are misread by VoiceOver
https://bugs.webkit.org/show_bug.cgi?id=138948
Reviewed by Mario Sanchez Prada.
The logic for deciding what's the radicand and an index was too tied to children placement.
We should instead pull directly from the source.
Test: platform/mac/accessibility/mathml-root.html
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::mathRadicandObject):
(WebCore::AccessibilityRenderObject::mathRootIndexObject):
* rendering/mathml/RenderMathMLRoot.h:
2014-11-20 Benjamin Poulain <bpoulain@apple.com>
Remove the remaining vestiges of minimal-ui
https://bugs.webkit.org/show_bug.cgi?id=138890
Reviewed by Sam Weinig.
In ViewportArguments' setViewportFeature(), I skip the warning for now.
* WebCore.exp.in:
* dom/ViewportArguments.cpp:
(WebCore::setViewportFeature):
* dom/ViewportArguments.h:
(WebCore::ViewportArguments::ViewportArguments):
(WebCore::ViewportArguments::operator==):
* page/ViewportConfiguration.cpp:
(WebCore::ViewportConfiguration::ViewportConfiguration):
(WebCore::ViewportConfiguration::initialScale):
(WebCore::ViewportConfiguration::minimumScale):
(WebCore::ViewportConfiguration::updateConfiguration):
(WebCore::ViewportConfiguration::viewportArgumentsLength):
(WebCore::ViewportConfiguration::layoutWidth):
(WebCore::ViewportConfiguration::layoutHeight):
(WebCore::ViewportConfigurationTextStream::operator<<):
(WebCore::ViewportConfiguration::description):
(WebCore::ViewportConfiguration::setMinimumLayoutSizeForMinimalUI): Deleted.
(WebCore::ViewportConfiguration::activeMinimumLayoutSizeInScrollViewCoordinates): Deleted.
(WebCore::ViewportConfiguration::resetMinimalUI): Deleted.
(WebCore::ViewportConfiguration::didFinishDocumentLoad): Deleted.
* page/ViewportConfiguration.h:
(WebCore::ViewportConfiguration::minimumLayoutSizeForMinimalUI): Deleted.
(WebCore::ViewportConfiguration::usesMinimalUI): Deleted.
2014-11-20 Benjamin Poulain <benjamin@webkit.org>
Web Inspector: do not show invalid specificity for dynamic cases of :matches()
https://bugs.webkit.org/show_bug.cgi?id=138911
Reviewed by Joseph Pecoraro.
* css/CSSSelector.cpp:
(WebCore::simpleSelectorFunctionalPseudoClassStaticSpecificity):
(WebCore::functionalPseudoClassStaticSpecificity):
(WebCore::staticSpecificityInternal):
(WebCore::CSSSelector::staticSpecificity):
(WebCore::CSSSelector::specificity): Deleted.
* css/CSSSelector.h:
Add an additional computation path for the inspector.
The regular path ignores everything inside function pseudo classes.
This new path takes the static specificity of the regular path, then evaluate
recursively all the selector lists inside any level of :matches().
If two complex selector of selector list do not have the same specificity,
we bail out and refuse to compute a static specificity representing the selector.
* inspector/InspectorStyleSheet.cpp:
(WebCore::buildObjectForSelectorHelper):
(WebCore::selectorsFromSource):
(WebCore::InspectorStyleSheet::buildObjectForSelector):
Do not add the complexity to the inspector's CSSSelector structure whenever
it is dynamic.
2014-11-20 Benjamin Poulain <bpoulain@apple.com>
Remove InspectorCSSAgent::buildArrayForRuleList()
https://bugs.webkit.org/show_bug.cgi?id=138907
Reviewed by Andreas Kling.
* inspector/InspectorCSSAgent.cpp:
(WebCore::InspectorCSSAgent::buildArrayForRuleList): Deleted.
* inspector/InspectorCSSAgent.h:
2014-11-20 Zalan Bujtas <zalan@apple.com>
REGRESSION (174986): CSS clip property is ignored when border-radius is present.
https://bugs.webkit.org/show_bug.cgi?id=138935
rdar://problem/18965984
Reviewed by Simon Fraser.
Revert back to r163382 and fix bug 127729 properly. Save the graphics context when paint and clip rects are
the same, but the clip rect has radius.
Each iteration on ::clipRect() from r163382 onwards just introduced yet another regression.
Test: fast/clip/css-clip-does-not-work-when-border-radius-is-present.html
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::clipToRect):
2014-11-20 Geoffrey Garen <ggaren@apple.com>
Removed the custom allocator for PODRedBlackTree
https://bugs.webkit.org/show_bug.cgi?id=138942
Reviewed by Sam Weinig.
bmalloc is fast enough.
* WebCore.xcodeproj/project.pbxproj:
* platform/PODArena.h: Removed.
* platform/PODFreeListArena.h: Removed. This is the point of the patch.
* platform/PODIntervalTree.h:
(WebCore::PODIntervalTree::PODIntervalTree): Deleted. As a side effect
of removing our custom allocator, we can no longer have a special
"I'm not initialized yet" state. Instead, the tree either exists or not,
like an idiomatic C++ object.
* platform/PODRedBlackTree.h:
(WebCore::PODRedBlackTree::PODRedBlackTree): Ditto.
(WebCore::PODRedBlackTree::~PODRedBlackTree): We need to clear in our
destructor because we can no longer rely on the arena destructor
implicitly freeing our tree nodes.
Side note: This change basically removes the whole reason for having
a purpose-built tree for POD data. We should probably remove this whole
data structure in a follow-up patch, and just use a standard tree.
(WebCore::PODRedBlackTree::clear):
(WebCore::PODRedBlackTree::add):
(WebCore::PODRedBlackTree::remove):
(WebCore::PODRedBlackTree::contains):
(WebCore::PODRedBlackTree::visitInorder):
(WebCore::PODRedBlackTree::size):
(WebCore::PODRedBlackTree::checkInvariants):
(WebCore::PODRedBlackTree::dump):
(WebCore::PODRedBlackTree::deleteNode):
(WebCore::PODRedBlackTree::markFree): Use normal new/delete, and mark
ourselves as fast allocated so we get the bmalloc goodness.
(WebCore::PODRedBlackTree::isInitialized): Deleted.
(WebCore::PODRedBlackTree::initIfNeeded): Deleted.
* rendering/FloatingObjects.cpp:
(WebCore::FloatingObjects::findNextFloatLogicalBottomBelow):
(WebCore::FloatingObjects::findNextFloatLogicalBottomBelowForBlock):
(WebCore::FloatingObjects::FloatingObjects):
(WebCore::FloatingObjects::clear):
(WebCore::FloatingObjects::addPlacedObject):
(WebCore::FloatingObjects::removePlacedObject):
(WebCore::FloatingObjects::computePlacedFloatsTree):
(WebCore::FloatingObjects::placedFloatsTree):
(WebCore::FloatingObjects::logicalLeftOffsetForPositioningFloat):
(WebCore::FloatingObjects::logicalRightOffsetForPositioningFloat):
(WebCore::FloatingObjects::logicalLeftOffset):
(WebCore::FloatingObjects::logicalRightOffset): POD tree had a slightly
weird behavior in which it was valid to use some of its APIs without
first initializing it, but not others. It's not really possible to model
that behavior with normal C++ objects that use new/delete, so instead
I added some explicit NULL checks.
* rendering/FloatingObjects.h:
* rendering/RenderFlowThread.cpp:
(WebCore::RenderFlowThread::updateRegionsFlowThreadPortionRect):
* rendering/RenderView.cpp:
(WebCore::RenderView::intervalArena): Deleted.
* rendering/RenderView.h: Removed custom-allocator-related cruft.
2014-11-20 Dean Jackson <dino@apple.com>
Support unprefixed animation event types
https://bugs.webkit.org/show_bug.cgi?id=138931
<rdar://problem/18943167>
Reviewed by Simon Fraser.
Tests: animations/unprefixed-events-mixed-with-prefixed.html
animations/unprefixed-events.html
Support the unprefixed animation event names:
- animationstart (was webkitAnimationStart)
- animationiteration (was webkitAnimationIteration)
- animationend (was webkitAnimationEnd)
(Yes, event types are case sensitive and yes, this will
likely cause some head-scratching as people change content)
The approach here is to follow what transitions does:
- listener only for old event name -> fire old event name
- listener for both old and new event name -> fire new event name
- listener only for new event name -> fire new event name
That way pages that were trying to anticipate the new event name
won't get duplicate events.
* CMakeLists.txt: Add new AnimationEvent* stuff.
* DerivedSources.make: Ditto.
* WebCore.vcxproj/WebCore.vcxproj: Ditto.
* WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.
* WebCore.xcodeproj/project.pbxproj: Ditto.
* bindings/js/JSBindingsAllInOne.cpp: New files for all in one builds.
* dom/DOMAllInOne.cpp:
* dom/AnimationEvent.cpp: Added. Copied from WebKitAnimationEvent.cpp.
(WebCore::AnimationEventInit::AnimationEventInit):
(WebCore::AnimationEvent::AnimationEvent):
(WebCore::AnimationEvent::~AnimationEvent):
(WebCore::AnimationEvent::animationName):
(WebCore::AnimationEvent::elapsedTime):
(WebCore::AnimationEvent::eventInterface):
* dom/AnimationEvent.h: Added. Copied from WebKitAnimationEvent.h.
* dom/AnimationEvent.idl: Added. Copied from WebKitAnimationEvent.idl.
* dom/Document.cpp:
(WebCore::Document::addListenerTypeIfNeeded): Handle new event types.
* dom/EventNames.h: New names.
* dom/EventNames.in:
* dom/EventTarget.cpp:
(WebCore::legacyType): Provide a mapping from the new names to the older
prefixed forms.
* html/HTMLAttributeNames.in: Support the on* attributes, even though I
hate them and wish this approach would die.
* html/HTMLElement.cpp:
(WebCore::HTMLElement::populateEventNameForAttributeLocalNameMap):
* page/DOMWindow.h: New names, and constructors.
* page/DOMWindow.idl:
* page/animation/AnimationController.cpp:
(WebCore::AnimationControllerPrivate::fireEventsAndUpdateStyle): Fire new type.
* page/animation/KeyframeAnimation.cpp: Fire the new types of events.
(WebCore::KeyframeAnimation::onAnimationStart):
(WebCore::KeyframeAnimation::onAnimationIteration):
(WebCore::KeyframeAnimation::onAnimationEnd):
(WebCore::KeyframeAnimation::sendAnimationEvent):
2014-11-20 Tim Horton <timothy_horton@apple.com>
Remove a piece of DataDetectors SPI that we aren't using anymore
https://bugs.webkit.org/show_bug.cgi?id=138917
Reviewed by Beth Dakin.
* platform/spi/mac/DataDetectorsSPI.h:
2014-11-20 Beth Dakin <bdakin@apple.com>
Invalid message WebPageProxy.DidPerformDictionaryLookup on Google stocks result
https://bugs.webkit.org/show_bug.cgi?id=138568
-and corresponding-
rdar://problem/18904600
Reviewed by Tim Horton.
Add an optional parameter indicating whether or not to include images.
* WebCore.exp.in:
* editing/cocoa/HTMLConverter.h:
* editing/cocoa/HTMLConverter.mm:
(WebCore::editingAttributedStringFromRange):
2014-11-20 Myles C. Maxfield <mmaxfield@apple.com>
Fix the !ENABLE(SVG_FONTS) build after r176276
https://bugs.webkit.org/show_bug.cgi?id=138924
Reviewed by Csaba Osztrogonác.
No new tests because there is no behavior change.
* css/CSSFontFaceSource.cpp:
(WebCore::CSSFontFaceSource::getFontData):
* loader/cache/CachedResourceLoader.cpp:
(WebCore::CachedResourceLoader::requestFont):
2014-11-19 Ada Chan <adachan@apple.com>
Add a way to mute an AudioContext.
https://bugs.webkit.org/show_bug.cgi?id=138104
Reviewed by Eric Carlson.
Keep a muted state in AudioDestinationNode. If m_muted is true,
zero out the audio buffers.
No new tests, since it's difficult to test whether the audio is indeed muted.
* Modules/webaudio/AudioContext.cpp:
(WebCore::AudioContext::AudioContext):
Call pageMutedStateDidChange() so it'll initialize the destination audio node's muted state accordingly.
(WebCore::AudioContext::pageMutedStateDidChange):
Set the destination audio node's muted state to match the page's muted state.
* Modules/webaudio/AudioDestinationNode.cpp:
(WebCore::AudioDestinationNode::AudioDestinationNode):
Initialize m_muted.
(WebCore::AudioDestinationNode::render):
If m_muted is true, call AudioBus::zero() to zero out the buffers.
* Modules/webaudio/AudioDestinationNode.h:
(WebCore::AudioDestinationNode::setMuted):
Set m_muted.
2014-11-20 Chris Dumez <cdumez@apple.com>
Crash when destroying a Document that has a throttled timer still running
https://bugs.webkit.org/show_bug.cgi?id=138914
Reviewed by Benjamin Poulain.
Upon destruction, a throttled DOMTimer whose interval depends on
viewport changes will try to unregister itself from the view. It gets
the view pointer from its Document. However, scriptExecutionContext()
can return null if the Document is being destroyed (i.e. ~DOMTimer()
is called from ~ScriptExecutionContext(), as the ScriptExecutionContext
owns the DOMTimer).
This patch adds a null check for scriptExecutionContext() in the
DOMTimer destructor to avoid this issue.
Test: fast/dom/throttled-timer-running-on-document-destruction.html
* page/DOMTimer.cpp:
(WebCore::DOMTimer::~DOMTimer):
(WebCore::DOMTimer::unregisterForViewportChanges):
Add assertion to make sure scriptExecutionContext() does not return
null.
(WebCore::DOMTimerFireState::setChangedStyleOfElementOutsideViewport): Deleted.
Killed this function as this was dead code.
2014-11-20 Zalan Bujtas <zalan@apple.com>
Simple line layout: Introduce text fragment continuation.
https://bugs.webkit.org/show_bug.cgi?id=138274
This patch extends simple line layout coverage to multiple text renderers.
When a particular render flow has multiple text renderers (but not any other type)
then we use simple line layout to process and paint the content. -other, existing requirements still apply
so that for example if the content requires decoration, we bail out of simple line layout.
FlowContent now supports multiple renderes. It continuously reads content from sibling renderers
so that the simple line layout parser sees it as one monolithic block of content. Run positions
are all relative to the block and they get resolved to renderer's positions on demand.
(painting, computing bounding rects etc)
Reviewed by Antti Koivisto.
Performance test already been added for the multiple rendere use case,
correctness is covered by existing test cases.
Test: fast/text/simple-lines-mutliple-renderers.html
* rendering/SimpleLineLayout.cpp:
(WebCore::SimpleLineLayout::canUseFor): Check if children are all 8bit RenderTexts.
(WebCore::SimpleLineLayout::removeTrailingWhitespace): Move the endofline check right before where we might overflow using end position.
(WebCore::SimpleLineLayout::initializeNewLine):
(WebCore::SimpleLineLayout::closeLineEndingAndAdjustRuns):
(WebCore::SimpleLineLayout::splitRunsAtRendererBoundary): Split runs at renderers' boundary to be in sync with inline text renderering.
(WebCore::SimpleLineLayout::createTextRuns):
(WebCore::SimpleLineLayout::create):
* rendering/SimpleLineLayoutFlowContents.cpp:
(WebCore::SimpleLineLayout::FlowContents::FlowContents):
(WebCore::SimpleLineLayout::FlowContents::findNextBreakablePosition):
(WebCore::SimpleLineLayout::FlowContents::findNextNonWhitespacePosition):
(WebCore::SimpleLineLayout::FlowContents::textWidth): Do not measure text across renderers. It could produce different width value due to
ligature which later can produce unexpected line breaks and out sync rendering in general.
(WebCore::SimpleLineLayout::FlowContents::renderer):
(WebCore::SimpleLineLayout::FlowContents::resolveRendererPositions):
(WebCore::SimpleLineLayout::FlowContents::appendNextRendererContentIfNeeded): Read the next renderer content if needed.
(WebCore::SimpleLineLayout::FlowContents::nextNonWhitespacePosition):
(WebCore::SimpleLineLayout::FlowContents::runWidth):
* rendering/SimpleLineLayoutFlowContents.h:
(WebCore::SimpleLineLayout::FlowContents::isNewlineCharacter):
(WebCore::SimpleLineLayout::FlowContents::isEndOfContent):
* rendering/SimpleLineLayoutResolver.cpp:
(WebCore::SimpleLineLayout::RunResolver::Run::text):
2014-11-20 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r176396.
https://bugs.webkit.org/show_bug.cgi?id=138926
revealed some WebCore::BidiResolver issue. rollout this for
now. (Requested by zalan on #webkit).
Reverted changeset:
"Simple line layout: Introduce text fragment continuation."
https://bugs.webkit.org/show_bug.cgi?id=138274
http://trac.webkit.org/changeset/176396
2014-11-20 Zalan Bujtas <zalan@apple.com>
Simple line layout: Introduce text fragment continuation.
https://bugs.webkit.org/show_bug.cgi?id=138274
This patch extends simple line layout coverage to multiple text renderers.
When a particular render flow has multiple text renderers (but not any other type)
then we use simple line layout to process and paint the content. -other, existing requirements still apply
so that for example if the content requires decoration, we bail out of simple line layout.
FlowContent now supports multiple renderes. It continuously reads content from sibling renderers
so that the simple line layout parser sees it as one monolithic block of content. Run positions
are all relative to the block and they get resolved to renderer's positions on demand.
(painting, computing bounding rects etc)
Reviewed by Antti Koivisto.
Performance test already been added for the multiple rendere use case,
correctness is covered by existing test cases.
Test: fast/text/simple-lines-mutliple-renderers.html
* rendering/SimpleLineLayout.cpp:
(WebCore::SimpleLineLayout::canUseFor): Check if children are all 8bit RenderTexts.
(WebCore::SimpleLineLayout::removeTrailingWhitespace): Move the endofline check right before where we might overflow using end position.
(WebCore::SimpleLineLayout::initializeNewLine):
(WebCore::SimpleLineLayout::closeLineEndingAndAdjustRuns):
(WebCore::SimpleLineLayout::splitRunsAtRendererBoundary): Split runs at renderers' boundary to be in sync with inline text renderering.
(WebCore::SimpleLineLayout::createTextRuns):
(WebCore::SimpleLineLayout::create):
* rendering/SimpleLineLayoutFlowContents.cpp:
(WebCore::SimpleLineLayout::FlowContents::FlowContents):
(WebCore::SimpleLineLayout::FlowContents::findNextBreakablePosition):
(WebCore::SimpleLineLayout::FlowContents::findNextNonWhitespacePosition):
(WebCore::SimpleLineLayout::FlowContents::textWidth): Do not measure text across renderers. It could produce different width value due to
ligature which later can produce unexpected line breaks and out sync renderering in general.
(WebCore::SimpleLineLayout::FlowContents::renderer):
(WebCore::SimpleLineLayout::FlowContents::resolveRendererPositions):
(WebCore::SimpleLineLayout::FlowContents::appendNextRendererContentIfNeeded): Read the next renderer content if needed.
(WebCore::SimpleLineLayout::FlowContents::nextNonWhitespacePosition):
(WebCore::SimpleLineLayout::FlowContents::runWidth):
* rendering/SimpleLineLayoutFlowContents.h:
(WebCore::SimpleLineLayout::FlowContents::isNewlineCharacter):
(WebCore::SimpleLineLayout::FlowContents::isEndOfContent):
* rendering/SimpleLineLayoutResolver.cpp:
(WebCore::SimpleLineLayout::RunResolver::Run::text):
2014-11-20 peavo@outlook.com <peavo@outlook.com>
[WinCairo] Compile error when GStreamer is enabled.
https://bugs.webkit.org/show_bug.cgi?id=138925
Reviewed by Philippe Normand.
A guard is missing for an overridden method.
* platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
2014-11-20 Adrian Perez de Castro <aperez@igalia.com>
[GTK] Provide convenience API in DOM bindings to post messages to user message handlers
https://bugs.webkit.org/show_bug.cgi?id=138871
Reviewed by Carlos Garcia Campos.
Adds a convenience function in the WebKitGTK+ DOM bindings to post
messages to user message handlers in a way convenient way more
convenient than using the autogenerated bindings.
* bindings/gobject/WebKitDOMCustom.cpp:
(webkit_dom_dom_window_webkit_message_handlers_post_message):
Added new convenience API function to post messages to user message
handlers.
* bindings/gobject/WebKitDOMCustom.h: Ditto.
* bindings/gobject/WebKitDOMCustom.symbols: Ditto.
2014-11-12 Sergio Villar Senin <svillar@igalia.com>
[CSS Grid Layout] Replace the usage of size_t by unsigned
https://bugs.webkit.org/show_bug.cgi?id=136218
Reviewed by Benjamin Poulain.
In general, size_t should be used for sizes of objects in
memory. We're using it to represent indexes and spans in the
grid. Now that the maximum number of tracks is 1 million, it
should be safe to replace them by unsigned integers.
No new tests as there is no change in functionality.
* css/CSSParser.cpp:
(WebCore::CSSParser::parseGridTrackRepeatFunction):
* css/StyleResolver.cpp:
(WebCore::createImplicitNamedGridLinesFromGridArea):
(WebCore::createGridTrackList):
* rendering/RenderGrid.cpp:
(WebCore::RenderGrid::GridIterator::GridIterator):
(WebCore::RenderGrid::GridIterator::nextGridItem):
(WebCore::RenderGrid::GridIterator::isEmptyAreaEnough):
(WebCore::RenderGrid::GridIterator::nextEmptyGridArea):
(WebCore::RenderGrid::GridSizingData::GridSizingData):
(WebCore::RenderGrid::computeUsedBreadthOfGridTracks):
(WebCore::RenderGrid::gridTrackSize):
(WebCore::RenderGrid::distributeSpaceToTracks):
(WebCore::RenderGrid::tracksAreWiderThanMinTrackBreadth):
(WebCore::RenderGrid::ensureGridSize):
(WebCore::RenderGrid::populateExplicitGridAndOrderIterator):
(WebCore::RenderGrid::createEmptyGridAreaAtSpecifiedPositionsOutsideGrid):
(WebCore::RenderGrid::placeAutoMajorAxisItemOnGrid):
(WebCore::RenderGrid::populateGridPositions):
* rendering/RenderGrid.h:
* rendering/style/GridCoordinate.h:
(WebCore::GridSpan::integerSpan):
* rendering/style/GridResolvedPosition.cpp:
(WebCore::GridResolvedPosition::explicitGridColumnCount):
(WebCore::GridResolvedPosition::explicitGridRowCount):
(WebCore::explicitGridSizeForSide):
(WebCore::GridResolvedPosition::resolveNamedGridLinePositionFromStyle):
(WebCore::GridResolvedPosition::resolveGridPositionFromStyle):
(WebCore::GridResolvedPosition::resolveGridPositionAgainstOppositePosition):
(WebCore::firstNamedGridLineBeforePosition):
(WebCore::GridResolvedPosition::resolveRowStartColumnStartNamedGridLinePositionAgainstOppositePosition):
(WebCore::GridResolvedPosition::resolveRowEndColumnEndNamedGridLinePositionAgainstOppositePosition):
* rendering/style/GridResolvedPosition.h:
(WebCore::GridResolvedPosition::adjustGridPositionForRowEndColumnEndSide):
(WebCore::GridResolvedPosition::adjustGridPositionForSide):
(WebCore::GridResolvedPosition::GridResolvedPosition):
(WebCore::GridResolvedPosition::toInt):
* rendering/style/StyleGridData.h:
2014-11-20 Andreas Kling <akling@apple.com>
Remove "document has no sibling rules" optimization.
<https://webkit.org/b/138902>
Reviewed by Antti Koivisto.
We were keeping a document-level flag to track whether there are any
sibling rules in any active style sheets.
This information was used to do.. nothing.
* css/StyleResolver.h:
(WebCore::StyleResolver::usesSiblingRules): Deleted.
* dom/DocumentStyleSheetCollection.cpp:
(WebCore::DocumentStyleSheetCollection::DocumentStyleSheetCollection):
(WebCore::DocumentStyleSheetCollection::combineCSSFeatureFlags):
(WebCore::DocumentStyleSheetCollection::resetCSSFeatureFlags):
* dom/DocumentStyleSheetCollection.h:
(WebCore::DocumentStyleSheetCollection::usesSiblingRules): Deleted.
(WebCore::DocumentStyleSheetCollection::setUsesSiblingRulesOverride): Deleted.
* mathml/MathMLMathElement.cpp:
(WebCore::MathMLMathElement::insertedInto): Deleted.
* mathml/MathMLMathElement.h:
2014-11-20 Andreas Kling <akling@apple.com>
Caret renderer is always a RenderBlock.
<https://webkit.org/b/138912>
Reviewed by Chris Dumez.
Tighten typing in the code that finds and deals with the renderer
used to paint the caret (it's always a RenderBlock.)
* editing/FrameSelection.cpp:
(WebCore::CaretBase::updateCaretRect):
(WebCore::FrameSelection::caretRendererWithoutUpdatingLayout):
(WebCore::DragCaretController::caretRenderer):
(WebCore::repaintCaretForLocalRect):
(WebCore::CaretBase::paintCaret):
* editing/FrameSelection.h:
* editing/VisiblePosition.cpp:
(WebCore::VisiblePosition::absoluteCaretBounds):
* editing/htmlediting.cpp:
(WebCore::rendererForCaretPainting):
(WebCore::localCaretRectInRendererForCaretPainting):
(WebCore::absoluteBoundsForLocalCaretRect):
* editing/htmlediting.h:
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::paintCaret):
2014-11-20 Antti Koivisto <antti@apple.com>
REGRESSION (r172854): Web Viewer in FileMaker does not render a Base64 encoded animated-GIF
https://bugs.webkit.org/show_bug.cgi?id=138807
<rdar://problem/18829540>
Reviewed by Simon Fraser.
Animation gets paused because WebKit thinks the GIF is outside of the view.
* page/FrameView.cpp:
(WebCore::FrameView::windowClipRect):
We need to convert to window coordinates in paintsEntireContents mode too so these functions are consistent.
This matters with some WK1 API clients.
2014-11-19 Chris Dumez <cdumez@apple.com>
Move 'clip' CSS property to the new StyleBuilder
https://bugs.webkit.org/show_bug.cgi?id=138909
Reviewed by Andreas Kling.
Move 'clip' CSS property from DeprecatedStyleBuilder to the new
StyleBuilder by using custom code.
No new tests, no behavior change.
* css/CSSPropertyNames.in:
* css/DeprecatedStyleBuilder.cpp:
(WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
(WebCore::ApplyPropertyClip::convertToLength): Deleted.
(WebCore::ApplyPropertyClip::applyInheritValue): Deleted.
(WebCore::ApplyPropertyClip::applyInitialValue): Deleted.
(WebCore::ApplyPropertyClip::applyValue): Deleted.
(WebCore::ApplyPropertyClip::createHandler): Deleted.
* css/StyleBuilderCustom.h:
(WebCore::StyleBuilderFunctions::applyInitialClip):
(WebCore::StyleBuilderFunctions::applyInheritClip):
(WebCore::StyleBuilderFunctions::applyValueClip):
2014-11-19 Ryuan Choi <ryuan.choi@navercorp.com>
Remove dead code from TiledBackingStore
https://bugs.webkit.org/show_bug.cgi?id=138864
Reviewed by Andreas Kling.
Since r168151, paint() method, m_commitTileUpdatesOnIdleEventLoop and related code are not used.
No new tests, no behavior change.
* platform/graphics/TiledBackingStore.cpp:
(WebCore::TiledBackingStore::TiledBackingStore):
(WebCore::TiledBackingStore::setTileSize):
(WebCore::TiledBackingStore::invalidate):
(WebCore::TiledBackingStore::createTiles):
(WebCore::TiledBackingStore::paint): Deleted.
(WebCore::TiledBackingStore::startTileBufferUpdateTimer): Deleted.
(WebCore::TiledBackingStore::tileBufferUpdateTimerFired): Deleted.
(WebCore::TiledBackingStore::startBackingStoreUpdateTimer): Deleted.
(WebCore::TiledBackingStore::backingStoreUpdateTimerFired): Deleted.
* platform/graphics/TiledBackingStore.h:
(WebCore::TiledBackingStore::setCommitTileUpdatesOnIdleEventLoop): Deleted.
2014-11-19 Andreas Kling <akling@apple.com>
Remove "document has no ::before and/or ::after rules" optimization.
<https://webkit.org/b/138897>
Reviewed by Antti Koivisto.
This optimization has been dead for a long time, since the default UA
style contains both ::before and ::after rules.
* css/RuleFeature.cpp:
(WebCore::recursivelyCollectFeaturesFromSelector):
(WebCore::RuleFeatureSet::add):
(WebCore::RuleFeatureSet::clear):
* css/RuleFeature.h:
(WebCore::RuleFeatureSet::RuleFeatureSet):
* css/StyleResolver.h:
(WebCore::StyleResolver::usesBeforeAfterRules): Deleted.
* dom/DocumentStyleSheetCollection.cpp:
(WebCore::DocumentStyleSheetCollection::DocumentStyleSheetCollection):
(WebCore::DocumentStyleSheetCollection::combineCSSFeatureFlags):
(WebCore::DocumentStyleSheetCollection::resetCSSFeatureFlags):
* dom/DocumentStyleSheetCollection.h:
(WebCore::DocumentStyleSheetCollection::usesBeforeAfterRules): Deleted.
(WebCore::DocumentStyleSheetCollection::setUsesBeforeAfterRulesOverride): Deleted.
* html/HTMLQuoteElement.cpp:
(WebCore::HTMLQuoteElement::insertedInto): Deleted.
* html/HTMLQuoteElement.h:
* style/StyleResolveTree.cpp:
(WebCore::Style::needsPseudoElement):
2014-11-19 Myles C. Maxfield <mmaxfield@apple.com>
[OS X] Upright vertical text is completely broken for multi-code-unit codepoints
https://bugs.webkit.org/show_bug.cgi?id=138891
Reviewed by Dan Bernstein.
We were assuming that we can use the string index (in UTF-16) as the glyph
index. This falls down when a single codepoint (and glyph) contians
multiple code units.
Test: platform/mac/fast/text/multiple-codeunit-vertical-upright.html
* platform/graphics/GlyphPage.h:
* platform/graphics/mac/GlyphPageTreeNodeMac.cpp:
(WebCore::GlyphPage::fill):
2014-11-19 Daniel Bates <dabates@apple.com>
Attempt to fix the Apple Internal Mavericks build after <https://trac.webkit.org/changeset/176347>
(https://bugs.webkit.org/show_bug.cgi?id=136863)
Define enumerator NSHTTPCookieAcceptPolicyExclusivelyFromMainDocumentDomain when building without
the Apple Internal SDK or with the Apple Internal SDK on OS X Mavericks or earlier.
* platform/spi/cf/CFNetworkSPI.h:
2014-11-16 Sam Weinig <sam@webkit.org>
Move the 'quotes' CSS property to the new StyleBuilder
https://bugs.webkit.org/show_bug.cgi?id=138788
Reviewed by Chris Dumez.
Test: fast/css/content/content-quotes-07.html
* css/CSSParser.cpp:
(WebCore::CSSParser::parseValue):
Fix the parser to only accept none as a valid primitive identifier. Tested in
the newly added content-quotes-07.html.
* css/CSSPropertyNames.in:
* css/StyleBuilderConverter.h:
(WebCore::StyleBuilderConverter::convertQuotes):
* css/StyleResolver.cpp:
(WebCore::StyleResolver::applyProperty):
Move "quotes" to the new style builder.
* rendering/style/RenderStyle.h:
Add an initialQuotes() function for use in the auto-generated style builder.
2014-11-19 Dean Jackson <dino@apple.com>
Handle unprefixed @keyframes rule
https://bugs.webkit.org/show_bug.cgi?id=138899
<rdar://problem/18943117>
Reviewed by Simon Fraser.
Support the parsing of unprefixed @keyframes. In
CSSParser, assign the same token identifier to
the prefixed and unprefixed forms. This will
keep compatibility with older content. If a page
has both forms, then whatever comes last will
win (as it does if you had duplicate names of the same
form).
Tests: animations/unprefixed-keyframes-rule.html
animations/unprefixed-keyframes.html
* css/CSSGrammar.y.in: Rename the WEBKIT_KEYFRAME_RULE_SYM symbol to
be KEYFRAME_RULE_SYM. Same with KEYFRAMES_SYM.
* css/CSSParser.cpp:
(WebCore::CSSParser::detectAtToken): Look for the @keyframes style
strings and assign the new token values.
2014-11-19 Andreas Kling <akling@apple.com>
Move pseudo-style code from RenderObject to RenderElement.
<https://webkit.org/b/138880>
Reviewed by Antti Koivisto.
Migrate get*PseudoStyle() to RenderElement, and the selection color
functions along with them. This gets rid of a DOM ancestor walk in
pseudo style lookup.
Narrow down some argument types to keep things building.
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::logicalLeftSelectionGap):
(WebCore::RenderBlock::logicalRightSelectionGap):
(WebCore::styleForFirstLetter):
(WebCore::RenderBlock::updateFirstLetterStyle):
(WebCore::RenderBlock::createFirstLetterRenderer):
* rendering/RenderBlock.h:
* rendering/RenderElement.cpp:
(WebCore::RenderElement::getCachedPseudoStyle):
(WebCore::RenderElement::getUncachedPseudoStyle):
(WebCore::RenderElement::selectionColor):
(WebCore::RenderElement::selectionPseudoStyle):
(WebCore::RenderElement::selectionForegroundColor):
(WebCore::RenderElement::selectionEmphasisMarkColor):
(WebCore::RenderElement::selectionBackgroundColor):
* rendering/RenderElement.h:
* rendering/RenderObject.cpp:
(WebCore::RenderObject::selectionBackgroundColor): Deleted.
(WebCore::RenderObject::selectionColor): Deleted.
(WebCore::RenderObject::selectionPseudoStyle): Deleted.
(WebCore::RenderObject::selectionForegroundColor): Deleted.
(WebCore::RenderObject::selectionEmphasisMarkColor): Deleted.
(WebCore::RenderObject::getCachedPseudoStyle): Deleted.
(WebCore::RenderObject::getUncachedPseudoStyle): Deleted.
* rendering/RenderObject.h:
* rendering/RenderText.h:
(WebCore::RenderText::getCachedPseudoStyle):
(WebCore::RenderText::selectionBackgroundColor):
(WebCore::RenderText::selectionForegroundColor):
(WebCore::RenderText::selectionEmphasisMarkColor):
* rendering/svg/SVGInlineTextBox.cpp:
(WebCore::SVGInlineTextBox::paintSelectionBackground):
(WebCore::SVGInlineTextBox::paint):
2014-11-19 Tim Horton <timothy_horton@apple.com>
Add an optional entry transition (from selection highlight) to TextIndicator
https://bugs.webkit.org/show_bug.cgi?id=138856
<rdar://problem/18840128>
Reviewed by Anders Carlsson.
* WebCore.exp.in:
Add an export.
* platform/spi/cocoa/QuartzCoreSPI.h:
Add some SPI.
2014-11-19 Chris Dumez <cdumez@apple.com>
Move 'outline-style' CSS property to the new StyleBuilder
https://bugs.webkit.org/show_bug.cgi?id=138882
Reviewed by Sam Weinig.
Move 'outline-style' CSS property from DeprecatedStyleBuilder to the
new StyleBuilder by using custom code.
No new tests, no behavior change.
* css/CSSPropertyNames.in:
* css/DeprecatedStyleBuilder.cpp:
(WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
(WebCore::ApplyPropertyDefault::setValue): Deleted.
(WebCore::ApplyPropertyDefault::applyValue): Deleted.
(WebCore::ApplyPropertyDefault::createHandler): Deleted.
(WebCore::ApplyPropertyOutlineStyle::applyInheritValue): Deleted.
(WebCore::ApplyPropertyOutlineStyle::applyInitialValue): Deleted.
(WebCore::ApplyPropertyOutlineStyle::applyValue): Deleted.
(WebCore::ApplyPropertyOutlineStyle::createHandler): Deleted.
* css/StyleBuilderCustom.h:
(WebCore::StyleBuilderFunctions::applyInheritOutlineStyle):
(WebCore::StyleBuilderFunctions::applyInitialOutlineStyle):
(WebCore::StyleBuilderFunctions::applyValueOutlineStyle):
2014-11-19 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: JSContext inspection Resource search does not work
https://bugs.webkit.org/show_bug.cgi?id=131252
Reviewed by Timothy Hatcher.
Test: inspector/debugger/search-scripts.html
* inspector/InspectorPageAgent.cpp:
(WebCore::InspectorPageAgent::searchInResources):
A little cleanup.
2014-11-19 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Provide $exception in the console for the thrown exception value
https://bugs.webkit.org/show_bug.cgi?id=138726
Reviewed by Timothy Hatcher.
Tests: inspector/debugger/command-line-api-exception-nested-catch.html
inspector/debugger/command-line-api-exception.html
* inspector/CommandLineAPIModuleSource.js:
Expose $exception in the more complete command line API.
2014-11-19 David Hyatt <hyatt@apple.com>
Images/replaced elements that are as tall as a page should be on their own page
https://bugs.webkit.org/show_bug.cgi?id=138886 - <rdar://problem/18296371>
Reviewed by Dean Jackson.
Added fast/multicol/tall-image-behavior.html (and RL/LR variants)
* rendering/InlineFlowBox.cpp:
(WebCore::InlineFlowBox::computeReplacedAndTextLineTopAndBottom):
* rendering/InlineFlowBox.h:
Add a new method that computes the line top and line bottom ignoring all margins,
overflow and line-height. This allows us to see if a line that is taller than a page
can be made to fit if we ignored margins and unused descent.
* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::adjustLinePositionForPagination):
Call the new helper function, computeReplacedAndTextLineTopAndBottom and push
to a new page if we see that we can fit on a page by ourselves without blank space
included.
2014-11-18 Ada Chan <adachan@apple.com>
Take Web Audio into account for the Page::isPlayingAudio() API.
https://bugs.webkit.org/show_bug.cgi?id=137464
Reviewed by Jer Noble.
Make AudioContext a subclass of AudioProducer. It figures out whether there's
audio playing by checking whether its AudioDestinationNode is playing (and not
silent). It calls Document::updateIsPlayingAudio() whenever its audio playing
state has changed.
Test: webaudio/web-audio-is-playing.html
* Modules/webaudio/AudioContext.cpp:
(WebCore::AudioContext::lazyInitialize):
Add itself to the Document's list of AudioProducers if it's not an offline
audio context.
(WebCore::AudioContext::uninitialize):
Remove itself from the Document's list of AudioProducers if it's not an offline
audio context.
(WebCore::AudioContext::stop):
Tell the document to update its audio playing state.
(WebCore::AudioContext::isPlayingAudio):
Return true if the audio context hasn't been stopped and its destination node is
playing audio.
(WebCore::AudioContext::pageMutedStateDidChange):
Add a FIXME for now.
(WebCore::AudioContext::isPlayingAudioDidChange):
Call Document::updateIsPlayingAudio().
* Modules/webaudio/AudioContext.h:
* Modules/webaudio/AudioDestinationNode.cpp:
(WebCore::AudioDestinationNode::AudioDestinationNode):
Initialize m_isSilent and m_isEffectivelyPlayingAudio.
(WebCore::AudioDestinationNode::render):
Call setIsSilent() with the appropriate value after rendering.
(WebCore::AudioDestinationNode::isPlayingDidChange):
Call updateIsEffectivelyPlayingAudio().
(WebCore::AudioDestinationNode::setIsSilent):
If m_isSilent has changed, call updateIsEffectivelyPlayingAudio().
(WebCore::AudioDestinationNode::updateIsEffectivelyPlayingAudio):
If m_isEffectivelyPlayingAudio has changed, call AudioContext::isPlayingAudioDidChange().
* Modules/webaudio/AudioDestinationNode.h:
(WebCore::AudioDestinationNode::isPlaying):
(WebCore::AudioDestinationNode::isPlayingAudio):
* Modules/webaudio/DefaultAudioDestinationNode.cpp:
(WebCore::DefaultAudioDestinationNode::isPlaying):
Return whether the AudioDestination is playing.
* Modules/webaudio/DefaultAudioDestinationNode.h:
* platform/audio/AudioIOCallback.h:
* platform/audio/ios/AudioDestinationIOS.cpp:
(WebCore::AudioDestinationIOS::start):
Call setIsPlaying() instead.
(WebCore::AudioDestinationIOS::stop):
Ditto.
(WebCore::AudioDestinationIOS::setIsPlaying):
If m_isPlaying has changed, call AudioIOCallback::isPlayingDidChange().
* platform/audio/ios/AudioDestinationIOS.h:
* platform/audio/mac/AudioDestinationMac.cpp:
(WebCore::AudioDestinationMac::start):
Call setIsPlaying() instead.
(WebCore::AudioDestinationMac::stop):
Ditto.
(WebCore::AudioDestinationMac::setIsPlaying):
If m_isPlaying has changed, call AudioIOCallback::isPlayingDidChange().
* platform/audio/mac/AudioDestinationMac.h:
* testing/Internals.cpp:
(WebCore::Internals::isPagePlayingAudio):
* testing/Internals.h:
* testing/Internals.idl:
Add internals.isPagePlayingAudio() for testing.
2014-11-19 Daniel Bates <dabates@apple.com>
Attempt to fix the Apple Internal Mountain Lion build after <https://trac.webkit.org/changeset/176347>
(https://bugs.webkit.org/show_bug.cgi?id=136863)
Only import header CFNSURLConnection.h when building for iOS or OS X Yosemite.
* platform/spi/cf/CFNetworkSPI.h:
2014-11-19 Antti Koivisto <antti@apple.com>
Fix TilesAdded bitmask
https://bugs.webkit.org/show_bug.cgi?id=138883
Reviewed by Simon Fraser.
Simon spotted this.
* platform/graphics/ca/GraphicsLayerCA.h:
Use 1LLU << 29 instead of 1LLU < 29
This worked before by pure luck as bit 0 is unused.
2014-11-19 Daniel Bates <dabates@apple.com>
[iOS] Make WebKit build with public iOS SDK
https://bugs.webkit.org/show_bug.cgi?id=136863
Reviewed by David Kilzer.
* WebCore.xcodeproj/project.pbxproj: Add private headers CFNetworkSPI.h and
NS{CalendarDate, String, URLDownload}SPI.h.
* loader/cocoa/DiskCacheMonitorCocoa.mm: Move forward declaration of
CFNetwork data types and functions from here to file CFNetworkSPI.h and
include header CFNetworkSPI.h.
* platform/network/mac/ResourceHandleMac.mm: Substitute CFNetworkSPI.h for
CFURLRequestSPI.h as the content of the latter was incorporated into the former.
* platform/spi/cf/CFNetworkSPI.h: Added.
* platform/spi/cf/CFURLRequestSPI.h: Removed; incorporated its functionality
into CFNetworkSPI.h
* platform/spi/cocoa/NSCalendarDateSPI.h: Added.
* platform/spi/cocoa/NSStringSPI.h: Added.
* platform/spi/cocoa/NSURLDownloadSPI.h: Added.
2014-11-19 Benjamin Poulain <bpoulain@apple.com>
Get rid of AccessibilityObject::setRoleValue()
https://bugs.webkit.org/show_bug.cgi?id=138861
Reviewed by Chris Fleizach.
* accessibility/AccessibilityObject.h:
(WebCore::AccessibilityObject::setRoleValue): Deleted.
2014-11-19 Philippe Normand <pnormand@igalia.com>
Missing NULL-check in VideoTrack::setLanguage
https://bugs.webkit.org/show_bug.cgi?id=138867
Reviewed by Jer Noble.
* html/track/VideoTrack.cpp:
(WebCore::VideoTrack::setLanguage): Prevent change event creation
on an empty video track list.
2014-11-19 Chris Fleizach <cfleizach@apple.com>
AX: Safari fails to load a web page with VoiceOver
https://bugs.webkit.org/show_bug.cgi?id=138849
Reviewed by Mario Sanchez Prada.
Sometimes an inlineElementContinuation will continue to an inline RenderBlock, so we case this incorrectly and bad things happen.
Test: accessibility/inline-block-assertion.html
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::startOfContinuations):
2014-11-19 Zalan Bujtas <zalan@apple.com>
Simple line layout: RenderTreeAsText should use rangeForRenderer() when dumping simple line text.
https://bugs.webkit.org/show_bug.cgi?id=138847
Reviewed by Antti Koivisto.
This is in preparation to support multiple renderers for simple line layout.
Use rangeForRenderer() to get runs for a particular renderer as opposed to for the entire flow.
Not testable.
* rendering/RenderTreeAsText.cpp:
(WebCore::write):
2014-11-19 peavo@outlook.com <peavo@outlook.com>
[WinCairo] Compile error when CSS_SELECTORS_LEVEL4 is not enabled.
https://bugs.webkit.org/show_bug.cgi?id=138870
Reviewed by Alex Christensen.
* css/CSSSelector.cpp:
(WebCore::simpleSelectorSpecificityInternal):
2014-11-19 Chris Fleizach <cfleizach@apple.com>
AX: Screen braille input doesn't work on forms.
https://bugs.webkit.org/show_bug.cgi?id=138804
Reviewed by Mario Sanchez Prada.
Allow iOS to set values of text fields through the API.
Test: platform/ios-sim/accessibility/set-value.html
* accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
(-[WebAccessibilityObjectWrapper _accessibilitySetValue:]):
2014-11-19 Zalan Bujtas <zalan@apple.com>
Simple line layout: Add renderer based rect collecting to RunResolver.
https://bugs.webkit.org/show_bug.cgi?id=138818
Reviewed by Antti Koivisto.
This is in preparation to multiple renderers support.
RunResolver should be able to collect rects for a particular renderer
that might overlap multiple runs. (or might just be a subset of a Run)
Covered by existing tests.
* rendering/SimpleLineLayoutFlowContents.cpp:
(WebCore::SimpleLineLayout::FlowContents::renderer): It operates on a single renderer currently.
(WebCore::SimpleLineLayout::FlowContents::resolveRendererPositions): It operates on a single renderer currently.
* rendering/SimpleLineLayoutFlowContents.h:
* rendering/SimpleLineLayoutFunctions.cpp:
(WebCore::SimpleLineLayout::computeTextBoundingBox):
(WebCore::SimpleLineLayout::computeTextFirstRunLocation):
(WebCore::SimpleLineLayout::collectTextAbsoluteRects):
(WebCore::SimpleLineLayout::collectTextAbsoluteQuads):
(WebCore::SimpleLineLayout::showLineLayoutForFlow):
* rendering/SimpleLineLayoutResolver.cpp:
(WebCore::SimpleLineLayout::baselinePosition):
(WebCore::SimpleLineLayout::linePosition):
(WebCore::SimpleLineLayout::lineSize):
(WebCore::SimpleLineLayout::RunResolver::Run::rect):
(WebCore::SimpleLineLayout::RunResolver::Run::rectForTextRenderer):
(WebCore::SimpleLineLayout::RunResolver::Run::baseline):
(WebCore::SimpleLineLayout::RunResolver::Run::text):
(WebCore::SimpleLineLayout::RunResolver::Run::computeRect):
(WebCore::SimpleLineLayout::RunResolver::RunResolver):
* rendering/SimpleLineLayoutResolver.h:
2014-11-19 Dhi Aurrahman <diorahman@rockybars.com>
Add selector checker for :lang pseudo class in Selectors level 4
https://bugs.webkit.org/show_bug.cgi?id=138281
Reviewed by Benjamin Poulain.
Add selector checker for :lang pseudo class in Selectors level 4.
The language tags matching is specified in [1,2].
[1] http://www.ietf.org/rfc/rfc4647.txt
[2] http://dev.w3.org/csswg/selectors4/#the-lang-pseudo
Tests: fast/selectors/lang-extended-filtering.html
fast/selectors/lang-multiple.html
* css/SelectorChecker.cpp:
(WebCore::SelectorChecker::checkOne):
* css/SelectorCheckerTestFunctions.h:
(WebCore::containslanguageSubtagMatchingRange):
(WebCore::matchesLangPseudoClass):
(WebCore::matchesLangPseudoClassDeprecated):
* cssjit/SelectorCompiler.cpp:
(WebCore::SelectorCompiler::addPseudoClassType):
2014-11-18 Philippe Normand <pnormand@igalia.com>
start/stop method for AudioBufferSourceNodes and OscillatorNodes can take no args
https://bugs.webkit.org/show_bug.cgi?id=138739
Reviewed by Darin Adler.
The patch is inspired by the following Blink revision by
<rtoy@google.com>:
<https://src.chromium.org/viewvc/blink?view=rev&revision=160845>
Test: webaudio/dom-exceptions.html
* Modules/webaudio/AudioBufferSourceNode.cpp:
(WebCore::AudioBufferSourceNode::start):
(WebCore::AudioBufferSourceNode::startPlaying):
(WebCore::AudioBufferSourceNode::noteGrainOn):
(WebCore::AudioBufferSourceNode::startGrain): Deleted.
* Modules/webaudio/AudioBufferSourceNode.h:
* Modules/webaudio/AudioBufferSourceNode.idl:
* Modules/webaudio/AudioScheduledSourceNode.cpp:
(WebCore::AudioScheduledSourceNode::start):
(WebCore::AudioScheduledSourceNode::stop):
* Modules/webaudio/AudioScheduledSourceNode.h:
* Modules/webaudio/OscillatorNode.idl:
2014-11-18 Benjamin Poulain <benjamin@webkit.org>
Add the initial implementation of dynamic specificity for :matches()
https://bugs.webkit.org/show_bug.cgi?id=138822
Reviewed by Andreas Kling.
Previously we completely ignored the selector list of :matches() when computing
the specificity of the selector.
The spec (http://dev.w3.org/csswg/selectors4/#specificity) says:
"The specificity of a :matches() pseudo-class, however, is the specificity
of the most specific complex selector that matched the given element."
This patch does just that.
In the CSS JIT, we only consider specificities that can be computed statically
for now, this should be extended later.
When the specificity is dynamic, we fall back to SelectorChecker. In that case,
we execute every selector of the selector list and we keep the maximum value
as the specificity for the whole :matches().
Tests: fast/css/matches-specificity-1.html
fast/css/matches-specificity-2.html
fast/css/matches-specificity-3.html
fast/css/matches-specificity-4.html
fast/css/matches-specificity-5.html
fast/css/matches-specificity-6.html
fast/css/matches-specificity-7.html
fast/css/matches-specificity-8.html
fast/css/matches-specificity-9.html
fast/css/matches-specificity-10.html
* css/CSSSelector.cpp:
(WebCore::selectorSpecificity):
(WebCore::maxSpecificity):
(WebCore::CSSSelector::specificity):
(WebCore::simpleSelectorSpecificityInternal):
(WebCore::CSSSelector::simpleSelectorSpecificity):
:matches() itself should not have any specificity. The specificity of its components
is computed in SelectorChecker.
Since :matches() is no longer accounted as a class B specificity, I had to finish
the specificity of :not() or some test breaks.
* css/CSSSelector.h:
* css/PageRuleCollector.cpp:
(WebCore::comparePageRules):
* css/SelectorChecker.cpp:
(WebCore::SelectorChecker::checkOne):
We can no longer shortcut the execution when context.pseudoElementEffective is false.
There is no guarantee that a following selector wouldn't match with a higher specificity.
* cssjit/SelectorCompiler.cpp:
(WebCore::SelectorCompiler::addPseudoClassType):
(WebCore::SelectorCompiler::SelectorCodeGenerator::SelectorCodeGenerator):
(WebCore::SelectorCompiler::constructFragments):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateSelectorChecker):
2014-11-18 David Kilzer <ddkilzer@apple.com>
FeatureDefines.xcconfig: Switch from using PLATFORM_NAME to SDK selectors
<http://webkit.org/b/138813>
Reviewed by Mark Rowe.
* Configurations/FeatureDefines.xcconfig: Switch to using SDK
selectors.
2014-11-18 Chris Dumez <cdumez@apple.com>
Crash when setting 'z-index' / 'flex-shrink' CSS properties to a calculated value
https://bugs.webkit.org/show_bug.cgi?id=138783
Reviewed by Andreas Kling.
Update operators converting CSSPrimitiveValue to integer / floating
point types to properly handle calculated values (e.g. 'calc(2 * 3)').
Previously, this was not working in release builds and we would hit an
ASSERT_NOT_REACHED() in debug builds.
Tests: fast/css/flex-shrink-calculated-value.html
fast/css/z-index-calculated-value.html
* css/CSSPrimitiveValueMappings.h:
(WebCore::CSSPrimitiveValue::operator unsigned short):
(WebCore::CSSPrimitiveValue::operator int):
(WebCore::CSSPrimitiveValue::operator unsigned):
(WebCore::CSSPrimitiveValue::operator float):
2014-11-18 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r176263 and r176273.
https://bugs.webkit.org/show_bug.cgi?id=138854
Underlines are hideous. (Requested by litherum on #webkit).
Reverted changesets:
"Use underlining metrics from the font file"
https://bugs.webkit.org/show_bug.cgi?id=138762
http://trac.webkit.org/changeset/176263
"iOS build fix."
http://trac.webkit.org/changeset/176273
2014-11-18 Chris Dumez <cdumez@apple.com>
Add a setting to toggle DOMTimer throttling support
https://bugs.webkit.org/show_bug.cgi?id=138844
<rdar://problem/19020874>
Reviewed by Andreas Kling.
Add a setting to disable DOM timers throttling, in order to help
developers determine if a specific issue is caused by timer
throttling.
* page/DOMTimer.cpp:
(WebCore::DOMTimerFireState::contextDocument):
(WebCore::DOMTimerFireState::scriptMadeUserObservableChanges):
(WebCore::DOMTimer::isDOMTimersThrottlingEnabled):
(WebCore::DOMTimer::updateThrottlingStateIfNecessary):
* page/DOMTimer.h:
* page/Settings.in:
2014-11-18 Beth Dakin <bdakin@apple.com>
REGRESSION: Invoking dictionary lookup on text in some search fields searches for
incorrect item
https://bugs.webkit.org/show_bug.cgi?id=138853
-and corresponding-
rdar://problem/18912505
Reviewed by Tim Horton.
Get the visible position based on the frame, not just the renderer.
* editing/mac/DictionaryLookup.mm:
(WebCore::rangeForDictionaryLookupAtHitTestResult):
2014-11-18 David Hyatt <hyatt@apple.com>
REGRESSION (r167210): Invalid cast in WebCore::RenderBlock::blockSelectionGaps
https://bugs.webkit.org/show_bug.cgi?id=137590
Reviewed by Dean Jackson.
Added fast/block/selection-block-gaps-crash.html
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::blockSelectionGaps):
Check that we really are a RenderBlock before recurring.
2014-11-18 Andreas Kling <akling@apple.com>
Avoid synchronous style recalc in Document.activeElement
<https://webkit.org/b/138850>
Reviewed by Ryosuke Niwa.
This subtly changes the behavior of <input autofocus>, which was caught by
a layout test. Auto-focus doesn't happen until the render tree is attached,
although it was possible to force it by accessing document.activeElement.
Now auto-focus is always lazy. This is consistent with other browser engines.
~1% progression on Speedometer locally.
* dom/Document.cpp:
(WebCore::Document::activeElement):
2014-11-18 Chris Dumez <cdumez@apple.com>
Have Vector::capacity() return an unsigned instead of a size_t
https://bugs.webkit.org/show_bug.cgi?id=138842
Reviewed by Andreas Kling.
Update the code base now that Vector::capacity() returns an unsigned
type instead of a size_t.
No new tests, no behavior change.
* editing/TextIterator.cpp:
(WebCore::SearchBuffer::append):
(WebCore::SearchBuffer::prependContext):
(WebCore::SearchBuffer::search):
(WebCore::SearchBuffer::length):
* platform/SharedBuffer.cpp:
(WebCore::SharedBuffer::duplicateDataBufferIfNecessary):
2014-11-18 Geoffrey Garen <ggaren@apple.com>
Removed the custom allocator for ListHashSet nodes
https://bugs.webkit.org/show_bug.cgi?id=138841
Reviewed by Andreas Kling.
Uses of ListHashSet no longer need to declare an inline capacity,
since that was only used to specify the capacity of the custom allocator.
* dom/DOMNamedFlowCollection.h:
* dom/DocumentEventQueue.h:
* dom/DocumentStyleSheetCollection.h:
* dom/NamedFlowCollection.h:
* html/FormController.h:
* rendering/FloatingObjects.h:
* rendering/RenderBlock.h:
2014-11-18 David Hyatt <hyatt@apple.com>
REGRESSION(r152313): Inline-block element doesn't wrap properly
https://bugs.webkit.org/show_bug.cgi?id=138846 - <rdar://problem/18838703>
Reviewed by Simon Fraser.
Added fast/inline-block/inline-block-empty-spans.html
* rendering/line/BreakingContextInlineHeaders.h:
(WebCore::BreakingContext::canBreakAtThisPosition):
2014-11-18 Myles C. Maxfield <mmaxfield@apple.com>
Multicolumn layout with negative line spacing and orphans causes pieces of letters to be shown at the bottom of columns
https://bugs.webkit.org/show_bug.cgi?id=138204
Reviewed by Dave Hyatt.
This code is responsible for pushing block elements to the next column if
the "orphans" CSS property is triggered. The mechanism by which this is
achieved is to push the block down such that the origin of the block is
at the origin of the next column. However, if there is negative line
spacing, the top portion of the text might actually be on top of the
origin of the block. Therefore, the block wasn't being pushed down enough
to entirely contain its text, so the top pieces were being drawn on the
previous column.
Test: fast/multicol/orphans-negative-line-spacing.html
* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::adjustLinePositionForPagination):
2014-11-18 Chris Dumez <cdumez@apple.com>
DOMTimers sometimes don't get unthrottled on scrolling
https://bugs.webkit.org/show_bug.cgi?id=138838
Reviewed by Antti Koivisto.
DOMTimers sometimes didn't get unthrottled on scrolling. This is
because we stopped listening for viewport changes every time the
timer fires, but we didn't listen for those changes again if we
decided the timer should stay throttled after the timer's action
was executed.
We should listen for viewport changes again after executing the
timer's action, if there are elements outside the viewport causing
the DOMTimer to be throttled, even if the throttleState hasn't
changed (i.e the timer stays throttled).
Test: fast/dom/timer-unthrottle-on-scroll.html
* page/DOMTimer.cpp:
(WebCore::DOMTimer::updateThrottlingStateIfNecessary):
(WebCore::DOMTimer::updateTimerIntervalIfNecessary):
(WebCore::DOMTimer::updateThrottlingStateAfterViewportChange):
2014-11-18 Daniel Bates <dbates@webkit.org>
[iOS] Make WebCore build and link with public SDK
https://bugs.webkit.org/show_bug.cgi?id=136487
Reviewed by David Kilzer.
* bindings/objc/DOMInternal.mm: Include header NSMapTableSPI.h.
* bindings/objc/WebScriptObject.mm: Ditto; Also fix style nit, substitute
#import for #include when importing header WTFString.h.
* bridge/objc/objc_instance.mm: Include header NSMapTableSPI.h and remove
#import NSMapTable.h as the former will import the latter.
* platform/ios/PlatformEventFactoryIOS.mm: Include header wtf/CurrentTime.h
for the declaration of WTF::currentTime().
* platform/ios/wak/WebCoreThread.mm: Remove unnecessary include of header CoreFoundation/CFPriv.h.
* platform/spi/ios/AVKitSPI.h: Add more SPI.
* platform/spi/ios/MPAVRoutingControllerSPI.h: Ditto.
2014-11-18 Myles C. Maxfield <mmaxfield@apple.com>
Subclass CachedFont for SVG fonts
https://bugs.webkit.org/show_bug.cgi?id=138686
Reviewed by Simon Fraser.
Re-landing due to flakey bots.
CachedFont had many #if ENABLE(SVG_FONTS) scattered throughout it.
Splitting out this SVG-specific code into a subclass of CachedFont
cleans up the design.
No new tests because there is no behavior change.
* CMakeLists.txt:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* css/CSSFontFaceSource.cpp:
(WebCore::CSSFontFaceSource::getFontData): There are two sections
in this function; one for SVG fonts and one for regular fonts.
I've moved these two sections into CachedFont and SVGCachedFont,
thereby simplifying this function.
(WebCore::CSSFontFaceSource::ensureFontData): Ditto.
(WebCore::CSSFontFaceSource::svgFontFaceElement): Moved to header.
(WebCore::CSSFontFaceSource::setSVGFontFaceElement): Ditto.
(WebCore::CSSFontFaceSource::isSVGFontFaceSource): Ditto.
* css/CSSFontFaceSource.h: Put functions that are simple enough to
be inlined here.
* css/CSSFontFaceSrcValue.cpp:
(WebCore::CSSFontFaceSrcValue::isSVGFontTarget): Convenience
function.
(WebCore::CSSFontFaceSrcValue::cachedFont): Pass through a boolean
from CSSFontSelector to CachedResourceHandle regarding if we should
be using SVGCachedFont instead of CachedFont.
* css/CSSFontFaceSrcValue.h: New convenience function.
* css/CSSFontSelector.cpp:
(WebCore::CSSFontSelector::addFontFaceRule): Pass through a boolean
* inspector/InspectorPageAgent.cpp:
(WebCore::InspectorPageAgent::cachedResourceType): Update for new
CachedResource type
(WebCore::cachedResourcesForFrame): Ditto.
* loader/cache/CachedFont.cpp:
(WebCore::CachedFont::CachedFont):
(WebCore::CachedFont::ensureCustomFontData): Taken from
CSSFontFaceSource::getFontData()
(WebCore::CachedFont::getFontData): Ditto.
(WebCore::CachedFont::platformDataFromCustomData): Ditto.
(WebCore::CachedFont::ensureSVGFontData): Moved to SVGCachedFont.
(WebCore::CachedFont::getSVGFontById): Ditto.
* loader/cache/CachedFont.h:
* loader/cache/CachedResource.cpp:
(WebCore::defaultPriorityForResourceType): Update for new enum
type.
* loader/cache/CachedResource.h:
* loader/cache/CachedResourceLoader.cpp:
(WebCore::createResource): Takes new boolean.
(WebCore::CachedResourceLoader::requestFont): Ditto.
(WebCore::CachedResourceLoader::checkInsecureContent): Update for
new enum type
(WebCore::CachedResourceLoader::canRequest): Ditto.
* loader/cache/CachedResourceLoader.h:
* loader/cache/CachedSVGFont.cpp: Added.
(WebCore::CachedSVGFont::CachedSVGFont): Moved from
CSSFontFaceSource::getFontData() and CachedFont
(WebCore::CachedSVGFont::getFontData): Ditto.
(WebCore::CachedSVGFont::platformDataFromCustomData): Ditto.
(WebCore::CachedSVGFont::ensureCustomFontData): Ditto.
(WebCore::CachedSVGFont::getSVGFontById): Ditto.
(WebCore::CachedSVGFont::firstFontFace): Ditto.
* loader/cache/CachedSVGFont.h: Subclass CachedFont.
* loader/cache/MemoryCache.cpp:
(WebCore::MemoryCache::getStatistics): Update for new enum.
* svg/SVGFontFaceUriElement.cpp:
(WebCore::isSVGFontTarget): Convenience function.
(WebCore::SVGFontFaceUriElement::loadFont): Update for new
boolean.
2014-11-18 Chris Dumez <cdumez@apple.com>
Update the Vector API to deal with unsigned types instead of size_t
https://bugs.webkit.org/show_bug.cgi?id=138824
Reviewed by Andreas Kling.
Update code base to fix build errors related to the typing changes
in the Vector API (size_t -> unsigned).
No new tests, no behavior change.
* WebCore.exp.in:
* bindings/js/JSDOMBinding.h:
(WebCore::jsArray):
* bindings/js/JSWebGLRenderingContextCustom.cpp:
* cssjit/SelectorCompiler.cpp:
* html/HTMLFormElement.cpp:
(WebCore::removeFromVector):
* html/parser/HTMLParserIdioms.h:
* html/parser/XSSAuditor.cpp:
2014-11-18 Myles C. Maxfield <mmaxfield@apple.com>
Unreviewed iOS build fix
* platform/graphics/ios/SimpleFontDataIOS.mm:
(WebCore::SimpleFontData::platformInit):
2014-11-18 Dan Bernstein <mitz@apple.com>
iOS build fix.
* platform/graphics/ios/SimpleFontDataIOS.mm:
(WebCore::SimpleFontData::platformInit):
2014-11-18 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r176264.
https://bugs.webkit.org/show_bug.cgi?id=138837
caused many test failures (Requested by litherum on #webkit).
Reverted changeset:
"Subclass CachedFont for SVG fonts"
https://bugs.webkit.org/show_bug.cgi?id=138686
http://trac.webkit.org/changeset/176264
2014-11-18 Daniel Bates <dabates@apple.com>
[iOS] Libdispatch, Dyld, IOKit, Mach, NSPointerFunctions, MobileGestalt
SPI are not available in public SDK
https://bugs.webkit.org/show_bug.cgi?id=138802
Reviewed by David Kilzer.
Add SPI wrapper headers {Dispatch, DynamicLinker, IOPMLib, MachVM, NSPointerFunctions, MobileGestalt}SPI.h
that forward declare applicable libdispatch, dyld, IOKit, mach, Foundation, MobileGestalt SPI
and use these headers instead of the including private headers corresponding to these libraries/frameworks.
* WebCore.xcodeproj/project.pbxproj: Add private headers MobileGestaltSPI.h and
MachVMSPI.h, and project headers DynamicLinkerSPI.h, NSPointerFunctionsSPI.h,
DispatchSPI.h and IOPMLibSPI.h. Also, sort files in Xcode project.
* bindings/objc/DOMInternal.mm: Include header NSPointerFunctionsSPI.h.
* bridge/objc/objc_instance.mm: Ditto; Also, sort #import directives.
* platform/cocoa/DisplaySleepDisablerCocoa.cpp: Substitute header IOPMLibSPI.h
for private header IOKit/pwr_mgt/IOPMLib.h.
* platform/cocoa/MemoryPressureHandlerCocoa.mm: Substitute header DispatchSPI.h
for private header dispatch/private.h.
* platform/graphics/ios/FontServicesIOS.mm: Substitute header DynamicLinkerSPI.h
for private header mach-o/dyld_priv.h.
* platform/ios/PlatformScreenIOS.mm: Substitute header MobileGestaltSPI.h for
private header MobileGestalt.h.
* platform/spi/cocoa/DispatchSPI.h: Added.
* platform/spi/cocoa/DynamicLinkerSPI.h: Added.
* platform/spi/cocoa/IOPMLibSPI.h: Added.
* platform/spi/cocoa/MachVMSPI.h: Added.
* platform/spi/cocoa/NSPointerFunctionsSPI.h: Added.
* platform/spi/ios/MobileGestaltSPI.h: Added.
2014-11-18 Myles C. Maxfield <mmaxfield@apple.com>
Subclass CachedFont for SVG fonts
https://bugs.webkit.org/show_bug.cgi?id=138686
Reviewed by Simon Fraser.
CachedFont had many #if ENABLE(SVG_FONTS) scattered throughout it.
Splitting out this SVG-specific code into a subclass of CachedFont
cleans up the design.
No new tests because there is no behavior change.
* CMakeLists.txt:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* css/CSSFontFaceSource.cpp:
(WebCore::CSSFontFaceSource::getFontData): There are two sections
in this function; one for SVG fonts and one for regular fonts.
I've moved these two sections into CachedFont and SVGCachedFont,
thereby simplifying this function.
(WebCore::CSSFontFaceSource::ensureFontData): Ditto.
(WebCore::CSSFontFaceSource::svgFontFaceElement): Moved to header.
(WebCore::CSSFontFaceSource::setSVGFontFaceElement): Ditto.
(WebCore::CSSFontFaceSource::isSVGFontFaceSource): Ditto.
* css/CSSFontFaceSource.h: Put functions that are simple enough to
be inlined here.
* css/CSSFontFaceSrcValue.cpp:
(WebCore::CSSFontFaceSrcValue::isSVGFontTarget): Convenience
function.
(WebCore::CSSFontFaceSrcValue::cachedFont): Pass through a boolean
from CSSFontSelector to CachedResourceHandle regarding if we should
be using SVGCachedFont instead of CachedFont.
* css/CSSFontFaceSrcValue.h: New convenience function.
* css/CSSFontSelector.cpp:
(WebCore::CSSFontSelector::addFontFaceRule): Pass through a boolean
* inspector/InspectorPageAgent.cpp:
(WebCore::InspectorPageAgent::cachedResourceType): Update for new
CachedResource type
(WebCore::cachedResourcesForFrame): Ditto.
* loader/cache/CachedFont.cpp:
(WebCore::CachedFont::CachedFont):
(WebCore::CachedFont::ensureCustomFontData): Taken from
CSSFontFaceSource::getFontData()
(WebCore::CachedFont::getFontData): Ditto.
(WebCore::CachedFont::platformDataFromCustomData): Ditto.
(WebCore::CachedFont::ensureSVGFontData): Moved to SVGCachedFont.
(WebCore::CachedFont::getSVGFontById): Ditto.
* loader/cache/CachedFont.h:
* loader/cache/CachedResource.cpp:
(WebCore::defaultPriorityForResourceType): Update for new enum
type.
* loader/cache/CachedResource.h:
* loader/cache/CachedResourceLoader.cpp:
(WebCore::createResource): Takes new boolean.
(WebCore::CachedResourceLoader::requestFont): Ditto.
(WebCore::CachedResourceLoader::checkInsecureContent): Update for
new enum type
(WebCore::CachedResourceLoader::canRequest): Ditto.
* loader/cache/CachedResourceLoader.h:
* loader/cache/CachedSVGFont.cpp: Added.
(WebCore::CachedSVGFont::CachedSVGFont): Moved from
CSSFontFaceSource::getFontData() and CachedFont
(WebCore::CachedSVGFont::getFontData): Ditto.
(WebCore::CachedSVGFont::platformDataFromCustomData): Ditto.
(WebCore::CachedSVGFont::ensureCustomFontData): Ditto.
(WebCore::CachedSVGFont::getSVGFontById): Ditto.
(WebCore::CachedSVGFont::firstFontFace): Ditto.
* loader/cache/CachedSVGFont.h: Subclass CachedFont.
* loader/cache/MemoryCache.cpp:
(WebCore::MemoryCache::getStatistics): Update for new enum.
* svg/SVGFontFaceUriElement.cpp:
(WebCore::isSVGFontTarget): Convenience function.
(WebCore::SVGFontFaceUriElement::loadFont): Update for new
boolean.
2014-11-18 Myles C. Maxfield <litherum@gmail.com>
Use underlining metrics from the font file
https://bugs.webkit.org/show_bug.cgi?id=138762
Reviewed by Dave Hyatt.
Test: platform/mac/fast/css3-text/css3-text-decoration/text-decoration-thickness.html
* platform/graphics/FontMetrics.h: Adding variables for text decoration thickness and
underline position.
(WebCore::FontMetrics::FontMetrics):
(WebCore::FontMetrics::decorationThickness):
(WebCore::FontMetrics::setDecorationThickness):
(WebCore::FontMetrics::underlinePosition):
(WebCore::FontMetrics::setUnderlinePosition):
* platform/graphics/freetype/SimpleFontDataFreeType.cpp:
(WebCore::SimpleFontData::platformInit): Initialize new FontMetrics members.
* platform/graphics/ios/SimpleFontDataIOS.mm:
(WebCore::SimpleFontData::platformInit): Ditto.
* platform/graphics/mac/SimpleFontDataMac.mm:
(WebCore::SimpleFontData::platformInit): Ditto.
* platform/graphics/win/SimpleFontDataCGWin.cpp:
(WebCore::SimpleFontData::platformInit): Ditto.
* platform/graphics/win/SimpleFontDataCairoWin.cpp:
(WebCore::SimpleFontData::platformInit): Ditto.
* platform/graphics/win/SimpleFontDataWin.cpp:
(WebCore::SimpleFontData::initGDIFont): Ditto.
* rendering/InlineTextBox.cpp:
(WebCore::InlineTextBox::paintDecoration): Use FontMetrics data.
* style/InlineTextBoxStyle.cpp:
(WebCore::computeUnderlineOffset): Ditto.
(WebCore::visualOverflowForDecorations): Ditto.
* style/InlineTextBoxStyle.h:
(WebCore::textDecorationStrokeThickness): Deleted.
* svg/SVGFontData.cpp:
(WebCore::SVGFontData::initializeFontData): Initialize new FontMetrics members.
2014-11-17 David Hyatt <hyatt@apple.com>
Improve Ruby selection (getting rid of overlap and improving gap filling)
https://bugs.webkit.org/show_bug.cgi?id=138250
Reviewed by Dean Jackson.
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::selectionGaps):
(WebCore::RenderBlock::blockSelectionGaps):
Add Ruby text in along with the Ruby base.
* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::inlineSelectionGaps):
Don't let block gaps get filled in here.
* rendering/RenderRubyBase.h:
Expose accessor to the ruby run.
* rendering/RenderRubyText.cpp:
(WebCore::RenderRubyText::rubyRun):
* rendering/RenderRubyText.h:
Add accessor to the ruby run.
* rendering/RootInlineBox.cpp:
(WebCore::RootInlineBox::selectionTop):
(WebCore::RootInlineBox::selectionBottom):
Improve selectionTop and selectionBottom of ruby bases to avoid the
ruby text. Improve the selectionTop and selectionBottom of ruby texts
to fill the gap up to the previous/next line as appropriate.
2014-11-18 Shivakumar JM <shiva.jm@samsung.com>
crypto: Use sequence<> instead of KeyUsage[] in IDL.
https://bugs.webkit.org/show_bug.cgi?id=138823
Reviewed by Darin Adler.
Use sequence<KeyUsage> instead of KeyUsage[] in crypto IDL as per spec: https://dvcs.w3.org/hg/webcrypto-api/raw-file/tip/spec/
Overview.html#SubtleCrypto-method-generateKey
No new tests, no behavior change.
* crypto/SubtleCrypto.idl:
2014-11-18 Philippe Normand <pnormand@igalia.com>
HRTFDatabaseLoader is not an absolute condition to run audioContext
https://bugs.webkit.org/show_bug.cgi?id=138829
Reviewed by Jer Noble.
This patch is a port of the following Blink revision by
<keonho07.kim@samsung.com>:
<https://src.chromium.org/viewvc/blink?revision=167887&view=revision>
* Modules/webaudio/AudioContext.cpp:
(WebCore::AudioContext::AudioContext):
(WebCore::AudioContext::isRunnable): Deleted.
* Modules/webaudio/AudioContext.h:
(WebCore::AudioContext::hrtfDatabaseLoader): Deleted.
* Modules/webaudio/AudioDestinationNode.cpp:
(WebCore::AudioDestinationNode::render):
* Modules/webaudio/OfflineAudioDestinationNode.cpp:
(WebCore::OfflineAudioDestinationNode::offlineRender):
* Modules/webaudio/PannerNode.cpp:
(WebCore::PannerNode::PannerNode):
(WebCore::PannerNode::process):
(WebCore::PannerNode::initialize):
(WebCore::PannerNode::setPanningModel):
* Modules/webaudio/PannerNode.h:
* Modules/webaudio/RealtimeAnalyser.cpp:
* Modules/webaudio/RealtimeAnalyser.h:
* platform/audio/HRTFDatabaseLoader.cpp:
(WebCore::HRTFDatabaseLoader::createAndLoadAsynchronouslyIfNecessary):
2014-11-18 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r176218.
https://bugs.webkit.org/show_bug.cgi?id=138827
seems to have caused regressions on the perf bots (Requested
by lajava on #webkit).
Reverted changeset:
"[CSS Grid Layout] Upgrade align-self and align-items parsing
to CSS 3"
https://bugs.webkit.org/show_bug.cgi?id=133359
http://trac.webkit.org/changeset/176218
2014-11-18 Joanmarie Diggs <jdiggs@igalia.com>
AX: [ATK] Crash getting the orientation of a MenuListOption after the MenuList was removed from the document
https://bugs.webkit.org/show_bug.cgi?id=138727
Reviewed by Chris Fleizach.
AccessibilityMenuListOption::elementRect() returns the value of the
grandparent MenuList, asserting that the grandparent exists with that
role. But it is possible to have an existing MenuListOption and remove
the element which had been backing that MenuList from the document.
Adding null checks prior to the assertions prevents our crashing if the
parent or grandparent was removed.
Test: platform/gtk/accessibility/combobox-descendants-orientation-crash.html
* accessibility/AccessibilityMenuListOption.cpp:
(WebCore::AccessibilityMenuListOption::elementRect):
2014-11-17 Benjamin Poulain <bpoulain@apple.com>
Fix a small indentation mistake in SelectorCodeGenerator::generateNthFilterTest
* cssjit/SelectorCompiler.cpp:
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateNthFilterTest):
2014-11-17 Benjamin Poulain <benjamin@webkit.org>
Fix two bad function names of HTMLFormControlElement
https://bugs.webkit.org/show_bug.cgi?id=138790
Reviewed by Andreas Kling.
Darin suggested some name improvements in https://bugs.webkit.org/show_bug.cgi?id=138769
* dom/CheckedRadioButtons.cpp:
(WebCore::RadioButtonGroup::add):
(WebCore::RadioButtonGroup::updateCheckedState):
(WebCore::RadioButtonGroup::requiredAttributeChanged):
(WebCore::RadioButtonGroup::remove):
(WebCore::RadioButtonGroup::updateValidityForAllButtons):
(WebCore::RadioButtonGroup::setNeedsValidityCheckForAllButtons): Deleted.
* html/FileInputType.cpp:
(WebCore::FileInputType::setFiles):
* html/HTMLButtonElement.cpp:
(WebCore::HTMLButtonElement::computeWillValidate):
(WebCore::HTMLButtonElement::recalcWillValidate): Deleted.
* html/HTMLButtonElement.h:
* html/HTMLFieldSetElement.h:
* html/HTMLFormControlElement.cpp:
(WebCore::HTMLFormControlElement::requiredAttributeChanged):
(WebCore::HTMLFormControlElement::computeWillValidate):
(WebCore::HTMLFormControlElement::willValidate):
(WebCore::HTMLFormControlElement::setNeedsWillValidateCheck):
(WebCore::HTMLFormControlElement::isValidFormControlElement):
(WebCore::HTMLFormControlElement::updateValidity):
(WebCore::HTMLFormControlElement::setCustomValidity):
(WebCore::HTMLFormControlElement::recalcWillValidate): Deleted.
(WebCore::HTMLFormControlElement::setNeedsValidityCheck): Deleted.
* html/HTMLFormControlElement.h:
* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::runPostTypeUpdateTasks):
(WebCore::HTMLInputElement::parseAttribute):
(WebCore::HTMLInputElement::setChecked):
(WebCore::HTMLInputElement::setValueInternal):
(WebCore::HTMLInputElement::setValueFromRenderer):
(WebCore::HTMLInputElement::computeWillValidate):
(WebCore::HTMLInputElement::parseMaxLengthAttribute):
(WebCore::HTMLInputElement::recalcWillValidate): Deleted.
* html/HTMLInputElement.h:
* html/HTMLKeygenElement.h:
* html/HTMLOutputElement.h:
* html/HTMLSelectElement.cpp:
(WebCore::HTMLSelectElement::deselectItems):
(WebCore::HTMLSelectElement::optionSelectedByUser):
(WebCore::HTMLSelectElement::listBoxSelectItem):
(WebCore::HTMLSelectElement::add):
(WebCore::HTMLSelectElement::parseAttribute):
(WebCore::HTMLSelectElement::childrenChanged):
(WebCore::HTMLSelectElement::optionElementChildrenChanged):
(WebCore::HTMLSelectElement::setLength):
(WebCore::HTMLSelectElement::selectAll):
(WebCore::HTMLSelectElement::updateListBoxSelection):
(WebCore::HTMLSelectElement::selectOption):
(WebCore::HTMLSelectElement::restoreFormControlState):
(WebCore::HTMLSelectElement::parseMultipleAttribute):
(WebCore::HTMLSelectElement::reset):
* html/HTMLTextAreaElement.cpp:
(WebCore::HTMLTextAreaElement::parseAttribute):
(WebCore::HTMLTextAreaElement::subtreeHasChanged):
(WebCore::HTMLTextAreaElement::setValue):
(WebCore::HTMLTextAreaElement::setNonDirtyValue):
2014-11-17 Sukolsak Sakshuwong <sukolsak@gmail.com>
Add parsing for :role()
https://bugs.webkit.org/show_bug.cgi?id=138310
Reviewed by Benjamin Poulain.
Add support for parsing :role() pseudo class. The implementation of selector
matching will be in a follow-up patch.
* css/CSSGrammar.y.in:
* css/CSSParser.cpp:
(WebCore::CSSParser::detectFunctionTypeToken):
* css/CSSSelector.cpp:
(WebCore::appendPseudoClassFunctionTail):
(WebCore::CSSSelector::selectorText):
* css/CSSSelector.h:
* css/SelectorChecker.cpp:
(WebCore::SelectorChecker::checkOne):
* css/SelectorPseudoClassAndCompatibilityElementMap.in:
* cssjit/SelectorCompiler.cpp:
(WebCore::SelectorCompiler::addPseudoClassType):
2014-11-17 Simon Fraser <simon.fraser@apple.com>
[iOS WK1] Sometimes, missing tiles in -webkit-overflow-scrolling: touch in UIWebViews
https://bugs.webkit.org/show_bug.cgi?id=138815
rdar://problem/18746203
Reviewed by Tim Horton.
The scroll-velocity-related data members on FrameView, added in r168233, were uninitialized in UIWebViews,
so FrameView::computeCoverageRect() could return garbage results, leading to too much or too little tile coverage.
We still add additional coverage from the new inclusion of a margin area, but, for simplicity, leave that the same
between WK1 and WK2 for now.
* page/FrameView.cpp:
(WebCore::FrameView::FrameView):
2014-11-17 Chris Dumez <cdumez@apple.com>
Add initial layout testing coverage for timer throttling
https://bugs.webkit.org/show_bug.cgi?id=138809
Reviewed by Simon Fraser.
Add isTimerThrottled() API to Internals so that we can add layout test
coverage for timer throttling.
Tests: fast/dom/nested-timer-invisible-element-throttling.html
fast/dom/nested-timer-visible-element-throttling.html
fast/dom/repeating-timer-invisible-element-throttling.html
fast/dom/repeating-timer-visible-element-throttling.html
* page/DOMTimer.h:
* testing/Internals.cpp:
(WebCore::Internals::isTimerThrottled):
* testing/Internals.h:
* testing/Internals.idl:
2014-11-17 Zalan Bujtas <zalan@apple.com>
Simple line layout: Rename FlowContentIterator and move implementation to SimpleLineLayoutFlowContents.cpp
https://bugs.webkit.org/show_bug.cgi?id=138799
Reviewed by Antti Koivisto.
This is in preparation to support multiple renderers.
The FlowContents class will be used not just when we create runs, but also when we resolve them at painting time.
No change in functionality.
* CMakeLists.txt:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* rendering/SimpleLineLayout.cpp:
(WebCore::SimpleLineLayout::removeTrailingWhitespace):
(WebCore::SimpleLineLayout::initializeNewLine):
(WebCore::SimpleLineLayout::splitFragmentToFitLine):
(WebCore::SimpleLineLayout::nextFragment):
(WebCore::SimpleLineLayout::createLineRuns):
(WebCore::SimpleLineLayout::closeLineEndingAndAdjustRuns):
(WebCore::SimpleLineLayout::createTextRuns):
(WebCore::SimpleLineLayout::FlowContentIterator::FlowContentIterator): Deleted.
(WebCore::SimpleLineLayout::FlowContentIterator::findNextBreakablePosition): Deleted.
(WebCore::SimpleLineLayout::FlowContentIterator::findNextNonWhitespacePosition): Deleted.
(WebCore::SimpleLineLayout::FlowContentIterator::textWidth): Deleted.
(WebCore::SimpleLineLayout::FlowContentIterator::isNewlineCharacter): Deleted.
(WebCore::SimpleLineLayout::FlowContentIterator::isEndOfContent): Deleted.
(WebCore::SimpleLineLayout::FlowContentIterator::style): Deleted.
(WebCore::SimpleLineLayout::computeLineLeft): Deleted.
* rendering/SimpleLineLayoutFlowContents.cpp: Added.
(WebCore::SimpleLineLayout::FlowContents::FlowContents):
(WebCore::SimpleLineLayout::FlowContents::findNextBreakablePosition):
(WebCore::SimpleLineLayout::FlowContents::findNextNonWhitespacePosition):
(WebCore::SimpleLineLayout::FlowContents::textWidth):
* rendering/SimpleLineLayoutFlowContents.h: Added.
(WebCore::SimpleLineLayout::FlowContents::Style::Style):
(WebCore::SimpleLineLayout::FlowContents::style):
(WebCore::SimpleLineLayout::FlowContents::isNewlineCharacter):
(WebCore::SimpleLineLayout::FlowContents::isEndOfContent):
2014-11-17 Daniel Bates <dabates@apple.com>
Unreviewed, rolling out r176232.
Broke the Mac build. Will investigate offline.
Reverted changeset:
"[iOS] Libdispatch, Dyld, IOKit, Mach, NSPointerFunctions,
MobileGestalt"
https://bugs.webkit.org/show_bug.cgi?id=138802
http://trac.webkit.org/changeset/176232
2014-11-17 Daniel Bates <dabates@apple.com>
[iOS] Libdispatch, Dyld, IOKit, Mach, NSPointerFunctions, MobileGestalt
SPI are not available in public SDK
https://bugs.webkit.org/show_bug.cgi?id=138802
Reviewed by David Kilzer.
Add SPI wrapper headers {Dispatch, DynamicLinker, IOPMLib, MachVM, NSPointerFunctions, MobileGestalt}SPI.h
that forward declare applicable libdispatch, dyld, IOKit, mach, Foundation, MobileGestalt SPI
and use these headers instead of the including private headers corresponding to these libraries/frameworks.
* WebCore.xcodeproj/project.pbxproj: Add private headers MobileGestaltSPI.h and
MachVMSPI.h, and project headers DynamicLinkerSPI.h, NSPointerFunctionsSPI.h,
DispatchSPI.h and IOPMLibSPI.h. Also, sort files in Xcode project.
* bindings/objc/DOMInternal.mm: Include header NSPointerFunctionsSPI.h.
* bridge/objc/objc_instance.mm: Ditto; Also, sort #import directives.
* platform/cocoa/DisplaySleepDisablerCocoa.cpp: Substitute header IOPMLibSPI.h
for private header IOKit/pwr_mgt/IOPMLib.h.
* platform/cocoa/MemoryPressureHandlerCocoa.mm: Substitute header DispatchSPI.h
for private header dispatch/private.h.
* platform/graphics/ios/FontServicesIOS.mm: Substitute header DynamicLinkerSPI.h
for private header mach-o/dyld_priv.h.
* platform/ios/PlatformScreenIOS.mm: Substitute header MobileGestaltSPI.h for
private header MobileGestalt.h.
* platform/spi/cocoa/DispatchSPI.h: Added.
* platform/spi/cocoa/DynamicLinkerSPI.h: Added.
* platform/spi/cocoa/IOPMLibSPI.h: Added.
* platform/spi/cocoa/MachVMSPI.h: Added.
* platform/spi/cocoa/NSPointerFunctionsSPI.h: Added.
* platform/spi/ios/MobileGestaltSPI.h: Added.
2014-11-17 Daniel Bates <dabates@apple.com>
[iOS] CoreText and CoreUI SPI are not available in public SDK
https://bugs.webkit.org/show_bug.cgi?id=138760
Reviewed by David Kilzer.
Add a SPI wrapper header CoreUISPI.h that forward declares CoreUI SPI
and use this header instead of including private headers of CoreUI directly.
Additionally, add more forward declarations for CoreText SPI.
* WebCore.xcodeproj/project.pbxproj: Add project header CoreUISPI.h.
* platform/graphics/ios/FontCacheIOS.mm: Include header CoreTextSPI.h instead
of including CoreText headers directly.
* platform/graphics/mac/FontMac.mm: Include header CoreUISPI.h instead
of including CoreUI headers directly.
* platform/graphics/mac/GlyphPageTreeNodeMac.cpp: Remove unnecessary
include of CoreText headers. These headers will be included by header
CoreTextSPI.h (at the top of the file).
* platform/graphics/mac/SimpleFontDataMac.mm: Remove forward declaration
of CTFontDescriptorIsSystemUIFont() and include of header CTFontDescriptorPriv.h
as this duplicates the logic in CoreTextSPI.h, which is included in this file.
* platform/spi/cocoa/CoreTextSPI.h: Added more forward declarations. Simplified
#include directives.
* platform/spi/ios/CoreUISPI.h: Added.
* rendering/RenderThemeIOS.mm: Move CoreUI externs from this file to file
CoreUISPI.h and include header CoreUISPI.h.
2014-11-17 Zalan Bujtas <zalan@apple.com>
Simple line layout: Drop 16bit support temporarily.
https://bugs.webkit.org/show_bug.cgi?id=138796
Reviewed by Antti Koivisto.
This is in preparation to multiple renderers support.
It requires code refactoring on top of the coming multiple renderers codebase.
(Not expecting any significant coverage shrinking.)
* rendering/SimpleLineLayout.cpp:
(WebCore::SimpleLineLayout::canUseFor):
(WebCore::SimpleLineLayout::FlowContentIterator::findNextBreakablePosition):
(WebCore::SimpleLineLayout::FlowContentIterator::findNextNonWhitespacePosition):
(WebCore::SimpleLineLayout::FlowContentIterator::textWidth):
(WebCore::SimpleLineLayout::removeTrailingWhitespace):
(WebCore::SimpleLineLayout::initializeNewLine):
(WebCore::SimpleLineLayout::splitFragmentToFitLine):
(WebCore::SimpleLineLayout::nextFragment):
(WebCore::SimpleLineLayout::createLineRuns):
(WebCore::SimpleLineLayout::closeLineEndingAndAdjustRuns):
(WebCore::SimpleLineLayout::createTextRuns):
(WebCore::SimpleLineLayout::create):
2014-11-17 Tim Horton <timothy_horton@apple.com>
DataDetectors PageOverlay callbacks can come in to the wrong overlay
https://bugs.webkit.org/show_bug.cgi?id=138801
<rdar://problem/18991369>
Reviewed by Anders Carlsson.
* page/PageOverlay.cpp:
(WebCore::generatePageOverlayID):
(WebCore::PageOverlay::PageOverlay):
* page/PageOverlay.h:
Give each PageOverlay a unique ID.
2014-11-17 Javier Fernandez <jfernandez@igalia.com>
[CSS Grid Layout] Upgrade align-self and align-items parsing to CSS 3
https://bugs.webkit.org/show_bug.cgi?id=133359
Reviewed by David Hyatt.
Broaden justify-self's parsing name as a preparation of migrating
align-self, align-items and justify-items to the CSS 3 Alignment syntax.
The current naming was too tied to justify-self and needs to
be broadened. This will reduce the follow-up implementations'
patches.
Upgrade align-self and align-items parsing to CSS 3
This change migrates the 2 properties to the CSS 3 Alignment
parsing. The new parsing is identical to how we parse
'justify-self'. The 2 properties need to be migrated together
as they are used in tandem in CSSComputedStyleDeclaration.
This change also removes EAlignItems as it is now unused.
Tests: css3/parse-align-items.html
css3/parse-align-self.html
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::valueForItemPositionWithOverflowAlignment): Added. Builds the CSSValue for the for the alignment properties.
(WebCore::ComputedStyleExtractor::propertyValue):
* css/CSSParser.cpp:
(WebCore::isKeywordPropertyID): Removed align-items and align-self from the list.
(WebCore::isValidKeywordPropertyAndValue): Removed align-items and align-self from the list.
(WebCore::CSSParser::parseValue): Added align-items and align-self to the list and call to the generic parsing fuction for the alignment properties.
(WebCore::isBaselinePositionKeyword): Utility function added to identify Baseline keyword values.
(WebCore::CSSParser::parseItemPositionOverflowPosition): Generic parsing fuction for the alignment properties.
(WebCore::CSSParser::parseJustifySelf): Deleted.
* css/CSSParser.h:
* css/CSSPrimitiveValueMappings.h:
(WebCore::CSSPrimitiveValue::CSSPrimitiveValue): Refactoring some mapping functions.
(WebCore::CSSPrimitiveValue::operator ItemPosition): Added. Replace the old EAlignItems enumeration.
(WebCore::CSSPrimitiveValue::operator OverflowAlignment): Added.
(WebCore::CSSPrimitiveValue::operator EAlignItems): Deleted.
(WebCore::CSSPrimitiveValue::operator EJustifySelf): Deleted.
(WebCore::CSSPrimitiveValue::operator EJustifySelfOverflowAlignment): Deleted.
* css/CSSPropertyNames.in:
* css/CSSValueKeywords.in:
* css/StyleResolver.cpp:
(WebCore::StyleResolver::adjustRenderStyle): Added a new adjustment to resolve the "auto" vale on the alignment properties.
(WebCore::StyleResolver::adjustStyleForAlignment): Added. Function to resolve the "auto" vale on the alignment properties.
(WebCore::StyleResolver::applyProperty):
(WebCore::isDisplayFlexibleBox): Deleted. Moved to the RenderStyle.
(WebCore::isDisplayGridBox): Deleted. Moved to the RenderStyle.
(WebCore::isDisplayFlexibleOrGridBox): Deleted. Moved to the RenderStyle.
* css/StyleResolver.h:
* rendering/RenderBox.cpp:
(WebCore::flexItemHasStretchAlignment): Adapted to the new ItemPosition enum.
* rendering/RenderFlexibleBox.cpp:
(WebCore::RenderFlexibleBox::firstLineBaseline): Adapted to the new ItemPosition enum.
(WebCore::resolveAlignment): Consider also that align-items could be "auto", since it's the default now.
(WebCore::RenderFlexibleBox::styleDidChange): Adapted to the new ItemPosition enum.
(WebCore::RenderFlexibleBox::alignmentForChild): Adapted to the new ItemPosition enum.
(WebCore::RenderFlexibleBox::needToStretchChild): Adapted to the new ItemPosition enum.
(WebCore::RenderFlexibleBox::layoutAndPlaceChildren): Adapted to the new ItemPosition enum.
(WebCore::RenderFlexibleBox::alignChildren): Adapted to the new ItemPosition enum.
* rendering/RenderFlexibleBox.h:
* rendering/RenderFullScreen.cpp:
(WebCore::createFullScreenStyle): Adapted to the new ItemPosition enum.
* rendering/RenderMenuList.cpp:
(WebCore::RenderMenuList::adjustInnerStyle): Adapted to the new ItemPosition enum.
* rendering/mathml/RenderMathMLRoot.cpp:
(WebCore::RenderMathMLRoot::updateStyle): Adapted to the new ItemPosition enum.
* rendering/mathml/RenderMathMLScripts.cpp:
(WebCore::RenderMathMLScripts::fixAnonymousStyleForSubSupPair): Adapted to the new ItemPosition enum.
(WebCore::RenderMathMLScripts::fixAnonymousStyles): Adapted to the new ItemPosition enum.
* rendering/style/RenderStyle.h: Adapted to the new ItemPosition enum.
* rendering/style/RenderStyleConstants.h: Adapted to the new ItemPosition enum.
* rendering/style/StyleRareNonInheritedData.cpp: Adapted to the new ItemPosition enum.
(WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData): Adapted to the new ItemPosition enum.
(WebCore::StyleRareNonInheritedData::operator==): Adapted to the new ItemPosition enum.
* rendering/style/StyleRareNonInheritedData.h: Adapted to the new ItemPosition enum.
* style/StyleResolveTree.cpp:
(WebCore::Style::determineChange): Changes in the alignItems property will cause a Detach.
2014-11-17 Shivakumar JM <shiva.jm@samsung.com>
Attribute text in HTMLAnchorElement should behave as per specification.
https://bugs.webkit.org/show_bug.cgi?id=138557
Reviewed by Darin Adler.
attribute text in HTMLAnchorElement should not be readonly as per specification
http://www.w3.org/TR/html/text-level-semantics.html#dom-a-text. It should behave as textContent attribute.
Also This matches the behavior of Chrome 38 and FireFox.
Test: fast/dom/HTMLAnchorElement/anchor-text-attribute.html
* html/HTMLAnchorElement.cpp:
(WebCore::HTMLAnchorElement::text):
(WebCore::HTMLAnchorElement::setText):
* html/HTMLAnchorElement.h:
* html/HTMLAnchorElement.idl:
2014-11-17 Chris Dumez <cdumez@apple.com>
Throttle timers that change the style of elements outside the viewport
https://bugs.webkit.org/show_bug.cgi?id=138292
Reviewed by Antti Koivisto.
Throttle timers that change the style of elements outside the viewport
to 1 second, similarly to what was already done for timers interacting
with non user observable plugins. To be conservative, we don't throttle
timers that also cause DOM Tree modifications (e.g. adding/removing
nodes, modify element attributes).
On huffingtonpost.com, the CPU usage is at ~17% when the top scrolling
banner is inside the viewport on my machine. Without this patch, CPU
usage would stay ~17% when the banner is outside the viewport. Thanks
to timer throttling, CPU usage now goes down to ~1.5%, without user
observable side effects. The timers get unthrottled when they are
inside the viewport again (i.e. due to scrolling or layout).
On espn.com, the CPU usage goes down from ~7% at the top of the page
to ~1% when scrolling to the bottom of the page. On ebay.com, CPU
usage goes down from ~25% at the top of the page to less than 1% when
scrolling to the bottom of the page.
2014-11-17 peavo@outlook.com <peavo@outlook.com>
[WinCairo] Compile error, CoreGraphics header file included.
https://bugs.webkit.org/show_bug.cgi?id=138795
Reviewed by Brent Fulgham.
CoreGraphics is not available on WinCairo.
* platform/graphics/win/FontCacheWin.cpp:
2014-11-17 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r176169.
https://bugs.webkit.org/show_bug.cgi?id=138797
Appears to have broken svg/custom/anchor-on-use.svg (Requested
by ap on #webkit).
Reverted changeset:
"Attribute text in HTMLAnchorElement should behave as per
specification."
https://bugs.webkit.org/show_bug.cgi?id=138557
http://trac.webkit.org/changeset/176169
2014-11-17 Daniel Bates <dabates@apple.com>
[iOS] AVKit and MediaPlayer SPI are not available in public SDK
https://bugs.webkit.org/show_bug.cgi?id=138756
Reviewed by Eric Carlson.
Add a SPI wrapper headers {AVKit, MPAVRoutingController}SPI.h that forward declares
AVKit and MPAVRoutingController SPI, respectively, and use these header instead of
including private headers of AVKit and MediaPlayer directly.
* WebCore.xcodeproj/project.pbxproj: Add project and private header AVKitSPI.h
and MPAVRoutingControllerSPI.h, respectively.
* platform/audio/ios/MediaSessionManagerIOS.mm: Include header MPAVRoutingControllerSPI.h
instead of including the private header MPAVRoutingController.h.
* platform/ios/WebVideoFullscreenInterfaceAVKit.mm: Include header AVKitSPI.h
instead of including AVKit headers directly.
2014-11-17 Daniel Bates <dabates@apple.com>
Attempt to fix the Mac build after <https://trac.webkit.org/changeset/176204>
(https://bugs.webkit.org/show_bug.cgi?id=138751)
Move declaration of CAContext to be before the declaration of CALayer since
the latter depends on the former.
* platform/spi/cocoa/QuartzCoreSPI.h:
2014-11-17 Daniel Bates <dabates@apple.com>
[iOS] QuartzCore SPI not available in public SDK
https://bugs.webkit.org/show_bug.cgi?id=138751
Reviewed by David Kilzer.
Add a SPI wrapper header called QuartzCoreSPI.h that forward declares
QuartzCore SPI and use this header instead of including private headers
of QuartzCore directly.
* WebCore.xcodeproj/project.pbxproj: Added private header QuartzCoreSPI.h.
* platform/graphics/ca/mac/PlatformCAFiltersMac.h: Removed; incorporated its
functionality into QuartzCoreSPI.h.
* platform/graphics/ca/mac/PlatformCAFiltersMac.mm: Substitute header
QuartzCoreSPI.h for PlatformCAFiltersMac.h as the content of the latter
was incorporated into the former.
* platform/graphics/ca/mac/PlatformCALayerMac.mm: Move CALayer and CATiledLayer
forward declarations from this file to file QuartzCoreSPI.h and include
header QuartzCoreSPI.h instead of including CATiledLayerPrivate.h directly. Also
remove header PlatformCAFiltersMac.h as its content is incorporated into QuartzCoreSPI.h
* platform/ios/LegacyTileCache.mm: Include headers CoreGraphicsSPI.h and QuartzCoreSPI.h
instead of including QuartzCore headers directly.
* platform/ios/LegacyTileGrid.mm: Include header QuartzCoreSPI.h instead
of including QuartzCore headers directly. Also sort the list of #include directives.
* platform/ios/LegacyTileGridTile.mm: Include header QuartzCoreSPI.h
instead of including QuartzCore headers directly.
* platform/spi/cocoa/QuartzCoreSPI.h: Added.
2014-11-17 Chris Dumez <cdumez@apple.com>
Move more CSS properties to the new StyleBuilder
https://bugs.webkit.org/show_bug.cgi?id=138766
Reviewed by Darin Adler.
Move more CSS properties from DeprecatedStyleBuilder to the new
StyleBuilder:
line-height
word-spacing
-webkit-marquee-repetition
-webkit-text-underline-position
No new tests, no behavior change.
* css/CSSPropertyNames.in:
* css/DeprecatedStyleBuilder.cpp:
(WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
(WebCore::csstoLengthConversionDataWithTextZoomFactor): Deleted.
(WebCore::ApplyPropertyMarqueeRepetition::applyValue): Deleted.
(WebCore::ApplyPropertyMarqueeRepetition::createHandler): Deleted.
(WebCore::ApplyPropertyTextUnderlinePosition::applyValue): Deleted.
(WebCore::ApplyPropertyTextUnderlinePosition::createHandler): Deleted.
(WebCore::ApplyPropertyLineHeight::applyValue): Deleted.
(WebCore::ApplyPropertyLineHeight::createHandler): Deleted.
(WebCore::ApplyPropertyLineHeightForIOSTextAutosizing::applyValue): Deleted.
(WebCore::ApplyPropertyLineHeightForIOSTextAutosizing::applyInitialValue): Deleted.
(WebCore::ApplyPropertyLineHeightForIOSTextAutosizing::applyInheritValue): Deleted.
(WebCore::ApplyPropertyLineHeightForIOSTextAutosizing::createHandler): Deleted.
(WebCore::ApplyPropertyWordSpacing::applyValue): Deleted.
(WebCore::ApplyPropertyWordSpacing::createHandler): Deleted.
* css/StyleBuilderConverter.h:
(WebCore::StyleBuilderConverter::convertMarqueeRepetition):
(WebCore::StyleBuilderConverter::convertTextUnderlinePosition):
* css/StyleBuilderCustom.h:
(WebCore::StyleBuilderFunctions::csstoLengthConversionDataWithTextZoomFactor):
(WebCore::StyleBuilderFunctions::convertLineHeight):
(WebCore::StyleBuilderFunctions::applyValueWordSpacing):
(WebCore::StyleBuilderFunctions::applyInheritLineHeight):
(WebCore::StyleBuilderFunctions::applyInitialLineHeight):
(WebCore::StyleBuilderFunctions::applyValueLineHeight):
2014-11-16 Andreas Kling <akling@apple.com>
Avoid synchronous style recalc when mutating a Node inside FrameSelection.
<https://webkit.org/b/138791>
Reviewed by Antti Koivisto.
We can safely clear the RenderView's selection without doing a synchronous
style recalc first.
This is a small progression on Speedometer locally.
* editing/FrameSelection.cpp:
(WebCore::DragCaretController::nodeWillBeRemoved):
(WebCore::FrameSelection::respondToNodeModification):
(WebCore::clearRenderViewSelection): Deleted.
Merged clearRenderViewSelection() into the call sites and removed
the now-unnecessary protection of the Document.
2014-11-17 Eric Carlson <eric.carlson@apple.com>
[iOS] allow host application to opt-out of alternate fullscreen
https://bugs.webkit.org/show_bug.cgi?id=138787
Reviewed by Darin Adler.
* Modules/mediacontrols/MediaControlsHost.cpp:
(WebCore::MediaControlsHost::optimizedFullscreenSupported): Check mediaSession().allowsAlternateFullscreen.
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::enterFullscreenOptimized): Do nothing if
mediaSession().allowsAlternateFullscreen says it isn't allowed.
* html/HTMLMediaSession.cpp:
(WebCore::HTMLMediaSession::allowsAlternateFullscreen): New, check settings.
* html/HTMLMediaSession.h:
* page/Settings.cpp: Add allowsAlternateFullscreen.
* page/Settings.in: Ditto.
2014-11-16 Zan Dobersek <zdobersek@igalia.com>
Replace RenderSVGResource::cast<T>() with downcast<T>()
https://bugs.webkit.org/show_bug.cgi?id=138290
Reviewed by Chris Dumez.
Add type traits for the RenderSVGResource hierarchy. This enables
using the typecasting framework in getRenderSVGResourceById() that
in return renders the RenderSVGResource::cast<>() template and all
the static s_resourceType member variables in the hierarchy removable.
* WebCore.order:
* rendering/svg/RenderSVGResource.h:
(WebCore::RenderSVGResource::cast): Deleted.
* rendering/svg/RenderSVGResourceClipper.h:
* rendering/svg/RenderSVGResourceContainer.h:
(WebCore::getRenderSVGResourceById):
* rendering/svg/RenderSVGResourceFilter.h:
(isType):
* rendering/svg/RenderSVGResourceLinearGradient.h:
* rendering/svg/RenderSVGResourceMarker.h:
* rendering/svg/RenderSVGResourceMasker.h:
* rendering/svg/RenderSVGResourcePattern.h:
* rendering/svg/RenderSVGResourceRadialGradient.h:
* rendering/svg/RenderSVGResourceSolidColor.h:
2014-11-16 Benjamin Poulain <benjamin@webkit.org>
Implement :valid and :invalid matching for the fieldset element
https://bugs.webkit.org/show_bug.cgi?id=138769
Reviewed by Darin Adler.
In the latest HTML spec, the pseudo classes :valid and :invalid match
a fieldset element based on its descendants:
https://html.spec.whatwg.org/#selector-valid
https://html.spec.whatwg.org/#selector-invalid
This patch adds that behavior.
There are two key problems to solve with these pseudo classes on fieldset:
-Efficient matching.
-Style invalidation when any of the descendant changes.
To implement the style invalidation, I have modified HTMLFormControlElement
to notify its ancestor when its state changes.
The first change is making the state fully internal to HTMLFormControlElement,
we do not want subclass to be able to change the behavior and forget to update
the ancestors.
To achieve that encapsulation, the interface was changed a bit:
-Neither willValidate() nor isValidFormControlElement() inherit from Element.
Instead, willValidate() is the implementation of FormAssociatedElement's interface
and it is final. The method isValidFormControlElement() becomes completely internal
to HTMLFormControlElement.
-Since willValidate() should no longer be re-implemented by subclass, the elements
that were depending on it have been migrated to recalcWillValidate() to set
the initial state as needed.
With the validity state fully encapsulated in HTMLFormControlElement, all I need
is a way to communicate that information to HTMLFieldSetElement ancestors.
This is done in two cases:
-The validity state changes.
-The tree changes in a way that would make the input element not a descendant
of a HTMLFieldSetElement.
The invalidation is simply done by walking up the ancestors and adding the current
element to a "validity dependency list" on each HTMLFieldSetElement.
Tests: fast/css/pseudo-invalid-fieldset-invalidation-optimization.html
fast/css/pseudo-invalid-fieldset-style-sharing.html
fast/css/pseudo-invalid-fieldset.html
fast/css/pseudo-valid-fieldset-invalidation-optimization.html
fast/css/pseudo-valid-fieldset-style-sharing.html
fast/css/pseudo-valid-fieldset.html
fast/selectors/invalid-fieldset-style-update-1.html
fast/selectors/invalid-fieldset-style-update-2.html
fast/selectors/invalid-fieldset-style-update-3.html
fast/selectors/invalid-fieldset-style-update-4.html
fast/selectors/invalid-fieldset-style-update-5.html
fast/selectors/valid-fieldset-style-update-1.html
fast/selectors/valid-fieldset-style-update-2.html
fast/selectors/valid-fieldset-style-update-3.html
fast/selectors/valid-fieldset-style-update-4.html
fast/selectors/valid-fieldset-style-update-5.html
* css/SelectorCheckerTestFunctions.h:
(WebCore::isInRange):
(WebCore::isOutOfRange):
(WebCore::isInvalid):
(WebCore::isValid):
The hack "ContainsValidityStyleRules" is in the way of correct styling
of FieldSet and Form.
It is not the right way to get stylesheet properties anyway.
* css/StyleResolver.cpp:
(WebCore::StyleResolver::canShareStyleWithControl):
Make sure style sharing does not incorrectly share style for fieldset elements.
* dom/Document.cpp:
(WebCore::Document::Document):
* dom/Document.h:
(WebCore::Document::containsValidityStyleRules): Deleted.
(WebCore::Document::setContainsValidityStyleRules): Deleted.
* dom/Element.h:
(WebCore::Element::matchesValidPseudoClass):
(WebCore::Element::matchesInvalidPseudoClass):
(WebCore::Element::willValidate): Deleted.
(WebCore::Element::isValidFormControlElement): Deleted.
* html/FormAssociatedElement.cpp:
(WebCore::FormAssociatedElement::customError):
* html/FormAssociatedElement.h:
* html/HTMLFieldSetElement.cpp:
(WebCore::HTMLFieldSetElement::matchesValidPseudoClass):
(WebCore::HTMLFieldSetElement::matchesInvalidPseudoClass):
(WebCore::HTMLFieldSetElement::addInvalidDescendant):
(WebCore::HTMLFieldSetElement::removeInvalidDescendant):
Each HTMLFormControlElement that has constraint validation adds or removes
itself from its HTMLFieldSetElement ancestors.
It should be possible to just keep track of a count instead of a HashSet.
I decided to got with the HashSet to make the code more robust and easier
to debug. A few assertions ensure that the HashSet is actually used as a counter.
* html/HTMLFieldSetElement.h:
* html/HTMLFormControlElement.cpp:
(WebCore::addInvalidElementToAncestorFromInsertionPoint):
(WebCore::removeInvalidElementToAncestorFromInsertionPoint):
(WebCore::HTMLFormControlElement::insertedInto):
(WebCore::HTMLFormControlElement::removedFrom):
One tricky part of those two functions is that we cannot use
matchesValidPseudoClass() or matchesInvalidPseudoClass().
The reason is that HTMLFieldSetElement is a subclass of HTMLFormControlElement
and it has its own definition of what Valid and Invalid mean when matching selectors.
In HTMLFormControlElement, we must use the internal state,
willValidate() and isValidFormControlElement() must be used directly.
(WebCore::HTMLFormControlElement::matchesValidPseudoClass):
(WebCore::HTMLFormControlElement::matchesInvalidPseudoClass):
(WebCore::HTMLFormControlElement::willValidate):
(WebCore::addInvalidElementToAncestors):
(WebCore::removeInvalidElementFromAncestors):
(WebCore::HTMLFormControlElement::setNeedsWillValidateCheck):
(WebCore::HTMLFormControlElement::setNeedsValidityCheck):
(WebCore::HTMLFormControlElement::isValidFormControlElement): Deleted.
* html/HTMLFormControlElement.h:
(WebCore::HTMLFormControlElement::isValidFormControlElement):
* html/HTMLKeygenElement.h:
* html/HTMLObjectElement.h:
* html/HTMLOutputElement.h:
2014-11-16 Zan Dobersek <zdobersek@igalia.com>
[TexMap] Add typecasting support for GraphicsLayerTextureMapper
https://bugs.webkit.org/show_bug.cgi?id=138741
Reviewed by Martin Robinson.
Add type traits for the GraphicsLayerTextureMapper class.
This enables using typecasting functions instead of
toGraphicsLayerTextureMapper().
Remove toTextureMapperLayer() casting function which actually
returned the TextureMapperLayer object that belonged to the
passed-in GraphicsLayerTextureMapper. Instead, the GraphicsLayer
object is now downcasted and the TextureMapperLayer is accessed
by calling the GraphicsLayerTextureMapper::layer() method.
* platform/graphics/GraphicsLayer.h:
(WebCore::GraphicsLayer::isGraphicsLayerTextureMapper):
* platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
(WebCore::toTextureMapperLayerVector):
(WebCore::GraphicsLayerTextureMapper::commitLayerChanges):
(WebCore::toTextureMapperLayer): Deleted.
* platform/graphics/texmap/GraphicsLayerTextureMapper.h:
(WebCore::toGraphicsLayerTextureMapper): Deleted.
2014-11-16 Gyuyoung Kim <gyuyoung.kim@samsung.com>
Move WebCore/loader to std::unique_ptr
https://bugs.webkit.org/show_bug.cgi?id=138646
Reviewed by Chris Dumez.
Replace OwnPtr with std::unique_ptr<> and std::make_unique<>.
However this patch leaves ResourceRequest::adopt() because this need
to be handled by different patch.
No new tests, no behavior changes.
* loader/DocumentThreadableLoader.cpp:
(WebCore::DocumentThreadableLoader::makeCrossOriginAccessRequest):
(WebCore::DocumentThreadableLoader::preflightSuccess):
* loader/DocumentThreadableLoader.h:
* loader/SubresourceLoader.cpp:
(WebCore::SubresourceLoader::SubresourceLoader):
(WebCore::SubresourceLoader::didReceiveResponse):
(WebCore::SubresourceLoader::notifyDone):
* loader/SubresourceLoader.h:
* loader/TextTrackLoader.h:
* loader/appcache/ApplicationCacheHost.h:
* loader/appcache/ApplicationCacheStorage.cpp:
(WebCore::ApplicationCacheStorage::storeCopyOfCache):
* loader/archive/cf/LegacyWebArchive.cpp:
(WebCore::LegacyWebArchive::create):
* loader/cache/CachedResourceLoader.cpp:
(WebCore::CachedResourceLoader::requestPreload):
(WebCore::CachedResourceLoader::clearPreloads):
(WebCore::CachedResourceLoader::printPreloadStats):
* loader/cache/CachedResourceLoader.h:
* loader/icon/IconDatabase.cpp:
(WebCore::IconDatabase::deleteAllPreparedStatements):
(WebCore::readySQLiteStatement):
* loader/icon/IconDatabase.h:
* loader/icon/IconRecord.h:
2014-11-16 Chris Dumez <cdumez@apple.com>
Crash when setting 'order' CSS property to a calculated value
https://bugs.webkit.org/show_bug.cgi?id=138780
Reviewed by Darin Adler.
CSS Calculated values were not handled by the CSS parser for 'order'
CSS property. As a result, using calculated values wouldn't work in
release builds and would hit an assertion in debug builds.
This patch updates the CSS parser to directly convert the
CSS Calculated value into a simple integer CSSPrimitiveValue for
'order' property. We could have marked CSS Calculated values as
valid in the CSS Parser instead but this would have brought issues:
- The calculated value needs to be adjusted to INT_MIN + 2 if it is less
than that. This would force us to calculate the expression anyway.
- The StyleBuilder would need updating to properly handle CSS Calculated
values for 'order'.
Test: fast/css/order-calculated-value.html
* css/CSSParser.cpp:
(WebCore::CSSParser::parseValue):
2014-11-16 Chris Dumez <cdumez@apple.com>
Assertion hit when setting a very large value to 'border-width' / 'font-size' CSS properties
https://bugs.webkit.org/show_bug.cgi?id=138770
Reviewed by Darin Adler.
When setting a very large value to a CSS property, it is represented internally as
infinity. r166114 already tried to deal with this by adding an std::isinf() check
in CSSValuePool::createValue() and returning an identifier CSSPrimitiveValue with
CSSValueInvalid value in such case. The issue is that doing leads to the
StyleBuilder getting a CSSValueInvalid CSSPrimitive value as input, which is not
handled and leads to assertions.
This patch updates the CSSParser to detect cases where the double value is
infinity earlier (in CSSParser::validUnit() and parseSimpleLengthValue()), so
that we mark the value as invalid and actually drop it. As a result,
CSSPrimitiveValues with CSSValueInvalid value no longer make their way to the
StyleBuilder.
Test: fast/css/style-builder-infinite-value.html
fast/css/infinite-floating-value.html
* css/CSSParser.cpp:
(WebCore::parseSimpleLengthValue):
(WebCore::CSSParser::validUnit):
* css/CSSValuePool.cpp:
(WebCore::CSSValuePool::createValue):
2014-11-16 Shivakumar JM <shiva.jm@samsung.com>
Attribute text in HTMLAnchorElement should behave as per specification.
https://bugs.webkit.org/show_bug.cgi?id=138557
Reviewed by Darin Adler.
attribute text in HTMLAnchorElement should not be readonly as per specification
http://www.w3.org/TR/html/text-level-semantics.html#dom-a-text. It should behave as textContent attribute.
Also This matches the behavior of Chrome 38 and FireFox.
Test: fast/dom/HTMLAnchorElement/anchor-text-attribute.html
* html/HTMLAnchorElement.cpp:
(WebCore::HTMLAnchorElement::text):
(WebCore::HTMLAnchorElement::setText):
* html/HTMLAnchorElement.h:
* html/HTMLAnchorElement.idl:
2014-11-16 Chris Dumez <cdumez@apple.com>
Move 'vertical-align' CSS property to the new StyleBuilder
https://bugs.webkit.org/show_bug.cgi?id=138764
Reviewed by Darin Adler.
Move 'vertical-align' CSS property from DeprecatedStyleBuilder to the
new StyleBuilder by using custom code.
No new tests, no behavior change.
* css/CSSPropertyNames.in:
* css/DeprecatedStyleBuilder.cpp:
(WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
(WebCore::ApplyPropertyVerticalAlign::applyValue): Deleted.
(WebCore::ApplyPropertyVerticalAlign::createHandler): Deleted.
* css/StyleBuilderCustom.h:
(WebCore::StyleBuilderFunctions::applyValueVerticalAlign):
2014-11-16 Tim Horton <timothy_horton@apple.com>
Use TextIndicator instead of the built in Lookup highlight
https://bugs.webkit.org/show_bug.cgi?id=138775
<rdar://problem/18953982>
Follow-up to r176164.
* platform/spi/mac/LookupSPI.h:
(WebCore::canDisableLookupIndicator): Deleted.
Remove canDisableLookupIndicator.
2014-11-16 Chris Dumez <cdumez@apple.com>
Crash when setting '-webkit-line-clamp' CSS property to a calculated value
https://bugs.webkit.org/show_bug.cgi?id=138777
Reviewed by Benjamin Poulain.
CSS Calculated values were not handled when converting a CSSPrimitiveValue
to a LineClampValue. As a result, we would hit an ASSERT_NOT_REACHED()
assertion. To address this issue, this patch updates the code to use
primitiveType() / getValue<>() instead of m_primitiveUnitType /
m_value.num, as those getter function properly handle CSS Calculated
values.
Test: fast/css/webkit-line-clamp-calculated-value.html
* css/CSSPrimitiveValueMappings.h:
(WebCore::CSSPrimitiveValue::operator LineClampValue):
2014-11-16 Tim Horton <timothy_horton@apple.com>
Use TextIndicator instead of the built in Lookup highlight
https://bugs.webkit.org/show_bug.cgi?id=138775
<rdar://problem/18953982>
Reviewed by Anders Carlsson.
* WebCore.exp.in:
* platform/mac/WebCoreSystemInterface.h:
* platform/mac/WebCoreSystemInterface.mm:
Remove a WKSI import/export that we don't need anymore.
* platform/spi/mac/LookupSPI.h: Added.
(WebCore::canDisableLookupIndicator):
Add Lookup SPI header.
Add a 'canDisableLookupIndicator', which must be called in any translation
unit that wants to use either of the soft-linked constants related to
that functionality, before calling the get* function.
* WebCore.xcodeproj/project.pbxproj:
* editing/mac/DictionaryLookup.mm:
(WebCore::rangeForDictionaryLookupForSelection):
(WebCore::rangeForDictionaryLookupAtHitTestResult):
Adopt the Lookup SPI header.
2014-11-16 Joanmarie Diggs <jdiggs@igalia.com>
AX: [ATK] REGRESSION(r166288): Accessible values are no longer accessible via AT-SPI2
https://bugs.webkit.org/show_bug.cgi?id=138776
Reviewed by Chris Fleizach.
r166288 used #if...#else instead of #if...#endif, thus disabling the old
AtkValue support. Unfortunately AT-SPI2 doesn't yet have support for the
new AtkValue API. Thus r166288 broke access to value-holding elements for
AT-SPI2 assistive technologies. Replacing #else with #endif fixes things.
No new tests because catching this regression would require AT-SPI2.
* accessibility/atk/WebKitAccessibleInterfaceValue.cpp:
(webkitAccessibleValueGetMinimumIncrement):
(webkitAccessibleValueInterfaceInit):
2014-11-16 Joanmarie Diggs <jdiggs@igalia.com>
AX: [ATK] Expose the blockquote element using ATK_ROLE_BLOCK_QUOTE
https://bugs.webkit.org/show_bug.cgi?id=138771
Reviewed by Chris Fleizach.
Add BlockquoteRole and assigns it to blockquote elements. Make
corresponding changes to platform role mappings: ATK_ROLE_BLOCK_QUOTE
for GTK and EFL; AXGroup (which was being used already) for the Mac.
No new tests are required. Instead, updated the existing expectations
to reflect the new mapping.
* accessibility/AccessibilityNodeObject.cpp:
(WebCore::AccessibilityNodeObject::determineAccessibilityRole):
* accessibility/AccessibilityObject.cpp:
(WebCore::AccessibilityObject::isBlockquote):
* accessibility/AccessibilityObject.h:
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::determineAccessibilityRole):
* accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
(atkRole):
* accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(createAccessibilityRoleMap):
2014-11-16 Chris Dumez <cdumez@apple.com>
Crash when setting 'alt' CSS property to inherit or initial
https://bugs.webkit.org/show_bug.cgi?id=138774
<rdar://problem/18995409>
Reviewed by Chris Fleizach.
The StyleResolver was not handling 'inherit' or 'initial' values for
'alt' CSS property. As a result, the code was assuming the CSSValue
was a CSSPrimitiveValue (although it could be a CSSInitialValue or
a CSSInheritValue). In such case, the code would dereference a null
pointer because primitiveValue is initialized using:
CSSPrimitiveValue* primitiveValue = is<CSSPrimitiveValue>(*value)
? downcast<CSSPrimitiveValue>(value)
: nullptr;
Test: fast/css/alt-inherit-initial.html
* css/StyleResolver.cpp:
(WebCore::StyleResolver::applyProperty):
2014-11-15 Joanmarie Diggs <jdiggs@igalia.com>
AX: [ATK] Lists with selectable children should have ATK_ROLE_LIST_BOX
https://bugs.webkit.org/show_bug.cgi?id=127060
Reviewed by Chris Fleizach.
Corrected the mapping from ATK_ROLE_LIST to ATK_ROLE_LIST_BOX.
No new tests. Instead, updated the expectations of roles-exposed.html to
reflect the corrected mapping.
* accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
(atkRole):
2014-11-15 Joanmarie Diggs <jdiggs@igalia.com>
AX: [ATK] Video and audio elements should be exposed using ATK's video and audio roles.
https://bugs.webkit.org/show_bug.cgi?id=138767
Reviewed by Chris Fleizach.
Map AudioRole and VideoRole to ATK_ROLE_AUDIO and ATK_ROLE_VIDEO
respectively, falling back on the existing mapping to ATK_ROLE_EMBEDDED
in environments which have an older version of ATK.
No new tests are required. Instead, existing expectations were updated
to reflect the new mapping.
* accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
(atkRole):
2014-11-15 Joanmarie Diggs <jdiggs@igalia.com>
AX: [ATK] Expose the footer element as ATK_ROLE_FOOTER
https://bugs.webkit.org/show_bug.cgi?id=138773
Reviewed by Chris Fleizach.
Map FooterRole to ATK_ROLE_FOOTER.
No new tests. Unskipped a test that verifies this mapping.
* accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
(atkRole):
2014-11-14 Dean Jackson <dino@apple.com>
Rename WebKitCSSKeyframe(s)Rule into CSSKeyframe(s)Rule
https://bugs.webkit.org/show_bug.cgi?id=138763
<rdar://problem/18991569>
Reviewed by Simon Fraser.
Globally rename WebKitCSSKeyframeRule and WebKitCSSKeyframesRule to
CSSKeyframeRule and CSSKeyframesRule respectively.
This *may* break some existing content, but is compatible with
what Blink and Firefox are doing. To minimize breakage, I kept an
alias for the old constant values on CSSRule: WEBKIT_KEYFRAMES_RULE
and WEBKIT_KEYFRAME_RULE.
Covered by existing tests.
* CMakeLists.txt:
* DerivedSources.cpp:
* DerivedSources.make:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/JSCSSRuleCustom.cpp:
(WebCore::toJS):
* bindings/objc/DOMCSS.mm:
(kitClass):
* css/CSSGrammar.y.includes:
* css/CSSKeyframeRule.cpp: Renamed from Source/WebCore/css/WebKitCSSKeyframeRule.cpp.
(WebCore::StyleKeyframe::StyleKeyframe):
(WebCore::StyleKeyframe::~StyleKeyframe):
(WebCore::StyleKeyframe::mutableProperties):
(WebCore::StyleKeyframe::parseKeyString):
(WebCore::StyleKeyframe::cssText):
(WebCore::CSSKeyframeRule::CSSKeyframeRule):
(WebCore::CSSKeyframeRule::~CSSKeyframeRule):
(WebCore::CSSKeyframeRule::style):
(WebCore::CSSKeyframeRule::reattach):
* css/CSSKeyframeRule.h: Renamed from Source/WebCore/css/WebKitCSSKeyframeRule.h.
(WebCore::StyleKeyframe::create):
(WebCore::StyleKeyframe::keyText):
(WebCore::StyleKeyframe::setKeyText):
(WebCore::StyleKeyframe::getKeys):
(WebCore::StyleKeyframe::properties):
* css/CSSKeyframeRule.idl: Renamed from Source/WebCore/css/WebKitCSSKeyframeRule.idl.
* css/CSSKeyframesRule.cpp: Renamed from Source/WebCore/css/WebKitCSSKeyframesRule.cpp.
(WebCore::StyleRuleKeyframes::StyleRuleKeyframes):
(WebCore::StyleRuleKeyframes::~StyleRuleKeyframes):
(WebCore::StyleRuleKeyframes::parserAppendKeyframe):
(WebCore::StyleRuleKeyframes::wrapperAppendKeyframe):
(WebCore::StyleRuleKeyframes::wrapperRemoveKeyframe):
(WebCore::StyleRuleKeyframes::findKeyframeIndex):
(WebCore::CSSKeyframesRule::CSSKeyframesRule):
(WebCore::CSSKeyframesRule::~CSSKeyframesRule):
(WebCore::CSSKeyframesRule::setName):
(WebCore::CSSKeyframesRule::appendRule):
(WebCore::CSSKeyframesRule::insertRule):
(WebCore::CSSKeyframesRule::deleteRule):
(WebCore::CSSKeyframesRule::findRule):
(WebCore::CSSKeyframesRule::cssText):
(WebCore::CSSKeyframesRule::length):
(WebCore::CSSKeyframesRule::item):
(WebCore::CSSKeyframesRule::cssRules):
(WebCore::CSSKeyframesRule::reattach):
* css/CSSKeyframesRule.h: Renamed from Source/WebCore/css/WebKitCSSKeyframesRule.h.
(WebCore::StyleRuleKeyframes::create):
(WebCore::StyleRuleKeyframes::keyframes):
(WebCore::StyleRuleKeyframes::name):
(WebCore::StyleRuleKeyframes::setName):
(WebCore::StyleRuleKeyframes::copy):
* css/CSSKeyframesRule.idl: Renamed from Source/WebCore/css/WebKitCSSKeyframesRule.idl.
* css/CSSParser.cpp:
* css/CSSRule.h:
* css/CSSRule.idl:
* css/CSSStyleSheet.cpp:
* css/RuleSet.cpp:
* css/StyleResolver.cpp:
* css/StyleRule.cpp:
(WebCore::StyleRuleBase::createCSSOMWrapper):
* inspector/InspectorStyleSheet.cpp:
(WebCore::asCSSRuleList):
2014-11-15 David Kilzer <ddkilzer@apple.com>
REGRESSION (r176137): iOS build broke after moving DataDetectors scanning code to WebCore
This regressed with the following commit:
Move DataDetectors scanning code to WebCore
https://bugs.webkit.org/show_bug.cgi?id=138731
<rdar://problem/18877535>
This fixes the following build failures:
In file included from WebCore/editing/mac/DataDetection.mm:29:
WebCore/platform/spi/mac/DataDetectorsSPI.h:66:11: error: unknown type name 'NSRect'
@property NSRect highlightFrame;
^
WebCore/editing/mac/DataDetection.mm:42:28: error: use of undeclared identifier 'DataDetection'
RetainPtr<DDActionContext> DataDetection::detectItemAroundHitTestResult(const HitTestResult& hitTestResult, FloatRect& detectedDataBoundingBox, RefPtr<Range>& detectedDataRange)
^
2 errors generated.
* WebCore.exp.in:
(DataDetection::detectItemAroundHitTestResult): Move symbol from
shared section to Mac-only section.
* editing/mac/DataDetection.mm: Add PLATFORM(MAC) check around
the entire implementation since it it unused on iOS.
* platform/spi/mac/DataDetectorsSPI.h: Expand PLATFORM(MAC)
check around DDActionContext class declarations.
2014-11-14 Benjamin Poulain <benjamin@webkit.org>
Compute the selector specificity as we match simple selectors
https://bugs.webkit.org/show_bug.cgi?id=138718
Reviewed by Andreas Kling.
This is an other tiny step toward dynamic specificity. Instead of computing
the entire specificity at the end, compute it dynamically as we are matching
each individual simple selector.
* css/CSSSelector.cpp:
(WebCore::CSSSelector::specificity):
(WebCore::CSSSelector::simpleSelectorSpecificity):
(WebCore::CSSSelector::addSpecificities):
(WebCore::CSSSelector::specificityForPage):
(WebCore::CSSSelector::specificityForOneSelector): Deleted.
* css/CSSSelector.h:
* css/SelectorChecker.cpp:
(WebCore::SelectorChecker::match):
(WebCore::SelectorChecker::matchRecursively):
(WebCore::SelectorChecker::checkOne):
(WebCore::SelectorChecker::matchSelectorList):
* css/SelectorChecker.h:
2014-11-14 Andreas Kling <akling@apple.com>
[mac] Only images that are actually purgeable should be advertised as such.
<https://webkit.org/b/138759>
<rdar://problem/13205438>
Reviewed by Tim Horton.
Instead of saying that all images on >=Yosemite are purgeable, have BitmapImage
forward the question to CGImage for the correct answer.
The memory may be marked non-volatile by frameworks underneath WebKit at any
given time, but that's not something we need to worry about.
* platform/graphics/BitmapImage.cpp:
(WebCore::BitmapImage::decodedDataIsPurgeable):
* platform/graphics/BitmapImage.h:
* platform/graphics/cg/BitmapImageCG.cpp:
(WebCore::BitmapImage::decodedDataIsPurgeable):
* platform/graphics/cg/ImageSourceCG.cpp:
(WebCore::ImageSource::createFrameAtIndex):
* platform/spi/cg/CoreGraphicsSPI.h:
2014-11-14 Zalan Bujtas <zalan@apple.com>
Remove computeTextPaintStyle's RenderText dependency.
https://bugs.webkit.org/show_bug.cgi?id=138754
Reviewed by Simon Fraser.
So that we can compute text paint style across renderers in simple line layout.
No change in functionality.
* rendering/InlineTextBox.cpp:
(WebCore::InlineTextBox::paint):
* rendering/SimpleLineLayoutFunctions.cpp:
(WebCore::SimpleLineLayout::paintFlow):
* rendering/TextPaintStyle.cpp:
(WebCore::computeTextPaintStyle):
* rendering/TextPaintStyle.h:
2014-11-14 Myles C. Maxfield <mmaxfield@apple.com>
Get rid of WebFontCache
https://bugs.webkit.org/show_bug.cgi?id=134752
Reviewed by Dave Hyatt.
No new tests because there is no behavior change.
* Configurations/WebCore.xcconfig:
* PlatformMac.cmake:
* WebCore.exp.in:
* WebCore.order:
* WebCore.xcodeproj/project.pbxproj:
* platform/graphics/mac/FontCacheMac.mm:
(WebCore::acceptableChoice):
(WebCore::betterChoice):
(WebCore::toTraitsMask):
(WebCore::desiredFamilyToAvailableFamilyDictionary):
(WebCore::rememberDesiredFamilyToAvailableFamilyMapping):
(WebCore::fontWithFamily):
(WebCore::invalidateFontCache):
(WebCore::FontCache::getTraitsInFamily):
(WebCore::FontCache::createFontPlatformData):
* platform/mac/WebFontCache.h: Removed.
* platform/mac/WebFontCache.mm: Removed.
2014-11-14 Daniel Bates <dabates@apple.com>
[iOS] NSFileManager and QuickLook SPI not available in public SDK
https://bugs.webkit.org/show_bug.cgi?id=138742
Reviewed by Pratik Solanki.
Add a SPI wrapper headers {NSFileManager, QuickLook}SPI.h that forward declares
NSFileManager and QuickLook SPI, respectively, and use these header instead of
including private headers of Foundation and QuickLook directly.
* WebCore.xcodeproj/project.pbxproj: Add project and private header QuickLookSPI.h
and NSFileManagerSPI.h, respectively.
* platform/network/ios/QuickLook.mm: Include headers QuickLookSPI.h and NSFileManagerSPI.h
instead of including headers of QuickLook and Foundation directly.
* platform/spi/cocoa/NSFileManagerSPI.h: Added.
* platform/spi/ios/QuickLookSPI.h: Added.
2014-11-14 Daniel Bates <dabates@apple.com>
[iOS] CoreGraphics SPI not available in public SDK
https://bugs.webkit.org/show_bug.cgi?id=138709
Reviewed by David Kilzer.
Add a SPI wrapper header called CoreGraphicsSPI.h that forward declares
CoreGraphics SPI and use this header instead of including private headers
of CoreGraphics directly.
* WebCore.xcodeproj/project.pbxproj: Add WebCore private header CoreGraphicsSPI.h. Also remove header
CGFontUnicodeSupportSPI.h as its functionality has been incorporated into header CoreGraphicsSPI.h.
* WebCore.vcxproj/WebCore.vcxproj: Add WebCore private header CoreGraphicsSPI.h.
* WebCore.vcxproj/WebCore.vcxproj.filters: Add directories platform/spi and platform/spi/cg.
* WebCore.vcxproj/WebCoreCG.props: Add include directory platform/spi/cg.
* WebCore.vcxproj/copyForwardingHeaders.cmd: Copy WebCore headers from directory platform/spi/cg. This
is necessary because WebCore/platform/graphics/SimpleFontData.h includes CoreGraphicsSPI.h. And
WebCore/platform/graphics/SimpleFontData.h is compiled for the Apple Windows port.
* platform/graphics/SimpleFontData.h: Move CGFontRenderingStyle declaration and associated enum
from this file to file CoreGraphicsSPI.h and include header CoreGraphicsSPI.h.
* platform/graphics/cg/BitmapImageCG.cpp: Remove unnecessary #include of header CGContextPrivate.h.
* platform/graphics/cg/ColorCG.cpp: Include header CoreGraphicsSPI.h instead of including headers
of CoreGraphics directly.
* platform/graphics/cg/GraphicsContextCG.cpp: Move forward declarations of CoreGraphics functions
from this file to file CoreGraphicsSPI.h and include header CoreGraphicsSPI.h. Also sort the list
of #include directives.
* platform/graphics/cg/ImageSourceCG.cpp: Include header CoreGraphicsSPI.h instead of including
headers of CoreGraphics directly.
* platform/graphics/cg/PDFDocumentImage.cpp: Ditto.
* platform/graphics/cocoa/FontPlatformDataCocoa.mm: Ditto.
* platform/graphics/ios/FontCacheIOS.mm: Include header CoreGraphicsSPI.h instead of including
header <CoreGraphics/CGFontUnicodeSupport.h> directly.
* platform/graphics/ios/FontServicesIOS.mm: Include header CoreGraphicsSPI.h instead of including
headers of CoreGraphics directly.
* platform/graphics/ios/SimpleFontDataIOS.mm: Ditto.
* platform/graphics/mac/FontMac.mm: Move forward declarations of CoreGraphics functions from this
file to file CoreGraphicsSPI.h and include header CoreGraphicsSPI.h.
* platform/graphics/mac/GlyphPageTreeNodeMac.cpp: Substitute header CoreGraphicsSPI.h for CGFontUnicodeSupportSPI.h
and remove #include of headers CGFontUnicodeSupport.h (it will be included by CoreGraphicsSPI.h).
* platform/graphics/mac/SimpleFontDataMac.mm: Move forward declarations of CoreGraphics functions
from this file to file CoreGraphicsSPI.h and include header CoreGraphicsSPI.h.
* platform/ios/LegacyTileGrid.mm: Include header CoreGraphicsSPI.h instead of including headers of
CoreGraphics directly.
* platform/ios/wak/WKGraphics.h: Remove #include of header CoreGraphicsPrivate.h and forward declare
CGFontAntialiasingStyle Additionally, declare WKCompositeOperation as an alias of int and use this
data type instead of CGCompositeOperation (SPI). This approach lets us keep the definition of
CGCompositeOperation in file CoreGraphicsSPI.h, where all the other definitions/forward declarations
of CoreGraphics data types reside, as opposed to defining it in this file.
* platform/ios/wak/WKGraphics.mm:
(WKRectFillUsingOperation): Cast data type WKCompositeOperation to CGCompositeOperation and added
compile-time assert to ensure that the size of WKCompositeOperation is identical to the size of CGCompositeOperation.
* platform/graphics/cg/ImageSourceCG.cpp: Move CGImageCachingFlags declaration, associated enum, and
forward declaration of CGImageSetCachingFlags() from this file to file CoreGraphicsSPI.h and include
header CoreGraphicsSPI.h.
(WebCore::ImageSource::createFrameAtIndex): Fix incorrect comment.
* platform/spi/cocoa/CGFontUnicodeSupportSPI.h: Removed; moved its functionality into header CoreGraphicsSPI.h.
* platform/spi/cg/CoreGraphicsSPI.h: Added.
(CGFloatMin):
* rendering/RenderThemeIOS.mm: Substitute header CoreGraphics.h for CGPathPrivate.h as we no longer
make use of any functionality from CGPathPrivate.h in this file. The functionality we used from
CGPathPrivate.h, including CGPathAddRoundedRect(), has been moved to the public API header, CGPath.h,
which is included from header CoreGraphics.h.
2014-11-14 Dean Jackson <dino@apple.com>
[Media] Timeline scrubber not updating as the video plays
https://bugs.webkit.org/show_bug.cgi?id=138717
<rdar://problem/18957509>
Reviewed by Jer Noble.
There is some confusing logic that determines
whether or not the controls are hidden, and a
slight error caused timelines to not advance unless
they were explicitly showing.
The fix was to be a bit more liberal in deciding
when the controls are showing, but still cautious
enough to stop up causing repaints when things
are hidden.
Test: media/media-controls-timeline-updates.html
* Modules/mediacontrols/mediaControlsApple.js:
(Controller.prototype.controlsAreHidden): We only need
to check if we're an audio element or explicitly
hidden.
(Controller.prototype.showControls): Explicitly call
updateTime.
2014-11-14 Tim Horton <timothy_horton@apple.com>
Move DataDetectors scanning code to WebCore
https://bugs.webkit.org/show_bug.cgi?id=138731
<rdar://problem/18877535>
Reviewed by Anders Carlsson.
* WebCore.exp.in:
Export our new function.
* WebCore.xcodeproj/project.pbxproj:
Add DataDetection.{mm, h}
Adjust the project so that editing/mac actually points to editing/mac instead of editing/
* editing/mac/DictionaryLookup.h:
* editing/mac/DictionaryLookup.mm:
Swap to PLATFORM(MAC) instead of !PLATFORM(IOS).
Move DictionaryLookup.{mm, h} to editing/mac, where they were in the project but not on disk.
* editing/mac/DataDetection.h: Added.
* editing/mac/DataDetection.mm: Added.
(WebCore::DataDetection::detectItemAroundHitTestResult):
Moved from WebKit2.
2014-11-14 Dan Bernstein <mitz@apple.com>
<rdar://problem/18978497> Wrong (off-by-1) navigation snapshots shown after a mix of gesture and button back/forward navigation
https://bugs.webkit.org/show_bug.cgi?id=138753
Reviewed by Tim Horton.
Removed a FrameLoaderClient function that no one overrides anymore.
* loader/FrameLoaderClient.h:
(WebCore::FrameLoaderClient::willChangeCurrentHistoryItem): Deleted.
* loader/HistoryController.cpp:
(WebCore::HistoryController::setCurrentItem): Removed call to willChangeCurrentHistoryItem.
(WebCore::HistoryController::replaceCurrentItem): Ditto.
2014-11-14 Jeremy Jones <jeremyj@apple.com>
Do proper teardown for optimized fullscreen
https://bugs.webkit.org/show_bug.cgi?id=138648
Reviewed by Eric Carlson.
* platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
(WebVideoFullscreenInterfaceAVKit::invalidate): must do corresponding teardown based on mode.
2014-11-11 David Hyatt <hyatt@apple.com>
Table rows repaint entire table when their background color changes.
https://bugs.webkit.org/show_bug.cgi?id=26662
Reviewed by Simon Fraser.
Added fast/repaint/table-row-repaint.html
* rendering/RenderTableCell.h:
* rendering/RenderTableRow.cpp:
(WebCore::RenderTableRow::clippedOverflowRectForRepaint):
Improve table row's function to unite with the cell rects that can possibly
have the the row's background color painted behind them.
2014-11-14 Zalan Bujtas <zalan@apple.com>
Simple line layout: Move simple line layout RunResolver and LineResolver implementation to SimpleLineLayoutResolver.cpp
https://bugs.webkit.org/show_bug.cgi?id=138704
Reviewed by Antti Koivisto.
No change in functionality.
* CMakeLists.txt:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* rendering/SimpleLineLayoutResolver.cpp: Added.
(WebCore::SimpleLineLayout::RunResolver::Run::Run):
(WebCore::SimpleLineLayout::RunResolver::Run::rect):
(WebCore::SimpleLineLayout::RunResolver::Run::baseline):
(WebCore::SimpleLineLayout::RunResolver::Run::text):
(WebCore::SimpleLineLayout::RunResolver::Iterator::Iterator):
(WebCore::SimpleLineLayout::RunResolver::Iterator::advance):
(WebCore::SimpleLineLayout::RunResolver::Iterator::advanceLines):
(WebCore::SimpleLineLayout::RunResolver::RunResolver):
(WebCore::SimpleLineLayout::RunResolver::lineIndexForHeight):
(WebCore::SimpleLineLayout::RunResolver::rangeForRect):
(WebCore::SimpleLineLayout::LineResolver::Iterator::Iterator):
(WebCore::SimpleLineLayout::LineResolver::Iterator::operator*):
(WebCore::SimpleLineLayout::LineResolver::LineResolver):
* rendering/SimpleLineLayoutResolver.h:
(WebCore::SimpleLineLayout::RunResolver::Run::Run): Deleted.
(WebCore::SimpleLineLayout::RunResolver::Run::rect): Deleted.
(WebCore::SimpleLineLayout::RunResolver::Run::baseline): Deleted.
(WebCore::SimpleLineLayout::RunResolver::Run::text): Deleted.
(WebCore::SimpleLineLayout::RunResolver::Iterator::Iterator): Deleted.
(WebCore::SimpleLineLayout::RunResolver::Iterator::advance): Deleted.
(WebCore::SimpleLineLayout::RunResolver::Iterator::advanceLines): Deleted.
(WebCore::SimpleLineLayout::RunResolver::RunResolver): Deleted.
(WebCore::SimpleLineLayout::RunResolver::lineIndexForHeight): Deleted.
(WebCore::SimpleLineLayout::RunResolver::rangeForRect): Deleted.
(WebCore::SimpleLineLayout::LineResolver::Iterator::Iterator): Deleted.
(WebCore::SimpleLineLayout::LineResolver::Iterator::operator*): Deleted.
(WebCore::SimpleLineLayout::LineResolver::LineResolver): Deleted.
2014-11-14 Andrzej Badowski <a.badowski@samsung.com>
AX: Improve AccessibilityTableCell isColumnHeaderCell function.
https://bugs.webkit.org/show_bug.cgi?id=138423
Reviewed by Chris Fleizach.
<th> cell in the zero row should be column header.
New tests are not necessary.
* accessibility/AccessibilityTableCell.cpp:
(WebCore::AccessibilityTableCell::isColumnHeaderCell):
2014-11-14 Carlos Garcia Campos <cgarcia@igalia.com>
[SOUP] Use GMainLoopSource for request timeout in ResourceHandle
https://bugs.webkit.org/show_bug.cgi?id=138695
Reviewed by Sergio Villar Senin.
We are currently using soup_timeout_add() that simply creates a
GSource and attaches it to the given context. Using
GMainLoopSource we simplify the code and fix any potential problem
of converting the double value into milliseconds.
* platform/network/ResourceHandleInternal.h:
* platform/network/soup/ResourceHandleSoup.cpp:
(WebCore::cleanupSoupRequestOperation):
(WebCore::ResourceHandle::sendPendingRequest):
(WebCore::ResourceHandle::platformSetDefersLoading):
(WebCore::requestTimeoutCallback): Deleted.
2014-11-13 Tim Horton <timothy_horton@apple.com>
[mac] Keep around more decoded image data, since it's purgeable
https://bugs.webkit.org/show_bug.cgi?id=125273
<rdar://problem/13205438>
Reviewed by Simon Fraser.
No new tests, just an optimization.
Instead of throwing away decoded image data eagerly, allow the operating
system to manage the memory via the standard purgeability mechanism,
where it can.
This improves the performance on some pathological cases (extremely large
animated GIFs) by up to 8x.
* loader/cache/MemoryCache.cpp:
(WebCore::MemoryCache::pruneLiveResourcesToSize):
Don't prune live resources' decoded data if it is purgeable.
* platform/graphics/BitmapImage.cpp:
(WebCore::BitmapImage::destroyDecodedDataIfNecessary):
Don't eagerly throw away decoded image data if it's purgeable.
* loader/cache/CachedImage.h:
* loader/cache/CachedResource.h:
(WebCore::CachedResource::decodedDataIsPurgeable):
* platform/graphics/BitmapImage.h:
* platform/graphics/Image.h:
(WebCore::Image::decodedDataIsPurgeable):
2014-11-13 Myles C. Maxfield <litherum@gmail.com>
Addressing post-review comment
https://bugs.webkit.org/show_bug.cgi?id=138633
* platform/spi/cg/CoreGraphicsSPI.h:
2014-11-13 Myles C. Maxfield <mmaxfield@apple.com>
Move FontMac and FontCacheMac off of WKSI
https://bugs.webkit.org/show_bug.cgi?id=138633
Reviewed by Simon Fraser.
No new tests because there is no behavior change.
* WebCore.exp.in:
* WebCore.order:
* WebCore.vcxproj/WebCoreCG.props:
* WebCore.xcodeproj/project.pbxproj:
* platform/graphics/ios/FontCacheIOS.mm:
(WebCore::FontCache::platformInit):
* platform/graphics/mac/FontCacheMac.mm:
(WebCore::FontCache::platformInit):
(WebCore::FontCache::systemFallbackForCharacters):
* platform/graphics/mac/FontMac.mm:
(WebCore::isIntegral):
(WebCore::setCGFontRenderingMode):
(WebCore::Font::drawGlyphs):
* platform/graphics/mac/GlyphPageTreeNodeMac.cpp:
* platform/graphics/win/FontCacheWin.cpp:
(WebCore::FontCache::platformInit):
* platform/ios/WebCoreSystemInterfaceIOS.mm:
* platform/mac/WebCoreSystemInterface.h:
* platform/mac/WebCoreSystemInterface.mm:
* platform/spi/cocoa/CoreGraphicsSPI.h: Copied from Source/WebCore/platform/spi/cocoa/CGFontUnicodeSupportSPI.h.
* platform/spi/cocoa/CoreTextSPI.h:
* platform/spi/mac/NSFontSPI.h: Renamed from Source/WebCore/platform/spi/cocoa/CGFontUnicodeSupportSPI.h.
2014-11-13 Chris Dumez <cdumez@apple.com>
Move 'image-resolution' CSS property to the new StyleBuilder
https://bugs.webkit.org/show_bug.cgi?id=138715
Reviewed by Andreas Kling.
Move 'image-resolution' CSS property from DeprecatedStyleBuilder to
the new StyleBuilder by using custom code.
No new tests, no behavior change.
* css/CSSPropertyNames.in:
* css/DeprecatedStyleBuilder.cpp:
(WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
(WebCore::ApplyPropertyImageResolution::applyInheritValue): Deleted.
(WebCore::ApplyPropertyImageResolution::applyInitialValue): Deleted.
(WebCore::ApplyPropertyImageResolution::applyValue): Deleted.
(WebCore::ApplyPropertyImageResolution::createHandler): Deleted.
* css/StyleBuilderCustom.h:
(WebCore::StyleBuilderFunctions::applyInheritImageResolution):
(WebCore::StyleBuilderFunctions::applyInitialImageResolution):
(WebCore::StyleBuilderFunctions::applyValueImageResolution):
2014-11-13 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r176106.
https://bugs.webkit.org/show_bug.cgi?id=138719
needs build love (Requested by kling on #webkit).
Reverted changeset:
"[mac] Keep around more decoded image data, since it's
purgeable"
https://bugs.webkit.org/show_bug.cgi?id=125273
http://trac.webkit.org/changeset/176106
2014-11-13 Eric Carlson <eric.carlson@apple.com>
Context menus should not offer the "Download video" option for videos that cannot
be downloaded
https://bugs.webkit.org/show_bug.cgi?id=138530
-and corresponding-
rdar://problem/18919130
Reviewed by Tim Horton.
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::parseAttribute):
* html/HTMLMediaElement.h:
* page/ContextMenuController.cpp:
(WebCore::ContextMenuController::populate):
* platform/graphics/MediaPlayer.cpp:
(WebCore::MediaPlayer::canSaveMediaData):
(WebCore::MediaPlayer::supportsSave): Deleted.
* platform/graphics/MediaPlayer.h:
* platform/graphics/MediaPlayerPrivate.h:
(WebCore::MediaPlayerPrivateInterface::supportsFullscreen):
(WebCore::MediaPlayerPrivateInterface::canSaveMediaData):
(WebCore::MediaPlayerPrivateInterface::supportsSave): Deleted.
* platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
(WebCore::MediaPlayerPrivateAVFoundation::resolvedURL):
(WebCore::MediaPlayerPrivateAVFoundation::canSaveMediaData):
* platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::resolvedURL):
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::MediaPlayerPrivateGStreamer::canSaveMediaData):
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
* platform/graphics/mac/MediaPlayerPrivateQTKit.h:
* platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
(WebCore::MediaPlayerPrivateQTKit::canSaveMediaData):
* rendering/HitTestResult.cpp:
(WebCore::HitTestResult::isDownloadableMedia):
2014-11-02 Tim Horton <timothy_horton@apple.com>
[mac] Keep around more decoded image data, since it's purgeable
<https://webkit.org/b/125273>
<rdar://problem/13205438>
Reviewed by Simon Fraser and Andreas Kling.
No new tests, just an optimization.
Instead of throwing away decoded image data eagerly, allow the operating
system to manage the memory via the standard purgeability mechanism,
where it can.
This improves the performance on some pathological cases (extremely large
animated GIFs) by up to 8x.
* loader/cache/MemoryCache.cpp:
(WebCore::MemoryCache::pruneLiveResourcesToSize):
Don't prune live resources' decoded data if it is purgeable.
* platform/graphics/BitmapImage.cpp:
(WebCore::BitmapImage::destroyDecodedDataIfNecessary):
Don't eagerly throw away decoded image data if it's purgeable.
* loader/cache/CachedImage.h:
* loader/cache/CachedResource.h:
(WebCore::CachedResource::decodedDataIsPurgeable):
* platform/graphics/BitmapImage.h:
* platform/graphics/Image.h:
(WebCore::Image::decodedDataIsPurgeable):
2014-11-13 Daniel Bates <dabates@apple.com>
[iOS] NSGeometry data types are not available in the public SDK
https://bugs.webkit.org/show_bug.cgi?id=137536
Reviewed by David Kilzer.
Towards building iOS WebKit with the public iOS SDK, define NSGeometry
data types and functions in terms of CGGeometry data types and functions
because the former is SPI on iOS.
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm: Include
header WAKAppKitStubs.h when building for iOS. Otherwise, include header NSGeometry.h.
* platform/graphics/ca/mac/PlatformCALayerMac.mm: Remove import of private header NSGeometry.h.
We will use the NSGeometry data types defined in WAKAppKitStubs.h, which is implicitly imported
by header WAKWindow.h.
* platform/graphics/mac/MediaPlayerProxy.h: Substitute WAKAppKitStubs.h for NSGeometry.h.
* platform/ios/PlatformEventFactoryIOS.mm: Ditto. Also fix up style issues with #import directives.
* platform/ios/WebEvent.mm: Ditto.
* platform/ios/wak/WAKAppKitStubs.h: Define typedefs and macros that map NSGeometry data types
and functions to the analogous CGGeometry data types and functions. Also, remove #ifdef __OBJC__-
guard as the existing content in WAKAppKitStubs.h assumes that this file will only be included
in an Objective-C/Objective-C++ file.
* platform/ios/wak/WAKView.h: Import header WAKAppKitStubs.h instead of defining macros for some
NSGeometry data types.
2014-11-13 Simon Fraser <simon.fraser@apple.com>
[WK2] Fire a layout milestone on session restore based on render tree size
https://bugs.webkit.org/show_bug.cgi?id=138711
rdar://problem/16033854
Reviewed by Anders Carlsson.
New layout milestone for session restore based on render tree size. Only used
in WK2 at present.
* page/LayoutMilestones.h:
2014-11-13 Dan Bernstein <mitz@apple.com>
Policy client not called for navigations through the page cache
https://bugs.webkit.org/show_bug.cgi?id=138703
Reviewed by Alexey Proskuryakov.
Test added to TestWebKitAPI/Tests/WebKit2Cocoa/Navigation.mm.
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::loadDifferentDocumentItem): When using a cached page, which already
has a document loader, set the document loader’s triggering action (so that the policy
client sees that this is a back/forward navigation) and clear its last checked request (so
that the policy client gets called).
2014-11-13 Joanmarie Diggs <jdiggs@igalia.com>
AX: [ATK] Do not return ATK_ROLE_UNKNOWN for null or otherwise invalid accessible objects
https://bugs.webkit.org/show_bug.cgi?id=137867
Reviewed by Chris Fleizach.
Return ATK_ROLE_INVALID for null or otherwise invalid accessible objects.
Test: platform/gtk/accessibility/detached-object-role.html
* accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
(webkitAccessibleGetRole):
2014-11-13 Eric Carlson <eric.carlson@apple.com>
[iOS] update optimized fullscreen media controls artwork
https://bugs.webkit.org/show_bug.cgi?id=138705
Reviewed by Dean Jackson.
* Modules/mediacontrols/MediaControlsHost.cpp:
(WebCore::MediaControlsHost::mediaUIImageData): Remove one button.
* Modules/mediacontrols/MediaControlsHost.idl:
* Modules/mediacontrols/mediaControlsApple.js:
(Controller.prototype.controlsAreHidden): Add parentheses to fix the logic.
* Modules/mediacontrols/mediaControlsiOS.js:
(ControllerIOS.prototype.shouldHaveStartPlaybackButton): The big play button should not be
visible during playback.
(ControllerIOS.prototype.createControls): No longer necessary to insert style dynamically,
(ControllerIOS.prototype.setPlaying): Call the base class first so "isPlaying" is set before
calling updateControls, which calls shouldHaveStartPlaybackButton.
* platform/ios/WebCoreSystemInterfaceIOS.h: Update constants.
* rendering/RenderThemeIOS.mm:
(WebCore::RenderThemeIOS::mediaControlsStyleSheet): Add button style to the media controls sheet.
2014-11-13 Benjamin Poulain <bpoulain@apple.com>
Implement the matching for :nth-last-child(An+B of selector-list)
https://bugs.webkit.org/show_bug.cgi?id=138650
Reviewed by Andreas Kling.
Matching is trivial based on the existing CSS4 infrastructure.
The tricky part is style invalidation. In the cases of the old :nth-last-child()
and :nth-last-of-type(), we were using the flag ChildrenAffectedByBackwardPositionalRules.
The problem with ChildrenAffectedByBackwardPositionalRules is that it only invalidate
subtrees when nodes are being added or removed. It is a valuable optimization by itself
since tree updates are less common than property updates.
For the case of property updates, I have added the new flag "ChildrenAffectedByPropertyBasedBackwardPositionalRules".
It pretty much work the same way but invalidates subtree on style recalc.
Tests: fast/css/nth-child-and-nth-last-child.html
fast/css/nth-last-child-of-classname.html
fast/css/nth-last-child-of-complex-selector.html
fast/css/nth-last-child-of-compound-selector.html
fast/css/nth-last-child-of-style-sharing-1.html
fast/css/nth-last-child-of-style-sharing-2.html
fast/css/nth-last-child-of-style-update-optimization.html
fast/css/nth-last-child-of-tagname.html
fast/selectors/nth-last-child-of-class-style-update.html
* css/SelectorChecker.cpp:
(WebCore::SelectorChecker::checkOne):
* dom/Element.cpp:
(WebCore::Element::setChildrenAffectedByPropertyBasedBackwardPositionalRules):
(WebCore::Element::hasFlagsSetDuringStylingOfChildren):
(WebCore::Element::rareDataChildrenAffectedByPropertyBasedBackwardPositionalRules):
* dom/Element.h:
(WebCore::Element::childrenAffectedByPropertyBasedBackwardPositionalRules):
* dom/ElementRareData.h:
(WebCore::ElementRareData::childrenAffectedByPropertyBasedBackwardPositionalRules):
(WebCore::ElementRareData::setChildrenAffectedByPropertyBasedBackwardPositionalRules):
(WebCore::ElementRareData::ElementRareData):
(WebCore::ElementRareData::resetDynamicRestyleObservations):
* dom/Node.cpp:
(WebCore::Node::updateAncestorsForStyleRecalc):
(WebCore::Node::setNeedsStyleRecalc):
(WebCore::markAncestorsWithChildNeedsStyleRecalc): Deleted.
* dom/Node.h:
Unlike the other marking steps, ChildrenAffectedByPropertyBasedBackwardPositionalRules can only really
affect one level (because we don't have a parent-selectors). It is quite easy to mark large
trees with ChildrenAffectedByPropertyBasedBackwardPositionalRules by using a selector list that is a bit
too generic. When that happen, we must be careful not invalidating everything, just the affected subtree.
2014-11-12 Jon Honeycutt <jhoneycutt@apple.com>
REGRESSION (r172826): Password field placeholder text is missing if
placeholder attribute precedes type attribute
<https://bugs.webkit.org/show_bug.cgi?id=138682>
<rdar://problem/18574213>
When the placeholder attribute is encountered, a shadow tree is created
to include the placeholder element. When the type attribute is
encountered, the previous shadow tree is destroyed, and a new shadow
tree is created. TextFieldInputType::createShadowSubtree() did not
handle creating the placeholder element.
This regressed in r172826 because prior to r172826, the placeholder
element would be recreated when
HTMLTextFormControlElement::updatePlaceholderVisibility() was called.
In r172826, updatePlaceholderVisibility() was changed to only show or
hide the placeholder element if it exists.
Reviewed by Benjamin Poulain.
* html/TextFieldInputType.cpp:
(WebCore::TextFieldInputType::createShadowSubtree):
Call updatePlaceholderVisibility() to insert the placeholder element
(after the inner text element has been inserted, as it appears before
it in the shadow DOM).
2014-11-13 Joanmarie Diggs <jdiggs@igalia.com>
AX: [ATK] Accessible focus events are emitted when the selection is changed in non-focused combo boxes
https://bugs.webkit.org/show_bug.cgi?id=137866
Reviewed by Mario Sanchez Prada.
Check that the AccessibilityMenuList is really focused before notifying
the platform that it is focused. Likewise, only notify the platform of
an AccessibilityMenuListOption focus gain if the AccessibilityMenuList
containing that option is expanded.
Test: platform/gtk/accessibility/menu-list-unfocused-notifications.html
* accessibility/atk/AXObjectCacheAtk.cpp:
(WebCore::notifyChildrenSelectionChange):
(WebCore::AXObjectCache::postPlatformNotification):
2014-11-13 Gyuyoung Kim <gyuyoung.kim@samsung.com>
[EFL] Unexpected crashes in layout test after r175953
https://bugs.webkit.org/show_bug.cgi?id=138652
Reviewed by Csaba Osztrogonác.
In r175953, it set reusableNodeIndex value with m_partCache's size(). It causes
out of bound index crash because the reusableNodeIndex is Vector object.
No new test. This patch is to fix broken tests related to widgets on EFL port.
* platform/efl/RenderThemeEfl.cpp:
(WebCore::RenderThemeEfl::getThemePartFromCache): Need to set reusableNodeIndex with "size() - 1".
2014-11-13 Chris Dumez <cdumez@apple.com>
Lazily create HTMLInputElement's inputType and shadow subtree
https://bugs.webkit.org/show_bug.cgi?id=138524
Reviewed by Ryosuke Niwa.
When an HTMLInputElement was created by the parser, we would first call
HTMLInputElement::create(), then call Element::parserSetAttributes() on
the constructed input. With the previous implementation, this was a bit
inefficient because HTMLInputElement::create() would construct a
TextInputType inputType (as this is the default) as well as its
corresponding shadow subtree. Then, parserSetAttributes() would often
set the |type| attribute and would need to destroy this input type as
well as its subtree if the new |type| is not 'text', to create a new
inputType / shadow subtree of the right type. The profiler showed that
this was fairly expensive.
To improve this, this patch delays the inputType / shadow subtree
creation when the HTMLInputElement is constructed by the parser, until
the attributes are actually set by the parser. This way, we directly
create an inputType / shadow subtree of the right type.
I see a 1.4% speed up on speedometer (73.95 -> 75.0).
Test: fast/dom/HTMLInputElement/border-attribute-crash.html
* dom/Element.cpp:
(WebCore::Element::parserSetAttributes):
(WebCore::Element::parserDidSetAttributes):
* dom/Element.h:
* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::HTMLInputElement):
(WebCore::HTMLInputElement::create):
(WebCore::HTMLInputElement::updateType):
(WebCore::HTMLInputElement::runPostTypeUpdateTasks):
(WebCore::HTMLInputElement::initializeInputType):
(WebCore::HTMLInputElement::parseAttribute):
(WebCore::HTMLInputElement::parserDidSetAttributes):
(WebCore::HTMLInputElement::finishParsingChildren):
* html/HTMLInputElement.h:
2014-11-12 Chris Dumez <cdumez@apple.com>
Have DOMTimer deal with more ScriptExecutionContext references
https://bugs.webkit.org/show_bug.cgi?id=138679
Reviewed by Andreas Kling.
Have DOMTimer deal with more ScriptExecutionContext references instead
of pointers, to make it clear the script execution context cannot be
null.
No new tests, no behavior change.
* bindings/js/ScheduledAction.cpp:
(WebCore::ScheduledAction::execute):
(WebCore::ScheduledAction::executeFunctionInContext):
* bindings/js/ScheduledAction.h:
* dom/DocumentEventQueue.cpp:
* page/DOMTimer.cpp:
(WebCore::DOMTimerFireState::DOMTimerFireState):
(WebCore::NestedTimersMap::instanceForContext):
(WebCore::DOMTimer::DOMTimer):
(WebCore::DOMTimer::install):
(WebCore::DOMTimer::removeById):
(WebCore::DOMTimer::fired):
* page/DOMTimer.h:
* page/DOMWindow.cpp:
(WebCore::DOMWindow::setTimeout):
(WebCore::DOMWindow::clearTimeout):
(WebCore::DOMWindow::setInterval):
(WebCore::DOMWindow::clearInterval):
* page/SuspendableTimer.cpp:
(WebCore::SuspendableTimer::SuspendableTimer):
* page/SuspendableTimer.h:
* workers/WorkerGlobalScope.cpp:
(WebCore::WorkerGlobalScope::setTimeout):
(WebCore::WorkerGlobalScope::clearTimeout):
(WebCore::WorkerGlobalScope::setInterval):
(WebCore::WorkerGlobalScope::clearInterval):
2014-11-12 Dean Jackson <dino@apple.com>
Support unprefixed animation property names
https://bugs.webkit.org/show_bug.cgi?id=138678
<rdar://problem/18943059>
Reviewed by Simon Fraser.
Step 1 of 3 in unprefixing CSS animations: handling the
property names and values.
Unlike other unprefixing, where we use an alias that
effectively removes the prefixed values from the code,
for animations we need to keep the old values around so that
existing content will not break (e.g. computed style).
During testing I noticed that we didn't handle the
(relatively) new animation-direction values of
"reverse" and "alternate-reverse" when querying
computed style.
Tests: animations/unprefixed-properties.html
animations/unprefixed-shorthand.html
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::ComputedStyleExtractor::propertyValue): Handle the unprefixed
values, but also get animation direction to produce the correct
results when "reverse" and "alternate-reverse" is specified.
* css/CSSParser.cpp: Handle the new values. If necessary, pass a flag
around indicating whether it is prefixed or unprefixed.
(WebCore::CSSParser::parseValue):
(WebCore::CSSParser::parseAnimationShorthand): Use the flag to decide
which of the forms we're going to check.
(WebCore::CSSParser::parseAnimationProperty):
* css/CSSParser.h:
* css/CSSProperty.h:
(WebCore::prefixingVariantForPropertyId): Add prefixing/unprefixing variants for
all the animation values, and clean up the code a bit.
* css/CSSPropertyNames.in: Add new properties.
* css/DeprecatedStyleBuilder.cpp:
(WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder): We need handlers for the
unprefixed forms. This should move to the new StyleBuilder soon.
* css/StyleProperties.cpp: Handle new values.
(WebCore::StyleProperties::getPropertyValue):
(WebCore::StyleProperties::asText):
* css/StylePropertyShorthand.cpp:
(WebCore::animationShorthand):
(WebCore::animationShorthandForParsing): Decide which list of properties to use.
(WebCore::shorthandForProperty):
(WebCore::matchingShorthandsForLonghand):
(WebCore::webkitAnimationShorthandForParsing): Deleted.
* css/StylePropertyShorthand.h:
* css/StyleResolver.cpp: Since the new properties come before "background" in
alphabetical order, they are earlier in the CSSPropertyNames.in file, and thus
we need to update the call sites that think CSSPropertyBackground is the first
property.
(WebCore::StyleResolver::styleForKeyframe): Replace CSSPropertyBackground with CSSPropertyAnimation.
(WebCore::StyleResolver::styleForPage):
(WebCore::StyleResolver::applyMatchedProperties):
(WebCore::StyleResolver::applyProperty):
2014-11-12 Beth Dakin <bdakin@apple.com>
Speculative build fix.
* WebCore.exp.in:
2014-11-12 Timothy Horton <timothy_horton@apple.com>
Fix the iOS build.
* platform/spi/mac/DataDetectorsSPI.h:
It's likely that more of this file should be compiled out on iOS,
but this is all we need to build.
2014-11-12 Beth Dakin <bdakin@apple.com>
WK1: Support default actions for images
https://bugs.webkit.org/show_bug.cgi?id=138668
-and corresponding-
rdar://problem/18785434
Reviewed by Tim Horton.
Symbol needed for copying image.
* WebCore.exp.in:
2014-11-05 Ada Chan <adachan@apple.com>
Implement new plug-in API for muting plug-ins
https://bugs.webkit.org/show_bug.cgi?id=138105
Reviewed by Anders Carlsson.
Add the new NPNVmuteAudioBool NPNVariable.
Test: platform/mac-wk2/plugins/muted-state.html
* plugins/npapi.h:
2014-11-12 Tim Horton <timothy_horton@apple.com>
Need to show the text indicator when Data Detectors shows a popover
https://bugs.webkit.org/show_bug.cgi?id=138664
<rdar://problem/18869900>
Reviewed by Beth Dakin.
* platform/spi/mac/DataDetectorsSPI.h:
Add new DataDetectors SPI.
2014-11-12 Chris Dumez <cdumez@apple.com>
Minor improvements to RenderListItem
https://bugs.webkit.org/show_bug.cgi?id=138601
Reviewed by Darin Adler.
Make several minor improvements to RenderListItem and clean up the
code a bit.
No new tests, no behavior change.
* rendering/RenderListItem.cpp:
(WebCore::isHTMLListElement):
- Rename isList to isHTMLListElement() for clarity as it checks
for HTMLOListElement and HTMLUListElement types
- Inline the function as it is short.
- Use is<HTML*Element>() for type checking
- Update the argument to take a Node& instead of an Element*. This
is because the argument is expected to the non-null. Also using
looser typing here allows us to use this utility function is one
more place, without impacting performance as
hasTagName(HTMLQualifiedName) is defined on Node.
(WebCore::enclosingList):
- Pass the argument as a reference instead of a pointer as it is
expected to be non-null.
- Initialize firstNode before the loop to avoid the if (!firstNode)
check for every iteration.
(WebCore::nextListItem):
- Take an Element as second argument instead of a RenderListItem*
and provide convenience overloads so that we don't need to do
null checks just because some calls sites call this function
with 2 arguments and others with 1 argument. This way, we avoid
unnecessary null checks as most call sites already do such
checks (or have references).
- Transform the while loop into a for loop for clarity.
- Don't traverse an Element's subtree if the Element does not have
a renderer as it is impossible of any of its descendant to have
a renderer (and we are looking for a specific type of renderer).
(WebCore::previousListItem):
- Pass the item argument as a reference instead of a pointer as it
is expected to be non-null.
- Reduce the scope of the |current| so that it is now declared
inside the loop.
(WebCore::RenderListItem::updateItemValuesForOrderedList):
(WebCore::RenderListItem::itemCountForOrderedList):
- Pass argument as a reference instead of a pointer as it was expected
to be non-null (There was an assertion in place to make sure of it).
(WebCore::RenderListItem::calcValue):
- Use is<HTMLOListElement>() instead of hasTagName().
(WebCore::getParentOfFirstLineBox):
- Rename variables to stop using abbreviations.
- Pass arguments as references instead of pointers as they are expected
to be non-null.
- Remove the firstChild null check before the loop as it does not
change behavior. The loop will abort early if firstChild is null
and we will end up returning nullptr as well.
- Use is<>() more for type checking.
- Reuse the isHTMLListElement() utility function instead of duplicating
its code inside this function.
(WebCore::firstNonMarkerChild):
- Pass argument as a reference as it is expected to be non-null.
- Rename variable from result to child for clarity, as we are traversing
the children.
(WebCore::RenderListItem::markerTextWithSuffix):
- Use String appending instead of StringBuilder as it simplifies the
code a lot and should not impact performance in this case.
(WebCore::RenderListItem::explicitValueChanged):
- Restructure the code a bit to do the |listNode| null check before the
loop, now that nextListItem() takes a reference in argument. This is
the only call site where we didn't already know that listNode is
non-null.
(WebCore::previousOrNextItem):
- Mark this function as inline as it is short and called repeatedly.
2014-11-12 Chris Dumez <cdumez@apple.com>
Speed up HTMLTextFormControlElement::setInnerTextValue() a bit
https://bugs.webkit.org/show_bug.cgi?id=138619
Reviewed by Darin Adler.
Speed up HTMLTextFormControlElement::setInnerTextValue() a bit by:
- Not doing a virtual isTextFormControl() call. Relying on innerTextElement()
not returning null is sufficient.
- Caching the result of innerTextElement() instead of repeatedly calling that
virtual function.
- De-virtualizing setFormControlValueMatchesRenderer() /
formControlValueMatchesRenderer() as these are never overridden.
- Moving the code constructing the innerTextValue from a
TextControlInnerTextElement from innerTextValue() to a new
innerTextValueFrom(TextControlInnerTextElement&) function and call this new
function from setInnerTextValue() to avoid calling innerTextElement() again
and making sure it is non-null
- Do the tree traversal from innerTextElement's firstChild instead of from
innerTextElement. The innerTextElement is a TextControlInnerTextElement.
Therefore, it cannot be an HTMLBRElement or a Text node.
No new tests, no behavior change.
* html/HTMLFormControlElement.h:
(WebCore::HTMLFormControlElement::formControlValueMatchesRenderer):
(WebCore::HTMLFormControlElement::setFormControlValueMatchesRenderer):
* html/HTMLTextFormControlElement.cpp:
(WebCore::stripTrailingNewline):
(WebCore::innerTextValueFrom):
(WebCore::HTMLTextFormControlElement::setInnerTextValue):
(WebCore::HTMLTextFormControlElement::innerTextValue):
(WebCore::HTMLTextFormControlElement::valueWithHardLineBreaks):
(WebCore::finishText): Deleted.
2014-11-12 Jer Noble <jer.noble@apple.com>
[Mac] media/track/audio-track.html is flakey
https://bugs.webkit.org/show_bug.cgi?id=138394
Reviewed by Alexey Proskuryakov.
The above test fails if the HTMLMediaElement's "canplaythrough" event fires before the AudioTrackList's
"addtrack" event fires. This can happen because each object keeps its own GenericEventQueue, which
empties when that individual queue's timer fires. So events can be enqueued in the following order:
1, A, 2, B, 3, C; but fired in a different order: 1, 2, 3, A, B, C.
Make events enqueued in GenericEventQueues globally ordered, so that events are fired in the order
which they are enqueued, regardless of which object owns the queue. Use a static queue of
GenericEventQueues to manage which GenericEventQueue fires and in what order.
GenericEventQueues will use a WeakPtrFactory to cancel pending events. Revoking a GenericEventQueue's
weak pointers means those queue's entries will be skipped the next time the meta-queue is processed.
* dom/GenericEventQueue.cpp:
(WebCore::GenericEventQueue::GenericEventQueue): Create a WeakPtrFactory instead of a Timer.
(WebCore::GenericEventQueue::enqueueEvent): Enqueue this queue with the MetaQueue.
(WebCore::GenericEventQueue::sharedTimer): Lazily-initializing accessor.
(WebCore::GenericEventQueue::sharedTimerFired): Ask each queue to dispatch one event.
(WebCore::GenericEventQueue::pendingQueues): Lazily-initializing accessor.
(WebCore::GenericEventQueue::dispatchOneEvent): Renamed from timerFired.
(WebCore::GenericEventQueue::close): Revoke all WeakPtrs.
(WebCore::GenericEventQueue::cancelAllEvents): Ditto.
(WebCore::GenericEventQueue::hasPendingEvents): Use !isEmpty().
(WebCore::GenericEventQueue::timerFired): Deleted.
* dom/GenericEventQueue.h:
2014-11-12 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Expose user script messages to GObject DOM bindings
https://bugs.webkit.org/show_bug.cgi?id=138411
Reviewed by Philippe Normand.
* PlatformGTK.cmake: Add WebKitDOMCustomUnstable.h to the list of
installed headers and make a symlink for it in the DerivedSources dir.
* bindings/gobject/WebKitDOMCustomUnstable.h: Added.
* bindings/gobject/WebKitDOMCustom.cpp:
(webkit_dom_dom_window_get_webkit_namespace):
(webkit_dom_user_message_handlers_namespace_get_handler):
* bindings/scripts/CodeGeneratorGObject.pm:
(HasUnstableCustomAPI): Helper function to check if the given
class has custom unstable API.
(WriteData): Include WebKitDOMCustomUnstable.h header if the class
has API defined there.
2014-11-12 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Fix how SerializedScriptValue is exposed to GObject DOM bindings
https://bugs.webkit.org/show_bug.cgi?id=138409
Reviewed by Philippe Normand.
It's currently exposed as a WebKitDOMSerializedScriptValue class
that doesn't really exist. It should be handled as a string, that
is used to create a SerializedScriptValue when coming from the
API, and converted to a string again when returned to the API.
* bindings/scripts/CodeGeneratorGObject.pm:
(GetGlibTypeName): Return gchar* as glib type of SerializedScriptValue.
(IsGDOMClassType): Don't consider SerializedScriptValue as a GDOM class.
(GenerateFunction): Handle SerializedScriptValue parameters and
return values specially.
* bindings/scripts/test/GObject/WebKitDOMTestCallback.cpp:
(webkit_dom_test_callback_callback_with_serialized_script_value_param):
* bindings/scripts/test/GObject/WebKitDOMTestCallback.h:
* bindings/scripts/test/GObject/WebKitDOMTestObj.cpp:
(webkit_dom_test_obj_serialized_value):
* bindings/scripts/test/GObject/WebKitDOMTestObj.h:
* bindings/scripts/test/GObject/WebKitDOMTestSerializedScriptValueInterface.cpp:
(webkit_dom_test_serialized_script_value_interface_class_init):
(webkit_dom_test_serialized_script_value_interface_get_value):
(webkit_dom_test_serialized_script_value_interface_set_value):
(webkit_dom_test_serialized_script_value_interface_get_readonly_value):
(webkit_dom_test_serialized_script_value_interface_get_cached_value):
(webkit_dom_test_serialized_script_value_interface_set_cached_value):
(webkit_dom_test_serialized_script_value_interface_get_cached_readonly_value):
* bindings/scripts/test/GObject/WebKitDOMTestSerializedScriptValueInterface.h:
* bindings/scripts/test/GObject/WebKitDOMTestTypedefs.cpp:
(webkit_dom_test_typedefs_class_init):
(webkit_dom_test_typedefs_get_immutable_serialized_script_value):
(webkit_dom_test_typedefs_set_immutable_serialized_script_value):
* bindings/scripts/test/GObject/WebKitDOMTestTypedefs.h:
2014-11-12 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Move RedirectedXCompositeWindow from platform to WebKit2 layer
https://bugs.webkit.org/show_bug.cgi?id=138093
Reviewed by Martin Robinson.
Remove RedirectedXCompositeWindow.
* PlatformGTK.cmake:
2014-09-01 Philippe Normand <pnormand@igalia.com>
[WK2] UserMediaClient support
https://bugs.webkit.org/show_bug.cgi?id=123158
Reviewed by Benjamin Poulain.
Added document and frame accessors, needed by the
UserMediaRequestManager of the WebProcess. Also added two methods
used by the permission request manager to know if access to audio
or video devices is requested.
Tests: fast/mediastream/error.html
fast/mediastream/success.html
fast/mediastream/delayed-permission-allowed.html
fast/mediastream/delayed-permission-denied.html
http/tests/media/media-stream/disconnected-frame-already.html
http/tests/media/media-stream/disconnected-frame-permission-denied.html
http/tests/media/media-stream/disconnected-frame.html
* Modules/mediastream/UserMediaRequest.cpp:
(WebCore::UserMediaRequest::document):
(WebCore::UserMediaRequest::frame):
* Modules/mediastream/UserMediaRequest.h:
(WebCore::UserMediaRequest::requiresAudio):
(WebCore::UserMediaRequest::requiresVideo):
2014-11-12 Gyuyoung Kim <gyuyoung.kim@samsung.com>
[EFL] Clean up OwnPtr in RenderThemeEfl
https://bugs.webkit.org/show_bug.cgi?id=138642
Reviewed by Zoltan Herczeg.
No new tests, no behavior change.
* platform/efl/RenderThemeEfl.cpp:
(WebCore::RenderThemeEfl::applyEdjeRTLState): Clean up all remaining OwnPtr.
2014-11-11 Gyuyoung Kim <gyuyoung.kim@samsung.com>
Move Modules/websockets to std::unique_ptr
https://bugs.webkit.org/show_bug.cgi?id=138649
Reviewed by Chris Dumez.
Remove create() factory function and use std::make_unique<>, std::unique_ptr<>
instead of OwnPtr, PassOwnPtr.
However didReceiveBinaryData() is still using PassOwnPtr. It should be replaced
with std::unique_ptr<>
No new tests, no behavior.
* Modules/websockets/ThreadableWebSocketChannelClientWrapper.h:
* Modules/websockets/WebSocket.cpp:
* Modules/websockets/WebSocketChannel.cpp:
(WebCore::WebSocketChannel::connect):
(WebCore::WebSocketChannel::didFail):
(WebCore::WebSocketChannel::processFrame):
(WebCore::WebSocketChannel::enqueueTextFrame):
(WebCore::WebSocketChannel::enqueueRawFrame):
(WebCore::WebSocketChannel::enqueueBlobFrame):
(WebCore::WebSocketChannel::processOutgoingFrameQueue):
(WebCore::WebSocketChannel::sendFrame):
* Modules/websockets/WebSocketChannel.h:
* Modules/websockets/WebSocketDeflateFramer.cpp:
(WebCore::WebSocketDeflateFramer::createExtensionProcessor):
(WebCore::WebSocketDeflateFramer::enableDeflate):
(WebCore::WebSocketDeflateFramer::deflate):
(WebCore::WebSocketDeflateFramer::inflate):
(WebCore::WebSocketExtensionDeflateFrame::create): Deleted.
* Modules/websockets/WebSocketDeflateFramer.h:
(WebCore::DeflateResultHolder::create): Deleted.
(WebCore::InflateResultHolder::create): Deleted.
* Modules/websockets/WebSocketDeflater.cpp:
(WebCore::WebSocketDeflater::WebSocketDeflater):
(WebCore::WebSocketInflater::WebSocketInflater):
(WebCore::WebSocketDeflater::create): Deleted.
(WebCore::WebSocketInflater::create): Deleted.
* Modules/websockets/WebSocketDeflater.h:
* Modules/websockets/WebSocketExtensionDispatcher.cpp:
(WebCore::WebSocketExtensionDispatcher::addProcessor):
* Modules/websockets/WebSocketExtensionDispatcher.h:
* Modules/websockets/WebSocketHandshake.cpp:
(WebCore::WebSocketHandshake::addExtensionProcessor):
* Modules/websockets/WebSocketHandshake.h:
2014-11-11 Chris Dumez <cdumez@apple.com>
Unreviewed iOS build fix after r176001.
Export an additional symbol.
* WebCore.exp.in:
2014-11-11 Jer Noble <jer.noble@apple.com>
[Mac] Add diagnostic logging for per-media-engine load failures
https://bugs.webkit.org/show_bug.cgi?id=138647
Reviewed by Eric Carlson.
Add diagnostic logging fired whenever a media engine fails to load media,
even if another engine subsequentially succeeds. Add a mechanism for retrieving
the platform-specific error code from a given engine.
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::parseAttribute):
* html/HTMLMediaElement.h:
* page/DiagnosticLoggingKeys.cpp:
(WebCore::DiagnosticLoggingKeys::engineFailedToLoadKey):
* page/DiagnosticLoggingKeys.h:
* platform/graphics/MediaPlayer.cpp:
(WebCore::MediaPlayer::networkStateChanged):
(WebCore::MediaPlayer::platformErrorCode):
* platform/graphics/MediaPlayer.h:
(WebCore::MediaPlayerClient::mediaPlayerEngineFailedToLoad):
* platform/graphics/MediaPlayerPrivate.h:
(WebCore::MediaPlayerPrivateInterface::platformErrorCode):
* platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
(WebCore::MediaPlayerPrivateAVFoundation::platformErrorCode):
* platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
(WebCore::MediaPlayerPrivateAVFoundationCF::assetErrorCode):
* platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.h:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::assetErrorCode):
* platform/graphics/mac/MediaPlayerPrivateQTKit.h:
* platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
(WebCore::MediaPlayerPrivateQTKit::platformErrorCode):
2014-11-11 Chris Dumez <cdumez@apple.com>
Mark more virtual functions in HTMLInputElement as final
https://bugs.webkit.org/show_bug.cgi?id=138644
Reviewed by Andreas Kling.
Mark more virtual functions in HTMLInputElement as final to help the
compiler optimize better.
No new tests, no behavior change.
* html/HTMLInputElement.h:
2014-11-11 Gyuyoung Kim <gyuyoung.kim@samsung.com>
Remove IncrementalSweeper::create()
https://bugs.webkit.org/show_bug.cgi?id=138243
Reviewed by Filip Pizlo.
As a step to use std::unique_ptr<> and std::make_unique<>, this patch removes
IncrementalSweeper::create(), then set constructor of IncrementalSweeper to public.
Now we begins to use std::make_unique<> to create IncrementalSweeper instance.
No new tests, no behavior changes.
* bindings/js/JSDOMWindowBase.cpp:
(WebCore::JSDOMWindowBase::commonVM):
* platform/ios/WebSafeIncrementalSweeperIOS.h:
2014-11-11 Chris Dumez <cdumez@apple.com>
Move 'border-image-*' / '-webkit-mask-box-image-*' CSS properties to the new StyleBuilder
https://bugs.webkit.org/show_bug.cgi?id=138594
Reviewed by Antti Koivisto.
Move 'border-image-*' / '-webkit-mask-box-image-*' CSS properties from
DeprecatedStyleBuilder to the new StyleBuilder using custom code.
No new tests, no behavior change.
* css/CSSPropertyNames.in:
* css/DeprecatedStyleBuilder.cpp:
(WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
(WebCore::ApplyPropertyBorderImageModifier::getValue): Deleted.
(WebCore::ApplyPropertyBorderImageModifier::setValue): Deleted.
(WebCore::ApplyPropertyBorderImageModifier::applyInheritValue): Deleted.
(WebCore::ApplyPropertyBorderImageModifier::applyInitialValue): Deleted.
(WebCore::ApplyPropertyBorderImageModifier::applyValue): Deleted.
(WebCore::ApplyPropertyBorderImageModifier::createHandler): Deleted.
* css/StyleBuilderCustom.h:
(WebCore::StyleBuilderFunctions::ApplyPropertyBorderImageModifier::applyInheritValue):
(WebCore::StyleBuilderFunctions::ApplyPropertyBorderImageModifier::applyInitialValue):
(WebCore::StyleBuilderFunctions::ApplyPropertyBorderImageModifier::applyValue):
(WebCore::StyleBuilderFunctions::ApplyPropertyBorderImageModifier::getValue):
(WebCore::StyleBuilderFunctions::ApplyPropertyBorderImageModifier::setValue):
2014-11-11 David Kilzer <ddkilzer@apple.com>
Modernize $buildingForIPhone in CodeGeneratorObjC.pm
<http://webkit.org/b/138640>
Reviewed by Daniel Bates.
Mac OS X is the only platform that supports NSColor, so rename
$buildingForIPhone to $shouldUseCGColor (which is actually what
the variable represents) and define it in terms of the "macosx"
platform name.
* bindings/scripts/CodeGeneratorObjC.pm:
($buildingForIPhone): Rename to $shouldUseCGColor.
($shouldUseCGColor): False if PLATFORM_NAME is not defined,
which is the case on older Xcodes when building for Mac OS X, or
if PLATFORM_NAME is equal to "macosx". True otherwise.
(GetClassName): Switch to use new variable name.
(AddIncludesForType): Ditto.
(GenerateHeader): Remove dead code. The
$buildingForTigerOrEarlier variable was accidentally
re-introduced in r161638, but was originally removed in r127032!
(GenerateImplementation): Switch to use new variable name.
2014-11-11 Tim Horton <timothy_horton@apple.com>
Add support for mailto: link action menus
https://bugs.webkit.org/show_bug.cgi?id=138641
<rdar://problem/18741567>
Reviewed by Beth Dakin.
* WebCore.exp.in:
Add an export.
* platform/spi/mac/DataDetectorsSPI.h:
Add some DataDetectors SPI.
2014-11-11 Eric Carlson <eric.carlson@apple.com>
[iOS] video is sometimes allowed to play from the background
https://bugs.webkit.org/show_bug.cgi?id=138522
Rubber-stamped by Jer Noble.
* platform/audio/MediaSession.cpp:
(WebCore::MediaSession::updateClientDataBuffering): Call MediaSessionManager::sessionCanLoadMedia.
2014-11-11 Eric Carlson <eric.carlson@apple.com>
[iOS] a page with video in optimized fullscreen is visible
https://bugs.webkit.org/show_bug.cgi?id=138632
Reviewed by Anders Carlsson.
* platform/ios/WebVideoFullscreenInterfaceAVKit.h:
(WebCore::WebVideoFullscreenInterfaceAVKit::mode): Expose fullscreen mode.
2014-11-11 Myles C. Maxfield <mmaxfield@apple.com>
Mountain Lion build fix
https://bugs.webkit.org/show_bug.cgi?id=138631
Reviewed by Simon Fraser.
* platform/spi/cocoa/CoreTextSPI.h:
2014-11-11 Eric Carlson <eric.carlson@apple.com>
[iOS] cleanup wireless route monitoring
https://bugs.webkit.org/show_bug.cgi?id=138614
Reviewed by Jer Noble.
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::clearMediaPlayer): Add logging.
(WebCore::HTMLMediaElement::removeEventListener): Ditto.
(WebCore::HTMLMediaElement::createMediaPlayer): Ditto.
* platform/audio/ios/MediaSessionManagerIOS.mm:
(WebCore::MediaSessionManageriOS::resetRestrictions): Add logging.
(WebCore::MediaSessionManageriOS::configureWireLessTargetMonitoring): Ditto.
(WebCore::MediaSessionManageriOS::updateNowPlayingInfo): Ditto.
(-[WebMediaSessionHelper initWithCallback:]): Ditto.
(-[WebMediaSessionHelper dealloc]): Always deallocate volume view and routing controller
on the main thread.
(-[WebMediaSessionHelper clearCallback]): Add logging.
(-[WebMediaSessionHelper hasWirelessTargetsAvailable]): Ditto.
(-[WebMediaSessionHelper startMonitoringAirPlayRoutes]): Always call routing controller on
the main thread.
(-[WebMediaSessionHelper stopMonitoringAirPlayRoutes]): Ditto.
(-[WebMediaSessionHelper interruption:]): Add logging.
(-[WebMediaSessionHelper applicationWillEnterForeground:]): Ditto.
(-[WebMediaSessionHelper applicationDidBecomeActive:]): Ditto.
(-[WebMediaSessionHelper applicationWillResignActive:]): Ditto.
(-[WebMediaSessionHelper wirelessRoutesAvailableDidChange:]): Ditto.
2014-11-11 Myles C. Maxfield <mmaxfield@apple.com>
Unreviewd iOS build fix
* platform/spi/cocoa/CoreTextSPI.h:
2014-11-11 David Kilzer <ddkilzer@apple.com>
Protect Document in ProcessingInstruction::setXSLStyleSheet()
<http://webkit.org/b/138621>
Reviewed by Andreas Kling.
The patch is inspired by the following Blink revision by
<tasak@google.com>:
<https://src.chromium.org/viewvc/blink?view=rev&revision=182309>
* dom/ProcessingInstruction.cpp:
(WebCore::ProcessingInstruction::setXSLStyleSheet):
2014-11-11 Myles C. Maxfield <mmaxfield@apple.com>
Finish moving CTFontGetVerticalGlyphsForCharacters and CTLineCreateWithUniCharProvider out from WKSI
https://bugs.webkit.org/show_bug.cgi?id=138623
Reviewed by Geoff Garen.
No new tests because there is no behavior change.
* WebCore.exp.in:
* WebCore.order:
* platform/graphics/mac/GlyphPageTreeNodeMac.cpp:
(WebCore::GlyphPage::fill):
* platform/graphics/mac/SimpleFontDataMac.mm:
(WebCore::SimpleFontData::canRenderCombiningCharacterSequence):
* platform/ios/WebCoreSystemInterfaceIOS.mm:
* platform/mac/WebCoreSystemInterface.h:
* platform/mac/WebCoreSystemInterface.mm:
* platform/spi/cocoa/CoreTextSPI.h:
2014-11-11 Myles C. Maxfield <mmaxfield@apple.com>
Unreviewed Mountain Lion build fix
* platform/spi/cocoa/CoreTextSPI.h:
2014-11-11 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r175852.
https://bugs.webkit.org/show_bug.cgi?id=138626
Broke PLT by introducing a crash. (Requested by rniwa on
#webkit).
Reverted changeset:
"Lazily create HTMLInputElement's inputType and shadow
subtree"
https://bugs.webkit.org/show_bug.cgi?id=138524
http://trac.webkit.org/changeset/175852
2014-11-11 Chris Dumez <cdumez@apple.com>
Regression(r175947): Caused assertions in debug builds
https://bugs.webkit.org/show_bug.cgi?id=138620
Reviewed by Benjamin Poulain.
In HTMLCollection::traverseForward(), traversedCount was incremented 1
time too many when hitting the end of the collection (i.e. element
becomes null). Doing a partial revert.
No new tests, already covered by existing tests.
* html/HTMLCollection.cpp:
(WebCore::HTMLCollection::traverseForward):
2014-11-11 Tim Horton <timothy_horton@apple.com>
DataDetectors' menu items aren't presented in the telephone number menu
https://bugs.webkit.org/show_bug.cgi?id=138602
<rdar://problem/18866308>
Reviewed by Beth Dakin.
* English.lproj/Localizable.strings:
Remove a now-unused localized string.
2014-11-11 Daniel Bates <dabates@apple.com>
[Frame Flattening] ASSERT(transaction->view == &view()) fails in RenderBlock::removeFromUpdateScrollInfoAfterLayoutTransaction()
https://bugs.webkit.org/show_bug.cgi?id=138615
<rdar://problem/18928487>
Reviewed by David Hyatt.
Fixes an issue where we always expected that the RenderView associated with the RenderBlock called in
RenderBlock::removeFromUpdateScrollInfoAfterLayoutTransaction() is the same as the RenderView associated with
the top transaction in the UpdateScrollInfoAfterLayoutTransaction stack regardless of frame flattening. This
expectation is only true when frame flattening is disabled.
Test: fast/frames/flattening/iframe-flattening-inside-flexbox-with-delayed-scroll-update.html
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::removeFromUpdateScrollInfoAfterLayoutTransaction):
2014-11-11 Tim Horton <timothy_horton@apple.com>
Adopt DDActionContext menu type SPI
https://bugs.webkit.org/show_bug.cgi?id=138603
<rdar://problem/18867627>
Reviewed by Anders Carlsson.
* platform/spi/mac/DataDetectorsSPI.h:
Add the new SPI.
2014-11-11 Tim Horton <timothy_horton@apple.com>
Data Detectors popovers should be dismissed upon scrolling
https://bugs.webkit.org/show_bug.cgi?id=138600
<rdar://problem/18932770>
Reviewed by Beth Dakin.
* platform/spi/mac/DataDetectorsSPI.h:
Adjust the SPI header.
2014-11-11 Tim Horton <timothy_horton@apple.com>
Localize strings for action menus
https://bugs.webkit.org/show_bug.cgi?id=138591
<rdar://problem/18815343>
Reviewed by Dan Bates.
* English.lproj/Localizable.strings:
Add a bunch of localizable strings.
2014-11-11 Myles C. Maxfield <mmaxfield@apple.com>
Cleanup from r175379
https://bugs.webkit.org/show_bug.cgi?id=138616
Reviewed by Simon Fraser.
No new tests because there is no behavior change.
* WebCore.exp.in:
* platform/ios/WebCoreSystemInterfaceIOS.mm:
* platform/mac/WebCoreSystemInterface.h:
* platform/mac/WebCoreSystemInterface.mm:
2014-11-11 Myles C. Maxfield <mmaxfield@apple.com>
Move CTFontTransformGlyphs out from WKSI
https://bugs.webkit.org/show_bug.cgi?id=138599
Reviewed by Simon Fraser.
No new tests because there is no behavior change.
* WebCore.exp.in:
* WebCore.order:
* platform/graphics/SimpleFontData.cpp:
(WebCore::SimpleFontData::applyTransforms):
* platform/graphics/SimpleFontData.h:
* platform/ios/WebCoreSystemInterfaceIOS.mm:
* platform/mac/WebCoreSystemInterface.h:
* platform/mac/WebCoreSystemInterface.mm:
* platform/spi/cocoa/CoreTextSPI.h:
2014-11-11 Gyuyoung Kim <gyuyoung.kim@samsung.com>
Use std::unique_ptr<>|std::make_unique_ptr in RenderThemeEfl::ThemePartCacheEntry::create()
https://bugs.webkit.org/show_bug.cgi?id=138558
Reviewed by Anders Carlsson.
This patch removes PassOwnPtr and OwnPtr in RenderThemeEfl::ThemePartCacheEntry::create().
It would be good if we also remove create() factory function though, in this case, it is
a little hard to remove it since the create() factory function does many works to create
a ThemePartCacheEntry instance. Thus this patch just replaces PassOwnPtr|OwnPtr with
std::unique_ptr<> and std::make_unique<> in RenderThemeEfl::ThemePartCacheEntry::create().
Besides the theme entries have been maintained by Eina_List*. Unfortunately it doesn't support
std::unique_ptr<> yet. Thus the Eina_List* should be replaced with Vector<std::unique_ptr<>>
so that m_partCache has ownship of all EFL theme entries. This patch tries to keep original
cache algorithm based on Vector class.
No new tests, no behavior changes.
* platform/efl/RenderThemeEfl.cpp:
(WebCore::RenderThemeEfl::ThemePartCacheEntry::create):
(WebCore::RenderThemeEfl::getThemePartFromCache):
* platform/efl/RenderThemeEfl.h:
2014-11-09 Darin Adler <darin@apple.com>
Minor tweaks to HTMLCollection
https://bugs.webkit.org/show_bug.cgi?id=138556
Reviewed by Chris Dumez.
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::addRadioButtonGroupMembers):
Update for namedElements function that now returns a Vector; also use
a new style for loop to iterate it.
* bindings/js/JSHTMLAllCollectionCustom.cpp: Removed some unneeded includes.
(WebCore::namedItems): Updated name to match WebKit coding style, and also
updated to use the return value from namedItems, which now returns a Vector.
(WebCore::callHTMLAllCollection): Updated for namedItems name change.
Also removed explicit Node* type from result of namedItemWithIndex, since that
function now returns a more specific type.
(WebCore::JSHTMLAllCollection::nameGetter): Update for namedItems name change.
(WebCore::JSHTMLAllCollection::item): Ditto.
(WebCore::JSHTMLAllCollection::namedItem): Ditto.
* bindings/js/JSHTMLFormControlsCollectionCustom.cpp: Removed some unneeded includes.
(WebCore::namedItems): Updated name to match WebKit coding style, and also
updated to use the return value from namedItems, which now returns a Vector.
(WebCore::JSHTMLFormControlsCollection::nameGetter): Update for namedItems name change.
(WebCore::JSHTMLFormControlsCollection::namedItem): Ditto.
* bindings/js/JSHTMLFormElementCustom.cpp:
(WebCore::JSHTMLFormElement::nameGetter): Updated to use the return value from
namedItems, which now returns a Vector.
* html/HTMLAllCollection.cpp:
(WebCore::HTMLAllCollection::HTMLAllCollection): Marked the constructor inline,
since it's only used in one place, the create function.
(WebCore::HTMLAllCollection::~HTMLAllCollection): Deleted. No need to have an
explicit destructor since there's nothing special to implement, and includers of
the header file have everything they ened to compile the compiler-generated one.
(WebCore::HTMLAllCollection::namedItemWithIndex): Changed return type to Element.
* html/HTMLAllCollection.h: Removed unneeded explicit declaration of destructor.
Chagned return type of namedItemWithIndex to Element.
* html/HTMLCollection.cpp:
(WebCore::HTMLCollection::rootTypeFromCollectionType): Marked this inline. Also
changed this to be a static member function so it can use the RootType enum, which
is now private to the class.
(WebCore::isMatchingHTMLElement): Marked this function static so it will get
internal linkage.
(WebCore::isMatchingElement): Ditto.
(WebCore::previousElement): Marked this function inline since it's called in only
one place. Changed argument type to a reference since it can never be null.
(WebCore::HTMLCollection::iterateForPreviousElement): Changed argument name and
also updated for above changes.
(WebCore::firstMatchingElement): Marked this function static so it will get
internal linkage.
(WebCore::nextMatchingElement): Ditto. Changed argument type to a reference
since it can never be null.
(WebCore::HTMLCollection::item): Changed return type to Element.
(WebCore::nameShouldBeVisibleInDocumentAll): Added an overload that takes an
Element. This streamlines the code below that calls it so it fits on one line.
(WebCore::firstMatchingChildElement): Marked this function static so it will get
internal linkage.
(WebCore::nextMatchingSiblingElement): Ditto. Changed argument type to a reference
since it can never be null.
(WebCore::HTMLCollection::usesCustomForwardOnlyTraversal): Moved here from the
header since, although it's marked inline, it's only used inside this file.
(WebCore::HTMLCollection::traverseForward): Restructured the code a little bit
to make the function smaller and possibly easier to read. This does add one
redundant null check, but it seems OK to do that.
(WebCore::HTMLCollection::collectionTraverseBackward): Tweaked foramtting a bit.
(WebCore::HTMLCollection::namedItem): Changed return type to Element. Tightened
the code that calls nameShouldBeVisibleInDocumentAll so it fits better on one line.
Changed code that handles m_shouldOnlyIncludeDirectChildren to use a nested if
instead of an && since it makes the code a little easier to read.
(WebCore::HTMLCollection::updateNamedElementCache): Tweaked code a little bit,
using shorter variable names, and using references instead of pointers. Also removed
the call to didPopulate, since setNamedItemCache now takes care of that.
(WebCore::HTMLCollection::namedItems): Changed to return a Vector instead of
appending to an existing one. Also use reserveInitialCapacity and uncheckedAppend
for better performance. Added a FIXME, because there seems to be something wrong
here about this being non-virtual. Made other small tweaks to streamline the code.
(WebCore::HTMLCollection::customElementAfter): Moved this here from the header.
There is no reason to need to inline this.
* html/HTMLCollection.h: Removed unneeded includes. Moved function bodies out
of the class definitions so the class definitions are easier to read. Made some
functions that were formerly public or protected be private instead. Added a call
to didPopulate to setNamedItemCache so the callers don't have to do it.
* html/HTMLFormControlsCollection.cpp:
(WebCore::HTMLFormControlsCollection::namedItem): Changed return value to Element.
Tweaked coding style a little bit.
(WebCore::HTMLFormControlsCollection::updateNamedElementCache): Rearranged to
simplify a bit. Don't build the foundInputElements set when the owner is not a
form element, since we don't use the set in that case. Use shorter variable names,
and modern for loops. Also removed the call to didPopulate, since setNamedItemCache
now takes care of that.
* html/HTMLFormControlsCollection.h: Removed some uneeded forward declarations.
Updated return type for namedItem, and also made the override private.
* html/HTMLFormElement.cpp:
(WebCore::HTMLFormElement::namedElements): Changed to return a Vector and updated
function name accordingly.
* html/HTMLFormElement.h: Ditto.
* html/HTMLNameCollection.h: Removed a stray blank line.
* html/HTMLSelectElement.cpp:
(WebCore::HTMLSelectElement::namedItem): Changed return value to Element.
(WebCore::HTMLSelectElement::item): Ditto.
* html/HTMLSelectElement.h: Ditto.
* page/scrolling/AxisScrollSnapOffsets.cpp:
(WebCore::appendChildSnapOffsets): Rewrote loop as a for loop rather than a while
loop. Removed unwanted use of children()->collectionBegin() to get the first element
child of an HTMLElement. This function uses a mix of DOM and rendering functions that
is probably incorrect, but I did not tackle fixing that at this time.
2014-11-11 Dan Bernstein <mitz@apple.com>
[Mac] WebCore includes unused cursor image resources
https://bugs.webkit.org/show_bug.cgi?id=138605
Reviewed by Anders Carlsson.
* Resources/aliasCursor.png: Removed.
* Resources/cellCursor.png: Removed.
* Resources/contextMenuCursor.png: Removed.
* Resources/copyCursor.png: Removed.
* Resources/eastResizeCursor.png: Removed.
* Resources/eastWestResizeCursor.png: Removed.
* Resources/helpCursor.png: Removed.
* Resources/linkCursor.png: Removed.
* Resources/moveCursor.png: Removed.
* Resources/noDropCursor.png: Removed.
* Resources/noneCursor.png: Removed.
* Resources/northEastResizeCursor.png: Removed.
* Resources/northEastSouthWestResizeCursor.png: Removed.
* Resources/northResizeCursor.png: Removed.
* Resources/northSouthResizeCursor.png: Removed.
* Resources/northWestResizeCursor.png: Removed.
* Resources/northWestSouthEastResizeCursor.png: Removed.
* Resources/progressCursor.png: Removed.
* Resources/southEastResizeCursor.png: Removed.
* Resources/southResizeCursor.png: Removed.
* Resources/southWestResizeCursor.png: Removed.
* Resources/verticalTextCursor.png: Removed.
* Resources/waitCursor.png: Removed.
* Resources/westResizeCursor.png: Removed.
* Resources/zoomInCursor.png: Removed.
* Resources/zoomOutCursor.png: Removed.
* WebCore.xcodeproj/project.pbxproj: Removed references to the above files.
* platform/mac/CursorMac.mm:
(WebCore::Cursor::ensurePlatformCursor): For Help, Cell, ZoomIn and ZoomOut, don’t check
for a nil return value from wkCursor(), which can’t occur in any supported configuration.
For None, create a cursor with an empty NSImage instead of loading a transparent image from
the file system.
(WebCore::createNamedCursor): Deleted.
2014-11-11 Gyuyoung Kim <gyuyoung.kim@samsung.com>
Unreviewed, rolling out r175844.
Win debug build has broken since r175844.
Reverted changeset:
"Use std::unique_ptr<> and std::make_unique<> in WebCore"
https://bugs.webkit.org/show_bug.cgi?id=138560
http://trac.webkit.org/changeset/175844
2014-11-11 Philippe Normand <pnormand@igalia.com>
Qt/Chromium remnants in MediaPlayer
https://bugs.webkit.org/show_bug.cgi?id=138611
Reviewed by Jer Noble.
* platform/graphics/MediaPlayer.h: Remove unused Qt/Chromium stuff.
2014-11-11 Chris Dumez <cdumez@apple.com>
Move '-webkit-marquee-speed' CSS property to the new StyleBuilder
https://bugs.webkit.org/show_bug.cgi?id=138595
Reviewed by Antti Koivisto.
Move '-webkit-marquee-speed' CSS property from DeprecatedStyleBuilder
to the new StyleBuilder by adding a new MarqueeSpeed Converter.
No new tests, no behavior change.
* css/CSSPropertyNames.in:
* css/DeprecatedStyleBuilder.cpp:
(WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
(WebCore::ApplyPropertyMarqueeSpeed::applyValue): Deleted.
(WebCore::ApplyPropertyMarqueeSpeed::createHandler): Deleted.
* css/StyleBuilderConverter.h:
(WebCore::StyleBuilderConverter::convertMarqueeSpeed):
2014-10-07 Sergio Villar Senin <svillar@igalia.com>
[CSS Grid Layout] Limit the size of explicit/implicit grid
https://bugs.webkit.org/show_bug.cgi?id=136217
Reviewed by Andreas Kling.
A recent change in the specs allow us to set a limit (maximum
size) for both the explicit and implicit grids so we can protect
ourselves from absurdly huge grid specifications. It was decided
to use the recommended limit which is 1 million.
This means that we can remove the old limitation for the number of
repetitions in repeat(). Instead we now clamp the number of
repetitions to the maximum value that allow us to have the maximum
number of whole repetitions without exceeding the track number
limit.
* WebCore.xcodeproj/project.pbxproj:
* css/CSSParser.cpp:
(WebCore::CSSParser::parseGridTrackRepeatFunction): Replaced the
old limit by the new one.
* rendering/RenderGrid.cpp:
(WebCore::RenderGrid::placeItemsOnGrid): Use the amount of tracks
provided by GridResolvedPosition.
(WebCore::RenderGrid::populateExplicitGridAndOrderIterator): Ditto.
* rendering/style/GridCoordinate.h:
(WebCore::GridSpan::GridSpan):
* rendering/style/GridResolvedPosition.cpp:
(WebCore::GridResolvedPosition::explicitGridColumnCount): Bring
the static function back to life.
(WebCore::GridResolvedPosition::explicitGridRowCount): Ditto.
(WebCore::explicitGridSizeForSide):
* rendering/style/GridResolvedPosition.h:
2014-11-11 Yusuke Suzuki <utatane.tea@gmail.com>
CSS4 Selectors: Add multiple pseudo elements support to :matches
https://bugs.webkit.org/show_bug.cgi?id=138214
Reviewed by Benjamin Poulain.
In this patch, we implement (multiple) pseudo elements support to :matches.
Currently, we implemented it in css/SelectorChecker and there's no CSS JIT implementation.
And we change the semantics of pseudo element selector behavior.
Previously when pseudo element selector appeared in the non-rightmost
fragment, it was ignored. This patch changes it to unmatched.
* css/SelectorChecker.cpp:
(WebCore::SelectorChecker::CheckingContextWithStatus::CheckingContextWithStatus):
(WebCore::SelectorChecker::match):
(WebCore::hasScrollbarPseudoElement):
(WebCore::SelectorChecker::matchRecursively):
(WebCore::SelectorChecker::checkOne):
(WebCore::SelectorChecker::matchSelectorList):
* css/SelectorChecker.h:
(WebCore::SelectorChecker::MatchResult::matches):
(WebCore::SelectorChecker::MatchResult::updateWithMatchType):
(WebCore::SelectorChecker::MatchResult::fails):
* cssjit/SelectorCompiler.cpp:
(WebCore::SelectorCompiler::addPseudoClassType):
(WebCore::SelectorCompiler::SelectorCodeGenerator::SelectorCodeGenerator):
(WebCore::SelectorCompiler::constructFragments):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementHasPseudoElement):
* rendering/style/RenderStyle.h:
(WebCore::RenderStyle::setHasPseudoStyles):
* rendering/style/RenderStyleConstants.h:
(WebCore::PseudoIdSet::PseudoIdSet):
(WebCore::PseudoIdSet::fromMask):
(WebCore::PseudoIdSet::has):
(WebCore::PseudoIdSet::add):
(WebCore::PseudoIdSet::merge):
(WebCore::PseudoIdSet::operator &):
(WebCore::PseudoIdSet::operator |):
(WebCore::PseudoIdSet::operator bool):
(WebCore::PseudoIdSet::data):
2014-11-10 Chris Dumez <cdumez@apple.com>
Lazily create HTMLInputElement's inputType and shadow subtree
https://bugs.webkit.org/show_bug.cgi?id=138524
Reviewed by Ryosuke Niwa.
When an HTMLInputElement was created by the parser, we would first call
HTMLInputElement::create(), then call Element::parserSetAttributes() on
the constructed input. With the previous implementation, this was a bit
inefficient because HTMLInputElement::create() would construct a
TextInputType inputType (as this is the default) as well as its
corresponding shadow subtree. Then, parserSetAttributes() would often
set the |type| attribute and would need to destroy this input type as
well as its subtree if the new |type| is not 'text', to create a new
inputType / shadow subtree of the right type. The profiler showed that
this was fairly expensive.
To improve this, this patch delays the inputType / shadow subtree
creation when the HTMLInputElement is constructed by the parser, until
the attributes are actually set by the parser. This way, we directly
create an inputType / shadow subtree of the right type.
I see a 1.4% speed up on speedometer (73.95 -> 75.0).
No new tests, no behavior change.
* dom/Element.cpp:
(WebCore::Element::parserSetAttributes):
(WebCore::Element::parserDidFinishParsingAttributes):
* dom/Element.h:
* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::HTMLInputElement):
(WebCore::HTMLInputElement::create):
(WebCore::HTMLInputElement::updateType):
(WebCore::HTMLInputElement::runPostTypeUpdateTasks):
(WebCore::HTMLInputElement::ensureInputType):
(WebCore::HTMLInputElement::parseAttribute):
(WebCore::HTMLInputElement::parserDidFinishParsingAttributes):
* html/HTMLInputElement.h:
2014-11-10 Benjamin Poulain <bpoulain@apple.com>
Add parsing support for the extended :nth-last-child(An+B of selector-list) defined
https://bugs.webkit.org/show_bug.cgi?id=138520
Reviewed by Andreas Kling.
Add parsing for :nth-last-child(An+B of selector-list). The selector is defined
in CSS Selectors Level 4: http://dev.w3.org/csswg/selectors4/#the-nth-last-child-pseudo
Tests: fast/css/parsing-css-nth-last-child-of-1.html
fast/css/parsing-css-nth-last-child-of-2.html
fast/css/parsing-css-nth-last-child-of-3.html
fast/css/parsing-css-nth-last-child-of-4.html
* css/CSSGrammar.y.in:
* css/CSSParser.cpp:
(WebCore::CSSParser::detectFunctionTypeToken):
* css/CSSSelector.cpp:
(WebCore::CSSSelector::selectorText):
2014-11-10 Said Abou-Hallawa <sabouhallawa@apple.com>
SVG foreign objects do not inherit the container coordinates system if they are repainted.
https://bugs.webkit.org/show_bug.cgi?id=138481.
Reviewed by Simon Fraser.
If a foreign object is included in an SVG, it should inherit the coordinates system
of the container if it is repainted. The foreign object is actually redrawn in the
CSS coordinates system regardless of the transformation that may be applied to the
container.
The bug is RenderSVG* classes use computeFloatRectForRepaint(), but the rest of the
render classes use computeRectForRepaint(). RenderSVGForeignObject::computeRectForRepaint()
was not defined, so we end up hitting RenderObject::computeRectForRepaint() for
a RenderSVGTransformableContainer and completely miss the transform.
Tests: svg/transforms/svg-transform-foreign-object-repaint.html
Implement RenderSVGForeignObject::computeRectForRepaint() so we can apply the
container transformation on the SVG foreign object repaint rectangle.
* rendering/svg/RenderSVGForeignObject.cpp:
(WebCore::RenderSVGForeignObject::computeRectForRepaint):
* rendering/svg/RenderSVGForeignObject.h:
2014-11-10 Gyuyoung Kim <gyuyoung.kim@samsung.com>
Use std::unique_ptr<> and std::make_unique<> in WebCore
https://bugs.webkit.org/show_bug.cgi?id=138560
Reviewed by Chris Dumez.
Clean up unused OwnPtr.h and PassOwnPtr.h and use std::unique_ptr.
No new tests, no behavior changes.
* Modules/encryptedmedia/CDMPrivateMediaPlayer.h:
* dom/ContainerNode.h:
* dom/ElementIteratorAssertions.h:
(WebCore::ElementIteratorAssertions::ElementIteratorAssertions):
* dom/ElementRareData.h:
* page/DragController.h:
* rendering/RenderView.h:
2014-11-10 Beth Dakin <bdakin@apple.com>
WK1: Support default actions for editable text with misspelled word
https://bugs.webkit.org/show_bug.cgi?id=138590
-and corresponding-
rdar://problem/18877506
Reviewed by Tim Horton.
* WebCore.exp.in:
2014-11-10 Chris Dumez <cdumez@apple.com>
Remove unnecessary null check in FrameSelection::nodeWillBeRemoved()
https://bugs.webkit.org/show_bug.cgi?id=138578
Reviewed by Andreas Kling.
Remove unnecessary null check in FrameSelection::nodeWillBeRemoved()
and turn the argument into a reference to make it clear it cannot be
null.
No new tests, no behavior change.
* dom/ContainerNode.cpp:
(WebCore::ContainerNode::willRemoveChild):
* dom/Document.cpp:
(WebCore::Document::nodeChildrenWillBeRemoved):
(WebCore::Document::nodeWillBeRemoved):
* dom/Document.h:
* dom/NodeIterator.cpp:
(WebCore::NodeIterator::nodeWillBeRemoved):
(WebCore::NodeIterator::updateForNodeRemoval):
* dom/NodeIterator.h:
* dom/Range.cpp:
(WebCore::Range::insertNode):
(WebCore::boundaryNodeWillBeRemoved):
(WebCore::Range::nodeWillBeRemoved):
* dom/Range.h:
* dom/RangeBoundaryPoint.h:
(WebCore::RangeBoundaryPoint::setToBeforeChild):
* editing/CompositeEditCommand.cpp:
(WebCore::CompositeEditCommand::updatePositionForNodeRemovalPreservingChildren):
* editing/CompositeEditCommand.h:
* editing/DeleteSelectionCommand.cpp:
(WebCore::DeleteSelectionCommand::removeNode):
(WebCore::DeleteSelectionCommand::handleGeneralDelete):
(WebCore::DeleteSelectionCommand::removeRedundantBlocks):
* editing/FrameSelection.cpp:
(WebCore::removingNodeRemovesPosition):
(WebCore::DragCaretController::nodeWillBeRemoved):
(WebCore::FrameSelection::nodeWillBeRemoved):
(WebCore::FrameSelection::respondToNodeModification):
* editing/FrameSelection.h:
* editing/ReplaceSelectionCommand.cpp:
(WebCore::ReplaceSelectionCommand::mergeTextNodesAroundPosition):
* editing/htmlediting.cpp:
(WebCore::updatePositionForNodeRemoval):
* editing/htmlediting.h:
* page/EventHandler.cpp:
(WebCore::EventHandler::nodeWillBeRemoved):
* page/EventHandler.h:
2014-11-10 Benjamin Poulain <bpoulain@apple.com>
Fix the build when CSS Selectors Level 4 is disabled
https://bugs.webkit.org/show_bug.cgi?id=138533
* css/CSSSelector.cpp:
(WebCore::appendArgumentList):
* cssjit/SelectorCompiler.cpp:
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementLinkMatching):
2014-11-10 Chris Dumez <cdumez@apple.com>
Support throttling of DOMTimers using nested setTimeout() calls
https://bugs.webkit.org/show_bug.cgi?id=138262
Reviewed by Gavin Barraclough.
Extend DOMTimers throttling support to timers that are using nested
setTimeout() calls instead of a setInterval(). To achieve this, this
patch introduces a NestedTimersMap singleton class where nested timers
are added, and for which we potentially update the next firing time,
after the parent timer is done executing.
I have verified this helps on ebay.com for example, which has timers
interacting with non-visible plugins that are scheduled using nested
setTimeout() calls with a frequency of 150 / 200 ms.
This is a second take on r175441, which caused intermittent crashes.
This time, nested timers are removed from the NestedTimersMap when
DOMTimer::removeById() is called. It would be unsafe to use the nested
timer afterwards because we don't hold a strong reference to it and
the ScriptExecutionContext is unref'ing the DOMTimer when
ScriptExecutionContext::removeTimeout() is called from
DOMTimer::removeById().
* page/DOMTimer.cpp:
(WebCore::NestedTimersMap::NestedTimersMap):
(WebCore::NestedTimersMap::~NestedTimersMap):
(WebCore::NestedTimersMap::add):
(WebCore::NestedTimersMap::remove):
(WebCore::NestedTimersMap::begin):
(WebCore::NestedTimersMap::end):
(WebCore::DOMTimer::install):
(WebCore::DOMTimer::removeById):
(WebCore::DOMTimer::fired):
2014-11-10 Jer Noble <jer.noble@apple.com>
[EME][Mac] Add a systemCode to distinguish when no expired sessions were found in response to a "keyrelease" message.
https://bugs.webkit.org/show_bug.cgi?id=138199
Reviewed by Eric Carlson.
Clients may want to be able to distinguish between cases where expired session data is not supported, and when
those data are supported, but none are found.
* platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.mm:
(WebCore::CDMSessionMediaSourceAVFObjC::generateKeyReleaseMessage):
2014-11-04 Jer Noble <jer.noble@apple.com>
REGRESSION(r174823): Several tests fail due to canplaythrough firing before tracks are available
https://bugs.webkit.org/show_bug.cgi?id=137882
Reviewed by Eric Carlson.
For HLS streams with only one video, audio, or text track, there will be no media selection group
for that media characteristic. When culling out AVPlayerItemTracks in tracksDidChange(), do not skip
tracks for which there is no matching AVMediaSelectionGroup.
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::hasLoadedMediaSelectionGroups): Refactored.
(WebCore::MediaPlayerPrivateAVFoundationObjC::safeMediaSelectionGroupForLegibleMedia): Call above.
(WebCore::MediaPlayerPrivateAVFoundationObjC::safeMediaSelectionGroupForAudibleMedia): Ditto.
(WebCore::MediaPlayerPrivateAVFoundationObjC::safeMediaSelectionGroupForVisualMedia): Ditto.
(WebCore::MediaPlayerPrivateAVFoundationObjC::tracksDidChange):
2014-11-10 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r175813.
https://bugs.webkit.org/show_bug.cgi?id=138573
Breaks complex text layout spacing (Requested by litherum on
#webkit).
Reverted changeset:
"[OSX] Some words are placed on top of each other in complex
text layout"
https://bugs.webkit.org/show_bug.cgi?id=138348
http://trac.webkit.org/changeset/175813
2014-11-10 Beth Dakin <bdakin@apple.com>
Rolling out failed build fix
http://trac.webkit.org/changeset/175819
* WebCore.exp.in:
2014-11-10 Beth Dakin <bdakin@apple.com>
Speculative build fix.
* WebCore.exp.in:
2014-11-10 Beth Dakin <bdakin@apple.com>
Speculative build fix.
* WebCore.exp.in:
2014-11-10 Simon Fraser <simon.fraser@apple.com>
[iOS WK2] Layers with negative z position disapear behind the page tiles
https://bugs.webkit.org/show_bug.cgi?id=138571
rdar://problem/18873480
Reviewed by Dean Jackson.
Some crufty iOS-only code in RenderLayerBacking::parentForSublayers() caused us to fail
to use the m_childContainmentLayer as the ancestor for descendants, so layers with
negative z position would get depth-sorted behind the tiles.
Fix by removing that code.
This should have been detected by compositing/tile-cache-must-flatten.html, but
testing infrastructure suck prevented us from doing so.
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::parentForSublayers):
* rendering/RenderLayerBacking.h: Just some nullptr cleanup.
2014-11-10 Chris Dumez <cdumez@apple.com>
Move 'resize' CSS property to the new StyleBuilder
https://bugs.webkit.org/show_bug.cgi?id=138550
Reviewed by Andreas Kling.
No new tests, no behavior change.
Move 'resize' CSS property from DeprecatedStyleBuilder to the new
StyleBuilder by adding a new 'Resize' Converter function.
* css/CSSPropertyNames.in:
* css/DeprecatedStyleBuilder.cpp:
(WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
(WebCore::ApplyPropertyResize::applyValue): Deleted.
(WebCore::ApplyPropertyResize::createHandler): Deleted.
* css/StyleBuilderConverter.h:
(WebCore::StyleBuilderConverter::convertResize):
2014-11-10 Beth Dakin <bdakin@apple.com>
Speculative build fix.
* editing/DictionaryLookup.h:
* editing/DictionaryLookup.mm:
2014-11-10 Chris Dumez <cdumez@apple.com>
Move 'text-indent' CSS property to the new StyleBuilder
https://bugs.webkit.org/show_bug.cgi?id=138547
Reviewed by Andreas Kling.
Move 'text-indent' CSS property from DeprecatedStyleBuilder to the new
StyleBuilder, by using custom code.
No new tests, no behavior change.
* css/CSSPropertyNames.in:
* css/DeprecatedStyleBuilder.cpp:
(WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
(WebCore::ApplyPropertyTextIndent::applyInheritValue): Deleted.
(WebCore::ApplyPropertyTextIndent::applyInitialValue): Deleted.
(WebCore::ApplyPropertyTextIndent::applyValue): Deleted.
(WebCore::ApplyPropertyTextIndent::createHandler): Deleted.
* css/StyleBuilderConverter.h:
* css/StyleBuilderCustom.h:
(WebCore::StyleBuilderFunctions::applyInheritTextIndent):
(WebCore::StyleBuilderFunctions::applyInitialTextIndent):
(WebCore::StyleBuilderFunctions::applyValueTextIndent):
2014-11-10 Beth Dakin <bdakin@apple.com>
WK1: Support default actions for read-only text
https://bugs.webkit.org/show_bug.cgi?id=138552
-and corresponding-
rdar://problem/18877483
Reviewed by Tim Horton.
WK1 now needs to do a lot of dictionary lookup operations that it did not
previously have to handle. So this patch takes a lot of that functionality, which
was implemented as static functions in WebPageMac for WK2 and moves it into
WebCore.
* WebCore.exp.in:
* WebCore.xcodeproj/project.pbxproj:
* editing/DictionaryLookup.h: Added.
* editing/DictionaryLookup.mm: Added.
(WebCore::isPositionInRange):
(WebCore::shouldUseSelection):
(WebCore::rangeExpandedAroundPositionByCharacters):
(WebCore::rangeForDictionaryLookupForSelection):
(WebCore::rangeForDictionaryLookupAtHitTestResult):
* platform/mac/WebCoreSystemInterface.h:
* platform/mac/WebCoreSystemInterface.mm:
2014-11-10 Myles C. Maxfield <mmaxfield@apple.com>
[OSX] Some words are placed on top of each other in complex text layout
https://bugs.webkit.org/show_bug.cgi?id=138348
Reviewed by Simon Fraser.
Some complex text layouts have lots of diacritics being placed all over the place.
CoreText sometimes compensates for this by adjusting the advances of the glyphs
throughout the string to make glyphs appear in the correct place. This means that
we can't naively cache the width of a space character; instead, we must obey
CoreText when it gives us an advance for a space.
Test: fast/text/large-space-width-complex.html
* platform/graphics/mac/ComplexTextController.cpp:
(WebCore::ComplexTextController::adjustGlyphsAndAdvances):
2014-11-10 Eric Carlson <eric.carlson@apple.com>
[iOS] wireless playback placeholder UI doesn't always draw
https://bugs.webkit.org/show_bug.cgi?id=138548
While it is important to only listen for the 'webkitplaybacktargetavailabilitychanged' event
when we are displaying inline controls because listening for it increases power consumption,
we should always listen for the 'webkitcurrentplaybacktargetiswirelesschanged' event because
it controls whether or not we draw the placeholder UI which is always visible during wireless
playback.
Reviewed by Brent Fulgham.
* Modules/mediacontrols/mediaControlsiOS.js:
(ControllerIOS.prototype.addVideoListeners): Always listen for the
'webkitcurrentplaybacktargetiswirelesschanged' event.
(ControllerIOS.prototype.removeVideoListeners): Always stop listening for the
'webkitcurrentplaybacktargetiswirelesschanged' event.
(ControllerIOS.prototype.handleStartPlaybackButtonTouchEnd): Call updateControls so we update
the type of controls rendered and start listening for wireless target changes immediately.
(ControllerIOS.prototype.setShouldListenForPlaybackTargetAvailabilityEvent): Don't start and stop
listening for 'webkitcurrentplaybacktargetiswirelesschanged', we should always listen for it.
2014-11-10 Csaba Osztrogonác <ossy@webkit.org>
Crash in WebCore::Node::getFlag
https://bugs.webkit.org/show_bug.cgi?id=137961
Reviewed by Antti Koivisto.
* editing/ApplyStyleCommand.cpp:
(WebCore::ApplyStyleCommand::applyBlockStyle): Null pointer check added.
2014-11-10 Mihnea Ovidenie <mihnea@adobe.com>
ASSERTION FAILED: !object || !object->parent()->isRuby() || is<RenderRubyRun>(*object) || (object->isInline() && (object->isBeforeContent() || object->isAfterContent())) || (object->isAnonymous() && ... ) in WebCore::isAnonymousRubyInlineBlock
https://bugs.webkit.org/show_bug.cgi?id=137958
Reviewed by Chris Dumez.
When a ruby element, with block behavior, dynamically changes its style
from multicol to without multicol, we have to remove its special children,
RenderMultiColumnFlowThread and RenderMultiColumnSet, the normal way using
the method in RenderBlockFlow base class. This patch adds both
RenderMultiColumnFlowThread and RenderMultiColumnSet to the list of RenderRuby
children removed normally and adds a new function - isRubyChildForNormalRemove -
to test the condition and use it in the assertion in RenderRuby*::removeChild
method.
Test: fast/multicol/newmulticol/ruby-from-multicol-to-auto.html
* rendering/RenderRuby.cpp:
(WebCore::isRubyChildForNormalRemove):
(WebCore::RenderRubyAsInline::removeChild):
(WebCore::RenderRubyAsBlock::removeChild):
2014-11-09 Gyuyoung Kim <gyuyoung.kim@samsung.com>
[EFL] Remove GamepadDeviceEfl::create()
https://bugs.webkit.org/show_bug.cgi?id=138553
Reviewed by Darin Adler.
As a step to use std::unique_ptr<> and std::make_unique<>, this patch removes GamepadDeviceEfl::create().
Instead we use std::make_unique<>.
No new tests, no behavior changes.
* platform/efl/GamepadsEfl.cpp:
(WebCore::GamepadsEfl::registerDevice):
(WebCore::GamepadDeviceEfl::create): Deleted.
(WebCore::GamepadsEfl::unregisterDevice): Deleted.
2014-11-09 Gyuyoung Kim <gyuyoung.kim@samsung.com>
Remove create() factory function in FooAnimationValue classes
https://bugs.webkit.org/show_bug.cgi?id=138206
Reviewed by Darin Adler.
As a step to use std::unique_ptr and std::make_unique, this patch removes create()
factory function in FooAnimationValue classes. As this changes, FooAnimationValue::create()
are changed to std::make_unique<>.
No new tests, no behavior changes.
* platform/graphics/GraphicsLayer.cpp:
(WebCore::KeyframeValueList::insert):
* platform/graphics/GraphicsLayer.h:
(WebCore::FloatAnimationValue::FloatAnimationValue):
(WebCore::TransformAnimationValue::TransformAnimationValue):
(WebCore::FilterAnimationValue::FilterAnimationValue):
(WebCore::FloatAnimationValue::create): Deleted.
(WebCore::TransformAnimationValue::create): Deleted.
(WebCore::FilterAnimationValue::create): Deleted.
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::startAnimation):
(WebCore::RenderLayerBacking::startTransition):
2014-11-09 Chris Dumez <cdumez@apple.com>
Add a more correct way to compare floating point numbers and use it
https://bugs.webkit.org/show_bug.cgi?id=138527
Reviewed by Darin Adler.
Use the new WTF::areEssentuallyEqual() utility function from MathExtras.h
to compare floating-point numbers.
No new tests, no behavior change.
* page/DOMTimer.cpp:
(WebCore::DOMTimer::updateTimerIntervalIfNecessary):
* platform/graphics/FloatQuad.cpp:
(WebCore::FloatQuad::isRectilinear):
* platform/graphics/FloatRoundedRect.cpp:
(WebCore::FloatRoundedRect::Radii::isUniformCornerRadius):
* platform/graphics/FloatSize.h:
(WebCore::areEssentiallyEqual):
(WebCore::withinEpsilon): Deleted.
2014-11-08 Simon Fraser <simon.fraser@apple.com>
Implement round-rect clipping on video elements
https://bugs.webkit.org/show_bug.cgi?id=138537
rdar://problem/9534399
Reviewed by Darin Adler.
Support border-radius on video and other layers with composited contents,
by pushing a FloatRoundedRect onto the GraphicsLayer as the contentsClippingRect,
and, on Mac, using layer corner-radius or a CAShapeLayer mask.
Test: compositing/video/video-border-radius.html
* WebCore.exp.in:
* platform/graphics/FloatRoundedRect.cpp:
(WebCore::FloatRoundedRect::Radii::isUniformCornerRadius): Returns true if all
corner radii are the same, and have equal widths and heights.
* platform/graphics/FloatRoundedRect.h: Allow construction without an explicit
rect.
* platform/graphics/GraphicsLayer.cpp:
(WebCore::GraphicsLayer::GraphicsLayer): nullptr goodness.
(showGraphicsLayerTree): Print contents layers when debugging.
* platform/graphics/GraphicsLayer.h:
(WebCore::GraphicsLayer::contentsClippingRect): Make this take a FloatRoundedRect.
(WebCore::GraphicsLayer::setContentsClippingRect):
* platform/graphics/ca/GraphicsLayerCA.cpp:
(WebCore::GraphicsLayerCA::setContentsClippingRect):
(WebCore::GraphicsLayerCA::setContentsToSolidColor):
(WebCore::GraphicsLayerCA::setContentsToImage):
(WebCore::GraphicsLayerCA::setContentsToPlatformLayer):
(WebCore::GraphicsLayerCA::commitLayerChangesBeforeSublayers):
(WebCore::GraphicsLayerCA::updateClippingStrategy): Determines whether we can simply
use corner-radius on the existing contentsClippingLayer, or whether we have to
create a shape layer to use as a mask.
(WebCore::GraphicsLayerCA::updateContentsRects): We have to add/remove the shape layer
based on the rounded rect radii. Calls updateClippingStrategy() on the clipping layer,
and also updates clones accordingly.
(WebCore::dumpInnerLayer):
(WebCore::GraphicsLayerCA::dumpAdditionalProperties): Dump all the inner layers
(requiring on test rebaseline), including the new shape and backdrop layers.
* platform/graphics/ca/GraphicsLayerCA.h:
* platform/graphics/ca/PlatformCALayer.h: Add a new shape layer type.
* platform/graphics/ca/mac/PlatformCALayerMac.h: Support for corner radius and
a rounded rect shape mask.
* platform/graphics/ca/mac/PlatformCALayerMac.mm:
(PlatformCALayerMac::PlatformCALayerMac):
(PlatformCALayerMac::clone):
(PlatformCALayerMac::setMask):
(PlatformCALayerMac::cornerRadius):
(PlatformCALayerMac::setCornerRadius):
(PlatformCALayerMac::shapeRoundedRect):
(PlatformCALayerMac::setShapeRoundedRect):
* platform/graphics/ca/win/PlatformCALayerWin.cpp:
(PlatformCALayerWin::cornerRadius):
(PlatformCALayerWin::setCornerRadius):
(PlatformCALayerWin::shapeRoundedRect):
(PlatformCALayerWin::setShapeRoundedRect):
* platform/graphics/ca/win/PlatformCALayerWin.h:
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::resetContentsRect): Use getRoundedInnerBorderFor() to get
the rounded rect used to clip contents.
(WebCore::RenderLayerBacking::positionOverflowControlsLayers): Push a FloatRoundedRect for the contents clip,
(WebCore::RenderLayerBacking::updateDirectlyCompositedBackgroundColor): Ditto.
(WebCore::RenderLayerBacking::updateDirectlyCompositedBackgroundImage): Ditto.
(WebCore::RenderLayerBacking::updateImageContents): Get the rounded rect clip.
* rendering/RenderLayerBacking.h: nullptr.
2014-11-09 Darin Adler <darin@apple.com>
Fix various cases of incorrect cross-thread capture of non-thread-safe RefCounted
https://bugs.webkit.org/show_bug.cgi?id=138539
Reviewed by Alexey Proskuryakov.
* Modules/websockets/WorkerThreadableWebSocketChannel.cpp:
(WebCore::WorkerThreadableWebSocketChannel::Peer::didConnect): Use StringCapture
instead of isolatedCopy, to avoid a problem where the original thread does its deref
after passing the string to the other thread.
(WebCore::WorkerThreadableWebSocketChannel::Peer::didReceiveMessage): Ditto.
(WebCore::WorkerThreadableWebSocketChannel::Peer::didClose): Ditto.
(WebCore::WorkerThreadableWebSocketChannel::Bridge::initialize): Ditto.
(WebCore::WorkerThreadableWebSocketChannel::Bridge::connect): Ditto.
(WebCore::WorkerThreadableWebSocketChannel::Bridge::send): Ditto.
(WebCore::WorkerThreadableWebSocketChannel::Bridge::close): Ditto.
(WebCore::WorkerThreadableWebSocketChannel::Bridge::fail): Ditto.
* dom/Document.cpp:
(WebCore::Document::addConsoleMessage): Pass a StringCapture when creating
AddConsoleMessageTask. Same reason as above, but in a different context.
(WebCore::Document::addMessage): Ditto.
* dom/ScriptExecutionContext.h: Changed AddConsoleMessageTask to take and
capture a StringCapture rather than a String, for the same reason as above.
* fileapi/AsyncFileStream.cpp:
(WebCore::AsyncFileStream::write): Use URLCapture instead of trying to use
StringCapture on a URL, since that doesn't preserve the validity flag.
* loader/WorkerThreadableLoader.cpp:
(WebCore::WorkerThreadableLoader::MainThreadBridge::MainThreadBridge): Use StringCapture.
(WebCore::WorkerThreadableLoader::MainThreadBridge::didFail): Ditto.
(WebCore::WorkerThreadableLoader::MainThreadBridge::didFailAccessControlCheck): Ditto.
* platform/URL.h: Added URLCapture.
* platform/network/FormData.cpp:
(WebCore::appendBlobResolved): Remove incorrect pointless code that creates a new URL
from an existing URL with the ParsedURLString constructor.
* workers/DefaultSharedWorkerRepository.cpp: Fixed code that was trying to copy a URL
by copying a string to instead just use URL::copy. The comment claimed that URL::copy
is not thread safe, but that claim is incorrect.
(WebCore::SharedWorkerProxy::postExceptionToWorkerObject): Use StringCapture.
(WebCore::SharedWorkerProxy::postConsoleMessageToWorkerObject): Ditto.
(WebCore::DefaultSharedWorkerRepository::getProxy): Use URL::copy.
* workers/WorkerGlobalScope.cpp:
(WebCore::WorkerGlobalScope::addConsoleMessage): Use StringCapture.
(WebCore::WorkerGlobalScope::addMessage): Ditto.
* workers/WorkerMessagingProxy.cpp:
(WebCore::WorkerMessagingProxy::postExceptionToWorkerObject): Ditto.
(WebCore::WorkerMessagingProxy::postConsoleMessageToWorkerObject): Ditto.
(WebCore::WorkerMessagingProxy::sendMessageToInspector): Ditto.
(WebCore::WorkerMessagingProxy::postMessageToPageInspector): Ditto.
* workers/WorkerRunLoop.cpp:
(WebCore::WorkerRunLoop::postTaskAndTerminate): Make a Task with make_unique
rather than with Task::create. Removed an extra isolatedCopy, unneeded because
the Task constructor already does an isolatedCopy.
(WebCore::WorkerRunLoop::postTaskForMode): Ditto.
(WebCore::WorkerRunLoop::Task::create): Deleted.
* workers/WorkerRunLoop.h: Removed unneeded create function and explicit
public empty destructor.
2014-11-09 Chris Dumez <cdumez@apple.com>
Use is<>() / downcast<>() for HTMLCollection subclasses
https://bugs.webkit.org/show_bug.cgi?id=138541
Reviewed by Sam Weinig.
Use is<>() / downcast<>() for HTMLCollection subclasses for
safety and consistency with the rest of the code base.
No new tests, no behavior change.
* bindings/gobject/WebKitDOMPrivate.cpp:
(WebKit::wrap):
* html/HTMLAllCollection.h:
* html/HTMLCollection.cpp:
(WebCore::isMatchingHTMLElement):
(WebCore::isMatchingElement):
* html/HTMLCollection.h:
* html/HTMLFormControlsCollection.h:
* html/HTMLNameCollection.h:
* html/HTMLOptionsCollection.h:
* html/HTMLSelectElement.cpp:
(WebCore::HTMLSelectElement::options):
* html/HTMLTableRowsCollection.h:
2014-11-08 Chris Dumez <cdumez@apple.com>
Call faster HTMLElement::hasTagName() in HTMLCollection
https://bugs.webkit.org/show_bug.cgi?id=138529
Reviewed by Darin Adler.
Call faster HTMLElement::hasTagName() in HTMLCollection instead of
slower Node::hasTagName() by restructuring the code a bit to
distinguish collection that deal only with HTMLElements from others.
No new tests, no behavior change.
* html/HTMLCollection.cpp:
(WebCore::isMatchingHTMLElement):
(WebCore::isMatchingElement):
2014-11-08 Chris Dumez <cdumez@apple.com>
Move isEmptyValue() logic from HTMLInputElement to TextFieldInputType
https://bugs.webkit.org/show_bug.cgi?id=138538
Reviewed by Darin Adler.
Move isEmptyValue() logic from HTMLInputElement to TextFieldInputType
as this only makes sense for text field input types.
No new tests, no behavior change.
* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::isEmptyValue):
* html/InputType.cpp:
(WebCore::InputType::isEmptyValue):
* html/InputType.h:
* html/TextFieldInputType.cpp:
(WebCore::TextFieldInputType::isEmptyValue):
* html/TextFieldInputType.h:
2014-11-08 Darin Adler <darin@apple.com>
Replace FileThread class with a single function
https://bugs.webkit.org/show_bug.cgi?id=138282
Reviewed by Alexey Proskuryakov.
* CMakeLists.txt: Removed FileThread.cpp.
* WebCore.vcxproj/WebCore.vcxproj: Removed FileThread.cpp/.h.
* WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.
* WebCore.xcodeproj/project.pbxproj: Ditto.
* bindings/generic/ActiveDOMCallback.cpp: Removed unneeded includes.
* dom/ActiveDOMObject.cpp: Ditto.
* fileapi/AsyncFileStream.cpp:
(WebCore::callOnFileThread): Added. Implements the file thread.
(WebCore::AsyncFileStream::AsyncFileStream): Take a reference to the client.
Make m_internals. Use the destroyed flag instead of trickier techniques to
handle stopping. Once the stream is destroyed, there will be no further callbacks.
(WebCore::AsyncFileStream::~AsyncFileStream): Added assertions and merged in the
stop behavior here. This class no longer requires an explicit stop function.
(WebCore::AsyncFileStream::perform): Added. Helper used for all the operations
below. Takes a function that performs an operation and then returns a client
callback function. Respects the m_stopped boolean on the file thread (so we
don't do extra operations) and on the client thread (so we are guaranteed not
to get any client callbacks even if the file thread was partway through an
operation).
(WebCore::AsyncFileStream::getSize): Changed to use the perform function.
(WebCore::AsyncFileStream::openForRead): Ditto. Also fixed reference count
thread safety issue by capturing a StringCapture rather than a String.
(WebCore::AsyncFileStream::openForWrite): Ditto.
(WebCore::AsyncFileStream::close): Changed to use callOnFileThread.
(WebCore::AsyncFileStream::read): Changed to use the perform function.
(WebCore::AsyncFileStream::write): Ditto. Also fixed reference count
thread safety issue by capturing a StringCapture rather than a URL.
(WebCore::AsyncFileStream::truncate): Ditto.
* fileapi/AsyncFileStream.h: Removed use of RefCounted since we only need
single ownership. Removed the stop function, since we can now stop when
the stream is destroyed since we have single ownership. Made a new Internals
object to handle destruction while operations are still going on the file thread.
* fileapi/FileThread.cpp: Removed.
* fileapi/FileThread.h: Removed.
* loader/ResourceLoader.cpp: Removed unneeded include.
* platform/FileStream.cpp:
(WebCore::FileStream::~FileStream): Merged the stop function in here.
* platform/FileStream.h: Removed use of RefCounted since we only need
single ownership. Removed the empty start function. Removed the stop function,
since we can now stop when the stream is destroyed since we have single ownership.
* platform/FileStreamClient.h: Removed unneeded didStart and didStop.
* platform/network/BlobResourceHandle.cpp:
(WebCore::BlobResourceHandle::BlobResourceHandle): Use make_unique to make the
stream objects instead of custom create functions.
(WebCore::BlobResourceHandle::~BlobResourceHandle): Removed now-unneeded code
to call stop functions. Destroying the objects now takes care of the this, and
that's done by the unique_ptrs.
(WebCore::BlobResourceHandle::cancel): Removed the rest of the code to stop the
m_asyncStream, keeping only the code that sets it to null. That now stops the
stream by destroying it.
* platform/network/BlobResourceHandle.h: Use std::unique_ptr rather than
RefPtr for the file stream objects.
* storage/StorageThread.h: Tweaked formatting of std::function<void()> to
match the format used elsewhere in WebKit.
2014-11-08 Simon Fraser <simon.fraser@apple.com>
Don't try to schedule a GraphicsLayer flush when propagating changes to replicas inside a flush
https://bugs.webkit.org/show_bug.cgi?id=138532
Reviewed by Dan Bernstein.
When changing masks on replica layers with certain layer configurations,
it was possible to hit an assertion that a flush was being scheduled when already
flushing, via propagateLayerChangeToReplicas(). Fix by passing the scheduleFlush
flag along.
Not testable with current GraphicsLayer configurations.
* platform/graphics/ca/GraphicsLayerCA.cpp:
* platform/graphics/ca/GraphicsLayerCA.h:
2014-11-08 Beth Dakin <bdakin@apple.com>
Implement action menu support for videos
https://bugs.webkit.org/show_bug.cgi?id=138534
-and corresponding-
rdar://problem/18742164
Reviewed by Tim Horton.
Export needed symbols and added not-yet-implemented
HitTestResult::isMediaThatCanBeDownloaded() so that action menus will work as
expected once it is implemented.
* WebCore.exp.in:
* rendering/HitTestResult.cpp:
(WebCore::HitTestResult::isMediaThatCanBeDownloaded):
* rendering/HitTestResult.h:
2014-11-08 Chris Dumez <cdumez@apple.com>
Speed up HTMLInputElement::isEmptyValue()
https://bugs.webkit.org/show_bug.cgi?id=138515
Reviewed by Geoffrey Garen.
HTMLInputElement::isEmptyValue() was calling
HTMLTextFormControlElement::innerTextValue() which causes a full
subtree traversal to construct a string representation of that subtree
using a StringBuilder. In the case of HTMLInputElement::isEmptyValue(),
we don't have to do all this: We don't need to construct a String
and we can return false as soon as we find a non-empty descendant.
No new tests, no behavior change.
* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::isEmptyValue):
* html/HTMLInputElement.h:
2014-11-07 Eric Carlson <eric.carlson@apple.com>
[iOS] video is sometimes allowed to play from the background
https://bugs.webkit.org/show_bug.cgi?id=138522
Reviewed by Jer Noble.
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::displayType): New.
* html/HTMLMediaElement.h:
* platform/audio/MediaSession.cpp:
(WebCore::MediaSession::isHidden): New, client passthrough.
(WebCore::MediaSession::displayType): Ditto.
* platform/audio/MediaSession.h:
(WebCore::MediaSessionClient::displayType):
* platform/audio/MediaSessionManager.cpp:
(WebCore::MediaSessionManager::sessionCanLoadMedia): New, default implementation returns
true if client is visible or playing.
* platform/audio/MediaSessionManager.h:
* platform/audio/ios/MediaSessionManagerIOS.h:
* platform/audio/ios/MediaSessionManagerIOS.mm:
(WebCore::MediaSessionManageriOS::sessionCanLoadMedia): iOS override, also allows buffering
when displaying optimized fullscreen.
2014-11-07 Benjamin Poulain <bpoulain@apple.com>
Fix the build after r175772
* inspector/InspectorCSSAgent.cpp:
(WebCore::InspectorCSSAgent::buildArrayForMatchedRuleList):
2014-11-07 Benjamin Poulain <benjamin@webkit.org>
Make the Selector's specificity part of Selector matching
https://bugs.webkit.org/show_bug.cgi?id=138486
Reviewed by Andreas Kling.
In CSS Selectors Level 4, the specificity of selectors is computed dynamically
based on which element is being matched.
For example, a selector:
:matches(#foo, .bar, baz)
has a specificity of
(1, 0, 0) on <baz id=foo class=bar>
(0, 1, 0) on <baz class=bar>
(0, 0, 1) on <baz>
Previously, the specificity of each selector was computed statically when populating
RuleSet. With more recent CSS, this gives us the wrong specificity because we do not know
how the selectors applies to the target.
This patch moves one tiny step in the direction of dynamic specificity. The specificity
is removed from RuleSet and is moved inside Selector Matching.
There is one bit worth keeping static: matching based on rule hash. This path is important
to avoid spending time compiling trivial selectors.
In order to keep rule hash matching working, the RuleData store which specificity class
the rule has in addition to the information about matching/not-matching. When going through
the fast path in ElementCollector, we compute the right specificity based on the type
of rule-hash matching.
* css/CSSSelector.cpp:
(WebCore::CSSSelector::specificityForOneSelector):
* css/CSSSelector.h:
* css/ElementRuleCollector.cpp:
(WebCore::ElementRuleCollector::addMatchedRule):
(WebCore::ElementRuleCollector::sortAndTransferMatchedRules):
(WebCore::ElementRuleCollector::ruleMatches):
(WebCore::ElementRuleCollector::collectMatchingRulesForList):
(WebCore::compareRules):
* css/ElementRuleCollector.h:
* css/RuleSet.cpp:
(WebCore::computeMatchBasedOnRuleHash):
(WebCore::RuleData::RuleData):
(WebCore::isSelectorMatchingHTMLBasedOnRuleHash): Deleted.
* css/RuleSet.h:
(WebCore::RuleData::matchBasedOnRuleHash):
(WebCore::RuleData::hasRightmostSelectorMatchingHTMLBasedOnRuleHash): Deleted.
(WebCore::RuleData::specificity): Deleted.
* css/SelectorChecker.cpp:
(WebCore::SelectorChecker::match):
* css/SelectorChecker.h:
* css/StyleResolver.h:
(WebCore::checkRegionSelector):
* cssjit/SelectorCompiler.cpp:
(WebCore::SelectorCompiler::SelectorCodeGenerator::SelectorCodeGenerator):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateSelectorChecker):
* cssjit/SelectorCompiler.h:
(WebCore::SelectorCompiler::ruleCollectorSimpleSelectorCheckerFunction):
(WebCore::SelectorCompiler::querySelectorSimpleSelectorCheckerFunction):
(WebCore::SelectorCompiler::ruleCollectorSelectorCheckerFunctionWithCheckingContext):
(WebCore::SelectorCompiler::querySelectorSelectorCheckerFunctionWithCheckingContext):
(WebCore::SelectorCompiler::simpleSelectorCheckerFunction): Deleted.
(WebCore::SelectorCompiler::selectorCheckerFunctionWithCheckingContext): Deleted.
* dom/SelectorQuery.cpp:
(WebCore::SelectorDataList::selectorMatches):
(WebCore::SelectorDataList::selectorClosest):
(WebCore::SelectorDataList::executeCompiledSimpleSelectorChecker):
(WebCore::SelectorDataList::executeCompiledSelectorCheckerWithCheckingContext):
(WebCore::SelectorDataList::executeCompiledSingleMultiSelectorData):
(WebCore::SelectorDataList::execute):
* dom/SelectorQuery.h:
2014-11-07 Alexey Proskuryakov <ap@apple.com>
CSP is enforced for eval in report-only mode on first page load
https://bugs.webkit.org/show_bug.cgi?id=138492
rdar://problem/15782525
Reviewed by Daniel Bates.
This is covered by existing tests when running as one test per process invocation.
* page/ContentSecurityPolicy.cpp:
(WebCore::CSPDirectiveList::allowEval): Allow when in report only mode. The allowEval
function itself needs to return false, because it's used in checkEvalAndReportViolation().
(WebCore::CSPDirectiveList::allowJavaScriptURLs): Apply the same fix, although it's
not changing the behavior - this function is never called with ContentSecurityPolicy::SuppressReport.
(WebCore::CSPDirectiveList::allowInlineEventHandlers): Ditto.
(WebCore::CSPDirectiveList::allowInlineScript): Ditto.
(WebCore::CSPDirectiveList::allowInlineStyle): Ditto.
(WebCore::CSPDirectiveList::allowPluginType): Ditto.
(WebCore::CSPDirectiveList::allowScriptFromSource): Ditto.
(WebCore::CSPDirectiveList::allowObjectFromSource): Ditto.
(WebCore::CSPDirectiveList::allowChildFrameFromSource): Ditto.
(WebCore::CSPDirectiveList::allowImageFromSource): Ditto.
(WebCore::CSPDirectiveList::allowStyleFromSource): Ditto.
(WebCore::CSPDirectiveList::allowFontFromSource): Ditto.
(WebCore::CSPDirectiveList::allowMediaFromSource): Ditto.
(WebCore::CSPDirectiveList::allowConnectToSource): Ditto.
(WebCore::CSPDirectiveList::allowFormAction): Ditto.
(WebCore::CSPDirectiveList::allowBaseURI): Ditto.
(WebCore::ContentSecurityPolicy::didReceiveHeader): Remove isReportOnly() check,
which is now inside allowEval().
2014-11-07 Andreas Kling <akling@apple.com>
[Mac] Avoid repainting scrollbar track when the scrollbar track is transparent.
<https://webkit.org/b/138521>
<rdar://problem/18892090>
Reviewed by Simon Fraser.
Don't bother invalidating the entire WebCore scrollbar when we've opted into
AppKit's special mode to use individual layers for scrollbar components.
NSScrollerImp will invalidate what's necessary below e.g setKnobAlpha.
* platform/mac/ScrollAnimatorMac.mm:
(-[WebScrollbarPartAnimation setCurrentProgress:]):
2014-11-07 Chris Dumez <cdumez@apple.com>
Rename HTMLInputElement::imageLoader() to ensureImageLoader()
https://bugs.webkit.org/show_bug.cgi?id=138508
Reviewed by Andreas Kling.
Rename HTMLInputElement::imageLoader() to ensureImageLoader() and have
it return a reference to make it clear that it constructs an
ImageLoader if missing.
Also introduce a lightweight imageLoader() getter which just returns
the imageLoader or null if missing.
No new tests, no behavior change.
* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::ensureImageLoader):
(WebCore::HTMLInputElement::didMoveToNewDocument):
(WebCore::HTMLInputElement::imageLoader): Deleted.
* html/HTMLInputElement.h:
(WebCore::HTMLInputElement::imageLoader):
(WebCore::HTMLInputElement::hasImageLoader): Deleted.
* html/ImageInputType.cpp:
(WebCore::ImageInputType::srcAttributeChanged):
(WebCore::ImageInputType::attach):
(WebCore::ImageInputType::height):
(WebCore::ImageInputType::width):
2014-11-07 Chris Dumez <cdumez@apple.com>
Move 'webkit-clip-path' CSS property to the new StyleBuilder
https://bugs.webkit.org/show_bug.cgi?id=138452
Reviewed by Andreas Kling.
Move 'webkit-clip-path' CSS property from DeprecatedStyleBuilder to the
new StyleBuilder so that it is now generated from CSSPropertyNames.in.
A ClipPath converter was added to support this. Custom code was avoided
by replacing if checks by assertions, relying on the CSSParser to make
sure the input is valid.
Test: fast/masking/clip-path-bad-value.html
* css/CSSPropertyNames.in:
* css/DeprecatedStyleBuilder.cpp:
(WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
(WebCore::ApplyPropertyClipPath::setValue): Deleted.
(WebCore::ApplyPropertyClipPath::applyValue): Deleted.
(WebCore::ApplyPropertyClipPath::createHandler): Deleted.
* css/StyleBuilderConverter.h:
(WebCore::StyleBuilderConverter::convertClipPath):
2014-11-07 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Pseudo element matchedCSSRules do not include matching selector info
https://bugs.webkit.org/show_bug.cgi?id=138438
Reviewed by Benjamin Poulain.
Test: inspector/css/psuedo-element-matches.html
Element::matches is not the correct API to use to check selectors with pseudo-elements.
Instead we should use the CSS Selector checking machinary which understands them.
* inspector/InspectorCSSAgent.cpp:
(WebCore::InspectorCSSAgent::getSupportedCSSProperties):
(WebCore::InspectorCSSAgent::buildArrayForRuleList):
(WebCore::InspectorCSSAgent::buildArrayForRegions):
(WebCore::InspectorCSSAgent::buildObjectForNamedFlow):
Some RefPtr release improvements.
(WebCore::InspectorCSSAgent::buildArrayForMatchedRuleList):
Use a SelectorChecker to check each Selector against the element.
This matches the SelectorChecker used when we collected the rules
for this element.
2014-11-07 Chris Dumez <cdumez@apple.com>
Drop useless HTMLElement::isURLAttribute() override
https://bugs.webkit.org/show_bug.cgi?id=138479
Reviewed by Mark Lam.
Drop useless HTMLElement::isURLAttribute() override as it is doing
nothing but calling the parent class' isURLAttribute().
No new tests, no behavior change.
* html/HTMLElement.cpp:
(WebCore::HTMLElement::isURLAttribute): Deleted.
* html/HTMLElement.h:
2014-11-07 Eric Carlson <eric.carlson@apple.com>
[iOS] Update optimized fullscreen media controls
https://bugs.webkit.org/show_bug.cgi?id=138493
Reviewed by Brent Fulgham.
* Modules/mediacontrols/MediaControlsHost.cpp:
(WebCore::MediaControlsHost::fullscreenMode): New.
(WebCore::MediaControlsHost::mediaUIImageData): New.
* Modules/mediacontrols/MediaControlsHost.h:
* Modules/mediacontrols/MediaControlsHost.idl:
* Modules/mediacontrols/mediaControlsiOS.css:
Renamed -webkit-media-controls-wireless-playback-status to -webkit-media-controls-inline-playback-placeholder
because it is now used for other inline playback status display. Add z-index:0 so the placeholder
renders above captions. Remove the background-image, it is now set from script.
(audio::-webkit-media-controls-inline-playback-placeholder):
(audio::-webkit-media-controls-inline-playback-placeholder.hidden):
(video::-webkit-media-controls-optimized-fullscreen-button):
(audio::-webkit-media-controls-wireless-playback-status): Deleted.
(audio::-webkit-media-controls-wireless-playback-status.hidden): Deleted.
(video::-webkit-media-controls-optimized-fullscreen-button:active): Deleted.
* Modules/mediacontrols/mediaControlsiOS.js:
(ControllerIOS): Set doingSetup to true around setup so we don't draw the inline controls
briefly when an element is created as a result of a user gesture.
(ControllerIOS.prototype.shouldHaveStartPlaybackButton): Don't allow inline controls during
initial setup to prevent inline controls from begin drawn briefly when a media element
is created and inserted by a script called from a user gesture.
(ControllerIOS.prototype.updateWirelessPlaybackStatus): wirelessPlaybackStatus -> inlinePlaybackPlaceholder.
(ControllerIOS.prototype.createControls): Ditto. Add style rules for optimized fullscreen button.
(ControllerIOS.prototype.configureInlineControls): Add the inlinePlaybackPlaceholder as a peer of
the inline controls compositing child instead of as a child so it renders correctly.
(ControllerIOS.prototype.addControls):
(ControllerIOS.prototype.updateControls): wirelessPlaybackStatus -> inlinePlaybackPlaceholder.
(ControllerIOS.prototype.handleWrapperTouchStart):
(ControllerIOS.prototype.get pageScaleFactor): Cleanup.
(ControllerIOS.prototype.set pageScaleFactor): Ditto.
(ControllerIOS.prototype.handleFullscreenChange): Show the placeholder.
* WebCore.exp.in: Export _wkGetMediaUIImageData.
* html/HTMLMediaElement.h:
(WebCore::HTMLMediaElement::fullscreenMode): Expose fullscreen mode.
* platform/ios/WebCoreSystemInterfaceIOS.h:
* platform/ios/WebCoreSystemInterfaceIOS.mm:
2014-11-06 Carlos Garcia Campos <cgarcia@igalia.com>
Unreviewed. Try to fix GTK build after r175719.
Rename the Timer fired function as requestAnimationTimerFired() to
avoid ambiguity.
* platform/ScrollAnimatorNone.cpp:
(WebCore::ScrollAnimatorNone::ScrollAnimatorNone):
(WebCore::ScrollAnimatorNone::requestAnimationTimerFired):
(WebCore::ScrollAnimatorNone::animationTimerFired): Deleted.
* platform/ScrollAnimatorNone.h:
2014-11-06 Chris Dumez <cdumez@apple.com>
Remove useless if check in HTMLInputElement::setValue()
https://bugs.webkit.org/show_bug.cgi?id=138485
Reviewed by Daniel Bates.
Remove useless if check in HTMLInputElement::setValue(). It was
inadvertently left in as part of r94836.
* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::setValue):
2014-11-06 Simon Fraser <simon.fraser@apple.com>
Put names on a couple of video-related CALayers
https://bugs.webkit.org/show_bug.cgi?id=138491
Reviewed by Eric Carlson.
In debug, set layer names on a couple of video-related layers to make
debugging easier.
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayerLayer):
* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::ensureLayer):
2014-11-06 Darin Adler <darin@apple.com>
REGRESSION (r175549): http/tests/multipart/stop-crash.html failing (assertion failure in CachedResource::setEncodedSize)
https://bugs.webkit.org/show_bug.cgi?id=138358
Reviewed by Alexey Proskuryakov.
* loader/cache/CachedResource.cpp:
(WebCore::CachedResource::setEncodedSize): Removed the incorrect assertion here.
The code asserts that resources only get bigger, never smaller. This is incorrect
for a multipart/mixed-replace image, where a later image that is smaller can replace
an earlier one. I don't fully understand why this assertion was not firing before,
but the relevant websites are working fine and the test otherwise passes.
* loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::subresourceLoaderFinishedLoadingOnePart): Fix another
incorrect assertion that can fire for any parts after the first one. I ran into
this while testing various websites that use multipart/mixed-replace.
2014-11-06 Jeremy Jones <jeremyj@apple.com>
Fix typo in optimized fullscreen activation.
https://bugs.webkit.org/show_bug.cgi?id=138480
Reviewed by Jer Noble.
* Modules/mediacontrols/mediaControlsiOS.js:
(ControllerIOS.prototype.handleWrapperTouchStart): fix typo doubleTouchIntervalThresholdms
(ControllerIOS.prototype.handleOptimizedFullscreenButtonClicked): fix typo isFullScreen
2014-11-06 Chris Dumez <cdumez@apple.com>
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):
2014-11-05 Jer Noble <jer.noble@apple.com>
De-templatize Timer
https://bugs.webkit.org/show_bug.cgi?id=138450
Reviewed by Anders Carlsson.
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:
2014-11-06 Yongjun Zhang <yongjun_zhang@apple.com>
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.
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.
2014-11-06 Dean Jackson <dino@apple.com>
[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.
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:
2014-11-06 Benjamin Poulain <bpoulain@apple.com>
Give pseudo elements the correct specificity
https://bugs.webkit.org/show_bug.cgi?id=138378
Reviewed by Dean Jackson.
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.
2014-11-06 Beth Dakin <bdakin@apple.com>
Preview views often misplaced inside popover
https://bugs.webkit.org/show_bug.cgi?id=138472
Reviewed by Tim Horton.
* WebCore.exp.in:
2014-11-06 Michael Saboff <msaboff@apple.com>
REGRESSION (r174985-174986): Site display disappears
https://bugs.webkit.org/show_bug.cgi?id=138082
Reviewed by Geoffrey Garen.
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:
2014-11-05 Sam Weinig <sam@webkit.org>
Use std::unique_ptr for TileController
https://bugs.webkit.org/show_bug.cgi?id=138429
Reviewed by Anders Carlsson.
* 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:
2014-11-06 Chris Dumez <cdumez@apple.com>
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:
2014-11-05 Shivakumar JM <shiva.jm@samsung.com>
splitText API does not match DOM specification.
https://bugs.webkit.org/show_bug.cgi?id=138405
Reviewed by Chris Dumez.
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:
2014-11-05 Commit Queue <commit-queue@webkit.org>
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
2014-11-04 Ada Chan <adachan@apple.com>
Figure out whether a plug-in is playing audio.
https://bugs.webkit.org/show_bug.cgi?id=137219
Reviewed by Anders Carlsson.
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:
2014-11-05 Simon Fraser <simon.fraser@apple.com>
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):
2014-11-05 Dan Bernstein <mitz@apple.com>
Tried to fix the Windows build after removing the deletion UI.
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* editing/EditingAllInOne.cpp:
2014-11-04 Dean Jackson <dino@apple.com>
[filters2] Support for backdrop-filter
https://bugs.webkit.org/show_bug.cgi?id=138384
<rdar://problem/18874494>
Reviewed by Simon Fraser.
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:
2014-11-05 Chris Dumez <cdumez@apple.com>
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):
2014-11-05 Chris Dumez <cdumez@apple.com>
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.
2014-11-05 Simon Fraser <simon.fraser@apple.com>
Avoid backing store for opacity:0 descendant layers
https://bugs.webkit.org/show_bug.cgi?id=138448
Reviewed by Dean Jackson.
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):
2014-11-05 Chris Dumez <cdumez@apple.com>
Assertion hit DOMTimer::updateTimerIntervalIfNecessary()
https://bugs.webkit.org/show_bug.cgi?id=138440
Reviewed by Geoffrey Garen.
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.
2014-11-05 Chris Fleizach <cfleizach@apple.com>
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.
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):
2014-11-05 Gyuyoung Kim <gyuyoung.kim@samsung.com>
Unreviewed, EFL build fix since r175647
* CMakeLists.txt: Remove DeleteButton.cpp and DeleteButtonController.cpp.
2014-11-05 Chris Dumez <cdumez@apple.com>
Allow constructing a PassRef from a Ref
https://bugs.webkit.org/show_bug.cgi?id=138389
Reviewed by Andreas Kling.
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):
2014-11-05 Dan Bernstein <mitz@apple.com>
Remove the unused deletion UI feature
https://bugs.webkit.org/show_bug.cgi?id=138442
Rubber-stamped by Alexey Proskuryakov.
* 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:
2014-11-04 David Hyatt <hyatt@apple.com>
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.
* 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.
2014-11-05 Andreas Kling <akling@apple.com>
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:
2014-11-05 Chris Dumez <cdumez@apple.com>
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:
2014-11-05 Chris Dumez <cdumez@apple.com>
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):
2014-11-03 Dean Jackson <dino@apple.com>
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/
* Configurations/FeatureDefines.xcconfig:
2014-11-05 Chris Dumez <cdumez@apple.com>
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):
2014-11-05 Sanghyup Lee <sh53.lee@samsung.com>
Fix build warning in SVGMarkerElement.cpp
https://bugs.webkit.org/show_bug.cgi?id=138407
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.
2014-11-05 Chris Dumez <cdumez@apple.com>
Stop special-casing the empty string in HTMLInputElement.type setter
https://bugs.webkit.org/show_bug.cgi?id=138403
Reviewed by Ryosuke Niwa.
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:
2014-11-05 peavo@outlook.com <peavo@outlook.com>
[WinCairo] Compile error, missing guard.
https://bugs.webkit.org/show_bug.cgi?id=138421
Reviewed by Brent Fulgham.
There is missing a guard for CSS_SELECTORS_LEVEL4 in CSSParserValues.cpp.
* css/CSSParserValues.cpp:
2014-11-05 Antti Koivisto <antti@apple.com>
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):
2014-11-05 Andreas Kling <akling@apple.com>
Simple line layout: support text-transform: lowercase|uppercase|capitalize
<https://webkit.org/b/138406>
Reviewed by Antti Koivisto.
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):
2014-11-05 Jer Noble <jer.noble@apple.com>
[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.
2014-11-05 Antti Koivisto <antti@apple.com>
Move HTTPHeaderMap encoding to the class
https://bugs.webkit.org/show_bug.cgi?id=138412
Reviewed by Andreas Kling.
* 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.
2014-11-04 Beth Dakin <bdakin@apple.com>
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.
* platform/spi/mac/DataDetectorsSPI.h:
2014-11-04 Chris Dumez <cdumez@apple.com>
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):
2014-11-04 Zalan Bujtas <zalan@apple.com>
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:
2014-11-04 Jeremy Jones <jeremyj@apple.com>
Fix build after r138351
https://bugs.webkit.org/show_bug.cgi?id=138401
Ureviewed. Make return type match.
* platform/ios/WebCoreSystemInterfaceIOS.mm:
2014-11-04 Tim Horton <timothy_horton@apple.com>
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.
* page/PageOverlayController.h:
Expose the list of all overlays.
2014-11-03 Jeremy Jones <jeremyj@apple.com>
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
2014-11-04 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Pause on exceptions should show the actual exception
https://bugs.webkit.org/show_bug.cgi?id=63096
Reviewed by Timothy Hatcher.
* inspector/InspectorInstrumentation.cpp:
(WebCore::InspectorInstrumentation::addMessageToConsoleImpl):
Pass assertion message on.
2014-11-04 Reza Abbasian <rabbasian@apple.com>
[iOS] Fix incorrect interface orientation that can be caused by fullscreen video dismissal.
https://bugs.webkit.org/show_bug.cgi?id=137930.
Reviewed by Jer Noble.
When a fullscreen video gets dismissed programmatically, for instance for removing
a webview from the view hierarchy, it can put the device in an incorrect orientation.
Make sure we retain the window of parentView when we attempt to go to fullscreen and use
the retained window for putting the device in correct orientation after dismissal.
* platform/ios/WebVideoFullscreenInterfaceAVKit.h:
* platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
(WebVideoFullscreenInterfaceAVKit::setupFullscreen):
(WebVideoFullscreenInterfaceAVKit::cleanupFullscreen):
(WebVideoFullscreenInterfaceAVKit::invalidate):
2014-11-04 Andreas Kling <akling@apple.com>
Remove two unused ScrollingCoordinator methods.
<https://webkit.org/b/138377>
Reviewed by Chris Dumez.
These appear to be leftovers from the now-defunct chromium port.
* page/scrolling/ScrollingCoordinator.cpp:
(WebCore::ScrollingCoordinator::horizontalScrollbarLayerForScrollableArea): Deleted.
(WebCore::ScrollingCoordinator::verticalScrollbarLayerForScrollableArea): Deleted.
* page/scrolling/ScrollingCoordinator.h:
2014-11-04 Chris Dumez <cdumez@apple.com>
Add ptr() method to Ref class
https://bugs.webkit.org/show_bug.cgi?id=138361
Reviewed by Darin Adler.
Use the new Ref::ptr() method.
No new tests, no behavior change.
* accessibility/AccessibilityMenuList.cpp:
(WebCore::AccessibilityMenuList::didUpdateActiveOption):
* bindings/js/JSHTMLAllCollectionCustom.cpp:
(WebCore::getNamedItems):
* bindings/js/JSHTMLFormControlsCollectionCustom.cpp:
(WebCore::getNamedItems):
* css/CSSStyleRule.h:
* css/CSSStyleSheet.cpp:
(WebCore::CSSStyleSheet::insertRule):
* css/CSSValueList.h:
(WebCore::CSSValueList::item):
(WebCore::CSSValueList::itemWithoutBoundsCheck):
* css/InspectorCSSOMWrappers.cpp:
(WebCore::InspectorCSSOMWrappers::collect):
* dom/ChildListMutationScope.cpp:
(WebCore::ChildListMutationAccumulator::~ChildListMutationAccumulator):
(WebCore::ChildListMutationAccumulator::childAdded):
* dom/ChildNodeList.cpp:
(WebCore::ChildNodeList::namedItem):
* dom/ContainerNode.cpp:
(WebCore::ContainerNode::removeChild):
* dom/CurrentScriptIncrementer.h:
(WebCore::CurrentScriptIncrementer::CurrentScriptIncrementer):
(WebCore::CurrentScriptIncrementer::~CurrentScriptIncrementer):
* dom/MutationRecord.cpp:
* dom/NodeRareData.h:
(WebCore::NodeListsNodeData::ensureChildNodeList):
(WebCore::NodeListsNodeData::ensureEmptyChildNodeList):
(WebCore::NodeListsNodeData::addCacheWithQualifiedName):
* dom/Range.cpp:
(WebCore::Range::setDocument):
* dom/ScriptElement.cpp:
(WebCore::ScriptElement::requestScript):
(WebCore::ScriptElement::executeScript):
* dom/StaticNodeList.cpp:
(WebCore::StaticNodeList::item):
(WebCore::StaticElementList::item):
* editing/CompositeEditCommand.cpp:
(WebCore::CompositeEditCommand::moveRemainingSiblingsToNewParent):
* editing/DictationCommand.cpp:
(WebCore::DictationCommand::insertText):
* editing/DictationCommand.h:
* editing/Editor.cpp:
(WebCore::Editor::insertTextWithoutSendingTextEvent):
* editing/ReplaceNodeWithSpanCommand.cpp:
(WebCore::swapInNodePreservingAttributesAndChildren):
* editing/SimplifyMarkupCommand.cpp:
(WebCore::SimplifyMarkupCommand::doApply):
* editing/markup.cpp:
(WebCore::hasOneChild):
(WebCore::hasOneTextChild):
(WebCore::replaceChildrenWithFragment):
(WebCore::replaceChildrenWithText):
* html/HTMLFormControlElement.cpp:
(WebCore::HTMLFormControlElement::checkValidity):
* html/HTMLFormElement.cpp:
(WebCore::HTMLFormElement::getNamedElements):
* html/HTMLLinkElement.cpp:
(WebCore::HTMLLinkElement::shouldLoadLink):
* inspector/InspectorStyleSheet.cpp:
(WebCore::InspectorStyleSheet::buildObjectForSelectorList):
(WebCore::InspectorStyleSheet::buildObjectForRule):
(WebCore::InspectorStyleSheet::revalidateStyle):
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::continueLoadAfterNewWindowPolicy):
* page/FocusController.cpp:
(WebCore::FocusController::setFocusedElement):
* page/PageSerializer.cpp:
(WebCore::PageSerializer::retrieveResourcesForRule):
* page/PageSerializer.h:
* page/animation/AnimationController.cpp:
(WebCore::AnimationController::updateAnimations):
* platform/graphics/ca/TileCoverageMap.cpp:
(WebCore::TileCoverageMap::platformCALayerPaintContents):
* rendering/ClipPathOperation.h:
* rendering/RenderBlock.cpp:
(WebCore::styleForFirstLetter):
(WebCore::RenderBlock::updateFirstLetterStyle):
(WebCore::RenderBlock::createFirstLetterRenderer):
* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::updateColumnProgressionFromStyle):
* rendering/RenderBlockFlow.h:
* rendering/RenderBox.cpp:
(WebCore::RenderBox::styleDidChange):
* rendering/RenderElement.cpp:
(WebCore::RenderElement::setStyle):
(WebCore::RenderElement::styleDidChange):
* rendering/RenderNamedFlowFragment.cpp:
(WebCore::RenderNamedFlowFragment::restoreRegionObjectsOriginalStyle):
* rendering/RenderTextControl.cpp:
(WebCore::RenderTextControl::adjustInnerTextStyle):
* rendering/RenderTextControl.h:
* rendering/RenderTextControlMultiLine.cpp:
(WebCore::RenderTextControlMultiLine::createInnerTextStyle):
* rendering/RenderTextControlSingleLine.cpp:
(WebCore::RenderTextControlSingleLine::createInnerTextStyle):
* rendering/style/DataRef.h:
(WebCore::DataRef::get):
(WebCore::DataRef::access):
(WebCore::DataRef::operator==):
(WebCore::DataRef::operator!=):
* rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::changeRequiresLayout):
(WebCore::RenderStyle::changeRequiresPositionedLayoutOnly):
(WebCore::RenderStyle::changeRequiresLayerRepaint):
(WebCore::RenderStyle::changeRequiresRepaint):
(WebCore::RenderStyle::changeRequiresRepaintIfTextOrBorderOrOutline):
(WebCore::RenderStyle::changeRequiresRecompositeLayer):
(WebCore::RenderStyle::diff):
(WebCore::RenderStyle::diffRequiresLayerRepaint):
* rendering/style/RenderStyle.h:
* rendering/style/StyleGeneratedImage.cpp:
(WebCore::StyleGeneratedImage::cssValue):
* rendering/style/StyleGeneratedImage.h:
* style/StyleResolveForDocument.cpp:
(WebCore::Style::resolveForDocument):
* style/StyleResolveTree.cpp:
(WebCore::Style::determineChange):
(WebCore::Style::resolveLocal):
(WebCore::Style::resolveTree):
* style/StyleResolveTree.h:
2014-11-04 Chris Dumez <cdumez@apple.com>
Move -webkit-text-emphasis-position to the new StyleBuilder
https://bugs.webkit.org/show_bug.cgi?id=138359
Reviewed by Andreas Kling.
Move -webkit-text-emphasis-position from DeprecatedStyleBilder to the
new StyleBuilder so that it is now generated from CSSPropertyNames.in.
A new TextEmphasisPosition Converter was added to support this.
No new tests, no behavior change.
* css/CSSPropertyNames.in:
* css/DeprecatedStyleBuilder.cpp:
(WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
(WebCore::valueToEmphasisPosition): Deleted.
(WebCore::ApplyPropertyTextEmphasisPosition::applyValue): Deleted.
(WebCore::ApplyPropertyTextEmphasisPosition::createHandler): Deleted.
* css/StyleBuilderConverter.h:
(WebCore::StyleBuilderConverter::valueToEmphasisPosition):
(WebCore::StyleBuilderConverter::convertTextEmphasisPosition):
2014-11-04 Andreas Kling <akling@apple.com>
RenderBox shouldn't need a pre-destructor hook.
<https://webkit.org/b/138367>
Reviewed by Antti Koivisto.
Move teardown logic from willBeDestroyed() to the regular ~RenderBox()
destructor since none of it depends on being in-tree or having a fully
constructed vtable.
* rendering/RenderBox.cpp:
(WebCore::RenderBox::~RenderBox):
(WebCore::RenderBox::willBeDestroyed): Deleted.
* rendering/RenderBox.h:
2014-11-04 Myles C. Maxfield <mmaxfield@apple.com>
[OSX] CJK characters styled with font-family: cursive are italicized
https://bugs.webkit.org/show_bug.cgi?id=138328
rdar://problem/18801907
Reviewed by Simon Fraser.
FontCache::createFontPlatformData doesn’t set the oblique flag if
the requested font isn’t oblique, but
FontCache::systemFallbackForCharacters() does. This patch simply
adopts this behavior in both places.
Test: fast/text/font-cursive-italic-cjk.html
* platform/graphics/mac/FontCacheMac.mm:
(WebCore::FontCache::systemFallbackForCharacters):
2014-11-04 Benjamin Poulain <bpoulain@apple.com>
When computing the specificity of selectors, use saturated arithmetic per component
https://bugs.webkit.org/show_bug.cgi?id=138336
Reviewed by Andreas Kling.
The code handling overflow in CSSSelector::specificity() was assuming that the value
returned by specificityForOneSelector() can only overflow one field at a time.
That assumption is no longer correct with the extended :not(). It is now possible to have
a complex selector saturating multiple fields inside a single :not().
This patch solves the problem by considering each field independently.
Test: fast/selectors/specificity-overflow-2.html
* css/CSSSelector.cpp:
(WebCore::CSSSelector::specificity):
2014-11-04 Zalan Bujtas <zalan@apple.com>
Windows build fix after r175565.
MSVC requires default c'tor even if it's never called. -0 length array.
* rendering/SimpleLineLayout.h:
(WebCore::SimpleLineLayout::Run::Run):
2014-11-04 Zalan Bujtas <zalan@apple.com>
Simple line layout: Cleanup line initialization and line closing.
https://bugs.webkit.org/show_bug.cgi?id=138273
Reviewed by Antti Koivisto.
This is in preparation to support multiple render elements.
Move line start and line end activities to dedicated functions.
Covered by existing tests.
* rendering/SimpleLineLayout.cpp:
(WebCore::SimpleLineLayout::LineState::LineState): Add lineStartRunIndex to be more explicit
about whether a line advanced with new runs. Rename a few members. Introduce LineState::oveflowedFragment
so that line closing can handled separately.
(WebCore::SimpleLineLayout::LineState::commitAndCreateRun):
(WebCore::SimpleLineLayout::LineState::addUncommitted):
(WebCore::SimpleLineLayout::LineState::jumpTo):
(WebCore::SimpleLineLayout::LineState::addUncommittedWhitespace): Deleted. : Remove redundant function.
(WebCore::SimpleLineLayout::LineState::removeCommittedTrailingWhitespace):
(WebCore::SimpleLineLayout::LineState::resetTrailingWhitespace):
(WebCore::SimpleLineLayout::removeTrailingWhitespace): Add resetTrailingWhitespace()
so that all trailing whitespace handling is in one function.
(WebCore::SimpleLineLayout::initializeNewLine): Separate line start and line end initialization/reset.
(WebCore::SimpleLineLayout::createLineRuns):
(WebCore::SimpleLineLayout::closeLineEndingAndAdjustRuns): This function manages all line ending activities.
(WebCore::SimpleLineLayout::createTextRuns):
(WebCore::SimpleLineLayout::create):
(WebCore::SimpleLineLayout::initializeLine): Deleted.
* rendering/SimpleLineLayout.h:
(WebCore::SimpleLineLayout::Run::Run): Deleted.
2014-11-04 Tim Horton <timothy_horton@apple.com>
Implement yellow highlight over data detected items
https://bugs.webkit.org/show_bug.cgi?id=138340
<rdar://problem/18840102>
Reviewed by Anders Carlsson.
* platform/spi/mac/DataDetectorsSPI.h:
Add completionHandler SPI.
2014-11-04 Darin Adler <darin@apple.com>
Eliminate ResourceBuffer and use SharedBuffer directly instead
https://bugs.webkit.org/show_bug.cgi?id=138174
Reviewed by Antti Koivisto.
Refactoring, with test coverage across many existing tests.
* CMakeLists.txt: Deleted ResourceBuffer.cpp.
* WebCore.exp.in: Removed ResourceBuffer-related symbols, and updated symbol
for one function that used to take a PassRefPtr but now takes a reference instead.
* WebCore.vcxproj/WebCore.vcxproj: Deleted ResourceBuffer.cpp/.h.
* WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.
* WebCore.xcodeproj/project.pbxproj: Deleted ResourceBuffer.mm/.cpp/.h.
* bindings/objc/DOMUIKitExtensions.mm:
(-[DOMHTMLImageElement dataRepresentation:]): Use SharedBuffer directly.
* editing/ios/EditorIOS.mm:
(WebCore::Editor::writeImageToPasteboard): Ditto.
* editing/mac/EditorMac.mm:
(WebCore::Editor::writeImageToPasteboard): Ditto.
* html/ImageDocument.cpp:
(WebCore::ImageDocument::updateDuringParsing): Use SharedBuffer directly, and
also pass a reference only if non-null rather than passing a pointer.
(WebCore::ImageDocument::finishedParsing): Ditto. Added a missing null check.
* inspector/InspectorPageAgent.cpp:
(WebCore::InspectorPageAgent::cachedResourceContent): Use SharedBuffer directly.
(WebCore::InspectorPageAgent::mainResourceContent): Ditto.
* inspector/InspectorResourceAgent.cpp:
(WebCore::InspectorResourceAgent::didFinishLoading): Ditto.
(WebCore::InspectorResourceAgent::didFailLoading): Ditto.
* loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::mainResourceData): Use SharedBuffer directly,
and use the copy function rather than a hand-written alternative.
(WebCore::DocumentLoader::maybeCreateArchive): Ditto.
(WebCore::DocumentLoader::mainResource): Ditto.
(WebCore::DocumentLoader::subresource): Ditto.
(WebCore::DocumentLoader::maybeFinishLoadingMultipartContent): Ditto.
* loader/DocumentLoader.h: Changed mainResourceData to return a
PassRefPtr<SharedBuffer>. Would be better if it returned a SharedBuffer&,
but it currently returns a newly created buffer when there is substitute
data and can also return null, even though many callers assume it will not!
* loader/MediaResourceLoader.cpp:
(WebCore::MediaResourceLoader::dataReceived): Removed call to unused client
function bufferReceived.
(WebCore::MediaResourceLoader::notifyFinished): Removed unused buffer
argument to client function loadFinished.
* loader/ResourceBuffer.cpp: Removed.
* loader/ResourceBuffer.h: Removed.
* loader/ResourceLoader.cpp:
(WebCore::ResourceLoader::addDataOrBuffer): Use SharedBuffer directly.
* loader/ResourceLoader.h:
(WebCore::ResourceLoader::resourceData): Use SharedBuffer.
* loader/SubresourceLoader.cpp:
(WebCore::SubresourceLoader::didReceiveResponse): Use SharedBuffer.
(WebCore::SubresourceLoader::didReceiveDataOrBuffer): Ditto.
* loader/TextTrackLoader.cpp:
(WebCore::TextTrackLoader::processNewCueData): Use SharedBuffer.
* loader/appcache/ApplicationCacheGroup.cpp:
(WebCore::ApplicationCacheGroup::finishedLoadingMainResource): Ditto.
* loader/archive/cf/LegacyWebArchive.cpp:
(WebCore::LegacyWebArchive::create): Ditto.
* loader/cache/CachedCSSStyleSheet.cpp:
(WebCore::CachedCSSStyleSheet::finishLoading): Use SharedBuffer.
* loader/cache/CachedCSSStyleSheet.h: Ditto.
* loader/cache/CachedFont.cpp:
(WebCore::CachedFont::finishLoading): Ditto.
(WebCore::CachedFont::ensureCustomFontData): Ditto.
* loader/cache/CachedFont.h: Ditto.
* loader/cache/CachedImage.cpp:
(WebCore::CachedImage::didAddClient): Use SharedBuffer.
(WebCore::CachedImage::didRemoveClient): Ditto.
(WebCore::CachedImage::addIncrementalDataBuffer): Ditto. Changed to take
a reference rather than a pointer.
(WebCore::CachedImage::addDataBuffer): Ditto. Also added call through
to base class and changed to take a reference rather than a pointer.
(WebCore::CachedImage::addData): Ditto. Also added call through to base class.
(WebCore::CachedImage::finishLoading): Ditto.
* loader/cache/CachedImage.h: Ditto. Also changed the type of some bit fields
to be unsigned instead of unsigend char.
* loader/cache/CachedRawResource.cpp:
(WebCore::CachedRawResource::calculateIncrementalDataChunk): Use SharedBuffer.
(WebCore::CachedRawResource::addDataBuffer): Ditto. Changed to take
a reference rather than a pointer.
(WebCore::CachedRawResource::addData): Ditto.
(WebCore::CachedRawResource::finishLoading): Ditto.
(WebCore::CachedRawResource::canReuse): Ditto.
* loader/cache/CachedRawResource.h: Ditto.
* loader/cache/CachedResource.cpp:
(WebCore::CachedResource::CachedResource): Reordered data members due to change
in header.
(WebCore::CachedResource::addDataBuffer): Changed argument type.
(WebCore::CachedResource::finishLoading): Ditto.
(WebCore::CachedResource::didAddClient): Refactored to eliminate one extra hash
table lookup by using the return value from the remove function.
(WebCore::CachedResource::addClientToSet): Use std::make_unique directly instead
of using a function named "schedule" to allocate the callback object.
(WebCore::CachedResource::Callback::Callback): Changed function and data member
name.
(WebCore::CachedResource::Callback::cancel): Ditto.
(WebCore::CachedResource::Callback::timerFired): Ditto.
(WebCore::CachedResource::tryReplaceEncodedData): Changed to take a SharedBuffer&.
* loader/cache/CachedResource.h: Changed types to use SharedBuffer. Also made most
data members and one function member private instead of protected. Also renamed the
CachedResource::CachedResourceCallback function CachedResource::Callback and moved
its definition out of the CachedResource class definition.
* loader/cache/CachedResourceClient.h: Removed unneeded include.
* loader/cache/CachedSVGDocument.cpp:
(WebCore::CachedSVGDocument::finishLoading): Use SharedBuffer.
* loader/cache/CachedSVGDocument.h: Ditto. Made data members private.
* loader/cache/CachedScript.cpp:
(WebCore::CachedScript::finishLoading): Use SharedBuffer.
* loader/cache/CachedScript.h: Ditto. Also fixed indenting and removed unneeded
forward declaration.
* loader/cache/CachedTextTrack.cpp:
(WebCore::CachedTextTrack::updateData): Added, so that finishLoading does not
call addDataBuffer.
(WebCore::CachedTextTrack::addDataBuffer): Take SharedBuffer, call updateData.
(WebCore::CachedTextTrack::finishLoading): Ditto.
* loader/cache/CachedTextTrack.h: Take out unneeded explicit override of the
destructor. Updated for above changes.
* loader/cache/CachedXSLStyleSheet.cpp:
(WebCore::CachedXSLStyleSheet::finishLoading): Updated to use SharedBuffer.
* loader/cache/CachedXSLStyleSheet.h: Took out unneeded includes, made everything
private rather than protected. Added an explicit virtual constructor so we can
compile without knowing how to ref/deref TextResourceDecoder.
* loader/cf/SubresourceLoaderCF.cpp:
(WebCore::SubresourceLoader::didReceiveDataArray): Updated to use SharedBuffer
and to call addDataBuffer only if there is a new data buffer.
* loader/cocoa/DiskCacheMonitorCocoa.h: Use SharedBuffer& instead of PassRefPtr.
* loader/cocoa/DiskCacheMonitorCocoa.mm:
(WebCore::DiskCacheMonitor::DiskCacheMonitor): Ditto.
(WebCore::DiskCacheMonitor::resourceBecameFileBacked): Ditto.
* loader/icon/IconLoader.cpp:
(WebCore::IconLoader::notifyFinished): Use SharedBuffer* instead of
RefPtr<ResourceBuffer>.
* loader/mac/ResourceBuffer.mm: Removed.
* loader/mac/ResourceLoaderMac.mm:
(WebCore::ResourceLoader::didReceiveDataArray): Use SharedBuffer.
* platform/SharedBuffer.cpp:
(WebCore::SharedBuffer::clear): Use a modern for loop.
(WebCore::SharedBuffer::copy): Return a PassRef instead of a PassRefPtr, since
this never returns null. Use modern for loops.
(WebCore::SharedBuffer::copyBufferAndClear): Use a modern for loop.
* platform/SharedBuffer.h: Changed copy to return PassRef instead of PassRefPtr.
Changed tryReplaceContentsWithPlatformBuffer to take a reference rather than
a pointer.
* platform/cf/SharedBufferCF.cpp:
(WebCore::SharedBuffer::tryReplaceContentsWithPlatformBuffer): Take a reference
instead of a pointer.
* platform/graphics/PlatformMediaResourceLoader.h: Removed unused function
bufferReceived and unneeded buffer argument from loadFinished. Also marked the
constructor explicit.
* platform/graphics/avfoundation/cf/WebCoreAVCFResourceLoader.cpp:
Removed include of ResourceBuffer.h.
* platform/graphics/avfoundation/objc/WebCoreAVFResourceLoader.mm:
(WebCore::WebCoreAVFResourceLoader::fulfillRequestWithResource): Use
SharedBuffer directly.
* platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
(CachedResourceStreamingClient::loadFinished): Updated for change to
PlatformMediaResourceLoaderClient.
* platform/mac/PasteboardMac.mm: Removed include of ResourceBuffer.h.
* platform/soup/SharedBufferSoup.cpp: Removed unused, unneeded
tryReplaceContentsWithPlatformBuffer function.
2014-11-04 Chris Dumez <cdumez@apple.com>
Use SPECIALIZE_TYPE_TRAITS_*() macro for StyleRuleGroup subclasses
https://bugs.webkit.org/show_bug.cgi?id=138345
Reviewed by Andreas Kling.
Use SPECIALIZE_TYPE_TRAITS_*() macro for StyleRuleGroup subclasses
instead of old-fashion toXXX() functions.
No new tests, no behavior change.
* css/CSSMediaRule.cpp:
(WebCore::CSSMediaRule::mediaQueries):
* css/CSSSupportsRule.cpp:
(WebCore::CSSSupportsRule::conditionText):
* css/StyleRule.h:
(isType):
(WebCore::toStyleRuleMedia): Deleted.
(WebCore::toStyleRuleSupports): Deleted.
(WebCore::toStyleRuleRegion): Deleted.
* css/WebKitCSSRegionRule.cpp:
(WebCore::WebKitCSSRegionRule::cssText):
2014-11-04 Andreas Kling <akling@apple.com>
RenderQuote shouldn't need a pre-destructor hook.
<https://webkit.org/b/138352>
Reviewed by Antti Koivisto.
The willBeDestroyed() hook in RenderQuote came from the time when it was
potential unsafe to access the RenderView from a renderer destructor.
Move the code to the plain ol' destructor instead.
* rendering/RenderQuote.cpp:
(WebCore::RenderQuote::~RenderQuote):
(WebCore::RenderQuote::willBeDestroyed): Deleted.
* rendering/RenderQuote.h:
2014-11-04 Csaba Osztrogonác <ossy@webkit.org>
Fix the !ENABLE(VIDEO) build after r175380
https://bugs.webkit.org/show_bug.cgi?id=138322
Reviewed by Benjamin Poulain.
* html/HTMLImageLoader.cpp:
(WebCore::HTMLImageLoader::dispatchLoadEvent):
2014-11-03 Philippe Normand <pnormand@igalia.com>
[LEAK] [GStreamer] Removing video element will not free assigned memory
https://bugs.webkit.org/show_bug.cgi?id=46560
Reviewed by Eric Carlson.
Moved the ::extraMemoryCost() implementation to the
MediaPlayerPivateInterface base class. This default implementation
is now shared between the various MediaPlayerPrivate backends,
excepted the AVF MediaSource player which still reports no extra
memory cost.
* platform/graphics/MediaPlayerPrivate.h:
(WebCore::MediaPlayerPrivateInterface::totalBytes): Make
totalBytes() part of the MediaPlayerPrivate interface.
(WebCore::MediaPlayerPrivateInterface::extraMemoryCost): Default
implementation.
* platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
(WebCore::MediaPlayerPrivateAVFoundation::extraMemoryCost): Deleted.
* platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h:
2014-11-04 Nikos Andronikos <nikos.andronikos-webkit@cisra.canon.com.au>
Fix animation of orient attribute on marker element
https://bugs.webkit.org/show_bug.cgi?id=137942
Reviewed by Dirk Schulze.
Fixed implementation of SVG animated angles and the SVG
marker element orient attribute.
SVG animated angle was missing the logic to support animation
from auto to a numeric angle value - this is now added.
The SVG marker element getter for orientType was not returning
the animated value for orientType so in some cases (i.e. when
the initial value and the animated values were of different types)
the animation was not being rendered - although it was running.
Tests: svg/animations/animate-marker-orienttype-1.html
svg/animations/animate-marker-orienttype-2.html
svg/animations/animate-marker-orienttype-3.html
* svg/SVGAnimatedAngle.cpp:
(WebCore::SVGAnimatedAngleAnimator::calculateAnimatedValue):
Added logic to support auto to angle animation.
* svg/SVGMarkerElement.cpp:
(WebCore::SVGMarkerElement::orientType):
This method now returns the animated value if an animation is
running.
* svg/SVGMarkerElement.h:
2014-11-03 Chris Dumez <cdumez@apple.com>
Allow implicit conversion from Ref<T> to T&
https://bugs.webkit.org/show_bug.cgi?id=138331
Reviewed by Andreas Kling.
Remove unnecessary calls to Ref<T>::get() now that a Ref<T> can be
converted implicitly to a T&.
No new tests, no behavior change.
2014-11-03 Simon Fraser <simon.fraser@apple.com>
Non-fast scrollable region overlay offsets the overlay by topContentInset
https://bugs.webkit.org/show_bug.cgi?id=138344
Reviewed Tim Horton.
Offset the region by topContentInset, and make it not green.
* page/DebugPageOverlays.cpp:
(WebCore::NonFastScrollableRegionOverlay::updateRegion):
2014-11-03 Andreas Kling <akling@apple.com>
Clarify RenderListMarker ownership model.
<https://webkit.org/b/138329>
Reviewed by Antti Koivisto.
A RenderListMarker is either in-tree and owned by the tree, or out-of-tree
and owned by a RenderListItem.
This patch changes RenderListItem::m_marker to be a raw pointer, and removes
the special handling of list markers in RenderElement child teardown.
We also remove the willBeDestroyed() hook. It was used to clear out the
m_marker pointer, but this is now done in the regular ~RenderListItem()
destructor with an assertion for marker sanity. m_marker is automatically
nulled out by a didDestroyListMarker() callback on RenderListItem.
* rendering/RenderElement.cpp:
(WebCore::RenderElement::destroyLeftoverChildren):
Removed special handling of list marker renderers when deleting a
RenderElement's children.
* rendering/RenderListItem.cpp:
(WebCore::RenderListItem::RenderListItem):
(WebCore::RenderListItem::~RenderListItem):
(WebCore::RenderListItem::styleDidChange):
(WebCore::RenderListItem::insertOrMoveMarkerRendererIfNeeded):
(WebCore::RenderListItem::positionListMarker):
Made m_marker a raw pointer instead of a RenderPtr since the ownership
really switches between weak and strong reference.
(WebCore::RenderListItem::willBeDestroyed):
* rendering/RenderListMarker.cpp:
(WebCore::RenderListMarker::~RenderListMarker):
Added a regular destructor to replace the willBeDestroyed() hook.
* rendering/RenderListItem.h:
(WebCore::RenderListItem::didDestroyListMarker):
Added. Called by ~RenderListMarker to null out RenderListItem::m_marker.
2014-11-03 Gyuyoung Kim <gyuyoung.kim@samsung.com>
Move WebCore/bridge to std::unique_ptr
https://bugs.webkit.org/show_bug.cgi?id=138280
Reviewed by Anders Carlsson.
Clean up OwnPtr in WebCore/bridge.
No new tests, no behavior changes.
* bridge/c/c_class.cpp:
(JSC::Bindings::CClass::methodNamed):
(JSC::Bindings::CClass::fieldNamed):
* bridge/c/c_class.h: Use std::unique_ptr instead of OwnPtr.
* bridge/objc/objc_class.h: ditto.
* bridge/objc/objc_class.mm:
(JSC::Bindings::ObjcClass::methodNamed):
(JSC::Bindings::ObjcClass::fieldNamed):
* bridge/objc/objc_runtime.mm:
(JSC::Bindings::callObjCFallbackObject):
* bridge/runtime_method.h:
2014-11-03 Dan Bernstein <mitz@apple.com>
Client certificate credentials with session persistence don’t work
https://bugs.webkit.org/show_bug.cgi?id=138330
Reviewed by Alexey Proskuryakov.
I think this is not testable with our test HTTP server.
* platform/network/CredentialStorage.cpp:
(WebCore::CredentialStorage::set): Don’t require a valid URL for client certificate
credentials, since they don’t apply to a specific path. Don’t save such credentials to
CFNetwork’s persistent storage (we only do that as a workaround for sharing credentials
with the media framework, and we don’t want to expand the scope of the workaround).
* platform/network/cf/ResourceHandleCFNet.cpp:
(WebCore::ResourceHandle::receivedCredential): Changed to use the Credential consturctor
that takes a Credential and a new persistence, so that this code works not only with
user+password credentials.
2014-11-03 Simon Fraser <simon.fraser@apple.com>
Add page overlays that show regions with mouseWheel event handlers, and the non-fast-scrollable region, and code to toggle them in MiniBrowser WK2
https://bugs.webkit.org/show_bug.cgi?id=138257
Reviewed by Tim Horton.
Add code for debugging page overlays that show the non-fast scrollable region,
and the region with wheel event handlers. The list of region types is intended
to be easily extensible.
A singleton DebugPageOverlays maintains a map of Frame -> vector of overlays.
A purely inline code path is provided so that DebugPageOverlays::didLayout() is
fast.
For each region type, a PageOverlay::Client subclass knows how to generate
the region, which is painted into a document-level page overlay.
Add a set of bitflags to Settings to control region visibility.
* WebCore.exp.in:
* WebCore.xcodeproj/project.pbxproj:
* page/DebugPageOverlays.cpp: Added.
(WebCore::RegionOverlay::overlay):
(WebCore::MouseWheelRegionOverlay::updateRegion):
(WebCore::NonFastScrollableRegionOverlay::updateRegion):
(WebCore::RegionOverlay::create):
(WebCore::RegionOverlay::RegionOverlay):
(WebCore::RegionOverlay::~RegionOverlay):
(WebCore::RegionOverlay::pageOverlayDestroyed):
(WebCore::RegionOverlay::willMoveToPage):
(WebCore::RegionOverlay::didMoveToPage):
(WebCore::RegionOverlay::drawRect):
(WebCore::RegionOverlay::mouseEvent):
(WebCore::RegionOverlay::didScrollFrame):
(WebCore::RegionOverlay::recomputeRegion):
(WebCore::DebugPageOverlays::shared):
(WebCore::indexOf):
(WebCore::DebugPageOverlays::ensureRegionOverlayForFrame):
(WebCore::DebugPageOverlays::showRegionOverlay):
(WebCore::DebugPageOverlays::hideRegionOverlay):
(WebCore::DebugPageOverlays::regionChanged):
(WebCore::DebugPageOverlays::regionOverlayForFrame):
(WebCore::DebugPageOverlays::updateOverlayRegionVisibility):
(WebCore::DebugPageOverlays::settingsChanged):
* page/DebugPageOverlays.h: Added.
(WebCore::DebugPageOverlays::hasOverlaysForFrame):
(WebCore::DebugPageOverlays::hasOverlays):
(WebCore::DebugPageOverlays::didLayout):
* page/FrameView.cpp:
(WebCore::FrameView::layout):
* page/Settings.h:
* page/Settings.in:
2014-11-03 Simon Fraser <simon.fraser@apple.com>
Video controls have lots of compositing layers
https://bugs.webkit.org/show_bug.cgi?id=138294
Reviewed by Eric Carlson.
After r175268 we get lots of separate small layers in the video
controls (but they pop into a single layer when opacity animates).
Fix this by putting an explicit z-index on -webkit-media-controls-panel
which is the element that animates opacity.
* Modules/mediacontrols/mediaControlsApple.css:
(audio::-webkit-media-controls-panel):
2014-11-03 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r175406, r175413, and r175423.
https://bugs.webkit.org/show_bug.cgi?id=138327
Multipart tests are still broken (Requested by ap on #webkit).
Reverted changesets:
"Eliminate ResourceBuffer and use SharedBuffer directly
instead"
https://bugs.webkit.org/show_bug.cgi?id=138174
http://trac.webkit.org/changeset/175406
"Unreviewed, iOS build fix since 175406."
http://trac.webkit.org/changeset/175413
"Fix assertion in CachedResource::addDataBuffer"
http://trac.webkit.org/changeset/175423
2014-11-03 Chris Dumez <cdumez@apple.com>
Unreviewed, fix bad assertion in r175487.
I mistakenly used it != values.end() instead of it == values.end()
so the debug bots are crashing.
* css/StyleResolver.cpp:
(WebCore::createGridPosition):
2014-11-03 Csaba Osztrogonác <ossy@webkit.org>
Fix the !ENABLE(VIDEO) build after r175279
https://bugs.webkit.org/show_bug.cgi?id=138320
Reviewed by Jer Noble.
* page/ChromeClient.h:
2014-11-03 Chris Dumez <cdumez@apple.com>
Support modern range loops over CSSValueList
https://bugs.webkit.org/show_bug.cgi?id=138285
Reviewed by Andreas Kling.
Add support for modern range loops over CSSValueList objects.
Port the code base to using range loops for CSSValueList objects and
drop the CSSValueListInspector / CSSValueListIterator classes as they
are no longer needed.
No new tests, no behavior change.
2014-11-03 Andreas Kling <akling@apple.com>
RenderCounter shouldn't need a pre-destructor hook.
<https://webkit.org/b/138316>
Reviewed by Antti Koivisto.
RenderCounter will automatically register/unregister itself with
the RenderView when constructed/destroyed.
It was using a willBeDestroyed() hook because it used to be that you
couldn't get to the RenderView in the destructor. That's no longer
an issue as Document promises that RenderView is the last render tree
node to go away.
* rendering/RenderCounter.cpp:
(WebCore::RenderCounter::~RenderCounter):
(WebCore::RenderCounter::willBeDestroyed): Deleted.
* rendering/RenderCounter.h:
2014-11-03 Tim Horton <timothy_horton@apple.com>
Use FrameSnapshotting functions in FindController::getFindIndicatorBitmap
https://bugs.webkit.org/show_bug.cgi?id=138300
<rdar://problem/18855863>
Reviewed by Simon Fraser.
* WebCore.exp.in:
* page/FrameSnapshotting.cpp:
(WebCore::snapshotSelection):
Move knowledge that selectionBounds can be empty down to WebCore.
2014-11-03 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Show Selector's Specificity
https://bugs.webkit.org/show_bug.cgi?id=138189
Reviewed by Timothy Hatcher.
Test: inspector/css/selector-specificity.html
* css/CSSSelector.h:
Remove very stale comment. '*' is a starAtom now instead of a special -1 tag.
Made the specificity masks public class constants.
* inspector/InspectorStyleSheet.h:
* inspector/InspectorStyleSheet.cpp:
(WebCore::InspectorStyle::buildArrayForComputedStyle):
(WebCore::InspectorStyle::styleWithProperties):
(WebCore::InspectorStyleSheet::buildObjectForStyleSheetInfo):
Drive by use release() in some cases to reduce ref count churn.
(WebCore::buildObjectForSelectorHelper):
(WebCore::selectorsFromSource):
(WebCore::InspectorStyleSheet::buildObjectForSelector):
(WebCore::InspectorStyleSheet::buildObjectForSelectorList):
Build CSSSelector objects for SelectorLists.
2014-11-03 Chris Dumez <cdumez@apple.com>
Move -webkit-shape-outside to the new StyleBuilder
https://bugs.webkit.org/show_bug.cgi?id=138296
Reviewed by Zoltan Horvath.
Move -webkit-shape-outside to the new StyleBuilder, using custom
code as it does not always call setShapeOutside().
No new tests, no behavior change.
* css/CSSPropertyNames.in:
* css/DeprecatedStyleBuilder.cpp:
(WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
(WebCore::ApplyPropertyShape::setValue): Deleted.
(WebCore::ApplyPropertyShape::applyValue): Deleted.
(WebCore::ApplyPropertyShape::createHandler): Deleted.
* css/StyleBuilderCustom.h:
(WebCore::StyleBuilderFunctions::applyValueWebkitShapeOutside):
2014-11-03 Alexey Proskuryakov <ap@apple.com>
REGRESSION: Using a media element changes window.name
https://bugs.webkit.org/show_bug.cgi?id=138278
rdar://problem/18704134
Apply the same fix to mediaControlsBase.js. I do not know who uses this file, but
there is no reason to have the bug there.
* Modules/mediacontrols/mediaControlsBase.js:
(Controller.prototype.addVideoListeners):
(Controller.prototype.removeVideoListeners):
(Controller.prototype.disconnectControls):
2014-11-03 Andreas Kling <akling@apple.com>
RenderLayerModelObject shouldn't need a pre-destructor hook.
<https://webkit.org/b/138314>
Reviewed by Antti Koivisto.
Move code from the willBeDestroyed() pre-destructor hook to the regular
~RenderLayerModelObject() destructor.
We just need to unregister the renderer from the FrameView's set of
viewport-constrained objects. That doesn't require being able to walk
the render tree or call virtuals, which is the main reason you'd use
willBeDestroyed().
* rendering/RenderLayerModelObject.cpp:
(WebCore::RenderLayerModelObject::~RenderLayerModelObject):
(WebCore::RenderLayerModelObject::willBeDestroyed): Deleted.
* rendering/RenderLayerModelObject.h:
2014-11-03 Tibor Meszaros <tmeszaros.u-szeged@partner.samsung.com>
[EFL] Fix the build if LOG_DISABLED=0 in release mode
https://bugs.webkit.org/show_bug.cgi?id=138309
Reviewed by Chris Dumez.
* platform/efl/LoggingEfl.cpp:
2014-11-03 Chris Dumez <cdumez@apple.com>
Move 'zoom' CSS property to the new StyleBuilder
https://bugs.webkit.org/show_bug.cgi?id=138297
Reviewed by Antti Koivisto.
Move 'zoom' CSS property from DeprecatedStyleBuilder to the new
StyleBuilder by using custom code as it requires special handling.
No new tests, no behavior change.
* css/makeprop.pl:
Add support for Custom=All StyleBuilder option to indicate
that the property requires custom code to set the initial,
inherit and current values.
2014-11-03 Sungmann Cho <sungmann.cho@navercorp.com>
AX: Fix some minor typos related to the word "accessibility".
https://bugs.webkit.org/show_bug.cgi?id=138299
Reviewed by Chris Fleizach.
No new tests, no behavior change.
* accessibility/AccessibilityNodeObject.cpp:
(WebCore::shouldUseAccessibilityObjectInnerText):
(WebCore::AccessibilityNodeObject::textUnderElement):
(WebCore::shouldUseAccessiblityObjectInnerText): Deleted.
* accessibility/atk/WebKitAccessibleInterfaceText.cpp:
(getRunAttributesFromAccessibilityObject):
(webkitAccessibleTextGetRunAttributes):
(getRunAttributesFromAccesibilityObject): Deleted.
* page/CaptionUserPreferencesMediaAF.cpp:
(WebCore::CaptionUserPreferencesMediaAF::textTrackSelectionScore):
2014-11-02 Chris Dumez <cdumez@apple.com>
Move string-typed properties to the new StyleBuilder
https://bugs.webkit.org/show_bug.cgi?id=138295
Reviewed by Antti Koivisto.
Move string-typed properties to the new StyleBuilder:
-webkit-hyphenate-character
-webkit-line-grid
-webkit-flow-into
-webkit-flow-from
No new tests, no behavior change.
2014-11-02 Chris Dumez <cdumez@apple.com>
Unreviewed, rebaseline bindings tests after r175462.
* bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
(WebCore::jsTestActiveDOMObjectPrototypeFunctionExcitingFunction):
(WebCore::jsTestActiveDOMObjectPrototypeFunctionPostMessage):
* bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
(WebCore::jsTestCustomNamedGetterPrototypeFunctionAnotherFunction):
* bindings/scripts/test/JS/JSTestEventTarget.cpp:
(WebCore::jsTestEventTargetPrototypeFunctionItem):
(WebCore::jsTestEventTargetPrototypeFunctionDispatchEvent):
* bindings/scripts/test/JS/JSTestInterface.cpp:
(WebCore::JSTestInterfaceConstructor::constructJSTestInterface):
(WebCore::jsTestInterfacePrototypeFunctionImplementsMethod2):
(WebCore::jsTestInterfacePrototypeFunctionSupplementalMethod2):
* bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
(WebCore::jsTestMediaQueryListListenerPrototypeFunctionMethod):
* bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
(WebCore::JSTestNamedConstructorNamedConstructor::constructJSTestNamedConstructor):
* bindings/scripts/test/JS/JSTestObj.cpp:
(WebCore::JSTestObjConstructor::constructJSTestObj):
(WebCore::jsTestObjPrototypeFunctionVoidMethodWithArgs):
(WebCore::jsTestObjPrototypeFunctionByteMethodWithArgs):
(WebCore::jsTestObjPrototypeFunctionOctetMethodWithArgs):
(WebCore::jsTestObjPrototypeFunctionLongMethodWithArgs):
(WebCore::jsTestObjPrototypeFunctionObjMethodWithArgs):
(WebCore::jsTestObjPrototypeFunctionMethodWithSequenceArg):
(WebCore::jsTestObjPrototypeFunctionMethodReturningSequence):
(WebCore::jsTestObjPrototypeFunctionMethodWithEnumArg):
(WebCore::jsTestObjPrototypeFunctionMethodThatRequiresAllArgsAndThrows):
(WebCore::jsTestObjPrototypeFunctionSerializedValue):
(WebCore::jsTestObjPrototypeFunctionOptionsObject):
(WebCore::jsTestObjPrototypeFunctionMethodWithNonOptionalArgAndOptionalArg):
(WebCore::jsTestObjPrototypeFunctionMethodWithNonOptionalArgAndTwoOptionalArgs):
(WebCore::jsTestObjPrototypeFunctionMethodWithCallbackArg):
(WebCore::jsTestObjPrototypeFunctionMethodWithNonCallbackArgAndCallbackArg):
(WebCore::jsTestObjConstructorFunctionStaticMethodWithCallbackArg):
(WebCore::jsTestObjPrototypeFunctionOverloadedMethod1):
(WebCore::jsTestObjPrototypeFunctionOverloadedMethod2):
(WebCore::jsTestObjPrototypeFunctionOverloadedMethod3):
(WebCore::jsTestObjPrototypeFunctionOverloadedMethod4):
(WebCore::jsTestObjPrototypeFunctionOverloadedMethod5):
(WebCore::jsTestObjPrototypeFunctionOverloadedMethod6):
(WebCore::jsTestObjPrototypeFunctionOverloadedMethod7):
(WebCore::jsTestObjPrototypeFunctionOverloadedMethod8):
(WebCore::jsTestObjPrototypeFunctionOverloadedMethod9):
(WebCore::jsTestObjPrototypeFunctionOverloadedMethod10):
(WebCore::jsTestObjPrototypeFunctionOverloadedMethod11):
(WebCore::jsTestObjConstructorFunctionClassMethod2):
(WebCore::jsTestObjConstructorFunctionOverloadedMethod11):
(WebCore::jsTestObjConstructorFunctionOverloadedMethod12):
(WebCore::jsTestObjPrototypeFunctionClassMethodWithClamp):
(WebCore::jsTestObjPrototypeFunctionMethodWithUnsignedLongSequence):
(WebCore::jsTestObjPrototypeFunctionStringArrayFunction):
(WebCore::jsTestObjPrototypeFunctionDomStringListFunction):
(WebCore::jsTestObjPrototypeFunctionMethodWithAndWithoutNullableSequence):
(WebCore::jsTestObjPrototypeFunctionMethodWithAndWithoutNullableSequence2):
(WebCore::jsTestObjPrototypeFunctionConvert1):
(WebCore::jsTestObjPrototypeFunctionConvert2):
(WebCore::jsTestObjPrototypeFunctionConvert4):
(WebCore::jsTestObjPrototypeFunctionConvert5):
(WebCore::jsTestObjPrototypeFunctionStrictFunction):
(WebCore::jsTestObjPrototypeFunctionStrictFunctionWithSequence):
(WebCore::jsTestObjPrototypeFunctionStrictFunctionWithArray):
(WebCore::jsTestObjPrototypeFunctionVariadicStringMethod):
(WebCore::jsTestObjPrototypeFunctionVariadicDoubleMethod):
(WebCore::jsTestObjPrototypeFunctionVariadicNodeMethod):
(WebCore::jsTestObjPrototypeFunctionAny):
* bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
(WebCore::JSTestOverloadedConstructorsConstructor::constructJSTestOverloadedConstructors1):
(WebCore::JSTestOverloadedConstructorsConstructor::constructJSTestOverloadedConstructors2):
(WebCore::JSTestOverloadedConstructorsConstructor::constructJSTestOverloadedConstructors3):
(WebCore::JSTestOverloadedConstructorsConstructor::constructJSTestOverloadedConstructors4):
* bindings/scripts/test/JS/JSTestTypedefs.cpp:
(WebCore::JSTestTypedefsConstructor::constructJSTestTypedefs):
(WebCore::jsTestTypedefsPrototypeFunctionSetShadow):
(WebCore::jsTestTypedefsPrototypeFunctionMethodWithSequenceArg):
(WebCore::jsTestTypedefsPrototypeFunctionNullableArrayArg):
(WebCore::jsTestTypedefsPrototypeFunctionFuncWithClamp):
(WebCore::jsTestTypedefsPrototypeFunctionStringArrayFunction):
(WebCore::jsTestTypedefsPrototypeFunctionStringArrayFunction2):
(WebCore::jsTestTypedefsPrototypeFunctionCallWithSequenceThatRequiresInclude):
2014-11-02 Chris Dumez <cdumez@apple.com>
Reduce the cost of argumentCount checks in the JS bindings
https://bugs.webkit.org/show_bug.cgi?id=138289
Reviewed by Sam Weinig.
Slightly reduce the cost of argumentCount checks in the JS bindings by
hinting to the compiler that it is UNLIKELY that those methods are
called with too few arguments.
I see a 3% progression on PerformanceTests/DOM/DOMDivWalk.html
performance test.
No new tests, no behavior change.
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateArgumentsCountCheck):
2014-11-01 Alexey Proskuryakov <ap@apple.com>
REGRESSION: Using a media element changes window.name
https://bugs.webkit.org/show_bug.cgi?id=138278
rdar://problem/18704134
Reviewed by Jer Noble.
Test: fast/media/window-name.html
Use an actual variable for name (and while at it, for "item" as well).
* Modules/mediacontrols/mediaControlsApple.js:
(Controller.prototype.addVideoListeners):
(Controller.prototype.removeVideoListeners):
(Controller.prototype.disconnectControls):
2014-11-01 Chris Dumez <cdumez@apple.com>
Move "direction" CSS property to the new StyleBuilder
https://bugs.webkit.org/show_bug.cgi?id=138288
Reviewed by Sam Weinig.
Move "direction" CSS property to the new StyleBuilder by using custom
code as it requires special handling to call
Document::setDirectionSetOnDocumentElement() when necessary.
No new tests, no behavior change.
* css/CSSPropertyNames.in:
* css/DeprecatedStyleBuilder.cpp:
(WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
(WebCore::ApplyPropertyDirection::applyValue): Deleted.
(WebCore::ApplyPropertyDirection::createHandler): Deleted.
* css/StyleBuilderCustom.h:
(WebCore::StyleBuilderFunctions::applyValueDirection):
2014-11-01 Sam Weinig <sam@webkit.org>
Move the -webkit-transform property to the new StyleBuilder
https://bugs.webkit.org/show_bug.cgi?id=138283
Reviewed by Chris Dumez.
Move the -webkit-transform property from StyleResolver to the new
generated StyleBuilder. Adds a converter for TransformOperations.
* css/CSSPropertyNames.in:
* css/StyleBuilderConverter.h:
(WebCore::StyleBuilderConverter::convertTransform):
* css/StyleResolver.cpp:
(WebCore::StyleResolver::applyProperty):
* css/TransformFunctions.cpp:
(WebCore::transformsForValue):
* css/TransformFunctions.h:
* css/WebKitCSSMatrix.cpp:
(WebCore::WebKitCSSMatrix::setMatrixValue):
2014-11-01 Benjamin Poulain <bpoulain@apple.com>
Fix the specificity of the extended :not() selector
https://bugs.webkit.org/show_bug.cgi?id=138275
Reviewed by Andreas Kling.
The current draft says "The specificity of a :not() pseudo-class
is the specificity of the most specifc complex selector in its selector list."
It is still unclear how :not() plays with other new selectors. Until that is clarified,
this only handle the simple cases.
Tests: fast/css/not-self-specificity.html
fast/css/not-specificity-1.html
fast/css/not-specificity-2.html
fast/css/not-specificity-3.html
fast/css/not-specificity-4.html
fast/css/not-specificity-5.html
fast/css/not-specificity-6.html
* css/CSSSelector.cpp:
(WebCore::CSSSelector::specificityForOneSelector):
2014-10-31 Benjamin Poulain <bpoulain@apple.com>
Fix the Debug builds after r175446
* css/CSSSelector.cpp:
(WebCore::CSSSelector::selectorText):
2014-10-31 Dhi Aurrahman <diorahman@rockybars.com>
Add initial parsing functionality of :lang pseudo class in Selectors Level 4.
https://bugs.webkit.org/show_bug.cgi?id=138170
Reviewed by Benjamin Poulain.
Add initial parsing functionality of :lang pseudo class in Selectors Level 4,
as specified in [1].
It parses comma-separated list of string arguments. Currently, it throws error
on arguments with "*" (e.g. :lang(zh, *-hant)).
Add additional test file fast/selectors/lang-invalid.html along side the
fast/css/css-selector-text.html.
[1] http://dev.w3.org/csswg/selectors4/#the-lang-pseudo
Test: fast/selectors/lang-invalid.html
* css/CSSGrammar.y.in:
* css/CSSParser.cpp:
(WebCore::CSSParser::detectFunctionTypeToken):
* css/CSSParserValues.cpp:
(WebCore::CSSParserSelector::setArgumentList):
* css/CSSParserValues.h:
* css/CSSSelector.cpp:
(WebCore::appendArgumentList):
(WebCore::CSSSelector::selectorText):
(WebCore::CSSSelector::setArgumentList):
* css/CSSSelector.h:
(WebCore::CSSSelector::argumentList):
* css/SelectorChecker.cpp:
(WebCore::SelectorChecker::checkOne):
* cssjit/SelectorCompiler.cpp:
(WebCore::SelectorCompiler::addPseudoClassType):
2014-10-31 Chris Dumez <cdumez@apple.com>
StyleBuilder: Stop using custom code for -webkit-hyphenate-limit-lines
https://bugs.webkit.org/show_bug.cgi?id=138270
Reviewed by Antti Koivisto.
Stop using custom code for -webkit-hyphenate-limit-lines in the new
StyleBuilder. We don't really need to, we can just have a Converter
specific to this property.
No new tests, no behavior change.
* css/CSSPropertyNames.in:
* css/StyleBuilderConverter.h:
(WebCore::StyleBuilderConverter::convertWebkitHyphenateLimitLines):
* css/StyleBuilderCustom.h:
(WebCore::StyleBuilderFunctions::applyValueWebkitHyphenateLimitLines): Deleted.
2014-10-31 Chris Dumez <cdumez@apple.com>
Support throttling of DOMTimers using nested setTimeout() calls
https://bugs.webkit.org/show_bug.cgi?id=138262
Reviewed by Gavin Barraclough.
Extend DOMTimers throttling support to timers that are using nested
setTimeout() calls instead of a setInterval(). To achieve this, this
patch introduces a NestedTimersVector singleton class where nested
timers are appended, and for which we potentially update the next
firing time, after the parent timer is done executing.
I have verified this helps on cnn.com for example, which has timers
interacting with non-visible plugins that are scheduled using nested
setTimeout() calls with a frequency of 150 / 200 ms.
* page/DOMTimer.cpp:
(WebCore::NestedTimersVector::NestedTimersVector):
(WebCore::NestedTimersVector::~NestedTimersVector):
(WebCore::NestedTimersVector::registerTimer):
(WebCore::NestedTimersVector::begin):
(WebCore::NestedTimersVector::end):
(WebCore::DOMTimer::install):
(WebCore::DOMTimer::updateThrottlingStateIfNecessary):
(WebCore::DOMTimer::fired):
* page/DOMTimer.h:
2014-10-31 Chris Dumez <cdumez@apple.com>
Move -webkit-marquee-increment property to the new StyleBuilder
https://bugs.webkit.org/show_bug.cgi?id=138208
Reviewed by Andreas Kling.
Move -webkit-marquee-increment property from DeprecatedStyleBuilder to
the new StyleBuilder so that it is generated from CSSPropertyNames.in.
Custom code is used to set the value due to the !length.isUndefined()
check before calling setMarqueeIncrement().
Test: fast/css/webkit-marquee-increment-bad-value.html
* css/CSSPropertyNames.in:
* css/DeprecatedStyleBuilder.cpp:
(WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
(WebCore::ApplyPropertyLength::setValue): Deleted.
(WebCore::ApplyPropertyLength::applyValue): Deleted.
(WebCore::ApplyPropertyLength::createHandler): Deleted.
(WebCore::ApplyPropertyMarqueeIncrement::applyValue): Deleted.
(WebCore::ApplyPropertyMarqueeIncrement::createHandler): Deleted.
* css/StyleBuilderCustom.h:
(WebCore::StyleBuilderFunctions::applyValueWebkitMarqueeIncrement):
2014-10-31 Simon Fraser <simon.fraser@apple.com>
Brace cleanup in StyleResolver::adjustRenderStyle()
https://bugs.webkit.org/show_bug.cgi?id=138267
Reviewed by Chris Dumez.
No braces for single-line clauses.
* css/StyleResolver.cpp:
(WebCore::StyleResolver::adjustRenderStyle):
2014-10-31 Chris Dumez <cdumez@apple.com>
Fix several warnings reported by clang static analyzer in WebCore
https://bugs.webkit.org/show_bug.cgi?id=138258
Reviewed by Joseph Pecoraro.
Fix several warnings reported by clang static analyzer in WebCore
related to variable unnecessary assignments and scope.
No new tests, no behavior change.
* dom/ContainerNode.cpp:
(WebCore::ContainerNode::getUpperLeftCorner):
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::parseAttribute):
* inspector/InspectorStyleTextEditor.cpp:
(WebCore::InspectorStyleTextEditor::replaceProperty):
* page/ContextMenuController.cpp:
(WebCore::openNewWindow):
* page/DragController.cpp:
(WebCore::createMouseEvent):
* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::computeInlinePreferredLogicalWidths):
* rendering/svg/SVGInlineTextBox.cpp:
(WebCore::SVGInlineTextBox::paintSelectionBackground):
2014-10-31 Simon Fraser <simon.fraser@apple.com>
Whitespace cleanup in Screen.h
https://bugs.webkit.org/show_bug.cgi?id=138265
Reviewed by Chris Dumez.
No indent for namespaces. Mark 'final'. Fix * placement.
* page/Screen.h:
(WebCore::Screen::create):
2014-10-31 Simon Fraser <simon.fraser@apple.com>
Change the ScrollingThread code to use RunLoop::main().dispatch() rather than callOnMainThread(), which has Obj-C overhead
https://bugs.webkit.org/show_bug.cgi?id=138263
Reviewed by Geoffrey Garen.
callOnMainThread() uses -performSelector:onMainThread:withObject:waitUntilDone:, so
it's slightly more efficient to use RunLoop::main().dispatch().
* page/scrolling/ThreadedScrollingTree.cpp:
(WebCore::ThreadedScrollingTree::invalidate):
(WebCore::ThreadedScrollingTree::scrollingTreeNodeDidScroll):
(WebCore::ThreadedScrollingTree::handleWheelEventPhase):
2014-10-31 Benjamin Poulain <bpoulain@apple.com>
Pseudo classes with an escaped parenthesis generate invalid rules
https://bugs.webkit.org/show_bug.cgi?id=138266
Reviewed by Antti Koivisto.
Since the functional pseudo classes are part of the list of PseudoClassAndCompatibilityElement,
they could be created by the rule
pseudo:
':' IDENT
if the parenthesis is escaped. For example, with ":not\\(", the IDENT would be
"not(", CSSParserSelector::parsePseudoClassAndCompatibilityElementSelector would
find a pseudo class type of PseudoClassNot, and the action would create an invalid
CSSSelector for a :not() without nested selector.
This patch fixes the issue by detecting the function case in
CSSParserSelector::parsePseudoClassAndCompatibilityElementSelector().
An other solution would be to split PseudoClassAndCompatibilityElement into simple pseudo class
and functional pseudo classes. We may do that some day but at the moment it is a lot of work with
a little benefit.
Tests: fast/css/crash-on-incomplete-webkit-any.html
fast/css/pseudo-escaped-parenthesis.html
fast/selectors/invalid-functional-pseudo-class.html
* css/CSSParserValues.cpp:
(WebCore::CSSParserSelector::parsePseudoClassAndCompatibilityElementSelector):
2014-10-31 Chris Dumez <cdumez@apple.com>
Make CSSDefaultStyleSheets::ensureDefaultStyleSheetsForElement() faster
https://bugs.webkit.org/show_bug.cgi?id=138227
Reviewed by Benjamin Poulain.
Restructure CSSDefaultStyleSheets::ensureDefaultStyleSheetsForElement()
a bit to do less if checks. The previous implementation was doing 7 if
checks no matter the input value. The new implementation does less
if checks depending on the input type.
Also, the isImageControlsRootElement() was showing in the profiles so
I updated the condition to only do this virtual function call if the
input is an HTMLDivElement (which we can check more efficiently).
With the change, I see that we're spending about ~26% less time in
this method when running speedometer. However, the impact on the
overall score is within noise.
No new tests, no behavior change.
* css/CSSDefaultStyleSheets.cpp:
(WebCore::CSSDefaultStyleSheets::ensureDefaultStyleSheetsForElement):
2014-10-31 Antti Koivisto <antti@apple.com>
Fix assertion in CachedResource::addDataBuffer
* loader/cache/CachedRawResource.cpp:
(WebCore::CachedRawResource::addDataBuffer):
Don't call to base class if buffering mode changed (happens with some special top level document types).
2014-10-31 Said Abou-Hallawa <sabouhallawa@apple.com>
Remove webkit prefix from CSS columns.
https://bugs.webkit.org/show_bug.cgi?id=137132.
Reviewed by Dean Jackson.
CSS columns properties are ready for un-prefixing. There are still a couple
that we haven't implemented, such as the ones starting with "break-", so we're
just going to do the ones starting with "column-". The list of column un-
prefixed properties in this change set is:
- column-count
- column-fill
- column-gap
- column-progression
- column-rule
- column-rule-color
- column-rule-style
- column-rule-width
- column-span
- column-width
- columns
Tests: fast/multicol/column-box-alignment-rtl.html
fast/multicol/multicol-aliases.html
imported/w3c/css/multicol/multicol-basic-001.html
imported/w3c/css/multicol/multicol-basic-002.html
imported/w3c/css/multicol/multicol-basic-003.html
imported/w3c/css/multicol/multicol-basic-004.html
Add new un-prefixed column properties and make the -webkit* ones be aliases
to the new ones.
* css/CSSPropertyNames.in:
Use the new enums CSSPropertyColumn* instead of the prefixed ones.
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::ComputedStyleExtractor::propertyValue):
* css/CSSParser.cpp:
(WebCore::isColorPropertyID):
(WebCore::isValidKeywordPropertyAndValue):
(WebCore::isKeywordPropertyID):
(WebCore::CSSParser::parseValue):
* css/DeprecatedStyleBuilder.cpp:
(WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
* css/StyleProperties.cpp:
(WebCore::StyleProperties::getPropertyValue):
* css/StylePropertyShorthand.cpp:
(WebCore::webkitColumnsShorthand):
(WebCore::webkitColumnRuleShorthand):
(WebCore::shorthandForProperty):
(WebCore::matchingShorthandsForLonghand):
* css/StyleResolver.cpp:
(WebCore::isValidVisitedLinkProperty):
(WebCore::StyleResolver::applyProperty):
* page/animation/CSSPropertyAnimation.cpp:
(WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap):
* rendering/RenderMultiColumnSet.cpp:
(WebCore::RenderMultiColumnSet::paintColumnRules):
* rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::colorIncludingFallback):
2014-10-31 Tim Horton <timothy_horton@apple.com>
Remove "Add to iPhoto" from the action menu's sharing menu
https://bugs.webkit.org/show_bug.cgi?id=138251
<rdar://problem/18837197>
Reviewed by Anders Carlsson.
* platform/spi/mac/NSSharingServiceSPI.h:
Add 'name' to the NSSharingService SPI header.
2014-10-31 Akos Kiss <akiss@inf.u-szeged.hu>
Fix type clash warning in supports_error rule of CSSGrammar.
https://bugs.webkit.org/show_bug.cgi?id=138248
Reviewed by Antti Koivisto.
Added explicit actions to supports_error rule in CSSGrammar.y.in since
the default actions caused bison to emit type clash warnings.
No new tests because there is no behavior change.
* css/CSSGrammar.y.in:
2014-10-31 Adrian Perez de Castro <aperez@igalia.com>
[GTK] Support script message handlers WebKitUserContentManager
https://bugs.webkit.org/show_bug.cgi?id=133730
Reviewed by Carlos Garcia Campos.
Support user script message handlers in WebKitUserContentManager.
This needs building with ENABLE_USER_MESSAGE_HANDLERS, for which
an option is added to the CMake build files. The option is disabled
globally by default, and the WebKitGTK port enables it. On the API
level, two new methods to register and unregister names are provided
in the "window.webkit" namespace, and on message reception the
"WebKitUserContentManager::script-message-received" signal is
emitted, using the registered names as signal detail.
* CMakeLists.txt: Conditionally add the needed files to the build
when the ENABLE_USER_MESSAGE_HANDLERS feature is enabled.
2014-10-31 Andrzej Badowski <a.badowski@samsung.com>
[ATK] Improve AccessibilityTableCell's determineAccessibilityRole function.
https://bugs.webkit.org/show_bug.cgi?id=137737
Reviewed by Chris Fleizach.
Use of new functions isRowHeaderCell and isColumnHeaderCell (bug 136818)
to more accurately determine accessibility role of the table cell.
Test: accessibility/table-cells-roles.html
* accessibility/AccessibilityARIAGridCell.cpp:
(WebCore::AccessibilityARIAGridCell::rowIndexRange):
Change to const.
* accessibility/AccessibilityARIAGridCell.h:
Change rowIndexRange function to const.
* accessibility/AccessibilityTableCell.cpp:
(WebCore::AccessibilityTableCell::determineAccessibilityRole):
Use of isRowHeaderCell and isColumnHeaderCell to more accurately determine accessibility role (ATK).
(WebCore::AccessibilityTableCell::isColumnHeaderCell):
Add a case of direct placement a row in the table.
(WebCore::AccessibilityTableCell::isRowHeaderCell):
Add a case of direct placement a row in the table.
(WebCore::AccessibilityTableCell::rowIndexRange):
Change to const.
* accessibility/AccessibilityTableCell.h:
Change rowIndexRange function to const.
2014-10-30 Darin Adler <darin@apple.com>
Eliminate ResourceBuffer and use SharedBuffer directly instead
https://bugs.webkit.org/show_bug.cgi?id=138174
Reviewed by Antti Koivisto.
Refactoring, with test coverage across many existing tests.
* CMakeLists.txt: Deleted ResourceBuffer.cpp.
* WebCore.exp.in: Removed ResourceBuffer-related symbols, and updated symbol
for one function that used to take a PassRefPtr but now takes a reference instead.
* WebCore.vcxproj/WebCore.vcxproj: Deleted ResourceBuffer.cpp/.h.
* WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.
* WebCore.xcodeproj/project.pbxproj: Deleted ResourceBuffer.mm/.cpp/.h.
* bindings/objc/DOMUIKitExtensions.mm:
(-[DOMHTMLImageElement dataRepresentation:]): Use SharedBuffer directly.
* editing/ios/EditorIOS.mm:
(WebCore::Editor::writeImageToPasteboard): Ditto.
* editing/mac/EditorMac.mm:
(WebCore::Editor::writeImageToPasteboard): Ditto.
* html/ImageDocument.cpp:
(WebCore::ImageDocument::updateDuringParsing): Use SharedBuffer directly, and
also pass a reference only if non-null rather than passing a pointer.
(WebCore::ImageDocument::finishedParsing): Ditto. Added a missing null check.
* inspector/InspectorPageAgent.cpp:
(WebCore::InspectorPageAgent::cachedResourceContent): Use SharedBuffer directly.
(WebCore::InspectorPageAgent::mainResourceContent): Ditto.
* inspector/InspectorResourceAgent.cpp:
(WebCore::InspectorResourceAgent::didFinishLoading): Ditto.
(WebCore::InspectorResourceAgent::didFailLoading): Ditto.
* loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::mainResourceData): Use SharedBuffer directly,
and use the copy function rather than a hand-written alternative.
(WebCore::DocumentLoader::maybeCreateArchive): Ditto.
(WebCore::DocumentLoader::mainResource): Ditto.
(WebCore::DocumentLoader::subresource): Ditto.
(WebCore::DocumentLoader::maybeFinishLoadingMultipartContent): Ditto.
* loader/DocumentLoader.h: Changed mainResourceData to return a
PassRefPtr<SharedBuffer>. Would be better if it returned a SharedBuffer&,
but it currently returns a newly created buffer when there is substitute
data and can also return null, even though many callers assume it will not!
* loader/MediaResourceLoader.cpp:
(WebCore::MediaResourceLoader::dataReceived): Removed call to unused client
function bufferReceived.
(WebCore::MediaResourceLoader::notifyFinished): Removed unused buffer
argument to client function loadFinished.
* loader/ResourceBuffer.cpp: Removed.
* loader/ResourceBuffer.h: Removed.
* loader/ResourceLoader.cpp:
(WebCore::ResourceLoader::addDataOrBuffer): Use SharedBuffer directly.
* loader/ResourceLoader.h:
(WebCore::ResourceLoader::resourceData): Use SharedBuffer.
* loader/SubresourceLoader.cpp:
(WebCore::SubresourceLoader::didReceiveResponse): Use SharedBuffer.
(WebCore::SubresourceLoader::didReceiveDataOrBuffer): Ditto.
* loader/TextTrackLoader.cpp:
(WebCore::TextTrackLoader::processNewCueData): Use SharedBuffer.
* loader/appcache/ApplicationCacheGroup.cpp:
(WebCore::ApplicationCacheGroup::finishedLoadingMainResource): Ditto.
* loader/archive/cf/LegacyWebArchive.cpp:
(WebCore::LegacyWebArchive::create): Ditto.
* loader/cache/CachedCSSStyleSheet.cpp:
(WebCore::CachedCSSStyleSheet::finishLoading): Use SharedBuffer.
* loader/cache/CachedCSSStyleSheet.h: Ditto.
* loader/cache/CachedFont.cpp:
(WebCore::CachedFont::finishLoading): Ditto.
(WebCore::CachedFont::ensureCustomFontData): Ditto.
* loader/cache/CachedFont.h: Ditto.
* loader/cache/CachedImage.cpp:
(WebCore::CachedImage::didAddClient): Use SharedBuffer.
(WebCore::CachedImage::didRemoveClient): Ditto.
(WebCore::CachedImage::addIncrementalDataBuffer): Ditto. Changed to take
a reference rather than a pointer.
(WebCore::CachedImage::addDataBuffer): Ditto. Also added call through
to base class and changed to take a reference rather than a pointer.
(WebCore::CachedImage::addData): Ditto. Also added call through to base class.
(WebCore::CachedImage::finishLoading): Ditto.
* loader/cache/CachedImage.h: Ditto. Also changed the type of some bit fields
to be unsigned instead of unsigend char.
* loader/cache/CachedRawResource.cpp:
(WebCore::CachedRawResource::calculateIncrementalDataChunk): Use SharedBuffer.
(WebCore::CachedRawResource::addDataBuffer): Ditto. Changed to take
a reference rather than a pointer.
(WebCore::CachedRawResource::addData): Ditto.
(WebCore::CachedRawResource::finishLoading): Ditto.
(WebCore::CachedRawResource::canReuse): Ditto.
* loader/cache/CachedRawResource.h: Ditto.
* loader/cache/CachedResource.cpp:
(WebCore::CachedResource::CachedResource): Reordered data members due to change
in header.
(WebCore::CachedResource::addDataBuffer): Changed argument type.
(WebCore::CachedResource::finishLoading): Ditto.
(WebCore::CachedResource::didAddClient): Refactored to eliminate one extra hash
table lookup by using the return value from the remove function.
(WebCore::CachedResource::addClientToSet): Use std::make_unique directly instead
of using a function named "schedule" to allocate the callback object.
(WebCore::CachedResource::Callback::Callback): Changed function and data member
name.
(WebCore::CachedResource::Callback::cancel): Ditto.
(WebCore::CachedResource::Callback::timerFired): Ditto.
(WebCore::CachedResource::tryReplaceEncodedData): Changed to take a SharedBuffer&.
* loader/cache/CachedResource.h: Changed types to use SharedBuffer. Also made most
data members and one function member private instead of protected. Also renamed the
CachedResource::CachedResourceCallback function CachedResource::Callback and moved
its definition out of the CachedResource class definition.
* loader/cache/CachedResourceClient.h: Removed unneeded include.
* loader/cache/CachedSVGDocument.cpp:
(WebCore::CachedSVGDocument::finishLoading): Use SharedBuffer.
* loader/cache/CachedSVGDocument.h: Ditto. Made data members private.
* loader/cache/CachedScript.cpp:
(WebCore::CachedScript::finishLoading): Use SharedBuffer.
* loader/cache/CachedScript.h: Ditto. Also fixed indenting and removed unneeded
forward declaration.
* loader/cache/CachedTextTrack.cpp:
(WebCore::CachedTextTrack::updateData): Added, so that finishLoading does not
call addDataBuffer.
(WebCore::CachedTextTrack::addDataBuffer): Take SharedBuffer, call updateData.
(WebCore::CachedTextTrack::finishLoading): Ditto.
* loader/cache/CachedTextTrack.h: Take out unneeded explicit override of the
destructor. Updated for above changes.
* loader/cache/CachedXSLStyleSheet.cpp:
(WebCore::CachedXSLStyleSheet::finishLoading): Updated to use SharedBuffer.
* loader/cache/CachedXSLStyleSheet.h: Took out unneeded includes, made everything
private rather than protected. Added an explicit virtual constructor so we can
compile without knowing how to ref/deref TextResourceDecoder.
* loader/cf/SubresourceLoaderCF.cpp:
(WebCore::SubresourceLoader::didReceiveDataArray): Updated to use SharedBuffer
and to call addDataBuffer only if there is a new data buffer.
* loader/cocoa/DiskCacheMonitorCocoa.h: Use SharedBuffer& instead of PassRefPtr.
* loader/cocoa/DiskCacheMonitorCocoa.mm:
(WebCore::DiskCacheMonitor::DiskCacheMonitor): Ditto.
(WebCore::DiskCacheMonitor::resourceBecameFileBacked): Ditto.
* loader/icon/IconLoader.cpp:
(WebCore::IconLoader::notifyFinished): Use SharedBuffer* instead of
RefPtr<ResourceBuffer>.
* loader/mac/ResourceBuffer.mm: Removed.
* loader/mac/ResourceLoaderMac.mm:
(WebCore::ResourceLoader::didReceiveDataArray): Use SharedBuffer.
* platform/SharedBuffer.cpp:
(WebCore::SharedBuffer::clear): Use a modern for loop.
(WebCore::SharedBuffer::copy): Return a PassRef instead of a PassRefPtr, since
this never returns null. Use modern for loops.
(WebCore::SharedBuffer::copyBufferAndClear): Use a modern for loop.
* platform/SharedBuffer.h: Changed copy to return PassRef instead of PassRefPtr.
Changed tryReplaceContentsWithPlatformBuffer to take a reference rather than
a pointer.
* platform/cf/SharedBufferCF.cpp:
(WebCore::SharedBuffer::tryReplaceContentsWithPlatformBuffer): Take a reference
instead of a pointer.
* platform/graphics/PlatformMediaResourceLoader.h: Removed unused function
bufferReceived and unneeded buffer argument from loadFinished. Also marked the
constructor explicit.
* platform/graphics/avfoundation/cf/WebCoreAVCFResourceLoader.cpp:
Removed include of ResourceBuffer.h.
* platform/graphics/avfoundation/objc/WebCoreAVFResourceLoader.mm:
(WebCore::WebCoreAVFResourceLoader::fulfillRequestWithResource): Use
SharedBuffer directly.
* platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
(CachedResourceStreamingClient::loadFinished): Updated for change to
PlatformMediaResourceLoaderClient.
* platform/mac/PasteboardMac.mm: Removed include of ResourceBuffer.h.
* platform/soup/SharedBufferSoup.cpp: Removed unused, unneeded
tryReplaceContentsWithPlatformBuffer function.
2014-10-30 Chris Dumez <cdumez@apple.com>
Move border-image-source / -webkit-mask-box-image-source to the new StyleBuilder
https://bugs.webkit.org/show_bug.cgi?id=138209
Reviewed by Andreas Kling.
Move border-image-source / -webkit-mask-box-image-source CSS properties
from DeprecatedStyleBuilder to the new StyleBuilder so that they are
now generated from CSSPropertyNames.in.
No new tests, no behavior change.
* css/CSSPropertyNames.in:
* css/DeprecatedStyleBuilder.cpp:
(WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
(WebCore::ApplyPropertyBorderImageSource::applyValue): Deleted.
(WebCore::ApplyPropertyBorderImageSource::createHandler): Deleted.
* css/StyleBuilderConverter.h:
(WebCore::StyleBuilderConverter::convertBorderImageSource):
2014-10-30 Jer Noble <jer.noble@apple.com>
[EME] Add Setting for accessing storage location for MediaKeys data
https://bugs.webkit.org/show_bug.cgi?id=138147
Reviewed by Brady Eidson.
Allow MediaPlayerPrivateAVFoundationObjC to query for the MediaKeys storage directory
by piping that request down from WebKit and WebKit2 into Settings.
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::mediaKeysStorageDirectory): Get the location from Settings and
append the current origin.
* html/HTMLMediaElement.h:
* page/Settings.h:
(WebCore::Settings::setMediaKeysStorageDirectory): Simple setter.
(WebCore::Settings::mediaKeysStorageDirectory): Simple accessor.
* platform/graphics/MediaPlayer.cpp:
(WebCore::MediaPlayer::mediaKeysStorageDirectory): Pass through to m_client.
* platform/graphics/MediaPlayer.h:
(WebCore::MediaPlayerClient::mediaPlayerMediaKeysStorageDirectory): Default implementation.
* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::streamSession): Fetch the location from MediaPlayer.
(WebCore::sessionStorageDirectory): Deleted.
2014-10-30 Dana Burkart <dburkart@apple.com>
<rdar://problem/18821260> Prepare for the mysterious future
Reviewed by Lucas Forschler.
* Configurations/Base.xcconfig:
* Configurations/DebugRelease.xcconfig:
* Configurations/FeatureDefines.xcconfig:
* Configurations/Version.xcconfig:
2014-10-30 Simon Fraser <simon.fraser@apple.com>
Short-circuit repaints with empty rects
https://bugs.webkit.org/show_bug.cgi?id=138234
Reviewed by Zalan Bujtas.
Repaints with an empty rectangle are common enough that it's worth
short-circuiting them.
* rendering/RenderObject.cpp:
(WebCore::RenderObject::repaintUsingContainer):
2014-10-30 Chris Dumez <cdumez@apple.com>
Clean up virtual functions in css/
https://bugs.webkit.org/show_bug.cgi?id=138230
Reviewed by Benjamin Poulain.
Clean up virtual functions in css/ by:
- Making virtual functions final when possible
- Making classes final when possible
- Using 'override' when appropriate
- Explicitly marking functions / destructors as virtual when they are
inherently virtual
- Making isXXX() virtual functions private on XXX classes to avoid
unnecessary type checks
No new tests, no behavior change.
* WebCore.exp.in:
* css/CSSBasicShapes.h:
* css/CSSCharsetRule.h:
* css/CSSComputedStyleDeclaration.h:
* css/CSSCrossfadeValue.h:
* css/CSSFilterImageValue.h:
* css/CSSFontFaceLoadEvent.h:
* css/CSSFontFaceRule.h:
* css/CSSFontFaceSource.h:
* css/CSSImportRule.h:
* css/CSSMediaRule.h:
* css/CSSPageRule.h:
* css/CSSRuleList.h:
(WebCore::StaticCSSRuleList::ref): Deleted.
(WebCore::StaticCSSRuleList::styleSheet): Deleted.
(WebCore::StaticCSSRuleList::length): Deleted.
(WebCore::StaticCSSRuleList::item): Deleted.
(WebCore::LiveCSSRuleList::ref): Deleted.
(WebCore::LiveCSSRuleList::deref): Deleted.
(WebCore::LiveCSSRuleList::length): Deleted.
(WebCore::LiveCSSRuleList::item): Deleted.
(WebCore::LiveCSSRuleList::styleSheet): Deleted.
* css/CSSStyleRule.h:
* css/CSSSupportsRule.h:
* css/CSSUnknownRule.h:
* css/FontLoader.h:
* css/PropertySetCSSStyleDeclaration.h:
(WebCore::PropertySetCSSStyleDeclaration::parentElement):
* css/WebKitCSSKeyframeRule.h:
* css/WebKitCSSViewportRule.h:
2014-10-30 Tim Horton <timothy_horton@apple.com>
Long spins under rangeExpandedAroundPosition on Yahoo Mail
https://bugs.webkit.org/show_bug.cgi?id=138223
<rdar://problem/18819547>
Reviewed by Enrica Casucci.
* WebCore.exp.in:
Export some things.
2014-10-30 Ada Chan <adachan@apple.com>
The Page's muted setting should not affect the HTMLMediaElement's 'muted' IDL attribute.
https://bugs.webkit.org/show_bug.cgi?id=138215
Reviewed by Eric Carlson.
Add m_muted in Page to keep track of the Page's muted state. Change AudioProducer::setMuted()
to pageMutedStateDidChange(). When that method is called, the AudioProducer is supposed to
update its muted state again taking the Page's muted state into account.
Add HTMLMediaElement::effectiveMuted(), which returns the effective muted state of the
HTMLMediaElement, taking the Page's muted state into account.
Test: media/video-muted-after-setting-page-muted-state.html
* dom/Document.cpp:
(WebCore::Document::pageMutedStateDidChange):
(WebCore::Document::setMuted): Deleted.
* dom/Document.h:
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::setMuted):
Set the MediaPlayer's muted state to the result of effectiveMuted() rather than m_muted.
(WebCore::HTMLMediaElement::updateVolume):
Ditto, and also make sure the MediaController's muted state does not override the Page's
muted state.
(WebCore::HTMLMediaElement::updatePlayState):
Set the MediaPlayer's muted state to the result of effectiveMuted() rather than muted().
(WebCore::HTMLMediaElement::pageMutedStateDidChange):
Call updateVolume(), which will update the MediaPlayer's muted state.
(WebCore::HTMLMediaElement::effectiveMuted):
Figure out the muted value taking Page's muted state into account.
* html/HTMLMediaElement.h:
* page/AudioProducer.h:
* page/Page.cpp:
(WebCore::Page::Page):
(WebCore::Page::setMuted):
Update m_muted, and only iterate through the frames' documents to call pageMutedStateDidChange()
if m_muted changes.
* page/Page.h:
(WebCore::Page::isMuted):
* testing/Internals.cpp:
(WebCore::Internals::setPageMuted):
Expose a way to set the Page's muted state in Internals for testing.
* testing/Internals.h:
* testing/Internals.idl:
2014-10-30 Myles C. Maxfield <mmaxfield@apple.com>
Use references in calculateMinimumPageHeight() for non-optional arguments
https://bugs.webkit.org/show_bug.cgi?id=138231
Reviewed by Dean Jackson.
No new tests because there is no behavior change.
* rendering/RenderBlockFlow.cpp:
(WebCore::calculateMinimumPageHeight):
(WebCore::RenderBlockFlow::adjustLinePositionForPagination):
2014-10-30 Chris Dumez <cdumez@apple.com>
Move -webkit-border-image / -webkit-mask-box-image to the new StyleBuilder
https://bugs.webkit.org/show_bug.cgi?id=138207
Reviewed by Andreas Kling.
Move -webkit-border-image / -webkit-mask-box-image CSS properties to
the new StyleBuilder so that they are now generated from
CSSPropertyNames.in.
No new tests, no behavior change.
* css/CSSPropertyNames.in:
* css/DeprecatedStyleBuilder.cpp:
(WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
(WebCore::ApplyPropertyBorderImage::applyValue): Deleted.
(WebCore::ApplyPropertyBorderImage::createHandler): Deleted.
* css/StyleBuilderConverter.h:
(WebCore::StyleBuilderConverter::convertBorderImage):
(WebCore::StyleBuilderConverter::convertBorderMask):
2014-10-30 Chris Dumez <cdumez@apple.com>
Optimize HTMLVideoElement / HTMLAudioElement type checks a bit
https://bugs.webkit.org/show_bug.cgi?id=138202
Reviewed by Benjamin Poulain.
Optimize HTMLVideoElement / HTMLAudioElement type checks a bit by:
1. Using is<HTMLMediaElement>() instead of
(is<HTMLVideoElement>() || is<HTMLAudioElement>()) if the caller is
interested in both video and audio elements. This is faster because
it ends up doing:
- virtual call to Element::isMediaElement()
instead of
- Node::isHTMLElement() +
virtual call to HTMLElement::isHTMLUnknownElement() +
2 * HTMLElement::hasTagName()
2. Updating HTMLVideoElement / HTMLAudioElement type traits
specializations to:
- Avoid doing any virtual function call if the input type is an
HTMLMediaElement (which is common in the code base).
- Speed up check if the input is an Element by doing:
- virtual call to Element::isMediaElement() +
HTMLElement::hasTagName()
instead of
- Node::isHTMLElement() +
virtual call to !HTMLElement::isHTMLUnknownElement() +
HTMLElement::hasTagName()
The speed stays the same if the input is a Node or an HTMLElement.
No new tests, no behavior change.
* css/CSSDefaultStyleSheets.cpp:
(WebCore::CSSDefaultStyleSheets::ensureDefaultStyleSheetsForElement):
* dom/make_names.pl:
(defaultTagPropertyHash):
(printTypeHelpers):
* html/HTMLAudioElement.h:
(isType):
* html/HTMLImageLoader.cpp:
* html/HTMLTagNames.in:
* html/HTMLVideoElement.h:
(isType):
* page/ChromeClient.h:
2014-10-30 Myles C. Maxfield <mmaxfield@apple.com>
Migrate ComplexTextControllerCoreText to use SPI instead of WKSI
https://bugs.webkit.org/show_bug.cgi?id=138228
Reviewed by Simon Fraser.
No new tests because there is no behavior change.
* WebCore.xcodeproj/project.pbxproj:
* platform/graphics/mac/ComplexTextControllerCoreText.mm:
(WebCore::ComplexTextController::ComplexTextRun::ComplexTextRun):
(WebCore::ComplexTextController::collectComplexTextRunsForCharacters):
* platform/spi/cocoa/CoreTextSPI.h: Added.
2014-10-30 Eric Carlson <eric.carlson@apple.com>
Add diagnostic logging to track page loads.
https://bugs.webkit.org/show_bug.cgi?id=138205
<rdar://problem/18173017>
Reviewed by Jer Noble.
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::checkLoadCompleteForThisFrame): Log page load success or failure.
* page/DiagnosticLoggingKeys.cpp:
(WebCore::DiagnosticLoggingKeys::pageLoadedKey): New.
* page/DiagnosticLoggingKeys.h:
2014-10-24 Philippe Normand <pnormand@igalia.com>
[GStreamer] Video resolution changes trigger a crash in the TextureMapper
https://bugs.webkit.org/show_bug.cgi?id=137065
Reviewed by Gustavo Noronha Silva.
Switch to GstSample for buffer+caps communication between the
video sink and the player. Using a single object type for this
avoid issues where the caps might not correctly describe the
buffer contents anymore, for example when the video resolution is
changed.
* platform/graphics/gstreamer/ImageGStreamer.h: Use GstSample
instead of GstBuffer+GstCaps.
(WebCore::ImageGStreamer::createImage):
* platform/graphics/gstreamer/ImageGStreamerCairo.cpp: Ditto.
(ImageGStreamer::ImageGStreamer):
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
(WebCore::mediaPlayerPrivateRepaintCallback): The repaint signal
now uses a GstSample instead of a GstBuffer.
(WebCore::MediaPlayerPrivateGStreamerBase::MediaPlayerPrivateGStreamerBase):
Store the current sample instead of a buffer. Also renamed the
mutex protecting access to the sample.
(WebCore::MediaPlayerPrivateGStreamerBase::~MediaPlayerPrivateGStreamerBase): Ditto.
(WebCore::MediaPlayerPrivateGStreamerBase::naturalSize): Return
early if no sample is available. The caps used to get the video
size are store in the sample.
(WebCore::MediaPlayerPrivateGStreamerBase::updateTexture): Use
GstSample instead of GstBuffer.
(WebCore::MediaPlayerPrivateGStreamerBase::triggerRepaint): Ditto.
(WebCore::MediaPlayerPrivateGStreamerBase::paint): Ditto.
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h:
* platform/graphics/gstreamer/VideoSinkGStreamer.cpp: Now store a
GstSample internally. Also removed the now useless current-caps property.
(_WebKitVideoSinkPrivate::_WebKitVideoSinkPrivate): Renamed the
mutex protecting access to the sample.
(_WebKitVideoSinkPrivate::~_WebKitVideoSinkPrivate): Ditto.
(webkit_video_sink_init): Disable last-sample in basesink since we
already store one in our sink anyway.
(webkitVideoSinkTimeoutCallback): Switch to GstSample.
(webkitVideoSinkRender): Ditto.
(unlockSampleMutex): Ditto.
(webkitVideoSinkUnlock): Ditto.
(webkitVideoSinkUnlockStop): Ditto.
(webkitVideoSinkStop): Ditto!
(webkitVideoSinkStart): Ditto.
(webkit_video_sink_class_init): Drop current-caps property.
(webkitVideoSinkGetProperty): Deleted.
(unlockBufferMutex): Deleted.
2014-10-30 Carlos Garcia Campos <cgarcia@igalia.com>
FormDataBuilder should not use Document
https://bugs.webkit.org/show_bug.cgi?id=138172
Reviewed by Alexey Proskuryakov.
It's only used by encodingFromAcceptCharset() to fallback to
document input encoding. That method is only used by
FormSubmission::create(), so it could be moved as a static
function to FormSubmission.cpp.
* loader/FormSubmission.cpp:
(WebCore::encodingFromAcceptCharset):
(WebCore::FormSubmission::create):
* platform/network/FormDataBuilder.cpp:
(WebCore::FormDataBuilder::encodingFromAcceptCharset): Deleted.
* platform/network/FormDataBuilder.h:
2014-10-29 Said Abou-Hallawa <sabouhallawa@apple.com>
ASSERTION NOT REACHED because RenderStyle::setWordSpacing() does not handle a Length value of type 'Calculated'.
https://bugs.webkit.org/show_bug.cgi?id=138054.
Reviewed by Zalan Bujtas.
A Length of type 'Calculated' can be generated from blending two lengths of
different types. Setting the wordSpacing of the render style should be handled
correctly when the type of the new value is 'Calculated'.
Tests: css3/calculated-word-spacing.html.
Add a case for setting the render style wordSpacing to a <length> of type 'Calculated'.
* rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::setWordSpacing):
2014-10-29 Hunseop Jeong <hs85.jeong@samsung.com>
[CoordinatedGraphics] Use modern for-loops
https://bugs.webkit.org/show_bug.cgi?id=138168
Reviewed by Andreas Kling.
No new tests as there is no change in functionality.
* platform/graphics/texmap/coordinated/CompositingCoordinator.cpp: Use a modern for loop.
(WebCore::CompositingCoordinator::renderNextFrame):
(WebCore::CompositingCoordinator::paintToSurface):
* platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp: Use a modern for loop.
(WebCore::CoordinatedGraphicsLayer::setShouldUpdateVisibleRect):
(WebCore::CoordinatedGraphicsLayer::flushCompositingState):
(WebCore::CoordinatedGraphicsLayer::syncChildren):
(WebCore::CoordinatedGraphicsLayer::syncPendingStateChangesIncludingSubLayers):
(WebCore::CoordinatedGraphicsLayer::findFirstDescendantWithContentsRecursively):
(WebCore::CoordinatedGraphicsLayer::updateContentBuffersIncludingSubLayers):
* platform/graphics/texmap/coordinated/CoordinatedImageBacking.cpp: Use a modern for loop.
(WebCore::CoordinatedImageBacking::updateVisibilityIfNeeded):
2014-10-29 Chris Dumez <cdumez@apple.com>
Final-ize more of TextFieldInputType's virtual functions
https://bugs.webkit.org/show_bug.cgi?id=138194
Reviewed by Andreas Kling.
Final-ize more of TextFieldInputType's virtual functions for
performance.
No new tests, no behavior change.
* html/TextFieldInputType.h:
2014-10-29 Chris Dumez <cdumez@apple.com>
Clean up virtual functions in inspector/
https://bugs.webkit.org/show_bug.cgi?id=138190
Reviewed by Andreas Kling.
Clean up virtual functions in inspector/ by:
- Making virtual functions final when possible
- Making classes final when possible
- Explicitly marking functions / destructors as virtual when they are
inherently virtual
- Making isXXX() virtual functions private on XXX classes to avoid
unnecessary type checks
No new tests, no behavior change.
* inspector/InspectorApplicationCacheAgent.h:
(WebCore::InspectorApplicationCacheAgent::~InspectorApplicationCacheAgent): Deleted.
* inspector/InspectorCSSAgent.h:
* inspector/InspectorDOMAgent.h:
* inspector/InspectorDOMDebuggerAgent.h:
* inspector/InspectorDOMStorageAgent.h:
* inspector/InspectorDatabaseAgent.h:
* inspector/InspectorFrontendClientLocal.h:
* inspector/InspectorIndexedDBAgent.h:
* inspector/InspectorLayerTreeAgent.h:
* inspector/InspectorPageAgent.h:
* inspector/InspectorReplayAgent.h:
* inspector/InspectorResourceAgent.h:
* inspector/InspectorStyleSheet.h:
* inspector/InspectorTimelineAgent.h:
* inspector/InspectorWorkerAgent.h:
* inspector/PageConsoleAgent.h:
* inspector/WorkerInspectorController.h:
2014-10-29 Andreas Kling <akling@apple.com>
Generalize dirtying of parent's line boxes when taking a renderer out of tree.
<https://webkit.org/b/138152>
Reviewed by Antti Koivisto.
Instead of calling dirtyLinesFromChangedChild() when certain types of renderers
are about to be destroyed, always do this in RenderElement::willBeRemovedFromTree().
This is part of an effort to make render tree teardown less incomprehensible.
We still don't bother at all if we're in the process of tearing down the entire
render tree, since that would be a waste of time.
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::willBeDestroyed):
* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::willBeDestroyed):
* rendering/RenderElement.cpp:
(WebCore::RenderElement::willBeRemovedFromTree):
* rendering/RenderInline.cpp:
(WebCore::RenderInline::willBeDestroyed):
* rendering/RenderReplaced.cpp:
(WebCore::RenderReplaced::willBeDestroyed): Deleted.
* rendering/RenderReplaced.h:
2014-10-28 Ada Chan <adachan@apple.com>
Implement WKPageSetMuted(bool).
https://bugs.webkit.org/show_bug.cgi?id=138158
Reviewed by Anders Carlsson.
* WebCore.exp.in:
* page/Page.h:
2014-10-29 Alexey Proskuryakov <ap@apple.com>
Notify Settings object when its Page object goes away.
https://bugs.webkit.org/show_bug.cgi?id=138183
rdar://problem/18786900
Reviewed by Andreas Kling.
I could not make a test for this issue.
* page/Page.cpp:
(WebCore::Page::~Page):
* page/Settings.cpp:
(WebCore::setImageLoadingSettings):
(WebCore::Settings::Settings):
(WebCore::Settings::setTextAutosizingEnabled):
(WebCore::Settings::setTextAutosizingWindowSizeOverride):
(WebCore::Settings::setTextAutosizingFontScaleFactor):
(WebCore::Settings::setMediaTypeOverride):
(WebCore::Settings::setScriptEnabled):
(WebCore::Settings::setUserStyleSheetLocation):
(WebCore::Settings::setMinDOMTimerInterval):
(WebCore::Settings::minDOMTimerInterval):
(WebCore::Settings::domTimerAlignmentInterval):
(WebCore::Settings::setUsesPageCache):
(WebCore::Settings::setScreenFontSubstitutionEnabled):
(WebCore::Settings::setFontRenderingMode):
(WebCore::Settings::setDNSPrefetchingEnabled):
(WebCore::Settings::setStorageBlockingPolicy):
(WebCore::Settings::setBackgroundShouldExtendBeyondPage):
(WebCore::Settings::setScrollingPerformanceLoggingEnabled):
(WebCore::Settings::setHiddenPageDOMTimerThrottlingEnabled):
(WebCore::Settings::setHiddenPageCSSAnimationSuspensionEnabled):
(WebCore::Settings::setFontFallbackPrefersPictographs):
* page/Settings.h:
(WebCore::Settings::pageDestroyed):
2014-10-29 Zalan Bujtas <zalan@apple.com>
Remove invalid float from RootInlineBox.
https://bugs.webkit.org/show_bug.cgi?id=137707
Reviewed by Antti Koivisto.
In certain cases, floating boxes get attached to the last (root) inline box.
When this particular floating box gets destroyed, it also needs to be detached
from the last inline box.
1. Introduce RootInlineBox::removeFloat() (vs. RootInlineBox::appendFloat())
2. Ensure that it is called when the floating box is being destroyed.
Test: fast/inline/crash-when-inline-box-has-invalid-float.html
* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::removeFloatingObject):
(WebCore::RenderBlockFlow::markAllDescendantsWithFloatsForLayout): During style recalc, while
tearing down the render tree, we can get to a state where a block element has both inline and block children.
It happens when the style change on an element makes sibling anonymous block wrappers detached.
In that case the markAllDescendantsWithFloatsForLayout() call does not get propagated down on the
block child elements as we return early at the childrenInline() check.
* rendering/RootInlineBox.h:
(WebCore::RootInlineBox::removeFloat):
2014-10-29 Antti Koivisto <antti@apple.com>
Factor cache validity computation functions out of CachedResource
https://bugs.webkit.org/show_bug.cgi?id=138156
Reviewed by Andreas Kling.
These can be used to implement cache logic on WebKit level.
* CMakeLists.txt:
* WebCore.exp.in:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.xcodeproj/project.pbxproj:
* loader/CacheValidation.cpp: Added.
(WebCore::computeCurrentAge):
(WebCore::computeFreshnessLifetimeForHTTPFamily):
(WebCore::updateRedirectChainStatus):
(WebCore::redirectChainAllowsReuse):
* loader/CacheValidation.h: Added.
(WebCore::RedirectChainCacheStatus::RedirectChainCacheStatus):
* loader/cache/CachedResource.cpp:
(WebCore::updateResponseHeadersAfterRevalidation):
(WebCore::CachedResource::CachedResource):
(WebCore::CachedResource::isExpired):
(WebCore::CachedResource::freshnessLifetime):
(WebCore::CachedResource::willSendRequest):
(WebCore::CachedResource::updateResponseAfterRevalidation):
(WebCore::CachedResource::redirectChainAllowsReuse):
(WebCore::currentAge): Deleted.
* loader/cache/CachedResource.h:
2014-10-29 Antti Koivisto <antti@apple.com>
Unreviewed, rolling out r175342.
a file ended up in a wrong directory
Reverted changeset:
"Factor cache validity computation functions out of
CachedResource"
https://bugs.webkit.org/show_bug.cgi?id=138156
http://trac.webkit.org/changeset/175342
2014-10-29 Antti Koivisto <antti@apple.com>
Factor cache validity computation functions out of CachedResource
https://bugs.webkit.org/show_bug.cgi?id=138156
Reviewed by Andreas Kling.
These can be used to implement cache logic on WebKit level.
* CMakeLists.txt:
* WebCore.exp.in:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.xcodeproj/project.pbxproj:
* loader/CacheValidation.cpp: Added.
(WebCore::computeCurrentAge):
(WebCore::computeFreshnessLifetimeForHTTPFamily):
(WebCore::updateRedirectChainStatus):
(WebCore::redirectChainAllowsReuse):
* loader/CacheValidation.h: Added.
(WebCore::RedirectChainCacheStatus::RedirectChainCacheStatus):
* loader/cache/CachedResource.cpp:
(WebCore::updateResponseHeadersAfterRevalidation):
(WebCore::CachedResource::CachedResource):
(WebCore::CachedResource::isExpired):
(WebCore::CachedResource::freshnessLifetime):
(WebCore::CachedResource::willSendRequest):
(WebCore::CachedResource::updateResponseAfterRevalidation):
(WebCore::CachedResource::redirectChainAllowsReuse):
(WebCore::currentAge): Deleted.
* loader/cache/CachedResource.h:
2014-10-28 Ada Chan <adachan@apple.com>
Add API to mute/unmute a page.
https://bugs.webkit.org/show_bug.cgi?id=138150
Reviewed by Eric Carlson.
No new tests, since it's difficult to test whether the Page has indeed been muted.
* dom/Document.cpp:
(WebCore::Document::setMuted):
Go through each AudioProducer and call setMuted() on it.
* dom/Document.h:
* page/AudioProducer.h:
Add setMuted(bool). HTMLMediaElement, the only derived class of AudioProducer so far,
has already implemented setMuted().
* page/Page.cpp:
(WebCore::Page::setMuted):
Go through all its frames and call setMuted() on each frame's Document.
* page/Page.h:
2014-10-29 Tim Horton <timothy_horton@apple.com>
Implement action menus for data detected items
https://bugs.webkit.org/show_bug.cgi?id=138178
<rdar://problem/18709436>
Reviewed by Anders Carlsson.
* WebCore.exp.in:
Export a symbol from Position that we need.
* WebCore.xcodeproj/project.pbxproj:
* platform/spi/mac/DataDetectorsSPI.h:
Add a combined SPI header for all of the random bits of DataDetectors that we use.
2014-10-29 Jer Noble <jer.noble@apple.com>
[EME] NULL-dereference crash in MediaKeys::setMediaElement().
https://bugs.webkit.org/show_bug.cgi?id=138177
Reviewed by Eric Carlson.
NULL-check m_mediaElement->player() before using. It may have been cleared if the HTMLMediaElement
has previously had stop() called.
* Modules/encryptedmedia/MediaKeys.cpp:
(WebCore::MediaKeys::setMediaElement):
2014-10-29 Jer Noble <jer.noble@apple.com>
[EME] MediaKeySession resources persist across page reloads
https://bugs.webkit.org/show_bug.cgi?id=138176
Reviewed by Eric Carlson.
MediaKeySession is an ActiveDOMObject, so when told to stop() by our execution context,
close() the session, releasing all our resources.
* Modules/encryptedmedia/MediaKeySession.h:
2014-10-29 Jer Noble <jer.noble@apple.com>
[EME][Mac] MediaKeySession type "keyrelease" is ignored.
https://bugs.webkit.org/show_bug.cgi?id=138175
Reviewed by Eric Carlson.
To indicate that they would like to recevie expired session confirmation messages, clients
will create a MediaKeySession with a type parameter of "keyrelease". The code which validates
this type needs to be updated to recognize "keyrelease" as a valid type.
Also, the code which validates update() requests needs to allow updates containing the string
"acknowledged", so that clients can request the confirmation messages be discarded.
* platform/graphics/avfoundation/CDMPrivateMediaSourceAVFObjC.mm:
(WebCore::CDMPrivateMediaSourceAVFObjC::supportsMIMEType):
* platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.mm:
(WebCore::CDMSessionMediaSourceAVFObjC::update):
2014-10-28 Ada Chan <adachan@apple.com>
Remove MediaSessionClient::hasMediaCharacteristics() and MediaSessionClient::mediaStateDidChange().
https://bugs.webkit.org/show_bug.cgi?id=138153
Reviewed by Jer Noble.
After http://trac.webkit.org/changeset/175273, Document no longer keeps a set of MediaSessions
and it doesn't need to query each MediaSession for its characteristics and play state.
MediaSessionClient::hasMediaCharacteristics() is no longer needed and MediaSessionClient::mediaStateDidChange()
can be removed if HTMLMediaElement calls Document::updateIsPlayingAudio() after m_playing has changed.
No new tests, no behavior change.
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::updatePlayState):
Call setPlaying() rather than setting m_playing directly.
(WebCore::HTMLMediaElement::setPlaying):
Update m_playing. If it has changed, call Document::updateIsPlayingAudio().
(WebCore::HTMLMediaElement::setPausedInternal):
Call setPlaying() rather than setting m_playing directly.
(WebCore::HTMLMediaElement::isPlayingAudio):
Call isPlaying() directly rather than checking the MediaSession's state.
* html/HTMLMediaElement.h:
* platform/audio/MediaSession.cpp:
(WebCore::MediaSession::setState):
MediaSessionClient::mediaStateDidChange() has been removed.
(WebCore::MediaSession::hasMediaCharacteristics): Deleted.
* platform/audio/MediaSession.h:
(WebCore::MediaSessionClient::mediaStateDidChange): Deleted.
* platform/audio/ios/AudioDestinationIOS.h:
* platform/audio/mac/AudioDestinationMac.h:
2014-10-29 Chris Dumez <cdumez@apple.com>
Clean up virtual functions in html/
https://bugs.webkit.org/show_bug.cgi?id=138166
Reviewed by Andreas Kling.
Clean up virtual functions in html/ by:
- Making virtual functions final when possible
- Making classes final when possible
- Using 'override' when appropriate
- Explicitly marking functions / destructors as virtual when they are
inherently virtual
- Dropping virtual destructors when the class does not have subclasses
and mark the class as final, to get rid of unnecessary vtables
- Making isXXX() virtual functions private on XXX classes to avoid
unnecessary type checks
- De-virtualizing some functions that do not need to be virtual
- Dropping final for virtual functions in classes already marked as
final
No new tests, no behavior change.
* html/ButtonInputType.h:
* html/CheckboxInputType.h:
* html/ColorInputType.h:
* html/DOMSettableTokenList.h:
* html/DateInputType.h:
* html/DateTimeInputType.h:
* html/DateTimeLocalInputType.h:
* html/EmailInputType.h:
* html/FTPDirectoryDocument.h:
* html/HTMLAnchorElement.h:
* html/HTMLDetailsElement.cpp:
* html/HTMLFormControlElement.h:
* html/HTMLFormControlsCollection.h:
* html/HTMLFrameElement.h:
* html/HTMLFrameElementBase.h:
* html/HTMLFrameOwnerElement.h:
* html/HTMLInputElement.h:
* html/HTMLMarqueeElement.h:
* html/HTMLMediaElement.h:
* html/HTMLMediaSession.h:
(WebCore::HTMLMediaSession::requiresPlaybackTargetRouteMonitoring): Deleted.
* html/HTMLMeterElement.h:
* html/HTMLNameCollection.h:
* html/HTMLObjectElement.h:
* html/HTMLOptGroupElement.h:
* html/HTMLOptionElement.h:
* html/HTMLSpanElement.h:
* html/HTMLStyleElement.h:
* html/HTMLSummaryElement.cpp:
* html/HTMLSummaryElement.h:
* html/HTMLUnknownElement.h:
* html/HTMLVideoElement.h:
* html/HiddenInputType.h:
* html/ImageInputType.h:
* html/MediaKeyEvent.h:
* html/MonthInputType.h:
* html/NumberInputType.h:
* html/PasswordInputType.h:
* html/PublicURLManager.h:
* html/RadioInputType.h:
* html/ResetInputType.h:
* html/SubmitInputType.h:
* html/TelephoneInputType.h:
* html/TextInputType.h:
* html/TimeInputType.h:
* html/URLInputType.h:
* html/WeekInputType.h:
* html/canvas/ANGLEInstancedArrays.h:
* html/canvas/CanvasRenderingContext2D.h:
* html/canvas/DOMPath.h:
* html/canvas/EXTShaderTextureLOD.h:
* html/canvas/EXTTextureFilterAnisotropic.h:
* html/canvas/OESElementIndexUint.h:
* html/canvas/OESStandardDerivatives.h:
* html/canvas/OESTextureFloat.h:
* html/canvas/OESTextureFloatLinear.h:
* html/canvas/OESTextureHalfFloat.h:
* html/canvas/OESTextureHalfFloatLinear.h:
* html/canvas/OESVertexArrayObject.h:
* html/canvas/WebGLBuffer.h:
* html/canvas/WebGLCompressedTextureATC.h:
* html/canvas/WebGLCompressedTexturePVRTC.h:
* html/canvas/WebGLCompressedTextureS3TC.h:
* html/canvas/WebGLContextAttributes.h:
* html/canvas/WebGLContextEvent.h:
* html/canvas/WebGLDebugRendererInfo.h:
* html/canvas/WebGLDebugShaders.h:
* html/canvas/WebGLDepthTexture.h:
* html/canvas/WebGLDrawBuffers.h:
* html/canvas/WebGLFramebuffer.h:
(WebCore::WebGLFramebuffer::isFramebuffer): Deleted.
* html/canvas/WebGLLoseContext.h:
* html/canvas/WebGLProgram.h:
* html/canvas/WebGLRenderbuffer.h:
* html/canvas/WebGLRenderingContext.h:
* html/canvas/WebGLShader.h:
* html/canvas/WebGLSharedObject.h:
(WebCore::WebGLSharedObject::isFramebuffer): Deleted.
* html/canvas/WebGLTexture.h:
* html/canvas/WebGLVertexArrayObjectOES.h:
(WebCore::WebGLVertexArrayObjectOES::isVertexArray): Deleted.
* html/shadow/ImageControlsRootElement.h:
* html/shadow/InsertionPoint.h:
* html/shadow/MediaControlElementTypes.h:
* html/shadow/MediaControlElements.h:
* html/shadow/MediaControls.h:
* html/shadow/MediaControlsApple.h:
* html/shadow/SpinButtonElement.h:
* html/track/AudioTrack.h:
* html/track/AudioTrackList.h:
* html/track/DataCue.h:
(WebCore::DataCue::cueType): Deleted.
* html/track/InbandDataTextTrack.h:
* html/track/InbandGenericTextTrack.h:
* html/track/InbandTextTrack.h:
* html/track/InbandWebVTTTextTrack.h:
* html/track/LoadableTextTrack.h:
* html/track/TextTrackList.h:
* html/track/TrackEvent.h:
* html/track/VTTCue.h:
(WebCore::VTTCueBox::setFontSizeFromCaptionUserPrefs):
* html/track/VTTRegion.h:
* html/track/VideoTrack.h:
* html/track/VideoTrackList.h:
* html/track/WebVTTParser.h:
(WebCore::WebVTTCueData::~WebVTTCueData): Deleted.
2014-10-17 Sergio Villar Senin <svillar@igalia.com>
ASSERTION FAILED: growthShare > 0 in WebCore::RenderGrid::distributeSpaceToTracks
https://bugs.webkit.org/show_bug.cgi?id=137772
Reviewed by Andreas Kling.
We're hitting the ASSERTION because if the number of tracks an
item spans does greatly exceed the available logical space, then
the result of the division availableLogicalSpace/numberOfTracks is
truncated to 0. So the ASSERTION was theoretically right because
the result has to be always >0 (as the dividend > 0) but the fact
that the result is a LayoutUnit forces us to accept 0 as a valid
outcome of the operation.
Test: fast/css-grid-layout/tracks-number-greatly-exceeding-available-size-crash.html
* rendering/RenderGrid.cpp:
(WebCore::RenderGrid::distributeSpaceToTracks):
2014-10-29 Chris Dumez <cdumez@apple.com>
Crash in CachedRawResource::canReuse() when reloading http://dnd.wizards.com/dungeons-and-dragons/story
https://bugs.webkit.org/show_bug.cgi?id=138164
Reviewed by Andreas Kling.
This patch fixes a crash when reloading the following URL:
http://dnd.wizards.com/dungeons-and-dragons/story
We were crashing in CachedRawResource::canReuse() because header.key
would sometimes be a null String and we would call
HashMap::get(nullString).
The real issue was that header.key was null in the first place, which
means that even though the HTTPHeaderMap iterator is valid, it->key
is a null String, which should never happen. There was a bug in the
HTTPHeaderMapConstIterator() constructor that would cause the
iterator key/value pair to not get initialized if the HTTPHeaderMap
contained *only* uncommon HTTP headers. This patch updates the
constructor so that we fall back to updating the key/value from the
uncommon header map, if we failed to initialized from the common
header map (because it was empty).
Test: http/tests/cache/xhr-uncommon-header.html
* platform/network/HTTPHeaderMap.h:
(WebCore::HTTPHeaderMap::HTTPHeaderMapConstIterator::HTTPHeaderMapConstIterator):
2014-10-28 Benjamin Poulain <benjamin@webkit.org>
CSS4 Selectors: Add the pseudo class :any-link
https://bugs.webkit.org/show_bug.cgi?id=138128
Reviewed by Andreas Kling.
Defined here: http://dev.w3.org/csswg/selectors4/#the-any-link-pseudo
After :link and :-webkit-any-link were fixed, :any-link behaves
exactly like :-webkit-any-link. All I had left to do here was
make them synonyms when evaluating selectors.
Defined here: http://dev.w3.org/csswg/selectors4/#the-any-link-pseudo
After :link and :-webkit-any-link were fixed, :any-link behaves
exactly like :-webkit-any-link. All I had left to do here was
make them synonyms when evaluating selectors.
Tests: fast/selectors/any-link-basics-2.html
fast/selectors/any-link-basics.html
fast/selectors/any-link-styling.html
* css/CSSSelector.cpp:
(WebCore::CSSSelector::selectorText):
* css/CSSSelector.h:
* css/RuleSet.cpp:
(WebCore::RuleSet::addRule):
* css/SelectorChecker.cpp:
(WebCore::SelectorChecker::checkOne):
* css/SelectorChecker.h:
(WebCore::SelectorChecker::isCommonPseudoClassSelector):
* css/SelectorPseudoClassAndCompatibilityElementMap.in:
* cssjit/SelectorCompiler.cpp:
(WebCore::SelectorCompiler::addPseudoClassType):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementLinkMatching):
2014-10-28 Jer Noble <jer.noble@apple.com>
[EME][Mac] Adopt new AVStreamSession API: pass storageDirectoryAtURL at creation-time
https://bugs.webkit.org/show_bug.cgi?id=138149
Reviewed by Brent Fulgham.
AVStreamSession now requires its storage location at creation-time, rather than post-creation. This requires
us to move storage location code from CDMSessionMediaSourceAVFObjC to MediaPlayerPrivateMediaSourceAVFObjC.
* platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.mm:
(-[WebAVStreamDataParserListener streamDataParserWillProvideContentKeyRequestInitializationData:forTrackID:]): Renamed.
(WebCore::CDMSessionMediaSourceAVFObjC::update):
(WebCore::sessionStorageDirectory): Deleted.
* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
(WebCore::sessionStorageDirectory):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::streamSession):
2014-10-28 Geoffrey Garen <ggaren@apple.com>
All networking crashes on Mac 32bit
https://bugs.webkit.org/show_bug.cgi?id=138157
Reviewed by Andy Estes.
NEFilterSource content filtering is not available on 32bit, so
soft-linking fails at runtime. The simplest solution is just to disable
it at compile time.
* platform/ContentFilter.h:
2014-10-28 Jeremy Jones <jeremyj@apple.com>
Add optimized fullscreen mode.
https://bugs.webkit.org/show_bug.cgi?id=138044
Reviewed by Jer Noble.
Enable different types of fullscreen video behavior.
Add an enum parameter to enterVideoFullscreenForVideoElement for alternate types of fullscreen.
Add gesture for alternate fullscreen.
* Modules/mediacontrols/MediaControlsHost.cpp:
(WebCore::MediaControlsHost::enterFullscreenOptimized): added
* Modules/mediacontrols/MediaControlsHost.h: added enterFullscreenOptimized
* Modules/mediacontrols/MediaControlsHost.idl: added enterFullscreenOptimized
* Modules/mediacontrols/mediaControlsiOS.js:
(ControllerIOS.prototype.handleBaseGestureChange): recognize alternate gesture
* WebCore.exp.in: added parameter to setupFullscreen
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::removedFrom) : replace m_isInVideoFullscreen with m_videoFullscreenType
(WebCore::HTMLMediaElement::stop) : ditto
(WebCore::HTMLMediaElement::isFullscreen) : ditto
(WebCore::HTMLMediaElement::enterFullscreen): add parameter to enterVideoFullscreenForVideoElement
(WebCore::HTMLMediaElement::exitFullscreen): replace m_isInVideoFullscreen with m_videoFullscreenType
(WebCore::HTMLMediaElement::enterFullscreenOptimized): added
* html/HTMLMediaElement.h: added enterFullscreenOptimized
* page/ChromeClient.h:
(WebCore::ChromeClient::enterVideoFullscreenForVideoElement): added parameter
* platform/ios/WebVideoFullscreenControllerAVKit.h: add parameter
* platform/ios/WebVideoFullscreenControllerAVKit.mm:
(-[WebVideoFullscreenController enterFullscreen:type:]): add parameter
(-[WebVideoFullscreenController enterFullscreen:]): Deleted.
* platform/ios/WebVideoFullscreenInterfaceAVKit.h: reorder protected to after public
* platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
(-[WebAVPlayerController player]): this stub is now required
(-[WebAVPlayerController layoutSublayersOfLayer:]): this is a better way to update video frames
(WebVideoFullscreenInterfaceAVKit::setupFullscreen): implement optimized fullscreen interface
(WebVideoFullscreenInterfaceAVKit::enterFullscreen): ditto
(WebVideoFullscreenInterfaceAVKit::exitFullscreen): ditto
(WebVideoFullscreenInterfaceAVKit::requestHideAndExitFullscreen): ditto
2014-10-28 Chris Dumez <cdumez@apple.com>
Clean up virtual functions in accessibility/
https://bugs.webkit.org/show_bug.cgi?id=138148
Reviewed by Chris Fleizach.
Clean up virtual functions in accessibility/ by:
- Marking classes as final when suitable
- Marking virtual functions as final when suitable
- Dropping final on virtual functions in classes that are already final
- Make isXXX() virtual type checking functions in XXX classes to avoid
useless type checks
No new tests, no behavior change.
* accessibility/AccessibilityARIAGrid.h:
* accessibility/AccessibilityARIAGridCell.h:
* accessibility/AccessibilityARIAGridRow.h:
* accessibility/AccessibilityImageMapLink.h:
* accessibility/AccessibilityList.h:
* accessibility/AccessibilityListBox.h:
* accessibility/AccessibilityListBoxOption.h:
* accessibility/AccessibilityMediaControls.h:
* accessibility/AccessibilityMenuList.h:
* accessibility/AccessibilityMenuListOption.h:
* accessibility/AccessibilityMenuListPopup.h:
* accessibility/AccessibilityMockObject.h:
(WebCore::AccessibilityMockObject::setParent):
* accessibility/AccessibilityNodeObject.h:
* accessibility/AccessibilityProgressIndicator.h:
* accessibility/AccessibilityRenderObject.h:
* accessibility/AccessibilitySVGRoot.h:
* accessibility/AccessibilityScrollView.h:
* accessibility/AccessibilityScrollbar.h:
* accessibility/AccessibilitySearchFieldButtons.h:
* accessibility/AccessibilitySlider.h:
* accessibility/AccessibilitySpinButton.h:
* accessibility/AccessibilityTable.h:
* accessibility/AccessibilityTableCell.h:
* accessibility/AccessibilityTableColumn.h:
* accessibility/AccessibilityTableHeaderContainer.h:
* accessibility/AccessibilityTableRow.h:
2014-10-24 Jeffrey Pfau <jpfau@apple.com>
FrameProgressTracker expects Page to not have detached
https://bugs.webkit.org/show_bug.cgi?id=138061
Reviewed by Alexey Proskuryakov.
In some cases, a Page may be detached from a Frame before its
FrameLoader is torn down, causing FrameProgressTracker's destructor
to hit a null pointer.
No new tests; it is impossible to reliably simulate the null pointer
case without intrusive code changes.
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::FrameProgressTracker::~FrameProgressTracker):
2014-10-27 Ada Chan <adachan@apple.com>
Introduce a new abstract class called AudioProducer and keep a set of AudioProducers
rather than the active MediaSessions in Document
https://bugs.webkit.org/show_bug.cgi?id=138107
Reviewed by Eric Carlson.
No new tests, no behavior change.
* WebCore.xcodeproj/project.pbxproj:
Add AudioProducer.h to the project.
* dom/Document.cpp:
(WebCore::Document::addAudioProducer):
(WebCore::Document::removeAudioProducer):
(WebCore::Document::updateIsPlayingAudio):
Go through the set of AudioProducers and see if any is playing audio.
Now that this method no longer refers to MediaSessions directly, this code
does not need to be guarded by #if ENABLE(VIDEO).
(WebCore::Document::registerMediaSession): Deleted.
(WebCore::Document::unregisterMediaSession): Deleted.
* dom/Document.h:
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::registerWithDocument):
(WebCore::HTMLMediaElement::unregisterWithDocument):
(WebCore::HTMLMediaElement::isPlayingAudio):
Return whether this element is playing audio.
* html/HTMLMediaElement.h:
* page/AudioProducer.h: Added.
(WebCore::AudioProducer::~AudioProducer):
* page/Page.cpp:
(WebCore::Page::updateIsPlayingAudio):
This is no longer guarded with #if ENABLE(VIDEO) since the Document methods it calls
are no longer guarded.
* page/Page.h:
2014-10-28 Chris Dumez <cdumez@apple.com>
Unreviewed comment fix from r175267.
Fix namespace name in comment.
* css/StyleBuilderCustom.h:
2014-10-28 Jer Noble <jer.noble@apple.com>
REGRESSION(r171593) [Mac] Media controls create a large (and unnecessary) backing store
https://bugs.webkit.org/show_bug.cgi?id=137757
Reviewed by Eric Carlson.
In r171593, a <div> was added to the media controls which is only ever used on iOS. Instead
of creating and adding this <div> in mediaControlsApple.js (which is used on OS X), this
<div> should be created and added in mediaControlsiOS.js, which requires overloading
Controller.addControls.
* Modules/mediacontrols/mediaControlsApple.css:
(audio::-webkit-media-controls-panel.hidden): Drive-by fix: allow the panel itself to be hidden.
(video::-webkit-media-controls-panel-composited-parent): Deleted.
* Modules/mediacontrols/mediaControlsApple.js:
(Controller.prototype.createControls): Remove the composited parent.
(Controller.prototype.addControls): Ditto.
* Modules/mediacontrols/mediaControlsiOS.js:
(ControllerIOS.prototype.createControls): Create the composited parent.
(ControllerIOS.prototype.addControls): Copied from (previous) apple.js.
2014-10-28 Chris Dumez <cdumez@apple.com>
Move "Number" CSS properties to the new StyleBuilder
https://bugs.webkit.org/show_bug.cgi?id=138125
Reviewed by Antti Koivisto.
Move "Number" CSS properties from DeprecatedStyleBuilder to the new
StyleBuilder:
-webkit-hyphenate-limit-after
-webkit-hyphenate-limit-before
-webkit-shape-image-threshold
-webkit-hyphenate-limit-lines
They are now generated from CSSPropertyNames.in
For -webkit-hyphenate-limit-lines, I used custom code instead of
the Number converter as it required special handling for the id
value. This patch thus adds support for [Custom=Value] to
CSSPropertyNames.in and the custom code goes into
css/StyleBuilderCustom.h.
No new tests, no behavior change.
* WebCore.xcodeproj/project.pbxproj:
* css/CSSPropertyNames.in:
* css/DeprecatedStyleBuilder.cpp:
(WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
(WebCore::ApplyPropertyNumber::setValue): Deleted.
(WebCore::ApplyPropertyNumber::applyValue): Deleted.
(WebCore::ApplyPropertyNumber::createHandler): Deleted.
* css/StyleBuilderConverter.h:
(WebCore::StyleBuilderConverter::convertNumber):
* css/StyleBuilderCustom.h: Added.
(WebCore::StyleBuilderFunctions::applyValueWebkitHyphenateLimitLines):
* css/makeprop.pl:
2014-10-28 Zan Dobersek <zdobersek@igalia.com>
[WebCore] Remove uses of WTF::bind() in the Media Stream module
https://bugs.webkit.org/show_bug.cgi?id=138016
Reviewed by Eric Carlson.
Replace uses of WTF::bind() in the Media Stream module with C++11 lambdas.
Internal helper methods are removed in favor of inlining the code directly
into the lambdas. Range-based for-loops are deployed where appropriate.
* Modules/mediastream/MediaStreamTrack.cpp:
(WebCore::MediaStreamTrack::scheduleEventDispatch):
(WebCore::MediaStreamTrack::dispatchQueuedEvents): Deleted.
* Modules/mediastream/MediaStreamTrack.h:
* Modules/mediastream/MediaStreamTrackSourcesRequest.cpp:
(WebCore::MediaStreamTrackSourcesRequest::didCompleteRequest):
(WebCore::MediaStreamTrackSourcesRequest::callCompletionHandler): Deleted.
* Modules/mediastream/MediaStreamTrackSourcesRequest.h:
* Modules/mediastream/UserMediaRequest.cpp:
(WebCore::UserMediaRequest::constraintsValidated):
(WebCore::UserMediaRequest::userMediaAccessGranted):
(WebCore::UserMediaRequest::didCreateStream):
(WebCore::UserMediaRequest::failedToCreateStreamWithConstraintsError):
(WebCore::UserMediaRequest::failedToCreateStreamWithPermissionError):
(WebCore::UserMediaRequest::requestPermission): Deleted.
(WebCore::UserMediaRequest::createMediaStream): Deleted.
(WebCore::UserMediaRequest::callSuccessHandler): Deleted.
(WebCore::UserMediaRequest::callErrorHandler): Deleted.
* Modules/mediastream/UserMediaRequest.h:
2014-10-28 Pascal Jacquemart <p.jacquemart@samsung.com>
Abandoned select option is reselected when shift selecting new options
https://bugs.webkit.org/show_bug.cgi?id=137553
Reviewed by Ryosuke Niwa.
Previous active selection is wrongly recorded by HTMLSelectElement after selecting a new item using
typeAhead. Fixed by clearing previously selected options before starting a new active selection.
Test: fast/forms/listbox-selection-after-typeahead.html
* html/HTMLSelectElement.cpp:
(WebCore::HTMLSelectElement::selectOption): Code re-ordering
2014-10-28 Milan Crha <mcrha@redhat.com>
Use constants from wtf/MathExtras.h
https://bugs.webkit.org/show_bug.cgi?id=137967
Reviewed by Darin Adler.
* platform/graphics/freetype/FontPlatformDataFreeType.cpp:
(WebCore::rotateCairoMatrixForVerticalOrientation):
* rendering/mathml/RenderMathMLMenclose.cpp:
(WebCore::RenderMathMLMenclose::computePreferredLogicalWidths):
(WebCore::RenderMathMLMenclose::updateLogicalHeight):
* rendering/mathml/RenderMathMLOperator.cpp:
(WebCore::RenderMathMLOperator::getDisplayStyleLargeOperator):
2014-10-28 David Hyatt <hyatt@apple.com>
Selection gap painting is ugly for ruby bases.
https://bugs.webkit.org/show_bug.cgi?id=138136
Reviewed by Dean Jackson.
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::selectionGaps):
For ruby bases don't fill to the end of the block (in the block direction),
since ideographic baselines push that end below the text baseline.
(WebCore::RenderBlock::blockSelectionGaps):
* rendering/RenderBlockFlow.cpp:
Skip ruby bases for block selection gap filling.
2014-10-28 Zalan Bujtas <zalan@apple.com>
Speed up line parsing for simple line layout.
https://bugs.webkit.org/show_bug.cgi?id=137275
Reviewed by Antti Koivisto.
This patch speeds up the line parsing for simple line layout by
reducing the number of text measurement calls.
The parsing logic hasn't changed. We simply walk over
the whitespace/non-whitespace fragments and measure them to
figure out whether they fit.
The performance gain mainly comes from the more efficient line wrapping
so that we don't re-measure the fragment when it is pushed to
the next line.
No change in behaviour. (except the empty line-break run removal.)
* rendering/SimpleLineLayout.cpp:
(WebCore::SimpleLineLayout::skipWhitespace):
(WebCore::SimpleLineLayout::computeLineLeft):
(WebCore::SimpleLineLayout::TextFragment::TextFragment):
(WebCore::SimpleLineLayout::TextFragment::isEmpty):
(WebCore::SimpleLineLayout::LineState::LineState):
(WebCore::SimpleLineLayout::LineState::commitAndCreateRun): adds uncommitted text to the line and creates a run out of it.
(WebCore::SimpleLineLayout::LineState::addUncommitted): appends fragment to the uncommitted text.
(WebCore::SimpleLineLayout::LineState::addUncommittedWhitespace): appends whitespace to the uncommitted text.
(WebCore::SimpleLineLayout::LineState::jumpTo): moves line's current position without committing text.
(WebCore::SimpleLineLayout::LineState::width): current width of the line including committed and uncommitted text.
(WebCore::SimpleLineLayout::LineState::fits): checks if committed + uncommitted text fits the line.
(WebCore::SimpleLineLayout::LineState::removeCommittedTrailingWhitespace):
(WebCore::SimpleLineLayout::removeTrailingWhitespace): post processing the trailing whitespace.
(WebCore::SimpleLineLayout::initializeLine):
(WebCore::SimpleLineLayout::splitFragmentToFitLine): breaks the fragments into 2 so that the first (sub)fragment fits the line.
(WebCore::SimpleLineLayout::nextFragment): returns the next valid fragment of the text.
(WebCore::SimpleLineLayout::createLineRuns): creates runs for the current line and returns when we can't fit more text on the line.
(WebCore::SimpleLineLayout::updateLineConstrains): updates left/right constrains for the current line.
(WebCore::SimpleLineLayout::createTextRuns): creates runs for the whole text.
(WebCore::SimpleLineLayout::isWhitespace): Deleted.
(WebCore::SimpleLineLayout::skipWhitespaces): Deleted.
(WebCore::SimpleLineLayout::measureWord): Deleted.
(WebCore::SimpleLineLayout::adjustRunOffsets): Deleted.
* rendering/SimpleLineLayout.h:
(WebCore::SimpleLineLayout::Run::Run):
2014-10-28 Alexey Proskuryakov <ap@apple.com>
Windows build fix.
* platform/network/cf/NetworkStorageSessionCFNet.cpp:
(WebCore::NetworkStorageSession::switchToNewTestingSession): Use a WTF function
for getting current process ID instead of getpid().
2014-10-28 Mihnea Ovidenie <mihnea@adobe.com>
Clean up subtrees selection code
https://bugs.webkit.org/show_bug.cgi?id=137740
Reviewed by David Hyatt.
Clean up subtrees selection code. Add a new class SelectionSubtreeData
that keeps only the selection data. Have SelectionSubtreeRoot class embed
a SelectionSubtreeData member and keep the business logic methods.
No functionality changed therefore no new layout tests.
* rendering/RenderObject.cpp:
(WebCore::RenderObject::selectionStartEnd):
* rendering/RenderView.cpp:
(WebCore::RenderView::subtreeSelectionBounds):
(WebCore::RenderView::repaintSubtreeSelection):
(WebCore::RenderView::setSelection):
(WebCore::RenderView::splitSelectionBetweenSubtrees):
(WebCore::RenderView::updateSelectionForSubtrees):
(WebCore::RenderView::clearSubtreeSelection):
(WebCore::RenderView::applySubtreeSelection):
* rendering/RenderView.h:
* rendering/SelectionSubtreeRoot.cpp:
(WebCore::SelectionSubtreeRoot::SelectionSubtreeRoot):
(WebCore::SelectionSubtreeRoot::adjustForVisibleSelection):
* rendering/SelectionSubtreeRoot.h:
(WebCore::SelectionSubtreeRoot::SelectionSubtreeData::SelectionSubtreeData):
(WebCore::SelectionSubtreeRoot::SelectionSubtreeData::selectionStart):
(WebCore::SelectionSubtreeRoot::SelectionSubtreeData::selectionStartPos):
(WebCore::SelectionSubtreeRoot::SelectionSubtreeData::selectionEnd):
(WebCore::SelectionSubtreeRoot::SelectionSubtreeData::selectionEndPos):
(WebCore::SelectionSubtreeRoot::SelectionSubtreeData::selectionClear):
(WebCore::SelectionSubtreeRoot::SelectionSubtreeData::selectionStartEndPositions):
(WebCore::SelectionSubtreeRoot::SelectionSubtreeData::setSelectionStart):
(WebCore::SelectionSubtreeRoot::SelectionSubtreeData::setSelectionStartPos):
(WebCore::SelectionSubtreeRoot::SelectionSubtreeData::setSelectionEnd):
(WebCore::SelectionSubtreeRoot::SelectionSubtreeData::setSelectionEndPos):
(WebCore::SelectionSubtreeRoot::SelectionSubtreeData::clearSelection):
(WebCore::SelectionSubtreeRoot::selectionData):
(WebCore::SelectionSubtreeRoot::setSelectionData):
(WebCore::SelectionSubtreeRoot::selectionStart): Deleted.
(WebCore::SelectionSubtreeRoot::selectionStartPos): Deleted.
(WebCore::SelectionSubtreeRoot::selectionEnd): Deleted.
(WebCore::SelectionSubtreeRoot::selectionEndPos): Deleted.
(WebCore::SelectionSubtreeRoot::selectionStartEndPositions): Deleted.
(WebCore::SelectionSubtreeRoot::selectionClear): Deleted.
(WebCore::SelectionSubtreeRoot::setSelectionStart): Deleted.
(WebCore::SelectionSubtreeRoot::setSelectionStartPos): Deleted.
(WebCore::SelectionSubtreeRoot::setSelectionEnd): Deleted.
(WebCore::SelectionSubtreeRoot::setSelectionEndPos): Deleted.
2014-10-28 Jer Noble <jer.noble@apple.com>
[Mac] The first software paint of a <video> element takes up to 2.5s.
https://bugs.webkit.org/show_bug.cgi?id=137754
Reviewed by Brent Fulgham.
It turns out that, if you pass nil to -[AVPlayerItemVideoOutput initWithPixelBufferAttributes:]
the video output will not attempt to conform the resulting pixel buffers into a particular format.
This means that adding such a video output to a AVPlayerItem should have almost no performance
penalty, since the video output does not even copy the resulting buffers, but rather just retains
and returns the ones from the AVPlayerLayer.
Create and attach an AVPlayerItemVideoOutput after creating the AVPlayerItem, but before attaching
the player item to the AVPlayer. This eliminates the reconfigure step which occurs after attaching
a video output to an already attached AVPlayerItem.
When creating the AVPlayerItemVideoOutput, pass in `nil` for the pixelBufferAttributes parameter.
Instead of blocking waiting for output from the AVPlayerItemVideoOutput during creating, block and
whait when asked to paint with the video output.
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::createVideoLayer):
(WebCore::MediaPlayerPrivateAVFoundationObjC::createVideoOutput):
(WebCore::MediaPlayerPrivateAVFoundationObjC::paintWithVideoOutput):
2014-10-28 Chris Dumez <cdumez@apple.com>
Move text decoration CSS properties to the new StyleBuilder
https://bugs.webkit.org/show_bug.cgi?id=138121
Reviewed by Antti Koivisto.
Move text decoration CSS properties from DeprecatedStyleBuilder to the
new StyleBuilder so that they are generated from CSSPropertyNames.in.
No new tests, no behavior change.
* css/CSSPropertyNames.in:
* css/DeprecatedStyleBuilder.cpp:
(WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
(WebCore::ApplyPropertyTextDecoration::applyValue): Deleted.
(WebCore::ApplyPropertyTextDecoration::createHandler): Deleted.
* css/StyleBuilderConverter.h:
(WebCore::StyleBuilderConverter::convertTextDecoration):
2014-10-28 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Remove GDK dependency from SharedTimerGtk
https://bugs.webkit.org/show_bug.cgi?id=138092
Reviewed by Martin Robinson.
It depends on GDK just to use GDK_PRIORITY_REDRAW constant, we can
use its value directly instead.
* PlatformGTK.cmake:
* platform/gtk/SharedTimerGtk.cpp:
(WebCore::setSharedTimerFireInterval):
2014-10-27 Andreas Kling <akling@apple.com>
Move RenderBlock::beingDestroyed() to RenderObject.
<https://webkit.org/b/138116>
Reviewed by Antti Koivisto.
Make "is being destroyed" a RenderObject concept instead of restricting
it to RenderBlocks. I'm guessing that this was specific to blocks due to
lack of bitfield space in RenderObject, and that's no longer an issue.
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::RenderBlock):
(WebCore::RenderBlock::willBeDestroyed):
* rendering/RenderBlock.h:
(WebCore::RenderBlock::beingDestroyed): Deleted.
* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::willBeDestroyed):
* rendering/RenderObject.cpp:
(WebCore::RenderObject::destroy):
* rendering/RenderObject.h:
(WebCore::RenderObject::beingDestroyed):
(WebCore::RenderObject::RenderObjectBitfields::RenderObjectBitfields):
2014-10-27 Chris Fleizach <cfleizach@apple.com>
AX: input type=hidden is being exposed when aria-hidden=false
https://bugs.webkit.org/show_bug.cgi?id=138106
Reviewed by Benjamin Poulain.
If an input type=hidden was inside an aria-hidden=false, it would appear because
the lack of a RenderObject behind that object was not blocking its adoption into the AX tree.
We should explicity check for whether the type is hidden and then return an appropriate role.
Test: accessibility/input-type-hidden-in-aria-hidden-false.html
* accessibility/AccessibilityNodeObject.cpp:
(WebCore::AccessibilityNodeObject::determineAccessibilityRole):
(WebCore::AccessibilityNodeObject::computeAccessibilityIsIgnored):
2014-10-27 Alexey Proskuryakov <ap@apple.com>
https://trac.webkit.org/changeset/175233 broke many tests, fixing an incorrect '!'.
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::determineAccessibilityRole):
2014-10-24 David Hyatt <hyatt@apple.com>
text-combine needs to center text within the vertical space using glyph bounds
https://bugs.webkit.org/show_bug.cgi?id=138056
<rdar://problem/15403667>
Reviewed by Dean Jackson.
Added fast/text/tatechuyoko.html
* rendering/RenderCombineText.cpp:
(WebCore::RenderCombineText::RenderCombineText):
(WebCore::RenderCombineText::adjustTextOrigin):
(WebCore::RenderCombineText::combineText):
* rendering/RenderCombineText.h:
2014-10-27 Benjamin Poulain <benjamin@webkit.org>
Cleanup after r175213: fastGetAttribute().isNull() should be fastHasAttribute()
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::determineAccessibilityRole):
Darin spotted this mistake.
2014-10-27 Alexey Proskuryakov <ap@apple.com>
http/tests/cookies/third-party-cookie-relaxing.html is flaky on bots
https://bugs.webkit.org/show_bug.cgi?id=138098
Reviewed by Anders Carlsson.
* platform/network/cf/NetworkStorageSessionCFNet.cpp:
(WebCore::NetworkStorageSession::switchToNewTestingSession):
Create a separate session for each WKTR/DRT process when testing.
2014-10-27 Chris Dumez <cdumez@apple.com>
Use separate HashMaps for common and uncommon headers in HTTPHeaderMap
https://bugs.webkit.org/show_bug.cgi?id=138079
Reviewed by Anders Carlsson.
Use separate HashMaps for common and uncommon headers in HTTPHeaderMap:
- a (faster) HashMap<HTTPHeaderMap, String> for common HTTP headers
- a HashMap<String, String, CaseFoldingHash> for uncommon ones
This avoids having to construct Strings from HTTPHeaderMap values for
storing. This also means we have less isolated String copies to do when
creating cross-thread data. The common headers HashMap should also be
a bit more efficient due to faster hashing and faster key comparison in
case of collision.
Some calls sites can also benefit from having direct access to common
headers of the request in HTTPHeaderName type.
This patch adds a new HTTPHeaderMapConstIterator iterator type for
HTTPHeaderMap so that call sites that do not need / want to distinguish
common / uncommon headers still do not need to. They can keep using
modern C++ loops over HTTPHeaderMap objects and get <String, String>
key/value pairs.
No new tests, no behavior change.
* loader/CrossOriginAccessControl.cpp:
(WebCore::isOnAccessControlSimpleRequestHeaderWhitelist):
Have isOnAccessControlSimpleRequestHeaderWhitelist() take a
HTTPHeaderName in argument instead of a String as only common headers
are in the whitelist.
(WebCore::isSimpleCrossOriginAccessRequest):
Call isOnAccessControlSimpleRequestHeaderWhitelist() only for common
HTTP headers.
* loader/CrossOriginAccessControl.h:
Have isOnAccessControlSimpleRequestHeaderWhitelist() take a
HTTPHeaderName in argument instead of a String as only common headers
are in the whitelist.
* loader/CrossOriginPreflightResultCache.cpp:
(WebCore::CrossOriginPreflightResultCacheItem::allowsCrossOriginHeaders):
Call isOnAccessControlSimpleRequestHeaderWhitelist() only for common
HTTP headers.
* loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::responseReceived):
Call httpHeaderFields().commonHeaders().find() instead of
httpHeaderFields().find() as we are looking for a common header.
HTTPHeaderMap::find(HTTPHeaderName) was removed now that we have a
HashMap dedicated to common headers.
* loader/cache/CachedRawResource.cpp:
(WebCore::shouldIgnoreHeaderForCacheReuse):
Update argument type to be a HTTPHeaderName instead of a String as
only common HTTP headers can be ignored for cache reuse. The
implementation already dealt with HTTPHeaderName type and had to
call findHTTPHeaderName(). This is no longer needed now that the
call site now has direct access to common headers in HTTPHeaderName
type.
(WebCore::CachedRawResource::canReuse):
- Only call shouldIgnoreHeaderForCacheReuse() for common HTTP headers.
- Slightly optimize the second loop (the one over oldHeaderMap) to only
check that the key is present in newHeaderMap, without actually
comparing the String values. If the String values were different, the
first loop would have seen it already and we would have returned
early.
2014-10-27 Andreas Kling <akling@apple.com>
Devirtualize RenderDeprecatedFlexibleBox::isStretchingChildren().
<https://webkit.org/b/138096>
Reviewed by Chris Dumez.
This function is only ever called on a renderer after we've checked
that it's a RenderDeprecatedFlexibleBox, so make it non-virtual.
* rendering/RenderBox.cpp:
(WebCore::RenderBox::computeLogicalHeight):
* rendering/RenderDeprecatedFlexibleBox.h:
* rendering/RenderObject.h:
2014-10-27 Chris Dumez <cdumez@apple.com>
Reintroduce null check removed in r175222
https://bugs.webkit.org/show_bug.cgi?id=138087
Reviewed by Andreas Kling.
Reintroduce null check removed in r175222 as several layout tests are
crashing on the bots without them. At least the Pair pointer can be
null according to the assertion hits on the bots.
* css/StyleBuilderConverter.h:
(WebCore::StyleBuilderConverter::convertRadius):
2014-10-27 Chris Dumez <cdumez@apple.com>
Move radius CSS properties to the new StyleBuilder
https://bugs.webkit.org/show_bug.cgi?id=138087
Reviewed by Andreas Kling.
Move radius CSS properties from DeprecatedStyleBuilder to the new
StyleBuilder so that they are now generated from CSSPropertyNames.in.
No new tests, no behavior change.
* css/CSSPropertyNames.in:
* css/DeprecatedStyleBuilder.cpp:
(WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
(WebCore::ApplyPropertyBorderRadius::setValue): Deleted.
(WebCore::ApplyPropertyBorderRadius::applyValue): Deleted.
(WebCore::ApplyPropertyBorderRadius::createHandler): Deleted.
* css/StyleBuilderConverter.h:
(WebCore::StyleBuilderConverter::convertRadius):
2014-10-27 Zan Dobersek <zdobersek@igalia.com>
Shrink MathMLOperatorDictionary::dictionary table
https://bugs.webkit.org/show_bug.cgi?id=137914
Reviewed by Darin Adler.
Improve packing of the Entry structure that's used for elements
of the MathMLOperatorDictionary::dictionary table. This drops the
size of the struct from 16 bytes to just 4 bytes, and shrinks the
size of the dictionary table from rougly 16 kB down to 4 kB.
* rendering/mathml/RenderMathMLOperator.cpp:
(WebCore::MathMLOperatorDictionary::ExtractKey):
(WebCore::RenderMathMLOperator::setOperatorProperties):
* rendering/mathml/RenderMathMLOperator.h:
2014-10-27 Andreas Kling <akling@apple.com>
Move canContainFixedPositionObjects() to RenderElement.
<https://webkit.org/b/138088>
Reviewed by Mihnea Ovidenie.
Only RenderElement can contain other renderers, so it's not really
natural to answer this question on RenderObject anyway.
Moving it to RenderElement lets it access more efficient getters
that don't have to handle the RenderText case.
* rendering/RenderElement.h:
(WebCore::RenderElement::canContainFixedPositionObjects):
* rendering/RenderObject.h:
(WebCore::RenderObject::canContainFixedPositionObjects): Deleted.
2014-10-26 Benjamin Poulain <benjamin@webkit.org>
Images with usemap should not have a link state
https://bugs.webkit.org/show_bug.cgi?id=138071
Reviewed by Andreas Kling.
Image tags were incorrectly getting a link state if a usemap is defined.
The <area> of the usemap is supposed to get the link state, but never the image.
Unfortunately, the Accessibility code was relying on the wrong behavior
to set the ImageMapRole, most of the patch is updating that code to get
the correct role without the link state.
Test: fast/selectors/images-with-usemap-should-not-match-link.html
The accessibility code is covered by a few tests in accessibility/.
The test accessibility/aria-used-on-image-maps.html ensure the <area>
elements also get the correct role.
* dom/Node.h:
(WebCore::Node::setIsLink):
(WebCore::Node::clearIsLink): Deleted.
Unused code.
(WebCore::Node::isLink):
Move with its setter for clarity.
* html/HTMLImageElement.cpp:
(WebCore::HTMLImageElement::parseAttribute):
This is the bug.
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::determineAccessibilityRole):
Here the branches for the role ImageMap where behind isLink() which would
never be valid after the fix.
My fix here was to use the same definition previously set by HTMLImageElement::parseAttribute(),
any usemap attribute qualifies the node for ImageMapRole.
(WebCore::AccessibilityRenderObject::anchorElement):
(WebCore::AccessibilityRenderObject::linkedUIElements):
(WebCore::AccessibilityRenderObject::url):
* accessibility/AccessibilityObject.h:
(WebCore::AccessibilityObject::isAnchor): Deleted.
Something funny I discovered is the Accessibility code worked around the bug
by defining isAnchor() that exclude images from isLink().
Since isLink() will no longer be true for images, the hack can be removed.
* accessibility/AccessibilityNodeObject.cpp:
(WebCore::AccessibilityNodeObject::anchorElement):
(WebCore::AccessibilityNodeObject::isAnchor): Deleted.
* accessibility/AccessibilityNodeObject.h:
* accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(-[WebAccessibilityObjectWrapper accessibilityAttributeNames]):
2014-10-26 Benjamin Poulain <benjamin@webkit.org>
Replace Element::didAffectSelector() by setNeedsStyleRecalc()
https://bugs.webkit.org/show_bug.cgi?id=138080
Reviewed by Andreas Kling.
Element::didAffectSelector() was probably an optimization at some point,
with the current code is does nothing more than setNeedsStyleRecalc().
* dom/Document.cpp:
(WebCore::Document::setCSSTarget):
* dom/Element.cpp:
(WebCore::Element::didAffectSelector): Deleted.
* dom/Element.h:
* html/HTMLAnchorElement.cpp:
(WebCore::HTMLAnchorElement::parseAttribute):
* html/HTMLFormControlElement.cpp:
(WebCore::HTMLFormControlElement::disabledStateChanged):
* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::setChecked):
(WebCore::HTMLInputElement::setIndeterminate):
* html/HTMLLinkElement.cpp:
(WebCore::HTMLLinkElement::parseAttribute):
* html/HTMLOptGroupElement.cpp:
(WebCore::HTMLOptGroupElement::parseAttribute):
* html/HTMLOptionElement.cpp:
(WebCore::HTMLOptionElement::parseAttribute):
(WebCore::HTMLOptionElement::setSelectedState):
* html/HTMLProgressElement.cpp:
(WebCore::HTMLProgressElement::didElementStateChange):
2014-10-26 Andreas Kling <akling@apple.com>
Move some RenderObject member functions to RenderElement.
<https://webkit.org/b/138085>
Reviewed by Chris Dumez.
Move these two functions to RenderElement:
- handleDynamicFloatPositionChange()
- removeAnonymousWrappersForInlinesIfNecessary()
Also make childBecameNonInline() take a RenderElement& since
that's all we ever pass to it.
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::childBecameNonInline):
* rendering/RenderBlock.h:
* rendering/RenderBoxModelObject.h:
(WebCore::RenderBoxModelObject::childBecameNonInline):
* rendering/RenderElement.cpp:
(WebCore::RenderElement::handleDynamicFloatPositionChange):
(WebCore::RenderElement::removeAnonymousWrappersForInlinesIfNecessary):
* rendering/RenderElement.h:
* rendering/RenderInline.cpp:
(WebCore::RenderInline::childBecameNonInline):
* rendering/RenderInline.h:
* rendering/RenderObject.cpp:
(WebCore::RenderObject::handleDynamicFloatPositionChange): Deleted.
(WebCore::RenderObject::removeAnonymousWrappersForInlinesIfNecessary): Deleted.
* rendering/RenderObject.h:
2014-10-26 Andreas Kling <akling@apple.com>
Move continuation teardown from subclasses to RenderBoxModelObject.
<https://webkit.org/b/138081>
Reviewed by Antti Koivisto.
Let RenderBoxModelObject::willBeDestroyed() tear down any continuation
instead of having every subclass do this themselves.
Also added a RenderElement bit tracking whether the renderer has a
continuation. This avoids a hash lookup every time we destroy a
RenderBoxModelObject that didn't have a continuation.
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::willBeDestroyed):
* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::willBeDestroyed):
* rendering/RenderBoxModelObject.cpp:
(WebCore::continuationMap):
(WebCore::RenderBoxModelObject::willBeDestroyed):
(WebCore::RenderBoxModelObject::continuation):
(WebCore::RenderBoxModelObject::setContinuation):
* rendering/RenderElement.cpp:
(WebCore::RenderElement::RenderElement):
* rendering/RenderElement.h:
(WebCore::RenderElement::setHasContinuation):
(WebCore::RenderElement::hasContinuation):
* rendering/RenderInline.cpp:
(WebCore::RenderInline::willBeDestroyed):
2014-10-25 Benjamin Poulain <benjamin@webkit.org>
Remove a useless variable from SelectorCodeGenerator::generateElementMatchesSelectorList()
https://bugs.webkit.org/show_bug.cgi?id=138076
Reviewed by Alexey Proskuryakov.
* cssjit/SelectorCompiler.cpp:
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementMatchesSelectorList):
The variable elementAddressRegisterIndex was just needed for debugging, it is useless now.
2014-10-18 Brian J. Burg <burg@cs.washington.edu>
Web Inspector: timelines should not count time elapsed while paused in the debugger
https://bugs.webkit.org/show_bug.cgi?id=136351
Reviewed by Timothy Hatcher.
To avoid counting time elapsed while the debugger is paused, timeline records should
keep track of time elapsed since the start of timeline capturing, rather than wall clock
timestamps. We can easily compute elapsed time by sharing a Stopwatch instance through the
inspector environment. The stopwatch runs with timelines and is paused with the debugger,
so subsequent time measurements will not include time elapsed while the debugger is paused.
This refactoring is safe because start and end times are only used to graph records; the
timestamp's actual value is irrelevant and is not displayed in the user interface. Date
timestamps are still included with network-related records as part of their header data.
No new tests, because we cannot reliably test timing changes induced by debugger pauses.
It is possible for records to accrue time before the debugger pauses or after it resumes.
* inspector/InspectorCSSAgent.cpp: Remove unnecessary include.
* inspector/InspectorController.cpp:
(WebCore::InspectorController::InspectorController):
(WebCore::InspectorController::executionStopwatch): Add a shared stopwatch.
* inspector/InspectorController.h:
* inspector/InspectorPageAgent.cpp:
(WebCore::InspectorPageAgent::timestamp): Redirect to the shared stopwatch.
(WebCore::InspectorPageAgent::domContentEventFired):
(WebCore::InspectorPageAgent::loadEventFired):
* inspector/InspectorPageAgent.h:
* inspector/InspectorResourceAgent.cpp:
(WebCore::InspectorResourceAgent::timestamp): Redirect to the shared stopwatch.
(WebCore::InspectorResourceAgent::willSendRequest):
(WebCore::InspectorResourceAgent::didReceiveResponse):
(WebCore::InspectorResourceAgent::didReceiveData):
(WebCore::InspectorResourceAgent::didFinishLoading):
(WebCore::InspectorResourceAgent::didFailLoading):
(WebCore::InspectorResourceAgent::didLoadResourceFromMemoryCache):
(WebCore::InspectorResourceAgent::willSendWebSocketHandshakeRequest):
(WebCore::InspectorResourceAgent::didReceiveWebSocketHandshakeResponse):
(WebCore::InspectorResourceAgent::didCloseWebSocket):
(WebCore::InspectorResourceAgent::didReceiveWebSocketFrame):
(WebCore::InspectorResourceAgent::didSendWebSocketFrame):
(WebCore::InspectorResourceAgent::didReceiveWebSocketFrameError):
* inspector/InspectorResourceAgent.h:
* inspector/InspectorTimelineAgent.cpp:
(WebCore::InspectorTimelineAgent::internalStart): Start and stop the stopwatch with timelines.
(WebCore::InspectorTimelineAgent::internalStop):
(WebCore::InspectorTimelineAgent::timestamp): Redirect to the shared stopwatch.
(WebCore::startProfiling):
(WebCore::InspectorTimelineAgent::startFromConsole):
(WebCore::InspectorTimelineAgent::willCallFunction):
(WebCore::InspectorTimelineAgent::willEvaluateScript):
(WebCore::TimelineTimeConverter::reset): Deleted.
* inspector/InspectorTimelineAgent.h:
(WebCore::TimelineTimeConverter::TimelineTimeConverter): Deleted.
(WebCore::TimelineTimeConverter::fromMonotonicallyIncreasingTime): Deleted.
(WebCore::InspectorTimelineAgent::timeConverter): Deleted.
* inspector/TimelineRecordFactory.cpp:
* inspector/WorkerInspectorController.cpp:
(WebCore::WorkerInspectorController::WorkerInspectorController):
(WebCore::WorkerInspectorController::executionStopwatch): Add a shared stopwatch.
* inspector/WorkerInspectorController.h:
2014-10-25 Dan Bernstein <mitz@apple.com>
Fix builds using the public SDK.
* platform/spi/cocoa/NSExtensionSPI.h:
2014-10-24 Said Abou-Hallawa <sabouhallawa@apple.com>
Clamp wordSpacing percentage value.
https://bugs.webkit.org/show_bug.cgi?id=129350.
Reviewed by Zalan Bujtas.
When the CSS wordSpacing property is percentage, its value has to be within the
pre-defined min/max values for the CSS length type. This is done the same way
the wordSpacing of type <length> is handled.
Tests: css3/infinite-word-spacing.html.
Move the definitions of minValueForCssLength and maxValueForCssLength from the
.cpp file to the .h file.
* css/CSSPrimitiveValue.cpp:
* css/CSSPrimitiveValue.h:
Clamp the wordSpacing value to minValueForCssLength and maxValueForCssLength when
its type is percentage.
* css/DeprecatedStyleBuilder.cpp:
(WebCore::ApplyPropertyWordSpacing::applyValue):
2014-10-24 Chris Dumez <cdumez@apple.com>
[Mac] Use modern loops in ResourceRequestCocoa.mm
https://bugs.webkit.org/show_bug.cgi?id=138052
Reviewed by Darin Adler.
Use modern loops in ResourceRequestCocoa.mm and leverage Objective-C's
fast enumeration.
No new tests, no behavior change.
* platform/network/cocoa/ResourceRequestCocoa.mm:
(WebCore::ResourceRequest::doUpdateResourceRequest):
- Use NSDictionary's block-based enumeration as we enumerate both keys
and values and this is faster than using fast enumeration of the keys
then calling [NSDictionary objectForKey:]
- Use Objective C's fast enumeration for
contentDispositionEncodingFallbackArray as this is faster and shorter
than index based access. Also use reserveCapacity() /
uncheckedAppend() for m_responseContentDispositionEncodingFallbackArray
as we know how many elements were are going to append in the common
case.
(WebCore::ResourceRequest::doUpdatePlatformRequest):
- Use fast enumeration for [nsRequest allHTTPHeaderFields] dictionary
keys instead of calling [NSDictionary allKeys] and then doing
index-based iteration, to avoid copying the keys to a new array.
Also do a forward enumeration instead of a reverse one. I don't see
why a backward enumeration would be necessary here. We are not
modifying the NSDictionary we are iterating over as
[nsRequest allHTTPHeaderFields] makes a copy.
- Use a modern C++ loop for
m_responseContentDispositionEncodingFallbackArray.
2014-10-24 Zalan Bujtas <zalan@apple.com>
Replace INT_MIN/MAX / kFixedPointDenominator with intMin/MaxForLayoutUnit.
https://bugs.webkit.org/show_bug.cgi?id=138047
Reviewed by Andreas Kling.
No change in functionality.
* css/CSSPrimitiveValue.cpp:
2014-10-24 Alexey Proskuryakov <ap@apple.com>
REGRESSION(r174877): WebProcess sends an empty Cookies HTTP header
https://bugs.webkit.org/show_bug.cgi?id=138053
Reviewed by Chris Dumez.
Fixes existing tests.
* platform/network/mac/CookieJarMac.mm: (WebCore::cookiesForSession): Restore the
behavior of returning a null string when there are no cookies.
2014-10-24 Chris Dumez <cdumez@apple.com>
[Mac] Use NSString API in QuickLookMac::computeNeedsQuickLookResourceCachingQuirks()
https://bugs.webkit.org/show_bug.cgi?id=138039
Reviewed by Darin Adler.
Use NSString API in QuickLookMac::computeNeedsQuickLookResourceCachingQuirks()
for case-insensitive string comparison instead of converting to UTF-8 and then
using strcasecmp().
No new tests, no behavior change.
* platform/mac/QuickLookMac.mm:
(WebCore::QuickLookMac::computeNeedsQuickLookResourceCachingQuirks):
2014-10-24 Chris Dumez <cdumez@apple.com>
Avoid unnecessary NSURLRequest copies in ResourceRequest::doUpdatePlatformRequest() / doUpdatePlatformHTTPBody()
https://bugs.webkit.org/show_bug.cgi?id=138049
Reviewed by Alexey Proskuryakov.
Avoid unnecessary NSURLRequest copies in ResourceRequest::doUpdatePlatformRequest()
/ doUpdatePlatformHTTPBody(). It turns out that about half the time, the
m_nsRequest member is already mutable so it is unnecessary to call
[NSURLRequest mutableCopy], we can just cast it to an NSMutableURLRequest* and
avoid copying.
This patch also moves the code to a new ensureMutableNSURLRequest() method to
avoid duplicating the logic.
I see that we spend ~21% less time in these 2 functions when loading
http://flickr.com/explore/ (39.6ms -> 31.2ms).
No new tests, no behavior change.
* platform/network/cf/ResourceRequest.h:
* platform/network/cocoa/ResourceRequestCocoa.mm:
(WebCore::ResourceRequest::ensureMutableNSURLRequest):
(WebCore::ResourceRequest::doUpdatePlatformRequest):
(WebCore::ResourceRequest::doUpdatePlatformHTTPBody):
2014-10-24 Chris Dumez <cdumez@apple.com>
Move ComputeLength CSS properties to the new StyleBuilder
https://bugs.webkit.org/show_bug.cgi?id=138036
Reviewed by Andreas Kling.
Move ComputeLength CSS properties from DeprecatedStyleBuilder to the
new StyleBuilder so that they are now generated. 3 Converters are
provided for these properties: ComputedLength / LineWidth / Spacing.
This is inspired by the following Blink revision by
<timloh@chromium.org>:
https://src.chromium.org/viewvc/blink?view=rev&revision=154012
No new tests, no behavior change.
* css/CSSPropertyNames.in:
* css/DeprecatedStyleBuilder.cpp:
(WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
(WebCore::ApplyPropertyComputeLength::setValue): Deleted.
(WebCore::ApplyPropertyComputeLength::applyValue): Deleted.
(WebCore::ApplyPropertyComputeLength::createHandler): Deleted.
* css/StyleBuilderConverter.h:
(WebCore::StyleBuilderConverter::convertComputedLength):
(WebCore::StyleBuilderConverter::convertLineWidth):
(WebCore::StyleBuilderConverter::convertSpacing):
2014-10-24 Chris Dumez <cdumez@apple.com>
Make ScriptWrappable's destructor protected instead of public
https://bugs.webkit.org/show_bug.cgi?id=138037
Reviewed by Andreas Kling.
Make ScriptWrappable's destructor protected instead of public as it is
not virtual and this class is subclassed a lot.
No new tests, no behavior change.
* bindings/js/ScriptWrappable.h:
(WebCore::ScriptWrappable::~ScriptWrappable):
2014-10-23 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK][Cairo] Remove GTK dependency of WidgetBackingStoreGtkX11
https://bugs.webkit.org/show_bug.cgi?id=138004
Reviewed by Gustavo Noronha Silva.
Rename all WidgetBackingStore* classes as
BackingStoreBackendCairo* since all of them are actually
BackingStore backends based on cairo, and move them from
platform/cairo and platform/gtk to platform/graphics/cairo.
BackingStoreBackendCairo is the base class that contains common
members like the surface and size. BackingStoreBackendCairoImpl is
the implementation using only cairo, and BackingStoreBackendCairoX11
using xlib. BackingStoreBackendCairoX11 receives all the X11
information it needs as constructor parameters, instead of using a
GtkWidget and GTK+ X11 API. BackingStoreBackendCairoImpl receives
the surface already created as constructor parameter, so that it
doesn't have any platform specific code now.
* PlatformEfl.cmake: Update compilation files.
* PlatformGTK.cmake: Ditto.
* platform/cairo/WidgetBackingStoreCairo.cpp: Removed.
* platform/graphics/cairo/BackingStoreBackendCairo.h: Renamed from Source/WebCore/platform/cairo/WidgetBackingStore.h.
(WebCore::BackingStoreBackendCairo::~BackingStoreBackendCairo):
(WebCore::BackingStoreBackendCairo::surface):
(WebCore::BackingStoreBackendCairo::size):
(WebCore::BackingStoreBackendCairo::BackingStoreBackendCairo):
* platform/graphics/cairo/BackingStoreBackendCairoImpl.cpp: Added.
(WebCore::BackingStoreBackendCairoImpl::BackingStoreBackendCairoImpl):
(WebCore::BackingStoreBackendCairoImpl::~BackingStoreBackendCairoImpl):
(WebCore::BackingStoreBackendCairoImpl::scroll):
* platform/graphics/cairo/BackingStoreBackendCairoImpl.h: Renamed from Source/WebCore/platform/cairo/WidgetBackingStoreCairo.h.
* platform/graphics/cairo/BackingStoreBackendCairoX11.cpp: Renamed from Source/WebCore/platform/gtk/WidgetBackingStoreGtkX11.cpp.
(WebCore::BackingStoreBackendCairoX11::BackingStoreBackendCairoX11):
(WebCore::BackingStoreBackendCairoX11::~BackingStoreBackendCairoX11):
(WebCore::BackingStoreBackendCairoX11::scroll):
* platform/graphics/cairo/BackingStoreBackendCairoX11.h: Renamed from Source/WebCore/platform/gtk/WidgetBackingStoreGtkX11.h.
* platform/graphics/cairo/CairoUtilities.cpp:
(WebCore::cairoSurfaceGetDeviceScale):
* platform/graphics/cairo/CairoUtilities.h:
2014-10-23 Zalan Bujtas <zalan@apple.com>
WebContent crash at WebCore::RenderTextControl::textFormControlElement const.
https://bugs.webkit.org/show_bug.cgi?id=138035
Reviewed by Antti Koivisto.
NULL-check element().renderer() before using it.
* html/SearchInputType.cpp:
(WebCore::SearchInputType::didSetValueByUserEdit):
2014-10-23 Gyuyoung Kim <gyuyoung.kim@samsung.com>
Remove HarfBuzzRun::create() factory function
https://bugs.webkit.org/show_bug.cgi?id=137945
Reviewed by Ryosuke Niwa.
As a step to use std::unique_ptr<>, this patch applies std::unique_ptr<> and std::make_unique<>.
Thus HarfBuzzRun::create() is needed no longer.
No new tests, no behavior changes.
* platform/graphics/harfbuzz/HarfBuzzShaper.cpp:
(WebCore::HarfBuzzShaper::collectHarfBuzzRuns):
* platform/graphics/harfbuzz/HarfBuzzShaper.h:
(WebCore::HarfBuzzShaper::HarfBuzzRun::create): Deleted.
2014-10-23 Myles C. Maxfield <mmaxfield@apple.com>
Unreviewed iOS build fix
* editing/FrameSelection.cpp:
2014-10-23 Chris Dumez <cdumez@apple.com>
[Mac] Optimize URL::createCFURL() for the common case
https://bugs.webkit.org/show_bug.cgi?id=138030
Reviewed by Alexey Proskuryakov.
Optimize URL::createCFURL() for the common case by adding a fast path
for when the URL String is already 8-bit (common case).
When the string is 8-bit, we don't need to copy the bytes into a
temporary buffer and we can construct the CFURLRef directly from it.
This makes URL::createCFURL() ~34% faster on my machine.
No new tests, no behavior change.
* platform/mac/URLMac.mm:
(WebCore::URL::createCFURL):
2014-10-23 Myles C. Maxfield <mmaxfield@apple.com>
Carets in GMail and iCloud compositions are the foreground text color
https://bugs.webkit.org/show_bug.cgi?id=138029
Reviewed by Simon Fraser.
Previously, we were only checking whether the background colors of the foreground and background
elements were the same, rather than taking validity and opacity into consideration.
Test: editing/caret/color-span-inside-editable-background.html
* editing/FrameSelection.cpp:
(WebCore::disappearsIntoBackground):
(WebCore::CaretBase::paintCaret):
2014-10-23 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Provide a way to have alternate inspector agents
https://bugs.webkit.org/show_bug.cgi?id=137901
Reviewed by Brian Burg.
* Configurations/FeatureDefines.xcconfig:
2014-10-23 Simon Fraser <simon.fraser@apple.com>
Don't assume that style.overflowX() == style.overflowY()
https://bugs.webkit.org/show_bug.cgi?id=138028
Reviewed by Zalan Bujtas.
WebKit doesn't support independent overflow scroll/hidden on different axes,
but the RenderStyle does report the correct values. So check both overflowX()
and overflowY() in a couple of places where we need to.
* rendering/RenderLayerCompositor.cpp:
(WebCore::styleHasTouchScrolling):
(WebCore::styleChangeRequiresLayerRebuild):
2014-10-23 Chris Dumez <cdumez@apple.com>
Get rid of unnecessary vtables in WebKit
https://bugs.webkit.org/show_bug.cgi?id=138024
Reviewed by Benjamin Poulain.
Get rid of unnecessary vtables in WebKit by de-virtualizing destructors
when possible and marking the class as final to make sure people don't
subclass it.
No new tests, no behavior change.
* WebCore.exp.in:
* css/WebKitCSSMatrix.h:
* css/WebKitCSSMatrix.idl:
* html/canvas/WebGLContextGroup.h:
* html/canvas/WebGLGetInfo.h:
* html/canvas/WebGLUniformLocation.h:
(WebCore::WebGLUniformLocation::~WebGLUniformLocation): Deleted.
* html/canvas/WebGLUniformLocation.idl:
* inspector/DOMPatchSupport.h:
* inspector/InspectorHistory.h:
* inspector/InspectorStyleSheet.h:
* page/WheelEventDeltaTracker.h:
* page/scrolling/ScrollLatchingState.h:
* platform/audio/Biquad.h:
* platform/graphics/Pattern.h:
2014-10-23 Chris Dumez <cdumez@apple.com>
Clean up virtual functions in dom/
https://bugs.webkit.org/show_bug.cgi?id=138019
Reviewed by Benjamin Poulain.
Clean up virtual functions in dom/ by:
- Making virtual functions final when possible
- Making classes final when possible
- Using 'override' when appropriate
- Explicitly marking functions / destructors as virtual when they are
inherently virtual
- Making isXXX() virtual functions private on XXX classes to avoid
unnecessary type checks
- Dropping final for virtual functions in classes already marked as
final
No new tests, no behavior change.
* WebCore.exp.in:
* dom/AutocompleteErrorEvent.h:
* dom/BeforeLoadEvent.h:
(WebCore::BeforeLoadEventInit::BeforeLoadEventInit):
* dom/BeforeTextInsertedEvent.h:
* dom/ClipboardEvent.h:
* dom/CompositionEvent.h:
* dom/CustomEvent.h:
* dom/DeviceMotionController.h:
(WebCore::DeviceMotionController::~DeviceMotionController): Deleted.
* dom/DeviceMotionEvent.h:
* dom/DeviceOrientationController.h:
(WebCore::DeviceOrientationController::~DeviceOrientationController): Deleted.
* dom/DeviceOrientationEvent.h:
* dom/Document.h:
* dom/DocumentFragment.h:
* dom/ErrorEvent.h:
* dom/FocusEvent.h:
* dom/HashChangeEvent.h:
* dom/KeyboardEvent.h:
* dom/LiveNodeList.h:
* dom/MessageEvent.h:
* dom/MessagePort.h:
* dom/MouseEvent.h:
* dom/MouseRelatedEvent.h:
* dom/MutationEvent.h:
* dom/NamedFlowCollection.h:
* dom/OverflowEvent.h:
* dom/PageTransitionEvent.h:
* dom/PendingScript.h:
* dom/PopStateEvent.h:
* dom/RawDataDocumentParser.h:
(WebCore::RawDataDocumentParser::finish): Deleted.
(WebCore::RawDataDocumentParser::flush): Deleted.
(WebCore::RawDataDocumentParser::insert): Deleted.
(WebCore::RawDataDocumentParser::append): Deleted.
* dom/ScriptableDocumentParser.h:
* dom/SecurityPolicyViolationEvent.h:
* dom/TextEvent.h:
* dom/TouchEvent.h:
* dom/TransitionEvent.h:
* dom/UIEvent.h:
* dom/WebKitAnimationEvent.h:
* dom/WebKitTransitionEvent.h:
* dom/WheelEvent.h:
* page/DeviceController.h:
(WebCore::DeviceController::~DeviceController):
2014-10-23 Tim Horton <timothy_horton@apple.com>
Add some SPI headers for NSExtension and NSSharingService{Picker}
https://bugs.webkit.org/show_bug.cgi?id=138027
Reviewed by Anders Carlsson.
* WebCore.xcodeproj/project.pbxproj:
* platform/spi/cocoa/NSExtensionSPI.h: Added.
* platform/spi/mac/NSSharingServicePickerSPI.h: Added.
* platform/spi/mac/NSSharingServiceSPI.h: Added.
Add modern SPI headers for NSExtension, and NSSharingService{Picker}.
* rendering/RenderThemeMac.mm:
Replace redefinitions with an SPI header #import.
2014-10-23 Eric Carlson <eric.carlson@apple.com>
[Mac] don't update caption user style sheet during parsing
https://bugs.webkit.org/show_bug.cgi?id=137983
rdar://problem/18735366
Reviewed by Jer Noble.
No new tests, existing tests cover the changes.
* page/CaptionUserPreferencesMediaAF.cpp:
(WebCore::CaptionUserPreferencesMediaAF::CaptionUserPreferencesMediaAF): Initialize m_updateStyleSheetTimer.
(WebCore::CaptionUserPreferencesMediaAF::updateTimerFired): Call updateCaptionStyleSheetOveride.
(WebCore::CaptionUserPreferencesMediaAF::setInterestedInCaptionPreferenceChanges): Prime a timer to update
the captions style sheet after a slight delay.
2014-10-23 Chris Dumez <cdumez@apple.com>
Move remaining Length-type properties to the new StyleBuilder
https://bugs.webkit.org/show_bug.cgi?id=138012
Reviewed by Antti Koivisto.
Move remaining Length-type properties from DeprecatedStyleBuilder to
the new StyleBuilder so that they are now generated from
CSSPropertyNames.in as well. The patch introduces a couple of type
converters for those: "LengthSizing / LengthMaxSizing".
No new tests, no behavior change.
* css/CSSPropertyNames.in:
* css/DeprecatedStyleBuilder.cpp:
(WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
* css/StyleBuilderConverter.h:
(WebCore::StyleBuilderConverter::convertLengthSizing):
(WebCore::StyleBuilderConverter::convertLengthMaxSizing):
2014-10-23 Jer Noble <jer.noble@apple.com>
[Mac] Safari cannot play 'audio/amr' content.
https://bugs.webkit.org/show_bug.cgi?id=137894
Reviewed by Eric Carlson.
Test: media/media-can-play-case-insensitive.html
Sites are returning 'video/amr' for AMR audio content, but the IANA spec says 'audio/AMR', which is also what
AVFoundation claims to support. However, MIME types are supposed to be case-insensitive. When creating our
mime type cache, case-fold to lower all MIME types given to us by our media frameworks.
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::mimeTypeCache):
* platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
(WebCore::addFileTypesToCache):
2014-10-23 Chris Dumez <cdumez@apple.com>
Move Length-type CSS properties from DeprecatedStyleBuilder to the new Style Builder
https://bugs.webkit.org/show_bug.cgi?id=138000
Reviewed by Andreas Kling.
Move most Length-type CSS properties from DeprecatedStyleBuilder to the
new Style Builder so that they are now generated. This patch adds
support for a "Converter" option in CSSPropertyNames.in that can be
used to specify a type converter function in
css/StyleBuilderConverter.h. This patch adds support for Length and
LengthOrAuto converters so that most Length-type properties can now be
generated.
Another converter (likely called "LengthSizing") will be needed to
generate the remaining Length-type properties. This will be taken care
of in a follow-up patch.
This patch is inspired by the following Blink revision by
<timloh@chromium.org>:
https://src.chromium.org/viewvc/blink?view=rev&revision=150500
No new tests, no behavior change.
* WebCore.xcodeproj/project.pbxproj:
* css/CSSPropertyNames.in:
* css/DeprecatedStyleBuilder.cpp:
(WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
* css/SVGCSSPropertyNames.in:
* css/StyleBuilder.h:
* css/StyleBuilderConverter.h: Added.
(WebCore::StyleBuilderConverter::convertLength):
(WebCore::StyleBuilderConverter::convertLengthOrAuto):
* css/StyleResolver.cpp:
(WebCore::StyleResolver::applyProperty):
* css/makeprop.pl:
2014-10-23 Zan Dobersek <zdobersek@igalia.com>
Const-ify static s_resourceType members in RenderSVGResource* classes
https://bugs.webkit.org/show_bug.cgi?id=137911
Reviewed by Andreas Kling.
Make s_resourceType static members in RenderSVGResource* classes const.
Also update the resourceType() methods, where necessary, so that they
return the s_resourceType constant.
* rendering/svg/RenderSVGResourceClipper.cpp:
* rendering/svg/RenderSVGResourceClipper.h:
* rendering/svg/RenderSVGResourceFilter.cpp:
* rendering/svg/RenderSVGResourceFilter.h:
* rendering/svg/RenderSVGResourceLinearGradient.cpp:
* rendering/svg/RenderSVGResourceLinearGradient.h:
* rendering/svg/RenderSVGResourceMarker.cpp:
* rendering/svg/RenderSVGResourceMarker.h:
* rendering/svg/RenderSVGResourceMasker.cpp:
* rendering/svg/RenderSVGResourceMasker.h:
* rendering/svg/RenderSVGResourcePattern.cpp:
* rendering/svg/RenderSVGResourcePattern.h:
* rendering/svg/RenderSVGResourceRadialGradient.cpp:
* rendering/svg/RenderSVGResourceRadialGradient.h:
* rendering/svg/RenderSVGResourceSolidColor.cpp:
* rendering/svg/RenderSVGResourceSolidColor.h:
2014-10-23 Zan Dobersek <zdobersek@igalia.com>
[TexMap] Clean up virtual method declarations in GraphicsLayerTextureMapper
https://bugs.webkit.org/show_bug.cgi?id=137957
Reviewed by Martin Robinson.
Added override notation to the GraphicsLayerTextureMapper methods that are
overriding the base methods from the GraphicsLayer class and don't have it yet.
Also reordered these methods to follow the order of declaration in the
GraphicsLayer class.
Removed ::setName() and ::willBeDestroyed() methods since they just called
the base class' methods.
Also removed the ::solidColor() and ::changeMask() methods. The first one was
only called in one place which can reference the m_solidColor member directly,
and the second one wasn't used at all.
* platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
(WebCore::GraphicsLayerTextureMapper::commitLayerChanges):
(WebCore::GraphicsLayerTextureMapper::setName): Deleted.
(WebCore::GraphicsLayerTextureMapper::willBeDestroyed): Deleted.
* platform/graphics/texmap/GraphicsLayerTextureMapper.h:
(WebCore::GraphicsLayerTextureMapper::solidColor): Deleted.
(WebCore::GraphicsLayerTextureMapper::usesContentsLayer): Deleted.
(WebCore::GraphicsLayerTextureMapper::platformLayer): Deleted.
(WebCore::GraphicsLayerTextureMapper::changeMask): Deleted.
2014-10-23 Krzysztof Czech <k.czech@samsung.com>
AX: Do the early return when role is different than UnknownRole
https://bugs.webkit.org/show_bug.cgi?id=137880
Reviewed by Chris Fleizach.
We do not need to call ariaRoleAttribute() to check whether m_ariaRole is different than UnknownRole.
Just check m_ariaRole instead.
No new tests, no behavior change, just some cleanup
* accessibility/AccessibilityNodeObject.cpp:
(WebCore::AccessibilityNodeObject::determineAccessibilityRole):
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::determineAccessibilityRole):
* accessibility/AccessibilityTableRow.cpp:
(WebCore::AccessibilityTableRow::determineAccessibilityRole):
2014-10-23 Yusuke Suzuki <utatane.tea@gmail.com>
CSS JIT: Implement :matches
https://bugs.webkit.org/show_bug.cgi?id=137947
Reviewed by Benjamin Poulain.
Initial patch for supporting :matches in CSS JIT.
In this patch, we implement :matches
by leveraging the generalized nested backtracking implementation.
Tests: fast/selectors/matches-backtracking.html
fast/selectors/matches-complex.html
* cssjit/SelectorCompiler.cpp:
(WebCore::SelectorCompiler::addPseudoClassType):
(WebCore::SelectorCompiler::hasAnyCombinators):
(WebCore::SelectorCompiler::computeBacktrackingMemoryRequirements):
(WebCore::SelectorCompiler::computeBacktrackingInformation):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementMatching):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementMatchesMatchesPseudoClass):
2014-10-23 Milan Crha <mcrha@redhat.com>
RenderThemeGtk::mediaControlsScript() is not defined when VIDEO is disabled.
<https://webkit.org/b/137970>.
Reviewed by Carlos Garcia Campos.
* rendering/RenderThemeGtk.cpp:
2014-10-22 Milan Crha <mcrha@redhat.com>
Do not include GraphicsContext3D.h when 3D_GRAPHICS is not used.
<https://webkit.org/b/137969>.
Reviewed by Carlos Garcia Campos.
* platform/graphics/cairo/GraphicsContext3DCairo.cpp:
2014-10-22 Milan Crha <mcrha@redhat.com>
Do not build WidgetBackingStoreGtkX11 when not used.
<https://webkit.org/b/137972>.
Reviewed by Carlos Garcia Campos.
* platform/gtk/WidgetBackingStoreGtkX11.cpp:
* platform/gtk/WidgetBackingStoreGtkX11.h:
2014-10-22 Simon Fraser <simon.fraser@apple.com>
[iOS] Toggling overflow:scroll to hidden on element with -webkit-overflow-scrolling:touch can cause children to disappear
https://bugs.webkit.org/show_bug.cgi?id=137999
rdar://problem/18425550
Reviewed by Zalan Bujtas.
When toggling overflow from scroll to hidden on an element with -webkit-overflow-scrolling:touch,
we'd fail to do a compositing layer rebuild, which caused various issues like unparented
descendants, and misplaced and unrepainted content.
This happened because we'd get to RenderLayerBacking::updateConfiguration() via styleChanged
with the view needing layout, so never hit the updateScrollingLayers() code, and the subsequent
updateCompositingLayers() would be a no-op.
Fix by explicitly triggering a layer rebuild when style changes such that the touch-scrollability
of an element changes, as we do for changes in clip.
Test: compositing/scrolling/touch-scroll-to-clip.html
* rendering/RenderLayerCompositor.cpp:
(WebCore::isScrollableOverflow):
(WebCore::styleHasTouchScrolling):
(WebCore::styleChangeRequiresLayerRebuild):
2014-10-22 Chris Dumez <cdumez@apple.com>
Clean up virtual functions in rendering/
https://bugs.webkit.org/show_bug.cgi?id=137984
Reviewed by Darin Adler.
Clean up virtual functions in rendering/ by:
- Making virtual functions final when possible
- Making classes final when possible
- Using 'override' when appropriate
- Explicitly marking functions / destructors as virtual when they are
inherently virtual
- Dropping virtual destructors when the class does not have subclasses
and mark the class as final, to get rid of unnecessary vtables
- Making isXXX() virtual functions private on XXX classes to avoid
unnecessary type checks
- De-virtualizing some functions that do not need to be virtual
- Dropping final for virtual functions in classes already marked as
final
No new tests, no behavior change.
* html/shadow/SliderThumbElement.cpp:
* rendering/AutoTableLayout.h:
* rendering/ClipPathOperation.h:
(WebCore::ClipPathOperation::type):
(WebCore::ClipPathOperation::isSameType):
* rendering/EllipsisBox.h:
* rendering/FixedTableLayout.h:
* rendering/InlineElementBox.h:
* rendering/RenderBlockFlow.h:
* rendering/RenderCombineText.h:
* rendering/RenderCounter.h:
* rendering/RenderDeprecatedFlexibleBox.h:
* rendering/RenderFlexibleBox.h:
* rendering/RenderFullScreen.h:
* rendering/RenderGrid.h:
* rendering/RenderLayer.h:
* rendering/RenderLayerBacking.h:
* rendering/RenderLayerCompositor.h:
* rendering/RenderLayerFilterInfo.h:
* rendering/RenderLineBreak.h:
* rendering/RenderMarquee.h:
* rendering/RenderMediaControlElements.h:
* rendering/RenderMultiColumnFlowThread.h:
* rendering/RenderMultiColumnSet.h:
* rendering/RenderMultiColumnSpannerPlaceholder.h:
* rendering/RenderNamedFlowFragment.h:
* rendering/RenderNamedFlowThread.h:
* rendering/RenderQuote.h:
* rendering/RenderRegion.h:
(WebCore::RenderRegion::renderName): Deleted.
* rendering/RenderReplica.h:
* rendering/RenderRubyBase.h:
* rendering/RenderRubyRun.h:
* rendering/RenderScrollbar.h:
* rendering/RenderScrollbarPart.h:
* rendering/RenderScrollbarTheme.h:
(WebCore::RenderScrollbarTheme::~RenderScrollbarTheme): Deleted.
(WebCore::RenderScrollbarTheme::scrollbarThickness): Deleted.
(WebCore::RenderScrollbarTheme::buttonsPlacement): Deleted.
(WebCore::RenderScrollbarTheme::supportsControlTints): Deleted.
(WebCore::RenderScrollbarTheme::shouldCenterOnThumb): Deleted.
(WebCore::RenderScrollbarTheme::initialAutoscrollTimerDelay): Deleted.
(WebCore::RenderScrollbarTheme::autoscrollTimerDelay): Deleted.
(WebCore::RenderScrollbarTheme::registerScrollbar): Deleted.
(WebCore::RenderScrollbarTheme::unregisterScrollbar): Deleted.
* rendering/RenderSnapshottedPlugIn.h:
* rendering/RenderTextControlMultiLine.h:
* rendering/RenderTextFragment.h:
* rendering/RenderThemeGtk.h:
* rendering/RenderThemeIOS.h:
* rendering/RenderThemeWin.h:
* rendering/RenderVideo.h:
* rendering/TextAutosizer.h:
* rendering/TrailingFloatsRootInlineBox.h:
* rendering/mathml/RenderMathMLBlock.h:
* rendering/mathml/RenderMathMLMenclose.h:
* rendering/mathml/RenderMathMLOperator.h:
* rendering/mathml/RenderMathMLRadicalOperator.h:
* rendering/mathml/RenderMathMLRoot.h:
* rendering/mathml/RenderMathMLRow.h:
* rendering/mathml/RenderMathMLScripts.h:
* rendering/mathml/RenderMathMLToken.h:
* rendering/mathml/RenderMathMLUnderOver.h:
* rendering/shapes/BoxShape.h:
* rendering/shapes/PolygonShape.h:
* rendering/shapes/RasterShape.h:
* rendering/shapes/RectangleShape.h:
* rendering/style/BasicShapes.h:
* rendering/style/StylePendingImage.h:
(WebCore::StylePendingImage::computeIntrinsicDimensions): Deleted.
* rendering/svg/RenderSVGBlock.h:
* rendering/svg/RenderSVGContainer.h:
* rendering/svg/RenderSVGEllipse.h:
* rendering/svg/RenderSVGForeignObject.h:
* rendering/svg/RenderSVGImage.h:
* rendering/svg/RenderSVGPath.h:
* rendering/svg/RenderSVGRect.h:
* rendering/svg/RenderSVGResourceClipper.h:
* rendering/svg/RenderSVGResourceFilter.h:
* rendering/svg/RenderSVGResourceFilterPrimitive.h:
* rendering/svg/RenderSVGResourceLinearGradient.h:
* rendering/svg/RenderSVGResourceMarker.h:
* rendering/svg/RenderSVGResourceMasker.h:
* rendering/svg/RenderSVGResourcePattern.h:
* rendering/svg/RenderSVGResourceRadialGradient.h:
* rendering/svg/RenderSVGRoot.h:
* rendering/svg/RenderSVGTSpan.h:
* rendering/svg/RenderSVGText.h:
* rendering/svg/RenderSVGTransformableContainer.h:
* rendering/svg/RenderSVGViewportContainer.h:
* rendering/svg/SVGInlineTextBox.h:
* rendering/svg/SVGRootInlineBox.h:
2014-10-22 Jer Noble <jer.noble@apple.com>
REGRESSION(r175000): Crash in SourceBufferPrivateAVFObjC::destroyParser()
https://bugs.webkit.org/show_bug.cgi?id=137990
Reviewed by Alexey Proskuryakov.
NULL-check m_mediaSource before using.
* platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
(WebCore::SourceBufferPrivateAVFObjC::destroyParser):
2014-10-22 Said Abou-Hallawa <sabouhallawa@apple.com>
SVG loaded through html <img> can't request to load any external resources.
https://bugs.webkit.org/show_bug.cgi?id=137762.
Reviewed by Daniel Bates.
SVG images have unique security rules that prevent them from loading any external
resources. This patch enforces these rules in CachedResourceLoader::canRequest for
all non-data-uri resources.
The fix and the tests are ported but modified a little from the chromium fix:
http://src.chromium.org/viewvc/blink?view=rev&rev=176084
Test: http/tests/security/svg-image-with-cached-remote-image.html
http/tests/security/svg-image-with-css-cross-domain.html
For the SVG image, prevent loading any external sub-resource except for data urls.
* loader/cache/CachedResourceLoader.cpp:
(WebCore::CachedResourceLoader::canRequest):
2014-10-21 Ada Chan <adachan@apple.com>
MediaPlayerPrivateAVFoundation::hasAudio() returns false even when there is an audible AVMediaSelectionOption selected
https://bugs.webkit.org/show_bug.cgi?id=137935
Reviewed by Eric Carlson.
Set hasAudio to true if there's a selected audible AVMediaSelectionOption
after the call to updateAudioTracks(). Ditto for video.
Test: http/tests/media/hls/hls-audio-tracks-has-audio.html
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::tracksChanged):
* testing/Internals.cpp:
(WebCore::Internals::mediaElementHasCharacteristic):
* testing/Internals.h:
* testing/Internals.idl:
Add internals.mediaElementHasCharacteristic for the new test.
2014-10-22 Gyuyoung Kim <gyuyoung.kim@samsung.com>
Remove WidgetBackingStoreCairo::create() factory function
https://bugs.webkit.org/show_bug.cgi?id=137943
Reviewed by Darin Adler.
WidgetBackingStoreCairo::create() can be replaced by std::make_unique<>.
Thus this patch removes it, then use std::make_unique<>|std::unique_ptr<>.
No new tests, no behavior changes.
* platform/cairo/WidgetBackingStoreCairo.cpp:
(WebCore::WidgetBackingStoreCairo::create): Deleted.
* platform/cairo/WidgetBackingStoreCairo.h:
* platform/gtk/WidgetBackingStoreGtkX11.cpp:
(WebCore::WidgetBackingStoreGtkX11::create): Deleted.
* platform/gtk/WidgetBackingStoreGtkX11.h:
2014-10-22 Gyuyoung Kim <gyuyoung.kim@samsung.com>
Remove TextCheckerEnchant::create() factory function
https://bugs.webkit.org/show_bug.cgi?id=137944
Reviewed by Darin Adler.
TextCheckerEnchant::create() can be replaced by std::make_unique<> and std::unique_ptr<>.
No new tests, no behavior change.
* platform/text/enchant/TextCheckerEnchant.h:
(WebCore::TextCheckerEnchant::create): Deleted.
2014-10-22 Chris Dumez <cdumez@apple.com>
Avoid confusion between AccessibilityObject::isTable() / isAccessibilityTable()
https://bugs.webkit.org/show_bug.cgi?id=137899
Reviewed by Darin Adler.
Avoid confusion between AccessibilityObject::isTable() and
isAccessibilityTable(). isTable() is equivalent to
is<AccessibilityTable>(), while isAccessibilityTable() is an
AccessibilityTable that is exposed as an AccessibilityTable to the
platform.
This patch is renaming isAccessibilityTable() to
isExposableThroughAccessibility(), makes it non-virtual and defines it
on AccessibilityTable only, for clarity.
This patch also renames isTableExposableThroughAccessibility() to
computeIisTableExposableThroughAccessibility() as it is called only
once to initialize the m_isExposableThroughAccessibility data member.
No new tests, no behavior change.
* accessibility/AccessibilityARIAGrid.cpp:
(WebCore::AccessibilityARIAGrid::addChildren):
* accessibility/AccessibilityARIAGrid.h:
* accessibility/AccessibilityARIAGridCell.cpp:
(WebCore::AccessibilityARIAGridCell::parentTable):
(WebCore::AccessibilityARIAGridCell::rowIndexRange):
(WebCore::AccessibilityARIAGridCell::columnIndexRange):
* accessibility/AccessibilityARIAGridRow.cpp:
(WebCore::AccessibilityARIAGridRow::disclosedRows):
(WebCore::AccessibilityARIAGridRow::disclosedByRow):
(WebCore::AccessibilityARIAGridRow::parentTable):
* accessibility/AccessibilityNodeObject.cpp:
(WebCore::shouldUseAccessiblityObjectInnerText):
* accessibility/AccessibilityObject.cpp:
(WebCore::AccessibilityObject::isAccessibilityObjectSearchMatchAtIndex):
(WebCore::appendChildrenToArray):
* accessibility/AccessibilityObject.h:
(WebCore::AccessibilityObject::isAccessibilityTable): Deleted.
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::ariaSelectedRows):
* accessibility/AccessibilityTable.cpp:
(WebCore::AccessibilityTable::AccessibilityTable):
(WebCore::AccessibilityTable::init):
(WebCore::AccessibilityTable::isExposableThroughAccessibility):
(WebCore::AccessibilityTable::computeIsTableExposableThroughAccessibility):
(WebCore::AccessibilityTable::addChildren):
(WebCore::AccessibilityTable::tableLevel):
(WebCore::AccessibilityTable::roleValue):
(WebCore::AccessibilityTable::computeAccessibilityIsIgnored):
(WebCore::AccessibilityTable::title):
(WebCore::AccessibilityTable::isAccessibilityTable): Deleted.
(WebCore::AccessibilityTable::isTableExposableThroughAccessibility): Deleted.
* accessibility/AccessibilityTable.h:
* accessibility/AccessibilityTableCell.cpp:
(WebCore::AccessibilityTableCell::isTableCell):
* accessibility/AccessibilityTableColumn.cpp:
(WebCore::AccessibilityTableColumn::headerObject):
(WebCore::AccessibilityTableColumn::addChildren):
* accessibility/AccessibilityTableHeaderContainer.cpp:
(WebCore::AccessibilityTableHeaderContainer::addChildren):
* accessibility/AccessibilityTableRow.cpp:
(WebCore::AccessibilityTableRow::isTableRow):
(WebCore::AccessibilityTableRow::parentTable):
* accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
(webkitAccessibleGetNChildren):
(webkitAccessibleRefChild):
(webkitAccessibleGetAttributes):
* accessibility/mac/AXObjectCacheMac.mm:
(WebCore::AXObjectCache::postPlatformNotification):
* accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(-[WebAccessibilityObjectWrapper additionalAccessibilityAttributeNames]):
(-[WebAccessibilityObjectWrapper accessibilityAttributeNames]):
(-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
(-[WebAccessibilityObjectWrapper accessibilityParameterizedAttributeNames]):
(-[WebAccessibilityObjectWrapper accessibilitySetValue:forAttribute:]):
(-[WebAccessibilityObjectWrapper accessibilityAttributeValue:forParameter:]):
2014-10-22 Chris Dumez <cdumez@apple.com>
Avoid repeated is<MutableStyleProperties>() checks in StyleProperties
https://bugs.webkit.org/show_bug.cgi?id=137978
Reviewed by Andreas Kling.
Reduce the amount of is<MutableStyleProperties>() checks in
StyleProperties by:
- Removing the checks in each method of StyleProperties::PropertyReference,
and replace them by a single check in StyleProperties::propertyAt().
- Providing faster propertyCount() / propertyAt() / isEmpty() methods on
MutableStyleProperties / ImmutableStyleProperties as a lot of callers use
tight typing.
- Using tighter typing at call sites whenever possible.
Ideally, we could be able to use iterators instead of propertyCount() /
propertyAt() but this is not trivial to do efficiently as the
representation in memory is fundamentally different for MutableStyleProperties
/ ImmutableStyleProperties. We may be able to do better longer term, but
this is already more efficient short term at least.
No new tests, no behavior change.
* css/StyleProperties.cpp:
(WebCore::MutableStyleProperties::MutableStyleProperties):
(WebCore::StyleProperties::PropertyReference::cssText):
* css/StyleProperties.h:
(WebCore::StyleProperties::PropertyReference::PropertyReference):
(WebCore::StyleProperties::PropertyReference::id):
(WebCore::StyleProperties::PropertyReference::shorthandID):
(WebCore::StyleProperties::PropertyReference::isImportant):
(WebCore::StyleProperties::PropertyReference::isInherited):
(WebCore::StyleProperties::PropertyReference::isImplicit):
(WebCore::StyleProperties::PropertyReference::value):
(WebCore::StyleProperties::PropertyReference::toCSSProperty):
(WebCore::StyleProperties::isEmpty):
(WebCore::ImmutableStyleProperties::isEmpty):
(WebCore::MutableStyleProperties::isEmpty):
(WebCore::ImmutableStyleProperties::propertyAt):
(WebCore::MutableStyleProperties::propertyAt):
(WebCore::StyleProperties::propertyAt):
(WebCore::StyleProperties::propertyCount):
(WebCore::StyleProperties::PropertyReference::propertyMetadata): Deleted.
(WebCore::StyleProperties::PropertyReference::propertyValue): Deleted.
* editing/EditingStyle.cpp:
(WebCore::removePropertiesInStyle):
(WebCore::EditingStyle::removePropertiesInElementDefaultStyle):
2014-10-22 Eric Carlson <eric.carlson@apple.com>
[Mac][MediaStream] clean up bit rot
https://bugs.webkit.org/show_bug.cgi?id=137976
Reviewed by Jer Noble.
No new tests, this just gets the Mac port compiling again.
* Modules/mediastream/MediaStream.h: Add a virtual destructor to Observer since it has
a virtual method.
* WebCore.exp.in: Export RTCPeerConnectionHandler::create and RTCPeerConnectionHandlerMock::create(WebCore::RTCPeerConnectionHandlerClient*),
they are both use by Internals for testing.
* WebCore.xcodeproj/project.pbxproj: Add RTC and MediaStream files.
* html/HTMLMediaElement.h: Forward declare MediaStream instead of including MediaStream.h.
* platform/mediastream/RTCPeerConnectionHandler.h: EXPORT the create method.
* platform/mock/MediaConstraintsMock.cpp:
(WebCore::isSupported): Make static.
(WebCore::isValid): Ditto.
* platform/mock/RTCPeerConnectionHandlerMock.h: EXPORT the create method.
2014-10-22 Chris Dumez <cdumez@apple.com>
[Mac][WK2] Fix applicationIsSafari() detection
https://bugs.webkit.org/show_bug.cgi?id=137893
Reviewed by Alexey Proskuryakov.
I noticed when profiling Safari on Mac that we were exercising a code
path we shouldn't because it is meant for other applications that
Safari.
The detection relies on the applicationIsSafari() function in
RuntimeApplicationChecks.cpp. This was in some cases returning false on
my machine even though I was running Safari so I investigated a bit and
noticed that the check relies on the main bundle identifier string and
is doing:
isSafari = mainBundleIsEqualTo("com.apple.Safari")
|| mainBundleIsEqualTo("com.apple.WebProcess");
This WebProcess detection is very unreliable because:
- It matches other apps than Safari's WebProcesses
- The bundle name for the WebProcess is sometimes
"com.apple.WebKit.WebContent" or
"com.apple.WebKit.WebContent.Development".
The solution used in this patch is to move the applicationIsSafari()
check to the UIProcess so that the check actually succeeds reliably.
The call site for applicationIsSafari() was in
ResourceRequest::useQuickLookResourceCachingQuirks(). This match
removes that logic from ResourceRequest and move it to
FrameLoaderClient as only the FrameLoader is interested in this
information. The logic to determine if we should use QuickLook
resource caching quirks is moved to a new QuickLook class under
platform/ as the code needs to be shared between WebKit and WebKit2.
On WebKit2, we make use that code on the UIProcess side and pass
the flag as a parameter when constructing the WebProcess. The flag
is then stored on the WebProcess and queried by WebFrameLoaderClient.
Previously, we would spend ~1% of the WebProcess cpu time (when loading
apple.com) trying to detect if we should use QuickLook resource caching
quirks even though that check was supposed to be disabled and return
early when running Safari.
No new tests, not easily testable.
* WebCore.exp.in:
* WebCore.xcodeproj/project.pbxproj:
* loader/EmptyClients.h:
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::subresourceCachePolicy):
* loader/FrameLoaderClient.h:
* platform/RuntimeApplicationChecks.cpp:
(WebCore::applicationIsSafari):
Remove "com.apple.WebProcess" bundle name matching as this causes false
positives (matches other applications than Safari's WebProcesses) and
it is no longer needed now that applicationIsSafari() is always called
from the UIProcess.
* platform/mac/QuickLookMac.h: Added.
* platform/mac/QuickLookMac.mm: Copied from Source/WebCore/platform/network/mac/ResourceRequestMac.mm.
(WebCore::QuickLookMac::computeNeedsQuickLookResourceCachingQuirks):
* platform/network/cf/ResourceRequest.h:
* platform/network/ios/ResourceRequestIOS.mm:
(WebCore::ResourceRequest::useQuickLookResourceCachingQuirks): Deleted.
* platform/network/mac/ResourceRequestMac.mm:
(WebCore::initQuickLookResourceCachingQuirks): Deleted.
(WebCore::ResourceRequest::useQuickLookResourceCachingQuirks): Deleted.
2014-10-22 Shivakumar JM <shiva.jm@samsung.com>
XMLHttpRequest should support attribute responseURL as per latest XHR spec.
https://bugs.webkit.org/show_bug.cgi?id=136938
Reviewed by Alexey Proskuryakov.
Tests: http/tests/xmlhttprequest/basic-auth-responseURL.html
http/tests/xmlhttprequest/cross-origin-redirect-responseURL.html
http/tests/xmlhttprequest/redirect-credentials-responseURL.html
http/tests/xmlhttprequest/xmlhttprequest-responseURL.html
XMLHttpRequest should support attribute responseURL
* xml/XMLHttpRequest.cpp:
(WebCore::XMLHttpRequest::responseURL):
* xml/XMLHttpRequest.h:
* xml/XMLHttpRequest.idl:
2014-10-22 Chris Dumez <cdumez@apple.com>
Add initial support for generating the StyleBuilder from CSSPropertyNames.in
https://bugs.webkit.org/show_bug.cgi?id=137910
Reviewed by Andreas Kling.
Add initial support for generating the StyleBuilder from
CSSPropertyNames.in. This is a first step towards getting rid of the
legacy DeprecatedStyleBuilder class and having everything defined in one
place (CSSPropertyNames.in).
This patch updates makeprop.pl script to generate a StyleBuilder.cpp
file that generate a the StyleBuilder::applyProperty() method
implementation using a huge switch statement for all the CSS
properties. With this patch, we are now generating the new StyleBuilder
code for all the "simple" CSS properties (i.e. those that were using
ApplyPropertyDefault<> in DeprecatedStyleBuilder.cpp). I am using a
"NewStyleBuilder" option in CSSPropertyNames.in for properties that
we generate to help with improving incrementally the generator. Once
we are able to generate all properties, this transition option will
do away and become the default.
By default, the generator will make an educated guess for the type
name, the getter, the setter and the initial function of each property.
For example, for the border-collapse property, it will use:
- TypeName: EBorderCollapse (i.e. 'E' + PropertyId)
- Getter: borderCollapse() (i.e. PropertyId with first letter lowercased)
- Setter: setBorderCollapse() (i.e. 'set' + PropertyId)
- Initial: initialBorderCollapse() (i.e. 'initial' + PropertyId)
This works for most properties. For properties that need
special-casing, developers can use the following options in
CSSPropertyNames.in:
- TypeName: Overrides the type name
- Getter: Overrides the getter name
- Setter: Overrides the setter name
- Initial: Overrides the initial function name
- NameForMethods: Overrides the Getter / Setter / Initial function
names. For e.g. "NameForMethods=OverflowWrap" will use
"overflowWrap() / setOverflowWrap() / initialOverflowWrap()".
The patch is inspired by the following Blink revision by
<timloh@chromium.org>:
https://src.chromium.org/viewvc/blink?view=rev&revision=150424
No new tests, no behavior change.
* CMakeLists.txt:
* DerivedSources.make:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* css/CSSPropertyNames.in:
* css/DeprecatedStyleBuilder.cpp:
(WebCore::ApplyPropertyVerticalAlign::createHandler):
(WebCore::ApplyPropertyDisplay::applyInitialValue):
(WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
* css/StyleBuilder.h: Added.
* css/StyleResolver.cpp:
(WebCore::StyleResolver::adjustRenderStyle):
(WebCore::StyleResolver::applyProperty):
* css/makeprop.pl:
* rendering/style/RenderStyle.h:
Move the initialXXX() methods that were in NonInheritedFlags to
RenderStyle class, with the other initialXXX() methods to facilitate
code generation.
* rendering/style/StyleMultiColData.cpp:
(WebCore::StyleMultiColData::StyleMultiColData):
* rendering/style/StyleRareNonInheritedData.cpp:
(WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
2014-10-22 Carlos Garcia Campos <cgarcia@igalia.com>
Unreviewed. Fix GStreamer debug build after r175050.
Explicitly include wtf/MainThread.h.
* platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
2014-10-22 Carlos Garcia Campos <cgarcia@igalia.com>
[GStreamer] Do not use CachedResourceLoader, SecurityOrigin, ResourceBuffer and other WebCore types
https://bugs.webkit.org/show_bug.cgi?id=137064
Reviewed by Philippe Normand.
Move the media resource loader to a new class in WebCore/loader
that inherits from a PlatformMediaResourceLoader class defined in
the platform layer. The platform specific behaviour is implemented
using a client also defined in the platform layer, implemented by
every media backend, and used by the WebCore MediaResourceLoader.
* CMakeLists.txt: Add new files to compilation.
* WebCore.vcxproj/WebCore.vcxproj: Ditto.
* WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.
* WebCore.xcodeproj/project.pbxproj: Ditto.
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::mediaPlayerCreateResourceLoader):
Create a MediaResourceLoader.
(WebCore::HTMLMediaElement::mediaPlayerCORSMode): Deleted. This is
no longer used.
* html/HTMLMediaElement.h:
* loader/MediaResourceLoader.cpp: Added.
(WebCore::MediaResourceLoader::MediaResourceLoader):
(WebCore::MediaResourceLoader::~MediaResourceLoader):
(WebCore::MediaResourceLoader::start): Start a new load for the
given request and load options.
(WebCore::MediaResourceLoader::stop): Stop the load if needed.
(WebCore::MediaResourceLoader::setDefersLoading):
(WebCore::MediaResourceLoader::responseReceived): Handle CORS
access check and notify the client about the response.
(WebCore::MediaResourceLoader::dataReceived): Notify the client.
(WebCore::MediaResourceLoader::notifyFinished): Ditto.
(WebCore::MediaResourceLoader::getOrCreateReadBuffer): Ask the
client to create the read buffer.
* loader/MediaResourceLoader.h: Added.
* platform/graphics/MediaPlayer.cpp:
(WebCore::MediaPlayer::createResourceLoader): Call
mediaPlayerCreateResourceLoader() if there's a client.
* platform/graphics/MediaPlayer.h:
(WebCore::MediaPlayerClient::mediaPlayerCreateResourceLoader):
(WebCore::MediaPlayerClient::mediaPlayerCORSMode): Deleted.
* platform/graphics/PlatformMediaResourceLoader.h: Added.
(WebCore::PlatformMediaResourceLoaderClient::responseReceived):
(WebCore::PlatformMediaResourceLoaderClient::dataReceived):
(WebCore::PlatformMediaResourceLoaderClient::bufferReceived):
(WebCore::PlatformMediaResourceLoaderClient::accessControlCheckFailed):
(WebCore::PlatformMediaResourceLoaderClient::loadFailed):
(WebCore::PlatformMediaResourceLoaderClient::loadFinished):
(WebCore::PlatformMediaResourceLoaderClient::getOrCreateReadBuffer):
(WebCore::PlatformMediaResourceLoader::~PlatformMediaResourceLoader):
(WebCore::PlatformMediaResourceLoader::stop):
(WebCore::PlatformMediaResourceLoader::setDefersLoading):
(WebCore::PlatformMediaResourceLoader::didPassAccessControlCheck):
(WebCore::PlatformMediaResourceLoader::PlatformMediaResourceLoader):
* platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
(webKitWebSrcStop): Also delete the PlatformMediaResourceLoader.
(webKitWebSrcStart): Create a new resource loader using
MediaPlayer::createResourceLoader() with a new
CachedResourceStreamingClient as client.
(webKitWebSrcNeedDataMainCb): Call setDefersLoading() for the
resource loader if there's one.
(webKitWebSrcEnoughDataMainCb): Ditto.
(webKitSrcPassedCORSAccessCheck): Return didPassAccessControlCheck.
(StreamingClient::handleResponseReceived): Remove the CORS check
result parameter since that's now handled by MediaResourceLoader.
(CachedResourceStreamingClient::CachedResourceStreamingClient):
(CachedResourceStreamingClient::~CachedResourceStreamingClient):
(CachedResourceStreamingClient::getOrCreateReadBuffer):
(CachedResourceStreamingClient::responseReceived): Update didPassAccessControlCheck.
(CachedResourceStreamingClient::dataReceived):
(CachedResourceStreamingClient::accessControlCheckFailed): Log the
error and stop the load.
(CachedResourceStreamingClient::loadFailed): Log the error if it
was not a cancellation.
(CachedResourceStreamingClient::loadFinished):
(ResourceHandleStreamingClient::didReceiveResponse):
(CachedResourceStreamingClient::setDefersLoading): Deleted.
(CachedResourceStreamingClient::notifyFinished): Deleted.
2014-10-22 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Move GtkInputMethodFilter from Platform to WebKit2
https://bugs.webkit.org/show_bug.cgi?id=137884
Reviewed by Gustavo Noronha Silva.
Remove GtkInputMethodFilter.
* PlatformGTK.cmake:
* platform/gtk/GtkInputMethodFilter.cpp: Removed.
* platform/gtk/GtkInputMethodFilter.h: Removed.
2014-10-22 Tibor Meszaros <tmeszaros.u-szeged@partner.samsung.com>
Match spec for font-weight: bolder|lighter
https://bugs.webkit.org/show_bug.cgi?id=137919
Reviewed by Andreas Kling.
This patch is a merge of Blink's
https://chromiumcodereview.appspot.com/15994009
Currently, bolder and lighter change font-weight in a non-compliant way.
The spec (http://www.w3.org/TR/css3-fonts/#bolderlighter) defines
exactly what the computed values should be given the inherited weight values,
so we should match those.
The removed FIXME's for selecting the next lightest/heaviest weight from
the used font family seems to refer to behaviour from
CSS1 (http://www.w3.org/TR/CSS1/#font-weight), while this is replaced
with a simpler procedure for resolving bolder and lighter in font weights
in CSS2 (http://www.w3.org/TR/CSS2/fonts.html#propdef-font-weight) and CSS3 (link above).
and https://codereview.chromium.org/137813004
According to http://dev.w3.org/csswg/css-fonts/#font-weight-prop, the computed
weight of 'lighter' and 'bolder' are based on the inherited 'font-weight', so set
that inherited weight before calculating 'lighter' and 'bolder'.
Tests: css3/font-weight-multiple-selectors.html
css3/font-weight.html
* css/DeprecatedStyleBuilder.cpp:
(WebCore::ApplyPropertyFontWeight::applyValue):
* platform/graphics/FontDescription.cpp:
(WebCore::FontDescription::lighterWeight):
(WebCore::FontDescription::bolderWeight):
2014-10-22 Rohit Kumar <kumar.rohit@samsung.com>
[GTK]: Fix unused parameter build warnings in WebCore/platform module
https://bugs.webkit.org/show_bug.cgi?id=137921
Reviewed by Carlos Garcia Campos.
* platform/ScrollAnimatorNone.cpp:
(WebCore::ScrollAnimatorNone::PerAxisData::PerAxisData):
(WebCore::ScrollAnimatorNone::animationTimerFired):
2014-10-22 Dhi Aurrahman <diorahman@rockybars.com>
Add relList to the anchor, area and link elements
https://bugs.webkit.org/show_bug.cgi?id=137860
Reviewed by Darin Adler and Chris Dumez.
Add relList to reflect the rel content attribute for anchor[1],
area[2] and link[3] elements.
[1] https://html.spec.whatwg.org/multipage/semantics.html#dom-a-rellist
[2] https://html.spec.whatwg.org/multipage/embedded-content.html#dom-area-rellist
[3] https://html.spec.whatwg.org/multipage/semantics.html#dom-link-rellist
Tests: fast/dom/rel-list-gc.html
fast/dom/rel-list.html
perf/rel-list-remove.html
* CMakeLists.txt:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* dom/SpaceSplitString.cpp:
(WebCore::SpaceSplitString::set):
* html/HTMLAnchorElement.cpp:
(WebCore::HTMLAnchorElement::parseAttribute):
(WebCore::HTMLAnchorElement::relList):
(WebCore::HTMLAnchorElement::setRel): Deleted.
* html/HTMLAnchorElement.h:
* html/HTMLAnchorElement.idl:
* html/HTMLAreaElement.idl:
* html/HTMLLinkElement.cpp:
(WebCore::HTMLLinkElement::parseAttribute):
(WebCore::HTMLLinkElement::relList):
* html/HTMLLinkElement.h:
* html/HTMLLinkElement.idl:
* html/RelList.cpp: Added.
(WebCore::RelList::RelList):
(WebCore::RelList::ref):
(WebCore::RelList::deref):
(WebCore::RelList::length):
(WebCore::RelList::item):
(WebCore::RelList::element):
(WebCore::RelList::updateRelAttribute):
(WebCore::RelList::containsInternal):
(WebCore::RelList::value):
(WebCore::RelList::setValue):
* html/RelList.h: Added.
2014-10-21 Andy Estes <aestes@apple.com>
One more iOS build fix after r175013.
* platform/graphics/ios/FontCacheIOS.mm:
(WebCore::FontCache::createFontPlatformData):
2014-10-21 Benjamin Poulain <bpoulain@apple.com>
CSS Rule features are ignored for nested CSS Selector lists
https://bugs.webkit.org/show_bug.cgi?id=137908
Reviewed by Andreas Kling.
When Rule feature sets were collected, any selector list nested inside an other
selector list was ignored when collecting properties of the CSS Selector.
As a result, style was not invalidated properly when any property listed in
the nested selectors.
This patch fixes the issue by make RuleFeatureSet::collectFeaturesFromSelector()
recursive, evaluating every chain of every selector lists.
Tests: fast/css/class-style-invalidation-optimization.html
fast/css/direct-adjacent-style-sharing-1.html
fast/css/direct-adjacent-style-sharing-2.html
fast/css/direct-adjacent-style-sharing-3.html
fast/css/id-style-invalidation-optimization.html
fast/selectors/class-style-update-with-not.html
fast/selectors/class-style-update-with-nth-child-of.html
fast/selectors/class-style-update.html
* css/RuleFeature.cpp:
(WebCore::recursivelyCollectFeaturesFromSelector):
(WebCore::RuleFeatureSet::collectFeaturesFromSelector):
* css/RuleFeature.h:
* css/RuleSet.cpp:
(WebCore::collectFeaturesFromRuleData):
2014-10-21 Tim Horton <timothy_horton@apple.com>
Try to fix the iOS build after r175013.
* platform/graphics/ios/FontCacheIOS.mm:
(WebCore::FontCache::createFontPlatformData):
2014-10-21 Gyuyoung Kim <gyuyoung.kim@samsung.com>
Use std::unique_ptr | std::make_unique in FontCacheFoo
https://bugs.webkit.org/show_bug.cgi?id=137905
Reviewed by Darin Adler.
Clean up PassOwnPtr|OwnPtr using std::unique_ptr|std::make_unique.
No new tests, no behavior changes.
* platform/graphics/FontCache.cpp:
(WebCore::FontCache::getCachedFontPlatformData):
* platform/graphics/FontCache.h:
* platform/graphics/freetype/FontCacheFreeType.cpp:
(WebCore::FontCache::createFontPlatformData):
* platform/graphics/ios/FontCacheIOS.mm:
(WebCore::FontCache::createFontPlatformData):
* platform/graphics/mac/FontCacheMac.mm:
(WebCore::FontCache::createFontPlatformData):
* platform/graphics/win/FontCacheWin.cpp:
(WebCore::FontCache::createFontPlatformData):
2014-10-21 Ada Chan <adachan@apple.com>
Calling WebCore::Page::setMediaVolume(0) does not mute videos as expected.
https://bugs.webkit.org/show_bug.cgi?id=137305
Reviewed by Darin Adler.
This was broken in http://trac.webkit.org/changeset/154970. To fix this (but not break
GStreamer), remove the "if (m_volumeInitialized)" check before updating the MediaPlayer's
volume to the value multiplied with the Page's mediaVolume. This should not affect GStreamer's
behavior because MediaPlayerPrivateGStreamerBase::setStreamVolumeElement does nothing unless
m_volumeInitialized is true.
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::updateVolume):
2014-10-21 Jer Noble <jer.noble@apple.com>
[EME][Mac] Update to match new AVStreamSession API and requirements.
https://bugs.webkit.org/show_bug.cgi?id=137923
Reviewed by Eric Carlson.
The session identifier has moved from AVStreamDataParser to -[AVStreamSession contentProtectionSessionIdentifier]
and the property is no longer KVObservable. A new notification key has been added in place of KVO.
Additionally, the requirements for using AVStreamDataParser with AVStreamSession have changed. It is now
required that AVStreamDataParsers be added to an AVStreamSession before the
-streamSession:didProvideContentKeyRequestInitializationData:forTrackID delegate method is called. A
-streamParserWillProvideContentKeyRequestInitializationData:forTrackID delegate has been added, and
an AVStreamSession must be created and the AVStreamDataParser added to it during the scope of that delegate
method.
To facilitate this, the MediaPlayerPrivateMediaSourceAVFObjC object will lazily create and own a AVStreamSession
object when requested. The SourceBufferPrivateAVFObjC object will listen for the -willProvide delegate call
and will add its AVStreamDataParser to that AVStreamSession when called.
The CDMSessionMediaSourceAVFObjC object is no longer responsible for creating the AVStreamSession, and because
the session identifier has moved from many AVStreamDataParsers to a single AVStreamSession, the
CDMSessionMediaSourceAVFObjCObserver class can become much simpler, as it only has to observe a single object.
* platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.h:
* platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.mm:
(-[CDMSessionMediaSourceAVFObjCObserver dealloc]): Deleted.
(-[CDMSessionMediaSourceAVFObjCObserver beginObserving:]): Deleted.
(-[CDMSessionMediaSourceAVFObjCObserver stopObserving:]): Deleted.
(-[CDMSessionMediaSourceAVFObjCObserver invalidate]): Deleted.
(-[CDMSessionMediaSourceAVFObjCObserver observeValueForKeyPath:ofObject:change:context:]): Deleted.
(-[CDMSessionMediaSourceAVFObjCObserver contentProtectionSessionIdentifierChanged:]): Added.
(WebCore::CDMSessionMediaSourceAVFObjC::~CDMSessionMediaSourceAVFObjC): Call setStreamSession(nullptr).
(WebCore::CDMSessionMediaSourceAVFObjC::releaseKeys): The sessionId is now a value in the dictionary, not the key.
(WebCore::CDMSessionMediaSourceAVFObjC::update): No longer create an AVStreamSession.
(WebCore::CDMSessionMediaSourceAVFObjC::setStreamSession): Add and remove observers as appropriate.
(WebCore::CDMSessionMediaSourceAVFObjC::addSourceBuffer): No longer add or remove parsers from AVStreamSessions.
(WebCore::CDMSessionMediaSourceAVFObjC::removeSourceBuffer): Ditto.
* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::hasStreamSession): Simple getter.
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::streamSession): Lazy initializing getter.
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::setCDMSession): Call setStreamSession().
* platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.h:
* platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
(-[WebAVStreamDataParserListener streamParserWillProvideContentKeyRequestInitializationData:forTrackID:]): Synchronously pass to SourceBufferPrivateAVFObjC.
(WebCore::SourceBufferPrivateAVFObjC::willProvideContentKeyRequestInitializationDataForTrackID): Add the parser to an AVStreamSession.
(WebCore::SourceBufferPrivateAVFObjC::didProvideContentKeyRequestInitializationDataForTrackID): Check the trackId.
* platform/mac/SoftLinking.h:
2014-10-21 Jaehun Lim <ljaehun.lim@samsung.com>
'true' isn't a valid value for justify-self
https://bugs.webkit.org/show_bug.cgi?id=137913
Reviewed by Andreas Kling.
Merged from Blink (patch by dstockwell):
<https://src.chromium.org/viewvc/blink?view=rev&revision=174638>
CSS Box Alignment Module Level 3:
http://dev.w3.org/csswg/css-align/#justify-self-property
No new tests, modify existing test case.
* css/CSSParser.cpp:
(WebCore::CSSParser::parseJustifySelf):
2014-10-21 Michael Saboff <msaboff@apple.com>
Add operator==(PropertyName, const char*)
https://bugs.webkit.org/show_bug.cgi?id=137925
Reviewed by Mark Lam.
Use new == operator to compare a PropertyName with a string literal.
* bindings/js/JSHTMLDocumentCustom.cpp:
(WebCore::JSHTMLDocument::getOwnPropertySlot):
2014-10-21 Chris Dumez <cdumez@apple.com>
Unreviewed iOS build fix after r174921.
Export new symbol after function rename.
* WebCore.exp.in:
* WebCore.order:
2014-10-21 Chris Dumez <cdumez@apple.com>
Unreviewed iOS build fix after r174921.
Remove symbol from export files that no longer exists.
* WebCore.exp.in:
* WebCore.order:
2014-10-21 peavo@outlook.com <peavo@outlook.com>
[Curl] Optimization; avoid string reallocation.
https://bugs.webkit.org/show_bug.cgi?id=137920
Reviewed by Brent Fulgham.
Profiling reveals that the cookiesForDOM function is spending time on removing a character from a string.
* platform/network/curl/CookieJarCurl.cpp:
(WebCore::domainMatch):
(WebCore::addMatchingCurlCookie):
2014-10-21 Joanmarie Diggs <jdiggs@igalia.com>
AX: [ATK] CSS-generated text content not exposed to assistive technologies
https://bugs.webkit.org/show_bug.cgi?id=137669
Reviewed by Chris Fleizach.
Do not use a text iterator to get the text for elements which include
pseudo elements.
Test: accessibility/css-content-attribute.html
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::textUnderElement):
2014-10-21 Chris Dumez <cdumez@apple.com>
REGRESSION(r174676): It broke the !ENABLE(VIDEO) build
https://bugs.webkit.org/show_bug.cgi?id=137916
Reviewed by Csaba Osztrogonác.
Fix the !ENABLE(VIDEO) build by adding an #if ENABLE(VIDEO) where
needed.
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::isDirectlyCompositedImage):
2014-10-21 Zalan Bujtas <zalan@apple.com>
REGRESSION: Google Search (mobile) video thumbnails are too large.
https://bugs.webkit.org/show_bug.cgi?id=137895
Reviewed by Simon Fraser.
This patch fixes layer clipping when an ancestor layer has border-radius clipping.
In cases, where the current layer has non-radius cliprect, while an ancestor layer
has border-radius clipping, we only use the border-radius rect to clip.
Test: fast/clip/overflow-hidden-with-border-radius-overflow-clipping-parent.html
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::clipToRect):
(WebCore::RenderLayer::restoreClip):
(WebCore::RenderLayer::collectFragments):
(WebCore::RenderLayer::calculateClipRects):
* rendering/RenderLayer.h:
(WebCore::ClipRect::ClipRect):
(WebCore::ClipRect::effectedByRadius):
(WebCore::ClipRect::setEffectedByRadius):
(WebCore::ClipRect::operator==):
(WebCore::ClipRect::operator!=):
(WebCore::ClipRect::intersect):
(WebCore::ClipRect::hasRadius): Deleted.
(WebCore::ClipRect::setHasRadius): Deleted.
2014-10-20 Michael Saboff <msaboff@apple.com>
Don't create cached functions for HTMLDocument.write*()
https://bugs.webkit.org/show_bug.cgi?id=137906
Reviewed by Darin Adler.
Made it so that JSHTMLDocument::write() and ::writeln() are always created for every prototype.
This is similar to the change in r174847.
This change is alread covered by the tests:
LayoutTests/http/tests/security/aboutBlank/security-context-grandchildren-write-lexical.html
LayoutTests/http/tests/security/aboutBlank/security-context-grandchildren-writeln-lexical.html
LayoutTests/http/tests/security/aboutBlank/security-context-write.html
LayoutTests/http/tests/security/aboutBlank/security-context-writeln.html
LayoutTests/http/tests/xmlhttprequest/request-from-popup.html
LayoutTests/http/tests/navigation/new-window-redirect-history.html
LayoutTests/http/tests/misc/window-open-then-write.html
* bindings/js/JSHTMLDocumentCustom.cpp:
(WebCore::JSHTMLDocument::getOwnPropertySlot):
* html/HTMLDocument.idl:
2014-10-21 Chris Dumez <cdumez@apple.com>
REGRESSION(r174676): It broke the !ENABLE(VIDEO) build
https://bugs.webkit.org/show_bug.cgi?id=137916
Unreviewed build fix. Add missing header include.
* rendering/RenderLayerBacking.cpp:
2014-10-21 Jer Noble <jer.noble@apple.com>
REGRESSION (r170808): Volume slider in built-in media controls only changes volume when thumb is released, not while dragging
https://bugs.webkit.org/show_bug.cgi?id=137805
Reviewed by Dan Bernstein.
Test: media/video-volume-slider-drag.html
Respond to the 'input' event rather than the 'change' event for the volume slider, so that
volume changes are continuous during drag operations.
Also listen for both 'input' and 'change' events for the timeline slider, doing fastSeek()
during 'input' and setting an explicit currentTime during 'change'. This is the same behavior
as current, but using 'change' instead of 'mouseup' to do the final currentTime change.
* Modules/mediacontrols/mediaControlsApple.js:
(Controller.prototype.createControls):
(Controller.prototype.handleTimelineInput):
(Controller.prototype.handleTimelineChange):
(Controller.prototype.handleTimelineMouseUp):
(Controller.prototype.handleVolumeSliderInput):
(Controller.prototype.handlePlayButtonClicked): Deleted.
(Controller.prototype.handleMaxButtonClicked): Deleted.
2014-10-21 Manuel Rego Casasnovas <rego@igalia.com>
ASSERTION FAILED: !gridWasPopulated() in WebCore::RenderGrid::placeItemsOnGrid
https://bugs.webkit.org/show_bug.cgi?id=136939
Reviewed by Darin Adler.
In some particular situations computeIntrinsicLogicalWidths() is called
in the middle of layoutGridItems(). In these cases we do not need to
populate the grid again, so we should avoid calling placeItemsOnGrid().
In addition, we do not need to clean the grid either, as that will be
done later by layoutGridItems().
Test: fast/css-grid-layout/grid-was-populated-assert.html
* rendering/RenderGrid.cpp:
(WebCore::RenderGrid::computeIntrinsicLogicalWidths): Avoid calls to
placeItemsOnGrid() and clearGrid() if the grid was already populated.
* rendering/RenderGrid.h: Move gridWasPopulated() header out of the
debug ifdefs.
2014-10-21 Zan Dobersek <zdobersek@igalia.com>
[Cairo] Make dashPattern, dotPattern in GraphicsContext::setPlatformStrokeStyle() const
https://bugs.webkit.org/show_bug.cgi?id=137912
Reviewed by Carlos Garcia Campos.
* platform/graphics/cairo/GraphicsContextCairo.cpp:
(WebCore::GraphicsContext::setPlatformStrokeStyle): Make the two static variables
constants since their value doesn't change after initialization.
2014-10-21 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Several labels are white instead of black
https://bugs.webkit.org/show_bug.cgi?id=137803
Reviewed by Martin Robinson.
Recent GTK+ versions require to explicitly set the state before
getting a color.
* rendering/RenderThemeGtk.cpp:
(WebCore::styleColor): Helper function to get a color from a
GtkStylecontext that explicitly sets the state before getting the color.
(WebCore::RenderThemeGtk::platformActiveSelectionBackgroundColor): Use styleColor().
(WebCore::RenderThemeGtk::platformInactiveSelectionBackgroundColor): Ditto.
(WebCore::RenderThemeGtk::platformActiveSelectionForegroundColor): Ditto.
(WebCore::RenderThemeGtk::platformInactiveSelectionForegroundColor): Ditto.
(WebCore::RenderThemeGtk::platformActiveListBoxSelectionBackgroundColor): Ditto.
(WebCore::RenderThemeGtk::platformInactiveListBoxSelectionBackgroundColor): Ditto.
(WebCore::RenderThemeGtk::platformActiveListBoxSelectionForegroundColor): Ditto.
(WebCore::RenderThemeGtk::platformInactiveListBoxSelectionForegroundColor): Ditto.
(WebCore::RenderThemeGtk::systemColor): Ditto.
2014-10-20 YongGeol Jung <yg48.jung@samsung.com>
[Coordinated Graphics] '-webkit-mask-image: -webkit-gradient' doesn't work for AC layer.
https://bugs.webkit.org/show_bug.cgi?id=125326
Reviewed by Gyuyoung Kim.
Mask layer hasn't requested to synchronize with AC layer in CoordinatedGraphics so far.
That's why the mask layer isn't shown under CoordinatedGraphics.
Thus this patch lets the mask layer synchronize with the AC layer whenever AC layer is updated.
Below layout test case is related to this issue when --pixel test is enabled.
Unfortunately EFL WebKitTestRunner doesn't support AC mode yet.
When EFL test framework supports AC mode, the test will be passed.
Test: compositing/masks/mask-of-clipped-layer.html
* platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
(WebCore::CoordinatedGraphicsLayer::syncPendingStateChangesIncludingSubLayers):
2014-10-17 Jeffrey Pfau <jpfau@apple.com>
Ensure attached frame count doesn't exceed the maximum allowed frames
https://bugs.webkit.org/show_bug.cgi?id=136457
Reviewed by Alexey Proskuryakov.
Test: fast/frames/exponential-frames.html
* html/HTMLFrameElementBase.cpp:
(WebCore::HTMLFrameElementBase::isURLAllowed):
2014-10-20 Chris Dumez <cdumez@apple.com>
ResourceRequest deserialization unnecessarily calls partitionName() on encoded cache partition
https://bugs.webkit.org/show_bug.cgi?id=137797
Reviewed by Darin Adler.
ResourceRequest deserialization was unnecessarily calling partitionName()
on the decoded cache partition. In the deserialization case, we already
know the cache partition is a valid partition name so we can bypass the
call to partitionName() (which is fairly expensive) for performance.
This patch adds a setDomainForCachePartion() method to ResourceRequest
that calls partitionName() on the domain argument, and moves all the
callers of setCachedPartition() to this new setter, except
ArgumentCoder<ResourceRequest>::decode().
This patch updates the setCachedPartition() to merely set the
m_cachePartition member, without calling partitionName() on the
argument. There is also a new assertion in place to make sure the
argument is a valid partition name.
No new tests, no behavior change.
* html/DOMURL.cpp:
(WebCore::DOMURL::revokeObjectURL):
* inspector/InspectorPageAgent.cpp:
(WebCore::InspectorPageAgent::cachedResource):
* inspector/InspectorResourceAgent.cpp:
(WebCore::InspectorResourceAgent::replayXHR):
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::loadURL):
* loader/archive/cf/LegacyWebArchive.cpp:
(WebCore::LegacyWebArchive::create):
* loader/cache/CachedResourceLoader.cpp:
(WebCore::CachedResourceLoader::requestUserCSSStyleSheet):
(WebCore::CachedResourceLoader::requestResource):
* loader/cache/MemoryCache.cpp:
(WebCore::MemoryCache::addImageToCache):
(WebCore::MemoryCache::removeImageFromCache):
* loader/cache/MemoryCache.h:
* page/SecurityOrigin.cpp:
(WebCore::SecurityOrigin::domainForCachePartition):
(WebCore::SecurityOrigin::cachePartition): Deleted.
Rename cachePartition() getter to domainForCachePartition() to make it
clear it returns a domain and not a partition name. As such, the caller
should then use ResourceRequest::setDomainForCachePartition(), not
setCachePartition().
* page/SecurityOrigin.h:
* platform/network/cf/ResourceRequest.h:
(WebCore::ResourceRequest::setCachePartition):
(WebCore::ResourceRequest::setDomainForCachePartition):
2014-10-20 Youenn Fablet <youenn.fablet@crf.canon.fr>
Tighten XMLHttpRequest setRequestHeader value check
https://bugs.webkit.org/show_bug.cgi?id=128593
Reviewed by Darin Adler.
Test: http/tests/xmlhttprequest/set-bad-headervalue.html
* platform/network/HTTPParsers.cpp:
(WebCore::isValidHTTPHeaderValue): Updated header values check according RFC 7230.
(WebCore::isValidHTTPToken): Renamed variable name and updated RFC related comment.
2014-10-20 Michael Saboff <msaboff@apple.com>
Make post checkin suggested changes to r174847
https://bugs.webkit.org/show_bug.cgi?id=137885
Reviewed by Mark Lam.
Eliminated the creation of a temporary Identifier when comparing propertyName to "open".
Made the suggested post checkin change to put the declaration of "entry" into the if.
* bindings/js/JSHTMLDocumentCustom.cpp:
(WebCore::JSHTMLDocument::getOwnPropertySlot):
2014-10-20 Chris Dumez <cdumez@apple.com>
Use is<>() / downcast<>() for SpinButtonElement
https://bugs.webkit.org/show_bug.cgi?id=137896
Reviewed by Gyuyoung Kim.
Use is<>() / downcast<>() for SpinButtonElement instead of
isSpinButtonElement() / static_cast for consistency with the rest of
the code and for safety.
No new tests, no behavior change.
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::addTextFieldChildren):
* html/shadow/SpinButtonElement.h:
(isType):
* rendering/RenderTheme.cpp:
(WebCore::RenderTheme::isSpinUpButtonPartPressed):
(WebCore::RenderTheme::isHovered):
(WebCore::RenderTheme::isSpinUpButtonPartHovered):
2014-10-20 Roger Fong <roger_fong@apple.com>
Use glFlush instead of glFinish when drawing WebGL output to screen.
https://bugs.webkit.org/show_bug.cgi?id=137897.
<rdar://problem/15846550>
Reviewed by Brent Fulgham.
Passes all conformance tests.
Performance tested by http://threejs.org/examples/#webgl_performance and Unity WebGL performance tests.
* platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
(WebCore::GraphicsContext3D::prepareTexture):
Use glFlush instead of glFinish. glFinish is a blocking operation pushed out queued up WebGL operations and then waits until
every operation has completed before returning and every pixel has been updated. This causes severe performance problems,
about a 10 fps difference on http://threejs.org/examples/#webgl_performance. glFlush, like glFinish,
forces all queued WebGL operations to take place, but returns immediately. Switching to glFlush does not seem
make our rendering quality any worse for the handful of sites I've tested and makes our performance on WebGL much better.
However, we should continue to be on the watch for any potential rendering issues after this lands.
2014-10-20 Benjamin Poulain <bpoulain@apple.com>
Generalize the compilation of :not() to support arbitrary selector lists
https://bugs.webkit.org/show_bug.cgi?id=137843
Reviewed by Andreas Kling.
This builds :not() on top of the code created for :nth-child(An+B of selectorList)
to support any selector list.
The tests for the JIT were added previously:
-not-boundaries.html
-not-backtracking.html
* cssjit/SelectorCompiler.cpp:
(WebCore::SelectorCompiler::addPseudoClassType):
Any :not() of a selector is handled through a simple selector list. Cases like
:not(foo, bar) simply generate not([fragmentFoo, bragmentBar]).
Old cases like :not(foo):not(bar) simply add those cases to the selector list,
generating not([fragmentFoo, bragmentBar]).
(WebCore::SelectorCompiler::minimumRegisterRequirements):
Register pressure is now tracked through computeBacktrackingMemoryRequirements.
(WebCore::SelectorCompiler::hasAnyCombinators):
(WebCore::SelectorCompiler::computeBacktrackingMemoryRequirements):
(WebCore::SelectorCompiler::computeBacktrackingInformation):
Abstract the code creating Selector Lists from :nth-child(of). Use that for :not()
and :nth-child(of).
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementMatchesNotPseudoClass):
2014-10-20 Gyuyoung Kim <gyuyoung.kim@samsung.com>
Use std::unique_ptr<>|make_unique<> in PluginView::scheduleRequest()
https://bugs.webkit.org/show_bug.cgi?id=137874
Reviewed by Andreas Kling.
No new tests, no behavior change.
* plugins/PluginView.cpp:
(WebCore::PluginView::requestTimerFired):
(WebCore::PluginView::scheduleRequest): Replace PassOwnPtr with std::unique_ptr.
(WebCore::PluginView::load): Create PluginRequest using std::make_unique.
* plugins/PluginView.h:
2014-10-20 Beth Dakin <bdakin@apple.com>
Speculative build fix.
* platform/spi/mac/NSViewSPI.h:
2014-10-20 Beth Dakin <bdakin@apple.com>
Add support for action menus
https://bugs.webkit.org/show_bug.cgi?id=137891
rdar://problem/18451638
rdar://problem/18694470
Reviewed by Anders Carlsson.
New SPI that is needed for this.
* WebCore.exp.in:
* WebCore.xcodeproj/project.pbxproj:
* platform/spi/mac: Added.
* platform/spi/mac/NSViewSPI.h: Added.
2014-10-20 Dean Jackson <dino@apple.com>
[Mac] Support "inverted-colors" and "monochrome" media feature.
https://bugs.webkit.org/show_bug.cgi?id=137535
<rdar://problem/18586398>
Rolling out the Windows part of this to fix the build.
* platform/win/PlatformScreenWin.cpp:
(WebCore::screenHasInvertedColors): Revert to a stub function.
2014-10-20 Chris Dumez <cdumez@apple.com>
Unreviewed EFL / GTK build fix after r174898.
Add missing header include.
* accessibility/AccessibilityARIAGrid.cpp:
2014-10-20 Dean Jackson <dino@apple.com>
[Mac] Support "inverted-colors" and "monochrome" media feature.
https://bugs.webkit.org/show_bug.cgi?id=137535
<rdar://problem/18586398>
Reviewed by Brent Fulgham.
Add a new media query from CSS Level 4, "inverted-colors", and
implement the Apple backends for the "monochrome" media query.
The platform code went into PlatformScreenMac, which already
had a screenIsMonochrome method. This now calls into Core
Graphics via SPI. I added a screenHasInvertedColors
method which tests for inversion. On iOS, there is public API
for both queries. On Windows, we try to use CoreGraphics.
At the moment neither of these media queries re-evaluate
automatically if the user changes their mode. The page will
need to be reloaded. It is possible to detect a change on iOS,
but not OS X.
https://bugs.webkit.org/show_bug.cgi?id=137868
I decided to not add an ENABLE flag for this, mostly because it
is such an isolated feature and seems very unlikely to be
controversial. I don't expect the syntax to change. (I'm sure
this comment will come back to haunt me.)
Testing this automatically is slightly tricky. We'd need
to expose SPI to invert the user's screen, but then we get
inverted images from our testing which could interfere with concurrent
operations. Instead I've included some tests that exercise
the "false" parts of the media query, with explanations as
to why they would fail if the display is inverted.
Tests: fast/media/mq-inverted-colors.html
fast/media/mq-monochrome.html
* css/CSSValueKeywords.in: Add the "inverted" keyword for "inverted-colors".
* css/MediaFeatureNames.h: Add the "inverted-colors" feature name.
* css/MediaQueryEvaluator.cpp:
(WebCore::inverted_colorsMediaFeatureEval): Implementation of the new media query.
* css/MediaQueryExp.cpp:
(WebCore::featureWithCSSValueID): The new query takes an id...
(WebCore::featureWithoutValue): ... or no value.
* platform/PlatformScreen.h: Add "screenHasInvertedColors".
* platform/efl/PlatformScreenEfl.cpp:
(WebCore::screenHasInvertedColors): Stub implementation.
* platform/gtk/PlatformScreenGtk.cpp:
(WebCore::screenHasInvertedColors): Ditto.
* platform/ios/PlatformScreenIOS.mm:
(WebCore::screenHasInvertedColors): Call into the platform accessibility API.
(WebCore::screenIsMonochrome): Ditto.
* platform/mac/PlatformScreenMac.mm:
(WebCore::screenIsMonochrome): Call into the CoreGraphics SPI.
(WebCore::screenHasInvertedColors): Call into the CoreGraphics SPI.
* platform/win/PlatformScreenWin.cpp:
(WebCore::screenHasInvertedColors): Call into CoreGraphics if we're using it.
2014-10-20 Chris Dumez <cdumez@apple.com>
Use is<>() / downcast<>() for Accessibility objects
https://bugs.webkit.org/show_bug.cgi?id=137286
Reviewed by Darin Adler.
Use is<>() / downcast<>() for Accessibility objects and clean up the
surrounding code.
No new tests, no behavior change.
* accessibility/AXObjectCache.cpp:
(WebCore::AXObjectCache::focusedImageMapUIElement):
(WebCore::AXObjectCache::notificationPostTimerFired):
* accessibility/AccessibilityARIAGrid.cpp:
(WebCore::AccessibilityARIAGrid::addTableCellChild):
(WebCore::AccessibilityARIAGrid::addChildren):
* accessibility/AccessibilityARIAGridCell.cpp:
(WebCore::AccessibilityARIAGridCell::parentTable):
(WebCore::AccessibilityARIAGridCell::rowIndexRange):
* accessibility/AccessibilityARIAGridRow.cpp:
(WebCore::AccessibilityARIAGridRow::disclosedRows):
(WebCore::AccessibilityARIAGridRow::disclosedByRow):
(WebCore::AccessibilityARIAGridRow::parentTable):
* accessibility/AccessibilityARIAGridRow.h:
* accessibility/AccessibilityImageMapLink.cpp:
(WebCore::AccessibilityImageMapLink::imageMapLinkRenderer):
* accessibility/AccessibilityImageMapLink.h:
* accessibility/AccessibilityList.h:
* accessibility/AccessibilityListBox.cpp:
(WebCore::AccessibilityListBox::setSelectedChildren):
(WebCore::AccessibilityListBox::selectedChildren):
(WebCore::AccessibilityListBox::listBoxOptionAccessibilityObject):
* accessibility/AccessibilityListBox.h:
* accessibility/AccessibilityListBoxOption.h:
* accessibility/AccessibilityMenuList.cpp:
(WebCore::AccessibilityMenuList::addChildren):
(WebCore::AccessibilityMenuList::didUpdateActiveOption):
* accessibility/AccessibilityMenuList.h:
* accessibility/AccessibilityMenuListOption.h:
* accessibility/AccessibilityMenuListPopup.cpp:
(WebCore::AccessibilityMenuListPopup::menuListOptionAccessibilityObject):
* accessibility/AccessibilityMenuListPopup.h:
* accessibility/AccessibilityMockObject.h:
* accessibility/AccessibilityNodeObject.cpp:
(WebCore::AccessibilityNodeObject::textUnderElement):
* accessibility/AccessibilityNodeObject.h:
* accessibility/AccessibilityObject.cpp:
(WebCore::appendChildrenToArray):
(WebCore::AccessibilityObject::scrollViewAncestor):
* accessibility/AccessibilityObject.h:
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::getDocumentLinks):
(WebCore::AccessibilityRenderObject::handleActiveDescendantChanged):
(WebCore::AccessibilityRenderObject::inheritsPresentationalRole):
(WebCore::AccessibilityRenderObject::addImageMapChildren):
(WebCore::AccessibilityRenderObject::addTextFieldChildren):
(WebCore::AccessibilityRenderObject::remoteSVGRootElement):
(WebCore::AccessibilityRenderObject::ariaSelectedRows):
* accessibility/AccessibilityRenderObject.h:
* accessibility/AccessibilitySVGRoot.h:
* accessibility/AccessibilityScrollView.cpp:
(WebCore::AccessibilityScrollView::addChildScrollbar):
* accessibility/AccessibilityScrollView.h:
* accessibility/AccessibilityScrollbar.h:
* accessibility/AccessibilitySlider.cpp:
(WebCore::AccessibilitySlider::addChildren):
* accessibility/AccessibilitySlider.h:
* accessibility/AccessibilitySpinButton.cpp:
(WebCore::AccessibilitySpinButton::addChildren):
(WebCore::AccessibilitySpinButtonPart::press):
* accessibility/AccessibilitySpinButton.h:
* accessibility/AccessibilityTable.cpp:
(WebCore::AccessibilityTable::addChildren):
(WebCore::AccessibilityTable::addChildrenFromSection):
(WebCore::AccessibilityTable::headerContainer):
(WebCore::AccessibilityTable::columnHeaders):
(WebCore::AccessibilityTable::rowHeaders):
(WebCore::AccessibilityTable::cellForColumnAndRow):
* accessibility/AccessibilityTable.h:
Make isAccessibilityTable() public and mark as final so that callers
can benefit from tighter typing, as isAccessibilityTable() is
stricter than isTable(). isTable() indicates that the object is an
AccessibilityTable and is equivalent to is<AccessibilityTable>(object).
isAccessibilityTable() is equivalent to "isTable() && renderer()".
* accessibility/AccessibilityTableCell.cpp:
(WebCore::AccessibilityTableCell::parentTable):
* accessibility/AccessibilityTableCell.h:
* accessibility/AccessibilityTableColumn.cpp:
(WebCore::AccessibilityTableColumn::headerObject):
(WebCore::AccessibilityTableColumn::addChildren):
* accessibility/AccessibilityTableColumn.h:
* accessibility/AccessibilityTableHeaderContainer.cpp:
(WebCore::AccessibilityTableHeaderContainer::addChildren):
* accessibility/AccessibilityTableRow.cpp:
(WebCore::AccessibilityTableRow::parentTable):
(WebCore::AccessibilityTableRow::headerObject):
* accessibility/AccessibilityTableRow.h:
* accessibility/atk/WebKitAccessibleInterfaceSelection.cpp:
(webkitAccessibleSelectionClearSelection):
(webkitAccessibleSelectionSelectAllSelection):
* accessibility/atk/WebKitAccessibleInterfaceTable.cpp:
(core):
(cell):
(cellAtIndex):
(webkitAccessibleTableGetIndexAt):
(webkitAccessibleTableGetNColumns):
(webkitAccessibleTableGetNRows):
(webkitAccessibleTableGetColumnHeader):
(webkitAccessibleTableGetRowHeader):
* accessibility/atk/WebKitAccessibleInterfaceTableCell.cpp:
(webkitAccessibleTableCellGetColumnHeaderCells):
(webkitAccessibleTableCellGetRowHeaderCells):
(webkitAccessibleTableCellGetColumnSpan):
(webkitAccessibleTableCellGetRowSpan):
(webkitAccessibleTableCellGetPosition):
* accessibility/ios/AccessibilityObjectIOS.mm:
(WebCore::AccessibilityObject::accessibilityPasswordFieldLength):
* accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
(-[WebAccessibilityObjectWrapper convertPointToScreenSpace:]):
(-[WebAccessibilityObjectWrapper convertRectToScreenSpace:]):
* accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(AXAttributeStringSetElement):
(-[WebAccessibilityObjectWrapper additionalAccessibilityAttributeNames]):
(-[WebAccessibilityObjectWrapper convertPointToScreenSpace:]):
(-[WebAccessibilityObjectWrapper subrole]):
(-[WebAccessibilityObjectWrapper roleDescription]):
(-[WebAccessibilityObjectWrapper scrollViewParent]):
(-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
(-[WebAccessibilityObjectWrapper accessibilityShowContextMenu]):
(-[WebAccessibilityObjectWrapper accessibilitySetValue:forAttribute:]):
(-[WebAccessibilityObjectWrapper accessibilityAttributeValue:forParameter:]):
* inspector/InspectorDOMAgent.cpp:
(WebCore::InspectorDOMAgent::buildObjectForAccessibilityProperties):
* rendering/RenderMenuList.cpp:
(RenderMenuList::didUpdateActiveOption):
2014-10-20 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Generate all Inspector domains together in JavaScriptCore
https://bugs.webkit.org/show_bug.cgi?id=137748
Reviewed by Brian Burg.
After moving the json files into JavaScriptCore update the includes,
and names of functions that were previously prefixed.
* CMakeLists.txt:
* DerivedSources.make:
* ForwardingHeaders/inspector/InspectorBackendDispatchers.h: Added.
* ForwardingHeaders/inspector/InspectorFrontendDispatchers.h: Added.
* ForwardingHeaders/inspector/InspectorJSBackendDispatchers.h: Removed.
* ForwardingHeaders/inspector/InspectorJSFrontendDispatchers.h: Removed.
* ForwardingHeaders/inspector/InspectorJSProtocolTypes.h: Removed.
* ForwardingHeaders/inspector/InspectorProtocolTypesBase.h: Added.
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.vcxproj/copyForwardingHeaders.cmd:
* WebCore.xcodeproj/project.pbxproj:
* inspector/CommandLineAPIHost.cpp:
* inspector/InspectorApplicationCacheAgent.cpp:
* inspector/InspectorApplicationCacheAgent.h:
* inspector/InspectorCSSAgent.cpp:
* inspector/InspectorCSSAgent.h:
* inspector/InspectorController.cpp:
* inspector/InspectorDOMAgent.cpp:
(WebCore::InspectorDOMAgent::buildObjectForAccessibilityProperties):
* inspector/InspectorDOMAgent.h:
* inspector/InspectorDOMDebuggerAgent.cpp:
* inspector/InspectorDOMDebuggerAgent.h:
* inspector/InspectorDOMStorageAgent.cpp:
* inspector/InspectorDOMStorageAgent.h:
* inspector/InspectorDatabaseAgent.cpp:
* inspector/InspectorDatabaseAgent.h:
* inspector/InspectorDatabaseResource.cpp:
* inspector/InspectorDatabaseResource.h:
* inspector/InspectorFrontendClientLocal.cpp:
* inspector/InspectorIndexedDBAgent.cpp:
* inspector/InspectorIndexedDBAgent.h:
* inspector/InspectorLayerTreeAgent.cpp:
* inspector/InspectorLayerTreeAgent.h:
* inspector/InspectorPageAgent.cpp:
* inspector/InspectorPageAgent.h:
* inspector/InspectorReplayAgent.cpp:
* inspector/InspectorReplayAgent.h:
* inspector/InspectorResourceAgent.cpp:
* inspector/InspectorResourceAgent.h:
* inspector/InspectorStyleSheet.cpp:
* inspector/InspectorStyleSheet.h:
* inspector/InspectorTimelineAgent.cpp:
(WebCore::InspectorTimelineAgent::addRecordToTimeline):
* inspector/InspectorTimelineAgent.h:
* inspector/InspectorWorkerAgent.cpp:
* inspector/InspectorWorkerAgent.h:
* inspector/PageRuntimeAgent.h:
* inspector/TimelineRecordFactory.cpp:
* inspector/WorkerInspectorController.cpp:
2014-10-20 Andy Estes <aestes@apple.com>
Fix the GTK build.
* dom/RenderedDocumentMarker.h:
2014-10-19 Antti Koivisto <antti@apple.com>
Avoid unnecessary NSURLResponse construction for QuickLook on iOS
https://bugs.webkit.org/show_bug.cgi?id=137876
Reviewed by Andy Estes.
QuickLook specific code path creates NSURLResponse in the web process for every response.
It is rarely needed so this is unnecessary work.
* WebCore.exp.in:
* platform/network/ios/QuickLook.h:
* platform/network/ios/QuickLook.mm:
(WebCore::isMainResourceLoader):
(WebCore::QuickLookHandle::shouldCreateForMIMEType):
Separate function for testing if QuickLookHandle is needed.
(WebCore::QuickLookHandle::create):
Switch the interface to take ResourceResponse.
2014-10-20 Andy Estes <aestes@apple.com>
Fix the iOS build.
* WebCore.xcodeproj/project.pbxproj:
* dom/RenderedDocumentMarker.h:
* page/ios/FrameIOS.mm:
(WebCore::Frame::interpretationsForCurrentRoot):
2014-10-20 Benjamin Poulain <benjamin@webkit.org>
Update the <link>'s link status
https://bugs.webkit.org/show_bug.cgi?id=137861
Reviewed by Chris Dumez.
In the latest HTML spec, <link> has the link status
if it has a 'href' attribute, exactly like <a> and <area>:
https://html.spec.whatwg.org/multipage/scripting.html#selector-link
This patch updates WebKit accordingly.
Tests: fast/css/link-basics.html
fast/selectors/link-basics-xhtml.xhtml
fast/selectors/link-basics.html
fast/selectors/webkit-any-link-basics.html
* html/HTMLLinkElement.cpp:
(WebCore::HTMLLinkElement::parseAttribute):
2014-10-20 Chris Dumez <cdumez@apple.com>
[Mac] Optimize cookiesForDOM() by filtering and serializing cookies in a single pass
https://bugs.webkit.org/show_bug.cgi?id=137869
Reviewed by Darin Adler.
Optimize cookiesForDOM() by filtering and serializing in 1 pass instead of 2.
Previously, when accessing document.cookie, we ended up doing the following:
1. Call wkHTTPCookiesForURL() to get an NSArray of NSHTTPCookies.
2. Call filterCookies() to filter out cookies that are httpOnly or with an
empty name, thus allocating a new NSMutableArray.
3. Call NSHTTPCookie's requestHeaderFieldsWithCookies() to serialize the
cookies
4. Construct a WTF::String from the NSString*
There were several inefficiencies here:
1. We needed to pre-filter the cookies and allocate a new NSMutableArray
before calling requestHeaderFieldsWithCookies()
2. requestHeaderFieldsWithCookies() does more things that we actually need.
It constructs a Dictionary of header fields, of which we query the
"Cookie" field, even though we merely want a ';'-separated string
representation of the cookies in "key=value" form.
With this patch, we now take care of the string serialization ourselves,
using a StringBuilder as it is trivial to do. This also allows us to filter
out the httpOnly/invalid cookies as we do the serialization instead of
having a first pass to do so.
When scrolling the http://www.apple.com/iphone/ entire page down, then up,
se were spending ~13.1% of the NetworkProcess time in cookiesForDOM()
(~96ms) on my machine. With the patch, we spend ~23% less time in
cookiesForDOM() (~74ms).
No new tests, no behavior change.
* platform/network/mac/CookieJarMac.mm:
(WebCore::cookiesForSession):
(WebCore::cookiesForDOM):
(WebCore::cookieRequestHeaderFieldValue):
2014-10-19 Chris Dumez <cdumez@apple.com>
Kill toRenderedDocumentMarker() by using tighter typing
https://bugs.webkit.org/show_bug.cgi?id=137858
Reviewed by Darin Adler.
Kill toRenderedDocumentMarker() by using tighter typing. This method
was doing no type validation, just a static_cast<>().
No new tests, no behavior change.
* dom/DocumentMarkerController.cpp:
(WebCore::DocumentMarkerController::addTextMatchMarker):
(WebCore::DocumentMarkerController::markersFor):
(WebCore::DocumentMarkerController::markersInRange):
(DocumentMarkerController::hasMarkers):
* dom/DocumentMarkerController.h:
* dom/RenderedDocumentMarker.h:
(WebCore::toRenderedDocumentMarker): Deleted.
* editing/AlternativeTextController.cpp:
(WebCore::markersHaveIdenticalDescription):
(WebCore::AlternativeTextController::respondToChangedSelection):
(WebCore::AlternativeTextController::recordSpellcheckerResponseForModifiedCorrection):
(WebCore::AlternativeTextController::processMarkersOnTextToBeReplacedByResult):
(WebCore::AlternativeTextController::applyDictationAlternative):
* editing/CompositeEditCommand.cpp:
(WebCore::copyMarkers):
(WebCore::CompositeEditCommand::replaceTextInNodePreservingMarkers):
* editing/DeleteSelectionCommand.cpp:
(WebCore::DeleteSelectionCommand::originalStringForAutocorrectionAtBeginningOfSelection):
* editing/Editor.cpp:
(WebCore::Editor::updateMarkersForWordsAffectedByEditing):
(WebCore::Editor::selectionStartHasMarkerFor):
* rendering/InlineTextBox.cpp:
(WebCore::InlineTextBox::paintDocumentMarker):
(WebCore::InlineTextBox::paintTextMatchMarker):
(WebCore::InlineTextBox::computeRectForReplacementMarker):
(WebCore::InlineTextBox::paintDocumentMarkers):
* rendering/InlineTextBox.h:
* rendering/svg/SVGInlineFlowBox.cpp:
(WebCore::SVGInlineFlowBox::computeTextMatchMarkerRectForRenderer):
* testing/Internals.cpp:
(WebCore::Internals::markerAt):
(WebCore::Internals::markerRangeForNode):
(WebCore::Internals::markerDescriptionForNode):
* testing/Internals.h:
2014-10-19 Chris Dumez <cdumez@apple.com>
Use is<>() / downcast<>() for all remaining RenderObject subclasses
https://bugs.webkit.org/show_bug.cgi?id=137845
Reviewed by Darin Adler.
Use is<>() / downcast<>() for all remaining RenderObject subclasses and
clean up the surrounding code.
No new tests, no behavior change.
* accessibility/AccessibilityProgressIndicator.cpp:
(WebCore::AccessibilityProgressIndicator::progressElement):
(WebCore::AccessibilityProgressIndicator::meterElement):
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::layoutCount):
(WebCore::AccessibilityRenderObject::widgetForAttachmentView):
(WebCore::AccessibilityRenderObject::visiblePositionForPoint):
* dom/Document.cpp:
(WebCore::widgetForElement):
* dom/Position.cpp:
(WebCore::Position::getInlineBoxAndOffset):
* dom/WebKitNamedFlow.cpp:
(WebCore::WebKitNamedFlow::overset):
(WebCore::WebKitNamedFlow::firstEmptyRegionIndex):
(WebCore::WebKitNamedFlow::getRegionsByContent):
(WebCore::WebKitNamedFlow::getRegions):
* editing/FrameSelection.cpp:
(WebCore::isFrameElement):
* html/HTMLEmbedElement.cpp:
(WebCore::findWidgetRenderer):
* html/HTMLFrameOwnerElement.cpp:
(WebCore::HTMLFrameOwnerElement::HTMLFrameOwnerElement):
(WebCore::HTMLFrameOwnerElement::renderWidget):
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::parseAttribute):
* html/HTMLMeterElement.cpp:
(WebCore::HTMLMeterElement::renderMeter):
* html/HTMLPlugInElement.cpp:
(WebCore::HTMLPlugInElement::supportsFocus):
* html/HTMLPlugInImageElement.cpp:
(WebCore::HTMLPlugInImageElement::renderEmbeddedObject):
(WebCore::HTMLPlugInImageElement::subframeLoaderWillCreatePlugIn):
* html/HTMLProgressElement.cpp:
(WebCore::HTMLProgressElement::renderProgress):
* html/PluginDocument.cpp:
(WebCore::PluginDocument::pluginWidget):
* html/shadow/MediaControlElements.cpp:
(WebCore::MediaControlTimelineElement::defaultEventHandler):
(WebCore::MediaControlTextTrackContainerElement::updateSizes):
(WebCore::MediaControlTextTrackContainerElement::createTextTrackRepresentationImage):
* inspector/InspectorLayerTreeAgent.cpp:
(WebCore::InspectorLayerTreeAgent::gatherLayersUsingRenderObjectHierarchy):
* inspector/InspectorOverlay.cpp:
(WebCore::buildObjectForElementInfo):
* loader/SubframeLoader.cpp:
(WebCore::SubframeLoader::loadSubframe):
* page/Frame.cpp:
(WebCore::Frame::ownerRenderer):
* page/FrameView.cpp:
(WebCore::FrameView::layout):
* page/gtk/EventHandlerGtk.cpp:
(WebCore::EventHandler::passWidgetMouseDownEventToWidget):
* page/ios/EventHandlerIOS.mm:
(WebCore::EventHandler::passWidgetMouseDownEventToWidget):
(WebCore::EventHandler::passSubframeEventToSubframe):
* page/mac/EventHandlerMac.mm:
(WebCore::EventHandler::passWidgetMouseDownEventToWidget):
(WebCore::EventHandler::passSubframeEventToSubframe):
(WebCore::widgetForEventTarget):
* platform/efl/RenderThemeEfl.cpp:
(WebCore::RenderThemeEfl::applyEdjeRTLState):
* rendering/InlineTextBox.cpp:
(WebCore::fontToUse):
(WebCore::InlineTextBox::emphasisMarkExistsAndIsAbove):
(WebCore::InlineTextBox::paint):
* rendering/LayoutState.cpp:
(WebCore::LayoutState::LayoutState):
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::collapseAnonymousBoxChild):
(WebCore::RenderBlock::simplifiedLayout):
(WebCore::RenderBlock::paintObject):
(WebCore::RenderBlock::selectionGaps):
(WebCore::RenderBlock::nodeAtPoint):
* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::layoutBlock):
(WebCore::RenderBlockFlow::hitTestFloats):
(WebCore::RenderBlockFlow::checkForPaginationLogicalHeightChange):
* rendering/RenderBlockLineLayout.cpp:
(WebCore::RenderBlockFlow::computeInlineDirectionPositionsForSegment):
* rendering/RenderBox.cpp:
(WebCore::RenderBox::scroll):
(WebCore::RenderBox::nodeAtPoint):
(WebCore::RenderBox::repaintLayerRectsForImage):
(WebCore::RenderBox::mapLocalToContainer):
(WebCore::RenderBox::containingBlockLogicalWidthForPositioned):
* rendering/RenderCombineText.h:
* rendering/RenderElement.cpp:
(WebCore::RenderElement::adjustStyleDifference):
(WebCore::addLayers):
(WebCore::RenderElement::removeLayers):
(WebCore::RenderElement::moveLayers):
(WebCore::RenderElement::setNeedsPositionedMovementLayout):
(WebCore::RenderElement::renderNamedFlowThreadWrapper):
* rendering/RenderEmbeddedObject.h:
* rendering/RenderFlowThread.cpp:
(WebCore::RenderFlowThread::validateRegions):
(WebCore::RenderFlowThread::hasCompositingRegionDescendant):
(WebCore::RenderFlowThread::regionForCompositedLayer):
(WebCore::RenderFlowThread::clearRenderBoxRegionInfoAndCustomStyle):
(WebCore::RenderFlowThread::initializeRegionsComputedAutoHeight):
(WebCore::RenderFlowThread::updateRegionsFlowThreadPortionRect):
(WebCore::RenderFlowThread::addForcedRegionBreak):
(WebCore::RenderFlowThread::addRegionsOverflowFromChild):
* rendering/RenderFlowThread.h:
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::setFilterBackendNeedsRepaintingInRect):
(WebCore::transparencyClipBox):
(WebCore::accumulateOffsetTowardsAncestor):
(WebCore::RenderLayer::collectFragments):
(WebCore::RenderLayer::hitTest):
(WebCore::RenderLayer::isFlowThreadCollectingGraphicsLayersUnderRegions):
(WebCore::RenderLayer::calculateClipRects):
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::updateAfterWidgetResize):
(WebCore::RenderLayerBacking::updateConfiguration):
(WebCore::isRestartedPlugin):
(WebCore::isCompositedPlugin):
(WebCore::RenderLayerBacking::isSimpleContainerCompositingLayer):
(WebCore::RenderLayerBacking::containsPaintedContent):
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::updateBacking):
(WebCore::RenderLayerCompositor::computeCompositingRequirements):
(WebCore::RenderLayerCompositor::rebuildCompositingLayerTree):
(WebCore::RenderLayerCompositor::requiresCompositingLayer):
(WebCore::RenderLayerCompositor::reasonsForCompositing):
(WebCore::RenderLayerCompositor::requiresCompositingForVideo):
(WebCore::RenderLayerCompositor::requiresCompositingForPlugin):
(WebCore::RenderLayerCompositor::requiresCompositingForFrame):
* rendering/RenderLayerModelObject.h:
* rendering/RenderLineBreak.h:
* rendering/RenderMeter.h:
* rendering/RenderMultiColumnFlowThread.cpp:
(WebCore::RenderMultiColumnFlowThread::firstMultiColumnSet):
(WebCore::RenderMultiColumnFlowThread::lastMultiColumnSet):
(WebCore::RenderMultiColumnFlowThread::layout):
(WebCore::RenderMultiColumnFlowThread::addRegionToThread):
(WebCore::RenderMultiColumnFlowThread::flowThreadDescendantInserted):
(WebCore::RenderMultiColumnFlowThread::flowThreadRelativeWillBeRemoved):
(WebCore::RenderMultiColumnFlowThread::flowThreadDescendantBoxLaidOut):
(WebCore::RenderMultiColumnFlowThread::setPageBreak):
(WebCore::RenderMultiColumnFlowThread::updateMinimumPageHeight):
(WebCore::RenderMultiColumnFlowThread::setRegionRangeForBox):
(WebCore::RenderMultiColumnFlowThread::addForcedRegionBreak):
(WebCore::RenderMultiColumnFlowThread::physicalTranslationOffsetFromFlowToRegion):
* rendering/RenderMultiColumnFlowThread.h:
* rendering/RenderMultiColumnSet.cpp:
(WebCore::RenderMultiColumnSet::nextSiblingMultiColumnSet):
(WebCore::RenderMultiColumnSet::previousSiblingMultiColumnSet):
* rendering/RenderMultiColumnSet.h:
* rendering/RenderMultiColumnSpannerPlaceholder.h:
* rendering/RenderNamedFlowFragment.cpp:
(WebCore::RenderNamedFlowFragment::checkRegionStyle):
(WebCore::RenderNamedFlowFragment::namedFlowThread):
* rendering/RenderNamedFlowFragment.h:
* rendering/RenderNamedFlowThread.cpp:
(WebCore::RenderNamedFlowThread::updateWritingMode):
(WebCore::addFragmentToList):
(WebCore::RenderNamedFlowThread::addRegionToThread):
(WebCore::RenderNamedFlowThread::removeRegionFromThread):
(WebCore::RenderNamedFlowThread::fragmentFromRenderBoxAsRenderBlock):
(WebCore::RenderNamedFlowThread::fragmentFromAbsolutePointAndBox):
(WebCore::RenderNamedFlowThread::checkInvalidRegions):
(WebCore::RenderNamedFlowThread::checkRegionsWithStyling):
(WebCore::RenderNamedFlowThread::clearRenderObjectCustomStyle):
* rendering/RenderNamedFlowThread.h:
* rendering/RenderObject.cpp:
(WebCore::scheduleRelayoutForSubtree):
(WebCore::RenderObject::setLayerNeedsFullRepaint):
(WebCore::RenderObject::setLayerNeedsFullRepaintForPositionedMovementLayout):
(WebCore::RenderObject::repaintUsingContainer):
(WebCore::RenderObject::selectionRoot):
(WebCore::RenderObject::shouldUseTransformFromContainer):
(WebCore::RenderObject::getTransformFromContainer):
(WebCore::RenderObject::isRooted):
(WebCore::RenderObject::willBeDestroyed):
(WebCore::RenderObject::isComposited):
(WebCore::RenderObject::currentRenderNamedFlowFragment):
* rendering/RenderObject.h:
* rendering/RenderProgress.h:
* rendering/RenderRuby.cpp:
(WebCore::lastRubyRun):
* rendering/RenderRubyBase.cpp:
(WebCore::RenderRubyBase::rubyRun):
* rendering/RenderRubyRun.cpp:
(WebCore::RenderRubyRun::removeChild):
* rendering/RenderRubyRun.h:
* rendering/RenderSlider.h:
* rendering/RenderText.cpp:
(WebCore::RenderText::widthFromCache):
* rendering/RenderThemeGtk.cpp:
(WebCore::RenderThemeGtk::calculateProgressRect):
* rendering/RenderThemeIOS.mm:
(WebCore::RenderThemeIOS::paintProgressBar):
* rendering/RenderThemeMac.mm:
(WebCore::RenderThemeMac::paintMeter):
(WebCore::RenderThemeMac::paintProgressBar):
* rendering/RenderThemeSafari.cpp:
(WebCore::RenderThemeSafari::paintMeter):
* rendering/RenderThemeWin.cpp:
(WebCore::RenderThemeWin::paintMeter):
* rendering/RenderTreeAsText.cpp:
(WebCore::writeRenderRegionList):
(WebCore::writeLayers):
* rendering/RenderVideo.h:
* rendering/RenderView.cpp:
(WebCore::SelectionIterator::checkForSpanner):
(WebCore::isComposited):
* rendering/RenderView.h:
* rendering/RenderWidget.h:
* rendering/line/BreakingContextInlineHeaders.h:
(WebCore::BreakingContext::handleText):
* rendering/line/LineBreaker.cpp:
(WebCore::LineBreaker::skipLeadingWhitespace):
* testing/Internals.cpp:
(WebCore::Internals::isPluginUnavailabilityIndicatorObscured):
2014-10-19 Chris Dumez <cdumez@apple.com>
Use SPECIALIZE_TYPE_TRAITS_*() macro for RenderScrollbar
https://bugs.webkit.org/show_bug.cgi?id=137854
Reviewed by Darin Adler.
Use SPECIALIZE_TYPE_TRAITS_*() macro for RenderScrollbar instead of a
custom toRenderScrollbar() function, for consistency.
No new tests, no behavior change.
* rendering/RenderScrollbar.h:
(isType):
(WebCore::toRenderScrollbar): Deleted.
* rendering/RenderScrollbarTheme.cpp:
(WebCore::RenderScrollbarTheme::minimumThumbLength):
(WebCore::RenderScrollbarTheme::backButtonRect):
(WebCore::RenderScrollbarTheme::forwardButtonRect):
(WebCore::RenderScrollbarTheme::trackRect):
(WebCore::RenderScrollbarTheme::constrainTrackRectToTrackPieces):
(WebCore::RenderScrollbarTheme::willPaintScrollbar):
(WebCore::RenderScrollbarTheme::didPaintScrollbar):
(WebCore::RenderScrollbarTheme::paintScrollbarBackground):
(WebCore::RenderScrollbarTheme::paintTrackBackground):
(WebCore::RenderScrollbarTheme::paintTrackPiece):
(WebCore::RenderScrollbarTheme::paintButton):
(WebCore::RenderScrollbarTheme::paintThumb):
2014-10-19 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Move GtkDragAndDropHelper from Platform to WebKit2
https://bugs.webkit.org/show_bug.cgi?id=137422
Reviewed by Martin Robinson.
Remove ClipboardUtilitiesGtk and GtkDragAndDropHelper.
* PlatformGTK.cmake:
* platform/gtk/ClipboardUtilitiesGtk.cpp: Removed.
* platform/gtk/ClipboardUtilitiesGtk.h: Removed.
* platform/gtk/GtkDragAndDropHelper.cpp: Removed.
* platform/gtk/GtkDragAndDropHelper.h: Removed.
2014-10-19 Roger Fong <roger_fong@apple.com>
Unreviewed. Style fix following r174855.
* platform/graphics/opengl/GraphicsContext3DOpenGL.cpp:
(WebCore::GraphicsContext3D::readPixelsAndConvertToBGRAIfNecessary):
2014-10-18 Antti Koivisto <antti@apple.com>
REGRESSION (r173356): Safari can't install a profile, gets 'Download Failed error
https://bugs.webkit.org/show_bug.cgi?id=137855
Reviewed by Dan Bernstein.
We lose the sniffed MIME type for the response when synthesizing an NSURLResponse. Sniffing requires
backchannel data that the synthesized response doesn't have.
Test: http/tests/mime/mime-type-sniff.html
* platform/network/mac/ResourceResponseMac.mm:
(WebCore::ResourceResponse::initNSURLResponse):
When synthesizing NSURLResponse explicitly set the Content-type header to the sniffed type.
2014-10-18 Chris Dumez <cdumez@apple.com>
[Mac] Use Fast enumeration consistently in WebFontCache.mm
https://bugs.webkit.org/show_bug.cgi?id=137791
Reviewed by Darin Adler.
Use fast enumeration consistently in WebFontCache.mm as this results in
more efficient, concise and safer code.
No new tests, no behavior change.
* platform/mac/WebFontCache.mm:
(+[WebFontCache getTraits:inFamily:]):
Reserve Vector capacity before the loop as we know how many traits we
are going to append. Also use uncheckedAppend() for performance.
(+[WebFontCache internalFontWithFamily:traits:weight:size:]):
2014-10-18 Chris Fleizach <cfleizach@apple.com>
AX: Tables with <colgroups> are not reporting table column headers
https://bugs.webkit.org/show_bug.cgi?id=137846
Reviewed by Mario Sanchez Prada.
The code to search for header objects was getting stuck on anonymous RenderTableSections.
We also need to check more rows for headers, in case the first row or more is not visible or is empty.
Test: accessibility/table-column-headers-with-captions.html
* accessibility/AccessibilityTableColumn.cpp:
(WebCore::AccessibilityTableColumn::headerObject):
(WebCore::AccessibilityTableColumn::headerObjectForSection):
2014-10-18 KwangHyuk Kim <hyuki.kim@samsung.com>
[EFL] build break occurs on webkit efl build.
https://bugs.webkit.org/show_bug.cgi?id=137844
Reviewed by Gyuyoung Kim.
As local variable elementAddressRegisterIndex is assigned but not used, there is build break for the webkit efl.
No new tests because it's just to fix build break.
* cssjit/SelectorCompiler.cpp:
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementMatchesSelectorList):
2014-10-17 Gyuyoung Kim <gyuyoung.kim@samsung.com>
Apply std::unique_ptr to FooFont classes
https://bugs.webkit.org/show_bug.cgi?id=137769
Reviewed by Andreas Kling.
As a step to use std::unique_ptr, this patch applies std::unique_ptr to Font classes.
No new tests, no behavior changes.
* platform/graphics/Font.cpp:
(WebCore::retrieveOrAddCachedFontGlyphs):
(WebCore::Font::createLayout):
* platform/graphics/SimpleFontData.cpp:
(WebCore::SimpleFontData::DerivedFontData::create):
* platform/graphics/SimpleFontData.h:
Remove create() factory function because public ctor and std::make_unique<> can replace it.
* platform/graphics/mac/ComplexTextController.cpp:
(WebCore::Font::createLayout):
2014-10-17 Gyuyoung Kim <gyuyoung.kim@samsung.com>
Use std::unique_ptr in WebCore/bindings
https://bugs.webkit.org/show_bug.cgi?id=137808
Reviewed by Andreas Kling.
Clean up PassOwnPtr|OwnPtr in WebCore/bindings by using std::unique_ptr, std::make_unique
and WTF::move.
No new tests, no behavior changes.
* bindings/generic/ActiveDOMCallback.h:
* bindings/js/JSMessageEventCustom.cpp:
(WebCore::handleInitMessageEvent):
* bindings/js/SerializedScriptValue.cpp:
(WebCore::SerializedScriptValue::SerializedScriptValue):
(WebCore::SerializedScriptValue::transferArrayBuffers):
(WebCore::SerializedScriptValue::create):
* bindings/js/SerializedScriptValue.h:
* bindings/js/WorkerScriptDebugServer.cpp:
(WebCore::WorkerScriptDebugServer::interruptAndRunTask):
* bindings/js/WorkerScriptDebugServer.h:
* inspector/WorkerDebuggerAgent.cpp:
(WebCore::WorkerDebuggerAgent::interruptAndDispatchInspectorCommands):
2014-10-16 Roger Fong <roger_fong@apple.com>
Calling glReadPixels with BGRA format on an NVIDIA machine with an opaque context returns the wrong alpha values.
https://bugs.webkit.org/show_bug.cgi?id=137793.
<rdar://problem/15408133>
Reviewed by Dean Jackson.
This fixes conformance test context/context-attribute-preserve-drawing-buffer.html.
* platform/graphics/opengl/GraphicsContext3DOpenGL.cpp:
(WebCore::GraphicsContext3D::readPixelsAndConvertToBGRAIfNecessary):
On an NVIDIA machine, when the context has alpha turned off, call glReadPixels with RGBA format and then convert to RGBA.
2014-10-17 Chris Dumez <cdumez@apple.com>
Use is<>() / downcast<>() for all SVG RenderObjects
https://bugs.webkit.org/show_bug.cgi?id=137840
Reviewed by Benjamin Poulain.
Use is<>() / downcast<>() for all SVG RenderObjects and clean up the
surrounding code.
No new tests, no behaviro change.
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::supportsPath):
(WebCore::AccessibilityRenderObject::elementPath):
* page/FrameView.cpp:
(WebCore::FrameView::applyOverflowToViewport):
(WebCore::FrameView::forceLayoutParentViewIfNeeded):
* rendering/RenderLayerFilterInfo.cpp:
(WebCore::RenderLayer::FilterInfo::removeReferenceFilterClients):
* rendering/svg/RenderSVGGradientStop.cpp:
(WebCore::RenderSVGGradientStop::styleDidChange):
* rendering/svg/RenderSVGImage.h:
* rendering/svg/RenderSVGInlineText.h:
* rendering/svg/RenderSVGResourceContainer.cpp:
(WebCore::RenderSVGResourceContainer::markAllClientsForInvalidation):
* rendering/svg/RenderSVGResourceContainer.h:
* rendering/svg/RenderSVGRoot.cpp:
(WebCore::RenderSVGRoot::addResourceForClientInvalidation):
* rendering/svg/RenderSVGRoot.h:
* rendering/svg/RenderSVGShape.h:
* rendering/svg/RenderSVGText.cpp:
(WebCore::collectLayoutAttributes):
(WebCore::RenderSVGText::subtreeChildWillBeRemoved):
(WebCore::RenderSVGText::subtreeTextDidChange):
(WebCore::updateFontInAllDescendants):
* rendering/svg/RenderSVGText.h:
* rendering/svg/SVGInlineTextBox.h:
* rendering/svg/SVGRenderSupport.cpp:
(WebCore::SVGRenderSupport::mapLocalToContainer):
(WebCore::SVGRenderSupport::pushMappingToContainer):
(WebCore::SVGRenderSupport::computeContainerBoundingBoxes):
* rendering/svg/SVGRenderTreeAsText.cpp:
(WebCore::writeStyle):
* rendering/svg/SVGRenderingContext.cpp:
(WebCore::SVGRenderingContext::bufferForeground):
* rendering/svg/SVGResourcesCycleSolver.cpp:
(WebCore::SVGResourcesCycleSolver::resolveCycles):
* rendering/svg/SVGRootInlineBox.cpp:
(WebCore::SVGRootInlineBox::renderSVGText):
(WebCore::SVGRootInlineBox::computePerCharacterLayoutInformation):
* svg/SVGCircleElement.cpp:
(WebCore::SVGCircleElement::svgAttributeChanged):
* svg/SVGElement.cpp:
(WebCore::SVGElement::svgAttributeChanged):
* svg/SVGEllipseElement.cpp:
(WebCore::SVGEllipseElement::svgAttributeChanged):
* svg/SVGImageElement.cpp:
(WebCore::SVGImageElement::svgAttributeChanged):
(WebCore::SVGImageElement::didAttachRenderers):
* svg/SVGLineElement.cpp:
(WebCore::SVGLineElement::svgAttributeChanged):
* svg/SVGPolyElement.cpp:
(WebCore::SVGPolyElement::svgAttributeChanged):
* svg/SVGRectElement.cpp:
(WebCore::SVGRectElement::svgAttributeChanged):
* svg/SVGSVGElement.cpp:
(WebCore::SVGSVGElement::localCoordinateSpaceTransform):
(WebCore::SVGSVGElement::currentViewBoxRect):
* svg/graphics/SVGImage.cpp:
(WebCore::SVGImage::setContainerSize):
(WebCore::SVGImage::containerSize):
2014-10-17 Chris Dumez <cdumez@apple.com>
Avoid unnecessary isSVGFont() check in SimpleFontData::applyTransforms()
https://bugs.webkit.org/show_bug.cgi?id=137836
Reviewed by Andreas Kling.
Avoid unnecessary isSVGFont() check in SimpleFontData::applyTransforms().
This function is only called from WidthIterator::applyFontTransforms(),
which already makes sure to call applyTransforms() if isSVGFont()
returns false. This patch replaces the check with a simple assertion.
No new tests, no behavior change.
* platform/graphics/SimpleFontData.h:
* svg/SVGFontData.h:
2014-10-17 Michael Saboff <msaboff@apple.com>
Don't create cached functions that access lexicalGlobalObject()
https://bugs.webkit.org/show_bug.cgi?id=137839
Reviewed by Geoffrey Garen.
Made it so that all the JSDOMWindow special functions blur(), close(), focus() and postMessage()
are always created as needed for every prototype. Made it so that JSHTMLDocument does
the same for open(). Updated test to account for these methods not being cached
Updated tests accordingly.
* bindings/js/JSDOMWindowCustom.cpp:
(WebCore::JSDOMWindow::getOwnPropertySlot): Updated to always create cached versions of the
special functions.
* bindings/js/JSHTMLDocumentCustom.cpp:
(WebCore::JSHTMLDocument::getOwnPropertySlot): Added to create an uncached open() method when
it is first accessed.
* html/HTMLDocument.idl: Added CustomGetOwnPropertySlot and implemented it in JSHTMLDocumentCustom.cpp.
2014-10-17 Simon Fraser <simon.fraser@apple.com>
[iOS] Speculative fix for a crash under RenderLayerCompositor::updateScrollCoordinatedLayer()
https://bugs.webkit.org/show_bug.cgi?id=137837
rdar://problem/18545452
Reviewed by Tim Horton.
Crash logs suggest that an iframe's RenderView's RenderLayer's backing can be null
in a call to updateScrollCoordinatedLayer(), so add an assertion (to help find a reproducible case)
and a null check.
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::attachScrollingNode):
2014-10-17 Andreas Kling <akling@apple.com>
Re-arrange parentheses for compilation purposes.
* cssjit/SelectorCompiler.cpp:
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementMatchesSelectorList):
2014-10-17 Andreas Kling <akling@apple.com>
Unreviewed build fix after r174838.
Use StackAllocator::addressOf() instead of the old way of grabbing at a stack reference.
* cssjit/SelectorCompiler.cpp:
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementMatchesSelectorList):
2014-10-17 Chris Dumez <cdumez@apple.com>
Use is<>() / downcast<>() for RenderBox
https://bugs.webkit.org/show_bug.cgi?id=137804
Reviewed by Andreas Kling.
Use is<>() / downcast<>() for RenderBox and clean up the surrounding
code.
No new tests, no behavior change.
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::computeAccessibilityIsIgnored):
(WebCore::AccessibilityRenderObject::accessibilityHitTest):
(WebCore::AccessibilityRenderObject::getScrollableAreaIfScrollable):
(WebCore::AccessibilityRenderObject::scrollTo):
* bindings/objc/DOMHTML.mm:
(-[DOMHTMLElement scrollYOffset]):
(-[DOMHTMLElement setScrollXOffset:scrollYOffset:adjustForIOSCaret:]):
* bindings/objc/DOMUIKitExtensions.mm:
(-[DOMNode borderRadii]):
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::sizingBox):
(WebCore::computedTransform):
(WebCore::zoomAdjustedPaddingOrMarginPixelValue):
(WebCore::ComputedStyleExtractor::propertyValue):
* dom/ContainerNode.cpp:
(WebCore::ContainerNode::getLowerRightCorner):
* dom/Document.cpp:
(WebCore::Document::webkitWillEnterFullScreenForElement):
* dom/Element.cpp:
(WebCore::Element::scrollByUnits):
* dom/Node.cpp:
(WebCore::Node::defaultEventHandler):
* dom/Position.cpp:
(WebCore::endsOfNodeAreVisuallyDistinctPositions):
* editing/DeleteButtonController.cpp:
(WebCore::isDeletableElement):
* editing/EditorCommand.cpp:
(WebCore::verticalScrollDistance):
* editing/FrameSelection.cpp:
(WebCore::CaretBase::paintCaret):
* editing/TextIterator.cpp:
(WebCore::fullyClipsContents):
(WebCore::shouldEmitExtraNewlineForNode):
* editing/htmlediting.cpp:
(WebCore::absoluteBoundsForLocalCaretRect):
* html/HTMLFormControlElement.cpp:
(WebCore::HTMLFormControlElement::isFocusable):
* html/HTMLPlugInImageElement.cpp:
(WebCore::HTMLPlugInImageElement::checkSizeChangeForSnapshotting):
* html/HTMLSelectElement.cpp:
(WebCore::HTMLSelectElement::listBoxDefaultEventHandler):
* html/shadow/SliderThumbElement.cpp:
(WebCore::SliderThumbElement::setPositionFromPoint):
* inspector/InspectorOverlay.cpp:
(WebCore::buildObjectForElementInfo):
* page/AutoscrollController.cpp:
(WebCore::AutoscrollController::updateAutoscrollRenderer):
* page/EventHandler.cpp:
(WebCore::EventHandler::startPanScrolling):
* page/FrameView.cpp:
(WebCore::FrameView::embeddedContentBox):
* page/GestureTapHighlighter.cpp:
* page/SpatialNavigation.cpp:
(WebCore::isScrollableNode):
* page/animation/CSSPropertyAnimation.cpp:
(WebCore::blendFunc):
* platform/efl/RenderThemeEfl.cpp:
(WebCore::RenderThemeEfl::baselinePosition):
* plugins/PluginView.cpp:
(WebCore::PluginView::invalidateWindowlessPluginRect):
* rendering/InlineBox.cpp:
(WebCore::InlineBox::logicalHeight):
(WebCore::InlineBox::adjustPosition):
* rendering/InlineElementBox.cpp:
(WebCore::InlineElementBox::deleteLine):
(WebCore::InlineElementBox::extractLine):
(WebCore::InlineElementBox::attachLine):
(WebCore::InlineElementBox::paint):
(WebCore::InlineElementBox::nodeAtPoint):
* rendering/InlineFlowBox.cpp:
(WebCore::InlineFlowBox::addToLine):
(WebCore::InlineFlowBox::addReplacedChildOverflow):
* rendering/LayoutState.cpp:
(WebCore::LayoutState::LayoutState):
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::simplifiedNormalFlowLayout):
(WebCore::RenderBlock::markFixedPositionObjectForLayoutIfNeeded):
(WebCore::RenderBlock::clearPercentHeightDescendantsFrom):
(WebCore::RenderBlock::computeBlockPreferredLogicalWidths):
(WebCore::RenderBlock::addFocusRingRects):
* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::rebuildFloatingObjectSetFromIntrudingFloats):
(WebCore::RenderBlockFlow::positionForPointWithInlineChildren):
* rendering/RenderBlockLineLayout.cpp:
(WebCore::RenderBlockFlow::computeInlineDirectionPositionsForLine):
(WebCore::RenderBlockFlow::layoutLineBoxes):
* rendering/RenderBox.cpp:
(WebCore::RenderBox::findAutoscrollable):
(WebCore::computeBlockStaticDistance):
(WebCore::RenderBox::positionForPoint):
(WebCore::RenderBox::layoutOverflowRectForPropagation):
* rendering/RenderBox.h:
(WebCore::RenderBox::previousSiblingBox):
(WebCore::RenderBox::nextSiblingBox):
(WebCore::RenderBox::parentBox):
(WebCore::RenderBox::firstChildBox):
(WebCore::RenderBox::lastChildBox):
* rendering/RenderBoxModelObject.cpp:
(WebCore::RenderBoxModelObject::adjustedPositionRelativeToOffsetParent):
(WebCore::RenderBoxModelObject::computeStickyPositionConstraints):
(WebCore::RenderBoxModelObject::constrainingRectForStickyPosition):
(WebCore::RenderBoxModelObject::paintFillLayerExtended):
(WebCore::RenderBoxModelObject::calculateBackgroundImageGeometry):
* rendering/RenderElement.cpp:
(WebCore::RenderElement::removeChildInternal):
(WebCore::RenderElement::styleWillChange):
(WebCore::RenderElement::repaintAfterLayoutIfNeeded):
* rendering/RenderEmbeddedObject.cpp:
(WebCore::RenderEmbeddedObject::layout):
* rendering/RenderFieldset.cpp:
(WebCore::RenderFieldset::findLegend):
* rendering/RenderFlowThread.cpp:
(WebCore::RenderFlowThread::adjustedPositionRelativeToOffsetParent):
(WebCore::RenderFlowThread::currentActiveRenderBox):
* rendering/RenderFlowThread.h:
* rendering/RenderFullScreen.cpp:
(WebCore::RenderFullScreen::unwrapRenderer):
* rendering/RenderImage.cpp:
(WebCore::RenderImage::layoutShadowControls):
(WebCore::RenderImage::computeIntrinsicRatioInformation):
* rendering/RenderInline.cpp:
(WebCore::RenderInline::absoluteRects):
(WebCore::RenderInline::addFocusRingRects):
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::updateLayerPosition):
(WebCore::RenderLayer::perspectiveTransform):
(WebCore::RenderLayer::perspectiveOrigin):
(WebCore::parentLayerCrossFrame):
(WebCore::RenderLayer::enclosingScrollableLayer):
(WebCore::RenderLayer::resize):
(WebCore::RenderLayer::scrollsOverflow):
(WebCore::computeReferenceBox):
(WebCore::RenderLayer::calculateClipRects):
* rendering/RenderLayer.h:
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::updateTransform):
(WebCore::RenderLayerBacking::updateGeometry):
(WebCore::RenderLayerBacking::resetContentsRect):
(WebCore::RenderLayerBacking::positionOverflowControlsLayers):
(WebCore::RenderLayerBacking::updateDirectlyCompositedBackgroundImage):
(WebCore::RenderLayerBacking::contentsBox):
(WebCore::RenderLayerBacking::backgroundBoxForPainting):
(WebCore::RenderLayerBacking::startAnimation):
(WebCore::RenderLayerBacking::startTransition):
* rendering/RenderLineBoxList.cpp:
(WebCore::RenderLineBoxList::rangeIntersectsRect):
* rendering/RenderMediaControlElements.cpp:
(WebCore::RenderMediaVolumeSliderContainer::layout):
* rendering/RenderMultiColumnFlowThread.cpp:
(WebCore::RenderMultiColumnFlowThread::firstColumnSetOrSpanner):
(WebCore::RenderMultiColumnFlowThread::nextColumnSetOrSpannerSiblingOf):
(WebCore::RenderMultiColumnFlowThread::previousColumnSetOrSpannerSiblingOf):
(WebCore::RenderMultiColumnFlowThread::resolveMovedChild):
(WebCore::isValidColumnSpanner):
(WebCore::RenderMultiColumnFlowThread::handleSpannerRemoval):
* rendering/RenderNamedFlowThread.cpp:
(WebCore::RenderNamedFlowThread::getRanges):
* rendering/RenderObject.cpp:
(WebCore::RenderObject::computeRectForRepaint):
(WebCore::RenderObject::showRegionsInformation):
(WebCore::RenderObject::showRenderObject):
(WebCore::RenderObject::mapLocalToContainer):
(WebCore::RenderObject::pushMappingToContainer):
(WebCore::RenderObject::mapAbsoluteToLocalPoint):
(WebCore::RenderObject::addAnnotatedRegions):
* rendering/RenderTable.cpp:
(WebCore::RenderTable::nodeAtPoint):
* rendering/RenderTextControlMultiLine.cpp:
(WebCore::RenderTextControlMultiLine::layoutSpecialExcludedChild):
* rendering/RenderTheme.cpp:
(WebCore::RenderTheme::baselinePosition):
* rendering/RenderThemeGtk.cpp:
(WebCore::RenderThemeGtk::baselinePosition):
(WebCore::centerRectVerticallyInParentInputElement):
* rendering/RenderThemeIOS.mm:
(WebCore::RenderThemeIOS::baselinePosition):
* rendering/RenderThemeSafari.cpp:
(WebCore::RenderThemeSafari::baselinePosition):
* rendering/RenderThemeWin.cpp:
(WebCore::RenderThemeWin::paintSearchFieldCancelButton):
(WebCore::RenderThemeWin::paintSearchFieldResultsDecorationPart):
(WebCore::RenderThemeWin::paintSearchFieldResultsButton):
* rendering/RenderTreeAsText.cpp:
(WebCore::RenderTreeAsText::writeRenderObject):
(WebCore::externalRepresentation):
* rendering/RenderView.cpp:
(WebCore::RenderView::paintBoxDecorations):
* rendering/RootInlineBox.cpp:
(WebCore::RootInlineBox::setLineBreakInfo):
* rendering/line/BreakingContextInlineHeaders.h:
(WebCore::BreakingContext::handleOutOfFlowPositioned):
(WebCore::BreakingContext::handleFloat):
(WebCore::BreakingContext::handleReplaced):
* rendering/line/LineBreaker.cpp:
(WebCore::LineBreaker::skipTrailingWhitespace):
(WebCore::LineBreaker::skipLeadingWhitespace):
* rendering/mathml/RenderMathMLUnderOver.cpp:
(WebCore::RenderMathMLUnderOver::layout):
* svg/graphics/SVGImage.cpp:
(WebCore::SVGImage::embeddedContentBox):
2014-10-17 Andreas Kling <akling@apple.com>
Get rid of wrapperContext() in DOM bindings.
<https://webkit.org/b/137834>
Reviewed by Chris Dumez.
The "wrapper context" is always the DOMWrapperWorld, and since we're passing that around
already, we don't need a separate mechanism to get at the context.
The context is extra data stored in the DOM object's JSC::Weak (the wrapper GC object.)
* bindings/js/JSDOMBinding.h:
(WebCore::setInlineCachedWrapper):
(WebCore::cacheWrapper):
(WebCore::wrapperContext): Deleted.
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateHeader):
2014-10-17 Benjamin Poulain <benjamin@webkit.org>
Make a better use of the available registers when compiling nested selector lists
https://bugs.webkit.org/show_bug.cgi?id=137802
Reviewed by Andreas Kling.
Previously, when compiling a nested selector list, the compiler would start by pushing all
the allocated registers to the stack to free them for the compiled selector list.
While neat to ensure register allocation is correct, this is very inefficient.
This patch brings the first step for reducing the overhead. Instead of pushing everything
to the stack, we just push as many registers as we need for compiling the selector list.
In most cases, we have so many registers that we don't even need to push anything to the stack.
Test: fast/selectors/nth-child-of-register-requirement.html
* cssjit/SelectorCompiler.cpp:
Add an explicit type for SelectorList to keep information aggregated from all
SelectorFragmentList inside it.
SelectorFragmentList is also extended to include its register and stack requirements.
This information is then used to create a SelectorList and to compile the SelectorFragmentList.
(WebCore::SelectorCompiler::hasAnyCombinators):
We only change the elementAddressRegister when moving over combinators. This is used to detect
if a selector list clobber the elementAddressRegister or leave it untouched.
(WebCore::SelectorCompiler::computeBacktrackingMemoryRequirements):
(WebCore::SelectorCompiler::computeBacktrackingInformation):
Instead of returning a BacktrackingMemoryRequirements, update the SelectorFragmentList and SelectorList directly.
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementMatchesSelectorList):
This is where the fun happen.
First step is keep the input untouched. For now it is simply pushed on the stack. This can be improved later.
Then we find how many allocated registers we need to save to compile the input selector list. We push those registers
to the stack and give them back to the register allocator.
With enough registers we can now compile the nested selector list. The code has changed a bit for efficiency. Instead
of creating a shortcut for success case, the code now exit on error and proceed on success. This is the general pattern
of SelectorCompiler and it is quite a bit more efficient in the common cases.
Finally, we reallocate the registers and get their values back from the stack. The "tail" is duplicated but that's fine
because in the vast majority of cases it is 1 or 2 pop.
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateSelectorChecker):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsNthChildOf):
* cssjit/StackAllocator.h:
(WebCore::StackAllocator::push):
2014-10-17 Chris Dumez <cdumez@apple.com>
Use is<>() / downcast<>() for StyleImage
https://bugs.webkit.org/show_bug.cgi?id=137824
Reviewed by Andreas Kling.
Use is<>() / downcast<>() for StyleImage and clean up the surrouding
code.
No new tests, no behavior change.
* css/CSSCursorImageValue.cpp:
(WebCore::CSSCursorImageValue::detachPendingImage):
(WebCore::CSSCursorImageValue::cachedImage):
(WebCore::CSSCursorImageValue::cachedImageURL):
* css/CSSImageSetValue.cpp:
(WebCore::CSSImageSetValue::detachPendingImage):
(WebCore::CSSImageSetValue::~CSSImageSetValue):
(WebCore::CSSImageSetValue::cachedImageSet):
(WebCore::CSSImageSetValue::hasFailedOrCanceledSubresources):
* css/CSSImageValue.cpp:
(WebCore::CSSImageValue::detachPendingImage):
(WebCore::CSSImageValue::cachedImage):
(WebCore::CSSImageValue::hasFailedOrCanceledSubresources):
* css/StyleResolver.cpp:
(WebCore::StyleResolver::loadPendingShapeImage):
(WebCore::StyleResolver::loadPendingImages):
* page/PageSerializer.cpp:
(WebCore::PageSerializer::retrieveResourcesForProperties):
* page/animation/CSSPropertyAnimation.cpp:
(WebCore::blendFunc):
* rendering/style/StyleCachedImage.h:
* rendering/style/StyleCachedImageSet.h:
* rendering/style/StyleGeneratedImage.h:
* rendering/style/StyleImage.h:
* rendering/style/StylePendingImage.h:
2014-10-17 Dean Jackson <dino@apple.com>
[Media] Always update controls for <audio> since they are always visible
https://bugs.webkit.org/show_bug.cgi?id=137829
<rdar://problem/18693987>
Reviewed by Brent Fulgham.
Revision 174756 made a change to only update the display of the controls
while they are visible. However, <audio> elements didn't detect visibility
the same way, since their controls do not auto-hide.
Change controlsAreHidden to check if we're an audio element.
* Modules/mediacontrols/mediaControlsApple.js:
(Controller.prototype.controlsAreHidden): Audio elements do not auto-hide their controls.
2014-10-17 peavo@outlook.com <peavo@outlook.com>
[WinCairo] Accelerated compositing is not implemented.
https://bugs.webkit.org/show_bug.cgi?id=137345
Reviewed by Brent Fulgham.
This patch is based on GTK, and the texture mapper graphics layer type.
* WebCore.vcxproj/copyForwardingHeaders.cmd: Copy texmap headers.
* platform/graphics/texmap/GraphicsLayerTextureMapper.cpp: Added method and flag indicating whether animation has started.
(WebCore::GraphicsLayerTextureMapper::GraphicsLayerTextureMapper):
(WebCore::GraphicsLayerTextureMapper::addAnimation):
* platform/graphics/texmap/GraphicsLayerTextureMapper.h: Ditto.
(WebCore::GraphicsLayerTextureMapper::startedAnimation):
* platform/graphics/texmap/TextureMapperShaderProgram.cpp: Use same precision for uniform in vertex shader as in fragment shader.
Otherwise glLinkProgram() will fail, and nothing will be rendered.
2014-10-17 Alexey Proskuryakov <ap@apple.com>
[iOS] Crash when load is canceled while waiting for the user to type HTTP authentication credentials
https://bugs.webkit.org/show_bug.cgi?id=137826
rdar://problem/17329599
Reviewed by Brady Eidson.
No new tests, as we don't have a way to simulate details of user interaction with
an auth dialog.
* platform/network/cf/ResourceHandleCFNet.cpp:
(WebCore::ResourceHandle::receivedCredential):
(WebCore::ResourceHandle::receivedRequestToContinueWithoutCredential):
(WebCore::ResourceHandle::receivedRequestToPerformDefaultHandling):
(WebCore::ResourceHandle::receivedChallengeRejection):
Added null checks before passing m_connection for CFNetwork functions, making this
match what Mac code does when sending a message to a nil receiver.
2014-10-17 Simon Fraser <simon.fraser@apple.com>
Fix the iOS build.
* platform/graphics/avfoundation/AVTrackPrivateAVFObjCImpl.mm:
(WebCore::AVTrackPrivateAVFObjCImpl::languageForAVMediaSelectionOption):
2014-10-16 Jer Noble <jer.noble@apple.com>
[Mac] Represent AVMediaSelectionOptions as AudioTracks
https://bugs.webkit.org/show_bug.cgi?id=137474
Reviewed by Brent Fulgham.
Test: http/tests/media/hls/hls-audio-tracks.html
Support selecting audio "tracks" in HLS streams by exposing AVMediaSelectionOptions
as entries in the video's AudioTrackList.
AVMediaSessionGroups and AVPlayerItems don't have KVO or notifications to track when options
are selected and deselected, so wrap AVMediaSessionGroup and AVMediaSessionOption in C++
wrappers. Each AVMediaSelectionGroup can have only one AVMediaSelectionOption selected at a
time, so the wrapper will take care of answering which AVMediaSelectionOption is currently
selected, as without KVO notifications, asking the AVMediaSelectionGroup directly is
inconsistent. Because setting the selected option multiple times in the same run-loop can
cause flakiness, coalesce calls to setSelectedOption() by setting a one-shot timer to do
the actual selection in the next run-loop.
* platform/graphics/avfoundation/MediaSelectionGroupAVFObjC.h: Added.
(WebCore::MediaSelectionOptionAVFObjC::avMediaSelectionOption):
(WebCore::MediaSelectionOptionAVFObjC::clearGroup): Clear backpointer to group from option.
(WebCore::MediaSelectionGroupAVFObjC::selectedOption): Simple accessor.
(WebCore::MediaSelectionGroupAVFObjC::options): Simple accessor.
(WebCore::MediaSelectionGroupAVFObjC::avMediaSelectionGroup): Simple accessor.
* platform/graphics/avfoundation/MediaSelectionGroupAVFObjC.mm: Added.
(WebCore::MediaSelectionOptionAVFObjC::create): Simple factory method.
(WebCore::MediaSelectionOptionAVFObjC::MediaSelectionOptionAVFObjC): Simple constructor.
(WebCore::MediaSelectionOptionAVFObjC::setSelected): Pass through to MediaSelectionGroupAVFObjC.
(WebCore::MediaSelectionOptionAVFObjC::selected): Ditto.
(WebCore::MediaSelectionOptionAVFObjC::index): Return index of this object in the group's object.
(WebCore::MediaSelectionGroupAVFObjC::create):
(WebCore::MediaSelectionGroupAVFObjC::MediaSelectionGroupAVFObjC):
(WebCore::MediaSelectionGroupAVFObjC::~MediaSelectionGroupAVFObjC):
(WebCore::MediaSelectionGroupAVFObjC::updateOptions): Discover added or removed options.
(WebCore::MediaSelectionGroupAVFObjC::setSelectedOption): Set a one shot timer to coalesce multiple calls.
(WebCore::MediaSelectionGroupAVFObjC::selectionTimerFired): Set the selected AVSelectionOption.
Modify AVTrackPrivateAVFObjCImpl to support both AVPlayerItemTracks and these new
MediaSelectionOptionAVFObjC objects.
* platform/graphics/avfoundation/AVTrackPrivateAVFObjCImpl.h:
(WebCore::AVTrackPrivateAVFObjCImpl::mediaSelectionOption): Simple accessor.
* platform/graphics/avfoundation/AVTrackPrivateAVFObjCImpl.mm:
(WebCore::AVTrackPrivateAVFObjCImpl::AVTrackPrivateAVFObjCImpl): Simple constructor.
(WebCore::AVTrackPrivateAVFObjCImpl::~AVTrackPrivateAVFObjCImpl): Simple destructor.
(WebCore::AVTrackPrivateAVFObjCImpl::enabled): Use MediaSelectionOptionAVFObjC, if present.
(WebCore::AVTrackPrivateAVFObjCImpl::setEnabled): Ditto.
(WebCore::AVTrackPrivateAVFObjCImpl::audioKind): Ditto.
(WebCore::AVTrackPrivateAVFObjCImpl::videoKind): Ditto.
(WebCore::AVTrackPrivateAVFObjCImpl::index): Ditto.
(WebCore::AVTrackPrivateAVFObjCImpl::id): Ditto.
(WebCore::AVTrackPrivateAVFObjCImpl::label): Ditto.
(WebCore::AVTrackPrivateAVFObjCImpl::language): Ditto.
(WebCore::AVTrackPrivateAVFObjCImpl::languageForAVMediaSelectionOption): Ditto.
(WebCore::AVTrackPrivateAVFObjCImpl::trackID): Ditto.
Allow AudioTrackPrivateAVFObjC and VideoTrackPrivateAVFObjC to be created with
a MediaSelectionOptionAVFObjC.
* platform/graphics/avfoundation/objc/AudioTrackPrivateAVFObjC.h:
(WebCore::AudioTrackPrivateAVFObjC::create): Takes a MediaSelectionOptionAVFObjC.
* platform/graphics/avfoundation/objc/AudioTrackPrivateAVFObjC.mm:
(WebCore::AudioTrackPrivateAVFObjC::AudioTrackPrivateAVFObjC): Simple constructor.
(WebCore::AudioTrackPrivateAVFObjC::setMediaSelectionOption): Create a new AVTrackPrivateAVFObjCImpl.
(WebCore::AudioTrackPrivateAVFObjC::mediaSelectionOption): Simple accessor.
* platform/graphics/avfoundation/objc/VideoTrackPrivateAVFObjC.cpp:
(WebCore::VideoTrackPrivateAVFObjC::VideoTrackPrivateAVFObjC): Simple constructor.
(WebCore::VideoTrackPrivateAVFObjC::setMediaSelectonOption): Create a new AVTrackPrivateAVFObjCImpl.
(WebCore::VideoTrackPrivateAVFObjC::mediaSelectionOption): Simple accessor.
* platform/graphics/avfoundation/objc/VideoTrackPrivateAVFObjC.h:
Because IDs are not necessarily unique across AVPlayerItemTracks and AVMediaSelectionOptions,
use the index of the track or option instead of it's self-declared ID for ordering for the
trackIndex.
* platform/graphics/avfoundation/objc/AudioTrackPrivateAVFObjC.mm:
(WebCore::AudioTrackPrivateAVFObjC::resetPropertiesFromTrack):
* platform/graphics/avfoundation/objc/VideoTrackPrivateMediaSourceAVFObjC.mm:
(WebCore::VideoTrackPrivateMediaSourceAVFObjC::resetPropertiesFromTrack):
Rather than making allowing the AVPlayerItem to automatically select the "best"
AVMediaSelectionOption, select the automatic options when creating the AVPlayerItem
and thereafter allow the users manual selections "stick".
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::ensureAVPlayer):
(WebCore::MediaPlayerPrivateAVFoundationObjC::ensureAVPlayerItem):
Determine whether any MediaSelectionOptionsAVFObjC have been added or removed and send trackChange events accordingly.
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::determineChangedTracksFromNewTracksAndOldItems): Added.
(WebCore::MediaPlayerPrivateAVFoundationObjC::updateAudioTracks): Search for updated selection options.
(WebCore::MediaPlayerPrivateAVFoundationObjC::updateVideoTracks): Ditto.
(WebCore::MediaPlayerPrivateAVFoundationObjC::safeMediaSelectionGroupForAudibleMedia): Return selection group, if available.
(WebCore::MediaPlayerPrivateAVFoundationObjC::safeMediaSelectionGroupForVisualMedia): Ditto.
(WebCore::MediaPlayerPrivateAVFoundationObjC::tracksDidChange): Filter out AVPlayerItemTracks without
AVAssetTracks, as these will be represented by MediaSelectionGroupObjCs instead.
Add new files to project.
* WebCore.xcodeproj/project.pbxproj:
2014-10-17 Grzegorz Czajkowski <g.czajkowski@samsung.com>
[EFL] window.screen.width returns wrong value if more displays are available
https://bugs.webkit.org/show_bug.cgi?id=137778
Reviewed by Gyuyoung Kim.
ecore_x_screen_size_get() retrieves the size of Ecore_X_Screen, for example,
having two displays of 1680x1050, it will return 3360x1050.
Unlike EFL's MiniBrowser, Firefox and Chrome return screen of the current display.
No new tests. Hardware specific bug including multiple displays.
* platform/efl/PlatformScreenEfl.cpp:
(WebCore::screenRect):
Use ecore's xrandr to determine the screen on which browser window is displayed.
2014-10-17 Carlos Garcia Campos <cgarcia@igalia.com>
[GLIB] Add API to GMainLoopSource to schedule sources after a delay in microseconds
https://bugs.webkit.org/show_bug.cgi?id=137782
Reviewed by Sergio Villar Senin.
* platform/gtk/SharedTimerGtk.cpp:
(WebCore::setSharedTimerFireInterval): Use microseconds instead of
milliseconds.
2014-10-17 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Move touch events handling from Platform to WebKit2
https://bugs.webkit.org/show_bug.cgi?id=137735
Reviewed by Sergio Villar Senin.
Remove GtkTouchContextHelper.
* PlatformGTK.cmake:
* platform/gtk/GtkTouchContextHelper.cpp: Removed.
* platform/gtk/GtkTouchContextHelper.h: Removed.
2014-10-17 Gyuyoung Kim <gyuyoung.kim@samsung.com>
Remove unused function in WorkerThreadableLoader.h
https://bugs.webkit.org/show_bug.cgi?id=137811
Reviewed by Csaba Osztrogonác.
mainThreadCreateLoader() isn't used anywhere. Even there is no implementation.
* loader/WorkerThreadableLoader.h:
2014-10-15 Yusuke Suzuki <utatane.tea@gmail.com>
CSS Selectors Level 4: Implement :matches in SelectorChecker
https://bugs.webkit.org/show_bug.cgi?id=137393
Reviewed by Benjamin Poulain.
In this patch, we introduce initial :matches implementation.
In this current implementation, we don't consider pseudo elements.
Test: fast/selectors/querySelector-matches.html
* css/SelectorChecker.cpp:
(WebCore::SelectorChecker::checkOne):
2014-10-16 Yusuke Suzuki <utatane.tea@gmail.com>
CSS JIT: Introduce StackAllocator::addressOf
https://bugs.webkit.org/show_bug.cgi?id=137771
Reviewed by Benjamin Poulain.
Introduce StackAllocator::addressOf and drop offsetToStackReference, it's too primitive.
* cssjit/SelectorCompiler.cpp:
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateSelectorChecker):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateParentElementTreeWalker):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateDirectAdjacentTreeWalker):
(WebCore::SelectorCompiler::SelectorCodeGenerator::loadCheckingContext):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateAdjacentBacktrackingTail):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateDescendantBacktrackingTail):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsFirstLink):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateStoreLastVisitedElement):
* cssjit/StackAllocator.h:
(WebCore::StackAllocator::addressOf):
(WebCore::StackAllocator::offsetToStackReference):
2014-10-16 Alexey Proskuryakov <ap@apple.com>
REGRESSION (r169024): Undetermined text is not displayed in the search field of Adobe Help Website
https://bugs.webkit.org/show_bug.cgi?id=137679
rdar://problem/18450335
Reviewed by Enrica Casucci.
Test: platform/mac/editing/input/selected-composed-text-painting.html
* rendering/InlineTextBox.cpp: (WebCore::InlineTextBox::paint): We do not paint
selection beckground for unconfirmed text with underlines, so we should use a regular
style for text painting, as well.
2014-10-16 Chris Dumez <cdumez@apple.com>
Use is<>() / downcast<>() for BasicShape subclasses
https://bugs.webkit.org/show_bug.cgi?id=137766
Reviewed by Andreas Kling.
Use is<>() / downcast<>() for BasicShape subclasses and clean up the
surrounding code.
No new tests, no behavior change.
* css/BasicShapeFunctions.cpp:
(WebCore::valueForBasicShape):
(WebCore::basicShapeForValue):
* css/BasicShapeFunctions.h:
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::shapePropertyValue):
* page/animation/CSSPropertyAnimation.cpp:
(WebCore::blendFunc):
* rendering/ClipPathOperation.h:
(WebCore::ShapeClipPathOperation::create):
Take a PassRef<BasicShape> in argument to make it obvious it is never
null.
(WebCore::ShapeClipPathOperation::basicShape):
Return a reference instead of a pointer as it can never return null.
(WebCore::ShapeClipPathOperation::windRule):
(WebCore::ShapeClipPathOperation::pathForReferenceRect):
Make it non-const due to the const-correctness of Ref::get().
(WebCore::ShapeClipPathOperation::ShapeClipPathOperation):
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::nodeAtPoint):
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::setupClipPath):
* rendering/shapes/Shape.cpp:
(WebCore::Shape::createShape):
* rendering/shapes/Shape.h:
* rendering/shapes/ShapeOutsideInfo.cpp:
(WebCore::ShapeOutsideInfo::computedShape):
* rendering/style/BasicShapes.cpp:
(WebCore::BasicShape::canBlend):
(WebCore::BasicShapeCircle::blend):
(WebCore::BasicShapeEllipse::blend):
(WebCore::BasicShapePolygon::blend):
(WebCore::BasicShapeInset::blend):
* rendering/style/BasicShapes.h:
* rendering/svg/SVGRenderingContext.cpp:
(WebCore::SVGRenderingContext::prepareToRenderSVGContent):
2014-10-16 Chris Dumez <cdumez@apple.com>
Leverage the new RenderElement::m_isCSSAnimating flag in more places
https://bugs.webkit.org/show_bug.cgi?id=137786
Reviewed by Simon Fraser.
Leverage the new RenderElement::m_isCSSAnimating flag that was introduced
in r174703 in more places, for performance. This avoids doing extra work
for renderers on which we are not running animations on. This patch also
updates the API a bit to use more references instead of pointers, making
it clear the RenderElement cannot be null and thus avoiding unnecessary
null checks.
No new tests, no behavior change.
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::computeRenderStyleForProperty):
* page/animation/AnimationController.cpp:
(WebCore::AnimationControllerPrivate::ensureCompositeAnimation):
(WebCore::AnimationControllerPrivate::clear):
(WebCore::AnimationControllerPrivate::updateAnimationTimerForRenderer):
(WebCore::AnimationControllerPrivate::isRunningAnimationOnRenderer):
(WebCore::AnimationControllerPrivate::isRunningAcceleratedAnimationOnRenderer):
(WebCore::AnimationControllerPrivate::pauseAnimationAtTime):
(WebCore::AnimationControllerPrivate::pauseTransitionAtTime):
(WebCore::AnimationControllerPrivate::getAnimatedStyleForRenderer):
(WebCore::AnimationController::cancelAnimations):
(WebCore::AnimationController::updateAnimations):
(WebCore::AnimationController::getAnimatedStyleForRenderer):
(WebCore::AnimationController::notifyAnimationStarted):
(WebCore::AnimationController::isRunningAnimationOnRenderer):
(WebCore::AnimationController::isRunningAcceleratedAnimationOnRenderer):
* page/animation/AnimationController.h:
* page/animation/AnimationControllerPrivate.h:
* rendering/RenderElement.cpp:
(WebCore::RenderElement::willBeDestroyed):
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::currentTransform):
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::updateGeometry):
(WebCore::RenderLayerBacking::notifyAnimationStarted):
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::requiresCompositingForAnimation):
(WebCore::RenderLayerCompositor::isRunningAcceleratedTransformAnimation):
2014-10-16 Adrien Destugues <pulkomandy@gmail.com>
Missing RefPtr.release() calls in TextureMapper
https://bugs.webkit.org/show_bug.cgi?id=137777
Reviewed by Chris Dumez.
No new tests: no functional change, cleanup/optimization.
Avoids useless ref/deref cycle when returning from functions.
* platform/graphics/texmap/TextureMapper.cpp:
(WebCore::TextureMapper::acquireTextureFromPool):
* platform/graphics/texmap/TextureMapperLayer.cpp:
(WebCore::TextureMapperLayer::paintIntoSurface):
2014-10-16 Chris Dumez <cdumez@apple.com>
Use is<>() / downcast<>() for ContentData subclasses
https://bugs.webkit.org/show_bug.cgi?id=137768
Reviewed by Andreas Kling.
Use is<>() / downcast<>() for ContentData subclasses.
No new tests, no behavior change.
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::contentToCSSValue):
* css/StyleResolver.cpp:
(WebCore::StyleResolver::loadPendingImages):
* rendering/RenderElement.cpp:
(WebCore::RenderElement::createFor):
* rendering/style/ContentData.h:
(WebCore::operator==):
* rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::setContent):
2014-10-16 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r174744.
https://bugs.webkit.org/show_bug.cgi?id=137790
Caused another WebGL conformance test to fail (Requested by
rfong on #webkit).
Reverted changeset:
"glReadPixels on NVIDIA cards returns the wrong values for the
alpha channel when alpha is off."
https://bugs.webkit.org/show_bug.cgi?id=137752
http://trac.webkit.org/changeset/174744
2014-10-16 Tim Horton <timothy_horton@apple.com>
Implement selection services menu for Legacy WebKit
https://bugs.webkit.org/show_bug.cgi?id=137582
<rdar://problem/18604241>
Reviewed by Brady Eidson.
* WebCore.exp.in:
* editing/Editor.h:
* editing/ios/EditorIOS.mm:
(WebCore::Editor::replaceSelectionWithAttributedString):
* editing/mac/EditorMac.mm:
(WebCore::Editor::replaceSelectionWithAttributedString):
Add replaceSelectionWithAttributedString, which replaces the selection
with the given attributed string (converting to plain text if the destination
is not richly editable).
2014-10-16 Alexey Proskuryakov <ap@apple.com>
Crashes in ResourceHandleCFURLConnectionDelegateWithOperationQueue due to unimplemented retain/release
https://bugs.webkit.org/show_bug.cgi?id=137779
rdar://problem/18679320
Reviewed by Brady Eidson.
* platform/network/cf/ResourceHandleCFURLConnectionDelegate.cpp:
(WebCore::ResourceHandleCFURLConnectionDelegate::retain):
(WebCore::ResourceHandleCFURLConnectionDelegate::release):
(WebCore::ResourceHandleCFURLConnectionDelegate::makeConnectionClient):
* platform/network/cf/ResourceHandleCFURLConnectionDelegate.h:
Implemented retain/release. They are necessary, as ResourceHandle goes away when
it's canceled, and there is noone else to keep the client object alive but
CFURLConnection itself.
* platform/network/cf/ResourceHandleCFURLConnectionDelegateWithOperationQueue.cpp:
(WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::willSendRequest):
(WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::didReceiveResponse):
(WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::didReceiveData):
(WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::didFinishLoading):
(WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::didFail):
(WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::willCacheResponse):
(WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::didReceiveChallenge):
(WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::didSendBodyData):
(WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::canRespondToProtectionSpace):
(WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::didReceiveDataArray):
Added a FIXME about potential improvements that I spotted while invsestigating this.
2014-10-15 Andrei Bucur <abucur@adobe.com>
ASSERTION FAILED in WebCore::RenderFlowThread::getRegionRangeForBox
https://bugs.webkit.org/show_bug.cgi?id=135563
Reviewed by David Hyatt.
The new multi-column code doesn't work correctly when the document contains nested fragmentation
contexts. The problem is the current flow thread concept that can store only one RenderFlowThread
at a time and use it during layout.
The stored flow thread is always correct for regions because named flow threads are absolutley positioned
so every child renderer is contained inside them (with the expcetion of fixed positioned elements which are
treated separately).
For multi-column elements this is no longer the case. An absolutely positioned element inside a static
multi-column element will be contained by a block outside the fragmentation context. It can even be
contained by a different multi-column element in the case of nested flow threads.
The patch below explores a solution that's not based on a current flow thread stored globally. The proposed
patch makes every block to store a pointer to its fragmentation context and a flag that states if this pointer
needs to be updated or not. If the renderer is not a block it will get its flow thread from the containing
block. Once the containing flow thread is requested for the block, the pointer is computed and cached until
invalidated:
- when a subtree is removed from a flow thread
- when the position property of an element inside a flow thread changes
The process is recursive and it doesn't affect elements that are not nested inside a flow thread. If a block
changes position from relative to static, any element that was contained by it can only be contained by an
ancestor of the block. This ancestor will still be outside of any flow thread. This ensures that non-fragmentation
code is not affected from a performance perspective.
The patch affects the results of the performance tests:
- the regions layout tests have a decreased performance raging from 2% to 5-6%
- the regions selection tests have an increased performance raging from 1-2% to 10%
- the multicolumn layout tests (now pending review in b137687) have an increased performance
raging from 1.8% to 5%
Tests: fast/multicol/multicol-all-positioned-crash.html
fast/multicol/multicol-transform-containing-block.html
* rendering/FlowThreadController.cpp:
(WebCore::FlowThreadController::FlowThreadController):
* rendering/FlowThreadController.h:
(WebCore::FlowThreadController::currentRenderFlowThread): Deleted.
(WebCore::FlowThreadController::setCurrentRenderFlowThread): Deleted.
* rendering/LayoutState.h:
(WebCore::LayoutState::currentRenderFlowThread):
(WebCore::LayoutState::setCurrentRenderFlowThread):
* rendering/RenderBlock.cpp:
(WebCore::RenderBlockRareData::RenderBlockRareData):
(WebCore::RenderBlock::styleWillChange):
(WebCore::RenderBlock::styleDidChange):
(WebCore::RenderBlock::collapseAnonymousBoxChild):
(WebCore::RenderBlock::cachedFlowThreadContainingBlock):
(WebCore::RenderBlock::cachedFlowThreadContainingBlockNeedsUpdate):
(WebCore::RenderBlock::setCachedFlowThreadContainingBlockNeedsUpdate):
(WebCore::RenderBlock::updateCachedFlowThreadContainingBlock):
(WebCore::RenderBlock::locateFlowThreadContainingBlock):
* rendering/RenderBlock.h:
* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::styleWillChange):
* rendering/RenderBox.cpp:
(WebCore::RenderBox::borderBoxRectInRegion):
* rendering/RenderFlowThread.cpp:
(WebCore::RenderFlowThread::layout):
(WebCore::RenderFlowThread::updateAllLayerToRegionMappings):
(WebCore::RenderFlowThread::repaintRectangleInRegions):
(WebCore::CurrentRenderFlowThreadMaintainer::CurrentRenderFlowThreadMaintainer): Deleted.
(WebCore::CurrentRenderFlowThreadMaintainer::~CurrentRenderFlowThreadMaintainer): Deleted.
(WebCore::CurrentRenderFlowThreadDisabler::CurrentRenderFlowThreadDisabler): Deleted.
(WebCore::CurrentRenderFlowThreadDisabler::~CurrentRenderFlowThreadDisabler): Deleted.
* rendering/RenderFlowThread.h:
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::paintLayer):
(WebCore::RenderLayer::hitTestLayer):
(WebCore::RenderLayer::mapLayerClipRectsToFragmentationLayer):
(WebCore::RenderLayer::calculateClipRects):
* rendering/RenderObject.cpp:
(WebCore::RenderObject::showRegionsInformation):
(WebCore::RenderObject::insertedIntoTree):
(WebCore::RenderObject::removeFromRenderFlowThread):
(WebCore::RenderObject::removeFromRenderFlowThreadIncludingDescendants):
(WebCore::RenderObject::invalidateFlowThreadContainingBlockIncludingDescendants):
(WebCore::RenderObject::currentRenderNamedFlowFragment):
(WebCore::RenderObject::locateFlowThreadContainingBlock):
(WebCore::RenderObject::locateFlowThreadContainingBlockNoCache): Deleted.
(WebCore::RenderObject::removeFromRenderFlowThreadRecursive): Deleted.
* rendering/RenderObject.h:
(WebCore::RenderObject::flowThreadContainingBlock):
* rendering/RenderRegion.cpp:
(WebCore::RenderRegion::computeOverflowFromFlowThread):
* rendering/RenderView.cpp:
(WebCore::RenderView::pushLayoutStateForCurrentFlowThread):
(WebCore::RenderView::popLayoutStateForCurrentFlowThread):
* rendering/RenderView.h:
2014-10-15 Chris Dumez <cdumez@apple.com>
Use is<>() / downcast<>() for list-related render objects
https://bugs.webkit.org/show_bug.cgi?id=137764
Reviewed by Benjamin Poulain.
Use is<>() / downcast<>() for list-related render objects and clean up
the surrounding code.
No new tests, no behavior change.
* accessibility/AccessibilityListBox.cpp:
(WebCore::AccessibilityListBox::visibleChildren):
(WebCore::AccessibilityListBox::elementAccessibilityHitTest):
* accessibility/AccessibilityListBoxOption.cpp:
(WebCore::AccessibilityListBoxOption::elementRect):
* accessibility/AccessibilityObject.cpp:
(WebCore::renderListItemContainerForNode):
* accessibility/atk/WebKitAccessibleHyperlink.cpp:
(getRangeLengthForObject):
* accessibility/atk/WebKitAccessibleInterfaceText.cpp:
(accessibilityObjectLength):
(offsetAdjustmentForListItem):
(webkitAccessibleTextGetText):
* editing/BreakBlockquoteCommand.cpp:
(WebCore::BreakBlockquoteCommand::doApply):
* html/HTMLLIElement.cpp:
(WebCore::HTMLLIElement::didAttachRenderers):
(WebCore::HTMLLIElement::parseValue):
* html/HTMLSelectElement.cpp:
(WebCore::HTMLSelectElement::nextSelectableListIndexPageAway):
(WebCore::HTMLSelectElement::scrollToSelection):
(WebCore::HTMLSelectElement::setOptionsChangedOnRenderer):
(WebCore::HTMLSelectElement::selectOption):
(WebCore::HTMLSelectElement::platformHandleKeydownEvent):
(WebCore::HTMLSelectElement::menuListDefaultEventHandler):
(WebCore::HTMLSelectElement::listBoxDefaultEventHandler):
* html/HTMLSelectElementWin.cpp:
(WebCore::HTMLSelectElement::platformHandleKeydownEvent):
* page/mac/EventHandlerMac.mm:
(WebCore::EventHandler::platformPrepareForWheelEvents):
* rendering/InlineFlowBox.cpp:
(WebCore::InlineFlowBox::addToLine):
(WebCore::InlineFlowBox::placeBoxRangeInInlineDirection):
* rendering/RenderCounter.cpp:
(WebCore::planCounter):
* rendering/RenderListBox.h:
* rendering/RenderListItem.cpp:
(WebCore::nextListItem):
(WebCore::previousListItem):
* rendering/RenderListItem.h:
* rendering/RenderListMarker.h:
* rendering/RenderMenuList.h:
* rendering/RenderTreeAsText.cpp:
(WebCore::markerTextForListItem):
* rendering/TextAutoSizing.cpp:
(WebCore::TextAutoSizingValue::adjustNodeSizes):
* rendering/line/BreakingContextInlineHeaders.h:
(WebCore::BreakingContext::handleReplaced):
(WebCore::BreakingContext::commitAndUpdateLineBreakIfNeeded):
* testing/Internals.cpp:
(WebCore::Internals::isSelectPopupVisible):
2014-10-15 Gyuyoung Kim <gyuyoung.kim@samsung.com>
Use std::unique_ptr for CachedResource
https://bugs.webkit.org/show_bug.cgi?id=137736
Reviewed by Darin Adler.
No new tests, no behavior change.
* loader/cache/CachedResource.cpp: Use std::unique_ptr instead of PassOwnPtr|OwnPtr.
(WebCore::CachedResource::removeClient):
* loader/cache/CachedResource.h: Set ctor from private to public.
(WebCore::CachedResource::CachedResourceCallback::schedule):
2014-10-15 Gyuyoung Kim <gyuyoung.kim@samsung.com>
Move TextCodec classes to std::unique_ptr
https://bugs.webkit.org/show_bug.cgi?id=137738
Reviewed by Darin Adler.
Replace uses of PassOwnPtr in code under TextCodecFoo class with std::unique_ptr.
To do this, ctor of TextCodecFoo classes is changed from private to public. Besides
related classes follow this change as well.
No new tests, no behavior change.
* html/parser/HTMLMetaCharsetParser.h:
* loader/TextResourceDecoder.cpp:
(WebCore::TextResourceDecoder::setEncoding):
(WebCore::TextResourceDecoder::flush):
* loader/TextResourceDecoder.h:
* platform/text/TextCodec.h:
* platform/text/TextCodecICU.cpp:
(WebCore::TextCodecICU::create):
* platform/text/TextCodecICU.h:
* platform/text/TextCodecLatin1.cpp:
(WebCore::newStreamingTextDecoderWindowsLatin1):
* platform/text/TextCodecUTF16.cpp:
(WebCore::newStreamingTextDecoderUTF16LE):
(WebCore::newStreamingTextDecoderUTF16BE):
* platform/text/TextCodecUTF8.cpp:
(WebCore::TextCodecUTF8::create):
* platform/text/TextCodecUTF8.h:
* platform/text/TextCodecUserDefined.cpp:
(WebCore::newStreamingTextDecoderUserDefined):
* platform/text/TextEncodingRegistry.cpp:
(WebCore::newTextCodec):
* platform/text/TextEncodingRegistry.h:
* platform/text/mac/TextCodecMac.cpp:
(WebCore::newTextCodecMac):
2014-10-15 Dean Jackson <dino@apple.com>
[Media] Reduce style updates (painting) in controls
https://bugs.webkit.org/show_bug.cgi?id=137763
<rdar://problem/17833045>
Reviewed by Simon Fraser.
Media controls were causing a lot of repaints they were
constantly updating the style of the widgets, the value
of the forms, or the text in the display.
This is necessary when the controls are visible, but not
necessary when they are hidden. Return immediately in that case.
* Modules/mediacontrols/mediaControlsApple.js:
(Controller.prototype.createControls): Initialise the slider to a zero value.
(Controller.prototype.handleDurationChange): Force an update even though we might be hidden.
(Controller.prototype.updateProgress): Don't update if we're hidden.
(Controller.prototype.updateTime): Ditto.
* Modules/mediacontrols/mediaControlsiOS.js:
(ControllerIOS.prototype.updateProgress): Ditto.
2014-10-15 Chris Dumez <cdumez@apple.com>
[Mac] Fix inefficiencies in ResourceResponse::platformLazyInit(InitLevel) - Part 2
https://bugs.webkit.org/show_bug.cgi?id=137721
Reviewed by Darin Adler.
Follow-up patch to r174717 addressing review comments made after the patch landed:
- Use modern C++ loop
- Remove explicit calls to String(NSString*) constructor
No new tests, no new tests.
* platform/network/mac/ResourceResponseMac.mm:
(WebCore::ResourceResponse::platformLazyInit):
2014-10-15 Chris Dumez <cdumez@apple.com>
Use is<>() / downcast<>() for InlineBox subclasses
https://bugs.webkit.org/show_bug.cgi?id=137749
Reviewed by Darin Adler.
Use is<>() / downcast<>() for InlineBox subclasses and clean up the
surrounding code.
No new tests, no behavior change.
* dom/Position.cpp:
(WebCore::Position::upstream):
(WebCore::Position::downstream):
* editing/VisibleUnits.cpp:
(WebCore::wordBreakIteratorForMinOffsetBoundary):
(WebCore::wordBreakIteratorForMaxOffsetBoundary):
(WebCore::visualWordPosition):
(WebCore::startPositionForLine):
(WebCore::endPositionForLine):
* rendering/InlineBox.cpp:
(WebCore::InlineBox::root):
(WebCore::InlineBox::nextLeafChild):
(WebCore::InlineBox::prevLeafChild):
(WebCore::InlineBox::nextLeafChildIgnoringLineBreak):
* rendering/InlineBox.h:
* rendering/InlineElementBox.h:
* rendering/InlineFlowBox.cpp:
(WebCore::InlineFlowBox::getFlowSpacingLogicalWidth):
(WebCore::InlineFlowBox::addToLine):
(WebCore::InlineFlowBox::determineSpacingForFlowBoxes):
(WebCore::InlineFlowBox::placeBoxRangeInInlineDirection):
(WebCore::InlineFlowBox::requiresIdeographicBaseline):
(WebCore::InlineFlowBox::adjustMaxAscentAndDescent):
(WebCore::InlineFlowBox::computeLogicalBoxHeights):
(WebCore::InlineFlowBox::placeBoxesInBlockDirection):
(WebCore::InlineFlowBox::computeMaxLogicalTop):
(WebCore::InlineFlowBox::flipLinesInBlockDirection):
(WebCore::InlineFlowBox::computeOverflow):
(WebCore::InlineFlowBox::firstLeafChild):
(WebCore::InlineFlowBox::lastLeafChild):
(WebCore::InlineFlowBox::computeOverAnnotationAdjustment):
(WebCore::InlineFlowBox::computeUnderAnnotationAdjustment):
* rendering/InlineFlowBox.h:
* rendering/InlineTextBox.h:
* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::positionForBox):
* rendering/RenderBlockFlow.h:
(WebCore::RenderBlockFlow::firstRootBox):
(WebCore::RenderBlockFlow::lastRootBox):
* rendering/RenderBlockLineLayout.cpp:
(WebCore::RenderBlockFlow::createLineBoxes):
(WebCore::RenderBlockFlow::constructLine):
(WebCore::setLogicalWidthForTextRun):
(WebCore::computeExpansionForJustifiedText):
(WebCore::RenderBlockFlow::computeInlineDirectionPositionsForSegment):
(WebCore::RenderBlockFlow::computeBlockDirectionPositionsForLine):
(WebCore::RenderBlockFlow::createLineBoxesFromBidiRuns):
* rendering/RenderText.cpp:
(WebCore::RenderText::localCaretRect):
* rendering/RootInlineBox.cpp:
(WebCore::RootInlineBox::isHyphenated):
(WebCore::RootInlineBox::ascentAndDescentForBox):
* rendering/RootInlineBox.h:
(WebCore::RootInlineBox::nextRootBox):
(WebCore::RootInlineBox::prevRootBox):
* rendering/svg/RenderSVGInlineText.cpp:
(WebCore::RenderSVGInlineText::localCaretRect):
(WebCore::RenderSVGInlineText::positionForPoint):
* rendering/svg/RenderSVGText.cpp:
(WebCore::RenderSVGText::positionForPoint):
* rendering/svg/SVGInlineFlowBox.cpp:
(WebCore::SVGInlineFlowBox::paintSelectionBackground):
(WebCore::SVGInlineFlowBox::paint):
(WebCore::SVGInlineFlowBox::computeTextMatchMarkerRectForRenderer):
* rendering/svg/SVGInlineFlowBox.h:
* rendering/svg/SVGInlineTextBox.h:
* rendering/svg/SVGRenderTreeAsText.cpp:
(WebCore::writeRenderSVGTextBox):
(WebCore::writeSVGInlineTextBoxes):
* rendering/svg/SVGRootInlineBox.cpp:
(WebCore::SVGRootInlineBox::paint):
(WebCore::SVGRootInlineBox::layoutCharactersInTextBoxes):
(WebCore::SVGRootInlineBox::layoutChildBoxes):
(WebCore::reverseInlineBoxRangeAndValueListsIfNeeded):
* rendering/svg/SVGRootInlineBox.h:
* rendering/svg/SVGTextQuery.cpp:
(WebCore::SVGTextQuery::collectTextBoxesInFlowBox):
2014-10-15 Roger Fong <roger_fong@apple.com>
glReadPixels on NVIDIA cards returns the wrong values for the alpha channel when alpha is off.
https://bugs.webkit.org/show_bug.cgi?id=137752.
<rdar://problem/15408133>
Reviewed by Brent Fulgham.
This change fixed the 1.0.2 conformance test: context/context-attribute-preserve-drawing-buffer.html
* platform/graphics/GraphicsContext3D.h:
* platform/graphics/opengl/GraphicsContext3DOpenGL.cpp:
Manually set the alpha channel to 255 when alpha is off on the rendering context.
2014-10-13 Chris Fleizach <cfleizach@apple.com>
AX: Going back is broken for VoiceOver
https://bugs.webkit.org/show_bug.cgi?id=137382
Reviewed by Darin Adler.
There were two issues preventing VoiceOver from navigating when using page history to go back/forward.
1) Existing AXLoadComplete does not get fired when you just move through page history.
There were existing frameLoad notifications used by GTK. I think we should use those which seem more reliable.
2) The AccessibilityScrollView cached its children, but on some history page loads, that cache was never cleared out.
Rather than trying to find those places to clear out the cache, it's easier to just add the elements to the children
array everytime it's asked for. Since there's only ever 3 elements (web area + 2 scroll bars) this should not be a performance hit.
Tests are not possible since they require monitoring notifications across multiple page loads.
* accessibility/AXObjectCache.h:
* accessibility/AccessibilityScrollView.cpp:
(WebCore::AccessibilityScrollView::updateChildrenIfNecessary):
* accessibility/ios/AXObjectCacheIOS.mm:
(WebCore::AXObjectCache::frameLoadingEventPlatformNotification):
* accessibility/mac/AXObjectCacheMac.mm:
(WebCore::AXObjectCache::frameLoadingEventPlatformNotification):
* dom/Document.cpp:
(WebCore::Document::implicitClose):
2014-10-15 Simon Fraser <simon.fraser@apple.com>
Sometimes can't scroll overflow:scroll areas in subframes
https://bugs.webkit.org/show_bug.cgi?id=137746
rdar://problem/18603560
Reviewed by Tim Horton.
r169733 introduced a regression which caused us to no longer update the non-fast
scrollable region on every layout in subframes, by adding a bogus isMainFrame() check.
Revert to the previous code.
Test: platform/mac-wk2/tiled-drawing/scrolling/frames/scroll-region-after-frame-layout.html
* page/scrolling/AsyncScrollingCoordinator.cpp:
(WebCore::AsyncScrollingCoordinator::frameViewLayoutUpdated):
2014-10-15 Chris Dumez <cdumez@apple.com>
Use is<>() / downcast<>() for TransformOperation subclasses
https://bugs.webkit.org/show_bug.cgi?id=137731
Reviewed by Darin Adler.
Use is<>() / downcast<>() for TransformOperation subclasses and clean
up the surrounding code.
No new tests, no behavior change.
* platform/graphics/GraphicsLayer.cpp:
(WebCore::GraphicsLayer::validateTransformOperations):
* platform/graphics/ca/GraphicsLayerCA.cpp:
(WebCore::getTransformFunctionValue):
* platform/graphics/transforms/IdentityTransformOperation.h:
* platform/graphics/transforms/Matrix3DTransformOperation.cpp:
(WebCore::Matrix3DTransformOperation::operator==):
* platform/graphics/transforms/Matrix3DTransformOperation.h:
* platform/graphics/transforms/MatrixTransformOperation.cpp:
(WebCore::MatrixTransformOperation::operator==):
(WebCore::MatrixTransformOperation::blend):
* platform/graphics/transforms/MatrixTransformOperation.h:
* platform/graphics/transforms/PerspectiveTransformOperation.cpp:
(WebCore::PerspectiveTransformOperation::operator==):
(WebCore::PerspectiveTransformOperation::blend):
* platform/graphics/transforms/PerspectiveTransformOperation.h:
* platform/graphics/transforms/RotateTransformOperation.cpp:
(WebCore::RotateTransformOperation::operator==):
(WebCore::RotateTransformOperation::blend):
* platform/graphics/transforms/RotateTransformOperation.h:
* platform/graphics/transforms/ScaleTransformOperation.cpp:
(WebCore::ScaleTransformOperation::operator==):
(WebCore::ScaleTransformOperation::blend):
* platform/graphics/transforms/ScaleTransformOperation.h:
* platform/graphics/transforms/SkewTransformOperation.cpp:
(WebCore::SkewTransformOperation::operator==):
(WebCore::SkewTransformOperation::blend):
* platform/graphics/transforms/SkewTransformOperation.h:
* platform/graphics/transforms/TransformOperation.h:
* platform/graphics/transforms/TranslateTransformOperation.cpp:
(WebCore::TranslateTransformOperation::operator==):
(WebCore::TranslateTransformOperation::blend):
* platform/graphics/transforms/TranslateTransformOperation.h:
2014-10-15 Chris Dumez <cdumez@apple.com>
Use is<>() / downcast<>() for RenderTextControl / RenderTextControlSingleLine
https://bugs.webkit.org/show_bug.cgi?id=137727
Reviewed by Darin Adler.
Use is<>() / downcast<>() for RenderTextControl / RenderTextControlSingleLine.
No new tests, no behavior change.
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::selectedText):
(WebCore::AccessibilityRenderObject::selectedTextRange):
(WebCore::AccessibilityRenderObject::setSelectedTextRange):
(WebCore::AccessibilityRenderObject::visiblePositionForIndex):
(WebCore::AccessibilityRenderObject::indexForVisiblePosition):
* editing/TextIterator.cpp:
(WebCore::TextIterator::handleReplacedElement):
* html/TextFieldInputType.cpp:
(WebCore::TextFieldInputType::forwardEvent):
* html/shadow/TextControlInnerElements.cpp:
(WebCore::TextControlInnerElement::customStyleForRenderer):
* page/EventHandler.cpp:
(WebCore::EventHandler::capsLockStateMayHaveChanged):
* page/ios/FrameIOS.mm:
(WebCore::ancestorRespondingToScrollWheelEvents):
* rendering/RenderTextControl.h:
* rendering/RenderTextControlSingleLine.h:
* rendering/SimpleLineLayout.cpp:
(WebCore::SimpleLineLayout::canUseFor):
2014-10-15 Chris Dumez <cdumez@apple.com>
Use is<>() / downcast<>() for ClipPathOperation subclasses
https://bugs.webkit.org/show_bug.cgi?id=137733
Reviewed by Mihnea Ovidenie.
Use is<>() / downcast<>() for ClipPathOperation subclasses.
No new tests, no behavior change.
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::ComputedStyleExtractor::propertyValue):
* css/DeprecatedStyleBuilder.cpp:
(WebCore::ApplyPropertyClipPath::applyValue):
* rendering/ClipPathOperation.h:
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::nodeAtPoint):
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::setupClipPath):
* rendering/svg/SVGRenderingContext.cpp:
(WebCore::SVGRenderingContext::prepareToRenderSVGContent):
2014-10-15 Chris Dumez <cdumez@apple.com>
[Mac] Use CFDictionaryContainsKey() in ImageSource::isSizeAvailable()
https://bugs.webkit.org/show_bug.cgi?id=137723
Reviewed by Simon Fraser.
Use CFDictionaryContainsKey() in ImageSource::isSizeAvailable() instead
of CFDictionaryGetValue() as we are not actually interested in the
value.
No new tests, no behavior change.
* platform/graphics/cg/ImageSourceCG.cpp:
(WebCore::ImageSource::isSizeAvailable):
2014-10-15 Mihnea Ovidenie <mihnea@adobe.com>
Use modern loops in subtrees selection code
https://bugs.webkit.org/show_bug.cgi?id=137688
Reviewed by Andreas Kling.
No new tests as no change in functionality.
* rendering/RenderView.cpp:
(WebCore::RenderView::splitSelectionBetweenSubtrees):
(WebCore::RenderView::updateSelectionForSubtrees):
(WebCore::RenderView::clearSubtreeSelection):
(WebCore::RenderView::applySubtreeSelection):
* rendering/RenderView.h:
2014-10-14 Gyuyoung Kim <gyuyoung.kim@samsung.com>
Clean up unnecessary PassOwnPtr.h inclusion
https://bugs.webkit.org/show_bug.cgi?id=137726
Reviewed by Chris Dumez.
No new tests, no behavior changes.
* dom/Document.h: Remove PassOwnPtr.h inclusion.
* loader/ResourceBuffer.h: ditto.
* loader/cocoa/DiskCacheMonitorCocoa.mm: ditto.
* page/scrolling/AxisScrollSnapOffsets.h: ditto.
* page/scrolling/ScrollingStateScrollingNode.h: ditto.
* platform/ColorChooserClient.h: ditto.
* platform/ScrollableArea.cpp: ditto.
* platform/ScrollbarThemeClient.h: ditto.
* platform/SharedBuffer.cpp: ditto.
* platform/Supplementable.h: ditto.
* platform/graphics/surfaces/GraphicsSurface.h: ditto.
* platform/graphics/surfaces/GraphicsSurfaceToken.h: ditto.
* platform/graphics/win/WKCAImageQueue.cpp: ditto.
* platform/win/CursorWin.cpp: ditto.
2014-10-14 Chris Dumez <cdumez@apple.com>
Have offsetFromContainer() / offsetFromAncestorContainer() take a RenderElement&
https://bugs.webkit.org/show_bug.cgi?id=137728
Reviewed by Benjamin Poulain.
Have offsetFromContainer() / offsetFromAncestorContainer() take a RenderElement&
instead of a RenderObject*. The argument passed is never null and the type
should be a RenderElement as the argument is a container.
No new tests, no behavior change.
* editing/htmlediting.cpp:
(WebCore::localCaretRectInRendererForCaretPainting):
* page/GestureTapHighlighter.cpp:
* rendering/RenderBox.cpp:
(WebCore::RenderBox::mapLocalToContainer):
(WebCore::RenderBox::pushMappingToContainer):
(WebCore::RenderBox::offsetFromContainer):
(WebCore::RenderBox::computeRectForRepaint):
* rendering/RenderBox.h:
* rendering/RenderBoxModelObject.cpp:
(WebCore::RenderBoxModelObject::mapAbsoluteToLocalPoint):
* rendering/RenderInline.cpp:
(WebCore::RenderInline::computeRectForRepaint):
(WebCore::RenderInline::offsetFromContainer):
(WebCore::RenderInline::mapLocalToContainer):
(WebCore::RenderInline::pushMappingToContainer):
* rendering/RenderInline.h:
* rendering/RenderMultiColumnFlowThread.cpp:
(WebCore::RenderMultiColumnFlowThread::offsetFromContainer):
* rendering/RenderMultiColumnFlowThread.h:
* rendering/RenderNamedFlowFragment.cpp:
(WebCore::RenderNamedFlowFragment::offsetFromContainer):
* rendering/RenderNamedFlowFragment.h:
* rendering/RenderObject.cpp:
(WebCore::RenderObject::offsetFromContainer):
(WebCore::RenderObject::offsetFromAncestorContainer):
* rendering/RenderObject.h:
* rendering/RenderTableCell.cpp:
(WebCore::RenderTableCell::offsetFromContainer):
* rendering/RenderTableCell.h:
* rendering/RenderThemeMac.mm:
(WebCore::RenderThemeMac::convertToPaintingRect):
2014-10-14 Jer Noble <jer.noble@apple.com>
REGRESSION (r159208): Crash when clicking scrubber after navigating away/back to video
https://bugs.webkit.org/show_bug.cgi?id=137715
Reviewed by Darin Adler.
Simple null-check of m_player in refreshCachedTime.
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::refreshCachedTime):
2014-10-14 Chris Dumez <cdumez@apple.com>
[Mac] Fix inefficiencies in ResourceResponse::platformLazyInit(InitLevel)
https://bugs.webkit.org/show_bug.cgi?id=137721
Reviewed by Geoffrey Garen.
There were several inefficiencies with the Mac implementation of
ResourceResponse::platformLazyInit(InitLevel):
1. We end up initializing uncommon fields even if called with
'CommonFieldsOnly' initLevel.
2. If called with 'AllFields' initLevel (and if currently
uninitialized), we end up populating m_httpHeaderFields twice, once
with only the common headers, then a second time with ALL the
headers. We can skip the common-header case in this case to avoid
wasting CPU time.
This patch addresses both inefficiencies and cleans up the code a
little bit to reduce variable scope and to use fast enumeration of
header names.
As a result, we spend almost twice as little time in platformLazyInit()
when loading msn.com (~30ms -> ~18ms).
No new tests, no behavior change.
* platform/network/mac/ResourceResponseMac.mm:
(WebCore::ResourceResponse::platformLazyInit):
2014-10-14 Zalan Bujtas <zalan@apple.com>
REGRESSION (Safari 7.1/8.0): Border-radius and overflow hidden renders incorrectly.
https://bugs.webkit.org/show_bug.cgi?id=137205
Reviewed by Simon Fraser.
Child layer should not reset radius clipping behaviour.
Test: fast/layers/parent-clipping-overflow-is-overwritten-by-child-clipping.html
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::calculateClipRects):
2014-10-14 Chris Dumez <cdumez@apple.com>
Use is<>() / downcast<>() for PlatformCAAnimation subclasses
https://bugs.webkit.org/show_bug.cgi?id=137722
Reviewed by Simon Fraser.
Use is<>() / downcast<>() for PlatformCAAnimation subclasses and clean
up the surrounding code.
No new tests, no behavior change.
* page/mac/ServicesOverlayController.mm:
(WebCore::ServicesOverlayController::Highlight::fadeIn):
(WebCore::ServicesOverlayController::Highlight::fadeOut):
* platform/graphics/ca/GraphicsLayerCA.cpp:
(WebCore::GraphicsLayerCA::moveOrCopyLayerAnimation):
(WebCore::GraphicsLayerCA::updateAnimations):
(WebCore::GraphicsLayerCA::setAnimationOnLayer):
(WebCore::GraphicsLayerCA::pauseCAAnimationOnLayer):
* platform/graphics/ca/GraphicsLayerCA.h:
* platform/graphics/ca/PlatformCAAnimation.h:
* platform/graphics/ca/PlatformCALayer.h:
* platform/graphics/ca/mac/PlatformCAAnimationMac.h:
* platform/graphics/ca/mac/PlatformCAAnimationMac.mm:
(PlatformCAAnimationMac::copy):
(PlatformCAAnimationMac::copyTimingFunctionFrom):
(PlatformCAAnimationMac::copyFromValueFrom):
(PlatformCAAnimationMac::copyToValueFrom):
(PlatformCAAnimationMac::copyValuesFrom):
(PlatformCAAnimationMac::copyKeyTimesFrom):
(PlatformCAAnimationMac::copyTimingFunctionsFrom):
* platform/graphics/ca/mac/PlatformCALayerMac.h:
* platform/graphics/ca/mac/PlatformCALayerMac.mm:
(PlatformCALayerMac::addAnimationForKey):
* platform/graphics/ca/win/PlatformCAAnimationWin.cpp:
(PlatformCAAnimationWin::copy):
(PlatformCAAnimationWin::copyTimingFunctionFrom):
(PlatformCAAnimationWin::copyFromValueFrom):
(PlatformCAAnimationWin::copyToValueFrom):
(PlatformCAAnimationWin::copyValuesFrom):
(PlatformCAAnimationWin::copyKeyTimesFrom):
(PlatformCAAnimationWin::copyTimingFunctionsFrom):
* platform/graphics/ca/win/PlatformCAAnimationWin.h:
* platform/graphics/ca/win/PlatformCALayerWin.cpp:
(PlatformCALayerWin::addAnimationForKey):
* platform/graphics/ca/win/PlatformCALayerWin.h:
2014-10-14 Chris Dumez <cdumez@apple.com>
Use is<>() / downcast<>() for RenderInline
https://bugs.webkit.org/show_bug.cgi?id=137704
Reviewed by Darin Adler.
Use is<>() / downcast<>() for RenderInline and clean up the surrounding
code.
No new tests, no behavior change.
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::firstChildInContinuation):
* editing/SimplifyMarkupCommand.cpp:
(WebCore::SimplifyMarkupCommand::doApply):
* inspector/InspectorOverlay.cpp:
(WebCore::buildRendererHighlight):
* page/FrameView.cpp:
(WebCore::FrameView::paintContents):
* rendering/InlineFlowBox.cpp:
(WebCore::InlineFlowBox::removeLineBoxFromRenderObject):
(WebCore::InlineFlowBox::extractLineBoxFromRenderObject):
(WebCore::InlineFlowBox::attachLineBoxToRenderObject):
(WebCore::InlineFlowBox::determineSpacingForFlowBoxes):
(WebCore::InlineFlowBox::nodeAtPoint):
(WebCore::InlineFlowBox::paint):
* rendering/InlineIterator.h:
(WebCore::bidiFirstSkippingEmptyInlines):
* rendering/LayoutState.cpp:
(WebCore::LayoutState::LayoutState):
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::willBeDestroyed):
(WebCore::RenderBlock::paintObject):
(WebCore::RenderBlock::inlineElementContinuation):
(WebCore::RenderBlock::addFocusRingRects):
* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::willBeDestroyed):
(WebCore::RenderBlockFlow::computeInlinePreferredLogicalWidths):
* rendering/RenderBlockFlow.h:
* rendering/RenderBlockLineLayout.cpp:
(WebCore::constructBidiRunsForSegment):
(WebCore::RenderBlockFlow::layoutLineBoxes):
* rendering/RenderBox.cpp:
(WebCore::RenderBox::offsetFromContainer):
(WebCore::RenderBox::computeRectForRepaint):
(WebCore::RenderBox::containingBlockLogicalWidthForPositioned):
(WebCore::RenderBox::containingBlockLogicalHeightForPositioned):
(WebCore::RenderBox::computePositionedLogicalWidthUsing):
(WebCore::RenderBox::computePositionedLogicalWidthReplaced):
(WebCore::RenderBox::layoutOverflowRectForPropagation):
* rendering/RenderBoxModelObject.cpp:
(WebCore::accumulateInFlowPositionOffsets):
* rendering/RenderElement.cpp:
(WebCore::RenderElement::willBeRemovedFromTree):
* rendering/RenderElement.h:
(WebCore::RenderElement::dirtyLinesFromChangedChild):
* rendering/RenderFlowThread.cpp:
(WebCore::RenderFlowThread::addRegionsOverflowFromChild):
* rendering/RenderInline.cpp:
(WebCore::RenderInline::willBeDestroyed):
(WebCore::RenderInline::updateAlwaysCreateLineBoxes):
(WebCore::RenderInline::clippedOverflowRectForRepaint):
* rendering/RenderInline.h:
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::updateLayerPosition):
(WebCore::RenderLayer::calculateClipRects):
* rendering/RenderLineBoxList.cpp:
(WebCore::RenderLineBoxList::dirtyLinesFromChangedChild):
* rendering/RenderLineBoxList.h:
* rendering/RenderNamedFlowThread.cpp:
(WebCore::RenderNamedFlowThread::decorationsClipRectForBoxInNamedFlowFragment):
* rendering/RenderObject.cpp:
(WebCore::RenderObject::insertedIntoTree):
* rendering/RenderRegion.cpp:
(WebCore::RenderRegion::overflowRectForFlowThreadPortion):
(WebCore::RenderRegion::visualOverflowRectForBox):
(WebCore::RenderRegion::visualOverflowRectForBoxForPropagation):
* rendering/RenderRegion.h:
* rendering/RenderReplaced.cpp:
(WebCore::RenderReplaced::willBeDestroyed):
* rendering/RenderTextLineBoxes.cpp:
(WebCore::RenderTextLineBoxes::removeAllFromParent):
(WebCore::RenderTextLineBoxes::dirtyRange):
* rendering/line/BreakingContextInlineHeaders.h:
(WebCore::inlineLogicalWidth):
(WebCore::BreakingContext::handleEmptyInline):
* rendering/line/LineInlineHeaders.h:
(WebCore::requiresLineBox):
(WebCore::setStaticPositions):
* rendering/svg/SVGInlineTextBox.cpp:
(WebCore::SVGInlineTextBox::paint):
2014-10-14 Brent Fulgham <bfulgham@apple.com>
[Win] Unreviewed build fix after r174710.
* platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
(WebCore::MediaPlayerPrivateAVFoundationCF::createSession):
2014-10-14 Dan Bernstein <mitz@apple.com>
URLs that start with http:/// and https:/// lose two slashes when parsed, causing assertion failure and inconsistent behavior
https://bugs.webkit.org/show_bug.cgi?id=137718
Reviewed by Alexey Proskuryakov.
Added cases to fast/loader/url-parse-1.html.
* platform/URL.cpp:
(WebCore::URL::parse): In hierarchical schemes other than file:, ignore any additional
slashes after the ://, as prescribed by the authority-ignore-slashes state in the current
URL spec.
2014-10-14 Brent Fulgham <bfulgham@apple.com>
[Win] Unreviewed build fix after r174698 and r174709.
* platform/graphics/avfoundation/cf/CDMSessionAVFoundationCF.cpp:
* platform/graphics/avfoundation/cf/CDMSessionAVFoundationCF.h:
* platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
(WebCore::MediaPlayerPrivateAVFoundationCF::supportsKeySystem):
(WebCore::AVFWrapper::shouldWaitForLoadingOfResource):
* platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.h:
2014-10-14 Brent Fulgham <bfulgham@apple.com>
[Win] Unreviewed build fix after r174698
* platform/graphics/avfoundation/cf/CDMSessionAVFoundationCF.cpp:
* platform/graphics/avfoundation/cf/CDMSessionAVFoundationCF.h:
* platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
(WebCore::MediaPlayerPrivateAVFoundationCF::createSession):
2014-10-14 Myles C. Maxfield <mmaxfield@apple.com>
Improve debug description of WAKViews
https://bugs.webkit.org/show_bug.cgi?id=137716
Reviewed by Simon Fraser.
No new tests because there is no behavior change.
* platform/ios/wak/WAKView.mm:
(-[WAKView description]):
* platform/ios/wak/WKView.h:
* platform/ios/wak/WKView.mm:
(WKViewGetOrigin):
2014-10-14 Chris Dumez <cdumez@apple.com>
Introduce an isCSSAnimated flag on RenderElement for performance
https://bugs.webkit.org/show_bug.cgi?id=137583
Reviewed by Simon Fraser.
I noticed when profiling the ebay.com page load that isRunningAnimationOnRenderer()
and isRunningAcceleratedAnimationOnRenderer() were called frequently, causing
~4.7 millions m_compositeAnimations HashMap lookups.
This patch introduces an isCSSAnimated flag on RenderElement to return early if
there is no animation on the renderer, thus avoiding HashMap lookups. This reduces
the number of HashMap lookups from ~4.7 millions to ~68k. On my machine, I see
the following performance improvements:
- isRunning*AnimationOnRenderer() / computeCompositingRequirements()
- before: ~45ms / ~90ms
- after: ~4ms / ~30ms
No new tests, no behavior change.
* page/animation/AnimationController.cpp:
(WebCore::AnimationControllerPrivate::ensureCompositeAnimation):
(WebCore::AnimationControllerPrivate::clear):
(WebCore::AnimationControllerPrivate::isRunningAnimationOnRenderer):
(WebCore::AnimationControllerPrivate::isRunningAcceleratedAnimationOnRenderer):
(WebCore::AnimationController::isRunningAnimationOnRenderer):
(WebCore::AnimationController::isRunningAcceleratedAnimationOnRenderer):
* rendering/RenderElement.cpp:
(WebCore::RenderElement::RenderElement):
* rendering/RenderElement.h:
(WebCore::RenderElement::isCSSAnimating):
(WebCore::RenderElement::setIsCSSAnimating):
2014-10-14 Dean Jackson <dino@apple.com>
Crash in WebCore::UserGestureIndicator::processingUserGesture with WebWorkers
https://bugs.webkit.org/show_bug.cgi?id=137676
<rdar://problem/15735049>
Reviewed by Alexey Proskuryakov.
Remove the code I added that tracks the timestamp of the most recent
user gesture from the event handling dispatch, as it was both
a silly place to do it and it originally crashed when events were fired from
Worker threads (although this was fixed in r152238).
It's now recorded by going through UserGestureIndicator, which is good because
it knows when a user has triggered an event. Its constructor now takes
a pointer to Document, and updates the timestamp there if necessary.
Not all UserGestureIndicator instances needed to reset the timestamp; Those did
not have to pass along the Document.
This is untestable due to the fix mentioned above.
* WebCore.exp.in: Change constructor signature.
* accessibility/AccessibilityNodeObject.cpp: Pass a pointer to the Document into the UserGestureIndicator.
(WebCore::AccessibilityNodeObject::increment):
(WebCore::AccessibilityNodeObject::decrement):
* accessibility/AccessibilityObject.cpp: Ditto.
(WebCore::AccessibilityObject::press):
* dom/Document.cpp:
(WebCore::Document::updateLastHandledUserGestureTimestamp): Renamed.
* dom/Document.h:
* dom/EventTarget.cpp: Remove the code to update the timestamp.
(WebCore::EventTarget::fireEventListeners):
* dom/UserGestureIndicator.cpp:
(WebCore::UserGestureIndicator::UserGestureIndicator): If there is a Document and
this is a user gesture, then reset the timestamp.
* dom/UserGestureIndicator.h:
* page/EventHandler.cpp: Pass a pointer to the Document.
(WebCore::EventHandler::handleMousePressEvent):
(WebCore::EventHandler::handleMouseDoubleClickEvent):
(WebCore::EventHandler::handleMouseReleaseEvent):
(WebCore::EventHandler::keyEvent):
(WebCore::EventHandler::handleTouchEvent):
* rendering/HitTestResult.cpp: Ditto.
(WebCore::HitTestResult::toggleMediaFullscreenState):
(WebCore::HitTestResult::enterFullscreenForVideo):
2014-10-14 Brent Fulgham <bfulgham@apple.com>
[Win] Unreviewed gardening. Ignore Visual Studio *.sdf files.
* WebCore.vcxproj: Modified property svn:ignore.
2014-10-14 Brent Fulgham <bfulgham@apple.com>
[Win] Enable Encrypted Media Support
https://bugs.webkit.org/show_bug.cgi?id=137710
<rdar://problem/18652699>
Reviewed by Jer Noble.
This feature is covered by existing media tests.
* platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
(WebCore::destroyAVFWrapper): Remove redundant ASSERT.
* platform/graphics/ca/win/PlatformCALayerWinInternal.cpp:
(displayOnMainThreadContext::displayOnMainThreadContext): Added.
(redispatchOnMainQueue): Added.
(PlatformCALayerWinInternal::displayCallback): Check if a display
call is happening on a background queue, and re-dispatch on the
main thread if necessary.
2014-10-14 Chris Dumez <cdumez@apple.com>
[Mac] Avoid unnecessary dictionary lookup in ImageSource::isSizeAvailable()
https://bugs.webkit.org/show_bug.cgi?id=137701
Reviewed by Simon Fraser.
The CG implementation of ImageSource::isSizeAvailable() was looking up
both the width and the height keys in the dictionary before determining
if the size is available. We can abort early and return false if the
first key (the width) is missing, thus avoiding an extra dictionary
lookup in this case.
This is a small win but ImageSource::isSizeAvailable() is called quite
frequently during page loads
No new tests, no behavior change.
* platform/graphics/cg/ImageSourceCG.cpp:
(WebCore::ImageSource::isSizeAvailable):
2014-10-14 Myles C. Maxfield <mmaxfield@apple.com>
Remove unnecessary logging from SimpleFontData
https://bugs.webkit.org/show_bug.cgi?id=137699
Reviewed by Andreas Kling.
Because of web fonts, fonts that don't have a glyph page 0 are common and expected. Printing out a
message is not helpful, especially if you're not dealing with a font-related piece of WebKit.
No new tests because there is no behavior change.
* platform/graphics/SimpleFontData.cpp:
(WebCore::SimpleFontData::platformGlyphInit):
2014-10-14 Martin Hock <mhock@apple.com>
Update ViewportConfiguration whenever its size attributes change
https://bugs.webkit.org/show_bug.cgi?id=137682
rdar://problem/18643655
Reviewed by Benjamin Poulain.
* page/ViewportConfiguration.cpp:
(WebCore::ViewportConfiguration::setMinimumLayoutSize):
(WebCore::ViewportConfiguration::setMinimumLayoutSizeForMinimalUI):
2014-10-14 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Processing Instruction Nodes appear poorly in DOM Tree
https://bugs.webkit.org/show_bug.cgi?id=137681
Reviewed by Timothy Hatcher.
* inspector/InspectorDOMAgent.cpp:
(WebCore::InspectorDOMAgent::buildObjectForNode):
Include the nodeName, localName, and nodeValue (string data)
properties for processing instruction nodes.
2014-10-14 Chris Dumez <cdumez@apple.com>
Use is<>() / downcast<>() for RenderFrame / RenderFrameSet
https://bugs.webkit.org/show_bug.cgi?id=137696
Reviewed by Darin Adler.
Use is<>() / downcast<>() for RenderFrame / RenderFrameSet.
No new tests, no behavior change.
* html/HTMLFrameSetElement.cpp:
(WebCore::HTMLFrameSetElement::defaultEventHandler):
* rendering/RenderFrame.cpp:
(WebCore::RenderFrame::updateFromElement):
* rendering/RenderFrame.h:
* rendering/RenderFrameSet.cpp:
(WebCore::RenderFrameSet::computeEdgeInfo):
(WebCore::RenderFrameSet::positionFramesWithFlattening):
* rendering/RenderFrameSet.h:
2014-10-14 Youenn Fablet <youennf@gmail.com>
[XHR] Abort method execution when m_loader->cancel() in internalAbort() caused reentry
https://bugs.webkit.org/show_bug.cgi?id=126975
Reviewed by Alexey Proskuryakov.
Merging https://chromium.googlesource.com/chromium/blink/+/0d75daf2053631518606ae15daaece701a25b2c4
Ensuring new test from https://codereview.chromium.org/76133002/ is passing.
Test: http/tests/xmlhttprequest/reentrant-cancel-abort.html
* xml/XMLHttpRequest.cpp:
(WebCore::XMLHttpRequest::open): exit early if internalAbort asks so
(WebCore::XMLHttpRequest::abort): exit early if internalAbort asks so
(WebCore::XMLHttpRequest::internalAbort): ask calling function to exit early if a new loader is created during the cancellation of the loader (potential reentrant case through window.onload callback)
(WebCore::XMLHttpRequest::didTimeout): exit early if internalAbort asks so
* xml/XMLHttpRequest.h:
2014-10-14 Alejandro G. Castro <alex@igalia.com>
Multiple refactors in RenderMathMLOperator
https://bugs.webkit.org/show_bug.cgi?id=137611
Reviewed by Darin Adler.
The changes include:
- Rename m_operator to m_textContent.
- Make most of the functions private, we needed to create some
public member functions to be able to make the some funtions private
and move trailingSpaceError to RenderMathMLOperator.
- Fix incorrect capitalization of setOperatorProperties function.
- Make all data members private and move them to the end of the
class defition.
No new tests as no change in functionality.
* rendering/mathml/RenderMathMLOperator.cpp:
(WebCore::RenderMathMLOperator::RenderMathMLOperator):
(WebCore::RenderMathMLOperator::setOperatorProperties): Renamed,
incorrect capitalization
(WebCore::RenderMathMLOperator::stretchTo):
(WebCore::RenderMathMLOperator::computePreferredLogicalWidths):
(WebCore::RenderMathMLOperator::rebuildTokenContent):
(WebCore::RenderMathMLOperator::updateFromElement):
(WebCore::RenderMathMLOperator::updateOperatorProperties):
(WebCore::RenderMathMLOperator::shouldAllowStretching):
(WebCore::RenderMathMLOperator::updateStyle):
(WebCore::RenderMathMLOperator::trailingSpaceError):
(WebCore::RenderMathMLOperator::SetOperatorProperties): Deleted.
(WebCore::RenderMathMLOperator::advanceForGlyph): Deleted.
(WebCore::RenderMathMLOperator::updateTokenContent): Deleted.
(WebCore::RenderMathMLOperator::getGlyphAssemblyFallBack): Deleted.
* rendering/mathml/RenderMathMLOperator.h:
(WebCore::RenderMathMLOperator::setLeadingSpace): Added.
(WebCore::RenderMathMLOperator::setTrailingSpace): Added.
(WebCore::RenderMathMLOperator::textContent): Added.
(WebCore::RenderMathMLOperator::isInvisibleOperator):
* rendering/mathml/RenderMathMLRadicalOperator.cpp:
(WebCore::RenderMathMLRadicalOperator::setOperatorProperties):
Renamed, incorrect capitalization
(WebCore::RenderMathMLRadicalOperator::SetOperatorProperties): Deleted.
(WebCore::RenderMathMLRadicalOperator::trailingSpaceError): Deleted.
* rendering/mathml/RenderMathMLRadicalOperator.h:
2014-10-14 Alejandro G. Castro <alex@igalia.com>
Changes in the stretchy attribute do not update rendering
https://bugs.webkit.org/show_bug.cgi?id=136883
Reviewed by Darin Adler.
Test: mathml/presentation/mo-stretch-update.html
We need to relayout when a change in the stretchy attribute
happens.
* mathml/MathMLTextElement.cpp:
(WebCore::MathMLTextElement::parseAttribute): Parse the
modifications of the stretchy attribute.
* mathml/MathMLTextElement.h:
* rendering/mathml/RenderMathMLOperator.cpp:
(WebCore::RenderMathMLOperator::setOperatorFlagAndScheduleLayoutIfNeeded):
Add function that receives the value instead of looking for it and
checks if the change should schedule a layout.
(WebCore::RenderMathMLOperator::setOperatorFlagFromAttribute):
(WebCore::RenderMathMLOperator::setOperatorFlagFromAttributeValue):
Add function that receives the value instead of looking for it.
* rendering/mathml/RenderMathMLOperator.h:
2014-10-14 Chris Dumez <cdumez@apple.com>
Use is<>() / downcast<>() for RenderImage
https://bugs.webkit.org/show_bug.cgi?id=137683
Reviewed by Mihnea Ovidenie.
Use is<>() / downcast<>() for RenderImage.
No new tests, no behavior change.
* accessibility/AccessibilityNodeObject.cpp:
(WebCore::AccessibilityNodeObject::alternativeText):
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::addImageMapChildren):
(WebCore::AccessibilityRenderObject::remoteSVGRootElement):
* bindings/objc/DOM.mm:
(-[DOMElement image]):
(-[DOMElement _imageTIFFRepresentation]):
* editing/TextIterator.cpp:
(WebCore::TextIterator::handleReplacedElement):
* editing/cocoa/HTMLConverter.mm:
(fileWrapperForElement):
* editing/gtk/EditorGtk.cpp:
(WebCore::getImageForElement):
* editing/ios/EditorIOS.mm:
(WebCore::getImage):
* editing/mac/EditorMac.mm:
(WebCore::getImage):
* html/HTMLAnchorElement.cpp:
(WebCore::appendServerMapMousePosition):
* html/HTMLAreaElement.cpp:
(WebCore::HTMLAreaElement::setFocus):
* html/HTMLImageElement.cpp:
(WebCore::HTMLImageElement::setBestFitURLAndDPRFromImageCandidate):
(WebCore::HTMLImageElement::parseAttribute):
(WebCore::HTMLImageElement::didAttachRenderers):
(WebCore::HTMLImageElement::createImageControls):
(WebCore::HTMLImageElement::destroyImageControls):
* html/HTMLVideoElement.cpp:
(WebCore::HTMLVideoElement::didAttachRenderers):
(WebCore::HTMLVideoElement::parseAttribute):
* html/ImageInputType.cpp:
(WebCore::ImageInputType::altAttributeChanged):
(WebCore::ImageInputType::attach):
* html/canvas/CanvasRenderingContext2D.cpp:
(WebCore::size):
* html/shadow/mac/ImageControlsRootElementMac.cpp:
(WebCore::RenderImageControls::updateLogicalWidth):
(WebCore::RenderImageControls::computeLogicalHeight):
* loader/ImageLoader.cpp:
(WebCore::ImageLoader::renderImageResource):
* page/ContextMenuController.cpp:
(WebCore::imageFromImageElementNode):
* page/DragController.cpp:
(WebCore::getCachedImage):
(WebCore::getImage):
* platform/win/PasteboardWin.cpp:
(WebCore::Pasteboard::writeImage):
(WebCore::getCachedImage):
* rendering/HitTestResult.cpp:
(WebCore::HitTestResult::image):
* rendering/RenderImage.h:
* rendering/RenderImageResource.cpp:
(WebCore::RenderImageResource::getImageSize):
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::isDirectlyCompositedImage):
(WebCore::RenderLayerBacking::updateImageContents):
* rendering/RenderReplaced.cpp:
(WebCore::RenderReplaced::computeAspectRatioInformationForRenderBox):
* rendering/shapes/ShapeOutsideInfo.cpp:
(WebCore::ShapeOutsideInfo::createShapeForImage):
2014-10-14 Andrzej Badowski <a.badowski@samsung.com>
[AX] Improve AccessibilityTableCell columnHeaders and rowHeaders functions.
https://bugs.webkit.org/show_bug.cgi?id=136818
Reviewed by Chris Fleizach.
Take into account that <th> elements can be both the column headers and row headers
improved the operation of two functions: columnHeaders and rowHeaders.
Test: accessibility/table-headers.html
* accessibility/AccessibilityTableCell.cpp:
(WebCore::AccessibilityTableCell::isColumnHeaderCell):
A new function that helps the main goal.
(WebCore::AccessibilityTableCell::isRowHeaderCell):
A new function that helps the main goal.
(WebCore::AccessibilityTableCell::columnHeaders):
Use isColumnHeaderCell instead of isTableHeaderCell.
(WebCore::AccessibilityTableCell::rowHeaders):
Use isRowHeaderCell also includes <th> row header element next to the scope attribute.
* accessibility/AccessibilityTableCell.h:
Adds new functions to the header file.
2014-10-14 Csaba Osztrogonác <ossy@webkit.org>
Fix the !ENABLE(VIDEO) build after r174353
https://bugs.webkit.org/show_bug.cgi?id=137655
Reviewed by Darin Adler.
* dom/Document.cpp:
* dom/Document.h:
* page/Page.cpp:
* page/Page.h:
2014-10-14 peavo@outlook.com <peavo@outlook.com>
[Curl] Compile error in CurlDownload.cpp.
https://bugs.webkit.org/show_bug.cgi?id=137654
Reviewed by Philippe Normand.
A template specialization is not needed anymore.
* platform/network/curl/CurlDownload.cpp:
2014-10-13 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Remove unused stale Page protocol methods
https://bugs.webkit.org/show_bug.cgi?id=137678
Reviewed by Andreas Kling.
* inspector/InspectorClient.h:
(WebCore::InspectorClient::canShowDebugBorders): Deleted.
(WebCore::InspectorClient::setShowDebugBorders): Deleted.
(WebCore::InspectorClient::canShowFPSCounter): Deleted.
(WebCore::InspectorClient::setShowFPSCounter): Deleted.
(WebCore::InspectorClient::canContinuouslyPaint): Deleted.
(WebCore::InspectorClient::setContinuousPaintingEnabled): Deleted.
* inspector/InspectorPageAgent.cpp:
(WebCore::InspectorPageAgent::disable):
(WebCore::InspectorPageAgent::canShowDebugBorders): Deleted.
(WebCore::InspectorPageAgent::setShowDebugBorders): Deleted.
(WebCore::InspectorPageAgent::canShowFPSCounter): Deleted.
(WebCore::InspectorPageAgent::setShowFPSCounter): Deleted.
(WebCore::InspectorPageAgent::canContinuouslyPaint): Deleted.
(WebCore::InspectorPageAgent::setContinuousPaintingEnabled): Deleted.
* inspector/InspectorPageAgent.h:
* inspector/protocol/Page.json:
2014-10-13 Eric Carlson <eric.carlson@apple.com>
[iOS] Refactor AirPlay monitoring code
https://bugs.webkit.org/show_bug.cgi?id=137645
<rdar://problem/18444817>
Reviewed by Jer Noble.
Refactor AirPlay route change monitoring code:
+ Have MediaSessionManager register/unregister for route changes depending on the state of
all sessions so it does the right thing when there is more than one media element.
+ Make HTMLMediaElement unregister with MediaSession as soon as the media player is cleared
because there can be no wireless playback without a player.
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::~HTMLMediaElement): Call mediaSession->setHasPlaybackTargetAvailabilityListeners
when there are target availability changed listeners.
(WebCore::HTMLMediaElement::clearMediaPlayer): Ditto.
(WebCore::HTMLMediaElement::wirelessRoutesAvailableDidChange): New, media session client method.
* html/HTMLMediaElement.h:
* html/HTMLMediaSession.cpp:
(WebCore::HTMLMediaSession::HTMLMediaSession): Initialize m_hasPlaybackTargetAvailabilityListeners.
(WebCore::HTMLMediaSession::setHasPlaybackTargetAvailabilityListeners): Remember whether or not
the client has a target availability listener and tell the media session manager to reconfigure
itself instead of telling it to start or stop listening for route changes so it does the
right thing when there is more than one media element.
* html/HTMLMediaSession.h:
(WebCore::HTMLMediaSession::requiresPlaybackTargetRouteMonitoring): Return true when the client
has a target availability listener, false otherwise.
* platform/audio/MediaSession.cpp:
(WebCore::MediaSession::wirelessRoutesAvailableDidChange): Inform the client that routes have changed.
* platform/audio/MediaSession.h:
(WebCore::MediaSession::requiresPlaybackTargetRouteMonitoring):
(WebCore::MediaSessionClient::wirelessRoutesAvailableDidChange):
* platform/audio/MediaSessionManager.cpp:
(WebCore::MediaSessionManager::wirelessRoutesAvailableChanged): Implement it.
* platform/audio/MediaSessionManager.h:
(WebCore::MediaSessionManager::configureWireLessTargetMonitoring):
(WebCore::MediaSessionManager::hasWirelessTargetsAvailable):
(WebCore::MediaSessionManager::sessions):
(WebCore::MediaSessionManager::startMonitoringAirPlayRoutes): Deleted.
(WebCore::MediaSessionManager::stopMonitoringAirPlayRoutes): Deleted.
* platform/audio/ios/MediaSessionManagerIOS.h:
* platform/audio/ios/MediaSessionManagerIOS.mm:
(WebCore::MediaSessionManageriOS::configureWireLessTargetMonitoring): Start or stop monitoring
for route changes depending on client state.
(WebCore::MediaSessionManageriOS::startMonitoringAirPlayRoutes): Deleted.
(WebCore::MediaSessionManageriOS::stopMonitoringAirPlayRoutes): Deleted.
2014-10-13 Chris Dumez <cdumez@apple.com>
[Mac] Return value of createImageSourceOptions() is leaked in ImageSourceCG
https://bugs.webkit.org/show_bug.cgi?id=137677
Reviewed by Simon Fraser.
The return value of createImageSourceOptions() was leaked in
ImageSourceCG.cpp. It was returning a CFDictionaryRef created using
CFDictionaryCreate(). Therefore, the return value should have been
released but wasn't.
This patch makes createImageSourceOptions() return a
RetainPtr<CFDictionaryRef> to make sure the CFDictionaryRef properly
gets released after use.
No new tests, no behavior change.
* platform/graphics/cg/ImageSourceCG.cpp:
(WebCore::createImageSourceOptions):
(WebCore::imageSourceOptions):
(WebCore::ImageSource::isSizeAvailable):
(WebCore::ImageSource::allowSubsamplingOfFrameAtIndex):
(WebCore::ImageSource::frameSizeAtIndex):
(WebCore::ImageSource::orientationAtIndex):
(WebCore::ImageSource::getHotSpot):
(WebCore::ImageSource::repetitionCount):
(WebCore::ImageSource::createFrameAtIndex):
(WebCore::ImageSource::frameDurationAtIndex):
2014-10-13 Yusuke Suzuki <utatane.tea@gmail.com>
CSS JIT: Implement :visited pseudo class
https://bugs.webkit.org/show_bug.cgi?id=135293
Reviewed by Benjamin Poulain.
This patch implements CSS JIT for :visited. And it makes :not(:link) JIT-ed.
Following the design discussed at the other bug[1], implemented :visited JIT
without tracking VisitedMatchEnabled state.
In this patch, we change the semantics of :visited / :link
inside functional pseudo classes for further CSS Selector Level 4 extensions.
Edge cases are tested by the existing tests.
:not(:link)
fast/history/link-inside-not.html
:not(:visited)
fast/history/visited-inside-not.html
:-webkit-any(:link)
fast/history/link-inside-any.html
:-webkit-any(:visited)
fast/history/visited-inside-any.html
[1]: https://bugs.webkit.org/show_bug.cgi?id=135639
Test: fast/history/link-inside-not-inside-any.html
To cover the :-webkit-any(:not(:link)), added new tests.
* css/SelectorChecker.cpp:
(WebCore::SelectorChecker::checkOne):
* cssjit/SelectorCompiler.cpp:
(WebCore::SelectorCompiler::addPseudoClassType):
(WebCore::SelectorCompiler::SelectorCodeGenerator::SelectorCodeGenerator):
(WebCore::SelectorCompiler::constructFragments):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateSelectorChecker):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateSelectorCheckerExcludingPseudoElements):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateRightmostTreeWalker):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementMatching):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementLinkMatching):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsFirstLink):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateStoreLastVisitedElement):
2014-10-13 Chris Dumez <cdumez@apple.com>
Use modern loops in RenderLayerCompositor
https://bugs.webkit.org/show_bug.cgi?id=137670
Reviewed by Simon Fraser.
Use modern range for-loops in RenderLayerCompositor.
No new tests, no behavior change.
* rendering/RenderLayerCompositor.cpp:
(WebCore::OverlapMapContainer::overlapsLayers):
(WebCore::RenderLayerCompositor::OverlapMap::RectList::intersects):
(WebCore::RenderLayerCompositor::updateScrollCoordinatedLayersAfterFlush):
(WebCore::RenderLayerCompositor::updateCustomLayersAfterFlush):
(WebCore::RenderLayerCompositor::addToOverlapMapRecursive):
(WebCore::RenderLayerCompositor::computeCompositingRequirementsForNamedFlowFixed):
(WebCore::RenderLayerCompositor::computeCompositingRequirements):
(WebCore::RenderLayerCompositor::computeRegionCompositingRequirements):
(WebCore::RenderLayerCompositor::rebuildCompositingLayerTreeForNamedFlowFixed):
(WebCore::RenderLayerCompositor::rebuildCompositingLayerTree):
(WebCore::RenderLayerCompositor::rebuildRegionCompositingLayerTree):
(WebCore::RenderLayerCompositor::updateLayerTreeGeometry):
(WebCore::RenderLayerCompositor::updateCompositingDescendantGeometry):
(WebCore::RenderLayerCompositor::recursiveRepaintLayer):
(WebCore::resetTrackedRepaintRectsRecursive):
(WebCore::RenderLayerCompositor::layerHas3DContent):
(WebCore::RenderLayerCompositor::registerAllViewportConstrainedLayers):
(WebCore::RenderLayerCompositor::registerAllScrollingLayers):
(WebCore::RenderLayerCompositor::unregisterAllScrollingLayers):
2014-10-13 Chris Dumez <cdumez@apple.com>
Drop unnecessary overlapMap null checks in computeCompositingRequirements()
https://bugs.webkit.org/show_bug.cgi?id=137668
Reviewed by Andreas Kling.
Drop unnecessary overlapMap null checks in computeCompositingRequirements().
The function is never called with a null overlapMap so we can make the
argument a reference and drop all the null checks.
No new tests, no behavior change.
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::updateCompositingLayers):
(WebCore::RenderLayerCompositor::computeCompositingRequirementsForNamedFlowFixed):
(WebCore::RenderLayerCompositor::computeCompositingRequirements):
(WebCore::RenderLayerCompositor::computeRegionCompositingRequirements):
* rendering/RenderLayerCompositor.h:
2014-10-13 Chris Dumez <cdumez@apple.com>
Use is<>() / downcast<>() for PlatformCALayer subclasses
https://bugs.webkit.org/show_bug.cgi?id=137661
Reviewed by Simon Fraser.
Use is<>() / downcast<>() for PlatformCALayer subclasses and clean up
the surrounding code.
No new tests, no behavior change.
* platform/graphics/ca/GraphicsLayerCA.cpp:
(WebCore::GraphicsLayerCA::ensureStructuralLayer):
(WebCore::GraphicsLayerCA::updateContentsRects):
(WebCore::GraphicsLayerCA::updateReplicatedLayers):
(WebCore::GraphicsLayerCA::swapFromOrToTiledLayer):
(WebCore::GraphicsLayerCA::fetchCloneLayers): Deleted.
* platform/graphics/ca/PlatformCALayer.h:
* platform/graphics/ca/TileCoverageMap.cpp:
(WebCore::TileCoverageMap::TileCoverageMap):
* platform/graphics/ca/TileGrid.cpp:
(WebCore::TileGrid::ensureTilesForRect):
* platform/graphics/ca/mac/PlatformCALayerMac.h:
* platform/graphics/ca/mac/PlatformCALayerMac.mm:
(PlatformCALayerMac::clone):
(PlatformCALayerMac::appendSublayer):
(PlatformCALayerMac::insertSublayer):
(PlatformCALayerMac::replaceSublayer):
(PlatformCALayerMac::adoptSublayers):
(PlatformCALayerMac::copyFiltersFrom):
* platform/graphics/ca/win/CACFLayerTreeHost.cpp:
(WebCore::CACFLayerTreeHost::setRootChildLayer):
* platform/graphics/ca/win/PlatformCALayerWin.cpp:
(PlatformCALayerWin::clone):
(PlatformCALayerWin::rootLayer):
(PlatformCALayerWin::appendSublayer):
(PlatformCALayerWin::insertSublayer):
(PlatformCALayerWin::replaceSublayer):
(PlatformCALayerWin::adoptSublayers):
(PlatformCALayerWin::copyFiltersFrom):
* platform/graphics/ca/win/PlatformCALayerWin.h:
* platform/graphics/ca/win/PlatformCALayerWinInternal.cpp:
(PlatformCALayerWinInternal::insertSublayer):
* platform/graphics/ca/win/PlatformCALayerWinInternal.h:
2014-10-13 Chris Dumez <cdumez@apple.com>
Use is<>() / downcast<>() for Filter / FilterOperation subclasses
https://bugs.webkit.org/show_bug.cgi?id=137644
Reviewed by Darin Adler.
Use is<>() / downcast<>() for Filter / FilterOperation subclasses.
No new tests, no behavior change.
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::ComputedStyleExtractor::valueForFilter):
* platform/graphics/ca/mac/PlatformCAFiltersMac.mm:
(PlatformCAFilters::filterValueForOperation):
(PlatformCAFilters::colorMatrixValueForFilter):
* platform/graphics/filters/Filter.h:
* platform/graphics/filters/FilterOperation.cpp:
(WebCore::DefaultFilterOperation::operator==):
(WebCore::ReferenceFilterOperation::operator==):
(WebCore::BasicColorMatrixFilterOperation::blend):
(WebCore::BasicColorMatrixFilterOperation::operator==):
(WebCore::BasicComponentTransferFilterOperation::blend):
(WebCore::BasicComponentTransferFilterOperation::operator==):
(WebCore::BlurFilterOperation::operator==):
(WebCore::BlurFilterOperation::blend):
(WebCore::DropShadowFilterOperation::operator==):
(WebCore::DropShadowFilterOperation::blend):
* platform/graphics/filters/FilterOperation.h:
* platform/graphics/filters/FilterOperations.cpp:
(WebCore::FilterOperations::outsets):
* rendering/FilterEffectRenderer.cpp:
(WebCore::FilterEffectRenderer::build):
* rendering/RenderLayerFilterInfo.cpp:
(WebCore::RenderLayer::FilterInfo::updateReferenceFilterClients):
* rendering/svg/RenderSVGResourceFilterPrimitive.cpp:
(WebCore::RenderSVGResourceFilterPrimitive::determineFilterPrimitiveSubregion):
* svg/graphics/filters/SVGFilter.h:
(isType):
2014-10-13 Chris Dumez <cdumez@apple.com>
Use is<>() / downcast<>() for Table render objects
https://bugs.webkit.org/show_bug.cgi?id=137641
Reviewed by Mihnea Ovidenie.
Use is<>() / downcast<>() for table-related render objects and clean
up the surrounding code.
No new tests, no behavior change.
* accessibility/AccessibilityARIAGrid.cpp:
(WebCore::AccessibilityARIAGrid::addChildren):
* accessibility/AccessibilityTable.cpp:
(WebCore::AccessibilityTable::tableElement):
(WebCore::AccessibilityTable::isDataTable):
(WebCore::AccessibilityTable::isTableExposableThroughAccessibility):
(WebCore::AccessibilityTable::addChildren):
* accessibility/AccessibilityTableCell.cpp:
(WebCore::AccessibilityTableCell::parentTable):
(WebCore::AccessibilityTableCell::rowIndexRange):
(WebCore::AccessibilityTableCell::columnIndexRange):
(WebCore::AccessibilityTableCell::titleUIElement):
* accessibility/AccessibilityTableColumn.cpp:
(WebCore::AccessibilityTableColumn::headerObject):
* editing/DeleteSelectionCommand.cpp:
(WebCore::DeleteSelectionCommand::removeNode):
* editing/TextIterator.cpp:
(WebCore::shouldEmitTabBeforeNode):
(WebCore::shouldEmitNewlinesBeforeAndAfterNode):
* html/HTMLTableCellElement.cpp:
(WebCore::HTMLTableCellElement::parseAttribute):
(WebCore::HTMLTableCellElement::cellAbove):
* html/HTMLTableColElement.cpp:
(WebCore::HTMLTableColElement::parseAttribute):
* mathml/MathMLElement.cpp:
(WebCore::MathMLElement::parseAttribute):
* rendering/AutoTableLayout.cpp:
(WebCore::AutoTableLayout::recalcColumn):
(WebCore::shouldScaleColumns):
* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::computeIntrinsicLogicalWidths):
* rendering/RenderBox.cpp:
(WebCore::RenderBox::computePercentageLogicalHeight):
(WebCore::RenderBox::layoutOverflowRectForPropagation):
* rendering/RenderElement.cpp:
(WebCore::RenderElement::addChild):
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::calculateClipRects):
* rendering/RenderTable.cpp:
(WebCore::RenderTable::addChild):
(WebCore::RenderTable::layout):
(WebCore::RenderTable::firstColumn):
(WebCore::RenderTable::recalcSections):
(WebCore::RenderTable::sectionAbove):
(WebCore::RenderTable::sectionBelow):
(WebCore::RenderTable::bottomSection):
* rendering/RenderTable.h:
* rendering/RenderTableCaption.cpp:
(WebCore::RenderTableCaption::table):
* rendering/RenderTableCell.h:
(WebCore::RenderTableCell::nextCell):
(WebCore::RenderTableCell::previousCell):
(WebCore::RenderTableRow::firstCell):
(WebCore::RenderTableRow::lastCell):
* rendering/RenderTableCol.cpp:
(WebCore::RenderTableCol::table):
(WebCore::RenderTableCol::enclosingColumnGroup):
(WebCore::RenderTableCol::nextColumn):
* rendering/RenderTableCol.h:
Make updateFromElement() public to allow the callers to use tighter
typing and devitualize the call as the class is final.
* rendering/RenderTableRow.cpp:
(WebCore::RenderTableRow::addChild):
* rendering/RenderTableRow.h:
(WebCore::RenderTableSection::firstRow):
(WebCore::RenderTableSection::lastRow):
(WebCore::RenderTableRow::nextRow):
(WebCore::RenderTableRow::previousRow):
* rendering/RenderTableSection.cpp:
(WebCore::RenderTableSection::addChild):
(WebCore::RenderTableSection::layoutRows):
(WebCore::RenderTableSection::paintCell):
* rendering/RenderTableSection.h:
* rendering/RenderTreeAsText.cpp:
(WebCore::writeTextRun):
(WebCore::writeSimpleLine):
2014-10-08 Jer Noble <jer.noble@apple.com>
MediaPlayer::characteristicChanged() is not called when new tracks are found in SourceBufferPrivateAVFObjC
https://bugs.webkit.org/show_bug.cgi?id=137533
Reviewed by Darin Adler.
When a new AVAsset is returned out of the AVStreamDataParser, notify the HTMLMediaElement that
characteristics of the player may have changed.
* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::characteristicsChanged):
* platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
(WebCore::SourceBufferPrivateAVFObjC::didParseStreamDataAsAsset):
2014-10-13 Jer Noble <jer.noble@apple.com>
[iOS] Stop listening for wireless playback target availability when the default controls are hidden.
https://bugs.webkit.org/show_bug.cgi?id=137633
Reviewed by Dean Jackson.
In order to minimize the excess bandwidth and power consumption required for actively listening
for wireless playback target availablity, unregister for those notifications while the controls
are hidden due to playback, or when the element's document is hidden.
* Modules/mediacontrols/mediaControlsiOS.js:
(ControllerIOS.prototype.createBase): Register for document visiblity change notfications.
(ControllerIOS.prototype.setControlsType): Call updateShouldListenForPlaybackTargetAvailabilityEvent()
instead of setShouldListenForPlaybackTargetAvailabilityEvent()
(ControllerIOS.prototype.hideControls): Ditto.
(ControllerIOS.prototype.showControls): Ditto.
(ControllerIOS.prototype.updateStatusDisplay): Ditto.
(ControllerIOS.prototype.handleVisibilityChange): Ditto.
(ControllerIOS.prototype.updateShouldListenForPlaybackTargetAvailabilityEvent): Added. Only listen
for target availability when the video has no errors, is not in the initial "big play button"
controls state, and when the controls are not hidden.
* platform/audio/ios/MediaSessionManagerIOS.mm:
(-[WebMediaSessionHelper stopMonitoringAirPlayRoutes]): Explicitly set the discoveryMode to "disabled"
rather than waiting for the autoreleasepool to destroy our routing controller.
2014-10-13 Simon Fraser <simon.fraser@apple.com>
iOS DRT snapshots are limited to the page visible area
https://bugs.webkit.org/show_bug.cgi?id=137650
Reviewed by Daniel Bates.
LegacyTileCache drawing was limited to the window's visible area, found by
crawling up the layer hierarchy to the root layer. This caused test snapshots to
be missing non-composited content outside the iPhone visible area, which hinders
testing.
Fix by adding a test-only mode where the window visible area is the entire window.
* platform/ios/wak/WAKWindow.h:
* platform/ios/wak/WAKWindow.mm:
(-[WAKWindow setEntireWindowVisibleForTesting:]):
(-[WAKWindow _visibleRectRespectingMasksToBounds:]):
2014-10-13 Mihnea Ovidenie <mihnea@adobe.com>
[CSSRegions] Make RenderNamedFlowFragment::computeStyleInRegion const
https://bugs.webkit.org/show_bug.cgi?id=137604
Reviewed by Andrei Bucur.
The method computeStyleInRegion should be const as it does not modify
the state of the RenderNamedFlowFragment instance. Make pointers to
the region used for styling const along the way. No new tests as no
change in functionality.
* css/ElementRuleCollector.h:
(WebCore::ElementRuleCollector::ElementRuleCollector):
(WebCore::ElementRuleCollector::setRegionForStyling):
* css/StyleResolver.cpp:
(WebCore::StyleResolver::State::initForStyleResolve):
(WebCore::StyleResolver::styleForElement):
* css/StyleResolver.h:
* rendering/RenderNamedFlowFragment.cpp:
(WebCore::RenderNamedFlowFragment::computeStyleInRegion):
* rendering/RenderNamedFlowFragment.h:
2014-09-30 Sergio Villar Senin <svillar@igalia.com>
[CSS Grid Layout] Pass the valid set of tracks to grow beyond growth limits
https://bugs.webkit.org/show_bug.cgi?id=137253
Reviewed by Darin Adler.
Section 10.4 of the specs describe how to resolve content based
track sizing functions. Among others it describes the "distribute
extra space" algorithm. The 3rd bullet of that algorithm specifies
how to distribute (and also the target tracks) the extra space
once all the tracks have reached their growth limits.
Our implementation had 2 problems. First we were not passing a
valid subset of tracks (instead we were always using all of
them). Now we use a function that filters the right tracks to be
the target of the extra space distribution depending on whether
we're computing the min track function or the max track function.
Secondly the algorithm that was distributing the extra space was
not using that list of passed in tracks (it iterated over all of
them). From now on it will use the set of tracks selected using
the filter function described above.
* rendering/RenderGrid.cpp:
(WebCore::RenderGrid::resolveContentBasedTrackSizingFunctions):
(WebCore::RenderGrid::resolveContentBasedTrackSizingFunctionsForItems):
(WebCore::RenderGrid::distributeSpaceToTracks):
* rendering/RenderGrid.h:
* rendering/style/GridTrackSize.h:
(WebCore::GridTrackSize::hasMinContentMinTrackBreadthAndMinOrMaxContentMaxTrackBreadth):
(WebCore::GridTrackSize::hasMaxContentMinTrackBreadthAndMaxContentMaxTrackBreadth):
2014-10-12 Mike West <mkwst@chromium.org>
Referrer Policy: Update <meta name="referrer"> values to match the spec
https://bugs.webkit.org/show_bug.cgi?id=137635
Reviewed by Jochen Eisinger.
The Referrer Policy specification ([Working Draft][WD], [Editor's
draft[ED]) defines different keywords than we originally
implemented. We should support them in the interests of clarity and
interoperability with other browsers implementing the specification.
[WD]: http://www.w3.org/TR/referrer-policy/#referrer-policy-delivery-meta
[ED]: http://w3c.github.io/webappsec/specs/referrer-policy/#referrer-policy-delivery-meta
This patch is a port of Blink's https://codereview.chromium.org/607433002/
Tests: http/tests/security/referrer-policy-conflicting-policies.html
http/tests/security/referrer-policy-https-no-referrer-when-downgrade.html
http/tests/security/referrer-policy-https-no-referrer.html
http/tests/security/referrer-policy-https-unsafe-url.html
http/tests/security/referrer-policy-no-referrer-when-downgrade.html
http/tests/security/referrer-policy-no-referrer.html
* dom/Document.cpp:
(WebCore::Document::processReferrerPolicy):
2014-10-12 Dhi Aurrahman <diorahman@rockybars.com>
Support activation behavior of link element
https://bugs.webkit.org/show_bug.cgi?id=137597
Reviewed by Benjamin Poulain.
Support activation behavior of link elements as defined in [1],
i.e. to follow the hyperlink created by the link element when it is fully active.
[1] https://html.spec.whatwg.org/multipage/semantics.html#the-link-element
Tests: fast/dom/html-link-element-activation-behavior-on-element-click.html
fast/dom/html-link-element-activation-behavior-on-mouse-click.html
fast/dom/html-link-element-activation-behavior-url-is-null.html
* dom/MouseEvent.cpp:
(WebCore::MouseEvent::triggerActivationBehavior):
* dom/MouseEvent.h:
* html/HTMLAnchorElement.cpp:
(WebCore::HTMLAnchorElement::defaultEventHandler):
(WebCore::isLinkClick): Deleted.
* html/HTMLAnchorElement.h:
* html/HTMLLinkElement.cpp:
(WebCore::HTMLLinkElement::defaultEventHandler):
(WebCore::HTMLLinkElement::handleClick):
* html/HTMLLinkElement.h:
* svg/SVGAElement.cpp:
(WebCore::SVGAElement::defaultEventHandler):
2014-10-11 KwangHyuk Kim <hyuki.kim@samsung.com>
[EFL] Enable WebP support.
https://bugs.webkit.org/show_bug.cgi?id=136156
Reviewed by Gyuyoung Kim.
Add WebP library and inlcude path to WebCore path for WK2 Efl.
No new tests since existing feature is just enabled for WK2 Efl.
* PlatformEfl.cmake:
2014-10-11 Carlos Garcia Campos <cgarcia@igalia.com>
[GLIB] Split GMainLoopSource moving thread safe implementation to its own class GThreadSafeMainLoopSource
https://bugs.webkit.org/show_bug.cgi?id=137485
Reviewed by Sergio Villar Senin.
Use GThreadSafeMainLoopSource for GStreamer sources, since they
can be used from different threads. Also update GMutexLocker
usages, since it's now a template.
* platform/audio/gstreamer/AudioFileReaderGStreamer.cpp:
(WebCore::AudioFileReader::createBus):
* platform/graphics/gstreamer/InbandTextTrackPrivateGStreamer.h:
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
(WebCore::MediaPlayerPrivateGStreamerBase::updateTexture):
(WebCore::MediaPlayerPrivateGStreamerBase::triggerRepaint):
(WebCore::MediaPlayerPrivateGStreamerBase::paint):
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h:
* platform/graphics/gstreamer/TrackPrivateBaseGStreamer.h:
* platform/graphics/gstreamer/VideoSinkGStreamer.cpp:
(webkitVideoSinkTimeoutCallback):
(webkitVideoSinkRender):
(unlockBufferMutex):
(webkitVideoSinkUnlockStop):
(webkitVideoSinkStart):
* platform/graphics/gstreamer/WebKitMediaSourceGStreamer.cpp:
* platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
(webKitWebSrcGetProperty):
(webKitWebSrcStop):
(webKitWebSrcStart):
(webKitWebSrcChangeState):
(webKitWebSrcQueryWithParent):
(webKitWebSrcGetUri):
(webKitWebSrcSetUri):
(webKitWebSrcNeedDataMainCb):
(webKitWebSrcNeedDataCb):
(webKitWebSrcEnoughDataMainCb):
(webKitWebSrcEnoughDataCb):
(webKitWebSrcSeekDataCb):
(webKitWebSrcSetMediaPlayer):
(StreamingClient::createReadBuffer):
(StreamingClient::handleResponseReceived):
(StreamingClient::handleDataReceived):
(StreamingClient::handleNotifyFinished):
(ResourceHandleStreamingClient::wasBlocked):
(ResourceHandleStreamingClient::cannotShowURL):
2014-10-10 Chris Dumez <cdumez@apple.com>
Use is<>() / downcast<>() for Image subclasses
https://bugs.webkit.org/show_bug.cgi?id=137625
Reviewed by Andreas Kling.
Use is<>() / downcast<>() for Image subclasses.
No new tests, no behavior change.
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::remoteSVGRootElement):
* loader/cache/CachedImage.cpp:
(WebCore::CachedImage::imageSizeForRenderer):
(WebCore::CachedImage::createImage):
* platform/graphics/BitmapImage.h:
* platform/graphics/Image.h:
* platform/mac/DragImageMac.mm:
(WebCore::createDragImageFromImage):
* rendering/RenderImage.cpp:
(WebCore::RenderImage::embeddedContentBox):
* svg/graphics/SVGImage.h:
2014-10-10 Chris Dumez <cdumez@apple.com>
Use is<>() / downcast<>() for RenderElement
https://bugs.webkit.org/show_bug.cgi?id=137622
Reviewed by Benjamin Poulain.
Use is<>() / downcast<>() for RenderElement and clean up the
surrounding code.
No new tests, no behavior change.
* accessibility/AccessibilityImageMapLink.cpp:
(WebCore::AccessibilityImageMapLink::imageMapLinkRenderer):
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::computeAccessibilityIsIgnored):
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::computeRenderStyleForProperty):
* dom/Node.cpp:
(WebCore::Node::materializeRareData):
* dom/Position.cpp:
(WebCore::isNonTextLeafChild):
(WebCore::searchAheadForBetterMatch):
* dom/PseudoElement.cpp:
(WebCore::PseudoElement::didRecalcStyle):
* editing/CompositeEditCommand.cpp:
(WebCore::CompositeEditCommand::moveParagraphContentsToNewBlockIfNecessary):
* editing/htmlediting.cpp:
(WebCore::isEmptyTableCell):
* rendering/InlineIterator.h:
(WebCore::bidiNextShared):
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::getFirstLetter):
* rendering/RenderBox.cpp:
(WebCore::RenderBox::layout):
* rendering/RenderCounter.cpp:
(WebCore::RenderCounter::rendererRemovedFromTree):
(WebCore::RenderCounter::rendererSubtreeAttached):
(showCounterRendererTree):
* rendering/RenderElement.cpp:
(WebCore::RenderElement::insertChildInternal):
(WebCore::RenderElement::removeChildInternal):
(WebCore::RenderElement::findNextLayer):
(WebCore::RenderElement::layout):
* rendering/RenderElement.h:
(WebCore::RenderObject::isRenderLayerModelObject):
(WebCore::RenderObject::isBoxModelObject):
(WebCore::RenderObject::isRenderBlock):
(WebCore::RenderObject::isRenderBlockFlow):
(WebCore::RenderObject::isRenderReplaced):
(WebCore::RenderObject::isRenderInline):
(WebCore::RenderObject::style):
(WebCore::RenderObject::firstLineStyle):
(WebCore::ContainerNode::renderer):
* rendering/RenderFrameSet.cpp:
(WebCore::RenderFrameSet::paint):
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::calculateClipRects):
* rendering/RenderNamedFlowFragment.cpp:
(WebCore::RenderNamedFlowFragment::computeChildrenStyleInRegion):
(WebCore::RenderNamedFlowFragment::setObjectStyleInRegion):
(WebCore::RenderNamedFlowFragment::restoreRegionObjectsOriginalStyle):
* rendering/RenderObject.cpp:
(WebCore::RenderObject::clearNeedsLayout):
(WebCore::RenderObject::willBeDestroyed):
(WebCore::RenderObject::collectAnnotatedRegions):
* rendering/RenderVTTCue.cpp:
(WebCore::RenderVTTCue::initializeLayoutParameters):
(WebCore::RenderVTTCue::repositionGenericCue):
* rendering/mathml/RenderMathMLFraction.cpp:
(WebCore::RenderMathMLFraction::addChild):
* rendering/mathml/RenderMathMLMenclose.cpp:
(WebCore::RenderMathMLMenclose::addChild):
* rendering/mathml/RenderMathMLOperator.cpp:
(WebCore::RenderMathMLOperator::rebuildTokenContent):
(WebCore::RenderMathMLOperator::updateStyle):
* rendering/mathml/RenderMathMLRoot.cpp:
(WebCore::RenderMathMLRoot::addChild):
(WebCore::RenderMathMLRoot::layout):
* rendering/mathml/RenderMathMLToken.cpp:
(WebCore::RenderMathMLToken::addChild):
(WebCore::RenderMathMLToken::updateTokenContent):
(WebCore::RenderMathMLToken::updateStyle):
* rendering/mathml/RenderMathMLUnderOver.cpp:
(WebCore::RenderMathMLUnderOver::layout):
* rendering/svg/RenderSVGResource.cpp:
(WebCore::RenderSVGResource::markForLayoutAndParentResourceInvalidation):
* rendering/svg/RenderSVGText.cpp:
(WebCore::findPreviousAndNextAttributes):
(WebCore::RenderSVGText::subtreeStyleDidChange):
(WebCore::updateFontInAllDescendants):
* rendering/svg/SVGRenderSupport.cpp:
(WebCore::SVGRenderSupport::layoutChildren):
* rendering/svg/SVGResourcesCache.cpp:
(WebCore::SVGResourcesCache::clientWasAddedToTree):
(WebCore::SVGResourcesCache::clientWillBeRemovedFromTree):
* rendering/svg/SVGTextLayoutAttributesBuilder.cpp:
(WebCore::SVGTextLayoutAttributesBuilder::buildLayoutAttributesForTextRenderer):
(WebCore::SVGTextLayoutAttributesBuilder::buildLayoutAttributesForForSubtree):
(WebCore::SVGTextLayoutAttributesBuilder::rebuildMetricsForTextRenderer):
* rendering/svg/SVGTextLayoutAttributesBuilder.h:
* rendering/svg/SVGTextMetricsBuilder.cpp:
(WebCore::SVGTextMetricsBuilder::initializeMeasurementWithTextRenderer):
(WebCore::SVGTextMetricsBuilder::measureTextRenderer):
(WebCore::SVGTextMetricsBuilder::walkTree):
(WebCore::SVGTextMetricsBuilder::buildMetricsAndLayoutAttributes):
* rendering/svg/SVGTextMetricsBuilder.h:
* rendering/svg/SVGTextRunRenderingContext.cpp:
(WebCore::SVGTextRunRenderingContext::createGlyphToPathTranslator):
(WebCore::SVGTextRunRenderingContext::drawSVGGlyphs):
(WebCore::SVGTextRunRenderingContext::glyphDataForCharacter):
* svg/SVGFontData.cpp:
(WebCore::SVGFontData::applySVGGlyphSelection):
2014-10-10 Benjamin Poulain <benjamin@webkit.org>
Update :nth-child(An+B of selector-list) to the latest specification
https://bugs.webkit.org/show_bug.cgi?id=137593
Reviewed by Andreas Kling.
Following my implementation feedback on :nth-child(An+B of selector-list),
the CSS WG decided to change the definition such that the current element on which
the selector is matched must also match the selector list in :nth-child().
This patch updates the implementation accordingly.
Test: fast/selectors/nth-child-of-chained-3.html
* css/SelectorChecker.cpp:
(WebCore::SelectorChecker::checkOne):
(WebCore::SelectorChecker::matchSelectorList):
* css/SelectorChecker.h:
* cssjit/SelectorCompiler.cpp:
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementMatchesSelectorList):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsNthChildOf):
2014-10-10 Chris Dumez <cdumez@apple.com>
Drop RENDER_OBJECT_TYPE_CASTS() for a lot of RenderObject subclasses
https://bugs.webkit.org/show_bug.cgi?id=137594
Reviewed by Darin Adler.
Drop RENDER_OBJECT_TYPE_CASTS() for RenderObject subclasses that no
longer needed it or that required very few changes to do so. This will
make sure developers start using is<>() / downcast<>() for those
classes.
No new tests, no behavior change.
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::textUnderElement):
(WebCore::AccessibilityRenderObject::stringValue):
(WebCore::AccessibilityRenderObject::titleUIElement):
* dom/PseudoElement.cpp:
(WebCore::PseudoElement::didAttachRenderers):
* html/HTMLCanvasElement.cpp:
(WebCore::HTMLCanvasElement::reset):
* html/HTMLPlugInElement.cpp:
(WebCore::HTMLPlugInElement::defaultEventHandler):
* html/HTMLPlugInImageElement.cpp:
(WebCore::HTMLPlugInImageElement::updateSnapshot):
(WebCore::HTMLPlugInImageElement::checkSnapshotStatus):
* html/SearchInputType.cpp:
(WebCore::SearchInputType::addSearchResult):
(WebCore::SearchInputType::didSetValueByUserEdit):
* html/shadow/TextControlInnerElements.cpp:
(WebCore::TextControlInnerTextElement::renderer):
(WebCore::TextControlInnerTextElement::customStyleForRenderer):
(WebCore::SearchFieldResultsButtonElement::defaultEventHandler):
* page/FrameView.cpp:
(WebCore::FrameView::isInChildFrameWithFrameFlattening):
* rendering/RenderButton.h:
* rendering/RenderCounter.h:
* rendering/RenderDetailsMarker.h:
* rendering/RenderFieldset.h:
* rendering/RenderFileUploadControl.cpp:
(WebCore::RenderFileUploadControl::paintObject):
* rendering/RenderFileUploadControl.h:
* rendering/RenderFlexibleBox.h:
* rendering/RenderFullScreen.h:
* rendering/RenderGrid.h:
* rendering/RenderHTMLCanvas.h:
* rendering/RenderIFrame.h:
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::contentsBox):
* rendering/RenderMedia.h:
* rendering/RenderQuote.cpp:
(WebCore::RenderQuote::attachQuote):
* rendering/RenderQuote.h:
* rendering/RenderReplaced.h:
* rendering/RenderScrollbarPart.h:
* rendering/RenderSearchField.h:
* rendering/RenderSnapshottedPlugIn.h:
* rendering/RenderTableCaption.h:
* rendering/RenderTextControlMultiLine.h:
* rendering/RenderTextControlSingleLine.h:
* rendering/RenderThemeMac.mm:
(WebCore::RenderThemeMac::paintSnapshottedPluginOverlay):
* rendering/RenderTreeAsText.cpp:
(WebCore::RenderTreeAsText::writeRenderObject):
* rendering/RenderVideo.cpp:
(WebCore::rendererPlaceholder):
* rendering/line/BreakingContextInlineHeaders.h:
(WebCore::updateCounterIfNeeded):
* rendering/svg/RenderSVGContainer.h:
* rendering/svg/RenderSVGGradientStop.h:
* rendering/svg/RenderSVGModelObject.h:
* rendering/svg/RenderSVGPath.h:
* rendering/svg/RenderSVGResourceFilter.h:
* rendering/svg/RenderSVGResourceFilterPrimitive.cpp:
(WebCore::RenderSVGResourceFilterPrimitive::styleDidChange):
* rendering/svg/RenderSVGTextPath.h:
* rendering/svg/RenderSVGTransformableContainer.h:
* rendering/svg/RenderSVGViewportContainer.h:
* rendering/svg/SVGRenderSupport.cpp:
(WebCore::SVGRenderSupport::repaintRectForRendererInLocalCoordinatesExcludingSVGShadow):
(WebCore::SVGRenderSupport::checkForSVGRepaintDuringLayout):
(WebCore::updateObjectBoundingBox):
(WebCore::layoutSizeOfNearestViewportChanged):
(WebCore::SVGRenderSupport::transformToRootChanged):
(WebCore::SVGRenderSupport::rendererHasSVGShadow):
(WebCore::SVGRenderSupport::setRendererHasSVGShadow):
* rendering/svg/SVGTextLayoutEngine.cpp:
(WebCore::SVGTextLayoutEngine::beginTextPathLayout):
* svg/SVGPathElement.cpp:
(WebCore::SVGPathElement::svgAttributeChanged):
(WebCore::SVGPathElement::pathSegListChanged):
(WebCore::SVGPathElement::getBBox):
* svg/SVGSVGElement.cpp:
(WebCore::SVGSVGElement::currentViewportSize):
2014-10-10 Chris Dumez <cdumez@apple.com>
Use is<>() / downcast<>() for GraphicsLayer subclasses
https://bugs.webkit.org/show_bug.cgi?id=137595
Reviewed by Darin Adler.
Use is<>() / downcast<>() for GraphicsLayer subclasses and clean up the
surrounding code.
No new tests, no behavior change.
* page/mac/ServicesOverlayController.mm:
(WebCore::ServicesOverlayController::Highlight::Highlight):
(WebCore::ServicesOverlayController::Highlight::fadeIn):
(WebCore::ServicesOverlayController::Highlight::fadeOut):
* platform/graphics/GraphicsLayer.h:
* platform/graphics/ca/GraphicsLayerCA.cpp:
(WebCore::GraphicsLayerCA::removeFromParent):
(WebCore::GraphicsLayerCA::setMaskLayer):
(WebCore::GraphicsLayerCA::recursiveVisibleRectChangeRequiresFlush):
(WebCore::GraphicsLayerCA::recursiveCommitChanges):
(WebCore::GraphicsLayerCA::updateSublayerList):
(WebCore::GraphicsLayerCA::ensureStructuralLayer):
(WebCore::GraphicsLayerCA::updateMaskLayer):
(WebCore::GraphicsLayerCA::replicatedLayerRoot):
(WebCore::GraphicsLayerCA::swapFromOrToTiledLayer):
(WebCore::GraphicsLayerCA::propagateLayerChangeToReplicas):
(WebCore::GraphicsLayerCA::fetchCloneLayers):
* platform/graphics/ca/GraphicsLayerCA.h:
2014-10-10 Chris Dumez <cdumez@apple.com>
Use is<>() / downcast<>() for RenderBoxModelObject
https://bugs.webkit.org/show_bug.cgi?id=137587
Reviewed by Mihnea Ovidenie.
Use is<>() / downcast<>() for RenderBoxModelObject and clean up the
surrounding code.
No new tests, no behavior change.
* accessibility/AXObjectCache.cpp:
(WebCore::createFromRenderer):
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::renderBoxModelObject):
(WebCore::isInlineWithContinuation):
(WebCore::firstChildConsideringContinuation):
(WebCore::lastChildHasContinuation):
(WebCore::AccessibilityRenderObject::nextSibling):
(WebCore::AccessibilityRenderObject::widget):
(WebCore::AccessibilityRenderObject::renderObjectIsObservable):
(WebCore::AccessibilityRenderObject::observableObject):
(WebCore::msaaRoleForRenderer):
* accessibility/AccessibilityRenderObject.h:
* accessibility/AccessibilityTable.cpp:
(WebCore::AccessibilityTable::isDataTable):
* dom/Node.cpp:
(WebCore::Node::renderBox):
(WebCore::Node::renderBoxModelObject):
* inspector/InspectorOverlay.cpp:
(WebCore::buildObjectForElementInfo):
* page/FrameView.cpp:
(WebCore::FrameView::scrollContentsFastPath):
* page/PrintContext.cpp:
(WebCore::enclosingBoxModelObject):
* page/animation/AnimationBase.cpp:
(WebCore::AnimationBase::freezeAtTime):
* page/animation/ImplicitAnimation.cpp:
(WebCore::ImplicitAnimation::startAnimation):
(WebCore::ImplicitAnimation::pauseAnimation):
(WebCore::ImplicitAnimation::endAnimation):
* page/animation/KeyframeAnimation.cpp:
(WebCore::KeyframeAnimation::startAnimation):
(WebCore::KeyframeAnimation::pauseAnimation):
(WebCore::KeyframeAnimation::endAnimation):
* page/ios/FrameIOS.mm:
(WebCore::Frame::overflowScrollPositionChangedForNode):
* page/scrolling/ScrollingCoordinator.cpp:
(WebCore::ScrollingCoordinator::hasVisibleSlowRepaintViewportConstrainedObjects):
* rendering/InlineBox.h:
(WebCore::InlineBox::boxModelObject):
* rendering/InlineElementBox.h:
(WebCore::InlineElementBox::renderer):
* rendering/InlineFlowBox.cpp:
(WebCore::InlineFlowBox::placeBoxesInBlockDirection):
* rendering/InlineFlowBox.h:
(WebCore::InlineFlowBox::renderer):
* rendering/InlineTextBox.cpp:
(WebCore::InlineTextBox::baselinePosition):
(WebCore::InlineTextBox::lineHeight):
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::addChildToContinuation):
* rendering/RenderBox.cpp:
(WebCore::RenderBox::computeReplacedLogicalWidthUsing):
(WebCore::RenderBox::computeReplacedLogicalHeightUsing):
(WebCore::RenderBox::computePositionedLogicalWidth):
(WebCore::RenderBox::computePositionedLogicalHeight):
(WebCore::RenderBox::computePositionedLogicalWidthReplaced):
(WebCore::RenderBox::computePositionedLogicalHeightReplaced):
* rendering/RenderBoxModelObject.h:
* rendering/RenderFlowThread.cpp:
(WebCore::RenderFlowThread::adjustedPositionRelativeToOffsetParent):
* rendering/RenderInline.cpp:
(WebCore::RenderInline::splitInlines):
(WebCore::RenderInline::addChildToContinuation):
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::updateLayerPosition):
(WebCore::RenderLayer::calculateClipRects):
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::adjustAncestorCompositingBoundsForFlowThread):
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::requiresCompositingForIndirectReason):
(WebCore::RenderLayerCompositor::computeStickyViewportConstraints):
* rendering/RenderObject.cpp:
(WebCore::RenderObject::destroy):
(WebCore::RenderObject::offsetParent):
* rendering/mathml/RenderMathMLScripts.cpp:
(WebCore::RenderMathMLScripts::base):
2014-10-10 Zan Dobersek <zdobersek@igalia.com>
Remove CrossThreadTask
https://bugs.webkit.org/show_bug.cgi?id=137570
Reviewed by Darin Adler.
Replace uses of CrossThreadTask with C++11 lambdas. The initializations
of cross-thread copies are rather verbose at the moment, but should look
better once we can switch to using C++14 init capture for lambdas.
* Modules/websockets/WorkerThreadableWebSocketChannel.cpp:
(WebCore::WorkerThreadableWebSocketChannel::Bridge::initialize):
* WebCore.order:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* dom/CrossThreadTask.h: Removed.
* loader/WorkerThreadableLoader.cpp:
(WebCore::WorkerThreadableLoader::MainThreadBridge::MainThreadBridge):
(WebCore::WorkerThreadableLoader::MainThreadBridge::destroy):
(WebCore::WorkerThreadableLoader::MainThreadBridge::cancel):
(WebCore::WorkerThreadableLoader::MainThreadBridge::didSendData):
(WebCore::WorkerThreadableLoader::MainThreadBridge::didReceiveResponse):
(WebCore::WorkerThreadableLoader::MainThreadBridge::didReceiveData):
(WebCore::WorkerThreadableLoader::MainThreadBridge::didFinishLoading):
(WebCore::WorkerThreadableLoader::MainThreadBridge::didFail):
(WebCore::WorkerThreadableLoader::MainThreadBridge::didFailAccessControlCheck):
(WebCore::WorkerThreadableLoader::MainThreadBridge::didFailRedirectCheck):
(WebCore::WorkerThreadableLoader::MainThreadBridge::~MainThreadBridge): Deleted.
(WebCore::WorkerThreadableLoader::MainThreadBridge::mainThreadCreateLoader): Deleted.
(WebCore::WorkerThreadableLoader::MainThreadBridge::mainThreadDestroy): Deleted.
(WebCore::WorkerThreadableLoader::MainThreadBridge::mainThreadCancel): Deleted.
(WebCore::workerGlobalScopeDidSendData): Deleted.
(WebCore::workerGlobalScopeDidReceiveResponse): Deleted.
(WebCore::workerGlobalScopeDidReceiveData): Deleted.
(WebCore::workerGlobalScopeDidFinishLoading): Deleted.
(WebCore::workerGlobalScopeDidFail): Deleted.
(WebCore::workerGlobalScopeDidFailAccessControlCheck): Deleted.
(WebCore::workerGlobalScopeDidFailRedirectCheck): Deleted.
* loader/WorkerThreadableLoader.h:
* loader/cache/MemoryCache.cpp:
(WebCore::MemoryCache::removeRequestFromCache):
(WebCore::MemoryCache::removeRequestFromSessionCaches):
(WebCore::MemoryCache::removeRequestFromCacheImpl): Deleted.
(WebCore::MemoryCache::removeRequestFromSessionCachesImpl): Deleted.
(WebCore::MemoryCache::crossThreadRemoveRequestFromCache): Deleted.
(WebCore::MemoryCache::crossThreadRemoveRequestFromSessionCaches): Deleted.
* loader/cache/MemoryCache.h:
2014-10-10 Zan Dobersek <zdobersek@igalia.com>
Avoid defaulting to capture-by-value for C++11 lambdas in WebCore
https://bugs.webkit.org/show_bug.cgi?id=137565
Reviewed by Darin Adler.
C++11 lambas should avoid defaulting to capturing used variables by value as that
can lead to unintended captures that, in worst cases, result in lambdas that are
not self-contained and end up operating on dangling pointers.
Explicitly stating the variables that are to be copied by value can also serve as
a checklist of variables that are actually intented for use in the lambda body.
* Modules/quota/StorageErrorCallback.cpp:
(WebCore::StorageErrorCallback::CallbackTask::CallbackTask):
* Modules/webdatabase/Database.cpp:
(WebCore::Database::~Database):
(WebCore::Database::runTransaction):
(WebCore::Database::scheduleTransactionCallback):
* Modules/webdatabase/DatabaseManager.cpp:
(WebCore::DatabaseManager::openDatabase):
* Modules/webdatabase/SQLCallbackWrapper.h:
(WebCore::SQLCallbackWrapper::clear):
* Modules/websockets/ThreadableWebSocketChannelClientWrapper.cpp:
(WebCore::ThreadableWebSocketChannelClientWrapper::didConnect):
(WebCore::ThreadableWebSocketChannelClientWrapper::didReceiveMessage):
(WebCore::ThreadableWebSocketChannelClientWrapper::didReceiveBinaryData):
(WebCore::ThreadableWebSocketChannelClientWrapper::didUpdateBufferedAmount):
(WebCore::ThreadableWebSocketChannelClientWrapper::didStartClosingHandshake):
(WebCore::ThreadableWebSocketChannelClientWrapper::didClose):
(WebCore::ThreadableWebSocketChannelClientWrapper::didReceiveMessageError):
(WebCore::ThreadableWebSocketChannelClientWrapper::processPendingTasks):
* Modules/websockets/WorkerThreadableWebSocketChannel.cpp:
(WebCore::WorkerThreadableWebSocketChannel::Peer::send):
(WebCore::WorkerThreadableWebSocketChannel::Peer::bufferedAmount):
(WebCore::WorkerThreadableWebSocketChannel::Peer::didConnect):
(WebCore::WorkerThreadableWebSocketChannel::Peer::didReceiveMessage):
(WebCore::WorkerThreadableWebSocketChannel::Peer::didReceiveBinaryData):
(WebCore::WorkerThreadableWebSocketChannel::Peer::didUpdateBufferedAmount):
(WebCore::WorkerThreadableWebSocketChannel::Peer::didStartClosingHandshake):
(WebCore::WorkerThreadableWebSocketChannel::Peer::didClose):
(WebCore::WorkerThreadableWebSocketChannel::Peer::didReceiveMessageError):
(WebCore::WorkerThreadableWebSocketChannel::Bridge::mainThreadInitialize):
(WebCore::WorkerThreadableWebSocketChannel::Bridge::connect):
(WebCore::WorkerThreadableWebSocketChannel::Bridge::send):
(WebCore::WorkerThreadableWebSocketChannel::Bridge::bufferedAmount):
(WebCore::WorkerThreadableWebSocketChannel::Bridge::close):
(WebCore::WorkerThreadableWebSocketChannel::Bridge::fail):
(WebCore::WorkerThreadableWebSocketChannel::Bridge::disconnect):
(WebCore::WorkerThreadableWebSocketChannel::Bridge::suspend):
(WebCore::WorkerThreadableWebSocketChannel::Bridge::resume):
* bindings/js/JSCallbackData.h:
(WebCore::DeleteCallbackDataTask::DeleteCallbackDataTask):
* bindings/js/JSDOMGlobalObjectTask.cpp:
(WebCore::JSGlobalObjectTask::JSGlobalObjectTask):
* dom/ScriptExecutionContext.h:
(WebCore::ScriptExecutionContext::AddConsoleMessageTask::AddConsoleMessageTask):
* dom/StringCallback.cpp:
(WebCore::StringCallback::scheduleCallback):
* fileapi/FileReader.cpp:
(WebCore::FileReader::abort):
* loader/appcache/ApplicationCacheGroup.cpp:
(WebCore::ApplicationCacheGroup::postListenerTask):
* workers/DefaultSharedWorkerRepository.cpp:
(WebCore::SharedWorkerProxy::postExceptionToWorkerObject):
(WebCore::SharedWorkerProxy::postConsoleMessageToWorkerObject):
(WebCore::SharedWorkerConnectTask::SharedWorkerConnectTask):
* workers/WorkerEventQueue.cpp:
(WebCore::WorkerEventQueue::enqueueEvent):
* workers/WorkerMessagingProxy.cpp:
(WebCore::WorkerMessagingProxy::postMessageToWorkerObject):
(WebCore::WorkerMessagingProxy::postMessageToWorkerGlobalScope):
(WebCore::WorkerMessagingProxy::postExceptionToWorkerObject):
(WebCore::WorkerMessagingProxy::postConsoleMessageToWorkerObject):
(WebCore::WorkerMessagingProxy::notifyNetworkStateChange):
(WebCore::WorkerMessagingProxy::postMessageToPageInspector):
(WebCore::WorkerMessagingProxy::confirmMessageFromWorkerObject):
(WebCore::WorkerMessagingProxy::reportPendingActivity):
2014-10-10 Zan Dobersek <zdobersek@igalia.com>
Remove MainThreadTask
https://bugs.webkit.org/show_bug.cgi?id=137563
Reviewed by Darin Adler.
Replace the remaining uses of MainThreadTask with C++11 lambdas.
Remove the MainThreadTask header from the build.
* WebCore.order:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* platform/MainThreadTask.h: Removed.
* platform/network/curl/CurlDownload.cpp:
(WebCore::CurlDownloadManager::downloadThread):
(WebCore::CurlDownload::didReceiveHeader):
(WebCore::CurlDownload::didReceiveData):
2014-10-10 Andrzej Badowski <a.badowski@samsung.com>
[ATK] Changing the mapping of ARIA rowheader and columnheader into respective ATK roles.
https://bugs.webkit.org/show_bug.cgi?id=136150
Reviewed by Chris Fleizach.
Expose ColumnHeaderRole and RowHeaderRole objects into ATK.
Test: accessibility/table-roles-hierarchy.html
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::determineAccessibilityRole):
Platforms based on ATK: added distinction of roles for the <th> elements.
* accessibility/AccessibilityTableCell.cpp:
(WebCore::AccessibilityTableCell::determineAccessibilityRole):
Platforms based on ATK: the return value is determined in the ancestor.
* accessibility/atk/AccessibilityObjectAtk.cpp:
(WebCore::AccessibilityObject::accessibilityPlatformIncludesObject):
In addition to CellRole also included ColumnHeaderRole and RowHeaderRole.
* accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
(atkRole):
Changing the mapping of ARIA rowheader and columnheader into respective ATK roles.
(getInterfaceMaskFromObject):
In addition to CellRole also included ColumnHeaderRole and RowHeaderRole.
2014-10-09 Carlos Garcia Campos <cgarcia@igalia.com>
MediaPlayer should use a reference for the MediaPlayerClient
https://bugs.webkit.org/show_bug.cgi?id=137552
Reviewed by Darin Adler.
The MediaPlayer client is set on constructor by HTMLMediaElement
and cleared on HTMLMediaElement destructor that also frees the
MediaPlayer object. Since the client will never be null while the
MediaPlayer player is alive, we can use a reference and remove all
the unneeded null checks. The member has also been renamed to m_client.
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::~HTMLMediaElement):
(WebCore::HTMLMediaElement::parseAttribute):
* platform/graphics/MediaPlayer.cpp:
(WebCore::MediaPlayer::MediaPlayer):
(WebCore::MediaPlayer::~MediaPlayer):
(WebCore::MediaPlayer::loadWithNextMediaEngine):
(WebCore::MediaPlayer::inMediaDocument):
(WebCore::MediaPlayer::currentPlaybackTargetIsWirelessChanged):
(WebCore::MediaPlayer::networkStateChanged):
(WebCore::MediaPlayer::readyStateChanged):
(WebCore::MediaPlayer::volumeChanged):
(WebCore::MediaPlayer::muteChanged):
(WebCore::MediaPlayer::timeChanged):
(WebCore::MediaPlayer::sizeChanged):
(WebCore::MediaPlayer::repaint):
(WebCore::MediaPlayer::durationChanged):
(WebCore::MediaPlayer::rateChanged):
(WebCore::MediaPlayer::playbackStateChanged):
(WebCore::MediaPlayer::firstVideoFrameAvailable):
(WebCore::MediaPlayer::characteristicChanged):
(WebCore::MediaPlayer::keyAdded):
(WebCore::MediaPlayer::keyError):
(WebCore::MediaPlayer::keyMessage):
(WebCore::MediaPlayer::keyNeeded):
(WebCore::MediaPlayer::referrer):
(WebCore::MediaPlayer::userAgent):
(WebCore::MediaPlayer::graphicsDeviceAdapter):
(WebCore::MediaPlayer::cachedResourceLoader):
(WebCore::MediaPlayer::addAudioTrack):
(WebCore::MediaPlayer::removeAudioTrack):
(WebCore::MediaPlayer::addTextTrack):
(WebCore::MediaPlayer::removeTextTrack):
(WebCore::MediaPlayer::addVideoTrack):
(WebCore::MediaPlayer::removeVideoTrack):
(WebCore::MediaPlayer::outOfBandTrackSources):
(WebCore::MediaPlayer::shouldWaitForResponseToAuthenticationChallenge):
(WebCore::MediaPlayer::handlePlaybackCommand):
(WebCore::MediaPlayer::sourceApplicationIdentifier):
(WebCore::MediaPlayer::doesHaveAttribute):
(WebCore::MediaPlayer::mediaPlayerNetworkInterfaceName):
(WebCore::MediaPlayer::getRawCookies):
(WebCore::MediaPlayer::setWirelessVideoPlaybackDisabled): Deleted.
(WebCore::MediaPlayer::audioSourceProvider): Deleted.
(WebCore::MediaPlayer::engineDescription): Deleted.
(WebCore::MediaPlayer::notifyTrackModeChanged): Deleted.
(WebCore::MediaPlayer::totalFrameDelay): Deleted.
(WebCore::MediaPlayerFactorySupport::callRegisterMediaEngine): Deleted.
* platform/graphics/MediaPlayer.h:
(WebCore::MediaPlayer::create):
(WebCore::MediaPlayer::platformVolumeConfigurationRequired):
(WebCore::MediaPlayer::client):
(WebCore::MediaPlayer::mediaPlayerClient): Deleted.
* platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
(WebCore::MediaPlayerPrivateAVFoundation::preferredRenderingMode):
(WebCore::MediaPlayerPrivateAVFoundation::setUpVideoRendering):
(WebCore::MediaPlayerPrivateAVFoundation::prepareForRendering):
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::createVideoLayer):
(WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayerLayer):
(WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayer):
* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::acceleratedRenderingStateChanged):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::addDisplayLayer):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::removeDisplayLayer):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::addAudioRenderer):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::removeAudioRenderer):
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::MediaPlayerPrivateGStreamer::setAudioStreamProperties):
(WebCore::MediaPlayerPrivateGStreamer::notifyPlayerOfVideo):
(WebCore::MediaPlayerPrivateGStreamer::notifyPlayerOfVideoCaps):
(WebCore::MediaPlayerPrivateGStreamer::notifyPlayerOfAudio):
(WebCore::MediaPlayerPrivateGStreamer::didEnd):
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
(WebCore::MediaPlayerPrivateGStreamerBase::triggerRepaint):
* platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
(webKitWebSrcStart):
* platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
(WebCore::MediaPlayerPrivateQTKit::preferredRenderingMode):
(WebCore::MediaPlayerPrivateQTKit::setUpVideoRendering):
(WebCore::MediaPlayerPrivateQTKit::prepareForRendering):
(WebCore::MediaPlayerPrivateQTKit::sawUnsupportedTracks):
2014-10-09 Mihnea Ovidenie <mihnea@adobe.com>
[CSSRegions] Make RenderFlowThread::regionAtBlockOffset const
https://bugs.webkit.org/show_bug.cgi?id=137555
Reviewed by David Hyatt.
Make the method const and remove autoGenerateRegionsToBlockOffset method as it
is not used by region-based multicolumn code. Also removed the RegionAutoGenerationPolicy
parameter in the process and the call sites. Make const some of the methods that call
regionAtBlockOffset.
* rendering/RenderFlowThread.cpp:
(WebCore::RenderFlowThread::regionForCompositedLayer):
(WebCore::RenderFlowThread::regionAtBlockOffset):
(WebCore::RenderFlowThread::adjustedPositionRelativeToOffsetParent):
(WebCore::RenderFlowThread::pageLogicalTopForOffset):
(WebCore::RenderFlowThread::pageLogicalWidthForOffset):
(WebCore::RenderFlowThread::pageLogicalHeightForOffset):
(WebCore::RenderFlowThread::pageRemainingLogicalHeightForOffset):
(WebCore::RenderFlowThread::mapFromFlowToRegion):
(WebCore::RenderFlowThread::computedRegionRangeForBox):
* rendering/RenderFlowThread.h:
* rendering/RenderMultiColumnFlowThread.cpp:
(WebCore::RenderMultiColumnFlowThread::regionAtBlockOffset):
(WebCore::RenderMultiColumnFlowThread::mapFromFlowToRegion):
(WebCore::RenderMultiColumnFlowThread::physicalTranslationFromFlowToRegion):
(WebCore::RenderMultiColumnFlowThread::autoGenerateRegionsToBlockOffset): Deleted.
* rendering/RenderMultiColumnFlowThread.h:
2014-10-09 Chris Dumez <cdumez@apple.com>
Use is<>() / downcast<>() for FontData subclasses
https://bugs.webkit.org/show_bug.cgi?id=137591
Reviewed by Andreas Kling.
Use is<>() / downcast<>() for FontData subclasses.
No new tests, no behavior change.
* platform/graphics/FontData.h:
* platform/graphics/FontGlyphs.cpp:
(WebCore::FontGlyphs::releaseFontData):
(WebCore::FontGlyphs::determinePitch):
* platform/graphics/GlyphPageTreeNode.cpp:
(WebCore::GlyphPageTreeNode::initializePage):
* platform/graphics/SegmentedFontData.h:
(isType):
* platform/graphics/SimpleFontData.h:
(isType):
2014-10-09 Simon Fraser <simon.fraser@apple.com>
Revert part of r174543 that broke grid layout tests.
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::specifiedValueForGridTrackBreadth):
2014-10-09 Dean Jackson <dino@apple.com>
Computed style for clip is wrong with respect to auto
https://bugs.webkit.org/show_bug.cgi?id=137567
Reviewed by Simon Fraser.
Make sure that the computed style of clip returns the
correct value when the input is "auto", or in this
case "rect(auto, auto, auto, auto)". Before this
patch it returned "rect(0px, 0px, 0px, 0px)" which
was completely wrong.
Test: fast/css/computed-clip-with-auto-rect.html
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::autoOrZoomAdjustedValue): Helper function to make the correct keyword or length.
(WebCore::specifiedValueForGridTrackBreadth): It can use the helper too.
(WebCore::ComputedStyleExtractor::propertyValue): If the
top/right/bottom/left is "auto", add that identifier
to the output rectangle.
2014-10-09 Chris Dumez <cdumez@apple.com>
Use RenderObject::firstChildSlow() / lastChildSlow() less
https://bugs.webkit.org/show_bug.cgi?id=137573
Reviewed by Andreas Kling.
Use RenderObject::firstChildSlow() / lastChildSlow() less by using
tighter typing at call sites whenever possible to be able to call the
faster RenderElement::firstChild() / lastChild() instead.
This patch also uses more references instead of pointers when possible.
No new tests, no behavior change.
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::firstChildIsInlineContinuation):
(WebCore::AccessibilityRenderObject::previousSibling):
(WebCore::lastChildHasContinuation):
(WebCore::AccessibilityRenderObject::nextSibling):
* page/FrameView.cpp:
(WebCore::countRenderedCharactersInRenderObjectWithThreshold):
(WebCore::FrameView::renderedCharactersExceed):
* rendering/RenderElement.h:
* rendering/RenderRuby.cpp:
(WebCore::isAnonymousRubyInlineBlock):
(WebCore::isRubyBeforeBlock):
(WebCore::isRubyAfterBlock):
* rendering/svg/RenderSVGInline.h:
* rendering/svg/RenderSVGText.cpp:
(WebCore::RenderSVGText::layout):
* rendering/svg/SVGTextLayoutAttributesBuilder.cpp:
(WebCore::SVGTextLayoutAttributesBuilder::buildLayoutAttributesForTextRenderer):
(WebCore::SVGTextLayoutAttributesBuilder::buildLayoutAttributesForForSubtree):
(WebCore::SVGTextLayoutAttributesBuilder::collectTextPositioningElements):
(WebCore::SVGTextLayoutAttributesBuilder::buildCharacterDataMap):
* rendering/svg/SVGTextLayoutAttributesBuilder.h:
* svg/SVGTextPositioningElement.cpp:
(WebCore::SVGTextPositioningElement::elementFromRenderer):
* svg/SVGTextPositioningElement.h:
2014-10-09 Roger Fong <roger_fong@apple.com>
Build fix for Win EWS bots.
* testing/Internals.idl: Move enum declaration to the top of the file.
2014-10-09 Said Abou-Hallawa <sabouhallawa@apple.com>
RenderMathMLUnderOver adds spacing to the child operator indefinitely when resizing the window.
https://bugs.webkit.org/show_bug.cgi?id=137330
Reviewed by Darin Adler.
The layout for the <mundercover> math object happens in two separate passes. The first pass runs
the layout for the two children and then calculates the maximum child width. It then sets the
stretch size for the math operator child. And finally it runs the second layout pass by calling
the base class layout() function. The base class function then runs the layout for the children
rendering blocks. In the operator child function computePreferredLogicalWidths(), the stretch
size is used to adjust the width (or the height) of the operator. Then it adds the leading and
trailing spaces and the total will be the operator child width.
When resizing or zooming the window, the render objects are just invalidated but marked as 'needs-
Layout'. The problem is happening because the stretch size of the math operator is not reset
before running the layout. The old logical width (or height) of the the math operator child which
is equal to the stretch size plus the leading and trailing spaces for is compared with the glyph
size if the old logical width ( or height) is larger, it is set to be the stretch size. When it
is used again because of invalidation, new leading and trailing spaces are included in the new
logical width. So with every zooming-in or out or window resizing, new leading and trailing
spaces are added to the logical width of the math operator child or the math <munderober> object.
Ensure the stretch size of the math operator render object is reset before running its layout.
Running the layout means either the page is just loaded or it's invalidated which means, no
layout stall data should be used.
Test: mathml/opentype/munderover-window-resize.html
* rendering/mathml/RenderMathMLOperator.cpp:
(WebCore::RenderMathMLOperator::resetStretchSize):
* rendering/mathml/RenderMathMLOperator.h:
resetStretchSize() sets the stretch size to its original value when the class is created.
* rendering/mathml/RenderMathMLUnderOver.cpp:
(WebCore::RenderMathMLUnderOver::layout):
Make sure the operator stretch size is reset before calling its layout. Also make sure the new
maximum stretch size to the operator objects that were invalid and needsLayout.
2014-10-09 Dean Jackson <dino@apple.com>
Remove ENABLE_CSS3_CONDITIONAL_RULES
https://bugs.webkit.org/show_bug.cgi?id=137571
Reviewed by Simon Fraser.
We have good enough support for @supports that
it should be a consistent part of the platform. Remove
the compile-time guard.
* Configurations/FeatureDefines.xcconfig:
* WebCore.exp.in:
* bindings/js/JSCSSRuleCustom.cpp:
(WebCore::toJS):
* bindings/objc/DOMCSS.mm:
(kitClass):
* css/CSSGrammar.y.in:
* css/CSSParser.cpp:
(WebCore::CSSParser::CSSParser):
(WebCore::CSSParser::parseSupportsCondition):
(WebCore::CSSParser::detectAtToken):
(WebCore::CSSParser::detectSupportsToken):
(WebCore::CSSParser::realLex):
* css/CSSParser.h:
* css/CSSRule.h:
* css/CSSRule.idl:
* css/CSSSupportsRule.cpp:
* css/CSSSupportsRule.h:
* css/CSSSupportsRule.idl:
* css/DOMWindowCSS.cpp:
* css/DOMWindowCSS.h:
* css/DOMWindowCSS.idl:
* css/InspectorCSSOMWrappers.cpp:
(WebCore::InspectorCSSOMWrappers::collect):
* css/RuleSet.cpp:
(WebCore::RuleSet::addChildRules):
* css/StyleRule.cpp:
(WebCore::StyleRuleBase::destroy):
(WebCore::StyleRuleBase::copy):
(WebCore::StyleRuleBase::createCSSOMWrapper):
(WebCore::StyleRuleSupports::StyleRuleSupports):
* css/StyleRule.h:
(WebCore::toStyleRuleSupports):
* css/StyleSheetContents.cpp:
(WebCore::childRulesHaveFailedOrCanceledSubresources):
* inspector/InspectorStyleSheet.cpp:
(flattenSourceData):
(WebCore::asCSSRuleList):
* page/DOMWindow.cpp:
(WebCore::DOMWindow::css):
* page/DOMWindow.h:
* page/DOMWindow.idl:
2014-10-09 Benjamin Poulain <benjamin@webkit.org>
Add the baseline implementation of :not(selectorList)
https://bugs.webkit.org/show_bug.cgi?id=137548
Reviewed by Andreas Kling.
This patch extend the pseudo class :not() to support the new definition
in CSS Selectors level 4.
Instead of supporting a single simple selector, :not() now support
an arbitrary selector list, excepted pseudo elements.
One side effect of this change is :visited and :link are no longer supported
inside :not(). The reason has to do with complexity and performance.
Since :not() and :matches() can have arbitrary selector list, keeping track of
:visited and :link can have many combination superposing, some valid, some invalid.
Supporting :visited and :link should be possible by chaning the way we handle
them for style resolution, but given the limited use cases for such features
I'll wait to see if there is any interest before changing everything.
This patch only covers SelectorChecker to keep things simple. The CSS JIT
will come later.
Tests: fast/css/not-basics.html
fast/css/parsing-css-not-1.html
fast/css/parsing-css-not-2.html
fast/css/parsing-css-not-3.html
fast/css/parsing-css-not-4.html
fast/css/parsing-css-not-5.html
fast/css/parsing-css-not-6.html
fast/css/parsing-css-not-7.html
fast/css/parsing-css-not-8.html
fast/css/parsing-css-not-9.html
fast/css/parsing-css-nth-child-of-4.html
fast/selectors/not-basics.html
fast/selectors/not-nested.html
fast/selectors/not-selector-list.html
* css/CSSGrammar.y.in:
Rename selectorListDoesNotMatchAnyPseudoElement() to selectorListDoesNotMatchAnyPseudoElement()
since both :not() and :nth-child(An+B of selectorList) have the same requirements at the moment.
* css/CSSParserValues.cpp:
(WebCore::selectorListMatchesPseudoElement):
The patch adding :matches() introduced the possibility of putting pseudo element
arbitrary deep in a sequence of nested :matches(). Since this case is forbidded
by :not() and :nth-child(An+B of selectorList), selectorListMatchesPseudoElement()
now becomes recursive to find those pseudo elements.
* css/CSSSelector.cpp:
(WebCore::CSSSelector::selectorText):
CSSOM for the extended :not().
* css/SelectorChecker.cpp:
(WebCore::SelectorChecker::checkOne):
(WebCore::SelectorChecker::determineLinkMatchType):
* cssjit/SelectorCompiler.cpp:
(WebCore::SelectorCompiler::addPseudoClassType):
Disable the new capabilities from the JIT for now.
2014-10-09 Tim Horton <timothy_horton@apple.com>
Move ServicesOverlayController to WebCore
https://bugs.webkit.org/show_bug.cgi?id=137416
<rdar://problem/18546283>
Reviewed by Anders Carlsson.
Move ServicesOverlayController from WebKit2 to WebCore, as it can be used by both Legacy WebKit and WebKit2.
* WebCore.xcodeproj/project.pbxproj:
* editing/Editor.cpp:
(WebCore::Editor::scanSelectionForTelephoneNumbers):
* editing/SelectionRectGatherer.cpp:
(WebCore::SelectionRectGatherer::Notifier::~Notifier):
Notify ServicesOverlayController of changes via Page instead of EditorClient.
* page/ChromeClient.h:
(WebCore::ChromeClient::handleTelephoneNumberClick):
(WebCore::ChromeClient::handleSelectionServiceClick):
(WebCore::ChromeClient::hasRelevantSelectionServices):
Add ChromeClient functions for services actions.
* page/EditorClient.h:
(WebCore::EditorClient::selectedTelephoneNumberRangesChanged): Deleted.
(WebCore::EditorClient::selectionRectsDidChange): Deleted.
Remove EditorClient functions for notifying ServicesOverlayController of changes,
because it lives in WebCore proper now.
* page/Page.cpp:
(WebCore::Page::Page):
* page/Page.h:
(WebCore::Page::servicesOverlayController):
Keep a ServicesOverlayController on Page.
* page/PageOverlay.cpp:
(WebCore::PageOverlay::mouseEvent):
Use windowToContents instead of rootViewToContents; events come in in window coordinates.
* page/PageOverlayController.cpp:
(WebCore::PageOverlayController::updateSettingsForLayer):
Get Settings from MainFrame, not Page.
* page/Settings.in:
Add servicesControlsEnabled setting.
* page/mac/ServicesOverlayController.h: Renamed from Source/WebKit2/WebProcess/WebPage/ServicesOverlayController.h.
* page/mac/ServicesOverlayController.mm: Renamed from Source/WebKit2/WebProcess/WebPage/mac/ServicesOverlayController.mm.
Moved from WebKit2. Mostly mechanical changes, plus:
- Use windowToContents instead of rootViewToContents; events come in in window coordinates.
- Cut off rebuild* if serviceControlsEnabled setting is false
- Don't create the overlay if serviceControlsEnabled setting is false
- Send click events via ChromeClient.
- Tie our lifetime to MainFrame instead of Page, and get lots of things from MainFrame instead.
* platform/Logging.h:
Add Services logging channel (moved from WebKit2).
2014-10-09 Brent Fulgham <bfulgham@apple.com>
[Win] Unreviewed build fix: Revert r174378
Roll back this change, as it didn't fix the EWS builders, and has only
served to make Windows builds take forever.
* WebCore.vcxproj/WebCoreGenerated.make: Don't delete all generated content
every time we build.
2014-10-09 Chris Dumez <cdumez@apple.com>
Unreviewed GTK build fix after r174504.
Missing header include.
* rendering/svg/SVGTextQuery.cpp:
2014-10-09 Myles C. Maxfield <mmaxfield@apple.com>
Remove second-to-last client of WebFontCache
https://bugs.webkit.org/show_bug.cgi?id=137550
Reviewed by Darin Adler.
No new tests because no behavior change.
* WebCore.exp.in:
* platform/graphics/FontCache.h: Allow migration of client to getCachedFontData()
2014-10-09 Chris Dumez <cdumez@apple.com>
[Mac] Spending too much time mapping desired font families to available ones
https://bugs.webkit.org/show_bug.cgi?id=137539
Reviewed by Darin Adler.
While profiling the load of weather.com, I noticed that we are spending
quite a bit of time trying to map the font family requested to a font
that is available on the system. The process involves:
1. Doing a linear search of all the installed font families and do a
case-insensitive string comparison for each of them until we find a
match,
2. Then, if we don't find a match, do another linear search of the
fonts' postscript names this time and do again a case-insensitive
string comparison for each of them.
This process is costly and the fonts requested by weather.com are not
available, causing us to do 2 linear searches and a lot of string
comparisons (accounting for ~2% of the WebProcess CPU time for the page
load). As a result, we end up spending ~90ms in
internalFontWithFamily() when loading weather.com.
This patch introduces a cache for the mapping between desired font
families and available font families. This cuts the time spent in
internalFontWithFamily() in half (~45ms). The cache gets invalidated
when fonts are installed / uninstalled on the system so we don't break
that scenario. The cache is also limited in size to avoid using too
much memory.
No new tests, but manual testing making sure the cache gets invalidated
when installing a font on the system.
* platform/graphics/mac/FontCacheMac.mm:
(WebCore::invalidateFontCache):
* platform/mac/WebFontCache.h:
* platform/mac/WebFontCache.mm:
(desiredFamilyToAvailableFamilyDictionary):
(rememberDesiredFamilyToAvailableFamilyMapping):
(+[WebFontCache internalFontWithFamily:traits:weight:size:]):
(+[WebFontCache invalidate]):
2014-10-09 Bear Travis <betravis@adobe.com>
[CSS Font Loading] Decrement the font loading count before notifying callbacks
https://bugs.webkit.org/show_bug.cgi?id=137401
Reviewed by Alexey Proskuryakov.
In the callbacks, it should appear that font load has completed. This is
accessed through loading(), which relies on the current number of
fonts loading via JS and CSS.
Unskipping the failing test http/tests/webfont/fontloader-loading-attribute.html
test which tests this.
* css/FontLoader.cpp:
(WebCore::LoadFontCallback::notifyLoaded):
2014-10-09 Chris Dumez <cdumez@apple.com>
Unreviewed Windows build fix after r174506.
We no longer needed to dereference as it is a reference instead of a
pointer now.
* page/win/EventHandlerWin.cpp:
(WebCore::EventHandler::passWheelEventToWidget):
2014-10-09 Chris Dumez <cdumez@apple.com>
Use is<>() / downcast<>() for Widget subclasses
https://bugs.webkit.org/show_bug.cgi?id=137549
Reviewed by Darin Adler.
Use is<>() / downcast<>() for Widget subclasses and clean up the
surrounding code.
No new tests, no behavior change.
* accessibility/AXObjectCache.cpp:
(WebCore::AXObjectCache::getOrCreate):
* accessibility/AccessibilityObject.cpp:
(WebCore::appendAccessibilityObject):
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::visiblePositionForPoint):
* accessibility/AccessibilityScrollView.cpp:
(WebCore::AccessibilityScrollView::webAreaObject):
(WebCore::AccessibilityScrollView::documentFrameView):
(WebCore::AccessibilityScrollView::parentObject):
(WebCore::AccessibilityScrollView::parentObjectIfExists):
* bindings/js/JSPluginElementFunctions.cpp:
(WebCore::pluginScriptObjectFromPluginViewBase):
* html/HTMLObjectElement.cpp:
(WebCore::HTMLObjectElement::appendFormData):
* html/HTMLPlugInElement.cpp:
(WebCore::HTMLPlugInElement::canProcessDrag):
(WebCore::HTMLPlugInElement::isKeyboardFocusable):
(WebCore::HTMLPlugInElement::isUserObservable):
* html/HTMLPlugInImageElement.cpp:
(WebCore::HTMLPlugInImageElement::checkSizeChangeForSnapshotting):
(WebCore::HTMLPlugInImageElement::subframeLoaderDidCreatePlugIn):
* html/HTMLPlugInImageElement.h:
* loader/SubframeLoader.cpp:
(WebCore::SubframeLoader::loadPlugin):
* page/DragController.cpp:
(WebCore::DragController::operationForLoad):
* page/EventHandler.cpp:
(WebCore::EventHandler::subframeForTargetNode):
(WebCore::EventHandler::handleWheelEvent):
* page/EventHandler.h:
* page/Frame.cpp:
(WebCore::Frame::frameForWidget):
* page/FrameView.cpp:
(WebCore::FrameView::hasCustomScrollbars):
(WebCore::FrameView::updateLayoutAndStyleIfNeededRecursive):
(WebCore::FrameView::convertToContainingView):
(WebCore::FrameView::convertFromContainingView):
(WebCore::FrameView::removeChild):
* page/FrameView.h:
* page/Page.cpp:
(WebCore::Page::pluginViews):
* page/efl/EventHandlerEfl.cpp:
(WebCore::EventHandler::passWheelEventToWidget):
* page/gtk/EventHandlerGtk.cpp:
(WebCore::EventHandler::passWheelEventToWidget):
* page/ios/EventHandlerIOS.mm:
(WebCore::EventHandler::passWheelEventToWidget):
* page/mac/EventHandlerMac.mm:
(WebCore::EventHandler::passWheelEventToWidget):
* page/scrolling/ScrollingCoordinator.cpp:
(WebCore::ScrollingCoordinator::computeNonFastScrollableRegion):
* page/win/EventHandlerWin.cpp:
(WebCore::EventHandler::passWheelEventToWidget):
* platform/ScrollView.cpp:
(WebCore::ScrollView::removeChild):
(WebCore::ScrollView::setHasHorizontalScrollbar):
(WebCore::ScrollView::setHasVerticalScrollbar):
* platform/ScrollView.h:
* platform/Scrollbar.cpp:
(WebCore::Scrollbar::root):
Uninline as root() because Widget::root() returns a FrameView now and
it is impossible to include FrameView.h in Scrollbar.h without causing
a cycle.
* platform/Scrollbar.h:
* platform/Widget.cpp:
(WebCore::Widget::root):
Use tighter typing and return a FrameView instead of a ScrollView.
(WebCore::Widget::removeFromParent):
* platform/Widget.h:
* platform/efl/WidgetEfl.cpp:
(WebCore::Widget::setCursor):
* platform/gtk/PlatformScreenGtk.cpp:
* platform/gtk/WidgetGtk.cpp:
(WebCore::Widget::setCursor):
* platform/mac/PlatformScreenMac.mm:
(WebCore::displayFromWidget):
* platform/mac/WidgetMac.mm:
(WebCore::Widget::setCursor):
* platform/win/WidgetWin.cpp:
(WebCore::Widget::setCursor):
* plugins/PluginViewBase.h:
* plugins/win/PluginViewWin.cpp:
(WebCore::PluginView::updatePluginWidget):
(WebCore::PluginView::paintIntoTransformedContext):
(WebCore::PluginView::paintWindowedPluginIntoContext):
(WebCore::PluginView::paint):
(WebCore::PluginView::handleMouseEvent):
(WebCore::PluginView::setNPWindowRect):
(WebCore::PluginView::snapshot):
* rendering/RenderEmbeddedObject.cpp:
(WebCore::RenderEmbeddedObject::allowsAcceleratedCompositing):
(WebCore::RenderEmbeddedObject::nodeAtPoint):
(WebCore::RenderEmbeddedObject::scroll):
* rendering/RenderFrameBase.h:
(WebCore::RenderFrameBase::childView):
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::layerWillBeDestroyed):
(WebCore::RenderLayerBacking::updateConfiguration):
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::shouldPropagateCompositingToEnclosingFrame):
* rendering/RenderTreeAsText.cpp:
(WebCore::write):
* rendering/RenderWidget.cpp:
(WebCore::WidgetHierarchyUpdatesSuspensionScope::moveWidgets):
(WebCore::RenderWidget::paintContents):
(WebCore::RenderWidget::setOverlapTestResult):
(WebCore::RenderWidget::updateWidgetPosition):
(WebCore::RenderWidget::nodeAtPoint):
(WebCore::RenderWidget::embeddedContentBox):
2014-10-09 Carlos Garcia Campos <cgarcia@igalia.com>
Layering violation: MediaPlayer should not reference/use FrameView
https://bugs.webkit.org/show_bug.cgi?id=21562
Reviewed by Darin Adler.
Remove FrameView dependency from MediaPlayer.
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::mediaPlayerIsInMediaDocument): Check if
the element document is a media document.
* html/HTMLMediaElement.h:
* platform/graphics/MediaPlayer.cpp:
(WebCore::MediaPlayer::MediaPlayer): Remove m_frameView initialization.
(WebCore::MediaPlayer::inMediaDocument): Use the MediaPlayerClient
to check if the media player is in a media document.
* platform/graphics/MediaPlayer.h:
(WebCore::MediaPlayerClient::mediaPlayerIsInMediaDocument):
(WebCore::MediaPlayer::setFrameView): Deleted.
(WebCore::MediaPlayer::frameView): Deleted.
* platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
(WebCore::MediaPlayerPrivateAVFoundation::preferredRenderingMode):
Do not check if the media player has a frame view, checking whether it's visible
is enough.
* platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
Remove unneeded header include.
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm: Ditto.
* platform/graphics/mac/MediaPlayerPrivateQTKit.mm: Ditto.
* rendering/RenderVideo.cpp:
(WebCore::RenderVideo::~RenderVideo): Do not call MediaPlayer::setFrameView().
(WebCore::RenderVideo::updatePlayer): Ditto.
2014-10-09 Christophe Dumez <cdumez@apple.com>
Use is<>() / downcast<>() for RenderBlockFlow
https://bugs.webkit.org/show_bug.cgi?id=137545
Reviewed by Darin Adler.
Use is<>() / downcast<>() for RenderBlockFlow and clean up the
surrounding code.
No new tests, no behavior change.
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::computeAccessibilityIsIgnored):
* dom/Element.cpp:
(WebCore::Element::renderNamedFlowFragment):
(WebCore::Element::webkitGetRegionFlowRanges):
* editing/Editor.cpp:
(WebCore::Editor::hasBidiSelection):
* inspector/InspectorOverlay.cpp:
(WebCore::buildObjectForRegionHighlight):
(WebCore::buildObjectForElementInfo):
* rendering/EllipsisBox.h:
* rendering/HitTestResult.cpp:
(WebCore::HitTestResult::innerTextIfTruncated):
* rendering/LayoutState.cpp:
(WebCore::LayoutState::LayoutState):
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::removeChild):
* rendering/RenderBlock.h:
(WebCore::RenderBlock::moveAllChildrenIncludingFloatsTo):
* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::rebuildFloatingObjectSetFromIntrudingFloats):
(WebCore::RenderBlockFlow::layoutBlockChild):
(WebCore::RenderBlockFlow::marginOffsetForSelfCollapsingBlock):
(WebCore::RenderBlockFlow::marginValuesForChild):
(WebCore::RenderBlockFlow::collapseMargins):
(WebCore::RenderBlockFlow::marginBeforeEstimateForChild):
(WebCore::RenderBlockFlow::handleAfterSideOfBlock):
(WebCore::RenderBlockFlow::mustDiscardMarginBeforeForChild):
(WebCore::RenderBlockFlow::mustDiscardMarginAfterForChild):
(WebCore::RenderBlockFlow::adjustBlockChildForPagination):
(WebCore::RenderBlockFlow::moveAllChildrenIncludingFloatsTo):
(WebCore::RenderBlockFlow::markAllDescendantsWithFloatsForLayout):
(WebCore::RenderBlockFlow::adjustForBorderFit):
(WebCore::getHeightForLineCount):
* rendering/RenderBlockFlow.h:
(WebCore::RenderElement::isRenderNamedFlowFragmentContainer):
* rendering/RenderBlockLineLayout.cpp:
(WebCore::RenderBlockFlow::createLineBoxes):
* rendering/RenderBox.cpp:
(WebCore::RenderBox::styleDidChange):
* rendering/RenderBoxModelObject.cpp:
(WebCore::RenderBoxModelObject::paintMaskForTextFillBox):
* rendering/RenderDeprecatedFlexibleBox.cpp:
(WebCore::RenderDeprecatedFlexibleBox::applyLineClamp):
(WebCore::RenderDeprecatedFlexibleBox::clearLineClamp):
* rendering/RenderFlowThread.cpp:
(WebCore::RenderFlowThread::removeFlowChildInfo):
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::updateLayerPositions):
(WebCore::expandClipRectForRegionAndReflection):
(WebCore::RenderLayer::calculateClipRects):
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::computeCompositingRequirements):
(WebCore::RenderLayerCompositor::rebuildCompositingLayerTree):
* rendering/RenderMultiColumnFlowThread.cpp:
(WebCore::RenderMultiColumnFlowThread::evacuateAndDestroy):
(WebCore::RenderMultiColumnFlowThread::processPossibleSpannerDescendant):
(WebCore::RenderMultiColumnFlowThread::flowThreadDescendantInserted):
* rendering/RenderMultiColumnFlowThread.h:
* rendering/RenderMultiColumnSet.cpp:
(WebCore::RenderMultiColumnSet::heightAdjustedForSetOffset):
(WebCore::RenderMultiColumnSet::columnGap):
* rendering/RenderMultiColumnSet.h:
* rendering/RenderNamedFlowFragment.cpp:
(WebCore::RenderNamedFlowFragment::fragmentContainer):
* rendering/RenderObject.cpp:
(WebCore::RenderObject::adjustComputedFontSizesOnBlocks):
(WebCore::RenderObject::resetTextAutosizing):
(WebCore::RenderObject::showLineTreeForThis):
(WebCore::RenderObject::showRenderSubTreeAndMark):
* rendering/RenderText.cpp:
(WebCore::RenderText::setText):
(WebCore::RenderText::ensureLineBoxes):
(WebCore::RenderText::simpleLineLayout):
* rendering/RenderTreeAsText.cpp:
(WebCore::write):
* rendering/RootInlineBox.cpp:
(WebCore::RootInlineBox::selectionTopAdjustedForPrecedingBlock):
(WebCore::RootInlineBox::blockFlow):
* rendering/SimpleLineLayoutFunctions.cpp:
(WebCore::SimpleLineLayout::computeTextBoundingBox):
(WebCore::SimpleLineLayout::computeTextFirstRunLocation):
(WebCore::SimpleLineLayout::collectTextAbsoluteRects):
(WebCore::SimpleLineLayout::collectTextAbsoluteQuads):
* rendering/svg/SVGTextQuery.cpp:
(WebCore::flowBoxForRenderer):
2014-10-09 Philip Chimento <philip.chimento@gmail.com>
[GTK] Netscape plugin API symbol used outside feature guards
https://bugs.webkit.org/show_bug.cgi?id=137385
Reviewed by Philippe Normand.
* plugins/PluginPackage.cpp:
(WebCore::PluginPackage::unload): Add guards for Netscape Plugin
API around symbol, so that it compiles OK when the API is not
available.
2014-10-08 Mihnea Ovidenie <mihnea@adobe.com>
[CSSRegions]Remove unused parameter in adjustRegionBoundsFromFlowThreadPortionRect
https://bugs.webkit.org/show_bug.cgi?id=137518
Reviewed by Andrei Bucur.
This method is used only by region code in accelerated compositing.
The first parameter for the method was introduced with the intent to be used for multicolumn,
but without being actually used in multicolumn code. Also make the method const.
No new tests as no change in functionality.
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::adjustAncestorCompositingBoundsForFlowThread):
* rendering/RenderMultiColumnSet.cpp:
(WebCore::RenderMultiColumnSet::adjustRegionBoundsFromFlowThreadPortionRect):
* rendering/RenderMultiColumnSet.h:
* rendering/RenderRegion.cpp:
(WebCore::RenderRegion::adjustRegionBoundsFromFlowThreadPortionRect):
* rendering/RenderRegion.h:
2014-10-08 Andreas Kling <akling@apple.com>
[Mac] Show repaint counters in tile coverage map.
<https://webkit.org/b/137544>
Reviewed by Simon Fraser.
Add repaint counters to the tile layers in the "tiled scrolling
indicator" display. This will be helpful for diagnosing issues with
excessive tile repaints outside the visible viewport.
* platform/graphics/ca/TileController.cpp:
(WebCore::TileController::setNeedsDisplayInRect):
* platform/graphics/ca/TileGrid.cpp:
(WebCore::TileGrid::drawTileMapContents):
2014-10-08 Myles C. Maxfield <mmaxfield@apple.com>
Unreviewed build fix after r174480. Broke iOS build.
* rendering/RenderObject.cpp:
(WebCore::includeNonFixedHeight):
2014-10-08 Myles C. Maxfield <litherum@gmail.com>
Inline ruby does not get justified correctly
https://bugs.webkit.org/show_bug.cgi?id=137421
Reviewed by Dave Hyatt.
We justify text in two passes: one counts expansion opportunities within a line,
and the other doles out widths and expansion amounts to constituent inline boxes.
This patch simply modifies both passes to descend into ruby bases. Once it has
done so, we then re-layout the ruby run with the newly found width.
Tests: fast/ruby/ruby-justification-hittest.html
fast/ruby/ruby-justification.html
* rendering/InlineBox.h:
(WebCore::InlineBox::setExpansion): updateRubyForJustifiedText() has to set the
expansion for an inline box, so make setExpansion() public.
* rendering/RenderBlockLineLayout.cpp:
(WebCore::updateRubyForJustifiedText): Given values that have already been
computed in computeInlineDirectionPositionsForSegment(), adjust the widths and
expansion values for all the various pieces of ruby.
(WebCore::computeExpansionForJustifiedText): Call updateRubyForJustifiedText() if
necessary.
(WebCore::RenderBlockFlow::computeInlineDirectionPositionsForSegment): When
counting expansion opportunities in a line, include ruby bases.
* rendering/RenderRubyRun.h: Fix grammar in comment.
* rendering/RenderText.cpp:
(WebCore::RenderText::stringView): Give default arguments to function.
* rendering/RenderText.h: Ditto.
2014-10-08 Dean Jackson <dino@apple.com>
PopupMenus should indicate if they are using a custom rendering
https://bugs.webkit.org/show_bug.cgi?id=137543
<rdar://problem/18544212>
Reviewed by Beth Dakin.
On Yosemite there is an animation as a popup menu closes. We can't use
this when there is a custom rendering, since the animation doesn't match
the final result. Implement this by hooking into the existing code
for hiding the arrows during animation - a WebKitSystemInterface update
will implement the other side.
* platform/mac/WebCoreSystemInterface.h: Rename parameter to be more clear.
* platform/mac/WebCoreSystemInterface.mm:
* rendering/RenderMenuList.cpp:
(RenderMenuList::menuStyle): We need to check that we are a native-looking
button, not just something with appearance.
2014-10-08 Christophe Dumez <cdumez@apple.com>
Use is<>() / downcast<>() for RenderBlock objects
https://bugs.webkit.org/show_bug.cgi?id=137512
Reviewed by Darin Adler.
Use is<>() / downcast<>() for RenderBlock objects and clean up the
surrounding code.
No new tests, no behavior change.
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::firstChildConsideringContinuation):
(WebCore::lastChildConsideringContinuation):
(WebCore::AccessibilityRenderObject::firstChild):
(WebCore::startOfContinuations):
(WebCore::endOfContinuations):
(WebCore::childBeforeConsideringContinuations):
(WebCore::AccessibilityRenderObject::previousSibling):
(WebCore::AccessibilityRenderObject::nextSibling):
(WebCore::nextContinuation):
(WebCore::AccessibilityRenderObject::renderParentObject):
(WebCore::AccessibilityRenderObject::anchorElement):
(WebCore::AccessibilityRenderObject::setValue):
* bindings/objc/DOMUIKitExtensions.mm:
(-[DOMNode containsOnlyInlineObjects]):
(-[DOMNode isSelectableBlock]):
(-[DOMHTMLElement structuralComplexityContribution]):
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::valueForGridTrackList):
* editing/CompositeEditCommand.cpp:
(WebCore::CompositeEditCommand::addBlockPlaceholderIfNeeded):
* editing/TextIterator.cpp:
(WebCore::TextIterator::shouldRepresentNodeOffsetZero):
* page/ios/FrameIOS.mm:
(WebCore::Frame::preferredHeight):
* rendering/LogicalSelectionOffsetCaches.h:
(WebCore::containingBlockForFixedPosition):
(WebCore::containingBlockForAbsolutePosition):
(WebCore::containingBlockForObjectInFlow):
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::styleWillChange):
(WebCore::RenderBlock::continuationBefore):
(WebCore::RenderBlock::splitBlocks):
(WebCore::RenderBlock::addChildIgnoringContinuation):
(WebCore::canMergeAnonymousBlock):
(WebCore::canMergeContiguousAnonymousBlocks):
(WebCore::RenderBlock::collapseAnonymousBoxChild):
(WebCore::RenderBlock::removeChild):
(WebCore::RenderBlock::blockElementContinuation):
(WebCore::RenderBlock::blockSelectionGaps):
(WebCore::RenderBlock::blockBeforeWithinSelectionRoot):
(WebCore::isChildHitTestCandidate):
(WebCore::RenderBlock::firstLineBlock):
(WebCore::findFirstLetterBlock):
(WebCore::RenderBlock::childBecameNonInline):
(WebCore::RenderBlock::hasMarginBeforeQuirk):
(WebCore::RenderBlock::hasMarginAfterQuirk):
* rendering/RenderBlock.h:
* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::marginBeforeEstimateForChild):
(WebCore::RenderBlockFlow::estimateLogicalTopPosition):
(WebCore::RenderBlockFlow::adjustBlockChildForPagination):
(WebCore::RenderBlockFlow::positionNewFloats):
(WebCore::RenderBlockFlow::markSiblingsWithFloatsForLayout):
* rendering/RenderBlockLineLayout.cpp:
(WebCore::RenderBlockFlow::positionNewFloatOnLine):
* rendering/RenderBox.cpp:
(WebCore::RenderBox::computeReplacedLogicalHeightUsing):
(WebCore::RenderBox::availableLogicalHeightUsing):
(WebCore::RenderBox::containingBlockLogicalWidthForPositioned):
(WebCore::RenderBox::containingBlockLogicalHeightForPositioned):
(WebCore::computeInlineStaticDistance):
(WebCore::RenderBox::computePositionedLogicalWidth):
(WebCore::RenderBox::computePositionedLogicalHeight):
* rendering/RenderBoxModelObject.cpp:
(WebCore::accumulateInFlowPositionOffsets):
(WebCore::RenderBoxModelObject::moveChildTo):
(WebCore::RenderBoxModelObject::moveChildrenTo):
* rendering/RenderElement.cpp:
(WebCore::RenderElement::propagateStyleToAnonymousChildren):
* rendering/RenderFlowThread.cpp:
(WebCore::RenderFlowThread::adjustedPositionRelativeToOffsetParent):
* rendering/RenderFullScreen.cpp:
(WebCore::RenderFullScreen::unwrapRenderer):
* rendering/RenderInline.cpp:
(WebCore::RenderInline::inlineElementContinuation):
(WebCore::updateStyleOfAnonymousBlockContinuations):
(WebCore::RenderInline::styleDidChange):
(WebCore::nextContinuation):
(WebCore::RenderInline::splitFlow):
(WebCore::RenderInline::positionForPoint):
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::updateScrollbarsAfterLayout):
(WebCore::RenderLayer::calculateClipRects):
* rendering/RenderListItem.cpp:
(WebCore::getParentOfFirstLineBox):
(WebCore::RenderListItem::insertOrMoveMarkerRendererIfNeeded):
(WebCore::RenderListItem::positionListMarker):
* rendering/RenderNamedFlowFragment.cpp:
(WebCore::RenderNamedFlowFragment::maxPageLogicalHeight):
* rendering/RenderObject.cpp:
(WebCore::includeNonFixedHeight):
(WebCore::RenderObject::checkBlockPositionedObjectsNeedLayout):
(WebCore::RenderObject::containingBlock):
(WebCore::RenderObject::handleDynamicFloatPositionChange):
(WebCore::RenderObject::removeAnonymousWrappersForInlinesIfNecessary):
(WebCore::RenderObject::getTextDecorationColors):
* rendering/RenderRuby.cpp:
(WebCore::rubyBeforeBlock):
(WebCore::rubyAfterBlock):
* rendering/RenderRubyBase.cpp:
(WebCore::RenderRubyBase::moveInlineChildren):
(WebCore::RenderRubyBase::moveBlockChildren):
* rendering/RenderThemeMac.mm:
(WebCore::RenderThemeMac::paintSnapshottedPluginOverlay):
* rendering/TextAutosizer.cpp:
(WebCore::TextAutosizer::processSubtree):
(WebCore::TextAutosizer::processContainer):
(WebCore::TextAutosizer::measureDescendantTextWidth):
(WebCore::TextAutosizer::findDeepestBlockContainingAllText):
(WebCore::TextAutosizer::findFirstTextLeafNotInCluster):
* rendering/mathml/RenderMathMLRoot.cpp:
(WebCore::RenderMathMLRoot::layout):
2014-10-08 Jer Noble <jer.noble@apple.com>
Unreviewed follow-up fix for r174460. Do not register for KVOs if the object does not respond to the requested property.
* platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.mm:
(-[CDMSessionMediaSourceAVFObjCObserver beginObserving:]):
(-[CDMSessionMediaSourceAVFObjCObserver stopObserving:]):
(-[CDMSessionMediaSourceAVFObjCObserver invalidate]):
2014-10-08 Dean Jackson <dino@apple.com>
Add deprecation warning for CSSKeyframesRule::appendRule
https://bugs.webkit.org/show_bug.cgi?id=137532
<rdar://problem/18585745>
Reviewed by Brent Fulgham.
In r173982 (webkit.org/b/57910) we added insertRule to match
the spec. We should print a warning to the JS console suggesting
users move to insertRule.
* css/WebKitCSSKeyframesRule.cpp:
(WebCore::WebKitCSSKeyframesRule::appendRule): Add a message to the system
console.
* css/WebKitCSSKeyframesRule.h:
2014-10-08 Myles C. Maxfield <mmaxfield@apple.com>
Text drawn with an SVG font has no spaces when word-rounding hacks are enabled
https://bugs.webkit.org/show_bug.cgi?id=137463
Reviewed by Darin Adler.
When rounding hacks are enabled, we use the "adjusted space width" instead of the
regular space width. However, the SVG-font-specific implementation of the
SimpleFontData constructor doesn't initialize this value, so it was getting set
to an undefined value (which happened to be close to 0 in my tests).
Test: svg/text/svg-font-word-rounding-hacks-spaces.html
* css/CSSFontFaceSource.cpp:
(WebCore::CSSFontFaceSource::getFontData):
(WebCore::CSSFontFaceSource::ensureFontData):
* loader/cache/CachedFont.cpp:
(WebCore::CachedFont::ensureCustomFontData):
(WebCore::CachedFont::getSVGFontById):
* platform/graphics/SimpleFontData.h:
* svg/SVGFontData.cpp:
(WebCore::SVGFontData::initializeFontData):
2014-10-08 Brent Fulgham <bfulgham@apple.com>
[Win] Resolve various static analyzer warnings in WebCore.
https://bugs.webkit.org/show_bug.cgi?id=137526
Reviewed by Dean Jackson.
A series of small changes to resolve various issues found by the MSVC static analyzer.
* inspector/NetworkResourcesData.cpp:
(WebCore::NetworkResourcesData::clear): Add assertion that it->value should never be null.
* page/SessionIDHash.h:
(WTF::HashTraits<WebCore::SessionID>::constructDeletedValue): Add explicit cast to avoid
compiler warning.
(WTF::HashTraits<WebCore::SessionID>::isDeletedValue): Ditto.
* page/win/FrameCGWin.cpp:
(WebCore::imageFromRect): Resolve static analyzer warnings by initializing bits, and
checking the return value of ::CreateDIBSection, which return nullptr on error.
* platform/graphics/ca/win/PlatformCALayerWin.cpp:
(printLayer): Use correct MSVC format specifier for size_t.
* platform/graphics/win/FontCacheWin.cpp:
(WebCore::getLinkedFonts): Handle possibility that a font link key does not exist.
(WebCore::FontCache::systemFallbackForCharacters): Handle error case when a valid code page
does not exist for a given character.
* platform/graphics/win/SimpleFontDataWin.cpp:
(WebCore::SimpleFontData::containsCharacters): Handle error cases for mapping to the CP_ACP code page,
and related failures when attempting to access the contents of a given code page.
* platform/graphics/win/UniscribeController.cpp:
(WebCore::UniscribeController::itemizeShapeAndPlace): Handle possible failure in the
ScriptItemize API call.
(WebCore::UniscribeController::shapeAndPlaceItem): Ditto for ScriptXtoCP API call.
* platform/win/BString.h: Use consistent SAL annotations for our typedeof of BSTR as in
the system header.
* platform/win/COMPtr.h: Ditto for HRESULT.
* platform/win/DragImageCGWin.cpp:
(WebCore::allocImage): Handle case of failing CreateDIBSection API call.
* platform/win/PopupMenuWin.cpp:
(WebCore::PopupMenuWin::show): Handle case of failing SystemParamtersInfo API call.
(WebCore::PopupMenuWin::wndProc): Ditto.
2014-10-07 Jer Noble <jer.noble@apple.com>
[EME][Mac] Update CDMSessionMediaSourceAVFObjC to match new API provided by AVStreamSession
https://bugs.webkit.org/show_bug.cgi?id=137469
Reviewed by Brent Fulgham.
Update our forward declaration to match the API provided by AVStreamSession.
AVStreamSession now takes an error: parameter in its initialiazer. It also provides the
sessionIdentifier used by the CDM, which CDMSessionMediaSourceAVFObjC will use as the
value of sessionId. Having this identifier allows us to fire a
secure-proof-of-key-release message after the client calls MediaKeySession.close().
Because this call will now generate messages, which have to be responded to in order
to remove those proofs from storage, do not clear the CDMSession from MediaKeySession
after calling close().
* Modules/encryptedmedia/MediaKeySession.cpp:
(WebCore::MediaKeySession::~MediaKeySession):
(WebCore::MediaKeySession::close):
(WebCore::MediaKeySession::setError): Deleted.
(WebCore::MediaKeySession::sessionId): Deleted.
* platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.h:
(WebCore::CDMSessionMediaSourceAVFObjC::setSessionId):
* platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.mm:
(-[CDMSessionMediaSourceAVFObjCListener initWithParent:]):
(-[CDMSessionMediaSourceAVFObjCObserver dealloc]):
(-[CDMSessionMediaSourceAVFObjCObserver beginObserving:]):
(-[CDMSessionMediaSourceAVFObjCObserver stopObserving:]):
(-[CDMSessionMediaSourceAVFObjCObserver invalidate]):
(-[CDMSessionMediaSourceAVFObjCListener observeValueForKeyPath:ofObject:change:context:]):
(WebCore::CDMSessionMediaSourceAVFObjC::CDMSessionMediaSourceAVFObjC):
(WebCore::CDMSessionMediaSourceAVFObjC::~CDMSessionMediaSourceAVFObjC):
(WebCore::CDMSessionMediaSourceAVFObjC::releaseKeys):
(WebCore::CDMSessionMediaSourceAVFObjC::update):
(WebCore::CDMSessionMediaSourceAVFObjC::addSourceBuffer):
(WebCore::CDMSessionMediaSourceAVFObjC::removeSourceBuffer):
2014-10-08 Chris Dumez <cdumez@apple.com>
Unreviewed build fix after r174456.
I was comparing a signed int to an unsigned one.
* platform/graphics/mac/FontCacheMac.mm:
(WebCore::shouldAutoActivateFontIfNeeded):
2014-10-08 Christophe Dumez <cdumez@apple.com>
[Mac] We are spending a lot of time loading fonts when loading weather.com
https://bugs.webkit.org/show_bug.cgi?id=137454
Reviewed by Darin Adler.
We are spending a lot of time loading fonts when loading weather.com:
~4.2% of WebProcess's cpu time in FontCache::getCachedFrontData().
In particular, we are spending a lot of time doing font auto-activation
because we don't have the Open Sans fonts installed and weather.com is
trying to load those.
Before this patch, we were doing font auto-activation ~250 times when
loading weather.com, even though the site is loading ~10 distinct font
families.
This patch adds a cache of font families we already tried to
auto-activate so that we don't try again. This results in ~10 font
auto-activations when loading weather.com instead of 250. It reduces
the amount of time spent in getCachedFrontData() to 62.6ms from 276ms
(4.4x less) when loading weather.com.
No new tests, no behavior change.
* platform/graphics/mac/FontCacheMac.mm:
(WebCore::shouldAutoActivateFontIfNeeded):
(WebCore::FontCache::createFontPlatformData):
* platform/mac/WebFontCache.h:
* platform/mac/WebFontCache.mm:
(+[WebFontCache fontWithFamily:traits:weight:size:shouldAutoActivateIfNeeded:]):
(+[WebFontCache fontWithFamily:traits:weight:size:]):
(+[WebFontCache fontWithFamily:traits:size:]):
2014-10-08 Darin Adler <darin@apple.com>
ASSERTION FAILED: underlyingStringIsValid()
https://bugs.webkit.org/show_bug.cgi?id=137502
Reviewed by Anders Carlsson.
* rendering/RenderTreeAsText.cpp:
(WebCore::quoteAndEscapeNonPrintables): Take a StringView instead of a String.
(WebCore::writeTextRun): Ditto.
(WebCore::writeSimpleLine): Ditto.
* rendering/RenderTreeAsText.h: Removed unneeded include, tweaked formatting,
changed quoteAndEscapeNonPrintables to take a StringView.
* rendering/SimpleLineLayoutFunctions.cpp:
(WebCore::SimpleLineLayout::paintFlow): Tighten code using a modern for loop.
(WebCore::SimpleLineLayout::showLineLayoutForFlow): Update to work with a
StringView result for SimpleLineLayout::RunResolver::Run::text.
* rendering/SimpleLineLayoutResolver.h:
(WebCore::SimpleLineLayout::RunResolver::Run::text): Changed return type to
StringView to fix the lifetime bug and also to improve performance by getting
rid of the need to allocate and destroy a StringImpl object.
2014-10-07 Gyuyoung Kim <gyuyoung.kim@samsung.com>
[EFL] Call requestScrollPositionUpdate() instead of delegatedScrollRequested() in ScrollView::scrollTo()
https://bugs.webkit.org/show_bug.cgi?id=137478
Reviewed by Benjamin Poulain.
As r174380 did, ScrollView::scrollTo() also calls requestScrollPositionUpdate() instead of delegatedScrollRequested().
delegatedScrollRequested() will be only called by requestScrollPositionUpdate(), and it needs to be merged by existing
other scroll request function.
No new tests, no behavior changes.
* platform/ScrollView.cpp:
(WebCore::ScrollView::scrollTo):
2014-10-08 Dean Jackson <dino@apple.com>
Safari 8 on OSX 10.10 does not run WebGL in Retina HiDPI mode.
https://bugs.webkit.org/show_bug.cgi?id=134854
<rdar://problem/18465263>
Reviewed by Tim Horton.
The NSOpenGLLayer has to have its contentScale property
set accordingly when on a retina display. Do this by
adding another value to the GraphicsContext3D creation
attribute dictionary, representing the device pixel ratio.
Then, when we come to draw into the layer, make sure
we set our GL viewport to the correct value.
This is currently untestable because:
- we can't just read from the GL buffer as it is always correct
- WebGL isn't working in reftests
- a layer dump doesn't show the change since it was done in a CALayer subclass.
* html/canvas/WebGLRenderingContext.cpp:
(WebCore::WebGLRenderingContext::create): Pass the devicePixelRatio into the attribute dictionary.
* platform/graphics/GraphicsContext3D.h:
(WebCore::GraphicsContext3D::Attributes::Attributes): Add a devicePixelRatio attribute.
* platform/graphics/mac/WebGLLayer.h: New property to save us looking up the attributes
each frame.
* platform/graphics/mac/WebGLLayer.mm:
(-[WebGLLayer initWithGraphicsContext3D:]): Store the devicePixelRatio, and set our
contents scale appropriately.
(-[WebGLLayer drawInCGLContext:pixelFormat:forLayerTime:displayTime:]): Draw into
a correctly sized backbuffer.
(-[WebGLLayer copyImageSnapshotWithColorSpace:]): Generate an image of the correct size.
2014-10-07 Simon Fraser <simon.fraser@apple.com>
Roll-over Changelogs.
* ChangeLog-2014-10-07: Copied from Source/WebCore/ChangeLog.
== Rolled over to ChangeLog-2014-10-07 ==