Text can wrap between hyphens and commas
[WebKit-https.git] / Source / WebCore / ChangeLog
index 7fc488e..21a24ef 100644 (file)
@@ -1,3 +1,317 @@
+2018-05-22  Myles C. Maxfield  <mmaxfield@apple.com>
+
+        Text can wrap between hyphens and commas
+        https://bugs.webkit.org/show_bug.cgi?id=185899
+        <rdar://problem/40118983>
+
+        Reviewed by Zalan Bujtas.
+
+        Chrome, Firefox, and ICU all agree that text shouldn't wrap there.
+
+        Test: fast/text/line-break-hyphen-comma.html
+
+        * rendering/BreakLines.cpp:
+
+2018-05-22  Simon Fraser  <simon.fraser@apple.com>
+
+        Add notifyutil callbacks to dump the memory cache, and the list of live Pages and Documents
+        https://bugs.webkit.org/show_bug.cgi?id=185853
+
+        Reviewed by Keith Miller.
+
+        Add a notifyutil callback to dump the PageCache, which dumps the stats, and the list of live pages.
+        This can be invoked on iOS and macOS via "notifyutil -p com.apple.WebKit.showPageCache".
+        
+        Add a notifyutil callback that dumps the list of all Pages, and the list of all Documents, with
+        Document pointer address and URL.
+        This can be invoked on iOS and macOS via "notifyutil -p com.apple.WebKit.showAllDocuments".
+
+        * history/PageCache.cpp:
+        (WebCore::PageCache::PageCache):
+        (WebCore::PageCache::dump const):
+        * history/PageCache.h:
+        * loader/cache/CachedResource.h:
+        (WebCore::CachedResource::numberOfClients const):
+        (WebCore::CachedResource::count const): Deleted.
+        * loader/cache/MemoryCache.cpp:
+        (WebCore::MemoryCache::MemoryCache):
+        (WebCore::MemoryCache::pruneLiveResourcesToSize):
+        (WebCore::MemoryCache::dumpStats):
+        (WebCore::MemoryCache::dumpLRULists const):
+        * loader/cache/MemoryCache.h:
+        * page/mac/PageMac.mm:
+        (WebCore::Page::platformInitialize):
+
+2018-05-22  Dean Jackson  <dino@apple.com>
+
+        Optimized path zoom animation needs a valid UIImage and CGRect
+        https://bugs.webkit.org/show_bug.cgi?id=185883
+        <rdar://problem/40306056>
+
+        Build fix.
+
+        * loader/FrameLoadRequest.h:
+
+2018-05-22  Commit Queue  <commit-queue@webkit.org>
+
+        Unreviewed, rolling out r232081.
+        https://bugs.webkit.org/show_bug.cgi?id=185895
+
+        Broke two API tests (Requested by bfulgham_ on #webkit).
+
+        Reverted changeset:
+
+        "Avoid keeping FormState alive longer than necessary"
+        https://bugs.webkit.org/show_bug.cgi?id=185877
+        https://trac.webkit.org/changeset/232081
+
+2018-05-22  Dean Jackson  <dino@apple.com>
+
+        Optimized path zoom animation needs a valid UIImage and CGRect
+        https://bugs.webkit.org/show_bug.cgi?id=185883
+        <rdar://problem/40306056>
+
+        Reviewed by Jon Lee.
+
+        Pass the bounding box of the element that was clicked onto
+        the UI process, so it can perform an animation from that spot.
+
+        This involved adding an IntRect to the ResourceRequest, and passing
+        that info into it from the HTMLAnchorElement, using a new struct
+        called SystemPreviewInfo.
+
+        * html/HTMLAnchorElement.cpp:
+        (WebCore::HTMLAnchorElement::handleClick):
+        * loader/FrameLoadRequest.cpp:
+        (WebCore::FrameLoadRequest::FrameLoadRequest):
+        * loader/FrameLoadRequest.h:
+        (WebCore::FrameLoadRequest::FrameLoadRequest):
+        (WebCore::FrameLoadRequest::isSystemPreview const):
+        (WebCore::FrameLoadRequest::systemPreviewRect const):
+        * loader/FrameLoader.cpp:
+        (WebCore::FrameLoader::urlSelected):
+        (WebCore::FrameLoader::loadURL):
+        * loader/FrameLoader.h:
+        (WebCore::FrameLoader::urlSelected):
+        * loader/FrameLoaderTypes.h:
+        * platform/network/ResourceRequestBase.cpp:
+        (WebCore::ResourceRequestBase::systemPreviewRect const):
+        (WebCore::ResourceRequestBase::setSystemPreviewRect):
+        * platform/network/ResourceRequestBase.h:
+
+2018-05-22  Chris Dumez  <cdumez@apple.com>
+
+        [POSIX] Use access() instead of stat() in FileSystem::fileExists()
+        https://bugs.webkit.org/show_bug.cgi?id=185882
+
+        Reviewed by Geoffrey Garen.
+
+        Use access() instead of stat() in FileSystem::fileExists(). stat() returns a lot of information we
+        do not leverage and local benchmarking on macOS shows access() being > 80% faster than stat():
+        stat: 0.31567 (lower is better)
+        access: 0.16074 (lower is better)
+        stat: 0.303665 (lower is better)
+        access: 0.165468 (lower is better)
+
+        * platform/posix/FileSystemPOSIX.cpp:
+        (WebCore::FileSystem::fileExists):
+
+2018-05-22  Brent Fulgham  <bfulgham@apple.com>
+
+        Avoid keeping FormState alive longer than necessary
+        https://bugs.webkit.org/show_bug.cgi?id=185877
+        <rdar://problem/39329219>
+
+        Reviewed by Ryosuke Niwa.
+
+        A number of crash fixes were done to prevent FormState objects from being
+        accessed after their relevant Frames had been destroyed. Unfortunately, this
+        could cause the FormState to persist after the owning Frame had been
+        destroyed, resulting in nullptr dereferences.
+
+        This patch does the following:
+
+        1. Changes to use WeakPtr's for FormState objects passed to completion handlers,
+           rather than RefPtr, since those completion handlers might fire as part of
+           the clean-up process during Frame destruction. This allows us to use the FormState
+           if they are still valid, but gracefully handle cases where a form submission
+           is cancelled in-flight.
+        2. Removes some extraneous WTFMove() calls being made on bare FormState pointers.
+        3. Changes the trap from Bug 183704 so that it only fires if the FormState object
+           is being retained more than once.
+
+        * loader/DocumentLoader.cpp:
+        (WebCore::DocumentLoader::willSendRequest): Update for new CompletionHandler
+        signature.
+        * loader/FormState.cpp:
+        (WebCore::FormState::willDetachPage): Revise trap to check for retain counts
+        above one.
+        * loader/FormState.h:
+        (WebCore::FormState::weakPtrFactory const): Added.
+        * loader/FrameLoader.cpp:
+        (WebCore::FrameLoader::loadFrameRequest): Revise to use WeakPtr for FormState
+        passed to the completion handler.
+        (WebCore::FrameLoader::loadURL): Update for new CompletionHandler signature.
+        (WebCore::FrameLoader::load): Ditto.
+        (WebCore::FrameLoader::loadWithDocumentLoader): Ditto.
+        (WebCore::FrameLoader::loadPostRequest): Ditto.
+        * loader/PolicyChecker.cpp:
+        (WebCore::PolicyChecker::checkNavigationPolicy): Revise to use WeakPtr for
+        FormState passed to the completion handler. Remove some extraneous WTFMove()
+        calls on bare pointers.
+        (WebCore::PolicyChecker::checkNewWindowPolicy): Ditto.
+        * loader/PolicyChecker.h:
+
+2018-05-22  Sihui Liu  <sihui_liu@apple.com>
+
+        Conversion between SecurityOriginData and DatabaseIdentifier is asymmetric when port is null
+        https://bugs.webkit.org/show_bug.cgi?id=185715
+
+        Reviewed by Geoffrey Garen.
+
+        Fixed the issue of null port when converting between SecurityOriginData and DatabaseIdentifier.
+
+        Test: WKWebView.LocalStorageFetchDataRecords.
+
+        * page/SecurityOriginData.cpp:
+        (WebCore::SecurityOriginData::fromDatabaseIdentifier):
+
+2018-05-22  Keith Miller  <keith_miller@apple.com>
+
+        We should have a CoW storage for NewArrayBuffer arrays.
+        https://bugs.webkit.org/show_bug.cgi?id=185003
+
+        Reviewed by Filip Pizlo.
+
+        * bindings/js/JSDOMConvertSequences.h:
+        (WebCore::Detail::NumericSequenceConverter::convertArray):
+        (WebCore::Detail::SequenceConverter::convertArray):
+
+2018-05-22  Ryan Haddad  <ryanhaddad@apple.com>
+
+        Unreviewed, rolling out r232052.
+
+        Breaks internal builds.
+
+        Reverted changeset:
+
+        "Use more C++17"
+        https://bugs.webkit.org/show_bug.cgi?id=185176
+        https://trac.webkit.org/changeset/232052
+
+2018-05-22  Carlos Garcia Campos  <cgarcia@igalia.com>
+
+        [GTK] WebDriver: Network process crash when running imported/w3c/webdriver/tests/delete_cookie/delete.py::test_unknown_cookie
+        https://bugs.webkit.org/show_bug.cgi?id=185867
+
+        Reviewed by Michael Catanzaro.
+
+        We need to null check the value returned by URL::createSoupURI() before passing it to soup.
+
+        * platform/network/soup/CookieJarSoup.cpp:
+        (WebCore::setCookiesFromDOM):
+        (WebCore::cookiesForSession):
+        (WebCore::getRawCookies):
+        (WebCore::deleteCookie):
+        * platform/network/soup/NetworkStorageSessionSoup.cpp:
+        (WebCore::NetworkStorageSession::getCookies):
+
+2018-05-22  Zalan Bujtas  <zalan@apple.com>
+
+        [LFC] Implement positioning for non-replaced out-of-flow elements.
+        https://bugs.webkit.org/show_bug.cgi?id=185858
+
+        Reviewed by Antti Koivisto.
+
+        In certain cases, the out-of-flow element's final position depends on the element's size.
+        Call computeOutOfFlowPosition() after width/height are resolved.
+
+        * layout/FormattingContext.cpp:
+        (WebCore::Layout::FormattingContext::computeOutOfFlowPosition const):
+        (WebCore::Layout::FormattingContext::layoutOutOfFlowDescendants const):
+        (WebCore::Layout::FormattingContext::computeOutOfFlowNonReplacedPosition const):
+        (WebCore::Layout::FormattingContext::computeOutOfFlowReplacedPosition const):
+        * layout/FormattingContext.h:
+
+2018-05-22  Olivier Blin  <olivier.blin@softathome.com>
+
+        Fix build without MathML
+        https://bugs.webkit.org/show_bug.cgi?id=185865
+
+        Reviewed by Frédéric Wang.
+
+        Regression(r226654): [RenderTreeBuilder] Move MathML addChild logic to RenderTreeBuilder
+        https://bugs.webkit.org/show_bug.cgi?id=181443
+
+        Regression(r229694): Put the DOM in IsoHeaps
+        https://bugs.webkit.org/show_bug.cgi?id=183546
+
+        No new tests, build fix.
+
+        * mathml/MathMLUnknownElement.cpp:
+        * mathml/MathMLUnknownElement.h:
+        * rendering/updating/RenderTreeBuilder.cpp:
+        (WebCore::RenderTreeBuilder::RenderTreeBuilder):
+        (WebCore::RenderTreeBuilder::attach):
+        * rendering/updating/RenderTreeBuilder.h:
+        * rendering/updating/RenderTreeBuilderMathML.cpp:
+        * rendering/updating/RenderTreeBuilderMathML.h:
+
+2018-05-22  Yacine Bandou  <yacine.bandou_ext@softathome.com>
+
+        [GStreamer] Don't set the ReadyState to HaveNothing when an error occurs in playback pipeline
+        https://bugs.webkit.org/show_bug.cgi?id=185725
+
+        Reviewed by Philippe Normand.
+
+        The ReadyState should not be set to HaveNothing when an error occurs in playback pipeline, because
+        at least we should have the metadata in order to have an error in pipeline.
+
+        Here is the definition of HaveNothing state in W3C spec https://dev.w3.org/html5/spec-preview/media-elements.html#ready-states
+        "HAVE_NOTHING (numeric value 0): No information regarding the media resource is available. No data for the current
+        playback position is available. Media elements whose networkState attribute is NETWORK_EMPTY are always in the HAVE_NOTHING state."
+
+        In MSE case, this patch fixes the crashes of the followings WPT encrypted-media tests:
+        - clearkey-mp4-playback-temporary-clear-encrypted.https.html
+        - clearkey-mp4-playback-temporary-multikey-sequential.https.html
+        - clearkey-mp4-playback-temporary-multikey-sequential-readyState.https.html
+
+        Here is the cause of the crashes: When an error occurs in playback pipeline like no decipher key, in case of encrypted content,
+        the MediaPlayerPrivateGstreamer sets NetworkState to FormatError which causes the detachment of MediaElement from MediaSource,
+        then MediaPlayerPrivateGstreamer sets the ReadyState to HaveNothing which causes a trying again to play the same URI,
+        thus the crash occurs because the MediaElement is detached from MediaSource, see bugzilla for more details.
+        Note: these crashes should be fixed in 185242 but unfortunately it isn't the case. See bug 185242 for more details.
+
+        * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
+        (WebCore::MediaPlayerPrivateGStreamer::handleMessage):
+
+2018-05-22  Yacine Bandou  <yacine.bandou_ext@softathome.com>
+
+        [MSE][GStreamer] Fix the deadlock caused by bug 185242 (r231351)
+        https://bugs.webkit.org/show_bug.cgi?id=185723
+
+        Reviewed by Xabier Rodriguez-Calvar.
+
+        After a detailed investigation, we found that, the patch r231351 doesn't fix the crash that expected to fix,
+        it just replaces it by a deadlock. Now the crash is fixed in the bug 185725.
+
+        This Patch will remove a part of r231351 that causes the deadlock.
+
+        * platform/graphics/gstreamer/mse/WebKitMediaSourceGStreamer.cpp:
+        (webKitMediaSrcFreeStream):
+
+2018-05-21  Yusuke Suzuki  <utatane.tea@gmail.com>
+
+        Use more C++17
+        https://bugs.webkit.org/show_bug.cgi?id=185176
+
+        Reviewed by JF Bastien.
+
+        * Configurations/Base.xcconfig:
+        * DerivedSources.make:
+        * platform/ios/LegacyTileGrid.mm:
+        (WebCore::LegacyTileGrid::dropDistantTiles):
+
 2018-05-21  Zalan Bujtas  <zalan@apple.com>
 
         [LFC] Box::isDescendantOf() should work with out-of-flow elements.