Add a pseudoclass that matches img elements that are backed by an attachment
[WebKit-https.git] / Source / WebCore / ChangeLog
index 0ef2af5..bb2e019 100644 (file)
@@ -1,3 +1,170 @@
+2018-11-07  Dan Bernstein  <mitz@apple.com>
+
+        Add a pseudoclass that matches img elements that are backed by an attachment
+        https://bugs.webkit.org/show_bug.cgi?id=191286
+        <rdar://problem/45823554>
+
+        Reviewed by Dean Jackson.
+
+        Test: fast/css/has-attachment.html
+
+        Added a :has-attachment pseudoclass, enabled only when the attachment element is enabled at
+        runtime, that matches elements (currently only img elements qualify) that have an attachment
+        element in their shadow DOM.
+
+        * css/CSSSelector.cpp:
+        (WebCore::CSSSelector::selectorText const): Handle the new PseudoClassHasAttachment value.
+        * css/CSSSelector.h: Added a new value to the PseudoClassType enum.
+
+        * css/SelectorChecker.cpp:
+        (WebCore::SelectorChecker::checkOne const): Check the new PseudoClassHasAttachment value
+          using the new hasAttachment test function.
+
+        * css/SelectorCheckerTestFunctions.h:
+        (WebCore::hasAttachment): Added. Tests if the element is an img element that has an
+          attachment.
+
+        * css/SelectorPseudoClassAndCompatibilityElementMap.in: Added has-attachment.
+
+        * css/parser/CSSParserContext.cpp:
+        (WebCore::CSSParserContext::CSSParserContext): Initialize new attachmentEnabled member based
+          on RuntimeEnabledFeatures.
+        (WebCore::operator==): Compare new attachmentEnabled member.
+        * css/parser/CSSParserContext.h:
+        (WebCore::CSSParserContextHash::hash): Include new attachmentEnabled member.
+
+        * css/parser/CSSSelectorParser.cpp:
+        (WebCore::CSSSelectorParser::consumePseudo): Reject :has-attachment if the attachment
+          element is not enabled.
+
+        * cssjit/SelectorCompiler.cpp:
+        (WebCore::SelectorCompiler::addPseudoClassType): Handle PseudoClassHasAttachment.
+
+2018-11-07  Don Olmstead  <don.olmstead@sony.com>
+
+        Make generic MainThreadSharedTimer implementation
+        https://bugs.webkit.org/show_bug.cgi?id=191327
+
+        Reviewed by Michael Catanzaro.
+
+        No new tests. No change in behavior.
+
+        Moves generic implementation for MainThreadSharedTimerGlib.cpp into
+        MainThreadSharedTimer.cpp.
+
+        * platform/MainThreadSharedTimer.cpp:
+        (WebCore::MainThreadSharedTimer::MainThreadSharedTimer):
+        (WebCore::MainThreadSharedTimer::setFireInterval):
+        (WebCore::MainThreadSharedTimer::stop):
+        (WebCore::MainThreadSharedTimer::invalidate):
+        * platform/MainThreadSharedTimer.h:
+        * platform/SourcesGLib.txt:
+        * platform/glib/MainThreadSharedTimerGLib.cpp: Removed.
+
+2018-11-07  Ali Juma  <ajuma@chromium.org>
+
+        IntersectionObserverEntry doesn't keep JS wrappers of rects alive
+        https://bugs.webkit.org/show_bug.cgi?id=191330
+
+        Reviewed by Chris Dumez.
+
+        Retain wrappers of each rect in an IntersectionObserverEntry as long as the entry's wrapper
+        is alive, by adding these wrappers as opaque roots.
+
+        Test: intersection-observer/intersection-observer-entry-keeps-js-wrappers-of-rects-alive.html
+
+        * bindings/js/JSIntersectionObserverEntryCustom.cpp:
+        (WebCore::JSIntersectionObserverEntry::visitAdditionalChildren):
+        * dom/DOMRectReadOnly.idl:
+        * page/IntersectionObserverEntry.h:
+        (WebCore::IntersectionObserverEntry::rootBounds const): Make this return a raw pointer instead of a RefPtr so that it
+        can be called in JSIntersectionObserverEntry::visitAdditionalChildren, which can be called from non-main threads.
+        (WebCore::IntersectionObserverEntry::boundingClientRect const): Ditto.
+        (WebCore::IntersectionObserverEntry::intersectionRect const): Ditto.
+
+2018-11-07  Simon Fraser  <simon.fraser@apple.com>
+
+        TileController::tileSize() should not have side effects
+        https://bugs.webkit.org/show_bug.cgi?id=191349
+
+        Reviewed by Zalan Bujtas.
+
+        Calling TileController::tileSize() would recompute a new tile size and set m_tileSizeLocked,
+        which caused test failures if logging was enabled when running tests.
+
+        * platform/graphics/ca/TileController.cpp:
+        (WebCore::TileController::tileSize const):
+        (WebCore::TileController::computeTileSize):
+        * platform/graphics/ca/TileController.h:
+        * platform/graphics/ca/TileGrid.cpp:
+        (WebCore::TileGrid::revalidateTiles):
+
+2018-11-07  Charlie Turner  <cturner@igalia.com>
+
+        [EME][GStreamer] Ensure key id buffers are present and simplify lifetime management of ClearKey class.
+        https://bugs.webkit.org/show_bug.cgi?id=191157
+
+        Reviewed by Xabier Rodriguez-Calvar.
+
+        This is in preparation for moving the clearkey decryptor behind a
+        new decrypt API in CDMInstance, which will be sent into the
+        pipeline to handle key management and decryption. This is for a
+        later patch.
+
+        Covered by existing clear key tests in media/encrypted-media.
+
+        * platform/graphics/gstreamer/GStreamerCommon.h:
+        (WebCore::GstMappedBuffer::data const): Add a const data accessor,
+        since we are now providing operator=='s on const objects of this
+        class that need const access to the data pointer.
+        (WebCore::GstMappedBuffer::operator==): Add a swap of the new
+        equality operator so you don't have to remember to have the
+        GstBuffer on the RHS of the equality all the time.
+        (WebCore::operator==): Define an equality operator between Gst
+        buffers and WebCore's mapped buffers. Gst creates a ref and a
+        separate read view under the covers in the memcmp call, so we do
+        not need to map the buffer ourselves.
+        * platform/graphics/gstreamer/eme/WebKitClearKeyDecryptorGStreamer.cpp:
+        (webkit_media_clear_key_decrypt_class_init): Remove setup/release
+        bindings.
+        (webkit_media_clear_key_decrypt_init): Initialize gcrypt cipher
+        here once instead of for every buffer to be decrypted.
+        (webKitMediaClearKeyDecryptorFinalize): And destroy the cipher
+        context when the decryptor is destroyed.
+        (webKitMediaClearKeyDecryptorFindAndSetKey): Factor out the key
+        retrieval and context setting in this method, call it for each
+        sample.
+        (webKitMediaClearKeyDecryptorDecrypt): Base key id buffer into
+        this function, and remove cipher creation / destroy methods.
+        * platform/graphics/gstreamer/eme/WebKitCommonEncryptionDecryptorGStreamer.cpp:
+        (webkit_media_common_encryption_decrypt_class_init): Remove
+        setup/release bindings.
+        (webkitMediaCommonEncryptionDecryptTransformInPlace): Ensure a key
+        id is present and pass it to the decrypt class method.
+        (webKitMediaCommonEncryptionDecryptDefaultSetupCipher): Deleted.
+        (webKitMediaCommonEncryptionDecryptDefaultReleaseCipher): Deleted.
+        * platform/graphics/gstreamer/eme/WebKitCommonEncryptionDecryptorGStreamer.h:
+
+2018-11-07  Frederic Wang  <fwang@igalia.com>
+
+        [Cairo] Move state change operations from GraphicsContextCairo to CairoOperations
+        https://bugs.webkit.org/show_bug.cgi?id=179610
+
+        Unreviewed build fix.
+
+        * platform/graphics/cairo/GraphicsContextCairo.cpp: Add missing include.
+
+2018-11-06  Joseph Pecoraro  <pecoraro@apple.com>
+
+        ServiceWorker Inspector: Uncaught Exception: null is not an object (evaluating 'resource.target.addResource')
+        https://bugs.webkit.org/show_bug.cgi?id=191339
+
+        Reviewed by Matt Baker.
+
+        * workers/service/ServiceWorkerJob.cpp:
+        (WebCore::ServiceWorkerJob::fetchScriptWithContext):
+        Use the Service Worker's identifier, not this static but otherwise unknown identifier.
+
 2018-11-06  Youenn Fablet  <youenn@apple.com>
 
         sender.replaceTrack() fails with InvalidStateError if the transceiver.direction is "inactive"