Destroy all unneeded anonymous wrappers in RenderObject::removeFromParentAndDestroyCl...
[WebKit-https.git] / Source / WebCore / ChangeLog
index 374716b..2a4686d 100644 (file)
@@ -1,3 +1,336 @@
+2017-10-27  Antti Koivisto  <antti@apple.com>
+
+        Destroy all unneeded anonymous wrappers in RenderObject::removeFromParentAndDestroyCleaningUpAnonymousWrappers()
+        https://bugs.webkit.org/show_bug.cgi?id=178933
+
+        Reviewed by Zalan Bujtas.
+
+        Currently it just cleans up table related wrappers.
+
+        * rendering/RenderObject.cpp:
+        (WebCore::findDestroyRootIncludingAnonymous):
+
+        Continuations are left as future work.
+
+2017-10-30  Zalan Bujtas  <zalan@apple.com>
+
+        Remove reference to RenderTreeInternalMutationScope
+        https://bugs.webkit.org/show_bug.cgi?id=178998
+        <rdar://problem/35246464>
+
+        Reviewed by Antti Koivisto.
+
+        We don't have such class anymore.
+
+        No change in functionality.
+
+        * rendering/RenderView.h:
+
+2017-10-30  Zan Dobersek  <zdobersek@igalia.com>
+
+        [GCrypt] Add support for P-521 EC curves
+        https://bugs.webkit.org/show_bug.cgi?id=175199
+
+        Reviewed by Jiewen Tan.
+
+        Add support for 521-bit elliptic curves in the libgcrypt-based
+        implementation of WebCrypto API.
+
+        In the CryptoAlgorithmECDH implementation, the bit-size of the key is now
+        rounded up to the next byte boundary and passed to the helper
+        gcryptDerive() function. There the size in bytes is used to zero-pad the
+        derived key data. This is done to properly handle derivation results for
+        the P-521 curves, where the leading zero bit could get clipped, resulting
+        in a derived key that is only 65 byes in length when it is expected to be
+        66 bytes. Further cleanups are done in gcryptDerive() to use the mpiData()
+        function where possible.
+
+        In the CryptoAlgorithmECDSA implementation, the bit-size of the key is
+        again rounded up to the nearest byte boundary before being passed to the
+        helper gcryptSign() and gcryptVerify() functions. This again properly
+        enforces the requirement of 66 bytes to handle P-521 elliptic curves.
+
+        In the CryptoKeyEC implementation, NamedCurve::P521 cases in helper
+        functions operating on NamedCurve values are now implemented to return
+        appropriate values. platformSupportedCurve() now returns true for the
+        NamedCurve::P521 value. Zero-padding of the private key data is used
+        wherever it is necessary to avoid clipping any leading zero bit in the
+        P-521 EC key.
+
+        No new tests -- affected tests have their baselines updated.
+
+        * crypto/gcrypt/CryptoAlgorithmECDHGCrypt.cpp:
+        (WebCore::gcryptDerive):
+        (WebCore::CryptoAlgorithmECDH::platformDeriveBits):
+        * crypto/gcrypt/CryptoAlgorithmECDSAGCrypt.cpp:
+        (WebCore::CryptoAlgorithmECDSA::platformSign):
+        (WebCore::CryptoAlgorithmECDSA::platformVerify):
+        * crypto/gcrypt/CryptoKeyECGCrypt.cpp:
+        (WebCore::curveName):
+        (WebCore::curveIdentifier):
+        (WebCore::curveSize):
+        (WebCore::curveUncompressedFieldElementSize):
+        (WebCore::CryptoKeyEC::platformSupportedCurve):
+        (WebCore::curveForIdentifier):
+        (WebCore::CryptoKeyEC::platformImportPkcs8):
+        (WebCore::CryptoKeyEC::platformAddFieldElements const):
+        (WebCore::CryptoKeyEC::platformExportPkcs8 const):
+
+2017-10-29  Fujii Hironori  <Hironori.Fujii@sony.com>
+
+        Use of uninitialized value $targetIdlFile in hash element at preprocess-idls.pl line 165.
+        https://bugs.webkit.org/show_bug.cgi?id=177743
+
+        Reviewed by Darin Adler.
+
+        GamepadWebVR.idl supplements Gamepad.idl. But, Gamepad.idl is not
+        processed because ENABLE_GAMEPAD is OFF.
+
+        No new tests since there should be no behavioral change.
+
+        * CMakeLists.txt: Include GamepadWebVR.idl only if ENABLE_GAMEPAD.
+        * Sources.txt: Ditto.
+        * bindings/scripts/preprocess-idls.pl: Die if a supplemented IDL file is not found.
+
+2017-10-29  Sam Weinig  <sam@webkit.org>
+
+        [Conic Gradients] Add support for parsing conic gradients
+        https://bugs.webkit.org/show_bug.cgi?id=178987
+
+        Reviewed by Dean Jackson.
+
+        Adds initial support, disabled by default, for parsing conic gradients as per
+        CSS 4 Images - https://www.w3.org/TR/css-images-4/#conic-gradients.
+
+        Test: fast/gradients/conic-gradient-parsing.html
+
+        * css/CSSGradientValue.cpp:
+        (WebCore::clone):
+        (WebCore::CSSGradientValue::isCacheable const):
+        (WebCore::CSSConicGradientValue::customCSSText const):
+        (WebCore::CSSConicGradientValue::createGradient):
+        (WebCore::CSSConicGradientValue::equals const):
+        * css/CSSGradientValue.h:
+        
+            Add CSSConicGradientValue as a subclass of CSSGradientValue and implement
+            customCSSText() and equals(). Stub out createGradient() as painting is not
+            yet implemented.
+        
+        * css/CSSImageGeneratorValue.cpp:
+        (WebCore::CSSImageGeneratorValue::image):
+        (WebCore::CSSImageGeneratorValue::isFixedSize const):
+        (WebCore::CSSImageGeneratorValue::fixedSize):
+        (WebCore::CSSImageGeneratorValue::isPending const):
+        (WebCore::CSSImageGeneratorValue::knownToBeOpaque const):
+        (WebCore::CSSImageGeneratorValue::loadSubimages):
+        * css/CSSValue.cpp:
+        (WebCore::CSSValue::equals const):
+        (WebCore::CSSValue::cssText const):
+        (WebCore::CSSValue::destroy):
+        
+            Dispatch to CSSConicGradientValue as needed.
+        
+        * css/CSSValue.h:
+        (WebCore::CSSValue::isImageGeneratorValue const):
+        (WebCore::CSSValue::isGradientValue const):
+        (WebCore::CSSValue::isConicGradientValue const):
+        
+            Add conic gradient predicate support and update isImageGeneratorValue and 
+            isGradientValue to include conic gradient.
+        
+        * css/CSSValueKeywords.in:
+        
+            Add conic-gradient and repeating-conic-gradient.
+        
+        * css/parser/CSSParser.cpp:
+        (WebCore::CSSParserContext::CSSParserContext):
+        (WebCore::operator==):
+        * css/parser/CSSParserMode.h:
+        (WebCore::CSSParserContextHash::hash):
+        
+            Add runtime flags to enable conic gradients.
+        
+        * css/parser/CSSPropertyParserHelpers.cpp:
+        (WebCore::CSSPropertyParserHelpers::consumeAngleOrPercent):
+        
+            Helper, similar to consumeLengthOrPercent, for consumeGradientColorStops. 
+            Corresponds to https://drafts.csswg.org/css-values-4/#typedef-angle-percentage
+        
+        (WebCore::CSSPropertyParserHelpers::consumeGradientColorStops):
+        
+            Convert to take CSSGradientValue by reference.
+        
+        (WebCore::CSSPropertyParserHelpers::consumeAngularGradientColorStops):
+        
+            Helper, similar to consumeGradientColorStops, but for angular color stops
+            used in conic gradients. Corresponds to https://www.w3.org/TR/css-images-4/#typedef-angular-color-stop-list
+            but does not yet support double position syntax.
+        
+        (WebCore::CSSPropertyParserHelpers::consumeDeprecatedRadialGradient):
+        (WebCore::CSSPropertyParserHelpers::consumeRadialGradient):
+        (WebCore::CSSPropertyParserHelpers::consumeLinearGradient):
+        
+            Pass CSSGradientValue by reference.
+        
+        (WebCore::CSSPropertyParserHelpers::consumeConicGradient):
+        
+            Parse conic gradient.
+        
+        (WebCore::CSSPropertyParserHelpers::consumeGeneratedImage):
+        
+            Dispatch to consumeConicGradient for repeating and non-repeating
+            conic gradients.
+        
+        (WebCore::CSSPropertyParserHelpers::isGeneratedImage):
+        
+            Put each value on its own line to make it more readable and add CSSValueConicGradient
+            and CSSValueRepeatingConicGradient.
+        
+        * page/Settings.yaml:
+        
+            Add a setting to enable conic gradients. Disabled by default.
+
+        * features.json:
+        
+            Move conic gradients to "In Development".
+
+2017-10-29  Antoine Quint  <graouts@apple.com>
+
+        [Web Animations] Expose the currentTime property on Animation
+        https://bugs.webkit.org/show_bug.cgi?id=178988
+
+        Unreviewed.
+
+        Style fixes missed in previous patch.
+
+        * animation/WebAnimation.cpp:
+        (WebCore::WebAnimation::setCurrentTime):
+
+2017-10-29  Antoine Quint  <graouts@apple.com>
+
+        [Web Animations] Expose the currentTime property on Animation
+        https://bugs.webkit.org/show_bug.cgi?id=178988
+
+        Reviewed by Dean Jackson.
+
+        We now expose the currentTime property on Animation objects, our first
+        step in implementing the Web Animations timing model, specifically section
+        3.5.4. "The current time of an animation" and section 3.5.5. "Setting the
+        current time of an animation". Setting the startTime has implications on
+        currentTime and vice-versa.
+
+        Test: webanimations/animation-current-time.html
+
+        * animation/WebAnimation.cpp:
+        (WebCore::WebAnimation::setBindingsStartTime):
+        (WebCore::WebAnimation::startTime const):
+        (WebCore::WebAnimation::setStartTime):
+        (WebCore::WebAnimation::bindingsCurrentTime const):
+        (WebCore::WebAnimation::setBindingsCurrentTime):
+        (WebCore::WebAnimation::currentTime const):
+        (WebCore::WebAnimation::setCurrentTime):
+        * animation/WebAnimation.h:
+        * animation/WebAnimation.idl:
+
+2017-10-29  Ryosuke Niwa  <rniwa@webkit.org>
+
+        Assert that no script is executed during style recalc
+        https://bugs.webkit.org/show_bug.cgi?id=178845
+        <rdar://problem/35106129>
+
+        Reviewed by Antti Koivisto.
+
+        This patch adds NoEventDispatchAssertion to Document::updateStyle and Document::updateStyleIfNeeded
+        to make sure we don't start mutating DOM in the middle of a style update.
+
+        Added NoEventDispatchAssertion::EventAllowedScope for various places in SVGUseElement to update its
+        shadow tree since that happens while updating the style.
+
+        No new tests since there should be no behavioral change.
+
+        * dom/Document.cpp:
+        (WebCore::Document::resolveStyle): Added NoEventDispatchAssertion while flushing pending stylesheets
+        and calling FrameView::willRecalcStyle, and while the style tree solver is in works. Also moved in
+        the code to update the selection and schedule to dispatch a fake mouse event into the same scope.
+        Also increment m_styleRecalcCount in the same code since post resolution callbacks could run author
+        scripts which in turn trigger another (recursive) style recalc.
+        (WebCore::Document::updateStyleIfNeeded): Put everything but the call to resolveStyle in a scope with
+        NoEventDispatchAssertion.
+        * dom/Element.cpp:
+        (WebCore::Element::cloneElementWithChildren): Added NoEventDispatchAssertion::EventAllowedScope to the
+        newly cloned element for SVG use element's shadow tree.
+        (WebCore::Element::cloneElementWithoutChildren): Ditto.
+        * dom/EventDispatcher.cpp:
+        (WebCore::EventDispatcher::dispatchEvent): Make the assertion more precise to workaround the fact SVG
+        use elements update its shadow tree in the middle of style updates. Also removed a redundant assertion
+        since the result of NoEventDispatchAssertion::isEventDispatchAllowedInSubtree cannot chance without
+        pushing or popoing the stack frame.
+        * svg/SVGUseElement.cpp:
+        (WebCore::SVGUseElement::clearShadowTree):
+        (WebCore::SVGUseElement::updateShadowTree): Added NoEventDispatchAssertion to the user-agent shadow root
+        of a SVG use element. Since this is a newly created shadow tree which hasn't been exposed to author
+        scripts, it's safe to mutate them during the style recalc even though it's not the best design.
+        (WebCore::SVGUseElement::cloneTarget const): Ditto.
+        (WebCore::SVGUseElement::expandUseElementsInShadowTree const): Ditto.
+        (WebCore::SVGUseElement::expandSymbolElementsInShadowTree const): Ditto.
+        (WebCore::SVGUseElement::transferEventListenersToShadowTree const):
+
+2017-10-28  Dean Jackson  <dino@apple.com>
+
+        createImageBitmap with HTMLCanvasElement
+        https://bugs.webkit.org/show_bug.cgi?id=178984
+        <rdar://problem/35238440>
+
+        Reviewed by Sam Weinig.
+
+        Implement createImageBitmap(HTMLCanvasElement).
+
+        While here, explicitly reject the promises for the
+        methods we haven't yet implemented. I was hoping this
+        would avoid a lengthy timeout in one of the imported
+        WPT tests but, alas, it doesn't. However, it's still
+        a good idea.
+
+        Extend internal WPT proposals to cover canvas creation.
+
+        * html/ImageBitmap.cpp:
+        (WebCore::ImageBitmap::createPromise): Get the image from
+        the canvas and draw it into a new ImageBitmap buffer.
+
+2017-10-28  Myles C. Maxfield  <mmaxfield@apple.com>
+
+        [iOS] Unify Font::platformCharWidthInit() with macOS
+        https://bugs.webkit.org/show_bug.cgi?id=178951
+        <rdar://problem/7848198>
+
+        Reviewed by Zalan Bujtas.
+
+        The only reason these codepaths are different is because historically this codepath
+        didn't work with GS fonts (which we don't use anymore).
+
+        Tests: fast/forms/search-styled.html
+               fast/forms/text-control-intrinsic-widths.html
+               fast/forms/textarea-width.html
+
+        * platform/graphics/cocoa/FontCocoa.mm:
+        (WebCore::Font::platformCharWidthInit):
+
+2017-10-28  Chris Dumez  <cdumez@apple.com>
+
+        self.ExtendableEvent / Client / Clients / WindowClient do not exist in a Service Worker
+        https://bugs.webkit.org/show_bug.cgi?id=178976
+
+        Reviewed by Sam Weinig.
+
+        Test: http/tests/workers/service/ServiceWorkerGlobalScope-properties.html
+
+        * workers/service/ExtendableEvent.idl:
+        * workers/service/FetchEvent.idl:
+        Drop [Exposed=Worker] as there is already [Exposed=ServiceWorker] and
+        ServiceWorkerGlobalScope inherits from WorkerGlobalScope. This is redundant
+        and we would hit assertions and adding the global constructors at runtime
+        when the feature is enabled, because the property already exists.
+
 2017-10-28  Zalan Bujtas  <zalan@apple.com>
 
         [FrameView::layout cleanup] Move core layout logic to a separate class.