2020-03-02 Doug Kelly ASSERT(m_column != unsetColumnIndex) in RenderTable::cellBefore https://bugs.webkit.org/show_bug.cgi?id=208397 Reviewed by Zalan Bujtas. When inserting a cell into a table row which is not visible, this can lead to attempting to compute the repaint rects during tree building. Instead, mark the layer as dirty using dirtyVisibleContentStatus(), and the visibility will be recomputed at a later time. Test: fast/table/insert-cell-invisible-parent.html * rendering/RenderElement.cpp: (WebCore::RenderElement::insertedIntoTree): 2020-03-04 Doug Kelly Crash in SVGElement::removeEventListener with symbol element https://bugs.webkit.org/show_bug.cgi?id=207920 Reviewed by Ryosuke Niwa. Resolves a crash in SVGElement::removeEventListener by only attaching the events to the window if the SVG element is both the outermost SVG element, in addition to ensuring the SVG element is attached to the tree. The symbol element's behavior when referenced by a use tag actually creates an svg tag instead, so the SVGSVGElement's special behavior for copying attributes is vital. Note that Chrome and Firefox have a similar behavior for detached SVG elements as to what this change creates: in both other browsers, onerror is not fired for a detached svg element, and in Firefox, onresize is not fired for a detached svg element (it is however fired in Chrome). Tests: fast/events/detached-svg-parent-window-events.html fast/events/onerror-svg-symbol.html * svg/SVGSVGElement.cpp: (WebCore::SVGSVGElement::parseAttribute): 2020-02-24 ChangSeok Oh PS-2019-006: [GTK] WebKit - AXObjectCache - m_deferredFocusedNodeChange - UaF https://bugs.webkit.org/show_bug.cgi?id=204342 Reviewed by Carlos Garcia Campos. m_deferredFocusedNodeChange keeps pairs of a old node and a new one to update a focused node later. When a node is removed in the document, it is also removed from the pair vector. The problem is only comparing the new node in each pair with a removed node decides the removal. In the case where the removed node lives in m_deferredFocusedNodeChange as an old node, a crash happens while we get a renderer of the removed node to handle focused elements. To fix this, we find all entries of which old node is matched to the removed node, and set their first value null. No new tests since no functionality changed. * accessibility/AXObjectCache.cpp: (WebCore::AXObjectCache::remove): 2020-01-16 Tomoki Imai Do not detect the stopped animations in Nicosia::Animation to avoid flashback https://bugs.webkit.org/show_bug.cgi?id=206280 Reviewed by Carlos Garcia Campos. This fixes the animation flashback issue found in https://webkit.org/blog-files/3d-transforms/morphing-cubes.html. The flashback was caused by using the old layer transform matrix saved when the animation has been started. The root cause is an inconsistency of animation state in Nicosia::Animation and CoordinatedGraphicsLayer. For Nicosia::Animation, ThreadedCompositor increases MonitonicTime for animation every frame, and calls Nicosia::Animation::apply. For CoordinatedGraphicsLayer, CSSAnimationController updates animations list and if the animation has been finished it updates CSS value. There is a chance to use old layer state while the Nicosia::Animation stopped, but CoordinatedGraphicsLayer still obtains old CSS value and animations. In this patch, all the Nicosia::Animation is considered to have "AnimationFillMode::Forwards" or "AnimationFillMode::Both", which means they are active and use the last position when the animation is stopped. Stopping and removing animations should be only done by CSSAnimationController and CoordinatedGraphicsScene as they can remove the animation from the list and update the CSS value at the same time. Mac implementation GraphicsLayerCA has a similar logic, it replaces AnimationFillMode with Forwards or Both. https://trac.webkit.org/browser/webkit/trunk/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp?rev=254502#L3248 Tested manually with https://webkit.org/blog-files/3d-transforms/morphing-cubes.html * platform/graphics/nicosia/NicosiaAnimation.cpp: (Nicosia::Animation::apply): Return the last value for stopped animations to avoid flickering (Nicosia::Animation::isActive const): Removed. It should always return true because all the animations are considered as fillsForwards in Nicosia::Animation to avoid flashback. (Nicosia::Animations::hasActiveAnimationsOfType const): Remove isActive check. (Nicosia::Animations::getActiveAnimations() const): Removed. It returns whole animations list because all the animations are active. * platform/graphics/nicosia/NicosiaAnimation.h: * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp: (WebCore::CoordinatedGraphicsLayer::flushCompositingStateForThisLayerOnly): 2020-01-09 Brent Fulgham REGRESSION (r253662): Large Data URLs are not being handled properly https://bugs.webkit.org/show_bug.cgi?id=205979 Reviewed by Youenn Fablet. The URL size limitation added in r253662 was too low. We should bump it to handle reasonable data URI sizes. Test: fast/url/data-url-large.html. * page/SecurityOrigin.cpp: 2019-12-17 Brent Fulgham Limit URL to reasonable size https://bugs.webkit.org/show_bug.cgi?id=203825 Reviewed by Ryosuke Niwa. * page/SecurityOrigin.cpp: (WebCore::SecurityOrigin::canDisplay const): Place an upper bound on the amount of memory a URL may consume. 2020-01-08 Myles C. Maxfield Fix specification violation in Font Loading API https://bugs.webkit.org/show_bug.cgi?id=205901 Reviewed by Brent Fulgham. Our Font Loading API does not comply with the spec: > If the parsed value is a CSS-wide keyword, return a syntax error. Rather than crashing, we should return a syntax error. Test: fast/text/font-loading-global-keyword.html * css/CSSFontFaceSet.cpp: (WebCore::computeFontSelectionRequest): (WebCore::CSSFontFaceSet::matchingFacesExcludingPreinstalledFonts): 2019-12-17 Ryosuke Niwa executeIfJavaScriptURL should check requester's security origin https://bugs.webkit.org/show_bug.cgi?id=205324 Reviewed by Brent Fulgham. Don't execute the JavaScript in ScriptController::executeIfJavaScriptURL if the security origin of the current document is no longer accessible from the request originator's security origin. * bindings/js/ScriptController.cpp: (WebCore::ScriptController::executeIfJavaScriptURL): Added a check. * bindings/js/ScriptController.h: * loader/FrameLoader.cpp: (WebCore::FrameLoader::urlSelected): Pass around the security origin of the requester. (WebCore::FrameLoader::submitForm): 2019-12-16 youenn fablet Consider top-level context whose origin is unique as insecure https://bugs.webkit.org/show_bug.cgi?id=205111 Reviewed by Brent Fulgham. Tests: http/tests/security/top-level-unique-origin.https.html http/tests/security/top-level-unique-origin2.https.html * dom/Document.cpp: (WebCore::Document::isSecureContext const): There is no guarantee that top level unique origin contexts like data URL are SecureContext. This patch makes them no longer SecureContext. This helps getting closer to https://w3c.github.io/webappsec-secure-contexts/#is-url-trustworthy which identifies all unique origins as "Not Trustworthy". Child unique origin contexts will stay SecureContext if their parents are. 2019-12-16 youenn fablet SecurityOrigin should be unique for null blob URLs that have been unregistered https://bugs.webkit.org/show_bug.cgi?id=205169 Reviewed by Darin Adler. In case we cannot retrieve a cached origin for a null origin, just create a unique one. This is better than having an origin with an empty host and empty scheme. Test: http/tests/security/blob-null-url-location-origin.html * fileapi/ThreadableBlobRegistry.cpp: (WebCore::ThreadableBlobRegistry::unregisterBlobURL): (WebCore::ThreadableBlobRegistry::getCachedOrigin): 2020-02-05 Michael Catanzaro [GTK] Cannot perform most local loads with sandbox enabled https://bugs.webkit.org/show_bug.cgi?id=202071 Reviewed by Carlos Garcia Campos. SecurityOrigin::canDisplay is improperly checking whether the target file URL points to a file on the same "volume" (mount point) as the source file. That can't happen here because this code is running in the web process, but only the network process has access to the unsandboxed filesystem. This code can only check whether the target file exists within the sandbox's mount namespace, but that's not what we want to do because we're not going to load that file, we're going to ask the network process to load the file with the same path outside the mount namespace. We can probably live without this check. But if bringing it back is desired, it has to be done someplace totally different, in network process code rather than web process code. * page/SecurityOrigin.cpp: (WebCore::SecurityOrigin::canDisplay const): 2020-01-28 Carlos Garcia Campos [GTK] Should use light theme unless website declares support for dark themes in color-schemes property https://bugs.webkit.org/show_bug.cgi?id=197947 Reviewed by Michael Catanzaro. * dom/Document.cpp: (WebCore::Document::useDarkAppearance const): Remove HAVE(OS_DARK_MODE_SUPPORT) because ENABLE(DARK_MODE_CSS) guards should be enough. * page/FrameView.cpp: (WebCore::FrameView::updateBackgroundRecursively): Revert changes made in r244635. * page/Page.cpp: (WebCore::Page::effectiveAppearanceDidChange): Use ENABLE(DARK_MODE_CSS) instead of HAVE(OS_DARK_MODE_SUPPORT). (WebCore::Page::useDarkAppearance const): Ditto. * rendering/RenderThemeGtk.cpp: (WebCore::RenderThemeGtk::systemColor const): Revert changes made in r244635. * rendering/RenderThemeGtk.h: * testing/InternalSettings.cpp: (WebCore::InternalSettings::setUseDarkAppearanceInternal): Revert changes made in r244635. 2020-01-06 Fujii Hironori ComplexTextController::offsetForPosition returns a wrong offset for a glyph boundary in a RTL text https://bugs.webkit.org/show_bug.cgi?id=205486 Reviewed by Ross Kirsling. ComplexTextController::offsetForPosition had the following code: > unsigned hitIndex = hitGlyphStart + (hitGlyphEnd - hitGlyphStart) * (m_run.ltr() ? x / adjustedAdvance : 1 - x / adjustedAdvance); If m_run.ltr() was false and x == 0, hitIndex would become hitGlyphEnd. This is not expected. It expects hitIndex < hitGlyphEnd if hitGlyphStart ≠ hitGlyphEnd. Let hitIndex be hitGlyphStart-1 in the such condition. Above change makes fast/text/ellipsis-text-rtl.html starting to fail because offsetForPosition returns the character offset of the next glyph if the argument 'h' is in a glyph boundary. In RTL text, offsetForPosition should return a character offset of the previous glyph in case of a glyph boundary. Use '<=' instead of '<' for RTL text in order to select previous glyphs for glyph boundaries. Test: fast/dom/Document/CaretRangeFromPoint/rtl.html * platform/graphics/ComplexTextController.cpp: (WebCore::ComplexTextController::offsetForPosition): Compute correct hitGlyphEnd for RTL. 2020-01-08 Fujii Hironori [HarfBuzz][GTK] fast/text/complex-first-glyph-with-initial-advance.html is failing https://bugs.webkit.org/show_bug.cgi?id=118221 Reviewed by Carlos Garcia Campos. Arabic diacritics made glyphs vertically unaligned if the first glyph had a vertical offset. The initial advance should be same with the first glyph origin for HarfBuzz. See the diagram in ComplexTextController.h for details. drawGlyphs of Cairo port was assuming upward y-axis for glyph advances even though those of Mac and AppleWin port are assuming downward y-axis. This is a problem for Windows ports because AppleWin and WinCairo port are sharing the code calculating advances. Covered by existing tests. * platform/graphics/cairo/FontCairo.cpp: (WebCore::FontCascade::drawGlyphs): * platform/graphics/cairo/GraphicsContextImplCairo.cpp: (WebCore::GraphicsContextImplCairo::drawGlyphs): Sum up the height of advances into yOffset instead of subtraction. * platform/graphics/harfbuzz/ComplexTextControllerHarfBuzz.cpp: (WebCore::ComplexTextController::ComplexTextRun::ComplexTextRun): Don't negate offsetY. Set m_initialAdvance as the first item of m_glyphOrigins. 2019-12-13 Carlos Garcia Campos [HarfBuzz] WebKitWebProcess crashes when displaying a KaTeX formula https://bugs.webkit.org/show_bug.cgi?id=204689 Reviewed by Carlos Alberto Lopez Perez. We are creating and caching an hb_font_t for the given FontPlatformData's FT_Face, but the face is not referenced so it is destroyed eventually while the hb_font_t is still alive. We need to keep a reference of the FT_Face while the hb_font_t is alive. * platform/graphics/freetype/FontPlatformDataFreeType.cpp: (WebCore::FontPlatformData::createOpenTypeMathHarfBuzzFont const): Create the hb_face_t with hb_ft_face_create_referenced() instead of hb_ft_face_create_cached(). 2019-11-01 Said Abou-Hallawa SVG pair properties must be detached from their owner before it's deleted https://bugs.webkit.org/show_bug.cgi?id=203545 Reviewed by Simon Fraser. SVGAnimatedPropertyPairAccessor needs to override its detach() method so each of its pair properties detaches itself from the owner. SVGPointerMemberAccessor does the same thing but for a single property which covers all the list properties as well. Test: svg/custom/pair-properties-detach.html * svg/properties/SVGAnimatedPropertyPairAccessor.h: 2019-10-09 Zalan Bujtas RunResolver::rangeForRendererWithOffsets should check for range end https://bugs.webkit.org/show_bug.cgi?id=202761 Reviewed by Antti Koivisto. This patch ensures that when rangeForRenderer comes back with a collapsed run (empty range), rangeForRendererWithOffsets returns an empty range as well. Test: fast/text/simple-line-layout-range-check-end.html * rendering/SimpleLineLayoutResolver.cpp: (WebCore::SimpleLineLayout::RunResolver::rangeForRendererWithOffsets const): 2019-11-13 Xabier Rodriguez Calvar [GStreamer] Several issues while trying to play a video on NextCloud https://bugs.webkit.org/show_bug.cgi?id=203194 Reviewed by Philippe Normand. First problem was the loader not being restarted in PAUSED, so sometimes playback never started since buffering never reached 100%. Then, after investigating blocksizes and not being a viable solution, reducing the 200_ms to 100_ms wait for new data was the trick to avoid choppyness. During investigation several issues were fixed like turning GstQuery* into GRefPtr for MediaPlayerPrivateGStreamer::buffered, making blocksize unsigned instead of uint64_t as it is in GStreamer and creating and using WEBKIT_WEB_SRC_CAST since many uses of WEBKIT_WEB_SRC cast were already protected by WEBKIT_IS_WEB_SRC. * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp: (WebCore::MediaPlayerPrivateGStreamer::buffered const): GRefPtr. (WebCore::MediaPlayerPrivateGStreamer::handleMessage): (WebCore::MediaPlayerPrivateGStreamer::sourceSetup): (WebCore::MediaPlayerPrivateGStreamer::didPassCORSAccessCheck const): Use WEBKIT_WEB_SRC_CAST. * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp: (webKitWebSrcCreate): Reduce wait for data down to 100_ms and request download restart also in PAUSED. (CachedResourceStreamingClient::checkUpdateBlocksize): Turn blocksize to unsigned. * platform/graphics/gstreamer/WebKitWebSourceGStreamer.h: Add WEBKIT_WEB_SRC_CAST. 2019-12-09 Philippe Normand [GStreamer] Crashes in MediaPlayerPrivateGStreamer::ensureGstGLContext https://bugs.webkit.org/show_bug.cgi?id=204848 Reviewed by Michael Catanzaro. Make sure the GL video sink uses a valid WebKit shared GL context. * platform/graphics/gstreamer/GLVideoSinkGStreamer.cpp: (ensureGstGLContext): (webKitGLVideoSinkProbePlatform): 2019-10-28 Zalan Bujtas Hidden framesets should provide default edgeInfo value https://bugs.webkit.org/show_bug.cgi?id=203506 Reviewed by Simon Fraser. The grid information (and certain associated structures e.g. edegeInfo) for a frameset is updated through the layout() call. When the used height/width computes to zero on a frameset child (frame or nested frameset), we don't run layout on the renderer thus hidden nested framesets can only provide the default edge info. This patch changes this behaviour and we now call layout on those hidden renderers the same way we do it on iOS. Test: fast/frames/hidden-frameset.html * rendering/RenderFrameSet.cpp: (WebCore::RenderFrameSet::edgeInfo const): 2019-10-04 Heiko Becker Fix build with icu 65.1 https://bugs.webkit.org/show_bug.cgi?id=202600 Reviewed by Konstantin Tokarev. * dom/Document.cpp: (WebCore::isValidNameNonASCII): (WebCore::Document::parseQualifiedName): 2019-11-07 Adrian Perez de Castro Unreviewed build fixed for non-unified builds. No new tests needed. * Modules/indexeddb/shared/IDBGetAllRecordsData.cpp: Add missing inclusion of the wtf/text/StringConcatenateNumbers.h header. * Modules/indexeddb/shared/IDBIterateCursorData.cpp: Ditto. * page/DOMWindowExtension.cpp: Add missing inclusion of the Document.h header. * platform/glib/UserAgentGLib.cpp: Add missing inclusion of the HTTPParsers.h header. 2019-10-14 Carlos Garcia Campos [GTK] White pages in AC mode: Cannot get default EGL display: EGL_BAD_PARAMETER https://bugs.webkit.org/show_bug.cgi?id=202362 Reviewed by Carlos Alberto Lopez Perez. The problem is that PlatformDisplayLibWPE::initialize() is failing to initialize the EGL display for some reason. We need to understand why, but we should also handle the case of failing to initialize the EGL display and simply disable accelerated compositing mode to avoid white pages and crashes in websites using WebGL. This patch doesn't actually fix the bug, it just handles the EGL display initialization failure. * platform/graphics/PlatformDisplay.cpp: (WebCore::PlatformDisplay::~PlatformDisplay): Set s_sharedDisplayForCompositing to nullptr when the shared display for compositing is destroyed. * platform/graphics/libwpe/PlatformDisplayLibWPE.cpp: (WebCore::PlatformDisplayLibWPE::initialize): Return false when EGL display initialization fails. * platform/graphics/libwpe/PlatformDisplayLibWPE.h: 2019-09-28 Said Abou-Hallawa Crash when removing the target element while animating its attributes https://bugs.webkit.org/show_bug.cgi?id=202247 Reviewed by Darin Adler. If SMIL is animating a CSS attribute, there is a chance the animation is ended while it is being started or progressed. For that reason, the member SVGAnimateElementBase::m_animator has to be made RefPtr and it has to be be protected in resetAnimatedType() and calculateAnimatedValue(). While SMILTimeContainer::updateAnimations() is calling progress() for the scheduled animation elements, SMILTimeContainer::unschedule() might get called if processing an animation causes events to be dispatched. For that reason we need to copy the scheduled animations Vector before processing them so we avoid changing the Vector while looping through its items. Remove the guard SMILTimeContainer::m_preventScheduledAnimationsChanges which was added in r129670 for debugging purposes. In some situations, the scheduled animations map could be modified out from under some of the functions of SMILTimeContainer. Test: svg/animations/animate-and-remove-target-element.html * svg/SVGAnimateElementBase.cpp: (WebCore::SVGAnimateElementBase::resetAnimatedType): (WebCore::SVGAnimateElementBase::calculateAnimatedValue): * svg/SVGAnimateElementBase.h: * svg/SVGElement.cpp: (WebCore::SVGElement::createAnimator): * svg/SVGElement.h: * svg/animation/SMILTimeContainer.cpp: (WebCore::SMILTimeContainer::schedule): (WebCore::SMILTimeContainer::unschedule): (WebCore::SMILTimeContainer::setElapsed): (WebCore::SMILTimeContainer::sortByPriority): (WebCore::SMILTimeContainer::processAnimations): (WebCore::SMILTimeContainer::processScheduledAnimations): (WebCore::SMILTimeContainer::updateAnimations): (WebCore::SMILTimeContainer::~SMILTimeContainer): Deleted. * svg/animation/SMILTimeContainer.h: * svg/animation/SVGSMILElement.cpp: (WebCore::SVGSMILElement::calculateNextProgressTime const): * svg/properties/SVGAnimatedPropertyAccessorImpl.h: * svg/properties/SVGAnimatedPropertyAnimatorImpl.h: * svg/properties/SVGAnimatedPropertyPairAccessorImpl.h: * svg/properties/SVGAnimatedPropertyPairAnimator.h: * svg/properties/SVGAnimatedPropertyPairAnimatorImpl.h: * svg/properties/SVGAttributeAnimator.h: * svg/properties/SVGMemberAccessor.h: (WebCore::SVGMemberAccessor::createAnimator const): * svg/properties/SVGPrimitivePropertyAnimator.h: (WebCore::SVGPrimitivePropertyAnimator::create): * svg/properties/SVGPropertyAnimatorFactory.h: (WebCore::SVGPropertyAnimatorFactory::createAnimator): * svg/properties/SVGPropertyOwnerRegistry.h: * svg/properties/SVGPropertyRegistry.h: * svg/properties/SVGValuePropertyAnimatorImpl.h: * svg/properties/SVGValuePropertyListAnimatorImpl.h: 2019-10-30 Carlos Garcia Campos ImageDecoders: use a thread safe data buffer for Cairo backing store https://bugs.webkit.org/show_bug.cgi?id=201727 Reviewed by Fujii Hironori. Use SharedBuffer::dataSegment which is ThreadSafeRefCounted. * platform/graphics/ImageBackingStore.h: (WebCore::ImageBackingStore::setSize): (WebCore::ImageBackingStore::ImageBackingStore): * platform/image-decoders/cairo/ImageBackingStoreCairo.cpp: (WebCore::ImageBackingStore::image const): 2019-10-29 Carlos Garcia Campos [GTK][WPE] ImageDecoders: use SharedBuffer::DataSegment instead of SharedBuffer https://bugs.webkit.org/show_bug.cgi?id=202807 Reviewed by Adrian Perez de Castro. Because SharedBuffer::DataSegment is ThreadSafeRefCounted. * platform/image-decoders/ScalableImageDecoder.h: * platform/image-decoders/bmp/BMPImageDecoder.cpp: (WebCore::BMPImageDecoder::setData): (WebCore::BMPImageDecoder::decodeHelper): * platform/image-decoders/bmp/BMPImageDecoder.h: * platform/image-decoders/bmp/BMPImageReader.h: (WebCore::BMPImageReader::readUint16): (WebCore::BMPImageReader::readUint32): (WebCore::BMPImageReader::setData): (WebCore::BMPImageReader::readUint16 const): (WebCore::BMPImageReader::readUint32 const): * platform/image-decoders/gif/GIFImageDecoder.cpp: (WebCore::GIFImageDecoder::setData): (WebCore::GIFImageDecoder::decode): * platform/image-decoders/gif/GIFImageReader.h: (GIFImageReader::setData): * platform/image-decoders/ico/ICOImageDecoder.cpp: (WebCore::ICOImageDecoder::setData): (WebCore::ICOImageDecoder::decodeAtIndex): * platform/image-decoders/ico/ICOImageDecoder.h: * platform/image-decoders/jpeg/JPEGImageDecoder.cpp: (WebCore::JPEGImageReader::decode): * platform/image-decoders/jpeg2000/JPEG2000ImageDecoder.cpp: (WebCore::JPEG2000ImageDecoder::decode): * platform/image-decoders/png/PNGImageDecoder.cpp: (WebCore::PNGImageReader::decode): * platform/image-decoders/webp/WEBPImageDecoder.cpp: (WebCore::WEBPImageDecoder::decode): 2019-11-05 Carlos Garcia Campos [FreeType] Too slow running encoding/legacy-mb-korean/euc-kr WPT tests https://bugs.webkit.org/show_bug.cgi?id=203544 Reviewed by Carlos Alberto Lopez Perez. Use a cache for system fallbacks to keep the fonts sorted by font description. When a system fallback is needed again for the same font description, but different characters, we just iterate the cached font set comparing the charsets to get the best one. This avoids using FcFontMatch and FcFontSort is only called once per font description. * platform/graphics/FontCache.h: * platform/graphics/freetype/FontCacheFreeType.cpp: (WebCore::CachedFontSet::CachedFontSet): (WebCore::CachedFontSet::bestForCharacters): (WebCore::FallbackFontDescriptionKey::FallbackFontDescriptionKey): (WebCore::FallbackFontDescriptionKey::operator== const): (WebCore::FallbackFontDescriptionKey::operator!= const): (WebCore::FallbackFontDescriptionKey::isHashTableDeletedValue const): (WebCore::FallbackFontDescriptionKey::computeHash const): (WebCore::FallbackFontDescriptionKeyHash::hash): (WebCore::FallbackFontDescriptionKeyHash::equal): (WebCore::systemFallbackCache): (WebCore::FontCache::systemFallbackForCharacters): (WebCore::FontCache::platformPurgeInactiveFontData): 2019-10-09 Philippe Normand REGRESSION(r246399): [GStreamer] Problems playing AAC streams https://bugs.webkit.org/show_bug.cgi?id=202204 Reviewed by Xabier Rodriguez-Calvar. Push the EOS event in the WebKitWebSrc element when the internal queue is empty only for non-live resources. In the live case the queue might drain temporarily but that's OK because data would still be queued in downstream elements. No new tests, the EOS event was pushed too early because of this regression but there's no way to differentiate it from an expected event in a layout test. * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp: (webKitWebSrcCreate): 2019-09-17 Zalan Bujtas [First-letter] Use WeakPtr for the first-letter insertion point. https://bugs.webkit.org/show_bug.cgi?id=201842 Reviewed by Antti Koivisto. The about-to-be-removed first letter renderer's sibling could potentially be destroyed too as the result of the anonymous subtree collapsing logic (when the next sibling is a generated anonymous block and it is not needed anymore.) Test: fast/text/first-letter-with-columns-crash.html * rendering/updating/RenderTreeBuilderFirstLetter.cpp: (WebCore::RenderTreeBuilder::FirstLetter::updateStyle): 2019-09-13 Chris Dumez Crash under WebCore::firstPositionInNode() https://bugs.webkit.org/show_bug.cgi?id=201764 Reviewed by Wenson Hsieh and Geoff Garen. Make sure to keep a Ref<> to the textNode when we call insertNodeAtTabSpanPosition() or insertNodeAt(). Test: editing/firstPositionInNode-crash.html * editing/InsertTextCommand.cpp: (WebCore::InsertTextCommand::positionInsideTextNode): 2019-09-11 Ali Juma Prevent reentrancy FrameLoader::dispatchUnloadEvents() https://bugs.webkit.org/show_bug.cgi?id=200738 Reviewed by Brady Eidson. Reentrancy causes m_pageDismissalEventBeingDispatched to be incorrectly updated, so don't allow reentrancy. Since this prevents m_pageDismissalEventBeingDispatched from being reset inside a reentrant call, it can have the unintended effect of causing FrameLoader::stopAllLoaders to early-out when called from FrameLoader::detachFromParent while a frame's unload event handler calls document.open() on a parent frame and causes itself to become detached. Allowing a load to continue in a detached frame will lead to a crash. To prevent this, add a new argument to FrameLoader::stopAllLoaders that FrameLoader::detachFromParent can use to prevent an early-out. * loader/FrameLoader.cpp: (WebCore::FrameLoader::stopAllLoaders): (WebCore::FrameLoader::detachFromParent): (WebCore::FrameLoader::dispatchUnloadEvents): (WebCore::FrameLoader::dispatchBeforeUnloadEvent): Ensure that m_pageDismissalEventBeingDispatched is reset to its previous value, even if this is not None. * loader/FrameLoader.h: * loader/FrameLoaderTypes.h: Add a StopLoadingPolicy enum. 2019-09-03 Devin Rousso REGRESSION (r249078): Flaky crash in com.apple.JavaScriptCore: Inspector::InjectedScriptModule::ensureInjected https://bugs.webkit.org/show_bug.cgi?id=201201 Reviewed by Joseph Pecoraro. Tests: inspector/debugger/tail-deleted-frames-this-value.html inspector/heap/getRemoteObject.html * inspector/CommandLineAPIModuleSource.js: Avoid executing functions when injecting. Instead, modify the `CommandLineAPI` directly. 2019-09-06 Said Abou-Hallawa REGRESSION (r249367): m_decodingPromises grows indefinitely until ImageLoader destruction https://bugs.webkit.org/show_bug.cgi?id=201402 Reviewed by Youenn Fablet and Daniel Bates. Add the static functions resolvePromises() and rejectPromises(). These functions take an lvalue reference to a Vector of promises. Inside them, the lvalue reference argument are exchanged with an empty Vector of promises then the promises are processed. This clears m_decodingPromises and fixes the leak. Add an internal API which returns the count of the pending promises of an HTMLImageElement. This internal API will be used in the attached test. Test: fast/images/decode-resolve-reject-no-leak.html * html/HTMLImageElement.h: (WebCore::HTMLImageElement::pendingDecodePromisesCountForTesting const): * loader/ImageLoader.cpp: (WebCore::resolvePromises): ImageLoader::decode() calls BitmapImage::decode() and moves m_decodingPromises in capture. When decoding finishes, this function is called to resolve the promises. But ImageLoader might get deleted before the image decoding finishes. So this function has to be static. (WebCore::rejectPromises): (WebCore::ImageLoader::resolveDecodePromises): (WebCore::ImageLoader::rejectDecodePromises): (WebCore::ImageLoader::notifyFinished): (WebCore::ImageLoader::decode): (WebCore::resolveDecodePromises): Deleted. (WebCore::rejectDecodePromises): Deleted. * loader/ImageLoader.h: (WebCore::ImageLoader::pendingDecodePromisesCountForTesting const): * testing/Internals.cpp: (WebCore::Internals::imagePendingDecodePromisesCountForTesting): * testing/Internals.h: * testing/Internals.idl: 2019-09-18 Fujii Hironori [cairo] Incorrect targetRect in BackingStoreBackendCairoImpl::scroll https://bugs.webkit.org/show_bug.cgi?id=201895 Reviewed by Carlos Garcia Campos. In BackingStoreBackendCairoImpl::scroll, targetRect is calculated wrongly by shifting maxX and maxY. Bug 59655 fixed the issue by removing the shifting, but only for BackingStoreBackendCairoX11::scroll. No new tests, no behavior change. * platform/graphics/cairo/BackingStoreBackendCairoImpl.cpp: (WebCore::BackingStoreBackendCairoImpl::scroll): Take intersection of targetRect and scrollRect. 2019-09-16 Fujii Hironori [Cairo] Image::drawTiled → Cairo::drawSurface → cairo_paint_with_alpha → segfault happens in pixman https://bugs.webkit.org/show_bug.cgi?id=201755 Reviewed by Don Olmstead. Segmentation faults happened in pixman while painting a image. In Cairo::drawSurface, originalSrcRect can be slightly larger than the surface size because of floating number calculations. Cairo::drawSurface created a subsurface which is running over the parent surface boundaries. * platform/graphics/cairo/CairoOperations.cpp: (WebCore::Cairo::drawSurface): Calculated a intersection with expandedSrcRect and the parent surface size for subsurface size. 2019-09-11 Charlie Turner [GStreamer] Do not adopt floating references. https://bugs.webkit.org/show_bug.cgi?id=201685 Reviewed by Carlos Garcia Campos. Covered by existing tests. * platform/graphics/gstreamer/GStreamerCommon.cpp: (WebCore::initializeGStreamer): gst_element_factory_make returns floating references, you do not adopt such references, rather you sink them. 2019-09-04 Philippe Normand [GStreamer] Sound is down-pitched when playing video from YLE Areena https://bugs.webkit.org/show_bug.cgi?id=201399 Reviewed by Xabier Rodriguez-Calvar. If the FDK-AAC decoder is available, promote it and downrank the libav AAC decoders, due to their broken LC support, as reported in: https://ffmpeg.org/pipermail/ffmpeg-devel/2019-July/247063.html * platform/graphics/gstreamer/GStreamerCommon.cpp: (WebCore::initializeGStreamer): 2019-09-17 Carlos Garcia Campos [GTK] Cannot create EGL window surface: EGL_BAD_ALLOC https://bugs.webkit.org/show_bug.cgi?id=201505 Reviewed by Žan Doberšek. This happens because eglCreateWindowSurface() is called twice for the same window when not using the WPE renderer. New versions of Mesa fail the second time with a EGL_BAD_ALLOC. * platform/graphics/egl/GLContextEGL.cpp: (WebCore::GLContextEGL::createWindowContext): Check surface is nullptr before falling back to use eglCreateWindowSurface(). 2019-09-12 Adrian Perez de Castro [GTK][WPE] webkit_settings_set_user_agent() allows content forbidden in HTTP headers https://bugs.webkit.org/show_bug.cgi?id=201077 Reviewed by Carlos Garcia Campos. Add a function to validate whether a string contains a valid value which can be used in a HTTP User-Agent header. Covered by new WebCore API test HTTPParsers.ValidateUserAgentValues. * platform/glib/UserAgentGLib.cpp: (WebCore::standardUserAgent): Assert that the returned string is a valid User-Agent. (WebCore::standardUserAgentForURL): Ditto. * platform/network/HTTPParsers.cpp: Added a series of helper functions which skip over characters of a string, which can be used to scan over the different elements of an User-Agent value; all of them receive the position from the input string where to start scanning, updating it to the position right after the scanned item (this follow the convention already in use by other functions in the source file). Each of them has been annotated with the RFC number and section which contains the definition of the scanned item, and the corresponding BNF rules to make the code easier to follow. (WebCore::skipWhile): Added. (WebCore::isVisibleCharacter): Added. (WebCore::isOctectInFieldContentCharacter): Added. (WebCore::isCommentTextCharacter): Added. (WebCore::isHTTPTokenCharacter): Added. (WebCore::isValidHTTPToken): Refactored to use the new isHTTPTokenCharacter() helper function instead of having the test inside the loop. (WebCore::skipCharacter): Added. (WebCore::skipQuotedPair): Added. (WebCore::skipComment): Added. (WebCore::skipHTTPToken): Added. (WebCore::skipUserAgentProduct): Added. (WebCore::isValidUserAgentHeaderValue): Added. * platform/network/HTTPParsers.h: Add prototype for isValidUserAgentHeaderValue(). 2019-09-01 Said Abou-Hallawa HTMLImageElement::decode() should return a resolved promise for decoding non bitmap images https://bugs.webkit.org/show_bug.cgi?id=201243 Reviewed by Youenn Fablet. The specs: https://html.spec.whatwg.org/multipage/embedded-content.html#dom-img-decode states that, decode() should resolve the pending promise if the decoding was requested for a non bitmap image. Test: fast/images/decode-non-bitmap-image-resolve.html * loader/ImageLoader.cpp: (WebCore::resolveDecodePromises): (WebCore::rejectDecodePromises): (WebCore::ImageLoader::notifyFinished): (WebCore::ImageLoader::decode): (WebCore::ImageLoader::decodeError): Deleted. * loader/ImageLoader.h: (WebCore::ImageLoader::hasPendingDecodePromises const): 2019-08-31 Rob Buis XMLHttpRequest: responseXML returns null if the Content-Type is valid (end in +xml) in some cases https://bugs.webkit.org/show_bug.cgi?id=46146 Reviewed by Youenn Fablet. Make response MIME type fallback to text/xml in case mimeType could not be extracted [1] and use the stricter ParsedContentType for that. Behavior matches Firefox. Test: web-platform-tests/xhr/responsexml-media-type.htm [1] https://xhr.spec.whatwg.org/#response-mime-type * xml/XMLHttpRequest.cpp: (WebCore::XMLHttpRequest::responseMIMEType const): 2019-08-31 Frederic Wang Fix interpretation of fraction shifts https://bugs.webkit.org/show_bug.cgi?id=201242 Reviewed by Rob Buis. In fractions, numerator/denominator shifts are currently interpreted relative to the math axis while they should be relative to the baseline [1]. This patch refactors the RenderMathMLFraction to do that and aligns more on MathML Core [2] [3]. This fixes serious rendering bugs in fractions. [1] https://github.com/mathml-refresh/mathml/issues/123 [2] https://mathml-refresh.github.io/mathml-core/#fraction-with-nonzero-line-thickness [3] https://mathml-refresh.github.io/mathml-core/#fraction-with-zero-line-thickness No new tests, existing tests updated. * rendering/mathml/RenderMathMLFraction.h: ascentOverHorizontalAxis() is replaced with fractionAscent() which gives the actual baseline position rather than the math axis position. fractionParameters() and stackParameters() are modified so that they only return the shifts, now stored in a shared FractionParameters struct. * rendering/mathml/RenderMathMLFraction.cpp: (WebCore::RenderMathMLFraction::fractionParameters const): Store existing parameters in local variables and perform adjustments to the shift values so that the minimal gap constraints are satisfied. Return them as a FractionParameters. (WebCore::RenderMathMLFraction::stackParameters const): Ditto. (WebCore::RenderMathMLFraction::fractionAscent const): This calculates the ascent above the baseline as described in [2] [3] and replaces ascentOverHorizontalAxis. To minimize changeset, this continues to ignore contribution of denominator size and not to distinguish ink or non-ink metrics. (WebCore::RenderMathMLFraction::layoutBlock): The position of the denominator is now just calculated as a shift from the baseline. The height is given by the bottom of the denominator. The old "ascent + mathAxisHeight() + denominatorDescent" does not make any sense. (WebCore::RenderMathMLFraction::paint): Use fractionAscent() instead of ascentOverHorizontalAxis(). (WebCore::RenderMathMLFraction::firstLineBaseline const): Ditto. 2019-08-30 Simon Fraser Minor optimization in determineNonLayerDescendantsPaintedContent() https://bugs.webkit.org/show_bug.cgi?id=201352 Reviewed by Antti Koivisto. It's cheaper to call renderText.hasRenderedText() than renderText.linesBoundingBox(), because the latter has to traverse all the InlineTextBoxes. This code path is fairly hot when scrolling twitter feeds, since it's called from RenderLayer::updateLayerPositionsAfterScroll() which calls RenderLayer::isVisuallyNonEmpty(). * rendering/RenderLayer.cpp: (WebCore::RenderLayer::calculateClipRects const): 2019-08-30 Sihui Liu IndexedDB: update size of database when database operation is completed https://bugs.webkit.org/show_bug.cgi?id=201057 Reviewed by Youenn Fablet. Currently when a database operation was completed, we re-computed the disk usage of the origin. This computation listed all databases in the origin directory and read the size of each database file, which was very inefficient because the completed operation should only affect one database. This patch makes UniqueIDBDatabase keep track of database size and reports size change to QuotaUser. Tested PerformanceTests/IndexedDB/basic/objectstore-add.html on release build minibrowser. This change makes the test over 50% faster. * Modules/indexeddb/server/IDBBackingStore.h: * Modules/indexeddb/server/IDBServer.cpp: (WebCore::IDBServer::IDBServer::QuotaUser::increaseSpaceUsed): (WebCore::IDBServer::IDBServer::QuotaUser::decreaseSpaceUsed): (WebCore::IDBServer::IDBServer::computeSpaceUsedForOrigin): (WebCore::IDBServer::IDBServer::increaseSpaceUsed): (WebCore::IDBServer::IDBServer::decreaseSpaceUsed): (WebCore::IDBServer::IDBServer::setSpaceUsed): Deleted. * Modules/indexeddb/server/IDBServer.h: * Modules/indexeddb/server/MemoryIDBBackingStore.cpp: (WebCore::IDBServer::MemoryIDBBackingStore::databaseSize const): (WebCore::IDBServer::MemoryIDBBackingStore::close): (WebCore::IDBServer::MemoryIDBBackingStore::databasesSizeForOrigin const): Deleted. * Modules/indexeddb/server/MemoryIDBBackingStore.h: * Modules/indexeddb/server/SQLiteIDBBackingStore.cpp: (WebCore::IDBServer::SQLiteIDBBackingStore::databasesSizeForDirectory): (WebCore::IDBServer::SQLiteIDBBackingStore::databaseSize const): (WebCore::IDBServer::SQLiteIDBBackingStore::close): (WebCore::IDBServer::SQLiteIDBBackingStore::databasesSizeForFolder): Deleted. (WebCore::IDBServer::SQLiteIDBBackingStore::databasesSizeForOrigin const): Deleted. * Modules/indexeddb/server/SQLiteIDBBackingStore.h: * Modules/indexeddb/server/UniqueIDBDatabase.cpp: (WebCore::IDBServer::UniqueIDBDatabase::deleteBackingStore): (WebCore::IDBServer::UniqueIDBDatabase::shutdownForClose): (WebCore::IDBServer::UniqueIDBDatabase::didShutdownForClose): (WebCore::IDBServer::UniqueIDBDatabase::didDeleteBackingStore): (WebCore::IDBServer::UniqueIDBDatabase::openBackingStore): (WebCore::IDBServer::UniqueIDBDatabase::didOpenBackingStore): (WebCore::IDBServer::UniqueIDBDatabase::postDatabaseTaskReply): (WebCore::IDBServer::UniqueIDBDatabase::updateSpaceUsedIfNeeded): * Modules/indexeddb/server/UniqueIDBDatabase.h: 2019-08-30 Charlie Turner [GStreamer] Do not ref the player count from background threads. https://bugs.webkit.org/show_bug.cgi?id=201222 Reviewed by Xabier Rodriguez-Calvar. Test: imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-playback-retrieve-persistent-license.https.html In the sync-message handler, a ref() was being taken waiting for a CDM instance to be attached. This hits asserts since you are not allowed to ref() an object created on the main thread (BasePlayer) on a background thread. The protection condition was overly scoped, tidied up the locking and made it more granular. To avoid needing to hold a ref() in the background thread, use instead a semaphore to signal when a CDM instance is attached, or the player has been destroyed. Also remove an erroneous safe-guard, the operator= in isCDMInstanceAvailable will ref() the CDMInstance for us. This use of holding a reference to CDMInstance in the decryptors is not thread-safe, and now we have a problem since there's no clean way to communicate with CDMInstance from background threads without being thread unsafe. For ClearKey and Widevine, a thread safe ProxyCDM needs to be designed and passed to background threads (upcoming patch). * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp: (WebCore::MediaPlayerPrivateGStreamerBase::~MediaPlayerPrivateGStreamerBase): (WebCore::MediaPlayerPrivateGStreamerBase::handleSyncMessage): (WebCore::MediaPlayerPrivateGStreamerBase::cdmInstanceAttached): (WebCore::MediaPlayerPrivateGStreamerBase::cdmInstanceDetached): (WebCore::MediaPlayerPrivateGStreamerBase::handleProtectionEvent): * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h: * platform/graphics/gstreamer/eme/WebKitCommonEncryptionDecryptorGStreamer.cpp: (isCDMInstanceAvailable): 2019-08-30 Sihui Liu [wk2] LayoutTest imported/w3c/web-platform-tests/IndexedDB/fire-error-event-exception.html is a flaky failure https://bugs.webkit.org/show_bug.cgi?id=169621 Reviewed by Alex Christensen. Event handlers of IDB objects were called in unexpected order because of race, which made the console messages in the tests come out of order. Usually, an operation/request result is handled as follows: 1. IDBServer sends IDBResultData to IDBClient. 2. IDBClient receives IDBResultData and finishes a IDBTransaction operation with that result. 3. IDBTransaction schedules operation completed timer. 4. (Some time later) Timer fires, and IDBTransaction completes a request with the result and dispatches event. 5. (Some time later) IDBTransaction is notified that event is dispatched. If there are other results received, IDBTransaction schedules operation completed timer. In previous implementation, if the IDBClient received a second IDBResultData for the same IDBTransaction between step 3 and step 4, it would not schedule timer because timer was still active; if it received the result between step 4 and step 5, it would schedule timer again. Consider a flow like this: result1 of transaction1 received, timer of transaction1 scheduled result2 of transaction2 received, timer of transaction2 scheduled result3 of transaction1 is received, timer of transaction1 active so no scheduling timer of transaction1 fired, event1 to be dispatched to request1 timer of transaction2 fired, event2 to be dispatched to request2 result4 of transaction2 received, timer of transaction2 scheduled event1 dispatched, timer of transaction1 scheduled (for handling result3) event2 dispatched, timer of transaction2 active so no scheduling timer of transaction2 fired, event3 to dispatch to request4 timer of transaction1 fired, event4 to dispatch to request3 request4 would get event before request3, though result3 was received before result4. We should stop scheduling event if an IDBTransaction is in between step 4 and 5, which means its m_currentlyCompletingRequest is not null. * Modules/indexeddb/IDBTransaction.cpp: (WebCore::IDBTransaction::operationCompletedOnServer): 2019-08-29 Chris Dumez Add "IsolatedCopy" in the name of String getters that call isolatedCopy() on the string https://bugs.webkit.org/show_bug.cgi?id=201318 Reviewed by Alex Christensen. Add "IsolatedCopy" in the name of String getters that call isolatedCopy() on the string, for clarity. * Modules/indexeddb/server/IDBServer.cpp: (WebCore::IDBServer::IDBServer::createBackingStore): (WebCore::IDBServer::IDBServer::performGetAllDatabaseNames): (WebCore::IDBServer::IDBServer::removeDatabasesModifiedSinceForVersion): (WebCore::IDBServer::IDBServer::performCloseAndDeleteDatabasesModifiedSince): (WebCore::IDBServer::IDBServer::removeDatabasesWithOriginsForVersion): (WebCore::IDBServer::IDBServer::performCloseAndDeleteDatabasesForOrigins): (WebCore::IDBServer::IDBServer::computeSpaceUsedForOrigin): (WebCore::IDBServer::IDBServer::upgradeFilesIfNecessary): * Modules/indexeddb/server/IDBServer.h: (WebCore::IDBServer::IDBServer::databaseDirectoryPathIsolatedCopy const): * Modules/indexeddb/server/SQLiteIDBBackingStore.cpp: (WebCore::IDBServer::SQLiteIDBBackingStore::fullDatabaseDirectoryWithUpgrade): (WebCore::IDBServer::SQLiteIDBBackingStore::databasesSizeForOrigin const): (WebCore::IDBServer::SQLiteIDBBackingStore::deleteBackingStore): * Modules/indexeddb/server/SQLiteIDBBackingStore.h: (WebCore::IDBServer::SQLiteIDBBackingStore::databaseRootDirectoryIsolatedCopy const): * Modules/webdatabase/Database.cpp: (WebCore::Database::markAsDeletedAndClose): (WebCore::Database::stringIdentifierIsolatedCopy const): (WebCore::Database::displayNameIsolatedCopy const): (WebCore::Database::expectedVersionIsolatedCopy const): (WebCore::Database::fileNameIsolatedCopy const): (WebCore::Database::details const): (WebCore::Database::didCommitWriteTransaction): (WebCore::Database::didExceedQuota): * Modules/webdatabase/Database.h: * Modules/webdatabase/DatabaseTracker.cpp: (WebCore::DatabaseTracker::maximumSize): (WebCore::DatabaseTracker::doneCreatingDatabase): (WebCore::DatabaseTracker::addOpenDatabase): (WebCore::DatabaseTracker::removeOpenDatabase): * Modules/webdatabase/SQLError.h: (WebCore::SQLError::messageIsolatedCopy const): * Modules/webdatabase/SQLError.idl: * Modules/webdatabase/SQLTransaction.cpp: (WebCore::SQLTransaction::openTransactionAndPreflight): * workers/service/server/RegistrationDatabase.cpp: (WebCore::RegistrationDatabase::openSQLiteDatabase): (WebCore::RegistrationDatabase::clearAll): * workers/service/server/RegistrationDatabase.h: (WebCore::RegistrationDatabase::databaseDirectoryIsolatedCopy const): 2019-08-29 Timothy Hatcher Copying and pasting two paragraphs with a newline between them results in stray paragraph with newline inside. https://bugs.webkit.org/show_bug.cgi?id=201306 Reviewed by Wenson Hsieh. Test: editing/pasteboard/paste-without-nesting.html * editing/ReplaceSelectionCommand.cpp: (WebCore::ReplaceSelectionCommand::moveNodeOutOfAncestor): Consider the ancestor node safe to remove if there is no rendered text inside, not just if there are any child nodes. 2019-08-29 Youenn Fablet document.fonts.ready is resolved too quickly https://bugs.webkit.org/show_bug.cgi?id=174030 Reviewed by Frédéric Wang. As described in https://drafts.csswg.org/css-font-loading/#font-face-set-ready, the ready promise is only fulfilled after layout operations complete and no additional font loads are necessary. This patch implements this by notifying the FontFaceSet created for the document when the document is finished loading. At that time, the promise will be resolved as soon as fonts are finished loading if any. Test: imported/w3c/web-platform-tests/infrastructure/assumptions/document-fonts-ready.html * css/CSSFontSelector.cpp: (WebCore::CSSFontSelector::optionalFontFaceSet): * css/CSSFontSelector.h: * css/FontFaceSet.cpp: (WebCore::FontFaceSet::FontFaceSet): (WebCore::FontFaceSet::startedLoading): (WebCore::FontFaceSet::didFirstLayout): (WebCore::FontFaceSet::completedLoading): * css/FontFaceSet.h: * dom/Document.cpp: (WebCore::Document::implicitClose): 2019-08-29 Charlie Turner [GStreamer] Do not use makeWeakPtr from streaming thread. https://bugs.webkit.org/show_bug.cgi?id=201220 Reviewed by Xabier Rodriguez-Calvar. Test: imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-playback-retrieve-persistent-license.https.html Recently some asserts were added that you can't create WeakPtr's from streaming threads when the factory is created on the main-thread. The fix is to eagerly create the WeakPtr at player initialization time, rather than lazily when the streaming thread first asks for it. * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h: 2019-08-30 Adrian Perez de Castro Unreviewed build fix for ENABLE_UNIFIED_BUILDS=OFF. No new tests needed. * dom/StaticRange.h: Add missing inclusions of ExceptioOr.h and wtf/RefPtr.h. * inspector/agents/WebConsoleAgent.cpp: Add missing inclusion of InspectorWebAgentBase.h. * inspector/agents/WebConsoleAgent.h: Add forward declaration of the WebAgentContext struct. 2019-08-29 Carlos Garcia Campos WebSockets: first-party for cookies not set in handshake request when using platform APIs https://bugs.webkit.org/show_bug.cgi?id=200165 Reviewed by Youenn Fablet. * Modules/websockets/ThreadableWebSocketChannel.cpp: (WebCore::ThreadableWebSocketChannel::webSocketConnectRequest): 2019-08-28 Simon Fraser Make FillLayer::hasImage() inline https://bugs.webkit.org/show_bug.cgi?id=201265 Reviewed by Zalan Bujtas. FillLayer::hasImage() shows up on profiles because it's called from hot functions like isTransparent() and hasMask(), so make a basic inline version that doens't have to walk the list. * rendering/style/FillLayer.cpp: (WebCore::FillLayer::hasImageInAnyLayer const): (WebCore::FillLayer::hasImage const): Deleted. * rendering/style/FillLayer.h: (WebCore::FillLayer::hasImage const): 2019-08-28 Simon Fraser PaintFrequencyTracker triggers too many calls to MonotonicTime::now() on layer painting https://bugs.webkit.org/show_bug.cgi?id=201261 Reviewed by Zalan Bujtas. MonotonicTime::now() shows up as expensive when painting layer-heavy content, because PaintFrequencyTracker makes two calls per layer paint. Halve the number of calls by storing m_lastPaintTime at the start of the paint; doing so doesn't substantially change the behavior of the tracker. * rendering/PaintFrequencyTracker.h: (WebCore::PaintFrequencyTracker::begin): (WebCore::PaintFrequencyTracker::end): 2019-08-28 Ross Kirsling Unreviewed. Restabilize non-unified build. * inspector/agents/WebConsoleAgent.h: * loader/ResourceLoadObserver.h: 2019-08-28 Simon Fraser Devirtualize RenderBox::visualOverflowRect() https://bugs.webkit.org/show_bug.cgi?id=201231 Reviewed by Zalan Bujtas. The only override of RenderBox::visualOverflowRect() was in RenderView, for "paintsEntireContents" views, and as far as I can tell this is not necessary. visualOverflowRect() is hot when called from RenderLayer::localBoundingBox() -- this shows in profiles when scrolling large patch reviews, so making it non-virtual is a performance enhancement. RenderLayer::localBoundingBox() can also just call visualOverflowRect(), since that returns borderBoxRect() when there is no overflow. * rendering/RenderBox.h: (WebCore::RenderBox::visualOverflowRect const): * rendering/RenderLayer.cpp: (WebCore::performOverlapTests): Minor optimization to avoid a call to boundingBox(). (WebCore::RenderLayer::calculateClipRects const): * rendering/RenderView.cpp: (WebCore::RenderView::visualOverflowRect const): Deleted. * rendering/RenderView.h: 2019-08-28 Said Abou-Hallawa All image drawing functions should take an argument of type ImagePaintingOptions https://bugs.webkit.org/show_bug.cgi?id=201059 Reviewed by Simon Fraser. In this patch: -- All the image drawing function will take an argument of type ImagePaintingOptions instead of passing individual options. -- ImagePaintingOptions is made like a set of options. It can be initialized with any number of options and the order does not matter -- Image::originalSize() is deleted because it returns size() and none of the Image concrete classes overrides this implementation. * Headers.cmake: * WebCore.xcodeproj/project.pbxproj: * html/ImageBitmap.cpp: (WebCore::ImageBitmap::createPromise): (WebCore::ImageBitmap::createFromBuffer): * html/canvas/CanvasRenderingContext2DBase.cpp: (WebCore::CanvasRenderingContext2DBase::drawImage): (WebCore::drawImageToContext): (WebCore::CanvasRenderingContext2DBase::fullCanvasCompositedDrawImage): * platform/graphics/BitmapImage.cpp: (WebCore::BitmapImage::draw): (WebCore::BitmapImage::drawPattern): * platform/graphics/BitmapImage.h: * platform/graphics/CrossfadeGeneratedImage.cpp: (WebCore::drawCrossfadeSubimage): (WebCore::CrossfadeGeneratedImage::draw): (WebCore::CrossfadeGeneratedImage::drawPattern): * platform/graphics/CrossfadeGeneratedImage.h: * platform/graphics/CustomPaintImage.cpp: (WebCore::CustomPaintImage::draw): (WebCore::CustomPaintImage::drawPattern): * platform/graphics/CustomPaintImage.h: * platform/graphics/GeneratedImage.h: (WebCore::GeneratedImage::draw): (WebCore::GeneratedImage::drawPattern): * platform/graphics/GradientImage.cpp: (WebCore::GradientImage::draw): (WebCore::GradientImage::drawPattern): * platform/graphics/GradientImage.h: * platform/graphics/GraphicsContext.cpp: (WebCore::GraphicsContext::drawImage): (WebCore::GraphicsContext::drawTiledImage): (WebCore::GraphicsContext::drawImageBuffer): (WebCore::GraphicsContext::drawConsumingImageBuffer): * platform/graphics/GraphicsContext.h: (WebCore::GraphicsContext::drawNativeImage): (WebCore::GraphicsContext::drawImage): (WebCore::GraphicsContext::drawTiledImage): (WebCore::GraphicsContext::drawImageBuffer): (WebCore::GraphicsContext::drawPattern): (WebCore::GraphicsContext::drawConsumingImageBuffer): (WebCore::ImagePaintingOptions::ImagePaintingOptions): Deleted. (WebCore::ImagePaintingOptions::usesDefaultInterpolation const): Deleted. * platform/graphics/GraphicsContextImpl.cpp: (WebCore::GraphicsContextImpl::drawImageImpl): (WebCore::GraphicsContextImpl::drawTiledImageImpl): * platform/graphics/GraphicsContextImpl.h: * platform/graphics/Image.cpp: (WebCore::Image::drawPattern): (WebCore::Image::drawTiled): (WebCore::Image::computeIntrinsicDimensions): 2019-08-29 Simon Fraser Avoid running the outline painting phase if no renderers have outlines https://bugs.webkit.org/show_bug.cgi?id=201284 Reviewed by Said Abou-Hallawa. The outline painting phase (paintOutlineForFragments()) can take up to 20% of the painting time even when there are no outlines. Keep track of which renderers have outlines, and only run the phase when printing (for hasOutlineAnnotation()) or if there are any renderers with outlines. * rendering/RenderElement.cpp: (WebCore::RenderElement::styleWillChange): (WebCore::RenderElement::styleDidChange): (WebCore::RenderElement::willBeDestroyed): * rendering/RenderLayer.cpp: (WebCore::RenderLayer::paintLayerContents): * rendering/RenderView.h: * platform/graphics/Image.h: (WebCore::Image::drawPattern): (WebCore::Image::draw): (WebCore::Image::drawTiled): (WebCore::Image::originalSize const): Deleted. * platform/graphics/ImageBuffer.h: (WebCore::ImageBuffer::draw): (WebCore::ImageBuffer::drawPattern): (WebCore::ImageBuffer::drawConsuming): * platform/graphics/ImagePaintingOptions.h: Added. (WebCore::ImagePaintingOptions::ImagePaintingOptions): (WebCore::ImagePaintingOptions::compositeOperator const): (WebCore::ImagePaintingOptions::blendMode const): (WebCore::ImagePaintingOptions::decodingMode const): (WebCore::ImagePaintingOptions::orientation const): (WebCore::ImagePaintingOptions::interpolationQuality const): (WebCore::ImagePaintingOptions::setOption): * platform/graphics/NamedImageGeneratedImage.cpp: (WebCore::NamedImageGeneratedImage::draw): (WebCore::NamedImageGeneratedImage::drawPattern): * platform/graphics/NamedImageGeneratedImage.h: * platform/graphics/NativeImage.h: * platform/graphics/cairo/CairoOperations.cpp: (WebCore::Cairo::drawShadowLayerBuffer): (WebCore::Cairo::drawShadowImage): (WebCore::Cairo::drawNativeImage): (WebCore::Cairo::drawPattern): * platform/graphics/cairo/CairoOperations.h: * platform/graphics/cairo/GraphicsContextCairo.cpp: (WebCore::GraphicsContext::drawNativeImage): (WebCore::GraphicsContext::drawPattern): * platform/graphics/cairo/GraphicsContextImplCairo.cpp: (WebCore::GraphicsContextImplCairo::drawNativeImage): (WebCore::GraphicsContextImplCairo::drawPattern): * platform/graphics/cairo/GraphicsContextImplCairo.h: * platform/graphics/cairo/ImageBufferCairo.cpp: (WebCore::ImageBuffer::drawConsuming): (WebCore::ImageBuffer::draw): (WebCore::ImageBuffer::drawPattern): * platform/graphics/cairo/NativeImageCairo.cpp: (WebCore::drawNativeImage): * platform/graphics/cg/GraphicsContext3DCG.cpp: (WebCore::GraphicsContext3D::paintToCanvas): * platform/graphics/cg/GraphicsContextCG.cpp: (WebCore::GraphicsContext::drawNativeImage): (WebCore::GraphicsContext::drawPattern): * platform/graphics/cg/ImageBufferCG.cpp: (WebCore::ImageBuffer::drawConsuming): (WebCore::ImageBuffer::draw): (WebCore::ImageBuffer::drawPattern): * platform/graphics/cg/NativeImageCG.cpp: (WebCore::drawNativeImage): * platform/graphics/cg/PDFDocumentImage.cpp: (WebCore::PDFDocumentImage::draw): * platform/graphics/cg/PDFDocumentImage.h: * platform/graphics/displaylists/DisplayListItems.cpp: (WebCore::DisplayList::DrawNativeImage::DrawNativeImage): (WebCore::DisplayList::DrawNativeImage::apply const): (WebCore::DisplayList::DrawPattern::DrawPattern): (WebCore::DisplayList::DrawPattern::apply const): * platform/graphics/displaylists/DisplayListItems.h: (WebCore::DisplayList::DrawNativeImage::create): (WebCore::DisplayList::DrawPattern::create): (WebCore::DisplayList::DrawPattern::DrawPattern): * platform/graphics/displaylists/DisplayListRecorder.cpp: (WebCore::DisplayList::Recorder::drawNativeImage): (WebCore::DisplayList::Recorder::drawPattern): * platform/graphics/displaylists/DisplayListRecorder.h: * platform/graphics/filters/FEBlend.cpp: (WebCore::FEBlend::platformApplySoftware): * platform/graphics/filters/FEComposite.cpp: (WebCore::FEComposite::platformApplySoftware): * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp: (WebCore::MediaPlayerPrivateGStreamerBase::paint): * platform/graphics/nicosia/cairo/NicosiaCairoOperationRecorder.cpp: (Nicosia::CairoOperationRecorder::drawNativeImage): (Nicosia::CairoOperationRecorder::drawPattern): * platform/graphics/nicosia/cairo/NicosiaCairoOperationRecorder.h: * platform/graphics/win/Direct2DOperations.cpp: (WebCore::Direct2D::drawNativeImage): (WebCore::Direct2D::drawPattern): * platform/graphics/win/Direct2DOperations.h: * platform/graphics/win/GraphicsContextImplDirect2D.h: * platform/graphics/win/ImageCGWin.cpp: (WebCore::BitmapImage::getHBITMAPOfSize): (WebCore::BitmapImage::drawFrameMatchingSourceSize): * platform/graphics/win/ImageCairoWin.cpp: (WebCore::BitmapImage::getHBITMAPOfSize): (WebCore::BitmapImage::drawFrameMatchingSourceSize): * platform/graphics/win/NativeImageDirect2D.cpp: (WebCore::drawNativeImage): * platform/ios/DragImageIOS.mm: (WebCore::createDragImageFromImage): * rendering/RenderBoxModelObject.cpp: (WebCore::RenderBoxModelObject::paintFillLayerExtended): * rendering/RenderEmbeddedObject.cpp: (WebCore::RenderEmbeddedObject::paintSnapshotImage): * rendering/RenderImage.cpp: (WebCore::RenderImage::paintReplaced): (WebCore::RenderImage::paintIntoRect): * rendering/RenderSnapshottedPlugIn.cpp: (WebCore::RenderSnapshottedPlugIn::paintSnapshot): * rendering/RenderThemeMac.mm: (WebCore::RenderThemeMac::paintSnapshottedPluginOverlay): * svg/graphics/SVGImage.cpp: (WebCore::SVGImage::drawForContainer): (WebCore::SVGImage::nativeImageForCurrentFrame): (WebCore::SVGImage::nativeImage): (WebCore::SVGImage::drawPatternForContainer): (WebCore::SVGImage::draw): * svg/graphics/SVGImage.h: * svg/graphics/SVGImageForContainer.cpp: (WebCore::SVGImageForContainer::draw): (WebCore::SVGImageForContainer::drawPattern): * svg/graphics/SVGImageForContainer.h: 2019-08-28 Said Abou-Hallawa XLinkNames namespace is required before the 'href' attribute of SVG animate elements https://bugs.webkit.org/show_bug.cgi?id=201227 Reviewed by Ryosuke Niwa. To get the animation target element, get the value of the "href" attribute or the "xlink:href" attribute. Tests: svg/custom/href-svg-namespace-animate-target.svg * svg/animation/SVGSMILElement.cpp: (WebCore::SVGSMILElement::buildPendingResource): 2019-08-28 Chris Dumez geolocation.watchPosition() / getCurrentPosition() should return PERMISSION_DENIED when context is not secure https://bugs.webkit.org/show_bug.cgi?id=201221 Reviewed by Ryosuke Niwa. geolocation.watchPosition() / getCurrentPosition() should return PERMISSION_DENIED when context is not secure, not POSITION_UNAVAILABLE. Both Gecko and Blink agree on PERMISSION_DENIED. No new tests, updated existing tests. * Modules/geolocation/Geolocation.cpp: (WebCore::Geolocation::startRequest): 2019-08-28 Simon Fraser Have RenderSVGBlock compute visual overflow just like everyone else https://bugs.webkit.org/show_bug.cgi?id=201211 Reviewed by Zalan Bujtas. RenderSVGBlock overrode visualOverflowRect() just to account for text shadow. This prevents callers optimizing calls to visualOverflowRect(), so instead have RenderSVGBlock implement computeOverflow() and call addVisualOverflow(). * rendering/svg/RenderSVGBlock.cpp: (WebCore::RenderSVGBlock::computeOverflow): (WebCore::RenderSVGBlock::visualOverflowRect const): Deleted. * rendering/svg/RenderSVGBlock.h: 2019-08-28 Ryosuke Niwa REGRESSION (r248807): Objects stored in ElementRareData are leaked https://bugs.webkit.org/show_bug.cgi?id=200954 Reviewed by Antti Koivisto. Use a custom deleter in std::unique_ptr to call the correct destructor instead of making NodeRareData's destructor virtual. Added NodeRareData::isElementRareData to differentiate ElementRareData and NodeRareData by borrowing 1 bit from the frame count. No new tests since there should be no behavioral change. * dom/ElementRareData.h: (WebCore::ElementRareData::ElementRareData): * dom/Node.cpp: (WebCore::Node::materializeRareData): Call the constructors of unique_ptr directly since make_unique does not take a custom deleter. We can't add the support to makeUnique either without making it three arguments since we need to cast ElementRareData to NodeRareData in addition to specifying a custom deleter (normal casting wouldn't work due to the presence of a custom deleter). (WebCore::Node::NodeRareDataDeleter::operator() const): Added. * dom/Node.h: (WebCore::Node::NodeRareDataDeleter): Added. * dom/NodeRareData.cpp: * dom/NodeRareData.h: (WebCore::NodeRareData::NodeRareData): Makes newly added Type. (WebCore::NodeRareData::isElementRareData): Added. (WebCore::NodeRareData::~NodeRareData): Deleted. 2019-08-28 Claudio Saavedra [SOUP] Shut compilation warning Unreviewed. RELEASE_LOG_ERROR() needs a channel. * platform/network/soup/SoupNetworkSession.cpp: (WebCore::SoupNetworkSession::setupHSTSEnforcer): 2019-08-28 Claudio Saavedra [SOUP] Fix the debug build after r249192 Unreviewed build fix. * platform/network/soup/SoupNetworkSession.cpp: (WebCore::SoupNetworkSession::setupHSTSEnforcer): 2019-08-28 Carlos Garcia Campos Unable to enter text in https://eat.fi https://bugs.webkit.org/show_bug.cgi?id=193046 Reviewed by Ryosuke Niwa. This is because the button element inside the label is receiving the click event, which causes the form to be submitted. According to the spec we should do nothing in this case, because button element is considered to be interactive content. "The activation behavior of a label element for events targeted at interactive content descendants of a label element, and any descendants of those interactive content descendants, must be to do nothing." https://html.spec.whatwg.org/#the-label-element This patch adds HTMLElement::isInteractiveContent() according to the HTML spec: "Interactive content is content that is specifically intended for user interaction. a (if the href attribute is present), audio (if the controls attribute is present), button, details, embed, iframe, img (if the usemap attribute is present), input (if the type attribute is not in the Hidden state), label, object (if the usemap attribute is present), select, textarea, video (if the controls attribute is present)" https://html.spec.whatwg.org/#interactive-content-2 That's used in HTMLLabelElement::defaultEventHandler() using the helper method isEventTargetedAtInteractiveDescendants() to decide whether to simulate a click event or do nothing. * html/HTMLAnchorElement.cpp: (WebCore::HTMLAnchorElement::isInteractiveContent const): * html/HTMLAnchorElement.h: * html/HTMLButtonElement.h: * html/HTMLDetailsElement.h: * html/HTMLElement.h: (WebCore::HTMLElement::isInteractiveContent const): * html/HTMLEmbedElement.h: * html/HTMLIFrameElement.h: * html/HTMLImageElement.cpp: (WebCore::HTMLImageElement::isInteractiveContent const): * html/HTMLImageElement.h: * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::isInteractiveContent const): * html/HTMLInputElement.h: * html/HTMLLabelElement.cpp: (WebCore::HTMLLabelElement::isEventTargetedAtInteractiveDescendants const): (WebCore::HTMLLabelElement::defaultEventHandler): * html/HTMLLabelElement.h: * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::isInteractiveContent const): * html/HTMLMediaElement.h: * html/HTMLObjectElement.cpp: (WebCore::HTMLObjectElement::isInteractiveContent const): * html/HTMLObjectElement.h: * html/HTMLSelectElement.h: * html/HTMLTextAreaElement.h: * html/HiddenInputType.h: * html/InputType.cpp: (WebCore::InputType::isInteractiveContent const): * html/InputType.h: 2019-08-28 Claudio Saavedra [GTK][WPE] Implement HSTS for the soup network backend https://bugs.webkit.org/show_bug.cgi?id=192074 Reviewed by Carlos Garcia Campos. libsoup 2.67.1 introduced HSTS support via a SoupSessionFeature. Add support to the soup network backend by adding the feature to SoupNetworkSession and handling HSTS protocol upgrades, by propagating the scheme change further to clients. This patch adds the HSTS feature unconditionally, but it still possible to add a boolean property to the web context class if desired. Additionally, add API to the WebKitWebsiteDataManager to specify the directory where the HSTS database is saved. If the directory is not set or if the data manager is ephemeral, use a non-persistent, memory only HSTS enforcer. Implement as well the methods needed to clean-up and delete HSTS policies from the storage and expose the feature in GTK+ MiniBrowser's about:data. * platform/network/soup/GUniquePtrSoup.h: * platform/network/soup/SoupNetworkSession.cpp: (WebCore::hstsStorageDirectory): (WebCore::SoupNetworkSession::SoupNetworkSession): (WebCore::SoupNetworkSession::setHSTSPersistentStorage): (WebCore::SoupNetworkSession::setupHSTSEnforcer): (WebCore::SoupNetworkSession::getHostNamesWithHSTSCache): (WebCore::SoupNetworkSession::deleteHSTSCacheForHostNames): (WebCore::SoupNetworkSession::clearHSTSCache): * platform/network/soup/SoupNetworkSession.h: 2019-08-28 Said Abou-Hallawa SVG2: Add length, item getter and item setter to all SVG lists https://bugs.webkit.org/show_bug.cgi?id=199526 Reviewed by Simon Fraser. -- Implement the SVG2 specs for SVG lists: https://svgwg.org/svg2-draft/types.html#TermListInterface. -- Match the arguments' names in the IDL files with the specs. Tests: svg/dom/SVGLengthList-length-indexed-access.xhtml svg/dom/SVGPathSegList-length-indexed-access.xhtml * svg/SVGLengthList.idl: * svg/SVGNumberList.idl: * svg/SVGPathSegList.h: * svg/SVGPathSegList.idl: * svg/SVGPointList.idl: * svg/SVGStringList.idl: * svg/SVGTransformList.idl: * svg/properties/SVGList.h: (WebCore::SVGList::length const): (WebCore::SVGList::setItem): 2019-08-27 John Wilander and Fujii Hironori Make FrameLoader::open() set outgoing referrer properly https://bugs.webkit.org/show_bug.cgi?id=167050 Reviewed by Youenn Fablet. In debug builds, an assertion failed in WebCore::SecurityPolicy::generateReferrerHeader: ASSERTION FAILED: referrer == URL(URL(), referrer).strippedForUseAsReferrer() In release builds, cached pages with a URL fragment sent its URL fragment in the referrer. m_outgoingReferrer mistakenly had a URL fragment. Test: http/tests/navigation/page-cache-fragment-referrer.html * loader/FrameLoader.cpp: (WebCore::FrameLoader::open): Set m_outgoingReferrer by using FrameLoader::setOutgoingReferrer to remove URL fragments. 2019-08-27 Said Abou-Hallawa Unreviewed. Build fix after r249175. Fix the condition which generates the declaration of vm in GenerateGetOwnPropertySlotByIndex. * bindings/scripts/CodeGeneratorJS.pm: (GenerateGetOwnPropertySlotByIndex): 2019-08-27 Justin Fan [WebGPU] Implement GPUErrors for and relax GPUBuffer validation rules https://bugs.webkit.org/show_bug.cgi?id=200852 Reviewed by Dean Jackson. Fix incorrect usage validation during GPUBuffer creation. Implement GPUError reporting for GPUBuffer creation and methods. Test: webgpu/buffer-errors.html * Modules/webgpu/WebGPUBuffer.cpp: (WebCore::WebGPUBuffer::create): (WebCore::WebGPUBuffer::WebGPUBuffer): (WebCore::WebGPUBuffer::unmap): (WebCore::WebGPUBuffer::destroy): (WebCore::WebGPUBuffer::rejectOrRegisterPromiseCallback): * Modules/webgpu/WebGPUBuffer.h: Now inherits from GPUObjectBase. * Modules/webgpu/WebGPUDevice.cpp: (WebCore::WebGPUDevice::createBuffer const): (WebCore::WebGPUDevice::createBufferMapped const): * platform/graphics/gpu/GPUBuffer.h: No longer inherits from GPUObjectBase. * platform/graphics/gpu/GPUObjectBase.h: (WebCore::GPUObjectBase::errorScopes): (WebCore::GPUObjectBase::generateError): Deleted. * platform/graphics/gpu/cocoa/GPUBufferMetal.mm: (WebCore::GPUBuffer::validateBufferUsage): (WebCore::GPUBuffer::tryCreate): Alignment issue should be general WebGPU requirement. (WebCore::GPUBuffer::GPUBuffer): (WebCore::GPUBuffer::~GPUBuffer): Must do cleanup without generating errors. (WebCore::GPUBuffer::registerMappingCallback): (WebCore::GPUBuffer::copyStagingBufferToGPU): (WebCore::GPUBuffer::unmap): (WebCore::GPUBuffer::destroy): 2019-08-27 Zalan Bujtas [LFC][TFC] Layout and position the cell boxes https://bugs.webkit.org/show_bug.cgi?id=201192 Reviewed by Antti Koivisto. Add a very basic (and faily incomplete) table cell layout logic. This is mostly WIP. * Sources.txt: * WebCore.xcodeproj/project.pbxproj: * layout/FormattingContext.h: * layout/FormattingContextGeometry.cpp: (WebCore::Layout::FormattingContext::Geometry::contentHeightForFormattingContextRoot): (WebCore::Layout::contentHeightForFormattingContextRoot): Deleted. * layout/tableformatting/TableFormattingContext.cpp: (WebCore::Layout::TableFormattingContext::layout const): (WebCore::Layout::TableFormattingContext::computedTableWidth const): * layout/tableformatting/TableFormattingContext.h: * layout/tableformatting/TableFormattingContextGeometry.cpp: Copied from Source/WebCore/layout/tableformatting/TableFormattingContext.h. (WebCore::Layout::TableFormattingContext::Geometry::tableCellHeightAndMargin): * layout/tableformatting/TableGrid.cpp: (WebCore::Layout::TableGrid::Column::setLogicalLeft): (WebCore::Layout::TableGrid::Column::logicalLeft const): * layout/tableformatting/TableGrid.h: (WebCore::Layout::TableGrid::Column::logicalRight const): (WebCore::Layout::TableGrid::Row::setLogicalTop): (WebCore::Layout::TableGrid::Row::logicalTop const): (WebCore::Layout::TableGrid::Row::setLogicalHeight): (WebCore::Layout::TableGrid::Row::logicalHeight const): (WebCore::Layout::TableGrid::Row::logicalBottom const): 2019-08-27 Mark Lam Refactor to use VM& instead of VM* at as many places as possible. https://bugs.webkit.org/show_bug.cgi?id=201172 Reviewed by Yusuke Suzuki. No new tests. Covered by existing tests. * Modules/encryptedmedia/legacy/LegacyCDMSessionClearKey.cpp: (WebCore::CDMSessionClearKey::update): * Modules/plugins/QuickTimePluginReplacement.mm: (WebCore::QuickTimePluginReplacement::ensureReplacementScriptInjected): (WebCore::QuickTimePluginReplacement::installReplacement): * animation/KeyframeEffect.cpp: (WebCore::processKeyframeLikeObject): * bindings/js/GCController.cpp: (WebCore::GCController::dumpHeap): * bindings/js/IDBBindingUtilities.cpp: (WebCore::get): (WebCore::set): * bindings/js/JSCSSRuleListCustom.cpp: (WebCore::JSCSSRuleListOwner::isReachableFromOpaqueRoots): * bindings/js/JSCustomElementRegistryCustom.cpp: (WebCore::JSCustomElementRegistry::define): * bindings/js/JSCustomXPathNSResolver.cpp: (WebCore::JSCustomXPathNSResolver::lookupNamespaceURI): * bindings/js/JSDOMConvertRecord.h: * bindings/js/JSDOMConvertStrings.h: (WebCore::JSConverter::convert): (WebCore::JSConverter::convert): (WebCore::JSConverter::convert): * bindings/js/JSDOMWindowCustom.cpp: (WebCore::JSDOMWindow::getOwnPropertySlotByIndex): (WebCore::addScopedChildrenIndexes): (WebCore::JSDOMWindow::defineOwnProperty): (WebCore::DialogHandler::dialogCreated): (WebCore::DialogHandler::returnValue const): (WebCore::JSDOMWindow::setOpener): (WebCore::JSDOMWindow::setOpenDatabase): * bindings/js/JSDOMWindowProperties.cpp: (WebCore::JSDOMWindowProperties::getOwnPropertySlotByIndex): * bindings/js/JSDeprecatedCSSOMValueCustom.cpp: (WebCore::JSDeprecatedCSSOMValueOwner::isReachableFromOpaqueRoots): * bindings/js/JSEventListener.cpp: (WebCore::JSEventListener::handleEvent): * bindings/js/JSImageDataCustom.cpp: (WebCore::toJSNewlyCreated): * bindings/js/JSLazyEventListener.cpp: (WebCore::JSLazyEventListener::initializeJSFunction const): * bindings/js/JSLocationCustom.cpp: (WebCore::JSLocation::getOwnPropertySlotByIndex): (WebCore::JSLocation::putByIndex): * bindings/js/JSNodeListCustom.cpp: (WebCore::JSNodeListOwner::isReachableFromOpaqueRoots): * bindings/js/JSPluginElementFunctions.cpp: (WebCore::pluginElementCustomGetCallData): * bindings/js/JSRemoteDOMWindowCustom.cpp: (WebCore::JSRemoteDOMWindow::getOwnPropertySlotByIndex): * bindings/js/ReadableStreamDefaultController.cpp: (WebCore::ReadableStreamDefaultController::invoke): * bindings/js/ScriptController.cpp: (WebCore::ScriptController::linkAndEvaluateModuleScriptInWorld): * bindings/js/ScriptModuleLoader.cpp: (WebCore::ScriptModuleLoader::resolve): (WebCore::ScriptModuleLoader::importModule): (WebCore::ScriptModuleLoader::createImportMetaProperties): * bindings/js/SerializedScriptValue.cpp: (WebCore::CloneSerializer::CloneSerializer): (WebCore::CloneSerializer::write): (WebCore::CloneSerializer::serialize): (WebCore::CloneDeserializer::CachedString::jsString): (WebCore::CloneDeserializer::readTerminal): (WebCore::CloneDeserializer::deserialize): * bindings/js/WebCoreBuiltinNames.h: (WebCore::WebCoreBuiltinNames::WebCoreBuiltinNames): * bindings/js/WebCoreJSClientData.cpp: (WebCore::JSVMClientData::JSVMClientData): * bindings/js/WindowProxy.cpp: (WebCore::WindowProxy::clearJSWindowProxiesNotMatchingDOMWindow): * bindings/scripts/CodeGeneratorJS.pm: (GenerateGetOwnPropertySlotByIndex): (GenerateGetOwnPropertyNames): (GeneratePutByIndex): (GenerateDeletePropertyByIndex): (GenerateDictionaryImplementationContent): (addUnscopableProperties): (GenerateImplementation): (GenerateAttributeSetterBodyDefinition): (GenerateOperationDefinition): (GenerateSerializerDefinition): (GenerateCallbackImplementationContent): (GenerateConstructorHelperMethods): * bindings/scripts/test/JS/JSInterfaceName.cpp: (WebCore::JSInterfaceNameConstructor::initializeProperties): * bindings/scripts/test/JS/JSMapLike.cpp: (WebCore::JSMapLikeConstructor::initializeProperties): * bindings/scripts/test/JS/JSReadOnlyMapLike.cpp: (WebCore::JSReadOnlyMapLikeConstructor::initializeProperties): * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp: (WebCore::JSTestActiveDOMObjectConstructor::initializeProperties): * bindings/scripts/test/JS/JSTestCEReactions.cpp: (WebCore::JSTestCEReactionsConstructor::initializeProperties): (WebCore::setJSTestCEReactionsAttributeWithCEReactionsSetter): (WebCore::setJSTestCEReactionsReflectAttributeWithCEReactionsSetter): (WebCore::setJSTestCEReactionsStringifierAttributeSetter): (WebCore::setJSTestCEReactionsAttributeWithCEReactionsNotNeededSetter): (WebCore::setJSTestCEReactionsReflectAttributeWithCEReactionsNotNeededSetter): (WebCore::setJSTestCEReactionsStringifierAttributeNotNeededSetter): * bindings/scripts/test/JS/JSTestCEReactionsStringifier.cpp: (WebCore::JSTestCEReactionsStringifierConstructor::initializeProperties): (WebCore::setJSTestCEReactionsStringifierValueSetter): (WebCore::setJSTestCEReactionsStringifierValueWithoutReactionsSetter): * bindings/scripts/test/JS/JSTestCallTracer.cpp: (WebCore::JSTestCallTracerConstructor::initializeProperties): (WebCore::setJSTestCallTracerTestAttributeInterfaceSetter): (WebCore::setJSTestCallTracerTestAttributeSpecifiedSetter): (WebCore::setJSTestCallTracerTestAttributeWithVariantSetter): * bindings/scripts/test/JS/JSTestCallbackInterface.cpp: (WebCore::convertDictionary): (WebCore::JSTestCallbackInterfaceConstructor::initializeProperties): (WebCore::JSTestCallbackInterface::callbackWithNoParam): (WebCore::JSTestCallbackInterface::callbackWithArrayParam): (WebCore::JSTestCallbackInterface::callbackWithSerializedScriptValueParam): (WebCore::JSTestCallbackInterface::callbackWithStringList): (WebCore::JSTestCallbackInterface::callbackWithBoolean): (WebCore::JSTestCallbackInterface::callbackRequiresThisToPass): (WebCore::JSTestCallbackInterface::callbackWithAReturnValue): (WebCore::JSTestCallbackInterface::callbackThatRethrowsExceptions): (WebCore::JSTestCallbackInterface::callbackThatSkipsInvokeCheck): (WebCore::JSTestCallbackInterface::callbackWithThisObject): * bindings/scripts/test/JS/JSTestClassWithJSBuiltinConstructor.cpp: (WebCore::JSTestClassWithJSBuiltinConstructorConstructor::initializeProperties): * bindings/scripts/test/JS/JSTestDOMJIT.cpp: (WebCore::JSTestDOMJITConstructor::initializeProperties): (WebCore::jsTestDOMJITPrototypeFunctionGetAttributeWithoutTypeCheck): (WebCore::jsTestDOMJITPrototypeFunctionItemWithoutTypeCheck): (WebCore::jsTestDOMJITPrototypeFunctionHasAttributeWithoutTypeCheck): (WebCore::jsTestDOMJITPrototypeFunctionGetElementByIdWithoutTypeCheck): (WebCore::jsTestDOMJITPrototypeFunctionGetElementsByNameWithoutTypeCheck): * bindings/scripts/test/JS/JSTestEnabledBySetting.cpp: (WebCore::JSTestEnabledBySettingConstructor::initializeProperties): (WebCore::JSTestEnabledBySettingPrototype::finishCreation): (WebCore::setJSTestEnabledBySettingTestSubObjEnabledBySettingConstructorSetter): (WebCore::setJSTestEnabledBySettingEnabledBySettingAttributeSetter): * bindings/scripts/test/JS/JSTestEnabledForContext.cpp: (WebCore::JSTestEnabledForContextConstructor::initializeProperties): (WebCore::setJSTestEnabledForContextTestSubObjEnabledForContextConstructorSetter): * bindings/scripts/test/JS/JSTestEventConstructor.cpp: (WebCore::convertDictionary): (WebCore::JSTestEventConstructorConstructor::initializeProperties): * bindings/scripts/test/JS/JSTestEventTarget.cpp: (WebCore::JSTestEventTargetConstructor::initializeProperties): (WebCore::JSTestEventTarget::getOwnPropertySlotByIndex): (WebCore::JSTestEventTarget::getOwnPropertyNames): * bindings/scripts/test/JS/JSTestException.cpp: (WebCore::JSTestExceptionConstructor::initializeProperties): * bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp: (WebCore::JSTestGenerateIsReachableConstructor::initializeProperties): (WebCore::JSTestGenerateIsReachablePrototype::finishCreation): * bindings/scripts/test/JS/JSTestGlobalObject.cpp: (WebCore::JSTestGlobalObjectConstructor::initializeProperties): (WebCore::setJSTestGlobalObjectRegularAttributeSetter): (WebCore::setJSTestGlobalObjectPublicAndPrivateAttributeSetter): (WebCore::setJSTestGlobalObjectPublicAndPrivateConditionalAttributeSetter): (WebCore::setJSTestGlobalObjectEnabledAtRuntimeAttributeSetter): (WebCore::setJSTestGlobalObjectTestCEReactionsConstructorSetter): (WebCore::setJSTestGlobalObjectTestCEReactionsStringifierConstructorSetter): (WebCore::setJSTestGlobalObjectTestCallTracerConstructorSetter): (WebCore::setJSTestGlobalObjectTestCallbackInterfaceConstructorSetter): (WebCore::setJSTestGlobalObjectTestClassWithJSBuiltinConstructorConstructorSetter): (WebCore::setJSTestGlobalObjectTestDOMJITConstructorSetter): (WebCore::setJSTestGlobalObjectTestDomainSecurityConstructorSetter): (WebCore::setJSTestGlobalObjectTestEnabledBySettingConstructorSetter): (WebCore::setJSTestGlobalObjectTestEnabledForContextConstructorSetter): (WebCore::setJSTestGlobalObjectTestEventConstructorConstructorSetter): (WebCore::setJSTestGlobalObjectTestEventTargetConstructorSetter): (WebCore::setJSTestGlobalObjectTestExceptionConstructorSetter): (WebCore::setJSTestGlobalObjectTestGenerateIsReachableConstructorSetter): (WebCore::setJSTestGlobalObjectTestGlobalObjectConstructorSetter): (WebCore::setJSTestGlobalObjectTestIndexedSetterNoIdentifierConstructorSetter): (WebCore::setJSTestGlobalObjectTestIndexedSetterThrowingExceptionConstructorSetter): (WebCore::setJSTestGlobalObjectTestIndexedSetterWithIdentifierConstructorSetter): (WebCore::setJSTestGlobalObjectTestInterfaceConstructorSetter): (WebCore::setJSTestGlobalObjectTestInterfaceLeadingUnderscoreConstructorSetter): (WebCore::setJSTestGlobalObjectTestIterableConstructorSetter): (WebCore::setJSTestGlobalObjectTestJSBuiltinConstructorConstructorSetter): (WebCore::setJSTestGlobalObjectTestMapLikeConstructorSetter): (WebCore::setJSTestGlobalObjectTestMediaQueryListListenerConstructorSetter): (WebCore::setJSTestGlobalObjectTestNamedAndIndexedSetterNoIdentifierConstructorSetter): (WebCore::setJSTestGlobalObjectTestNamedAndIndexedSetterThrowingExceptionConstructorSetter): (WebCore::setJSTestGlobalObjectTestNamedAndIndexedSetterWithIdentifierConstructorSetter): (WebCore::setJSTestGlobalObjectTestNamedConstructorConstructorSetter): (WebCore::setJSTestGlobalObjectAudioConstructorSetter): (WebCore::setJSTestGlobalObjectTestNamedDeleterNoIdentifierConstructorSetter): (WebCore::setJSTestGlobalObjectTestNamedDeleterThrowingExceptionConstructorSetter): (WebCore::setJSTestGlobalObjectTestNamedDeleterWithIdentifierConstructorSetter): (WebCore::setJSTestGlobalObjectTestNamedDeleterWithIndexedGetterConstructorSetter): (WebCore::setJSTestGlobalObjectTestNamedGetterCallWithConstructorSetter): (WebCore::setJSTestGlobalObjectTestNamedGetterNoIdentifierConstructorSetter): (WebCore::setJSTestGlobalObjectTestNamedGetterWithIdentifierConstructorSetter): (WebCore::setJSTestGlobalObjectTestNamedSetterNoIdentifierConstructorSetter): (WebCore::setJSTestGlobalObjectTestNamedSetterThrowingExceptionConstructorSetter): (WebCore::setJSTestGlobalObjectTestNamedSetterWithIdentifierConstructorSetter): (WebCore::setJSTestGlobalObjectTestNamedSetterWithIndexedGetterConstructorSetter): (WebCore::setJSTestGlobalObjectTestNamedSetterWithIndexedGetterAndSetterConstructorSetter): (WebCore::setJSTestGlobalObjectTestNamedSetterWithOverrideBuiltinsConstructorSetter): (WebCore::setJSTestGlobalObjectTestNamedSetterWithUnforgablePropertiesConstructorSetter): (WebCore::setJSTestGlobalObjectTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltinsConstructorSetter): (WebCore::setJSTestGlobalObjectTestOverloadedConstructorsConstructorSetter): (WebCore::setJSTestGlobalObjectTestOverloadedConstructorsWithSequenceConstructorSetter): (WebCore::setJSTestGlobalObjectTestOverrideBuiltinsConstructorSetter): (WebCore::setJSTestGlobalObjectTestPluginInterfaceConstructorSetter): (WebCore::setJSTestGlobalObjectTestReadOnlyMapLikeConstructorSetter): (WebCore::setJSTestGlobalObjectTestReportExtraMemoryCostConstructorSetter): (WebCore::setJSTestGlobalObjectTestSerializationConstructorSetter): (WebCore::setJSTestGlobalObjectTestSerializationIndirectInheritanceConstructorSetter): (WebCore::setJSTestGlobalObjectTestSerializationInheritConstructorSetter): (WebCore::setJSTestGlobalObjectTestSerializationInheritFinalConstructorSetter): (WebCore::setJSTestGlobalObjectTestSerializedScriptValueInterfaceConstructorSetter): (WebCore::setJSTestGlobalObjectTestStringifierConstructorSetter): (WebCore::setJSTestGlobalObjectTestStringifierAnonymousOperationConstructorSetter): (WebCore::setJSTestGlobalObjectTestStringifierNamedOperationConstructorSetter): (WebCore::setJSTestGlobalObjectTestStringifierOperationImplementedAsConstructorSetter): (WebCore::setJSTestGlobalObjectTestStringifierOperationNamedToStringConstructorSetter): (WebCore::setJSTestGlobalObjectTestStringifierReadOnlyAttributeConstructorSetter): (WebCore::setJSTestGlobalObjectTestStringifierReadWriteAttributeConstructorSetter): (WebCore::setJSTestGlobalObjectTestTypedefsConstructorSetter): * bindings/scripts/test/JS/JSTestIndexedSetterNoIdentifier.cpp: (WebCore::JSTestIndexedSetterNoIdentifierConstructor::initializeProperties): (WebCore::JSTestIndexedSetterNoIdentifier::getOwnPropertyNames): * bindings/scripts/test/JS/JSTestIndexedSetterThrowingException.cpp: (WebCore::JSTestIndexedSetterThrowingExceptionConstructor::initializeProperties): (WebCore::JSTestIndexedSetterThrowingException::getOwnPropertyNames): * bindings/scripts/test/JS/JSTestIndexedSetterWithIdentifier.cpp: (WebCore::JSTestIndexedSetterWithIdentifierConstructor::initializeProperties): (WebCore::JSTestIndexedSetterWithIdentifier::getOwnPropertyNames): * bindings/scripts/test/JS/JSTestInterface.cpp: (WebCore::JSTestInterfaceConstructor::initializeProperties): (WebCore::setJSTestInterfaceConstructorImplementsStaticAttrSetter): (WebCore::setJSTestInterfaceImplementsStr2Setter): (WebCore::setJSTestInterfaceImplementsStr3Setter): (WebCore::setJSTestInterfaceImplementsNodeSetter): (WebCore::setJSTestInterfaceConstructorSupplementalStaticAttrSetter): (WebCore::setJSTestInterfaceSupplementalStr2Setter): (WebCore::setJSTestInterfaceSupplementalStr3Setter): (WebCore::setJSTestInterfaceSupplementalNodeSetter): (WebCore::setJSTestInterfaceReflectAttributeSetter): * bindings/scripts/test/JS/JSTestInterfaceLeadingUnderscore.cpp: (WebCore::JSTestInterfaceLeadingUnderscoreConstructor::initializeProperties): * bindings/scripts/test/JS/JSTestIterable.cpp: (WebCore::JSTestIterableConstructor::initializeProperties): * bindings/scripts/test/JS/JSTestJSBuiltinConstructor.cpp: (WebCore::JSTestJSBuiltinConstructorConstructor::initializeProperties): (WebCore::setJSTestJSBuiltinConstructorTestAttributeRWCustomSetter): * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp: (WebCore::JSTestMediaQueryListListenerConstructor::initializeProperties): * bindings/scripts/test/JS/JSTestNamedAndIndexedSetterNoIdentifier.cpp: (WebCore::JSTestNamedAndIndexedSetterNoIdentifierConstructor::initializeProperties): (WebCore::JSTestNamedAndIndexedSetterNoIdentifier::getOwnPropertySlotByIndex): (WebCore::JSTestNamedAndIndexedSetterNoIdentifier::getOwnPropertyNames): (WebCore::JSTestNamedAndIndexedSetterNoIdentifier::putByIndex): * bindings/scripts/test/JS/JSTestNamedAndIndexedSetterThrowingException.cpp: (WebCore::JSTestNamedAndIndexedSetterThrowingExceptionConstructor::initializeProperties): (WebCore::JSTestNamedAndIndexedSetterThrowingException::getOwnPropertySlotByIndex): (WebCore::JSTestNamedAndIndexedSetterThrowingException::getOwnPropertyNames): (WebCore::JSTestNamedAndIndexedSetterThrowingException::putByIndex): * bindings/scripts/test/JS/JSTestNamedAndIndexedSetterWithIdentifier.cpp: (WebCore::JSTestNamedAndIndexedSetterWithIdentifierConstructor::initializeProperties): (WebCore::JSTestNamedAndIndexedSetterWithIdentifier::getOwnPropertySlotByIndex): (WebCore::JSTestNamedAndIndexedSetterWithIdentifier::getOwnPropertyNames): (WebCore::JSTestNamedAndIndexedSetterWithIdentifier::putByIndex): * bindings/scripts/test/JS/JSTestNamedConstructor.cpp: (WebCore::JSTestNamedConstructorConstructor::initializeProperties): (WebCore::JSTestNamedConstructorNamedConstructor::initializeProperties): * bindings/scripts/test/JS/JSTestNamedDeleterNoIdentifier.cpp: (WebCore::JSTestNamedDeleterNoIdentifierConstructor::initializeProperties): (WebCore::JSTestNamedDeleterNoIdentifier::getOwnPropertySlotByIndex): (WebCore::JSTestNamedDeleterNoIdentifier::getOwnPropertyNames): (WebCore::JSTestNamedDeleterNoIdentifier::deletePropertyByIndex): * bindings/scripts/test/JS/JSTestNamedDeleterThrowingException.cpp: (WebCore::JSTestNamedDeleterThrowingExceptionConstructor::initializeProperties): (WebCore::JSTestNamedDeleterThrowingException::getOwnPropertySlotByIndex): (WebCore::JSTestNamedDeleterThrowingException::getOwnPropertyNames): (WebCore::JSTestNamedDeleterThrowingException::deletePropertyByIndex): * bindings/scripts/test/JS/JSTestNamedDeleterWithIdentifier.cpp: (WebCore::JSTestNamedDeleterWithIdentifierConstructor::initializeProperties): (WebCore::JSTestNamedDeleterWithIdentifier::getOwnPropertySlotByIndex): (WebCore::JSTestNamedDeleterWithIdentifier::getOwnPropertyNames): (WebCore::JSTestNamedDeleterWithIdentifier::deletePropertyByIndex): * bindings/scripts/test/JS/JSTestNamedDeleterWithIndexedGetter.cpp: (WebCore::JSTestNamedDeleterWithIndexedGetterConstructor::initializeProperties): (WebCore::JSTestNamedDeleterWithIndexedGetter::getOwnPropertySlotByIndex): (WebCore::JSTestNamedDeleterWithIndexedGetter::getOwnPropertyNames): * bindings/scripts/test/JS/JSTestNamedGetterCallWith.cpp: (WebCore::JSTestNamedGetterCallWithConstructor::initializeProperties): (WebCore::JSTestNamedGetterCallWith::getOwnPropertySlotByIndex): (WebCore::JSTestNamedGetterCallWith::getOwnPropertyNames): * bindings/scripts/test/JS/JSTestNamedGetterNoIdentifier.cpp: (WebCore::JSTestNamedGetterNoIdentifierConstructor::initializeProperties): (WebCore::JSTestNamedGetterNoIdentifier::getOwnPropertySlotByIndex): (WebCore::JSTestNamedGetterNoIdentifier::getOwnPropertyNames): * bindings/scripts/test/JS/JSTestNamedGetterWithIdentifier.cpp: (WebCore::JSTestNamedGetterWithIdentifierConstructor::initializeProperties): (WebCore::JSTestNamedGetterWithIdentifier::getOwnPropertySlotByIndex): (WebCore::JSTestNamedGetterWithIdentifier::getOwnPropertyNames): * bindings/scripts/test/JS/JSTestNamedSetterNoIdentifier.cpp: (WebCore::JSTestNamedSetterNoIdentifierConstructor::initializeProperties): (WebCore::JSTestNamedSetterNoIdentifier::getOwnPropertySlotByIndex): (WebCore::JSTestNamedSetterNoIdentifier::getOwnPropertyNames): (WebCore::JSTestNamedSetterNoIdentifier::putByIndex): * bindings/scripts/test/JS/JSTestNamedSetterThrowingException.cpp: (WebCore::JSTestNamedSetterThrowingExceptionConstructor::initializeProperties): (WebCore::JSTestNamedSetterThrowingException::getOwnPropertySlotByIndex): (WebCore::JSTestNamedSetterThrowingException::getOwnPropertyNames): (WebCore::JSTestNamedSetterThrowingException::putByIndex): * bindings/scripts/test/JS/JSTestNamedSetterWithIdentifier.cpp: (WebCore::JSTestNamedSetterWithIdentifierConstructor::initializeProperties): (WebCore::JSTestNamedSetterWithIdentifier::getOwnPropertySlotByIndex): (WebCore::JSTestNamedSetterWithIdentifier::getOwnPropertyNames): (WebCore::JSTestNamedSetterWithIdentifier::putByIndex): * bindings/scripts/test/JS/JSTestNamedSetterWithIndexedGetter.cpp: (WebCore::JSTestNamedSetterWithIndexedGetterConstructor::initializeProperties): (WebCore::JSTestNamedSetterWithIndexedGetter::getOwnPropertySlotByIndex): (WebCore::JSTestNamedSetterWithIndexedGetter::getOwnPropertyNames): (WebCore::JSTestNamedSetterWithIndexedGetter::putByIndex): * bindings/scripts/test/JS/JSTestNamedSetterWithIndexedGetterAndSetter.cpp: (WebCore::JSTestNamedSetterWithIndexedGetterAndSetterConstructor::initializeProperties): (WebCore::JSTestNamedSetterWithIndexedGetterAndSetter::getOwnPropertySlotByIndex): (WebCore::JSTestNamedSetterWithIndexedGetterAndSetter::getOwnPropertyNames): (WebCore::JSTestNamedSetterWithIndexedGetterAndSetter::putByIndex): * bindings/scripts/test/JS/JSTestNamedSetterWithOverrideBuiltins.cpp: (WebCore::JSTestNamedSetterWithOverrideBuiltinsConstructor::initializeProperties): (WebCore::JSTestNamedSetterWithOverrideBuiltins::getOwnPropertySlotByIndex): (WebCore::JSTestNamedSetterWithOverrideBuiltins::getOwnPropertyNames): (WebCore::JSTestNamedSetterWithOverrideBuiltins::putByIndex): * bindings/scripts/test/JS/JSTestNamedSetterWithUnforgableProperties.cpp: (WebCore::JSTestNamedSetterWithUnforgablePropertiesConstructor::initializeProperties): (WebCore::JSTestNamedSetterWithUnforgableProperties::getOwnPropertySlotByIndex): (WebCore::JSTestNamedSetterWithUnforgableProperties::getOwnPropertyNames): (WebCore::JSTestNamedSetterWithUnforgableProperties::putByIndex): * bindings/scripts/test/JS/JSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltins.cpp: (WebCore::JSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltinsConstructor::initializeProperties): (WebCore::JSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltins::getOwnPropertySlotByIndex): (WebCore::JSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltins::getOwnPropertyNames): (WebCore::JSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltins::putByIndex): * bindings/scripts/test/JS/JSTestNode.cpp: (WebCore::JSTestNodeConstructor::initializeProperties): (WebCore::JSTestNodePrototype::finishCreation): (WebCore::setJSTestNodeNameSetter): (WebCore::JSTestNode::serialize): * bindings/scripts/test/JS/JSTestObj.cpp: (WebCore::convertDictionary): (WebCore::convertDictionaryToJS): (WebCore::convertDictionary): (WebCore::convertDictionary): (WebCore::convertDictionary): (WebCore::convertDictionary): (WebCore::convertDictionary): (WebCore::convertDictionary): (WebCore::convertDictionary): (WebCore::convertDictionary): (WebCore::JSTestObjConstructor::initializeProperties): (WebCore::JSTestObjPrototype::finishCreation): (WebCore::JSTestObj::getOwnPropertyNames): (WebCore::setJSTestObjConstructorStaticStringAttrSetter): (WebCore::setJSTestObjEnumAttrSetter): (WebCore::setJSTestObjByteAttrSetter): (WebCore::setJSTestObjOctetAttrSetter): (WebCore::setJSTestObjShortAttrSetter): (WebCore::setJSTestObjClampedShortAttrSetter): (WebCore::setJSTestObjEnforceRangeShortAttrSetter): (WebCore::setJSTestObjUnsignedShortAttrSetter): (WebCore::setJSTestObjLongAttrSetter): (WebCore::setJSTestObjLongLongAttrSetter): (WebCore::setJSTestObjUnsignedLongLongAttrSetter): (WebCore::setJSTestObjStringAttrSetter): (WebCore::setJSTestObjUsvstringAttrSetter): (WebCore::setJSTestObjTestObjAttrSetter): (WebCore::setJSTestObjTestNullableObjAttrSetter): (WebCore::setJSTestObjLenientTestObjAttrSetter): (WebCore::setJSTestObjStringAttrTreatingNullAsEmptyStringSetter): (WebCore::setJSTestObjUsvstringAttrTreatingNullAsEmptyStringSetter): (WebCore::setJSTestObjByteStringAttrTreatingNullAsEmptyStringSetter): (WebCore::setJSTestObjStringLongRecordAttrSetter): (WebCore::setJSTestObjUsvstringLongRecordAttrSetter): (WebCore::setJSTestObjStringObjRecordAttrSetter): (WebCore::setJSTestObjStringNullableObjRecordAttrSetter): (WebCore::setJSTestObjDictionaryAttrSetter): (WebCore::setJSTestObjNullableDictionaryAttrSetter): (WebCore::setJSTestObjAnnotatedTypeInUnionAttrSetter): (WebCore::setJSTestObjAnnotatedTypeInSequenceAttrSetter): (WebCore::setJSTestObjImplementationEnumAttrSetter): (WebCore::setJSTestObjXMLObjAttrSetter): (WebCore::setJSTestObjCreateSetter): (WebCore::setJSTestObjReflectedStringAttrSetter): (WebCore::setJSTestObjReflectedUSVStringAttrSetter): (WebCore::setJSTestObjReflectedIntegralAttrSetter): (WebCore::setJSTestObjReflectedUnsignedIntegralAttrSetter): (WebCore::setJSTestObjReflectedBooleanAttrSetter): (WebCore::setJSTestObjReflectedURLAttrSetter): (WebCore::setJSTestObjReflectedUSVURLAttrSetter): (WebCore::setJSTestObjReflectedCustomIntegralAttrSetter): (WebCore::setJSTestObjReflectedCustomBooleanAttrSetter): (WebCore::setJSTestObjReflectedCustomURLAttrSetter): (WebCore::setJSTestObjEnabledAtRuntimeAttributeSetter): (WebCore::setJSTestObjConstructorEnabledAtRuntimeAttributeStaticSetter): (WebCore::setJSTestObjTypedArrayAttrSetter): (WebCore::setJSTestObjCustomAttrSetter): (WebCore::setJSTestObjOnfooSetter): (WebCore::setJSTestObjOnwebkitfooSetter): (WebCore::setJSTestObjWithExecStateAttributeSetter): (WebCore::setJSTestObjWithCallWithAndSetterCallWithAttributeSetter): (WebCore::setJSTestObjWithScriptExecutionContextAttributeSetter): (WebCore::setJSTestObjWithScriptExecutionContextAndExecStateAttributeSetter): (WebCore::setJSTestObjWithScriptExecutionContextAndExecStateWithSpacesAttributeSetter): (WebCore::setJSTestObjConditionalAttr1Setter): (WebCore::setJSTestObjConditionalAttr2Setter): (WebCore::setJSTestObjConditionalAttr3Setter): (WebCore::setJSTestObjConditionalAttr4ConstructorSetter): (WebCore::setJSTestObjConditionalAttr5ConstructorSetter): (WebCore::setJSTestObjConditionalAttr6ConstructorSetter): (WebCore::setJSTestObjAnyAttributeSetter): (WebCore::setJSTestObjObjectAttributeSetter): (WebCore::setJSTestObjMutablePointSetter): (WebCore::setJSTestObjStrawberrySetter): (WebCore::setJSTestObjIdSetter): (WebCore::setJSTestObjReplaceableAttributeSetter): (WebCore::setJSTestObjNullableLongSettableAttributeSetter): (WebCore::setJSTestObjNullableStringSettableAttributeSetter): (WebCore::setJSTestObjNullableUSVStringSettableAttributeSetter): (WebCore::setJSTestObjNullableByteStringSettableAttributeSetter): (WebCore::setJSTestObjAttributeWithReservedEnumTypeSetter): (WebCore::setJSTestObjPutForwardsAttributeSetter): (WebCore::setJSTestObjPutForwardsNullableAttributeSetter): (WebCore::setJSTestObjStringifierAttributeSetter): (WebCore::setJSTestObjConditionallyReadWriteAttributeSetter): (WebCore::setJSTestObjConditionalAndConditionallyReadWriteAttributeSetter): (WebCore::setJSTestObjConditionallyExposedToWindowAttributeSetter): (WebCore::setJSTestObjConditionallyExposedToWorkerAttributeSetter): (WebCore::setJSTestObjConditionallyExposedToWindowAndWorkerAttributeSetter): (WebCore::JSTestObj::serialize): * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp: (WebCore::JSTestOverloadedConstructorsConstructor::initializeProperties): * bindings/scripts/test/JS/JSTestOverloadedConstructorsWithSequence.cpp: (WebCore::JSTestOverloadedConstructorsWithSequenceConstructor::initializeProperties): * bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp: (WebCore::JSTestOverrideBuiltinsConstructor::initializeProperties): (WebCore::JSTestOverrideBuiltins::getOwnPropertySlotByIndex): (WebCore::JSTestOverrideBuiltins::getOwnPropertyNames): * bindings/scripts/test/JS/JSTestPluginInterface.cpp: (WebCore::JSTestPluginInterfaceConstructor::initializeProperties): (WebCore::JSTestPluginInterface::getOwnPropertySlotByIndex): (WebCore::JSTestPluginInterface::putByIndex): * bindings/scripts/test/JS/JSTestPromiseRejectionEvent.cpp: (WebCore::convertDictionary): (WebCore::JSTestPromiseRejectionEventConstructor::initializeProperties): * bindings/scripts/test/JS/JSTestSerialization.cpp: (WebCore::JSTestSerializationConstructor::initializeProperties): (WebCore::setJSTestSerializationFirstStringAttributeSetter): (WebCore::setJSTestSerializationSecondLongAttributeSetter): (WebCore::setJSTestSerializationThirdUnserializableAttributeSetter): (WebCore::setJSTestSerializationFourthUnrestrictedDoubleAttributeSetter): (WebCore::setJSTestSerializationFifthLongAttributeSetter): (WebCore::setJSTestSerializationSixthTypedefAttributeSetter): (WebCore::setJSTestSerializationSeventhDirectlySerializableAttributeSetter): (WebCore::setJSTestSerializationEighthIndirectlyAttributeSetter): (WebCore::setJSTestSerializationNinthOptionalDirectlySerializableAttributeSetter): (WebCore::setJSTestSerializationTenthFrozenArrayAttributeSetter): (WebCore::setJSTestSerializationEleventhSequenceAttributeSetter): (WebCore::setJSTestSerializationTwelfthInterfaceSequenceAttributeSetter): (WebCore::JSTestSerialization::serialize): * bindings/scripts/test/JS/JSTestSerializationIndirectInheritance.cpp: (WebCore::JSTestSerializationIndirectInheritanceConstructor::initializeProperties): * bindings/scripts/test/JS/JSTestSerializationInherit.cpp: (WebCore::JSTestSerializationInheritConstructor::initializeProperties): (WebCore::setJSTestSerializationInheritInheritLongAttributeSetter): (WebCore::JSTestSerializationInherit::serialize): * bindings/scripts/test/JS/JSTestSerializationInheritFinal.cpp: (WebCore::JSTestSerializationInheritFinalConstructor::initializeProperties): (WebCore::setJSTestSerializationInheritFinalFinalLongAttributeFooSetter): (WebCore::setJSTestSerializationInheritFinalFinalLongAttributeBarSetter): (WebCore::JSTestSerializationInheritFinal::serialize): * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp: (WebCore::JSTestSerializedScriptValueInterfaceConstructor::initializeProperties): (WebCore::setJSTestSerializedScriptValueInterfaceValueSetter): (WebCore::setJSTestSerializedScriptValueInterfaceCachedValueSetter): * bindings/scripts/test/JS/JSTestStandaloneDictionary.cpp: (WebCore::convertDictionary): (WebCore::convertDictionaryToJS): * bindings/scripts/test/JS/JSTestStringifier.cpp: (WebCore::JSTestStringifierConstructor::initializeProperties): * bindings/scripts/test/JS/JSTestStringifierAnonymousOperation.cpp: (WebCore::JSTestStringifierAnonymousOperationConstructor::initializeProperties): * bindings/scripts/test/JS/JSTestStringifierNamedOperation.cpp: (WebCore::JSTestStringifierNamedOperationConstructor::initializeProperties): * bindings/scripts/test/JS/JSTestStringifierOperationImplementedAs.cpp: (WebCore::JSTestStringifierOperationImplementedAsConstructor::initializeProperties): * bindings/scripts/test/JS/JSTestStringifierOperationNamedToString.cpp: (WebCore::JSTestStringifierOperationNamedToStringConstructor::initializeProperties): * bindings/scripts/test/JS/JSTestStringifierReadOnlyAttribute.cpp: (WebCore::JSTestStringifierReadOnlyAttributeConstructor::initializeProperties): * bindings/scripts/test/JS/JSTestStringifierReadWriteAttribute.cpp: (WebCore::JSTestStringifierReadWriteAttributeConstructor::initializeProperties): (WebCore::setJSTestStringifierReadWriteAttributeIdentifierSetter): * bindings/scripts/test/JS/JSTestTypedefs.cpp: (WebCore::JSTestTypedefsConstructor::initializeProperties): (WebCore::setJSTestTypedefsUnsignedLongLongAttrSetter): (WebCore::setJSTestTypedefsSerializedScriptValueSetter): (WebCore::setJSTestTypedefsAttributeWithClampSetter): (WebCore::setJSTestTypedefsAttributeWithClampInTypedefSetter): (WebCore::setJSTestTypedefsBufferSourceAttrSetter): (WebCore::setJSTestTypedefsDomTimeStampAttrSetter): * bridge/NP_jsobject.cpp: * bridge/c/c_instance.cpp: (JSC::Bindings::CInstance::stringValue const): (JSC::Bindings::CInstance::getPropertyNames): * bridge/c/c_utility.cpp: (JSC::Bindings::identifierFromNPIdentifier): * bridge/objc/WebScriptObject.mm: (-[WebScriptObject callWebScriptMethod:withArguments:]): (-[WebScriptObject setValue:forKey:]): (-[WebScriptObject valueForKey:]): (-[WebScriptObject removeWebScriptKey:]): (-[WebScriptObject hasWebScriptKey:]): * bridge/objc/objc_runtime.mm: (JSC::Bindings::ObjcFallbackObjectImp::defaultValue): * bridge/objc/objc_utility.mm: (JSC::Bindings::convertNSStringToString): * bridge/runtime_array.cpp: (JSC::RuntimeArray::getOwnPropertyNames): * contentextensions/ContentExtensionParser.cpp: (WebCore::ContentExtensions::loadTrigger): (WebCore::ContentExtensions::loadAction): * crypto/SubtleCrypto.cpp: (WebCore::normalizeCryptoAlgorithmParameters): * domjit/DOMJITHelpers.h: (WebCore::DOMJIT::toWrapperSlow): * html/HTMLMediaElement.cpp: (WebCore::controllerJSValue): (WebCore::HTMLMediaElement::updateCaptionContainer): (WebCore::HTMLMediaElement::ensureMediaControlsInjectedScript): (WebCore::HTMLMediaElement::setControllerJSProperty): (WebCore::HTMLMediaElement::didAddUserAgentShadowRoot): (WebCore::HTMLMediaElement::updateMediaControlsAfterPresentationModeChange): (WebCore::HTMLMediaElement::getCurrentMediaControlsStatus): * html/HTMLPlugInImageElement.cpp: (WebCore::HTMLPlugInImageElement::didAddUserAgentShadowRoot): * inspector/InspectorFrontendHost.cpp: (WebCore::InspectorFrontendHost::addSelfToGlobalObjectInWorld): (WebCore::InspectorFrontendHost::showContextMenu): * inspector/WebInjectedScriptHost.cpp: (WebCore::WebInjectedScriptHost::subtype): (WebCore::constructInternalProperty): (WebCore::objectForPaymentOptions): (WebCore::objectForPaymentCurrencyAmount): (WebCore::objectForPaymentItem): (WebCore::objectForPaymentShippingOption): (WebCore::objectForPaymentDetailsModifier): (WebCore::objectForPaymentDetails): (WebCore::jsStringForPaymentRequestState): (WebCore::WebInjectedScriptHost::getInternalProperties): * inspector/agents/InspectorCanvasAgent.cpp: (WebCore::InspectorCanvasAgent::consoleStartRecordingCanvas): * inspector/agents/InspectorDOMAgent.cpp: (WebCore::InspectorDOMAgent::buildObjectForEventListener): (WebCore::InspectorDOMAgent::scriptValueAsNode): * inspector/agents/page/PageAuditAgent.cpp: (WebCore::PageAuditAgent::populateAuditObject): * page/PageConsoleClient.cpp: (WebCore::PageConsoleClient::screenshot): * platform/graphics/CustomPaintImage.cpp: (WebCore::CustomPaintImage::doCustomPaint): * testing/js/WebCoreTestSupport.cpp: (WebCoreTestSupport::injectInternalsObject): (WebCoreTestSupport::setupNewlyCreatedServiceWorker): * worklets/PaintWorkletGlobalScope.cpp: (WebCore::PaintWorkletGlobalScope::registerPaint): 2019-08-27 Devin Rousso Web Inspector: don't attach properties to `injectedScript` for the CommandLineAPI https://bugs.webkit.org/show_bug.cgi?id=201193 Reviewed by Joseph Pecoraro. For some reason, adding `injectedScript._inspectObject` inside CommandLineAPIModuleSource.js causes inspector/debugger/tail-deleted-frames-this-value.html to fail. We should have a similar approach to adding command line api getters and functions, in that the CommandLineAPIModuleSource.js calls a function with a callback. * inspector/CommandLineAPIModuleSource.js: (injectedScript._inspectObject): Deleted. 2019-08-27 Zalan Bujtas [LFC][TFC] Align table formatting context code with the existing layout logic. https://bugs.webkit.org/show_bug.cgi?id=201168 Reviewed by Antti Koivisto. Let's make the TFC go through the exisint shrink-to-fit computation. Tables behave slightly different from other shrink-to-fit boxes as they are streched to their minimum width(MIN) even when 'width' is non-auto and computed to less than MIN. * layout/FormattingContextGeometry.cpp: (WebCore::Layout::contentHeightForFormattingContextRoot): * layout/blockformatting/BlockFormattingContext.h: * layout/blockformatting/BlockFormattingContextGeometry.cpp: (WebCore::Layout::BlockFormattingContext::Geometry::inFlowWidthAndMargin): * layout/tableformatting/TableFormattingContext.cpp: (WebCore::Layout::TableFormattingContext::layout const): (WebCore::Layout::TableFormattingContext::computedIntrinsicWidthConstraints const): (WebCore::Layout::TableFormattingContext::computedTableWidth const): (WebCore::Layout::TableFormattingContext::computeTableWidth const): Deleted. (WebCore::Layout::TableFormattingContext::computeTableHeight const): Deleted. (WebCore::Layout::TableFormattingContext::distributeAvailableHeight const): Deleted. * layout/tableformatting/TableFormattingContext.h: * layout/tableformatting/TableGrid.h: 2019-08-27 Simon Fraser Minor optimization in InlineFlowBox::paintBoxDecorations() https://bugs.webkit.org/show_bug.cgi?id=201199 Reviewed by Zalan Bujtas. This function can early return before computing localRect, which takes a bit of time (seen on profiles). * rendering/InlineFlowBox.cpp: (WebCore::InlineFlowBox::paintBoxDecorations): 2019-08-27 Carlos Alberto Lopez Perez Drawing an animated image to a canvas via drawImage should draw the first frame https://bugs.webkit.org/show_bug.cgi?id=74779 Reviewed by Said Abou-Hallawa. After this patch, when an animated image is drawn into a canvas via drawImage, the actual image that the canvas will receive will be a new Image object with the contents of the first frame of the animation. It also adds an internal setting to keep the previous behaviour (draw the current frame playing) because there are several layout tests that rely on canvas.drawImage() to check that animated images play properly. Test: fast/canvas/drawImage-animated-gif-draws-first-frame-and-no-reset-image.html * html/canvas/CanvasRenderingContext2DBase.cpp: (WebCore::CanvasRenderingContext2DBase::drawImage): * page/Settings.yaml: * testing/InternalSettings.cpp: (WebCore::InternalSettings::Backup::Backup): (WebCore::InternalSettings::Backup::restoreTo): (WebCore::InternalSettings::setAnimatedImageDebugCanvasDrawingEnabled): * testing/InternalSettings.h: * testing/InternalSettings.idl: 2019-08-27 Chris Dumez Crash under WebCore::jsNotificationConstructorPermission https://bugs.webkit.org/show_bug.cgi?id=201186 Reviewed by Youenn Fablet. Update the Notification API implementation to null-check the page before using. The page becomes null when using the API in a frame that gets detached from its parent while in the middle of running script. Test: http/tests/notifications/request-in-detached-frame.html * Modules/notifications/Notification.cpp: (WebCore::Notification::permission): (WebCore::Notification::requestPermission): 2019-08-27 Youenn Fablet Disabled devices should not be taken into account when searching for a capture device https://bugs.webkit.org/show_bug.cgi?id=201183 Reviewed by Jer Noble. Manually tested. * platform/mediastream/mac/CoreAudioCaptureDeviceManager.cpp: (WebCore::CoreAudioCaptureDeviceManager::coreAudioDeviceWithUID): We currently keep a list of devices, some of which might be disabled. We should not take into account disabled devices, only enabled devices when doing this search. * platform/mediastream/mac/CoreAudioCaptureSource.cpp: (WebCore::CoreAudioSharedUnit::setupAudioUnit): Improve logging. 2019-08-26 Jer Noble Removing fullscreen element in rAF() callback after requestFullscreen() can leave fullscreen in inconsistent state. https://bugs.webkit.org/show_bug.cgi?id=201101 Reviewed by Eric Carlson. Test: fullscreen/full-screen-request-removed-with-raf.html Add a new state variable, m_pendingFullscreenElement, to track which element is about to become the fullscreen element, so that when elements are removed or cancelFullscreen() is called, the state machine inside the fullscreen algorithm can cancel effectively. * dom/FullscreenManager.cpp: (WebCore::FullscreenManager::requestFullscreenForElement): (WebCore::FullscreenManager::cancelFullscreen): (WebCore::FullscreenManager::exitFullscreen): (WebCore::FullscreenManager::willEnterFullscreen): (WebCore::FullscreenManager::willExitFullscreen): (WebCore::FullscreenManager::didExitFullscreen): (WebCore::FullscreenManager::adjustFullscreenElementOnNodeRemoval): (WebCore::FullscreenManager::clear): (WebCore::FullscreenManager::fullscreenElementRemoved): Deleted. * dom/FullscreenManager.h: 2019-08-27 Peng Liu webkitpresentationmodechanged is fired twice when exiting picture in picture https://bugs.webkit.org/show_bug.cgi?id=193765 Reviewed by Jer Noble. This patch removes the extra "webkitpresentationmodechanged" event when the browser switches from picture-in-picture or fullscreen to inline. The bug was introduced by the fix for bug https://bugs.webkit.org/show_bug.cgi?id=181095 But now we are using modern media controls and the fix is not necessary. Reverting that fix can fix the issue. Also, this patch gets rid of the unnecessary try to call a JavaScript function which is not available in the modern media controls. Test: media/presentationmodechanged-fired-once.html * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::exitFullscreen): (WebCore::HTMLMediaElement::updateMediaControlsAfterPresentationModeChange): 2019-08-27 Wenson Hsieh Image pasted from screenshot into Mail compose window via share sheet has the wrong aspect ratio https://bugs.webkit.org/show_bug.cgi?id=201171 Reviewed by Tim Horton. Augments an existing app-specific hack to include the Mail composition service, in addition to Mail. * platform/RuntimeApplicationChecks.h: * platform/cocoa/RuntimeApplicationChecksCocoa.mm: (WebCore::IOSApplication::isMailCompositionService): Add a new bundle checking method for the Mail composition service (com.apple.MailCompositionService). * platform/ios/PlatformPasteboardIOS.mm: (WebCore::PlatformPasteboard::informationForItemAtIndex): Only plumb the preferred presentation height through to the web process if the application is neither Mail nor the Mail composition service. In the future, we should consider putting this hack behind SPI, or maybe only expose the preferred presentation width in all apps (it isn't difficult to imagine a use case where a "Mail- compose-like" web app has `img { max-width: 100%; }` in their stylesheet). 2019-08-27 Carlos Garcia Campos Origin header not included in WebSocket handshake request when using platform WebSocket API https://bugs.webkit.org/show_bug.cgi?id=200535 Reviewed by Youenn Fablet. Add Origin HTTP header to the WebSocket handshake request. * Modules/websockets/ThreadableWebSocketChannel.cpp: (WebCore::ThreadableWebSocketChannel::webSocketConnectRequest): 2019-08-27 Youenn Fablet Make MediaStreamTrackPrivate RefCounted https://bugs.webkit.org/show_bug.cgi?id=201040 Reviewed by Darin Adler. MediaStreamTrackPrivate should not be ref/deref except from the main thread. The only method called from a background thread is audioSamplesAvailable in which it is unsafe to ref a MediaStreamTrackPrivate. Make the track RefCounted will ensure that no ref/deref is made in background threads. No observable change of behavior. * platform/mediastream/MediaStreamTrackPrivate.h: 2019-08-26 Yusuke Suzuki [WebCore] DataCue should not use gcProtect / gcUnprotect https://bugs.webkit.org/show_bug.cgi?id=201170 Reviewed by Mark Lam. JSC::gcProtect and JSC::gcUnprotect are designed for JavaScriptCore.framework and we should not use them in WebCore. It is checking whether we are holding a JS API lock. But the caller of these API would be the C++ holder's destructor, and this should be allowed since this destruction must happen in main thread or web thread, and this should not happen while other thread is taking JS API lock. For example, we are destroying JSC::Strong<>, JSC::Weak<> without taking JS API lock. But since JSC::gcProtect and JSC::gcUnprotect are designed for JavaScriptCore.framework, they are not accounting this condition, and we are hitting debug assertion in GC stress bot. Ideally, we should convert this JSValue field to JSValueInWrappedObject. But JSValueInWrappedObject needs extra care. We should know how the owner and JS wrapper are kept and used to use JSValueInWrappedObject correctly. As a first step, this patch just replaces raw JSValue + gcProtect/gcUnprotect with JSC::Strong<>. This change fixes LayoutTests/media/track/track-in-band-metadata-display-order.html crash in GC stress bot. The crash trace is the following. Thread 0 Crashed:: Dispatch queue: com.apple.main-thread 0 com.apple.JavaScriptCore 0x000000010ee3d980 WTFCrash + 16 1 com.apple.JavaScriptCore 0x000000010ee408ab WTFCrashWithInfo(int, char const*, char const*, int) + 27 2 com.apple.JavaScriptCore 0x000000010feb5327 JSC::Heap::unprotect(JSC::JSValue) + 215 3 com.apple.WebCore 0x0000000120f33b53 JSC::gcUnprotect(JSC::JSCell*) + 51 4 com.apple.WebCore 0x0000000120f329fc JSC::gcUnprotect(JSC::JSValue) + 76 5 com.apple.WebCore 0x0000000120f32968 WebCore::DataCue::~DataCue() + 88 6 com.apple.WebCore 0x0000000120f32ac5 WebCore::DataCue::~DataCue() + 21 7 com.apple.WebCore 0x0000000120f32ae9 WebCore::DataCue::~DataCue() + 25 8 com.apple.WebCore 0x0000000120f37ebf WTF::RefCounted >::deref() const + 95 9 com.apple.WebCore 0x000000012103a345 void WTF::derefIfNotNull(WebCore::TextTrackCue*) + 53 10 com.apple.WebCore 0x000000012103a309 WTF::RefPtr >::~RefPtr() + 41 11 com.apple.WebCore 0x000000012102bfc5 WTF::RefPtr >::~RefPtr() + 21 12 com.apple.WebCore 0x00000001210e91df WTF::VectorDestructor > >::destruct(WTF::RefPtr >*, WTF::RefPtr >*) + 47 13 com.apple.WebCore 0x00000001210e913d WTF::VectorTypeOperations > >::destruct(WTF::RefPtr >*, WTF::RefPtr >*) + 29 14 com.apple.WebCore 0x00000001210e9100 WTF::Vector >, 0ul, WTF::CrashOnOverflow, 16ul>::~Vector() + 64 15 com.apple.WebCore 0x00000001210e7a25 WTF::Vector >, 0ul, WTF::CrashOnOverflow, 16ul>::~Vector() + 21 16 com.apple.WebCore 0x00000001210e93d3 WebCore::TextTrackCueList::~TextTrackCueList() + 51 * html/track/DataCue.cpp: (WebCore::DataCue::DataCue): (WebCore::DataCue::~DataCue): (WebCore::DataCue::setData): (WebCore::DataCue::value const): (WebCore::DataCue::setValue): (WebCore::DataCue::valueOrNull const): * html/track/DataCue.h: 2019-08-26 Devin Rousso Web Inspector: use more C++ keywords for defining agents https://bugs.webkit.org/show_bug.cgi?id=200959 Reviewed by Joseph Pecoraro. - make constructors `protected` when the agent isn't meant to be constructed directly - add `virtual` destructors that are defined in the *.cpp so forward-declarations work - use `final` wherever possible - add comments to indicate where any virtual functions come from * inspector/agents/InspectorApplicationCacheAgent.h: * inspector/agents/InspectorApplicationCacheAgent.cpp: * inspector/agents/InspectorCPUProfilerAgent.h: * inspector/agents/InspectorCPUProfilerAgent.cpp: * inspector/agents/InspectorCSSAgent.h: * inspector/agents/InspectorCSSAgent.cpp: * inspector/agents/InspectorCanvasAgent.h: * inspector/agents/InspectorCanvasAgent.cpp: * inspector/agents/InspectorDOMAgent.h: * inspector/agents/InspectorDOMAgent.cpp: * inspector/agents/InspectorDOMDebuggerAgent.h: * inspector/agents/InspectorDOMDebuggerAgent.cpp: * inspector/agents/InspectorDOMStorageAgent.h: * inspector/agents/InspectorDOMStorageAgent.cpp: * inspector/agents/InspectorDatabaseAgent.h: * inspector/agents/InspectorDatabaseAgent.cpp: * inspector/agents/InspectorIndexedDBAgent.h: * inspector/agents/InspectorIndexedDBAgent.cpp: * inspector/agents/InspectorLayerTreeAgent.h: * inspector/agents/InspectorLayerTreeAgent.cpp: * inspector/agents/InspectorMemoryAgent.h: * inspector/agents/InspectorMemoryAgent.cpp: * inspector/agents/InspectorNetworkAgent.h: * inspector/agents/InspectorNetworkAgent.cpp: * inspector/agents/InspectorPageAgent.h: * inspector/agents/InspectorPageAgent.cpp: * inspector/agents/InspectorTimelineAgent.h: * inspector/agents/InspectorTimelineAgent.cpp: * inspector/agents/InspectorWorkerAgent.h: * inspector/agents/InspectorWorkerAgent.cpp: * inspector/agents/WebConsoleAgent.h: * inspector/agents/WebConsoleAgent.cpp: * inspector/agents/WebDebuggerAgent.h: * inspector/agents/WebDebuggerAgent.cpp: * inspector/agents/WebHeapAgent.h: * inspector/agents/WebHeapAgent.cpp: * inspector/agents/page/PageAuditAgent.h: * inspector/agents/page/PageAuditAgent.cpp: * inspector/agents/page/PageConsoleAgent.h: * inspector/agents/page/PageConsoleAgent.cpp: * inspector/agents/page/PageDebuggerAgent.h: * inspector/agents/page/PageDebuggerAgent.cpp: * inspector/agents/page/PageHeapAgent.h: * inspector/agents/page/PageHeapAgent.cpp: * inspector/agents/page/PageNetworkAgent.h: * inspector/agents/page/PageNetworkAgent.cpp: * inspector/agents/page/PageRuntimeAgent.h: * inspector/agents/page/PageRuntimeAgent.cpp: * inspector/agents/worker/ServiceWorkerAgent.h: * inspector/agents/worker/ServiceWorkerAgent.cpp: * inspector/agents/worker/WorkerAuditAgent.h: * inspector/agents/worker/WorkerAuditAgent.cpp: * inspector/agents/worker/WorkerConsoleAgent.h: * inspector/agents/worker/WorkerConsoleAgent.cpp: * inspector/agents/worker/WorkerDebuggerAgent.h: * inspector/agents/worker/WorkerNetworkAgent.h: * inspector/agents/worker/WorkerNetworkAgent.cpp: * inspector/agents/worker/WorkerRuntimeAgent.h: * inspector/agents/worker/WorkerRuntimeAgent.cpp: 2019-08-26 Myles C. Maxfield [WHLSL] Rewrite all tests to use WHLSL and delete the isWHLSL flag https://bugs.webkit.org/show_bug.cgi?id=201162 Reviewed by Saam Barati. We want to keep the MSL codepath for debugging, so the codepath isn't deleted entirely, but it is no longer web exposed. * Modules/webgpu/WebGPUDevice.cpp: (WebCore::WebGPUDevice::createShaderModule const): * Modules/webgpu/WebGPUShaderModuleDescriptor.h: * Modules/webgpu/WebGPUShaderModuleDescriptor.idl: * platform/graphics/gpu/GPUDevice.h: * platform/graphics/gpu/GPUShaderModuleDescriptor.h: * platform/graphics/gpu/cocoa/GPUShaderModuleMetal.mm: (WebCore::GPUShaderModule::tryCreate): 2019-08-26 Chris Dumez Change default value of window.open()'s url argument https://bugs.webkit.org/show_bug.cgi?id=200882 Reviewed by Ryosuke Niwa. Update default URL parameter value for window.open() to be "" instead of "about:blank", as per: - https://github.com/whatwg/html/issues/4762 This aligns our behavior with other Web browser engines. No new tests, rebaselined existing test. * page/DOMWindow.idl: 2019-08-26 Devin Rousso Web Inspector: unify agent command error messages https://bugs.webkit.org/show_bug.cgi?id=200950 Reviewed by Joseph Pecoraro. Different agents can sometimes have different error messages for commands that have a similar intended effect. We should make our error messages more similar. * inspector/CommandLineAPIHost.cpp: * inspector/agents/InspectorApplicationCacheAgent.cpp: * inspector/agents/InspectorCSSAgent.cpp: * inspector/agents/InspectorCanvasAgent.h: * inspector/agents/InspectorCanvasAgent.cpp: * inspector/agents/InspectorDOMAgent.cpp: * inspector/agents/InspectorDOMDebuggerAgent.cpp: * inspector/agents/InspectorDOMStorageAgent.cpp: * inspector/agents/InspectorIndexedDBAgent.cpp: * inspector/agents/InspectorLayerTreeAgent.cpp: * inspector/agents/InspectorMemoryAgent.cpp: * inspector/agents/InspectorNetworkAgent.cpp: * inspector/agents/InspectorPageAgent.cpp: * inspector/agents/InspectorTimelineAgent.cpp: * inspector/agents/InspectorWorkerAgent.cpp: * inspector/agents/page/PageAuditAgent.cpp: * inspector/agents/page/PageConsoleAgent.cpp: * inspector/agents/page/PageDebuggerAgent.cpp: * inspector/agents/page/PageNetworkAgent.cpp: * inspector/agents/page/PageRuntimeAgent.cpp: * inspector/agents/worker/WorkerAuditAgent.cpp: * inspector/agents/worker/WorkerDebuggerAgent.cpp: * inspector/agents/worker/WorkerRuntimeAgent.cpp: Elide function lists to avoid an extremely large ChangeLog entry. 2019-08-26 Chris Dumez Regression: ITP started doing a lot more IPC after its logic was moved to the network process https://bugs.webkit.org/show_bug.cgi?id=201155 Reviewed by John Wilander. ITP started doing a lot more IPC after its logic was moved to the network process. Web processes used to send their statistics to the UIProcess at most every 5 seconds. However, when the logic got moved to the network process, we started notifying the network process via IPC after every sub resource load. This is bad for performance and battery life. This patch restores the 5 second delay to address the issue. * loader/ResourceLoadObserver.cpp: (WebCore::ResourceLoadObserver::ResourceLoadObserver): (WebCore::ResourceLoadObserver::setRequestStorageAccessUnderOpenerCallback): (WebCore::ResourceLoadObserver::logSubresourceLoading): (WebCore::ResourceLoadObserver::logWebSocketLoading): (WebCore::ResourceLoadObserver::logUserInteractionWithReducedTimeResolution): (WebCore::ResourceLoadObserver::scheduleNotificationIfNeeded): (WebCore::ResourceLoadObserver::updateCentralStatisticsStore): (WebCore::ResourceLoadObserver::clearState): * loader/ResourceLoadObserver.h: 2019-08-26 Simon Fraser Optimize computation of AbsoluteClipRects clip rects https://bugs.webkit.org/show_bug.cgi?id=201148 Reviewed by Zalan Bujtas. When adding layers to the compositing overlap map, we compute AbsoluteClipRects for every layer which is expensive. This was more expensive than necessary because we converted them to TemporaryClipRects when crossing painting boundaries, but AbsoluteClipRects don't care about painting boundaries, so don't do this. * rendering/RenderLayer.cpp: (WebCore::RenderLayer::calculateClipRects const): 2019-08-26 Chris Dumez Drop WEBCORE_EXPORT from ChromeClient class https://bugs.webkit.org/show_bug.cgi?id=201146 Reviewed by Alex Christensen. Drop WEBCORE_EXPORT from ChromeClient class. All its methods and either pure virtual or inlined in the header. * page/ChromeClient.h: 2019-08-26 David Kilzer Don't compute upconverted characters twice in buildQuery() in DataDetection.mm Reviewed by Brent Fulgham. * editing/cocoa/DataDetection.mm: (WebCore::buildQuery): Extract common variables to prevent double conversion for 8-bit strings. 2019-08-26 Brent Fulgham [FTW] Go back to ID2D1Bitmap as our NativeImage type https://bugs.webkit.org/show_bug.cgi?id=201122 Reviewed by Alex Christensen. In Bug 200093 I switched the OS type of NativeImagePtr from ID2D1Bitmap to IWICBitmap. However, this was an ill-advised approach, because it dramatically harmed performance due to the heavy use of software rendering. I originally made this change because I thought this was the only way to get to the backing bits of the bitmaps, but it turns out that a more recent Direct2D data type (ID2D1Bitmap1) has the ability to map its memory to CPU-accessible memory, allowing software filter effects. This patch switches back to the ID2D1Bitap data type, and hooks up the ID2D1Bitmap1 data type to access the underlying memory of the bitmaps when software filter effects are used. * platform/graphics/ImageBuffer.h: * platform/graphics/NativeImage.h: * platform/graphics/texmap/BitmapTextureGL.cpp: * platform/graphics/win/Direct2DOperations.cpp: * platform/graphics/win/Direct2DOperations.h: * platform/graphics/win/Direct2DUtilities.cpp: (WebCore::Direct2D::writeDiagnosticPNGToPath): (WebCore::Direct2D::writeImageToDiskAsPNG): Deleted. * platform/graphics/win/Direct2DUtilities.h: * platform/graphics/win/GraphicsContextDirect2D.cpp: * platform/graphics/win/ImageBufferDataDirect2D.cpp: * platform/graphics/win/ImageBufferDataDirect2D.h: * platform/graphics/win/ImageBufferDirect2D.cpp: * platform/graphics/win/ImageDecoderDirect2D.cpp: * platform/graphics/win/NativeImageDirect2D.cpp: * platform/graphics/win/PatternDirect2D.cpp: * svg/graphics/SVGImage.cpp: 2019-08-26 Sam Weinig [WHLSL] TypeNamer can be simplified by replacing BaseTypeNameNode with uniqued AST::UnnamedTypes https://bugs.webkit.org/show_bug.cgi?id=200632 Reviewed by Saam Barati. There is no longer a reason to keep a parallel tree of the UnnamedType-like objects BaseTypeNameNodes. Instead, we can store a single HashMap mapping from UnnamedTypeKeys to MangledTypeName, and use the the UnnamedType stored in the UnnamedTypeKey while emitting the metal code. This removes the parallel BaseTypeNameNode type hierarchy and removes an extra allocation for each UnnamedType. * Modules/webgpu/WHLSL/AST/WHLSLUnnamedTypeHash.h: Define HashTraits and DefaultHash specializations for UnnamedTypeKey to simplify uses of UnnamedTypeKey as a key in HashMap/HashSet. * Modules/webgpu/WHLSL/Metal/WHLSLTypeNamer.h: * Modules/webgpu/WHLSL/Metal/WHLSLTypeNamer.cpp: (WebCore::WHLSL::Metal::TypeNamer::insert): Deleted. (WebCore::WHLSL::Metal::TypeNamer::generateUniquedTypeName): Replace old insert function with generateUniquedTypeName, which uniques and generates names for the UnnamedType and any 'parent' UnnamedTypes. (WebCore::WHLSL::Metal::BaseTypeNameNode): Deleted. Remove BaseTypeNameNode and subclasses. (WebCore::WHLSL::Metal::TypeNamer::find): Deleted. (WebCore::WHLSL::Metal::TypeNamer::createNameNode): Deleted. We no longer need the find or createNameNode functions, as the UnnamedTypes can be now be used directly everywhere. (WebCore::WHLSL::Metal::TypeNamer::emitUnnamedTypeDefinition): Switch to directly using the UnnamedType and always have the caller pass in the mangled name, since in the main emit loop, we always have access to the them. Also, inline the the recursive calls to emitNamedTypeDefinition for 'parent' types to avoid unnecessary extra switch over the kind getting the parent, and avoid it entirely for TypeReference which never has a parent. (WebCore::WHLSL::Metal::TypeNamer::emitNamedTypeDefinition): Switches to now passing in the neighbors, since they are always available in the main emit loop. Also move to a switch statement rather than ifs for consistency. (WebCore::WHLSL::Metal::TypeNamer::emitMetalTypeDefinitions): Pass keys and values into the emit functions to avoid double lookups. (WebCore::WHLSL::Metal::TypeNamer::mangledNameForType): Update to hash lookup. * Modules/webgpu/WHLSL/WHLSLSynthesizeConstructors.cpp: Take advantage of default HashTraits and DefaultHash for UnnamedTypeKey. 2019-08-26 Peng Liu REGRESSION (18E140): “return streaming movie to real time” suggesting “resume real time streaming” https://bugs.webkit.org/show_bug.cgi?id=201108 Reviewed by Eric Carlson. Update Localizable.strings. No new test. * en.lproj/Localizable.strings: * platform/LocalizedStrings.cpp: (WebCore::localizedMediaControlElementHelpText): 2019-08-26 Youenn Fablet CacheStorageConnection::computeRealBodySize is not thread-safe https://bugs.webkit.org/show_bug.cgi?id=201074 Reviewed by Chris Dumez. In case of a form data, the size computation might require sync IPC to the network process which is not thread-safe In that case, hop to the main thread to compute the size of the body. Covered by existing service worker tests in Debug mode. * Modules/cache/CacheStorageConnection.cpp: (WebCore::formDataSize): (WebCore::CacheStorageConnection::computeRealBodySize): 2019-08-26 Youenn Fablet MessagePort should be WeakPtrFactoryInitialization::Eager https://bugs.webkit.org/show_bug.cgi?id=201073 Reviewed by Chris Dumez. Covered by existing layout tests. * dom/MessagePort.h: 2019-08-24 Simon Fraser Have RenderLayer::calculateClipRects() use offsetFromAncestor() when possible https://bugs.webkit.org/show_bug.cgi?id=201066 Reviewed by Dean Jackson. offsetFromAncestor() is a layer tree walk, so faster than localToContainerPoint(), but we can't use it when there are transforms on the layer and intermediates up to the ancestor. canUseConvertToLayerCoords() was trying to answer the question about whether it's OK to use offsetFromAncestor() (which calls convertToLayerCoords() internally), but it has insufficient information to make a determination. Leave this issue alone, but at least rename canUseConvertToLayerCoords(). * rendering/RenderLayer.cpp: (WebCore::RenderLayer::updateLayerPositions): (WebCore::RenderLayer::calculateClipRects const): * rendering/RenderLayer.h: 2019-08-24 Simon Fraser Page crashes under CGPathAddUnevenCornersRoundedRect https://bugs.webkit.org/show_bug.cgi?id=201117 Reviewed by Dean Jackson. Fix crash on https://onehtmlpagechallenge.com/entries/pure-css-still-life-water-lemon.html We were passing CG radius values where the sum of two radii was greater than the height or width, caused by rounding when converting from floats to doubles. Test: fast/borders/renderable-uneven-rounded-rects.html * platform/graphics/cg/PathCG.cpp: (WebCore::Path::platformAddPathForRoundedRect): 2019-08-23 Simon Fraser RenderLayer::updateLayerPositions() doesn't propagate the ancestor flags correctly https://bugs.webkit.org/show_bug.cgi?id=201115 Reviewed by Zalan Bujtas. When an updateLayerPositions() traversal starts at a non-root layer, we failed to populate the ancestor-related UpdateLayerPositionsFlag flags, leaving layers with missing flags (e.g. the m_hasTransformedAncestor flag). This is detected by the patch in bug 201066. Fix by having updateLayerPositionsAfterStyleChange() and updateLayerPositionsAfterLayout() initialize the flags from the parent layer. This is a behavior change not detected by any existing test, but will be exercised once the patch from bug 201066 lands. * rendering/RenderLayer.cpp: (WebCore::RenderLayer::flagsForUpdateLayerPositions): (WebCore::RenderLayer::updateLayerPositionsAfterStyleChange): (WebCore::RenderLayer::updateLayerPositionsAfterLayout): (WebCore::outputPaintOrderTreeLegend): (WebCore::outputPaintOrderTreeRecursive): Log hasTransformedAncestor(). * rendering/RenderLayer.h: 2019-08-24 Zalan Bujtas [LFC][TFC] Add section renderers to the layout tree (THEAD/TBODY/TFOOT) https://bugs.webkit.org/show_bug.cgi?id=201114 Reviewed by Antti Koivisto. Section renderers (THEAD/TBODY/TFOOT) are direct children of the RenderTable. Let's include them in the layout tree as well. * layout/layouttree/LayoutTreeBuilder.cpp: (WebCore::Layout::TreeBuilder::createTableStructure): (WebCore::Layout::outputInlineRuns): 2019-08-24 Zalan Bujtas [LFC] Box::isAnonymous() can not rely on the lack of ElementType. https://bugs.webkit.org/show_bug.cgi?id=201106 Reviewed by Antti Koivisto. Add bool m_isAnonymous member to mark anonymous layout boxes. Anonymous boxes are not rare enough to include this variable in RareData. * layout/layouttree/LayoutBox.h: (WebCore::Layout::Box::setIsAnonymous): * layout/layouttree/LayoutTreeBuilder.cpp: (WebCore::Layout::TreeBuilder::createLayoutBox): 2019-08-24 Antti Koivisto Implement layout system independent text box iterator https://bugs.webkit.org/show_bug.cgi?id=201076 Reviewed by Zalan Bujtas. Add a generic way to traverse line layout without caring about the details of the underlying layout system. This patch adds basic support for traversing text boxes and uses it to remove layout path specific branches in RenderTreeAsText. * Sources.txt: * WebCore.xcodeproj/project.pbxproj: * rendering/RenderTreeAsText.cpp: (WebCore::RenderTreeAsText::writeRenderObject): (WebCore::writeTextBox): (WebCore::write): (WebCore::writeTextRun): Deleted. (WebCore::writeSimpleLine): Deleted. * rendering/line/LineLayoutInterfaceTextBoxes.cpp: Added. (WebCore::LineLayoutInterface::TextBox::rect const): (WebCore::LineLayoutInterface::TextBox::logicalRect const): (WebCore::LineLayoutInterface::TextBox::hasHyphen const): (WebCore::LineLayoutInterface::TextBox::isLeftToRightDirection const): (WebCore::LineLayoutInterface::TextBox::dirOverride const): (WebCore::LineLayoutInterface::TextBox::text const): (WebCore::LineLayoutInterface::TextBoxIterator::TextBoxIterator): (WebCore::LineLayoutInterface::TextBoxIterator::traverseNext): (WebCore::LineLayoutInterface::TextBoxIterator::operator== const): (WebCore::LineLayoutInterface::simpleLineRunResolverForText): (WebCore::LineLayoutInterface::rangeForText): (WebCore::LineLayoutInterface::TextBoxRange::TextBoxRange): (WebCore::LineLayoutInterface::textBoxes): * rendering/line/LineLayoutInterfaceTextBoxes.h: Added. (WebCore::LineLayoutInterface::TextBox::TextBox): (WebCore::LineLayoutInterface::TextBoxIterator::operator++): (WebCore::LineLayoutInterface::TextBoxIterator::operator!= const): (WebCore::LineLayoutInterface::TextBoxIterator::operator* const): (WebCore::LineLayoutInterface::TextBoxRange::begin const): (WebCore::LineLayoutInterface::TextBoxRange::end const): 2019-08-24 Zalan Bujtas [LFC][BFC] Non-inline formatting context(table, grid etc) root container should not collapse through. https://bugs.webkit.org/show_bug.cgi?id=201099 Reviewed by Antti Koivisto. I didn't manage to find it in the spec, but surely formatting contexts like table, grid and flex should behave like block so that their vertical margins are not adjoining, when they have at least one inflow child. * layout/blockformatting/BlockMarginCollapse.cpp: (WebCore::Layout::BlockFormattingContext::MarginCollapse::marginsCollapseThrough): 2019-08-24 Zalan Bujtas [LFC] Add THEAD/TBODY/TFOOT output to Layout::showLayoutTree https://bugs.webkit.org/show_bug.cgi?id=201113 Reviewed by Antti Koivisto. * layout/layouttree/LayoutTreeBuilder.cpp: (WebCore::Layout::outputLayoutBox): 2019-08-24 Zalan Bujtas [LFC] Remove redundant Layout::Box::ElementType::TableRowGroup https://bugs.webkit.org/show_bug.cgi?id=201112 Reviewed by Antti Koivisto. Use Layout::Box::ElementType::TableBodyGroup instead. * layout/layouttree/LayoutBox.cpp: (WebCore::Layout::Box::isPaddingApplicable const): * layout/layouttree/LayoutBox.h: * layout/layouttree/LayoutTreeBuilder.cpp: (WebCore::Layout::TreeBuilder::createLayoutBox): 2019-08-23 Simon Fraser RenderLayerModelObject should not call private RenderLayer functions https://bugs.webkit.org/show_bug.cgi?id=201111 Reviewed by Zalan Bujtas. Make RenderLayerModelObject no longer a friend class of RenderLayer, giving it a public willRemoveChildWithBlendMode() function to call. Also make the UpdateLayerPositionsFlag enum private, providing a updateLayerPositionsAfterStyleChange() for RenderLayerModelObject, and changing the arguments of updateLayerPositionsAfterLayout() for FrameView. No behavior change. * page/FrameView.cpp: (WebCore::FrameView::didLayout): (WebCore::updateLayerPositionFlags): Deleted. * rendering/RenderLayer.cpp: (WebCore::RenderLayer::updateLayerPositionsAfterStyleChange): (WebCore::RenderLayer::updateLayerPositionsAfterLayout): (WebCore::RenderLayer::willRemoveChildWithBlendMode): * rendering/RenderLayer.h: * rendering/RenderLayerModelObject.cpp: (WebCore::RenderLayerModelObject::styleDidChange): 2019-08-22 Ryosuke Niwa Implement StaticRange constructor https://bugs.webkit.org/show_bug.cgi?id=201055 Reviewed by Wenson Hsieh. Added the constructor to StaticRange per https://github.com/whatwg/dom/pull/778. Test: imported/w3c/web-platform-tests/dom/ranges/StaticRange-constructor.html * dom/StaticRange.cpp: (WebCore::isDocumentTypeOrAttr): (WebCore::StaticRange::create): * dom/StaticRange.h: * dom/StaticRange.idl: 2019-08-23 Devin Rousso Web Inspector: create additional command line api functions for other console methods https://bugs.webkit.org/show_bug.cgi?id=200971 Reviewed by Joseph Pecoraro. Expose all `console.*` functions in the command line API, since they're all already able to be referenced via the `console` object. Provide a simpler interface for other injected scripts to modify the command line API. * inspector/CommandLineAPIModuleSource.js: (injectedScript._inspectObject): Added. (normalizeEventTypes): Added. (logEvent): Added. (canQuerySelectorOnNode): Added. (bind): Deleted. (value): Deleted. (this.method.toString): Deleted. (CommandLineAPI): Deleted. (CommandLineAPIImpl): Deleted. (CommandLineAPIImpl.prototype): Deleted. (CommandLineAPIImpl.prototype._canQuerySelectorOnNode): Deleted. (CommandLineAPIImpl.prototype.x): Deleted. (CommandLineAPIImpl.prototype.dir): Deleted. (CommandLineAPIImpl.prototype.dirxml): Deleted. (CommandLineAPIImpl.prototype.keys): Deleted. (CommandLineAPIImpl.prototype.values): Deleted. (CommandLineAPIImpl.prototype.profile): Deleted. (CommandLineAPIImpl.prototype.profileEnd): Deleted. (CommandLineAPIImpl.prototype.table): Deleted. (CommandLineAPIImpl.prototype.screenshot): Deleted. (CommandLineAPIImpl.prototype.monitorEvents): Deleted. (CommandLineAPIImpl.prototype.unmonitorEvents): Deleted. (CommandLineAPIImpl.prototype.inspect): Deleted. (CommandLineAPIImpl.prototype.queryInstances): Deleted. (CommandLineAPIImpl.prototype.queryObjects): Deleted. (CommandLineAPIImpl.prototype.queryHolders): Deleted. (CommandLineAPIImpl.prototype.copy): Deleted. (CommandLineAPIImpl.prototype.clear): Deleted. (CommandLineAPIImpl.prototype.getEventListeners): Deleted. (CommandLineAPIImpl.prototype._inspectedObject): Deleted. (CommandLineAPIImpl.prototype._normalizeEventTypes): Deleted. (CommandLineAPIImpl.prototype._logEvent): Deleted. (CommandLineAPIImpl.prototype._inspect): Deleted. 2019-08-23 Chris Dumez Crash under TimerBase::setNextFireTime() in the NetworkProcess https://bugs.webkit.org/show_bug.cgi?id=201097 Reviewed by Ryosuke Niwa. NetworkStateNotifier is a WebCore/platform class used by both WebKitLegacy and WebKit2 in the NetworkProcess. On iOS, the lambda in the implementation of NetworkStateNotifier::startObserving() may get called by the underlying framework on a non-main thread and we therefore want to go back to the main thread before calling NetworkStateNotifier::singleton().updateStateSoon(). This is important because updateStateSoon() will schedule a WebCore::Timer. The issue is that the code was using WebThreadRun() to go back the the main thread. While this works fine in iOS WK1, it does not do what we want in WebKit2 in the network process. Indeed, before there is no WebThread in the network process, WebThreadRun() will simply run the block on whatever thread we're one. This would lead to crashes when trying to schedule the Timer in updateStateSoon(). To address the issue, we now use callOnMainThread(). * platform/network/ios/NetworkStateNotifierIOS.mm: (WebCore::NetworkStateNotifier::startObserving): 2019-08-23 Ryosuke Niwa REGRESSION (r248807): Objects stored in ElementRareData are leaked https://bugs.webkit.org/show_bug.cgi?id=200954 Reviewed by David Kilzer. NodeRareData didn't have a virtual destructor. As a result, member variables of ElementRareData did not get destructed properly. * dom/NodeRareData.cpp: * dom/NodeRareData.h: (WebCore::NodeRareData::~NodeRareData): 2019-08-23 Wenson Hsieh [iOS] [WebKit2] Tapping on the “I’m” text suggestion after typing “i’” does nothing https://bugs.webkit.org/show_bug.cgi?id=201085 Reviewed by Tim Horton. Exposes an existing quote folding function as a helper on TextIterator, and also adjusts foldQuoteMarks to take a const String& rather than a String. See WebKit ChangeLog for more details. * editing/TextIterator.cpp: (WebCore::foldQuoteMarks): (WebCore::SearchBuffer::SearchBuffer): * editing/TextIterator.h: 2019-08-23 Youenn Fablet Remove IDBDatabaseIdentifier::m_mainFrameOrigin https://bugs.webkit.org/show_bug.cgi?id=201078 Reviewed by Darin Adler. No change of behavior. * Modules/indexeddb/IDBDatabaseIdentifier.h: 2019-08-23 Chris Dumez [geolocation] Rename interfaces and remove [NoInterfaceObject] https://bugs.webkit.org/show_bug.cgi?id=200885 Reviewed by Alex Christensen. Rename Geolocation interfaces and expose them on the global Window object to match the latest specification: - https://w3c.github.io/geolocation-api/#api_description Test: fast/dom/Geolocation/exposed-geolocation-interfaces.html * CMakeLists.txt: * DerivedSources-input.xcfilelist: * DerivedSources-output.xcfilelist: * DerivedSources.make: * Headers.cmake: * Modules/geolocation/GeoNotifier.cpp: (WebCore::GeoNotifier::setFatalError): (WebCore::GeoNotifier::runSuccessCallback): (WebCore::GeoNotifier::runErrorCallback): (WebCore::GeoNotifier::timerFired): * Modules/geolocation/GeoNotifier.h: * Modules/geolocation/Geolocation.cpp: (WebCore::createGeolocationPosition): (WebCore::createGeolocationPositionError): (WebCore::Geolocation::lastPosition): (WebCore::Geolocation::startRequest): (WebCore::Geolocation::requestUsesCachedPosition): (WebCore::Geolocation::makeCachedPositionCallbacks): (WebCore::Geolocation::haveSuitableCachedPosition): (WebCore::Geolocation::setIsAllowed): (WebCore::Geolocation::sendError): (WebCore::Geolocation::sendPosition): (WebCore::Geolocation::cancelRequests): (WebCore::Geolocation::handleError): (WebCore::Geolocation::makeSuccessCallbacks): (WebCore::Geolocation::positionChanged): (WebCore::Geolocation::setError): (WebCore::Geolocation::handlePendingPermissionNotifiers): * Modules/geolocation/Geolocation.h: * Modules/geolocation/Geolocation.idl: * Modules/geolocation/GeolocationClient.h: * Modules/geolocation/GeolocationController.cpp: (WebCore::GeolocationController::positionChanged): (WebCore::GeolocationController::lastPosition): * Modules/geolocation/GeolocationController.h: * Modules/geolocation/GeolocationCoordinates.cpp: Renamed from Source/WebCore/Modules/geolocation/Coordinates.cpp. (WebCore::GeolocationCoordinates::GeolocationCoordinates): * Modules/geolocation/GeolocationCoordinates.h: Renamed from Source/WebCore/Modules/geolocation/Coordinates.h. (WebCore::GeolocationCoordinates::create): (WebCore::GeolocationCoordinates::isolatedCopy const): * Modules/geolocation/GeolocationCoordinates.idl: Renamed from Source/WebCore/Modules/geolocation/Coordinates.idl. * Modules/geolocation/GeolocationPosition.h: (WebCore::GeolocationPosition::create): (WebCore::GeolocationPosition::isolatedCopy const): (WebCore::GeolocationPosition::timestamp const): (WebCore::GeolocationPosition::coords const): (WebCore::GeolocationPosition::GeolocationPosition): * Modules/geolocation/GeolocationPosition.idl: Renamed from Source/WebCore/Modules/geolocation/Geoposition.idl. * Modules/geolocation/GeolocationPositionData.h: Copied from Source/WebCore/Modules/geolocation/GeolocationPosition.h. (WebCore::GeolocationPositionData::GeolocationPositionData): (WebCore::GeolocationPositionData::encode const): (WebCore::GeolocationPositionData::decode): (WebCore::GeolocationPositionData::isValid const): * Modules/geolocation/GeolocationPositionError.h: Renamed from Source/WebCore/Modules/geolocation/PositionError.h. (WebCore::GeolocationPositionError::create): (WebCore::GeolocationPositionError::GeolocationPositionError): * Modules/geolocation/GeolocationPositionError.idl: Renamed from Source/WebCore/Modules/geolocation/PositionError.idl. * Modules/geolocation/Geoposition.h: Removed. * Modules/geolocation/PositionCallback.h: * Modules/geolocation/PositionCallback.idl: * Modules/geolocation/PositionErrorCallback.h: * Modules/geolocation/PositionErrorCallback.idl: * Modules/geolocation/ios/GeolocationPositionDataIOS.mm: Renamed from Source/WebCore/Modules/geolocation/ios/GeolocationPositionIOS.mm. (WebCore::GeolocationPositionData::GeolocationPositionData): * Sources.txt: * WebCore.xcodeproj/project.pbxproj: * platform/mock/GeolocationClientMock.cpp: (WebCore::GeolocationClientMock::setPosition): (WebCore::GeolocationClientMock::lastPosition): * platform/mock/GeolocationClientMock.h: 2019-08-20 Jiewen Tan [WebAuthn] Support NFC authenticators for iOS https://bugs.webkit.org/show_bug.cgi?id=188624 Reviewed by Chris Dumez. Tests: http/wpt/webauthn/ctap-nfc-failure.https.html http/wpt/webauthn/public-key-credential-create-failure-nfc.https.html http/wpt/webauthn/public-key-credential-create-success-nfc.https.html http/wpt/webauthn/public-key-credential-get-failure-nfc.https.html http/wpt/webauthn/public-key-credential-get-success-nfc.https.html * Modules/webauthn/apdu/ApduResponse.h: Adds a new method to support moving m_data. * Modules/webauthn/fido/FidoConstants.h: Adds constants for NFC applet selection. 2019-08-23 Ross Kirsling JSC should have public API for unhandled promise rejections https://bugs.webkit.org/show_bug.cgi?id=197172 Reviewed by Keith Miller. * bindings/js/JSDOMGlobalObject.cpp: (WebCore::JSDOMGlobalObject::promiseRejectionTracker): Move JSInternalPromise early-out to JSC side. 2019-08-23 Kate Cheney Support ITP on a per-session basis (198923) https://bugs.webkit.org/show_bug.cgi?id=198923 Reviewed by Chris Dumez. This patch updated the data structure used to collect resource load statistics in order to support ITP data collection on a per session basis. Each sessionID is stored as a key-value pair with its own map of ResourceLoadStatistics. It also updated the statisticsForURL function call to perform lookups of URL data based on sessionID. * loader/ResourceLoadObserver.cpp: (WebCore::ResourceLoadObserver::setStatisticsUpdatedCallback): (WebCore::ResourceLoadObserver::shouldLog const): (WebCore::ResourceLoadObserver::logSubresourceLoading): (WebCore::ResourceLoadObserver::logWebSocketLoading): (WebCore::ResourceLoadObserver::logUserInteractionWithReducedTimeResolution): (WebCore::ResourceLoadObserver::logFontLoad): (WebCore::ResourceLoadObserver::logCanvasRead): (WebCore::ResourceLoadObserver::logCanvasWriteOrMeasure): (WebCore::ResourceLoadObserver::logNavigatorAPIAccessed): (WebCore::ResourceLoadObserver::logScreenAPIAccessed): (WebCore::ResourceLoadObserver::ensureResourceStatisticsForRegistrableDomain): (WebCore::ResourceLoadObserver::statisticsForURL): (WebCore::ResourceLoadObserver::takeStatistics): (WebCore::ResourceLoadObserver::clearState): * loader/ResourceLoadObserver.h: * testing/Internals.cpp: (WebCore::Internals::resourceLoadStatisticsForURL): 2019-08-23 Simon Fraser Remove unnecessary call to enclosingClippingScopes() https://bugs.webkit.org/show_bug.cgi?id=201063 Reviewed by Zalan Bujtas. This line of code did nothing, and was left in by mistake. Remove it. * rendering/RenderLayerCompositor.cpp: (WebCore::RenderLayerCompositor::updateOverlapMap const): 2019-08-23 Simon Fraser Cache hasCompositedScrollableOverflow as a bit on RenderLayer https://bugs.webkit.org/show_bug.cgi?id=201065 Reviewed by Zalan Bujtas. hasCompositedScrollableOverflow() is pretty hot on some compositing-related code paths, and isn't super cheap, as it checks a Setting and calls into renderer code. Optimize by computing it in computeScrollDimensions(). * rendering/RenderLayer.cpp: (WebCore::RenderLayer::RenderLayer): (WebCore::RenderLayer::hasCompositedScrollableOverflow const): (WebCore::RenderLayer::computeScrollDimensions): * rendering/RenderLayer.h: 2019-08-23 Simon Fraser Don't call clipCrossesPaintingBoundary() when not necessary https://bugs.webkit.org/show_bug.cgi?id=201064 Reviewed by Zalan Bujtas. clipCrossesPaintingBoundary() does some RenderLayer ancestor walks, so avoid calling it when we already know that the clip rects are TemporaryClipRects. * rendering/RenderLayer.cpp: (WebCore::RenderLayer::calculateClipRects const): 2019-08-23 Philippe Normand [GStreamer] Hole-punch build is broken https://bugs.webkit.org/show_bug.cgi?id=200972 Reviewed by Žan Doberšek. This patch fixes link issues when building with USE_GSTREAMER_HOLEPUNCH enabled, the hole punch client destructor was missing. * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp: Remove FAST_ALLOCATED annotation, because: * platform/graphics/texmap/TextureMapperPlatformLayerBuffer.h: it's now in the base class, along with a default destructor. 2019-08-22 Fujii Hironori [SVG] -webkit-clip-path treats url(abc#xyz) as url(#xyz) because it checks only URL fragment part https://bugs.webkit.org/show_bug.cgi?id=201030 Reviewed by Ryosuke Niwa. Tests: svg/clip-path/clip-path-invalid-reference-001-expected.svg svg/clip-path/clip-path-invalid-reference-001.svg svg/clip-path/clip-path-invalid-reference-002-expected.svg svg/clip-path/clip-path-invalid-reference-002.svg * css/StyleBuilderConverter.h: (WebCore::StyleBuilderConverter::convertClipPath): Use SVGURIReference::fragmentIdentifierFromIRIString to get fragment identifier from -webkit-clip-path. 2019-08-22 Andy Estes [watchOS] Disable Content Filtering in the simulator build https://bugs.webkit.org/show_bug.cgi?id=201047 Reviewed by Tim Horton. * Configurations/FeatureDefines.xcconfig: 2019-08-22 Chris Dumez Try to recover nicely when getting an unexpected schema in the service workers database https://bugs.webkit.org/show_bug.cgi?id=201002 Reviewed by Youenn Fablet. Try to recover nicely when getting an unexpected schema in the service workers database instead of crashing the network process. To recover, we delete the database file and re-create it. * workers/service/server/RegistrationDatabase.cpp: (WebCore::RegistrationDatabase::openSQLiteDatabase): (WebCore::RegistrationDatabase::ensureValidRecordsTable): 2019-08-22 Said Abou-Hallawa Crash may happen when an SVG element references the root element https://bugs.webkit.org/show_bug.cgi?id=201014 Reviewed by Ryosuke Niwa. When an references an element as its target image but this element is also one of the ancestors of the , the parent should not be applied. Test: svg/filters/filter-image-ref-root.html * svg/SVGFEImageElement.cpp: (WebCore::SVGFEImageElement::build const): 2019-08-22 Ryosuke Niwa Make ImageBuffer and SVG's FilterData isoheap'ed https://bugs.webkit.org/show_bug.cgi?id=201029 Reviewed by Simon Fraser. Made ImageBuffer and RenderSVGResourceFilter use IsoHeap. * platform/graphics/ImageBuffer.cpp: * platform/graphics/ImageBuffer.h: * rendering/svg/RenderSVGResourceFilter.cpp: * rendering/svg/RenderSVGResourceFilter.h: 2019-08-22 Adrian Perez de Castro [GTK][WPE] Fixes for non-unified builds after r248547 https://bugs.webkit.org/show_bug.cgi?id=201044 Reviewed by Philippe Normand. * platform/audio/AudioResamplerKernel.h: Add missing inclusion of wtf/Noncopyable.h 2019-08-22 Youenn Fablet Make MediaStreamTrackPrivate WeakPtrFactoryInitialization::Eager https://bugs.webkit.org/show_bug.cgi?id=201037 Reviewed by Darin Adler. No change of behavior, replacing m_weakThis by the more convenient Eager. * platform/mediastream/MediaStreamTrackPrivate.cpp: (WebCore::MediaStreamTrackPrivate::audioSamplesAvailable): (WebCore::MediaStreamTrackPrivate::MediaStreamTrackPrivate): Deleted. * platform/mediastream/MediaStreamTrackPrivate.h: 2019-08-17 Darin Adler Use makeString and multi-argument StringBuilder::append instead of less efficient multiple appends https://bugs.webkit.org/show_bug.cgi?id=200862 Reviewed by Ryosuke Niwa. * Modules/indexeddb/shared/IDBDatabaseInfo.cpp: (WebCore::IDBDatabaseInfo::loggingString const): Use one append instead of multiple. * Modules/indexeddb/shared/IDBObjectStoreInfo.cpp: (WebCore::IDBObjectStoreInfo::loggingString const): Ditto. * Modules/mediastream/libwebrtc/LibWebRTCUtils.cpp: (WebCore::toRTCCodecParameters): Ditto. * Modules/plugins/YouTubePluginReplacement.cpp: (WebCore::YouTubePluginReplacement::youTubeURLFromAbsoluteURL): Ditto. * Modules/webdatabase/DatabaseTracker.cpp: (WebCore::generateDatabaseFileName): Ditto. * Modules/websockets/WebSocketExtensionDispatcher.cpp: (WebCore::WebSocketExtensionDispatcher::createHeaderValue const): Ditto. (WebCore::WebSocketExtensionDispatcher::appendAcceptedExtension): Ditto. * Modules/websockets/WebSocketHandshake.cpp: (WebCore::WebSocketHandshake::clientLocation const): Use makeString instead of StringBuilder. * bindings/js/JSDOMExceptionHandling.cpp: (WebCore::appendArgumentMustBe): Use one append instead of multiple. (WebCore::throwArgumentMustBeEnumError): Ditto. (WebCore::throwArgumentTypeError): Ditto. * contentextensions/CombinedURLFilters.cpp: (WebCore::ContentExtensions::recursivePrint): Ditto. * css/CSSBasicShapes.cpp: (WebCore::buildCircleString): Ditto. (WebCore::buildEllipseString): Ditto. (WebCore::buildPolygonString): Ditto. (WebCore::buildInsetString): Ditto. * css/CSSCalculationValue.cpp: (WebCore::buildCssText): Deleted. (WebCore::CSSCalcValue::customCSSText const): Use makeString. * css/CSSComputedStyleDeclaration.cpp: (WebCore::CSSComputedStyleDeclaration::cssText const): Use one append instead of multiple. * css/CSSCrossfadeValue.cpp: (WebCore::CSSCrossfadeValue::customCSSText const): Use makeString. * css/CSSFilterImageValue.cpp: (WebCore::CSSFilterImageValue::customCSSText const): Ditto. * css/CSSFontFaceRule.cpp: (WebCore::CSSFontFaceRule::cssText const): Ditto. * css/CSSFontFaceSrcValue.cpp: (WebCore::CSSFontFaceSrcValue::customCSSText const): Ditto. * css/CSSGradientValue.cpp: (WebCore::appendGradientStops): Moved code here from CSSLinearGradientValue::customCSSText so it can be shared with CSSRadialGradientValue::customCSSText. Use one append per stop. (WebCore::CSSLinearGradientValue::customCSSText const): Use one append instead of multiple. (WebCore::CSSRadialGradientValue::customCSSText const): Ditto. (WebCore::CSSConicGradientValue::customCSSText const): Ditto. * css/CSSMediaRule.cpp: (WebCore::CSSMediaRule::cssText const): Ditto. * css/CSSNamespaceRule.cpp: (WebCore::CSSNamespaceRule::cssText const): Ditto. * css/CSSPageRule.cpp: (WebCore::CSSPageRule::selectorText const): Use makeString. * css/CSSPrimitiveValue.cpp: (WebCore::CSSPrimitiveValue::formatNumberForCustomCSSText const): Use one append instead of multiple. * css/CSSPropertySourceData.cpp: (WebCore::CSSPropertySourceData::CSSPropertySourceData): Initialize in the structure definition instead of the constructor. (WebCore::CSSPropertySourceData::toString const): Use makeString. * css/CSSPropertySourceData.h: Initialize in the structure definition. * css/CSSStyleRule.cpp: (WebCore::CSSStyleRule::cssText const): Use makeString. * css/parser/CSSParser.cpp: (WebCore::CSSParser::parseFontFaceDescriptor): Use makeString. * html/canvas/CanvasRenderingContext2D.cpp: (WebCore::CanvasRenderingContext2D::font const): Use one append instead of multiple. 2019-08-22 Kai Ninomiya Pass conformance/attribs WebGL conformance tests https://bugs.webkit.org/show_bug.cgi?id=200901 Reviewed by Alex Christensen. Tested by LayoutTests/webgl/*/conformance/attribs/gl-vertexattribpointer.html, LayoutTests/webgl/2.0.0/conformance/more/functions/vertexAttribPointerBadArgs.html, and other conformance/attribs/* tests not included in LayoutTests. LayoutTests/webgl/1.0.2/conformance/more/functions/vertexAttribPointerBadArgs.html fails as expected because it is an old snapshot of an incorrect test. * html/canvas/WebGLRenderingContextBase.cpp: (WebCore::WebGLRenderingContextBase::validateVertexAttributes): (WebCore::WebGLRenderingContextBase::vertexAttribPointer): * html/canvas/WebGLVertexArrayObjectBase.cpp: (WebCore::WebGLVertexArrayObjectBase::setVertexAttribState): * html/canvas/WebGLVertexArrayObjectBase.h: 2019-08-22 Wenson Hsieh Typing Korean in title field after typing in the body inserts extraneous characters on blog.naver.com https://bugs.webkit.org/show_bug.cgi?id=201023 Reviewed by Ryosuke Niwa. Ensures that we recognize the blog editor on blog.naver.com to be a hidden editable area. This website places focus inside an editable body element of a subframe that is completely empty (width: 0 and border: 0). See the WebKit ChangeLog for more details. Test: editing/selection/ios/do-not-show-selection-in-empty-borderless-subframe.html * rendering/RenderLayer.cpp: (WebCore::RenderLayer::calculateClipRects const): 2019-08-22 Youenn Fablet CaptureDeviceManager does not need to be CanMakeWeakPtr https://bugs.webkit.org/show_bug.cgi?id=200936 Reviewed by Alex Christensen. CaptureDeviceManager does not need to create a weak pointer in deviceChanged since it directly calls RealtimeMediaSourceCenter singleton. CoreAudioCaptureDeviceManager does not need to create a weak pointer since its only instance is NeverDestroyed. No change of behavior. * platform/mediastream/CaptureDeviceManager.cpp: (WebCore::CaptureDeviceManager::deviceChanged): * platform/mediastream/CaptureDeviceManager.h: * platform/mediastream/mac/CoreAudioCaptureDeviceManager.cpp: (WebCore::createAudioObjectPropertyListenerBlock): (WebCore::CoreAudioCaptureDeviceManager::coreAudioCaptureDevices): (WebCore::CoreAudioCaptureDeviceManager::refreshAudioCaptureDevices): * platform/mediastream/mac/CoreAudioCaptureDeviceManager.h: 2019-08-22 Chris Dumez Fix unsafe usage of MediaStreamTrackPrivate from background thread in MediaStreamTrackPrivate::audioSamplesAvailable() https://bugs.webkit.org/show_bug.cgi?id=200924 Reviewed by Youenn Fablet. MediaStreamTrackPrivate is constructed / destructed on the main thread but its MediaStreamTrackPrivate::audioSamplesAvailable() gets called on a background thread. The audioSamplesAvailable() method may get called until the MediaStreamTrackPrivate destructor unregisters |this| as an observer from m_source. Event though MediaStreamTrackPrivate subclasses ThreadSafeRefCounted, ref'ing |this| on the background thread inside audioSamplesAvailable() is still unsafe as the destructor may already be running on the main thread. * platform/mediastream/MediaStreamTrackPrivate.cpp: (WebCore::MediaStreamTrackPrivate::MediaStreamTrackPrivate): (WebCore::MediaStreamTrackPrivate::~MediaStreamTrackPrivate): (WebCore::MediaStreamTrackPrivate::audioSamplesAvailable): * platform/mediastream/MediaStreamTrackPrivate.h: 2019-08-22 Fujii Hironori Remove the dead code of ScalableImageDecoder for scaling https://bugs.webkit.org/show_bug.cgi?id=200498 Reviewed by Daniel Bates. No ports are using the down scaling feature of ScalableImageDecoder now. Removed it. No behavior change. * platform/image-decoders/ScalableImageDecoder.cpp: (WebCore::ScalableImageDecoder::prepareScaleDataIfNecessary): Deleted. (WebCore::ScalableImageDecoder::upperBoundScaledX): Deleted. (WebCore::ScalableImageDecoder::lowerBoundScaledX): Deleted. (WebCore::ScalableImageDecoder::upperBoundScaledY): Deleted. (WebCore::ScalableImageDecoder::lowerBoundScaledY): Deleted. (WebCore::ScalableImageDecoder::scaledY): Deleted. * platform/image-decoders/ScalableImageDecoder.h: (WebCore::ScalableImageDecoder::scaledSize): Deleted. * platform/image-decoders/gif/GIFImageDecoder.cpp: (WebCore::GIFImageDecoder::setSize): (WebCore::GIFImageDecoder::findFirstRequiredFrameToDecode): (WebCore::GIFImageDecoder::haveDecodedRow): (WebCore::GIFImageDecoder::frameComplete): (WebCore::GIFImageDecoder::initFrameBuffer): * platform/image-decoders/jpeg/JPEGImageDecoder.cpp: (WebCore::JPEGImageDecoder::outputScanlines): (WebCore::JPEGImageDecoder::setSize): Deleted. * platform/image-decoders/jpeg/JPEGImageDecoder.h: * platform/image-decoders/jpeg2000/JPEG2000ImageDecoder.cpp: (WebCore::JPEG2000ImageDecoder::decode): * platform/image-decoders/png/PNGImageDecoder.cpp: (WebCore::PNGImageDecoder::rowAvailable): (WebCore::PNGImageDecoder::initFrameBuffer): (WebCore::PNGImageDecoder::frameComplete): (WebCore::PNGImageDecoder::setSize): Deleted. * platform/image-decoders/png/PNGImageDecoder.h: 2019-08-21 Jer Noble Unreviewed build fix; add a 'final' declaration on shouldOverridePauseDuringRouteChange(). * Modules/mediastream/MediaStream.h: 2019-08-21 Saam Barati [WHLSL] Improve default constructor and emit fewer pointers in metal codegen https://bugs.webkit.org/show_bug.cgi?id=200995 Reviewed by Myles C. Maxfield. This patch makes it so that we: 1. Emit less code for copy constructors by omitting an unused variable. 2. Emit ternary expressions instead of if statements for conditional assignments. 3. Don't copy pointers for producing an lvalue from DereferenceExpression. 4. Lazily produce lvalues for GlobalVariableReference. * Modules/webgpu/WHLSL/Metal/WHLSLFunctionWriter.cpp: (WebCore::WHLSL::Metal::FunctionDefinitionWriter::visit): * Modules/webgpu/WHLSL/Metal/WHLSLNativeFunctionWriter.cpp: (WebCore::WHLSL::Metal::inlineNativeFunction): 2019-08-21 Myles C. Maxfield [WHLSL] Vertex shader and fragment shader need to be able to come from two different programs https://bugs.webkit.org/show_bug.cgi?id=195446 Reviewed by Saam Barati. When an author configures WebGPU to render things, the author provides a vertex shader and a fragment shader, and they both execute within the same draw call. It's common for authors coming from WebGL to put the two shaders in distinct files. Until this patch, WHLSL was unable to process two shaders from different sources which were meant to be hooked together. The first thing this patch does is add the notion of a "shader module" to the WHLSL compiler. This represents the source code containing one or more shaders. When the author wants to actually compile their source, they supply one or more shader modules to the compiler. The compiler then looks in the first module for the vertex shader and the second module for the fragment shader. The two modules are passed by reference, so they may refer to the same underlying object, which is supported. Shader modules have this interesting behavior where, within a shader module, funtion / type names may refer to each other, but may not refer to any other name within any other shader module. They behave as if all the names inside the module are not exported. So, it would seem that the most natural way to support this would be to run the WHLSL compiler and the MSL compiler twice independently, once for each module. However, this means that our compile times would double, which would be unfortunate. Instead, a more performant option would be to make the WHLSL compiler smart enough to handle multiple shader modules at once, and to produce a single merged output program that contains everything. It does this by parsing all the shader modules into a single Program object, but remembering which items in the Program came from which places. This is implemented by teaching the WHLSL compiler about "namespaces." There are three namespaces: one for each shader module, and an additional one for the standard library. Every global object (e.g. named types and functions) knows which namespace it lives inside. The NameResolver has been educated to understand namespaces, so when you ask it for a name in a particular namespace, it will look up all the names both in that namespace and in the standard library's namespace, and it will union the results together. Function overload resolution doesn't actually go through the name resolver; instead, it's handled by sorting all functions into buckets such that any CallExpression only has to look in a single bucket to find all its potential overloads. These buckets can't be educated about namespaces (consider a function which has overloads in all 3 namespaces that is called from both shader modules - all the overloads must end up in the same bucket). Therefore, this logic is moved into resolveFunctionOverload(), which will now disregard candidate functions if they are in an inaccessible namespace. Tests: webgpu/whlsl/separate-shader-modules/separate-shader-modules-10.html webgpu/whlsl/separate-shader-modules/separate-shader-modules-11.html webgpu/whlsl/separate-shader-modules/separate-shader-modules-12.html webgpu/whlsl/separate-shader-modules/separate-shader-modules-13.html webgpu/whlsl/separate-shader-modules/separate-shader-modules-14.html webgpu/whlsl/separate-shader-modules/separate-shader-modules-15.html webgpu/whlsl/separate-shader-modules/separate-shader-modules-16.html webgpu/whlsl/separate-shader-modules/separate-shader-modules-17.html webgpu/whlsl/separate-shader-modules/separate-shader-modules-18.html webgpu/whlsl/separate-shader-modules/separate-shader-modules-19.html webgpu/whlsl/separate-shader-modules/separate-shader-modules-2.html webgpu/whlsl/separate-shader-modules/separate-shader-modules-20.html webgpu/whlsl/separate-shader-modules/separate-shader-modules-21.html webgpu/whlsl/separate-shader-modules/separate-shader-modules-22.html webgpu/whlsl/separate-shader-modules/separate-shader-modules-23.html webgpu/whlsl/separate-shader-modules/separate-shader-modules-24.html webgpu/whlsl/separate-shader-modules/separate-shader-modules-25.html webgpu/whlsl/separate-shader-modules/separate-shader-modules-26.html webgpu/whlsl/separate-shader-modules/separate-shader-modules-27.html webgpu/whlsl/separate-shader-modules/separate-shader-modules-3.html webgpu/whlsl/separate-shader-modules/separate-shader-modules-4.html webgpu/whlsl/separate-shader-modules/separate-shader-modules-5.html webgpu/whlsl/separate-shader-modules/separate-shader-modules-6.html webgpu/whlsl/separate-shader-modules/separate-shader-modules-7.html webgpu/whlsl/separate-shader-modules/separate-shader-modules-8.html webgpu/whlsl/separate-shader-modules/separate-shader-modules-9.html webgpu/whlsl/separate-shader-modules/separate-shader-modules.html * Modules/webgpu/WHLSL/AST/WHLSLFunctionDeclaration.h: (WebCore::WHLSL::AST::FunctionDeclaration::nameSpace const): (WebCore::WHLSL::AST::FunctionDeclaration::setNameSpace): * Modules/webgpu/WHLSL/AST/WHLSLNameSpace.h: Copied from Source/WebCore/Modules/webgpu/WHLSL/WHLSLStandardLibraryUtilities.h. * Modules/webgpu/WHLSL/AST/WHLSLNamedType.h: (WebCore::WHLSL::AST::NamedType::nameSpace const): (WebCore::WHLSL::AST::NamedType::setNameSpace): * Modules/webgpu/WHLSL/Metal/WHLSLFunctionWriter.cpp: (WebCore::WHLSL::Metal::emitMetalFunctions): * Modules/webgpu/WHLSL/WHLSLCheckDuplicateFunctions.cpp: (WebCore::WHLSL::DuplicateFunctionKey::operator== const): * Modules/webgpu/WHLSL/WHLSLChecker.cpp: (WebCore::WHLSL::FunctionKey::operator== const): (WebCore::WHLSL::checkOperatorOverload): (WebCore::WHLSL::Checker::checkShaderType): (WebCore::WHLSL::Checker::visit): (WebCore::WHLSL::Checker::resolveFunction): * Modules/webgpu/WHLSL/WHLSLLexer.cpp: * Modules/webgpu/WHLSL/WHLSLNameContext.cpp: (WebCore::WHLSL::NameContext::add): (WebCore::WHLSL::NameContext::getTypes): (WebCore::WHLSL::NameContext::getFunctions): (WebCore::WHLSL::NameContext::searchTypes const): (WebCore::WHLSL::NameContext::searchFunctions const): (WebCore::WHLSL::NameContext::globalExists const): (WebCore::WHLSL::NameContext::localExists const): (WebCore::WHLSL::NameContext::exists): Deleted. * Modules/webgpu/WHLSL/WHLSLNameContext.h: (WebCore::WHLSL::NameContext::setCurrentNameSpace): * Modules/webgpu/WHLSL/WHLSLNameResolver.cpp: (WebCore::WHLSL::NameResolver::NameResolver): (WebCore::WHLSL::NameResolver::visit): (WebCore::WHLSL::resolveNamesInTypes): (WebCore::WHLSL::resolveTypeNamesInFunctions): * Modules/webgpu/WHLSL/WHLSLNameResolver.h: (WebCore::WHLSL::NameResolver::setCurrentNameSpace): * Modules/webgpu/WHLSL/WHLSLParser.cpp: (WebCore::WHLSL::Parser::parse): (WebCore::WHLSL::Parser::fail): (WebCore::WHLSL::Parser::consumeIntegralLiteral): (WebCore::WHLSL::Parser::consumeNonNegativeIntegralLiteral): (WebCore::WHLSL::Parser::parseConstantExpression): (WebCore::WHLSL::Parser::parseTypeSuffixAbbreviated): (WebCore::WHLSL::Parser::parseTypeSuffixNonAbbreviated): (WebCore::WHLSL::Parser::parseBuiltInSemantic): (WebCore::WHLSL::Parser::parseResourceSemantic): (WebCore::WHLSL::Parser::parseStageInOutSemantic): (WebCore::WHLSL::Parser::parseEnumerationDefinition): (WebCore::WHLSL::Parser::parseEnumerationMember): (WebCore::WHLSL::Parser::parseNumThreadsFunctionAttribute): (WebCore::WHLSL::Parser::parseVertexOrFragmentFunctionDeclaration): (WebCore::WHLSL::Parser::parseRegularFunctionDeclaration): (WebCore::WHLSL::Parser::parseSwitchCase): (WebCore::WHLSL::Parser::parseForLoop): (WebCore::WHLSL::Parser::parseVariableDeclarations): (WebCore::WHLSL::Parser::completeAssignment): (WebCore::WHLSL::Parser::parsePossibleTernaryConditional): (WebCore::WHLSL::Parser::parseTerm): * Modules/webgpu/WHLSL/WHLSLPrepare.cpp: (WebCore::WHLSL::ShaderModule::ShaderModule): (WebCore::WHLSL::createShaderModule): (WebCore::WHLSL::ShaderModuleDeleter::operator()): (WebCore::WHLSL::prepareShared): (WebCore::WHLSL::prepare): * Modules/webgpu/WHLSL/WHLSLPrepare.h: * Modules/webgpu/WHLSL/WHLSLProgram.h: (WebCore::WHLSL::Program::append): * Modules/webgpu/WHLSL/WHLSLResolveOverloadImpl.cpp: (WebCore::WHLSL::resolveFunctionOverloadImpl): (WebCore::WHLSL::resolveFunctionOverload): * Modules/webgpu/WHLSL/WHLSLResolveOverloadImpl.h: * Modules/webgpu/WHLSL/WHLSLSemanticMatcher.cpp: (WebCore::WHLSL::matchSemantics): (WebCore::WHLSL::findEntryPoint): Deleted. * Modules/webgpu/WHLSL/WHLSLSemanticMatcher.h: * Modules/webgpu/WHLSL/WHLSLStandardLibraryUtilities.cpp: (WebCore::WHLSL::includeStandardLibrary): * Modules/webgpu/WHLSL/WHLSLStandardLibraryUtilities.h: * WebCore.xcodeproj/project.pbxproj: * platform/graphics/gpu/GPUShaderModule.h: (WebCore::GPUShaderModule::platformShaderModule const): (WebCore::GPUShaderModule::whlslModule const): (WebCore::GPUShaderModule::whlslSource const): Deleted. * platform/graphics/gpu/cocoa/GPUComputePipelineMetal.mm: (WebCore::trySetFunctions): (WebCore::convertComputePipelineDescriptor): * platform/graphics/gpu/cocoa/GPURenderPipelineMetal.mm: (WebCore::trySetMetalFunctions): (WebCore::trySetFunctions): (WebCore::convertRenderPipelineDescriptor): * platform/graphics/gpu/cocoa/GPUShaderModuleMetal.mm: (WebCore::GPUShaderModule::tryCreate): (WebCore::GPUShaderModule::GPUShaderModule): 2019-08-21 Ryosuke Niwa SVG element should become focusable when focus and key event listeners are added https://bugs.webkit.org/show_bug.cgi?id=200997 Reviewed by Said Abou-Hallawa. This patch removes the odd behavior WebKit (and Blink) browsers had to make SVG elements with key or focus event listeners focusable. New behavior matches the behavior of Firefox as well as the SVG 2.0 specification: https://www.w3.org/TR/SVG2/interact.html#Focus Test: svg/custom/tabindex-order.html * svg/SVGAElement.cpp: (WebCore::SVGAElement::supportsFocus const): * svg/SVGElement.cpp: (WebCore::SVGElement::hasFocusEventListeners const): Deleted. (WebCore::SVGElement::isMouseFocusable const): Deleted. * svg/SVGElement.h: * svg/SVGGraphicsElement.h: 2019-08-21 Jer Noble Adopt AVSystemController_ActiveAudioRouteDidChangeNotification https://bugs.webkit.org/show_bug.cgi?id=200992 Reviewed by Eric Carlson. Follow-up to r248962: When the active audio route changes, and the system instructs us to pause, only pause the currently audible sessions. * platform/audio/ios/MediaSessionManagerIOS.h: * platform/audio/ios/MediaSessionManagerIOS.mm: (WebCore::MediaSessionManageriOS::activeAudioRouteDidChange): (-[WebMediaSessionHelper activeAudioRouteDidChange:]): (WebCore::MediaSessionManageriOS::activeRouteDidChange): Deleted. 2019-08-21 Megan Gardner Do not adjust viewport if editing selection is already visible https://bugs.webkit.org/show_bug.cgi?id=200907 Reviewed by Simon Fraser. Test: fast/scrolling/ios/autoscroll-input-when-very-zoomed.html Currently due to scrolling being mostly handled by integers, we are getting issues with rounding errors when trying to adjust the viewport while editing text when we are significantly zoomed in. The real fix would be to start dealing with scrolling with floats/doubles, but until such time, we should early out of adjusting selections that we are certain are currently visible. * rendering/RenderLayer.cpp: (WebCore::RenderLayer::scrollRectToVisible): 2019-08-21 Tim Horton [Mail] Tapping top of message scrolls back to copied text instead of top of the message https://bugs.webkit.org/show_bug.cgi?id=200999 Reviewed by Wenson Hsieh. Test: editing/selection/ios/change-selection-by-tapping-with-existing-selection.html * page/EditorClient.h: (WebCore::EditorClient::shouldAllowSingleClickToChangeSelection const): * page/EventHandler.cpp: (WebCore::EventHandler::handleMousePressEventSingleClick): Instead of encoding platform behaviors in EventHandler, defer to EditorClient. 2019-08-21 Chris Dumez Crash under StringImpl::endsWith() in SQLiteIDBBackingStore::fullDatabaseDirectoryWithUpgrade() https://bugs.webkit.org/show_bug.cgi?id=200990 Reviewed by Alex Christensen. Make sure we call isolatedCopy() on SQLiteIDBBackingStore::m_databaseRootDirectory before using it from background threads. * Modules/indexeddb/server/SQLiteIDBBackingStore.cpp: (WebCore::IDBServer::SQLiteIDBBackingStore::fullDatabaseDirectoryWithUpgrade): (WebCore::IDBServer::SQLiteIDBBackingStore::databasesSizeForOrigin const): (WebCore::IDBServer::SQLiteIDBBackingStore::deleteBackingStore): * Modules/indexeddb/server/SQLiteIDBBackingStore.h: (WebCore::IDBServer::SQLiteIDBBackingStore::databaseRootDirectory const): 2019-08-21 Chris Dumez Crash under StringImpl::~StringImpl() in IDBServer::computeSpaceUsedForOrigin() https://bugs.webkit.org/show_bug.cgi?id=200989 Reviewed by Alex Christensen. Make sure we call isolatedCopy() on IDBServer::m_databaseDirectoryPath before using it from background threads. * Modules/indexeddb/server/IDBServer.cpp: (WebCore::IDBServer::IDBServer::createBackingStore): (WebCore::IDBServer::IDBServer::performGetAllDatabaseNames): (WebCore::IDBServer::IDBServer::removeDatabasesModifiedSinceForVersion): (WebCore::IDBServer::IDBServer::performCloseAndDeleteDatabasesModifiedSince): (WebCore::IDBServer::IDBServer::removeDatabasesWithOriginsForVersion): (WebCore::IDBServer::IDBServer::performCloseAndDeleteDatabasesForOrigins): (WebCore::IDBServer::IDBServer::computeSpaceUsedForOrigin): (WebCore::IDBServer::IDBServer::upgradeFilesIfNecessary): * Modules/indexeddb/server/IDBServer.h: (WebCore::IDBServer::IDBServer::databaseDirectoryPath const): 2019-08-21 Chris Dumez Crash under StringImpl::endsWith() in RegistrationDatabase::openSQLiteDatabase() https://bugs.webkit.org/show_bug.cgi?id=200991 Reviewed by Geoffrey Garen. Make sure we call isolatedCopy() on RegistrationDatabase::m_databaseDirectory before using it from background threads. * workers/service/server/RegistrationDatabase.cpp: (WebCore::RegistrationDatabase::openSQLiteDatabase): (WebCore::RegistrationDatabase::clearAll): * workers/service/server/RegistrationDatabase.h: (WebCore::RegistrationDatabase::databaseDirectory const): 2019-08-21 Alex Christensen Disabling text autosizing should prevent text autosizing https://bugs.webkit.org/show_bug.cgi?id=200955 Reviewed by Simon Fraser. Before this change there was no way to reliably change the text size on iOS when a -webkit-text-size-adjust:none style was applied because it would ignore the WKPreferences value for _textAutosizingEnabled. Now that value has the desired effect when laying out. * css/StyleResolver.cpp: (WebCore::StyleResolver::checkForTextSizeAdjust): 2019-08-21 Jer Noble Adopt AVSystemController_ActiveAudioRouteDidChangeNotification https://bugs.webkit.org/show_bug.cgi?id=200992 Reviewed by Eric Carlson. When the system notifies us that the active audio route has changed in such a way that necessitates pausing, pause all media sessions, exempting those that are associated with WebRTC, since "pausing" an active audio conference isn't really possible. * Modules/mediastream/MediaStream.h: * platform/audio/PlatformMediaSession.cpp: (WebCore::PlatformMediaSession::shouldOverridePauseDuringRouteChange const): * platform/audio/PlatformMediaSession.h: (WebCore::PlatformMediaSessionClient::shouldOverridePauseDuringRouteChange const): * platform/audio/ios/MediaSessionManagerIOS.h: * platform/audio/ios/MediaSessionManagerIOS.mm: (WebCore::MediaSessionManageriOS::activeRouteDidChange): (-[WebMediaSessionHelper initWithCallback:]): (-[WebMediaSessionHelper activeAudioRouteDidChange:]): 2019-08-21 Ryosuke Niwa Put keygen element behind a runtime flag and disable it by default https://bugs.webkit.org/show_bug.cgi?id=200850 Reviewed by Antti Koivisto. The HTML keygen element has been removed from Chrome, Firefox, and the HTML specification in 2017. This patch disables the keygen element by default by adding a runtime enabled flag which is disabled by default. * bindings/js/WebCoreBuiltinNames.h: * html/HTMLKeygenElement.idl: * html/HTMLTagNames.in: * page/RuntimeEnabledFeatures.h: (WebCore::RuntimeEnabledFeatures::setKeygenElementEnabled): (WebCore::RuntimeEnabledFeatures::keygenElementEnabled const): 2019-08-21 Chris Dumez Get rid of m_weakThis data members now that we have a safe way to call makeWeakPtr() from various threads https://bugs.webkit.org/show_bug.cgi?id=200981 Reviewed by Alex Christensen. * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp: (WebCore::MediaPlayerPrivateAVFoundation::MediaPlayerPrivateAVFoundation): (WebCore::MediaPlayerPrivateAVFoundation::scheduleMainThreadNotification): (WebCore::MediaPlayerPrivateAVFoundation::dispatchNotification): * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h: * platform/mediastream/libwebrtc/LibWebRTCDTMFSenderBackend.cpp: (WebCore::LibWebRTCDTMFSenderBackend::LibWebRTCDTMFSenderBackend): (WebCore::LibWebRTCDTMFSenderBackend::OnToneChange): * platform/mediastream/libwebrtc/LibWebRTCDTMFSenderBackend.h: * platform/network/cocoa/CookieStorageObserver.h: * platform/network/cocoa/CookieStorageObserver.mm: (WebCore::CookieStorageObserver::CookieStorageObserver): (WebCore::CookieStorageObserver::cookiesDidChange): 2019-08-21 Chris Dumez Add internal setting to disable SecureContext checks https://bugs.webkit.org/show_bug.cgi?id=200980 Reviewed by Alex Christensen. Add internal setting to disable SecureContext checks, in order to facilitate development for features like Service workers or device orientation / motion. * dom/Document.cpp: (WebCore::Document::isSecureContext const): * page/RuntimeEnabledFeatures.h: (WebCore::RuntimeEnabledFeatures::secureContextChecksEnabled const): (WebCore::RuntimeEnabledFeatures::setSecureContextChecksEnabled): * workers/WorkerGlobalScope.cpp: (WebCore::WorkerGlobalScope::isSecureContext const): 2019-08-21 Jer Noble [iOS] HLS streams disappear from Now Playing when paused on the lock screen https://bugs.webkit.org/show_bug.cgi?id=200951 Reviewed by Eric Carlson. The AVPlayerItemTracks will get recreated on occasion (during seeks, and when changing buffering policy) which can result in a player which no longer reports that it has audio, which in turn results in Now Playing no longer considering the web page to be an eligable now playing application. Bridge this gap by also taking AVPlayerItem.hasEnabledAudio into account when determining whether the player has audio. * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm: (WebCore::MediaPlayerPrivateAVFoundationObjC::tracksChanged): 2019-08-21 Adrian Perez de Castro [GStreamer] Clang warns about mismatched type tag in declarations for ImageOrientation https://bugs.webkit.org/show_bug.cgi?id=200982 Reviewed by Carlos Alberto Lopez Perez. No new tests needed. * platform/graphics/gstreamer/VideoTextureCopierGStreamer.h: Change type tag in the forward declaration to "struct", hence matching the actual type definition. 2019-08-21 Antti Koivisto ASSERTION FAILED: !s_isInvalidatingStyleWithRuleSets in com.apple.WebCore: WebCore::DocumentRuleSets::collectFeatures const https://bugs.webkit.org/show_bug.cgi?id=200919 Reviewed by Zalan Bujtas. Bots show that in some timing-dependent cases we may end up constructing a style resolver in the middle the class change invalidation. This happens flakily on Pad bots in media/track/track-node-add-remove.html media/W3C/video/events/event_loadstart_manual.html media/W3C/video/readyState/readyState_initial.html and also reproes locally with lots of runs over these tests. * style/StyleInvalidationFunctions.h: (WebCore::Style::traverseRuleFeatures): Ensure that for elements in shadow tree the host resolver is also always constructed before starting rule-based invalidation. 2019-08-21 Antoine Quint REGRESSION: naver.com - Multiple taps are required to open email https://bugs.webkit.org/show_bug.cgi?id=200979 Reviewed by Dean Jackson. The "click" events on subjects in the message list are prevented by preventDefault() being called from a "mouseup" event listener. This shouldn't actually happen, but due to how simulated mouse events are implemented, there is no current distinction between "touchend" and "mouseup" events. It is safe however to opt mail.naver.com out of simulated mouse events altogether. * page/Quirks.cpp: (WebCore::Quirks::shouldDispatchSimulatedMouseEvents const): 2019-08-21 Devin Rousso Web Inspector: Page: re-add enable/disable after r248454 https://bugs.webkit.org/show_bug.cgi?id=200947 Reviewed by Joseph Pecoraro. We shouldn't design the agent system with only Web Inspector in mind. Other clients may want to have different functionality, not being told about frames creation/updates/destruction. In these cases, we should have graceful error message failures for other agents that rely on the Page agent. * inspector/agents/InspectorPageAgent.h: * inspector/agents/InspectorPageAgent.cpp: (WebCore::InspectorPageAgent::didCreateFrontendAndBackend): (WebCore::InspectorPageAgent::willDestroyFrontendAndBackend): (WebCore::InspectorPageAgent::enable): Added. (WebCore::InspectorPageAgent::disable): Added. * inspector/agents/InspectorApplicationCacheAgent.cpp: (WebCore::InspectorApplicationCacheAgent::updateApplicationCacheStatus): (WebCore::InspectorApplicationCacheAgent::getFramesWithManifests): (WebCore::InspectorApplicationCacheAgent::assertFrameWithDocumentLoader): * inspector/agents/InspectorCSSAgent.cpp: (WebCore::InspectorCSSAgent::createStyleSheet): * inspector/agents/InspectorDOMAgent.cpp: (WebCore::InspectorDOMAgent::highlightSelector): (WebCore::InspectorDOMAgent::highlightFrame): (WebCore::InspectorDOMAgent::buildObjectForNode): * inspector/agents/InspectorTimelineAgent.cpp: (WebCore::InspectorTimelineAgent::setFrameIdentifier): * inspector/agents/page/PageNetworkAgent.cpp: (WebCore::PageNetworkAgent::loaderIdentifier): (WebCore::PageNetworkAgent::frameIdentifier): (WebCore::PageNetworkAgent::scriptExecutionContext): * inspector/agents/page/PageRuntimeAgent.cpp: (WebCore::PageRuntimeAgent::didCreateMainWorldContext): (WebCore::PageRuntimeAgent::reportExecutionContextCreation): 2019-08-20 Ryosuke Niwa nextElementWithGreaterTabIndex should use shadowAdjustedTabIndex https://bugs.webkit.org/show_bug.cgi?id=200943 Reviewed by Wenson Hsieh. Use shadowAdjustedTabIndex instead of tabIndexForElement in nextElementWithGreaterTabIndex. Because nextElementWithGreaterTabIndex is only called to find an element with a tab index set to a greater value than the argument tabIndex, which is always a positive integer, whether we call shadowAdjustedTabIndex or tabIndexForElement has no effect on an element with a shadow root or on a slot element. Furthermore, none of the elements with an isKeyboardFocusable override can have a author defined shadow root attached either. As a result, this refactoring will have no observable behavioral change. No new tests since there should be no observable behavior change. * page/FocusController.cpp: (WebCore::tabIndexForElement): Merged into shadowAdjustedTabIndex. (WebCore::shadowAdjustedTabIndex): (WebCore::nextElementWithGreaterTabIndex): 2019-08-20 Ryosuke Niwa Remove MathMLElement::defaultTabIndex() https://bugs.webkit.org/show_bug.cgi?id=200944 Reviewed by Frédéric Wang. Removed MathMLElement::defaultTabIndex since it doesn't have any observable effect since MathMLElement doesn't expose tabIndex IDL attribute, and sequential (tab key) focus navigation checks MathMLElement::isKeyboardFocusable, which doesn't rely on defaultTabIndex, anyway. * mathml/MathMLElement.cpp: (WebCore::MathMLElement::defaultTabIndex const): Deleted. * mathml/MathMLElement.h: 2019-08-20 Devin Rousso Web Inspector: Implement `queryHolders` Command Line API https://bugs.webkit.org/show_bug.cgi?id=200458 Reviewed by Joseph Pecoraro. Call `queryHolders(object)` from the Console to return an array of objects that strongly reference the given `object`. This could be very useful for finding JavaScript "leaks". Test: inspector/console/queryHolders.html * inspector/CommandLineAPIModuleSource.js: (CommandLineAPIImpl.prototype.queryHolders): Added. * bindings/scripts/CodeGeneratorJS.pm: (GenerateHeader): (GenerateImplementation): * bindings/js/DOMGCOutputConstraint.cpp: * bindings/js/JSDOMWindowCustom.cpp: (WebCore::JSDOMWindow::analyzeHeap): Added. (WebCore::JSDOMWindow::heapSnapshot): Deleted. * bindings/js/JSDocumentCustom.cpp: (WebCore::JSDocument::analyzeHeap): Added. (WebCore::JSDocument::heapSnapshot): Deleted. * bindings/scripts/test/JS/*: Rename `heapSnapshot` to `analyzeHeap` to match JavaScriptCore changes. 2019-08-20 Saam Barati [WHLSL] We need to null check when emitting native code for operator&. https://bugs.webkit.org/show_bug.cgi?id=200846 Reviewed by Myles C. Maxfield. Test: webgpu/whlsl/structure-field-access-on-null.html * Modules/webgpu/WHLSL/Metal/WHLSLNativeFunctionWriter.cpp: (WebCore::WHLSL::Metal::inlineNativeFunction): 2019-08-20 Justin Fan Unreviewed comment follow-up for https://bugs.webkit.org/show_bug.cgi?id=200752. * html/canvas/GPUBasedCanvasRenderingContext.h: 2019-08-16 Ryosuke Niwa The default tab index of output and fieldset should be -1 https://bugs.webkit.org/show_bug.cgi?id=200834 Reviewed by Alex Christensen. This patch updates the default tab index of output and fieldset to -1 to match the behavior of Chrome and Firefox as well as the latest HTML specification: https://html.spec.whatwg.org/multipage/interaction.html#the-tabindex-attribute To do that, this patch replaces HTMLFormControlElement::defaultTabIndex with defaultTabIndex implementation in each one of its concrete subclass such as HTMLButtonElement to mirror the language of the specification as follows: HTMLFormControlElement HTMLButtonElement -> 0 HTMLFieldSetElement -> -1 HTMLFormControlElementWithState HTMLKeygenElement -> 0 - Not specified anywhere but preserving the existing behavior. HTMLSelectElement -> 0 HTMLTextFormControlElement HTMLInputElement -> 0 HTMLTextAreaElement -> 0 HTMLOutputElement -> -1 Even though Element::shouldBeIgnoredInSequentialFocusNavigation() checks the value of defaultTabIndex, this patch does not affect the actual sequential (tab) focus navigation: Beacuse HTMLOutputElement and HTMLFieldSetElement have supportsFocus overrides to call HTMLElement::supportsFocus instead of HTMLFormControlElement::supportsFocus, these two elements are focusable only when tabindex is set or it's a root content editable element. But all root editable elements are focusable anyway and the default tab index does not matter when tabindex is set. Test: fast/dom/tabindex-defaults.html * html/HTMLButtonElement.cpp: (WebCore::HTMLButtonElement::defaultTabIndex const): Added. * html/HTMLButtonElement.h: * html/HTMLFormControlElement.cpp: (WebCore::HTMLFormControlElement::defaultTabIndex const): Deleted. * html/HTMLFormControlElement.h: * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::defaultTabIndex const): Added. * html/HTMLKeygenElement.h: * html/HTMLKeygenElement.cpp: (WebCore::HTMLKeygenElement::defaultTabIndex const): Added. * html/HTMLKeygenElement.h: * html/HTMLSelectElement.cpp: (WebCore::HTMLSelectElement::defaultTabIndex const): Added. * html/HTMLSelectElement.h: * html/HTMLTextAreaElement.cpp: (WebCore::HTMLTextAreaElement::defaultTabIndex const): Added. * html/HTMLTextAreaElement.h: 2019-08-20 Zalan Bujtas [ContentChangeObserver] isConsideredClickable should be able to process elements with no renderers https://bugs.webkit.org/show_bug.cgi?id=200926 Reviewed by Simon Fraser. This patch fixes the crash when the visible->hidden change triggers an isConsideredClickable() call with a 'display: none' element. Test: fast/events/touch/ios/content-observation/going-from-hidden-to-visible-and-to-hidden-crash.html * page/ios/ContentChangeObserver.cpp: (WebCore::isConsideredClickable): 2019-08-20 Wenson Hsieh Clicking the search icon on ae.com hangs the web content process https://bugs.webkit.org/show_bug.cgi?id=200889 Reviewed by Ryosuke Niwa. The hang occurs under FrameSelection::selectionAtSentenceStart, while computing an EditorState to send to the UI process. This act of determining whether the given positon is at the start of sentence entails moving backwards from the start of the current visible selection until the start of a paragraph or sentence is found, using VisiblePosition::previous to iterate backwards through VisiblePositions. However, on this website, VisiblePosition::previous ends up just returning the current position, and we loop infinitely as a result because we never actually move backwards. This happens because VisiblePosition::previous first uses previousVisuallyDistinctCandidate to find a candidate Position before the current position, but when the position is canonicalized to create a VisiblePosition, it is moved back to its original Position as the deep equivalent. In the attached test case (which is representative of the relevant part of the DOM on ae.com), we try to find the previous VisiblePosition from (#c, 0). The previous visually distinct candidate we initially find is (#b, 0), since: 1. The enclosing renderer is a RenderBlock with a non-zero height. 2. The enclosing renderer has no rendered children. 3. The position is at the first editing position in the node (i.e. the span element). However, when canonicalizing the position, we find that neither the upstream nor the downstream position is a candidate because both the upstream and downstream nodes end up well outside of the span (the upstream node ends up being at the start of the body element, and the downstream position ends up right before the start of #c's container). The downstream position is at the end of a text node with a leading newline, it's not a candidate because its last caret offset is less than the length of the text node. As a result, even though the given position (#b, 0) is a candidate itself, its downstream and upstream positions are not. Thus, VisiblePosition::canonicalPosition expands the scope of its candidate positions to the next closest candidate positions; the next candidate position is (#c, 0). Both of these candidates are outside of the containing block, so we (somewhat arbitrarily) break the tie by choosing the next visible position, bringing us back to (#c, 0). There are several ways to fix this, one of which involves fixing the downstream/upstream positions of (#b, 0) so that they no longer jump out of the containing block of #b and cause (#b, 0) to be an invalid visible position despite being a candidate position. This can be achieved by adjusting the heuristic in endsOfNodeAreVisuallyDistinctPositions (used when moving upstream or downstream). Currently, this helper function returns false for #b because they contain a single (non-rendered) whitespace character. Removing this extraneous whitespace character actually causes the problem to stop reproducing, since #b and #c no longer contain any child nodes. This is important because the heuristic in Position::downstream attempts to keep the downstream position within the confines of the enclosing visual boundary, which (currently) ends up being the entire body element because endsOfNodeAreVisuallyDistinctPositions returns false for #b. To avoid this scenario, we teach endsOfNodeAreVisuallyDistinctPositions to treat inline-block containers that are empty (that is, contain no rendered content) but may have children for editing in the same way as inline- block containers that don't have any children; in both scenarios, they may contain a candidate position, so we should treat the ends of the container node as being visually distinct. Doing so causes the downstream position of (#b, 0) to be kept within the immediate containing span element, which then allows (#b, 0) to be a canonical VisiblePosition. Tests: fast/events/focus-anchor-with-tabindex-hang.html editing/selection/modify-backward-inline-block-containers.html * editing/VisiblePosition.cpp: (WebCore::VisiblePosition::previous const): 2019-08-20 Brent Fulgham [FTW] Fix scrolling in modern WebKit views https://bugs.webkit.org/show_bug.cgi?id=200923 Reviewed by Don Olmstead. The initial implementation of scrolling in Direct2D had errors that caused hilarious rendering glitches. This patch corrects the logic so that page scroll is correct. * platform/graphics/win/BackingStoreBackendDirect2D.h: * platform/graphics/win/BackingStoreBackendDirect2DImpl.cpp: (WebCore::BackingStoreBackendDirect2DImpl::scroll): (WebCore::BackingStoreBackendDirect2DImpl::bitmapBrush): * platform/graphics/win/BackingStoreBackendDirect2DImpl.h: * platform/graphics/win/Direct2DOperations.cpp: (WebCore::Direct2D::drawNativeImage): * platform/graphics/win/Direct2DUtilities.cpp: (WebCore::Direct2D::copyRectFromOneSurfaceToAnother): (WebCore::Direct2D::writeImageToDiskAsPNG): Added diagnostic utility to dump textures to disk for review. * platform/graphics/win/Direct2DUtilities.h: * platform/graphics/win/ImageDecoderDirect2D.cpp: (WebCore::ImageDecoderDirect2D::systemImagingFactory): Switch to more recent factory with additional features. * platform/graphics/win/ImageDecoderDirect2D.h: 2019-08-20 Saam Barati [WHLSL] Only take the pointer of a variable or global variable reference if it is used https://bugs.webkit.org/show_bug.cgi?id=200908 Reviewed by Dean Jackson. Previously, we would always emit Metal code to produce an lvalue pointer even when it wasn't used. This patch adds a mechanism to lazily generate such pointers when they're actually needed, since we often don't use them. This is a 7% Metal compile time speedup on compute_boids with a p value of 0.0001. * Modules/webgpu/WHLSL/Metal/WHLSLFunctionWriter.cpp: (WebCore::WHLSL::Metal::FunctionDefinitionWriter::appendRightValueWithNullability): (WebCore::WHLSL::Metal::FunctionDefinitionWriter::appendLeftValue): (WebCore::WHLSL::Metal::FunctionDefinitionWriter::takeLastLeftValue): (WebCore::WHLSL::Metal::FunctionDefinitionWriter::visit): * Modules/webgpu/WHLSL/Metal/WHLSLMangledNames.h: (WebCore::WHLSL::Metal::MangledVariableName::operator bool const): 2019-08-20 Chris Dumez Unsafe usage of CookieStorageObserver from a background thread https://bugs.webkit.org/show_bug.cgi?id=200920 Reviewed by Alex Christensen. Unsafe usage of CookieStorageObserver from a background thread. CookieStorageObserver gets constructed / destructed on the main thread. However, CookieStorageObserver::cookiesDidChange() gets called on a background thread and tries to ref |this|. Even though CookieStorageObserver is ThreadSafeRefCounted, this is still unsafe because the CookieStorageObserver destructor may already be running on the main thread when CookieStorageObserver::cookiesDidChange() gets called on the background thread. * platform/network/NetworkStorageSession.h: * platform/network/cocoa/CookieStorageObserver.h: * platform/network/cocoa/CookieStorageObserver.mm: (WebCore::CookieStorageObserver::CookieStorageObserver): (WebCore::CookieStorageObserver::cookiesDidChange): (WebCore::CookieStorageObserver::create): Deleted. * platform/network/cocoa/NetworkStorageSessionCocoa.mm: (WebCore::NetworkStorageSession::cookieStorageObserver const): 2019-08-20 Chris Dumez Use a strongly typed identifier for StorageNamespace's identifier https://bugs.webkit.org/show_bug.cgi?id=200895 Reviewed by Alex Christensen and Youenn Fablet. * storage/StorageNamespace.h: 2019-08-20 Youenn Fablet Make IDB quota check lambdas take a weak of UniqueIDBDatabaseTransaction instead of a ref https://bugs.webkit.org/show_bug.cgi?id=196696 Reviewed by Alex Christensen. Refing the transaction in the lambdas extend their lifetime. Taking a weak pointer of them is better as this will not extend their lifetime. In particular, if the database is deleted, the corresponding transactions might be deleted. This makes quota checks less intrusive in IDB lifetime management. Covered by existing tests. * Modules/indexeddb/server/UniqueIDBDatabase.cpp: (WebCore::IDBServer::UniqueIDBDatabase::createObjectStore): (WebCore::IDBServer::UniqueIDBDatabase::deleteObjectStore): (WebCore::IDBServer::UniqueIDBDatabase::renameObjectStore): (WebCore::IDBServer::UniqueIDBDatabase::clearObjectStore): (WebCore::IDBServer::UniqueIDBDatabase::createIndex): (WebCore::IDBServer::UniqueIDBDatabase::deleteIndex): (WebCore::IDBServer::UniqueIDBDatabase::renameIndex): (WebCore::IDBServer::UniqueIDBDatabase::commitTransaction): (WebCore::IDBServer::UniqueIDBDatabase::abortTransaction): * Modules/indexeddb/server/UniqueIDBDatabaseTransaction.h: 2019-08-20 Youenn Fablet Remove DeferredPromise::sessionID() https://bugs.webkit.org/show_bug.cgi?id=200616 Reviewed by Alex Christensen. Calling sessionID() on DeferredPromise is valid if the DeferredPromise is not suspended. Since this might not always be true in call sites, add a resolve promise that is passed a function that returns the value to resolve. This function is taking a ScriptExecutionContext from which the session ID can be retrieved. This is safe since the function will only be called if the DeferredPromise is not suspended. Update call sites accordingly. No change of behavior. * Modules/fetch/FetchBodyConsumer.cpp: (WebCore::resolveWithTypeAndData): (WebCore::FetchBodyConsumer::resolve): * Modules/fetch/FetchBodyOwner.cpp: (WebCore::FetchBodyOwner::blob): * bindings/js/JSDOMPromiseDeferred.h: (WebCore::DeferredPromise::resolveCallbackValueWithNewlyCreated): (WebCore::DeferredPromise::sessionID const): Deleted. 2019-08-20 Youenn Fablet PendingActivationMediaStream does not need to be refcounted https://bugs.webkit.org/show_bug.cgi?id=200879 Reviewed by Alex Christensen. No observable change of behavior. * Modules/mediastream/UserMediaRequest.cpp: (WebCore::UserMediaRequest::allow): (WebCore::UserMediaRequest::mediaStreamDidFail): No need to asynchronously remove the observer since MediaStreamPrivate handles that properply now. * Modules/mediastream/UserMediaRequest.h: 2019-08-19 Devin Rousso Web Inspector: Debugger: add a global breakpoint for pausing in the next microtask https://bugs.webkit.org/show_bug.cgi?id=200652 Reviewed by Joseph Pecoraro. Test: inspector/debugger/setPauseOnMicrotasks.html * inspector/agents/page/PageDebuggerAgent.h: * inspector/agents/worker/WorkerDebuggerAgent.h: * inspector/agents/InspectorTimelineAgent.h: (WebCore::InspectorTimelineAgent::willRunMicrotask): Added. (WebCore::InspectorTimelineAgent::didRunMicrotask): Added. 2019-08-19 Sam Weinig [WHLSL] Make generated Metal code should be indented properly to ease reading while debugging https://bugs.webkit.org/show_bug.cgi?id=200870 Reviewed by Saam Barati. Adds indentation of generated Metal code using the new WTF::Indentation and WTF::IndentationScope classes. This makes reading the generated Metal code much easier while debugging it, and does not seem to introduce any performance regression (I measured no difference on compute_boids.html test). * Modules/webgpu/WHLSL/Metal/WHLSLEntryPointScaffolding.cpp: (WebCore::WHLSL::Metal::EntryPointScaffolding::emitResourceHelperTypes): (WebCore::WHLSL::Metal::EntryPointScaffolding::emitUnpackResourcesAndNamedBuiltIns): (WebCore::WHLSL::Metal::VertexEntryPointScaffolding::emitHelperTypes): (WebCore::WHLSL::Metal::VertexEntryPointScaffolding::emitSignature): (WebCore::WHLSL::Metal::VertexEntryPointScaffolding::emitUnpack): (WebCore::WHLSL::Metal::VertexEntryPointScaffolding::emitPack): (WebCore::WHLSL::Metal::FragmentEntryPointScaffolding::emitHelperTypes): (WebCore::WHLSL::Metal::FragmentEntryPointScaffolding::emitSignature): (WebCore::WHLSL::Metal::FragmentEntryPointScaffolding::emitUnpack): (WebCore::WHLSL::Metal::FragmentEntryPointScaffolding::emitPack): (WebCore::WHLSL::Metal::ComputeEntryPointScaffolding::emitHelperTypes): (WebCore::WHLSL::Metal::ComputeEntryPointScaffolding::emitSignature): (WebCore::WHLSL::Metal::ComputeEntryPointScaffolding::emitUnpack): (WebCore::WHLSL::Metal::ComputeEntryPointScaffolding::emitPack): * Modules/webgpu/WHLSL/Metal/WHLSLEntryPointScaffolding.h: * Modules/webgpu/WHLSL/Metal/WHLSLFunctionWriter.cpp: (WebCore::WHLSL::Metal::FunctionDefinitionWriter::visit): (WebCore::WHLSL::Metal::FunctionDefinitionWriter::emitLoop): * Modules/webgpu/WHLSL/Metal/WHLSLNativeFunctionWriter.cpp: (WebCore::WHLSL::Metal::inlineNativeFunction): * Modules/webgpu/WHLSL/Metal/WHLSLNativeFunctionWriter.h: * Modules/webgpu/WHLSL/Metal/WHLSLTypeNamer.cpp: (WebCore::WHLSL::Metal::TypeNamer::emitUnnamedTypeDefinition): 2019-08-19 Devin Rousso Web Inspector: have more aggressive checks for dataURLs provided to `console.screenshot` https://bugs.webkit.org/show_bug.cgi?id=200747 Reviewed by Joseph Pecoraro. Always send any /data:*+/ strings to the frontend and have it render there. If that doesn't work, have the frontend "spoof" an error message look and feel. Test: inspector/console/console-screenshot.html * page/PageConsoleClient.cpp: (WebCore::PageConsoleClient::screenshot): 2019-08-19 Jer Noble [Cocoa] Fix misspelling of -preventsDisplaySleepForVideoPlayback https://bugs.webkit.org/show_bug.cgi?id=200774 Reviewed by Eric Carlson. Only declare the API on platforms where that API is undefined, so as to catch this kind of misspelling at compile time. * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm: (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::ensureLayer): 2019-08-19 Justin Fan WebGPU layers don't show up sometimes https://bugs.webkit.org/show_bug.cgi?id=200752 Reviewed by Dean Jackson. Ensure HTML canvas is properly notified of WebGPU updates. Fixes alpha WebGPU MotionMark benchmark no-show issue. Normal WebGPU behavior unaffected and covered by existing tests. * Modules/webgpu/GPUCanvasContext.cpp: (WebCore::GPUCanvasContext::configureSwapChain): (WebCore::GPUCanvasContext::reshape): * Modules/webgpu/WHLSL/Metal/WHLSLNativeFunctionWriter.cpp: (WebCore::WHLSL::Metal::inlineNativeFunction): * Sources.txt: * WebCore.xcodeproj/project.pbxproj: * html/canvas/GPUBasedCanvasRenderingContext.cpp: Added. (WebCore::GPUBasedCanvasRenderingContext::GPUBasedCanvasRenderingContext): (WebCore::GPUBasedCanvasRenderingContext::htmlCanvas const): (WebCore::GPUBasedCanvasRenderingContext::notifyCanvasContentChanged): * html/canvas/GPUBasedCanvasRenderingContext.h: (WebCore::GPUBasedCanvasRenderingContext::GPUBasedCanvasRenderingContext): Deleted. * html/canvas/WebGLRenderingContextBase.cpp: (WebCore::WebGLRenderingContextBase::reshape): (WebCore::WebGLRenderingContextBase::htmlCanvas): Deleted. * html/canvas/WebGLRenderingContextBase.h: * rendering/RenderLayerBacking.cpp: (WebCore::RenderLayerBacking::contentChanged): 2019-08-19 Sihui Liu Remove IDB-specific quota https://bugs.webkit.org/show_bug.cgi?id=196545 Reviewed by Youenn Fablet. Re-land r248526 with fix for performance tests. No change of behavior as IDB specific quota is no longer used. Instead a global quota is used. This quota currently handles IDB and Cache API. * Modules/indexeddb/server/IDBBackingStore.h: * Modules/indexeddb/server/IDBServer.cpp: (WebCore::IDBServer::IDBServer::createBackingStore): (WebCore::IDBServer::IDBServer::setPerOriginQuota): Deleted. * Modules/indexeddb/server/IDBServer.h: (WebCore::IDBServer::IDBServer::perOriginQuota const): Deleted. * Modules/indexeddb/server/MemoryIDBBackingStore.h: * Modules/indexeddb/server/SQLiteIDBBackingStore.cpp: (WebCore::IDBServer::SQLiteIDBBackingStore::SQLiteIDBBackingStore): (WebCore::IDBServer::SQLiteIDBBackingStore::beginTransaction): (WebCore::IDBServer::SQLiteIDBBackingStore::createObjectStore): (WebCore::IDBServer::SQLiteIDBBackingStore::renameObjectStore): (WebCore::IDBServer::SQLiteIDBBackingStore::createIndex): (WebCore::IDBServer::SQLiteIDBBackingStore::uncheckedPutIndexRecord): (WebCore::IDBServer::SQLiteIDBBackingStore::renameIndex): (WebCore::IDBServer::SQLiteIDBBackingStore::addRecord): (WebCore::IDBServer::SQLiteIDBBackingStore::uncheckedSetKeyGeneratorValue): (WebCore::IDBServer::SQLiteIDBBackingStore::quotaForOrigin const): Deleted. (WebCore::IDBServer::SQLiteIDBBackingStore::maximumSize const): Deleted. * Modules/indexeddb/server/SQLiteIDBBackingStore.h: * Modules/indexeddb/server/UniqueIDBDatabase.cpp: (WebCore::IDBServer::UniqueIDBDatabase::setQuota): Deleted. * Modules/indexeddb/server/UniqueIDBDatabase.h: 2019-08-19 Antoine Quint [Pointer Events] Removing the capture element prevents future pointer events from being dispatched on macOS https://bugs.webkit.org/show_bug.cgi?id=200887 Reviewed by Dean Jackson. Test: pointerevents/mouse/pointer-capture-element-removal.html While we should only dispatch a lostpointercapture event to a connected element, clearing the capture element set on the frame's EventHandler should always happen, regardless of the connected status of the previous capture element, since otherwise all future mouse and pointer events would be targeted at the now-disconnected, former capture element. * page/PointerCaptureController.cpp: (WebCore::PointerCaptureController::processPendingPointerCapture): 2019-08-19 Youenn Fablet Remove SessionID::emptySessionID() https://bugs.webkit.org/show_bug.cgi?id=200811 Reviewed by Alex Christensen. No change of behavior, update SessionID call sites. * accessibility/mac/WebAccessibilityObjectWrapperMac.mm: (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]): * dom/Document.cpp: (WebCore::Document::sessionID const): (WebCore::Document::privateBrowsingStateDidChange): * workers/service/ServiceWorkerProvider.cpp: (WebCore::ServiceWorkerProvider::registerServiceWorkerClients): 2019-08-19 Youenn Fablet Stop MediaDevices timer when stopping MediaDevices https://bugs.webkit.org/show_bug.cgi?id=200880 Reviewed by Eric Carlson. No change of behavior. Stop timer when stopping MediaDevices and check for MediaDevices being stopped before scheduling the timer. * Modules/mediastream/MediaDevices.cpp: (WebCore::MediaDevices::stop): Remove document/controller check since at that point, the document should not be null and the controller should be there. (WebCore::MediaDevices::scheduledEventTimerFired): (WebCore::MediaDevices::listenForDeviceChanges): 2019-08-19 Yusuke Suzuki Unreviewed, speculative build fix for GTK and WinCairo https://bugs.webkit.org/show_bug.cgi?id=200620 It seems that these files have different flags that is not tested in EWS. * platform/audio/gstreamer/AudioFileReaderGStreamer.cpp: * platform/audio/gstreamer/AudioSourceProviderGStreamer.h: 2019-08-19 Yusuke Suzuki [WTF] Add makeUnique, which ensures T is fast-allocated, actual static_assert part https://bugs.webkit.org/show_bug.cgi?id=200620 Reviewed by Geoff Garen. * platform/network/curl/CookieJarCurl.h: 2019-08-19 Youenn Fablet enumerateDevices should return the same JS objects if called twice https://bugs.webkit.org/show_bug.cgi?id=200767 Reviewed by Eric Carlson. Make MediaDevices store the last list of enumerated MediaDeviceInfo objects. Reuse them for the next enumerateDevices call if needed. In case of a device change event, make sure the next enumerateDevices call will fetch the new list of devices. When constructing the new list of devices, reuse any preexisting device in the old list as specified by https://w3c.github.io/mediacapture-main/#dom-mediadevices-enumeratedevices. Update enumerateDevices to use a completion handler. Remove MediaDevicesRequest and MediaDevicesEnumerationRequest. Covered by updated test and existing tests. * Modules/mediastream/MediaDeviceInfo.cpp: (WebCore::MediaDeviceInfo::MediaDeviceInfo): (WebCore::MediaDeviceInfo::create): * Modules/mediastream/MediaDeviceInfo.h: * Modules/mediastream/MediaDeviceInfo.idl: * Modules/mediastream/MediaDevices.cpp: (WebCore::MediaDevices::MediaDevices): (WebCore::MediaDevices::stop): (WebCore::MediaDevices::refreshDevices): (WebCore::MediaDevices::enumerateDevices): (WebCore::MediaDevices::scheduledEventTimerFired): (WebCore::MediaDevices::listenForDeviceChanges): (WebCore::MediaDevices::addEventListener): * Modules/mediastream/MediaDevices.h: * Modules/mediastream/MediaDevices.idl: * Modules/mediastream/MediaDevicesEnumerationRequest.cpp: Removed. * Modules/mediastream/MediaDevicesEnumerationRequest.h: Removed. * Modules/mediastream/MediaDevicesRequest.cpp: Removed. * Modules/mediastream/MediaDevicesRequest.h: Removed. * Modules/mediastream/RTCRtpSender.cpp: * Modules/mediastream/UserMediaClient.h: * Modules/mediastream/UserMediaController.cpp: (WebCore::isAllowedToUse): (WebCore::UserMediaController::canCallGetUserMedia const): * Modules/mediastream/UserMediaController.h: (WebCore::UserMediaController::enumerateMediaDevices): * Sources.txt: * WebCore.xcodeproj/project.pbxproj: 2019-08-18 Yusuke Suzuki [WTF] Add makeUnique, which ensures T is fast-allocated, makeUnique / makeUniqueWithoutFastMallocCheck part https://bugs.webkit.org/show_bug.cgi?id=200620 Reviewed by Geoff Garen. * Modules/applicationmanifest/ApplicationManifestParser.cpp: (WebCore::ApplicationManifestParser::logDeveloperWarning): * Modules/beacon/NavigatorBeacon.cpp: (WebCore::NavigatorBeacon::from): * Modules/cache/DOMWindowCaches.cpp: (WebCore::DOMWindowCaches::from): * Modules/cache/WorkerGlobalScopeCaches.cpp: (WebCore::WorkerGlobalScopeCaches::from): * Modules/credentialmanagement/NavigatorCredentials.cpp: (WebCore::NavigatorCredentials::from): * Modules/encryptedmedia/InitDataRegistry.cpp: (WebCore::InitDataRegistry::extractPsshBoxesFromCenc): * Modules/encryptedmedia/legacy/LegacyCDM.cpp: (WebCore::LegacyCDM::create): * Modules/encryptedmedia/legacy/LegacyCDMPrivateClearKey.cpp: (WebCore::LegacyCDMPrivateClearKey::createSession): * Modules/fetch/FetchBodyOwner.cpp: (WebCore::FetchBodyOwner::loadBlob): * Modules/fetch/FetchResponse.cpp: (WebCore::FetchResponse::fetch): (WebCore::FetchResponse::BodyLoader::start): * Modules/gamepad/NavigatorGamepad.cpp: (WebCore::NavigatorGamepad::from): * Modules/geolocation/GeolocationController.cpp: (WebCore::provideGeolocationTo): * Modules/geolocation/NavigatorGeolocation.cpp: (WebCore::NavigatorGeolocation::from): * Modules/indexeddb/DOMWindowIndexedDatabase.cpp: (WebCore::DOMWindowIndexedDatabase::from): * Modules/indexeddb/IDBObjectStore.cpp: (WebCore::IDBObjectStore::index): * Modules/indexeddb/IDBTransaction.cpp: (WebCore::IDBTransaction::objectStore): (WebCore::IDBTransaction::createObjectStore): (WebCore::IDBTransaction::createIndex): * Modules/indexeddb/WorkerGlobalScopeIndexedDatabase.cpp: (WebCore::WorkerGlobalScopeIndexedDatabase::from): * Modules/indexeddb/client/IDBConnectionToServer.cpp: (WebCore::IDBClient::IDBConnectionToServer::IDBConnectionToServer): * Modules/indexeddb/client/TransactionOperation.cpp: (WebCore::IDBClient::TransactionOperation::TransactionOperation): * Modules/indexeddb/server/IDBServer.cpp: (WebCore::IDBServer::IDBServer::getOrCreateUniqueIDBDatabase): (WebCore::IDBServer::IDBServer::createBackingStore): (WebCore::IDBServer::IDBServer::ensureQuotaUser): * Modules/indexeddb/server/IndexValueStore.cpp: (WebCore::IDBServer::IndexValueStore::addRecord): * Modules/indexeddb/server/MemoryBackingStoreTransaction.cpp: (WebCore::IDBServer::MemoryBackingStoreTransaction::create): (WebCore::IDBServer::MemoryBackingStoreTransaction::MemoryBackingStoreTransaction): (WebCore::IDBServer::MemoryBackingStoreTransaction::recordValueChanged): * Modules/indexeddb/server/MemoryIDBBackingStore.cpp: (WebCore::IDBServer::MemoryIDBBackingStore::create): (WebCore::IDBServer::MemoryIDBBackingStore::getOrEstablishDatabaseInfo): (WebCore::IDBServer::MemoryIDBBackingStore::setDatabaseInfo): * Modules/indexeddb/server/MemoryIndex.cpp: (WebCore::IDBServer::MemoryIndex::putIndexKey): (WebCore::IDBServer::MemoryIndex::maybeOpenCursor): * Modules/indexeddb/server/MemoryObjectStore.cpp: (WebCore::IDBServer::MemoryObjectStore::addRecord): (WebCore::IDBServer::MemoryObjectStore::maybeOpenCursor): * Modules/indexeddb/server/SQLiteIDBBackingStore.cpp: (WebCore::IDBServer::SQLiteIDBBackingStore::createAndPopulateInitialDatabaseInfo): (WebCore::IDBServer::SQLiteIDBBackingStore::extractExistingDatabaseInfo): (WebCore::IDBServer::SQLiteIDBBackingStore::getOrEstablishDatabaseInfo): (WebCore::IDBServer::SQLiteIDBBackingStore::beginTransaction): (WebCore::IDBServer::SQLiteIDBBackingStore::cachedStatement): * Modules/indexeddb/server/SQLiteIDBCursor.cpp: (WebCore::IDBServer::SQLiteIDBCursor::maybeCreate): (WebCore::IDBServer::SQLiteIDBCursor::maybeCreateBackingStoreCursor): (WebCore::IDBServer::SQLiteIDBCursor::createSQLiteStatement): (WebCore::IDBServer::SQLiteIDBCursor::internalFetchNextRecord): * Modules/indexeddb/server/SQLiteIDBTransaction.cpp: (WebCore::IDBServer::SQLiteIDBTransaction::begin): * Modules/indexeddb/server/UniqueIDBDatabase.cpp: (WebCore::IDBServer::UniqueIDBDatabase::didDeleteBackingStore): (WebCore::IDBServer::UniqueIDBDatabase::didOpenBackingStore): (WebCore::IDBServer::UniqueIDBDatabase::didPerformAbortTransaction): * Modules/indexeddb/server/UniqueIDBDatabaseTransaction.cpp: (WebCore::IDBServer::UniqueIDBDatabaseTransaction::UniqueIDBDatabaseTransaction): * Modules/indexeddb/shared/IDBRequestData.cpp: (WebCore::IDBRequestData::IDBRequestData): (WebCore::IDBRequestData::isolatedCopy): * Modules/indexeddb/shared/IDBRequestData.h: (WebCore::IDBRequestData::decode): * Modules/indexeddb/shared/IDBResultData.cpp: (WebCore::IDBResultData::IDBResultData): (WebCore::IDBResultData::isolatedCopy): (WebCore::IDBResultData::openDatabaseSuccess): (WebCore::IDBResultData::openDatabaseUpgradeNeeded): (WebCore::IDBResultData::deleteDatabaseSuccess): (WebCore::IDBResultData::putOrAddSuccess): (WebCore::IDBResultData::getRecordSuccess): (WebCore::IDBResultData::getAllRecordsSuccess): (WebCore::IDBResultData::openCursorSuccess): (WebCore::IDBResultData::iterateCursorSuccess): * Modules/indexeddb/shared/IDBResultData.h: (WebCore::IDBResultData::decode): * Modules/indexeddb/shared/IDBTransactionInfo.cpp: (WebCore::IDBTransactionInfo::versionChange): (WebCore::IDBTransactionInfo::IDBTransactionInfo): (WebCore::IDBTransactionInfo::isolatedCopy): * Modules/indexeddb/shared/IDBTransactionInfo.h: (WebCore::IDBTransactionInfo::decode): * Modules/indexeddb/shared/InProcessIDBServer.cpp: (WebCore::InProcessIDBServer::quotaManager): * Modules/mediacapabilities/NavigatorMediaCapabilities.cpp: (WebCore::NavigatorMediaCapabilities::from): * Modules/mediasession/WebMediaSessionManager.cpp: (WebCore::WebMediaSessionManager::mockPicker): (WebCore::WebMediaSessionManager::addPlaybackTargetPickerClient): * Modules/mediasource/MediaSource.cpp: (WebCore::MediaSource::buffered const): (WebCore::MediaSource::setLiveSeekableRange): * Modules/mediastream/NavigatorMediaDevices.cpp: (WebCore::NavigatorMediaDevices::from): * Modules/mediastream/UserMediaController.cpp: (WebCore::provideUserMediaTo): * Modules/mediastream/libwebrtc/LibWebRTCDataChannelHandler.cpp: (WebCore::LibWebRTCDataChannelHandler::channelEvent): * Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp: (WebCore::LibWebRTCMediaEndpoint::addRemoteTrack): (WebCore::LibWebRTCMediaEndpoint::collectTransceivers): (WebCore::LibWebRTCMediaEndpoint::newTransceiver): (WebCore::LibWebRTCMediaEndpoint::createTransceiverBackends): (WebCore::LibWebRTCMediaEndpoint::transceiverBackendFromSender): (WebCore::LibWebRTCMediaEndpoint::createDataChannel): * Modules/mediastream/libwebrtc/LibWebRTCPeerConnectionBackend.cpp: (WebCore::createLibWebRTCPeerConnectionBackend): (WebCore::LibWebRTCPeerConnectionBackend::videoReceiver): (WebCore::LibWebRTCPeerConnectionBackend::audioReceiver): (WebCore::LibWebRTCPeerConnectionBackend::addTrack): (WebCore::LibWebRTCPeerConnectionBackend::addTransceiver): * Modules/mediastream/libwebrtc/LibWebRTCRtpSenderBackend.cpp: (WebCore::LibWebRTCRtpSenderBackend::createDTMFBackend): * Modules/mediastream/libwebrtc/LibWebRTCRtpTransceiverBackend.cpp: (WebCore::LibWebRTCRtpTransceiverBackend::createReceiverBackend): (WebCore::LibWebRTCRtpTransceiverBackend::createSenderBackend): * Modules/notifications/Notification.cpp: (WebCore::Notification::Notification): * Modules/notifications/NotificationController.cpp: (WebCore::provideNotification): * Modules/quota/DOMWindowQuota.cpp: (WebCore::DOMWindowQuota::from): * Modules/quota/NavigatorStorageQuota.cpp: (WebCore::NavigatorStorageQuota::from): * Modules/quota/WorkerNavigatorStorageQuota.cpp: (WebCore::WorkerNavigatorStorageQuota::from): * Modules/speech/DOMWindowSpeechSynthesis.cpp: (WebCore::DOMWindowSpeechSynthesis::from): * Modules/speech/SpeechSynthesis.cpp: (WebCore::SpeechSynthesis::ensurePlatformSpeechSynthesizer): * Modules/webaudio/AsyncAudioDecoder.cpp: (WebCore::AsyncAudioDecoder::decodeAsync): * Modules/webaudio/AudioBasicInspectorNode.cpp: (WebCore::AudioBasicInspectorNode::AudioBasicInspectorNode): * Modules/webaudio/AudioBasicProcessorNode.cpp: (WebCore::AudioBasicProcessorNode::AudioBasicProcessorNode): * Modules/webaudio/AudioBufferSourceNode.cpp: (WebCore::AudioBufferSourceNode::AudioBufferSourceNode): * Modules/webaudio/AudioContext.cpp: (WebCore::AudioContext::AudioContext): (WebCore::AudioContext::decodeAudioData): * Modules/webaudio/AudioDestinationNode.cpp: (WebCore::AudioDestinationNode::AudioDestinationNode): * Modules/webaudio/BiquadFilterNode.cpp: (WebCore::BiquadFilterNode::BiquadFilterNode): * Modules/webaudio/BiquadProcessor.cpp: (WebCore::BiquadProcessor::createKernel): (WebCore::BiquadProcessor::getFrequencyResponse): * Modules/webaudio/ChannelMergerNode.cpp: (WebCore::ChannelMergerNode::ChannelMergerNode): * Modules/webaudio/ChannelSplitterNode.cpp: (WebCore::ChannelSplitterNode::ChannelSplitterNode): * Modules/webaudio/ConvolverNode.cpp: (WebCore::ConvolverNode::ConvolverNode): (WebCore::ConvolverNode::setBuffer): * Modules/webaudio/DelayNode.cpp: (WebCore::DelayNode::DelayNode): * Modules/webaudio/DelayProcessor.cpp: (WebCore::DelayProcessor::createKernel): * Modules/webaudio/DynamicsCompressorNode.cpp: (WebCore::DynamicsCompressorNode::DynamicsCompressorNode): (WebCore::DynamicsCompressorNode::initialize): * Modules/webaudio/GainNode.cpp: (WebCore::GainNode::GainNode): * Modules/webaudio/MediaElementAudioSourceNode.cpp: (WebCore::MediaElementAudioSourceNode::MediaElementAudioSourceNode): (WebCore::MediaElementAudioSourceNode::setFormat): * Modules/webaudio/MediaStreamAudioSourceNode.cpp: (WebCore::MediaStreamAudioSourceNode::MediaStreamAudioSourceNode): (WebCore::MediaStreamAudioSourceNode::setFormat): * Modules/webaudio/OscillatorNode.cpp: (WebCore::OscillatorNode::OscillatorNode): * Modules/webaudio/PannerNode.cpp: (WebCore::PannerNode::PannerNode): * Modules/webaudio/PeriodicWave.cpp: (WebCore::PeriodicWave::createBandLimitedTables): * Modules/webaudio/RealtimeAnalyser.cpp: (WebCore::RealtimeAnalyser::RealtimeAnalyser): (WebCore::RealtimeAnalyser::setFftSize): * Modules/webaudio/ScriptProcessorNode.cpp: (WebCore::ScriptProcessorNode::ScriptProcessorNode): * Modules/webaudio/WaveShaperDSPKernel.cpp: (WebCore::WaveShaperDSPKernel::lazyInitializeOversampling): * Modules/webaudio/WaveShaperNode.cpp: (WebCore::WaveShaperNode::WaveShaperNode): * Modules/webaudio/WaveShaperProcessor.cpp: (WebCore::WaveShaperProcessor::createKernel): * Modules/webauthn/fido/FidoHidMessage.cpp: (fido::FidoHidMessage::FidoHidMessage): * Modules/webauthn/fido/FidoHidPacket.cpp: (fido::FidoHidInitPacket::createFromSerializedData): (fido::FidoHidContinuationPacket::createFromSerializedData): * Modules/webdatabase/Database.cpp: (WebCore::Database::openAndVerifyVersion): (WebCore::Database::close): (WebCore::Database::scheduleTransaction): (WebCore::Database::scheduleTransactionStep): (WebCore::Database::tableNames): * Modules/webdatabase/DatabaseThread.cpp: (WebCore::DatabaseThread::DatabaseThread): * Modules/webdatabase/DatabaseTracker.cpp: (WebCore::DatabaseTracker::addOpenDatabase): (WebCore::DatabaseTracker::recordCreatingDatabase): (WebCore::DatabaseTracker::recordDeletingDatabase): * Modules/webdatabase/SQLTransaction.cpp: (WebCore::SQLTransaction::executeSql): (WebCore::SQLTransaction::openTransactionAndPreflight): * Modules/webdriver/NavigatorWebDriver.cpp: (WebCore::NavigatorWebDriver::from): * Modules/webgpu/NavigatorGPU.cpp: (WebCore::NavigatorGPU::from): * Modules/webgpu/WHLSL/AST/WHLSLEnumerationDefinition.h: * Modules/webgpu/WHLSL/AST/WHLSLVariableDeclaration.h: * Modules/webgpu/WHLSL/Metal/WHLSLFunctionWriter.cpp: (WebCore::WHLSL::Metal::RenderFunctionDefinitionWriter::createEntryPointScaffolding): (WebCore::WHLSL::Metal::ComputeFunctionDefinitionWriter::createEntryPointScaffolding): * Modules/webgpu/WHLSL/Metal/WHLSLTypeNamer.cpp: (WebCore::WHLSL::Metal::TypeNamer::createNameNode): * Modules/webgpu/WHLSL/WHLSLChecker.cpp: (WebCore::WHLSL::Checker::assignConcreteType): (WebCore::WHLSL::Checker::assignType): (WebCore::WHLSL::Checker::forwardType): * Modules/webgpu/WHLSL/WHLSLParser.cpp: (WebCore::WHLSL::Parser::parseSemantic): * Modules/webgpu/WorkerNavigatorGPU.cpp: (WebCore::WorkerNavigatorGPU::from): * Modules/websockets/ThreadableWebSocketChannelClientWrapper.cpp: (WebCore::ThreadableWebSocketChannelClientWrapper::didConnect): (WebCore::ThreadableWebSocketChannelClientWrapper::didReceiveMessage): (WebCore::ThreadableWebSocketChannelClientWrapper::didReceiveBinaryData): (WebCore::ThreadableWebSocketChannelClientWrapper::didUpdateBufferedAmount): (WebCore::ThreadableWebSocketChannelClientWrapper::didStartClosingHandshake): (WebCore::ThreadableWebSocketChannelClientWrapper::didClose): (WebCore::ThreadableWebSocketChannelClientWrapper::didReceiveMessageError): (WebCore::ThreadableWebSocketChannelClientWrapper::didUpgradeURL): * Modules/websockets/WebSocketChannel.cpp: (WebCore::WebSocketChannel::connect): (WebCore::WebSocketChannel::enqueueTextFrame): (WebCore::WebSocketChannel::enqueueRawFrame): (WebCore::WebSocketChannel::enqueueBlobFrame): (WebCore::WebSocketChannel::processOutgoingFrameQueue): * Modules/websockets/WebSocketDeflateFramer.cpp: (WebCore::WebSocketDeflateFramer::createExtensionProcessor): (WebCore::WebSocketDeflateFramer::enableDeflate): (WebCore::WebSocketDeflateFramer::deflate): (WebCore::WebSocketDeflateFramer::inflate): * Modules/websockets/WebSocketDeflater.cpp: (WebCore::WebSocketDeflater::WebSocketDeflater): (WebCore::WebSocketInflater::WebSocketInflater): * Modules/websockets/WorkerThreadableWebSocketChannel.cpp: (WebCore::WorkerThreadableWebSocketChannel::Bridge::mainThreadInitialize): * Modules/webvr/NavigatorWebVR.cpp: (WebCore::NavigatorWebVR::from): * accessibility/AXObjectCache.cpp: (WebCore::AXObjectCache::startCachingComputedObjectAttributesUntilTreeMutates): * animation/WebAnimation.cpp: (WebCore::WebAnimation::updateFinishedState): * bindings/js/JSDOMWindowBase.cpp: (WebCore::JSDOMWindowBase::queueTaskToEventLoop): * bindings/js/JSEventTargetCustom.cpp: (WebCore::jsEventTargetCast): * bindings/js/JSWorkerGlobalScopeBase.cpp: (WebCore::JSWorkerGlobalScopeBase::queueTaskToEventLoop): * bindings/js/SerializedScriptValue.cpp: (WebCore::transferArrayBuffers): (WebCore::SerializedScriptValue::create): * bindings/js/SerializedScriptValue.h: (WebCore::SerializedScriptValue::decode): * bindings/js/WebCoreJSClientData.cpp: (WebCore::JSVMClientData::initNormalWorld): * bindings/js/WorkerScriptController.cpp: (WebCore::WorkerScriptController::initScript): * bridge/c/c_class.cpp: (JSC::Bindings::CClass::methodNamed const): (JSC::Bindings::CClass::fieldNamed const): * bridge/objc/objc_class.mm: (JSC::Bindings::ObjcClass::methodNamed const): (JSC::Bindings::ObjcClass::fieldNamed const): * bridge/objc/objc_runtime.mm: (JSC::Bindings::callObjCFallbackObject): * contentextensions/CombinedURLFilters.cpp: (WebCore::ContentExtensions::CombinedURLFilters::CombinedURLFilters): (WebCore::ContentExtensions::CombinedURLFilters::addPattern): * crypto/SubtleCrypto.cpp: (WebCore::normalizeCryptoAlgorithmParameters): (WebCore::crossThreadCopyImportParams): * css/CSSCalculationValue.cpp: (WebCore::determineCategory): * css/CSSDefaultStyleSheets.cpp: (WebCore::CSSDefaultStyleSheets::loadFullDefaultStyle): (WebCore::CSSDefaultStyleSheets::loadSimpleDefaultStyle): * css/CSSFontFace.cpp: (WebCore::CSSFontFace::appendSources): * css/CSSFontFaceSet.cpp: (WebCore::CSSFontFaceSet::ensureLocalFontFacesForFamilyRegistered): * css/CSSGroupingRule.cpp: (WebCore::CSSGroupingRule::cssRules const): * css/CSSImageGeneratorValue.cpp: (WebCore::CSSImageGeneratorValue::saveCachedImageForSize): * css/CSSKeyframesRule.cpp: (WebCore::CSSKeyframesRule::cssRules): * css/CSSStyleSheet.cpp: (WebCore::CSSStyleSheet::cssRules): * css/DOMCSSPaintWorklet.cpp: (WebCore::DOMCSSPaintWorklet::from): * css/DOMCSSRegisterCustomProperty.cpp: (WebCore::DOMCSSRegisterCustomProperty::from): * css/DocumentRuleSets.cpp: (WebCore::DocumentRuleSets::DocumentRuleSets): (WebCore::DocumentRuleSets::updateUserAgentMediaQueryStyleIfNeeded const): (WebCore::DocumentRuleSets::initializeUserStyle): (WebCore::makeRuleSet): (WebCore::DocumentRuleSets::resetAuthorStyle): (WebCore::ensureInvalidationRuleSets): * css/ElementRuleCollector.cpp: (WebCore::ElementRuleCollector::collectSlottedPseudoElementRulesForSlot): * css/FontFace.cpp: (WebCore::populateFontFaceWithArrayBuffer): * css/PropertySetCSSStyleDeclaration.cpp: (WebCore::PropertySetCSSStyleDeclaration::wrapForDeprecatedCSSOM): * css/RuleFeature.cpp: (WebCore::RuleFeatureSet::collectFeatures): (WebCore::RuleFeatureSet::add): * css/RuleSet.cpp: (WebCore::RuleSet::addToRuleSet): * css/StyleBuilderConverter.h: (WebCore::StyleBuilderConverter::convertTo100PercentMinusLength): * css/StyleBuilderCustom.h: (WebCore::StyleBuilderCustom::applyTextOrBoxShadowValue): (WebCore::StyleBuilderCustom::applyInheritTextShadow): (WebCore::StyleBuilderCustom::applyInheritBoxShadow): (WebCore::StyleBuilderCustom::applyValueContent): * css/StyleProperties.cpp: (WebCore::MutableStyleProperties::ensureCSSStyleDeclaration): (WebCore::MutableStyleProperties::ensureInlineCSSStyleDeclaration): * css/StyleResolver.cpp: (WebCore::StyleResolver::cascadedPropertiesForRollback): * css/makeprop.pl: (generateFillLayerPropertyInheritValueSetter): (generateFillLayerPropertyValueSetter): * css/parser/CSSParserImpl.cpp: (WebCore::CSSParserImpl::CSSParserImpl): (WebCore::CSSParserImpl::parsePageSelector): (WebCore::CSSParserImpl::consumeMediaRule): (WebCore::CSSParserImpl::consumeSupportsRule): (WebCore::CSSParserImpl::consumeKeyframesRule): * css/parser/CSSParserSelector.cpp: (WebCore::CSSParserSelector::parsePagePseudoSelector): (WebCore::CSSParserSelector::parsePseudoElementSelector): (WebCore::CSSParserSelector::parsePseudoClassSelector): (WebCore::CSSParserSelector::CSSParserSelector): (WebCore::CSSParserSelector::adoptSelectorVector): (WebCore::CSSParserSelector::prependTagSelector): * css/parser/CSSPropertyParser.cpp: (WebCore::consumeBasicShapePath): * css/parser/CSSSelectorParser.cpp: (WebCore::CSSSelectorParser::consumePseudo): * dom/CustomElementReactionQueue.cpp: (WebCore::CustomElementReactionQueue::ensureBackupQueue): * dom/DataTransfer.cpp: (WebCore::DataTransfer::items): (WebCore::DataTransfer::createForInputEvent): (WebCore::DataTransfer::createForDragStartEvent): (WebCore::DataTransfer::setDragImage): * dom/DeviceOrientationController.cpp: (WebCore::provideDeviceOrientationTo): * dom/Document.cpp: (WebCore::Document::Document): (WebCore::Document::buildAccessKeyCache): (WebCore::Document::implementation): (WebCore::Document::formController): (WebCore::Document::updateTextRenderer): (WebCore::Document::userAgentShadowTreeStyleResolver): (WebCore::Document::axObjectCache const): (WebCore::Document::setParsing): (WebCore::Document::accessSVGExtensions): (WebCore::Document::initSecurityContext): (WebCore::Document::textAutoSizing): (WebCore::Document::didAddWheelEventHandler): (WebCore::Document::didAddTouchEventHandler): (WebCore::Document::didLogMessage): (WebCore::Document::registerCSSProperty): (WebCore::Document::deviceOrientationAndMotionAccessController): (WebCore::Document::contentChangeObserver): (WebCore::Document::domTimerHoldingTank): * dom/Document.h: (WebCore::Document::createParserYieldToken): * dom/DocumentEventQueue.cpp: (WebCore::DocumentEventQueue::DocumentEventQueue): * dom/DocumentMarkerController.cpp: (WebCore::DocumentMarkerController::addMarker): * dom/DocumentStorageAccess.cpp: (WebCore::DocumentStorageAccess::from): (WebCore::DocumentStorageAccess::requestStorageAccess): (WebCore::DocumentStorageAccess::enableTemporaryTimeUserGesture): * dom/Element.cpp: (WebCore::Element::attributes const): (WebCore::Element::setIsDefinedCustomElement): (WebCore::Element::enqueueToUpgrade): (WebCore::Element::classList): (WebCore::Element::dataset): (WebCore::Element::ensureIntersectionObserverData): (WebCore::Element::ensureResizeObserverData): * dom/EventListenerMap.cpp: (WebCore::EventListenerMap::add): * dom/EventNames.h: * dom/EventPath.cpp: (WebCore::EventPath::buildPath): (WebCore::EventPath::EventPath): * dom/IdTargetObserverRegistry.cpp: (WebCore::IdTargetObserverRegistry::addObserver): * dom/KeyboardEvent.cpp: (WebCore::KeyboardEvent::KeyboardEvent): * dom/MutationObserver.cpp: (WebCore::queueMutationObserverCompoundMicrotask): * dom/MutationObserverInterestGroup.cpp: (WebCore::MutationObserverInterestGroup::createIfNeeded): * dom/MutationObserverRegistration.cpp: (WebCore::MutationObserverRegistration::observedSubtreeNodeWillDetach): * dom/Node.cpp: (WebCore::Node::materializeRareData): (WebCore::Node::ensureEventTargetData): (WebCore::Node::registerMutationObserver): * dom/NodeRareData.h: (WebCore::NodeRareData::ensureNodeLists): (WebCore::NodeRareData::ensureMutationObserverData): * dom/RadioButtonGroups.cpp: (WebCore::RadioButtonGroups::addButton): * dom/ScriptExecutionContext.cpp: (WebCore::ScriptExecutionContext::reportException): (WebCore::ScriptExecutionContext::reportUnhandledPromiseRejection): (WebCore::ScriptExecutionContext::ensureRejectedPromiseTrackerSlow): * dom/SelectorQuery.cpp: * dom/ShadowRoot.cpp: (WebCore::ShadowRoot::ShadowRoot): (WebCore::ShadowRoot::moveShadowRootToNewDocument): (WebCore::ShadowRoot::addSlotElementByName): * dom/SlotAssignment.cpp: (WebCore::SlotAssignment::addSlotElementByName): (WebCore::SlotAssignment::assignToSlot): * dom/TreeScope.cpp: (WebCore::TreeScope::TreeScope): (WebCore::TreeScope::addElementById): (WebCore::TreeScope::addElementByName): (WebCore::TreeScope::addImageMap): (WebCore::TreeScope::addImageElementByUsemap): (WebCore::TreeScope::labelElementForId): * editing/Editor.cpp: (WebCore::createDataTransferForClipboardEvent): (WebCore::Editor::Editor): * editing/ReplaceSelectionCommand.cpp: (WebCore::ReplaceSelectionCommand::ensureReplacementFragment): * editing/SelectionRectGatherer.cpp: (WebCore::SelectionRectGatherer::clearAndCreateNotifier): * editing/TextIterator.cpp: (WebCore::TextIterator::handleTextNode): * editing/cocoa/HTMLConverter.mm: (HTMLConverter::HTMLConverter): (HTMLConverterCaches::computedStylePropertyForElement): * editing/markup.cpp: (WebCore::createPageForSanitizingWebContent): * fileapi/AsyncFileStream.cpp: (WebCore::callOnFileThread): (WebCore::AsyncFileStream::AsyncFileStream): * fileapi/FileReader.cpp: (WebCore::FileReader::readInternal): * history/CachedFrame.cpp: (WebCore::CachedFrame::CachedFrame): * history/CachedPage.cpp: (WebCore::CachedPage::CachedPage): * history/PageCache.cpp: (WebCore::PageCache::addIfCacheable): * html/FileInputType.cpp: (WebCore::FileInputType::requestIcon): * html/FormAssociatedElement.cpp: (WebCore::FormAssociatedElement::resetFormAttributeTargetObserver): * html/FormController.cpp: (WebCore::SavedFormState::deserialize): (WebCore::FormController::createSavedFormStateMap): (WebCore::FormController::takeStateForFormElement): * html/HTMLAnchorElement.cpp: (WebCore::HTMLAnchorElement::relList const): * html/HTMLAreaElement.cpp: (WebCore::HTMLAreaElement::mapMouseEvent): * html/HTMLCanvasElement.cpp: (WebCore::HTMLCanvasElement::setImageBuffer const): * html/HTMLCollection.cpp: (WebCore::HTMLCollection::updateNamedElementCache const): * html/HTMLDetailsElement.cpp: (WebCore::HTMLDetailsElement::create): * html/HTMLFormControlElement.cpp: (WebCore::HTMLFormControlElement::updateVisibleValidationMessage): * html/HTMLFormControlsCollection.cpp: (WebCore::HTMLFormControlsCollection::updateNamedElementCache const): * html/HTMLFormElement.cpp: (WebCore::HTMLFormElement::addToPastNamesMap): * html/HTMLIFrameElement.cpp: (WebCore::HTMLIFrameElement::sandbox): * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::ensureImageLoader): (WebCore::HTMLInputElement::resetListAttributeTargetObserver): * html/HTMLLinkElement.cpp: (WebCore::HTMLLinkElement::sizes): (WebCore::HTMLLinkElement::relList): * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::finishInitialization): (WebCore::HTMLMediaElement::seekWithTolerance): * html/HTMLOutputElement.cpp: (WebCore::HTMLOutputElement::htmlFor): * html/HTMLPlugInImageElement.cpp: (WebCore::HTMLPlugInImageElement::updateAfterStyleResolution): * html/HTMLSummaryElement.cpp: (WebCore::HTMLSummaryElement::create): * html/HTMLVideoElement.cpp: (WebCore::HTMLVideoElement::didAttachRenderers): (WebCore::HTMLVideoElement::parseAttribute): * html/PublicURLManager.cpp: (WebCore::PublicURLManager::create): * html/ValidationMessage.cpp: (WebCore::ValidationMessage::setMessage): (WebCore::ValidationMessage::setMessageDOMAndStartTimer): (WebCore::ValidationMessage::requestToHideMessage): * html/canvas/CanvasRenderingContext2DBase.cpp: (WebCore::DisplayListDrawingContext::DisplayListDrawingContext): (WebCore::CanvasRenderingContext2DBase::drawingContext const): * html/canvas/WebGL2RenderingContext.cpp: (WebCore::WebGL2RenderingContext::getExtension): * html/canvas/WebGLRenderingContext.cpp: (WebCore::WebGLRenderingContext::getExtension): * html/canvas/WebGLRenderingContextBase.cpp: (WebCore::WebGLRenderingContextBase::initializeNewContext): (WebCore::WebGLRenderingContextBase::compileShader): (WebCore::WebGLRenderingContextBase::printToConsole): * html/parser/CSSPreloadScanner.cpp: (WebCore::CSSPreloadScanner::emitRule): * html/parser/HTMLConstructionSite.cpp: (WebCore::HTMLConstructionSite::insertHTMLElementOrFindCustomElementInterface): * html/parser/HTMLDocumentParser.cpp: (WebCore::HTMLDocumentParser::HTMLDocumentParser): (WebCore::HTMLDocumentParser::pumpTokenizer): (WebCore::HTMLDocumentParser::insert): * html/parser/HTMLElementStack.cpp: (WebCore::HTMLElementStack::insertAbove): (WebCore::HTMLElementStack::pushCommon): * html/parser/HTMLPreloadScanner.cpp: (WebCore::TokenPreloadScanner::StartTagScanner::createPreloadRequest): * html/parser/HTMLToken.h: (WebCore::HTMLToken::beginDOCTYPE): * html/parser/XSSAuditor.cpp: (WebCore::XSSAuditor::filterToken): (WebCore::XSSAuditor::decodedHTTPBodySuffixTree): * html/shadow/TextControlInnerElements.cpp: (WebCore::TextControlInnerTextElement::resolveCustomStyle): * html/track/InbandGenericTextTrack.cpp: (WebCore::InbandGenericTextTrack::parser): * html/track/InbandWebVTTTextTrack.cpp: (WebCore::InbandWebVTTTextTrack::parser): * html/track/LoadableTextTrack.cpp: (WebCore::LoadableTextTrack::loadTimerFired): * inspector/CommandLineAPIHost.cpp: (WebCore::CommandLineAPIHost::CommandLineAPIHost): (WebCore::CommandLineAPIHost::clearAllWrappers): * inspector/DOMEditor.cpp: (WebCore::DOMEditor::insertBefore): (WebCore::DOMEditor::removeChild): (WebCore::DOMEditor::setAttribute): (WebCore::DOMEditor::removeAttribute): (WebCore::DOMEditor::setOuterHTML): (WebCore::DOMEditor::insertAdjacentHTML): (WebCore::DOMEditor::replaceWholeText): (WebCore::DOMEditor::replaceChild): (WebCore::DOMEditor::setNodeValue): * inspector/DOMPatchSupport.cpp: (WebCore::DOMPatchSupport::createDigest): * inspector/InspectorController.cpp: (WebCore::InspectorController::InspectorController): (WebCore::InspectorController::createLazyAgents): (WebCore::InspectorController::ensureInspectorAgent): (WebCore::InspectorController::ensureDOMAgent): (WebCore::InspectorController::ensurePageAgent): * inspector/InspectorHistory.cpp: (WebCore::InspectorHistory::markUndoableState): * inspector/InspectorStyleSheet.cpp: (ParsedStyleSheet::setSourceData): (WebCore::InspectorStyleSheet::ensureSourceData): * inspector/NetworkResourcesData.cpp: (WebCore::NetworkResourcesData::resourceCreated): * inspector/WorkerInspectorController.cpp: (WebCore::WorkerInspectorController::WorkerInspectorController): (WebCore::WorkerInspectorController::connectFrontend): (WebCore::WorkerInspectorController::createLazyAgents): * inspector/agents/InspectorApplicationCacheAgent.cpp: (WebCore::InspectorApplicationCacheAgent::InspectorApplicationCacheAgent): * inspector/agents/InspectorCPUProfilerAgent.cpp: (WebCore::InspectorCPUProfilerAgent::InspectorCPUProfilerAgent): * inspector/agents/InspectorCSSAgent.cpp: (WebCore::InspectorCSSAgent::InspectorCSSAgent): (WebCore::InspectorCSSAgent::setStyleSheetText): (WebCore::InspectorCSSAgent::setStyleText): (WebCore::InspectorCSSAgent::setRuleSelector): (WebCore::InspectorCSSAgent::addRule): * inspector/agents/InspectorCanvasAgent.cpp: (WebCore::InspectorCanvasAgent::InspectorCanvasAgent): (WebCore::InspectorCanvasAgent::recordCanvasAction): * inspector/agents/InspectorDOMAgent.cpp: (WebCore::InspectorDOMAgent::InspectorDOMAgent): (WebCore::InspectorDOMAgent::didCreateFrontendAndBackend): (WebCore::InspectorDOMAgent::pushNodePathToFrontend): (WebCore::InspectorDOMAgent::highlightConfigFromInspectorObject): (WebCore::InspectorDOMAgent::highlightRect): (WebCore::InspectorDOMAgent::highlightQuad): (WebCore::InspectorDOMAgent::innerHighlightQuad): (WebCore::InspectorDOMAgent::highlightFrame): (WebCore::InspectorDOMAgent::setInspectedNode): (WebCore::InspectorDOMAgent::didInvalidateStyleAttr): * inspector/agents/InspectorDOMStorageAgent.cpp: (WebCore::InspectorDOMStorageAgent::InspectorDOMStorageAgent): * inspector/agents/InspectorDatabaseAgent.cpp: (WebCore::InspectorDatabaseAgent::InspectorDatabaseAgent): * inspector/agents/InspectorLayerTreeAgent.cpp: (WebCore::InspectorLayerTreeAgent::InspectorLayerTreeAgent): * inspector/agents/InspectorMemoryAgent.cpp: (WebCore::InspectorMemoryAgent::InspectorMemoryAgent): * inspector/agents/InspectorNetworkAgent.cpp: (WebCore::InspectorNetworkAgent::InspectorNetworkAgent): * inspector/agents/InspectorPageAgent.cpp: (WebCore::InspectorPageAgent::InspectorPageAgent): * inspector/agents/InspectorTimelineAgent.cpp: (WebCore::InspectorTimelineAgent::InspectorTimelineAgent): (WebCore::InspectorTimelineAgent::internalStart): (WebCore::InspectorTimelineAgent::startFromConsole): (WebCore::InspectorTimelineAgent::stopFromConsole): * inspector/agents/InspectorWorkerAgent.cpp: (WebCore::InspectorWorkerAgent::InspectorWorkerAgent): * inspector/agents/WebConsoleAgent.cpp: (WebCore::WebConsoleAgent::didReceiveResponse): (WebCore::WebConsoleAgent::didFailLoading): * inspector/agents/WebHeapAgent.cpp: (WebCore::WebHeapAgent::WebHeapAgent): * inspector/agents/page/PageRuntimeAgent.cpp: (WebCore::PageRuntimeAgent::PageRuntimeAgent): * inspector/agents/worker/WorkerDebuggerAgent.cpp: (WebCore::WorkerDebuggerAgent::breakpointActionLog): * layout/LayoutState.cpp: (WebCore::Layout::LayoutState::displayBoxForLayoutBox const): (WebCore::Layout::LayoutState::createFormattingStateForFormattingRootIfNeeded): (WebCore::Layout::LayoutState::createFormattingContext): * layout/inlineformatting/InlineFormattingContext.cpp: (WebCore::Layout::InlineFormattingContext::collectInlineContent const): * layout/inlineformatting/InlineFormattingContextLineLayout.cpp: (WebCore::Layout::InlineFormattingContext::InlineLayout::createDisplayRuns const): * layout/inlineformatting/InlineLine.cpp: (WebCore::Layout::Line::Line): (WebCore::Layout::Line::appendNonBreakableSpace): (WebCore::Layout::Line::appendTextContent): (WebCore::Layout::Line::appendNonReplacedInlineBox): (WebCore::Layout::Line::appendHardLineBreak): * layout/inlineformatting/InlineTextItem.cpp: (WebCore::Layout::InlineTextItem::createAndAppendTextItems): (WebCore::Layout::InlineTextItem::split const): * layout/layouttree/LayoutBox.cpp: (WebCore::Layout::Box::Box): (WebCore::Layout::Box::ensureRareData): * layout/layouttree/LayoutTreeBuilder.cpp: (WebCore::Layout::TreeBuilder::createLayoutBox): (WebCore::Layout::TreeBuilder::createTableStructure): (WebCore::Layout::printLayoutTreeForLiveDocuments): * layout/tableformatting/TableGrid.cpp: (WebCore::Layout::TableGrid::appendCell): * loader/ContentFilter.cpp: (WebCore::ContentFilter::create): * loader/CrossOriginAccessControl.cpp: (WebCore::validatePreflightResponse): * loader/DocumentLoader.cpp: (WebCore::DocumentLoader::DocumentLoader): (WebCore::DocumentLoader::loadApplicationManifest): (WebCore::DocumentLoader::addAllArchiveResources): (WebCore::DocumentLoader::addArchiveResource): (WebCore::DocumentLoader::loadMainResource): (WebCore::DocumentLoader::didGetLoadDecisionForIcon): * loader/EmptyClients.cpp: (WebCore::pageConfigurationWithEmptyClients): * loader/FrameLoader.cpp: (WebCore::FrameLoader::FrameLoader): (WebCore::FrameLoader::init): (WebCore::FrameLoader::initForSynthesizedDocument): (WebCore::FrameLoader::detachChildren): * loader/LinkLoader.cpp: (WebCore::createLinkPreloadResourceClient): * loader/NavigationScheduler.cpp: (WebCore::NavigationScheduler::scheduleRedirect): (WebCore::NavigationScheduler::scheduleLocationChange): (WebCore::NavigationScheduler::scheduleFormSubmission): (WebCore::NavigationScheduler::scheduleRefresh): (WebCore::NavigationScheduler::scheduleHistoryNavigation): (WebCore::NavigationScheduler::schedulePageBlock): * loader/ProgressTracker.cpp: (WebCore::ProgressTracker::incrementProgress): * loader/TextResourceDecoder.cpp: (WebCore::TextResourceDecoder::checkForHeadCharset): * loader/TextTrackLoader.cpp: (WebCore::TextTrackLoader::processNewCueData): * loader/WorkerThreadableLoader.cpp: (WebCore::WorkerThreadableLoader::MainThreadBridge::MainThreadBridge): * loader/archive/cf/LegacyWebArchive.cpp: (WebCore::LegacyWebArchive::create): * loader/cache/CachedImage.cpp: (WebCore::CachedImage::setBodyDataFrom): (WebCore::CachedImage::createImage): * loader/cache/CachedRawResource.cpp: (WebCore::CachedRawResource::redirectReceived): * loader/cache/CachedResource.cpp: (WebCore::CachedResource::addClientToSet): * loader/cache/CachedResourceLoader.cpp: (WebCore::CachedResourceLoader::requestResource): (WebCore::CachedResourceLoader::preload): (WebCore::CachedResourceLoader::clearPreloads): * loader/cache/MemoryCache.cpp: (WebCore::MemoryCache::ensureSessionResourceMap): (WebCore::MemoryCache::addImageToCache): (WebCore::MemoryCache::lruListFor): * loader/ios/PreviewLoader.mm: (-[WebPreviewLoader initWithResourceLoader:resourceResponse:]): (-[WebPreviewLoader connection:didFailWithError:]): (WebCore::PreviewLoader::create): * page/ContextMenuController.cpp: (WebCore::ContextMenuController::maybeCreateContextMenu): * page/DebugPageOverlays.cpp: (WebCore::MouseWheelRegionOverlay::updateRegion): * page/EventHandler.cpp: (WebCore::EventHandler::EventHandler): * page/FrameView.cpp: (WebCore::FrameView::addEmbeddedObjectToUpdate): (WebCore::FrameView::addSlowRepaintObject): (WebCore::FrameView::addViewportConstrainedObject): (WebCore::FrameView::addScrollableArea): * page/FrameViewLayoutContext.cpp: (WebCore::FrameViewLayoutContext::pushLayoutState): (WebCore::FrameViewLayoutContext::pushLayoutStateForPaginationIfNeeded): * page/NavigatorBase.cpp: (WebCore::NavigatorBase::serviceWorker): * page/Page.cpp: (WebCore::Page::Page): (WebCore::Page::initGroup): (WebCore::Page::setResourceUsageOverlayVisible): * page/PageConsoleClient.cpp: (WebCore::PageConsoleClient::addMessage): (WebCore::PageConsoleClient::messageWithTypeAndLevel): (WebCore::PageConsoleClient::screenshot): * page/PageGroup.cpp: (WebCore::PageGroup::captionPreferences): * page/Performance.cpp: (WebCore::Performance::mark): (WebCore::Performance::clearMarks): (WebCore::Performance::measure): (WebCore::Performance::clearMeasures): * page/PrintContext.cpp: (WebCore::PrintContext::outputLinkedDestinations): * page/RenderingUpdateScheduler.cpp: (WebCore::RenderingUpdateScheduler::startTimer): * page/RenderingUpdateScheduler.h: (WebCore::RenderingUpdateScheduler::create): * page/SecurityPolicy.cpp: (WebCore::SecurityPolicy::addOriginAccessWhitelistEntry): * page/SettingsBase.cpp: (WebCore::SettingsBase::SettingsBase): * page/UserContentController.cpp: (WebCore::UserContentController::addUserScript): (WebCore::UserContentController::addUserStyleSheet): * page/WheelEventDeltaFilter.cpp: (WebCore::WheelEventDeltaFilter::create): * page/animation/CSSAnimationController.cpp: (WebCore::CSSAnimationController::CSSAnimationController): * page/animation/CSSPropertyAnimation.cpp: (WebCore::blendFunc): (WebCore::PropertyWrapperVisitedAffectedColor::PropertyWrapperVisitedAffectedColor): (WebCore::FillLayersPropertyWrapper::FillLayersPropertyWrapper): (WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap): * page/csp/ContentSecurityPolicy.cpp: (WebCore::ContentSecurityPolicy::updateSourceSelf): * page/csp/ContentSecurityPolicyDirectiveList.cpp: (WebCore::ContentSecurityPolicyDirectiveList::create): (WebCore::ContentSecurityPolicyDirectiveList::setCSPDirective): * page/linux/ResourceUsageOverlayLinux.cpp: (WebCore::ResourceUsageOverlay::platformInitialize): * page/mac/PageMac.mm: (WebCore::Page::addSchedulePair): * page/scrolling/AsyncScrollingCoordinator.cpp: (WebCore::AsyncScrollingCoordinator::AsyncScrollingCoordinator): * page/scrolling/ScrollingMomentumCalculator.cpp: (WebCore::ScrollingMomentumCalculator::create): * page/scrolling/ScrollingStateNode.cpp: (WebCore::ScrollingStateNode::appendChild): (WebCore::ScrollingStateNode::insertChild): * page/scrolling/ScrollingStateTree.cpp: (WebCore::ScrollingStateTree::commit): * page/scrolling/ScrollingTreeNode.cpp: (WebCore::ScrollingTreeNode::appendChild): * page/scrolling/mac/ScrollingMomentumCalculatorMac.mm: (WebCore::ScrollingMomentumCalculator::create): * platform/Length.cpp: (WebCore::convertTo100PercentMinusLength): (WebCore::blendMixedTypes): * platform/RemoteCommandListener.cpp: (WebCore::RemoteCommandListener::create): * platform/ScrollAnimator.cpp: (WebCore::ScrollAnimator::create): * platform/ScrollableArea.cpp: (WebCore::ScrollableArea::scrollAnimator const): (WebCore::ScrollableArea::ensureSnapOffsetsInfo): * platform/ThreadGlobalData.cpp: (WebCore::ThreadGlobalData::ThreadGlobalData): * platform/audio/AudioBus.cpp: (WebCore::AudioBus::AudioBus): (WebCore::AudioBus::copyWithGainFrom): * platform/audio/AudioChannel.h: * platform/audio/AudioResampler.cpp: (WebCore::AudioResampler::AudioResampler): (WebCore::AudioResampler::configureChannels): * platform/audio/DynamicsCompressor.cpp: (WebCore::DynamicsCompressor::setNumberOfChannels): * platform/audio/DynamicsCompressorKernel.cpp: (WebCore::DynamicsCompressorKernel::setNumberOfChannels): * platform/audio/FFTFrame.cpp: (WebCore::FFTFrame::createInterpolatedFrame): * platform/audio/HRTFDatabaseLoader.cpp: (WebCore::HRTFDatabaseLoader::load): * platform/audio/HRTFElevation.cpp: (WebCore::HRTFElevation::createForSubject): (WebCore::HRTFElevation::createByInterpolatingSlices): * platform/audio/HRTFKernel.cpp: (WebCore::HRTFKernel::HRTFKernel): (WebCore::HRTFKernel::createImpulseResponse): * platform/audio/MultiChannelResampler.cpp: (WebCore::MultiChannelResampler::MultiChannelResampler): * platform/audio/Panner.cpp: (WebCore::Panner::create): * platform/audio/PlatformMediaSession.cpp: (WebCore::PlatformMediaSession::create): * platform/audio/Reverb.cpp: (WebCore::Reverb::initialize): * platform/audio/ReverbConvolver.cpp: (WebCore::ReverbConvolver::ReverbConvolver): * platform/audio/ReverbConvolverStage.cpp: (WebCore::ReverbConvolverStage::ReverbConvolverStage): * platform/audio/gstreamer/AudioDestinationGStreamer.cpp: (WebCore::AudioDestination::create): * platform/audio/ios/AudioDestinationIOS.cpp: (WebCore::AudioDestination::create): * platform/audio/ios/AudioSessionIOS.mm: (WebCore::AudioSession::AudioSession): * platform/audio/mac/AudioDestinationMac.cpp: (WebCore::AudioDestination::create): * platform/audio/mac/AudioSampleDataSource.mm: (WebCore::AudioSampleDataSource::setInputFormat): (WebCore::AudioSampleDataSource::setOutputFormat): * platform/audio/mac/AudioSessionMac.cpp: (WebCore::AudioSession::AudioSession): * platform/cf/KeyedDecoderCF.cpp: (WebCore::KeyedDecoder::decoder): * platform/cf/KeyedEncoderCF.cpp: (WebCore::KeyedEncoder::encoder): * platform/cf/MainThreadSharedTimerCF.cpp: (WebCore::setupPowerObserver): * platform/cocoa/NetworkExtensionContentFilter.mm: (WebCore::NetworkExtensionContentFilter::create): * platform/cocoa/ParentalControlsContentFilter.mm: (WebCore::ParentalControlsContentFilter::create): * platform/cocoa/ScrollController.mm: (WebCore::ScrollController::updateScrollSnapPoints): * platform/encryptedmedia/clearkey/CDMClearKey.cpp: (WebCore::CDMFactoryClearKey::createCDM): * platform/gamepad/cocoa/GameControllerGamepadProvider.mm: (WebCore::GameControllerGamepadProvider::controllerDidConnect): * platform/gamepad/mac/HIDGamepadProvider.cpp: (WebCore::HIDGamepadProvider::deviceAdded): * platform/generic/KeyedDecoderGeneric.cpp: (WebCore::KeyedDecoderGeneric::Dictionary::add): (WebCore::KeyedDecoder::decoder): (WebCore::KeyedDecoderGeneric::KeyedDecoderGeneric): * platform/generic/KeyedEncoderGeneric.cpp: (WebCore::KeyedEncoder::encoder): * platform/generic/ScrollAnimatorGeneric.cpp: (WebCore::ScrollAnimator::create): (WebCore::ScrollAnimatorGeneric::ScrollAnimatorGeneric): (WebCore::ScrollAnimatorGeneric::ensureSmoothScrollingAnimation): * platform/glib/KeyedDecoderGlib.cpp: (WebCore::KeyedDecoder::decoder): * platform/glib/KeyedEncoderGlib.cpp: (WebCore::KeyedEncoder::encoder): * platform/graphics/BitmapImage.cpp: (WebCore::BitmapImage::startTimer): (WebCore::BitmapImage::decode): * platform/graphics/ComplexTextController.cpp: (WebCore::TextLayout::TextLayout): * platform/graphics/Font.cpp: (WebCore::Font::ensureDerivedFontData const): * platform/graphics/Font.h: (WebCore::Font::boundsForGlyph const): * platform/graphics/FontCache.cpp: (WebCore::FontCache::getCachedFontPlatformData): * platform/graphics/FontCascade.cpp: (WebCore::retrieveOrAddCachedFonts): (WebCore::FontCascade::displayListForTextRun const): * platform/graphics/FontCascadeFonts.cpp: (WebCore::FontCascadeFonts::GlyphPageCacheEntry::setGlyphDataForCharacter): * platform/graphics/GlyphMetricsMap.h: (WebCore::GlyphMetricsMap::locatePageSlowCase): * platform/graphics/GraphicsLayer.cpp: (WebCore::GraphicsLayer::setTransform): (WebCore::GraphicsLayer::setChildrenTransform): * platform/graphics/GraphicsLayer.h: * platform/graphics/Image.cpp: (WebCore::Image::startAnimationAsynchronously): * platform/graphics/MediaPlayer.cpp: (WebCore::MediaPlayer::MediaPlayer): (WebCore::MediaPlayer::loadWithNextMediaEngine): * platform/graphics/MediaPlayerPrivate.h: (WebCore::MediaPlayerPrivateInterface::seekable const): * platform/graphics/PathUtilities.cpp: (WebCore::FloatPointGraph::findOrCreateNode): * platform/graphics/Region.cpp: (WebCore::Region::setShape): * platform/graphics/Region.h: (WebCore::Region::copyShape const): (WebCore::Region::decode): * platform/graphics/TextTrackRepresentation.cpp: (WebCore::TextTrackRepresentation::create): * platform/graphics/angle/GraphicsContext3DANGLE.cpp: (WebCore::GraphicsContext3D::getExtensions): * platform/graphics/avfoundation/AudioSourceProviderAVFObjC.mm: (WebCore::AudioSourceProviderAVFObjC::prepare): * platform/graphics/avfoundation/CDMFairPlayStreaming.cpp: (WebCore::CDMFactoryFairPlayStreaming::createCDM): * platform/graphics/avfoundation/CDMPrivateMediaSourceAVFObjC.mm: (WebCore::CDMPrivateMediaSourceAVFObjC::createSession): * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp: (WebCore::MediaPlayerPrivateAVFoundation::buffered const): * platform/graphics/avfoundation/WebMediaSessionManagerMac.cpp: (WebCore::WebMediaSessionManagerMac::platformPicker): * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp: (WebCore::MediaPlayerPrivateAVFoundationCF::registerMediaEngine): (WebCore::MediaPlayerPrivateAVFoundationCF::platformBufferedTimeRanges const): (WebCore::MediaPlayerPrivateAVFoundationCF::createSession): (WebCore::AVFWrapper::notificationCallback): (WebCore::AVFWrapper::legibleOutputCallback): (WebCore::AVFWrapper::resourceLoaderShouldWaitForLoadingOfRequestedResource): (WebCore::AVFWrapper::platformLayer): * platform/graphics/avfoundation/objc/AudioTrackPrivateAVFObjC.mm: (WebCore::AudioTrackPrivateAVFObjC::AudioTrackPrivateAVFObjC): (WebCore::AudioTrackPrivateAVFObjC::setPlayerItemTrack): (WebCore::AudioTrackPrivateAVFObjC::setAssetTrack): (WebCore::AudioTrackPrivateAVFObjC::setMediaSelectionOption): * platform/graphics/avfoundation/objc/AudioTrackPrivateMediaSourceAVFObjC.cpp: (WebCore::AudioTrackPrivateMediaSourceAVFObjC::AudioTrackPrivateMediaSourceAVFObjC): (WebCore::AudioTrackPrivateMediaSourceAVFObjC::setAssetTrack): * platform/graphics/avfoundation/objc/ImageDecoderAVFObjC.mm: (WebCore::ImageDecoderAVFObjC::readTrackMetadata): * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm: (WebCore::MediaPlayerPrivateAVFoundationObjC::registerMediaEngine): (WebCore::MediaPlayerPrivateAVFoundationObjC::MediaPlayerPrivateAVFoundationObjC): (WebCore::MediaPlayerPrivateAVFoundationObjC::platformBufferedTimeRanges const): (WebCore::MediaPlayerPrivateAVFoundationObjC::updateRotationSession): (WebCore::MediaPlayerPrivateAVFoundationObjC::updateLastImage): (WebCore::MediaPlayerPrivateAVFoundationObjC::copyVideoTextureToPlatformTexture): (WebCore::MediaPlayerPrivateAVFoundationObjC::createSession): * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm: (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::MediaPlayerPrivateMediaSourceAVFObjC): (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::registerMediaEngine): (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::seekWithTolerance): (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::seekable const): (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::buffered const): (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::updateLastImage): (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::copyVideoTextureToPlatformTexture): * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm: (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::MediaPlayerPrivateMediaStreamAVFObjC): (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::registerMediaEngine): (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::seekable const): (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::buffered const): (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::updateCurrentFrameImage): * platform/graphics/avfoundation/objc/VideoTrackPrivateAVFObjC.cpp: (WebCore::VideoTrackPrivateAVFObjC::VideoTrackPrivateAVFObjC): (WebCore::VideoTrackPrivateAVFObjC::setPlayerItemTrack): (WebCore::VideoTrackPrivateAVFObjC::setAssetTrack): (WebCore::VideoTrackPrivateAVFObjC::setMediaSelectonOption): * platform/graphics/avfoundation/objc/VideoTrackPrivateMediaSourceAVFObjC.mm: (WebCore::VideoTrackPrivateMediaSourceAVFObjC::VideoTrackPrivateMediaSourceAVFObjC): (WebCore::VideoTrackPrivateMediaSourceAVFObjC::setAssetTrack): * platform/graphics/ca/GraphicsLayerCA.cpp: (WebCore::GraphicsLayerCA::recursiveCommitChanges): (WebCore::GraphicsLayerCA::ensureLayerAnimations): (WebCore::GraphicsLayerCA::createTransformAnimationsFromKeyframes): * platform/graphics/ca/TileController.cpp: (WebCore::TileController::TileController): (WebCore::TileController::setContentsScale): (WebCore::TileController::adjustTileCoverageRectForScrolling): (WebCore::TileController::tiledScrollingIndicatorLayer): * platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm: (WebCore::PlatformCALayerCocoa::commonInit): (WebCore::PlatformCALayerCocoa::setShapeRoundedRect): * platform/graphics/ca/cocoa/WebTiledBackingLayer.mm: (-[WebTiledBackingLayer createTileController:]): * platform/graphics/ca/win/PlatformCALayerWin.cpp: (PlatformCALayerWin::PlatformCALayerWin): * platform/graphics/ca/win/WebTiledBackingLayerWin.cpp: (WebTiledBackingLayerWin::createTileController): * platform/graphics/cairo/GraphicsContextImplCairo.cpp: (WebCore::GraphicsContextImplCairo::createFactory): (WebCore::m_private): * platform/graphics/cairo/ImageBufferCairo.cpp: (WebCore::ImageBufferData::swapBuffersIfNeeded): (WebCore::ImageBuffer::ImageBuffer): * platform/graphics/cg/ImageBufferCG.cpp: (WebCore::ImageBuffer::ImageBuffer): * platform/graphics/cocoa/FontCacheCoreText.cpp: (WebCore::FontCache::createFontPlatformData): * platform/graphics/cocoa/FontFamilySpecificationCoreText.cpp: (WebCore::FontFamilySpecificationCoreText::fontRanges const): * platform/graphics/cocoa/GraphicsContext3DCocoa.mm: (WebCore::GraphicsContext3D::GraphicsContext3D): * platform/graphics/cocoa/IOSurface.mm: (WebCore::IOSurface::ensureGraphicsContext): * platform/graphics/cocoa/TextTrackRepresentationCocoa.mm: (TextTrackRepresentation::create): * platform/graphics/cv/TextureCacheCV.mm: (WebCore::TextureCacheCV::create): * platform/graphics/displaylists/DisplayListReplayer.cpp: (WebCore::DisplayList::Replayer::replay): * platform/graphics/filters/FilterOperation.cpp: (WebCore::ReferenceFilterOperation::loadExternalDocumentIfNeeded): * platform/graphics/freetype/FontCacheFreeType.cpp: (WebCore::FontCache::createFontPlatformData): * platform/graphics/freetype/FontCustomPlatformDataFreeType.cpp: (WebCore::createFontCustomPlatformData): * platform/graphics/gpu/Texture.cpp: (WebCore::Texture::create): * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp: (WebCore::MediaPlayerPrivateGStreamer::registerMediaEngine): (WebCore::MediaPlayerPrivateGStreamer::buffered const): (WebCore::MediaPlayerPrivateGStreamer::ensureAudioSourceProvider): * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp: (WebCore::MediaPlayerPrivateGStreamerBase::pushTextureToCompositor): (WebCore::MediaPlayerPrivateGStreamerBase::copyVideoTextureToPlatformTexture): (WebCore::MediaPlayerPrivateGStreamerBase::nativeImageForCurrentTime): (WebCore::MediaPlayerPrivateGStreamerBase::pushNextHolePunchBuffer): * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp: (webKitWebSrcMakeRequest): * platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.cpp: (WebCore::MediaPlayerPrivateGStreamerMSE::registerMediaEngine): (WebCore::MediaPlayerPrivateGStreamerMSE::buffered const): * platform/graphics/holepunch/MediaPlayerPrivateHolePunch.cpp: (WebCore::MediaPlayerPrivateHolePunch::pushNextHolePunchBuffer): (WebCore::MediaPlayerPrivateHolePunch::registerMediaEngine): * platform/graphics/holepunch/MediaPlayerPrivateHolePunch.h: * platform/graphics/iso/ISOProtectionSchemeInfoBox.cpp: (WebCore::ISOProtectionSchemeInfoBox::parse): * platform/graphics/iso/ISOSchemeInformationBox.cpp: (WebCore::ISOSchemeInformationBox::parse): * platform/graphics/mac/FontCustomPlatformData.cpp: (WebCore::createFontCustomPlatformData): * platform/graphics/nicosia/NicosiaSceneIntegration.cpp: (Nicosia::SceneIntegration::createUpdateScope): * platform/graphics/nicosia/cairo/NicosiaCairoOperationRecorder.cpp: (Nicosia::createCommand): * platform/graphics/nicosia/cairo/NicosiaPaintingContextCairo.cpp: (Nicosia::PaintingContextCairo::ForPainting::ForPainting): (Nicosia::PaintingContextCairo::ForRecording::ForRecording): * platform/graphics/nicosia/texmap/NicosiaBackingStoreTextureMapperImpl.cpp: (Nicosia::BackingStoreTextureMapperImpl::createFactory): * platform/graphics/nicosia/texmap/NicosiaCompositionLayerTextureMapperImpl.cpp: (Nicosia::CompositionLayerTextureMapperImpl::createFactory): * platform/graphics/nicosia/texmap/NicosiaContentLayerTextureMapperImpl.cpp: (Nicosia::ContentLayerTextureMapperImpl::createFactory): * platform/graphics/nicosia/texmap/NicosiaGC3DLayer.cpp: (Nicosia::GC3DLayer::swapBuffersIfNeeded): * platform/graphics/nicosia/texmap/NicosiaImageBackingTextureMapperImpl.cpp: (Nicosia::ImageBackingTextureMapperImpl::createFactory): * platform/graphics/opengl/GraphicsContext3DOpenGL.cpp: (WebCore::GraphicsContext3D::getExtensions): * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp: (WebCore::GraphicsContext3D::compileShader): (WebCore::GraphicsContext3D::mappedSymbolName): * platform/graphics/opengl/GraphicsContext3DOpenGLES.cpp: (WebCore::GraphicsContext3D::getExtensions): (WebCore::GraphicsContext3D::GraphicsContext3D): * platform/graphics/texmap/GraphicsContext3DTextureMapper.cpp: (WebCore::GraphicsContext3D::GraphicsContext3D): (WebCore::GraphicsContext3D::getExtensions): * platform/graphics/texmap/TextureMapperGC3DPlatformLayer.cpp: (WebCore::TextureMapperGC3DPlatformLayer::swapBuffersIfNeeded): * platform/graphics/texmap/TextureMapperGL.cpp: (WebCore::TextureMapperGL::TextureMapperGL): (WebCore::TextureMapper::platformCreateAccelerated): * platform/graphics/texmap/TextureMapperPlatformLayerBuffer.cpp: (WebCore::TextureMapperPlatformLayerBuffer::clone): * platform/graphics/texmap/TextureMapperPlatformLayerProxy.cpp: (WebCore::TextureMapperPlatformLayerProxy::activateOnCompositingThread): * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp: (WebCore::CoordinatedGraphicsLayer::updateContentBuffers): * platform/graphics/texmap/coordinated/TiledBackingStore.cpp: (WebCore::TiledBackingStore::createTiles): * platform/graphics/transforms/TransformState.cpp: (WebCore::TransformState::operator=): (WebCore::TransformState::applyTransform): (WebCore::TransformState::setLastPlanarSecondaryQuad): * platform/graphics/transforms/TransformState.h: (WebCore::TransformState::setSecondaryQuad): * platform/graphics/win/FontCacheWin.cpp: (WebCore::FontCache::createFontPlatformData): * platform/graphics/win/FontCustomPlatformData.cpp: (WebCore::createFontCustomPlatformData): * platform/graphics/win/FontCustomPlatformDataCairo.cpp: (WebCore::createFontCustomPlatformData): * platform/graphics/win/FullScreenController.cpp: (WebCore::FullScreenController::FullScreenController): (WebCore::FullScreenController::enterFullScreen): * platform/graphics/win/GraphicsContextCairoWin.cpp: (WebCore::GraphicsContext::platformInit): * platform/graphics/win/GraphicsContextDirect2D.cpp: (WebCore::GraphicsContext::GraphicsContext): (WebCore::GraphicsContext::platformInit): * platform/graphics/win/GraphicsContextImplDirect2D.cpp: (WebCore::GraphicsContextImplDirect2D::createFactory): (WebCore::m_private): * platform/graphics/win/GraphicsContextWin.cpp: (WebCore::GraphicsContext::createWindowsBitmap): * platform/graphics/win/ImageBufferDirect2D.cpp: (WebCore::ImageBuffer::ImageBuffer): * platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp: (WebCore::MediaPlayerPrivateMediaFoundation::registerMediaEngine): (WebCore::MediaPlayerPrivateMediaFoundation::buffered const): (WebCore::MediaPlayerPrivateMediaFoundation::CustomVideoPresenter::CustomVideoPresenter): * platform/graphics/win/WKCAImageQueue.cpp: (WebCore::WKCAImageQueue::WKCAImageQueue): * platform/gtk/PasteboardGtk.cpp: (WebCore::Pasteboard::createForCopyAndPaste): (WebCore::Pasteboard::createForGlobalSelection): (WebCore::Pasteboard::createForDragAndDrop): * platform/gtk/PasteboardHelper.cpp: (WebCore::PasteboardHelper::writeClipboardContents): * platform/gtk/RenderThemeGadget.cpp: (WebCore::RenderThemeGadget::create): * platform/gtk/RenderThemeWidget.cpp: (WebCore::RenderThemeWidget::getOrCreate): (WebCore::RenderThemeScrollbar::RenderThemeScrollbar): (WebCore::RenderThemeComboBox::RenderThemeComboBox): * platform/image-decoders/bmp/BMPImageDecoder.cpp: (WebCore::BMPImageDecoder::decodeHelper): * platform/image-decoders/gif/GIFImageDecoder.cpp: (WebCore::GIFImageDecoder::decode): * platform/image-decoders/gif/GIFImageReader.cpp: (GIFFrameContext::decode): (GIFImageReader::addFrameIfNecessary): * platform/image-decoders/ico/ICOImageDecoder.cpp: (WebCore::ICOImageDecoder::decodeAtIndex): * platform/image-decoders/jpeg/JPEGImageDecoder.cpp: (WebCore::JPEGImageDecoder::decode): * platform/image-decoders/png/PNGImageDecoder.cpp: (WebCore::PNGImageDecoder::decode): * platform/ios/LegacyTileCache.mm: (WebCore::LegacyTileCache::LegacyTileCache): (WebCore::LegacyTileCache::commitScaleChange): * platform/ios/PasteboardIOS.mm: (WebCore::Pasteboard::createForDragAndDrop): (WebCore::Pasteboard::createForCopyAndPaste): * platform/ios/QuickLook.mm: (WebCore::registerQLPreviewConverterIfNeeded): * platform/ios/RemoteCommandListenerIOS.mm: (WebCore::RemoteCommandListener::create): * platform/ios/ScrollAnimatorIOS.mm: (WebCore::ScrollAnimator::create): * platform/libwpe/PasteboardLibWPE.cpp: (WebCore::Pasteboard::createForCopyAndPaste): * platform/mac/PasteboardMac.mm: (WebCore::Pasteboard::createForCopyAndPaste): (WebCore::Pasteboard::createForDragAndDrop): * platform/mac/RemoteCommandListenerMac.mm: (WebCore::RemoteCommandListener::create): * platform/mac/ScrollAnimatorMac.mm: (WebCore::ScrollAnimator::create): * platform/mediarecorder/MediaRecorderPrivateAVFImpl.cpp: (WebCore::MediaRecorderPrivateAVFImpl::create): * platform/mediastream/gstreamer/GStreamerAudioCaptureSource.cpp: (WebCore::m_capturer): (WebCore::GStreamerAudioCaptureSource::GStreamerAudioCaptureSource): * platform/mediastream/gstreamer/GStreamerMediaStreamSource.cpp: (WebCore::webkit_media_stream_src_init): * platform/mediastream/gstreamer/GStreamerVideoCaptureSource.cpp: (WebCore::GStreamerVideoCaptureSource::GStreamerVideoCaptureSource): (WebCore::m_capturer): * platform/mediastream/libwebrtc/GStreamerVideoEncoderFactory.cpp: (WebCore::GStreamerVideoEncoderFactory::CreateVideoEncoder): * platform/mediastream/libwebrtc/LibWebRTCProvider.cpp: (WebCore::BasicPacketSocketFactory::BasicPacketSocketFactory): (WebCore::initializePeerConnectionFactoryAndThreads): (WebCore::LibWebRTCProvider::createPeerConnection): (WebCore::LibWebRTCProvider::certificateGenerator): * platform/mediastream/libwebrtc/LibWebRTCProviderGStreamer.cpp: (WebCore::LibWebRTCProviderGStreamer::createDecoderFactory): (WebCore::LibWebRTCProviderGStreamer::createEncoderFactory): * platform/mediastream/mac/AudioTrackPrivateMediaStreamCocoa.cpp: (WebCore::AudioTrackPrivateMediaStreamCocoa::audioSamplesAvailable): * platform/mediastream/mac/MockRealtimeAudioSourceMac.mm: (WebCore::MockRealtimeAudioSourceMac::reconfigure): * platform/mediastream/mac/RealtimeOutgoingVideoSourceCocoa.mm: (WebCore::RealtimeOutgoingVideoSourceCocoa::convertToYUV): (WebCore::RealtimeOutgoingVideoSourceCocoa::rotatePixelBuffer): * platform/mock/RTCNotifiersMock.cpp: (WebCore::RemoteDataChannelNotifier::fire): * platform/mock/mediasource/MockMediaPlayerMediaSource.cpp: (WebCore::MockMediaPlayerMediaSource::registerMediaEngine): (WebCore::MockMediaPlayerMediaSource::buffered const): * platform/network/BlobResourceHandle.cpp: * platform/network/DataURLDecoder.cpp: (WebCore::DataURLDecoder::createDecodeTask): * platform/network/ResourceHandle.cpp: (WebCore::ResourceHandle::ResourceHandle): * platform/network/cf/ResourceHandleCFURLConnectionDelegateWithOperationQueue.cpp: (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::willSendRequest): (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::didReceiveResponse): (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::didReceiveData): (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::didFinishLoading): (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::didFail): (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::willCacheResponse): (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::didReceiveChallenge): (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::didSendBodyData): (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::canRespondToProtectionSpace): * platform/network/cocoa/WebCoreNSURLSession.mm: (-[WebCoreNSURLSessionDataTask _restart]): * platform/network/curl/CookieJarDB.cpp: (WebCore::CookieJarDB::searchCookies): (WebCore::CookieJarDB::createPrepareStatement): * platform/network/curl/CurlCacheManager.cpp: (WebCore::CurlCacheManager::loadIndex): (WebCore::CurlCacheManager::didReceiveResponse): * platform/network/curl/CurlContext.cpp: (WebCore::CurlContext::CurlContext): (WebCore::CurlHandle::willSetupSslCtx): * platform/network/curl/CurlFormDataStream.cpp: (WebCore::CurlFormDataStream::getPostData): * platform/network/curl/CurlMultipartHandle.cpp: (WebCore::CurlMultipartHandle::createIfNeeded): * platform/network/curl/CurlRequest.cpp: (WebCore::CurlRequest::runOnMainThread): (WebCore::CurlRequest::setupTransfer): * platform/network/curl/CurlRequestScheduler.cpp: (WebCore::CurlRequestScheduler::workerThread): * platform/network/curl/ResourceHandleCurl.cpp: (WebCore::ResourceHandle::delegate): * platform/network/curl/SocketStreamHandleImplCurl.cpp: (WebCore::SocketStreamHandleImpl::callOnWorkerThread): * platform/network/mac/WebCoreResourceHandleAsOperationQueueDelegate.mm: (-[WebCoreResourceHandleAsOperationQueueDelegate callFunctionOnMainThread:]): * platform/network/soup/DNSResolveQueueSoup.cpp: (WebCore::DNSResolveQueueSoup::resolve): * platform/network/soup/NetworkStorageSessionSoup.cpp: (WebCore::NetworkStorageSession::getCredentialFromPersistentStorage): * platform/text/BidiResolver.h: (WebCore::DerivedClass>::appendRunInternal): * platform/text/LocaleICU.cpp: (WebCore::Locale::create): (WebCore::LocaleICU::createLabelVector): (WebCore::createFallbackMonthLabels): (WebCore::createFallbackAMPMLabels): * platform/text/LocaleNone.cpp: (WebCore::Locale::create): * platform/text/TextCodecICU.cpp: (WebCore::TextCodecICU::registerCodecs): * platform/text/TextCodecLatin1.cpp: (WebCore::TextCodecLatin1::registerCodecs): * platform/text/TextCodecReplacement.cpp: (WebCore::TextCodecReplacement::registerCodecs): * platform/text/TextCodecUTF16.cpp: (WebCore::TextCodecUTF16::registerCodecs): * platform/text/TextCodecUTF8.cpp: (WebCore::TextCodecUTF8::registerCodecs): * platform/text/TextCodecUserDefined.cpp: (WebCore::TextCodecUserDefined::registerCodecs): * platform/text/mac/LocaleMac.mm: (WebCore::Locale::create): * platform/text/win/LocaleWin.cpp: (WebCore::Locale::create): * platform/text/win/TextCodecWin.cpp: (WebCore::newTextCodecWin): * platform/vr/openvr/VRPlatformManagerOpenVR.cpp: (WebCore::VRPlatformManagerOpenVR::create): (WebCore::VRPlatformManagerOpenVR::getVRDisplays): * platform/win/PasteboardWin.cpp: (WebCore::Pasteboard::createForCopyAndPaste): (WebCore::Pasteboard::createForDragAndDrop): * platform/win/SearchPopupMenuDB.cpp: (WebCore::SearchPopupMenuDB::createPreparedStatement): * platform/win/WCDataObject.cpp: (WebCore::WCDataObject::SetData): * rendering/CSSFilter.cpp: (WebCore::CSSFilter::buildReferenceFilter): * rendering/ComplexLineLayout.cpp: (WebCore::createRun): (WebCore::ComplexLineLayout::createRootInlineBox): (WebCore::ComplexLineLayout::handleTrailingSpaces): (WebCore::ComplexLineLayout::linkToEndLineIfNeeded): * rendering/FloatingObjects.cpp: (WebCore::FloatingObject::create): (WebCore::FloatingObject::copyToNewContainer const): (WebCore::FloatingObject::cloneForNewParent const): (WebCore::FloatingObjects::computePlacedFloatsTree): * rendering/Grid.cpp: (WebCore::GridIterator::nextEmptyGridArea): * rendering/GridBaselineAlignment.cpp: (WebCore::GridBaselineAlignment::updateBaselineAlignmentContext): * rendering/GridTrackSizingAlgorithm.cpp: (WebCore::GridTrackSizingAlgorithm::computeFlexFactorUnitSize const): (WebCore::GridTrackSizingAlgorithm::setup): * rendering/HitTestResult.cpp: (WebCore::HitTestResult::HitTestResult): (WebCore::HitTestResult::operator=): (WebCore::HitTestResult::listBasedTestResult const): (WebCore::HitTestResult::mutableListBasedTestResult): * rendering/InlineIterator.h: (WebCore::addPlaceholderRunForIsolatedInline): * rendering/LayerOverlapMap.cpp: (WebCore::LayerOverlapMap::pushCompositingContainer): * rendering/RenderBlock.cpp: (WebCore::insertIntoTrackedRendererMaps): (WebCore::PositionedDescendantsMap::addDescendant): (WebCore::RenderBlock::beginUpdateScrollInfoAfterLayoutTransaction): (WebCore::ensureBlockRareData): * rendering/RenderBlockFlow.cpp: (WebCore::RenderBlockFlow::layoutInlineChildren): (WebCore::RenderBlockFlow::layoutLineGridBox): (WebCore::RenderBlockFlow::createFloatingObjects): (WebCore::RenderBlockFlow::ensureLineBoxes): (WebCore::RenderBlockFlow::materializeRareBlockFlowData): * rendering/RenderBox.cpp: (WebCore::controlStatesForRenderer): (WebCore::RenderBox::createInlineBox): * rendering/RenderBoxModelObject.cpp: (WebCore::RenderBoxModelObject::ensureContinuationChainNode): * rendering/RenderCounter.cpp: (WebCore::makeCounterNode): * rendering/RenderFragmentContainer.cpp: (WebCore::RenderFragmentContainer::setRenderBoxFragmentInfo): * rendering/RenderFragmentedFlow.cpp: (WebCore::RenderFragmentedFlow::containingFragmentMap): * rendering/RenderGeometryMap.cpp: (WebCore::RenderGeometryMap::push): (WebCore::RenderGeometryMap::pushView): * rendering/RenderGrid.cpp: (WebCore::RenderGrid::computeEmptyTracksForAutoRepeat const): (WebCore::RenderGrid::createEmptyGridAreaAtSpecifiedPositionsOutsideGrid const): * rendering/RenderImage.cpp: (WebCore::RenderImage::RenderImage): * rendering/RenderInline.cpp: (WebCore::RenderInline::createInlineFlowBox): * rendering/RenderLayer.cpp: (WebCore::RenderLayer::updateNormalFlowList): (WebCore::RenderLayer::collectLayers): (WebCore::RenderLayer::updateTransform): (WebCore::RenderLayer::updateClipRects): (WebCore::RenderLayer::calculateClipRects const): * rendering/RenderLayerBacking.cpp: (WebCore::RenderLayerBacking::updateAncestorClippingStack): (WebCore::RenderLayerBacking::startAnimation): (WebCore::RenderLayerBacking::startTransition): * rendering/RenderLayerCompositor.cpp: (WebCore::RenderLayerCompositor::RenderLayerCompositor): (WebCore::RenderLayerCompositor::notifyFlushBeforeDisplayRefresh): (WebCore::LegacyWebKitScrollingLayerCoordinator::registerAllViewportConstrainedLayers): * rendering/RenderLayerModelObject.cpp: (WebCore::RenderLayerModelObject::createLayer): * rendering/RenderLineBreak.cpp: (WebCore::RenderLineBreak::createInlineBox): * rendering/RenderMultiColumnFlow.cpp: (WebCore::RenderMultiColumnFlow::RenderMultiColumnFlow): * rendering/RenderObject.cpp: (WebCore::RenderObject::ensureRareData): * rendering/RenderSnapshottedPlugIn.cpp: (WebCore::RenderSnapshottedPlugIn::RenderSnapshottedPlugIn): * rendering/RenderTable.cpp: (WebCore::RenderTable::styleDidChange): * rendering/RenderText.cpp: (WebCore::RenderText::createTextBox): (WebCore::RenderText::momentarilyRevealLastTypedCharacter): * rendering/RenderView.cpp: (WebCore::RenderView::repaintViewRectangle const): (WebCore::RenderView::compositor): (WebCore::RenderView::imageQualityController): (WebCore::RenderView::RepaintRegionAccumulator::RepaintRegionAccumulator): * rendering/RootInlineBox.cpp: (WebCore::RootInlineBox::placeEllipsis): * rendering/RootInlineBox.h: (WebCore::RootInlineBox::appendFloat): * rendering/SelectionRangeData.cpp: (WebCore::collect): (WebCore::SelectionRangeData::collectBounds const): (WebCore::SelectionRangeData::apply): * rendering/SimpleLineLayout.cpp: (WebCore::SimpleLineLayout::Layout::runResolver const): * rendering/SimpleLineLayoutFunctions.cpp: (WebCore::SimpleLineLayout::paintFlow): (WebCore::SimpleLineLayout::generateLineBoxTree): * rendering/TextAutoSizing.cpp: (WebCore::TextAutoSizing::addTextNode): * rendering/line/LineBreaker.cpp: (WebCore::LineBreaker::skipLeadingWhitespace): * rendering/shapes/RasterShape.cpp: (WebCore::RasterShapeIntervals::computeShapeMarginIntervals const): * rendering/shapes/Shape.cpp: (WebCore::createInsetShape): (WebCore::createCircleShape): (WebCore::createEllipseShape): (WebCore::createPolygonShape): (WebCore::Shape::createShape): (WebCore::Shape::createRasterShape): (WebCore::Shape::createBoxShape): * rendering/shapes/ShapeOutsideInfo.h: * rendering/style/BasicShapes.cpp: (WebCore::BasicShapePath::blend const): * rendering/style/ContentData.h: * rendering/style/FillLayer.cpp: (WebCore::FillLayer::FillLayer): (WebCore::FillLayer::operator=): * rendering/style/RenderStyle.cpp: (WebCore::RenderStyle::clonePtr): (WebCore::RenderStyle::addCachedPseudoStyle): (WebCore::RenderStyle::addCustomPaintWatchProperty): (WebCore::RenderStyle::setContent): (WebCore::RenderStyle::accessCounterDirectives): (WebCore::RenderStyle::ensureAnimations): (WebCore::RenderStyle::ensureTransitions): * rendering/style/SVGRenderStyleDefs.cpp: (WebCore::StyleShadowSVGData::StyleShadowSVGData): * rendering/style/ShadowData.cpp: (WebCore::ShadowData::ShadowData): * rendering/style/StyleRareInheritedData.cpp: (WebCore::StyleRareInheritedData::StyleRareInheritedData): * rendering/style/StyleRareNonInheritedData.cpp: (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData): * rendering/svg/RenderSVGImage.cpp: (WebCore::RenderSVGImage::RenderSVGImage): * rendering/svg/RenderSVGInline.cpp: (WebCore::RenderSVGInline::createInlineFlowBox): * rendering/svg/RenderSVGInlineText.cpp: (WebCore::RenderSVGInlineText::createTextBox): * rendering/svg/RenderSVGResourceFilter.cpp: (WebCore::RenderSVGResourceFilter::buildPrimitives const): (WebCore::RenderSVGResourceFilter::applyResource): * rendering/svg/RenderSVGResourceGradient.cpp: (WebCore::RenderSVGResourceGradient::applyResource): * rendering/svg/RenderSVGResourceMasker.cpp: (WebCore::RenderSVGResourceMasker::applyResource): * rendering/svg/RenderSVGResourcePattern.cpp: (WebCore::RenderSVGResourcePattern::buildPattern): * rendering/svg/RenderSVGShape.cpp: (WebCore::RenderSVGShape::updateShapeFromElement): * rendering/svg/SVGResources.cpp: (WebCore::SVGResources::setClipper): (WebCore::SVGResources::setFilter): (WebCore::SVGResources::setMarkerStart): (WebCore::SVGResources::setMarkerMid): (WebCore::SVGResources::setMarkerEnd): (WebCore::SVGResources::setMasker): (WebCore::SVGResources::setFill): (WebCore::SVGResources::setStroke): * rendering/svg/SVGResourcesCache.cpp: (WebCore::SVGResourcesCache::addResourcesFromRenderer): * rendering/svg/SVGTextMetricsBuilder.cpp: (WebCore::SVGTextMetricsBuilder::initializeMeasurementWithTextRenderer): * rendering/updating/RenderTreeBuilder.cpp: (WebCore::RenderTreeBuilder::RenderTreeBuilder): * rendering/updating/RenderTreeUpdater.cpp: (WebCore::RenderTreeUpdater::RenderTreeUpdater): * style/StyleInvalidator.cpp: (WebCore::Style::Invalidator::Invalidator): * style/StyleRelations.cpp: (WebCore::Style::commitRelationsToRenderStyle): * style/StyleScope.cpp: (WebCore::Style::Scope::resolver): (WebCore::Style::Scope::activeStyleSheetsContains const): * style/StyleTreeResolver.cpp: (WebCore::Style::TreeResolver::resolve): * svg/SVGDocumentExtensions.cpp: (WebCore::SVGDocumentExtensions::SVGDocumentExtensions): (WebCore::SVGDocumentExtensions::addPendingResource): (WebCore::SVGDocumentExtensions::addElementReferencingTarget): * svg/SVGElement.cpp: (WebCore::SVGElement::SVGElement): (WebCore::SVGElement::ensureSVGRareData): * svg/SVGGraphicsElement.cpp: (WebCore::SVGGraphicsElement::supplementalTransform): * svg/SVGPathByteStream.h: (WebCore::SVGPathByteStream::copy const): * svg/animation/SMILTimeContainer.cpp: (WebCore::SMILTimeContainer::schedule): * svg/graphics/SVGImage.cpp: (WebCore::SVGImage::dataChanged): * svg/properties/SVGAnimatedDecoratedProperty.h: (WebCore::SVGAnimatedDecoratedProperty::create): * svg/properties/SVGAnimatedPropertyAnimatorImpl.h: * svg/properties/SVGAnimatedPropertyPairAnimatorImpl.h: * svg/properties/SVGDecoratedEnumeration.h: (WebCore::SVGDecoratedEnumeration::create): * svg/properties/SVGPrimitivePropertyAnimator.h: (WebCore::SVGPrimitivePropertyAnimator::create): * svg/properties/SVGValuePropertyAnimatorImpl.h: * svg/properties/SVGValuePropertyListAnimatorImpl.h: * testing/InternalSettings.cpp: (WebCore::InternalSettings::from): * testing/Internals.cpp: (WebCore::InspectorStubFrontend::InspectorStubFrontend): (WebCore::Internals::Internals): (WebCore::Internals::enableMockSpeechSynthesizer): (WebCore::Internals::openDummyInspectorFrontend): (WebCore::Internals::setPrinting): (WebCore::Internals::initializeMockCDM): (WebCore::Internals::queueMicroTask): * testing/LegacyMockCDM.cpp: (WebCore::LegacyMockCDM::createSession): * testing/MockCDMFactory.cpp: (WebCore::MockCDMFactory::createCDM): * testing/MockContentFilter.cpp: (WebCore::MockContentFilter::create): * testing/MockGamepadProvider.cpp: (WebCore::MockGamepadProvider::setMockGamepadDetails): * workers/WorkerConsoleClient.cpp: (WebCore::WorkerConsoleClient::messageWithTypeAndLevel): * workers/WorkerEventQueue.cpp: (WebCore::WorkerEventQueue::enqueueEvent): * workers/WorkerGlobalScope.cpp: (WebCore::WorkerGlobalScope::WorkerGlobalScope): (WebCore::WorkerGlobalScope::addMessage): * workers/WorkerMessagingProxy.cpp: (WebCore::WorkerMessagingProxy::WorkerMessagingProxy): (WebCore::WorkerMessagingProxy::postMessageToWorkerGlobalScope): * workers/WorkerRunLoop.cpp: (WebCore::WorkerRunLoop::WorkerRunLoop): (WebCore::WorkerRunLoop::postTaskAndTerminate): (WebCore::WorkerRunLoop::postTaskForMode): * workers/WorkerScriptLoader.cpp: (WebCore::WorkerScriptLoader::loadAsynchronously): (WebCore::WorkerScriptLoader::createResourceRequest): * workers/WorkerThread.cpp: (WebCore::WorkerThread::WorkerThread): * workers/service/ServiceWorkerContainer.cpp: (WebCore::ServiceWorkerContainer::ready): (WebCore::ServiceWorkerContainer::addRegistration): (WebCore::ServiceWorkerContainer::removeRegistration): (WebCore::ServiceWorkerContainer::updateRegistration): (WebCore::ServiceWorkerContainer::getRegistration): (WebCore::ServiceWorkerContainer::getRegistrations): * workers/service/context/SWContextManager.cpp: (WebCore::SWContextManager::terminateWorker): * workers/service/context/ServiceWorkerThreadProxy.cpp: (WebCore::ServiceWorkerThreadProxy::ServiceWorkerThreadProxy): (WebCore::ServiceWorkerThreadProxy::createBlobLoader): * workers/service/server/RegistrationDatabase.cpp: (WebCore::RegistrationDatabase::openSQLiteDatabase): * workers/service/server/SWServer.cpp: (WebCore::SWServer::addRegistrationFromStore): (WebCore::SWServer::SWServer): (WebCore::SWServer::scheduleJob): (WebCore::SWServer::unregisterServiceWorkerClient): * workers/service/server/SWServerJobQueue.cpp: (WebCore::SWServerJobQueue::runRegisterJob): * worklets/PaintWorkletGlobalScope.cpp: (WebCore::PaintWorkletGlobalScope::registerPaint): * worklets/WorkletConsoleClient.cpp: (WebCore::WorkletConsoleClient::messageWithTypeAndLevel): * worklets/WorkletGlobalScope.cpp: (WebCore::WorkletGlobalScope::WorkletGlobalScope): (WebCore::WorkletGlobalScope::addConsoleMessage): * worklets/WorkletScriptController.cpp: (WebCore::WorkletScriptController::initScriptWithSubclass): * xml/XMLHttpRequest.cpp: (WebCore::XMLHttpRequest::upload): * xml/XPathFunctions.cpp: * xml/XPathPredicate.cpp: (WebCore::XPath::evaluatePredicate): * xml/XSLStyleSheetLibxslt.cpp: (WebCore::XSLStyleSheet::loadChildSheet): * xml/parser/XMLDocumentParser.cpp: (WebCore::XMLDocumentParser::handleError): * xml/parser/XMLDocumentParserLibxml2.cpp: (WebCore::PendingCallbacks::appendStartElementNSCallback): (WebCore::PendingCallbacks::appendEndElementNSCallback): (WebCore::PendingCallbacks::appendCharactersCallback): (WebCore::PendingCallbacks::appendProcessingInstructionCallback): (WebCore::PendingCallbacks::appendCDATABlockCallback): (WebCore::PendingCallbacks::appendCommentCallback): (WebCore::PendingCallbacks::appendInternalSubsetCallback): (WebCore::PendingCallbacks::appendErrorCallback): (WebCore::XMLDocumentParser::XMLDocumentParser): (WebCore::XMLDocumentParser::doEnd): 2019-08-18 Zalan Bujtas [LFC][TFC] Compute column min/max widths and table width. https://bugs.webkit.org/show_bug.cgi?id=200757 Reviewed by Antti Koivisto. For each column, determine a maximum and minimum column width from the cells that span only that column. The minimum is that required by the cell with the largest minimum cell width (or the column 'width', whichever is larger). The maximum is that required by the cell with the largest maximum cell width (or the column 'width', whichever is larger). * layout/tableformatting/TableFormattingContext.cpp: (WebCore::Layout::TableFormattingContext::computePreferredWidthForColumns const): * layout/tableformatting/TableGrid.cpp: (WebCore::Layout::TableGrid::appendCell): * layout/tableformatting/TableGrid.h: (WebCore::Layout::TableGrid::columns): (WebCore::Layout::TableGrid::rows): 2019-08-17 Darin Adler Tidy up checks to see if a character is in the Latin-1 range by using isLatin1 consistently https://bugs.webkit.org/show_bug.cgi?id=200861 Reviewed by Ross Kirsling. * css/makeSelectorPseudoClassAndCompatibilityElementMap.py: Use isLatin1. * css/makeSelectorPseudoElementsMap.py: Ditto. * editing/TextIterator.cpp: (WebCore::isNonLatin1Separator): Ditto. (WebCore::isSeparator): Ditto. * platform/network/HTTPParsers.cpp: (WebCore::isValidReasonPhrase): Ditto. (WebCore::isValidHTTPHeaderValue): Ditto. (WebCore::isValidAcceptHeaderValue): Ditto. * platform/text/TextCodecLatin1.cpp: (WebCore::TextCodecLatin1::decode): Ditto. * platform/text/TextCodecUTF8.cpp: (WebCore::TextCodecUTF8::handlePartialSequence): Ditto. (WebCore::TextCodecUTF8::decode): Ditto. 2019-08-18 Cathie Chen Crash in Document::deliverResizeObservations https://bugs.webkit.org/show_bug.cgi?id=200635 Reviewed by Simon Fraser. Document::deliverResizeObservations will crash if m_resizeObservers in Document is modified in JS callbacks when we are traversing observers in m_resizeObservers. This patch copy m_resizeObservers to a new vector, and check null for observers. Test: resize-observer/delete-observers-in-callbacks.html * dom/Document.cpp: (WebCore::Document::deliverResizeObservations): 2019-08-17 Sam Weinig Rename StringBuilder::flexibleAppend(...) to StringBuilder::append(...) https://bugs.webkit.org/show_bug.cgi?id=200756 Reviewed by Darin Adler. Update call sites for rename from StringBuilder::flexibleAppend(...) to StringBuilder::append(...). * Modules/webgpu/WHLSL/Metal/WHLSLEntryPointScaffolding.cpp: (WebCore::WHLSL::Metal::EntryPointScaffolding::emitResourceHelperTypes): (WebCore::WHLSL::Metal::EntryPointScaffolding::emitResourceSignature): (WebCore::WHLSL::Metal::EntryPointScaffolding::emitBuiltInsSignature): (WebCore::WHLSL::Metal::EntryPointScaffolding::emitMangledInputPath): (WebCore::WHLSL::Metal::EntryPointScaffolding::emitMangledOutputPath): (WebCore::WHLSL::Metal::EntryPointScaffolding::emitUnpackResourcesAndNamedBuiltIns): (WebCore::WHLSL::Metal::VertexEntryPointScaffolding::emitHelperTypes): (WebCore::WHLSL::Metal::VertexEntryPointScaffolding::emitSignature): (WebCore::WHLSL::Metal::VertexEntryPointScaffolding::emitUnpack): (WebCore::WHLSL::Metal::VertexEntryPointScaffolding::emitPack): (WebCore::WHLSL::Metal::FragmentEntryPointScaffolding::emitHelperTypes): (WebCore::WHLSL::Metal::FragmentEntryPointScaffolding::emitSignature): (WebCore::WHLSL::Metal::FragmentEntryPointScaffolding::emitUnpack): (WebCore::WHLSL::Metal::FragmentEntryPointScaffolding::emitPack): (WebCore::WHLSL::Metal::ComputeEntryPointScaffolding::emitSignature): * Modules/webgpu/WHLSL/Metal/WHLSLFunctionWriter.cpp: (WebCore::WHLSL::Metal::declareFunction): (WebCore::WHLSL::Metal::FunctionDefinitionWriter::visit): (WebCore::WHLSL::Metal::FunctionDefinitionWriter::emitLoop): (WebCore::WHLSL::Metal::FunctionDefinitionWriter::emitConstantExpressionString): * Modules/webgpu/WHLSL/Metal/WHLSLNativeFunctionWriter.cpp: (WebCore::WHLSL::Metal::inlineNativeFunction): * Modules/webgpu/WHLSL/Metal/WHLSLTypeNamer.cpp: (WebCore::WHLSL::Metal::TypeNamer::emitUnnamedTypeDefinition): (WebCore::WHLSL::Metal::TypeNamer::emitNamedTypeDefinition): * Modules/webgpu/WHLSL/WHLSLParser.cpp: (WebCore::WHLSL::Types::appendNameTo): * rendering/RenderLayerCompositor.cpp: (WebCore::RenderLayerCompositor::logLayerInfo): * testing/Internals.cpp: (WebCore::Internals::ongoingLoadsDescriptions const): 2019-08-16 Commit Queue Unreviewed, rolling out r248772. https://bugs.webkit.org/show_bug.cgi?id=200853 Causes timeouts in some WebGL tests (Requested by anttik on #webkit). Reverted changeset: "Content in
The float's formatting context only lays out the outer absolutely positioned box. The inner box (which is also an out-of-flow descendant of the float box) is taken care of by the outer box. * layout/FormattingContext.cpp: (WebCore::Layout::FormattingContext::layoutOutOfFlowContent const): (WebCore::Layout::FormattingContext::validateGeometryConstraintsAfterLayout const): (WebCore::Layout::FormattingContext::layoutOutOfFlowDescendants const): Deleted. * layout/FormattingContext.h: * layout/LayoutState.cpp: (WebCore::Layout::LayoutState::layoutFormattingContextSubtree): * layout/blockformatting/BlockFormattingContext.cpp: (WebCore::Layout::BlockFormattingContext::layoutFormattingContextRoot const): * layout/inlineformatting/InlineFormattingContext.cpp: (WebCore::Layout::InlineFormattingContext::layoutFormattingContextRoot const): 2019-08-07 Zalan Bujtas [LFC] Introduce Layout::Phase class https://bugs.webkit.org/show_bug.cgi?id=200473 Reviewed by Antti Koivisto. It helps to check whether we could run certain actions like layout while constructing the tree. * Sources.txt: * WebCore.xcodeproj/project.pbxproj: * layout/LayoutState.h: * layout/floats/FloatingContext.cpp: * layout/inlineformatting/InlineLine.cpp: * layout/layouttree/LayoutBox.cpp: (WebCore::Layout::Box::establishesFormattingContext const): (WebCore::Layout::Box::containingBlock const): (WebCore::Layout::Box::formattingContextRoot const): * layout/layouttree/LayoutTreeBuilder.cpp: (WebCore::Layout::TreeBuilder::createLayoutTree): 2019-08-07 Chris Lord context-attributes-alpha-depth-stencil-antialias fails on WPE WebKit https://bugs.webkit.org/show_bug.cgi?id=200434 Reviewed by Žan Doberšek. This patch fixes 16-bit surfaces being used for FBOs with no alpha component when using the GLES implementation of GraphicsContext3D. * platform/graphics/opengl/GraphicsContext3DOpenGLES.cpp: (WebCore::GraphicsContext3D::reshapeFBOs): Use GL_UNSIGNED_BYTE instead of GL_UNSIGNED_SHORT_5_6_5 for surfaces with no alpha. 2019-08-06 Saam Barati [WHLSL] Make resolveFunction in Checker faster https://bugs.webkit.org/show_bug.cgi?id=200287 Reviewed by Robin Morisset. This patch makes compute_boids faster by making function overload resolution faster inside the Checker. It's a ~6ms speedup in the checker. The main idea is to limit the number of overloads we need to look for by using a hash table that describes a function's type instead of just using a hash table keyed by a function's name. The interesting implementation detail here is we must construct entries in the hash table such that they still allow constants to be resolved to various types. This means that the key in the hash table must normalize the vector of types it uses to express a function's identity. The normalization rules are: - int => float - uint => float - T* => float* - T[] => float* The first two rules are because int constants can be matched against the float and uint types. The latter two rules are because the null literal can be matched against any pointer or any array reference (we pick float* arbitrarily). Even though it seems like these normalization rules would drastically broaden the efficacy of the hash table, we still see a 100x reduction in the number of overloads we must resolve inside compute_boids. We go from having to resolve 400,000 overloads to just resolving 4,000. * Modules/webgpu/WHLSL/WHLSLChecker.cpp: (WebCore::WHLSL::FunctionKey::FunctionKey): (WebCore::WHLSL::FunctionKey::isEmptyValue const): (WebCore::WHLSL::FunctionKey::isHashTableDeletedValue const): (WebCore::WHLSL::FunctionKey::hash const): (WebCore::WHLSL::FunctionKey::operator== const): (WebCore::WHLSL::FunctionKey::Hash::hash): (WebCore::WHLSL::FunctionKey::Hash::equal): (WebCore::WHLSL::FunctionKey::Traits::isEmptyValue): (WebCore::WHLSL::Checker::Checker): (WebCore::WHLSL::Checker::wrappedFloatType): (WebCore::WHLSL::Checker::genericPointerType): (WebCore::WHLSL::Checker::normalizedTypeForFunctionKey): (WebCore::WHLSL::Checker::resolveFunction): (WebCore::WHLSL::Checker::finishVisiting): (WebCore::WHLSL::Checker::visit): (WebCore::WHLSL::resolveFunction): Deleted. 2019-08-06 Loïc Yhuel Fix 32-bit Linux build after r248282 https://bugs.webkit.org/show_bug.cgi?id=200491 Reviewed by Youenn Fablet. minInterToneGapMs must be a size_t like interToneGap for std::max call. The other constants are updated for consistency, even if the compiler was able to cast them automatically. * Modules/mediastream/RTCDTMFSender.cpp: 2019-08-06 Commit Queue Unreviewed, rolling out r248289. https://bugs.webkit.org/show_bug.cgi?id=200488 Broke internal builds (Requested by drousso on #webkit). Reverted changeset: "Web Inspector: Styles: show @supports CSS groupings" https://bugs.webkit.org/show_bug.cgi?id=200419 https://trac.webkit.org/changeset/248289 2019-08-06 Chris Dumez Fix inefficiency in HTTPHeaderMap::set(CFStringRef, const String&) https://bugs.webkit.org/show_bug.cgi?id=200475 Reviewed by Darin Adler. In the case where CFStringGetCStringPtr() succeeds in returning us a pointer to the CFStringRef underlying characters but it is not a common header, we would fall back to calling HTTPHeaderMap::set(const String&, const String&) which would unecessarily call findHTTPHeaderName() again to try and determine if it is a common header. Avoid this by introducing a new setUncommonHeader() private method and calling this one instead. Also got rid of some code duplication at the same time. * platform/network/HTTPHeaderMap.cpp: (WebCore::HTTPHeaderMap::set): (WebCore::HTTPHeaderMap::setUncommonHeader): * platform/network/HTTPHeaderMap.h: * platform/network/HTTPParsers.cpp: (WebCore::parseHTTPHeader): * testing/MockCDMFactory.cpp: (WebCore::MockCDMInstance::setServerCertificate): 2019-08-06 Saam Barati [WHLSL] Remove the auto initialize variables pass https://bugs.webkit.org/show_bug.cgi?id=200472 Reviewed by Robin Morisset. From a separation of concerns perspective, it's a bit nicer to make variables without initializers call their default constructors as a transformation over the AST. This removes the need for the lowering to need to worry about such things. However, changing metal lowering to deal with this is trivial. It means we need to change one line of code in Metal code generation, and we get to remove a ~50 LOC AST pass. Also, in this case, it saves us from the compile time hit of having to run the auto initialize variables phase, which takes ~1.2ms on compute_boids. * Modules/webgpu/WHLSL/Metal/WHLSLFunctionWriter.cpp: (WebCore::WHLSL::Metal::FunctionDefinitionWriter::visit): * Modules/webgpu/WHLSL/WHLSLAutoInitializeVariables.cpp: Removed. * Modules/webgpu/WHLSL/WHLSLAutoInitializeVariables.h: Removed. * Modules/webgpu/WHLSL/WHLSLPrepare.cpp: (WebCore::WHLSL::prepareShared): * Sources.txt: * WebCore.xcodeproj/project.pbxproj: 2019-08-06 Sam Weinig WHLSL Metal code generation unnecessarily does string copies by passing partial results as Strings https://bugs.webkit.org/show_bug.cgi?id=200471 Reviewed by Saam Barati. Avoid string copies by passing a single StringBuilder all the way through Metal code generation and only converting to a String when passing the constructed shader to Metal API. Where possible, use StringView in lieu of String for temporary strings being passed to the StringBuilder to avoid the allocation overhead of StringImpl. * Modules/webgpu/WHLSL/AST/WHLSLAddressSpace.h: (WebCore::WHLSL::AST::toString): Switch to StringView. * Modules/webgpu/WHLSL/AST/WHLSLBuiltInSemantic.h: (WebCore::WHLSL::AST::BuiltInSemantic::toString const): Switch to StringView. * Modules/webgpu/WHLSL/AST/WHLSLEntryPointType.h: (WebCore::WHLSL::AST::toString): Switch to StringView. * Modules/webgpu/WHLSL/AST/WHLSLPointerType.h: Remove unnecessary "private:". * Modules/webgpu/WHLSL/AST/WHLSLResourceSemantic.h: (WebCore::WHLSL::AST::ResourceSemantic::toString): Switch to StringView. * Modules/webgpu/WHLSL/Metal/WHLSLEntryPointScaffolding.cpp: (WebCore::WHLSL::Metal::EntryPointScaffolding::emitResourceHelperTypes): (WebCore::WHLSL::Metal::EntryPointScaffolding::emitResourceSignature): (WebCore::WHLSL::Metal::EntryPointScaffolding::emitBuiltInsSignature): (WebCore::WHLSL::Metal::EntryPointScaffolding::emitMangledInputPath): (WebCore::WHLSL::Metal::EntryPointScaffolding::emitMangledOutputPath): (WebCore::WHLSL::Metal::EntryPointScaffolding::emitUnpackResourcesAndNamedBuiltIns): (WebCore::WHLSL::Metal::VertexEntryPointScaffolding::emitHelperTypes): (WebCore::WHLSL::Metal::VertexEntryPointScaffolding::emitSignature): (WebCore::WHLSL::Metal::VertexEntryPointScaffolding::emitUnpack): (WebCore::WHLSL::Metal::VertexEntryPointScaffolding::emitPack): (WebCore::WHLSL::Metal::FragmentEntryPointScaffolding::emitHelperTypes): (WebCore::WHLSL::Metal::FragmentEntryPointScaffolding::emitSignature): (WebCore::WHLSL::Metal::FragmentEntryPointScaffolding::emitUnpack): (WebCore::WHLSL::Metal::FragmentEntryPointScaffolding::emitPack): (WebCore::WHLSL::Metal::ComputeEntryPointScaffolding::emitHelperTypes): (WebCore::WHLSL::Metal::ComputeEntryPointScaffolding::emitSignature): (WebCore::WHLSL::Metal::ComputeEntryPointScaffolding::emitUnpack): (WebCore::WHLSL::Metal::ComputeEntryPointScaffolding::emitPack): (WebCore::WHLSL::Metal::EntryPointScaffolding::resourceHelperTypes): Deleted. (WebCore::WHLSL::Metal::EntryPointScaffolding::resourceSignature): Deleted. (WebCore::WHLSL::Metal::EntryPointScaffolding::builtInsSignature): Deleted. (WebCore::WHLSL::Metal::EntryPointScaffolding::mangledInputPath): Deleted. (WebCore::WHLSL::Metal::EntryPointScaffolding::mangledOutputPath): Deleted. (WebCore::WHLSL::Metal::EntryPointScaffolding::unpackResourcesAndNamedBuiltIns): Deleted. (WebCore::WHLSL::Metal::VertexEntryPointScaffolding::helperTypes): Deleted. (WebCore::WHLSL::Metal::VertexEntryPointScaffolding::signature): Deleted. (WebCore::WHLSL::Metal::VertexEntryPointScaffolding::unpack): Deleted. (WebCore::WHLSL::Metal::VertexEntryPointScaffolding::pack): Deleted. (WebCore::WHLSL::Metal::FragmentEntryPointScaffolding::helperTypes): Deleted. (WebCore::WHLSL::Metal::FragmentEntryPointScaffolding::signature): Deleted. (WebCore::WHLSL::Metal::FragmentEntryPointScaffolding::unpack): Deleted. (WebCore::WHLSL::Metal::FragmentEntryPointScaffolding::pack): Deleted. (WebCore::WHLSL::Metal::ComputeEntryPointScaffolding::helperTypes): Deleted. (WebCore::WHLSL::Metal::ComputeEntryPointScaffolding::signature): Deleted. (WebCore::WHLSL::Metal::ComputeEntryPointScaffolding::unpack): Deleted. (WebCore::WHLSL::Metal::ComputeEntryPointScaffolding::pack): Deleted. * Modules/webgpu/WHLSL/Metal/WHLSLEntryPointScaffolding.h: Rather than have scaffolding return strings, pass in StringBuilders everywhere. * Modules/webgpu/WHLSL/Metal/WHLSLFunctionWriter.cpp: (WebCore::WHLSL::Metal::FunctionDefinitionWriter::FunctionDefinitionWriter): (WebCore::WHLSL::Metal::FunctionDefinitionWriter::visit): (WebCore::WHLSL::Metal::FunctionDefinitionWriter::emitConstantExpressionString): (WebCore::WHLSL::Metal::generateMetalFunctionsMapping): (WebCore::WHLSL::Metal::emitSharedMetalFunctions): (WebCore::WHLSL::Metal::emitMetalFunctions): (WebCore::WHLSL::Metal::FunctionDeclarationWriter::FunctionDeclarationWriter): Deleted. (WebCore::WHLSL::Metal::FunctionDeclarationWriter::toString): Deleted. (WebCore::WHLSL::Metal::FunctionDefinitionWriter::toString): Deleted. (WebCore::WHLSL::Metal::FunctionDefinitionWriter::constantExpressionString): Deleted. (WebCore::WHLSL::Metal::RenderFunctionDefinitionWriter::RenderFunctionDefinitionWriter): Deleted. (WebCore::WHLSL::Metal::ComputeFunctionDefinitionWriter::ComputeFunctionDefinitionWriter): Deleted. (WebCore::WHLSL::Metal::sharedMetalFunctions): Deleted. (WebCore::WHLSL::Metal::metalFunctions): Deleted. * Modules/webgpu/WHLSL/Metal/WHLSLFunctionWriter.h: Rather than returning Strings from function generation functions, pass in StringBuilders everywhere. * Modules/webgpu/WHLSL/Metal/WHLSLMetalCodeGenerator.cpp: (WebCore::WHLSL::Metal::metalCodeProlog): (WebCore::WHLSL::Metal::dumpMetalCodeIfNeeded): (WebCore::WHLSL::Metal::generateMetalCode): (WebCore::WHLSL::Metal::generateMetalCodeShared): Deleted. * Modules/webgpu/WHLSL/Metal/WHLSLMetalCodeGenerator.h: Switch RenderMetalCode and ComputeMetalCode to contain StringBuilders to allow delaying conversion to String to the latest point possible. * Modules/webgpu/WHLSL/Metal/WHLSLTypeNamer.cpp: (WebCore::WHLSL::Metal::TypeNamer::emitMetalTypeDeclarations): (WebCore::WHLSL::Metal::TypeNamer::emitUnnamedTypeDefinition): (WebCore::WHLSL::Metal::TypeNamer::emitNamedTypeDefinition): (WebCore::WHLSL::Metal::TypeNamer::emitAllUnnamedTypeDefinitions): (WebCore::WHLSL::Metal::TypeNamer::emitMetalTypeDefinitions): (WebCore::WHLSL::Metal::TypeNamer::emitMetalTypes): (WebCore::WHLSL::Metal::MetalTypeDeclarationWriter::MetalTypeDeclarationWriter): Deleted. (WebCore::WHLSL::Metal::MetalTypeDeclarationWriter::toString): Deleted. (WebCore::WHLSL::Metal::MetalTypeDeclarationWriter::visit): Deleted. (WebCore::WHLSL::Metal::TypeNamer::metalTypeDeclarations): Deleted. (WebCore::WHLSL::Metal::TypeNamer::metalTypeDefinitions): Deleted. (WebCore::WHLSL::Metal::TypeNamer::metalTypes): Deleted. * Modules/webgpu/WHLSL/Metal/WHLSLTypeNamer.h: Rather than returning Strings from function generation functions, pass in StringBuilders everywhere. * Modules/webgpu/WHLSL/WHLSLParser.cpp: (WebCore::WHLSL::Parser::parseResourceSemantic): Remove use of _str, which allocates a String, and just use a StringView directly. * Modules/webgpu/WHLSL/WHLSLPrepare.h: Switch RenderPrepareResult and ComputePrepareResult to contain StringBuilders to allow delaying conversion to String to the latest point possible. * platform/graphics/gpu/cocoa/GPUComputePipelineMetal.mm: (WebCore::trySetFunctions): * platform/graphics/gpu/cocoa/GPURenderPipelineMetal.mm: (WebCore::trySetFunctions): Convert StringBuilders to String at the last moment necessary. Adds a FIXME to improve in the future by adding direct conversion from StringBuilder to NSString to avoid another copy. 2019-08-06 Saam Barati [WHLSL] Reduce the number of variables that make it into the global struct by skipping stdlib functions and internal uses of MakePointerExpression/MakeArrayReference https://bugs.webkit.org/show_bug.cgi?id=200463 Reviewed by Myles C. Maxfield. This patch makes it so that we put fewer variables in the global struct. This decreases end-to-end running time in compute_boids by 30% (with p = 0.0001). We achieve this in two ways: 1. We track if each function is user code or "standard library" code. We also count native functions as the standard library. We know a priori that the standard library never escapes any variables. So the preserve variable lifetimes phase skips analyzing all standard library functions and also skips passing the global struct to any standard library functions. 2. We internally emit MakePointerExpression/MakeArrayReferenceExpression nodes in the compiler in various phases. We sometimes emit these nodes in such a way that we know that this address-of expression does not cause the variable to escape. We now mark each address-of expressions as either: - Conservatively escaping. We conservatively do this for all user code. - Not escaping. This means that this address-of operation definitely does not escape the variable. If a variable never has an escaping use, we will omit putting this variable in the struct. * Modules/webgpu/WHLSL/AST/WHLSLAddressEscapeMode.h: Added. * Modules/webgpu/WHLSL/AST/WHLSLFunctionDeclaration.h: (WebCore::WHLSL::AST::FunctionDeclaration::FunctionDeclaration): (WebCore::WHLSL::AST::FunctionDeclaration::parsingMode const): * Modules/webgpu/WHLSL/AST/WHLSLMakeArrayReferenceExpression.h: (WebCore::WHLSL::AST::MakeArrayReferenceExpression::MakeArrayReferenceExpression): (WebCore::WHLSL::AST::MakeArrayReferenceExpression::mightEscape const): * Modules/webgpu/WHLSL/AST/WHLSLMakePointerExpression.h: (WebCore::WHLSL::AST::MakePointerExpression::MakePointerExpression): (WebCore::WHLSL::AST::MakePointerExpression::mightEscape const): * Modules/webgpu/WHLSL/WHLSLChecker.cpp: (WebCore::WHLSL::resolveWithOperatorAnderIndexer): (WebCore::WHLSL::resolveWithOperatorLength): (WebCore::WHLSL::resolveWithReferenceComparator): * Modules/webgpu/WHLSL/WHLSLParser.cpp: (WebCore::WHLSL::Parser::parse): (WebCore::WHLSL::Parser::parseComputeFunctionDeclaration): (WebCore::WHLSL::Parser::parseVertexOrFragmentFunctionDeclaration): (WebCore::WHLSL::Parser::parseRegularFunctionDeclaration): (WebCore::WHLSL::Parser::parseOperatorFunctionDeclaration): (WebCore::WHLSL::Parser::parsePossiblePrefix): * Modules/webgpu/WHLSL/WHLSLParser.h: * Modules/webgpu/WHLSL/WHLSLParsingMode.h: Added. * Modules/webgpu/WHLSL/WHLSLPrepare.cpp: (WebCore::WHLSL::prepareShared): * Modules/webgpu/WHLSL/WHLSLPreserveVariableLifetimes.cpp: * Modules/webgpu/WHLSL/WHLSLPropertyResolver.cpp: (WebCore::WHLSL::wrapAnderCallArgument): (WebCore::WHLSL::modify): (WebCore::WHLSL::PropertyResolver::visit): * Modules/webgpu/WHLSL/WHLSLStandardLibraryUtilities.cpp: (WebCore::WHLSL::includeStandardLibrary): * Modules/webgpu/WHLSL/WHLSLSynthesizeArrayOperatorLength.cpp: (WebCore::WHLSL::synthesizeArrayOperatorLength): * Modules/webgpu/WHLSL/WHLSLSynthesizeConstructors.cpp: (WebCore::WHLSL::synthesizeConstructors): * Modules/webgpu/WHLSL/WHLSLSynthesizeEnumerationFunctions.cpp: (WebCore::WHLSL::synthesizeEnumerationFunctions): * Modules/webgpu/WHLSL/WHLSLSynthesizeStructureAccessors.cpp: (WebCore::WHLSL::synthesizeStructureAccessors): * WebCore.xcodeproj/project.pbxproj: 2019-08-06 Jer Noble Adopt -expectMinimumUpcomingSampleBufferPresentationTime: https://bugs.webkit.org/show_bug.cgi?id=200457 Reviewed by Eric Carlson. Test: media/media-source/media-source-minimumupcomingpresentationtime.html Adopt a new API vended by AVSampleBufferDisplayLayer, piped from SourceBuffer down through SourceBufferPrivate to SourceBufferPrivateAVFObjC. This value should be reset and updated when new samples are appended. * Modules/mediasource/SourceBuffer.cpp: (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveSample): (WebCore::SourceBuffer::provideMediaData): (WebCore::SourceBuffer::updateMinimumUpcomingPresentationTime): (WebCore::SourceBuffer::resetMinimumUpcomingPresentationTime): (WebCore::SourceBuffer::minimumUpcomingPresentationTimeForTrackID): (WebCore::SourceBuffer::setMaximumQueueDepthForTrackID): * Modules/mediasource/SourceBuffer.h: * platform/graphics/SourceBufferPrivate.h: (WebCore::SourceBufferPrivate::canSetMinimumUpcomingPresentationTime const): (WebCore::SourceBufferPrivate::setMinimumUpcomingPresentationTime): (WebCore::SourceBufferPrivate::clearMinimumUpcomingPresentationTime): (WebCore::SourceBufferPrivate::enqueuedSamplesForTrackID): (WebCore::SourceBufferPrivate::minimumUpcomingPresentationTimeForTrackID): (WebCore::SourceBufferPrivate::setMaximumQueueDepthForTrackID): * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.h: * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm: (WebCore::SourceBufferPrivateAVFObjC::canSetMinimumUpcomingPresentationTime const): (WebCore::SourceBufferPrivateAVFObjC::setMinimumUpcomingPresentationTime): (WebCore::SourceBufferPrivateAVFObjC::clearMinimumUpcomingPresentationTime): * platform/mock/mediasource/MockSourceBufferPrivate.cpp: (WebCore::MockSourceBufferPrivate::minimumUpcomingPresentationTimeForTrackID): (WebCore::MockSourceBufferPrivate::setMaximumQueueDepthForTrackID): (WebCore::MockSourceBufferPrivate::canSetMinimumUpcomingPresentationTime const): (WebCore::MockSourceBufferPrivate::setMinimumUpcomingPresentationTime): (WebCore::MockSourceBufferPrivate::clearMinimumUpcomingPresentationTime): * platform/mock/mediasource/MockSourceBufferPrivate.h: * testing/Internals.cpp: (WebCore::Internals::minimumUpcomingPresentationTimeForTrackID): (WebCore::Internals::setMaximumQueueDepthForTrackID): * testing/Internals.h: * testing/Internals.idl: 2019-08-06 Antti Koivisto Add release assert against InvalidationRuleSet mutation during invalidation https://bugs.webkit.org/show_bug.cgi?id=200467 Reviewed by Chris Dumez. Try to get a more informative stack for rdar://problem/53413013 * css/DocumentRuleSets.cpp: (WebCore::DocumentRuleSets::~DocumentRuleSets): (WebCore::DocumentRuleSets::collectFeatures const): * css/DocumentRuleSets.h: * style/AttributeChangeInvalidation.cpp: (WebCore::Style::AttributeChangeInvalidation::invalidateStyleWithRuleSets): * style/ClassChangeInvalidation.cpp: (WebCore::Style::ClassChangeInvalidation::invalidateStyleWithRuleSets): 2019-08-06 Antti Koivisto REGRESSION: Cannot tap on any buttons on m.naver.com home screen on iPad https://bugs.webkit.org/show_bug.cgi?id=200466 Reviewed by Zalan Bujtas. The page calls preventDefault() for a mouse event generated by a site specific quirk. * page/Quirks.cpp: (WebCore::Quirks::shouldDispatchSimulatedMouseEvents const): Disable the quirk for the "m." subdomain. This is a mobile site that don't need or expect them. 2019-08-06 Wenson Hsieh [iPadOS] Unable to increase zoom level on Google using the Aa menu https://bugs.webkit.org/show_bug.cgi?id=200453 Reviewed by Tim Horton. Makes a couple of minor adjustments to how layout size scale factor is handled in ViewportConfiguration, to address some scenarios in which adjusting WKWebView's _viewScale does not have any apparent effect on the page. See changes below for more detail. Tests: fast/viewport/ios/non-responsive-viewport-after-changing-view-scale.html fast/viewport/ios/responsive-viewport-with-minimum-width-after-changing-view-scale.html * page/ViewportConfiguration.cpp: (WebCore::ViewportConfiguration::initialScaleFromSize const): When the page is either zoomed in or zoomed out using _viewScale, let the specified initial scale take precedence over the scale computed by fitting the content width to the view width, or the scale computed by fitting the content height to the view height. This avoids a scenario in which nothing happens when increasing view scale in a responsively designed web page that has a fixed minimum width. Before this change, when computing the initial scale at a view scale that would not allow the entire content width of the page to fit within the viewport, the new initial scale would remain unchanged if the initial scale in the meta viewport is not also set to 1, because a new initial scale would be computed in ViewportConfiguration::initialScaleFromSize to accomodate for the entire content width. Our new behavior allows us to zoom into the page, even if doing so would cause horizontal scrolling. (WebCore::ViewportConfiguration::updateConfiguration): When the page is either zoomed in or zoomed out using _viewScale and the default viewport configuration has a fixed width (e.g. on iPhone), then adjust the width of the default viewport configuration to account for the _viewScale. For example, the default width of a viewport-less web page is 980px on iPhone; at a view scale of 2, this would become 490px instead, and at 0.5 view scale, it would become 1960px. This ensures that on iPhone, for web pages without a meta viewport, changing the view scale still changes the layout and initial scale of the web page. * page/ViewportConfiguration.h: (WebCore::ViewportConfiguration::layoutSizeIsExplicitlyScaled const): 2019-08-05 Zalan Bujtas [LFC] Remove out-of-flow descendants from Container https://bugs.webkit.org/show_bug.cgi?id=200430 Reviewed by Antti Koivisto. The out-of-flow descendant list is the last "formatting context type" bit in the layout tree. Let's cached them in the FormattingStates instead for now. * layout/FormattingContext.cpp: (WebCore::Layout::FormattingContext::layoutOutOfFlowDescendants const): * layout/FormattingContext.h: * layout/FormattingState.h: (WebCore::Layout::FormattingState::addOutOfFlowBox): (WebCore::Layout::FormattingState::outOfFlowBoxes const): * layout/LayoutState.cpp: (WebCore::Layout::LayoutState::layoutFormattingContextSubtree): (WebCore::Layout::LayoutState::createFormattingStateForFormattingRootIfNeeded): (WebCore::Layout::LayoutState::run): * layout/LayoutState.h: * layout/blockformatting/BlockFormattingContext.cpp: (WebCore::Layout::BlockFormattingContext::layoutFormattingContextRoot const): * layout/inlineformatting/InlineFormattingContext.cpp: (WebCore::Layout::InlineFormattingContext::layoutFormattingContextRoot const): * layout/layouttree/LayoutBox.h: * layout/layouttree/LayoutContainer.cpp: (WebCore::Layout::Container::addOutOfFlowDescendant): Deleted. * layout/layouttree/LayoutContainer.h: * layout/layouttree/LayoutTreeBuilder.cpp: (WebCore::Layout::TreeBuilder::createLayoutTree): * page/FrameViewLayoutContext.cpp: (WebCore::layoutUsingFormattingContext): 2019-08-05 Devin Rousso Web Inspector: Styles: show @supports CSS groupings https://bugs.webkit.org/show_bug.cgi?id=200419 Reviewed by Joseph Pecoraro. Test: inspector/css/getMatchedStylesForNode.html * inspector/InspectorStyleSheet.cpp: (WebCore::buildArrayForGroupings): Added. (WebCore::InspectorStyleSheet::buildObjectForRule): (WebCore::buildMediaObject): Deleted. (WebCore::fillMediaListChain): Deleted. * css/MediaList.h: * css/MediaList.cpp: (WebCore::MediaQuerySet::MediaQuerySet): Remove the `lastLine` as it was never set by anyone and wasn't used by Web Inspector. 2019-08-05 Youenn Fablet Make Logger::log thread safe so that it can be used from background threads https://bugs.webkit.org/show_bug.cgi?id=200448 Reviewed by Eric Carlson. No change of behavior. * dom/Document.cpp: (WebCore::crossThreadCopy): (WebCore::Document::didLogMessage): Make sure to hop to the main thread if needed. * platform/mediastream/mac/RealtimeIncomingAudioSourceCocoa.cpp: (WebCore::RealtimeIncomingAudioSourceCocoa::OnData): Remove hopping to the main thread. * platform/mediastream/mac/RealtimeIncomingVideoSourceCocoa.mm: (WebCore::RealtimeIncomingVideoSourceCocoa::OnFrame): Remove hopping to the main thread. 2019-08-05 Devin Rousso Can't use $0, $1 etc when inspecting Google Docs pages because the content uses these for function names https://bugs.webkit.org/show_bug.cgi?id=195834 Reviewed by Joseph Pecoraro. Allow the user to alias saved results by providing a different prefix (e.g. "$") from within Web Inspector. When changing the alias, all existing saved results will update to be reference-able from the new alias. Test: inspector/runtime/setSavedResultAlias.html * inspector/CommandLineAPIModuleSource.js: (CommandLineAPI): 2019-08-05 Devin Rousso Web Inspector: Timelines: disable related agents when the tab is closed https://bugs.webkit.org/show_bug.cgi?id=200118 Reviewed by Joseph Pecoraro. Rework how `enable`/`disable` is used for timeline-related agents so that events are not sent and data isn't kept alive when the Timelines tab isn't enabled. * inspector/agents/InspectorTimelineAgent.h: * inspector/agents/InspectorTimelineAgent.cpp: (WebCore::InspectorTimelineAgent::didCreateFrontendAndBackend): (WebCore::InspectorTimelineAgent::willDestroyFrontendAndBackend): (WebCore::InspectorTimelineAgent::enable): (WebCore::InspectorTimelineAgent::disable): (WebCore::InspectorTimelineAgent::start): (WebCore::InspectorTimelineAgent::stop): (WebCore::InspectorTimelineAgent::internalStart): (WebCore::InspectorTimelineAgent::internalStop): (WebCore::InspectorTimelineAgent::startFromConsole): (WebCore::InspectorTimelineAgent::stopFromConsole): (WebCore::InspectorTimelineAgent::mainFrameStartedLoading): (WebCore::InspectorTimelineAgent::startProgrammaticCapture): (WebCore::InspectorTimelineAgent::stopProgrammaticCapture): Rename `m_enabled*` to `m_tracking*` to match other timeline-related agents. * inspector/agents/InspectorMemoryAgent.h: * inspector/agents/InspectorMemoryAgent.cpp: (WebCore::InspectorMemoryAgent::didCreateFrontendAndBackend): (WebCore::InspectorMemoryAgent::willDestroyFrontendAndBackend): (WebCore::InspectorMemoryAgent::enable): (WebCore::InspectorMemoryAgent::disable): (WebCore::InspectorMemoryAgent::didHandleMemoryPressure): * inspector/InstrumentingAgents.h: (WebCore::InstrumentingAgents::trackingInspectorTimelineAgent): Added. (WebCore::InstrumentingAgents::setTrackingInspectorTimelineAgent): Added. (WebCore::InstrumentingAgents::persistentInspectorTimelineAgent): Added. (WebCore::InstrumentingAgents::setPersistentInspectorTimelineAgent): Added. * inspector/InstrumentingAgents.cpp: (WebCore::InstrumentingAgents::reset): * inspector/InspectorInstrumentation.h: * inspector/InspectorInstrumentation.cpp: (WebCore::InspectorInstrumentation::didInstallTimerImpl): (WebCore::InspectorInstrumentation::didRemoveTimerImpl): (WebCore::InspectorInstrumentation::willCallFunctionImpl): (WebCore::InspectorInstrumentation::willDispatchEventImpl): (WebCore::InspectorInstrumentation::willDispatchEventOnWindowImpl): (WebCore::InspectorInstrumentation::willEvaluateScriptImpl): (WebCore::InspectorInstrumentation::willFireTimerImpl): (WebCore::InspectorInstrumentation::didInvalidateLayoutImpl): (WebCore::InspectorInstrumentation::willLayoutImpl): (WebCore::InspectorInstrumentation::willCompositeImpl): (WebCore::InspectorInstrumentation::didCompositeImpl): (WebCore::InspectorInstrumentation::willPaintImpl): (WebCore::InspectorInstrumentation::didPaintImpl): (WebCore::InspectorInstrumentation::willRecalculateStyleImpl): (WebCore::InspectorInstrumentation::didScheduleStyleRecalculationImpl): (WebCore::InspectorInstrumentation::didCommitLoadImpl): (WebCore::InspectorInstrumentation::frameStartedLoadingImpl): (WebCore::InspectorInstrumentation::startConsoleTimingImpl): (WebCore::InspectorInstrumentation::stopConsoleTimingImpl): (WebCore::InspectorInstrumentation::consoleTimeStampImpl): (WebCore::InspectorInstrumentation::startProfilingImpl): (WebCore::InspectorInstrumentation::stopProfilingImpl): (WebCore::InspectorInstrumentation::timelineAgentTracking): Added. (WebCore::InspectorInstrumentation::didRequestAnimationFrameImpl): (WebCore::InspectorInstrumentation::didCancelAnimationFrameImpl): (WebCore::InspectorInstrumentation::willFireAnimationFrameImpl): (WebCore::InspectorInstrumentation::willFireObserverCallbackImpl): (WebCore::InspectorInstrumentation::retrieveTimelineAgent): (WebCore::InspectorInstrumentation::timelineAgentEnabled): Deleted. * bindings/js/JSExecStateInstrumentation.h: (WebCore::JSExecState::instrumentFunctionInternal): Rename for clarity/correctness: - `inspectorTimelineAgent` => `trackingInspectorTimelineAgent` - `persistentInspectorTimelineAgent` => `inspectorTimelineAgent` 2019-08-05 Fujii Hironori [Win] Specifying huge font-size causes crashing https://bugs.webkit.org/show_bug.cgi?id=200340 Reviewed by Don Olmstead. Covered by existing tests. * platform/graphics/win/FontPlatformDataWin.cpp: (WebCore::FontPlatformData::FontPlatformData): Use GetTextFace to get font face names instead of GetOutlineTextMetrics which returns null for huge size fonts. 2019-08-05 Youenn Fablet Response constructor doesn't throw on disturbed ReadableStream https://bugs.webkit.org/show_bug.cgi?id=200130 Reviewed by Alex Christensen. Make FetchBody::extract return an exception in error cases. Update call sites accordingly. Add the error case as per https://fetch.spec.whatwg.org/#concept-bodyinit-extract, ReadableStream handling. Covered by updated and rebased tests. * Modules/beacon/NavigatorBeacon.cpp: (WebCore::NavigatorBeacon::sendBeacon): * Modules/fetch/FetchBody.cpp: (WebCore::FetchBody::extract): * Modules/fetch/FetchBody.h: * Modules/fetch/FetchBodyOwner.cpp: (WebCore::FetchBodyOwner::extractBody): * Modules/fetch/FetchBodyOwner.h: * Modules/fetch/FetchRequest.cpp: (WebCore::FetchRequest::initializeWith): (WebCore::FetchRequest::setBody): * Modules/fetch/FetchResponse.cpp: (WebCore::FetchResponse::create): * Modules/streams/ReadableStreamInternals.js: (readableStreamPipeTo): fix a case where the promise would be unhandled and would show up in unhandledrejectionhandler. 2019-08-05 Youenn Fablet Support RTCRtpSender.dtmf https://bugs.webkit.org/show_bug.cgi?id=200431 Reviewed by Eric Carlson. Add a new backend interface to RTCDTMFSender and implementation of it using libwebrtc. Update RTCDTMFSender to use that new backend and make RTCRtpSender return a RTCDTMFSender conditionally on a newly added runtime flag. Update RTCDTMFSender implementation based on https://w3c.github.io/webrtc-pc/#peer-to-peer-dtmf. Covered by rebased tests. * Modules/mediastream/PeerConnectionBackend.cpp: (WebCore::PeerConnectionBackend::context const): (WebCore::PeerConnectionBackend::transceiverFromSender): * Modules/mediastream/PeerConnectionBackend.h: * Modules/mediastream/RTCDTMFSender.cpp: (WebCore::RTCDTMFSender::RTCDTMFSender): (WebCore::RTCDTMFSender::canInsertDTMF const): (WebCore::RTCDTMFSender::toneBuffer const): (WebCore::isToneCharacterInvalid): (WebCore::RTCDTMFSender::insertDTMF): (WebCore::RTCDTMFSender::playNextTone): (WebCore::RTCDTMFSender::onTonePlayed): (WebCore::RTCDTMFSender::toneTimerFired): (WebCore::RTCDTMFSender::stop): (WebCore::RTCDTMFSender::activeDOMObjectName const): (WebCore::RTCDTMFSender::canSuspendForDocumentSuspension const): * Modules/mediastream/RTCDTMFSender.h: * Modules/mediastream/RTCDTMFSender.idl: * Modules/mediastream/RTCDTMFToneChangeEvent.cpp: * Modules/mediastream/RTCDTMFToneChangeEvent.h: * Modules/mediastream/RTCDTMFToneChangeEvent.idl: * Modules/mediastream/RTCRtpSender.cpp: (WebCore::RTCRtpSender::dtmf): (WebCore::RTCRtpSender::currentTransceiverDirection const): * Modules/mediastream/RTCRtpSender.h: * Modules/mediastream/RTCRtpSender.idl: * Modules/mediastream/RTCRtpSenderBackend.h: * Modules/mediastream/libwebrtc/LibWebRTCRtpSenderBackend.cpp: (WebCore::LibWebRTCRtpSenderBackend::createDTMFBackend): * Modules/mediastream/libwebrtc/LibWebRTCRtpSenderBackend.h: * Sources.txt: * WebCore.xcodeproj/project.pbxproj: * dom/EventNames.in: * dom/EventTargetFactory.in: * page/RuntimeEnabledFeatures.h: (WebCore::RuntimeEnabledFeatures::webRTCDTMFEnabled const): (WebCore::RuntimeEnabledFeatures::setWebRTCDTMFEnabled): * platform/mediastream/RTCDTMFSenderBackend.h: Added. * platform/mediastream/RTCDTMFSenderHandler.h: Removed. * platform/mediastream/RTCDTMFSenderHandlerClient.h: Removed. * platform/mediastream/libwebrtc/LibWebRTCDTMFSenderBackend.cpp: Added. (WebCore::toWTFString): (WebCore::LibWebRTCDTMFSenderBackend::LibWebRTCDTMFSenderBackend): (WebCore::LibWebRTCDTMFSenderBackend::~LibWebRTCDTMFSenderBackend): (WebCore::LibWebRTCDTMFSenderBackend::canInsertDTMF): (WebCore::LibWebRTCDTMFSenderBackend::playTone): (WebCore::LibWebRTCDTMFSenderBackend::tones const): (WebCore::LibWebRTCDTMFSenderBackend::duration const): (WebCore::LibWebRTCDTMFSenderBackend::interToneGap const): (WebCore::LibWebRTCDTMFSenderBackend::OnToneChange): (WebCore::LibWebRTCDTMFSenderBackend::onTonePlayed): * platform/mediastream/libwebrtc/LibWebRTCDTMFSenderBackend.h: Added. 2019-08-05 Saam Barati [WHLSL] Inline all native function calls https://bugs.webkit.org/show_bug.cgi?id=200350 Reviewed by Robin Morisset. Native functions calls tend to be really small. If we inline in the generated Metal code, we end up with faster Metal compile times. On compute_boids, this provides a ~10ms improvement. * Modules/webgpu/WHLSL/Metal/WHLSLFunctionWriter.cpp: (WebCore::WHLSL::Metal::FunctionDefinitionWriter::visit): (WebCore::WHLSL::Metal::sharedMetalFunctions): * Modules/webgpu/WHLSL/Metal/WHLSLNativeFunctionWriter.cpp: (WebCore::WHLSL::Metal::inlineNativeFunction): (WebCore::WHLSL::Metal::writeNativeFunction): Deleted. * Modules/webgpu/WHLSL/Metal/WHLSLNativeFunctionWriter.h: 2019-08-05 Youenn Fablet RealtimeOutgoingAudioSource::pullAudioData is no longer needed https://bugs.webkit.org/show_bug.cgi?id=200450 Reviewed by Geoffrey Garen. No change of behavior, removing base class method declaration. * platform/mediastream/RealtimeOutgoingAudioSource.h: (WebCore::RealtimeOutgoingAudioSource::pullAudioData): Deleted. * platform/mediastream/gstreamer/RealtimeOutgoingAudioSourceLibWebRTC.h: * platform/mediastream/mac/RealtimeOutgoingAudioSourceCocoa.h: 2019-08-05 Saam Barati [WHLSL] Add compile time flag to dump metal compile times https://bugs.webkit.org/show_bug.cgi?id=200447 Reviewed by Myles C. Maxfield. * Modules/webgpu/WHLSL/WHLSLPrepare.h: * platform/graphics/gpu/cocoa/GPUComputePipelineMetal.mm: (WebCore::trySetFunctions): * platform/graphics/gpu/cocoa/GPURenderPipelineMetal.mm: (WebCore::trySetFunctions): 2019-08-05 Chris Dumez navigator.geolocation wrapper should not become GC-collectable once its frame is detached https://bugs.webkit.org/show_bug.cgi?id=200436 Reviewed by Darin Adler. navigator.geolocation wrapper should not become GC-collectable once its frame is detached, given that it can outlive the frame. Instead, tie the navigator.geolocation wrapper's lifetime to its Navigator's. Test: fast/dom/navigator-property-gc-after-frame-detach.html * Modules/geolocation/Geolocation.cpp: (WebCore::Geolocation::create): (WebCore::Geolocation::Geolocation): (WebCore::Geolocation::navigator): (WebCore::Geolocation::frame const): * Modules/geolocation/Geolocation.h: * Modules/geolocation/Geolocation.idl: * Modules/geolocation/NavigatorGeolocation.cpp: (WebCore::NavigatorGeolocation::NavigatorGeolocation): (WebCore::NavigatorGeolocation::from): (WebCore::NavigatorGeolocation::geolocation): (WebCore::NavigatorGeolocation::geolocation const): * Modules/geolocation/NavigatorGeolocation.h: * bindings/js/JSNavigatorCustom.cpp: (WebCore::JSNavigator::visitAdditionalChildren): * bindings/js/JSWorkerNavigatorCustom.cpp: (WebCore::JSWorkerNavigator::visitAdditionalChildren): * bindings/scripts/CodeGeneratorJS.pm: (GenerateImplementation): * bindings/scripts/IDLAttributes.json: * page/Navigator.cpp: (WebCore::Navigator::plugins): (WebCore::Navigator::mimeTypes): * page/NavigatorBase.h: * plugins/DOMMimeTypeArray.cpp: (WebCore::DOMMimeTypeArray::DOMMimeTypeArray): * plugins/DOMMimeTypeArray.h: * plugins/DOMMimeTypeArray.idl: * plugins/DOMPluginArray.cpp: (WebCore::DOMPluginArray::DOMPluginArray): * plugins/DOMPluginArray.h: * plugins/DOMPluginArray.idl: * workers/service/ServiceWorkerContainer.h: * workers/service/ServiceWorkerContainer.idl: 2019-08-05 Andy Estes [WebIDL] Support partial dictionaries and conditional dictionary members https://bugs.webkit.org/show_bug.cgi?id=200441 Reviewed by Alex Christensen. Added new bindings tests. * bindings/scripts/CodeGeneratorJS.pm: (GenerateDictionaryImplementationContent): * bindings/scripts/IDLParser.pm: (parsePartialDefinition): (parsePartialInterface): Deleted. (parsePartialDictionary): Deleted. * bindings/scripts/generate-bindings.pl: (generateBindings): * bindings/scripts/preprocess-idls.pl: (getPartialNamesFromIDL): (getPartialInterfaceNameFromIDL): Deleted. * bindings/scripts/test/JS/JSTestEventConstructor.cpp: (WebCore::convertDictionary): * bindings/scripts/test/JS/JSTestStandaloneDictionary.cpp: (WebCore::convertDictionary): (WebCore::convertDictionaryToJS): * bindings/scripts/test/JS/JSTestStandaloneDictionary.h: * bindings/scripts/test/TestStandaloneDictionary.idl: * bindings/scripts/test/TestSupplemental.idl: 2019-08-05 Devin Rousso Web Inspector: rename "Stylesheet" to "Style Sheet" to match spec text https://bugs.webkit.org/show_bug.cgi?id=200422 Reviewed by Joseph Pecoraro. No observable change in functionality. * inspector/agents/InspectorPageAgent.h: * inspector/agents/InspectorPageAgent.cpp: (WebCore::InspectorPageAgent::resourceTypeJSON): (WebCore::InspectorPageAgent::inspectorResourceType): 2019-08-05 Takashi Komori [Curl] implement CertificateInfo::summaryInfo https://bugs.webkit.org/show_bug.cgi?id=191498 Reviewed by Alex Christensen. Implement CertificaeInfo::SummaryInfo. This patch makes WebInspector show summary of certificates. Tests: http/tests/inspector/network/resource-security-certificate.html http/tests/inspector/network/getSerializedCertificate.html * platform/Curl.cmake: * platform/network/curl/CertificateInfo.h: (WTF::Persistence::Coder::encode): (WTF::Persistence::Coder::decode): (WebCore::CertificateInfo::summaryInfo const): Deleted. * platform/network/curl/CertificateInfoCurl.cpp: (WebCore::CertificateInfo::summaryInfo const): * platform/network/curl/CurlSSLVerifier.cpp: (WebCore::CurlSSLVerifier::collectInfo): (WebCore::CurlSSLVerifier::verifyCallback): (WebCore::StackOfX509::StackOfX509): Deleted. (WebCore::StackOfX509::~StackOfX509): Deleted. (WebCore::StackOfX509::count): Deleted. (WebCore::StackOfX509::item): Deleted. (): Deleted. (WebCore::BIOHolder::BIOHolder): Deleted. (WebCore::BIOHolder::~BIOHolder): Deleted. (WebCore::BIOHolder::write): Deleted. (WebCore::BIOHolder::asCertificate): Deleted. (WebCore::pemDataFromCtx): Deleted. * platform/network/curl/CurlSSLVerifier.h: * platform/network/curl/OpenSSLHelper.cpp: Added. (OpenSSL::deleter::operator()): (OpenSSL::StackOfGeneralName::StackOfGeneralName): (OpenSSL::StackOfGeneralName::~StackOfGeneralName): (OpenSSL::StackOfGeneralName::operator bool): (OpenSSL::StackOfGeneralName::count): (OpenSSL::StackOfGeneralName::item): (OpenSSL::StackOfX509::StackOfX509): (OpenSSL::StackOfX509::~StackOfX509): (OpenSSL::StackOfX509::count): (OpenSSL::StackOfX509::item): (OpenSSL::BIO::BIO): (OpenSSL::BIO::~BIO): (OpenSSL::BIO::getDataAsVector const): (OpenSSL::BIO::getDataAsString const): (OpenSSL::BIO::readX509): (OpenSSL::BIO::get): (OpenSSL::pemDataFromCtx): (OpenSSL::createCertificateInfo): (OpenSSL::toString): (OpenSSL::getCommonName): (OpenSSL::getSubjectName): (OpenSSL::convertASN1TimeToSeconds): (OpenSSL::getSubjectAltName): (OpenSSL::createSummaryInfo): * platform/network/curl/OpenSSLHelper.h: Copied from Source/WebCore/platform/network/curl/CertificateInfoCurl.cpp. 2019-08-04 Youenn Fablet WebRTC: got incorrect `this` in negotiationneeded event https://bugs.webkit.org/show_bug.cgi?id=200427 Reviewed by Darin Adler. Make sure a dom object created through a JS built-in constructor is added to the wrapper cache. Test: webrtc/onnegotiationneeded.html * bindings/js/JSDOMBuiltinConstructor.h: (WebCore::createJSObjectFromWrapper): (WebCore::createJSObject): 2019-08-04 Sam Weinig Mangled WHLSL names don't need to allocate Strings https://bugs.webkit.org/show_bug.cgi?id=200429 Reviewed by Saam Barati. To avoid allocating strings for each mangled name used to transform WHLSL to Metal, which we'd like to avoid since it is both unnecessarily expensive in time and space, we can instead just store the unique integer identifier that was being used to construct the String. Since the existing mangled names were all of the form "prefix" + unsigned integer value (where prefix could be "type", "enumerationMember", "structureElement", "variable" or "function") we strongly type the integer by storing it in a struct (MangledVariableName, MangledTypeName, etc.) When the full name is actually needed, StringTypeAdapter's specialized for the structs are used to write directly into the preallocated buffers of StringBuilders or makeString(). * Modules/webgpu/WHLSL/Metal/WHLSLMangledNames.h: Added. (WebCore::WHLSL::Metal::MangledVariableName): (WebCore::WHLSL::Metal::MangledTypeName): (WebCore::WHLSL::Metal::MangledStructureElementName): (WebCore::WHLSL::Metal::MangledEnumerationMemberName): (WebCore::WHLSL::Metal::MangledFunctionName): Adds structs for each type of mangled name and StringTypeAdapter specializations for each to allow their use in StringBuilder.flexibleAppend() or makeString(). Additionally, a Variant, MangledOrNativeTypeName, of MangledTypeName and String is declared to allow for the few cases where a native type (e.g. float4) is needed. The StringTypeAdapter for MangledOrNativeTypeName could be generalized for any Variant in the future, but I left it non-general for now, as it is non-obvious if one would want to store Variant, and have each member function construct a temporary StringTypeAdapter, or store a Variant...> and perform conversion in the construction. * Modules/webgpu/WHLSL/Metal/WHLSLEntryPointScaffolding.cpp: (WebCore::WHLSL::Metal::EntryPointScaffolding::EntryPointScaffolding): (WebCore::WHLSL::Metal::internalTypeForSemantic): (WebCore::WHLSL::Metal::EntryPointScaffolding::builtInsSignature): (WebCore::WHLSL::Metal::EntryPointScaffolding::mangledInputPath): (WebCore::WHLSL::Metal::VertexEntryPointScaffolding::VertexEntryPointScaffolding): (WebCore::WHLSL::Metal::VertexEntryPointScaffolding::signature): (WebCore::WHLSL::Metal::VertexEntryPointScaffolding::pack): (WebCore::WHLSL::Metal::FragmentEntryPointScaffolding::FragmentEntryPointScaffolding): (WebCore::WHLSL::Metal::FragmentEntryPointScaffolding::signature): (WebCore::WHLSL::Metal::FragmentEntryPointScaffolding::pack): (WebCore::WHLSL::Metal::ComputeEntryPointScaffolding::ComputeEntryPointScaffolding): (WebCore::WHLSL::Metal::ComputeEntryPointScaffolding::signature): (WebCore::WHLSL::Metal::ComputeEntryPointScaffolding::pack): * Modules/webgpu/WHLSL/Metal/WHLSLEntryPointScaffolding.h: (WebCore::WHLSL::Metal::EntryPointScaffolding::parameterVariables): * Modules/webgpu/WHLSL/Metal/WHLSLFunctionWriter.cpp: (WebCore::WHLSL::Metal::FunctionDeclarationWriter::FunctionDeclarationWriter): (WebCore::WHLSL::Metal::FunctionDeclarationWriter::visit): (WebCore::WHLSL::Metal::FunctionDefinitionWriter::FunctionDefinitionWriter): (WebCore::WHLSL::Metal::FunctionDefinitionWriter::generateNextVariableName): (WebCore::WHLSL::Metal::FunctionDefinitionWriter::appendRightValueWithNullability): (WebCore::WHLSL::Metal::FunctionDefinitionWriter::appendRightValue): (WebCore::WHLSL::Metal::FunctionDefinitionWriter::appendLeftValue): (WebCore::WHLSL::Metal::FunctionDefinitionWriter::takeLastValue): (WebCore::WHLSL::Metal::FunctionDefinitionWriter::takeLastValueAndNullability): (WebCore::WHLSL::Metal::FunctionDefinitionWriter::takeLastLeftValue): (WebCore::WHLSL::Metal::FunctionDefinitionWriter::visit): (WebCore::WHLSL::Metal::FunctionDefinitionWriter::emitLoop): (WebCore::WHLSL::Metal::RenderFunctionDefinitionWriter::RenderFunctionDefinitionWriter): (WebCore::WHLSL::Metal::RenderFunctionDefinitionWriter::createEntryPointScaffolding): (WebCore::WHLSL::Metal::ComputeFunctionDefinitionWriter::ComputeFunctionDefinitionWriter): (WebCore::WHLSL::Metal::ComputeFunctionDefinitionWriter::createEntryPointScaffolding): (WebCore::WHLSL::Metal::sharedMetalFunctions): * Modules/webgpu/WHLSL/Metal/WHLSLFunctionWriter.h: * Modules/webgpu/WHLSL/Metal/WHLSLMetalCodeGenerator.h: * Modules/webgpu/WHLSL/Metal/WHLSLNativeFunctionWriter.cpp: (WebCore::WHLSL::Metal::writeNativeFunction): * Modules/webgpu/WHLSL/Metal/WHLSLNativeFunctionWriter.h: * Modules/webgpu/WHLSL/Metal/WHLSLTypeNamer.cpp: (WebCore::WHLSL::Metal::BaseTypeNameNode::BaseTypeNameNode): (WebCore::WHLSL::Metal::BaseTypeNameNode::mangledName const): (WebCore::WHLSL::Metal::ArrayTypeNameNode::ArrayTypeNameNode): (WebCore::WHLSL::Metal::ArrayReferenceTypeNameNode::ArrayReferenceTypeNameNode): (WebCore::WHLSL::Metal::PointerTypeNameNode::PointerTypeNameNode): (WebCore::WHLSL::Metal::ReferenceTypeNameNode::ReferenceTypeNameNode): (WebCore::WHLSL::Metal::MetalTypeDeclarationWriter::MetalTypeDeclarationWriter): (WebCore::WHLSL::Metal::TypeNamer::metalTypeDeclarations): (WebCore::WHLSL::Metal::TypeNamer::emitNamedTypeDefinition): (WebCore::WHLSL::Metal::TypeNamer::mangledNameForType): (WebCore::WHLSL::Metal::TypeNamer::mangledNameForEnumerationMember): (WebCore::WHLSL::Metal::TypeNamer::mangledNameForStructureElement): * Modules/webgpu/WHLSL/Metal/WHLSLTypeNamer.h: (WebCore::WHLSL::Metal::TypeNamer::generateNextTypeName): (WebCore::WHLSL::Metal::TypeNamer::generateNextStructureElementName): (WebCore::WHLSL::Metal::TypeNamer::generateNextEnumerationMemberName): * Modules/webgpu/WHLSL/WHLSLPrepare.h: Replace uses of String with the appropriate mangled name type. * WebCore.xcodeproj/project.pbxproj: Add WHLSLMangledNames.h * platform/graphics/gpu/cocoa/GPUComputePipelineMetal.mm: (WebCore::trySetFunctions): * platform/graphics/gpu/cocoa/GPURenderPipelineMetal.mm: (WebCore::trySetFunctions): Convert the mangled names to Strings for passing to Metal API. NOTE: We could avoid having the toString() member function on MangledFunctionName if we allowed makeString() to take a single argument. 2019-08-04 Chris Dumez Ping loads should not prevent page caching https://bugs.webkit.org/show_bug.cgi?id=200418 Reviewed by Darin Adler. We normally prevent page caching if there were any pending subresource loads when navigating, to avoid caching partial / broken content. However, this should not apply to Ping / Beacon loads since those do not impact page rendering and can outlive the page. Tests: http/tests/navigation/page-cache-pending-ping-load-cross-origin.html http/tests/navigation/page-cache-pending-ping-load-same-origin.html * history/PageCache.cpp: (WebCore::PageCache::addIfCacheable): After we've fired the 'pagehide' event in each frame, stop all the loads again. This is needed since pages are allowed to start ping / beacon loads in their 'pagehide' handlers. If we do not stop those loads, then the next call to canCachePage() would fail because the DocumentLoader is still loading. Note that we're not actually preventing these ping loads from hitting the server since we never cancel page loads and those can outlive their page. * loader/DocumentLoader.cpp: (WebCore::shouldPendingCachedResourceLoadPreventPageCache): (WebCore::areAllLoadersPageCacheAcceptable): Make sure that Ping / Beacon / Prefetches / Icon loads do not prevent page caching. (WebCore::DocumentLoader::addSubresourceLoader): Tweak assertion that was incorrect since we actually allow ping / beacon loads when the document is about to enter PageCache (while firing pagehide event). 2019-08-04 Zalan Bujtas [LFC][TFC] Create formatting context/state. https://bugs.webkit.org/show_bug.cgi?id=200428 Reviewed by Antti Koivisto. * layout/LayoutState.cpp: (WebCore::Layout::LayoutState::createFormattingStateForFormattingRootIfNeeded): (WebCore::Layout::LayoutState::createFormattingContext): 2019-08-04 Zalan Bujtas [LFC] Cleanup preferred width computation https://bugs.webkit.org/show_bug.cgi?id=200426 Reviewed by Antti Koivisto. The intrinsic width for a formatting root box has 2 sets of values now. One set(min/max) is stored in the established formatting context's state while the other is in the formatting context's state where the box lives.
foobar
The float box participates in the formatting context established by the absolutely position box, but it also establishes an inline formatting context. The min/max width pair in the established context is the width of the "foobar" (same value for min/max). This set is stored in the inline formatting state. However the float box has horizontal border so the "final" min/max width pair is expanded by this border value and stored in the formatting state where the box lives (which is different from the one it establishes). This and the "remove the formatting context type classes from the tree" changes open up interesting optimization opportunities. Here is a very simple case:
some text
some super long .... text
In order to lay out this content properly, we 1. Compute the min/max width of the first float (expensive text measuring) 2. Compute the min/max width of the second float (some more expensive text measuring) 3. Compute the min/max width of the inline-block (that is pretty much the 2 float's min/max) 4. Lay out the 2 floats, the empty div and the inline-block using these min/max width pairs. Now if the inline-block box's display value is changed to "block" and the positioning is to absolute (style="display: box; position: absolute;") we currently(on trunk) tear down the render tree, build a new one and run all the steps again from #1 to #4. In LFC, we start with the following layout tree -> block formatting context -> inline formatting context -> inline formatting context -> inline formatting context and when the style change happens, we don't need to tear down the tree at all. Not only that, but since every formatting contexts stay the same we can just reuse their states and actually skip all the steps (even the positioning since the absolutely positioned container has static top/bottom/left/right). Surprisingly the final layout produces the exact same "display boxes" as the original layout. * layout/FormattingContext.h: (WebCore::Layout::FormattingContext::IntrinsicWidthConstraints::expand): * layout/FormattingContextGeometry.cpp: (WebCore::Layout::FormattingContext::Geometry::shrinkToFitWidth): * layout/FormattingState.h: (WebCore::Layout::FormattingState::setIntrinsicWidthConstraints): (WebCore::Layout::FormattingState::intrinsicWidthConstraints const): (WebCore::Layout::FormattingState::setIntrinsicWidthConstraintsForBox): (WebCore::Layout::FormattingState::clearIntrinsicWidthConstraints): (WebCore::Layout::FormattingState::intrinsicWidthConstraintsForBox const): * layout/blockformatting/BlockFormattingContext.cpp: (WebCore::Layout::BlockFormattingContext::computedIntrinsicWidthConstraints const): (WebCore::Layout::BlockFormattingContext::computeIntrinsicWidthConstraints const): Deleted. * layout/blockformatting/BlockFormattingContext.h: * layout/blockformatting/BlockFormattingContextGeometry.cpp: (WebCore::Layout::BlockFormattingContext::Geometry::intrinsicWidthConstraints): (WebCore::Layout::BlockFormattingContext::Geometry::intrinsicWidthConstraintsNeedChildrenWidth): Deleted. * layout/displaytree/DisplayBox.h: (WebCore::Display::Box::horizontalMarginBorderAndPadding const): * layout/inlineformatting/InlineFormattingContext.cpp: (WebCore::Layout::nextInPreOrder): (WebCore::Layout::InlineFormattingContext::computedIntrinsicWidthConstraints const): (WebCore::Layout::InlineFormattingContext::computeIntrinsicWidthForFormattingRoot const): (WebCore::Layout::InlineFormattingContext::computeIntrinsicWidthConstraints const): Deleted. (WebCore::Layout::InlineFormattingContext::computeIntrinsicWidthForFloatBox const): Deleted. (WebCore::Layout::InlineFormattingContext::computeIntrinsicWidthForInlineBlock const): Deleted. * layout/inlineformatting/InlineFormattingContext.h: * layout/tableformatting/TableFormattingContext.cpp: (WebCore::Layout::TableFormattingContext::computedIntrinsicWidthConstraints const): * layout/tableformatting/TableFormattingContext.h: 2019-08-03 Devin Rousso Web Inspector: DOM: add a special breakpoint for "All Events" https://bugs.webkit.org/show_bug.cgi?id=200285 Reviewed by Joseph Pecoraro. Similar to the existing "All Requests" breakpoint, there should be a way to set a breakpoint that would pause for any DOM event, regardless of the event's name. This is useful for situations where the event name isn't known, or where one simply want's to pause on the next entry to the event loop. Along these lines, make the "requestAnimationFrame", "setTimeout", and "setInterval" event breakpoints into special breakpoints that can be added/removed via the create breakpoint context menu. This simplifies the process for setting these breakpoints, and also makes them more discoverable (most people wouldn't consider them to be "events"). Tests: inspector/dom/breakpoint-for-event-listener.html inspector/dom-debugger/event-animation-frame-breakpoints.html inspector/dom-debugger/event-breakpoint-with-navigation.html inspector/dom-debugger/event-interval-breakpoints.html inspector/dom-debugger/event-listener-breakpoints.html inspector/dom-debugger/event-timeout-breakpoints.html * inspector/agents/InspectorDOMDebuggerAgent.h: * inspector/agents/InspectorDOMDebuggerAgent.cpp: (WebCore::InspectorDOMDebuggerAgent::disable): (WebCore::InspectorDOMDebuggerAgent::frameDocumentUpdated): (WebCore::InspectorDOMDebuggerAgent::setEventBreakpoint): (WebCore::InspectorDOMDebuggerAgent::removeEventBreakpoint): (WebCore::InspectorDOMDebuggerAgent::willHandleEvent): (WebCore::InspectorDOMDebuggerAgent::willFireTimer): (WebCore::InspectorDOMDebuggerAgent::willFireAnimationFrame): (WebCore::InspectorDOMDebuggerAgent::discardBindings): Deleted. Make `eventName` optional for `addEventBreakpoint`/`removeEventBreakpoint`. When omitted, the corresponding breakpoint that is added/removed is treated as a global breakpoint that applies to all events of that type (e.g. a global `listener` breakpoint would pause for any event that is fired). 2019-08-03 Zalan Bujtas [LFC] Remove formatting context type leaf classes https://bugs.webkit.org/show_bug.cgi?id=200224 Reviewed by Antti Koivisto. Let's keep the layout tree formatting context type independent. * Sources.txt: * WebCore.xcodeproj/project.pbxproj: * layout/inlineformatting/InlineFormattingContext.cpp: (WebCore::Layout::InlineFormattingContext::layout const): (WebCore::Layout::InlineFormattingContext::computeIntrinsicWidthConstraints const): (WebCore::Layout::InlineFormattingContext::initializeMarginBorderAndPaddingForGenericInlineBox const): (WebCore::Layout::InlineFormattingContext::collectInlineContent const): * layout/inlineformatting/InlineFormattingContext.h: * layout/inlineformatting/InlineFormattingContextLineLayout.cpp: (WebCore::Layout::inlineItemWidth): (WebCore::Layout::LineLayout::placeInlineItem): * layout/inlineformatting/InlineItem.h: * layout/inlineformatting/InlineTextItem.cpp: (WebCore::Layout::InlineTextItem::createAndAppendTextItems): (WebCore::Layout::InlineTextItem::InlineTextItem): (WebCore::Layout::InlineTextItem::split const): * layout/inlineformatting/InlineTextItem.h: (WebCore::Layout::InlineTextItem::inlineBox const): Deleted. * layout/inlineformatting/text/TextUtil.cpp: (WebCore::Layout::TextUtil::width): (WebCore::Layout::TextUtil::split): * layout/inlineformatting/text/TextUtil.h: * layout/layouttree/LayoutBox.cpp: (WebCore::Layout::Box::Box): (WebCore::Layout::Box::~Box): (WebCore::Layout::Box::formattingContextRoot const): (WebCore::Layout::Box::setTextContent): (WebCore::Layout::Box::hasTextContent const): (WebCore::Layout::Box::textContent const): (WebCore::Layout::Box::replaced const): (WebCore::Layout::Box::replaced): (WebCore::Layout::Box::rareDataMap): (WebCore::Layout::Box::rareData const): (WebCore::Layout::Box::ensureRareData): (WebCore::Layout::Box::removeRareData): * layout/layouttree/LayoutBox.h: (WebCore::Layout::Box::isLineBreakBox const): (WebCore::Layout::Box::hasRareData const): (WebCore::Layout::Box::setHasRareData): (WebCore::Layout::Box::isInlineBox const): Deleted. (WebCore::Layout::Box::replaced const): Deleted. (WebCore::Layout::Box::replaced): Deleted. * layout/layouttree/LayoutContainer.h: (WebCore::Layout::Container::firstChild const): Deleted. (WebCore::Layout::Container::lastChild const): Deleted. (WebCore::Layout::Container::hasChild const): Deleted. (WebCore::Layout::Container::hasInFlowChild const): Deleted. (WebCore::Layout::Container::hasInFlowOrFloatingChild const): Deleted. (WebCore::Layout::Container::outOfFlowDescendants const): Deleted. * layout/layouttree/LayoutInlineBox.cpp: Removed. * layout/layouttree/LayoutInlineBox.h: Removed. * layout/layouttree/LayoutLineBreakBox.cpp: Removed. * layout/layouttree/LayoutLineBreakBox.h: Removed. * layout/layouttree/LayoutTreeBuilder.cpp: (WebCore::Layout::TreeBuilder::createLayoutBox): (WebCore::Layout::outputLayoutBox): 2019-08-03 Zalan Bujtas [LFC] Remove formatting context type container classes. https://bugs.webkit.org/show_bug.cgi?id=200202 Reviewed by Antti Koivisto. These are formatting context specific classes. Let's try to have a layout tree without such types. * Sources.txt: * WebCore.xcodeproj/project.pbxproj: * layout/blockformatting/BlockFormattingContext.cpp: (WebCore::Layout::BlockFormattingContext::computeIntrinsicWidthConstraints const): * layout/inlineformatting/InlineFormattingContext.cpp: (WebCore::Layout::InlineFormattingContext::layout const): (WebCore::Layout::InlineFormattingContext::computeMarginBorderAndPaddingForInlineContainer const): * layout/inlineformatting/InlineFormattingContext.h: * layout/inlineformatting/InlineFormattingContextLineLayout.cpp: (WebCore::Layout::InlineFormattingContext::InlineLayout::layout const): * layout/inlineformatting/InlineLine.cpp: (WebCore::Layout::Line::appendTextContent): * layout/layouttree/LayoutBlockContainer.cpp: Removed. * layout/layouttree/LayoutBlockContainer.h: Removed. * layout/layouttree/LayoutBox.cpp: (WebCore::Layout::Box::establishesInlineFormattingContext const): (WebCore::Layout::Box::establishesInlineFormattingContextOnly const): (WebCore::Layout::Box::formattingContextRoot const): * layout/layouttree/LayoutBox.h: (WebCore::Layout::Box::isBlockContainer const): (WebCore::Layout::Box::isInlineContainer const): (WebCore::Layout::Box::isInlineBox const): (WebCore::Layout::Box::establishesInlineFormattingContext const): Deleted. (WebCore::Layout::Box::establishesInlineFormattingContextOnly const): Deleted. * layout/layouttree/LayoutInlineContainer.cpp: Removed. * layout/layouttree/LayoutInlineContainer.h: Removed. * layout/layouttree/LayoutIterator.h: (WebCore::Layout::LayoutBoxTraversal::firstChild): * layout/layouttree/LayoutTreeBuilder.cpp: (WebCore::Layout::TreeBuilder::createLayoutTree): (WebCore::Layout::TreeBuilder::createLayoutBox): (WebCore::Layout::TreeBuilder::createTableStructure): (WebCore::Layout::outputLayoutBox): * layout/layouttree/LayoutTreeBuilder.h: * page/FrameViewLayoutContext.cpp: (WebCore::layoutUsingFormattingContext): 2019-08-02 Robin Morisset [WHLSL] Avoid visiting the full AST in computeDimensions https://bugs.webkit.org/show_bug.cgi?id=200410 Reviewed by Myles C. Maxfield. Avoid visiting the full AST in computeDimensions This cuts the time spent in computeDimensions on compute_boids.html from about 2ms to about 0.002ms. No new tests as there is no functional change intended. * Modules/webgpu/WHLSL/WHLSLComputeDimensions.cpp: (WebCore::WHLSL::computeDimensions): * Modules/webgpu/WHLSL/WHLSLPrepare.cpp: 2019-08-02 Ryosuke Niwa Ref Frame in DOMWindow::screen* functions https://bugs.webkit.org/show_bug.cgi?id=200409 Reviewed by Simon Fraser. Ref Frame in the following functions. * page/DOMWindow.cpp: (WebCore::DOMWindow::innerHeight const): (WebCore::DOMWindow::innerWidth const): (WebCore::DOMWindow::screenX const): (WebCore::DOMWindow::screenY const): (WebCore::DOMWindow::scrollX const): (WebCore::DOMWindow::scrollY const): 2019-08-02 Mark Lam [ARM64E] Harden the diversity of the DOMJIT::Signature::unsafeFunction pointer. https://bugs.webkit.org/show_bug.cgi?id=200292 Reviewed by Geoffrey Garen. * bindings/scripts/CodeGeneratorJS.pm: (GenerateImplementation): - Update to work with the new DOMJIT::Signature constructor. * bindings/scripts/test/JS/JSTestDOMJIT.cpp: - Re-base test results. 2019-08-02 Keith Rollin Consistently use Obj-C boolean literals https://bugs.webkit.org/show_bug.cgi?id=200405 Reviewed by Simon Fraser, Joseph Pecoraro. There are places where we use equivalent but different expressions for Obj-C boolean objects. For example, we use both [NSNumber numberWithBool:YES] and @YES. There are places where both are used in the same function, such as -[WebPreferences initialize]. The boolean literal is in greater use and is more succinct, so standardize on that. Also, change @(YES/NO) to @YES/NO. No new tests -- no new or changed functionality. * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm: (WebCore::SourceBufferPrivateAVFObjC::enqueueSample): * platform/graphics/cv/ImageTransferSessionVT.mm: (WebCore::ImageTransferSessionVT::ImageTransferSessionVT): (WebCore::ImageTransferSessionVT::setSize): (WebCore::ImageTransferSessionVT::ioSurfacePixelBufferCreationOptions): * platform/mediastream/mac/RealtimeIncomingVideoSourceCocoa.mm: (WebCore::RealtimeIncomingVideoSourceCocoa::pixelBufferPool): * platform/mediastream/mac/ScreenDisplayCaptureSourceMac.mm: (WebCore::ScreenDisplayCaptureSourceMac::createDisplayStream): * platform/network/mac/ResourceHandleMac.mm: (WebCore::ResourceHandle::applySniffingPoliciesIfNeeded): 2019-08-02 Andres Gonzalez Add accessibility object method to determine whether an element is inside a table cell. Needed for iOS accessibility client. https://bugs.webkit.org/show_bug.cgi?id=200394 Reviewed by Chris Fleizach. Explicitly returning BOOL to avoid error in some compiler configurations. * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm: (-[WebAccessibilityObjectWrapper _accessibilityIsInTableCell]): 2019-08-02 Devin Rousso Web Inspector: fix inverted check in InspectorDOMStorageAgent::enable Followup to r248179. Rubber-stamped by Joseph Pecoraro. * inspector/agents/InspectorDOMStorageAgent.cpp: (WebCore::InspectorDOMStorageAgent::enable): 2019-08-02 Fujii Hironori [Curl] Crash while destructing a URL in ~SocketStreamHandle due to data race https://bugs.webkit.org/show_bug.cgi?id=200378 Reviewed by Ross Kirsling. URL::isolatedCopy() is called in the worker thread. URL is using a thread-unsafe ref-counter. It should be called in the main thread. Covered by existing tests. * platform/network/curl/SocketStreamHandleImpl.h: * platform/network/curl/SocketStreamHandleImplCurl.cpp: (WebCore::SocketStreamHandleImpl::SocketStreamHandleImpl): Call URL::isolatedCopy() in the main thread. (WebCore::SocketStreamHandleImpl::threadEntryPoint): Added a URL argument. 2019-08-02 Sihui Liu API tests using permanent credentials should clear credentials left by previous tests https://bugs.webkit.org/show_bug.cgi?id=199729 Reviewed by Alex Christensen. Update existing API tests. * platform/network/CredentialStorage.cpp: (WebCore::CredentialStorage::clearSessionCredentials): (WebCore::CredentialStorage::clearPermanentCredentialsForProtectionSpace): Deleted. * platform/network/CredentialStorage.h: * platform/network/mac/CredentialStorageMac.mm: (WebCore::CredentialStorage::clearPermanentCredentialsForProtectionSpace): Deleted. 2019-08-02 Devin Rousso Web Inspector: Storage: disable related agents when the tab is closed https://bugs.webkit.org/show_bug.cgi?id=200117 Reviewed by Joseph Pecoraro. Rework how `enable`/`disable` is used for storage-related agents so that events are not sent and data isn't kept alive when the Storage tab isn't enabled. Covered by existing tests. * inspector/agents/InspectorApplicationCacheAgent.h: * inspector/agents/InspectorApplicationCacheAgent.cpp: (WebCore::InspectorApplicationCacheAgent::willDestroyFrontendAndBackend): (WebCore::InspectorApplicationCacheAgent::enable): (WebCore::InspectorApplicationCacheAgent::disable): Added. * inspector/agents/InspectorDOMStorageAgent.cpp: (WebCore::InspectorDOMStorageAgent::enable): (WebCore::InspectorDOMStorageAgent::disable): * inspector/agents/InspectorDatabaseAgent.cpp: (WebCore::InspectorDatabaseAgent::enable): (WebCore::InspectorDatabaseAgent::disable): 2019-08-02 Devin Rousso Web Inspector: Timelines: Develop > Start Timeline Recording doesn't work when focused on a detached inspector window https://bugs.webkit.org/show_bug.cgi?id=200125 Reviewed by Brian Burg. Always show the Timelines tab in Web Inspector whenever timeline recording starts/stops. Notify the UIProcess whenever the timeline recording state changes. * inspector/InspectorClient.h: (WebCore::InspectorClient::timelineRecordingChanged): Added. * inspector/agents/InspectorTimelineAgent.h: * inspector/agents/InspectorTimelineAgent.cpp: (WebCore::InspectorTimelineAgent::InspectorTimelineAgent): (WebCore::InspectorTimelineAgent::internalStart): (WebCore::InspectorTimelineAgent::internalStop): 2019-08-02 Yury Semikhatsky Web Inspector: Crash when interacting with Template Content in Console https://bugs.webkit.org/show_bug.cgi?id=196280 Reviewed by Joseph Pecoraro. Test: inspector/dom/inspect-template-node.html * bindings/js/JSDOMBindingSecurity.cpp: (WebCore::canAccessDocument): if target element is from a