| 2018-02-26 Commit Queue <commit-queue@webkit.org> |
| |
| Unreviewed, rolling out r226745. |
| https://bugs.webkit.org/show_bug.cgi?id=183132 |
| |
| This is breaking some websites (Requested by youenn on |
| #webkit). |
| |
| Reverted changeset: |
| |
| "Use no-cache fetch mode when loading main documents with |
| location.reload()" |
| https://bugs.webkit.org/show_bug.cgi?id=181285 |
| https://trac.webkit.org/changeset/226745 |
| |
| 2018-02-26 Philippe Normand <pnormand@igalia.com> |
| |
| Unreviewed, USE_GSTREAMER_PLAYBIN3 build fix. |
| |
| * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h: |
| There is no such ENABLE_GSTREAMER_PLAYBIN3. |
| |
| 2018-02-26 Philippe Normand <pnormand@igalia.com> |
| |
| Unreviewed, manual rollout of r228866 causing EGL_BAD_CONTEXT errors |
| |
| * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp: |
| (WebCore::MediaPlayerPrivateGStreamerBase::ensureGstGLContext): |
| Create an EGL display, even in Wayland. |
| |
| 2018-02-21 Sergio Villar Senin <svillar@igalia.com> |
| |
| [WebVR][OpenVR] Retrieve displayId and the z-depth of eye view frustum |
| https://bugs.webkit.org/show_bug.cgi?id=182999 |
| |
| Reviewed by Žan Doberšek. |
| |
| Retrieve the z-depth of the eye view frustum and the HMD unique id. |
| The unique identifier is generated by the VRPlatormManager whereas |
| we use the default values from the spec for the z-depth (those can |
| be changed by applications later via JavaScript). |
| |
| Once this lands the only remaining data to be retrieved from VR |
| backends for VRDisplay is the pose (getPose() call) and the frame |
| data (getFrameData() call). |
| |
| * Modules/webvr/VRDisplay.cpp: |
| (WebCore::VRDisplay::VRDisplay): |
| (WebCore::VRDisplay::displayId const): Deleted. |
| (WebCore::VRDisplay::displayName const): Deleted. |
| (WebCore::VRDisplay::depthNear const): Deleted. |
| (WebCore::VRDisplay::setDepthNear): Deleted. |
| (WebCore::VRDisplay::depthFar const): Deleted. |
| (WebCore::VRDisplay::setDepthFar): Deleted. |
| * Modules/webvr/VRDisplay.h: |
| (WebCore::VRDisplay::displayId const): Moved implementation from |
| source file. |
| (WebCore::VRDisplay::displayName const): Ditto. |
| (WebCore::VRDisplay::depthNear const): |
| (WebCore::VRDisplay::setDepthNear): |
| (WebCore::VRDisplay::depthFar const): |
| (WebCore::VRDisplay::setDepthFar): |
| * platform/vr/VRManager.cpp: |
| (WebCore::VRManager::generateUniqueDisplayIdentifier): |
| * platform/vr/VRManager.h: |
| * platform/vr/VRPlatformDisplay.h: |
| * platform/vr/openvr/VRPlatformDisplayOpenVR.cpp: |
| (WebCore::VRPlatformDisplayOpenVR::VRPlatformDisplayOpenVR): |
| |
| 2018-02-26 Charlie Turner <cturner@igalia.com> |
| |
| Fix build error with !LOG_DISABLED |
| https://bugs.webkit.org/show_bug.cgi?id=183049 |
| |
| Reviewed by Philippe Normand. |
| |
| The following error message was being reported when doing a |
| release build with -DLOG_DISABLED=0: |
| |
| ../../Source/WebCore/dom/messageports/MessagePortChannel.cpp: In member function ‘void WebCore::MessagePortChannel::entanglePortWithProcess(const WebCore::MessagePortIdentifier&, WebCore::ProcessIdentifier)’: |
| ../../Source/WebCore/dom/messageports/MessagePortChannel.cpp:85:111: error: ‘logString’ was not declared in this scope |
| LOG(MessagePorts, "MessagePortChannel %s (%p) entangling port %s (that port has %zu messages available)", logString().utf8().data(), this, port.logString().utf8().data(), m_pendingMessages[i].size()); |
| |
| Other uses of logString are guarded by !LOG_DISABLED rather than |
| NDEBUG, which was the cause of this issue. |
| |
| * dom/messageports/MessagePortChannel.h: Guard using !LOG_DISABLED |
| rather than NDEBUG. |
| |
| 2018-02-26 Carlos Garcia Campos <cgarcia@igalia.com> |
| |
| [GStreamer] User current executable name instead of g_get_prgname() for gst_init |
| https://bugs.webkit.org/show_bug.cgi?id=183119 |
| |
| Reviewed by Philippe Normand. |
| |
| g_get_prgname() is only set for programs using GOptionContext, calling gtk_init or explicitly calling |
| g_set_prgname(). Use WTF::getCurrentExecutableName() instead. |
| |
| * platform/graphics/gstreamer/GStreamerUtilities.cpp: |
| (WebCore::initializeGStreamer): |
| |
| 2018-02-25 Wenson Hsieh <wenson_hsieh@apple.com> |
| |
| [Extra zoom mode] Disable downloadable binary fonts by default |
| https://bugs.webkit.org/show_bug.cgi?id=183102 |
| <rdar://problem/37860699> |
| |
| Reviewed by Tim Horton. |
| |
| Disable downloadable binary fonts by default in extra zoom mode by making the initial value of |
| `downloadableBinaryFontsEnabled` conditional. Layout tests are not possible at this time; test to be added once |
| layout test support is in place. |
| |
| * page/Settings.yaml: |
| * page/SettingsBase.cpp: |
| (WebCore::SettingsBase::defaultDownloadableBinaryFontsEnabled): |
| * page/SettingsBase.h: |
| |
| 2018-02-25 Chris Dumez <cdumez@apple.com> |
| |
| Service workers do not work well inside Web.app |
| https://bugs.webkit.org/show_bug.cgi?id=183105 |
| <rdar://problem/37864140> |
| |
| Reviewed by Youenn Fablet. |
| |
| SessionID::defaultSessionID() was hardcoded in the ServiceWorkerThread constructor |
| instead of using the sessionID of the SWServer that created the service worker thread. |
| As a result, when the Service Worker would establish a SWClientConnection to the |
| server, it would use the wrong sessionID and would end up using a different SWServer |
| (Since we have a different SWServer instance per sessionID). As a result, |
| ServiceWorkerRegistration / ServiceWorker objects inside the service worker would not |
| be kept in sync with the server (since they registered themselves with the wrong |
| SWServer). |
| |
| Covered by new API test. |
| |
| * workers/service/ServiceWorkerContextData.cpp: |
| (WebCore::ServiceWorkerContextData::isolatedCopy const): |
| * workers/service/ServiceWorkerContextData.h: |
| (WebCore::ServiceWorkerContextData::encode const): |
| (WebCore::ServiceWorkerContextData::decode): |
| * workers/service/context/ServiceWorkerThread.cpp: |
| (WebCore::ServiceWorkerThread::ServiceWorkerThread): |
| * workers/service/context/ServiceWorkerThreadProxy.cpp: |
| (WebCore::createPageForServiceWorker): |
| (WebCore::ServiceWorkerThreadProxy::ServiceWorkerThreadProxy): |
| * workers/service/server/RegistrationDatabase.cpp: |
| (WebCore::RegistrationDatabase::importRecords): |
| * workers/service/server/RegistrationStore.h: |
| (WebCore::RegistrationStore::server): |
| * workers/service/server/SWServer.cpp: |
| (WebCore::SWServer::updateWorker): |
| * workers/service/server/SWServerWorker.cpp: |
| (WebCore::SWServerWorker::contextData const): |
| |
| 2018-02-24 Fujii Hironori <Hironori.Fujii@sony.com> |
| |
| Null-dereference of the second argument `resource` of DocumentLoader::scheduleSubstituteResourceLoad |
| https://bugs.webkit.org/show_bug.cgi?id=182920 |
| |
| Reviewed by Darin Adler. |
| |
| A test case |
| imported/w3c/web-platform-tests/html/browsers/offline/appcache/workers/appcache-worker.html |
| always crashes due to a null-dereference if compiled and optimized |
| by GCC 7.2. The second argument `resource` of |
| DocumentLoader::scheduleSubstituteResourceLoad can be null if the |
| resource can't be found in cache. I guess GCC optimizes inline |
| HashMap::add based on assuming the `resource` never becomes null |
| because its type is SubstituteResource&. |
| |
| This changes introduces a new method |
| DocumentLoader::scheduleCannotShowURLError because it looks tricky |
| to pass a nullptr to the second argument of |
| scheduleSubstituteResourceLoad. |
| |
| No new tests (Covered by existing tests). |
| |
| * loader/DocumentLoader.cpp: |
| (WebCore::DocumentLoader::scheduleCannotShowURLError): Added a new method. |
| * loader/DocumentLoader.h: |
| * loader/appcache/ApplicationCacheHost.cpp: |
| (WebCore::ApplicationCacheHost::maybeLoadResource): |
| Call scheduleCannotShowURLError if the resource not found in the appcache. |
| |
| 2018-02-17 Darin Adler <darin@apple.com> |
| |
| Prepare for ExtendedColor changes (first step) |
| https://bugs.webkit.org/show_bug.cgi?id=182904 |
| |
| Reviewed by Sam Weinig. |
| |
| * css/CSSValuePool.cpp: |
| (WebCore::CSSValuePool::createColorValue): Use HashMap::ensure. |
| (WebCore::CSSValuePool::createFontFamilyValue): Ditto. |
| (WebCore::CSSValuePool::createFontFaceValue): Ditto. |
| |
| * css/parser/CSSParserFastPaths.cpp: |
| (WebCore::CSSParserFastPaths::maybeParseValue): Tightened up |
| the logic a bit. |
| |
| * html/canvas/CanvasRenderingContext2D.cpp: Removed many unneeded includes. |
| |
| * inspector/InspectorCanvas.cpp: |
| (WebCore::InspectorCanvas::recordAction): Updated for Ref instead of |
| RefPtr and to use move semantics. |
| (WebCore::buildArrayForAffineTransform): Return Ref instead of RefPtr. |
| (WebCore::buildArrayForVector): Ditto. |
| (WebCore::InspectorCanvas::buildInitialState): Ditto. Also use auto more. |
| (WebCore::InspectorCanvas::buildAction): Ditto. |
| (WebCore::InspectorCanvas::buildArrayForCanvasGradient): Ditto. |
| (WebCore::InspectorCanvas::buildArrayForCanvasPattern): Ditto. |
| (WebCore::InspectorCanvas::buildArrayForImageData): Ditto. |
| * inspector/InspectorCanvas.h: Updated for the above. Also us "using" instead |
| of typedef and removed unneeded ErrorString typedef and some includes. |
| |
| * page/DragController.cpp: |
| (WebCore::DragController::concludeEditDrag): Use auto and Ref. |
| |
| * platform/DragData.h: Used pragma once and reorganized includes a bit. |
| |
| * platform/graphics/ImageFrame.h: |
| (WebCore::ImageFrame::frameBytes const): Use uint32_t instead of RGBA32 to |
| prepare for removal of the RGBA32 type coming in a future patch. |
| * platform/graphics/ImageSource.cpp: |
| (WebCore::ImageSource::cacheNativeImageAtIndex): Ditto. |
| (WebCore::ImageSource::canUseAsyncDecoding): Ditto. |
| |
| * platform/graphics/cocoa/GraphicsContextCocoa.mm: Tweaked #if for Mac-only |
| code to use PLATFORM(MAC) to be easier to read. |
| (WebCore::GraphicsContext::focusRingColor): Use sRGBColorSpaceRef instead of |
| calling CGColorSpaceCreateWithName each time. |
| |
| * platform/graphics/texmap/TextureMapperFPSCounter.cpp: Added include needed |
| now that it was removed from some header. |
| |
| * platform/graphics/win/GraphicsContextPlatformPrivateDirect2D.h: Use uint32_t |
| instead of RGBA32 to prepare for removal of the RGBA32 type coming in a future patch. |
| * platform/image-decoders/ScalableImageDecoder.cpp: |
| (WebCore::ScalableImageDecoder::frameBytesAtIndex const): Ditto. |
| * platform/image-decoders/cairo/ImageBackingStoreCairo.cpp: |
| (WebCore::ImageBackingStore::image const): Ditto. |
| * platform/image-decoders/gif/GIFImageDecoder.cpp: |
| (WebCore::GIFImageDecoder::haveDecodedRow): Ditto. |
| * platform/image-decoders/jpeg/JPEGImageDecoder.cpp: |
| (WebCore::setPixel): Ditto. |
| (WebCore::JPEGImageDecoder::outputScanlines): Ditto. |
| * platform/image-decoders/png/PNGImageDecoder.cpp: |
| (WebCore::PNGImageDecoder::rowAvailable): Ditto. |
| (WebCore::PNGImageDecoder::frameComplete): Ditto. |
| * platform/image-decoders/webp/WEBPImageDecoder.cpp: |
| (WebCore::WEBPImageDecoder::decodeFrame): Ditto. |
| (WebCore::WEBPImageDecoder::applyPostProcessing): Ditto. |
| |
| * platform/mac/PlatformPasteboardMac.mm: |
| (WebCore::PlatformPasteboard::color): Added comments. |
| |
| * rendering/EllipsisBox.cpp: |
| (WebCore::EllipsisBox::paintSelection): Use Color::isVisible. |
| |
| 2018-02-23 Chris Dumez <cdumez@apple.com> |
| |
| Crash under SchemeRegistry::shouldTreatURLSchemeAsLocal(WTF::String const&) |
| https://bugs.webkit.org/show_bug.cgi?id=183066 |
| <rdar://problem/37804111> |
| |
| Reviewed by Ryosuke Niwa. |
| |
| SecurityOrigin objects are constructed on various threads. However, someone added a |
| shouldTreatAsPotentiallyTrustworthy() call to the SecurityOrigin constructor which |
| was not thread safe. This is because this function relies on SchemeRegistry::shouldTreatURLSchemeAsSecure() |
| and SchemeRegistry::shouldTreatURLSchemeAsLocal() which were relying on global static HashMaps without |
| locks. |
| |
| Update SecurityOrigin to initialize m_isPotentiallyTrustworthy lazily, to avoid paying |
| initialization cost in the constructor. This is only queries by SecurityContext::isSecureContext(). |
| |
| Make SchemeRegistry::shouldTreatURLSchemeAsLocal() and SchemeRegistry::shouldTreatURLSchemeAsSecure() |
| thread-safe, since they are needed to initialize SecurityOrigin::m_isPotentiallyTrustworthy from |
| various threads. |
| |
| SchemeRegistry::shouldTreatURLSchemeAsSecure() is only called from SecurityOrigin (which requires |
| thread-safety), and getUserMedia() which is not hot code so the extra locking there should not |
| be an issue. |
| |
| SchemeRegistry::shouldTreatURLSchemeAsLocal() is called from SecurityOrigin (which requires thread- |
| safety). It is also called from isQuickLookPreviewURL(), MHTMLArchive::create(), Page::userStyleSheetLocationChanged(), |
| isRemoteWebArchive() and HTMLPlugInImageElement. All these are not hot code so I do not think |
| we need a fast path. |
| |
| * page/SecurityOrigin.cpp: |
| (WebCore::isLoopbackIPAddress): |
| (WebCore::shouldTreatAsPotentiallyTrustworthy): |
| (WebCore::SecurityOrigin::isPotentiallyTrustworthy const): |
| (WebCore::SecurityOrigin::isLocalHostOrLoopbackIPAddress): |
| * page/SecurityOrigin.h: |
| * platform/SchemeRegistry.cpp: |
| (WebCore::localURLSchemesLock): |
| (WebCore::localURLSchemes): |
| (WebCore::secureSchemesLock): |
| (WebCore::secureSchemes): |
| (WebCore::SchemeRegistry::registerURLSchemeAsLocal): |
| (WebCore::SchemeRegistry::removeURLSchemeRegisteredAsLocal): |
| (WebCore::SchemeRegistry::shouldTreatURLSchemeAsLocal): |
| (WebCore::SchemeRegistry::registerURLSchemeAsSecure): |
| (WebCore::SchemeRegistry::shouldTreatURLSchemeAsSecure): |
| * platform/SchemeRegistry.h: |
| |
| 2018-02-23 Christopher Reid <chris.reid@sony.com> |
| |
| [Curl] Cookie Database files are wrongfully getting deleted when the database is opened |
| https://bugs.webkit.org/show_bug.cgi?id=183051 |
| |
| Reviewed by Per Arne Vollan. |
| |
| The file stat logic was backwards causing a wrongful detection of database corruption. |
| Fixed the logic and abstracted these calls to use FileSystem. |
| |
| * platform/network/curl/CookieJarDB.cpp: |
| |
| 2018-02-23 Zalan Bujtas <zalan@apple.com> |
| |
| [RenderTreeBuilder] Make RenderTreeBuilder::* classes WTF_MAKE_FAST_ALLOCATED |
| https://bugs.webkit.org/show_bug.cgi?id=183084 |
| <rdar://problem/37828706> |
| |
| Reviewed by Antti Koivisto. |
| |
| * rendering/updating/RenderTreeBuilderBlock.h: |
| * rendering/updating/RenderTreeBuilderBlockFlow.h: |
| * rendering/updating/RenderTreeBuilderContinuation.h: |
| * rendering/updating/RenderTreeBuilderFirstLetter.h: |
| * rendering/updating/RenderTreeBuilderFormControls.h: |
| * rendering/updating/RenderTreeBuilderFullScreen.h: |
| * rendering/updating/RenderTreeBuilderInline.h: |
| * rendering/updating/RenderTreeBuilderList.h: |
| * rendering/updating/RenderTreeBuilderMathML.h: |
| * rendering/updating/RenderTreeBuilderMultiColumn.h: |
| * rendering/updating/RenderTreeBuilderRuby.h: |
| * rendering/updating/RenderTreeBuilderSVG.h: |
| * rendering/updating/RenderTreeBuilderTable.h: |
| * rendering/updating/RenderTreeUpdaterGeneratedContent.h: |
| |
| 2018-02-23 Zalan Bujtas <zalan@apple.com> |
| |
| [RenderTreeBuilder] Move RenderFullScreen::createPlaceholder to RenderTreeBuilder |
| https://bugs.webkit.org/show_bug.cgi?id=183027 |
| <rdar://problem/37773058> |
| |
| Reviewed by Antti Koivisto. |
| |
| No change in functionality. |
| |
| * dom/Document.cpp: |
| (WebCore::Document::setFullScreenRenderer): |
| * dom/Document.h: |
| * rendering/RenderFullScreen.cpp: |
| (WebCore::RenderFullScreenPlaceholder::RenderFullScreenPlaceholder): |
| (WebCore::RenderFullScreenPlaceholder::isRenderFullScreenPlaceholder const): |
| (WebCore::RenderFullScreen::wrapNewRenderer): |
| (WebCore::RenderFullScreen::wrapExistingRenderer): |
| (): Deleted. |
| (WebCore::RenderFullScreen::createPlaceholder): Deleted. |
| * rendering/RenderFullScreen.h: |
| * rendering/updating/RenderTreeBuilder.cpp: |
| (WebCore::RenderTreeBuilder::createPlaceholderForFullScreen): |
| * rendering/updating/RenderTreeBuilder.h: |
| * rendering/updating/RenderTreeBuilderFullScreen.cpp: |
| (WebCore::RenderTreeBuilder::FullScreen::createPlaceholder): |
| * rendering/updating/RenderTreeBuilderFullScreen.h: |
| |
| 2018-02-23 Zalan Bujtas <zalan@apple.com> |
| |
| [RenderTreeBuilder] Add WARN_UNUSED_RETURN to detach() |
| https://bugs.webkit.org/show_bug.cgi?id=183073 |
| <rdar://problem/37814585> |
| |
| Reviewed by Antti Koivisto. |
| |
| So that we don't destroy a renderer accidentally. |
| |
| * rendering/updating/RenderTreeBuilderBlock.h: |
| * rendering/updating/RenderTreeBuilderRuby.h: |
| * rendering/updating/RenderTreeBuilderSVG.h: |
| |
| 2018-02-22 Antoine Quint <graouts@apple.com> |
| |
| REGRESSION (r228445): A big pause button shows over YouTube videos if you tap "Tap To Unmute" on iOS |
| https://bugs.webkit.org/show_bug.cgi?id=183074 |
| <rdar://problem/37747028> |
| |
| Reviewed by Eric Carlson. |
| |
| Test: media/modern-media-controls/start-support/start-support-disable-controls-and-re-enable-post-play.html |
| |
| In the fix for webkit.org/b/182668, we made it so that when the "controls" attribute is absent from a media |
| element we stop listening to the bulk of media events and prevent controls from updating any DOM properties |
| so as to minimize the amount of CPU usage by the Web process. |
| |
| An unfortunate side effect was that, if the media controls were disabled at the time the video starts playing, |
| the StartSupport class would thus not catch the "play" event and would not be able to set the "hasPlayed" |
| property to "true" on the MediaController, which would then prevent the _shouldShowStartButton() from returning |
| "false". As a result, if the "controls" attribute was turned back on after the media started playing, they |
| would default to showing the start button, which would be then in the play state, ie. showing the pause icon. |
| |
| We now set the "hasPlayed" property in the "play" event handler on MediaController, which is always registered |
| regardless of the "controls" attribute setting. We also ensure we invalidate the "showStartButton" property on |
| the media controls when StartSupport is enabled, which is the case when the "controls" attribute is toggled back |
| to "true" from a previous "false" value. |
| |
| * Modules/modern-media-controls/media/media-controller.js: |
| (MediaController.prototype.handleEvent): |
| * Modules/modern-media-controls/media/start-support.js: |
| (StartSupport): |
| (StartSupport.prototype.enable): |
| (StartSupport.prototype.handleEvent): |
| (StartSupport.prototype._updateShowsStartButton): |
| |
| 2018-02-23 Carlos Garcia Campos <cgarcia@igalia.com> |
| |
| [GStreamer][MiniBrowser] Honor GStreamer command line parameters in MiniBrowser |
| https://bugs.webkit.org/show_bug.cgi?id=173655 |
| <rdar://problem/37706341> |
| |
| Reviewed by Philippe Normand. |
| |
| Do not assume gst is only used in the WebProcess, the MIMETypeRegistry also uses gst to get the list of |
| supported media types. Move the code to extract gst options from the process command line to a helper function |
| and use it in the UI process to pass the options to the WebProcess, but also in the current process when gst is |
| initialized without providing options. |
| |
| Fixes several unit tests that use MIMETypeRegistry in the UI process. |
| |
| * platform/graphics/gstreamer/GStreamerUtilities.cpp: |
| (WebCore::extractGStreamerOptionsFromCommandLine): Helper to get the gst options from the current process |
| command line. |
| (WebCore::initializeGStreamer): Ensure this is called once. Get the gst options from the given vector or extract |
| it from the command line if not provided. |
| * platform/graphics/gstreamer/GStreamerUtilities.h: |
| * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp: |
| (WebCore::MediaPlayerPrivateGStreamerBase::initializeGStreamerAndRegisterWebKitElements): Bring back the gst |
| initialization here. |
| |
| 2018-02-23 Philippe Normand <pnormand@igalia.com> |
| |
| [GStreamer] HTTP totalBytes query returns 0 after seeking (sometimes) |
| https://bugs.webkit.org/show_bug.cgi?id=183002 |
| |
| Reviewed by Xabier Rodriguez-Calvar. |
| |
| * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp: |
| (webkit_web_src_init): Initialize member variables. Also no need |
| to set the appsrc size at that point. |
| (webKitWebSrcStop): There is no need to reset the size when |
| seeking. Size should in most cases represent the Content-Length |
| response attribute, even when seeking. |
| (webKitWebSrcStart): No need to reset the size attribute. |
| (webKitWebSrcQueryWithParent): Let appsrc handle DURATION queries. |
| (CachedResourceStreamingClient::responseReceived): Emit duration notification one time only. |
| |
| 2018-02-23 Philippe Normand <pnormand@igalia.com> |
| |
| [GStreamer] media/video-src-blob-using-open-panel.html crashes in Debug |
| https://bugs.webkit.org/show_bug.cgi?id=183005 |
| |
| Reviewed by Xabier Rodriguez-Calvar. |
| |
| Test: media/video-src-blob-using-open-panel.html |
| |
| * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp: |
| (WebCore::convertToInternalProtocol): Also convert blob URIs |
| because they're handled by our httpsrc element. |
| * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp: |
| (webKitWebSrcGetProtocols): Prefix blob URIs too, for consistency purpose. |
| |
| 2018-02-22 Yusuke Suzuki <utatane.tea@gmail.com> |
| |
| Remove currentTime() / currentTimeMS() |
| https://bugs.webkit.org/show_bug.cgi?id=183052 |
| |
| Reviewed by Mark Lam. |
| |
| * Modules/geolocation/Geolocation.cpp: |
| (WebCore::Geolocation::haveSuitableCachedPosition): |
| * dom/DOMTimeStamp.h: |
| (WebCore::convertSecondsToDOMTimeStamp): |
| * fileapi/File.cpp: |
| (WebCore::File::File): |
| (WebCore::File::lastModified const): |
| * history/HistoryItem.cpp: |
| (WebCore::generateSequenceNumber): |
| * html/BaseDateAndTimeInputType.cpp: |
| (WebCore::BaseDateAndTimeInputType::defaultValueForStepUp const): |
| * html/DateTimeInputType.cpp: |
| (WebCore::DateTimeInputType::defaultValueForStepUp const): |
| * html/MonthInputType.cpp: |
| (WebCore::MonthInputType::defaultValueForStepUp const): |
| * html/TimeInputType.cpp: |
| (WebCore::TimeInputType::defaultValueForStepUp const): |
| * inspector/agents/InspectorNetworkAgent.cpp: |
| (WebCore::InspectorNetworkAgent::willSendRequest): |
| (WebCore::InspectorNetworkAgent::willSendWebSocketHandshakeRequest): |
| * loader/EmptyFrameLoaderClient.h: |
| * loader/FormSubmission.cpp: |
| (WebCore::generateFormDataIdentifier): |
| * loader/FrameLoader.cpp: |
| (WebCore::FrameLoader::clientRedirected): |
| * loader/FrameLoader.h: |
| * loader/FrameLoaderClient.h: |
| * loader/NavigationScheduler.cpp: |
| * page/History.cpp: |
| (WebCore::History::stateObjectAdded): |
| * page/History.h: |
| * page/PageOverlay.cpp: |
| (WebCore::PageOverlay::startFadeAnimation): |
| (WebCore::PageOverlay::fadeAnimationTimerFired): |
| * page/PageOverlay.h: |
| * platform/graphics/cg/GraphicsContextCG.cpp: |
| (WebCore::GraphicsContext::drawNativeImage): |
| * platform/ios/LegacyTileLayerPool.h: |
| * platform/ios/LegacyTileLayerPool.mm: |
| (WebCore::LegacyTileLayerPool::LegacyTileLayerPool): |
| (WebCore::LegacyTileLayerPool::addLayer): |
| (WebCore::LegacyTileLayerPool::decayedCapacity const): |
| (WebCore::LegacyTileLayerPool::prune): |
| * platform/ios/SystemMemoryIOS.cpp: |
| (WebCore::systemMemoryLevel): |
| * platform/mediastream/mac/DisplayCaptureSourceCocoa.cpp: |
| * platform/mediastream/mac/ScreenDisplayCaptureSourceMac.mm: |
| |
| 2018-02-22 Per Arne Vollan <pvollan@apple.com> |
| |
| The WebContent process should not use NSScreen in the screenDepth implementation. |
| https://bugs.webkit.org/show_bug.cgi?id=183048 |
| |
| Reviewed by Brent Fulgham. |
| |
| NSScreen method calls should be done in the UIProcess, since these calls will communicate with |
| the WindowServer. The screen depth property can be retrieved in the UIProcess, and sent to the |
| WebContent process, where it is cached. Whenever screen properties change, the UIProcess will |
| send the new screen properties to the WebProcess. |
| |
| No new tests, covered by existing tests. |
| |
| * platform/ScreenProperties.h: |
| (WebCore::ScreenProperties::encode const): |
| (WebCore::ScreenProperties::decode): |
| * platform/mac/PlatformScreenMac.mm: |
| (WebCore::getScreenProperties): |
| (WebCore::screenDepth): |
| (WebCore::screenDepthPerComponent): |
| (WebCore::screenRect): |
| (WebCore::screenAvailableRect): |
| |
| 2018-02-22 Zalan Bujtas <zalan@apple.com> |
| |
| [RenderTreeBuilder] Rename insertChild() -> attach(), takeChild() -> detach() and removeAndDestroy() -> destroy() |
| https://bugs.webkit.org/show_bug.cgi?id=183061 |
| <rdar://problem/37800269> |
| |
| Reviewed by Ryosuke Niwa. |
| |
| ...and moveChildTo() -> move() (moveChildrenTo() -> moveChildren()), |
| removeFromParentAndDestroyCleaningUpAnonymousWrappers() -> destroyAndCleanUpAnonymousWrappers() |
| |
| No change in functionality. |
| |
| * dom/Document.cpp: |
| (WebCore::Document::destroyRenderTree): |
| (WebCore::Document::setFullScreenRenderer): |
| * rendering/RenderBlockFlow.cpp: |
| (WebCore::RenderBlockFlow::styleDidChange): |
| * rendering/RenderButton.cpp: |
| (WebCore::RenderButton::setText): |
| * rendering/RenderElement.cpp: |
| (WebCore::RenderElement::didAttachChild): |
| (WebCore::RenderElement::didInsertChild): Deleted. |
| * rendering/RenderElement.h: |
| * rendering/RenderFullScreen.cpp: |
| (WebCore::RenderFullScreen::wrapNewRenderer): |
| (WebCore::RenderFullScreen::wrapExistingRenderer): |
| (WebCore::RenderFullScreen::unwrapRenderer): |
| (WebCore::RenderFullScreen::createPlaceholder): |
| * rendering/RenderMenuList.cpp: |
| (RenderMenuList::didAttachChild): |
| (RenderMenuList::setText): |
| (RenderMenuList::didInsertChild): Deleted. |
| * rendering/RenderMenuList.h: |
| * rendering/RenderQuote.cpp: |
| (WebCore::RenderQuote::updateTextRenderer): |
| * rendering/RenderTextFragment.cpp: |
| (WebCore::RenderTextFragment::setText): |
| * rendering/updating/RenderTreeBuilder.cpp: |
| (WebCore::RenderTreeBuilder::destroy): |
| (WebCore::RenderTreeBuilder::attach): |
| (WebCore::RenderTreeBuilder::attachIgnoringContinuation): |
| (WebCore::RenderTreeBuilder::detach): |
| (WebCore::RenderTreeBuilder::attachToRenderElement): |
| (WebCore::RenderTreeBuilder::attachToRenderElementInternal): |
| (WebCore::RenderTreeBuilder::move): |
| (WebCore::RenderTreeBuilder::moveAllChildren): |
| (WebCore::RenderTreeBuilder::moveChildren): |
| (WebCore::RenderTreeBuilder::moveAllChildrenIncludingFloats): |
| (WebCore::RenderTreeBuilder::makeChildrenNonInline): |
| (WebCore::RenderTreeBuilder::splitAnonymousBoxesAroundChild): |
| (WebCore::RenderTreeBuilder::childFlowStateChangesAndAffectsParentBlock): |
| (WebCore::RenderTreeBuilder::destroyAndCleanUpAnonymousWrappers): |
| (WebCore::RenderTreeBuilder::detachFromRenderGrid): |
| (WebCore::RenderTreeBuilder::detachFromRenderElement): |
| (WebCore::RenderTreeBuilder::attachToRenderGrid): |
| (WebCore::RenderTreeBuilder::removeAndDestroy): Deleted. |
| (WebCore::RenderTreeBuilder::insertChild): Deleted. |
| (WebCore::RenderTreeBuilder::insertChildIgnoringContinuation): Deleted. |
| (WebCore::RenderTreeBuilder::takeChild): Deleted. |
| (WebCore::RenderTreeBuilder::insertChildToRenderElement): Deleted. |
| (WebCore::RenderTreeBuilder::insertChildToRenderElementInternal): Deleted. |
| (WebCore::RenderTreeBuilder::moveChildTo): Deleted. |
| (WebCore::RenderTreeBuilder::moveAllChildrenTo): Deleted. |
| (WebCore::RenderTreeBuilder::moveChildrenTo): Deleted. |
| (WebCore::RenderTreeBuilder::moveAllChildrenIncludingFloatsTo): Deleted. |
| (WebCore::RenderTreeBuilder::removeFromParentAndDestroyCleaningUpAnonymousWrappers): Deleted. |
| (WebCore::RenderTreeBuilder::takeChildFromRenderGrid): Deleted. |
| (WebCore::RenderTreeBuilder::takeChildFromRenderElement): Deleted. |
| (WebCore::RenderTreeBuilder::insertChildToRenderGrid): Deleted. |
| * rendering/updating/RenderTreeBuilder.h: |
| * rendering/updating/RenderTreeBuilderBlock.cpp: |
| (WebCore::RenderTreeBuilder::Block::attach): |
| (WebCore::RenderTreeBuilder::Block::insertChildToContinuation): |
| (WebCore::RenderTreeBuilder::Block::attachIgnoringContinuation): |
| (WebCore::RenderTreeBuilder::Block::removeLeftoverAnonymousBlock): |
| (WebCore::RenderTreeBuilder::Block::detach): |
| (WebCore::RenderTreeBuilder::Block::dropAnonymousBoxChild): |
| (WebCore::RenderTreeBuilder::Block::insertChild): Deleted. |
| (WebCore::RenderTreeBuilder::Block::insertChildIgnoringContinuation): Deleted. |
| (WebCore::RenderTreeBuilder::Block::takeChild): Deleted. |
| * rendering/updating/RenderTreeBuilderBlock.h: |
| * rendering/updating/RenderTreeBuilderBlockFlow.cpp: |
| (WebCore::RenderTreeBuilder::BlockFlow::attach): |
| (WebCore::RenderTreeBuilder::BlockFlow::moveAllChildrenIncludingFloats): |
| (WebCore::RenderTreeBuilder::BlockFlow::insertChild): Deleted. |
| (WebCore::RenderTreeBuilder::BlockFlow::moveAllChildrenIncludingFloatsTo): Deleted. |
| * rendering/updating/RenderTreeBuilderBlockFlow.h: |
| * rendering/updating/RenderTreeBuilderContinuation.cpp: |
| (WebCore::RenderTreeBuilder::Continuation::cleanupOnDestroy): |
| * rendering/updating/RenderTreeBuilderFirstLetter.cpp: |
| (WebCore::RenderTreeBuilder::FirstLetter::cleanupOnDestroy): |
| (WebCore::RenderTreeBuilder::FirstLetter::updateStyle): |
| (WebCore::RenderTreeBuilder::FirstLetter::createRenderers): |
| * rendering/updating/RenderTreeBuilderFormControls.cpp: |
| (WebCore::RenderTreeBuilder::FormControls::attach): |
| (WebCore::RenderTreeBuilder::FormControls::detach): |
| (WebCore::RenderTreeBuilder::FormControls::findOrCreateParentForChild): |
| (WebCore::RenderTreeBuilder::FormControls::insertChild): Deleted. |
| (WebCore::RenderTreeBuilder::FormControls::takeChild): Deleted. |
| * rendering/updating/RenderTreeBuilderFormControls.h: |
| * rendering/updating/RenderTreeBuilderFullScreen.cpp: |
| (WebCore::RenderTreeBuilder::FullScreen::cleanupOnDestroy): |
| * rendering/updating/RenderTreeBuilderInline.cpp: |
| (WebCore::RenderTreeBuilder::Inline::attach): |
| (WebCore::RenderTreeBuilder::Inline::insertChildToContinuation): |
| (WebCore::RenderTreeBuilder::Inline::attachIgnoringContinuation): |
| (WebCore::RenderTreeBuilder::Inline::splitFlow): |
| (WebCore::RenderTreeBuilder::Inline::splitInlines): |
| (WebCore::RenderTreeBuilder::Inline::childBecameNonInline): |
| (WebCore::RenderTreeBuilder::Inline::insertChild): Deleted. |
| (WebCore::RenderTreeBuilder::Inline::insertChildIgnoringContinuation): Deleted. |
| * rendering/updating/RenderTreeBuilderInline.h: |
| * rendering/updating/RenderTreeBuilderList.cpp: |
| (WebCore::RenderTreeBuilder::List::updateItemMarker): |
| * rendering/updating/RenderTreeBuilderMathML.cpp: |
| (WebCore::RenderTreeBuilder::MathML::makeFences): |
| (WebCore::RenderTreeBuilder::MathML::attach): |
| (WebCore::RenderTreeBuilder::MathML::insertChild): Deleted. |
| * rendering/updating/RenderTreeBuilderMathML.h: |
| * rendering/updating/RenderTreeBuilderMultiColumn.cpp: |
| (WebCore::RenderTreeBuilder::MultiColumn::createFragmentedFlow): |
| (WebCore::RenderTreeBuilder::MultiColumn::destroyFragmentedFlow): |
| (WebCore::RenderTreeBuilder::MultiColumn::processPossibleSpannerDescendant): |
| (WebCore::RenderTreeBuilder::MultiColumn::handleSpannerRemoval): |
| * rendering/updating/RenderTreeBuilderRuby.cpp: |
| (WebCore::RenderTreeBuilder::Ruby::moveInlineChildren): |
| (WebCore::RenderTreeBuilder::Ruby::moveBlockChildren): |
| (WebCore::RenderTreeBuilder::Ruby::attach): |
| (WebCore::RenderTreeBuilder::Ruby::findOrCreateParentForChild): |
| (WebCore::RenderTreeBuilder::Ruby::rubyBaseSafe): |
| (WebCore::RenderTreeBuilder::Ruby::detach): |
| (WebCore::RenderTreeBuilder::Ruby::insertChild): Deleted. |
| (WebCore::RenderTreeBuilder::Ruby::takeChild): Deleted. |
| * rendering/updating/RenderTreeBuilderRuby.h: |
| * rendering/updating/RenderTreeBuilderSVG.cpp: |
| (WebCore::RenderTreeBuilder::SVG::attach): |
| (WebCore::RenderTreeBuilder::SVG::detach): |
| (WebCore::RenderTreeBuilder::SVG::insertChild): Deleted. |
| (WebCore::RenderTreeBuilder::SVG::takeChild): Deleted. |
| * rendering/updating/RenderTreeBuilderSVG.h: |
| * rendering/updating/RenderTreeBuilderTable.cpp: |
| (WebCore::RenderTreeBuilder::Table::findOrCreateParentForChild): |
| (WebCore::RenderTreeBuilder::Table::attach): |
| (WebCore::RenderTreeBuilder::Table::collapseAndDestroyAnonymousSiblingRows): |
| (WebCore::RenderTreeBuilder::Table::insertChild): Deleted. |
| * rendering/updating/RenderTreeBuilderTable.h: |
| * rendering/updating/RenderTreeUpdater.cpp: |
| (WebCore::RenderTreeUpdater::createRenderer): |
| (WebCore::RenderTreeUpdater::createTextRenderer): |
| (WebCore::RenderTreeUpdater::tearDownRenderers): |
| (WebCore::RenderTreeUpdater::tearDownTextRenderer): |
| (WebCore::RenderTreeUpdater::tearDownLeftoverPaginationRenderersIfNeeded): |
| * rendering/updating/RenderTreeUpdaterGeneratedContent.cpp: |
| (WebCore::createContentRenderers): |
| |
| 2018-02-22 Chris Dumez <cdumez@apple.com> |
| |
| ResourceRequestBase::isolatedCopy() fails to isolate copy the cachePartition |
| https://bugs.webkit.org/show_bug.cgi?id=183059 |
| <rdar://problem/37800202> |
| |
| Reviewed by Youenn Fablet. |
| |
| Update ResourceRequestBase::setAsIsolatedCopy() to call isolatedCopy() on the cachePartition as well, |
| given that it is a String and it would not be safe to send it to another thread otherwise. |
| |
| * platform/network/ResourceRequestBase.cpp: |
| (WebCore::ResourceRequestBase::setAsIsolatedCopy): |
| |
| 2018-02-22 Chris Dumez <cdumez@apple.com> |
| |
| ServiceWorkerContainer::startScriptFetchForJob() fails to isolate copy the registrationKey before passing it to the main thread |
| https://bugs.webkit.org/show_bug.cgi?id=183050 |
| <rdar://problem/37796881> |
| |
| Reviewed by Youenn Fablet. |
| |
| Create an isolated copy of the registrationKey before passing it to the main thread in ServiceWorkerContainer's |
| startScriptFetchForJob() / jobFinishedLoadingScript() / jobFailedLoadingScript(). |
| |
| * workers/service/ServiceWorkerContainer.cpp: |
| (WebCore::ServiceWorkerContainer::startScriptFetchForJob): |
| (WebCore::ServiceWorkerContainer::jobFinishedLoadingScript): |
| (WebCore::ServiceWorkerContainer::jobFailedLoadingScript): |
| |
| 2018-02-22 Chris Dumez <cdumez@apple.com> |
| |
| ServiceWorkerContainer::scheduleJob() fails to isolate copy the jobData before passing it to the main thread |
| https://bugs.webkit.org/show_bug.cgi?id=183046 |
| <rdar://problem/37793395> |
| |
| Reviewed by Youenn Fablet. |
| |
| Make sure we isolate copy the jobData before passing it to the main thread in ServiceWorkerContainer::scheduleJob(). |
| The jobData contains Strings / URLs so it is not safe to have non-isolated copies of it on various threads. |
| |
| * workers/service/ServiceWorkerContainer.cpp: |
| (WebCore::ServiceWorkerContainer::scheduleJob): |
| |
| 2018-02-22 Basuke Suzuki <Basuke.Suzuki@sony.com> |
| |
| [Curl] Fix warning on clang. |
| https://bugs.webkit.org/show_bug.cgi?id=182986 |
| |
| Reviewed by Konstantin Tokarev. |
| |
| No new tests because there's no behaviro changes. |
| |
| * platform/network/curl/CurlResourceHandleDelegate.cpp: |
| (WebCore::CurlResourceHandleDelegate::curlDidSendData): |
| (WebCore::CurlResourceHandleDelegate::curlDidReceiveBuffer): |
| (WebCore::CurlResourceHandleDelegate::curlDidFailWithError): |
| * platform/network/curl/CurlResourceHandleDelegate.h: |
| |
| 2018-02-22 Youenn Fablet <youenn@apple.com> |
| |
| WorkerCacheStorageConnection::doRemove can assert in case two frames try to delete the same cache at the same time |
| https://bugs.webkit.org/show_bug.cgi?id=183041 |
| |
| Reviewed by Chris Dumez. |
| |
| * Modules/cache/WorkerCacheStorageConnection.cpp: |
| (WebCore::WorkerCacheStorageConnection::doRemove): Update the assertion to accept the |
| case of an already deleted cache, i.e. returned identifer is 0. |
| |
| 2018-02-22 Alejandro G. Castro <alex@igalia.com> |
| |
| Remove some code leftovers in LibWebRTCMediaEndpoint and RealtimeOutgoingVideoSource classes |
| https://bugs.webkit.org/show_bug.cgi?id=183031 |
| |
| Reviewed by Youenn Fablet. |
| |
| This include and namespace are not required in the file. |
| |
| Just removing unused code, no tests required. |
| |
| * Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp: |
| |
| 2018-02-22 Chris Dumez <cdumez@apple.com> |
| |
| Document.open() cancels existing provisional load but not navigation policy check |
| https://bugs.webkit.org/show_bug.cgi?id=183012 |
| <rdar://problem/37755831> |
| |
| Reviewed by Alex Christensen. |
| |
| Test: fast/dom/Document/open-with-pending-load-async-policy.html |
| |
| * dom/Document.cpp: |
| (WebCore::Document::open): |
| The existing code was calling FrameLoader::stopAllLoaders() when the loader's state |
| is FrameStateProvisional. The issue is that the FrameLoader's state only gets set |
| to FrameStateProvisional after the policy decision for the navigation is made. |
| This means that we fail to cancel a pending load if is still in the policy decision |
| stage, which can happen when the policy decision is made asynchronously. We now |
| also cancel such pending navigation policy checks as well. |
| |
| * loader/PolicyChecker.cpp: |
| (WebCore::PolicyChecker::checkNavigationPolicy): |
| Make sure the m_delegateIsDecidingNavigationPolicy flag gets reset inside the |
| lambda. Otherwise, it gets reset too early when the policy decision is made |
| asynchronously. |
| |
| 2018-02-22 Youenn Fablet <youenn@apple.com> |
| |
| Add release asserts for service worker fetch and postMessage events |
| https://bugs.webkit.org/show_bug.cgi?id=183025 |
| rdar://problem/37765052 |
| |
| Reviewed by Daniel Bates. |
| |
| Add release assertion so that a service worker will only dispatch a message event |
| for clients and service workers with the same origin. |
| No change of behavior. |
| |
| * platform/network/ResourceRequestBase.h: |
| * workers/service/context/ServiceWorkerThread.cpp: |
| (WebCore::ServiceWorkerThread::postMessageToServiceWorker): |
| * workers/service/context/ServiceWorkerThreadProxy.h: |
| |
| 2018-02-22 Miguel Gomez <magomez@igalia.com> |
| |
| including both gl3.h and gl2.h when USE_OPENGL_ES is enabled |
| https://bugs.webkit.org/show_bug.cgi?id=183008 |
| |
| Reviewed by Michael Catanzaro. |
| |
| Don't include GLES3 headers as we stick to GLES2 API resources. |
| |
| No new tests, no behavior change. |
| |
| * platform/graphics/GLContext.cpp: |
| |
| 2018-02-22 Ms2ger <Ms2ger@igalia.com> |
| |
| [GTK][WPE] Fix some build errors in service workers code |
| https://bugs.webkit.org/show_bug.cgi?id=182966 |
| |
| Reviewed by Žan Doberšek. |
| |
| No new tests: no change in behavior. |
| |
| * workers/service/ServiceWorkerProvider.h: add missing forward declaration. |
| |
| 2018-02-21 Zalan Bujtas <zalan@apple.com> |
| |
| [RenderTreeBuilder] Move RenderObject::insertedInto() mutation logic to RenderTreeBuilder |
| https://bugs.webkit.org/show_bug.cgi?id=183022 |
| <rdar://problem/37764326> |
| |
| Reviewed by Antti Koivisto. |
| |
| No change in functionality. |
| |
| * rendering/RenderObject.cpp: |
| (WebCore::RenderObject::insertedIntoTree): |
| * rendering/updating/RenderTreeBuilder.cpp: |
| (WebCore::RenderTreeBuilder::insertChildToRenderElementInternal): |
| (WebCore::RenderTreeBuilder::moveChildrenTo): |
| (WebCore::RenderTreeBuilder::multiColumnDescendantInserted): Deleted. |
| * rendering/updating/RenderTreeBuilder.h: |
| |
| 2018-02-21 Tim Horton <timothy_horton@apple.com> |
| |
| Include all Cocoa sources in all Cocoa platform builds |
| https://bugs.webkit.org/show_bug.cgi?id=183026 |
| <rdar://problem/37513101> |
| |
| Reviewed by Dan Bernstein. |
| |
| Similar to r228571, don't have separate Sources files for iOS and Mac. |
| All sources now have #ifdefs that ensure that only the right ones |
| build on the right platforms. This makes it much easier to reason |
| about what builds where by just looking at the sources. |
| |
| * SourcesCocoa.txt: |
| * SourcesIOS.txt: Removed. |
| * SourcesMac.txt: Removed. |
| * WebCore.xcodeproj/project.pbxproj: |
| * editing/WebContentReader.h: |
| * platform/mediastream/mac/ScreenDisplayCaptureSourceMac.h: |
| |
| 2018-02-21 Youenn Fablet <youenn@apple.com> |
| |
| Make SubstituteResource take a ResourceResponse r-value |
| https://bugs.webkit.org/show_bug.cgi?id=183020 |
| |
| Reviewed by Alex Christensen. |
| |
| No change of behavior. |
| Make SubstituteResource take a ResourceResponse r-value. |
| Update ArchiveResource accordingly. |
| Take benefit of that in ApplicationCacheResource to set the response source to ApplicationCache |
| before passing it to SubstituteResource constructor. |
| |
| * loader/SubstituteResource.h: |
| (WebCore::SubstituteResource::SubstituteResource): |
| (WebCore::SubstituteResource::resourceResponse): Deleted. |
| * loader/appcache/ApplicationCacheResource.cpp: |
| (WebCore::ApplicationCacheResource::create): |
| (WebCore::ApplicationCacheResource::ApplicationCacheResource): |
| * loader/appcache/ApplicationCacheResource.h: |
| (WebCore::ApplicationCacheResource::create): Deleted. |
| * loader/archive/ArchiveResource.cpp: |
| (WebCore::ArchiveResource::ArchiveResource): |
| |
| 2018-02-21 Zalan Bujtas <zalan@apple.com> |
| |
| [RenderTreeBuilder] ::willBeRemoved() does not need RenderTreeBuilder anymore. |
| https://bugs.webkit.org/show_bug.cgi?id=183019 |
| <rdar://problem/37761421> |
| |
| Reviewed by Antti Koivisto. |
| |
| All the willBeDestroyed() mutations have been moved over to RenderTreeBuilder. |
| |
| No change in functionality. |
| |
| * rendering/RenderBlock.cpp: |
| (WebCore::RenderBlock::willBeDestroyed): |
| * rendering/RenderBlock.h: |
| * rendering/RenderBlockFlow.cpp: |
| (WebCore::RenderBlockFlow::willBeDestroyed): |
| * rendering/RenderBlockFlow.h: |
| * rendering/RenderBox.cpp: |
| (WebCore::RenderBox::willBeDestroyed): |
| * rendering/RenderBox.h: |
| * rendering/RenderBoxModelObject.cpp: |
| (WebCore::RenderBoxModelObject::willBeDestroyed): |
| * rendering/RenderBoxModelObject.h: |
| * rendering/RenderCounter.cpp: |
| (WebCore::RenderCounter::willBeDestroyed): |
| * rendering/RenderCounter.h: |
| * rendering/RenderElement.cpp: |
| (WebCore::RenderElement::willBeDestroyed): |
| * rendering/RenderElement.h: |
| * rendering/RenderEmbeddedObject.cpp: |
| (WebCore::RenderEmbeddedObject::willBeDestroyed): |
| * rendering/RenderEmbeddedObject.h: |
| * rendering/RenderFragmentedFlow.cpp: |
| (WebCore::RenderFragmentedFlow::willBeDestroyed): |
| * rendering/RenderFragmentedFlow.h: |
| * rendering/RenderImage.cpp: |
| (WebCore::RenderImage::willBeDestroyed): |
| * rendering/RenderImage.h: |
| * rendering/RenderInline.cpp: |
| (WebCore::RenderInline::willBeDestroyed): |
| * rendering/RenderInline.h: |
| * rendering/RenderLayerModelObject.cpp: |
| (WebCore::RenderLayerModelObject::willBeDestroyed): |
| * rendering/RenderLayerModelObject.h: |
| * rendering/RenderListBox.cpp: |
| (WebCore::RenderListBox::willBeDestroyed): |
| * rendering/RenderListBox.h: |
| * rendering/RenderListMarker.cpp: |
| (WebCore::RenderListMarker::willBeDestroyed): |
| * rendering/RenderListMarker.h: |
| * rendering/RenderMenuList.cpp: |
| (WebCore::RenderMenuList::willBeDestroyed): |
| * rendering/RenderMenuList.h: |
| * rendering/RenderObject.cpp: |
| (WebCore::RenderObject::willBeDestroyed): |
| (WebCore::RenderObject::destroy): |
| * rendering/RenderObject.h: |
| * rendering/RenderReplaced.cpp: |
| (WebCore::RenderReplaced::willBeDestroyed): |
| * rendering/RenderReplaced.h: |
| * rendering/RenderSearchField.cpp: |
| (WebCore::RenderSearchField::willBeDestroyed): |
| * rendering/RenderSearchField.h: |
| * rendering/RenderSnapshottedPlugIn.cpp: |
| (WebCore::RenderSnapshottedPlugIn::willBeDestroyed): |
| * rendering/RenderSnapshottedPlugIn.h: |
| * rendering/RenderText.cpp: |
| (WebCore::RenderText::willBeDestroyed): |
| * rendering/RenderText.h: |
| * rendering/RenderTextControlMultiLine.cpp: |
| (WebCore::RenderTextControlMultiLine::willBeDestroyed): |
| * rendering/RenderTextControlMultiLine.h: |
| * rendering/RenderVideo.cpp: |
| (WebCore::RenderVideo::willBeDestroyed): |
| * rendering/RenderVideo.h: |
| * rendering/RenderWidget.cpp: |
| (WebCore::RenderWidget::willBeDestroyed): |
| * rendering/RenderWidget.h: |
| * rendering/svg/RenderSVGBlock.cpp: |
| (WebCore::RenderSVGBlock::willBeDestroyed): |
| * rendering/svg/RenderSVGBlock.h: |
| * rendering/svg/RenderSVGImage.cpp: |
| (WebCore::RenderSVGImage::willBeDestroyed): |
| * rendering/svg/RenderSVGImage.h: |
| * rendering/svg/RenderSVGInline.cpp: |
| (WebCore::RenderSVGInline::willBeDestroyed): |
| * rendering/svg/RenderSVGInline.h: |
| * rendering/svg/RenderSVGModelObject.cpp: |
| (WebCore::RenderSVGModelObject::willBeDestroyed): |
| * rendering/svg/RenderSVGModelObject.h: |
| * rendering/svg/RenderSVGResourceContainer.cpp: |
| (WebCore::RenderSVGResourceContainer::willBeDestroyed): |
| * rendering/svg/RenderSVGResourceContainer.h: |
| * rendering/svg/RenderSVGRoot.cpp: |
| (WebCore::RenderSVGRoot::willBeDestroyed): |
| * rendering/svg/RenderSVGRoot.h: |
| * rendering/svg/RenderSVGText.cpp: |
| (WebCore::RenderSVGText::willBeDestroyed): |
| * rendering/svg/RenderSVGText.h: |
| |
| 2018-02-21 Per Arne Vollan <pvollan@apple.com> |
| |
| The WebContent process should not use NSScreen in the screenAvailableRect/screenRect implementations. |
| https://bugs.webkit.org/show_bug.cgi?id=182855 |
| |
| Reviewed by Brent Fulgham. |
| |
| On macOS, the functions screenAvailableRect and screenRect is implemented using NSScreen, which is communicating |
| with the WindowServer. To avoid this WindowServer communication from the WebContent process when calling |
| screenAvailableRect and screenRect, it is possible to let the UIProcess send a message to the WebContent |
| process whenever there is a change in the display properties, and have the WebContent process cache these |
| display properties. This message should also be sent to a newly started WebContent process. |
| |
| No new tests, covered by existing tests. |
| |
| * WebCore.xcodeproj/project.pbxproj: |
| * platform/PlatformScreen.h: |
| * platform/mac/PlatformScreenMac.mm: |
| (WebCore::getScreenProperties): |
| (WebCore::screenProperties): |
| (WebCore::setScreenProperties): |
| (WebCore::screenRect): |
| (WebCore::screenAvailableRect): |
| * platform/ScreenProperties.h: Added. |
| (WebCore::ScreenProperties::encode const): |
| (WebCore::ScreenProperties::decode): |
| |
| 2018-02-21 Christopher Reid <chris.reid@sony.com> |
| |
| [Curl] Curl Cookie Database File should be configurable using NetworkProcessCreationParameters |
| https://bugs.webkit.org/show_bug.cgi?id=182751 |
| |
| Reviewed by Youenn Fablet. |
| |
| No change in behavior. |
| |
| Adding support to set a custom CookieJar Database. |
| Took CookieJarDB::open() out of its constructor because both the Network and Web process |
| were trying to open the journal files but one process was failing due to a lack of permission. |
| Now the database file is lazily opened and only the Network process will try to open the database. |
| Some cleanup was done to CookieJarDB too. |
| |
| * platform/network/NetworkStorageSession.h: |
| * platform/network/curl/CookieJarDB.cpp: |
| * platform/network/curl/CookieJarDB.h: |
| * platform/network/curl/NetworkStorageSessionCurl.cpp: |
| |
| 2018-02-21 Chris Dumez <cdumez@apple.com> |
| |
| Regression(r228708): Crash under WebCore::MediaResource::responseReceived(WebCore::CachedResource&, WebCore::ResourceResponse const&) |
| https://bugs.webkit.org/show_bug.cgi?id=183018 |
| <rdar://problem/37754154> |
| |
| Reviewed by Eric Carlson. |
| |
| The fix at r228708 was trying to address the fact that avplayer sometimes |
| deallocates WebCoreNSURLSessionDataTask objects on a non-main thread, which |
| was not safe because its _resource data member needs to be deallocated on |
| the main thread. |
| |
| The issue is that r228708 caused _resource to outlive its WebCoreNSURLSessionDataTask. |
| This is an issue because _resource has a client data member (of type WebCoreNSURLSessionDataTaskClient) |
| which has a raw pointer to the WebCoreNSURLSessionDataTask. This means that the main thread could |
| call methods like responseReceived() on the resource, which would call responseReceived() on the |
| client, which would try to call [WebCoreNSURLSessionDataTask receivedResponse:] with an invalid |
| m_task pointer. |
| |
| To address the issue, I introduced a clearTask() method on WebCoreNSURLSessionDataTaskClient, which |
| gets called from a non-main thread to clear the client's m_task pointer when the task is destroyed |
| on a non-main thread. So that this is safe, every time the client tries to use m_task, we now |
| acquire a lock for thread-safety and do a null-check on m_task. |
| |
| No new tests, no known reproduction case. |
| |
| * platform/graphics/PlatformMediaResourceLoader.h: |
| (WebCore::PlatformMediaResource::client): |
| * platform/network/cocoa/WebCoreNSURLSession.mm: |
| (WebCore::WebCoreNSURLSessionDataTaskClient::clearTask): |
| (WebCore::WebCoreNSURLSessionDataTaskClient::dataSent): |
| (WebCore::WebCoreNSURLSessionDataTaskClient::responseReceived): |
| (WebCore::WebCoreNSURLSessionDataTaskClient::shouldCacheResponse): |
| (WebCore::WebCoreNSURLSessionDataTaskClient::dataReceived): |
| (WebCore::WebCoreNSURLSessionDataTaskClient::redirectReceived): |
| (WebCore::WebCoreNSURLSessionDataTaskClient::accessControlCheckFailed): |
| (WebCore::WebCoreNSURLSessionDataTaskClient::loadFailed): |
| (WebCore::WebCoreNSURLSessionDataTaskClient::loadFinished): |
| (-[WebCoreNSURLSessionDataTask dealloc]): |
| |
| 2018-02-21 Youenn Fablet <youenn@apple.com> |
| |
| Move AppCache loading to the NetworkProcess |
| https://bugs.webkit.org/show_bug.cgi?id=178540 |
| <rdar://problem/37119346> |
| |
| Reviewed by Alex Christensen. |
| |
| Covered by existing tests. |
| |
| Use ApplicationResourceLoader for cache entry loading. |
| Remove all ResourceHandle use from ApplicationCacheGroup. |
| Renamed m_loader in m_manifestLoader and added a new m_entryLoader to load cache entries. |
| |
| Updated ApplicationCacheResourceLoader to handle different types of CachedResource. |
| This allows in particular to handle redirections based on the resource type and create the ApplicationCacheResource with the right type. |
| Use Include as credentials mode as per specification. |
| |
| Add a new ApplicationCache ResourceResonse::Source. |
| This allows fixing an assertion and should allow better inspector support if needs be. |
| |
| * inspector/agents/InspectorNetworkAgent.cpp: |
| (WebCore::responseSource): |
| * loader/ResourceLoader.cpp: |
| (WebCore::logResourceResponseSource): |
| * loader/SubstituteResource.h: |
| (WebCore::SubstituteResource::resourceResponse): |
| * loader/appcache/ApplicationCacheGroup.cpp: |
| (WebCore::ApplicationCacheGroup::stopLoading): |
| (WebCore::ApplicationCacheGroup::update): |
| (WebCore::ApplicationCacheGroup::didFinishLoading): |
| (WebCore::ApplicationCacheGroup::didFinishLoadingEntry): |
| (WebCore::ApplicationCacheGroup::didFail): |
| (WebCore::ApplicationCacheGroup::didFailLoadingEntry): |
| (WebCore::ApplicationCacheGroup::checkIfLoadIsComplete): |
| (WebCore::ApplicationCacheGroup::startLoadingEntry): |
| * loader/appcache/ApplicationCacheGroup.h: |
| * loader/appcache/ApplicationCacheResource.cpp: |
| (WebCore::ApplicationCacheResource::ApplicationCacheResource): |
| * loader/appcache/ApplicationCacheResourceLoader.cpp: |
| (WebCore::ApplicationCacheResourceLoader::create): |
| (WebCore::ApplicationCacheResourceLoader::ApplicationCacheResourceLoader): |
| (WebCore::ApplicationCacheResourceLoader::responseReceived): |
| (WebCore::ApplicationCacheResourceLoader::redirectReceived): |
| * loader/appcache/ApplicationCacheResourceLoader.h: |
| * platform/network/ResourceResponseBase.h: |
| * platform/network/cocoa/ResourceResponseCocoa.mm: |
| (WebCore::ResourceResponse::platformCertificateInfo const): |
| * testing/Internals.cpp: |
| (WebCore::responseSourceToString): |
| |
| 2018-02-21 Zalan Bujtas <zalan@apple.com> |
| |
| [RenderTreeBuilder] Move RenderBoxModelObject::willBeRemoved() mutation logic to RenderTreeBuilder |
| https://bugs.webkit.org/show_bug.cgi?id=183014 |
| <rdar://problem/37757428> |
| |
| Reviewed by Antti Koivisto. |
| |
| No change in functionality. |
| |
| * Sources.txt: |
| * WebCore.xcodeproj/project.pbxproj: |
| * rendering/RenderBoxModelObject.cpp: |
| (WebCore::RenderBoxModelObject::~RenderBoxModelObject): |
| (WebCore::RenderBoxModelObject::willBeDestroyed): |
| (WebCore::RenderBoxModelObject::continuationChainNode const): |
| (): Deleted. |
| (WebCore::RenderBoxModelObject::removeAndDestroyAllContinuations): Deleted. |
| * rendering/RenderBoxModelObject.h: |
| * rendering/updating/RenderTreeBuilder.cpp: |
| (WebCore::RenderTreeBuilder::RenderTreeBuilder): |
| (WebCore::RenderTreeBuilder::removeAndDestroy): |
| * rendering/updating/RenderTreeBuilder.h: |
| (WebCore::RenderTreeBuilder::continuationBuilder): |
| * rendering/updating/RenderTreeBuilderContinuation.cpp: Added. |
| (WebCore::RenderTreeBuilder::Continuation::Continuation): |
| (WebCore::RenderTreeBuilder::Continuation::cleanupOnDestroy): |
| * rendering/updating/RenderTreeBuilderContinuation.h: Added. |
| |
| 2018-02-21 Youenn Fablet <youenn@apple.com> |
| |
| ServiceWorkerJob::m_lastResponse is unneeded |
| https://bugs.webkit.org/show_bug.cgi?id=183013 |
| |
| Reviewed by Chris Dumez. |
| |
| Remove this field since not used anywhere. |
| |
| * workers/service/ServiceWorkerJob.cpp: |
| (WebCore::ServiceWorkerJob::didReceiveResponse): |
| * workers/service/ServiceWorkerJob.h: |
| |
| 2018-02-21 Youenn Fablet <youenn@apple.com> |
| |
| Use ResourceLoader to load appcache manifest |
| https://bugs.webkit.org/show_bug.cgi?id=182861 |
| |
| Reviewed by Alex Christensen. |
| |
| Covered by updated tests. |
| |
| Add ApplicationCacheResourceLoader to load an ApplicationCacheResource from a ResourceLoader. |
| Make use of it to load the app cache manifest. |
| Future work should load entries using the same loader. |
| |
| Remove manifest handle. |
| Ensure that DocumentLoader does not register the manifest resource loader as its lifetime |
| is handled by its ApplicationCacheGroup. |
| |
| Add a ResourceLoader option to bypass the application cache. |
| Use it for manifest loading. |
| |
| * Sources.txt: |
| * WebCore.xcodeproj/project.pbxproj: |
| * loader/DocumentLoader.cpp: |
| (WebCore::DocumentLoader::addSubresourceLoader): |
| * loader/ResourceLoaderOptions.h: |
| * loader/appcache/ApplicationCacheGroup.cpp: |
| (WebCore::ApplicationCacheGroup::stopLoading): |
| (WebCore::ApplicationCacheGroup::update): |
| (WebCore::ApplicationCacheGroup::createRequest): |
| (WebCore::ApplicationCacheGroup::didReceiveResponseAsync): |
| (WebCore::ApplicationCacheGroup::didReceiveData): |
| (WebCore::ApplicationCacheGroup::didFinishLoading): |
| (WebCore::ApplicationCacheGroup::didFail): |
| (WebCore::ApplicationCacheGroup::didFinishLoadingManifest): |
| (WebCore::ApplicationCacheGroup::checkIfLoadIsComplete): |
| * loader/appcache/ApplicationCacheGroup.h: |
| * loader/appcache/ApplicationCacheHost.cpp: |
| (WebCore::ApplicationCacheHost::maybeLoadResource): |
| (WebCore::ApplicationCacheHost::maybeLoadFallbackForRedirect): |
| (WebCore::ApplicationCacheHost::maybeLoadFallbackForResponse): |
| (WebCore::ApplicationCacheHost::maybeLoadFallbackForError): |
| * loader/appcache/ApplicationCacheResourceLoader.cpp: Added. |
| * loader/appcache/ApplicationCacheResourceLoader.h: Added. |
| |
| 2018-02-21 Don Olmstead <don.olmstead@sony.com> |
| |
| [CMake][Win] Use cmakeconfig.h rather than config.h and Platform.h |
| https://bugs.webkit.org/show_bug.cgi?id=182883 |
| |
| Reviewed by Per Arne Vollan. |
| |
| No new tests. No change in behavior. |
| |
| * WebCorePrefix.h: |
| * config.h: |
| * testing/js/WebCoreTestSupportPrefix.h: |
| |
| 2018-02-21 Zalan Bujtas <zalan@apple.com> |
| |
| [RenderTreeBuilder] Move RenderView::willBeRemoved() mutation logic to RenderTreeBuilder |
| https://bugs.webkit.org/show_bug.cgi?id=183009 |
| |
| Reviewed by Antti Koivisto. |
| |
| No change in functionality. |
| |
| * dom/Document.cpp: |
| (WebCore::Document::destroyRenderTree): |
| * rendering/RenderView.cpp: |
| (WebCore::RenderView::~RenderView): |
| (WebCore::RenderView::willBeDestroyed): Deleted. |
| * rendering/RenderView.h: |
| |
| 2018-02-21 Michael Catanzaro <mcatanzaro@igalia.com> |
| |
| [GTK] USE_UPOWER causes crashes inside a chroot or on systems with broken dbus/upower |
| https://bugs.webkit.org/show_bug.cgi?id=181825 |
| |
| Reviewed by Carlos Garcia Campos. |
| |
| We could fix this crash, but that would not be good enough, because upower-glib is a |
| synchronous API that wraps D-Bus calls. That's not acceptable for use in the web process. |
| Rewrite LowPowerModeNotifierGLib to use upower's D-Bus API directly, instead. |
| |
| Note that this also enables LowPowerModeNotifier for WPE, since the USE(UPOWER) build |
| flag is no longer needed. |
| |
| * platform/LowPowerModeNotifier.cpp: |
| * platform/LowPowerModeNotifier.h: |
| * platform/glib/LowPowerModeNotifierGLib.cpp: |
| (WebCore::LowPowerModeNotifier::LowPowerModeNotifier): |
| (WebCore::LowPowerModeNotifier::updateWarningLevel): |
| (WebCore::LowPowerModeNotifier::warningLevelChanged): |
| (WebCore::LowPowerModeNotifier::gPropertiesChangedCallback): |
| (WebCore::LowPowerModeNotifier::~LowPowerModeNotifier): |
| (WebCore::LowPowerModeNotifier::updateState): Deleted. |
| (WebCore::LowPowerModeNotifier::warningLevelCallback): Deleted. |
| |
| 2018-02-21 Chris Dumez <cdumez@apple.com> |
| |
| VTTCue constructor should use 'double' type for startTime / endTime |
| https://bugs.webkit.org/show_bug.cgi?id=182988 |
| |
| Reviewed by Eric Carlson. |
| |
| VTTCue constructor should use 'double' type for startTime / endTime, not |
| 'unrestricted double': |
| - https://w3c.github.io/webvtt/#the-vttcue-interface |
| |
| Otherwise, we end up potentially returning NaN for TextTrackCue.startTime / endTime, |
| even though those correctly use type 'double': |
| - https://html.spec.whatwg.org/multipage/media.html#texttrackcue |
| |
| The new behavior is consistent with Firefox and Chrome. |
| |
| No new tests, updated existing test. |
| |
| * bindings/js/JSDOMConvertNumbers.h: |
| (WebCore::JSConverter<IDLDouble>::convert): |
| Add assertion to make sure our implementation never tries to return NaN |
| for an IDL attribute of type 'double'. This would be invalid as per Web |
| IDL spec and would crash if the NaN being returned was impure as JSValue |
| could not store it as a double. |
| |
| * html/track/VTTCue.idl: |
| Update constructor parameters to use 'double' type instead of 'unrestricted |
| double', as per: |
| - https://w3c.github.io/webvtt/#the-vttcue-interface |
| |
| 2018-02-21 Zalan Bujtas <zalan@apple.com> |
| |
| [RenderTreeBuilder] Move RenderTextFragment::willBeRemoved() mutation logic to RenderTreeBuilder |
| https://bugs.webkit.org/show_bug.cgi?id=182946 |
| <rdar://problem/37690039> |
| |
| Reviewed by Antti Koivisto. |
| |
| No change in functionality. |
| |
| * rendering/RenderTextFragment.cpp: |
| (WebCore::RenderTextFragment::willBeDestroyed): |
| * rendering/updating/RenderTreeBuilder.cpp: |
| (WebCore::RenderTreeBuilder::takeChild): |
| * rendering/updating/RenderTreeBuilderFirstLetter.cpp: |
| (WebCore::RenderTreeBuilder::FirstLetter::cleanupOnRemoval): |
| * rendering/updating/RenderTreeBuilderFirstLetter.h: |
| |
| 2018-02-21 Ms2ger <Ms2ger@igalia.com> |
| |
| [GCrypt] Remove unsound assertion from CryptoKeyRSA::exportData(). |
| https://bugs.webkit.org/show_bug.cgi?id=183001 |
| |
| Reviewed by Philippe Normand. |
| |
| This function is called from structured cloning, in particular when storing |
| a key in IndexedDB. This would trip the assertion if the key in question is |
| non-exportable. |
| |
| The assertion was copied from the macOS implementation in r172389; it was |
| subsequently removed there in r172898 to handle this case. |
| |
| Test: crypto/subtle/rsa-indexeddb-non-exportable.html |
| |
| * crypto/gcrypt/CryptoKeyRSAGCrypt.cpp: |
| (WebCore::CryptoKeyRSA::exportData const): remove assertion. |
| |
| 2018-02-21 Myles C. Maxfield <mmaxfield@apple.com> |
| |
| [Cocoa] Make system-ui obey the user-installed-font policy |
| https://bugs.webkit.org/show_bug.cgi?id=182860 |
| <rdar://problem/36158249> |
| |
| Reviewed by Antti Koivisto. |
| |
| We have a completely different codepath for system-ui which makes it follow the system's |
| font cascade list. This codepath (along with all the other relevant places which create |
| system fonts) needs to obey the AllowUserInstalledFonts enum. This patch is fairly |
| mechanical; we simply are hooking up the flag across SystemFontDatabase. |
| |
| There are a few places which creates system fonts which this patch doesn't touch. This is |
| not a problem because all the remaining places either: |
| 1) Simply pull out some attributes of the font (name, weight, size, etc.) and then throw |
| away the font object itself, or |
| 2) Use the font in an environment where script cannot access the characters rendered (such |
| as DragImages or the fullscreen placeholder view or the inside of the attachment element). |
| |
| Test: fast/text/user-installed-fonts/system-ui.html |
| |
| * platform/graphics/cocoa/FontCacheCoreText.cpp: |
| (WebCore::FontDatabase::collectionForFamily): |
| (WebCore::FontDatabase::fontForPostScriptName): |
| (WebCore::fontWithFamily): |
| (WebCore::installedFontMandatoryAttributes): |
| (WebCore::createSpecificFontForInstalledFonts): |
| * platform/graphics/cocoa/FontCacheCoreText.h: |
| * platform/graphics/cocoa/FontDescriptionCocoa.cpp: |
| (WebCore::SystemFontDatabase::CoreTextCascadeListParameters::operator== const): |
| (WebCore::SystemFontDatabase::CoreTextCascadeListParameters::hash const): |
| (WebCore::SystemFontDatabase::systemFontCascadeList): |
| (WebCore::SystemFontDatabase::removeCascadeList): |
| (WebCore::SystemFontDatabase::computeCascadeList): |
| (WebCore::systemFontParameters): |
| (WebCore::systemFontCascadeList): |
| (WebCore::FontCascadeDescription::effectiveFamilyCount const): |
| (WebCore::FontCascadeDescription::effectiveFamilyAt const): |
| * platform/graphics/ios/FontCacheIOS.mm: |
| (WebCore::platformFontWithFamilySpecialCase): |
| * platform/graphics/mac/FontCacheMac.mm: |
| (WebCore::platformFontWithFamilySpecialCase): |
| |
| 2018-02-21 Chris Dumez <cdumez@apple.com> |
| |
| Unreviewed attempt to fix build after r228867. |
| |
| * Modules/webvr/VRStageParameters.cpp: |
| |
| 2018-02-21 Philippe Normand <pnormand@igalia.com> |
| |
| [GStreamer] Rewrite purgeInvalid*Tracks methods |
| https://bugs.webkit.org/show_bug.cgi?id=183004 |
| |
| Reviewed by Carlos Garcia Campos. |
| |
| Removing items from a hashmap while iterating is bad. |
| |
| * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp: |
| (WebCore::MediaPlayerPrivateGStreamer::purgeInvalidAudioTracks): |
| Safely remove items from the hashmap using removeIf(). |
| (WebCore::MediaPlayerPrivateGStreamer::purgeInvalidVideoTracks): Ditto. |
| (WebCore::MediaPlayerPrivateGStreamer::purgeInvalidTextTracks): Ditto. |
| |
| 2018-02-21 Chris Dumez <cdumez@apple.com> |
| |
| Unreviewed attempt to fix build after r228867. |
| |
| * Modules/webvr/VRStageParameters.cpp: |
| |
| 2018-02-21 Philippe Normand <pnormand@igalia.com> |
| |
| [GStreamer] Crash in Debug build when purging invalid tracks |
| https://bugs.webkit.org/show_bug.cgi?id=182997 |
| |
| Reviewed by Xabier Rodriguez-Calvar. |
| |
| * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp: |
| (WebCore::MediaPlayerPrivateGStreamer::purgeInvalidAudioTracks): Clear the hashmap when there is no valid track left. |
| (WebCore::MediaPlayerPrivateGStreamer::purgeInvalidVideoTracks): Ditto. |
| (WebCore::MediaPlayerPrivateGStreamer::purgeInvalidTextTracks): Ditto. |
| * platform/graphics/gstreamer/TrackPrivateBaseGStreamer.cpp: |
| (WebCore::TrackPrivateBaseGStreamer::getLanguageCode): Demote debugging, this appears too much at least with playbin2. |
| (WebCore::TrackPrivateBaseGStreamer::getTag): Ditto. |
| |
| 2018-02-21 Philippe Normand <pnormand@igalia.com> |
| |
| [GStreamer] We need to adopt GstGlDisplays after GStreamer 1.13.1 |
| https://bugs.webkit.org/show_bug.cgi?id=182996 |
| |
| Reviewed by Xabier Rodriguez-Calvar. |
| |
| * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp: |
| (WebCore::MediaPlayerPrivateGStreamerBase::ensureGstGLContext): |
| Adopt references when running with GStreamer 1.13.1 to avoid |
| memory leaks. |
| |
| 2018-02-20 Philippe Normand <pnormand@igalia.com> |
| |
| [GTK] Layout test media/track/track-in-band-duplicate-tracks-when-source-changes.html failing since r228617 |
| https://bugs.webkit.org/show_bug.cgi?id=160131 |
| <rdar://problem/35873985> |
| |
| Reviewed by Michael Catanzaro. |
| |
| * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp: |
| (WebCore::MediaPlayerPrivateGStreamer::notifyPlayerOfText): We |
| can't assume the pad has a sticky event here like implemented in |
| InbandTextTrackPrivateGStreamer because it might be emitted after |
| the track was created. So fallback to a dummy stream ID like in |
| the Audio and Video tracks. |
| |
| 2018-02-20 Sergio Villar Senin <svillar@igalia.com> |
| |
| [WebVR][OpenVR] Retrieve stage parameters |
| https://bugs.webkit.org/show_bug.cgi?id=182976 |
| |
| Reviewed by Žan Doberšek. |
| |
| Use OpenVR to retrieve stage parameters, i.e., play area size and |
| the transformation from sitting to standing position. It includes |
| the same fallback used by Firefox to provide sensible values in case |
| we cannot get the required information from the VR SDK (it's quite |
| common not to have defined a play area). |
| |
| * Modules/webvr/VRDisplay.cpp: |
| (WebCore::VRDisplay::stageParameters const): |
| * Modules/webvr/VRDisplay.h: |
| * Modules/webvr/VRStageParameters.cpp: |
| (WebCore::VRStageParameters::VRStageParameters): |
| (WebCore::VRStageParameters::sittingToStandingTransform const): |
| (WebCore::VRStageParameters::sizeX const): |
| (WebCore::VRStageParameters::sizeZ const): |
| * Modules/webvr/VRStageParameters.h: |
| (WebCore::VRStageParameters::create): |
| * platform/vr/VRPlatformDisplay.h: |
| * platform/vr/openvr/VRPlatformDisplayOpenVR.cpp: |
| (WebCore::VRPlatformDisplayOpenVR::VRPlatformDisplayOpenVR): |
| (WebCore::VRPlatformDisplayOpenVR::updateStageParameters): |
| * platform/vr/openvr/VRPlatformDisplayOpenVR.h: |
| |
| 2018-02-21 Philippe Normand <pnormand@igalia.com> |
| |
| [GStreamer] Create a Wayland GL display instead of EGL |
| https://bugs.webkit.org/show_bug.cgi?id=182968 |
| |
| Reviewed by Xabier Rodriguez-Calvar. |
| |
| * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp: |
| (WebCore::MediaPlayerPrivateGStreamerBase::ensureGstGLContext): |
| Add logging and instantiate a GstDisplayWayland display instead of |
| an EGL display when running under a Wayland compositor. |
| |
| 2018-02-21 Zalan Bujtas <zalan@apple.com> |
| |
| [RenderTreeBuilder] Move RenderFullScreen::willBeRemoved() mutation logic to RenderTreeBuilder |
| https://bugs.webkit.org/show_bug.cgi?id=182947 |
| <rdar://problem/37690848> |
| |
| Reviewed by Antti Koivisto. |
| |
| No change in functionality. |
| |
| * Sources.txt: |
| * WebCore.xcodeproj/project.pbxproj: |
| * rendering/RenderFullScreen.cpp: |
| (WebCore::RenderFullScreen::willBeDestroyed): |
| * rendering/updating/RenderTreeBuilder.cpp: |
| (WebCore::RenderTreeBuilder::takeChild): |
| * rendering/updating/RenderTreeBuilder.h: |
| (WebCore::RenderTreeBuilder::fullScreenBuilder): |
| * rendering/updating/RenderTreeBuilderFullScreen.cpp: Added. |
| (WebCore::RenderTreeBuilder::FullScreen::FullScreen): |
| (WebCore::RenderTreeBuilder::FullScreen::cleanupOnRemoval): |
| * rendering/updating/RenderTreeBuilderFullScreen.h: Added. |
| * rendering/updating/RenderTreeBuilderMathML.cpp: |
| |
| 2018-02-20 Zalan Bujtas <zalan@apple.com> |
| |
| [RenderTreeBuilder] Move RenderListItem::willBeRemoved() mutation logic to RenderTreeBuilder |
| https://bugs.webkit.org/show_bug.cgi?id=182943 |
| <rdar://problem/37689029> |
| |
| Reviewed by Antti Koivisto. |
| |
| We don't need to destroy the marker in RenderListItem::willBeRemoved(), because it gets deleted |
| in RenderTreeBuilder::removeAndDestroy() together with RenderListItem (as long as the marker is |
| the RenderListItem's descendent). |
| |
| Covered by existing tests. |
| |
| * rendering/RenderListItem.cpp: |
| (WebCore::RenderListItem::~RenderListItem): |
| (WebCore::RenderListItem::willBeDestroyed): Deleted. |
| * rendering/RenderListItem.h: |
| |
| 2018-02-20 Nan Wang <n_wang@apple.com> |
| |
| AX: Keyboard focus not following VoiceOver cursor into web content or within web content. |
| https://bugs.webkit.org/show_bug.cgi?id=182752 |
| <rdar://problem/37518233> |
| |
| Reviewed by Ryosuke Niwa. |
| |
| Call the assistive technology specific method for becoming first responder. |
| |
| Test: accessibility/mac/accessibility-make-first-responder.html |
| |
| * accessibility/mac/WebAccessibilityObjectWrapperMac.mm: |
| (-[WebAccessibilityObjectWrapper _accessibilitySetValue:forAttribute:]): |
| * page/ChromeClient.h: |
| |
| 2018-02-20 Tim Horton <timothy_horton@apple.com> |
| |
| Introduce HAVE(IOSURFACE_ACCELERATOR) |
| https://bugs.webkit.org/show_bug.cgi?id=182955 |
| <rdar://problem/37699510> |
| |
| Reviewed by Sam Weinig. |
| |
| No new tests, no change in behavior. |
| |
| Introduce HAVE(IOSURFACE_ACCELERATOR) and guard all uses of |
| IOSurfaceAccelerator behind it. |
| |
| Rename USE(IOSURFACE) to HAVE(IOSURFACE) for accuracy. |
| |
| * page/cocoa/MemoryReleaseCocoa.mm: |
| * platform/graphics/ca/TileController.cpp: |
| * platform/graphics/cg/IOSurfacePool.cpp: |
| * platform/graphics/cg/IOSurfacePool.h: |
| * platform/graphics/cg/ImageBufferCG.cpp: |
| * platform/graphics/cocoa/IOSurface.h: |
| * platform/graphics/cocoa/IOSurface.mm: |
| * platform/graphics/cocoa/IOSurfacePoolCocoa.mm: |
| * platform/graphics/cv/VideoTextureCopierCV.cpp: |
| * platform/graphics/cv/VideoTextureCopierCV.h: |
| |
| 2018-02-20 Chris Dumez <cdumez@apple.com> |
| |
| Provisional load may get committed before receiving the decidePolicyForNavigationResponse response |
| https://bugs.webkit.org/show_bug.cgi?id=182720 |
| <rdar://problem/37515204> |
| |
| Reviewed by Alex Christensen. |
| |
| Wait for the policy response from the client after receiving a resource response, |
| before sending the NetworkResourceLoader::ContinueDidReceiveResponse IPC back to |
| the NetworkProcess. Otherwise, the network process may start sending us data and |
| we may end up committing the provisional load before receiving the policy decision |
| fron the client. |
| |
| Change is covered by new API test. |
| |
| * loader/DocumentLoader.cpp: |
| (WebCore::DocumentLoader::responseReceived): |
| * loader/NetscapePlugInStreamLoader.cpp: |
| (WebCore::NetscapePlugInStreamLoader::didReceiveResponse): |
| * loader/NetscapePlugInStreamLoader.h: |
| * loader/ResourceLoader.cpp: |
| (WebCore::ResourceLoader::deliverResponseAndData): |
| (WebCore::ResourceLoader::loadDataURL): |
| (WebCore::ResourceLoader::didReceiveResponse): |
| (WebCore::ResourceLoader::didReceiveResponseAsync): |
| * loader/ResourceLoader.h: |
| * loader/SubresourceLoader.cpp: |
| (WebCore::SubresourceLoader::didReceiveResponse): |
| (WebCore::SubresourceLoader::didReceiveResponsePolicy): |
| (WebCore::SubresourceLoader::willCancel): |
| * loader/SubresourceLoader.h: |
| * loader/ios/PreviewLoader.mm: |
| (-[WebPreviewLoader _sendDidReceiveResponseIfNecessary]): |
| |
| 2018-02-20 Chris Dumez <cdumez@apple.com> |
| |
| Crash under JSC::JSCell::toNumber(JSC::ExecState*) |
| https://bugs.webkit.org/show_bug.cgi?id=182984 |
| <rdar://problem/37694346> |
| |
| Reviewed by Mark Lam. |
| |
| The issue was caused by DOMMatrix attributes potentially returning "impure" |
| NaN values. We would call JSC::jsNumber(double) to construct the JSValue |
| but this is only safe for pure NaN values. Make sure we purify the double |
| returned by the implementation for IDL attributes of type 'unrestricted double' |
| before calling JSC::jsNumber(double). |
| |
| No new tests, extended existing test. |
| |
| * bindings/js/JSDOMConvertNumbers.h: |
| (WebCore::JSConverter<IDLUnrestrictedDouble>::convert): |
| * testing/TypeConversions.h: |
| (WebCore::TypeConversions::testImpureNaNUnrestrictedDouble const): |
| (WebCore::TypeConversions::testImpureNaN2UnrestrictedDouble const): |
| (WebCore::TypeConversions::testQuietNaNUnrestrictedDouble const): |
| * testing/TypeConversions.idl: |
| |
| 2018-02-20 Tim Horton <timothy_horton@apple.com> |
| |
| Make more use of USE(OPENGL_ES) where it makes sense |
| https://bugs.webkit.org/show_bug.cgi?id=182957 |
| <rdar://problem/37699443> |
| |
| Reviewed by Dan Bernstein. |
| |
| No new tests, no behavior change. |
| |
| Make use of USE(OPENGL_ES) for CoreVideo functions that differ based |
| on GL availability. Also adjust GraphicsContext3D in the same way. |
| |
| * platform/cocoa/CoreVideoSoftLink.cpp: |
| * platform/cocoa/CoreVideoSoftLink.h: |
| * platform/graphics/GraphicsContext3D.h: |
| * platform/graphics/cv/TextureCacheCV.mm: |
| (WebCore::TextureCacheCV::create): |
| (WebCore::TextureCacheCV::textureFromImage): |
| * platform/graphics/cv/VideoTextureCopierCV.cpp: |
| (WebCore::enumToStringMap): |
| (WebCore::VideoTextureCopierCV::initializeContextObjects): |
| (WebCore::VideoTextureCopierCV::initializeUVContextObjects): |
| (WebCore::VideoTextureCopierCV::copyImageToPlatformTexture): |
| (WebCore::VideoTextureCopierCV::copyVideoTextureToPlatformTexture): |
| |
| 2018-02-20 Nan Wang <n_wang@apple.com> |
| |
| AX: AOM: Dispatch accessibleclick event |
| https://bugs.webkit.org/show_bug.cgi?id=180898 |
| <rdar://problem/36086710> |
| |
| Reviewed by Ryosuke Niwa. |
| |
| Accessibility events. |
| Spec: https://wicg.github.io/aom/spec/phase2.html |
| |
| This patch allows developers to register event handlers on Elements |
| for custom accessibility events. |
| |
| Accessibility events go through a capturing and bubbling phase just |
| like DOM events, but in the accessibility tree. |
| |
| Implemented "accessibleclick" event. |
| |
| Test: accessibility/mac/AOM-events.html |
| |
| * accessibility/AccessibilityObject.cpp: |
| (WebCore::AccessibilityObject::press): |
| (WebCore::AccessibilityObject::dispatchAccessibilityEvent): |
| * accessibility/AccessibilityObject.h: |
| * accessibility/mac/WebAccessibilityObjectWrapperMac.mm: |
| (-[WebAccessibilityObjectWrapper accessibilityPerformAction:]): |
| * dom/Element.idl: |
| * dom/EventDispatcher.cpp: |
| (WebCore::dispatchEventWithType): |
| (WebCore::EventDispatcher::dispatchEvent): |
| * dom/EventDispatcher.h: |
| * dom/EventNames.h: |
| * dom/EventPath.cpp: |
| (WebCore::EventPath::EventPath): |
| * dom/EventPath.h: |
| |
| 2018-02-20 Wenson Hsieh <wenson_hsieh@apple.com> |
| |
| [iOS 11.3 Beta] Can't copy a URL from Safari and paste it into the Gmail app |
| https://bugs.webkit.org/show_bug.cgi?id=182952 |
| <rdar://problem/37636190> |
| |
| Reviewed by Tim Horton. |
| |
| After r220865 refactored the iOS copy codepaths to use NSItemProviders, we stopped writing the URL as plain text |
| to the pasteboard. However, this means clients that only check for "text/plain" (or one of its aliases) on the |
| pasteboard won't read any data on paste. |
| |
| To fix this, we restore the pre-iOS 11.3 behavior of writing both the URL and plain text to the pasteboard. |
| Since we're using item providers, we also ensure that the NSURL is at a higher fidelity than the string to make |
| it clear that the data should be consumed as a URL. |
| |
| This patch also rebaselines an existing drag and drop test to cover this change, and adds a new API test, |
| ActionSheetTests.CopyLinkWritesURLAndPlainText, which simulates copying a link using the share sheet and pasting |
| into a DataTransfer-dumping test harness. |
| |
| * platform/ios/PlatformPasteboardIOS.mm: |
| (WebCore::PlatformPasteboard::write): |
| |
| 2018-02-20 Eric Carlson <eric.carlson@apple.com> |
| |
| [iOS] Returning from Auto-PiP causes Safari to be unresponsive |
| https://bugs.webkit.org/show_bug.cgi?id=182977 |
| <rdar://problem/37685981> |
| |
| Reviewed by Jer Noble. |
| |
| Remove the error handling added in r228115, it breaks auto-pip. |
| |
| * platform/ios/VideoFullscreenInterfaceAVKit.mm: |
| (VideoFullscreenInterfaceAVKit::applicationDidBecomeActive): |
| (VideoFullscreenInterfaceAVKit::enterFullscreenStandard): |
| (VideoFullscreenInterfaceAVKit::exitFullscreen): |
| (VideoFullscreenInterfaceAVKit::cleanupFullscreen): |
| (VideoFullscreenInterfaceAVKit::didStartPictureInPicture): |
| (VideoFullscreenInterfaceAVKit::prepareForPictureInPictureStopWithCompletionHandler): |
| (VideoFullscreenInterfaceAVKit::exitFullscreenHandler): |
| (VideoFullscreenInterfaceAVKit::enterFullscreenHandler): |
| |
| 2018-02-20 Jer Noble <jer.noble@apple.com> |
| |
| [EME] Adopt new AVContentKeySession success delegate callback |
| https://bugs.webkit.org/show_bug.cgi?id=182974 |
| <rdar://problem/36079035> |
| |
| Reviewed by Eric Carlson. |
| |
| Store the updateLicenseCallback if the new protocol method is present and supported. |
| |
| * platform/graphics/avfoundation/objc/CDMInstanceFairPlayStreamingAVFObjC.h: |
| * platform/graphics/avfoundation/objc/CDMInstanceFairPlayStreamingAVFObjC.mm: |
| (-[WebCoreFPSContentKeySessionDelegate contentKeySession:contentKeyRequestDidSucceed:]): |
| (WebCore::CDMInstanceFairPlayStreamingAVFObjC::updateLicense): |
| (WebCore::CDMInstanceFairPlayStreamingAVFObjC::didFailToProvideRequest): |
| (WebCore::CDMInstanceFairPlayStreamingAVFObjC::requestDidSucceed): |
| |
| 2018-02-19 Dean Jackson <dino@apple.com> |
| |
| Handle all writing-modes in downcast |
| https://bugs.webkit.org/show_bug.cgi?id=182949 |
| <rdar://problem/37710687> |
| |
| Reviewed by Myles Maxfield. |
| |
| It appears we forgot to handle the deprecated "lr" |
| writing-mode value. |
| |
| Test: fast/writing-mode/svg-writing-modes.html |
| |
| * css/CSSPrimitiveValueMappings.h: |
| (WebCore::CSSPrimitiveValue::operator WritingMode const): |
| |
| 2018-02-20 Zan Dobersek <zdobersek@igalia.com> |
| |
| [Cairo] Drop target GraphicsContext usage in Cairo operations |
| https://bugs.webkit.org/show_bug.cgi?id=182964 |
| |
| Reviewed by Carlos Garcia Campos. |
| |
| The GraphicsContext parameters in various Cairo operations are not used |
| anymore, so they can be removed. Callsites are updated to reflect this. |
| |
| * platform/graphics/cairo/CairoOperations.cpp: |
| (WebCore::Cairo::drawShadowLayerBuffer): |
| (WebCore::Cairo::fillShadowBuffer): |
| (WebCore::Cairo::drawPathShadow): |
| (WebCore::Cairo::drawGlyphsShadow): |
| (WebCore::Cairo::fillRect): |
| (WebCore::Cairo::fillRoundedRect): |
| (WebCore::Cairo::fillRectWithRoundedHole): |
| (WebCore::Cairo::fillPath): |
| (WebCore::Cairo::strokeRect): |
| (WebCore::Cairo::strokePath): |
| (WebCore::Cairo::drawGlyphs): |
| (WebCore::Cairo::drawNativeImage): |
| (WebCore::Cairo::drawSurface): |
| * platform/graphics/cairo/CairoOperations.h: |
| * platform/graphics/cairo/FontCairo.cpp: |
| (WebCore::FontCascade::drawGlyphs): |
| * platform/graphics/cairo/GraphicsContextCairo.cpp: |
| (WebCore::GraphicsContext::drawNativeImage): |
| (WebCore::GraphicsContext::fillPath): |
| (WebCore::GraphicsContext::strokePath): |
| (WebCore::GraphicsContext::fillRect): |
| (WebCore::GraphicsContext::strokeRect): |
| (WebCore::GraphicsContext::platformFillRoundedRect): |
| (WebCore::GraphicsContext::fillRectWithRoundedHole): |
| * platform/graphics/cairo/GraphicsContextImplCairo.cpp: |
| (WebCore::GraphicsContextImplCairo::fillRect): |
| (WebCore::GraphicsContextImplCairo::fillRoundedRect): |
| (WebCore::GraphicsContextImplCairo::fillRectWithRoundedHole): |
| (WebCore::GraphicsContextImplCairo::fillPath): |
| (WebCore::GraphicsContextImplCairo::strokeRect): |
| (WebCore::GraphicsContextImplCairo::strokePath): |
| (WebCore::GraphicsContextImplCairo::drawGlyphs): |
| (WebCore::GraphicsContextImplCairo::drawNativeImage): |
| * platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp: |
| (WebCore::MediaPlayerPrivateMediaFoundation::Direct3DPresenter::paintCurrentFrame): |
| |
| 2018-02-20 Sergio Villar Senin <svillar@igalia.com> |
| |
| [WebVR][OpenVR] Retrieve eye parameters and field of view |
| https://bugs.webkit.org/show_bug.cgi?id=182962 |
| |
| Reviewed by Žan Doberšek. |
| |
| Get the required data from OpenVR to fill in the VREyeParameters and |
| the VRFieldOfView objects. |
| |
| * Modules/webvr/VRDisplay.cpp: Create some attributes in the |
| body of the constructor instead in the member initialization list to |
| avoid calling getDisplayInfo() multiple times. |
| (WebCore::VRDisplay::VRDisplay): |
| (WebCore::VRDisplay::capabilities const): |
| (WebCore::VRDisplay::getEyeParameters const): |
| * Modules/webvr/VRDisplay.h: |
| * Modules/webvr/VREyeParameters.cpp: |
| (WebCore::VREyeParameters::VREyeParameters): Added new attributes to |
| the constructor. |
| (WebCore::VREyeParameters::offset const): Return a Ref instead of |
| a raw pointer. |
| (WebCore::VREyeParameters::renderWidth const): |
| (WebCore::VREyeParameters::renderHeight const): |
| * Modules/webvr/VREyeParameters.h: |
| (WebCore::VREyeParameters::create): |
| * Modules/webvr/VRFieldOfView.cpp: Removed. All the impletementation |
| fits perfectly in the header file. |
| * Modules/webvr/VRFieldOfView.h: |
| (WebCore::VRFieldOfView::create): |
| (WebCore::VRFieldOfView::upDegrees const): |
| (WebCore::VRFieldOfView::rightDegrees const): |
| (WebCore::VRFieldOfView::downDegrees const): |
| (WebCore::VRFieldOfView::leftDegrees const): |
| (WebCore::VRFieldOfView::VRFieldOfView): |
| * Sources.txt: |
| * platform/vr/VRPlatformDisplay.h: Added some more data to the |
| VRPlatformDisplayInfo struct. |
| * platform/vr/openvr/VRPlatformDisplayOpenVR.cpp: |
| (WebCore::VRPlatformDisplayOpenVR::VRPlatformDisplayOpenVR): |
| (WebCore::VRPlatformDisplayOpenVR::computeFieldOfView): Computes the |
| up/down/left/right FOV angles in degrees from the raw project |
| values returned by OpenVR. |
| (WebCore::VRPlatformDisplayOpenVR::updateEyeParameters): Fills in |
| the eye parameter info. |
| (WebCore::VRPlatformDisplayOpenVR::~VRPlatformDisplayOpenVR): |
| * platform/vr/openvr/VRPlatformDisplayOpenVR.h: |
| |
| 2018-02-20 Philippe Normand <pnormand@igalia.com> |
| |
| [GStreamer][MiniBrowser] Honor GStreamer command line parameters in MiniBrowser |
| https://bugs.webkit.org/show_bug.cgi?id=173655 |
| |
| Reviewed by Xabier Rodriguez-Calvar. |
| |
| The FIXME in GStreamerUtilities.cpp asks to pass the command line |
| parameters to the GStreamer initialization function. |
| |
| Based on initial patch by: Vanessa Chipirrás Navalón <vchipirras@igalia.com> |
| |
| * Modules/webaudio/AudioContext.cpp: |
| (WebCore::AudioContext::constructCommon): Removes the call to the method |
| that GStreamer initializes. It is no longer necessary. |
| * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp: |
| (WebCore::MediaPlayerPrivateGStreamerBase::initializeGStreamerAndRegisterWebKitElements): Ditto |
| * platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.cpp: |
| (WebCore::initializeGStreamerAndRegisterWebKitMSEElement): Ditto |
| * platform/graphics/gstreamer/GStreamerUtilities.cpp: |
| (WebCore::initializeGStreamer): Receive the GStreamer options and initialize GStreamer. |
| * platform/graphics/gstreamer/GStreamerUtilities.h: Add vector which contains |
| GStreamer options as the input parameter of the initializeGStreamer() method. |
| |
| 2018-02-20 Miguel Gomez <magomez@igalia.com> |
| |
| [GTK] whatsapp web blurry in some parts, sharp on others |
| https://bugs.webkit.org/show_bug.cgi?id=182673 |
| |
| Reviewed by Carlos Garcia Campos. |
| |
| CoordinatedGraphicsLayer::createBackingStore() uses the scale factor returned by effectiveContentsScale(), |
| which is always 1 if selfOrAncestorHaveNonAffineTransforms() returns true. But this fuction always returns |
| true if the layer has an AnimatedPropertyTransform animation, which means that layers with those animations |
| won't use the appropriate scale factor, causing blurry renderings. |
| |
| This patch removes the animations check, so animated layers properly use the required scale factor. |
| |
| No new tests, no behavior change. |
| |
| * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp: |
| (WebCore::CoordinatedGraphicsLayer::selfOrAncestorHaveNonAffineTransforms): |
| |
| 2018-02-20 Zan Dobersek <zdobersek@igalia.com> |
| |
| [Cairo] Leverage ShadowBlur without using scratch buffer, target GraphicsContext |
| https://bugs.webkit.org/show_bug.cgi?id=182958 |
| |
| Reviewed by Carlos Garcia Campos. |
| |
| To allow ShadowBlur usage in different threads, avoid the ShadowBlur |
| class using the scratch buffer internally. The current implementation of |
| that scratch buffer is not thread-safe and its usage in such conditions |
| can lead to crashes. |
| |
| Instead, the new methods use a temporary ImageBuffer object for drawing. |
| This does negate the efficiency of possibly reusing the scratch buffer, |
| but at this point that is not yet the priority. This only affects ports |
| using Cairo for drawing. |
| |
| The added methods don't require a target GraphicsContext object to be |
| passed in, instead they accept buffer draw callbacks that are invoked |
| with the temporary ImageBuffer object containing the rasterized shadow, |
| as well as position and size parameters. The CTM and clip bounds values |
| also have to be passed in manually. In CairoOperations.cpp, the provided |
| callbacks invoke commands that are equivalent in effect to those that |
| would otherwise be invoked on the target GraphicsContext object in the |
| ShadowBlur class. |
| |
| For now, this approach has to avoid the tiling-based drawing of the |
| rectangular shadows in drawRectShadow() and inset shadows in |
| drawInsetShadow(), and instead stick to the non-tiling fallback. While |
| only affecting Cairo-using ports, with some refactoring it should be |
| possible to again leverage the tiling-based approach as well. |
| |
| The beginShadowLayer() and endShadowLayer() functions, which are only |
| used in CairoOperations.cpp, are replaced with the drawShadowLayer() |
| method. This one accepts an additional callback that allows the caller |
| to explicitly draw the shadow shape using the provided shadowing |
| GraphicsContext object. As with the other two new methods, a temporary |
| ImageBuffer object is used, and the buffer draw callback is invoked to |
| allow caller to properly handle the shadowing output. |
| |
| In CairoOperations.cpp, the new ShadowBlur methods are exercised, with |
| direct Cairo operation invocation replacing the GraphicsContext calls |
| otherwise done through ShadowBlur. ShadowState object now also has to |
| track the global alpha and the global composite operator values so that |
| it can properly rasterize the resulting shadow into the final image. |
| |
| No new tests -- no change in behavior. |
| |
| * platform/graphics/ShadowBlur.cpp: |
| (WebCore::ShadowBlur::adjustBlurRadius): |
| (WebCore::ShadowBlur::calculateLayerBoundingRect): |
| (WebCore::ShadowBlur::drawRectShadow): |
| (WebCore::ShadowBlur::drawInsetShadow): |
| (WebCore::ShadowBlur::drawShadowLayer): |
| (WebCore::ShadowBlur::beginShadowLayer): Deleted. |
| (WebCore::ShadowBlur::endShadowLayer): Deleted. |
| * platform/graphics/ShadowBlur.h: |
| * platform/graphics/cairo/CairoOperations.cpp: |
| (WebCore::Cairo::drawShadowLayerBuffer): |
| (WebCore::Cairo::fillShadowBuffer): |
| (WebCore::Cairo::drawPathShadow): |
| (WebCore::Cairo::drawGlyphsShadow): |
| (WebCore::Cairo::ShadowState::ShadowState): |
| (WebCore::Cairo::fillRect): |
| (WebCore::Cairo::fillRoundedRect): |
| (WebCore::Cairo::fillRectWithRoundedHole): |
| (WebCore::Cairo::drawSurface): |
| * platform/graphics/cairo/CairoOperations.h: |
| Default-initialize FillSource::fillRule to RULE_NONZERO. |
| * platform/graphics/cairo/PlatformContextCairo.h: |
| Drop the ShadowBlur.h include, it's moved to CairoOperations.cpp. |
| * rendering/RenderThemeGtk.cpp: |
| Explicitly include the FloatRoundedRect.h header now that it's not |
| included through the ShadowBlur.h header via PlatformContextCairo.h. |
| |
| 2018-02-20 Sergio Villar Senin <svillar@igalia.com> |
| |
| [WebVR] Use RuntimeEnabledFeatures to enable/disable WebVR |
| https://bugs.webkit.org/show_bug.cgi?id=182961 |
| |
| Reviewed by Xabier Rodriguez-Calvar. |
| |
| The shared feature was properly added to RuntimeEnabledFeatures some |
| time ago but the code was instead using a private method in |
| NavigatorWebVR to temporarily disable it. WebVR is enabled in |
| WebPreferences.yaml for GTK+ & WPE as default experimental feature. |
| |
| * Modules/webvr/NavigatorWebVR.cpp: |
| (WebCore::NavigatorWebVR::getVRDisplays): |
| (WebCore::NavigatorWebVR::vrEnabled): Deleted. |
| |
| 2018-02-19 Antti Koivisto <antti@apple.com> |
| |
| Use selector filter when invalidating descendants |
| https://bugs.webkit.org/show_bug.cgi?id=182839 |
| <rdar://problem/37581072> |
| |
| Reviewed by Zalan Bujtas. |
| |
| We can make descendant invalidation faster by enabling filtering. |
| |
| * css/SelectorFilter.cpp: |
| (WebCore::SelectorFilter::initializeParentStack): |
| |
| Traverse and reverse the ancestor chain, and push it. |
| |
| (WebCore::SelectorFilter::pushParent): |
| (WebCore::SelectorFilter::pushParentInitializingIfNeeded): |
| |
| Add a version of pushParent that can initialize the stack. |
| |
| (WebCore::SelectorFilter::popParent): |
| (WebCore::SelectorFilter::popParentsUntil): |
| |
| Pop until a given parent element. |
| |
| (WebCore::SelectorFilter::pushParentStackFrame): Deleted. |
| (WebCore::SelectorFilter::popParentStackFrame): Deleted. |
| |
| These were the same as push/popParent. |
| |
| * css/SelectorFilter.h: |
| (WebCore::SelectorFilter::popParent): Deleted. |
| * style/StyleInvalidator.cpp: |
| (WebCore::Style::Invalidator::invalidateStyleForDescendants): |
| |
| Use pushParentInitializingIfNeeded. |
| |
| (WebCore::Style::Invalidator::invalidateStyleWithMatchElement): |
| |
| Use selector filter when doing descendant tree invalidation. |
| Make sure to pop it until the parent when reusing. |
| |
| 2018-02-19 Fujii Hironori <Hironori.Fujii@sony.com> |
| |
| null m_lastNodeInserted dereference at ReplaceSelectionCommand::InsertedNodes::lastLeafInserted |
| https://bugs.webkit.org/show_bug.cgi?id=161947 |
| |
| Reviewed by Ryosuke Niwa. |
| |
| InsertedNodes happened to be empty if the inserted nodes were |
| removed. Add more checks if InsertedNodes is empty. |
| |
| No new tests (Covered by existing tests). |
| |
| * editing/ReplaceSelectionCommand.cpp: |
| (WebCore::ReplaceSelectionCommand::doApply): Return early if InsertedNodes becomes empty. |
| * editing/ReplaceSelectionCommand.h: |
| (WebCore::ReplaceSelectionCommand::InsertedNodes::isEmpty): New method. |
| (WebCore::ReplaceSelectionCommand::InsertedNodes::lastLeafInserted const): |
| Assert m_lastNodeInserted is not null. |
| (WebCore::ReplaceSelectionCommand::InsertedNodes::pastLastLeaf const): Ditto. |
| |
| 2018-02-19 Said Abou-Hallawa <sabouhallawa@apple.com> |
| |
| Add SVGPropertyTraits::fromString() to all the SVG animated types |
| https://bugs.webkit.org/show_bug.cgi?id=182901 |
| |
| Reviewed by Dean Jackson. |
| |
| This is a work toward https://bugs.webkit.org/show_bug.cgi?id=168586. The |
| goal is is to templatize the SVGAnimatedType class and to use SVGPropertyTraits |
| methods inside the template functions. |
| |
| * WebCore.xcodeproj/project.pbxproj: Move the enum and the SVGPropertyTraits |
| from SVGMarkerElement.h to SVGMarkerTypes.h. |
| * svg/SVGAngle.h: |
| (WebCore::SVGAngle::SVGAngle): Delete unused constructor and create() method. |
| * svg/SVGAngleValue.h: |
| * svg/SVGAnimateMotionElement.cpp: |
| (WebCore::parsePoint): Deleted. Move this function to SVGParserUtilities.cpp |
| * svg/SVGAnimatedAngle.cpp: |
| (WebCore::SVGAnimatedAngleAnimator::constructFromString): Use SVGPropertyTraits::fromString(). |
| * svg/SVGAnimatedBoolean.cpp: |
| (WebCore::SVGAnimatedBooleanAnimator::constructFromString): Ditto. |
| * svg/SVGAnimatedColor.cpp: |
| (WebCore::SVGAnimatedColorAnimator::constructFromString): Ditto. |
| (WebCore::SVGAnimatedColorAnimator::addAnimatedTypes): Use const. |
| (WebCore::SVGAnimatedColorAnimator::calculateAnimatedValue): Ditto. |
| * svg/SVGAnimatedEnumeration.cpp: |
| (WebCore::SVGAnimatedEnumerationAnimator::constructFromString): Ditto. |
| * svg/SVGAnimatedInteger.cpp: |
| (WebCore::SVGAnimatedIntegerAnimator::constructFromString): Ditto. |
| * svg/SVGAnimatedIntegerOptionalInteger.cpp: |
| (WebCore::SVGAnimatedIntegerOptionalIntegerAnimator::constructFromString): Ditto. |
| * svg/SVGAnimatedLength.cpp: |
| * svg/SVGAnimatedLengthList.cpp: |
| (WebCore::SVGAnimatedLengthListAnimator::constructFromString): Ditto. |
| * svg/SVGAnimatedNumber.cpp: |
| (WebCore::SVGAnimatedNumberAnimator::constructFromString): Ditto |
| (WebCore::parseNumberFromString): |
| * svg/SVGAnimatedNumberList.cpp: |
| (WebCore::SVGAnimatedNumberListAnimator::constructFromString): Ditto. |
| * svg/SVGAnimatedNumberOptionalNumber.cpp: |
| (WebCore::SVGAnimatedNumberOptionalNumberAnimator::constructFromString): Ditto. |
| * svg/SVGAnimatedPath.cpp: |
| (WebCore::SVGAnimatedPathAnimator::constructFromString): Ditto. |
| * svg/SVGAnimatedPointList.cpp: |
| (WebCore::SVGAnimatedPointListAnimator::constructFromString): Ditto. |
| * svg/SVGAnimatedPreserveAspectRatio.cpp: |
| (WebCore::SVGAnimatedPreserveAspectRatioAnimator::constructFromString): Ditto. |
| * svg/SVGAnimatedRect.cpp: |
| (WebCore::SVGAnimatedRectAnimator::constructFromString): Ditto. |
| * svg/SVGAnimatedString.cpp: |
| (WebCore::SVGAnimatedStringAnimator::constructFromString): Ditto. |
| * svg/SVGAnimatedTransformList.cpp: |
| (WebCore::SVGAnimatedTransformListAnimator::constructFromString): Ditto. |
| * svg/SVGLength.h: |
| (WebCore::SVGLength::SVGLength): Delete unused constructor and create() method. |
| * svg/SVGLengthListValues.h: |
| (WebCore::SVGPropertyTraits<SVGLengthListValues>::fromString): New SVGPropertyTraits method. |
| (WebCore::SVGPropertyTraits<SVGLengthListValues>::parse): Ditto. |
| * svg/SVGMarkerElement.h: |
| (WebCore::SVGPropertyTraits<SVGMarkerUnitsType>::highestEnumValue): Deleted. |
| (WebCore::SVGPropertyTraits<SVGMarkerUnitsType>::toString): Deleted. |
| (WebCore::SVGPropertyTraits<SVGMarkerUnitsType>::fromString): Deleted. |
| (WebCore::SVGIDLEnumLimits<SVGMarkerOrientType>::highestExposedEnumValue): Deleted. |
| (WebCore::SVGPropertyTraits<SVGMarkerOrientType>::highestEnumValue): Deleted. |
| (WebCore::SVGPropertyTraits<SVGMarkerOrientType>::fromString): Deleted. |
| * svg/SVGMarkerTypes.h: Added. |
| (WebCore::SVGPropertyTraits<SVGMarkerUnitsType>::highestEnumValue): |
| (WebCore::SVGPropertyTraits<SVGMarkerUnitsType>::toString): |
| (WebCore::SVGPropertyTraits<SVGMarkerUnitsType>::fromString): |
| (WebCore::SVGPropertyTraits<SVGMarkerOrientType>::highestEnumValue): |
| (WebCore::SVGPropertyTraits<SVGMarkerOrientType>::fromString): |
| (WebCore::SVGIDLEnumLimits<SVGMarkerOrientType>::highestExposedEnumValue): |
| * svg/SVGMatrix.h: Delete unused constructor and create method. |
| * svg/SVGNumber.h: |
| (WebCore::SVGNumber::SVGNumber): Ditto. |
| * svg/SVGNumberListValues.h: |
| (WebCore::SVGPropertyTraits<SVGNumberListValues>::fromString): New SVGPropertyTraits method. |
| * svg/SVGParserUtilities.cpp: |
| (WebCore::parsePoint): This is moved from SVGAnimateMotionElement.cpp |
| * svg/SVGParserUtilities.h: |
| * svg/SVGPathByteStream.h: |
| (WebCore::SVGPathByteStream::SVGPathByteStream): |
| (WebCore::SVGPathByteStream::operator=): Add copy and move assignment operators. |
| (WebCore::SVGPathByteStream::copy const): Use the copy assignment. |
| (WebCore::SVGPathByteStream::isEmpty const): Use Data.isEmpty(). |
| (WebCore::SVGPropertyTraits<SVGPathByteStream>::initialValue): New SVGPropertyTraits method. |
| (WebCore::SVGPropertyTraits<SVGPathByteStream>::fromString): Ditto. |
| * svg/SVGPathUtilities.cpp: |
| (WebCore::addToSVGPathByteStream): Answer Simon's questions which were added in r190844. |
| * svg/SVGPoint.h: |
| (WebCore::SVGPoint::SVGPoint): Delete unused constructor and create method. |
| * svg/SVGPointListValues.h: |
| (WebCore::SVGPropertyTraits<SVGPointListValues>::fromString): New SVGPropertyTraits method. |
| * svg/SVGPolyElement.cpp: |
| (WebCore::SVGPolyElement::parseAttribute): Use the move assignment operator. |
| * svg/SVGPreserveAspectRatio.h: |
| (WebCore::SVGPreserveAspectRatio::SVGPreserveAspectRatio): Delete unused constructor and create method. |
| * svg/SVGPreserveAspectRatioValue.cpp: |
| (WebCore::SVGPreserveAspectRatioValue::SVGPreserveAspectRatioValue): Add new constructor. |
| * svg/SVGPreserveAspectRatioValue.h: |
| (WebCore::SVGPropertyTraits<SVGPreserveAspectRatioValue>::fromString): New SVGPropertyTraits method. |
| (WebCore::SVGPropertyTraits<SVGPreserveAspectRatioValue>::toString): Ditto. |
| * svg/SVGRect.h: |
| (WebCore::SVGRect::SVGRect): Delete unused constructor and create method. |
| * svg/SVGRectTraits.h: Removed. |
| * svg/SVGTransform.h: |
| (WebCore::SVGTransform::SVGTransform): Delete unused constructor and create method. |
| * svg/SVGTransformListValues.h: |
| (WebCore::SVGPropertyTraits<SVGTransformListValues>::fromString): New SVGPropertyTraits method. |
| * svg/properties/SVGPropertyTearOff.h: Delete unused create method. |
| * svg/properties/SVGPropertyTraits.h: New SVGPropertyTraits methods. |
| (WebCore::SVGPropertyTraits<bool>::fromString): |
| (WebCore::SVGPropertyTraits<Color>::initialValue): |
| (WebCore::SVGPropertyTraits<Color>::fromString): |
| (WebCore::SVGPropertyTraits<Color>::parse): |
| (WebCore::SVGPropertyTraits<Color>::toString): |
| (WebCore::SVGPropertyTraits<int>::fromString): |
| (WebCore::SVGPropertyTraits<float>::fromString): |
| (WebCore::SVGPropertyTraits<float>::parse): |
| (WebCore::SVGPropertyTraits<FloatPoint>::initialValue): |
| (WebCore::SVGPropertyTraits<FloatPoint>::fromString): |
| (WebCore::SVGPropertyTraits<FloatPoint>::parse): |
| (WebCore::SVGPropertyTraits<FloatPoint>::toString): |
| (WebCore::SVGPropertyTraits<FloatRect>::initialValue): |
| (WebCore::SVGPropertyTraits<FloatRect>::fromString): |
| (WebCore::SVGPropertyTraits<FloatRect>::parse): |
| (WebCore::SVGPropertyTraits<FloatRect>::toString): |
| (WebCore::SVGPropertyTraits<String>::fromString): |
| (WebCore::SVGPropertyTraits<String>::parse): |
| (WebCore::SVGPropertyTraits<String>::toString): |
| |
| 2018-02-19 Antoine Quint <graouts@apple.com> |
| |
| [Modern Media Controls] Implement a compact set of media controls |
| https://bugs.webkit.org/show_bug.cgi?id=182937 |
| <rdar://problem/37682257> |
| |
| Reviewed by Eric Carlson. |
| |
| We add a new type of media controls used when we need stripped down and compact controls. The new |
| CompactMediaControls only show a play/pause button and an invalid placard and disregard all media |
| events that are not relevant to the display of these controls. |
| |
| To distinguish cases where we need to show compact media controls, we expose a new property on |
| MediaControlsHost called "compactMode". |
| |
| Tests: media/modern-media-controls/compact-media-controls/compact-media-controls-constructor.html |
| media/modern-media-controls/compact-media-controls/compact-media-controls-layout.html |
| |
| * Modules/mediacontrols/MediaControlsHost.cpp: |
| (WebCore::MediaControlsHost::base64StringForIconNameAndType const): |
| (WebCore::MediaControlsHost::compactMode const): |
| * Modules/mediacontrols/MediaControlsHost.h: |
| (WebCore::MediaControlsHost::setSimulateCompactMode): |
| * Modules/mediacontrols/MediaControlsHost.idl: |
| * Modules/modern-media-controls/controls/compact-media-controls.js: Added. |
| (CompactMediaControls.prototype.get scaleFactor): |
| (CompactMediaControls.prototype.set scaleFactor): |
| (CompactMediaControls.prototype.get shouldCenterControlsVertically): |
| (CompactMediaControls.prototype.set shouldCenterControlsVertically): |
| (CompactMediaControls.prototype.get placard): |
| (CompactMediaControls.prototype.set placard): |
| (CompactMediaControls.prototype.layout): |
| (CompactMediaControls.prototype.commitProperty): |
| * Modules/modern-media-controls/controls/icon-service.js: |
| (const.iconService.new.IconService.prototype._fileNameAndPlatformForIconAndLayoutTraits): |
| (const.iconService.new.IconService): |
| * Modules/modern-media-controls/controls/inline-media-controls.js: |
| * Modules/modern-media-controls/controls/layout-item.js: |
| * Modules/modern-media-controls/js-files: |
| * Modules/modern-media-controls/main.js: |
| * Modules/modern-media-controls/media/media-controller.js: |
| (MediaController.prototype.get layoutTraits): |
| (MediaController.prototype._supportingObjectClasses): Compute the set of MediaControllerSupport classes based |
| on the layout traits such that in compact mode we only return PlacardSupport and PlaybackSupport. |
| (MediaController.prototype._updateControlsIfNeeded): |
| (MediaController.prototype._controlsClassForLayoutTraits): |
| (MediaController.prototype._shouldControlsBeAvailable): |
| * Modules/modern-media-controls/media/placard-support.js: |
| (PlacardSupport.prototype.get mediaEvents): Only track the "error" event in compact mode since this is the only |
| relevant placard. |
| * Modules/modern-media-controls/media/playback-support.js: |
| (PlaybackSupport.prototype.syncControl): Only show or hide the play/pause button based on the playback state |
| when in compact mode. |
| (PlaybackSupport): |
| * WebCore.xcodeproj/project.pbxproj: |
| |
| 2018-02-19 Antoine Quint <graouts@apple.com> |
| |
| [Web Animations] Make KeyframeEffect target nullable and read-write |
| https://bugs.webkit.org/show_bug.cgi?id=182741 |
| |
| Reviewed by Dean Jackson. |
| |
| We used to completely disregard null targets, for instance not parsing keyframes, but targets |
| can be null and are also supposed to be read-write for KeyframeEffect. We now update the IDL |
| for KeyframeEffect to mark the target property as read-write and update the implementation |
| to correctly handle null targets. |
| |
| This revealed a few issues in our implementation by allowing more WPT tests to run. So we also |
| ensure that: |
| |
| - we don't crash when parsing font-related properties by calling update() on the generated |
| RenderStyle's FontCascade when parsing keyframes. |
| |
| - CSS properties are provided as camel-case and not as hyphenated form |
| |
| - values provided in keyframes dictionaries are only read for valid properties |
| |
| - styles for effect targets are invalidated as soon as the timing model for that animation |
| is changed |
| |
| * animation/KeyframeEffect.idl: |
| * animation/KeyframeEffectReadOnly.cpp: |
| (WebCore::invalidateElement): Add a new utility method to invalidate a given element since |
| we may want to invalidate not only the current target (m_target) but also a previous target. |
| (WebCore::IDLAttributeNameToAnimationPropertyName): Move this function below CSSPropertyIDToIDLAttributeName |
| so that it can call that function. We also check that we reject CSS properties that are not provided in |
| camel-case form (eg. "font-size" vs. "fontSize"). |
| (WebCore::processIterableKeyframes): Only read the JS values if we know that the provided JS property name |
| maps to a valid CSS property. |
| (WebCore::KeyframeEffectReadOnly::processKeyframes): Allow keyframes to be processed even if the effect's |
| target is null. |
| (WebCore::KeyframeEffectReadOnly::setTarget): Notify the animation that the effect target has changed and |
| invalidate the style of the new target and the old targets, if any. We also update the blending keyframes |
| since this task may not have been completed in a previous call to processKeyframes() due to the target being |
| null at that time. |
| (WebCore::KeyframeEffectReadOnly::invalidate): Use the invalidateElement() utility. |
| * animation/KeyframeEffectReadOnly.h: |
| * animation/WebAnimation.cpp: |
| (WebCore::WebAnimation::effectTargetDidChange): This method is called in KeyframeEffectReadOnly::setTarget() |
| to inform the animation of the previous effect target and the new one upon a target change. This allows us to |
| forward this information onto the timeline so that we correctly add or remove the targets from the list of |
| animated elements. |
| * animation/WebAnimation.h: |
| |
| 2018-02-19 Chris Dumez <cdumez@apple.com> |
| |
| Crash under MIMETypeRegistry::isSupportedJavaScriptMIMEType() |
| https://bugs.webkit.org/show_bug.cgi?id=182927 |
| <rdar://problem/37675748> |
| |
| Reviewed by Antti Koivisto. |
| |
| Make it safe to call MIMETypeRegistry::isSupportedJavaScriptMIMEType() from the non-main thread. |
| It is currently being called from a background thread in the following places: |
| - ServiceWorkerJob::didReceiveResponse() |
| - WorkerGlobalScope::importScripts() |
| |
| These call sites on non-main threads were added recently with the support for service workers. |
| |
| No new tests, already covered by existing tests that flakily experience service worker |
| process crashes. |
| |
| * platform/MIMETypeRegistry.cpp: |
| (WebCore::MIMETypeRegistry::isSupportedJavaScriptMIMEType): |
| |
| 2018-02-19 Dean Jackson <dino@apple.com> |
| |
| SIGFPE @ int WebCore::SVGToOTFFontConverter::scaleUnitsPerEm<int> const + 45 |
| https://bugs.webkit.org/show_bug.cgi?id=182944 |
| <rdar://problem/35369984> |
| |
| Reviewed by Myles Maxfield. |
| |
| Avoid a divide-by-zero. |
| |
| Test: svg/text/font-bad-unitsperem.html |
| |
| * svg/SVGFontFaceElement.cpp: |
| (WebCore::SVGFontFaceElement::unitsPerEm const): |
| |
| 2018-02-19 Tim Horton <timothy_horton@apple.com> |
| |
| REGRESSION (r219342): Touch event coordinates and elementFromPoint coordinates differ |
| https://bugs.webkit.org/show_bug.cgi?id=182910 |
| <rdar://problem/37533950> |
| |
| Reviewed by Simon Fraser. |
| |
| We reverted other changes to the definition of client coordinates |
| in r219829 due to compatibility concerns. However, we failed to revert |
| r219342 on trunk, leaving elementFromPoint() using coordinates relative |
| to the layout viewport. |
| |
| Add a currently off-by-default setting to switch on layout-viewport-relative |
| client coordinates and guard the elementFromPoint changes behind it. |
| A future patch should roll r219829 back in also behind this setting, so |
| that everything remains consistent regardless of which coordinate space we choose. |
| |
| * dom/TreeScope.cpp: |
| (WebCore::absolutePointIfNotClipped): |
| * page/Settings.yaml: |
| * rendering/RenderLayer.cpp: |
| (WebCore::RenderLayer::hitTest): |
| |
| 2018-02-19 Eric Carlson <eric.carlson@apple.com> |
| |
| [Extra zoom mode] Don't allow PiP media playback |
| https://bugs.webkit.org/show_bug.cgi?id=182930 |
| <rdar://problem/37676259> |
| |
| Reviewed by Andy Estes. |
| |
| * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm: |
| (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayerLayer): Don't call setPIPModeEnabled: |
| if it isn't implemented. |
| (WebCore::MediaPlayerPrivateAVFoundationObjC::setVideoFullscreenMode): Ditto. |
| |
| 2018-02-19 Antoine Quint <graouts@apple.com> |
| |
| [Web Animations] Decouple parsing JS keyframes and computing blending keyframes |
| https://bugs.webkit.org/show_bug.cgi?id=182939 |
| <rdar://problem/37678364> |
| |
| Reviewed by Dean Jackson. |
| |
| Move all the code used to create the KeyframeList into a dedicated updateBlendingKeyframes() method. |
| |
| No new tests since this code change has no user-visible impact. |
| |
| * animation/KeyframeEffectReadOnly.cpp: |
| (WebCore::KeyframeEffectReadOnly::processKeyframes): |
| (WebCore::KeyframeEffectReadOnly::updateBlendingKeyframes): |
| * animation/KeyframeEffectReadOnly.h: |
| |
| 2018-02-19 Jer Noble <jer.noble@apple.com> |
| |
| [EME] Add mechanism for MediaKeySession to react to HDCP changes |
| https://bugs.webkit.org/show_bug.cgi?id=182935 |
| |
| Reviewed by Eric Carlson. |
| |
| Add a client callback interface to CDMInterface to allow subclasses to communicate up to |
| MediaKeySEssion. Add a virtual method to CDMInterface to allow it to be notified of HDCP |
| status changes. Override this method in CDMInstanceFairPlayStreamingAVFObjC. Hook up the |
| outputObscuredDueToInsufficientExternalProtectionChanged() methods in both |
| MediaPlayerPrivateAVFoundationObjC and MediaPlayerPrivateMediaSourceAVFObjC to this new |
| CDMInstance method. Add an Internals method to simulate an HDCP error for testing purposes. |
| |
| * Modules/encryptedmedia/MediaKeySession.cpp: |
| (WebCore::MediaKeySession::MediaKeySession): |
| (WebCore::MediaKeySession::~MediaKeySession): |
| (WebCore::MediaKeySession::updateKeyStatuses): |
| * Modules/encryptedmedia/MediaKeySession.h: |
| * platform/encryptedmedia/CDMInstance.h: |
| (WebCore::CDMInstance::setHDCPStatus): |
| (WebCore::CDMInstance::setClient): |
| (WebCore::CDMInstance::clearClient): |
| * platform/graphics/MediaPlayer.cpp: |
| (WebCore::MediaPlayer::beginSimulatedHDCPError): |
| (WebCore::MediaPlayer::endSimulatedHDCPError): |
| * platform/graphics/MediaPlayer.h: |
| * platform/graphics/MediaPlayerPrivate.h: |
| (WebCore::MediaPlayerPrivateInterface::beginSimulatedHDCPError): |
| (WebCore::MediaPlayerPrivateInterface::endSimulatedHDCPError): |
| * platform/graphics/avfoundation/objc/CDMInstanceFairPlayStreamingAVFObjC.h: |
| * platform/graphics/avfoundation/objc/CDMInstanceFairPlayStreamingAVFObjC.mm: |
| (WebCore::CDMInstanceFairPlayStreamingAVFObjC::setClient): |
| (WebCore::CDMInstanceFairPlayStreamingAVFObjC::clearClient): |
| (WebCore::CDMInstanceFairPlayStreamingAVFObjC::sessionIdentifierChanged): |
| (WebCore::CDMInstanceFairPlayStreamingAVFObjC::outputObscuredDueToInsufficientExternalProtectionChanged): |
| * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h: |
| * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm: |
| (WebCore::MediaPlayerPrivateAVFoundationObjC::outputObscuredDueToInsufficientExternalProtectionChanged): |
| (WebCore::playerKVOProperties): |
| (-[WebCoreAVFMovieObserver observeValueForKeyPath:ofObject:change:context:]): |
| * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h: |
| * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm: |
| (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::outputObscuredDueToInsufficientExternalProtectionChanged): |
| * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.h: |
| * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm: |
| (-[WebAVSampleBufferErrorListener observeValueForKeyPath:ofObject:change:context:]): |
| (WebCore::SourceBufferPrivateAVFObjC::outputObscuredDueToInsufficientExternalProtectionChanged): |
| * testing/Internals.cpp: |
| (WebCore::Internals::beginSimulatedHDCPError): |
| (WebCore::Internals::endSimulatedHDCPError): |
| * testing/Internals.h: |
| * testing/Internals.idl: |
| |
| 2018-02-19 Chris Dumez <cdumez@apple.com> |
| |
| CrashTracer: com.apple.WebKit.WebContent at WebCore: WebCore::TimerBase::~TimerBase |
| https://bugs.webkit.org/show_bug.cgi?id=182931 |
| <rdar://problem/37602962> |
| |
| Reviewed by Antti Koivisto. |
| |
| Make sure PlatformMediaResource is ThreadSafeRefCounted since it is being |
| used from several threads in WebCoreNSURLSession. Also make sure it is |
| always destroyed on the main thread since it ends up destroying a |
| CachedRawResource object. |
| |
| No new tests, no known reproduction case. |
| |
| * platform/graphics/PlatformMediaResourceLoader.h: |
| * platform/network/cocoa/WebCoreNSURLSession.mm: |
| (-[WebCoreNSURLSessionDataTask dealloc]): |
| |
| 2018-02-19 Zalan Bujtas <zalan@apple.com> |
| |
| [RenderTreeBuilder] Rename RenderTreeBuilder::removeAndDestroyChild() -> removeAndDestroy() |
| https://bugs.webkit.org/show_bug.cgi?id=182934 |
| <rdar://problem/37678241> |
| |
| Reviewed by Antti Koivisto. |
| |
| No change in functionality. |
| |
| * dom/Document.cpp: |
| (WebCore::Document::setFullScreenRenderer): |
| * rendering/RenderBoxModelObject.cpp: |
| (WebCore::RenderBoxModelObject::removeAndDestroyAllContinuations): |
| * rendering/RenderButton.cpp: |
| (WebCore::RenderButton::setText): |
| * rendering/RenderFullScreen.cpp: |
| (WebCore::RenderFullScreen::willBeDestroyed): |
| (WebCore::RenderFullScreen::unwrapRenderer): |
| * rendering/RenderListItem.cpp: |
| (WebCore::RenderListItem::willBeDestroyed): |
| * rendering/RenderTextFragment.cpp: |
| (WebCore::RenderTextFragment::willBeDestroyed): |
| (WebCore::RenderTextFragment::setText): |
| * rendering/RenderView.cpp: |
| (WebCore::RenderView::willBeDestroyed): |
| * rendering/updating/RenderTreeBuilder.cpp: |
| (WebCore::RenderTreeBuilder::removeAndDestroy): |
| (WebCore::RenderTreeBuilder::removeFromParentAndDestroyCleaningUpAnonymousWrappers): |
| (WebCore::RenderTreeBuilder::removeAndDestroyChild): Deleted. |
| * rendering/updating/RenderTreeBuilder.h: |
| * rendering/updating/RenderTreeBuilderBlock.cpp: |
| (WebCore::RenderTreeBuilder::Block::takeChild): |
| * rendering/updating/RenderTreeBuilderFirstLetter.cpp: |
| (WebCore::RenderTreeBuilder::FirstLetter::updateStyle): |
| (WebCore::RenderTreeBuilder::FirstLetter::createRenderers): |
| * rendering/updating/RenderTreeBuilderList.cpp: |
| (WebCore::RenderTreeBuilder::List::updateItemMarker): |
| * rendering/updating/RenderTreeBuilderMultiColumn.cpp: |
| (WebCore::RenderTreeBuilder::MultiColumn::destroyFragmentedFlow): |
| (WebCore::RenderTreeBuilder::MultiColumn::handleSpannerRemoval): |
| * rendering/updating/RenderTreeBuilderRuby.cpp: |
| (WebCore::RenderTreeBuilder::Ruby::moveBlockChildren): |
| (WebCore::RenderTreeBuilder::Ruby::takeChild): |
| |
| 2018-02-19 Daniel Bates <dabates@apple.com> |
| |
| Do not block authentication challenge to navigated resources |
| https://bugs.webkit.org/show_bug.cgi?id=182807 |
| <rdar://problem/37481619> |
| |
| Reviewed by Brent Fulgham. |
| |
| Blocking the main resource from asking for credentials depending on how it was |
| navigated to could be confusing to a person and breaks web compatibility. Restore |
| the behavior before r224134. |
| |
| * loader/FrameLoader.cpp: |
| (WebCore::FrameLoader::receivedFirstData): |
| * loader/ResourceLoader.cpp: |
| (WebCore::ResourceLoader::init): |
| (WebCore::ResourceLoader::willSendRequestInternal): |
| (WebCore::ResourceLoader::didBlockAuthenticationChallenge): |
| (WebCore::ResourceLoader::isAllowedToAskUserForCredentials const): |
| (WebCore::ResourceLoader::isMixedContent const): Deleted. |
| * loader/ResourceLoader.h: |
| (WebCore::ResourceLoader::wasAuthenticationChallengeBlocked const): |
| (WebCore::ResourceLoader::wasInsecureRequestSeen const): Deleted. |
| |
| 2018-02-17 Antoine Quint <graouts@apple.com> |
| |
| [Web Animations] Store all parsed keyframe input information in a single structure |
| https://bugs.webkit.org/show_bug.cgi?id=182903 |
| |
| Reviewed by Dean Jackson. |
| |
| When parsing keyframe input provided through the JS API, we used to create several data structures. |
| During parsing we would create a Vector<ProcessedKeyframe> where we would store the validated values |
| for "offset", "easing" and "composite" as well as CSS properties and CSS values as strings. |
| |
| Then we would create a KeyframeList, a class that pre-dates the work on Web Animations and is used |
| for hardware animations, with RenderStyle objects that are used for CSS property blending at runtime. |
| Once the KeyframeList was created, the Vector<ProcessedKeyframe> was discarded. |
| |
| Since KeyframeList did not know about nullable offsets, timing functions and composite operations, and |
| because we do not with to modify a legacy class that we will eventually remove once all the Web Animations |
| work is complete, we also stored the parsed offsets as m_offsets, the timing functions as m_timingFunctions |
| and the composite operations as m_compositeOperations. |
| |
| In this patch we rename the ProcessedKeyframe structure used temporarily during parsing to ParsedKeyframe and |
| store both the input and processed data related to a given keyframe in that single structure which we keep |
| around as m_parsedKeyframes when we finished processing the keyframes input. This update ParsedKeyframe structure |
| allows to keep around the original nullable offsets, the original CSS properties and CSS values as strings as |
| a HashMap<CSSPropertyID, String>, as well as the CSS properties and CSS values as CSSValue objects using a |
| MutableStyleProperties object. |
| |
| This has the benefit of reducing the number of members, but also pave the way for supporting read-write targets |
| where we will be able to decouple parsing keyframes and creating a KeyframeList, which requires a valid target |
| to create RenderStyle objects used for blending, since the original parsing-time information is now stored. |
| |
| Finally, this allowed getKeyframes() to be more compliant by returning the CSS values as originally provided in |
| the keyframe input with shorthand properties when provided, rather than the long-hands we used to read back |
| through RenderStyle objects. |
| |
| The generated KeyframeList is now stored as m_blendingKeyframes and is only used for the purpose of interfacing |
| with hardware animations and CSS property blending. |
| |
| While ProcessedKeyframe was copyable due to holding only simple types, ParsedKeyframe is not since it uses a Ref |
| to hold the MutableStyleProperties. This uncovered some cases where we copied ProcessedKeyframe objects, we now |
| ensure that the ParsedKeyframe objects are moved instead, which was the correct thing to do all along. |
| |
| * animation/KeyframeEffectReadOnly.cpp: |
| (WebCore::computeMissingKeyframeOffsets): While we used to store std::optional<double> for the computed offset, |
| we now store a simple double, which makes more sense since the computed offset is eventually a fully resolved |
| value after calling computeMissingKeyframeOffsets(). So we now compute the final computed offset without resorting |
| to intermediate nullable computed offsets. |
| (WebCore::processIterableKeyframes): |
| (WebCore::processPropertyIndexedKeyframes): |
| (WebCore::KeyframeEffectReadOnly::KeyframeEffectReadOnly): |
| (WebCore::KeyframeEffectReadOnly::copyPropertiesFromSource): |
| (WebCore::KeyframeEffectReadOnly::getKeyframes): |
| (WebCore::KeyframeEffectReadOnly::processKeyframes): |
| (WebCore::KeyframeEffectReadOnly::computeStackingContextImpact): |
| (WebCore::KeyframeEffectReadOnly::shouldRunAccelerated): |
| (WebCore::KeyframeEffectReadOnly::getAnimatedStyle): |
| (WebCore::KeyframeEffectReadOnly::setAnimatedPropertiesInStyle): |
| (WebCore::KeyframeEffectReadOnly::startOrStopAccelerated): |
| * animation/KeyframeEffectReadOnly.h: |
| (WebCore::KeyframeEffectReadOnly::ParsedKeyframe::ParsedKeyframe): |
| |
| 2018-02-19 Zalan Bujtas <zalan@apple.com> |
| |
| [RenderTreeBuilder] Remove redundant RenderObject::removeFromParentAndDestroy |
| https://bugs.webkit.org/show_bug.cgi?id=182926 |
| <rdar://problem/37674997> |
| |
| Reviewed by Antti Koivisto. |
| |
| Call RenderTreeBuilder::removeAndDestroyChild() directly instead. |
| |
| No change in functionality. |
| |
| * dom/Document.cpp: |
| (WebCore::Document::setFullScreenRenderer): |
| * rendering/RenderBoxModelObject.cpp: |
| (WebCore::RenderBoxModelObject::removeAndDestroyAllContinuations): |
| * rendering/RenderButton.cpp: |
| (WebCore::RenderButton::setText): |
| * rendering/RenderFullScreen.cpp: |
| (WebCore::RenderFullScreen::willBeDestroyed): |
| (WebCore::RenderFullScreen::unwrapRenderer): |
| * rendering/RenderListItem.cpp: |
| (WebCore::RenderListItem::willBeDestroyed): |
| * rendering/RenderObject.cpp: |
| (WebCore::RenderObject::removeFromParentAndDestroy): Deleted. |
| * rendering/RenderObject.h: |
| * rendering/RenderTextFragment.cpp: |
| (WebCore::RenderTextFragment::willBeDestroyed): |
| (WebCore::RenderTextFragment::setText): |
| * rendering/updating/RenderTreeBuilder.cpp: |
| (WebCore::RenderTreeBuilder::removeFromParentAndDestroyCleaningUpAnonymousWrappers): |
| * rendering/updating/RenderTreeBuilderBlock.cpp: |
| (WebCore::RenderTreeBuilder::Block::takeChild): |
| * rendering/updating/RenderTreeBuilderList.cpp: |
| (WebCore::RenderTreeBuilder::List::updateItemMarker): |
| * rendering/updating/RenderTreeBuilderMultiColumn.cpp: |
| (WebCore::RenderTreeBuilder::MultiColumn::destroyFragmentedFlow): |
| (WebCore::RenderTreeBuilder::MultiColumn::handleSpannerRemoval): |
| * rendering/updating/RenderTreeBuilderRuby.cpp: |
| (WebCore::RenderTreeBuilder::Ruby::moveBlockChildren): |
| (WebCore::RenderTreeBuilder::Ruby::takeChild): |
| |
| 2018-02-19 Tim Horton <timothy_horton@apple.com> |
| |
| Increase text autosizing constants for extra zoom mode |
| https://bugs.webkit.org/show_bug.cgi?id=182919 |
| <rdar://problem/37671259> |
| |
| Reviewed by Wenson Hsieh. |
| |
| * page/Settings.yaml: |
| * page/SettingsBase.cpp: |
| (WebCore::SettingsBase::defaultMinimumZoomFontSize): |
| (WebCore::SettingsBase::defaultOneLineTextMultiplierCoefficient): |
| (WebCore::SettingsBase::defaultMultiLineTextMultiplierCoefficient): |
| (WebCore::SettingsBase::defaultMaxTextAutosizingScaleIncrease): |
| * page/SettingsBase.h: |
| * rendering/RenderBlockFlow.cpp: |
| (WebCore::oneLineTextMultiplier): |
| (WebCore::textMultiplier): |
| (WebCore::RenderBlockFlow::adjustComputedFontSizes): |
| * rendering/TextAutoSizing.cpp: |
| (WebCore::TextAutoSizingValue::adjustTextNodeSizes): |
| Make autosizing constants settings, and change their default values. |
| |
| 2018-02-17 Antoine Quint <graouts@apple.com> |
| |
| [Web Animations] Accept null composite modes in keyframes |
| https://bugs.webkit.org/show_bug.cgi?id=182902 |
| |
| Reviewed by Dean Jackson. |
| |
| The Web Animations spec used to specify that that composite modes should be non-null and instead not be |
| provided when specifying keyframes, but now null values are accepted. We update the IDL input types used |
| when parsing keyframes to allow for null values. |
| |
| We had already updated the getKeyframes() output in webkit.org/b/182600. |
| |
| * animation/KeyframeEffectReadOnly.cpp: |
| (WebCore::processIterableKeyframes): |
| (WebCore::processKeyframeLikeObject): |
| (WebCore::processPropertyIndexedKeyframes): |
| * animation/KeyframeEffectReadOnly.h: |
| * animation/KeyframeEffectReadOnly.idl: |
| |
| 2018-02-19 Ms2ger <Ms2ger@igalia.com> |
| |
| Explicitly qualify some method calls on this in lamdas in Service Worker code. |
| https://bugs.webkit.org/show_bug.cgi?id=182875 |
| |
| Reviewed by Chris Dumez. |
| |
| This is necessary for the code to build with GCC 5. Other code already |
| appears to have been adapted similarly. |
| |
| No change in functionality. |
| |
| * loader/DocumentLoader.cpp: |
| (WebCore::DocumentLoader::redirectReceived): |
| (WebCore::DocumentLoader::startLoadingMainResource): |
| * workers/service/ServiceWorkerContainer.cpp: |
| (WebCore::ServiceWorkerContainer::ready): |
| (WebCore::ServiceWorkerContainer::getRegistration): |
| (WebCore::ServiceWorkerContainer::getRegistrations): |
| (WebCore::ServiceWorkerContainer::didFinishGetRegistrationsRequest): |
| * workers/service/ServiceWorkerGlobalScope.cpp: |
| (WebCore::ServiceWorkerGlobalScope::updateExtendedEventsSet): |
| * workers/service/server/SWServer.cpp: |
| (WebCore::SWServer::claim): |
| (WebCore::SWServer::Connection::resolveRegistrationReadyRequests): |
| * workers/service/server/SWServerRegistration.cpp: |
| (WebCore::SWServerRegistration::updateRegistrationState): |
| (WebCore::SWServerRegistration::setUpdateViaCache): |
| (WebCore::SWServerRegistration::setLastUpdateTime): |
| (WebCore::SWServerRegistration::fireUpdateFoundEvent): |
| * workers/service/server/SWServerWorker.cpp: |
| (WebCore::SWServerWorker::setState): |
| |
| 2018-02-19 Zalan Bujtas <zalan@apple.com> |
| |
| [RenderTreeBuilder] Move RenderElement::removeAndDestroyChild() to RenderTreeBuilder |
| https://bugs.webkit.org/show_bug.cgi?id=182915 |
| <rdar://problem/37658123> |
| |
| Reviewed by Antti Koivisto. |
| |
| No change in functionality. |
| |
| * rendering/RenderElement.cpp: |
| (WebCore::RenderElement::removeAndDestroyChild): Deleted. |
| * rendering/RenderElement.h: |
| (WebCore::RenderElement::isChildAllowed const): |
| * rendering/RenderObject.cpp: |
| (WebCore::RenderObject::removeFromParentAndDestroy): |
| * rendering/RenderView.cpp: |
| (WebCore::RenderView::willBeDestroyed): |
| * rendering/updating/RenderTreeBuilder.cpp: |
| (WebCore::RenderTreeBuilder::removeAndDestroyChild): |
| (WebCore::RenderTreeBuilder::removeFromParentAndDestroyCleaningUpAnonymousWrappers): |
| * rendering/updating/RenderTreeBuilder.h: |
| * rendering/updating/RenderTreeBuilderFirstLetter.cpp: |
| (WebCore::RenderTreeBuilder::FirstLetter::updateStyle): |
| (WebCore::RenderTreeBuilder::FirstLetter::createRenderers): |
| |
| 2018-02-12 Sergio Villar Senin <svillar@igalia.com> |
| |
| [WebVR][OpenVR] Implement getVRDisplays() |
| https://bugs.webkit.org/show_bug.cgi?id=182692 |
| |
| Reviewed by Žan Doberšek. |
| |
| This provides an implementation of Navigator's getVRDisplays() |
| method using OpenVR as backend. It queues several promises in |
| a queue and resolves them all just once. The information retrieved |
| is very minimal for the time being, but this change lays the ground |
| for all the changes that are about to land. |
| |
| The VR code uses a VRManager which is the interface with the |
| platform code and the responsible for instantiating the right |
| platform code. This platform code is currently being implemented |
| using OpenVR but could we also ported in the future to OpenXR or any |
| other VR SDK. |
| |
| * CMakeLists.txt: |
| * Modules/webvr/NavigatorWebVR.cpp: |
| (WebCore::NavigatorWebVR::getVRDisplays): |
| (WebCore::NavigatorWebVR::vrEnabled): |
| * Modules/webvr/NavigatorWebVR.h: |
| * Modules/webvr/VRDisplay.cpp: |
| (WebCore::VRDisplay::create): |
| (WebCore::VRDisplay::VRDisplay): |
| (WebCore::VRDisplay::isConnected const): |
| (WebCore::VRDisplay::displayName const): |
| * Modules/webvr/VRDisplay.h: |
| * Modules/webvr/VRDisplayCapabilities.cpp: |
| (WebCore::VRDisplayCapabilities::VRDisplayCapabilities): |
| (WebCore::VRDisplayCapabilities::hasPosition const): |
| (WebCore::VRDisplayCapabilities::hasOrientation const): |
| (WebCore::VRDisplayCapabilities::hasExternalDisplay const): |
| (WebCore::VRDisplayCapabilities::canPresent const): |
| (WebCore::VRDisplayCapabilities::maxLayer const): |
| * Modules/webvr/VRDisplayCapabilities.h: |
| (WebCore::VRDisplayCapabilities::create): |
| * Sources.txt: |
| * platform/vr/VRManager.cpp: Added. This is the main interface used by bindings code to |
| access VR devices data provided by platform code. |
| (WebCore::VRManager::singleton): |
| (WebCore::VRManager::VRManager): |
| (WebCore::VRManager::~VRManager): |
| (WebCore::VRManager::refreshVRDevices): |
| * platform/vr/VRManager.h: Added. |
| * platform/vr/VRPlatformDisplay.h: Added. Abstraction of a VR display system. To be |
| implemented by backends like OpenVR, OpenXR... |
| * platform/vr/VRPlatformManager.h: Added. Abstraction of the platform specific class which |
| retrieves data from VR devices. To be implemented by backends like OpenVR, OpenXR... |
| * platform/vr/openvr/VRPlatformDisplayOpenVR.cpp: Added. |
| (WebCore::VRPlatformDisplayOpenVR::VRPlatformDisplayOpenVR): |
| * platform/vr/openvr/VRPlatformDisplayOpenVR.h: Added. |
| * platform/vr/openvr/VRPlatformManagerOpenVR.cpp: Added. |
| (WebCore::VRPlatformManagerOpenVR::create): |
| (WebCore::VRPlatformManagerOpenVR::VRPlatformManagerOpenVR): |
| (WebCore::VRPlatformManagerOpenVR::~VRPlatformManagerOpenVR): |
| (WebCore::VRPlatformManagerOpenVR::initOpenVR): |
| * platform/vr/openvr/VRPlatformManagerOpenVR.h: Added. |
| * WebCore.xcodeproj/project.pbxproj: |
| |
| 2018-02-19 Manuel Rego Casasnovas <rego@igalia.com> |
| |
| [css-grid] Apply automatic minimum size clamping to spanning items too |
| https://bugs.webkit.org/show_bug.cgi?id=182684 |
| |
| Reviewed by Javier Fernandez. |
| |
| In r225776 we added the conditions from the spec to apply |
| the automatic minimum size clamping when required |
| but only to non-spanning items. |
| See: https://drafts.csswg.org/css-grid/#min-size-auto |
| |
| This patch moves the code from GridTrackSizingAlgorithm::sizeTrackToFitNonSpanningItem() |
| to GridTrackSizingAlgorithmStrategy::minSizeForChild() |
| that way the clamping is applied for both spanning and non-spanning items. |
| |
| This somehow reverts r225776, as it was adding some duplicated code. |
| All the checks to know if we should use that part of the spec |
| were already present in GridTrackSizingAlgorithmStrategy::minSizeForChild(). |
| |
| Apart from using the previous code, there's a new loop to verify |
| that the max track sizing function is fixed for all the tracks of the item. |
| |
| Tests: imported/w3c/web-platform-tests/css/css-grid/grid-items/grid-minimum-size-grid-items-024.html |
| imported/w3c/web-platform-tests/css/css-grid/grid-items/grid-minimum-size-grid-items-025.html |
| |
| * rendering/GridTrackSizingAlgorithm.cpp: |
| (WebCore::GridTrackSizingAlgorithm::sizeTrackToFitNonSpanningItem): |
| (WebCore::GridTrackSizingAlgorithmStrategy::minSizeForChild const): |
| |
| 2018-02-19 Philippe Normand <pnormand@igalia.com> |
| |
| [GTK][GStreamer] Replaying a webm video twice causes the video to stop getting rendered |
| https://bugs.webkit.org/show_bug.cgi?id=176789 |
| |
| Reviewed by Xabier Rodriguez-Calvar. |
| |
| Ensure the wrapped GstGLContext is set when the pipeline goes from |
| READY to PAUSED state. This is a workaround for |
| https://bugzilla.gnome.org/show_bug.cgi?id=757933. |
| |
| * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp: |
| (WebCore::MediaPlayerPrivateGStreamer::~MediaPlayerPrivateGStreamer): Add debug statement. |
| (WebCore::MediaPlayerPrivateGStreamer::readyTimerFired): Ditto. |
| (WebCore::MediaPlayerPrivateGStreamer::changePipelineState): |
| Ensure the wrapped GstGLContext is set when the pipeline goes from |
| READY to PAUSED state. |
| (WebCore::MediaPlayerPrivateGStreamer::didEnd): Add debug statement. |
| * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp: |
| Change the requestGLContext to be a method instead of a static |
| function. Being a static function was a requirement for the now-removed OpenWebRTC player. |
| (WebCore::MediaPlayerPrivateGStreamerBase::handleSyncMessage): Add |
| debug statement, fix requestGLContext usage. |
| (WebCore::MediaPlayerPrivateGStreamerBase::requestGLContext): Refactor as method. |
| (WebCore::MediaPlayerPrivateGStreamerBase::flushCurrentBuffer): Fix requestGLContext usage. |
| (WebCore::MediaPlayerPrivateGStreamerBase::createVideoSinkGL): Remove fixed FIXME. |
| (WebCore::MediaPlayerPrivateGStreamerBase::ensureGLVideoSinkContext): |
| Set display and app wrapped contexts on the video sink. |
| * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h: |
| |
| 2018-02-19 Xabier Rodriguez Calvar <calvaris@igalia.com> |
| |
| [GStreamer] Crash in WebCore::MediaPlayerRequestInstallMissingPluginsCallback::complete |
| https://bugs.webkit.org/show_bug.cgi?id=166733 |
| |
| Reviewed by Philippe Normand. |
| |
| There are a couple of issues to tackle here. |
| |
| First is handling getting more than one missing plugin |
| installation request at the same time. For this we add the request |
| to a Vector and handle them there. |
| |
| Second is that if the player is dead and we still get the result, |
| bad things happen. For that we "weaked" the pointer capture by the |
| lambda. |
| |
| * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp: |
| (WebCore::MediaPlayerPrivateGStreamer::~MediaPlayerPrivateGStreamer): |
| Handle Vector of callbacks. |
| (WebCore::MediaPlayerPrivateGStreamer::handleMessage): Weak |
| private player pointer and put the callback in the Vector. |
| * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h: |
| Callback becomes Vector. |
| * platform/graphics/gstreamer/MediaPlayerRequestInstallMissingPluginsCallback.h: |
| (WebCore::MediaPlayerRequestInstallMissingPluginsCallback::create): |
| (WebCore::MediaPlayerRequestInstallMissingPluginsCallback::complete): |
| (WebCore::MediaPlayerRequestInstallMissingPluginsCallback::MediaPlayerRequestInstallMissingPluginsCallback): |
| Callback function is refactored into a "using" type and added self |
| as parameter to the function. |
| |
| 2018-02-19 Philippe Normand <pnormand@igalia.com> |
| |
| [GStreamer] Playbin3 support |
| https://bugs.webkit.org/show_bug.cgi?id=182530 |
| |
| Reviewed by Xabier Rodriguez-Calvar. |
| |
| This patch introduces opt-in support for the playbin3 GStreamer |
| element. This new playback element is still considered |
| experimental but it can still be very useful for media assets |
| containing multiple tracks of the same type. In such scenario |
| audio/video decoders would be created only for the selected tracks |
| whereas playbin2 creates decoder for each track. |
| |
| * platform/graphics/gstreamer/AudioTrackPrivateGStreamer.cpp: Take |
| a weak pointer of the media player instead of playbin and call the |
| player when enabling tracks. Also use the GstStream API instead of |
| inspecting the pad when playbin3 is used. |
| (WebCore::AudioTrackPrivateGStreamer::AudioTrackPrivateGStreamer): |
| (WebCore::AudioTrackPrivateGStreamer::disconnect): |
| (WebCore::AudioTrackPrivateGStreamer::markAsActive): |
| (WebCore::AudioTrackPrivateGStreamer::setEnabled): |
| * platform/graphics/gstreamer/AudioTrackPrivateGStreamer.h: |
| * platform/graphics/gstreamer/GRefPtrGStreamer.cpp: GstStream and |
| GstStreamCollection smart pointer support. |
| (WTF::adoptGRef): |
| (WTF::refGPtr<GstStream>): |
| (WTF::derefGPtr<GstStream>): |
| (WTF::refGPtr<GstStreamCollection>): |
| (WTF::derefGPtr<GstStreamCollection>): |
| * platform/graphics/gstreamer/GRefPtrGStreamer.h: |
| * platform/graphics/gstreamer/InbandTextTrackPrivateGStreamer.cpp: |
| Use the GstStream API instead of inspecting the pad when playbin3 |
| is used. |
| (WebCore::InbandTextTrackPrivateGStreamer::InbandTextTrackPrivateGStreamer): |
| (WebCore::InbandTextTrackPrivateGStreamer::disconnect): |
| * platform/graphics/gstreamer/InbandTextTrackPrivateGStreamer.h: |
| (WebCore::InbandTextTrackPrivateGStreamer::create): |
| * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp: |
| (WebCore::MediaPlayerPrivateGStreamer::~MediaPlayerPrivateGStreamer): |
| m_{audio,video,text}Tracks are now hashmaps, which is a bit more |
| convenient to use than Vectors. |
| (WebCore::MediaPlayerPrivateGStreamer::updateTracks): Update our |
| tracks implementations depending on the streams stored in the |
| collection. |
| (WebCore::MediaPlayerPrivateGStreamer::enableTrack): Activate the |
| given track. This method is called by the TrackPrivate |
| implementations. |
| (WebCore::MediaPlayerPrivateGStreamer::notifyPlayerOfVideo): |
| Refactored legacy (playbin2) support for track hashmap storage. |
| (WebCore::MediaPlayerPrivateGStreamer::notifyPlayerOfAudio): Ditto. |
| (WebCore::MediaPlayerPrivateGStreamer::notifyPlayerOfText): Ditto. |
| (WebCore::MediaPlayerPrivateGStreamer::newTextSample): Use track hashmap storage. |
| (WebCore::MediaPlayerPrivateGStreamer::handleMessage): React on |
| playbin3 GstStream messages, store the collection provided and |
| activate the given selected streams accordingly. |
| (WebCore::MediaPlayerPrivateGStreamer::purgeInvalidAudioTracks): Invalidate tracks no longer needed. |
| (WebCore::MediaPlayerPrivateGStreamer::purgeInvalidVideoTracks): Ditto. |
| (WebCore::MediaPlayerPrivateGStreamer::purgeInvalidTextTracks): Ditto. |
| (WebCore::MediaPlayerPrivateGStreamer::sourceSetupCallback): |
| Refactoring, use source-setup signal instead of the source |
| property which is not supported in playbin3. |
| (WebCore::MediaPlayerPrivateGStreamer::uriDecodeBinElementAddedCallback): |
| Promoted logging messages, GST_TRACE should be used for very |
| frequent and less interesting messages. |
| (WebCore::MediaPlayerPrivateGStreamer::downloadBufferFileCreatedCallback): Ditto. |
| (WebCore::MediaPlayerPrivateGStreamer::sourceSetup): Called by the source-setup signal handler. |
| (WebCore::MediaPlayerPrivateGStreamer::setDownloadBuffering): Debugging message added. |
| (WebCore::MediaPlayerPrivateGStreamer::setPreload): Ditto. |
| (WebCore::MediaPlayerPrivateGStreamer::createGSTPlayBin): Create a |
| playbin3 element if USE(GSTREAMER_PLAYBIN3) was enabled and |
| connect to playbin2 signals otherwise. |
| * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h: |
| (WebCore::MediaPlayerPrivateGStreamer::createWeakPtr): Promoted to public. |
| * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h: |
| New StreamCollectionChanged notification type, used the sub-class. |
| * platform/graphics/gstreamer/TrackPrivateBaseGStreamer.cpp: |
| (WebCore::TrackPrivateBaseGStreamer::TrackPrivateBaseGStreamer): Support for GstStream API. |
| (WebCore::TrackPrivateBaseGStreamer::disconnect): Clear GstStream too. |
| (WebCore::TrackPrivateBaseGStreamer::tagsChanged): Get tags from GstStream. |
| (WebCore::TrackPrivateBaseGStreamer::notifyTrackOfActiveChanged): No need to check m_pad twice. |
| (WebCore::TrackPrivateBaseGStreamer::notifyTrackOfTagsChanged): Ditto. |
| * platform/graphics/gstreamer/TrackPrivateBaseGStreamer.h: |
| * platform/graphics/gstreamer/VideoTrackPrivateGStreamer.cpp: Take |
| a weak pointer of the media player instead of playbin and call the |
| player when enabling tracks. Also use the GstStream API instead of |
| inspecting the pad when playbin3 is used. |
| (WebCore::VideoTrackPrivateGStreamer::VideoTrackPrivateGStreamer): |
| (WebCore::VideoTrackPrivateGStreamer::disconnect): |
| (WebCore::VideoTrackPrivateGStreamer::markAsActive): |
| (WebCore::VideoTrackPrivateGStreamer::setSelected): |
| * platform/graphics/gstreamer/VideoTrackPrivateGStreamer.h: |
| * platform/graphics/gstreamer/mse/AppendPipeline.cpp: Pass player pointer to track constructor. |
| (WebCore::AppendPipeline::connectDemuxerSrcPadToAppsink): |
| * platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.cpp: Source-setup signal handler. |
| (WebCore::MediaPlayerPrivateGStreamerMSE::sourceSetup): |
| * platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.h: |
| |
| 2018-02-19 Fujii Hironori <Hironori.Fujii@sony.com> |
| |
| REGRESSION(r219298): RELEASE_ASSERT(!m_owningPointerForClose) fails in WebCore::IDBServer::UniqueIDBDatabase::scheduleShutdownForClose |
| https://bugs.webkit.org/show_bug.cgi?id=174354 |
| <rdar://problem/33294987> |
| |
| Reviewed by Michael Catanzaro. |
| |
| UniqueIDBDatabase::invokeOperationAndTransactionTimer was called |
| even after m_owningPointerForClose was set in |
| UniqueIDBDatabase::didDeleteBackingStore. |
| |
| No new tests (Covered by existing tests). |
| |
| * Modules/indexeddb/server/UniqueIDBDatabase.cpp: |
| (WebCore::IDBServer::UniqueIDBDatabase::didDeleteBackingStore): |
| Do not start deleting the UniqueIDBDatabase. Just call invokeOperationAndTransactionTimer. |
| (WebCore::IDBServer::UniqueIDBDatabase::invokeOperationAndTransactionTimer): |
| Assert m_owningPointerForClose is null. |
| |
| 2018-02-18 Yoshiaki Jitsukawa <Yoshiaki.Jitsukawa@sony.com> |
| |
| Fix build error after r228417 without ACCESSIBILITY |
| https://bugs.webkit.org/show_bug.cgi?id=182914 |
| |
| Reviewed by Chris Fleizach. |
| |
| An inline empty version of AXObjectCache::deferFocusdUIElementChangeIfNeeded() |
| needs to be defined if not HAVE(ACCESSIBILITY). |
| |
| * accessibility/AXObjectCache.h: |
| (WebCore::AXObjectCache::deferFocusedUIElementChangeIfNeeded): |
| |
| 2018-02-18 Zalan Bujtas <zalan@apple.com> |
| |
| [RenderTreeBuilder] REGRESSION(r228238) Detach renderer before destroying its subtree. |
| https://bugs.webkit.org/show_bug.cgi?id=182908 |
| <rdar://problem/37619394> |
| |
| Reviewed by Antti Koivisto. |
| |
| Prior to r228238 we first detached the to-be-destroyed renderer and then |
| started nuking its descendants. r228238 changed the order and now the descendants are |
| destroyed while they are still attached to the tree. Apparently some of the takeChild() |
| normalization logic gets triggered now that the renderers still have access to their previous/next |
| siblings. This is unexpected and it shouldn't matter whether the subtree is still attached. |
| Let's revert it to the original order for now (see webkit.org/b/182909). |
| |
| Test: fast/block/crash-when-subtree-is-still-attached.html |
| |
| * rendering/RenderElement.cpp: |
| (WebCore::RenderElement::removeAndDestroyChild): |
| |
| 2018-02-18 Charlie Turner <cturner@igalia.com> |
| |
| [GStreamer] Push smaller buffers from HTTP source |
| https://bugs.webkit.org/show_bug.cgi?id=182829 |
| |
| Reviewed by Philippe Normand. |
| |
| Split the received buffer into smaller buffers of a size consistent |
| with the basesrc (4KiB). It is important not to push large buffers |
| into the appsrc (where large is relative to the appsrc's configured |
| byte size). If large buffers are pushed, then when they are internally |
| dequeued by the appsrc, the buffering percentage can dramatically |
| plummet due to a large amount of bytes being removed after a push. This |
| can in turn trick the media player into thinking it needs to buffer, |
| and then issuing a spurious set of playing->paused then |
| paused->playing transitions, which by the time the buffering logic |
| completes, data are already available. |
| |
| * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp: |
| (CachedResourceStreamingClient::dataReceived): |
| |
| 2018-02-17 Darin Adler <darin@apple.com> |
| |
| Web Inspector: get rid of remaining uses of OptOutput<T> |
| https://bugs.webkit.org/show_bug.cgi?id=180607 |
| |
| Reviewed by Brian Burg. |
| |
| * inspector/InspectorStyleSheet.cpp: |
| (WebCore::buildSourceRangeObject): Take a const Vector& instead of a Vector*. |
| (WebCore::InspectorStyle::buildObjectForStyle const): Pass lineEndings() instead |
| of lineEndings().get(). |
| (WebCore::InspectorStyle::styleWithProperties const): Ditto. |
| (WebCore::InspectorStyleSheet::buildObjectForSelectorList): Ditto. |
| (WebCore::InspectorStyleSheet::lineEndings const): Return a Vector instead of |
| a std::unique_ptr<Vector>. |
| (WebCore::InspectorStyleSheetForInlineStyle::lineEndings const): Ditto. |
| * inspector/InspectorStyleSheet.h: Updated for the above. |
| |
| * inspector/agents/InspectorCSSAgent.h: Removed some bogus const. |
| * inspector/agents/InspectorCanvasAgent.cpp: Ditto. |
| * inspector/agents/InspectorCanvasAgent.h: Ditto. |
| |
| * inspector/agents/InspectorDOMDebuggerAgent.cpp: Improved type of global strings |
| so we don't waste space with a pointer to the string. |
| (WebCore::InspectorDOMDebuggerAgent::setEventListenerBreakpoint): Removed |
| explicit creation of String, which was wasteful and unnecessary. |
| (WebCore::InspectorDOMDebuggerAgent::setInstrumentationBreakpoint): Ditto. |
| (WebCore::InspectorDOMDebuggerAgent::removeEventListenerBreakpoint): Ditto. |
| (WebCore::InspectorDOMDebuggerAgent::removeInstrumentationBreakpoint): Ditto. |
| (WebCore::InspectorDOMDebuggerAgent::setXHRBreakpoint): Removed bogus const. |
| |
| * inspector/agents/InspectorDOMDebuggerAgent.h: Removed bogus const and use |
| final instead of override. |
| * inspector/agents/InspectorPageAgent.cpp: Ditto. |
| * inspector/agents/InspectorPageAgent.h: Ditto. |
| |
| 2018-02-16 Zalan Bujtas <zalan@apple.com> |
| |
| [RenderTreeBuilder] Cleanup RenderTreeBuilder |
| https://bugs.webkit.org/show_bug.cgi?id=182899 |
| <rdar://problem/37627888> |
| |
| Reviewed by Antti Koivisto. |
| |
| No change in functionality. |
| |
| * rendering/RenderBlockFlow.cpp: |
| (WebCore::RenderBlockFlow::styleDidChange): |
| * rendering/updating/RenderTreeBuilder.cpp: |
| (WebCore::RenderTreeBuilder::takeChild): |
| (WebCore::RenderTreeBuilder::moveChildTo): |
| (WebCore::RenderTreeBuilder::moveAllChildrenTo): |
| (WebCore::RenderTreeBuilder::moveChildrenTo): |
| (WebCore::RenderTreeBuilder::moveAllChildrenIncludingFloatsTo): |
| (WebCore::RenderTreeBuilder::makeChildrenNonInline): |
| (WebCore::RenderTreeBuilder::splitAnonymousBoxesAroundChild): |
| (WebCore::RenderTreeBuilder::takeChildFromRenderMenuList): Deleted. |
| (WebCore::RenderTreeBuilder::takeChildFromRenderButton): Deleted. |
| * rendering/updating/RenderTreeBuilder.h: |
| (WebCore::RenderTreeBuilder::current): |
| * rendering/updating/RenderTreeBuilderBlock.cpp: |
| (WebCore::RenderTreeBuilder::Block::dropAnonymousBoxChild): |
| * rendering/updating/RenderTreeBuilderBlockFlow.cpp: |
| (WebCore::RenderTreeBuilder::BlockFlow::moveAllChildrenIncludingFloatsTo): |
| * rendering/updating/RenderTreeBuilderFormControls.cpp: |
| (WebCore::RenderTreeBuilder::FormControls::takeChild): |
| * rendering/updating/RenderTreeBuilderFormControls.h: |
| * rendering/updating/RenderTreeBuilderMultiColumn.cpp: |
| (WebCore::RenderTreeBuilder::MultiColumn::createFragmentedFlow): |
| (WebCore::RenderTreeBuilder::MultiColumn::destroyFragmentedFlow): |
| * rendering/updating/RenderTreeBuilderRuby.cpp: |
| (WebCore::RenderTreeBuilder::Ruby::moveInlineChildren): |
| (WebCore::RenderTreeBuilder::Ruby::moveBlockChildren): |
| (WebCore::RenderTreeBuilder::Ruby::takeChild): |
| * rendering/updating/RenderTreeBuilderTable.cpp: |
| (WebCore::RenderTreeBuilder::Table::collapseAndDestroyAnonymousSiblingRows): |
| |
| 2018-02-16 Daniel Bates <dabates@apple.com> |
| |
| Remove UTF-32 BOM parsing code |
| https://bugs.webkit.org/show_bug.cgi?id=182900 |
| <rdar://problem/37238717> |
| |
| Reviewed by Alexey Proskuryakov. |
| |
| The UTF-32 encodings were removed from the text codec registry in r224747. So, |
| we no longer need code to parse UTF-32{BE, LE} BOM or encode and decode these |
| variants. |
| |
| * dom/TextDecoder.cpp: |
| (WebCore::codeUnitByteSize): |
| * loader/TextResourceDecoder.cpp: |
| (WebCore::TextResourceDecoder::checkForBOM): |
| (WebCore::TextResourceDecoder::checkForHeadCharset): |
| * platform/text/TextEncoding.cpp: |
| (WebCore::TextEncoding::isNonByteBasedEncoding const): |
| (WebCore::UTF32BigEndianEncoding): Deleted. |
| (WebCore::UTF32LittleEndianEncoding): Deleted. |
| * platform/text/TextEncoding.h: |
| |
| 2018-02-16 Zalan Bujtas <zalan@apple.com> |
| |
| [RenderTreeBuilder] Move RenderBoxModelObject::moveChild*() to RenderTreeBuilder |
| https://bugs.webkit.org/show_bug.cgi?id=182896 |
| <rdar://problem/37623051> |
| |
| Reviewed by Antti Koivisto. |
| |
| No change in functionality. |
| |
| * rendering/RenderBlock.h: |
| (WebCore::RenderBlock::moveAllChildrenIncludingFloatsTo): Deleted. |
| * rendering/RenderBlockFlow.cpp: |
| (WebCore::RenderBlockFlow::styleDidChange): |
| (WebCore::RenderBlockFlow::moveAllChildrenIncludingFloatsTo): Deleted. |
| * rendering/RenderBlockFlow.h: |
| * rendering/RenderBoxModelObject.cpp: |
| (WebCore::RenderBoxModelObject::moveChildTo): Deleted. |
| (WebCore::RenderBoxModelObject::moveChildrenTo): Deleted. |
| (WebCore::RenderBoxModelObject::moveAllChildrenToInternal): Deleted. |
| * rendering/RenderBoxModelObject.h: |
| (WebCore::RenderBoxModelObject::moveChildTo): Deleted. |
| (WebCore::RenderBoxModelObject::moveAllChildrenTo): Deleted. |
| (WebCore::RenderBoxModelObject::moveChildrenTo): Deleted. |
| * rendering/updating/RenderTreeBuilder.cpp: |
| (WebCore::RenderTreeBuilder::moveChildTo): |
| (WebCore::RenderTreeBuilder::moveAllChildrenTo): |
| (WebCore::RenderTreeBuilder::moveChildrenTo): |
| (WebCore::RenderTreeBuilder::moveAllChildrenIncludingFloatsTo): |
| (WebCore::RenderTreeBuilder::makeChildrenNonInline): |
| (WebCore::RenderTreeBuilder::splitAnonymousBoxesAroundChild): |
| * rendering/updating/RenderTreeBuilder.h: |
| * rendering/updating/RenderTreeBuilderBlock.cpp: |
| (WebCore::moveAllChildrenToInternal): |
| (WebCore::RenderTreeBuilder::Block::removeLeftoverAnonymousBlock): |
| (WebCore::RenderTreeBuilder::Block::takeChild): |
| (WebCore::RenderTreeBuilder::Block::dropAnonymousBoxChild): |
| * rendering/updating/RenderTreeBuilderBlockFlow.cpp: |
| (WebCore::RenderTreeBuilder::BlockFlow::moveAllChildrenIncludingFloatsTo): |
| * rendering/updating/RenderTreeBuilderBlockFlow.h: |
| * rendering/updating/RenderTreeBuilderMultiColumn.cpp: |
| (WebCore::RenderTreeBuilder::MultiColumn::createFragmentedFlow): |
| (WebCore::RenderTreeBuilder::MultiColumn::destroyFragmentedFlow): |
| * rendering/updating/RenderTreeBuilderRuby.cpp: |
| (WebCore::RenderTreeBuilder::Ruby::moveInlineChildren): |
| (WebCore::RenderTreeBuilder::Ruby::moveBlockChildren): |
| (WebCore::RenderTreeBuilder::Ruby::takeChild): |
| * rendering/updating/RenderTreeBuilderTable.cpp: |
| (WebCore::RenderTreeBuilder::Table::collapseAndDestroyAnonymousSiblingRows): |
| |
| 2018-02-16 Andy Estes <aestes@apple.com> |
| |
| [Cocoa] Stop using non-prefixed vDSP functions in 32-bit builds |
| https://bugs.webkit.org/show_bug.cgi?id=182898 |
| <rdar://problem/37195079> |
| |
| Reviewed by Tim Horton. |
| |
| There's no need to use non-prefixed vDSP function aliases on 32-bit builds. |
| The vDSP-prefixed versions are available on all Cocoa platforms we currently support. |
| |
| * platform/audio/DirectConvolver.cpp: |
| (WebCore::DirectConvolver::process): |
| * platform/audio/VectorMath.cpp: |
| (WebCore::VectorMath::vsmul): |
| (WebCore::VectorMath::vadd): |
| (WebCore::VectorMath::vmul): |
| (WebCore::VectorMath::zvmul): |
| |
| 2018-02-16 Ryan Haddad <ryanhaddad@apple.com> |
| |
| Unreviewed, rolling out r228575. |
| |
| Introduced LayoutTest crashes under GuardMalloc. |
| |
| Reverted changeset: |
| |
| "Use ResourceLoader to load appcache manifest" |
| https://bugs.webkit.org/show_bug.cgi?id=182861 |
| https://trac.webkit.org/changeset/228575 |
| |
| 2018-02-16 Dean Jackson <dino@apple.com> |
| |
| Use OPENGL macros to be more clear about which OpenGL/ES WebGL uses on Cocoa |
| https://bugs.webkit.org/show_bug.cgi?id=182894 |
| |
| Reviewed by Tim Horton. |
| |
| Adjust the places where we check for PLATFORM(MAC) or |
| PLATFORM(IOS) related to WebGL, and instead rely |
| on USE(OPENGL) USE(OPENGL_ES). |
| |
| * CMakeLists.txt: |
| * PlatformGTK.cmake: |
| * platform/graphics/GLContext.cpp: |
| (WebCore::initializeOpenGLShimsIfNeeded): |
| * platform/graphics/GraphicsContext3DPrivate.cpp: |
| * platform/graphics/OpenGLESShims.h: |
| * platform/graphics/cairo/ImageBufferCairo.cpp: |
| * platform/graphics/egl/GLContextEGL.cpp: |
| (WebCore::GLContextEGL::getEGLConfig): |
| (WebCore::GLContextEGL::createContext): |
| (WebCore::GLContextEGL::createSharingContext): |
| * platform/graphics/egl/GLContextEGLWPE.cpp: |
| (WebCore::GLContextEGL::createWPEContext): |
| * platform/graphics/egl/GLContextEGLWayland.cpp: |
| (WebCore::GLContextEGL::createWaylandContext): |
| * platform/graphics/egl/GLContextEGLX11.cpp: |
| (WebCore::GLContextEGL::createPixmapContext): |
| * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp: |
| (WebCore::MediaPlayerPrivateGStreamerBase::ensureGstGLContext): |
| * platform/graphics/gstreamer/VideoTextureCopierGStreamer.cpp: |
| (WebCore::VideoTextureCopierGStreamer::VideoTextureCopierGStreamer): |
| (WebCore::VideoTextureCopierGStreamer::~VideoTextureCopierGStreamer): |
| (WebCore::VideoTextureCopierGStreamer::copyVideoTextureToPlatformTexture): |
| * platform/graphics/gstreamer/VideoTextureCopierGStreamer.h: |
| * platform/graphics/opengl/Extensions3DOpenGLES.cpp: |
| * platform/graphics/opengl/Extensions3DOpenGLES.h: |
| * platform/graphics/opengl/GraphicsContext3DOpenGLES.cpp: |
| (WebCore::GraphicsContext3D::create): |
| (WebCore::GraphicsContext3D::GraphicsContext3D): |
| (WebCore::GraphicsContext3D::isGLES2Compliant const): |
| * platform/graphics/texmap/GraphicsContext3DTextureMapper.cpp: |
| (WebCore::GraphicsContext3D::create): |
| (WebCore::GraphicsContext3D::GraphicsContext3D): |
| (WebCore::GraphicsContext3D::~GraphicsContext3D): |
| (WebCore::GraphicsContext3D::isGLES2Compliant const): |
| (WebCore::GraphicsContext3D::getExtensions): |
| * platform/graphics/texmap/TextureMapperContextAttributes.cpp: |
| (WebCore::TextureMapperContextAttributes::initialize): |
| * platform/graphics/texmap/TextureMapperGL.cpp: |
| (WebCore::TextureMapperGLData::~TextureMapperGLData): |
| (WebCore::TextureMapperGLData::getVAO): |
| (WebCore::TextureMapperGL::beginPainting): |
| (WebCore::TextureMapperGL::endPainting): |
| * platform/graphics/texmap/TextureMapperGLHeaders.h: |
| * platform/graphics/texmap/TextureMapperShaderProgram.cpp: |
| (WebCore::TextureMapperShaderProgram::create): |
| |
| 2018-02-16 Zalan Bujtas <zalan@apple.com> |
| |
| [RenderTreeBuilder] Move RenderElement::insertChildInternal() to RenderTreeBuilder |
| https://bugs.webkit.org/show_bug.cgi?id=182885 |
| <rdar://problem/37617371> |
| |
| Reviewed by Antti Koivisto. |
| |
| No change in functionality. |
| |
| * rendering/RenderElement.cpp: |
| (WebCore::RenderElement::insertChildInternal): Deleted. |
| * rendering/RenderObject.h: |
| * rendering/updating/RenderTreeBuilder.cpp: |
| (WebCore::RenderTreeBuilder::insertChildToRenderElement): |
| |
| 2018-02-16 Youenn Fablet <youenn@apple.com> |
| |
| Allow specifying which plug-ins are supported |
| https://bugs.webkit.org/show_bug.cgi?id=182748 |
| |
| Reviewed by Chris Dumez. |
| |
| Tests: http/tests/plugins/nounsupported-plugin.html |
| http/tests/plugins/supported-plugin-all-origin-visibility.html |
| http/tests/plugins/supported-plugin-on-specific-origin.html |
| http/tests/plugins/supported-plugin-origin-specific-visibility.html |
| http/tests/plugins/unsupported-plugin-on-specific-origin.html |
| plugins/unsupported-plugin.html |
| |
| Added support for computing plugin web visibility with the added knowledge of supported plugins. |
| In case of a plugin failing to be created due to being unsupported, update the UI |
| to use mark the plugin as "Unexpected plug in". |
| |
| Added internal API to retrieve the plug-in error description message. |
| |
| * English.lproj/Localizable.strings: |
| * WebCore.xcodeproj/project.pbxproj: |
| * html/HTMLPlugInElement.cpp: |
| (WebCore::HTMLPlugInElement::setReplacement): |
| * html/HTMLPlugInElement.h: |
| * loader/EmptyClients.cpp: |
| * platform/LocalizedStrings.cpp: |
| (WebCore::unsupportedPluginText): |
| * platform/LocalizedStrings.h: |
| * plugins/PluginData.cpp: |
| (WebCore::PluginData::initPlugins): |
| * plugins/PluginData.h: |
| (WebCore::decodePluginNames): |
| (WebCore::encodePluginNames): |
| (WebCore::SupportedPluginNames::decode): |
| (WebCore::SupportedPluginNames::encode const): |
| * plugins/PluginInfoProvider.h: |
| * rendering/RenderEmbeddedObject.cpp: |
| (WebCore::unavailablePluginReplacementText): |
| * rendering/RenderEmbeddedObject.h: |
| (WebCore::RenderEmbeddedObject::pluginReplacementTextIfUnavailable const): |
| * testing/Internals.cpp: |
| (WebCore::Internals::unavailablePluginReplacementText): |
| * testing/Internals.h: |
| * testing/Internals.idl: |
| |
| 2018-02-16 Chris Dumez <cdumez@apple.com> |
| |
| http/tests/security/http-0.9/xhr-blocked.html is flaky |
| https://bugs.webkit.org/show_bug.cgi?id=182857 |
| <rdar://problem/37616958> |
| |
| Reviewed by Antti Koivisto. |
| |
| WebCoreResourceHandleAsOperationQueueDelegate does not own the messageQueue and |
| the detachHandle function was failing to nullout m_messageQueue when the resourceHandle |
| gets destroyed. This means that callFunctionOnMainThread would sometimes try to append |
| to a dead messageQueue. |
| |
| No new tests, already covered by: |
| http/tests/security/http-0.9/xhr-blocked.html is flaky |
| |
| * platform/network/mac/WebCoreResourceHandleAsOperationQueueDelegate.mm: |
| (-[WebCoreResourceHandleAsOperationQueueDelegate detachHandle]): |
| |
| 2018-02-16 Antti Koivisto <antti@apple.com> |
| |
| Assert in mixed blend animation |
| https://bugs.webkit.org/show_bug.cgi?id=182887 |
| <rdar://problem/37598140> |
| |
| Reviewed by Zalan Bujtas. |
| |
| Test: fast/css/calc-mixed-blend-crash.html |
| |
| * platform/CalculationValue.cpp: |
| (WebCore::CalcExpressionBlendLength::CalcExpressionBlendLength): |
| |
| Fix mismatch between the type test and the value used. |
| |
| 2018-02-16 Zalan Bujtas <zalan@apple.com> |
| |
| [RenderTreeBuilder] Move RenderBlock/RenderInline::addChildIgnoringContinuation() to RenderTreeBuilder |
| https://bugs.webkit.org/show_bug.cgi?id=182876 |
| <rdar://problem/37607604> |
| |
| Reviewed by Antti Koivisto. |
| |
| No change in functionality. |
| |
| * rendering/RenderBlock.cpp: |
| (WebCore::RenderBlock::addChildIgnoringContinuation): Deleted. |
| * rendering/RenderBlock.h: |
| * rendering/RenderElement.cpp: |
| (WebCore::RenderElement::addChildIgnoringContinuation): Deleted. |
| * rendering/RenderElement.h: |
| * rendering/RenderInline.cpp: |
| (WebCore::RenderInline::addChildIgnoringContinuation): Deleted. |
| * rendering/RenderInline.h: |
| * rendering/updating/RenderTreeBuilder.cpp: |
| (WebCore::RenderTreeBuilder::insertChildIgnoringContinuation): |
| (WebCore::RenderTreeBuilder::insertChildToRenderBlockIgnoringContinuation): Deleted. |
| (WebCore::RenderTreeBuilder::insertChildToRenderInlineIgnoringContinuation): Deleted. |
| * rendering/updating/RenderTreeBuilder.h: |
| * rendering/updating/RenderTreeBuilderBlock.cpp: |
| (WebCore::RenderTreeBuilder::Block::insertChildToContinuation): |
| * rendering/updating/RenderTreeBuilderInline.cpp: |
| (WebCore::RenderTreeBuilder::Inline::insertChildToContinuation): |
| (WebCore::RenderTreeBuilder::Inline::splitInlines): |
| |
| 2018-02-16 Basuke Suzuki <Basuke.Suzuki@sony.com> |
| |
| [Curl] Unify logic of ResourceHandleCurlDelegate into ResourceHandle |
| https://bugs.webkit.org/show_bug.cgi?id=182578 |
| |
| Reconstruct the classes to match Curl port network layer more similar |
| structure with other ports. Move CurlRequest handling into ResourceHandle |
| and makes CurlResourceHandleDelegate simple life cycle. Also its duty is |
| for most of incoming data and event handling from CurRequest. |
| |
| Reviewed by Alex Christensen. |
| |
| No new tests because there's no new behavior. |
| |
| * platform/Curl.cmake: |
| * platform/network/ResourceHandle.h: |
| * platform/network/ResourceHandleInternal.h: |
| (WebCore::ResourceHandleInternal::ResourceHandleInternal): |
| * platform/network/curl/CurlCacheManager.cpp: |
| (WebCore::CurlCacheManager::didReceiveResponse): |
| * platform/network/curl/CurlDownload.cpp: |
| (WebCore::CurlDownload::~CurlDownload): |
| (WebCore::CurlDownload::createCurlRequest): |
| (WebCore::CurlDownload::curlDidReceiveResponse): |
| (WebCore::CurlDownload::curlDidReceiveBuffer): |
| (WebCore::CurlDownload::curlDidComplete): |
| (WebCore::CurlDownload::curlDidFailWithError): |
| (WebCore::CurlDownload::willSendRequest): |
| * platform/network/curl/CurlDownload.h: |
| * platform/network/curl/CurlRequest.cpp: |
| (WebCore::CurlRequest::CurlRequest): |
| (WebCore::CurlRequest::cancel): |
| (WebCore::CurlRequest::callClient): |
| (WebCore::CurlRequest::willSendData): |
| (WebCore::CurlRequest::didReceiveData): |
| (WebCore::CurlRequest::didReceiveDataFromMultipart): |
| (WebCore::CurlRequest::didCompleteTransfer): |
| (WebCore::CurlRequest::invokeDidReceiveResponse): |
| * platform/network/curl/CurlRequest.h: |
| (WebCore::CurlRequest::create): |
| (WebCore::CurlRequest::invalidateClient): |
| (WebCore::CurlRequest::setClient): Deleted. |
| * platform/network/curl/CurlRequestClient.h: |
| * platform/network/curl/CurlResourceHandleDelegate.cpp: Added. |
| (WebCore::CurlResourceHandleDelegate::CurlResourceHandleDelegate): |
| (WebCore::CurlResourceHandleDelegate::ref): |
| (WebCore::CurlResourceHandleDelegate::deref): |
| (WebCore::CurlResourceHandleDelegate::cancelledOrClientless): |
| (WebCore::CurlResourceHandleDelegate::client const): |
| (WebCore::CurlResourceHandleDelegate::d): |
| (WebCore::CurlResourceHandleDelegate::curlDidSendData): |
| (WebCore::handleCookieHeaders): |
| (WebCore::CurlResourceHandleDelegate::curlDidReceiveResponse): |
| (WebCore::CurlResourceHandleDelegate::curlDidReceiveBuffer): |
| (WebCore::CurlResourceHandleDelegate::curlDidComplete): |
| (WebCore::CurlResourceHandleDelegate::curlDidFailWithError): |
| * platform/network/curl/CurlResourceHandleDelegate.h: Added. |
| (WebCore::CurlResourceHandleDelegate::response const): |
| * platform/network/curl/ResourceHandleCurl.cpp: |
| (WebCore::ResourceHandleInternal::~ResourceHandleInternal): |
| (WebCore::ResourceHandle::start): |
| (WebCore::ResourceHandle::cancel): |
| (WebCore::ResourceHandle::cancelledOrClientless): |
| (WebCore::ResourceHandle::createCurlRequest): |
| (WebCore::ResourceHandle::delegate): |
| (WebCore::ResourceHandle::platformSetDefersLoading): |
| (WebCore::ResourceHandle::didReceiveAuthenticationChallenge): |
| (WebCore::ResourceHandle::receivedCredential): |
| (WebCore::ResourceHandle::receivedRequestToContinueWithoutCredential): |
| (WebCore::ResourceHandle::getCredential): |
| (WebCore::ResourceHandle::restartRequestWithCredential): |
| (WebCore::ResourceHandle::platformLoadResourceSynchronously): |
| (WebCore::ResourceHandle::platformContinueSynchronousDidReceiveResponse): |
| (WebCore::ResourceHandle::continueAfterDidReceiveResponse): |
| (WebCore::ResourceHandle::shouldRedirectAsGET): |
| (WebCore::ResourceHandle::willSendRequest): |
| (WebCore::ResourceHandle::continueAfterWillSendRequest): |
| (WebCore::ResourceHandle::handleDataURL): |
| * platform/network/curl/ResourceHandleCurlDelegate.cpp: Removed. |
| * platform/network/curl/ResourceHandleCurlDelegate.h: Removed. |
| |
| 2018-02-16 Youenn Fablet <youenn@apple.com> |
| |
| Use ResourceLoader to load appcache manifest |
| https://bugs.webkit.org/show_bug.cgi?id=182861 |
| |
| Reviewed by Alex Christensen. |
| |
| Covered by updated tests. |
| |
| Add ApplicationCacheResourceLoader to load an ApplicationCacheResource from a ResourceLoader. |
| Make use of it to load the app cache manifest. |
| Future work should load entries using the same loader. |
| |
| Remove manifest handle. |
| Ensure that DocumentLoader does not register the manifest resource loader as its lifetime |
| is handled by its ApplicationCacheGroup. |
| |
| Add a ResourceLoader option to bypass the application cache. |
| Use it for manifest loading. |
| |
| * Sources.txt: |
| * WebCore.xcodeproj/project.pbxproj: |
| * loader/DocumentLoader.cpp: |
| (WebCore::DocumentLoader::addSubresourceLoader): |
| * loader/ResourceLoaderOptions.h: |
| * loader/appcache/ApplicationCacheGroup.cpp: |
| (WebCore::ApplicationCacheGroup::stopLoading): |
| (WebCore::ApplicationCacheGroup::update): |
| (WebCore::ApplicationCacheGroup::createRequest): |
| (WebCore::ApplicationCacheGroup::didReceiveResponseAsync): |
| (WebCore::ApplicationCacheGroup::didReceiveData): |
| (WebCore::ApplicationCacheGroup::didFinishLoading): |
| (WebCore::ApplicationCacheGroup::didFail): |
| (WebCore::ApplicationCacheGroup::didFinishLoadingManifest): |
| (WebCore::ApplicationCacheGroup::checkIfLoadIsComplete): |
| * loader/appcache/ApplicationCacheGroup.h: |
| * loader/appcache/ApplicationCacheHost.cpp: |
| (WebCore::ApplicationCacheHost::maybeLoadResource): |
| (WebCore::ApplicationCacheHost::maybeLoadFallbackForRedirect): |
| (WebCore::ApplicationCacheHost::maybeLoadFallbackForResponse): |
| (WebCore::ApplicationCacheHost::maybeLoadFallbackForError): |
| * loader/appcache/ApplicationCacheResourceLoader.cpp: Added. |
| * loader/appcache/ApplicationCacheResourceLoader.h: Added. |
| |
| 2018-02-16 Chris Dumez <cdumez@apple.com> |
| |
| Crash under WebCore::EventTarget::fireEventListeners |
| https://bugs.webkit.org/show_bug.cgi?id=182880 |
| <rdar://problem/20788804> |
| |
| Reviewed by Youenn Fablet. |
| |
| Make sure the 'ended' event does not get dispatched on a |
| AudioScheduledSourceNode after ActiveDOMObjects have been stopped. |
| |
| Test: webaudio/audiobuffersource-ended-detached-frame.html |
| |
| * Modules/webaudio/AudioScheduledSourceNode.cpp: |
| (WebCore::AudioScheduledSourceNode::finish): |
| |
| 2018-02-16 Jiewen Tan <jiewen_tan@apple.com> |
| |
| [WebAuthN] Implement PublicKeyCredential.isUserVerifyingPlatformAuthenticatorAvailable() |
| https://bugs.webkit.org/show_bug.cgi?id=182771 |
| <rdar://problem/36459988> |
| |
| Reviewed by Brent Fulgham. |
| |
| This patch implements PublicKeyCredential.isUserVerifyingPlatformAuthenticatorAvailable() |
| per https://www.w3.org/TR/webauthn/#isUserVerifyingPlatformAuthenticatorAvailable with some |
| limitations. |
| |
| In addition, it changes DeferredPromise to DOMPromiseDeferred<> for all CredentialsManagement |
| and WebAuthN API. |
| |
| Test: http/wpt/webauthn/public-key-is-user-verifying-platform-authenticator-available.html |
| |
| * Modules/credentialmanagement/CredentialsContainer.cpp: |
| (WebCore::CredentialsContainer::get): |
| (WebCore::CredentialsContainer::store): |
| (WebCore::CredentialsContainer::isCreate): |
| (WebCore::CredentialsContainer::preventSilentAccess const): |
| * Modules/credentialmanagement/CredentialsContainer.h: |
| * Modules/credentialmanagement/CredentialsMessenger.cpp: |
| (WebCore::CredentialsMessenger::addCreationCompletionHandler): |
| Remove a redundant assertion. |
| (WebCore::CredentialsMessenger::addRequestCompletionHandler): |
| Remove a redundant assertion. |
| (WebCore::CredentialsMessenger::addQueryCompletionHandler): |
| (WebCore::CredentialsMessenger::takeQueryCompletionHandler): |
| * Modules/credentialmanagement/CredentialsMessenger.h: |
| * Modules/webauthn/AuthenticatorManager.cpp: |
| (WebCore::AuthenticatorManagerInternal::initTimeoutTimer): |
| (WebCore::AuthenticatorManager::create const): |
| (WebCore::AuthenticatorManager::discoverFromExternalSource const): |
| (WebCore::AuthenticatorManager::isUserVerifyingPlatformAuthenticatorAvailable const): |
| * Modules/webauthn/AuthenticatorManager.h: |
| * Modules/webauthn/PublicKeyCredential.cpp: |
| (WebCore::PublicKeyCredential::isUserVerifyingPlatformAuthenticatorAvailable): |
| * Modules/webauthn/PublicKeyCredential.h: |
| * testing/MockCredentialsMessenger.cpp: |
| (WebCore::MockCredentialsMessenger::isUserVerifyingPlatformAuthenticatorAvailable): |
| (WebCore::MockCredentialsMessenger::isUserVerifyingPlatformAuthenticatorAvailableReply): |
| * testing/MockCredentialsMessenger.h: |
| * testing/MockCredentialsMessenger.idl: |
| |
| 2018-02-16 Tim Horton <timothy_horton@apple.com> |
| |
| Stop using EXCLUDED_SOURCE_FILE_NAMES for touch and gesture files in WebCore |
| https://bugs.webkit.org/show_bug.cgi?id=182866 |
| |
| Reviewed by Daniel Bates. |
| |
| * Configurations/WebCore.xcconfig: |
| These generated files already have ENABLE() flags around them, |
| so there's no reason to exclude them explicitly. |
| |
| 2018-02-16 Chris Dumez <cdumez@apple.com> |
| |
| Unreviewed, fix iOS build after r228562. |
| |
| * workers/service/server/RegistrationDatabase.cpp: |
| (WebCore::RegistrationDatabase::openSQLiteDatabase): |
| |
| 2018-02-16 Zalan Bujtas <zalan@apple.com> |
| |
| [RenderTreeBuilder] Move RenderElement::addChild() to RenderTreeBuilder |
| https://bugs.webkit.org/show_bug.cgi?id=182878 |
| <rdar://problem/37608349> |
| |
| Reviewed by Antti Koivisto. |
| |
| This patch removes the last addChild() related mutation logic from the renderers. |
| |
| No change in functionality. |
| |
| * rendering/RenderElement.cpp: |
| (WebCore::RenderElement::didInsertChild): |
| (WebCore::RenderElement::addChild): Deleted. |
| * rendering/RenderElement.h: |
| (WebCore::RenderElement::isChildAllowed const): |
| * rendering/updating/RenderTreeBuilder.cpp: |
| (WebCore::RenderTreeBuilder::insertChild): |
| (WebCore::RenderTreeBuilder::insertChildToRenderElement): |
| * rendering/updating/RenderTreeBuilder.h: |
| * rendering/updating/RenderTreeBuilderBlock.cpp: |
| (WebCore::RenderTreeBuilder::Block::insertChildIgnoringContinuation): |
| * rendering/updating/RenderTreeBuilderInline.cpp: |
| (WebCore::RenderTreeBuilder::Inline::insertChildIgnoringContinuation): |
| * rendering/updating/RenderTreeBuilderSVG.cpp: |
| (WebCore::RenderTreeBuilder::SVG::insertChild): |
| * rendering/updating/RenderTreeBuilderTable.cpp: |
| (WebCore::RenderTreeBuilder::Table::insertChild): |
| |
| 2018-02-16 Matt Lewis <jlewis3@apple.com> |
| |
| Unreviewed, rolling out r228546. |
| |
| This caused a consistent crash on all macOS WK2 platforms. |
| |
| Reverted changeset: |
| |
| "Web Inspector: get rid of remaining uses of OptOutput<T>" |
| https://bugs.webkit.org/show_bug.cgi?id=180607 |
| https://trac.webkit.org/changeset/228546 |
| |
| 2018-02-16 Youenn Fablet <youenn@apple.com> |
| |
| Log the error message when failing to open the database |
| https://bugs.webkit.org/show_bug.cgi?id=182795 |
| <rdar://problem/37592399> |
| |
| Unreviewed. |
| Fixing iOS simulator debug build. |
| |
| * workers/service/server/RegistrationDatabase.cpp: |
| (WebCore::RegistrationDatabase::openSQLiteDatabase): |
| |
| 2018-02-16 Fujii Hironori <Hironori.Fujii@sony.com> |
| |
| IndexedDB: Several test crash in when destroying a IDBKeyData |
| https://bugs.webkit.org/show_bug.cgi?id=167576 |
| |
| Reviewed by Michael Catanzaro. |
| |
| IDBKeyDataHashTraits::constructDeletedValue is using operator= to |
| assign deletedValue. But, the value is destructed just before |
| calling constructDeletedValue. You can't use operator= for a |
| destructed value. |
| |
| No new tests (Covered by existing tests). |
| |
| * Modules/indexeddb/IDBKeyData.h: |
| (WebCore::IDBKeyDataHashTraits::constructDeletedValue): |
| Construct null value before assigning deletedValue. |
| |
| 2018-02-16 Zalan Bujtas <zalan@apple.com> |
| |
| [RenderTreeBuilder] Move RenderBlock/RenderBlockFlow::addChild() to RenderTreeBuilder |
| https://bugs.webkit.org/show_bug.cgi?id=182862 |
| <rdar://problem/37595464> |
| |
| Reviewed by Antti Koivisto. |
| |
| No change in functionality. |
| |
| * rendering/RenderBlock.cpp: |
| (WebCore::RenderBlock::addChild): Deleted. |
| * rendering/RenderBlock.h: |
| * rendering/RenderBlockFlow.cpp: |
| (WebCore::RenderBlockFlow::addChild): Deleted. |
| * rendering/RenderBlockFlow.h: |
| * rendering/updating/RenderTreeBuilder.cpp: |
| (WebCore::RenderTreeBuilder::insertChild): |
| (WebCore::RenderTreeBuilder::insertChildToRenderBlock): Deleted. |
| (WebCore::RenderTreeBuilder::insertChildToRenderBlockFlow): Deleted. |
| * rendering/updating/RenderTreeBuilder.h: |
| * rendering/updating/RenderTreeBuilderBlockFlow.cpp: |
| (WebCore::RenderTreeBuilder::BlockFlow::insertChild): |
| * rendering/updating/RenderTreeBuilderFormControls.cpp: |
| (WebCore::RenderTreeBuilder::FormControls::findOrCreateParentForChild): |
| * rendering/updating/RenderTreeBuilderMathML.cpp: |
| (WebCore::RenderTreeBuilder::MathML::makeFences): |
| (WebCore::RenderTreeBuilder::MathML::insertChild): |
| * rendering/updating/RenderTreeBuilderMultiColumn.cpp: |
| (WebCore::RenderTreeBuilder::MultiColumn::createFragmentedFlow): |
| (WebCore::RenderTreeBuilder::MultiColumn::processPossibleSpannerDescendant): |
| * rendering/updating/RenderTreeBuilderRuby.cpp: |
| (WebCore::RenderTreeBuilder::Ruby::insertChild): |
| (WebCore::RenderTreeBuilder::Ruby::findOrCreateParentForChild): |
| (WebCore::RenderTreeBuilder::Ruby::rubyBaseSafe): |
| * rendering/updating/RenderTreeBuilderSVG.cpp: |
| (WebCore::RenderTreeBuilder::SVG::insertChild): |
| |
| 2018-02-16 Wenson Hsieh <wenson_hsieh@apple.com> |
| |
| [Extra zoom mode] Add basic support for <input type='date'> using date picker UI |
| https://bugs.webkit.org/show_bug.cgi?id=182847 |
| <rdar://problem/35143111> |
| |
| Reviewed by Tim Horton. |
| |
| Add new localized strings for "month", "day" and "year" as they appear in the date picker. |
| |
| * English.lproj/Localizable.strings: |
| * platform/LocalizedStrings.cpp: |
| (WebCore::textInputModeWriteButtonTitle): |
| (WebCore::textInputModeSpeechButtonTitle): |
| (WebCore::datePickerDayLabelTitle): |
| (WebCore::datePickerMonthLabelTitle): |
| (WebCore::datePickerYearLabelTitle): |
| (WebCore::textInputModeWriteButton): Deleted. |
| (WebCore::textInputModeSpeechButton): Deleted. |
| * platform/LocalizedStrings.h: |
| |
| 2018-02-16 Zan Dobersek <zdobersek@igalia.com> |
| |
| HarfBuzzFace should operate with a FontPlatformData reference |
| https://bugs.webkit.org/show_bug.cgi?id=182863 |
| |
| Reviewed by Carlos Garcia Campos. |
| |
| Instead of keeping a never-null pointer to FontPlatformData, |
| HarfBuzzFace should operate with a FontPlatformData reference. |
| |
| * platform/graphics/freetype/FontPlatformDataFreeType.cpp: |
| (WebCore::FontPlatformData::harfBuzzFace const): |
| * platform/graphics/harfbuzz/HarfBuzzFace.cpp: |
| (WebCore::HarfBuzzFace::HarfBuzzFace): |
| * platform/graphics/harfbuzz/HarfBuzzFace.h: |
| * platform/graphics/harfbuzz/HarfBuzzFaceCairo.cpp: |
| (WebCore::HarfBuzzFace::createFace): |
| (WebCore::HarfBuzzFace::createFont): |
| |
| 2018-02-15 Zalan Bujtas <zalan@apple.com> |
| |
| [RenderTreeBuilder] parent.Render*::addChild() cleanup |
| https://bugs.webkit.org/show_bug.cgi?id=182842 |
| <rdar://problem/37585524> |
| |
| Reviewed by Antti Koivisto. |
| |
| No change in functionality. |
| |
| * rendering/updating/RenderTreeBuilderBlock.cpp: |
| (WebCore::RenderTreeBuilder::Block::insertChildIgnoringContinuation): |
| * rendering/updating/RenderTreeBuilderFormControls.cpp: |
| (WebCore::RenderTreeBuilder::FormControls::createInnerRendererIfNeeded): |
| * rendering/updating/RenderTreeBuilderInline.cpp: |
| (WebCore::RenderTreeBuilder::Inline::insertChildIgnoringContinuation): |
| * rendering/updating/RenderTreeBuilderMathML.cpp: |
| (WebCore::RenderTreeBuilder::MathML::makeFences): |
| (WebCore::RenderTreeBuilder::MathML::insertChild): |
| * rendering/updating/RenderTreeBuilderSVG.cpp: |
| (WebCore::RenderTreeBuilder::SVG::insertChild): |
| * rendering/updating/RenderTreeBuilderTable.cpp: |
| (WebCore::RenderTreeBuilder::Table::insertChild): |
| |
| 2018-02-15 Megan Gardner <megan_gardner@apple.com> |
| |
| Support scrolling for non-editable web-selection and start autoscroll when near screen edges |
| https://bugs.webkit.org/show_bug.cgi?id=182815 |
| |
| Reviewed by Tim Horton. |
| |
| Adjust the position we are autoscrolling to so that when we are close to an edge, we will start autoscrolling |
| while we are still inside the view. Autoscrolling still happens when you drag past the edge of a view. |
| |
| No new tests (This is difficult to test in this state, but when we switch assistants, test will also be added). |
| |
| * page/EventHandler.h: |
| * page/ios/EventHandlerIOS.mm: |
| (WebCore::EventHandler::startSelectionAutoscroll): |
| (WebCore::EventHandler::cancelSelectionAutoscroll): |
| (WebCore::autoscrollAdjustmentFactorForScreenBoundaries): |
| (WebCore::EventHandler::targetPositionInWindowForSelectionAutoscroll const): |
| (WebCore::EventHandler::startTextAutoscroll): Deleted. |
| (WebCore::EventHandler::cancelTextAutoscroll): Deleted. |
| |
| 2018-02-15 Youenn Fablet <youenn@apple.com> |
| |
| Log the error message when failing to open the database |
| https://bugs.webkit.org/show_bug.cgi?id=182795 |
| |
| Reviewed by Chris Dumez. |
| |
| No change of behavior. |
| Print the error message as it does not contain any user private information. |
| |
| * workers/service/server/RegistrationDatabase.cpp: |
| (WebCore::RegistrationDatabase::openSQLiteDatabase): |
| |
| 2018-02-15 Zalan Bujtas <zalan@apple.com> |
| |
| [RenderTreeBuilder] Move RenderMenuList::addChild() to RenderTreeBuilder |
| https://bugs.webkit.org/show_bug.cgi?id=182840 |
| <rdar://problem/37583638> |
| |
| Reviewed by Antti Koivisto. |
| |
| No change in functionality. |
| |
| * rendering/RenderMenuList.cpp: |
| (RenderMenuList::didInsertChild): |
| (RenderMenuList::addChild): Deleted. |
| * rendering/RenderMenuList.h: |
| * rendering/updating/RenderTreeBuilder.cpp: |
| (WebCore::RenderTreeBuilder::insertChild): |
| * rendering/updating/RenderTreeBuilderFormControls.cpp: |
| (WebCore::RenderTreeBuilder::FormControls::findOrCreateParentForChild): |
| (WebCore::RenderTreeBuilder::FormControls::insertChild): |
| (WebCore::RenderTreeBuilder::FormControls::createInnerRendererIfNeeded): Deleted. |
| * rendering/updating/RenderTreeBuilderFormControls.h: |
| |
| 2018-02-15 Darin Adler <darin@apple.com> |
| |
| Web Inspector: get rid of remaining uses of OptOutput<T> |
| https://bugs.webkit.org/show_bug.cgi?id=180607 |
| |
| Reviewed by Brian Burg. |
| |
| * inspector/InspectorStyleSheet.cpp: |
| (WebCore::buildSourceRangeObject): Take a const Vector& instead of a Vector*. |
| (WebCore::InspectorStyle::buildObjectForStyle const): Pass lineEndings() instead |
| of lineEndings().get(). |
| (WebCore::InspectorStyle::styleWithProperties const): Ditto. |
| (WebCore::InspectorStyleSheet::buildObjectForSelectorList): Ditto. |
| (WebCore::InspectorStyleSheet::lineEndings const): Return a Vector instead of |
| a std::unique_ptr<Vector>. |
| (WebCore::InspectorStyleSheetForInlineStyle::lineEndings const): Ditto. |
| * inspector/InspectorStyleSheet.h: Updated for the above. |
| |
| * inspector/agents/InspectorCSSAgent.h: Removed some bogus const. |
| * inspector/agents/InspectorCanvasAgent.cpp: Ditto. |
| * inspector/agents/InspectorCanvasAgent.h: Ditto. |
| |
| * inspector/agents/InspectorDOMDebuggerAgent.cpp: Improved type of global strings |
| so we don't waste space with a pointer to the string. |
| (WebCore::InspectorDOMDebuggerAgent::setEventListenerBreakpoint): Removed |
| explicit creation of String, which was wasteful and unnecessary. |
| (WebCore::InspectorDOMDebuggerAgent::setInstrumentationBreakpoint): Ditto. |
| (WebCore::InspectorDOMDebuggerAgent::removeEventListenerBreakpoint): Ditto. |
| (WebCore::InspectorDOMDebuggerAgent::removeInstrumentationBreakpoint): Ditto. |
| (WebCore::InspectorDOMDebuggerAgent::setXHRBreakpoint): Removed bogus const. |
| |
| * inspector/agents/InspectorDOMDebuggerAgent.h: Removed bogus const and use |
| final instead of override. |
| * inspector/agents/InspectorPageAgent.cpp: Ditto. |
| * inspector/agents/InspectorPageAgent.h: Ditto. |
| |
| 2018-02-15 Chris Dumez <cdumez@apple.com> |
| |
| Flaky Test: imported/w3c/web-platform-tests/fetch/api/redirect/redirect-to-dataurl-worker.html |
| https://bugs.webkit.org/show_bug.cgi?id=182270 |
| <rdar://problem/36904314> |
| |
| Reviewed by Antti Koivisto. |
| |
| No new tests, already covered by existing tests that crash flakily on the bots. |
| |
| * loader/ThreadableLoaderClientWrapper.h: |
| (WebCore::ThreadableLoaderClientWrapper::ThreadableLoaderClientWrapper): |
| isolate copy the initiator string as this object can be destroyed on a different thread. This was |
| causing the test to flakily crash as well when destroying ThreadLocalData. |
| |
| * platform/network/mac/WebCoreResourceHandleAsOperationQueueDelegate.h: |
| * platform/network/mac/WebCoreResourceHandleAsOperationQueueDelegate.mm: |
| (scheduledWithCustomRunLoopMode): |
| (-[WebCoreResourceHandleAsOperationQueueDelegate callFunctionOnMainThread:]): |
| Fix thread safety issue in callFunctionOnMainThread. This function is called from a background thread |
| to get to the main thread. However, it relied on m_handle which would get nullified on the main thread |
| by detachHandle when the ResourceHandle is destroyed. Fix the issue by not relying on m_handle anymore. |
| |
| (-[WebCoreResourceHandleAsOperationQueueDelegate initWithHandle:messageQueue:]): |
| (-[WebCoreResourceHandleAsOperationQueueDelegate connection:willSendRequest:redirectResponse:]): |
| (-[WebCoreResourceHandleAsOperationQueueDelegate connection:canAuthenticateAgainstProtectionSpace:]): |
| (-[WebCoreResourceHandleAsOperationQueueDelegate connection:didReceiveResponse:]): |
| (-[WebCoreResourceHandleAsOperationQueueDelegate connection:willCacheResponse:]): |
| - Go back to using autorelease() instead of get() for the returned objects to match the code pre-r224522. |
| - Dispatch the protectedSelf variables that were added in r227073 to the main thread to make sure we do |
| not get destroyed on the background thread when protectedSelf is the last strong reference to self. |
| Destroying the WebCoreResourceHandleAsOperationQueueDelegate on the background safe is unsafe due to |
| its m_messageQueue data member which contains lambdas that may capture anything. |
| - Add a Lock to protect against detachHandle getting called on the main thread and nulling out |
| m_handle / m_requestResult / m_cachedResponseResult while the background thread may be accessing |
| them. |
| |
| 2018-02-15 Zalan Bujtas <zalan@apple.com> |
| |
| [RenderTreeBuilder] Move RenderTableRow::addChild() to RenderTreeBuilder |
| https://bugs.webkit.org/show_bug.cgi?id=182838 |
| <rdar://problem/37580762> |
| |
| Reviewed by Antti Koivisto. |
| |
| No change in functionality. |
| |
| * rendering/RenderTableRow.cpp: |
| (WebCore::RenderTableRow::didInsertTableCell): |
| (WebCore::RenderTableRow::addChild): Deleted. |
| * rendering/RenderTableRow.h: |
| * rendering/updating/RenderTreeBuilder.cpp: |
| (WebCore::RenderTreeBuilder::insertChild): |
| (WebCore::RenderTreeBuilder::insertChildToRenderTableRow): Deleted. |
| * rendering/updating/RenderTreeBuilder.h: |
| * rendering/updating/RenderTreeBuilderTable.cpp: |
| (WebCore::RenderTreeBuilder::Table::insertChild): |
| |
| 2018-02-15 Antoine Quint <graouts@apple.com> |
| |
| [Web Animations] Ensure that changing the timing model updates styles synchronously |
| https://bugs.webkit.org/show_bug.cgi?id=182836 |
| |
| Reviewed by Dean Jackson. |
| |
| We did not invalidate the timing model when properties of an effect's timing object changed |
| and even when we did invalidate the timing model, we did not update styles on effect targets |
| synchronously, only scheduling such updates for the next animation frame. |
| |
| In this patch we expose the effect on the timing object such that changing timing properties |
| can notify the effect of a change in the timing model, which can then be forwarded to the |
| animation (which already informs its timeline, if any). |
| |
| Additionally, when an animation's timing model has changed, we now invalidate the effect, which |
| will update styles synchronously. |
| |
| This produces a number of progressions in WPT tests. |
| |
| * animation/AnimationEffectReadOnly.cpp: |
| (WebCore::AnimationEffectReadOnly::AnimationEffectReadOnly): Set the timing object's effect upon |
| effect construction. |
| (WebCore::AnimationEffectReadOnly::~AnimationEffectReadOnly): Set the timing object's effect to |
| null upon effect destruction. |
| (WebCore::AnimationEffectReadOnly::timingDidChange): Notify the animation (if any) that its timing |
| model changed following a change in the timing properties. |
| * animation/AnimationEffectReadOnly.h: Add a new virtual invalidate() method that subclasses can |
| override to implement invalidation behavior when the animation finds out its timing model changed. |
| * animation/AnimationEffectTimingReadOnly.cpp: Notify the effect when a property changes such |
| that it may notify its animation of a timing model change. |
| (WebCore::AnimationEffectTimingReadOnly::propertyDidChange): |
| (WebCore::AnimationEffectTimingReadOnly::setIterationStart): |
| (WebCore::AnimationEffectTimingReadOnly::setIterations): |
| (WebCore::AnimationEffectTimingReadOnly::setBindingsDuration): |
| (WebCore::AnimationEffectTimingReadOnly::setEasing): |
| (WebCore::AnimationEffectTimingReadOnly::setDelay): |
| (WebCore::AnimationEffectTimingReadOnly::setEndDelay): |
| (WebCore::AnimationEffectTimingReadOnly::setFill): |
| (WebCore::AnimationEffectTimingReadOnly::setIterationDuration): |
| (WebCore::AnimationEffectTimingReadOnly::setDirection): |
| * animation/AnimationEffectTimingReadOnly.h: |
| (WebCore::AnimationEffectTimingReadOnly::setEffect): |
| (WebCore::AnimationEffectTimingReadOnly::setBindingsDelay): |
| (WebCore::AnimationEffectTimingReadOnly::setBindingsEndDelay): |
| (WebCore::AnimationEffectTimingReadOnly::setDelay): Deleted. |
| (WebCore::AnimationEffectTimingReadOnly::setEndDelay): Deleted. |
| (WebCore::AnimationEffectTimingReadOnly::setFill): Deleted. |
| (WebCore::AnimationEffectTimingReadOnly::setIterationDuration): Deleted. |
| (WebCore::AnimationEffectTimingReadOnly::setDirection): Deleted. |
| * animation/AnimationTimeline.cpp: Rename animationTimingModelDidChange() to timingModelDidChange() |
| to align it with the new WebAnimation::timingModelDidChange() method. |
| (WebCore::AnimationTimeline::addAnimation): |
| (WebCore::AnimationTimeline::removeAnimation): |
| (WebCore::AnimationTimeline::setCurrentTime): |
| * animation/AnimationTimeline.h: |
| (WebCore::AnimationTimeline::timingModelDidChange): |
| (WebCore::AnimationTimeline::animationTimingModelDidChange): Deleted. |
| * animation/DocumentTimeline.cpp: |
| (WebCore::DocumentTimeline::timingModelDidChange): |
| (WebCore::DocumentTimeline::updateAnimations): |
| (WebCore::DocumentTimeline::animationTimingModelDidChange): Deleted. |
| * animation/DocumentTimeline.h: |
| * animation/KeyframeEffectReadOnly.cpp: |
| (WebCore::KeyframeEffectReadOnly::invalidate): Override the invalidate() method to perform a synchronous |
| style update in order to ensure that timing properties are accounted for right as they change. |
| * animation/KeyframeEffectReadOnly.h: |
| * animation/WebAnimation.cpp: |
| (WebCore::WebAnimation::timingModelDidChange): Invalidate the effect and notify the timeline of a timing |
| model change when an animation is notified that its timing model has changed. |
| (WebCore::WebAnimation::setStartTime): |
| * animation/WebAnimation.h: |
| |
| 2018-02-15 Timothy Horton <timothy_horton@apple.com> |
| |
| Fix the build. |
| |
| * platform/ios/KeyEventCodesIOS.h: |
| |
| 2018-02-15 John Wilander <wilander@apple.com> |
| |
| Resource Load Statistics: Make sure WebResourceLoadStatisticsStore::mergeWithDataFromDecoder() can ingest older plist versions and not reset the database |
| https://bugs.webkit.org/show_bug.cgi?id=182812 |
| <rdar://problem/37511406> |
| |
| Reviewed by Brent Fulgham. |
| |
| No new tests. Tested manually between versions of Safari. |
| |
| * loader/ResourceLoadStatistics.cpp: |
| (WebCore::ResourceLoadStatistics::decode): |
| Now only expects these fields for model version 11 or higher: |
| - topFrameUniqueRedirectsTo |
| - topFrameUniqueRedirectsFrom |
| - subresourceUniqueRedirectsFrom |
| - timesAccessedAsFirstPartyDueToUserInteraction |
| - timesAccessedAsFirstPartyDueToStorageAccessAPI |
| * loader/ResourceLoadStatistics.h: |
| |
| 2018-02-15 Tim Horton <timothy_horton@apple.com> |
| |
| Stop using EXCLUDED_SOURCE_FILE_NAMES for actual source files in WebCore |
| https://bugs.webkit.org/show_bug.cgi?id=182822 |
| |
| Reviewed by Dan Bernstein. |
| |
| It's much easier to reason about things if xcconfigs don't apply extra |
| constraints to which source files actually build on a per-platform basis. |
| We should use #ifs instead like we usually do. |
| |
| * Configurations/WebCore.xcconfig: |
| * Modules/geolocation/ios/GeolocationPositionIOS.mm: |
| * accessibility/ios/AccessibilityObjectIOS.mm: |
| * accessibility/mac/AXObjectCacheMac.mm: |
| * accessibility/mac/AccessibilityObjectMac.mm: |
| * accessibility/mac/WebAccessibilityObjectWrapperMac.h: |
| * accessibility/mac/WebAccessibilityObjectWrapperMac.mm: |
| * dom/DataTransferMac.mm: |
| * editing/ios/DictationCommandIOS.cpp: |
| * editing/ios/DictationCommandIOS.h: |
| * editing/ios/EditorIOS.mm: |
| * editing/ios/WebContentReaderIOS.mm: |
| * editing/mac/EditorMac.mm: |
| * editing/mac/WebContentReaderMac.mm: |
| * page/ios/EventHandlerIOS.mm: |
| * page/ios/FrameIOS.mm: |
| * page/mac/EventHandlerMac.mm: |
| * page/scrolling/ios/ScrollingCoordinatorIOS.h: |
| * page/scrolling/ios/ScrollingCoordinatorIOS.mm: |
| * page/scrolling/ios/ScrollingTreeFrameScrollingNodeIOS.mm: |
| * platform/ThreadCheck.h: |
| * platform/audio/ios/AudioDestinationIOS.h: |
| * platform/audio/ios/AudioFileReaderIOS.h: |
| * platform/audio/ios/MediaSessionManagerIOS.h: |
| * platform/graphics/ios/DisplayRefreshMonitorIOS.h: |
| * platform/graphics/ios/DisplayRefreshMonitorIOS.mm: |
| * platform/graphics/ios/FontCacheIOS.mm: |
| * platform/graphics/ios/GraphicsContext3DIOS.h: |
| * platform/graphics/ios/IconIOS.mm: |
| * platform/graphics/mac/ColorMac.h: |
| * platform/graphics/mac/ColorMac.mm: |
| * platform/graphics/mac/DisplayRefreshMonitorMac.cpp: |
| * platform/graphics/mac/DisplayRefreshMonitorMac.h: |
| * platform/graphics/mac/IconMac.mm: |
| * platform/graphics/opengl/GraphicsContext3DOpenGLES.cpp: |
| * platform/ios/CursorIOS.cpp: |
| * platform/ios/DeviceMotionClientIOS.h: |
| * platform/ios/DeviceOrientationClientIOS.h: |
| * platform/ios/EventLoopIOS.mm: |
| * platform/ios/KeyEventCodesIOS.h: |
| * platform/ios/LowPowerModeNotifierIOS.mm: |
| * platform/ios/PasteboardIOS.mm: |
| * platform/ios/PlatformEventFactoryIOS.h: |
| * platform/ios/PlatformEventFactoryIOS.mm: |
| * platform/ios/PlatformPasteboardIOS.mm: |
| * platform/ios/PlatformScreenIOS.mm: |
| * platform/ios/PlatformSpeechSynthesizerIOS.mm: |
| * platform/ios/RemoteCommandListenerIOS.h: |
| * platform/ios/RemoteCommandListenerIOS.mm: |
| * platform/ios/SSLKeyGeneratorIOS.cpp: |
| * platform/ios/ScrollAnimatorIOS.h: |
| * platform/ios/ScrollAnimatorIOS.mm: |
| * platform/ios/ScrollViewIOS.mm: |
| * platform/ios/ScrollbarThemeIOS.h: |
| * platform/ios/ScrollbarThemeIOS.mm: |
| * platform/ios/SystemMemoryIOS.cpp: |
| * platform/ios/ThemeIOS.h: |
| * platform/ios/ThemeIOS.mm: |
| * platform/ios/TileControllerMemoryHandlerIOS.cpp: |
| * platform/ios/TileControllerMemoryHandlerIOS.h: |
| * platform/ios/UserAgentIOS.mm: |
| * platform/ios/ValidationBubbleIOS.mm: |
| * platform/ios/WidgetIOS.mm: |
| * platform/mac/CursorMac.mm: |
| * platform/mac/EventLoopMac.mm: |
| * platform/mac/LocalCurrentGraphicsContext.h: |
| * platform/mac/LocalCurrentGraphicsContext.mm: |
| * platform/mac/NSScrollerImpDetails.h: |
| * platform/mac/NSScrollerImpDetails.mm: |
| * platform/mac/PasteboardMac.mm: |
| * platform/mac/PlatformEventFactoryMac.h: |
| * platform/mac/PlatformEventFactoryMac.mm: |
| * platform/mac/PlatformPasteboardMac.mm: |
| * platform/mac/PlatformScreenMac.mm: |
| * platform/mac/PlatformSpeechSynthesizerMac.mm: |
| * platform/mac/SSLKeyGeneratorMac.mm: |
| * platform/mac/ScrollViewMac.mm: |
| * platform/mac/ScrollbarThemeMac.h: |
| * platform/mac/ScrollbarThemeMac.mm: |
| * platform/mac/ThemeMac.h: |
| * platform/mac/ThemeMac.mm: |
| * platform/mac/ThreadCheck.mm: |
| * platform/mac/UserAgentMac.mm: |
| * platform/mac/WebCoreView.h: |
| * platform/mac/WebCoreView.m: |
| * platform/mac/WidgetMac.mm: |
| * platform/mediastream/ios/CoreAudioCaptureSourceIOS.h: |
| * platform/network/ios/NetworkStateNotifierIOS.mm: |
| * platform/network/ios/WebCoreURLResponseIOS.h: |
| * platform/network/ios/WebCoreURLResponseIOS.mm: |
| * platform/network/mac/NetworkStateNotifierMac.cpp: |
| |
| 2018-02-15 Zalan Bujtas <zalan@apple.com> |
| |
| [RenderTreeBuilder] Move RenderTableSection::addChild() to RenderTreeBuilder |
| https://bugs.webkit.org/show_bug.cgi?id=182835 |
| <rdar://problem/37579191> |
| |
| Reviewed by Antti Koivisto. |
| |
| No change in functionality. |
| |
| * rendering/RenderTableSection.cpp: |
| (WebCore::RenderTableSection::willInsertTableRow): |
| (WebCore::RenderTableSection::addChild): Deleted. |
| * rendering/RenderTableSection.h: |
| * rendering/updating/RenderTreeBuilder.cpp: |
| (WebCore::RenderTreeBuilder::insertChild): Leftover from r228529. |
| (WebCore::RenderTreeBuilder::insertChildToRenderTable): Deleted. Leftover from r228529. |
| (WebCore::RenderTreeBuilder::insertChildToRenderTableSection): Deleted. |
| * rendering/updating/RenderTreeBuilder.h: |
| * rendering/updating/RenderTreeBuilderTable.cpp: |
| (WebCore::RenderTreeBuilder::Table::insertChild): |
| |
| 2018-02-15 Zalan Bujtas <zalan@apple.com> |
| |
| [RenderTreeBuilder] Move RenderTable::addChild() to RenderTreeBuilder |
| https://bugs.webkit.org/show_bug.cgi?id=182832 |
| <rdar://problem/37576362> |
| |
| Reviewed by Antti Koivisto. |
| |
| No change in functionality. |
| |
| * rendering/RenderTable.cpp: |
| (WebCore::RenderTable::willInsertTableColumn): |
| (WebCore::RenderTable::willInsertTableSection): |
| (WebCore::RenderTable::addChild): Deleted. |
| * rendering/RenderTable.h: |
| * rendering/updating/RenderTreeBuilder.cpp: |
| (WebCore::RenderTreeBuilder::insertChild): |
| * rendering/updating/RenderTreeBuilderTable.cpp: |
| (WebCore::RenderTreeBuilder::Table::insertChild): |
| |
| 2018-02-14 Darin Adler <darin@apple.com> |
| |
| Use std::make_unique instead of explicit calls to new and instead of writing create functions |
| https://bugs.webkit.org/show_bug.cgi?id=182821 |
| |
| Reviewed by Anders Carlsson. |
| |
| * loader/LinkLoader.cpp: |
| (WebCore::createLinkPreloadResourceClient): Use std::make_unique insteadof create functions. |
| |
| * loader/LinkPreloadResourceClients.h: Make constructors public, get rid of create functions, |
| make overrides be private and final, get rid of unnecessary public default virtual destructors |
| that the compiler will generate correctly without anything explicit. |
| |
| * platform/encryptedmedia/clearkey/CDMClearKey.cpp: |
| (WebCore::CDMFactoryClearKey::createCDM): Use std::make_unique instead of std::unique_ptr/new. |
| |
| * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm: |
| (WebCore::MediaPlayerPrivateAVFoundationObjC::MediaPlayerPrivateAVFoundationObjC): Use |
| std::make_unique instead of calling a create function. |
| * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm: |
| (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::MediaPlayerPrivateMediaSourceAVFObjC): Ditto. |
| * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm: |
| (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::MediaPlayerPrivateMediaStreamAVFObjC): Ditto. |
| |
| * platform/graphics/avfoundation/objc/VideoFullscreenLayerManager.h: Made the constructor |
| public and got rid of the create function. |
| * platform/graphics/avfoundation/objc/VideoFullscreenLayerManager.mm: |
| (WebCore::VideoFullscreenLayerManager::create): Deleted. |
| |
| * rendering/GridTrackSizingAlgorithm.cpp: |
| (WebCore::GridTrackSizingAlgorithm::computeFlexFactorUnitSize const): |
| Use std::make_unique instead of std::unique_ptr/new. |
| |
| 2018-02-15 Andy Estes <aestes@apple.com> |
| |
| Finish unifying Apple Pay and Payment Request sources |
| https://bugs.webkit.org/show_bug.cgi?id=182831 |
| |
| Reviewed by Keith Miller. |
| |
| * Sources.txt: |
| * SourcesCocoa.txt: |
| * WebCore.xcodeproj/project.pbxproj: |
| |
| 2018-02-15 Zan Dobersek <zdobersek@igalia.com> |
| |
| HarfBuzzFace: rework cache entry reference holding |
| https://bugs.webkit.org/show_bug.cgi?id=182828 |
| |
| Reviewed by Michael Catanzaro. |
| |
| Move the FaceCacheEntry and HarfBuzzFaceCache types into the |
| HarfBuzzFace class as CacheEntry and Cache, respectively. The Cache |
| singleton is also moved there. |
| |
| In the HarfBuzzFace constructor, we now don't increase the CacheEntry |
| reference, but instead just keep a reference to that object through |
| a RefPtr<CacheEntry> object. We don't need to retrieve the hb_face_t |
| object and the glyph cache HashMap in the constructor anymore, we just |
| retrieve them when necessary through that CacheEntry reference. |
| |
| In the destructor, that RefPtr<CacheEntry> object is nulled out before |
| the object in Cache is removed if that's where the final reference is |
| kept. |
| |
| * platform/graphics/harfbuzz/HarfBuzzFace.cpp: |
| (WebCore::HarfBuzzFace::CacheEntry::CacheEntry): |
| (WebCore::HarfBuzzFace::CacheEntry::~CacheEntry): |
| (WebCore::HarfBuzzFace::cache): |
| (WebCore::HarfBuzzFace::HarfBuzzFace): |
| (WebCore::HarfBuzzFace::~HarfBuzzFace): |
| (WebCore::HarfBuzzFace::setScriptForVerticalGlyphSubstitution): |
| (WebCore::FaceCacheEntry::create): Deleted. |
| (WebCore::FaceCacheEntry::~FaceCacheEntry): Deleted. |
| (WebCore::FaceCacheEntry::face): Deleted. |
| (WebCore::FaceCacheEntry::glyphCache): Deleted. |
| (WebCore::FaceCacheEntry::FaceCacheEntry): Deleted. |
| (WebCore::harfBuzzFaceCache): Deleted. |
| * platform/graphics/harfbuzz/HarfBuzzFace.h: |
| (WebCore::HarfBuzzFace::CacheEntry::create): |
| (WebCore::HarfBuzzFace::CacheEntry::face): |
| (WebCore::HarfBuzzFace::CacheEntry::glyphCache): |
| * platform/graphics/harfbuzz/HarfBuzzFaceCairo.cpp: |
| (WebCore::harfBuzzGetGlyph): |
| (WebCore::HarfBuzzFace::createFont): |
| |
| 2018-02-15 Zan Dobersek <zdobersek@igalia.com> |
| |
| FontPlatformData::harfBuzzFace() should return a reference |
| https://bugs.webkit.org/show_bug.cgi?id=182825 |
| |
| Reviewed by Carlos Garcia Campos. |
| |
| Have FontPlatformData::harfBuzzFace() return a reference instead of a |
| pointer, given that the returned HarfBuzzFace object cannot be null. |
| |
| Call-sites of FontPlatformData::harfBuzzFace() are adjusted. |
| OpenTypeMathData constructors are also changed to not rely on |
| preprocessor to correctly position the closing brace. |
| |
| * platform/graphics/FontPlatformData.h: |
| * platform/graphics/freetype/FontPlatformDataFreeType.cpp: |
| (WebCore::FontPlatformData::harfBuzzFace const): |
| * platform/graphics/harfbuzz/ComplexTextControllerHarfBuzz.cpp: |
| (WebCore::ComplexTextController::collectComplexTextRunsForCharacters): |
| * platform/graphics/opentype/OpenTypeMathData.cpp: |
| (WebCore::OpenTypeMathData::OpenTypeMathData): |
| |
| 2018-02-15 Jiewen Tan <jiewen_tan@apple.com> |
| |
| [WebAuthN] Revisit the whole async model of task dispatching, timeout and aborting |
| https://bugs.webkit.org/show_bug.cgi?id=181946 |
| <rdar://problem/37258262> |
| |
| Reviewed by Chris Dumez. |
| |
| This patch changes the original async model from a work queue to IPC between WebProcess |
| and UIProcess. Since all authenticator operations must be handled in the UIProcess due |
| to sandboxing, this message passing IPC async model then surpasses the original multi |
| threading model. To cooperate that, a CredentialsMessenger class is then created and |
| all task dispatching code is moved thre. |
| |
| As an improvement over existing code, static functions from PublicKeyCredential are |
| moved to AuthenticatorManager. AuthenticatorManager is made as a singleton such that |
| when static functions are called, they could reach the CredentialsMessenger to interact |
| with UIProccess. CredentialsMessenger and AuthenticatorManager are separated so later |
| on when other Credential types are created, they can reuse the same IPC messenger. |
| |
| What's more, a mock CredentialsMessenger is then created to mock behaviors of UIProcess |
| for testing purpose. |
| |
| Covered by existing tests. |
| |
| * DerivedSources.make: |
| * Modules/credentialmanagement/BasicCredential.h: |
| * Modules/credentialmanagement/CredentialsContainer.cpp: |
| (WebCore::CredentialsContainer::CredentialsContainer): |
| (WebCore::CredentialsContainer::doesHaveSameOriginAsItsAncestors): |
| (WebCore::CredentialsContainer::get): |
| (WebCore::CredentialsContainer::isCreate): |
| (WebCore::CredentialsContainer::PendingPromise::PendingPromise): Deleted. |
| (WebCore::CredentialsContainer::dispatchTask): Deleted. |
| * Modules/credentialmanagement/CredentialsContainer.h: |
| (WebCore::CredentialsContainer::PendingPromise::create): Deleted. |
| * Modules/credentialmanagement/CredentialsMessenger.cpp: Added. |
| (WebCore::CredentialsMessenger::exceptionReply): |
| (WebCore::CredentialsMessenger::addCreationCompletionHandler): |
| (WebCore::CredentialsMessenger::takeCreationCompletionHandler): |
| (WebCore::CredentialsMessenger::addRequestCompletionHandler): |
| (WebCore::CredentialsMessenger::takeRequestCompletionHandler): |
| (WebCore::CredentialsMessenger::addQueryCompletionHandler): |
| (WebCore::CredentialsMessenger::takeQueryCompletionHandler): |
| (WebCore::getIdFromAttestationObject): |
| * Modules/credentialmanagement/CredentialsMessenger.h: Added. |
| (WebCore::CreationReturnBundle::CreationReturnBundle): |
| (WebCore::AssertionReturnBundle::AssertionReturnBundle): |
| (WebCore::CredentialsMessenger::weakPtrFactory const): |
| * Modules/webauthn/Authenticator.cpp: Removed. |
| * Modules/webauthn/Authenticator.h: Removed. |
| * Modules/webauthn/AuthenticatorManager.cpp: Copied from Source/WebCore/Modules/webauthn/PublicKeyCredential.cpp. |
| (WebCore::AuthenticatorManagerInternal::produceClientDataJson): |
| (WebCore::AuthenticatorManagerInternal::produceClientDataJsonHash): |
| (WebCore::AuthenticatorManagerInternal::initTimer): |
| (WebCore::AuthenticatorManagerInternal::didTimerFire): |
| (WebCore::AuthenticatorManager::singleton): |
| (WebCore::AuthenticatorManager::setMessenger): |
| (WebCore::AuthenticatorManager::create const): |
| (WebCore::AuthenticatorManager::discoverFromExternalSource const): |
| * Modules/webauthn/AuthenticatorManager.h: Copied from Source/WebCore/Modules/webauthn/AuthenticatorResponse.h. |
| * Modules/webauthn/AuthenticatorResponse.h: |
| * Modules/webauthn/PublicKeyCredential.cpp: |
| (WebCore::PublicKeyCredentialInternal::produceClientDataJson): Deleted. |
| (WebCore::PublicKeyCredentialInternal::produceClientDataJsonHash): Deleted. |
| (WebCore::PublicKeyCredentialInternal::getIdFromAttestationObject): Deleted. |
| (WebCore::PublicKeyCredential::collectFromCredentialStore): Deleted. |
| (WebCore::PublicKeyCredential::discoverFromExternalSource): Deleted. |
| (WebCore::PublicKeyCredential::store): Deleted. |
| (WebCore::PublicKeyCredential::create): Deleted. |
| (WebCore::PublicKeyCredential::rawId const): Deleted. |
| (WebCore::PublicKeyCredential::response const): Deleted. |
| * Modules/webauthn/PublicKeyCredential.h: |
| * Sources.txt: |
| * WebCore.xcodeproj/project.pbxproj: |
| * testing/Internals.cpp: |
| (WebCore::Internals::Internals): |
| (WebCore::Internals::mockCredentialsMessenger const): |
| * testing/Internals.h: |
| * testing/Internals.idl: |
| * testing/MockCredentialsMessenger.cpp: Added. |
| (WebCore::MockCredentialsMessenger::MockCredentialsMessenger): |
| (WebCore::MockCredentialsMessenger::~MockCredentialsMessenger): |
| (WebCore::MockCredentialsMessenger::setAttestationObject): |
| (WebCore::MockCredentialsMessenger::setAssertionReturnBundle): |
| (WebCore::MockCredentialsMessenger::makeCredential): |
| (WebCore::MockCredentialsMessenger::getAssertion): |
| (WebCore::MockCredentialsMessenger::makeCredentialReply): |
| (WebCore::MockCredentialsMessenger::getAssertionReply): |
| * testing/MockCredentialsMessenger.h: Copied from Source/WebCore/Modules/webauthn/AuthenticatorResponse.h. |
| * testing/MockCredentialsMessenger.idl: Copied from Source/WebCore/Modules/webauthn/AuthenticatorResponse.h. |
| |
| 2018-02-15 Zalan Bujtas <zalan@apple.com> |
| |
| [RenderTreeBuilder] Move RenderInline/RenderGrid::addChild() to RenderTreeBuilder |
| https://bugs.webkit.org/show_bug.cgi?id=182819 |
| <rdar://problem/37558187> |
| |
| Reviewed by Antti Koivisto. |
| |
| No change in functionality. |
| |
| * rendering/RenderGrid.cpp: |
| (WebCore::RenderGrid::addChild): Deleted. |
| * rendering/RenderGrid.h: |
| * rendering/RenderInline.cpp: |
| (WebCore::RenderInline::addChild): Deleted. |
| * rendering/RenderInline.h: |
| * rendering/updating/RenderTreeBuilder.cpp: |
| (WebCore::RenderTreeBuilder::insertChild): |
| (WebCore::RenderTreeBuilder::takeChild): Deleted. |
| * rendering/updating/RenderTreeBuilder.h: |
| * rendering/updating/RenderTreeBuilderRuby.cpp: |
| (WebCore::RenderTreeBuilder::Ruby::findOrCreateParentForChild): |
| * rendering/updating/RenderTreeBuilderSVG.cpp: |
| (WebCore::RenderTreeBuilder::SVG::insertChild): |
| |
| 2018-02-15 Antoine Quint <graouts@apple.com> |
| |
| [Modern Media Controls] REGRESSION: Inline media controls are not disabled while in fullscreen on iOS |
| https://bugs.webkit.org/show_bug.cgi?id=182830 |
| <rdar://problem/37537909> |
| |
| Reviewed by Eric Carlson. |
| |
| The test media/modern-media-controls/media-controller/ios/media-controller-stop-updates-in-fullscreen.html |
| regressed when fixing webkit.org/b/182668 since we now started only caring about the presence of the "controls" |
| attribute to identify that WebKit media controls should be available. |
| |
| We now have a dedicated _shouldControlsBeAvailable() method which more clearly establishes the conditions under |
| which controls should be available and correctly disables them while in fullscreen on iOS, regardless of the |
| "controls" attribute value. |
| |
| * Modules/modern-media-controls/media/media-controller.js: |
| (MediaController.prototype._shouldControlsBeAvailable): |
| (MediaController.prototype._updateControlsAvailability): |
| |
| 2018-02-15 Matt Lewis <jlewis3@apple.com> |
| |
| Unreviewed, rolling out r228495. |
| |
| This caused mulitple perf tests to fail consistently. |
| |
| Reverted changeset: |
| |
| "Resource Load Statistics: Make sure |
| WebResourceLoadStatisticsStore::mergeWithDataFromDecoder() can |
| ingest older plist versions and not reset the database" |
| https://bugs.webkit.org/show_bug.cgi?id=182812 |
| https://trac.webkit.org/changeset/228495 |
| |
| 2018-02-15 Zan Dobersek <zdobersek@igalia.com> |
| |
| Clean up HarfBuzzFaceCairo |
| https://bugs.webkit.org/show_bug.cgi?id=182824 |
| |
| Reviewed by Carlos Garcia Campos. |
| |
| Clean up Cairo-specific bits of HarfBuzzFace implementation. |
| |
| HarfBuzzFontData is simplified, removing the constructor and turning the |
| cairo_scaled_font_t member into a RefPtr<>, tying the Cairo object's |
| lifetime to the lifetime of the HarfBuzzFontData instance. |
| |
| HarfBuzz font callbacks have the HarfBuzzFontData casting cleaned up, |
| casting the user data pointer straight into a HarfBuzzFontData reference |
| that's then used in the functions. HarfBuzzFontData member access is |
| also adjusted. |
| |
| HarfBuzzFace::createFace() now references the cairo_scaled_font_t object |
| that is then set as the user data pointer, with the destroy callback |
| that dereferences that object also specified. With hb_face_t being a |
| reference-counted object itself, this ensures the cairo_scaled_font_t |
| object doesn't get destroyed while hb_face_t is still alive. |
| |
| In HarfBuzzFace::createFont(), the hb_font_t creation is cleaned up, |
| with a C++ lambda used as the destroy callback. |
| |
| * platform/graphics/harfbuzz/HarfBuzzFaceCairo.cpp: |
| (WebCore::harfBuzzGetGlyph): |
| (WebCore::harfBuzzGetGlyphHorizontalAdvance): |
| (WebCore::harfBuzzGetGlyphExtents): |
| (WebCore::harfBuzzCairoGetTable): |
| (WebCore::HarfBuzzFace::createFace): |
| (WebCore::HarfBuzzFace::createFont): |
| (WebCore::HarfBuzzFontData::HarfBuzzFontData): Deleted. |
| (WebCore::destroyHarfBuzzFontData): Deleted. |
| |
| 2018-02-15 Philippe Normand <pnormand@igalia.com> |
| |
| [GStreamer] WebVTT caps changed in GStreamer 1.14 |
| https://bugs.webkit.org/show_bug.cgi?id=182690 |
| |
| Reviewed by Xabier Rodriguez-Calvar. |
| |
| * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp: |
| (WebCore::MediaPlayerPrivateGStreamer::createGSTPlayBin): Use |
| text/vtt caps only for GStreamer versions inferior or equal to |
| 1.12. In 1.13 (current git master) the VTT caps format changed to |
| application/x-subtitle-vtt. |
| |
| 2018-02-15 Zan Dobersek <zdobersek@igalia.com> |
| |
| HarfBuzzFace should not be ref-counted |
| https://bugs.webkit.org/show_bug.cgi?id=182823 |
| |
| Reviewed by Carlos Garcia Campos. |
| |
| The HarfBuzzFace objects shouldn't be copied along in FontPlatformData |
| copy assignment operator, which made it a requirement for that class to |
| be ref-counted. Cairo-based HarfBuzzFace implementation uses the |
| cairo_scaled_font_t object from FontPlatformData internally, but upon |
| FontPlatformData cloning that scaled font object could change, meaning |
| HarfBuzzFace object that's shared with another FontPlatformData object |
| would end up using a different cairo_scaled_font_t object from the one |
| that's been regenerated in the newly-cloned FontPlatformData object. |
| |
| Instead of ref-counting the HarfBuzzFace objects, they should be handled |
| in FontPlatformData through std::unique_ptr<>. In the FontPlatformData |
| copy assignment operator, the copy target's m_harfBuzzFace object is |
| nulled out, allowing the next harfBuzzFace() call to construct an |
| object that properly leverages the cairo_scaled_font_t object that could |
| have changed during cloning. |
| |
| * platform/graphics/FontPlatformData.h: |
| * platform/graphics/freetype/FontPlatformDataFreeType.cpp: |
| (WebCore::FontPlatformData::operator=): |
| (WebCore::FontPlatformData::harfBuzzFace const): |
| * platform/graphics/harfbuzz/HarfBuzzFace.h: |
| (WebCore::HarfBuzzFace::create): Deleted. |
| |
| 2018-02-14 Zalan Bujtas <zalan@apple.com> |
| |
| [RenderTreeBuilder] Move RenderMathMLFenced::addChild() to RenderTreeBuilder |
| https://bugs.webkit.org/show_bug.cgi?id=182817 |
| <rdar://problem/37556761> |
| |
| Reviewed by Antti Koivisto. |
| |
| No change in functionality. |
| |
| * rendering/mathml/RenderMathMLFenced.cpp: |
| (WebCore::RenderMathMLFenced::addChild): Deleted. |
| * rendering/mathml/RenderMathMLFenced.h: |
| * rendering/updating/RenderTreeBuilder.cpp: |
| (WebCore::RenderTreeBuilder::insertChild): |
| (WebCore::RenderTreeBuilder::insertChildToRenderMathMLFenced): Deleted. |
| * rendering/updating/RenderTreeBuilder.h: |
| * rendering/updating/RenderTreeBuilderMathML.cpp: |
| (WebCore::RenderTreeBuilder::MathML::insertChild): |
| |
| 2018-02-14 Antti Koivisto <antti@apple.com> |
| |
| Do sibling invalidation on mutation |
| https://bugs.webkit.org/show_bug.cgi?id=182809 |
| |
| Reviewed by Zalan Bujtas. |
| |
| We used to invalidate siblings for sibling combinators and nth-pseudo classes during style resolution tree walk. |
| This would consider any element with invalid style a reason to invalidate siblings too. However we now do |
| accurate invalidation on class and attribute changes and this approach ends up invalidating too much. |
| |
| This patch sibling style invalidation to mutation time and removes invalidation code from style resolution tree walk. |
| |
| * dom/Element.cpp: |
| (WebCore::invalidateSiblingsIfNeeded): |
| |
| Helper to invalidate siblings. |
| |
| (WebCore::Element::invalidateStyle): |
| (WebCore::Element::invalidateStyleAndLayerComposition): |
| (WebCore::Element::invalidateStyleForSubtree): |
| (WebCore::Element::invalidateStyleAndRenderersForSubtree): |
| |
| Invalidate siblings if needed based on affectsNextSibling/affectedByPreviousSibling bits. |
| |
| (WebCore::Element::invalidateStyleInternal): |
| (WebCore::Element::invalidateStyleForSubtreeInternal): |
| |
| Add "internal" versions that don't invalidate siblings. These are used by StyleInvalidator for accurate invalidation. |
| |
| * dom/Element.h: |
| * style/StyleInvalidator.cpp: |
| (WebCore::Style::Invalidator::invalidateIfNeeded): |
| (WebCore::Style::Invalidator::invalidateStyle): |
| |
| Use internal invalidation functions. |
| |
| * style/StyleTreeResolver.cpp: |
| (WebCore::Style::resetStyleForNonRenderedDescendants): |
| (WebCore::Style::TreeResolver::resolveComposedTree): |
| |
| Remove sibling invalidation. |
| |
| * style/StyleTreeResolver.h: |
| |
| 2018-02-14 John Wilander <wilander@apple.com> |
| |
| Resource Load Statistics: Make sure WebResourceLoadStatisticsStore::mergeWithDataFromDecoder() can ingest older plist versions and not reset the database |
| https://bugs.webkit.org/show_bug.cgi?id=182812 |
| <rdar://problem/37511406> |
| |
| Reviewed by Brent Fulgham. |
| |
| No new tests. Tested manually between versions of Safari. |
| |
| * loader/ResourceLoadStatistics.cpp: |
| (WebCore::ResourceLoadStatistics::decode): |
| Now only expects these fields for model version 11 or higher: |
| - topFrameUniqueRedirectsTo |
| - topFrameUniqueRedirectsFrom |
| - subresourceUniqueRedirectsFrom |
| - timesAccessedAsFirstPartyDueToUserInteraction |
| - timesAccessedAsFirstPartyDueToStorageAccessAPI |
| * loader/ResourceLoadStatistics.h: |
| |
| 2018-02-14 Basuke Suzuki <Basuke.Suzuki@sony.com> |
| |
| [WinCairo] Fix several build warnings under WebCore/platform |
| https://bugs.webkit.org/show_bug.cgi?id=182802 |
| |
| Reviewed by Konstantin Tokarev. |
| |
| Warning C4101 'fileModificationDate': unreferenced local variable |
| Source\WebCore\platform\network\curl\CurlCacheEntry.cpp:279 |
| |
| Warning C4239 nonstandard extension used: 'argument': conversion from 'WTF::String' |
| to 'WTF::String &' |
| Source\WebCore\platform\text\win\LocaleWin.cpp:75 |
| Source\WebCore\platform\text\win\LocaleWin.cpp:77 |
| |
| Warning C4838 conversion from 'UINT' to 'CLIPFORMAT' requires a narrowing conversion |
| Source\WebCore\platform\win\ClipboardUtilitiesWin.cpp:170 |
| Source\WebCore\platform\win\ClipboardUtilitiesWin.cpp:325 |
| Source\WebCore\platform\win\ClipboardUtilitiesWin.cpp:332 |
| Source\WebCore\platform\win\ClipboardUtilitiesWin.cpp:351 |
| Source\WebCore\platform\win\ClipboardUtilitiesWin.cpp:358 |
| Source\WebCore\platform\win\ClipboardUtilitiesWin.cpp:366 |
| Source\WebCore\platform\win\ClipboardUtilitiesWin.cpp:373 |
| Source\WebCore\platform\win\ClipboardUtilitiesWin.cpp:380 |
| Source\WebCore\platform\win\ClipboardUtilitiesWin.cpp:387 |
| |
| * platform/network/curl/CurlCacheEntry.cpp: |
| (WebCore::CurlCacheEntry::parseResponseHeaders): |
| * platform/text/win/LocaleWin.cpp: |
| (WebCore::LCIDFromLocaleInternal): |
| * platform/win/ClipboardUtilitiesWin.cpp: |
| (WebCore::registerClipboardFormat): |
| (WebCore::texthtmlFormat): |
| (WebCore::urlWFormat): |
| (WebCore::urlFormat): |
| (WebCore::filenameWFormat): |
| (WebCore::filenameFormat): |
| (WebCore::htmlFormat): |
| (WebCore::smartPasteFormat): |
| (WebCore::fileDescriptorFormat): |
| (WebCore::fileContentFormatZero): |
| |
| 2018-02-14 Zalan Bujtas <zalan@apple.com> |
| |
| [RenderTreeBuilder] Move RenderSVG*::addChild() to RenderTreeBuilder |
| https://bugs.webkit.org/show_bug.cgi?id=182811 |
| <rdar://problem/37549714> |
| |
| Reviewed by Antti Koivisto. |
| |
| No change in functionality. |
| |
| * rendering/svg/RenderSVGContainer.cpp: |
| (WebCore::RenderSVGContainer::addChild): Deleted. |
| * rendering/svg/RenderSVGContainer.h: |
| * rendering/svg/RenderSVGInline.cpp: |
| (WebCore::RenderSVGInline::addChild): Deleted. |
| * rendering/svg/RenderSVGInline.h: |
| * rendering/svg/RenderSVGRoot.cpp: |
| (WebCore::RenderSVGRoot::addChild): Deleted. |
| * rendering/svg/RenderSVGRoot.h: |
| * rendering/svg/RenderSVGText.cpp: |
| (WebCore::RenderSVGText::addChild): Deleted. |
| * rendering/svg/RenderSVGText.h: |
| * rendering/updating/RenderTreeBuilder.cpp: |
| (WebCore::RenderTreeBuilder::insertChild): |
| (WebCore::RenderTreeBuilder::insertChildToSVGContainer): Deleted. |
| (WebCore::RenderTreeBuilder::insertChildToSVGInline): Deleted. |
| (WebCore::RenderTreeBuilder::insertChildToSVGRoot): Deleted. |
| (WebCore::RenderTreeBuilder::insertChildToSVGText): Deleted. |
| * rendering/updating/RenderTreeBuilder.h: |
| |
| 2018-02-14 Daniel Bates <dabates@apple.com> |
| |
| Disallow cross-origin subresources from asking for credentials |
| https://bugs.webkit.org/show_bug.cgi?id=182579 |
| <rdar://problem/36162271> |
| |
| Reviewed by Andy Estes. |
| |
| Prompts for credentials to load cross-origin subresources are typically seen as unexpected |
| by a person that navigates to- or interacts with- a web page. The cross-origin and implicit |
| loading nature of these subresources makes asking for credentials questionable because they |
| are not being served by the same origin of the page a person explicitly loaded and are not |
| guaranteed to correspond to an explicit user interaction other than the initial load of the |
| page. We know that subresources that ask for credentials can be abused as part of a phishing |
| attack. It seems reasonable to disallow cross-origin subresources from asking for credentials |
| due to their questionable nature and the risk for abuse. This will also make the behavior |
| of WebKit match the behavior of Chrome. |
| |
| Tests: http/tests/media/video-auth-with-allowCrossOriginSubresourcesToAskForCredentials.html |
| http/tests/security/basic-auth-subresource.html |
| http/tests/security/mixedContent/insecure-basic-auth-image-allowCrossOriginSubresourcesToAskForCredentials.https.html |
| http/tests/security/mixedContent/insecure-image-redirects-to-basic-auth-secure-image-allowCrossOriginSubresourcesToAskForCredentials.html |
| http/tests/security/mixedContent/secure-redirect-to-insecure-redirect-to-basic-auth-secure-image-allowCrossOriginSubresourcesToAskForCredentials.https.html |
| http/tests/security/mixedContent/secure-redirect-to-secure-redirect-to-basic-auth-insecure-image-allowCrossOriginSubresourcesToAskForCredentials.https.html |
| http/tests/security/mixedContent/secure-redirect-to-secure-redirect-to-basic-auth-secure-image-allowCrossOriginSubresourcesToAskForCredentials.https.html |
| |
| * loader/ResourceLoader.cpp: |
| (WebCore::ResourceLoader::isSubresourceLoader const): Formerly non-const. |
| (WebCore::ResourceLoader::shouldAllowResourceToAskForCredentials const): Added. |
| (WebCore::ResourceLoader::didBlockAuthenticationChallenge): Emit Web Inspector console message if |
| the authentication challenge was blocked because the request is cross origin. |
| (WebCore::ResourceLoader::isAllowedToAskUserForCredentials const): Disallow a cross-origin |
| request from prompting for credentials. |
| (WebCore::ResourceLoader::isSubresourceLoader): Deleted; made const. |
| * loader/ResourceLoader.h: |
| * loader/SubresourceLoader.cpp: |
| (WebCore::SubresourceLoader::SubresourceLoader): Update ResourceLoader state so that block cross-origin |
| subresources from prompting for credentials, if applicable. |
| (WebCore::SubresourceLoader::isSubresourceLoader const): Formerly non-const. |
| (WebCore::SubresourceLoader::isSubresourceLoader): Deleted; made const. |
| * loader/SubresourceLoader.h: |
| * page/Settings.yaml: Add setting allowCrossOriginSubresourcesToAskForCredentials (defaults: false - |
| do not allow cross origin subresources to ask for credentials). |
| |
| 2018-02-14 Don Olmstead <don.olmstead@sony.com> |
| |
| WebCore headers should not include config.h or PlatformExportMacros.h |
| https://bugs.webkit.org/show_bug.cgi?id=182799 |
| |
| Reviewed by Darin Adler. |
| |
| No new tests. No change in behavior. |
| |
| * Modules/speech/SpeechSynthesis.h: |
| * bindings/js/JSDOMGlobalObject.h: |
| * contentextensions/ContentExtensionError.h: |
| * contentextensions/DFA.h: |
| * dom/ContextDestructionObserver.h: |
| * dom/DeviceOrientationClient.h: |
| * dom/DeviceOrientationData.h: |
| * editing/cocoa/HTMLConverter.h: |
| * loader/FrameLoaderStateMachine.h: |
| * loader/cache/CachedResourceHandle.h: |
| * page/FrameDestructionObserver.h: |
| * page/RuntimeEnabledFeatures.h: |
| * platform/URL.h: |
| * platform/audio/AudioHardwareListener.h: |
| * platform/audio/AudioSession.h: |
| * platform/graphics/Color.h: |
| * platform/graphics/IntSize.h: |
| * platform/graphics/transforms/AffineTransform.h: |
| * platform/graphics/win/LocalWindowsContext.h: |
| * platform/network/CacheValidation.h: |
| * platform/network/CredentialBase.h: |
| * platform/network/ResourceHandleClient.h: |
| * platform/network/cf/CertificateInfo.h: |
| |
| 2018-02-12 Ryosuke Niwa <rniwa@webkit.org> |
| |
| REGRESSION (r223440): Copying & pasting a list from Microsoft Word to TinyMCE fails |
| https://bugs.webkit.org/show_bug.cgi?id=182564 |
| |
| Reviewed by Wenson Hsieh. |
| |
| Unfortunately, r228352 was inadaquate to fix copying & pasting of a list item from Microsoft Word into TinyMCE |
| in older verions of TinyMCE. This patch amends the approach taken by r228352 to make it work across the board |
| as well as unbreak GMail. |
| |
| Turns out older versions of TinyMCE can't handle list items when computed styles are added as inline style |
| declarations by WebKit. To make this work, avoid adding any computed styles as inline styles within mso-list |
| conditionals as well as any p elements whose style attribute contains "mso-list" property. We would instead |
| preserve these styles by keeping Microsoft Word's CSS style rules in addition to special @list rules. |
| |
| In addition, not keeping the style element of Microsoft Word in a head element as done in r228352 causes some |
| versions of TinyMCE to treat it as regular text, and inserting a bunch of @list rules as user visible text. |
| To work around this problem, we serialize the style rules as a comment (<!-- ~ -->) within a head element. |
| |
| Furthermore, when Microsoft Word is in the compatibility mode, it does not generate xmlns:o as the first xmlns |
| declaration. Generalized the code to detect Microsoft Word's HTML declaration by looking for xmlns:o and xmlns:w |
| xmls declarations. |
| |
| Finally, it turns out that Gmail has its own handling of list items copy & pasted from Microsoft Word, and also |
| needs this quirks but in the pasted HTML, not the one exposed in getData. As such, this patch also enables the |
| MSO list quirks in the pasted content as well as the one exposed in getData. |
| |
| Tests: PasteHTML.PreservesMSOList |
| PasteHTML.PreservesMSOListInCompatibilityMode |
| PasteHTML.StripsMSOListWhenMissingMSOHTMLElement |
| PasteWebArchive.PreservesMSOList |
| PasteWebArchive.PreservesMSOListInCompatibilityMode |
| PasteWebArchive.StripsMSOListWhenMissingMSOHTMLElement |
| |
| * editing/HTMLInterchange.h: |
| * editing/ReplaceSelectionCommand.cpp: |
| (WebCore::removeHeadContents): Don't remove the special style element needed for the MSO list quirks since we |
| don't keep the computed style as inline styles in this case. |
| * editing/cocoa/WebContentReaderCocoa.mm: |
| (WebCore::WebContentReader::readWebArchive): Enable the quirks in the pasted content as well as opposed to |
| just in DataTransfer API exposed to the JavaScript. |
| (WebCore::WebContentReader::readHTML): Ditto. |
| * editing/markup.cpp: |
| (WebCore::shouldPreserveMSOLists): Added. Generalized the logic to detect a Microsoft Word document. |
| more xmlns declarations. |
| (WebCore::StyledMarkupAccumulator::shouldPreserveMSOListStyleForElement): Added. |
| (WebCore::StyledMarkupAccumulator::appendElement): Don't generate the second style element here for elements |
| with most-list properties. Instead, avoid overriding inline styles with computed styles altogether. |
| (WebCore::StyledMarkupAccumulator::appendNodeToPreserveMSOList): Include the style rules as well as list rules |
| and wrap the "style" element in a "head" element to make it compatible with older versions of TinyMCE. |
| |
| 2018-02-14 Dean Jackson <dino@apple.com> |
| |
| CrashTracer: com.apple.WebKit.WebContent at com.apple.WebCore: WebCore::HTMLPlugInImageElement::didAddUserAgentShadowRoot + 618 |
| https://bugs.webkit.org/show_bug.cgi?id=182798 |
| <rdar://problem/23337253> |
| |
| Reviewed by Eric Carlson. |
| |
| Speculative fix for a crash in HTMLPlugInImageElement::didAddUserAgentShadowRoot. |
| The guess is that the m_swapRendererTimer is set, and the display state changes to |
| something that does not require a shadow root, but before the timer fires. |
| Fix this by ensuring that the timer is reset on every display state change. |
| |
| * html/HTMLPlugInElement.cpp: |
| (WebCore::HTMLPlugInElement::setDisplayState): Guard for sets that wouldn't |
| actually change value, and make sure we always reset the timer. |
| |
| 2018-02-14 Antoine Quint <graouts@apple.com> |
| |
| [Modern Media Controls] Don't use arrays as values for localisable strings |
| https://bugs.webkit.org/show_bug.cgi?id=182791 |
| <rdar://problem/36007262> |
| |
| Reviewed by Dean Jackson. |
| |
| Localization tools expect localizable strings to be specified as key-value pairs where both the key and the pair |
| are plain strings. For the skip buttons, we used an array value to specify a replacement string. We now perform |
| this task in code with a centralized SkipSeconds constant defining the skip amount. |
| |
| * English.lproj/modern-media-controls-localized-strings.js: |
| * Modules/modern-media-controls/controls/icon-service.js: |
| * Modules/modern-media-controls/main.js: |
| (UIString): |
| * Modules/modern-media-controls/media/skip-back-support.js: |
| (SkipBackSupport.prototype.buttonWasPressed): |
| * Modules/modern-media-controls/media/skip-forward-support.js: |
| (SkipForwardSupport.prototype.buttonWasPressed): |
| |
| 2018-02-14 Ryan Haddad <ryanhaddad@apple.com> |
| |
| Unreviewed, rolling out r228444. |
| |
| Introduced API and Layout test failures. |
| |
| Reverted changeset: |
| |
| "[WebAuthN] Revisit the whole async model of task dispatching, |
| timeout and aborting" |
| https://bugs.webkit.org/show_bug.cgi?id=181946 |
| https://trac.webkit.org/changeset/228444 |
| |
| 2018-02-14 Brent Fulgham <bfulgham@apple.com> |
| |
| Confirm proper thread in UserGestureIndicator constructor |
| https://bugs.webkit.org/show_bug.cgi?id=175980 |
| |
| Reviewed by Daniel Bates. |
| |
| Document is a main-thread object. If we enter the UserGestureIndicator constructor |
| on a non-main thread, we should ASSERT, not return silently. |
| |
| * dom/UserGestureIndicator.cpp: |
| (WebCore::UserGestureIndicator::UserGestureIndicator): |
| |
| 2018-02-14 Zalan Bujtas <zalan@apple.com> |
| |
| [RenderTreeBuilder] Remove redundant RenderTreeBuilder methods |
| https://bugs.webkit.org/show_bug.cgi?id=182770 |
| <rdar://problem/37525627> |
| |
| Reviewed by Daniel Bates. |
| |
| No change in functionality. |
| |
| * rendering/updating/RenderTreeBuilder.cpp: |
| (WebCore::RenderTreeBuilder::dropAnonymousBoxChild): Deleted. |
| (WebCore::RenderTreeBuilder::moveRubyChildren): Deleted. |
| (WebCore::RenderTreeBuilder::resolveMovedChildForMultiColumnFlow): Deleted. |
| * rendering/updating/RenderTreeBuilder.h: |
| * rendering/updating/RenderTreeBuilderBlockFlow.cpp: |
| (WebCore::RenderTreeBuilder::BlockFlow::insertChild): |
| * rendering/updating/RenderTreeBuilderInline.cpp: |
| (WebCore::RenderTreeBuilder::Inline::insertChild): |
| * rendering/updating/RenderTreeBuilderRuby.cpp: |
| (WebCore::RenderTreeBuilder::Ruby::takeChild): |
| |
| 2018-02-14 Zalan Bujtas <zalan@apple.com> |
| |
| [RenderTreeBuilder] Move RenderElement::takeChild() to RenderTreeBuilder |
| https://bugs.webkit.org/show_bug.cgi?id=182762 |
| <rdar://problem/37523756> |
| |
| Reviewed by Daniel Bates. |
| |
| This patch removes the remaining takeChild() related mutation logic from the renderers. |
| |
| No change in functionality. |
| |
| * rendering/RenderBoxModelObject.cpp: |
| (WebCore::RenderBoxModelObject::moveChildTo): |
| * rendering/RenderElement.cpp: |
| (WebCore::RenderElement::takeChild): Deleted. |
| (WebCore::RenderElement::takeChildInternal): Deleted. |
| * rendering/RenderElement.h: |
| * rendering/RenderObject.h: |
| * rendering/updating/RenderTreeBuilder.cpp: |
| (WebCore::RenderTreeBuilder::takeChild): |
| (WebCore::RenderTreeBuilder::childFlowStateChangesAndAffectsParentBlock): |
| (WebCore::RenderTreeBuilder::takeChildFromRenderElement): |
| * rendering/updating/RenderTreeBuilder.h: |
| * rendering/updating/RenderTreeBuilderBlock.cpp: |
| (WebCore::RenderTreeBuilder::Block::removeLeftoverAnonymousBlock): |
| (WebCore::RenderTreeBuilder::Block::takeChild): |
| (WebCore::RenderTreeBuilder::Block::dropAnonymousBoxChild): |
| * rendering/updating/RenderTreeBuilderInline.cpp: |
| (WebCore::RenderTreeBuilder::Inline::splitFlow): |
| (WebCore::RenderTreeBuilder::Inline::splitInlines): |
| (WebCore::RenderTreeBuilder::Inline::childBecameNonInline): |
| * rendering/updating/RenderTreeBuilderRuby.cpp: |
| (WebCore::RenderTreeBuilder::Ruby::takeChild): |
| * rendering/updating/RenderTreeBuilderSVG.cpp: |
| (WebCore::RenderTreeBuilder::SVG::takeChild): Leftover from the previous patch. |
| |
| 2018-02-13 Antti Koivisto <antti@apple.com> |
| |
| REGRESSION(r228313): Membuster | macOS | All Devices | 1.5 MB |
| https://bugs.webkit.org/show_bug.cgi?id=182744 |
| <rdar://problem/37463770> |
| |
| Reviewed by Zalan Bujtas. |
| |
| We need to respect low memory notifications explicitly now that the compiled selectors are not part of RuleData. |
| |
| * css/StyleRule.cpp: |
| (WebCore::StyleRule::StyleRule): |
| * css/StyleRule.h: |
| |
| Switch to std::unique_ptr<[]> from Vector to avoid unnecessary bloat. |
| |
| * css/StyleSheetContents.cpp: |
| (WebCore::traverseRulesInVector): |
| (WebCore::StyleSheetContents::traverseRules const): |
| |
| Add a rule traversal function, similar to the existing traverseSubresources. |
| |
| (WebCore::StyleSheetContents::traverseSubresources const): |
| |
| Use traverseRules to implement traverseSubresources. |
| |
| (WebCore::traverseSubresourcesInRules): Deleted. |
| * css/StyleSheetContents.h: |
| * page/MemoryRelease.cpp: |
| (WebCore::releaseCriticalMemory): |
| * style/StyleScope.cpp: |
| (WebCore::Style::Scope::releaseMemory): |
| |
| Release memory for compiled selectors on memory notification. |
| |
| * style/StyleScope.h: |
| |
| 2018-02-13 Commit Queue <commit-queue@webkit.org> |
| |
| Unreviewed, rolling out r228431. |
| https://bugs.webkit.org/show_bug.cgi?id=182766 |
| |
| Regressed CMake build stability (Requested by dolmstead on |
| #webkit). |
| |
| Reverted changeset: |
| |
| "[CMake] Make WebCore headers copies" |
| https://bugs.webkit.org/show_bug.cgi?id=182512 |
| https://trac.webkit.org/changeset/228431 |
| |
| 2018-02-13 Commit Queue <commit-queue@webkit.org> |
| |
| Unreviewed, rolling out r228437, r228439, and r228440. |
| https://bugs.webkit.org/show_bug.cgi?id=182756 |
| |
| Introduced LayoutTest failures (Requested by ryanhadd_ on |
| #webkit). |
| |
| Reverted changesets: |
| |
| "[Web Animations] Make KeyframeEffect target nullable and |
| read-write" |
| https://bugs.webkit.org/show_bug.cgi?id=182741 |
| https://trac.webkit.org/changeset/228437 |
| |
| "Unreviewed attempt to fix build after r228437." |
| https://trac.webkit.org/changeset/228439 |
| |
| "[Web Animations] Make KeyframeEffect target nullable and |
| read-write" |
| https://bugs.webkit.org/show_bug.cgi?id=182741 |
| https://trac.webkit.org/changeset/228440 |
| |
| 2018-02-13 Antoine Quint <graouts@apple.com> |
| |
| Removing the controls attribute from a <video> element does not tear down the controls shadow DOM nor cancel event listeners. |
| https://bugs.webkit.org/show_bug.cgi?id=182668 |
| <rdar://problem/33793004> |
| |
| Reviewed by Jer Noble. |
| |
| When controls were turned off for inline media players, we would remove all media controls elements from the shadow root, |
| but we would nevertheless continue to listen to media events and, as a result, update properties of the media controls |
| which would lead to requestAnimationFrame() calls that would update the detached DOM nodes. |
| |
| We now only listent to media events if controls are turned on. |
| |
| * Modules/modern-media-controls/media/controls-visibility-support.js: |
| (ControlsVisibilitySupport.prototype.enable): Remove the mutation observer from ControlsVisibilitySupport since observing |
| changes to the controls attribute is now performed directly in MediaController. We need to make sure that we update the |
| controls however since fadesWhileIdle is turned off in the disable() call to ensure that the auto-hide behavior is disabled |
| as well. |
| (ControlsVisibilitySupport.prototype.disable): Disable the auto-hide controller as well. |
| (ControlsVisibilitySupport.prototype._updateControls): Remove code that has now been moved into MediaController._updateControlsAvailability(). |
| * Modules/modern-media-controls/media/media-controller.js: |
| (MediaController): Listen to the "play" event on the media so that we call _updateControlsAvailability() in this situation to account for |
| shouldForceControlsDisplay on MediaControlsHost. We also register for a mutation observer to track when the controls attribute availability |
| changes in which case we want to call _updateControlsAvailability() as well. |
| (MediaController.prototype.handleEvent): Call _updateControlsAvailability() instead of _updateiOSFullscreenProperties() which has been renamed |
| and expanded. |
| (MediaController.prototype._updateControlsIfNeeded): Call _updateControlsAvailability() after controls have been updated. |
| (MediaController.prototype._updateControlsAvailability): We now disable supporting media controller objects when we know that controls should |
| be hidden in all cases except when in fullscreen on macOS. |
| (MediaController.prototype._updateiOSFullscreenProperties): Deleted. |
| * Modules/modern-media-controls/media/placard-support.js: |
| (PlacardSupport.prototype.disable): Only allow the media events required to track when to show placards when in fullscreen since inline media |
| players need to show the AirPlay and picture-in-picture placards even when controls are disabled. |
| |
| 2018-02-13 Jiewen Tan <jiewen_tan@apple.com> |
| |
| [WebAuthN] Revisit the whole async model of task dispatching, timeout and aborting |
| https://bugs.webkit.org/show_bug.cgi?id=181946 |
| <rdar://problem/37258262> |
| |
| Reviewed by Chris Dumez. |
| |
| This patch changes the original async model from a work queue to IPC between WebProcess |
| and UIProcess. Since all authenticator operations must be handled in the UIProcess due |
| to sandboxing, this message passing IPC async model then surpasses the original multi |
| threading model. To cooperate that, a CredentialsMessenger class is then created and |
| all task dispatching code is moved thre. |
| |
| As an improvement over existing code, static functions from PublicKeyCredential are |
| moved to AuthenticatorManager. AuthenticatorManager is made as a singleton such that |
| when static functions are called, they could reach the CredentialsMessenger to interact |
| with UIProccess. CredentialsMessenger and AuthenticatorManager are separated so later |
| on when other Credential types are created, they can reuse the same IPC messenger. |
| |
| What's more, a mock CredentialsMessenger is then created to mock behaviors of UIProcess |
| for testing purpose. |
| |
| Covered by existing tests. |
| |
| * DerivedSources.make: |
| * Modules/credentialmanagement/BasicCredential.h: |
| * Modules/credentialmanagement/CredentialsContainer.cpp: |
| (WebCore::CredentialsContainer::CredentialsContainer): |
| (WebCore::CredentialsContainer::doesHaveSameOriginAsItsAncestors): |
| (WebCore::CredentialsContainer::get): |
| (WebCore::CredentialsContainer::isCreate): |
| (WebCore::CredentialsContainer::PendingPromise::PendingPromise): Deleted. |
| (WebCore::CredentialsContainer::dispatchTask): Deleted. |
| * Modules/credentialmanagement/CredentialsContainer.h: |
| (WebCore::CredentialsContainer::PendingPromise::create): Deleted. |
| * Modules/credentialmanagement/CredentialsMessenger.cpp: Added. |
| (WebCore::CredentialsMessenger::exceptionReply): |
| (WebCore::CredentialsMessenger::addCreationCompletionHandler): |
| (WebCore::CredentialsMessenger::takeCreationCompletionHandler): |
| (WebCore::CredentialsMessenger::addRequestCompletionHandler): |
| (WebCore::CredentialsMessenger::takeRequestCompletionHandler): |
| (WebCore::CredentialsMessenger::addQueryCompletionHandler): |
| (WebCore::CredentialsMessenger::takeQueryCompletionHandler): |
| (WebCore::getIdFromAttestationObject): |
| * Modules/credentialmanagement/CredentialsMessenger.h: Added. |
| (WebCore::CreationReturnBundle::CreationReturnBundle): |
| (WebCore::AssertionReturnBundle::AssertionReturnBundle): |
| (WebCore::CredentialsMessenger::weakPtrFactory const): |
| * Modules/webauthn/Authenticator.cpp: Removed. |
| * Modules/webauthn/Authenticator.h: Removed. |
| * Modules/webauthn/AuthenticatorManager.cpp: Copied from Source/WebCore/Modules/webauthn/PublicKeyCredential.cpp. |
| (WebCore::AuthenticatorManagerInternal::produceClientDataJson): |
| (WebCore::AuthenticatorManagerInternal::produceClientDataJsonHash): |
| (WebCore::AuthenticatorManagerInternal::initTimer): |
| (WebCore::AuthenticatorManagerInternal::didTimerFire): |
| (WebCore::AuthenticatorManager::singleton): |
| (WebCore::AuthenticatorManager::setMessenger): |
| (WebCore::AuthenticatorManager::create const): |
| (WebCore::AuthenticatorManager::discoverFromExternalSource const): |
| * Modules/webauthn/AuthenticatorManager.h: Copied from Source/WebCore/Modules/webauthn/AuthenticatorResponse.h. |
| * Modules/webauthn/AuthenticatorResponse.h: |
| * Modules/webauthn/PublicKeyCredential.cpp: |
| (WebCore::PublicKeyCredentialInternal::produceClientDataJson): Deleted. |
| (WebCore::PublicKeyCredentialInternal::produceClientDataJsonHash): Deleted. |
| (WebCore::PublicKeyCredentialInternal::getIdFromAttestationObject): Deleted. |
| (WebCore::PublicKeyCredential::collectFromCredentialStore): Deleted. |
| (WebCore::PublicKeyCredential::discoverFromExternalSource): Deleted. |
| (WebCore::PublicKeyCredential::store): Deleted. |
| (WebCore::PublicKeyCredential::create): Deleted. |
| (WebCore::PublicKeyCredential::rawId const): Deleted. |
| (WebCore::PublicKeyCredential::response const): Deleted. |
| * Modules/webauthn/PublicKeyCredential.h: |
| * Sources.txt: |
| * WebCore.xcodeproj/project.pbxproj: |
| * testing/Internals.cpp: |
| (WebCore::Internals::Internals): |
| (WebCore::Internals::mockCredentialsMessenger const): |
| * testing/Internals.h: |
| * testing/Internals.idl: |
| * testing/MockCredentialsMessenger.cpp: Added. |
| (WebCore::MockCredentialsMessenger::setAttestationObject): |
| (WebCore::MockCredentialsMessenger::setAssertionReturnBundle): |
| (WebCore::MockCredentialsMessenger::makeCredential): |
| (WebCore::MockCredentialsMessenger::getAssertion): |
| (WebCore::MockCredentialsMessenger::makeCredentialReply): |
| (WebCore::MockCredentialsMessenger::getAssertionReply): |
| * testing/MockCredentialsMessenger.h: Copied from Source/WebCore/Modules/webauthn/AuthenticatorResponse.h. |
| * testing/MockCredentialsMessenger.idl: Copied from Source/WebCore/Modules/webauthn/AuthenticatorResponse.h. |
| |
| 2018-02-13 Zalan Bujtas <zalan@apple.com> |
| |
| [RenderTreeBuilder] Move RenderBlock::takeChild() to RenderTreeBuilder |
| https://bugs.webkit.org/show_bug.cgi?id=182746 |
| <rdar://problem/37512871> |
| |
| Reviewed by Antti Koivisto. |
| |
| No change in functionality. |
| |
| * rendering/RenderBlock.cpp: |
| (WebCore::RenderBlock::takeChild): Deleted. |
| * rendering/RenderBlock.h: |
| * rendering/updating/RenderTreeBuilder.cpp: |
| (WebCore::RenderTreeBuilder::takeChild): |
| (WebCore::RenderTreeBuilder::takeChildFromRenderMenuList): |
| (WebCore::RenderTreeBuilder::takeChildFromRenderButton): |
| (WebCore::RenderTreeBuilder::takeChildFromRenderGrid): |
| (WebCore::RenderTreeBuilder::takeChildFromRenderBlock): Deleted. |
| * rendering/updating/RenderTreeBuilder.h: |
| * rendering/updating/RenderTreeBuilderBlock.cpp: |
| (WebCore::RenderTreeBuilder::Block::takeChild): |
| |
| 2018-02-13 Antoine Quint <graouts@apple.com> |
| |
| [Web Animations] Make KeyframeEffect target nullable and read-write |
| https://bugs.webkit.org/show_bug.cgi?id=182741 |
| |
| Additional unreviewed attempt to fix build after r228437. |
| |
| * dom/Element.h: |
| |
| 2018-02-13 Chris Dumez <cdumez@apple.com> |
| |
| Unreviewed attempt to fix build after r228437. |
| |
| * dom/Element.h: |
| |
| 2018-02-13 Antoine Quint <graouts@apple.com> |
| |
| [Web Animations] Make KeyframeEffect target nullable and read-write |
| https://bugs.webkit.org/show_bug.cgi?id=182741 |
| |
| Reviewed by Dean Jackson. |
| |
| We used to completely disregard null targets, for instance not parsing keyframes, but targets |
| can be null and are also supposed to be read-write for KeyframeEffect. We now update the IDL |
| for KeyframeEffect to mark the target property as read-write and update the implementation |
| to correctly handle null targets by creating a StyleResolver based on the ScriptExecutionContext's |
| document's document element (the <html> element in practice) and not the target itself, since it |
| can be null. |
| |
| This revealed a few issues in our implementation by allowing more WPT tests to run. So we also |
| ensure that: |
| |
| - we don't crash when parsing font-related properties by calling update() on the generated |
| RenderStyle's FontCascade when parsing keyframes. |
| |
| - CSS properties are provided as camel-case and not as hyphenated form |
| |
| - values provided in keyframes dictionaries are only read for valid properties |
| |
| - styles for effect targets are invalidated as soon as the timing model for that animation |
| is changed |
| |
| We also rename AnimationTimeline::animationTimingModelDidChange() to AnimationTimeline::timingModelDidChange() |
| since the previous name didn't add useful information and we're adding a new WebAnimation::timingModelDidChange() |
| method, so having the two methods have a similar name made more sense. |
| |
| * animation/Animatable.idl: Call animate() with a ScriptExecutionContext rather than a ScriptState |
| so that the ScriptExecutionContext can be passed to the KeyframeEffectReadOnly constructor. |
| * animation/AnimationEffectReadOnly.h: Add a new invalidate() method, designed to be subclassed, that |
| is called when the timing model for this effect or owning animation has changed. |
| * animation/AnimationTimeline.cpp: Rename animationTimingModelDidChange() to timingModelDidChange(). |
| (WebCore::AnimationTimeline::addAnimation): |
| (WebCore::AnimationTimeline::removeAnimation): |
| (WebCore::AnimationTimeline::setCurrentTime): |
| * animation/AnimationTimeline.h: Rename animationTimingModelDidChange() to timingModelDidChange(). |
| (WebCore::AnimationTimeline::timingModelDidChange): |
| (WebCore::AnimationTimeline::animationTimingModelDidChange): Deleted. |
| * animation/DocumentTimeline.cpp: Rename animationTimingModelDidChange() to timingModelDidChange(). |
| (WebCore::DocumentTimeline::timingModelDidChange): |
| (WebCore::DocumentTimeline::updateAnimations): |
| (WebCore::DocumentTimeline::animationTimingModelDidChange): Deleted. |
| * animation/DocumentTimeline.h: Rename animationTimingModelDidChange() to timingModelDidChange(). |
| * animation/KeyframeEffect.cpp: Expect a ScriptExecutionContext rather than a ScriptState. |
| (WebCore::KeyframeEffect::create): |
| (WebCore::KeyframeEffect::setKeyframes): |
| * animation/KeyframeEffect.h: Expect a ScriptExecutionContext rather than a ScriptState. |
| * animation/KeyframeEffect.idl: Expect a ScriptExecutionContext rather than a ScriptState and make the |
| target property read-write. |
| * animation/KeyframeEffectReadOnly.cpp: |
| (WebCore::IDLAttributeNameToAnimationPropertyName): Move this function below CSSPropertyIDToIDLAttributeName |
| so that it can call that function. We also check that we reject CSS properties that are not provided in |
| camel-case form (eg. "font-size" vs. "fontSize"). |
| (WebCore::processIterableKeyframes): Only read the JS values if we know that the provided JS property name |
| maps to a valid CSS property. |
| (WebCore::KeyframeEffectReadOnly::create): Expect a ScriptExecutionContext rather than a ScriptState. |
| (WebCore::KeyframeEffectReadOnly::processKeyframes): Expect a ScriptExecutionContext rather than a ScriptState |
| and use the context's document to get an HTML element to create a StyleResolver. We also call update() on the |
| generated RenderStyle's FontCascade since otherwise we would hit an ASSERT in FontCascade when parsing font-related |
| CSS properties. |
| (WebCore::KeyframeEffectReadOnly::setTarget): Notify the animation that the effect target has changed and invalidate |
| the style of the new target and the old targets, if any. |
| (WebCore::KeyframeEffectReadOnly::invalidate): Invalidate the target's style. This method is called by setTarget() |
| and WebAnimation::timingModelDidChange(). |
| * animation/KeyframeEffectReadOnly.h: Expect a ScriptExecutionContext rather than a ScriptState. |
| * animation/KeyframeEffectReadOnly.idl: Expect a ScriptExecutionContext rather than a ScriptState. |
| * animation/WebAnimation.cpp: |
| (WebCore::WebAnimation::timingModelDidChange): We add this new method such that any place in WebAnimation where we |
| know the animation's timing model has changed we can invalidate the associated effect, if any, as well as notify |
| the timeline, if any. We used to only notify the timeline and, as a result, only invalidate the associated effect |
| in the next display monitor refresh. |
| (WebCore::WebAnimation::effectTargetDidChange): This method is called in KeyframeEffectReadOnly::setTarget() to inform |
| the animation of the previous effect target and the new one upon a target change. This allows us to forward this information |
| onto the timeline so that we correctly add or remove the targets from the list of animated elements. |
| (WebCore::WebAnimation::setStartTime): |
| * animation/WebAnimation.h: Expose the new effectTargetDidChange() and timingModelDidChange() methods. |
| * dom/Element.cpp: Expect a ScriptExecutionContext rather than a ScriptState. |
| (WebCore::Element::animate): |
| * dom/Element.h: Expect a ScriptExecutionContext rather than a ScriptState. |
| |
| 2018-02-13 Antti Koivisto <antti@apple.com> |
| |
| Crash when breakpoint hit in unload handler |
| https://bugs.webkit.org/show_bug.cgi?id=169855 |
| <rdar://problem/28683567> |
| |
| Reviewed by Daniel Bates. |
| |
| Test: inspector/debugger/reload-paused.html |
| |
| CachedRawResource::updateBuffer may generate unload event in client notify callback. If Inspector was |
| paused, this even would spawn a nested runloop. CachedRawResource::finishLoading would get called in |
| the nested loop, confusing the DocumentLoader state machine and resulting in crashes later. |
| |
| * loader/cache/CachedRawResource.cpp: |
| (WebCore::CachedRawResource::updateBuffer): |
| |
| - Set a bit when entering the client callback. |
| - Ensure we don't re-enter updateBuffer. |
| - If finishLoading got delayed during client callback, do it at the end. |
| |
| (WebCore::CachedRawResource::finishLoading): |
| |
| If we are in updateBuffer client callback, save the buffer and bail out. |
| |
| * loader/cache/CachedRawResource.h: |
| |
| 2018-02-13 Zalan Bujtas <zalan@apple.com> |
| |
| [RenderTreeBuilder] Move RenderBlockFlow::takeChild() to RenderTreeBuilder |
| https://bugs.webkit.org/show_bug.cgi?id=182739 |
| <rdar://problem/37506542> |
| |
| Reviewed by Antti Koivisto. |
| |
| No change in functionality. |
| |
| * rendering/RenderBlockFlow.cpp: |
| (WebCore::RenderBlockFlow::takeChild): Deleted. |
| * rendering/RenderBlockFlow.h: |
| * rendering/updating/RenderTreeBuilder.cpp: |
| (WebCore::RenderTreeBuilder::takeChild): |
| (WebCore::RenderTreeBuilder::multiColumnRelativeWillBeRemoved): Deleted. |
| * rendering/updating/RenderTreeBuilder.h: |
| * rendering/updating/RenderTreeBuilderBlock.cpp: |
| (WebCore::RenderTreeBuilder::Block::takeChild): |
| * rendering/updating/RenderTreeBuilderBlock.h: |
| |
| 2018-02-13 Don Olmstead <don.olmstead@sony.com> |
| |
| [CMake] Make WebCore headers copies |
| https://bugs.webkit.org/show_bug.cgi?id=182512 |
| |
| Reviewed by Keith Miller. |
| |
| No new tests. No change in behavior. |
| |
| * CMakeLists.txt: |
| * PlatformAppleWin.cmake: |
| * PlatformGTK.cmake: |
| * PlatformMac.cmake: |
| * PlatformWPE.cmake: |
| * PlatformWin.cmake: |
| * PlatformWinCairo.cmake: |
| * platform/Cairo.cmake: |
| * platform/Curl.cmake: |
| * platform/FreeType.cmake: |
| * platform/GStreamer.cmake: |
| * platform/ImageDecoders.cmake: |
| * platform/TextureMapper.cmake: |
| * platform/graphics/win/LocalWindowsContext.h: |
| |
| 2018-02-13 Chris Dumez <cdumez@apple.com> |
| |
| REGRESSION (r228299): Broke reader mode in Safari |
| https://bugs.webkit.org/show_bug.cgi?id=182697 |
| <rdar://problem/37399012> |
| |
| Reviewed by Ryosuke Niwa. |
| |
| Rework the fix for r228299 to be more targeted. I moved the policy check |
| cencelation from FrameLoader::stopLoading() to NavigationScheduler::schedule() |
| when a pending load is cancelled by another load. I have verified that the |
| sites fixed by r228299 still work with this more limited change. However, |
| reader mode is now working again. |
| |
| The issue seems to be that we tell CFNetwork to continue with the load after |
| receiving the response, even if the client has not responded to the |
| decidePolicyForNavigationResponse delegate yet. As a result, CFNetwork sends |
| us the resource data and we may commit the provisional load before receiving |
| the policy response from the client. When the provisional load is committed, |
| we call FrameLoader::stopLoading() which after r228299 cancelled pending |
| policy checks. Because we did not wait for the policy check response to |
| commit the load, we would cancel it which would make the load fail. |
| |
| The real fix here would be to make not tell CFNetwork to continue until after |
| we've received the policy delegate response. However, this is a larger and |
| riskier change at this point. I will follow-up on this issue. |
| |
| Covered by new API test. |
| |
| * loader/FrameLoader.cpp: |
| (WebCore::FrameLoader::stopLoading): |
| * loader/NavigationScheduler.cpp: |
| (WebCore::NavigationScheduler::schedule): |
| |
| 2018-02-13 Zalan Bujtas <zalan@apple.com> |
| |
| [RenderTreeBuilder] Move RenderSVG*::takeChild() to RenderTreeBuilder |
| https://bugs.webkit.org/show_bug.cgi?id=182736 |
| <rdar://problem/37503107> |
| |
| Reviewed by Antti Koivisto. |
| |
| No change in functionality. |
| |
| * rendering/svg/RenderSVGContainer.cpp: |
| (WebCore::RenderSVGContainer::takeChild): Deleted. |
| * rendering/svg/RenderSVGContainer.h: |
| * rendering/svg/RenderSVGInline.cpp: |
| (WebCore::RenderSVGInline::takeChild): Deleted. |
| * rendering/svg/RenderSVGInline.h: |
| * rendering/svg/RenderSVGRoot.cpp: |
| (WebCore::RenderSVGRoot::takeChild): Deleted. |
| * rendering/svg/RenderSVGRoot.h: |
| * rendering/svg/RenderSVGText.cpp: |
| (WebCore::RenderSVGText::takeChild): Deleted. |
| * rendering/svg/RenderSVGText.h: |
| * rendering/updating/RenderTreeBuilder.cpp: |
| (WebCore::RenderTreeBuilder::takeChild): |
| * rendering/updating/RenderTreeBuilderSVG.cpp: |
| (WebCore::RenderTreeBuilder::SVG::takeChild): |
| * rendering/updating/RenderTreeBuilderSVG.h: |
| |
| 2018-02-13 Zalan Bujtas <zalan@apple.com> |
| |
| [RenderTreeBuilder] Move RenderGrid::takeChild() to RenderTreeBuilder |
| https://bugs.webkit.org/show_bug.cgi?id=182734 |
| <rdar://problem/37500876> |
| |
| Reviewed by Antti Koivisto. |
| |
| No change in functionality. |
| |
| * rendering/RenderGrid.cpp: |
| (WebCore::RenderGrid::takeChild): Deleted. |
| * rendering/RenderGrid.h: |
| * rendering/updating/RenderTreeBuilder.cpp: |
| (WebCore::RenderTreeBuilder::takeChildFromRenderGrid): |
| * rendering/updating/RenderTreeBuilder.h: |
| |
| 2018-02-13 Nan Wang <n_wang@apple.com> |
| |
| AX: Remove AccessibleNode class |
| https://bugs.webkit.org/show_bug.cgi?id=182724 |
| <rdar://problem/37486024> |
| |
| Reviewed by Chris Fleizach. |
| |
| Removed all the AccessibleNode related code since AOM has |
| an alternate direction now. |
| |
| No new tests. Made sure existing tests don't break. |
| |
| * CMakeLists.txt: |
| * DerivedSources.make: |
| * Sources.txt: |
| * WebCore.xcodeproj/project.pbxproj: |
| * accessibility/AXObjectCache.cpp: |
| (WebCore::AXObjectCache::findModalNodes): |
| (WebCore::nodeHasRole): |
| (WebCore::AXObjectCache::handleLiveRegionCreated): |
| (WebCore::AXObjectCache::handleMenuItemSelected): |
| (WebCore::AXObjectCache::handleModalChange): |
| (WebCore::isNodeAriaVisible): |
| * accessibility/AccessibilityARIAGrid.cpp: |
| (WebCore::AccessibilityARIAGrid::isMultiSelectable const): |
| * accessibility/AccessibilityARIAGridCell.cpp: |
| (WebCore::AccessibilityARIAGridCell::readOnlyValue const): |
| * accessibility/AccessibilityAllInOne.cpp: |
| * accessibility/AccessibilityImageMapLink.cpp: |
| (WebCore::AccessibilityImageMapLink::roleValue const): |
| (WebCore::AccessibilityImageMapLink::accessibilityDescription const): |
| * accessibility/AccessibilityListBoxOption.cpp: |
| (WebCore::AccessibilityListBoxOption::isEnabled const): |
| (WebCore::AccessibilityListBoxOption::stringValue const): |
| * accessibility/AccessibilityNodeObject.cpp: |
| (WebCore::AccessibilityNodeObject::isEnabled const): |
| (WebCore::AccessibilityNodeObject::isPressed const): |
| (WebCore::AccessibilityNodeObject::isChecked const): |
| (WebCore::AccessibilityNodeObject::isMultiSelectable const): |
| (WebCore::AccessibilityNodeObject::isRequired const): |
| (WebCore::AccessibilityNodeObject::headingLevel const): |
| (WebCore::AccessibilityNodeObject::valueDescription const): |
| (WebCore::AccessibilityNodeObject::valueForRange const): |
| (WebCore::AccessibilityNodeObject::maxValueForRange const): |
| (WebCore::AccessibilityNodeObject::minValueForRange const): |
| (WebCore::AccessibilityNodeObject::ariaAccessibilityDescription const): |
| (WebCore::siblingWithAriaRole): |
| (WebCore::AccessibilityNodeObject::textForLabelElement const): |
| (WebCore::AccessibilityNodeObject::alternativeText const): |
| (WebCore::AccessibilityNodeObject::alternativeTextForWebArea const): |
| (WebCore::AccessibilityNodeObject::hierarchicalLevel const): |
| (WebCore::shouldUseAccessibilityObjectInnerText): |
| (WebCore::AccessibilityNodeObject::stringValue const): |
| (WebCore::accessibleNameForNode): |
| (WebCore::AccessibilityNodeObject::determineAriaRoleAttribute const): |
| * accessibility/AccessibilityObject.cpp: |
| (WebCore::AccessibilityObject::readOnlyValue const): |
| (WebCore::AccessibilityObject::supportsAutoComplete const): |
| (WebCore::AccessibilityObject::autoCompleteValue const): |
| (WebCore::AccessibilityObject::ariaIsMultiline const): |
| (WebCore::AccessibilityObject::invalidStatus const): |
| (WebCore::AccessibilityObject::supportsCurrent const): |
| (WebCore::AccessibilityObject::currentState const): |
| (WebCore::AccessibilityObject::roleDescription const): |
| (WebCore::AccessibilityObject::keyShortcutsValue const): |
| (WebCore::AccessibilityObject::placeholderValue const): |
| (WebCore::AccessibilityObject::supportsARIAAttributes const): |
| (WebCore::AccessibilityObject::sortDirection const): |
| (WebCore::AccessibilityObject::supportsHasPopup const): |
| (WebCore::AccessibilityObject::hasPopupValue const): |
| (WebCore::AccessibilityObject::supportsSetSize const): |
| (WebCore::AccessibilityObject::supportsPosInSet const): |
| (WebCore::AccessibilityObject::setSize const): |
| (WebCore::AccessibilityObject::posInSet const): |
| (WebCore::AccessibilityObject::supportsPressed const): |
| (WebCore::AccessibilityObject::supportsExpanded const): |
| (WebCore::AccessibilityObject::isExpanded const): |
| (WebCore::AccessibilityObject::checkboxOrRadioValue const): |
| (WebCore::AccessibilityObject::pressedIsPresent const): |
| (WebCore::AccessibilityObject::isAXHidden const): |
| (WebCore::AccessibilityObject::ariaActiveDescendantReferencingElements const): |
| (WebCore::AccessibilityObject::ariaDetailsElements const): |
| (WebCore::AccessibilityObject::ariaDetailsReferencingElements const): |
| (WebCore::AccessibilityObject::ariaErrorMessageElements const): |
| (WebCore::AccessibilityObject::ariaErrorMessageReferencingElements const): |
| (WebCore::AccessibilityObject::setIsIgnoredFromParentDataForChild): |
| (WebCore::AccessibilityObject::hasProperty const): Deleted. |
| (WebCore::AccessibilityObject::stringValueForProperty const): Deleted. |
| (WebCore::AccessibilityObject::boolValueForProperty const): Deleted. |
| (WebCore::AccessibilityObject::intValueForProperty const): Deleted. |
| (WebCore::AccessibilityObject::unsignedValueForProperty const): Deleted. |
| (WebCore::AccessibilityObject::doubleValueForProperty const): Deleted. |
| (WebCore::AccessibilityObject::elementValueForProperty const): Deleted. |
| (WebCore::AccessibilityObject::elementsFromProperty const): Deleted. |
| (WebCore::AccessibilityObject::elementsReferencedByProperty const): Deleted. |
| * accessibility/AccessibilityObject.h: |
| * accessibility/AccessibilityRenderObject.cpp: |
| (WebCore::AccessibilityRenderObject::stringValue const): |
| (WebCore::AccessibilityRenderObject::exposesTitleUIElement const): |
| (WebCore::AccessibilityRenderObject::defaultObjectInclusion const): |
| (WebCore::AccessibilityRenderObject::isSelected const): |
| (WebCore::AccessibilityRenderObject::activeDescendant const): |
| (WebCore::AccessibilityRenderObject::determineAccessibilityRole): |
| (WebCore::AccessibilityRenderObject::orientation const): |
| (WebCore::AccessibilityRenderObject::canSetExpandedAttribute const): |
| (WebCore::AccessibilityRenderObject::liveRegionStatus const): |
| (WebCore::AccessibilityRenderObject::liveRegionRelevant const): |
| (WebCore::AccessibilityRenderObject::liveRegionAtomic const): |
| (WebCore::AccessibilityRenderObject::isBusy const): |
| * accessibility/AccessibilityTable.cpp: |
| (WebCore::AccessibilityTable::isDataTable const): |
| (WebCore::AccessibilityTable::axColumnCount const): |
| (WebCore::AccessibilityTable::axRowCount const): |
| * accessibility/AccessibilityTableCell.cpp: |
| (WebCore::AccessibilityTableCell::axColumnIndex const): |
| (WebCore::AccessibilityTableCell::axRowIndex const): |
| (WebCore::AccessibilityTableCell::axColumnSpan const): |
| (WebCore::AccessibilityTableCell::axRowSpan const): |
| * accessibility/AccessibilityTableRow.cpp: |
| (WebCore::AccessibilityTableRow::axColumnIndex const): |
| (WebCore::AccessibilityTableRow::axRowIndex const): |
| * accessibility/AccessibleNode.cpp: Removed. |
| * accessibility/AccessibleNode.h: Removed. |
| * accessibility/AccessibleNode.idl: Removed. |
| * accessibility/mac/WebAccessibilityObjectWrapperMac.mm: |
| (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]): |
| * bindings/js/WebCoreBuiltinNames.h: |
| * dom/Element.cpp: |
| (WebCore::Element::canContainRangeEndPoint const): |
| (WebCore::Element::accessibleNode): Deleted. |
| (WebCore::Element::existingAccessibleNode const): Deleted. |
| * dom/Element.h: |
| * dom/Element.idl: |
| * dom/ElementRareData.cpp: |
| * dom/ElementRareData.h: |
| (WebCore::ElementRareData::accessibleNode const): Deleted. |
| (WebCore::ElementRareData::setAccessibleNode): Deleted. |
| * editing/TextIterator.cpp: |
| (WebCore::isRendererReplacedElement): |
| * rendering/RenderMenuList.cpp: |
| (RenderMenuList::itemAccessibilityText const): |
| |
| 2018-02-13 Zalan Bujtas <zalan@apple.com> |
| |
| [RenderTreeBuilder] Move RenderButton::takeChild() to RenderTreeBuilder |
| https://bugs.webkit.org/show_bug.cgi?id=182732 |
| <rdar://problem/37500564> |
| |
| Reviewed by Antti Koivisto. |
| |
| No change of functionality. |
| |
| * rendering/RenderButton.cpp: |
| (WebCore::RenderButton::setInnerRenderer): |
| (WebCore::RenderButton::takeChild): Deleted. |
| * rendering/RenderButton.h: |
| * rendering/updating/RenderTreeBuilder.cpp: |
| (WebCore::RenderTreeBuilder::takeChildFromRenderButton): |
| * rendering/updating/RenderTreeBuilder.h: |
| |
| 2018-02-13 Alicia Boya García <aboya@igalia.com> |
| |
| [Gstreamer][MSE] Add string representation for GStreamerMediaSample |
| https://bugs.webkit.org/show_bug.cgi?id=180262 |
| |
| Reviewed by Xabier Rodriguez-Calvar. |
| |
| * platform/graphics/gstreamer/mse/GStreamerMediaSample.cpp: |
| (WebCore::GStreamerMediaSample::offsetTimestampsBy): |
| * platform/graphics/gstreamer/mse/GStreamerMediaSample.h: |
| |
| 2018-02-12 Chris Fleizach <cfleizach@apple.com> |
| |
| AX: defer focusedUIElement notifications |
| https://bugs.webkit.org/show_bug.cgi?id=182643 |
| <rdar://problem/37394310> |
| |
| Reviewed by Zalan Bujtas. |
| |
| Deferring focus changes for accessibility has a number of benefits. |
| 1) Reduces the chance of calling into layout during layout. |
| 2) Coalesces multiple focus notifications that would be needlessly sent. |
| 3) Improves performance by not calling out to the accessibility notification machinery during layout. |
| |
| In this patch, I also started making more AXObjectCache calls private. This will reduce the chance that clients |
| will call into AXObjectCache during unexpected times. |
| |
| * accessibility/AXObjectCache.cpp: |
| (WebCore::AXObjectCache::deferFocusedUIElementChangeIfNeeded): |
| (WebCore::conditionallyAddNodeToFilterList): |
| (WebCore::filterVectorPairForRemoval): |
| (WebCore::filterMapForRemoval): |
| (WebCore::filterListForRemoval): |
| (WebCore::AXObjectCache::prepareForDocumentDestruction): |
| (WebCore::AXObjectCache::performDeferredCacheUpdate): |
| * accessibility/AXObjectCache.h: |
| * dom/Document.cpp: |
| (WebCore::Document::setFocusedElement): |
| |
| 2018-02-12 John Wilander <wilander@apple.com> |
| |
| Resource Load Statistics: Classify resources as prevalent based on redirects to other prevalent resources |
| https://bugs.webkit.org/show_bug.cgi?id=182664 |
| <rdar://problem/37372572> |
| |
| Reviewed by Brent Fulgham. |
| |
| Tests: http/tests/resourceLoadStatistics/classify-as-prevalent-based-on-subresource-redirect-collusion.html |
| http/tests/resourceLoadStatistics/classify-as-prevalent-based-on-top-frame-redirect-collusion.html |
| http/tests/resourceLoadStatistics/classify-as-prevalent-based-on-top-frame-unique-redirects-to.html |
| |
| * loader/ResourceLoadObserver.cpp: |
| (WebCore::ResourceLoadObserver::logFrameNavigation): |
| We now collect statistics on top frame navigational redirects too, both to and from. |
| (WebCore::ResourceLoadObserver::logSubresourceLoading): |
| We now collect statistics on redirects from in addition to the existing redirects to. |
| * loader/ResourceLoadStatistics.cpp: |
| (WebCore::ResourceLoadStatistics::encode const): |
| (WebCore::ResourceLoadStatistics::decode): |
| (WebCore::ResourceLoadStatistics::toString const): |
| (WebCore::ResourceLoadStatistics::merge): |
| * loader/ResourceLoadStatistics.h: |
| Three new fields: |
| - topFrameUniqueRedirectsTo |
| - topFrameUniqueRedirectsFrom |
| - subresourceUniqueRedirectsFrom |
| |
| 2018-02-12 Zalan Bujtas <zalan@apple.com> |
| |
| [RenderTreeBuilder] Move RenderMenuList::takeChild() to RenderTreeBuilder |
| https://bugs.webkit.org/show_bug.cgi?id=182715 |
| <rdar://problem/37477050> |
| |
| Reviewed by Antti Koivisto. |
| |
| No change in functionality. |
| |
| * rendering/RenderMenuList.cpp: |
| (RenderMenuList::takeChild): Deleted. |
| * rendering/RenderMenuList.h: |
| * rendering/updating/RenderTreeBuilder.cpp: |
| (WebCore::RenderTreeBuilder::takeChild): |
| (WebCore::RenderTreeBuilder::takeChildFromRenderMenuList): |
| * rendering/updating/RenderTreeBuilder.h: |
| |
| 2018-02-12 Ross Kirsling <ross.kirsling@sony.com> |
| |
| Unify UserAgent into WebCore/platform. |
| https://bugs.webkit.org/show_bug.cgi?id=182716 |
| |
| Reviewed by Michael Catanzaro. |
| |
| No change in functionality. |
| |
| * SourcesCocoa.txt: |
| * SourcesIOS.txt: |
| * SourcesMac.txt: |
| * WebCore.xcodeproj/project.pbxproj: |
| * page/cocoa/UserAgent.h: Removed. |
| * platform/UserAgent.h: |
| * platform/cocoa/UserAgentCocoa.mm: Renamed from Source/WebCore/page/cocoa/UserAgent.mm. |
| * platform/ios/UserAgentIOS.mm: Renamed from Source/WebCore/page/ios/UserAgentIOS.mm. |
| * platform/mac/UserAgentMac.mm: Renamed from Source/WebCore/page/mac/UserAgentMac.mm. |
| |
| 2018-02-12 Antoine Quint <graouts@apple.com> |
| |
| [Web Animations] Support the copy constructors for KeyframeEffectReadOnly and KeyframeEffect |
| https://bugs.webkit.org/show_bug.cgi?id=182712 |
| |
| Reviewed by Dean Jackson. |
| |
| We now support the variants for the KeyframeEffectReadOnly and KeyframeEffect constructors where |
| another KeyframeEffectReadOnly is provided as a source. All timing, keyframe and target properties |
| of that source are copied on the newly-constructed KeyframeEffect. |
| |
| To support copying properties, we add new copyPropertiesFromSource() methods to |
| AnimationEffectTimingReadOnly and KeyframeEffectReadOnly to encapsulate copying various |
| member variables in the relevant classes. Copying properties of the backing KeyframeList |
| is performed in KeyframeEffectReadOnly::copyPropertiesFromSource() via public KeyframeList |
| methods. |
| |
| * animation/AnimationEffectTimingReadOnly.cpp: |
| (WebCore::AnimationEffectTimingReadOnly::copyPropertiesFromSource): |
| * animation/AnimationEffectTimingReadOnly.h: |
| * animation/KeyframeEffect.cpp: |
| (WebCore::KeyframeEffect::create): |
| * animation/KeyframeEffect.h: |
| * animation/KeyframeEffect.idl: |
| * animation/KeyframeEffectOptions.idl: |
| * animation/KeyframeEffectReadOnly.cpp: |
| (WebCore::KeyframeEffectReadOnly::create): |
| (WebCore::KeyframeEffectReadOnly::copyPropertiesFromSource): |
| * animation/KeyframeEffectReadOnly.h: |
| * animation/KeyframeEffectReadOnly.idl: |
| |
| 2018-02-12 Zalan Bujtas <zalan@apple.com> |
| |
| [RenderTreeBuilder] Introduce RenderTreebuilder::takeChild |
| https://bugs.webkit.org/show_bug.cgi?id=182707 |
| <rdar://problem/37473433> |
| |
| Reviewed by Antti Koivisto. |
| |
| All takeChild calls should go through RenderTreeBuilder::takeChild from now on. |
| This patch also moves the Ruby related takeChild calls to RenderTreeBuilder. |
| |
| No change in functionality. |
| |
| * rendering/RenderButton.cpp: |
| (WebCore::RenderButton::takeChild): |
| * rendering/RenderElement.cpp: |
| (WebCore::RenderElement::removeAndDestroyChild): |
| * rendering/RenderFullScreen.cpp: |
| (WebCore::RenderFullScreen::wrapExistingRenderer): |
| (WebCore::RenderFullScreen::unwrapRenderer): |
| * rendering/RenderMenuList.cpp: |
| (RenderMenuList::takeChild): |
| * rendering/RenderRuby.cpp: |
| (WebCore::RenderRubyAsInline::takeChild): Deleted. |
| (WebCore::RenderRubyAsBlock::takeChild): Deleted. |
| * rendering/RenderRuby.h: |
| * rendering/RenderRubyRun.cpp: |
| (WebCore::RenderRubyRun::takeChild): Deleted. |
| * rendering/RenderRubyRun.h: |
| * rendering/updating/RenderTreeBuilder.cpp: |
| (WebCore::RenderTreeBuilder::takeChild): |
| (WebCore::RenderTreeBuilder::takeChildFromRenderRubyAsInline): Deleted. |
| (WebCore::RenderTreeBuilder::takeChildFromRenderRubyAsBlock): Deleted. |
| (WebCore::RenderTreeBuilder::takeChildFromRenderRubyRun): Deleted. |
| * rendering/updating/RenderTreeBuilder.h: |
| * rendering/updating/RenderTreeBuilderFirstLetter.cpp: |
| (WebCore::RenderTreeBuilder::FirstLetter::updateStyle): |
| * rendering/updating/RenderTreeBuilderList.cpp: |
| (WebCore::RenderTreeBuilder::List::updateItemMarker): |
| * rendering/updating/RenderTreeBuilderMultiColumn.cpp: |
| (WebCore::RenderTreeBuilder::MultiColumn::createFragmentedFlow): |
| (WebCore::RenderTreeBuilder::MultiColumn::destroyFragmentedFlow): |
| (WebCore::RenderTreeBuilder::MultiColumn::processPossibleSpannerDescendant): |
| * rendering/updating/RenderTreeBuilderRuby.cpp: |
| (WebCore::RenderTreeBuilder::Ruby::takeChild): |
| * rendering/updating/RenderTreeBuilderTable.cpp: |
| (WebCore::RenderTreeBuilder::Table::collapseAndDestroyAnonymousSiblingRows): |
| |
| 2018-02-12 Zalan Bujtas <zalan@apple.com> |
| |
| [RenderTreeBuilder] Move RenderBlock::dropAnonymousBoxChild to RenderTreeBuilder |
| https://bugs.webkit.org/show_bug.cgi?id=182704 |
| <rdar://problem/37469469> |
| |
| Reviewed by Antti Koivisto. |
| |
| All the callsites are now in RenderTreeBuilder. |
| |
| No change in functionality. |
| |
| * rendering/RenderBlock.cpp: |
| (WebCore::RenderBlock::dropAnonymousBoxChild): Deleted. |
| * rendering/RenderBlock.h: |
| * rendering/updating/RenderTreeBuilder.cpp: |
| (WebCore::RenderTreeBuilder::removeAnonymousWrappersForInlineChildrenIfNeeded): |
| (WebCore::RenderTreeBuilder::dropAnonymousBoxChild): |
| * rendering/updating/RenderTreeBuilder.h: |
| * rendering/updating/RenderTreeBuilderBlock.cpp: |
| (WebCore::RenderTreeBuilder::Block::takeChild): |
| (WebCore::RenderTreeBuilder::Block::dropAnonymousBoxChild): |
| * rendering/updating/RenderTreeBuilderBlock.h: |
| |
| 2018-02-12 Matt Lewis <jlewis3@apple.com> |
| |
| Unreviewed, rolling out r228376. |
| |
| This caused accessibility/mac/selection-notification-focus- |
| change.html to become flaky on macOS. |
| |
| Reverted changeset: |
| |
| "AX: defer focusedUIElement notifications" |
| https://bugs.webkit.org/show_bug.cgi?id=182643 |
| https://trac.webkit.org/changeset/228376 |
| |
| 2018-02-12 Ryan Haddad <ryanhaddad@apple.com> |
| |
| [iOS] media tests failing ASSERT_NOT_REACHED() in WebCore::VideoFullscreenInterfaceAVKit::cleanupFullscreen() |
| https://bugs.webkit.org/show_bug.cgi?id=182527 |
| |
| Reviewed by Alexey Proskuryakov. |
| |
| Temporarily remove an assertion from VideoFullscreenInterfaceAVKit to stop tests from crashing on iOS |
| while the root cause is being investigated. |
| |
| * platform/ios/VideoFullscreenInterfaceAVKit.mm: |
| (VideoFullscreenInterfaceAVKit::exitFullscreenHandler): |
| |
| 2018-02-12 Zalan Bujtas <zalan@apple.com> |
| |
| [RenderTreeBuilder] Remove redundant RenderTreeBuilder instance |
| https://bugs.webkit.org/show_bug.cgi?id=182700 |
| <rdar://problem/37463958> |
| |
| Reviewed by Antti Koivisto. |
| |
| * rendering/RenderView.cpp: |
| (WebCore::RenderView::willBeDestroyed): |
| |
| 2018-02-12 Chris Fleizach <cfleizach@apple.com> |
| |
| AX: defer focusedUIElement notifications |
| https://bugs.webkit.org/show_bug.cgi?id=182643 |
| <rdar://problem/37394310> |
| |
| Reviewed by Zalan Bujtas. |
| |
| Deferring focus changes for accessibility has a number of benefits. |
| 1) Reduces the chance of calling into layout during layout. |
| 2) Coalesces multiple focus notifications that would be needlessly sent. |
| 3) Improves performance by not calling out to the accessibility notification machinery during layout. |
| |
| In this patch, I also started making more AXObjectCache calls private. This will reduce the chance that clients |
| will call into AXObjectCache during unexpected times. |
| |
| * accessibility/AXObjectCache.cpp: |
| (WebCore::AXObjectCache::deferFocusedUIElementChangeIfNeeded): |
| (WebCore::conditionallyAddNodeToFilterList): |
| (WebCore::filterVectorPairForRemoval): |
| (WebCore::filterMapForRemoval): |
| (WebCore::filterListForRemoval): |
| (WebCore::AXObjectCache::prepareForDocumentDestruction): |
| (WebCore::AXObjectCache::performDeferredCacheUpdate): |
| * accessibility/AXObjectCache.h: |
| * dom/Document.cpp: |
| (WebCore::Document::setFocusedElement): |
| |
| 2018-02-11 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk> |
| |
| [GTK] Scrolling sometimes jumps around |
| https://bugs.webkit.org/show_bug.cgi?id=178519 |
| |
| Reviewed by Michael Catanzaro. |
| |
| * platform/gtk/ScrollAnimatorGtk.cpp: |
| (WebCore::ScrollAnimatorGtk::computeVelocity): use -1 as the multiplier for the accumulated deltas, |
| since all we need is to make them negative. Multiplying by -1000 leads to very high velocities being |
| returned, causing the viewport to scroll to the end of the page. |
| |
| 2018-02-10 Wenson Hsieh <wenson_hsieh@apple.com> |
| |
| Remove an unused static variable in DeprecatedGlobalSettings.h |
| https://bugs.webkit.org/show_bug.cgi?id=182672 |
| |
| Reviewed by Joseph Pecoraro. |
| |
| After r227282, this flag is no longer used anywhere. No change in behavior. |
| |
| * page/DeprecatedGlobalSettings.h: |
| |
| 2018-02-10 Zalan Bujtas <zalan@apple.com> |
| |
| [RenderTreeBuilder] Move RenderBlock::takeChild mutation to a RenderTreeBuilder |
| https://bugs.webkit.org/show_bug.cgi?id=182662 |
| <rdar://problem/37408571> |
| |
| Reviewed by Simon Fraser. |
| |
| No change in functionality. |
| |
| * rendering/RenderBlock.cpp: |
| (WebCore::RenderBlock::takeChild): |
| (WebCore::canDropAnonymousBlock): Deleted. |
| (WebCore::canMergeContiguousAnonymousBlocks): Deleted. |
| * rendering/RenderBlock.h: |
| (WebCore::RenderBlock::moveAllChildrenIncludingFloatsTo): |
| * rendering/RenderBlockFlow.h: |
| * rendering/updating/RenderTreeBuilder.cpp: |
| (WebCore::RenderTreeBuilder::takenChildFromRenderBlock): |
| * rendering/updating/RenderTreeBuilder.h: |
| * rendering/updating/RenderTreeBuilderBlock.cpp: |
| (WebCore::canDropAnonymousBlock): |
| (WebCore::canMergeContiguousAnonymousBlocks): |
| (WebCore::RenderTreeBuilder::Block::takeChild): |
| * rendering/updating/RenderTreeBuilderBlock.h: |
| |
| 2018-02-08 Ryosuke Niwa <rniwa@webkit.org> |
| |
| REGRESSION (r223440): Copying & pasting a list from Microsoft Word to TinyMCE fails |
| https://bugs.webkit.org/show_bug.cgi?id=182564 |
| |
| Reviewed by Wenson Hsieh. |
| |
| Turns out that Microsoft Word generates p and span elements with special styles instead of standard |
| ul and ol elements when copying a list items, and TinyMCE has a specialized code path to process |
| this proprietary format of Microsoft Word. The regression was caused by WebKit's sanitization code |
| stripping away these non-standard CSS rules and inline styles. |
| |
| To preseve pre-r223440 behavior in TinyMCE, we preserve the following in a HTML markup: |
| |
| 1. The "html" element at the beginning with xmlns content attributes |
| 2. @list rules in a style element starting with "/* List Definitions */" comment |
| 3. inline style content attribute with "mso-list" property |
| 4. comments conditional sections with "[if !supportLists]" and "[endif]" |
| |
| (1) is needed for TinyMCE to trigger the specialized code path for Microsoft Word. (2) contains |
| the information about the structure of list items. (3) is needed to associate each p element with |
| a rule in (2). (4) is needed to strip away the content generated as list markers (e.g. dots). |
| |
| We enable this "MSO list quirks" when the content comes from a non-WebKit client or a WebKit client |
| that doesn't enable custom pasteboard data (detected by the content origin being null), and the HTML |
| markup starts with a specific sequence of characters generated by Microsoft Word. |
| |
| Test: http/tests/security/clipboard/copy-paste-html-across-origin-strips-mso-list.html |
| PasteHTML.PreservesMSOList |
| PasteHTML.StripsMSOListWhenMissingMSOHTMLElement |
| PasteWebArchive.PreservesMSOList |
| PasteWebArchive.StripsMSOListWhenMissingMSOHTMLElement |
| |
| * editing/MarkupAccumulator.cpp: |
| (WebCore::MarkupAccumulator::appendTextSubstring): Added. |
| * editing/MarkupAccumulator.h: |
| * editing/WebContentReader.cpp: |
| (WebCore::FrameWebContentReader::msoListQuirksForMarkup const): Added. Enables the MSO list quirks |
| if the content origin is null. The content origin specifies the pasteboard content's origin if it's |
| copied in WebKit with custom pasteboard data types enabled. In all other applications, it would be |
| set to null. |
| * editing/WebContentReader.h: |
| * editing/cocoa/WebContentReaderCocoa.mm: |
| (WebCore::markupForFragmentInDocument): Moved to markup.cpp as sanitizedMarkupForFragmentInDocument. |
| (WebCore::sanitizeMarkupWithArchive): |
| (WebCore::WebContentReader::readWebArchive): Always disables MSO list quirks since this code path is |
| only used by WebKit's native code to paste content. |
| (WebCore::WebContentMarkupReader::readWebArchive): Calls msoListQuirksForMarkup since this is the code |
| path used by DataTransfer. |
| (WebCore::WebContentReader::readHTML): Always disables MSO list quirks since this code path is only |
| used by WebKit's native code to paste content. |
| (WebCore::WebContentMarkupReader::readHTML): Calls msoListQuirksForMarkup since this is the code path |
| used by DataTransfer. |
| * editing/markup.cpp: |
| (WebCore::sanitizeMarkup): Use sanitizedMarkupForFragmentInDocument to share code. |
| (WebCore::MSOListMode): Added. Set to Preserve if the sanitized markup is the one generated by |
| Microsoft Word, and MSO list quirks should actually kick in. This is unlike MSOListQuirks, which is |
| set to Enable whenever the content COULD be the one generated by Microsoft Word. |
| (WebCore::StyledMarkupAccumulator): Added a special MSO list preservation mode enabled by MSOListMode. |
| (WebCore::StyledMarkupAccumulator::StyledMarkupAccumulator): |
| (WebCore::StyledMarkupAccumulator::appendElement): Preseve (3). Unfortunately, TinyMCE only recognizes |
| mso-list and related properties only if they appear on their own. But we also need to preserve |
| the inline style generated using the computed style since we would lose the inline styles of the text |
| otherwise (e.g. red text and bold font). To workaround this, we generate two style content attributes, |
| one containing computed styles and another one containing mso-list. Luckily, the HTML parsing algorithm |
| dictates that the first attribute always wins when more than one attributes of the same name appears, |
| so we place the computed style's style attribute first so that the pasted content in non-TinyMCE |
| environment will continue to work. |
| (WebCore::StyledMarkupAccumulator::traverseNodesForSerialization): |
| (WebCore::StyledMarkupAccumulator::appendNodeToPreserveMSOList): Added. Generates special markup for |
| the conditional statements and the special style element with @list rules. |
| (WebCore::createMarkupInternal): |
| (WebCore::createMarkup): |
| (WebCore::sanitizedMarkupForFragmentInDocument): Moved from WebContentReaderCocoa.mm. If MSOListQuirks |
| is set to Enable, and the markup starts with a specific sequence of characters, generate the markup |
| with the newly added quirks code in StyledMarkupAccumulator, and wrap it in a special "html" element |
| TinyMCE recognizes. |
| * editing/markup.h: |
| (WebCore::MSOListQuirks): Added. Set to CheckIfNeeded if the content COULD require MSO list quirks. |
| |
| 2018-02-09 Dean Jackson <dino@apple.com> |
| |
| ImageBitmapRenderingContext should be Runtime guarded |
| https://bugs.webkit.org/show_bug.cgi?id=182665 |
| <rdar://problem/37411410> |
| |
| Reviewed by Sam Weinig. |
| |
| Add a flag to ensure the ImageBitmapRenderingContext interface is only |
| visible when the runtime feature is enabled. |
| |
| * bindings/js/WebCoreBuiltinNames.h: |
| * html/canvas/ImageBitmapRenderingContext.idl: |
| |
| 2018-02-09 Don Olmstead <don.olmstead@sony.com> |
| |
| [CMake] Make PAL headers copies |
| https://bugs.webkit.org/show_bug.cgi?id=182645 |
| |
| Reviewed by Alex Christensen. |
| |
| No new tests. No change in behavior. |
| |
| * CMakeLists.txt: |
| |
| 2018-02-09 Zalan Bujtas <zalan@apple.com> |
| |
| [RenderTreeBuilder] Move RenderRubyRun::takeChild mutation to a RenderTreeBuilder |
| https://bugs.webkit.org/show_bug.cgi?id=182655 |
| <rdar://problem/37406801> |
| |
| Reviewed by Simon Fraser. |
| |
| No change in functionality. |
| |
| * rendering/RenderRubyRun.cpp: |
| (WebCore::RenderRubyRun::takeChild): |
| * rendering/updating/RenderTreeBuilder.cpp: |
| (WebCore::RenderTreeBuilder::takeChildFromRenderRubyRun): |
| * rendering/updating/RenderTreeBuilder.h: |
| * rendering/updating/RenderTreeBuilderRuby.cpp: |
| (WebCore::RenderTreeBuilder::Ruby::takeChild): |
| * rendering/updating/RenderTreeBuilderRuby.h: |
| |
| 2018-02-09 Andy Estes <aestes@apple.com> |
| |
| [Payment Request] Apple Pay sheet does not dismiss when calling complete() with result "unknown" or "fail" |
| https://bugs.webkit.org/show_bug.cgi?id=182658 |
| <rdar://problem/37293917> |
| |
| Reviewed by Brady Eidson. |
| |
| When PaymentResponse::complete() is called with a result of "unknown" or "fail", we should |
| treat this as a fatal error and dismiss the Apple Pay sheet. However, we were adding an |
| error with code "unknown" to the authorization result, which PassKit interprets as a |
| non-fatal error. Instead, we should not set any errors and just use a status code of |
| PaymentAuthorizationStatus::Failure, which PassKit interprets as a fatal error, dismissing |
| the sheet. |
| |
| No test possible. |
| |
| * Modules/applepay/paymentrequest/ApplePayPaymentHandler.cpp: |
| (WebCore::ApplePayPaymentHandler::complete): |
| |
| 2018-02-09 Wenson Hsieh <wenson_hsieh@apple.com> |
| |
| Pasting from Excel no longer provides text/html data |
| https://bugs.webkit.org/show_bug.cgi?id=182636 |
| <rdar://problem/37087060> |
| |
| Reviewed by Ryosuke Niwa. |
| |
| After r222656, we treat images on the pasteboard as files. However, we also have an existing policy which hides |
| text data ("text/uri-list", "text/html", "text/plain") from the page when files are present on the pasteboard. |
| When copying a table, Microsoft Excel writes a rendering of the table to the pasteboard as an image. This means |
| that we'll hide other data types (importantly, 'text/html') upon pasting, even though important clients (such as |
| Google Docs and Confluence) depend on the 'text/html' data in order to correctly handle the paste (rather than |
| paste as an image of a table). |
| |
| To fix this, we add an exception to the DataTransfer.getData codepath when the pasteboard contains files. |
| Instead of always returning the empty string for text/html, we still allow pasteboard access, but only read |
| from a limited set of rich text types, i.e. web archive, RTF(D), and HTML markup. Importantly, this prevents |
| us from exposing any file paths that appear as plain text or URLs on the pasteboard. Just as in the regular |
| codepath for getData(), if the pasteboard data comes from the same origin, we allow unsanitized access; |
| otherwise, we use WebContentMarkupReader to extract markup from the pasteboard. |
| |
| Tests: PasteMixedContent.ImageFileAndPlainText |
| PasteMixedContent.ImageFileAndWebArchive |
| PasteMixedContent.ImageFileAndHTML |
| PasteMixedContent.ImageFileAndRTF |
| PasteMixedContent.ImageFileAndURL |
| PasteMixedContent.ImageFileWithHTMLAndURL |
| DataInteractionTests.DataTransferGetDataWhenDroppingImageAndMarkup |
| |
| Also rebaselined some layout tests, which cover changes in behavior when dropping on macOS and pasting on iOS. |
| |
| * dom/DataTransfer.cpp: |
| (WebCore::DataTransfer::getDataForItem const): |
| |
| Augment the codepath handling the case where the pasteboard contains files, such that we allow reading |
| "text/html", but only from rich text types. |
| |
| (WebCore::DataTransfer::readStringFromPasteboard const): |
| |
| Factor out logic for reading from the pasteboard into a private helper. This is called in two places from |
| getDataForItem: in the normal (existing) path, and in the case where we allow 'text/html' to be read despite |
| files appearing in the pasteboard. |
| |
| One important difference here is that this helper now takes a WebContentReadingPolicy, whose purpose is to |
| prevent reading from non-rich-text types when files appear in the pasteboard. |
| |
| Another tweak here is that we now use `lowercaseType` instead of the original (unadjusted) `type` when reading |
| from the pasteboard. This doesn't seem to be intended in the first place. |
| |
| (WebCore::DataTransfer::types const): |
| |
| Tweak the implementation of DataTransfer.types() in the case where files exist on the pasteboard, such that we |
| also add "text/html" if it is present in the list of DOM-safe types. |
| |
| * dom/DataTransfer.h: |
| * platform/Pasteboard.h: |
| |
| Introduce WebContentReadingPolicy, which indicates whether or not we should limit web content reading from the |
| pasteboard to only rich text types upon paste or drop. Normally, we allow all types to be read as web content |
| (::AnyType), but when files appear on the pasteboard, we force OnlyRichTextTypes to ensure that no other types |
| can unintentionally be read back as web content. |
| |
| * platform/StaticPasteboard.h: |
| * platform/gtk/PasteboardGtk.cpp: |
| (WebCore::Pasteboard::read): |
| * platform/ios/PasteboardIOS.mm: |
| |
| Teach Pasteboard (on iOS) to respect WebContentReadingPolicy. |
| |
| (WebCore::isTypeAllowedByReadingPolicy): |
| (WebCore::Pasteboard::read): |
| (WebCore::Pasteboard::readRespectingUTIFidelities): |
| * platform/mac/PasteboardMac.mm: |
| |
| Teach Pasteboard (on macOS) to respect WebContentReadingPolicy. |
| |
| (WebCore::Pasteboard::read): |
| * platform/win/PasteboardWin.cpp: |
| (WebCore::Pasteboard::read): |
| * platform/wpe/PasteboardWPE.cpp: |
| (WebCore::Pasteboard::read): |
| |
| Adjust non-Cocoa Pasteboard implementations for an interface change. |
| |
| 2018-02-09 Zalan Bujtas <zalan@apple.com> |
| |
| [RenderTreeBuilder] Move RenderRubyAsInline/AsBlock::takeChild mutation to a RenderTreeBuilder |
| https://bugs.webkit.org/show_bug.cgi?id=182651 |
| <rdar://problem/37405042> |
| |
| Reviewed by Antti Koivisto. |
| |
| No change in functionality. |
| |
| * rendering/RenderRuby.cpp: |
| (WebCore::RenderRubyAsInline::takeChild): |
| (WebCore::RenderRubyAsBlock::takeChild): |
| (WebCore::isAnonymousRubyInlineBlock): Deleted. |
| (WebCore::isRubyChildForNormalRemoval): Deleted. |
| (WebCore::findRubyRunParent): Deleted. |
| * rendering/updating/RenderTreeBuilder.cpp: |
| (WebCore::RenderTreeBuilder::takeChildFromRenderRubyAsInline): |
| (WebCore::RenderTreeBuilder::takeChildFromRenderRubyAsBlock): |
| * rendering/updating/RenderTreeBuilder.h: |
| * rendering/updating/RenderTreeBuilderRuby.cpp: |
| (WebCore::findRubyRunParent): |
| (WebCore::RenderTreeBuilder::Ruby::takeChild): |
| * rendering/updating/RenderTreeBuilderRuby.h: |
| |
| 2018-02-09 Per Arne Vollan <pvollan@apple.com> |
| |
| Assert that NSApp is not running in the WebProcess. |
| https://bugs.webkit.org/show_bug.cgi?id=182553 |
| |
| Reviewed by Simon Fraser. |
| |
| In WebCore, there are a few places where NSApp is referenced. Since the WebContent process |
| is no longer using the NSApplication run loop, and NSApp is no longer guaranteed to be |
| valid, we should make sure that the NSApp is not referenced by the WebContent process or |
| the Network process, by asserting that the NSApplication event loop is running when NSApp |
| is referenced. It is still ok for the UIProcess to reference NSApp. Adding these assert |
| will help catch NSApp references when the NSApplication run loop is not used. |
| |
| Also, do not post a fake mouse event in PasteBoard::setDragImage when the NSApplication |
| run loop is not running, since this is only relevant in WK1. |
| |
| No new tests, covered by existing tests. |
| |
| * page/mac/EventHandlerMac.mm: |
| (WebCore::lastEventIsMouseUp): |
| (WebCore::EventHandler::sendFakeEventsAfterWidgetTracking): |
| * platform/mac/PasteboardMac.mm: |
| (WebCore::Pasteboard::setDragImage): |
| |
| 2018-02-09 Zalan Bujtas <zalan@apple.com> |
| |
| [RenderTreeBuilder] Introduce RenderTreeBuilder to willBeDestoryed/removeFromParentAndDestroy |
| https://bugs.webkit.org/show_bug.cgi?id=182635 |
| <rdar://problem/37377489> |
| |
| Reviewed by Antti Koivisto. |
| |
| This patch helps finding callsites where we don't have a RenderTreeBuilder instance. |
| |
| No change in functionality. |
| |
| * dom/Document.cpp: |
| (WebCore::Document::setFullScreenRenderer): |
| * dom/Document.h: |
| * rendering/RenderBlock.cpp: |
| (WebCore::RenderBlock::willBeDestroyed): |
| (WebCore::RenderBlock::takeChild): |
| * rendering/RenderBlock.h: |
| * rendering/RenderBlockFlow.cpp: |
| (WebCore::RenderBlockFlow::willBeDestroyed): |
| * rendering/RenderBlockFlow.h: |
| * rendering/RenderBox.cpp: |
| (WebCore::RenderBox::willBeDestroyed): |
| * rendering/RenderBox.h: |
| * rendering/RenderBoxModelObject.cpp: |
| (WebCore::RenderBoxModelObject::willBeDestroyed): |
| (WebCore::RenderBoxModelObject::removeAndDestroyAllContinuations): |
| * rendering/RenderBoxModelObject.h: |
| * rendering/RenderButton.cpp: |
| (WebCore::RenderButton::setText): |
| * rendering/RenderCounter.cpp: |
| (WebCore::RenderCounter::willBeDestroyed): |
| * rendering/RenderCounter.h: |
| * rendering/RenderElement.cpp: |
| (WebCore::RenderElement::willBeDestroyed): |
| * rendering/RenderElement.h: |
| * rendering/RenderEmbeddedObject.cpp: |
| (WebCore::RenderEmbeddedObject::willBeDestroyed): |
| * rendering/RenderEmbeddedObject.h: |
| * rendering/RenderFragmentedFlow.cpp: |
| (WebCore::RenderFragmentedFlow::willBeDestroyed): |
| * rendering/RenderFragmentedFlow.h: |
| * rendering/RenderFullScreen.cpp: |
| (WebCore::RenderFullScreen::willBeDestroyed): |
| (WebCore::RenderFullScreen::wrapNewRenderer): |
| (WebCore::RenderFullScreen::wrapExistingRenderer): |
| (WebCore::RenderFullScreen::unwrapRenderer): |
| * rendering/RenderFullScreen.h: |
| * rendering/RenderImage.cpp: |
| (WebCore::RenderImage::willBeDestroyed): |
| * rendering/RenderImage.h: |
| * rendering/RenderInline.cpp: |
| (WebCore::RenderInline::willBeDestroyed): |
| * rendering/RenderInline.h: |
| * rendering/RenderLayerModelObject.cpp: |
| (WebCore::RenderLayerModelObject::willBeDestroyed): |
| * rendering/RenderLayerModelObject.h: |
| * rendering/RenderListBox.cpp: |
| (WebCore::RenderListBox::willBeDestroyed): |
| * rendering/RenderListBox.h: |
| * rendering/RenderListItem.cpp: |
| (WebCore::RenderListItem::willBeDestroyed): |
| * rendering/RenderListItem.h: |
| * rendering/RenderListMarker.cpp: |
| (WebCore::RenderListMarker::willBeDestroyed): |
| * rendering/RenderListMarker.h: |
| * rendering/RenderMenuList.cpp: |
| (WebCore::RenderMenuList::willBeDestroyed): |
| * rendering/RenderMenuList.h: |
| * rendering/RenderMultiColumnFlow.cpp: |
| (WebCore::RenderMultiColumnFlow::handleSpannerRemoval): |
| * rendering/RenderObject.cpp: |
| (WebCore::RenderObject::removeFromParentAndDestroy): |
| (WebCore::RenderObject::willBeDestroyed): |
| (WebCore::RenderObject::destroy): |
| * rendering/RenderObject.h: |
| * rendering/RenderReplaced.cpp: |
| (WebCore::RenderReplaced::willBeDestroyed): |
| * rendering/RenderReplaced.h: |
| * rendering/RenderRuby.cpp: |
| (WebCore::RenderRubyAsInline::takeChild): |
| (WebCore::RenderRubyAsBlock::takeChild): |
| * rendering/RenderSearchField.cpp: |
| (WebCore::RenderSearchField::willBeDestroyed): |
| * rendering/RenderSearchField.h: |
| * rendering/RenderSnapshottedPlugIn.cpp: |
| (WebCore::RenderSnapshottedPlugIn::willBeDestroyed): |
| * rendering/RenderSnapshottedPlugIn.h: |
| * rendering/RenderText.cpp: |
| (WebCore::RenderText::willBeDestroyed): |
| * rendering/RenderText.h: |
| * rendering/RenderTextControlMultiLine.cpp: |
| (WebCore::RenderTextControlMultiLine::willBeDestroyed): |
| * rendering/RenderTextControlMultiLine.h: |
| * rendering/RenderTextFragment.cpp: |
| (WebCore::RenderTextFragment::willBeDestroyed): |
| (WebCore::RenderTextFragment::setText): |
| * rendering/RenderTextFragment.h: |
| * rendering/RenderVideo.cpp: |
| (WebCore::RenderVideo::willBeDestroyed): |
| * rendering/RenderVideo.h: |
| * rendering/RenderView.cpp: |
| (WebCore::RenderView::willBeDestroyed): |
| * rendering/RenderView.h: |
| * rendering/RenderWidget.cpp: |
| (WebCore::RenderWidget::willBeDestroyed): |
| * rendering/RenderWidget.h: |
| * rendering/svg/RenderSVGBlock.cpp: |
| (WebCore::RenderSVGBlock::willBeDestroyed): |
| * rendering/svg/RenderSVGBlock.h: |
| * rendering/svg/RenderSVGImage.cpp: |
| (WebCore::RenderSVGImage::willBeDestroyed): |
| * rendering/svg/RenderSVGImage.h: |
| * rendering/svg/RenderSVGInline.cpp: |
| (WebCore::RenderSVGInline::willBeDestroyed): |
| * rendering/svg/RenderSVGInline.h: |
| * rendering/svg/RenderSVGModelObject.cpp: |
| (WebCore::RenderSVGModelObject::willBeDestroyed): |
| * rendering/svg/RenderSVGModelObject.h: |
| * rendering/svg/RenderSVGResourceContainer.cpp: |
| (WebCore::RenderSVGResourceContainer::willBeDestroyed): |
| * rendering/svg/RenderSVGResourceContainer.h: |
| * rendering/svg/RenderSVGRoot.cpp: |
| (WebCore::RenderSVGRoot::willBeDestroyed): |
| * rendering/svg/RenderSVGRoot.h: |
| * rendering/svg/RenderSVGText.cpp: |
| (WebCore::RenderSVGText::willBeDestroyed): |
| * rendering/svg/RenderSVGText.h: |
| * rendering/updating/RenderTreeBuilder.cpp: |
| (WebCore::RenderTreeBuilder::removeFromParentAndDestroyCleaningUpAnonymousWrappers): |
| * rendering/updating/RenderTreeBuilderList.cpp: |
| (WebCore::RenderTreeBuilder::List::updateItemMarker): |
| * rendering/updating/RenderTreeBuilderMultiColumn.cpp: |
| (WebCore::RenderTreeBuilder::MultiColumn::destroyFragmentedFlow): |
| * rendering/updating/RenderTreeBuilderRuby.cpp: |
| (WebCore::RenderTreeBuilder::Ruby::moveBlockChildren): |
| |
| 2018-02-09 Brent Fulgham <bfulgham@apple.com> |
| |
| [macOS, iOS] Expose OS marketing version in UserAgent |
| https://bugs.webkit.org/show_bug.cgi?id=182629 |
| <rdar://problem/37370975> |
| |
| Reviewed by Daniel Bates. |
| |
| Revert back to dynamically reading the operating system marketing version |
| rather than using a hard-coded version. |
| |
| * page/cocoa/UserAgent.mm: |
| (WebCore::systemMarketingVersionForUserAgentString): |
| |
| 2018-02-08 Antoine Quint <graouts@apple.com> |
| |
| [Web Animations] Refactor AnimationEffect and KeyframeEffect into AnimationEffectReadOnly, KeyframeEffectReadOnly and KeyframeEffect |
| https://bugs.webkit.org/show_bug.cgi?id=182608 |
| |
| Reviewed by Dean Jackson. |
| |
| Currently, we have an AnimationEffect class with read-write members and a KeyframeEffect subclass with read-write |
| members. The spec has an AnimationEffectReadOnly class, with read-only members, a KeyframeEffectReadOnly subclass, |
| with read-only members, and then the KeyframeEffect subclass (of KeyframeEffectReadOnly) with read-write members. |
| |
| Likewise, currently we have an AnimationEffectTiming class with read-write members. While the spec has this class |
| as well, it also specifies a read-only AnimationEffectTimingReadOnly superclass. |
| |
| In this patch we refactor the code to match the spec, which gives us a big boost in our WPT pass rate. The vast |
| majority of the code is just copied from one class to another verbatim. The limited actual code changes, all related |
| to the new subclassing, are: |
| |
| - AnimationEffectTimingReadOnly is not actually read-only as far as WebCore is concerned, it actually exposes setters |
| for all of its properties, but the IDL for this class specifies all properties as read-only, so we match the spec. The |
| reason for this is that it is necessary to be able to set members of an AnimationEffectTimingReadOnly object based on |
| a Variant<double, KeyframeEffectOptions> provided to Element.animate() or the KeyframeEffectReadOnly and KeyframeEffect |
| constructors, and the logic to handle properties in such dictionaries is the same as the logic required to set individual |
| members in AnimationEffectTiming. So in essence, the sole role of AnimationTimingEffect is to provide an IDL interface |
| with read-write members, but the parent class is itself read-write as far as WebCore is concerned. |
| |
| - AnimationEffectTimingReadOnly exposes a new setProperties() method which takes in a nullable Variant<double, KeyframeEffectOptions> |
| so that code that was previously specific to KeyframeEffect can be factored into this method and both the constructors of |
| KeyframeEffectReadOnly and KeyframeEffect can make use of it without code duplication. |
| |
| - The AnimationEffectReadOnly constructor now takes an AnimationEffectTimingReadOnly as input since that class and |
| KeyframeEffectReadOnly expose an AnimationEffectTimingReadOnly object, while KeyframeEffect exposes an |
| AnimationEffectTiming read-write object. This allows the KeyframeEffect constructor to provide the right object type. |
| |
| * CMakeLists.txt: |
| * DerivedSources.make: |
| * Sources.txt: |
| * WebCore.xcodeproj/project.pbxproj: |
| * animation/AnimationEffectReadOnly.cpp: Renamed from Source/WebCore/animation/AnimationEffect.cpp. |
| (WebCore::AnimationEffectReadOnly::AnimationEffectReadOnly): |
| (WebCore::AnimationEffectReadOnly::localTime const): |
| (WebCore::AnimationEffectReadOnly::phase const): |
| (WebCore::AnimationEffectReadOnly::activeTime const): |
| (WebCore::AnimationEffectReadOnly::overallProgress const): |
| (WebCore::AnimationEffectReadOnly::simpleIterationProgress const): |
| (WebCore::AnimationEffectReadOnly::currentIteration const): |
| (WebCore::AnimationEffectReadOnly::currentDirection const): |
| (WebCore::AnimationEffectReadOnly::directedProgress const): |
| (WebCore::AnimationEffectReadOnly::transformedProgress const): |
| (WebCore::AnimationEffectReadOnly::iterationProgress const): |
| (WebCore::AnimationEffectReadOnly::getComputedTiming): |
| * animation/AnimationEffectReadOnly.h: Renamed from Source/WebCore/animation/AnimationEffect.h. |
| (WebCore::AnimationEffectReadOnly::isKeyframeEffectReadOnly const): |
| (WebCore::AnimationEffectReadOnly::timing const): |
| * animation/AnimationEffectReadOnly.idl: Copied from Source/WebCore/animation/AnimationEffect.idl. |
| * animation/AnimationEffectTiming.cpp: |
| (WebCore::AnimationEffectTiming::AnimationEffectTiming): |
| (WebCore::AnimationEffectTiming::setIterationStart): Deleted. |
| (WebCore::AnimationEffectTiming::setIterations): Deleted. |
| (WebCore::AnimationEffectTiming::bindingsDuration const): Deleted. |
| (WebCore::AnimationEffectTiming::setBindingsDuration): Deleted. |
| (WebCore::AnimationEffectTiming::endTime const): Deleted. |
| (WebCore::AnimationEffectTiming::activeDuration const): Deleted. |
| (WebCore::AnimationEffectTiming::setEasing): Deleted. |
| * animation/AnimationEffectTiming.h: |
| (): Deleted. |
| * animation/AnimationEffectTiming.idl: |
| * animation/AnimationEffectTimingReadOnly.cpp: Copied from Source/WebCore/animation/AnimationEffectTiming.cpp. |
| (WebCore::AnimationEffectTimingReadOnly::create): |
| (WebCore::AnimationEffectTimingReadOnly::AnimationEffectTimingReadOnly): |
| (WebCore::AnimationEffectTimingReadOnly::~AnimationEffectTimingReadOnly): |
| (WebCore::AnimationEffectTimingReadOnly::setProperties): |
| (WebCore::AnimationEffectTimingReadOnly::setIterationStart): |
| (WebCore::AnimationEffectTimingReadOnly::setIterations): |
| (WebCore::AnimationEffectTimingReadOnly::bindingsDuration const): |
| (WebCore::AnimationEffectTimingReadOnly::setBindingsDuration): |
| (WebCore::AnimationEffectTimingReadOnly::setEasing): |
| (WebCore::AnimationEffectTimingReadOnly::endTime const): |
| (WebCore::AnimationEffectTimingReadOnly::activeDuration const): |
| * animation/AnimationEffectTimingReadOnly.h: Copied from Source/WebCore/animation/AnimationEffectTiming.h. |
| (WebCore::AnimationEffectTimingReadOnly::isAnimationEffectTiming const): |
| (WebCore::AnimationEffectTimingReadOnly::bindingsDelay const): |
| (WebCore::AnimationEffectTimingReadOnly::setBindingsDelay): |
| (WebCore::AnimationEffectTimingReadOnly::bindingsEndDelay const): |
| (WebCore::AnimationEffectTimingReadOnly::setBindingsEndDelay): |
| (WebCore::AnimationEffectTimingReadOnly::delay const): |
| (WebCore::AnimationEffectTimingReadOnly::setDelay): |
| (WebCore::AnimationEffectTimingReadOnly::endDelay const): |
| (WebCore::AnimationEffectTimingReadOnly::setEndDelay): |
| (WebCore::AnimationEffectTimingReadOnly::fill const): |
| (WebCore::AnimationEffectTimingReadOnly::setFill): |
| (WebCore::AnimationEffectTimingReadOnly::iterationStart const): |
| (WebCore::AnimationEffectTimingReadOnly::iterations const): |
| (WebCore::AnimationEffectTimingReadOnly::iterationDuration const): |
| (WebCore::AnimationEffectTimingReadOnly::setIterationDuration): |
| (WebCore::AnimationEffectTimingReadOnly::direction const): |
| (WebCore::AnimationEffectTimingReadOnly::setDirection): |
| (WebCore::AnimationEffectTimingReadOnly::easing const): |
| (WebCore::AnimationEffectTimingReadOnly::timingFunction const): |
| (WebCore::AnimationEffectTimingReadOnly::classType const): |
| * animation/AnimationEffectTimingReadOnly.idl: Renamed from Source/WebCore/animation/AnimationEffect.idl. |
| * animation/AnimationTimeline.h: |
| * animation/KeyframeEffect.cpp: |
| (WebCore::KeyframeEffect::create): |
| (WebCore::KeyframeEffect::KeyframeEffect): |
| (WebCore::IDLAttributeNameToAnimationPropertyName): Deleted. |
| (WebCore::CSSPropertyIDToIDLAttributeName): Deleted. |
| (WebCore::computeMissingKeyframeOffsets): Deleted. |
| (WebCore::processIterableKeyframes): Deleted. |
| (WebCore::processKeyframeLikeObject): Deleted. |
| (WebCore::processPropertyIndexedKeyframes): Deleted. |
| (WebCore::KeyframeEffect::getKeyframes): Deleted. |
| (WebCore::KeyframeEffect::processKeyframes): Deleted. |
| (WebCore::KeyframeEffect::computeStackingContextImpact): Deleted. |
| (WebCore::KeyframeEffect::apply): Deleted. |
| (WebCore::KeyframeEffect::shouldRunAccelerated): Deleted. |
| (WebCore::KeyframeEffect::getAnimatedStyle): Deleted. |
| (WebCore::KeyframeEffect::setAnimatedPropertiesInStyle): Deleted. |
| (WebCore::KeyframeEffect::startOrStopAccelerated): Deleted. |
| (WebCore::KeyframeEffect::renderer const): Deleted. |
| (WebCore::KeyframeEffect::currentStyle const): Deleted. |
| * animation/KeyframeEffect.h: |
| * animation/KeyframeEffect.idl: |
| * animation/KeyframeEffectReadOnly.cpp: Copied from Source/WebCore/animation/KeyframeEffect.cpp. |
| (WebCore::IDLAttributeNameToAnimationPropertyName): |
| (WebCore::CSSPropertyIDToIDLAttributeName): |
| (WebCore::computeMissingKeyframeOffsets): |
| (WebCore::processIterableKeyframes): |
| (WebCore::processKeyframeLikeObject): |
| (WebCore::processPropertyIndexedKeyframes): |
| (WebCore::KeyframeEffectReadOnly::create): |
| (WebCore::KeyframeEffectReadOnly::KeyframeEffectReadOnly): |
| (WebCore::KeyframeEffectReadOnly::getKeyframes): |
| (WebCore::KeyframeEffectReadOnly::processKeyframes): |
| (WebCore::KeyframeEffectReadOnly::computeStackingContextImpact): |
| (WebCore::KeyframeEffectReadOnly::apply): |
| (WebCore::KeyframeEffectReadOnly::shouldRunAccelerated): |
| (WebCore::KeyframeEffectReadOnly::getAnimatedStyle): |
| (WebCore::KeyframeEffectReadOnly::setAnimatedPropertiesInStyle): |
| (WebCore::KeyframeEffectReadOnly::startOrStopAccelerated): |
| (WebCore::KeyframeEffectReadOnly::renderer const): |
| (WebCore::KeyframeEffectReadOnly::currentStyle const): |
| * animation/KeyframeEffectReadOnly.h: Copied from Source/WebCore/animation/KeyframeEffect.h. |
| (WebCore::KeyframeEffectReadOnly::~KeyframeEffectReadOnly): |
| (WebCore::KeyframeEffectReadOnly::target const): |
| (WebCore::KeyframeEffectReadOnly::iterationComposite const): |
| (WebCore::KeyframeEffectReadOnly::composite const): |
| (WebCore::KeyframeEffectReadOnly::isRunningAccelerated const): |
| * animation/KeyframeEffectReadOnly.idl: Copied from Source/WebCore/animation/KeyframeEffect.idl. |
| * animation/WebAnimation.cpp: |
| (WebCore::WebAnimation::create): |
| (WebCore::WebAnimation::setEffect): |
| * animation/WebAnimation.h: |
| * animation/WebAnimation.idl: |
| * bindings/js/JSAnimationEffectReadOnlyCustom.cpp: Copied from Source/WebCore/bindings/js/JSAnimationEffectCustom.cpp. |
| (WebCore::toJSNewlyCreated): |
| (WebCore::toJS): |
| * bindings/js/JSAnimationEffectTimingReadOnlyCustom.cpp: Renamed from Source/WebCore/bindings/js/JSAnimationEffectCustom.cpp. |
| (WebCore::toJSNewlyCreated): |
| (WebCore::toJS): |
| * bindings/js/JSCustomEventCustom.cpp: |
| (WebCore::JSCustomEvent::detail const): Fix an error introduced in webkit.org/b/179591. |
| * bindings/js/JSWebAnimationCustom.cpp: |
| (WebCore::constructJSWebAnimation): |
| * bindings/js/WebCoreBuiltinNames.h: |
| |
| 2018-02-09 Andy Estes <aestes@apple.com> |
| |
| [Payment Request] Crash in PaymentRequest::canMakePayment() when Apple Pay payment method data is missing required fields |
| https://bugs.webkit.org/show_bug.cgi?id=182631 |
| |
| Reviewed by Mark Lam. |
| |
| PaymentRequest::canMakePayment() needs to parse each payment method's serialized data to |
| determine if it is a supported payment method. If parsing fails by raising an exception, we |
| intend to skip over that payment method and try the next one. If all payment method data |
| fail to parse, we resolve the returned promise with false. At no point do we intend to |
| propagate the parsing exception up to the calling script, however. |
| |
| Even though we intend to swallow any exceptions from parsing, we failed to clear the |
| JavaScript VM's exception state. The next time WebCore tries to execute JavaScript, a |
| release assertion is raised due to seeing an unexpected exception in the VM. |
| |
| Fix this by using a CatchScope in PaymentRequest::canMakePayment(), and calling |
| CatchScope::clearException() in the places we intend to swallow exceptions. |
| |
| Added a test case to http/tests/paymentrequest/payment-request-canmakepayment-method.https.html. |
| |
| * Modules/paymentrequest/PaymentRequest.cpp: |
| (WebCore::PaymentRequest::canMakePayment): |
| |
| 2018-02-09 Zalan Bujtas <zalan@apple.com> |
| |
| [RenderTreeBuilder] Move multicolumn descendant/sibling removal logic to RenderTreeBuilder |
| https://bugs.webkit.org/show_bug.cgi?id=182628 |
| <rdar://problem/37369528> |
| |
| Reviewed by Antti Koivisto. |
| |
| No change in functionality |
| |
| * rendering/RenderBlockFlow.cpp: |
| (WebCore::RenderBlockFlow::takeChild): |
| * rendering/RenderFragmentedFlow.h: |
| * rendering/RenderMultiColumnFlow.cpp: |
| (WebCore::RenderMultiColumnFlow::handleSpannerRemoval): Deleted. |
| (WebCore::RenderMultiColumnFlow::fragmentedFlowRelativeWillBeRemoved): Deleted. |
| * rendering/RenderMultiColumnFlow.h: |
| * rendering/updating/RenderTreeBuilder.cpp: |
| (WebCore::RenderTreeBuilder::multiColumnRelativeWillBeRemoved): |
| * rendering/updating/RenderTreeBuilder.h: |
| * rendering/updating/RenderTreeBuilderMultiColumn.cpp: |
| (WebCore::RenderTreeBuilder::MultiColumn::handleSpannerRemoval): |
| (WebCore::RenderTreeBuilder::MultiColumn::multiColumnRelativeWillBeRemoved): |
| * rendering/updating/RenderTreeBuilderMultiColumn.h: |
| |
| 2018-02-09 Youenn Fablet <youenn@apple.com> |
| |
| Add support for cache storage of blob response |
| https://bugs.webkit.org/show_bug.cgi?id=182637 |
| |
| Reviewed by Brady Eidson. |
| |
| Covered by updated WPT test. |
| When putting a blob response in cache, create a readable stream to easily get the body. |
| Make clear that caching form data is not supported. |
| |
| * Modules/cache/DOMCache.cpp: |
| (WebCore::DOMCache::put): |
| * Modules/fetch/FetchBody.h: |
| (WebCore::FetchBody::isBlob const): |
| (WebCore::FetchBody::isFormData const): |
| * Modules/fetch/FetchResponse.h: |
| |
| 2018-02-09 Youenn Fablet <youenn@apple.com> |
| |
| Make CoreAudioCaptureSource error logging be release logging |
| https://bugs.webkit.org/show_bug.cgi?id=182614 |
| |
| Reviewed by Eric Carlson. |
| |
| No change of behavior. |
| |
| * platform/mediastream/mac/CoreAudioCaptureSource.cpp: |
| (WebCore::CoreAudioSharedUnit::addEchoCancellationSource): |
| (WebCore::CoreAudioSharedUnit::setupAudioUnit): |
| (WebCore::CoreAudioSharedUnit::configureMicrophoneProc): |
| (WebCore::CoreAudioSharedUnit::configureSpeakerProc): |
| (WebCore::CoreAudioSharedUnit::checkTimestamps): |
| (WebCore::CoreAudioSharedUnit::provideSpeakerData): |
| (WebCore::CoreAudioSharedUnit::processMicrophoneSamples): |
| (WebCore::CoreAudioSharedUnit::cleanupAudioUnit): |
| (WebCore::CoreAudioSharedUnit::reconfigureAudioUnit): |
| (WebCore::CoreAudioSharedUnit::startInternal): |
| (WebCore::CoreAudioSharedUnit::verifyIsCapturing): |
| (WebCore::CoreAudioSharedUnit::stopInternal): |
| (WebCore::CoreAudioSharedUnit::defaultInputDevice): |
| |
| 2018-02-09 Carlos Garcia Campos <cgarcia@igalia.com> |
| |
| Add a way to check if a host is an IP address |
| https://bugs.webkit.org/show_bug.cgi?id=182427 |
| |
| Reviewed by Alex Christensen. |
| |
| There are several places where this is needed. We currently just assume that any host ending in a digit is an IP |
| address, except in PublicSuffix where platform specific code is used. This patch adds URL::hostIsIPAddress() |
| platform specific implementations, falling back to current assumption if there isn't an implementation for the |
| platform. |
| |
| * page/OriginAccessEntry.cpp: |
| (WebCore::OriginAccessEntry::OriginAccessEntry): Use URL::hostIsIPAddress(). |
| * platform/URL.cpp: |
| (WebCore::URL::hostIsIPAddress): Fallback implementation. |
| * platform/URL.h: |
| * platform/mac/PublicSuffixMac.mm: |
| (WebCore::topPrivatelyControlledDomain): Use URL::hostIsIPAddress(). |
| * platform/mac/URLMac.mm: |
| (WebCore::URL::hostIsIPAddress): Move implementation from PublicSuffixMac.mm. |
| * platform/network/curl/CookieUtil.cpp: |
| (WebCore::CookieUtil::isIPAddress): Use URL::hostIsIPAddress(). |
| * platform/soup/URLSoup.cpp: |
| (WebCore::URL::hostIsIPAddress): Use g_hostname_is_ip_address(). |
| |
| 2018-02-08 Philippe Normand <pnormand@igalia.com> |
| |
| [GStreamer][WebAudio] Winamp2-js woes |
| https://bugs.webkit.org/show_bug.cgi?id=182612 |
| |
| Reviewed by Xabier Rodriguez Calvar and Carlos Alberto Lopez Perez. |
| |
| Test: webaudio/silence-after-playback.html |
| |
| * platform/audio/gstreamer/AudioSourceProviderGStreamer.cpp: |
| (WebCore::copyGStreamerBuffersToAudioChannel): Clear the bus if |
| the adapter can't provide enough data. This prevents a nasty noise |
| after playing songs in Winamp. |
| (WebCore::AudioSourceProviderGStreamer::setClient): No need to set |
| the client more than once, this fixes runtime warnings. |
| |
| 2018-02-09 Zalan Bujtas <zalan@apple.com> |
| |
| [RenderTreeBuilder] Move multicolumn spanner mutation logic to RenderTreeBuilder |
| https://bugs.webkit.org/show_bug.cgi?id=182627 |
| <rdar://problem/37367284> |
| |
| Reviewed by Antti Koivisto. |
| |
| Move spanner triggered mutation logic to RenderTreeBuilder. |
| |
| No change in functionality. |
| |
| * rendering/RenderFragmentedFlow.h: |
| * rendering/RenderMultiColumnFlow.cpp: |
| (WebCore::RenderMultiColumnFlow::isColumnSpanningDescendant const): |
| (WebCore::findSetRendering): Deleted. |
| (WebCore::isValidColumnSpanner): Deleted. |
| (WebCore::spannerPlacehoderCandidate): Deleted. |
| (WebCore::RenderMultiColumnFlow::processPossibleSpannerDescendant): Deleted. |
| (WebCore::RenderMultiColumnFlow::fragmentedFlowDescendantInserted): Deleted. |
| * rendering/RenderMultiColumnFlow.h: |
| * rendering/RenderObject.cpp: |
| (WebCore::RenderObject::insertedIntoTree): |
| * rendering/updating/RenderTreeBuilder.cpp: |
| (WebCore::RenderTreeBuilder::multiColumnDescendantInserted): |
| * rendering/updating/RenderTreeBuilder.h: |
| * rendering/updating/RenderTreeBuilderMultiColumn.cpp: |
| (WebCore::findSetRendering): |
| (WebCore::spannerPlacehoderCandidate): |
| (WebCore::isValidColumnSpanner): |
| (WebCore::RenderTreeBuilder::MultiColumn::multiColumnDescendantInserted): |
| (WebCore::RenderTreeBuilder::MultiColumn::processPossibleSpannerDescendant): |
| * rendering/updating/RenderTreeBuilderMultiColumn.h: |
| |
| 2018-02-09 Javier Fernandez <jfernandez@igalia.com> |
| |
| [css-align] Implement the new behavior of 'legacy' for justify-items |
| https://bugs.webkit.org/show_bug.cgi?id=172712 |
| |
| Reviewed by Antti Koivisto. |
| |
| The syntax of the 'justify-items' property accepts a new 'legacy' value, |
| replacing the 'auto' value which is now parsed as invalid. |
| |
| https://github.com/w3c/csswg-drafts/issues/1318 |
| |
| This change affects also to the 'place-items' shorthand, which doesn't |
| accept 'auto' and, for the time being, neither 'legacy'. |
| |
| Since the new value 'legacy' is also the default value, I don't expect |
| this change to break content of sites currently using the 'justify-items' |
| property. |
| |
| No new tests, rebaselined existing test. |
| |
| * css/CSSComputedStyleDeclaration.cpp: |
| (WebCore::valueForItemPositionWithOverflowAlignment): |
| (WebCore::ComputedStyleExtractor::valueForPropertyinStyle): |
| * css/CSSPrimitiveValueMappings.h: |
| (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): |
| (WebCore::CSSPrimitiveValue::operator ItemPosition const): |
| * css/CSSProperties.json: |
| * css/StyleResolver.cpp: |
| (WebCore::StyleResolver::adjustRenderStyle): |
| * css/parser/CSSPropertyParser.cpp: |
| (WebCore::isAuto): |
| (WebCore::isNormalOrStretch): |
| (WebCore::consumeSelfPositionOverflowPosition): |
| (WebCore::consumeJustifyItems): |
| (WebCore::consumeSimplifiedDefaultPosition): |
| (WebCore::consumeSimplifiedSelfPosition): |
| (WebCore::CSSPropertyParser::consumePlaceItemsShorthand): |
| (WebCore::CSSPropertyParser::consumePlaceSelfShorthand): |
| * rendering/RenderFlexibleBox.cpp: |
| (WebCore::alignmentOffset): |
| * rendering/RenderGrid.cpp: |
| (WebCore::RenderGrid::columnAxisPositionForChild const): |
| (WebCore::RenderGrid::rowAxisPositionForChild const): |
| * rendering/style/RenderStyle.cpp: |
| (WebCore::resolvedSelfAlignment): |
| (WebCore::RenderStyle::resolvedJustifyItems const): |
| * rendering/style/RenderStyle.h: |
| (WebCore::RenderStyle::initialJustifyItems): |
| * rendering/style/RenderStyleConstants.h: |
| * rendering/style/StyleRareNonInheritedData.cpp: |
| (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData): |
| |
| 2018-02-09 Yacine Bandou <yacine.bandou_ext@softathome.com> |
| |
| [EME][GStreamer] Add support for encrypted caps in GStreamerUtilities |
| https://bugs.webkit.org/show_bug.cgi?id=181990 |
| |
| Reviewed by Xabier Rodriguez-Calvar. |
| |
| Add the support of encrypted caps in GStreamerUtilities. |
| Refactor the manner that the caps are handled, such as how to extract the resolution |
| from the video caps or how to check if the caps are encrypted. |
| |
| The attachTrack function in PlaybackPipeline doesn't need the "structure" parameter, |
| it is already included in the "caps" parameter. |
| |
| Replace the "mediaType" parameter by the "caps" parameter in reattachTrack function, |
| it allows to use the new functions that handle the caps in GStreamerUtilities. |
| |
| Tests: |
| media/encrypted-media/clearKey/clearKey-cenc-audio-playback-mse.html |
| media/encrypted-media/clearKey/clearKey-cenc-video-playback-mse.html |
| |
| * platform/graphics/gstreamer/GStreamerUtilities.cpp: |
| (WebCore::getVideoSizeAndFormatFromCaps): Add the support of video encrypted caps. |
| (WebCore::getVideoResolutionFromCaps): |
| (WebCore::capsMediaType): |
| (WebCore::doCapsHaveType): |
| (WebCore::areEncryptedCaps): Add a new functions in order to handle the caps properly. |
| * platform/graphics/gstreamer/GStreamerUtilities.h: |
| * platform/graphics/gstreamer/mse/AppendPipeline.cpp: |
| (WebCore::AppendPipeline::parseDemuxerSrcPadCaps): |
| * platform/graphics/gstreamer/mse/GStreamerMediaDescription.cpp: |
| (WebCore::GStreamerMediaDescription::codec const): |
| (WebCore::GStreamerMediaDescription::isVideo const): |
| (WebCore::GStreamerMediaDescription::isAudio const): |
| * platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.cpp: |
| (WebCore::MediaPlayerPrivateGStreamerMSE::trackDetected): |
| * platform/graphics/gstreamer/mse/PlaybackPipeline.cpp: |
| (WebCore::PlaybackPipeline::attachTrack): |
| (WebCore::PlaybackPipeline::reattachTrack): |
| * platform/graphics/gstreamer/mse/PlaybackPipeline.h: |
| * platform/graphics/gstreamer/mse/WebKitMediaSourceGStreamer.cpp: |
| (webKitMediaSrcUpdatePresentationSize): Refactor some parts by using the new added functions. |
| |
| 2018-02-09 Philippe Normand <pnormand@igalia.com> |
| |
| [GStreamer] Layout test fast/replaced/border-radius-clip.html crashes with GStreamer-CRITICAL **: gst_segment_to_stream_time: assertion 'segment->format == format' failed in gst_segment_to_stream_time() |
| https://bugs.webkit.org/show_bug.cgi?id=176802 |
| |
| Reviewed by Xabier Rodriguez Calvar. |
| |
| * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp: |
| (WebCore::MediaPlayerPrivateGStreamer::load): Prevent the player from loading animated gifs. |
| |
| 2018-02-09 Antti Koivisto <antti@apple.com> |
| |
| Move compiled selectors to StyleRule |
| https://bugs.webkit.org/show_bug.cgi?id=182602 |
| |
| Reviewed by Zalan Bujtas. |
| |
| Currently they are owned by RuleData. Several RuleData objects can refer to the same StyleRule, requiring recompilation. |
| Compiled selectors are context-independent so they can be shared between all clients. |
| |
| * WebCore.xcodeproj/project.pbxproj: |
| * css/CSSSelectorList.cpp: |
| (WebCore::CSSSelectorList::listSize const): |
| |
| Compute the number of complex selectors on the list. |
| |
| * css/CSSSelectorList.h: |
| * css/DocumentRuleSets.cpp: |
| (WebCore::makeRuleSet): |
| (WebCore::DocumentRuleSets::classInvalidationRuleSets const): |
| |
| Pass around list index along with the selector index (compiled selectors are found by list index). |
| |
| * css/ElementRuleCollector.cpp: |
| (WebCore::ElementRuleCollector::ruleMatches): |
| * css/RuleSet.cpp: |
| (WebCore::RuleData::RuleData): |
| * css/RuleSet.h: |
| (WebCore::RuleData::compilationStatus const): Deleted. |
| (WebCore::RuleData::compiledSelectorCodeRef const): Deleted. |
| (WebCore::RuleData::setCompiledSelector const): Deleted. |
| (WebCore::RuleData::~RuleData): Deleted. |
| (WebCore::RuleData::compiledSelectorUsed const): Deleted. |
| * css/StyleRule.cpp: |
| (WebCore::StyleRule::StyleRule): |
| * css/StyleRule.h: |
| |
| Add CompiledSelector member. |
| |
| * cssjit/CompiledSelector.h: Added. |
| |
| Move to a header of its own to keeps dependencies simple. |
| |
| (WebCore::SelectorCompilationStatus::SelectorCompilationStatus): |
| (WebCore::SelectorCompilationStatus::operator Status const): |
| * cssjit/SelectorCompiler.h: |
| (): Deleted. |
| (WebCore::SelectorCompilationStatus::SelectorCompilationStatus): Deleted. |
| (WebCore::SelectorCompilationStatus::operator Status const): Deleted. |
| |
| 2018-02-08 Antoine Quint <graouts@apple.com> |
| |
| [Web Animations] Always expose "composite" in output of getKeyframes() |
| https://bugs.webkit.org/show_bug.cgi?id=182600 |
| |
| Reviewed by Dean Jackson. |
| |
| The Web Animations spec has changed and whereas the output of getKeyframes() would not feature the "composite" property |
| for "null" values, it now lists "composite" in all cases. |
| |
| To support this, we needed to fix an issue in the code generator such that a "null" default value for an optional enum |
| type was supported. |
| |
| * animation/KeyframeEffect.cpp: |
| (WebCore::KeyframeEffect::getKeyframes): |
| * animation/KeyframeEffect.h: |
| * animation/KeyframeEffect.idl: |
| * bindings/scripts/CodeGeneratorJS.pm: |
| (GenerateDefaultValue): |
| * bindings/scripts/test/JS/JSTestObj.cpp: |
| (WebCore::convertDictionary<TestObj::Dictionary>): |
| (WebCore::convertDictionaryToJS): |
| * bindings/scripts/test/TestObj.idl: |
| |
| 2018-02-08 Youenn Fablet <youenn@apple.com> |
| |
| CoreAudioCaptureSourceIOSListener should be a WebProcess singleton |
| https://bugs.webkit.org/show_bug.cgi?id=182606 |
| <rdar://problem/37355283> |
| |
| Reviewed by Eric Carlson. |
| |
| Not testable right now as this relies on iOS specific Core Audio stack. |
| Efforts should be made to somehow mock that part and mock interruptions. |
| |
| Made CoreAudioCaptureSourceFactoryIOS responsible to receive iOS interruption messages. |
| Before the patch, individual capture sources were receiving these messages. |
| When there is only one capture source per process this is fine but with more capture sources, |
| this is messing up things as they all share the same shared unit and we would try to interrupt it or resume it several times. |
| |
| Also, if we are suspended and there is no more capture source, the shared unit will remain suspended indefinitely, as we will |
| not process the interruption messages. |
| With the patch, we always process the messages. |
| We still go through the active source as done now to limit the changes. |
| In case of no source, we go to the shared unit. |
| In the future, we should directly go to the shared unit and clients of the shared unit should see their state being updated. |
| |
| As a way to prevent staying suspended on iOS, we unsuspend ourselves in CoreAudioCaptureSource constructor. |
| This is fine as this constructor is only called when getUserMedia grants access to the camera which always goes to the UIProcess. |
| And the UIProcess is only processing getUserMedia calls if the WebProcess is foregrounded. |
| |
| * platform/mediastream/ios/CoreAudioCaptureSourceIOS.h: |
| * platform/mediastream/ios/CoreAudioCaptureSourceIOS.mm: |
| (-[WebCoreAudioCaptureSourceIOSListener initWithCallback:]): |
| (WebCore::CoreAudioCaptureSourceFactoryIOS::CoreAudioCaptureSourceFactoryIOS): |
| (WebCore::CoreAudioCaptureSourceFactoryIOS::~CoreAudioCaptureSourceFactoryIOS): |
| (WebCore::CoreAudioCaptureSourceFactory::singleton): |
| * platform/mediastream/mac/CoreAudioCaptureSource.cpp: |
| (WebCore::CoreAudioCaptureSourceFactory::singleton): |
| (WebCore::CoreAudioCaptureSource::create): |
| (WebCore::CoreAudioCaptureSourceFactory::beginInterruption): |
| (WebCore::CoreAudioCaptureSourceFactory::endInterruption): |
| (WebCore::CoreAudioCaptureSourceFactory::scheduleReconfiguration): |
| (WebCore::CoreAudioCaptureSource::factory): |
| (WebCore::CoreAudioCaptureSource::CoreAudioCaptureSource): |
| (WebCore::CoreAudioCaptureSource::~CoreAudioCaptureSource): |
| (WebCore::CoreAudioCaptureSource::startProducingData): |
| (WebCore::CoreAudioCaptureSource::scheduleReconfiguration): |
| (WebCore::CoreAudioCaptureSource::beginInterruption): |
| (WebCore::CoreAudioCaptureSource::endInterruption): |
| * platform/mediastream/mac/CoreAudioCaptureSource.h: |
| (WebCore::CoreAudioCaptureSourceFactory::setCoreAudioActiveSource): |
| (WebCore::CoreAudioCaptureSourceFactory::unsetCoreAudioActiveSource): |
| (WebCore::CoreAudioCaptureSourceFactory::coreAudioActiveSource): |
| |
| 2018-02-08 Chris Dumez <cdumez@apple.com> |
| |
| There should be a way to disable [OverrideBuiltins] behavior in a given DOMWrapperWorld |
| https://bugs.webkit.org/show_bug.cgi?id=182524 |
| <rdar://problem/9057327> |
| |
| Reviewed by Ryosuke Niwa. |
| |
| Add new flag on DOMWrapperWorld indicating if the [OverrideBuiltins] behavior should |
| be enabled in this world or not. The behavior is enabled by default for Web-compatibility. |
| This flag is queried in accessVisibleNamedProperty() when doing the named property |
| lookup. |
| |
| Covered by new API test. |
| |
| * bindings/js/DOMWrapperWorld.h: |
| (WebCore::DOMWrapperWorld::disableOverrideBuiltinsBehavior): |
| (WebCore::DOMWrapperWorld::shouldDisableOverrideBuiltinsBehavior const): |
| * bindings/js/JSDOMAbstractOperations.h: |
| (WebCore::accessVisibleNamedProperty): |
| |
| 2018-02-08 Per Arne Vollan <pvollan@apple.com> |
| |
| Move WebVideoFullscreenController from WebCore to WebKitLegacy. |
| https://bugs.webkit.org/show_bug.cgi?id=182615 |
| |
| Reviewed by Eric Carlson. |
| |
| It is only used by WK1. Also there are a few references to NSApp in WebVideoFullscreenController.mm. |
| Ideally, we should not reference NSApp in WebCore. |
| |
| No new tests. No change in behavior. |
| |
| * SourcesMac.txt: |
| * WebCore.xcodeproj/project.pbxproj: |
| * html/HTMLMediaElement.h: |
| * platform/mac/WebVideoFullscreenController.h: Removed. |
| * platform/mac/WebVideoFullscreenController.mm: Removed. |
| * platform/mac/WebVideoFullscreenHUDWindowController.h: Removed. |
| * platform/mac/WebVideoFullscreenHUDWindowController.mm: Removed. |
| * platform/mac/WebWindowAnimation.h: Removed. |
| * platform/mac/WebWindowAnimation.mm: Removed. |
| |
| 2018-02-08 Chris Dumez <cdumez@apple.com> |
| |
| Form submission after navigation fails when decidePolicyForNavigationAction is async |
| https://bugs.webkit.org/show_bug.cgi?id=182412 |
| <rdar://problem/35181099> |
| |
| Reviewed by Alex Christensen. |
| |
| When the form is submitted and schedules the load in an iframe that is already loading, |
| FrameLoader::stopLoading() is called as expected. However, because policy checks can |
| now be asynchronous, stopLoading() also needs to stop pending policy checks. Otherwise, |
| continueLoadAfterNavigationPolicy() gets called for a cancelled load and we're in trouble |
| because the FrameLoader was reused for another load since then. |
| |
| Test: http/tests/navigation/sync-form-submit-iframe.html |
| |
| * loader/FrameLoader.cpp: |
| (WebCore::FrameLoader::stopLoading): |
| |
| 2018-02-08 Zalan Bujtas <zalan@apple.com> |
| |
| [RenderTreeBuilder] Do not use RenderTreeBuilder::current() in RenderRubyRun::takeChild |
| https://bugs.webkit.org/show_bug.cgi?id=182607 |
| <rdar://problem/37355944> |
| |
| Reviewed by Sam Weinig. |
| |
| No change in functionality. |
| |
| * rendering/RenderRubyRun.cpp: |
| (WebCore::RenderRubyRun::takeChild): |
| |
| 2018-02-08 Antti Koivisto <antti@apple.com> |
| |
| Use invalidation rulesets for attribute selectors |
| https://bugs.webkit.org/show_bug.cgi?id=182569 |
| |
| Reviewed by Zalan Bujtas. |
| |
| Attribute change style invalidation should use invalidation rulesets, similarly how class change invalidation already does. |
| We'll invalidate fewer unnecessary elements immediately and enable more significant future gains. |
| |
| * css/DocumentRuleSets.cpp: |
| (WebCore::DocumentRuleSets::collectFeatures const): |
| (WebCore::DocumentRuleSets::classInvalidationRuleSets const): |
| (WebCore::DocumentRuleSets::attributeInvalidationRuleSets const): |
| |
| Make and cache invalidation RuleSets for an attribute. |
| |
| (WebCore::DocumentRuleSets::ancestorAttributeRulesForHTML const): Deleted. |
| * css/DocumentRuleSets.h: |
| * css/RuleFeature.cpp: |
| (WebCore::RuleFeatureSet::recursivelyCollectFeaturesFromSelector): |
| |
| Collect attribute selectors along with match elements. |
| |
| (WebCore::RuleFeatureSet::collectFeatures): |
| (WebCore::RuleFeatureSet::add): |
| (WebCore::RuleFeatureSet::registerContentAttribute): |
| |
| Separate hash to deal with invalidation of content:attr(foo) special case. |
| |
| (WebCore::RuleFeatureSet::clear): |
| (WebCore::RuleFeatureSet::shrinkToFit): |
| (WebCore::makeAttributeSelectorKey): Deleted. |
| * css/RuleFeature.h: |
| (WebCore::RuleFeature::RuleFeature): |
| * css/StyleBuilderCustom.h: |
| (WebCore::StyleBuilderCustom::applyValueContent): |
| (WebCore::StyleBuilderCustom::applyValueAlt): |
| |
| Use registerContentAttribute() |
| |
| * html/HTMLEmbedElement.cpp: |
| (WebCore::hasTypeOrSrc): |
| (WebCore::HTMLEmbedElement::parseAttribute): |
| |
| Invalidate style if both type and src attributes go missing as this changes result of rendererIsNeeded(). |
| This was previously relying on any attribute change invalidating style. |
| |
| (WebCore::HTMLEmbedElement::rendererIsNeeded): |
| * style/AttributeChangeInvalidation.cpp: |
| (WebCore::Style::AttributeChangeInvalidation::invalidateStyle): |
| |
| Collect the invalidation rulesets for this attribute change. |
| Also check if any attribute selector actually changes state, unlike with classes attribute changes may |
| often not lead to a selector becoming non-matching. |
| |
| (WebCore::Style::AttributeChangeInvalidation::invalidateStyleWithRuleSets): |
| (WebCore::Style::AttributeChangeInvalidation::invalidateDescendants): Deleted. |
| * style/AttributeChangeInvalidation.h: |
| (WebCore::Style::AttributeChangeInvalidation::AttributeChangeInvalidation): |
| (WebCore::Style::AttributeChangeInvalidation::~AttributeChangeInvalidation): |
| * style/ClassChangeInvalidation.cpp: |
| (WebCore::Style::ClassChangeInvalidation::computeInvalidation): |
| |
| Should not bail on shadow tree invalidation as we may also need to invalidate siblings. |
| |
| 2018-02-08 Zalan Bujtas <zalan@apple.com> |
| |
| [RenderTreeBuilder] Introduce RenderTreeBuilder to moveChild(ren)To() functions |
| https://bugs.webkit.org/show_bug.cgi?id=182596 |
| <rdar://problem/37340553> |
| |
| Reviewed by Sam Weinig. |
| |
| This is in preparation for moving mutation code out of moveChildTo/moveChildrenTo. |
| |
| No change in functionality. |
| |
| * rendering/RenderBlock.cpp: |
| (WebCore::RenderBlock::dropAnonymousBoxChild): |
| (WebCore::RenderBlock::takeChild): |
| * rendering/RenderBlock.h: |
| (WebCore::RenderBlock::moveAllChildrenIncludingFloatsTo): |
| * rendering/RenderBlockFlow.cpp: |
| (WebCore::RenderBlockFlow::styleDidChange): |
| (WebCore::RenderBlockFlow::moveAllChildrenIncludingFloatsTo): |
| * rendering/RenderBlockFlow.h: |
| * rendering/RenderBoxModelObject.cpp: |
| (WebCore::RenderBoxModelObject::moveChildTo): |
| (WebCore::RenderBoxModelObject::moveChildrenTo): |
| * rendering/RenderBoxModelObject.h: |
| (WebCore::RenderBoxModelObject::moveChildTo): |
| (WebCore::RenderBoxModelObject::moveAllChildrenTo): |
| (WebCore::RenderBoxModelObject::moveChildrenTo): |
| * rendering/RenderElement.cpp: |
| (WebCore::RenderElement::styleDidChange): |
| (WebCore::RenderElement::removeAnonymousWrappersForInlinesIfNecessary): Deleted. |
| * rendering/RenderElement.h: |
| * rendering/RenderRubyRun.cpp: |
| (WebCore::RenderRubyRun::takeChild): |
| * rendering/updating/RenderTreeBuilder.cpp: |
| (WebCore::RenderTreeBuilder::makeChildrenNonInline): |
| (WebCore::RenderTreeBuilder::splitAnonymousBoxesAroundChild): |
| (WebCore::RenderTreeBuilder::removeAnonymousWrappersForInlineChildrenIfNeeded): |
| (WebCore::RenderTreeBuilder::childFlowStateChangesAndNoLongerAffectsParentBlock): |
| (WebCore::RenderTreeBuilder::removeFromParentAndDestroyCleaningUpAnonymousWrappers): |
| * rendering/updating/RenderTreeBuilder.h: |
| * rendering/updating/RenderTreeBuilderMultiColumn.cpp: |
| (WebCore::RenderTreeBuilder::MultiColumn::createFragmentedFlow): |
| (WebCore::RenderTreeBuilder::MultiColumn::destroyFragmentedFlow): |
| * rendering/updating/RenderTreeBuilderRuby.cpp: |
| (WebCore::RenderTreeBuilder::Ruby::moveInlineChildren): |
| (WebCore::RenderTreeBuilder::Ruby::moveBlockChildren): |
| * rendering/updating/RenderTreeBuilderTable.cpp: |
| (WebCore::RenderTreeBuilder::Table::collapseAndDestroyAnonymousSiblingRows): |
| |
| 2018-02-08 Matt Lewis <jlewis3@apple.com> |
| |
| Unreviewed, rolling out r228261. |
| |
| This broke an internal build |
| |
| Reverted changeset: |
| |
| "Add a way to check if a host is an IP address" |
| https://bugs.webkit.org/show_bug.cgi?id=182427 |
| https://trac.webkit.org/changeset/228261 |
| |
| 2018-02-08 Philippe Normand <pnormand@igalia.com> |
| |
| [GStreamer] WebKit improperly handles missing GStreamer elements |
| https://bugs.webkit.org/show_bug.cgi?id=171205 |
| |
| Reviewed by Michael Catanzaro. |
| |
| * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp: |
| (WebCore::MediaPlayerPrivateGStreamer::createGSTPlayBin): Add a |
| test checking the videoflip element was correctly created. It |
| might not be available on some exotic distros such as Gentoo. |
| |
| 2018-02-08 Chris Fleizach <cfleizach@apple.com> |
| |
| AX: Defer attribute computation until needed. |
| https://bugs.webkit.org/show_bug.cgi?id=182386 |
| <rdar://problem/37115277> |
| |
| Reviewed by Zalan Bujtas. |
| |
| Accessibility is doing too much work when handling attribute changes. Here's how we can improve this: |
| 1) Defer attribute changes while the tree is dirty (and coalesce them). |
| 2) Don't create AXObjects when an attribute changes unnecessarily. If no client has requested an ax object, it's likely no work needs to be done |
| (with the exception of a few attributes like aria-modal) |
| 3) Stop calculating the entire accessible ARIA label when trying to decide if an element should be ignored. That's generally wasteful and the |
| consequence of including more AX elements in the tree is very minimal. |
| |
| * accessibility/AXObjectCache.cpp: |
| (WebCore::rendererNeedsDeferredUpdate): |
| (WebCore::nodeAndRendererAreValid): |
| (WebCore::AXObjectCache::remove): |
| (WebCore::AXObjectCache::handleAriaExpandedChange): |
| (WebCore::AXObjectCache::handleAriaRoleChanged): |
| (WebCore::AXObjectCache::deferAttributeChangeIfNeeded): |
| (WebCore::AXObjectCache::shouldProcessAttributeChange): |
| (WebCore::AXObjectCache::handleAttributeChange): |
| (WebCore::AXObjectCache::prepareForDocumentDestruction): |
| (WebCore::AXObjectCache::performDeferredCacheUpdate): |
| (WebCore::AXObjectCache::deferRecomputeIsIgnoredIfNeeded): |
| (WebCore::AXObjectCache::deferRecomputeIsIgnored): |
| (WebCore::AXObjectCache::deferTextChangedIfNeeded): |
| (WebCore::AXObjectCache::deferSelectedChildrenChangedIfNeeded): |
| (WebCore::AXObjectCache::handleAttributeChanged): Deleted. |
| * accessibility/AXObjectCache.h: |
| (WebCore::AXObjectCache::deferAttributeChangeIfNeeded): |
| (WebCore::AXObjectCache::handleAttributeChanged): Deleted. |
| * accessibility/AccessibilityNodeObject.cpp: |
| (WebCore::AccessibilityNodeObject::hasAttributesRequiredForInclusion const): |
| * accessibility/AccessibleNode.cpp: |
| (WebCore::AccessibleNode::notifyAttributeChanged): |
| * dom/Element.cpp: |
| (WebCore::Element::attributeChanged): |
| |
| 2018-02-08 Chris Dumez <cdumez@apple.com> |
| |
| Unreviewed, tiny partial rollout of r228260 as it caused some worker failures |
| |
| * bindings/js/JSDOMGlobalObject.cpp: |
| (WebCore::toJSDOMGlobalObject): |
| * bindings/js/JSDOMGlobalObject.h: |
| * bindings/js/JSErrorHandler.cpp: |
| (WebCore::JSErrorHandler::handleEvent): |
| * bindings/js/JSEventListener.cpp: |
| (WebCore::toJSDOMGlobalObject): Deleted. |
| |
| 2018-02-08 Zalan Bujtas <zalan@apple.com> |
| |
| [RenderTreeBuilder] Move RenderElement::removeAnonymousWrappersForInlinesIfNecessary to RenderTreeBuilder |
| https://bugs.webkit.org/show_bug.cgi?id=182582 |
| <rdar://problem/37327890> |
| |
| Reviewed by Antti Koivisto. |
| |
| Tree mutation -> RenderTreeBuilder. |
| |
| No change in functionality |
| |
| * rendering/RenderElement.cpp: |
| (WebCore::RenderElement::styleDidChange): |
| (WebCore::RenderElement::removeAnonymousWrappersForInlinesIfNecessary): Deleted. |
| * rendering/RenderElement.h: |
| * rendering/updating/RenderTreeBuilder.cpp: |
| (WebCore::removeAnonymousWrappersForInlinesIfNecessary): |
| (WebCore::RenderTreeBuilder::childFlowStateChangesAndNoLongerAffectsParentBlock): |
| (WebCore::RenderTreeBuilder::removeFromParentAndDestroyCleaningUpAnonymousWrappers): |
| * rendering/updating/RenderTreeBuilder.h: |
| |
| 2018-02-08 Philippe Normand <pnormand@igalia.com> |
| |
| [GStreamer] LayoutTest webaudio/silent-audio-interrupted-in-background.html makes its subsequent test flaky crash |
| https://bugs.webkit.org/show_bug.cgi?id=173916 |
| |
| Reviewed by Xabier Rodriguez Calvar. |
| |
| This patch fixes two crashes and a runtime warning: |
| |
| - The provider client configuration should be done from the main |
| thread but the no-more-pads signal of deinterleave was fired from |
| a non-main thread. |
| |
| - The deinterleave pad-removed signal can be fired for a not fully |
| configured pipeline if the audio context is interrupted. So the |
| peer quark of the removed pad needs to be checked, it might be a |
| null pointer. |
| |
| - The provider connects to the deinterleave signals only when a |
| client is provided, so the signal disconnection needs to check |
| that to avoid runtime warnings. |
| |
| * platform/audio/gstreamer/AudioSourceProviderGStreamer.cpp: |
| (WebCore::AudioSourceProviderGStreamer::AudioSourceProviderGStreamer): |
| Create a main thread notifier. |
| (WebCore::AudioSourceProviderGStreamer::~AudioSourceProviderGStreamer): |
| Invalidate notifier and check a client was set before |
| disconnecting from deinterleave signals. |
| (WebCore::AudioSourceProviderGStreamer::handleRemovedDeinterleavePad): |
| Check validity of the pad peer. |
| (WebCore::AudioSourceProviderGStreamer::deinterleavePadsConfigured): |
| Set client from main thread. |
| * platform/audio/gstreamer/AudioSourceProviderGStreamer.h: |
| |
| 2018-02-08 Philippe Normand <pnormand@igalia.com> |
| |
| [GStreamer][WebAudio] No need for version check in each loop iteration |
| https://bugs.webkit.org/show_bug.cgi?id=182577 |
| |
| Reviewed by Xabier Rodriguez Calvar. |
| |
| * platform/audio/gstreamer/WebKitWebAudioSourceGStreamer.cpp: |
| (webkit_web_audio_src_init): Detect version once only, when creating the element. |
| (webKitWebAudioSrcLoop): Use boolean variable instead of checking the version every time. |
| |
| 2018-02-08 Frederic Wang <fwang@igalia.com> |
| |
| Add scrolling node types to distinguish main frames and subframes. |
| https://bugs.webkit.org/show_bug.cgi?id=182533 |
| |
| Reviewed by Simon Fraser. |
| |
| This patch splits FrameScrollingNode type into two types: MainFrameScrollingNode and |
| SubframeScrollingNode. This is needed because new places in the code are likely to |
| distinguish them e.g. in ScrollingTreeScrollingNodeDelegateIOS::updateChildNodesAfterScroll |
| or when iOS frame scrolling is introduced (see bug 173833). |
| |
| No new tests, behavior unchanged. |
| |
| * page/scrolling/AsyncScrollingCoordinator.cpp: |
| (WebCore::AsyncScrollingCoordinator::ensureRootStateNodeForFrameView): This is only called |
| for main frames, so pass MainFrameScrollingNode. |
| * page/scrolling/ScrollingCoordinator.cpp: |
| (WebCore::operator<<): Distinguish subframe and main frame when dumping. |
| * page/scrolling/ScrollingCoordinator.h: Split FrameScrollingNode into two cases. |
| * page/scrolling/ScrollingStateFrameScrollingNode.cpp: Add node type to constructor and |
| ASSERT it remains of type FrameScrollingNode. |
| (WebCore::ScrollingStateFrameScrollingNode::create): |
| (WebCore::ScrollingStateFrameScrollingNode::ScrollingStateFrameScrollingNode): |
| * page/scrolling/ScrollingStateFrameScrollingNode.h: Add node type to constructor. |
| * page/scrolling/ScrollingStateNode.h: |
| (WebCore::ScrollingStateNode::isFrameScrollingNode const): Includes the two cases. |
| * page/scrolling/ScrollingStateTree.cpp: |
| (WebCore::ScrollingStateTree::createNode): Split FrameScrollingNode into two cases and pass |
| the node type. |
| (WebCore::ScrollingStateTree::attachNode): The first case only happens for main frames while |
| the second case only happens with subframes. Use the appriate node type. |
| * page/scrolling/ScrollingTreeFrameScrollingNode.cpp: Add node type to constructor and |
| ASSERT it remains of type FrameScrollingNode. |
| (WebCore::ScrollingTreeFrameScrollingNode::ScrollingTreeFrameScrollingNode): |
| * page/scrolling/ScrollingTreeFrameScrollingNode.h: Add node type to constructor. |
| * page/scrolling/ScrollingTreeNode.h: Includes the two cases. |
| (WebCore::ScrollingTreeNode::isFrameScrollingNode const): |
| * page/scrolling/ios/ScrollingTreeFrameScrollingNodeIOS.h: Add node type to constructor. |
| * page/scrolling/ios/ScrollingTreeFrameScrollingNodeIOS.mm: Ditto. |
| (WebCore::ScrollingTreeFrameScrollingNodeIOS::create): |
| (WebCore::ScrollingTreeFrameScrollingNodeIOS::ScrollingTreeFrameScrollingNodeIOS): |
| * page/scrolling/ios/ScrollingTreeIOS.cpp: Split FrameScrollingNode into two cases. |
| (WebCore::ScrollingTreeIOS::createScrollingTreeNode): |
| * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.h: Add node type to constructor. |
| * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm: Ditto. |
| (WebCore::ScrollingTreeFrameScrollingNodeMac::create): |
| (WebCore::ScrollingTreeFrameScrollingNodeMac::ScrollingTreeFrameScrollingNodeMac): |
| * page/scrolling/mac/ScrollingTreeMac.cpp: Split FrameScrollingNode into two cases. |
| (ScrollingTreeMac::createScrollingTreeNode): |
| * rendering/RenderLayerCompositor.cpp: |
| (WebCore::RenderLayerCompositor::reattachSubframeScrollLayers): Distinguish the cases of |
| main frames and subframes. |
| (WebCore::scrollCoordinationRoleForNodeType): Split FrameScrollingNode into two cases. |
| (WebCore::RenderLayerCompositor::updateScrollCoordinationForThisFrame): Distinguish the cases |
| of main frames and subframes. |
| (WebCore::RenderLayerCompositor::updateScrollCoordinatedLayer): Split FrameScrollingNode into |
| two cases. |
| |
| 2018-02-07 Darin Adler <darin@apple.com> |
| |
| Try to fix ErrorEvent tests seen failing on buildbot after fix for bug 179591. |
| |
| * bindings/js/JSErrorHandler.cpp: |
| (WebCore::JSErrorHandler::handleEvent): Add back line of code accidentally removed. |
| |
| 2018-02-05 Carlos Garcia Campos <cgarcia@igalia.com> |
| |
| Add a way to check if a host is an IP address |
| https://bugs.webkit.org/show_bug.cgi?id=182427 |
| |
| Reviewed by Alex Christensen. |
| |
| There are several places where this is needed. We currently just assume that any host ending in a digit is an IP |
| address, except in PublicSuffix where platform specific code is used. This patch adds URL::hostIsIPAddress() |
| platform specific implementations, falling back to current assumption if there isn't an implementation for the |
| platform. |
| |
| * page/OriginAccessEntry.cpp: |
| (WebCore::OriginAccessEntry::OriginAccessEntry): Use URL::hostIsIPAddress(). |
| * platform/URL.cpp: |
| (WebCore::URL::hostIsIPAddress): Fallback implementation. |
| * platform/URL.h: |
| * platform/mac/PublicSuffixMac.mm: |
| (WebCore::topPrivatelyControlledDomain): Use URL::hostIsIPAddress(). |
| * platform/mac/URLMac.mm: |
| (WebCore::URL::hostIsIPAddress): Move implementation from PublicSuffixMac.mm. |
| * platform/network/curl/CookieUtil.cpp: |
| (WebCore::CookieUtil::isIPAddress): Use URL::hostIsIPAddress(). |
| * platform/soup/URLSoup.cpp: |
| (WebCore::URL::hostIsIPAddress): Use g_hostname_is_ip_address(). |
| |
| 2018-01-13 Darin Adler <darin@apple.com> |
| |
| Event improvements |
| https://bugs.webkit.org/show_bug.cgi?id=179591 |
| |
| Reviewed by Chris Dumez. |
| |
| - removed all use of Deprecated::ScriptValue |
| |
| - fixed uses of JSC::Strong that can lead to reference cycles in CustomEvent, |
| MessageEvent, and PopStateEvent, refactoring to share more code |
| |
| - removed incorrect use of CachedAttribute on attributes that can change values |
| (should have fixed a bug; can we find a way to test this?) |
| |
| - did a more thorough job of clearing state from events, including clearing |
| certain things before dispatching, and clearing more in initKeyboardEvent |
| (may have fixed some obscure low-severity bugs; can we find a way to test this?) |
| |
| - removed "dummy" keyboard events |
| |
| - reworked code that omits details from error events for security reasons; |
| old approach was "sanitizing" the error by removing the details if not |
| allowed, new approach is adding the details only if allowed |
| |
| * Modules/encryptedmedia/NavigatorEME.h: Added forward declaration needed |
| to compile. |
| |
| * Modules/indexeddb/IDBCursor.h: Added comment about incorrect use of JSC::Strong. |
| * Modules/indexeddb/IDBRequest.h: Ditto. |
| * Modules/paymentrequest/PaymentResponse.h: Ditto. |
| |
| * WebCore.xcodeproj/project.pbxproj: Added JSValueInWrappedObject.h. |
| |
| * bindings/js/CommonVM.cpp: |
| (WebCore::commonVMSlow): Use VM::create instead of VM::createLeaked. Also use |
| local variable instead of the global. |
| |
| * bindings/js/DOMWrapperWorld.h: Put the inline bodies of the currentWorld and |
| worldForDOMObject functions separate from the declarations; long term goal is |
| that the declarations serve as documentation, and are not interspersed with the |
| implementations. Changed currentWorld to take a reference instead of a pointer |
| to ExecState. Added isWorldCompatible function. |
| |
| * bindings/js/JSCustomElementInterface.cpp: |
| (WebCore::JSCustomElementInterface::upgradeElement): Use toJSDOMWindow instead |
| of toJSDOMGlobalObject and added check for null. |
| (WebCore::JSCustomElementInterface::invokeCallback): Ditto. |
| |
| * bindings/js/JSCustomEventCustom.cpp: |
| (WebCore::JSCustomEvent::detail const): Use cachedPropertyValue. |
| (WebCore::JSCustomEvent::visitAdditionalChildren): Added. Needed now that we are |
| using JSValueInWrappedObject instead of JSC::Strong. |
| |
| * bindings/js/JSDOMConvertEventListener.h: |
| (WebCore::Converter<IDLEventListener<T>>::convert): Pass a reference. |
| * bindings/js/JSDOMGlobalObject.cpp: |
| (WebCore::toJSDOMGlobalObject): Ditto. |
| |
| * bindings/js/JSDOMGlobalObject.cpp: |
| (WebCore::JSDOMGlobalObject::JSDOMGlobalObject): Moved initialization to nullptr |
| to the header. |
| (WebCore::toJSDOMGlobalObject): Deleted. |
| * bindings/js/JSDOMGlobalObject.h: Updated for the above. |
| |
| * bindings/js/JSDOMWindowBase.h: Updated includes. Added "DOMWindow.h" but also |
| expanded the deprecated "JSDOMBinding.h" into all the things it includes. |
| |
| * bindings/js/JSDOMWindowProxy.cpp: |
| (WebCore::JSDOMWindowProxy::finishCreation): Tweak argument type to match usage. |
| (WebCore::JSDOMWindowProxy::create): Moved here from header, rolled in the code |
| that creates the structure. |
| (WebCore::JSDOMWindowProxy::setWindow): Take a reference instead of a pointer |
| or a RefPtr&&. |
| (WebCore::JSDOMWindowProxy::toWrapped): Use ? : instead of if. |
| (WebCore::toJS): Pass a reference. |
| * bindings/js/JSDOMWindowProxy.h: Updated for abvoe changes. |
| |
| * bindings/js/JSDOMWrapper.cpp: |
| (WebCore::cloneAcrossWorlds): Added. |
| * bindings/js/JSDOMWrapper.h: Ditto. |
| |
| * bindings/js/JSErrorHandler.cpp: |
| (WebCore::JSErrorHandler::JSErrorHandler): Changed to take a reference. |
| Marked inline. |
| (WebCore::JSErrorHandler::create): Moved here from header. No longer inline, but |
| the constructor is now inline, so same number of levels of function calls, and |
| less code compiled at the call site and less to compile in the header. |
| (WebCore::JSErrorHandler::handleEvent): Use toJSDOMWindow instead |
| of toJSDOMGlobalObject. |
| * bindings/js/JSErrorHandler.h: Ditto. Also made createJSErrorHandler take |
| references instead of pointers. |
| |
| * bindings/js/JSEventListener.cpp: |
| (WebCore::JSEventListener::create): Moved here from the header. |
| (WebCore::createEventListenerForEventHandlerAttribute): Updated for change to |
| currentWorld. |
| (WebCore::toJSDOMGlobalObject): Moved here from JSDOMGlobalObject.cpp because |
| this is the only place this function is used now. Also, this was one of four |
| different overrides and so it was good to delete the other three. Also updated |
| to take a reference rather than a "must not be null" pointer. |
| (WebCore::JSEventListener::handleEvent): Coding style tweaks. |
| (WebCore::JSEventListener::virtualisAttribute const): Deleted. Now isAttribute |
| is virtual and uses final as needed to remain inline-able and efficient. |
| (WebCore::JSEventListener::operator== const): Use is<> and downcast<> instead |
| of JSEventListener::cast. |
| (WebCore::eventHandlerAttribute): Updated for change to currentWorld. |
| (WebCore::setEventHandlerAttribute): Ditto. |
| (WebCore::setWindowEventHandlerAttribute): Ditto. |
| (WebCore::setDocumentEventHandlerAttribute): Ditto. |
| |
| * bindings/js/JSEventListener.h: Moved create functions into the cpp file. |
| Removed the cast function, since callers can use is<> and downcast<> instead. |
| Use final rather than override and made isAttribute override the virtual |
| function in the base class, eliminating virtualIsAttribute. |
| |
| * bindings/js/JSExtendableMessageEventCustom.cpp: |
| (WebCore::JSExtendableMessageEvent::data const): Use isWorldCompatible. |
| Still need to return here and fix the reference cycle for this class. |
| |
| * bindings/js/JSLazyEventListener.cpp: |
| (WebCore::eventParameterName): Moved up so it can be used by the constructor. |
| (WebCore::convertZeroToOne): Added, so that the constructor can fix up text |
| positions passed in to it as part of initializing a data member. |
| (WebCore::JSLazyEventListener::JSLazyEventListener): Changed to take |
| a CreationArguments object instead of lots of separate arguments. |
| (WebCore::JSLazyEventListener::initializeJSFunction const): Removed unneeded |
| checks of m_code and m_eventParameterName, both guaranteed not to be null |
| by the constructor. Tweaked coding style a bit. |
| (WebCore::JSLazyEventListener::create): Pass CreationArguments object. |
| * bindings/js/JSLazyEventListener.h: Updated for above changes. Changed the |
| m_eventParameterName to be a reference since it's always a global string |
| that is never destroyed. |
| |
| * bindings/js/JSMessageEventCustom.cpp: |
| (WebCore::JSMessageEvent::data const): Use cachedPropertyValue and also |
| updated for the new version of MessageEvent that uses a Variant instead |
| of a type plus separate functions for each type. |
| (WebCore::JSMessageEvent::visitAdditionalChildren): Added. Needed now that we are |
| using JSValueInWrappedObject instead of JSC::Strong. |
| |
| * bindings/js/JSPopStateEventCustom.cpp: |
| (WebCore::JSPopStateEvent::state const): Use isWorldCompatible and also updated |
| to use JSValueInWrappedObject instead of JSC::Strong. Would be nice to share more |
| code with CustomEvent and MessageEvent, but at the moment they are subtly different. |
| Changed cacheState from a function to a lambda. |
| (WebCore::JSPopStateEvent::visitAdditionalChildren): Added. Needed now that we are |
| using JSValueInWrappedObject instead of JSC::Strong. |
| |
| * bindings/js/JSValueInWrappedObject.h: Added. |
| |
| * bindings/js/ScriptCachedFrameData.cpp: |
| (WebCore::ScriptCachedFrameData::restore): Updated for changes to JSDOMWindowProxy. |
| * bindings/js/ScriptController.cpp: |
| (WebCore::ScriptController::createWindowProxy): Ditto. |
| (WebCore::ScriptController::setDOMWindowForWindowProxy): Ditto. |
| |
| * bindings/js/WorkerScriptController.cpp: Removed include of ScriptValue.h. |
| (WebCore::WorkerScriptController::evaluate): Reworked to use the new |
| canIncludeErrorDetails instead of sanitizeScriptError. Added a FIXME about the |
| strange handling of the error message out argument. |
| |
| * bindings/scripts/CodeGeneratorJS.pm: |
| (GenerateRuntimeEnableConditionalString): Pass a reference to worldForDOMObject. |
| (GenerateImplementation): Removed an incorrect comment about a removed error |
| check that is truly unneeded. |
| (GenerateAttributeGetterBodyDefinition): Pass a reference to worldForDOMObject. |
| (GenerateAttributeSetterBodyDefinition): Pass references to createJSErrorHandler |
| and worldForDOMObject. |
| (GenerateCallWith): Pass a reference to worldForDOMObject. |
| |
| * bindings/scripts/test/JS/JSTestGlobalObject.cpp: Updated for above changes. |
| * bindings/scripts/test/JS/JSTestNamedGetterCallWith.cpp: Ditto. |
| * bindings/scripts/test/JS/JSTestObj.cpp: Ditto. |
| |
| * dom/CustomEvent.cpp: |
| (WebCore::CustomEvent::CustomEvent): Marked inline. Removed now unneeded |
| ExecState argument. |
| (WebCore::CustomEvent::create): Moved here from header. No longer inline, but |
| the constructor is now inline, so same number of levels of function calls, and |
| less code compiled at the call site and less to compile in the header. |
| (WebCore::CustomEvent::initCustomEvent): Updated to use JSValueInWrappedObject. |
| (WebCore::CustomEvent::trySerializeDetail): Deleted. Now handled by bindings. |
| * dom/CustomEvent.h: Updated for the above. |
| * dom/CustomEvent.idl: Added JSCustomMarkFunction and removed |
| CallWith=ScriptState. |
| |
| * dom/Document.cpp: |
| (WebCore::Document::shouldBypassMainWorldContentSecurityPolicy const): |
| Updated to pass reference to currentWorld but also rewrote to be more direct. |
| |
| * dom/Element.cpp: |
| (WebCore::Element::isKeyboardFocusable const): Take a pointer instead of a |
| reference to the keyboard event. This function can be called with no event; |
| before this patch we were using a "dummy event". |
| * dom/Element.h: Ditto. |
| |
| * dom/ErrorEvent.cpp: |
| (WebCore::ErrorEvent::error): Use isWorldCompatible. |
| |
| * dom/Event.cpp: |
| (WebCore::Event::create): Moved here from header. |
| (WebCore::Event::createForBindings): Ditto. |
| (WebCore::Event::initEvent): Updated to use the name m_canceled instead of |
| the name m_defaultPrevented. |
| (WebCore::Event::resetBeforeDispatch): Added. Clears m_defaultHandled so |
| a value left over from a previous dispatch doesn't affect the next dispatch. |
| |
| * dom/Event.h: Renamed m_defaultPrevented to m_canceled to match specification |
| terminology and be slightly clearer. Added resetBeforeDispatch. Removed the |
| setDefaultPrevented function. |
| |
| * dom/EventDispatcher.cpp: |
| (WebCore::EventDispatcher::dispatchEvent): Added call to resetBeforeDispatch. |
| |
| * dom/EventListener.h: Made isAttribute virtual and got rid of virtualIsAttribute, |
| which was an alternative to using "final" before we had that in the language. |
| |
| * dom/EventTarget.cpp: |
| (WebCore::EventTarget::dispatchEvent): Added call to resetBeforeDispatch. |
| |
| * dom/KeyboardEvent.cpp: |
| (WebCore::KeyboardEvent::KeyboardEvent): Removed unneeded code that initializes |
| m_handledByInputMethod to false; we do that in the class definition now. |
| (WebCore::KeyboardEvent::create): Moved here from header. |
| (WebCore::KeyboardEvent::createForBindings): Ditto. |
| (WebCore::KeyboardEvent::initKeyboardEvent): Added code to reset m_charCode, |
| m_isComposing, m_keyCode, m_repeat, m_underlyingPlatformEvent, m_which, m_code, |
| and m_key. These are needed now that we can reuse an existing event; we don't |
| want them getting out of sync with the other data members. |
| (WebCore::KeyboardEvent::keyCode const): Updated for name change from m_keyEvent |
| to m_underlyingPlatformEvent. |
| (WebCore::KeyboardEvent::charCode const): Ditto. |
| (WebCore::findKeyboardEvent): Deleted. Was unused. |
| * dom/KeyboardEvent.h: Updated for the above. Removed KeyboardEvent::createForDummy. |
| |
| * dom/MessageEvent.cpp: |
| (WebCore::MessageEvent::MessageEvent): Removed unnneded ExecState argument. |
| Simplified since m_data is now a Variant. |
| (WebCore::MessageEvent::create): More of the same. |
| (WebCore::MessageEvent::initMessageEvent): Ditto. |
| (WebCore::MessageEvent::trySerializeData): Deleted. |
| (WebCore::MessageEvent::data const): Deleted. |
| * dom/MessageEvent.h: Use a Variant. |
| * dom/MessageEvent.idl: Added JSCustomMarkFunction and removed |
| CallWith=ScriptState and CachedAttribute. |
| |
| * dom/MouseEvent.h: Removed obsolete comment. |
| * dom/MouseEvent.idl: Wrap line differently. |
| |
| * dom/PopStateEvent.cpp: |
| (WebCore::PopStateEvent::PopStateEvent): Removed unneeded ExecState argument. |
| Updated to use JSValueInWrappedObject. |
| (WebCore::PopStateEvent::create): Ditto. |
| (WebCore::PopStateEvent::trySerializeState): Ditto. |
| * dom/PopStateEvent.h: Ditto. |
| * dom/PopStateEvent.idl: Use JSCustomMarkFunction, and don't use |
| ConstructorCallWith=ScriptState. |
| |
| * dom/ScriptExecutionContext.cpp: |
| (WebCore::ScriptExecutionContext::sanitizeScriptError): Deleted. |
| (WebCore::ScriptExecutionContext::canIncludeErrorDetails): Added. |
| (WebCore::ScriptExecutionContext::dispatchErrorEvent): Clarify by |
| using canIncludeErrorDetails instead of sanitizeScriptError. |
| * dom/ScriptExecutionContext.h: Ditto. |
| |
| * dom/WheelEvent.cpp: |
| (WebCore::WheelEvent::WheelEvent): Updated for name change and also to |
| eliminate m_initializedWithPlatformWheelEvent. |
| (WebCore::WheelEvent::create): Moved here from header. |
| (WebCore::WheelEvent::createForBindings): Ditto. |
| (WebCore::WheelEvent::initWebKitWheelEvent): Renamed from initWheelEvent. |
| * dom/WheelEvent.h: Renamed initWheelEvent to initWebKitWheelEvent since |
| there is no standard init function for wheel events and we have this only |
| for backward compatibility. Got rid of the separate boolean |
| m_initializedWithPlatformWheelEvent and instead made the renamed |
| m_wheelEvent, m_underlyingPlatformEvent, optional for when there is no |
| underlying platform event. |
| |
| * html/BaseDateAndTimeInputType.cpp: |
| (WebCore::BaseDateAndTimeInputType::isKeyboardFocusable const): Take a |
| pointer to the event so we can handle the case where there is no event. |
| * html/BaseDateAndTimeInputType.h: Ditto. |
| * html/HTMLAnchorElement.cpp: |
| (WebCore::HTMLAnchorElement::isKeyboardFocusable const): Ditto. |
| * html/HTMLAnchorElement.h: Ditto. |
| * html/HTMLAreaElement.cpp: |
| (WebCore::HTMLAreaElement::isKeyboardFocusable const): Ditto. |
| * html/HTMLAreaElement.h: Ditto. |
| * html/HTMLDocument.cpp: Added include of "DOMWindow.h". |
| * html/HTMLFormControlElement.cpp: |
| (WebCore::HTMLFormControlElement::isKeyboardFocusable const): Take |
| pointer to the event. |
| * html/HTMLFormControlElement.h: Ditto. |
| * html/HTMLFrameOwnerElement.cpp: |
| (WebCore::HTMLFrameOwnerElement::isKeyboardFocusable const): Ditto. |
| * html/HTMLFrameOwnerElement.h: Ditto. |
| * html/HTMLIFrameElement.h: Ditto. |
| * html/HTMLInputElement.cpp: |
| (WebCore::HTMLInputElement::isKeyboardFocusable const): Ditto. |
| (WebCore::HTMLInputElement::isTextFormControlKeyboardFocusable const): Ditto. |
| * html/HTMLInputElement.h: Ditto. |
| * html/HTMLPlugInElement.cpp: |
| (WebCore::HTMLPlugInElement::isKeyboardFocusable const): Ditto. |
| * html/HTMLPlugInElement.h: Ditto. |
| * html/HTMLSelectElement.cpp: |
| (WebCore::HTMLSelectElement::isKeyboardFocusable const): Ditto. |
| * html/HTMLSelectElement.h: Ditto. |
| * html/HTMLTextAreaElement.cpp: |
| (WebCore::HTMLTextAreaElement::isKeyboardFocusable const): Ditto. |
| * html/HTMLTextAreaElement.h: Ditto. |
| * html/InputType.cpp: |
| (WebCore::InputType::isKeyboardFocusable const): Ditto. |
| * html/InputType.h: Ditto. |
| * html/RadioInputType.cpp: |
| (WebCore::RadioInputType::isKeyboardFocusable const): Ditto. |
| * html/RadioInputType.h: Ditto. |
| * html/TextFieldInputType.cpp: |
| (WebCore::TextFieldInputType::isKeyboardFocusable const): Ditto. |
| * html/TextFieldInputType.h: Ditto. |
| |
| * inspector/CommandLineAPIHost.cpp: |
| (WebCore::listenerEntriesFromListenerInfo): Pass reference to currentWorld. |
| Use is<> and downcast<> instead of JSEventListener::cast. |
| * inspector/PageScriptDebugServer.cpp: |
| (WebCore::PageScriptDebugServer::isContentScript const): Pass reference to |
| currentWorld. |
| * inspector/agents/InspectorDOMAgent.cpp: |
| (WebCore::InspectorDOMAgent::buildObjectForEventListener): |
| Use is<> and downcast<> instead of JSEventListener::cast. |
| |
| * mathml/MathMLElement.cpp: |
| (WebCore::MathMLElement::isKeyboardFocusable const): Take a |
| pointer to the event so we can handle the case where there is no event. |
| * mathml/MathMLElement.h: Ditto. |
| |
| * page/DOMWindow.cpp: |
| (WebCore::DOMWindow::dispatchEvent): Added call to resetBeforeDispatch. |
| All event dispatching paths now need to do this; there are 3. |
| |
| * page/EventHandler.cpp: |
| (WebCore::handleWheelEventInAppropriateEnclosingBox): Use the new |
| underlyingPlatformEvent function, less confusing than calling a function |
| named wheelEvent() on an object of type WheelEvent. Also, it returns |
| a const& to std::optional instead of a pointer, so updated for that. |
| (WebCore::EventHandler::defaultWheelEventHandler): Ditto. |
| (WebCore::EventHandler::internalKeyEvent): Use preventDefault instead |
| of setDefaultPrevented(true). |
| (WebCore::EventHandler::tabsToLinks const): Take a pointer. |
| (WebCore::EventHandler::defaultArrowEventHandler): Pass a pointer. |
| (WebCore::EventHandler::defaultTabEventHandler): Ditto. |
| * page/EventHandler.h: Updated for the above. |
| |
| * page/EventSource.cpp: |
| (WebCore::EventSource::dispatchMessageEvent): Pass a reference rather |
| than a pointer when creating a message event. |
| |
| * page/FocusController.cpp: |
| (WebCore::isFocusableElementOrScopeOwner): Use a pointer instead of reference |
| for keyboard event. |
| (WebCore::isNonFocusableScopeOwner): Ditto. |
| (WebCore::isFocusableScopeOwner): Ditto. |
| (WebCore::shadowAdjustedTabIndex): Ditto. |
| (WebCore::FocusController::findFocusableElementDescendingIntoSubframes): |
| Renamed to use simpler terminology than "descending down into frame document". |
| Changed to take a pointer instead of reference. |
| (WebCore::FocusController::setInitialFocus): Pass nullptr instead of |
| using KeyboardEvent::createForDummy. |
| (WebCore::FocusController::advanceFocus): Pointer instead of reference. |
| (WebCore::FocusController::advanceFocusInDocumentOrder): Ditto. |
| (WebCore::FocusController::findFocusableElementAcrossFocusScope): Ditto. |
| (WebCore::FocusController::findFocusableElementWithinScope): Ditto. |
| (WebCore::FocusController::nextFocusableElementWithinScope): Ditto. |
| (WebCore::FocusController::previousFocusableElementWithinScope): Ditto. |
| (WebCore::FocusController::findFocusableElementOrScopeOwner): Ditto. |
| (WebCore::FocusController::findElementWithExactTabIndex): Ditto. |
| (WebCore::nextElementWithGreaterTabIndex): Ditto. |
| (WebCore::previousElementWithLowerTabIndex): Ditto. |
| (WebCore::FocusController::nextFocusableElement): Ditto. |
| (WebCore::FocusController::previousFocusableElement): Ditto. |
| (WebCore::FocusController::nextFocusableElementOrScopeOwner): Ditto. |
| (WebCore::FocusController::previousFocusableElementOrScopeOwner): Ditto. |
| (WebCore::FocusController::findFocusCandidateInContainer): Ditto. |
| (WebCore::FocusController::advanceFocusDirectionallyInContainer): Ditto. |
| (WebCore::FocusController::advanceFocusDirectionally): Ditto. |
| * page/FocusController.h: Updated for the above. |
| |
| * page/PageConsoleClient.cpp: |
| (WebCore::objectArgumentAt): Added. Helper to make functions below simpler. |
| (WebCore::canvasRenderingContext): Factored out logic to get the context |
| from either a canvas or a canvas rendering context from the functions below. |
| Also updated to not use ScriptValue and to use auto quite a bit more. |
| (WebCore::PageConsoleClient::record): Updated to use the functions above. |
| (WebCore::PageConsoleClient::recordEnd): Ditto. |
| |
| * page/ios/EventHandlerIOS.mm: |
| (WebCore::EventHandler::tabsToAllFormControls const): Take a pointer |
| instead of a reference. |
| * page/mac/EventHandlerMac.mm: |
| (WebCore::EventHandler::tabsToAllFormControls const): Ditto. |
| * page/win/EventHandlerWin.cpp: |
| (WebCore::EventHandler::tabsToAllFormControls const): Ditto. |
| * platform/glib/EventHandlerGLib.cpp: |
| (WebCore::EventHandler::tabsToAllFormControls const): Ditto. |
| * svg/SVGAElement.cpp: |
| (WebCore::SVGAElement::isKeyboardFocusable const): Ditto. |
| * svg/SVGAElement.h: Ditto. |
| |
| * testing/Internals.cpp: |
| (WebCore::Internals::isFromCurrentWorld const): Use isWorldCompatible. |
| |
| 2018-02-07 Andy Estes <aestes@apple.com> |
| |
| ASSERTION FAILED: vm->currentThreadIsHoldingAPILock() seen with http/tests/paymentrequest/payment-request-show-method.https.html |
| https://bugs.webkit.org/show_bug.cgi?id=182591 |
| |
| Reviewed by Youenn Fablet. |
| |
| Fixes assertion failures in http/tests/paymentrequest/payment-request-show-method.https.html. |
| |
| DOMPromise::whenSettled() calls the JSC API without first aquiring the API lock, and |
| r228195 added a call to whenSettled() where the lock is not guaranteed to be already |
| acquired. |
| |
| Fix this by creating a JSLockHolder in DOMPromise::whenSettled(). |
| |
| * bindings/js/JSDOMPromise.cpp: |
| (WebCore::DOMPromise::whenSettled): |
| |
| 2018-02-07 Ryan Haddad <ryanhaddad@apple.com> |
| |
| Unreviewed, rolling out r228243. |
| |
| Introduced an assertion failure with API test |
| FullscreenZoomInitialFrame.WebKit |
| |
| Reverted changeset: |
| |
| "Assert that NSApp is not running in the WebProcess." |
| https://bugs.webkit.org/show_bug.cgi?id=182553 |
| https://trac.webkit.org/changeset/228243 |
| |
| 2018-02-07 Christopher Reid <chris.reid@sony.com> |
| |
| [Curl] Cookie Database has some warnings when compiled in clang |
| https://bugs.webkit.org/show_bug.cgi?id=182583 |
| |
| Reviewed by Alex Christensen. |
| |
| No new tests, no change in behavior. |
| |
| Fixing unused-parameter, missing-field-initializers, reorder, and pragma-once-outside-header warnings. |
| |
| * platform/network/NetworkStorageSession.h: |
| * platform/network/curl/CookieJarCurlDatabase.cpp: |
| * platform/network/curl/CookieJarDB.cpp: |
| * platform/network/curl/NetworkStorageSessionCurl.cpp: |
| |
| 2018-02-07 Ryosuke Niwa <rniwa@webkit.org> |
| |
| Remove unused CSSParserContext in CSSParser::parseInlineStyleDeclaration |
| https://bugs.webkit.org/show_bug.cgi?id=182587 |
| |
| Reviewed by Simon Fraser. |
| |
| Removed the code. There is no need to create an unused CSSParserContext in CSSParser. |
| |
| * css/parser/CSSParser.cpp: |
| (WebCore::CSSParser::parseInlineStyleDeclaration): |
| * css/parser/CSSParser.h: |
| * css/parser/CSSParserImpl.cpp: |
| (WebCore::CSSParserImpl::parseInlineStyleDeclaration): |
| * css/parser/CSSParserImpl.h: |
| |
| 2018-02-07 Ross Kirsling <ross.kirsling@sony.com> |
| |
| Add missing #if ENABLE(VIDEO_TRACK) after r228201. |
| https://bugs.webkit.org/show_bug.cgi?id=182585 |
| |
| Reviewed by Chris Dumez. |
| |
| * loader/LinkPreloadResourceClients.h: |
| |
| 2018-02-07 Per Arne Vollan <pvollan@apple.com> |
| |
| Assert that NSApp is not running in the WebProcess. |
| https://bugs.webkit.org/show_bug.cgi?id=182553 |
| <rdar://problem/37316144> |
| |
| Reviewed by Simon Fraser. |
| |
| In WebCore, there are a few places where NSApp is referenced. Since the WebContent process |
| is no longer using the NSApplication run loop, and NSApp is no longer guaranteed to be |
| valid, we should make sure that the NSApp is not referenced by the WebContent process or |
| the Network process, by asserting that the NSApplication event loop is running when NSApp |
| is referenced. It is still ok for the UIProcess to reference NSApp. Adding these assert |
| will help catch references to NSApp when the NSApplication run loop is not used. |
| Also, do not post a fake mouse event in PasteBoard::setDragImage when the NSApplication |
| run loop is not running, since this is only relevant in WK1. |
| |
| No new tests, covered by existing tests. |
| |
| * page/mac/EventHandlerMac.mm: |
| (WebCore::lastEventIsMouseUp): |
| (WebCore::EventHandler::sendFakeEventsAfterWidgetTracking): |
| * platform/mac/PasteboardMac.mm: |
| (WebCore::Pasteboard::setDragImage): |
| * platform/mac/WebVideoFullscreenController.mm: |
| (-[WebVideoFullscreenController windowDidLoad]): |
| (-[WebVideoFullscreenController updateMenuAndDockForFullscreen]): |
| * platform/mac/WebWindowAnimation.mm: |
| (WebCore::WebWindowAnimationDurationFromDuration): |
| |
| 2018-02-07 Youenn Fablet <youenn@apple.com> |
| |
| ASSERTION FAILED: m_timeOrigin in Performance::Performance() |
| https://bugs.webkit.org/show_bug.cgi?id=182558 |
| <rdar://problem/37297551> |
| |
| Reviewed by Chris Dumez. |
| |
| Test: http/wpt/fetch/cors-preflight-star.any.serviceworker.html |
| |
| * loader/CrossOriginPreflightChecker.cpp: |
| (WebCore::CrossOriginPreflightChecker::startPreflight): |
| |
| 2018-02-07 Wenson Hsieh <wenson_hsieh@apple.com> |
| |
| REGRESSION(r226396): File paths are inserted when dropping image files |
| https://bugs.webkit.org/show_bug.cgi?id=182557 |
| <rdar://problem/37294120> |
| |
| Reviewed by Ryosuke Niwa. |
| |
| Reverts unintended changes in <http://trac.webkit.org/r226396>. Before r226396, WebContentReader::readFilenames |
| (a helper function in macOS-specific code) contained logic to create and insert attachment elements if |
| ENABLE(ATTACHMENT_ELEMENT); otherwise, it would fall back to inserting the visible URL as a text node. Since we |
| enable the attachment element on all Cocoa platforms via xcconfig files, this was effectively dead code. |
| |
| However, when r226396 (which moved this out from macOS to Cocoa platform code) refactored this helper function, |
| it also moved this chunk of code out of the !ENABLE(ATTACHMENT) conditional and into a PLATFORM(MAC) guard, |
| which means that we now fall back to inserting file paths as text when attachment elements are disabled. To fix |
| this, we simply remove the (previously) dead code. |
| |
| A more subtle difference is that we no longer always return true from WebContentReader::readFilePaths. This |
| means that when we drop files, we no longer skip over the early return in documentFragmentFromDragData when |
| we've made a fragment, so we read the file path as a URL. To address this, we just restore the pre-macOS 10.13.4 |
| behavior of initializing the document fragment. |
| |
| Test: modified editing/pasteboard/drag-files-to-editable-element-as-URLs.html. |
| |
| * editing/WebContentReader.cpp: |
| (WebCore::WebContentReader::ensureFragment): Deleted. |
| |
| Remove this helper, as it was only used in WebContentReader::readFilePaths. |
| |
| * editing/WebContentReader.h: |
| * editing/cocoa/WebContentReaderCocoa.mm: |
| (WebCore::WebContentReader::readFilePaths): |
| |
| 2018-02-07 John Wilander <wilander@apple.com> |
| |
| Restrict Referer to just the origin for third parties in private mode and third parties ITP blocks cookies for in regular mode |
| https://bugs.webkit.org/show_bug.cgi?id=182559 |
| <rdar://problem/36990337> |
| |
| Reviewed by Andy Estes. |
| |
| Tests: http/tests/resourceLoadStatistics/strip-referrer-to-origin-for-prevalent-subresource-redirects.html |
| http/tests/resourceLoadStatistics/strip-referrer-to-origin-for-prevalent-subresource-requests.html |
| http/tests/security/strip-referrer-to-origin-for-third-party-redirects-in-private-mode.html |
| http/tests/security/strip-referrer-to-origin-for-third-party-requests-in-private-mode.html |
| |
| * page/SecurityPolicy.cpp: |
| (WebCore::SecurityPolicy::referrerToOriginString): |
| Now exposed within WebCore. This is to make sure we create a proper referrer |
| string in WebCore::ResourceRequestBase::setExistingHTTPReferrerToOriginString(). |
| (WebCore::referrerToOriginString): Deleted. |
| Used to be internal. |
| * page/SecurityPolicy.h: |
| * platform/network/ResourceRequestBase.cpp: |
| (WebCore::ResourceRequestBase::setExistingHTTPReferrerToOriginString): |
| New, exported function used in WebKit. Note that this function does not |
| set the referrer if the request has none since before. |
| * platform/network/ResourceRequestBase.h: |
| |
| |
| 2018-02-07 Zalan Bujtas <zalan@apple.com> |
| |
| [RenderTreeBuilder] Remove RenderElement::destroyLeftoverChildren. |
| https://bugs.webkit.org/show_bug.cgi?id=182518 |
| <rdar://problem/37256035> |
| |
| Reviewed by Antti Koivisto. |
| |
| Remove leftover children before we call takeChild() on the parent (as opposed to when |
| we finally call destroy() on the parent). |
| This patch also explicitly destroys the top level pagination renderers. |
| |
| Covered by existing tests. |
| |
| * rendering/RenderElement.cpp: |
| (WebCore::RenderElement::removeAndDestroyChild): |
| (WebCore::RenderElement::destroyLeftoverChildren): Deleted. |
| * rendering/RenderElement.h: |
| * rendering/RenderObject.cpp: |
| (WebCore::RenderObject::destroy): |
| * rendering/updating/RenderTreeUpdater.cpp: |
| (WebCore::RenderTreeUpdater::tearDownRenderers): |
| (WebCore::RenderTreeUpdater::tearDownLeftoverPaginationRenderersIfNeeded): |
| * rendering/updating/RenderTreeUpdater.h: |
| |
| 2018-02-07 Daniel Bates <dabates@apple.com> |
| |
| Log error when authentication challenge is blocked due to an insecure request |
| https://bugs.webkit.org/show_bug.cgi?id=182358 |
| |
| Reviewed by Andy Estes. |
| |
| Emit an error message to Web Inspector console that explains why an authentication |
| challenge was blocked so that a developer can fix up their site. |
| |
| Tests: http/tests/security/mixedContent/insecure-basic-auth-image.https.html |
| http/tests/security/mixedContent/secure-page-navigates-to-basic-auth-insecure-page.https.html |
| http/tests/security/mixedContent/secure-page-navigates-to-basic-auth-secure-page-via-insecure-redirect.https.html |
| |
| * loader/FrameLoader.cpp: |
| (WebCore::FrameLoader::receivedFirstData): Log to the console an error message |
| if the document we are loading was forbidden from prompting for credentials. |
| Also removed duplicate assertion to ensure document is non-null and update |
| call to LinkLoader::loadLinksFromHeader() to use local variable to access |
| the document we are loading instead of asking the frame for it, again. |
| (WebCore::FrameLoader::reportAuthenticationChallengeBlocked): Added. |
| * loader/FrameLoader.h: |
| |
| * loader/ResourceLoader.cpp: |
| (WebCore::ResourceLoader::init): |
| (WebCore::ResourceLoader::willSendRequestInternal): |
| Track the decision to forbid asking for credentials due to Fetch spec. requirements (m_canAskClientForCredentials) |
| independently from the decision to forbid them due to making an insecure request (m_wasInsecureRequestSeen) |
| so that we know the reason why we blocked asking for credentials when we receive an authentication challenge. |
| |
| (WebCore::ResourceLoader::didBlockAuthenticationChallenge): Added. |
| (WebCore::ResourceLoader::isAllowedToAskUserForCredentials const): Modified code now that we track |
| whether we have seen an insecure request so far independently from decision to forbid prompting for |
| credentials due to a Fetch spec. requirement. |
| |
| (WebCore::ResourceLoader::didReceiveAuthenticationChallenge): |
| Store a bit whether we have seen an insecure request when loading the resource so far. Disallow |
| asking for credentials if we have seen an insecure request so far. Once we receive a response |
| |
| * loader/ResourceLoader.h: |
| (WebCore::ResourceLoader::wasAuthenticationChallengeBlocked const): Added. |
| (WebCore::ResourceLoader::wasInsecureRequestSeen const): Added. |
| |
| 2018-02-06 Matt Lewis <jlewis3@apple.com> |
| |
| Removed the assertions from VideoFullscreenInterfaceAVKit.mm temporarily to stop the resulting crashes during debugging. |
| https://bugs.webkit.org/show_bug.cgi?id=182527 |
| |
| Unreviewed build fix. |
| |
| * platform/ios/VideoFullscreenInterfaceAVKit.mm: |
| (VideoFullscreenInterfaceAVKit::exitFullscreen): |
| (VideoFullscreenInterfaceAVKit::cleanupFullscreen): |
| |
| 2018-02-07 Zalan Bujtas <zalan@apple.com> |
| |
| [RenderTreeBuilder] Move RenderBlock::removeLeftoverAnonymousBlock to RenderTreeBuilder |
| https://bugs.webkit.org/show_bug.cgi?id=182510 |
| <rdar://problem/37250037> |
| |
| Reviewed by Antti Koivisto. |
| |
| Do not reinvent subtree reparenting. |
| |
| Covered by existing tests. |
| |
| * rendering/RenderBlock.cpp: |
| (WebCore::RenderBlock::removeLeftoverAnonymousBlock): Deleted. |
| * rendering/RenderBlock.h: |
| * rendering/RenderBoxModelObject.cpp: |
| (WebCore::RenderBoxModelObject::moveAllChildrenToInternal): |
| * rendering/RenderBoxModelObject.h: |
| * rendering/RenderButton.h: |
| * rendering/RenderElement.cpp: |
| (WebCore::RenderElement::detachRendererInternal): |
| (WebCore::RenderElement::attachRendererInternal): |
| (WebCore::RenderElement::insertChildInternal): |
| (WebCore::RenderElement::takeChildInternal): |
| * rendering/RenderElement.h: |
| * rendering/RenderRuby.h: |
| * rendering/RenderRubyRun.h: |
| * rendering/RenderTextControl.h: |
| * rendering/updating/RenderTreeBuilderBlock.cpp: |
| (WebCore::RenderTreeBuilder::Block::insertChildIgnoringContinuation): |
| (WebCore::RenderTreeBuilder::Block::childBecameNonInline): |
| (WebCore::RenderTreeBuilder::Block::removeLeftoverAnonymousBlock): |
| * rendering/updating/RenderTreeBuilderBlock.h: |
| |
| 2018-02-06 Don Olmstead <don.olmstead@sony.com> |
| |
| Remove WebCore/ForwardingHeaders directory |
| https://bugs.webkit.org/show_bug.cgi?id=182347 |
| |
| Reviewed by Keith Miller. |
| |
| No new tests. No change in behavior. |
| |
| * CMakeLists.txt: |
| * ForwardingHeaders/bindings/ScriptFunctionCall.h: Removed. |
| * ForwardingHeaders/bindings/ScriptObject.h: Removed. |
| * ForwardingHeaders/bindings/ScriptValue.h: Removed. |
| * ForwardingHeaders/builtins/BuiltinNames.h: Removed. |
| * ForwardingHeaders/builtins/BuiltinUtils.h: Removed. |
| * ForwardingHeaders/builtins/JSCBuiltins.h: Removed. |
| * ForwardingHeaders/bytecode/CodeBlock.h: Removed. |
| * ForwardingHeaders/bytecode/SpeculatedType.h: Removed. |
| * ForwardingHeaders/bytecode/UnlinkedFunctionExecutable.h: Removed. |
| * ForwardingHeaders/debugger/Debugger.h: Removed. |
| * ForwardingHeaders/domjit/DOMJITAbstractHeap.h: Removed. |
| * ForwardingHeaders/domjit/DOMJITEffect.h: Removed. |
| * ForwardingHeaders/domjit/DOMJITGetterSetter.h: Removed. |
| * ForwardingHeaders/domjit/DOMJITHeapRange.h: Removed. |
| * ForwardingHeaders/domjit/DOMJITSignature.h: Removed. |
| * ForwardingHeaders/heap/BlockDirectoryInlines.h: Removed. |
| * ForwardingHeaders/heap/DeleteAllCodeEffort.h: Removed. |
| * ForwardingHeaders/heap/FastMallocAlignedMemoryAllocator.h: Removed. |
| * ForwardingHeaders/heap/GCActivityCallback.h: Removed. |
| * ForwardingHeaders/heap/GCFinalizationCallback.h: Removed. |
| * ForwardingHeaders/heap/HandleTypes.h: Removed. |
| * ForwardingHeaders/heap/Heap.h: Removed. |
| * ForwardingHeaders/heap/HeapInlines.h: Removed. |
| * ForwardingHeaders/heap/HeapObserver.h: Removed. |
| * ForwardingHeaders/heap/IncrementalSweeper.h: Removed. |
| * ForwardingHeaders/heap/LockDuringMarking.h: Removed. |
| * ForwardingHeaders/heap/MachineStackMarker.h: Removed. |
| * ForwardingHeaders/heap/MarkedBlockInlines.h: Removed. |
| * ForwardingHeaders/heap/MarkingConstraint.h: Removed. |
| * ForwardingHeaders/heap/RunningScope.h: Removed. |
| * ForwardingHeaders/heap/SimpleMarkingConstraint.h: Removed. |
| * ForwardingHeaders/heap/SlotVisitor.h: Removed. |
| * ForwardingHeaders/heap/SlotVisitorInlines.h: Removed. |
| * ForwardingHeaders/heap/Strong.h: Removed. |
| * ForwardingHeaders/heap/StrongInlines.h: Removed. |
| * ForwardingHeaders/heap/SubspaceInlines.h: Removed. |
| * ForwardingHeaders/heap/ThreadLocalCache.h: Removed. |
| * ForwardingHeaders/heap/Weak.h: Removed. |
| * ForwardingHeaders/heap/WeakInlines.h: Removed. |
| * ForwardingHeaders/inspector/ConsoleMessage.h: Removed. |
| * ForwardingHeaders/inspector/ContentSearchUtilities.h: Removed. |
| * ForwardingHeaders/inspector/IdentifiersFactory.h: Removed. |
| * ForwardingHeaders/inspector/InjectedScript.h: Removed. |
| * ForwardingHeaders/inspector/InjectedScriptBase.h: Removed. |
| * ForwardingHeaders/inspector/InjectedScriptHost.h: Removed. |
| * ForwardingHeaders/inspector/InjectedScriptManager.h: Removed. |
| * ForwardingHeaders/inspector/InjectedScriptModule.h: Removed. |
| * ForwardingHeaders/inspector/InspectorAgentBase.h: Removed. |
| * ForwardingHeaders/inspector/InspectorAgentRegistry.h: Removed. |
| * ForwardingHeaders/inspector/InspectorBackendDispatcher.h: Removed. |
| * ForwardingHeaders/inspector/InspectorBackendDispatchers.h: Removed. |
| * ForwardingHeaders/inspector/InspectorEnvironment.h: Removed. |
| * ForwardingHeaders/inspector/InspectorFrontendChannel.h: Removed. |
| * ForwardingHeaders/inspector/InspectorFrontendDispatchers.h: Removed. |
| * ForwardingHeaders/inspector/InspectorFrontendRouter.h: Removed. |
| * ForwardingHeaders/inspector/InspectorProtocolObjects.h: Removed. |
| * ForwardingHeaders/inspector/InspectorProtocolTypes.h: Removed. |
| * ForwardingHeaders/inspector/PerGlobalObjectWrapperWorld.h: Removed. |
| * ForwardingHeaders/inspector/ScriptArguments.h: Removed. |
| * ForwardingHeaders/inspector/ScriptBreakpoint.h: Removed. |
| * ForwardingHeaders/inspector/ScriptCallFrame.h: Removed. |
| * ForwardingHeaders/inspector/ScriptCallStack.h: Removed. |
| * ForwardingHeaders/inspector/ScriptCallStackFactory.h: Removed. |
| * ForwardingHeaders/inspector/ScriptDebugListener.h: Removed. |
| * ForwardingHeaders/inspector/ScriptDebugServer.h: Removed. |
| * ForwardingHeaders/inspector/agents/InspectorAgent.h: Removed. |
| * ForwardingHeaders/inspector/agents/InspectorConsoleAgent.h: Removed. |
| * ForwardingHeaders/inspector/agents/InspectorDebuggerAgent.h: Removed. |
| * ForwardingHeaders/inspector/agents/InspectorHeapAgent.h: Removed. |
| * ForwardingHeaders/inspector/agents/InspectorRuntimeAgent.h: Removed. |
| * ForwardingHeaders/inspector/agents/InspectorScriptProfilerAgent.h: Removed. |
| * ForwardingHeaders/interpreter/CallFrame.h: Removed. |
| * ForwardingHeaders/interpreter/FrameTracers.h: Removed. |
| * ForwardingHeaders/interpreter/ShadowChicken.h: Removed. |
| * ForwardingHeaders/interpreter/StackVisitor.h: Removed. |
| * ForwardingHeaders/jit/JITCode.h: Removed. |
| * ForwardingHeaders/jit/JITMathICForwards.h: Removed. |
| * ForwardingHeaders/jit/Snippet.h: Removed. |
| * ForwardingHeaders/jit/SnippetParams.h: Removed. |
| * ForwardingHeaders/jit/SpillRegistersMode.h: Removed. |
| * ForwardingHeaders/masm/X86Assembler.h: Removed. |
| * ForwardingHeaders/parser/ParserError.h: Removed. |
| * ForwardingHeaders/parser/SourceCode.h: Removed. |
| * ForwardingHeaders/parser/SourceProvider.h: Removed. |
| * ForwardingHeaders/parser/SourceProviderCache.h: Removed. |
| * ForwardingHeaders/profiler/ProfilerDatabase.h: Removed. |
| * ForwardingHeaders/runtime/ArgList.h: Removed. |
| * ForwardingHeaders/runtime/ArrayBuffer.h: Removed. |
| * ForwardingHeaders/runtime/ArrayBufferView.h: Removed. |
| * ForwardingHeaders/runtime/ArrayPrototype.h: Removed. |
| * ForwardingHeaders/runtime/AuxiliaryBarrierInlines.h: Removed. |
| * ForwardingHeaders/runtime/BooleanObject.h: Removed. |
| * ForwardingHeaders/runtime/CallData.h: Removed. |
| * ForwardingHeaders/runtime/CatchScope.h: Removed. |
| * ForwardingHeaders/runtime/CommonIdentifiers.h: Removed. |
| * ForwardingHeaders/runtime/Completion.h: Removed. |
| * ForwardingHeaders/runtime/ConfigFile.h: Removed. |
| * ForwardingHeaders/runtime/ConsoleClient.h: Removed. |
| * ForwardingHeaders/runtime/ConsoleTypes.h: Removed. |
| * ForwardingHeaders/runtime/ConstructAbility.h: Removed. |
| * ForwardingHeaders/runtime/ConstructData.h: Removed. |
| * ForwardingHeaders/runtime/DataView.h: Removed. |
| * ForwardingHeaders/runtime/DateInstance.h: Removed. |
| * ForwardingHeaders/runtime/Error.h: Removed. |
| * ForwardingHeaders/runtime/ErrorHandlingScope.h: Removed. |
| * ForwardingHeaders/runtime/ErrorInstance.h: Removed. |
| * ForwardingHeaders/runtime/ErrorPrototype.h: Removed. |
| * ForwardingHeaders/runtime/Exception.h: Removed. |
| * ForwardingHeaders/runtime/ExceptionHelpers.h: Removed. |
| * ForwardingHeaders/runtime/Float32Array.h: Removed. |
| * ForwardingHeaders/runtime/Float64Array.h: Removed. |
| * ForwardingHeaders/runtime/FunctionConstructor.h: Removed. |
| * ForwardingHeaders/runtime/FunctionExecutable.h: Removed. |
| * ForwardingHeaders/runtime/FunctionPrototype.h: Removed. |
| * ForwardingHeaders/runtime/HashMapImpl.h: Removed. |
| * ForwardingHeaders/runtime/Identifier.h: Removed. |
| * ForwardingHeaders/runtime/IdentifierInlines.h: Removed. |
| * ForwardingHeaders/runtime/InitializeThreading.h: Removed. |
| * ForwardingHeaders/runtime/Int16Array.h: Removed. |
| * ForwardingHeaders/runtime/Int32Array.h: Removed. |
| * ForwardingHeaders/runtime/Int8Array.h: Removed. |
| * ForwardingHeaders/runtime/InternalFunction.h: Removed. |
| * ForwardingHeaders/runtime/Intrinsic.h: Removed. |
| * ForwardingHeaders/runtime/IterationKind.h: Removed. |
| * ForwardingHeaders/runtime/IteratorOperations.h: Removed. |
| * ForwardingHeaders/runtime/IteratorPrototype.h: Removed. |
| * ForwardingHeaders/runtime/JSAPIValueWrapper.h: Removed. |
| * ForwardingHeaders/runtime/JSArray.h: Removed. |
| * ForwardingHeaders/runtime/JSArrayBuffer.h: Removed. |
| * ForwardingHeaders/runtime/JSArrayBufferView.h: Removed. |
| * ForwardingHeaders/runtime/JSCInlines.h: Removed. |
| * ForwardingHeaders/runtime/JSCJSValue.h: Removed. |
| * ForwardingHeaders/runtime/JSCJSValueInlines.h: Removed. |
| * ForwardingHeaders/runtime/JSCallee.h: Removed. |
| * ForwardingHeaders/runtime/JSCell.h: Removed. |
| * ForwardingHeaders/runtime/JSCellInlines.h: Removed. |
| * ForwardingHeaders/runtime/JSDataView.h: Removed. |
| * ForwardingHeaders/runtime/JSDestructibleObject.h: Removed. |
| * ForwardingHeaders/runtime/JSDestructibleObjectHeapCellType.h: Removed. |
| * ForwardingHeaders/runtime/JSExportMacros.h: Removed. |
| * ForwardingHeaders/runtime/JSFunction.h: Removed. |
| * ForwardingHeaders/runtime/JSGlobalObject.h: Removed. |
| * ForwardingHeaders/runtime/JSGlobalObjectInlines.h: Removed. |
| * ForwardingHeaders/runtime/JSInternalPromise.h: Removed. |
| * ForwardingHeaders/runtime/JSInternalPromiseDeferred.h: Removed. |
| * ForwardingHeaders/runtime/JSLock.h: Removed. |
| * ForwardingHeaders/runtime/JSMap.h: Removed. |
| * ForwardingHeaders/runtime/JSMapIterator.h: Removed. |
| * ForwardingHeaders/runtime/JSModuleLoader.h: Removed. |
| * ForwardingHeaders/runtime/JSModuleRecord.h: Removed. |
| * ForwardingHeaders/runtime/JSNativeStdFunction.h: Removed. |
| * ForwardingHeaders/runtime/JSONObject.h: Removed. |
| * ForwardingHeaders/runtime/JSObject.h: Removed. |
| * ForwardingHeaders/runtime/JSObjectInlines.h: Removed. |
| * ForwardingHeaders/runtime/JSPromise.h: Removed. |
| * ForwardingHeaders/runtime/JSPromiseConstructor.h: Removed. |
| * ForwardingHeaders/runtime/JSPromiseDeferred.h: Removed. |
| * ForwardingHeaders/runtime/JSProxy.h: Removed. |
| * ForwardingHeaders/runtime/JSRunLoopTimer.h: Removed. |
| * ForwardingHeaders/runtime/JSScriptFetchParameters.h: Removed. |
| * ForwardingHeaders/runtime/JSScriptFetcher.h: Removed. |
| * ForwardingHeaders/runtime/JSSegmentedVariableObjectHeapCellType.h: Removed. |
| * ForwardingHeaders/runtime/JSSet.h: Removed. |
| * ForwardingHeaders/runtime/JSSetIterator.h: Removed. |
| * ForwardingHeaders/runtime/JSSourceCode.h: Removed. |
| * ForwardingHeaders/runtime/JSString.h: Removed. |
| * ForwardingHeaders/runtime/JSTypedArrays.h: Removed. |
| * ForwardingHeaders/runtime/JSWithScope.h: Removed. |
| * ForwardingHeaders/runtime/Lookup.h: Removed. |
| * ForwardingHeaders/runtime/MapBase.h: Removed. |
| * ForwardingHeaders/runtime/MapData.h: Removed. |
| * ForwardingHeaders/runtime/MapDataInlines.h: Removed. |
| * ForwardingHeaders/runtime/MatchResult.h: Removed. |
| * ForwardingHeaders/runtime/Microtask.h: Removed. |
| * ForwardingHeaders/runtime/ObjectConstructor.h: Removed. |
| * ForwardingHeaders/runtime/ObjectPrototype.h: Removed. |
| * ForwardingHeaders/runtime/Operations.h: Removed. |
| * ForwardingHeaders/runtime/PrivateName.h: Removed. |
| * ForwardingHeaders/runtime/PromiseDeferredTimer.h: Removed. |
| * ForwardingHeaders/runtime/PropertyNameArray.h: Removed. |
| * ForwardingHeaders/runtime/Protect.h: Removed. |
| * ForwardingHeaders/runtime/RegExp.h: Removed. |
| * ForwardingHeaders/runtime/RegExpObject.h: Removed. |
| * ForwardingHeaders/runtime/RuntimeFlags.h: Removed. |
| * ForwardingHeaders/runtime/SamplingProfiler.h: Removed. |
| * ForwardingHeaders/runtime/ScriptFetchParameters.h: Removed. |
| * ForwardingHeaders/runtime/ScriptFetcher.h: Removed. |
| * ForwardingHeaders/runtime/StringObject.h: Removed. |
| * ForwardingHeaders/runtime/StringPrototype.h: Removed. |
| * ForwardingHeaders/runtime/Structure.h: Removed. |
| * ForwardingHeaders/runtime/StructureChain.h: Removed. |
| * ForwardingHeaders/runtime/StructureInlines.h: Removed. |
| * ForwardingHeaders/runtime/Symbol.h: Removed. |
| * ForwardingHeaders/runtime/SymbolTable.h: Removed. |
| * ForwardingHeaders/runtime/ThrowScope.h: Removed. |
| * ForwardingHeaders/runtime/TypedArrayController.h: Removed. |
| * ForwardingHeaders/runtime/TypedArrayInlines.h: Removed. |
| * ForwardingHeaders/runtime/TypedArrays.h: Removed. |
| * ForwardingHeaders/runtime/Uint16Array.h: Removed. |
| * ForwardingHeaders/runtime/Uint32Array.h: Removed. |
| * ForwardingHeaders/runtime/Uint8Array.h: Removed. |
| * ForwardingHeaders/runtime/Uint8ClampedArray.h: Removed. |
| * ForwardingHeaders/runtime/VM.h: Removed. |
| * ForwardingHeaders/runtime/VMEntryScope.h: Removed. |
| * ForwardingHeaders/runtime/Watchdog.h: Removed. |
| * ForwardingHeaders/runtime/WeakGCMap.h: Removed. |
| * ForwardingHeaders/runtime/WeakGCMapInlines.h: Removed. |
| * ForwardingHeaders/runtime/WriteBarrier.h: Removed. |
| * ForwardingHeaders/wasm/WasmModule.h: Removed. |
| * ForwardingHeaders/wasm/js/JSWebAssemblyModule.h: Removed. |
| * ForwardingHeaders/yarr/RegularExpression.h: Removed. |
| * ForwardingHeaders/yarr/Yarr.h: Removed. |
| * ForwardingHeaders/yarr/YarrInterpreter.h: Removed. |
| * ForwardingHeaders/yarr/YarrJIT.h: Removed. |
| * ForwardingHeaders/yarr/YarrPattern.h: Removed. |
| * Modules/applepay/cocoa/PaymentMerchantSessionCocoa.mm: |
| * Modules/encryptedmedia/MediaKeyMessageEvent.h: |
| * Modules/encryptedmedia/MediaKeyMessageEventInit.h: |
| * Modules/encryptedmedia/MediaKeyStatusMap.h: |
| * Modules/encryptedmedia/legacy/LegacyCDM.h: |
| * Modules/encryptedmedia/legacy/LegacyCDMSessionClearKey.cpp: |
| * Modules/encryptedmedia/legacy/WebKitMediaKeyMessageEvent.cpp: |
| * Modules/encryptedmedia/legacy/WebKitMediaKeyNeededEvent.cpp: |
| * Modules/encryptedmedia/legacy/WebKitMediaKeySession.h: |
| * Modules/encryptedmedia/legacy/WebKitMediaKeys.h: |
| * Modules/fetch/FetchBody.cpp: |
| * Modules/fetch/FetchRequestInit.h: |
| * Modules/fetch/FetchResponse.h: |
| * Modules/indexeddb/IDBCursor.cpp: |
| * Modules/indexeddb/IDBCursor.h: |
| * Modules/indexeddb/IDBCursorWithValue.cpp: |
| * Modules/indexeddb/IDBDatabase.cpp: |
| * Modules/indexeddb/IDBIndex.cpp: |
| * Modules/indexeddb/IDBKey.cpp: |
| * Modules/indexeddb/IDBKeyRange.cpp: |
| * Modules/indexeddb/IDBObjectStore.cpp: |
| * Modules/indexeddb/IDBRequest.cpp: |
| * Modules/indexeddb/IDBRequest.h: |
| * Modules/indexeddb/client/TransactionOperation.cpp: |
| * Modules/indexeddb/server/MemoryObjectStore.cpp: |
| * Modules/indexeddb/server/SQLiteIDBBackingStore.cpp: |
| * Modules/indexeddb/server/UniqueIDBDatabase.cpp: |
| * Modules/mediacontrols/MediaControlsHost.cpp: |
| * Modules/mediasource/SourceBuffer.cpp: |
| * Modules/mediastream/RTCDataChannel.cpp: |
| * Modules/plugins/QuickTimePluginReplacement.mm: |
| * Modules/webaudio/AsyncAudioDecoder.cpp: |
| * Modules/webaudio/AudioBuffer.cpp: |
| * Modules/webaudio/AudioBuffer.h: |
| * Modules/webaudio/AudioContext.cpp: |
| * Modules/webaudio/AudioContext.h: |
| * Modules/webaudio/AudioParam.h: |
| * Modules/webaudio/AudioParamTimeline.h: |
| * Modules/webaudio/PeriodicWave.h: |
| * Modules/webaudio/RealtimeAnalyser.cpp: |
| * Modules/webaudio/RealtimeAnalyser.h: |
| * Modules/webaudio/ScriptProcessorNode.cpp: |
| * Modules/webaudio/WaveShaperProcessor.h: |
| * Modules/webauthn/AuthenticatorResponse.h: |
| * Modules/webauthn/PublicKeyCredential.h: |
| * Modules/websockets/WebSocket.cpp: |
| * Modules/websockets/WebSocketChannel.cpp: |
| * Modules/websockets/WorkerThreadableWebSocketChannel.cpp: |
| * Modules/webvr/VREyeParameters.h: |
| * Modules/webvr/VRFrameData.h: |
| * Modules/webvr/VRPose.h: |
| * Modules/webvr/VRStageParameters.h: |
| * PlatformWin.cmake: |
| * bindings/IDLTypes.h: |
| * bindings/js/BufferSource.h: |
| * bindings/js/CachedScriptFetcher.h: |
| * bindings/js/CachedScriptSourceProvider.h: |
| * bindings/js/CallTracerTypes.h: |
| * bindings/js/CommonVM.cpp: |
| * bindings/js/DOMGCOutputConstraint.cpp: |
| * bindings/js/DOMGCOutputConstraint.h: |
| * bindings/js/GCController.cpp: |
| * bindings/js/GCController.h: |
| * bindings/js/IDBBindingUtilities.cpp: |
| * bindings/js/JSCallbackData.cpp: |
| * bindings/js/JSCallbackData.h: |
| * bindings/js/JSCustomElementInterface.cpp: |
| * bindings/js/JSCustomElementInterface.h: |
| * bindings/js/JSCustomEventCustom.cpp: |
| * bindings/js/JSCustomXPathNSResolver.cpp: |
| * bindings/js/JSCustomXPathNSResolver.h: |
| * bindings/js/JSDOMBinding.h: |
| * bindings/js/JSDOMBuiltinConstructorBase.cpp: |
| * bindings/js/JSDOMConstructorBase.cpp: |
| * bindings/js/JSDOMConvertBase.h: |
| * bindings/js/JSDOMConvertBufferSource.h: |
| * bindings/js/JSDOMConvertDate.cpp: |
| * bindings/js/JSDOMConvertInterface.h: |
| * bindings/js/JSDOMConvertJSON.h: |
| * bindings/js/JSDOMConvertNumbers.cpp: |
| * bindings/js/JSDOMConvertNumbers.h: |
| * bindings/js/JSDOMConvertObject.h: |
| * bindings/js/JSDOMConvertRecord.h: |
| * bindings/js/JSDOMConvertSequences.h: |
| * bindings/js/JSDOMConvertStrings.cpp: |
| * bindings/js/JSDOMConvertUnion.h: |
| * bindings/js/JSDOMExceptionHandling.cpp: |
| * bindings/js/JSDOMExceptionHandling.h: |
| * bindings/js/JSDOMGlobalObject.cpp: |
| * bindings/js/JSDOMGlobalObject.h: |
| * bindings/js/JSDOMGlobalObjectTask.cpp: |
| * bindings/js/JSDOMGuardedObject.h: |
| * bindings/js/JSDOMIterator.cpp: |
| * bindings/js/JSDOMIterator.h: |
| * bindings/js/JSDOMMapLike.cpp: |
| * bindings/js/JSDOMMapLike.h: |
| * bindings/js/JSDOMPromise.cpp: |
| * bindings/js/JSDOMPromise.h: |
| * bindings/js/JSDOMPromiseDeferred.cpp: |
| * bindings/js/JSDOMPromiseDeferred.h: |
| * bindings/js/JSDOMWindowBase.cpp: |
| * bindings/js/JSDOMWindowCustom.cpp: |
| * bindings/js/JSDOMWindowProxy.cpp: |
| * bindings/js/JSDOMWindowProxy.h: |
| * bindings/js/JSDOMWrapper.cpp: |
| * bindings/js/JSDOMWrapper.h: |
| * bindings/js/JSDOMWrapperCache.cpp: |
| * bindings/js/JSDOMWrapperCache.h: |
| * bindings/js/JSDynamicDowncast.h: |
| * bindings/js/JSErrorHandler.cpp: |
| * bindings/js/JSEventCustom.cpp: |
| * bindings/js/JSEventListener.cpp: |
| * bindings/js/JSEventListener.h: |
| * bindings/js/JSHTMLElementCustom.cpp: |
| * bindings/js/JSHistoryCustom.cpp: |
| * bindings/js/JSIDBCursorWithValueCustom.cpp: |
| * bindings/js/JSIDBIndexCustom.cpp: |
| * bindings/js/JSImageDataCustom.cpp: |
| * bindings/js/JSLazyEventListener.cpp: |
| * bindings/js/JSLocationCustom.cpp: |
| * bindings/js/JSMainThreadExecState.h: |
| * bindings/js/JSMainThreadExecStateInstrumentation.h: |
| * bindings/js/JSMessageChannelCustom.cpp: |
| * bindings/js/JSMessageEventCustom.cpp: |
| * bindings/js/JSNodeIteratorCustom.cpp: |
| * bindings/js/JSPopStateEventCustom.cpp: |
| * bindings/js/JSReadableStreamPrivateConstructors.cpp: |
| * bindings/js/JSTreeWalkerCustom.cpp: |
| * bindings/js/JSWebGL2RenderingContextCustom.cpp: |
| * bindings/js/JSWorkerGlobalScopeBase.cpp: |
| * bindings/js/ReadableStreamDefaultController.cpp: |
| * bindings/js/ReadableStreamDefaultController.h: |
| * bindings/js/ScheduledAction.cpp: |
| * bindings/js/ScheduledAction.h: |
| * bindings/js/ScriptCachedFrameData.cpp: |
| * bindings/js/ScriptCachedFrameData.h: |
| * bindings/js/ScriptController.cpp: |
| * bindings/js/ScriptController.h: |
| * bindings/js/ScriptControllerMac.mm: |
| * bindings/js/ScriptModuleLoader.cpp: |
| * bindings/js/ScriptModuleLoader.h: |
| * bindings/js/ScriptSourceCode.h: |
| * bindings/js/ScriptState.cpp: |
| * bindings/js/ScriptWrappable.h: |
| * bindings/js/ScriptWrappableInlines.h: |
| * bindings/js/SerializedScriptValue.cpp: |
| * bindings/js/SerializedScriptValue.h: |
| * bindings/js/StructuredClone.cpp: |
| * bindings/js/WebCoreBuiltinNames.h: |
| * bindings/js/WebCoreJSClientData.cpp: |
| * bindings/js/WebCoreTypedArrayController.cpp: |
| * bindings/js/WebCoreTypedArrayController.h: |
| * bindings/js/WorkerScriptController.cpp: |
| * bindings/js/WorkerScriptController.h: |
| * bridge/NP_jsobject.cpp: |
| * bridge/c/CRuntimeObject.cpp: |
| * bridge/c/c_class.cpp: |
| * bridge/c/c_instance.cpp: |
| * bridge/c/c_runtime.cpp: |
| * bridge/c/c_utility.cpp: |
| * bridge/c/c_utility.h: |
| * bridge/jsc/BridgeJSC.cpp: |
| * bridge/jsc/BridgeJSC.h: |
| * bridge/npruntime.cpp: |
| * bridge/objc/ObjCRuntimeObject.mm: |
| * bridge/objc/WebScriptObject.mm: |
| * bridge/objc/WebScriptObjectPrivate.h: |
| * bridge/objc/objc_instance.mm: |
| * bridge/objc/objc_runtime.h: |
| * bridge/objc/objc_runtime.mm: |
| * bridge/objc/objc_utility.h: |
| * bridge/objc/objc_utility.mm: |
| * bridge/runtime_array.cpp: |
| * bridge/runtime_array.h: |
| * bridge/runtime_method.cpp: |
| * bridge/runtime_method.h: |
| * bridge/runtime_object.cpp: |
| * bridge/runtime_object.h: |
| * bridge/runtime_root.cpp: |
| * bridge/runtime_root.h: |
| * crypto/SubtleCrypto.cpp: |
| * crypto/SubtleCrypto.h: |
| * crypto/gcrypt/CryptoKeyRSAGCrypt.cpp: |
| * crypto/keys/CryptoRsaKeyAlgorithm.h: |
| * crypto/mac/CryptoKeyRSAMac.cpp: |
| * crypto/parameters/CryptoAlgorithmEcdsaParams.h: |
| * crypto/parameters/CryptoAlgorithmHkdfParams.h: |
| * crypto/parameters/CryptoAlgorithmHmacKeyParams.h: |
| * crypto/parameters/CryptoAlgorithmPbkdf2Params.h: |
| * crypto/parameters/CryptoAlgorithmRsaHashedImportParams.h: |
| * crypto/parameters/CryptoAlgorithmRsaHashedKeyGenParams.h: |
| * crypto/parameters/CryptoAlgorithmRsaKeyGenParams.h: |
| * css/CSSFontFaceSource.h: |
| * css/DOMMatrixReadOnly.cpp: |
| * css/DOMMatrixReadOnly.h: |
| * css/FontFace.cpp: |
| * dom/CustomElementReactionQueue.cpp: |
| * dom/CustomElementRegistry.cpp: |
| * dom/CustomEvent.cpp: |
| * dom/CustomEvent.h: |
| * dom/Document.cpp: |
| * dom/Document.h: |
| * dom/ErrorEvent.cpp: |
| * dom/ErrorEvent.h: |
| * dom/LoadableScript.h: |
| * dom/MessageEvent.cpp: |
| * dom/MessageEvent.h: |
| * dom/ModuleFetchParameters.h: |
| * dom/PopStateEvent.cpp: |
| * dom/PopStateEvent.h: |
| * dom/PromiseRejectionEvent.cpp: |
| * dom/PromiseRejectionEvent.h: |
| * dom/RejectedPromiseTracker.cpp: |
| * dom/RejectedPromiseTracker.h: |
| * dom/ScriptExecutionContext.cpp: |
| * dom/ScriptExecutionContext.h: |
| * dom/TextEncoder.cpp: |
| * dom/TextEncoder.h: |
| * domjit/DOMJITHelpers.h: |
| * domjit/DOMJITIDLTypeFilter.h: |
| * domjit/JSDocumentDOMJIT.cpp: |
| * domjit/JSNodeDOMJIT.cpp: |
| * fileapi/BlobBuilder.cpp: |
| * fileapi/FileReader.cpp: |
| * fileapi/FileReaderLoader.cpp: |
| * fileapi/FileReaderSync.cpp: |
| * html/BaseTextInputType.cpp: |
| * html/EmailInputType.cpp: |
| * html/HTMLAllCollection.cpp: |
| * html/HTMLCanvasElement.cpp: |
| * html/HTMLImageLoader.cpp: |
| * html/HTMLMediaElement.cpp: |
| * html/HTMLPlugInImageElement.cpp: |
| * html/ImageData.cpp: |
| * html/ImageData.h: |
| * html/MediaEncryptedEventInit.h: |
| * html/WebKitMediaKeyError.h: |
| * html/canvas/WebGLAny.h: |
| * html/canvas/WebGLRenderingContext.cpp: |
| * html/canvas/WebGLRenderingContextBase.cpp: |
| * html/canvas/WebGLRenderingContextBase.h: |
| * html/canvas/WebGPUBuffer.cpp: |
| * html/canvas/WebGPURenderingContext.cpp: |
| * html/canvas/WebGPURenderingContext.h: |
| * html/track/DataCue.cpp: |
| * html/track/DataCue.h: |
| * inspector/CommandLineAPIHost.cpp: |
| * inspector/CommandLineAPIHost.h: |
| * inspector/CommandLineAPIModule.cpp: |
| * inspector/CommandLineAPIModule.h: |
| * inspector/InspectorCanvas.cpp: |
| * inspector/InspectorCanvas.h: |
| * inspector/InspectorClient.cpp: |
| * inspector/InspectorController.cpp: |
| * inspector/InspectorController.h: |
| * inspector/InspectorDatabaseResource.h: |
| * inspector/InspectorFrontendClientLocal.cpp: |
| * inspector/InspectorFrontendHost.cpp: |
| * inspector/InspectorInstrumentation.cpp: |
| * inspector/InspectorInstrumentation.h: |
| * inspector/InspectorOverlay.cpp: |
| * inspector/InspectorOverlay.h: |
| * inspector/InspectorShaderProgram.cpp: |
| * inspector/InspectorShaderProgram.h: |
| * inspector/InspectorStyleSheet.cpp: |
| * inspector/InspectorStyleSheet.h: |
| * inspector/InspectorWebAgentBase.h: |
| * inspector/InstrumentingAgents.h: |
| * inspector/PageScriptDebugServer.cpp: |
| * inspector/PageScriptDebugServer.h: |
| * inspector/TimelineRecordFactory.cpp: |
| * inspector/WebInjectedScriptHost.h: |
| * inspector/WebInjectedScriptManager.h: |
| * inspector/WorkerInspectorController.cpp: |
| * inspector/WorkerInspectorController.h: |
| * inspector/WorkerScriptDebugServer.cpp: |
| * inspector/WorkerScriptDebugServer.h: |
| * inspector/WorkerToPageFrontendChannel.h: |
| * inspector/agents/InspectorApplicationCacheAgent.h: |
| * inspector/agents/InspectorCSSAgent.cpp: |
| * inspector/agents/InspectorCSSAgent.h: |
| * inspector/agents/InspectorCanvasAgent.cpp: |
| * inspector/agents/InspectorCanvasAgent.h: |
| * inspector/agents/InspectorDOMAgent.cpp: |
| * inspector/agents/InspectorDOMAgent.h: |
| * inspector/agents/InspectorDOMDebuggerAgent.cpp: |
| * inspector/agents/InspectorDOMDebuggerAgent.h: |
| * inspector/agents/InspectorDOMStorageAgent.cpp: |
| * inspector/agents/InspectorDOMStorageAgent.h: |
| * inspector/agents/InspectorDatabaseAgent.cpp: |
| * inspector/agents/InspectorDatabaseAgent.h: |
| * inspector/agents/InspectorIndexedDBAgent.cpp: |
| * inspector/agents/InspectorIndexedDBAgent.h: |
| * inspector/agents/InspectorLayerTreeAgent.cpp: |
| * inspector/agents/InspectorLayerTreeAgent.h: |
| * inspector/agents/InspectorMemoryAgent.cpp: |
| * inspector/agents/InspectorMemoryAgent.h: |
| * inspector/agents/InspectorNetworkAgent.cpp: |
| * inspector/agents/InspectorNetworkAgent.h: |
| * inspector/agents/InspectorPageAgent.cpp: |
| * inspector/agents/InspectorPageAgent.h: |
| * inspector/agents/InspectorTimelineAgent.cpp: |
| * inspector/agents/InspectorTimelineAgent.h: |
| * inspector/agents/InspectorWorkerAgent.h: |
| * inspector/agents/WebConsoleAgent.cpp: |
| * inspector/agents/WebConsoleAgent.h: |
| * inspector/agents/WebDebuggerAgent.h: |
| * inspector/agents/WebHeapAgent.h: |
| * inspector/agents/page/PageDebuggerAgent.cpp: |
| * inspector/agents/page/PageRuntimeAgent.cpp: |
| * inspector/agents/page/PageRuntimeAgent.h: |
| * inspector/agents/worker/ServiceWorkerAgent.h: |
| * inspector/agents/worker/WorkerDebuggerAgent.cpp: |
| * inspector/agents/worker/WorkerRuntimeAgent.cpp: |
| * inspector/agents/worker/WorkerRuntimeAgent.h: |
| * loader/EmptyClients.cpp: |
| * page/CaptionUserPreferences.cpp: |
| * page/Chrome.cpp: |
| * page/ChromeClient.h: |
| * page/Crypto.cpp: |
| * page/DOMWindow.cpp: |
| * page/DOMWindow.h: |
| * page/Frame.cpp: |
| * page/OriginThreadLocalCache.h: |
| * page/PageConsoleClient.cpp: |
| * page/PageConsoleClient.h: |
| * page/PageDebuggable.cpp: |
| * page/PageGroup.cpp: |
| * page/SettingsBase.h: |
| * page/UserContentController.cpp: |
| * page/cocoa/ResourceUsageThreadCocoa.mm: |
| * page/csp/ContentSecurityPolicy.cpp: |
| * page/ios/FrameIOS.mm: |
| * page/linux/ResourceUsageOverlayLinux.cpp: |
| * page/linux/ResourceUsageThreadLinux.cpp: |
| * platform/MediaSample.h: |
| * platform/SerializedPlatformRepresentation.h: |
| * platform/SharedBuffer.h: |
| * platform/audio/mac/CARingBuffer.h: |
| * platform/cocoa/SharedBufferCocoa.mm: |
| * platform/graphics/ImageBuffer.h: |
| * platform/graphics/LegacyCDMSession.h: |
| * platform/graphics/MediaPlayer.h: |
| * platform/graphics/avfoundation/CDMFairPlayStreaming.cpp: |
| * platform/graphics/avfoundation/CDMPrivateMediaSourceAVFObjC.mm: |
| * platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp: |
| * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp: |
| * platform/graphics/avfoundation/MediaSampleAVFObjC.h: |
| * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp: |
| * platform/graphics/avfoundation/objc/CDMSessionAVContentKeySession.mm: |
| * platform/graphics/avfoundation/objc/CDMSessionAVFoundationObjC.mm: |
| * platform/graphics/avfoundation/objc/CDMSessionAVStreamSession.mm: |
| * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm: |
| * platform/graphics/avfoundation/objc/MediaSampleAVFObjC.mm: |
| * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm: |
| * platform/graphics/cairo/ImageBufferCairo.cpp: |
| * platform/graphics/cg/ImageBufferDataCG.cpp: |
| * platform/graphics/cg/ImageBufferDataCG.h: |
| * platform/graphics/cocoa/GPUDeviceMetal.mm: |
| * platform/graphics/filters/FEBlend.cpp: |
| * platform/graphics/filters/FEColorMatrix.cpp: |
| * platform/graphics/filters/FEComponentTransfer.cpp: |
| * platform/graphics/filters/FEComposite.cpp: |
| * platform/graphics/filters/FEConvolveMatrix.cpp: |
| * platform/graphics/filters/FEDisplacementMap.cpp: |
| * platform/graphics/filters/FEDropShadow.cpp: |
| * platform/graphics/filters/FEGaussianBlur.cpp: |
| * platform/graphics/filters/FELighting.h: |
| * platform/graphics/filters/FEMorphology.cpp: |
| * platform/graphics/filters/FETurbulence.cpp: |
| * platform/graphics/filters/FilterEffect.cpp: |
| * platform/graphics/filters/FilterEffect.h: |
| * platform/graphics/gpu/GPUBuffer.h: |
| * platform/graphics/gpu/GPUDevice.h: |
| * platform/graphics/iso/ISOBox.cpp: |
| * platform/graphics/iso/ISOOriginalFormatBox.cpp: |
| * platform/graphics/iso/ISOProtectionSchemeInfoBox.cpp: |
| * platform/graphics/iso/ISOSchemeInformationBox.cpp: |
| * platform/graphics/iso/ISOSchemeTypeBox.cpp: |
| * platform/graphics/iso/ISOTrackEncryptionBox.cpp: |
| * platform/graphics/iso/ISOVTTCue.cpp: |
| * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp: |
| * platform/graphics/win/ImageBufferDataDirect2D.cpp: |
| * platform/graphics/win/ImageBufferDataDirect2D.h: |
| * platform/ios/wak/WebCoreThread.mm: |
| * platform/mac/SerializedPlatformRepresentationMac.mm: |
| * platform/mac/StringUtilities.mm: |
| * platform/mock/mediasource/MockBox.cpp: |
| * platform/mock/mediasource/MockSourceBufferPrivate.cpp: |
| * svg/graphics/SVGImage.cpp: |
| * testing/GCObservation.cpp: |
| * testing/GCObservation.h: |
| * testing/Internals.cpp: |
| * testing/Internals.h: |
| * testing/LegacyMockCDM.cpp: |
| * testing/MockCDMFactory.cpp: |
| * testing/js/WebCoreTestSupport.cpp: |
| * workers/Worker.cpp: |
| * workers/Worker.h: |
| * workers/WorkerConsoleClient.cpp: |
| * workers/WorkerConsoleClient.h: |
| * workers/WorkerGlobalScope.cpp: |
| * workers/WorkerGlobalScope.h: |
| * workers/WorkerGlobalScopeProxy.h: |
| * workers/WorkerInspectorProxy.cpp: |
| * workers/WorkerMessagingProxy.cpp: |
| * workers/WorkerThread.h: |
| * workers/service/ExtendableEvent.cpp: |
| * workers/service/ServiceWorker.cpp: |
| * workers/service/ServiceWorker.h: |
| * workers/service/ServiceWorkerClient.h: |
| * workers/service/context/ServiceWorkerInspectorProxy.cpp: |
| * workers/service/context/ServiceWorkerThread.cpp: |
| * xml/XMLHttpRequest.cpp: |
| |
| 2018-02-06 Said Abou-Hallawa <sabouhallawa@apple.com> |
| |
| Rendering SVG images with same size as WebGL texture doesn't work correctly |
| https://bugs.webkit.org/show_bug.cgi?id=182367 |
| |
| Reviewed by Dean Jackson. |
| |
| If am image buffer is created for a webgl texture and then it is reused |
| for another texture, it has to be cleared before drawing. |
| |
| Test: webgl/webgl-texture-image-buffer-reuse.html |
| |
| * html/canvas/WebGLRenderingContextBase.cpp: |
| (WebCore::WebGLRenderingContextBase::LRUImageBufferCache::imageBuffer): |
| |
| 2018-02-06 Youenn Fablet <youenn@apple.com> |
| |
| Use downcast in createLinkPreloadResourceClient |
| https://bugs.webkit.org/show_bug.cgi?id=182488 |
| |
| Reviewed by Antti Koivisto. |
| |
| No observable change of behavior. |
| Add a new link preloader client for text track. |
| |
| * loader/LinkLoader.cpp: |
| (WebCore::createLinkPreloadResourceClient): |
| * loader/LinkPreloadResourceClients.h: |
| |
| 2018-02-06 Youenn Fablet <youenn@apple.com> |
| |
| imported/w3c/web-platform-tests/service-workers/service-worker/fetch-event-respond-with-response-body-with-invalid-chunk.https.html is flaky |
| https://bugs.webkit.org/show_bug.cgi?id=182541 |
| |
| Reviewed by Chris Dumez. |
| |
| Covered by test being no longer flaky. |
| In case of loading error when getting the response body, we were only reporting |
| the error if there was a callback set or a ReadableStream already created. |
| Otherwise, we were just stopping loading and if creating a ReadableStream, we were just returning an empty body. |
| |
| FetchBodyOwner now stores a loading error. |
| In case a readable stream is created, it will error it if there is a loading error. |
| If there is not and the loading failed later on, the stream will be errored using the current code path. |
| |
| * Modules/cache/DOMCache.cpp: |
| (WebCore::DOMCache::put): |
| * Modules/fetch/FetchResponse.cpp: |
| (WebCore::FetchResponse::clone): |
| (WebCore::FetchResponse::BodyLoader::didFail): |
| * Modules/fetch/FetchResponse.h: |
| * workers/service/context/ServiceWorkerFetch.cpp: |
| (WebCore::ServiceWorkerFetch::processResponse): |
| |
| 2018-02-06 Andy Estes <aestes@apple.com> |
| |
| [Payment Request] show() should take an optional PaymentDetailsUpdate promise |
| https://bugs.webkit.org/show_bug.cgi?id=182538 |
| <rdar://problem/36754552> |
| |
| Reviewed by Tim Horton. |
| |
| Taught show() to take an optional promise for a PaymentDetailsUpdate. |
| |
| Added test cases to http/tests/paymentrequest/payment-request-show-method.https.html. |
| |
| * Modules/applepay/paymentrequest/ApplePayPaymentHandler.cpp: |
| (WebCore::ApplePayPaymentHandler::detailsUpdated): |
| |
| Changed to take a PaymentRequest::UpdateReason instead of a eventType string. |
| |
| (WebCore::ApplePayPaymentHandler::shippingAddressUpdated): |
| (WebCore::ApplePayPaymentHandler::shippingOptionUpdated): |
| (WebCore::ApplePayPaymentHandler::paymentMethodUpdated): |
| (WebCore::ApplePayPaymentHandler::didAuthorizePayment): |
| (WebCore::ApplePayPaymentHandler::didSelectShippingMethod): |
| (WebCore::ApplePayPaymentHandler::didSelectShippingContact): |
| (WebCore::ApplePayPaymentHandler::didSelectPaymentMethod): |
| |
| Asserted that only one of the PaymentSession delegates is executing at a time. |
| |
| * Modules/applepay/paymentrequest/ApplePayPaymentHandler.h: |
| * Modules/paymentrequest/PaymentHandler.h: |
| |
| Changed detailsUpdated to take a PaymentRequest::UpdateReason instead of a eventType string. |
| |
| * Modules/paymentrequest/PaymentRequest.cpp: |
| (WebCore::PaymentRequest::show): |
| |
| If there is a details promise, call updateWith() with UpdateReason::ShowDetailsResolved. |
| |
| (WebCore::PaymentRequest::shippingAddressChanged): |
| (WebCore::PaymentRequest::shippingOptionChanged): |
| (WebCore::PaymentRequest::paymentMethodChanged): |
| |
| Used whenDetailsSettled() to ensure that update events do not start before the show() |
| details promise settles. |
| |
| (WebCore::PaymentRequest::updateWith): |
| (WebCore::PaymentRequest::settleDetailsPromise): |
| |
| Changed to use a PaymentRequest::UpdateReason instead of a eventType string. |
| |
| (WebCore::PaymentRequest::whenDetailsSettled): |
| |
| If there is a details promise, wait for it to settle before executing the callback. |
| |
| * Modules/paymentrequest/PaymentRequest.h: |
| |
| Defined enum class UpdateReason. |
| |
| * Modules/paymentrequest/PaymentRequest.idl: |
| |
| Updated show() to take an optional Promise<PaymentDetailsUpdate>. |
| |
| * Modules/paymentrequest/PaymentRequestUpdateEvent.cpp: |
| (WebCore::PaymentRequestUpdateEvent::updateWith): |
| |
| Map the event type to a PaymentRequest::UpdateReason. |
| |
| 2018-02-06 Dean Jackson <dino@apple.com> |
| |
| REGRESSION: WebGL no longer producing a transparent canvas on iOS |
| https://bugs.webkit.org/show_bug.cgi?id=182550 |
| <rdar://problem/37234491> |
| |
| Reviewed by Eric Carlson. |
| |
| Due to some weirdness GL_RGBA8 is sometimes different between iOS and |
| other platforms. Only tell the WebGLLayer that it is opaque when it really |
| is not transparent. |
| |
| Covered by existing test: fast/canvas/webgl/context-attributes-alpha |
| |
| * platform/graphics/cocoa/GraphicsContext3DCocoa.mm: |
| (WebCore::GraphicsContext3D::setRenderbufferStorageFromDrawable): Look at the context |
| attributes to decide if we should use an opaque layer. |
| * platform/graphics/cocoa/WebGLLayer.mm: Ditto. |
| (-[WebGLLayer initWithGraphicsContext3D:]): |
| |
| 2018-02-06 Andy Estes <aestes@apple.com> |
| |
| [WebIDL] Support optional Promise arguments |
| https://bugs.webkit.org/show_bug.cgi?id=182399 |
| <rdar://problem/36754552> |
| |
| Reviewed by Sam Weinig and Chris Dumez. |
| |
| Previously, declaring a Promise argument as optional would result in a native type of |
| std::optional<RefPtr<DOMPromise>>. This is wasteful, since RefPtr can represent an optional |
| argument by storing nullptr. Further, PassArgumentExpression() assumed Promises were never |
| optional and tried to pass the argument as a Ref by calling RefPtr::releaseNonNull(). |
| |
| This patch removes the std::optional wrapper around optional Promises and simply passes the |
| promise as a RefPtr to native code. |
| |
| * bindings/scripts/CodeGeneratorJS.pm: |
| (PassArgumentExpression): |
| (GenerateParametersCheck): |
| * bindings/scripts/test/JS/JSTestObj.cpp: |
| (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalPromiseBody): |
| (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalPromise): |
| * bindings/scripts/test/TestObj.idl: |
| |
| 2018-02-06 Youenn Fablet <youenn@apple.com> |
| |
| HasServiceWorkerRegistration bit should be sent when creating a new page |
| https://bugs.webkit.org/show_bug.cgi?id=182410 |
| |
| Reviewed by Chris Dumez. |
| |
| Covered by new API test. |
| |
| Changed the default value of service workers being registered to false. |
| Every page created in the process will be responsible to change the value to true, |
| at which time the value will be kept to true for the lifetime of the process. |
| |
| * workers/service/ServiceWorkerProvider.h: |
| |
| 2018-02-06 Ross Kirsling <ross.kirsling@sony.com> |
| |
| Add missing #if ENABLE(VIDEO) after r228092. |
| https://bugs.webkit.org/show_bug.cgi?id=182539 |
| |
| Reviewed by Michael Catanzaro. |
| |
| * html/ImageBitmap.cpp: |
| |
| 2018-02-06 Antoine Quint <graouts@apple.com> |
| |
| [Modern Media Controls] Test at media/modern-media-controls/tracks-panel/tracks-panel-controls-bar-remains-visible-after-clicking-over-it.html fails |
| https://bugs.webkit.org/show_bug.cgi?id=182425 |
| |
| Reviewed by Dean Jackson. |
| |
| This test failed because the controls bar would not hit test at the moment we synthesized a mousemove over the controls bar as the first step towards |
| synthesizing a click on the controls bar to dismiss the tracks panel. Indeed, it would have "pointer-events" set to "none" until the tracks panel was |
| dismissed, which would only happen after the click event had been propagated. All we need to do is to ensure that none of the controls within the controls |
| bar get activated as a result of clicking over them when the tracks panel is visible, so we instead set "pointer-events" to "none" on all children of a |
| controls bar rather than the controls bar itself, which can thus still hit test. |
| |
| * Modules/modern-media-controls/controls/media-controls.css: |
| (.media-controls.shows-tracks-panel > .controls-bar > *,): |
| (.media-controls.shows-tracks-panel > .controls-bar,): Deleted. |
| |
| 2018-02-06 Chris Dumez <cdumez@apple.com> |
| |
| Service workers registrations are saved to disk before the install / activation succeeds |
| https://bugs.webkit.org/show_bug.cgi?id=182535 |
| <rdar://problem/36591485> |
| |
| Reviewed by Youenn Fablet. |
| |
| Service workers registrations are saved to disk before the install / activation succeeds. |
| This means if the browser exits before the install / activation succeeds, we may restore |
| from disk a registration with an “active” worker which may have never been installed / |
| activated. |
| |
| To address the issue, we now delay saving the registration to disk until after the service |
| worker has been activated. |
| |
| No new tests, restoration from disk is covered by API tests that still pass. |
| |
| * workers/service/server/SWServer.cpp: |
| (WebCore::SWServer::didFinishActivation): |
| (WebCore::SWServer::installContextData): |
| |
| 2018-02-06 Ms2ger <Ms2ger@igalia.com> |
| |
| Initialize ImageBitmap::m_bitmapData in the constructor. |
| https://bugs.webkit.org/show_bug.cgi?id=182487 |
| |
| Reviewed by Sam Weinig. |
| |
| This removes the span of time where an ImageBitmap object would exist |
| with a null m_bitmapData during its construction. |
| |
| No new tests: no behavior changes. |
| |
| * html/ImageBitmap.cpp: |
| (WebCore::ImageBitmap::create): update signature |
| (WebCore::ImageBitmap::createPromise): update callers |
| (WebCore::ImageBitmap::ImageBitmap): update signature |
| * html/ImageBitmap.h: update signatures |
| |
| 2018-02-05 Ryosuke Niwa <rniwa@webkit.org> |
| |
| Release assertion in inlineVideoFrame |
| https://bugs.webkit.org/show_bug.cgi?id=182513 |
| <rdar://problem/37159363> |
| |
| Reviewed by Zalan Bujtas. |
| |
| The bug was caused by the fact it's not always safe to invoke updateLayout even when isSafeToUpdateStyleOrLayout |
| on a document of a flattened frame on iOS. isSafeToUpdateStyleOrLayout returns true when the frame view is in |
| the frame-flattening mode to avoid hitting a release asssertion in updateLayout of the frame. However, it's still |
| not safe to invoke updateLayout on a parent frame in this case. |
| |
| As a result, inlineVideoFrame (in Source/WebKit/WebProcess/cocoa/VideoFullscreenManager.mm) invokes updateLayout |
| even when the top-level document is not safe to update when the video element is in a frame-flattened document. |
| |
| Fixed this bug by explicitly checking that we still have a live render tree and document hasn't been stopped. |
| Also replaced other uses of isSafeToUpdateStyleOrLayout by more explicit checks. |
| |
| * accessibility/AccessibilityObject.cpp: |
| (WebCore::AccessibilityObject::updateBackingStore): Made the early exit condition added in r227006 more explicit. |
| Namely, InspectorDOMAgent::pseudoElementCreated is invoked during style recalc. |
| * dom/Document.cpp: |
| (WebCore::isSafeToUpdateStyleOrLayout): Made this local to the file. |
| (WebCore::Document::updateStyleIfNeeded): |
| (WebCore::Document::updateLayout): |
| * dom/Document.h: |
| * html/MediaElementSession.cpp: |
| (WebCore::isMainContentForPurposesOfAutoplay): Made the early exit condition added in r227529 more explicit. Don't |
| update the layout when the render tree had been destroyed or the active DOM objects had been stopped. |
| |
| 2018-02-05 Youenn Fablet <youenn@apple.com> |
| |
| Crash in imported/w3c/web-platform-tests/2dcontext/imagebitmap/createImageBitmap-origin.sub.html |
| https://bugs.webkit.org/show_bug.cgi?id=182422 |
| <rdar://problem/37182665> |
| |
| Reviewed by Alex Christensen. |
| |
| Covered by test no longer crashing in Debug mode. |
| Make sure completionHandler is called on the main thread. |
| |
| * platform/network/cocoa/WebCoreNSURLSession.mm: |
| (-[WebCoreNSURLSessionDataTask resource:receivedRedirect:request:completionHandler:]): |
| |
| 2018-02-05 Filip Pizlo <fpizlo@apple.com> |
| |
| Global objects should be able to use TLCs to allocate from different blocks from each other |
| https://bugs.webkit.org/show_bug.cgi?id=182227 |
| |
| Reviewed by Daniel Bates and Chris Dumez. |
| |
| No new tests because no change in behavior. |
| |
| Adopt JSC TLC API to put distance between objects from different security origins. WebCore has |
| a subclass of ThreadLocalCache that supports hash-consing based on the relevant origin data |
| using the existing SecurityOriginHash. It's Document's job to initiate this, but all of the |
| logic is in WebCore::OriginThreadLocalCache. |
| |
| Workers don't opt into this. They just get the VM's default TLC all the time. |
| |
| * ForwardingHeaders/heap/ThreadLocalCache.h: Added. |
| * Sources.txt: |
| * WebCore.xcodeproj/project.pbxproj: |
| * bindings/js/JSDOMGlobalObject.cpp: |
| (WebCore::JSDOMGlobalObject::JSDOMGlobalObject): |
| * bindings/js/JSDOMGlobalObject.h: |
| * bindings/js/JSDOMWindowBase.cpp: |
| (WebCore::JSDOMWindowBase::JSDOMWindowBase): |
| * dom/Document.cpp: |
| (WebCore::Document::initSecurityContext): |
| (WebCore::Document::threadLocalCache): |
| * dom/Document.h: |
| * page/OriginThreadLocalCache.cpp: Added. |
| (WebCore::threadLocalCacheMap): |
| (WebCore::OriginThreadLocalCache::create): |
| (WebCore::OriginThreadLocalCache::~OriginThreadLocalCache): |
| (WebCore::OriginThreadLocalCache::OriginThreadLocalCache): |
| * page/OriginThreadLocalCache.h: Added. |
| * page/SecurityOrigin.cpp: |
| (WebCore::SecurityOrigin::passesFileCheck const): |
| (WebCore::SecurityOrigin::setEnforcesFilePathSeparation): |
| (WebCore::SecurityOrigin::toString const): |
| (WebCore::SecurityOrigin::enforceFilePathSeparation): Deleted. |
| * page/SecurityOrigin.h: |
| (WebCore::SecurityOrigin::enforcesFilePathSeparation const): |
| |
| 2018-02-05 Per Arne Vollan <pvollan@apple.com> |
| |
| [Win] Release assert failed under NetworkStateNotifier::singleton. |
| https://bugs.webkit.org/show_bug.cgi?id=182516 |
| |
| Reviewed by Brent Fulgham. |
| |
| The callback NetworkStateNotifier::addressChangeCallback will always be called on a |
| worker thread on Windows. Since the method NetworkStateNotifier::singleton() is |
| called by NetworkStateNotifier::addressChangeCallback, but has to be called on the |
| on the main thread, the call has to be moved there. |
| |
| No new tests. I have not been able to reproduce the crash. |
| |
| * platform/network/win/NetworkStateNotifierWin.cpp: |
| (WebCore::NetworkStateNotifier::addressChangeCallback): |
| |
| 2018-02-05 Don Olmstead <don.olmstead@sony.com> |
| |
| Abstract heap generator should include JavaScriptCore headers directly |
| https://bugs.webkit.org/show_bug.cgi?id=182501 |
| |
| Reviewed by Alex Christensen. |
| |
| No new tests. No change in behavior. |
| |
| * domjit/generate-abstract-heap.rb: |
| |
| 2018-02-05 Wenson Hsieh <wenson_hsieh@apple.com> |
| |
| [Extra zoom mode] Implement number pad UI when editing `tel` and `number` inputs |
| https://bugs.webkit.org/show_bug.cgi?id=182472 |
| <rdar://problem/35143057> |
| |
| Reviewed by Tim Horton. |
| |
| Adds a localized string for the "Done" button text in extra zoomed form controls. |
| |
| * English.lproj/Localizable.strings: |
| * platform/LocalizedStrings.cpp: |
| (WebCore::formControlDoneButtonTitle): |
| * platform/LocalizedStrings.h: |
| |
| 2018-02-05 John Wilander <wilander@apple.com> |
| |
| Build fix for r228115, simple naming issue succeeded —> success. |
| https://bugs.webkit.org/show_bug.cgi?id=182507 |
| <rdar://problem/37248566> |
| |
| Reviewed by Eric Carlson. |
| |
| No new tests. Build fix. |
| |
| * platform/ios/VideoFullscreenInterfaceAVKit.mm: |
| (VideoFullscreenInterfaceAVKit::enterFullscreenHandler): |
| succeeded —> success |
| |
| 2018-02-05 Matt Lewis <jlewis3@apple.com> |
| |
| Unreviewed, rolling out r228086. |
| |
| This introduced a failure with API test |
| URLTest.HostIsIPAddress. |
| |
| Reverted changeset: |
| |
| "Add a way to check if a host is an IP address" |
| https://bugs.webkit.org/show_bug.cgi?id=182427 |
| https://trac.webkit.org/changeset/228086 |
| |
| 2018-02-05 Matt Lewis <jlewis3@apple.com> |
| |
| Unreviewed, rolling out r228103. |
| |
| This caused multiple tests to crash. |
| |
| Reverted changeset: |
| |
| "Use downcast in createLinkPreloadResourceClient" |
| https://bugs.webkit.org/show_bug.cgi?id=182488 |
| https://trac.webkit.org/changeset/228103 |
| |
| 2018-02-05 Eric Carlson <eric.carlson@apple.com> |
| |
| [iOS] VideoFullscreenInterfaceAVKit should not ignore errors |
| https://bugs.webkit.org/show_bug.cgi?id=182497 |
| <rdar://problem/36986898> |
| |
| Reviewed by Jer Noble. |
| |
| Always call layoutIfNeeded before calling -[AVPlayerViewController enterFullScreenAnimated:completionHandler] |
| or -[AVPlayerViewController exitFullScreenAnimated:completionHandler] because they both fail |
| if the view needs layout. Also don't ignore errors returned by those calls. |
| |
| No new tests, the failure is non deterministic and I was not able to reproduce in a test. |
| |
| * platform/ios/VideoFullscreenInterfaceAVKit.mm: |
| (VideoFullscreenInterfaceAVKit::applicationDidBecomeActive): |
| (VideoFullscreenInterfaceAVKit::enterFullscreenStandard): |
| (VideoFullscreenInterfaceAVKit::exitFullscreen): |
| (VideoFullscreenInterfaceAVKit::cleanupFullscreen): |
| (VideoFullscreenInterfaceAVKit::didStartPictureInPicture): |
| (VideoFullscreenInterfaceAVKit::prepareForPictureInPictureStopWithCompletionHandler): |
| (VideoFullscreenInterfaceAVKit::doEnterFullscreen): |
| (VideoFullscreenInterfaceAVKit::exitFullscreenHandler): |
| (VideoFullscreenInterfaceAVKit::enterFullscreenHandler): |
| |
| 2018-02-05 Daniel Bates <dabates@apple.com> |
| |
| REGRESSION (r222795): Nike app "Refused to set unsafe header" when adding and viewing cart |
| https://bugs.webkit.org/show_bug.cgi?id=182491 |
| <rdar://problem/36533447> |
| |
| Reviewed by Brent Fulgham. |
| |
| Exempt Nike from the XHR header restrictions in r222795. |
| |
| Following r222795 only Dashboard widgets are allowed to set arbitrary XHR headers. |
| However Nike also depends on such functionality. |
| |
| * platform/RuntimeApplicationChecks.h: |
| * platform/cocoa/RuntimeApplicationChecksCocoa.mm: |
| (WebCore::IOSApplication::isNike): |
| |
| 2018-02-02 Brent Fulgham <bfulgham@apple.com> |
| |
| Improve NetworkResourceLoader logging so it can be used for 'setCookiesFromDOM' |
| https://bugs.webkit.org/show_bug.cgi?id=182455 |
| <rdar://problem/36626601> |
| |
| Reviewed by Chris Dumez. |
| |
| After this refactoring, a convenience method I added in r227860 is no longer needed. |
| This patch removes this dead code. |
| |
| * platform/network/NetworkStorageSession.h: Export 'cookieStoragePartition' so it can |
| be used in WebKit. |
| * platform/network/cf/NetworkStorageSessionCFNet.cpp: |
| (WebCore::NetworkStorageSession::hasStorageAccessForFrame): Deleted unused method. |
| |
| 2018-02-05 Antti Koivisto <antti@apple.com> |
| |
| Make ASSERT_WITH_SECURITY_IMPLICATION in CachedResourceClientWalker::next a release assert |
| https://bugs.webkit.org/show_bug.cgi?id=182492 |
| |
| Reviewed by Youenn Fablet. |
| |
| * loader/cache/CachedResourceClientWalker.h: |
| (WebCore::CachedResourceClientWalker::next): |
| |
| 2018-02-05 John Wilander <wilander@apple.com> |
| |
| Storage Access API: Add testRunner.getAllStorageAccessEntries() to make testing easier and more explicit |
| https://bugs.webkit.org/show_bug.cgi?id=181601 |
| <rdar://problem/36475837> |
| |
| Reviewed by Alex Christensen. |
| |
| No new tests. Existing test updated. |
| |
| http/tests/storageAccess/request-and-grant-access-then-detach-should-not-have-access.html |
| was found to be flaky. With the testRunner.hasStorageAccessEntry() getter |
| it's possible to check access even if a frame doesn't respond timely to |
| postMessage after detach and attach. |
| |
| * platform/network/NetworkStorageSession.h: |
| * platform/network/cf/NetworkStorageSessionCFNet.cpp: |
| (WebCore::NetworkStorageSession::getAllStorageAccessEntries const): |
| |
| 2018-02-05 Youenn Fablet <youenn@apple.com> |
| |
| Use downcast in createLinkPreloadResourceClient |
| https://bugs.webkit.org/show_bug.cgi?id=182488 |
| |
| Reviewed by Antti Koivisto. |
| |
| No observable change of behavior. |
| |
| * loader/LinkLoader.cpp: |
| (WebCore::createLinkPreloadResourceClient): |
| |
| 2018-02-05 Chris Dumez <cdumez@apple.com> |
| |
| Layout Test imported/w3c/web-platform-tests/service-workers/service-worker/register-same-scope-different-script-url.https.html is flaky |
| https://bugs.webkit.org/show_bug.cgi?id=181166 |
| <rdar://problem/37169508> |
| |
| Reviewed by Youenn Fablet. |
| |
| I found out that this test was flakily timing out because our jobQueues would sometimes get stuck |
| when their current job's connection or service worker (when scheduled by a service worker) would |
| go away before the job is complete. |
| |
| This patch makes our job queues operation more robust by: |
| 1. Cancelling all jobs from a given connection when a SWServerConnection goes away |
| 2. Cancelling all jobs from a given service worker when a service worker gets terminated |
| |
| We also make sure service workers created by a job get properly terminated when a job |
| is canceled to avoid leaving service workers in limbo. |
| |
| No new tests, unskipped existing flaky test. |
| |
| * workers/service/ServiceWorkerContainer.cpp: |
| (WebCore::ServiceWorkerContainer::addRegistration): |
| (WebCore::ServiceWorkerContainer::removeRegistration): |
| (WebCore::ServiceWorkerContainer::updateRegistration): |
| * workers/service/ServiceWorkerJobData.cpp: |
| (WebCore::ServiceWorkerJobData::ServiceWorkerJobData): |
| (WebCore::ServiceWorkerJobData::isolatedCopy const): |
| * workers/service/ServiceWorkerJobData.h: |
| (WebCore::ServiceWorkerJobData::encode const): |
| (WebCore::ServiceWorkerJobData::decode): |
| * workers/service/server/SWServer.cpp: |
| (WebCore::SWServer::startScriptFetch): |
| (WebCore::SWServer::scriptContextFailedToStart): |
| (WebCore::SWServer::scriptContextStarted): |
| (WebCore::SWServer::terminatePreinstallationWorker): |
| (WebCore::SWServer::installContextData): |
| (WebCore::SWServer::workerContextTerminated): |
| (WebCore::SWServer::unregisterConnection): |
| * workers/service/server/SWServer.h: |
| * workers/service/server/SWServerJobQueue.cpp: |
| (WebCore::SWServerJobQueue::removeAllJobsMatching): |
| (WebCore::SWServerJobQueue::cancelJobsFromConnection): |
| (WebCore::SWServerJobQueue::cancelJobsFromServiceWorker): |
| * workers/service/server/SWServerJobQueue.h: |
| * workers/service/server/SWServerRegistration.cpp: |
| (WebCore::SWServerRegistration::setPreInstallationWorker): |
| |
| 2018-02-05 Antti Koivisto <antti@apple.com> |
| |
| Crash on sfgate.com because mismatching link preload types |
| https://bugs.webkit.org/show_bug.cgi?id=182483 |
| <rdar://problem/37065331> |
| |
| Reviewed by Daniel Bates. |
| |
| Preloading the same URL with different 'as' types causes some confusion. |
| |
| Test: http/tests/preload/link-preload-type-mismatch.html |
| |
| * loader/LinkLoader.cpp: |
| (WebCore::createLinkPreloadResourceClient): |
| |
| Ensure we use the actual resource type when creating the client. |
| |
| (WebCore::LinkLoader::preloadIfNeeded): |
| |
| Don't construct client if the types don't match. This can happen if there is an existing |
| preload for the same resource with different type. |
| |
| 2018-02-05 Manuel Rego Casasnovas <rego@igalia.com> |
| |
| [css-grid] Rename gutter properties to remove "grid-" prefix |
| https://bugs.webkit.org/show_bug.cgi?id=180290 |
| |
| Reviewed by Javier Fernandez. |
| |
| This patch applies the resoultion of the CSS WG to unprefix |
| the CSS Grid Layout gutter properties: |
| https://github.com/w3c/csswg-drafts/issues/1696 |
| |
| column-gap already existed before, as it's part of Multicol. |
| The patch adds the new properties row-gap and gap, and keep the legacy ones |
| as aliases: |
| - grid-column-gap => column-gap |
| - grid-row-gap => row-gap |
| - grid-gap => gap |
| |
| As column-gap was already animatable, this change takes advantage |
| to make animatable row-gap too. |
| |
| Tests: imported/w3c/web-platform-tests/css/css-align/gaps/ |
| |
| * css/CSSComputedStyleDeclaration.cpp: |
| (WebCore::ComputedStyleExtractor::valueForPropertyinStyle): |
| * css/CSSProperties.json: |
| * css/StyleProperties.cpp: |
| * css/parser/CSSParserFastPaths.cpp: |
| (WebCore::isSimpleLengthPropertyID): |
| * css/parser/CSSPropertyParser.cpp: |
| (WebCore::CSSPropertyParser::parseSingleValue): |
| (WebCore::CSSPropertyParser::parseShorthand): |
| * page/animation/CSSPropertyAnimation.cpp: |
| (WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap): |
| * rendering/RenderGrid.cpp: |
| (WebCore::RenderGrid::availableSpaceForGutters const): |
| (WebCore::RenderGrid::gridGap const): |
| * rendering/style/RenderStyle.h: |
| (WebCore::RenderStyle::gridAutoRows const): |
| (WebCore::RenderStyle::columnGap const): |
| (WebCore::RenderStyle::rowGap const): |
| (WebCore::RenderStyle::setGridItemRowEnd): |
| (WebCore::RenderStyle::setColumnGap): |
| (WebCore::RenderStyle::setRowGap): |
| (WebCore::RenderStyle::initialRowGap): |
| * rendering/style/StyleGridData.cpp: |
| (WebCore::StyleGridData::StyleGridData): |
| * rendering/style/StyleGridData.h: |
| (WebCore::StyleGridData::operator== const): |
| * rendering/style/StyleMultiColData.cpp: |
| (WebCore::StyleMultiColData::StyleMultiColData): |
| (WebCore::StyleMultiColData::operator== const): |
| * rendering/style/StyleMultiColData.h: |
| * rendering/style/StyleRareNonInheritedData.cpp: |
| (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData): |
| (WebCore::StyleRareNonInheritedData::operator== const): |
| * rendering/style/StyleRareNonInheritedData.h: |
| |
| 2018-02-05 Ms2ger <Ms2ger@igalia.com> |
| |
| Implement createImageBitmap(HTMLVideoElement) |
| https://bugs.webkit.org/show_bug.cgi?id=182388 |
| |
| Reviewed by Žan Doberšek. |
| |
| The implementation is inspired by CanvasRenderingContext2DBase::drawImage(). |
| |
| Tests: |
| |
| - web-platform-tests/2dcontext/imagebitmap/createImageBitmap-drawImage.html |
| - web-platform-tests/2dcontext/imagebitmap/createImageBitmap-invalid-args.html |
| |
| |
| * html/ImageBitmap.cpp: |
| (WebCore::taintsOrigin): Add function to help with the implementation. |
| (WebCore::ImageBitmap::createPromise): Fill in implementation. |
| |
| 2018-02-05 Zan Dobersek <zdobersek@igalia.com> |
| |
| Unreviewed, rolling out r228085. |
| |
| Pixel data stride is imposed by OpenGL and shouldn't be |
| adjusted for Cairo |
| |
| Reverted changeset: |
| |
| "[Cairo] Correctly calculate stride in |
| GraphicsContext3D::paintToCanvas()" |
| https://bugs.webkit.org/show_bug.cgi?id=182466 |
| https://trac.webkit.org/changeset/228085 |
| |
| 2018-02-05 Carlos Garcia Campos <cgarcia@igalia.com> |
| |
| [SOUP] WebSockets must use system proxy settings |
| https://bugs.webkit.org/show_bug.cgi?id=126384 |
| |
| Reviewed by Michael Catanzaro. |
| |
| Use soup_session_connect_async() when available to create the WebSockets connection instead of GSocketClient |
| directly. |
| |
| * platform/network/soup/SocketStreamHandleImpl.h: |
| * platform/network/soup/SocketStreamHandleImplSoup.cpp: |
| (WebCore::wssSocketClientEventCallback): |
| (WebCore::SocketStreamHandleImpl::create): |
| (WebCore::SocketStreamHandleImpl::connected): |
| (WebCore::SocketStreamHandleImpl::connectedCallback): |
| (WebCore::SocketStreamHandleImpl::platformClose): |
| |
| 2018-02-05 Carlos Garcia Campos <cgarcia@igalia.com> |
| |
| Add a way to check if a host is an IP address |
| https://bugs.webkit.org/show_bug.cgi?id=182427 |
| |
| Reviewed by Alex Christensen. |
| |
| There are several places where this is needed. We currently just assume that any host ending in a digit is an IP |
| address, except in PublicSuffix where platform specific code is used. This patch adds URL::hostIsIPAddress() |
| platform specific implementations, falling back to current assumption if there isn't an implementation for the |
| platform. |
| |
| * page/OriginAccessEntry.cpp: |
| (WebCore::OriginAccessEntry::OriginAccessEntry): Use URL::hostIsIPAddress(). |
| * platform/URL.cpp: |
| (WebCore::URL::hostIsIPAddress): Fallback implementation. |
| * platform/URL.h: |
| * platform/mac/PublicSuffixMac.mm: |
| (WebCore::topPrivatelyControlledDomain): Use URL::hostIsIPAddress(). |
| * platform/mac/URLMac.mm: |
| (WebCore::URL::hostIsIPAddress): Move implementation from PublicSuffixMac.mm. |
| * platform/network/curl/CookieUtil.cpp: |
| (WebCore::CookieUtil::isIPAddress): Use URL::hostIsIPAddress(). |
| * platform/soup/URLSoup.cpp: |
| (WebCore::URL::hostIsIPAddress): Use g_hostname_is_ip_address(). |
| |
| 2018-02-04 Zan Dobersek <zdobersek@igalia.com> |
| |
| [Cairo] Correctly calculate stride in GraphicsContext3D::paintToCanvas() |
| https://bugs.webkit.org/show_bug.cgi?id=182466 |
| |
| Reviewed by Michael Catanzaro. |
| |
| * platform/graphics/cairo/GraphicsContext3DCairo.cpp: |
| (WebCore::GraphicsContext3D::paintToCanvas): |
| Use cairo_format_stride_for_width() to obtain stride that Cairo thinks |
| is appropriate for the given width, taking into account internal |
| alignment requirements. |
| |
| 2018-02-04 Zan Dobersek <zdobersek@igalia.com> |
| |
| [Cairo] Split TexMap functionality out of GraphicsContext3DCairo |
| https://bugs.webkit.org/show_bug.cgi?id=182465 |
| |
| Reviewed by Michael Catanzaro. |
| |
| Take the Non-Cairo GraphicsContext3D functionality that's stashed in |
| GraphicsContext3DCairo and move it into the GraphicsContext3DTextureMapper |
| file. |
| |
| In GraphicsContext3DCairo.cpp, only the Cairo-specific GraphicsContext3D |
| functionality remains, specifically ImageExtractor and paintToCanvas(). |
| |
| Everything else is moved into GraphicsContext3DTextureMapper.cpp. This |
| filename and its location under platform/graphics/texmap/ was chosen |
| since all the ports using this file (GTK, WPE, WinCairo) are also using |
| the TextureMapper module. Various #if-guards are simplified in the |
| moved-over code to reflect this. |
| |
| GraphicsContext3DCairo.cpp now better reflects GraphicsContext3DCG.cpp, |
| with both implementing functionality specific to a 2D painting library, |
| whereas GraphicsContext3DTextureMapper.cpp reflects |
| GraphicsContext3DCocoa.cpp in covering functionality needed to integrate |
| the GraphicsContext3D output into the platform-specific composition |
| system. |
| |
| No new tests -- no change in behavior. |
| |
| * platform/TextureMapper.cmake: |
| * platform/graphics/cairo/GraphicsContext3DCairo.cpp: |
| (WebCore::activeContexts): Deleted. |
| (WebCore::GraphicsContext3D::create): Deleted. |
| (WebCore::GraphicsContext3D::GraphicsContext3D): Deleted. |
| (WebCore::GraphicsContext3D::~GraphicsContext3D): Deleted. |
| (WebCore::GraphicsContext3D::setContextLostCallback): Deleted. |
| (WebCore::GraphicsContext3D::setErrorMessageCallback): Deleted. |
| (WebCore::GraphicsContext3D::makeContextCurrent): Deleted. |
| (WebCore::GraphicsContext3D::checkGPUStatus): Deleted. |
| (WebCore::GraphicsContext3D::platformGraphicsContext3D): Deleted. |
| (WebCore::GraphicsContext3D::platformTexture const): Deleted. |
| (WebCore::GraphicsContext3D::isGLES2Compliant const): Deleted. |
| (WebCore::GraphicsContext3D::platformLayer const): Deleted. |
| (WebCore::GraphicsContext3D::getExtensions): Deleted. |
| * platform/graphics/texmap/GraphicsContext3DTextureMapper.cpp: Copied from Source/WebCore/platform/graphics/cairo/GraphicsContext3DCairo.cpp. |
| (WebCore::activeContexts): |
| (WebCore::GraphicsContext3D::create): |
| (WebCore::GraphicsContext3D::GraphicsContext3D): |
| (WebCore::GraphicsContext3D::~GraphicsContext3D): |
| (WebCore::GraphicsContext3D::setContextLostCallback): |
| (WebCore::GraphicsContext3D::setErrorMessageCallback): |
| (WebCore::GraphicsContext3D::makeContextCurrent): |
| (WebCore::GraphicsContext3D::checkGPUStatus): |
| (WebCore::GraphicsContext3D::platformGraphicsContext3D): |
| (WebCore::GraphicsContext3D::platformTexture const): |
| (WebCore::GraphicsContext3D::isGLES2Compliant const): |
| (WebCore::GraphicsContext3D::platformLayer const): |
| (WebCore::GraphicsContext3D::getExtensions): |
| |
| 2018-02-04 Zan Dobersek <zdobersek@igalia.com> |
| |
| Simplify GraphicsContext3D::paintToCanvas() |
| https://bugs.webkit.org/show_bug.cgi?id=182459 |
| |
| Reviewed by Michael Catanzaro. |
| |
| Cairo-specific paintToCanvas() method is dropped in favor of the more |
| common one that operates on a GraphicsContext object. The platform |
| context object is then retrieved inside the Cairo-speficic |
| paintToCanvas() implementation, and not at the call site in |
| GraphicsContext3D::paintRenderingResultsToCanvas(). |
| |
| GraphicsContext3D::paintToCanvas() is also modified so that the image |
| and canvas sizes are passed through IntSize objects, and not through |
| a width-and-height pair of integer values. |
| |
| No new tests -- no change in behavior. |
| |
| * platform/graphics/GraphicsContext3D.h: |
| * platform/graphics/cairo/GraphicsContext3DCairo.cpp: |
| (WebCore::GraphicsContext3D::paintToCanvas): |
| * platform/graphics/cg/GraphicsContext3DCG.cpp: |
| (WebCore::GraphicsContext3D::paintToCanvas): |
| * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp: |
| (WebCore::GraphicsContext3D::paintRenderingResultsToCanvas): |
| |
| 2018-02-03 Alexey Proskuryakov <ap@apple.com> |
| |
| Tweak availability macros for CAN_DISALLOW_USER_INSTALLED_FONTS |
| |
| Rubber-stamped by Maciej Stachowiak. |
| |
| * platform/graphics/cocoa/FontCacheCoreText.cpp: |
| |
| 2018-02-02 Daniel Bates <dabates@apple.com> |
| |
| Clean up FrameLoader::receivedFirstData() |
| https://bugs.webkit.org/show_bug.cgi?id=182361 |
| |
| Reviewed by Andy Estes. |
| |
| * loader/FrameLoader.cpp: |
| (WebCore::FrameLoader::receivedFirstData): |
| |
| 2018-02-02 Myles C. Maxfield <mmaxfield@apple.com> |
| |
| Test fix after r227995 |
| https://bugs.webkit.org/show_bug.cgi?id=180951 |
| |
| Unreviewed. |
| |
| Webfonts shouldn't be run through CTFontDescriptorCreateMatchingFontDescriptor(). |
| Also, unify macOS's and iOS's implementation of FontCache::lastResortFallbackFont(). |
| |
| Covered by existing tests. |
| |
| * platform/graphics/cocoa/FontCacheCoreText.cpp: |
| (WebCore::FontDatabase::collectionForFamily): |
| (WebCore::FontDatabase::fontForPostScriptName): |
| (WebCore::addAttributesForInstalledFonts): |
| (WebCore::addAttributesForWebFonts): |
| (WebCore::installedFontMandatoryAttributes): |
| (WebCore::FontCache::lastResortFallbackFont): |
| (WebCore::addAttributesForUserInstalledFonts): Deleted. |
| (WebCore::mandatoryAttributesForUserInstalledFonts): Deleted. |
| * platform/graphics/cocoa/FontCacheCoreText.h: |
| * platform/graphics/ios/FontCacheIOS.mm: |
| (WebCore::FontCache::lastResortFallbackFont): Deleted. |
| * platform/graphics/mac/FontCacheMac.mm: |
| (WebCore::FontCache::lastResortFallbackFont): Deleted. |
| * platform/graphics/mac/FontCustomPlatformData.cpp: |
| (WebCore::FontCustomPlatformData::fontPlatformData): |
| |
| 2018-02-02 Basuke Suzuki <Basuke.Suzuki@sony.com> |
| |
| Fix build error after r 227457 with VIDEO and WEB_AUDIO disabled |
| https://bugs.webkit.org/show_bug.cgi?id=182395 |
| |
| Reviewed by Eric Carlson |
| |
| * platform/audio/PlatformMediaSessionManager.cpp: |
| (WebCore::PlatformMediaSessionManager::updateNowPlayingInfoIfNecessary): |
| |
| 2018-02-02 Don Olmstead <don.olmstead@sony.com> |
| |
| Remove WebCore/ForwardingHeaders directory |
| https://bugs.webkit.org/show_bug.cgi?id=182347 |
| |
| Reviewed by Alex Christensen. |
| |
| Baseline tests updated. |
| |
| * bindings/scripts/CodeGeneratorJS.pm: |
| (AddToIncludesForIDLType): |
| (GenerateEnumerationImplementationContent): |
| (GenerateDictionaryImplementationContent): |
| (GenerateHeader): |
| (GenerateOverloadDispatcher): |
| (addUnscopableProperties): |
| (GenerateImplementation): |
| (GenerateOperationDefinition): |
| (GenerateSerializerDefinition): |
| (GenerateConstructorHelperMethods): |
| * bindings/scripts/test/JS/JSInterfaceName.cpp: |
| * bindings/scripts/test/JS/JSMapLike.cpp: |
| * bindings/scripts/test/JS/JSReadOnlyMapLike.cpp: |
| * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp: |
| * bindings/scripts/test/JS/JSTestCEReactions.cpp: |
| * bindings/scripts/test/JS/JSTestCEReactionsStringifier.cpp: |
| * bindings/scripts/test/JS/JSTestCallTracer.cpp: |
| * bindings/scripts/test/JS/JSTestCallbackFunctionRethrow.cpp: |
| * bindings/scripts/test/JS/JSTestCallbackFunctionWithThisObject.cpp: |
| * bindings/scripts/test/JS/JSTestCallbackFunctionWithTypedefs.cpp: |
| * bindings/scripts/test/JS/JSTestCallbackInterface.cpp: |
| * bindings/scripts/test/JS/JSTestClassWithJSBuiltinConstructor.cpp: |
| * bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.cpp: |
| * bindings/scripts/test/JS/JSTestDOMJIT.cpp: |
| * bindings/scripts/test/JS/JSTestDOMJIT.h: |
| * bindings/scripts/test/JS/JSTestEnabledBySetting.cpp: |
| * bindings/scripts/test/JS/JSTestEventConstructor.cpp: |
| * bindings/scripts/test/JS/JSTestEventTarget.cpp: |
| * bindings/scripts/test/JS/JSTestException.cpp: |
| * bindings/scripts/test/JS/JSTestException.h: |
| * bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp: |
| * bindings/scripts/test/JS/JSTestGlobalObject.cpp: |
| * bindings/scripts/test/JS/JSTestIndexedSetterNoIdentifier.cpp: |
| * bindings/scripts/test/JS/JSTestIndexedSetterThrowingException.cpp: |
| * bindings/scripts/test/JS/JSTestIndexedSetterWithIdentifier.cpp: |
| * bindings/scripts/test/JS/JSTestInterface.cpp: |
| * bindings/scripts/test/JS/JSTestInterfaceLeadingUnderscore.cpp: |
| * bindings/scripts/test/JS/JSTestIterable.cpp: |
| * bindings/scripts/test/JS/JSTestJSBuiltinConstructor.cpp: |
| * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp: |
| * bindings/scripts/test/JS/JSTestNamedAndIndexedSetterNoIdentifier.cpp: |
| * bindings/scripts/test/JS/JSTestNamedAndIndexedSetterThrowingException.cpp: |
| * bindings/scripts/test/JS/JSTestNamedAndIndexedSetterWithIdentifier.cpp: |
| * bindings/scripts/test/JS/JSTestNamedConstructor.cpp: |
| * bindings/scripts/test/JS/JSTestNamedDeleterNoIdentifier.cpp: |
| * bindings/scripts/test/JS/JSTestNamedDeleterThrowingException.cpp: |
| * bindings/scripts/test/JS/JSTestNamedDeleterWithIdentifier.cpp: |
| * bindings/scripts/test/JS/JSTestNamedDeleterWithIndexedGetter.cpp: |
| * bindings/scripts/test/JS/JSTestNamedGetterCallWith.cpp: |
| * bindings/scripts/test/JS/JSTestNamedGetterNoIdentifier.cpp: |
| * bindings/scripts/test/JS/JSTestNamedGetterWithIdentifier.cpp: |
| * bindings/scripts/test/JS/JSTestNamedSetterNoIdentifier.cpp: |
| * bindings/scripts/test/JS/JSTestNamedSetterThrowingException.cpp: |
| * bindings/scripts/test/JS/JSTestNamedSetterWithIdentifier.cpp: |
| * bindings/scripts/test/JS/JSTestNamedSetterWithIndexedGetter.cpp: |
| * bindings/scripts/test/JS/JSTestNamedSetterWithIndexedGetterAndSetter.cpp: |
| * bindings/scripts/test/JS/JSTestNamedSetterWithOverrideBuiltins.cpp: |
| * bindings/scripts/test/JS/JSTestNamedSetterWithUnforgableProperties.cpp: |
| * bindings/scripts/test/JS/JSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltins.cpp: |
| * bindings/scripts/test/JS/JSTestNode.cpp: |
| * bindings/scripts/test/JS/JSTestObj.cpp: |
| * bindings/scripts/test/JS/JSTestObj.h: |
| * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp: |
| * bindings/scripts/test/JS/JSTestOverloadedConstructorsWithSequence.cpp: |
| * bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp: |
| * bindings/scripts/test/JS/JSTestPluginInterface.cpp: |
| * bindings/scripts/test/JS/JSTestPluginInterface.h: |
| * bindings/scripts/test/JS/JSTestPromiseRejectionEvent.cpp: |
| * bindings/scripts/test/JS/JSTestSerialization.cpp: |
| * bindings/scripts/test/JS/JSTestSerializationIndirectInheritance.cpp: |
| * bindings/scripts/test/JS/JSTestSerializationInherit.cpp: |
| * bindings/scripts/test/JS/JSTestSerializationInheritFinal.cpp: |
| * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp: |
| * bindings/scripts/test/JS/JSTestStandaloneDictionary.cpp: |
| * bindings/scripts/test/JS/JSTestStandaloneEnumeration.cpp: |
| * bindings/scripts/test/JS/JSTestStringifier.cpp: |
| * bindings/scripts/test/JS/JSTestStringifierAnonymousOperation.cpp: |
| * bindings/scripts/test/JS/JSTestStringifierNamedOperation.cpp: |
| * bindings/scripts/test/JS/JSTestStringifierOperationImplementedAs.cpp: |
| * bindings/scripts/test/JS/JSTestStringifierOperationNamedToString.cpp: |
| * bindings/scripts/test/JS/JSTestStringifierReadOnlyAttribute.cpp: |
| * bindings/scripts/test/JS/JSTestStringifierReadWriteAttribute.cpp: |
| * bindings/scripts/test/JS/JSTestTypedefs.cpp: |
| * dom/make_event_factory.pl: |
| (generateImplementation): |
| |
| 2018-02-02 David Quesada <david_quesada@apple.com> |
| |
| WebAppManifest scope should default to the containing directory of start_url if 'scope' is not specified |
| https://bugs.webkit.org/show_bug.cgi?id=182363 |
| rdar://problem/37093498 |
| |
| Reviewed by Ryosuke Niwa. |
| |
| If an app manifest doesn't specify a scope, we should default to the "parent directory" of |
| the start URL, rather than leaving the app unbounded. This is more reasonable than using the |
| entire internet as the app scope. |
| |
| No new tests, updates to the existing tests verify the new behavior. |
| |
| * Modules/applicationmanifest/ApplicationManifestParser.cpp: |
| (WebCore::ApplicationManifestParser::parseScope): |
| |
| 2018-02-02 Youenn Fablet <youenn@apple.com> |
| |
| Clearing all service worker registrations should wait for importing service worker registration to finish |
| https://bugs.webkit.org/show_bug.cgi?id=182407 |
| <rdar://problem/37167523> |
| |
| Reviewed by Chris Dumez. |
| |
| * workers/service/server/SWServer.cpp: |
| (WebCore::SWServer::clear): ensure completion handler is called on early exit case. |
| |
| 2018-02-02 Youenn Fablet <youenn@apple.com> |
| |
| Clearing all service worker registrations should wait for importing service worker registration to finish |
| https://bugs.webkit.org/show_bug.cgi?id=182407 |
| |
| Reviewed by Chris Dumez. |
| |
| Covered by existing tests and the service worker API test being no longer flaky. |
| |
| * workers/service/server/SWServer.cpp: |
| (WebCore::SWServer::registrationStoreImportComplete): |
| (WebCore::SWServer::clearAll): |
| (WebCore::SWServer::clear): |
| (WebCore::SWServer::getOriginsWithRegistrations): |
| * workers/service/server/SWServer.h: |
| |
| 2018-02-02 Chris Dumez <cdumez@apple.com> |
| |
| Clearing a registration should null out its workers before setting their state to "redundant" |
| https://bugs.webkit.org/show_bug.cgi?id=182418 |
| <rdar://problem/37142874> |
| |
| Reviewed by Youenn Fablet. |
| |
| Clearing a registration should null out its workers before setting their state to "redundant". |
| This seems to match Firefox and Chrome. |
| |
| No new tests, rebaselined existing test. |
| |
| * workers/service/server/SWServerRegistration.cpp: |
| (WebCore::SWServerRegistration::clear): |
| (WebCore::clearRegistrationWorker): Deleted. |
| |
| 2018-02-02 Antoine Quint <graouts@apple.com> |
| |
| [Modern Media Controls] Turn media/modern-media-controls/tracks-panel and media/modern-media-controls/tracks-support back on |
| https://bugs.webkit.org/show_bug.cgi?id=182426 |
| |
| Reviewed by Dean Jackson. |
| |
| Ensure that the tracks panel isn't dismissed by updating the layout. |
| |
| * Modules/modern-media-controls/controls/inline-media-controls.js: |
| (InlineMediaControls.prototype.layout): |
| |
| 2018-02-02 Commit Queue <commit-queue@webkit.org> |
| |
| Unreviewed, rolling out r227964. |
| https://bugs.webkit.org/show_bug.cgi?id=182423 |
| |
| It broke several unit tests (Requested by KaL on #webkit). |
| |
| Reverted changeset: |
| |
| "[SOUP] Ensure domain is valid when converting a WebCore |
| Cookie to Soup" |
| https://bugs.webkit.org/show_bug.cgi?id=182328 |
| https://trac.webkit.org/changeset/227964 |
| |
| 2018-02-01 Chris Dumez <cdumez@apple.com> |
| |
| When SW install fails, null out registration.installing before setting worker state to "redundant" |
| https://bugs.webkit.org/show_bug.cgi?id=182416 |
| <rdar://problem/37141997> |
| |
| Reviewed by Youenn Fablet. |
| |
| When SW install fails, null out registration.installing before setting worker state to "redundant". |
| This does not match the spec but this is what Firefox and Chrome do. This is also what the |
| web-platform-tests expect. |
| |
| Test: http/tests/workers/service/install-fails.html |
| |
| * workers/service/server/SWServerJobQueue.cpp: |
| (WebCore::SWServerJobQueue::didFinishInstall): |
| |
| 2018-02-01 Myles C. Maxfield <mmaxfield@apple.com> |
| |
| Test fix after r227848. |
| https://bugs.webkit.org/show_bug.cgi?id=180951 |
| |
| Unreviewed. |
| |
| Using kCTFontNameAttribute on an in-memory font causes CTFontDescriptorCreateMatchingFontDescriptor() |
| to return nullptr. Luckily, we weren't using that attribute anyway. |
| |
| Covered by existing tests. |
| |
| * platform/graphics/cocoa/FontCacheCoreText.cpp: |
| (WebCore::mandatoryAttributesForUserInstalledFonts): |
| |
| 2018-02-01 Youenn Fablet <youenn@apple.com> |
| |
| Delay service worker process creation until actually needed by SWServer |
| https://bugs.webkit.org/show_bug.cgi?id=182301 |
| |
| Reviewed by Chris Dumez. |
| |
| Rename SWServer::Connection::scheduleJobInServer to scheduleJob. |
| Add sessionID getter from an SWServer. |
| |
| * workers/service/server/SWServer.h: |
| (WebCore::SWServer::sessionID const): |
| |
| 2018-02-01 Fujii Hironori <Hironori.Fujii@sony.com> |
| |
| REGRESSION(r227594) [WinCairo] NULL pointer crash in GraphicsContext::getWindowsContext |
| https://bugs.webkit.org/show_bug.cgi?id=182282 |
| |
| Reviewed by Žan Doberšek. |
| |
| ImageBufferCairo has been changed to use GraphicsContextImplCairo |
| in r227594. But, GraphicsContext::getWindowsContext doesn't care |
| the case of using GraphicsContextImpl and crashes due to null |
| dereference of GraphicsContext::m_data. |
| |
| GraphicsContext::getWindowsContext should create a HDC in that case. |
| |
| Remove the argument mayCreateBitmap because it is always |
| true at the moment. |
| |
| No new tests (Covered by the existing tests) |
| |
| * platform/graphics/GraphicsContext.h: |
| Removed a argument mayCreateBitmap of getWindowsContext and releaseWindowsContext. |
| * platform/graphics/win/GraphicsContextCGWin.cpp: |
| (WebCore::GraphicsContext::releaseWindowsContext): Ditto. |
| * platform/graphics/win/GraphicsContextCairoWin.cpp: |
| (WebCore::GraphicsContext::releaseWindowsContext): Ditto. |
| * platform/graphics/win/GraphicsContextDirect2D.cpp: |
| (WebCore::GraphicsContext::releaseWindowsContext): Ditto. |
| * platform/graphics/win/GraphicsContextWin.cpp: |
| (WebCore::GraphicsContext::getWindowsContext): |
| Create a HDC if m_impl is null. Removed a argument mayCreateBitmap. |
| * platform/graphics/win/LocalWindowsContext.h: |
| (WebCore::LocalWindowsContext::LocalWindowsContext): |
| Removed m_mayCreateBitmap. |
| (WebCore::LocalWindowsContext::~LocalWindowsContext): Ditto. |
| |
| 2018-02-01 Christopher Reid <chris.reid@sony.com> |
| |
| [Curl] Use SQLite database in cookie jar implementation for Curl port |
| https://bugs.webkit.org/show_bug.cgi?id=174942 |
| |
| Reviewed by Alex Christensen. |
| |
| No new tests, Set-Cookie is already tested in Layout tests. |
| |
| Adding an initial SQLite CookieJar implementation to the curl network layer. |
| WebCore will now parse and handle both HTTP and DOM cookies instead of using libcurl. |
| This currently supports cookie storage and retrieval. |
| Cookie deletion is not yet implemented. |
| |
| * platform/Curl.cmake: |
| * platform/network/NetworkStorageSession.h: Added cookieDB storage in curl. |
| * platform/network/curl/CookieJarCurl.cpp: Removed the old curl cookie handling. |
| * platform/network/curl/CookieJarCurl.h: |
| * platform/network/curl/CookieJarCurlDatabase.cpp: Added. |
| * platform/network/curl/CookieJarCurlDatabase.h: Added. |
| * platform/network/curl/CookieJarDB.cpp: Added. |
| * platform/network/curl/CookieJarDB.h: Added. |
| * platform/network/curl/CookieUtil.cpp: Added. |
| * platform/network/curl/CookieUtil.h: Added. |
| * platform/network/curl/CurlContext.cpp: Removed the old curl cookie handling. |
| * platform/network/curl/CurlContext.h: |
| * platform/network/curl/CurlRequest.cpp: Added handlers for HTTP response cookies. |
| * platform/network/curl/NetworkStorageSessionCurl.cpp: |
| * platform/network/curl/ResourceHandleCurlDelegate.cpp: |
| |
| 2018-02-01 Chris Dumez <cdumez@apple.com> |
| |
| Add missing RETURN_IF_EXCEPTION() after object->get() calls in convertDictionary<>() |
| https://bugs.webkit.org/show_bug.cgi?id=182392 |
| <rdar://problem/37119215> |
| |
| Reviewed by Geoffrey Garen. |
| |
| Add missing RETURN_IF_EXCEPTION() after object->get() calls in convertDictionary<>(), |
| given that getting the property from the object can throw an exception. |
| |
| No new tests, rebaselined existing test. |
| |
| * bindings/scripts/CodeGeneratorJS.pm: |
| (GenerateDictionaryImplementationContent): |
| * bindings/scripts/test/JS/JSTestCallbackInterface.cpp: |
| (WebCore::convertDictionary<TestCallbackInterface::Dictionary>): |
| * bindings/scripts/test/JS/JSTestEventConstructor.cpp: |
| (WebCore::convertDictionary<TestEventConstructor::Init>): |
| * bindings/scripts/test/JS/JSTestObj.cpp: |
| (WebCore::convertDictionary<TestObj::Dictionary>): |
| (WebCore::convertDictionary<TestObj::DictionaryThatShouldNotTolerateNull>): |
| (WebCore::convertDictionary<TestObj::DictionaryThatShouldTolerateNull>): |
| (WebCore::convertDictionary<AlternateDictionaryName>): |
| (WebCore::convertDictionary<TestObj::ParentDictionary>): |
| (WebCore::convertDictionary<TestObj::ChildDictionary>): |
| (WebCore::convertDictionary<TestObj::ConditionalDictionaryA>): |
| (WebCore::convertDictionary<TestObj::ConditionalDictionaryB>): |
| (WebCore::convertDictionary<TestObj::ConditionalDictionaryC>): |
| * bindings/scripts/test/JS/JSTestPromiseRejectionEvent.cpp: |
| (WebCore::convertDictionary<TestPromiseRejectionEvent::Init>): |
| * bindings/scripts/test/JS/JSTestStandaloneDictionary.cpp: |
| (WebCore::convertDictionary<DictionaryImplName>): |
| |
| 2018-02-01 Ryosuke Niwa <rniwa@webkit.org> |
| |
| Some test cases in accessibility/mac/selection-notification-focus-change.html fail |
| https://bugs.webkit.org/show_bug.cgi?id=182212 |
| <rdar://problem/36937147> |
| |
| Reviewed by Antti Koivisto and Wenson Hsieh. |
| |
| The failure was caused by the async update of the selection appearance not preserving selection reveal intent. |
| Fixed the bug by storing the intent in a member variable and using it later. |
| |
| * dom/Element.cpp: |
| (WebCore::Element::focus): Removed an unnecessary synchronous layout update. |
| * editing/FrameSelection.cpp: |
| (WebCore::FrameSelection::setNeedsSelectionUpdate): Use the default intent to preserve the old behavior. |
| (WebCore::FrameSelection::respondToNodeModification): Ditto. |
| (WebCore::FrameSelection::setSelection): Save the selection reveal intent. |
| (WebCore::FrameSelection::updateAppearanceAfterLayoutOrStyleChange): Use the saved intent. |
| * editing/FrameSelection.h: |
| * page/FocusController.cpp: |
| (WebCore::FocusController::advanceFocusDirectionally): Always update the layout before invoking |
| nodeRectInAbsoluteCoordinates. |
| |
| 2018-02-01 Zalan Bujtas <zalan@apple.com> |
| |
| [RenderTreeBuilder] Move RenderRubyRun::rubyBaseSafe to RenderTreeBuilder::Ruby |
| https://bugs.webkit.org/show_bug.cgi?id=182306 |
| <rdar://problem/37041440> |
| |
| Reviewed by Darin Adler. |
| |
| Addressing post-review comment. |
| |
| * rendering/updating/RenderTreeBuilderRuby.cpp: |
| (WebCore::RenderTreeBuilder::Ruby::insertChild): |
| (WebCore::RenderTreeBuilder::Ruby::rubyBaseSafe): |
| * rendering/updating/RenderTreeBuilderRuby.h: |
| |
| 2018-02-01 Zalan Bujtas <zalan@apple.com> |
| |
| [RenderTreeBuilder] Introduce RenderTreeBuilder to takeChild() |
| https://bugs.webkit.org/show_bug.cgi?id=182373 |
| <rdar://problem/37101484> |
| |
| Reviewed by Antti Koivisto. |
| |
| This is in preparation for moving mutation code out of takeChild. |
| |
| No change in functionality. |
| |
| * rendering/RenderBlock.cpp: |
| (WebCore::RenderBlock::takeChild): |
| * rendering/RenderBlock.h: |
| * rendering/RenderBlockFlow.cpp: |
| (WebCore::RenderBlockFlow::takeChild): |
| * rendering/RenderBlockFlow.h: |
| * rendering/RenderButton.cpp: |
| (WebCore::RenderButton::takeChild): |
| * rendering/RenderButton.h: |
| * rendering/RenderElement.cpp: |
| (WebCore::RenderElement::takeChild): |
| (WebCore::RenderElement::removeAndDestroyChild): |
| (WebCore::RenderElement::destroyLeftoverChildren): |
| * rendering/RenderElement.h: |
| * rendering/RenderFullScreen.cpp: |
| (WebCore::RenderFullScreen::wrapExistingRenderer): |
| (WebCore::RenderFullScreen::unwrapRenderer): |
| * rendering/RenderGrid.cpp: |
| (WebCore::RenderGrid::takeChild): |
| * rendering/RenderGrid.h: |
| * rendering/RenderMenuList.cpp: |
| (RenderMenuList::takeChild): |
| * rendering/RenderMenuList.h: |
| * rendering/RenderMultiColumnFlow.cpp: |
| (WebCore::RenderMultiColumnFlow::processPossibleSpannerDescendant): |
| * rendering/RenderObject.cpp: |
| (WebCore::RenderObject::removeFromParentAndDestroy): |
| * rendering/RenderRuby.cpp: |
| (WebCore::RenderRubyAsInline::takeChild): |
| (WebCore::RenderRubyAsBlock::takeChild): |
| * rendering/RenderRuby.h: |
| * rendering/RenderRubyRun.cpp: |
| (WebCore::RenderRubyRun::takeChild): |
| * rendering/RenderRubyRun.h: |
| * rendering/RenderTableRow.cpp: |
| (WebCore::RenderTableRow::collapseAndDestroyAnonymousSiblingRows): Deleted. |
| * rendering/RenderTableRow.h: |
| * rendering/svg/RenderSVGContainer.cpp: |
| (WebCore::RenderSVGContainer::takeChild): |
| * rendering/svg/RenderSVGContainer.h: |
| * rendering/svg/RenderSVGInline.cpp: |
| (WebCore::RenderSVGInline::takeChild): |
| * rendering/svg/RenderSVGInline.h: |
| * rendering/svg/RenderSVGRoot.cpp: |
| (WebCore::RenderSVGRoot::takeChild): |
| * rendering/svg/RenderSVGRoot.h: |
| * rendering/svg/RenderSVGText.cpp: |
| (WebCore::RenderSVGText::takeChild): |
| * rendering/svg/RenderSVGText.h: |
| * rendering/updating/RenderTreeBuilder.cpp: |
| (WebCore::RenderTreeBuilder::collapseAndDestroyAnonymousSiblingRows): |
| (WebCore::RenderTreeBuilder::removeFromParentAndDestroyCleaningUpAnonymousWrappers): |
| * rendering/updating/RenderTreeBuilder.h: |
| * rendering/updating/RenderTreeBuilderFirstLetter.cpp: |
| (WebCore::RenderTreeBuilder::FirstLetter::updateStyle): |
| (WebCore::RenderTreeBuilder::FirstLetter::createRenderers): |
| * rendering/updating/RenderTreeBuilderList.cpp: |
| (WebCore::RenderTreeBuilder::List::updateItemMarker): |
| * rendering/updating/RenderTreeBuilderMultiColumn.cpp: |
| (WebCore::RenderTreeBuilder::MultiColumn::createFragmentedFlow): |
| (WebCore::RenderTreeBuilder::MultiColumn::destroyFragmentedFlow): |
| * rendering/updating/RenderTreeBuilderRuby.cpp: |
| (WebCore::RenderTreeBuilder::Ruby::insertChild): |
| |
| 2018-02-01 Dean Jackson <dino@apple.com> |
| |
| REGRESSION (r219342): Scaled HTML widget is not responding to a clicks outside the body |
| https://bugs.webkit.org/show_bug.cgi?id=182394 |
| <rdar://problem/34840816> |
| |
| Reviewed by Simon Fraser. |
| |
| If a scale < 1 is applied to the page, then the visual viewport will be bigger |
| than the layout viewport. Our hit testing code would then ignore any hits |
| that were outside the layout viewport. |
| |
| The fix is to only apply a hit testing clip if the page is scaling up, not down. |
| |
| Update the existing fast/dom/elementFromPoint-scaled-scrolled.html test. |
| |
| * page/FrameView.cpp: |
| (WebCore::FrameView::layoutViewportToAbsoluteRect const): Deleted. This helper is |
| no longer used, and it would have probably been more confusing to have it accept |
| a flag to ignore the scale if it is less than 1. |
| * page/FrameView.h: |
| * rendering/RenderLayer.cpp: |
| (WebCore::RenderLayer::hitTest): No need to take the layout rect, remove the origin, |
| and pass it to a helper that added the origin back. The only thing the helper was |
| doing for us was applying a scale factor, which we only want to do if it was |
| scaling up. |
| |
| 2018-02-01 Yusuke Suzuki <utatane.tea@gmail.com> |
| |
| Structured cloning a Symbol should throw |
| https://bugs.webkit.org/show_bug.cgi?id=182380 |
| |
| Reviewed by Darin Adler. |
| |
| Test: js/dom/post-message-symbol.html |
| |
| * bindings/js/SerializedScriptValue.cpp: |
| (WebCore::CloneSerializer::dumpIfTerminal): |
| Structured cloning should throw "DataCloneError" DOMException if it finds Symbol. |
| Remove unused `isNumber()` case. It is done in dumpImmediate. |
| (WebCore::CloneSerializer::serializeUndefined): Deleted. |
| (WebCore::CloneSerializer::serializeBoolean): Deleted. |
| (WebCore::CloneSerializer::serializeNumber): Deleted. |
| Remove unused functions. |
| |
| 2018-02-01 Chris Dumez <cdumez@apple.com> |
| |
| We no longer need to queue service worker jobs until the connection to the service worker process has been established |
| https://bugs.webkit.org/show_bug.cgi?id=182375 |
| |
| Reviewed by Youenn Fablet. |
| |
| We no longer need to queue service worker jobs until the connection to the service worker process |
| has been established. We initially did this to work around the fact that registrations restored |
| from disk would not have an active worker until the service worker process had been established. |
| However, this issue has been fixed in r227696. |
| |
| This is basically a revert of r227220, which is no longer needed after r227696. |
| |
| No new tests, initial fix was covered by an API test that still passes. |
| |
| * workers/service/server/SWServer.cpp: |
| (WebCore::SWServer::clearAll): |
| (WebCore::SWServer::clear): |
| (WebCore::SWServer::scheduleJob): |
| (WebCore::SWServer::serverToContextConnectionCreated): |
| * workers/service/server/SWServer.h: |
| |
| 2018-02-01 Carlos Garcia Campos <cgarcia@igalia.com> |
| |
| [GTK] Shift + mouse scroll should scroll horizontally |
| https://bugs.webkit.org/show_bug.cgi?id=181629 |
| |
| Reviewed by Michael Catanzaro. |
| |
| We currently turn vertical scroll into horizontal when scrolling over the horizontal scrollbar. When Shift key is |
| pressed, we still want to scroll in the scrollbar direction when scrolling over a scrollbar, so we need to swap |
| directions in both scrollbars depending on whther the Shift key is pressed or not. |
| |
| * page/EventHandler.cpp: |
| (WebCore::EventHandler::shouldSwapScrollDirection const): Renamed. |
| (WebCore::EventHandler::handleWheelEvent): Use the new name. |
| (WebCore::EventHandler::shouldTurnVerticalTicksIntoHorizontal const): Deleted. |
| * page/EventHandler.h: |
| * platform/PlatformWheelEvent.h: |
| (WebCore::PlatformWheelEvent::copySwappingDirection const): Swap the direction of the event. |
| (WebCore::PlatformWheelEvent::copyTurningVerticalTicksIntoHorizontalTicks const): Deleted. |
| * platform/glib/EventHandlerGLib.cpp: |
| (WebCore::EventHandler::shouldSwapScrollDirection const): Take into account whether the Shift key is present. |
| (WebCore::EventHandler::shouldTurnVerticalTicksIntoHorizontal const): Deleted. |
| |
| 2018-02-01 Carlos Garcia Campos <cgarcia@igalia.com> |
| |
| [GTK] Problem with Washington Post images |
| https://bugs.webkit.org/show_bug.cgi?id=181421 |
| |
| Reviewed by Carlos Alberto Lopez Perez. |
| |
| This is because Washington Post is using the user agent to decide the image formats it serves. In the case of |
| chromium the images are served as webp, for firefox jpeg is used and in our case it's assuming we are safari and |
| it's providing jp2 images that we don't support. Add a user agent quirk to pretend to be chromium for |
| washingtonpost.com. |
| |
| * platform/UserAgentQuirks.cpp: |
| (WebCore::urlRequiresChromeBrowser): |
| |
| 2018-02-01 Carlos Garcia Campos <cgarcia@igalia.com> |
| |
| [SOUP] Ensure domain is valid when converting a WebCore Cookie to Soup |
| https://bugs.webkit.org/show_bug.cgi?id=182328 |
| |
| Reviewed by Michael Catanzaro. |
| |
| soup_cookie_parse() adds the initial '.' to the domain if missing before creating the SoupCookie, but |
| soup_cookie_new() allows for domain to be a hostname that needs to match exactly. When converting a WebCore |
| Cookie into a SoupCookie we always want the domain to be considered as such and not as a hostname, so we need to |
| prepend the '.' if missing. |
| |
| Fixes: imported/w3c/webdriver/tests/cookies/add_cookie.py::test_add_domain_cookie |
| |
| * platform/network/soup/CookieSoup.cpp: |
| (WebCore::Cookie::toSoupCookie const): |
| |
| 2018-02-01 Zalan Bujtas <zalan@apple.com> |
| |
| [RenderTreeBuilder] Move RenderTableRow::collapseAndDestroyAnonymousSiblingRows to RenderTreeBuilder |
| https://bugs.webkit.org/show_bug.cgi?id=182374 |
| <rdar://problem/37102005> |
| |
| Reviewed by Antti Koivisto. |
| |
| It's only called from RenderTreeBuilder. |
| |
| No change in functionality. |
| |
| * rendering/RenderTableRow.cpp: |
| (WebCore::RenderTableRow::collapseAndDestroyAnonymousSiblingRows): Deleted. |
| * rendering/RenderTableRow.h: |
| * rendering/updating/RenderTreeBuilder.cpp: |
| (WebCore::RenderTreeBuilder::removeFromParentAndDestroyCleaningUpAnonymousWrappers): |
| * rendering/updating/RenderTreeBuilderTable.cpp: |
| (WebCore::RenderTreeBuilder::Table::collapseAndDestroyAnonymousSiblingRows): |
| * rendering/updating/RenderTreeBuilderTable.h: |
| |
| 2018-02-01 Chris Dumez <cdumez@apple.com> |
| |
| Queue a microtask when a waitUntil() promise is settled |
| https://bugs.webkit.org/show_bug.cgi?id=182372 |
| <rdar://problem/37101019> |
| |
| Reviewed by Mark Lam. |
| |
| Queue a microtask when a waitUntil() promise is settled, as per: |
| - https://w3c.github.io/ServiceWorker/#dom-extendableevent-waituntil (step 5) |
| |
| Otherwise, we decrement m_pendingPromiseCount too quickly and it may cause |
| following calls to waitUntil() to throw when they shouldn't. |
| |
| No new tests, rebaselined existing test. |
| |
| * workers/service/ExtendableEvent.cpp: |
| (WebCore::ExtendableEvent::addExtendLifetimePromise): |
| |
| 2018-02-01 Antti Koivisto <antti@apple.com> |
| |
| Invalidate style for sibling combinators accurately on class change |
| https://bugs.webkit.org/show_bug.cgi?id=182336 |
| |
| Reviewed by Zalan Bujtas. |
| |
| Use Style::Invalidator to invalidate only those elements that may be affected by a class |
| change for sibling combinators and nth pseudo classes. |
| |
| * css/RuleFeature.cpp: |
| |
| Add new AllSiblings MatchElement to use for nth pseudo classes with subselectors. |
| |
| (WebCore::isSiblingOrSubject): |
| |
| Add a helper. |
| |
| (WebCore::RuleFeatureSet::computeNextMatchElement): |
| (WebCore::RuleFeatureSet::computeSubSelectorMatchElement): |
| |
| Compute and propage MatchElement::AllSiblings. |
| |
| * css/RuleFeature.h: |
| * dom/Node.cpp: |
| (WebCore::Node::updateAncestorsForStyleRecalc): |
| |
| Don't need to test for childrenAffectedByPropertyBasedBackwardPositionalRules anymore (an oddly named bit for nth pseudo classes). |
| |
| * style/StyleInvalidator.cpp: |
| (WebCore::Style::Invalidator::invalidateStyleWithMatchElement): |
| |
| Invalidate only the potentially affected elements. |
| The old code would just unconditionally invalidate the current element. This would propagate to descedants of siblings via |
| affectedByPreviousSibling bits. That mechanism can be removed when everything has been switched to accurate invalidation. |
| |
| 2018-01-31 Simon Fraser <simon.fraser@apple.com> |
| |
| Use different debug red colors for different contexts |
| https://bugs.webkit.org/show_bug.cgi?id=182362 |
| |
| Reviewed by Tim Horton. |
| |
| Pure red is used elsehwere in the system as a debug color indicator, so use different |
| shades of red for WebKit in the two places where we paint a reddish wash in debug builds, |
| so they are identifiable. |
| |
| * page/FrameView.cpp: |
| (WebCore::FrameView::paintContents): |
| |
| 2018-01-31 Don Olmstead <don.olmstead@sony.com> |
| |
| [CMake] Make JavaScriptCore headers copies |
| https://bugs.webkit.org/show_bug.cgi?id=182303 |
| |
| Reviewed by Alex Christensen. |
| |
| No new tests. No change in behavior. |
| |
| * CMakeLists.txt: |
| * PlatformMac.cmake: |
| * PlatformWPE.cmake: |
| * PlatformWin.cmake: |
| * PlatformWinCairo.cmake: |
| |
| 2018-01-31 Per Arne Vollan <pvollan@apple.com> |
| |
| Layout Test fast/events/beforeunload-dom-manipulation-crash.html is crashing |
| https://bugs.webkit.org/show_bug.cgi?id=181204 |
| <rdar://problem/36256274> |
| |
| Reviewed by Ryosuke Niwa. |
| |
| When a frame element is moved in the DOM tree during the execution of a beforeunload handler, |
| the frame will be detached when removed from its previous position in the DOM tree. When being |
| detached, an attempt will also be made to stop the load by calling FrameLoader::stopAllLoaders(). |
| However, this method will return early when executed in a beforeunload handler, since navigation |
| is not allowed then. The end result is a detached frame which will continue to load, and hitting |
| asserts in DocumentLoader::dataReceived(), and DocumentLoader::notifyFinished(). It should be |
| possible to stop a frame load, even when executing a beforeunload handler. |
| |
| No new tests. Covered by the existing test fast/events/beforeunload-dom-manipulation-crash.html. |
| |
| * history/PageCache.cpp: |
| (WebCore::PageCache::addIfCacheable): Fix a failing API test by allowing scripts to be executed |
| under the PageCache::prune method. |
| * loader/FrameLoader.cpp: |
| (WebCore::FrameLoader::isStopLoadingAllowed const): |
| (WebCore::FrameLoader::stopAllLoaders): |
| * loader/FrameLoader.h: |
| * svg/graphics/SVGImage.cpp: |
| (WebCore::SVGImage::~SVGImage): Disable scripts disallowed assertions in this scope, since it is |
| safe in this context. |
| |
| 2018-01-31 Javier Fernandez <jfernandez@igalia.com> |
| |
| inline-block baseline not computed correctly for vertical-lr |
| https://bugs.webkit.org/show_bug.cgi?id=170176 |
| |
| Reviewed by Manuel Rego Casasnovas. |
| |
| When computing the baseline position of inline-block elements we use the |
| InlineFlow logicalTop and the FontMetrics ascent. The issue comes from |
| the fact that these units are incompatible. The logicalTop of a |
| vertical-lr element is offset to the left edge, while the ascent is the |
| distance from the right edge. |
| |
| We need to either use logical value for the FontMetrics ascent so we can |
| compute the correctly the baselines of vertical-lr elements, or just using |
| the logicalBottom for these cases. |
| |
| The approach based on a logicalAscent API for FontMetrics would require |
| a lot of work because inline-block logic assumes everything is vertical-rl |
| and at some point, flips the elements along the block-axis in case of |
| vertical-lr mode. |
| |
| While it'd be desirable to get rid of this flipping logic, this patch tries |
| first the simpler approach of using logicalBottom, which aligns with the |
| currently implemented logic. |
| |
| Tests: fast/inline-block/baseline-vertical-01.html |
| fast/inline-block/baseline-vertical-02.html |
| fast/inline-block/baseline-vertical-03.html |
| fast/inline-block/baseline-vertical-04.html |
| fast/inline-block/baseline-vertical-05.html |
| fast/inline-block/baseline-vertical-06.html |
| fast/inline-block/baseline-vertical-07.html |
| fast/inline-block/baseline-vertical-08.html |
| |
| * rendering/InlineFlowBox.cpp: |
| (WebCore::InlineFlowBox::placeBoxesInBlockDirection): |
| * rendering/RenderBlockFlow.cpp: |
| (WebCore::RenderBlockFlow::inlineBlockBaseline const): |
| |
| 2018-01-31 Said Abou-Hallawa <sabouhallawa@apple.com> |
| |
| BitmapImage::drawPattern() may not draw a complete frame even after all the data is received |
| https://bugs.webkit.org/show_bug.cgi?id=182277 |
| |
| Reviewed by Simon Fraser. |
| |
| BitmapImage::drawPattern() needs to destroy the incomplete decoded frame |
| before trying to draw it as a pattern. |
| |
| Test: http/tests/images/draw-pattern-slow-load-large-image.html |
| |
| * loader/cache/CachedImage.cpp: |
| (WebCore::CachedImage::updateBufferInternal): We need to disable CachedImage |
| data buffering for testing. This simulates slow network where intervals |
| between data chunks can last for seconds. |
| * loader/cache/CachedImage.h: |
| * platform/graphics/BitmapImage.cpp: |
| (WebCore::BitmapImage::drawPattern): Destroy the incomplete decoded frame |
| before drawing this frame as a pattern. We do not destroy incomplete decoded |
| frame once new data is received because it may be drawn by async image |
| drawing while waiting for the newer frame to finish decoding. |
| * testing/Internals.cpp: |
| (WebCore::Internals::setForceUpdateImageDataEnabledForTesting): |
| * testing/Internals.h: |
| * testing/Internals.idl: |
| |
| 2018-01-31 Ryosuke Niwa <rniwa@webkit.org> |
| |
| Add a release assertion to ensure timers are deleted in the right thread |
| https://bugs.webkit.org/show_bug.cgi?id=182351 |
| |
| Reviewed by David Kilzer. |
| |
| Added a relese assertion in ~TimerBase that the current thread is the one in which the timer was created. |
| |
| We use canAccessThreadLocalDataForThread for this purpose since the condition is more complicated |
| when WebThread is being used. |
| |
| * platform/Timer.cpp: |
| (WebCore::TimerBase::~TimerBase): Added the assertion. |
| * platform/Timer.h: |
| (WebCore::TimerBase::m_thread): Always store the current thread in a timer. |
| |
| 2018-01-31 Youenn Fablet <youenn@apple.com> |
| |
| Change SWServer::claim to set the iterator value as soon as possible |
| https://bugs.webkit.org/show_bug.cgi?id=182337 |
| |
| Reviewed by Chris Dumez. |
| |
| No change of behavior, this is a "let's go safe way" fix. |
| |
| * workers/service/server/SWServer.cpp: |
| (WebCore::SWServer::claim): |
| |
| 2018-01-31 Zalan Bujtas <zalan@apple.com> |
| |
| [RenderTreeBuilder] Move RenderObject::removeFromParentAndDestroyCleaningUpAnonymousWrappers to RenderTreeBuilder. |
| https://bugs.webkit.org/show_bug.cgi?id=182348 |
| <rdar://problem/37082837> |
| |
| Reviewed by Antti Koivisto. |
| |
| All the callsites are in the RenderTreeUpdater by now. |
| |
| No change in functionality. |
| |
| * rendering/RenderObject.cpp: |
| (WebCore::isAnonymousAndSafeToDelete): Deleted. |
| (WebCore::findDestroyRootIncludingAnonymous): Deleted. |
| (WebCore::RenderObject::removeFromParentAndDestroyCleaningUpAnonymousWrappers): Deleted. |
| * rendering/RenderObject.h: |
| * rendering/updating/RenderTreeBuilder.cpp: |
| (WebCore::isAnonymousAndSafeToDelete): |
| (WebCore::findDestroyRootIncludingAnonymous): |
| (WebCore::RenderTreeBuilder::removeFromParentAndDestroyCleaningUpAnonymousWrappers): |
| * rendering/updating/RenderTreeBuilder.h: |
| * rendering/updating/RenderTreeUpdater.cpp: |
| (WebCore::RenderTreeUpdater::tearDownRenderers): |
| (WebCore::RenderTreeUpdater::tearDownTextRenderer): |
| |
| 2018-01-31 Ryosuke Niwa <rniwa@webkit.org> |
| |
| Release assertion in Performance::resourceTimingBufferFullTimerFired when the resource timing buffer is shrunk |
| https://bugs.webkit.org/show_bug.cgi?id=182319 |
| <rdar://problem/36904312> |
| |
| Reviewed by Chris Dumez. |
| |
| The crash was caused by a wrong release assertion. Handle author scripts shrinking the resource timing buffer |
| while resourcetimingbufferfull event is being dispatched. |
| |
| Also fixed a bug that a superflous resourcetimingbufferfull event will be fired when new resource timing entries |
| are queued while resourcetimingbufferfull event is being dispatched. |
| |
| Test: http/tests/performance/performance-resource-timing-resourcetimingbufferfull-queue-resource-entry.html |
| http/tests/performance/performance-resource-timing-resourcetimingbufferfull-shrinking-buffer-crash.html |
| |
| * page/Performance.cpp: |
| (WebCore::Performance::resourceTimingBufferFullTimerFired): |
| |
| 2018-01-31 Youenn Fablet <youenn@apple.com> |
| |
| com.apple.WebKit.Storage crashing at com.apple.WebCore: WebCore::SWServerRegistration::removeClientUsingRegistration |
| https://bugs.webkit.org/show_bug.cgi?id=182316 |
| <rdar://problem/37025976> |
| |
| Reviewed by Chris Dumez. |
| |
| SWServer.m_clientToControllingWorker and SWServerRegistration.m_clientsUsingRegistration might currently get out of sync. |
| This is a defensive fix to ensure storage process will not crash in Release. |
| We keep the ASSERT as this probably means there is an abnormal situation that other patches might fix. |
| |
| * workers/service/server/SWServerRegistration.cpp: |
| (WebCore::SWServerRegistration::removeClientUsingRegistration): |
| |
| 2018-01-31 Antoine Quint <graouts@apple.com> |
| |
| [Modern Media Controls] Turn media/modern-media-controls/start-support tests back on |
| https://bugs.webkit.org/show_bug.cgi?id=182297 |
| |
| Reviewed by Jon Lee and Eric Carlson. |
| |
| We identified one cause of flakiness when turning those tests back on and fix it in this patch. There would be |
| cases where the play/pause button would never actually become visible because we would first set it as one of |
| the buttons in the left container in the bottom controls bar before we would identify that we should show the |
| prominent play/pause button, and then once we did, we would add it as a child to the InlineMediaControls. But, |
| because the actual layout of the ButtonsContainer would happen in a rAF due to being a layout() method, we would |
| remove the play/pause button from the InlineMediaControls and set it as a child of the left container even |
| though it wasn't visible. |
| |
| Performing the layout of a ButtonsContainer should really happen immediately when we set the buttons, so in this |
| patch we remove the "buttons" property and clients of ButtonsContainer can simply add or remove children which |
| will be laid out in a row. To support this, we've added two notification methods to LayoutNode, one that indicates |
| when children have changed, didChangeChildren(), which we override in ButtonsContainer to perform a synchronous |
| layout. The other method is willRemoveChild() which we also override in ButtonsContainer, this time to reset |
| the "x" and "visible" properties which we set while performing layout. |
| |
| This fixes flakiness for media/modern-media-controls/start-support/start-support-click-to-start.html, and maybe |
| other modern-media-controls tests that could have been affected by this unexpected behavior. |
| |
| * Modules/modern-media-controls/controls/buttons-container.js: |
| (ButtonsContainer.prototype.willRemoveChild): |
| (ButtonsContainer.prototype.didChangeChildren): |
| (ButtonsContainer.prototype.layout): |
| (ButtonsContainer.prototype.get buttons): Deleted. |
| (ButtonsContainer.prototype.set buttons): Deleted. |
| * Modules/modern-media-controls/controls/inline-media-controls.js: |
| (InlineMediaControls.prototype.layout): |
| (InlineMediaControls.prototype._updateBottomControlsBarLabel): |
| (InlineMediaControls.prototype._addTopRightBarWithMuteButtonToChildren): |
| (InlineMediaControls): |
| * Modules/modern-media-controls/controls/layout-node.js: |
| (LayoutNode.prototype.set children): |
| (LayoutNode.prototype.addChild): |
| (LayoutNode.prototype.removeChild): |
| (LayoutNode.prototype.willRemoveChild): |
| (LayoutNode.prototype.didChangeChildren): |
| * Modules/modern-media-controls/controls/macos-fullscreen-media-controls.js: |
| (MacOSFullscreenMediaControls.prototype.layout): |
| * Modules/modern-media-controls/media/media-controller.js: Drive-by fix to correctly set the value passed as |
| data-auto-hide-delay on a <video> element. |
| |
| 2018-01-31 Zalan Bujtas <zalan@apple.com> |
| |
| [RenderTreeBuilder] Move RenderMultiColumnFlow::resolveMovedChild to RenderTreeBuilder. |
| https://bugs.webkit.org/show_bug.cgi?id=182315 |
| <rdar://problem/37048160> |
| |
| Reviewed by Antti Koivisto. |
| |
| resolveMovedChild() is only called from RenderTreeBuilder. |
| |
| No change in functionality. |
| |
| * rendering/RenderFragmentedFlow.h: |
| * rendering/RenderMultiColumnFlow.cpp: |
| (WebCore::RenderMultiColumnFlow::resolveMovedChild const): Deleted. |
| * rendering/RenderMultiColumnFlow.h: |
| * rendering/updating/RenderTreeBuilder.cpp: |
| (WebCore::RenderTreeBuilder::resolveMovedChildForMultiColumnFlow): |
| * rendering/updating/RenderTreeBuilder.h: |
| * rendering/updating/RenderTreeBuilderBlockFlow.cpp: |
| (WebCore::RenderTreeBuilder::BlockFlow::insertChild): |
| * rendering/updating/RenderTreeBuilderInline.cpp: |
| (WebCore::RenderTreeBuilder::Inline::insertChild): |
| * rendering/updating/RenderTreeBuilderMultiColumn.cpp: |
| (WebCore::RenderTreeBuilder::MultiColumn::resolveMovedChild): |
| * rendering/updating/RenderTreeBuilderMultiColumn.h: |
| |
| 2018-01-31 Philippe Normand <pnormand@igalia.com> |
| |
| [GStreamer] Silent WebAudio buffers support |
| https://bugs.webkit.org/show_bug.cgi?id=143869 |
| |
| Reviewed by Carlos Garcia Campos. |
| |
| * platform/audio/gstreamer/WebKitWebAudioSourceGStreamer.cpp: |
| (webKitWebAudioSrcLoop): Flag silent buffers as GAP buffers. This |
| enables downstream elements to optimize the buffer processing. |
| |
| 2018-01-31 Xabier Rodriguez Calvar <calvaris@igalia.com> |
| |
| [EME] Fix NavigatorEME::tryNextSupportedConfiguration typo |
| https://bugs.webkit.org/show_bug.cgi?id=182324 |
| |
| Reviewed by Žan Doberšek. |
| |
| * Modules/encryptedmedia/NavigatorEME.cpp: |
| (WebCore::tryNextSupportedConfiguration): Fix |
| candidateCofiguration typo. |
| |
| 2018-01-30 Fujii Hironori <Hironori.Fujii@sony.com> |
| |
| [WinCairo] syntheticBoldOffset makes a font with embedded bitmap fonts shown as double strike in HiDPI |
| https://bugs.webkit.org/show_bug.cgi?id=182093 |
| |
| Reviewed by Alex Christensen. |
| |
| WebKit draws texts doubly by shifting 1px for fonts without bold |
| fonts but bold font is desired. This synthetic bold method draws |
| fonts with embedded bitmap fonts look like double strike in HiDPI. |
| |
| No new tests (Covered by the existing tests). |
| |
| * platform/graphics/win/FontCacheWin.cpp: |
| (WebCore::createGDIFont): Overwrite lfWeight if the desired weight |
| is bold and matched font weight is't bold and in WinCairo port. |
| Fix wrong indentation. |
| |
| 2018-01-30 Youenn Fablet <youenn@apple.com> and Oleksandr Skachkov <gskachkov@gmail.com> |
| |
| FetchResponse should support ConsumeData callback on chunk data is received |
| https://bugs.webkit.org/show_bug.cgi?id=181600 |
| <rdar://problem/36932547> |
| |
| Reviewed by Alex Christensen. |
| |
| Test: imported/w3c/web-platform-tests/service-workers/service-worker/fetch-event-respond-with-body-loaded-in-chunk.https.html |
| |
| Apply same read-by-chunk strategy for body coming from network as for body coming from ReadableStream. |
| Refactor to have one consumeBodyReceivedByChunk method for both cases. |
| This allows streaming data from a service worker to WebProcess as would be done by NetworkProcess. |
| |
| * Modules/cache/DOMCache.cpp: |
| (WebCore::DOMCache::addAll): |
| (WebCore::DOMCache::put): |
| * Modules/fetch/FetchResponse.cpp: |
| (WebCore::FetchResponse::BodyLoader::didSucceed): |
| (WebCore::FetchResponse::BodyLoader::didReceiveData): |
| (WebCore::FetchResponse::BodyLoader::consumeDataByChunk): |
| (WebCore::FetchResponse::consumeBody): |
| (WebCore::FetchResponse::consumeBodyReceivedByChunk): |
| * Modules/fetch/FetchResponse.h: |
| * workers/service/context/ServiceWorkerFetch.cpp: |
| (WebCore::ServiceWorkerFetch::processResponse): |
| |
| 2018-01-30 Don Olmstead <don.olmstead@sony.com> |
| |
| JSExports.h should be included as <JavaScriptCore/JSExportMacros.h> |
| https://bugs.webkit.org/show_bug.cgi?id=182312 |
| |
| Reviewed by Michael Catanzaro. |
| |
| No new tests. No change in behavior. |
| |
| * config.h: |
| |
| 2018-01-30 Chris Nardi <cnardi@chromium.org> |
| |
| Use double-quotes when serializing font-feature-settings |
| https://bugs.webkit.org/show_bug.cgi?id=182201 |
| |
| According to the CSSOM spec, all strings should be serialized with double-quotes. The feature |
| tag value was previously serialized with single-quotes; change this to double-quotes to match |
| the spec and non-WebKit browsers. |
| |
| Reviewed by Myles C. Maxfield. |
| |
| Updated css3/font-feature-settings-parsing.html, fast/css/inherited-properties-rare-text.html, |
| and fast/text/font-face-javascript.html. |
| |
| * css/CSSFontFeatureValue.cpp: |
| (WebCore::CSSFontFeatureValue::customCSSText const): |
| |
| 2018-01-30 Brent Fulgham <bfulgham@apple.com> |
| |
| Add telemetry to track storage access API adoption |
| https://bugs.webkit.org/show_bug.cgi?id=182197 |
| <rdar://problem/35803309> |
| |
| Reviewed by Chris Dumez. |
| |
| Part 2: Add telemetry for the Storage Access API case |
| |
| Adds a new convenience method to identify origin/page/frame combinations that |
| have been granted access to the Storage Access API. This is used for debug |
| logging in the NetworkProcess. It is not used in production builds. |
| |
| * platform/network/NetworkStorageSession.h: |
| * platform/network/cf/NetworkStorageSessionCFNet.cpp: |
| (WebCore::NetworkStorageSession::hasStorageAccessForFrame const): Added. |
| |
| 2018-01-30 Ryosuke Niwa <rniwa@webkit.org> |
| |
| Release assert in updateLayout() via AXObjectCache::childrenChanged |
| https://bugs.webkit.org/show_bug.cgi?id=182279 |
| <rdar://problem/36994456> |
| |
| Reviewed by Antti Koivisto. |
| |
| Disable the assertion in Document::updateLayout and Document::updateStyle* in this particular circumstance as fixing it |
| would require a large architectural refactoring of the accessibility code. |
| |
| Test: accessibility/accessibility-object-update-during-style-resolution-crash.html |
| |
| * accessibility/AXObjectCache.cpp: |
| (WebCore::AXObjectCache::childrenChanged): Disabled the release assertion here. |
| * dom/Document.cpp: |
| (WebCore::Document::isSafeToUpdateStyleOrLayout const): Check LayoutAssertionDisableScope::shouldDisable. |
| * dom/ScriptDisallowedScope.h: |
| (WebCore::ScriptDisallowedScope::LayoutAssertionDisableScope): Added. |
| (WebCore::ScriptDisallowedScope::LayoutAssertionDisableScope::LayoutAssertionDisableScope): Added. |
| (WebCore::ScriptDisallowedScope::LayoutAssertionDisableScope::~LayoutAssertionDisableScope): Added. |
| (WebCore::ScriptDisallowedScope::LayoutAssertionDisableScope::shouldDisable): Added. |
| * page/LayoutContext.cpp: |
| (WebCore::LayoutContext::layout): Check LayoutAssertionDisableScope::shouldDisable. |
| |
| 2018-01-30 Zalan Bujtas <zalan@apple.com> |
| |
| [RenderTreeBuilder] Move RenderRubyRun::rubyBaseSafe to RenderTreeBuilder::Ruby |
| https://bugs.webkit.org/show_bug.cgi?id=182306 |
| <rdar://problem/37041440> |
| |
| Reviewed by Antti Koivisto. |
| |
| With all the ruby mutation code moving, only RenderTreeBuilder calls RenderRubyRun::rubyBaseSafe. |
| |
| No change in functionality. |
| |
| * rendering/RenderRubyRun.cpp: |
| (WebCore::RenderRubyRun::rubyText const): |
| (WebCore::RenderRubyRun::rubyBase const): |
| (WebCore::RenderRubyRun::firstLineBlock const): |
| (WebCore::RenderRubyRun::takeChild): |
| (WebCore::RenderRubyRun::rubyBaseSafe): Deleted. |
| * rendering/RenderRubyRun.h: |
| * rendering/updating/RenderTreeBuilderRuby.cpp: |
| (WebCore::RenderTreeBuilder::Ruby::insertChild): |
| (WebCore::RenderTreeBuilder::Ruby::rubyBaseSafe): |
| * rendering/updating/RenderTreeBuilderRuby.h: |
| |
| 2018-01-30 Fujii Hironori <Hironori.Fujii@sony.com> |
| |
| Unified sources for FEMorphology.cpp seems to break the windows build. |
| https://bugs.webkit.org/show_bug.cgi?id=178847 |
| |
| Reviewed by Yusuke Suzuki. |
| |
| Fix a compilation error. |
| platform/graphics/filters/SpotLightSource.cpp(45): error C2027: use of undefined type 'WebCore::FilterEffect' |
| |
| No new tests (No behavior change) |
| |
| * Sources.txt: Removed @no-unify for FEMorphology.cpp. |
| * platform/graphics/filters/SpotLightSource.cpp: Added #include "FilterEffect.h". |
| |
| 2018-01-30 Myles C. Maxfield <mmaxfield@apple.com> |
| |
| Test fix after r227776 |
| https://bugs.webkit.org/show_bug.cgi?id=180951 |
| |
| Unreviewed. |
| |
| * platform/graphics/cocoa/FontCacheCoreText.cpp: |
| (WebCore::mandatoryAttributesForUserInstalledFonts): |
| |
| 2018-01-30 Dean Jackson <dino@apple.com> |
| |
| CrashTracer: com.apple.WebKit.WebContent at WebCore: WebCore::Document::updateStyleIfNeeded |
| https://bugs.webkit.org/show_bug.cgi?id=182299 |
| <rdar://problem/36853088> |
| |
| Removing a misleading comment based on Zalan Bujtas's feedback. |
| |
| * rendering/RenderElement.cpp: |
| (WebCore::RenderElement::repaintForPausedImageAnimationsIfNeeded): |
| |
| 2018-01-30 Dean Jackson <dino@apple.com> |
| |
| CrashTracer: com.apple.WebKit.WebContent at WebCore: WebCore::Document::updateStyleIfNeeded |
| https://bugs.webkit.org/show_bug.cgi?id=182299 |
| <rdar://problem/36853088> |
| |
| Reviewed by Simon Fraser. |
| |
| Mostly speculative fix for the case where a scrollTo moves an |
| animated SVG image into view, causing its animation to restart during |
| a paint operation. This was causing a release ASSERT, so we now defer |
| the resumption of the animation into a timer. |
| |
| Test: svg/animated-svgImage-scroll.html |
| |
| * rendering/RenderElement.cpp: |
| (WebCore::RenderElement::repaintForPausedImageAnimationsIfNeeded): Enqueue the |
| animation if it is an SVGImage. |
| * svg/graphics/SVGImage.cpp: Add a timer to enqueue animation starts. |
| (WebCore::SVGImage::SVGImage): |
| (WebCore::SVGImage::startAnimationTimerFired): |
| (WebCore::SVGImage::enqueueStartAnimation): |
| (WebCore::SVGImage::stopAnimation): |
| * svg/graphics/SVGImage.h: |
| |
| 2018-01-30 Chris Dumez <cdumez@apple.com> |
| |
| Service worker registration soft updates happen too frequently |
| https://bugs.webkit.org/show_bug.cgi?id=182296 |
| <rdar://problem/37031862> |
| |
| Reviewed by Youenn Fablet. |
| |
| Move code that updates the registration's last update check time from after |
| the script bytecheck to before, as per: |
| - https://w3c.github.io/ServiceWorker/#update (step 7.19) |
| |
| This way, the last update check time gets updated even if the newly fetched |
| script is identical to the previous one, which is the common case. |
| |
| * workers/service/server/SWServer.cpp: |
| (WebCore::SWServer::updateWorker): |
| * workers/service/server/SWServerJobQueue.cpp: |
| (WebCore::SWServerJobQueue::scriptFetchFinished): |
| |
| 2018-01-30 Zalan Bujtas <zalan@apple.com> |
| |
| [RenderTreeBuilder] Move childBecameNonInline to RenderTreeBuilder |
| https://bugs.webkit.org/show_bug.cgi?id=182265 |
| <rdar://problem/37004459> |
| |
| Reviewed by Antti Koivisto. |
| |
| Move the mutation code that wraps/unwraps a child element when its flow state changes |
| from(to) in-flow to(from) floating/out-of-flow. |
| |
| No change in functionality. |
| |
| * rendering/RenderBlock.cpp: |
| (WebCore::RenderBlock::childBecameNonInline): Deleted. |
| * rendering/RenderBlock.h: |
| * rendering/RenderBoxModelObject.h: |
| (WebCore::RenderBoxModelObject::childBecameNonInline): Deleted. |
| * rendering/RenderElement.cpp: |
| (WebCore::RenderElement::styleDidChange): |
| (WebCore::RenderElement::handleDynamicFloatPositionChange): Deleted. |
| * rendering/RenderInline.cpp: |
| (WebCore::RenderInline::childBecameNonInline): Deleted. |
| * rendering/RenderInline.h: |
| * rendering/updating/RenderTreeBuilder.cpp: |
| (WebCore::RenderTreeBuilder::childFlowStateChangesAndAffectsParentBlock): |
| (WebCore::RenderTreeBuilder::splitFlow): Deleted. |
| * rendering/updating/RenderTreeBuilder.h: |
| * rendering/updating/RenderTreeBuilderBlock.cpp: |
| (WebCore::RenderTreeBuilder::Block::childBecameNonInline): |
| * rendering/updating/RenderTreeBuilderBlock.h: |
| * rendering/updating/RenderTreeBuilderInline.cpp: |
| (WebCore::RenderTreeBuilder::Inline::childBecameNonInline): |
| * rendering/updating/RenderTreeBuilderInline.h: |
| |
| 2018-01-30 Brent Fulgham <bfulgham@apple.com> |
| |
| Add telemetry to track storage access API adoption |
| https://bugs.webkit.org/show_bug.cgi?id=182197 |
| <rdar://problem/35803309> |
| |
| Reviewed by Chris Dumez. |
| |
| Partial roll-out of r227755. |
| |
| The original patch assumed the WebContent process kept track of user interaction. This is |
| only tracked in the UIProcess, so we can get rid of some of the logging code adding in |
| r227755. |
| |
| * loader/ResourceLoadObserver.cpp: |
| (WebCore::ResourceLoadObserver::logFrameNavigation): |
| (WebCore::ResourceLoadObserver::logSubresourceLoading): |
| (WebCore::ResourceLoadObserver::setTimeToLivePartitionFree): Deleted. |
| (WebCore::ResourceLoadObserver::wasAccessedWithinInteractionWindow const): Deleted. |
| * loader/ResourceLoadObserver.h: |
| |
| 2018-01-30 Chris Dumez <cdumez@apple.com> |
| |
| Make sure we never create a WebSWClientConnection with an invalid sessionID |
| https://bugs.webkit.org/show_bug.cgi?id=182276 |
| <rdar://problem/36582633> |
| |
| Reviewed by Alex Christensen. |
| |
| Make sure we never create a WebSWClientConnection with an invalid sessionID as this |
| could corrupt our hash tables. |
| |
| * dom/Document.cpp: |
| (WebCore::Document::privateBrowsingStateDidChange): |
| * workers/service/ServiceWorker.cpp: |
| (WebCore::ServiceWorker::postMessage): |
| * workers/service/ServiceWorkerContainer.cpp: |
| (WebCore::ServiceWorkerContainer::ready): |
| (WebCore::ServiceWorkerContainer::getRegistration): |
| (WebCore::ServiceWorkerContainer::didFinishGetRegistrationRequest): |
| (WebCore::ServiceWorkerContainer::getRegistrations): |
| (WebCore::ServiceWorkerContainer::didFinishGetRegistrationsRequest): |
| (WebCore::ServiceWorkerContainer::jobResolvedWithRegistration): |
| (WebCore::ServiceWorkerContainer::ensureSWClientConnection): |
| |
| 2018-01-30 Antti Koivisto <antti@apple.com> |
| |
| Avoid traversing too much when doing class change invalidation |
| https://bugs.webkit.org/show_bug.cgi?id=181604 |
| |
| Reviewed by Zalan Bujtas. |
| |
| We are now collecting information about which part of the tree a change in class can potentially affect. |
| Use the information to traverse only the required elements in Style::Invalidator. |
| |
| The same mechanism can be later used for attribute and id change invalidation. |
| |
| * css/DocumentRuleSets.cpp: |
| (WebCore::DocumentRuleSets::collectFeatures const): |
| (WebCore::DocumentRuleSets::classInvalidationRuleSets const): |
| (WebCore::DocumentRuleSets::subjectClassRules const): Deleted. |
| (WebCore::DocumentRuleSets::ancestorClassRules const): Deleted. |
| |
| Remove separate subject and ancestor invalidation RuleSets. Instead collect all invalidation rulesets |
| to a vector along with their MatchElements. |
| |
| * css/DocumentRuleSets.h: |
| * css/RuleFeature.cpp: |
| (WebCore::RuleFeatureSet::computeNextMatchElement): |
| (WebCore::RuleFeatureSet::computeSubSelectorMatchElement): |
| (WebCore::RuleFeatureSet::collectFeatures): |
| |
| Similarly collect all class invalidation RuleFeatures to a general HashMap along with the MatchElement. |
| |
| (WebCore::RuleFeatureSet::add): |
| (WebCore::RuleFeatureSet::clear): |
| (WebCore::RuleFeatureSet::shrinkToFit): |
| * css/RuleFeature.h: |
| (WebCore::RuleFeature::RuleFeature): |
| * style/ClassChangeInvalidation.cpp: |
| (WebCore::Style::ClassChangeInvalidation::computeInvalidation): |
| |
| Find out InvalidationRuleSets to use. |
| |
| (WebCore::Style::ClassChangeInvalidation::invalidateStyleWithRuleSets): |
| |
| Pass them to Style::Invalidator. |
| |
| * style/ClassChangeInvalidation.h: |
| * style/StyleInvalidator.cpp: |
| (WebCore::Style::Invalidator::invalidateStyleForTree): |
| (WebCore::Style::Invalidator::invalidateStyleForDescendants): |
| (WebCore::Style::Invalidator::invalidateStyleWithMatchElement): |
| |
| Traverse only the part of the tree needed by the given MatchElement. |
| |
| * style/StyleInvalidator.h: |
| * style/StyleSharingResolver.cpp: |
| (WebCore::Style::SharingResolver::classNamesAffectedByRules const): |
| |
| 2018-01-30 Javier Fernandez <jfernandez@igalia.com> |
| |
| [css-align] The 'baseline' value must be invalid for the 'justify-content' property |
| https://bugs.webkit.org/show_bug.cgi?id=181794 |
| |
| Reviewed by Antti Koivisto. |
| |
| The CSS WG has resolved that it doesn't make sense to define Baseline |
| Content-Alignment in the inline/main axis. |
| |
| https://github.com/w3c/csswg-drafts/issues/1184 |
| |
| The spec has been updated so that <baseline-postion> is not valid for |
| the 'justify-content' property's syntax. This CL updates our parsing |
| logic to match the new spec, including the parsing logic of the |
| place-content shorthand. |
| |
| Additionally, this CL updates the computed value of the |
| <baseline-position> values to match other browsers. |
| |
| We don't implement support for <baseline-position> values in the |
| Content Distribution properties (align-content and justify-content), |
| so I don't expect this change to break content of sites using the CSS |
| Box Alignment feature. |
| |
| No new tests, just adapt the Web Platform Tests we already have to the new CSS syntax. |
| |
| * css/parser/CSSPropertyParser.cpp: |
| (WebCore::getBaselineKeyword): |
| (WebCore::consumeBaselineKeyword): |
| (WebCore::consumeContentDistributionOverflowPosition): |
| (WebCore::consumeSelfPositionOverflowPosition): |
| (WebCore::CSSPropertyParser::parseSingleValue): |
| (WebCore::consumeSimplifiedContentPosition): |
| (WebCore::CSSPropertyParser::consumePlaceContentShorthand): |
| (WebCore::consumeSimplifiedItemPosition): |
| |
| 2018-01-30 Basuke Suzuki <Basuke.Suzuki@sony.com> |
| |
| [WinCairo] Fix forwarding header conflict of WebKit on WinCairo |
| https://bugs.webkit.org/show_bug.cgi?id=177202 |
| |
| Reviewed by Alex Christensen. |
| |
| * PlatformWin.cmake: |
| |
| 2018-01-30 Myles C. Maxfield <mmaxfield@apple.com> |
| |
| A disallowed user-installed font may be used if its PostScript name is specified |
| https://bugs.webkit.org/show_bug.cgi?id=180951 |
| |
| Reviewed by Brent Fulgham. |
| |
| This patch adds a new CoreText font attribute, kCTFontFallbackOptionAttribute, to the |
| fonts which WebKit creates. It also adds this attribute to web fonts, so that font |
| fallback will happen according to our rules about user-installed fonts. It also marks |
| these font attributes as "mandatory" so CoreText will be guaranteed to follow the |
| policy. |
| |
| Test: fast/text/user-installed-fonts/disable.html |
| |
| * platform/graphics/FontCache.h: |
| (WebCore::FontDescriptionKey::makeFlagsKey): |
| * platform/graphics/cocoa/FontCacheCoreText.cpp: |
| (WebCore::FontDatabase::collectionForFamily): |
| (WebCore::FontDatabase::fontForPostScriptName): |
| (WebCore::addAttributesForUserInstalledFonts): |
| (WebCore::mandatoryAttributesForUserInstalledFonts): |
| * platform/graphics/mac/FontCustomPlatformData.cpp: |
| (WebCore::FontCustomPlatformData::fontPlatformData): |
| |
| 2018-01-29 Youenn Fablet <youenn@apple.com> |
| |
| Cache API should make sure to resolve caches.open promises in the same order as called |
| https://bugs.webkit.org/show_bug.cgi?id=182193 |
| <rdar://problem/36930363> |
| |
| Reviewed by Chris Dumez. |
| |
| Covered by LayoutTests/http/wpt/cache-storage/cache-open-delete-in-parallel.https.html. |
| |
| * Modules/cache/DOMCacheStorage.cpp: |
| (WebCore::DOMCacheStorage::doRemove): Removed optimization consisting in removing the cache from DOMCacheStorage object synchronously. |
| This optimization prevents going to the network process to try deleting the cache. |
| |
| 2018-01-29 Jiewen Tan <jiewen_tan@apple.com> |
| |
| [WebAuthN] Add a compile-time feature flag |
| https://bugs.webkit.org/show_bug.cgi?id=182211 |
| <rdar://problem/36936365> |
| |
| Reviewed by Brent Fulgham. |
| |
| Add a compile-time feature flag for WebAuthN as most of the functionality is platform |
| dependent. |
| |
| No tests. |
| |
| * Configurations/FeatureDefines.xcconfig: |
| * Modules/credentialmanagement/BasicCredential.cpp: |
| * Modules/credentialmanagement/BasicCredential.h: |
| * Modules/credentialmanagement/BasicCredential.idl: |
| * Modules/credentialmanagement/CredentialCreationOptions.h: |
| * Modules/credentialmanagement/CredentialCreationOptions.idl: |
| * Modules/credentialmanagement/CredentialRequestOptions.h: |
| * Modules/credentialmanagement/CredentialRequestOptions.idl: |
| * Modules/credentialmanagement/CredentialsContainer.cpp: |
| * Modules/credentialmanagement/CredentialsContainer.h: |
| * Modules/credentialmanagement/CredentialsContainer.idl: |
| * Modules/credentialmanagement/NavigatorCredentials.cpp: |
| * Modules/credentialmanagement/NavigatorCredentials.h: |
| * Modules/credentialmanagement/NavigatorCredentials.idl: |
| * Modules/webauthn/Authenticator.cpp: |
| * Modules/webauthn/Authenticator.h: |
| * Modules/webauthn/AuthenticatorAssertionResponse.cpp: |
| * Modules/webauthn/AuthenticatorAssertionResponse.h: |
| * Modules/webauthn/AuthenticatorAssertionResponse.idl: |
| * Modules/webauthn/AuthenticatorAttestationResponse.cpp: |
| * Modules/webauthn/AuthenticatorAttestationResponse.h: |
| * Modules/webauthn/AuthenticatorAttestationResponse.idl: |
| * Modules/webauthn/AuthenticatorResponse.cpp: |
| * Modules/webauthn/AuthenticatorResponse.h: |
| * Modules/webauthn/AuthenticatorResponse.idl: |
| * Modules/webauthn/PublicKeyCredential.cpp: |
| * Modules/webauthn/PublicKeyCredential.h: |
| * Modules/webauthn/PublicKeyCredential.idl: |
| * Modules/webauthn/PublicKeyCredentialCreationOptions.h: |
| * Modules/webauthn/PublicKeyCredentialCreationOptions.idl: |
| * Modules/webauthn/PublicKeyCredentialDescriptor.h: |
| * Modules/webauthn/PublicKeyCredentialDescriptor.idl: |
| * Modules/webauthn/PublicKeyCredentialRequestOptions.h: |
| * Modules/webauthn/PublicKeyCredentialRequestOptions.idl: |
| * Modules/webauthn/PublicKeyCredentialType.h: |
| * Modules/webauthn/PublicKeyCredentialType.idl: |
| * bindings/js/JSAuthenticatorResponseCustom.cpp: |
| * bindings/js/JSBasicCredentialCustom.cpp: |
| |
| 2018-01-29 John Wilander <wilander@apple.com> |
| |
| Resource Load Statistics: Introduce debug mode as experimental feature |
| https://bugs.webkit.org/show_bug.cgi?id=182199 |
| <rdar://problem/36930364> |
| |
| Reviewed by Alex Christensen. |
| |
| No new tests. This adds an experimental feature. |
| |
| The only changes to default behavior are: |
| - Increased resolution on timestamps which is needed to be able to set shorter |
| timeouts in debug mode. |
| - Only update partitioning and blocking table when needed. This is an optimization |
| which pays off in less XPC with shorter timeouts. |
| |
| * loader/ResourceLoadObserver.cpp: |
| (WebCore::reduceTimeResolution): |
| (WebCore::ResourceLoadObserver::logFrameNavigation): |
| (WebCore::ResourceLoadObserver::logSubresourceLoading): |
| (WebCore::ResourceLoadObserver::logWebSocketLoading): |
| (WebCore::ResourceLoadObserver::logUserInteractionWithReducedTimeResolution): |
| (WebCore::reduceToHourlyTimeResolution): Deleted. |
| * page/RuntimeEnabledFeatures.h: |
| (WebCore::RuntimeEnabledFeatures::setResourceLoadStatisticsDebugMode): |
| (WebCore::RuntimeEnabledFeatures::resourceLoadStatisticsDebugMode const): |
| * page/Settings.yaml: |
| |
| 2018-01-29 Oleksandr Skachkov <gskachkov@gmail.com> |
| |
| FetchResponse should support ConsumeData callback on chunk data is received: handling ReadableStream bodies |
| https://bugs.webkit.org/show_bug.cgi?id=182008 |
| |
| Reviewed by Youenn Fablet. |
| |
| Modify FetchResponse to support ConsumeData callback with |
| handling of ReadableStream by chunks |
| |
| * Modules/cache/DOMCache.cpp: |
| (WebCore::DOMCache::put): |
| * Modules/fetch/FetchBodyConsumer.cpp: |
| (WebCore::FetchBodyConsumer::resolve): |
| * Modules/fetch/FetchResponse.cpp: |
| (WebCore::FetchResponse::consumeBodyFromReadableStream): |
| * Modules/fetch/FetchResponse.h: |
| * Modules/streams/ReadableStreamChunk.h: Added. |
| * Modules/streams/ReadableStreamSink.cpp: |
| (WebCore::ReadableStreamToSharedBufferSink::enqueue): |
| (WebCore::ReadableStreamToSharedBufferSink::close): |
| * Modules/streams/ReadableStreamSink.h: |
| * WebCore.xcodeproj/project.pbxproj: |
| * workers/service/context/ServiceWorkerFetch.cpp: |
| (WebCore::ServiceWorkerFetch::processResponse): |
| |
| 2018-01-29 Andy Estes <aestes@apple.com> |
| |
| [iOS] Restrict synthetic clicks to the origin that handled the underlying touch event |
| https://bugs.webkit.org/show_bug.cgi?id=182252 |
| <rdar://problem/21555881> |
| |
| Reviewed by Tim Horton. |
| |
| Test: http/tests/events/touch/ios/cross-frame-single-tap-same-origin.https.html |
| |
| * dom/Document.h: |
| (WebCore::Document::handlingTouchEvent const): |
| * page/EventHandler.h: |
| (WebCore::EventHandler::touchEventTargetSubframe const): |
| (WebCore::EventHandler::touches const): |
| |
| Exposed some information needed by WebPage::updatePotentialTapSecurityOrigin(). |
| |
| * page/Frame.h: |
| * page/ios/FrameIOS.mm: |
| (WebCore::Frame::betterApproximateNode): |
| (WebCore::Frame::qualifyingNodeAtViewportLocation): |
| |
| Changed NodeQualifier from a function pointer to a WTF::Function. |
| |
| (WebCore::Frame::nodeRespondingToClickEvents): |
| |
| Turned ancestorRespondingToClickEvents() into a lambda that captures originRestriction. In |
| the lambda, if there is an origin restriction, return nullptr if the hit test result's inner |
| Node is not in the restricted origin. |
| |
| (WebCore::Frame::nodeRespondingToScrollWheelEvents): |
| |
| Turned ancestorRespondingToScrollWheelEvents() into a lambda. |
| |
| (WebCore::ancestorRespondingToScrollWheelEvents): |
| |
| Moved to lambda in nodeRespondingToScrollWheelEvents(). |
| |
| (WebCore::ancestorRespondingToClickEvents): |
| |
| Moved to lambda in nodeRespondingToClickEvents(). |
| |
| 2018-01-29 Emilio Cobos Álvarez <emilio@crisal.io> |
| |
| Trivially cleanup std::optional usage in RenderBlockFlow. |
| https://bugs.webkit.org/show_bug.cgi?id=182142 |
| |
| Reviewed by Antti Koivisto. |
| |
| No new tests, no behavior change. |
| |
| * rendering/RenderBlockFlow.cpp: |
| (WebCore::RenderBlockFlow::firstLineBaseline const): |
| (WebCore::RenderBlockFlow::inlineBlockBaseline const): |
| |
| 2018-01-29 Brent Fulgham <bfulgham@apple.com> |
| |
| Add telemetry to track storage access API adoption |
| https://bugs.webkit.org/show_bug.cgi?id=182197 |
| <rdar://problem/35803309> |
| |
| Reviewed by Chris Dumez. |
| |
| Part 1: Add telemetry for the user interaction case |
| |
| This patch adds telemetry to track how frequently third-party cookies are |
| used in a first party context due to user interaction. This will help |
| understand cases where the new Storage Access API can help, and to help |
| us understand if we have considered relevant use cases in its design. |
| |
| * loader/ResourceLoadObserver.cpp: |
| (WebCore::ResourceLoadObserver::setTimeToLivePartitionFree): Let the observer |
| know the first party interaction duration. |
| (WebCore::ResourceLoadObserver::wasAccessedWithinInteractionWindow const): Added. |
| (WebCore::ResourceLoadObserver::logFrameNavigation): Note when a third party |
| resource is accessed as a first party due to user interaction. |
| (WebCore::ResourceLoadObserver::logSubresourceLoading): Ditto. |
| * loader/ResourceLoadObserver.h: |
| * loader/ResourceLoadStatistics.cpp: |
| (WebCore::ResourceLoadStatistics::encode const): Handle new fields. |
| (WebCore::ResourceLoadStatistics::decode): Ditto. |
| * loader/ResourceLoadStatistics.h: |
| |
| 2018-01-29 Antti Koivisto <antti@apple.com> |
| |
| CalcExpressionBlendLength::evaluate hits stack limit |
| https://bugs.webkit.org/show_bug.cgi?id=182243 |
| |
| Reviewed by Zalan Bujtas. |
| |
| Speculative fix to prevent nesting of CalcExpressionBlendLength. |
| |
| No test, don't know how to make one. |
| |
| * platform/CalculationValue.cpp: |
| (WebCore::CalcExpressionBlendLength::CalcExpressionBlendLength): |
| |
| CalcExpressionBlendLength is only used in Length values of animated style. Normally such styles are not used |
| as input for further blending but there are some paths where this could in principle happen. Repeated |
| application (for each animation frame) could construct CalcExpressionBlendLength expression that blows |
| the stack when evaluated. |
| |
| Speculatively fix by flattening any nesting. |
| |
| * platform/CalculationValue.h: |
| (WebCore::CalcExpressionBlendLength::CalcExpressionBlendLength): Deleted. |
| |
| 2018-01-29 Chris Dumez <cdumez@apple.com> |
| |
| Drop unnecessary "ServiceWorker Task Thread" in SWServer |
| https://bugs.webkit.org/show_bug.cgi?id=182253 |
| |
| Reviewed by Youenn Fablet. |
| |
| Drop unnecessary "ServiceWorker Task Thread" in SWServer. We're spinning a thread for |
| each SWServer that is never used. |
| |
| * workers/service/server/SWServer.cpp: |
| (WebCore::SWServer::~SWServer): |
| (WebCore::SWServer::SWServer): |
| (WebCore::SWServer::taskThreadEntryPoint): Deleted. |
| (WebCore::SWServer::postTask): Deleted. |
| (WebCore::SWServer::postTaskReply): Deleted. |
| (WebCore::SWServer::handleTaskRepliesOnMainThread): Deleted. |
| * workers/service/server/SWServer.h: |
| |
| 2018-01-29 Matt Lewis <jlewis3@apple.com> |
| |
| Unreviewed, rolling out r227731. |
| |
| This caused and assertion failure in API tests. |
| |
| Reverted changeset: |
| |
| "Layout Test fast/events/beforeunload-dom-manipulation- |
| crash.html is crashing" |
| https://bugs.webkit.org/show_bug.cgi?id=181204 |
| https://trac.webkit.org/changeset/227731 |
| |
| 2018-01-29 Brady Eidson <beidson@apple.com> |
| |
| Make it possible for apps that use both WK1 and WK2 to use MessagePorts. |
| https://bugs.webkit.org/show_bug.cgi?id=182229 |
| |
| Reviewed by Chris Dumez. |
| |
| Covered by existing LayoutTests and a new API test. |
| |
| * dom/messageports/MessagePortChannel.cpp: |
| (WebCore::MessagePortChannel::checkRemotePortForActivity): Don't use the global singleton |
| provider. Instead use the provider that belongs to the owning registry. |
| |
| * dom/messageports/MessagePortChannelProviderImpl.cpp: |
| (WebCore::MessagePortChannelProviderImpl::MessagePortChannelProviderImpl): Pass a reference |
| to *this to the Registry. |
| * dom/messageports/MessagePortChannelProviderImpl.h: |
| |
| * dom/messageports/MessagePortChannelRegistry.cpp: |
| (WebCore::MessagePortChannelRegistry::MessagePortChannelRegistry): Keep a Provider member so |
| MessagePortChannels can get to it instead of relying on the global singleton provider. |
| * dom/messageports/MessagePortChannelRegistry.h: |
| (WebCore::MessagePortChannelRegistry::provider): |
| |
| 2018-01-29 Per Arne Vollan <pvollan@apple.com> |
| |
| Layout Test fast/events/beforeunload-dom-manipulation-crash.html is crashing |
| https://bugs.webkit.org/show_bug.cgi?id=181204 |
| <rdar://problem/36256274> |
| |
| Reviewed by Ryosuke Niwa. |
| |
| When a frame element is moved in the DOM tree during the execution of a beforeunload handler, |
| the frame will be detached when removed from its previous position in the DOM tree. When being |
| detached, an attempt will also be made to stop the load by calling FrameLoader::stopAllLoaders(). |
| However, this method will return early when executed in a beforeunload handler, since navigation |
| is not allowed then. The end result is a detached frame which will continue to load, and hitting |
| asserts in DocumentLoader::dataReceived(), and DocumentLoader::notifyFinished(). It should be |
| possible to stop a frame load, even when executing a beforeunload handler. |
| |
| No new tests. Covered by the existing test fast/events/beforeunload-dom-manipulation-crash.html. |
| |
| * loader/FrameLoader.cpp: |
| (WebCore::FrameLoader::isStopLoadingAllowed const): |
| (WebCore::FrameLoader::stopAllLoaders): |
| * loader/FrameLoader.h: |
| |
| 2018-01-29 Miguel Gomez <magomez@igalia.com> |
| |
| [CoordnatedGraphics] A child layer of a semitransparent layer isn't clipped properly |
| https://bugs.webkit.org/show_bug.cgi?id=181080 |
| |
| Reviewed by Žan Doberšek. |
| |
| Check whether the applied clipping area is empty before drawing the children of a TextureMapperLayer. If |
| the area is empty no children will be drawn, so we can avoid drawing them. |
| |
| No new tests -- no change in behavior. |
| |
| * platform/graphics/texmap/TextureMapperLayer.cpp: |
| (WebCore::TextureMapperLayer::paintSelfAndChildren): |
| |
| 2018-01-29 Zan Dobersek <zdobersek@igalia.com> |
| |
| [Cairo] Add GraphicsContextImplCairo::createFactory() helpers |
| https://bugs.webkit.org/show_bug.cgi?id=182238 |
| |
| Reviewed by Carlos Garcia Campos. |
| |
| Instead of duplicating lambdas that return a newly-created |
| GraphicsContextImplCairo object, provide static createFactory() helpers |
| on that class that produce GraphicsContextImplFactory wrappers which are |
| then invoked in the GraphicsContext constructor. The static functions |
| accept either the PlatformContextCairo reference or the cairo_t pointer, |
| invoking the proper GraphicsContextImplCairo constructor in the returned |
| lambda wrapper. |
| |
| No new tests -- no change in functionality. |
| |
| * platform/graphics/cairo/GraphicsContextImplCairo.cpp: |
| (WebCore::GraphicsContextImplCairo::createFactory): |
| * platform/graphics/cairo/GraphicsContextImplCairo.h: |
| * platform/graphics/cairo/ImageBufferCairo.cpp: |
| (WebCore::ImageBuffer::ImageBuffer): |
| * platform/graphics/cairo/PathCairo.cpp: |
| (WebCore::Path::strokeBoundingRect const): |
| (WebCore::Path::strokeContains const): |
| * platform/graphics/nicosia/NicosiaPaintingContextCairo.cpp: |
| (Nicosia::PaintingContextCairo::PaintingContextCairo): |
| * platform/graphics/win/ImageCairoWin.cpp: |
| (WebCore::BitmapImage::getHBITMAPOfSize): |
| |
| 2018-01-29 Zan Dobersek <zdobersek@igalia.com> |
| |
| Construct GraphicsContext with NonPaintingReasons::NoReason in FrameView::adjustPageHeightDeprecated() |
| https://bugs.webkit.org/show_bug.cgi?id=182235 |
| |
| Reviewed by Carlos Garcia Campos. |
| |
| Pass the NonPaintingReasons::NoReason value to the GraphicsContext |
| constructor in FrameView::adjustPageHeightDeprecated(). This has the |
| same effect as when passing a null PlatformGraphicsContext to the |
| constructor, which effectively disables any painting through that |
| GraphicsContext, but doesn't have a platform-specific connotation. |
| |
| No new tests -- no change in functionality. |
| |
| * page/FrameView.cpp: |
| (WebCore::FrameView::adjustPageHeightDeprecated): |
| |
| 2018-01-29 Zan Dobersek <zdobersek@igalia.com> |
| |
| [Cairo] Remove the GraphicsContext(cairo_t*) constructor |
| https://bugs.webkit.org/show_bug.cgi?id=182234 |
| |
| Reviewed by Carlos Garcia Campos. |
| |
| Instead of using the GraphicsContext(cairo_t*) constructor, leverage the |
| GraphicsContextImplCairo class and work with an existing Cairo context |
| through that GraphicsContextImpl implementation. |
| |
| A new GraphicsContextImplCairo constructor is added, expecting pointer |
| to the cairo_t object. With that, a PlatformContextCairo object is |
| created, with ownership of that object now being handled by the |
| GraphicsContextImplCairo class. |
| |
| Call sites of the GraphicsContext(cairo_t*) constructor are adjusted to |
| instead provide a factory function that returns a fresh |
| GraphicsContextImplCairo object, passing that cairo_t object to its |
| constructor. |
| |
| No new tests -- no change in behavior. |
| |
| * platform/graphics/GraphicsContext.h: |
| * platform/graphics/cairo/GraphicsContextCairo.cpp: |
| (WebCore::GraphicsContext::GraphicsContext): Deleted. |
| * platform/graphics/cairo/GraphicsContextImplCairo.cpp: |
| (WebCore::GraphicsContextImplCairo::GraphicsContextImplCairo): |
| (WebCore::m_private): |
| * platform/graphics/cairo/GraphicsContextImplCairo.h: |
| * platform/graphics/cairo/PathCairo.cpp: |
| (WebCore::Path::strokeBoundingRect const): |
| (WebCore::Path::strokeContains const): |
| * platform/graphics/win/ImageCairoWin.cpp: |
| (WebCore::BitmapImage::getHBITMAPOfSize): |
| |
| 2018-01-28 Minsheng Liu <lambda@liu.ms> |
| |
| Overflow of formulas is hidden for display mathematics |
| https://bugs.webkit.org/show_bug.cgi?id=160547 |
| |
| Reviewed by Frédéric Wang. |
| |
| Previously, <math> with display="block" uses its container's logical width as logical width. |
| However, that behavior will truncate overflowed contents. The patch fixes it by setting |
| the logical width as its content width rather than its container's logical width |
| if the former is wider than the latter. |
| |
| Test: mathml/presentation/display-math-horizontal-overflow.html |
| |
| * rendering/mathml/RenderMathMLRow.cpp: |
| (WebCore::RenderMathMLRow::layoutBlock): |
| |
| 2018-01-26 Antoine Quint <graouts@apple.com> |
| |
| [Web Animations] Distinguish between an omitted and a null timeline argument to the Animation constructor |
| https://bugs.webkit.org/show_bug.cgi?id=179065 |
| <rdar://problem/36869046> |
| |
| Reviewed by Dean Jackson. |
| |
| The Web Animations specification requires that a missing or undefined "timeline" parameter means that the |
| document's timeline should be used, but a null value should be supported. To support this, we need to provide |
| a custom Animation constructor where we can check on the ExecState whether the second argument passed is |
| undefined, which is true if an explicit "undefined" value is passed or if the argument does not exist. |
| |
| * Sources.txt: Add the new JSWebAnimationCustom.cpp file. |
| * WebCore.xcodeproj/project.pbxproj: Add the new JSWebAnimationCustom.cpp file. |
| * animation/WebAnimation.cpp: |
| (WebCore::WebAnimation::create): Add a create() variant that doesn't provide an AnimationTimeline parameter |
| to clearly indicate that the provided Document's timeline should be used. |
| * animation/WebAnimation.h: |
| * animation/WebAnimation.idl: |
| * bindings/js/JSWebAnimationCustom.cpp: Added. |
| (WebCore::constructJSWebAnimation): Provide a custom Animation constructor where we check whether the second |
| argument, the timeline, is undefined. |
| * dom/Element.cpp: |
| (WebCore::Element::animate): Use the new create() variant since passing "nullptr" now means a null timeline. |
| |
| 2018-01-26 Ricky Mondello <rmondello@apple.com> |
| |
| Use the standard -webkit-autofill color on iOS |
| https://bugs.webkit.org/show_bug.cgi?id=182182 |
| |
| Reviewed by Tim Horton. |
| |
| * css/html.css: |
| (input:-webkit-autofill, input:-webkit-autofill-strong-password): |
| |
| 2018-01-26 Dean Jackson <dino@apple.com> |
| |
| REGRESSION (r222961): Clear function not clearing whole screen when antialias is set to false |
| https://bugs.webkit.org/show_bug.cgi?id=179368 |
| <rdar://problem/36111549> |
| |
| Reviewed by Sam Weinig. |
| |
| When we changed from using a CAOpenGLLayer to a regular CALayer, we should |
| have also swapped the "opaque" property to "contentsOpaque". |
| |
| Covered by the existing test: fast/canvas/webgl/context-attributes-alpha.html |
| (when run on some hardware!) |
| |
| * platform/graphics/cocoa/WebGLLayer.mm: |
| (-[WebGLLayer initWithGraphicsContext3D:]): |
| |
| 2018-01-26 Mark Lam <mark.lam@apple.com> |
| |
| Add infrastructure for pointer preparation. |
| https://bugs.webkit.org/show_bug.cgi?id=182191 |
| <rdar://problem/36889194> |
| |
| Reviewed by JF Bastien. |
| |
| No new tests because this patch does not introduce any behavior change. |
| |
| * bindings/scripts/CodeGeneratorJS.pm: |
| (GenerateImplementation): |
| * bindings/scripts/test/JS/JSInterfaceName.cpp: |
| (WebCore::toJSNewlyCreated): |
| * bindings/scripts/test/JS/JSMapLike.cpp: |
| (WebCore::toJSNewlyCreated): |
| * bindings/scripts/test/JS/JSReadOnlyMapLike.cpp: |
| (WebCore::toJSNewlyCreated): |
| * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp: |
| (WebCore::toJSNewlyCreated): |
| * bindings/scripts/test/JS/JSTestCEReactions.cpp: |
| (WebCore::toJSNewlyCreated): |
| * bindings/scripts/test/JS/JSTestCEReactionsStringifier.cpp: |
| (WebCore::toJSNewlyCreated): |
| * bindings/scripts/test/JS/JSTestCallTracer.cpp: |
| (WebCore::toJSNewlyCreated): |
| * bindings/scripts/test/JS/JSTestClassWithJSBuiltinConstructor.cpp: |
| (WebCore::toJSNewlyCreated): |
| * bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.cpp: |
| (WebCore::toJSNewlyCreated): |
| * bindings/scripts/test/JS/JSTestDOMJIT.cpp: |
| * bindings/scripts/test/JS/JSTestEnabledBySetting.cpp: |
| (WebCore::toJSNewlyCreated): |
| * bindings/scripts/test/JS/JSTestEventConstructor.cpp: |
| (WebCore::toJSNewlyCreated): |
| * bindings/scripts/test/JS/JSTestEventTarget.cpp: |
| (WebCore::toJSNewlyCreated): |
| * bindings/scripts/test/JS/JSTestException.cpp: |
| (WebCore::toJSNewlyCreated): |
| * bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp: |
| (WebCore::toJSNewlyCreated): |
| * bindings/scripts/test/JS/JSTestGlobalObject.cpp: |
| (WebCore::toJSNewlyCreated): |
| * bindings/scripts/test/JS/JSTestIndexedSetterNoIdentifier.cpp: |
| (WebCore::toJSNewlyCreated): |
| * bindings/scripts/test/JS/JSTestIndexedSetterThrowingException.cpp: |
| (WebCore::toJSNewlyCreated): |
| * bindings/scripts/test/JS/JSTestIndexedSetterWithIdentifier.cpp: |
| (WebCore::toJSNewlyCreated): |
| * bindings/scripts/test/JS/JSTestInterface.cpp: |
| * bindings/scripts/test/JS/JSTestInterfaceLeadingUnderscore.cpp: |
| * bindings/scripts/test/JS/JSTestIterable.cpp: |
| (WebCore::toJSNewlyCreated): |
| * bindings/scripts/test/JS/JSTestJSBuiltinConstructor.cpp: |
| * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp: |
| (WebCore::toJSNewlyCreated): |
| * bindings/scripts/test/JS/JSTestNamedAndIndexedSetterNoIdentifier.cpp: |
| (WebCore::toJSNewlyCreated): |
| * bindings/scripts/test/JS/JSTestNamedAndIndexedSetterThrowingException.cpp: |
| (WebCore::toJSNewlyCreated): |
| * bindings/scripts/test/JS/JSTestNamedAndIndexedSetterWithIdentifier.cpp: |
| (WebCore::toJSNewlyCreated): |
| * bindings/scripts/test/JS/JSTestNamedConstructor.cpp: |
| (WebCore::toJSNewlyCreated): |
| * bindings/scripts/test/JS/JSTestNamedDeleterNoIdentifier.cpp: |
| (WebCore::toJSNewlyCreated): |
| * bindings/scripts/test/JS/JSTestNamedDeleterThrowingException.cpp: |
| (WebCore::toJSNewlyCreated): |
| * bindings/scripts/test/JS/JSTestNamedDeleterWithIdentifier.cpp: |
| (WebCore::toJSNewlyCreated): |
| * bindings/scripts/test/JS/JSTestNamedDeleterWithIndexedGetter.cpp: |
| (WebCore::toJSNewlyCreated): |
| * bindings/scripts/test/JS/JSTestNamedGetterCallWith.cpp: |
| (WebCore::toJSNewlyCreated): |
| * bindings/scripts/test/JS/JSTestNamedGetterNoIdentifier.cpp: |
| (WebCore::toJSNewlyCreated): |
| * bindings/scripts/test/JS/JSTestNamedGetterWithIdentifier.cpp: |
| (WebCore::toJSNewlyCreated): |
| * bindings/scripts/test/JS/JSTestNamedSetterNoIdentifier.cpp: |
| (WebCore::toJSNewlyCreated): |
| * bindings/scripts/test/JS/JSTestNamedSetterThrowingException.cpp: |
| (WebCore::toJSNewlyCreated): |
| * bindings/scripts/test/JS/JSTestNamedSetterWithIdentifier.cpp: |
| (WebCore::toJSNewlyCreated): |
| * bindings/scripts/test/JS/JSTestNamedSetterWithIndexedGetter.cpp: |
| (WebCore::toJSNewlyCreated): |
| * bindings/scripts/test/JS/JSTestNamedSetterWithIndexedGetterAndSetter.cpp: |
| (WebCore::toJSNewlyCreated): |
| * bindings/scripts/test/JS/JSTestNamedSetterWithOverrideBuiltins.cpp: |
| (WebCore::toJSNewlyCreated): |
| * bindings/scripts/test/JS/JSTestNamedSetterWithUnforgableProperties.cpp: |
| (WebCore::toJSNewlyCreated): |
| * bindings/scripts/test/JS/JSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltins.cpp: |
| (WebCore::toJSNewlyCreated): |
| * bindings/scripts/test/JS/JSTestNode.cpp: |
| (WebCore::toJSNewlyCreated): |
| * bindings/scripts/test/JS/JSTestObj.cpp: |
| (WebCore::toJSNewlyCreated): |
| * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp: |
| (WebCore::toJSNewlyCreated): |
| * bindings/scripts/test/JS/JSTestOverloadedConstructorsWithSequence.cpp: |
| (WebCore::toJSNewlyCreated): |
| * bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp: |
| (WebCore::toJSNewlyCreated): |
| * bindings/scripts/test/JS/JSTestPluginInterface.cpp: |
| (WebCore::toJSNewlyCreated): |
| * bindings/scripts/test/JS/JSTestPromiseRejectionEvent.cpp: |
| (WebCore::toJSNewlyCreated): |
| * bindings/scripts/test/JS/JSTestSerialization.cpp: |
| (WebCore::toJSNewlyCreated): |
| * bindings/scripts/test/JS/JSTestSerializationIndirectInheritance.cpp: |
| * bindings/scripts/test/JS/JSTestSerializationInherit.cpp: |
| * bindings/scripts/test/JS/JSTestSerializationInheritFinal.cpp: |
| * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp: |
| (WebCore::toJSNewlyCreated): |
| * bindings/scripts/test/JS/JSTestStringifier.cpp: |
| (WebCore::toJSNewlyCreated): |
| * bindings/scripts/test/JS/JSTestStringifierAnonymousOperation.cpp: |
| (WebCore::toJSNewlyCreated): |
| * bindings/scripts/test/JS/JSTestStringifierNamedOperation.cpp: |
| (WebCore::toJSNewlyCreated): |
| * bindings/scripts/test/JS/JSTestStringifierOperationImplementedAs.cpp: |
| (WebCore::toJSNewlyCreated): |
| * bindings/scripts/test/JS/JSTestStringifierOperationNamedToString.cpp: |
| (WebCore::toJSNewlyCreated): |
| * bindings/scripts/test/JS/JSTestStringifierReadOnlyAttribute.cpp: |
| (WebCore::toJSNewlyCreated): |
| * bindings/scripts/test/JS/JSTestStringifierReadWriteAttribute.cpp: |
| (WebCore::toJSNewlyCreated): |
| * bindings/scripts/test/JS/JSTestTypedefs.cpp: |
| (WebCore::toJSNewlyCreated): |
| |
| 2018-01-26 Simon Fraser <simon.fraser@apple.com> |
| |
| REGRESSiON (r226492): Crash under Element::absoluteEventBounds() on a SVGPathElement which has not been laid out yet |
| https://bugs.webkit.org/show_bug.cgi?id=182185 |
| rdar://problem/36836262 |
| |
| Reviewed by Zalan Bujtas. |
| |
| Document::absoluteRegionForEventTargets() can fire when layout is dirty, and SVGPathElement's path() can be null if it |
| hasn't been laid out yet. So protect against a null path in getBBox(). |
| |
| Not easily testable because internals.nonFastScrollableRects() forces layout, and the crash depends on the timing of |
| absoluteRegionForEventTargets(). |
| |
| * svg/SVGPathElement.cpp: |
| (WebCore::SVGPathElement::getBBox): |
| |
| 2018-01-26 Chris Dumez <cdumez@apple.com> |
| |
| Offlined content does not work for apps on home screen |
| https://bugs.webkit.org/show_bug.cgi?id=182070 |
| <rdar://problem/36843906> |
| |
| Reviewed by Youenn Fablet. |
| |
| Already registered service workers were unable to intercept the very first |
| load because registration matching was happening after the registration |
| was loaded from disk, but *before* its active worker was populated. |
| |
| We now initialize the registrations' active worker as soon as we load |
| them from disk. We do not necessarily have a SW Context process connection |
| identifier yet at this point so I made it optional on the SWServerWorker. |
| This identifier gets set on the SWServerWorker when the worker is actually |
| launched and gets cleared when the SWServerWorker gets terminated. |
| |
| Covered by new API test. |
| |
| * workers/service/server/SWServer.cpp: |
| (WebCore::SWServer::addRegistrationFromStore): |
| (WebCore::SWServer::installContextData): |
| (WebCore::SWServer::terminateWorkerInternal): |
| (WebCore::SWServer::workerContextTerminated): |
| (WebCore::SWServer::fireInstallEvent): |
| (WebCore::SWServer::fireActivateEvent): |
| * workers/service/server/SWServerWorker.cpp: |
| (WebCore::SWServerWorker::SWServerWorker): |
| * workers/service/server/SWServerWorker.h: |
| (WebCore::SWServerWorker::contextConnectionIdentifier const): |
| (WebCore::SWServerWorker::setContextConnectionIdentifier): |
| |
| 2018-01-26 Chris Nardi <cnardi@chromium.org> |
| |
| Addressing post-review comments after r226614 |
| https://bugs.webkit.org/show_bug.cgi?id=182151 |
| |
| Reviewed by Myles C. Maxfield. |
| |
| * html/HTMLTextAreaElement.cpp: |
| (WebCore::HTMLTextAreaElement::sanitizeUserInputValue): |
| * html/TextFieldInputType.cpp: |
| (WebCore::limitLength): |
| * platform/LocalizedStrings.cpp: |
| (WebCore::truncatedStringForLookupMenuItem): |
| * rendering/updating/RenderTreeBuilderFirstLetter.cpp: |
| (WebCore::RenderTreeBuilder::FirstLetter::createRenderers): |
| |
| 2018-01-26 Antoine Quint <graouts@apple.com> |
| |
| [iOS] prefers-reduced-motion media query is not working |
| https://bugs.webkit.org/show_bug.cgi?id=182169 |
| <rdar://problem/36801631> |
| |
| Reviewed by Dean Jackson. |
| |
| The code that would eventually query UIKit for the system setting was not run since USE(NEW_THEME) is off on iOS. |
| Adding a PLATFORM(IOS) flag here allows the code to run. |
| |
| * css/MediaQueryEvaluator.cpp: |
| (WebCore::prefersReducedMotionEvaluate): |
| |
| 2018-01-26 Youenn Fablet <youenn@apple.com> |
| |
| CSP post checks should be done for service worker responses |
| https://bugs.webkit.org/show_bug.cgi?id=182160 |
| |
| Reviewed by Daniel Bates. |
| |
| Covered by updated test. |
| |
| Add security checks when receiving a service worker response. |
| |
| * loader/SubresourceLoader.cpp: |
| (WebCore::SubresourceLoader::didReceiveResponse): |
| * loader/cache/CachedResourceLoader.h: |
| |
| 2018-01-26 Manuel Rego Casasnovas <rego@igalia.com> |
| |
| [css-multicol] Support percentages in column-gap |
| https://bugs.webkit.org/show_bug.cgi?id=182004 |
| |
| Reviewed by Javier Fernandez. |
| |
| This patch adds percentage support to column-gap property. |
| |
| Most of the changes are related to the parsing logic, |
| the column-gap property now accepts both length and percentages, |
| on top of the "normal" initial value. |
| A new utility class GapLength has been added, as it'll be useful |
| to implement row-gap in the future. |
| |
| Apart from that the muticolumn layout code has been modified |
| to resolve the percentage gaps (treating them as zero while computing |
| preferred widths) and resolving them during layout. |
| This doesn't follow the current text on the spec, but there is an |
| ongoing discussion that might cause the text is changed: |
| https://github.com/w3c/csswg-drafts/issues/509#issuecomment-355242101 |
| We could update the implementation once we have a definitive answer |
| from the CSS WG. |
| |
| Test: web-platform-tests/css/css-multicol/multicol-gap-percentage-001.html |
| |
| * Sources.txt: |
| * WebCore.xcodeproj/project.pbxproj: |
| * css/CSSComputedStyleDeclaration.cpp: |
| (WebCore::ComputedStyleExtractor::valueForPropertyinStyle): |
| * css/CSSProperties.json: |
| * css/StyleBuilderConverter.h: |
| (WebCore::StyleBuilderConverter::convertGapLength): |
| * css/StyleBuilderCustom.h: |
| (WebCore::forwardInheritedValue): |
| * css/parser/CSSPropertyParser.cpp: |
| (WebCore::consumeGapLength): |
| (WebCore::CSSPropertyParser::parseSingleValue): |
| * page/FrameView.cpp: |
| (WebCore::FrameView::applyPaginationToViewport): |
| * page/animation/CSSPropertyAnimation.cpp: |
| (WebCore::blendFunc): |
| (WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap): |
| * rendering/RenderBlockFlow.cpp: |
| (WebCore::RenderBlockFlow::columnGap const): |
| * rendering/RenderMultiColumnSet.cpp: |
| (WebCore::RenderMultiColumnSet::columnGap const): |
| * rendering/style/GapLength.cpp: Added. |
| (WebCore::operator<<): |
| * rendering/style/GapLength.h: Added. |
| (WebCore::GapLength::GapLength): |
| (WebCore::GapLength::isNormal const): |
| (WebCore::GapLength::length const): |
| (WebCore::GapLength::operator== const): |
| * rendering/style/RenderStyle.h: |
| (WebCore::RenderStyle::columnGap const): |
| (WebCore::RenderStyle::setColumnGap): |
| (WebCore::RenderStyle::initialColumnGap): |
| * rendering/style/StyleMultiColData.cpp: |
| (WebCore::StyleMultiColData::StyleMultiColData): |
| (WebCore::StyleMultiColData::operator== const): |
| * rendering/style/StyleMultiColData.h: |
| * style/StyleResolveForDocument.cpp: |
| (WebCore::Style::resolveForDocument): |
| |
| 2018-01-26 Emilio Cobos Álvarez <emilio@crisal.io> |
| |
| Remove unused RenderFragmentedFlow::createFragmentedFlowStyle. |
| https://bugs.webkit.org/show_bug.cgi?id=182138 |
| |
| Reviewed by Manuel Rego Casasnovas. |
| |
| Has no callers. |
| |
| No new tests, just removes unused code so no behavior change. |
| |
| * rendering/RenderFragmentedFlow.cpp: |
| * rendering/RenderFragmentedFlow.h: |
| |
| 2018-01-26 Emilio Cobos Álvarez <emilio@crisal.io> |
| |
| Remove useless RenderBlockFlow overrides. |
| https://bugs.webkit.org/show_bug.cgi?id=182139 |
| |
| Reviewed by Manuel Rego Casasnovas. |
| |
| I think these are leftovers from the CSS regions removal, looking at |
| blame. |
| |
| No new tests, no behavior change. |
| |
| * rendering/RenderBlockFlow.cpp: |
| * rendering/RenderBlockFlow.h: |
| |
| 2018-01-25 Joseph Pecoraro <pecoraro@apple.com> |
| |
| Web Inspector: Add InspectorShaderProgram to Unified Sources build |
| https://bugs.webkit.org/show_bug.cgi?id=182084 |
| |
| Reviewed by Dan Bernstein. |
| |
| * CMakeLists.txt: |
| * WebCore.xcodeproj/project.pbxproj: |
| * Sources.txt: |
| Move to Sources.txt always. |
| |
| * inspector/InspectorShaderProgram.cpp: |
| Add ENABLE(WEBGL) guard to contents. |
| |
| 2018-01-25 Ryosuke Niwa <rniwa@webkit.org> |
| |
| Make scrolling to the focused element async |
| https://bugs.webkit.org/show_bug.cgi?id=181575 |
| <rdar://problem/36459767> |
| |
| Reviewed by Simon Fraser. |
| |
| Made the revealing of the focused element asynchronous in Element::focus. Like selection, schedule a timer when |
| a new element is focused, and only scroll to the focused element when the timer fires. If any other scrolling |
| happens meanwhile, we cancel this timer. |
| |
| There are two Web exposed behavioral changes: |
| 1. The scrolling position doesn't change immediately when calling Element::focus. |
| 2. Only the last focused element will be revealed. |
| |
| Both behavioral changes pose its own compatibility risks but we're making a conscious decision here since |
| the scrolling asynchronous has a clear performance benefit. |
| |
| There is one edge case to cosnider: when the history controller restores the scrolling position, canceling the |
| timer results in a focused element in an overflow: hidden element to be never revealed. Expediate revealing of |
| the focused element in this one case instead of canceling. |
| |
| Tests: fast/scrolling/scroll-to-focused-element-asynchronously.html |
| fast/scrolling/scroll-to-focused-element-canceled-by-fragment-navigation.html |
| |
| * dom/Element.cpp: |
| (WebCore::Element::focus): Call updateFocusAppearance on focusAppearanceUpdateTarget to handle HTMLAreaElement |
| which delegates the focus appearance update to its image element. |
| (WebCore::Element::focusAppearanceUpdateTarget): Extracted. Returns "this" element for all but HTMLAreaElement. |
| (WebCore::Element::updateFocusAppearance): Schedule the revealing of the focused element in FrameView instead of |
| synchronously scrolling to the focused element. |
| * dom/Element.h: |
| (WebCore::Element::defaultFocusTextStateChangeIntent): |
| * html/HTMLAreaElement.cpp: |
| (WebCore::HTMLAreaElement::focusAppearanceUpdateTarget): Extracted from updateFocusAppearance. |
| (WebCore::HTMLAreaElement::updateFocusAppearance): Deleted. |
| * html/HTMLAreaElement.h: |
| * loader/HistoryController.cpp: |
| (WebCore::HistoryController::restoreScrollPositionAndViewState): Reveal the focused element |
| prior to restoring the scrolling location of the fragment navigation. This is needed to reveal a focused element |
| inside overflow: hidden element which got focused. |
| * page/FrameView.cpp: |
| (WebCore::FrameView::FrameView): Added a boolean flag and a timer for scrolling to the focused element. |
| (WebCore::FrameView::reset): Stop the timer and clear the flag. |
| (WebCore::FrameView::maintainScrollPositionAtAnchor): Ditto when scrolling to an anchor. |
| (WebCore::FrameView::setScrollPosition): Ditto when some other programatic scroll or the user scrolls the view. |
| (WebCore::FrameView::scheduleScrollToFocusedElement): Added. |
| (WebCore::FrameView::scrollToFocusedElementImmediatelyIfNeeded): Added. |
| (WebCore::FrameView::scrollToFocusedElementTimerFired): Added. |
| (WebCore::FrameView::scrollToAnchor): Stop the timer and clear the flag when scrolling to an achor. |
| (WebCore::FrameView::setWasScrolledByUser): Ditto when the user scrolls. |
| * page/FrameView.h: |
| |
| 2018-01-25 Said Abou-Hallawa <sabouhallawa@apple.com> |
| |
| REGRESSION(r217236): [iOS] PDFDocumentImage does not update its cached ImageBuffer if it has a sub-rectangle of the image |
| https://bugs.webkit.org/show_bug.cgi?id=182083 |
| |
| Reviewed by Simon Fraser. |
| |
| Test: fast/images/pdf-as-image-dest-rect-change.html |
| |
| Revert the change r217236 back. Fix the issue of throwing out the cached |
| ImageBuffer of the PDF document image when moving its rectangle. |
| |
| * platform/graphics/cg/PDFDocumentImage.cpp: |
| (WebCore::PDFDocumentImage::cacheParametersMatch): Return the if-statement |
| which was deleted in r217236 back but intersect it with dstRect. The context |
| clipping rectangle can be more than the dstRect. |
| (WebCore::PDFDocumentImage::updateCachedImageIfNeeded): |
| -- Remove a wrong optimization which used to work for Mac only if the context |
| interpolation quality is not set to low or none quality. This optimization |
| does not consider the case when srcRect or destRect change after caching |
| the ImageBuffer. Or even if m_cachedImageRect does not include the |
| whole clipping rectangle. |
| -- Move back the call to cacheParametersMatch() before changing the |
| m_cachedImageRect. |
| -- Always intersect the clipping rectangle with the dstRect to ensure we |
| only look at the dirty rectangle inside the image boundary. |
| -- If cacheParametersMatch() returns true, set m_cachedDestinationRect to |
| dstRect and move m_cachedImageRect by the difference between the new |
| and the old dstRects since no re-caching will happen. |
| * platform/graphics/cg/PDFDocumentImage.h: |
| * testing/Internals.cpp: |
| (WebCore::pdfDocumentImageFromImageElement): |
| (WebCore::Internals::pdfDocumentCachingCount): |
| * testing/Internals.h: |
| * testing/Internals.idl: |
| Add an internal API which returns the number of drawing the PDF into an |
| ImageBuffer. |
| |
| 2018-01-25 Joseph Pecoraro <pecoraro@apple.com> |
| |
| Web Inspector: Remove unnecessary developerExtrasEnabled checks |
| https://bugs.webkit.org/show_bug.cgi?id=182156 |
| |
| Reviewed by Matt Baker. |
| |
| * inspector/InspectorInstrumentation.cpp: |
| (WebCore::InspectorInstrumentation::didLoadResourceFromMemoryCacheImpl): |
| (WebCore::InspectorInstrumentation::frameDocumentUpdatedImpl): |
| (WebCore::InspectorInstrumentation::didCreateWebSocketImpl): |
| These checks should not be needed. The step above bails if there is |
| no inspector frontend, and there can be no inspector frontend unless |
| developer extras enabled are enabled. |
| |
| 2018-01-25 Wenson Hsieh <wenson_hsieh@apple.com> |
| |
| Add localizable strings for extra-zoomed form controls |
| https://bugs.webkit.org/show_bug.cgi?id=182080 |
| |
| Reviewed by Tim Horton. |
| |
| Add new localizable strings. Additionally, run `update-webkit-localizable-strings` to re-sort |
| Localizable.strings. |
| |
| * English.lproj/Localizable.strings: |
| * platform/LocalizedStrings.cpp: |
| (WebCore::formControlCancelButtonTitle): |
| (WebCore::formControlHideButtonTitle): |
| (WebCore::formControlGoButtonTitle): |
| (WebCore::formControlSearchButtonTitle): |
| (WebCore::textInputModeWriteButton): |
| (WebCore::textInputModeSpeechButton): |
| * platform/LocalizedStrings.h: |
| |
| 2018-01-25 Chris Dumez <cdumez@apple.com> |
| |
| Access to service workers / Cache API should be disabled in sandboxed frames without allow-same-origin flag |
| https://bugs.webkit.org/show_bug.cgi?id=182140 |
| <rdar://problem/36879952> |
| |
| Reviewed by Youenn Fablet. |
| |
| Throw a SecurityError when accessing navigator.serviceWorker or window.caches inside a sandboxed iframe |
| without the allow-same-origin flag. This behavior is consistent with Chrome. Firefox, however, seems |
| to return these objects but have their API reject promises with a SecurityError instead. |
| |
| No new tests, rebaselined existing tests. |
| |
| * Modules/cache/DOMWindowCaches.cpp: |
| (WebCore::DOMWindowCaches::caches): Deleted. |
| * Modules/cache/DOMWindowCaches.h: |
| * Modules/cache/DOMWindowCaches.idl: |
| * page/NavigatorBase.cpp: |
| * page/NavigatorBase.h: |
| * page/NavigatorServiceWorker.idl: |
| |
| 2018-01-25 Chris Dumez <cdumez@apple.com> |
| |
| Clients.get(id) should only returns clients in the service worker's origin |
| https://bugs.webkit.org/show_bug.cgi?id=182149 |
| <rdar://problem/36882310> |
| |
| Reviewed by Youenn Fablet. |
| |
| When looking for SW clients with a given identifier, only look in the list of |
| clients that have the same origin as the service worker. |
| |
| No new tests, rebaselined existing test. |
| |
| * workers/service/server/SWServer.cpp: |
| (WebCore::SWServer::serviceWorkerClientWithOriginByID const): |
| (WebCore::SWServer::serviceWorkerClientByID const): Deleted. |
| * workers/service/server/SWServer.h: |
| * workers/service/server/SWServerWorker.cpp: |
| (WebCore::SWServerWorker::findClientByIdentifier const): |
| * workers/service/server/SWServerWorker.h: |
| |
| 2018-01-25 Youenn Fablet <youenn@apple.com> |
| |
| WebPluginInfoProvider should handle null host queries |
| https://bugs.webkit.org/show_bug.cgi?id=182112 |
| |
| Reviewed by Chris Dumez. |
| |
| No change of behavior. |
| |
| Removed assertion that is not always true, as shown by API tests. |
| |
| * loader/DocumentLoader.cpp: |
| (WebCore::DocumentLoader::responseReceived): |
| |
| 2018-01-25 Youenn Fablet <youenn@apple.com> |
| |
| ShapeOutside should use same origin credentials mode |
| https://bugs.webkit.org/show_bug.cgi?id=182141 |
| |
| Reviewed by Chris Dumez. |
| |
| Covered by updated test. |
| As per https://drafts.csswg.org/css-shapes/#shape-outside-property, ShapeOutside images |
| should be fetched with anonymous cors mode, meaning credentials should be set to same-origin. |
| |
| * style/StylePendingResources.cpp: |
| (WebCore::Style::loadPendingImage): |
| |
| 2018-01-25 John Wilander <wilander@apple.com> |
| |
| Make sure we have a frame as we iterate in ResourceLoadObserver::nonNullOwnerURL() |
| https://bugs.webkit.org/show_bug.cgi?id=182116 |
| <rdar://problem/36210134> |
| |
| Reviewed by Alex Christensen. |
| |
| No new tests. No known repro case, just crash logs. |
| |
| * loader/ResourceLoadObserver.cpp: |
| (WebCore::ResourceLoadObserver::nonNullOwnerURL const): |
| |
| 2018-01-25 Jer Noble <jer.noble@apple.com> |
| |
| Move ImageDecoderAVFObjC from using AVSampleBufferGenerator to AVAssetReaderOutput for parsing |
| https://bugs.webkit.org/show_bug.cgi?id=182091 |
| |
| Reviewed by Eric Carlson. |
| |
| No new tests; should be covered by existing tests. |
| |
| AVSampleBufferGenerator is not available on iOS, so in order to enable ImageDecoderAVFObjC there, |
| we must adopt a similar API which is available both on iOS and macOS: AVAssetReaderOutput. Unlike |
| the generator, AVAssetReaderOutput doesn't necessarily generate samples in decode order, so we'll |
| repurpose the SampleMap from EME to hold the decoded samples as well as their generated images. |
| |
| * Modules/mediasource/SampleMap.cpp: |
| * Modules/mediasource/SampleMap.h: |
| (WebCore::SampleMap::size const): |
| * platform/MIMETypeRegistry.cpp: |
| (WebCore::MIMETypeRegistry::isSupportedImageVideoOrSVGMIMEType): |
| * platform/MediaSample.h: |
| (WebCore::MediaSample::hasAlpha const): |
| * platform/graphics/ImageDecoder.cpp: |
| (WebCore::ImageDecoder::create): |
| (WebCore::ImageDecoder::supportsMediaType): |
| * platform/graphics/avfoundation/MediaSampleAVFObjC.h: Make non-final. |
| (WebCore::MediaSampleAVFObjC::sampleBuffer const): |
| (WebCore::MediaSampleAVFObjC::MediaSampleAVFObjC): |
| * platform/graphics/avfoundation/objc/ImageDecoderAVFObjC.h: |
| * platform/graphics/avfoundation/objc/ImageDecoderAVFObjC.mm: |
| (WebCore::ImageDecoderAVFObjCSample::create): |
| (WebCore::ImageDecoderAVFObjCSample::sampleBuffer const): |
| (WebCore::ImageDecoderAVFObjCSample::image const): |
| (WebCore::ImageDecoderAVFObjCSample::setImage): |
| (WebCore::ImageDecoderAVFObjCSample::ImageDecoderAVFObjCSample): |
| (WebCore::ImageDecoderAVFObjCSample::cacheMetadata): |
| (WebCore::toSample): |
| (WebCore::ImageDecoderAVFObjC::readSamples): |
| (WebCore::ImageDecoderAVFObjC::storeSampleBuffer): |
| (WebCore::ImageDecoderAVFObjC::advanceCursor): |
| (WebCore::ImageDecoderAVFObjC::setTrack): |
| (WebCore::ImageDecoderAVFObjC::encodedDataStatus const): |
| (WebCore::ImageDecoderAVFObjC::repetitionCount const): |
| (WebCore::ImageDecoderAVFObjC::frameIsCompleteAtIndex const): |
| (WebCore::ImageDecoderAVFObjC::frameDurationAtIndex const): |
| (WebCore::ImageDecoderAVFObjC::frameHasAlphaAtIndex const): |
| (WebCore::ImageDecoderAVFObjC::createFrameImageAtIndex): |
| (WebCore::ImageDecoderAVFObjC::setData): |
| (WebCore::ImageDecoderAVFObjC::clearFrameBufferCache): |
| (WebCore::ImageDecoderAVFObjC::sampleAtIndex const): |
| (WebCore::ImageDecoderAVFObjC::readSampleMetadata): Deleted. |
| |
| 2018-01-25 Youenn Fablet <youenn@apple.com> |
| |
| DocumentThreadableLoader should ensure service worker is not reused if redirection comes from the network |
| https://bugs.webkit.org/show_bug.cgi?id=182137 |
| |
| Reviewed by Chris Dumez. |
| |
| Covered by rebased test. |
| In case redirection does not come from memory cache or service worker, disable service worker interception when following the redirection. |
| |
| * loader/DocumentThreadableLoader.cpp: |
| (WebCore::DocumentThreadableLoader::redirectReceived): |
| |
| 2018-01-25 Youenn Fablet <youenn@apple.com> |
| |
| DocumentLoader should interrupt ongoing load when getting a redirection from network that matches a service worker |
| https://bugs.webkit.org/show_bug.cgi?id=182115 |
| |
| Reviewed by Alex Christensen. |
| |
| Covered by rebased test. |
| |
| In case a navigation load is going to the network process, |
| we need to interrupt it if having a redirection that leads to a new request going to a service worker. |
| |
| * loader/DocumentLoader.cpp: |
| (WebCore::DocumentLoader::redirectReceived): |
| |
| 2018-01-25 Chris Dumez <cdumez@apple.com> |
| |
| Registering same scope as the script directory without the last slash should fail |
| https://bugs.webkit.org/show_bug.cgi?id=182122 |
| <rdar://problem/36877167> |
| |
| Reviewed by Youenn Fablet. |
| |
| This aligns our behavior with Firefox and Chrome. |
| |
| No new tests, rebaselined existing test. |
| |
| * workers/service/ServiceWorkerJob.cpp: |
| (WebCore::ServiceWorkerJob::didReceiveResponse): |
| |
| 2018-01-25 Antoine Quint <graouts@apple.com> |
| |
| [Web Animations] Expose the reverse() method |
| https://bugs.webkit.org/show_bug.cgi?id=182100 |
| <rdar://problem/36867117> |
| |
| Reviewed by Dean Jackson. |
| |
| We expose and implement the reverse() method on Animation as specified. |
| |
| * animation/WebAnimation.cpp: |
| (WebCore::WebAnimation::setPlaybackRate): |
| (WebCore::WebAnimation::reverse): |
| * animation/WebAnimation.h: |
| * animation/WebAnimation.idl: |
| |
| 2018-01-25 Antoine Quint <graouts@apple.com> |
| |
| [Web Animations] Account for provided easings when computing progress and resolving keyframe effect values |
| https://bugs.webkit.org/show_bug.cgi?id=182098 |
| <rdar://problem/36866149> |
| |
| Reviewed by Dean Jackson. |
| |
| We now account for the timing functions provided through the "easing" propreties on whole animation effects |
| and individual keyframes. Exposing those exposed shortcomings of our keyframe resolution in general through |
| WPT tests so we now implement the "effect value of a keyframe effect" procedure from the spec to correctly |
| resolve keyframes in KeyframeEffect::setAnimatedPropertiesInStyle(). The tests also showed some shortcomings |
| in our TimingFunction code where our step() function resolution wasn't fully compliant and our cubic-bezier() |
| resolution not accurate enough. We now have microsecond accuracy when resolving cubic-bezier() timing functions |
| and identify cubic-bezier(0, 0, 0, 0), cubic-bezier(0, 0, 1, 1) and cubic-bezier(1, 1, 1, 1) as linear timing |
| functions, as called out by the WPT tests. |
| |
| * animation/AnimationEffect.cpp: |
| (WebCore::AnimationEffect::transformedProgress const): Account for the effect-wide timing function when computing |
| the progress. |
| (WebCore::AnimationEffect::iterationProgress const): Use the transformed progress now that we support this procedure. |
| * animation/AnimationEffect.h: |
| * animation/KeyframeEffect.cpp: |
| (WebCore::KeyframeEffect::apply): We now use the computed progress from AnimationEffect rather than compute based |
| on the provided time, which we've dropped as an argument. |
| (WebCore::KeyframeEffect::getAnimatedStyle): |
| (WebCore::KeyframeEffect::setAnimatedPropertiesInStyle): Implement the "effect value of a keyframe effect" procedure |
| in full as specified (save for composite operations). |
| (WebCore::KeyframeEffect::applyAtLocalTime): Deleted. |
| * animation/KeyframeEffect.h: |
| * animation/WebAnimation.cpp: |
| (WebCore::WebAnimation::resolve): |
| * css/CSSTimingFunctionValue.h: Fix a small error made in a previous patch where we used "int" instead of "unsigned". |
| * platform/animation/TimingFunction.cpp: |
| (WebCore::TimingFunction::transformTime const): |
| * platform/animation/TimingFunction.h: |
| |
| 2018-01-25 Antoine Quint <graouts@apple.com> |
| |
| [Web Animations] Avoid querying the current time multiple time when resolving the play state |
| https://bugs.webkit.org/show_bug.cgi?id=182099 |
| |
| Reviewed by Dean Jackson. |
| |
| No test change since this shouldn't cause any change in behavior. |
| |
| * animation/WebAnimation.cpp: |
| (WebCore::WebAnimation::playState const): |
| |
| 2018-01-25 Youenn Fablet <youenn@apple.com> |
| |
| Set integrity fetch options for loading scripts and CSS |
| https://bugs.webkit.org/show_bug.cgi?id=182077 |
| |
| Reviewed by Chris Dumez. |
| |
| Covered by updated test. |
| |
| Set integrity fetch option in script and CSS loading. |
| |
| * bindings/js/CachedModuleScriptLoader.cpp: |
| (WebCore::CachedModuleScriptLoader::load): |
| * bindings/js/CachedScriptFetcher.cpp: |
| (WebCore::CachedScriptFetcher::requestModuleScript const): |
| (WebCore::CachedScriptFetcher::requestScriptWithCache const): |
| * bindings/js/CachedScriptFetcher.h: |
| * dom/LoadableClassicScript.cpp: |
| (WebCore::LoadableClassicScript::load): |
| * dom/ScriptElementCachedScriptFetcher.cpp: |
| (WebCore::ScriptElementCachedScriptFetcher::requestModuleScript const): |
| * dom/ScriptElementCachedScriptFetcher.h: |
| * html/HTMLLinkElement.cpp: |
| (WebCore::HTMLLinkElement::process): |
| |
| 2018-01-25 Zan Dobersek <zdobersek@igalia.com> |
| |
| [Cairo] Use GraphicsContextImplCairo in Nicosia::PaintingContextCairo |
| https://bugs.webkit.org/show_bug.cgi?id=182094 |
| |
| Reviewed by Carlos Garcia Campos. |
| |
| Have Nicosia::PaintingContextCairo create a GraphicsContext object that |
| utilizes a factory function which returns a freshly-allocated |
| GraphicsContextImplCairo through which all the painting is then done. |
| This moves GraphicsLayer painting over to using the GraphicsContextImpl |
| infrastructure. |
| |
| No new tests -- no changes in behavior. |
| |
| * platform/graphics/nicosia/NicosiaPaintingContextCairo.cpp: |
| (Nicosia::PaintingContextCairo::PaintingContextCairo): |
| |
| 2018-01-24 Frederic Wang <fwang@igalia.com> |
| |
| ScrollingStateNode::reconcileLayerPositionForViewportRect is only called on direct children of the root |
| https://bugs.webkit.org/show_bug.cgi?id=179946 |
| |
| Reviewed by Simon Fraser. |
| |
| ScrollingStateNode::reconcileLayerPositionForViewportRect is currently only called on the |
| direct children of root of the scrolling tree. Hence nodes like "position: fixed" will not |
| update their layers after scrolling when they are deeper in the tree. This is already |
| possible on iOS with overflow nodes and will happen with subframes when async scrolling is |
| implemented. This commit fixes that issue by recursively calling the function |
| ScrollingStateNode::reconcileLayerPositionForViewportRect on the scrolling tree. |
| |
| Test: fast/scrolling/ios/reconcile-layer-position-recursive.html |
| |
| * page/scrolling/AsyncScrollingCoordinator.cpp: |
| (WebCore::AsyncScrollingCoordinator::reconcileViewportConstrainedLayerPositions): Just call |
| reconcileLayerPositionForViewportRect on the root node. |
| * page/scrolling/ScrollingStateNode.cpp: |
| (WebCore::ScrollingStateNode::reconcileLayerPositionForViewportRect): By default, this |
| function now recursively calls reconcileLayerPositionForViewportRect on the children. |
| * page/scrolling/ScrollingStateNode.h: |
| * page/scrolling/ScrollingStateFixedNode.cpp: |
| (WebCore::ScrollingStateFixedNode::reconcileLayerPositionForViewportRect): Call the function |
| on children. |
| * page/scrolling/ScrollingStateStickyNode.cpp: |
| (WebCore::ScrollingStateStickyNode::reconcileLayerPositionForViewportRect): Ditto. |
| |
| 2018-01-24 Zan Dobersek <zdobersek@igalia.com> |
| |
| [Cairo] Use GraphicsContextImplCairo for ImageBuffer context |
| https://bugs.webkit.org/show_bug.cgi?id=181977 |
| |
| Reviewed by Carlos Garcia Campos. |
| |
| Enhance the GraphicsContextImpl interface to the point of enabling the |
| Cairo-based implementation to be used for GraphicsContext construction |
| in ImageBufferCairo.cpp. |
| |
| In order to enable GraphicsContextImpl implementations to properly |
| manage PlatformGraphicsContext objects, the hasPlatformContext() and |
| platformContext() methods are added. Cairo implementation returns true |
| in the first method, and returns pointer to the PlatformContextCairo |
| object in the second. The DisplayList::Recorder, due to its recording |
| nature, doesn't manage such an object, so it returns false and nullptr, |
| respectively. |
| |
| GraphicsContextImpl also gains the setCTM(), getCTM(), clipBounds() and |
| roundToDevicePixels() methods, corresponding to the GraphicsContext |
| methods that now invoke these new methods on any existing m_impl object. |
| GraphicsContextImplCairo implementations mimic the existing behavior in |
| the Cairo-specific GraphicsContext methods, but DisplayList::Recorder |
| implementations remain no-op, logging the invocation but doing nothing |
| otherwise. |
| |
| drawImage() and drawTiledImage() methods on the GraphicsContextImpl |
| interface are changed to return the ImageDrawResult value, corresponding |
| to what's been done in the method. In DisplayList::Recorder, the methods |
| return ImageDrawResult::DidRecord, while in GraphicsContextImplCairo the |
| methods return the return result of Image::draw() or Image::drawTiled() |
| call. |
| |
| To make the protected Image::draw() and Image::drawTiled() methods |
| accessible, invocations of those are packed into static drawImageImpl() |
| and drawTiledImageImpl() functions on the GraphicsContextImpl class. |
| This makes it possible to simply declare GraphicsContextImpl class as a |
| friend class of Image, and not every specific GraphicsContextImpl |
| derivation. Implementations of these functions mirror behavior of the |
| drawImage() and drawTiledImage() methods on the GraphicsContext class, |
| when an m_impl object isn't present, constructing a scope-tied |
| InterpolationQualityMaintainer object and invoking the relevant Image |
| method. |
| |
| To make immediate use of the new GraphicsContextImplCairo functionality, |
| the GraphicsContext construction in Cairo-specific ImageBuffer |
| implementation now uses a factory function that returns a new |
| GraphicsContextImplCairo object through which the given |
| PlatformContextCairo is used for painting. |
| |
| No new tests -- no change in functionality. |
| |
| * platform/graphics/GraphicsContext.cpp: |
| (WebCore::GraphicsContext::hasPlatformContext const): |
| (WebCore::GraphicsContext::drawImage): |
| (WebCore::GraphicsContext::drawTiledImage): |
| * platform/graphics/GraphicsContext.h: |
| (WebCore::GraphicsContext::hasPlatformContext const): Deleted. |
| * platform/graphics/GraphicsContextImpl.cpp: |
| (WebCore::GraphicsContextImpl::drawImageImpl): |
| (WebCore::GraphicsContextImpl::drawTiledImageImpl): |
| * platform/graphics/GraphicsContextImpl.h: |
| * platform/graphics/Image.h: |
| * platform/graphics/cairo/GraphicsContextCairo.cpp: |
| (WebCore::GraphicsContext::getCTM const): |
| (WebCore::GraphicsContext::platformContext const): |
| (WebCore::GraphicsContext::clipBounds const): |
| (WebCore::GraphicsContext::roundToDevicePixels): |
| (WebCore::GraphicsContext::setCTM): |
| * platform/graphics/cairo/GraphicsContextImplCairo.cpp: |
| (WebCore::m_private): |
| (WebCore::GraphicsContextImplCairo::~GraphicsContextImplCairo): |
| (WebCore::GraphicsContextImplCairo::hasPlatformContext const): |
| (WebCore::GraphicsContextImplCairo::platformContext const): |
| (WebCore::GraphicsContextImplCairo::updateState): |
| (WebCore::GraphicsContextImplCairo::setLineCap): |
| (WebCore::GraphicsContextImplCairo::setLineDash): |
| (WebCore::GraphicsContextImplCairo::setLineJoin): |
| (WebCore::GraphicsContextImplCairo::setMiterLimit): |
| (WebCore::GraphicsContextImplCairo::fillRect): |
| (WebCore::GraphicsContextImplCairo::fillRoundedRect): |
| (WebCore::GraphicsContextImplCairo::fillRectWithRoundedHole): |
| (WebCore::GraphicsContextImplCairo::fillPath): |
| (WebCore::GraphicsContextImplCairo::fillEllipse): |
| (WebCore::GraphicsContextImplCairo::strokeRect): |
| (WebCore::GraphicsContextImplCairo::strokePath): |
| (WebCore::GraphicsContextImplCairo::strokeEllipse): |
| (WebCore::GraphicsContextImplCairo::clearRect): |
| (WebCore::GraphicsContextImplCairo::drawGlyphs): |
| (WebCore::GraphicsContextImplCairo::drawImage): |
| (WebCore::GraphicsContextImplCairo::drawTiledImage): |
| (WebCore::GraphicsContextImplCairo::drawNativeImage): |
| (WebCore::GraphicsContextImplCairo::drawPattern): |
| (WebCore::GraphicsContextImplCairo::drawRect): |
| (WebCore::GraphicsContextImplCairo::drawLine): |
| (WebCore::GraphicsContextImplCairo::drawLinesForText): |
| (WebCore::GraphicsContextImplCairo::drawLineForDocumentMarker): |
| (WebCore::GraphicsContextImplCairo::drawEllipse): |
| (WebCore::GraphicsContextImplCairo::drawFocusRing): |
| (WebCore::GraphicsContextImplCairo::save): |
| (WebCore::GraphicsContextImplCairo::restore): |
| (WebCore::GraphicsContextImplCairo::translate): |
| (WebCore::GraphicsContextImplCairo::rotate): |
| (WebCore::GraphicsContextImplCairo::scale): |
| (WebCore::GraphicsContextImplCairo::concatCTM): |
| (WebCore::GraphicsContextImplCairo::setCTM): |
| (WebCore::GraphicsContextImplCairo::getCTM): |
| (WebCore::GraphicsContextImplCairo::beginTransparencyLayer): |
| (WebCore::GraphicsContextImplCairo::endTransparencyLayer): |
| (WebCore::GraphicsContextImplCairo::clip): |
| (WebCore::GraphicsContextImplCairo::clipOut): |
| (WebCore::GraphicsContextImplCairo::clipPath): |
| (WebCore::GraphicsContextImplCairo::clipBounds): |
| (WebCore::GraphicsContextImplCairo::roundToDevicePixels): |
| (WebCore::m_platformContext): Deleted. |
| * platform/graphics/cairo/GraphicsContextImplCairo.h: |
| * platform/graphics/cairo/ImageBufferCairo.cpp: |
| (WebCore::ImageBuffer::ImageBuffer): |
| * platform/graphics/cg/GraphicsContextCG.cpp: |
| (WebCore::GraphicsContext::clipBounds const): |
| (WebCore::GraphicsContext::setCTM): |
| (WebCore::GraphicsContext::getCTM const): |
| (WebCore::GraphicsContext::roundToDevicePixels): |
| * platform/graphics/displaylists/DisplayListRecorder.cpp: |
| (WebCore::DisplayList::Recorder::drawImage): |
| (WebCore::DisplayList::Recorder::drawTiledImage): |
| (WebCore::DisplayList::Recorder::drawNativeImage): |
| (WebCore::DisplayList::Recorder::setCTM): |
| (WebCore::DisplayList::Recorder::getCTM): |
| (WebCore::DisplayList::Recorder::clipBounds): |
| (WebCore::DisplayList::Recorder::roundToDevicePixels): |
| * platform/graphics/displaylists/DisplayListRecorder.h: |
| |
| 2018-01-24 Christopher Reid <chris.reid@sony.com> |
| |
| Linker error in ShareableBitmapCairo.cpp undefined reference to WebCore::Cairo::ShadowState::ShadowState |
| https://bugs.webkit.org/show_bug.cgi?id=182060 |
| |
| Reviewed by Žan Doberšek. |
| |
| No new tests, no change in behavior. |
| |
| Added exports to WebCore::Cairo::ShadowState::ShadowState. |
| |
| * platform/graphics/cairo/CairoOperations.h: |
| |
| 2018-01-24 Basuke Suzuki <Basuke.Suzuki@sony.com> |
| |
| [Curl] Implement didSendData client callback. |
| https://bugs.webkit.org/show_bug.cgi?id=182063 |
| |
| Reviewed by Alex Christensen. |
| |
| No new tests (covered by existing tests). |
| |
| * platform/network/curl/CurlDownload.h: |
| * platform/network/curl/CurlRequest.cpp: |
| (WebCore::CurlRequest::willSendData): |
| * platform/network/curl/CurlRequestClient.h: |
| * platform/network/curl/ResourceHandleCurlDelegate.cpp: |
| (WebCore::ResourceHandleCurlDelegate::curlDidSendData): |
| * platform/network/curl/ResourceHandleCurlDelegate.h: |
| |
| 2018-01-24 Jiewen Tan <jiewen_tan@apple.com> |
| |
| [WebAuthN] Implement PublicKeyCredential’s [[DiscoverFromExternalSource]] with a dummy authenticator |
| https://bugs.webkit.org/show_bug.cgi?id=182032 |
| <rdar://problem/36459922> |
| |
| Reviewed by Brent Fulgham. |
| |
| This patch implements PublicKeyCredential's [[DiscoverFromExternalSource]] from |
| https://www.w3.org/TR/webauthn/#getAssertion as of 5 December 2017. In order to |
| do testing, a dummy authenticator is implemented to exercise a failure and a |
| pass path. A number of dependencies need to be resolved later in order to comply |
| with the spec, which are marked by FIXME in the patch and tracked by proper |
| bugs. Those dependencies will be addressed once the first prototype is finshed. |
| |
| Tests: http/tests/webauthn/public-key-credential-get-with-invalid-parameters.https.html |
| http/wpt/credential-management/credentialscontainer-store-basics.https.html |
| http/wpt/webauthn/public-key-credential-get-failure.https.html |
| http/wpt/webauthn/public-key-credential-get-success.https.html |
| |
| * Modules/credentialmanagement/CredentialsContainer.cpp: |
| (WebCore::CredentialsContainer::get): |
| (WebCore::CredentialsContainer::isCreate): |
| Fixes some minor issues. |
| * Modules/webauthn/Authenticator.cpp: |
| (WebCore::Authenticator::getAssertion const): |
| * Modules/webauthn/Authenticator.h: |
| (WebCore::Authenticator::AssertionReturnBundle::AssertionReturnBundle): |
| * Modules/webauthn/PublicKeyCredential.cpp: |
| (WebCore::PublicKeyCredential::collectFromCredentialStore): |
| Changed a parameter type. |
| (WebCore::PublicKeyCredential::discoverFromExternalSource): |
| (WebCore::PublicKeyCredential::create): |
| Improved some comments. |
| * Modules/webauthn/PublicKeyCredential.h: |
| * Modules/webauthn/PublicKeyCredentialRequestOptions.h: |
| (): Deleted. |
| * bindings/js/JSAuthenticatorResponseCustom.cpp: |
| (WebCore::toJSNewlyCreated): |
| |
| 2018-01-24 Dean Jackson <dino@apple.com> |
| |
| Move WebGL's colorspace code into IOSurface |
| https://bugs.webkit.org/show_bug.cgi?id=182076 |
| <rdar://problem/36846863> |
| |
| Reviewed by Simon Fraser, with assistance from Tim Horton. |
| |
| Rather than have WebGLLayer talk directly to an IOSurfaceRef, |
| use a helper function on WebCore::IOSurface. |
| |
| No behaviour change. |
| |
| * platform/graphics/cocoa/IOSurface.h: |
| * platform/graphics/cocoa/IOSurface.mm: |
| (WebCore::IOSurface::migrateColorSpaceToProperties): Add new helper. |
| * platform/graphics/cocoa/WebGLLayer.mm: |
| (-[WebGLLayer allocateIOSurfaceBackingStoreWithSize:usingAlpha:]): The |
| newly created IOSurfaces call the helper to set up their colorspace. |
| |
| 2018-01-24 Dean Jackson <dino@apple.com> |
| |
| Add a note about not implementing these functions without discussion. |
| <rdar://problem/36666458> |
| |
| * html/canvas/WebGL2RenderingContext.cpp: |
| (WebCore::WebGL2RenderingContext::clientWaitSync): |
| (WebCore::WebGL2RenderingContext::getSyncParameter): |
| |
| 2018-01-24 Youenn Fablet <youenn@apple.com> |
| |
| Opaque being-loaded responses should clone their body |
| https://bugs.webkit.org/show_bug.cgi?id=182056 |
| |
| Reviewed by Brady Eidson. |
| |
| Test: http/wpt/service-workers/clone-opaque-being-loaded-response.https.html |
| |
| When cloning a being-loaded response, make sure we create a ReadableStream. |
| Before the patch, the readableStream was not created in that case for opaque responses. |
| |
| * Modules/fetch/FetchBodyOwner.cpp: |
| (WebCore::FetchBodyOwner::readableStream): |
| (WebCore::FetchBodyOwner::createReadableStream): |
| * Modules/fetch/FetchBodyOwner.h: |
| * Modules/fetch/FetchResponse.cpp: |
| (WebCore::FetchResponse::clone): |
| |
| 2018-01-24 Chris Dumez <cdumez@apple.com> |
| |
| close() operation should not be exposed inside a ServiceWorkerGlobalScope |
| https://bugs.webkit.org/show_bug.cgi?id=182057 |
| |
| Reviewed by Youenn Fablet. |
| |
| Move close() from WorkerGlobalScope to DedicatedWorkerGlobalScope as per: |
| - https://html.spec.whatwg.org/multipage/workers.html#dedicatedworkerglobalscope |
| |
| This change to the specification was made to avoid exposing this deprecated |
| features to service workers (which are new). |
| |
| No new tests, rebaselined existing test. |
| |
| * workers/DedicatedWorkerGlobalScope.idl: |
| * workers/WorkerGlobalScope.idl: |
| |
| 2018-01-24 David Hyatt <hyatt@apple.com> |
| |
| Implement line clamp for mail. |
| https://bugs.webkit.org/show_bug.cgi?id=180818 |
| |
| Reviewed by Dean Jackson. |
| |
| This patch implements a form of clamping that can clamp lines at both the top |
| and the bottom, and the interior can be replaced with a DOM element (identified |
| by id) that replaces the middle section. |
| |
| The implementation derives from the multicolumn classes, but ultimately the |
| clamp should derive from the fragmentset classes instead (with most of the current |
| multicolumn code moving into base classes). |
| |
| The virtualization of many of the multicolumn functions is something that would happen |
| once we move pages/printing over to this pagination model anyway. |
| |
| * Sources.txt: |
| * WebCore.xcodeproj/project.pbxproj: |
| Add the new clamp classes. |
| |
| * css/CSSComputedStyleDeclaration.cpp: |
| (WebCore::ComputedStyleExtractor::valueForPropertyinStyle): |
| * css/CSSProperties.json: |
| * css/StyleBuilderCustom.h: |
| (WebCore::StyleBuilderCustom::applyValueWebkitLinesClamp): |
| * css/parser/CSSParser.cpp: |
| (WebCore::CSSParserContext::CSSParserContext): |
| * css/parser/CSSParserMode.h: |
| (WebCore::CSSParserContextHash::hash): |
| * css/parser/CSSPropertyParser.cpp: |
| (WebCore::consumeLinesClamp): |
| (WebCore::CSSPropertyParser::parseSingleValue): |
| Implement the new CSS property, webkit-lines-clamp. This is only exposed if a preference |
| is set, so it is not exposed to the Web. |
| |
| * page/Settings.yaml: |
| Add a new setting to control allowing access to the new CSS property. |
| |
| * rendering/RenderBlockFlow.cpp: |
| (WebCore::RenderBlockFlow::willCreateColumns const): |
| Make sure columns are created when lines clamp is set. |
| |
| (WebCore::getHeightForLineCount): |
| (WebCore::RenderBlockFlow::logicalHeightForLineCount): |
| (WebCore::RenderBlockFlow::logicalHeightExcludingLineCount): |
| (WebCore::RenderBlockFlow::layoutExcludedChildren): |
| (WebCore::RenderBlockFlow::heightForLineCount): Deleted. |
| * rendering/RenderBlockFlow.h: |
| Re-use the same clamping logic as the old line clamp code, but modernize it to work |
| with writing modes and to be able to go backwards from the end of the block. |
| |
| * rendering/RenderDeprecatedFlexibleBox.cpp: |
| (WebCore::RenderDeprecatedFlexibleBox::applyLineClamp): |
| The line count method got renamed to have the word "logical" in it, since it now |
| works with vertical writing. |
| |
| * rendering/RenderFragmentContainer.cpp: |
| (WebCore::RenderFragmentContainer::pageLogicalHeightForOffset const): |
| * rendering/RenderFragmentContainer.h: |
| Since line clamp sets have variable page heights, this new method takes the offset |
| as an argument so that it can return the appropriate page for the given offset. |
| This method will eventually be used by printing/page sets as well, since pages |
| can have variable heights. |
| |
| * rendering/RenderFragmentedFlow.cpp: |
| (WebCore::RenderFragmentedFlow::validateFragments): |
| (WebCore::RenderFragmentedFlow::pageLogicalHeightForOffset const): |
| (WebCore::RenderFragmentedFlow::pageRemainingLogicalHeightForOffset const): |
| * rendering/RenderFragmentedFlow.h: |
| Support for variable page heights in a fragment set. |
| |
| * rendering/RenderLinesClampFlow.cpp: Added. |
| (WebCore::RenderLinesClampFlow::RenderLinesClampFlow): |
| (WebCore::RenderLinesClampFlow::renderName const): |
| (WebCore::RenderLinesClampFlow::layout): |
| (WebCore::RenderLinesClampFlow::createMultiColumnSet): |
| (WebCore::RenderLinesClampFlow::isChildAllowedInFragmentedFlow const): |
| (WebCore::RenderLinesClampFlow::layoutFlowExcludedObjects): |
| * rendering/RenderLinesClampFlow.h: Added. |
| * rendering/RenderLinesClampSet.cpp: Added. |
| (WebCore::RenderLinesClampSet::RenderLinesClampSet): |
| (WebCore::RenderLinesClampSet::recalculateColumnHeight): |
| (WebCore::RenderLinesClampSet::computeLogicalHeight const): |
| (WebCore::RenderLinesClampSet::columnCount const): |
| (WebCore::RenderLinesClampSet::columnRectAt const): |
| (WebCore::RenderLinesClampSet::columnIndexAtOffset const): |
| (WebCore::RenderLinesClampSet::pageLogicalTopForOffset const): |
| (WebCore::RenderLinesClampSet::pageLogicalHeightForOffset const): |
| (WebCore::RenderLinesClampSet::fragmentedFlowPortionRectAt const): |
| (WebCore::RenderLinesClampSet::fragmentedFlowPortionOverflowRect): |
| (WebCore::RenderLinesClampSet::customBlockProgressionAdjustmentForColumn const): |
| (WebCore::RenderLinesClampSet::renderName const): |
| * rendering/RenderLinesClampSet.h: Added. |
| The new classes. They subclass all the methods necessary to do multi-pass layout, |
| and to determine the page heights of each section. |
| |
| * rendering/RenderMultiColumnFlow.cpp: |
| (WebCore::RenderMultiColumnFlow::isColumnSpanningDescendant const): |
| (WebCore::isValidColumnSpanner): |
| (WebCore::RenderMultiColumnFlow::processPossibleSpannerDescendant): |
| (WebCore::RenderMultiColumnFlow::createMultiColumnSet): |
| * rendering/RenderMultiColumnFlow.h: |
| * rendering/RenderMultiColumnSet.cpp: |
| (WebCore::RenderMultiColumnSet::collectLayerFragments): |
| (WebCore::RenderMultiColumnSet::columnTranslationForOffset const): |
| * rendering/RenderMultiColumnSet.h: |
| (WebCore::RenderMultiColumnSet::skipLayerFragmentCollectionForColumn const): |
| (WebCore::RenderMultiColumnSet::customBlockProgressionAdjustmentForColumn const): |
| Virtualized methods so that lines clamp can subclass and change behavior. |
| |
| * rendering/RenderObject.h: |
| (WebCore::RenderObject::isRenderLinesClampFlow const): |
| (WebCore::RenderObject::isRenderLinesClampSet const): |
| Add new functions for type checking. |
| |
| * rendering/RenderRubyText.cpp: |
| Include adjustment. |
| |
| * rendering/style/LineClampValue.h: |
| (WebCore::LinesClampValue::LinesClampValue): |
| (WebCore::LinesClampValue::isNone const): |
| (WebCore::LinesClampValue::operator== const): |
| (WebCore::LinesClampValue::operator!= const): |
| (WebCore::LinesClampValue::start const): |
| (WebCore::LinesClampValue::end const): |
| (WebCore::LinesClampValue::center const): |
| * rendering/style/RenderStyle.h: |
| (WebCore::RenderStyle::linesClamp const): |
| (WebCore::RenderStyle::hasLinesClamp const): |
| (WebCore::RenderStyle::setLinesClamp): |
| (WebCore::RenderStyle::initialLinesClamp): |
| (WebCore::RenderStyle::hasInlineColumnAxis const): |
| * rendering/style/StyleRareNonInheritedData.cpp: |
| (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData): |
| (WebCore::StyleRareNonInheritedData::operator== const): |
| * rendering/style/StyleRareNonInheritedData.h: |
| The front end style implementation of the new property. |
| |
| * rendering/updating/RenderTreeBuilderMultiColumn.cpp: |
| (WebCore::RenderTreeBuilder::MultiColumn::createFragmentedFlow): |
| Make sure to build the correct renderer when lines clamp is set. |
| |
| 2018-01-24 Basuke Suzuki <Basuke.Suzuki@sony.com> |
| |
| [Curl] Allocate CurlSSLVerifier only when it is required. |
| https://bugs.webkit.org/show_bug.cgi?id=182061 |
| |
| CurlSSLVerifier was a member function of CurlRequest. This patch do |
| lazy initialization of it only when actually it is required. |
| Also configuration method is not required by moving those stuff to |
| constructor of SSLVerifier which makes much safer because there's |
| no change to change its behavior from outside. |
| |
| Reviewed by Alex Christensen. |
| |
| * platform/network/curl/CurlRequest.cpp: |
| (WebCore::CurlRequest::willSetupSslCtx): |
| (WebCore::CurlRequest::didCompleteTransfer): |
| (WebCore::CurlRequest::finalizeTransfer): |
| * platform/network/curl/CurlRequest.h: |
| * platform/network/curl/CurlSSLVerifier.cpp: |
| (WebCore::CurlSSLVerifier::CurlSSLVerifier): |
| (WebCore::CurlSSLVerifier::setSslCtx): Deleted. |
| * platform/network/curl/CurlSSLVerifier.h: |
| (WebCore::CurlSSLVerifier::setCurlHandle): Deleted. |
| (WebCore::CurlSSLVerifier::setHostName): Deleted. |
| |
| 2018-01-24 Antti Koivisto <antti@apple.com> |
| |
| Assertion failure in RenderMultiColumnSet::requiresBalancing() on fast/multicol/spanner-crash-when-adding-summary.html |
| https://bugs.webkit.org/show_bug.cgi?id=179308 |
| <rdar://problem/34592771> |
| |
| Reviewed by Zalan Bujtas. |
| |
| The issue here is that we fail to tear down render tree for a summary element because adding another summary element |
| takes it out of the composed tree. This leaves behind renderers that break some multicolumn assumptions. |
| |
| * rendering/updating/RenderTreeUpdater.cpp: |
| (WebCore::RenderTreeUpdater::tearDownRenderers): |
| (WebCore::RenderTreeUpdater::tearDownLeftoverShadowHostChildren): |
| |
| When tearing down renderers go through the real children of the shadow hosts at the end and see if we left any renderers behind. |
| If so, tear them down too. |
| |
| * rendering/updating/RenderTreeUpdater.h: |
| |
| 2018-01-24 Daniel Bates <dabates@apple.com> |
| |
| [CSP] Check policy for targeted windows when navigating to a JavaScript URL |
| https://bugs.webkit.org/show_bug.cgi?id=182018 |
| <rdar://problem/36795781> |
| |
| Reviewed by Brent Fulgham. |
| |
| Move the CSP check to be earlier in the function. |
| |
| Test: http/tests/security/contentSecurityPolicy/window-open-javascript-url-with-target-blocked.html |
| |
| * loader/FrameLoader.cpp: |
| (WebCore::createWindow): |
| |
| 2018-01-24 Chris Dumez <cdumez@apple.com> |
| |
| Add a IPC::SendSyncOption indicating we should not process incoming IPC while waiting for the sync reply |
| https://bugs.webkit.org/show_bug.cgi?id=182021 |
| <rdar://problem/21629943> |
| |
| Reviewed by Ryosuke Niwa. |
| |
| Add layout testing infrastructure for the new flag. |
| |
| Test: fast/misc/testIncomingSyncIPCMessageWhileWaitingForSyncReply.html |
| |
| * page/ChromeClient.h: |
| * testing/Internals.cpp: |
| (WebCore::Internals::testIncomingSyncIPCMessageWhileWaitingForSyncReply): |
| * testing/Internals.h: |
| * testing/Internals.idl: |
| |
| 2018-01-24 Alex Christensen <achristensen@webkit.org> |
| |
| Remove pre-Sierra-OS-specific code in WebCore |
| https://bugs.webkit.org/show_bug.cgi?id=182026 |
| |
| Reviewed by Tim Horton. |
| |
| * page/cocoa/UserAgent.mm: |
| (WebCore::systemMarketingVersionForUserAgentString): |
| * page/scrolling/mac/ScrollingMomentumCalculatorMac.mm: |
| (WebCore::ScrollingMomentumCalculatorMac::retargetedScrollOffsetDidChange): |
| * platform/cocoa/PasteboardCocoa.mm: |
| (WebCore::bitmapPNGFileType): |
| * platform/graphics/FontPlatformData.cpp: |
| * platform/graphics/FontPlatformData.h: |
| * platform/graphics/avfoundation/objc/VideoFullscreenLayerManager.mm: |
| (WebCore::VideoFullscreenLayerManager::setVideoFullscreenLayer): |
| * platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm: |
| (layerContentsFormat): |
| (PlatformCALayerCocoa::updateContentsFormat): |
| (PlatformCALayerCocoa::backingStoreBytesPerPixel const): |
| * platform/graphics/cg/GraphicsContextCG.cpp: |
| (WebCore::linearRGBColorSpaceRef): |
| (WebCore::extendedSRGBColorSpaceRef): |
| * platform/graphics/cg/PDFDocumentImage.cpp: |
| (WebCore::PDFDocumentImage::drawPDFPage): |
| * platform/graphics/cocoa/FontCacheCoreText.cpp: |
| (WebCore::getCSSAttribute): |
| (WebCore::capabilitiesForFontDescriptor): |
| (WebCore::findClosestFont): |
| (WebCore::platformFontLookupWithFamily): |
| (WebCore::lookupFallbackFont): |
| (WebCore::fontWeightFromCoreText): Deleted. |
| * platform/graphics/cocoa/FontCocoa.mm: |
| (WebCore::Font::variantCapsSupportsCharacterForSynthesis const): |
| (WebCore::Font::platformWidthForGlyph const): |
| (WebCore::advanceForColorBitmapFont): Deleted. |
| (WebCore::canUseFastGlyphAdvanceGetter): Deleted. |
| * platform/graphics/cocoa/FontPlatformDataCocoa.mm: |
| (WebCore::FontPlatformData::FontPlatformData): |
| (WebCore::FontPlatformData::hash const): |
| (WebCore::FontPlatformData::platformIsEqual const): |
| (WebCore::FontPlatformData::ctFont const): |
| * platform/graphics/cocoa/GraphicsContextCocoa.mm: |
| (WebCore::linearRGBColorSpaceRef): Deleted. |
| * platform/graphics/cocoa/WebCoreDecompressionSession.mm: |
| (WebCore::WebCoreDecompressionSession::setTimebase): |
| * platform/graphics/mac/FontCustomPlatformData.cpp: |
| (WebCore::FontCustomPlatformData::supportsFormat): |
| * platform/mac/PlatformScreenMac.mm: |
| (WebCore::screenSupportsExtendedColor): |
| * platform/mac/ScrollbarThemeMac.mm: |
| (WebCore::ScrollbarThemeMac::didCreateScrollerImp): |
| (WebCore::ScrollbarThemeMac::isLayoutDirectionRTL): |
| * platform/mac/ThemeMac.mm: |
| (WebCore::ThemeMac::userPrefersReducedMotion const): |
| * platform/network/cocoa/ResourceRequestCocoa.mm: |
| (WebCore::ResourceRequest::doUpdatePlatformRequest): |
| * platform/text/mac/TextBoundaries.mm: |
| (WebCore::findNextWordFromIndex): |
| * rendering/RenderLayerModelObject.cpp: |
| (WebCore::RenderLayerModelObject::shouldPlaceBlockDirectionScrollbarOnLeft const): |
| * testing/Internals.mm: |
| (WebCore::Internals::userPrefersReducedMotion const): |
| |
| 2018-01-24 Alex Christensen <achristensen@webkit.org> |
| |
| Remove WebProcess authentication code |
| https://bugs.webkit.org/show_bug.cgi?id=182020 |
| |
| Reviewed by Brady Eidson. |
| |
| We were keeping it around for pre-NetworkSession media loading, which is gone now. |
| |
| * html/HTMLMediaElement.cpp: |
| (WebCore::HTMLMediaElement::mediaPlayerShouldWaitForResponseToAuthenticationChallenge): Deleted. |
| * html/HTMLMediaElement.h: |
| * loader/ResourceLoader.cpp: |
| (WebCore::ResourceLoader::didReceiveAuthenticationChallenge): |
| * loader/ResourceLoader.h: |
| * platform/graphics/MediaPlayer.cpp: |
| (WebCore::MediaPlayer::shouldWaitForResponseToAuthenticationChallenge): Deleted. |
| * platform/graphics/MediaPlayer.h: |
| (WebCore::MediaPlayerClient::mediaPlayerShouldWaitForResponseToAuthenticationChallenge): Deleted. |
| * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h: |
| * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm: |
| (-[WebCoreAVFLoaderDelegate resourceLoader:shouldWaitForResponseToAuthenticationChallenge:]): |
| (WebCore::MediaPlayerPrivateAVFoundationObjC::shouldWaitForResponseToAuthenticationChallenge): Deleted. |
| |
| 2018-01-24 Joanmarie Diggs <jdiggs@igalia.com> |
| |
| AX: SVG AAM mapping trumps ARIA role attribute in the case of SVG root |
| https://bugs.webkit.org/show_bug.cgi?id=181994 |
| |
| Reviewed by Chris Fleizach. |
| |
| Only return AccessibilityRole::Group if we have no author-provided |
| ARIA role attribute value. |
| |
| Test: accessibility/svg-element-with-aria-role.html |
| |
| * accessibility/AccessibilitySVGRoot.cpp: |
| (WebCore::AccessibilitySVGRoot::roleValue const): |
| * accessibility/AccessibilitySVGRoot.h: |
| |
| 2018-01-24 Alex Christensen <achristensen@webkit.org> |
| |
| Remove unused QTKit preference |
| https://bugs.webkit.org/show_bug.cgi?id=181968 |
| |
| Reviewed by Alexey Proskuryakov. |
| |
| They weren't used and didn't do anything. |
| |
| * page/DeprecatedGlobalSettings.cpp: |
| (WebCore::DeprecatedGlobalSettings::setQTKitEnabled): Deleted. |
| * page/DeprecatedGlobalSettings.h: |
| (WebCore::DeprecatedGlobalSettings::isQTKitEnabled): Deleted. |
| |
| 2018-01-24 Antoine Quint <graouts@apple.com> |
| |
| [Web Animations] Compute the progress and currentIteration properties on getComputedTiming() |
| https://bugs.webkit.org/show_bug.cgi?id=182039 |
| <rdar://problem/36813568> |
| |
| Reviewed by Dean Jackson. |
| |
| Compute the "progress" and "currentIteration" properties on the dictionary returned by getComputedTiming(). |
| To support this we implement several procedures from the specification implemented separately with links |
| and steps copied from the specification. There is one last procedure we don't implement, which is to obtain |
| the transformed time following the application of the provided easing, which will be the next patch. |
| |
| * animation/AnimationEffect.cpp: |
| (WebCore::AnimationEffect::phase const): |
| (WebCore::AnimationEffect::activeTime const): |
| (WebCore::AnimationEffect::overallProgress const): |
| (WebCore::AnimationEffect::simpleIterationProgress const): |
| (WebCore::AnimationEffect::currentIteration const): |
| (WebCore::AnimationEffect::currentDirection const): |
| (WebCore::AnimationEffect::directedProgress const): |
| (WebCore::AnimationEffect::iterationProgress const): |
| (WebCore::AnimationEffect::getComputedTiming): |
| * animation/AnimationEffect.h: |
| |
| 2018-01-24 Daniel Bates <dabates@apple.com> |
| |
| REGRESSION (r226138): Selecting a line that ends with zero-width joiner (ZWJ) may cause text transformation |
| https://bugs.webkit.org/show_bug.cgi?id=181993 |
| <rdar://problem/36421080> |
| |
| Reviewed by David Hyatt. |
| |
| Re-implement paint optimization that was inadvertently removed in r226138. This optimization |
| works around an issue where selecting the last printable character in a line that is followed |
| followed by a zero-width joiner transforms the selected character. |
| |
| We need to fix <https://bugs.webkit.org/show_bug.cgi?id=181964> to improve the interaction |
| of selection and zero-width joiner characters. For now, re-implement a paint optimization |
| to perform a single paint operation when the style of the non-selected text is identical |
| to the style of the selected text. |
| |
| Test: fast/text/mac/select-character-before-zero-width-joiner.html |
| |
| * rendering/InlineTextBox.cpp: |
| (WebCore::InlineTextBox::MarkerSubrangeStyle::areBackgroundMarkerSubrangeStylesEqual): |
| (WebCore::InlineTextBox::MarkerSubrangeStyle::areForegroundMarkerSubrangeStylesEqual): |
| (WebCore::InlineTextBox::MarkerSubrangeStyle::areDecorationMarkerSubrangeStylesEqual): |
| Add helper functions to determine when marker styles are identical. We make use of these |
| equality functions to coalesce adjacent subranges that have the same visual style and |
| hence reduce the number of drawing commands to paint all the subranges in a line. |
| |
| (WebCore::InlineTextBox::paint): Coalesce subranges before painting. |
| |
| (WebCore::InlineTextBox::subdivideAndResolveStyle): Split out the logic to coalesce |
| subranges with the same style into its own function InlineTextBox::coalesceAdjacentSubranges() |
| and kept this function focused on subdivision and style resolution. Manually compute |
| the frontmost subranges so that we can resolve style for each subrange with respect to |
| the correct base style. Formerly we always resolved style with respect the specified |
| base style. Now we resolve style with respect the previous frontmost subrange to ensure |
| styles cascade as expected. This change causes no visual difference now. Once we implement |
| <https://bugs.webkit.org/show_bug.cgi?id=175784> we will be able to test this change |
| with respect to selection of ::spelling-error/::grammar-error pseudo elements. |
| |
| (WebCore::InlineTextBox::coalesceAdjacentSubranges): Extracted logic from InlineTextBox::subdivideAndResolveStyle(). |
| |
| (WebCore::InlineTextBox::MarkerSubrangeStyle::operator== const): Deleted. |
| (WebCore::InlineTextBox::MarkerSubrangeStyle::operator!= const): Deleted. |
| Comparing MarkerSubrangeStyle objects should be performed using the appropriate |
| are*MarkerSubrangeStylesEqual() non-member function. |
| |
| * rendering/InlineTextBox.h: |
| * rendering/MarkerSubrange.cpp: |
| (WebCore::subdivide): Remove overlap strategy FrontmostWithLongestEffectiveRange |
| as this strategy is now implemented by InlineTextBox::subdivideAndResolveStyle() and |
| InlineTextBox::coalesceAdjacentSubranges() that compute the set of frontmost subranges and |
| coalesces adjacent subranges with the same style into the longest effective subrange, |
| respectively. Unlike WebCore::subdivide(), InlineTextBox knows what the base style should |
| be for the subranges and can more aggressively coalesce adjacent subranges of different |
| types that have the same visual style. |
| * rendering/MarkerSubrange.h: |
| |
| 2018-01-24 Youenn Fablet <youenn@apple.com> |
| |
| Fetch response should copy its url from the request if null |
| https://bugs.webkit.org/show_bug.cgi?id=182048 |
| |
| Reviewed by Chris Dumez. |
| |
| No change of behavior. |
| |
| * loader/DocumentLoader.cpp: |
| (WebCore::DocumentLoader::responseReceived): Add assertion to check that the response URL is not null. |
| |
| 2018-01-24 Youenn Fablet <youenn@apple.com> |
| |
| Account for memory cache in DocumentThreadableLoader::didReceiveResponse assertion |
| https://bugs.webkit.org/show_bug.cgi?id=182049 |
| |
| Reviewed by Chris Dumez. |
| |
| No change of behavior. |
| A response served from Service Worker may be cached in Memory Cache and reused later on. |
| Update DTL assertion to handle that case. |
| |
| * loader/DocumentThreadableLoader.cpp: |
| (WebCore::DocumentThreadableLoader::didReceiveResponse): |
| |
| 2018-01-24 Eric Carlson <eric.carlson@apple.com> |
| |
| REGRESSION(r227457): Release assert in updateLayout while destructing a media element |
| https://bugs.webkit.org/show_bug.cgi?id=182038 |
| <rdar://problem/36812083> |
| |
| Reviewed by Jer Noble. |
| |
| * html/MediaElementSession.cpp: |
| (WebCore::isMainContentForPurposesOfAutoplay): Early return if element.isSuspended(). |
| * platform/audio/mac/MediaSessionManagerMac.mm: |
| (WebCore::MediaSessionManagerMac::clientCharacteristicsChanged): Call scheduleUpdateNowPlayingInfo |
| instead of updateNowPlayingInfo. |
| |
| 2018-01-24 Chris Fleizach <cfleizach@apple.com> |
| |
| AX: Provide a way for VoiceOver to uniquely identify a web session |
| https://bugs.webkit.org/show_bug.cgi?id=181894 |
| |
| Reviewed by Joanmarie Diggs. |
| |
| Add a way for VoiceOver to uniquely track a web page session. |
| |
| Test: accessibility/mac/session-id.html |
| |
| * accessibility/mac/WebAccessibilityObjectWrapperMac.mm: |
| (-[WebAccessibilityObjectWrapper accessibilityAttributeNames]): |
| (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]): |
| |
| 2018-01-24 Antti Koivisto <antti@apple.com> |
| |
| RenderBlockRareData::m_enclosingFragmentedFlow should be WeakPtr |
| https://bugs.webkit.org/show_bug.cgi?id=182045 |
| <rdar://problem/36334787> |
| |
| Reviewed by Zalan Bujtas. |
| |
| For safety. |
| |
| * rendering/RenderBlock.cpp: |
| (WebCore::RenderBlock::cachedEnclosingFragmentedFlow const): |
| (WebCore::RenderBlock::updateCachedEnclosingFragmentedFlow const): |
| (WebCore::RenderBlock::locateEnclosingFragmentedFlow const): |
| |
| 2018-01-23 Dean Jackson <dino@apple.com> |
| |
| REGRESSION (r222961?): sRGB images shown in WebGL are over-saturated on a wide gamut monitor |
| https://bugs.webkit.org/show_bug.cgi?id=182033 |
| <rdar://problem/36377780> |
| |
| Reviewed by Antoine Quint. |
| |
| My fix for YouTube360 changed the way we composite WebGL on macOS. Unfortunately it dropped |
| a flag telling the compositor the colorspace of the content should be sRGB. Reinstate this |
| by explicitly setting the colorspace on the IOSurface we use for WebGL back buffers. |
| |
| This *should* be covered by the test in: |
| fast/canvas/webgl/match-page-color-space.html |
| ... however, it shows a problem with our testing infrastructure. As long as it is not |
| testing on a Wide Gamut display, and explicitly setting the color profile, an automated |
| test won't pick up this regression. I could add an Internals helper to query the colorspace |
| of the WebGL content, but that doesn't actually verify the composited result, which is |
| all that matters. |
| |
| * platform/graphics/cocoa/WebGLLayer.mm: |
| (-[WebGLLayer allocateIOSurfaceBackingStoreWithSize:usingAlpha:]): |
| |
| 2018-01-24 Ms2ger <Ms2ger@igalia.com> |
| |
| [GTK] Fix some test failures in ATK selection handling. |
| https://bugs.webkit.org/show_bug.cgi?id=168369 |
| <rdar://problem/30534881> |
| |
| Reviewed by Joanmarie Diggs. |
| |
| In r208479, selectionBelongsToObject was changed to return false if the |
| intersectsNode call returns an exception. |
| |
| In particular, this caused accessibility/gtk/text-at-offset-textarea.html |
| to fail. In this test, the selection is situated in the shadow DOM of the |
| textarea, while the node that is checked for intersection is the textarea |
| itself. In line with the standard, intersectsNode returns an exception in |
| this case. |
| |
| This caused webkitAccessibleText{Word, Line, Sentence}ForBoundary to stop |
| returning the expected text in the tested case. Removing this check fixes |
| the test, along with some others. |
| |
| Tests: accessibility/gtk/text-at-offset-textarea.html |
| accessibility/gtk/text-at-offset-textinput.html |
| accessibility/selected-text-range-aria-elements.html |
| accessibility/textarea-selected-text-range.html |
| |
| * accessibility/atk/WebKitAccessibleInterfaceText.cpp: |
| (getSelectionOffsetsForObject): Remove the selectionBelongsToObject() call. |
| |
| 2018-01-18 Sergio Villar Senin <svillar@igalia.com> |
| |
| [WebVR] Add OpenVR to the tree and to the build |
| https://bugs.webkit.org/show_bug.cgi?id=177298 |
| |
| Reviewed by Žan Doberšek. |
| |
| Added build dependencies with the OpenVR library. |
| |
| * CMakeLists.txt: |
| |
| 2018-01-23 Wenson Hsieh <wenson_hsieh@apple.com> |
| |
| Harden against layout passes triggered when iterating through HTMLFormElement::associatedElements |
| https://bugs.webkit.org/show_bug.cgi?id=182037 |
| <rdar://problem/36747812> |
| |
| Reviewed by Ryosuke Niwa. |
| |
| Observe that HTMLFormElement::associatedElements returns a const reference to a Vector of raw |
| FormAssociatedElement pointers. In various call sites that iterate through these associated elements using this |
| function, some require synchronous layout updates per iteration, which can lead to a bad time when combined with |
| the first observation. |
| |
| To address this, we introduce HTMLFormElement::copyAssociatedElementsVector. This returns a new vector |
| containing strong Refs to each associated element. From each call site that may trigger synchronous layout and |
| execute arbitrary script while iterating over associated form elements, we instead use iterate over protected |
| FormAssociatedElements. |
| |
| From each call site that currently doesn't (and shouldn't) require a layout update, we use the old version that |
| returns a list of raw FormAssociatedElement pointers, but add ScriptDisallowedScopes to ensure that we never |
| execute script there in the future. |
| |
| Test: fast/forms/form-data-associated-element-iteration.html |
| |
| * html/DOMFormData.cpp: |
| (WebCore::DOMFormData::DOMFormData): |
| |
| Change to use copyAssociatedElementsVector(). |
| |
| * html/FormController.cpp: |
| (WebCore::recordFormStructure): |
| (WebCore::FormController::restoreControlStateIn): |
| |
| Change to use copyAssociatedElementsVector(). |
| |
| * html/HTMLFieldSetElement.cpp: |
| (WebCore::HTMLFieldSetElement::copyAssociatedElementsVector const): |
| (WebCore:: const): |
| (WebCore::HTMLFieldSetElement::length const): |
| |
| Refactor to use unsafeAssociatedElements(). |
| |
| * html/HTMLFieldSetElement.h: |
| * html/HTMLFormControlsCollection.cpp: |
| (WebCore:: const): |
| (WebCore::HTMLFormControlsCollection::copyFormControlElementsVector const): |
| (WebCore::HTMLFormControlsCollection::customElementAfter const): |
| (WebCore::HTMLFormControlsCollection::updateNamedElementCache const): |
| |
| Refactor these to use unsafeAssociatedElements(). |
| |
| * html/HTMLFormControlsCollection.h: |
| * html/HTMLFormElement.cpp: |
| (WebCore::HTMLFormElement::unsafeAssociatedElements const): |
| (WebCore::HTMLFormElement::copyAssociatedElementsVector const): |
| * html/HTMLFormElement.h: |
| * loader/FormSubmission.cpp: |
| (WebCore::FormSubmission::create): |
| |
| Refactor to use copyAssociatedElementsVector(). |
| |
| 2018-01-23 Basuke Suzuki <Basuke.Suzuki@sony.com> |
| |
| [Curl] Fix wrong redirection with relative url when it happens from |
| different host than original host. |
| https://bugs.webkit.org/show_bug.cgi?id=181873 |
| |
| Reviewed by Alex Christensen. |
| |
| * platform/network/curl/CurlDownload.cpp: |
| (WebCore::CurlDownload::willSendRequest): |
| * platform/network/curl/ResourceHandleCurlDelegate.cpp: |
| (WebCore::ResourceHandleCurlDelegate::willSendRequest): |
| |
| 2018-01-23 Eric Carlson <eric.carlson@apple.com> |
| |
| Resign NowPlaying status when no media element is eligible |
| https://bugs.webkit.org/show_bug.cgi?id=181914 |
| <rdar://problem/35294116> |
| |
| Reviewed by Jer Noble. |
| |
| Updated API test. |
| |
| * html/HTMLMediaElement.cpp: |
| (WebCore::HTMLMediaElement::removedFromAncestor): Call mediaSession->clientCharacteristicsChanged |
| so NowPlaying status will be updated. |
| |
| * html/MediaElementSession.cpp: |
| (WebCore::MediaElementSession::playbackPermitted const): Return early when the media |
| element has been suspended. |
| (WebCore::MediaElementSession::canShowControlsManager const): Return false when being queried |
| for NowPlaying status in an inactive document or when element has been suspended. |
| (WebCore::isMainContentForPurposesOfAutoplay): Return early if it isn't safe to update |
| style because HitTest can force a layout. |
| (WebCore::MediaElementSession::updateIsMainContent const): Ditto. |
| |
| * platform/audio/PlatformMediaSessionManager.cpp: |
| (WebCore::PlatformMediaSessionManager::updateNowPlayingInfoIfNecessary): Implement in for all |
| ports. |
| * platform/audio/PlatformMediaSessionManager.h: |
| (WebCore::PlatformMediaSessionManager::registeredAsNowPlayingApplication const): |
| * platform/audio/ios/MediaSessionManagerIOS.h: |
| * platform/audio/mac/MediaSessionManagerMac.h: |
| * platform/audio/mac/MediaSessionManagerMac.mm: |
| (WebCore::MediaSessionManagerMac::updateNowPlayingInfo): Call MRMediaRemoteSetCanBeNowPlayingApplication |
| whenever status changes. |
| (WebCore::PlatformMediaSessionManager::updateNowPlayingInfoIfNecessary): Deleted, implemented |
| in the base class. |
| |
| 2018-01-23 Alex Christensen <achristensen@webkit.org> |
| |
| Use CompletionHandlers for ResourceHandleClient::didReceiveResponseAsync |
| https://bugs.webkit.org/show_bug.cgi?id=181961 |
| |
| Reviewed by Michael Catanzaro. |
| |
| No change in behavior. |
| |
| * loader/ResourceLoader.cpp: |
| (WebCore::ResourceLoader::didReceiveResponseAsync): |
| * loader/ResourceLoader.h: |
| * loader/appcache/ApplicationCacheGroup.cpp: |
| (WebCore::ApplicationCacheGroup::didReceiveResponseAsync): |
| * loader/appcache/ApplicationCacheGroup.h: |
| * platform/network/BlobResourceHandle.cpp: |
| (WebCore::BlobResourceHandle::notifyResponseOnSuccess): |
| (WebCore::BlobResourceHandle::notifyResponseOnError): |
| (WebCore::BlobResourceHandle::continueDidReceiveResponse): Deleted. |
| * platform/network/BlobResourceHandle.h: |
| * platform/network/PingHandle.h: |
| * platform/network/ResourceHandle.cpp: |
| (WebCore::ResourceHandle::didReceiveResponse): |
| * platform/network/ResourceHandle.h: |
| * platform/network/ResourceHandleClient.h: |
| * platform/network/SynchronousLoaderClient.cpp: |
| (WebCore::SynchronousLoaderClient::didReceiveResponseAsync): |
| * platform/network/SynchronousLoaderClient.h: |
| * platform/network/cf/ResourceHandleCFURLConnectionDelegateWithOperationQueue.cpp: |
| (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::didReceiveResponse): |
| (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::continueDidReceiveResponse): Deleted. |
| * platform/network/curl/ResourceHandleCurlDelegate.cpp: |
| (WebCore::ResourceHandleCurlDelegate::curlDidReceiveResponse): |
| (WebCore::ResourceHandleCurlDelegate::handleDataURL): |
| (WebCore::ResourceHandleCurlDelegate::continueDidReceiveResponse): Deleted. |
| * platform/network/mac/ResourceHandleMac.mm: |
| (WebCore::ResourceHandle::continueDidReceiveResponse): Deleted. |
| * platform/network/mac/WebCoreResourceHandleAsOperationQueueDelegate.h: |
| * platform/network/mac/WebCoreResourceHandleAsOperationQueueDelegate.mm: |
| (-[WebCoreResourceHandleAsOperationQueueDelegate connection:didReceiveResponse:]): |
| (-[WebCoreResourceHandleAsOperationQueueDelegate continueDidReceiveResponse]): Deleted. |
| * platform/network/soup/ResourceHandleSoup.cpp: |
| (WebCore::nextMultipartResponsePartCallback): |
| (WebCore::sendRequestCallback): |
| (WebCore::ResourceHandle::continueDidReceiveResponse): Deleted. |
| |
| 2018-01-23 Chris Dumez <cdumez@apple.com> |
| |
| Unreviewed, rollout r227216 as it seems to be causing deadlocks |
| https://bugs.webkit.org/show_bug.cgi?id=182013 |
| |
| * page/ChromeClient.h: |
| * testing/Internals.cpp: |
| (WebCore::Internals::testIncomingSyncIPCMessageWhileWaitingForSyncReply): Deleted. |
| * testing/Internals.h: |
| * testing/Internals.idl: |
| |
| 2018-01-23 Ali Juma <ajuma@chromium.org> |
| |
| REGRESSION (r226622): ASSERTION FAILED: !m_frame in WebCore::DOMWindowProperty::willDestroyGlobalObjectInCachedFrame() |
| https://bugs.webkit.org/show_bug.cgi?id=181756 |
| |
| Reviewed by Simon Fraser. |
| |
| Don't create a VisualViewport for a suspended DOMWindow. When a DOMWindow is suspended |
| for document suspension, all DOMWindowProperties are disconnected from their frame. |
| Creating a new VisualViewport while in this state means unexpectedly having a DOMWindowProperty |
| that's connected to a frame, and this leads to an assertion failure. |
| |
| Test: http/tests/navigation/https-in-page-cache.html |
| |
| * page/DOMWindow.cpp: |
| (WebCore::DOMWindow::visualViewport const): |
| Don't create a VisualViewport while suspended. |
| * page/FrameView.cpp: |
| (WebCore::FrameView::updateLayoutViewport): |
| Handle null DOMWindow::visualViewport. |
| |
| 2018-01-23 Basuke Suzuki <Basuke.Suzuki@sony.com> |
| |
| [Curl] CurlRequest must protect its client from disposal while it's on duty. |
| https://bugs.webkit.org/show_bug.cgi?id=181875 |
| |
| Reviewed by Alex Christensen. |
| |
| No new tests. It's covered by existing tests. |
| |
| * platform/network/curl/CurlDownload.h: |
| * platform/network/curl/CurlRequest.cpp: |
| (WebCore::CurlRequest::callClient): |
| (WebCore::CurlRequest::didReceiveData): |
| (WebCore::CurlRequest::didReceiveDataFromMultipart): |
| (WebCore::CurlRequest::didCompleteTransfer): |
| (WebCore::CurlRequest::invokeDidReceiveResponse): |
| * platform/network/curl/CurlRequest.h: |
| * platform/network/curl/CurlRequestClient.h: |
| * platform/network/curl/ResourceHandleCurlDelegate.h: |
| |
| 2018-01-23 Commit Queue <commit-queue@webkit.org> |
| |
| Unreviewed, rolling out r227437. |
| https://bugs.webkit.org/show_bug.cgi?id=182011 |
| |
| broke build (Requested by alexchristensen on #webkit). |
| |
| Reverted changeset: |
| |
| "Remove unused QTKit preference" |
| https://bugs.webkit.org/show_bug.cgi?id=181968 |
| https://trac.webkit.org/changeset/227437 |
| |
| 2018-01-23 Antoine Quint <graouts@apple.com> |
| |
| [Web Animations] Expose getKeyframes() and parsing of remaining keyframe properties |
| https://bugs.webkit.org/show_bug.cgi?id=181978 |
| |
| Not reviewed. |
| |
| Fix failures for http/wpt/web-animations/interfaces/AnimationEffectTiming/easing.html introduced in the previous patch. |
| Those keyword values are not expected. |
| |
| * platform/animation/TimingFunction.cpp: |
| (WebCore::TimingFunction::cssText const): |
| |
| 2018-01-23 Simon Fraser <simon.fraser@apple.com> |
| |
| feMorphology stops applying if either x or y radius is 0 but should not. |
| https://bugs.webkit.org/show_bug.cgi?id=181903 |
| |
| Reviewed by Dean Jackson. |
| |
| feMorphology should allow the radius on one axis to be zero but still apply the effect |
| (it's akin to a blur on just one axis). Also, any negative radius, or zero on both axes |
| should act like a pass-through, rather than outputting transparent blank (this is a spec |
| change from SVG 1.1 to SVG 2). |
| |
| Tests: svg/filters/feMorphology-zero-radius-one-axis-expected.svg |
| svg/filters/feMorphology-zero-radius-one-axis.svg |
| |
| * platform/graphics/filters/FEMorphology.cpp: |
| (WebCore::FEMorphology::platformApplyDegenerate): |
| * platform/graphics/filters/FilterEffect.cpp: |
| (WebCore::FilterEffect::createImageBufferResult): |
| |
| 2018-01-23 Alex Christensen <achristensen@webkit.org> |
| |
| Remove unused MediaPlayerSupportsTypeClient |
| https://bugs.webkit.org/show_bug.cgi?id=182003 |
| |
| Reviewed by Sam Weinig. |
| |
| This was used for a QTKit-specific hack I removed in r227372. |
| |
| * Modules/encryptedmedia/CDM.cpp: |
| (WebCore::CDM::getSupportedCapabilitiesForAudioVideoType): |
| * Modules/mediasource/MediaSource.cpp: |
| (WebCore::MediaSource::isTypeSupported): |
| * dom/DOMImplementation.cpp: |
| (WebCore::DOMImplementation::createDocument): |
| (WebCore::DOMImplementationSupportsTypeClient::DOMImplementationSupportsTypeClient): Deleted. |
| (): Deleted. |
| * html/HTMLMediaElement.cpp: |
| (WebCore::HTMLMediaElement::canPlayType const): |
| (WebCore::HTMLMediaElement::selectNextSourceChild): |
| (WebCore::HTMLMediaElement::mediaPlayerNeedsSiteSpecificHacks const): Deleted. |
| (WebCore::HTMLMediaElement::mediaPlayerDocumentHost const): Deleted. |
| * html/HTMLMediaElement.h: |
| * platform/graphics/MediaPlayer.cpp: |
| (WebCore::MediaPlayer::supportsType): |
| * platform/graphics/MediaPlayer.h: |
| (WebCore::MediaPlayerSupportsTypeClient::mediaPlayerNeedsSiteSpecificHacks const): Deleted. |
| (WebCore::MediaPlayerSupportsTypeClient::mediaPlayerDocumentHost const): Deleted. |
| |
| 2018-01-23 Alex Christensen <achristensen@webkit.org> |
| |
| Remove unused QTKit preference |
| https://bugs.webkit.org/show_bug.cgi?id=181968 |
| |
| Reviewed by Alexey Proskuryakov. |
| |
| They weren't used and didn't do anything. |
| |
| * page/DeprecatedGlobalSettings.cpp: |
| (WebCore::DeprecatedGlobalSettings::setQTKitEnabled): Deleted. |
| * page/DeprecatedGlobalSettings.h: |
| (WebCore::DeprecatedGlobalSettings::isQTKitEnabled): Deleted. |
| |
| 2018-01-23 Javier Fernandez <jfernandez@igalia.com> |
| |
| [css-align] 'left' and 'right' should parse as invalid in block/cross-axis alignment |
| https://bugs.webkit.org/show_bug.cgi?id=181792 |
| |
| Reviewed by Antti Koivisto. |
| |
| The CSS WG resolved to remove the 'left' and 'right' values from the |
| block/cross axis alignment properties. |
| |
| https://github.com/w3c/csswg-drafts/issues/1403 |
| |
| This patch changes the CSS parsing logic of all the CSS Box Alignment |
| properties, both block-axis (align-{self, items, content} and |
| inline-axis (justify-{self, items, content}). |
| |
| Additionally, the alignment shorthands (place-{self, items, content}) |
| have been also changed to respect the new syntax. |
| |
| Despite the number of layout tests changed, I don't think this |
| change will break any content in current sites. The CSS values |
| 'left' and 'right' were introduced by the new CSS Box Alignment |
| spec and only implemented by the CSS Grid Layout feature, shipped |
| last year. Additionally, the removed values have no effect on the |
| layout result when they are applied to the block/cross-axis CSS |
| Alignment properties. |
| |
| Tests: imported/w3c/web-platform-tests/css/css-align/content-distribution/parse-align-content-001.html |
| imported/w3c/web-platform-tests/css/css-align/content-distribution/parse-align-content-002.html |
| imported/w3c/web-platform-tests/css/css-align/content-distribution/parse-align-content-003.html |
| imported/w3c/web-platform-tests/css/css-align/content-distribution/parse-align-content-004.html |
| imported/w3c/web-platform-tests/css/css-align/content-distribution/parse-align-content-005.html |
| imported/w3c/web-platform-tests/css/css-align/content-distribution/parse-justify-content-001.html |
| imported/w3c/web-platform-tests/css/css-align/content-distribution/parse-justify-content-002.html |
| imported/w3c/web-platform-tests/css/css-align/content-distribution/parse-justify-content-003.html |
| imported/w3c/web-platform-tests/css/css-align/content-distribution/parse-justify-content-004.html |
| imported/w3c/web-platform-tests/css/css-align/content-distribution/parse-justify-content-005.html |
| imported/w3c/web-platform-tests/css/css-align/content-distribution/place-content-shorthand-001.html |
| imported/w3c/web-platform-tests/css/css-align/content-distribution/place-content-shorthand-002.html |
| imported/w3c/web-platform-tests/css/css-align/content-distribution/place-content-shorthand-003.html |
| imported/w3c/web-platform-tests/css/css-align/content-distribution/place-content-shorthand-004.html |
| imported/w3c/web-platform-tests/css/css-align/content-distribution/place-content-shorthand-005.html |
| imported/w3c/web-platform-tests/css/css-align/content-distribution/place-content-shorthand-006.html |
| imported/w3c/web-platform-tests/css/css-align/default-alignment/justify-items-legacy-001.html |
| imported/w3c/web-platform-tests/css/css-align/default-alignment/parse-align-items-001.html |
| imported/w3c/web-platform-tests/css/css-align/default-alignment/parse-align-items-002.html |
| imported/w3c/web-platform-tests/css/css-align/default-alignment/parse-align-items-003.html |
| imported/w3c/web-platform-tests/css/css-align/default-alignment/parse-align-items-004.html |
| imported/w3c/web-platform-tests/css/css-align/default-alignment/parse-align-items-005.html |
| imported/w3c/web-platform-tests/css/css-align/default-alignment/parse-justify-items-001.html |
| imported/w3c/web-platform-tests/css/css-align/default-alignment/parse-justify-items-002.html |
| imported/w3c/web-platform-tests/css/css-align/default-alignment/parse-justify-items-003.html |
| imported/w3c/web-platform-tests/css/css-align/default-alignment/parse-justify-items-004.html |
| imported/w3c/web-platform-tests/css/css-align/default-alignment/parse-justify-items-005.html |
| imported/w3c/web-platform-tests/css/css-align/default-alignment/parse-justify-items-006.html |
| imported/w3c/web-platform-tests/css/css-align/default-alignment/place-items-shorthand-001.html |
| imported/w3c/web-platform-tests/css/css-align/default-alignment/place-items-shorthand-002.html |
| imported/w3c/web-platform-tests/css/css-align/default-alignment/place-items-shorthand-003.html |
| imported/w3c/web-platform-tests/css/css-align/default-alignment/place-items-shorthand-004.html |
| imported/w3c/web-platform-tests/css/css-align/default-alignment/place-items-shorthand-005.html |
| imported/w3c/web-platform-tests/css/css-align/default-alignment/place-items-shorthand-006.html |
| imported/w3c/web-platform-tests/css/css-align/distribution-values/space-evenly-001.html |
| imported/w3c/web-platform-tests/css/css-align/self-alignment/parse-align-self-001.html |
| imported/w3c/web-platform-tests/css/css-align/self-alignment/parse-align-self-002.html |
| imported/w3c/web-platform-tests/css/css-align/self-alignment/parse-align-self-003.html |
| imported/w3c/web-platform-tests/css/css-align/self-alignment/parse-align-self-004.html |
| imported/w3c/web-platform-tests/css/css-align/self-alignment/parse-align-self-005.html |
| imported/w3c/web-platform-tests/css/css-align/self-alignment/parse-justify-self-001.html |
| imported/w3c/web-platform-tests/css/css-align/self-alignment/parse-justify-self-002.html |
| imported/w3c/web-platform-tests/css/css-align/self-alignment/parse-justify-self-003.html |
| imported/w3c/web-platform-tests/css/css-align/self-alignment/parse-justify-self-004.html |
| imported/w3c/web-platform-tests/css/css-align/self-alignment/parse-justify-self-005.html |
| imported/w3c/web-platform-tests/css/css-align/self-alignment/place-self-shorthand-001.html |
| imported/w3c/web-platform-tests/css/css-align/self-alignment/place-self-shorthand-002.html |
| imported/w3c/web-platform-tests/css/css-align/self-alignment/place-self-shorthand-003.html |
| imported/w3c/web-platform-tests/css/css-align/self-alignment/place-self-shorthand-004.html |
| imported/w3c/web-platform-tests/css/css-align/self-alignment/place-self-shorthand-005.html |
| imported/w3c/web-platform-tests/css/css-align/self-alignment/place-self-shorthand-006.html |
| |
| * css/parser/CSSPropertyParser.cpp: |
| (WebCore::isLeftOrRightKeyword): |
| (WebCore::isContentPositionKeyword): |
| (WebCore::isContentPositionOrLeftOrRightKeyword): |
| (WebCore::consumeContentDistributionOverflowPosition): |
| (WebCore::isSelfPositionKeyword): |
| (WebCore::isSelfPositionOrLeftOrRightKeyword): |
| (WebCore::consumeSelfPositionOverflowPosition): |
| (WebCore::consumeAlignItems): |
| (WebCore::consumeJustifyItems): |
| (WebCore::CSSPropertyParser::parseSingleValue): |
| (WebCore::consumeSimplifiedContentPosition): |
| (WebCore::CSSPropertyParser::consumePlaceContentShorthand): |
| (WebCore::consumeSimplifiedItemPosition): |
| (WebCore::CSSPropertyParser::consumePlaceItemsShorthand): |
| (WebCore::CSSPropertyParser::consumePlaceSelfShorthand): |
| |
| 2018-01-23 Simon Fraser <simon.fraser@apple.com> |
| |
| Element with position:fixed stops scrolling at the bottom of the page, but is painted in the right place on Chacos.com. |
| https://bugs.webkit.org/show_bug.cgi?id=181741 |
| rdar://problem/36593581 |
| |
| Reviewed by Tim Horton. |
| |
| The #ifdef for iOS was wrong; on iOS, visibleSize() is in content coordinates and matches |
| unscaledDocumentRect, so there's no need to scale it. Doing so computed the wrong unscaledMaximumScrollPosition |
| which broke hit-testing when the document minimum scale was > 1. |
| |
| Test: fast/visual-viewport/ios/min-scale-greater-than-one.html |
| |
| * page/FrameView.cpp: |
| (WebCore::FrameView::unscaledMaximumScrollPosition const): |
| |
| 2018-01-23 Antoine Quint <graouts@apple.com> |
| |
| [Web Animations] Expose getKeyframes() and parsing of remaining keyframe properties |
| https://bugs.webkit.org/show_bug.cgi?id=181978 |
| <rdar://problem/36772586> |
| |
| Reviewed by Dean Jackson. |
| |
| We finish our implementation of multiple keyframes by exposing the getKeyframes() method on KeyframeEffect and |
| parsing the remaining properties that can be exposed on keyframes: "easing" and "composite". And since we parse |
| those properties on keyframes, we also parse "easing" on AnimationEffectTiming and "composite" and "iterationComposite" |
| on KeyframeEffect. |
| |
| To support this, we implement a new TimingFunction::createFromCSSText() method which takes in a string that is |
| a value provided directly via the JS API. As its converse, we expose a TimingFunction::cssText() method which |
| provides a string that can be sent back to JS to represent a timing function, using keywords when the timing |
| function matches one and ommitting default values. |
| |
| We now also keep track of the original "offset" value provided through the JS API since that value is required |
| when calling getKeyframes() and distinct from the "computedOffset". These original offsets, composite operations |
| and timing functions are kept as separate Vectors from the KeyframeList since this type does not support exposing |
| those. We may consider improving that in a future patch. |
| |
| Finally, we make some adjustments in the keyframe parsing to comply with the specification and correctly parse |
| all provided timing functions, regardless of the number of keyframes and timing functions provided. |
| |
| Note that this patch is only about parsing, storing and returning provided easing and composite operations but |
| that such values will only be used for the resolution of animation effects in future patches. |
| |
| * animation/AnimationEffect.cpp: |
| (WebCore::AnimationEffect::getComputedTiming): Set the "easing" property on the getComputedTiming() return value |
| now that we expose "easing" on AnimationEffectTiming. |
| * animation/AnimationEffectTiming.cpp: |
| (WebCore::AnimationEffectTiming::AnimationEffectTiming): Create a linear TimingFunction by default. |
| (WebCore::AnimationEffectTiming::setEasing): Parse the "easing" value and propagate an exception for invalid values. |
| * animation/AnimationEffectTiming.h: Expose the new "easing" property and backing TimingFunction. |
| * animation/AnimationEffectTiming.idl: Expose the new "easing" property. |
| * animation/KeyframeEffect.cpp: |
| (WebCore::CSSPropertyIDToIDLAttributeName): Provide a way to convert the name of a CSS property to a string that can |
| be used to generate a JS property name for use by getKeyframes(). |
| (WebCore::computeMissingKeyframeOffsets): Implement the full steps of the spec. |
| (WebCore::processIterableKeyframes): Fix a problematic declaration for the easing variable. |
| (WebCore::processPropertyIndexedKeyframes): Now that ProcessedKeyframe has both an offset and a computedOffset, use |
| computed offsets. We also fix a couple of loops to fix compliance issues revealed by WPT tests. |
| (WebCore::KeyframeEffect::create): Parse the provided "easing" property on the KeyframeEffectOptions object. |
| (WebCore::KeyframeEffect::getKeyframes): Implement the getKeyframes() method as mandated by the spec. |
| (WebCore::KeyframeEffect::processKeyframes): Keep a list of unused easings so these might be parsed as well, and |
| potentially throw exceptions, as mandated by the spec. For valid easings, store their matching TimingFunction in |
| m_timingFunctions, original offset values in m_offsets and CompositeOperation values in m_compositeOperations. |
| * animation/KeyframeEffect.h: Switch the order in which we specify some of the Variant types so that default values |
| are correctly used. |
| * animation/KeyframeEffect.idl: Switch the order in which we specify some of the Variant types so that default values |
| are correctly used. |
| * platform/animation/TimingFunction.cpp: |
| (WebCore::TimingFunction::createFromCSSText): |
| (WebCore::TimingFunction::cssText const): |
| * platform/animation/TimingFunction.h: |
| |
| 2018-01-23 Brady Eidson <beidson@apple.com> |
| |
| Allow passing MessagePorts across processes (e.g. ServiceWorkers). |
| https://bugs.webkit.org/show_bug.cgi?id=181178 |
| |
| Reviewed by Andy Estes. |
| |
| Test: http/tests/workers/service/basic-messageport.html |
| |
| * dom/MessagePort.cpp: |
| (WebCore::MessagePort::MessagePort): |
| (WebCore::MessagePort::~MessagePort): |
| |
| * dom/messageports/MessagePortChannel.cpp: |
| (WebCore::MessagePortChannel::entanglePortWithProcess): |
| * dom/messageports/MessagePortChannel.h: |
| |
| * workers/service/SWClientConnection.cpp: |
| (WebCore::SWClientConnection::postMessageToServiceWorkerClient): |
| * workers/service/SWClientConnection.h: |
| |
| * workers/service/ServiceWorker.cpp: |
| (WebCore::ServiceWorker::postMessage): |
| |
| * workers/service/ServiceWorkerClient.cpp: |
| (WebCore::ServiceWorkerClient::postMessage): |
| |
| * workers/service/context/SWContextManager.cpp: |
| (WebCore::SWContextManager::postMessageToServiceWorker): |
| * workers/service/context/SWContextManager.h: |
| |
| 2018-01-23 Commit Queue <commit-queue@webkit.org> |
| |
| Unreviewed, rolling out r227279 and r227373. |
| https://bugs.webkit.org/show_bug.cgi?id=181988 |
| |
| The LayoutTest crash fix introduced an API test failure. |
| (Requested by ryanhaddad on #webkit). |
| |
| Reverted changesets: |
| |
| "Resign NowPlaying status when no media element is eligible" |
| https://bugs.webkit.org/show_bug.cgi?id=181914 |
| https://trac.webkit.org/changeset/227279 |
| |
| "Resign NowPlaying status when no media element is eligible" |
| https://bugs.webkit.org/show_bug.cgi?id=181914 |
| https://trac.webkit.org/changeset/227373 |
| |
| 2018-01-23 Michael Catanzaro <mcatanzaro@igalia.com> |
| |
| Unreviewed, fix some format specifiers added in r227190 |
| https://bugs.webkit.org/show_bug.cgi?id=181454 |
| |
| * dom/messageports/MessagePortChannel.cpp: |
| (WebCore::MessagePortChannel::takeAllMessagesForPort): |
| |
| 2018-01-23 Ting-Wei Lan <lantw44@gmail.com> |
| |
| [GTK] Add user agent quirk for Microsoft Outlook Web App |
| https://bugs.webkit.org/show_bug.cgi?id=181982 |
| |
| Reviewed by Michael Catanzaro. |
| |
| Microsoft Outlook Web App forces users to switch to the lite version on |
| the login page with our standard user agent on all non-macOS systems. |
| Since it is an application that can be installed by different companies, |
| schools and organizations, it is not possible to fix the issue unless |
| we keep a big list of host names that are known to run it. We check the |
| host name instead of the base domain name here because it is not |
| expected to run all sites under a base domain on this webmail and |
| calendar application. |
| |
| https://mail.ntu.edu.tw is a site that is known to run Microsoft Outlook |
| Web App for several years, and it is not likely to change. When there |
| are other sites found to run it and having the same user agent problem, |
| we can expand the list to include them. |
| |
| * platform/UserAgentQuirks.cpp: |
| (WebCore::urlRequiresMacintoshPlatform): |
| |
| 2018-01-23 Yacine Bandou <yacine.bandou_ext@softathome.com> |
| |
| [EME] Add support of multi keys from different sessions in CDMinstanceClearKey |
| https://bugs.webkit.org/show_bug.cgi?id=180083 |
| |
| Reviewed by Xabier Rodriguez-Calvar. |
| |
| Add support of multi keys from different MediaKeySession in CDMInstanceClearKey. |
| |
| Currently the CDMInstanceClearKey manages two "m_keys", one is a WTF::Vector |
| where it stores the list of last added keys, an other which is defined in the |
| ClearKeyState::singleton it is a WTF::HashMap, in this last one, it stores the |
| keys lists of each created session. |
| |
| The method "keys()" of CDMInstanceClearKey returns the first "m_keys" which |
| contains just the list of last keys. |
| |
| The goal of this commit is to return all keys lists of all sessions, thus |
| we remove the "m_keys" which is WTF::Vector and we modify the method |
| "keys()" to return all keys lists, which is stored in "m_keys" WTF::HashMap, |
| in one Vector instead of return just the list of last keys. |
| |
| * platform/encryptedmedia/clearkey/CDMClearKey.cpp: |
| (WebCore::CDMInstanceClearKey::keys const): |
| (WebCore::CDMInstanceClearKey::updateLicense): |
| * platform/encryptedmedia/clearkey/CDMClearKey.h: |
| |
| 2018-01-22 Simon Fraser <simon.fraser@apple.com> |
| |
| Optimize building the non-fast scrollable region with multiple iframes |
| https://bugs.webkit.org/show_bug.cgi?id=181971 |
| |
| Reviewed by Zalan Bujtas. |
| |
| AsyncScrollingCoordinator::frameViewLayoutUpdated() is called every time a subframe lays out. |
| We don't need to eagerly update the non-fast scrollable region at this time; we can just mark |
| it dirty, and rely on the existing scrolling tree commit code to recompute it. |
| |
| On my machine this makes fast/frames/lots-of-objects.html no longer a timeout. |
| |
| * page/scrolling/AsyncScrollingCoordinator.cpp: |
| (WebCore::AsyncScrollingCoordinator::frameViewLayoutUpdated): |
| |
| 2018-01-22 Jiewen Tan <jiewen_tan@apple.com> |
| |
| [WebAuthN] Implement PublicKeyCredential's [[Create]] with a dummy authenticator |
| https://bugs.webkit.org/show_bug.cgi?id=181928 |
| <rdar://problem/36459893> |
| |
| Reviewed by Brent Fulgham. |
| |
| This patch implements PublicKeyCredential's [[Create]] from https://www.w3.org/TR/webauthn/#createCredential |
| as of 5 December 2017. In order to do testing, a dummy authenticator is implemented to exercise a failure |
| and a pass path. A number of dependencies need to be resolved later in order to comply with the spec. |
| Also, the current architecture of handling async WebAuthN operations including dispatching, timeout, and aborting |
| might need a redesign once the underlying authenticator is clear. Since this is our first attempt to implement |
| a prototype, all those limitations, in my opinion, can be marked as non-blocking to accelerate the whole |
| process. Those limitations will then be addressed once the first prototype is finshed. |
| |
| Tests: http/tests/webauthn/public-key-credential-create-with-invalid-parameters.https.html |
| http/tests/webauthn/public-key-credential-same-origin-with-ancestors-2.https.html |
| http/tests/webauthn/public-key-credential-same-origin-with-ancestors.https.html |
| http/wpt/webauthn/idl.https.html |
| http/wpt/webauthn/public-key-credential-create-failure.https.html |
| http/wpt/webauthn/public-key-credential-create-success.https.html |
| |
| * Modules/credentialmanagement/BasicCredential.h: |
| * Modules/credentialmanagement/BasicCredential.idl: |
| * Modules/credentialmanagement/CredentialsContainer.cpp: |
| (WebCore::CredentialsContainer::PendingPromise::PendingPromise): |
| (WebCore::CredentialsContainer::dispatchTask): |
| (WebCore::CredentialsContainer::get): |
| (WebCore::CredentialsContainer::isCreate): |
| (WebCore::CredentialsContainer::preventSilentAccess const): |
| (WebCore::CredentialsContainer::preventSilentAccess): Deleted. |
| * Modules/credentialmanagement/CredentialsContainer.h: |
| (WebCore::CredentialsContainer::PendingPromise::create): |
| * Modules/webauthn/Authenticator.cpp: Copied from Source/WebCore/Modules/webauthn/AuthenticatorResponse.cpp. |
| (WebCore::Authenticator::singleton): |
| (WebCore::Authenticator::makeCredential const): |
| * Modules/webauthn/Authenticator.h: Copied from Source/WebCore/Modules/webauthn/PublicKeyCredentialCreationOptions.h. |
| * Modules/webauthn/AuthenticatorAssertionResponse.cpp: |
| (WebCore::AuthenticatorAssertionResponse::authenticatorData const): |
| (WebCore::AuthenticatorAssertionResponse::signature const): |
| (WebCore::AuthenticatorAssertionResponse::userHandle const): |
| (WebCore::AuthenticatorAssertionResponse::~AuthenticatorAssertionResponse): Deleted. |
| (WebCore::AuthenticatorAssertionResponse::authenticatorData): Deleted. |
| (WebCore::AuthenticatorAssertionResponse::signature): Deleted. |
| (WebCore::AuthenticatorAssertionResponse::userHandle): Deleted. |
| * Modules/webauthn/AuthenticatorAssertionResponse.h: |
| (WebCore::AuthenticatorAssertionResponse::create): |
| * Modules/webauthn/AuthenticatorAttestationResponse.cpp: |
| (WebCore::AuthenticatorAttestationResponse::attestationObject const): |
| (WebCore::AuthenticatorAttestationResponse::~AuthenticatorAttestationResponse): Deleted. |
| (WebCore::AuthenticatorAttestationResponse::attestationObject): Deleted. |
| * Modules/webauthn/AuthenticatorAttestationResponse.h: |
| (WebCore::AuthenticatorAttestationResponse::create): |
| * Modules/webauthn/AuthenticatorResponse.cpp: |
| (WebCore::AuthenticatorResponse::clientDataJSON const): |
| (WebCore::AuthenticatorResponse::~AuthenticatorResponse): Deleted. |
| (WebCore::AuthenticatorResponse::clientDataJSON): Deleted. |
| * Modules/webauthn/AuthenticatorResponse.h: |
| * Modules/webauthn/AuthenticatorResponse.idl: |
| * Modules/webauthn/PublicKeyCredential.cpp: |
| (WebCore::PublicKeyCredentialInternal::produceClientDataJson): |
| (WebCore::PublicKeyCredentialInternal::produceClientDataJsonHash): |
| (WebCore::PublicKeyCredentialInternal::getIdFromAttestationObject): |
| (WebCore::PublicKeyCredential::PublicKeyCredential): |
| (WebCore::PublicKeyCredential::discoverFromExternalSource): |
| (WebCore::PublicKeyCredential::create): |
| (WebCore::PublicKeyCredential::rawId const): |
| (WebCore::PublicKeyCredential::response const): |
| (WebCore::PublicKeyCredential::getClientExtensionResults const): |
| (WebCore::PublicKeyCredential::rawId): Deleted. |
| (WebCore::PublicKeyCredential::response): Deleted. |
| (WebCore::PublicKeyCredential::getClientExtensionResults): Deleted. |
| * Modules/webauthn/PublicKeyCredential.h: |
| * Modules/webauthn/PublicKeyCredential.idl: |
| * Modules/webauthn/PublicKeyCredentialCreationOptions.h: |
| (): Deleted. |
| * Modules/webauthn/PublicKeyCredentialDescriptor.h: |
| * Modules/webauthn/PublicKeyCredentialDescriptor.idl: |
| * Sources.txt: |
| * WebCore.xcodeproj/project.pbxproj: |
| * bindings/js/JSAuthenticatorResponseCustom.cpp: Copied from Source/WebCore/Modules/webauthn/AuthenticatorAttestationResponse.cpp. |
| (WebCore::toJSNewlyCreated): |
| (WebCore::toJS): |
| * bindings/js/JSBasicCredentialCustom.cpp: Copied from Source/WebCore/Modules/webauthn/AuthenticatorResponse.cpp. |
| (WebCore::toJSNewlyCreated): |
| (WebCore::toJS): |
| * bindings/js/JSBindingsAllInOne.cpp: |
| |
| 2018-01-22 Myles C. Maxfield <mmaxfield@apple.com> |
| |
| [Cocoa] Support font collections |
| https://bugs.webkit.org/show_bug.cgi?id=181826 |
| <rdar://problem/36455137> |
| |
| Reviewed by Dean Jackson. |
| |
| Use the CoreText call CTFontManagerCreateFontDescriptorsFromData() to get all the descriptors inside |
| the collection file. We select which one by using the fragment identifier at the end of the url linking |
| to the remote font. For example, to select the 4th font inside a TTC file, the @font-face block would |
| look like: |
| |
| @font-face { |
| font-family: "MyFont"; |
| src: url("path/to/font.ttc#4"); |
| } |
| |
| Note that these numbers are 1-indexed. |
| |
| The CSS Fonts spec states: |
| > Fragment identifiers are used to indicate which font to load. If a container format lacks a defined |
| > fragment identifier scheme, implementations should use a simple 1-based indexing scheme (e.g. |
| > "font-collection#1" for the first font, "font-collection#2" for the second font). |
| |
| Not only are TTC font collections supported, but WOFF2 font collections are also supported, which is |
| increasingly important web standard. |
| |
| No new tests because I don't have a font collection file with the appropriate license for the |
| WebKit repository. I tested manually. |
| |
| * css/CSSFontFaceSource.cpp: |
| (WebCore::CSSFontFaceSource::load): |
| * loader/cache/CachedFont.cpp: |
| (WebCore::CachedFont::calculateIndex const): |
| (WebCore::CachedFont::ensureCustomFontData): |
| (WebCore::CachedFont::createCustomFontData): |
| * loader/cache/CachedFont.h: |
| * platform/graphics/cairo/FontCustomPlatformData.h: |
| * platform/graphics/freetype/FontCustomPlatformDataFreeType.cpp: |
| (WebCore::createFontCustomPlatformData): |
| * platform/graphics/mac/FontCustomPlatformData.cpp: |
| (WebCore::createFontCustomPlatformData): |
| * platform/graphics/mac/FontCustomPlatformData.h: |
| * platform/graphics/win/FontCustomPlatformData.cpp: |
| (WebCore::createFontCustomPlatformData): |
| * platform/graphics/win/FontCustomPlatformData.h: |
| * platform/graphics/win/FontCustomPlatformDataCairo.cpp: |
| (WebCore::createFontCustomPlatformData): |
| |
| 2018-01-22 Simon Fraser <simon.fraser@apple.com> |
| |
| REGRESSION (r227011): fast/frames/hidpi-position-iframe-on-device-pixel.html times out |
| https://bugs.webkit.org/show_bug.cgi?id=181959 |
| |
| Reviewed by Zalan Bujtas. |
| |
| This test creates 300 iframes, which became slow after r227011 because they all became part |
| of the non-fast scrollable region, slowing down ScrollingCoordinator::absoluteEventTrackingRegionsForFrame(). |
| |
| Fix by not adding non-scrollable iframes, and making FrameView::isScrollable() more efficient for frames |
| that have not done layout yet. |
| |
| * page/FrameView.cpp: |
| (WebCore::FrameView::isScrollable): |
| (WebCore::FrameView::addChild): |
| |
| 2018-01-22 Dan Bernstein <mitz@apple.com> |
| |
| Fixed building for macOS 10.12 with the macOS 10.13 SDK after r227156. |
| |
| * Configurations/WebCore.xcconfig: |
| |
| 2018-01-22 Simon Fraser <simon.fraser@apple.com> |
| |
| REGRESSION (r226981): ASSERTION FAILED: startY >= 0 && endY <= height && startY < endY in WebCore::FEMorphology::platformApplyGeneric |
| https://bugs.webkit.org/show_bug.cgi?id=181836 |
| |
| Reviewed by Tim Horton. |
| |
| All the filters that use ParallelJobs<> has the same type of bug where very wide but not tall |
| filter regions could result in computing an optimalThreadNumber that was greater than the |
| number of rows to process, which resulted in jobs with zero rows to process. |
| |
| Since we split the work by rows, cap the maximum number of threads to height/8 so that each job |
| has at least 8 rows of pixels to process. Add some assertions to detect jobs with zero rows. |
| |
| FEMorphology was also using implicit float -> int conversion to detect integer overflow of radius, |
| so change that to use explicit clamping. |
| |
| Tests: svg/filters/feLighting-parallel-jobs.svg |
| svg/filters/feTurbulence-parallel-jobs-wide.svg |
| |
| * platform/graphics/filters/FELighting.cpp: |
| (WebCore::FELighting::platformApplyGenericPaint): |
| (WebCore::FELighting::platformApplyGeneric): |
| * platform/graphics/filters/FEMorphology.cpp: |
| (WebCore::FEMorphology::platformApplyGeneric): |
| (WebCore::FEMorphology::platformApply): |
| (WebCore::FEMorphology::platformApplyDegenerate): |
| (WebCore::FEMorphology::platformApplySoftware): |
| * platform/graphics/filters/FETurbulence.cpp: |
| (WebCore::FETurbulence::fillRegion const): |
| (WebCore::FETurbulence::platformApplySoftware): |
| |
| 2018-01-22 Eric Carlson <eric.carlson@apple.com> |
| |
| Resign NowPlaying status when no media element is eligible |
| https://bugs.webkit.org/show_bug.cgi?id=181914 |
| <rdar://problem/35294116> |
| |
| Reviewed by Jer Noble. |
| |
| No new tests, these changes prevent existing tests from crashing. |
| |
| * html/HTMLMediaElement.h: |
| * html/MediaElementSession.cpp: |
| (WebCore::MediaElementSession::playbackPermitted const): Return early when the media |
| element has been suspended. |
| (WebCore::MediaElementSession::canShowControlsManager const): Return false when the |
| media element has been suspended. |
| (WebCore::isMainContentForPurposesOfAutoplay): Return early if it isn't safe to update |
| style because HitTest can force a layout. |
| (WebCore::MediaElementSession::updateIsMainContent const): Ditto. |
| |
| 2018-01-22 Alex Christensen <achristensen@webkit.org> |
| |
| Begin removing QTKit code |
| https://bugs.webkit.org/show_bug.cgi?id=181951 |
| |
| Reviewed by Jer Noble. |
| |
| QTKit was being used on El Capitan and before. |
| |
| * Configurations/WebCore.xcconfig: |
| * SourcesMac.txt: |
| * WebCore.xcodeproj/project.pbxproj: |
| * platform/graphics/MediaPlayer.cpp: |
| (WebCore::buildMediaEnginesVector): |
| (WebCore::MediaPlayer::supportsType): |
| * platform/graphics/mac/MediaPlayerPrivateQTKit.h: Removed. |
| * platform/graphics/mac/MediaPlayerPrivateQTKit.mm: Removed. |
| * platform/graphics/mac/MediaTimeQTKit.h: Removed. |
| * platform/graphics/mac/MediaTimeQTKit.mm: Removed. |
| * platform/mac/WebVideoFullscreenController.mm: |
| (-[WebVideoFullscreenController setVideoElement:]): |
| (-[WebVideoFullscreenController updatePowerAssertions]): |
| |
| 2018-01-22 Per Arne Vollan <pvollan@apple.com> |
| |
| [Win] Null pointer crash under WebCore::RenderStyle::colorIncludingFallback. |
| https://bugs.webkit.org/show_bug.cgi?id=181801 |
| <rdar://problem/35614900> |
| |
| Reviewed by Brent Fulgham. |
| |
| Do not paint synchronously when popup items have been added or changed while the popup is visible. |
| If new popup items have been added after the popup was shown, a synchronous paint operation will |
| possibly access their style before it is ready, leading to a null pointer crash. The invalidated |
| area will be painted asynchronously. |
| |
| No new tests. To reproduce this crash, it is necessary to open a popup with JavaScript, add new |
| popup items, and then end the test. Opening the popup can be done by sending a mousedown event |
| with the eventsender. However, on Windows the mousedown event is sent synchronously, and will |
| block as long as the popup is open and running the popup event loop. This means no JS can be |
| executed until the popup is closed, causing the test to always time out before new popup items |
| can be added. I have verified the fix with a manual test case. |
| |
| * platform/win/PopupMenuWin.cpp: |
| (WebCore::PopupMenuWin::updateFromElement): |
| |
| 2018-01-22 Chris Dumez <cdumez@apple.com> |
| |
| RELEASE_ASSERT(registration) hit in SWServer::installContextData(const ServiceWorkerContextData&) |
| https://bugs.webkit.org/show_bug.cgi?id=181941 |
| <rdar://problem/36744892> |
| |
| Reviewed by Youenn Fablet. |
| |
| Make sure we clear SWServer::m_pendingContextDatas & SWServer::m_pendingJobs as needed |
| when clearing Website data. Otherwise, we will hit assertion when those gets processed |
| after the connection to the SW process has been established (not to mentioned we failed |
| to clear some in-memory data even though the user asked us to). |
| |
| * workers/service/server/SWServer.cpp: |
| (WebCore::SWServer::clearAll): |
| (WebCore::SWServer::clear): |
| |
| 2018-01-22 Ryosuke Niwa <rniwa@webkit.org> |
| |
| Blob conversion and sanitization doesn't work with Microsoft Word for Mac 2011 |
| https://bugs.webkit.org/show_bug.cgi?id=181616 |
| <rdar://problem/36484908> |
| |
| Reviewed by Wenson Hsieh. |
| |
| The bug was caused by WebContentReader::readHTML and WebContentMarkupReader::readHTML not sanitizing plain HTML string |
| as done for web archives even when custom pasteboard data is enabled. Fixed the bug by doing the sanitization. |
| |
| Unfortunately, we can't make file URLs available in this case because WebContent process doesn't have sandbox extensions |
| to access local files referenced by the HTML source in the clipboard, and we can't make WebContent process request for |
| a sandbox extension¸on an arbitrary local file, as it would defeat the whole point of sandboxing. |
| |
| Instead, we strip away all HTML attributes referencing a URL whose scheme is not HTTP, HTTPS, or data when sanitizing |
| text/html from the clipboard to avoid exposing local file paths, which can reveal privacy & security sensitive data |
| such as the user's full name, and the location of private containers of other applications in the system. |
| |
| Tests: PasteHTML.DoesNotSanitizeHTMLWhenCustomPasteboardDataIsDisabled |
| PasteHTML.DoesNotStripFileURLsWhenCustomPasteboardDataIsDisabled |
| PasteHTML.ExposesHTMLTypeInDataTransfer |
| PasteHTML.KeepsHTTPURLs |
| PasteHTML.SanitizesHTML |
| PasteHTML.StripsFileURLs |
| |
| * editing/cocoa/WebContentReaderCocoa.mm: |
| (WebCore::WebContentReader::readHTML): Fixed the bug by sanitizing the markup, and stripping away file URLs. |
| (WebCore::WebContentMarkupReader::readHTML): Ditto. |
| * editing/markup.cpp: |
| (WebCore::removeSubresourceURLAttributes): Added. |
| (WebCore::sanitizeMarkup): Added. |
| * editing/markup.h: |
| |
| 2018-01-22 Chris Dumez <cdumez@apple.com> |
| |
| Add release logging to help debug issues related to service workers |
| https://bugs.webkit.org/show_bug.cgi?id=181935 |
| <rdar://problem/36735900> |
| |
| Reviewed by Brady Eidson. |
| |
| * workers/service/ServiceWorker.cpp: |
| (WebCore::ServiceWorker::ServiceWorker): |
| (WebCore::ServiceWorker::scheduleTaskToUpdateState): |
| (WebCore::ServiceWorker::postMessage): |
| (WebCore::ServiceWorker::isAlwaysOnLoggingAllowed const): |
| * workers/service/ServiceWorker.h: |
| * workers/service/ServiceWorkerContainer.cpp: |
| (WebCore::ServiceWorkerContainer::addRegistration): |
| (WebCore::ServiceWorkerContainer::removeRegistration): |
| (WebCore::ServiceWorkerContainer::updateRegistration): |
| (WebCore::ServiceWorkerContainer::jobFailedWithException): |
| (WebCore::ServiceWorkerContainer::jobResolvedWithRegistration): |
| (WebCore::ServiceWorkerContainer::jobResolvedWithUnregistrationResult): |
| (WebCore::ServiceWorkerContainer::startScriptFetchForJob): |
| (WebCore::ServiceWorkerContainer::jobFinishedLoadingScript): |
| (WebCore::ServiceWorkerContainer::jobFailedLoadingScript): |
| (WebCore::ServiceWorkerContainer::isAlwaysOnLoggingAllowed const): |
| * workers/service/ServiceWorkerContainer.h: |
| * workers/service/ServiceWorkerRegistration.cpp: |
| (WebCore::ServiceWorkerRegistration::ServiceWorkerRegistration): |
| (WebCore::ServiceWorkerRegistration::updateStateFromServer): |
| (WebCore::ServiceWorkerRegistration::scheduleTaskToFireUpdateFoundEvent): |
| * workers/service/server/SWServer.cpp: |
| (WebCore::SWServer::scriptContextFailedToStart): |
| (WebCore::SWServer::didFinishInstall): |
| (WebCore::SWServer::didFinishActivation): |
| (WebCore::SWServer::terminateWorkerInternal): |
| * workers/service/server/SWServerJobQueue.cpp: |
| (WebCore::SWServerJobQueue::didResolveRegistrationPromise): |
| (WebCore::SWServerJobQueue::runRegisterJob): |
| |
| 2018-01-22 Youenn Fablet <youenn@apple.com> |
| |
| Safari Tech Preview can't use GitHub login at forums.swift.org |
| https://bugs.webkit.org/show_bug.cgi?id=181908 |
| <rdar://problem/36715111> |
| |
| Reviewed by Chris Dumez. |
| |
| Test: http/wpt/service-workers/navigation-redirect.https.html |
| |
| For subresource loads, redirections will not change who is in charge of continuing the load (service worker or network process). |
| For navigation loads, we need to match the registration for every redirection since this is using the Manual redirect mode. |
| This allows starting the load with a service worker and finishing the load with another service worker, which will become the controller. |
| |
| Implement this by wrapping the registration matching of an URL within DocumentLoader::matchRegistration. |
| Use that method in DocumentLoader::redirectReceived. |
| |
| * loader/DocumentLoader.cpp: |
| (WebCore::DocumentLoader::matchRegistration): |
| (WebCore::doRegistrationsMatch): |
| (WebCore::DocumentLoader::redirectReceived): |
| (WebCore::DocumentLoader::startLoadingMainResource): |
| * loader/DocumentLoader.h: |
| |
| 2018-01-22 Antti Koivisto <antti@apple.com> |
| |
| REGRESSION (Safari 11): Buttons inside a fieldset legend cannot be clicked on in Safari 11 |
| https://bugs.webkit.org/show_bug.cgi?id=179666 |
| <rdar://problem/35534292> |
| |
| Reviewed by Zalan Bujtas. |
| |
| The legend element of a fieldset is in the border area, outside the clip rect. |
| With overflow:hidden mouse events won't reach it. |
| |
| Test case by Dhaya Benmessaoud. |
| |
| Test: fast/forms/legend-overflow-hidden-hit-test.html |
| |
| * rendering/RenderBlock.cpp: |
| (WebCore::RenderBlock::nodeAtPoint): |
| (WebCore::RenderBlock::hitTestExcludedChildrenInBorder): |
| |
| Add a special case to hit testing to handle legend, similarly to what is done for painting. |
| |
| * rendering/RenderBlock.h: |
| |
| 2018-01-22 Joanmarie Diggs <jdiggs@igalia.com> |
| |
| AX: Implement support for Graphics ARIA roles |
| https://bugs.webkit.org/show_bug.cgi?id=181796 |
| |
| Reviewed by Chris Fleizach. |
| |
| Add mappings for the three new roles (graphics-document, graphics-object, |
| and graphics-symbol) as per the Graphics Accessibility API Mappings spec. |
| |
| No new tests; instead, new test cases added to roles-computedRoleString.html |
| and roles-exposed.html. |
| |
| * accessibility/AccessibilityObject.cpp: |
| (WebCore::initializeRoleMap): |
| (WebCore::AccessibilityObject::computedRoleString const): |
| * accessibility/AccessibilityObject.h: |
| * accessibility/atk/WebKitAccessibleWrapperAtk.cpp: |
| (atkRole): |
| * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm: |
| (-[WebAccessibilityObjectWrapper determineIsAccessibilityElement]): |
| * accessibility/mac/WebAccessibilityObjectWrapperMac.mm: |
| (createAccessibilityRoleMap): |
| (-[WebAccessibilityObjectWrapper subrole]): |
| (-[WebAccessibilityObjectWrapper roleDescription]): |
| |
| 2018-01-22 Antti Koivisto <antti@apple.com> |
| |
| REGRESSION(r224535): Can't write reviews in the App Store |
| https://bugs.webkit.org/show_bug.cgi?id=181936 |
| <rdar://problem/36670246> |
| |
| Reviewed by Zalan Bujtas. |
| |
| * page/LayoutContext.cpp: |
| (WebCore::LayoutContext::updateStyleForLayout): |
| |
| r224535 was about media queries but it also removed a seemingly spurious call to SyleScope::didChangeStyleSheetEnvironment |
| from the path that does not involve media queries. |
| Turns out UITextContentView somehow depended on it, so revert this specific change. |
| |
| 2018-01-22 Brady Eidson <beidson@apple.com> |
| |
| In WebKit2, make the MessagePortChannelRegistry live in the UI process. |
| https://bugs.webkit.org/show_bug.cgi?id=181922 |
| |
| Reviewed by Andy Estes. |
| |
| No new tests (Refactor, no behavior change) |
| |
| Add encoder/decoders and EXPORT a whole bunch of stuff. |
| |
| * WebCore.xcodeproj/project.pbxproj: |
| |
| * dom/MessagePort.h: |
| |
| * dom/messageports/MessagePortChannel.cpp: |
| (WebCore::MessagePortChannel::processForPort): |
| * dom/messageports/MessagePortChannel.h: |
| |
| * dom/messageports/MessagePortChannelProvider.h: |
| * dom/messageports/MessagePortChannelRegistry.h: |
| |
| * dom/messageports/MessageWithMessagePorts.h: |
| (WebCore::MessageWithMessagePorts::encode const): |
| (WebCore::MessageWithMessagePorts::decode): |
| |
| 2018-01-22 Youenn Fablet <youenn@apple.com> |
| |
| Fetch Headers from an Opaque response should be filtered out |
| https://bugs.webkit.org/show_bug.cgi?id=181926 |
| |
| Reviewed by Chris Dumez. |
| |
| Covered by updated test. |
| |
| Refactor to use the same FetchResponse::create for Cache API and cloning. |
| In this method, ensure that response and headers are filtered correctly according response tainting. |
| Make also sure that synthetic responses do not get filtered (not needed since created by JavaScript). |
| |
| Introduce helper routine to set the header map of a resource response. |
| Use this routine when cloning a synthetic response as in that case, m_internalResponse has no header at all. |
| |
| * Modules/cache/DOMCache.cpp: |
| (WebCore::DOMCache::updateRecords): |
| * Modules/fetch/FetchResponse.cpp: |
| (WebCore::FetchResponse::create): |
| (WebCore::FetchResponse::clone): |
| * Modules/fetch/FetchResponse.h: |
| * platform/network/ResourceResponseBase.cpp: |
| (WebCore::ResourceResponseBase::setHTTPHeaderFields): |
| * platform/network/ResourceResponseBase.h: |
| * testing/ServiceWorkerInternals.cpp: |
| (WebCore::ServiceWorkerInternals::createOpaqueWithBlobBodyResponse): |
| |
| 2018-01-22 Javier Fernandez <jfernandez@igalia.com> |
| |
| [css-align] 'overflow' keyword must precede the self-position and content-position value |
| https://bugs.webkit.org/show_bug.cgi?id=181793 |
| |
| Reviewed by Antti Koivisto. |
| |
| There were several discussions to avoid ambiguities with the complex |
| values, specially when it comes to define the place-xxx shorthands. |
| |
| One of the sources of problems is the 'overflow-position' keyword. The |
| CSS WG has decided to change the syntax of all the CSS Box Alignment |
| properties so that the 'overflow-position' keyword always precede the |
| 'self-position' or the 'content-position' keywords. |
| |
| https://github.com/w3c/csswg-drafts/issues/1446#event-1125715434 |
| |
| In order to apply this change to the Content Distribution properties' |
| (align-content and justify-content) syntax I had to completely |
| re-implement their parsing function. Thanks to this I addressed also |
| the issue with the content-distribution fallback, which cannot be |
| specified explicitly now. |
| |
| https://github.com/w3c/csswg-drafts/issues/1002#ref-commit-c38cac4 |
| |
| No new tests, just rebaselined the expected results of the test cases affected. |
| |
| Despite the so many layout tests affected by this change, it's |
| unlikely that it might break any content in current web |
| sites. This patch changes the new CSS syntax, obviously backward |
| compatible, defined by the new CSS Box Alignment. The |
| 'overflow-position' keyword is only used by the layout models |
| implementing the new spec, so far only CSS Grid Layout. |
| Considering that CSS Grid has been shipped last year, it's unlikely |
| that many sites are using the new CSS values. |
| |
| * css/CSSComputedStyleDeclaration.cpp: |
| (WebCore::valueForItemPositionWithOverflowAlignment): |
| (WebCore::valueForContentPositionAndDistributionWithOverflowAlignment): |
| * css/CSSContentDistributionValue.cpp: |
| (WebCore::CSSContentDistributionValue::customCSSText const): |
| * css/StyleBuilderConverter.h: |
| (WebCore::StyleBuilderConverter::convertSelfOrDefaultAlignmentData): |
| * css/parser/CSSPropertyParser.cpp: |
| (WebCore::consumeOverflowPositionKeyword): |
| (WebCore::consumeContentPositionKeyword): |
| (WebCore::consumeContentDistributionOverflowPosition): |
| (WebCore::consumeSelfPositionOverflowPosition): |
| |
| 2018-01-22 Chris Nardi <csnardi1@gmail.com> |
| |
| Parse calc() in CSS media queries |
| https://bugs.webkit.org/show_bug.cgi?id=181716 |
| |
| calc() was previously unsupported inside of media queries. This change |
| adds in support for parsing calc inside of media queries. |
| |
| Reviewed by Antti Koivisto. |
| |
| Tests: Imported web-platform-tests/css/mediaqueries |
| |
| * css/MediaQueryExpression.cpp: |
| (WebCore::featureWithValidIdent): Updated function to take a CSSPrimitiveValue. |
| (WebCore::featureWithValidDensity): Updated function to take a CSSPrimitiveValue instead of a CSSParserToken. |
| (WebCore::featureWithValidPositiveLength): Ditto. |
| (WebCore::featureExpectingPositiveInteger): Ditto. |
| (WebCore::featureWithPositiveInteger): Ditto. |
| (WebCore::featureWithPositiveNumber): Ditto. |
| (WebCore::featureWithZeroOrOne): Ditto. |
| (WebCore::MediaQueryExpression::MediaQueryExpression): Use CSSPropertyParserHelpers for consuming. |
| * css/MediaQueryExpression.h: |
| * css/parser/CSSPropertyParserHelpers.cpp: |
| (WebCore::CSSPropertyParserHelpers::consumeResolution): Added function for use in media query expression parsing. |
| * css/parser/CSSPropertyParserHelpers.h: |
| * css/parser/MediaQueryParser.cpp: |
| (WebCore::MediaQueryParser::readRestrictor): Updated functions to take a CSSParserTokenRange in order to use CSSPropertyParserHelpers. |
| (WebCore::MediaQueryParser::readMediaNot): Ditto. |
| (WebCore::MediaQueryParser::readMediaType): Ditto. |
| (WebCore::MediaQueryParser::readAnd): Ditto. |
| (WebCore::MediaQueryParser::readFeatureStart): Ditto. |
| (WebCore::MediaQueryParser::readFeature): Ditto. |
| (WebCore::MediaQueryParser::readFeatureColon): Ditto. |
| (WebCore::MediaQueryParser::readFeatureValue): Ditto. |
| (WebCore::MediaQueryParser::readFeatureEnd): Ditto. |
| (WebCore::MediaQueryParser::skipUntilComma): Ditto. |
| (WebCore::MediaQueryParser::skipUntilBlockEnd): Ditto. |
| (WebCore::MediaQueryParser::processToken): Ditto. |
| (WebCore::MediaQueryParser::parseInternal): Ditto. |
| (WebCore::MediaQueryData::clear): Removed reference to m_valueList |
| (WebCore::MediaQueryData::addExpression): Use CSSParserTokenRange. |
| (WebCore::MediaQueryData::lastExpressionValid): New helper function. |
| (WebCore::MediaQueryData::removeLastExpression): New helper function. |
| * css/parser/MediaQueryParser.h: |
| |
| 2018-01-22 Zan Dobersek <zdobersek@igalia.com> |
| |
| [Cairo] Refactor PlatformContextCairo::drawSurfaceToContext() into a Cairo operation |
| https://bugs.webkit.org/show_bug.cgi?id=181930 |
| |
| Reviewed by Carlos Garcia Campos. |
| |
| Move the PlatformContextCairo::drawSurfaceToContext() code into the |
| Cairo namespace as an operation, renaming it to drawSurface(). Mirroring |
| other operations, the PlatformContextCairo object is now passed through |
| a reference as the first argument to the function, and cairo_t context |
| object is retrieved from that. |
| |
| Call sites of the PlatformContextCairo::drawSurfaceToContext() method |
| are adjusted to now call Cairo::drawSurface() and properly pass the |
| PlatformContextCairo object to the function. |
| |
| No new tests -- no change in functionality. |
| |
| * platform/graphics/cairo/CairoOperations.cpp: |
| (WebCore::Cairo::prepareForStroking): Make this static. |
| (WebCore::Cairo::drawPatternToCairoContext): |
| (WebCore::Cairo::drawNativeImage): |
| (WebCore::Cairo::drawSurface): |
| * platform/graphics/cairo/CairoOperations.h: |
| * platform/graphics/cairo/PlatformContextCairo.cpp: |
| (WebCore::drawPatternToCairoContext): Deleted. |
| (WebCore::PlatformContextCairo::drawSurfaceToContext): Deleted. |
| * platform/graphics/cairo/PlatformContextCairo.h: |
| * platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp: |
| (WebCore::MediaPlayerPrivateMediaFoundation::Direct3DPresenter::paintCurrentFrame): |
| |
| 2018-01-22 Manuel Rego Casasnovas <rego@igalia.com> |
| |
| [css-grid] Spanning Grid item has too much space at the bottom / is too high |
| https://bugs.webkit.org/show_bug.cgi?id=181677 |
| |
| Reviewed by Javier Fernandez. |
| |
| In IndefiniteSizeStrategy::findUsedFlexFraction() we were not |
| subtracting the size of the gutters when we call findFrUnitSize(). |
| If an item spans several tracks, we cannot pass the maxContentForChild() |
| directly, we need to subtract the gutters as they are treated |
| as fixed size tracks in the algorithm. |
| |
| The spec text is pretty clear regarding this |
| (https://drafts.csswg.org/css-grid/#algo-find-fr-size): |
| "Let leftover space be the space to fill minus the base sizes |
| of the non-flexible grid tracks." |
| |
| Gutters are treated as fixed-size tracks for the purpose |
| of the track sizing algorithm, so we need to subtract them from the |
| leftover space while finding the size of an "fr". |
| |
| Tests: imported/w3c/web-platform-tests/css/css-grid/layout-algorithm/grid-find-fr-size-gutters-001.html |
| imported/w3c/web-platform-tests/css/css-grid/layout-algorithm/grid-find-fr-size-gutters-002.html |
| |
| * rendering/GridTrackSizingAlgorithm.cpp: |
| (WebCore::GridTrackSizingAlgorithm::findFrUnitSize const): |
| (WebCore::IndefiniteSizeStrategy::findUsedFlexFraction const): |
| |
| 2018-01-21 Ryosuke Niwa <rniwa@webkit.org> |
| |
| Turning off custom pasteboard data doesn't actually turn it off in WK2 |
| https://bugs.webkit.org/show_bug.cgi?id=181920 |
| <rdar://problem/36686429> |
| |
| Reviewed by Wenson Hsieh. |
| |
| Replaced the global settings for custom pasteboard data by regular runtime enabled flags. |
| |
| * dom/DataTransfer.cpp: |
| (WebCore::DataTransfer::getDataForItem const): |
| (WebCore::DataTransfer::shouldSuppressGetAndSetDataToAvoidExposingFilePaths const): |
| (WebCore::DataTransfer::setDataFromItemList): |
| (WebCore::DataTransfer::types const): |
| (WebCore::DataTransfer::commitToPasteboard): |
| * dom/DataTransferItemList.cpp: |
| (WebCore::shouldExposeTypeInItemList): |
| * editing/Editor.cpp: |
| (WebCore::createDataTransferForClipboardEvent): |
| * editing/cocoa/WebContentReaderCocoa.mm: |
| (WebCore::createFragmentAndAddResources): |
| (WebCore::WebContentReader::readWebArchive): |
| * page/DeprecatedGlobalSettings.cpp: |
| (WebCore::DeprecatedGlobalSettings::defaultCustomPasteboardDataEnabled): Deleted. |
| * page/DeprecatedGlobalSettings.h: |
| (WebCore::DeprecatedGlobalSettings::setCustomPasteboardDataEnabled): Deleted. |
| (WebCore::DeprecatedGlobalSettings::customPasteboardDataEnabled): Deleted. |
| * page/RuntimeEnabledFeatures.h: |
| (WebCore::RuntimeEnabledFeatures::setCustomPasteboardDataEnabled): |
| (WebCore::RuntimeEnabledFeatures::customPasteboardDataEnabled const): |
| * testing/InternalSettings.cpp: |
| (WebCore::InternalSettings::Backup::Backup): |
| (WebCore::InternalSettings::Backup::restoreTo): |
| (WebCore::InternalSettings::setCustomPasteboardDataEnabled): |
| |
| 2018-01-21 Wenson Hsieh <wenson_hsieh@apple.com> |
| |
| Add a new feature flag for EXTRA_ZOOM_MODE and reintroduce AdditionalFeatureDefines.h |
| https://bugs.webkit.org/show_bug.cgi?id=181918 |
| |
| Reviewed by Tim Horton. |
| |
| Add EXTRA_ZOOM_MODE to FeatureDefines.xconfig (off by default). No change in behavior. |
| |
| * Configurations/FeatureDefines.xcconfig: |
| |
| 2018-01-19 Ryosuke Niwa <rniwa@webkit.org> |
| |
| Release assertion in canExecuteScript when executing scripts during page cache restore |
| https://bugs.webkit.org/show_bug.cgi?id=181902 |
| |
| Reviewed by Antti Koivisto. |
| |
| The crash was caused by an erroneous instantiation of ScriptDisallowedScope::InMainThread in CachedPage::restore. |
| It can execute arbitrary scripts since CachedFrame::open can update style, layout, and evaluate media queries. |
| |
| This is fine because there is no way to put this page back into a page cache until the load is commited via |
| FrameLoader::commitProvisionalLoad is invoked later which only happens after CachedPage::restore had exited. |
| |
| Also added a release assert to make sure this condition holds. |
| |
| Tests: fast/history/page-cache-execute-script-during-restore.html |
| fast/history/page-cache-navigate-during-restore.html |
| |
| * history/CachedPage.cpp: |
| (WebCore::CachedPageRestorationScope::CachedPageRestorationScope): Added. |
| (WebCore::CachedPageRestorationScope::~CachedPageRestorationScope): Added. |
| (WebCore::CachedPage::restore): Don't instantiate ScriptDisallowedScope::InMainThread. Set isRestoringCachedPage |
| on the cached pate to release-assert that there won't be any attempt to put this very page back into the cache. |
| * history/PageCache.cpp: |
| (WebCore::canCachePage): Added a release assert to make sure the page which is in the process of being restored |
| from the page cache is not put into the page cache. |
| * page/Page.h: |
| (WebCore::Page::setIsRestoringCachedPage): Added. |
| (WebCore::Page::isRestoringCachedPage const): Added. |
| |
| 2018-01-21 Eric Carlson <eric.carlson@apple.com> |
| |
| Resign NowPlaying status when no media element is eligible |
| https://bugs.webkit.org/show_bug.cgi?id=181914 |
| <rdar://problem/35294116> |
| |
| Reviewed by Jer Noble. |
| |
| Updated API test. |
| |
| * html/HTMLMediaElement.cpp: |
| (WebCore::HTMLMediaElement::removedFromAncestor): Call mediaSession->clientCharacteristicsChanged |
| so NowPlaying status will be updated. |
| |
| * html/MediaElementSession.cpp: |
| (WebCore::MediaElementSession::canShowControlsManager const): Return false when being queried |
| for NowPlaying status in an inactive document. |
| |
| * platform/audio/PlatformMediaSessionManager.cpp: |
| (WebCore::PlatformMediaSessionManager::updateNowPlayingInfoIfNecessary): Implement in for all |
| ports. |
| * platform/audio/PlatformMediaSessionManager.h: |
| (WebCore::PlatformMediaSessionManager::registeredAsNowPlayingApplication const): |
| * platform/audio/ios/MediaSessionManagerIOS.h: |
| * platform/audio/mac/MediaSessionManagerMac.h: |
| * platform/audio/mac/MediaSessionManagerMac.mm: |
| (WebCore::MediaSessionManagerMac::updateNowPlayingInfo): Call MRMediaRemoteSetCanBeNowPlayingApplication |
| whenever status changes. |
| (WebCore::PlatformMediaSessionManager::updateNowPlayingInfoIfNecessary): Deleted, implemented |
| in the base class. |
| |
| 2018-01-21 Jer Noble <jer.noble@apple.com> |
| |
| REGRESSION (macOS 10.13.2): imported/w3c/web-platform-tests/media-source/mediasource-* LayoutTests failing |
| https://bugs.webkit.org/show_bug.cgi?id=181891 |
| |
| Reviewed by Eric Carlson. |
| |
| In macOS 10.13.2, CoreMedia changed the definition of CMSampleBufferGetDuration() to return |
| the presentation duration rather than the decode duration. For media streams where those two |
| durations are identical (or at least, closely similar), this isn't a problem. But the media |
| file used in the WPT tests have an unusual frame cadence: decode durations go {3000, 1, 5999, |
| 1, 5999,...} and presentation durations go {3000, 2999, 3000, 2999}. This caused one check in |
| the "Coded Frame Processing" algorithm to begin failing, where it checks that the delta |
| between the last sample's decode time and the new decode time is no more than 2x as far as |
| the last sample's duration. That's not a problem as long as the "duration" is the "decode |
| duration" and the samples are all adjacent. Once the "duration" is "presentation duration", |
| all the assumptions in the algorithm are invalidated. In the WPT test case, the delta between |
| decode times is 5999, and 2 * the presentation duration is 5998, causing all samples up to |
| the next sync sample to be dropped. |
| |
| To work around this change in behavior, we'll adopt the same technique used by Mozilla's MSE |
| implementation, which was done for similar reasons. Rather than track the "last frame duration", |
| we'll record the "greatest frame duration", and use actual decode timestamps to derive this |
| duration. The "greatest frame duration" field will be reset at the same times as "last frame |
| duration", and will be used only in the part of the algorithm that checks for large decode |
| timestamp gaps. |
| |
| * Modules/mediasource/SourceBuffer.cpp: |
| (WebCore::SourceBuffer::TrackBuffer::TrackBuffer): |
| (WebCore::SourceBuffer::resetParserState): |
| (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveSample): |
| |
| 2018-01-21 Andy Estes <aestes@apple.com> |
| |
| [ios] LayoutTest imported/w3c/web-platform-tests/payment-request/rejects_if_not_active.https.html is crashing in JSC::JSONParse |
| https://bugs.webkit.org/show_bug.cgi?id=177832 |
| <rdar://problem/34805315> |
| |
| Reviewed by Tim Horton. |
| |
| Test: http/tests/paymentrequest/rejects_if_not_active.https.html |
| |
| * Modules/paymentrequest/PaymentRequest.cpp: |
| (WebCore::PaymentRequest::show): Rejected promise if the document is not active. |
| |
| 2018-01-20 Brady Eidson <beidson@apple.com> |
| |
| Make garbage collection of MessagePort objects be asynchronous. |
| https://bugs.webkit.org/show_bug.cgi?id=181910 |
| |
| Reviewed by Andy Estes. |
| |
| No new tests (Covered by existing tests, including GC-specific ones). |
| |
| The basic premise here is as follows: |
| - You can *always* GC a MessagePort that is closed |
| - You can *always* GC a MessagePort that has no onmessage handler, as incoming messages cannot |
| possibly revive it. |
| - You can GC a MessagePort, even if it has a message handler, as long as there are no messages |
| in flight between it and the remote port, and as long as the remote port is "maybe eligible for GC." |
| |
| A MessagePort is considered "maybe eligible for GC" once hasPendingActivity is asked once. |
| |
| A MessagePort loses "maybe eligible for GC" status once it is used for sending or receiving a message. |
| |
| The changes to MessagePort.cpp implement the above with a tiny little bool-driven state machine. |
| * dom/MessagePort.cpp: |
| (WebCore::MessagePort::postMessage): |
| (WebCore::MessagePort::disentangle): |
| (WebCore::MessagePort::registerLocalActivity): |
| (WebCore::MessagePort::start): |
| (WebCore::MessagePort::close): |
| (WebCore::MessagePort::contextDestroyed): |
| (WebCore::MessagePort::dispatchMessages): |
| (WebCore::MessagePort::hasPendingActivity const): |
| (WebCore::MessagePort::isLocallyReachable const): |
| (WebCore::MessagePort::addEventListener): |
| (WebCore::MessagePort::removeEventListener): |
| * dom/MessagePort.h: |
| |
| - Remove the lock and any background-thread code paths |
| - Add ASSERT(isMainThread())s throughout |
| * dom/messageports/MessagePortChannel.cpp: |
| (WebCore::MessagePortChannel::MessagePortChannel): |
| (WebCore::MessagePortChannel::includesPort): |
| (WebCore::MessagePortChannel::entanglePortWithProcess): |
| (WebCore::MessagePortChannel::disentanglePort): |
| (WebCore::MessagePortChannel::closePort): |
| (WebCore::MessagePortChannel::postMessageToRemote): |
| (WebCore::MessagePortChannel::takeAllMessagesForPort): |
| (WebCore::MessagePortChannel::checkRemotePortForActivity): |
| (WebCore::MessagePortChannel::hasAnyMessagesPendingOrInFlight const): |
| * dom/messageports/MessagePortChannel.h: |
| |
| Add a callback for a MessagePortChannel to go ask the remote MessagePort object about local activity: |
| * dom/messageports/MessagePortChannelProvider.h: |
| * dom/messageports/MessagePortChannelProviderImpl.cpp: |
| (WebCore::MessagePortChannelProviderImpl::checkRemotePortForActivity): |
| (WebCore::MessagePortChannelProviderImpl::checkProcessLocalPortForActivity): |
| (WebCore::MessagePortChannelProviderImpl::hasMessagesForPorts_temporarySync): Deleted. |
| * dom/messageports/MessagePortChannelProviderImpl.h: |
| |
| - Remove the lock and any background-thread code paths |
| - Add ASSERT(isMainThread())s throughout |
| * dom/messageports/MessagePortChannelRegistry.cpp: |
| (WebCore::MessagePortChannelRegistry::messagePortChannelCreated): |
| (WebCore::MessagePortChannelRegistry::messagePortChannelDestroyed): |
| (WebCore::MessagePortChannelRegistry::didEntangleLocalToRemote): |
| (WebCore::MessagePortChannelRegistry::didDisentangleMessagePort): |
| (WebCore::MessagePortChannelRegistry::didCloseMessagePort): |
| (WebCore::MessagePortChannelRegistry::didPostMessageToRemote): |
| (WebCore::MessagePortChannelRegistry::takeAllMessagesForPort): |
| (WebCore::MessagePortChannelRegistry::checkRemotePortForActivity): |
| (WebCore::MessagePortChannelRegistry::existingChannelContainingPort): |
| (WebCore::MessagePortChannelRegistry::hasMessagesForPorts_temporarySync): Deleted. |
| * dom/messageports/MessagePortChannelRegistry.h: |
| |
| 2018-01-20 Andy Estes <aestes@apple.com> |
| |
| [Apple Pay] Stop eagerly loading PassKit.framework |
| https://bugs.webkit.org/show_bug.cgi?id=181911 |
| <rdar://problem/36555369> |
| |
| Reviewed by Tim Horton. |
| |
| r226458 and r226123 added code that caused PassKit.framework to be eagerly loaded when |
| initializing a WKWebView. This is costly and should only be done when Apple Pay is first used. |
| |
| To avoid eagerly loading PassKit, this patch does two things: |
| |
| 1. Instead of sending the available payment networks as part of WebPageCreationParameters, |
| PaymentCoordinator asks for them using a syncrhonous message the first time they are needed. |
| 2. Instead of setting the Apple Pay preference to false when PassKit can't be loaded, |
| the following API entry points check for a missing PassKit and return false, or throw |
| exceptions, or reject promises: |
| - ApplePaySession.canMakePayments() |
| - ApplePaySession.canMakePaymentsWithActiveCard() |
| - ApplePaySession.openPaymentSetup() |
| - ApplePaySession.begin() |
| |
| No new tests for (1), which causes no change in behavior. (2) was manually verified by |
| locally moving aside PassKit.framework, but that's not possible to do in an automated test. |
| |
| * Modules/applepay/PaymentCoordinator.cpp: |
| (WebCore::PaymentCoordinator::PaymentCoordinator): |
| (WebCore::PaymentCoordinator::validatedPaymentNetwork const): |
| (WebCore::toHashSet): Deleted. |
| * Modules/applepay/PaymentCoordinator.h: |
| * Modules/applepay/PaymentCoordinatorClient.h: |
| * loader/EmptyClients.cpp: |
| * page/MainFrame.cpp: |
| (WebCore::MainFrame::MainFrame): |
| |
| Removed PaymentCoordinator::m_availablePaymentNetworks and made |
| PaymentCoordinator::validatedPaymentNetwork() call |
| PaymentCoordinatorClient::validatedPaymentNetwork() instead. |
| |
| * page/PageConfiguration.h: |
| |
| Removed availablePaymentNetworks from PageConfiguration. |
| |
| * testing/Internals.cpp: |
| (WebCore::Internals::Internals): |
| * testing/MockPaymentCoordinator.cpp: |
| (WebCore::MockPaymentCoordinator::validatedPaymentNetwork): |
| * testing/MockPaymentCoordinator.h: |
| |
| Implemented PaymentCoordinatorClient::validatedPaymentNetwork(). |
| |
| 2018-01-20 Jer Noble <jer.noble@apple.com> |
| |
| Release ASSERT when reloading Vimeo page @ WebCore: WebCore::Document::updateLayout |
| https://bugs.webkit.org/show_bug.cgi?id=181840 |
| <rdar://problem/36186214> |
| |
| Reviewed by Simon Fraser. |
| |
| Test: media/video-fullscreen-reload-crash.html |
| |
| Short circuit play() or pause() operations if the document is suspended or stopped. |
| |
| * html/HTMLMediaElement.cpp: |
| (WebCore::HTMLMediaElement::playInternal): |
| (WebCore::HTMLMediaElement::pauseInternal): |
| |
| 2018-01-20 Youenn Fablet <youenn@apple.com> |
| |
| fetch redirect is incompatible with "no-cors" mode |
| https://bugs.webkit.org/show_bug.cgi?id=181866 |
| <rdar://problem/35827140> |
| |
| Reviewed by Chris Dumez. |
| |
| Covered by updated tests. |
| |
| Return a network error when no-cors mode and redirect mode is manual or error. |
| Update preflight implementation to no longer use manual redirect mode to simulate https://fetch.spec.whatwg.org/#http-network-or-cache-fetch. |
| Instead implement redirectReceived callback to treat any redirect response as the preflight response. |
| |
| * loader/cache/CachedResourceLoader.cpp: |
| (WebCore::CachedResourceLoader::canRequest): |
| * loader/CrossOriginPreflightChecker.cpp: |
| (WebCore::CrossOriginPreflightChecker::redirectReceived): |
| (WebCore::CrossOriginPreflightChecker::startPreflight): |
| * loader/CrossOriginPreflightChecker.h: |
| |
| 2018-01-19 Wenson Hsieh <wenson_hsieh@apple.com> |
| |
| [macOS] [WK2] Drag location is computed incorrectly when dragging content from subframes |
| https://bugs.webkit.org/show_bug.cgi?id=181896 |
| <rdar://problem/35479043> |
| |
| Reviewed by Tim Horton. |
| |
| In r218837, I packaged most of the information needed to start a drag into DragItem, which is propagated to the client layer |
| via the startDrag codepath. However, this introduced a bug in computing the event position and drag location in window |
| coordinates. Consider the case where we're determining the drag image offset for a dragged element in a subframe: |
| |
| Before the patch, the drag location (which starts out in the subframe's content coordinates) would be converted to root view |
| coordinates, which would then be converted to mainframe content coordinates, which would then be converted to window coordinates |
| using the mainframe's view. After the patch, we carry out the same math until the last step, where we erroneously use the |
| _subframe's_ view to convert to window coordinates from content coordinates. This results in the position of the iframe relative |
| to the mainframe being accounted for twice. |
| |
| To fix this, we simply use the main frame's view to convert from mainframe content coordinates to window coordinates while |
| computing the drag location. As for the event position in window coordinates, this is currently unused by any codepath in WebKit, |
| so we can just remove it altogether. |
| |
| Since this bug only affects drag and drop in the macOS WebKit2 port, there's currently no way to test this. I'll be using |
| <https://bugs.webkit.org/show_bug.cgi?id=181898> to track adding test support for drag and drop on macOS WebKit2. Manually tested |
| dragging in both WebKit1 and WebKit2 on macOS. dragLocationInWindowCoordinates isn't used at all for iOS drag and drop. |
| |
| * page/DragController.cpp: |
| (WebCore::DragController::doSystemDrag): |
| * platform/DragItem.h: |
| (WebCore::DragItem::encode const): |
| (WebCore::DragItem::decode): |
| |
| 2018-01-19 Ryan Haddad <ryanhaddad@apple.com> |
| |
| Unreviewed, rolling out r227235. |
| |
| The test for this change consistently times out on High |
| Sierra. |
| |
| Reverted changeset: |
| |
| "Support for preconnect Link headers" |
| https://bugs.webkit.org/show_bug.cgi?id=181657 |
| https://trac.webkit.org/changeset/227235 |
| |
| 2018-01-19 Youenn Fablet <youenn@apple.com> |
| |
| Cache storage errors like Quota should trigger console messages |
| https://bugs.webkit.org/show_bug.cgi?id=181879 |
| <rdar://problem/36669048> |
| |
| Reviewed by Chris Dumez. |
| |
| Covered by rebased test. |
| |
| * Modules/cache/DOMCache.cpp: |
| (WebCore::DOMCache::retrieveRecords): |
| (WebCore::DOMCache::batchDeleteOperation): |
| (WebCore::DOMCache::batchPutOperation): |
| * Modules/cache/DOMCacheEngine.cpp: |
| (WebCore::DOMCacheEngine::errorToException): |
| (WebCore::DOMCacheEngine::logErrorAndConvertToException): |
| * Modules/cache/DOMCacheEngine.h: |
| * Modules/cache/DOMCacheStorage.cpp: |
| (WebCore::DOMCacheStorage::retrieveCaches): |
| (WebCore::DOMCacheStorage::doOpen): |
| (WebCore::DOMCacheStorage::doRemove): |
| |
| 2018-01-19 Youenn Fablet <youenn@apple.com> |
| |
| Do not go to the storage process when registering a service worker client if there is no service worker registered |
| https://bugs.webkit.org/show_bug.cgi?id=181740 |
| <rdar://problem/36650400> |
| |
| Reviewed by Chris Dumez. |
| |
| Register a document as service worker client only if there is an existing service worker connection. |
| This allows not creating any connection if no service worker is registered. |
| |
| Add internals API to test whether a service worker connection was created or not. |
| This is used by API tests that cover the changes. |
| |
| * dom/Document.cpp: |
| (WebCore::Document::privateBrowsingStateDidChange): No need to create a service worker connection if client is not registered yet. |
| (WebCore::Document::setServiceWorkerConnection): No need to unregister/register if service worker connection is the same. |
| Similarly, if Document is to be destroyed or suspended, we should not register it. |
| * loader/DocumentLoader.cpp: |
| (WebCore::DocumentLoader::commitData): |
| * testing/Internals.cpp: |
| (WebCore::Internals::hasServiceWorkerConnection): |
| * testing/Internals.h: |
| * testing/Internals.idl: |
| * workers/service/ServiceWorkerProvider.cpp: |
| (WebCore::ServiceWorkerProvider::registerServiceWorkerClients): |
| * workers/service/ServiceWorkerProvider.h: |
| |
| 2018-01-19 Dean Jackson <dino@apple.com> |
| |
| REGRESSION (r221092): Swipe actions are hard to perform in FastMail app |
| https://bugs.webkit.org/show_bug.cgi?id=181817 |
| <rdar://problem/35274055> |
| |
| Add a setting for controlling whether touch listeners are passive |
| by default on document/window/body. |
| |
| Updated existing test. |
| |
| * dom/EventTarget.cpp: |
| (WebCore::EventTarget::addEventListener): |
| * page/Settings.yaml: |
| |
| 2018-01-19 Daniel Bates <dabates@apple.com> |
| |
| Update frame-ancestor directive to match Content Security Policy Level 3 |
| https://bugs.webkit.org/show_bug.cgi?id=178891 |
| <rdar://problem/35209458> |
| |
| Reviewed by Alex Christensen. |
| |
| Derived from Blink e667cc2e501fabab3605b838e4ee0d642a9c4a59: |
| <https://chromium.googlesource.com/chromium/src.git/+/e667cc2e501fabab3605b838e4ee0d642a9c4a59> |
| |
| Update frame-ancestor directive to match against the origin of the ancestor document per the |
| Content Security Policy Level 3 spec.: <https://w3c.github.io/webappsec-csp/> (15 January 2018). |
| Specifically this change in behavior was made to CSP 3 in <https://github.com/w3c/webappsec/issues/311>. |
| In earlier versions of the spec, the frame-ancestor directive matched against the URL of the |
| ancestor document. |
| |
| Disregarding allow-same-origin sandboxed iframes, a document with policy "frame-ancestor 'self'" |
| will be blocked from loading in a sandboxed iframe as a result of this change. |
| |
| Tests: http/tests/security/contentSecurityPolicy/1.1/frame-ancestors/frame-ancestors-nested-cross-in-allow-same-origin-sandboxed-cross-url-allow.html |
| http/tests/security/contentSecurityPolicy/1.1/frame-ancestors/frame-ancestors-nested-cross-in-sandboxed-cross-url-block.html |
| |
| * page/csp/ContentSecurityPolicyDirectiveList.cpp: |
| (WebCore::checkFrameAncestors): |
| |
| 2018-01-19 Basuke Suzuki <Basuke.Suzuki@sony.com> |
| |
| [Curl] Add timeout support to XMLHttpRequest |
| https://bugs.webkit.org/show_bug.cgi?id=181876 |
| |
| Reviewed by Alex Christensen |
| |
| * platform/network/ResourceRequestBase.cpp: |
| * platform/network/curl/CurlContext.cpp: |
| (WebCore::CurlHandle::setTimeout): |
| * platform/network/curl/CurlContext.h: |
| * platform/network/curl/CurlRequest.cpp: |
| (WebCore::CurlRequest::setupTransfer): |
| (WebCore::CurlRequest::didCompleteTransfer): |
| * platform/network/curl/ResourceError.h: |
| * platform/network/curl/ResourceErrorCurl.cpp: |
| (WebCore::ResourceError::httpError): |
| |
| 2018-01-19 Yoav Weiss <yoav@yoav.ws> |
| |
| Support for preconnect Link headers |
| https://bugs.webkit.org/show_bug.cgi?id=181657 |
| |
| Reviewed by Darin Adler. |
| |
| Move the preconnect functionality into its own function, and |
| also call this function when Link headers are processed. |
| |
| Test: http/tests/preconnect/link-header-rel-preconnect-http.php |
| |
| * loader/LinkLoader.cpp: |
| (WebCore::LinkLoader::loadLinksFromHeader): Call preconnectIfNeeded. |
| (WebCore::LinkLoader::preconnectIfNeeded): Preconnect to a host functionality moved here. |
| (WebCore::LinkLoader::loadLink): Call preconnectIfNeeded. |
| * loader/LinkLoader.h: |
| |
| 2018-01-19 Joseph Pecoraro <pecoraro@apple.com> |
| |
| AppCache: Log a Deprecation warning to the Console when AppCache is used |
| https://bugs.webkit.org/show_bug.cgi?id=181778 |
| |
| Reviewed by Alex Christensen. |
| |
| * html/HTMLHtmlElement.cpp: |
| (WebCore::HTMLHtmlElement::insertedByParser): |
| |
| 2018-01-19 Chris Dumez <cdumez@apple.com> |
| |
| ASSERT(registration || isTerminating()) hit in SWServerWorker::skipWaiting() |
| https://bugs.webkit.org/show_bug.cgi?id=181761 |
| <rdar://problem/36594564> |
| |
| Reviewed by Youenn Fablet. |
| |
| There is a short period of time, early in the registration process where a |
| SWServerWorker object exists for a registration but is not in the registration's |
| installing/waiting/active slots yet. As a result, if a registration is cleared |
| during this period (for e.g. due to the user clearing all website data), that |
| SWServerWorker will not be terminated. We then hit assertion later on when this |
| worker is trying to do things (like call skipWaiting). |
| |
| To address the issue, we now keep a reference this SWServerWorker on the |
| registration, via a new SWServerRegistration::m_preInstallationWorker data member. |
| When the registration is cleared, we now take care of terminating this worker. |
| |
| No new tests, covered by existing tests that crash flakily in debug builds. |
| |
| * workers/WorkerThread.cpp: |
| (WebCore::WorkerThread::stop): |
| if the mutex is locked, then the worker thread is still starting. We spin the |
| runloop and try to stop again later. This avoids the deadlock shown in |
| Bug 181763 as the worker thread may need to interact with the main thread |
| during startup. |
| |
| * workers/service/server/SWServer.cpp: |
| (WebCore::SWServer::installContextData): |
| * workers/service/server/SWServerJobQueue.cpp: |
| (WebCore::SWServerJobQueue::scriptContextFailedToStart): |
| (WebCore::SWServerJobQueue::install): |
| * workers/service/server/SWServerRegistration.cpp: |
| (WebCore::SWServerRegistration::~SWServerRegistration): |
| (WebCore::SWServerRegistration::setPreInstallationWorker): |
| (WebCore::SWServerRegistration::clear): |
| * workers/service/server/SWServerRegistration.h: |
| (WebCore::SWServerRegistration::preInstallationWorker const): |
| |
| 2018-01-19 Chris Dumez <cdumez@apple.com> |
| |
| Service worker registrations restored from disk may not be reused when the JS calls register() again |
| https://bugs.webkit.org/show_bug.cgi?id=181810 |
| <rdar://problem/36591711> |
| |
| Reviewed by Youenn Fablet. |
| |
| The issue was that when restoring a registration from disk, we would not set its active worker right |
| away. We only set it later in installContextData(). installContextData() is only called after we’ve |
| launched the service worker process and established a connection to it. |
| |
| However, we would start processing jobs (such as registrations) before we’ve established the connection |
| to the service worker process. SWServerJobQueue::runRegisterJob(), in order to reuse an existing |
| registration checks the registration’s active worker has the right script URL. The issue was that when |
| this code would execute, we may not have set the registration’s active service worker yet, in which case, |
| we would update the existing registration instead of reusing it as-is. |
| |
| To address the issue, we now delay the processing of jobs until the connection to the service worker |
| process has been established and we've installed all pending contexts via installContextData(). |
| |
| Changed is covered by new API test. |
| |
| * workers/service/server/SWServer.cpp: |
| (WebCore::SWServer::Connection::scheduleJobInServer): |
| (WebCore::SWServer::scheduleJob): |
| (WebCore::SWServer::serverToContextConnectionCreated): |
| * workers/service/server/SWServer.h: |
| |
| 2018-01-19 James Craig <jcraig@apple.com> |
| |
| AX: when invert colors is on, double-invert image and picture elements in UserAgentStyleSheet |
| https://bugs.webkit.org/show_bug.cgi?id=181281 |
| <rdar://problem/36291776> |
| |
| Reviewed by Simon Fraser. |
| |
| Updated "Smart Invert" to include img and picture element inversion and tests. |
| |
| Tests: accessibility/smart-invert-reference.html |
| accessibility/smart-invert.html |
| |
| * css/html.css: |
| (@media (inverted-colors)): |
| (img:not(picture>img), picture, video): |
| |
| 2018-01-19 Chris Dumez <cdumez@apple.com> |
| |
| The WebContent process should not process incoming IPC while waiting for a sync IPC reply |
| https://bugs.webkit.org/show_bug.cgi?id=181560 |
| |
| Reviewed by Ryosuke Niwa. |
| |
| Add internals API for testing purposes. |
| |
| Test: fast/misc/testIncomingSyncIPCMessageWhileWaitingForSyncReply.html |
| |
| * page/ChromeClient.h: |
| * testing/Internals.cpp: |
| (WebCore::Internals::testIncomingSyncIPCMessageWhileWaitingForSyncReply): |
| * testing/Internals.h: |
| * testing/Internals.idl: |
| |
| 2018-01-19 Keith Miller <keith_miller@apple.com> |
| |
| HaveInternalSDK includes should be "#include?" |
| https://bugs.webkit.org/show_bug.cgi?id=179670 |
| |
| Reviewed by Dan Bernstein. |
| |
| * Configurations/Base.xcconfig: |
| |
| 2018-01-19 Daniel Bates <dabates@apple.com> |
| |
| Fix misspelling; substitute willDetachRenderer for willDetatchRenderer. |
| |
| * html/HTMLPlugInImageElement.cpp: |
| (WebCore::HTMLPlugInImageElement::willDetachRenderers): |
| * plugins/PluginViewBase.h: |
| (WebCore::PluginViewBase::willDetachRenderer): |
| (WebCore::PluginViewBase::willDetatchRenderer): Deleted. |
| |
| 2018-01-19 Jonathan Bedard <jbedard@apple.com> |
| |
| Unreviewed build fix, remove unused lambda captures. |
| |
| * dom/messageports/MessagePortChannel.cpp: |
| (WebCore::MessagePortChannel::takeAllMessagesForPort): |
| * dom/messageports/MessagePortChannelRegistry.cpp: |
| (WebCore::MessagePortChannelRegistry::messagePortChannelCreated): |
| |
| 2018-01-19 Antoine Quint <graouts@apple.com> |
| |
| [Web Animations] Expose timing properties (delay, endDelay, fill, iterationStart, iterations, direction) and getComputedTiming() |
| https://bugs.webkit.org/show_bug.cgi?id=181857 |
| <rdar://problem/36660081> |
| |
| Reviewed by Dean Jackson. |
| |
| We start the work to implement the rest of the Web Animations timing and animation model by exposing more properties on |
| AnimationEffectTiming to control delay (delay, endDelay), looping (iterationStart, iterations), fill and direction. |
| Additionally, we expose the getComputedTiming() method on AnimationEffect, although it currently lacks some computed |
| properties that will come in later patch as we implement various processes defined by the spec. We also update the |
| existing duration() method on AnimationEffectTiming to be called iterationDuration() to match the terms used in the |
| specification. |
| |
| Finally, we make all new properties, and update existing ones, that expose a time value go through the new utility |
| function secondsToWebAnimationsAPITime() to guarantee rounded values with microseconds precision, as advised by |
| the Web Animations specification. |
| |
| * CMakeLists.txt: |
| * DerivedSources.make: |
| * Sources.txt: |
| * WebCore.xcodeproj/project.pbxproj: |
| * animation/AnimationEffect.cpp: |
| (WebCore::AnimationEffect::localTime const): |
| (WebCore::AnimationEffect::getComputedTiming): |
| * animation/AnimationEffect.h: |
| * animation/AnimationEffect.idl: |
| * animation/AnimationEffectTiming.cpp: |
| (WebCore::AnimationEffectTiming::AnimationEffectTiming): |
| (WebCore::AnimationEffectTiming::setIterationStart): |
| (WebCore::AnimationEffectTiming::setIterations): |
| (WebCore::AnimationEffectTiming::bindingsDuration const): |
| (WebCore::AnimationEffectTiming::setBindingsDuration): |
| (WebCore::AnimationEffectTiming::endTime const): |
| (WebCore::AnimationEffectTiming::activeDuration const): |
| * animation/AnimationEffectTiming.h: |
| * animation/AnimationEffectTiming.idl: |
| * animation/AnimationPlaybackEvent.cpp: |
| (WebCore::AnimationPlaybackEvent::bindingsCurrentTime const): |
| (WebCore::AnimationPlaybackEvent::bindingsTimelineTime const): |
| * animation/AnimationTimeline.cpp: |
| (WebCore::AnimationTimeline::bindingsCurrentTime): |
| * animation/ComputedTimingProperties.h: Added. |
| * animation/ComputedTimingProperties.idl: Added. We set nullable double values to a default value of "null" since |
| otherwise setting those properties to a null value would not set the properties in the converted JS dictionary. |
| * animation/KeyframeEffect.cpp: |
| (WebCore::KeyframeEffect::create): Handle new timing properties passed in the KeyframeEffectOptions dictionary. |
| (WebCore::KeyframeEffect::applyAtLocalTime): |
| (WebCore::KeyframeEffect::getAnimatedStyle): |
| (WebCore::KeyframeEffect::startOrStopAccelerated): |
| * animation/WebAnimation.cpp: |
| (WebCore::WebAnimation::bindingsStartTime const): |
| (WebCore::WebAnimation::bindingsCurrentTime const): |
| (WebCore::WebAnimation::effectEndTime const): |
| (WebCore::WebAnimation::timeToNextRequiredTick const): |
| * animation/WebAnimationUtilities.h: Added. |
| (WebCore::secondsToWebAnimationsAPITime): |
| |
| 2018-01-19 Alex Christensen <achristensen@webkit.org> |
| |
| Remove dead networking code |
| https://bugs.webkit.org/show_bug.cgi?id=181813 |
| |
| Reviewed by Tim Horton. |
| |
| CFURLConnection is only used on Windows. |
| |
| * platform/network/cf/ResourceError.h: |
| * platform/network/cf/ResourceRequest.h: |
| (WebCore::ResourceRequest::encodingRequiresPlatformData const): |
| * platform/network/cf/ResourceRequestCFNet.cpp: |
| (WebCore::findCFURLRequestCopyContentDispositionEncodingFallbackArrayFunction): |
| (WebCore::ResourceRequest::doUpdatePlatformRequest): |
| (WebCore::ResourceRequest::doUpdatePlatformHTTPBody): |
| (WebCore::ResourceRequest::doUpdateResourceRequest): |
| (WebCore::ResourceRequest::setStorageSession): |
| * platform/network/cf/ResourceResponse.h: |
| (WebCore::ResourceResponse::ResourceResponse): |
| |
| 2018-01-19 Alex Christensen <achristensen@webkit.org> |
| |
| Remove unused WebViewPrivate _allowCookies |
| https://bugs.webkit.org/show_bug.cgi?id=181812 |
| |
| Reviewed by Tim Horton. |
| |
| This SPI was in the original iOS upstreaming and has not been used in many years. |
| |
| * platform/network/ResourceRequestBase.cpp: |
| (WebCore::ResourceRequestBase::setDefaultAllowCookies): Deleted. |
| (WebCore::ResourceRequestBase::defaultAllowCookies): Deleted. |
| * platform/network/ResourceRequestBase.h: |
| (WebCore::ResourceRequestBase::ResourceRequestBase): |
| |
| 2018-01-18 Brady Eidson <beidson@apple.com> |
| |
| Make in-process MessagePorts be (mostly) asynchronous |
| https://bugs.webkit.org/show_bug.cgi?id=181454 |
| |
| Reviewed by Alex Christensen. |
| |
| No new tests (Covered *brutally* by existing tests) |
| |
| Part of making MessagePorts be a thing we can pass across processes is making them work async. |
| |
| The existing "MessagePortChannel" method of abstraction was not cut out for this. |
| This patch gets rid of MessagePortChannel and adds a new MessagePortChannelProvider abstraction. |
| It then gets the new machinery working in-process (with some pieces of out-of-process in place) |
| |
| One synchronous behavior this patch maintains is the hasPendingActivity() check used to support GC. |
| That will (creatively) be made async in the next followup. |
| |
| More generally from MessagePorts, this patch also adds a "MessageWithMessagePorts" object to be used |
| with all forms of postMessage(). Much better. |
| |
| * CMakeLists.txt: |
| * Sources.txt: |
| * WebCore.xcodeproj/project.pbxproj: |
| |
| * dom/InProcessMessagePortChannel.cpp: Removed. |
| * dom/InProcessMessagePortChannel.h: Removed. |
| * dom/MessagePortChannel.cpp: Removed. |
| * dom/MessagePortChannel.h: Removed. |
| |
| * dom/MessageChannel.cpp: |
| (WebCore::MessageChannel::create): |
| (WebCore::MessageChannel::MessageChannel): |
| (WebCore::m_port2): Deleted. |
| * dom/MessageChannel.h: |
| (WebCore::MessageChannel::create): Deleted. |
| |
| * dom/MessagePort.cpp: |
| (WebCore::MessagePort::create): |
| (WebCore::MessagePort::MessagePort): |
| (WebCore::MessagePort::~MessagePort): |
| (WebCore::MessagePort::entangle): |
| (WebCore::MessagePort::postMessage): |
| (WebCore::MessagePort::disentangle): |
| (WebCore::MessagePort::messageAvailable): |
| (WebCore::MessagePort::start): |
| (WebCore::MessagePort::close): |
| (WebCore::MessagePort::contextDestroyed): |
| (WebCore::MessagePort::dispatchMessages): |
| (WebCore::MessagePort::hasPendingActivity const): |
| (WebCore::MessagePort::locallyEntangledPort const): |
| (WebCore::MessagePort::disentanglePorts): |
| (WebCore::MessagePort::entanglePorts): |
| (WebCore::MessagePort::entangleWithRemote): Deleted. |
| * dom/MessagePort.h: |
| |
| * dom/MessagePortIdentifier.h: |
| (WebCore::MessagePortIdentifier::logString const): |
| |
| * dom/ScriptExecutionContext.cpp: |
| (WebCore::ScriptExecutionContext::processMessageWithMessagePortsSoon): |
| (WebCore::ScriptExecutionContext::dispatchMessagePortEvents): |
| (WebCore::ScriptExecutionContext::processMessagePortMessagesSoon): Deleted. |
| * dom/ScriptExecutionContext.h: |
| |
| Add a single object that represents two intertwined ports, tracks their pending |
| messages, tracks which process they're in, etc etc: |
| * dom/messageports/MessagePortChannel.cpp: Added. |
| (WebCore::MessagePortChannel::create): |
| (WebCore::MessagePortChannel::MessagePortChannel): |
| (WebCore::MessagePortChannel::~MessagePortChannel): |
| (WebCore::MessagePortChannel::includesPort): |
| (WebCore::MessagePortChannel::entanglePortWithProcess): |
| (WebCore::MessagePortChannel::disentanglePort): |
| (WebCore::MessagePortChannel::closePort): |
| (WebCore::MessagePortChannel::postMessageToRemote): |
| (WebCore::MessagePortChannel::takeAllMessagesForPort): |
| (WebCore::MessagePortChannel::hasAnyMessagesPendingOrInFlight const): |
| * dom/messageports/MessagePortChannel.h: Added. |
| (WebCore::MessagePortChannel::port1 const): |
| (WebCore::MessagePortChannel::port2 const): |
| (WebCore::MessagePortChannel::logString const): |
| |
| Abstraction for creating and operating on MessagePorts in a potentially cross-process way: |
| * dom/messageports/MessagePortChannelProvider.cpp: Added. |
| (WebCore::MessagePortChannelProvider::singleton): |
| (WebCore::MessagePortChannelProvider::setSharedProvider): |
| * dom/messageports/MessagePortChannelProvider.h: Added. |
| (WebCore::MessagePortChannelProvider::~MessagePortChannelProvider): |
| |
| Adds a concrete implementation of that provider to be used in-process (e.g. WK1): |
| * dom/messageports/MessagePortChannelProviderImpl.cpp: Added. |
| (WebCore::MessagePortChannelProviderImpl::~MessagePortChannelProviderImpl): |
| (WebCore::MessagePortChannelProviderImpl::performActionOnAppropriateThread): |
| (WebCore::MessagePortChannelProviderImpl::createNewMessagePortChannel): |
| (WebCore::MessagePortChannelProviderImpl::entangleLocalPortInThisProcessToRemote): |
| (WebCore::MessagePortChannelProviderImpl::messagePortDisentangled): |
| (WebCore::MessagePortChannelProviderImpl::messagePortClosed): |
| (WebCore::MessagePortChannelProviderImpl::postMessageToRemote): |
| (WebCore::MessagePortChannelProviderImpl::takeAllMessagesForPort): |
| (WebCore::MessagePortChannelProviderImpl::hasMessagesForPorts_temporarySync): |
| * dom/messageports/MessagePortChannelProviderImpl.h: Added. |
| |
| Adds a main thread object to handle the set of all MessagePortChannels that are open. |
| For now it lives in the WebProcess, but for out-of-process it will live in the UIProcess: |
| * dom/messageports/MessagePortChannelRegistry.cpp: Added. |
| (WebCore::MessagePortChannelRegistry::~MessagePortChannelRegistry): |
| (WebCore::MessagePortChannelRegistry::didCreateMessagePortChannel): |
| (WebCore::MessagePortChannelRegistry::messagePortChannelCreated): |
| (WebCore::MessagePortChannelRegistry::messagePortChannelDestroyed): |
| (WebCore::MessagePortChannelRegistry::didEntangleLocalToRemote): |
| (WebCore::MessagePortChannelRegistry::didDisentangleMessagePort): |
| (WebCore::MessagePortChannelRegistry::didCloseMessagePort): |
| (WebCore::MessagePortChannelRegistry::didPostMessageToRemote): |
| (WebCore::MessagePortChannelRegistry::takeAllMessagesForPort): |
| (WebCore::MessagePortChannelRegistry::hasMessagesForPorts_temporarySync): This is named against style |
| and weird on purpose - to call attention to how bad it is and how it's temporary. |
| (WebCore::MessagePortChannelRegistry::existingChannelContainingPort): |
| * dom/messageports/MessagePortChannelRegistry.h: Added. |
| |
| Add an object that represents a "SerializedScriptValue for the message payload and the ports |
| that are being transferred along with that payload". This is used in all forms of postMessage(): |
| * dom/messageports/MessageWithMessagePorts.cpp: Added. |
| * dom/messageports/MessageWithMessagePorts.h: Added. |
| |
| * page/DOMWindow.cpp: |
| (WebCore::PostMessageTimer::PostMessageTimer): |
| (WebCore::PostMessageTimer::event): |
| (WebCore::DOMWindow::postMessage): |
| |
| * platform/Logging.h: |
| |
| * workers/DedicatedWorkerGlobalScope.cpp: |
| (WebCore::DedicatedWorkerGlobalScope::postMessage): |
| |
| * workers/Worker.cpp: |
| (WebCore::Worker::postMessage): |
| |
| * workers/WorkerGlobalScopeProxy.h: |
| |
| * workers/WorkerMessagingProxy.cpp: |
| (WebCore::WorkerMessagingProxy::postMessageToWorkerObject): |
| (WebCore::WorkerMessagingProxy::postMessageToWorkerGlobalScope): |
| * workers/WorkerMessagingProxy.h: |
| |
| * workers/WorkerObjectProxy.h: |
| |
| * workers/service/ServiceWorker.cpp: |
| (WebCore::ServiceWorker::postMessage): |
| |
| * workers/service/ServiceWorkerClient.cpp: |
| (WebCore::ServiceWorkerClient::postMessage): |
| |
| * workers/service/context/SWContextManager.cpp: |
| (WebCore::SWContextManager::postMessageToServiceWorker): |
| |
| * workers/service/context/ServiceWorkerThread.cpp: |
| (WebCore::fireMessageEvent): |
| (WebCore::ServiceWorkerThread::postMessageToServiceWorker): |
| * workers/service/context/ServiceWorkerThread.h: |
| |
| 2018-01-18 Ryan Haddad <ryanhaddad@apple.com> |
| |
| Unreviewed build fix, removed unused lambda capture. |
| |
| * workers/service/context/SWContextManager.cpp: |
| (WebCore::SWContextManager::ServiceWorkerTerminationRequest::ServiceWorkerTerminationRequest): |
| |
| 2018-01-18 Chris Dumez <cdumez@apple.com> |
| |
| We should be able to terminate service workers that are unresponsive |
| https://bugs.webkit.org/show_bug.cgi?id=181563 |
| <rdar://problem/35280031> |
| |
| Reviewed by Alex Christensen. |
| |
| Test: http/tests/workers/service/postmessage-after-terminating-hung-worker.html |
| |
| * workers/service/context/SWContextManager.cpp: |
| (WebCore::SWContextManager::terminateWorker): |
| Before calling WorkerThread::stop(), set a timer with the given timeout parameter. |
| If the worker thread has not stopped when the timer fires, forcefully exit the |
| service worker process. The StorageProcess will take care of relaunching the |
| service worker process if it exits abruptly. |
| |
| (WebCore::SWContextManager::serviceWorkerFailedToTerminate): |
| Log error message if we failed to terminate a service worker and call exit(). |
| |
| (WebCore::SWContextManager::ServiceWorkerTerminationRequest::ServiceWorkerTerminationRequest): |
| |
| * workers/service/context/SWContextManager.h: |
| |
| 2018-01-18 Youenn Fablet <youenn@apple.com> |
| |
| Do not go to the storage process when loading a main resource if there is no service worker registered |
| https://bugs.webkit.org/show_bug.cgi?id=181395 |
| |
| Reviewed by Chris Dumez. |
| |
| No observable behavior change. |
| Instead of creating a connection to know whether there is a potential service worker, |
| Ask the service worker provider that will use the connection if needed. |
| Otherwise, it will use a default value provided by the UIProcess. |
| |
| Tested by cleaning all service workers and checking the computed value of the default value, |
| then observing whether pages registering service workers work well. |
| |
| * loader/DocumentLoader.cpp: |
| (WebCore::DocumentLoader::startLoadingMainResource): |
| * workers/service/ServiceWorkerProvider.cpp: |
| (WebCore::ServiceWorkerProvider::mayHaveServiceWorkerRegisteredForOrigin): |
| * workers/service/ServiceWorkerProvider.h: |
| |
| 2018-01-18 Dan Bernstein <mitz@apple.com> |
| |
| [Xcode] Streamline and future-proof target-macOS-version-dependent build setting definitions |
| https://bugs.webkit.org/show_bug.cgi?id=181803 |
| |
| Reviewed by Tim Horton. |
| |
| * Configurations/Base.xcconfig: Updated. |
| * Configurations/DebugRelease.xcconfig: Ditto. |
| * Configurations/FeatureDefines.xcconfig: Adopted macOSTargetConditionals helpers. |
| * Configurations/Version.xcconfig: Updated. |
| * Configurations/macOSTargetConditionals.xcconfig: Added. Defines helper build settings |
| useful for defining settings that depend on the target macOS version. |
| |
| 2018-01-18 Chris Dumez <cdumez@apple.com> |
| |
| Service Workers restored from persistent storage have 'redundant' state |
| https://bugs.webkit.org/show_bug.cgi?id=181749 |
| <rdar://problem/36556486> |
| |
| Reviewed by Youenn Fablet. |
| |
| Tested by new API test. |
| |
| * workers/service/server/SWServer.cpp: |
| (WebCore::SWServer::installContextData): |
| Make sure the SWServerWorker's state is set to "activated" after it is assigned to |
| the registrations' active slot. Otherwise, it stays in its default state (redundant). |
| |
| 2018-01-18 Antti Koivisto <antti@apple.com> |
| |
| REGRESSION(r225650): The scores of MotionMark tests Multiply and Leaves dropped by 8% |
| https://bugs.webkit.org/show_bug.cgi?id=181460 |
| <rdar://problem/36379776> |
| |
| Reviewed by Ryosuke Niwa. |
| |
| * css/parser/CSSParser.cpp: |
| (WebCore::CSSParserContext::CSSParserContext): |
| |
| Don't do the expensive security origin test if the supplied sheet base URL is null. This |
| is true for rules coming from the same document. |
| |
| 2018-01-18 Antti Koivisto <antti@apple.com> |
| |
| REGRESSION (r223604): Setting :before/after pseudo element on <noscript> asserts |
| https://bugs.webkit.org/show_bug.cgi?id=181795 |
| <rdar://problem/36334524> |
| |
| Reviewed by David Kilzer. |
| |
| <noscript> disallows renderer generation outside CSS mechanisms, however we would still construct |
| PseudoElements for them during style resolution. These were never removed properly because the |
| pseudo element removal was tied to render tree teardown. Without proper removal the associated |
| animations were also not canceled. |
| |
| Test: fast/css-generated-content/noscript-pseudo-anim-crash.html |
| |
| * dom/Element.cpp: |
| (WebCore::Element::removedFromAncestor): |
| |
| Take care to get rid of PseudoElements when the element is removed from the tree. |
| This also cancels any associated animations. |
| |
| 2018-01-18 Chris Fleizach <cfleizach@apple.com> |
| |
| AX: Aria-activedescendant not supported |
| https://bugs.webkit.org/show_bug.cgi?id=161734 |
| <rdar://problem/28202679> |
| |
| Reviewed by Joanmarie Diggs. |
| |
| When a combo-box owns/controls a list/listbox/grid/tree, the owned element needs to check the active-descendant of the combobox when |
| checking if it has selected children. |
| The target of the selection change notification should also be the owned element in these cases. |
| |
| Test: accessibility/aria-combobox-controlling-list.html |
| |
| * accessibility/AccessibilityObject.cpp: |
| (WebCore::AccessibilityObject::selectedListItem): |
| * accessibility/AccessibilityObject.h: |
| * accessibility/AccessibilityRenderObject.cpp: |
| (WebCore::AccessibilityRenderObject::targetElementForActiveDescendant const): |
| (WebCore::AccessibilityRenderObject::handleActiveDescendantChanged): |
| (WebCore::AccessibilityRenderObject::canHaveSelectedChildren const): |
| (WebCore::AccessibilityRenderObject::selectedChildren): |
| * accessibility/AccessibilityRenderObject.h: |
| * accessibility/mac/AXObjectCacheMac.mm: |
| (WebCore::AXObjectCache::postPlatformNotification): |
| |
| 2018-01-17 Per Arne Vollan <pvollan@apple.com> |
| |
| REGRESSION (r224780): Text stroke not applied to video captions. |
| https://bugs.webkit.org/show_bug.cgi?id=181743 |
| <rdar://problem/35874338> |
| |
| Reviewed by Simon Fraser. |
| |
| Tests: media/track/track-css-visible-stroke-expected.html |
| media/track/track-css-visible-stroke.html |
| |
| After r224780, it is no longer possible to mix text stroke styles with webkit |
| legacy text stroke styles. |
| |
| * css/StyleResolver.cpp: |
| (WebCore::isValidCueStyleProperty): |
| * page/CaptionUserPreferencesMediaAF.cpp: |
| (WebCore::CaptionUserPreferencesMediaAF::captionsTextEdgeCSS const): |
| |
| 2018-01-18 Andy Estes <aestes@apple.com> |
| |
| [Payment Request] Support a default shipping address for Apple Pay |
| https://bugs.webkit.org/show_bug.cgi?id=181754 |
| <rdar://problem/36009733> |
| |
| Reviewed by Brady Eidson. |
| |
| Move shippingContact from ApplePayPaymentRequest to ApplePayRequestBase. This allows |
| merchants to specify a default shipping address when using Apple Pay with Payment Request. |
| |
| This also fixes a bug found during testing where |
| +[NSPersonNameComponentsFormatter localizedStringFromPersonNameComponents:style:options:] |
| would throw an exception when passed a nil NSPersonNameComponents. |
| |
| Test: http/tests/ssl/applepay/ApplePayRequestShippingContact.https.html |
| |
| * Modules/applepay/ApplePayPaymentRequest.h: |
| * Modules/applepay/ApplePayPaymentRequest.idl: |
| * Modules/applepay/ApplePayRequestBase.cpp: |
| (WebCore::convertAndValidate): |
| * Modules/applepay/ApplePayRequestBase.h: |
| * Modules/applepay/ApplePayRequestBase.idl: |
| * Modules/applepay/ApplePaySession.cpp: |
| (WebCore::convertAndValidate): |
| * Modules/applepay/ApplePaySessionPaymentRequest.h: |
| (WebCore::ApplePaySessionPaymentRequest::version const): |
| (WebCore::ApplePaySessionPaymentRequest::setVersion): |
| * Modules/applepay/cocoa/PaymentContactCocoa.mm: |
| (WebCore::convert): |
| * Modules/applepay/paymentrequest/ApplePayRequest.idl: |
| * testing/MockPaymentCoordinator.cpp: |
| (WebCore::MockPaymentCoordinator::showPaymentUI): |
| (WebCore::MockPaymentCoordinator::completeMerchantValidation): |
| * testing/MockPaymentCoordinator.h: |
| |
| 2018-01-18 Wenson Hsieh <wenson_hsieh@apple.com> |
| |
| [iOS] Specify -[NSURL _title] for the associated URL when copying an image element |
| https://bugs.webkit.org/show_bug.cgi?id=181783 |
| <rdar://problem/35785445> |
| |
| Reviewed by Ryosuke Niwa. |
| |
| Always specify the -[NSURL _title] to be either the title specified in a PasteboardImage's inner PasteboardURL, |
| or if no title is specified, fall back to the user-visible URL string. This is because at least one internal |
| client always tries to use the -_title property to determine the title of a pasted URL, or if none is specified, |
| the -suggestedName. Since we need to set suggestedName to the preferred file name of the copied image and we |
| don't want the suggested name to become the title of the link, we need to explicitly set the link title. |
| |
| In doing so, this patch also fixes a bug wherein we forget to set the _title of the NSURL we're registering to |
| an NSItemProvider. |
| |
| Tests: ActionSheetTests.CopyImageElementWithHREFAndTitle (new) |
| ActionSheetTests.CopyImageElementWithHREF (modified) |
| |
| * platform/ios/PlatformPasteboardIOS.mm: |
| (WebCore::PlatformPasteboard::write): |
| |
| 2018-01-17 Jer Noble <jer.noble@apple.com> |
| |
| WebVTT served via HLS never results in cues |
| https://bugs.webkit.org/show_bug.cgi?id=181773 |
| |
| Reviewed by Eric Carlson. |
| |
| Test: http/tests/media/hls/hls-webvtt-tracks.html |
| |
| Three independant errors conspired to keep in-band WebVTT samples from parsing: |
| |
| - The definition of ISOWebVTTCue::boxTypeName() was incorrect. |
| - ISOWebVTTCue::parse() didn't call it's superclass's parse() method (leading to an incorrect size and offset). |
| - Use String::fromUTF8() rather than String.adopt(StringVector&&). |
| |
| * platform/graphics/iso/ISOVTTCue.cpp: |
| (WebCore::ISOWebVTTCue::parse): |
| * platform/graphics/iso/ISOVTTCue.h: |
| (WebCore::ISOWebVTTCue::boxTypeName): |
| |
| 2018-01-17 John Wilander <wilander@apple.com> |
| |
| Resource Load Statistics: Block cookies for prevalent resources without user interaction |
| https://bugs.webkit.org/show_bug.cgi?id=177394 |
| <rdar://problem/34613960> |
| |
| Reviewed by Alex Christensen. |
| |
| Tests: http/tests/resourceLoadStatistics/add-blocking-to-redirect.html |
| http/tests/resourceLoadStatistics/non-prevalent-resources-can-access-cookies-in-a-third-party-context.html |
| http/tests/resourceLoadStatistics/remove-blocking-in-redirect.html |
| http/tests/resourceLoadStatistics/remove-partitioning-in-redirect.html |
| |
| * platform/network/NetworkStorageSession.h: |
| Now exports NetworkStorageSession::nsCookieStorage(). |
| * platform/network/cf/NetworkStorageSessionCFNet.cpp: |
| (WebCore::NetworkStorageSession::setPrevalentDomainsToPartitionOrBlockCookies): |
| Fixes the FIXME. |
| |
| 2018-01-17 Dean Jackson <dino@apple.com> |
| |
| Remove linked-on test for Snow Leopard |
| https://bugs.webkit.org/show_bug.cgi?id=181770 |
| |
| Reviewed by Eric Carlson. |
| |
| Remove a very old linked-on-or-after test. |
| |
| * platform/graphics/ca/GraphicsLayerCA.cpp: |
| |
| 2018-01-17 Matt Lewis <jlewis3@apple.com> |
| |
| Unreviewed, rolling out r227098. |
| |
| This broke the build. |
| |
| Reverted changeset: |
| |
| "Remove linked-on test for Snow Leopard" |
| https://bugs.webkit.org/show_bug.cgi?id=181770 |
| https://trac.webkit.org/changeset/227098 |
| |
| 2018-01-17 Dean Jackson <dino@apple.com> |
| |
| Remove linked-on test for Snow Leopard |
| https://bugs.webkit.org/show_bug.cgi?id=181770 |
| |
| Reviewed by Eric Carlson. |
| |
| Remove a very old linked-on-or-after test. |
| |
| * platform/graphics/ca/GraphicsLayerCA.cpp: |
| |
| 2018-01-17 Stephan Szabo <stephan.szabo@sony.com> |
| |
| [Curl] Use ResourceRequest::encodeWithPlatformData() |
| https://bugs.webkit.org/show_bug.cgi?id=181768 |
| |
| Reviewed by Alex Christensen. |
| |
| No new tests, assertion hit in downstream port, should be covered by |
| existing tests. |
| |
| * platform/network/curl/ResourceRequest.h: |
| (WebCore::ResourceRequest::encodeWithPlatformData const): |
| (WebCore::ResourceRequest::decodeWithPlatformData): |
| |
| 2018-01-17 Eric Carlson <eric.carlson@apple.com> |
| |
| Use existing RGB colorspace instead of creating a new one |
| https://bugs.webkit.org/show_bug.cgi?id=181765 |
| <rdar://problem/36595753> |
| |
| Reviewed by Dean Jackson. |
| |
| * platform/mediastream/mac/ScreenDisplayCaptureSourceMac.mm: |
| (WebCore::ScreenDisplayCaptureSourceMac::createDisplayStream): Use sRGBColorSpaceRef instead |
| of creating a new static colorspace. |
| |
| 2018-01-17 Matt Lewis <jlewis3@apple.com> |
| |
| Unreviewed, rolling out r227076. |
| |
| This breaks internal builds |
| |
| Reverted changeset: |
| |
| "Resource Load Statistics: Block cookies for prevalent |
| resources without user interaction" |
| https://bugs.webkit.org/show_bug.cgi?id=177394 |
| https://trac.webkit.org/changeset/227076 |
| |
| 2018-01-17 Ryosuke Niwa <rniwa@webkit.org> |
| |
| input and textarea elements should reveal selection in setSelection when focused |
| https://bugs.webkit.org/show_bug.cgi?id=181715 |
| <rdar://problem/36570546> |
| |
| Reviewed by Zalan Bujtas. |
| |
| Made input and textarea elements reveal selection in FrameSelection::setSelection instead of by directly |
| invoking FrameSelection::revealSelection in their respective updateFocusAppearance to unify code paths. |
| |
| Also added options to reveal selection up to the main frame to SetSelectionOption to be used in iOS. |
| |
| * editing/FrameSelection.cpp: |
| (WebCore::FrameSelection::FrameSelection): |
| (WebCore::FrameSelection::moveWithoutValidationTo): Takes SelectionRevealMode as an argument and converts |
| sets appropriate selection options. |
| (WebCore::FrameSelection::setSelection): Reconstruct SelectionRevealMode out of selection option sets. |
| (WebCore::FrameSelection::updateAndRevealSelection): |
| * editing/FrameSelection.h: |
| (WebCore::FrameSelection): Added RevealSelectionUpToMainFrame as a SelectionRevealMode and replaced |
| m_shouldRevealSelection by m_selectionRevealMode. |
| * html/HTMLInputElement.cpp: |
| (WebCore::HTMLInputElement::updateFocusAppearance): Pass SelectionRevealMode to HTMLTextFormControlElement's |
| select and restoreCachedSelection instead of directly invoking FrameSelection::revealSelection. |
| * html/HTMLTextAreaElement.cpp: |
| (WebCore::HTMLTextAreaElement::updateFocusAppearance): Ditto. |
| * html/HTMLTextFormControlElement.cpp: |
| (WebCore::HTMLTextFormControlElement::select): |
| (WebCore::HTMLTextFormControlElement::setSelectionRange): |
| (WebCore::HTMLTextFormControlElement::restoreCachedSelection): |
| * html/HTMLTextFormControlElement.h: |
| |
| 2018-01-17 Michael Catanzaro <mcatanzaro@igalia.com> |
| |
| WEBKIT_FRAMEWORK should not modify file-global include directories |
| https://bugs.webkit.org/show_bug.cgi?id=181656 |
| |
| Reviewed by Konstantin Tokarev. |
| |
| * CMakeLists.txt: |
| * PlatformWPE.cmake: |
| |
| 2018-01-17 Michael Catanzaro <mcatanzaro@igalia.com> |
| |
| [GTK] Try even harder not to static link WTF into libwebkit2gtk |
| https://bugs.webkit.org/show_bug.cgi?id=181751 |
| |
| Reviewed by Alex Christensen. |
| |
| We don't want two copies of WTF. It should only be in libjavascriptcoregtk. |
| |
| * PlatformGTK.cmake: |
| |
| 2018-01-17 Zalan Bujtas <zalan@apple.com> |
| |
| Multicol: RenderMultiColumnFlow should not inherit the flow state |
| https://bugs.webkit.org/show_bug.cgi?id=181762 |
| <rdar://problem/35448565> |
| |
| Reviewed by Simon Fraser. |
| |
| Do not compute the inherited flow state flag for RenderMultiColumnFlow. |
| It is (by definition) always inside a fragmented flow. |
| |
| Test: fast/multicol/crash-when-out-of-flow-positioned-becomes-in-flow.html |
| |
| * rendering/RenderObject.cpp: |
| (WebCore::RenderObject::computedFragmentedFlowState): |
| |
| 2018-01-17 Alex Christensen <achristensen@webkit.org> |
| |
| Deprecate Application Cache |
| https://bugs.webkit.org/show_bug.cgi?id=181764 |
| |
| Reviewed by Geoffrey Garen. |
| |
| * features.json: |
| |
| 2018-01-17 Wenson Hsieh <wenson_hsieh@apple.com> |
| |
| [iOS simulator] API test WKAttachmentTests.InjectedBundleReplaceURLWhenPastingImage is failing |
| https://bugs.webkit.org/show_bug.cgi?id=181758 |
| |
| Reviewed by Tim Horton. |
| |
| This test is failing because Editor::clientReplacementURLForResource expects a MIME type, but on iOS, the type |
| paramter passed into WebContentReader::readImage is a UTI; subsequently, the bundle editing delegate receives |
| a MIME type that's actually a UTI, which is incorrect. To address this, ensure that a MIME type is passed to |
| bundle SPI by converting the type in WebContentReader::readImage to a MIME type. |
| |
| * editing/cocoa/WebContentReaderCocoa.mm: |
| (WebCore::WebContentReader::readImage): |
| |
| 2018-01-17 Antti Koivisto <antti@apple.com> |
| |
| REGRESSION (r226385?): Crash in com.apple.WebCore: WebCore::MediaQueryEvaluator::evaluate const + 32 |
| https://bugs.webkit.org/show_bug.cgi?id=181742 |
| <rdar://problem/36334726> |
| |
| Reviewed by David Kilzer. |
| |
| Test: fast/media/mediaqueryevaluator-crash.html |
| |
| * css/MediaQueryEvaluator.cpp: |
| (WebCore::MediaQueryEvaluator::MediaQueryEvaluator): |
| |
| Use WeakPtr<Document> instead of a plain Frame pointer. |
| |
| (WebCore::MediaQueryEvaluator::evaluate const): |
| |
| Get the frame via document. |
| |
| * css/MediaQueryEvaluator.h: |
| * dom/Document.cpp: |
| (WebCore::Document::prepareForDestruction): |
| |
| Take care to clear style resolver. |
| |
| 2018-01-17 Youenn Fablet <youenn@apple.com> |
| |
| Put fetch request keepAlive behind a runtime flag |
| https://bugs.webkit.org/show_bug.cgi?id=181592 |
| |
| Reviewed by Chris Dumez. |
| |
| No change of behavior. |
| |
| * Modules/fetch/FetchRequest.idl: |
| * page/RuntimeEnabledFeatures.h: |
| (WebCore::RuntimeEnabledFeatures::fetchAPIKeepAliveEnabled const): |
| (WebCore::RuntimeEnabledFeatures::setFetchAPIKeepAliveEnabled): |
| |
| 2018-01-17 Per Arne Vollan <pvollan@apple.com> |
| |
| [Win] Use switch when converting from ResourceRequestCachePolicy to platform cache policy. |
| https://bugs.webkit.org/show_bug.cgi?id=181686 |
| |
| Reviewed by Alex Christensen. |
| |
| No new tests, covered by existing tests. |
| |
| A switch will make the function easier on the eyes. Also, use the function in places where the ResourceRequestCachePolicy |
| is just casted to a platform cache policy. |
| |
| * platform/network/cf/ResourceRequestCFNet.cpp: |
| (WebCore::toPlatformRequestCachePolicy): |
| |
| 2018-01-17 John Wilander <wilander@apple.com> |
| |
| Resource Load Statistics: Block cookies for prevalent resources without user interaction |
| https://bugs.webkit.org/show_bug.cgi?id=177394 |
| <rdar://problem/34613960> |
| |
| Reviewed by Alex Christensen. |
| |
| Tests: http/tests/resourceLoadStatistics/add-blocking-to-redirect.html |
| http/tests/resourceLoadStatistics/non-prevalent-resources-can-access-cookies-in-a-third-party-context.html |
| http/tests/resourceLoadStatistics/remove-blocking-in-redirect.html |
| http/tests/resourceLoadStatistics/remove-partitioning-in-redirect.html |
| |
| * platform/network/NetworkStorageSession.h: |
| Now exports NetworkStorageSession::nsCookieStorage(). |
| * platform/network/cf/NetworkStorageSessionCFNet.cpp: |
| (WebCore::NetworkStorageSession::setPrevalentDomainsToPartitionOrBlockCookies): |
| Fixes the FIXME. |
| |
| 2018-01-17 Daniel Bates <dabates@apple.com> |
| |
| REGRESSION (r222795): Cardiogram never signs in |
| https://bugs.webkit.org/show_bug.cgi?id=181693 |
| <rdar://problem/36286293> |
| |
| Reviewed by Ryosuke Niwa. |
| |
| Exempt Cardiogram from the XHR header restrictions in r222795. |
| |
| Following r222795 only Dashboard widgets are allowed to set arbitrary XHR headers. |
| However Cardiogram also depends on such functionality. |
| |
| Test: fast/xmlhttprequest/set-dangerous-headers-from-file-when-setting-enabled.html |
| |
| * page/Settings.yaml: |
| * platform/RuntimeApplicationChecks.h: |
| * platform/cocoa/RuntimeApplicationChecksCocoa.mm: |
| (WebCore::IOSApplication::isCardiogram): |
| * xml/XMLHttpRequest.cpp: |
| (WebCore::XMLHttpRequest::setRequestHeader): |
| |
| 2018-01-17 Daniel Bates <dabates@apple.com> |
| |
| ASSERTION FAILED: !m_completionHandler in PingHandle::~PingHandle() |
| https://bugs.webkit.org/show_bug.cgi?id=181746 |
| <rdar://problem/36586248> |
| |
| Reviewed by Chris Dumez. |
| |
| Call PingHandle::pingLoadComplete() with an error when NSURLConnection queries |
| whether the ping is able to respond to an authentication request. (Pings do not |
| respond to authenticate requests.) It will call the completion handler, nullify |
| the completion handler, and deallocate the PingHandle. Nullifying the completion |
| handler is necessary to avoid the assertion failure in ~PingHandle(). |
| |
| Test: http/tests/misc/before-unload-load-image.html |
| |
| * platform/network/PingHandle.h: |
| |
| 2018-01-17 Daniel Bates <dabates@apple.com> |
| |
| WebCoreResourceHandleAsOperationQueueDelegate/ResourceHandleCFURLConnectionDelegateWithOperationQueue may |
| be deleted in main thread callback |
| https://bugs.webkit.org/show_bug.cgi?id=181747 |
| <rdar://problem/36588120> |
| |
| Reviewed by Alex Christensen. |
| |
| Retain the delegate (e.g. WebCoreResourceHandleAsOperationQueueDelegate) before scheduling |
| a main thread callback and blocking on a semaphore for its reply because the main thread |
| callback can do anything, including deleting the delegate, before the non-main thread |
| has a chance to execute. For instance, a PingHandle will delete itself (and hence delete |
| its resource handle delegate) in most of the code paths invoked by the delegate. |
| |
| * platform/network/cf/ResourceHandleCFURLConnectionDelegateWithOperationQueue.cpp: |
| (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::willSendRequest): |
| (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::didReceiveResponse): |
| (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::willCacheResponse): |
| (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::canRespondToProtectionSpace): |
| * platform/network/mac/WebCoreResourceHandleAsOperationQueueDelegate.mm: |
| (-[WebCoreResourceHandleAsOperationQueueDelegate connection:willSendRequest:redirectResponse:]): |
| (-[WebCoreResourceHandleAsOperationQueueDelegate connection:canAuthenticateAgainstProtectionSpace:]): |
| (-[WebCoreResourceHandleAsOperationQueueDelegate connection:didReceiveResponse:]): |
| (-[WebCoreResourceHandleAsOperationQueueDelegate connection:willCacheResponse:]): |
| |
| 2018-01-17 Chris Dumez <cdumez@apple.com> |
| |
| 'fetch' event may be sent to a service worker before its state is set to 'activated' |
| https://bugs.webkit.org/show_bug.cgi?id=181698 |
| <rdar://problem/36554856> |
| |
| Reviewed by Youenn Fablet. |
| |
| 'fetch' event may be sent to a service worker before its state is set to 'activated'. |
| When the registration's active worker needs to intercept a load, and its state is 'activating', |
| we queue the request to send the fetch event in SWServerWorker::m_whenActivatedHandlers. |
| Once the SWServerWorker::setState() is called with 'activated' state, we then call the |
| handlers in m_whenActivatedHandlers to make send the fetch event now that the worker is |
| activated. The issue is that even though the worker is activated and its state was set to |
| 'activated' on Storage process side, we had not yet notified the ServiceWorker process |
| of the service worker's new state yet. |
| |
| To address the issue, we now make sure that SWServerWorker::m_whenActivatedHandlers are |
| called *after* we've sent the IPC to the ServiceWorker process to update the worker's |
| state to 'activated'. Also, we now call ServiceWorkerFetch::dispatchFetchEvent() |
| asynchronously in a postTask() as the service worker's state is also updated asynchronously |
| in a postTask. This is as per specification [1], which says to "queue a task" to fire |
| the fetch event. |
| |
| [1] https://w3c.github.io/ServiceWorker/#on-fetch-request-algorithm (step 18) |
| |
| No new tests, covered by imported/w3c/web-platform-tests/service-workers/service-worker/fetch-waits-for-activate.https.html |
| which hits the new assertion without the fix. |
| |
| * workers/service/context/ServiceWorkerFetch.cpp: |
| (WebCore::ServiceWorkerFetch::dispatchFetchEvent): |
| Add assertions to make sure that we dispatch the fetch event on the right worker and |
| that the worker is in 'activated' state. |
| |
| * workers/service/context/ServiceWorkerThread.cpp: |
| (WebCore::ServiceWorkerThread::postFetchTask): |
| Queue a task to fire the fetch event as per: |
| - https://w3c.github.io/ServiceWorker/#on-fetch-request-algorithm (step 18) |
| We need to match the specification exactly here or things will happen in the wrong |
| order. In particular, things like "update registration state" and "update worker state" |
| might happen *after* firing the fetch event, even though the IPC for "update registration/worker |
| state" was sent before the "fire fetch event" one, because the code for updating a registration/ |
| worker state already queues a task, as per the specification. |
| |
| * workers/service/server/SWServerRegistration.cpp: |
| (WebCore::SWServerRegistration::updateWorkerState): |
| * workers/service/server/SWServerRegistration.h: |
| * workers/service/server/SWServerWorker.cpp: |
| (WebCore::SWServerWorker::setState): |
| Move code to send the IPC to the Service Worker process whenever the service worker's state |
| needs to be updated from SWServerRegistration::updateWorkerState() to SWServerWorker::setState(). |
| This way, we can make sure the IPC is sent *before* we call the m_whenActivatedHandlers handlers, |
| as they may also send IPC to the Service Worker process, and we need to make sure this IPC happens |
| after so that the service worker is in the right state. |
| |
| 2018-01-17 Stephan Szabo <stephan.szabo@sony.com> |
| |
| Page.cpp only sees forward declaration of ApplicationStateChangeListener when ENABLE(VIDEO) is off |
| https://bugs.webkit.org/show_bug.cgi?id=181713 |
| |
| Reviewed by Darin Adler. |
| |
| No new tests (build fix). |
| |
| * page/Page.cpp: Add include for ApplicationStateChangeListener |
| |
| 2018-01-17 Wenson Hsieh <wenson_hsieh@apple.com> |
| |
| Add injected bundle SPI to replace subresource URLs when dropping or pasting rich content |
| https://bugs.webkit.org/show_bug.cgi?id=181637 |
| <rdar://problem/36508471> |
| |
| Reviewed by Tim Horton. |
| |
| Before carrying out blob URL conversion for pasted or dropped rich content, let the editor client replace |
| subresource URLs in WebKit2 by calling out to new injected bundle SPI. See comments below for more detail. |
| |
| Tests: WKAttachmentTests.InjectedBundleReplaceURLsWhenPastingAttributedString |
| WKAttachmentTests.InjectedBundleReplaceURLWhenPastingImage |
| |
| * editing/Editor.cpp: |
| (WebCore::Editor::clientReplacementURLForResource): |
| * editing/Editor.h: |
| |
| Add a new helper to call out to the editor client for a URL string to replace a given ArchiveResource. In |
| WebKit2, this calls out to the injected bundle's new `replacementURLForResource` SPI hook. |
| |
| * editing/cocoa/WebContentReaderCocoa.mm: |
| (WebCore::shouldReplaceSubresourceURL): |
| (WebCore::replaceRichContentWithAttachments): |
| (WebCore::replaceSubresourceURLsWithURLsFromClient): |
| |
| Add a new static helper to replace subresource URLs in the given DocumentFragment with URLs supplied by the |
| editor client. Additionally builds a list of ArchiveResources that have not been replaced, for use at call sites |
| so that we don't unnecessarily create more Blobs for ArchiveResources that have already been replaced. |
| |
| (WebCore::createFragmentAndAddResources): |
| (WebCore::sanitizeMarkupWithArchive): |
| |
| Tweak web content reading codepaths to first replace subresource URLs with editor-client-supplied URLs. |
| |
| (WebCore::WebContentReader::readImage): |
| (WebCore::shouldConvertToBlob): Deleted. |
| |
| Rename this helper to shouldReplaceSubresourceURL, blob URL replacement is no longer the only scenario in which |
| we replace resource URLs, but in both cases, we still want to ignore `http:`-family and `data:` URLs. |
| |
| * loader/EmptyClients.cpp: |
| * page/EditorClient.h: |
| |
| 2018-01-17 Yacine Bandou <yacine.bandou_ext@softathome.com> |
| [EME][GStreamer] Add the full-sample encryption support in the GStreamer ClearKey decryptor |
| https://bugs.webkit.org/show_bug.cgi?id=180080 |
| |
| Reviewed by Xabier Rodriguez-Calvar. |
| |
| Currently the GStreamer clearKey decryptor doesn't support the full-sample encryption, |
| where the buffer is entirely encrypted, it supports only the sub-sample encryption. |
| |
| Test: media/encrypted-media/clearKey/clearKey-cenc-audio-playback-mse.html |
| |
| * platform/graphics/gstreamer/eme/WebKitClearKeyDecryptorGStreamer.cpp: |
| (webKitMediaClearKeyDecryptorDecrypt): |
| |
| 2018-01-17 Zan Dobersek <zdobersek@igalia.com> |
| |
| Unreviewed follow-up to r227051. |
| |
| * platform/graphics/cairo/CairoOperations.h: Fix declaration of the |
| fillRoundedRect() function by removing the bool parameter that's not |
| used at all in the definition. This went unspotted due to the unified |
| source build including the implementation file before fillRoundedRect() |
| usage in GrapihcsContextCairo.cpp, leaving the declaration undefined |
| and instead using the definition directly. |
| |
| 2018-01-17 Zan Dobersek <zdobersek@igalia.com> |
| |
| [Cairo] Don't mirror global alpha and image interpolation quality state values in PlatformContextCairo |
| https://bugs.webkit.org/show_bug.cgi?id=181725 |
| |
| Reviewed by Carlos Garcia Campos. |
| |
| Don't duplicate global alpha and image interpolation quality state |
| values on the PlatformContextCairo. Instead, retrieve them from |
| the managing GraphicsContextState when necessary. |
| |
| For Cairo operations, the FillSource and StrokeSource containers now |
| store the global alpha value, using it during the operation executions. |
| For drawNativeImage(), the global alpha and interpolation quality values |
| are passed through arguments. |
| |
| In PlatformContextCairo, the two values are no longer stored on the |
| internally-managed stack, and the getter-setter pairs for the two values |
| are removed. In drawSurfaceToContext(), the two values are now expected |
| to be passed through the method arguments. |
| |
| No new tests -- no change in behavior. |
| |
| * platform/graphics/cairo/CairoOperations.cpp: |
| (WebCore::Cairo::prepareForFilling): |
| (WebCore::Cairo::prepareForStroking): |
| (WebCore::Cairo::drawPathShadow): |
| (WebCore::Cairo::fillCurrentCairoPath): |
| (WebCore::Cairo::FillSource::FillSource): |
| (WebCore::Cairo::StrokeSource::StrokeSource): |
| (WebCore::Cairo::strokeRect): |
| (WebCore::Cairo::strokePath): |
| (WebCore::Cairo::drawGlyphs): |
| (WebCore::Cairo::drawNativeImage): |
| (WebCore::Cairo::State::setGlobalAlpha): Deleted. |
| (WebCore::Cairo::State::setImageInterpolationQuality): Deleted. |
| * platform/graphics/cairo/CairoOperations.h: |
| * platform/graphics/cairo/GraphicsContextCairo.cpp: |
| (WebCore::GraphicsContext::drawNativeImage): |
| (WebCore::GraphicsContext::setPlatformAlpha): |
| (WebCore::GraphicsContext::setPlatformImageInterpolationQuality): |
| * platform/graphics/cairo/PlatformContextCairo.cpp: |
| (WebCore::PlatformContextCairo::save): |
| (WebCore::PlatformContextCairo::drawSurfaceToContext): |
| (WebCore::PlatformContextCairo::State::State): Deleted. |
| (WebCore::PlatformContextCairo::setImageInterpolationQuality): Deleted. |
| (WebCore::PlatformContextCairo::imageInterpolationQuality const): Deleted. |
| (WebCore::PlatformContextCairo::globalAlpha const): Deleted. |
| (WebCore::PlatformContextCairo::setGlobalAlpha): Deleted. |
| * platform/graphics/cairo/PlatformContextCairo.h: |
| * platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp: |
| (WebCore::MediaPlayerPrivateMediaFoundation::Direct3DPresenter::paintCurrentFrame): |
| |
| 2018-01-17 Philippe Normand <pnormand@igalia.com> |
| |
| REGRESSION(r226973/r226974): Four multimedia tests failing |
| https://bugs.webkit.org/show_bug.cgi?id=181696 |
| |
| Reviewed by Carlos Garcia Campos. |
| |
| This patch reverts some of the changes of the above revisions so as to fix layout test failures. |
| |
| * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp: |
| (WebCore::MediaPlayerPrivateGStreamer::handleMessage): Properly |
| prepare stalled event when an error was detected. |
| (WebCore::MediaPlayerPrivateGStreamer::processBufferingStats): Revert to previous version. |
| (WebCore::MediaPlayerPrivateGStreamer::fillTimerFired): Ditto. |
| (WebCore::MediaPlayerPrivateGStreamer::didLoadingProgress const): |
| Emit progress event also when streaming but not when an error was |
| detected. |
| (WebCore::MediaPlayerPrivateGStreamer::totalBytes const): use isLiveStream like everywhere else. |
| * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h: |
| * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp: |
| (webkit_web_src_init): Revert to keep-alive FALSE by default. |
| |
| 2018-01-17 Zan Dobersek <zdobersek@igalia.com> |
| |
| [Cairo] Move prepareForFilling(), prepareForStroking() code to CairoOperations |
| https://bugs.webkit.org/show_bug.cgi?id=181721 |
| |
| Reviewed by Carlos Garcia Campos. |
| |
| Move the prepareForFilling() and prepareForStroking() code off of the |
| PlatformContextCairo class and into static functions inside the |
| CairoOperations implementation files. The original methods weren't |
| called from any place other than the Cairo operations, and they only |
| operated with the cairo_t object that's stored in and retrievable from |
| the PlatformContextCairo object. |
| |
| No new tests -- no change in behavior. |
| |
| * platform/graphics/cairo/CairoOperations.cpp: |
| (WebCore::Cairo::reduceSourceByAlpha): |
| (WebCore::Cairo::prepareCairoContextSource): |
| (WebCore::Cairo::clipForPatternFilling): |
| (WebCore::Cairo::prepareForFilling): |
| (WebCore::Cairo::prepareForStroking): |
| (WebCore::Cairo::drawPathShadow): |
| (WebCore::Cairo::fillCurrentCairoPath): |
| (WebCore::Cairo::strokeRect): |
| (WebCore::Cairo::strokePath): |
| (WebCore::Cairo::drawGlyphs): |
| * platform/graphics/cairo/PlatformContextCairo.cpp: |
| (WebCore::reduceSourceByAlpha): Deleted. |
| (WebCore::prepareCairoContextSource): Deleted. |
| (WebCore::PlatformContextCairo::prepareForFilling): Deleted. |
| (WebCore::PlatformContextCairo::prepareForStroking): Deleted. |
| (WebCore::PlatformContextCairo::clipForPatternFilling): Deleted. |
| * platform/graphics/cairo/PlatformContextCairo.h: |
| |
| 2018-01-17 Zan Dobersek <zdobersek@igalia.com> |
| |
| [Cairo] Use one-time ShadowBlur objects when performing shadowing |
| https://bugs.webkit.org/show_bug.cgi?id=181720 |
| |
| Reviewed by Carlos Garcia Campos. |
| |
| Don't maintain a ShadowBlur object in the PlatformContextCairo class. |
| Instead, use temporary ShadowBlur objects whenever shadowing is needed, |
| providing all the shadow state information to it and drawing shadow into |
| the given GraphicsContext object. |
| |
| ShadowBlur constructors are cleaned up. The 'shadows ignored' argument |
| can now also be provided to the variant that accepts explicit shadow |
| attributes, but the argument is false by default. |
| |
| In CairoOperations, the ShadowBlurUsage functionality is rolled into the |
| new ShadowState class. ShadowState parameter is now used for operations |
| that might need to perform shadow painting. Call sites are modified |
| accordingly. |
| |
| Cairo::State::setShadowValues() and Cairo::State::clearShadow() are |
| removed, since the ShadowBlur object that was modified through those is |
| being removed from the PlatformContextCairo class. We still have to flip |
| the Y-axis of the shadow offset in GraphicsContext::setPlatformShadow() |
| when shadows are ignoring transformations. |
| |
| No new tests -- no change in behavior. |
| |
| * platform/graphics/ShadowBlur.cpp: |
| (WebCore::ShadowBlur::ShadowBlur): |
| * platform/graphics/ShadowBlur.h: |
| * platform/graphics/cairo/CairoOperations.cpp: |
| (WebCore::Cairo::drawPathShadow): |
| (WebCore::Cairo::drawGlyphsShadow): |
| (WebCore::Cairo::ShadowState::ShadowState): |
| (WebCore::Cairo::ShadowState::isVisible const): |
| (WebCore::Cairo::ShadowState::isRequired const): |
| (WebCore::Cairo::fillRect): |
| (WebCore::Cairo::fillRoundedRect): |
| (WebCore::Cairo::fillRectWithRoundedHole): |
| (WebCore::Cairo::fillPath): |
| (WebCore::Cairo::strokeRect): |
| (WebCore::Cairo::strokePath): |
| (WebCore::Cairo::drawGlyphs): |
| (WebCore::Cairo::drawNativeImage): |
| (WebCore::Cairo::State::setShadowValues): Deleted. |
| (WebCore::Cairo::State::clearShadow): Deleted. |
| (WebCore::Cairo::ShadowBlurUsage::ShadowBlurUsage): Deleted. |
| (WebCore::Cairo::ShadowBlurUsage::required const): Deleted. |
| * platform/graphics/cairo/CairoOperations.h: |
| * platform/graphics/cairo/FontCairo.cpp: |
| (WebCore::FontCascade::drawGlyphs): |
| * platform/graphics/cairo/GraphicsContextCairo.cpp: |
| (WebCore::GraphicsContext::restorePlatformState): |
| (WebCore::GraphicsContext::drawNativeImage): |
| (WebCore::GraphicsContext::fillPath): |
| (WebCore::GraphicsContext::strokePath): |
| (WebCore::GraphicsContext::fillRect): |
| (WebCore::GraphicsContext::setPlatformShadow): |
| (WebCore::GraphicsContext::clearPlatformShadow): |
| (WebCore::GraphicsContext::strokeRect): |
| (WebCore::GraphicsContext::platformFillRoundedRect): |
| (WebCore::GraphicsContext::fillRectWithRoundedHole): |
| * platform/graphics/cairo/PlatformContextCairo.cpp: |
| (WebCore::PlatformContextCairo::drawSurfaceToContext): |
| * platform/graphics/cairo/PlatformContextCairo.h: |
| (WebCore::PlatformContextCairo::shadowBlur): Deleted. |
| * platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp: |
| (WebCore::MediaPlayerPrivateMediaFoundation::Direct3DPresenter::paintCurrentFrame): |
| |
| 2018-01-17 Zan Dobersek <zdobersek@igalia.com> |
| |
| CanvasImageData: createImageData() parameter should not be nullable |
| https://bugs.webkit.org/show_bug.cgi?id=181670 |
| |
| Reviewed by Sam Weinig. |
| |
| createImageData() method on the CanvasImageData interface should not |
| treat the ImageData parameter as nullable, but should instead reject any |
| null values with a TypeError, as demanded by the specification. |
| |
| No new tests -- current tests covering createImageData(null) are updated |
| to properly cover new behavior of throwing a TypeError exception. |
| |
| * html/canvas/CanvasImageData.idl: |
| * html/canvas/CanvasRenderingContext2DBase.cpp: |
| (WebCore::CanvasRenderingContext2DBase::createImageData const): |
| * html/canvas/CanvasRenderingContext2DBase.h: |
| |
| 2018-01-16 Fujii Hironori <Hironori.Fujii@sony.com> |
| |
| [CMake] Remove WebCoreDerivedSources library target |
| https://bugs.webkit.org/show_bug.cgi?id=181664 |
| |
| Reviewed by Carlos Garcia Campos. |
| |
| After unified source build has been introduced, CMake Visual |
| Studio build suffers complicated unnecessary recompilation issues |
| because Visual Studio invokes scripts twice in both WebCore and |
| WebCoreDerivedSources projects (Bug 181117). |
| |
| WebCoreDerivedSources library has been introduced in r198766 to |
| avoid command line length limit of CMake Ninja build on macOS. |
| Fortunately, unified source build has reduced the number of source |
| files to compile, WebCore doesn't need to be split anymore. |
| |
| No new tests (No behavior change) |
| |
| * CMakeLists.txt: Replaced WebCore_DERIVED_SOURCES with WebCore_SOURCES. Removed WebCoreDerivedSources library target. |
| Do not compile each JavaScript Builtins.cpp files because the unified source WebCoreJSBuiltins.cpp is already included. |
| * PlatformGTK.cmake: Replaced WebCore_DERIVED_SOURCES with WebCore_SOURCES. |
| * PlatformWin.cmake: Ditto. |
| |
| 2018-01-16 Simon Fraser <simon.fraser@apple.com> |
| |
| Can't scroll iframe after toggling it to display:none and back |
| https://bugs.webkit.org/show_bug.cgi?id=181708 |
| rdar://problem/13234778 |
| |
| Reviewed by Tim Horton. |
| |
| Nothing updated the FrameView's set of scrollable areas when a subframe came back from display:none. |
| Mirror the existing virtual removeChild() by making addChild() virtual, and using it to mark |
| the FrameView's scrollable area set as dirty. |
| |
| Test: tiled-drawing/scrolling/non-fast-region/non-fast-scrollable-region-hide-show-iframe.html |
| |
| * page/FrameView.cpp: |
| (WebCore::FrameView::addChild): |
| * page/FrameView.h: |
| * platform/ScrollView.h: |
| |
| 2018-01-16 Chris Dumez <cdumez@apple.com> |
| |
| SWServerWorker::m_contextConnectionIdentifier may get out of date |
| https://bugs.webkit.org/show_bug.cgi?id=181687 |
| <rdar://problem/36548111> |
| |
| Reviewed by Brady Eidson. |
| |
| SWServerWorker::m_contextConnectionIdentifier may get out of date. This happens when the |
| context process crashes and is relaunched. |
| |
| No new tests, added assertion in terminateWorkerInternal() that hits without this fix. |
| |
| * workers/service/server/SWServer.cpp: |
| (WebCore::SWServer::runServiceWorker): |
| (WebCore::SWServer::terminateWorkerInternal): |
| (WebCore::SWServer::unregisterServiceWorkerClient): |
| * workers/service/server/SWServerWorker.h: |
| (WebCore::SWServerWorker::setContextConnectionIdentifier): |
| |
| 2018-01-16 Jer Noble <jer.noble@apple.com> |
| |
| Reset MediaSourcePrivateAVFObjC's m_sourceBufferWithSelectedVideo when the underlying SourceBufferPrivate is removed. |
| https://bugs.webkit.org/show_bug.cgi?id=181707 |
| <rdar://problem/34809474> |
| |
| Reviewed by Eric Carlson. |
| |
| Test: media/media-source/media-source-remove-unload-crash.html |
| |
| * platform/graphics/avfoundation/objc/MediaSourcePrivateAVFObjC.mm: |
| (WebCore::MediaSourcePrivateAVFObjC::removeSourceBuffer): |
| |
| 2018-01-12 Jiewen Tan <jiewen_tan@apple.com> |
| |
| [WebAuthN] Implement dummy WebAuthN IDLs |
| https://bugs.webkit.org/show_bug.cgi?id=181627 |
| <rdar://problem/36459864> |
| |
| Reviewed by Alex Christensen. |
| |
| This patch implements dummy WebAuthN IDLs and connect them with Credential Management as well. |
| All implementations in this patch are subject to change when real implementations land. The |
| purpose here on the other hand is to have IDLs, bindings and implementations connected. This |
| patch should handle all IDLs that we need. |
| |
| No tests. |
| |
| * CMakeLists.txt: |
| * DerivedSources.make: |
| * Modules/credentialmanagement/CredentialCreationOptions.h: |
| * Modules/credentialmanagement/CredentialCreationOptions.idl: |
| * Modules/credentialmanagement/CredentialRequestOptions.h: |
| * Modules/credentialmanagement/CredentialRequestOptions.idl: |
| * Modules/webauthn/AuthenticatorAssertionResponse.cpp: Copied from Source/WebCore/Modules/webauthn/PublicKeyCredential.cpp. |
| (WebCore::AuthenticatorAssertionResponse::AuthenticatorAssertionResponse): |
| (WebCore::AuthenticatorAssertionResponse::~AuthenticatorAssertionResponse): |
| (WebCore::AuthenticatorAssertionResponse::authenticatorData): |
| (WebCore::AuthenticatorAssertionResponse::signature): |
| (WebCore::AuthenticatorAssertionResponse::userHandle): |
| * Modules/webauthn/AuthenticatorAssertionResponse.h: Copied from Source/WebCore/Modules/credentialmanagement/CredentialRequestOptions.h. |
| * Modules/webauthn/AuthenticatorAssertionResponse.idl: Copied from Source/WebCore/Modules/webauthn/PublicKeyCredential.idl. |
| * Modules/webauthn/AuthenticatorAttestationResponse.cpp: Copied from Source/WebCore/Modules/credentialmanagement/CredentialCreationOptions.h. |
| (WebCore::AuthenticatorAttestationResponse::AuthenticatorAttestationResponse): |
| (WebCore::AuthenticatorAttestationResponse::~AuthenticatorAttestationResponse): |
| (WebCore::AuthenticatorAttestationResponse::attestationObject): |
| * Modules/webauthn/AuthenticatorAttestationResponse.h: Copied from Source/WebCore/Modules/credentialmanagement/CredentialRequestOptions.h. |
| * Modules/webauthn/AuthenticatorAttestationResponse.idl: Copied from Source/WebCore/Modules/webauthn/PublicKeyCredential.idl. |
| * Modules/webauthn/AuthenticatorResponse.cpp: Copied from Source/WebCore/Modules/credentialmanagement/CredentialCreationOptions.h. |
| (WebCore::AuthenticatorResponse::AuthenticatorResponse): |
| (WebCore::AuthenticatorResponse::~AuthenticatorResponse): |
| (WebCore::AuthenticatorResponse::clientDataJSON): |
| * Modules/webauthn/AuthenticatorResponse.h: Copied from Source/WebCore/Modules/credentialmanagement/CredentialRequestOptions.h. |
| * Modules/webauthn/AuthenticatorResponse.idl: Copied from Source/WebCore/Modules/webauthn/PublicKeyCredential.idl. |
| * Modules/webauthn/PublicKeyCredential.cpp: |
| (WebCore::PublicKeyCredential::rawId): |
| (WebCore::PublicKeyCredential::response): |
| (WebCore::PublicKeyCredential::getClientExtensionResults): |
| (WebCore::PublicKeyCredential::isUserVerifyingPlatformAuthenticatorAvailable): |
| * Modules/webauthn/PublicKeyCredential.h: |
| * Modules/webauthn/PublicKeyCredential.idl: |
| * Modules/webauthn/PublicKeyCredentialCreationOptions.h: Copied from Source/WebCore/Modules/credentialmanagement/CredentialRequestOptions.h. |
| * Modules/webauthn/PublicKeyCredentialCreationOptions.idl: Added. |
| * Modules/webauthn/PublicKeyCredentialDescriptor.h: Copied from Source/WebCore/Modules/credentialmanagement/CredentialCreationOptions.h. |
| * Modules/webauthn/PublicKeyCredentialDescriptor.idl: Copied from Source/WebCore/Modules/webauthn/PublicKeyCredential.idl. |
| * Modules/webauthn/PublicKeyCredentialRequestOptions.h: Copied from Source/WebCore/Modules/credentialmanagement/CredentialCreationOptions.h. |
| * Modules/webauthn/PublicKeyCredentialRequestOptions.idl: Copied from Source/WebCore/Modules/credentialmanagement/CredentialRequestOptions.h. |
| * Modules/webauthn/PublicKeyCredentialType.h: Copied from Source/WebCore/Modules/webauthn/PublicKeyCredential.idl. |
| * Modules/webauthn/PublicKeyCredentialType.idl: Copied from Source/WebCore/Modules/webauthn/PublicKeyCredential.idl. |
| * Sources.txt: |
| * WebCore.xcodeproj/project.pbxproj: |
| * bindings/js/WebCoreBuiltinNames.h: |
| |
| 2018-01-16 Zalan Bujtas <zalan@apple.com> |
| |
| AX: Do not trigger layout in updateBackingStore() unless it is safe to do so |
| https://bugs.webkit.org/show_bug.cgi?id=181703 |
| <rdar://problem/36365706> |
| |
| Reviewed by Ryosuke Niwa. |
| |
| Document::isSafeToUpdateStyleOrLayout() can tell whether it is safe to run layout. |
| |
| Unable to create test with WebInspector involved. |
| |
| * accessibility/AccessibilityObject.cpp: |
| (WebCore::AccessibilityObject::updateBackingStore): |
| * dom/Document.cpp: |
| (WebCore::Document::isSafeToUpdateStyleOrLayout const): |
| (WebCore::Document::updateStyleIfNeeded): |
| (WebCore::Document::updateLayout): |
| (WebCore::isSafeToUpdateStyleOrLayout): Deleted. |
| * dom/Document.h: |
| |
| 2018-01-16 Ryan Haddad <ryanhaddad@apple.com> |
| |
| Unreviewed, rolling out r226962. |
| |
| The LayoutTest added with this change is a flaky timeout. |
| |
| Reverted changeset: |
| |
| "Support for preconnect Link headers" |
| https://bugs.webkit.org/show_bug.cgi?id=181657 |
| https://trac.webkit.org/changeset/226962 |
| |
| 2018-01-16 Simon Fraser <simon.fraser@apple.com> |
| |
| Text looks bad on some CSS spec pages |
| https://bugs.webkit.org/show_bug.cgi?id=181700 |
| rdar://problem/36552107 |
| |
| Reviewed by Tim Horton. |
| |
| When making new tiles in a TileController, we failed to set their "supports antialiased layer text" |
| setting, so tile caches could end up with a mixture of layers that do and do not support |
| antialiased layer text. |
| |
| No tests because the tiled drawing tests don't dump out tiles inside of tile caches. |
| |
| * platform/graphics/ca/TileController.cpp: |
| (WebCore::TileController::createTileLayer): |
| |
| 2018-01-16 Said Abou-Hallawa <sabouhallawa@apple.com> |
| |
| REGRESSION(r221292): svg/animations/animateTransform-pattern-transform.html crashes with security assertion |
| https://bugs.webkit.org/show_bug.cgi?id=179986 |
| |
| Reviewed by Simon Fraser. |
| |
| This patch reverts all or parts of the following changes-sets |
| <http://trac.webkit.org/changeset/221292> |
| <http://trac.webkit.org/changeset/197967> |
| <http://trac.webkit.org/changeset/196670> |
| |
| A JS statement like this: |
| var item = text.x.animVal.getItem(0); |
| |
| Creates the following C++ objects: |
| SVGAnimatedListPropertyTearOff<SVGLengthListValues> for 'text.x' |
| SVGListPropertyTearOff<SVGLengthListValues> for 'text.x.animVal' |
| SVGPropertyTearOff<SVGLengthValue> for 'text.x.animVal.getItem(0)' |
| |
| If 'item' changes, the attribute 'x' of the element '<text>' will change |
| as well. But this binding works only in one direction. If the attribute |
| 'x' of the element '<text>' changes, e.g.: |
| |
| text.setAttribute('x', '10,20,30'); |
| |
| This will detach 'item' from the element <text> and any further changes |
| in 'item' won't affect the attribute 'x' of element <text>. |
| |
| The one direction binding can only work if this chain of tear-off objects |
| is kept connected. This is implemented by RefCounted back pointers from |
| SVGPropertyTearOff and SVGListPropertyTearOff to SVGAnimatedListPropertyTearOff. |
| |
| The security crashes and the memory leaks are happening because of the |
| raw forward pointers: |
| -- SVGAnimatedListPropertyTearOff maintains raw pointers of type |
| SVGListPropertyTearOff for m_baseVal and m_animVal |
| -- The m_wrappers and m_animatedWrappers of SVGAnimatedListPropertyTearOff |
| are vectors of raw pointer Vector<SVGLength*> |
| |
| To control the life cycle of the raw pointers, SVGListPropertyTearOff and |
| SVGPropertyTearOff call SVGAnimatedListPropertyTearOff::propertyWillBeDeleted() |
| to notify it they are going to be deleted. In propertyWillBeDeleted(), we |
| clear the pointers so they are not used after being freed. This mechanism |
| has been error-prone and we've never got it 100% right. |
| |
| The solution we need to adopt with SVG tear-off objects is the following: |
| -- All the forward pointers should be weak pointers. |
| -- All the back pointers should be ref pointers. |
| |
| This solution may not look intuitive but it solves the bugs and keeps the |
| one direction binding. The forward weak pointers allows the tear-off |
| objects to go aways if no reference from JS exists. The back ref pointers |
| maintains the chain of objects and guarantees the correct binding. |
| |
| * svg/SVGPathSegList.h: |
| * svg/SVGTransformList.h: |
| * svg/properties/SVGAnimatedListPropertyTearOff.h: |
| (WebCore::SVGAnimatedListPropertyTearOff::baseVal): |
| (WebCore::SVGAnimatedListPropertyTearOff::animVal): |
| * svg/properties/SVGAnimatedPathSegListPropertyTearOff.h: |
| * svg/properties/SVGAnimatedProperty.h: |
| (WebCore::SVGAnimatedProperty::isAnimatedListTearOff const): |
| (WebCore::SVGAnimatedProperty::propertyWillBeDeleted): Deleted. |
| * svg/properties/SVGAnimatedPropertyTearOff.h: |
| * svg/properties/SVGAnimatedTransformListPropertyTearOff.h: |
| * svg/properties/SVGListProperty.h: |
| (WebCore::SVGListProperty::initializeValuesAndWrappers): |
| (WebCore::SVGListProperty::getItemValuesAndWrappers): |
| (WebCore::SVGListProperty::insertItemBeforeValuesAndWrappers): |
| (WebCore::SVGListProperty::replaceItemValuesAndWrappers): |
| (WebCore::SVGListProperty::removeItemValuesAndWrappers): |
| (WebCore::SVGListProperty::appendItemValuesAndWrappers): |
| (WebCore::SVGListProperty::createWeakPtr const): |
| * svg/properties/SVGListPropertyTearOff.h: |
| (WebCore::SVGListPropertyTearOff::removeItemFromList): |
| (WebCore::SVGListPropertyTearOff::~SVGListPropertyTearOff): Deleted. |
| * svg/properties/SVGPropertyTearOff.h: |
| (WebCore::SVGPropertyTearOff::createWeakPtr const): |
| (WebCore::SVGPropertyTearOff::~SVGPropertyTearOff): |
| |
| 2018-01-16 Eric Carlson <eric.carlson@apple.com> |
| |
| AVSampleBufferDisplayLayer should be flushed when application activates |
| https://bugs.webkit.org/show_bug.cgi?id=181623 |
| <rdar://problem/36487738> |
| |
| Reviewed by Darin Adler. |
| |
| No new tests, I wasn't able to reproduce it in a test. |
| |
| * WebCore.xcodeproj/project.pbxproj: |
| * dom/Document.cpp: |
| (WebCore::Document::addApplicationStateChangeListener): New. |
| (WebCore::Document::removeApplicationStateChangeListener): Ditto. |
| (WebCore::Document::forEachApplicationStateChangeListener): Ditto. |
| * dom/Document.h: |
| |
| * html/HTMLMediaElement.cpp: |
| (WebCore::HTMLMediaElement::registerWithDocument): Register for application state changes. |
| (WebCore::HTMLMediaElement::unregisterWithDocument): Unregister. |
| (WebCore::HTMLMediaElement::applicationWillResignActive): Pass through to the player. |
| (WebCore::HTMLMediaElement::applicationDidBecomeActive): Ditto. |
| * html/HTMLMediaElement.h: |
| |
| * page/ApplicationStateChangeListener.h: Added. |
| (WebCore::ApplicationStateChangeListener::applicationWillResignActive): |
| (WebCore::ApplicationStateChangeListener::applicationDidBecomeActive): |
| * page/Page.cpp: |
| (WebCore::Page::forEachDocument): |
| (WebCore::Page::applicationWillResignActive): |
| (WebCore::Page::applicationDidEnterBackground): |
| (WebCore::Page::applicationWillEnterForeground): |
| (WebCore::Page::applicationDidBecomeActive): |
| * page/Page.h: |
| * platform/graphics/MediaPlayer.cpp: |
| (WebCore::MediaPlayer::applicationWillResignActive): |
| (WebCore::MediaPlayer::applicationDidBecomeActive): |
| * platform/graphics/MediaPlayer.h: |
| * platform/graphics/MediaPlayerPrivate.h: |
| (WebCore::MediaPlayerPrivateInterface::applicationWillResignActive): |
| (WebCore::MediaPlayerPrivateInterface::applicationDidBecomeActive): |
| |
| * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.h: |
| * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm: |
| (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::MediaPlayerPrivateMediaStreamAVFObjC): Switch |
| to release logging. |
| (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::~MediaPlayerPrivateMediaStreamAVFObjC): Ditto. |
| (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::enqueueCorrectedVideoSample): Split out of enqueueVideoSample. |
| (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::enqueueVideoSample): Move code that updates |
| the display later to enqueueCorrectedVideoSample. Rearrange logic to the image painter sample |
| buffer has the correct timestamp. |
| (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::layerErrorDidChange): Switch to release logging. |
| (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::layerStatusDidChange): Ditto. |
| (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::applicationDidBecomeActive): f the display |
| layer is in the "failed" state, flush the renderer and update the display mode. |
| (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::ensureLayers): Switch to release logging. |
| (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::load): Ditto. |
| (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::cancelLoad): Ditto. |
| (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::prepareToPlay): Ditto. |
| (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::updateDisplayMode): Ditto. |
| (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::play): Ditto. |
| (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::pause): Ditto. |
| (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::setVolume): Ditto. |
| (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::setMuted): Ditto. |
| (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::updateReadyState) Ditto.: |
| (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::logChannel const): Ditto. |
| (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::updateSampleTimes): Deleted. |
| |
| 2018-01-16 Michael Catanzaro <mcatanzaro@igalia.com> |
| |
| PAL should link to JavaScriptCore rather than WTF |
| https://bugs.webkit.org/show_bug.cgi?id=181683 |
| |
| Reviewed by Konstantin Tokarev. |
| |
| Do not link directly to JavaScriptCore. Get it via PAL. |
| |
| * CMakeLists.txt: |
| |
| 2018-01-16 Zach Li <zachli@apple.com> |
| |
| Add pop-up policy support in website policies. |
| https://bugs.webkit.org/show_bug.cgi?id=181544. |
| rdar://problem/30521400. |
| |
| Reviewed by Alex Christensen. |
| |
| * loader/DocumentLoader.h: |
| Introduce pop-up policy getter and setter. Initialize |
| the policy as Default. |
| (WebCore::DocumentLoader::popUpPolicy const): |
| (WebCore::DocumentLoader::setPopUpPolicy): |
| * page/DOMWindow.cpp: |
| (WebCore::DOMWindow::allowPopUp): |
| Pop-up policy specified on a per-page basis holds |
| precedence over the global policy. If no pop-up policy |
| is specified during navigation, global policy is used. |
| |
| 2018-01-16 Jer Noble <jer.noble@apple.com> |
| |
| Crash playing audio-only HLS stream via hls.js (MSE) |
| https://bugs.webkit.org/show_bug.cgi?id=181691 |
| <rdar://problem/32967295> |
| |
| Reviewed by Eric Carlson. |
| |
| Add a weak-link check to the block called by -[AVSampleBufferDisplayLayer requestMediaDataWhenReadyOnQueue:usingBlock:]. |
| |
| * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm: |
| (WebCore::SourceBufferPrivateAVFObjC::trackDidChangeEnabled): |
| (WebCore::SourceBufferPrivateAVFObjC::notifyClientWhenReadyForMoreSamples): |
| (WebCore::SourceBufferPrivateAVFObjC::setVideoLayer): |
| |
| 2018-01-16 Simon Fraser <simon.fraser@apple.com> |
| |
| Rename applyHorizontalScale/applyVerticalScale in SVG filters, and related cleanup |
| https://bugs.webkit.org/show_bug.cgi?id=181684 |
| |
| Reviewed by Alex Christensen. |
| |
| Rename the confusing applyHorizontalScale/applyVerticalScale to scaledByFilterResolution(), |
| and have it take and return a FloatSize. Change callers to do math in terms of FloatSizes. |
| |
| Add inflate(size) to each of the rect classes. |
| |
| * platform/graphics/FloatRect.h: |
| (WebCore::FloatRect::inflate): |
| * platform/graphics/IntRect.h: |
| (WebCore::IntRect::inflate): |
| * platform/graphics/LayoutRect.h: |
| (WebCore::LayoutRect::inflate): |
| * platform/graphics/filters/FEDisplacementMap.cpp: |
| (WebCore::FEDisplacementMap::platformApplySoftware): |
| * platform/graphics/filters/FEDropShadow.cpp: |
| (WebCore::FEDropShadow::determineAbsolutePaintRect): |
| (WebCore::FEDropShadow::platformApplySoftware): |
| * platform/graphics/filters/FEGaussianBlur.cpp: |
| (WebCore::FEGaussianBlur::calculateUnscaledKernelSize): |
| (WebCore::FEGaussianBlur::calculateKernelSize): |
| (WebCore::FEGaussianBlur::determineAbsolutePaintRect): |
| (WebCore::FEGaussianBlur::platformApplySoftware): |
| * platform/graphics/filters/FEGaussianBlur.h: |
| * platform/graphics/filters/FEMorphology.cpp: |
| (WebCore::FEMorphology::determineAbsolutePaintRect): |
| (WebCore::FEMorphology::platformApplySoftware): |
| * platform/graphics/filters/FEOffset.cpp: |
| (WebCore::FEOffset::determineAbsolutePaintRect): |
| (WebCore::FEOffset::platformApplySoftware): |
| * platform/graphics/filters/Filter.h: |
| (WebCore::Filter::setSourceImage): |
| (WebCore::Filter::scaledByFilterResolution const): |
| (WebCore::Filter::applyHorizontalScale const): Deleted. |
| (WebCore::Filter::applyVerticalScale const): Deleted. |
| * platform/graphics/filters/FilterOperations.cpp: |
| (WebCore::outsetSizeForBlur): |
| * rendering/FilterEffectRenderer.h: |
| * svg/graphics/filters/SVGFilter.cpp: |
| (WebCore::SVGFilter::scaledByFilterResolution const): |
| (WebCore::SVGFilter::applyHorizontalScale const): Deleted. |
| (WebCore::SVGFilter::applyVerticalScale const): Deleted. |
| * svg/graphics/filters/SVGFilter.h: |
| |
| 2018-01-16 Fujii Hironori <Hironori.Fujii@sony.com> |
| |
| [CMake][Mac] Fix the build errors |
| https://bugs.webkit.org/show_bug.cgi?id=181665 |
| |
| Reviewed by Alex Christensen. |
| |
| No new tests (No behavior change) |
| |
| * CMakeLists.txt: Added Modules/paymentrequest/MerchantValidationEvent.idl to compile. |
| * PlatformMac.cmake: Added Modules/paymentrequest/MerchantValidationEvent.cpp to compile. |
| Added workers/service/context and Modules/applicationmanifest as forwarding header paths. |
| |
| 2018-01-16 Wenson Hsieh <wenson_hsieh@apple.com> |
| |
| [Attachment Support] Provide the `src` of an attachment to the UI delegate when an attachment is inserted |
| https://bugs.webkit.org/show_bug.cgi?id=181638 |
| <rdar://problem/36508702> |
| |
| Reviewed by Dan Bernstein. |
| |
| Adjust the `didInsertAttachment` codepath to additionally propagate the attachment element's `src`. |
| Additionally, fix an issue with insertion and removal client notifications wherein the client can receive |
| insertion calls without corresponding removal calls, or vice versa. This is an existing issue, but matters more |
| now because we actually need to access the attachment element for its `src` when propagating changes to the |
| client. See below for details. |
| |
| Test: WKAttachmentTests.AttachmentUpdatesWhenInsertingRichMarkup |
| |
| * dom/Document.h: |
| (WebCore::Document::attachmentElementsByIdentifier const): |
| * editing/Editor.cpp: |
| (WebCore::Editor::notifyClientOfAttachmentUpdates): |
| * page/EditorClient.h: |
| (WebCore::EditorClient::didInsertAttachment): |
| * page/Frame.cpp: |
| (WebCore::Frame::setDocument): |
| |
| When a Frame's document changes, inform the client that the attachments in the previous document are going away. |
| For each attachment currently connected to the document, we have either (1) already informed the client that it |
| was inserted, or (2) the attachment is pending an insertion call to the client. If (1) is the case, then we'll |
| tell the client that the attachment is removed, which will balance out the earlier insertion call. If (2) is the |
| case, then we'll remove the previously inserted attachment identifier from the set of attachment identifiers |
| pending insertion, and the client won't be informed of insertions or removals. |
| |
| 2018-01-16 Antoine Quint <graouts@apple.com> |
| |
| Use traits for animation timing functions |
| https://bugs.webkit.org/show_bug.cgi?id=181651 |
| |
| Reviewed by Dean Jackson. |
| |
| Cleaning up Dean's previous patch as suggested by Darin's post-commit review comments. The |
| downcast function can match const automatically and it's a better style to put the * inside |
| the downcast call rather than outside. |
| |
| * css/CSSComputedStyleDeclaration.cpp: |
| (WebCore::createTimingFunctionValue): |
| * platform/animation/TimingFunction.cpp: |
| (WebCore::operator<<): |
| (WebCore::TimingFunction::transformTime const): |
| * platform/animation/TimingFunction.h: |
| * platform/graphics/ca/cocoa/PlatformCAAnimationCocoa.mm: |
| (WebCore::toCAMediaTimingFunction): |
| |
| 2018-01-16 Philippe Normand <pnormand@igalia.com> |
| |
| [GStreamer] Live streaming cleanups |
| https://bugs.webkit.org/show_bug.cgi?id=181672 |
| |
| Reviewed by Michael Catanzaro. |
| |
| * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp: |
| (WebCore::MediaPlayerPrivateGStreamer::handleMessage): Switch to |
| streaming code path when no content-length was reported by the |
| http source element. |
| (WebCore::MediaPlayerPrivateGStreamer::totalBytes const): Return early when streaming. |
| * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp: |
| (CachedResourceStreamingClient::responseReceived): Emit headers as |
| an element message, like souphttpsrc. |
| |
| 2018-01-15 Philippe Normand <pnormand@igalia.com> |
| |
| [GStreamer] misc fixes and cleanups |
| https://bugs.webkit.org/show_bug.cgi?id=181647 |
| |
| Reviewed by Michael Catanzaro. |
| |
| * platform/graphics/MediaPlayer.cpp: |
| (WebCore::convertEnumerationToString): New utility function to convert preload enum to string. |
| * platform/graphics/MediaPlayerEnums.h: Ditto. |
| * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp: |
| (WebCore::MediaPlayerPrivateGStreamer::load): Debug tweak |
| (WebCore::MediaPlayerPrivateGStreamer::prepareToPlay): Ditto |
| (WebCore::MediaPlayerPrivateGStreamer::play): Ditto |
| (WebCore::MediaPlayerPrivateGStreamer::paused const): Ditto |
| (WebCore::MediaPlayerPrivateGStreamer::processBufferingStats): Prevent useless state update. |
| (WebCore::MediaPlayerPrivateGStreamer::fillTimerFired): Ditto. |
| (WebCore::MediaPlayerPrivateGStreamer::updateStates): Debug tweak. |
| (WebCore::MediaPlayerPrivateGStreamer::setDownloadBuffering): Ditto. |
| * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h: |
| Remove useless handlesSyncMessage method. |
| * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp: |
| (WebCore::MediaPlayerPrivateGStreamerBase::setMuted): Prevent useless state update. |
| (WebCore::MediaPlayerPrivateGStreamerBase::muted const): Debug tweak. |
| (WebCore::MediaPlayerPrivateGStreamerBase::setStreamVolumeElement): Ditto. |
| * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp: |
| (webkit_web_src_init): Enable keepAlive by default like in souphttpsrc. |
| (webKitWebSrcStart): Debug tweak. |
| (webKitWebSrcQueryWithParent): Ditto. |
| (webKitWebSrcNeedData): Ditto. |
| (CachedResourceStreamingClient::responseReceived): Change appsrc |
| stream-type when we wan't seek. Also update caps like souphttpsrc |
| does. |
| * platform/graphics/gstreamer/WebKitWebSourceGStreamer.h: Add forward declaration of MediaPlayer. |
| * platform/graphics/gstreamer/mse/MediaSourceClientGStreamerMSE.cpp: |
| (WebCore::MediaSourceClientGStreamerMSE::append): Fix compilation warning. |
| |
| 2018-01-16 Yacine Bandou <yacine.bandou_ext@softathome.com> |
| |
| [WPE] Two clearkey tests failing since r226621 |
| https://bugs.webkit.org/show_bug.cgi?id=181532 |
| |
| Reviewed by Xabier Rodriguez-Calvar. |
| |
| Whith a fake initData, we can have a pssh size nul, thus we should check it. |
| We saw this issue in the subtest "initData longer than 64Kb characters" in |
| the clearkey-generate-request-disallowed-input layout test. |
| |
| * platform/encryptedmedia/clearkey/CDMClearKey.cpp: |
| (WebCore::extractKeyidsLocationFromCencInitData): |
| |
| 2018-01-15 Yoav Weiss <yoav@yoav.ws> |
| |
| Support for preconnect Link headers |
| https://bugs.webkit.org/show_bug.cgi?id=181657 |
| |
| Reviewed by Darin Adler. |
| |
| Move the preconnect functionality into its own function, and |
| also call this function when Link headers are processed. |
| |
| Test: http/tests/preconnect/link-header-rel-preconnect-http.php |
| |
| * loader/LinkLoader.cpp: |
| (WebCore::LinkLoader::loadLinksFromHeader): Call preconnect. |
| (WebCore::LinkLoader::preconnect): Preconnect to a host functionality moved here. |
| (WebCore::LinkLoader::preload): Renamed `preloadIfNeeded` to `preload`. |
| (WebCore::LinkLoader::loadLink): Call preconnect. |
| * loader/LinkLoader.h: |
| |
| 2018-01-15 Michael Catanzaro <mcatanzaro@igalia.com> |
| |
| Improve use of ExportMacros |
| https://bugs.webkit.org/show_bug.cgi?id=181652 |
| |
| Reviewed by Konstantin Tokarev. |
| |
| Remove a comment. |
| |
| * platform/PlatformExportMacros.h: |
| |
| 2018-01-15 Konstantin Tokarev <annulen@yandex.ru> |
| |
| image-rendering should affect scaling of border-image |
| https://bugs.webkit.org/show_bug.cgi?id=169440 |
| |
| Reviewed by Michael Catanzaro. |
| |
| Test: fast/borders/border-image-pixelated.html |
| |
| * rendering/style/NinePieceImage.cpp: |
| (WebCore::NinePieceImage::paint): |
| |
| 2018-01-15 Tomas Popela <tpopela@redhat.com> |
| |
| 2.19.3 ACCELERATED_2D_CANVAS support is broken |
| https://bugs.webkit.org/show_bug.cgi?id=180799 |
| |
| Reviewed by Michael Catanzaro. |
| |
| * html/canvas/CanvasRenderingContext2DBase.cpp: |
| (WebCore::CanvasRenderingContext2DBase::didDraw): |
| |
| 2018-01-15 Basuke Suzuki <Basuke.Suzuki@sony.com> |
| |
| [Curl] Enable HTTP/2 |
| https://bugs.webkit.org/show_bug.cgi?id=181551 |
| |
| Reviewed by Michael Catanzaro. |
| |
| Start supporting HTTP/2 protocol. The first step is just enabling the HTTP/2 on Curl backend. |
| Next step will be to enable multiplexing feature. |
| |
| No new tests because we don't have HTTP/2 test backend yet. |
| |
| * platform/network/curl/CurlContext.cpp: |
| (WebCore::CurlContext::isHttp2Enabled const): |
| (WebCore::CurlHandle::enableHttp): |
| (WebCore::CurlHandle::enableHttpGetRequest): |
| (WebCore::CurlHandle::enableHttpHeadRequest): |
| (WebCore::CurlHandle::enableHttpPostRequest): |
| (WebCore::CurlHandle::enableHttpPutRequest): |
| (WebCore::CurlHandle::setHttpCustomRequest): |
| * platform/network/curl/CurlContext.h: |
| |
| 2018-01-15 Dean Jackson <dino@apple.com> |
| |
| Use a helper function for checked arithmetic in WebGL validation |
| https://bugs.webkit.org/show_bug.cgi?id=181620 |
| <rdar://problem/36485879> |
| |
| Reviewed by Eric Carlson. |
| |
| Eric recommended using a templated helper function to do |
| a common arithmetic check in WebGL validation. |
| |
| * html/canvas/WebGL2RenderingContext.cpp: |
| (WebCore::WebGL2RenderingContext::validateIndexArrayConservative): |
| * html/canvas/WebGLRenderingContext.cpp: |
| (WebCore::WebGLRenderingContext::validateIndexArrayConservative): |
| * html/canvas/WebGLRenderingContextBase.cpp: |
| (WebCore::WebGLRenderingContextBase::validateIndexArrayPrecise): |
| (WebCore::WebGLRenderingContextBase::validateDrawArrays): |
| (WebCore::WebGLRenderingContextBase::validateSimulatedVertexAttrib0): |
| (WebCore::WebGLRenderingContextBase::simulateVertexAttrib0): |
| * html/canvas/WebGLRenderingContextBase.h: |
| (WebCore::WebGLRenderingContextBase::checkedAddAndMultiply): New helper. |
| |
| 2018-01-15 Dean Jackson <dino@apple.com> |
| |
| Use traits for animation timing functions |
| https://bugs.webkit.org/show_bug.cgi?id=181651 |
| <rdar://problem/36525328> |
| |
| Reviewed by Antoine Quint. |
| |
| Use the type traits for TimingFunction classes, so |
| we can is<> and downcast<>. |
| |
| * css/CSSComputedStyleDeclaration.cpp: |
| (WebCore::createTimingFunctionValue): |
| * platform/animation/TimingFunction.cpp: |
| (WebCore::TimingFunction::transformTime const): |
| * platform/animation/TimingFunction.h: |
| * platform/graphics/ca/GraphicsLayerCA.cpp: |
| (WebCore::animationHasStepsTimingFunction): |
| (WebCore::animationHasFramesTimingFunction): |
| * platform/graphics/ca/cocoa/PlatformCAAnimationCocoa.mm: |
| (WebCore::toCAMediaTimingFunction): |
| |
| 2018-01-15 Youenn Fablet <youenn@apple.com> |
| |
| RealtimeMediaSource should be ThreadSafeRefCounted |
| https://bugs.webkit.org/show_bug.cgi?id=181649 |
| |
| Reviewed by Eric Carlson. |
| |
| Difficult to write a test as this is really racy. |
| RealtimeIncomingVideoSourceCocoa::OnFrame is taking a reference on a background thread |
| to send a task to the main thread. |
| This requires it to be thread safe ref counted. |
| |
| * platform/mediastream/RealtimeMediaSource.h: |
| |
| 2018-01-15 Philippe Normand <pnormand@igalia.com> |
| |
| Prevent useless MediaPlayer mute state notifications |
| https://bugs.webkit.org/show_bug.cgi?id=181646 |
| |
| Reviewed by Carlos Garcia Campos. |
| |
| On GTK port the mute change notification was triggering the test |
| runner to think the whole page mute state had changed and that |
| media elements were muted. The simplest solution is to propagate |
| the notification only if the state actually changed. |
| |
| * platform/graphics/MediaPlayer.cpp: |
| (WebCore::MediaPlayer::muteChanged): Propagate mute notification |
| only if the mute state actually changed. |
| |
| 2018-01-15 Sebastian Dröge <sebastian@centricular.com> |
| |
| [GStreamer] Don't wait for draw condition variable when shutting down. |
| https://bugs.webkit.org/show_bug.cgi?id=180978 |
| |
| Reviewed by Carlos Garcia Campos. |
| |
| * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp: |
| (WebCore::MediaPlayerPrivateGStreamerBase::triggerRepaint): |
| (WebCore::MediaPlayerPrivateGStreamerBase::cancelRepaint): |
| * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h: |
| By also waiting for the draw condition variable while shutting down, |
| it is possible that the GStreamer video sink is waiting for the main |
| thread to actually render the current frame, while at the same time |
| the main thread is waiting for the GStreamer video sink to shut down, |
| resulting in a deadlock. |
| |
| 2018-01-13 Minsheng Liu <lambda@liu.ms> |
| |
| MathML Lengths should take zoom level into account |
| https://bugs.webkit.org/show_bug.cgi?id=180029 |
| |
| Reviewed by Frédéric Wang. |
| |
| The patch applies the effective zoom factor to physical units in toUserUnits(). |
| |
| Test: mathml/presentation/mspace-units-with-zoom.html |
| |
| * rendering/mathml/RenderMathMLBlock.cpp: |
| (WebCore::toUserUnits): |
| |
| 2018-01-12 Chris Dumez <cdumez@apple.com> |
| |
| ASSERTION FAILED: registration || isTerminating() in WebCore::SWServerWorker::skipWaiting() |
| https://bugs.webkit.org/show_bug.cgi?id=181603 |
| <rdar://problem/36476050> |
| |
| Reviewed by Youenn Fablet. |
| |
| No new tests, covered by existing tests that crash flakily. |
| |
| * workers/service/server/SWServer.cpp: |
| (WebCore::SWServer::terminateWorkerInternal): |
| If the connection to the context process is gone, make sure we make the worker as terminated |
| so that it does not stay in Running state and in SWServer::m_runningOrTerminatingWorkers. |
| |
| * workers/service/server/SWServerRegistration.cpp: |
| (WebCore::SWServerRegistration::~SWServerRegistration): |
| Add assertions to make sure none of the registration's workers are still running when |
| the registration is destroyed. |
| |
| (WebCore::SWServerRegistration::updateRegistrationState): |
| Make sure registration workers that are overwritten are not still running. |
| |
| * workers/service/server/SWServerWorker.cpp: |
| (WebCore::SWServerWorker::setState): |
| If a worker's state is set to redundant, make sure we also terminate it. |
| |
| 2018-01-12 Commit Queue <commit-queue@webkit.org> |
| |
| Unreviewed, rolling out r226927. |
| https://bugs.webkit.org/show_bug.cgi?id=181621 |
| |
| Breaks 32-bit and iOS release for some reason that i don't |
| understand yet (Requested by dino on #webkit). |
| |
| Reverted changeset: |
| |
| "Use a helper function for checked arithmetic in WebGL |
| validation" |
| https://bugs.webkit.org/show_bug.cgi?id=181620 |
| https://trac.webkit.org/changeset/226927 |
| |
| 2018-01-12 Myles C. Maxfield <mmaxfield@apple.com> |
| |
| Data URL fonts split in the middle of an alphabet cause random letters to disappear |
| https://bugs.webkit.org/show_bug.cgi?id=175845 |
| <rdar://problem/33996578> |
| |
| Reviewed by Brent Fulgham. |
| |
| It is fairly common practice for a font foundry to split a font up into two files such that a semi-random |
| half of the alphabet is present in one of the files, and the other half is present in the other file. This |
| practice involves representing the files as data URLs, so as to minimize the time it takes to load them. |
| |
| Because resource loading is asynchronous (even for data URLs), it is possible today to get a paint after |
| the first file is loaded but before the second file is loaded. Indeed, because of the way font fallback |
| works, we will never start loading the second file until a layout has occurred with the first font. |
| |
| Because a site usually only uses this pattern for a handful of fonts, and I've never seen this pattern |
| being used for CJK fonts, it isn't very expensive to opportunistically decode these data URLs eagerly. |
| Using this method doesn't actually guarantee that the two fonts will load in between successive paints, |
| but it at least makes this much more likely. This patch implements this strategy, along with a size |
| threshold to make sure that we won't decode any super large data URLs when it isn't necessary. |
| |
| Test: fast/text/font-load-data-partitioned-alphabet.html |
| |
| * css/CSSFontFace.cpp: |
| (WebCore::CSSFontFace::opportunisticallyStartFontDataURLLoading): |
| * css/CSSFontFace.h: |
| * css/CSSFontFaceSource.cpp: |
| (WebCore::CSSFontFaceSource::opportunisticallyStartFontDataURLLoading): |
| * css/CSSFontFaceSource.h: |
| * css/CSSFontSelector.cpp: |
| (WebCore::CSSFontSelector::opportunisticallyStartFontDataURLLoading): |
| * css/CSSFontSelector.h: |
| * platform/graphics/FontCascadeFonts.cpp: |
| (WebCore::opportunisticallyStartFontDataURLLoading): |
| (WebCore::FontCascadeFonts::glyphDataForVariant): |
| * platform/graphics/FontSelector.h: |
| |
| 2018-01-12 Alex Christensen <achristensen@webkit.org> |
| |
| History state should be updated during client redirects with asynchronous policy decisions |
| https://bugs.webkit.org/show_bug.cgi?id=181358 |
| <rdar://problem/35547689> |
| |
| Reviewed by Andy Estes. |
| |
| When decidePolicyForNavigationAction is responded to asynchronously during a client redirect, |
| HistoryController::updateForRedirectWithLockedBackForwardList does not update the history because |
| the document loader has not been marked as a client redirect because the FrameLoader only looks |
| at its provisional document loader to mark it as a client redirect. When decidePolicyForNavigationAction |
| is responded to asynchronously, though, the FrameLoader's provisional document loader has moved to |
| its policy document loader. To get both asynchronous and synchronous cases, let's just mark the document |
| loader as a client redirect whether it's the provisional or policy document loader. |
| |
| Covered by a new API test. |
| |
| * loader/FrameLoader.cpp: |
| (WebCore::FrameLoader::loadURL): |
| (WebCore::FrameLoader::loadPostRequest): |
| |
| 2018-01-12 Dean Jackson <dino@apple.com> |
| |
| Use a helper function for checked arithmetic in WebGL validation |
| https://bugs.webkit.org/show_bug.cgi?id=181620 |
| <rdar://problem/36485879> |
| |
| Reviewed by Eric Carlson. |
| |
| Eric recommended using a templated helper function to do |
| a common arithmetic check in WebGL validation. |
| |
| * html/canvas/WebGL2RenderingContext.cpp: |
| (WebCore::WebGL2RenderingContext::validateIndexArrayConservative): |
| * html/canvas/WebGLRenderingContext.cpp: |
| (WebCore::WebGLRenderingContext::validateIndexArrayConservative): |
| * html/canvas/WebGLRenderingContextBase.cpp: |
| (WebCore::WebGLRenderingContextBase::checkedAddAndMultiply): New helper. |
| (WebCore::WebGLRenderingContextBase::validateIndexArrayPrecise): |
| (WebCore::WebGLRenderingContextBase::validateDrawArrays): |
| (WebCore::WebGLRenderingContextBase::validateSimulatedVertexAttrib0): |
| (WebCore::WebGLRenderingContextBase::simulateVertexAttrib0): |
| * html/canvas/WebGLRenderingContextBase.h: |
| |
| 2018-01-12 Myles C. Maxfield <mmaxfield@apple.com> |
| |
| [Cocoa] CTFontCopyDefaultCascadeListForLanguages() can return nullptr |
| https://bugs.webkit.org/show_bug.cgi?id=181615 |
| <rdar://problem/36334637> |
| |
| Reviewed by Jon Lee. |
| |
| Speculative fix. We are getting crash reports saying that this call can return nullptr, and we |
| don't check for it. |
| |
| No new tests because I couldn't find the specific input that causes it to return nullptr. (I |
| tried running this code with every 0, 1, and 2 length locale string, every weight value, and |
| every italic value, and couldn't get it to crash. I also inspected the code to figure out what |
| values would cause it to return nullptr, and I couldn't find anything other than if the system |
| has a totally busted font setup.) |
| |
| * platform/graphics/cocoa/FontDescriptionCocoa.cpp: |
| (WebCore::SystemFontDatabase::computeCascadeList): |
| |
| 2018-01-11 Dean Jackson <dino@apple.com> |
| |
| [WebGL] Simulated vertexAttrib0 can sometimes cause OUT_OF_MEMORY errors |
| https://bugs.webkit.org/show_bug.cgi?id=181558 |
| <rdar://problem/36189833> |
| |
| Reviewed by Eric Carlson. |
| |
| Very large element indices in the ELEMENT_ARRAY_BUFFER meant that |
| our simulated vertexAttrib0 buffer might be too large. We need |
| to check for out-of-memory, but we can also detect some of the issues |
| earlier in our validation code. Additionally, make sure that we don't |
| accidentally cast an unsigned to a signed. |
| |
| Test: fast/canvas/webgl/simulated-vertexAttrib0-invalid-indicies.html |
| |
| * html/canvas/WebGL2RenderingContext.cpp: |
| (WebCore::WebGL2RenderingContext::validateIndexArrayConservative): Update validation |
| code to look for overflow, rather than relying on looking for sign changes. |
| * html/canvas/WebGLRenderingContext.cpp: |
| (WebCore::WebGLRenderingContext::validateIndexArrayConservative): Ditto. |
| * html/canvas/WebGLRenderingContextBase.cpp: |
| (WebCore::WebGLRenderingContextBase::validateIndexArrayPrecise): |
| (WebCore::WebGLRenderingContextBase::drawArrays): Check that we were able to simulate. |
| (WebCore::WebGLRenderingContextBase::drawElements): |
| (WebCore::WebGLRenderingContextBase::validateSimulatedVertexAttrib0): Update validation code, and |
| use GC3Duint, since that's what the indicies are. |
| (WebCore::WebGLRenderingContextBase::simulateVertexAttrib0): Ditto. |
| (WebCore::WebGLRenderingContextBase::drawArraysInstanced): Check that we were able to simulate. |
| (WebCore::WebGLRenderingContextBase::drawElementsInstanced): |
| * html/canvas/WebGLRenderingContextBase.h: |
| |
| 2018-01-12 Wenson Hsieh <wenson_hsieh@apple.com> |
| |
| Large in-place attachment elements cause the document width to expand when inserted |
| https://bugs.webkit.org/show_bug.cgi?id=181614 |
| |
| Reviewed by Dan Bernstein. |
| |
| Make in-place images and videos have a max-width of 100%, so that large attachments aren't inserted with full |
| display size, causing the document and viewport width to expand. |
| |
| * html/HTMLAttachmentElement.cpp: |
| (WebCore::HTMLAttachmentElement::populateShadowRootIfNecessary): |
| |
| 2018-01-12 Keith Rollin <krollin@apple.com> |
| |
| Logged JSON should escape "'s and \'s in strings. |
| https://bugs.webkit.org/show_bug.cgi?id=181608 |
| |
| Reviewed by Brent Fulgham. |
| |
| No new tests -- no new functionality, just changed logging. The |
| efficacy of the logging was verified by inspecting its output. |
| |
| * loader/ResourceLoadObserver.cpp: |
| (WebCore::ResourceLoadObserver::logUserInteractionWithReducedTimeResolution): |
| |
| 2018-01-12 Dean Jackson <dino@apple.com> |
| |
| drawElements should be invalid if vertexAttrib0 doesn't have data |
| https://bugs.webkit.org/show_bug.cgi?id=181609 |
| <rdar://problem/36392883> |
| |
| Reviewed by Antoine Quint. |
| |
| If a vertex attribute has been enabled, but no data provided, then |
| draw validation should fail. |
| |
| Test: fast/canvas/webgl/drawElements-empty-vertex-data.html |
| |
| * html/canvas/WebGLRenderingContextBase.cpp: |
| (WebCore::WebGLRenderingContextBase::validateVertexAttributes): If there were |
| never any data in the vertex buffer, then we incorrectly compared with 0. |
| |
| 2018-01-12 Youenn Fablet <youenn@apple.com> |
| |
| FormDataElement::lengthInBytes should use ThreadableBlobRegistry |
| https://bugs.webkit.org/show_bug.cgi?id=181554 |
| |
| Reviewed by Chris Dumez. |
| |
| Covered by updated test. |
| |
| Fix blobRegistry() use and add support for creating a response that may trigger the issue. |
| |
| |
| * platform/network/FormData.cpp: |
| (WebCore::FormDataElement::lengthInBytes const): Was using directly blobRegistry() while ThreadableBlobRegistry is more appropriate |
| in case this is called from workers. |
| * Modules/fetch/FetchBody.h: |
| * Modules/fetch/FetchResponse.h: |
| * fileapi/Blob.h: |
| * testing/ServiceWorkerInternals.cpp: |
| (WebCore::ServiceWorkerInternals::createOpaqueWithBlobBodyResponse): |
| * testing/ServiceWorkerInternals.h: |
| * testing/ServiceWorkerInternals.idl: |
| |
| 2018-01-12 Jer Noble <jer.noble@apple.com> |
| |
| Wrap CDMFairPlayStreaming and related classes in ENABLE(ENCRYPTED_MEDIA) checks |
| https://bugs.webkit.org/show_bug.cgi?id=181602 |
| |
| Reviewed by Maciej Stachowiak. |
| |
| * platform/graphics/avfoundation/CDMFairPlayStreaming.h: |
| * platform/graphics/avfoundation/objc/CDMInstanceFairPlayStreamingAVFObjC.h: |
| * platform/graphics/avfoundation/objc/CDMInstanceFairPlayStreamingAVFObjC.mm: |
| |
| 2018-01-12 Youenn Fablet <youenn@apple.com> |
| |
| WebProcess should pass the registration identifier and not the worker identifier for fetch events |
| https://bugs.webkit.org/show_bug.cgi?id=181591 |
| |
| Reviewed by Chris Dumez. |
| |
| Test: http/wpt/service-workers/update-service-worker.https.html |
| |
| Store service worker registration identifier in ResourceLoaderOptions instead of service worker identifier. |
| |
| * loader/DocumentThreadableLoader.cpp: |
| (WebCore::DocumentThreadableLoader::DocumentThreadableLoader): |
| (WebCore::DocumentThreadableLoader::makeCrossOriginAccessRequest): |
| * loader/ResourceLoaderOptions.h: |
| * loader/WorkerThreadableLoader.cpp: |
| (WebCore::WorkerThreadableLoader::MainThreadBridge::MainThreadBridge): |
| * loader/cache/CachedResourceLoader.cpp: |
| (WebCore::CachedResourceLoader::prepareFetch): |
| (WebCore::CachedResourceLoader::determineRevalidationPolicy const): |
| * loader/cache/CachedResourceRequest.cpp: |
| (WebCore::CachedResourceRequest::setSelectedServiceWorkerRegistrationIdentifierIfNeeded): |
| (WebCore::CachedResourceRequest::setNavigationServiceWorkerRegistrationData): |
| (WebCore::CachedResourceRequest::setSelectedServiceWorkerIdentifierIfNeeded): Deleted. |
| * loader/cache/CachedResourceRequest.h: |
| * workers/WorkerScriptLoader.cpp: |
| (WebCore::WorkerScriptLoader::loadSynchronously): |
| (WebCore::WorkerScriptLoader::loadAsynchronously): |
| * workers/service/server/SWServer.cpp: |
| (WebCore::SWServer::activeWorkerFromRegistrationID): |
| * workers/service/server/SWServer.h: |
| |
| 2018-01-12 Fujii Hironori <Hironori.Fujii@sony.com> |
| |
| [Win][CMake] Remove all-in-one file for WebCore DerivedSources |
| https://bugs.webkit.org/show_bug.cgi?id=181582 |
| |
| Reviewed by Alex Christensen. |
| |
| Those source files are compiled in unified source build nowadays. |
| |
| No new tests (No behavior change) |
| |
| * CMakeLists.txt: Removed calling PROCESS_ALLINONE_FILE. |
| * DerivedSources.cpp: Removed. |
| * WebCoreMacros.cmake: Removed a macro PROCESS_ALLINONE_FILE. |
| |
| 2018-01-12 Fujii Hironori <Hironori.Fujii@sony.com> |
| |
| [WinCairo][CMake] Use ${CURL_LIBRARY} instead of specifying the library name libcurl_imp explicitly |
| https://bugs.webkit.org/show_bug.cgi?id=181578 |
| |
| Reviewed by Alex Christensen. |
| |
| vcpkg has libcurl.lib, not libcurl_imp.lib. |
| |
| No new tests because no behavior change. |
| |
| * PlatformWinCairo.cmake: Link ${CURL_LIBRARY} instead of libcurl_imp. |
| |
| 2018-01-12 Jer Noble <jer.noble@apple.com> |
| |
| WebGL video texture black in Safari 11.0.2 and wrong colored in Safari Preview 11.1 |
| https://bugs.webkit.org/show_bug.cgi?id=181445 |
| <rdar://problem/36383183> |
| |
| Reviewed by Dean Jackson. |
| |
| Tests: added compile-time correctness tests for YCbCrMatrix values. |
| |
| Perform the derivation from YCbCr coefficients into matrices in constexpr expressions |
| at compile-time. This allows us to also perform compile-time correctness checks to catch |
| regressions which may cause incorrect color conversions. |
| |
| Since we now have general-purpose derivation of matrix values from coefficients, |
| adding missing specificed matrices is trivial, so add support for SMPTE 240M and BT.2020 |
| matrices. |
| |
| * platform/graphics/cv/VideoTextureCopierCV.cpp: |
| (WebCore::GLfloatColor::GLfloatColor): |
| (WebCore::GLfloatColor::abs): |
| (WebCore::GLfloatColor::isApproximatelyEqualTo const): |
| (WebCore::YCbCrMatrix::operator Vector<GLfloat> const): |
| (WebCore::YCbCrMatrix::YCbCrMatrix): |
| (WebCore::YCbCrMatrix::operator* const): |
| (WebCore::YCbCrToRGBMatrixForRangeAndTransferFunction): |
| |
| 2018-01-12 Antoine Quint <graouts@apple.com> |
| |
| Add support for the frames() timing function |
| https://bugs.webkit.org/show_bug.cgi?id=181585 |
| <rdar://problem/36463317> |
| |
| Reviewed by Dean. |
| |
| Implement the frames() timing function as specified in the CSS Timing Functions Level 1 |
| specification, specifically https://www.w3.org/TR/css-timing-1/#frames-timing-functions. |
| A frames timing function is a type of timing function that divides the input time into a |
| specified number of intervals of equal length. |
| |
| Test: transitions/frames-timing-function.html |
| |
| * css/CSSComputedStyleDeclaration.cpp: |
| (WebCore::createTimingFunctionValue): |
| * css/CSSTimingFunctionValue.cpp: |
| (WebCore::CSSFramesTimingFunctionValue::customCSSText const): |
| (WebCore::CSSFramesTimingFunctionValue::equals const): |
| * css/CSSTimingFunctionValue.h: |
| * css/CSSToStyleMap.cpp: |
| (WebCore::CSSToStyleMap::mapAnimationTimingFunction): |
| * css/CSSValue.cpp: |
| (WebCore::CSSValue::equals const): |
| (WebCore::CSSValue::cssText const): |
| (WebCore::CSSValue::destroy): |
| * css/CSSValue.h: |
| (WebCore::CSSValue::isFramesTimingFunctionValue const): |
| * css/CSSValueKeywords.in: |
| * css/parser/CSSPropertyParser.cpp: |
| (WebCore::consumeSteps): |
| (WebCore::consumeFrames): |
| (WebCore::consumeAnimationTimingFunction): |
| * platform/animation/TimingFunction.cpp: |
| (WebCore::operator<<): |
| (WebCore::TimingFunction::transformTime const): |
| * platform/animation/TimingFunction.h: |
| (WebCore::TimingFunction::isFramesTimingFunction const): |
| * platform/graphics/ca/GraphicsLayerCA.cpp: |
| (WebCore::animationHasFramesTimingFunction): |
| (WebCore::GraphicsLayerCA::animationCanBeAccelerated const): |
| |
| 2018-01-12 Commit Queue <commit-queue@webkit.org> |
| |
| Unreviewed, rolling out r226721. |
| https://bugs.webkit.org/show_bug.cgi?id=181583 |
| |
| Lets do a slightly different fix (Requested by anttik on |
| #webkit). |
| |
| Reverted changeset: |
| |
| "REGRESSION(r225650): The scores of MotionMark tests Multiply |
| and Leaves dropped by 8%" |
| https://bugs.webkit.org/show_bug.cgi?id=181460 |
| https://trac.webkit.org/changeset/226721 |
| |
| 2018-01-11 Keith Miller <keith_miller@apple.com> |
| |
| Rename ENABLE_ASYNC_ITERATION to ENABLE_JS_ASYNC_ITERATION |
| https://bugs.webkit.org/show_bug.cgi?id=181573 |
| |
| Reviewed by Simon Fraser. |
| |
| * Configurations/FeatureDefines.xcconfig: |
| |
| 2018-01-11 Jiewen Tan <jiewen_tan@apple.com> |
| |
| [WebAuthN] Import a CBOR coder from Chromium |
| https://bugs.webkit.org/show_bug.cgi?id=181522 |
| <rdar://problem/36055729> |
| |
| Reviewed by Brent Fulgham. |
| |
| This patch imports a CBOR coder including encoder and decoder from Chromium. CBOR encoder |
| is needed for WebAuthN to encode attestation object into binaries. When supporting extensions |
| in the future, CBOR encoder/decoder will be needed as well. Implementating and maintaining |
| a fully-fledged CBOR coder doesn't seem to align with WebKit's best interests. Therefore, |
| importing a most suitable third party implementation will be wise. |
| |
| In this patch, it fully integrate the whole coder into our codebase. Those changes includes: |
| 1. Substitute data structures that enjoy a better WTF version. |
| 2. Replacing marcos. |
| 3. Implementating workarounds for some functionalities that we lack fundamental types' support. |
| 4. Changing the coding style to match ours. |
| |
| This patch doesn't intend to improve the logic of the original codebase. Hence some of the |
| coding logic might not match what WebKit ususally has. |
| |
| Here is a full list of Chromium changes that constructed this CBOR coder in chronological order: |
| 6efcf495521d18d060027762f48bb292d6979136, |
| 9eb43fd347890b4c6cf54c4bd7ec1bbb88e381e1, |
| 31c85e74fd567772f18e0a41be468d04af721f21, |
| 68672fdcad280a8ff69b91927d38d0eabf2c87f2, |
| 0ca8667c0584fb21c0748ebd7468d32889759a07, |
| df763d790d7e45d70116bdefacbfd4f9faa8995e, |
| 6d30c4a621c65314db63eb56e87c19ab75627b26, |
| 50fe92953f4739f17a62303fedbf8db9234317c8, |
| 47be22c3603424d1832d046a348ff3f982500288, |
| 98a59e46948b2c71608926004fac8192b0ff2208, |
| 07540c6d850ed6e0fa508d63c20a8ce96d751de6, |
| 06ae32d640c8e4b86ea8914a80ee419ea16e56d8. |
| |
| Covered by API tests. |
| |
| * Modules/webauthn/cbor/CBORBinary.h: Added. |
| * Modules/webauthn/cbor/CBORReader.cpp: Added. |
| (cbor::CBORReader::CBORReader): |
| (cbor::CBORReader::~CBORReader): |
| (cbor::CBORReader::read): |
| (cbor::CBORReader::decodeCBOR): |
| (cbor::CBORReader::readVariadicLengthInteger): |
| (cbor::CBORReader::decodeValueToNegative): |
| (cbor::CBORReader::decodeValueToUnsigned): |
| (cbor::CBORReader::readSimpleValue): |
| (cbor::CBORReader::readString): |
| Workarounds applied. |
| (cbor::CBORReader::readBytes): |
| (cbor::CBORReader::readCBORArray): |
| (cbor::CBORReader::readCBORMap): |
| (cbor::CBORReader::canConsume): |
| (cbor::CBORReader::checkMinimalEncoding): |
| (cbor::CBORReader::checkExtraneousData): |
| (cbor::CBORReader::checkDuplicateKey): |
| (cbor::CBORReader::hasValidUTF8Format): |
| Workarounds applied. |
| (cbor::CBORReader::checkOutOfOrderKey): |
| (cbor::CBORReader::getErrorCode): |
| (cbor::CBORReader::errorCodeToString): |
| * Modules/webauthn/cbor/CBORReader.h: Added. |
| * Modules/webauthn/cbor/CBORValue.cpp: Added. |
| (cbor::CBORValue::CBORValue): |
| (cbor::CBORValue::operator=): |
| (cbor::CBORValue::~CBORValue): |
| (cbor::CBORValue::clone const): |
| (cbor::CBORValue::getInteger const): |
| (cbor::CBORValue::getUnsigned const): |
| (cbor::CBORValue::getNegative const): |
| (cbor::CBORValue::getString const): |
| (cbor::CBORValue::getByteString const): |
| (cbor::CBORValue::getArray const): |
| (cbor::CBORValue::getMap const): |
| (cbor::CBORValue::getSimpleValue const): |
| (cbor::CBORValue::internalMoveConstructFrom): |
| (cbor::CBORValue::internalCleanup): |
| * Modules/webauthn/cbor/CBORValue.h: Added. |
| * Modules/webauthn/cbor/CBORWriter.cpp: Added. |
| (cbor::CBORWriter::~CBORWriter): |
| (cbor::CBORWriter::write): |
| (cbor::CBORWriter::CBORWriter): |
| (cbor::CBORWriter::encodeCBOR): |
| Workarounds applied. |
| (cbor::CBORWriter::startItem): |
| (cbor::CBORWriter::setAdditionalInformation): |
| (cbor::CBORWriter::setUint): |
| (cbor::CBORWriter::getNumUintBytes): |
| * Modules/webauthn/cbor/CBORWriter.h: Added. |
| * Sources.txt: |
| * WebCore.xcodeproj/project.pbxproj: |
| |
| 2018-01-11 Chris Dumez <cdumez@apple.com> |
| |
| Setting Window.opener to null should disown its opener |
| https://bugs.webkit.org/show_bug.cgi?id=181505 |
| <rdar://problem/36443151> |
| |
| Reviewed by Ryosuke Niwa. |
| |
| Setting Window.opener to null should disown its opener as per: |
| - https://html.spec.whatwg.org/#dom-opener |
| |
| With this change, tabs opened by clicking link inside Gmail no |
| longer have the Gmail window as opener. |
| |
| Tests: fast/dom/Window/window-opener-set-to-null.html |
| fast/dom/Window/window-opener-shadowing.html |
| |
| * bindings/js/JSDOMWindowCustom.cpp: |
| (WebCore::JSDOMWindow::setOpener): |
| * page/DOMWindow.cpp: |
| (WebCore::DOMWindow::disownOpener): |
| * page/DOMWindow.h: |
| * page/DOMWindow.idl: |
| |
| 2018-01-11 Myles C. Maxfield <mmaxfield@apple.com> |
| |
| [Cocoa] Star character disappears when bolded |
| https://bugs.webkit.org/show_bug.cgi?id=181568 |
| <rdar://problem/18755569> |
| |
| Reviewed by Simon Fraser. |
| |
| We had some code in ComplexTextController to ask the FontCache for a font, given the name |
| of a particular font CoreText used inside a CTRun. This is wrong for two reasons: fonts |
| are not identifiable by PostScript name (in the general case), and because the lookup |
| procedure requires a FontDescription, the result may yield a font that is not the one |
| looked up. The goal of this code was simply to preserve the rendering mode of the font, |
| but we removed support for these rendering modes years ago. So the solution is to skip |
| that lookup and use the CoreText font directly. |
| |
| Test: fast/text/unknown-font.html |
| |
| * platform/graphics/mac/ComplexTextControllerCoreText.mm: |
| (WebCore::ComplexTextController::collectComplexTextRunsForCharacters): |
| |
| 2018-01-11 Keith Rollin <krollin@apple.com> |
| |
| Add optional logging of ITP-related user interaction information |
| https://bugs.webkit.org/show_bug.cgi?id=181556 |
| |
| Reviewed by Brent Fulgham. |
| |
| In order to support the tracking of the efficacy of Intelligent |
| Tracking Protection, add some logging indicating when the user |
| interacts with a page in a way that affects cookie partitioning. This |
| logging is off by default, and is enabled with `defaults write -g |
| WebKitLogCookieInformation -bool true`. |
| |
| No new tests -- no changed functionality. |
| |
| * loader/ResourceLoadObserver.cpp: |
| (WebCore::ResourceLoadObserver::logUserInteractionWithReducedTimeResolution): |
| * loader/ResourceLoadObserver.h: |
| (WebCore::ResourceLoadObserver::shouldLogUserInteraction const): |
| (WebCore::ResourceLoadObserver::setShouldLogUserInteraction): |
| |
| 2018-01-11 James Craig <jcraig@apple.com> |
| |
| AX: when invert colors is on, double-invert video elements in UserAgentStyleSheet |
| https://bugs.webkit.org/show_bug.cgi?id=168447 |
| <rdar://problem/30559874> |
| |
| Reviewed by Simon Fraser. |
| |
| Double-invert video when platform "invert colors" setting is enabled. Behavior matches |
| current "Smart Invert" feature of Safari Reader on macOS/iOS and other iOS native apps. |
| |
| Tests: accessibility/smart-invert-reference.html |
| accessibility/smart-invert.html |
| |
| * Modules/modern-media-controls/controls/media-controls.css: |
| (@media (inverted-colors)): |
| (:host): |
| (picture): |
| * css/html.css: |
| (@media (inverted-colors)): |
| (video): |
| |
| 2018-01-11 Wenson Hsieh <wenson_hsieh@apple.com> |
| |
| Don't load inline data when requesting info for an attachment element backed by a file path |
| https://bugs.webkit.org/show_bug.cgi?id=181550 |
| |
| Reviewed by Tim Horton. |
| |
| When requesting data for an attachment element that is backed by a file path, we currently trigger a load in the |
| web process to fetch contents of the attachment data as inline data in the AttachmentInfo. This is unnecessary, |
| since the file path of the attachment element must have come from the UI process anyways, so it is sufficient to |
| simply send the file path to the UI process and have the UI process read the contents of the path as a memory- |
| mapped NSData. |
| |
| This patch lets HTMLAttachmentElement skip over resource loading codepaths when creating an AttachmentInfo for |
| the client, and also teaches _WKAttachment to read a AttachmentInfo's filepath as memory-mapped data if a file |
| path is present, and no inline data was specified. |
| |
| Covered by existing API tests. |
| |
| * html/HTMLAttachmentElement.cpp: |
| (WebCore::HTMLAttachmentElement::requestInfo): |
| |
| 2018-01-10 Ryosuke Niwa <rniwa@webkit.org> |
| |
| Make elements of zero width or height focusable |
| https://bugs.webkit.org/show_bug.cgi?id=181516 |
| |
| Reviewed by Chris Dumez. |
| |
| Don't check render box's size or bounding rect when deciding whether an element is focusable. |
| New behavior matches that of Firefox and Chrome. |
| |
| Test: fast/events/focus-zero-size-element.html |
| |
| * dom/Element.cpp: |
| (WebCore::Element::isFocusable): Only update the style. |
| * html/HTMLFormControlElement.cpp: |
| (WebCore::HTMLFormControlElement::isFocusable const): Deleted. |
| * html/HTMLFormControlElement.h: |
| * mathml/MathMLElement.cpp: |
| (WebCore::MathMLElement::isFocusable const): Deleted. As far as I can tell, no math ml element is focusable. |
| * mathml/MathMLElement.h: |
| * svg/SVGAElement.cpp: |
| (WebCore::SVGAElement::isFocusable const): Deleted. |
| * svg/SVGAElement.h: |
| |
| 2018-01-11 Filip Pizlo <fpizlo@apple.com> |
| |
| Rename MarkedAllocator to BlockDirectory and AllocatorAttributes to CellAttributes |
| https://bugs.webkit.org/show_bug.cgi?id=181543 |
| |
| Rubber stamped by Michael Saboff. |
| |
| No new tests because I'm just renaming things. |
| |
| * ForwardingHeaders/heap/BlockDirectoryInlines.h: Copied from Source/WebCore/ForwardingHeaders/heap/MarkedAllocatorInlines.h. |
| * ForwardingHeaders/heap/MarkedAllocatorInlines.h: Removed. |
| * bindings/js/DOMGCOutputConstraint.cpp: |
| |
| 2018-01-11 Alex Christensen <achristensen@webkit.org> |
| |
| REGRESSION(r225003): Loading hangs in environments where dispatch_async does not work |
| https://bugs.webkit.org/show_bug.cgi?id=181553 |
| <rdar://problem/35733938> |
| |
| Reviewed by Eric Carlson. |
| |
| There is an environment where dispatch_async does not work, but performSelectorOnMainThread works. |
| r225003 broke loading in this environment. This fixes it and updates the test that r225003 fixed. |
| It failed sometimes because loading was happening in a different order than html parsing, so I made |
| the test not depend on html parsing timing by updating media/video-src-remove.html. |
| |
| * platform/network/mac/WebCoreResourceHandleAsOperationQueueDelegate.mm: |
| (-[WebCoreResourceHandleAsOperationQueueDelegate callFunctionOnMainThread:]): |
| |
| 2018-01-11 Dean Jackson <dino@apple.com> |
| |
| Rolling out 226814. It crashes on some bots. |
| |
| 2018-01-11 Dean Jackson <dino@apple.com> |
| |
| [WebGL] Simulated vertexAttrib0 can sometimes cause OUT_OF_MEMORY errors |
| https://bugs.webkit.org/show_bug.cgi?id=181558 |
| <rdar://problem/36189833> |
| |
| Reviewed by Eric Carlson. |
| |
| Very large element indices in the ELEMENT_ARRAY_BUFFER meant that |
| our simulated vertexAttrib0 buffer might be too large. We need |
| to check for out-of-memory, but we can also detect some of the issues |
| earlier in our validation code. Additionally, make sure that we don't |
| accidentally cast an unsigned to a signed. |
| |
| Test: fast/canvas/webgl/simulated-vertexAttrib0-invalid-indicies.html |
| |
| * html/canvas/WebGL2RenderingContext.cpp: |
| (WebCore::WebGL2RenderingContext::validateIndexArrayConservative): Update validation |
| code to look for overflow, rather than relying on looking for sign changes. |
| * html/canvas/WebGLRenderingContext.cpp: |
| (WebCore::WebGLRenderingContext::validateIndexArrayConservative): Ditto. |
| * html/canvas/WebGLRenderingContextBase.cpp: |
| (WebCore::WebGLRenderingContextBase::validateIndexArrayPrecise): |
| (WebCore::WebGLRenderingContextBase::drawArrays): Check that we were able to simulate. |
| (WebCore::WebGLRenderingContextBase::drawElements): |
| (WebCore::WebGLRenderingContextBase::validateSimulatedVertexAttrib0): Update validation code, and |
| use GC3Duint, since that's what the indicies are. |
| (WebCore::WebGLRenderingContextBase::simulateVertexAttrib0): Ditto. |
| (WebCore::WebGLRenderingContextBase::drawArraysInstanced): Check that we were able to simulate. |
| (WebCore::WebGLRenderingContextBase::drawElementsInstanced): |
| * html/canvas/WebGLRenderingContextBase.h: |
| |
| 2018-01-11 Chris Dumez <cdumez@apple.com> |
| |
| ASSERTION FAILED: registration in WebCore::SWServerWorker::skipWaiting() |
| https://bugs.webkit.org/show_bug.cgi?id=181222 |
| <rdar://problem/36332686> |
| |
| Reviewed by Youenn Fablet. |
| |
| Replace assertion in SWServerWorker::skipWaiting() that assumes the worker |
| has a registration. Nowadays, a SWServerWorker can stay alive for a short |
| period without having a registration, while it is terminating. |
| |
| No new tests, unskipped existing test. |
| |
| * workers/service/server/SWServerWorker.cpp: |
| (WebCore::SWServerWorker::skipWaiting): |
| |
| 2018-01-11 Antti Koivisto <antti@apple.com> |
| |
| Don't call RenderElement::setStyle when nothing changes |
| https://bugs.webkit.org/show_bug.cgi?id=181530 |
| |
| Reviewed by Zalan Bujtas. |
| |
| * style/StyleChange.h: |
| |
| Remove 'Force' value. This essentially meant 'compute style for all descendants and call setStyle unconditionally'. |
| Using this value lost information about whether anything actually changed in a particular style as it was automatically |
| inherited by all descendants. The 'compute all descendants' part of the behavior is what is actually needed. |
| |
| Instead add separate DescendantsToResolve enum for communicating what else to compute. |
| |
| * style/StyleTreeResolver.cpp: |
| (WebCore::Style::TreeResolver::Parent::Parent): |
| (WebCore::Style::computeDescendantsToResolve): |
| |
| Figure out which descendants will need resolving based on how the current elements style changed. |
| |
| (WebCore::Style::TreeResolver::resolveElement): |
| (WebCore::Style::TreeResolver::createAnimatedElementUpdate): |
| (WebCore::Style::TreeResolver::pushParent): |
| (WebCore::Style::shouldResolveElement): |
| |
| Use DescendantsToResolve as input. |
| |
| (WebCore::Style::TreeResolver::resolveComposedTree): |
| * style/StyleTreeResolver.h: |
| * style/StyleUpdate.h: |
| (WebCore::Style::ElementUpdates::ElementUpdates): |
| |
| Add DescendantsToResolve. |
| |
| 2018-01-11 Wenson Hsieh <wenson_hsieh@apple.com> |
| |
| Send PromisedBlobInfo to the client through DragItem instead of DragClient::prepareToDragPromisedBlob |
| https://bugs.webkit.org/show_bug.cgi?id=181497 |
| |
| Reviewed by Tim Horton. |
| |
| Refactor drag initiation with DOMFile-backed attachment elements. See WebKit ChangeLog for more information. No |
| change in behavior; promised blob dragging covered by WKAttachment API tests. |
| |
| * loader/EmptyClients.cpp: |
| * page/DragClient.h: |
| (WebCore::DragClient::prepareToDragPromisedBlob): Deleted. |
| * page/DragController.cpp: |
| (WebCore::DragController::startDrag): |
| (WebCore::DragController::doImageDrag): |
| (WebCore::DragController::doSystemDrag): |
| (WebCore::DragController::promisedBlobInfo): |
| (WebCore::DragController::dragAttachmentElement): Deleted. |
| * page/DragController.h: |
| * platform/DragItem.h: |
| (WebCore::DragItem::encode const): |
| (WebCore::DragItem::decode): |
| |
| 2018-01-11 Youenn Fablet <youenn@apple.com> |
| |
| RTCController should disable ICE candidate filtering in case of getUserMedia based on the RTCPerrConnection origin |
| https://bugs.webkit.org/show_bug.cgi?id=180851 |
| |
| Reviewed by Eric Carlson. |
| |
| Test: http/wpt/webrtc/third-party-frame-ice-candidate-filtering.html |
| |
| RTCController now stores all the client origins (top+frame origins) of frames that got access to camera/microphone access. |
| For any such client origin, PeerConnection objects ICE candidate filtering is disabled. |
| ICE candidate filtering is reset whenever navigating/reloading the page. |
| |
| * Modules/mediastream/RTCController.cpp: |
| (WebCore::RTCController::reset): |
| (WebCore::matchDocumentOrigin): |
| (WebCore::RTCController::shouldDisableICECandidateFiltering): |
| (WebCore::RTCController::add): |
| (WebCore::RTCController::disableICECandidateFilteringForAllOrigins): |
| (WebCore::RTCController::disableICECandidateFiltering): |
| (WebCore::RTCController::enableICECandidateFiltering): |
| * Modules/mediastream/RTCController.h: |
| * Modules/mediastream/RTCPeerConnection.cpp: |
| (WebCore::RTCPeerConnection::create): |
| * Modules/mediastream/UserMediaRequest.cpp: |
| (WebCore::UserMediaRequest::allow): |
| * page/Page.cpp: |
| (WebCore::Page::disableICECandidateFiltering): |
| * testing/Internals.cpp: |
| (WebCore::Internals::setICECandidateFiltering): |
| |
| 2018-01-11 Ali Juma <ajuma@chromium.org> |
| |
| window.visualViewport should behave as [SameObject] |
| https://bugs.webkit.org/show_bug.cgi?id=181548 |
| |
| Reviewed by Chris Dumez. |
| |
| Add 'GenerateIsReachable' to VisualViewport so that window.visualViewport's |
| JS wrapper object doesn't get garbage collected too soon. |
| |
| Test: fast/visual-viewport/visual-viewport-same-object.html |
| |
| * page/VisualViewport.idl: |
| |
| 2018-01-11 Basuke Suzuki <Basuke.Suzuki@sony.com> |
| |
| [Curl] Extract multipart handling from ResourceHandle to CurlRequest. |
| https://bugs.webkit.org/show_bug.cgi?id=181506 |
| |
| Reviewed by Alex Christensen. |
| |
| Rename old MultipartHandle class to CurlMultipartHandle and modernize it. Also move the responsibility |
| of handling multi part from ResourceHandle to CurlRequest. This is required for upcoming NetworkLoadTask. |
| |
| No new tests because no new behavior. |
| |
| * platform/Curl.cmake: |
| * platform/network/curl/CurlMultipartHandle.cpp: Renamed from Source/WebCore/platform/network/curl/MultipartHandle.cpp. |
| (WebCore::CurlMultipartHandle::createIfNeeded): |
| (WebCore::CurlMultipartHandle::extractBoundary): |
| (WebCore::CurlMultipartHandle::extractBoundaryFromContentType): |
| (WebCore::CurlMultipartHandle::CurlMultipartHandle): |
| (WebCore::CurlMultipartHandle::didReceiveData): |
| (WebCore::CurlMultipartHandle::didComplete): |
| (WebCore::CurlMultipartHandle::processContent): |
| (WebCore::CurlMultipartHandle::checkForBoundary): |
| (WebCore::CurlMultipartHandle::matchedLength): |
| (WebCore::CurlMultipartHandle::parseHeadersIfPossible): |
| * platform/network/curl/CurlMultipartHandle.h: Renamed from Source/WebCore/platform/network/curl/MultipartHandle.h. |
| (WebCore::CurlMultipartHandle::~CurlMultipartHandle): |
| * platform/network/curl/CurlMultipartHandleClient.h: Added. |
| (WebCore::CurlMultipartHandleClient::~CurlMultipartHandleClient): |
| * platform/network/curl/CurlRequest.cpp: |
| (WebCore::CurlRequest::CurlRequest): |
| (WebCore::CurlRequest::didReceiveHeader): |
| (WebCore::CurlRequest::didReceiveData): |
| (WebCore::CurlRequest::didReceiveHeaderFromMultipart): |
| (WebCore::CurlRequest::didReceiveDataFromMultipart): |
| (WebCore::CurlRequest::didCompleteTransfer): |
| (WebCore::CurlRequest::finalizeTransfer): |
| (WebCore::CurlRequest::invokeDidReceiveResponseForFile): |
| (WebCore::CurlRequest::invokeDidReceiveResponse): |
| (WebCore::CurlRequest::completeDidReceiveResponse): |
| * platform/network/curl/CurlRequest.h: |
| (WebCore::CurlRequest::create): |
| * platform/network/curl/ResourceHandleCurlDelegate.cpp: |
| (WebCore::ResourceHandleCurlDelegate::createCurlRequest): |
| (WebCore::ResourceHandleCurlDelegate::curlDidReceiveResponse): |
| (WebCore::ResourceHandleCurlDelegate::curlDidReceiveBuffer): |
| (WebCore::ResourceHandleCurlDelegate::curlDidComplete): |
| * platform/network/curl/ResourceHandleCurlDelegate.h: |
| |
| 2018-01-11 Zalan Bujtas <zalan@apple.com> |
| |
| RenderTreeUpdater::current() returns null_ptr when mutation is done through Document::resolveStyle. |
| https://bugs.webkit.org/show_bug.cgi?id=181513 |
| <rdar://problem/36367085> |
| |
| Reviewed by Antti Koivisto. |
| |
| This patch ensures that we use a valid RenderTreeBuilder even when |
| Document::resolveStyle (incorrectly) triggers tree mutation. |
| It can be reverted soon after the incorrect mutations are taken care of. |
| |
| Test: fast/forms/button-set-text-crash.html |
| |
| * rendering/RenderButton.cpp: |
| (WebCore::RenderButton::setText): |
| * rendering/RenderMenuList.cpp: |
| (RenderMenuList::setText): |
| |
| 2018-01-11 Antoine Quint <graouts@apple.com> |
| |
| Only listen to webkitplaybacktargetavailabilitychanged when media controls are visible to the user |
| https://bugs.webkit.org/show_bug.cgi?id=181547 |
| <rdar://problem/35947650> |
| |
| Reviewed by Eric Carlson. |
| |
| Because listening to "webkitplaybacktargetavailabilitychanged" events incurs some higher power usage on iOS, |
| we only listen to such events when controls are visible to the user. In other words, the MediaControls need to |
| have both "visible" set to "true" and "faded" set to "false". To support this, we add a delegate method on |
| MediaControls such that it can tell the MediaController that the "visible" property changed. With this message, |
| MediaController can inform its MediaControllerSupport objects that user visibility of the controls changed, which |
| lets AirplaySupport disable itself when controls are no longer visible. |
| |
| Test: media/modern-media-controls/airplay-support/airplay-support-disable-event-listeners-with-hidden-controls.html |
| |
| * Modules/modern-media-controls/controls/media-controls.js: |
| (MediaControls.prototype.set visible): |
| * Modules/modern-media-controls/media/airplay-support.js: |
| (AirplaySupport.prototype.controlsUserVisibilityDidChange): |
| * Modules/modern-media-controls/media/media-controller-support.js: |
| (MediaControllerSupport.prototype.controlsUserVisibilityDidChange): |
| * Modules/modern-media-controls/media/media-controller.js: |
| (MediaController.prototype.mediaControlsVisibilityDidChange): |
| (MediaController.prototype.mediaControlsFadedStateDidChange): |
| (MediaController.prototype._controlsUserVisibilityDidChange): |
| |
| 2018-01-11 Antoine Quint <graouts@apple.com> |
| |
| [iOS] There should be no controls markup generated in fullscreen |
| https://bugs.webkit.org/show_bug.cgi?id=181540 |
| <rdar://problem/35060379> |
| |
| Reviewed by Eric Carlson. |
| |
| We completely forgo the display of any content when fullscreen on iOS by setting the |
| "visible" flag to "false" on the MediaControls, which will prevent any DOM content from |
| being added. |
| |
| * Modules/modern-media-controls/media/media-controller.js: |
| (MediaController.prototype.handleEvent): |
| (MediaController.prototype._updateiOSFullscreenProperties): |
| (MediaController): |
| (MediaController.prototype._updateSupportingObjectsEnabledState): Deleted. |
| |
| 2018-01-11 Alex Christensen <achristensen@webkit.org> |
| |
| Revert changes accidentally committed with r226789. |
| https://bugs.webkit.org/show_bug.cgi?id=181423 |
| |
| I had some local changes I did not mean to commit. |
| |
| * platform/network/mac/WebCoreResourceHandleAsOperationQueueDelegate.mm: |
| (scheduledWithCustomRunLoopMode): |
| (-[WebCoreResourceHandleAsOperationQueueDelegate callFunctionOnMainThread:]): |
| (WebCore::if): Deleted. |
| (WebCore::>::fromCallable): Deleted. |
| |
| 2018-01-10 Simon Fraser <simon.fraser@apple.com> |
| |
| On macOS, getBoundingClientRect gives incorrect values when pinch-zoomed |
| https://bugs.webkit.org/show_bug.cgi?id=181511 |
| rdar://problem/33741427 |
| |
| Reviewed by Zalan Bujtas. |
| |
| When reverting "client coordinates are relative to layout viewport" in r219829 |
| I broke documentToClientOffset() on macOS by failing to take pinch zoom scale into |
| account (frameScaleFactor() is always 1 on iOs, so this bug doesn't manifest there). |
| |
| Covered by existing tests. |
| |
| * page/FrameView.cpp: |
| (WebCore::FrameView::documentToClientOffset const): |
| |
| 2018-01-11 Youenn Fablet <youenn@apple.com> |
| |
| Replace WebRTCLegacyAPIDisabled by WebRTCLegacyAPIEnabled and switch off WebRTC legacy flag by default |
| https://bugs.webkit.org/show_bug.cgi?id=181480 |
| |
| Reviewed by Eric Carlson. |
| |
| No change of behavior. |
| |
| * page/RuntimeEnabledFeatures.h: Set default value to false. |
| |
| 2018-01-11 Wenson Hsieh <wenson_hsieh@apple.com> |
| |
| [Attachment Support] Support moving attachment elements in editable areas using drag and drop |
| https://bugs.webkit.org/show_bug.cgi?id=181337 |
| <rdar://problem/36324813> |
| |
| Reviewed by Tim Horton. |
| |
| Makes slight adjustments to attachment-specific drag and drop logic to ensure that moving attachments via drag |
| and drop behaves correctly. See per-change comments for more detail. |
| |
| Tests: WKAttachmentTests.DragInPlaceVideoAttachmentElement |
| WKAttachmentTests.MoveAttachmentElementAsIconByDragging |
| WKAttachmentTests.MoveInPlaceAttachmentElementByDragging |
| |
| * editing/cocoa/EditorCocoa.mm: |
| (WebCore::Editor::getPasteboardTypesAndDataForAttachment): |
| |
| Stop vending the private web archive pasteboard type for attachments, for now. This works around issues where an |
| attachment element that is dragged and dropped within the same page may lose its blob backing data if we try to |
| remove and insert it as a fragment from the archive. Providing a web archive would allow us to avoid destroying |
| and recreating an attachment element when dragging within the same page, but this is a nice-to-have optimization |
| we can re-enable after investigation in a subsequent patch. |
| |
| * html/HTMLAttachmentElement.cpp: |
| (WebCore::HTMLAttachmentElement::populateShadowRootIfNecessary): |
| |
| Add `draggable=false` to the image element of an in-place attachment element. |
| |
| * page/DragController.cpp: |
| (WebCore::enclosingAttachmentElement): |
| (WebCore::DragController::draggableElement const): |
| |
| Tweak single-selected-attachment handling to account for in-place attachments. Since the hit-tested node is |
| inside the shadow subtree of the attachment element, the condition needs to check for the startElement as well |
| as the startElement's shadow host. |
| |
| (WebCore::DragController::startDrag): |
| |
| Make two tweaks here. First, don't require a RenderAttachment to drag an attachment element (this is required |
| for dragging in-place attachments). This was added in r217083 to address <rdar://problem/32282831>, but is no |
| longer correct, since attachments may now be displayed in-place. |
| |
| Secondly, only restore the previous selection if the attachment is in a richly contenteditable area. This was |
| added to prevent the selection highlight from appearing in when dragging non-editable attachment elements in the |
| Mail viewer. However, to allow drag moves to occur, we need the selection to persist after drag start. |
| |
| 2018-01-04 Filip Pizlo <fpizlo@apple.com> |
| |
| CodeBlocks should be in IsoSubspaces |
| https://bugs.webkit.org/show_bug.cgi?id=180884 |
| |
| Reviewed by Saam Barati. |
| |
| No new tests because no new behavior. |
| |
| Adopting new parallel constraint API, so that more of the logic of doing parallel |
| constraint solving is shared between the DOM's output constraints and JSC's output |
| constraints. |
| |
| * bindings/js/DOMGCOutputConstraint.cpp: |
| (WebCore::DOMGCOutputConstraint::executeImpl): |
| (WebCore::DOMGCOutputConstraint::doParallelWorkImpl): Deleted. |
| (WebCore::DOMGCOutputConstraint::finishParallelWorkImpl): Deleted. |
| * bindings/js/DOMGCOutputConstraint.h: |
| |
| 2018-01-11 Wenson Hsieh <wenson_hsieh@apple.com> |
| |
| [Attachment Support] Support dragging attachment elements out as files on iOS |
| https://bugs.webkit.org/show_bug.cgi?id=181199 |
| <rdar://problem/36299316> |
| |
| Reviewed by Tim Horton, Andy Estes and Joseph Pecoraro. |
| |
| Adds support for dragging "files" (i.e. creating item providers with preferred attachment presentation styles) |
| from attachment elements on iOS for Mail. See below for more detail. |
| |
| Tests: WKAttachmentTestsIOS.DragAttachmentInsertedAsData |
| WKAttachmentTestsIOS.DragAttachmentInsertedAsFile |
| |
| * page/DragController.cpp: |
| (WebCore::DragController::platformContentTypeForBlobType const): |
| (WebCore::DragController::dragAttachmentElement): |
| * page/DragController.h: |
| * page/mac/DragControllerMac.mm: |
| (WebCore::DragController::platformContentTypeForBlobType const): |
| |
| Add a private method to convert the type of a promised blob to a platform type. For Cocoa platforms, this |
| converts the blob type (either a UTI or a MIME type) to a UTI for the platform to consume. |
| |
| * platform/ios/WebItemProviderPasteboard.h: |
| * platform/ios/WebItemProviderPasteboard.mm: |
| |
| Refactor WebItemProviderRegistrationInfo. WebItemProviderRegistrationInfo currently encapsulates a single item |
| provider registration call, and contains either a type identifier and data buffer, or an NSItemProviderWriting- |
| conformant object. To register an item provider using a WebItemProviderRegistrationInfo, the item provider |
| pasteboard currently checks to see whether the info contains an object or a type and data. |
| |
| This patch removes WebItemProviderRegistrationInfo and replaces it with WebItemProviderDataRegistrar. Objects |
| that implement this protocol know how to take an NSItemProvider and register data to it. So far, there are |
| three implementations below. |
| |
| (-[WebItemProviderDataRegistrar initWithData:type:]): |
| (-[WebItemProviderDataRegistrar typeIdentifier]): |
| (-[WebItemProviderDataRegistrar data]): |
| (-[WebItemProviderDataRegistrar typeIdentifierForClient]): |
| (-[WebItemProviderDataRegistrar dataForClient]): |
| (-[WebItemProviderDataRegistrar registerItemProvider:]): |
| (-[WebItemProviderDataRegistrar description]): |
| |
| A data registrar takes a UTI and data buffer, and registers the UTI to the data. This replaces a |
| WebItemProviderRegistrationInfo with both a type and data, but no representing object. |
| |
| (-[WebItemProviderWritableObjectRegistrar initWithObject:]): |
| (-[WebItemProviderWritableObjectRegistrar representingObjectForClient]): |
| (-[WebItemProviderWritableObjectRegistrar registerItemProvider:]): |
| (-[WebItemProviderWritableObjectRegistrar description]): |
| |
| The writable object registrar writes an NSItemProviderWriting-conformant object to an item provider. This |
| replaces a WebItemProviderRegistrationInfo with only a representing object. |
| |
| (-[WebItemProviderPromisedFileRegistrar initWithType:callback:]): |
| (-[WebItemProviderPromisedFileRegistrar registerItemProvider:]): |
| (-[WebItemProviderPromisedFileRegistrar description]): |
| (-[WebItemProviderRegistrationInfoList addData:forType:]): |
| (-[WebItemProviderRegistrationInfoList addRepresentingObject:]): |
| (-[WebItemProviderRegistrationInfoList addPromisedType:fileCallback:]): |
| |
| Helper methods to add new registrars to a registration info list. |
| |
| (-[WebItemProviderRegistrationInfoList itemAtIndex:]): |
| (-[WebItemProviderRegistrationInfoList enumerateItems:]): |
| (-[WebItemProviderRegistrationInfoList itemProvider]): |
| (-[WebItemProviderRegistrationInfoList description]): |
| (-[WebItemProviderRegistrationInfo initWithRepresentingObject:typeIdentifier:data:]): Deleted. |
| (-[WebItemProviderRegistrationInfo representingObject]): Deleted. |
| (-[WebItemProviderRegistrationInfo typeIdentifier]): Deleted. |
| |
| 2018-01-11 Michael Saboff <msaboff@apple.com> |
| |
| Add a DOM gadget for Spectre testing |
| https://bugs.webkit.org/show_bug.cgi?id=181351 |
| |
| Reviewed by Ryosuke Niwa. |
| |
| This change is used to test Spectre mitigations. |
| |
| Added a new DOM class to test for Spectre issues in the DOM layer. |
| This additional functionality is disabled by default and must be enabled |
| through the JSC option "enableSpectreGadgets". |
| |
| * CMakeLists.txt: |
| * DerivedSources.make: |
| * Sources.txt: |
| * WebCore.xcodeproj/project.pbxproj: |
| * bindings/js/WebCoreBuiltinNames.h: |
| * dom/SpectreGadget.cpp: Added. |
| (WebCore::SpectreGadget::SpectreGadget): |
| (WebCore::SpectreGadget::create): |
| (WebCore::SpectreGadget::setReadLength): |
| (WebCore::SpectreGadget::charCodeAt): |
| (WebCore::SpectreGadget::clflushReadLength): |
| * dom/SpectreGadget.h: Added. |
| * dom/SpectreGadget.idl: Added. |
| * page/RuntimeEnabledFeatures.cpp: |
| (WebCore::RuntimeEnabledFeatures::spectreGadgetsEnabled const): |
| * page/RuntimeEnabledFeatures.h: |
| |
| 2018-01-11 Philippe Normand <pnormand@igalia.com> |
| |
| [GTK] media/muted-video-is-playing-audio.html is timing out |
| https://bugs.webkit.org/show_bug.cgi?id=163781 |
| |
| Reviewed by Carlos Garcia Campos. |
| |
| * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp: |
| (WebCore::MediaPlayerPrivateGStreamer::notifyPlayerOfVideo): Sprinkle some debugging. |
| (WebCore::MediaPlayerPrivateGStreamer::notifyPlayerOfAudio): Ditto. |
| * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp: |
| (WebCore::MediaPlayerPrivateGStreamerBase::setMuted): Ditto. |
| |
| 2018-01-10 Andy Estes <aestes@apple.com> |
| |
| [Payment Request] Rename ApplePayMerchantValidationEvent to MerchantValidationEvent |
| https://bugs.webkit.org/show_bug.cgi?id=181437 |
| <rdar://problem/36376481> |
| |
| Reviewed by Tim Horton. |
| |
| Renamed ApplePayMerchantValidationEvent to MerchantValidationEvent and changed complete() to accept a Promise. |
| |
| Test: http/tests/paymentrequest/payment-request-merchant-validation.https.html |
| |
| * DerivedSources.make: |
| * Modules/applepay/paymentrequest/ApplePayPaymentHandler.cpp: |
| (WebCore::ApplePayPaymentHandler::merchantValidationCompleted): |
| (WebCore::ApplePayPaymentHandler::validateMerchant): |
| * Modules/applepay/paymentrequest/ApplePayPaymentHandler.h: |
| * Modules/paymentrequest/MerchantValidationEvent.cpp: Renamed from Source/WebCore/Modules/applepay/paymentrequest/ApplePayMerchantValidationEvent.cpp. |
| (WebCore::MerchantValidationEvent::create): |
| (WebCore::MerchantValidationEvent::MerchantValidationEvent): |
| (WebCore::MerchantValidationEvent::eventInterface const): |
| (WebCore::MerchantValidationEvent::complete): |
| * Modules/paymentrequest/MerchantValidationEvent.h: Renamed from Source/WebCore/Modules/applepay/paymentrequest/ApplePayMerchantValidationEvent.h. |
| * Modules/paymentrequest/MerchantValidationEvent.idl: Renamed from Source/WebCore/Modules/applepay/paymentrequest/ApplePayMerchantValidationEvent.idl. |
| * Modules/paymentrequest/PaymentHandler.h: |
| * Modules/paymentrequest/PaymentRequest.cpp: |
| (WebCore::PaymentRequest::completeMerchantValidation): |
| * Modules/paymentrequest/PaymentRequest.h: |
| * Modules/paymentrequest/PaymentRequest.idl: |
| * WebCore.xcodeproj/project.pbxproj: |
| * dom/EventNames.h: |
| * dom/EventNames.in: |
| |
| 2018-01-10 Basuke Suzuki <Basuke.Suzuki@sony.com> |
| |
| [Curl] Cross-protocol, cross-site scripting (XPXSS) using HTML forms |
| Nhttps://bugs.webkit.org/show_bug.cgi?id=153088 |
| |
| Reviewed by Alex Christensen. |
| |
| No new tests because it's covered by existing tests. |
| |
| * platform/network/curl/CurlContext.cpp: |
| (WebCore::CurlHandle::getHttpVersion): |
| * platform/network/curl/CurlContext.h: |
| * platform/network/curl/CurlRequest.cpp: |
| (WebCore::CurlRequest::didReceiveHeader): |
| * platform/network/curl/CurlResponse.h: |
| (WebCore::CurlResponse::isolatedCopy const): |
| * platform/network/curl/ResourceResponseCurl.cpp: |
| (WebCore::ResourceResponse::ResourceResponse): |
| (WebCore::ResourceResponse::setStatusLine): |
| |
| 2018-01-10 Wenson Hsieh <wenson_hsieh@apple.com> |
| |
| REGRESSION(r222507): Composition highlight doesn't render when using IME |
| https://bugs.webkit.org/show_bug.cgi?id=181485 |
| <rdar://problem/35896516> |
| |
| Reviewed by Ryosuke Niwa. |
| |
| Fixes the order of arguments passed to paintTextSubrangeBackground from paintCompositionBackground. |
| |
| Test: editing/marked-text-appearance.html |
| |
| * rendering/InlineTextBox.cpp: |
| (WebCore::InlineTextBox::paintCompositionBackground): |
| |
| 2018-01-10 Youenn Fablet <youenn@apple.com> |
| |
| Use no-cache fetch mode when loading main documents with location.reload() |
| https://bugs.webkit.org/show_bug.cgi?id=181285 |
| |
| Reviewed by Alex Christensen. |
| |
| Covered by rebased tests. |
| |
| Start to translate cache policy used for navigation as FetchOptions::Cache. |
| This allows ensuring service workers receive the right cache mode when intercepting navigation loads. |
| To not change current navigation behavior, ReturnCacheDataElseLoad and ReturnCacheDataDontLoad still trigger default fetch cache mode. |
| |
| For Reload and ReloadExpiredOnly frame load types, using no-cache mode is more efficient than reload mode, |
| as a conditional request will be sent if possible. This applies to location.reload which is consistent with other browsers. |
| Keep reload mode for ReloadFromOrigin. |
| |
| * loader/DocumentLoader.cpp: |
| (WebCore::toFetchOptionsCache): |
| (WebCore::DocumentLoader::loadMainResource): |
| * loader/FrameLoader.cpp: |
| (WebCore::FrameLoader::loadFrameRequest): |
| (WebCore::FrameLoader::loadURL): |
| (WebCore::FrameLoader::load): |
| (WebCore::FrameLoader::reload): |
| (WebCore::FrameLoader::defaultRequestCachingPolicy): |
| (WebCore::FrameLoader::loadDifferentDocumentItem): |
| * loader/NavigationScheduler.cpp: |
| |
| 2018-01-10 Commit Queue <commit-queue@webkit.org> |
| |
| Unreviewed, rolling out r226667 and r226673. |
| https://bugs.webkit.org/show_bug.cgi?id=181488 |
| |
| This caused a flaky crash. (Requested by mlewis13 on #webkit). |
| |
| Reverted changesets: |
| |
| "CodeBlocks should be in IsoSubspaces" |
| https://bugs.webkit.org/show_bug.cgi?id=180884 |
| https://trac.webkit.org/changeset/226667 |
| |
| "REGRESSION (r226667): CodeBlocks should be in IsoSubspaces" |
| https://bugs.webkit.org/show_bug.cgi?id=180884 |
| https://trac.webkit.org/changeset/226673 |
| |
| 2018-01-10 Antti Koivisto <antti@apple.com> |
| |
| REGRESSION(r225650): The scores of MotionMark tests Multiply and Leaves dropped by 8% |
| https://bugs.webkit.org/show_bug.cgi?id=181460 |
| <rdar://problem/36379776> |
| |
| Reviewed by Ryosuke Niwa. |
| |
| * css/parser/CSSParser.cpp: |
| (WebCore::CSSParserContext::CSSParserContext): |
| |
| Don't do the expensive security origin test if the sheet base URL and document URL are identical. |
| This is true for inline style and inline stylesheets. |
| |
| 2018-01-10 Antti Koivisto <antti@apple.com> |
| |
| Try to fix windows build. |
| |
| * css/RuleFeature.cpp: |
| (WebCore::RuleFeatureSet::computeNextMatchElement): |
| |
| 2018-01-10 Zalan Bujtas <zalan@apple.com> |
| |
| [RenderTreeBuilder] Move RenderRuby's moveChildren logic to RenderTreeBuilder |
| https://bugs.webkit.org/show_bug.cgi?id=181470 |
| <rdar://problem/36397683> |
| |
| Reviewed by Antti Koivisto. |
| |
| This is about moving code, no cleanup and/or normalization (unfortunately it also means |
| some temporary changes). |
| |
| No change in functionality. |
| |
| * rendering/RenderBlockFlow.h: |
| * rendering/RenderRubyBase.cpp: |
| (WebCore::RenderRubyBase::moveChildren): Deleted. |
| (WebCore::RenderRubyBase::mergeChildrenWithBase): Deleted. |
| (WebCore::RenderRubyBase::moveInlineChildren): Deleted. |
| (WebCore::RenderRubyBase::moveBlockChildren): Deleted. |
| * rendering/RenderRubyBase.h: |
| * rendering/RenderRubyRun.cpp: |
| (WebCore::RenderRubyRun::takeChild): |
| * rendering/updating/RenderTreeBuilder.cpp: |
| (WebCore::RenderTreeBuilder::moveRubyChildren): |
| * rendering/updating/RenderTreeBuilder.h: |
| * rendering/updating/RenderTreeBuilderRuby.cpp: |
| (WebCore::RenderTreeBuilder::Ruby::moveInlineChildren): |
| (WebCore::RenderTreeBuilder::Ruby::moveBlockChildren): |
| (WebCore::RenderTreeBuilder::Ruby::moveChildren): |
| (WebCore::RenderTreeBuilder::Ruby::moveChildrenInternal): |
| (WebCore::RenderTreeBuilder::Ruby::insertChild): |
| * rendering/updating/RenderTreeBuilderRuby.h: |
| |
| 2018-01-10 Philippe Normand <pnormand@igalia.com> |
| |
| [GStreamer] fix critical GObject warning |
| |
| Rubber-stamped by Carlos Garcia Campos. |
| |
| * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp: |
| (WebCore::MediaPlayerPrivateGStreamer::handleMessage): No need to |
| resort to complicated things to get the element name... |
| |
| 2018-01-10 Philippe Normand <pnormand@igalia.com> |
| |
| [GStreamer] REGRESSION(r226629): broke media/video-interruption-with-resume-allowing-play.html |
| https://bugs.webkit.org/show_bug.cgi?id=181471 |
| <rdar://problem/36402323> |
| |
| Reviewed by Carlos Garcia Campos. |
| |
| This patch mainly reduces the amount of playback state changes |
| emitted by the GStreamer player to its client. Emitting those |
| notifications too often has bad side effects. |
| |
| * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp: |
| (WebCore::MediaPlayerPrivateGStreamer::paused const): Add debug messages. |
| (WebCore::MediaPlayerPrivateGStreamer::handleMessage): This debug message appears too much. Demote. |
| (WebCore::MediaPlayerPrivateGStreamer::maxTimeLoaded const): Ditto. |
| (WebCore::MediaPlayerPrivateGStreamer::didLoadingProgress const): Ditto. |
| (WebCore::MediaPlayerPrivateGStreamer::updateStates): Try to emit |
| playback state change notification only when going to PLAYING. |
| (WebCore::MediaPlayerPrivateGStreamer::loadingFailed): Add warning message. |
| |
| 2018-01-10 Youenn Fablet <youenn@apple.com> |
| |
| Add Service Worker CSP persistency |
| https://bugs.webkit.org/show_bug.cgi?id=181434 |
| |
| Reviewed by Alex Christensen. |
| |
| Covered by manual testing. |
| Future work on service worker test infrastructure should allow automating such tests. |
| |
| Add support for service worker CSP data persistency. |
| Add a version parameter to increment each time the schema is changing. |
| This allows the same store to be used by multiple WebKits. |
| |
| * workers/service/server/RegistrationDatabase.cpp: |
| (WebCore::v1RecordsTableSchema): |
| (WebCore::RegistrationDatabase::openSQLiteDatabase): |
| (WebCore::RegistrationDatabase::doPushChanges): |
| (WebCore::RegistrationDatabase::importRecords): |
| |
| 2018-01-10 Antti Koivisto <antti@apple.com> |
| |
| Invalidate current element style on class change accurately |
| https://bugs.webkit.org/show_bug.cgi?id=181210 |
| |
| Reviewed by Zalan Bujtas. |
| |
| * css/DocumentRuleSets.cpp: |
| (WebCore::DocumentRuleSets::collectFeatures const): |
| (WebCore::DocumentRuleSets::subjectClassRules const): |
| |
| New rule set containing class rules affecting the subject element. |
| |
| (WebCore::DocumentRuleSets::ancestorClassRules const): |
| * css/DocumentRuleSets.h: |
| * css/RuleFeature.cpp: |
| (WebCore::RuleFeatureSet::recursivelyCollectFeaturesFromSelector): |
| |
| Classify selector components into various buckets based on the elements they match relative to |
| the subject element. There are more categories than this patch strictly needs, for future use. |
| |
| (WebCore::RuleFeatureSet::collectFeatures): |
| (WebCore::RuleFeatureSet::add): |
| (WebCore::RuleFeatureSet::clear): |
| (WebCore::RuleFeatureSet::shrinkToFit): |
| * css/RuleFeature.h: |
| * css/StyleResolver.h: |
| (WebCore::StyleResolver::hasSelectorForClass const): Deleted. |
| * style/ClassChangeInvalidation.cpp: |
| (WebCore::Style::elementNeedsInvalidation): |
| (WebCore::Style::ClassChangeInvalidation::computeInvalidation): |
| |
| Don't invalidate current element unconditionally on class change. Instead find the subject rulesets |
| that might affect it use them to perform invalidation. |
| |
| (WebCore::Style::ClassChangeInvalidation::invalidateStyleWithRuleSets): |
| (WebCore::Style::ClassChangeInvalidation::invalidateStyle): Deleted. |
| (WebCore::Style::ClassChangeInvalidation::invalidateDescendantStyle): Deleted. |
| * style/ClassChangeInvalidation.h: |
| (WebCore::Style::ClassChangeInvalidation::ClassChangeInvalidation): |
| (WebCore::Style::ClassChangeInvalidation::~ClassChangeInvalidation): |
| * style/StyleSharingResolver.cpp: |
| (WebCore::Style::SharingResolver::classNamesAffectedByRules const): |
| |
| 2018-01-09 Antoine Quint <graouts@apple.com> |
| |
| [Web Animations] Expose the id property on Animation |
| https://bugs.webkit.org/show_bug.cgi?id=181450 |
| <rdar://problem/36383600> |
| |
| Reviewed by Dean Jackson. |
| |
| Expose the "id" property on Animation and handle the "id" property on the optional KeyframeAnimationOptions object |
| passed to Element.animate(). All of the WPT tests related to this property are now passing. |
| |
| * animation/WebAnimation.h: |
| * animation/WebAnimation.idl: |
| * dom/Element.cpp: |
| (WebCore::Element::animate): |
| |
| 2018-01-09 Chris Dumez <cdumez@apple.com> |
| |
| Make service workers behave correctly with regards to Page Cache |
| https://bugs.webkit.org/show_bug.cgi?id=181446 |
| <rdar://problem/36164291> |
| |
| Reviewed by Youenn Fablet. |
| |
| Make service workers behave correctly with regards to Page Cache: |
| 1. If a document has an active service worker, do not let it go into PageCache |
| 2. When a document goes into page cache, unregister it from the list of service worker clients |
| 3. When a document is restored from page cache, add it nack to the list of service worker clients |
| |
| Tests: http/tests/workers/service/client-added-to-clients-when-restored-from-page-cache.html |
| http/tests/workers/service/client-removed-from-clients-while-in-page-cache.html |
| http/tests/workers/service/no-page-cache-when-controlled.html |
| http/tests/workers/service/other_resources/test.html |
| |
| * dom/Document.cpp: |
| (WebCore::Document::suspend): |
| (WebCore::Document::resume): |
| * history/PageCache.cpp: |
| (WebCore::canCacheFrame): |
| * page/DiagnosticLoggingKeys.cpp: |
| (WebCore::DiagnosticLoggingKeys::serviceWorkerKey): |
| * page/DiagnosticLoggingKeys.h: |
| |
| 2018-01-09 Chris Dumez <cdumez@apple.com> |
| |
| We should not return undefined for most properties of a detached Window |
| https://bugs.webkit.org/show_bug.cgi?id=181416 |
| <rdar://problem/36162489> |
| |
| Reviewed by Ryosuke Niwa. |
| |
| We should not return undefined for most properties on a detached Window. WebKit previously only exposed "closed" |
| and "close" properties on detached / frameless windows. However, this does not match the HTML specification [1] |
| or the behavior of Firefox and Chrome. |
| |
| Note that Chrome does not seem to fully follow the HTML specification either, it seems to treat detached windows |
| the same way as cross-origin ones. As a result, it only exposed properties that are visible cross-origin when |
| a window is detached / frameless. |
| |
| [1] https://html.spec.whatwg.org/#windowproxy-get |
| |
| No new tests, updated existingt tests. |
| |
| * bindings/js/JSDOMWindowCustom.cpp: |
| (WebCore::jsDOMWindowGetOwnPropertySlotRestrictedAccess): |
| (WebCore::JSDOMWindow::getOwnPropertySlot): |
| (WebCore::JSDOMWindow::getOwnPropertySlotByIndex): |
| |
| 2018-01-09 Darin Adler <darin@apple.com> |
| |
| Further refinement to list item and counter code after "list-item" counter fix |
| https://bugs.webkit.org/show_bug.cgi?id=181426 |
| |
| Reviewed by Zalan Bujtas. |
| |
| * css/StyleBuilderCustom.h: |
| (WebCore::StyleBuilderCustom::applyInheritCounter): Use auto. |
| (WebCore::StyleBuilderCustom::applyValueCounter): Use auto, removed unneeded |
| null checks for things that can never be null, moved the saturated addition |
| here and got rid of the addIncrementValue function from CounterDirectives. |
| Use the saturatedAddition function from SaturatedArithmetic.h instead of the |
| much less efficient one that did the same thing, CounterDirectives::addClamped. |
| |
| * rendering/RenderCounter.cpp: |
| (WebCore::listItemCounterDirectives): Use aggregate syntax for the return |
| statements. |
| (WebCore::planCounter): Changed to use a struct return value instead of two |
| out arguments. Use the saturatedAddition function from SaturatedArithmetic.h |
| instead of the much less efficient one that did the same thing, |
| CounterDirectives::addClamped. |
| (WebCore::findPlaceForCounter): Changed to use a struct return value instead |
| of two out arguments. |
| (WebCore::makeCounterNode): Updated for the above changes. Changed code to |
| use add instead of both get and set. Updated to keep the counter maps inside |
| the values of the "map of maps" instead of using a unique_ptr and allocating |
| each one on the heap. |
| (WebCore::destroyCounterNodeWithoutMapRemoval): Changed argument to a reference |
| instead of a pointer. Updated for changes to the map. Use RefPtr more |
| consistently. |
| (WebCore::RenderCounter::destroyCounterNodes): Use iterators less. |
| (WebCore::RenderCounter::destroyCounterNode): Ditto. |
| (WebCore::RenderCounter::rendererRemovedFromTree): Add a check of |
| hasCounterNodeMap here before calling destroyCounterNodes, so that function |
| can assume the flag is true (both other callers already check it). |
| (WebCore::updateCounters): Use auto and update for changes above. |
| (WebCore::RenderCounter::rendererStyleChanged): Use modern for loops instead |
| of iterators. |
| (showCounterRendererTree): Use auto and udpate for changes above. |
| |
| * rendering/RenderListItem.cpp: |
| (WebCore::enclosingList): Stop referring to elements as "nodes". Changed |
| the local variable names for clarity. |
| (WebCore::nextListItemHelper): Renamed from nextListItem since it's not |
| intended to be called directly and we want to use a function pointer to |
| nextListItem. Fixed the algorithm to correctly handle ad hoc "lists" that |
| are not actually HTML list elements, using the definition in the enclosingList |
| function as the previousListItem function already did. |
| (WebCore::nextListItem): Updated for name changes. |
| (WebCore::firstListItem): Renamed from nextListItem for clarity. |
| (WebCore::previousListItem): Rewrote loop so it doesn't have to do things |
| so strangely when we find another list. |
| (WebCore::RenderListItem::updateItemValuesForOrderedList): Use auto and |
| update local variable names. |
| (WebCore::RenderListItem::itemCountForOrderedList): Ditto. |
| (WebCore::RenderListItem::updateValueNow const): Rewrote to use an iterative |
| algorithm instead of a recursive one. Fixes the FIXME here. |
| (WebCore::RenderListItem::updateValue): Use m_valueWasSetExplicitly |
| instead of m_explicitValue. |
| (WebCore::RenderListItem::explicitValueChanged): Use auto and simplified |
| the loop a bit. |
| (WebCore::RenderListItem::setExplicitValue): Set m_valueWasSetExplicitly |
| instead of m_explicitValue. |
| (WebCore::previousOrNextItem): Deleted. |
| (WebCore::RenderListItem::updateListMarkerNumbers): Streamlined the loop |
| a bit and used a fucntion pointer to handle the two different directions. |
| (WebCore::RenderListItem::isInReversedOrderedList const): Simplified by |
| getting rid of an unneeded use of pointers and local variables. |
| |
| * rendering/RenderListItem.h: Use a boolean, m_valueWasSetExplicitly, |
| instead of a separate optional m_explicitValue. |
| |
| * rendering/style/CounterDirectives.h: Since all the code in this file was |
| rewritten, removed old copyrights. Deleted the addIncrementValue function, |
| since it is clear enough in the one call site in the style builder. |
| Deleted the addClamped function because it was just a much slower |
| version of the saturatedAddition function. Made == and != into constexpr |
| functions since they are simple enough to be. |
| |
| * rendering/style/RenderStyle.cpp: |
| (WebCore::RenderStyle::getCounterDirectives const): Deleted. Caller can |
| handle this just fine without a helper function. |
| * rendering/style/RenderStyle.h: Ditto. |
| |
| 2018-01-09 Myles C. Maxfield <mmaxfield@apple.com> |
| |
| font-display:fallback can cause a visual flash (which is supposed to be impossible) |
| https://bugs.webkit.org/show_bug.cgi?id=181374 |
| |
| Reviewed by Simon Fraser. |
| |
| A FontCascade represents an entire font-family fallback list, but sometimes we need to pull out a single |
| representative font from the list to calculate things like line height. Previously, if the first item in |
| the font-family list was in the middle of being downloaded, this representative font was hardcoded to be |
| Times. However, when actually laying out and drawing the glyphs, we have logic to skip the interstitial |
| Times if there are any installed fonts present in the font-family list (so you wouldn't ever actually |
| see Times). This means that line height (among other things) was being calculated as if Times was used, |
| but in reality, some other font from the font-family list was being used. |
| |
| Alone, this isn't a huge problem, but font-display:fallback makes a font transition between "timed out" |
| and "failed," and when the font hits the failed state, the representative font skips over the cancelled |
| item and hits the next item in the fallback list. This means that line heights will change, which causes |
| a visual flash, even when font-display:fallback is specified. |
| |
| The solution is simply to educate the logic which identifies this representative font so that it |
| understands what to do for currently-loading fonts. |
| |
| Tests: fast/text/font-display/swap-flash.html |
| |
| * platform/graphics/FontCascadeFonts.h: |
| (WebCore::FontCascadeFonts::primaryFont): |
| * rendering/line/BreakingContext.h: |
| (WebCore::textWidth): |
| |
| 2018-01-04 Filip Pizlo <fpizlo@apple.com> |
| |
| CodeBlocks should be in IsoSubspaces |
| https://bugs.webkit.org/show_bug.cgi?id=180884 |
| |
| Reviewed by Saam Barati. |
| |
| No new tests because no new behavior. |
| |
| Adopting new parallel constraint API, so that more of the logic of doing parallel |
| constraint solving is shared between the DOM's output constraints and JSC's output |
| constraints. |
| |
| * bindings/js/DOMGCOutputConstraint.cpp: |
| (WebCore::DOMGCOutputConstraint::executeImpl): |
| (WebCore::DOMGCOutputConstraint::doParallelWorkImpl): Deleted. |
| (WebCore::DOMGCOutputConstraint::finishParallelWorkImpl): Deleted. |
| * bindings/js/DOMGCOutputConstraint.h: |
| |
| 2018-01-08 Simon Fraser <simon.fraser@apple.com> |
| |
| Clean up Marquee-related enums |
| https://bugs.webkit.org/show_bug.cgi?id=181347 |
| |
| Reviewed by Anders Carlsson. |
| |
| Modernize EMarqueeBehavior and EMarqueeDirection enums. Stop using the weird negative |
| values in the MarqueeDirection and do manual reverse direction mapping. |
| |
| Make some member functions of RenderMarquee private. |
| |
| Stop using bitfields in RenderMarquee because the memory saving is not worth it, and doing so |
| allows us to use modern initialization. |
| |
| No behavior change. |
| |
| * css/CSSPrimitiveValueMappings.h: |
| (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): |
| (WebCore::CSSPrimitiveValue::operator MarqueeBehavior const): |
| (WebCore::CSSPrimitiveValue::operator MarqueeDirection const): |
| (WebCore::CSSPrimitiveValue::operator EMarqueeBehavior const): Deleted. |
| (WebCore::CSSPrimitiveValue::operator EMarqueeDirection const): Deleted. |
| * css/StyleResolver.cpp: |
| (WebCore::StyleResolver::adjustRenderStyle): |
| * rendering/RenderBox.cpp: |
| (WebCore::RenderBox::sizesLogicalWidthToFitContent const): |
| * rendering/RenderLayer.cpp: |
| (WebCore::RenderLayer::calculateClipRects const): |
| * rendering/RenderMarquee.cpp: |
| (WebCore::RenderMarquee::RenderMarquee): |
| (WebCore::reverseDirection): |
| (WebCore::RenderMarquee::direction const): |
| (WebCore::RenderMarquee::isHorizontal const): |
| (WebCore::RenderMarquee::computePosition): |
| (WebCore::RenderMarquee::start): |
| (WebCore::RenderMarquee::updateMarqueePosition): |
| (WebCore::RenderMarquee::updateMarqueeStyle): |
| (WebCore::RenderMarquee::timerFired): |
| * rendering/RenderMarquee.h: |
| * rendering/style/RenderStyle.h: |
| (WebCore::RenderStyle::marqueeBehavior const): |
| (WebCore::RenderStyle::marqueeDirection const): |
| (WebCore::RenderStyle::setMarqueeDirection): |
| (WebCore::RenderStyle::setMarqueeBehavior): |
| (WebCore::RenderStyle::initialMarqueeBehavior): |
| (WebCore::RenderStyle::initialMarqueeDirection): |
| * rendering/style/RenderStyleConstants.h: |
| * rendering/style/StyleMarqueeData.cpp: |
| (WebCore::StyleMarqueeData::StyleMarqueeData): |
| * rendering/style/StyleMarqueeData.h: |
| |
| 2018-01-09 Jer Noble <jer.noble@apple.com> |
| |
| Many CVDisplayLink threads created and destroyed while watching a YouTube video |
| https://bugs.webkit.org/show_bug.cgi?id=181396 |
| |
| Reviewed by Simon Fraser. |
| |
| When watching some YouTube videos (or any video with default controls), event handlers for |
| the "timeupdate" event which use rAF will cause the underlying platform objects to be |
| destroyed in between "timeupdate" events being fired, since they occur every 250ms, and rAF |
| objects are destroyed every 166ms (or 10/60hz). Update this constant to destroy the |
| underlying objects every 333ms (or 20/60hz) so that this common pattern doesn't lead to |
| excessive rAF platform object turnover. |
| |
| * platform/Logging.h: |
| * platform/graphics/DisplayRefreshMonitor.h: |
| (WebCore::DisplayRefreshMonitor::shouldBeTerminated const): |
| * platform/graphics/DisplayRefreshMonitor.cpp: |
| (WebCore::DisplayRefreshMonitor::displayDidRefresh): |
| * platform/graphics/DisplayRefreshMonitorManager.cpp: |
| (WebCore::DisplayRefreshMonitorManager::createMonitorForClient): |
| (WebCore::DisplayRefreshMonitorManager::displayDidRefresh): |
| |
| 2018-01-09 Zalan Bujtas <zalan@apple.com> |
| |
| [RenderTreeBuilder] Move RenderElement addChild mutation logic to RenderTreeBuilder |
| https://bugs.webkit.org/show_bug.cgi?id=181451 |
| <rdar://problem/36385562> |
| |
| Reviewed by Antti Koivisto. |
| |
| This is about moving code, no cleanup and/or normalization (unfortunately it also means |
| some temporary changes). |
| |
| No change in functionality. |
| |
| * rendering/RenderElement.cpp: |
| (WebCore::RenderElement::addChild): |
| (WebCore::RenderElement::childRequiresTable const): Deleted. |
| * rendering/RenderElement.h: |
| * rendering/updating/RenderTreeBuilder.cpp: |
| (WebCore::RenderTreeBuilder::insertChildToRenderElement): |
| (WebCore::RenderTreeBuilder::childRequiresTable): |
| * rendering/updating/RenderTreeBuilder.h: |
| * rendering/updating/RenderTreeBuilderInline.cpp: |
| (WebCore::RenderTreeBuilder::Inline::insertChildToContinuation): |
| (WebCore::RenderTreeBuilder::Inline::insertChildIgnoringContinuation): |
| (WebCore::RenderTreeBuilder::Inline::newChildIsInline): |
| (WebCore::newChildIsInline): Deleted. |
| * rendering/updating/RenderTreeBuilderInline.h: |
| |
| 2018-01-09 Matt Lewis <jlewis3@apple.com> |
| |
| Unreviewed, rolling out r226531. |
| |
| This caused test failures on macOS WK2. |
| |
| Reverted changeset: |
| |
| "Use no-cache fetch mode when loading main documents with |
| location.reload()" |
| https://bugs.webkit.org/show_bug.cgi?id=181285 |
| https://trac.webkit.org/changeset/226531 |
| |
| 2018-01-09 Michael Saboff <msaboff@apple.com> |
| |
| Unreviewed, rolling out r226600 and r226603 |
| https://bugs.webkit.org/show_bug.cgi?id=181351 |
| |
| Add a DOM gadget for Spectre testing |
| |
| * dom/Comment.cpp: |
| (WebCore::Comment::Comment): |
| (WebCore::Comment::setReadLength): Deleted. |
| (WebCore::Comment::charCodeAt): Deleted. |
| (WebCore::Comment::clflushReadLength): Deleted. |
| * dom/Comment.h: |
| * dom/Comment.idl: |
| * page/RuntimeEnabledFeatures.cpp: |
| (WebCore::RuntimeEnabledFeatures::spectreGadgetsEnabled const): Deleted. |
| * page/RuntimeEnabledFeatures.h: |
| |
| 2018-01-09 Don Olmstead <don.olmstead@sony.com> |
| |
| Add additional WEBCORE_EXPORTs |
| https://bugs.webkit.org/show_bug.cgi?id=181414 |
| |
| Reviewed by Alex Christensen. |
| |
| No new tests. No change in behavior. |
| |
| * dom/Document.h: |
| * dom/ViewportArguments.h: |
| * page/DOMWindow.h: |
| * page/FrameView.h: |
| * page/PageOverlayController.h: |
| * platform/ContextMenuItem.h: |
| * platform/Pasteboard.h: |
| * platform/SharedBuffer.h: |
| * platform/UserAgent.h: |
| * platform/graphics/GLContext.h: |
| * platform/graphics/GraphicsContext.h: |
| * platform/graphics/GraphicsLayerTransform.h: |
| * platform/graphics/PlatformDisplay.h: |
| * platform/graphics/cairo/BackingStoreBackendCairoImpl.h: |
| * platform/graphics/cairo/PlatformContextCairo.h: |
| * platform/graphics/cairo/RefPtrCairo.h: |
| * platform/graphics/nicosia/NicosiaBuffer.h: |
| * platform/graphics/nicosia/NicosiaPaintingEngine.h: |
| * platform/graphics/texmap/TextureMapper.h: |
| * platform/graphics/texmap/TextureMapperAnimation.h: |
| * platform/graphics/texmap/TextureMapperBackingStore.h: |
| * platform/graphics/texmap/TextureMapperFPSCounter.h: |
| * platform/graphics/texmap/TextureMapperLayer.h: |
| (WebCore::TextureMapperLayer::TextureMapperLayer): Deleted. |
| (WebCore::TextureMapperLayer::setID): Deleted. |
| (WebCore::TextureMapperLayer::id): Deleted. |
| (WebCore::TextureMapperLayer:: const): Deleted. |
| (WebCore::TextureMapperLayer::setScrollClient): Deleted. |
| (WebCore::TextureMapperLayer::setIsScrollable): Deleted. |
| (WebCore::TextureMapperLayer::isScrollable const): Deleted. |
| (WebCore::TextureMapperLayer::textureMapper const): Deleted. |
| (WebCore::TextureMapperLayer::setTextureMapper): Deleted. |
| (WebCore::TextureMapperLayer::drawsContent const): Deleted. |
| (WebCore::TextureMapperLayer::contentsAreVisible const): Deleted. |
| (WebCore::TextureMapperLayer::size const): Deleted. |
| (WebCore::TextureMapperLayer::opacity const): Deleted. |
| (WebCore::TextureMapperLayer::transform const): Deleted. |
| (WebCore::TextureMapperLayer::hasFilters const): Deleted. |
| (WebCore::TextureMapperLayer::isShowingRepaintCounter const): Deleted. |
| (WebCore::TextureMapperLayer::fixedToViewport const): Deleted. |
| (WebCore::TextureMapperLayer::rootLayer const): Deleted. |
| (WebCore::TextureMapperLayer::texture): Deleted. |
| (WebCore::TextureMapperLayer::adjustedPosition const): Deleted. |
| (WebCore::TextureMapperLayer::layerRect const): Deleted. |
| (WebCore::TextureMapperLayer::State::State): Deleted. |
| * platform/graphics/texmap/TextureMapperPlatformLayerProxy.h: |
| * platform/graphics/texmap/TextureMapperTile.h: |
| * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h: |
| (WebCore::CoordinatedGraphicsLayer::isScrollable const): Deleted. |
| (WebCore::CoordinatedGraphicsLayer::id const): Deleted. |
| (WebCore::CoordinatedGraphicsLayer::coverRect const): Deleted. |
| (WebCore::CoordinatedGraphicsLayer::fixedToViewport const): Deleted. |
| * platform/graphics/texmap/coordinated/CoordinatedImageBacking.h: |
| (WebCore::CoordinatedImageBacking::id const): Deleted. |
| * platform/graphics/texmap/coordinated/TiledBackingStore.h: |
| * platform/graphics/texmap/coordinated/UpdateAtlas.h: |
| * platform/network/AuthenticationChallengeBase.h: |
| * platform/network/CredentialBase.h: |
| * platform/network/ProtectionSpaceBase.h: |
| * platform/network/curl/SocketStreamHandleImpl.h: |
| * replay/UserInputBridge.h: |
| |
| 2018-01-09 Basuke Suzuki <Basuke.Suzuki@sony.com> |
| |
| [Curl] Move FormData related tasks into new CurlFormDataStream class. |
| https://bugs.webkit.org/show_bug.cgi?id=181106 |
| |
| Reviewed by Alex Christensen. |
| |
| No new tests because no behavior change. |
| |
| * platform/Curl.cmake: |
| * platform/network/curl/CurlFormDataStream.cpp: Added. |
| (WebCore::CurlFormDataStream::CurlFormDataStream): |
| (WebCore::CurlFormDataStream::~CurlFormDataStream): |
| (WebCore::CurlFormDataStream::clean): |
| (WebCore::CurlFormDataStream::shouldUseChunkTransfer): |
| (WebCore::CurlFormDataStream::totalSize): |
| (WebCore::CurlFormDataStream::computeContentLength): |
| (WebCore::CurlFormDataStream::read): |
| (WebCore::CurlFormDataStream::readFromFile): |
| (WebCore::CurlFormDataStream::readFromData): |
| * platform/network/curl/CurlFormDataStream.h: Renamed from Source/WebCore/platform/network/curl/FormDataStreamCurl.h. |
| (WebCore::CurlFormDataStream::elementSize): |
| (WebCore::CurlFormDataStream::totalReadSize): |
| * platform/network/curl/CurlRequest.cpp: |
| (WebCore::CurlRequest::CurlRequest): |
| (WebCore::CurlRequest::willSendData): |
| (WebCore::CurlRequest::finalizeTransfer): |
| (WebCore::CurlRequest::setupPUT): |
| (WebCore::CurlRequest::setupPOST): |
| (WebCore::CurlRequest::setupSendData): |
| (WebCore::CurlRequest::resolveBlobReferences): Deleted. |
| (WebCore::CurlRequest::setupFormData): Deleted. |
| * platform/network/curl/CurlRequest.h: |
| * platform/network/curl/FormDataStreamCurl.cpp: Removed. |
| |
| 2018-01-09 Zalan Bujtas <zalan@apple.com> |
| |
| [RenderTreeBuilder] Move MathML addChild logic to RenderTreeBuilder |
| https://bugs.webkit.org/show_bug.cgi?id=181443 |
| <rdar://problem/36380228> |
| |
| Reviewed by Antti Koivisto. |
| |
| This is about moving code, no cleanup and/or normalization (unfortunately it also means |
| some temporary changes). |
| |
| No change in functionality. |
| |
| * Sources.txt: |
| * WebCore.xcodeproj/project.pbxproj: |
| * rendering/mathml/RenderMathMLFenced.cpp: |
| (WebCore::RenderMathMLFenced::addChild): |
| (WebCore::RenderMathMLFenced::createMathMLOperator): Deleted. |
| (WebCore::RenderMathMLFenced::makeFences): Deleted. |
| * rendering/mathml/RenderMathMLFenced.h: |
| * rendering/updating/RenderTreeBuilder.cpp: |
| (WebCore::RenderTreeBuilder::RenderTreeBuilder): |
| (WebCore::RenderTreeBuilder::insertChildToRenderMathMLFenced): |
| * rendering/updating/RenderTreeBuilder.h: |
| (WebCore::RenderTreeBuilder::mathMLBuilder): |
| |
| 2018-01-09 Antti Koivisto <antti@apple.com> |
| |
| Blank page except for inner iframes because pending stylesheets cause style.isNotFinal() to be true |
| https://bugs.webkit.org/show_bug.cgi?id=180940 |
| <rdar://problem/36116507> |
| |
| Reviewed by Darin Adler. |
| |
| Test: http/tests/local/loading-stylesheet-import-remove.html |
| |
| If a <link> referencing a stylesheet containing an @import that was still loading was removed |
| from the document, the loading state was never cleared. For head stylesheets this blocked |
| rendering permanently. |
| |
| Test reduction by Justin Ridgewell. |
| |
| * html/HTMLLinkElement.cpp: |
| (WebCore::HTMLLinkElement::removedFromAncestor): |
| |
| Test if the stylesheet it loading before clearing the pointer. |
| |
| 2018-01-09 Dan Bernstein <mitz@apple.com> |
| |
| Removed some empty directories that were left behind |
| |
| * Modules/indieui: Removed. |
| * Modules/vibration: Removed. |
| * platform/graphics/ca/mac: Removed. |
| * platform/mediastream/gstreamer: Removed. |
| |
| 2018-01-09 Antoine Quint <graouts@apple.com> |
| |
| Refactor timing function solving code |
| https://bugs.webkit.org/show_bug.cgi?id=181428 |
| |
| Reviewed by Dean Jackson. |
| |
| We have duplicated code to solve "cubic" and "steps" timing functions in AnimationBase and TextureMapperAnimation, |
| and we will soon need similar code to deal with timing functions in Web Animations. We move this code into TimingFunction |
| with a single transformTime() function that can be called directly on the timing function rather than having callers |
| figure out what type timing functions are to solve them. |
| |
| No test as there shouldn't be any behavior change. |
| |
| * page/animation/AnimationBase.cpp: |
| (WebCore::AnimationBase::progress const): |
| (WebCore::solveEpsilon): Deleted. |
| (WebCore::solveCubicBezierFunction): Deleted. |
| (WebCore::solveStepsFunction): Deleted. |
| (WebCore::solveSpringFunction): Deleted. |
| * platform/animation/TimingFunction.cpp: |
| (WebCore::TimingFunction::transformTime const): |
| * platform/animation/TimingFunction.h: |
| * platform/graphics/texmap/TextureMapperAnimation.cpp: |
| (WebCore::TextureMapperAnimation::apply): |
| (WebCore::solveEpsilon): Deleted. |
| (WebCore::solveCubicBezierFunction): Deleted. |
| (WebCore::solveStepsFunction): Deleted. |
| (WebCore::applyTimingFunction): Deleted. |
| |
| 2018-01-09 Michael Catanzaro <mcatanzaro@igalia.com> |
| |
| Unreviewed, silence -Wunused-parameter warning |
| |
| * testing/js/WebCoreTestSupport.cpp: |
| (WebCoreTestSupport::setupNewlyCreatedServiceWorker): |
| |
| 2018-01-09 Said Abou-Hallawa <sabouhallawa@apple.com> |
| |
| Check Image::m_image is not null in ImageLoader::decode() |
| https://bugs.webkit.org/show_bug.cgi?id=180386 |
| <rdar://problem/34634483> |
| |
| Reviewed by Tim Horton. |
| |
| Ensure ImageLoader::m_image is not null before referencing it. |
| |
| * loader/ImageLoader.cpp: |
| (WebCore::ImageLoader::decode): |
| |
| 2018-01-09 Yusuke Suzuki <utatane.tea@gmail.com> |
| |
| [FreeType] Use FastMalloc for FreeType |
| https://bugs.webkit.org/show_bug.cgi?id=181387 |
| |
| Reviewed by Michael Catanzaro. |
| |
| Add custom memory allocator for FreeType to use FastMalloc. |
| |
| * platform/graphics/freetype/FontCustomPlatformDataFreeType.cpp: |
| (WebCore::initializeFreeTypeLibrary): |
| (WebCore::createFontCustomPlatformData): |
| |
| 2018-01-09 Zalan Bujtas <zalan@apple.com> |
| |
| [RenderTreeBuilder] Move RenderTable* addChild mutation logic to RenderTreeBuilder |
| https://bugs.webkit.org/show_bug.cgi?id=181424 |
| <rdar://problem/36368628> |
| |
| Reviewed by Antti Koivisto. |
| |
| This is about moving code, no cleanup and/or normalization (unfortunately it also means |
| some temporary changes). |
| |
| Covered by existing tests. |
| |
| * rendering/RenderTable.cpp: |
| (WebCore::RenderTable::addChild): |
| * rendering/RenderTableRow.cpp: |
| (WebCore::RenderTableRow::addChild): |
| * rendering/RenderTableSection.cpp: |
| (WebCore::RenderTableSection::addChild): |
| * rendering/updating/RenderTreeBuilder.cpp: |
| (WebCore::RenderTreeBuilder::insertChildToRenderTable): |
| (WebCore::RenderTreeBuilder::insertChildToRenderTableSection): |
| (WebCore::RenderTreeBuilder::insertChildToRenderTableRow): |
| * rendering/updating/RenderTreeBuilder.h: |
| * rendering/updating/RenderTreeBuilderTable.cpp: |
| (WebCore::RenderTreeBuilder::Table::insertChild): |
| * rendering/updating/RenderTreeBuilderTable.h: |
| |
| 2018-01-09 Zalan Bujtas <zalan@apple.com> |
| |
| [RenderTreeBuilder] Transition Render*::addChild() calls to RenderTreeBuilder::insertChildToRender*() |
| https://bugs.webkit.org/show_bug.cgi?id=181407 |
| <rdar://problem/36361176> |
| |
| Reviewed by Antti Koivisto. |
| |
| Eventually all mutation will be going through the RenderTreeBuilder. |
| |
| No change in functionality. |
| |
| * rendering/RenderGrid.cpp: |
| (WebCore::RenderGrid::addChild): |
| * rendering/RenderMultiColumnFlow.cpp: |
| (WebCore::RenderMultiColumnFlow::processPossibleSpannerDescendant): |
| * rendering/RenderRubyRun.cpp: |
| (WebCore::RenderRubyRun::rubyBaseSafe): |
| * rendering/updating/RenderTreeBuilderBlockFlow.cpp: |
| (WebCore::RenderTreeBuilder::BlockFlow::insertChild): |
| * rendering/updating/RenderTreeBuilderMultiColumn.cpp: |
| (WebCore::RenderTreeBuilder::MultiColumn::createFragmentedFlow): |
| * rendering/updating/RenderTreeBuilderRuby.cpp: |
| (WebCore::RenderTreeBuilder::Ruby::findOrCreateParentForChild): |
| |
| 2018-01-09 Philippe Normand <pnormand@igalia.com> |
| |
| [GStreamer] Ensure SleepDisabler is not held by pages in page cache |
| https://bugs.webkit.org/show_bug.cgi?id=180197 |
| |
| Reviewed by Eric Carlson. |
| |
| The sleep disabler is now checked again whenever the media player |
| playback state or other characteristic has changed in the media |
| engine. |
| |
| * html/HTMLMediaElement.cpp: |
| (WebCore::HTMLMediaElement::mediaPlayerPlaybackStateChanged): |
| Check if the sleep disabler state needs to be updated or not. |
| (WebCore::HTMLMediaElement::mediaPlayerCharacteristicChanged): Ditto. |
| (WebCore::HTMLMediaElement::shouldDisableSleep const): Enable |
| sleep disabler for GTK and WPE ports. |
| |
| 2018-01-09 Philippe Normand <pnormand@igalia.com> |
| |
| [GStreamer] Missing notifications to player client |
| https://bugs.webkit.org/show_bug.cgi?id=181432 |
| |
| Reviewed by Carlos Garcia Campos. |
| |
| We now properly emit playback state changes and characteristic |
| updates to the client when the pipeline state changes and when |
| audio/video tracks changes are detected. |
| |
| * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp: |
| (WebCore::MediaPlayerPrivateGStreamer::playbackPosition const): |
| This debug message appears too often in logs. Demote. |
| (WebCore::MediaPlayerPrivateGStreamer::durationMediaTime const): Ditto. |
| (WebCore::MediaPlayerPrivateGStreamer::notifyPlayerOfVideo): Emit |
| charasteristicChanged notification. |
| (WebCore::MediaPlayerPrivateGStreamer::notifyPlayerOfAudio): Ditto. |
| (WebCore::MediaPlayerPrivateGStreamer::updateStates): Keep track |
| of old and current pipeline state. |
| * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h: |
| |
| |
| 2018-01-09 Youenn Fablet <youenn@apple.com> |
| |
| Add CSP support to service workers |
| https://bugs.webkit.org/show_bug.cgi?id=181385 |
| |
| Reviewed by Chris Dumez. |
| |
| Covered by rebased tests. |
| |
| Added recovery of CSP information from WorkerScriptLoader. |
| Added plumbing to pass the CSP information to Service Workers. |
| Did not add persistency support for the CSP information as this requires changing the SQL database schema. |
| This will be done in a follow-up. |
| |
| * workers/WorkerScriptLoader.cpp: |
| (WebCore::WorkerScriptLoader::loadAsynchronously): |
| (WebCore::WorkerScriptLoader::didReceiveResponse): |
| * workers/WorkerScriptLoader.h: |
| (WebCore::WorkerScriptLoader::contentSecurityPolicy const): |
| * workers/service/SWClientConnection.cpp: |
| (WebCore::SWClientConnection::finishedFetchingScript): |
| (WebCore::SWClientConnection::failedFetchingScript): |
| * workers/service/SWClientConnection.h: |
| * workers/service/ServiceWorkerContainer.cpp: |
| (WebCore::ServiceWorkerContainer::addRegistration): |
| (WebCore::ServiceWorkerContainer::jobFailedWithException): |
| (WebCore::ServiceWorkerContainer::jobResolvedWithRegistration): |
| (WebCore::ServiceWorkerContainer::jobFinishedLoadingScript): |
| * workers/service/ServiceWorkerContainer.h: |
| * workers/service/ServiceWorkerContextData.cpp: |
| (WebCore::ServiceWorkerContextData::isolatedCopy const): |
| * workers/service/ServiceWorkerContextData.h: |
| (WebCore::ServiceWorkerContextData::encode const): |
| (WebCore::ServiceWorkerContextData::decode): |
| * workers/service/ServiceWorkerFetchResult.h: |
| (WebCore::ServiceWorkerFetchResult::encode const): |
| (WebCore::ServiceWorkerFetchResult::decode): |
| * workers/service/ServiceWorkerGlobalScope.cpp: |
| (WebCore::ServiceWorkerGlobalScope::create): |
| * workers/service/ServiceWorkerGlobalScope.h: |
| * workers/service/ServiceWorkerJob.cpp: |
| (WebCore::ServiceWorkerJob::notifyFinished): |
| * workers/service/ServiceWorkerJobClient.h: |
| * workers/service/context/ServiceWorkerThread.cpp: |
| (WebCore::ServiceWorkerThread::ServiceWorkerThread): |
| (WebCore::ServiceWorkerThread::createWorkerGlobalScope): |
| * workers/service/server/RegistrationDatabase.cpp: |
| (WebCore::v1RecordsTableSchema): |
| (WebCore::RegistrationDatabase::importRecords): |
| * workers/service/server/SWServer.cpp: |
| (WebCore::SWServer::updateWorker): |
| (WebCore::SWServer::installContextData): |
| * workers/service/server/SWServer.h: |
| * workers/service/server/SWServerJobQueue.cpp: |
| (WebCore::SWServerJobQueue::scriptFetchFinished): |
| * workers/service/server/SWServerWorker.cpp: |
| (WebCore::SWServerWorker::SWServerWorker): |
| (WebCore::m_contentSecurityPolicy): |
| (WebCore::SWServerWorker::contextData const): |
| * workers/service/server/SWServerWorker.h: |
| |
| 2018-01-09 Antoine Quint <graouts@apple.com> |
| |
| Provide a method to obtain a CSS value from a RenderStyle by CSSPropertyID |
| https://bugs.webkit.org/show_bug.cgi?id=181429 |
| |
| Reviewed by Antti Koivisto. |
| |
| The KeyframeEffect.getKeyframes() method from Web Animations requires that we return all styles applied at a given |
| animation effect keyframe. When we parse keyframes, we create RenderStyle objects that are stored in a KeyframeList, |
| as well as a list of CSSPropertyIDs that are animated. In order to provide the list of animated properties and their |
| values when calling getKeyframes(), we need to be able to read back from the RenderStyle we create. As a first step |
| towards this goal, we factor some code in ComputedStyleExtractor::propertyValue() out into a new method |
| ComputedStyleExtractor::valueForPropertyinStyle() which takes in an explicit RenderStyle. |
| |
| No test as this is simply refactoring that doesn't change or add behavior. |
| |
| * css/CSSComputedStyleDeclaration.cpp: |
| (WebCore::ComputedStyleExtractor::propertyValue): |
| (WebCore::ComputedStyleExtractor::valueForPropertyinStyle): |
| * css/CSSComputedStyleDeclaration.h: |
| |
| 2018-01-09 Youenn Fablet <youenn@apple.com> |
| |
| SWClientConnection should not keep references to service worker jobs |
| https://bugs.webkit.org/show_bug.cgi?id=181381 |
| |
| Reviewed by Chris Dumez. |
| |
| Difficult to test determiniscally but corresponding crash log should no longer happen in debug builds. |
| |
| Stopped passing ServiceWorkerJob references from ServiceWorkerContainer (potentially in service worker thread) to SWClientConnection (main thread). |
| Instead pass job identifiers and related data to the main thread. |
| |
| Minor refactoring to use ServiceWorkerJobIdentifier instead of ServiceWorkerJobDataIdentifier which contains more data than needed. |
| |
| * workers/service/SWClientConnection.cpp: |
| (WebCore::SWClientConnection::scheduleJob): |
| (WebCore::SWClientConnection::failedFetchingScript): |
| (WebCore::SWClientConnection::postTaskForJob): |
| (WebCore::SWClientConnection::jobRejectedInServer): |
| (WebCore::SWClientConnection::registrationJobResolvedInServer): |
| (WebCore::SWClientConnection::unregistrationJobResolvedInServer): |
| (WebCore::SWClientConnection::startScriptFetchForServer): |
| (WebCore::SWClientConnection::clearPendingJobs): |
| (WebCore::SWClientConnection::finishedFetchingScript): Deleted. |
| * workers/service/SWClientConnection.h: |
| * workers/service/ServiceWorkerContainer.cpp: |
| (WebCore::ServiceWorkerContainer::scheduleJob): |
| (WebCore::ServiceWorkerContainer::startScriptFetchForJob): |
| (WebCore::ServiceWorkerContainer::jobFinishedLoadingScript): |
| (WebCore::ServiceWorkerContainer::jobFailedLoadingScript): |
| * workers/service/ServiceWorkerContainer.h: |
| * workers/service/server/SWServer.cpp: |
| (WebCore::SWServer::rejectJob): |
| (WebCore::SWServer::resolveRegistrationJob): |
| (WebCore::SWServer::resolveUnregistrationJob): |
| (WebCore::SWServer::startScriptFetch): |
| * workers/service/server/SWServer.h: |
| |
| 2018-01-09 Carlos Garcia Campos <cgarcia@igalia.com> |
| |
| REGRESSION(r224460): Text fields sometimes get "messed up" |
| https://bugs.webkit.org/show_bug.cgi?id=181115 |
| |
| Reviewed by Zalan Bujtas. |
| |
| Add the scroll position to paint offset before computing the clip rectangle. Before r224460, scroll position was |
| substracted after the clip rectangle was computed. |
| |
| * rendering/LayoutState.cpp: |
| (WebCore::LayoutState::computeClipRect): |
| |
| 2018-01-09 Ali Juma <ajuma@chromium.org> |
| |
| Implement VisualViewport API events |
| https://bugs.webkit.org/show_bug.cgi?id=179386 |
| |
| Reviewed by Frédéric Wang. |
| |
| Implement the events (resize and scroll) defined by the Visual Viewport API |
| (https://wicg.github.io/visual-viewport/#events). |
| |
| This is behind the VisualViewportAPI experimental feature flag. |
| |
| In order to detect when events need to be fired, change the computation of |
| Visual Viewport attributes to happen whenever the layout viewport is updated |
| rather than only on-demand. |
| |
| Tests: fast/visual-viewport/resize-event-fired-window-resized.html |
| fast/visual-viewport/resize-event-fired.html |
| fast/visual-viewport/scroll-event-fired.html |
| |
| * dom/Document.cpp: |
| (WebCore::Document::addListenerTypeIfNeeded): |
| Add support for tracking resize event listeners. |
| * dom/Document.h: |
| * dom/DocumentEventQueue.cpp: |
| (WebCore::DocumentEventQueue::enqueueOrDispatchScrollEvent): |
| (WebCore::DocumentEventQueue::enqueueScrollEvent): |
| Factored out of enqueueOrDispatchScrollEvent so that this logic can be reused |
| for Visual Viewport scroll events. |
| (WebCore::DocumentEventQueue::enqueueResizeEvent): |
| (WebCore::DocumentEventQueue::pendingEventTimerFired): |
| * dom/DocumentEventQueue.h: |
| * page/FrameView.cpp: |
| (WebCore::FrameView::updateLayoutViewport): |
| * page/VisualViewport.cpp: |
| (WebCore::VisualViewport::addEventListener): |
| (WebCore::layoutIfNonNull): |
| (WebCore::VisualViewport::offsetLeft const): |
| Remove attribute computation logic since this now happens during update(). |
| (WebCore::VisualViewport::offsetTop const): Ditto. |
| (WebCore::VisualViewport::pageLeft const): Ditto. |
| (WebCore::VisualViewport::pageTop const): Ditto. |
| (WebCore::VisualViewport::width const): Ditto. |
| (WebCore::VisualViewport::height const): Ditto. |
| (WebCore::VisualViewport::scale const): |
| (WebCore::VisualViewport::update): |
| Added. Computes all of the Visual Viewport attributes and determines |
| whether events need to be fired. |
| (WebCore::VisualViewport::enqueueResizeEvent): |
| (WebCore::VisualViewport::enqueueScrollEvent): |
| (WebCore::getFrameViewAndLayoutIfNonNull): Deleted. |
| * page/VisualViewport.h: |
| |
| 2018-01-09 Yacine Bandou <yacine.bandou_ext@softathome.com> |
| |
| [EME] Add the CENC initData support in ClearKey CDM |
| https://bugs.webkit.org/show_bug.cgi?id=180081 |
| |
| Reviewed by Xabier Rodriguez-Calvar. |
| |
| Add the "cenc" initDataType support in ClearKey CDM. |
| Parse the CENC initData and extract the KIDs by following the W3C spec |
| https://www.w3.org/TR/eme-initdata-cenc/#common-system |
| |
| Tests: media/encrypted-media/clearKey/clearKey-message-cenc-event.html |
| media/encrypted-media/clearKey/clearKey-message-cenc-event-mse.html |
| |
| * platform/encryptedmedia/clearkey/CDMClearKey.cpp: |
| (WebCore::extractKeyidsLocationFromCencInitData): |
| (WebCore::isCencInitData): |
| (WebCore::extractKeyidsFromCencInitData): |
| (WebCore::CDMPrivateClearKey::supportsInitDataType const): |
| (WebCore::CDMPrivateClearKey::supportsInitData const): |
| (WebCore::CDMInstanceClearKey::requestLicense): |
| |
| 2018-01-09 Zan Dobersek <zdobersek@igalia.com> |
| |
| [Cairo] Pass state values directly to Cairo operations |
| https://bugs.webkit.org/show_bug.cgi?id=181389 |
| |
| Reviewed by Carlos Garcia Campos. |
| |
| Instead of passing reference to the GraphicsContextState object to |
| various Cairo operations, only pass the required state values. This |
| makes it explicit what state values are used in these operations, at the |
| expense of some long parameter lists, but this will be better addressed |
| by future refactoring of this code into more concise functions. |
| |
| No new tests -- no change in functionality. |
| |
| * platform/graphics/cairo/CairoOperations.cpp: |
| (WebCore::Cairo::drawGlyphsShadow): |
| (WebCore::Cairo::dashedLineCornerWidthForStrokeWidth): |
| (WebCore::Cairo::dashedLinePatternWidthForStrokeWidth): |
| (WebCore::Cairo::drawGlyphs): |
| (WebCore::Cairo::drawRect): |
| (WebCore::Cairo::drawLine): |
| (WebCore::Cairo::drawEllipse): |
| * platform/graphics/cairo/CairoOperations.h: |
| * platform/graphics/cairo/FontCairo.cpp: |
| (WebCore::FontCascade::drawGlyphs): |
| * platform/graphics/cairo/GraphicsContextCairo.cpp: |
| (WebCore::GraphicsContext::drawRect): |
| (WebCore::GraphicsContext::drawLine): |
| (WebCore::GraphicsContext::drawEllipse): |
| |
| 2018-01-09 Ryosuke Niwa <rniwa@webkit.org> |
| |
| Release assert in addResourceTiming when a cache resource is requested during style recalc |
| https://bugs.webkit.org/show_bug.cgi?id=181137 |
| <rdar://problem/35666574> |
| |
| Reviewed by Simon Fraser. |
| |
| Make the dispatching of resourcetimingbufferfull event asynchronous to avoid dispatching it |
| synchronously during a style resolution when CachedResourceLoader::requestImage requests |
| a previously loaded image. |
| |
| We now schedule a timer when the resource timing buffer becomes full, and dispatch the event |
| when the timer fires. Meanwhile, we have a backup buffer to which additional resource timing |
| entries would be added. Once the event is dispatched, we refill the buffer exposed to author |
| scripts. When refilling the buffer results in it becoming full again, we keep repeating the |
| process of firing resourcetimingbufferfull and re-filling the buffer until either we stop |
| making progress (i.e. the script didn't increase the number of empty entires in the buffer) |
| or the backup buffer (at the time we started this process) becomes empty. |
| |
| Also fixed a bug that we were firing resourcetimingbufferfull event when the last entry that |
| fits within the buffer size was added instead of when an entry is being added to an already |
| full buffer. To make this work, the patch introduces m_resourceTimingBufferFullFlag, |
| representing the concept "resource timing buffer full" flag in the resource timing specification. |
| |
| Test: http/tests/performance/performance-resource-timing-resourcetimingbufferfull-crash.html |
| |
| * page/Performance.cpp: |
| (WebCore::Performance::Performance): |
| (WebCore::Performance::clearResourceTimings): |
| (WebCore::Performance::setResourceTimingBufferSize): |
| (WebCore::Performance::addResourceTiming): |
| (WebCore::Performance::resourceTimingBufferFullTimerFired): |
| * page/Performance.h: |
| |
| 2018-01-08 Chris Nardi <csnardi1@gmail.com> |
| |
| ::first-letter incorrectly selects grapheme pairs |
| https://bugs.webkit.org/show_bug.cgi?id=181315 |
| |
| Reviewed by Darin Adler. |
| |
| Grapheme pairs were incorrectly selected by ::first-letter. This |
| change fixes their selection. |
| |
| Tests: Updated fast/css/first-letter-punctuation.html and imported |
| LayoutTests/imported/w3c/web-platform-tests/css/css-pseudo-4/first-letter-004.html |
| |
| * rendering/updating/RenderTreeBuilderFirstLetter.cpp: |
| (WebCore::isPunctuationForFirstLetter): |
| (WebCore::shouldSkipForFirstLetter): |
| (WebCore::RenderTreeBuilder::FirstLetter::createRenderers): |
| |
| 2018-01-08 Darin Adler <darin@apple.com> |
| |
| Special list-item counter starts from an incorrect number for ::before and ::after |
| https://bugs.webkit.org/show_bug.cgi?id=181084 |
| |
| Reviewed by Zalan Bujtas. |
| |
| Test: fast/css/counters/counter-list-item.html |
| |
| * Sources.txt: Removed CounterDirectives.cpp. |
| * WebCore.xcodeproj/project.pbxproj: Ditto. |
| |
| * css/CSSComputedStyleDeclaration.cpp: |
| (WebCore::counterToCSSValue): Updated for changes to the CounterDirectives struct. |
| * css/StyleBuilderCustom.h: |
| (WebCore::StyleBuilderCustom::applyInheritCounter): Ditto. |
| (WebCore::StyleBuilderCustom::applyValueCounter): Ditto. |
| |
| * html/HTMLLIElement.cpp: |
| (WebCore::HTMLLIElement::parseValue): Call setExplicitValue(std::nullopt) instead |
| of clearExplicitValue since we are using std::optional now. |
| |
| * rendering/RenderCounter.cpp: |
| (WebCore::listItemCounterDirectives): Added. Computes the counter directives that |
| express the effects on the list-item counter from list item and list elements. |
| Used something as close to what the CSS 3 draft says as possible. This uses a |
| negative increment when creating a list to counteract the positive increment done |
| by a list element, except in the case of an unordered list. This is where the bug |
| fix actually lies. Also fixed handling of reversed ordered lists at the same time. |
| (WebCore::planCounter): Refactored to use the function above. Also changed the |
| code to pay attention to both the counter directives and the implicit ones from |
| list item and list elements, getting as close as possible to what the specification |
| seems to call for. |
| |
| * rendering/RenderListItem.cpp: |
| (WebCore::RenderListItem::RenderListItem): Since we are using std::optional and no |
| longer using bit fields, simplified the constructor for each list item. |
| (WebCore::RenderListItem::calcValue const): Deleted. |
| (WebCore::RenderListItem::updateValueNow const): Merged in all the code from the |
| old calcValue function, but it is also simpler now since m_value is std::optional. |
| (WebCore::RenderListItem::updateValue): Updated to use std::optional. |
| (WebCore::RenderListItem::setExplicitValue): Ditto. |
| (WebCore::RenderListItem::clearExplicitValue): Deleted. |
| (WebCore::RenderListItem::updateListMarkerNumbers): Updated to use std::optional. |
| (WebCore::RenderListItem::isInReversedOrderedList const): Added. This is used by |
| the counter code so it can decrement instead of incrementing. |
| |
| * rendering/RenderListItem.h: Updated to use std::optional. Also marked functions |
| final instead of override and initialized m_notInList after making it not be a |
| bitfield any more. |
| |
| * rendering/style/CounterDirectives.cpp: Removed. |
| * rendering/style/CounterDirectives.h: Removed most of the CounterDirectives |
| class and replaced it with a struct with two std::optional. Added an addClamped |
| function so the counter code can share it with the addIncrementValue function. |
| If we want to make a faster version that doesn't use double, we can come back |
| and do that. Also moved the == function to the header since the implementation |
| is so trivial. |
| |
| * rendering/style/StyleAllInOne.cpp: Removed CounterDirectives.cpp. |
| |
| * rendering/style/StyleRareNonInheritedData.cpp: |
| (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData): Updated to |
| use std::make_unique directly instead of using a clone function. |
| |
| 2018-01-08 Wenson Hsieh <wenson_hsieh@apple.com> |
| |
| [Attachment Support] Expose HTMLAttachmentElement.uniqueIdentifier to bindings |
| https://bugs.webkit.org/show_bug.cgi?id=181420 |
| <rdar://problem/36365827> |
| |
| Reviewed by Alex Christensen. |
| |
| Add a new IDL definition for uniqueIdentifier on HTMLAttachmentElement. This allows clients to relate attachment |
| elements in the DOM to _WKAttachments delivered via Objective-C SPI. |
| |
| Adjusted existing tests in WKAttachmentTests. |
| |
| * html/HTMLAttachmentElement.idl: |
| |
| 2018-01-08 Don Olmstead <don.olmstead@sony.com> |
| |
| AccessibilityARIAGrid does not compile when accessibility is disabled |
| https://bugs.webkit.org/show_bug.cgi?id=181418 |
| <rdar://problem/36365398> |
| |
| Reviewed by Chris Fleizach. |
| |
| No new tests. No change in behavior. |
| |
| * accessibility/AccessibilityARIAGrid.cpp: |
| |
| 2018-01-08 Commit Queue <commit-queue@webkit.org> |
| |
| Unreviewed, rolling out r226532 and r226540. |
| https://bugs.webkit.org/show_bug.cgi?id=181422 |
| |
| jessie says basic browsing does not seem to work (Requested by |
| alexchristensen on #webkit). |
| |
| Reverted changesets: |
| |
| "Add CSP support to service workers" |
| https://bugs.webkit.org/show_bug.cgi?id=181385 |
| https://trac.webkit.org/changeset/226532 |
| |
| "SWClientConnection should not keep references to service |
| worker jobs" |
| https://bugs.webkit.org/show_bug.cgi?id=181381 |
| https://trac.webkit.org/changeset/226540 |
| |
| 2018-01-08 Wenson Hsieh <wenson_hsieh@apple.com> |
| |
| [Attachment Support] Expose file name and content type of WKAttachment |
| https://bugs.webkit.org/show_bug.cgi?id=181390 |
| <rdar://problem/36336837> |
| |
| Reviewed by Tim Horton. |
| |
| Add new structs in AttachmentTypes.h and refactor HTMLAttachmentElement::requestData to requestInfo. See below |
| for more details. Augmented existing API tests in WKAttachmentTests. |
| |
| * html/AttachmentTypes.h: |
| |
| Add a struct to represent a snapshot of information about an attachment element. |
| |
| * html/HTMLAttachmentElement.cpp: |
| (WebCore::HTMLAttachmentElement::requestInfo): |
| (WebCore::HTMLAttachmentElement::requestData): Deleted. |
| * html/HTMLAttachmentElement.h: |
| |
| Change requestData to requestInfo. Instead of fetching and delivering data via callback, requestInfo returns an |
| AttachmentInfo. |
| |
| * rendering/RenderThemeIOS.mm: |
| (WebCore::RenderAttachmentInfo::addLine): |
| (WebCore::RenderAttachmentInfo::buildWrappedLines): |
| (WebCore::RenderAttachmentInfo::buildSingleLine): |
| (WebCore::RenderAttachmentInfo::RenderAttachmentInfo): |
| (WebCore::RenderThemeIOS::attachmentBaseline const): |
| (WebCore::paintAttachmentIcon): |
| (WebCore::paintAttachmentText): |
| (WebCore::paintAttachmentProgress): |
| (WebCore::attachmentBorderPath): |
| (WebCore::RenderThemeIOS::paintAttachment): |
| (WebCore::AttachmentInfo::addLine): Deleted. |
| (WebCore::AttachmentInfo::buildWrappedLines): Deleted. |
| (WebCore::AttachmentInfo::buildSingleLine): Deleted. |
| (WebCore::AttachmentInfo::AttachmentInfo): Deleted. |
| |
| Rename AttachmentInfo to RenderAttachmentInfo to resolve a name conflict with the new AttachmentInfo struct. |
| |
| 2018-01-08 Saam Barati <sbarati@apple.com> |
| |
| Speculative build fix after r226600. We only use clflush on x86 and the `asm volatile` syntax is not available in the Windows build. |
| |
| No new tests because this is a build fix. |
| |
| * dom/Comment.cpp: |
| (WebCore::Comment::clflushReadLength): |
| |
| 2018-01-08 Michael Saboff <msaboff@apple.com> |
| |
| Add a DOM gadget for Spectre testing |
| https://bugs.webkit.org/show_bug.cgi?id=181351 |
| |
| Reviewed by Saam Barati. |
| |
| This change is used to test Spectre mitigations. |
| |
| Added a side data array to the Comment DOM node to test for Spectre issues in |
| the DOM layer. This additional functionality is disabled by default and must |
| be enabled through the JSC option "enableSpectreGadgets". |
| |
| * dom/Comment.cpp: |
| (WebCore::Comment::Comment): |
| (WebCore::Comment::setReadLength): |
| (WebCore::Comment::charCodeAt): |
| (WebCore::Comment::clflushReadLength): |
| * dom/Comment.h: |
| * dom/Comment.idl: |
| * page/RuntimeEnabledFeatures.cpp: |
| (WebCore::RuntimeEnabledFeatures::spectreGadgetsEnabled const): |
| * page/RuntimeEnabledFeatures.h: |
| |
| 2018-01-08 Said Abou-Hallawa <sabouhallawa@apple.com> |
| |
| A canvas should not be tainted if it draws a data URL SVGImage with a <foreignObject> |
| https://bugs.webkit.org/show_bug.cgi?id=180301 |
| |
| Reviewed by Dean Jackson. |
| |
| Don't taint the canvas if it draws a data URL SVGImage with a <foreignObject>. |
| There should not be a cross-origin data leak in this case. |
| |
| Tests: svg/as-image/svg-canvas-data-url-svg-with-feimage-not-tainted.html |
| svg/as-image/svg-canvas-data-url-svg-with-foreign-object-not-tainted.html |
| svg/as-image/svg-canvas-data-url-svg-with-image-not-tainted.html |
| |
| * html/ImageBitmap.cpp: |
| (WebCore::taintsOrigin): |
| * html/canvas/CanvasRenderingContext.cpp: |
| (WebCore::CanvasRenderingContext::wouldTaintOrigin): |
| |
| 2018-01-08 Don Olmstead <don.olmstead@sony.com> |
| |
| Simplify platform checks in Graphics Context |
| https://bugs.webkit.org/show_bug.cgi?id=181344 |
| |
| Reviewed by Alex Christensen. |
| |
| No new tests. No change in behavior. |
| |
| * platform/graphics/ANGLEWebKitBridge.h: |
| * platform/graphics/GLContext.h: |
| * platform/graphics/GraphicsContext3D.h: |
| * platform/graphics/OpenGLESShims.h: |
| * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp: |
| (WebCore::GraphicsContext3D::checkVaryingsPacking const): |
| |
| 2018-01-08 Zalan Bujtas <zalan@apple.com> |
| |
| [RenderTreeBuilder] Move SVG addChild logic to RenderTreeBuilder |
| https://bugs.webkit.org/show_bug.cgi?id=181405 |
| <rdar://problem/36360476> |
| |
| Reviewed by Antti Koivisto. |
| |
| This is about moving the code, no cleanup and/or normalization (unfortunately it also means |
| some temporary changes). |
| |
| No change in functionality. |
| |
| * Sources.txt: |
| * WebCore.xcodeproj/project.pbxproj: |
| * rendering/svg/RenderSVGContainer.cpp: |
| (WebCore::RenderSVGContainer::addChild): |
| * rendering/svg/RenderSVGInline.cpp: |
| (WebCore::RenderSVGInline::addChild): |
| * rendering/svg/RenderSVGRoot.cpp: |
| (WebCore::RenderSVGRoot::addChild): |
| * rendering/svg/RenderSVGText.cpp: |
| (WebCore::RenderSVGText::addChild): |
| * rendering/updating/RenderTreeBuilder.cpp: |
| (WebCore::RenderTreeBuilder::RenderTreeBuilder): |
| (WebCore::RenderTreeBuilder::insertChildToSVGContainer): |
| (WebCore::RenderTreeBuilder::insertChildToSVGInline): |
| (WebCore::RenderTreeBuilder::insertChildToSVGRoot): |
| (WebCore::RenderTreeBuilder::insertChildToSVGText): |
| * rendering/updating/RenderTreeBuilder.h: |
| (WebCore::RenderTreeBuilder::SVGBuilder): |
| * rendering/updating/RenderTreeBuilderSVG.cpp: Added. |
| (WebCore::RenderTreeBuilder::SVG::SVG): |
| (WebCore::RenderTreeBuilder::SVG::insertChild): |
| * rendering/updating/RenderTreeBuilderSVG.h: Added. |
| |
| 2018-01-08 John Wilander <wilander@apple.com> |
| |
| Storage Access API: Remove access for all frames under a page when the page is closed |
| https://bugs.webkit.org/show_bug.cgi?id=181398 |
| <rdar://problem/36357879> |
| |
| Reviewed by Alex Christensen. |
| |
| No new tests. Discussed with Alex Christensen and we concluded that |
| both a layout test and an API test would require a lot of work and |
| we have existing tests for clearing out storage access for frames. |
| |
| * platform/network/NetworkStorageSession.h: |
| * platform/network/cf/NetworkStorageSessionCFNet.cpp: |
| (WebCore::NetworkStorageSession::removeStorageAccessForAllFramesOnPage): |
| |
| 2018-01-08 Matt Lewis <jlewis3@apple.com> |
| |
| Unreviewed, rolling out r226385. |
| |
| The test introduced with this was a flaky since being added. |
| |
| Reverted changeset: |
| |
| "AX: when invert colors is on, double-invert certain media |
| elements in UserAgentStyleSheet" |
| https://bugs.webkit.org/show_bug.cgi?id=168447 |
| https://trac.webkit.org/changeset/226385 |
| |
| 2018-01-08 Youenn Fablet <youenn@apple.com> |
| |
| SWClientConnection should not keep references to service worker jobs |
| https://bugs.webkit.org/show_bug.cgi?id=181381 |
| |
| Reviewed by Chris Dumez. |
| |
| Difficult to test determiniscally but corresponding crash log should no longer happen in debug builds. |
| |
| Stopped passing ServiceWorkerJob references from ServiceWorkerContainer (potentially in service worker thread) to SWClientConnection (main thread). |
| Instead pass job identifiers and related data to the main thread. |
| |
| Minor refactoring to use ServiceWorkerJobIdentifier instead of ServiceWorkerJobDataIdentifier which contains more data than needed. |
| |
| * workers/service/SWClientConnection.cpp: |
| (WebCore::SWClientConnection::scheduleJob): |
| (WebCore::SWClientConnection::failedFetchingScript): |
| (WebCore::SWClientConnection::postTaskForJob): |
| (WebCore::SWClientConnection::jobRejectedInServer): |
| (WebCore::SWClientConnection::registrationJobResolvedInServer): |
| (WebCore::SWClientConnection::unregistrationJobResolvedInServer): |
| (WebCore::SWClientConnection::startScriptFetchForServer): |
| (WebCore::SWClientConnection::clearPendingJobs): |
| (WebCore::SWClientConnection::finishedFetchingScript): Deleted. |
| * workers/service/SWClientConnection.h: |
| * workers/service/ServiceWorkerContainer.cpp: |
| (WebCore::ServiceWorkerContainer::scheduleJob): |
| (WebCore::ServiceWorkerContainer::startScriptFetchForJob): |
| (WebCore::ServiceWorkerContainer::jobFinishedLoadingScript): |
| (WebCore::ServiceWorkerContainer::jobFailedLoadingScript): |
| * workers/service/ServiceWorkerContainer.h: |
| * workers/service/server/SWServer.cpp: |
| (WebCore::SWServer::rejectJob): |
| (WebCore::SWServer::resolveRegistrationJob): |
| (WebCore::SWServer::resolveUnregistrationJob): |
| (WebCore::SWServer::startScriptFetch): |
| * workers/service/server/SWServer.h: |
| |
| 2018-01-08 Wenson Hsieh <wenson_hsieh@apple.com> |
| |
| Copying, pasting, and then deleting an attachment element breaks attachment data requests |
| https://bugs.webkit.org/show_bug.cgi?id=181365 |
| <rdar://problem/36340647> |
| |
| Reviewed by Tim Horton. |
| |
| Currently, copying and pasting an attachment element within the same document and then deleting backwards to |
| remove the pasted attachment element causes the original attachment element to be inaccessible via SPI. This is |
| because there are now two different attachment elements with the same unique identifier, such that Document, |
| which keeps a map of all unique attachment identifiers to attachment elements, will lose track of the original |
| attachment element. |
| |
| To fix this, we ensure that attachment elements should always have unique identifiers when they are inserted |
| into the document. We make several small adjustments to accomplish this: |
| |
| 1. First, refactor HTMLAttachmentElement's unique identifier so that it no longer depends on the value of the |
| "webkitattachmentid" attribute, and is instead just a member of HTMLAttachmentElement that is not exposed to |
| DOM bindings. This means setting and querying an attachment element's uniqueIdentifier can be done without |
| triggering any side effects, such as layout or mutation events. |
| |
| 2. Next, make "webkitattachmentid" a temporary attribute similar to "webkitattachmentpath" and |
| "webkitattachmentbloburl", so that it is added only when generating a markup fragment for editing, and |
| removed upon deserialization. |
| |
| 3. Lastly, shift the responsibility of assigning a unique identifier to an attachment away from places where we |
| create attachment elements, and instead have Document enforce this when an attachment element is inserted. |
| |
| Tests: WKAttachmentTests.InsertAndRemoveDuplicateAttachment |
| WKAttachmentTests.InsertDuplicateAttachmentAndUpdateData |
| |
| * dom/Document.cpp: |
| (WebCore::Document::didInsertAttachmentElement): |
| |
| Assign the unique identifier of an attachment element that has been inserted. If the identifier already tracks |
| an existing attachment element in the document or is missing, reassign the identifier to a new value. |
| |
| * editing/cocoa/WebContentReaderCocoa.mm: |
| (WebCore::createFragmentForImageAttachment): |
| (WebCore::replaceRichContentWithAttachments): |
| (WebCore::WebContentReader::readFilePaths): |
| |
| Remove calls to setUniqueIdentifier here, since Document will assign a unique identifier upon insertion. |
| |
| * editing/markup.cpp: |
| (WebCore::StyledMarkupAccumulator::appendCustomAttributes): |
| (WebCore::createFragmentFromMarkup): |
| |
| Set the attachment's unique identifier to the value of the "webkitattachmentid" attribute. When moving existing |
| attachments around in the DOM without duplication, this ensures that the attachment will be removed and |
| reinserted in the document without triggering removal and insertion client delegate methods. |
| |
| When pasting an attachment element that has the same identifier as an existing attachment, we let Document |
| realize that the attachment identifier already exists, and reassign it to a unique value. |
| |
| * html/HTMLAttachmentElement.cpp: |
| (WebCore::HTMLAttachmentElement::uniqueIdentifier const): Deleted. |
| (WebCore::HTMLAttachmentElement::setUniqueIdentifier): Deleted. |
| * html/HTMLAttachmentElement.h: |
| |
| 2018-01-08 Zalan Bujtas <zalan@apple.com> |
| |
| [RenderTreeBuilder] Move RenderBlockFlow addChild logic to RenderTreeBuilder |
| https://bugs.webkit.org/show_bug.cgi?id=181348 |
| <rdar://problem/36328117> |
| |
| Reviewed by Antti Koivisto. |
| |
| This is about moving the code, no cleanup and/or normalization (unfortunately it also means |
| some temporary changes). |
| |
| No change in functionality. |
| |
| * Sources.txt: |
| * WebCore.xcodeproj/project.pbxproj: |
| * rendering/RenderBlockFlow.cpp: |
| (WebCore::RenderBlockFlow::addChild): |
| * rendering/updating/RenderTreeBuilder.cpp: |
| (WebCore::RenderTreeBuilder::RenderTreeBuilder): |
| (WebCore::RenderTreeBuilder::insertChildToRenderBlockFlow): |
| * rendering/updating/RenderTreeBuilder.h: |
| (WebCore::RenderTreeBuilder::blockFlowBuilder): |
| * rendering/updating/RenderTreeBuilderBlockFlow.cpp: Added. |
| (WebCore::RenderTreeBuilder::BlockFlow::BlockFlow): |
| (WebCore::RenderTreeBuilder::BlockFlow::insertChild): |
| * rendering/updating/RenderTreeBuilderBlockFlow.h: Added. |
| |
| 2018-01-08 Youenn Fablet <youenn@apple.com> |
| |
| Add CSP support to service workers |
| https://bugs.webkit.org/show_bug.cgi?id=181385 |
| |
| Reviewed by Chris Dumez. |
| |
| Covered by rebased tests. |
| |
| Added recovery of CSP information from WorkerScriptLoader. |
| Added plumbing to pass the CSP information to Service Workers. |
| Added persistency support for the CSP information. |
| |
| * workers/WorkerScriptLoader.cpp: |
| (WebCore::WorkerScriptLoader::loadAsynchronously): |
| (WebCore::WorkerScriptLoader::didReceiveResponse): |
| * workers/WorkerScriptLoader.h: |
| (WebCore::WorkerScriptLoader::contentSecurityPolicy const): |
| * workers/service/SWClientConnection.cpp: |
| (WebCore::SWClientConnection::finishedFetchingScript): |
| (WebCore::SWClientConnection::failedFetchingScript): |
| * workers/service/SWClientConnection.h: |
| * workers/service/ServiceWorkerContainer.cpp: |
| (WebCore::ServiceWorkerContainer::addRegistration): |
| (WebCore::ServiceWorkerContainer::jobFailedWithException): |
| (WebCore::ServiceWorkerContainer::jobResolvedWithRegistration): |
| (WebCore::ServiceWorkerContainer::jobFinishedLoadingScript): |
| * workers/service/ServiceWorkerContainer.h: |
| * workers/service/ServiceWorkerContextData.cpp: |
| (WebCore::ServiceWorkerContextData::isolatedCopy const): |
| * workers/service/ServiceWorkerContextData.h: |
| (WebCore::ServiceWorkerContextData::encode const): |
| (WebCore::ServiceWorkerContextData::decode): |
| * workers/service/ServiceWorkerFetchResult.h: |
| (WebCore::ServiceWorkerFetchResult::encode const): |
| (WebCore::ServiceWorkerFetchResult::decode): |
| * workers/service/ServiceWorkerGlobalScope.cpp: |
| (WebCore::ServiceWorkerGlobalScope::create): |
| * workers/service/ServiceWorkerGlobalScope.h: |
| * workers/service/ServiceWorkerJob.cpp: |
| (WebCore::ServiceWorkerJob::notifyFinished): |
| * workers/service/ServiceWorkerJobClient.h: |
| * workers/service/context/ServiceWorkerThread.cpp: |
| (WebCore::ServiceWorkerThread::ServiceWorkerThread): |
| (WebCore::ServiceWorkerThread::createWorkerGlobalScope): |
| * workers/service/server/RegistrationDatabase.cpp: |
| (WebCore::v1RecordsTableSchema): |
| (WebCore::RegistrationDatabase::openSQLiteDatabase): |
| (WebCore::RegistrationDatabase::doPushChanges): |
| (WebCore::RegistrationDatabase::importRecords): |
| * workers/service/server/SWServer.cpp: |
| (WebCore::SWServer::updateWorker): |
| (WebCore::SWServer::installContextData): |
| * workers/service/server/SWServer.h: |
| * workers/service/server/SWServerJobQueue.cpp: |
| (WebCore::SWServerJobQueue::scriptFetchFinished): |
| * workers/service/server/SWServerWorker.cpp: |
| (WebCore::SWServerWorker::SWServerWorker): |
| (WebCore::m_contentSecurityPolicy): |
| (WebCore::SWServerWorker::contextData const): |
| * workers/service/server/SWServerWorker.h: |
| |
| 2018-01-08 Youenn Fablet <youenn@apple.com> |
| |
| Use no-cache fetch mode when loading main documents with location.reload() |
| https://bugs.webkit.org/show_bug.cgi?id=181285 |
| |
| Reviewed by Alex Christensen. |
| |
| Covered by rebased tests. |
| |
| Start to translate cache policy used for navigation as FetchOptions::Cache. |
| This allows ensuring service workers receive the right cache mode when intercepting navigation loads. |
| To not change current navigation behavior, ReturnCacheDataElseLoad and ReturnCacheDataDontLoad still trigger default fetch cache mode. |
| |
| For Reload and ReloadExpiredOnly frame load types, using no-cache mode is more efficient than reload mode, |
| as a conditional request will be sent if possible. This applies to location.reload which is consistent with other browsers. |
| Keep reload mode for ReloadFromOrigin. |
| |
| * loader/DocumentLoader.cpp: |
| (WebCore::toFetchOptionsCache): |
| (WebCore::DocumentLoader::loadMainResource): |
| * loader/FrameLoader.cpp: |
| (WebCore::FrameLoader::loadFrameRequest): |
| (WebCore::FrameLoader::loadURL): |
| (WebCore::FrameLoader::load): |
| (WebCore::FrameLoader::reload): |
| (WebCore::FrameLoader::defaultRequestCachingPolicy): |
| (WebCore::FrameLoader::loadDifferentDocumentItem): |
| * loader/NavigationScheduler.cpp: |
| |
| 2018-01-08 Youenn Fablet <youenn@apple.com> |
| |
| Stop exposing fetch and extendable events to window |
| https://bugs.webkit.org/show_bug.cgi?id=181325 |
| |
| Reviewed by Chris Dumez. |
| |
| Covered by updated tests. |
| |
| Marked FetchEvent and ExtendableEvent as visible in ServiceWorker environments only. |
| Moved related Internals testing routines to ServiceWorkerInternals. |
| |
| * testing/Internals.cpp: |
| (WebCore::Internals::waitForFetchEventToFinish): Deleted. |
| (WebCore::Internals::createBeingDispatchedFetchEvent): Deleted. |
| * testing/Internals.h: |
| * testing/Internals.idl: |
| * testing/ServiceWorkerInternals.cpp: |
| (WebCore::ServiceWorkerInternals::waitForFetchEventToFinish): |
| (WebCore::ServiceWorkerInternals::createBeingDispatchedFetchEvent): |
| * testing/ServiceWorkerInternals.h: |
| * testing/ServiceWorkerInternals.idl: |
| * workers/service/ExtendableEvent.idl: |
| * workers/service/FetchEvent.idl: |
| |
| 2018-01-08 Antti Koivisto <antti@apple.com> |
| |
| REGRESSION (r219145): Toggling layer borders on a static document no longer works immediately |
| https://bugs.webkit.org/show_bug.cgi?id=176260 |
| <rdar://problem/34219966> |
| |
| Reviewed by Simon Fraser. |
| |
| Optimization reveled bugs in debug indicator painting. |
| |
| Test: compositing/debug-borders-dynamic.html |
| |
| * platform/graphics/ca/GraphicsLayerCA.cpp: |
| (WebCore::GraphicsLayerCA::commitLayerChangesBeforeSublayers): |
| (WebCore::GraphicsLayerCA::updateDebugIndicators): |
| (WebCore::GraphicsLayerCA::updateDebugBorder): Deleted. |
| |
| - Rename to indicate this is not just about debug borders. |
| - Trigger display so repaint counters get painted. This helper is only called when the indicators change. |
| |
| * platform/graphics/ca/GraphicsLayerCA.h: |
| * rendering/RenderLayerCompositor.cpp: |
| (WebCore::RenderLayerCompositor::cacheAcceleratedCompositingFlags): |
| |
| Ensure we do compositing update on debug border change even when there is no layout. |
| |
| 2018-01-08 Zalan Bujtas <zalan@apple.com> |
| |
| [RenderTreeBuilder] Move RenderInline addChild logic to RenderTreeBuilder |
| https://bugs.webkit.org/show_bug.cgi?id=181336 |
| <rdar://problem/36324693> |
| |
| Reviewed by Antti Koivisto. |
| |
| This is about moving the code, no cleanup and/or normalization (unfortunately it also means |
| some temporary changes). |
| |
| No change in functionality. |
| |
| * Sources.txt: |
| * WebCore.xcodeproj/project.pbxproj: |
| * rendering/RenderInline.cpp: |
| (WebCore::RenderInline::addChild): |
| (WebCore::RenderInline::addChildIgnoringContinuation): |
| (WebCore::RenderInline::childBecameNonInline): |
| (WebCore::nextContinuation): Deleted. |
| (WebCore::RenderInline::continuationBefore): Deleted. |
| (WebCore::newChildIsInline): Deleted. |
| (WebCore::RenderInline::cloneAsContinuation const): Deleted. |
| (WebCore::RenderInline::splitInlines): Deleted. |
| (WebCore::RenderInline::splitFlow): Deleted. |
| (WebCore::canUseAsParentForContinuation): Deleted. |
| (WebCore::RenderInline::addChildToContinuation): Deleted. |
| * rendering/RenderInline.h: |
| * rendering/updating/RenderTreeBuilder.cpp: |
| (WebCore::RenderTreeBuilder::RenderTreeBuilder): |
| (WebCore::RenderTreeBuilder::insertChildToRenderInline): |
| (WebCore::RenderTreeBuilder::insertChildToRenderInlineIgnoringContinuation): |
| (WebCore::RenderTreeBuilder::splitFlow): |
| * rendering/updating/RenderTreeBuilder.h: |
| (WebCore::RenderTreeBuilder::inlineBuilder): |
| * rendering/updating/RenderTreeBuilderInline.cpp: Added. |
| (WebCore::canUseAsParentForContinuation): |
| (WebCore::nextContinuation): |
| (WebCore::continuationBefore): |
| (WebCore::cloneAsContinuation): |
| (WebCore::newChildIsInline): |
| (WebCore::inFlowPositionedInlineAncestor): |
| (WebCore::RenderTreeBuilder::Inline::Inline): |
| (WebCore::RenderTreeBuilder::Inline::insertChild): |
| (WebCore::RenderTreeBuilder::Inline::insertChildToContinuation): |
| (WebCore::RenderTreeBuilder::Inline::insertChildIgnoringContinuation): |
| (WebCore::RenderTreeBuilder::Inline::splitFlow): |
| (WebCore::RenderTreeBuilder::Inline::splitInlines): |
| * rendering/updating/RenderTreeBuilderInline.h: Added. |
| |
| 2018-01-08 Zalan Bujtas <zalan@apple.com> |
| |
| [RenderTreeBuilder] Move RenderBlock addChild logic to RenderTreeBuilder |
| https://bugs.webkit.org/show_bug.cgi?id=181319 |
| <rdar://problem/36313464> |
| |
| Reviewed by Antti Koivisto. |
| |
| This is about moving the code, no cleanup and/or normalization (unfortunately it also means |
| some temporary changes). |
| |
| No change in functionality. |
| |
| * Sources.txt: |
| * WebCore.xcodeproj/project.pbxproj: |
| * rendering/RenderBlock.cpp: |
| (WebCore::RenderBlock::addChild): |
| (WebCore::RenderBlock::addChildIgnoringContinuation): |
| (WebCore::RenderBlock::childBecameNonInline): |
| (WebCore::RenderBlock::continuationBefore): Deleted. |
| (WebCore::RenderBlock::addChildToContinuation): Deleted. |
| (WebCore::getInlineRun): Deleted. |
| (WebCore::RenderBlock::makeChildrenNonInline): Deleted. |
| * rendering/RenderBlock.h: |
| * rendering/RenderBox.cpp: |
| (WebCore::markBoxForRelayoutAfterSplit): Deleted. |
| (WebCore::RenderBox::splitAnonymousBoxesAroundChild): Deleted. |
| * rendering/RenderBox.h: |
| * rendering/RenderRubyBase.cpp: |
| (WebCore::RenderRubyBase::moveChildren): |
| (WebCore::RenderRubyBase::moveBlockChildren): |
| * rendering/RenderTable.cpp: |
| (WebCore::RenderTable::addChild): |
| * rendering/RenderTableRow.cpp: |
| (WebCore::RenderTableRow::addChild): |
| * rendering/RenderTableSection.cpp: |
| (WebCore::RenderTableSection::addChild): |
| * rendering/updating/RenderTreeBuilder.cpp: |
| (WebCore::markBoxForRelayoutAfterSplit): |
| (WebCore::getInlineRun): |
| (WebCore::RenderTreeBuilder::RenderTreeBuilder): |
| (WebCore::RenderTreeBuilder::insertChildToRenderBlock): |
| (WebCore::RenderTreeBuilder::insertChildToRenderBlockIgnoringContinuation): |
| (WebCore::RenderTreeBuilder::makeChildrenNonInline): |
| (WebCore::RenderTreeBuilder::splitAnonymousBoxesAroundChild): |
| * rendering/updating/RenderTreeBuilder.h: |
| (WebCore::RenderTreeBuilder::blockBuilder): |
| * rendering/updating/RenderTreeBuilderBlock.cpp: Added. |
| (WebCore::continuationBefore): |
| (WebCore::RenderTreeBuilder::Block::Block): |
| (WebCore::RenderTreeBuilder::Block::insertChild): |
| (WebCore::RenderTreeBuilder::Block::insertChildToContinuation): |
| (WebCore::RenderTreeBuilder::Block::insertChildIgnoringContinuation): |
| * rendering/updating/RenderTreeBuilderBlock.h: Added. |
| |
| 2018-01-08 Jeremy Jones <jeremyj@apple.com> |
| |
| Standard controls sometimes say video is in pip when it isnt. |
| https://bugs.webkit.org/show_bug.cgi?id=181095 |
| rdar://problem/36182687 |
| |
| Reviewed by Eric Carlson. |
| |
| * html/HTMLMediaElement.cpp: |
| (WebCore::HTMLMediaElement::exitFullscreen): |
| |
| 2018-01-08 Jer Noble <jer.noble@apple.com> |
| |
| REGRESSION: [iOS] ASSERTION FAILED: !node.isConnected() in WebCore::notifyNodeInsertedIntoDocument |
| https://bugs.webkit.org/show_bug.cgi?id=181091 |
| |
| Reviewed by Darin Adler. |
| |
| Move the work previously performed in insertedIntoAncestor() into didFinishInsertingNode(). |
| |
| * html/HTMLMediaElement.cpp: |
| (WebCore::HTMLMediaElement::prepareForLoad): |
| |
| 2018-01-08 Zan Dobersek <zdobersek@igalia.com> |
| |
| [Cairo] Use isolated fill and stroke source containers |
| https://bugs.webkit.org/show_bug.cgi?id=181386 |
| |
| Reviewed by Carlos Garcia Campos. |
| |
| Generate fill and stroke source objects upon invocation of various Cairo |
| operations, initializing necessary data from the GraphicsContextState |
| object. |
| |
| Cairo::FillSource and Cairo::StrokeSource structs are introduced, both |
| being default-constructible as well as providing a constructor that |
| accepts a GraphicsContextState object from which the appropriate |
| resources are created. |
| |
| The FillSource and StrokeSource objects are then passed to |
| PlatformContextCairo's prepareForFilling() and prepareForStroking() |
| methods. Here the helper prepareCairoContextSource() function is now |
| invoked with cairo_pattern_t objects as pattern or gradient sources, or |
| the source color if neither cairo_pattern_t object is specified. |
| |
| The FillSource and StrokeSource constructors mimic the previous behavior |
| of prepareCairoContextSource(). In case the source is a Pattern object, |
| a cairo_pattern_t object is created from that. In case of FillSource, |
| we also retrieve pattern size, transform and repetition information. In |
| case the source os a Gradient object, we create a 'base' cairo_pattern_t |
| object for a completely opaque alpha channel. Additionally, if the alpha |
| value on the state is not 1, we create an alpha-adjusted cairo_pattern_t |
| that is potentially used for any filling or stroking operation that has |
| to preserve transparency. If neither Pattern or Gradient objects are set |
| on the GraphicsContextState, we default to the current fill or stroke |
| color. |
| |
| Overall, there's no change in behavior, this is simply a refactoring |
| that enables us to construct Cairo objects for filling and stroking |
| sources at the time of Cairo operation dispatch, instead of pulling down |
| GraphicsContextState deeper into the Cairo-specific code. |
| |
| No new tests -- no change in functionality. |
| |
| * platform/graphics/cairo/CairoOperations.cpp: |
| (WebCore::Cairo::drawPathShadow): |
| (WebCore::Cairo::fillCurrentCairoPath): |
| (WebCore::Cairo::FillSource::FillSource): |
| (WebCore::Cairo::StrokeSource::StrokeSource): |
| (WebCore::Cairo::fillRect): |
| (WebCore::Cairo::fillRectWithRoundedHole): |
| (WebCore::Cairo::fillPath): |
| (WebCore::Cairo::strokeRect): |
| (WebCore::Cairo::strokePath): |
| (WebCore::Cairo::drawGlyphs): |
| * platform/graphics/cairo/CairoOperations.h: |
| * platform/graphics/cairo/FontCairo.cpp: |
| (WebCore::FontCascade::drawGlyphs): |
| * platform/graphics/cairo/GraphicsContextCairo.cpp: |
| (WebCore::GraphicsContext::fillPath): |
| (WebCore::GraphicsContext::strokePath): |
| (WebCore::GraphicsContext::fillRect): |
| (WebCore::GraphicsContext::strokeRect): |
| (WebCore::GraphicsContext::fillRectWithRoundedHole): |
| * platform/graphics/cairo/PlatformContextCairo.cpp: |
| (WebCore::prepareCairoContextSource): |
| (WebCore::PlatformContextCairo::prepareForFilling): |
| (WebCore::PlatformContextCairo::prepareForStroking): |
| (WebCore::PlatformContextCairo::clipForPatternFilling): |
| * platform/graphics/cairo/PlatformContextCairo.h: |
| |
| 2018-01-08 Youenn Fablet <youenn@apple.com> |
| |
| navigator.onLine does not work inside service workers |
| https://bugs.webkit.org/show_bug.cgi?id=181079 |
| <rdar://problem/36178606> |
| |
| Reviewed by Darin Adler. |
| |
| Test: http/wpt/service-workers/online.https.html |
| |
| Added support for onLine by reusing a similar implementation as regular workers. |
| Added ServiceWorkerInternals as an interface for an object exposed as self.internals in WTR. |
| This object has currently one method to trigger change in the online/offline status. |
| This allows writing a test for the onLine feature. |
| |
| Note that self.internals is inserted asynchronously after the script was evaluated. |
| When writing a worker script using self.internals, one must make sure to use self.internals when initialized. |
| online-worker.js for instance makes use of self.internals in a postMessage callback. |
| |
| * CMakeLists.txt: |
| * DerivedSources.make: |
| * WebCore.xcodeproj/project.pbxproj: |
| * bindings/js/WorkerScriptController.h: |
| * dom/ScriptExecutionContext.h: |
| * testing/ServiceWorkerInternals.cpp: Added. |
| (WebCore::ServiceWorkerInternals::ServiceWorkerInternals): |
| (WebCore::ServiceWorkerInternals::setOnline): |
| * testing/ServiceWorkerInternals.h: Added. |
| * testing/ServiceWorkerInternals.idl: Added. |
| * testing/js/WebCoreTestSupport.cpp: |
| (WebCoreTestSupport::setupNewlyCreateServiceWorker): |
| * testing/js/WebCoreTestSupport.h: |
| * workers/service/context/SWContextManager.cpp: |
| (WebCore::SWContextManager::registerServiceWorkerThreadForInstall): |
| (WebCore::SWContextManager::startedServiceWorker): |
| * workers/service/context/SWContextManager.h: |
| (WebCore::SWContextManager::setServiceWorkerCreationCallback): |
| (WebCore::SWContextManager::workerByID): |
| * workers/service/context/ServiceWorkerThread.cpp: |
| (WebCore::ServiceWorkerThread::ServiceWorkerThread): |
| * workers/service/context/ServiceWorkerThreadProxy.cpp: |
| (WebCore::ServiceWorkerThreadProxy::ServiceWorkerThreadProxy): |
| (WebCore::ServiceWorkerThreadProxy::~ServiceWorkerThreadProxy): |
| (WebCore::ServiceWorkerThreadProxy::networkStateChanged): |
| (WebCore::ServiceWorkerThreadProxy::notifyNetworkStateChange): |
| * workers/service/context/ServiceWorkerThreadProxy.h: |
| |
| 2018-01-08 Zan Dobersek <zdobersek@igalia.com> |
| |
| [Cairo] Contain shadow blur requirement state in a separate object |
| https://bugs.webkit.org/show_bug.cgi?id=181380 |
| |
| Reviewed by Carlos Garcia Campos. |
| |
| Instead of picking up the necessary state parameters from a |
| GraphicsContextState object, store the necessary parameters in a helper |
| ShadowBlurUsage struct. Mimicking the mustUseShadowBlur() function that |
| is being removed, values of the shadow color, shadow blur, and shadow |
| transform ignorance are stored there. Additionally, the required() |
| method accepts a PlatformContextCairo object through which it can |
| retrieve the current CTM and determine whether it's an identity, finally |
| deciding whether shadow blur can or cannot be ignored. |
| |
| Goal of this change is to limit usage of GraphicsContextState directly |
| in operations implemented inside the Cairo namespace. Instead, the |
| state parameters should be passed directly, or an equivalent but limited |
| state object should be constructed for invocation of such operations. |
| |
| This is likely only an intermediate solution. It's possible it will be |
| replaced by a more complete shadow state struct that would be used for |
| any operation that is required to draw shadows, if necessary. |
| |
| No new tests -- no change in functionality. |
| |
| * platform/graphics/cairo/CairoOperations.cpp: |
| (WebCore::Cairo::drawGlyphsShadow): |
| (WebCore::Cairo::ShadowBlurUsage::ShadowBlurUsage): |
| (WebCore::Cairo::ShadowBlurUsage::required const): |
| (WebCore::Cairo::fillRectWithRoundedHole): |
| (WebCore::Cairo::drawGlyphs): |
| (WebCore::Cairo::mustUseShadowBlur): Deleted. |
| * platform/graphics/cairo/CairoOperations.h: |
| * platform/graphics/cairo/FontCairo.cpp: |
| (WebCore::FontCascade::drawGlyphs): |
| * platform/graphics/cairo/GraphicsContextCairo.cpp: |
| (WebCore::GraphicsContext::fillRectWithRoundedHole): |
| |
| 2018-01-08 Philippe Normand <pnormand@igalia.com> |
| |
| [GStreamer][Soup] Remove dead getCreateOrReadBuffer code path |
| https://bugs.webkit.org/show_bug.cgi?id=181376 |
| |
| Reviewed by Carlos Garcia Campos. |
| |
| This code path is no longer used now that the GStreamer HTTP |
| source element uses data coming directly from the network process. |
| |
| * SourcesGTK.txt: |
| * SourcesWPE.txt: |
| * loader/MediaResourceLoader.cpp: |
| (WebCore::MediaResource::getOrCreateReadBuffer): Deleted. |
| * loader/MediaResourceLoader.h: |
| * loader/SubresourceLoader.h: |
| * loader/cache/CachedRawResource.h: |
| * loader/cache/CachedRawResourceClient.h: |
| (WebCore::CachedRawResourceClient::finishedTimingForWorkerLoad): |
| (WebCore::CachedRawResourceClient::getOrCreateReadBuffer): Deleted. |
| * loader/cache/CachedResource.h: |
| (WebCore::CachedResource::getOrCreateReadBuffer): Deleted. |
| * loader/soup/CachedRawResourceSoup.cpp: Removed. |
| * loader/soup/SubresourceLoaderSoup.cpp: Removed. |
| * platform/graphics/PlatformMediaResourceLoader.h: |
| (WebCore::PlatformMediaResourceClient::loadFinished): |
| (WebCore::PlatformMediaResourceClient::getOrCreateReadBuffer): Deleted. |
| * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp: |
| (CachedResourceStreamingClient::getOrCreateReadBuffer): Deleted. |
| * platform/network/ResourceHandleClient.h: |
| (WebCore::ResourceHandleClient::getOrCreateReadBuffer): Deleted. |
| * platform/network/soup/ResourceHandleSoup.cpp: |
| (WebCore::ResourceHandle::ensureReadBuffer): |
| |
| 2018-01-08 Zan Dobersek <zdobersek@igalia.com> and Carlos Garcia Campos <cgarcia@igalia.com> |
| |
| [GStreamer] use FastMalloc-based GstAllocator |
| https://bugs.webkit.org/show_bug.cgi?id=165793 |
| |
| Reviewed by Philippe Normand. |
| |
| Add GstAllocatorFastMalloc, a GstAllocator implementation using fast malloc. It's only used when fast malloc is |
| enabled and can be disabled using an environment variable for debugging purposes. |
| |
| * platform/GStreamer.cmake: |
| * platform/graphics/gstreamer/GStreamerUtilities.cpp: |
| (WebCore::initializeGStreamer): |
| * platform/graphics/gstreamer/GstAllocatorFastMalloc.cpp: Added. |
| (gstMemoryFastMallocNew): |
| (gstAllocatorFastMallocAlloc): |
| (gstAllocatorFastMallocFree): |
| (gstAllocatorFastMallocMemMap): |
| (gstAllocatorFastMallocMemUnmap): |
| (gstAllocatorFastMallocMemCopy): |
| (gstAllocatorFastMallocMemShare): |
| (gstAllocatorFastMallocMemIsSpan): |
| (gst_allocator_fast_malloc_class_init): |
| (gst_allocator_fast_malloc_init): |
| * platform/graphics/gstreamer/GstAllocatorFastMalloc.h: Added. |
| |
| 2018-01-07 Ms2ger <Ms2ger@igalia.com> |
| |
| Implement createImageBitmap(ImageBitmap) |
| https://bugs.webkit.org/show_bug.cgi?id=181287 |
| |
| Reviewed by Darin Adler. |
| |
| Tests: imported/w3c/web-platform-tests/2dcontext/imagebitmap/createImageBitmap-drawImage.html |
| imported/w3c/web-platform-tests/2dcontext/imagebitmap/createImageBitmap-invalid-args.html |
| |
| * html/ImageBitmap.cpp: |
| (WebCore::ImageBitmap::createPromise): |
| |
| 2018-01-07 Ryosuke Niwa <rniwa@webkit.org> |
| |
| Reduce the precision of "high" resolution time to 1ms |
| https://bugs.webkit.org/show_bug.cgi?id=180910 |
| <rdar://problem/36085943> |
| |
| Reviewed by Saam Barati. |
| |
| Reduced the high prevision time's resolution to 1ms, the same precision as Date.now(). |
| |
| Also fixed the bug in fillRTCStats that we weren't reducing the time resolution in RTCStats dictionaries. |
| |
| * Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp: |
| (WebCore::fillRTCStats): |
| * page/Performance.cpp: |
| (WebCore::Performance::reduceTimeResolution): |
| |
| 2018-01-06 Simon Fraser <simon.fraser@apple.com> |
| |
| Possible crash computing event regions |
| https://bugs.webkit.org/show_bug.cgi?id=181368 |
| rdar://problem/34847081 |
| |
| Reviewed by Zalan Bujtas. |
| |
| Don't trigger layout in Element::absoluteEventHandlerBounds(), since this can run arbirary script |
| which might delete elements or re-enter Document::absoluteRegionForEventTargets(). |
| |
| It's OK to not trigger layout, because if layout is dirty, the next layout will update event regions again. |
| |
| Add a LayoutDisallowedScope to check that Document::absoluteRegionForEventTargets() doesn't |
| trigger layout, and move the check for LayoutDisallowedScope::isLayoutAllowed() from Document::updateLayout() |
| to LayoutContext::layout(), since some layouts don't happen via the former (e.g. the one being removed here). |
| |
| The test checks that the assertion does not fire. I was not able to get a reliable test for any crash. |
| |
| Test: fast/events/event-handler-regions-layout.html |
| |
| * dom/Document.cpp: |
| (WebCore::Document::updateLayout): |
| (WebCore::Document::absoluteRegionForEventTargets): |
| * dom/Element.cpp: |
| (WebCore::Element::absoluteEventHandlerBounds): |
| * page/LayoutContext.cpp: |
| (WebCore::LayoutContext::layout): |
| * rendering/LayoutDisallowedScope.h: Move the #ifdefs around to avoid defining the enum twice. |
| (WebCore::LayoutDisallowedScope::LayoutDisallowedScope): |
| (WebCore::LayoutDisallowedScope::isLayoutAllowed): |
| |
| 2018-01-06 Simon Fraser <simon.fraser@apple.com> |
| |
| Crash under RenderLayer::scrollTo() with marquee |
| https://bugs.webkit.org/show_bug.cgi?id=181349 |
| rdar://problem/36190168 |
| |
| Reviewed by Zalan Bujtas. |
| |
| Don't call updateWidgetPositions() synchonously during RenderLayer scrolling, because it |
| can run arbitrary script which may trigger destruction of this RenderLayer. |
| |
| Instead, queue up updateWidgetPositions() on a zero-delay timer. |
| |
| Under some circumstances this may allow a paint to occur before the widgets have been |
| updated (which could be fixed with a more invasive change), but in practice I saw no |
| painting issues with plug-ins or iframes inside overflow scroll, in WebKit or LegacyWebKit. |
| |
| Test: fast/scrolling/marquee-scroll-crash.html |
| |
| * page/FrameView.cpp: |
| (WebCore::FrameView::FrameView): |
| (WebCore::FrameView::updateWidgetPositions): |
| (WebCore::FrameView::scheduleUpdateWidgetPositions): |
| (WebCore::FrameView::updateWidgetPositionsTimerFired): |
| * page/FrameView.h: |
| * rendering/RenderLayer.cpp: |
| (WebCore::RenderLayer::scrollTo): |
| |
| 2018-01-05 Dean Jackson <dino@apple.com> |
| |
| Accurately clip copyTexImage2D and copyTexSubImage2D |
| https://bugs.webkit.org/show_bug.cgi?id=181356 |
| <rdar://problem/35083877> |
| |
| Reviewed by Eric Carlson. |
| |
| The code to make sure copyTexSubImage2D and copyTexImage2D will not try to read |
| out of bounds had a bad bug introduced here: |
| https://bugs.webkit.org/show_bug.cgi?id=51421 |
| |
| With appropriate parameters, it would produce a rectangle with |
| negative dimensions. Most GL drivers just ignored this, but some |
| are not happy. |
| |
| Test: fast/canvas/webgl/copy-tex-image-and-sub-image-2d-bad-input.html |
| |
| * html/canvas/WebGLRenderingContextBase.cpp: |
| (WebCore::clip2D): Reimplement this in a more sane manner, and use |
| checked arithmetic while here. |
| * html/canvas/WebGLRenderingContextBase.h: |
| (WebCore::clip1D): Deleted. |
| (WebCore::clip2D): Deleted. |
| |
| 2018-01-06 Antti Koivisto <antti@apple.com> |
| |
| Use WeakPtr for RenderTreePosition::m_nextSibling |
| https://bugs.webkit.org/show_bug.cgi?id=181363 |
| |
| Reviewed by Zalan Bujtas. |
| |
| For safety. In most cases it is null and won't cause us to instantiate WeakReferences for |
| many new objects. |
| |
| * rendering/updating/RenderTreePosition.cpp: |
| (WebCore::RenderTreePosition::computeNextSibling): |
| * rendering/updating/RenderTreePosition.h: |
| (WebCore::RenderTreePosition::RenderTreePosition): |
| (WebCore::RenderTreePosition::nextSibling const): |
| |
| 2018-01-05 David Kilzer <ddkilzer@apple.com> |
| |
| Re-enable -Wcast-qual in WebCore for Apple ports |
| <https://webkit.org/b/177895> |
| <rdar://problem/34960830> |
| |
| Reviewed by Joseph Pecoraro. |
| |
| * Configurations/Base.xcconfig: |
| (WARNING_CFLAGS): Remove FIXME and add -Wcast-qual back to |
| arguments. |
| |
| * crypto/mac/SerializedCryptoKeyWrapMac.mm: |
| (WebCore::createAndStoreMasterKey): |
| - Use checked_cf_cast<SecACLRef>(). |
| |
| * editing/cocoa/DataDetection.mm: |
| (WebCore::detectItemAtPositionWithRange): |
| - Manually cast CFTypeRef to DDResultRef until |
| DDResultGetTypeID() is available as SPI. |
| |
| * platform/gamepad/mac/HIDGamepad.cpp: |
| (WebCore::HIDGamepad::initElementsFromArray): |
| - Use checked_cf_cast<IOHIDElementRef>(). |
| |
| * platform/graphics/avfoundation/objc/MediaSampleAVFObjC.mm: |
| (WebCore::MediaSampleAVFObjC::createImageSample): |
| (WebCore::CMSampleBufferIsRandomAccess): |
| (WebCore::CMSampleBufferIsNonDisplaying): |
| (WebCore::MediaSampleAVFObjC::createNonDisplayingCopy const): |
| - Use checked_cf_cast<CFMutableDictionaryRef>() and |
| checked_cf_cast<CFDictionaryRef>(). |
| |
| * platform/graphics/cocoa/IOSurface.h: |
| (WebCore::IOSurface::asLayerContents): |
| - Use reinterpret_cast<id>() to cast from IOSurfaceRef to id. |
| |
| * platform/graphics/cocoa/WebCoreDecompressionSession.mm: |
| (WebCore::WebCoreDecompressionSession::getFirstVideoFrame): |
| (WebCore::WebCoreDecompressionSession::automaticDequeue): |
| (WebCore::WebCoreDecompressionSession::imageForTime): |
| (WebCore::WebCoreDecompressionSession::getDecodeTime): |
| (WebCore::WebCoreDecompressionSession::getPresentationTime): |
| (WebCore::WebCoreDecompressionSession::getDuration): |
| - Use checked_cf_cast<CMSampleBufferRef>(). |
| |
| * platform/graphics/Font.h: |
| (WebCore::Font::m_kernedCFStringAttributes): |
| (WebCore::Font::m_nonKernedCFStringAttributes): |
| - Change type from RetainPtr<CFDictionaryRef> to |
| RetainPtr<CFMutableDictionaryRef> since that's what they are. |
| * platform/graphics/mac/SimpleFontDataCoreText.cpp: |
| (WebCore::Font::getCFStringAttributes const): |
| - Replace local `mutableAttributes` variable with |
| `attributesDictionary.get()` since it returns the correct type |
| now. |
| |
| * platform/ios/wak/WAKView.mm: |
| (-[WAKView _initWithViewRef:]): |
| (_WAKCopyWrapper): |
| * platform/ios/wak/WKView.mm: |
| (_WKViewClearSuperview): |
| (WKViewFirstChild): |
| (WKViewNextSibling): |
| - Use static_cast<WKViewRef>(const_cast<void*>()) to convert |
| const void* variable to WKViewRef. |
| |
| * platform/mac/PasteboardMac.mm: |
| (WebCore::flipImageSpec): |
| (WebCore::setDragImageImpl): |
| - Use const_cast<> to remove 'const' modifier from |
| unsigned char pointers. This regressed while -Wcast-qual was |
| disabled for WebCore. |
| |
| * platform/mac/SSLKeyGeneratorMac.mm: |
| (WebCore::signedPublicKeyAndChallengeString): |
| - Use checked_cf_cast<SecACLRef>(). |
| |
| * platform/mediastream/mac/RealtimeIncomingVideoSourceCocoa.cpp: |
| (WebCore::RealtimeIncomingVideoSourceCocoa::OnFrame): |
| - Use checked_cf_cast<CFMutableDictionaryRef>(). |
| |
| * platform/network/cf/SocketStreamHandleImplCFNet.cpp: |
| (WebCore::copyCONNECTProxyResponse): |
| - Use checked_cf_cast<CFHTTPMessageRef>(). |
| |
| * platform/network/cocoa/ResourceResponseCocoa.mm: |
| (WebCore::ResourceResponse::platformCertificateInfo const): |
| - Use checked_cf_cast<SecTrustRef>(). |
| |
| * platform/network/mac/CertificateInfoMac.mm: |
| (WebCore::CertificateInfo::containsNonRootSHA1SignedCertificate const): |
| (WebCore::CertificateInfo::dump const): |
| - Use checked_cf_cast<SecCertificateRef>(). |
| |
| * testing/cocoa/WebArchiveDumpSupport.mm: |
| (WebCoreTestSupport::createCFURLResponseFromResponseData): |
| - Use checked_cf_cast<>() for CFMutable* types. |
| |
| 2018-01-05 John Wilander <wilander@apple.com> |
| |
| Storage Access API: Refactor to make naming accurate and explicit, simplify access table, and prepare for access removal for page |
| https://bugs.webkit.org/show_bug.cgi?id=181357 |
| <rdar://problem/36331031> |
| |
| Reviewed by Alex Christensen. |
| |
| No new tests. The only changed functionality that isn't covered |
| by existing tests is cross-origin iframes in the same partition |
| should be handled as already having access. This cannot be |
| tested in layout tests since they don't support subdomains. |
| |
| This change does the following: |
| - Changes function and message names to reflect how this feature |
| was eventually implemented, i.e. access per frame. |
| - Makes it explicit that the UI process is only involved in |
| granting storage access and not removing storage access. |
| The latter is done directly by the web process. |
| - Simplifies the network process' entry map since only needs to |
| be able to give access to one domain in one frame at a time. |
| Access goes away on frame navigation so there can only be one |
| domain at a time per frame. Also, the map now uses pageIDs as |
| main keys to prepare for efficient access removal for all |
| frames under a page. |
| - Fixes a bug in so that a cross-origin iframe with the same |
| partition as the top frame correctly is handled as already |
| having access. |
| |
| * platform/network/NetworkStorageSession.h: |
| * platform/network/cf/NetworkStorageSessionCFNet.cpp: |
| (WebCore::NetworkStorageSession::cookieStoragePartition const): |
| The only change here is the changed named of the call to |
| NetworkStorageSession::hasStorageAccessForFrame(). |
| (WebCore::NetworkStorageSession::hasStorageAccessForFrame const): |
| (WebCore::NetworkStorageSession::grantStorageAccessForFrame): |
| (WebCore::NetworkStorageSession::removeStorageAccessForFrame): |
| (WebCore::NetworkStorageSession::isStorageAccessGranted const): Deleted. |
| (WebCore::NetworkStorageSession::setStorageAccessGranted): Deleted. |
| (WebCore::NetworkStorageSession::removeStorageAccess): Deleted. |
| |
| 2018-01-05 Youenn Fablet <youenn@apple.com> |
| |
| Implement Cache API partitioning based on ClientOrigin |
| https://bugs.webkit.org/show_bug.cgi?id=181240 |
| |
| Reviewed by Alex Christensen. |
| |
| Covered by updated tests. |
| |
| Previously, cache storage was partitioned according the origin of the client, represented as a String. |
| We now partition according both client and top origins, represented as a ClientOrigin |
| |
| Minor refactoring to use more makePendingActivity. |
| Added support for IPC serialization of ClientOrigin. |
| Added SecurityOriginData::toString which is used by WebKit2 Cache Storage implementation. |
| |
| * Modules/cache/CacheStorageConnection.cpp: |
| (WebCore::CacheStorageConnection::open): |
| (WebCore::CacheStorageConnection::retrieveCaches): |
| * Modules/cache/CacheStorageConnection.h: |
| (WebCore::CacheStorageConnection::clearMemoryRepresentation): |
| (WebCore::CacheStorageConnection::doOpen): |
| (WebCore::CacheStorageConnection::doRetrieveCaches): |
| * Modules/cache/DOMCacheStorage.cpp: |
| (WebCore::DOMCacheStorage::origin const): |
| (WebCore::DOMCacheStorage::retrieveCaches): |
| (WebCore::DOMCacheStorage::open): |
| (WebCore::DOMCacheStorage::remove): |
| * Modules/cache/DOMCacheStorage.h: |
| * Modules/cache/WorkerCacheStorageConnection.cpp: |
| (WebCore::WorkerCacheStorageConnection::doOpen): |
| (WebCore::WorkerCacheStorageConnection::doRetrieveCaches): |
| * Modules/cache/WorkerCacheStorageConnection.h: |
| * page/ClientOrigin.h: |
| (WebCore::ClientOrigin::isolatedCopy const): |
| (WebCore::ClientOrigin::encode const): |
| (WebCore::ClientOrigin::decode): |
| * page/SecurityOriginData.cpp: |
| (WebCore::SecurityOriginData::toString const): |
| (WebCore::SecurityOriginData::debugString const): Deleted. |
| * page/SecurityOriginData.h: |
| (WebCore::SecurityOriginData::debugString const): |
| * testing/Internals.cpp: |
| (WebCore::Internals::clearCacheStorageMemoryRepresentation): |
| |
| 2018-01-05 Wenson Hsieh <wenson_hsieh@apple.com> |
| |
| [Attachment Support] Add a way to write blob data to a file URL from the UI process |
| https://bugs.webkit.org/show_bug.cgi?id=181236 |
| |
| Reviewed by Brady Eidson. |
| |
| Add support for writing a blob to a designated file path. See comments below for more detail. No new tests, as |
| there change in behavior yet. See part 2: https://bugs.webkit.org/show_bug.cgi?id=181199. |
| |
| * page/DragController.cpp: |
| (WebCore::DragController::dragAttachmentElement): |
| * platform/PromisedBlobInfo.h: |
| |
| Remove PromisedBlobData entirely. This was added with the premise of having the web process deliver blob data to |
| the UI process. However, the new approach I'm taking just has the UI process tell the network process to write |
| a blob to a given location, so a data structure to deliver blob data over IPC is no longer necessary. |
| |
| (WebCore::PromisedBlobData::hasData const): Deleted. |
| (WebCore::PromisedBlobData::hasFile const): Deleted. |
| (WebCore::PromisedBlobData::operator bool const): Deleted. |
| (WebCore::PromisedBlobData::fulfills const): Deleted. |
| * platform/network/BlobRegistryImpl.cpp: |
| (WebCore::BlobRegistryImpl::populateBlobsForFileWriting): |
| |
| Introduce a new helper to build a list of blob data for file writing. |
| |
| (WebCore::writeFilePathsOrDataBuffersToFile): |
| |
| Introduce a new static helper to write blob data (a list of file paths and data buffers) to a given file handle. |
| Automatically closes the given file handle upon exit. |
| |
| (WebCore::BlobRegistryImpl::writeBlobsToTemporaryFiles): |
| (WebCore::BlobRegistryImpl::writeBlobToFilePath): |
| |
| Pull out common logic in writeBlobsToTemporaryFiles and writeBlobToFilePath into helper methods (see above), and |
| refactor both methods to use the helpers. |
| |
| * platform/network/BlobRegistryImpl.h: |
| |
| 2018-01-05 Alex Christensen <achristensen@webkit.org> |
| |
| Forbid < and > in URL hosts |
| https://bugs.webkit.org/show_bug.cgi?id=181308 |
| <rdar://problem/36012757> |
| |
| Reviewed by Tim Horton. |
| |
| https://url.spec.whatwg.org/#forbidden-host-code-point does not include these characters yet, but I think it should. |
| Firefox fails to parse URLs with < or > in the host. Chrome percent encodes them. Safari needs to do something. |
| The web platform tests are unclear on this case, and they will need to be updated with the specification. |
| They do show a change in behavior, though. |
| |
| * platform/URLParser.cpp: |
| Add < and > to the list of forbidden host code points. |
| |
| 2018-01-05 Eric Carlson <eric.carlson@apple.com> |
| |
| [MediaStream] Add Mac screen capture source |
| https://bugs.webkit.org/show_bug.cgi?id=181333 |
| <rdar://problem/36323219> |
| |
| Reviewed by Dean Jackson. |
| |
| * SourcesCocoa.txt: Add ScreenDisplayCaptureSourceMac.mm. |
| |
| * WebCore.xcodeproj/project.pbxproj: Ditto. |
| |
| * platform/cocoa/CoreVideoSoftLink.cpp: Declare new constants used. |
| * platform/cocoa/CoreVideoSoftLink.h: |
| |
| * platform/mediastream/mac/DisplayCaptureManagerCocoa.cpp: |
| (WebCore::displayReconfigurationCallBack): Call refreshCaptureDevices. |
| (WebCore::DisplayCaptureManagerCocoa::~DisplayCaptureManagerCocoa): Unregister for display |
| reconfiguration callbacks. |
| (WebCore::DisplayCaptureManagerCocoa::captureDevices): Register for display reconfigrations. |
| (WebCore::DisplayCaptureManagerCocoa::refreshCaptureDevices): Use CGActiveDisplayList to |
| get list of active screens. |
| (WebCore::DisplayCaptureManagerCocoa::screenCaptureDeviceWithPersistentID): Validate screen |
| ID, return CaptureDevice. |
| * platform/mediastream/mac/DisplayCaptureManagerCocoa.h: |
| |
| * platform/mediastream/mac/RealtimeMediaSourceCenterMac.cpp: |
| (WebCore::VideoCaptureSourceFactoryMac::createVideoCaptureSource): Deal with screen capture |
| on macOS. |
| |
| Implement Mac screen capture with CGDisplayStream. |
| * platform/mediastream/mac/ScreenDisplayCaptureSourceMac.h: Added. |
| (WebCore::ScreenDisplayCaptureSourceMac::DisplaySurface::~DisplaySurface): |
| (WebCore::ScreenDisplayCaptureSourceMac::DisplaySurface::operator=): |
| (WebCore::ScreenDisplayCaptureSourceMac::DisplaySurface::ioSurface const): |
| * platform/mediastream/mac/ScreenDisplayCaptureSourceMac.mm: Added. |
| (WebCore::roundUpToMacroblockMultiple): |
| (WebCore::ScreenDisplayCaptureSourceMac::updateDisplayID): |
| (WebCore::ScreenDisplayCaptureSourceMac::create): |
| (WebCore::ScreenDisplayCaptureSourceMac::ScreenDisplayCaptureSourceMac): |
| (WebCore::ScreenDisplayCaptureSourceMac::~ScreenDisplayCaptureSourceMac): |
| (WebCore::ScreenDisplayCaptureSourceMac::createDisplayStream): |
| (WebCore::ScreenDisplayCaptureSourceMac::startProducingData): |
| (WebCore::ScreenDisplayCaptureSourceMac::stopProducingData): |
| (WebCore::ScreenDisplayCaptureSourceMac::sampleBufferFromPixelBuffer): |
| (WebCore::ScreenDisplayCaptureSourceMac::pixelBufferFromIOSurface): |
| (WebCore::ScreenDisplayCaptureSourceMac::generateFrame): |
| (WebCore::ScreenDisplayCaptureSourceMac::startDisplayStream): |
| (WebCore::ScreenDisplayCaptureSourceMac::applySize): |
| (WebCore::ScreenDisplayCaptureSourceMac::applyFrameRate): |
| (WebCore::ScreenDisplayCaptureSourceMac::commitConfiguration): |
| (WebCore::ScreenDisplayCaptureSourceMac::displayWasReconfigured): |
| (WebCore::ScreenDisplayCaptureSourceMac::displayReconfigurationCallBack): |
| (WebCore::ScreenDisplayCaptureSourceMac::frameAvailable): |
| |
| 2018-01-05 Don Olmstead <don.olmstead@sony.com> |
| |
| [curl] Can't load file:// URL with a URL fragment identifier |
| https://bugs.webkit.org/show_bug.cgi?id=181170 |
| |
| Reviewed by Alex Christensen. |
| |
| No new tests. No change in behavior. |
| |
| * platform/network/curl/CurlRequest.cpp: |
| (WebCore::CurlRequest::invokeDidReceiveResponseForFile): |
| |
| 2018-01-05 Don Olmstead <don.olmstead@sony.com> |
| |
| TextCodec uses std::array but does not include it |
| https://bugs.webkit.org/show_bug.cgi?id=181340 |
| |
| Reviewed by Alex Christensen. |
| |
| No new tests. No change in behavior. |
| |
| * platform/text/TextCodec.h: |
| |
| 2018-01-05 Said Abou-Hallawa <sabouhallawa@apple.com> |
| |
| SVGAnimatedListPropertyTearOff::synchronizeWrappersIfNeeded() should do nothing if the property is not animating |
| https://bugs.webkit.org/show_bug.cgi?id=181316 |
| <rdar://problem/36147545> |
| |
| Reviewed by Simon Fraser. |
| |
| This is a speculative change to fix a crash which appeared after r226065. |
| The crash is very intermittent and sometimes very hard to reproduce. The |
| basic code analysis did not show how this crash can even happen. |
| |
| * svg/SVGAnimatedTypeAnimator.h: |
| (WebCore::SVGAnimatedTypeAnimator::resetFromBaseValues): For SVG property |
| with two values, e.g. <SVGAngleValue, SVGMarkerOrientType>, we need to |
| detach the wrappers of the animated property if the animated values are |
| going to change. This is similar to what we did in resetFromBaseValue(). |
| |
| * svg/properties/SVGAnimatedListPropertyTearOff.h: |
| (WebCore::SVGAnimatedListPropertyTearOff::synchronizeWrappersIfNeeded): |
| |
| 2018-01-05 Matt Lewis <jlewis3@apple.com> |
| |
| Unreviewed, rolling out r226401. |
| |
| This caused timeouts on multiple platforms. |
| |
| Reverted changeset: |
| |
| "Implement Cache API partitioning based on ClientOrigin" |
| https://bugs.webkit.org/show_bug.cgi?id=181240 |
| https://trac.webkit.org/changeset/226401 |
| |
| 2018-01-05 Dan Bernstein <mitz@apple.com> |
| |
| Fixed the build following AppKit API deprecations in a recent SDKs |
| |
| * platform/mac/PasteboardMac.mm: |
| (WebCore::setDragImageImpl): Suppressed deprecation warnings. |
| * platform/mac/WidgetMac.mm: |
| (WebCore::Widget::paint): Ditto. |
| |
| 2018-01-05 Joseph Pecoraro <pecoraro@apple.com> |
| |
| ServiceWorkers: Enable UserTiming / ResourceTiming |
| https://bugs.webkit.org/show_bug.cgi?id=181297 |
| <rdar://problem/36307306> |
| |
| Reviewed by Youenn Fablet. |
| |
| Tests: http/tests/workers/service/service-worker-resource-timing.https.html |
| http/tests/workers/service/service-worker-user-timing.https.html |
| |
| * loader/ResourceTiming.cpp: |
| (WebCore::ResourceTiming::ResourceTiming): |
| We used to clear extra NetworkLoadMetrics data early on. However, |
| for Workers we want to pass the complete NetworkLoadMetrics to |
| the Worker so that a Worker inspector has access to it. |
| |
| * page/PerformanceResourceTiming.cpp: |
| (WebCore::PerformanceResourceTiming::PerformanceResourceTiming): |
| Instead move the clearing of extra data to here, when the NetworkLoadMetrics |
| have finally settled into being used only for a performance entry. |
| |
| 2018-01-04 Philippe Normand <pnormand@igalia.com> |
| |
| [EME][GStreamer] Fix wrong ifdef |
| https://bugs.webkit.org/show_bug.cgi?id=181289 |
| |
| Reviewed by Alex Christensen. |
| |
| * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp: |
| (WebCore::MediaPlayerPrivateGStreamer::handleMessage): Remove the |
| ENCRYPTED_MEDIA ifdef from the VIDEO_TRACK ifdef block. Both have |
| nothing to do together. |
| |
| 2018-01-05 Fujii Hironori <Hironori.Fujii@sony.com> |
| |
| [Cairo] Canvas: Path::clear should clear its transform |
| https://bugs.webkit.org/show_bug.cgi?id=181320 |
| |
| Reviewed by Carlos Garcia Campos. |
| |
| Path of Cairo port has its cairo context. Path::clear() didn't |
| clear the transform matrix of the context. |
| |
| Test: fast/canvas/reset-scaling-by-height-change.html |
| |
| * platform/graphics/cairo/PathCairo.cpp: |
| (WebCore::Path::clear): Reset the transform matrix of Path. |
| |
| 2018-01-04 Devin Rousso <webkit@devinrousso.com> |
| |
| Web Inspector: replace HTMLCanvasElement with CanvasRenderingContext for instrumentation logic |
| https://bugs.webkit.org/show_bug.cgi?id=180770 |
| |
| Reviewed by Joseph Pecoraro. |
| |
| No change in functionality. |
| |
| * html/HTMLCanvasElement.h: |
| * html/HTMLCanvasElement.cpp: |
| (WebCore::HTMLCanvasElement::createContext2d): |
| (WebCore::HTMLCanvasElement::createContextWebGL): |
| (WebCore::HTMLCanvasElement::createContextWebGPU): |
| (WebCore::HTMLCanvasElement::createContextBitmapRenderer): |
| (WebCore::HTMLCanvasElement::reset): |
| (WebCore::HTMLCanvasElement::paint): |
| (WebCore::HTMLCanvasElement::setImageBuffer const): |
| (WebCore::HTMLCanvasElement::addObserver): Deleted. |
| (WebCore::HTMLCanvasElement::removeObserver): Deleted. |
| (WebCore::HTMLCanvasElement::cssCanvasClients): Deleted. |
| (WebCore::HTMLCanvasElement::notifyObserversCanvasChanged): Deleted. |
| * html/OffscreenCanvas.h: |
| * html/canvas/CanvasRenderingContext.h: |
| * html/canvas/CanvasRenderingContext.cpp: |
| * html/canvas/CanvasRenderingContext2D.h: |
| * html/canvas/CanvasRenderingContext2D.cpp: |
| (WebCore::CanvasRenderingContext2D::create): |
| * html/canvas/CanvasRenderingContext2DBase.h: |
| * html/canvas/ImageBitmapRenderingContext.h: |
| * html/canvas/ImageBitmapRenderingContext.cpp: |
| (WebCore::ImageBitmapRenderingContext::create): |
| * html/canvas/WebGL2RenderingContext.h: |
| * html/canvas/WebGL2RenderingContext.cpp: |
| (WebCore::WebGL2RenderingContext::create): |
| * html/canvas/WebGLRenderingContext.h: |
| * html/canvas/WebGLRenderingContext.cpp: |
| (WebCore::WebGLRenderingContext::create): |
| * html/canvas/WebGLRenderingContextBase.h: |
| * html/canvas/WebGLRenderingContextBase.cpp: |
| (WebCore::WebGLRenderingContextBase::create): |
| * html/canvas/WebGPURenderingContext.cpp: |
| (WebCore::WebGPURenderingContext::create): |
| Instead of adding didCreateCanvasRenderingContext calls at the construction sites of each |
| context, we can make the constructors private and force the usage of static `create` functions. |
| This way, we have access to the fully constructed object and have a guaranteed path for creation. |
| |
| * html/CanvasBase.h: |
| * html/CanvasBase.cpp: |
| (WebCore::CanvasBase::~CanvasBase): |
| (WebCore::CanvasBase::renderingContext const): |
| (WebCore::CanvasBase::addObserver): |
| (WebCore::CanvasBase::removeObserver): |
| (WebCore::CanvasBase::notifyObserversCanvasChanged): |
| (WebCore::CanvasBase::notifyObserversCanvasResized): |
| (WebCore::CanvasBase::notifyObserversCanvasDestroyed): |
| (WebCore::CanvasBase::cssCanvasClients const): |
| * Modules/mediastream/CanvasCaptureMediaStreamTrack.h: |
| * Modules/mediastream/CanvasCaptureMediaStreamTrack.cpp: |
| (WebCore::CanvasCaptureMediaStreamTrack::Source::canvasDestroyed): |
| (WebCore::CanvasCaptureMediaStreamTrack::Source::canvasResized): |
| (WebCore::CanvasCaptureMediaStreamTrack::Source::canvasChanged): |
| * css/CSSCanvasValue.h: |
| Move the CanvasObserver class to CanvasBase so that it can also be used for OffscreenCanvas. |
| |
| * inspector/InspectorInstrumentation.h: |
| (WebCore::InspectorInstrumentation::didChangeCSSCanvasClientNodes): |
| (WebCore::InspectorInstrumentation::didCreateCanvasRenderingContext): |
| (WebCore::InspectorInstrumentation::didChangeCanvasMemory): |
| (WebCore::InspectorInstrumentation::recordCanvasAction): |
| (WebCore::InspectorInstrumentation::didFinishRecordingCanvasFrame): |
| (WebCore::InspectorInstrumentation::didEnableExtension): |
| (WebCore::InspectorInstrumentation::didCreateProgram): |
| (WebCore::InspectorInstrumentation::willDeleteProgram): |
| (WebCore::InspectorInstrumentation::isShaderProgramDisabled): |
| (WebCore::InspectorInstrumentation::consoleStartRecordingCanvas): |
| (WebCore::InspectorInstrumentation::didCreateCSSCanvas): Deleted. |
| * inspector/InspectorInstrumentation.cpp: |
| (WebCore::InspectorInstrumentation::consoleStartRecordingCanvasImpl): |
| (WebCore::InspectorInstrumentation::didChangeCSSCanvasClientNodesImpl): |
| (WebCore::InspectorInstrumentation::didCreateCanvasRenderingContextImpl): |
| (WebCore::InspectorInstrumentation::didChangeCanvasMemoryImpl): |
| (WebCore::InspectorInstrumentation::didFinishRecordingCanvasFrameImpl): |
| (WebCore::InspectorInstrumentation::didEnableExtensionImpl): |
| (WebCore::InspectorInstrumentation::didCreateProgramImpl): |
| (WebCore::InspectorInstrumentation::didCreateCSSCanvasImpl): Deleted. |
| |
| * inspector/agents/InspectorCanvasAgent.h: |
| * inspector/agents/InspectorCanvasAgent.cpp: |
| (WebCore::InspectorCanvasAgent::enable): |
| (WebCore::InspectorCanvasAgent::requestNode): |
| (WebCore::InspectorCanvasAgent::requestContent): |
| (WebCore::InspectorCanvasAgent::requestCSSCanvasClientNodes): |
| (WebCore::contextAsScriptValue): |
| (WebCore::InspectorCanvasAgent::resolveCanvasContext): |
| (WebCore::InspectorCanvasAgent::startRecording): |
| (WebCore::InspectorCanvasAgent::stopRecording): |
| (WebCore::InspectorCanvasAgent::updateShader): |
| (WebCore::InspectorCanvasAgent::frameNavigated): |
| (WebCore::InspectorCanvasAgent::didChangeCSSCanvasClientNodes): |
| (WebCore::InspectorCanvasAgent::didCreateCanvasRenderingContext): |
| (WebCore::InspectorCanvasAgent::didChangeCanvasMemory): |
| (WebCore::InspectorCanvasAgent::recordCanvasAction): |
| (WebCore::InspectorCanvasAgent::canvasDestroyed): |
| (WebCore::InspectorCanvasAgent::didFinishRecordingCanvasFrame): |
| (WebCore::InspectorCanvasAgent::consoleStartRecordingCanvas): |
| (WebCore::InspectorCanvasAgent::didEnableExtension): |
| (WebCore::InspectorCanvasAgent::didCreateProgram): |
| (WebCore::InspectorCanvasAgent::canvasRecordingTimerFired): |
| (WebCore::InspectorCanvasAgent::clearCanvasData): |
| (WebCore::InspectorCanvasAgent::unbindCanvas): |
| (WebCore::InspectorCanvasAgent::findInspectorCanvas): |
| (WebCore::InspectorCanvasAgent::unbindProgram): |
| (WebCore::InspectorCanvasAgent::didCreateCSSCanvas): Deleted. |
| |
| * inspector/InspectorCanvas.h: |
| * inspector/InspectorCanvas.cpp: |
| (WebCore::InspectorCanvas::create): |
| (WebCore::InspectorCanvas::InspectorCanvas): |
| (WebCore::InspectorCanvas::canvasElement): |
| (WebCore::InspectorCanvas::resetRecordingData): |
| (WebCore::InspectorCanvas::recordAction): |
| (WebCore::InspectorCanvas::buildObjectForCanvas): |
| (WebCore::InspectorCanvas::getCanvasContentAsDataURL): |
| (WebCore::InspectorCanvas::buildInitialState): |
| (WebCore::InspectorCanvas::~InspectorCanvas): Deleted. |
| |
| * inspector/InspectorShaderProgram.h: |
| * inspector/InspectorShaderProgram.cpp: |
| (WebCore::InspectorShaderProgram::context const): |
| |
| * page/PageConsoleClient.cpp: |
| (WebCore::PageConsoleClient::record): |
| (WebCore::PageConsoleClient::recordEnd): |
| |
| * dom/Document.h: |
| * dom/Document.cpp: |
| (WebCore::Document::getCSSCanvasElement): |
| (WebCore::Document::nameForCSSCanvasElement const): |
| We have no reason to save the CSS canvas name for each InspectorCanvas object, so instead we |
| can just query for the name based on the CanvasRenderingContext's HTMLCanvasElement (assuming |
| it is not an OffscreenCanvas) when we need it. |
| |
| 2018-01-04 Chris Fleizach <cfleizach@apple.com> |
| |
| AX: Implement updated CSS3 Speech for 'speak' and 'speak-as' properties |
| https://bugs.webkit.org/show_bug.cgi?id=180361 |
| |
| Reviewed by Zalan Bujtas. |
| |
| Change speak -> speakAs, and allow a combination of properties. |
| |
| Tests: Updated accessibility/mac/css-speech-speak.html |
| |
| * accessibility/AccessibilityObject.h: |
| (WebCore::AccessibilityObject::speakAsProperty const): |
| (WebCore::AccessibilityObject::speakProperty const): Deleted. |
| * accessibility/AccessibilityRenderObject.cpp: |
| (WebCore::AccessibilityRenderObject::speakAsProperty const): |
| (WebCore::AccessibilityRenderObject::speakProperty const): Deleted. |
| * accessibility/AccessibilityRenderObject.h: |
| * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm: |
| (-[WebAccessibilityObjectWrapper accessibilitySpeechHint]): |
| * accessibility/mac/WebAccessibilityObjectWrapperBase.h: |
| * accessibility/mac/WebAccessibilityObjectWrapperBase.mm: |
| (-[WebAccessibilityObjectWrapperBase baseAccessibilitySpeechHint]): |
| * accessibility/mac/WebAccessibilityObjectWrapperMac.mm: |
| (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]): |
| * css/CSSComputedStyleDeclaration.cpp: |
| (WebCore::speakAsToCSSValue): |
| (WebCore::ComputedStyleExtractor::propertyValue): |
| * css/CSSPrimitiveValueMappings.h: |
| (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): |
| (WebCore::CSSPrimitiveValue::operator ESpeakAs const): |
| (WebCore::CSSPrimitiveValue::operator ESpeak const): Deleted. |
| * css/CSSProperties.json: |
| * css/StyleBuilderConverter.h: |
| (WebCore::StyleBuilderConverter::convertSpeakAs): |
| * css/parser/CSSParserFastPaths.cpp: |
| (WebCore::CSSParserFastPaths::isValidKeywordPropertyAndValue): |
| (WebCore::CSSParserFastPaths::isKeywordPropertyID): |
| * css/parser/CSSPropertyParser.cpp: |
| (WebCore::consumeSpeakAs): |
| (WebCore::CSSPropertyParser::parseSingleValue): |
| * rendering/style/RenderStyle.h: |
| (WebCore::RenderStyle::speakAs const): |
| (WebCore::RenderStyle::setSpeakAs): |
| (WebCore::RenderStyle::initialSpeakAs): |
| (WebCore::RenderStyle::speak const): Deleted. |
| (WebCore::RenderStyle::setSpeak): Deleted. |
| (WebCore::RenderStyle::initialSpeak): Deleted. |
| * rendering/style/RenderStyleConstants.h: |
| (WebCore::operator| ): |
| (WebCore::operator|= ): |
| * rendering/style/StyleRareInheritedData.cpp: |
| (WebCore::StyleRareInheritedData::StyleRareInheritedData): |
| (WebCore::StyleRareInheritedData::operator== const): |
| * rendering/style/StyleRareInheritedData.h: |
| |
| 2018-01-04 Brian Burg <bburg@apple.com> |
| |
| Web Inspector: Capture Element Screenshot looks fuzzy |
| https://bugs.webkit.org/show_bug.cgi?id=175734 |
| <rdar://problem/33803377> |
| |
| Reviewed by Joseph Pecoraro and Simon Fraser. |
| |
| Screenshots taken by Web Inspector were being downscaled from the |
| internal size to the logical size, causing them to be blurry when |
| later upscaled to the internal size. |
| |
| Replace ScaleBehavior { Scaled, Unscaled } with PreserveResolution { No, Yes }. |
| This is a lot less confusing to read both inside ImageBuffer and at its use sites. |
| |
| Remove unused CoordinateSystem argument for ImageBuffer::toDataURL, |
| and replace it with PreserveResolution. Plumb PreserveResolution into toCFData |
| so that PreserveResolution::Yes will preserve the internal size of |
| the image buffer, just as it does in other methods that take PreserveResolution. |
| |
| At the use site in InspectorPageAgent, always request PreserveResolution::Yes snapshots |
| when taking an element screenshot. For now, keep using downscaled (smaller) |
| snapshots when capturing canvas previews, as the previews are not full-size. |
| |
| Test: inspector/page/hidpi-snapshot-size.html |
| |
| * html/HTMLCanvasElement.cpp: |
| (WebCore::HTMLCanvasElement::makePresentationCopy): |
| (WebCore::HTMLCanvasElement::copiedImage const): |
| * html/canvas/CanvasRenderingContext2DBase.cpp: |
| (WebCore::CanvasRenderingContext2DBase::createPattern): |
| * inspector/agents/InspectorPageAgent.cpp: |
| (WebCore::InspectorPageAgent::snapshotNode): |
| (WebCore::InspectorPageAgent::snapshotRect): |
| * page/TextIndicator.cpp: |
| (WebCore::takeSnapshot): |
| * platform/DragImage.cpp: |
| (WebCore::createDragImageFromSnapshot): |
| * platform/graphics/BitmapImage.cpp: |
| (WebCore::BitmapImage::drawPattern): |
| * platform/graphics/ImageBuffer.h: |
| * platform/graphics/cairo/ImageBufferCairo.cpp: |
| (WebCore::ImageBuffer::sinkIntoImage): |
| (WebCore::ImageBuffer::copyImage const): |
| (WebCore::ImageBuffer::toDataURL const): |
| * platform/graphics/cg/ImageBufferCG.cpp: |
| (WebCore::createBitmapImageAfterScalingIfNeeded): |
| (WebCore::ImageBuffer::copyImage const): |
| (WebCore::ImageBuffer::sinkIntoImage): |
| (WebCore::ImageBuffer::toDataURL const): |
| (WebCore::ImageBuffer::toData const): |
| (WebCore::ImageBuffer::toCFData const): |
| * platform/graphics/gtk/ImageBufferGtk.cpp: |
| (WebCore::ImageBuffer::toDataURL const): |
| * platform/graphics/win/ImageBufferDirect2D.cpp: |
| (WebCore::ImageBuffer::copyImage const): |
| (WebCore::ImageBuffer::sinkIntoImage): |
| (WebCore::ImageBuffer::toDataURL const): |
| * svg/graphics/SVGImage.cpp: |
| (WebCore::SVGImage::drawPatternForContainer): |
| |
| 2018-01-04 John Wilander <wilander@apple.com> |
| |
| Storage Access API: Turn feature on by default in Settings.yaml |
| https://bugs.webkit.org/show_bug.cgi?id=181298 |
| <rdar://problem/36302506> |
| |
| Reviewed by Brent Fulgham. |
| |
| No new tests. This is just a feature settings change. |
| |
| * page/Settings.yaml: |
| |
| 2018-01-04 Zalan Bujtas <zalan@apple.com> |
| |
| WebContent process crashes while loading https://www.classicspecs.com |
| https://bugs.webkit.org/show_bug.cgi?id=181290 |
| <rdar://problem/36225906> |
| |
| Reviewed by Simon Fraser. |
| |
| Floats can overhang multiple blocks (they are called intruding floats). |
| Each block keeps track of such intruding floats. When an overhanging float box is destroyed, |
| we need to deregister it from all those blocks. We do it by walking up the ancestor block chain |
| and check if the parent (grandparent etc) block still contains this float. Once we find the topmost block, |
| we start deregistering it by traversing back on the descendant blocks. |
| Normally we do it in RenderElement::takeChildInternal right before the box is getting detached. |
| However in certain cases (like when the float's parent happens to be an anonymous wrapper) |
| by the time we get to ::takeChildInternal the subtree is already detached and we can't access all the |
| ancestors. |
| This patch ensure that the floating box is still attached during de-registration. |
| |
| Test: fast/block/float/crash-when-intruding-float-has-anonymous-parent-and-detach.html |
| |
| * rendering/RenderObject.cpp: |
| (WebCore::RenderObject::removeFromParentAndDestroyCleaningUpAnonymousWrappers): |
| |
| 2018-01-04 Eric Carlson <eric.carlson@apple.com> |
| |
| [MediaStream] Add Mock screen capture source |
| https://bugs.webkit.org/show_bug.cgi?id=181291 |
| <rdar://problem/36298164> |
| |
| Reviewed by Dean Jackson. |
| |
| Tests: http/tests/media/media-stream/get-display-media-prompt.html |
| GetDisplayMediaTest.BasicPrompt |
| GetDisplayMediaTest.Constraints |
| |
| * Modules/mediastream/MediaDevices.cpp: |
| (WebCore::MediaDevices::MediaDevices): Add static_assert to ensure MediaDevices::DisplayCaptureSurfaceType |
| and RealtimeMediaSourceSettings::DisplaySurfaceType values are equivalent. |
| (WebCore::MediaDevices::getSupportedConstraints): Remove bogus code. |
| * Modules/mediastream/MediaDevices.h: Add DisplayCaptureSurfaceType. |
| * Modules/mediastream/MediaDevices.idl: Ditto. |
| |
| * Modules/mediastream/MediaStreamTrack.cpp: |
| (WebCore::MediaStreamTrack::getSettings const): Add a FIXME. |
| * Modules/mediastream/MediaStreamTrack.h: Add displaySurface and logicalSurface. |
| |
| * Modules/mediastream/MediaTrackSupportedConstraints.h: Remove displaySurface and logicalSurface. |
| * Modules/mediastream/MediaTrackSupportedConstraints.idl: |
| |
| * SourcesCocoa.txt: Add DisplayCaptureManagerCocoa.cpp and DisplayCaptureSourceCocoa.cpp. |
| |
| * WebCore.xcodeproj/project.pbxproj: Ditto. |
| |
| * platform/mediastream/CaptureDevice.h: |
| (WebCore::CaptureDevice::encode const): Add. |
| (WebCore::CaptureDevice::decode): |
| |
| * platform/mediastream/RealtimeMediaSourceCenter.cpp: |
| (WebCore::RealtimeMediaSourceCenter::getMediaStreamDevices): Include display capture "devices". |
| (WebCore::RealtimeMediaSourceCenter::validateRequestConstraints): Deal with display capture devices. |
| (WebCore::RealtimeMediaSourceCenter::captureDeviceWithPersistentID): Ditto. |
| * platform/mediastream/RealtimeMediaSourceCenter.h: |
| |
| * platform/mediastream/RealtimeMediaSourceSettings.h: |
| (WebCore::RealtimeMediaSourceSettings::displaySurface const): Return a DisplaySurfaceType. |
| (WebCore::RealtimeMediaSourceSettings::setDisplaySurface): Take a DisplaySurfaceType. |
| |
| * platform/mediastream/mac/DisplayCaptureManagerCocoa.cpp: |
| (WebCore::DisplayCaptureManagerCocoa::singleton): |
| (WebCore::DisplayCaptureManagerCocoa::~DisplayCaptureManagerCocoa): |
| (WebCore::DisplayCaptureManagerCocoa::captureDevices): |
| (WebCore::DisplayCaptureManagerCocoa::screenCaptureDeviceWithPersistentID): |
| (WebCore::DisplayCaptureManagerCocoa::captureDeviceWithPersistentID): |
| * platform/mediastream/mac/DisplayCaptureManagerCocoa.h: |
| |
| * platform/mediastream/mac/DisplayCaptureSourceCocoa.cpp: Added. |
| (WebCore::DisplayCaptureSourceCocoa::DisplayCaptureSourceCocoa): |
| (WebCore::DisplayCaptureSourceCocoa::~DisplayCaptureSourceCocoa): |
| (WebCore::DisplayCaptureSourceCocoa::capabilities const): |
| (WebCore::DisplayCaptureSourceCocoa::settings const): |
| (WebCore::DisplayCaptureSourceCocoa::settingsDidChange): |
| (WebCore::DisplayCaptureSourceCocoa::startProducingData): |
| (WebCore::DisplayCaptureSourceCocoa::stopProducingData): |
| (WebCore::DisplayCaptureSourceCocoa::elapsedTime): |
| (WebCore::DisplayCaptureSourceCocoa::applyFrameRate): |
| (WebCore::DisplayCaptureSourceCocoa::emitFrame): |
| * platform/mediastream/mac/DisplayCaptureSourceCocoa.h: |
| |
| * platform/mediastream/mac/RealtimeMediaSourceCenterMac.cpp: |
| (WebCore::RealtimeMediaSourceCenterMac::displayCaptureDeviceManager): New. |
| * platform/mediastream/mac/RealtimeMediaSourceCenterMac.h: |
| |
| * platform/mock/MockRealtimeMediaSource.cpp: |
| (WebCore::deviceMap): Add screen capture "devices". |
| (WebCore::MockRealtimeMediaSource::displayDevices): New. |
| * platform/mock/MockRealtimeMediaSource.h: |
| |
| * platform/mock/MockRealtimeMediaSourceCenter.cpp: Clean up includes. |
| * platform/mock/MockRealtimeMediaSourceCenter.h: |
| |
| * platform/mock/MockRealtimeVideoSource.cpp: |
| (WebCore::MockRealtimeVideoSource::MockRealtimeVideoSource): Mock two screen devices. |
| (WebCore::MockRealtimeVideoSource::updateSettings): Deal with mock screens. |
| (WebCore::MockRealtimeVideoSource::initializeCapabilities): Ditto. |
| (WebCore::MockRealtimeVideoSource::initializeSupportedConstraints): Ditto. |
| (WebCore::MockRealtimeVideoSource::drawText): Ditto. |
| (WebCore::MockRealtimeVideoSource::generateFrame): Ditto. |
| * platform/mock/MockRealtimeVideoSource.h: |
| (WebCore::MockRealtimeVideoSource::mockCamera const): |
| (WebCore::MockRealtimeVideoSource::mockScreen const): |
| |
| 2018-01-04 Youenn Fablet <youenn@apple.com> |
| |
| FetchResponse should set its internal response text encoding name |
| https://bugs.webkit.org/show_bug.cgi?id=181284 |
| |
| Reviewed by Alex Christensen. |
| |
| Covered by rebased test. |
| |
| * Modules/fetch/FetchResponse.cpp: |
| (WebCore::FetchResponse::create): Set response text encoding based on content type charset. |
| |
| 2018-01-04 John Wilander <wilander@apple.com> |
| |
| Storage Access API: Remove JavaScript confirm() prompt from Document::requestStorageAccess() |
| https://bugs.webkit.org/show_bug.cgi?id=181276 |
| <rdar://problem/36290463> |
| |
| Reviewed by Alex Christensen. |
| |
| No new tests. Existing test expectations updated. |
| |
| * dom/Document.cpp: |
| (WebCore::Document::requestStorageAccess): |
| |
| 2018-01-04 Carlos Garcia Campos <cgarcia@igalia.com> |
| |
| [GTK] Issues with Ahem's ex / x-height |
| https://bugs.webkit.org/show_bug.cgi?id=180581 |
| |
| Reviewed by Michael Catanzaro. |
| |
| Get the x-height value from the TT_OS2 table if available. |
| |
| Fixes: fast/text/break-word-pre-wrap.html |
| imported/w3c/web-platform-tests/css/css-shapes-1/shape-outside/values/shape-outside-shape-arguments-000.html |
| |
| * platform/graphics/freetype/SimpleFontDataFreeType.cpp: |
| (WebCore::Font::platformInit): |
| |
| 2018-01-04 Philippe Normand <pnormand@igalia.com> |
| |
| Unreviewed, GTK build fix attempt after r226357 |
| |
| * platform/graphics/gstreamer/GStreamerUtilities.h: The |
| GST_BUFFER_DTS_OR_PTS macro was added in GStreamer 1.8 but old |
| versions of Debian might not have this release yet. |
| |
| 2018-01-04 Youenn Fablet <youenn@apple.com> |
| |
| Implement Cache API partitioning based on ClientOrigin |
| https://bugs.webkit.org/show_bug.cgi?id=181240 |
| |
| Reviewed by Alex Christensen. |
| |
| Covered by updated tests. |
| |
| Previously, cache storage was partitioned according the origin of the client, represented as a String. |
| We now partition according both client and top origins, represented as a ClientOrigin |
| |
| Minor refactoring to use more makePendingActivity. |
| Added support for IPC serialization of ClientOrigin. |
| Added SecurityOriginData::toString which is used by WebKit2 Cache Storage implementation. |
| |
| * Modules/cache/CacheStorageConnection.cpp: |
| (WebCore::CacheStorageConnection::open): |
| (WebCore::CacheStorageConnection::retrieveCaches): |
| * Modules/cache/CacheStorageConnection.h: |
| (WebCore::CacheStorageConnection::clearMemoryRepresentation): |
| (WebCore::CacheStorageConnection::doOpen): |
| (WebCore::CacheStorageConnection::doRetrieveCaches): |
| * Modules/cache/DOMCacheStorage.cpp: |
| (WebCore::DOMCacheStorage::origin const): |
| (WebCore::DOMCacheStorage::retrieveCaches): |
| (WebCore::DOMCacheStorage::open): |
| (WebCore::DOMCacheStorage::remove): |
| * Modules/cache/DOMCacheStorage.h: |
| * Modules/cache/WorkerCacheStorageConnection.cpp: |
| (WebCore::WorkerCacheStorageConnection::doOpen): |
| (WebCore::WorkerCacheStorageConnection::doRetrieveCaches): |
| * Modules/cache/WorkerCacheStorageConnection.h: |
| * page/ClientOrigin.h: |
| (WebCore::ClientOrigin::isolatedCopy const): |
| (WebCore::ClientOrigin::encode const): |
| (WebCore::ClientOrigin::decode): |
| * page/SecurityOriginData.cpp: |
| (WebCore::SecurityOriginData::toString const): |
| (WebCore::SecurityOriginData::debugString const): Deleted. |
| * page/SecurityOriginData.h: |
| (WebCore::SecurityOriginData::debugString const): |
| * testing/Internals.cpp: |
| (WebCore::Internals::clearCacheStorageMemoryRepresentation): |
| |
| 2018-01-04 Youenn Fablet <youenn@apple.com> |
| |
| Service Worker should expose redirect mode for navigation loads as manual |
| https://bugs.webkit.org/show_bug.cgi?id=181067 |
| |
| Reviewed by Alex Christensen. |
| |
| Covered by rebased tests. |
| |
| * loader/CrossOriginAccessControl.cpp: Removing ContentType header only if affecting CORS checks. |
| This allows extending header filtering in service worker to all modes, including Navigate. |
| * workers/service/context/ServiceWorkerFetch.cpp: |
| (WebCore::ServiceWorkerFetch::dispatchFetchEvent): Ideally, document loading code should set redirect to manual. |
| Since it is not the case yet and that would require changes to various places, manual is set before exposing the corresponding fetch event. |
| |
| 2018-01-04 Youenn Fablet <youenn@apple.com> |
| |
| ServiceWorkerThreadProxy::postTaskForModeToWorkerGlobalScope should be a no-op if worker is being terminated |
| https://bugs.webkit.org/show_bug.cgi?id=181245 |
| |
| Reviewed by Alex Christensen. |
| |
| Stop appending tasks to a terminating worker and returning false in that case. |
| This mirrors what is done for regular workers. |
| |
| * workers/service/context/SWContextManager.cpp: |
| (WebCore::SWContextManager::terminateWorker): |
| * workers/service/context/ServiceWorkerThreadProxy.cpp: |
| (WebCore::ServiceWorkerThreadProxy::postTaskForModeToWorkerGlobalScope): |
| * workers/service/context/ServiceWorkerThreadProxy.h: |
| |
| 2018-01-04 Youenn Fablet <youenn@apple.com> |
| |
| Cancel pending script loads when service worker is being terminated |
| https://bugs.webkit.org/show_bug.cgi?id=181250 |
| |
| Reviewed by Alex Christensen. |
| |
| Covered by service worker tests no longer crashing in ASAN builds. |
| |
| * workers/WorkerScriptLoader.cpp: |
| (WebCore::WorkerScriptLoader::notifyFinished): Clearing loader when finished. |
| (WebCore::WorkerScriptLoader::cancel): Implementing cancel of a script loader by cancelling the underlying threadable loader. |
| * workers/WorkerScriptLoader.h: |
| * workers/service/ServiceWorkerContainer.cpp: Canceling loads of all pending jobs. |
| (WebCore::ServiceWorkerContainer::stop): |
| * workers/service/ServiceWorkerJob.cpp: |
| (WebCore::ServiceWorkerJob::cancelPendingLoad): |
| * workers/service/ServiceWorkerJob.h: |
| |
| 2018-01-04 Youenn Fablet <youenn@apple.com> |
| |
| Implement https://fetch.spec.whatwg.org/#main-fetch default referrer policy setting |
| https://bugs.webkit.org/show_bug.cgi?id=181239 |
| |
| Reviewed by Alex Christensen. |
| |
| Covered by updated and rebased test. |
| |
| Setting the request referrer policy to the Document referrer policy if no one is set. |
| If Document has no referrer policy, use no-referrer-when-downgrade as per the spec. |
| |
| * loader/cache/CachedResourceLoader.cpp: |
| (WebCore::CachedResourceLoader::updateHTTPRequestHeaders): |
| (WebCore::CachedResourceLoader::requestResource): |
| * loader/cache/CachedResourceLoader.h: |
| * loader/cache/CachedResourceRequest.cpp: |
| (WebCore::CachedResourceRequest::updateReferrerPolicy): |
| (WebCore::CachedResourceRequest::updateReferrerOriginAndUserAgentHeaders): |
| * loader/cache/CachedResourceRequest.h: |
| |
| 2018-01-03 Wenson Hsieh <wenson_hsieh@apple.com> |
| |
| [Attachment Support] Create attachment elements when dropping files on iOS |
| https://bugs.webkit.org/show_bug.cgi?id=181192 |
| <rdar://problem/36280945> |
| |
| Reviewed by Tim Horton. |
| |
| Implements support for dropping data as attachment elements on iOS. See comments below for more detail. |
| |
| Tests: WKAttachmentTests.InsertDroppedRichAndPlainTextFilesAsAttachments |
| WKAttachmentTests.InsertDroppedZipArchiveAsAttachment |
| WKAttachmentTests.InsertDroppedItemProvidersInOrder |
| |
| * WebCore.xcodeproj/project.pbxproj: |
| * editing/WebContentReader.cpp: |
| (WebCore::WebContentReader::ensureFragment): |
| |
| Add a new helper to create the WebContentReader's fragment, if it hasn't already been created. |
| |
| * editing/WebContentReader.h: |
| * editing/cocoa/WebContentReaderCocoa.mm: |
| (WebCore::WebContentReader::readFilePaths): |
| |
| Rename readFilenames to readFilePaths (which better reflects its parameters, which are file paths). Also, move |
| the implementation of readFilePaths to shared iOS/macOS code in WebContentReaderCocoa, and remove the stub |
| implementation on iOS. |
| |
| There's a bit of code here that I kept macOS-only which deals with inserting file paths as plain text in |
| editable areas, but it's unclear to me why and if WebKit clients currently find this useful, so I left a FIXME |
| to investigate removing this altogether. Code for handling this plain text insertion of file paths on Mac was |
| introduced in r67403. |
| |
| * editing/ios/WebContentReaderIOS.mm: |
| (WebCore::WebContentReader::readFilenames): Deleted. |
| * editing/mac/WebContentReaderMac.mm: |
| (WebCore::WebContentReader::readFilenames): Deleted. |
| * page/mac/DragControllerMac.mm: |
| (WebCore::DragController::updateSupportedTypeIdentifiersForDragHandlingMethod const): |
| |
| Teach DragController to accept all types conforming to "public.item" and "public.content" on iOS, only when |
| attachment elements are enabled. This allows us to load content from item providers that we otherwise would not |
| have loaded, since we now have the ability to fall back to attachment element insertion if the type is not have |
| a default representation using standard web content. |
| |
| * platform/Pasteboard.h: |
| * platform/PasteboardItemInfo.h: Added. |
| (WebCore::PasteboardItemInfo::encode const): |
| (WebCore::PasteboardItemInfo::decode): |
| |
| Add PasteboardItemInfo, a struct that describes an item on the pasteboard. Also, implement encoding and decoding |
| support for PasteboardItemInfo. So far, the item info only describes file information about the pasteboard item, |
| and flags indicating whether the item prefers attachment or inline presentation. |
| |
| * platform/PasteboardStrategy.h: |
| |
| Replace getFilenamesForDataInteraction with informationForItemAtIndex. Instead of returning all of the file |
| paths associated with any item on the pasteboard, fetch a PasteboardItemInfo at a given item index, which |
| includes information about the file path as well as some other metadata we'll need when deciding how to read |
| pasteboard contents as a document fragment. |
| |
| * platform/PlatformPasteboard.h: |
| * platform/cocoa/PasteboardCocoa.mm: |
| (WebCore::Pasteboard::read): |
| * platform/ios/AbstractPasteboard.h: |
| * platform/ios/PasteboardIOS.mm: |
| (WebCore::Pasteboard::read): |
| (WebCore::Pasteboard::readRespectingUTIFidelities): |
| |
| Teach the iOS Pasteboard to read web content using attachment elements, if enabled. There are two scenarios in |
| which we would want to insert an attachment element: |
| (1) The item provider uses a preferred presentation style of attachment, in which case we bail out of trying to |
| handle the drop using the default mechanisms, and simply insert it as an attachment. We need this to deal |
| with the case where we drop text or HTML files from the Files app, so that we don't try and insert the |
| contents of the text or HTML as inline web content. |
| (2) The item provider doesn't have a preferred attachment presentation style, but there's nothing WebKit would |
| otherwise do with the dropped content, so insert an attachment element as a fallback. Examples where this is |
| relevant are dropping a PDF or ZIP archive without attachment presentation style explicitly set. |
| We first check if we fall into case (1). If so, we can bail early by inserting an attachment; otherwise, we |
| proceed normally and see if we can read the contents of the drop as web content. If, at the end of default drop |
| handling, we don't still have a way to represent the dropped content, enter case (2). |
| |
| (WebCore::Pasteboard::readFilePaths): |
| (WebCore::Pasteboard::readFilenames): Deleted. |
| |
| Rename readFilenames to readFilePaths, and reimplement it using informationForItemAtIndex. |
| |
| * platform/ios/PlatformPasteboardIOS.mm: |
| (WebCore::pasteboardItemPresentationStyle): |
| (WebCore::PlatformPasteboard::informationForItemAtIndex): |
| (WebCore::PlatformPasteboard::filenamesForDataInteraction): Deleted. |
| |
| Implement informationForItemAtIndex and remove filenamesForDataInteraction. As before, we ask the pasteboard |
| (i.e. WebItemProviderPasteboard) for information about dropped file URLs. This time, we limit this to a single |
| file, so we don't end up creating multiple attachment elements for each representation of a single item |
| provider. See below for -preferredFileUploadURLAtIndex:fileType: for more detail. |
| |
| * platform/ios/WebItemProviderPasteboard.h: |
| * platform/ios/WebItemProviderPasteboard.mm: |
| (-[WebItemProviderLoadResult initWithItemProvider:typesToLoad:]): |
| (-[WebItemProviderLoadResult canBeRepresentedAsFileUpload]): |
| |
| Remove this synthesized instance variable and instead just check the item provider's preferredPresentationStyle. |
| |
| (-[WebItemProviderLoadResult description]): |
| |
| Add a verbose -description to the load result object. Useful for debugging what was content was loaded from an |
| item provider on drop. |
| |
| (-[WebItemProviderPasteboard preferredFileUploadURLAtIndex:fileType:]): |
| |
| Return the highest fidelity loaded type identifier for a given item. |
| |
| (-[WebItemProviderPasteboard allDroppedFileURLs]): |
| (-[WebItemProviderPasteboard typeIdentifiersToLoadForRegisteredTypeIdentfiers:]): |
| |
| Prefer flat RTFD to RTFD. In the case where attachments are enabled and we're accepting all types of content |
| using attachment elements as a fallback representation, if the source writes attributed strings to the |
| pasteboard with com.apple.rtfd at a higher fidelity than com.apple.flat-rtfd, we'll end up loading only |
| com.apple.rtfd and dropping the text as an attachment element because we cannot convert the dropped content to |
| markup. Instead, if flat RTFD is present in the item provider, always prefer that over RTFD so that dropping as |
| regular web content isn't overridden when attachment elements are enabled. |
| |
| (-[WebItemProviderPasteboard doAfterLoadingProvidedContentIntoFileURLs:synchronousTimeout:]): |
| (-[WebItemProviderPasteboard droppedFileURLs]): Deleted. |
| * platform/mac/DragDataMac.mm: |
| (WebCore::DragData::containsCompatibleContent const): |
| |
| DragData::containsCompatibleContent should be true when attachment elements are enabled, and there are files we |
| can drop as attachment elements. |
| |
| * platform/mac/PasteboardMac.mm: |
| (WebCore::Pasteboard::read): |
| (WebCore::Pasteboard::readFilePaths): |
| (WebCore::Pasteboard::readFilenames): Deleted. |
| |
| 2018-01-03 Ting-Wei Lan <lantw44@gmail.com> |
| |
| Replace hard-coded paths in shebangs with #!/usr/bin/env |
| https://bugs.webkit.org/show_bug.cgi?id=181040 |
| |
| Reviewed by Alex Christensen. |
| |
| * bindings/scripts/InFilesCompiler.pm: |
| * bindings/scripts/InFilesParser.pm: |
| * bindings/scripts/generate-bindings-all.pl: |
| * bindings/scripts/generate-bindings.pl: |
| * bindings/scripts/preprocess-idls.pl: |
| * css/make-css-file-arrays.pl: |
| * css/makeprop.pl: |
| * css/makevalues.pl: |
| * dom/make_event_factory.pl: |
| * dom/make_names.pl: |
| * extract-localizable-strings.pl: |
| * make-hash-tools.pl: |
| |
| 2018-01-03 Wenson Hsieh <wenson_hsieh@apple.com> |
| |
| [Attachment Support] Add plumbing for starting a drag with promised blob data |
| https://bugs.webkit.org/show_bug.cgi?id=181201 |
| |
| Reviewed by Tim Horton. |
| |
| Adds logic to allow dragging an attachment element as a file by sending promised blob information to the UI |
| process. See comments below for more detail. |
| |
| The only change in behavior is that dragging an attachment element will no longer write web content and injected |
| bundle data to the pasteboard if the attachment element's file attribute is nonnull. This will cause one |
| existing WK1 layout test to fail, but will otherwise not affect any attachment editing clients. On iOS, |
| attachment elements in the Mail viewer can be dragged, but each attachment's file is null, so we fall back to |
| current behavior; on macOS, Mail currently overrides the drag completely, beginning at -mouseDown:, so this |
| doesn't make a difference to macOS Mail either. |
| |
| * editing/Editor.h: |
| * editing/cocoa/EditorCocoa.mm: |
| (WebCore::Editor::getPasteboardTypesAndDataForAttachment): |
| |
| Add a helper method to retrieve an attachment element as web archive data, for moving attachments within the |
| same document. Also gives the injected editor bundle a chance to supply custom pasteboard types. |
| |
| * loader/EmptyClients.cpp: |
| * page/DragClient.h: |
| (WebCore::DragClient::prepareToDragPromisedBlob): |
| |
| Add new DragClient methods to send information about a promised blob to the UI process. |
| |
| * page/DragController.cpp: |
| (WebCore::DragController::startDrag): |
| |
| Call dragAttachmentElement when starting a drag on an attachment element. |
| |
| (WebCore::DragController::dragAttachmentElement): |
| |
| Try to begin dragging a given attachment element, propagating promised blob information to the client layers. |
| Returns true iff the attachment is backed by blob data (i.e. the file is nonnull). |
| |
| * platform/PromisedBlobInfo.h: |
| |
| Add a list of additional types and data to PromisedBlobInfo. In addition to the promised blob info, this would |
| allow injected bundle data and other private types alongside the main attachment data on the pasteboard. |
| |
| 2018-01-03 Simon Fraser <simon.fraser@apple.com> |
| |
| Remove the 'resolutionScale' parameter from ImageBufferDataCG get/putBytes |
| https://bugs.webkit.org/show_bug.cgi?id=181268 |
| |
| Reviewed by Alex Christensen. |
| |
| These functions were always called with resolutionScale=1. |
| |
| * platform/graphics/cg/ImageBufferCG.cpp: |
| (WebCore::ImageBuffer::getUnmultipliedImageData const): |
| (WebCore::ImageBuffer::getPremultipliedImageData const): |
| (WebCore::ImageBuffer::putByteArray): |
| * platform/graphics/cg/ImageBufferDataCG.cpp: |
| (WebCore::ImageBufferData::getData const): |
| (WebCore::ImageBufferData::putData): |
| (WebCore::affineWarpBufferData): Deleted. |
| * platform/graphics/cg/ImageBufferDataCG.h: |
| |
| 2018-01-03 John Wilander <wilander@apple.com> |
| |
| Storage Access API: Refactor XPC for access removal to go straight from the web process to the network process |
| https://bugs.webkit.org/show_bug.cgi?id=181270 |
| <rdar://problem/36289544> |
| |
| Reviewed by Alex Christensen. |
| |
| No new tests. Existing test re-enabled. |
| |
| This change refactors how the web process tells the network process |
| to remove storage access. Previously, this was done over the UI process |
| just like requests for storage access. But since no further reasoning |
| is needed, the message should go straight from the web process to the |
| network process for performance reasons and to minimize the risk of a |
| race. |
| |
| As a consequence, the XPC code for storage access removal in the UI |
| process is deleted. |
| |
| * platform/network/cf/NetworkStorageSessionCFNet.cpp: |
| (WebCore::NetworkStorageSession::cookieStoragePartition const): |
| Removes the storageAccessAPIEnabled check since the flag |
| doesn't get propagated when the network process is created. |
| Figuring this out will take some work which is unnecessary |
| when we already gate access to the feature in Document.idl. |
| |
| 2018-01-03 James Craig <jcraig@apple.com> |
| |
| AX: when invert colors is on, double-invert certain media elements in UserAgentStyleSheet |
| https://bugs.webkit.org/show_bug.cgi?id=168447 |
| <rdar://problem/30559874> |
| |
| Reviewed by Simon Fraser. |
| |
| Double-invert video when platform 'invert colors' setting is enabled. Behavior matches |
| current 'Smart Invert' feature of Safari Reader on macOS/iOS and other iOS native apps. |
| |
| Tests: accessibility/smart-invert-reference.html |
| accessibility/smart-invert.html |
| |
| * Modules/modern-media-controls/controls/media-controls.css: |
| (@media (inverted-colors)): |
| (:host): |
| (picture): |
| * css/html.css: |
| (@media (inverted-colors)): |
| (video): |
| |
| 2018-01-03 Youenn Fablet <youenn@apple.com> |
| |
| LayoutTest http/tests/media/media-stream/disconnected-frame.html to consistently fail an assertion: !m_adoptionIsRequired |
| https://bugs.webkit.org/show_bug.cgi?id=181264 |
| |
| Reviewed by Eric Carlson. |
| |
| Covered by http/tests/media/media-stream/disconnected-frame.html not crashing anymore in Debug builds. |
| Calling suspendIfNeeded in create method instead of constructor. |
| |
| * Modules/mediastream/UserMediaRequest.cpp: |
| (WebCore::UserMediaRequest::create): |
| (WebCore::UserMediaRequest::UserMediaRequest): |
| |
| 2018-01-03 Antti Koivisto <antti@apple.com> |
| |
| Remove DeprecatedCSSOMValue::equals |
| https://bugs.webkit.org/show_bug.cgi?id=181241 |
| |
| Reviewed by Zalan Bujtas. |
| |
| This is dead code. |
| |
| * css/DeprecatedCSSOMValue.cpp: |
| (WebCore::compareCSSOMValues): Deleted. |
| (WebCore::DeprecatedCSSOMValue::equals const): Deleted. |
| * css/DeprecatedCSSOMValue.h: |
| (WebCore::DeprecatedCSSOMValue::operator== const): Deleted. |
| (WebCore::DeprecatedCSSOMComplexValue::equals const): Deleted. |
| * css/DeprecatedCSSOMValueList.cpp: |
| (WebCore::DeprecatedCSSOMValueList::equals const): Deleted. |
| * css/DeprecatedCSSOMValueList.h: |
| |
| 2018-01-03 Simon Fraser <simon.fraser@apple.com> |
| |
| feLighting is broken with primitiveUnits="objectBoundingBox" |
| https://bugs.webkit.org/show_bug.cgi?id=181197 |
| |
| Reviewed by Tim Horton. |
| |
| With <filter primitiveUnits="objectBoundingBox"> we need to convert the coordinates |
| of fePointLights and feSpotLights into user space coordinates. Following |
| https://www.w3.org/TR/SVG/filters.html#FilterElementPrimitiveUnitsAttribute |
| this is done by treating them as fractions of the bounding box on the referencing |
| element, with treatment for z following https://www.w3.org/TR/SVG/coords.html#Units_viewport_percentage |
| |
| To do this, store the bounds of the referencing elemenet on SVGFilterBuilder as |
| targetBoundingBox, and store the primitiveUnits type. Then do the conversion of lighting |
| coordinates in SVGFESpecularLightingElement::build() and SVGFEDiffuseLightingElement::build(). |
| |
| Remove SVGFELightElement::findLightSource(), since we need to be able to pass the SVGFilterBuilder |
| to the lightSource() function so hoist the code up. |
| |
| Tests: svg/filters/feDiffuseLighting-fePointLight-primitiveUnits-objectBoundingBox-expected.svg |
| svg/filters/feDiffuseLighting-fePointLight-primitiveUnits-objectBoundingBox.svg |
| svg/filters/feDiffuseLighting-feSpotLight-primitiveUnits-objectBoundingBox-expected.svg |
| svg/filters/feDiffuseLighting-feSpotLight-primitiveUnits-objectBoundingBox.svg |
| svg/filters/feSpecularLighting-fePointLight-primitiveUnits-objectBoundingBox-expected.svg |
| svg/filters/feSpecularLighting-fePointLight-primitiveUnits-objectBoundingBox.svg |
| |
| * rendering/svg/RenderSVGResourceFilter.cpp: |
| (WebCore::RenderSVGResourceFilter::buildPrimitives const): |
| * svg/SVGFEDiffuseLightingElement.cpp: |
| (WebCore::SVGFEDiffuseLightingElement::build): |
| * svg/SVGFEDistantLightElement.cpp: |
| (WebCore::SVGFEDistantLightElement::lightSource const): |
| * svg/SVGFEDistantLightElement.h: |
| * svg/SVGFELightElement.cpp: |
| (WebCore::SVGFELightElement::findLightSource): Deleted. |
| * svg/SVGFELightElement.h: |
| * svg/SVGFEPointLightElement.cpp: |
| (WebCore::SVGFEPointLightElement::lightSource const): |
| * svg/SVGFEPointLightElement.h: |
| * svg/SVGFESpecularLightingElement.cpp: |
| (WebCore::SVGFESpecularLightingElement::build): |
| * svg/SVGFESpotLightElement.cpp: |
| (WebCore::SVGFESpotLightElement::lightSource const): |
| * svg/SVGFESpotLightElement.h: |
| * svg/graphics/filters/SVGFilterBuilder.h: |
| (WebCore::SVGFilterBuilder::setTargetBoundingBox): |
| (WebCore::SVGFilterBuilder::targetBoundingBox const): |
| (WebCore::SVGFilterBuilder::primitiveUnits const): |
| (WebCore::SVGFilterBuilder::setPrimitiveUnits): |
| |
| 2018-01-03 Antti Koivisto <antti@apple.com> |
| |
| Crash beneath CSSValue::equals @ csas.cz |
| https://bugs.webkit.org/show_bug.cgi?id=181243 |
| <rdar://problem/35990826> |
| |
| Reviewed by Alex Christensen. |
| |
| Test: fast/text/oblique-degree-equals-crash.html |
| |
| * css/CSSFontStyleValue.cpp: |
| (WebCore::CSSFontStyleValue::equals const): |
| |
| Null check both oblique pointers. |
| |
| 2018-01-03 Joseph Pecoraro <pecoraro@apple.com> |
| |
| Web Inspector: Slow open time enumerating system fonts (FontCache::systemFontFamilies) |
| https://bugs.webkit.org/show_bug.cgi?id=180979 |
| <rdar://problem/36146670> |
| |
| Reviewed by Matt Baker. |
| |
| * platform/graphics/cocoa/FontCacheCoreText.cpp: |
| (fontNameIsSystemFont): |
| (WebCore::FontCache::systemFontFamilies): |
| Switch to the original Mac algorithm before r180979 that uses |
| CTFontManagerCopyAvailableFontFamilyNames. Previously this wasn't |
| available on iOS but now it is. This is a performance improvement on |
| both platforms, but significantly so on macOS. It also finds more, |
| valid, family names. |
| |
| 2018-01-03 Michael Catanzaro <mcatanzaro@igalia.com> |
| |
| ASSERTION FAILED: !source || is<Target>(*source) in CoordinatedGraphicsLayer::removeFromParent |
| https://bugs.webkit.org/show_bug.cgi?id=166568 |
| |
| Reviewed by Simon Fraser. |
| |
| When a GraphicsLayer has a mask layer, it fails to properly unparent the mask layer before |
| it is destroyed. This leaves the mask layer with a dangling parent pointer. Fix it, while |
| taking care not to introduce yet another virtual function call during the execution of the |
| destructor. |
| |
| * platform/graphics/GraphicsLayer.cpp: |
| (WebCore::GraphicsLayer::willBeDestroyed): |
| |
| 2018-01-03 Simon Fraser <simon.fraser@apple.com> |
| |
| SVG lighting filter lights are in the wrong coordinate system |
| https://bugs.webkit.org/show_bug.cgi?id=181147 |
| |
| Reviewed by Zalan Bujtas. |
| |
| Point and spot light coordinates weren't being converted into buffer-relative |
| coordinates before being fed into the lighting math, resulting in incorrect light |
| rendering on Retina devices, and when the filter primitive region was clipped. |
| |
| Fix by storing absoluteUnclippedSubregion on FilterEffect, which allows us to map |
| lighting points from user space coordinates into the coordinates of the buffer being |
| used for rendering. Also scale the light z coordinate by doing a dummy point mapping in x. |
| |
| Rename members of PointLightSource and SpotLightSource to make it clear which coordinate |
| system they are in. |
| |
| Tests include HiDPI tests. |
| |
| Tests: svg/filters/fePointLight-coordinates-expected.svg |
| svg/filters/fePointLight-coordinates.svg |
| svg/filters/feSpotLight-coordinates-expected.svg |
| svg/filters/feSpotLight-coordinates.svg |
| svg/filters/hidpi/fePointLight-coordinates-expected.svg |
| svg/filters/hidpi/fePointLight-coordinates.svg |
| svg/filters/hidpi/feSpotLight-coordinates-expected.svg |
| svg/filters/hidpi/feSpotLight-coordinates.svg |
| |
| * platform/graphics/FloatPoint3D.h: Make it easy to get and set the X and Y coords as a FloatPoint. |
| (WebCore::FloatPoint3D::xy const): |
| (WebCore::FloatPoint3D::setXY): |
| * platform/graphics/GeometryUtilities.cpp: |
| (WebCore::mapPoint): |
| (WebCore::mapRect): |
| * platform/graphics/GeometryUtilities.h: Helper to make a point between rects. |
| * platform/graphics/filters/DistantLightSource.cpp: |
| (WebCore::DistantLightSource::initPaintingData): |
| * platform/graphics/filters/DistantLightSource.h: |
| * platform/graphics/filters/FELighting.cpp: |
| (WebCore::FELighting::drawLighting): |
| * platform/graphics/filters/FilterEffect.cpp: |
| (WebCore::FilterEffect::mapPointFromUserSpaceToBuffer const): |
| * platform/graphics/filters/FilterEffect.h: |
| (WebCore::FilterEffect::setUnclippedAbsoluteSubregion): |
| * platform/graphics/filters/LightSource.h: |
| * platform/graphics/filters/PointLightSource.cpp: |
| (WebCore::PointLightSource::initPaintingData): |
| (WebCore::PointLightSource::computePixelLightingData const): |
| (WebCore::PointLightSource::setX): |
| (WebCore::PointLightSource::setY): |
| (WebCore::PointLightSource::setZ): |
| * platform/graphics/filters/PointLightSource.h: |
| (WebCore::PointLightSource::position const): |
| (WebCore::PointLightSource::PointLightSource): |
| * platform/graphics/filters/SpotLightSource.cpp: |
| (WebCore::SpotLightSource::initPaintingData): |
| (WebCore::SpotLightSource::computePixelLightingData const): |
| (WebCore::SpotLightSource::setX): |
| (WebCore::SpotLightSource::setY): |
| (WebCore::SpotLightSource::setZ): |
| (WebCore::SpotLightSource::setPointsAtX): |
| (WebCore::SpotLightSource::setPointsAtY): |
| (WebCore::SpotLightSource::setPointsAtZ): |
| * platform/graphics/filters/SpotLightSource.h: |
| (WebCore::SpotLightSource::position const): |
| (WebCore::SpotLightSource::direction const): |
| (WebCore::SpotLightSource::SpotLightSource): |
| * rendering/svg/RenderSVGResourceFilter.cpp: |
| (WebCore::RenderSVGResourceFilter::buildPrimitives const): |
| * rendering/svg/RenderSVGResourceFilterPrimitive.cpp: |
| (WebCore::RenderSVGResourceFilterPrimitive::determineFilterPrimitiveSubregion): |
| |
| 2018-01-03 Youenn Fablet <youenn@apple.com> |
| |
| Select service worker for documents with data/blob URLS |
| https://bugs.webkit.org/show_bug.cgi?id=181213 |
| |
| Reviewed by Alex Christensen. |
| |
| Covered by updated test. |
| |
| Reusing the service worker of the parent for blob/data URL documents. |
| |
| * loader/DocumentLoader.cpp: |
| (WebCore::isLocalURL): |
| (WebCore::DocumentLoader::commitData): |
| |
| 2018-01-03 Ryan Haddad <ryanhaddad@apple.com> |
| |
| Unreviewed, rolling out r226352. |
| |
| Breaks Sierra and El Capitan builds. |
| |
| Reverted changeset: |
| |
| "Web Inspector: Slow open time enumerating system fonts |
| (FontCache::systemFontFamilies)" |
| https://bugs.webkit.org/show_bug.cgi?id=180979 |
| https://trac.webkit.org/changeset/226352 |
| |
| 2018-01-03 Philippe Normand <pnormand@igalia.com> |
| |
| [GStreamer] The bus synchronous handler should be in the base player class |
| https://bugs.webkit.org/show_bug.cgi?id=181237 |
| |
| Reviewed by Carlos Garcia Campos. |
| |
| Because this is where video rendering is handled. |
| |
| No new tests, this is only a refactoring. |
| |
| * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp: |
| (WebCore::MediaPlayerPrivateGStreamer::createGSTPlayBin): |
| * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp: |
| (WebCore::MediaPlayerPrivateGStreamerBase::setPipeline): |
| |
| 2018-01-03 Philippe Normand <pnormand@igalia.com> |
| |
| [GStreamer] move MediaSample implementation out of mse/ |
| https://bugs.webkit.org/show_bug.cgi?id=179165 |
| |
| Reviewed by Carlos Garcia Campos. |
| |
| This module isn't specific to MSE and can potentially be reused |
| elsewhere, for WebRTC for instance. Additionally the |
| ::platformSample() method was implemented and the code was cleaned up. |
| |
| * platform/GStreamer.cmake: |
| * platform/MediaSample.h: |
| * platform/graphics/gstreamer/GStreamerMediaSample.cpp: Renamed from Source/WebCore/platform/graphics/gstreamer/mse/GStreamerMediaSample.cpp. |
| (WebCore::GStreamerMediaSample::platformSample): |
| * platform/graphics/gstreamer/GStreamerMediaSample.h: Renamed from Source/WebCore/platform/graphics/gstreamer/mse/GStreamerMediaSample.h. |
| * platform/graphics/gstreamer/mse/PlaybackPipeline.cpp: |
| (WebCore::PlaybackPipeline::enqueueSample): |
| |
| 2018-01-03 Carlos Garcia Campos <cgarcia@igalia.com> |
| |
| Unreviewed. Fix resource load stats tests on GLib based ports after r226355. |
| |
| The monitor can be created in the work queue thread too. |
| |
| * platform/glib/FileMonitorGLib.cpp: |
| (WebCore::FileMonitor::FileMonitor): |
| |
| 2018-01-03 Carlos Garcia Campos <cgarcia@igalia.com> |
| |
| [GTK] Crash destroying WebCore::FileMonitor |
| https://bugs.webkit.org/show_bug.cgi?id=181138 |
| |
| Reviewed by Michael Catanzaro. |
| |
| Ensure that platform file monitor is always created and destroyed in the work queue thread synchronously. |
| |
| * platform/FileMonitor.h: |
| * platform/glib/FileMonitorGLib.cpp: |
| (WebCore::FileMonitor::FileMonitor): |
| (WebCore::FileMonitor::~FileMonitor): |
| (WebCore::FileMonitor::didChange): |
| |
| 2018-01-02 Joseph Pecoraro <pecoraro@apple.com> |
| |
| Web Inspector: Slow open time enumerating system fonts (FontCache::systemFontFamilies) |
| https://bugs.webkit.org/show_bug.cgi?id=180979 |
| <rdar://problem/36146670> |
| |
| Reviewed by Matt Baker. |
| |
| * platform/graphics/cocoa/FontCacheCoreText.cpp: |
| (WebCore::FontCache::systemFontFamilies): |
| Switch to the original Mac algorithm before r180979 that uses |
| CTFontManagerCopyAvailableFontFamilyNames. Previously this wasn't |
| available on iOS but now it is. This is a performance improvement on |
| both platforms, but significantly so on macOS. It also finds more, |
| valid, family names. |
| |
| 2018-01-02 Yusuke Suzuki <utatane.tea@gmail.com> |
| |
| Unreviewed, fix GCC warning by using #include |
| https://bugs.webkit.org/show_bug.cgi?id=181189 |
| |
| This file is included in C++ files. Use #include instead of #import to suppress warning in GCC. |
| |
| * platform/PromisedBlobInfo.h: |
| |
| 2017-12-28 Yusuke Suzuki <utatane.tea@gmail.com> |
| |
| Remove std::chrono completely |
| https://bugs.webkit.org/show_bug.cgi?id=181186 |
| |
| Reviewed by Alex Christensen. |
| |
| Use MonotonicTime, WallTime, and Seconds instead. |
| Changes are mechanical ones. But persistent network cache data is changed. |
| So we bump the version number of the cache storage. |
| |
| * Modules/indexeddb/server/IDBServer.cpp: |
| (WebCore::IDBServer::IDBServer::closeAndDeleteDatabasesModifiedSince): |
| (WebCore::IDBServer::removeAllDatabasesForOriginPath): |
| (WebCore::IDBServer::IDBServer::performCloseAndDeleteDatabasesModifiedSince): |
| (WebCore::IDBServer::IDBServer::performCloseAndDeleteDatabasesForOrigins): |
| * Modules/indexeddb/server/IDBServer.h: |
| * Modules/webdatabase/DatabaseTracker.cpp: |
| (WebCore::DatabaseTracker::deleteDatabasesModifiedSince): |
| * Modules/webdatabase/DatabaseTracker.h: |
| * dom/Document.cpp: |
| (WebCore::Document::lastModified): |
| * html/HTMLMediaElement.cpp: |
| (WebCore::HTMLMediaElement::clearMediaCache): |
| * html/HTMLMediaElement.h: |
| (WebCore::HTMLMediaElement::clearMediaCache): |
| * loader/CrossOriginPreflightResultCache.cpp: |
| (WebCore::parseAccessControlMaxAge): |
| (WebCore::CrossOriginPreflightResultCacheItem::parse): |
| (WebCore::CrossOriginPreflightResultCacheItem::allowsRequest const): |
| * loader/CrossOriginPreflightResultCache.h: |
| * loader/cache/CachedResource.cpp: |
| (WebCore::CachedResource::CachedResource): |
| (WebCore::CachedResource::freshnessLifetime const): |
| (WebCore::CachedResource::responseReceived): |
| (WebCore::CachedResource::updateResponseAfterRevalidation): |
| * loader/cache/CachedResource.h: |
| * platform/FileSystem.cpp: |
| (WebCore::FileSystem::getFileModificationTime): |
| * platform/FileSystem.h: |
| * platform/SearchPopupMenu.h: |
| * platform/cocoa/SearchPopupMenuCocoa.h: |
| * platform/cocoa/SearchPopupMenuCocoa.mm: |
| (WebCore::toSystemClockTime): |
| (WebCore::toNSDateFromSystemClock): |
| (WebCore::removeRecentlyModifiedRecentSearches): |
| * platform/graphics/MediaPlayer.cpp: |
| (WebCore::MediaPlayer::clearMediaCache): |
| * platform/graphics/MediaPlayer.h: |
| * platform/graphics/MediaPlayerPrivate.h: |
| (WebCore::MediaPlayerPrivateInterface::clearMediaCache): |
| * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h: |
| * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm: |
| (WebCore::toSystemClockTime): |
| (WebCore::MediaPlayerPrivateAVFoundationObjC::clearMediaCache): |
| * platform/graphics/mac/MediaPlayerPrivateQTKit.h: |
| * platform/graphics/mac/MediaPlayerPrivateQTKit.mm: |
| (WebCore::MediaPlayerPrivateQTKit::clearMediaCache): |
| * platform/network/CacheValidation.cpp: |
| (WebCore::computeCurrentAge): |
| (WebCore::computeFreshnessLifetimeForHTTPFamily): |
| (WebCore::updateRedirectChainStatus): |
| (WebCore::redirectChainAllowsReuse): |
| (WebCore::parseCacheControlDirectives): |
| * platform/network/CacheValidation.h: |
| (WebCore::RedirectChainCacheStatus::RedirectChainCacheStatus): |
| * platform/network/HTTPParsers.cpp: |
| (WebCore::parseHTTPDate): |
| * platform/network/HTTPParsers.h: |
| * platform/network/PlatformCookieJar.h: |
| * platform/network/ResourceResponseBase.cpp: |
| (WebCore::ResourceResponseBase::cacheControlMaxAge const): |
| (WebCore::parseDateValueInHeader): |
| (WebCore::ResourceResponseBase::date const): |
| (WebCore::ResourceResponseBase::age const): |
| (WebCore::ResourceResponseBase::expires const): |
| (WebCore::ResourceResponseBase::lastModified const): |
| * platform/network/ResourceResponseBase.h: |
| * platform/network/cf/CookieJarCFNet.cpp: |
| (WebCore::deleteAllCookiesModifiedSince): |
| * platform/network/curl/CookieJarCurl.cpp: |
| (WebCore::CookieJarCurlFileSystem::deleteAllCookiesModifiedSince): |
| (WebCore::deleteAllCookiesModifiedSince): |
| * platform/network/curl/CookieJarCurl.h: |
| * platform/network/curl/CurlCacheEntry.cpp: |
| (WebCore::CurlCacheEntry::CurlCacheEntry): |
| (WebCore::CurlCacheEntry::isCached): |
| (WebCore::CurlCacheEntry::parseResponseHeaders): |
| * platform/network/curl/CurlCacheEntry.h: |
| * platform/network/mac/CookieJarMac.mm: |
| (WebCore::deleteAllCookiesModifiedSince): |
| * platform/network/soup/CookieJarSoup.cpp: |
| (WebCore::deleteAllCookiesModifiedSince): |
| * platform/win/SearchPopupMenuWin.cpp: |
| (WebCore::SearchPopupMenuWin::loadRecentSearches): |
| * rendering/RenderSearchField.cpp: |
| (WebCore::RenderSearchField::addSearchResult): |
| |
| 2018-01-02 Wenson Hsieh <wenson_hsieh@apple.com> |
| |
| [Attachment Support] Introduce data structures and IPC support for writing promised blobs |
| https://bugs.webkit.org/show_bug.cgi?id=181189 |
| |
| Reviewed by Tim Horton. |
| |
| Introduces a new header containing structs to be used for writing blob data when dragging. PromisedBlobInfo |
| represents information needed to declare data on the pasteboard that will eventually be provided via a Blob. |
| This includes the type and filename of the Blob-backed content. PromisedBlobData represents information needed |
| to actually deliver the Blob's content to the platform, and is sent some time after its corresponding |
| PromisedBlobInfo. The content may either be in the form of a file path (as is the case using the previous |
| declareAndWriteAttachment codepath) or a data buffer (which we would use if the Blob is not already backed by a |
| file on disk). |
| |
| No new tests, since there is no observable change in functionality yet. |
| |
| * WebCore.xcodeproj/project.pbxproj: |
| * platform/PromisedBlobInfo.h: Added. |
| (WebCore::PromisedBlobInfo::operator bool const): |
| (WebCore::PromisedBlobData::hasData const): |
| (WebCore::PromisedBlobData::hasFile const): |
| (WebCore::PromisedBlobData::operator bool const): |
| (WebCore::PromisedBlobData::fulfills const): |
| |
| 2018-01-02 Brady Eidson <beidson@apple.com> |
| |
| Make MessagePortChannel::takeAllMessagesFromRemote asynchronous. |
| https://bugs.webkit.org/show_bug.cgi?id=181205 |
| |
| Reviewed by Alex Christensen. |
| |
| No new tests (No behavior change) |
| |
| This is needed for the ongoing WK2 MessagePort work. |
| |
| For WK1 in-process MessagePorts it is still synchronous; no behavior change. |
| |
| * dom/InProcessMessagePortChannel.cpp: |
| (WebCore::InProcessMessagePortChannel::takeAllMessagesFromRemote): |
| * dom/InProcessMessagePortChannel.h: |
| |
| * dom/MessagePort.cpp: |
| (WebCore::MessagePort::dispatchMessages): |
| * dom/MessagePortChannel.h: |
| |
| 2018-01-02 Jiewen Tan <jiewen_tan@apple.com> |
| |
| Add a WebAuthentication runtime feature flag |
| https://bugs.webkit.org/show_bug.cgi?id=181220 |
| <rdar://problem/36055305> |
| |
| Reviewed by Brent Fulgham. |
| |
| This patch basically renames the CredentialManagement runtime feature flag into |
| WebAuthentication runtime feature flag. |
| |
| No tests. |
| |
| * Modules/credentialmanagement/BasicCredential.idl: |
| * Modules/credentialmanagement/CredentialsContainer.idl: |
| * Modules/credentialmanagement/NavigatorCredentials.idl: |
| * Modules/webauthn/PublicKeyCredential.idl: |
| * page/RuntimeEnabledFeatures.h: |
| (WebCore::RuntimeEnabledFeatures::setWebAuthenticationEnabled): |
| (WebCore::RuntimeEnabledFeatures::webAuthenticationEnabled const): |
| (WebCore::RuntimeEnabledFeatures::setCredentialManagementEnabled): Deleted. |
| (WebCore::RuntimeEnabledFeatures::credentialManagementEnabled const): Deleted. |
| |
| 2018-01-02 Wenson Hsieh <wenson_hsieh@apple.com> |
| |
| [Attachment Support] Don't Blob-convert images and attachments with https:, http: or data: urls |
| https://bugs.webkit.org/show_bug.cgi?id=181143 |
| <rdar://problem/36200381> |
| |
| Reviewed by Tim Horton. |
| |
| Clients such as Mail would expect pasting or dropping an image with src="https://..." to result in the source |
| URL being preserved (i.e. staying as remote images) instead of creating image attachments out of them. This |
| patch hooks into the shouldConvertToBlob() check added in r226272 so that it applies to attachment element |
| replacement as well. |
| |
| Test: WKAttachmentTests.DoNotInsertDataURLImagesAsAttachments |
| |
| * editing/cocoa/WebContentReaderCocoa.mm: |
| (WebCore::shouldConvertToBlob): |
| (WebCore::replaceRichContentWithAttachments): |
| |
| 2018-01-02 Brady Eidson <beidson@apple.com> |
| |
| Identify MessagePorts by a globally unique MessagePortIdentifier. |
| https://bugs.webkit.org/show_bug.cgi?id=181172 |
| |
| Reviewed by Alex Christensen. |
| |
| No new tests (Behavior change covered by all existing tests). |
| |
| This cleans up the abstract MessagePortChannel interface to be in terms of identifiers |
| instead of actual MessagePort objects. |
| |
| The identifiers are compounded with the current ProcessIdentifier meaning they are global |
| across all processes for the running UI process, enabling easy cross-process communication. |
| |
| (Actual cross-process communication comes in a followup) |
| |
| * WebCore.xcodeproj/project.pbxproj: |
| |
| * dom/InProcessMessagePortChannel.cpp: |
| (WebCore::InProcessMessagePortChannel::createChannelBetweenPorts): |
| (WebCore::InProcessMessagePortChannel::isConnectedTo): |
| (WebCore::InProcessMessagePortChannel::entangleWithRemoteIfOpen): |
| (WebCore::InProcessMessagePortChannel::entangleIfOpen): Deleted. |
| * dom/InProcessMessagePortChannel.h: |
| |
| * dom/MessageChannel.cpp: |
| (WebCore::MessageChannel::MessageChannel): |
| (WebCore::m_port2): |
| |
| * dom/MessagePort.cpp: |
| (WebCore::allMessagePortsLock): |
| (WebCore::MessagePort::ref const): |
| (WebCore::MessagePort::deref const): |
| (WebCore::MessagePort::existingMessagePortForIdentifier): |
| (WebCore::MessagePort::MessagePort): |
| (WebCore::MessagePort::~MessagePort): |
| (WebCore::MessagePort::postMessage): |
| (WebCore::MessagePort::entangleWithRemote): |
| (WebCore::MessagePort::entanglePorts): |
| (WebCore::MessagePort::entangle): Deleted. |
| * dom/MessagePort.h: |
| |
| * dom/MessagePortChannel.h: |
| |
| * dom/MessagePortIdentifier.h: Added. |
| (WebCore::operator==): |
| (WebCore::MessagePortIdentifier::encode const): |
| (WebCore::MessagePortIdentifier::decode): |
| (WebCore::MessagePortIdentifier::hash const): |
| (WTF::MessagePortIdentifierHash::hash): |
| (WTF::MessagePortIdentifierHash::equal): |
| (WTF::HashTraits<WebCore::MessagePortIdentifier>::emptyValue): |
| (WTF::HashTraits<WebCore::MessagePortIdentifier>::constructDeletedValue): |
| (WTF::HashTraits<WebCore::MessagePortIdentifier>::isDeletedValue): |
| |
| 2018-01-02 Youenn Fablet <youenn@apple.com> |
| |
| Memory cache should not reuse resources with different credential fetch option |
| https://bugs.webkit.org/show_bug.cgi?id=181212 |
| |
| Reviewed by Alex Christensen. |
| |
| Covered by rebased test. |
| |
| * loader/cache/CachedResourceLoader.cpp: |
| (WebCore::CachedResourceLoader::determineRevalidationPolicy const): |
| |
| 2018-01-02 Jiewen Tan <jiewen_tan@apple.com> |
| |
| Update Credential Management API for WebAuthentication |
| https://bugs.webkit.org/show_bug.cgi?id=181082 |
| <rdar://problem/36055239> |
| |
| Reviewed by Brent Fulgham. |
| |
| Part 2/2 |
| |
| This patch implements Core API from Credential Management API: https://www.w3.org/TR/credential-management-1/#core. |
| which is required by WebAuthN. It also sets the CredentialManagement runtime flag to enable testing. Note that it |
| introduces a dummy PublicKeyCredential interface for testing functionalities of the Credential interface, which |
| cannot be instantiated. |
| |
| Tests: http/wpt/credential-management/credentialscontainer-create-basics.https.html |
| http/wpt/credential-management/credentialscontainer-get-basics.https.html |
| http/wpt/credential-management/credentialscontainer-preventSilentAccess-basics.https.html |
| http/wpt/credential-management/idl.https.html |
| |
| * CMakeLists.txt: |
| * DerivedSources.make: |
| * Modules/credentialmanagement/BasicCredential.cpp: |
| (WebCore::BasicCredential::BasicCredential): |
| (WebCore::BasicCredential::type const): |
| * Modules/credentialmanagement/BasicCredential.h: |
| (WebCore::BasicCredential::discovery const): |
| * Modules/credentialmanagement/BasicCredential.idl: |
| * Modules/credentialmanagement/CredentialCreationOptions.h: |
| * Modules/credentialmanagement/CredentialCreationOptions.idl: |
| * Modules/credentialmanagement/CredentialRequestOptions.h: |
| * Modules/credentialmanagement/CredentialRequestOptions.idl: |
| * Modules/credentialmanagement/CredentialsContainer.cpp: |
| (WebCore::CredentialsContainer::CredentialsContainer): |
| (WebCore::CredentialsContainer::isSameOriginWithItsAncestors): |
| (WebCore::CredentialsContainer::dispatchTask): |
| (WebCore::CredentialsContainer::get): |
| (WebCore::CredentialsContainer::store): |
| (WebCore::CredentialsContainer::isCreate): |
| (WebCore::CredentialsContainer::preventSilentAccess): |
| * Modules/credentialmanagement/CredentialsContainer.h: |
| (WebCore::CredentialsContainer::create): |
| (WebCore::CredentialsContainer::CredentialsContainer): Deleted. |
| * Modules/credentialmanagement/CredentialsContainer.idl: |
| * Modules/credentialmanagement/NavigatorCredentials.cpp: |
| (WebCore::NavigatorCredentials::credentials): |
| * Modules/credentialmanagement/NavigatorCredentials.h: |
| * Modules/credentialmanagement/NavigatorCredentials.idl: |
| * Modules/webauthn/PublicKeyCredential.cpp: Copied from Source/WebCore/Modules/credentialmanagement/BasicCredential.cpp. |
| (WebCore::PublicKeyCredential::PublicKeyCredential): |
| (WebCore::PublicKeyCredential::collectFromCredentialStore): |
| (WebCore::PublicKeyCredential::discoverFromExternalSource): |
| (WebCore::PublicKeyCredential::store): |
| (WebCore::PublicKeyCredential::create): |
| * Modules/webauthn/PublicKeyCredential.h: Copied from Source/WebCore/Modules/credentialmanagement/BasicCredential.cpp. |
| * Modules/webauthn/PublicKeyCredential.idl: Copied from Source/WebCore/Modules/credentialmanagement/BasicCredential.idl. |
| * Sources.txt: |
| * WebCore.xcodeproj/project.pbxproj: |
| * bindings/js/WebCoreBuiltinNames.h: |
| * page/RuntimeEnabledFeatures.h: |
| |
| 2018-01-02 Oleksandr Skachkov <gskachkov@gmail.com> |
| |
| WebAssembly: sending module to iframe fails |
| https://bugs.webkit.org/show_bug.cgi?id=179263 |
| |
| Reviewed by JF Bastien. |
| |
| Allow use WebAssembly.Module as input parameters for postMessage |
| in window and iframe object. To prevent sending message to iframe |
| that is not ready, in iframe-* test we are waiting message from |
| iframe only after that we send message to it. |
| |
| Tests: wasm/iframe-parent-postmessage.html |
| wasm/iframe-postmessage.html |
| wasm/window-postmessage.html |
| |
| * bindings/js/SerializedScriptValue.cpp: |
| (WebCore::CloneSerializer::dumpIfTerminal): |
| * bindings/js/SerializedScriptValue.h: |
| * page/DOMWindow.cpp: |
| (WebCore::DOMWindow::postMessage): |
| |
| == Rolled over to ChangeLog-2018-01-01 == |