| 2017-04-24 Youenn Fablet <youenn@apple.com> |
| |
| Set defaults video getUserMedia constraints |
| https://bugs.webkit.org/show_bug.cgi?id=171127 |
| |
| Reviewed by Eric Carlson. |
| |
| Test: fast/mediastream/getUserMedia-default.html |
| |
| Adding default optional constraints for video size and frame rate if none is defined. |
| Default is 640x480 30fps. |
| |
| Doing some refactoring in MeddiaConstraintsImpl and MeddiaConstraintsData to use more move constructors. |
| |
| * Modules/mediastream/MediaConstraintsImpl.cpp: |
| (WebCore::defaultVideoConstraints): |
| (WebCore::MediaConstraintsData::setDefaultVideoConstraints): |
| (WebCore::MediaConstraintsImpl::create): Deleted. |
| * Modules/mediastream/MediaConstraintsImpl.h: |
| * Modules/mediastream/MediaDevices.cpp: |
| (WebCore::MediaDevices::getUserMedia): |
| * platform/mediastream/mac/MockRealtimeVideoSourceMac.mm: |
| (WebCore::MockRealtimeVideoSourceMac::updateSampleBuffer): Fixing crash when setting frameRate. |
| |
| 2017-04-24 Chris Dumez <cdumez@apple.com> |
| |
| createElementNS() should now throw only InvalidCharacterError, not NamespaceError |
| https://bugs.webkit.org/show_bug.cgi?id=171052 |
| |
| Reviewed by Sam Weinig. |
| |
| Validating a qualified name should only throw InvalidCharacterError, not NamespaceError, |
| after: |
| - https://github.com/whatwg/dom/issues/319 |
| - https://github.com/w3c/web-platform-tests/issues/5161 |
| - https://github.com/whatwg/dom/issues/423 |
| |
| Latest spec: |
| - https://dom.spec.whatwg.org/#validate |
| |
| No new tests, updated web-platform-tests. |
| |
| * dom/Document.cpp: |
| (WebCore::Document::parseQualifiedName): |
| |
| 2017-04-24 Chris Dumez <cdumez@apple.com> |
| |
| REGRESSION (214503): Webkit crash under RenderElement::repaintForPausedImageAnimationsIfNeeded() when scrolling giphy pages |
| https://bugs.webkit.org/show_bug.cgi?id=171243 |
| <rdar://problem/31715572> |
| |
| Reviewed by Antti Koivisto. |
| |
| After r214503, we would frequently crash when scrolling giphy pages because we were failing to call |
| RenderView::removeRendererWithPausedImageAnimations(renderer, cachedImage) in some cases. This would |
| cause a RenderElement to still be associated to a CachedImage in RenderView but not in practice. |
| If the CachedImage then gets destroyed and the user scrolls, we end up calling |
| RenderElement::repaintForPausedImageAnimationsIfNeeded() with a bad CachedImage. |
| |
| StyleCachedImage was properly calling RenderView::removeRendererWithPausedImageAnimations() before |
| unregistering the renderer as a client to the CachedImage. However, RenderImageResource was failing |
| to do the same. To make this less error-prone, I added a didRemoveCachedImageClient(CachedImage&) |
| function to the CachedImageClient interface. It is overriden in RenderElement only to call |
| RenderView::removeRendererWithPausedImageAnimations(). |
| |
| Test: fast/images/animated-gif-scrolling-crash.html |
| |
| * loader/cache/CachedImage.cpp: |
| (WebCore::CachedImage::didRemoveClient): |
| * loader/cache/CachedImageClient.h: |
| (WebCore::CachedImageClient::didRemoveCachedImageClient): |
| * rendering/RenderElement.cpp: |
| (WebCore::RenderElement::didRemoveCachedImageClient): |
| * rendering/RenderElement.h: |
| * rendering/style/StyleCachedImage.cpp: |
| (WebCore::StyleCachedImage::removeClient): |
| |
| 2017-04-24 Andy Estes <aestes@apple.com> |
| |
| [macOS] Fix two minor issues with MediaSelectionOption::Type |
| https://bugs.webkit.org/show_bug.cgi?id=171235 |
| |
| Reviewed by Sam Weinig. |
| |
| * platform/MediaSelectionOption.h: Gave type a default value, and added explicit |
| constructors to make gcc and msvc happy. |
| * platform/mac/WebPlaybackControlsManager.mm: |
| (toAVTouchBarMediaSelectionOptionType): Added an ASSERT_NOT_REACHED if none of the switch |
| cases match. |
| |
| 2017-04-24 Andy Estes <aestes@apple.com> |
| |
| [macOS] Enable media selection button on AVTouchBarScrubber |
| https://bugs.webkit.org/show_bug.cgi?id=171149 |
| <rdar://problem/29875010> |
| |
| Reviewed by Beth Dakin. |
| |
| * platform/spi/cocoa/AVKitSPI.h: |
| |
| 2017-04-24 Alex Christensen <achristensen@webkit.org> |
| |
| Reduce copies and allocations in SharedBuffer::append |
| https://bugs.webkit.org/show_bug.cgi?id=170956 |
| |
| Reviewed by Andreas Kling. |
| |
| SharedBuffer was a mess of different data structures added over the years. |
| SharedBuffer::append would allocate large Vector<char>s and call memcpy, and that |
| is inefficient and causes crashes when large allocations fail, and the allocations |
| and copies aren't even necessary. There were also const correctness problems in |
| ResourceLoader::addDataOrBuffer, and iterating a SharedBuffer was strange because |
| sometimes we don't want to add unnecessary copies. |
| |
| These problems are solved by making SharedBuffer a Vector of read-only data segments, |
| which can be contained in various ways but we don't care because all we want to do is |
| read them. Appending SharedBuffers is now const correct because we just add to a |
| Vector<Ref<DataSegment>> and neither SharedBuffer can write to the data. Sometimes, |
| though, we want all the data to be in continuous memory, and if there are multiple |
| segments then the data needs to be copied once to a new segment. We should audit the |
| call sites of SharedBuffer::data and see if this is really necessary. |
| |
| No change in functional behavior. Fewer copies of the data are made when buffering |
| data in the NetworkProcess. No extra memory is allocated for bytes we think we might |
| need to append in the future. Data is now only copied into one buffer lazily as needed, |
| which could slightly change when small delays from memcpy happen, but it's an overall |
| improvement. We could have a performance hit if we were to call append() then data() |
| then append() then data() etc. but that doesn't happen in WebKit because we call append |
| repeatedly when buffering the data then call data() once when reading the data. |
| |
| * editing/cocoa/EditorCocoa.mm: |
| (WebCore::archivedDataForAttributedString): |
| (WebCore::Editor::selectionInWebArchiveFormat): |
| (WebCore::Editor::dataInRTFDFormat): |
| (WebCore::Editor::dataInRTFFormat): |
| * editing/ios/EditorIOS.mm: |
| (WebCore::Editor::WebContentReader::readURL): |
| * editing/mac/EditorMac.mm: |
| (WebCore::Editor::imageInWebArchiveFormat): |
| * loader/TextTrackLoader.cpp: |
| (WebCore::TextTrackLoader::processNewCueData): |
| * loader/archive/cf/LegacyWebArchive.cpp: |
| (WebCore::LegacyWebArchive::createResource): |
| * loader/cache/CachedResource.cpp: |
| (WebCore::CachedResource::tryReplaceEncodedData): |
| * loader/cocoa/DiskCacheMonitorCocoa.mm: |
| (WebCore::DiskCacheMonitor::tryGetFileBackedSharedBufferFromCFURLCachedResponse): |
| * platform/SharedBuffer.cpp: |
| (WebCore::SharedBuffer::SharedBuffer): |
| (WebCore::SharedBuffer::create): |
| (WebCore::SharedBuffer::combineToOneSegment): |
| (WebCore::SharedBuffer::data): |
| (WebCore::SharedBuffer::createArrayBuffer): |
| (WebCore::SharedBuffer::append): |
| (WebCore::SharedBuffer::clear): |
| (WebCore::SharedBuffer::copy): |
| (WebCore::SharedBuffer::DataSegment::data): |
| (WebCore::SharedBuffer::DataSegment::size): |
| (WebCore::segmentIndex): Deleted. |
| (WebCore::offsetInSegment): Deleted. |
| (WebCore::allocateSegment): Deleted. |
| (WebCore::freeSegment): Deleted. |
| (WebCore::SharedBuffer::~SharedBuffer): Deleted. |
| (WebCore::SharedBuffer::size): Deleted. |
| (WebCore::SharedBuffer::duplicateDataBufferIfNecessary): Deleted. |
| (WebCore::SharedBuffer::appendToDataBuffer): Deleted. |
| (WebCore::SharedBuffer::clearDataBuffer): Deleted. |
| (WebCore::SharedBuffer::copyBufferAndClear): Deleted. |
| (WebCore::SharedBuffer::buffer): Deleted. |
| (WebCore::SharedBuffer::getSomeData): Deleted. |
| (WebCore::SharedBuffer::maybeTransferMappedFileData): Deleted. |
| (WebCore::SharedBuffer::clearPlatformData): Deleted. |
| (WebCore::SharedBuffer::maybeTransferPlatformData): Deleted. |
| (WebCore::SharedBuffer::hasPlatformData): Deleted. |
| (WebCore::SharedBuffer::platformData): Deleted. |
| (WebCore::SharedBuffer::maybeAppendPlatformData): Deleted. |
| * platform/SharedBuffer.h: |
| (WebCore::SharedBuffer::create): Deleted. |
| (WebCore::SharedBuffer::isEmpty): Deleted. |
| * platform/SharedBufferChunkReader.cpp: |
| (WebCore::SharedBufferChunkReader::nextChunk): |
| (WebCore::SharedBufferChunkReader::peek): |
| * platform/SharedBufferChunkReader.h: |
| * platform/URLParser.cpp: |
| (WebCore::URLParser::URLParser): |
| * platform/cf/KeyedEncoderCF.cpp: |
| (WebCore::KeyedEncoderCF::finishEncoding): |
| * platform/cf/SharedBufferCF.cpp: |
| (WebCore::SharedBuffer::SharedBuffer): |
| (WebCore::SharedBuffer::createCFData): |
| (WebCore::SharedBuffer::create): |
| (WebCore::SharedBuffer::hintMemoryNotNeededSoon): |
| (WebCore::SharedBuffer::append): |
| (WebCore::SharedBuffer::wrapCFData): Deleted. |
| (WebCore::SharedBuffer::hasPlatformData): Deleted. |
| (WebCore::SharedBuffer::platformData): Deleted. |
| (WebCore::SharedBuffer::platformDataSize): Deleted. |
| (WebCore::SharedBuffer::maybeTransferPlatformData): Deleted. |
| (WebCore::SharedBuffer::clearPlatformData): Deleted. |
| (WebCore::SharedBuffer::tryReplaceContentsWithPlatformBuffer): Deleted. |
| (WebCore::SharedBuffer::maybeAppendPlatformData): Deleted. |
| (WebCore::SharedBuffer::copyBufferAndClear): Deleted. |
| (WebCore::SharedBuffer::copySomeDataFromDataArray): Deleted. |
| (WebCore::SharedBuffer::singleDataArrayBuffer): Deleted. |
| (WebCore::SharedBuffer::maybeAppendDataArray): Deleted. |
| * platform/cocoa/NetworkExtensionContentFilter.mm: |
| (WebCore::NetworkExtensionContentFilter::replacementData): |
| * platform/cocoa/ParentalControlsContentFilter.mm: |
| (WebCore::ParentalControlsContentFilter::replacementData): |
| * platform/cocoa/SharedBufferCocoa.mm: |
| (-[WebCoreSharedBufferData initWithSharedBufferDataSegment:]): |
| (-[WebCoreSharedBufferData length]): |
| (-[WebCoreSharedBufferData bytes]): |
| (WebCore::SharedBuffer::create): |
| (WebCore::SharedBuffer::createCFData): |
| (WebCore::SharedBuffer::createFromReadingFile): |
| (WebCore::SharedBuffer::createNSDataArray): |
| (-[WebCoreSharedBufferData initWithSharedBufferDataBuffer:]): Deleted. |
| (WebCore::SharedBuffer::wrapNSData): Deleted. |
| (WebCore::SharedBuffer::existingCFData): Deleted. |
| * platform/graphics/avfoundation/objc/WebCoreAVFResourceLoader.mm: |
| (WebCore::WebCoreAVFResourceLoader::fulfillRequestWithResource): |
| * platform/graphics/cocoa/FontPlatformDataCocoa.mm: |
| (WebCore::FontPlatformData::openTypeTable): |
| * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp: |
| (ResourceHandleStreamingClient::didReceiveBuffer): |
| * platform/graphics/mac/ImageMac.mm: |
| (WebCore::Image::loadPlatformResource): |
| * platform/image-decoders/ImageDecoder.cpp: |
| (WebCore::ImageDecoder::create): |
| * platform/image-decoders/png/PNGImageDecoder.cpp: |
| (WebCore::PNGImageReader::decode): |
| * platform/ios/PlatformPasteboardIOS.mm: |
| (WebCore::PlatformPasteboard::readBuffer): |
| * platform/mac/PasteboardMac.mm: |
| (WebCore::writeFileWrapperAsRTFDAttachment): |
| (WebCore::Pasteboard::write): |
| * platform/mac/PlatformPasteboardMac.mm: |
| (WebCore::PlatformPasteboard::bufferForType): |
| * platform/network/BlobResourceHandle.cpp: |
| (WebCore::BlobResourceHandle::notifyReceiveData): |
| * platform/network/MIMEHeader.cpp: |
| * platform/network/MIMEHeader.h: |
| * platform/network/cf/ResourceHandleCFURLConnectionDelegateWithOperationQueue.cpp: |
| (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::didReceiveData): |
| * platform/network/cf/SynchronousResourceHandleCFURLConnectionDelegate.cpp: |
| (WebCore::SynchronousResourceHandleCFURLConnectionDelegate::didReceiveData): |
| * platform/network/mac/WebCoreResourceHandleAsDelegate.mm: |
| (-[WebCoreResourceHandleAsDelegate connection:didReceiveData:lengthReceived:]): |
| * platform/network/mac/WebCoreResourceHandleAsOperationQueueDelegate.mm: |
| (-[WebCoreResourceHandleAsOperationQueueDelegate connection:didReceiveData:lengthReceived:]): |
| * platform/soup/SharedBufferSoup.cpp: |
| (WebCore::SharedBuffer::SharedBuffer): |
| (WebCore::SharedBuffer::createSoupBuffer): |
| (WebCore::SharedBuffer::clearPlatformData): Deleted. |
| (WebCore::SharedBuffer::maybeTransferPlatformData): Deleted. |
| (WebCore::SharedBuffer::hasPlatformData): Deleted. |
| (WebCore::SharedBuffer::platformData): Deleted. |
| (WebCore::SharedBuffer::platformDataSize): Deleted. |
| (WebCore::SharedBuffer::maybeAppendPlatformData): Deleted. |
| (WebCore::SharedBuffer::tryReplaceContentsWithPlatformBuffer): Deleted. |
| |
| 2017-04-24 Dan Bernstein <mitz@apple.com> |
| |
| [Cocoa] Some ivars are needlessly @protected |
| https://bugs.webkit.org/show_bug.cgi?id=171208 |
| |
| Reviewed by Anders Carlsson. |
| |
| Made ivars @private where possible. |
| |
| * platform/mac/WebCoreFullScreenPlaceholderView.h: |
| * platform/mac/WebCoreFullScreenWarningView.h: |
| * platform/mac/WebPlaybackControlsManager.h: |
| * platform/network/cocoa/WebCoreNSURLSession.h: |
| |
| 2017-04-24 Carlos Garcia Campos <cgarcia@igalia.com> |
| |
| [GTK] Switch to use ENABLE_REMOTE_INSPECTOR instead of ENABLE_INSPECTOR_SERVER for the remote inspector |
| https://bugs.webkit.org/show_bug.cgi?id=166680 |
| |
| Reviewed by Michael Catanzaro. |
| |
| Add PageDebuggable.cpp to the compilation. |
| |
| * CMakeLists.txt: |
| |
| 2017-04-23 Commit Queue <commit-queue@webkit.org> |
| |
| Unreviewed, rolling out r215657 and r215676. |
| https://bugs.webkit.org/show_bug.cgi?id=171201 |
| |
| Broke the build (Requested by ap on #webkit). |
| |
| Reverted changesets: |
| |
| "[macOS] Enable media selection button on AVTouchBarScrubber" |
| https://bugs.webkit.org/show_bug.cgi?id=171149 |
| http://trac.webkit.org/changeset/215657 |
| |
| "Build fix after r215657." |
| http://trac.webkit.org/changeset/215676 |
| |
| 2017-04-23 Andy Estes <aestes@apple.com> |
| |
| [macOS] AVTouchBarMediaSelectionOptions should be created with the correct type |
| https://bugs.webkit.org/show_bug.cgi?id=171192 |
| <rdar://problem/29875010> |
| |
| Reviewed by Wenson Hsieh. |
| |
| AVTouchBarMediaSelectionOption was always being created with type |
| AVTouchBarMediaSelectionOptionTypeRegular, but we know if a TextTrack is really the legible |
| off or legible auto track. This change plumbs that information into |
| WebPlaybackControlsManager so that AVTouchBarMediaSelectionOptions can be created with the |
| right AVTouchBarMediaSelectionOptionType. |
| |
| * WebCore.xcodeproj/project.pbxproj: |
| * page/CaptionUserPreferences.cpp: |
| (WebCore::CaptionUserPreferences::mediaSelectionOptionForTrack): |
| * page/CaptionUserPreferences.h: |
| * platform/MediaSelectionOption.h: Added. |
| * platform/cocoa/WebPlaybackSessionModel.h: |
| (WebCore::WebPlaybackSessionModelClient::audioMediaSelectionOptionsChanged): |
| (WebCore::WebPlaybackSessionModelClient::legibleMediaSelectionOptionsChanged): |
| * platform/cocoa/WebPlaybackSessionModelMediaElement.h: |
| * platform/cocoa/WebPlaybackSessionModelMediaElement.mm: |
| (WebCore::WebPlaybackSessionModelMediaElement::audioMediaSelectionOptions): |
| (WebCore::WebPlaybackSessionModelMediaElement::legibleMediaSelectionOptions): |
| * platform/ios/WebPlaybackSessionInterfaceAVKit.h: |
| * platform/ios/WebPlaybackSessionInterfaceAVKit.mm: |
| (WebCore::mediaSelectionOptions): |
| (WebCore::WebPlaybackSessionInterfaceAVKit::audioMediaSelectionOptionsChanged): |
| (WebCore::WebPlaybackSessionInterfaceAVKit::legibleMediaSelectionOptionsChanged): |
| * platform/ios/WebVideoFullscreenControllerAVKit.mm: |
| (WebVideoFullscreenControllerContext::audioMediaSelectionOptionsChanged): |
| (WebVideoFullscreenControllerContext::legibleMediaSelectionOptionsChanged): |
| (WebVideoFullscreenControllerContext::audioMediaSelectionOptions): |
| (WebVideoFullscreenControllerContext::legibleMediaSelectionOptions): |
| * platform/mac/WebPlaybackControlsManager.h: |
| * platform/mac/WebPlaybackControlsManager.mm: |
| (toAVTouchBarMediaSelectionOptionType): |
| (mediaSelectionOptions): |
| (-[WebPlaybackControlsManager setAudioMediaSelectionOptions:withSelectedIndex:]): |
| (-[WebPlaybackControlsManager setLegibleMediaSelectionOptions:withSelectedIndex:]): |
| (-[WebPlaybackControlsManager webPlaybackSessionInterfaceMac]): |
| (-[WebPlaybackControlsManager setWebPlaybackSessionInterfaceMac:]): |
| * platform/mac/WebPlaybackSessionInterfaceMac.h: |
| * platform/mac/WebPlaybackSessionInterfaceMac.mm: |
| (WebCore::WebPlaybackSessionInterfaceMac::audioMediaSelectionOptionsChanged): |
| (WebCore::WebPlaybackSessionInterfaceMac::legibleMediaSelectionOptionsChanged): |
| |
| 2017-04-22 Wenson Hsieh <wenson_hsieh@apple.com> |
| |
| File inputs only accept UTI types that can be inserted into contenteditable areas when dropping |
| https://bugs.webkit.org/show_bug.cgi?id=171177 |
| <rdar://problem/31765379> |
| |
| Reviewed by Andy Estes. |
| |
| Currently, DragController::canProcessDrag bails immediately with `false` if the drag data does not contain |
| compatible content. However, if we are dragging over a file input, we want the presence of files in the drag |
| data to take priority. To fix this, we teach DragData::containsCompatibleContent to take the purpose of the drag |
| into account (by default, this is Editing, but when dragging over a file input, this becomes FileUpload). We |
| then consider DragData to have compatible content for the purpose of file uploading if it contains any files. |
| |
| Test: DataInteractionTests.ExternalSourceJSONToFileInput. |
| |
| * page/DragController.cpp: |
| (WebCore::DragController::canProcessDrag): |
| * platform/DragData.h: |
| * platform/gtk/DragDataGtk.cpp: |
| (WebCore::DragData::containsCompatibleContent): |
| * platform/mac/DragDataMac.mm: |
| (WebCore::DragData::containsCompatibleContent): |
| * platform/win/DragDataWin.cpp: |
| (WebCore::DragData::containsCompatibleContent): |
| |
| 2017-04-22 Eric Carlson <eric.carlson@apple.com> |
| |
| [MediaStream] Fix regression caused by r215626 |
| https://bugs.webkit.org/show_bug.cgi?id=171168 |
| <rdar://problem/31774787> |
| |
| Reviewed by Antoine Quint. |
| |
| No new tests, fixes fast/mediastream/MediaStream-page-muted.html |
| |
| * Modules/mediastream/MediaStream.cpp: |
| (WebCore::MediaStream::mediaState): Test muted before m_isProducingData because if both are |
| true we want to report that the stream is muted. |
| |
| 2017-04-21 Zalan Bujtas <zalan@apple.com> |
| |
| Do not measure large chunk of text repeatedly during mid-word breaking. |
| https://bugs.webkit.org/show_bug.cgi?id=171065 |
| <rdar://problem/31630245> |
| |
| Reviewed by Antti Koivisto. |
| |
| This patch reduces redundant text measuring for mid-word breaking by |
| 1. Adjusting the range for the binary search when the text fragment is longer than the available width |
| 2. Preserving the width value for the left side of the split fragment (computed during the binary search) so |
| that when the fragment is being split we don't need to re-measure it |
| 3. Checking if the right side fits the next line and only adjust the width (by re-measuring the text) for |
| kerning/ligature if it does (if it does not fit, we'll end up re-measuring some part of it |
| during the next split) |
| |
| Performance test has already been added. |
| |
| * rendering/SimpleLineLayout.cpp: |
| (WebCore::SimpleLineLayout::hyphenPositionForFragment): |
| (WebCore::SimpleLineLayout::split): binary search with adjusting the range and preserving the width for the left side. |
| (WebCore::SimpleLineLayout::splitFragmentToFitLine): |
| (WebCore::SimpleLineLayout::FragmentForwardIterator::FragmentForwardIterator): Deleted. |
| (WebCore::SimpleLineLayout::FragmentForwardIterator::operator++): Deleted. |
| (WebCore::SimpleLineLayout::FragmentForwardIterator::operator!=): Deleted. |
| (WebCore::SimpleLineLayout::FragmentForwardIterator::operator==): Deleted. |
| (WebCore::SimpleLineLayout::FragmentForwardIterator::operator*): Deleted. |
| (WebCore::SimpleLineLayout::begin): Deleted. |
| (WebCore::SimpleLineLayout::end): Deleted. |
| * rendering/SimpleLineLayoutTextFragmentIterator.h: |
| (WebCore::SimpleLineLayout::TextFragmentIterator::TextFragment::split): |
| (WebCore::SimpleLineLayout::TextFragmentIterator::TextFragment::splitWithHyphen): |
| |
| 2017-04-21 Wenson Hsieh <wenson_hsieh@apple.com> |
| |
| Support writing link titles to the pasteboard when beginning data interaction on a link |
| https://bugs.webkit.org/show_bug.cgi?id=171154 |
| <rdar://problem/31356937> |
| |
| Reviewed by Andy Estes. |
| |
| Currently, when writing NSURLs to the pasteboard, we only write a String to the pasteboard corresponding to |
| kUTTypeURL. This means richer data associated with the link (in this case, the title) are not captured when |
| writing to the pasteboard. To address this, we introduce a new codepath for writing links to the pasteboard that |
| mirrors the way PasteboardImage and PasteboardWebContent are written to the pasteboard. |
| |
| Test: Augmented DataInteractionTests.LinkToInput. |
| |
| * platform/PasteboardStrategy.h: |
| * platform/PlatformPasteboard.h: |
| |
| Add plumbing support for writing PasteboardURLs. |
| |
| * platform/ios/PasteboardIOS.mm: |
| (WebCore::Pasteboard::write): |
| * platform/ios/PlatformPasteboardIOS.mm: |
| (WebCore::PlatformPasteboard::writeObjectRepresentations): |
| |
| Teach PlatformPasteboard to also set the _title attribute of the NSURL when creating an NSURL representation |
| for registering with the shared WebItemProviderPasteboard. |
| |
| (WebCore::PlatformPasteboard::write): |
| * platform/ios/WebItemProviderPasteboard.mm: |
| |
| Remove deprecation guards and replace deprecated method calls with the latest undeprecated versions. |
| |
| (-[WebItemProviderPasteboard setItemsFromObjectRepresentations:]): |
| |
| 2017-04-21 Michael Catanzaro <mcatanzaro@igalia.com> |
| |
| Unreviewed, rolling out r215608. |
| |
| Hundreds of test failures on GTK bot |
| |
| Reverted changeset: |
| |
| "Reduce copies and allocations in SharedBuffer::append" |
| https://bugs.webkit.org/show_bug.cgi?id=170956 |
| http://trac.webkit.org/changeset/215608 |
| |
| 2017-04-21 Zalan Bujtas <zalan@apple.com> |
| |
| REGRESSION(r205374): <li> content inside <ul> should mid-word wrap when word-break: break-word is present. |
| https://bugs.webkit.org/show_bug.cgi?id=171108 |
| <rdar://problem/30271747> |
| |
| Reviewed by Dan Bernstein. |
| |
| This patch ensures that we search for mid-word breaks when a zero sized element has been committed on the line |
| unless it's an image or some other replaced element with special properties (e.g. list-style: inside). |
| |
| Tests: fast/replaced/ul-li-word-break-break-word.html |
| fast/replaced/zero-width-image-force-linebreak.html |
| |
| * rendering/line/BreakingContext.h: |
| (WebCore::BreakingContext::handleReplaced): |
| (WebCore::BreakingContext::handleText): This matches pre-r205374 behaviour, but it's explicit about whether a |
| replaced width has already been committed on the current line. |
| * rendering/line/LineWidth.cpp: |
| (WebCore::LineWidth::commit): |
| * rendering/line/LineWidth.h: |
| (WebCore::LineWidth::hasCommittedReplaced): |
| (WebCore::LineWidth::addUncommittedReplacedWidth): These 2 last functions were removed with r205374 (and now I am adding them back). |
| |
| 2017-04-21 Jer Noble <jer.noble@apple.com> |
| |
| [MediaCapture] Improvements to CoreAudioCaptureSource |
| https://bugs.webkit.org/show_bug.cgi?id=171146 |
| |
| Reviewed by Eric Carlson. |
| |
| Various interlocking improvements to CoreAudioCaptureSource: |
| |
| - Allow the volume, sampleRate, and echoCancellation settings to be applied to the source. |
| - Update the values returned via settings() when these values change. |
| - Obey the sampleRate and echoCancellation settings when creating the VPIO unit. |
| - Because AudioUnitRender() mutates the passed in AudioBufferList, reset it immediately before calling. |
| |
| * platform/mediastream/mac/CoreAudioCaptureSource.cpp: |
| (WebCore::CoreAudioCaptureSource::create): |
| (WebCore::CoreAudioCaptureSource::CoreAudioCaptureSource): |
| (WebCore::CoreAudioCaptureSource::preferredSampleRate): |
| (WebCore::CoreAudioCaptureSource::preferredIOBufferSize): |
| (WebCore::CoreAudioCaptureSource::configureMicrophoneProc): |
| (WebCore::CoreAudioCaptureSource::configureSpeakerProc): |
| (WebCore::CoreAudioCaptureSource::processMicrophoneSamples): |
| (WebCore::CoreAudioCaptureSource::setupAudioUnits): |
| (WebCore::CoreAudioCaptureSource::stopProducingData): |
| (WebCore::CoreAudioCaptureSource::settings): |
| (WebCore::CoreAudioCaptureSource::settingsDidChange): |
| (WebCore::CoreAudioCaptureSource::preferredIOBufferDuration): Deleted. |
| * platform/mediastream/mac/CoreAudioCaptureSource.h: |
| |
| 2017-04-21 Youenn Fablet <youenn@apple.com> |
| |
| com.apple.WebCore: non-virtual thunk to WebCore::LibWebRTCDataChannelHandler::OnBufferedAmountChange + 39 |
| https://bugs.webkit.org/show_bug.cgi?id=171087 |
| <rdar://problem/31739051> |
| |
| Reviewed by Eric Carlson. |
| |
| Covered by existing tests. |
| No test added as this behavior is really libwebrtc specific and cannot be triggered easily. |
| |
| * Modules/mediastream/RTCDataChannel.cpp: |
| (WebCore::RTCDataChannel::close): Stopping observing libwebrtc data channel before closing it. |
| This ensures we will stop getting notified as soon as there is no more interest. |
| * Modules/mediastream/libwebrtc/LibWebRTCDataChannelHandler.cpp: |
| (WebCore::LibWebRTCDataChannelHandler::OnStateChange): libwebrtc can still notify us even though we said we were |
| not interested. Ensuring we do not call the client if we are no longer interested. |
| (WebCore::LibWebRTCDataChannelHandler::OnMessage): Ditto. |
| (WebCore::LibWebRTCDataChannelHandler::OnBufferedAmountChange): Ditto. |
| |
| 2017-04-21 Andy Estes <aestes@apple.com> |
| |
| [macOS] Enable media selection button on AVTouchBarScrubber |
| https://bugs.webkit.org/show_bug.cgi?id=171149 |
| <rdar://problem/29875010> |
| |
| Reviewed by Beth Dakin. |
| |
| * platform/spi/cocoa/AVKitSPI.h: |
| |
| 2017-04-21 Andy Estes <aestes@apple.com> |
| |
| [macOS] Name WebPlaybackControlsManager delegate methods correctly depending on OS version |
| https://bugs.webkit.org/show_bug.cgi?id=171147 |
| <rdar://problem/29875010> |
| |
| Reviewed by Beth Dakin. |
| |
| On macOS 10.12, WebPlaybackControlsManager conforms to |
| AVFunctionBarPlaybackControlsControlling, but on 10.13 it conforms to |
| AVTouchBarPlaybackControlsControlling. These protocols are near-identical, except for |
| instances of "FunctionBar" in method names are renamed to "TouchBar". This patch updates to |
| the new method names, and generally renames things with "FunctionBar" to "TouchBar". |
| |
| * platform/mac/WebPlaybackControlsManager.h: |
| * platform/mac/WebPlaybackControlsManager.mm: |
| (-[WebPlaybackControlsManager generateTouchBarThumbnailsForTimes:tolerance:size:thumbnailHandler:]): |
| (-[WebPlaybackControlsManager generateTouchBarAudioAmplitudeSamples:completionHandler:]): |
| (-[WebPlaybackControlsManager canBeginTouchBarScrubbing]): |
| (-[WebPlaybackControlsManager beginTouchBarScrubbing]): |
| (-[WebPlaybackControlsManager endTouchBarScrubbing]): |
| (-[WebPlaybackControlsManager generateFunctionBarThumbnailsForTimes:size:completionHandler:]): |
| (-[WebPlaybackControlsManager generateFunctionBarAudioAmplitudeSamples:completionHandler:]): |
| (-[WebPlaybackControlsManager canBeginFunctionBarScrubbing]): |
| (-[WebPlaybackControlsManager beginFunctionBarScrubbing]): |
| (-[WebPlaybackControlsManager endFunctionBarScrubbing]): |
| (-[WebPlaybackControlsManager audioTouchBarMediaSelectionOptions]): |
| (-[WebPlaybackControlsManager setAudioTouchBarMediaSelectionOptions:]): |
| (-[WebPlaybackControlsManager currentAudioTouchBarMediaSelectionOption]): |
| (-[WebPlaybackControlsManager setCurrentAudioTouchBarMediaSelectionOption:]): |
| (-[WebPlaybackControlsManager legibleTouchBarMediaSelectionOptions]): |
| (-[WebPlaybackControlsManager setLegibleTouchBarMediaSelectionOptions:]): |
| (-[WebPlaybackControlsManager currentLegibleTouchBarMediaSelectionOption]): |
| (-[WebPlaybackControlsManager setCurrentLegibleTouchBarMediaSelectionOption:]): |
| (-[WebPlaybackControlsManager setAudioMediaSelectionOptions:withSelectedIndex:]): |
| (-[WebPlaybackControlsManager setLegibleMediaSelectionOptions:withSelectedIndex:]): |
| (-[WebPlaybackControlsManager audioFunctionBarMediaSelectionOptions]): Deleted. |
| (-[WebPlaybackControlsManager setAudioFunctionBarMediaSelectionOptions:]): Deleted. |
| (-[WebPlaybackControlsManager currentAudioFunctionBarMediaSelectionOption]): Deleted. |
| (-[WebPlaybackControlsManager setCurrentAudioFunctionBarMediaSelectionOption:]): Deleted. |
| (-[WebPlaybackControlsManager legibleFunctionBarMediaSelectionOptions]): Deleted. |
| (-[WebPlaybackControlsManager setLegibleFunctionBarMediaSelectionOptions:]): Deleted. |
| (-[WebPlaybackControlsManager currentLegibleFunctionBarMediaSelectionOption]): Deleted. |
| (-[WebPlaybackControlsManager setCurrentLegibleFunctionBarMediaSelectionOption:]): Deleted. |
| |
| 2017-04-21 Jer Noble <jer.noble@apple.com> |
| |
| Make CoreAudioCaptureDevice stackable. |
| https://bugs.webkit.org/show_bug.cgi?id=171097 |
| |
| Reviewed by Eric Carlson. |
| |
| There's no real reason to keep CoreAudioCaptureDevice from being created on the stack. |
| Make it un-RefCounted, and have it's static factory method return an std::optional rather |
| than a RefPtr. |
| |
| Drive-by fix: clean up the factory method of CoreAudioCaptureSource a bit. |
| |
| * platform/mediastream/mac/CoreAudioCaptureDevice.cpp: |
| (WebCore::CoreAudioCaptureDevice::create): |
| (WebCore::CoreAudioCaptureDevice::deviceID): Deleted. |
| * platform/mediastream/mac/CoreAudioCaptureDevice.h: |
| (WebCore::CoreAudioCaptureDevice::deviceID): |
| * platform/mediastream/mac/CoreAudioCaptureDeviceManager.cpp: |
| (WebCore::CoreAudioCaptureDeviceManager::coreAudioCaptureDevices): |
| (WebCore::CoreAudioCaptureDeviceManager::coreAudioDeviceWithUID): |
| (WebCore::CoreAudioCaptureDeviceManager::refreshAudioCaptureDevices): |
| * platform/mediastream/mac/CoreAudioCaptureDeviceManager.h: |
| * platform/mediastream/mac/CoreAudioCaptureSource.cpp: |
| (WebCore::CoreAudioCaptureSource::create): |
| (WebCore::CoreAudioCaptureSource::CoreAudioCaptureSource): |
| * platform/mediastream/mac/CoreAudioCaptureSource.h: |
| |
| 2017-04-21 Eric Carlson <eric.carlson@apple.com> |
| |
| [MediaStream iOS] Release capture session when not producing data |
| https://bugs.webkit.org/show_bug.cgi?id=171148 |
| <rdar://problem/29265868> |
| |
| Reviewed by Jer Noble. |
| |
| On iOS, only one AVCaptureSession can be active at a time, so release a session whenever |
| it is told to stop producing data. The session will recreated if the capture source if/when |
| told to produce data again. |
| |
| * platform/mediastream/mac/AVMediaCaptureSource.mm: |
| (WebCore::AVMediaCaptureSource::stopProducingData): Clear m_session to release the session. |
| It will be re-allocated if startProducingData is called later. |
| |
| 2017-04-21 Aaron Chu <aaron_chu@apple.com> |
| |
| AX: FKA: Buttons need a visible focus indicator |
| https://bugs.webkit.org/show_bug.cgi?id=171040 |
| <rdar://problem/30922548> |
| |
| Reviewed by Antoine Quint. |
| |
| Added a background color for the focus state of the icon buttons in modern media controls. |
| |
| Test: media/modern-media-controls/icon-button/icon-button-focus-state.html |
| |
| * Modules/modern-media-controls/controls/icon-button.css: |
| (button.icon:focus): |
| |
| 2017-03-22 Matt Rajca <mrajca@apple.com> |
| |
| Consider muting audio hardware a form of autoplay interference. |
| https://bugs.webkit.org/show_bug.cgi?id=169971 |
| |
| Reviewed by Eric Carlson. |
| |
| If the user mutes audio hardware and a media element is auto-playing, consider that |
| as a form of auto-play interference that we tell clients about. |
| |
| * html/HTMLMediaElement.cpp: |
| (WebCore::HTMLMediaElement::HTMLMediaElement): |
| (WebCore::HTMLMediaElement::~HTMLMediaElement): |
| (WebCore::HTMLMediaElement::hardwareMutedStateDidChange): |
| * html/HTMLMediaElement.h: |
| * platform/audio/AudioSession.h: |
| (WebCore::AudioSession::MutedStateObserver::~MutedStateObserver): |
| * platform/audio/mac/AudioSessionMac.cpp: |
| (WebCore::AudioSession::isMuted): |
| (WebCore::muteProcess): |
| (WebCore::AudioSession::handleMutedStateChange): |
| (WebCore::AudioSession::addMutedStateObserver): |
| (WebCore::AudioSession::removeMutedStateObserver): |
| |
| 2017-04-21 Chris Dumez <cdumez@apple.com> |
| |
| Regression(r206240): XMLSerializer.serializeToString() does not properly escape '<' / '>' in attribute values |
| https://bugs.webkit.org/show_bug.cgi?id=171132 |
| <rdar://problem/31426752> |
| |
| Reviewed by Ryosuke Niwa. |
| |
| Use XMLSerialization [1] in MarkupAccumulator::appendAttribute() when inXMLFragmentSerialization() |
| returns true, even if the node's associated document is an HTML document. When XMLSerializer.serializeToString() |
| is called on a Node, we want XML serialization, even if the node comes from an HTML document. |
| |
| [1] https://w3c.github.io/DOM-Parsing/#dfn-xml-serialization |
| |
| Test: fast/dom/XMLSerializer-serializeToString-entities.html |
| |
| * editing/MarkupAccumulator.cpp: |
| (WebCore::MarkupAccumulator::appendAttributeValue): |
| (WebCore::MarkupAccumulator::appendAttribute): |
| * editing/MarkupAccumulator.h: |
| |
| 2017-04-20 Sam Weinig <sam@webkit.org> |
| |
| Split cryptographic digest computation and parsing out of CSP code so it can be reused |
| https://bugs.webkit.org/show_bug.cgi?id=171076 |
| |
| Reviewed by Chris Dumez. |
| |
| Factor out cryptographic digest parsing from Content Security Policy code |
| so that it can be reused for the Subresource Integrity implementation. |
| |
| * CMakeLists.txt: |
| * WebCore.xcodeproj/project.pbxproj: |
| Add new files. |
| |
| * html/parser/ParsingUtilities.h: |
| (WebCore::skipExactlyIgnoringASCIICase): |
| Add parsing helper to match / skip over a constant string, using IgnoringASCIICase semantics. |
| |
| * loader/ResourceCryptographicDigest.cpp: Added. |
| (WebCore::parseHashAlgorithmAdvancingPosition): |
| (WebCore::parseCryptographicDigestImpl): |
| (WebCore::parseCryptographicDigest): |
| Move parsing of cryptographic-digest strings from ContentSecurityPolicySourceList.cpp |
| and optimize it a little by avoiding String allocations and generalizing it so that it |
| can parse either UChars or LChars. |
| |
| * loader/ResourceCryptographicDigest.h: Added. |
| (WebCore::ResourceCryptographicDigest::operator==): |
| (WebCore::ResourceCryptographicDigest::operator!=): |
| (WTF::DefaultHash<WebCore::ResourceCryptographicDigest>::Hash::hash): |
| (WTF::DefaultHash<WebCore::ResourceCryptographicDigest>::Hash::equal): |
| (WTF::HashTraits<WebCore::ResourceCryptographicDigest>::emptyValue): |
| (WTF::HashTraits<WebCore::ResourceCryptographicDigest>::constructDeletedValue): |
| (WTF::HashTraits<WebCore::ResourceCryptographicDigest>::isDeletedValue): |
| Add a struct (rather than using a std::pair) to represent the digest + algorithm. And add |
| HashTraits so it can be used as HashMap. |
| |
| * page/csp/ContentSecurityPolicy.cpp: |
| (WebCore::ContentSecurityPolicy::findHashOfContentInPolicies): |
| (WebCore::toCryptoDigestAlgorithm): Deleted. |
| Move algorithm conversion to ResourceCryptographicDigest.cpp. Make use of new |
| cryptographicDigestForBytes function to do hashing. |
| |
| * page/csp/ContentSecurityPolicy.h: |
| * page/csp/ContentSecurityPolicyHash.h: |
| (WTF::DefaultHash<WebCore::ContentSecurityPolicyDigest>::Hash::hash): Deleted. |
| (WTF::DefaultHash<WebCore::ContentSecurityPolicyDigest>::Hash::equal): Deleted. |
| Remove HashTraits for the digest, this is now handled by ResourceCryptographicDigest. |
| To keep things relatively straight-forward, redefine ContentSecurityPolicyHashAlgorithm |
| and ContentSecurityPolicyHash in terms of ResourceCryptographicDigest, so that less code |
| has to be changed all at once. In a later pass, if wanted, we can remove these using |
| declarations. |
| |
| * page/csp/ContentSecurityPolicySourceList.cpp: |
| (WebCore::isNonceCharacter): |
| Use renamed isBase64OrBase64URLCharacter predicate. |
| |
| (WebCore::ContentSecurityPolicySourceList::parseHashSource): |
| Rework using ResourceCryptographicDigest parsing. Quotation and maximum digest |
| length have been kept here, as they are not applicable to other uses of |
| the digest, specifically Subresource Integrity. |
| |
| 2017-04-21 Jer Noble <jer.noble@apple.com> |
| |
| Unreviewed fix after r215624; null-deref crash. |
| |
| Make sure to call reset() inside each constructor. |
| |
| * platform/audio/WebAudioBufferList.cpp: |
| (WebCore::WebAudioBufferList::WebAudioBufferList): |
| |
| 2017-04-21 Anders Carlsson <andersca@apple.com> |
| |
| Stop using deprecated APIs, part 5 |
| https://bugs.webkit.org/show_bug.cgi?id=171134 |
| rdar://problem/31589635 |
| |
| Reviewed by Tim Horton. |
| |
| * Modules/applepay/ApplePaySession.cpp: |
| (WebCore::convertAndValidate): |
| Stop using the toPaymentAuthorizationStatus. Convert the passed in status results to the remaining |
| PaymentAuthorizationStatus values, and add errors if needed. |
| |
| (WebCore::toPaymentAuthorizationStatus): |
| This function is no longer used. |
| |
| * Modules/applepay/PaymentAuthorizationStatus.h: |
| Remove deprecated status values. We can achieve the same results with errors now. |
| |
| * Modules/applepay/PaymentRequest.cpp: |
| (WebCore::isFinalStateResult): |
| Remove deprecated status values. |
| |
| * Modules/applepay/PaymentRequest.h: |
| Remove deprecated status values. |
| |
| 2017-04-21 Per Arne Vollan <pvollan@apple.com> |
| |
| Validate vImage arguments |
| https://bugs.webkit.org/show_bug.cgi?id=171109 |
| rdar://problem/30236606 |
| |
| Reviewed by Brent Fulgham. |
| |
| When writing data to a canvas context, clip the source rectangle to the data rectangle |
| to make sure we will not attempt to read data outside of the buffer. |
| |
| Test: fast/canvas/canvas-crash.html |
| |
| * html/canvas/CanvasRenderingContext2D.cpp: |
| (WebCore::CanvasRenderingContext2D::putImageData): |
| |
| 2017-04-21 David Kilzer <ddkilzer@apple.com> |
| |
| Switch from -std=gnu++11 to -std=gnu++14 for consistency in DerivedSources.make |
| <https://webkit.org/b/171122> |
| |
| Reviewed by Brent Fulgham. |
| |
| * DerivedSources.make: Switch to -std=gnu++14 for preprocessing |
| headers to check for build settings. |
| |
| 2017-04-21 Jer Noble <jer.noble@apple.com> |
| |
| [MediaCapture][iOS] AVAudioSession must be active and the correct category before IO AudioUnits start producing data. |
| https://bugs.webkit.org/show_bug.cgi?id=171095 |
| |
| Reviewed by Youenn Fablet. |
| |
| If an input audio unit is asked to start before the AVAudioSession is in a recording category and active, |
| CoreAudio will return an error stating that no input device is available. |
| |
| The PlatformMediaSessionManager will automatically set the category of and activate the AVAudioSession when one |
| of its associated MediaStreams has a capturing RealtimeMediaSource and is currently producing data. To solve |
| the chicken-or-egg problem of activating the AVAudioSession before the source produces data, move the state bit |
| of "producing data" directly into MediaStreams, and notify the PlatformMediaSessionManager that capturing is |
| occurring after flipping that bit, but before asking the constituent tracks to begin producing data. |
| |
| In places (i.e. UserMediaRequest) where we previously told a stream's tracks to begin producing data, instead |
| allow the stream to handle that by telling it to produce data directly. |
| |
| * Modules/mediastream/MediaStream.cpp: |
| (WebCore::MediaStream::startProducingData): |
| (WebCore::MediaStream::stopProducingData): |
| (WebCore::MediaStream::mediaState): |
| (WebCore::MediaStream::mediaType): |
| (WebCore::MediaStream::characteristics): |
| (WebCore::MediaStream::canProduceAudio): |
| * Modules/mediastream/MediaStream.h: |
| * Modules/mediastream/UserMediaRequest.cpp: |
| (WebCore::UserMediaRequest::allow): |
| * platform/mediastream/mac/CoreAudioCaptureSource.h: |
| |
| 2017-04-21 Jer Noble <jer.noble@apple.com> |
| |
| Add a method to retrieve the current I/O buffer size from AudioSession |
| https://bugs.webkit.org/show_bug.cgi?id=171126 |
| |
| Reviewed by Eric Carlson. |
| |
| There is an existing method to get and set the preferred I/O buffer size; add a matching method to return |
| the acutal I/O buffer size. |
| |
| * platform/audio/AudioSession.cpp: |
| (WebCore::AudioSession::bufferSize): |
| * platform/audio/AudioSession.h: |
| * platform/audio/ios/AudioSessionIOS.mm: |
| (WebCore::AudioSession::bufferSize): |
| * platform/audio/mac/AudioSessionMac.cpp: |
| (WebCore::AudioSession::bufferSize): |
| |
| 2017-04-21 Jer Noble <jer.noble@apple.com> |
| |
| Make AudioSampleBufferList::reset() less expensive. |
| https://bugs.webkit.org/show_bug.cgi?id=171124 |
| |
| Reviewed by Eric Carlson. |
| |
| Previously, AudioSampleBufferList would reallocate its constituent WebAudioBufferList every time reset() was |
| called. Instead, add a reset() method to WebAudioBufferList which re-initializes its AudioBufferList (which is a |
| simple memcpy of a 24-byte struct), reusing the existing memory buffers. |
| |
| While making these changes, we'll also take the opportunity to clean up the AudioSampleBufferList class by |
| making some of its members into UniqueRefs instead of unique_ptrs, thus removing the possibility of null- |
| dereferences. |
| |
| * platform/audio/WebAudioBufferList.cpp: |
| (WebCore::WebAudioBufferList::WebAudioBufferList): |
| (WebCore::WebAudioBufferList::reset): |
| * platform/audio/WebAudioBufferList.h: |
| * platform/audio/mac/AudioSampleBufferList.cpp: |
| (WebCore::AudioSampleBufferList::AudioSampleBufferList): |
| (WebCore::AudioSampleBufferList::applyGain): |
| (WebCore::AudioSampleBufferList::mixFrom): |
| (WebCore::AudioSampleBufferList::reset): |
| (WebCore::AudioSampleBufferList::zero): |
| (WebCore::AudioSampleBufferList::~AudioSampleBufferList): Deleted. |
| * platform/audio/mac/AudioSampleBufferList.h: |
| (WebCore::AudioSampleBufferList::bufferList): |
| |
| 2017-04-21 Jer Noble <jer.noble@apple.com> |
| |
| Fix some spurious ASSERTs when working with capturing media elements |
| https://bugs.webkit.org/show_bug.cgi?id=171096 |
| |
| Reviewed by Youenn Fablet. |
| |
| Two related ASSERTS: |
| |
| 1) When we added a new PlatformMediaSession MediaType (MediaStreamCapturingAudio), we did not update all the |
| places that validated the enum. This would lead to spurious ASSERTs when an element capturing audio would |
| fail various checks to enusre it's type's validity. |
| |
| 2) Audio elements will ASSERT when they change page visibility, as they do not have a renderer which implements |
| visibleInViewportStateChanged(). So opt out of visibility-state checking for non-video media elements. |
| |
| * html/MediaElementSession.cpp: |
| (WebCore::MediaElementSession::wantsToObserveViewportVisibilityForAutoplay): |
| * platform/audio/PlatformMediaSessionManager.cpp: |
| (WebCore::PlatformMediaSessionManager::resetRestrictions): |
| (WebCore::PlatformMediaSessionManager::addRestriction): |
| (WebCore::PlatformMediaSessionManager::removeRestriction): |
| (WebCore::PlatformMediaSessionManager::restrictions): |
| * platform/audio/PlatformMediaSessionManager.h: |
| |
| 2017-04-21 Konstantin Tokarev <annulen@yandex.ru> |
| |
| [cmake] WTF target should not have wtf and subdirectries in public interface |
| https://bugs.webkit.org/show_bug.cgi?id=171115 |
| |
| Reviewed by Michael Catanzaro. |
| |
| In r209665 WEBCORE_FRAMEWORK macro started to export INCLUDE_DIRECTORIES of |
| targets as their public interface, so that linked targets can use them |
| implicitly without copying directory lists around. This matches existing |
| practice for all targets except WTF, headers from which are always included |
| with full path starting from "<wtf/...". |
| |
| Since r209665 it became possible to include headers from wtf or its |
| subdirectories in CMake builds without using "<wtf/..." path. It should |
| not be allowed. |
| |
| * platform/graphics/texmap/coordinated/TiledBackingStore.cpp: Fix |
| incorrect include of WTF header. |
| |
| 2017-04-21 Gwang Yoon Hwang <yoon@igalia.com> |
| |
| Do not paint the border of the box if the dirty region does not intersect with border area |
| https://bugs.webkit.org/show_bug.cgi?id=170988 |
| |
| Reviewed by Simon Fraser. |
| |
| No new tests, since there is no change in behavior. |
| |
| * platform/graphics/GeometryUtilities.cpp: |
| (WebCore::ellipseContainsPoint): |
| Checks if a point is within an ellipse. |
| |
| * platform/graphics/GeometryUtilities.h: |
| Replace header-guards with #pragma once. |
| |
| * platform/graphics/RoundedRect.cpp: |
| (WebCore::RoundedRect::contains): |
| Implemented to know the dirty rectangle intersects with rounded rectangle or not. |
| * platform/graphics/RoundedRect.h: |
| * rendering/RenderBoxModelObject.cpp: |
| (WebCore::RenderBoxModelObject::paintBorder): |
| When typing in decorated text box, the dirty rect generated only for the |
| inside of the text box, not for the decorations. So we can avoid the |
| calculations to draw borders if the inner border totally covers the |
| target surface. It will optimize the rendering process since we don't |
| have to render border decorations whenever we type somethings in side of |
| the text input element. |
| |
| 2017-04-21 Anders Carlsson <andersca@apple.com> |
| |
| Remove another use of toPaymentAuthorizationStatus |
| https://bugs.webkit.org/show_bug.cgi?id=171114 |
| |
| Reviewed by Dan Bernstein. |
| |
| * Modules/applepay/ApplePaySession.cpp: |
| (WebCore::ApplePaySession::completeShippingContactSelection): |
| |
| 2017-04-21 Alex Christensen <achristensen@webkit.org> |
| |
| Reduce copies and allocations in SharedBuffer::append |
| https://bugs.webkit.org/show_bug.cgi?id=170956 |
| |
| Reviewed by Andreas Kling. |
| |
| SharedBuffer was a mess of different data structures added over the years. |
| SharedBuffer::append would allocate large Vector<char>s and call memcpy, and that |
| is inefficient and causes crashes when large allocations fail, and the allocations |
| and copies aren't even necessary. There were also const correctness problems in |
| ResourceLoader::addDataOrBuffer, and iterating a SharedBuffer was strange because |
| sometimes we don't want to add unnecessary copies. |
| |
| These problems are solved by making SharedBuffer a Vector of read-only data segments, |
| which can be contained in various ways but we don't care because all we want to do is |
| read them. Appending SharedBuffers is now const correct because we just add to a |
| Vector<Ref<DataSegment>> and neither SharedBuffer can write to the data. Sometimes, |
| though, we want all the data to be in continuous memory, and if there are multiple |
| segments then the data needs to be copied once to a new segment. We should audit the |
| call sites of SharedBuffer::data and see if this is really necessary. |
| |
| No change in functional behavior. Fewer copies of the data are made when buffering |
| data in the NetworkProcess. No extra memory is allocated for bytes we think we might |
| need to append in the future. Data is now only copied into one buffer lazily as needed, |
| which could slightly change when small delays from memcpy happen, but it's an overall |
| improvement. We could have a performance hit if we were to call append() then data() |
| then append() then data() etc. but that doesn't happen in WebKit because we call append |
| repeatedly when buffering the data then call data() once when reading the data. |
| |
| * editing/cocoa/EditorCocoa.mm: |
| (WebCore::archivedDataForAttributedString): |
| (WebCore::Editor::selectionInWebArchiveFormat): |
| (WebCore::Editor::dataInRTFDFormat): |
| (WebCore::Editor::dataInRTFFormat): |
| * editing/ios/EditorIOS.mm: |
| (WebCore::Editor::WebContentReader::readURL): |
| * editing/mac/EditorMac.mm: |
| (WebCore::Editor::imageInWebArchiveFormat): |
| * loader/TextTrackLoader.cpp: |
| (WebCore::TextTrackLoader::processNewCueData): |
| * loader/archive/cf/LegacyWebArchive.cpp: |
| (WebCore::LegacyWebArchive::createResource): |
| * loader/cache/CachedResource.cpp: |
| (WebCore::CachedResource::tryReplaceEncodedData): |
| * loader/cocoa/DiskCacheMonitorCocoa.mm: |
| (WebCore::DiskCacheMonitor::tryGetFileBackedSharedBufferFromCFURLCachedResponse): |
| * platform/SharedBuffer.cpp: |
| (WebCore::SharedBuffer::SharedBuffer): |
| (WebCore::SharedBuffer::create): |
| (WebCore::SharedBuffer::combineToOneSegment): |
| (WebCore::SharedBuffer::data): |
| (WebCore::SharedBuffer::createArrayBuffer): |
| (WebCore::SharedBuffer::append): |
| (WebCore::SharedBuffer::clear): |
| (WebCore::SharedBuffer::copy): |
| (WebCore::SharedBuffer::DataSegment::data): |
| (WebCore::SharedBuffer::DataSegment::size): |
| (WebCore::segmentIndex): Deleted. |
| (WebCore::offsetInSegment): Deleted. |
| (WebCore::allocateSegment): Deleted. |
| (WebCore::freeSegment): Deleted. |
| (WebCore::SharedBuffer::~SharedBuffer): Deleted. |
| (WebCore::SharedBuffer::size): Deleted. |
| (WebCore::SharedBuffer::duplicateDataBufferIfNecessary): Deleted. |
| (WebCore::SharedBuffer::appendToDataBuffer): Deleted. |
| (WebCore::SharedBuffer::clearDataBuffer): Deleted. |
| (WebCore::SharedBuffer::copyBufferAndClear): Deleted. |
| (WebCore::SharedBuffer::buffer): Deleted. |
| (WebCore::SharedBuffer::getSomeData): Deleted. |
| (WebCore::SharedBuffer::maybeTransferMappedFileData): Deleted. |
| (WebCore::SharedBuffer::clearPlatformData): Deleted. |
| (WebCore::SharedBuffer::maybeTransferPlatformData): Deleted. |
| (WebCore::SharedBuffer::hasPlatformData): Deleted. |
| (WebCore::SharedBuffer::platformData): Deleted. |
| (WebCore::SharedBuffer::maybeAppendPlatformData): Deleted. |
| * platform/SharedBuffer.h: |
| (WebCore::SharedBuffer::create): Deleted. |
| (WebCore::SharedBuffer::isEmpty): Deleted. |
| * platform/SharedBufferChunkReader.cpp: |
| (WebCore::SharedBufferChunkReader::nextChunk): |
| (WebCore::SharedBufferChunkReader::peek): |
| * platform/SharedBufferChunkReader.h: |
| * platform/URLParser.cpp: |
| (WebCore::URLParser::URLParser): |
| * platform/cf/KeyedEncoderCF.cpp: |
| (WebCore::KeyedEncoderCF::finishEncoding): |
| * platform/cf/SharedBufferCF.cpp: |
| (WebCore::SharedBuffer::SharedBuffer): |
| (WebCore::SharedBuffer::createCFData): |
| (WebCore::SharedBuffer::create): |
| (WebCore::SharedBuffer::hintMemoryNotNeededSoon): |
| (WebCore::SharedBuffer::append): |
| (WebCore::SharedBuffer::wrapCFData): Deleted. |
| (WebCore::SharedBuffer::hasPlatformData): Deleted. |
| (WebCore::SharedBuffer::platformData): Deleted. |
| (WebCore::SharedBuffer::platformDataSize): Deleted. |
| (WebCore::SharedBuffer::maybeTransferPlatformData): Deleted. |
| (WebCore::SharedBuffer::clearPlatformData): Deleted. |
| (WebCore::SharedBuffer::tryReplaceContentsWithPlatformBuffer): Deleted. |
| (WebCore::SharedBuffer::maybeAppendPlatformData): Deleted. |
| (WebCore::SharedBuffer::copyBufferAndClear): Deleted. |
| (WebCore::SharedBuffer::copySomeDataFromDataArray): Deleted. |
| (WebCore::SharedBuffer::singleDataArrayBuffer): Deleted. |
| (WebCore::SharedBuffer::maybeAppendDataArray): Deleted. |
| * platform/cocoa/NetworkExtensionContentFilter.mm: |
| (WebCore::NetworkExtensionContentFilter::replacementData): |
| * platform/cocoa/ParentalControlsContentFilter.mm: |
| (WebCore::ParentalControlsContentFilter::replacementData): |
| * platform/cocoa/SharedBufferCocoa.mm: |
| (-[WebCoreSharedBufferData initWithSharedBufferDataSegment:]): |
| (-[WebCoreSharedBufferData length]): |
| (-[WebCoreSharedBufferData bytes]): |
| (WebCore::SharedBuffer::create): |
| (WebCore::SharedBuffer::createCFData): |
| (WebCore::SharedBuffer::createFromReadingFile): |
| (WebCore::SharedBuffer::createNSDataArray): |
| (-[WebCoreSharedBufferData initWithSharedBufferDataBuffer:]): Deleted. |
| (WebCore::SharedBuffer::wrapNSData): Deleted. |
| (WebCore::SharedBuffer::existingCFData): Deleted. |
| * platform/graphics/avfoundation/objc/WebCoreAVFResourceLoader.mm: |
| (WebCore::WebCoreAVFResourceLoader::fulfillRequestWithResource): |
| * platform/graphics/cocoa/FontPlatformDataCocoa.mm: |
| (WebCore::FontPlatformData::openTypeTable): |
| * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp: |
| (ResourceHandleStreamingClient::didReceiveBuffer): |
| * platform/graphics/mac/ImageMac.mm: |
| (WebCore::Image::loadPlatformResource): |
| * platform/image-decoders/ImageDecoder.cpp: |
| (WebCore::ImageDecoder::create): |
| * platform/image-decoders/png/PNGImageDecoder.cpp: |
| (WebCore::PNGImageReader::decode): |
| * platform/ios/PlatformPasteboardIOS.mm: |
| (WebCore::PlatformPasteboard::readBuffer): |
| * platform/mac/PasteboardMac.mm: |
| (WebCore::writeFileWrapperAsRTFDAttachment): |
| (WebCore::Pasteboard::write): |
| * platform/mac/PlatformPasteboardMac.mm: |
| (WebCore::PlatformPasteboard::bufferForType): |
| * platform/network/BlobResourceHandle.cpp: |
| (WebCore::BlobResourceHandle::notifyReceiveData): |
| * platform/network/MIMEHeader.cpp: |
| * platform/network/MIMEHeader.h: |
| * platform/network/cf/ResourceHandleCFURLConnectionDelegateWithOperationQueue.cpp: |
| (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::didReceiveData): |
| * platform/network/cf/SynchronousResourceHandleCFURLConnectionDelegate.cpp: |
| (WebCore::SynchronousResourceHandleCFURLConnectionDelegate::didReceiveData): |
| * platform/network/mac/WebCoreResourceHandleAsDelegate.mm: |
| (-[WebCoreResourceHandleAsDelegate connection:didReceiveData:lengthReceived:]): |
| * platform/network/mac/WebCoreResourceHandleAsOperationQueueDelegate.mm: |
| (-[WebCoreResourceHandleAsOperationQueueDelegate connection:didReceiveData:lengthReceived:]): |
| * platform/soup/SharedBufferSoup.cpp: |
| (WebCore::SharedBuffer::SharedBuffer): |
| (WebCore::SharedBuffer::createSoupBuffer): |
| (WebCore::SharedBuffer::clearPlatformData): Deleted. |
| (WebCore::SharedBuffer::maybeTransferPlatformData): Deleted. |
| (WebCore::SharedBuffer::hasPlatformData): Deleted. |
| (WebCore::SharedBuffer::platformData): Deleted. |
| (WebCore::SharedBuffer::platformDataSize): Deleted. |
| (WebCore::SharedBuffer::maybeAppendPlatformData): Deleted. |
| (WebCore::SharedBuffer::tryReplaceContentsWithPlatformBuffer): Deleted. |
| |
| 2017-04-21 Timothy Horton <timothy_horton@apple.com> |
| |
| Expose obscured insets to web content (as "safe area insets") |
| https://bugs.webkit.org/show_bug.cgi?id=171013 |
| <rdar://problem/31564652> |
| |
| Reviewed by Wenson Hsieh and Dave Hyatt. |
| |
| Tests: fast/css/variables/constants/invalid-constant-name-fallback.html |
| fast/css/variables/constants/ios/safe-area-inset-set.html |
| fast/css/variables/constants/safe-area-inset-cannot-override.html |
| fast/css/variables/constants/safe-area-inset-zero.html |
| |
| * CMakeLists.txt: |
| * WebCore.xcodeproj/project.pbxproj: |
| * css/CSSValueKeywords.in: |
| * css/CSSVariableData.cpp: |
| (WebCore::CSSVariableData::checkVariablesForCyclesWithRange): |
| (WebCore::CSSVariableData::resolveTokenRange): |
| * css/parser/CSSVariableParser.cpp: |
| (WebCore::isValidConstantName): |
| (WebCore::classifyBlock): |
| (WebCore::isValidConstantReference): |
| Add a constant() function, which takes both custom properties and |
| arbitrary idents which are looked up in ConstantPropertyMap, allowing |
| fallback from the arbitrary, UA-defined idents to custom properties. |
| |
| * dom/ConstantPropertyMap.cpp: Added. |
| (WebCore::ConstantPropertyMap::ConstantPropertyMap): |
| (WebCore::ConstantPropertyMap::values): |
| (WebCore::ConstantPropertyMap::nameForProperty): |
| (WebCore::ConstantPropertyMap::setValueForProperty): |
| (WebCore::ConstantPropertyMap::buildValues): |
| (WebCore::variableDataForSafeAreaInset): |
| (WebCore::ConstantPropertyMap::didChangeObscuredInsets): |
| * dom/ConstantPropertyMap.h: Added. |
| Keep a mapping of UA-defined "constants", which can be looked up |
| from CSS via the aforementioned function. For now, this mapping |
| includes only safe-area-inset-{top, right, bottom, left}, which |
| expose the obscured insets (now that they can be painted into via |
| the viewport parameter clip-to-safe-area-inset=no). |
| |
| * dom/Document.cpp: |
| (WebCore::Document::Document): |
| (WebCore::Document::didChangeObscuredInsets): |
| * dom/Document.h: |
| (WebCore::Document::constantProperties): |
| * page/Page.cpp: |
| (WebCore::Page::setObscuredInsets): |
| * page/Page.h: |
| (WebCore::Page::setObscuredInsets): Deleted. |
| Make setObscuredInsets and related storage not iOS-specific, though |
| nothing from the other platforms yet calls this code. |
| |
| * style/StyleResolveForDocument.cpp: |
| (WebCore::Style::resolveForDocument): |
| Grab the constant properties from ConstantPropertyMap and plop them into |
| the CustomPropertyValueMap. Constant properties aren't allowed to start |
| with --, and variable properties must, so there is no opportunity here |
| for exposing things to var() (or allowing custom properties to override |
| UA-defined constant properties). |
| |
| 2017-04-20 Konstantin Tokarev <annulen@yandex.ru> |
| |
| [cmake] Define FORWARDING_HEADERS_DIR in WebKitFS and use it everywhere |
| https://bugs.webkit.org/show_bug.cgi?id=171071 |
| |
| Reviewed by Michael Catanzaro. |
| |
| "${DERIVED_SOURCES_DIR}/ForwardingHeaders" path occurs very often in the |
| build system files. GTK-specifc FORWARDING_HEADERS_DIR variable should |
| be available for all ports. |
| |
| * CMakeLists.txt: |
| * PlatformMac.cmake: |
| * PlatformWin.cmake: |
| * PlatformWinCairo.cmake: |
| |
| 2017-04-20 Commit Queue <commit-queue@webkit.org> |
| |
| Unreviewed, rolling out r215597. |
| https://bugs.webkit.org/show_bug.cgi?id=171102 |
| |
| Made all tests crash under GuardMalloc (Requested by ap on |
| #webkit). |
| |
| Reverted changeset: |
| |
| "Expose obscured insets to web content (as "safe area |
| insets")" |
| https://bugs.webkit.org/show_bug.cgi?id=171013 |
| http://trac.webkit.org/changeset/215597 |
| |
| 2017-04-20 Dean Jackson <dino@apple.com> |
| |
| Add Web Sharing to the features under consideration. |
| |
| * features.json: |
| |
| 2017-04-20 Dean Jackson <dino@apple.com> |
| |
| Add Scroll Anchoring to features under consideration. |
| |
| * features.json: |
| |
| 2017-04-20 Konstantin Tokarev <annulen@yandex.ru> |
| |
| Remove unused lamda captures |
| https://bugs.webkit.org/show_bug.cgi?id=171098 |
| |
| Reviewed by Yusuke Suzuki. |
| |
| * Modules/indexeddb/server/SQLiteIDBBackingStore.cpp: |
| (WebCore::IDBServer::SQLiteIDBBackingStore::getOrEstablishDatabaseInfo): |
| * Modules/indexeddb/server/UniqueIDBDatabase.cpp: |
| (WebCore::IDBServer::UniqueIDBDatabase::activateTransactionInBackingStore): |
| * loader/ResourceLoadStatisticsStore.cpp: |
| (WebCore::ResourceLoadStatisticsStore::createEncoderFromData): |
| (WebCore::ResourceLoadStatisticsStore::readDataFromDecoder): |
| |
| 2017-04-20 Timothy Horton <timothy_horton@apple.com> |
| |
| Expose obscured insets to web content (as "safe area insets") |
| https://bugs.webkit.org/show_bug.cgi?id=171013 |
| <rdar://problem/31564652> |
| |
| Reviewed by Wenson Hsieh and Dave Hyatt. |
| |
| Tests: fast/css/variables/constants/invalid-constant-name-fallback.html |
| fast/css/variables/constants/ios/safe-area-inset-set.html |
| fast/css/variables/constants/safe-area-inset-cannot-override.html |
| fast/css/variables/constants/safe-area-inset-zero.html |
| |
| * CMakeLists.txt: |
| * WebCore.xcodeproj/project.pbxproj: |
| * css/CSSValueKeywords.in: |
| * css/CSSVariableData.cpp: |
| (WebCore::CSSVariableData::checkVariablesForCyclesWithRange): |
| (WebCore::CSSVariableData::resolveTokenRange): |
| * css/parser/CSSVariableParser.cpp: |
| (WebCore::isValidConstantName): |
| (WebCore::classifyBlock): |
| (WebCore::isValidConstantReference): |
| Add a constant() function, which takes both custom properties and |
| arbitrary idents which are looked up in ConstantPropertyMap, allowing |
| fallback from the arbitrary, UA-defined idents to custom properties. |
| |
| * dom/ConstantPropertyMap.cpp: Added. |
| (WebCore::ConstantPropertyMap::ConstantPropertyMap): |
| (WebCore::ConstantPropertyMap::values): |
| (WebCore::ConstantPropertyMap::nameForProperty): |
| (WebCore::ConstantPropertyMap::setValueForProperty): |
| (WebCore::ConstantPropertyMap::buildValues): |
| (WebCore::variableDataForSafeAreaInset): |
| (WebCore::ConstantPropertyMap::didChangeObscuredInsets): |
| * dom/ConstantPropertyMap.h: Added. |
| Keep a mapping of UA-defined "constants", which can be looked up |
| from CSS via the aforementioned function. For now, this mapping |
| includes only safe-area-inset-{top, right, bottom, left}, which |
| expose the obscured insets (now that they can be painted into via |
| the viewport parameter clip-to-safe-area-inset=no). |
| |
| * dom/Document.cpp: |
| (WebCore::Document::Document): |
| (WebCore::Document::didChangeObscuredInsets): |
| * dom/Document.h: |
| (WebCore::Document::constantProperties): |
| * page/Page.cpp: |
| (WebCore::Page::setObscuredInsets): |
| * page/Page.h: |
| (WebCore::Page::setObscuredInsets): Deleted. |
| Make setObscuredInsets and related storage not iOS-specific, though |
| nothing from the other platforms yet calls this code. |
| |
| * style/StyleResolveForDocument.cpp: |
| (WebCore::Style::resolveForDocument): |
| Grab the constant properties from ConstantPropertyMap and plop them into |
| the CustomPropertyValueMap. Constant properties aren't allowed to start |
| with --, and variable properties must, so there is no opportunity here |
| for exposing things to var() (or allowing custom properties to override |
| UA-defined constant properties). |
| |
| 2017-04-20 Anders Carlsson <andersca@apple.com> |
| |
| Remove one use of toPaymentAuthorizationStatus |
| https://bugs.webkit.org/show_bug.cgi?id=171086 |
| |
| Reviewed by Tim Horton. |
| |
| Just switch on the individual ApplePaySession::STATUS_ values. |
| |
| * Modules/applepay/ApplePaySession.cpp: |
| (WebCore::ApplePaySession::completeShippingMethodSelection): |
| |
| 2017-04-20 Fujii Hironori <Hironori.Fujii@sony.com> |
| |
| [WinCairo] Fix build break after updating ANGLE |
| https://bugs.webkit.org/show_bug.cgi?id=170980 |
| |
| Reviewed by Brent Fulgham. |
| |
| By stopping using SoftLinking for ANGLE, some changes are needed |
| for WebCore and WebKit. |
| - Define a macro 'GL_GLEXT_PROTOTYPES' before #include <GLES2/gl2.h> or <GLES2/gl2ext.h>. |
| - Link libEGL import library explicitly. |
| |
| * PlatformWin.cmake: Link libEGL to WebCore. |
| * platform/graphics/PlatformDisplay.cpp: |
| (WebCore::PlatformDisplay::initializeEGLDisplay): Removed the code for SoftLinking. |
| * platform/graphics/GLContext.cpp: Define GL_GLEXT_PROTOTYPES. |
| * platform/graphics/egl/GLContextEGL.cpp: Ditto. |
| * platform/graphics/opengl/Extensions3DOpenGLCommon.cpp: Ditto. |
| * platform/graphics/opengl/Extensions3DOpenGLES.h: Ditto. |
| * platform/graphics/opengl/TemporaryOpenGLSetting.cpp: Ditto. |
| * platform/graphics/texmap/TextureMapperGC3DPlatformLayer.cpp: Ditto. |
| |
| 2017-04-20 Matt Baker <mattbaker@apple.com> |
| |
| Web Inspector: Add regular expression support to XHR breakpoints |
| https://bugs.webkit.org/show_bug.cgi?id=170099 |
| <rdar://problem/31558082> |
| |
| Reviewed by Joseph Pecoraro. |
| |
| * inspector/InspectorDOMDebuggerAgent.cpp: |
| (WebCore::InspectorDOMDebuggerAgent::setXHRBreakpoint): |
| (WebCore::InspectorDOMDebuggerAgent::willSendXMLHttpRequest): |
| Use ContentSearchUtilities for both Text and RegularExpression breakpoints. |
| |
| * inspector/InspectorDOMDebuggerAgent.h: |
| Associate XHR breakpoint with a type. |
| |
| 2017-04-20 Eric Carlson <eric.carlson@apple.com> |
| |
| [MediaStream] Cleanup and simplify CoreAudioCaptureSource |
| https://bugs.webkit.org/show_bug.cgi?id=171064 |
| |
| There is no need for a mutex to guard against internal state changes because we |
| don't currently change configuration after the audio unit is allocated. Once |
| we do support reconfiguration on the fly, we can just stop the output unit before |
| changing configuration because the I/O proc isn't called if the output unit |
| is stopped, and AudioOutputUnitStop blocks until the audio device has stopped. |
| |
| Reviewed by Jer Noble. |
| |
| * platform/mediastream/mac/CoreAudioCaptureSource.cpp: |
| (WebCore::CoreAudioCaptureSource::~CoreAudioCaptureSource): Call cleanupAudioUnits |
| instead of duplicating logic. |
| (WebCore::CoreAudioCaptureSource::preferredIOBufferDuration): Change preferred |
| duration from 20ms to 40ms. |
| (WebCore::CoreAudioCaptureSource::configureMicrophoneProc): Set mSampleRate to the |
| preferred sample rate if it is 0. |
| (WebCore::CoreAudioCaptureSource::configureSpeakerProc): Ditto. |
| (WebCore::CoreAudioCaptureSource::provideSpeakerData): Only increment counter and |
| check timestamps in debug builds. |
| (WebCore::CoreAudioCaptureSource::processMicrophoneSamples): Ditto. |
| (WebCore::CoreAudioCaptureSource::cleanupAudioUnits): We only need the audio unit |
| name in debug builds. |
| (WebCore::CoreAudioCaptureSource::setupAudioUnits): Ditto. No more internal state |
| lock. Don't try to get the default input device on iOS. |
| (WebCore::CoreAudioCaptureSource::startProducingData): No more internal state lock. |
| Assert if not called on the main thread. |
| (WebCore::CoreAudioCaptureSource::stopProducingData): Ditto. |
| (WebCore::CoreAudioCaptureSource::suspend): Ditto. |
| (WebCore::CoreAudioCaptureSource::resume): Ditto. |
| * platform/mediastream/mac/CoreAudioCaptureSource.h: |
| |
| 2017-04-20 Eric Carlson <eric.carlson@apple.com> |
| |
| [MediaStream iOS] Hold process assertion while media capture is active |
| https://bugs.webkit.org/show_bug.cgi?id=171017 |
| <rdar://problem/31719177> |
| |
| Reviewed by Dean Jackson. |
| |
| * page/ActivityState.h: Add IsCapturingMedia flag. |
| |
| * page/Page.cpp: |
| (WebCore::Page::updateTimerThrottlingState): Enable timer throttling when capture is active |
| like we do when playing audio. |
| (WebCore::Page::setActivityState): Ditto. |
| |
| * page/PerformanceMonitor.cpp: |
| (WebCore::PerformanceMonitor::updateProcessStateForMemoryPressure): A process is active when |
| capturing media, as it is when playing audio. |
| |
| 2017-04-20 Wenson Hsieh <wenson_hsieh@apple.com> |
| |
| Inline anchor elements cannot be dragged when starting the drag from a block descendant |
| https://bugs.webkit.org/show_bug.cgi?id=171062 |
| <rdar://problem/31697835> |
| |
| Reviewed by Tim Horton. |
| |
| Tweaks DragController::draggableElement to traverse the DOM instead of the render tree when finding a draggable |
| element. This prevents us from skipping elements that are in the DOM ancestor chain, but appear as siblings to |
| the hit-tested node's renderer in the render tree. |
| |
| There was also previously a check to ensure that we skip anonymous RenderObjects while traversing up the chain, |
| but this is no longer necessary fter this change, since all the elements we traverse in the DOM should have |
| renderers that are not anonymous. |
| |
| Test: fast/events/drag-and-drop-link-containing-block.html |
| |
| * page/DragController.cpp: |
| (WebCore::DragController::draggableElement): |
| |
| 2017-04-20 Michael Catanzaro <mcatanzaro@igalia.com> |
| |
| -Wformat warning on HistoryController.cpp:295:5 |
| https://bugs.webkit.org/show_bug.cgi?id=171028 |
| |
| Reviewed by Daniel Bates. |
| |
| Need to cast WebCore::FrameLoadType to int before using it in printf. |
| |
| * loader/HistoryController.cpp: |
| (WebCore::HistoryController::goToItem): |
| |
| 2017-04-20 Per Arne Vollan <pvollan@apple.com> |
| |
| The toleranceBefore parameter in the AVPlayerItem method seekToTime should not be negative. |
| https://bugs.webkit.org/show_bug.cgi?id=171063 |
| |
| Reviewed by Eric Carlson. |
| |
| The AVPlayerItem method seekToTime will throw an exception if toleranceBefore is negative. |
| |
| No new tests since the change is a sanity check. |
| |
| * html/HTMLMediaElement.cpp: |
| (WebCore::HTMLMediaElement::seekTask): |
| * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm: |
| (WebCore::MediaPlayerPrivateAVFoundationObjC::seekToTime): |
| |
| 2017-04-20 Anders Carlsson <andersca@apple.com> |
| |
| Replace isFinalStateStatus with isFinalStateResult |
| https://bugs.webkit.org/show_bug.cgi?id=171072 |
| rdar://problem/31589635 |
| |
| Reviewed by Tim Horton. |
| |
| This will let us get rid of some of the status enum declarations. |
| |
| * Modules/applepay/ApplePaySession.cpp: |
| (WebCore::ApplePaySession::completePayment): |
| * Modules/applepay/PaymentAuthorizationStatus.h: |
| (WebCore::isFinalStateStatus): Deleted. |
| * Modules/applepay/PaymentCoordinator.cpp: |
| (WebCore::PaymentCoordinator::completePaymentSession): |
| * Modules/applepay/PaymentRequest.cpp: |
| (WebCore::isFinalStateResult): |
| * Modules/applepay/PaymentRequest.h: |
| |
| 2017-04-20 Brent Fulgham <bfulgham@apple.com> |
| |
| [Win] REGRESSION(r215486): Windows Release build is broken |
| https://bugs.webkit.org/show_bug.cgi?id=171024 |
| <rdar://problem/31722618> |
| |
| Reviewed by Mark Lam. |
| |
| Add missing include needed for clean Release build on Windows (proper |
| fix found by Fujii Hironori). |
| |
| * bindings/js/JSDOMGlobalObject.h: |
| |
| 2017-04-20 Said Abou-Hallawa <sabouhallawa@apple.com> |
| |
| CachedImage should cancel loading images for unsupported/unknown types |
| https://bugs.webkit.org/show_bug.cgi?id=170697 |
| |
| Reviewed by Youenn Fablet. |
| |
| Currently when the image decoder detects an error with the incoming encoded |
| data of an image, we mark the image to be a broken image. But the network |
| process keeps feeding the web process with the rest of the data. We should |
| cancel loading the rest of the data to save network bandwidth and CPU time |
| loading and processing useless data. |
| |
| * loader/cache/CachedImage.cpp: |
| (WebCore::CachedImage::addIncrementalDataBuffer): |
| (WebCore::CachedImage::finishLoading): |
| |
| 2017-04-20 Aaron Chu <aaron_chu@apple.com> |
| |
| AX: Modern Media Controls Timeline slider should be operable |
| https://bugs.webkit.org/show_bug.cgi?id=170250 |
| |
| Reviewed by Antoine Quint. |
| |
| Added a "change" event listener and aria-valuetext to the slider so that when a |
| VoiceOver user operates the timeline control, VO speaks the updated timestamp |
| |
| Test: media/modern-media-controls/scrubber/scrubber-has-correct-ax-label.html |
| |
| * English.lproj/modern-media-controls-localized-strings.js: |
| * Modules/modern-media-controls/controls/scrubber.js: |
| (Scrubber.prototype.set inputAccessibleLabel): |
| (Scrubber.prototype._formatTime): |
| * Modules/modern-media-controls/controls/slider.js: |
| (Slider.prototype.handleEvent): |
| (Slider.prototype._handleInputEvent): Deleted. |
| * Modules/modern-media-controls/controls/time-control.js: |
| (TimeControl.prototype.updateScrubberLabel): |
| * Modules/modern-media-controls/controls/time-label.js: |
| (TimeLabel.prototype.commitProperty): |
| (TimeLabel.prototype._formattedTime): |
| * Modules/modern-media-controls/main.js: |
| (formatTimeByUnit): |
| (unitizeTime): |
| |
| 2017-04-20 Andy Estes <aestes@apple.com> |
| |
| Fix indentation in AVKitSPI.h |
| https://bugs.webkit.org/show_bug.cgi?id=171066 |
| |
| Reviewed by Jer Noble. |
| |
| * platform/spi/cocoa/AVKitSPI.h: |
| |
| 2017-04-20 Jer Noble <jer.noble@apple.com> |
| |
| [MediaCapture] gUM() with CoreAudio fails if capturing audio in the UIProcess. |
| https://bugs.webkit.org/show_bug.cgi?id=171021 |
| |
| Reviewed by Eric Carlson. |
| |
| Refactor the creation of RealtimeMediaSources to take a persistent device ID rather |
| than a CaptureDevice directly. This allows WebKit2 to iterate devices in the UIProcess |
| rather than the WebProcess. |
| |
| * platform/mediastream/RealtimeMediaSource.h: |
| * platform/mediastream/mac/AVAudioCaptureSource.mm: |
| * platform/mediastream/mac/AVVideoCaptureSource.mm: |
| * platform/mediastream/mac/CoreAudioCaptureSource.cpp: |
| (WebCore::CoreAudioCaptureSource::create): |
| (WebCore::CoreAudioCaptureSource::CoreAudioCaptureSource): |
| * platform/mediastream/mac/CoreAudioCaptureSource.h: |
| * platform/mediastream/mac/RealtimeMediaSourceCenterMac.cpp: |
| (WebCore::RealtimeMediaSourceCenterMac::createMediaStream): |
| (WebCore::RealtimeMediaSourceCenterMac::bestSourcesForTypeAndConstraints): |
| * platform/mock/MockRealtimeAudioSource.cpp: |
| * platform/mock/MockRealtimeVideoSource.cpp: |
| |
| 2017-04-20 Tim Horton <timothy_horton@apple.com> |
| |
| Make it possible to request the non-expanded scrollbar width from ScrollbarTheme |
| https://bugs.webkit.org/show_bug.cgi?id=171047 |
| |
| Reviewed by Sam Weinig. |
| |
| No new tests, new behavior is not exposed in any way. |
| |
| * platform/ScrollTypes.h: |
| * platform/ScrollbarTheme.h: |
| (WebCore::ScrollbarTheme::scrollbarThickness): |
| * platform/gtk/ScrollbarThemeGtk.cpp: |
| (WebCore::ScrollbarThemeGtk::scrollbarThickness): |
| * platform/gtk/ScrollbarThemeGtk.h: |
| * platform/ios/ScrollbarThemeIOS.h: |
| * platform/ios/ScrollbarThemeIOS.mm: |
| (WebCore::ScrollbarThemeIOS::scrollbarThickness): |
| * platform/mac/ScrollbarThemeMac.h: |
| * platform/mac/ScrollbarThemeMac.mm: |
| (WebCore::ScrollbarThemeMac::scrollbarThickness): |
| * platform/mock/ScrollbarThemeMock.cpp: |
| (WebCore::ScrollbarThemeMock::scrollbarThickness): |
| * platform/mock/ScrollbarThemeMock.h: |
| * platform/win/ScrollbarThemeWin.cpp: |
| (WebCore::ScrollbarThemeWin::scrollbarThickness): |
| * platform/win/ScrollbarThemeWin.h: |
| * rendering/RenderScrollbarTheme.h: |
| On Mac, when the scrollbar is hovered, it gets bigger. |
| Currently, scrollbarThickness always returns the big size. |
| It should be possible to request the smaller, "regular" scrollbar size as well. |
| |
| 2017-04-20 Jon Lee <jonlee@apple.com> |
| |
| Update pip placard to "picture in picture" |
| https://bugs.webkit.org/show_bug.cgi?id=171036 |
| rdar://problem/30201536 |
| |
| Reviewed by Antoine Quint. |
| |
| Updated media/modern-media-controls/pip-placard/pip-placard.html |
| |
| Update the text shown with the picture in picture placard. |
| |
| * English.lproj/mediaControlsLocalizedStrings.js: |
| * English.lproj/modern-media-controls-localized-strings.js: |
| * Modules/mediacontrols/mediaControlsApple.js: |
| (Controller.prototype.updatePictureInPicturePlaceholder): |
| * Modules/modern-media-controls/controls/pip-placard.js: |
| (PiPPlacard): |
| |
| 2017-04-20 Youenn Fablet <youenn@apple.com> |
| |
| RTCPeerConnection is stopping its backend twice sometimes |
| https://bugs.webkit.org/show_bug.cgi?id=171043 |
| |
| Reviewed by Eric Carlson. |
| |
| Test: webrtc/closing-peerconnection.html |
| |
| Making sure we stop the backend only once. |
| Adding an internals API to close the peer connection so as to replicate frame disconnection. |
| |
| * Modules/mediastream/RTCPeerConnection.cpp: |
| (WebCore::RTCPeerConnection::doClose): |
| (WebCore::RTCPeerConnection::doStop): |
| * Modules/mediastream/RTCPeerConnection.h: |
| * testing/Internals.cpp: |
| (WebCore::Internals::stopPeerConnection): |
| * testing/Internals.h: |
| * testing/Internals.idl: |
| |
| 2017-04-20 Antti Koivisto <antti@apple.com> |
| |
| Increase large animation cutoff |
| https://bugs.webkit.org/show_bug.cgi?id=171051 |
| <rdar://problem/31731532> |
| |
| Reviewed by Andreas Kling. |
| |
| We currently switch to per-frame decoding if the animation is larger than 5MB. This is very |
| power-inefficient and such animations are now common. The cutoff originates from 2007 (r20069), |
| it is time update it. |
| |
| Note that the normal low memory handling will still kill animation frames as needed. |
| |
| * platform/graphics/BitmapImage.h: |
| |
| Increase cutoff to 30MB. This is enough (with some room to spare) for animations on current |
| tumblr.com/search/aww. |
| |
| Also remove the separate cutoff value for iOS. |
| |
| 2017-04-20 Zan Dobersek <zdobersek@igalia.com> |
| |
| Register missing AES_CTR, ECDSA and HKDF algorithms in |
| GCrypt's CryptoAlgorithmRegistry implementation. |
| |
| Rubber-stamped by Carlos Alberto Lopez Perez. |
| |
| * crypto/gcrypt/CryptoAlgorithmRegistryGCrypt.cpp: |
| (WebCore::CryptoAlgorithmRegistry::platformRegisterAlgorithms): |
| |
| 2017-04-20 Joanmarie Diggs <jdiggs@igalia.com> |
| |
| [ATK] Implement support for DPub ARIA roles |
| https://bugs.webkit.org/show_bug.cgi?id=170679 |
| |
| Reviewed by Chris Fleizach. |
| |
| Create two new WebCore AccessibilityRole values: TextGroup and ApplicationTextGroup. |
| These roles make it possible for platforms to distinguish groups which are primarily |
| intended to display textual content from groups which are primarily intended to hold |
| user-interface objects. Use these roles to fix the ATK mapping of DPub's groups, which |
| should be exposed as ATK_ROLE_SECTION; not ATK_ROLE_PANEL. |
| |
| Modify the following WebCore AccessibilityRole mappings: |
| - doc-abstract changed to ApplicationTextGroupRole because this DPub ARIA role does |
| not subclass the ARIA landmark role |
| - doc-biblioentry and doc-endnote changed to ListItemRole, because these DPub ARIA |
| roles subclass the ARIA listitem role |
| - doc-notice and doc-tip changed to DocumentNoteRole because these DPub ARIA roles |
| subclass the ARIA note role |
| - doc-pagebreak changed to SplitterRole because this DPub ARIA role subclasses the |
| ARIA separator role |
| |
| No new tests required: New test cases were added to xml-roles-exposed.html, and |
| the platform expectations for roles-exposed.html were updated to reflect the |
| correct mappings. |
| |
| * accessibility/AccessibilityList.cpp: |
| (WebCore::AccessibilityList::determineAccessibilityRole): |
| * accessibility/AccessibilityNodeObject.cpp: |
| (WebCore::AccessibilityNodeObject::isGroup): |
| (WebCore::AccessibilityNodeObject::helpText): |
| * accessibility/AccessibilityObject.cpp: |
| (WebCore::AccessibilityObject::ariaTreeItemContent): |
| (WebCore::initializeRoleMap): |
| (WebCore::AccessibilityObject::computedRoleString): |
| * accessibility/AccessibilityObject.h: |
| * accessibility/AccessibilityRenderObject.cpp: |
| (WebCore::AccessibilityRenderObject::helpText): |
| (WebCore::AccessibilityRenderObject::shouldFocusActiveDescendant): |
| (WebCore::AccessibilityRenderObject::determineAccessibilityRole): |
| * accessibility/atk/WebKitAccessibleWrapperAtk.cpp: |
| (webkitAccessibleGetAttributes): |
| (atkRole): |
| (roleIsTextType): |
| * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm: |
| (-[WebAccessibilityObjectWrapper determineIsAccessibilityElement]): |
| (-[WebAccessibilityObjectWrapper containsUnnaturallySegmentedChildren]): |
| * accessibility/mac/WebAccessibilityObjectWrapperMac.mm: |
| (createAccessibilityRoleMap): |
| (-[WebAccessibilityObjectWrapper subrole]): |
| |
| 2017-04-19 Youenn Fablet <youenn@apple.com> |
| |
| [Mac] Allow customizing H264 encoder |
| https://bugs.webkit.org/show_bug.cgi?id=170829 |
| |
| Reviewed by Alex Christensen. |
| |
| Using WebKitAdditions CreateCompressionSession if available. |
| |
| * Configurations/FeatureDefines.xcconfig: |
| * WebCore.xcodeproj/project.pbxproj: |
| * platform/mediastream/libwebrtc/H264VideoToolBoxEncoder.h: Added. |
| * platform/mediastream/libwebrtc/H264VideoToolBoxEncoder.mm: Added. |
| (WebCore::H264VideoToolboxEncoder::CreateCompressionSession): |
| * platform/mediastream/libwebrtc/VideoToolBoxEncoderFactory.cpp: |
| (WebCore::VideoToolboxVideoEncoderFactory::CreateSupportedVideoEncoder): |
| |
| 2017-04-19 Eric Carlson <eric.carlson@apple.com> |
| |
| Another deadlock in CoreAudioCaptureSource |
| https://bugs.webkit.org/show_bug.cgi?id=171001 |
| |
| Fix another regression introduced by r215201, plus make changes suggested |
| in the review of 170771. |
| |
| Reviewed by Youenn Fablet. |
| |
| * platform/mediastream/mac/CoreAudioCaptureSource.cpp: |
| (WebCore::CoreAudioCaptureSource::configureSpeakerProc): Assert if the lock is no held. |
| (WebCore::CoreAudioCaptureSource::provideSpeakerData): Don't reset the buffer. |
| (WebCore::CoreAudioCaptureSource::processMicrophoneSamples): Take the state lock. Don't |
| reset the buffer. No more microphone callbacks. |
| (WebCore::CoreAudioCaptureSource::stopProducingData): Return early if the io unit isn't |
| running. Drop the lock before calling setMuted to avoid another deadlock. |
| (WebCore::CoreAudioCaptureSource::addMicrophoneDataConsumer): Deleted. |
| (WebCore::CoreAudioCaptureSource::removeMicrophoneDataConsumer): Deleted. |
| * platform/mediastream/mac/CoreAudioCaptureSource.h: |
| |
| 2017-04-19 Anders Carlsson <andersca@apple.com> |
| |
| Stop using deprecated APIs, part 3 |
| https://bugs.webkit.org/show_bug.cgi?id=171003 |
| rdar://problem/31589635 |
| rdar://problem/31589635 |
| |
| Reviewed by Tim Horton. |
| |
| * Modules/applepay/ApplePaySession.cpp: |
| (WebCore::convertAndValidate): |
| The status member variable has been removed from ApplePayShippingMethodUpdate. |
| |
| (WebCore::ApplePaySession::completeShippingMethodSelection): |
| If status is not STATUS_SUCCESS, cancel the payment session. |
| |
| (WebCore::ApplePaySession::canSuspendForDocumentSuspension): |
| (WebCore::ApplePaySession::canBegin): |
| (WebCore::ApplePaySession::canAbort): |
| (WebCore::ApplePaySession::canCancel): |
| (WebCore::ApplePaySession::canCompleteShippingMethodSelection): |
| (WebCore::ApplePaySession::canCompleteShippingContactSelection): |
| (WebCore::ApplePaySession::canCompletePaymentMethodSelection): |
| (WebCore::ApplePaySession::canCompletePayment): |
| (WebCore::ApplePaySession::isFinalState): |
| Add State::CancelRequested. |
| |
| * Modules/applepay/ApplePayShippingMethodUpdate.h: |
| * Modules/applepay/ApplePayShippingMethodUpdate.idl: |
| Remove status. |
| |
| * Modules/applepay/PaymentCoordinator.cpp: |
| (WebCore::PaymentCoordinator::cancelPaymentSession): |
| Call through to the client. |
| |
| * Modules/applepay/PaymentCoordinator.h: |
| * Modules/applepay/PaymentCoordinatorClient.h: |
| Add cancelPaymentSession(). |
| |
| * Modules/applepay/PaymentRequest.h: |
| Remove status. |
| |
| * loader/EmptyClients.cpp: |
| Add new client member function. |
| |
| 2017-04-19 Eric Carlson <eric.carlson@apple.com> |
| |
| [MediaStream] Limit capture to one tab at a time |
| https://bugs.webkit.org/show_bug.cgi?id=171009 |
| |
| Reviewed by Jon Lee. |
| |
| No new tests yet, filed bug 171011. |
| |
| * Modules/mediastream/MediaStreamTrack.cpp: |
| (WebCore::MediaStreamTrack::stopTrack): Drive-by fix: renamed from stopProducingData |
| because stopProducingData is a method in RealtimeMediaSource that does something different. |
| (WebCore::MediaStreamTrack::stop): Call stopTrack. |
| (WebCore::MediaStreamTrack::stopProducingData): Deleted. |
| * Modules/mediastream/MediaStreamTrack.h: |
| * Modules/mediastream/MediaStreamTrack.idl: |
| |
| * Modules/mediastream/RTCRtpSender.cpp: |
| (WebCore::RTCRtpSender::replaceTrack): Update for rename. |
| |
| * platform/mediastream/MediaStreamPrivate.cpp: |
| (WebCore::MediaStreamPrivate::muted): Drive-by fix: a track that has ended but |
| which is not muted will never produce data. |
| |
| 2017-04-19 Alex Christensen <achristensen@webkit.org> |
| |
| Parsing large XML strings fails |
| https://bugs.webkit.org/show_bug.cgi?id=170999 |
| <rdar://problem/17336267> |
| |
| Reviewed by Brady Eidson. |
| |
| Test: fast/dom/xml-large.html |
| |
| * xml/parser/XMLDocumentParserLibxml2.cpp: |
| (WebCore::XMLParserContext::createStringParser): |
| (WebCore::XMLParserContext::createMemoryParser): |
| Allow huge XML strings. They work fine in Chrome and Firefox. |
| |
| 2017-04-19 Chris Fleizach <cfleizach@apple.com> |
| |
| AX: <hr> should use a different role description than interactive separators |
| https://bugs.webkit.org/show_bug.cgi?id=170317 |
| <rdar://problem/31363024> |
| |
| Reviewed by Joanmarie Diggs. |
| |
| Users are confused with WebKit's accessibility description of separators. |
| We should call these what they are, horizontal rules. |
| |
| Updated test: accessibility/mac/hr-element-expected.txt |
| |
| * English.lproj/Localizable.strings: |
| * accessibility/AccessibilityRenderObject.cpp: |
| (WebCore::AccessibilityRenderObject::orientation): |
| * platform/cocoa/LocalizedStringsCocoa.mm: |
| (WebCore::AXHorizontalRuleDescriptionText): |
| |
| 2017-04-19 Anders Carlsson <andersca@apple.com> |
| |
| Rename cancelPayment to cancelPaymentSession |
| https://bugs.webkit.org/show_bug.cgi?id=171007 |
| |
| Reviewed by Tim Horton. |
| |
| * Modules/applepay/ApplePaySession.cpp: |
| (WebCore::ApplePaySession::didCancelPaymentSession): |
| (WebCore::ApplePaySession::didCancelPayment): Deleted. |
| * Modules/applepay/ApplePaySession.h: |
| * Modules/applepay/PaymentCoordinator.cpp: |
| (WebCore::PaymentCoordinator::didCancelPaymentSession): |
| (WebCore::PaymentCoordinator::didCancelPayment): Deleted. |
| * Modules/applepay/PaymentCoordinator.h: |
| |
| 2017-04-19 Joseph Pecoraro <pecoraro@apple.com> |
| |
| ASAN Crash running LayoutTests/inspector/worker tests |
| https://bugs.webkit.org/show_bug.cgi?id=170967 |
| <rdar://problem/31256437> |
| |
| Reviewed by Alex Christensen. |
| |
| * workers/WorkerMessagingProxy.h: |
| * workers/WorkerMessagingProxy.cpp: |
| (WebCore::WorkerMessagingProxy::WorkerMessagingProxy): |
| (WebCore::WorkerMessagingProxy::workerGlobalScopeDestroyedInternal): |
| Make the MessagingProxy thread safe ref counted. Since it used to |
| delete itself, turn this into a ref (implicit on construction) |
| and deref (replacing delete this). |
| |
| (WebCore::WorkerMessagingProxy::postMessageToPageInspector): |
| When dispatching have the lambda implicitly ref/deref with the |
| lambda to keep the proxy alive while a lambda is queued. |
| |
| 2017-04-19 Brent Fulgham <bfulgham@apple.com> |
| |
| [iOS, macOS] Guard against passing nullptr to vImagePremultiplyData |
| https://bugs.webkit.org/show_bug.cgi?id=170912 |
| <rdar://problem/30565800> |
| |
| Reviewed by Brady Eidson. |
| |
| * platform/graphics/cg/ImageBufferDataCG.cpp: |
| (WebCore::affineWarpBufferData): Assert if we passed nullptr buffers. |
| (WebCore::transferData): Ditto. |
| (WebCore::ImageBufferData::getData): Check for nullptr data member and avoid passing to vImage routines. |
| (WebCore::ImageBufferData::putData): Ditto. |
| |
| 2017-04-19 Dave Hyatt <hyatt@apple.com> |
| |
| Remove bogus assert for :not. |
| https://bugs.webkit.org/show_bug.cgi?id=170995 |
| <rdar://problem/29693115> |
| |
| Reviewed by Zalan Bujtas. |
| |
| * css/parser/CSSSelectorParser.cpp: |
| |
| 2017-04-19 Antoine Quint <graouts@apple.com> |
| |
| [Modern Media Controls] Allow non-PNG resources |
| https://bugs.webkit.org/show_bug.cgi?id=170992 |
| <rdar://problem/31706590> |
| |
| Reviewed by Dean Jackson. |
| |
| Instead of passing in a name and a platform to MediaControlsHost::base64StringForIconAndPlatform(), |
| we now pass in a name and a type to MediaControlsHost::base64StringForIconNameAndType(). We've removed |
| the need to provide a platform by copying the resources directly under "Resources/modern-media-controls" |
| insted of "Resources/modern-media-controls/platform-name-here", and now we provide a type so that it |
| may be passed down to -[NSBundle pathForResource:ofType:inDirectory:]. |
| |
| * Modules/mediacontrols/MediaControlsHost.cpp: |
| (WebCore::MediaControlsHost::base64StringForIconNameAndType): |
| (WebCore::MediaControlsHost::base64StringForIconAndPlatform): Deleted. |
| * Modules/mediacontrols/MediaControlsHost.h: |
| * Modules/mediacontrols/MediaControlsHost.idl: |
| * Modules/modern-media-controls/controls/icon-service.js: |
| (const.iconService.new.IconService.prototype.imageForIconNameAndLayoutTraits): |
| * WebCore.xcodeproj/project.pbxproj: |
| * rendering/RenderTheme.h: |
| (WebCore::RenderTheme::mediaControlsBase64StringForIconNameAndType): |
| (WebCore::RenderTheme::mediaControlsBase64StringForIconAndPlatform): Deleted. |
| * rendering/RenderThemeIOS.h: |
| * rendering/RenderThemeIOS.mm: |
| (WebCore::RenderThemeIOS::mediaControlsBase64StringForIconNameAndType): |
| (WebCore::RenderThemeIOS::mediaControlsBase64StringForIconAndPlatform): Deleted. |
| * rendering/RenderThemeMac.h: |
| * rendering/RenderThemeMac.mm: |
| (WebCore::RenderThemeMac::mediaControlsBase64StringForIconNameAndType): |
| (WebCore::RenderThemeMac::mediaControlsBase64StringForIconAndPlatform): Deleted. |
| |
| 2017-04-19 Antti Koivisto <antti@apple.com> |
| |
| Avoid repaints for invisible animations on tumblr.com/search/aww |
| https://bugs.webkit.org/show_bug.cgi?id=170986 |
| <rdar://problem/28644580> |
| |
| Reviewed by Andreas Kling. |
| |
| Test: fast/repaint/mutate-non-visible.html |
| |
| * rendering/style/RenderStyle.cpp: |
| (WebCore::requiresPainting): |
| (WebCore::RenderStyle::changeRequiresRepaint): |
| |
| If an element is invisible it does not require repaint even if something else changes. |
| |
| 2017-04-19 Dean Jackson <dino@apple.com> |
| |
| Non-muxable GPUs shouldn't allow offline rendering |
| https://bugs.webkit.org/show_bug.cgi?id=170984 |
| <rdar://problem/31614406> |
| |
| Reviewed by Myles Maxfield. |
| |
| Setting the kCGLPFAAllowOfflineRenderers flag doesn't do any |
| harm on devices that only have one GPU. It's also what we |
| want on devices that can mux between GPUs. However, we were |
| also setting it unconditionally on devices with multiple |
| GPUs that have issues muxing. |
| |
| * platform/graphics/mac/GraphicsContext3DMac.mm: |
| (WebCore::setPixelFormat): Add a test for hasMuxableGPU. |
| |
| 2017-04-18 Youenn Fablet <youenn@apple.com> |
| |
| RTCOfferOptions iceRestart should be supported |
| https://bugs.webkit.org/show_bug.cgi?id=170966 |
| |
| Reviewed by Alex Christensen. |
| |
| No ability to test iceRestart as of now. |
| Passing iceRestart value to libwebrtc. |
| Passing also voiceActivityDetection value to libwebrtc. |
| Updating mock to use the new overloaded CreateOffer method. |
| |
| * Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp: |
| (WebCore::LibWebRTCMediaEndpoint::doCreateOffer): |
| * Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.h: |
| * Modules/mediastream/libwebrtc/LibWebRTCPeerConnectionBackend.cpp: |
| (WebCore::LibWebRTCPeerConnectionBackend::doCreateOffer): |
| * Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp: |
| (WebCore::LibWebRTCMediaEndpoint::doCreateOffer): |
| * testing/MockLibWebRTCPeerConnection.cpp: |
| (WebCore::MockLibWebRTCPeerConnection::CreateOffer): |
| * testing/MockLibWebRTCPeerConnection.h: |
| |
| 2017-04-18 Wenson Hsieh <wenson_hsieh@apple.com> |
| |
| [WK2] Support DataTransfer::files() when performing a DHTML data interaction |
| https://bugs.webkit.org/show_bug.cgi?id=170880 |
| <rdar://problem/31314689> |
| |
| Reviewed by Tim Horton. |
| |
| Adds support for fetching files from the DataTransfer when performing a data interaction operation handled by |
| JavaScript. There are two changes we make here to achieve this: |
| |
| First, we teach the Pasteboard on iOS to know what file paths hold the item provider contents used in the |
| current data interaction operation. On iOS, Pasteboard::readFilenames is currently hard-coded to return an empty |
| vector. To fix this, we add logic to the iOS Pasteboard to remember what the paths of all files that were |
| successfully loaded from item providers as the data interaction is taking place. This ensures that at the |
| WebCore layer, the implementation of Pasteboard::readFilenames on Mac and iOS is similar -- they both call out |
| to the client layer in order to read file paths off of their respective pasteboards. Once in the client layer |
| (WebKit1 or WebKit2) we then call into PlatformPasteboard::filenamesForDataInteraction, which then calls into |
| WebItemProviderPasteboard if applicable. |
| |
| The second tweak is to propagate information about whether the document is preventing default data interaction |
| behavior to the client layer. This prevents us from having to save pasteboard content when performing data |
| interaction in cases where file information is not needed (i.e. the default behavior is being performed, and |
| the target is not a file input). This also avoids compatibility issues with insertion animations when performing |
| data interaction in editable areas, due to the extra time spent loading item provider data into a temporary |
| file. |
| |
| Unit tests in <https://bugs.webkit.org/show_bug.cgi?id=170903>. |
| |
| * page/DragController.cpp: |
| (WebCore::DragController::DragController): |
| (WebCore::DragController::performDragOperation): |
| (WebCore::DragController::dragEnteredOrUpdated): |
| (WebCore::DragController::tryDocumentDrag): |
| |
| Refactor DragController::tryDocumentDrag to return a DragHandlingMethod. This method currently returns either |
| true or false; this patch changes it to return a DragHandlingMethod, which is either None (the equivalent of |
| returning false before the patch), Default (indicating that the drop destination is allowing default handling), |
| or NonDefault, which indicates that the drop destination has explicitly prevented default. |
| |
| * page/DragController.h: |
| (WebCore::DragController::documentIsHandlingNonDefaultDrag): |
| |
| Used by WebPage when sending an IPC response after handling dragentered or dragupdated. |
| |
| * platform/PasteboardStrategy.h: |
| * platform/PlatformPasteboard.h: |
| * platform/ios/AbstractPasteboard.h: |
| * platform/ios/PasteboardIOS.mm: |
| (WebCore::Pasteboard::readFilenames): |
| * platform/ios/PlatformPasteboardIOS.mm: |
| (WebCore::PlatformPasteboard::filenamesForDataInteraction): |
| * platform/ios/WebItemProviderPasteboard.h: |
| * platform/ios/WebItemProviderPasteboard.mm: |
| |
| WebItemProviderPasteboard now remembers the file URLs of successfully loaded item provider content when a data |
| interaction is being performed. The new filenamesForDataInteraction property returns the array of data |
| interaction file URLs which have been propagated to the web process along with sandbox extensions. This state |
| is cleaned up when list of item providers change (i.e. when the data interaction operation is finished, or if |
| the web content process crashes, etc.) |
| |
| (-[WebItemProviderPasteboard init]): |
| (-[WebItemProviderPasteboard setItemProviders:]): |
| (-[WebItemProviderPasteboard filenamesForDataInteraction]): |
| (-[WebItemProviderPasteboard doAfterLoadingProvidedContentIntoFileURLs:]): |
| |
| 2017-04-18 Dean Jackson <dino@apple.com> |
| |
| Cairo build fix. |
| https://bugs.webkit.org/show_bug.cgi?id=170941 |
| |
| * platform/graphics/cairo/GraphicsContext3DCairo.cpp: |
| (WebCore::GraphicsContext3D::GraphicsContext3D): |
| |
| 2017-04-18 Ryan Haddad <ryanhaddad@apple.com> |
| |
| Rebaseline bindings tests after r215486. |
| |
| Unreviewed test gardening. |
| |
| * bindings/scripts/test/JS/JSTestObj.cpp: |
| (WebCore::jsTestObjOnfooGetter): |
| (WebCore::jsTestObjOnwebkitfooGetter): |
| |
| 2017-04-18 Dean Jackson <dino@apple.com> |
| |
| Attempted build fix. Add/remove some files from ANGLE. |
| |
| * CMakeLists.txt: |
| |
| 2017-04-18 Dean Jackson <dino@apple.com> |
| |
| Update ANGLE |
| https://bugs.webkit.org/show_bug.cgi?id=170941 |
| <rdar://problem/31633999> |
| |
| Reviewed by Alex Christensen. |
| |
| * platform/graphics/ANGLEWebKitBridge.cpp: |
| (WebCore::getSymbolInfo): |
| (WebCore::ANGLEWebKitBridge::ANGLEWebKitBridge): |
| (WebCore::ANGLEWebKitBridge::cleanupCompilers): |
| (WebCore::ANGLEWebKitBridge::compileShaderSource): |
| * platform/graphics/mac/GraphicsContext3DMac.mm: |
| (WebCore::GraphicsContext3D::GraphicsContext3D): |
| * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp: |
| (WebCore::GraphicsContext3D::checkVaryingsPacking): |
| |
| 2017-04-18 John Wilander <wilander@apple.com> |
| |
| Make WebCore::topPrivatelyControlledDomain() return "localhost" for localhost |
| https://bugs.webkit.org/show_bug.cgi?id=170798 |
| <rdar://problem/31595108> |
| |
| Reviewed by Alex Christensen. |
| |
| API test augmented. |
| |
| * platform/mac/PublicSuffixMac.mm: |
| (WebCore::topPrivatelyControlledDomain): |
| Now returns the lowercase top privately controlled |
| domain including "localhost" for the host localhost. |
| |
| 2017-04-18 Brent Fulgham <bfulgham@apple.com> |
| |
| JSEventListener::m_isolatedWorld should be a Ref |
| https://bugs.webkit.org/show_bug.cgi?id=170910 |
| <rdar://problem/30470332> |
| |
| Reviewed by Alex Christensen. |
| |
| Since m_isolatedWorld should never be nullptr, change the implementation of m_isolatedWorld |
| from a RefPtr to a Ref, and adjust the various call sites to support this change. |
| |
| This should help us catch any changes that permit the isolatedWorld to be set to nullptr. |
| |
| No new tests since there should be no change in behavior. |
| |
| * bindings/js/JSEventListener.cpp: |
| (WebCore::JSEventListener::JSEventListener): |
| (WebCore::JSEventListener::initializeJSFunction): |
| (WebCore::JSEventListener::handleEvent): |
| * bindings/js/JSEventListener.h: |
| (WebCore::JSEventListener::cast): |
| (WebCore::JSEventListener::isolatedWorld): |
| (WebCore::JSEventListener::jsFunction): |
| |
| 2017-04-18 Brent Fulgham <bfulgham@apple.com> |
| |
| Correct handling of isolatedWorld in event handling |
| https://bugs.webkit.org/show_bug.cgi?id=65589 |
| <rdar://problem/24097804> |
| |
| Reviewed by Geoffrey Garen. |
| |
| This patch was inspired by Adam's original patch as well as the |
| following Blink change: |
| https://src.chromium.org/viewvc/blink?revision=152377&view=revision |
| |
| Thread isolatedWorld state through event handling logic. |
| |
| Tests: fast/dom/event-attrs-isolated-world.html |
| http/tests/security/isolatedWorld/onclick-attribute.html |
| |
| * bindings/js/JSEventListener.cpp: |
| (WebCore::JSEventListener::initializeJSFunction): |
| (WebCore::JSEventListener::world): |
| (WebCore::eventHandlerAttribute): |
| (WebCore::setEventHandlerAttribute): |
| (WebCore::windowEventHandlerAttribute): |
| (WebCore::setWindowEventHandlerAttribute): |
| (WebCore::documentEventHandlerAttribute): |
| (WebCore::setDocumentEventHandlerAttribute): |
| * bindings/js/JSEventListener.h: |
| * bindings/scripts/CodeGeneratorJS.pm: |
| (GenerateImplementation): |
| * dom/Document.cpp: |
| (WebCore::Document::setWindowAttributeEventListener): |
| (WebCore::Document::getWindowAttributeEventListener): |
| * dom/Document.h: |
| * dom/Element.cpp: |
| (WebCore::Element::setAttributeEventListener): |
| * dom/EventTarget.cpp: |
| (WebCore::EventTarget::setAttributeEventListener): |
| (WebCore::EventTarget::attributeEventListener): |
| * dom/EventTarget.h: |
| * editing/ReplaceSelectionCommand.cpp: |
| (WebCore::ReplacementFragment::ReplacementFragment): |
| * html/HTMLBodyElement.cpp: |
| (WebCore::HTMLBodyElement::parseAttribute): |
| * html/HTMLFrameSetElement.cpp: |
| (WebCore::HTMLFrameSetElement::parseAttribute): |
| * svg/SVGSVGElement.cpp: |
| (WebCore::SVGSVGElement::parseAttribute): |
| |
| 2017-04-18 Jeremy Jones <jeremyj@apple.com> |
| |
| Deadlock in CoreAudioCaptureSource |
| https://bugs.webkit.org/show_bug.cgi?id=170771 |
| rdar://problem/31578919 |
| |
| Reviewed by Eric Carlson. |
| |
| Fixes a regression introduced by r215201. |
| |
| * platform/mediastream/mac/CoreAudioCaptureSource.cpp: |
| (WebCore::CoreAudioCaptureSource::startProducingData): |
| (WebCore::CoreAudioCaptureSource::stopProducingData): |
| |
| 2017-04-18 Anders Carlsson <andersca@apple.com> |
| |
| Stop using deprecated APIs, part 2 |
| https://bugs.webkit.org/show_bug.cgi?id=170965 |
| rdar://problem/31589635 |
| |
| Reviewed by Tim Horton. |
| |
| * Modules/applepay/ApplePaySession.cpp: |
| (WebCore::convertAndValidate): |
| No need to convert the status anymore. |
| |
| (WebCore::ApplePaySession::completeShippingContactSelection): |
| Create an ApplePayError given the status. |
| |
| * Modules/applepay/ApplePayShippingContactUpdate.h: |
| Remove the status member variable. |
| |
| * Modules/applepay/PaymentRequest.h: |
| Remove the status member variable. |
| |
| 2017-04-18 Tim Horton <timothy_horton@apple.com> |
| |
| Safari crash when clicking phone number data detector popover button |
| https://bugs.webkit.org/show_bug.cgi?id=170936 |
| <rdar://problem/31416570> |
| |
| Reviewed by Wenson Hsieh. |
| |
| * platform/spi/mac/DataDetectorsSPI.h: |
| Soft-link the phone number key from the correct framework. |
| |
| 2017-04-17 Sam Weinig <sam@webkit.org> |
| |
| [WebIDL] Make annotated types first class allowing them to be used in sequences and unions |
| https://bugs.webkit.org/show_bug.cgi?id=170926 |
| |
| Reviewed by Chris Dumez. |
| |
| - Adds IDL types for WebIDL annotated types: |
| [Clamp] T -> IDLClampAdaptor<T> |
| [EnforceRange] T -> IDLEnforceRangeAdaptor<T> |
| [TreatNullAs=EmptyString] T -> IDLTreatNullAsEmptyAdaptor<T> |
| - Adds additional adaptors for existing specializations |
| [AtomicString] T -> IDLAtomicStringAdaptor<T> |
| [RequiresExistingAtomicString] T -> IDLRequiresExistingAtomicStringAdaptor<T> |
| - Removes the need for IntegerConversionConfiguration and StringConversionConfiguration |
| overloads of convert(). |
| - Allows the use of annotated types as subtypes, such as in sequences and unions. |
| |
| * bindings/IDLTypes.h: |
| Add new types: |
| - IDLClampAdaptor |
| - IDLEnforceRangeAdaptor |
| - IDLTreatNullAsEmptyAdaptor |
| - IDLAtomicStringAdaptor |
| - IDLRequiresExistingAtomicStringAdaptor |
| Add new predicates for matching strings and strings/enumerations. |
| |
| * bindings/js/JSDOMConvertNullable.h: |
| Remove now unnecessary overloads of convert that took IntegerConversionConfiguration |
| and StringConversionConfiguration. |
| |
| * bindings/js/JSDOMConvertNumbers.cpp: |
| * bindings/js/JSDOMConvertNumbers.h: |
| Replace individually named conversion functions with explicit template specializations |
| based on type. |
| (WebCore::Converter<IDLByte>::convert): |
| (WebCore::Converter<IDLOctet>::convert): |
| (WebCore::Converter<IDLShort>::convert): |
| (WebCore::Converter<IDLUnsignedShort>::convert): |
| (WebCore::Converter<IDLLong>::convert): |
| (WebCore::Converter<IDLUnsignedLong>::convert): |
| (WebCore::Converter<IDLLongLong>::convert): |
| (WebCore::Converter<IDLUnsignedLongLong>::convert): |
| Simplify convert functions for normal integer converters to only handle |
| the normal case. |
| |
| (WebCore::Converter<IDLClampAdaptor<T>>::convert): |
| (WebCore::JSConverter<IDLClampAdaptor<T>>::convert): |
| (WebCore::Converter<IDLEnforceRangeAdaptor<T>>::convert): |
| (WebCore::JSConverter<IDLEnforceRangeAdaptor<T>>::convert): |
| Add converters for the new annotated types that call into the new |
| template specialized conversion functions. |
| |
| * bindings/js/JSDOMConvertStrings.h: |
| (WebCore::Converter<IDLDOMString>::convert): |
| (WebCore::Converter<IDLByteString>::convert): |
| (WebCore::Converter<IDLUSVString>::convert): |
| Remove no longer needed StringConversionConfiguration parameter. |
| |
| (WebCore::Converter<IDLTreatNullAsEmptyAdaptor<T>>::convert): |
| (WebCore::JSConverter<IDLTreatNullAsEmptyAdaptor<T>>::convert): |
| (WebCore::Converter<IDLAtomicStringAdaptor<T>>::convert): |
| (WebCore::JSConverter<IDLAtomicStringAdaptor<T>>::convert): |
| (WebCore::Converter<IDLRequiresExistingAtomicStringAdaptor<T>>::convert): |
| (WebCore::JSConverter<IDLRequiresExistingAtomicStringAdaptor<T>>::convert): |
| Add converters for new annotated types. Statically assert that the atomic string |
| adaptors only work for DOMString at present. |
| |
| * bindings/js/JSDOMConvertUnion.h: |
| Update union code to fix a long standing FIXME, treating enumerations as strings |
| for the purposes of the union algorithm, and using the new predicate that works |
| with the slightly more complicated IDLString type (e.g. it can now either be a String |
| or an AtomicString). |
| |
| * bindings/js/JSCSSStyleDeclarationCustom.cpp: |
| * bindings/js/JSCryptoAlgorithmDictionary.cpp: |
| * bindings/js/JSDocumentCustom.cpp: |
| * bindings/js/JSEventListener.cpp: |
| * bindings/js/JSHTMLCanvasElementCustom.cpp: |
| * bindings/js/JSMockContentFilterSettingsCustom.cpp: |
| * bindings/js/JSNodeFilterCustom.cpp: |
| * bindings/js/JSSubtleCryptoCustom.cpp: |
| Remove explicit passing of Normal for the conversion configuration |
| and use new adaptors where appropriate. |
| |
| * bindings/scripts/CodeGeneratorJS.pm: |
| (IsAnnotatedType): |
| (GetAnnotatedIDLType): |
| (GetIDLType): |
| (JSValueToNative): |
| (UnsafeToNative): |
| (GetIntegerConversionConfiguration): Deleted. |
| (GetStringConversionConfiguration): Deleted. |
| Replace passing conversion configuration and specializing for atomic string |
| with annotated types. |
| |
| * bindings/scripts/IDLParser.pm: |
| (parseUnionMemberType): |
| Fix parser error where we weren't parsing extended attributes for a union correctly. |
| |
| * bindings/scripts/test/JS/JSMapLike.cpp: |
| * bindings/scripts/test/JS/JSReadOnlyMapLike.cpp: |
| * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp: |
| * bindings/scripts/test/JS/JSTestCEReactions.cpp: |
| * bindings/scripts/test/JS/JSTestCEReactionsStringifier.cpp: |
| * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp: |
| * bindings/scripts/test/JS/JSTestDOMJIT.cpp: |
| * bindings/scripts/test/JS/JSTestEventConstructor.cpp: |
| * bindings/scripts/test/JS/JSTestEventTarget.cpp: |
| * bindings/scripts/test/JS/JSTestGlobalObject.cpp: |
| * bindings/scripts/test/JS/JSTestInterface.cpp: |
| * bindings/scripts/test/JS/JSTestNamedConstructor.cpp: |
| * bindings/scripts/test/JS/JSTestNode.cpp: |
| * bindings/scripts/test/JS/JSTestObj.cpp: |
| * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp: |
| * bindings/scripts/test/JS/JSTestOverloadedConstructorsWithSequence.cpp: |
| * bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp: |
| * bindings/scripts/test/JS/JSTestSerialization.cpp: |
| * bindings/scripts/test/JS/JSTestSerializationInherit.cpp: |
| * bindings/scripts/test/JS/JSTestSerializationInheritFinal.cpp: |
| * bindings/scripts/test/JS/JSTestStandaloneDictionary.cpp: |
| * bindings/scripts/test/JS/JSTestTypedefs.cpp: |
| Update tests for changes to integer and string conversion. |
| |
| * domjit/DOMJITIDLConvert.h: |
| * domjit/DOMJITIDLType.h: |
| * domjit/DOMJITIDLTypeFilter.h: |
| Add specializations for AtomicString related adaptors. |
| |
| * testing/TypeConversions.h: |
| * testing/TypeConversions.idl: |
| - Re-arrange integer attributes to be in size order, and add [Clamp] variants. |
| - Replace function taking a dictionary + attributes to inspect it |
| with a dictionary attribute. This has been supported for a while |
| and makes the test much clearer (this includes the enum used for |
| inspecting the union in the dictionary). |
| - Add additional test unions that exercise annotated types as subtypes. |
| - Add additional dictionary items that exercise annotated types as subtypes. |
| |
| 2017-04-18 Antti Koivisto <antti@apple.com> |
| |
| Enable optimized layer flushes on iOS |
| https://bugs.webkit.org/show_bug.cgi?id=170938 |
| <rdar://problem/31677395> |
| |
| Reviewed by Simon Fraser. |
| |
| Test: compositing/ios/overflow-scroll-touch-tiles.html |
| |
| * platform/graphics/GraphicsLayer.h: |
| (WebCore::GraphicsLayer::setApproximatePosition): |
| |
| Make virtual. |
| |
| (WebCore::GraphicsLayer::flushCompositingState): |
| * platform/graphics/ca/GraphicsLayerCA.cpp: |
| (WebCore::GraphicsLayerCA::syncPosition): |
| |
| Rename PositionChanged enum value to more descriptive NeedsComputeVisibleAndCoverageRect. |
| |
| (WebCore::GraphicsLayerCA::setApproximatePosition): |
| (WebCore::GraphicsLayerCA::syncBoundsOrigin): |
| |
| Like syncPosition make these invalidate the geometry without scheduling a flush. This is needed |
| so when flush happens we don't just optimize it away. Tile coverage depends on position and bounds. |
| |
| (WebCore::GraphicsLayerCA::flushCompositingState): |
| |
| Remove FlushScope argument. |
| Disable optimization on WK1 due to some UIKit interactions. |
| |
| * platform/graphics/ca/GraphicsLayerCA.h: |
| * platform/graphics/texmap/GraphicsLayerTextureMapper.cpp: |
| (WebCore::GraphicsLayerTextureMapper::flushCompositingState): |
| * platform/graphics/texmap/GraphicsLayerTextureMapper.h: |
| |
| 2017-04-18 Tim Horton <timothy_horton@apple.com> |
| |
| Try to fix the iOS Debug build |
| |
| * platform/LengthBox.h: |
| |
| 2017-04-18 Andreas Kling <akling@apple.com> |
| |
| Break Document::m_associatedFormControls reference cycle. |
| <https://webkit.org/b/170946> |
| |
| Reviewed by Antti Koivisto. |
| |
| There was a race between didAssociateFormControls() and didAssociateFormControlsTimerFired() |
| where detaching Document from its frame between the two would lead to an unbreakable reference |
| cycle between Document and its form elements. |
| |
| Solve this by clearing the set of associated form elements in removedLastRef(), where we clear |
| all the other strong smart pointers to elements. |
| |
| * dom/Document.cpp: |
| (WebCore::Document::removedLastRef): |
| |
| 2017-04-18 Manuel Rego Casasnovas <rego@igalia.com> |
| |
| [css-grid] Add support for percentage gaps |
| https://bugs.webkit.org/show_bug.cgi?id=170764 |
| |
| Reviewed by Sergio Villar Senin. |
| |
| Part of the code to support percentage gaps was already imported |
| from Blink in r213149 (bug #168657). However parsing was not enabled yet, |
| so some pieces were missing. |
| |
| This patch accepts percentages in the parsing of grid-column-gap and |
| grid-row-gap properties, and the grid-gap shorthand. |
| On top of that it gets rid of GridTrackSizingAlgorithm::sizingOperation() |
| method as it's not needed. And instead it passes the specific operation |
| to each call to RenderGrid::guttersSize(), otherwise we would be getting |
| wrong results. |
| |
| Test: fast/css-grid-layout/grid-gutters-as-percentage.html |
| |
| * css/parser/CSSPropertyParser.cpp: |
| (WebCore::CSSPropertyParser::parseSingleValue): Add support for |
| percentage values. |
| (WebCore::CSSPropertyParser::parseShorthand): Ditto. |
| * rendering/GridTrackSizingAlgorithm.cpp: |
| (WebCore::IndefiniteSizeStrategy::recomputeUsedFlexFractionIfNeeded): |
| Pass the specific sizing operation. |
| * rendering/GridTrackSizingAlgorithm.h: Remove sizingOperation(). |
| * rendering/RenderGrid.cpp: |
| (WebCore::RenderGrid::computeTrackBasedLogicalHeight): Pass the specific |
| sizing operation. |
| (WebCore::RenderGrid::computeTrackSizesForDefiniteSize): Ditto. |
| (WebCore::RenderGrid::computeTrackSizesForIndefiniteSize): Ditto. |
| (WebCore::RenderGrid::populateGridPositionsForDirection): Ditto. |
| |
| 2017-04-18 Per Arne Vollan <pvollan@apple.com> |
| |
| Add fallback fonts to video captions stylesheet. |
| https://bugs.webkit.org/show_bug.cgi?id=170495 |
| |
| Reviewed by Eric Carlson. |
| |
| The kCTFontCascadeListAttribute key is used to obtain the cascade list for a font reference. |
| |
| I have not added a test, since CaptionUserPreferences::testingMode() returns true when running tests, |
| preventing this code path from being executed. |
| |
| * page/CaptionUserPreferencesMediaAF.cpp: |
| (WebCore::CaptionUserPreferencesMediaAF::captionsDefaultFontCSS): |
| * platform/spi/win/CoreTextSPIWin.h: |
| |
| 2017-04-18 Miguel Gomez <magomez@igalia.com> |
| |
| [GTK+] Crash in WebCore::ImageFrame::ImageFrame() |
| https://bugs.webkit.org/show_bug.cgi?id=170332 |
| |
| Reviewed by Carlos Garcia Campos. |
| |
| When decoding a PNG image, don't reset the number of frames to 1 when there's a decoding error. Doing |
| so causes a crash if the number of frames we reported before is bigger than 1. |
| |
| Test: fast/images/bad-png-missing-fdat.html |
| |
| * platform/image-decoders/png/PNGImageDecoder.cpp: |
| (WebCore::PNGImageDecoder::fallbackNotAnimated): |
| |
| 2017-04-18 Carlos Garcia Campos <cgarcia@igalia.com> |
| |
| [GLIB] Define priorities also for async network IO tasks |
| https://bugs.webkit.org/show_bug.cgi?id=170905 |
| |
| Reviewed by Žan Doberšek. |
| |
| * platform/network/soup/ResourceHandleSoup.cpp: |
| (WebCore::redirectSkipCallback): |
| (WebCore::sendRequestCallback): |
| (WebCore::continueAfterDidReceiveResponse): |
| (WebCore::readCallback): |
| * platform/network/soup/SocketStreamHandleImplSoup.cpp: |
| (WebCore::SocketStreamHandleImpl::connected): |
| (WebCore::SocketStreamHandleImpl::readBytes): |
| |
| 2017-04-17 Zan Dobersek <zdobersek@igalia.com> |
| |
| Unreviewed build fix for !ENABLE(MEDIA_STREAM) configurations. |
| |
| * html/MediaElementSession.cpp: |
| (WebCore::MediaElementSession::playbackPermitted): Guard the use of |
| HTMLMediaElement::hasMediaStreamSrcObject() with ENABLE(MEDIA_STREAM). |
| |
| 2017-04-17 Alex Christensen <achristensen@webkit.org> |
| |
| Allow Variants of RetainPtrs |
| https://bugs.webkit.org/show_bug.cgi?id=170923 |
| |
| Reviewed by Tim Horton and Sam Weinig. |
| |
| No change in behavior. Just updated the one class that used RetainPtr::operator& to cleanly initialize |
| RetainPtrs instead of taking the address of a smart pointer and forcing a value inside of it. |
| |
| * platform/mac/SSLKeyGeneratorMac.mm: |
| (WebCore::signedPublicKeyAndChallengeString): |
| |
| 2017-04-17 Fujii Hironori <Hironori.Fujii@sony.com> |
| |
| [WinCairo] 'WebCore::GraphicsLayerTextureMapper::flushCompositingStated': method with override specifier 'override' did not override any base class methods |
| https://bugs.webkit.org/show_bug.cgi?id=170928 |
| |
| Reviewed by Simon Fraser. |
| |
| Apply the same change of CoordinatedGraphicsLayer.{cpp,h} of r215410 to GraphicsLayerTextureMapper.{cpp,h}. |
| |
| * platform/graphics/texmap/GraphicsLayerTextureMapper.cpp: |
| (WebCore::GraphicsLayerTextureMapper::flushCompositingState): Added the second argument. |
| * platform/graphics/texmap/GraphicsLayerTextureMapper.h: Ditto. |
| |
| 2017-04-17 Timothy Horton <timothy_horton@apple.com> |
| |
| Plumb all four obscured insets to WebCore, instead of just top/left |
| https://bugs.webkit.org/show_bug.cgi?id=170913 |
| |
| Reviewed by Wenson Hsieh. |
| |
| No new tests, no observable behavior change yet. |
| |
| In preparation for a future patch (for rdar://problem/31564652), plumb |
| all four obscured insets to WebCore/the Web Content process, instead of |
| just the top and left insets. |
| |
| * history/HistoryItem.cpp: |
| (WebCore::HistoryItem::HistoryItem): |
| * history/HistoryItem.h: |
| (WebCore::HistoryItem::obscuredInsets): |
| (WebCore::HistoryItem::setObscuredInsets): |
| (WebCore::HistoryItem::obscuredInset): Deleted. |
| (WebCore::HistoryItem::setObscuredInset): Deleted. |
| * loader/HistoryController.cpp: |
| (WebCore::HistoryController::saveScrollPositionAndViewStateToItem): |
| * page/Page.h: |
| (WebCore::Page::obscuredInsets): |
| (WebCore::Page::setObscuredInsets): |
| (WebCore::Page::obscuredInset): Deleted. |
| (WebCore::Page::setObscuredInset): Deleted. |
| Adopt FloatBoxExtent for obscuredInsets (and adjust pluralization). |
| |
| 2017-04-17 Joseph Pecoraro <pecoraro@apple.com> |
| |
| Web Inspector: Doesn't show size of compressed content correctly |
| https://bugs.webkit.org/show_bug.cgi?id=155112 |
| <rdar://problem/25006728> |
| |
| Reviewed by Alex Christensen and Timothy Hatcher. |
| |
| Tests: http/tests/inspector/network/resource-sizes-disk-cache.html |
| http/tests/inspector/network/resource-sizes-memory-cache.html |
| http/tests/inspector/network/resource-sizes-network.html |
| |
| * inspector/InspectorNetworkAgent.cpp: |
| (WebCore::InspectorNetworkAgent::buildObjectForMetrics): |
| * platform/network/NetworkLoadMetrics.h: |
| (WebCore::NetworkLoadMetrics::isolatedCopy): |
| (WebCore::NetworkLoadMetrics::reset): |
| (WebCore::NetworkLoadMetrics::clearNonTimingData): |
| (WebCore::NetworkLoadMetrics::operator==): |
| (WebCore::NetworkLoadMetrics::encode): |
| (WebCore::NetworkLoadMetrics::decode): |
| * platform/spi/cf/CFNetworkSPI.h: |
| |
| 2017-04-17 Youenn Fablet <youenn@apple.com> |
| |
| Enable video autoplay when getUserMedia is on |
| https://bugs.webkit.org/show_bug.cgi?id=170919 |
| |
| Reviewed by Geoffrey Garen. |
| |
| Test: webrtc/video-autoplay.html |
| |
| * dom/Document.h: |
| (WebCore::Document::isCapturing): |
| * html/HTMLMediaElement.h: |
| (WebCore::HTMLMediaElement::hasMediaStreamSrcObject): |
| * html/MediaElementSession.cpp: |
| (WebCore::MediaElementSession::playbackPermitted): Allowing playback if getUserMedia is capturing audio or video |
| on the document and if element is rendering MediaStream based content. |
| * page/MediaProducer.h: |
| (WebCore::MediaProducer::isCapturing): |
| |
| 2017-04-17 Alex Christensen <achristensen@webkit.org> |
| |
| Fix CMake build. |
| |
| * PlatformMac.cmake: |
| |
| 2017-04-17 Anders Carlsson <andersca@apple.com> |
| |
| Stop using deprecated APIs, part 1 |
| https://bugs.webkit.org/show_bug.cgi?id=170915 |
| rdar://problem/31589635 |
| |
| Reviewed by Tim Horton. |
| |
| Get rid of the status parameter from ApplePayPaymentMethodUpdate. |
| |
| * Modules/applepay/ApplePayPaymentMethodUpdate.h: |
| * Modules/applepay/ApplePayPaymentMethodUpdate.idl: |
| * Modules/applepay/ApplePaySession.cpp: |
| (WebCore::convertAndValidate): |
| (WebCore::ApplePaySession::completePaymentMethodSelection): |
| * Modules/applepay/PaymentRequest.h: |
| |
| 2017-04-17 Youenn Fablet <youenn@apple.com> |
| |
| Disable outdated WritableStream API |
| https://bugs.webkit.org/show_bug.cgi?id=170749 |
| <rdar://problem/31446233> |
| |
| Reviewed by Alex Christensen. |
| |
| No change of behavior. |
| Replacing READABLE_STREAM_API, READABLE_BYTE_STREAM_API and WRITABLE_STREAM_API compilation flag by: |
| - A STREAMS_API compilation flag. |
| - A ReadableByteStreamAPI and WritableStreamAPI runtime flags, turned off except for RWT and DRT. |
| |
| * Configurations/FeatureDefines.xcconfig: |
| * Modules/fetch/FetchBody.cpp: |
| * Modules/fetch/FetchBody.h: |
| * Modules/fetch/FetchBodyOwner.cpp: |
| (WebCore::FetchBodyOwner::isDisturbedOrLocked): |
| (WebCore::FetchBodyOwner::blobLoadingSucceeded): |
| (WebCore::FetchBodyOwner::blobLoadingFailed): |
| (WebCore::FetchBodyOwner::blobChunk): |
| * Modules/fetch/FetchBodyOwner.h: |
| * Modules/fetch/FetchResponse.cpp: |
| (WebCore::FetchResponse::BodyLoader::didSucceed): |
| (WebCore::FetchResponse::BodyLoader::didFail): |
| (WebCore::FetchResponse::BodyLoader::didReceiveData): |
| * Modules/fetch/FetchResponse.h: |
| * Modules/fetch/FetchResponse.idl: |
| * Modules/fetch/FetchResponseSource.cpp: |
| * Modules/fetch/FetchResponseSource.h: |
| * Modules/streams/ByteLengthQueuingStrategy.idl: |
| * Modules/streams/ByteLengthQueuingStrategy.js: |
| * Modules/streams/CountQueuingStrategy.idl: |
| * Modules/streams/CountQueuingStrategy.js: |
| * Modules/streams/ReadableByteStreamController.idl: |
| * Modules/streams/ReadableByteStreamController.js: |
| * Modules/streams/ReadableByteStreamInternals.js: |
| * Modules/streams/ReadableStream.idl: |
| * Modules/streams/ReadableStream.js: |
| (initializeReadableStream): Using readableByteStreamAPI runtime flag directly. |
| * Modules/streams/ReadableStreamBYOBRequest.idl: |
| * Modules/streams/ReadableStreamBYOBRequest.js: |
| * Modules/streams/ReadableStreamDefaultController.idl: |
| * Modules/streams/ReadableStreamDefaultController.js: |
| * Modules/streams/ReadableStreamDefaultReader.idl: |
| * Modules/streams/ReadableStreamDefaultReader.js: |
| * Modules/streams/ReadableStreamInternals.js: |
| * Modules/streams/ReadableStreamSource.h: |
| * Modules/streams/ReadableStreamSource.idl: |
| * Modules/streams/StreamInternals.js: |
| * Modules/streams/WritableStream.idl: |
| * Modules/streams/WritableStream.js: |
| * Modules/streams/WritableStreamInternals.js: |
| * bindings/js/JSDOMGlobalObject.cpp: |
| (WebCore::isReadableByteStreamAPIEnabled): |
| (WebCore::JSDOMGlobalObject::addBuiltinGlobals): |
| * bindings/js/JSReadableStreamPrivateConstructors.cpp: |
| (WebCore::constructJSReadableStreamBYOBRequest): |
| (WebCore::JSBuiltinReadableStreamBYOBRequestPrivateConstructor::initializeExecutable): |
| (WebCore::createReadableStreamBYOBRequestPrivateConstructor): |
| * bindings/js/JSReadableStreamPrivateConstructors.h: |
| * bindings/js/JSReadableStreamSourceCustom.cpp: |
| * bindings/js/ReadableStreamDefaultController.cpp: |
| * bindings/js/ReadableStreamDefaultController.h: |
| * bindings/js/WebCoreBuiltinNames.h: |
| * page/RuntimeEnabledFeatures.h: |
| (WebCore::RuntimeEnabledFeatures::setReadableByteStreamAPIEnabled): |
| (WebCore::RuntimeEnabledFeatures::readableByteStreamAPIEnabled): |
| (WebCore::RuntimeEnabledFeatures::setWritableStreamAPIEnabled): |
| (WebCore::RuntimeEnabledFeatures::writableStreamAPIEnabled): |
| * testing/Internals.cpp: |
| * testing/Internals.h: |
| * testing/Internals.idl: |
| |
| 2017-04-17 Tim Horton <timothy_horton@apple.com> |
| |
| Provide a viewport parameter to disable clipping to the safe area |
| https://bugs.webkit.org/show_bug.cgi?id=170766 |
| <rdar://problem/31564634> |
| |
| Reviewed by Beth Dakin. |
| |
| Tests: tiled-drawing/ios/viewport-clip-to-safe-area-no-gets-margin-tiles.html, |
| tiled-drawing/ios/viewport-clip-to-safe-area-yes-gets-no-margin-tiles.html, |
| |
| * dom/ViewportArguments.cpp: |
| (WebCore::ViewportArguments::resolve): |
| (WebCore::setViewportFeature): |
| * dom/ViewportArguments.h: |
| (WebCore::ViewportArguments::operator==): |
| * page/ViewportConfiguration.cpp: |
| (WebCore::ViewportConfiguration::updateConfiguration): |
| (WebCore::operator<<): |
| (WebCore::ViewportConfiguration::description): |
| * page/ViewportConfiguration.h: |
| (WebCore::ViewportConfiguration::Parameters::Parameters): |
| (WebCore::ViewportConfiguration::clipToSafeArea): |
| Add viewport parameter. |
| |
| * page/ChromeClient.h: |
| * page/FrameView.h: |
| * page/FrameView.cpp: |
| (WebCore::FrameView::enableSpeculativeTilingIfNeeded): |
| If not clipping to the safe area, enable "speculative" tiling immediately, |
| because the margin tiles can be visible immediately. |
| |
| (WebCore::FrameView::hasExtendedBackgroundRectForPainting): |
| (WebCore::FrameView::updateTilesForExtendedBackgroundMode): |
| Don't check the setting here; just respect the mode that is computed |
| by calculateExtendedBackgroundMode. |
| |
| (WebCore::FrameView::calculateExtendedBackgroundMode): |
| If the viewport parameter was set, add margin tiles on both axes. |
| |
| (WebCore::FrameView::setClipToSafeArea): |
| Notify ChromeClient of the change, and re-compute the margin tile mode. |
| |
| * rendering/RenderLayerCompositor.h: |
| * rendering/RenderLayerCompositor.cpp: |
| Factor out code that decides whether the content layer clips to bounds, |
| and make it take the new viewport parameter into account. |
| |
| * rendering/RenderObject.cpp: |
| Don't clip RenderView repaints to RenderView's GraphicsLayer bounds if |
| clip-to-safe-area is off, just like we do for slow-repaint objects in |
| extended background mode. |
| |
| 2017-04-17 Dan Bernstein <mitz@apple.com> |
| |
| [Cocoa] Move isNullFunctionPointer down into WTF |
| https://bugs.webkit.org/show_bug.cgi?id=170892 |
| |
| Reviewed by Sam Weinig. |
| |
| * platform/mediastream/libwebrtc/LibWebRTCProvider.cpp: |
| (WebCore::LibWebRTCProvider::webRTCAvailable): Changed to use WTF::isNullFunctionPointer, |
| and removed the static variable, so instead of loading from the initialization guard, |
| branching, then loading from the variable itself, we just load from the function pointer. |
| (WebCore::isNullFunctionPointer): Deleted. |
| |
| 2017-04-14 Jiewen Tan <jiewen_tan@apple.com> |
| |
| [WebCrypto] Add support for ECDSA |
| https://bugs.webkit.org/show_bug.cgi?id=170789 |
| <rdar://problem/31588604> |
| |
| Reviewed by Brent Fulgham. |
| |
| This patch implements ECDSA according to the spec: https://www.w3.org/TR/WebCryptoAPI/#ecdsa. |
| Supported operations include sign, verify, generateKey, importKey and exportKey. |
| |
| Tests: crypto/subtle/ecdh-generate-export-key-pkcs8-p256.html |
| crypto/subtle/ecdh-generate-export-key-pkcs8-p384.html |
| crypto/subtle/ecdsa-generate-export-jwk-key.html |
| crypto/subtle/ecdsa-generate-export-key-pkcs8.html |
| crypto/subtle/ecdsa-generate-export-key-raw.html |
| crypto/subtle/ecdsa-generate-export-key-spki.html |
| crypto/subtle/ecdsa-generate-key-sign-verify-p256.html |
| crypto/subtle/ecdsa-generate-key-sign-verify-p384.html |
| crypto/subtle/ecdsa-generate-key.html |
| crypto/subtle/ecdsa-import-jwk-private-key.html |
| crypto/subtle/ecdsa-import-jwk-public-key-alg-256.html |
| crypto/subtle/ecdsa-import-jwk-public-key-alg-384.html |
| crypto/subtle/ecdsa-import-jwk-public-key.html |
| crypto/subtle/ecdsa-import-key-sign-p256.html |
| crypto/subtle/ecdsa-import-key-sign-p384.html |
| crypto/subtle/ecdsa-import-key-verify-p256.html |
| crypto/subtle/ecdsa-import-key-verify-p384.html |
| crypto/subtle/ecdsa-import-pkcs8-key.html |
| crypto/subtle/ecdsa-import-raw-key.html |
| crypto/subtle/ecdsa-import-spki-key.html |
| crypto/subtle/ecdsa-verify-malformed-parameters.html |
| crypto/workers/subtle/ecdsa-import-key-sign.html |
| crypto/workers/subtle/ecdsa-import-key-verify.html |
| |
| * CMakeLists.txt: |
| * DerivedSources.make: |
| * PlatformGTK.cmake: |
| * PlatformMac.cmake: |
| * WebCore.xcodeproj/project.pbxproj: |
| * bindings/js/JSSubtleCryptoCustom.cpp: |
| (WebCore::normalizeCryptoAlgorithmParameters): |
| (WebCore::jsSubtleCryptoFunctionSignPromise): |
| (WebCore::jsSubtleCryptoFunctionVerifyPromise): |
| Add missing parameters. |
| * crypto/CommonCryptoUtilities.h: |
| * crypto/CryptoAlgorithm.cpp: |
| (WebCore::CryptoAlgorithm::sign): |
| (WebCore::CryptoAlgorithm::verify): |
| * crypto/CryptoAlgorithm.h: |
| Add missing parameters. |
| * crypto/CryptoAlgorithmParameters.h: |
| * crypto/algorithms/CryptoAlgorithmECDSA.cpp: Added. |
| (WebCore::CryptoAlgorithmECDSA::create): |
| (WebCore::CryptoAlgorithmECDSA::identifier): |
| (WebCore::CryptoAlgorithmECDSA::sign): |
| (WebCore::CryptoAlgorithmECDSA::verify): |
| (WebCore::CryptoAlgorithmECDSA::generateKey): |
| (WebCore::CryptoAlgorithmECDSA::importKey): |
| (WebCore::CryptoAlgorithmECDSA::exportKey): |
| * crypto/algorithms/CryptoAlgorithmECDSA.h: Added. |
| * crypto/algorithms/CryptoAlgorithmHMAC.cpp: |
| (WebCore::CryptoAlgorithmHMAC::sign): |
| (WebCore::CryptoAlgorithmHMAC::verify): |
| * crypto/algorithms/CryptoAlgorithmHMAC.h: |
| Add missing parameters. |
| * crypto/algorithms/CryptoAlgorithmRSASSA_PKCS1_v1_5.cpp: |
| (WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::sign): |
| (WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::verify): |
| * crypto/algorithms/CryptoAlgorithmRSASSA_PKCS1_v1_5.h: |
| Add missing parameters. |
| * crypto/gcrypt/CryptoAlgorithmECDSAGCrypt.cpp: Added. |
| (WebCore::CryptoAlgorithmECDSA::platformSign): |
| (WebCore::CryptoAlgorithmECDSA::platformVerify): |
| * crypto/mac/CommonCryptoDERUtilities.cpp: Added. |
| (WebCore::bytesUsedToEncodedLength): |
| (WebCore::extraBytesNeededForEncodedLength): |
| (WebCore::addEncodedASN1Length): |
| (WebCore::bytesNeededForEncodedLength): |
| * crypto/mac/CommonCryptoDERUtilities.h: |
| (WebCore::bytesUsedToEncodedLength): Deleted. |
| (WebCore::extraBytesNeededForEncodedLength): Deleted. |
| (WebCore::addEncodedASN1Length): Deleted. |
| (WebCore::bytesNeededForEncodedLength): Deleted. |
| Move implementations to a .cpp file. |
| * crypto/mac/CryptoAlgorithmECDSAMac.cpp: Added. |
| (WebCore::cryptoDigestAlgorithm): |
| (WebCore::signECDSA): |
| (WebCore::verifyECDSA): |
| (WebCore::CryptoAlgorithmECDSA::platformSign): |
| (WebCore::CryptoAlgorithmECDSA::platformVerify): |
| * crypto/mac/CryptoAlgorithmRegistryMac.cpp: |
| (WebCore::CryptoAlgorithmRegistry::platformRegisterAlgorithms): |
| * crypto/parameters/CryptoAlgorithmEcdsaParams.h: Added. |
| * crypto/parameters/EcdsaParams.idl: Added. |
| |
| 2017-04-17 Jeremy Jones <jeremyj@apple.com> |
| |
| Refactor enumerateDevices to allow separate CaptureDeviceManagers for audio and video. |
| https://bugs.webkit.org/show_bug.cgi?id=170778 |
| |
| Reviewed by Eric Carlson. |
| |
| Add CoreAudioCaptureDeviceManager to enumerate CoreAudio devices. |
| |
| Refactor RealtimeMediaSourceCenter and RealtimeMediaSourceCenterMac to provide independent audio and video capture device managers |
| and the abiliity to override the capture device managers. |
| |
| CoreAudioCaptureSource now uses CoreAudioCaptureDeviceManager to use the specified device instead of the default one. |
| |
| * WebCore.xcodeproj/project.pbxproj: |
| * platform/mediastream/CaptureDeviceManager.cpp: |
| (CaptureDeviceManager::getAudioSourcesInfo): |
| (CaptureDeviceManager::getVideoSourcesInfo): |
| (CaptureDeviceManager::getSourcesInfo): Deleted. |
| * platform/mediastream/CaptureDeviceManager.h: |
| * platform/mediastream/RealtimeMediaSourceCenter.cpp: |
| (WebCore::RealtimeMediaSourceCenter::setAudioCaptureDeviceManager): |
| (WebCore::RealtimeMediaSourceCenter::unsetAudioCaptureDeviceManager): |
| (WebCore::RealtimeMediaSourceCenter::setVideoCaptureDeviceManager): |
| (WebCore::RealtimeMediaSourceCenter::unsetVideoCaptureDeviceManager): |
| * platform/mediastream/RealtimeMediaSourceCenter.h: |
| (WebCore::RealtimeMediaSourceCenter::defaultAudioCaptureDeviceManager): |
| (WebCore::RealtimeMediaSourceCenter::defaultVideoCaptureDeviceManager): |
| (WebCore::RealtimeMediaSourceCenter::audioCaptureDeviceManager): |
| (WebCore::RealtimeMediaSourceCenter::videoCaptureDeviceManager): |
| * platform/mediastream/mac/AVCaptureDeviceManager.h: |
| * platform/mediastream/mac/AVCaptureDeviceManager.mm: |
| (WebCore::AVCaptureDeviceManager::refreshAVCaptureDevicesOfType): |
| (WebCore::AVCaptureDeviceManager::refreshCaptureDevices): |
| (WebCore::AVCaptureDeviceManager::getAudioSourcesInfo): |
| (WebCore::AVCaptureDeviceManager::getVideoSourcesInfo): |
| (WebCore::AVCaptureDeviceManager::setUseAVFoundationAudioCapture): Deleted. |
| (WebCore::AVCaptureDeviceManager::getSourcesInfo): Deleted. |
| * platform/mediastream/mac/CoreAudioCaptureDevice.cpp: Added. |
| (WebCore::getDeviceInfo): |
| (WebCore::CoreAudioCaptureDevice::create): |
| (WebCore::CoreAudioCaptureDevice::CoreAudioCaptureDevice): |
| (WebCore::CoreAudioCaptureDevice::deviceID): |
| (WebCore::CoreAudioCaptureDevice::deviceClock): |
| (WebCore::CoreAudioCaptureDevice::isAlive): |
| * platform/mediastream/mac/CoreAudioCaptureDevice.h: Copied from Source/WebCore/platform/mediastream/CaptureDeviceManager.h. |
| * platform/mediastream/mac/CoreAudioCaptureDeviceManager.cpp: Added. |
| (WebCore::CoreAudioCaptureDeviceManager::singleton): |
| (WebCore::CoreAudioCaptureDeviceManager::captureDevices): |
| (WebCore::deviceHasInputStreams): |
| (WebCore::CoreAudioCaptureDeviceManager::coreAudioCaptureDevices): |
| (WebCore::CoreAudioCaptureDeviceManager::refreshAudioCaptureDevices): |
| (WebCore::CoreAudioCaptureDeviceManager::devicesChanged): |
| * platform/mediastream/mac/CoreAudioCaptureDeviceManager.h: Copied from Source/WebCore/platform/mediastream/CaptureDeviceManager.h. |
| * platform/mediastream/mac/CoreAudioCaptureSource.cpp: |
| (WebCore::CoreAudioCaptureSource::CoreAudioCaptureSource): |
| (WebCore::CoreAudioCaptureSource::startProducingData): |
| (WebCore::CoreAudioCaptureSource::stopProducingData): |
| * platform/mediastream/mac/RealtimeMediaSourceCenterMac.cpp: |
| (WebCore::RealtimeMediaSourceCenterMac::setUseAVFoundationAudioCapture): |
| (WebCore::RealtimeMediaSourceCenterMac::RealtimeMediaSourceCenterMac): |
| (WebCore::RealtimeMediaSourceCenterMac::createMediaStream): |
| (WebCore::RealtimeMediaSourceCenterMac::getMediaStreamDevices): |
| * platform/mediastream/mac/RealtimeMediaSourceCenterMac.h: |
| |
| 2017-04-17 Ryan Haddad <ryanhaddad@apple.com> |
| |
| Unreviewed, rolling out r215366. |
| |
| This test is failing on performance bots. |
| |
| Reverted changeset: |
| |
| "Add performance test for asking the platform for a font for |
| U+2060 WORD JOINER" |
| https://bugs.webkit.org/show_bug.cgi?id=170842 |
| http://trac.webkit.org/changeset/215366 |
| |
| 2017-04-17 Youenn Fablet <youenn@apple.com> |
| |
| RTCPeerConnection addTrack does not require a stream parameter |
| https://bugs.webkit.org/show_bug.cgi?id=170894 |
| |
| Reviewed by Alex Christensen. |
| |
| Test: webrtc/video-addTrack.html |
| |
| * Modules/mediastream/RTCPeerConnection.cpp: |
| (WebCore::RTCPeerConnection::addTrack): Removing obsolete error throwing. |
| |
| 2017-04-17 Youenn Fablet <youenn@apple.com> |
| |
| Add an external libwebrtc encoder factory in WebCore |
| https://bugs.webkit.org/show_bug.cgi?id=170883 |
| |
| Reviewed by Alex Christensen. |
| |
| No change of behavior, WebCore factory instantiating the default libwebrtc H264 encoder. |
| |
| * WebCore.xcodeproj/project.pbxproj: |
| * platform/mediastream/libwebrtc/LibWebRTCProvider.cpp: |
| (WebCore::staticFactoryAndThreads): |
| * platform/mediastream/libwebrtc/VideoToolBoxEncoderFactory.cpp: Added. |
| (WebCore::VideoToolboxVideoEncoderFactory::CreateVideoEncoder): |
| (WebCore::VideoToolboxVideoEncoderFactory::DestroyVideoEncoder): |
| * platform/mediastream/libwebrtc/VideoToolBoxEncoderFactory.h: Added. |
| |
| 2017-04-17 Antti Koivisto <antti@apple.com> |
| |
| GraphicsLayerCA::recursiveCommitChanges should not descend into subtrees without changes |
| https://bugs.webkit.org/show_bug.cgi?id=170851 |
| |
| Reviewed by Simon Fraser. |
| |
| With lots of layers this can be very slow as it always traverses the entire layer tree. |
| For example GIF animations on tumblr.com trigger expensive commits where almost nothing changes. |
| |
| This patch adds m_hasDescendantsWithUncommittedChanges bit to GraphicsLayerCA. With this |
| we can avoid descending to branches without changes when committing. |
| |
| This patch enabled the optimization on Mac. |
| |
| * platform/graphics/ca/GraphicsLayerCA.cpp: |
| (WebCore::GraphicsLayerCA::GraphicsLayerCA::syncPosition): |
| |
| Set PositionChanged flag when syncing layer position. This flag does nothing except makes |
| next commit to update the coverage rect (so tiling gets updated). |
| |
| (WebCore::GraphicsLayerCA::setVisibleAndCoverageRects): |
| |
| Do all setting of m_uncommittedChanges bits via addUncommittedChanges function. |
| |
| (WebCore::GraphicsLayerCA::recursiveCommitChanges): |
| |
| Bail out if neither the current layer nor any of its descendants have any uncommited changes |
| and none of the ancestors had changes. |
| |
| (WebCore::GraphicsLayerCA::commitLayerChangesBeforeSublayers): |
| (WebCore::GraphicsLayerCA::ensureStructuralLayer): |
| (WebCore::GraphicsLayerCA::changeLayerTypeTo): |
| (WebCore::GraphicsLayerCA::addUncommittedChanges): |
| |
| Set m_hasDescendantsWithUncommittedChanges bit in ancestors when mutating m_uncommittedChanges. |
| |
| (WebCore::GraphicsLayerCA::noteLayerPropertyChanged): |
| * platform/graphics/ca/GraphicsLayerCA.h: |
| (WebCore::RenderLayerCompositor::frameViewDidScroll): |
| |
| Tell the scrolling layer that it needs to recompute coverage. |
| This also schedules a layer flush so no need to do that separately. |
| |
| 2017-04-16 Chris Dumez <cdumez@apple.com> |
| |
| CMD+R / CMD+Q is considered as user interaction and beforeunload alert is shown |
| https://bugs.webkit.org/show_bug.cgi?id=169995 |
| <rdar://problem/23798897> |
| |
| Reviewed by Sam Weinig. |
| |
| Any key event was considered as user interaction with the page, which meant that they |
| would allow beforeunload alerts to be shown even when they do not represent actual |
| user interaction (e.g CMD+R / CMD+Q / CMD+T keyboard shortcuts). |
| |
| To address the issue, we now only treat as user interaction with the page key events |
| that are actually handled by the page (i.e. handled by JS, typed into a field, ...). |
| |
| Tests: fast/events/beforeunload-alert-handled-keydown.html |
| fast/events/beforeunload-alert-unhandled-keydown.html |
| |
| * dom/Document.h: |
| (WebCore::Document::setUserDidInteractWithPage): |
| (WebCore::Document::userDidInteractWithPage): |
| * dom/UserGestureIndicator.cpp: |
| (WebCore::UserGestureIndicator::UserGestureIndicator): |
| * loader/FrameLoader.cpp: |
| (WebCore::shouldAskForNavigationConfirmation): |
| * page/EventHandler.cpp: |
| (WebCore::EventHandler::keyEvent): |
| (WebCore::EventHandler::internalKeyEvent): |
| * page/EventHandler.h: |
| |
| 2017-04-16 Sam Weinig <sam@webkit.org> |
| |
| [WebIDL] Switch IDLAttributes.txt over to a more structured format so that more information can be added for each attribute |
| https://bugs.webkit.org/show_bug.cgi?id=170843 |
| |
| Reviewed by Chris Dumez. |
| |
| - Converts IDLAttributes.txt to IDLAttributes.json, and adds additional |
| information for each attribute about what contexts they are valid in |
| which is checked by the parser. |
| - Removes CustomSetPrototype which was unused, and Immutable which did |
| nothing. |
| |
| * DerivedSources.make: |
| Update extension of IDLAttributes to .json |
| |
| * WebCore.xcodeproj/project.pbxproj: |
| Update project file for new file name and add some missing IDL files. |
| |
| * bindings/scripts/CodeGenerator.pm: |
| Store the processed IDLAttributes in the code generator, so it can |
| be used for any additional Parser instantiations. |
| |
| * bindings/scripts/CodeGeneratorJS.pm: |
| (GenerateHeader): |
| Remove support for CustomSetPrototype. Nobody is using it. |
| |
| * bindings/scripts/IDLAttributes.json: Copied from Source/WebCore/bindings/scripts/IDLAttributes.txt. |
| * bindings/scripts/IDLAttributes.txt: Removed. |
| Rename IDLAttributes.txt -> IDLAttributes.json and move the data |
| into a more structured format. For now each extended attribute can |
| have the following fields: |
| Required: |
| 'contextsAllowed' -> Non-empty array of strings from the contexts array. |
| |
| Optional: |
| 'values' -> Non-empty array of strings allowed after the equal (=) sign in |
| the extended attribute. Like before, an empty string indicates it is |
| ok to not have a value and a star (*) indicates any string is allowed. |
| Not providing a values property at all indicates that no value is |
| allowed. |
| |
| 'standard' -> An object with information about the standard this attribute |
| comes from. Should only be added to attributes that come from standards. |
| |
| 'unsupported' -> A boolean with value true, indicating this property is not |
| yet supported. Should only be used for standard attributes. |
| |
| 'notes' -> A string with notes explaining something about this attribute. |
| |
| * bindings/scripts/IDLParser.pm: |
| Pass and store the processed extended attribute map to the parser, and use it |
| validate that extended attributes being added to things are appropriate for the |
| context. Fix FIXME in isExtendedAttributeApplicableToTypes by using the map to |
| implement the predicate, rather than hard coding the list. |
| |
| * bindings/scripts/generate-bindings.pl: |
| (generateEmptyHeaderAndCpp): |
| (loadIDLAttributes): Deleted. |
| (checkIDLAttributes): Deleted. |
| (checkIfIDLAttributesExists): Deleted. |
| Make specifying an IDL attributes file required. Switch to processing it |
| as a JSON file, and having the parser validate attributes. |
| |
| * bindings/scripts/test/JS/JSTestObj.cpp: |
| * bindings/scripts/test/JS/JSTestTypedefs.cpp: |
| * bindings/scripts/test/TestImplements.idl: |
| * bindings/scripts/test/TestObj.idl: |
| * bindings/scripts/test/TestSupplemental.idl: |
| * bindings/scripts/test/TestTypedefs.idl: |
| - Remove use of Immutable extended attribute in the tests, as it does nothing. |
| - Remove use of the made up ReadOnly attribute, as the tests now use the IDLAttributes |
| file to validate that the attributes are supported, so this would otherwise fail. |
| |
| * css/WebKitCSSMatrix.idl: |
| * svg/SVGZoomEvent.idl: |
| - Remove use of the Immutable extended attribute, as it does nothing. |
| |
| * page/NavigatorID.idl: |
| * page/NavigatorLanguage.idl: |
| - Remove use of the Nondeterministic extended attribute, as it does nothing. |
| |
| * Modules/mediasource/SourceBufferList.idl: |
| Remove use of CallWith on the interface. It is illegal, and does nothing. |
| |
| * animation/KeyframeEffect.idl: |
| * animation/WebAnimation.idl: |
| Remove use of [Default=Undefined]. This construct does nothing and now |
| correctly fails to parse. |
| |
| 2017-04-15 Alex Christensen <achristensen@webkit.org> |
| |
| Fix Windows build after r215396. |
| https://bugs.webkit.org/show_bug.cgi?id=170828 |
| |
| * platform/graphics/win/FontPlatformDataWin.cpp: |
| (WebCore::FontPlatformData::openTypeTable): |
| |
| 2017-04-15 Alex Christensen <achristensen@webkit.org> |
| |
| Remove unused SharedBuffer constructor |
| https://bugs.webkit.org/show_bug.cgi?id=170828 |
| |
| Reviewed by Brady Eidson. |
| |
| * platform/SharedBuffer.cpp: |
| (WebCore::SharedBuffer::append): |
| * platform/SharedBuffer.h: |
| (WebCore::SharedBuffer::create): |
| * platform/graphics/freetype/FontPlatformDataFreeType.cpp: |
| (WebCore::FontPlatformData::openTypeTable): |
| * platform/graphics/win/FontPlatformDataWin.cpp: |
| (WebCore::FontPlatformData::openTypeTable): |
| |
| 2017-04-15 Commit Queue <commit-queue@webkit.org> |
| |
| Unreviewed, rolling out r215393. |
| https://bugs.webkit.org/show_bug.cgi?id=170876 |
| |
| breaks scrollable iframes on ios (Requested by anttik on |
| #webkit). |
| |
| Reverted changeset: |
| |
| "GraphicsLayerCA::recursiveCommitChanges should not descend |
| into subtrees without changes" |
| https://bugs.webkit.org/show_bug.cgi?id=170851 |
| http://trac.webkit.org/changeset/215393 |
| |
| 2017-04-14 Antti Koivisto <antti@apple.com> |
| |
| GraphicsLayerCA::recursiveCommitChanges should not descend into subtrees without changes |
| https://bugs.webkit.org/show_bug.cgi?id=170851 |
| |
| Reviewed by Simon Fraser. |
| |
| With lots of layers this can be very slow as it always traverses the entire layer tree. |
| For example GIF animations on tumblr.com trigger expensive commits where almost nothing changes. |
| |
| This patch adds m_hasDescendantsWithUncommittedChanges bit to GraphicsLayerCA. With this |
| we can avoid descending to branches without changes when committing. |
| |
| * platform/graphics/ca/GraphicsLayerCA.cpp: |
| (WebCore::GraphicsLayerCA::setVisibleAndCoverageRects): |
| |
| Do all setting of m_uncommittedChanges bits via addUncommittedChanges function. |
| |
| (WebCore::GraphicsLayerCA::recursiveCommitChanges): |
| |
| Bail out if neither the current layer nor any of its descendants have any uncommited changes |
| and none of the ancestors had changes. |
| |
| (WebCore::GraphicsLayerCA::commitLayerChangesBeforeSublayers): |
| (WebCore::GraphicsLayerCA::ensureStructuralLayer): |
| (WebCore::GraphicsLayerCA::changeLayerTypeTo): |
| (WebCore::GraphicsLayerCA::addUncommittedChanges): |
| |
| Set m_hasDescendantsWithUncommittedChanges bit in ancestors when mutating m_uncommittedChanges. |
| |
| (WebCore::GraphicsLayerCA::noteLayerPropertyChanged): |
| * platform/graphics/ca/GraphicsLayerCA.h: |
| (WebCore::RenderLayerCompositor::frameViewDidScroll): |
| |
| Tell the scrolling layer that it needs to recompute coverage. |
| This also schedules a layer flush so no need to do that separately. |
| |
| 2017-04-15 Wenson Hsieh <wenson_hsieh@apple.com> |
| |
| [WK2] Support data interaction of files into file inputs |
| https://bugs.webkit.org/show_bug.cgi?id=170803 |
| <rdar://problem/31286130> |
| |
| Reviewed by Tim Horton. |
| |
| Adds remaining support to allow data interaction of files onto inputs of type file. See per-change annotations |
| for more details. Unit tests to be added in the next patch. |
| |
| * platform/PasteboardStrategy.h: |
| * platform/PlatformPasteboard.h: |
| * platform/ios/AbstractPasteboard.h: |
| * platform/ios/PlatformPasteboardIOS.mm: |
| (WebCore::PlatformPasteboard::numberOfFiles): |
| * platform/ios/WebItemProviderPasteboard.mm: |
| |
| Implements numberOfFiles by counting the number of item providers that may be represented as a file, which |
| includes all item providers that contain at least one content UTI type. |
| |
| (-[WebItemProviderPasteboard numberOfFiles]): |
| |
| Adds boilerplate plumbing to fetch the number of files available on the pasteboard. On Mac, logic that |
| previously existed in DragData::numberOfFiles to query the number of files available in the pasteboard is now |
| on PlatformPasteboard instead, which both makes the implementation of DragData::numberOfFiles platform-invariant, |
| and also saves us one synchronous IPC call to the UI process in the WebKit2 implementation. |
| |
| * platform/mac/DragDataMac.mm: |
| (WebCore::DragData::containsFiles): |
| (WebCore::DragData::numberOfFiles): |
| (WebCore::DragData::asFilenames): |
| |
| Add support for recognizing objects in the pasteboard that may be represented by files, and therefore may be |
| uploaded via file input. Following suit with behavior elsewhere on the platform, we consider item providers able |
| to be represented by a file if they contain at least one content UTI type. |
| |
| * platform/mac/PlatformPasteboardMac.mm: |
| |
| Logic previously in DragData::numberOfFiles to get and then count all file path names in the pasteboard has been |
| moved here instead, and no longer needs to go through the pasteboard proxy. |
| |
| (WebCore::PlatformPasteboard::numberOfFiles): |
| |
| 2017-04-15 Wenson Hsieh <wenson_hsieh@apple.com> |
| |
| Unreviewed, fix the build after r215389 |
| |
| Use WebCore::createTemporaryDirectory instead of -_webkit_createTemporaryDirectoryWithTemplatePrefix:. |
| |
| * platform/ios/WebItemProviderPasteboard.mm: |
| (temporaryFileURLForDataInteractionContent): |
| |
| 2017-04-14 Wenson Hsieh <wenson_hsieh@apple.com> |
| |
| Implement a way in WebItemProviderPasteboard to perform actions after file loading completes |
| https://bugs.webkit.org/show_bug.cgi?id=170839 |
| <rdar://problem/31286130> |
| |
| Reviewed by Tim Horton, Andy Estes, and Dan Bernstein. |
| |
| Introduces -[WebItemProviderPasteboard doAfterLoadingProvidedContentIntoFileURLs:], which performs an action |
| after all item providers which are able to provide content are done loading their content into temporary file |
| URLs. If no item providers have available data, we will immediately invoke the action with an empty URL array. |
| |
| For each item provider with data, we save the local URL returned in the load completion block to a randomly |
| generated path in the container's temporary directory. When all files are finished loading, we then invoke the |
| action with all file URLs that successfully loaded. |
| |
| No new tests, since there is no change in behavior. |
| |
| * platform/ios/WebItemProviderPasteboard.h: |
| * platform/ios/WebItemProviderPasteboard.mm: |
| (temporaryFileURLForDataInteractionContent): |
| (-[WebItemProviderPasteboard doAfterLoadingProvidedContentIntoFileURLs:]): |
| |
| 2017-04-14 Nikita Vasilyev <nvasilyev@apple.com> |
| |
| Web Inspector: WebSockets: messages with non-latin letters are displayed incorrectly |
| https://bugs.webkit.org/show_bug.cgi?id=170760 |
| |
| Reviewed by Joseph Pecoraro. |
| |
| Add payloadLength property, which is used to display size. When payloadLength is unavailable, |
| it is calculated from payloadData by Web Inspector frontend. |
| |
| This fixes <webkit.org/b/170609> Web Inspector: WebSockets: Transferred size is incorrect. |
| |
| Tests: http/tests/websocket/tests/hybi/inspector/binary.html |
| http/tests/websocket/tests/hybi/inspector/send-and-receive.html |
| |
| * inspector/InspectorNetworkAgent.cpp: |
| (WebCore::InspectorNetworkAgent::didReceiveWebSocketFrame): |
| (WebCore::InspectorNetworkAgent::didSendWebSocketFrame): |
| |
| 2017-04-14 Mark Lam <mark.lam@apple.com> |
| |
| Update architectures in xcconfig files. |
| https://bugs.webkit.org/show_bug.cgi?id=170867 |
| <rdar://problem/31628104> |
| |
| Reviewed by Joseph Pecoraro. |
| |
| No new tests needed. Only updating xcconfig files. |
| |
| * Configurations/Base.xcconfig: |
| * Configurations/FeatureDefines.xcconfig: |
| |
| 2017-04-14 Wenson Hsieh <wenson_hsieh@apple.com> |
| |
| [WK2] Support Icon creation from file URLs on iOS |
| https://bugs.webkit.org/show_bug.cgi?id=170809 |
| <rdar://problem/31286130> |
| |
| Reviewed by Tim Horton. |
| |
| Minor tweaks and refactoring to support displaying a WebCore::Icon from a list of filepaths on iOS. Please see |
| below annotations for more details. No new tests yet, as behavior on Mac should not have changed, and behavior |
| on iOS will not change until later patches land. Tests will be added in a later patch. |
| |
| Most of the changes here remove platform special-casing in FileInputType for iOS and Mac, refactoring the code |
| such that it works for both platforms while preserving behavior. |
| |
| * html/FileInputType.cpp: |
| (WebCore::FileInputType::~FileInputType): |
| (WebCore::FileInputType::setFiles): |
| (WebCore::FileInputType::filesChosen): |
| * html/FileInputType.h: |
| |
| Un-guard m_fileIconLoader on iOS, and un-guard m_displayString for Mac. Consolidate logic in both version of |
| filesChosen and remove the iOS-specific version. Behavior when passing in an empty display string and null Icon |
| will be the same as that of the existing filesChosen method on Mac. Also, introduce a version of setFiles that |
| takes an additional RequestIcon enum that indicates whether or not to additionally use the new filepaths to |
| request an Icon update. filesChosen invokes this with RequestIcon::No if a non-null Icon was specified, as is |
| the case when uploading a file via the image picker on iOS. |
| |
| * html/HTMLInputElement.cpp: |
| (WebCore::HTMLInputElement::displayString): |
| * html/HTMLInputElement.h: |
| * html/InputType.cpp: |
| * html/InputType.h: |
| * loader/EmptyClients.h: |
| * page/ChromeClient.h: |
| |
| Introduce ChromeClient::createIconForFiles, which generates an icon representing the content at a list of file |
| paths. See WebKit and WebKit2 ChangeLogs for more details. |
| |
| * platform/FileChooser.h: |
| (WebCore::FileChooserClient::filesChosen): |
| * rendering/RenderFileUploadControl.cpp: |
| (WebCore::RenderFileUploadControl::fileTextValue): |
| |
| Remove platform special-casing when generating the text to display when uploading a file. If a displayString |
| is specified, then we use the contents of the displayString; otherwise, fall back to using the input element's |
| FileList to compute the display string. |
| |
| 2017-04-14 Brady Eidson <beidson@apple.com> |
| |
| Fix basic WKURLSchemeHandler bugs. |
| <rdar://problem/30647559> and https://bugs.webkit.org/show_bug.cgi?id=170862 |
| |
| Reviewed by Andy Estes. |
| |
| Covered by new API tests. |
| |
| * loader/SubresourceLoader.cpp: |
| (WebCore::SubresourceLoader::didReceiveDataOrBuffer): |
| |
| 2017-04-14 Jiewen Tan <jiewen_tan@apple.com> |
| |
| [WebCrypto] Support HKDF |
| https://bugs.webkit.org/show_bug.cgi?id=170636 |
| <rdar://problem/23539827> |
| |
| Reviewed by Brent Fulgham. |
| |
| This patch implements HKDF according to the spec: https://www.w3.org/TR/WebCryptoAPI/#hkdf. |
| Supported operations include deriveKey, deriveBits, importKey and getKeyLength. |
| |
| Tests: crypto/subtle/ecdh-import-key-derive-hkdf-key.html |
| crypto/subtle/hkdf-derive-bits-malformed-parametrs.html |
| crypto/subtle/hkdf-import-key-derive-bits.html |
| crypto/subtle/hkdf-import-key-derive-hmac-key.html |
| crypto/subtle/hkdf-import-key-malformed-parameters.html |
| crypto/subtle/hkdf-import-key.html |
| crypto/workers/subtle/hkdf-import-key-derive-bits.html |
| crypto/workers/subtle/hkdf-import-key-derive-hmac-key.html |
| crypto/workers/subtle/hkdf-import-key.html |
| |
| * CMakeLists.txt: |
| * DerivedSources.make: |
| * PlatformGTK.cmake: |
| * PlatformMac.cmake: |
| * WebCore.xcodeproj/project.pbxproj: |
| * bindings/js/JSCryptoAlgorithmDictionary.cpp: |
| (WebCore::JSCryptoAlgorithmDictionary::createParametersForEncrypt): |
| (WebCore::JSCryptoAlgorithmDictionary::createParametersForDecrypt): |
| (WebCore::JSCryptoAlgorithmDictionary::createParametersForSign): |
| (WebCore::JSCryptoAlgorithmDictionary::createParametersForVerify): |
| (WebCore::JSCryptoAlgorithmDictionary::createParametersForDigest): |
| (WebCore::JSCryptoAlgorithmDictionary::createParametersForGenerateKey): |
| (WebCore::JSCryptoAlgorithmDictionary::createParametersForDeriveKey): |
| (WebCore::JSCryptoAlgorithmDictionary::createParametersForDeriveBits): |
| (WebCore::JSCryptoAlgorithmDictionary::createParametersForImportKey): |
| (WebCore::JSCryptoAlgorithmDictionary::createParametersForExportKey): |
| Rename HKDF_CTR to HKDF. |
| * bindings/js/JSSubtleCryptoCustom.cpp: |
| (WebCore::normalizeCryptoAlgorithmParameters): |
| * bindings/js/SerializedScriptValue.cpp: |
| (WebCore::CloneSerializer::write): |
| (WebCore::CloneDeserializer::read): |
| Rename HKDF_CTR to HKDF. |
| * crypto/CommonCryptoUtilities.h: |
| * crypto/CryptoAlgorithmIdentifier.h: |
| * crypto/CryptoAlgorithmParameters.h: |
| * crypto/algorithms/CryptoAlgorithmHKDF.cpp: Added. |
| (WebCore::CryptoAlgorithmHKDF::create): |
| (WebCore::CryptoAlgorithmHKDF::identifier): |
| (WebCore::CryptoAlgorithmHKDF::deriveBits): |
| (WebCore::CryptoAlgorithmHKDF::importKey): |
| (WebCore::CryptoAlgorithmHKDF::getKeyLength): |
| * crypto/algorithms/CryptoAlgorithmHKDF.h: Added. |
| * crypto/gcrypt/CryptoAlgorithmHKDFGCrypt.cpp: Added. |
| (WebCore::CryptoAlgorithmHKDF::platformDeriveBits): |
| * crypto/mac/CryptoAlgorithmHKDFMac.cpp: Added. |
| (WebCore::CryptoAlgorithmHKDF::platformDeriveBits): |
| * crypto/mac/CryptoAlgorithmRegistryMac.cpp: |
| (WebCore::CryptoAlgorithmRegistry::platformRegisterAlgorithms): |
| * crypto/parameters/CryptoAlgorithmHkdfParams.h: Added. |
| * crypto/parameters/HkdfParams.idl: Added. |
| |
| 2017-04-14 Zalan Bujtas <zalan@apple.com> |
| |
| text-align start / end failure in table cells |
| https://bugs.webkit.org/show_bug.cgi?id=141417 |
| <rdar://problem/31051672> |
| |
| Reviewed by Antti Koivisto. |
| |
| Apply "text-align: center" on th elements when parent's computed value for the 'text-align' property |
| is its initial value, unless it is explicitly set. |
| |
| Test: fast/table/center-th-when-parent-has-initial-text-align.html |
| |
| * css/CSSProperties.json: |
| * css/StyleBuilderCustom.h: |
| (WebCore::StyleBuilderCustom::applyInitialTextAlign): |
| (WebCore::StyleBuilderCustom::applyValueTextAlign): |
| * css/StyleResolver.cpp: |
| (WebCore::StyleResolver::adjustRenderStyle): |
| (WebCore::StyleResolver::applyProperty): |
| * rendering/style/RenderStyle.h: |
| (WebCore::RenderStyle::hasExplicitlySetTextAlign): |
| (WebCore::RenderStyle::setHasExplicitlySetTextAlign): |
| (WebCore::RenderStyle::NonInheritedFlags::hasExplicitlySetTextAlign): |
| (WebCore::RenderStyle::NonInheritedFlags::setHasExplicitlySetTextAlign): |
| |
| 2017-04-14 Andy Estes <aestes@apple.com> |
| |
| [ios-simulator] API test WebKit2.DataDetectionReferenceDate timing out |
| https://bugs.webkit.org/show_bug.cgi?id=161967 |
| |
| Reviewed by Alexey Proskuryakov. |
| |
| DataDetectorsCoreSPI.h defined DDQueryOffset as a struct of two CFIndexes, which is 16 bytes |
| on LP64, but the struct is actually defined as two CFIndex-typed 32-bit bitfields, which is |
| 8 bytes on LP64. This breaks the ABI on Public SDK builds when calling functions that take |
| or return DDQueryOffsets. |
| |
| * platform/spi/cocoa/DataDetectorsCoreSPI.h: Updated the DDQueryOffset definition for |
| Public SDK builds, and added a static_assert to detect future size changes at compile time. |
| |
| 2017-04-14 Konstantin Tokarev <annulen@yandex.ru> |
| |
| Removed unused and unimplemented methods from MediaPlayer |
| https://bugs.webkit.org/show_bug.cgi?id=170848 |
| |
| Reviewed by Jer Noble. |
| |
| No new tests needed. |
| |
| * platform/graphics/MediaPlayer.h: |
| |
| 2017-04-14 Myles C. Maxfield <mmaxfield@apple.com> |
| |
| Add performance test for asking the platform for a font for U+2060 WORD JOINER |
| https://bugs.webkit.org/show_bug.cgi?id=170842 |
| |
| Reviewed by Tim Horton. |
| |
| No new tests because there is no behavior change. |
| |
| * platform/graphics/WidthCache.h: |
| (WebCore::WidthCache::add): |
| (WebCore::WidthCache::addSlowCase): |
| |
| 2017-04-14 Ryan Haddad <ryanhaddad@apple.com> |
| |
| Unreviewed, rolling out r215350. |
| |
| This change broke the Windows build. |
| |
| Reverted changeset: |
| |
| "Remove unused SharedBuffer constructor" |
| https://bugs.webkit.org/show_bug.cgi?id=170828 |
| http://trac.webkit.org/changeset/215350 |
| |
| 2017-04-14 Jer Noble <jer.noble@apple.com> |
| |
| [MediaSource] Push capabilities across process boundary during UIProcess capture. |
| https://bugs.webkit.org/show_bug.cgi?id=170814 |
| |
| Reviewed by Eric Carlson. |
| |
| There's no real reason for RealtimeMediaSourceCapabilities to be RefCounted nor to keep them from |
| being created on the stack. So in addition to making that class coder-compliant, change all the |
| classes that vend capabilities to use a unique_ptr<> instead of a RefPtr<>. |
| |
| * Modules/mediastream/CanvasCaptureMediaStreamTrack.h: |
| * Modules/webaudio/MediaStreamAudioSource.cpp: |
| (WebCore::MediaStreamAudioSource::capabilities): |
| * Modules/webaudio/MediaStreamAudioSource.h: |
| * platform/mediastream/MediaEndpoint.cpp: |
| * platform/mediastream/MediaStreamTrackPrivate.cpp: |
| (WebCore::MediaStreamTrackPrivate::capabilities): |
| * platform/mediastream/MediaStreamTrackPrivate.h: |
| * platform/mediastream/RealtimeMediaSource.h: |
| * platform/mediastream/RealtimeMediaSourceCapabilities.h: |
| (WebCore::CapabilityValueOrRange::encode): |
| (WebCore::CapabilityValueOrRange::decode): |
| (WebCore::RealtimeMediaSourceCapabilities::RealtimeMediaSourceCapabilities): |
| (WebCore::RealtimeMediaSourceCapabilities::supportedConstraints): |
| (WebCore::RealtimeMediaSourceCapabilities::setSupportedConstraints): |
| (WebCore::RealtimeMediaSourceCapabilities::encode): |
| (WebCore::RealtimeMediaSourceCapabilities::decode): |
| (WebCore::RealtimeMediaSourceCapabilities::create): Deleted. |
| * platform/mediastream/RealtimeMediaSourceSettings.h: |
| * platform/mediastream/mac/AVMediaCaptureSource.h: |
| * platform/mediastream/mac/AVMediaCaptureSource.mm: |
| (WebCore::AVMediaCaptureSource::initializeCapabilities): |
| (WebCore::AVMediaCaptureSource::capabilities): |
| * platform/mediastream/mac/CoreAudioCaptureSource.cpp: |
| (WebCore::CoreAudioCaptureSource::capabilities): |
| * platform/mediastream/mac/CoreAudioCaptureSource.h: |
| * platform/mediastream/mac/RealtimeIncomingAudioSource.cpp: |
| (WebCore::RealtimeIncomingAudioSource::capabilities): |
| * platform/mediastream/mac/RealtimeIncomingAudioSource.h: |
| * platform/mediastream/mac/RealtimeIncomingVideoSource.cpp: |
| (WebCore::RealtimeIncomingVideoSource::capabilities): |
| * platform/mediastream/mac/RealtimeIncomingVideoSource.h: |
| * platform/mock/MockRealtimeMediaSource.cpp: |
| (WebCore::MockRealtimeMediaSource::initializeCapabilities): |
| (WebCore::MockRealtimeMediaSource::capabilities): |
| * platform/mock/MockRealtimeMediaSource.h: |
| * platform/mediastream/openwebrtc/RealtimeMediaSourceOwr.h: |
| |
| 2017-04-13 Saam Barati <sbarati@apple.com> |
| |
| WebAssembly: We should be able to postMessage a JSWebAssemblyModule |
| https://bugs.webkit.org/show_bug.cgi?id=170573 |
| |
| Reviewed by Filip Pizlo. |
| |
| This patch's main purpose is to implement postMessage of JSWebAssemblyModule. |
| The spec text describing the behavior is: https://github.com/WebAssembly/design/blob/master/JS.md#structured-clone-of-a-webassemblymodule |
| We only allow for JSWebAssemblyModule to be serialized in the postMessage |
| context. More work needs to be done to make it valid to store a module in |
| IndexDB. |
| |
| All that is needed to serialize a JSWebAssemblyModule is grab a Ref |
| to its underlying Wasm::Module. So, when doing a postMessage, all we |
| do is grab this Ref, and then re-create the JSWebAssemblyModule from |
| the Wasm::Module in the new VM/global object. Because the code for |
| Wasm::Module is VM-independent, this is all that's needed. This turned |
| out nicely, because it requires little knowledge from WebCore about |
| what it means to clone a JSWebAssemblyModule. |
| |
| |
| The second significant part of this patch is teaching WorkerRunLoop about |
| the various timers inside JSC. Before, the WorkerRunLoop wouldn't always |
| wake up to address JSC timers. I noticed this bug when I was writing |
| tests to make sure that Wasm was running concurrently in different |
| workers. The bug is that the WorkerRunLoop's message queue has no insight |
| into a timer being scheduled. This effected the PromiseDeferredTimer that |
| Wasm uses, as well as the various GC timers that Heap uses. Now, WorkerRunLoop |
| will set itself up to be notified when timers are set. When a timer is |
| set, the WorkerRunLoop will perform an iteration to to reset its top |
| level MessageQueue timeout to be no longer than the next timer fire date. |
| |
| Tests: storage/indexeddb/wasm-exceptions.html |
| workers/wasm-hashset-many.html |
| workers/wasm-hashset.html |
| workers/wasm-long-compile-many.html |
| workers/wasm-long-compile.html |
| |
| * ForwardingHeaders/heap/GCActivityCallback.h: Added. |
| * ForwardingHeaders/runtime/JSRunLoopTimer.h: Added. |
| * ForwardingHeaders/runtime/PromiseDeferredTimer.h: Added. |
| * ForwardingHeaders/wasm: Added. |
| * ForwardingHeaders/wasm/js: Added. |
| * ForwardingHeaders/wasm/js/JSWebAssemblyModule.h: Added. |
| * bindings/js/SerializedScriptValue.cpp: |
| (WebCore::CloneSerializer::serialize): |
| (WebCore::CloneSerializer::CloneSerializer): |
| (WebCore::CloneSerializer::dumpIfTerminal): |
| (WebCore::CloneDeserializer::deserialize): |
| (WebCore::CloneDeserializer::CloneDeserializer): |
| (WebCore::CloneDeserializer::readTerminal): |
| (WebCore::SerializedScriptValue::SerializedScriptValue): |
| (WebCore::SerializedScriptValue::create): |
| (WebCore::SerializedScriptValue::deserialize): |
| * bindings/js/SerializedScriptValue.h: |
| * bindings/js/WorkerScriptController.cpp: |
| (WebCore::WorkerScriptController::addTimerSetNotification): |
| (WebCore::WorkerScriptController::removeTimerSetNotification): |
| * bindings/js/WorkerScriptController.h: |
| * workers/WorkerRunLoop.cpp: |
| (WebCore::WorkerRunLoop::runInMode): |
| |
| 2017-04-13 Dean Jackson <dino@apple.com> |
| |
| Large negative animation-delays may not work depending on machine uptime |
| https://bugs.webkit.org/show_bug.cgi?id=166962 |
| <rdar://problem/30091526> |
| |
| Reviewed by Tim Horton. |
| |
| If you set a really negative animation delay, it would cause |
| AnimationBase::m_startTime to become negative, because the delay |
| value was "bigger" than monotonicallyIncreasingTime. |
| |
| However, the state machine was using -1 to mean that the start time |
| hadn't yet been set. Classic cmarrin! |
| |
| Replace all the special values with std::optional, and use nullopt |
| to mean the value doesn't exist yet. |
| |
| Test: animations/large-negative-delay.html |
| |
| * page/animation/AnimationBase.cpp: |
| (WebCore::AnimationBase::updateStateMachine): |
| (WebCore::AnimationBase::fireAnimationEventsIfNeeded): |
| (WebCore::AnimationBase::getTimeToNextEvent): |
| (WebCore::AnimationBase::freezeAtTime): |
| (WebCore::AnimationBase::getElapsedTime): |
| * page/animation/AnimationBase.h: Use std::optional. |
| (WebCore::AnimationBase::paused): |
| |
| 2017-04-13 Alex Christensen <achristensen@webkit.org> |
| |
| Remove unused SharedBuffer constructor |
| https://bugs.webkit.org/show_bug.cgi?id=170828 |
| |
| Reviewed by Brady Eidson. |
| |
| * platform/SharedBuffer.cpp: |
| (WebCore::SharedBuffer::append): |
| * platform/SharedBuffer.h: |
| (WebCore::SharedBuffer::create): |
| |
| 2017-04-13 Antti Koivisto <antti@apple.com> |
| |
| Don't invalidate composition for style changes in non-composited layers |
| https://bugs.webkit.org/show_bug.cgi?id=170805 |
| <rdar://problem/31606185> |
| |
| Reviewed by Simon Fraser. |
| |
| Test: compositing/updates/animation-non-composited.html |
| |
| In most cases they can't affect composition. Composition updates are expensive, this can |
| save a lot of work (tumblr.com animations hit this at the moment). |
| |
| * rendering/RenderElement.h: |
| (WebCore::RenderElement::createsGroup): |
| (WebCore::RenderElement::createsGroupForStyle): |
| |
| Factor to a static function so we can test style directly. |
| |
| * rendering/RenderLayerCompositor.cpp: |
| (WebCore::RenderLayerCompositor::layerStyleChanged): |
| (WebCore::RenderLayerCompositor::styleChangeMayAffectIndirectCompositingReasons): |
| |
| Test if style change might cause compositing change that can't be determined without compositing update. |
| |
| * rendering/RenderLayerCompositor.h: |
| |
| 2017-04-13 JF Bastien <jfbastien@apple.com> |
| |
| WebAssembly: manage memory better |
| https://bugs.webkit.org/show_bug.cgi?id=170628 |
| |
| Reviewed by Keith Miller, Michael Saboff. |
| |
| Re-use a VM tag which was intended for JavaScript core, was then |
| used by our GC, and is now unused. If I don't do this then |
| WebAssembly fast memories will make vmmap look super weird because |
| it'll look like multi-gigabyte of virtual memory are allocated as |
| part of our process' regular memory! |
| |
| Separately I need to update vmmap and other tools to print the |
| right name. Right now this tag gets identified as "JS garbage |
| collector". |
| |
| * page/ResourceUsageData.cpp: |
| (WebCore::ResourceUsageData::ResourceUsageData): |
| * page/ResourceUsageData.h: |
| * page/cocoa/ResourceUsageOverlayCocoa.mm: |
| (WebCore::HistoricResourceUsageData::HistoricResourceUsageData): |
| * page/cocoa/ResourceUsageThreadCocoa.mm: |
| (WebCore::displayNameForVMTag): |
| (WebCore::categoryForVMTag): |
| |
| 2017-04-13 Ryosuke Niwa <rniwa@webkit.org> |
| |
| Update the comments for the number of bits in RenderStyle::InheritedFlags. |
| |
| Rubber-stamped by Zalan Bujtas |
| |
| * rendering/style/RenderStyle.h: |
| |
| 2017-04-13 Myles C. Maxfield <mmaxfield@apple.com> |
| |
| Addressing post-review comment after r215314. |
| https://bugs.webkit.org/show_bug.cgi?id=169015 |
| |
| Reviewed by Alexey Proskuryakov. |
| |
| * platform/graphics/cocoa/FontCacheCoreText.cpp: |
| (WebCore::FontDatabase::fontForPostScriptName): |
| |
| 2017-04-13 Sam Weinig <sam@webkit.org> |
| |
| [WebIDL] Add support for extended attributes on types in WebIDL |
| https://bugs.webkit.org/show_bug.cgi?id=170759 |
| |
| Reviewed by Alex Christensen. |
| |
| - Update parsing for WebIDL grammar changes. |
| - Adds an extended attributes hash to IDLType that is filled according |
| to the WebIDL annotated type rules. |
| - Updates code generation to take advantage of IDLType's extended attribute |
| simplifying some existing code. |
| - Update IDLs in the project to adhere to the new grammar. |
| |
| * Modules/indexeddb/IDBFactory.idl: |
| * Modules/indexeddb/IDBIndex.idl: |
| * Modules/indexeddb/IDBKeyRange.idl: |
| * Modules/indexeddb/IDBObjectStore.idl: |
| * Modules/websockets/WebSocket.idl: |
| * crypto/parameters/AesCtrParams.idl: |
| * crypto/parameters/AesKeyParams.idl: |
| * crypto/parameters/Pbkdf2Params.idl: |
| * crypto/parameters/RsaKeyGenParams.idl: |
| * testing/TypeConversions.idl: |
| Update for grammar change. |
| |
| * bindings/scripts/CodeGeneratorJS.pm: |
| (GenerateDefaultValue): |
| (GetBaseIDLType): |
| (GetIDLType): |
| (GetIntegerConversionConfiguration): |
| (GetStringConversionConfiguration): |
| (JSValueToNative): |
| (UnsafeToNative): |
| (NativeToJSValueDOMConvertNeedsState): |
| (NativeToJSValueDOMConvertNeedsGlobalObject): |
| (NativeToJSValue): |
| Remove the need for the type's context in many places since type |
| associated extended attributes are now on the type itself. |
| |
| * bindings/scripts/IDLParser.pm: |
| (copyExtendedAttributes): |
| Move up so it can be reused. |
| |
| (isExtendedAttributeApplicableToTypes): |
| Add temporary predicated to indicate which attributes should be moved to types. This |
| logic should be moved to IDLAttributes.txt. |
| |
| (moveExtendedAttributesApplicableToTypes): |
| Add helper to move attributes to the type's extended attributes hash if applicable. |
| |
| (makeSimpleType): |
| Use initializer syntax to simplify. |
| |
| (cloneType): |
| Support cloning types with extended attributes. |
| |
| (typeByApplyingTypedefs): |
| When constructing the clone for a typedef application, move any applicable attributes |
| to the clone from the original type. |
| |
| (parseDictionaryMember): |
| (parseTypedef): |
| (parseAttributeOrOperationRest): |
| (parseAttributeRest): |
| (parseOperationOrIterator): |
| (parseSpecialOperation): |
| (parseOptionalIterableInterface): |
| (parseMapLikeProperties): |
| (parseOptionalOrRequiredArgument): |
| (parseType): |
| (parseTypeWithExtendedAttributes): |
| (parseUnionMemberType): |
| (parseNonAnyType): |
| Update for new grammar, moving applicable attributes eagerly. |
| |
| (assertNoExtendedAttributesInTypedef): Deleted. |
| * bindings/scripts/test/JS/JSTestObj.cpp: |
| (WebCore::jsTestObjPrototypeFunctionClassMethodWithClampOnOptional): |
| (WebCore::jsTestObjPrototypeFunctionClassMethodWithClampOnOptionalCaller): |
| (WebCore::jsTestObjPrototypeFunctionClassMethodWithEnforceRangeOnOptional): |
| (WebCore::jsTestObjPrototypeFunctionClassMethodWithEnforceRangeOnOptionalCaller): |
| * bindings/scripts/test/JS/JSTestTypedefs.cpp: |
| (WebCore::jsTestTypedefsAttributeWithClamp): |
| (WebCore::jsTestTypedefsAttributeWithClampGetter): |
| (WebCore::jsTestTypedefsAttributeWithClampInTypedef): |
| (WebCore::jsTestTypedefsAttributeWithClampInTypedefGetter): |
| (WebCore::setJSTestTypedefsAttributeWithClamp): |
| (WebCore::setJSTestTypedefsAttributeWithClampFunction): |
| (WebCore::setJSTestTypedefsAttributeWithClampInTypedef): |
| (WebCore::setJSTestTypedefsAttributeWithClampInTypedefFunction): |
| (WebCore::jsTestTypedefsPrototypeFunctionFuncWithClampInTypedef): |
| (WebCore::jsTestTypedefsPrototypeFunctionFuncWithClampInTypedefCaller): |
| * bindings/scripts/test/TestObj.idl: |
| * bindings/scripts/test/TestTypedefs.idl: |
| Update for new grammar. Add some new tests for uncovered cases. |
| |
| 2017-04-13 Alex Christensen <achristensen@webkit.org> |
| |
| Fix CMake build |
| https://bugs.webkit.org/show_bug.cgi?id=170815 |
| |
| Reviewed by Beth Dakin. |
| |
| * platform/spi/cocoa/AVKitSPI.h: |
| |
| 2017-04-13 JF Bastien <jfbastien@apple.com> |
| |
| cmake build fix |
| |
| Unreviewed build fix. A file was removed but left in the cmake |
| build. |
| |
| * PlatformMac.cmake: |
| |
| 2017-04-13 Youenn Fablet <youenn@apple.com> |
| |
| Remove RTCSignalingState::Closed |
| https://bugs.webkit.org/show_bug.cgi?id=170811 |
| |
| Reviewed by Eric Carlson. |
| |
| Covered by existing and rebased tests. |
| |
| Adding RTCPeerConnection::isClosed to better match the isClosed internal slot in webrtc specification. |
| Using isClosed instead of checking signalingState value. |
| Implementing isClosed in terms of m_connectionState which has a Closed value. |
| |
| * Modules/mediastream/MediaEndpointPeerConnection.cpp: |
| (WebCore::MediaEndpointPeerConnection::setLocalDescriptionTask): |
| (WebCore::MediaEndpointPeerConnection::replaceTrackTask): |
| * Modules/mediastream/PeerConnectionBackend.cpp: |
| (WebCore::PeerConnectionBackend::createOffer): |
| (WebCore::PeerConnectionBackend::createOfferSucceeded): |
| (WebCore::PeerConnectionBackend::createOfferFailed): |
| (WebCore::PeerConnectionBackend::createAnswer): |
| (WebCore::PeerConnectionBackend::createAnswerSucceeded): |
| (WebCore::PeerConnectionBackend::createAnswerFailed): |
| (WebCore::PeerConnectionBackend::setLocalDescription): |
| (WebCore::PeerConnectionBackend::setLocalDescriptionSucceeded): |
| (WebCore::PeerConnectionBackend::setLocalDescriptionFailed): |
| (WebCore::PeerConnectionBackend::setRemoteDescription): |
| (WebCore::PeerConnectionBackend::setRemoteDescriptionSucceeded): |
| (WebCore::PeerConnectionBackend::setRemoteDescriptionFailed): |
| (WebCore::PeerConnectionBackend::addIceCandidate): |
| (WebCore::PeerConnectionBackend::addIceCandidateSucceeded): |
| (WebCore::PeerConnectionBackend::addIceCandidateFailed): |
| * Modules/mediastream/RTCPeerConnection.cpp: |
| (WebCore::RTCPeerConnection::create): |
| (WebCore::RTCPeerConnection::RTCPeerConnection): |
| (WebCore::RTCPeerConnection::addTrack): |
| (WebCore::RTCPeerConnection::removeTrack): |
| (WebCore::RTCPeerConnection::queuedCreateOffer): |
| (WebCore::RTCPeerConnection::queuedCreateAnswer): |
| (WebCore::RTCPeerConnection::queuedSetLocalDescription): |
| (WebCore::RTCPeerConnection::queuedSetRemoteDescription): |
| (WebCore::RTCPeerConnection::queuedAddIceCandidate): |
| (WebCore::RTCPeerConnection::setConfiguration): |
| (WebCore::RTCPeerConnection::createDataChannel): |
| (WebCore::RTCPeerConnection::doClose): |
| (WebCore::RTCPeerConnection::updateIceGatheringState): |
| (WebCore::RTCPeerConnection::updateIceConnectionState): |
| (WebCore::RTCPeerConnection::scheduleNegotiationNeededEvent): |
| * Modules/mediastream/RTCPeerConnection.h: |
| * Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp: |
| (WebCore::signalingState): |
| * platform/mediastream/RTCSignalingState.h: |
| |
| 2017-04-13 Zalan Bujtas <zalan@apple.com> |
| |
| BreakingContext::WordTrailingSpace cleanup. |
| https://bugs.webkit.org/show_bug.cgi?id=170750 |
| |
| Reviewed by Myles C. Maxfield. |
| |
| No change in functionality. |
| |
| * rendering/RenderText.cpp: |
| (WebCore::RenderText::computePreferredLogicalWidths): |
| * rendering/line/BreakingContext.h: |
| (WebCore::WordTrailingSpace::WordTrailingSpace): |
| (WebCore::WordTrailingSpace::width): |
| (WebCore::BreakingContext::handleText): |
| |
| 2017-04-13 Romain Bellessort <romain.bellessort@crf.canon.fr> |
| |
| [Readable Streams API] Implement cloneArrayBuffer in WebCore |
| https://bugs.webkit.org/show_bug.cgi?id=170008 |
| |
| Reviewed by Youenn Fablet. |
| |
| Implemented cloneArrayBuffer based on existing structuredCloneArrayBuffer |
| implementation. The code has been factorized so that both cloneArrayBuffer |
| and structuredCloneArrayBuffer rely on the same code (which is basically |
| the previous implementation of structuredCloneArrayBuffer + the ability |
| to clone only a part of considered buffer). |
| |
| Test: streams/clone-array-buffer.html |
| |
| * Modules/streams/ReadableByteStreamInternals.js: Deleted cloneArrayBuffer JS implementation. |
| * bindings/js/JSDOMGlobalObject.cpp: |
| (WebCore::JSDOMGlobalObject::addBuiltinGlobals): Add cloneArrayBuffer private declaration. |
| * bindings/js/StructuredClone.cpp: |
| (WebCore::cloneArrayBufferImpl): Added (mostly based on previous structuredCloneArrayBuffer). |
| (WebCore::cloneArrayBuffer): Added. |
| (WebCore::structuredCloneArrayBuffer): Updated. |
| * bindings/js/StructuredClone.h: Added cloneArrayBuffer declaration. |
| * bindings/js/WebCoreBuiltinNames.h: Added cloneArrayBuffer declaration. |
| * testing/Internals.cpp: Added support for testing cloneArrayBuffer. |
| * testing/Internals.h: Added support for testing cloneArrayBuffer. |
| * testing/Internals.idl: Added support for testing cloneArrayBuffer. |
| |
| 2017-04-13 Youenn Fablet <youenn@apple.com> |
| |
| onnegotiationneeded should only be called once |
| https://bugs.webkit.org/show_bug.cgi?id=170785 |
| |
| Reviewed by Alex Christensen. |
| |
| Covered by updated test. |
| |
| Disabling explicit call to markAsNeedingNegotiation in case libwebrtc is used as libwebrtc is calling it. |
| Making sure removeTrack gets notified up to libwebrtc. |
| |
| * Modules/mediastream/PeerConnectionBackend.h: |
| (WebCore::PeerConnectionBackend::notifyRemovedTrack): |
| * Modules/mediastream/RTCPeerConnection.cpp: |
| (WebCore::RTCPeerConnection::addTrack): |
| (WebCore::RTCPeerConnection::removeTrack): |
| (WebCore::RTCPeerConnection::completeAddTransceiver): |
| * Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp: |
| (WebCore::LibWebRTCMediaEndpoint::removeTrack): |
| * Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.h: |
| * Modules/mediastream/libwebrtc/LibWebRTCPeerConnectionBackend.cpp: |
| (WebCore::LibWebRTCPeerConnectionBackend::notifyRemovedTrack): |
| * Modules/mediastream/libwebrtc/LibWebRTCPeerConnectionBackend.h: |
| |
| 2017-04-13 Dave Hyatt <hyatt@apple.com> |
| |
| Rendering flexbox children across columns |
| https://bugs.webkit.org/show_bug.cgi?id=164166 |
| <rdar://problem/29055587> |
| |
| Reviewed by Zalan Bujtas. |
| |
| Added fast/multicol/flexbox-rows.html |
| |
| * rendering/RenderBlockFlow.cpp: |
| (WebCore::RenderBlockFlow::adjustForUnsplittableChild): |
| |
| 2017-04-12 Alex Christensen <achristensen@webkit.org> |
| |
| Clean up SharedBuffer public functions |
| https://bugs.webkit.org/show_bug.cgi?id=170795 |
| |
| Reviewed by Andreas Kling. |
| |
| Make some member functions that are now only used internally private. |
| |
| * platform/SharedBuffer.cpp: |
| (WebCore::SharedBuffer::append): |
| (WebCore::SharedBuffer::platformDataSize): Deleted. |
| * platform/SharedBuffer.h: |
| |
| 2017-04-12 Dan Bernstein <mitz@apple.com> |
| |
| [Mac] Future-proof .xcconfig files |
| https://bugs.webkit.org/show_bug.cgi?id=170802 |
| |
| Reviewed by Tim Horton. |
| |
| * Configurations/Base.xcconfig: |
| * Configurations/DebugRelease.xcconfig: |
| * Configurations/FeatureDefines.xcconfig: |
| * Configurations/Version.xcconfig: |
| |
| 2017-04-12 Brady Eidson <beidson@apple.com> |
| |
| QuotaExceededError when saving to localStorage in private mode. |
| https://bugs.webkit.org/show_bug.cgi?id=157010 |
| |
| Reviewed by Alex Christensen. |
| |
| No new tests (Covered by changes to existing test). |
| |
| LocalStorage in private browsing is now effectively SessionStorage. |
| It's ephemeral, per-tab, and copied over to tabs window.open()'ed from the current. |
| |
| * loader/EmptyClients.cpp: |
| (WebCore::EmptyStorageNamespaceProvider::createEphemeralLocalStorageNamespace): |
| |
| * page/Chrome.cpp: |
| (WebCore::Chrome::createWindow): |
| |
| * page/Page.cpp: |
| (WebCore::Page::ephemeralLocalStorage): |
| (WebCore::Page::setEphemeralLocalStorage): |
| * page/Page.h: |
| |
| * page/SecurityOriginData.h: |
| |
| * storage/Storage.cpp: |
| (WebCore::Storage::length): |
| (WebCore::Storage::key): |
| (WebCore::Storage::getItem): |
| (WebCore::Storage::setItem): |
| (WebCore::Storage::removeItem): |
| (WebCore::Storage::clear): |
| (WebCore::Storage::contains): |
| (WebCore::Storage::isDisabledByPrivateBrowsing): Deleted. |
| |
| * storage/StorageMap.h: |
| |
| * storage/StorageNamespaceProvider.cpp: |
| (WebCore::StorageNamespaceProvider::localStorageArea): |
| * storage/StorageNamespaceProvider.h: |
| |
| * storage/StorageType.h: |
| (WebCore::isLocalStorage): |
| (WebCore::isPersistentLocalStorage): |
| |
| 2017-04-12 Myles C. Maxfield <mmaxfield@apple.com> |
| |
| [Cocoa] Suppress font download dialog in new matching algorithm |
| https://bugs.webkit.org/show_bug.cgi?id=169015 |
| |
| Reviewed by Alexey Proskuryakov. |
| |
| Not testable. |
| |
| * platform/graphics/cocoa/FontCacheCoreText.cpp: |
| (WebCore::FontDatabase::lookupPostScriptName): |
| |
| 2017-04-12 Eric Carlson <eric.carlson@apple.com> |
| |
| REGRESSION (r215242-215243): [ios-simulator] API test WebKit1.AudioSessionCategoryIOS is failing |
| https://bugs.webkit.org/show_bug.cgi?id=170777 |
| <rdar://problem/31592877> |
| |
| Reviewed by Jer Noble. |
| |
| No new tests, fixes an existing test. |
| |
| * platform/audio/cocoa/MediaSessionManagerCocoa.cpp: |
| (PlatformMediaSessionManager::updateSessionState): Pass parameters to lambda by reference. |
| |
| 2017-04-12 Eric Carlson <eric.carlson@apple.com> |
| |
| [MediaStream] Set correct audio session category when capturing audio |
| https://bugs.webkit.org/show_bug.cgi?id=170736 |
| <rdar://problem/31559405> |
| |
| Unreviewed, update an assertion I missed in r215242. |
| |
| * platform/audio/PlatformMediaSession.cpp: |
| (WebCore::PlatformMediaSession::PlatformMediaSession): |
| |
| 2017-04-12 Alex Christensen <achristensen@webkit.org> |
| |
| Remove unused SharedBuffer::wrapCFDataArray |
| https://bugs.webkit.org/show_bug.cgi?id=170794 |
| |
| Reviewed by Brady Eidson. |
| |
| It's unused since r215280. |
| |
| * platform/SharedBuffer.h: |
| * platform/cf/SharedBufferCF.cpp: |
| (WebCore::SharedBuffer::wrapCFDataArray): Deleted. |
| |
| 2017-04-12 Anders Carlsson <andersca@apple.com> |
| |
| Tweak WebCore::setMetadataURL function |
| https://bugs.webkit.org/show_bug.cgi?id=170786 |
| |
| Reviewed by Beth Dakin. |
| |
| Get rid of the "referrer" parameter, it isn't used. Make the remaining parameters const. Swap the |
| urlString and path parameters since that makes more sense. Use String instead of NSString in the call to WKSetMetadataURL. |
| |
| * platform/FileSystem.cpp: |
| (WebCore::setMetadataURL): Deleted. |
| * platform/FileSystem.h: |
| * platform/mac/FileSystemMac.mm: |
| (WebCore::setMetadataURL): |
| |
| 2017-04-12 Myles C. Maxfield <mmaxfield@apple.com> |
| |
| Well-known variations should clamp to the values listed in the @font-face block |
| https://bugs.webkit.org/show_bug.cgi?id=169260 |
| |
| Reviewed by Dean Jackson. |
| |
| Most of this patch is plumbing the variation ranges from the CSSFontFace object |
| to preparePlatformFont() where variation values get applied. |
| |
| Beyond that, there is one other piece of this patch - a nonspecified value in an |
| @font-face block shouldn't perform any clamping, but a specified value should be |
| clamped. This means that we need to retain whether or not a value is specified. |
| This patch does this by migrating CSSFontFace from using FontSelectionCapabilities |
| to using FontSelectionSpecifiedCapabilities, which has its internals behind |
| std::optionals which represent whether or not the value was specified. For the |
| purposes of font selection, these unspecified values are replaced with default |
| values. |
| |
| Test: fast/text/variations/font-face-clamp.html |
| |
| * css/CSSFontFace.cpp: |
| (WebCore::CSSFontFace::font): |
| * css/CSSFontFace.h: |
| * css/CSSFontFaceSource.cpp: |
| (WebCore::CSSFontFaceSource::font): |
| * css/CSSFontFaceSource.h: |
| * css/CSSFontSelector.cpp: |
| (WebCore::CSSFontSelector::addFontFaceRule): |
| * loader/cache/CachedFont.cpp: |
| (WebCore::CachedFont::createFont): |
| (WebCore::CachedFont::platformDataFromCustomData): |
| * loader/cache/CachedFont.h: |
| * loader/cache/CachedSVGFont.cpp: |
| (WebCore::CachedSVGFont::createFont): |
| (WebCore::CachedSVGFont::platformDataFromCustomData): |
| * loader/cache/CachedSVGFont.h: |
| * platform/graphics/FontCache.cpp: |
| (WebCore::FontPlatformDataCacheKey::FontPlatformDataCacheKey): |
| (WebCore::FontPlatformDataCacheKey::operator==): |
| (WebCore::FontPlatformDataCacheKeyHash::hash): |
| (WebCore::FontCache::getCachedFontPlatformData): |
| (WebCore::FontCache::fontForFamily): |
| * platform/graphics/FontCache.h: |
| (WebCore::FontCache::fontForFamily): |
| (WebCore::FontCache::getCachedFontPlatformData): |
| (WebCore::FontCache::createFontPlatformDataForTesting): |
| * platform/graphics/FontSelectionAlgorithm.h: |
| (WebCore::FontSelectionRange::uniqueValue): |
| (WebCore::FontSelectionCapabilities::operator==): |
| (WebCore::FontSelectionCapabilities::operator!=): |
| (WebCore::FontSelectionSpecifiedCapabilities::computeFontSelectionCapabilities): |
| (WebCore::FontSelectionSpecifiedCapabilities::operator==): |
| (WebCore::FontSelectionSpecifiedCapabilities::operator!=): |
| (WebCore::FontSelectionSpecifiedCapabilities::operator=): |
| (WebCore::FontSelectionSpecifiedCapabilities::computeWeight): |
| (WebCore::FontSelectionSpecifiedCapabilities::computeWidth): |
| (WebCore::FontSelectionSpecifiedCapabilities::computeSlope): |
| * platform/graphics/cocoa/FontCacheCoreText.cpp: |
| (WebCore::preparePlatformFont): |
| (WebCore::fontWithFamily): |
| (WebCore::FontCache::createFontPlatformData): |
| (WebCore::FontCache::systemFallbackForCharacters): |
| * platform/graphics/mac/FontCacheMac.mm: |
| (WebCore::FontCache::lastResortFallbackFont): |
| * platform/graphics/mac/FontCustomPlatformData.cpp: |
| (WebCore::FontCustomPlatformData::fontPlatformData): |
| * platform/graphics/mac/FontCustomPlatformData.h: |
| |
| 2017-04-12 Beth Dakin <bdakin@apple.com> |
| |
| Speculative open source build fix. |
| |
| * platform/spi/cocoa/AVKitSPI.h: |
| |
| 2017-04-12 Alex Christensen <achristensen@webkit.org> |
| |
| Stop using didReceiveDataArray callback on El Capitan |
| https://bugs.webkit.org/show_bug.cgi?id=170780 |
| |
| Reviewed by Brady Eidson. |
| |
| didReceiveDataArray was an optimization that improved performance on iOS but is not needed any more. |
| The only platform where this is used is El Capitan, and didReceiveData works fine on that platform. |
| I've left some cleanup still to be done in SharedBuffer, and doing that is the motivation for this change. |
| |
| * WebCore.xcodeproj/project.pbxproj: |
| * loader/ResourceLoader.h: |
| * loader/SubresourceLoader.h: |
| * loader/cf/SubresourceLoaderCF.cpp: Removed. |
| * loader/mac/ResourceLoaderMac.mm: |
| (WebCore::ResourceLoader::didReceiveDataArray): Deleted. |
| * platform/network/ResourceHandleClient.h: |
| (WebCore::ResourceHandleClient::supportsDataArray): Deleted. |
| (WebCore::ResourceHandleClient::didReceiveDataArray): Deleted. |
| * platform/network/cf/ResourceHandleCFURLConnectionDelegate.cpp: |
| (WebCore::ResourceHandleCFURLConnectionDelegate::makeConnectionClient): |
| (WebCore::ResourceHandleCFURLConnectionDelegate::didReceiveDataArrayCallback): Deleted. |
| * platform/network/cf/ResourceHandleCFURLConnectionDelegate.h: |
| * platform/network/cf/ResourceHandleCFURLConnectionDelegateWithOperationQueue.cpp: |
| (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::didReceiveDataArray): Deleted. |
| * platform/network/cf/ResourceHandleCFURLConnectionDelegateWithOperationQueue.h: |
| * platform/network/cf/SynchronousResourceHandleCFURLConnectionDelegate.cpp: |
| (WebCore::SynchronousResourceHandleCFURLConnectionDelegate::didReceiveDataArray): Deleted. |
| * platform/network/cf/SynchronousResourceHandleCFURLConnectionDelegate.h: |
| * platform/network/mac/WebCoreResourceHandleAsDelegate.mm: |
| (-[WebCoreResourceHandleAsDelegate connection:didReceiveDataArray:]): Deleted. |
| * platform/network/mac/WebCoreResourceHandleAsOperationQueueDelegate.mm: |
| (-[WebCoreResourceHandleAsOperationQueueDelegate connection:didReceiveDataArray:]): Deleted. |
| |
| 2017-04-12 Beth Dakin <bdakin@apple.com> |
| |
| Attempted build fix. |
| |
| * platform/spi/cocoa/AVKitSPI.h: |
| |
| 2017-04-12 Beth Dakin <bdakin@apple.com> |
| |
| Adopt AVKit name change from AVFunctionBar* to AVTouchBar* |
| https://bugs.webkit.org/show_bug.cgi?id=170693 |
| -and corresponding- |
| rdar://problem/31230018 |
| |
| Reviewed by San Weinig. |
| |
| Since the new names only apply to some versions of macOS, this patch uses typedefs |
| for the older OS’s. SO: |
| |
| AVFunctionBarScrubber is now AVTouchBarScrubber |
| |
| AVFunctionBarPlaybackControlsProvider is now AVTouchBarPlaybackControlsProvider |
| |
| AVFunctionBarMediaSelectionOption is now AVTouchBarMediaSelectionOption |
| |
| And the protocol AVFunctionBarPlaybackControlsControlling is now |
| AVTouchBarPlaybackControlsControlling |
| |
| * platform/mac/WebPlaybackControlsManager.h: |
| * platform/mac/WebPlaybackControlsManager.mm: |
| (-[WebPlaybackControlsManager audioFunctionBarMediaSelectionOptions]): |
| (-[WebPlaybackControlsManager setAudioFunctionBarMediaSelectionOptions:]): |
| (-[WebPlaybackControlsManager currentAudioFunctionBarMediaSelectionOption]): |
| (-[WebPlaybackControlsManager setCurrentAudioFunctionBarMediaSelectionOption:]): |
| (-[WebPlaybackControlsManager legibleFunctionBarMediaSelectionOptions]): |
| (-[WebPlaybackControlsManager setLegibleFunctionBarMediaSelectionOptions:]): |
| (-[WebPlaybackControlsManager currentLegibleFunctionBarMediaSelectionOption]): |
| (-[WebPlaybackControlsManager setCurrentLegibleFunctionBarMediaSelectionOption:]): |
| (mediaSelectionOptions): |
| |
| Here is where the typedefs and #define are declared. |
| * platform/spi/cocoa/AVKitSPI.h: |
| |
| 2017-04-12 Alex Christensen <achristensen@webkit.org> |
| |
| Fix WinCairo build after r215265 |
| https://bugs.webkit.org/show_bug.cgi?id=170502 |
| |
| m_threadId was removed in the header but not in the constructor implementation. |
| Initializer lists are our friends. |
| |
| * platform/network/curl/CurlDownload.cpp: |
| (WebCore::CurlDownloadManager::CurlDownloadManager): |
| (WebCore::CurlDownload::CurlDownload): Deleted. |
| * platform/network/curl/CurlDownload.h: |
| |
| 2017-04-12 Yusuke Suzuki <utatane.tea@gmail.com> |
| |
| Unreviewed, build fix for Win and GTK |
| https://bugs.webkit.org/show_bug.cgi?id=170758 |
| |
| * platform/posix/SharedBufferPOSIX.cpp: |
| (WebCore::SharedBuffer::createFromReadingFile): |
| * platform/win/SharedBufferWin.cpp: |
| (WebCore::SharedBuffer::createFromReadingFile): |
| |
| 2017-04-12 Yusuke Suzuki <utatane.tea@gmail.com> |
| |
| [WTF] Introduce Thread class and use RefPtr<Thread> and align Windows Threading implementation semantics to Pthread one |
| https://bugs.webkit.org/show_bug.cgi?id=170502 |
| |
| Reviewed by Mark Lam. |
| |
| Mechanical change. Use Thread:: APIs. |
| |
| * Modules/indexeddb/server/IDBServer.cpp: |
| (WebCore::IDBServer::IDBServer::IDBServer): |
| * Modules/indexeddb/server/IDBServer.h: |
| * Modules/webaudio/AsyncAudioDecoder.cpp: |
| (WebCore::AsyncAudioDecoder::AsyncAudioDecoder): |
| (WebCore::AsyncAudioDecoder::~AsyncAudioDecoder): |
| (WebCore::AsyncAudioDecoder::runLoop): |
| * Modules/webaudio/AsyncAudioDecoder.h: |
| * Modules/webaudio/OfflineAudioDestinationNode.cpp: |
| (WebCore::OfflineAudioDestinationNode::OfflineAudioDestinationNode): |
| (WebCore::OfflineAudioDestinationNode::uninitialize): |
| (WebCore::OfflineAudioDestinationNode::startRendering): |
| * Modules/webaudio/OfflineAudioDestinationNode.h: |
| * Modules/webdatabase/Database.cpp: |
| (WebCore::Database::securityOrigin): |
| * Modules/webdatabase/DatabaseThread.cpp: |
| (WebCore::DatabaseThread::start): |
| (WebCore::DatabaseThread::databaseThread): |
| (WebCore::DatabaseThread::recordDatabaseOpen): |
| (WebCore::DatabaseThread::recordDatabaseClosed): |
| * Modules/webdatabase/DatabaseThread.h: |
| (WebCore::DatabaseThread::getThreadID): |
| * bindings/js/GCController.cpp: |
| (WebCore::GCController::garbageCollectOnAlternateThreadForDebugging): |
| * fileapi/AsyncFileStream.cpp: |
| (WebCore::callOnFileThread): |
| * loader/icon/IconDatabase.cpp: |
| (WebCore::IconDatabase::open): |
| (WebCore::IconDatabase::close): |
| * loader/icon/IconDatabase.h: |
| * page/ResourceUsageThread.cpp: |
| (WebCore::ResourceUsageThread::createThreadIfNeeded): |
| * page/ResourceUsageThread.h: |
| * page/scrolling/ScrollingThread.cpp: |
| (WebCore::ScrollingThread::ScrollingThread): |
| (WebCore::ScrollingThread::isCurrentThread): |
| (WebCore::ScrollingThread::createThreadIfNeeded): |
| (WebCore::ScrollingThread::threadCallback): |
| * page/scrolling/ScrollingThread.h: |
| * platform/audio/HRTFDatabaseLoader.cpp: |
| (WebCore::HRTFDatabaseLoader::HRTFDatabaseLoader): |
| (WebCore::HRTFDatabaseLoader::loadAsynchronously): |
| (WebCore::HRTFDatabaseLoader::waitForLoaderThreadCompletion): |
| * platform/audio/HRTFDatabaseLoader.h: |
| * platform/audio/ReverbConvolver.cpp: |
| (WebCore::ReverbConvolver::ReverbConvolver): |
| (WebCore::ReverbConvolver::~ReverbConvolver): |
| * platform/audio/ReverbConvolver.h: |
| * platform/audio/gstreamer/AudioFileReaderGStreamer.cpp: |
| (WebCore::createBusFromAudioFile): |
| (WebCore::createBusFromInMemoryAudioFile): |
| * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp: |
| (ResourceHandleStreamingClient::ResourceHandleStreamingClient): |
| (ResourceHandleStreamingClient::~ResourceHandleStreamingClient): |
| * platform/network/cf/LoaderRunLoopCF.cpp: |
| (WebCore::loaderRunLoop): |
| * platform/network/curl/CurlDownload.cpp: |
| (WebCore::CurlDownloadManager::startThreadIfNeeded): |
| (WebCore::CurlDownloadManager::stopThread): |
| * platform/network/curl/CurlDownload.h: |
| * platform/network/curl/SocketStreamHandleImpl.h: |
| * platform/network/curl/SocketStreamHandleImplCurl.cpp: |
| (WebCore::SocketStreamHandleImpl::startThread): |
| (WebCore::SocketStreamHandleImpl::stopThread): |
| * workers/WorkerThread.cpp: |
| (WebCore::WorkerThread::WorkerThread): |
| (WebCore::WorkerThread::start): |
| (WebCore::WorkerThread::workerThread): |
| * workers/WorkerThread.h: |
| (WebCore::WorkerThread::threadID): |
| |
| 2017-04-10 Antti Koivisto <antti@apple.com> |
| |
| Cache small media resources in disk cache |
| https://bugs.webkit.org/show_bug.cgi?id=170676 |
| <rdar://problem/31532649> |
| |
| Reviewed by Andreas Kling. |
| |
| Test: http/tests/cache/disk-cache/disk-cache-media-small.html |
| |
| Testing support. Functional changes are in WebKit2. |
| |
| * html/HTMLMediaElement.cpp: |
| (WebCore::HTMLMediaElement::mediaPlayerCreateResourceLoader): |
| (WebCore::HTMLMediaElement::lastMediaResourceLoaderForTesting): |
| * html/HTMLMediaElement.h: |
| * loader/MediaResourceLoader.cpp: |
| (WebCore::MediaResourceLoader::MediaResourceLoader): |
| (WebCore::MediaResourceLoader::addResponseForTesting): |
| (WebCore::MediaResource::responseReceived): |
| * loader/MediaResourceLoader.h: |
| * platform/network/cocoa/WebCoreNSURLSession.mm: |
| (-[WebCoreNSURLSessionDataTask resource:receivedResponse:]): |
| |
| We can now receive cached responses. |
| |
| * testing/Internals.cpp: |
| (WebCore::responseSourceToString): |
| (WebCore::Internals::xhrResponseSource): |
| (WebCore::Internals::mediaResponseSources): |
| (WebCore::Internals::mediaResponseContentRanges): |
| * testing/Internals.h: |
| * testing/Internals.idl: |
| |
| 2017-04-12 Alex Christensen <achristensen@webkit.org> |
| |
| Modernize vector adoption |
| https://bugs.webkit.org/show_bug.cgi?id=170758 |
| |
| Reviewed by Geoffrey Garen. |
| |
| * Modules/encryptedmedia/InitDataRegistry.cpp: |
| (WebCore::extractKeyIDsKeyids): |
| * Modules/indexeddb/IDBGetResult.cpp: |
| (WebCore::IDBGetResult::dataFromBuffer): |
| * Modules/indexeddb/IDBKeyData.cpp: |
| (WebCore::IDBKeyData::decode): |
| * Modules/indexeddb/server/IDBSerialization.cpp: |
| (WebCore::serializeIDBKeyData): |
| (WebCore::decodeKey): |
| * Modules/indexeddb/server/SQLiteIDBBackingStore.cpp: |
| (WebCore::IDBServer::SQLiteIDBBackingStore::getRecord): |
| (WebCore::IDBServer::SQLiteIDBBackingStore::getAllObjectStoreRecords): |
| (WebCore::IDBServer::SQLiteIDBBackingStore::uncheckedGetIndexRecordForOneKey): |
| * Modules/indexeddb/server/SQLiteIDBCursor.cpp: |
| (WebCore::IDBServer::SQLiteIDBCursor::internalFetchNextRecord): |
| * css/CSSFontFaceSource.cpp: |
| (WebCore::CSSFontFaceSource::font): |
| * loader/FrameLoader.cpp: |
| (WebCore::FrameLoader::loadResourceSynchronously): |
| * loader/appcache/ApplicationCacheStorage.cpp: |
| (WebCore::ApplicationCacheStorage::loadCache): |
| * loader/archive/mhtml/MHTMLParser.cpp: |
| (WebCore::MHTMLParser::parseNextPart): |
| * loader/cache/CachedFont.cpp: |
| (WebCore::CachedFont::createCustomFontData): |
| * loader/cache/CachedSVGFont.cpp: |
| (WebCore::CachedSVGFont::ensureCustomFontData): |
| * platform/SharedBuffer.cpp: |
| (WebCore::SharedBuffer::create): |
| (WebCore::utf8Buffer): |
| (WebCore::SharedBuffer::adoptVector): Deleted. |
| * platform/SharedBuffer.h: |
| * platform/ThreadSafeDataBuffer.h: |
| (WebCore::ThreadSafeDataBufferImpl::ThreadSafeDataBufferImpl): |
| (WebCore::ThreadSafeDataBuffer::create): |
| (WebCore::ThreadSafeDataBuffer::ThreadSafeDataBuffer): |
| (WebCore::ThreadSafeDataBuffer::decode): |
| (): Deleted. |
| (WebCore::ThreadSafeDataBuffer::adoptVector): Deleted. |
| * platform/network/BlobRegistryImpl.cpp: |
| (WebCore::BlobRegistryImpl::registerBlobURL): |
| * platform/network/DataURLDecoder.cpp: |
| (WebCore::DataURLDecoder::decodeBase64): |
| (WebCore::DataURLDecoder::decodeEscaped): |
| |
| 2017-04-12 Per Arne Vollan <pvollan@apple.com> |
| |
| Implement stroke-color CSS property. |
| https://bugs.webkit.org/show_bug.cgi?id=169352 |
| |
| Reviewed by Jon Lee. |
| |
| Support setting text stroke color using the CSS property stroke-color, see https://drafts.fxtf.org/paint/. |
| Text stroke color can currently be set with the -webkit-text-stroke-color property. To make sure this still |
| works, I added a check to determine if the stroke-color property has been explicitly set. If it has not been |
| set, we fall back to the value of the -webkit-text-stroke-color property. |
| |
| Tests: fast/css/stroke-color-fallback.html |
| fast/css/stroke-color.html |
| fast/css/visited-link-stroke-color.html |
| |
| * css/CSSComputedStyleDeclaration.cpp: |
| (WebCore::ComputedStyleExtractor::propertyValue): |
| * css/CSSProperties.json: |
| * css/StyleBuilderCustom.h: |
| (WebCore::StyleBuilderCustom::applyValueStrokeColor): |
| * css/StyleResolver.cpp: |
| (WebCore::isValidVisitedLinkProperty): |
| * css/parser/CSSParserFastPaths.cpp: |
| (WebCore::isColorPropertyID): |
| * css/parser/CSSPropertyParser.cpp: |
| (WebCore::CSSPropertyParser::parseSingleValue): |
| * rendering/TextDecorationPainter.cpp: |
| (WebCore::decorationColor): |
| * rendering/TextPaintStyle.cpp: |
| (WebCore::computeTextPaintStyle): |
| (WebCore::computeTextSelectionPaintStyle): |
| * rendering/style/RenderStyle.cpp: |
| (WebCore::RenderStyle::changeRequiresRepaintIfTextOrBorderOrOutline): |
| (WebCore::RenderStyle::colorIncludingFallback): |
| * rendering/style/RenderStyle.h: |
| (WebCore::RenderStyle::strokeColor): |
| (WebCore::RenderStyle::setStrokeColor): |
| (WebCore::RenderStyle::setVisitedLinkStrokeColor): |
| (WebCore::RenderStyle::visitedLinkStrokeColor): |
| (WebCore::RenderStyle::setHasExplicitlySetStrokeColor): |
| (WebCore::RenderStyle::hasExplicitlySetStrokeColor): |
| * rendering/style/StyleRareInheritedData.cpp: |
| (WebCore::StyleRareInheritedData::StyleRareInheritedData): |
| (WebCore::StyleRareInheritedData::operator==): |
| * rendering/style/StyleRareInheritedData.h: |
| |
| 2017-04-11 Zan Dobersek <zdobersek@igalia.com> |
| |
| [GTK] Use the DisplayRefreshMonitor facilities |
| https://bugs.webkit.org/show_bug.cgi?id=170599 |
| |
| Reviewed by Carlos Garcia Campos. |
| |
| * CMakeLists.txt: Add missing files to the build. |
| * platform/graphics/DisplayRefreshMonitor.cpp: Build fixes. |
| (WebCore::DisplayRefreshMonitor::createDefaultDisplayRefreshMonitor): |
| * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp: |
| (WebCore::CoordinatedGraphicsLayer::updatePlatformLayer): Mark the |
| platform layer as updated in the layer's CoordinatedGraphicsState. |
| * platform/graphics/texmap/coordinated/CoordinatedGraphicsState.h: |
| |
| 2017-04-11 Antoine Quint <graouts@apple.com> |
| |
| [Modern Media Controls] Allow modern-media-controls to be provided through WebKitAdditions |
| https://bugs.webkit.org/show_bug.cgi?id=170722 |
| <rdar://problem/31553089> |
| |
| Reviewed by Dean Jackson. |
| |
| If modern media controls source files are provided through WebKitAdditions, use these instead |
| of the sources found in the WebCore module. |
| |
| * WebCore.xcodeproj/project.pbxproj: |
| |
| 2017-04-11 Dean Jackson <dino@apple.com> |
| |
| Disable outdated WritableStream API |
| https://bugs.webkit.org/show_bug.cgi?id=170749 |
| <rdar://problem/31446233> |
| |
| Reviewed by Tim Horton. |
| |
| The API we implement is no longer accurate. Disable it until we |
| are compatible with the new specification |
| |
| * Configurations/FeatureDefines.xcconfig: |
| |
| 2017-04-11 Matt Rajca <mrajca@apple.com> |
| |
| Consider the current document when allowing autoplay quirks. |
| https://bugs.webkit.org/show_bug.cgi?id=170744 |
| |
| Reviewed by Eric Carlson. |
| |
| Added API test. |
| |
| In addition to checking if the top-level document supports autoplay quirks, we should check |
| if the current document supports quirks. This allows all embedded YouTube videos (which use |
| iframes) to play correctly if the client allows autoplay quirks on youtube.com. |
| |
| * html/HTMLMediaElement.cpp: |
| (WebCore::HTMLMediaElement::dispatchPlayPauseEventsIfNeedsQuirks): |
| |
| 2017-04-11 Ryan Haddad <ryanhaddad@apple.com> |
| |
| Unreviewed, rolling out r215245. |
| |
| This change broke internal builds. |
| |
| Reverted changeset: |
| |
| "[Modern Media Controls] Allow modern-media-controls to be |
| provided through WebKitAdditions" |
| https://bugs.webkit.org/show_bug.cgi?id=170722 |
| http://trac.webkit.org/changeset/215245 |
| |
| 2017-04-11 Antoine Quint <graouts@apple.com> |
| |
| [Modern Media Controls] Allow modern-media-controls to be provided through WebKitAdditions |
| https://bugs.webkit.org/show_bug.cgi?id=170722 |
| <rdar://problem/31553089> |
| |
| Reviewed by Dean Jackson. |
| |
| If modern media controls source files are provided through WebKitAdditions, use these instead |
| of the sources found in the WebCore module. |
| |
| * WebCore.xcodeproj/project.pbxproj: |
| |
| 2017-04-10 Matt Rajca <mrajca@apple.com> |
| |
| Change autoplay state to "prevented" when media is paused due to restrictions. |
| https://bugs.webkit.org/show_bug.cgi?id=170686 |
| |
| Reviewed by Alex Christensen. |
| |
| Added API tests. |
| |
| Currently, the autoplay state is set to "prevented" when playback is about to begin without |
| user interaction and there are restrictions in place. We should also be setting this flag when |
| autoplay is allowed but due to a change in audio tracks, for example, it gets paused. |
| |
| This patch also moves some common logic into setPlaybackWithoutUserGesture without changing behavior. |
| |
| * html/HTMLMediaElement.cpp: |
| (WebCore::HTMLMediaElement::setReadyState): |
| (WebCore::HTMLMediaElement::play): |
| (WebCore::HTMLMediaElement::mediaPlayerDidAddAudioTrack): |
| (WebCore::HTMLMediaElement::mediaPlayerCharacteristicChanged): |
| (WebCore::HTMLMediaElement::setPlaybackWithoutUserGesture): |
| (WebCore::HTMLMediaElement::updateShouldPlay): |
| |
| 2017-04-11 Eric Carlson <eric.carlson@apple.com> |
| |
| [MediaStream] Set correct audio session category when capturing audio |
| https://bugs.webkit.org/show_bug.cgi?id=170736 |
| <rdar://problem/31559405> |
| |
| Reviewed by Jer Noble. |
| |
| No new tests yet, filed bug 170737. |
| |
| * Modules/mediastream/MediaStream.cpp: |
| (WebCore::MediaStream::MediaStream): Initialize m_mediaSession. |
| (WebCore::MediaStream::statusDidChange): Call canProduceAudioChanged. |
| (WebCore::MediaStream::mediaType): New. Return MediaStreamCapturingAudio when actively |
| capturing audio. |
| (WebCore::MediaStream::presentationType): |
| (WebCore::MediaStream::characteristics): |
| (WebCore::MediaStream::mayResumePlayback): |
| (WebCore::MediaStream::suspendPlayback): |
| (WebCore::MediaStream::sourceApplicationIdentifier): |
| (WebCore::MediaStream::canProduceAudio): |
| * Modules/mediastream/MediaStream.h: |
| |
| * platform/audio/PlatformMediaSession.h: Add MediaStreamCapturingAudio. |
| * platform/audio/PlatformMediaSessionManager.cpp: |
| (WebCore::PlatformMediaSessionManager::has): Adjust assert for MediaStreamCapturingAudio. |
| (WebCore::PlatformMediaSessionManager::count): Ditto. |
| * platform/audio/cocoa/MediaSessionManagerCocoa.cpp: |
| (PlatformMediaSessionManager::updateSessionState): Set small preferred buffer size when |
| capturing audio. Set audio session category to PlayAndRecord whenever there is a media |
| stream that is capturing audio. |
| |
| 2017-04-11 Yusuke Suzuki <utatane.tea@gmail.com> |
| |
| [WebCore][JSC] ResourceUsageData.{timeOfNextEdenCollection,timeOfNextFullCollection} should be MonotonicTime |
| https://bugs.webkit.org/show_bug.cgi?id=170725 |
| |
| Reviewed by Sam Weinig. |
| |
| Use MonotonicTime instead of raw doubles. |
| Currently, large part of data structures and helper functions are the same in |
| ResourceUsageOverlayCocoa.mm and ResourceUsageOverlayLinux.cpp. This should be |
| unified in a separate patch. |
| |
| * page/ResourceUsageData.h: |
| * page/cocoa/ResourceUsageOverlayCocoa.mm: |
| (WebCore::gcTimerString): |
| (WebCore::ResourceUsageOverlay::platformDraw): |
| * page/linux/ResourceUsageOverlayLinux.cpp: |
| (WebCore::gcTimerString): |
| |
| 2017-04-11 Youenn Fablet <youenn@apple.com> |
| |
| Activate WebRTC data channel tests for WK1 |
| https://bugs.webkit.org/show_bug.cgi?id=170710 |
| |
| Reviewed by Eric Carlson. |
| |
| Covered by existing and activated tests. |
| |
| Making LibWebRTCProvider::factory not static. |
| For that purpose LibWebRTCMediaEndpoint now stores its peer connection factory reference. |
| Making LibWebRTCProvider use libebrtc networking by default. |
| |
| Removing some no longer needed checks related to libwebrtc availability. |
| |
| * Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp: |
| (WebCore::LibWebRTCMediaEndpoint::LibWebRTCMediaEndpoint): |
| (WebCore::LibWebRTCMediaEndpoint::addTrack): |
| (WebCore::LibWebRTCMediaEndpoint::doCreateOffer): |
| (WebCore::LibWebRTCMediaEndpoint::doCreateAnswer): |
| * Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.h: |
| * platform/mediastream/libwebrtc/LibWebRTCProvider.cpp: |
| (WebCore::LibWebRTCProvider::factory): |
| * platform/mediastream/libwebrtc/LibWebRTCProvider.h: |
| |
| 2017-04-11 Youenn Fablet <youenn@apple.com> |
| |
| MediaStream id should be equal to msid |
| https://bugs.webkit.org/show_bug.cgi?id=170712 |
| |
| Reviewed by Eric Carlson. |
| |
| Covered by rebased tests. |
| |
| Setting MediaStream id to libwebrtc mediastream label. |
| Refactoring to use more Ref<> in MediaStream code. |
| |
| Making PeerConnection use the libwebrtc backend by default for layout tests instead of the mock. |
| |
| * Modules/mediastream/MediaStream.cpp: |
| (WebCore::MediaStream::create): |
| (WebCore::createTrackPrivateVector): |
| (WebCore::MediaStream::MediaStream): |
| * Modules/mediastream/MediaStream.h: |
| * Modules/mediastream/MediaStreamRegistry.cpp: |
| (WebCore::MediaStreamRegistry::lookUp): |
| * Modules/mediastream/UserMediaRequest.cpp: |
| (WebCore::UserMediaRequest::allow): |
| * Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp: |
| (WebCore::LibWebRTCMediaEndpoint::mediaStreamFromRTCStream): |
| (WebCore::LibWebRTCMediaEndpoint::addRemoteStream): |
| (WebCore::LibWebRTCMediaEndpoint::addRemoteTrack): |
| * Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.h: |
| * platform/graphics/MediaPlayer.cpp: |
| (WebCore::MediaPlayer::load): |
| * platform/graphics/MediaPlayer.h: |
| * platform/mediastream/MediaStreamPrivate.cpp: |
| (WebCore::MediaStreamPrivate::MediaStreamPrivate): |
| * platform/mediastream/MediaStreamPrivate.h: |
| (WebCore::MediaStreamPrivate::create): |
| * testing/Internals.cpp: |
| (WebCore::Internals::Internals): |
| |
| 2017-04-11 Chris Fleizach <cfleizach@apple.com> |
| |
| AX: Web article navigation does not work (article rotor for Facebook, Twitter, Messages etc.) |
| https://bugs.webkit.org/show_bug.cgi?id=170330 |
| <rdar://problem/31366105> |
| |
| Reviewed by Joanmarie Diggs. |
| |
| Add a search ability for the "article" role. |
| |
| Test: accessibility/mac/search-predicate-article.html |
| |
| * accessibility/AccessibilityObject.cpp: |
| (WebCore::AccessibilityObject::isAccessibilityObjectSearchMatchAtIndex): |
| * accessibility/AccessibilityObject.h: |
| * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm: |
| (-[WebAccessibilityObjectWrapper _accessibilityArticleAncestor]): |
| * accessibility/mac/WebAccessibilityObjectWrapperBase.mm: |
| (createAccessibilitySearchKeyMap): |
| |
| 2017-04-11 Chris Fleizach <cfleizach@apple.com> |
| |
| AX: PDF plugin needs to support PDF-DOM Mode |
| https://bugs.webkit.org/show_bug.cgi?id=170589 |
| |
| Reviewed by Tim Horton. |
| |
| Provide WebCore support for accessibility connect to PDF document. |
| This includes the ability to connect a PDF annotation created node within WebKit to |
| its PDFAnnotation parent (through use of shadowPluginParent). |
| |
| * accessibility/AXObjectCache.h: |
| * accessibility/mac/AXObjectCacheMac.mm: |
| (WebCore::AXPostNotificationWithUserInfo): |
| * accessibility/mac/WebAccessibilityObjectWrapperMac.h: |
| * accessibility/mac/WebAccessibilityObjectWrapperMac.mm: |
| (-[WebAccessibilityObjectWrapper shadowPluginParent]): |
| (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]): |
| * html/HTMLAttributeNames.in: |
| * plugins/PluginViewBase.h: |
| (WebCore::PluginViewBase::accessibilityShadowPluginParentForElement): |
| |
| 2017-04-11 Carlos Garcia Campos <cgarcia@igalia.com> |
| |
| REGRESSION(r215153): Request Animation Frame broken when building without REQUEST_ANIMATION_FRAME_DISPLAY_MONITOR |
| https://bugs.webkit.org/show_bug.cgi?id=170719 |
| |
| Reviewed by Žan Doberšek. |
| |
| This is because when not using the display refresh monitor, the timer is always used, not only when throttling, |
| but since r215153 the rAF timer is always aligned to 30ms. |
| |
| Fixes: fast/animation/request-animation-frame-too-rapid.html |
| |
| * dom/ScriptedAnimationController.cpp: |
| (WebCore::ScriptedAnimationController::scheduleAnimation): Only do the timer alignment when throttling. |
| |
| 2017-04-11 Yoav Weiss <yoav@yoav.ws> |
| |
| [link preload] Double downloads of preloaded content when it's in MemoryCache |
| https://bugs.webkit.org/show_bug.cgi?id=170122 |
| |
| Reviewed by Antti Koivisto. |
| |
| No new tests, but unflaked http/tests/preload/single_download_preload_headers_charset.html. |
| |
| The test was flaky because it appears as if MemoryCache is not being evicted between runs, |
| and running multiple iterations of the test resulted in preloaded being taken out of MemoryCache |
| and not having the unknown encoding flag. In those cases, the result was a double download and |
| a failed test. |
| |
| * loader/TextResourceDecoder.cpp: |
| (WebCore::TextResourceDecoder::setEncoding): Set the m_encodingSet flag. |
| * loader/TextResourceDecoder.h: Added an m_encodingSet flag initialized to false. |
| * loader/cache/CachedCSSStyleSheet.cpp: |
| (WebCore::CachedCSSStyleSheet::setEncoding): Assert that stylesheets don't maintain decoded text. |
| * loader/cache/CachedResource.cpp: |
| (WebCore::CachedResource::CachedResource): Remove initialization of hasUnknownEncoding flag. |
| * loader/cache/CachedResource.h: |
| (WebCore::CachedResource::hasUnknownEncoding): Remove. |
| (WebCore::CachedResource::setHasUnknownEncoding): Remove. |
| (WebCore::CachedResource::CachedResource): Remove initialization of hasUnknownEncoding flag. |
| * loader/cache/CachedResourceLoader.cpp: |
| (WebCore::CachedResourceLoader::determineRevalidationPolicy): Set the encoding in case it changed. |
| |
| 2017-04-11 Miguel Gomez <magomez@igalia.com> |
| |
| REGRESSION(r215211): [GTK] Lots of image related tests are timing out, causing the test bot to exit early |
| https://bugs.webkit.org/show_bug.cgi?id=170727 |
| |
| Reviewed by Carlos Garcia Campos. |
| |
| Since r215211 ImageDecoder::isSizeAvailable() calls encodedDataStatus() in the different decoder implementations, |
| and those implementations force a partial decoding of the image if the size is not available yet. But |
| ImageDecoder::isSizeAvailable() was already being used inside the decoders assuming that it wasn't going to |
| force this partial decoding. Due to this, there are some situations where the partial decoding is not |
| desired but it's happening anyway. For example, the check in setSize(), which causes the partial decoding |
| to happen again and again because no value is actually set to the animation size (which causes the timouts |
| in the test bot). |
| |
| To avoid this, replace all the calls to ImageDecoder::isSizeAvailable() inside the decoders with calls to |
| ImageDecoder::encodedDataStatus(), which doesn't force the partial decoding. |
| |
| Covered by existent tests. |
| |
| * platform/image-decoders/gif/GIFImageDecoder.cpp: |
| (WebCore::GIFImageDecoder::setSize): |
| * platform/image-decoders/ico/ICOImageDecoder.cpp: |
| (WebCore::ICOImageDecoder::decodeAtIndex): |
| * platform/image-decoders/jpeg/JPEGImageDecoder.h: |
| * platform/image-decoders/png/PNGImageDecoder.cpp: |
| (WebCore::PNGImageReader::decode): |
| (WebCore::PNGImageDecoder::frameBufferAtIndex): |
| * platform/image-decoders/webp/WEBPImageDecoder.cpp: |
| (WebCore::WEBPImageDecoder::decode): |
| |
| 2017-04-11 Miguel Gomez <magomez@igalia.com> |
| |
| REGRESSION(r215211): [GTK] Lots of image related tests are crashing, causing the test bot to exit early |
| https://bugs.webkit.org/show_bug.cgi?id=170721 |
| |
| Reviewed by Carlos Garcia Campos. |
| |
| r215211 caused an infinite loop because of calls between ImageDecoder::isSizeAvailable() and the specializations of |
| ImageDecoder::encodedDataStatus(). Change the different decoders so ImageDecoder::encodedDataStatus doesn't call |
| ImageDecoder::isSizeAvailable(). |
| |
| Covered by existent tests. |
| |
| * platform/image-decoders/bmp/BMPImageDecoder.cpp: |
| (WebCore::BMPImageDecoder::encodedDataStatus): |
| * platform/image-decoders/gif/GIFImageDecoder.cpp: |
| (WebCore::GIFImageDecoder::encodedDataStatus): |
| * platform/image-decoders/ico/ICOImageDecoder.cpp: |
| (WebCore::ICOImageDecoder::encodedDataStatus): |
| * platform/image-decoders/jpeg/JPEGImageDecoder.cpp: |
| (WebCore::JPEGImageDecoder::encodedDataStatus): |
| * platform/image-decoders/png/PNGImageDecoder.cpp: |
| (WebCore::PNGImageDecoder::encodedDataStatus): |
| * platform/image-decoders/webp/WEBPImageDecoder.cpp: |
| (WebCore::WEBPImageDecoder::encodedDataStatus): |
| |
| 2017-04-10 Alex Christensen <achristensen@webkit.org> |
| |
| Revert r215217 |
| https://bugs.webkit.org/show_bug.cgi?id=170703 |
| |
| * Configurations/FeatureDefines.xcconfig: |
| |
| 2017-04-10 Chris Dumez <cdumez@apple.com> |
| |
| Fix bad change in r215167. |
| https://bugs.webkit.org/show_bug.cgi?id=170656 |
| |
| Reviewed by Yusuke Suzuki. |
| |
| Revert mistake made in r215167. |
| |
| * rendering/RenderThemeGtk.cpp: |
| (WebCore::RenderThemeGtk::caretBlinkInterval): |
| |
| 2017-04-10 Alex Christensen <achristensen@webkit.org> |
| |
| Continue enabling WebRTC |
| https://bugs.webkit.org/show_bug.cgi?id=170703 |
| |
| Reviewed by Youenn Fablet. |
| |
| * Configurations/FeatureDefines.xcconfig: |
| |
| 2017-04-10 Jeremy Jones <jeremyj@apple.com> |
| |
| PlayerLayerView +layerClass methods should use return type Class. |
| https://bugs.webkit.org/show_bug.cgi?id=165406 |
| |
| Reviewed by Sam Weinig. |
| |
| No new tests because not behavior change. |
| |
| * platform/ios/WebVideoFullscreenInterfaceAVKit.mm: |
| (WebAVPictureInPicturePlayerLayerView_layerClass): |
| (WebAVPlayerLayerView_layerClass): |
| |
| 2017-04-10 Said Abou-Hallawa <sabouhallawa@apple.com> |
| |
| CachedImage should stop decoding images when unknown type is detected |
| https://bugs.webkit.org/show_bug.cgi?id=170530 |
| |
| Reviewed by Tim Horton. |
| |
| If the status of the encoded data is "unknown type", WebKit should stop |
| decoding the rest of the data. Ideally WebKit should also cancel loading |
| the rest of the encoded data. |
| |
| To do that we need to add a function to the ImageDecoder to return the |
| encodedDataStatus(). We also need to change the return type of Image::setData() |
| and Image::dataChanged() form bool to EncodedDataStatus. |
| |
| * WebCore.xcodeproj/project.pbxproj: Add ImageTypes.h to the WebCore project. |
| * loader/cache/CachedImage.cpp: |
| (WebCore::CachedImage::addIncrementalDataBuffer): Replace checking !sizeAvailable |
| by checking if encodedDataStatus isn't an error but it has not reached |
| sizeAvailable state |
| * loader/cache/CachedResourceClientWalker.h: |
| (WebCore::CachedResourceClientWalker::CachedResourceClientWalker): Unrelated clean-up. |
| (WebCore::CachedResourceClientWalker::next): Ditto. |
| * loader/icon/IconRecord.cpp: |
| (WebCore::IconRecord::setImageData): Image::setData() used to return a bool. Now it returns |
| an EncodedDataStatus. !setData() now means setData() < EncodedDataStatus::SizeAvailable. |
| * platform/graphics/BitmapImage.cpp: |
| (WebCore::BitmapImage::dataChanged): Replace the return of dataChanged() from bool |
| by EncodedDataStatus. |
| * platform/graphics/BitmapImage.h: Replace isSizeAvailable() by a new function |
| named encodedDataStatus(). |
| * platform/graphics/Image.cpp: |
| (WebCore::Image::setData): Code clean-up and adding a clarification comment. |
| * platform/graphics/Image.h: Change the return of setData() and dataChanged() to be |
| EncodedDataStatus. |
| (WebCore::Image::dataChanged): Return EncodedDataStatus::Unknown as an indication |
| the size is not available but we do not have an error. |
| * platform/graphics/ImageTypes.h: Added. |
| Image definitions which are shared among Image, ImageDecoder, ImageSource, |
| ImageFrameCache and ImageFrame used to be added to ImageFrame.h. This has |
| been annoying since these definitions aren't related to ImageFrame only. |
| A new header file named ImageTypes.h is to the to include such definitions. |
| (WebCore::operator++): |
| * platform/graphics/ImageFrame.h: |
| (WebCore::operator++): Deleted. |
| * platform/graphics/ImageFrameCache.cpp: |
| (WebCore::ImageFrameCache::ImageFrameCache): This is the case of a BitmapImage without |
| a decoder but with a NativeImage. The status has to be EncodedDataStatus::Complete. |
| (WebCore::ImageFrameCache::growFrames): Replace if (isSizeAvailable()) by |
| if (encodedDataStatus() >= EncodedDataStatus::SizeAvailable). |
| (WebCore::ImageFrameCache::metadata): Ditto. |
| (WebCore::ImageFrameCache::encodedDataStatus): This is a replacement for isSizeAvailable(). |
| Don't cache the EncodedDataStatus until it is Complete. Don't call didDecodeProperties() |
| until the status >= EncodedDataStatus::SizeAvailable. |
| (WebCore::ImageFrameCache::isSizeAvailable): Deleted. |
| * platform/graphics/ImageFrameCache.h: Replace isSizeAvailable() by encodedDataStatus(). |
| * platform/graphics/ImageSource.cpp: |
| (WebCore::ImageSource::dataChanged): Make return an EncodedDataStatus instead of returning |
| a bool for isSizeAvailable. |
| * platform/graphics/ImageSource.h: |
| (WebCore::ImageSource::encodedDataStatus): Replace isSizeAvailable() by encodedDataStatus(). |
| (WebCore::ImageSource::isSizeAvailable): Deleted. |
| * platform/graphics/cg/ImageDecoderCG.cpp: |
| (WebCore::ImageDecoder::encodedDataStatus): Replace isSizeAvailable() by encodedDataStatus(). |
| The logic of this function is the following: |
| -- CGImageSourceGetStatus() can return kCGImageStatusUnexpectedEOF, kCGImageStatusInvalidData |
| or kCGImageStatusReadingHeader even if CG will end up recovering form the error and drawing |
| the image. Actually CG initializes the status of CGImageSource before receiving any data |
| with kCGImageStatusInvalidData. So the status will be considered an error only if all the |
| data is received but CG does not move the status of this CGImageSource to Complete. |
| -- If CGImageSourceGetStatus() returns Incomplete, this means CG already created the image |
| reader and therefore the image type is known. |
| -- If CGImageSourceGetStatus() returns UnknownType, this means CG could not create the |
| image reader and this should be considered an error. |
| (WebCore::ImageDecoder::isSizeAvailable): Deleted. |
| * platform/graphics/cg/ImageDecoderCG.h: Replace isSizeAvailable() by encodedDataStatus(). |
| * platform/graphics/cg/PDFDocumentImage.cpp: |
| (WebCore::PDFDocumentImage::dataChanged): The PDFDocument is created only when allDataReceived. |
| * platform/graphics/cg/PDFDocumentImage.h: Change the return type from bool to EncodedDataStatus. |
| * platform/image-decoders/ImageDecoder.h: |
| (WebCore::ImageDecoder::encodedDataStatus): Add a new function encodedDataStatus(). Deduce the |
| status of the encoded data from the flags m_failed, m_isAllDataReceived and m_sizeAvailable in |
| this order. |
| (WebCore::ImageDecoder::isSizeAvailable): Make this function uses encodedDataStatus(). |
| * platform/image-decoders/bmp/BMPImageDecoder.cpp: |
| (WebCore::BMPImageDecoder::encodedDataStatus): Replace isSizeAvailable() by encodedDataStatus(). |
| (WebCore::BMPImageDecoder::isSizeAvailable): Deleted. |
| * platform/image-decoders/bmp/BMPImageDecoder.h: |
| * platform/image-decoders/gif/GIFImageDecoder.cpp: |
| (WebCore::GIFImageDecoder::encodedDataStatus): Ditto. |
| (WebCore::GIFImageDecoder::isSizeAvailable): Deleted. |
| * platform/image-decoders/gif/GIFImageDecoder.h: |
| * platform/image-decoders/ico/ICOImageDecoder.cpp: |
| (WebCore::ICOImageDecoder::encodedDataStatus): Ditto. |
| (WebCore::ICOImageDecoder::isSizeAvailable): Deleted. |
| * platform/image-decoders/ico/ICOImageDecoder.h: |
| * platform/image-decoders/jpeg/JPEGImageDecoder.cpp: |
| (WebCore::JPEGImageDecoder::encodedDataStatus): Ditto. |
| (WebCore::JPEGImageDecoder::isSizeAvailable): Deleted. |
| * platform/image-decoders/jpeg/JPEGImageDecoder.h: |
| * platform/image-decoders/png/PNGImageDecoder.cpp: |
| (WebCore::PNGImageDecoder::encodedDataStatus): Ditto. |
| (WebCore::PNGImageDecoder::isSizeAvailable): Deleted. |
| * platform/image-decoders/png/PNGImageDecoder.h: |
| * platform/image-decoders/webp/WEBPImageDecoder.cpp: |
| (WebCore::WEBPImageDecoder::encodedDataStatus): Ditto. |
| (WebCore::WEBPImageDecoder::isSizeAvailable): Deleted. |
| * platform/image-decoders/webp/WEBPImageDecoder.h: |
| * svg/graphics/SVGImage.cpp: |
| (WebCore::SVGImage::dataChanged): m_page is created only when allDataReceived is true. |
| * svg/graphics/SVGImage.h: |
| |
| 2017-04-10 Myles C. Maxfield <mmaxfield@apple.com> |
| |
| Mark SVG-Within-OpenType as "Under Consideration" |
| https://bugs.webkit.org/show_bug.cgi?id=170706 |
| |
| Reviewed by Brady Eidson. |
| |
| * features.json: |
| |
| 2017-04-10 Jeremy Jones <jeremyj@apple.com> |
| |
| Add CoreAudioCaptureSource. |
| https://bugs.webkit.org/show_bug.cgi?id=170112 |
| rdar://problem/30293338 |
| |
| Reviewed by Eric Carlson. |
| |
| No new tests because this provides the same funcitonality as AVAudioCaptureSource. |
| Funcionality is covered by existing test cases. |
| |
| Add CoreAudioCaptureSource for audio capture. And use it by default in AVCaptureDeviceManager. |
| Add UseAVFoundationAudioCapture setting to switch back to AVFoundation for audio capture. |
| |
| * WebCore.xcodeproj/project.pbxproj: |
| * page/Settings.cpp: |
| (WebCore::Settings::useAVFoundationAudioCapture): |
| (WebCore::Settings::setUseAVFoundationAudioCapture): |
| * page/Settings.h: |
| * platform/mediastream/mac/AVCaptureDeviceManager.h: |
| * platform/mediastream/mac/AVCaptureDeviceManager.mm: |
| (WebCore::AVCaptureDeviceManager::setUseAVFoundationAudioCapture): |
| * platform/mediastream/mac/CoreAudioCaptureSource.cpp: Added. |
| (WebCore::CoreAudioCaptureSource::create): |
| (WebCore::CoreAudioCaptureSource::factory): |
| (WebCore::CoreAudioCaptureSource::CoreAudioCaptureSource): |
| (WebCore::CoreAudioCaptureSource::~CoreAudioCaptureSource): |
| (WebCore::CoreAudioCaptureSource::preferredSampleRate): |
| (WebCore::CoreAudioCaptureSource::preferredIOBufferDuration): |
| (WebCore::CoreAudioCaptureSource::configureMicrophoneProc): |
| (WebCore::CoreAudioCaptureSource::configureSpeakerProc): |
| (WebCore::CoreAudioCaptureSource::addMicrophoneDataConsumer): |
| (WebCore::CoreAudioCaptureSource::removeMicrophoneDataConsumer): |
| (WebCore::CoreAudioCaptureSource::addEchoCancellationSource): |
| (WebCore::CoreAudioCaptureSource::removeEchoCancellationSource): |
| (WebCore::CoreAudioCaptureSource::checkTimestamps): |
| (WebCore::CoreAudioCaptureSource::provideSpeakerData): |
| (WebCore::CoreAudioCaptureSource::speakerCallback): |
| (WebCore::CoreAudioCaptureSource::processMicrophoneSamples): |
| (WebCore::CoreAudioCaptureSource::microphoneCallback): |
| (WebCore::CoreAudioCaptureSource::defaultOutputDevice): |
| (WebCore::CoreAudioCaptureSource::defaultInputDevice): |
| (WebCore::CoreAudioCaptureSource::setupAudioUnits): |
| (WebCore::CoreAudioCaptureSource::startProducingData): |
| (WebCore::CoreAudioCaptureSource::stopProducingData): |
| (WebCore::CoreAudioCaptureSource::suspend): |
| (WebCore::CoreAudioCaptureSource::resume): |
| (WebCore::CoreAudioCaptureSource::capabilities): |
| (WebCore::CoreAudioCaptureSource::settings): |
| * platform/mediastream/mac/CoreAudioCaptureSource.h: Added. |
| * platform/mediastream/mac/RealtimeMediaSourceCenterMac.cpp: |
| (WebCore::RealtimeMediaSourceCenterMac::RealtimeMediaSourceCenterMac): |
| (WebCore::RealtimeMediaSourceCenterMac::defaultAudioFactory): |
| |
| 2017-04-10 Youenn Fablet <youenn@apple.com> |
| |
| Wrap legacy MediaStream API in runtime flag |
| https://bugs.webkit.org/show_bug.cgi?id=169877 |
| |
| Reviewed by Alex Christensen. |
| |
| Covered by binding tests. |
| |
| Marking navigator.getUserMedia and MediaStreamEvent as runtime enabled if mediastream and webrtclegacy api flags |
| are on. |
| Updated binding generator to support multiple runtime flags. |
| |
| * Modules/mediastream/MediaStreamEvent.idl: |
| * Modules/mediastream/NavigatorUserMedia.idl: |
| * bindings/scripts/CodeGeneratorJS.pm: |
| (GetRuntimeEnableFunctionName): |
| (GenerateImplementation): |
| * bindings/scripts/test/JS/JSTestObj.cpp: |
| (WebCore::JSTestObjPrototype::finishCreation): |
| * bindings/scripts/test/TestObj.idl: |
| |
| 2017-04-10 Youenn Fablet <youenn@apple.com> |
| |
| Remove deprecated parts of media stream spec |
| https://bugs.webkit.org/show_bug.cgi?id=169879 |
| |
| Reviewed by Jon Lee. |
| |
| Removing MediaStreamTrackState 'new' value which was unused. |
| Removing MediaStreamTrack _readonly attribute which was unused. |
| |
| * Modules/mediastream/MediaStreamTrack.cpp: |
| (WebCore::MediaStreamTrack::readonly): Deleted. |
| * Modules/mediastream/MediaStreamTrack.h: |
| * Modules/mediastream/MediaStreamTrack.idl: |
| * platform/mediastream/MediaStreamTrackPrivate.cpp: |
| (WebCore::MediaStreamTrackPrivate::readonly): Deleted. |
| * platform/mediastream/MediaStreamTrackPrivate.h: |
| * platform/mediastream/RealtimeMediaSource.h: |
| |
| 2017-04-10 Ryan Haddad <ryanhaddad@apple.com> |
| |
| Unreviewed, rolling out r215175. |
| |
| This change caused a flaky crash in existing media tests. |
| |
| Reverted changeset: |
| |
| "Add fallback fonts to video captions stylesheet." |
| https://bugs.webkit.org/show_bug.cgi?id=170495 |
| http://trac.webkit.org/changeset/215175 |
| |
| 2017-04-10 Wenson Hsieh <wenson_hsieh@apple.com> |
| |
| Data interaction on an image enclosed by an anchor should vend the anchor's URL |
| https://bugs.webkit.org/show_bug.cgi?id=170660 |
| <rdar://problem/31043220> |
| |
| Reviewed by Tim Horton. |
| |
| When writing an image embedded inside an anchor to the pasteboard, actually use the enclosing anchor's href if |
| it exists. Previously, we were simply dropping this argument on the floor. |
| |
| Covered by 2 new DataInteractionTests: ImageInLinkToInput and ImageInLinkWithoutHREFToInput. |
| |
| * editing/ios/EditorIOS.mm: |
| (WebCore::Editor::writeImageToPasteboard): |
| |
| 2017-04-10 Jon Lee <jonlee@apple.com> |
| |
| Update localizable strings to "full screen" from "fullscreen" |
| https://bugs.webkit.org/show_bug.cgi?id=170675 |
| rdar://problem/28207034 |
| |
| Reviewed by Antoine Quint. |
| |
| For localizable strings, it should consistently be "full screen" instead of "fullscreen". |
| |
| * English.lproj/Localizable.strings: |
| * English.lproj/modern-media-controls-localized-strings.js: |
| * platform/LocalizedStrings.cpp: |
| (WebCore::contextMenuItemTagExitVideoFullscreen): |
| (WebCore::localizedMediaControlElementString): |
| * platform/cocoa/LocalizedStringsCocoa.mm: |
| (WebCore::exitFullScreenButtonAccessibilityTitle): |
| |
| 2017-04-10 Andreas Kling <akling@apple.com> |
| |
| Don't generate extra scrolling tiles for non-visible pages. |
| https://bugs.webkit.org/show_bug.cgi?id=167213 |
| <rdar://problem/30105774> |
| |
| Reviewed by Antti Koivisto. |
| |
| Reduce the tiling coverage to a minimum when the page is non-visible. |
| On macOS, this means that fully occluded web views can maintain a smaller set of tiles |
| in non-volatile surfaces, reducing net footprint. |
| |
| Test: compositing/tiling/non-visible-window-tile-coverage.html |
| |
| * rendering/RenderLayerBacking.cpp: |
| (WebCore::computePageTiledBackingCoverage): If the page's activity state is non-visible, use minimal tile coverage. |
| * platform/ScrollView.h: |
| * page/FrameView.h: |
| * page/FrameView.cpp: |
| (WebCore::FrameView::hide): Call adjustTiledBackingCoverage() in hide() since it now takes page visibility into account. |
| |
| (WebCore::FrameView::enableSpeculativeTilingIfNeeded): |
| * testing/Internals.cpp: |
| (WebCore::Internals::setSpeculativeTilingDelayDisabledForTesting): |
| * testing/Internals.h: |
| * testing/Internals.idl: Add an internals API for disabling the 500ms delay before speculative tiling begins after |
| the main frame load finishes. This is needed for reliably testing this change. |
| |
| 2017-04-10 Per Arne Vollan <pvollan@apple.com> |
| |
| Add fallback fonts to video captions stylesheet. |
| https://bugs.webkit.org/show_bug.cgi?id=170495 |
| |
| Reviewed by Myles C. Maxfield. |
| |
| The kCTFontCascadeListAttribute key is used to obtain the cascade list for a font reference. |
| |
| I have not added a test, since CaptionUserPreferences::testingMode() returns true when running tests, |
| preventing this code path from being executed. |
| |
| * page/CaptionUserPreferencesMediaAF.cpp: |
| (WebCore::CaptionUserPreferencesMediaAF::captionsDefaultFontCSS): |
| |
| 2017-04-10 Chris Dumez <cdumez@apple.com> |
| |
| Drop Timer::startOneShot() overload taking a double |
| https://bugs.webkit.org/show_bug.cgi?id=170659 |
| |
| Reviewed by Yusuke Suzuki. |
| |
| Drop Timer::startOneShot() overload taking a double as people should use Seconds type now. |
| |
| * Modules/geolocation/GeoNotifier.cpp: |
| (WebCore::GeoNotifier::startTimerIfNeeded): |
| * Modules/mediasession/WebMediaSessionManager.cpp: |
| (WebCore::WebMediaSessionManager::configureWatchdogTimer): |
| * Modules/mediasession/WebMediaSessionManager.h: |
| * Modules/mediastream/CanvasCaptureMediaStreamTrack.cpp: |
| (WebCore::CanvasCaptureMediaStreamTrack::Source::canvasChanged): |
| * Modules/vibration/Vibration.cpp: |
| (WebCore::Vibration::timerFired): |
| * Modules/websockets/WebSocketChannel.cpp: |
| (WebCore::WebSocketChannel::close): |
| * accessibility/AXObjectCache.cpp: |
| (WebCore::AXObjectCache::enqueuePasswordValueChangeNotification): |
| (WebCore::AXObjectCache::postLiveRegionChangeNotification): |
| (WebCore::AXObjectCache::focusAriaModalNode): |
| * css/CSSFontFace.cpp: |
| (WebCore::CSSFontFace::setStatus): |
| * css/StyleResolver.cpp: |
| (WebCore::StyleResolver::addToMatchedPropertiesCache): |
| * dom/Document.cpp: |
| (WebCore::Document::setVisualUpdatesAllowed): |
| (WebCore::Document::finishedParsing): |
| * dom/ScriptedAnimationController.cpp: |
| * editing/AlternativeTextController.cpp: |
| (WebCore::AlternativeTextController::startAlternativeTextUITimer): |
| * html/HTMLMediaElement.cpp: |
| (WebCore::HTMLMediaElement::addBehaviorRestrictionsOnEndIfNecessary): |
| (WebCore::HTMLMediaElement::handleSeekToPlaybackPosition): |
| * html/SearchInputType.cpp: |
| (WebCore::SearchInputType::startSearchEventTimer): |
| * html/ValidationMessage.cpp: |
| (WebCore::ValidationMessage::setMessageDOMAndStartTimer): |
| * html/canvas/WebGLRenderingContextBase.cpp: |
| * html/shadow/MediaControlElements.cpp: |
| (WebCore::MediaControlPanelElement::startTimer): |
| (WebCore::MediaControlPanelElement::makeTransparent): |
| * html/track/VTTRegion.cpp: |
| (WebCore::VTTRegion::startTimer): |
| * inspector/InspectorInstrumentation.cpp: |
| (WebCore::InspectorInstrumentation::frameScheduledNavigationImpl): |
| * inspector/InspectorInstrumentation.h: |
| (WebCore::InspectorInstrumentation::frameScheduledNavigation): |
| * inspector/InspectorPageAgent.cpp: |
| (WebCore::InspectorPageAgent::frameScheduledNavigation): |
| * inspector/InspectorPageAgent.h: |
| * loader/NavigationScheduler.cpp: |
| (WebCore::NavigationScheduler::startTimer): |
| * loader/cache/CachedResourceLoader.cpp: |
| (WebCore::CachedResourceLoader::documentDidFinishLoadEvent): |
| * loader/icon/IconDatabase.cpp: |
| * page/EventHandler.cpp: |
| * page/EventSource.cpp: |
| (WebCore::EventSource::scheduleReconnect): |
| * page/FocusController.cpp: |
| (WebCore::FocusController::setFocusedElementNeedsRepaint): |
| * page/FrameView.cpp: |
| (WebCore::FrameView::scrollPositionChanged): |
| (WebCore::FrameView::enableSpeculativeTilingIfNeeded): |
| * page/Settings.cpp: |
| (WebCore::Settings::Settings): |
| * page/Settings.h: |
| (WebCore::Settings::setTimeWithoutMouseMovementBeforeHidingControls): |
| (WebCore::Settings::timeWithoutMouseMovementBeforeHidingControls): |
| * page/SuspendableTimer.h: |
| * page/animation/CSSAnimationController.cpp: |
| * page/mac/EventHandlerMac.mm: |
| * page/mac/TextIndicatorWindow.mm: |
| (WebCore::TextIndicatorWindow::setTextIndicator): |
| * platform/HysteresisActivity.h: |
| (WebCore::HysteresisActivity::stop): |
| * platform/ScrollAnimationSmooth.cpp: |
| (WebCore::getAnimationParametersForGranularity): |
| (WebCore::ScrollAnimationSmooth::updatePerAxisData): |
| (WebCore::ScrollAnimationSmooth::animateScroll): |
| (WebCore::ScrollAnimationSmooth::animationTimerFired): |
| (WebCore::ScrollAnimationSmooth::startNextTimer): |
| * platform/ScrollAnimationSmooth.h: |
| * platform/Timer.h: |
| (WebCore::TimerBase::startRepeating): |
| * platform/audio/PlatformMediaSession.cpp: |
| (WebCore::PlatformMediaSession::scheduleClientDataBufferingCheck): |
| * platform/cocoa/ScrollController.mm: |
| (WebCore::ScrollController::scheduleStatelessScrollSnap): |
| * platform/gamepad/cocoa/GameControllerGamepadProvider.mm: |
| (WebCore::GameControllerGamepadProvider::gamepadHadInput): |
| * platform/gamepad/mac/HIDGamepadProvider.cpp: |
| (WebCore::HIDGamepadProvider::openAndScheduleManager): |
| (WebCore::HIDGamepadProvider::valuesChanged): |
| * platform/glib/MainThreadSharedTimerGLib.cpp: |
| (WebCore::MainThreadSharedTimer::setFireInterval): |
| * platform/graphics/BitmapImage.cpp: |
| (WebCore::BitmapImage::startTimer): |
| (WebCore::BitmapImage::internalStartAnimation): |
| (WebCore::BitmapImage::advanceAnimation): |
| (WebCore::BitmapImage::resetAnimation): |
| * platform/graphics/BitmapImage.h: |
| * platform/graphics/MediaPlaybackTargetPicker.cpp: |
| * platform/graphics/ShadowBlur.cpp: |
| (WebCore::ScratchBuffer::scheduleScratchBufferPurge): |
| * platform/graphics/ca/LayerPool.cpp: |
| (WebCore::LayerPool::schedulePrune): |
| * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp: |
| (WebCore::MediaPlayerPrivateGStreamer::changePipelineState): |
| * platform/graphics/mac/GraphicsContext3DMac.mm: |
| (WebCore::GraphicsContext3DManager::updateHighPerformanceState): |
| * platform/graphics/texmap/BitmapTexturePool.cpp: |
| (WebCore::BitmapTexturePool::scheduleReleaseUnusedTextures): |
| (WebCore::BitmapTexturePool::releaseUnusedTexturesTimerFired): |
| * platform/graphics/texmap/TextureMapperPlatformLayerProxy.cpp: |
| (WebCore::TextureMapperPlatformLayerProxy::scheduleReleaseUnusedBuffers): |
| (WebCore::TextureMapperPlatformLayerProxy::releaseUnusedBuffersTimerFired): |
| * platform/graphics/texmap/coordinated/CoordinatedImageBacking.cpp: |
| * platform/gtk/ScrollAnimatorGtk.cpp: |
| (WebCore::ScrollAnimatorGtk::overlayScrollbarAnimationTimerFired): |
| (WebCore::ScrollAnimatorGtk::showOverlayScrollbars): |
| (WebCore::ScrollAnimatorGtk::hideOverlayScrollbars): |
| * platform/gtk/ScrollAnimatorGtk.h: |
| * platform/ios/WebVideoFullscreenInterfaceAVKit.mm: |
| (WebVideoFullscreenInterfaceAVKit::shouldExitFullscreenWithReason): |
| * platform/mac/ScrollAnimatorMac.mm: |
| (WebCore::ScrollAnimatorMac::startScrollbarPaintTimer): |
| * platform/mock/MediaPlaybackTargetPickerMock.cpp: |
| * platform/mock/PlatformSpeechSynthesizerMock.cpp: |
| (WebCore::PlatformSpeechSynthesizerMock::speak): |
| * platform/mock/TimerEventBasedMock.h: |
| (WebCore::TimerEvent::TimerEvent): |
| * platform/network/DNSResolveQueue.cpp: |
| (WebCore::DNSResolveQueue::add): |
| (WebCore::DNSResolveQueue::timerFired): |
| * platform/network/PingHandle.h: |
| * platform/network/curl/ResourceHandleManager.cpp: |
| (WebCore::ResourceHandleManager::downloadTimerCallback): |
| (WebCore::ResourceHandleManager::add): |
| (WebCore::ResourceHandleManager::cancel): |
| * platform/network/mac/NetworkStateNotifierMac.cpp: |
| * platform/network/soup/ResourceHandleSoup.cpp: |
| (WebCore::ResourceHandle::sendPendingRequest): |
| * rendering/ImageQualityController.cpp: |
| (WebCore::ImageQualityController::restartTimer): |
| * rendering/RenderLayerCompositor.cpp: |
| * rendering/RenderProgress.cpp: |
| (WebCore::RenderProgress::RenderProgress): |
| * rendering/RenderProgress.h: |
| * rendering/RenderText.cpp: |
| (WebCore::SecureTextTimer::restart): |
| * rendering/RenderTheme.cpp: |
| (WebCore::RenderTheme::animationRepeatIntervalForProgressBar): |
| * rendering/RenderTheme.h: |
| (WebCore::RenderTheme::mediaControlsFadeOutDuration): |
| * rendering/RenderThemeGtk.cpp: |
| (WebCore::RenderThemeGtk::animationRepeatIntervalForProgressBar): |
| * rendering/RenderThemeGtk.h: |
| * rendering/RenderThemeIOS.h: |
| * rendering/RenderThemeIOS.mm: |
| (WebCore::RenderThemeIOS::animationRepeatIntervalForProgressBar): |
| * rendering/RenderThemeMac.h: |
| * rendering/RenderThemeMac.mm: |
| (WebCore::RenderThemeMac::animationRepeatIntervalForProgressBar): |
| (WebCore::RenderThemeMac::animationDurationForProgressBar): |
| * replay/EventLoopInputDispatcher.cpp: |
| (WebCore::EventLoopInputDispatcher::dispatchInputSoon): |
| * svg/animation/SMILTimeContainer.cpp: |
| (WebCore::SMILTimeContainer::startTimer): |
| * testing/InternalSettings.cpp: |
| (WebCore::InternalSettings::setTimeWithoutMouseMovementBeforeHidingControls): |
| * testing/InternalSettings.h: |
| * testing/Internals.cpp: |
| (WebCore::Internals::setImageFrameDecodingDuration): |
| * xml/XMLHttpRequest.cpp: |
| (WebCore::XMLHttpRequest::createRequest): |
| |
| 2017-04-10 Miguel Gomez <magomez@igalia.com> |
| |
| REGRESSION(r205841): [GTK] Test fast/images/animated-png.html is failing since r205841 |
| https://bugs.webkit.org/show_bug.cgi?id=168425 |
| |
| Reviewed by Said Abou-Hallawa. |
| |
| There is a problem with animations that are blending their frames into the previous frame. Due to a change |
| in how pixel components are premultiplied (the result is now rounded up), the parameters to the blending |
| operation may vary in one unit, causing the result of the blending to be different from the expected result. |
| In order to fix this, a new parameter is added to indicate whether we want to use rounding up when |
| premultiplying or not, and ImageBackingStore uses that parameter to disable rounding up. |
| |
| Adjusted the expectation for fast/images/animated-png.html, as it must pass now. |
| |
| * platform/graphics/Color.cpp: |
| (WebCore::premultipliedChannel): |
| (WebCore::makePremultipliedRGBA): |
| * platform/graphics/Color.h: |
| * platform/graphics/ImageBackingStore.h: |
| (WebCore::ImageBackingStore::blendPixel): |
| (WebCore::ImageBackingStore::pixelValue): |
| |
| 2017-04-09 Wenson Hsieh <wenson_hsieh@apple.com> |
| |
| [WK2] Add infrastructure to perform actions after an asynchronous position information request finishes |
| https://bugs.webkit.org/show_bug.cgi?id=170658 |
| <rdar://problem/31431450> |
| |
| Reviewed by Tim Horton. |
| |
| Minor adjustments to fix the build in the newest version of the SDK. |
| |
| * platform/ios/WebItemProviderPasteboard.mm: |
| (-[WebItemProviderPasteboard setItemsFromObjectRepresentations:]): |
| (-[WebItemProviderPasteboard _tryToCreateAndAppendObjectOfClass:toArray:usingProvider:]): |
| |
| 2017-04-09 Yusuke Suzuki <utatane.tea@gmail.com> |
| |
| [WTF] Annotate Seconds' member functions and operators with constexpr |
| https://bugs.webkit.org/show_bug.cgi?id=170662 |
| |
| Reviewed by Daniel Bates. |
| |
| * page/Frame.cpp: |
| |
| 2017-04-09 Chris Dumez <cdumez@apple.com> |
| |
| Drop Timer::startRepeating() overload taking a double |
| https://bugs.webkit.org/show_bug.cgi?id=170656 |
| |
| Reviewed by Yusuke Suzuki. |
| |
| Drop Timer::startRepeating() overload taking a double as people should use Seconds type now. |
| |
| * Modules/mediastream/CanvasCaptureMediaStreamTrack.cpp: |
| (WebCore::CanvasCaptureMediaStreamTrack::Source::startProducingData): |
| * editing/FrameSelection.cpp: |
| (WebCore::FrameSelection::updateAppearance): |
| * html/HTMLMediaElement.cpp: |
| (WebCore::HTMLMediaElement::startProgressEventTimer): |
| (WebCore::HTMLMediaElement::scheduleTimeupdateEvent): |
| * html/HTMLMediaElement.h: |
| * html/MediaController.cpp: |
| (MediaController::MediaController): |
| (MediaController::scheduleTimeupdateEvent): |
| * html/MediaController.h: |
| * html/MediaElementSession.cpp: |
| * inspector/InspectorOverlay.cpp: |
| (WebCore::InspectorOverlay::showPaintRect): |
| * loader/ProgressTracker.cpp: |
| * page/AutoscrollController.cpp: |
| * page/Frame.cpp: |
| * page/PageOverlay.cpp: |
| (WebCore::PageOverlay::startFadeAnimation): |
| * page/SuspendableTimer.h: |
| * page/WheelEventTestTrigger.cpp: |
| (WebCore::WheelEventTestTrigger::setTestCallbackAndStartNotificationTimer): |
| * platform/Theme.h: |
| (WebCore::Theme::caretBlinkInterval): |
| * platform/Timer.h: |
| * platform/cocoa/ScrollController.mm: |
| (WebCore::ScrollController::startSnapRubberbandTimer): |
| (WebCore::ScrollController::startScrollSnapTimer): |
| * platform/graphics/ca/TileGrid.cpp: |
| (WebCore::TileGrid::scheduleCohortRemoval): |
| * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp: |
| (WebCore::MediaPlayerPrivateGStreamer::setDownloadBuffering): |
| * platform/mediastream/mac/MockRealtimeAudioSourceMac.mm: |
| (WebCore::MockRealtimeAudioSourceMac::reconfigure): |
| * platform/mock/MockRealtimeAudioSource.cpp: |
| (WebCore::MockRealtimeAudioSource::startProducingData): |
| * platform/mock/MockRealtimeAudioSource.h: |
| (WebCore::MockRealtimeAudioSource::renderInterval): |
| * platform/mock/MockRealtimeVideoSource.cpp: |
| (WebCore::MockRealtimeVideoSource::startProducingData): |
| (WebCore::MockRealtimeVideoSource::applyFrameRate): |
| * rendering/RenderMarquee.cpp: |
| (WebCore::RenderMarquee::start): |
| (WebCore::RenderMarquee::updateMarqueeStyle): |
| * rendering/RenderTheme.h: |
| (WebCore::RenderTheme::caretBlinkInterval): |
| * rendering/RenderThemeGtk.cpp: |
| (WebCore::RenderThemeGtk::caretBlinkInterval): |
| * rendering/RenderThemeGtk.h: |
| * xml/XMLHttpRequestProgressEventThrottle.cpp: |
| (WebCore::XMLHttpRequestProgressEventThrottle::dispatchThrottledProgressEvent): |
| * xml/XMLHttpRequestProgressEventThrottle.h: |
| |
| 2017-04-09 Fujii Hironori <Hironori.Fujii@sony.com> |
| |
| generate-bindings-all.pl shouldn't use Perl threads |
| https://bugs.webkit.org/show_bug.cgi?id=170106 |
| |
| Reviewed by Yusuke Suzuki. |
| |
| The use of interpreter-based threads in Perl is officially |
| discouraged and not all Linux distributions and BSD compile Perl |
| with threads support. Use fork instead of threads to run |
| generate-bindings.pl in parallel. |
| |
| * bindings/scripts/generate-bindings-all.pl: |
| (spawnGenerateBindingsIfNeeded): Added. |
| (executeCommand): Removed the workaround for Cygwin Perl threads. |
| (spawnCommand): Added. |
| (worker): Deleted. |
| |
| 2017-04-09 Said Abou-Hallawa <sabouhallawa@apple.com> |
| |
| REGRESSION(r214635): Calculate image subsampling only for CG |
| https://bugs.webkit.org/show_bug.cgi?id=170353 |
| |
| Reviewed by Simon Fraser. |
| |
| In r214635, we needed to calculate the image scaleFactor for all platforms. |
| It was needed do the calculation: sizeForDrawing = sizeOfImage * imageScaleFactor. |
| This made ImageSource::subsamplingLevelForScale() now returns a SubsamplingLevel |
| not equal to SubsamplingLevel::Default if the image scaleFactor is greater |
| than {1, 1} for all platforms. The subsamplingLevel should only be used for CG. |
| |
| This is also a chance to make nativeImageDrawingScale() a across platform |
| function and move it to the GraphicsContext class. |
| |
| * platform/graphics/BitmapImage.cpp: |
| (WebCore::BitmapImage::draw): |
| * platform/graphics/GraphicsContext.cpp: |
| (WebCore::GraphicsContext::scaleFactorForDrawing): |
| * platform/graphics/GraphicsContext.h: |
| * platform/graphics/ImageSource.cpp: |
| (WebCore::ImageSource::subsamplingLevelForScaleFactor): |
| (WebCore::ImageSource::subsamplingLevelForScale): Deleted. |
| * platform/graphics/ImageSource.h: |
| * platform/graphics/NativeImage.h: |
| * platform/graphics/cairo/NativeImageCairo.cpp: |
| (WebCore::nativeImageDrawingScale): Deleted. |
| * platform/graphics/cg/NativeImageCG.cpp: |
| (WebCore::nativeImageDrawingScale): Deleted. |
| * platform/graphics/win/NativeImageDirect2D.cpp: |
| (WebCore::nativeImageDrawingScale): Deleted. |
| |
| 2017-04-09 Chris Dumez <cdumez@apple.com> |
| |
| Start dropping Timer API dealing with double |
| https://bugs.webkit.org/show_bug.cgi?id=170649 |
| |
| Reviewed by Yusuke Suzuki. |
| |
| Start dropping Timer API dealing with double as people should use Seconds now. |
| |
| * Modules/encryptedmedia/legacy/WebKitMediaKeySession.cpp: |
| (WebCore::WebKitMediaKeySession::generateKeyRequest): |
| (WebCore::WebKitMediaKeySession::update): |
| * Modules/geolocation/GeoNotifier.cpp: |
| (WebCore::GeoNotifier::setFatalError): |
| (WebCore::GeoNotifier::setUseCachedPosition): |
| * Modules/geolocation/Geolocation.cpp: |
| (WebCore::Geolocation::resume): |
| * Modules/indexeddb/IDBTransaction.cpp: |
| (WebCore::IDBTransaction::schedulePendingOperationTimer): |
| (WebCore::IDBTransaction::scheduleCompletedOperationTimer): |
| * Modules/indexeddb/server/UniqueIDBDatabase.cpp: |
| (WebCore::IDBServer::UniqueIDBDatabase::invokeOperationAndTransactionTimer): |
| * Modules/mediasource/SourceBuffer.cpp: |
| (WebCore::SourceBuffer::rangeRemoval): |
| (WebCore::SourceBuffer::appendBufferInternal): |
| * Modules/mediastream/MediaStream.cpp: |
| (WebCore::MediaStream::scheduleActiveStateChange): |
| * Modules/mediastream/RTCDTMFSender.cpp: |
| (WebCore::RTCDTMFSender::scheduleDispatchEvent): |
| * Modules/mediastream/RTCDataChannel.cpp: |
| (WebCore::RTCDataChannel::scheduleDispatchEvent): |
| * Modules/notifications/Notification.cpp: |
| * Modules/notifications/NotificationCenter.cpp: |
| (WebCore::NotificationCenter::requestPermission): |
| * Modules/vibration/Vibration.cpp: |
| (WebCore::Vibration::vibrate): |
| * Modules/websockets/WebSocket.cpp: |
| (WebCore::WebSocket::resume): |
| * Modules/websockets/WebSocketChannel.cpp: |
| (WebCore::WebSocketChannel::resume): |
| * accessibility/AXObjectCache.cpp: |
| (WebCore::AXObjectCache::postNotification): |
| * bindings/js/GCController.cpp: |
| (WebCore::GCController::garbageCollectOnNextRunLoop): |
| * css/CSSFontSelector.cpp: |
| (WebCore::CSSFontSelector::beginLoadingFontSoon): |
| * dom/Document.cpp: |
| (WebCore::Document::scheduleStyleRecalc): |
| (WebCore::Document::updateFocusAppearanceSoon): |
| (WebCore::Document::resumeScheduledTasks): |
| (WebCore::Document::requestFullScreenForElement): |
| (WebCore::Document::webkitDidEnterFullScreenForElement): |
| (WebCore::Document::webkitDidExitFullScreenForElement): |
| (WebCore::Document::decrementLoadEventDelayCount): |
| (WebCore::Document::didAssociateFormControl): |
| (WebCore::Document::setCachedDOMCookies): |
| * dom/DocumentEventQueue.cpp: |
| (WebCore::DocumentEventQueue::enqueueEvent): |
| * dom/EventSender.h: |
| (WebCore::EventSender<T>::dispatchEventSoon): |
| * dom/Microtasks.cpp: |
| (WebCore::MicrotaskQueue::append): |
| * dom/ScriptRunner.cpp: |
| (WebCore::ScriptRunner::resume): |
| (WebCore::ScriptRunner::notifyFinished): |
| * dom/ScriptableDocumentParser.cpp: |
| (WebCore::ScriptableDocumentParser::executeScriptsWaitingForStylesheetsSoon): |
| * editing/Editor.cpp: |
| (WebCore::Editor::respondToChangedSelection): |
| * editing/SpellChecker.cpp: |
| (WebCore::SpellChecker::didCheck): |
| * html/HTMLFormElement.cpp: |
| (WebCore::HTMLFormElement::finishRequestAutocomplete): |
| * html/HTMLMediaElement.cpp: |
| (WebCore::HTMLMediaElement::scheduleDelayedAction): |
| (WebCore::HTMLMediaElement::beginScanning): |
| * html/HTMLPlugInElement.cpp: |
| (WebCore::HTMLPlugInElement::setDisplayState): |
| * html/HTMLSourceElement.cpp: |
| (WebCore::HTMLSourceElement::scheduleErrorEvent): |
| (WebCore::HTMLSourceElement::resume): |
| * html/HTMLTrackElement.cpp: |
| (WebCore::HTMLTrackElement::scheduleLoad): |
| * html/MediaController.cpp: |
| (MediaController::currentTime): |
| (MediaController::scheduleEvent): |
| * html/MediaDocument.cpp: |
| (WebCore::MediaDocument::mediaElementSawUnsupportedTracks): |
| * html/MediaElementSession.cpp: |
| (WebCore::MediaElementSession::externalOutputDeviceAvailableDidChange): |
| * html/ValidationMessage.cpp: |
| (WebCore::ValidationMessage::setMessage): |
| (WebCore::ValidationMessage::requestToHideMessage): |
| * html/canvas/WebGLRenderingContextBase.cpp: |
| (WebCore::WebGLRenderingContextBase::loseContextImpl): |
| (WebCore::WebGLRenderingContextBase::forceRestoreContext): |
| (WebCore::WebGLRenderingContextBase::dispatchContextLostEvent): |
| * html/parser/HTMLParserScheduler.cpp: |
| (WebCore::HTMLParserScheduler::continueNextChunkTimerFired): |
| (WebCore::HTMLParserScheduler::scheduleForResume): |
| (WebCore::HTMLParserScheduler::resume): |
| * html/shadow/MediaControlElements.cpp: |
| (WebCore::MediaControlTextTrackContainerElement::updateSizes): |
| * html/track/LoadableTextTrack.cpp: |
| (WebCore::LoadableTextTrack::scheduleLoad): |
| * inspector/InspectorCSSAgent.cpp: |
| (WebCore::ChangeRegionOversetTask::scheduleFor): |
| * inspector/InspectorDOMAgent.cpp: |
| (WebCore::RevalidateStyleAttributeTask::scheduleFor): |
| * inspector/InspectorFrontendClientLocal.cpp: |
| (WebCore::InspectorBackendDispatchTask::dispatch): |
| (WebCore::InspectorBackendDispatchTask::timerFired): |
| * inspector/WebHeapAgent.cpp: |
| (WebCore::SendGarbageCollectionEventsTask::addGarbageCollection): |
| * loader/DocumentLoader.cpp: |
| (WebCore::DocumentLoader::startDataLoadTimer): |
| (WebCore::DocumentLoader::deliverSubstituteResourcesAfterDelay): |
| * loader/FrameLoader.cpp: |
| (WebCore::FrameLoader::startCheckCompleteTimer): |
| * loader/ImageLoader.cpp: |
| (WebCore::ImageLoader::updatedHasPendingEvent): |
| * loader/TextTrackLoader.cpp: |
| (WebCore::TextTrackLoader::notifyFinished): |
| (WebCore::TextTrackLoader::newCuesParsed): |
| (WebCore::TextTrackLoader::fileFailedToParse): |
| * loader/appcache/ApplicationCacheGroup.cpp: |
| (WebCore::ApplicationCacheGroup::scheduleReachedMaxAppCacheSizeCallback): |
| * loader/cache/CachedResource.cpp: |
| (WebCore::CachedResource::Callback::Callback): |
| * loader/cache/CachedResourceLoader.cpp: |
| (WebCore::CachedResourceLoader::loadDone): |
| * loader/cache/MemoryCache.cpp: |
| (WebCore::MemoryCache::pruneSoon): |
| * page/CaptionUserPreferences.cpp: |
| (WebCore::CaptionUserPreferences::notify): |
| * page/CaptionUserPreferencesMediaAF.cpp: |
| (WebCore::CaptionUserPreferencesMediaAF::setInterestedInCaptionPreferenceChanges): |
| * page/DOMWindow.cpp: |
| (WebCore::DOMWindow::postMessage): |
| * page/DeviceController.cpp: |
| (WebCore::DeviceController::addDeviceEventListener): |
| * page/EventHandler.cpp: |
| (WebCore::EventHandler::scheduleHoverStateUpdate): |
| * page/EventSource.cpp: |
| (WebCore::EventSource::scheduleInitialConnect): |
| * page/FrameView.cpp: |
| (WebCore::FrameView::layout): |
| (WebCore::FrameView::performPostLayoutTasks): |
| * page/Settings.cpp: |
| (WebCore::Settings::setLoadsImagesAutomatically): |
| (WebCore::Settings::setImagesEnabled): |
| * page/SuspendableTimer.h: |
| * page/animation/CSSAnimationController.cpp: |
| (WebCore::CSSAnimationControllerPrivate::startUpdateStyleIfNeededDispatcher): |
| * page/mac/ServicesOverlayController.mm: |
| (WebCore::ServicesOverlayController::invalidateHighlightsOfType): |
| * page/scrolling/AsyncScrollingCoordinator.cpp: |
| (WebCore::AsyncScrollingCoordinator::scheduleUpdateScrollPositionAfterAsyncScroll): |
| * page/scrolling/ios/ScrollingCoordinatorIOS.mm: |
| (WebCore::ScrollingCoordinatorIOS::scheduleTreeStateCommit): |
| * page/scrolling/mac/ScrollingCoordinatorMac.mm: |
| (WebCore::ScrollingCoordinatorMac::scheduleTreeStateCommit): |
| * platform/GenericTaskQueue.cpp: |
| (WebCore::TaskDispatcher<Timer>::postTask): |
| * platform/Scrollbar.cpp: |
| (WebCore::Scrollbar::autoscrollPressedPart): |
| (WebCore::Scrollbar::startTimerIfNeeded): |
| * platform/Scrollbar.h: |
| * platform/ScrollbarTheme.h: |
| (WebCore::ScrollbarTheme::initialAutoscrollTimerDelay): |
| (WebCore::ScrollbarTheme::autoscrollTimerDelay): |
| * platform/Timer.cpp: |
| * platform/Timer.h: |
| (WebCore::TimerBase::startRepeating): |
| (WebCore::TimerBase::startOneShot): |
| (WebCore::TimerBase::augmentFireInterval): |
| (WebCore::TimerBase::augmentRepeatInterval): |
| * platform/gamepad/mac/HIDGamepadProvider.cpp: |
| (WebCore::HIDGamepadProvider::deviceAdded): |
| * platform/graphics/MediaPlayer.cpp: |
| (WebCore::MediaPlayer::networkStateChanged): |
| * platform/graphics/avfoundation/MediaSelectionGroupAVFObjC.mm: |
| (WebCore::MediaSelectionGroupAVFObjC::updateOptions): |
| (WebCore::MediaSelectionGroupAVFObjC::setSelectedOption): |
| * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm: |
| (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::seekWithTolerance): |
| * platform/graphics/ca/TileCoverageMap.cpp: |
| (WebCore::TileCoverageMap::setNeedsUpdate): |
| * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp: |
| (WebCore::MediaPlayerPrivateGStreamerBase::triggerRepaint): |
| * platform/graphics/gstreamer/VideoSinkGStreamer.cpp: |
| (VideoRenderRequestScheduler::requestRender): |
| * platform/graphics/texmap/TextureMapperPlatformLayerProxy.cpp: |
| (WebCore::TextureMapperPlatformLayerProxy::scheduleUpdateOnCompositorThread): |
| * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp: |
| (WebCore::CoordinatedGraphicsLayer::addAnimation): |
| * platform/gtk/ScrollAnimatorGtk.cpp: |
| (WebCore::ScrollAnimatorGtk::showOverlayScrollbars): |
| * platform/gtk/ScrollbarThemeGtk.h: |
| * platform/ios/LegacyTileCache.mm: |
| (WebCore::LegacyTileCache::finishedCreatingTiles): |
| (WebCore::LegacyTileCache::setSpeculativeTileCreationEnabled): |
| * platform/ios/ScrollbarThemeIOS.h: |
| * platform/ios/ScrollbarThemeIOS.mm: |
| (WebCore::ScrollbarThemeIOS::initialAutoscrollTimerDelay): |
| (WebCore::ScrollbarThemeIOS::autoscrollTimerDelay): |
| * platform/mac/ScrollAnimatorMac.mm: |
| (WebCore::ScrollAnimatorMac::sendContentAreaScrolledSoon): |
| * platform/mac/ScrollbarThemeMac.h: |
| * platform/mac/ScrollbarThemeMac.mm: |
| (WebCore::ScrollbarThemeMac::preferencesChanged): |
| (WebCore::ScrollbarThemeMac::initialAutoscrollTimerDelay): |
| (WebCore::ScrollbarThemeMac::autoscrollTimerDelay): |
| * platform/mock/DeviceOrientationClientMock.cpp: |
| (WebCore::DeviceOrientationClientMock::setOrientation): |
| * platform/mock/GeolocationClientMock.cpp: |
| (WebCore::GeolocationClientMock::asyncUpdatePermission): |
| (WebCore::GeolocationClientMock::asyncUpdateController): |
| * platform/mock/MockMediaEndpoint.cpp: |
| (WebCore::MockMediaEndpoint::dispatchFakeIceCandidates): |
| (WebCore::MockMediaEndpoint::iceCandidateTimerFired): |
| (WebCore::MockMediaEndpoint::stepIceTransportStates): |
| (WebCore::MockMediaEndpoint::iceTransportTimerFired): |
| (WebCore::MockMediaEndpoint::unmuteRemoteSourcesByMid): |
| (WebCore::MockMediaEndpoint::unmuteTimerFired): |
| * platform/network/DataURLDecoder.cpp: |
| (WebCore::DataURLDecoder::DecodingResultDispatcher::startTimer): |
| * platform/network/ResourceHandle.cpp: |
| (WebCore::ResourceHandle::scheduleFailure): |
| (WebCore::ResourceHandle::setDefersLoading): |
| * rendering/RenderLayerCompositor.cpp: |
| (WebCore::RenderLayerCompositor::scheduleCompositingLayerUpdate): |
| * rendering/RenderNamedFlowThread.cpp: |
| (WebCore::RenderNamedFlowThread::dispatchRegionOversetChangeEventIfNeeded): |
| * rendering/RenderScrollbarTheme.h: |
| * rendering/RenderView.cpp: |
| (WebCore::RenderView::scheduleLazyRepaint): |
| * style/StyleScope.cpp: |
| (WebCore::Style::Scope::scheduleUpdate): |
| * svg/SVGElement.cpp: |
| (WebCore::SVGElement::sendSVGLoadEventIfPossibleAsynchronously): |
| * xml/XMLHttpRequest.cpp: |
| (WebCore::XMLHttpRequest::prepareToSend): |
| (WebCore::XMLHttpRequest::didFail): |
| (WebCore::XMLHttpRequest::resume): |
| * xml/XMLHttpRequestProgressEventThrottle.cpp: |
| (WebCore::XMLHttpRequestProgressEventThrottle::resume): |
| |
| 2017-04-08 Myles C. Maxfield <mmaxfield@apple.com> |
| |
| [Variation Fonts] Width values of GX fonts are not mapped correctly |
| https://bugs.webkit.org/show_bug.cgi?id=170367 |
| |
| Reviewed by Simon Fraser. |
| |
| For some reason, when I performed my calculations for how to map the 'wdth' axis of GX-style |
| variation fonts, I thought that font-stretch: 100% should map to a variation value of 0.0. |
| Instead, this should map to 1.0. |
| |
| Test: fast/text/variations/gx-width.html |
| |
| * platform/graphics/cocoa/FontCacheCoreText.cpp: |
| (WebCore::denormalizeSlope): |
| (WebCore::denormalizeVariationWidth): |
| (WebCore::normalizeVariationWidth): |
| (WebCore::normalizeWidth): |
| (WebCore::preparePlatformFont): |
| (WebCore::variationCapabilitiesForFontDescriptor): |
| (WebCore::denormalizeWidth): Deleted. |
| |
| 2017-04-08 Eric Carlson <eric.carlson@apple.com> |
| |
| [MediaStream Mac] Revert change of Mac video capture format |
| https://bugs.webkit.org/show_bug.cgi?id=170642 |
| <rdar://problem/31520492> |
| |
| Reviewed by Sam Weinig. |
| |
| Revert r214968 which changed macOS video capture format to kCVPixelFormatType_420YpCbCr8BiPlanarFullRange |
| from kCVPixelFormatType_420YpCbCr8Planar because AVSampleBufferDisplayLayer sometimes fails |
| to display the former. |
| |
| * platform/mediastream/mac/AVVideoCaptureSource.mm: |
| |
| 2017-04-08 Said Abou-Hallawa <sabouhallawa@apple.com> |
| |
| A synchronous DecodingOptions should be compatible with any asynchronous sizeForDrawing DecodingOptions |
| https://bugs.webkit.org/show_bug.cgi?id=170577 |
| |
| Reviewed by Simon Fraser. |
| |
| Once a synchronous decoded frame is found, there is no need to decode it |
| again. This decoded frame is suitable for any sizeForDrawing. This will |
| prevent double decoding if one image client wants synchronous decoded |
| frame while the other needs an asynchronous decode frame for a specific |
| sizeForDrawing. |
| |
| Test: fast/images/async-image-background-image-repeated.html |
| |
| * platform/graphics/DecodingOptions.h: |
| (WebCore::DecodingOptions::DecodingOptions): |
| (WebCore::DecodingOptions::isNone): |
| (WebCore::DecodingOptions::isAsynchronousCompatibleWith): |
| |
| 2017-04-08 Simon Fraser <simon.fraser@apple.com> |
| |
| Align the timers for throttled rAF to reduce power usage |
| https://bugs.webkit.org/show_bug.cgi?id=170630 |
| rdar://problem/31490620 |
| |
| Reviewed by Chris Dumez. |
| |
| Align the timers for all throttled ScriptedAnimationControllers in the process with |
| a resolution of 30ms, which reduces process wake-ups and thus saves power. |
| |
| * dom/ScriptedAnimationController.cpp: |
| (WebCore::ScriptedAnimationController::scheduleAnimation): |
| |
| 2017-04-08 Chris Dumez <cdumez@apple.com> |
| |
| Drop std::chrono support from Timer class |
| https://bugs.webkit.org/show_bug.cgi?id=170645 |
| |
| Reviewed by Sam Weinig. |
| |
| Drop std::chrono support from Timer class now that we prefer using Seconds type. |
| |
| * css/CSSImageGeneratorValue.cpp: |
| * html/HTMLPlugInImageElement.cpp: |
| * html/canvas/WebGLRenderingContextBase.cpp: |
| * loader/cache/CachedResource.cpp: |
| (WebCore::deadDecodedDataDeletionIntervalForResourceType): |
| (WebCore::CachedResource::destroyDecodedDataIfNeeded): |
| * loader/cache/MemoryCache.cpp: |
| (WebCore::MemoryCache::MemoryCache): |
| * loader/cache/MemoryCache.h: |
| (WebCore::MemoryCache::setDeadDecodedDataDeletionInterval): |
| (WebCore::MemoryCache::deadDecodedDataDeletionInterval): |
| * page/PerformanceMonitor.cpp: |
| * page/SuspendableTimer.h: |
| * page/mac/ServicesOverlayController.h: |
| * page/mac/ServicesOverlayController.mm: |
| (WebCore::ServicesOverlayController::selectionRectsDidChange): |
| (WebCore::ServicesOverlayController::remainingTimeUntilHighlightShouldBeShown): |
| (WebCore::ServicesOverlayController::determineActiveHighlight): |
| (WebCore::ServicesOverlayController::mouseEvent): |
| * platform/Timer.h: |
| (WebCore::TimerBase::startRepeating): |
| (WebCore::TimerBase::startOneShot): |
| (WebCore::TimerBase::augmentFireInterval): |
| (WebCore::TimerBase::augmentRepeatInterval): |
| (WebCore::DeferrableOneShotTimer::DeferrableOneShotTimer): |
| * platform/graphics/FontCache.cpp: |
| (WebCore::FontCache::fontForFamily): |
| * platform/graphics/ca/TileController.cpp: |
| * platform/graphics/cg/IOSurfacePool.cpp: |
| * platform/graphics/cg/SubimageCacheWithTimer.cpp: |
| * xml/XMLHttpRequest.cpp: |
| (WebCore::XMLHttpRequest::setTimeout): |
| (WebCore::XMLHttpRequest::createRequest): |
| * xml/XMLHttpRequest.h: |
| |
| 2017-04-08 Simon Fraser <simon.fraser@apple.com> |
| |
| Update CSSProperties.json with correct fill-and-stroke status, and other cleanup |
| https://bugs.webkit.org/show_bug.cgi?id=170643 |
| |
| Reviewed by Chris Dumez. |
| |
| Structural changes: |
| - move implementation-related "comment" blocks into "codegen-properties" |
| - move status-related "comment" blocks into "status" |
| |
| Add the concept of "obsolete-category" and "obsolete-url" for properties |
| like the text-fill-and-stroke properties that used to be specified in SVG but |
| now have their own module shared with CSS. |
| |
| Update the status of paint-order, stroke-linecap, stroke-linejoin, stroke-miterlimit |
| and stroke-width to "supported", overriding the default for css-text-fill-and-stroke which |
| is "under consideration". |
| |
| Add display values "flow" and "flow-root" but mark them as unimplemented. |
| |
| Fix makeprop.pl to ignore comments inside codegen-properties. |
| |
| * css/CSSProperties.json: |
| * css/makeprop.pl: |
| (addProperty): |
| |
| 2017-04-08 Eric Carlson <eric.carlson@apple.com> |
| |
| [MediaStream iOS] Update muted state when interrupted |
| https://bugs.webkit.org/show_bug.cgi?id=170605 |
| <rdar://problem/31503896> |
| |
| Reviewed by Youenn Fablet. |
| |
| * platform/mediastream/RealtimeMediaSource.cpp: |
| (WebCore::RealtimeMediaSource::setMuted): Don't check both m_stopped and stopped(). Split code |
| to notify observers out into notifyMutedObservers. |
| (WebCore::RealtimeMediaSource::notifyMutedObservers): Split from setMuted. |
| * platform/mediastream/RealtimeMediaSource.h: |
| |
| * platform/mediastream/mac/AVMediaCaptureSource.h: |
| * platform/mediastream/mac/AVMediaCaptureSource.mm: |
| (WebCore::AVMediaCaptureSource::captureSessionIsRunningDidChange): Set m_muted directly and |
| call notifyMutedObservers because the session has already stopped running. |
| (WebCore::AVMediaCaptureSource::isProducingData): Move from .h file to make debugging easier. |
| |
| 2017-04-08 Simon Fraser <simon.fraser@apple.com> |
| |
| Unprefix CSS cursor values grab and grabbing |
| https://bugs.webkit.org/show_bug.cgi?id=170543 |
| |
| Reviewed by Jon Lee. |
| |
| Add support for unprefixed "grab" and "grabbing" values for cursor (retaining |
| support for the prefixed values) which are now in <https://drafts.csswg.org/css-ui-3/#cursor> |
| |
| Canonicalize the order of the values based on the order in the spec in the enums |
| and switch statements. |
| |
| Tested by fast/css/cursor-parsing.html |
| |
| * css/CSSPrimitiveValueMappings.h: |
| (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): |
| (WebCore::CSSPrimitiveValue::operator ECursor): |
| * css/CSSProperties.json: |
| * css/CSSValueKeywords.in: |
| * page/EventHandler.cpp: |
| (WebCore::EventHandler::selectCursor): |
| * rendering/style/RenderStyleConstants.h: |
| |
| 2017-04-08 Youenn Fablet <youenn@apple.com> |
| |
| WebRTC tests gardening |
| https://bugs.webkit.org/show_bug.cgi?id=170508 |
| |
| Reviewed by Eric Carlson. |
| |
| * Configurations/FeatureDefines.xcconfig: Changing webrtc enabling for ios. |
| |
| 2017-04-08 Youenn Fablet <youenn@apple.com> |
| |
| MediaStreamTrack id should be preserved by PeerConnection |
| https://bugs.webkit.org/show_bug.cgi?id=170624 |
| |
| Reviewed by Eric Carlson. |
| |
| Covered by updated test. |
| |
| * Modules/mediastream/libwebrtc/LibWebRTCPeerConnectionBackend.cpp: |
| (WebCore::createReceiverForSource): Setting track id according source id. |
| |
| 2017-04-08 Chris Dumez <cdumez@apple.com> |
| |
| Timer's nextFireInterval() / repeatInterval() should return Seconds |
| https://bugs.webkit.org/show_bug.cgi?id=170639 |
| |
| Reviewed by Simon Fraser. |
| |
| Timer's nextFireInterval() / repeatInterval() should return Seconds, not double. |
| |
| * loader/NavigationScheduler.cpp: |
| * page/DOMTimer.cpp: |
| (WebCore::DOMTimer::updateTimerIntervalIfNecessary): |
| * page/SuspendableTimer.cpp: |
| (WebCore::SuspendableTimer::suspend): |
| (WebCore::SuspendableTimer::repeatInterval): |
| * page/SuspendableTimer.h: |
| * page/animation/AnimationBase.cpp: |
| (WebCore::AnimationBase::timeToNextService): |
| (WebCore::AnimationBase::getTimeToNextEvent): |
| (WebCore::AnimationBase::goIntoEndingOrLoopingState): |
| * page/animation/AnimationBase.h: |
| * page/animation/CSSAnimationController.cpp: |
| (WebCore::CSSAnimationControllerPrivate::updateAnimations): |
| (WebCore::CSSAnimationControllerPrivate::updateAnimationTimerForRenderer): |
| (WebCore::CSSAnimationControllerPrivate::updateAnimationTimer): |
| (WebCore::CSSAnimationControllerPrivate::animationFrameCallbackFired): |
| * page/animation/CSSAnimationControllerPrivate.h: |
| * page/animation/CompositeAnimation.cpp: |
| (WebCore::CompositeAnimation::timeToNextService): |
| * page/animation/CompositeAnimation.h: |
| * page/animation/ImplicitAnimation.cpp: |
| (WebCore::ImplicitAnimation::timeToNextService): |
| * page/animation/ImplicitAnimation.h: |
| * page/animation/KeyframeAnimation.cpp: |
| (WebCore::KeyframeAnimation::timeToNextService): |
| * page/animation/KeyframeAnimation.h: |
| * platform/ThreadTimers.cpp: |
| (WebCore::ThreadTimers::sharedTimerFiredInternal): |
| * platform/Timer.cpp: |
| (WebCore::TimerBase::nextFireInterval): |
| * platform/Timer.h: |
| (WebCore::TimerBase::repeatInterval): |
| * platform/graphics/ca/TileController.cpp: |
| (WebCore::TileController::setIsInWindow): |
| (WebCore::TileController::scheduleTileRevalidation): |
| * platform/graphics/ca/TileController.h: |
| * platform/graphics/ca/TileGrid.cpp: |
| (WebCore::TileGrid::revalidateTiles): |
| |
| 2017-04-08 Csaba Osztrogonác <ossy@webkit.org> |
| |
| Unreviewed Mac cmake buildfix after r215051, just for fun. |
| https://bugs.webkit.org/show_bug.cgi?id=169761 |
| |
| * PlatformMac.cmake: |
| |
| 2017-04-07 Simon Fraser <simon.fraser@apple.com> |
| |
| Build fix: TimerBase::start(double, double) can't be inline and exported, |
| so make it non-inline. |
| |
| * platform/Timer.cpp: |
| (WebCore::TimerBase::start): |
| * platform/Timer.h: |
| (WebCore::TimerBase::start): Deleted. |
| |
| 2017-04-07 Chris Dumez <cdumez@apple.com> |
| |
| REGRESSION (r203941): iAd Producer widgets fail to play in iBooks |
| https://bugs.webkit.org/show_bug.cgi?id=170635 |
| <rdar://problem/30797958> |
| |
| Reviewed by Daniel Bates. |
| |
| Extend the MouseEvent::initMouseEvent() workaround we added for iAd Producer |
| to iBooks since the iBooks widgets generated by iAd Producer contain the same |
| bug. |
| |
| * dom/MouseEvent.cpp: |
| (WebCore::MouseEvent::initMouseEventQuirk): |
| |
| 2017-04-07 Chris Dumez <cdumez@apple.com> |
| |
| Start using MonotonicTime / Seconds in Timer class |
| https://bugs.webkit.org/show_bug.cgi?id=170625 |
| |
| Reviewed by Simon Fraser. |
| |
| Start using MonotonicTime / Seconds in Timer class. More work will be needed |
| for the transition to be complete. I plan to do this in a follow-up. |
| |
| * page/DOMTimer.cpp: |
| (WebCore::DOMTimer::alignedFireTime): |
| * page/DOMTimer.h: |
| * page/SuspendableTimer.cpp: |
| (WebCore::SuspendableTimer::suspend): |
| (WebCore::SuspendableTimer::startRepeating): |
| (WebCore::SuspendableTimer::startOneShot): |
| (WebCore::SuspendableTimer::repeatInterval): |
| (WebCore::SuspendableTimer::augmentFireInterval): |
| (WebCore::SuspendableTimer::augmentRepeatInterval): |
| * page/SuspendableTimer.h: |
| (WebCore::SuspendableTimer::startRepeating): |
| (WebCore::SuspendableTimer::startOneShot): |
| (WebCore::SuspendableTimer::augmentFireInterval): |
| (WebCore::SuspendableTimer::augmentRepeatInterval): |
| * platform/ThreadTimers.cpp: |
| (WebCore::ThreadTimers::ThreadTimers): |
| (WebCore::ThreadTimers::setSharedTimer): |
| (WebCore::ThreadTimers::updateSharedTimer): |
| (WebCore::ThreadTimers::sharedTimerFiredInternal): |
| (WebCore::ThreadTimers::fireTimersInNestedEventLoop): |
| * platform/ThreadTimers.h: |
| * platform/Timer.cpp: |
| (WebCore::TimerHeapLessThanFunction::operator()): |
| (WebCore::TimerBase::TimerBase): |
| (WebCore::TimerBase::start): |
| (WebCore::TimerBase::stop): |
| (WebCore::TimerBase::nextFireInterval): |
| (WebCore::TimerBase::heapPop): |
| (WebCore::TimerBase::updateHeapIfNeeded): |
| (WebCore::TimerBase::setNextFireTime): |
| (WebCore::TimerBase::nextUnalignedFireInterval): |
| * platform/Timer.h: |
| (WebCore::TimerBase::start): |
| (WebCore::TimerBase::startOneShot): |
| (WebCore::TimerBase::repeatInterval): |
| (WebCore::TimerBase::repeatIntervalSeconds): |
| (WebCore::TimerBase::augmentFireInterval): |
| (WebCore::TimerBase::augmentRepeatInterval): |
| (WebCore::TimerBase::alignedFireTime): |
| (WebCore::TimerBase::isActive): |
| * testing/Internals.cpp: |
| (WebCore::Internals::isTimerThrottled): |
| |
| 2017-04-07 Yuichiro Kikura <y.kikura@gmail.com> |
| |
| WebGPU: implement ComputeCommandEncoder and related components |
| https://bugs.webkit.org/show_bug.cgi?id=170444 |
| |
| Reviewed by Alex Christensen. |
| |
| I implemented WebGPUComputeCommandEncoder and related components based on the WebGPU proposal. |
| https://webkit.org/wp-content/uploads/webgpu-api-proposal.html |
| |
| Test: fast/canvas/webgpu/webgpu-dispatch.html |
| |
| * CMakeLists.txt: |
| * DerivedSources.make: |
| * PlatformMac.cmake: |
| * WebCore.xcodeproj/project.pbxproj: |
| * bindings/js/JSWebGPUCommandBufferCustom.cpp: Added. |
| (WebCore::JSWebGPUCommandBuffer::completed): |
| * html/canvas/WebGPUCommandBuffer.cpp: |
| (WebCore::WebGPUCommandBuffer::createComputeCommandEncoder): |
| * html/canvas/WebGPUCommandBuffer.h: |
| * html/canvas/WebGPUCommandBuffer.idl: |
| * html/canvas/WebGPUComputeCommandEncoder.cpp: Added. |
| (WebCore::GPUSizeMake): |
| (WebCore::WebGPUComputeCommandEncoder::create): |
| (WebCore::WebGPUComputeCommandEncoder::WebGPUComputeCommandEncoder): |
| (WebCore::WebGPUComputeCommandEncoder::~WebGPUComputeCommandEncoder): |
| (WebCore::WebGPUComputeCommandEncoder::setComputePipelineState): |
| (WebCore::WebGPUComputeCommandEncoder::setBuffer): |
| (WebCore::WebGPUComputeCommandEncoder::dispatch): |
| (WebCore::WebGPUComputeCommandEncoder::endEncoding): |
| * html/canvas/WebGPUComputeCommandEncoder.h: Copied from Source/WebCore/html/canvas/WebGPUCommandBuffer.h. |
| (WebCore::WebGPUComputeCommandEncoder::computeCommandEncoder): |
| * html/canvas/WebGPUComputeCommandEncoder.idl: Copied from Source/WebCore/html/canvas/WebGPUCommandBuffer.idl. |
| * html/canvas/WebGPUComputePipelineState.cpp: Copied from Source/WebCore/platform/graphics/gpu/GPUCommandBuffer.cpp. |
| (WebCore::WebGPUComputePipelineState::create): |
| (WebCore::WebGPUComputePipelineState::WebGPUComputePipelineState): |
| (WebCore::WebGPUComputePipelineState::~WebGPUComputePipelineState): |
| * html/canvas/WebGPUComputePipelineState.h: Copied from Source/WebCore/html/canvas/WebGPUCommandBuffer.h. |
| (WebCore::WebGPUComputePipelineState::computePipelineState): |
| * html/canvas/WebGPUComputePipelineState.idl: Copied from Source/WebCore/html/canvas/WebGPUCommandBuffer.idl. |
| * html/canvas/WebGPURenderingContext.cpp: |
| (WebCore::WebGPURenderingContext::createComputePipelineState): |
| * html/canvas/WebGPURenderingContext.h: |
| * html/canvas/WebGPURenderingContext.idl: |
| * html/canvas/WebGPUSize.h: Copied from Source/WebCore/html/canvas/WebGPUCommandBuffer.idl. |
| * html/canvas/WebGPUSize.idl: Copied from Source/WebCore/html/canvas/WebGPUCommandBuffer.idl. |
| * platform/graphics/cocoa/GPUCommandBufferMetal.mm: |
| (WebCore::GPUCommandBuffer::completed): |
| * platform/graphics/cocoa/GPUComputeCommandEncoderMetal.mm: Added. |
| (WebCore::MTLSizeMake): |
| (WebCore::GPUComputeCommandEncoder::GPUComputeCommandEncoder): |
| (WebCore::GPUComputeCommandEncoder::setComputePipelineState): |
| (WebCore::GPUComputeCommandEncoder::setBuffer): |
| (WebCore::GPUComputeCommandEncoder::dispatch): |
| (WebCore::GPUComputeCommandEncoder::endEncoding): |
| (WebCore::GPUComputeCommandEncoder::platformComputeCommandEncoder): |
| * platform/graphics/cocoa/GPUComputePipelineStateMetal.mm: Copied from Source/WebCore/platform/graphics/gpu/GPUCommandBuffer.cpp. |
| (WebCore::GPUComputePipelineState::GPUComputePipelineState): |
| (WebCore::GPUComputePipelineState::platformComputePipelineState): |
| * platform/graphics/gpu/GPUCommandBuffer.cpp: |
| (WebCore::GPUCommandBuffer::createComputeCommandEncoder): |
| * platform/graphics/gpu/GPUCommandBuffer.h: |
| * platform/graphics/gpu/GPUComputeCommandEncoder.cpp: Copied from Source/WebCore/platform/graphics/gpu/GPUCommandBuffer.cpp. |
| (WebCore::GPUComputeCommandEncoder::create): |
| (WebCore::GPUComputeCommandEncoder::~GPUComputeCommandEncoder): |
| (WebCore::GPUComputeCommandEncoder::setComputePipelineState): |
| (WebCore::GPUComputeCommandEncoder::setBuffer): |
| (WebCore::GPUComputeCommandEncoder::endEncoding): |
| * platform/graphics/gpu/GPUComputeCommandEncoder.h: Copied from Source/WebCore/platform/graphics/gpu/GPUCommandBuffer.h. |
| * platform/graphics/gpu/GPUComputePipelineState.cpp: Copied from Source/WebCore/html/canvas/WebGPUCommandBuffer.idl. |
| (WebCore::GPUComputePipelineState::create): |
| (WebCore::GPUComputePipelineState::~GPUComputePipelineState): |
| * platform/graphics/gpu/GPUComputePipelineState.h: Copied from Source/WebCore/platform/graphics/gpu/GPUCommandBuffer.h. |
| * platform/graphics/gpu/GPUSize.h: Copied from Source/WebCore/html/canvas/WebGPUCommandBuffer.idl. |
| |
| 2017-04-07 Alex Christensen <achristensen@webkit.org> |
| |
| Private browsing sessions should not look in keychain for client certificates |
| https://bugs.webkit.org/show_bug.cgi?id=170618 |
| <rdar://problem/18457427> |
| |
| Reviewed by Dan Bernstein. |
| |
| Our client certificate testing in WebKit leaves much to be desired. |
| See rdar://problem/17694210 for reproduction steps. |
| |
| * platform/spi/cf/CFNetworkSPI.h: |
| Add some new SPI. |
| |
| 2017-04-07 Zalan Bujtas <zalan@apple.com> |
| |
| Simple line layout: FlowContents::segmentIndexForRunSlow skips empty runs. |
| https://bugs.webkit.org/show_bug.cgi?id=170552 |
| |
| Reviewed by Antti Koivisto. |
| |
| The compare function passed to std::lower_bound completely misses empty runs. |
| |
| Test: fast/text/simple-line-layout-hover-over-subsequent-linebreaks.html |
| |
| * rendering/SimpleLineLayoutFlowContents.cpp: |
| (WebCore::SimpleLineLayout::FlowContents::segmentIndexForRunSlow): |
| |
| 2017-04-07 Chris Dumez <cdumez@apple.com> |
| |
| We should log how much CPU a background process was using when killing it due to CPU limiting |
| https://bugs.webkit.org/show_bug.cgi?id=170619 |
| |
| Reviewed by Andreas Kling. |
| |
| CPUMonitor now passes the CPU usage to the callback when it exceeds the threashold. |
| |
| * platform/CPUMonitor.cpp: |
| (WebCore::CPUMonitor::timerFired): |
| * platform/CPUMonitor.h: |
| |
| 2017-04-07 Chris Dumez <cdumez@apple.com> |
| |
| Audible autoplay videos should not get paused when outside the viewport |
| https://bugs.webkit.org/show_bug.cgi?id=170610 |
| <rdar://problem/31505984> |
| |
| Reviewed by Eric Carlson. |
| |
| Audible autoplay videos should not get paused when outside the viewport as this |
| would be observable by the user. |
| |
| Test: media/video-restricted-invisible-autoplay-allowed-if-audible.html |
| |
| * html/MediaElementSession.cpp: |
| (WebCore::MediaElementSession::autoplayPermitted): |
| |
| 2017-04-07 Myles C. Maxfield <mmaxfield@apple.com> |
| |
| REGRESSION(r211382): Complex text with justification erroneously overflows containers |
| https://bugs.webkit.org/show_bug.cgi?id=170399 |
| <rdar://problem/31442008> |
| |
| Reviewed by Simon Fraser. |
| |
| When we perform justification, we adjust glyphs' advances to add extra space between words. |
| ComplexTextController maintains an invariant where m_totalWidth is equal to the sum of these |
| advances. However, in RTL text, inserting extra justification space to the left of a glyph |
| would break that invariant, and would increase the advances of two glyphs instead of just |
| one. Then, when we go to draw the text, the sum of the advances is wider than m_totalWidth, |
| which means the glyphs would be drawn outside of their container. |
| |
| This regressed in r211382 simply because of an oversight and because there were no tests for |
| this codepath. |
| |
| Test: ComplexTextControllerTest.TotalWidthWithJustification |
| |
| * platform/graphics/ComplexTextController.cpp: |
| (WebCore::ComplexTextController::adjustGlyphsAndAdvances): |
| * rendering/InlineBox.h: |
| (WebCore::InlineBox::InlineBox): |
| |
| 2017-04-07 Chris Dumez <cdumez@apple.com> |
| |
| Throttle / Align DOM Timers in cross-origin iframes to 30fps |
| https://bugs.webkit.org/show_bug.cgi?id=170613 |
| <rdar://problem/31506444> |
| |
| Reviewed by Simon Fraser. |
| |
| Throttle / Align DOM Timers in cross-origin iframes to 30fps unless the user |
| has interacted with them, in order to reduce power use. |
| |
| Test: http/tests/frame-throttling/timer-throttle-in-cross-origin-subframe.html |
| |
| * dom/Document.cpp: |
| (WebCore::Document::domTimerAlignmentInterval): |
| (WebCore::Document::updateLastHandledUserGestureTimestamp): |
| * page/DOMTimer.h: |
| |
| 2017-04-07 John Wilander <wilander@apple.com> |
| |
| Follow-up fix for Soup platform. |
| https://bugs.webkit.org/show_bug.cgi?id=170322 |
| |
| Unreviewed build fix. Error introduced by me in |
| https://trac.webkit.org/changeset/215104/webkit. |
| |
| No new tests. |
| |
| * platform/network/soup/SocketStreamHandleImpl.h: |
| Move parameter change to the right |
| SocketStreamHandleImpl::create() function. |
| |
| 2017-04-07 John Wilander <wilander@apple.com> |
| |
| WebSocket streams should have network usage attributed to correct process |
| https://bugs.webkit.org/show_bug.cgi?id=170322 |
| <rdar://problem/26413551> |
| |
| Reviewed by Alex Christensen. |
| |
| Tested manually since it requires a per-app VPN. |
| |
| * page/SocketProvider.cpp: |
| (WebCore::SocketProvider::createSocketStreamHandle): |
| Sends in an empty struct since it doesn't have access to |
| platform dependent sourceApplicationAuditData. |
| * platform/network/SocketStreamHandle.h: |
| Declaration of a per-platform struct to hold CF data for |
| Cocoa platforms. |
| * platform/network/cf/SocketStreamHandleImpl.h: |
| (WebCore::SocketStreamHandleImpl::create): |
| Now takes WebCore::SourceApplicationAuditToken which is |
| passed on to the constructor. |
| * platform/network/cf/SocketStreamHandleImplCFNet.cpp: |
| (WebCore::SocketStreamHandleImpl::SocketStreamHandleImpl): |
| Now takes WebCore::SourceApplicationAuditToken which is |
| passed on to the streams once created. |
| (WebCore::SocketStreamHandleImpl::createStreams): |
| Now sets kCFStreamPropertySourceApplication for the two |
| streams. |
| * platform/network/curl/SocketStreamHandleImpl.h: |
| (WebCore::SocketStreamHandleImpl::create): |
| Added unused WebCore::SourceApplicationAuditToken parameter. |
| * platform/network/soup/SocketStreamHandleImpl.h: |
| * platform/network/soup/SocketStreamHandleImplSoup.cpp: |
| (WebCore::SocketStreamHandleImpl::create): |
| Added unused WebCore::SourceApplicationAuditToken parameter. |
| |
| 2017-04-07 Alex Christensen <achristensen@webkit.org> |
| |
| REGRESSION(r204512): WebSocket errors with "Failed to send WebSocket frame." if too much data is sent |
| https://bugs.webkit.org/show_bug.cgi?id=170463 |
| |
| Reviewed by Michael Catanzaro. |
| |
| This only reproduces when using WebSockets to communicate with an external server. |
| When communicating with a local server, CFWriteStreamWrite succeeds too reliably, so |
| CFWriteStreamCanAcceptBytes returns true, when sometimes it doesn't when communicating |
| across the real internet. |
| |
| * platform/network/cf/SocketStreamHandleImplCFNet.cpp: |
| (WebCore::SocketStreamHandleImpl::platformSendInternal): |
| * platform/network/soup/SocketStreamHandleImplSoup.cpp: |
| (WebCore::SocketStreamHandleImpl::platformSendInternal): |
| Returning std::nullopt means there was an error, which is not true when the socket stream |
| is in a state where it cannot be written to because it is actively communicating. |
| Returning 0 means 0 new bytes were sent, so we will try again later. |
| |
| 2017-04-07 Eric Carlson <eric.carlson@apple.com> |
| |
| MediaSample should store video sample rotation instead of orientation |
| https://bugs.webkit.org/show_bug.cgi?id=170598 |
| |
| Reviewed by Youenn Fablet. |
| |
| No new tests, no functional change. |
| |
| * platform/MediaSample.h: |
| (WebCore::MediaSample::videoRotation): |
| (WebCore::MediaSample::videoOrientation): Deleted. |
| * platform/graphics/avfoundation/MediaSampleAVFObjC.h: |
| * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.h: |
| * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm: |
| (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::videoTransformationMatrix): |
| (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::enqueueVideoSample): |
| (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::updateDisplayLayer): |
| |
| * platform/mediastream/mac/AVVideoCaptureSource.mm: |
| (WebCore::AVVideoCaptureSource::processNewFrame): |
| |
| * platform/mediastream/mac/RealtimeIncomingVideoSource.cpp: |
| (WebCore::RealtimeIncomingVideoSource::OnFrame): |
| (WebCore::RealtimeIncomingVideoSource::processNewSample): |
| * platform/mediastream/mac/RealtimeIncomingVideoSource.h: |
| |
| * platform/mediastream/mac/RealtimeOutgoingVideoSource.cpp: |
| (WebCore::RealtimeOutgoingVideoSource::videoSampleAvailable): |
| |
| 2017-04-07 Brent Fulgham <bfulgham@apple.com> |
| |
| WebKit should percent encode single quotes in query strings |
| https://bugs.webkit.org/show_bug.cgi?id=170561 |
| <rdar://problem/7415154> |
| |
| Reviewed by Alex Christensen. |
| |
| Modify the characterClassTable to instruct the URLParser to convert |
| the single-quote character ' to %27 in URL query strings. |
| |
| Tests: URLParserTest in TestWebKitAPI. |
| fast/events/popup-blocked-from-unique-frame-via-window-open-named-sibling-frame.html |
| fast/frames/xss-auditor-handles-file-urls.html |
| http/tests/security/xssAuditor |
| |
| * platform/URLParser.cpp: |
| |
| 2017-04-07 Zalan Bujtas <zalan@apple.com> |
| |
| Text insertion cursor disappears after pressing enter |
| https://bugs.webkit.org/show_bug.cgi?id=169291 |
| <rdar://problem/30899611> |
| |
| Reviewed by Tim Horton. |
| |
| Positon upstream/downstream (as the result of VisiblePosition -> canonicalPosition) require |
| linebox tree. In addition to regular text, we need to bail out of simple line layout on line breaks too. |
| |
| Test: editing/simple-line-layout-caret-is-gone.html |
| |
| * dom/Position.cpp: |
| (WebCore::ensureLineBoxesIfNeeded): |
| (WebCore::Position::upstream): |
| (WebCore::Position::downstream): |
| (WebCore::Position::getInlineBoxAndOffset): |
| * rendering/RenderLineBreak.cpp: |
| (WebCore::RenderLineBreak::ensureLineBoxes): |
| (WebCore::RenderLineBreak::positionForPoint): |
| (WebCore::RenderLineBreak::setSelectionState): |
| (WebCore::RenderLineBreak::collectSelectionRects): |
| (WebCore::ensureLineBoxes): Deleted. |
| * rendering/RenderLineBreak.h: |
| |
| 2017-04-07 Xan Lopez <xlopez@igalia.com> |
| |
| [GTK] Fix codec name in OWR ASSERT |
| https://bugs.webkit.org/show_bug.cgi?id=170600 |
| |
| Reviewed by Carlos Garcia Campos. |
| |
| * platform/mediastream/openwebrtc/MediaEndpointOwr.cpp: |
| (WebCore::MediaEndpointOwr::prepareMediaSession): uppercase the |
| codec name we are looking for, that's how they appear in the |
| vector. |
| |
| 2017-04-07 Per Arne Vollan <pvollan@apple.com> |
| |
| Add hasVideo property to WebAVPlayerController. |
| https://bugs.webkit.org/show_bug.cgi?id=170545 |
| rdar://problem/31325182 |
| |
| Reviewed by Eric Carlson. |
| |
| Add a new "hasVideo" property which can be used to discover if any video content is present in the playback item, |
| whether video content is currently enabled or not. |
| |
| * platform/ios/WebAVPlayerController.h: |
| * platform/ios/WebVideoFullscreenInterfaceAVKit.mm: |
| (WebVideoFullscreenInterfaceAVKit::hasVideoChanged): |
| |
| 2017-04-07 Miguel Gomez <magomez@igalia.com> |
| |
| [GTK+] Animations not played properly when using synchronous decoding |
| https://bugs.webkit.org/show_bug.cgi?id=170591 |
| |
| Reviewed by Carlos Garcia Campos. |
| |
| Fix an index error when destroying decoded frames that was sometimes deleting the frame we wanted |
| to keep. |
| |
| Covered by exitent tests. |
| |
| * platform/graphics/ImageFrameCache.cpp: |
| (WebCore::ImageFrameCache::destroyDecodedData): |
| |
| 2017-04-07 Xan Lopez <xan@igalia.com> |
| |
| [GTK] Add message about missing codecs to ASSERT in OWR |
| https://bugs.webkit.org/show_bug.cgi?id=170596 |
| |
| Reviewed by Carlos Garcia Campos. |
| |
| * platform/mediastream/openwebrtc/MediaEndpointOwr.cpp: |
| (WebCore::MediaEndpointOwr::prepareMediaSession): add a message |
| about the missing coded to the ASSERT. |
| |
| 2017-04-07 Tomas Popela <tpopela@redhat.com> |
| |
| AX: Don't crash if no renderer is available for AccessibilityRenderObject |
| https://bugs.webkit.org/show_bug.cgi?id=170448 |
| |
| Reviewed by Chris Fleizach. |
| |
| Don't crash or assert if no renderer is available, but early return |
| gracefully (as in other places in the AccessibilityRenderObject.cpp). |
| Spotted by running some tests through dogtail. |
| |
| * accessibility/AccessibilityRenderObject.cpp: |
| (WebCore::AccessibilityRenderObject::isOffScreen): |
| (WebCore::AccessibilityRenderObject::isUnvisited): |
| (WebCore::AccessibilityRenderObject::isVisited): |
| |
| 2017-04-07 Carlos Garcia Campos <cgarcia@igalia.com> |
| |
| [GTK] Update the priorities used in glib main loop sources |
| https://bugs.webkit.org/show_bug.cgi?id=170457 |
| |
| Reviewed by Žan Doberšek. |
| |
| * platform/glib/MainThreadSharedTimerGLib.cpp: |
| (WebCore::MainThreadSharedTimer::MainThreadSharedTimer): |
| * platform/graphics/texmap/TextureMapperPlatformLayerProxy.cpp: |
| (WebCore::TextureMapperPlatformLayerProxy::TextureMapperPlatformLayerProxy): |
| (WebCore::TextureMapperPlatformLayerProxy::activateOnCompositingThread): |
| |
| 2017-04-07 Zan Dobersek <zdobersek@igalia.com> |
| |
| [GCrypt] Implement AES_CBC support |
| https://bugs.webkit.org/show_bug.cgi?id=170550 |
| |
| Reviewed by Michael Catanzaro. |
| |
| Implement the CryptoAlgorithmAES_CBC::platform{Encrypt,Decrypt} |
| functionality for configurations that use libgcrypt. This is done |
| by leveraging the gcry_cipher_* APIs for the AES algorithm that's |
| deduced appropriately from the key size and the CBC cipher mode. |
| Additionally, the PKCS#7 padding is implemented for each operation, |
| as demanded by the Web Crypto specification. |
| |
| No new tests -- current ones cover this sufficiently, but are not yet |
| enabled due to missing platform-specific SUBTLE_CRYPTO implementations. |
| |
| * crypto/gcrypt/CryptoAlgorithmAES_CBCGCrypt.cpp: |
| (WebCore::gcryptEncrypt): |
| (WebCore::gcryptDecrypt): |
| (WebCore::CryptoAlgorithmAES_CBC::platformEncrypt): |
| (WebCore::CryptoAlgorithmAES_CBC::platformDecrypt): |
| |
| 2017-04-07 Zan Dobersek <zdobersek@igalia.com> |
| |
| [GCrypt] Implement raw and JWK imports and exports for EC keys |
| https://bugs.webkit.org/show_bug.cgi?id=170546 |
| |
| Reviewed by Michael Catanzaro. |
| |
| Implement import and export operations for EC keys, covering the raw |
| and JWK import/export types. |
| |
| CryptoKeyEC::platformImportRaw() builds a public-key s-expression, |
| providing the curve name and the key data, and yields the gcry_sexp_t |
| object to the new CryptoKeyEC. |
| |
| CryptoKeyEC::platformImportJWKPublic() first constructs a Vector<uint8_t> |
| object that contains the EC point in the uncompressed format. It then |
| puts that data into a newly-constructed public-key s-expression that is |
| then used to construct the new CryptoKeyEC object. |
| |
| CryptoKeyEC::platformImportJWKPrivate() constructs the EC point data just |
| the same, but it also lays out the private key field element data into |
| the private-key s-expression that's then handed off to the CryptoKeyEC |
| object. |
| |
| CryptoKeyEC::platformExportRaw() constructs a new EC operations context |
| and then uses it to retrieve the q parameter as an MPI. A Vector<uint8_t> |
| is retrieved from the MPI data through the extractMPIData() helper |
| function. |
| |
| CryptoKeyEC::platformAddFieldElements() similarly uses the EC operations |
| context to retrieve the q parameter data, which it then splits into the |
| x and y field elements and Base64 URL-encodes them into a form that can |
| be placed in a JsonWebKey. If the key is private, the d parameter is |
| retrieved in the same fashion and again Base64 URL-encoded and stored |
| in the JsonWebKey object. |
| |
| No new tests -- current ones cover this sufficiently, but are not yet |
| enabled due to other missing platform-specific SUBTLE_CRYPTO |
| implementations. |
| |
| * crypto/gcrypt/CryptoKeyECGCrypt.cpp: |
| (WebCore::uncompressedPointSizeForCurve): |
| (WebCore::uncompressedFieldElementSizeForCurve): |
| (WebCore::extractMPIData): |
| (WebCore::CryptoKeyEC::platformImportRaw): |
| (WebCore::CryptoKeyEC::platformImportJWKPublic): |
| (WebCore::CryptoKeyEC::platformImportJWKPrivate): |
| (WebCore::CryptoKeyEC::platformExportRaw): |
| (WebCore::CryptoKeyEC::platformAddFieldElements): |
| |
| 2017-04-07 Zan Dobersek <zdobersek@igalia.com> |
| |
| [GCrypt] Implement CryptoKeyRSA::generatePair() |
| https://bugs.webkit.org/show_bug.cgi?id=170350 |
| |
| Reviewed by Michael Catanzaro. |
| |
| Start implementing the libgcrypt-based platform bits of CryptoKeyRSA. |
| |
| Implement generatePair() by constructing a genkey s-expression |
| that requests a generation of an RSA key that should use a modulus |
| of the specified bit-length and the specified exponent. The exponent |
| is extracted from an uint8_t array through a helper function. The |
| modulus length value is checked to be at least 16, since libgcrypt |
| does not support generating primes of less than that length in bits. |
| |
| The returned s-expression upon request will contain the data for |
| both the public and the private key. gcry_sexp_t handles representing |
| those s-expressions are then passed to CryptoKeyRSA::create() before |
| invoking the success callback with a new CryptoKeyPair object in a |
| separate ScriptExecutionContext task. |
| |
| The CryptoKeyRSA constructor simply has the notImplemented() call |
| removed. The destructor now invokes the HandleDeleter<gcry_sexp_t> |
| object instance to destroy the object represented by the |
| m_platformKey handle. |
| |
| The methods in CryptoKeyRSA.cpp are also reordered to follow the |
| declaration order used in the header. |
| |
| No new tests -- current ones cover this sufficiently, but are not yet |
| enabled due to other missing platform-specific SUBTLE_CRYPTO |
| implementations. |
| |
| * crypto/gcrypt/CryptoKeyRSAGCrypt.cpp: |
| (WebCore::CryptoKeyRSA::CryptoKeyRSA): |
| (WebCore::CryptoKeyRSA::~CryptoKeyRSA): |
| (WebCore::exponentVectorToUInt32): |
| (WebCore::CryptoKeyRSA::generatePair): |
| (WebCore::CryptoKeyRSA::importSpki): |
| (WebCore::CryptoKeyRSA::importPkcs8): |
| (WebCore::CryptoKeyRSA::exportPkcs8): |
| (WebCore::CryptoKeyRSA::buildAlgorithm): |
| (WebCore::CryptoKeyRSA::exportData): |
| * crypto/keys/CryptoKeyRSA.h: |
| |
| 2017-04-06 Youenn Fablet <youenn@apple.com> |
| |
| [Debug] ASSERT(!throwScope.exception()) on imported/w3c/web-platform-tests/fetch/api/cors/cors-preflight-status-worker.html |
| https://bugs.webkit.org/show_bug.cgi?id=170395 |
| <rdar://problem/31394017> |
| |
| Reviewed by Mark Lam. |
| |
| * bindings/js/JSDOMPromise.cpp: |
| (WebCore::DeferredPromise::reject): Exiting early in case of scope having an exception. |
| Adding an assertion to ensure this is a worker termination exception. |
| |
| 2017-04-06 Andreas Kling <akling@apple.com> |
| |
| Inaudible background tabs should become eligible for memory kill after 8 minutes |
| https://bugs.webkit.org/show_bug.cgi?id=170574 |
| <rdar://problem/31488686> |
| |
| Reviewed by Gavin Barraclough. |
| |
| Lower the delay for potentially marking background tabs as inactive from 60 minutes to 8 minutes. |
| Letting a tab misbehave in the background for an entire hour was overly charitable. |
| |
| * page/PerformanceMonitor.cpp: |
| |
| 2017-04-06 Wenson Hsieh <wenson_hsieh@apple.com> |
| |
| Scroll offset jumps after a programmatic scroll in an overflow container with scroll snapping |
| https://bugs.webkit.org/show_bug.cgi?id=170560 |
| <rdar://problem/31484693> |
| |
| Reviewed by Tim Horton. |
| |
| Test: css3/scroll-snap/scroll-snap-programmatic-overflow-scroll.html |
| |
| Logic for maintaining the scroll snap state in ScrollController was previously removed from iOS when refactoring |
| ScrollController. This was done because scroll snapping on iOS is driven not by the ScrollController (as it is |
| on Mac) but rather by sending scroll snap offsets to the UI process and hooking into UIScrollView delegates to |
| handle retargeted scrolling. |
| |
| However, on iOS, this ScrollController state is still important for the purposes of keeping the last active |
| snap point index in sync with the UI process when the scroll offset changes outside of a user gesture (i.e. |
| programmatic scrolling). Since the UI process does not get a chance to update the active snap offset during a |
| programmatic scroll, our last active snap offset state was only being updated to the last snap position that the |
| user manually scrolled to, making programmatic scrolling jump to this offset. |
| |
| To fix this, we need to update scroll snap state on iOS within ScrollController. Also adds a new Layout test |
| that exercises programmatic scrolling in an overflow scrolling container on all platforms. |
| |
| * platform/cocoa/ScrollController.mm: |
| (WebCore::otherScrollEventAxis): |
| (WebCore::ScrollController::updateScrollSnapState): |
| (WebCore::ScrollController::updateScrollSnapPoints): |
| |
| 2017-04-05 Simon Fraser <simon.fraser@apple.com> |
| |
| Throttle requestAnimationFrame in cross-origin iframes to 30fps |
| https://bugs.webkit.org/show_bug.cgi?id=170534 |
| |
| Reviewed by Dan Bates. |
| |
| Add a throttling reason to ScriptedAnimationController which is NonInteractedCrossOriginFrame, |
| set on cross-origin iframes whose documents have never seen a user interaction. It's cleared |
| as soon as an interaction on this frame or a child frame is detected. |
| |
| Move the initialization of the LowPowerMode throttling reason to Document::requestAnimationFrame(), |
| since it's more appropriate to compute NonInteractedCrossOriginFrame here than down in ScriptedAnimationController, |
| and best to do both in the same place. |
| |
| Tests: http/tests/frame-throttling/raf-throttle-in-cross-origin-subframe.html |
| |
| * dom/Document.cpp: |
| (WebCore::Document::requestAnimationFrame): |
| (WebCore::Document::updateLastHandledUserGestureTimestamp): |
| * dom/Document.h: |
| (WebCore::Document::hasHadUserInteraction): |
| * dom/ScriptedAnimationController.cpp: |
| (WebCore::ScriptedAnimationController::ScriptedAnimationController): |
| (WebCore::throttlingReasonToString): |
| (WebCore::ScriptedAnimationController::interval): |
| * dom/ScriptedAnimationController.h: |
| * loader/FrameLoader.cpp: |
| (WebCore::shouldAskForNavigationConfirmation): |
| |
| 2017-04-05 Simon Fraser <simon.fraser@apple.com> |
| |
| Use the Accelerate framework to optimize FEColorMatrix operations |
| https://bugs.webkit.org/show_bug.cgi?id=170518 |
| |
| Reviewed by Tim Horton. |
| |
| On macOS and iOS, we can use the Accelerate framework (vImage) to do color matrix |
| math to optimize color matrix, hue rotate, saturation and luminosity to alpha filters. |
| |
| Change ImageBuffer::getUnmultipliedImageData() and getPremultipliedImageData() to |
| return the size of the returned Uint8ClampedArray in physical pixels, because we |
| need to pass that to vImage. |
| |
| * html/canvas/CanvasRenderingContext2D.cpp: |
| (WebCore::CanvasRenderingContext2D::getImageData): |
| * platform/graphics/ImageBuffer.h: |
| * platform/graphics/cairo/ImageBufferCairo.cpp: |
| (WebCore::ImageBuffer::getUnmultipliedImageData): |
| (WebCore::ImageBuffer::getPremultipliedImageData): |
| * platform/graphics/cg/ImageBufferCG.cpp: |
| (WebCore::ImageBuffer::getUnmultipliedImageData): |
| (WebCore::ImageBuffer::getPremultipliedImageData): |
| * platform/graphics/filters/FEColorMatrix.cpp: |
| (WebCore::effectApplyAccelerated): |
| (WebCore::effectType): |
| (WebCore::FEColorMatrix::platformApplySoftware): |
| * platform/graphics/filters/FEDropShadow.cpp: |
| (WebCore::FEDropShadow::platformApplySoftware): |
| * platform/graphics/win/ImageBufferDirect2D.cpp: |
| (WebCore::ImageBuffer::getUnmultipliedImageData): |
| (WebCore::ImageBuffer::getPremultipliedImageData): |
| |
| 2017-04-04 Simon Fraser <simon.fraser@apple.com> |
| |
| Do some minor FEColorMatrix code cleanup and optimization |
| https://bugs.webkit.org/show_bug.cgi?id=170474 |
| |
| Reviewed by Dean Jackson. |
| |
| Don't switch inside of a pixel processing loop; repeat the loop inside switch (filterType). |
| |
| Change matrix() and saturateAndHueRotate() to dereference the source pixels once, instead |
| of multiple times, which is faster. |
| |
| This kind of code benefits from aligning things with spaces for readability, so do so, |
| violating webkit style. |
| |
| Add some off-by-default performance logging code. |
| |
| Increases pixel processing performance from about 86ms per megapixel to 65ms per megapixel. |
| |
| * platform/graphics/filters/FEColorMatrix.cpp: |
| (WebCore::matrix): |
| (WebCore::saturateAndHueRotate): |
| (WebCore::effectType): |
| (WebCore::FEColorMatrix::platformApplySoftware): |
| |
| 2017-04-06 Ryan Haddad <ryanhaddad@apple.com> |
| |
| Unreviewed, rolling out r215041. |
| |
| The LayoutTest for this change is failing on ios-simulator. |
| |
| Reverted changeset: |
| |
| "Rendering flexbox children across columns" |
| https://bugs.webkit.org/show_bug.cgi?id=164166 |
| http://trac.webkit.org/changeset/215041 |
| |
| 2017-04-06 Ryan Haddad <ryanhaddad@apple.com> |
| |
| Unreviewed, rolling out r215046. |
| |
| This change broke internal builds. |
| |
| Reverted changeset: |
| |
| "WebRTC tests gardening" |
| https://bugs.webkit.org/show_bug.cgi?id=170508 |
| http://trac.webkit.org/changeset/215046 |
| |
| 2017-04-06 Joseph Pecoraro <pecoraro@apple.com> |
| |
| Web Inspector: Only Capture Extra Network Load Metrics when there is a Web Inspector Frontend |
| https://bugs.webkit.org/show_bug.cgi?id=170525 |
| |
| Reviewed by Youenn Fablet. |
| |
| Covered by existing tests that when Web Inspector is open we enable collecting the extra data. |
| |
| * inspector/InspectorInstrumentation.cpp: |
| (WebCore::InspectorInstrumentation::firstFrontendCreated): |
| (WebCore::InspectorInstrumentation::lastFrontendDeleted): |
| * inspector/InspectorInstrumentation.h: |
| (WebCore::InspectorInstrumentation::frontendCreated): |
| (WebCore::InspectorInstrumentation::frontendDeleted): |
| When the first frontend is created enable a new loader strategy to |
| collect extra network load metrics. When the last frontend is closed |
| disable the extra metrics. |
| |
| * loader/LoaderStrategy.h: |
| * platform/PlatformStrategies.h: |
| New load strategy to enable/disable new metrics. |
| |
| 2017-04-06 Joseph Pecoraro <pecoraro@apple.com> |
| |
| Web Inspector: Show all headers in the Request Headers section of the Resource details sidebar |
| https://bugs.webkit.org/show_bug.cgi?id=16531 |
| <rdar://problem/5712895> |
| |
| Reviewed by Timothy Hatcher. |
| |
| Test: http/tests/inspector/network/resource-request-headers.html |
| |
| * loader/ResourceTiming.cpp: |
| (WebCore::ResourceTiming::ResourceTiming): |
| Eliminate unnecessary data from the NetworkLoadTiming object |
| when it is used for ResourceTiming. This clears up some memory |
| that will otherwise never be used. |
| |
| * platform/network/NetworkLoadMetrics.h: |
| (WebCore::NetworkLoadMetrics::isolatedCopy): |
| (WebCore::NetworkLoadMetrics::reset): |
| (WebCore::NetworkLoadMetrics::clearNonTimingData): |
| (WebCore::NetworkLoadMetrics::operator==): |
| (WebCore::NetworkLoadMetrics::encode): |
| (WebCore::NetworkLoadMetrics::decode): |
| Include an optional HTTPHeaderMap for a refined list of |
| request headers for this network load. |
| |
| * inspector/InspectorNetworkAgent.cpp: |
| (WebCore::InspectorNetworkAgent::buildObjectForMetrics): |
| Include request headers with other optional metrics data |
| when the load is completed. |
| |
| 2017-04-06 Tim Horton <timothy_horton@apple.com> |
| |
| Follow up to r209304, remove line numbers from one more StyleRule construction |
| https://bugs.webkit.org/show_bug.cgi?id=170564 |
| |
| Reviewed by Simon Fraser. |
| |
| * css/StyleRule.cpp: |
| (WebCore::StyleRuleViewport::StyleRuleViewport): |
| This one was missed in r209304. |
| |
| 2017-04-06 Timothy Horton <timothy_horton@apple.com> |
| |
| Remove an unused member and constructor parameter from CSSPropertyParser |
| https://bugs.webkit.org/show_bug.cgi?id=170562 |
| |
| Reviewed by Simon Fraser. |
| |
| * css/parser/CSSParser.cpp: |
| (WebCore::CSSParser::parseSingleValue): |
| (WebCore::CSSParser::parseValueWithVariableReferences): |
| * css/parser/CSSParserImpl.cpp: |
| (WebCore::CSSParserImpl::consumeDeclarationValue): |
| * css/parser/CSSPropertyParser.cpp: |
| (WebCore::CSSPropertyParser::CSSPropertyParser): |
| (WebCore::CSSPropertyParser::parseValue): |
| (WebCore::CSSPropertyParser::parseSingleValue): |
| * css/parser/CSSPropertyParser.h: |
| It is possible to get Clang to complain about the unused member, though |
| I'm not sure why it doesn't in the build today. |
| |
| 2017-04-06 Zalan Bujtas <zalan@apple.com> |
| |
| Simple line layout: Hittest always returns the first renderer in the block. |
| https://bugs.webkit.org/show_bug.cgi?id=170520 |
| <rdar://problem/30979175> |
| |
| Reviewed by Antti Koivisto. |
| |
| This is incorrect now with <br> support (multiple renderers within the same block flow). |
| |
| Test: fast/dom/Document/CaretRangeFromPoint/simple-line-layout-hittest-with-caret-range-from-point.html |
| |
| * rendering/RenderText.cpp: |
| (WebCore::RenderText::positionForPoint): Related fix. We don't yet support positionForPoint with multiple renderes. |
| * rendering/SimpleLineLayoutFlowContents.h: |
| (WebCore::SimpleLineLayout::FlowContents::segmentForRun): Empty runs are all valid. |
| * rendering/SimpleLineLayoutFunctions.cpp: |
| (WebCore::SimpleLineLayout::hitTestFlow): |
| (WebCore::SimpleLineLayout::collectFlowOverflow): |
| * rendering/SimpleLineLayoutResolver.cpp: |
| (WebCore::SimpleLineLayout::LineResolver::Iterator::operator*): This should eventually return a list of renderes. |
| * rendering/SimpleLineLayoutResolver.h: |
| (WebCore::SimpleLineLayout::RunResolver::flowContents): |
| |
| 2017-04-06 Jon Davis <jond@apple.com> |
| |
| Updates feature status for recently shipped features |
| https://bugs.webkit.org/show_bug.cgi?id=170359 |
| |
| Reviewed by Brian Burg. |
| |
| Added missing Gamepad entry. |
| Changed "Done" status to "Supported". |
| Also changed status from "In Development" to "Supported" for: |
| |
| - CSS Grid Layout Level 1 |
| - CSS Inline Layout Module Level 3 |
| - CSS Scroll Snap Points Module Level 1 |
| - CSS Color Level 4 |
| - Fetch API |
| - Indexed Database 2.0 |
| - Media Capture and Streams |
| - Pointer Lock |
| - Preload |
| - Input Events |
| |
| * features.json: |
| |
| 2017-03-31 Jiewen Tan <jiewen_tan@apple.com> |
| |
| [WebCrypto] Add support for AES-CTR |
| https://bugs.webkit.org/show_bug.cgi?id=169761 |
| <rdar://problem/31331321> |
| |
| Reviewed by Brent Fulgham. |
| |
| This patch adds support for AES-CTR. Operations of AES-CTR include: encrypt, decrypt, generateKey, |
| importKey, exportKey, wrapKey, and unwrapKey. This implementation follows the latest WebCryptoAPI |
| spec: https://www.w3.org/TR/WebCryptoAPI/#aes-ctr. |
| |
| Tests: crypto/subtle/aes-ctr-encrypt-malformed-parameters.html |
| crypto/subtle/aes-ctr-encrypt-overflow.html |
| crypto/subtle/aes-ctr-generate-export-key-jwk-length-128.html |
| crypto/subtle/aes-ctr-generate-export-key-jwk-length-192.html |
| crypto/subtle/aes-ctr-generate-export-key-jwk-length-256.html |
| crypto/subtle/aes-ctr-generate-export-raw-key.html |
| crypto/subtle/aes-ctr-generate-key-encrypt-decrypt.html |
| crypto/subtle/aes-ctr-generate-key.html |
| crypto/subtle/aes-ctr-import-jwk-key-length-128.html |
| crypto/subtle/aes-ctr-import-jwk-key-length-192.html |
| crypto/subtle/aes-ctr-import-jwk-key-length-256.html |
| crypto/subtle/aes-ctr-import-key-decrypt.html |
| crypto/subtle/aes-ctr-import-key-encrypt.html |
| crypto/subtle/aes-ctr-import-key-unwrap-jwk-key.html |
| crypto/subtle/aes-ctr-import-key-unwrap-raw-key.html |
| crypto/subtle/aes-ctr-import-key-wrap-jwk-key.html |
| crypto/subtle/aes-ctr-import-key-wrap-raw-key.html |
| crypto/subtle/aes-ctr-import-raw-key.html |
| crypto/workers/subtle/aes-ctr-import-key-decrypt.html |
| crypto/workers/subtle/aes-ctr-import-key-encrypt.html |
| crypto/workers/subtle/aes-ctr-import-key-unwrap-key.html |
| crypto/workers/subtle/aes-ctr-import-key-wrap-key.html |
| |
| * CMakeLists.txt: |
| * DerivedSources.make: |
| * PlatformGTK.cmake: |
| * PlatformMac.cmake: |
| * WebCore.xcodeproj/project.pbxproj: |
| * bindings/js/JSSubtleCryptoCustom.cpp: |
| (WebCore::normalizeCryptoAlgorithmParameters): |
| * crypto/CryptoAlgorithmParameters.h: |
| * crypto/algorithms/CryptoAlgorithmAES_CTR.cpp: Added. |
| (WebCore::usagesAreInvalidForCryptoAlgorithmAES_CTR): |
| (WebCore::parametersAreValid): |
| (WebCore::CryptoAlgorithmAES_CTR::create): |
| (WebCore::CryptoAlgorithmAES_CTR::identifier): |
| (WebCore::CryptoAlgorithmAES_CTR::encrypt): |
| (WebCore::CryptoAlgorithmAES_CTR::decrypt): |
| (WebCore::CryptoAlgorithmAES_CTR::generateKey): |
| (WebCore::CryptoAlgorithmAES_CTR::importKey): |
| (WebCore::CryptoAlgorithmAES_CTR::exportKey): |
| (WebCore::CryptoAlgorithmAES_CTR::getKeyLength): |
| * crypto/algorithms/CryptoAlgorithmAES_CTR.h: Added. |
| * crypto/gcrypt/CryptoAlgorithmAES_CTRGCrypt.cpp: Added. |
| (WebCore::CryptoAlgorithmAES_CTR::platformEncrypt): |
| (WebCore::CryptoAlgorithmAES_CTR::platformDecrypt): |
| * crypto/mac/CryptoAlgorithmAES_CTRMac.cpp: Added. |
| (WebCore::bigIntegerToSize): |
| (WebCore::transformAES_CTR): |
| (WebCore::CryptoAlgorithmAES_CTR::platformEncrypt): |
| (WebCore::CryptoAlgorithmAES_CTR::platformDecrypt): |
| * crypto/mac/CryptoAlgorithmRegistryMac.cpp: |
| (WebCore::CryptoAlgorithmRegistry::platformRegisterAlgorithms): |
| * crypto/parameters/AesCtrParams.idl: Added. |
| * crypto/parameters/CryptoAlgorithmAesCtrParams.h: Added. |
| |
| 2017-04-06 Youenn Fablet <youenn@apple.com> |
| |
| WebRTC tests gardening |
| https://bugs.webkit.org/show_bug.cgi?id=170508 |
| |
| Reviewed by Eric Carlson. |
| |
| * Configurations/FeatureDefines.xcconfig: Changing webrtc enabling for ios. |
| |
| 2017-04-06 Andreas Kling <akling@apple.com> |
| |
| Stop forcing CA commit when memory pressure changes. |
| https://bugs.webkit.org/show_bug.cgi?id=170522 |
| <rdar://problem/31460236> |
| |
| Reviewed by Antti Koivisto. |
| |
| Don't force a CA commit when reaching critical memory pressure. We're already doing a ton |
| of work in response to the pressure, and this was really a hack to try to react quickly on |
| 512 MB devices which we don't support anymore. |
| |
| * page/MemoryRelease.cpp: |
| (WebCore::releaseCriticalMemory): |
| |
| 2017-04-06 Romain Bellessort <romain.bellessort@crf.canon.fr> |
| |
| [Readable Streams API] Implement ReadableStreamBYOBRequest respondWithNewView() |
| https://bugs.webkit.org/show_bug.cgi?id=170339 |
| |
| Reviewed by Youenn Fablet. |
| |
| Implemented ReadableStreamBYOBRequest respondWithNewView(). |
| |
| Added new tests to check respondWithNewView() behaviour. |
| |
| * Modules/streams/ReadableByteStreamInternals.js: |
| (readableByteStreamControllerRespondWithNewView): Added. |
| * Modules/streams/ReadableStreamBYOBRequest.js: |
| (respondWithNewView): Updated. |
| |
| 2017-04-06 Eric Carlson <eric.carlson@apple.com> |
| |
| [MediaStream] Host application should be able to mute and unmute media streams |
| https://bugs.webkit.org/show_bug.cgi?id=170519 |
| <rdar://problem/31174326> |
| |
| Unreviewed, fix crash introduced in r214980. |
| |
| * Modules/mediastream/MediaStream.cpp: |
| (WebCore::MediaStream::MediaStream): NULL-check page. |
| |
| 2017-04-06 Dave Hyatt <hyatt@apple.com> |
| |
| Rendering flexbox children across columns |
| https://bugs.webkit.org/show_bug.cgi?id=164166 |
| <rdar://problem/29055587> |
| |
| Reviewed by Zalan Bujtas. |
| |
| Added fast/multicol/flexbox-rows.html. |
| |
| * rendering/RenderBlockFlow.cpp: |
| (WebCore::RenderBlockFlow::adjustForUnsplittableChild): |
| Treat block-level flexboxes that occur inside block flows the same as replaced |
| and unsplittable elements and push them to the next page if they don't fit. We don't |
| update the minimum page height though, since the flexbox is not really unsplittable. |
| |
| 2017-04-05 Simon Fraser <simon.fraser@apple.com> |
| |
| Set lastHandledUserGestureTimestamp on all ancestor documents, not just the top document |
| https://bugs.webkit.org/show_bug.cgi?id=170479 |
| |
| Reviewed by Sam Weinig. |
| |
| When interacting with a subframe document, set lastHandledUserGestureTimestamp on all ancestor |
| documents up to the root. |
| |
| This will be used in future for requestAnimationFrame throttling. |
| |
| Test: fast/frames/user-gesture-timestamp-propagation.html |
| |
| * dom/Document.cpp: |
| (WebCore::Document::updateLastHandledUserGestureTimestamp): |
| * dom/Document.h: |
| * dom/UserGestureIndicator.cpp: |
| (WebCore::UserGestureIndicator::UserGestureIndicator): |
| * testing/Internals.cpp: |
| (WebCore::Internals::lastHandledUserGestureTimestamp): |
| * testing/Internals.h: |
| * testing/Internals.idl: |
| |
| 2017-04-05 Eric Carlson <eric.carlson@apple.com> |
| |
| [MediaStream] Host application should be able to mute and unmute media streams |
| https://bugs.webkit.org/show_bug.cgi?id=170519 |
| <rdar://problem/31174326> |
| |
| Unreviewed, address review comments missed in the initial checkin. |
| |
| * Modules/mediastream/MediaStream.cpp: |
| (WebCore::MediaStream::MediaStream): Mute the private stream if the page doesn't allow |
| capture. |
| (WebCore::MediaStream::pageMutedStateDidChange): setMuted -> setCaptureTracksMuted. |
| |
| * platform/mediastream/MediaStreamPrivate.cpp: |
| (WebCore::MediaStreamPrivate::addTrack): Don't track muted state, the capture source already does. |
| (WebCore::MediaStreamPrivate::startProducingData): Ditto. |
| (WebCore::MediaStreamPrivate::setCaptureTracksMuted): Renamed from setMuted. |
| (WebCore::MediaStreamPrivate::setMuted): Deleted. |
| * platform/mediastream/MediaStreamPrivate.h: |
| |
| 2017-04-05 Eric Carlson <eric.carlson@apple.com> |
| |
| [MediaStream] Host application should be able to mute and unmute media streams |
| https://bugs.webkit.org/show_bug.cgi?id=170519 |
| <rdar://problem/31174326> |
| |
| Reviewed by Youenn Fablet. |
| |
| No new tests, fast/mediastream/MediaStream-page-muted.html was updated. |
| |
| * Modules/mediastream/MediaStream.cpp: |
| (WebCore::MediaStream::~MediaStream): Fix a typo. |
| (WebCore::MediaStream::pageMutedStateDidChange): Don't store muted state, let the private |
| stream store it. |
| (WebCore::MediaStream::mediaState): Deal with new muted state flags. |
| * Modules/mediastream/MediaStream.h: |
| |
| * dom/Document.cpp: |
| (WebCore::Document::prepareForDestruction): Clear media state before the frame is cleared. |
| |
| * page/MediaProducer.h: Add muted flags. |
| |
| * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm: |
| (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::checkSelectedVideoTrack): The display layer |
| should not be visible when the video track is muted. |
| |
| * platform/mediastream/MediaStreamPrivate.cpp: |
| (WebCore::MediaStreamPrivate::addTrack): Mute the new track if necessary. |
| (WebCore::MediaStreamPrivate::startProducingData): Do nothing when muted. |
| (WebCore::MediaStreamPrivate::setExternallyMuted): New, mute/unmute tracks. |
| * platform/mediastream/MediaStreamPrivate.h: |
| |
| * platform/mediastream/RealtimeMediaSource.cpp: |
| (WebCore::RealtimeMediaSource::setMuted): Start/stop producing data. |
| |
| * testing/Internals.cpp: |
| (WebCore::Internals::pageMediaState): Support new media stream muted flags. |
| |
| 2017-04-05 Andreas Kling <akling@apple.com> |
| |
| Make inactive web processes behave as though under memory pressure. |
| https://bugs.webkit.org/show_bug.cgi?id=170042 |
| <rdar://problem/31038445> |
| |
| Reviewed by Antti Koivisto. |
| |
| Prevent PerformanceMonitor from marking the process as inactive at startup. |
| This fixes the API test failure that caused this patch to get rolled out. |
| |
| * page/PerformanceMonitor.h: |
| |
| 2017-04-05 Youenn Fablet <youenn@apple.com> |
| |
| Switch to kCVPixelFormatType_420YpCbCr8BiPlanarFullRange for Mac video capture format |
| https://bugs.webkit.org/show_bug.cgi?id=170509 |
| |
| Reviewed by Eric Carlson. |
| |
| Covered by existing tests. |
| |
| * platform/mediastream/mac/AVVideoCaptureSource.mm: |
| |
| 2017-04-05 Javier Fernandez <jfernandez@igalia.com> |
| |
| [css-align] Implement the place-items shorthand |
| https://bugs.webkit.org/show_bug.cgi?id=168847 |
| |
| Reviewed by David Hyatt. |
| |
| The CSS Box Alignment specification defines a new shorthand to set the |
| Content Alignment properties (align-items and justify-items) at the |
| same time. |
| |
| This patch provides the implementation of the CSS parsing logic and the |
| required regression tests. For the time being, as it happens with the |
| rest of the new alignment properties, the new parsing logic is |
| implemented behind the CSS Grid Layout runtime flag. |
| |
| Test: css3/parse-place-items.html |
| |
| * css/CSSComputedStyleDeclaration.cpp: |
| (WebCore::ComputedStyleExtractor::propertyValue): |
| * css/CSSProperties.json: |
| * css/StyleProperties.cpp: |
| (WebCore::StyleProperties::getPropertyValue): |
| (WebCore::StyleProperties::getAlignmentShorthandValue): |
| * css/StyleProperties.h: |
| * css/parser/CSSPropertyParser.cpp: |
| (WebCore::isAutoOrNormalOrStretch): |
| (WebCore::consumeSelfPositionOverflowPosition): |
| (WebCore::consumeSimplifiedItemPosition): |
| (WebCore::CSSPropertyParser::consumePlaceItemsShorthand): |
| * css/parser/CSSPropertyParser.h: |
| |
| 2017-04-05 Ryan Haddad <ryanhaddad@apple.com> |
| |
| Unreviewed, rolling out r214932. |
| |
| This change broke an internal build. |
| |
| Reverted changeset: |
| |
| "[ios-simulator] API test WebKit2.DataDetectionReferenceDate |
| timing out" |
| https://bugs.webkit.org/show_bug.cgi?id=161967 |
| http://trac.webkit.org/changeset/214932 |
| |
| 2017-04-05 Ryan Haddad <ryanhaddad@apple.com> |
| |
| Unreviewed, rolling out r214962. |
| |
| Roll r214937 back in because it wasn't at fault for the build |
| breakage. |
| |
| Reverted changeset: |
| |
| "Unreviewed, rolling out r214937." |
| https://bugs.webkit.org/show_bug.cgi?id=170365 |
| http://trac.webkit.org/changeset/214962 |
| |
| 2017-04-05 Ryan Haddad <ryanhaddad@apple.com> |
| |
| Unreviewed, rolling out r214937. |
| |
| This change broke an internal build. |
| |
| Reverted changeset: |
| |
| "REGRESSION (r202472): Data Detection overwrites existing |
| links in detected ranges" |
| https://bugs.webkit.org/show_bug.cgi?id=170365 |
| http://trac.webkit.org/changeset/214937 |
| |
| 2017-04-05 Carlos Alberto Lopez Perez <clopez@igalia.com> |
| |
| [WebRTC][OpenWebRTC] Add support for SDP BUNDLE ("a:group:BUNDLE" and "a=bundle-only" lines) |
| https://bugs.webkit.org/show_bug.cgi?id=170157 |
| |
| Reviewed by Alejandro G. Castro. |
| |
| This implements support on the SDPProcessor for generating an "a=group:BUNDLE" |
| attribute with the MID identifiers specified in the bundle group in the most |
| recent answer. |
| It also implements support for generating "a=bundle-only" attributes on the |
| "m=" sections of the SDP according to the bundlePolicy defined. |
| |
| Test: fast/mediastream/RTCPeerConnection-inspect-offer-bundlePolicy-bundle-only.html |
| |
| * Modules/mediastream/MediaEndpointPeerConnection.cpp: |
| (WebCore::MediaEndpointPeerConnection::createOfferTask): |
| (WebCore::MediaEndpointPeerConnection::createAnswerTask): |
| * Modules/mediastream/SDPProcessor.cpp: |
| (WebCore::getBundlePolicyName): |
| (WebCore::configurationToJSON): |
| * Modules/mediastream/sdp.js: |
| (SDP.generate): |
| * platform/mediastream/MediaEndpointSessionConfiguration.h: |
| (WebCore::MediaEndpointSessionConfiguration::bundlePolicy): |
| (WebCore::MediaEndpointSessionConfiguration::setBundlePolicy): |
| (WebCore::MediaEndpointSessionConfiguration::clone): |
| |
| 2017-04-05 Jer Noble <jer.noble@apple.com> |
| |
| [MSE] Seeks to currentTime=0 will fail if currentTime is already 0. |
| https://bugs.webkit.org/show_bug.cgi?id=170510 |
| <rdar://problem/30988403> |
| |
| Reviewed by Eric Carlson. |
| |
| Test: media/media-source/media-source-unnecessary-seek-seeked.html |
| |
| The AVSampleBufferRenderSynchronizer won't fire a time jumped notification if no seek is actully |
| necessary. So short circuit the seek logic if the seek time is identical to the current synchronizer |
| time. |
| |
| * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm: |
| (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::seekInternal): |
| |
| 2017-04-05 Chris Dumez <cdumez@apple.com> |
| |
| <input type="range"> changing to disabled while active breaks all pointer events |
| https://bugs.webkit.org/show_bug.cgi?id=170447 |
| <rdar://problem/31442875> |
| |
| Reviewed by Geoffrey Garen. |
| |
| When a range's slider is being moved, we set SliderThumbElement's m_inDragMode flag |
| to true and mark the range elements as the CapturingMouseEventsElement. When we get |
| the mouseUp event, we are supposed to exit drag mode. However, when the range element |
| gets disabled while dragging, we do not get the mouseUp event and we need to make |
| sure we exit dragging mode anyway. r112547 tried to fix this by calling stopDragging() |
| in SliderThumbElement::defaultEventHandler() when the input element is disabled. |
| While this often works, this is fragile and we sometimes fail to exit dragging mode |
| when we should. |
| |
| This patch addressed the issue by calling stopDragging() in |
| SliderThumbElement::disabledAttributeChanged() instead. This is much safer as we |
| guarantee will exit dragging mode whenever the range element gets disabled, even |
| if SliderThumbElement::defaultEventHandler() does not get called after that. |
| |
| Test: fast/forms/range/disabled-while-dragging.html |
| |
| * html/RangeInputType.cpp: |
| (WebCore::RangeInputType::disabledAttributeChanged): |
| * html/RangeInputType.h: |
| * html/shadow/SliderThumbElement.cpp: |
| (WebCore::SliderThumbElement::defaultEventHandler): |
| (WebCore::SliderThumbElement::disabledAttributeChanged): |
| * html/shadow/SliderThumbElement.h: |
| |
| 2017-04-05 Eric Carlson <eric.carlson@apple.com> |
| |
| [MediaStream] Video doesn't render in fullscreen on iOS |
| https://bugs.webkit.org/show_bug.cgi?id=170404 |
| |
| Reviewed by Youenn Fablet. |
| |
| No new tests, filed https://bugs.webkit.org/show_bug.cgi?id=170512. |
| |
| * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.h: |
| * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm: |
| (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::MediaPlayerPrivateMediaStreamAVFObjC): Include |
| video fullscreen manager on iOS too. |
| (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::videoTransformationMatrix): Add paramater |
| to force transform recalculation. |
| (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::enqueueVideoSample): Restructure code since |
| the display layer resize happens elsewhere. |
| (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::ensureLayers): Include video fullscreen |
| manager on iOS too. |
| (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::destroyLayers): Ditto. |
| (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::platformLayer): Ditto. |
| (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::setVideoFullscreenLayer): Ditto. |
| (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::backgroundLayerBoundsChanged): Change the |
| display layer size and position immediately instead of waiting for the next sample buffer |
| so the display is correct when fullscreen mode changes when paused. |
| |
| 2017-04-05 Youenn Fablet <youenn@apple.com> |
| |
| Deprecate and remove URL.createObjectURL(mediastream) |
| https://bugs.webkit.org/show_bug.cgi?id=167518 |
| <rdar://problem/31149607> |
| |
| Reviewed by Eric Carlson. |
| |
| Covered by updated tests. |
| |
| * CMakeLists.txt: |
| * DerivedSources.cpp: |
| * DerivedSources.make: |
| * Modules/mediastream/DOMURLMediaStream.cpp: Removed. |
| * Modules/mediastream/DOMURLMediaStream.h: Removed. |
| * Modules/mediastream/DOMURLMediaStream.idl: Removed. |
| * WebCore.xcodeproj/project.pbxproj: |
| * html/DOMURL.idl: |
| |
| 2017-04-05 Alejandro G. Castro <alex@igalia.com> |
| |
| [Webrtc] Mock realtime sources factories should be static after r213941 |
| https://bugs.webkit.org/show_bug.cgi?id=170282 |
| |
| Reviewed by Alex Christensen. |
| |
| If we don't make the variables static we would be returning a |
| local variable. |
| |
| * platform/mock/MockRealtimeAudioSource.cpp: |
| (WebCore::MockRealtimeAudioSource::factory): |
| * platform/mock/MockRealtimeVideoSource.cpp: |
| (WebCore::MockRealtimeVideoSource::factory): |
| |
| 2017-04-05 Alex Christensen <achristensen@webkit.org> |
| |
| Fix CMake build. |
| |
| * platform/graphics/avfoundation/objc/MediaSampleAVFObjC.mm: |
| Some JavaScript inline functions were not being accessed from this file with different enable flags. |
| * platform/spi/cf/CFNetworkSPI.h: |
| * platform/spi/cocoa/NSURLConnectionSPI.h: |
| Moved NSURLSession-specific SPI from NSURLConnectionSPI.h to CFNetworkSPI.h. |
| |
| 2017-04-05 Chris Dumez <cdumez@apple.com> |
| |
| _blank / _self / _parent / _top browsing context names should be case-insensitive |
| https://bugs.webkit.org/show_bug.cgi?id=169747 |
| |
| Reviewed by Alex Christensen. |
| |
| _blank / _self / _parent / _top browsing context names should be case-insensitive |
| as per the HTML specification: |
| - https://html.spec.whatwg.org/#browsing-context-names |
| |
| This aligns our behavior with Firefox as well. See discussion at: |
| - https://github.com/whatwg/html/issues/2443 |
| |
| Tests: imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/browsing-context-_blank.html |
| imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/browsing-context-choose-parent-001.html |
| imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/browsing-context-choose-parent-002.html |
| imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/browsing-context-choose-parent-003.html |
| imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/browsing-context-choose-parent-004.html |
| |
| * loader/FrameLoader.cpp: |
| (WebCore::FrameLoader::continueLoadAfterNewWindowPolicy): |
| (WebCore::createWindow): |
| * page/DOMWindow.cpp: |
| (WebCore::DOMWindow::open): |
| * page/FrameTree.cpp: |
| (WebCore::FrameTree::uniqueChildName): |
| (WebCore::FrameTree::find): |
| |
| 2017-04-05 Miguel Gomez <magomez@igalia.com> |
| |
| [GTK+] PNG animations that should run once are not played at all |
| https://bugs.webkit.org/show_bug.cgi?id=170499 |
| |
| Reviewed by Carlos Garcia Campos. |
| |
| The repetition count reported bu the PNGImageDecoder is wrong. It's returning m_playCount - 1, which |
| means 0 for the animations that need to be played once. Change it to return an appropriate value. |
| |
| Covered by existent tests. |
| |
| * platform/image-decoders/png/PNGImageDecoder.cpp: |
| (WebCore::PNGImageDecoder::repetitionCount): |
| * platform/image-decoders/png/PNGImageDecoder.h: |
| |
| 2017-04-05 Andy Estes <aestes@apple.com> |
| |
| REGRESSION (r202472): Data Detection overwrites existing links in detected ranges |
| https://bugs.webkit.org/show_bug.cgi?id=170365 |
| <rdar://problem/29205721> |
| |
| Reviewed by Tim Horton. |
| |
| r202472 changed the node traversal in searchForLinkRemovingExistingDDLinks() to only |
| consider nodes that are descendants of startNode, but we need to traverse all nodes between |
| startNode and endNode to find existing non-DD links. |
| |
| As a result, we'd add a Data Detector link to the following snippet and make the original |
| links un-clickable: |
| |
| <a href='#'>tomorrow</a> <a href='#'>night</a> |
| |
| Fix this by not specifying a stayWithin node when calling NodeTraversal::next(). The loop |
| will terminate when we reach endNode. |
| |
| Updated WebKit2.DataDetectionReferenceDate API test. |
| |
| * editing/cocoa/DataDetection.mm: |
| (WebCore::searchForLinkRemovingExistingDDLinks): |
| |
| 2017-04-04 Carlos Garcia Campos <cgarcia@igalia.com> |
| |
| Move WebErrors from WebProcess to Shared and get rid of ErrorsGtk in WebCore |
| https://bugs.webkit.org/show_bug.cgi?id=156974 |
| |
| Reviewed by Sam Weinig. |
| |
| Remove ErrorsGtk. |
| |
| * PlatformGTK.cmake: |
| * platform/gtk/ErrorsGtk.cpp: Removed. |
| * platform/gtk/ErrorsGtk.h: Removed. |
| |
| 2017-04-05 Andy Estes <aestes@apple.com> |
| |
| [ios-simulator] API test WebKit2.DataDetectionReferenceDate timing out |
| https://bugs.webkit.org/show_bug.cgi?id=161967 |
| |
| Reviewed by Alexey Proskuryakov. |
| |
| DataDetectorsCoreSPI.h defined DDQueryOffset as a struct of two CFIndexes, which is 16 bytes |
| on LP64, but the struct is actually defined as two CFIndex-typed 32-bit bitfields, which is |
| 8 bytes on LP64. This breaks the ABI on Public SDK builds when calling functions that take |
| or return DDQueryOffsets. |
| |
| * platform/spi/cocoa/DataDetectorsCoreSPI.h: Updated the DDQueryOffset definition for |
| Public SDK builds, and added a static_assert to detect future size changes at compile time. |
| |
| 2017-04-04 Jer Noble <jer.noble@apple.com> |
| |
| Move AVSampleBufferDisplayLayer declarations into AVFoundationSPI.h |
| https://bugs.webkit.org/show_bug.cgi?id=170471 |
| |
| Reviewed by Eric Carlson. |
| |
| Move the declaration of AVSampleBufferDisplayLayer (and related classes) into AVFoundationSPI. |
| |
| * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm: |
| * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm: |
| * platform/spi/mac/AVFoundationSPI.h: |
| |
| 2017-04-04 Youenn Fablet <youenn@apple.com> |
| |
| Canvas is tainted when painting a video with MediaStreamTrack |
| https://bugs.webkit.org/show_bug.cgi?id=170486 |
| |
| Reviewed by Eric Carlson. |
| |
| Test: http/tests/media/media-stream/getusermedia-with-canvas.html |
| |
| Adding the notion of isolated source so that we can later on implement WebRTC isolated tracks. |
| For now, canvas will not be tainted if painted from a MediaStreamTrack. |
| |
| * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.h: |
| * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm: |
| (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::didPassCORSAccessCheck): |
| * platform/mediastream/MediaStreamTrackPrivate.h: |
| (WebCore::MediaStreamTrackPrivate::isIsolated): |
| * platform/mediastream/RealtimeMediaSource.h: |
| |
| 2017-04-04 Commit Queue <commit-queue@webkit.org> |
| |
| Unreviewed, rolling out r214894, r214895, r214907, r214912, |
| and r214918. |
| https://bugs.webkit.org/show_bug.cgi?id=170491 |
| |
| Caused build failures on Mac (Requested by rniwa on #webkit). |
| |
| Reverted changesets: |
| |
| "Build fix." |
| http://trac.webkit.org/changeset/214894 |
| |
| "Rolling back the build fix, as it broke other builds." |
| http://trac.webkit.org/changeset/214895 |
| |
| "Move AVSampleBufferDisplayLayer declarations into |
| AVFoundationSPI.h" |
| https://bugs.webkit.org/show_bug.cgi?id=170471 |
| http://trac.webkit.org/changeset/214907 |
| |
| "Unreviewed build fix: fix compilation error on Sierra." |
| http://trac.webkit.org/changeset/214912 |
| |
| "More build fixing." |
| http://trac.webkit.org/changeset/214918 |
| |
| 2017-04-04 Youenn Fablet <youenn@apple.com> |
| |
| [Mac] Add back web audio support for getUserMedia MediaStreamTrack |
| https://bugs.webkit.org/show_bug.cgi?id=170482 |
| |
| Reviewed by Eric Carlson. |
| |
| ´Covered by reenabled test. |
| |
| Exporting method and class used in WebKit2. |
| |
| * WebCore.xcodeproj/project.pbxproj: |
| * platform/audio/mac/CAAudioStreamDescription.h: |
| * platform/mediastream/mac/WebAudioSourceProviderAVFObjC.h: |
| |
| 2017-04-04 Alexey Proskuryakov <ap@apple.com> |
| |
| More build fixing. |
| |
| * platform/spi/mac/AVFoundationSPI.h: |
| |
| 2017-04-04 Simon Fraser <simon.fraser@apple.com> |
| |
| Do some minor FEColorMatrix code cleanup and optimization |
| https://bugs.webkit.org/show_bug.cgi?id=170474 |
| |
| Reviewed by Dean Jackson. |
| |
| Don't switch inside of a pixel processing loop; repeat the loop inside switch (filterType). |
| |
| Change matrix() and saturateAndHueRotate() to dereference the source pixels once, instead |
| of multiple times, which is faster. |
| |
| This kind of code benefits from aligning things with spaces for readability, so do so, |
| violating webkit style. |
| |
| Add some off-by-default performance logging code. |
| |
| Increases pixel processing performance from about 86ms per megapixel to 65ms per megapixel. |
| |
| * platform/graphics/filters/FEColorMatrix.cpp: |
| (WebCore::matrix): |
| (WebCore::saturateAndHueRotate): |
| (WebCore::effectType): |
| (WebCore::FEColorMatrix::platformApplySoftware): |
| |
| 2017-04-04 Brent Fulgham <bfulgham@apple.com> |
| |
| Do not assert when CharacterData representing an Attr fires events |
| https://bugs.webkit.org/show_bug.cgi?id=170454 |
| <rdar://problem/30979320> |
| |
| Reviewed by Ryosuke Niwa. |
| |
| Make the NoEventDispatchAssertion in CharacterData::notifyParentAfterChange conditional |
| since Attr elements should be allowed to fire events. |
| |
| Tests: fast/dom/no-assert-for-malformed-js-url-attribute.html |
| |
| * dom/CharacterData.cpp: |
| (WebCore::CharacterData::notifyParentAfterChange): |
| |
| 2017-04-04 Youenn Fablet <youenn@apple.com> |
| |
| LayoutTest webrtc/libwebrtc/descriptionGetters.html is a flaky failure |
| https://bugs.webkit.org/show_bug.cgi?id=169481 |
| |
| Reviewed by Eric Carlson. |
| |
| No need to enumerate all network interfaces in most layout tests. |
| Adding an Internals API for that in case we want to use TCP localhost candidates. |
| |
| * testing/Internals.cpp: |
| (WebCore::Internals::Internals): |
| (WebCore::Internals::setEnumeratingAllNetworkInterfacesEnabled): |
| * testing/Internals.h: |
| * testing/Internals.idl: |
| |
| |
| 2017-04-04 Jer Noble <jer.noble@apple.com> |
| |
| Unreviewed build fix: fix compilation error on Sierra. |
| |
| * platform/spi/mac/AVFoundationSPI.h: |
| |
| 2017-04-04 Jer Noble <jer.noble@apple.com> |
| |
| Move AVSampleBufferDisplayLayer declarations into AVFoundationSPI.h |
| https://bugs.webkit.org/show_bug.cgi?id=170471 |
| |
| Reviewed by Eric Carlson. |
| |
| Move the declaration of AVSampleBufferDisplayLayer (and related classes) into AVFoundationSPI. |
| |
| * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm: |
| (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::addDisplayLayer): Deleted. |
| (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::removeDisplayLayer): Deleted. |
| * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm: |
| * platform/spi/mac/AVFoundationSPI.h: |
| |
| 2017-04-04 Saam Barati <sbarati@apple.com> |
| |
| WebAssembly: JSWebAssemblyCallee should not be a JSCell |
| https://bugs.webkit.org/show_bug.cgi?id=170135 |
| |
| Reviewed by Michael Saboff. |
| |
| * bindings/js/JSDOMWindowBase.cpp: |
| (WebCore::callerDOMWindow): |
| |
| 2017-04-04 Simon Fraser <simon.fraser@apple.com> |
| |
| Change Document's lastHandledUserGestureTimestamp to be a MonotonicTime |
| https://bugs.webkit.org/show_bug.cgi?id=170468 |
| |
| Reviewed by Zalan Bujtas. |
| |
| Change the double to MonotonicTime. No behavior change. |
| |
| * dom/Document.cpp: |
| (WebCore::Document::updateLastHandledUserGestureTimestamp): |
| * dom/Document.h: |
| (WebCore::Document::lastHandledUserGestureTimestamp): |
| * html/HTMLPlugInImageElement.cpp: |
| (WebCore::documentHadRecentUserGesture): |
| * loader/FrameLoader.cpp: |
| (WebCore::shouldAskForNavigationConfirmation): |
| |
| 2017-04-04 Youenn Fablet <youenn@apple.com> |
| |
| [Debug] ASSERT(!throwScope.exception()) on imported/w3c/web-platform-tests/fetch/api/cors/cors-preflight-status-worker.html |
| https://bugs.webkit.org/show_bug.cgi?id=170395 |
| <rdar://problem/31394017> |
| |
| Reviewed by Mark Lam. |
| |
| No change of behavior. |
| |
| * bindings/js/JSDOMPromise.cpp: |
| (WebCore::DeferredPromise::reject): Adding early ASSERT that creating an exception is happening correctly. |
| |
| 2017-04-04 Alexey Proskuryakov <ap@apple.com> |
| |
| Rolling back the build fix, as it broke other builds. |
| |
| * platform/spi/mac/AVFoundationSPI.h: |
| |
| 2017-04-04 Alexey Proskuryakov <ap@apple.com> |
| |
| Build fix. |
| |
| Rubber-stamped by Jer Noble. |
| |
| * platform/spi/mac/AVFoundationSPI.h: |
| |
| 2017-04-04 Tim Horton <timothy_horton@apple.com> |
| |
| [Mac] -[WKWebView findMatchesForString:relativeToMatch:findOptions:maxResults:resultCollector:] invokes the resultCollector with didWrap = NO even when it wraps |
| https://bugs.webkit.org/show_bug.cgi?id=165801 |
| <rdar://problem/29649535> |
| |
| Reviewed by Wenson Hsieh. |
| |
| New API tests: WebKit2.FindInPageWrapping* |
| |
| * page/FrameTree.cpp: |
| (WebCore::FrameTree::traverseNextWithWrap): |
| (WebCore::FrameTree::traversePreviousWithWrap): |
| (WebCore::FrameTree::traverseNextInPostOrderWithWrap): |
| * page/FrameTree.h: |
| Add CanWrap and DidWrap boolean enums, and add an optional out argument |
| to traverse*WithWrap indicating whether a wrap actually occurred. |
| |
| * history/CachedPage.cpp: |
| (WebCore::firePageShowAndPopStateEvents): |
| * history/PageCache.cpp: |
| (WebCore::destroyRenderTree): |
| Adjust to the new CanWrap enum. |
| |
| * page/Page.cpp: |
| (WebCore::incrementFrame): |
| (WebCore::Page::findString): |
| (WebCore::Page::findStringMatchingRanges): |
| (WebCore::Page::rangeOfString): |
| (WebCore::Page::findMatchesForText): |
| (WebCore::Page::unmarkAllTextMatches): |
| * page/Page.h: |
| Adjust to the new CanWrap enum, and optionally plumb DidWrap through |
| to callers of findString(). |
| |
| 2017-04-04 Carlos Garcia Campos <cgarcia@igalia.com> |
| |
| [GTK] PLATFORM(GTK) && !USE(COORDINATED_GRAPHICS_THREADED) is no longer possible |
| https://bugs.webkit.org/show_bug.cgi?id=170458 |
| |
| Reviewed by Carlos Alberto Lopez Perez. |
| |
| That is not supported anymore, so we can remove dead code from VideoSinkGStreamer.cpp |
| |
| * platform/graphics/gstreamer/VideoSinkGStreamer.cpp: |
| (VideoRenderRequestScheduler::VideoRenderRequestScheduler): |
| |
| 2017-04-04 Per Arne Vollan <pvollan@apple.com> |
| |
| Unreviewed Windows build fix. |
| |
| * bindings/js/JSDOMGuardedObject.h: |
| |
| 2017-04-03 Wenson Hsieh <wenson_hsieh@apple.com> |
| |
| Data interaction should register type identifiers in order of priority |
| https://bugs.webkit.org/show_bug.cgi?id=170428 |
| <rdar://problem/30633296> |
| |
| Reviewed by Tim Horton. |
| |
| Currently, due to the shared logic for writing to a UIPasteboard (in the case of copy/paste) and the shared |
| UIItemProvider-based pasteboard wrapper (in the case of data interaction), we don't enforce any particular |
| ordering in which type identifiers are registered in the generated item provider. This is because |
| -[UIPasteboard setItems:] only takes an unordered mapping of type identifiers to objects. |
| |
| To fix this, we introduce a separate way to set pasteboard data that first writes a list of object |
| representations in order of priority (which is dependent on the content being interacted with) and then register |
| individual type-data mappings at the end. |
| |
| Augmented existing API tests in DataInteractionTests to check for the existence and priority of type identifiers |
| in the UIItemProviders created upon starting data interaction. Also adds a new unit test: |
| DataInteractionTests.TextAreaToInput. |
| |
| * WebCore.xcodeproj/project.pbxproj: |
| * editing/cocoa/EditorCocoa.mm: |
| (WebCore::archivedDataForAttributedString): |
| (WebCore::Editor::writeSelectionToPasteboard): |
| (WebCore::Editor::writeSelection): |
| * platform/Pasteboard.h: |
| * platform/PasteboardWriterData.h: |
| * platform/PlatformPasteboard.h: |
| * platform/ios/AbstractPasteboard.h: |
| * platform/ios/AbstractPasteboard.mm: Copied from Source/WebCore/platform/ios/AbstractPasteboard.h. |
| |
| Introduce WebPasteboardItemData, a wrapper around a list of objects representating the pasteboard data in order |
| of priority, and a dictionary containing additional NSData blobs that contain data useful for private clients. |
| |
| (+[WebPasteboardItemData itemWithRepresentingObjects:additionalData:]): |
| (-[WebPasteboardItemData initWithRepresentingObjects:additionalData:]): |
| (-[WebPasteboardItemData representingObjects]): |
| (-[WebPasteboardItemData additionalData]): |
| * platform/ios/PlatformPasteboardIOS.mm: |
| (WebCore::richTextRepresentationsForPasteboardWebContent): |
| (WebCore::PlatformPasteboard::writeObjectRepresentations): |
| (WebCore::PlatformPasteboard::write): |
| |
| Tweaked to check whether the pasteboard responds to -setItemsFromObjectRepresentations:. If so, uses the |
| PlatformPasteboard::writeObjectRepresentations codepath to write data to the pasteboard, respecting type |
| priority. |
| |
| * platform/ios/WebItemProviderPasteboard.mm: |
| (-[WebItemProviderPasteboard pasteboardTypes]): |
| (-[WebItemProviderPasteboard setItemProviders:]): |
| (-[WebItemProviderPasteboard setItemsFromObjectRepresentations:]): |
| |
| Replaces -setItems: with -setItemsFromObjectRepresentations:, which respects the priority of each object |
| representation of the data in the pasteboard. |
| |
| (-[WebItemProviderPasteboard setItems:]): Deleted. |
| |
| 2017-04-03 Javier Fernandez <jfernandez@igalia.com> |
| |
| [css-align] Adapt place-content alignment shorthand to the new baseline syntax |
| https://bugs.webkit.org/show_bug.cgi?id=170340 |
| |
| Reviewed by David Hyatt. |
| |
| Now that the align-content and justify-content CSS properties are |
| adapted to the new baseline-position CSS values syntax we can adapt the |
| shorthand that controls such properties to the new syntax as well. |
| |
| No new tests, just adding some additional cases to the tests we already have. |
| |
| * css/StyleProperties.cpp: |
| (WebCore::StyleProperties::getPropertyValue): |
| (WebCore::StyleProperties::placeContentPropertyValue): |
| * css/StyleProperties.h: |
| * css/parser/CSSPropertyParser.cpp: |
| (WebCore::isContentDistributionKeyword): |
| (WebCore::isContentPositionKeyword): |
| (WebCore::isOverflowKeyword): |
| (WebCore::getBaselineKeyword): |
| (WebCore::consumeContentDistributionOverflowPosition): |
| (WebCore::consumeSimplifiedContentPosition): |
| |
| 2017-04-03 Nan Wang <n_wang@apple.com> |
| |
| AX: Expose link children when doing search predication on iOS |
| https://bugs.webkit.org/show_bug.cgi?id=170424 |
| <rdar://problem/31413335> |
| |
| The children of links are accessible elements on iOS instead of the link itself, |
| so we should expose the children when doing predicated searches as well. |
| |
| Reviewed by Chris Fleizach. |
| |
| Test: accessibility/ios-simulator/ios-search-predicate-link-children.html |
| |
| * accessibility/AccessibilityObject.cpp: |
| (WebCore::AccessibilityObject::isAccessibilityObjectSearchMatchAtIndex): |
| |
| 2017-04-03 Jer Noble <jer.noble@apple.com> |
| |
| No audio output for MediaStream-backed audio elements on iOS |
| https://bugs.webkit.org/show_bug.cgi?id=170427 |
| |
| Reviewed by Eric Carlson. |
| |
| The logic for setting the output timestamp offset in AudioSampleDataSource was reversed; instead of |
| subtracting out the timestamp of the first pull request, it effectively doubled it. |
| |
| * platform/audio/mac/AudioSampleDataSource.mm: |
| (WebCore::AudioSampleDataSource::pullSamplesInternal): |
| |
| 2017-04-03 Dave Hyatt <hyatt@apple.com> |
| |
| Japanese fonts in vertical text should support synthesized italics |
| https://bugs.webkit.org/show_bug.cgi?id=169301 |
| |
| Reviewed by Simon Fraser. |
| |
| Updated test in fast/text/international. |
| |
| * platform/graphics/Font.cpp: |
| (WebCore::Font::nonSyntheticItalicFont): Deleted. |
| * platform/graphics/Font.h: |
| Removed the non-synthetic italic font member, since it's not used. |
| |
| * platform/graphics/FontCascadeFonts.cpp: |
| (WebCore::glyphDataForNonCJKCharacterWithGlyphOrientation): |
| Patched to ensure that a text-orientation-fallback font data is always |
| returned in the synthetic oblique case, so that non-CJK and CJK are |
| guaranteed to be broken up so that their slants can be applied differently. |
| |
| (WebCore::FontCascadeFonts::glyphDataForSystemFallback): |
| (WebCore::FontCascadeFonts::glyphDataForNormalVariant): |
| (WebCore::glyphDataForCJKCharacterWithoutSyntheticItalic): Deleted. |
| Patched to no longer turn off synthetic oblique for CJK. |
| |
| * platform/graphics/cocoa/FontCascadeCocoa.mm: |
| (WebCore::FontCascade::drawGlyphs): |
| Apply the correct italic transform to CJK when in vertical text. |
| |
| 2017-04-03 Chris Dumez <cdumez@apple.com> |
| |
| REGRESSION (r206744): CSS background-image in style attribute ignored when using createHTMLDocument method of DOM parsing |
| https://bugs.webkit.org/show_bug.cgi?id=170285 |
| <rdar://problem/31378543> |
| |
| Reviewed by Andy Estes. |
| |
| r206744 caused up to stop trying to resolve relative URLs when trying to load an image |
| referred to by CSS. We already try to resolve the relative URL when parsing the CSS |
| property so this will usually work fine. However, in the case when the CSS property |
| is parsed in detached document and then moved to another document, we will not have |
| the complete URL. |
| |
| Test: fast/images/background-image-relative-url-changes-document.html |
| |
| * css/CSSImageValue.cpp: |
| (WebCore::CSSImageValue::loadImage): |
| |
| 2017-04-03 Jeremy Jones <jeremyj@apple.com> |
| |
| Do not set WebAVPlayerLayerView background to black in fullscreen. |
| https://bugs.webkit.org/show_bug.cgi?id=170132 |
| rdar://problem/30839278 |
| |
| Reviewed by Tim Horton. |
| |
| No new tests because no behavior change. |
| |
| The black background on WebAVPlayerLayerView interferes with the fullscreen animation |
| and has been removed. |
| |
| * platform/ios/WebVideoFullscreenInterfaceAVKit.mm: |
| (WebVideoFullscreenInterfaceAVKit::enterFullscreen): |
| (WebVideoFullscreenInterfaceAVKit::enterFullscreenStandard): |
| |
| 2017-04-03 Antti Koivisto <antti@apple.com> |
| |
| REGRESSION (r207669): FileMaker Pro Help pages do not render correctly |
| https://bugs.webkit.org/show_bug.cgi?id=170402 |
| <rdar://problem/31004344> |
| |
| Reviewed by Simon Fraser. |
| |
| If a new stylesheet load is started from the load event the document.styleSheets does not |
| always reflect the already loaded stylesheets. |
| |
| Test: fast/css/document-stylesheets-dynamic.html |
| |
| * style/StyleScope.cpp: |
| (WebCore::Style::Scope::updateActiveStyleSheets): |
| |
| Remove an old optimization where we would not update active stylesheets if there were pending |
| (head) stylesheet loads and they had not been updated already. |
| This is probably not a valuable optimization anymore with the new lazy stylesheet update strategy. |
| |
| * style/StyleScope.h: |
| |
| 2017-04-03 Anders Carlsson <andersca@apple.com> |
| |
| Tweak ApplePaySession API |
| https://bugs.webkit.org/show_bug.cgi?id=170409 |
| rdar://problem/31405459 |
| |
| Reviewed by Tim Horton. |
| |
| Rename "address" to "addressLines". Add "postalAddress". Reorder the ApplePayError constructor parameters. |
| |
| * Modules/applepay/ApplePayError.cpp: |
| (WebCore::ApplePayError::create): |
| (WebCore::ApplePayError::ApplePayError): |
| * Modules/applepay/ApplePayError.h: |
| * Modules/applepay/ApplePayError.idl: |
| * Modules/applepay/PaymentRequest.h: |
| |
| 2017-04-03 Zan Dobersek <zdobersek@igalia.com> |
| |
| [GCrypt] Implement CryptoKeyEC::keySizeInBits(), ::platformGeneratePair() |
| https://bugs.webkit.org/show_bug.cgi?id=170345 |
| |
| Reviewed by Michael Catanzaro. |
| |
| Start implementing the libgcrypt-based platform bits of CryptoKeyEC. |
| |
| Implement keySizeInBits() by returning the appropriate size for this |
| object's curve type. An assertion is added to ensure that this size |
| matches the one that's returned by gcry_pk_get_nbits() for this |
| object's EC key as represented by the m_platformKey gcry_sexp_t object. |
| |
| Implement platformGeneratePair() by constructing a genkey s-expression |
| that requests a generation of an EC key for the specified curve type. |
| The s-expression is then passed to gcry_pk_genkey(), and the public |
| and private key data is then retrieved from the returned s-expression |
| upon success and used to create the public and private CryptoKeyEC |
| objects. |
| |
| The PlatformECKey type alias is changed to match gcry_sexp_t. The |
| CryptoKeyEC destructor releases the gcry_sexp_t object through |
| a PAL::GCrypt::HandleDeleter<gcry_sexp_t> instance. |
| |
| The method definitions in the CryptoKeyECGCrypt.cpp file are also |
| sorted to match the declaration order in the header. |
| |
| No new tests -- current ones cover this sufficiently, but are not yet |
| enabled due to other missing platform-specific SUBTLE_CRYPTO |
| implementations. |
| |
| * crypto/gcrypt/CryptoKeyECGCrypt.cpp: |
| (WebCore::curveSize): |
| (WebCore::curveName): |
| (WebCore::CryptoKeyEC::~CryptoKeyEC): |
| (WebCore::CryptoKeyEC::keySizeInBits): |
| (WebCore::CryptoKeyEC::platformGeneratePair): |
| (WebCore::CryptoKeyEC::platformImportSpki): |
| (WebCore::CryptoKeyEC::platformImportPkcs8): |
| (WebCore::CryptoKeyEC::platformExportRaw): |
| (WebCore::CryptoKeyEC::platformAddFieldElements): |
| (WebCore::CryptoKeyEC::platformExportSpki): |
| * crypto/keys/CryptoKeyEC.h: |
| |
| 2017-04-03 Zan Dobersek <zdobersek@igalia.com> |
| |
| [GCrypt] Implement AES_KW support |
| https://bugs.webkit.org/show_bug.cgi?id=170274 |
| |
| Reviewed by Michael Catanzaro. |
| |
| Implement the CryptoAlgorithmAES_KW::platform{Wrap,Unwrap}Key() |
| functionality for configurations that use libgcrypt. This is done |
| by leveraging the gcry_cipher_* APIs for the AES algorithm that's |
| deducted appropriately from the key size and the AESWRAP cipher mode. |
| |
| No new tests -- current ones cover this sufficiently, but are not yet |
| enabled due to other missing platform-specific SUBTLE_CRYPTO |
| implementations. |
| |
| * crypto/gcrypt/CryptoAlgorithmAES_KWGCrypt.cpp: |
| (WebCore::gcryptWrapKey): |
| (WebCore::gcryptUnwrapKey): |
| (WebCore::CryptoAlgorithmAES_KW::platformWrapKey): |
| (WebCore::CryptoAlgorithmAES_KW::platformUnwrapKey): |
| |
| 2017-04-03 Zan Dobersek <zdobersek@igalia.com> |
| |
| [GCrypt] Implement AES_GCM support |
| https://bugs.webkit.org/show_bug.cgi?id=170271 |
| |
| Reviewed by Michael Catanzaro. |
| |
| Implement the CryptoAlgorithmAES_GCM::platform{Encrypt,Decrypt} |
| functionality for configurations that use libgcrypt. This is done |
| by leveraging the gcry_cipher_* APIs for the AES algorithm that's |
| deducted appropriately from the key size and the GCM cipher mode. |
| |
| No new tests -- current ones cover this sufficiently, but are not yet |
| enabled due to other missing platform-specific SUBTLE_CRYPTO |
| implementations. |
| |
| * crypto/gcrypt/CryptoAlgorithmAES_GCMGCrypt.cpp: |
| (WebCore::gcryptEncrypt): |
| (WebCore::gcryptDecrypt): |
| (WebCore::CryptoAlgorithmAES_GCM::platformEncrypt): |
| (WebCore::CryptoAlgorithmAES_GCM::platformDecrypt): |
| |
| 2017-04-03 Zan Dobersek <zdobersek@igalia.com> |
| |
| [GCrypt] Implement PBKDF2 support |
| https://bugs.webkit.org/show_bug.cgi?id=170270 |
| |
| Reviewed by Michael Catanzaro. |
| |
| Implement the CryptoAlgorithmPBKDF2::platformDeriveBits() functionality |
| for configurations that use libgcrypt. This is done by leveraging the |
| gcry_kdf_derive() API, using GCRY_KDF_PBKDF2 as the preferred KDF |
| along with the properly deducted SHA algorithm. |
| |
| No new tests -- current ones cover this sufficiently, but are not yet |
| enabled due to other missing platform-specific SUBTLE_CRYPTO |
| implementations. |
| |
| * crypto/gcrypt/CryptoAlgorithmPBKDF2GCrypt.cpp: |
| (WebCore::gcryptDeriveBits): |
| (WebCore::CryptoAlgorithmPBKDF2::platformDeriveBits): |
| |
| 2017-04-01 Simon Fraser <simon.fraser@apple.com> |
| |
| Clean up touch event handler registration when moving nodes between documents |
| https://bugs.webkit.org/show_bug.cgi?id=170384 |
| rdar://problem/30816694 |
| |
| Reviewed by Chris Dumez. |
| |
| Make sure that Node::didMoveToNewDocument() does the correct unregistration on the |
| old document, and registration on the new document for nodes with touch event listeners, |
| and gesture event listeners. Touch "handler" nodes (those for overflow and sliders) are |
| already correctly moved via renderer-related teardown. |
| |
| Add assertions that fire when removal was not complete. |
| |
| Use references in more places. |
| |
| Tests: fast/events/touch/ios/gesture-node-move-between-documents.html |
| fast/events/touch/ios/overflow-node-move-between-documents.html |
| fast/events/touch/ios/slider-node-move-between-documents.html |
| fast/events/touch/ios/touch-node-move-between-documents.html |
| |
| * dom/EventNames.h: |
| (WebCore::EventNames::gestureEventNames): |
| * dom/Node.cpp: |
| (WebCore::Node::willBeDeletedFrom): |
| (WebCore::Node::didMoveToNewDocument): |
| (WebCore::tryAddEventListener): |
| (WebCore::tryRemoveEventListener): |
| * html/shadow/SliderThumbElement.cpp: |
| (WebCore::SliderThumbElement::registerForTouchEvents): |
| (WebCore::SliderThumbElement::unregisterForTouchEvents): |
| * rendering/RenderLayer.cpp: |
| (WebCore::RenderLayer::registerAsTouchEventListenerForScrolling): |
| (WebCore::RenderLayer::unregisterAsTouchEventListenerForScrolling): |
| |
| 2017-04-03 Youenn Fablet <youenn@apple.com> |
| |
| captureStream is getting black frames with webgl canvas |
| https://bugs.webkit.org/show_bug.cgi?id=170325 |
| |
| Reviewed by Dean Jackson. |
| |
| Test: fast/mediastream/captureStream/canvas3d.html |
| |
| Changing the webgl context to save buffers in case the canvas is captured. |
| Adding a canvas changed notification in case of clear. |
| In the future, we might want to change this notification and do it when endPaint or similar is called. |
| |
| Adding an Internals API to grab the RGBA equivalent of the next track frame. |
| For that purpose, adding a bunch of WEBCORE_EXPORT. |
| |
| * Modules/mediastream/CanvasCaptureMediaStreamTrack.cpp: |
| (WebCore::CanvasCaptureMediaStreamTrack::Source::Source): Adding constraints support so that track settings |
| getter actually transmits the width and height of the source. |
| (WebCore::CanvasCaptureMediaStreamTrack::Source::canvasChanged): ensuring webgl canvas context keep their drawing buffer. |
| * Modules/mediastream/MediaStreamTrack.h: |
| * bindings/js/JSDOMGuardedObject.h: |
| * bindings/js/JSDOMPromise.h: |
| (WebCore::DeferredPromise::resolve): |
| (WebCore::DeferredPromise::reject): |
| * dom/ActiveDOMCallback.h: |
| * html/HTMLCanvasElement.cpp: |
| (WebCore::HTMLCanvasElement::captureStream): |
| * html/ImageData.h: |
| * html/ImageData.idl: |
| * html/canvas/WebGLRenderingContext.cpp: |
| (WebCore::WebGLRenderingContext::clear): ensuring canvas observers get notified in case of clear calls. |
| * html/canvas/WebGLRenderingContextBase.h: |
| (WebCore::WebGLRenderingContextBase::preserveDrawingBuffer): Added to allow canvas capture to update this property. |
| * platform/MediaSample.h: |
| (WebCore::MediaSample::getRGBAImageData): Added for internals API. |
| * platform/graphics/avfoundation/MediaSampleAVFObjC.h: |
| * platform/graphics/avfoundation/objc/MediaSampleAVFObjC.mm: |
| (WebCore::MediaSampleAVFObjC::getRGBAImageData): |
| * platform/graphics/cv/PixelBufferConformerCV.cpp: |
| (WebCore::PixelBufferConformerCV::convert): Helper routine for getRGBAImageData. |
| * platform/graphics/cv/PixelBufferConformerCV.h: |
| * platform/mediastream/RealtimeMediaSourceSettings.h: |
| (WebCore::RealtimeMediaSourceSettings::setSupportedConstraints): |
| (WebCore::RealtimeMediaSourceSettings::setSupportedConstraits): Deleted. |
| * platform/mediastream/mac/AVMediaCaptureSource.mm: |
| (WebCore::AVMediaCaptureSource::initializeSettings): |
| * platform/mediastream/openwebrtc/RealtimeAudioSourceOwr.h: |
| * platform/mediastream/openwebrtc/RealtimeVideoSourceOwr.h: |
| * platform/mock/MockRealtimeMediaSource.cpp: |
| (WebCore::MockRealtimeMediaSource::initializeSettings): |
| * testing/Internals.cpp: |
| (WebCore::Internals::grabNextMediaStreamTrackFrame): |
| (WebCore::Internals::videoSampleAvailable): |
| * testing/Internals.h: |
| * testing/Internals.idl: |
| |
| 2017-04-03 Per Arne Vollan <pvollan@apple.com> |
| |
| Implement stroke-miterlimit. |
| https://bugs.webkit.org/show_bug.cgi?id=169078 |
| |
| Reviewed by Dean Jackson. |
| |
| Support stroke-miterlimit for text rendering, see https://drafts.fxtf.org/paint/. |
| |
| Tests: fast/css/stroke-miterlimit-default.html |
| fast/css/stroke-miterlimit-large.html |
| fast/css/stroke-miterlimit-zero.html |
| |
| * css/CSSComputedStyleDeclaration.cpp: |
| (WebCore::ComputedStyleExtractor::propertyValue): |
| * css/CSSProperties.json: |
| * css/SVGCSSComputedStyleDeclaration.cpp: |
| (WebCore::ComputedStyleExtractor::svgPropertyValue): |
| * rendering/TextPaintStyle.cpp: |
| (WebCore::computeTextPaintStyle): |
| (WebCore::updateGraphicsContext): |
| * rendering/TextPaintStyle.h: |
| * rendering/style/RenderStyle.cpp: |
| (WebCore::RenderStyle::diff): |
| * rendering/style/RenderStyle.h: |
| (WebCore::RenderStyle::strokeMiterLimit): |
| (WebCore::RenderStyle::setStrokeMiterLimit): |
| (WebCore::RenderStyle::initialStrokeMiterLimit): |
| (WebCore::RenderStyle::setStrokeDashOffset): |
| * rendering/style/RenderStyleConstants.cpp: |
| * rendering/style/RenderStyleConstants.h: |
| * rendering/style/SVGRenderStyle.cpp: |
| (WebCore::SVGRenderStyle::diff): |
| * rendering/style/SVGRenderStyle.h: |
| (WebCore::SVGRenderStyle::initialStrokeDashArray): |
| (WebCore::SVGRenderStyle::strokeDashArray): |
| (WebCore::SVGRenderStyle::initialStrokeMiterLimit): Deleted. |
| (WebCore::SVGRenderStyle::strokeMiterLimit): Deleted. |
| (WebCore::SVGRenderStyle::setStrokeMiterLimit): Deleted. |
| * rendering/style/SVGRenderStyleDefs.cpp: |
| (WebCore::StyleStrokeData::StyleStrokeData): |
| (WebCore::StyleStrokeData::operator==): |
| * rendering/style/SVGRenderStyleDefs.h: |
| * rendering/style/StyleRareInheritedData.cpp: |
| (WebCore::StyleRareInheritedData::StyleRareInheritedData): |
| (WebCore::StyleRareInheritedData::operator==): |
| * rendering/style/StyleRareInheritedData.h: |
| * rendering/svg/RenderSVGShape.cpp: |
| (WebCore::RenderSVGShape::hasSmoothStroke): |
| * rendering/svg/SVGRenderSupport.cpp: |
| (WebCore::SVGRenderSupport::applyStrokeStyleToContext): |
| * rendering/svg/SVGRenderTreeAsText.cpp: |
| (WebCore::writeStyle): |
| |
| 2017-04-03 Alejandro G. Castro <alex@igalia.com> |
| |
| [OWR] Fix class structure for the OWR mock classes after last modifications |
| https://bugs.webkit.org/show_bug.cgi?id=170173 |
| |
| Reviewed by Youenn Fablet. |
| |
| In case of OWR MockRealtimeMediaSource inherits from |
| RealtimeMediaSourceOwr, so we have to change some of the function |
| interfaces. |
| |
| * platform/mock/MockRealtimeMediaSource.h: |
| |
| 2017-04-02 Alexey Proskuryakov <ap@apple.com> |
| |
| Build fix for |
| Add missing text styles |
| https://bugs.webkit.org/show_bug.cgi?id=170295 |
| |
| * rendering/RenderThemeIOS.mm: |
| (WebCore::RenderThemeIOS::cachedSystemFontDescription): |
| (WebCore::RenderThemeIOS::updateCachedSystemFontDescription): |
| |
| 2017-04-01 Zalan Bujtas <zalan@apple.com> |
| |
| Long Arabic text in ContentEditable with css white-space=pre hangs Safari |
| https://bugs.webkit.org/show_bug.cgi?id=170245 |
| |
| Reviewed by Myles C. Maxfield. |
| |
| While searching for mid-word break, we measure the text by codepoints in a loop until the accumulated width > available width. |
| When we see that the accumulated width for the individual codepoints overflows, we join the codepoints and re-measure them. |
| These 2 widths could be considerably different for number of reasons (ligatures is a prime example). When we figure that |
| the run still fits, we go back to the main loop (since we are not supposed to wrap the line here) and take the next codepoint. |
| However this time we start the measurement from the last whitespace, so we end up remeasuring a potentially long chuck of text |
| until we hit the wrapping point. This is way too expensive. |
| This patch changes the logic so that we just go back to measuring individual codepoints until we hit the constrain again. |
| |
| Covered by existing tests. |
| |
| * rendering/line/BreakingContext.h: |
| (WebCore::BreakingContext::handleText): canUseSimpleFontCodePath() is just to mitigate the potential risk of regression and |
| complex text is more likely to fall into this category. |
| |
| 2017-04-01 Jon Lee <jonlee@apple.com> |
| |
| Add missing text styles |
| https://bugs.webkit.org/show_bug.cgi?id=170295 |
| rdar://problem/30219503 |
| |
| Reviewed by Dean Jackson. |
| |
| Updated existing test to include new text styles. |
| |
| * css/CSSValueKeywords.in: Add title0 and title4. |
| * platform/spi/cocoa/CoreTextSPI.h: |
| * rendering/RenderThemeIOS.mm: |
| (WebCore::RenderThemeIOS::cachedSystemFontDescription): |
| (WebCore::RenderThemeIOS::updateCachedSystemFontDescription): |
| |
| 2017-04-01 Dan Bernstein <mitz@apple.com> |
| |
| [iOS] <input type=file> label should be specified using plural rules |
| https://bugs.webkit.org/show_bug.cgi?id=170388 |
| |
| Reviewed by Alexey Proskuryakov. |
| |
| * English.lproj/Localizable.strings: Updated using update-webkit-localizable-strings. |
| |
| * English.lproj/Localizable.stringsdict: Added an entry for the new key "%lu photo(s) and |
| %lu video(s)", with plural rules covering all the different combinations in English. |
| Other localizations may specify additional combinations as needed. |
| |
| 2017-04-01 Alexey Proskuryakov <ap@apple.com> |
| |
| Rolling back <https://trac.webkit.org/r214697>, as it made WebKit2.DataDetectionReferenceDate time out. |
| |
| Was REGRESSION (r202472): Data Detection overwrites existing links in detected ranges |
| https://bugs.webkit.org/show_bug.cgi?id=170365 |
| |
| * editing/cocoa/DataDetection.mm: |
| (WebCore::searchForLinkRemovingExistingDDLinks): |
| |
| 2017-04-01 Chris Dumez <cdumez@apple.com> |
| |
| We should pause silent WebAudio rendering in background tabs |
| https://bugs.webkit.org/show_bug.cgi?id=170299 |
| <rdar://problem/31289132> |
| |
| Reviewed by Eric Carlson. |
| |
| We should pause silent WebAudio rendering in background tabs since it uses CPU and is |
| not observable by the user. Such silent WebAudio rendering seems to be used by |
| doubleclick ads. |
| |
| Test: webaudio/silent-audio-interrupted-in-background.html |
| |
| * Modules/webaudio/AudioContext.cpp: |
| (WebCore::AudioContext::lazyInitialize): |
| (WebCore::AudioContext::uninitialize): |
| Have AudioContext register / unregister itself with the Document to get |
| visibility change notifications, similarly to what HTMLMediaElement was |
| already doing. |
| |
| (WebCore::AudioContext::visibilityStateChanged): |
| Begin / End session interruption whenever the page visiblity changes. |
| |
| * Modules/webaudio/AudioContext.h: |
| * WebCore.xcodeproj/project.pbxproj: |
| |
| * dom/Document.cpp: |
| (WebCore::Document::registerForVisibilityStateChangedCallbacks): |
| (WebCore::Document::unregisterForVisibilityStateChangedCallbacks): |
| (WebCore::Document::visibilityStateChanged): |
| * dom/Document.h: |
| * dom/Element.h: |
| * dom/VisibilityChangeClient.h: Added. |
| (WebCore::VisibilityChangeClient::~VisibilityChangeClient): |
| * html/HTMLMediaElement.h: |
| Introduce a new VisibilityChangeClient interface and have both AudioContext |
| and HTMLMediaElement subclass it. Previously, the visibilityStateChanged() |
| function was on Element but this prevented AudioContext from registering |
| itself since AudioContext is not an Element. |
| |
| 2017-04-01 Dan Bernstein <mitz@apple.com> |
| |
| [Cocoa] A couple of UI strings use three periods instead of an ellipsis |
| https://bugs.webkit.org/show_bug.cgi?id=170386 |
| |
| Reviewed by Tim Horton. |
| |
| * English.lproj/Localizable.strings: Updated using update-webkit-localizable-strings. |
| |
| * platform/LocalizedStrings.cpp: |
| (WebCore::mediaElementLoadingStateText): Changed "Loading..." to "Loading…". |
| |
| * platform/cocoa/LocalizedStringsCocoa.mm: |
| (WebCore::contextMenuItemTagStyles): Changed "Styles..." to "Styles…". |
| |
| 2017-04-01 Dan Bernstein <mitz@apple.com> |
| |
| Localizable strings files are out of date |
| https://bugs.webkit.org/show_bug.cgi?id=170383 |
| |
| Reviewed by Tim Horton. |
| |
| Ran update-webkit-localizable-strings. |
| |
| * English.lproj/Localizable.strings: |
| |
| 2017-04-01 Dan Bernstein <mitz@apple.com> |
| |
| [Xcode] In engineering builds, linker warns about libwebrtc.dylib’s install name being invalid |
| https://bugs.webkit.org/show_bug.cgi?id=170385 |
| |
| Reviewed by Tim Horton. |
| |
| * Configurations/DebugRelease.xcconfig: Set WK_RELOCATABLE_FRAMEWORKS to YES like we do |
| in some other projects’ DebugRelease.xcconfig. Engineering builds are always relocatable. |
| * Configurations/WebCore.xcconfig: When WebCore is relocatable, tell the linker that it’s |
| not going to be in the shared cache, even if its install name implies that it might be. |
| |
| 2017-04-01 Alexey Proskuryakov <ap@apple.com> |
| |
| Rolling back http://trac.webkit.org/r214663 - memory corruption |
| |
| * Modules/streams/ReadableByteStreamInternals.js: |
| (cloneArrayBuffer): |
| * bindings/js/JSDOMGlobalObject.cpp: |
| (WebCore::JSDOMGlobalObject::addBuiltinGlobals): |
| * bindings/js/StructuredClone.cpp: |
| (WebCore::structuredCloneArrayBuffer): |
| (WebCore::cloneArrayBufferImpl): Deleted. |
| (WebCore::cloneArrayBuffer): Deleted. |
| * bindings/js/StructuredClone.h: |
| * bindings/js/WebCoreBuiltinNames.h: |
| * testing/Internals.cpp: |
| (WebCore::markerTypeFrom): |
| (WebCore::Internals::resetToConsistentState): |
| (WebCore::Internals::isLoadingFromMemoryCache): |
| (WebCore::Internals::setImageFrameDecodingDuration): |
| (WebCore::deferredStyleRulesCountForList): |
| (WebCore::deferredGroupRulesCountForList): |
| (WebCore::deferredKeyframesRulesCountForList): |
| (WebCore::Internals::eventThrottlingBehaviorOverride): |
| (WebCore::Internals::enableMockSpeechSynthesizer): |
| (WebCore::Internals::rangeForDictionaryLookupAtLocation): |
| (WebCore::Internals::nodesFromRect): |
| (WebCore::Internals::layerIDForElement): |
| (WebCore::Internals::setElementUsesDisplayListDrawing): |
| (WebCore::Internals::setElementTracksDisplayListReplay): |
| (WebCore::Internals::styleRecalcCount): |
| (WebCore::Internals::compositingUpdateCount): |
| (WebCore::Internals::setCaptionDisplayMode): |
| (WebCore::Internals::endMediaSessionInterruption): |
| (WebCore::Internals::postRemoteControlCommand): |
| (WebCore::appendOffsets): |
| (WebCore::Internals::scrollSnapOffsets): |
| (WebCore::Internals::setShowAllPlugins): |
| (WebCore::Internals::cloneArrayBuffer): Deleted. |
| * testing/Internals.h: |
| * testing/Internals.idl: |
| |
| 2017-03-31 Zalan Bujtas <zalan@apple.com> |
| |
| <table>: Including <caption>, <thead> or <tbody> causes clipping across page breaks |
| https://bugs.webkit.org/show_bug.cgi?id=170348 |
| <rdar://problem/24727151> |
| |
| Reviewed by David Hyatt. |
| |
| 1. In RenderFlowThread::offsetFromLogicalTopOfFirstRegion() we need to take table section offset into account (they are skipped |
| during the containing block traversal). |
| 2. Trigger paginated relayout when body is moved vertically due to caption/thead etc. |
| |
| Test: fast/multicol/table-section-page-break.html |
| |
| * rendering/RenderFlowThread.cpp: |
| (WebCore::RenderFlowThread::offsetFromLogicalTopOfFirstRegion): |
| * rendering/RenderTable.cpp: |
| (WebCore::RenderTable::layout): |
| |
| 2017-03-31 Simon Fraser <simon.fraser@apple.com> |
| |
| Rename DOMWindow's m_touchEventListenerCount to m_touchAndGestureEventListenerCount |
| https://bugs.webkit.org/show_bug.cgi?id=170371 |
| |
| Reviewed by Tim Horton. |
| |
| This count tracks touch and gesture event listeners, so name it appropriately. |
| |
| * page/DOMWindow.cpp: |
| (WebCore::DOMWindow::addEventListener): |
| (WebCore::DOMWindow::removeEventListener): |
| (WebCore::DOMWindow::removeAllEventListeners): |
| * page/DOMWindow.h: |
| |
| 2017-03-31 Simon Fraser <simon.fraser@apple.com> |
| |
| When destroying a Node, assert that it's been removed from all the touch handler maps |
| https://bugs.webkit.org/show_bug.cgi?id=170363 |
| rdar://problem/31377469 |
| |
| Reviewed by Tim Horton. |
| |
| Assert that the Node has been removed from the touch handler maps in all documents on destruction. |
| |
| * dom/Document.h: |
| (WebCore::Document::hasTouchEventHandlers): |
| (WebCore::Document::touchEventTargetsContain): |
| * dom/Node.cpp: |
| (WebCore::Node::~Node): |
| |
| 2017-03-31 Alexey Proskuryakov <ap@apple.com> |
| |
| Rolling back https://trac.webkit.org/r214689, as it caused many crashes. |
| |
| Was: |
| Fix memory leak in CreateSessionDescriptionObserver::OnSuccess |
| https://bugs.webkit.org/show_bug.cgi?id=170357 |
| |
| * Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp: |
| (WebCore::LibWebRTCMediaEndpoint::createSessionDescriptionSucceeded): |
| |
| 2017-03-31 Youenn Fablet <youenn@apple.com> |
| |
| Fix memory leak in RealtimeVideoIncomingSource |
| https://bugs.webkit.org/show_bug.cgi?id=170356 |
| |
| Reviewed by Eric Carlson. |
| |
| No change of behavior. |
| |
| * platform/mediastream/mac/RealtimeIncomingVideoSource.cpp: |
| (WebCore::RealtimeIncomingVideoSource::OnFrame): Adopting the newly created pointer. |
| |
| 2017-03-31 Andy Estes <aestes@apple.com> |
| |
| REGRESSION (r202472): Data Detection overwrites existing links in detected ranges |
| https://bugs.webkit.org/show_bug.cgi?id=170365 |
| <rdar://problem/29205721> |
| |
| Reviewed by Tim Horton. |
| |
| r202472 changed the node traversal in searchForLinkRemovingExistingDDLinks() to only |
| consider nodes that are descendants of startNode, but we need to traverse all nodes between |
| startNode and endNode to find existing non-DD links. |
| |
| As a result, we'd add a Data Detector link to the following snippet and make the original |
| links un-clickable: |
| |
| <a href='#'>tomorrow</a> <a href='#'>night</a> |
| |
| Fix this by not specifying a stayWithin node when calling NodeTraversal::next(). The loop |
| will terminate when we reach endNode. |
| |
| Updated WebKit2.DataDetectionReferenceDate API test. |
| |
| * editing/cocoa/DataDetection.mm: |
| (WebCore::searchForLinkRemovingExistingDDLinks): |
| |
| 2017-03-31 Eric Carlson <eric.carlson@apple.com> |
| |
| Incoming video source doesn't propogate frame rotation |
| https://bugs.webkit.org/show_bug.cgi?id=170364 |
| |
| Reviewed by Youenn Fablet. |
| |
| No new tests, the mock video source doesn't support rotation. Test will be added when |
| this is fixed in https://bugs.webkit.org/show_bug.cgi?id=169822. The changes were |
| verified manually. |
| |
| * platform/mediastream/mac/RealtimeIncomingVideoSource.cpp: |
| (WebCore::RealtimeIncomingVideoSource::OnFrame): Convert frame rotation to sample |
| orientation and swap width and height when necessary. |
| (WebCore::RealtimeIncomingVideoSource::processNewSample): |
| * platform/mediastream/mac/RealtimeIncomingVideoSource.h: |
| |
| 2017-03-31 Chris Dumez <cdumez@apple.com> |
| |
| Possible null dereference under SourceBuffer::sourceBufferPrivateDidReceiveSample() |
| https://bugs.webkit.org/show_bug.cgi?id=159639 |
| |
| Reviewed by Eric Carlson. |
| |
| Add a null check for trackBuffer.description before dereferencing as it seems |
| it can be null. |
| |
| * Modules/mediasource/SourceBuffer.cpp: |
| (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveSample): |
| |
| 2017-03-31 Youenn Fablet <youenn@apple.com> |
| |
| Fix memory leak in CreateSessionDescriptionObserver::OnSuccess |
| https://bugs.webkit.org/show_bug.cgi?id=170357 |
| |
| Reviewed by Geoffrey Garen. |
| |
| No change of behavior. |
| |
| * Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp: |
| (WebCore::LibWebRTCMediaEndpoint::createSessionDescriptionSucceeded): Adopting the raw pointer parameter. |
| |
| 2017-03-31 Fujii Hironori <Hironori.Fujii@sony.com> |
| |
| [WinCairo] WebCore::PlatformDisplay::terminateEGLDisplay causes a crash in libGLESv2.dll while processing atexit |
| https://bugs.webkit.org/show_bug.cgi?id=170331 |
| |
| Reviewed by Michael Catanzaro. |
| |
| WebCore::PlatformDisplay uses atexit to destruct EGL displays |
| while exiting process. But, when the atexit will be processed, |
| heap of libGLESv2.dll would be already destructed and causing a |
| crash on Windows. Do not use atexit for Windows. |
| |
| AppleWin port does not use PlatformDisplay. Thus, it does not have |
| this bug. |
| |
| * platform/graphics/PlatformDisplay.cpp: |
| (WebCore::PlatformDisplay::initializeEGLDisplay): Do not use atexit for Windows. |
| (WebCore::PlatformDisplay::shutDownEglDisplays): Added. |
| * platform/graphics/PlatformDisplay.h: Added a declaration of shutDownEglDisplays. |
| |
| 2017-03-31 Yoav Weiss <yoav@yoav.ws> |
| |
| Remove PRELOAD_DEBUG related code. |
| https://bugs.webkit.org/show_bug.cgi?id=170352 |
| |
| Reviewed by Youenn Fablet. |
| |
| As the PRELOAD_DEBUG related code stopped building and it seems like no one noticed, |
| it seems safe to assume that we can remove that code. This patch removes it. |
| |
| No new tests as there's no functional change. |
| |
| * loader/cache/CachedResourceLoader.cpp: |
| (WebCore::CachedResourceLoader::preload): |
| (WebCore::CachedResourceLoader::clearPreloads): |
| (WebCore::CachedResourceLoader::printPreloadStats): Deleted. |
| |
| 2017-03-31 Brady Eidson <beidson@apple.com> |
| |
| Clean up the "StorageType" enum. |
| https://bugs.webkit.org/show_bug.cgi?id=170349 |
| |
| Reviewed by Tim Horton. |
| |
| - Make this `enum` into an `enum class` |
| - Add a new type specific for "transient local storage" |
| |
| No new tests (No behavior change). |
| |
| * WebCore.xcodeproj/project.pbxproj: |
| |
| * inspector/InspectorDOMStorageAgent.cpp: |
| (WebCore::InspectorDOMStorageAgent::didDispatchDOMStorageEvent): |
| |
| * inspector/InspectorInstrumentation.h: |
| |
| * loader/EmptyClients.cpp: |
| |
| * storage/Storage.cpp: |
| (WebCore::Storage::isDisabledByPrivateBrowsing): |
| |
| * storage/StorageArea.h: |
| (): Deleted. |
| |
| * storage/StorageEventDispatcher.cpp: |
| (WebCore::StorageEventDispatcher::dispatchSessionStorageEventsToFrames): |
| (WebCore::StorageEventDispatcher::dispatchLocalStorageEventsToFrames): |
| |
| * storage/StorageType.h: |
| (WebCore::isLocalStorage): |
| |
| 2017-03-31 Chris Dumez <cdumez@apple.com> |
| |
| Unreviewed, Mark "HTML interactive form validation" as done. |
| |
| It is shipping in Safari 10.1. |
| |
| * features.json: |
| |
| 2017-03-31 Csaba Osztrogonác <ossy@webkit.org> |
| |
| Mac cmake buildfix after r214666 |
| https://bugs.webkit.org/show_bug.cgi?id=170342 |
| |
| Unreviewed buildfix. |
| |
| * PlatformMac.cmake: |
| * testing/MockPreviewLoaderClient.h: |
| |
| 2017-03-31 Sam Weinig <sam@webkit.org> |
| |
| Remove unneeded custom constructors include. |
| |
| * WebCore.xcodeproj/project.pbxproj: |
| * bindings/js/ios: Removed. |
| * bindings/js/ios/TouchConstructors.cpp: Removed. |
| |
| 2017-03-31 John Wilander <wilander@apple.com> |
| |
| Resource Load Statistics: Check if the store exists before clearing it |
| https://bugs.webkit.org/show_bug.cgi?id=170324 |
| <rdar://problem/31258505> |
| |
| Reviewed by Brent Fulgham. |
| |
| No new tests. Added a null check. |
| |
| * loader/ResourceLoadObserver.cpp: |
| (WebCore::ResourceLoadObserver::clearInMemoryAndPersistentStore): |
| Added a null check. |
| |
| 2017-03-31 Romain Bellessort <romain.bellessort@crf.canon.fr> |
| |
| [Readable Streams API] Implement cloneArrayBuffer in WebCore |
| https://bugs.webkit.org/show_bug.cgi?id=170008 |
| |
| Reviewed by Youenn Fablet. |
| |
| Implemented cloneArrayBuffer based on existing structuredCloneArrayBuffer |
| implementation. The code has been factorized so that both cloneArrayBuffer |
| and structuredCloneArrayBuffer rely on the same code (which is basically |
| the previous implementation of structuredCloneArrayBuffer + the ability |
| to clone only a part of considered buffer). |
| |
| Added test to check cloneArrayBuffer behaviour. |
| |
| * Modules/streams/ReadableByteStreamInternals.js: Deleted cloneArrayBuffer JS implementation. |
| * bindings/js/JSDOMGlobalObject.cpp: |
| (WebCore::JSDOMGlobalObject::addBuiltinGlobals): Add cloneArrayBuffer private declaration. |
| * bindings/js/StructuredClone.cpp: |
| (WebCore::cloneArrayBufferImpl): Added (mostly based on previous structuredCloneArrayBuffer). |
| (WebCore::cloneArrayBuffer): Added. |
| (WebCore::structuredCloneArrayBuffer): Updated. |
| * bindings/js/StructuredClone.h: Added cloneArrayBuffer declaration. |
| * bindings/js/WebCoreBuiltinNames.h: Added cloneArrayBuffer declaration. |
| * testing/Internals.cpp: Added support for testing cloneArrayBuffer. |
| * testing/Internals.h: Added support for testing cloneArrayBuffer. |
| * testing/Internals.idl: Added support for testing cloneArrayBuffer. |
| |
| 2017-03-31 Antoine Quint <graouts@apple.com> |
| |
| [mac-wk1] LayoutTest media/modern-media-controls/airplay-button/airplay-button.html is a flaky timeout |
| https://bugs.webkit.org/show_bug.cgi?id=168409 |
| <rdar://problem/30799198> |
| |
| Unreviewed. Yet more logging to determine under what circumstance ScriptedAnimationController gets suspended. |
| |
| * dom/Document.cpp: |
| (WebCore::Document::requestAnimationFrame): |
| |
| 2017-03-30 Zan Dobersek <zdobersek@igalia.com> |
| |
| Unreviewed GTK+ build fix. Add missing ANGLE build targets |
| to the build. |
| |
| * CMakeLists.txt: |
| |
| 2017-03-30 Simon Fraser <simon.fraser@apple.com> |
| |
| Ensure that Node::willBeDeletedFrom() always removes touch event handlers from the document |
| https://bugs.webkit.org/show_bug.cgi?id=170323 |
| rdar://problem/23647630 |
| |
| Reviewed by Chris Dumez. |
| |
| There are two instances where nodes are registered as touch event handlers without |
| having normal touch event listeners: slider thumb elements, and elements with overflow scrolling, |
| on iOS. |
| |
| For such nodes, hasEventTargetData() will be false, but we want to ensure |
| that they are removed from the Document's touchEventHandler set, so move the |
| call to document.removeTouchEventHandler() outside of the conditional block. |
| |
| This should be cheap in most cases when the touchEventHandler is empty. |
| |
| * dom/Node.cpp: |
| (WebCore::Node::willBeDeletedFrom): |
| |
| 2017-03-30 Simon Fraser <simon.fraser@apple.com> |
| |
| Minor cleanup checking for gesture event names |
| https://bugs.webkit.org/show_bug.cgi?id=170319 |
| |
| Reviewed by Tim Horton. |
| |
| Just use isGestureEventType() in a couple of places. |
| |
| * dom/Node.cpp: |
| (WebCore::tryAddEventListener): |
| (WebCore::tryRemoveEventListener): |
| |
| 2017-03-30 Simon Fraser <simon.fraser@apple.com> |
| |
| Rename a touch event function, and new touch region test results |
| https://bugs.webkit.org/show_bug.cgi?id=170309 |
| rdar://problem/31329520 |
| |
| Reviewed by Chris Dumez. |
| |
| Adapt to a naming change in WebKitAdditions. |
| |
| * dom/Document.cpp: |
| (WebCore::Document::removeAllEventListeners): |
| * page/FrameView.cpp: |
| (WebCore::FrameView::layout): |
| * rendering/RenderElement.cpp: |
| (WebCore::RenderElement::styleWillChange): |
| * rendering/RenderLayer.cpp: |
| (WebCore::RenderLayer::scrollTo): |
| (WebCore::RenderLayer::calculateClipRects): |
| |
| 2017-03-30 Matt Rajca <mrajca@apple.com> |
| |
| YouTube sometimes does not respect "user gesture" restriction for videos. |
| https://bugs.webkit.org/show_bug.cgi?id=170297 |
| |
| I discovered a code path that does not honor the "user gesture" requirement and playback is able to begin |
| even though we have a restriction in place. When using Media Source Extensions, which YouTube does, we transition |
| from a "Have Metadata" to a "Future Data" state that causes playback to begin, however, we never check |
| if we have a playback restriction in place. |
| |
| Reviewed by Eric Carlson. |
| |
| * html/HTMLMediaElement.cpp: |
| (WebCore::HTMLMediaElement::setReadyState): |
| |
| 2017-03-30 Said Abou-Hallawa <sabouhallawa@apple.com> |
| |
| REGRESSION (r213764): Background image from sprite sheet incorrectly scaled |
| https://bugs.webkit.org/show_bug.cgi?id=169547 |
| |
| Reviewed by Simon Fraser. |
| |
| The bug happens when drawing only a rectangle of an image not the whole |
| image. In BitmapImage::draw(), sizeForDrawing was calculated as the destRect |
| scaled by the transformation which is applied to the GraphicsContext. Two |
| problems with this approach. The first one is destRect can be only part of |
| the image. The second problem is, the ratio destRect / srcRect is another |
| scaling that needs to be considered. |
| |
| To fix this issue, first the base size has to be size of the image and not |
| destRect.size(). Secondly, we need to scale this base size with the context |
| transformation multiplied by the ratio destRect / srcRect. This scaling is |
| exactly the same scaling which is calculated in subsamplingScale(). Finally |
| we use this scaled size as the sizeForDrawing to send to the ImageDecoder. |
| |
| Test: fast/images/sprite-sheet-image-draw.html |
| |
| * platform/graphics/BitmapImage.cpp: |
| (WebCore::BitmapImage::draw): Fix the bug. |
| (WebCore::BitmapImage::stopAnimation): Stops the async image decoding for animated images only. |
| The decoding for large images will be stopped when BitmapImage::newFrameNativeImageAvailableAtIndex() |
| is called and the decoding queue is idle. |
| (WebCore::BitmapImage::newFrameNativeImageAvailableAtIndex): Add image logging. |
| * platform/graphics/BitmapImage.h: Move sourceURL() to the Image class. |
| * platform/graphics/GraphicsContext.cpp: Pass imagePaintingOptions.m_decodingMode to Image::drawTiled(). |
| (WebCore::GraphicsContext::drawTiledImage): Pass imagePaintingOptions.m_decodingMode) to Image::drawTiled(). |
| * platform/graphics/Image.cpp: |
| (WebCore::Image::sourceURL): Moved from BitmapImage. |
| (WebCore::Image::drawTiled): Add a DecodingMode argument instead of calling always with DecodingMode::Synchronous. |
| * platform/graphics/Image.h: |
| * platform/graphics/ImageFrameCache.cpp: |
| (WebCore::ImageFrameCache::cacheAsyncFrameNativeImageAtIndex): Add image logging. |
| (WebCore::ImageFrameCache::startAsyncDecodingQueue): Ditto, |
| (WebCore::ImageFrameCache::requestFrameAsyncDecodingAtIndex): Ditto. |
| (WebCore::ImageFrameCache::stopAsyncDecodingQueue): Ditto. |
| (WebCore::ImageFrameCache::sourceURL): A helper function to avoid checking the value of m_image. |
| * platform/graphics/ImageFrameCache.h: |
| * platform/graphics/NativeImage.h: Rename subsamplingScale() to nativeImageDrawingScale() and return image scaling instead. |
| * platform/graphics/cairo/NativeImageCairo.cpp: |
| (WebCore::nativeImageDrawingScale): Ditto. |
| (WebCore::subsamplingScale): Deleted. |
| * platform/graphics/cg/NativeImageCG.cpp: |
| (WebCore::nativeImageDrawingScale): Ditto. |
| (WebCore::subsamplingScale): Deleted. |
| * platform/graphics/win/NativeImageDirect2D.cpp: |
| (WebCore::nativeImageDrawingScale): Ditto. |
| (WebCore::subsamplingScale): Deleted. |
| |
| 2017-03-30 Matt Baker <mattbaker@apple.com> |
| |
| Web Inspector: Assertion failure in InspectorStyleProperty::setRawTextFromStyleDeclaration |
| https://bugs.webkit.org/show_bug.cgi?id=170279 |
| <rdar://problem/30200492> |
| |
| Reviewed by David Hyatt. |
| |
| The SourceRange for a CSSPropertySourceData should be relative to the start |
| of the declaration body, not the start of the StyleSheetHandler’s parsed |
| text. This only affected the ranges of unparsed (parsedOK == false) properties |
| lacking a trailing semi-colon. |
| |
| This patch doesn't change the behavior of InspectorStyleSheet other than |
| silencing an irksome assert, as String::substring does a safety check on |
| the passed in length. |
| |
| * inspector/InspectorStyleSheet.cpp: |
| (WebCore::fixUnparsedProperties): |
| |
| 2017-03-30 Youenn Fablet <youenn@apple.com> and Jon Lee <jonlee@apple.com> |
| |
| Clean up RTCDataChannel |
| https://bugs.webkit.org/show_bug.cgi?id=169732 |
| |
| Reviewed by Chris Dumez. |
| |
| Test: webrtc/datachannel/datachannel-event.html |
| webrtc/datachannel/bufferedAmountLowThreshold.html |
| |
| Making RTCDataChannel interface closer to the spec updating implementation accordingly. |
| See https://w3c.github.io/webrtc-pc/#rtcdatachannel. |
| In particular adding RTCDataChannelEvent constructor, and missing bufferedAmount related attributes. |
| Doing some additional cleaning refactoring. |
| |
| Making bufferedAmountIsDecreasing take a bufferedAmount argument so that we get the actual value passed by |
| libwebrtc without needing to get it from the libwebrtc network thread again. |
| In the future, we should store the bufferedAmount value in RTCDataChannel and update its value on each libwebrtc |
| OnBufferedAmountChange. Special treatment may be needed when the data channel is closed, in which case the bufferedAmount should just be |
| updated to increase in the send method. |
| |
| Added some FIXMEs as RTCDataChannel is not aligned with the spec related to send and bufferedAmount. |
| |
| * Modules/mediastream/RTCDataChannel.cpp: |
| (WebCore::RTCDataChannel::send): |
| (WebCore::RTCDataChannel::close): |
| (WebCore::RTCDataChannel::didChangeReadyState): |
| (WebCore::RTCDataChannel::bufferedAmountIsDecreasing): |
| * Modules/mediastream/RTCDataChannel.h: |
| * Modules/mediastream/RTCDataChannel.idl: |
| * Modules/mediastream/RTCDataChannelEvent.cpp: |
| (WebCore::RTCDataChannelEvent::create): |
| (WebCore::RTCDataChannelEvent::RTCDataChannelEvent): |
| (WebCore::RTCDataChannelEvent::channel): |
| * Modules/mediastream/RTCDataChannelEvent.h: |
| * Modules/mediastream/RTCDataChannelEvent.idl: |
| * Modules/mediastream/RTCPeerConnection.idl: |
| * Modules/mediastream/libwebrtc/LibWebRTCDataChannelHandler.cpp: |
| (WebCore::LibWebRTCDataChannelHandler::OnStateChange): |
| * Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp: |
| (WebCore::LibWebRTCMediaEndpoint::addDataChannel): |
| * WebCore.xcodeproj/project.pbxproj: |
| * dom/EventNames.h: |
| * platform/mediastream/RTCDataChannelHandler.h: |
| * platform/mediastream/RTCDataChannelHandlerClient.h: |
| * platform/mediastream/RTCDataChannelState.h: Added. |
| * platform/mediastream/RTCPeerConnectionHandlerClient.h: |
| * platform/mock/RTCDataChannelHandlerMock.cpp: |
| (WebCore::RTCDataChannelHandlerMock::setClient): |
| (WebCore::RTCDataChannelHandlerMock::close): |
| * platform/mock/RTCNotifiersMock.cpp: |
| (WebCore::IceConnectionNotifier::IceConnectionNotifier): |
| (WebCore::SignalingStateNotifier::SignalingStateNotifier): |
| (WebCore::DataChannelStateNotifier::DataChannelStateNotifier): |
| * platform/mock/RTCNotifiersMock.h: |
| |
| 2017-03-30 Javier Fernandez <jfernandez@igalia.com> |
| |
| [css-align] Adapt content-alignment properties to the new baseline syntax |
| https://bugs.webkit.org/show_bug.cgi?id=170262 |
| |
| Reviewed by David Hyatt. |
| |
| The baseline-position syntax has changed recently, so we need to update |
| the CSS properties using the old syntax. This patch address only the |
| content-alignment (align-content and justify-content). |
| |
| I used this patch to adapt the implementation of the parsing logic for |
| these properties to the new Blink's CSS Parsing Design. |
| |
| The new baseline syntax is "[first | last ]? baseline" which implies |
| modifying the parsing and computed value logic. |
| |
| There are several layout tests affected by this change, so I'll update |
| them accordingly. |
| |
| No new tests, just added/modified some cases to the tests we |
| already have using the new baseline values. |
| |
| * css/CSSComputedStyleDeclaration.cpp: |
| (WebCore::valueForContentPositionAndDistributionWithOverflowAlignment): |
| * css/CSSContentDistributionValue.cpp: |
| (WebCore::CSSContentDistributionValue::customCSSText): |
| * css/CSSPrimitiveValueMappings.h: |
| (WebCore::CSSPrimitiveValue::operator ItemPosition): |
| (WebCore::CSSPrimitiveValue::operator ContentPosition): |
| * css/CSSValueKeywords.in: |
| * css/parser/CSSPropertyParser.cpp: |
| (WebCore::isBaselineKeyword): |
| (WebCore::consumeBaselineKeyword): |
| (WebCore::consumeContentDistributionOverflowPosition): |
| (WebCore::consumeSelfPositionOverflowPosition): |
| |
| 2017-03-30 James Craig <jcraig@apple.com> |
| |
| AX: Expose a new AXSubrole for explicit ARIA "group" role |
| https://bugs.webkit.org/show_bug.cgi?id=169810 |
| <rdar://problem/31039693> |
| |
| Reviewed by Chris Fleizach. |
| |
| Split GroupRole into generics (GroupRole) and explicit groups |
| (ApplicationGroupRole) so we can expose a subrole on the explicit |
| groups. Account for the change in ARIA Tree and Menu hierachies. |
| Update the computedRoleValue for WebKit Inspector usage, too. |
| |
| Updated existing tests. |
| |
| Test: accessibility/list-detection2.html: |
| Test: accessibility/roles-computedRoleString.html: |
| Test: inspector/dom/getAccessibilityPropertiesForNode.html: |
| Test: inspector/dom/highlightFrame.html: |
| Test: inspector/dom/highlightSelector.html: |
| |
| * accessibility/AccessibilityNodeObject.cpp: |
| (WebCore::AccessibilityNodeObject::helpText): |
| (WebCore::AccessibilityNodeObject::hierarchicalLevel): |
| (WebCore::AccessibilityNodeObject::remapAriaRoleDueToParent): |
| * accessibility/AccessibilityObject.cpp: |
| (WebCore::AccessibilityObject::accessibleNameDerivesFromContent): |
| (WebCore::AccessibilityObject::ariaTreeItemContent): |
| (WebCore::initializeRoleMap): |
| (WebCore::AccessibilityObject::computedRoleString): |
| * accessibility/AccessibilityObject.h: |
| * accessibility/atk/WebKitAccessibleWrapperAtk.cpp: |
| (atkRole): |
| * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm: |
| (-[WebAccessibilityObjectWrapper determineIsAccessibilityElement]): |
| * accessibility/mac/WebAccessibilityObjectWrapperMac.mm: |
| (createAccessibilityRoleMap): |
| (-[WebAccessibilityObjectWrapper subrole]): |
| |
| 2017-03-30 Chris Dumez <cdumez@apple.com> |
| |
| We are spending a lot of time bzero'ing AudioChannel buffers on uni-watch.com |
| https://bugs.webkit.org/show_bug.cgi?id=170288 |
| <rdar://problem/31289132> |
| |
| Reviewed by Eric Carlson. |
| |
| We are spending a lot of time bzero'ing AudioChannel buffers on uni-watch.com due |
| to doubleclick ads using WebAudio with a 0-gain GainNode. We should optimize the |
| 0-gain case as much as possible. |
| |
| No new tests, only an optimization. |
| |
| * Modules/webaudio/AudioNode.cpp: |
| (WebCore::AudioNode::processIfNecessary): |
| Drop call to unsilenceOutputs() before calling AudioNode::process(). The AudioChannel |
| API already takes care of clearing its 'silent' flag whenever its buffer changes so |
| there should be no need to explicitly clearing the 'silent' flag before calling |
| process(). This was causing us to zero out buffers that were already filled with |
| zeros because AudioChannel::zero() would no longer return early, not knowing the |
| channel is already silent. This reduces the number of bzero() calls by ~3.5x on |
| uni-watch.com (from 100 calls every ~20ms to 100 calls every ~70ms. |
| |
| * Modules/webaudio/AudioNode.h: |
| * platform/audio/mac/AudioDestinationMac.cpp: |
| (WebCore::AudioDestinationMac::render): |
| Avoid clamping the values in the channel buffer if the channel is silent since this |
| will have no effect (given that the buffer only contains zeros). |
| |
| 2017-03-30 Eric Carlson <eric.carlson@apple.com> |
| |
| [Crash] WebCore::AudioBuffer::AudioBuffer don't checking illegal value |
| https://bugs.webkit.org/show_bug.cgi?id=169956 |
| |
| Reviewed by Youenn Fablet. |
| |
| Test: webaudio/audiobuffer-crash.html |
| |
| * Modules/webaudio/AudioBuffer.cpp: |
| (WebCore::AudioBuffer::AudioBuffer): Invalidate the object and return early if the channel |
| array allocation fails. |
| (WebCore::AudioBuffer::AudioBuffer): Ditto. |
| (WebCore::AudioBuffer::invalidate): Invalidate the object. |
| * Modules/webaudio/AudioBuffer.h: |
| |
| 2017-03-30 Antoine Quint <graouts@apple.com> |
| |
| [mac-wk1] LayoutTest media/modern-media-controls/airplay-button/airplay-button.html is a flaky timeout |
| https://bugs.webkit.org/show_bug.cgi?id=168409 |
| <rdar://problem/30799198> |
| |
| Unreview. Print the backtrace when we suspend scripted animations. |
| |
| * page/Page.cpp: |
| (WebCore::Page::suspendScriptedAnimations): |
| |
| 2017-03-30 Antoine Quint <graouts@apple.com> |
| |
| [mac-wk1] LayoutTest media/modern-media-controls/airplay-button/airplay-button.html is a flaky timeout |
| https://bugs.webkit.org/show_bug.cgi?id=168409 |
| <rdar://problem/30799198> |
| |
| Unreview. Pring the backtrace when we suspend ScriptedAnimationController. |
| |
| * dom/ScriptedAnimationController.cpp: |
| (WebCore::ScriptedAnimationController::suspend): |
| |
| 2017-03-30 Antoine Quint <graouts@apple.com> |
| |
| [Modern Media Controls] Invalid placard icon is not visible for short video |
| https://bugs.webkit.org/show_bug.cgi?id=170277 |
| <rdar://problem/31327955> |
| |
| Reviewed by Eric Carlson. |
| |
| Make the minimum dimension needed to display a placard icon configurable and let the |
| invalid placard use a 50pt dimension. We also make a drive-by fix to reset "text-align" |
| for media controls as having a "text-align: center" inherited value would mess up |
| positioning of the placard icon and make it flush to the right of the placard. |
| |
| Test: media/modern-media-controls/invalid-placard/invalid-placard-constrained-metrics.html |
| |
| * Modules/modern-media-controls/controls/invalid-placard.js: |
| (InvalidPlacard): |
| * Modules/modern-media-controls/controls/media-controls.css: |
| (.media-controls): |
| * Modules/modern-media-controls/controls/placard.js: |
| (Placard.prototype.layout): |
| |
| 2017-03-30 Zan Dobersek <zdobersek@igalia.com> |
| |
| [GCrypt] Register missing algorithms in CryptoAlgorithmRegistry::platformRegisterAlgoritmhs() |
| https://bugs.webkit.org/show_bug.cgi?id=170273 |
| |
| Reviewed by Michael Catanzaro. |
| |
| * crypto/gcrypt/CryptoAlgorithmRegistryGCrypt.cpp: |
| (WebCore::CryptoAlgorithmRegistry::platformRegisterAlgorithms): |
| Add registerAlgorithm<> calls for AES_CFB, AES_GCM, ECDH and |
| PBKDF2 algorithms. |
| |
| 2017-03-30 Brent Fulgham <bfulgham@apple.com> |
| |
| Remove unused MediaControlsApple implementation |
| https://bugs.webkit.org/show_bug.cgi?id=170258 |
| <rdar://problem/31331056> |
| |
| Reviewed by Eric Carlson. |
| |
| Remove dead code related to old media controls. We switched to HTML5-based media controls |
| several years ago. |
| |
| No new tests. Removing this dead code should have no change in behavior. |
| |
| * WebCore.xcodeproj/project.pbxproj: Remove unused files. |
| * dom/EventListener.h: Remove unused event type. |
| * html/shadow/MediaControlsApple.cpp: Removed. |
| * html/shadow/MediaControlsApple.h: Removed. |
| |
| 2017-03-30 Fujii Hironori <Hironori.Fujii@sony.com> |
| |
| [WinCairo] ImageCairoWin.cpp: error C2660: 'WebCore::BitmapImage::draw': function does not take 6 arguments |
| https://bugs.webkit.org/show_bug.cgi?id=170275 |
| |
| Reviewed by Said Abou-Hallawa. |
| |
| Apply the similar change of ImageCGWin.cpp of r214450 to ImageCairoWin.cpp. |
| |
| * platform/graphics/win/ImageCairoWin.cpp: |
| (WebCore::BitmapImage::getHBITMAPOfSize): Pass DecodingMode::Synchronous to Image::draw(). |
| (WebCore::BitmapImage::drawFrameMatchingSourceSize): Ditto. |
| |
| 2017-03-27 Sergio Villar Senin <svillar@igalia.com> |
| |
| [css-grid] Clamp the number of autorepeat tracks |
| https://bugs.webkit.org/show_bug.cgi?id=170120 |
| |
| Reviewed by Manuel Rego Casasnovas. |
| |
| As suggested by the specs we do clamp the maximum number of tracks per grid in order to |
| minimize potential OOM situations. However we were not considering the case of the recently |
| added auto repeat syntax. Abnormally huge values for the width/height on the grid container |
| could lead to a number of auto repeat tracks higher than the maximum. |
| |
| A new API was added to Internals in order to test limits without having to create huge |
| grids. This new API allows clients to set an arbitrary limit to the number of tracks. The |
| addition of this new API forced us to add GridPosition.cpp to the project to define the |
| global variable we use for testing. We took the chance to move part of the implementation |
| from the header file to the source file. |
| |
| Last but not least, several new ASSERTs were added to Grid.cpp implementation to ensure that |
| we do not surpass the grid track limits. |
| |
| Test: fast/css-grid-layout/grid-auto-repeat-huge-grid.html |
| |
| * CMakeLists.txt: |
| * WebCore.xcodeproj/project.pbxproj: |
| * css/parser/CSSPropertyParser.cpp: |
| (WebCore::consumeGridTrackRepeatFunction): |
| * rendering/Grid.cpp: |
| (WebCore::Grid::ensureGridSize): Added ASSERT. |
| (WebCore::Grid::setSmallestTracksStart): Ditto. |
| (WebCore::Grid::setAutoRepeatTracks): Ditto. |
| (WebCore::Grid::setAutoRepeatEmptyColumns): Ditto. |
| (WebCore::Grid::setAutoRepeatEmptyRows): Ditto. |
| * rendering/RenderGrid.cpp: |
| (WebCore::RenderGrid::clampAutoRepeatTracks): New method. |
| (WebCore::RenderGrid::placeItemsOnGrid): Clamp the number of auto repeat tracks before |
| passing them to the Grid. |
| * rendering/RenderGrid.h: |
| * rendering/style/GridArea.h: |
| (WebCore::GridSpan::GridSpan): |
| * rendering/style/GridPosition.cpp: Added. |
| (WebCore::GridPosition::setExplicitPosition): |
| (WebCore::GridPosition::setAutoPosition): |
| (WebCore::GridPosition::setSpanPosition): |
| (WebCore::GridPosition::setNamedGridArea): |
| (WebCore::GridPosition::integerPosition): |
| (WebCore::GridPosition::namedGridLine): |
| (WebCore::GridPosition::spanPosition): |
| (WebCore::GridPosition::operator==): |
| * rendering/style/GridPosition.h: |
| (WebCore::GridPosition::shouldBeResolvedAgainstOppositePosition): |
| (WebCore::GridPosition::max): |
| (WebCore::GridPosition::min): |
| (WebCore::GridPosition::setMaxPositionForTesting): |
| (WebCore::GridPosition::setExplicitPosition): Deleted. |
| (WebCore::GridPosition::setAutoPosition): Deleted. |
| (WebCore::GridPosition::setSpanPosition): Deleted. |
| (WebCore::GridPosition::setNamedGridArea): Deleted. |
| (WebCore::GridPosition::integerPosition): Deleted. |
| (WebCore::GridPosition::namedGridLine): Deleted. |
| (WebCore::GridPosition::spanPosition): Deleted. |
| (WebCore::GridPosition::operator==): Deleted. |
| * rendering/style/GridPositionsResolver.cpp: |
| (WebCore::GridPositionsResolver::explicitGridColumnCount): |
| (WebCore::GridPositionsResolver::explicitGridRowCount): |
| * testing/Internals.cpp: |
| (WebCore::Internals::setGridMaxTracksLimit): |
| * testing/Internals.h: |
| * testing/Internals.idl: |
| |
| 2017-03-29 Ryosuke Niwa <rniwa@webkit.org> |
| |
| Disconnecting a HTMLObjectElement does not always unload its content document |
| https://bugs.webkit.org/show_bug.cgi?id=169606 |
| |
| Reviewed by Andy Estes. |
| |
| When removing a node, we first disconnect all subframes then update the focused element as we remove each child. |
| However, when the removed element is a focused object element with a content document, removeFocusedNodeOfSubtree |
| can update the style tree synchronously inside Document::setFocusedElement, and reload the document. |
| |
| Avoid this by instantiating a SubframeLoadingDisabler on the parent of the focused element. |
| |
| Test: fast/dom/removing-focused-object-element.html |
| |
| * dom/Document.cpp: |
| (WebCore::Document::removeFocusedNodeOfSubtree): |
| |
| 2017-03-29 Myles C. Maxfield <mmaxfield@apple.com> |
| |
| Migrate to kCTFontCSSWidthAttribute |
| https://bugs.webkit.org/show_bug.cgi?id=170265 |
| |
| Reviewed by Darin Adler. |
| |
| Previously, we were mapping from Core Text widths to CSS widths in WebKit. |
| However, on some OSes, Core Text can directly tell us what the CSS width |
| value is. |
| |
| No new tests because there is no behavior change. |
| |
| * platform/graphics/cocoa/FontCacheCoreText.cpp: |
| (WebCore::getCSSAttribute): |
| (WebCore::capabilitiesForFontDescriptor): |
| * platform/spi/cocoa/CoreTextSPI.h: |
| |
| 2017-03-28 Simon Fraser <simon.fraser@apple.com> |
| |
| Make it possible to dump touch event regions for testing |
| https://bugs.webkit.org/show_bug.cgi?id=170209 |
| <rdar://problem/31309258> |
| |
| Reviewed by Tim Horton. |
| |
| Expose internals.touchEventRectsForEvent() and internals.passiveTouchEventListenerRects(), which |
| fetch data via Page. |
| |
| Because the regions are normally updated on a timer, we have to force an eager update via Document::updateTouchEventRegions(). |
| |
| Test: fast/events/touch/ios/touch-event-regions.html |
| |
| * page/Page.cpp: |
| (WebCore::Page::nonFastScrollableRects): |
| (WebCore::Page::touchEventRectsForEvent): |
| (WebCore::Page::passiveTouchEventListenerRects): |
| * page/Page.h: |
| * testing/Internals.cpp: |
| (WebCore::Internals::touchEventRectsForEvent): |
| (WebCore::Internals::passiveTouchEventListenerRects): |
| * testing/Internals.h: |
| * testing/Internals.idl: |
| |
| 2017-03-29 Zalan Bujtas <zalan@apple.com> |
| |
| RenderBlockFlow::addFloatsToNewParent should check if float is already added to the object list. |
| https://bugs.webkit.org/show_bug.cgi?id=170259 |
| <rdar://problem/31300584> |
| |
| Reviewed by Simon Fraser. |
| |
| r210145 assumed that m_floatingObjects would simply ignore the floating box if it was already in the list. |
| |
| Test: fast/block/float/placing-multiple-floats-crash.html |
| |
| * rendering/RenderBlockFlow.cpp: |
| (WebCore::RenderBlockFlow::addFloatsToNewParent): |
| |
| 2017-03-29 Myles C. Maxfield <mmaxfield@apple.com> |
| |
| Try to normalize variation ranges |
| https://bugs.webkit.org/show_bug.cgi?id=170119 |
| |
| Unreviewed. |
| |
| Addressing post-review comment. |
| |
| * platform/graphics/cocoa/FontCacheCoreText.cpp: |
| (WebCore::isGXVariableFont): |
| |
| 2017-03-29 Myles C. Maxfield <mmaxfield@apple.com> |
| |
| Try to normalize variation ranges |
| https://bugs.webkit.org/show_bug.cgi?id=170119 |
| |
| Reviewed by Simon Fraser. |
| |
| TrueType GX-style variation fonts use one particular scale for values on their |
| weight/width/slope axes - usually the values lie between -1 and 1 on that scale. |
| However, OpenType 1.8-style fonts use the CSS scale for values on these axes. |
| For the purposes of font selection, these values need to lie on the same scale. |
| However, when font selection is completed and the variation values are actually |
| being applied to the fonts, values which lie on the font's actual scale need to |
| be applied. This patch adds normalize*() and denormalize*() functions to perform |
| both of these operations. |
| |
| The conversion itself between the two scales isn't an exact mapping. Mapping |
| slope is just a linear relationship with 0deg <=> 0 and 20deg <=> 1 (as per the |
| CSS Fonts spec). Mapping widths is similar, it uses a 2-component piecewise |
| linear relationship which includes the values given in the Microsoft OpenType |
| spec for the OS/2 table's usWidthClass field. Weights are more difficult, so I |
| plotted the CSS weights and the GX-style weights for every style of San |
| Francisco, saw that the relationship appears to be linear, and ran a linear |
| regression to compute the line equation. |
| |
| As for the actual discrimination of determining whether a font is a GX-style |
| font or not, we can use the presence of the 'STAT' table. This table didn't |
| exist when GX fonts were being created, and OpenType 1.8 variable fonts are |
| required to have this table. |
| |
| Facebook uses the string ".SFNSText" in their @font-face blocks. This font is |
| a variation font, but uses the GX-style values. Facebook asks us to create |
| this font with a weight of 700, and because the values in the font are around |
| 1.0, we were erroneously thinking that the font wasn't bold, so we were then |
| applying synthetic bold. This was causing text on facebook to look fuzzy and |
| ugly. |
| |
| Test: fast/text/variations/font-selection-properties-expected.html |
| |
| * platform/graphics/cocoa/FontCacheCoreText.cpp: |
| (WebCore::isGXVariableFont): |
| (WebCore::normalizeWeight): |
| (WebCore::normalizeSlope): |
| (WebCore::denormalizeWeight): |
| (WebCore::denormalizeWidth): |
| (WebCore::denormalizeSlope): |
| (WebCore::normalizeWidth): |
| (WebCore::preparePlatformFont): Instead of using FontSelectionValues for the |
| intermediate values, we should use floats instead. This is because |
| FontSelectionValues are fixed-point numbers with the denominator having 2 bits. |
| When using this data type to represent values on the GX scale, which are usually |
| between 0 and 1, you lose a lot of fidelity. Instead, our intermediate |
| calculations should be done with floats, and converted to FontSelectionValues at |
| the end when they are representative of values on the CSS scale. |
| (WebCore::stretchFromCoreTextTraits): |
| (WebCore::fontWeightFromCoreText): |
| (WebCore::extractVariationBounds): |
| (WebCore::variationCapabilitiesForFontDescriptor): |
| (WebCore::capabilitiesForFontDescriptor): |
| |
| 2017-03-29 Saam Barati <sbarati@apple.com> |
| |
| LinkBuffer and ExecutableAllocator shouldn't have anything to do with VM |
| https://bugs.webkit.org/show_bug.cgi?id=170210 |
| |
| Reviewed by Mark Lam. |
| |
| * cssjit/SelectorCompiler.cpp: |
| (WebCore::SelectorCompiler::compileSelector): |
| (WebCore::SelectorCompiler::SelectorCodeGenerator::compile): |
| |
| 2017-03-29 Javier Fernandez <jfernandez@igalia.com> |
| |
| [css-align] Adapt self-alignment properties to the new baseline syntax |
| https://bugs.webkit.org/show_bug.cgi?id=170235 |
| |
| Reviewed by David Hyatt. |
| |
| The baseline-position syntax has changed recently, so we need to update |
| the CSS properties using the old syntax. This patch address only the |
| self-alignment (align-self and justify-self) and default-alignment |
| (align-items and justify-items). |
| |
| The content-distribution properties (align-content and justify-content) |
| will be updated in a follow up patch. |
| |
| The new baseline syntax is "[first | last ]? baseline" which implies |
| modifying the parsing and computed value logic. |
| |
| There are several layout tests affected by this change, so I'll update |
| them accordingly. |
| |
| No new tests, just added/modified some cases to the tests we already have using the new baseline values. |
| |
| * css/CSSComputedStyleDeclaration.cpp: |
| (WebCore::valueForItemPositionWithOverflowAlignment): |
| * css/CSSValueKeywords.in: |
| * css/StyleBuilderConverter.h: |
| (WebCore::StyleBuilderConverter::convertSelfOrDefaultAlignmentData): |
| * css/parser/CSSPropertyParser.cpp: |
| (WebCore::consumeBaselineKeyword): |
| (WebCore::consumeSelfPositionOverflowPosition): |
| |
| 2017-03-29 Chris Dumez <cdumez@apple.com> |
| |
| Animated SVG images are not paused in pages loaded in the background |
| https://bugs.webkit.org/show_bug.cgi?id=170043 |
| <rdar://problem/31234412> |
| |
| Reviewed by Simon Fraser. |
| |
| Animated SVG images are not paused in pages loaded in the background. We rely |
| on FrameView::isOffscreen() to stop images animations in background tab (See |
| logic in RenderElement's shouldRepaintForImageAnimation()). This works fine |
| if a tab is visble and then becomes hidden (i.e. by switching to another |
| tab). However, in the case where the tab gets loaded while in the background |
| (e.g. opening link in new background tab, or session restore), then the |
| animations would not be paused, due to FrameView::isOffscreen() erroneously |
| returning false in this case. |
| |
| Normally, the following chain of events happens: |
| - Page is visible, we construct a main frame and its FrameView for loading |
| the page. When a FrameView is constructed, we call FrameView::show() to |
| make it visible. Then, if the page becomes non-visible, we call |
| Page::setIsVisibleInternal(false) which calls FrameView::hide(). After |
| that, FrameView::isOffscreen() correctly returns true because we properly |
| called FrameView::hide(). |
| |
| However, when doing a load while the Page is hidden, the following was |
| happening: |
| - Page is not visible, we call Page::setIsVisibleInternal(false) which tries |
| to call FrameView::hide() for the main frame but it does not have a FrameView |
| yet (because the load has not started). We start the load and end up creating |
| a FrameView. The FrameView constructor was calling FrameView::show() |
| unconditionally, thus making the FrameView think is visible, even though its |
| page isn't. At this point, FrameView::isOffscreen() was returning false |
| and animations would keep running, even though the page is not visible. |
| |
| To address the issue, we now call FrameView::show() in FrameView::create() only |
| if the Page is actually visible, instead of calling it unconditionally. If the |
| page ever becomes visible, Page::setIsVisibleInternal(true) will be called and |
| it will take care of calling FrameView::show() then. |
| |
| Tests: svg/animations/animations-paused-in-background-page-iframe.html |
| svg/animations/animations-paused-in-background-page.html |
| |
| * page/FrameView.cpp: |
| (WebCore::FrameView::create): |
| |
| 2017-03-29 Wenson Hsieh <wenson_hsieh@apple.com> |
| |
| Links with empty hrefs should not be drag sources |
| https://bugs.webkit.org/show_bug.cgi?id=170241 |
| <rdar://problem/31305505> |
| |
| Reviewed by Tim Horton. |
| |
| The m_dragSouceAction member of DragController represents the drag source actions that are available to the |
| document, rather than the available actions given the dragging element. Thus, it is not correct to only check |
| that (m_dragSourceAction & DragSourceActionAttachment) before proceeding down the attachment dragging codepath. |
| This should be additionally guarded with a check that the element being dragged is, in fact, an attachment |
| element. |
| |
| New API test (see Tools/ChangeLog). |
| |
| * page/DragController.cpp: |
| (WebCore::DragController::startDrag): |
| |
| 2017-03-29 Jeremy Jones <jeremyj@apple.com> |
| |
| WebVideoFullscreenInterfaceAVKit needs a strong self ref before dispatching to the main thread. |
| https://bugs.webkit.org/show_bug.cgi?id=170129 |
| |
| Reviewed by David Kilzer. |
| |
| No new tests becuase no new behavior. |
| |
| Hold a strong reference to WebVideoFullscreenInterfaceAVKit when dispatching to the main thread. |
| Make WebVideoFullscreenInterfaceAVKit safe to retain from non-main thread. |
| |
| * platform/ios/WebVideoFullscreenInterfaceAVKit.h: |
| * platform/ios/WebVideoFullscreenInterfaceAVKit.mm: |
| (WebVideoFullscreenInterfaceAVKit::exitFullscreen): |
| |
| 2017-03-29 Zan Dobersek <zdobersek@igalia.com> |
| |
| [GCrypt] Add a Handle<> class to help with GCrypt object lifetime control |
| https://bugs.webkit.org/show_bug.cgi?id=170238 |
| |
| Reviewed by Michael Catanzaro. |
| |
| The platform-specific CryptoAlgorithmHMAC implementation is modified |
| to showcase the GCrypt::Handle<> use. HandleDeleter<gcry_mac_hd_t> |
| is added accordingly. |
| |
| * crypto/gcrypt/CryptoAlgorithmHMACGCrypt.cpp: |
| (WebCore::calculateSignature): |
| |
| 2017-03-29 Myles C. Maxfield <mmaxfield@apple.com> |
| |
| Variation fonts: Make sure that feature detection and preprocessor macros are right |
| https://bugs.webkit.org/show_bug.cgi?id=169518 |
| |
| Reviewed by Simon Fraser. |
| |
| When I added variable fonts support, I made all OSes parse the newly accepted values, |
| instead of just the OSes which support variable fonts. |
| |
| Test: fast/text/font-variations-feature-detection.html |
| |
| * css/parser/CSSPropertyParser.cpp: |
| (WebCore::consumeFontStretch): |
| (WebCore::consumeFontStyle): |
| * css/parser/CSSPropertyParserHelpers.cpp: |
| (WebCore::CSSPropertyParserHelpers::divisibleBy100): |
| (WebCore::CSSPropertyParserHelpers::consumeFontWeightNumber): |
| |
| 2017-03-29 Antoine Quint <graouts@apple.com> |
| |
| [Modern Media Controls] Controls bar may disappear while captions menu is visible (redux) |
| https://bugs.webkit.org/show_bug.cgi?id=170239 |
| <rdar://problem/31320685> |
| |
| Reviewed by Dean Jackson. |
| |
| We did some work in webkit.org/b/168751 to prevent the controls bar from disappearing while the |
| captions menu is visible. But there were two cases where the behavior was not as intended: |
| |
| 1. the controls bar would hide upon exiting the video. |
| 2. clicking on the controls bar while the caption panel is up would hide the controls bar |
| as well as the captions panel. |
| |
| Instead of determining that the "userInteractionEnabled" property being set to "false" is indicative |
| of secondary UI, such as the tracks panel, being attached to the controls bar, we now have an |
| explicit property to specify this. Now, when "hasSecondaryUIAttached" is "true", we prevent the |
| controls bar from fading when exiting the media. |
| |
| Additionally, when dismissing the tracks panel, we check whether a mouse event lead to this and check |
| if the mouse was positioned over the controls bar. If that is the case, we no longer hide the controls |
| bar and only dismiss the tracks panel. |
| |
| Test: media/modern-media-controls/tracks-panel/tracks-panel-controls-bar-remains-visible-after-clicking-over-it.html |
| |
| * Modules/modern-media-controls/controls/controls-bar.js: |
| (ControlsBar.prototype.set userInteractionEnabled): |
| (ControlsBar.prototype.handleEvent): |
| (ControlsBar.prototype._autoHideTimerFired): |
| * Modules/modern-media-controls/controls/macos-media-controls.js: |
| (MacOSMediaControls.prototype.showTracksPanel): |
| (MacOSMediaControls.prototype.hideTracksPanel): |
| |
| 2017-03-29 Antoine Quint <graouts@apple.com> |
| |
| [Modern Media Controls] Volume slider is initially empty |
| https://bugs.webkit.org/show_bug.cgi?id=170237 |
| <rdar://problem/31319077> |
| |
| Reviewed by Dean Jackson. |
| |
| Fixing fallout from https://bugs.webkit.org/show_bug.cgi?id=167935 where we changed the behavior |
| of layout() to happen prior to a commit. In this one instance, we were overriding layout() to run |
| after a commit, so we now override commit(). Otherwise, the <canvas> that we draw the volume slider |
| into would have its "width" and "height" properties set after we drew, which would clear the <canvas>. |
| |
| * Modules/modern-media-controls/controls/slider.js: |
| (Slider.prototype.commit): |
| (Slider.prototype.layout): Deleted. |
| |
| 2017-03-29 Zan Dobersek <zdobersek@igalia.com> |
| |
| [GCrypt] Move over empty GnuTLS-based SUBTLE_CRYPTO implementation files |
| https://bugs.webkit.org/show_bug.cgi?id=170232 |
| |
| Reviewed by Michael Catanzaro. |
| |
| Migrate the GnuTLS SUBTLE_CRYPTO implementation files to the gcrypt/ |
| directory. The implementation files themselves are no-op, so this is |
| a simple move-and-rename operation that will enable proceeding with |
| the libgcrypt-based implementation of SUBTLE_CRYPTO functionality. |
| |
| No change in behavior. The SUBTLE_CRYPTO feature should build as it |
| did before, and the implementations are empty anyway. |
| |
| * PlatformGTK.cmake: |
| * crypto/gcrypt/CryptoAlgorithmAES_CBCGCrypt.cpp: Renamed from Source/WebCore/crypto/gnutls/CryptoAlgorithmAES_CBCGnuTLS.cpp. |
| * crypto/gcrypt/CryptoAlgorithmAES_CFBGCrypt.cpp: Renamed from Source/WebCore/crypto/gnutls/CryptoAlgorithmAES_CFBGnuTLS.cpp. |
| * crypto/gcrypt/CryptoAlgorithmAES_GCMGCrypt.cpp: Renamed from Source/WebCore/crypto/gnutls/CryptoAlgorithmAES_GCMGnuTLS.cpp. |
| * crypto/gcrypt/CryptoAlgorithmAES_KWGCrypt.cpp: Renamed from Source/WebCore/crypto/gnutls/CryptoAlgorithmAES_KWGnuTLS.cpp. |
| * crypto/gcrypt/CryptoAlgorithmECDHGCrypt.cpp: Renamed from Source/WebCore/crypto/gnutls/CryptoAlgorithmECDHGnuTLS.cpp. |
| * crypto/gcrypt/CryptoAlgorithmPBKDF2GCrypt.cpp: Renamed from Source/WebCore/crypto/gnutls/CryptoAlgorithmPBKDF2GnuTLS.cpp. |
| * crypto/gcrypt/CryptoAlgorithmRSAES_PKCS1_v1_5GCrypt.cpp: Renamed from Source/WebCore/crypto/gnutls/CryptoAlgorithmRSAES_PKCS1_v1_5GnuTLS.cpp. |
| * crypto/gcrypt/CryptoAlgorithmRSASSA_PKCS1_v1_5GCrypt.cpp: This one already exists. |
| * crypto/gcrypt/CryptoAlgorithmRSA_OAEPGCrypt.cpp: Renamed from Source/WebCore/crypto/gnutls/CryptoAlgorithmRSA_OAEPGnuTLS.cpp. |
| * crypto/gcrypt/CryptoAlgorithmRegistryGCrypt.cpp: Renamed from Source/WebCore/crypto/gnutls/CryptoAlgorithmRegistryGnuTLS.cpp. |
| * crypto/gcrypt/CryptoKeyECGCrypt.cpp: Renamed from Source/WebCore/crypto/gnutls/CryptoKeyECGnuTLS.cpp. |
| * crypto/gcrypt/CryptoKeyRSAGCrypt.cpp: Renamed from Source/WebCore/crypto/gnutls/CryptoKeyRSAGnuTLS.cpp. |
| * crypto/gcrypt/SerializedCryptoKeyWrapGCrypt.cpp: Renamed from Source/WebCore/crypto/gnutls/SerializedCryptoKeyWrapGnuTLS.cpp. |
| * crypto/gnutls/CryptoAlgorithmRSASSA_PKCS1_v1_5GnuTLS.cpp: Removed. |
| |
| 2017-03-29 Zan Dobersek <zdobersek@igalia.com> |
| |
| [GnuTLS] Remove unused CryptoDigestGnuTLS, CryptoAlgorithmHMACGnuTLS implementation files |
| https://bugs.webkit.org/show_bug.cgi?id=170231 |
| |
| Reviewed by Michael Catanzaro. |
| |
| * crypto/gnutls/CryptoAlgorithmHMACGnuTLS.cpp: Removed. The GCrypt counterpart |
| is already in use, and this file wasn't even being built. |
| |
| 2017-03-29 Youenn Fablet <youenn@apple.com> |
| |
| Move DTMF WebRTC extension behind its own compile flag |
| https://bugs.webkit.org/show_bug.cgi?id=170226 |
| |
| Reviewed by Eric Carlson. |
| |
| Moving RTCDTMFSender and RTCDTMFToneChangeEvent behinf a WEB_RTC_DTMF compile flag. |
| This compile flag is not set on any supported platform yet. |
| Disabling related test and updated test expectations. |
| |
| * Modules/mediastream/RTCDTMFSender.cpp: |
| * Modules/mediastream/RTCDTMFSender.h: |
| * Modules/mediastream/RTCDTMFSender.idl: |
| * Modules/mediastream/RTCDTMFToneChangeEvent.cpp: |
| * Modules/mediastream/RTCDTMFToneChangeEvent.h: |
| * Modules/mediastream/RTCDTMFToneChangeEvent.idl: |
| * dom/EventNames.in: |
| * dom/EventTargetFactory.in: |
| * platform/mediastream/RTCDTMFSenderHandler.h: |
| * platform/mediastream/RTCDTMFSenderHandlerClient.h: |
| |
| 2017-03-29 Antoine Quint <graouts@apple.com> |
| |
| [mac-wk1] LayoutTest media/modern-media-controls/airplay-button/airplay-button.html is a flaky timeout |
| https://bugs.webkit.org/show_bug.cgi?id=168409 |
| <rdar://problem/30799198> |
| |
| Reviewed by Dean Jackson. |
| |
| Add a new internals setting to opt into ScriptedAnimationController logging through DOM events dispatched |
| through the document. This should allow this flaky test to get information as to why the frame isn't |
| firing when it times out. |
| |
| * dom/ScriptedAnimationController.cpp: |
| (WebCore::ScriptedAnimationController::suspend): |
| (WebCore::ScriptedAnimationController::resume): |
| (WebCore::ScriptedAnimationController::addThrottlingReason): |
| (WebCore::ScriptedAnimationController::removeThrottlingReason): |
| (WebCore::ScriptedAnimationController::registerCallback): |
| (WebCore::ScriptedAnimationController::cancelCallback): |
| (WebCore::ScriptedAnimationController::serviceScriptedAnimations): |
| (WebCore::ScriptedAnimationController::scheduleAnimation): |
| (WebCore::ScriptedAnimationController::dispatchLoggingEventIfRequired): |
| * dom/ScriptedAnimationController.h: |
| * page/Settings.in: |
| * testing/InternalSettings.cpp: |
| (WebCore::InternalSettings::resetToConsistentState): |
| (WebCore::InternalSettings::shouldDispatchRequestAnimationFrameEvents): |
| (WebCore::InternalSettings::setShouldDispatchRequestAnimationFrameEvents): |
| * testing/InternalSettings.h: |
| * testing/InternalSettings.idl: |
| |
| 2017-03-28 Youenn Fablet <youenn@apple.com> |
| |
| [WebRTC] After r214441 addIceCandidate no longer accepts an RTCIceCandidateInit dictionary |
| https://bugs.webkit.org/show_bug.cgi?id=170192 |
| |
| Reviewed by Jon Lee. |
| |
| Covered by updated tests. |
| |
| * Modules/mediastream/RTCIceCandidate.idl: Candidate is no longer a required field in RTCIceCandidateInit. |
| * Modules/mediastream/RTCPeerConnectionInternals.js: Reworking defaultsToNull to handle both undefined and null cases. |
| |
| 2017-03-28 Youenn Fablet <youenn@apple.com> |
| |
| LibWebRTCProvider should allow setting encoder and decoder factories |
| https://bugs.webkit.org/show_bug.cgi?id=170212 |
| |
| Reviewed by Eric Carlson. |
| |
| No change of behavior. |
| Adding the ability to set encoder/decoder libwebrtc factory getters. |
| Setting default cocoa factory getters. |
| |
| * platform/mediastream/libwebrtc/LibWebRTCProvider.cpp: |
| (WebCore::staticFactoryAndThreads): |
| (WebCore::initializePeerConnectionFactoryAndThreads): |
| (WebCore::LibWebRTCProvider::setDecoderFactoryGetter): |
| (WebCore::LibWebRTCProvider::setEncoderFactoryGetter): |
| (WebCore::LibWebRTCProvider::setPeerConnectionFactory): |
| * platform/mediastream/libwebrtc/LibWebRTCProvider.h: |
| |
| 2017-03-27 Brent Fulgham <bfulgham@apple.com> |
| |
| Only attach Attributes to a given element one time |
| https://bugs.webkit.org/show_bug.cgi?id=170125 |
| <rdar://problem/31279676> |
| |
| Reviewed by Chris Dumez. |
| |
| Attach the attribute node to the Element before calling 'setAttributeInternal', since that method may cause |
| arbitrary JavaScript events to fire. |
| |
| Test: fast/dom/Attr/only-attach-attr-once.html |
| |
| * dom/Element.cpp: |
| (WebCore::Element::attachAttributeNodeIfNeeded): Added. |
| (WebCore::Element::setAttributeNode): Use new method. Revise to attach attribute before calling 'setAttributeInternal'. |
| (WebCore::Element::setAttributeNodeNS): Ditto. |
| * dom/Element.h: |
| |
| 2017-03-28 Youenn Fablet <youenn@apple.com> |
| |
| Stop RTCDataChannel when closing page |
| https://bugs.webkit.org/show_bug.cgi?id=170166 |
| |
| Reviewed by Eric Carlson. |
| |
| Test: webrtc/datachannel/datachannel-gc.html |
| |
| Making RTCDataChannel an ActiveDOMObject. |
| Closing the data channel backend and freeing upon close and stop. |
| |
| * Modules/mediastream/RTCDataChannel.cpp: |
| (WebCore::RTCDataChannel::create): |
| (WebCore::RTCDataChannel::RTCDataChannel): |
| (WebCore::RTCDataChannel::close): |
| (WebCore::RTCDataChannel::stop): |
| * Modules/mediastream/RTCDataChannel.h: |
| * Modules/mediastream/RTCDataChannel.idl: |
| * Modules/mediastream/RTCPeerConnection.h: |
| |
| 2017-03-28 Myles C. Maxfield <mmaxfield@apple.com> |
| |
| Ranges for variation font properties are not enforced |
| https://bugs.webkit.org/show_bug.cgi?id=169979 |
| |
| Reviewed by David Hyatt. |
| |
| The spec specifies that: |
| - Font weights less than or equal to 0, or greater than or equal to 1000 are parse errors |
| - Font stretch values less than or equal to 0% are parse errors |
| - Font style values less than or equal to -90deg or greater than or equal to 90deg are parse errors |
| |
| Test: fast/text/variations/out-of-bounds-selection-properties.html |
| |
| * css/parser/CSSPropertyParser.cpp: |
| (WebCore::consumeFontWeightRange): |
| (WebCore::fontStretchIsWithinRange): |
| (WebCore::consumeFontStretch): |
| (WebCore::consumeFontStretchRange): |
| (WebCore::fontStyleIsWithinRange): |
| (WebCore::consumeFontStyle): |
| (WebCore::consumeFontStyleRange): |
| |
| 2017-03-28 Andy Estes <aestes@apple.com> |
| |
| [iOS] Crash in -[WebPreviewLoader failed] when running http/tests/multipart/policy-ignore-crash.php |
| https://bugs.webkit.org/show_bug.cgi?id=170197 |
| <rdar://problem/30314067> |
| |
| Reviewed by Brady Eidson. |
| |
| If QuickLook conversion fails, we call ResourceLoader::didFail() with the NSError from |
| QuickLook, which will call back into PreviewLoader::didFail(). We only care about network |
| failures in PreviewLoader, not conversion failures, so check if |
| m_finishedLoadingDataIntoConverter is set before continuing (like we do in |
| PreviewLoader::didFinishLoading()). |
| |
| Fixes crash in http/tests/multipart/policy-ignore-crash.php. |
| |
| * loader/ios/PreviewLoader.mm: |
| (WebCore::PreviewLoader::didFail): |
| |
| 2017-03-28 Chris Dumez <cdumez@apple.com> |
| |
| Audio indicator is visible on uni-watch.com but there is no audible audio |
| https://bugs.webkit.org/show_bug.cgi?id=170200 |
| <rdar://problem/31289132> |
| |
| Reviewed by Eric Carlson. |
| |
| Cherry-pick the following patch from Blink by <rtoy@chromium.org>: |
| - https://chromium.googlesource.com/chromium/src.git/+/439de5bb2a31384666db1a0e2dadb2b97d2f3ce4 |
| |
| When the gain of a GainNode is 0 or 1, the operation of the node can |
| be optimized. When gain = 1, just copy the input to the output. When |
| gain = 0; just zero out the output. Currently, the input is |
| multiplied by the gain to produce the output. This just optimizes the |
| multiplication away for the two special cases. |
| |
| Also, have the GainNode set the silence hint if the gain is 0. |
| |
| And fix a bug in processIfNecessary when unsilenceOutputs was causing the |
| silence hint to be cleared after the node's process method was finished |
| and may have set the silence hint. The processing should come after |
| unsilenceOutputs to preserve any hints from processing the node. |
| |
| * Modules/webaudio/AudioNode.cpp: |
| (WebCore::AudioNode::processIfNecessary): |
| * Modules/webaudio/GainNode.cpp: |
| (WebCore::GainNode::process): |
| * platform/audio/AudioBus.cpp: |
| (WebCore::AudioBus::copyWithGainFrom): |
| |
| 2017-03-28 Chris Dumez <cdumez@apple.com> |
| |
| Animated SVG images are not paused when outside viewport |
| https://bugs.webkit.org/show_bug.cgi?id=170155 |
| <rdar://problem/31288893> |
| |
| Reviewed by Antti Koivisto. |
| |
| Make sure animated SVG images get paused when outside the viewport, |
| similarly to what was already done for animated GIF images. Also |
| make sure they are paused when they no longer have any renderers |
| using them. |
| |
| Tests: svg/animations/animated-svg-image-outside-viewport-paused.html |
| svg/animations/animated-svg-image-removed-from-document-paused.html |
| |
| * loader/cache/CachedImage.cpp: |
| (WebCore::CachedImage::didAddClient): |
| Restart the animation whenever a new CachedImage client is added. This |
| will cause us the re-evaluate if the animation should run. The animation |
| will pause again if the new renderer is not inside the viewport. |
| |
| (WebCore::CachedImage::animationAdvanced): |
| Add a flag to newImageAnimationFrameAvailable() so that the renderers can |
| let us know if we can pause the animation. Pause the animation if all no |
| renderer requires it (i.e. they are all outside the viewport, or there |
| are no renderers). |
| |
| * loader/cache/CachedImageClient.h: |
| (WebCore::CachedImageClient::newImageAnimationFrameAvailable): |
| By default, the CachedImageClients allow pausing. Only renderer will |
| potentially prevent pausing if they are inside the viewport. |
| |
| * platform/graphics/BitmapImage.cpp: |
| (WebCore::BitmapImage::isAnimating): |
| * platform/graphics/BitmapImage.h: |
| * platform/graphics/Image.h: |
| (WebCore::Image::isAnimating): |
| Add isAnimating() flag on Image for layout testing purposes. |
| |
| * rendering/RenderElement.cpp: |
| (WebCore::RenderElement::newImageAnimationFrameAvailable): |
| Set canPause flag to true if the renderer is not inside the viewport. |
| |
| (WebCore::RenderElement::repaintForPausedImageAnimationsIfNeeded): |
| Call startAnimation() if the renderer is now visible to resume SVG |
| animations. Repainting is enough for GIF animations but not for SVG |
| animations, we have to explicitly resume them. |
| |
| * rendering/RenderElement.h: |
| * rendering/RenderView.cpp: |
| (WebCore::RenderView::addRendererWithPausedImageAnimations): |
| (WebCore::RenderView::removeRendererWithPausedImageAnimations): |
| (WebCore::RenderView::resumePausedImageAnimationsIfNeeded): |
| * rendering/RenderView.h: |
| Store CachedImages with the renderers that have paused animations. |
| This is required for SVG where we need to explicitly resume the |
| animation on the CachedImage when the renderer becomes visible |
| again. Having access to the Image will also allow us to do smarter |
| visibility checks in RenderElement's shouldRepaintForImageAnimation(), |
| in the future. |
| |
| * svg/SVGSVGElement.cpp: |
| (WebCore::SVGSVGElement::hasActiveAnimation): |
| * svg/SVGSVGElement.h: |
| Add hasActiveAnimation() method. |
| |
| * svg/graphics/SVGImage.cpp: |
| (WebCore::SVGImage::startAnimation): |
| Check that animations are paused before starting them. This avoid |
| jumping due to unnecessary calls to rootElement->setCurrentTime(0). |
| |
| (WebCore::SVGImage::isAnimating): |
| Add isAnimating() method for layout tests purposes. |
| |
| * svg/graphics/SVGImage.h: |
| * svg/graphics/SVGImageClients.h: |
| Call animationAdvanced() on the observer instead of the generic |
| changedInRect() when the SVGImage is animating. This way, we go |
| through the same code path as GIF animations and we end up calling |
| CachedImage::animationAdvanced() which calls newImageAnimationFrameAvailable() |
| on RenderElement, which determines if the animation should keep |
| running or not. |
| |
| * testing/Internals.cpp: |
| (WebCore::Internals::isImageAnimating): |
| * testing/Internals.h: |
| * testing/Internals.idl: |
| Add layout testing infrastructure. |
| |
| 2017-03-28 Antti Koivisto <antti@apple.com> |
| |
| Missing render tree position invalidation when tearing down renderers for display:contents subtree |
| https://bugs.webkit.org/show_bug.cgi?id=170199 |
| <rdar://problem/31260856> |
| |
| Reviewed by Zalan Bujtas. |
| |
| Test: fast/shadow-dom/slot-renderer-teardown.html |
| |
| * style/RenderTreeUpdater.cpp: |
| (WebCore::RenderTreeUpdater::updateElementRenderer): |
| |
| Invalidate the render tree position in case we do a teardown for an element without renderer. |
| |
| 2017-03-28 Ryan Haddad <ryanhaddad@apple.com> |
| |
| Unreviewed, rolling out r214485. |
| |
| This change caused LayoutTest crashes. |
| |
| Reverted changeset: |
| |
| "Stop RTCDataChannel when closing page" |
| https://bugs.webkit.org/show_bug.cgi?id=170166 |
| http://trac.webkit.org/changeset/214485 |
| |
| 2017-03-28 Anders Carlsson <andersca@apple.com> |
| |
| ApplePayShippingContactUpdate.idl shouldn't have status field |
| https://bugs.webkit.org/show_bug.cgi?id=170202 |
| rdar://problem/31307106 |
| |
| Reviewed by Beth Dakin. |
| |
| * Modules/applepay/ApplePaySession.cpp: |
| (WebCore::convertAndValidate): |
| If status isn't set, infer it based on whether there are errors present or not. |
| |
| * Modules/applepay/ApplePayShippingContactUpdate.h: |
| Make status optional here; it's still used by the old code path. |
| |
| * Modules/applepay/ApplePayShippingContactUpdate.idl: |
| Remove status here. |
| |
| 2017-03-28 Brian Burg <bburg@apple.com> |
| |
| Web Inspector: Add "Disable Caches" option that only applies to the inspected page while Web Inspector is open |
| https://bugs.webkit.org/show_bug.cgi?id=169865 |
| <rdar://problem/31250573> |
| |
| Reviewed by Joseph Pecoraro. |
| |
| Rewrite the network agent's command for disabling resource caching to use Page::setResourceCachingEnabled. |
| The old implementation was doing weird stuff like setting no-cache headers and evicting the |
| contents of the memory cache, neither of which is correct. The new approach has no side effects |
| on the network, disk, or memory cache so it can be turned on temporarily without causing problems. |
| |
| New tests: |
| - http/tests/inspector/network/set-resource-caching-disabled-disk-cache.html |
| - http/tests/inspector/network/set-resource-caching-disabled-memory-cache.html |
| |
| * inspector/InspectorNetworkAgent.h: |
| * inspector/InspectorNetworkAgent.cpp: |
| (WebCore::InspectorNetworkAgent::setCacheDisabled): Deleted. |
| (WebCore::InspectorNetworkAgent::setResourceCachingDisabled): Added. |
| Implement new command. |
| |
| (WebCore::InspectorNetworkAgent::willSendRequest): |
| (WebCore::InspectorNetworkAgent::mainFrameNavigated): |
| Remove crufty attempts to break caches. I believe these are intended to defeat caching |
| proxies and similar middlemen, but this is just as likely to cause unusual loading behavior. |
| |
| * page/Page.h: |
| (WebCore::Page::isResourceCachingDisabled): |
| (WebCore::Page::setResourceCachingDisabledOverride): |
| Add an override setting so that Web Inspector's override does not mess up the value |
| of isResourceCachingDisabled that may have been set by a WebKit API client. |
| |
| 2017-03-28 Youenn Fablet <youenn@apple.com> |
| |
| Fix addIceCandidate after r214441 |
| https://bugs.webkit.org/show_bug.cgi?id=170146 |
| |
| Reviewed by Chris Dumez. |
| |
| Covered by rebased test. |
| |
| * Modules/mediastream/RTCPeerConnection.js: |
| (addIceCandidate): Setting function length to 1 and throwing if no parameter is passed. |
| |
| 2017-03-28 Youenn Fablet <youenn@apple.com> |
| |
| Stop RTCDataChannel when closing page |
| https://bugs.webkit.org/show_bug.cgi?id=170166 |
| |
| Reviewed by Eric Carlson. |
| |
| Test: webrtc/datachannel/datachannel-gc.html |
| |
| Making RTCDataChannel an ActiveDOMObject. |
| Closing the data channel backend and freeing upon close and stop. |
| |
| * Modules/mediastream/RTCDataChannel.cpp: |
| (WebCore::RTCDataChannel::create): |
| (WebCore::RTCDataChannel::RTCDataChannel): |
| (WebCore::RTCDataChannel::close): |
| (WebCore::RTCDataChannel::stop): |
| * Modules/mediastream/RTCDataChannel.h: |
| * Modules/mediastream/RTCDataChannel.idl: |
| * Modules/mediastream/RTCPeerConnection.h: |
| |
| 2017-03-27 Simon Fraser <simon.fraser@apple.com> |
| |
| Enhance the touch region debug overlay to show regions for the different events |
| https://bugs.webkit.org/show_bug.cgi?id=170162 |
| |
| Reviewed by Tim Horton. |
| |
| Have NonFastScrollableRegionOverlay use a different color for each region in EventTrackingRegions, |
| and to draw a legend showing what the colors mean. |
| |
| On Mac, this overlay displays the non-fast scrollable region (which we don't keep separate from the wheel event |
| region). |
| |
| * page/DebugPageOverlays.cpp: |
| (WebCore::NonFastScrollableRegionOverlay::updateRegion): |
| (WebCore::touchEventRegionColors): |
| (WebCore::drawRightAlignedText): |
| (WebCore::NonFastScrollableRegionOverlay::drawRect): |
| (WebCore::RegionOverlay::drawRect): |
| (WebCore::RegionOverlay::drawRegion): |
| |
| 2017-03-27 Simon Fraser <simon.fraser@apple.com> |
| |
| Make sure the non-fast scrolling debug overlay is correctly updated |
| https://bugs.webkit.org/show_bug.cgi?id=170142 |
| |
| Reviewed by Tim Horton. |
| |
| AsyncScrollingCoordinator::frameViewEventTrackingRegionsChanged() is called on a timer |
| from Document code, so the existing DebugPageOverlays::didLayout() call at the end |
| of FrameView::layout() wasn't sufficient to keep the non-fast scrollable region up-to-date |
| on iOS. |
| |
| * page/scrolling/AsyncScrollingCoordinator.cpp: |
| (WebCore::AsyncScrollingCoordinator::frameViewEventTrackingRegionsChanged): |
| |
| 2017-03-28 Antoine Quint <graouts@apple.com> |
| |
| [Modern Media Controls] AirPlay placard text looks bad on 1x displays |
| https://bugs.webkit.org/show_bug.cgi?id=170183 |
| <rdar://problem/30663416> |
| |
| Reviewed by Dean Jackson. |
| |
| Use subpixel antialiasing for all text in modern media controls. |
| |
| * Modules/modern-media-controls/controls/media-controls.css: |
| (.media-controls-container,): |
| |
| 2017-03-28 Antoine Quint <graouts@apple.com> |
| |
| [Modern Media Controls] Improve appearance of tracks panel on macOS |
| https://bugs.webkit.org/show_bug.cgi?id=168929 |
| <rdar://problem/30741589> |
| |
| Reviewed by Eric Carlson. |
| |
| We use a solid color for the focus state that matches the style used on macOS |
| and blend the titles the same way we blend other non-solid labels in the controls bar. |
| |
| * Modules/modern-media-controls/controls/tracks-panel.css: |
| (.tracks-panel section): |
| (.tracks-panel section > h3): |
| (.tracks-panel section > ul > li:focus): |
| |
| 2017-03-28 Yoav Weiss <yoav@yoav.ws> |
| |
| Add a warning for unused link preloads. |
| https://bugs.webkit.org/show_bug.cgi?id=165670 |
| |
| Reviewed by Youenn Fablet. |
| |
| Tests: http/tests/preload/single_download_preload_headers_charset.php |
| http/tests/preload/unused_preload_warning.html |
| |
| * dom/Document.cpp: |
| (WebCore::Document::prepareForDestruction): Stop the timer once the document is destructed. |
| * loader/LinkPreloadResourceClients.h: Add shouldMarkAsReferenced overides for the LinkPreloadResourceClient classes. |
| * loader/cache/CachedResource.cpp: |
| (WebCore::CachedResource::addClientToSet): Make sure LinkPreloadResourceClients don't set resource to be referenced. |
| * loader/cache/CachedResourceClient.h: |
| (WebCore::CachedResourceClient::shouldMarkAsReferenced): Make sure that ResourceClients mark preloads as referenced by default. |
| * loader/cache/CachedResourceLoader.cpp: |
| (WebCore::CachedResourceLoader::CachedResourceLoader): Initialize timer. |
| (WebCore::CachedResourceLoader::~CachedResourceLoader): Stop timer. |
| (WebCore::CachedResourceLoader::documentDidFinishLoadEvent): Trigger a timer if preloads weren't cleared at load time. |
| (WebCore::CachedResourceLoader::stopUnusedPreloadsTimer): Stop the timer. |
| (WebCore::CachedResourceLoader::warnUnusedPreloads): Iterate over m_preloads and issue a warning for non-referenced preloads. |
| * loader/cache/CachedResourceLoader.h: |
| * page/DOMWindow.cpp: |
| (WebCore::DOMWindow::willDetachDocumentFromFrame): Clear Resource Timing buffer when document detaches, to avoid test flakiness. |
| |
| 2017-03-28 Antoine Quint <graouts@apple.com> |
| |
| REGRESSION: Double-clicking the captions button while the captions popover is open prevents the popover from being opened again |
| https://bugs.webkit.org/show_bug.cgi?id=170171 |
| <rdar://problem/31095500> |
| |
| Reviewed by Dean Jackson. |
| |
| We used to consider that the tracks panel was presented as long as it had a parent, but since we were using for the animated |
| transition to complete before actually removing the panel from the node hierarchy, consecutive calls to hide then present |
| would fail to present the panel. We now use a private instance variable to track the presented state which is set immediately |
| as presentInParent() and hide() are called. |
| |
| Test: media/modern-media-controls/tracks-support/tracks-support-show-panel-then-double-click-on-tracks-button.html |
| |
| * Modules/modern-media-controls/controls/tracks-panel.js: |
| (TracksPanel.prototype.get presented): |
| (TracksPanel.prototype.presentInParent): |
| (TracksPanel.prototype.hide): |
| |
| 2017-03-28 Aaron Chu <aaron_chu@apple.com> |
| |
| AX: Media controls should be able to be re-activated after faded away |
| https://bugs.webkit.org/show_bug.cgi?id=170048 |
| <rdar://problem/30157179> |
| |
| Reviewed by Antoine Quint. |
| |
| Added a "foucsin" listener for the controls bar so that when an element |
| within fires a "focusin" event, the controls bar reappears if it is faded. |
| |
| Test: media/modern-media-controls/media-controls/media-controls-appear-when-focus.html |
| |
| * Modules/modern-media-controls/controls/controls-bar.js: |
| (ControlsBar.prototype.handleEvent): |
| |
| 2017-03-28 Antoine Quint <graouts@apple.com> |
| |
| [Modern Media Controls] Improve media documents across macOS, iPhone and iPad |
| https://bugs.webkit.org/show_bug.cgi?id=169145 |
| <rdar://problem/17048858> |
| |
| Reviewed by Dean Jackson. |
| |
| There were a variety of issues with media documents, some longstanding, and some specifically |
| about modern media controls. |
| |
| One issue was that fullscreen and picture-in-picture buttons would show for audio media documents, |
| due to using a <video> element to load the audio file. We now have additional logic in MediaController |
| to identify if the loaded media is really an audio file, and using this information to hide the |
| fullscreen and picture-in-picture buttons. |
| |
| Another issue was that we would inject style in MediaDocument.cpp that was specific to modern media |
| controls when we could have the modern-media-controls module injected CSS handle this styling. We now |
| use the injected style in the shadow root to size media documents based on the device characteristics |
| and ensuring that page styles are overridden. |
| |
| We also simplify how MediaDocument.cpp sets the source of the media element to simply use the "src" |
| attribute and not a <source> element. |
| |
| Finally, we introduce a MediaDocumentController class that is instantiated when we're dealing with |
| a media document to hide the controls while we determine the type of media we're loading (audio vs. |
| video) in order to apply the appropriate styling without flashes. |
| |
| As a result of the new styles applied by the modern-media-controls module, media documents have a |
| similar behavior on macOS and iPad, where we only enforce a min-width for video allowing them |
| to play at their natural size otherwise, and enforcing a fixed width for audio. On iPhone however, |
| we want to always play the media at full width, with some padding in the case of audio. |
| |
| Tests: media/modern-media-controls/fullscreen-support/fullscreen-support-disabled-video-with-audio-tracks-only.html |
| media/modern-media-controls/media-documents/ipad/media-document-audio-ios-sizing.html |
| media/modern-media-controls/media-documents/ipad/media-document-video-ios-sizing.html |
| media/modern-media-controls/media-documents/media-document-audio-ios-sizing.html |
| media/modern-media-controls/media-documents/media-document-audio-mac-sizing.html |
| media/modern-media-controls/media-documents/media-document-video-ios-sizing.html |
| media/modern-media-controls/media-documents/media-document-video-mac-sizing.html |
| media/modern-media-controls/pip-support/pip-support-disabled-video-with-audio-tracks-only.html |
| |
| * Modules/modern-media-controls/controls/ios-inline-media-controls.css: |
| (:host(audio) .media-controls.ios.inline > .controls-bar:before,): |
| (:host(audio) .media-controls.ios.inline > .controls-bar:before): Deleted. |
| * Modules/modern-media-controls/controls/macos-media-controls.css: |
| (:host(audio) .media-controls.mac.inline > .controls-bar,): |
| (:host(audio) .media-controls.mac.inline > .controls-bar > .background-tint,): |
| (:host(audio) .media-controls.mac.inline > .controls-bar): Deleted. |
| (:host(audio) .media-controls.mac.inline > .controls-bar > .background-tint): Deleted. |
| * Modules/modern-media-controls/controls/media-document.css: Copied from Source/WebCore/Modules/modern-media-controls/controls/macos-media-controls.css. |
| (:host(.media-document)): |
| (:host(.media-document.ready)): |
| (:host(.media-document.audio.mac)): |
| (:host(.media-document.audio.ipad)): |
| (:host(.media-document.audio.iphone)): |
| (:host(.media-document.video.mac)): |
| (:host(.media-document.video.ipad)): |
| (:host(.media-document.video.iphone)): |
| * Modules/modern-media-controls/js-files: |
| * Modules/modern-media-controls/media/fullscreen-support.js: |
| (FullscreenSupport.prototype.syncControl): |
| (FullscreenSupport): |
| * Modules/modern-media-controls/media/media-controller.js: |
| (MediaController): |
| (MediaController.prototype.get isAudio): |
| * Modules/modern-media-controls/media/media-document-controller.js: Copied from Source/WebCore/Modules/modern-media-controls/media/fullscreen-support.js. |
| (MediaDocumentController): |
| (MediaDocumentController.prototype.handleEvent): |
| (MediaDocumentController.prototype._mediaDocumentHasMetadata): |
| (MediaDocumentController.prototype._mediaDocumentHasSize): |
| * Modules/modern-media-controls/media/pip-support.js: |
| (PiPSupport.prototype.syncControl): |
| (PiPSupport): |
| * html/MediaDocument.cpp: |
| (WebCore::MediaDocumentParser::createDocumentStructure): |
| |
| 2017-03-28 Myles C. Maxfield <mmaxfield@apple.com> |
| |
| Follow-up patch after r214364. |
| https://bugs.webkit.org/show_bug.cgi?id=168895 |
| |
| Unreviewed. |
| |
| * platform/graphics/FontDescription.cpp: |
| (WebCore::FontDescription::FontDescription): |
| |
| 2017-03-27 Said Abou-Hallawa <sabouhallawa@apple.com> |
| |
| REGRESSION(213764): Large images should not be decoded asynchronously when they are drawn on a canvas |
| https://bugs.webkit.org/show_bug.cgi?id=169771 |
| |
| Reviewed by Simon Fraser. |
| |
| Sometimes we have to draw the image immediately like when a canvas calls |
| drawImage. In this case we have to decode the image synchronously to guarantee |
| the drawing. Other times we need to decode with the native size of the image. |
| The animated images have to be decoded with native size always. Otherwise |
| the frame cache will be messed up if the same image is animated with different |
| sizes. Currently we always decode asynchronously with sizeForDrawing. We need |
| to decouple the decoding mode from the sizeForDrawing. |
| |
| This patch introduce the DecodingOptions class which can store and compare the |
| following four cases: |
| -- Synchronous: The frame has be decoded with native size only. |
| -- Asynchronous + anySize: This is passed from the Image::draw() callers. |
| -- Asynchronous + fullSize: The image has to be decoded with its full size. |
| -- Asynchronous + sizeForDrawing: The image can be decoded with sizeForDrawing unless |
| it was decoded with either a full size or sizeForDrawing which is larger than the |
| requested sizeForDrawing. |
| |
| A new argument of type DecodingMode will be added to Image::draw() function. |
| Only when the drawing comes from the render tree, it will be Asynchronous. |
| Otherwise it will be Synchronous. |
| |
| Tests: fast/images/animated-image-different-dest-size.html |
| fast/images/async-image-background-image.html |
| fast/images/async-image-canvas-draw-image.html |
| |
| * WebCore.xcodeproj/project.pbxproj: |
| * platform/graphics/BitmapImage.cpp: |
| (WebCore::BitmapImage::frameImageAtIndexCacheIfNeeded): Gets the frame image, cache it synchronously if |
| the current one is invalid. frameImageAtIndex() returns whatever stored in the cache. |
| (WebCore::BitmapImage::nativeImage): Call frameImageAtIndexCacheIfNeeded() instead of frameImageAtIndex(). |
| (WebCore::BitmapImage::nativeImageForCurrentFrame): Ditto. |
| (WebCore::BitmapImage::nativeImageOfSize): Ditto. |
| (WebCore::BitmapImage::framesNativeImages): Ditto. |
| (WebCore::BitmapImage::draw): Change the logic to do the following: |
| -- The animated image has to be decoded with its full size. |
| -- The animated image expects the current frame to be ready for drawing. |
| -- The large image decoding does not need to call internalStartAnimation(). |
| -- The large image has to request async image decoding but draw the current one if it exists. |
| (WebCore::BitmapImage::drawPattern): Draw the pattern synchronously. |
| (WebCore::BitmapImage::shouldUseAsyncDecodingForLargeImages): Delete the call to shouldUseAsyncDecodingForTesting() |
| since it is only applied for animated images. |
| (WebCore::BitmapImage::shouldUseAsyncDecodingForAnimatedImages): Call shouldUseAsyncDecodingForAnimatedImageForTesting(). |
| (WebCore::BitmapImage::internalStartAnimation): Request decoding with the full size. |
| (WebCore::BitmapImage::advanceAnimation): Call shouldUseAsyncDecodingForAnimatedImageForTesting(). |
| (WebCore::BitmapImage::internalAdvanceAnimation): Assert the current frame is not being decoding asynchronously for any size. |
| (WebCore::BitmapImage::frameImageAtIndex): Deleted. Moved to the header file but with a new purpose: return |
| the current frame from the frame cache as is; do not cache a new one. |
| (WebCore::BitmapImage::shouldUseAsyncDecodingForLargeImage): Deleted. Function was renamed to shouldUseAsyncDecodingForLargeImages. |
| (WebCore::BitmapImage::shouldUseAsyncDecodingForAnimatedImage): Deleted. Function was renamed to shouldUseAsyncDecodingForAnimatedImages. |
| * platform/graphics/BitmapImage.h: |
| * platform/graphics/CrossfadeGeneratedImage.cpp: |
| (WebCore::CrossfadeGeneratedImage::draw): Add a new argument of type DecodingMode. |
| * platform/graphics/CrossfadeGeneratedImage.h: |
| * platform/graphics/DecodingOptions.h: Added. |
| (WebCore::DecodingOptions::DecodingOptions): Default constructor: Synchronous mode. |
| (WebCore::DecodingOptions::operator==): Compares two DecodingOptions for equality. |
| (WebCore::DecodingOptions::isSynchronous): Is the frame decoded synchronously? |
| (WebCore::DecodingOptions::isAsynchronous): Is the frame decoded asynchronously? |
| (WebCore::DecodingOptions::isAsynchronousCompatibleWith): Is this DecodingOptions compatible with another one? |
| (WebCore::DecodingOptions::hasFullSize): Is the decoding mode asynchronous but for the image full size? |
| (WebCore::DecodingOptions::hasSizeForDrawing): Is this decoding mode asynchronous but for a sizeForDrawing? |
| (WebCore::DecodingOptions::sizeForDrawing): Returns the sizeForDrawing. m_decodingModeOrSize has to hold an IntSize. |
| (WebCore::DecodingOptions::maxDimension): Moved form ImageFrame.cpp. |
| (WebCore::DecodingOptions::has): A helper function. |
| (WebCore::DecodingOptions::hasDecodingMode): Does m_decodingModeOrSize a DecodingMode? |
| (WebCore::DecodingOptions::hasSize): Does m_decodingModeOrSize an IntSize? |
| * platform/graphics/GeneratedImage.h: Add a new argument of type DecodingMode. |
| * platform/graphics/GradientImage.cpp: |
| (WebCore::GradientImage::draw): Ditto. |
| * platform/graphics/GradientImage.h: Ditto. |
| * platform/graphics/GraphicsContext.cpp: |
| (WebCore::GraphicsContext::drawImage): Pass the ImagePaintingOptions::m_DecodingMode to Image::draw(). |
| * platform/graphics/GraphicsContext.h: |
| (WebCore::ImagePaintingOptions::ImagePaintingOptions): Add a new member of type DecodingMode to ImagePaintingOptions. |
| * platform/graphics/Image.cpp: |
| (WebCore::Image::drawTiled): Pass DecodingMode::Synchronous to Image::draw(). |
| * platform/graphics/Image.h: Add a new argument of type DecodingMode to Image::draw(). |
| * platform/graphics/ImageFrame.cpp: |
| (WebCore::ImageFrame::operator=): Replace m_sizeForDrawing by m_decodingOptions. |
| (WebCore::ImageFrame::hasNativeImage): Check if m_nativeImage is valid and the subsamplingLevels match. |
| (WebCore::ImageFrame::hasFullSizeNativeImage): Checks hasNativeImage() and whether the image frame was |
| decoded for the image full size. |
| (WebCore::ImageFrame::hasDecodedNativeImageCompatibleWithOptions): Checks hasNativeImage() and the DecodingOptions match. |
| (WebCore::maxDimension): Deleted. Moved to DecodingOptions.h. |
| (WebCore::ImageFrame::isBeingDecoded): Deleted. The check for having an ImageFrame being decoded is |
| moved to ImageFrameCache. |
| (WebCore::ImageFrame::hasValidNativeImage): Deleted. No need to this function. |
| * platform/graphics/ImageFrame.h: |
| (WebCore::ImageFrame::hasNativeImage): Add an std::optional<SubsamplingLevel> argument. |
| (WebCore::ImageFrame::hasFullSizeNativeImage): Checks whether the ImageFrame was decoded for the image full size. |
| (WebCore::ImageFrame::enqueueSizeForDecoding): Deleted. |
| (WebCore::ImageFrame::dequeueSizeForDecoding): Deleted. |
| (WebCore::ImageFrame::clearSizeForDecoding): Deleted. |
| (WebCore::ImageFrame::isBeingDecoded): Deleted. |
| (WebCore::ImageFrame::sizeForDrawing): Deleted. |
| (WebCore::ImageFrame::hasDecodedNativeImage): Deleted. |
| The logic of knowing whether an ImageFrame is being decoded is moved to ImageFrameCache. |
| * platform/graphics/ImageFrameCache.cpp: |
| (WebCore::ImageFrameCache::cacheFrameMetadataAtIndex): Caches the metadata of an ImageFrame. If the NativeImage |
| was decoded for a sizeForDrawing, the size of the ImageFrame will be the nativeImageSize(). Otherwise, the |
| frameSizeAtIndex() will be called. |
| (WebCore::ImageFrameCache::cacheFrameNativeImageAtIndex): Cache a new NativeImage which involves caching new |
| metadata and updating the memory cache. No need to check if the existing native image is valid or not for the |
| DecodingOptions. Actually it would be a bug if it happens. This is why cacheNativeImageForFrameRequest() asserts |
| !frame.hasAsyncNativeImage() before calling cacheFrameNativeImageAtIndex(). |
| (WebCore::ImageFrameCache::cacheAsyncFrameNativeImageAtIndex): Cache new NativeImage which was decoded asynchronously. |
| (WebCore::ImageFrameCache::startAsyncDecodingQueue): Call cacheAsyncFrameNativeImageAtIndex() instead of |
| cacheNativeImageForFrameRequest() for clarity. |
| (WebCore::ImageFrameCache::requestFrameAsyncDecodingAtIndex): Call hasAsyncNativeImage() instead of hasValidNativeImage() |
| Call frameIsDecodingCompatibleWithOptionsAtIndex() instead of frame.isBeingDecoded(). Replace the call to enqueueSizeForDecoding() |
| by appending the same ImageFrameRequest to m_frameCommitQueue. |
| (WebCore::ImageFrameCache::isAsyncDecodingQueueIdle): Use m_frameCommitQueue to answer the question whether the decodingQueue is idle. |
| (WebCore::ImageFrameCache::stopAsyncDecodingQueue): Use m_frameCommitQueue to loop through all the ImageFrames which are currently being decoded. |
| (WebCore::ImageFrameCache::frameAtIndexCacheIfNeeded): For getting the metadata, this function needs a valid frame. If it is requested |
| to decode the nativeImage, it has to do it synchronously. |
| (WebCore::ImageFrameCache::singlePixelSolidColor): Don't cache the frame if it is an animated image or the size is not a single pixel. |
| (WebCore::ImageFrameCache::frameIsBeingDecodedAndIsCompatibleWithOptionsAtIndex): Use m_frameCommitQueue to answer the question whether an ImageFrame |
| is being decoded and is compatible with DecodingOptions. |
| (WebCore::ImageFrameCache::frameHasFullSizeNativeImageAtIndex): Calls ImageFrame::hasFullNativeImage() for a frame. |
| (WebCore::ImageFrameCache::frameHasDecodedNativeImageCompatibleWithOptionsAtIndex): Calls ImageFrame::hasDecodedNativeImageCompatibleWithOptions() for a frame. |
| (WebCore::ImageFrameCache::frameImageAtIndex): Returns the current NativeImage without caching. |
| (WebCore::ImageFrameCache::frameImageAtIndexCacheIfNeeded): Returns the current NativeImage but cache it synchronously if needed. |
| (WebCore::ImageFrameCache::setFrameNativeImageAtIndex): Deleted. |
| (WebCore::ImageFrameCache::setFrameMetadataAtIndex): Deleted. |
| (WebCore::ImageFrameCache::replaceFrameNativeImageAtIndex): Deleted. |
| (WebCore::ImageFrameCache::frameIsBeingDecodedAtIndex): Deleted. |
| (WebCore::ImageFrameCache::frameHasImageAtIndex): Deleted. |
| (WebCore::ImageFrameCache::frameHasValidNativeImageAtIndex): Deleted. |
| (WebCore::ImageFrameCache::frameHasDecodedNativeImage): Deleted. |
| * platform/graphics/ImageFrameCache.h: Two ImageFrameRequest queues will be used. |
| -- The existing one m_frameRequestQueue which is shared between the main thread and decoding thread. The requests will be |
| dequeued from it before starting the decoding. The decoded NativeImage will be cached only on the main thread. The decoding |
| thread is not blocked by the callOnMainThread(). This means there might be multiple ImageFrameRequests which were dequeued |
| while their NativeImages have not been cached yet. |
| -- A new one m_frameCommitQueue which is track all the ImageFrameRequests whose NativeImages have not been cached yet. |
| (WebCore::ImageFrameCache::frameAtIndexCacheIfNeeded): Be explicit about caching the image frame. frameImageAtIndex() |
| returns the current image frame without caching. frameAtIndexCacheIfNeeded(). returns the current image frame but cache |
| it if needed. |
| (WebCore::ImageFrameCache::ImageFrameRequest::operator==): Compares two ImageFrameRequests for equality. |
| * platform/graphics/ImageSource.cpp: |
| (WebCore::ImageSource::frameImageAtIndexCacheIfNeeded): |
| (WebCore::ImageSource::frameImageAtIndex): Deleted. |
| * platform/graphics/ImageSource.h: |
| (WebCore::ImageSource::requestFrameAsyncDecodingAtIndex): Change the type of the argument from IntSize to be const std::optional<IntSize>. |
| (WebCore::ImageSource::frameIsBeingDecodedAndIsCompatibleWithOptionsAtIndex): Rename of frameIsBeingDecodedAtIndex(). Replace the argument of type |
| std::optional<IntSize> by an argument of type DecodingOptions. |
| (WebCore::ImageSource::frameHasFullSizeNativeImageAtIndex): A wrapper around the ImageFrameCache function. |
| (WebCore::ImageSource::frameHasDecodedNativeImageCompatibleWithOptionsAtIndex): Ditto. |
| (WebCore::ImageSource::frameImageAtIndex): Ditto. |
| (WebCore::ImageSource::frameIsBeingDecodedAtIndex): Deleted. |
| (WebCore::ImageSource::frameHasValidNativeImageAtIndex): Deleted. |
| (WebCore::ImageSource::frameHasDecodedNativeImage): Deleted. |
| * platform/graphics/NamedImageGeneratedImage.cpp: |
| (WebCore::NamedImageGeneratedImage::draw): Add a new argument of type DecodingMode. |
| * platform/graphics/NamedImageGeneratedImage.h: Ditto. |
| * platform/graphics/cairo/ImageBufferCairo.cpp: |
| (WebCore::ImageBuffer::draw): Add a new argument of type DecodingMode. |
| * platform/graphics/cg/ImageDecoderCG.cpp: |
| (WebCore::ImageDecoder::createFrameImageAtIndex): Replace the sizeForDrawing argument by a DecodingMode argument. Add a new handling |
| for decoding asynchronously for the image full size. |
| * platform/graphics/cg/ImageDecoderCG.h: Change the prototype of the function. |
| * platform/graphics/cg/PDFDocumentImage.cpp: |
| (WebCore::PDFDocumentImage::draw): Add a new argument of type DecodingMode. |
| * platform/graphics/cg/PDFDocumentImage.h: |
| * platform/graphics/win/ImageCGWin.cpp: |
| (WebCore::BitmapImage::getHBITMAPOfSize): Pass DecodingMode::Synchronous to Image::draw(). |
| (WebCore::BitmapImage::drawFrameMatchingSourceSize): Ditto. |
| * platform/graphics/win/ImageDecoderDirect2D.cpp: |
| (WebCore::ImageDecoder::createFrameImageAtIndex): Replace the sizeForDrawing argument by a DecodingMode argument. |
| * platform/graphics/win/ImageDecoderDirect2D.h: Change the prototype of the function. |
| * platform/image-decoders/ImageDecoder.cpp: |
| (WebCore::ImageDecoder::createFrameImageAtIndex): Replace the sizeForDrawing argument by a DecodingMode argument. |
| * platform/image-decoders/ImageDecoder.h: Change the prototype of the function. |
| * rendering/RenderBoxModelObject.cpp: |
| (WebCore::RenderBoxModelObject::paintFillLayerExtended): Draw the background image asynchronously if the image size is large. |
| * rendering/RenderImage.cpp: |
| (WebCore::RenderImage::paintIntoRect): Draw the background image element asynchronously if the image size is large. |
| * svg/graphics/SVGImage.cpp: |
| (WebCore::SVGImage::drawForContainer): Pass DecodingMode::Synchronous to draw(). |
| (WebCore::SVGImage::nativeImageForCurrentFrame): Ditto. |
| (WebCore::SVGImage::nativeImage): Ditto. |
| (WebCore::SVGImage::draw): Add a new argument of type DecodingMode. |
| * svg/graphics/SVGImage.h: Change the prototype of the function. |
| * svg/graphics/SVGImageForContainer.cpp: |
| (WebCore::SVGImageForContainer::draw): Add a new argument of type DecodingMode. |
| * svg/graphics/SVGImageForContainer.h: Change the prototype of the function. |
| |
| 2017-03-27 Youenn Fablet <youenn@apple.com> |
| |
| Activate release libwebrtc logging when WebRTC log channel is on |
| https://bugs.webkit.org/show_bug.cgi?id=169659 |
| |
| Reviewed by Alex Christensen. |
| |
| * platform/mediastream/libwebrtc/LibWebRTCProvider.cpp: |
| (WebCore::initializePeerConnectionFactoryAndThreads): |
| |
| 2017-03-27 Antti Koivisto <antti@apple.com> |
| |
| Move visibleInViewportStateChanged callback from Element to render tree |
| https://bugs.webkit.org/show_bug.cgi?id=170039 |
| |
| Reviewed by Zalan Bujtas. |
| |
| Make it easier to use from the render tree. |
| |
| Also for simplicity move the bits from RenderObject rare data to RenderElement. |
| There is plenty of space there. |
| |
| * dom/Element.h: |
| (WebCore::Element::isVisibleInViewportChanged): Deleted. |
| * html/HTMLMediaElement.h: |
| * rendering/RenderElement.cpp: |
| (WebCore::RenderElement::RenderElement): |
| (WebCore::RenderElement::willBeDestroyed): |
| (WebCore::RenderElement::registerForVisibleInViewportCallback): |
| (WebCore::RenderElement::unregisterForVisibleInViewportCallback): |
| (WebCore::RenderElement::setVisibleInViewportState): |
| (WebCore::RenderElement::visibleInViewportStateChanged): |
| * rendering/RenderElement.h: |
| (WebCore::RenderElement::visibleInViewportState): |
| * rendering/RenderObject.cpp: |
| (WebCore::RenderObject::setIsRegisteredForVisibleInViewportCallback): Deleted. |
| (WebCore::RenderObject::setVisibleInViewportState): Deleted. |
| * rendering/RenderObject.h: |
| (WebCore::RenderObject::hasOutlineAutoAncestor): |
| (WebCore::RenderObject::RenderObjectRareData::RenderObjectRareData): |
| (WebCore::RenderObject::isRegisteredForVisibleInViewportCallback): Deleted. |
| (WebCore::RenderObject::visibleInViewportState): Deleted. |
| * rendering/RenderVideo.cpp: |
| (WebCore::RenderVideo::visibleInViewportStateChanged): |
| * rendering/RenderVideo.h: |
| * rendering/RenderView.cpp: |
| (WebCore::RenderView::updateVisibleViewportRect): |
| |
| 2017-03-27 Youenn Fablet <youenn@apple.com> |
| |
| addIceCandidate should not throw if passed null or undefined |
| https://bugs.webkit.org/show_bug.cgi?id=170118 |
| |
| Reviewed by Eric Carlson. |
| |
| Covered by updated test. |
| |
| A null/undefined candidate passed to addIceCandidate means end of Ice candidate.. |
| |
| * Modules/mediastream/PeerConnectionBackend.cpp: |
| (WebCore::PeerConnectionBackend::addIceCandidate): |
| * Modules/mediastream/PeerConnectionBackend.h: |
| (WebCore::PeerConnectionBackend::endOfIceCandidates): |
| * Modules/mediastream/RTCPeerConnection.cpp: |
| (WebCore::RTCPeerConnection::queuedAddIceCandidate): |
| * Modules/mediastream/RTCPeerConnection.h: |
| * Modules/mediastream/RTCPeerConnection.idl: |
| * Modules/mediastream/RTCPeerConnection.js: |
| (addIceCandidate): |
| |
| 2017-03-27 Antti Koivisto <antti@apple.com> |
| |
| Allow the page to render before <link> stylesheet tags in body |
| https://bugs.webkit.org/show_bug.cgi?id=149157 |
| <rdar://problem/24658830> |
| |
| Reviewed by Simon Fraser. |
| |
| Currently we block style and renderer building completely if document has any loading |
| stylesheets. In case a script queries something layout dependent we construct the render |
| tree with whatever style we have but block painting in it. |
| |
| This patch changes behavior so that a loading stylesheet in body only blocks rendering for elements |
| that are after it. The expectation is that such stylesheets rarely affect elements before them |
| and the elements can be rendered without causing ugly visible styling changes. |
| |
| The patch replaces the old flash-of-unstyled-content (FOUC) preventation mechanism with a more |
| fine-grained one. Paint blocking is now done on per-renderer basis with based on isNonFinal flag in |
| RenderStyle. |
| |
| For stylesheets in head the behavior should be largely unchanged. |
| |
| Test: http/tests/incremental/stylesheet-body-incremental-rendering.html |
| |
| * css/StyleResolver.cpp: |
| (WebCore::StyleResolver::pseudoStyleRulesForElement): |
| * dom/Document.cpp: |
| (WebCore::Document::Document): |
| (WebCore::Document::resolveStyle): |
| (WebCore::Document::updateLayoutIgnorePendingStylesheets): |
| |
| Remove the old FOUC preventation state tracking. |
| |
| (WebCore::Document::shouldScheduleLayout): |
| (WebCore::Document::didRemoveAllPendingStylesheet): |
| |
| Repaints will now get triggered by the normal style mechanism. |
| |
| * dom/Document.h: |
| (WebCore::Document::hasNodesWithNonFinalStyle): |
| (WebCore::Document::setHasNodesWithNonFinalStyle): |
| |
| Track if we need to recompute the style later because non-final or unstyled elements. |
| |
| (WebCore::Document::didLayoutWithPendingStylesheets): Deleted. |
| (WebCore::Document::hasNodesWithPlaceholderStyle): Deleted. |
| (WebCore::Document::setHasNodesWithPlaceholderStyle): Deleted. |
| * html/HTMLFrameSetElement.cpp: |
| (WebCore::HTMLFrameSetElement::rendererIsNeeded): |
| * page/FrameView.cpp: |
| (WebCore::FrameView::qualifiesAsVisuallyNonEmpty): |
| |
| Don't qualify as visually non-empty if we have loading stylesheets in head (even if there is |
| a fouc-prevented render tree). |
| |
| (WebCore::FrameView::fireLayoutRelatedMilestonesIfNeeded): |
| * rendering/RenderBlock.cpp: |
| (WebCore::RenderBlock::paintContents): |
| |
| Instead of a global test, block painting if isNonFinal is set in the renderer's style. |
| |
| * rendering/RenderLayer.cpp: |
| (WebCore::shouldSuppressPaintingLayer): |
| * rendering/style/RenderStyle.cpp: |
| (WebCore::RenderStyle::changeRequiresRepaint): |
| |
| The isNonFinal flag prevents painting so we need to trigger repaint when it gets cleared. |
| |
| * rendering/style/RenderStyle.h: |
| (WebCore::RenderStyle::isNotFinal): |
| (WebCore::RenderStyle::setIsNotFinal): |
| (WebCore::RenderStyle::isPlaceholderStyle): Deleted. |
| (WebCore::RenderStyle::setIsPlaceholderStyle): Deleted. |
| |
| There is no need for placeholder styles anymore. Reuse the bit for isNotFinal. |
| |
| * rendering/style/StyleRareNonInheritedData.cpp: |
| (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData): |
| (WebCore::StyleRareNonInheritedData::operator==): |
| * rendering/style/StyleRareNonInheritedData.h: |
| * style/StyleScope.cpp: |
| (WebCore::Style::Scope::analyzeStyleSheetChange): |
| (WebCore::Style::Scope::updateActiveStyleSheets): |
| * style/StyleTreeResolver.cpp: |
| (WebCore::Style::TreeResolver::styleForElement): |
| (WebCore::Style::TreeResolver::resolveElement): |
| |
| If we have seens a loading stylesheet and don't have a renderer yet don't style the element. |
| In case there is a renderer or we are ignoring pending sheets, resolve the style normally |
| but mark it as non-final. |
| |
| (WebCore::Style::makePlaceholderStyle): Deleted. |
| |
| 2017-03-27 Myles C. Maxfield <mmaxfield@apple.com> |
| |
| Test variation font ranges in the CSS Font Loading API |
| https://bugs.webkit.org/show_bug.cgi?id=170022 |
| |
| Reviewed by Dean Jackson. |
| |
| Test: fast/text/variations/font-loading-api-parse-ranges.html |
| |
| Don't use keywords when reporting font variation range values. |
| |
| * css/CSSComputedStyleDeclaration.cpp: |
| (WebCore::ComputedStyleExtractor::fontNonKeywordWeightFromStyleValue): |
| (WebCore::ComputedStyleExtractor::fontWeightFromStyleValue): |
| (WebCore::ComputedStyleExtractor::fontNonKeywordStretchFromStyleValue): |
| (WebCore::ComputedStyleExtractor::fontStretchFromStyleValue): |
| (WebCore::ComputedStyleExtractor::fontNonKeywordStyleFromStyleValue): |
| (WebCore::ComputedStyleExtractor::fontStyleFromStyleValue): |
| * css/CSSComputedStyleDeclaration.h: |
| * css/FontFace.cpp: |
| (WebCore::FontFace::style): |
| (WebCore::FontFace::weight): |
| (WebCore::FontFace::stretch): |
| |
| 2017-03-27 Anders Carlsson <andersca@apple.com> |
| |
| Propagate shipping contact update errors |
| https://bugs.webkit.org/show_bug.cgi?id=170141 |
| rdar://problem/31276576 |
| |
| Reviewed by Tim Horton. |
| |
| * Modules/applepay/ApplePaySession.cpp: |
| (WebCore::convertAndValidate): |
| |
| 2017-03-27 Ryan Haddad <ryanhaddad@apple.com> |
| |
| Unreviewed, rolling out r214411. |
| |
| Two of the LayoutTests for this change time out on ios- |
| simulator. |
| |
| Reverted changeset: |
| |
| "[Modern Media Controls] Improve media documents across macOS, |
| iPhone and iPad" |
| https://bugs.webkit.org/show_bug.cgi?id=169145 |
| http://trac.webkit.org/changeset/214411 |
| |
| 2017-03-27 Antoine Quint <graouts@apple.com> |
| |
| [Modern Media Controls] Clicking on the tracks button when the tracks panel is up in a media document pauses the video |
| https://bugs.webkit.org/show_bug.cgi?id=168517 |
| <rdar://problem/30577636> |
| |
| Reviewed by Dean Jackson. |
| |
| We completely turn off default event handling in MediaDocument.cpp since we're implementing the |
| behavior we expect to pause and resume the video in the modern-media-controls module already. This |
| gets rid of this odd case where the content would not see the "click" event while the C++ side would |
| handle it and pause the video. |
| |
| * Modules/modern-media-controls/media/media-controller.js: |
| (MediaController): |
| (MediaController.prototype.handleEvent): |
| (MediaController.prototype._containerWasClicked): Deleted. |
| * html/MediaDocument.cpp: |
| (WebCore::MediaDocument::defaultEventHandler): |
| |
| 2017-03-27 Youenn Fablet <youenn@apple.com> |
| |
| Tighten RTCDatachannel creation and parameter getters |
| https://bugs.webkit.org/show_bug.cgi?id=170081 |
| |
| Reviewed by Eric Carlson. |
| |
| Covered by updated tests. |
| |
| Adding some parameter checks when creating data channels. |
| Making some getters nullable as per the spec. |
| |
| * Modules/mediastream/RTCDataChannel.h: |
| * Modules/mediastream/RTCDataChannel.idl: |
| * Modules/mediastream/RTCPeerConnection.cpp: |
| (WebCore::RTCPeerConnection::createDataChannel): |
| * Modules/mediastream/RTCPeerConnection.idl: |
| * Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp: |
| (WebCore::LibWebRTCMediaEndpoint::createDataChannel): |
| (WebCore::LibWebRTCMediaEndpoint::addDataChannel): |
| * platform/mediastream/RTCDataChannelHandler.h: |
| (): Deleted. |
| |
| 2017-03-27 Youenn Fablet <youenn@apple.com> |
| |
| Add support for RTCRtpReceiver/RTCRtpSender getParameters |
| https://bugs.webkit.org/show_bug.cgi?id=170057 |
| |
| Reviewed by Alex Christensen. |
| |
| Test: webrtc/video-getParameters.html |
| |
| getParameters returns a dictionary of values taken from libwebrtc RtpReceiverInterface/RtpSenderInrterface objects. |
| Added a direct link between WebCore RTCRtpReceiver and libwebrtc RtpReceiverInterface object. |
| Making the link between WebCore RTCRtpSender and libwebrtc RtpSenderInrterface object through |
| PeerConnectionBackend to keep the current architecture shared with OpenWebRTC. |
| In the future, we should try to make the link more direct. |
| |
| Added routines to support the conversion from libwebrtc to WebCore. |
| Ensured that RTCRtpReceiver is cleaning its backend when being stopped. |
| |
| * CMakeLists.txt: |
| * DerivedSources.make: |
| * Modules/mediastream/MediaEndpointPeerConnection.cpp: |
| (WebCore::MediaEndpointPeerConnection::setRemoteDescriptionTask): |
| * Modules/mediastream/PeerConnectionBackend.h: |
| (WebCore::PeerConnectionBackend::getParameters): |
| * Modules/mediastream/RTCPeerConnection.cpp: |
| (WebCore::RTCPeerConnection::doClose): |
| (WebCore::RTCPeerConnection::getParameters): |
| * Modules/mediastream/RTCPeerConnection.h: |
| * Modules/mediastream/RTCRtpParameters.h: Added. |
| * Modules/mediastream/RTCRtpParameters.idl: Added. |
| * Modules/mediastream/RTCRtpReceiver.cpp: |
| (WebCore::RTCRtpReceiver::RTCRtpReceiver): |
| * Modules/mediastream/RTCRtpReceiver.h: |
| (WebCore::RTCRtpReceiver::Backend::~Backend): |
| (WebCore::RTCRtpReceiver::Backend::getParameters): |
| (WebCore::RTCRtpReceiver::create): |
| (WebCore::RTCRtpReceiver::stop): |
| (WebCore::RTCRtpReceiver::setBackend): |
| (WebCore::RTCRtpReceiver::getParameters): |
| * Modules/mediastream/RTCRtpReceiver.idl: |
| * Modules/mediastream/RTCRtpSender.cpp: |
| (WebCore::RTCRtpSender::create): |
| (WebCore::RTCRtpSender::RTCRtpSender): |
| (WebCore::RTCRtpSender::replaceTrack): |
| (WebCore::RTCRtpSender::getParameters): |
| * Modules/mediastream/RTCRtpSender.h: |
| (WebCore::RTCRtpSender::Backend::~Backend): |
| (WebCore::RTCRtpSender::isStopped): |
| (WebCore::RTCRtpSender::stop): |
| * Modules/mediastream/RTCRtpSender.idl: |
| * Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp: |
| (WebCore::LibWebRTCMediaEndpoint::addTrack): |
| (WebCore::LibWebRTCMediaEndpoint::addRemoteTrack): |
| (WebCore::LibWebRTCMediaEndpoint::OnAddTrack): |
| (WebCore::LibWebRTCMediaEndpoint::stop): |
| (WebCore::fillEncodingParameters): |
| (WebCore::fillHeaderExtensionParameters): |
| (WebCore::fillCodecParameters): |
| (WebCore::fillRtpParameters): |
| (WebCore::RTCRtpReceiverBackend::getParameters): |
| (WebCore::LibWebRTCMediaEndpoint::getRTCRtpSenderParameters): |
| * Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.h: |
| * Modules/mediastream/libwebrtc/LibWebRTCPeerConnectionBackend.cpp: |
| (WebCore::LibWebRTCPeerConnectionBackend::notifyAddedTrack): |
| (WebCore::LibWebRTCPeerConnectionBackend::getParameters): |
| * Modules/mediastream/libwebrtc/LibWebRTCPeerConnectionBackend.h: |
| * WebCore.xcodeproj/project.pbxproj: |
| * platform/mediastream/mac/RealtimeOutgoingAudioSource.h: |
| |
| 2017-03-27 Myles C. Maxfield <mmaxfield@apple.com> |
| |
| font variation properties don't need to accept numbers |
| https://bugs.webkit.org/show_bug.cgi?id=169357 |
| |
| Reviewed by Antti Koivisto. |
| |
| The CSS Fonts level 4 spec stabilized the grammar accepted by font-weight, |
| font-style, and font-stretch. The changes are that font-style and |
| font-stretch no longer accept raw numbers, and the @font-face descriptor |
| ranges are now separated by spaces instead of slashes. |
| |
| Tests: fast/text/font-selection-font-face-parse.html |
| fast/text/font-selection-font-loading-api-parse.html |
| fast/text/font-stretch-parse.html |
| fast/text/font-style-parse.html |
| fast/text/variations/font-selection-properties.html |
| |
| * css/CSSComputedStyleDeclaration.cpp: |
| (WebCore::ComputedStyleExtractor::fontWeightFromStyleValue): |
| (WebCore::fontWeightFromStyle): |
| (WebCore::ComputedStyleExtractor::fontStretchFromStyleValue): |
| (WebCore::fontStretchFromStyle): |
| (WebCore::ComputedStyleExtractor::fontStyleFromStyleValue): |
| (WebCore::fontStyleFromStyle): |
| * css/CSSComputedStyleDeclaration.h: |
| * css/FontFace.cpp: |
| (WebCore::FontFace::style): |
| (WebCore::FontFace::weight): |
| (WebCore::FontFace::stretch): |
| (WebCore::rangeIsSingleValue): Deleted. |
| * css/StyleBuilderConverter.h: |
| (WebCore::StyleBuilderConverter::convertFontStretchFromValue): |
| * css/parser/CSSPropertyParser.cpp: |
| (WebCore::consumeFontWeightRange): |
| (WebCore::consumeFontStretch): |
| (WebCore::consumeFontStretchRange): |
| (WebCore::consumeFontStyle): |
| (WebCore::consumeFontStyleRange): |
| |
| 2017-03-27 Youenn Fablet <youenn@apple.com> |
| |
| Further optimize checkWebRTCAvailability |
| https://bugs.webkit.org/show_bug.cgi?id=169147 |
| |
| Reviewed by Alex Christensen. |
| |
| Tested locally by removing libwebrtc.dylib. |
| Replacing dlopen check by checking an exported symbol, rtc::LogMessage::LogToDebug. |
| This check is more efficient and accurate. It should work in more configurations than the previous one. |
| |
| * platform/mediastream/libwebrtc/LibWebRTCProvider.cpp: |
| (WebCore::isNullFunctionPointer): |
| (WebCore::LibWebRTCProvider::webRTCAvailable): |
| |
| 2017-03-27 Myles C. Maxfield <mmaxfield@apple.com> |
| |
| Implement format specifier for variation fonts |
| https://bugs.webkit.org/show_bug.cgi?id=169327 |
| |
| Reviewed by Simon Fraser. |
| |
| Variation fonts require the format("woff-variations"), format("truetype-variations"), |
| and format("opentype-variations") format specifies in @font-face rules. |
| |
| Test: fast/text/variations/font-face-format.html |
| |
| * platform/graphics/mac/FontCustomPlatformData.cpp: |
| (WebCore::FontCustomPlatformData::supportsFormat): |
| |
| 2017-03-27 Myles C. Maxfield <mmaxfield@apple.com> |
| |
| Make sure animation works for font-weight, font-stretch, and font-style |
| https://bugs.webkit.org/show_bug.cgi?id=169683 |
| |
| Reviewed by Simon Fraser. |
| |
| Hook up animation code for FontSelectionValues. |
| |
| Tests: animations/font-variations/font-stretch.html |
| animations/font-variations/font-style.html |
| animations/font-variations/font-weight.html |
| |
| * page/animation/CSSPropertyAnimation.cpp: |
| (WebCore::blendFunc): |
| (WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap): |
| * rendering/style/RenderStyle.cpp: |
| (WebCore::RenderStyle::setFontWeight): |
| (WebCore::RenderStyle::setFontStretch): |
| (WebCore::RenderStyle::setFontItalic): |
| * rendering/style/RenderStyle.h: |
| (WebCore::RenderStyle::fontWeight): |
| (WebCore::RenderStyle::fontStretch): |
| (WebCore::RenderStyle::fontItalic): |
| |
| 2017-03-27 Alex Christensen <achristensen@webkit.org> |
| |
| Make WebSockets work in network process |
| https://bugs.webkit.org/show_bug.cgi?id=169930 |
| |
| Reviewed by Youenn Fablet. |
| |
| Covered by 136 existing tests in http/tests/websocket/tests/hybi |
| This also does fine with the 544 websocket tests in the web-platform-tests which we have not yet imported. |
| Also added http/tests/websocket/tests/hybi/network-process-crash-error.html |
| to test a new condition that couldn't happen before this move: the NetworkProcess crashing. |
| |
| * Modules/websockets/WebSocketChannel.cpp: |
| (WebCore::WebSocketChannel::fail): |
| We were asserting that didCloseSocketStream was called. It is still called, |
| but not synchronously like it used to. This assertion is now invalid, but tests |
| that would hit it still pass. |
| * platform/network/cf/SocketStreamHandleImplCFNet.cpp: |
| (WebCore::SocketStreamHandleImpl::platformSendInternal): |
| CFWriteStreamCanAcceptBytes crashes if you give it a null parameter, and that can happen now. |
| If we have no write stream, then we cannot write. Tests that hit this pass still. |
| |
| 2017-03-27 Antoine Quint <graouts@apple.com> |
| |
| [Modern Media Controls] Improve media documents across macOS, iPhone and iPad |
| https://bugs.webkit.org/show_bug.cgi?id=169145 |
| <rdar://problem/17048858> |
| |
| Reviewed by Dean Jackson. |
| |
| There were a variety of issues with media documents, some longstanding, and some specifically |
| about modern media controls. |
| |
| One issue was that fullscreen and picture-in-picture buttons would show for audio media documents, |
| due to using a <video> element to load the audio file. We now have additional logic in MediaController |
| to identify if the loaded media is really an audio file, and using this information to hide the |
| fullscreen and picture-in-picture buttons. |
| |
| Another issue was that we would inject style in MediaDocument.cpp that was specific to modern media |
| controls when we could have the modern-media-controls module injected CSS handle this styling. We now |
| use the injected style in the shadow root to size media documents based on the device characteristics |
| and ensuring that page styles are overridden. |
| |
| We also simplify how MediaDocument.cpp sets the source of the media element to simply use the "src" |
| attribute and not a <source> element. |
| |
| Finally, we introduce a MediaDocumentController class that is instantiated when we're dealing with |
| a media document to hide the controls while we determine the type of media we're loading (audio vs. |
| video) in order to apply the appropriate styling without flashes. |
| |
| As a result of the new styles applied by the modern-media-controls module, media documents have a |
| similar behavior on macOS and iPad, where we only enforce a min-width for video allowing them |
| to play at their natural size otherwise, and enforcing a fixed width for audio. On iPhone however, |
| we want to always play the media at full width, with some padding in the case of audio. |
| |
| Tests: media/modern-media-controls/fullscreen-support/fullscreen-support-disabled-video-with-audio-tracks-only.html |
| media/modern-media-controls/media-documents/ipad/media-document-audio-ios-sizing.html |
| media/modern-media-controls/media-documents/ipad/media-document-video-ios-sizing.html |
| media/modern-media-controls/media-documents/media-document-audio-ios-sizing.html |
| media/modern-media-controls/media-documents/media-document-audio-mac-sizing.html |
| media/modern-media-controls/media-documents/media-document-video-ios-sizing.html |
| media/modern-media-controls/media-documents/media-document-video-mac-sizing.html |
| media/modern-media-controls/pip-support/pip-support-disabled-video-with-audio-tracks-only.html |
| |
| * Modules/modern-media-controls/controls/ios-inline-media-controls.css: |
| (:host(audio) .media-controls.ios.inline > .controls-bar:before,): |
| (:host(audio) .media-controls.ios.inline > .controls-bar:before): Deleted. |
| * Modules/modern-media-controls/controls/macos-media-controls.css: |
| (:host(audio) .media-controls.mac.inline > .controls-bar,): |
| (:host(audio) .media-controls.mac.inline > .controls-bar > .background-tint,): |
| (:host(audio) .media-controls.mac.inline > .controls-bar): Deleted. |
| (:host(audio) .media-controls.mac.inline > .controls-bar > .background-tint): Deleted. |
| * Modules/modern-media-controls/controls/media-document.css: Added. |
| (:host(.media-document)): |
| (:host(.media-document.ready)): |
| (:host(.media-document.audio.mac)): |
| (:host(.media-document.audio.ipad)): |
| (:host(.media-document.audio.iphone)): |
| (:host(.media-document.video.mac)): |
| (:host(.media-document.video.ipad)): |
| (:host(.media-document.video.iphone)): |
| * Modules/modern-media-controls/js-files: |
| * Modules/modern-media-controls/media/fullscreen-support.js: |
| (FullscreenSupport.prototype.syncControl): |
| (FullscreenSupport): |
| * Modules/modern-media-controls/media/media-controller.js: |
| (MediaController): |
| (MediaController.prototype.get isAudio): |
| * Modules/modern-media-controls/media/media-document-controller.js: Added. |
| (MediaDocumentController): |
| (MediaDocumentController.prototype.handleEvent): |
| (MediaDocumentController.prototype._mediaDocumentHasMetadata): |
| (MediaDocumentController.prototype._mediaDocumentHasSize): |
| * Modules/modern-media-controls/media/pip-support.js: |
| (PiPSupport.prototype.syncControl): |
| (PiPSupport): |
| * html/MediaDocument.cpp: |
| (WebCore::MediaDocumentParser::createDocumentStructure): |
| |
| 2017-03-25 Chris Dumez <cdumez@apple.com> |
| |
| REGRESSION(r214195): zillow.com header video doesn't resume when switching to another tab and back |
| https://bugs.webkit.org/show_bug.cgi?id=170080 |
| <rdar://problem/31252522> |
| |
| Reviewed by Eric Carlson. |
| |
| The video header on zillow.com would pause when switching to another tab after r214195. On |
| switching back to the zillow.com tab, we would resume the video but fail to take the poster |
| away, making it look like the video is still paused. |
| |
| We normally take the poster away when HTMLMediaElement::mediaPlayerFirstVideoFrameAvailable() |
| is called. However, mediaPlayerFirstVideoFrameAvailable() was only ever called once because of |
| the m_haveReportedFirstVideoFrame flag in MediaPlayerPrivateAVFoundation::updateStates(). |
| We now reset m_haveReportedFirstVideoFrame to false in updateStates() if hasAvailableVideoFrame() |
| return false, so that we call mediaPlayerFirstVideoFrameAvailable() again when the return |
| value of asAvailableVideoFrame() becomes true again (e.g. after the media session interruption |
| has ended). |
| |
| * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp: |
| (WebCore::MediaPlayerPrivateAVFoundation::updateStates): |
| |
| 2017-03-24 Wenson Hsieh <wenson_hsieh@apple.com> |
| |
| [WK2] Add a UI delegate SPI hook to enable or disable navigation on drop |
| https://bugs.webkit.org/show_bug.cgi?id=169168 |
| <rdar://problem/30688374> |
| |
| Reviewed by Tim Horton. |
| |
| Refactor client hooks for the drag destination action in WebCore to ask for the drag destination action mask |
| upon initializing the DragData. In DragController, rather than setting m_dragDestinationAction to the result of |
| m_client.actionMaskForDrag, we instead set it to the DragData's destination action. |
| |
| Tests to come in a future patch. |
| |
| * loader/EmptyClients.cpp: |
| * page/DragClient.h: |
| |
| Rather than pass in a DragData, pass in only the platform data that we need to hand to the delegate. This is |
| because we now ask for drag destination actions prior to creating the DragData. |
| |
| * page/DragController.cpp: |
| (WebCore::DragController::dragEnteredOrUpdated): |
| |
| Update the available drag destination actions in WebCore using the destination actions stored in DragData rather |
| than calling out to the client delegate. |
| |
| * loader/EmptyClients.cpp: |
| * platform/DragData.cpp: |
| (WebCore::DragData::DragData): |
| * platform/DragData.h: |
| (WebCore::DragData::dragDestinationAction): |
| (WebCore::DragData::operator =): |
| * platform/mac/DragDataMac.mm: |
| (WebCore::DragData::DragData): |
| |
| 2017-03-25 Aaron Chu <aaron_chu@apple.com> |
| |
| AX: Media controls are unlabeled |
| https://bugs.webkit.org/show_bug.cgi?id=169947 |
| <rdar://problem/30153323> |
| |
| Reviewed by Antoine Quint. |
| |
| Added a "label" property for Icons, which are used to set |
| the aria-label for the controls in modern media controls. |
| |
| Test: Addition to all existing modern media controls tests. |
| |
| * English.lproj/modern-media-controls-localized-strings.js: |
| * Modules/modern-media-controls/controls/icon-button.js: |
| (IconButton.prototype.set iconName): |
| (IconButton.prototype.handleEvent): |
| (IconButton.prototype._loadImage): |
| * Modules/modern-media-controls/controls/icon-service.js: |
| * Modules/modern-media-controls/controls/start-button.js: |
| (StartButton): |
| * Modules/modern-media-controls/js-files: |
| |
| 2017-03-25 Carlos Garcia Campos <cgarcia@igalia.com> |
| |
| [XDG] MIMETypeRegistry::getMIMETypeForExtension should return a null/empty string when mime type is unknown |
| https://bugs.webkit.org/show_bug.cgi?id=170050 |
| |
| Reviewed by Michael Catanzaro. |
| |
| That's what the callers expect, but we alre always returning XDG_MIME_TYPE_UNKNOWN which is |
| application/octet-stream. |
| |
| Fixes: plugins/no-mime-with-valid-extension.html |
| |
| * platform/xdg/MIMETypeRegistryXdg.cpp: |
| (WebCore::MIMETypeRegistry::getMIMETypeForExtension): |
| |
| 2017-03-24 Myles C. Maxfield <mmaxfield@apple.com> |
| |
| Add font-optical-sizing to CSSComputedStyleDeclaration |
| https://bugs.webkit.org/show_bug.cgi?id=170083 |
| |
| Reviewed by Joseph Pecoraro. |
| |
| Covered by existing tests. |
| |
| * css/CSSComputedStyleDeclaration.cpp: |
| |
| 2017-03-24 Daniel Bates <dabates@apple.com> |
| |
| media/restore-from-page-cache.html causes NoEventDispatchAssertion::isEventAllowedInMainThread() assertion failure |
| https://bugs.webkit.org/show_bug.cgi?id=170087 |
| <rdar://problem/31254822> |
| |
| Reviewed by Simon Fraser. |
| |
| Reduce the scope of code that should never dispatch DOM events so as to allow updating contents size |
| after restoring a page from the page cache. |
| |
| In r214014 we instantiate a NoEventDispatchAssertion in FrameLoader::commitProvisionalLoad() |
| around the call to CachedPage::restore() to assert when a DOM event is dispatched during |
| page restoration as such events can cause re-entrancy into the page cache. As it turns out |
| it is sufficient to ensure that no DOM events are dispatched after restoring all cached frames |
| as opposed to after CachedPage::restore() returns. |
| |
| Also rename Document::enqueue{Pageshow, Popstate}Event() to dispatch{Pageshow, Popstate}Event(), |
| respectively, since they synchronously dispatch events :(. We hope in the future to make them |
| asynchronously dispatch events. |
| |
| * dom/Document.cpp: |
| (WebCore::Document::implicitClose): Update for renaming. |
| (WebCore::Document::statePopped): Ditto. |
| (WebCore::Document::dispatchPageshowEvent): Renamed; formerly named enqueuePageshowEvent(). |
| (WebCore::Document::dispatchPopstateEvent): Renamed; formerly named enqueuePopstateEvent(). |
| (WebCore::Document::enqueuePageshowEvent): Deleted. |
| (WebCore::Document::enqueuePopstateEvent): Deleted. |
| * dom/Document.h: |
| * history/CachedPage.cpp: |
| (WebCore::firePageShowAndPopStateEvents): Moved logic from FrameLoader::didRestoreFromCachedPage() to here. |
| (WebCore::CachedPage::restore): Modified to call firePageShowAndPopStateEvents(). |
| * loader/FrameLoader.cpp: |
| (WebCore::FrameLoader::commitProvisionalLoad): Removed use of NoEventDispatchAssertion RAII object. We |
| will instantiate it in CachedPage::restore() with a smaller scope. |
| (WebCore::FrameLoader::didRestoreFromCachedPage): Deleted; moved logic from here to WebCore::firePageShowAndPopStateEvents(). |
| * loader/FrameLoader.h: |
| |
| 2017-03-24 Ryan Haddad <ryanhaddad@apple.com> |
| |
| Unreviewed, rolling out r214361. |
| |
| This change caused flakiness in http/tests/preload tests. |
| |
| Reverted changeset: |
| |
| "Add a warning for unused link preloads." |
| https://bugs.webkit.org/show_bug.cgi?id=165670 |
| http://trac.webkit.org/changeset/214361 |
| |
| 2017-03-24 Antoine Quint <graouts@webkit.org> |
| |
| [Modern Media Controls] Remove placard icon if height is compressed |
| https://bugs.webkit.org/show_bug.cgi?id=167935 |
| <rdar://problem/30397128> |
| |
| Reviewed by Dean Jackson. |
| |
| We make the addition of certain Placard children conditional on the placard's metrics. Whenever the |
| media controls metrics changes, the placard, if any, is set to have the same metrics and layout() is |
| called where we ensure that there is enough space, per designs, to have the icon, description and even |
| the title visible. We also make some CSS improvements to guarantee that the description is laid out on |
| two lines at most and that both text labels are trimmed elegantly with an ellipsis shold the width be |
| insufficient to display the whole text. |
| |
| Since we would have needed to have more width/height setter overrides to trigger layout, we now make |
| LayoutNode trigger layout() directly and remove the need for subclasses to do this on a per-class basis. |
| We also make layout() a method that can be called safely anytime as it's now no longer part of the DOM |
| commit step, a new commit() method is used instead of that. |
| |
| Tests: media/modern-media-controls/layout-node/node-made-dirty-during-commit.html |
| media/modern-media-controls/media-controls/media-controls-placard-compressed-metrics.html |
| |
| * Modules/modern-media-controls/controls/layout-node.js: |
| (LayoutNode.prototype.set width): |
| (LayoutNode.prototype.set height): |
| Trigger a call to layout() anytime "width" or "height" is set on any LayoutNode. |
| |
| (LayoutNode.prototype.layout): |
| (LayoutNode.prototype.commit): |
| (performScheduledLayout): |
| Make layout() an empty method that subclasses can override easily outside of the DOM commit cycle, |
| its previous implementation is now called "commit()" which is a more accurate name. |
| |
| * Modules/modern-media-controls/controls/media-controls.js: |
| (MediaControls.prototype.get placard): |
| (MediaControls.prototype.get showsPlacard): |
| (MediaControls.prototype.showPlacard): |
| (MediaControls.prototype.hidePlacard): |
| (MediaControls.prototype.layout): |
| (MediaControls.prototype.get width): Deleted. |
| (MediaControls.prototype.set width): Deleted. |
| Add a "placard" property to make it simpler to reference the placard instead of making assumptions in |
| several places in that class on the children order. Anytime we run a layout or show the placard, ensure |
| that the placard metrics are synced with the media controls metrics. |
| |
| * Modules/modern-media-controls/controls/placard.css: |
| (.placard .container): |
| (.placard .title,): |
| (.placard .description): |
| We now ensure that both the title and description are trimmed with an ellipsis when we run out of space |
| to display them fully. |
| |
| * Modules/modern-media-controls/controls/placard.js: |
| (Placard.): |
| (Placard.prototype.layout): |
| We add new constraints to only show the icon, title and description if the placard is tall and wide enough. |
| |
| * Modules/modern-media-controls/controls/slider.js: |
| (Slider.prototype.get width): Deleted. |
| (Slider.prototype.set width): Deleted. |
| Removed custom "width" getters and setters now we can just override layout() in case node metrics change. |
| |
| * Modules/modern-media-controls/controls/time-control.js: |
| (TimeControl.prototype.set useSixDigitsForTimeLabels): |
| (TimeControl.prototype.layout): |
| (TimeControl.prototype.get width): Deleted. |
| (TimeControl.prototype.set width): Deleted. |
| (TimeControl.prototype._availableWidthHasChanged): Deleted. |
| Removed custom "width" getters and setters now we can just override layout() in case node metrics change. |
| |
| * Modules/modern-media-controls/media/media-controller.js: |
| (MediaController): |
| Ensure we flush pending updates at construction time so that we match the size of the media controls right |
| at the first media layout. |
| |
| 2017-03-24 Eric Carlson <eric.carlson@apple.com> |
| |
| [MediaStream] "ideal" constraints passed to getUserMedia should affect fitness score |
| https://bugs.webkit.org/show_bug.cgi?id=170056 |
| |
| Reviewed by Youenn Fablet. |
| |
| Include the fitness score calculated for ideal constraints in the calculation of a capture |
| overall device fitness score. |
| |
| No new tests, existing tests updated. |
| |
| * platform/mediastream/MediaConstraints.cpp: |
| (WebCore::StringConstraint::fitnessDistance): Drive-by fix: return early if ideal is empty, |
| not exact. |
| |
| * platform/mediastream/RealtimeMediaSource.cpp: |
| (WebCore::RealtimeMediaSource::supportsSizeAndFrameRate): Return fitness distance. |
| (WebCore::RealtimeMediaSource::selectSettings): Include the fitness distance of supported |
| ideal constraints. |
| (WebCore::RealtimeMediaSource::supportsConstraint): New. |
| (WebCore::RealtimeMediaSource::applyConstraints): |
| * platform/mediastream/RealtimeMediaSource.h: |
| |
| * platform/mock/MockRealtimeMediaSourceCenter.cpp: |
| (WebCore::MockRealtimeMediaSourceCenter::validateRequestConstraints): Sort candidate sources |
| by their fitness score. |
| |
| * platform/mock/MockRealtimeVideoSource.cpp: |
| (WebCore::MockRealtimeVideoSource::initializeCapabilities): Each video source should support |
| one facing mode, not both. |
| |
| 2017-03-24 Dean Jackson <dino@apple.com> |
| |
| Serialization of custom props in longhand should be "" not value of shorthand |
| https://bugs.webkit.org/show_bug.cgi?id=167699 |
| <rdar://problem/30324200> |
| |
| Reviewed by Sam Weinig. |
| |
| https://www.w3.org/TR/css-variables/#variables-in-shorthands says |
| "Pending-substitution values must be serialized as the empty string, if |
| an API allows them to be observed." |
| |
| We were returning the cssText instead. |
| |
| Test: fast/css/variables/rule-property-get.html has been updated. |
| |
| * css/StyleProperties.cpp: |
| (WebCore::StyleProperties::getPropertyValue): Return the empty string |
| if we're a pending substitution value. |
| |
| 2017-03-24 Wenson Hsieh <wenson_hsieh@apple.com> |
| |
| Unreviewed, fix the ToT build on the latest SDK. |
| |
| Add deprecated declaration guards around two synchronous UIItemProvider methods in WebItemProviderPasteboard. |
| <rdar://problem/30451096> tracks adoption of the asynchronous versions of these methods. |
| |
| * platform/ios/WebItemProviderPasteboard.mm: |
| (-[WebItemProviderPasteboard dataForPasteboardType:inItemSet:]): |
| (-[WebItemProviderPasteboard _tryToCreateAndAppendObjectOfClass:toArray:usingProvider:]): |
| |
| 2017-03-24 Antoine Quint <graouts@webkit.org> |
| |
| [Modern Media Controls] Captions don't move with the appearance of the inline controls |
| https://bugs.webkit.org/show_bug.cgi?id=170051 |
| <rdar://problem/30754428> |
| |
| Reviewed by Dean Jackson. |
| |
| We now size the captions container to account for the controls bar height when visible. To do this, |
| we use CSS variables to specify the height of the controls bar in default inline mode, compact inline |
| mode and fullscreen mode. |
| |
| Test: media/modern-media-controls/tracks-support/tracks-support-captions-offset-with-controls-bar.html |
| |
| * Modules/modern-media-controls/controls/controls-bar.js: |
| (ControlsBar.prototype.set faded): |
| Notify the hosting MediaControls that the "faded" property changed. |
| |
| * Modules/modern-media-controls/controls/ios-inline-media-controls.css: |
| (.media-controls.ios.inline > .controls-bar): |
| Use the new --inline-controls-bar-height CSS variable to specify the inline bar height. |
| |
| * Modules/modern-media-controls/controls/macos-compact-inline-media-controls.css: |
| (.media-controls.mac.inline.compact > .controls-bar): |
| Use the new --inline-compact-controls-bar-height CSS variable to specify the inline bar height. |
| |
| * Modules/modern-media-controls/controls/macos-fullscreen-media-controls.css: |
| (.media-controls.mac.fullscreen > .controls-bar): |
| Use the new --fullscreen-controls-bar-height CSS variable to specify the inline bar height. |
| |
| * Modules/modern-media-controls/controls/macos-inline-media-controls.css: |
| (.media-controls.mac.inline > .controls-bar): |
| Use the new --inline-controls-bar-height CSS variable to specify the inline bar height. |
| |
| * Modules/modern-media-controls/controls/media-controls.css: |
| (*): |
| Specify new CSS variables for the various controls bar heights. |
| |
| * Modules/modern-media-controls/controls/media-controls.js: |
| (MediaControls.prototype.controlsBarFadedStateDidChange): |
| Notify the delegate of a controls bar "faded" property change. |
| |
| * Modules/modern-media-controls/controls/text-tracks.css: |
| (video::-webkit-media-text-track-container): |
| (video::-webkit-media-text-track-container.visible-controls-bar): |
| (video::-webkit-media-text-track-container.visible-controls-bar.compact-controls-bar): |
| (video::-webkit-media-text-track-display): |
| Shorten the height of the captions container when the controls bar is visible. We also |
| fix a couple of prefixed properties that didn't need to be. |
| |
| * Modules/modern-media-controls/media/media-controller.js: |
| (MediaController.prototype.controlsBarFadedStateDidChange): |
| (MediaController.prototype._updateControlsIfNeeded): |
| (MediaController.prototype._updateTextTracksClassList): |
| (MediaController): |
| Ensure we reflect the "faded" state of the controls bar on the captions container using |
| a CSS class, as well as whether the controls bar mode is compact. |
| |
| 2017-03-24 Brent Fulgham <bfulgham@apple.com> |
| |
| Handle recursive calls to ProcessingInstruction::checkStyleSheet |
| https://bugs.webkit.org/show_bug.cgi?id=169982 |
| <rdar://problem/31083051> |
| |
| Reviewed by Antti Koivisto. |
| |
| See if we triggered a recursive load of the stylesheet during the 'beforeload' |
| event handler. If so, reset to a valid state before completing the load. |
| |
| We should also check after 'beforeload' that we were not disconnected from (or |
| moved to a new) document. |
| |
| I also looked for other cases of this pattern and fixed them, too. |
| |
| Tests: fast/dom/beforeload/image-removed-during-before-load.html |
| fast/dom/beforeload/recursive-css-pi-before-load.html |
| fast/dom/beforeload/recursive-link-before-load.html |
| fast/dom/beforeload/recursive-xsl-pi-before-load.html |
| |
| * dom/ProcessingInstruction.cpp: |
| (WebCore::ProcessingInstruction::clearExistingCachedSheet): Added. |
| (WebCore::ProcessingInstruction::checkStyleSheet): Prevent recursive calls into |
| this function during 'beforeload' handling. Also, safely handle the case where |
| the element was disconnected in the 'beforeload' handler (similar to what |
| we do in HTMLLinkElement). |
| (WebCore::ProcessingInstruction::setCSSStyleSheet): Drive-by Fix: Protect the |
| current document to match what we do in setXSLStyleSheet. |
| * dom/ProcessingInstruction.h: |
| * html/HTMLLinkElement.cpp: |
| (WebCore::HTMLLinkElement::process): Prevent recursive calls into |
| this function during 'beforeload' handling. |
| * html/HTMLLinkElement.h: |
| * loader/ImageLoader.cpp: |
| (WebCore::ImageLoader::dispatchPendingBeforeLoadEvent): safely handle the case where |
| the element was disconnected in the 'beforeload' handler (similar to what |
| we do in HTMLLinkElement). |
| * style/StyleScope.cpp: |
| (WebCore::Style::Scope::hasPendingSheet): Added. |
| * style/StyleScope.h: |
| |
| 2017-03-24 Brady Eidson <beidson@apple.com> |
| |
| A null compound index value crashes the Databases process. |
| <rdar://problem/30499831> and https://bugs.webkit.org/show_bug.cgi?id=170000 |
| |
| Reviewed by Alex Christensen. |
| |
| Test: storage/indexeddb/modern/single-entry-index-invalid-key-crash.html |
| |
| * bindings/js/IDBBindingUtilities.cpp: |
| (WebCore::createKeyPathArray): Fix the bug by rejecting arrays with any invalid keys in them. |
| |
| Add some logging: |
| * Modules/indexeddb/IDBKeyPath.cpp: |
| (WebCore::loggingString): |
| * Modules/indexeddb/IDBKeyPath.h: |
| * Modules/indexeddb/IDBObjectStore.cpp: |
| (WebCore::IDBObjectStore::createIndex): |
| * Modules/indexeddb/shared/IDBIndexInfo.cpp: |
| (WebCore::IDBIndexInfo::loggingString): |
| |
| 2017-03-24 Ryan Haddad <ryanhaddad@apple.com> |
| |
| Unreviewed, rolling out r214360. |
| |
| This change caused 20+ LayoutTest failures. |
| |
| Reverted changeset: |
| |
| "Handle recursive calls to |
| ProcessingInstruction::checkStyleSheet" |
| https://bugs.webkit.org/show_bug.cgi?id=169982 |
| http://trac.webkit.org/changeset/214360 |
| |
| 2017-03-24 Youenn Fablet <youenn@apple.com> |
| |
| Add support for qpSum in WebRTC stats |
| https://bugs.webkit.org/show_bug.cgi?id=170060 |
| |
| Reviewed by Eric Carlson. |
| |
| * Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp: |
| (WebCore::fillRTCRTPStreamStats): exposing libwebrtc qpSum value. |
| |
| 2017-03-24 Daniel Bates <dabates@apple.com> |
| |
| Prevent new navigations during document unload |
| https://bugs.webkit.org/show_bug.cgi?id=169934 |
| <rdar://problem/31247584> |
| |
| Reviewed by Chris Dumez. |
| |
| Similar to our policy of preventing new navigations from onbeforeunload handlers |
| we should prevent new navigations that are initiated during the document unload |
| process. |
| |
| The significant part of this change is the instantiation of the RAII object NavigationDisabler |
| in Document::prepareForDestruction(). The rest of this change just renames class |
| NavigationDisablerForBeforeUnload to NavigationDisabler now that this RAII class is |
| used to prevent navigation from both onbeforeunload event handlers and when unloading |
| a document. |
| |
| Test: fast/frames/frame-unload-navigate-and-setTimeout-assert-fail.html |
| |
| * dom/Document.cpp: |
| (WebCore::Document::prepareForDestruction): Disable new navigations when disconnecting |
| subframes. Also assert that the document is not in the page cache before we fall off |
| the end of the function. |
| * loader/FrameLoader.cpp: |
| (WebCore::FrameLoader::isNavigationAllowed): Update for renaming below. |
| (WebCore::FrameLoader::shouldClose): Ditto. |
| * loader/NavigationScheduler.cpp: |
| (WebCore::NavigationScheduler::shouldScheduleNavigation): Ditto. |
| * loader/NavigationScheduler.h: |
| (WebCore::NavigationDisabler::NavigationDisabler): Renamed class; formerly named NavigationDisablerForBeforeUnload. |
| (WebCore::NavigationDisabler::~NavigationDisabler): Ditto. |
| (WebCore::NavigationDisabler::isNavigationAllowed): Ditto. |
| (WebCore::NavigationDisablerForBeforeUnload::NavigationDisablerForBeforeUnload): Deleted. |
| (WebCore::NavigationDisablerForBeforeUnload::~NavigationDisablerForBeforeUnload): Deleted. |
| (WebCore::NavigationDisablerForBeforeUnload::isNavigationAllowed): Deleted. |
| |
| 2017-03-24 Myles C. Maxfield <mmaxfield@apple.com> |
| |
| Implement font-optical-sizing |
| https://bugs.webkit.org/show_bug.cgi?id=168895 |
| |
| Reviewed by Dean Jackson. |
| |
| Upon advice from Microsoft, the only input to optical sizing is just the |
| font-size computed value. It is implemented by setting the 'opsz' font |
| variation axis. Because the propery has such a simple grammar, the |
| implementation is quite straightforward. |
| |
| Test: fast/text/variations/optical-sizing.html |
| |
| * css/CSSComputedStyleDeclaration.cpp: |
| (WebCore::ComputedStyleExtractor::propertyValue): |
| * css/CSSPrimitiveValueMappings.h: |
| (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): |
| (WebCore::CSSPrimitiveValue::operator FontOpticalSizing): |
| * css/CSSProperties.json: |
| * css/parser/CSSParserFastPaths.cpp: |
| (WebCore::CSSParserFastPaths::isValidKeywordPropertyAndValue): |
| (WebCore::CSSParserFastPaths::isKeywordPropertyID): |
| * platform/graphics/FontCache.h: |
| (WebCore::FontDescriptionKey::makeFlagsKey): |
| * platform/graphics/FontDescription.h: |
| (WebCore::FontDescription::opticalSizing): |
| (WebCore::FontDescription::setOpticalSizing): |
| (WebCore::FontDescription::operator==): |
| (WebCore::FontCascadeDescription::initialOpticalSizing): |
| * platform/graphics/cocoa/FontCacheCoreText.cpp: |
| (WebCore::preparePlatformFont): |
| (WebCore::fontWithFamily): |
| (WebCore::FontCache::createFontPlatformData): |
| (WebCore::FontCache::systemFallbackForCharacters): |
| * platform/graphics/mac/FontCustomPlatformData.cpp: |
| (WebCore::FontCustomPlatformData::fontPlatformData): |
| * platform/text/TextFlags.h: |
| |
| 2017-03-24 Chris Dumez <cdumez@apple.com> |
| |
| Unreviewed, rolling out r214329. |
| |
| Significantly regressed Speedometer |
| |
| Reverted changeset: |
| |
| "window.crypto.getRandomValues() uses the insecure RC4 RNG" |
| https://bugs.webkit.org/show_bug.cgi?id=169623 |
| http://trac.webkit.org/changeset/214329 |
| |
| 2017-03-24 Yoav Weiss <yoav@yoav.ws> |
| |
| Add a warning for unused link preloads. |
| https://bugs.webkit.org/show_bug.cgi?id=165670 |
| |
| Reviewed by Youenn Fablet. |
| |
| This patch adds a warning message, to warn developers that are using |
| link preloads in cases where the downloaded resource is likely to |
| remain unused. |
| |
| Test: http/tests/preload/unused_preload_warning.html |
| |
| * dom/Document.cpp: |
| (WebCore::Document::prepareForDestruction): Stop the timer once the document is destructed. |
| * loader/LinkPreloadResourceClients.h: Add shouldMarkAsReferenced overides for the LinkPreloadResourceClient classes. |
| * loader/cache/CachedResource.cpp: |
| (WebCore::CachedResource::addClientToSet): Make sure LinkPreloadResourceClients don't set resource to be referenced. |
| * loader/cache/CachedResourceClient.h: |
| (WebCore::CachedResourceClient::shouldMarkAsReferenced): Make sure that ResourceClients mark preloads as referenced by default. |
| * loader/cache/CachedResourceLoader.cpp: |
| (WebCore::CachedResourceLoader::CachedResourceLoader): Initialize timer. |
| (WebCore::CachedResourceLoader::~CachedResourceLoader): Stop timer. |
| (WebCore::CachedResourceLoader::warnUnusedPreloads): Iterate over m_preloads and issue a warning for non-referenced preloads. |
| (WebCore::CachedResourceLoader::documentDidFinishLoadEvent): Trigger a timer if preloads weren't cleared at load time. |
| (WebCore::CachedResourceLoader::warnUnusedPreloads): Triggered by the timer, and called CachedResourceLoader::warnUnusedPreloads. |
| (WebCore::CachedResourceLoader::stopUnusedPreloadsTimer): Stop the timer. |
| |
| 2017-03-24 Brent Fulgham <bfulgham@apple.com> |
| |
| Handle recursive calls to ProcessingInstruction::checkStyleSheet |
| https://bugs.webkit.org/show_bug.cgi?id=169982 |
| <rdar://problem/31083051> |
| |
| Reviewed by Antti Koivisto. |
| |
| See if we triggered a recursive load of the stylesheet during the 'beforeload' |
| event handler. If so, reset to a valid state before completing the load. |
| |
| We should also check after 'beforeload' that we were not disconnected from (or |
| moved to a new) document. |
| |
| I also looked for other cases of this pattern and fixed them. |
| |
| Tests: fast/dom/beforeload/image-removed-during-before-load.html |
| fast/dom/beforeload/recursive-css-pi-before-load.html |
| fast/dom/beforeload/recursive-link-before-load.html |
| fast/dom/beforeload/recursive-xsl-pi-before-load.html |
| |
| * dom/ProcessingInstruction.cpp: |
| (WebCore::ProcessingInstruction::clearExistingCachedSheet): Added. |
| (WebCore::ProcessingInstruction::checkStyleSheet): Reset to valid state |
| if necessary after the 'beforeload' handler. Also, safely handle the case where |
| the element was disconnected in the 'beforeload' handler (similar to what |
| we do in HTMLLinkElement). |
| (WebCore::ProcessingInstruction::setCSSStyleSheet): Drive-by Fix: Protect the |
| current document to match what we do in setXSLStyleSheet. |
| * dom/ProcessingInstruction.h: |
| * html/HTMLMediaElement.cpp: |
| (WebCore::HTMLMediaElement::selectMediaResource): Safely handle the case where |
| the element was disconnected in the 'beforeload' handler. |
| (WebCore::HTMLMediaElement::selectNextSourceChild): Ditto. |
| * loader/ImageLoader.cpp: |
| (WebCore::ImageLoader::dispatchPendingBeforeLoadEvent): Ditto. |
| |
| 2017-03-24 Myles C. Maxfield <mmaxfield@apple.com> |
| |
| font-style needs a new CSSValue to make CSSRule.cssText work correctly |
| https://bugs.webkit.org/show_bug.cgi?id=169258 |
| |
| Reviewed by David Hyatt. |
| |
| With variation fonts, font-style's value can't be captured in a CSSPrimitiveValue (nor any other subclass |
| off CSSValue) any more. Instead, we need to create two new CSSValues which represent the grammar that font- |
| style and it's associated @font-face descriptor accept. |
| |
| The grammar of the font-style property is "normal | italic | oblique [ <<angle>> ]?" |
| The grammar of the font-style descriptor is "normal | italic | oblique [ <<angle>> | <<angle>> <<angle>> ]?" |
| |
| We currently still support numbers in place of the <<angle>> value (contrary to the spec). We will remove |
| this support in https://bugs.webkit.org/show_bug.cgi?id=169357. |
| |
| Tests: fast/text/font-selection-font-face-parse.html: |
| fast/text/font-style-parse.html: |
| |
| * CMakeLists.txt: |
| * WebCore.xcodeproj/project.pbxproj: |
| * css/CSSAllInOne.cpp: |
| * css/CSSComputedStyleDeclaration.cpp: |
| (WebCore::fontStyleFromStyle): |
| (WebCore::fontShorthandValueForSelectionProperties): |
| * css/CSSFontFace.cpp: |
| (WebCore::calculateWeightRange): |
| (WebCore::calculateStretchRange): |
| (WebCore::calculateItalicRange): |
| * css/CSSFontFaceSet.cpp: |
| (WebCore::computeFontSelectionRequest): |
| (WebCore::CSSFontFaceSet::matchingFaces): |
| (WebCore::calculateWeightValue): Deleted. |
| (WebCore::calculateStretchValue): Deleted. |
| (WebCore::calculateStyleValue): Deleted. |
| * css/CSSFontFaceSet.h: |
| * css/CSSFontSelector.cpp: |
| (WebCore::CSSFontSelector::addFontFaceRule): |
| * css/CSSFontStyleRangeValue.cpp: Added. |
| (WebCore::CSSFontStyleRangeValue::customCSSText): |
| (WebCore::CSSFontStyleRangeValue::equals): |
| * css/CSSFontStyleRangeValue.h: Added. |
| * css/CSSFontStyleValue.cpp: Added. |
| (WebCore::CSSFontStyleValue::customCSSText): |
| (WebCore::CSSFontStyleValue::equals): |
| * css/CSSFontStyleValue.h: Added. |
| * css/CSSFontValue.cpp: |
| (WebCore::CSSFontValue::customCSSText): |
| * css/CSSFontValue.h: |
| * css/CSSValue.cpp: |
| (WebCore::CSSValue::equals): |
| (WebCore::CSSValue::cssText): |
| (WebCore::CSSValue::destroy): |
| * css/CSSValue.h: |
| (WebCore::CSSValue::isFontStyleValue): |
| (WebCore::CSSValue::isFontStyleRangeValue): |
| * css/FontFace.cpp: |
| (WebCore::FontFace::style): |
| (WebCore::FontFace::weight): |
| (WebCore::FontFace::stretch): |
| * css/StyleBuilderConverter.h: |
| (WebCore::StyleBuilderConverter::convertFontWeightFromValue): |
| (WebCore::StyleBuilderConverter::convertFontStretchFromValue): |
| (WebCore::StyleBuilderConverter::convertFontStyleFromValue): |
| (WebCore::StyleBuilderConverter::convertFontWeight): |
| (WebCore::StyleBuilderConverter::convertFontStretch): |
| (WebCore::StyleBuilderConverter::convertFontStyle): |
| * css/parser/CSSPropertyParser.cpp: |
| (WebCore::consumeFontStyle): |
| (WebCore::consumeFontStyleRange): |
| (WebCore::CSSPropertyParser::consumeSystemFont): |
| (WebCore::CSSPropertyParser::consumeFont): |
| * svg/SVGFontFaceElement.cpp: |
| (WebCore::SVGFontFaceElement::parseAttribute): |
| |
| 2017-03-24 Alex Christensen <achristensen@webkit.org> |
| |
| REGRESSION: Content Blocker: Blocking "a[href*=randomString]" doesn't work |
| https://bugs.webkit.org/show_bug.cgi?id=169167 |
| |
| Reviewed by Simon Fraser. |
| |
| When testing content extensions, we have always called an API function that internally |
| has called AtomicString::init somewhere before we start compiling the content extension. |
| On iOS, though, we call [_WKUserContentExtensionStore compileContentExtensionForIdentifier:...] |
| without having already called anything that calls AtomicString::init. The new CSS parser is now |
| failing to parse some selectors because CSSSelectorParser::defaultNamespace is returning starAtom, |
| which is a null atomic string before AtomicString::init is called. |
| |
| Covered by a new API test. |
| |
| * contentextensions/ContentExtensionParser.cpp: |
| (WebCore::ContentExtensions::isValidCSSSelector): |
| (WebCore::ContentExtensions::loadAction): |
| (WebCore::ContentExtensions::isValidSelector): Deleted. |
| * contentextensions/ContentExtensionParser.h: |
| Call AtomicString::init before checking if a css selector is valid. |
| |
| 2017-03-24 Youenn Fablet <youenn@apple.com> |
| |
| Add libwebrtc backend support for RTCRtpSender::replaceTrack |
| https://bugs.webkit.org/show_bug.cgi?id=169841 |
| |
| Reviewed by Alex Christensen. |
| |
| Tests: webrtc/audio-replace-track.html |
| webrtc/video-replace-track.html |
| |
| Adding support for replaceTrack for audio and video sources. |
| Replacing tracks will always succeed for audio sources. |
| For video tracks, it will only succeed if the video resolution is not greater. |
| LibWebRTCPeerConnectionBackend will delegate the track replacing by replacing the source of the outgoing sources with the source wrapped in the replacing track. |
| |
| Video test is not fully passing as size constraints for mock video sources are not providing the right video stream resolution. |
| |
| * Modules/mediastream/RTCRtpSender.cpp: |
| (WebCore::RTCRtpSender::replaceTrack): |
| * Modules/mediastream/RTCRtpSender.h: |
| * Modules/mediastream/RTCRtpSender.idl: |
| * Modules/mediastream/libwebrtc/LibWebRTCPeerConnectionBackend.cpp: |
| (WebCore::LibWebRTCPeerConnectionBackend::replaceTrack): |
| * Modules/mediastream/libwebrtc/LibWebRTCPeerConnectionBackend.h: |
| * platform/mediastream/mac/RealtimeOutgoingAudioSource.cpp: |
| (WebCore::RealtimeOutgoingAudioSource::setSource): |
| * platform/mediastream/mac/RealtimeOutgoingAudioSource.h: |
| * platform/mediastream/mac/RealtimeOutgoingVideoSource.cpp: |
| (WebCore::RealtimeOutgoingVideoSource::setSource): |
| * platform/mediastream/mac/RealtimeOutgoingVideoSource.h: |
| * platform/mock/MockRealtimeVideoSource.cpp: |
| (WebCore::MockRealtimeVideoSource::drawText): |
| (WebCore::MockRealtimeVideoSource::generateFrame): |
| |
| 2017-03-24 Jon Lee <jonlee@apple.com> |
| |
| Remove comment from RTCStatsReport.idl to convert ssrc to DOMString. |
| Unreviewed. |
| |
| Latest available Editor's Draft of WebRTC Statistics API is from 14 December 2016, |
| but since then, in https://github.com/w3c/webrtc-stats/pull/157, it was changed to become |
| unsigned long. |
| |
| * Modules/mediastream/RTCStatsReport.idl: |
| |
| 2017-03-24 Youenn Fablet <youenn@apple.com> |
| |
| Add support for DataChannel and MediaStreamTrack stats |
| https://bugs.webkit.org/show_bug.cgi?id=170031 |
| |
| Reviewed by Eric Carlson. |
| |
| Tests: webrtc/datachannel/datachannel-stats.html |
| webrtc/video-mediastreamtrack-stats.html |
| |
| Exposing libwebrtc stats through WebRTC stats API, gathered for data channel and media stream tracks. |
| |
| * Modules/mediastream/RTCStatsReport.h: |
| (WebCore::RTCStatsReport::MediaStreamTrackStats::MediaStreamTrackStats): |
| (WebCore::RTCStatsReport::DataChannelStats::DataChannelStats): |
| * Modules/mediastream/RTCStatsReport.idl: |
| * Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp: |
| (WebCore::fillRTCMediaStreamTrackStats): |
| (WebCore::fillRTCDataChannelStats): |
| (WebCore::LibWebRTCMediaEndpoint::StatsCollector::OnStatsDelivered): |
| |
| 2017-03-24 Youenn Fablet <youenn@apple.com> |
| |
| Fix framesEncoded/framesDecoded RTC stats |
| https://bugs.webkit.org/show_bug.cgi?id=170024 |
| |
| Reviewed by Eric Carlson. |
| |
| Test: webrtc/video-stats.html |
| |
| Adding access to these fields now that they are available. |
| |
| * Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp: |
| (WebCore::fillInboundRTPStreamStats): |
| (WebCore::fillOutboundRTPStreamStats): |
| |
| 2017-03-24 Carlos Garcia Campos <cgarcia@igalia.com> |
| |
| Unreviewed. Fix GTK+ test /webkit2/WebKitWebView/default-menu after r214244. |
| |
| Fix mnemonic string of contextMenuItemTagOpenAudioInNewWindow() that I copy pasted from |
| contextMenuItemTagOpenVideoInNewWindow(). |
| |
| * platform/LocalizedStrings.cpp: |
| (WebCore::contextMenuItemTagOpenAudioInNewWindow): |
| |
| 2017-03-24 Carlos Garcia Campos <cgarcia@igalia.com> |
| |
| [GStreamer] MediaPlayerPrivateGStreamerOwr shouldn't be the default engine |
| https://bugs.webkit.org/show_bug.cgi?id=170049 |
| |
| Reviewed by Žan Doberšek. |
| |
| This is causing several media tests to fail after r214338. When trying to load something like this: |
| |
| http://127.0.0.1:8000/media/resources/serve-video.php?name=../../../../media/content/silence.wav&type=audio/wav&content-length=no&icy-data=yes |
| |
| since r214338, the content type is known and inferred from the extension in this case, what ends up calling |
| nextMediaEngine() in MediaPlayer::loadWithNextMediaEngine. That returns the first registered media engine, that |
| is Owr that doesn't know how to load that and fails. |
| |
| Fixes: http/tests/media/media-play-stream-chunked-icy.html |
| http/tests/media/media-seeking-no-ranges-server.html |
| http/tests/media/video-auth.html |
| http/tests/media/video-play-stall-before-meta-data.html |
| http/tests/security/contentSecurityPolicy/audio-redirect-allowed.html |
| http/tests/security/contentSecurityPolicy/audio-redirect-allowed2.html |
| http/tests/security/contentSecurityPolicy/audio-redirect-blocked.html |
| http/tests/security/contentSecurityPolicy/video-redirect-allowed.html |
| http/tests/security/contentSecurityPolicy/video-redirect-allowed2.html |
| http/tests/security/contentSecurityPolicy/video-redirect-blocked.html |
| |
| * platform/graphics/MediaPlayer.cpp: |
| (WebCore::buildMediaEnginesVector): |
| |
| 2017-03-24 Per Arne Vollan <pvollan@apple.com> |
| |
| Text stroke is sometimes clipped on video captions. |
| https://bugs.webkit.org/show_bug.cgi?id=170006 |
| |
| Reviewed by Eric Carlson. |
| |
| Set 'overflow' property to 'visible' on cue element to avoid clipping of text stroke. |
| |
| Updated test media/track/track-css-stroke-cues.html. |
| |
| * html/track/TextTrackCueGeneric.cpp: |
| (WebCore::TextTrackCueGenericBoxElement::applyCSSProperties): |
| * html/track/VTTCue.cpp: |
| (WebCore::VTTCueBox::applyCSSProperties): |
| |
| 2017-03-24 Carlos Garcia Campos <cgarcia@igalia.com> |
| |
| [GTK] Add MIMETypeRegistry implementation using xdgmime and remove the GTK+ one |
| https://bugs.webkit.org/show_bug.cgi?id=170001 |
| |
| Reviewed by Michael Catanzaro. |
| |
| The XDG implementation could be used by any port where shared-mime-info is expected to be available. It also |
| improves the current GTK+ implementation that is based on a very small map of mime types and extensions. |
| |
| * CMakeLists.txt: |
| * PlatformGTK.cmake: |
| * platform/xdg/MIMETypeRegistryXdg.cpp: Renamed from Source/WebCore/platform/gtk/MIMETypeRegistryGtk.cpp. |
| (WebCore::MIMETypeRegistry::getMIMETypeForExtension): |
| (WebCore::MIMETypeRegistry::getPreferredExtensionForMIMEType): |
| |
| 2017-03-23 Jon Lee <jonlee@apple.com> |
| |
| Update createDataChannel on RTCPeerConnection |
| https://bugs.webkit.org/show_bug.cgi?id=170044 |
| |
| Reviewed by Youenn Fablet. |
| |
| * Modules/mediastream/RTCPeerConnection.idl: Change label to USVString. |
| |
| 2017-03-23 Antti Koivisto <antti@apple.com> |
| |
| Revert r213712, caused iPad PLT regression |
| https://bugs.webkit.org/show_bug.cgi?id=170040 |
| |
| Unreviewed. |
| |
| A few subtests have big regressions. |
| |
| * css/StyleResolver.cpp: |
| (WebCore::StyleResolver::pseudoStyleRulesForElement): |
| * dom/Document.cpp: |
| (WebCore::Document::resolveStyle): |
| (WebCore::Document::updateLayoutIgnorePendingStylesheets): |
| (WebCore::Document::shouldScheduleLayout): |
| (WebCore::Document::didRemoveAllPendingStylesheet): |
| * dom/Document.h: |
| (WebCore::Document::didLayoutWithPendingStylesheets): |
| (WebCore::Document::hasNodesWithPlaceholderStyle): |
| (WebCore::Document::setHasNodesWithPlaceholderStyle): |
| (WebCore::Document::hasNodesWithNonFinalStyle): Deleted. |
| (WebCore::Document::setHasNodesWithNonFinalStyle): Deleted. |
| * html/HTMLFrameSetElement.cpp: |
| (WebCore::HTMLFrameSetElement::rendererIsNeeded): |
| * page/FrameView.cpp: |
| (WebCore::FrameView::qualifiesAsVisuallyNonEmpty): |
| (WebCore::FrameView::fireLayoutRelatedMilestonesIfNeeded): |
| * rendering/RenderBlock.cpp: |
| (WebCore::RenderBlock::paintContents): |
| * rendering/RenderLayer.cpp: |
| (WebCore::shouldSuppressPaintingLayer): |
| * rendering/style/RenderStyle.cpp: |
| (WebCore::RenderStyle::changeRequiresRepaint): |
| * rendering/style/RenderStyle.h: |
| (WebCore::RenderStyle::isPlaceholderStyle): |
| (WebCore::RenderStyle::setIsPlaceholderStyle): |
| (WebCore::RenderStyle::isNotFinal): Deleted. |
| (WebCore::RenderStyle::setIsNotFinal): Deleted. |
| * rendering/style/StyleRareNonInheritedData.cpp: |
| (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData): |
| (WebCore::StyleRareNonInheritedData::operator==): |
| * rendering/style/StyleRareNonInheritedData.h: |
| * style/StyleScope.cpp: |
| (WebCore::Style::Scope::analyzeStyleSheetChange): |
| (WebCore::Style::Scope::updateActiveStyleSheets): |
| * style/StyleTreeResolver.cpp: |
| (WebCore::Style::makePlaceholderStyle): |
| (WebCore::Style::TreeResolver::styleForElement): |
| (WebCore::Style::TreeResolver::resolveElement): |
| |
| 2017-03-23 Wenson Hsieh <wenson_hsieh@apple.com> |
| |
| Dragging on a large image should not revert to a file icon if data interaction is enabled |
| https://bugs.webkit.org/show_bug.cgi?id=170018 |
| <rdar://problem/31184508> |
| |
| Reviewed by Tim Horton. |
| |
| If data interaction is enabled, don't fall back to showing a file icon when initiating a drag on an image element. |
| |
| New API tests: DataInteractionTests.LargeImageToTargetDiv |
| DataInteractionTests.AttachmentElementItemProviders |
| |
| * page/DragController.cpp: |
| (WebCore::DragController::doImageDrag): |
| (WebCore::DragController::shouldUseCachedImageForDragImage): |
| * page/DragController.h: |
| |
| 2017-03-23 Youenn Fablet <youenn@apple.com> |
| |
| Rename RTCIceCandidateEvent to RTCPeerConnectionIceEvent |
| https://bugs.webkit.org/show_bug.cgi?id=169981 |
| |
| Reviewed by Eric Carlson. |
| |
| * CMakeLists.txt: |
| * DerivedSources.make: |
| * Modules/mediastream/MediaEndpointPeerConnection.cpp: |
| * Modules/mediastream/PeerConnectionBackend.cpp: |
| (WebCore::PeerConnectionBackend::fireICECandidateEvent): |
| (WebCore::PeerConnectionBackend::doneGatheringCandidates): |
| * Modules/mediastream/RTCPeerConnection.cpp: |
| * Modules/mediastream/RTCPeerConnectionIceEvent.cpp: Renamed from Source/WebCore/Modules/mediastream/RTCIceCandidateEvent.cpp. |
| (WebCore::RTCPeerConnectionIceEvent::create): |
| (WebCore::RTCPeerConnectionIceEvent::RTCPeerConnectionIceEvent): |
| (WebCore::RTCPeerConnectionIceEvent::~RTCPeerConnectionIceEvent): |
| (WebCore::RTCPeerConnectionIceEvent::candidate): |
| (WebCore::RTCPeerConnectionIceEvent::eventInterface): |
| * Modules/mediastream/RTCPeerConnectionIceEvent.h: Renamed from Source/WebCore/Modules/mediastream/RTCIceCandidateEvent.h. |
| * Modules/mediastream/RTCPeerConnectionIceEvent.idl: Renamed from Source/WebCore/Modules/mediastream/RTCIceCandidateEvent.idl. |
| * WebCore.xcodeproj/project.pbxproj: |
| * dom/EventNames.in: |
| |
| 2017-03-23 Michael Catanzaro <mcatanzaro@igalia.com> |
| |
| window.crypto.getRandomValues() uses the insecure RC4 RNG |
| https://bugs.webkit.org/show_bug.cgi?id=169623 |
| |
| Reviewed by Alex Christensen. |
| |
| * PlatformMac.cmake: |
| * WebCore.xcodeproj/project.pbxproj: |
| * crypto/CryptoKey.cpp: |
| (WebCore::CryptoKey::randomData): Use this on Mac now. |
| * crypto/mac/CryptoKeyMac.cpp: Removed. |
| * page/Crypto.cpp: |
| (WebCore::Crypto::getRandomValues): Rollout r214188. |
| |
| 2017-03-23 Chris Dumez <cdumez@apple.com> |
| |
| SVG animations are not paused when their <svg> element is removed from the document |
| https://bugs.webkit.org/show_bug.cgi?id=170030 |
| <rdar://problem/31230252> |
| |
| Reviewed by Dean Jackson. |
| |
| SVG animations were not paused when their <svg> element was removed from the document. |
| This patch fixes the issue. |
| |
| Test: svg/animations/animations-paused-when-removed-from-document.html |
| |
| * svg/SVGSVGElement.cpp: |
| (WebCore::SVGSVGElement::insertedInto): |
| (WebCore::SVGSVGElement::removedFrom): |
| |
| 2017-03-22 Myles C. Maxfield <mmaxfield@apple.com> |
| |
| font shorthand should accept variation values |
| https://bugs.webkit.org/show_bug.cgi?id=168998 |
| |
| Reviewed by Simon Fraser. |
| |
| The CSS Fonts 4 spec has stabilized as to which variation values are allowed in |
| the font shorthand property. Weights are allowed because a 0 weight is considered |
| as a parse error, so there is no conflict with a unitless font-size of 0. |
| font-style accepts angles, so there is no conflict there. However, font-stretch |
| accepts percentages, which are also accepted by font-size, which means the newly |
| extended grammar for font-stretch can't be accepted in the shorthand. |
| |
| Tests: fast/text/font-style-parse.html |
| fast/text/font-weight-parse.html |
| |
| * css/parser/CSSPropertyParser.cpp: |
| (WebCore::consumeFontWeight): |
| (WebCore::consumeFontStyle): |
| (WebCore::CSSPropertyParser::consumeFont): |
| (WebCore::consumeFontWeightCSS21): Deleted. |
| * css/parser/CSSPropertyParserHelpers.cpp: |
| (WebCore::CSSPropertyParserHelpers::consumeFontWeightNumber): |
| * css/parser/CSSPropertyParserHelpers.h: |
| |
| 2017-03-23 Chris Dumez <cdumez@apple.com> |
| |
| SVG animations are not paused when inserted into a hidden page |
| https://bugs.webkit.org/show_bug.cgi?id=170026 |
| <rdar://problem/31228704> |
| |
| Reviewed by Andreas Kling. |
| |
| SVG animations were not paused when inserted into a hidden page. We would pause |
| animations in a page when the page becomes hidden. However, new animations |
| inserted in the page after this point would start, despite the page being |
| hidden. |
| |
| Tests: |
| - svg/animations/animations-paused-when-inserted-in-hidden-document.html |
| - svg/animations/animations-paused-when-inserted-in-hidden-document2.html |
| |
| * dom/Document.cpp: |
| (WebCore::Document::accessSVGExtensions): |
| * svg/SVGDocumentExtensions.cpp: |
| (WebCore::SVGDocumentExtensions::SVGDocumentExtensions): |
| (WebCore::SVGDocumentExtensions::addTimeContainer): |
| (WebCore::reportMessage): |
| * svg/SVGDocumentExtensions.h: |
| * testing/Internals.cpp: |
| (WebCore::Internals::areSVGAnimationsPaused): |
| * testing/Internals.h: |
| * testing/Internals.idl: |
| |
| == Rolled over to ChangeLog-2017-03-23 == |