Implement CSS `display: flow-root` (modern clearfix)
[WebKit-https.git] / Source / WebCore / ChangeLog
index 52b8265..5714973 100644 (file)
@@ -1,3 +1,401 @@
+2019-05-17  Joonghun Park  <pjh0718@gmail.com>
+
+        Implement CSS `display: flow-root` (modern clearfix)
+        https://bugs.webkit.org/show_bug.cgi?id=165603
+
+        Reviewed by Zalan Bujtas.
+
+        This change follows https://drafts.csswg.org/css-display-3/#valdef-display-flow-root as below.
+
+        'display: flow-root' generates a block container box, and lays out its contents using flow layout.
+        It always establishes a new block formatting context for its contents.
+
+        * css/CSSPrimitiveValueMappings.h:
+        (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
+        * css/CSSValueKeywords.in:
+        * css/StyleResolver.cpp:
+        (WebCore::equivalentBlockDisplay):
+        * css/parser/CSSParserFastPaths.cpp:
+        (WebCore::CSSParserFastPaths::isValidKeywordPropertyAndValue):
+        * rendering/RenderBox.cpp:
+        (WebCore::RenderBox::createsNewFormattingContext const):
+        * rendering/RenderElement.cpp:
+        (WebCore::RenderElement::createFor):
+        * rendering/style/RenderStyleConstants.h:
+
+2019-05-17  Don Olmstead  <don.olmstead@sony.com>
+
+        [CMake] Use builtin FindICU
+        https://bugs.webkit.org/show_bug.cgi?id=197934
+
+        Reviewed by Michael Catanzaro.
+
+        Remove uses of ICU_INCLUDE_DIRS and ICU_LIBRARIES.
+
+        * CMakeLists.txt:
+        * PlatformPlayStation.cmake:
+        * PlatformWPE.cmake:
+
+2019-05-17  Alex Christensen  <achristensen@webkit.org>
+
+        Enable legacy EME for iOS WKWebView
+        https://bugs.webkit.org/show_bug.cgi?id=197964
+        <rdar://problem/50625666>
+
+        Reviewed by Wenson Hsieh.
+
+        This was attempted unsuccessfully in r230169.
+        Verified manually that it works as desired.
+
+        * page/RuntimeEnabledFeatures.h:
+
+2019-05-17  Sihui Liu  <sihui_liu@apple.com>
+
+        ASSERTION FAILED: !m_backingStore in WebCore::IDBServer::UniqueIDBDatabase::didDeleteBackingStore(uint64_t)
+        https://bugs.webkit.org/show_bug.cgi?id=197741
+        <rdar://problem/50625006>
+
+        Reviewed by Youenn Fablet.
+
+        If an open request is made before a delete request, open task should be performed before delete task on the
+        database thread. After r242911, open request needs to wait decision of StorageQuotaManager before posting task
+        to database thread, while delete request needs not. This makes deletion happen before open.
+
+        We need to make sure tasks are in correct order by not starting next open or delete request when database is in 
+        the middle of open or deletion.
+
+        * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
+        (WebCore::IDBServer::UniqueIDBDatabase::performCurrentOpenOperation):
+        (WebCore::IDBServer::UniqueIDBDatabase::handleDatabaseOperations):
+
+2019-05-17  Antoine Quint  <graouts@apple.com>
+
+        Add a website policy to disable the legacy -webkit-overflow-scrolling:touch behavior
+        https://bugs.webkit.org/show_bug.cgi?id=197943
+        <rdar://problem/49078202>
+
+        Reviewed by Brent Fulgham.
+
+        Tests: fast/scrolling/ipad/overflow-scrolling-touch-enabled-stacking-modern-compatibility-mode.html
+               platform/ipad/fast/css/webkit-overflow-scrolling-parsing-modern-compatibility-mode.html
+
+        * css/parser/CSSParserContext.cpp:
+        (WebCore::CSSParserContext::CSSParserContext):
+        * loader/DocumentLoader.h:
+        (WebCore::DocumentLoader::legacyOverflowScrollingTouchPolicy const):
+        (WebCore::DocumentLoader::setLegacyOverflowScrollingTouchPolicy):
+
+2019-05-17  Alex Christensen  <achristensen@webkit.org>
+
+        Add SPI to set a list of hosts to which to send custom header fields cross-origin
+        https://bugs.webkit.org/show_bug.cgi?id=197397
+
+        Reviewed by Geoff Garen.
+
+        In r223001 I added the ability to send custom headers, but with a restriction that they will not be sent except to the origin of the main document.
+        We need the ability to specify what origins to send these headers to even if they are not first party requests.
+        We get this information in a list of strings which are the hosts to send the headers to.  Some of the strings have an asterisk at the beginning,
+        indicating that the headers are to be sent to all subdomains.
+
+        I repurposed some ObjC SPI that was never adopted, but I keep testing the C API that was to verify no regression.
+        I also added some new API tests for the new behavior.
+
+        * Sources.txt:
+        * WebCore.xcodeproj/project.pbxproj:
+        * loader/CustomHeaderFields.cpp: Added.
+        (WebCore::CustomHeaderFields::thirdPartyDomainsMatch const):
+        * loader/CustomHeaderFields.h: Added.
+        (WebCore::CustomHeaderFields::encode const):
+        (WebCore::CustomHeaderFields::decode):
+        * loader/DocumentLoader.cpp:
+        (WebCore::DocumentLoader::setCustomHeaderFields): Deleted.
+        * loader/DocumentLoader.h:
+        (WebCore::DocumentLoader::setCustomHeaderFields):
+        (WebCore::DocumentLoader::customHeaderFields const):
+        (WebCore::DocumentLoader::customHeaderFields): Deleted.
+        * loader/cache/CachedResourceLoader.cpp:
+        (WebCore::CachedResourceLoader::requestResource):
+
+2019-05-17  Youenn Fablet  <youenn@apple.com>
+
+        Make AVVideoCaptureSource more robust to configuration failures
+        https://bugs.webkit.org/show_bug.cgi?id=197997
+        rdar://problem/50875662
+
+        Reviewed by Eric Carlson.
+
+        Covered by manual testing.
+
+        * platform/mediastream/mac/AVVideoCaptureSource.mm:
+        (WebCore::AVVideoCaptureSource::setSessionSizeAndFrameRate):
+        Make sure to commit configuration once calling beginConfiguration.
+        In case of error in setting frame rate, log the error but continue capturing.
+
+2019-05-17  Rob Buis  <rbuis@igalia.com>
+
+        Implement imagesrcset and imagesizes attributes on link rel=preload
+        https://bugs.webkit.org/show_bug.cgi?id=192950
+
+        Reviewed by Youenn Fablet.
+
+        Implement imagesrcset and imagesizes attributes for both Link header
+        and link element.
+
+        Tests: imported/w3c/web-platform-tests/preload/dynamic-adding-preload-imagesrcset.html
+               imported/w3c/web-platform-tests/preload/link-header-preload-delay-onload.html
+               imported/w3c/web-platform-tests/preload/link-header-preload-imagesrcset.html
+               imported/w3c/web-platform-tests/preload/link-header-preload-nonce.html
+               imported/w3c/web-platform-tests/preload/link-header-preload.html
+               imported/w3c/web-platform-tests/preload/onload-event.html
+               imported/w3c/web-platform-tests/preload/preload-with-type.html
+
+        * html/HTMLAttributeNames.in:
+        * html/HTMLLinkElement.cpp:
+        (WebCore::HTMLLinkElement::process):
+        * html/HTMLLinkElement.idl:
+        * loader/LinkHeader.cpp:
+        (WebCore::paramterNameFromString):
+        (WebCore::LinkHeader::setValue):
+        (WebCore::LinkHeader::LinkHeader):
+        * loader/LinkHeader.h:
+        (WebCore::LinkHeader::imageSrcSet const):
+        (WebCore::LinkHeader::imageSizes const):
+        (WebCore::LinkHeader::isViewportDependent const):
+        * loader/LinkLoader.cpp:
+        (WebCore::LinkLoader::loadLinksFromHeader):
+        (WebCore::LinkLoader::preloadIfNeeded):
+        (WebCore::LinkLoader::loadLink):
+        * loader/LinkLoader.h:
+
+2019-05-17  Keith Rollin  <krollin@apple.com>
+
+        Re-enable generate-xcfilelists
+        https://bugs.webkit.org/show_bug.cgi?id=197933
+        <rdar://problem/50831677>
+
+        Reviewed by Jonathan Bedard.
+
+        The following two tasks have been completed, and we can re-enable
+        generate-xcfilelists:
+
+        Bug 197619 <rdar://problem/50507392> Temporarily disable generate-xcfilelists (197619)
+        Bug 197622 <rdar://problem/50508222> Rewrite generate-xcfilelists in Python (197622)
+
+        No new tests -- no change in user-visible functionality.
+
+        * Scripts/check-xcfilelists.sh:
+
+2019-05-17  Wenson Hsieh  <wenson_hsieh@apple.com>
+
+        Fix a typo in some user agent string logic
+        https://bugs.webkit.org/show_bug.cgi?id=197992
+        <rdar://problem/50895962>
+
+        Reviewed by Brent Fulgham.
+
+        Adjust the major version number for the desktop user agent string.
+
+        * platform/ios/UserAgentIOS.mm:
+        (WebCore::standardUserAgentWithApplicationName):
+
+2019-05-17  Simon Fraser  <simon.fraser@apple.com>
+
+        REGRESSION (r245170): gmail.com inbox table header flickers
+        https://bugs.webkit.org/show_bug.cgi?id=198005
+        <rdar://problem/50907718>
+
+        Reviewed by Antti Koivisto.
+
+        When a layer started as painting into shared backing, but then became independently
+        composited (e.g. by having to clip composited children), it wouldn't have the "overlap"
+        indirect compositing reason. This allowed requiresOwnBackingStore() to say that it
+        could paint into some ancestor, but this breaks overlap. So in this code path,
+        put IndirectCompositingReason::Overlap back on the layer which restores the previous
+        behavior.
+
+        Make some logging changes to help diagnose things like this.
+
+        Test: compositing/shared-backing/overlap-after-end-sharing.html
+
+        * rendering/RenderLayer.cpp:
+        (WebCore::RenderLayer::calculateClipRects const):
+        (WebCore::outputPaintOrderTreeLegend):
+        (WebCore::outputPaintOrderTreeRecursive):
+        * rendering/RenderLayer.h:
+        * rendering/RenderLayerCompositor.cpp:
+        (WebCore::RenderLayerCompositor::computeCompositingRequirements):
+        (WebCore::RenderLayerCompositor::updateBacking):
+        (WebCore::RenderLayerCompositor::requiresOwnBackingStore const):
+        (WebCore::RenderLayerCompositor::reasonsForCompositing const):
+        (WebCore::RenderLayerCompositor::requiresCompositingForIndirectReason const):
+        * rendering/RenderLayerCompositor.h:
+
+2019-05-17  Simon Fraser  <simon.fraser@apple.com>
+
+        REGRESSION (r245170): gmail.com header flickers when hovering over the animating buttons
+        https://bugs.webkit.org/show_bug.cgi?id=197975
+        <rdar://problem/50865946>
+
+        Reviewed by Antti Koivisto.
+
+        When computeCompositingRequirements() determined that a layer could paint into shared backing, it
+        pushed an overlap container. If that layer then converted to normal composting, we'd push a second
+        overlap container, which left the overlap map in a bad state for the rest of the compositing
+        traversal, causing layers to not get composited when necessary.
+
+        Test: compositing/shared-backing/overlap-after-shared-to-composited.html
+
+        * rendering/RenderLayerCompositor.cpp:
+        (WebCore::RenderLayerCompositor::computeCompositingRequirements):
+
+2019-05-17  Commit Queue  <commit-queue@webkit.org>
+
+        Unreviewed, rolling out r245401.
+        https://bugs.webkit.org/show_bug.cgi?id=197990
+
+        Causing internal build failures (Requested by ShawnRoberts on
+        #webkit).
+
+        Reverted changeset:
+
+        "Add SPI to set a list of hosts to which to send custom header
+        fields cross-origin"
+        https://bugs.webkit.org/show_bug.cgi?id=197397
+        https://trac.webkit.org/changeset/245401
+
+2019-05-16  Said Abou-Hallawa  <sabouhallawa@apple.com>
+
+        SVGElement should detach itself from all its properties before it is deleted
+        https://bugs.webkit.org/show_bug.cgi?id=197954
+
+        Reviewed by Simon Fraser.
+
+        Before deleting the SVGElement node, SVGElement::detachAllProperties()
+        needs to be called. This will make the properties be detached objects
+        which means no change will be committed unless these properties are
+        attached to another owner.
+
+        Test: svg/dom/svg-properties-detach-change.html
+
+        * dom/Node.cpp:
+        (WebCore::Node::removedLastRef):
+        * svg/SVGElement.h:
+        (WebCore::SVGElement::detachAllProperties):
+
+2019-05-17  Eric Carlson  <eric.carlson@apple.com>
+
+        Allow sequential playback of media files when initial playback started with a user gesture
+        https://bugs.webkit.org/show_bug.cgi?id=197959
+        <rdar://problem/50655207>
+
+        Reviewed by Youenn Fablet.
+
+        Test: media/playlist-inherits-user-gesture.html
+
+        * dom/Document.cpp:
+        (WebCore::Document::processingUserGestureForMedia const): Return true if it is within
+        one second of the last HTMLMediaElement 'ended' event.
+        * dom/Document.h:
+        (WebCore::Document::mediaFinishedPlaying):
+
+        * html/HTMLMediaElement.cpp:
+        (WebCore::HTMLMediaElement::parseAttribute): removeBehaviorsRestrictionsAfterFirstUserGesture -> 
+        removeBehaviorRestrictionsAfterFirstUserGesture.
+        (WebCore::HTMLMediaElement::load): Ditto. Don't call removeBehaviorsRestrictionsAfterFirstUserGesture,
+        it will be done in prepareForLoad.
+        (WebCore::HTMLMediaElement::prepareForLoad): removeBehaviorsRestrictionsAfterFirstUserGesture -> 
+        removeBehaviorRestrictionsAfterFirstUserGesture.
+        (WebCore::HTMLMediaElement::audioTrackEnabledChanged): Ditto.
+        (WebCore::HTMLMediaElement::play): Ditto.
+        (WebCore::HTMLMediaElement::pause): Ditto.
+        (WebCore::HTMLMediaElement::setVolume): Ditto.
+        (WebCore::HTMLMediaElement::setMuted): Ditto.
+        (WebCore::HTMLMediaElement::webkitShowPlaybackTargetPicker): Ditto.
+        (WebCore::HTMLMediaElement::dispatchEvent): Call document().mediaFinishedPlaying()
+        when dispatching the 'ended' event.
+        (WebCore::HTMLMediaElement::removeBehaviorRestrictionsAfterFirstUserGesture): Rename. Set
+        m_removedBehaviorRestrictionsAfterFirstUserGesture.
+        (WebCore::HTMLMediaElement::removeBehaviorsRestrictionsAfterFirstUserGesture): Deleted.
+        * html/HTMLMediaElement.h:
+        
+        * html/HTMLVideoElement.cpp:
+        (WebCore:HTMLVideoElement::nativeImageForCurrentTime): Convert to runtime logging.
+        (WebCore:HTMLVideoElement::webkitEnterFullscreen): Ditto.
+        (WebCore:HTMLVideoElement::webkitSetPresentationMode): Ditto.
+        (WebCore:HTMLVideoElement::fullscreenModeChanged): Ditto.
+
+        * html/MediaElementSession.cpp:
+        (WebCore::MediaElementSession::removeBehaviorRestriction): Update log message.
+
+2019-05-17  Brent Fulgham  <bfulgham@apple.com>
+
+        Hardening: Prevent FrameLoader crash due to SetForScope
+        https://bugs.webkit.org/show_bug.cgi?id=197458
+        <rdar://problem/50368338>
+
+        Reviewed by Chris Dumez.
+
+        Since SetForScope takes action during a function returns, it might cause
+        a crash if its scope is broader than the value it is resetting.
+
+        * loader/FrameLoader.cpp:
+        (WebCore::FrameLoader::loadDifferentDocumentItem):
+
+2019-05-16  Carlos Garcia Campos  <cgarcia@igalia.com>
+
+        [GTK] Need WebKitContextMenuItemType to open emoji picker
+        https://bugs.webkit.org/show_bug.cgi?id=176760
+
+        Reviewed by Michael Catanzaro.
+
+        Add a new context menu item to insert an emoji.
+
+        * loader/EmptyClients.cpp: Empty implementation of ContextMenuClient::insertEmoji().
+        * page/ContextMenuClient.h: Add insertEmoji for GTK port.
+        * page/ContextMenuController.cpp:
+        (WebCore::ContextMenuController::contextMenuItemSelected): Handle insert emoji action.
+        (WebCore::ContextMenuController::populate): Add insert emoji item after select all.
+        (WebCore::ContextMenuController::checkOrEnableIfNeeded const): Handle insert emoji action.
+        * platform/ContextMenuItem.h: Add insert emoji action.
+        * platform/LocalizedStrings.h:
+        * platform/gtk/LocalizedStringsGtk.cpp:
+        (WebCore::contextMenuItemTagInsertEmoji):
+
+2019-05-16  Greg Doolittle  <gr3g@apple.com>
+
+        AX: Unship some ARIA string reflectors that are to-be-replaced by element reflection
+        https://bugs.webkit.org/show_bug.cgi?id=197764
+        <rdar://problem/50649689>
+
+        Reviewed by Chris Fleizach.
+
+        Specifically these:
+        - ariaActiveDescendant
+        - ariaControls
+        - ariaDescribedBy
+        - ariaDetails
+        - ariaErrorMessage
+        - ariaFlowTo
+        - ariaLabelledBy
+        - ariaOwns
+
+        Test: LayoutTests/accessibility/ARIA-reflections.html (updated)
+
+        * accessibility/AriaAttributes.idl:
+
+2019-05-16  Youenn Fablet  <youenn@apple.com>
+
+        CoreAudioCaptureSource should be marked as an audio capture track
+        https://bugs.webkit.org/show_bug.cgi?id=197953
+        <rdar://problem/50552007>
+
+        Reviewed by Eric Carlson.
+
+        Manually tested.
+
+        * platform/mediastream/mac/CoreAudioCaptureSource.h:
+        Mark it as microphone so that it can get muted properly.
+
 2019-05-16  Alex Christensen  <achristensen@webkit.org>
 
         Add SPI to set a list of hosts to which to send custom header fields cross-origin