[CSS Parser] Support unprefixed cross-fade
[WebKit-https.git] / Source / WebCore / ChangeLog
index b98d015..478719d 100644 (file)
@@ -1,3 +1,293 @@
+2016-10-31  Dave Hyatt  <hyatt@apple.com>
+
+        [CSS Parser] Support unprefixed cross-fade
+        https://bugs.webkit.org/show_bug.cgi?id=164224
+
+        Reviewed by Zalan Bujtas.
+
+        * css/CSSValueKeywords.in:
+        * css/parser/CSSPropertyParserHelpers.cpp:
+        (WebCore::CSSPropertyParserHelpers::consumeCrossFade):
+        (WebCore::CSSPropertyParserHelpers::consumeGeneratedImage):
+
+2016-10-31  Dave Hyatt  <hyatt@apple.com>
+
+        [CSS Parser] Simplify background-position-x/y style mapping
+        https://bugs.webkit.org/show_bug.cgi?id=164223
+
+        Reviewed by Zalan Bujtas.
+
+        * css/CSSToStyleMap.cpp:
+        (WebCore::CSSToStyleMap::mapFillXPosition):
+        (WebCore::CSSToStyleMap::mapFillYPosition):
+        * css/StyleBuilderConverter.h:
+        (WebCore::StyleBuilderConverter::convertFontSynthesis):
+
+2016-10-31  Darin Adler  <darin@apple.com>
+
+        Move ChildNode and ParentNode from ExceptionCode to Exception, add support for ExceptionOr<T&>
+        https://bugs.webkit.org/show_bug.cgi?id=164214
+
+        Reviewed by Alex Christensen.
+
+        * Modules/fetch/FetchRequest.cpp:
+        (WebCore::FetchRequest::initializeOptions): Use FetchHeaders& instead of
+        Ref<FetchHeaders> for return value.
+        (WebCore::FetchRequest::initializeWith): Ditto.
+        * Modules/fetch/FetchRequest.h: Updated for above.
+
+        * Modules/mediasource/MediaSource.cpp:
+        (WebCore::MediaSource::addSourceBuffer): Use SourceBuffer& instead of
+        SourceBuffer* for return value.
+        * Modules/mediasource/MediaSource.h: Updated for above.
+
+        * bindings/js/JSDOMBinding.h: Added overloads of checkSecurityForNode so
+        it works with a function returning a reference.
+
+        * css/CSSPrimitiveValue.cpp:
+        (WebCore::CSSPrimitiveValue::getCounterValue): Use Counter& instead of
+        Counter* for return value.
+        (WebCore::CSSPrimitiveValue::getRectValue): Use Rect& instead of
+        Rect* for return value.
+        * css/CSSPrimitiveValue.h: Updated for above.
+
+        * dom/ChildNode.idl: Use non-legacy exceptions.
+
+        * dom/ContainerNode.cpp:
+        (WebCore::ContainerNode::querySelector): Use ExceptionOr.
+        (WebCore::ContainerNode::querySelectorAll): Ditto.
+        (WebCore::ContainerNode::append): Ditto.
+        (WebCore::ContainerNode::prepend): Ditto.
+        * dom/ContainerNode.h: Updated for above.
+
+        * dom/Document.cpp:
+        (WebCore::Document::selectorQueryForString): Use ExceptionOr.
+        * dom/Document.h: Updated for above.
+
+        * dom/Element.cpp:
+        (WebCore::Element::attachShadow): Return ShadowRoot& instead of
+        Ref<ShadowRoot> since the shadow root is owned by the element, not
+        the caller.
+        (WebCore::Element::matches): Updated for change to make the
+        selectorQueryForString function use ExceptionOr.
+        (WebCore::Element::closest): Ditto.
+        (WebCore::contextNodeForInsertion): Return ContainerNode& instead of
+        ContainerNode*.
+        (WebCore::contextElementForInsertion): Updated for above.
+        * dom/Element.h: Updated for above.
+        * dom/Element.idl: Changed return type for closest and for
+        insertAdjacentElement to be nullable since both can return null.
+
+        * dom/ExceptionOr.h: Added a specialization for ExceptionOr<T&>.
+
+        * dom/Node.cpp:
+        (WebCore::Node::convertNodesOrStringsIntoNode): Use ExceptionOr.
+        (WebCore::Node::before): Ditto.
+        (WebCore::Node::after): Ditto.
+        (WebCore::Node::replaceWith): Ditto.
+        * dom/Node.h: Updated for above changes.
+
+        * dom/ParentNode.idl: Use non-legacy exceptions.
+
+        * dom/SelectorQuery.cpp:
+        (WebCore::SelectorDataList::queryAll): Changed return type to Ref.
+        (WebCore::SelectorQueryCache::add): Use ExceptionOr.
+        * dom/SelectorQuery.h: Updated for above changes.
+
+        * html/HTMLFrameOwnerElement.cpp:
+        (WebCore::HTMLFrameOwnerElement::getSVGDocument): Return
+        Document& instead of Document*.
+        * html/HTMLFrameOwnerElement.h: Updated for above change.
+
+        * html/HTMLMediaElement.cpp:
+        (WebCore::HTMLMediaElement::addTextTrack): Return TextTrack&
+        instead of Ref<TextTrack>.
+        * html/HTMLMediaElement.h: Updated for above.
+
+        * html/HTMLPlugInImageElement.cpp:
+        (WebCore::HTMLPlugInImageElement::partOfSnapshotOverlay):
+        Updated for new exceptions.
+        * inspector/InspectorDOMAgent.cpp:
+        (WebCore::InspectorDOMAgent::querySelector): Ditto.
+        (WebCore::InspectorDOMAgent::querySelectorAll): Ditto.
+        (WebCore::InspectorDOMAgent::performSearch): Ditto.
+        (WebCore::InspectorDOMAgent::highlightSelector): Ditto.
+
+        * inspector/InspectorNodeFinder.cpp:
+        (WebCore::InspectorNodeFinder::performSearch): Put a null check
+        here so callers don't have to do it. Pass references to the
+        individual functions since the pointer can't be null.
+        (WebCore::InspectorNodeFinder::searchUsingDOMTreeTraversal):
+        Updated to use reference and streamlined code a bit, using
+        containsIgnoringASCIICase instead of findIgnoringCase.
+        (WebCore::InspectorNodeFinder::matchesAttribute): Ditto.
+        (WebCore::InspectorNodeFinder::matchesElement): Ditto.
+        (WebCore::InspectorNodeFinder::searchUsingXPath): Ditto.
+        (WebCore::InspectorNodeFinder::searchUsingCSSSelectors): Ditto.
+        Also updated  for new exceptions in querySelectorAll.
+        * inspector/InspectorNodeFinder.h: Updated for above.
+
+        * page/Crypto.cpp:
+        (WebCore::Crypto::webkitSubtle): Return WebKitSubtleCrypto&
+        insetad of WebKitSubtleCrypto*.
+        * page/Crypto.h: Updated for above.
+
+        * testing/Internals.h: Removed declarations for functions already
+        removed: ensureShadowRoot and createShadowRoot.
+
+2016-10-31  Darin Adler  <darin@apple.com>
+
+        Convert Document from ExceptionCode to Exception
+        https://bugs.webkit.org/show_bug.cgi?id=164212
+
+        Reviewed by Alex Christensen.
+
+        * Modules/websockets/WebSocketChannel.cpp:
+        (WebCore::WebSocketChannel::processBuffer): Removed IGNORE_EXCEPTION.
+
+        * dom/ContainerNode.cpp:
+        (WebCore::ContainerNode::takeAllChildrenFrom): Use releaseReturnValue
+        instead of ASSERT_NO_EXCEPTION.
+        (WebCore::ContainerNode::parserInsertBefore): Removed ASSERT_NO_EXCEPTION.
+        (WebCore::ContainerNode::parserAppendChild): Ditto.
+
+        * dom/DOMImplementation.cpp:
+        (WebCore::DOMImplementation::createDocumentType): Updated for new
+        exception handling.
+        (WebCore::DOMImplementation::createDocument): Ditto.
+
+        * dom/Document.cpp:
+        (WebCore::createHTMLElementWithNameValidation): Return ExceptionOr.
+        (WebCore::Document::createElementForBindings): Ditto.
+        (WebCore::Document::createCDATASection): Ditto.
+        (WebCore::Document::createProcessingInstruction): Ditto.
+        (WebCore::Document::importNode): Ditto.
+        (WebCore::Document::adoptNode): Ditto.
+        (WebCore::Document::createElementNS): Ditto.
+        (WebCore::Document::setXMLVersion): Ditto.
+        (WebCore::Document::setBodyOrFrameset): Ditto.
+        (WebCore::Document::processHttpEquiv): Ditto.
+        (WebCore::Document::createEvent): Ditto.
+        (WebCore::Document::cookie): Ditto.
+        (WebCore::Document::setCookie): Ditto.
+        (WebCore::Document::setDomain): Ditto.
+        (WebCore::Document::parseQualifiedName): Ditto. Also added an overload
+        that constructs a QualifiedName directly that most call sites can use.
+        (WebCore::Document::createAttribute): Return ExceptionOr.
+        (WebCore::Document::createAttributeNS): Ditto.
+        (WebCore::Document::createTouch): Removed unneeded ExceptionCode&.
+        * dom/Document.h: Updated for above.
+        * dom/Document.idl: Use non-legacy exceptions. Removed exception
+        entirely from createTouch.
+
+        * dom/Element.cpp:
+        (WebCore::Element::parseAttributeName): Updated to use the new
+        Document::parseQualifiedName.
+        * editing/EditorCommand.cpp:
+        (WebCore::executeFormatBlock): Ditto.
+
+        * inspector/InspectorDOMAgent.cpp:
+        (WebCore::InspectorDOMAgent::setNodeName): Updated for the new
+        exception handling.
+        * inspector/InspectorPageAgent.cpp:
+        (WebCore::InspectorPageAgent::getCookies): Ditto.
+
+        * page/ios/FrameIOS.mm:
+        (WebCore::Frame::initWithSimpleHTMLDocument): Use the
+        HTMLHtmlElement::create and HTMLBodyElement::create instead of using
+        createElementNS to make the simple document.
+
+        * svg/animation/SVGSMILElement.cpp:
+        (WebCore::SVGSMILElement::constructAttributeName): Renamed, made this
+        a member function, updated to use the new Document::parseQualifiedName,
+        and also moved the code to get the attribute in here.
+        (WebCore::SVGSMILElement::constructAttributeName): Added. Helper function
+        for the two places we update the attribute name from attributeNameAttr.
+        (WebCore::SVGSMILElement::insertedInto): Use updateAttributeName.
+        (WebCore::SVGSMILElement::svgAttributeChanged): Ditto.
+        * svg/animation/SVGSMILElement.h: Updated for the above.
+
+        * xml/parser/XMLDocumentParserLibxml2.cpp:
+        (WebCore::XMLDocumentParser::processingInstruction): Updated to understand
+        ExceptionOr rather than an out argument.
+        (WebCore::XMLDocumentParser::startDocument): Removed ASSERT_NO_EXCEPTION.
+
+2016-10-31  Wenson Hsieh  <wenson_hsieh@apple.com>
+
+        Holding down a key to choose an accented character should fire "insertReplacementText" input events
+        https://bugs.webkit.org/show_bug.cgi?id=164209
+        <rdar://problem/29019305>
+
+        Reviewed by Darin Adler.
+
+        For TypingCommands that correspond to "insertReplacementText" inputTypes, vend dataTransfers for resulting
+        beforeinput and input events if the edited area is not an input field or textarea. To do this, convert the plain
+        text representation of the content to be inserted to HTML text using a helper function,
+        MarkupAccumulator::appendCharactersReplacingEntities, that is used when creating markup for Text nodes.
+
+        Tests: fast/events/before-input-prevent-insert-replacement.html
+               fast/events/input-event-insert-replacement.html
+
+        * editing/TypingCommand.cpp:
+        (WebCore::TypingCommand::inputEventData):
+        (WebCore::TypingCommand::inputEventDataTransfer):
+        * editing/TypingCommand.h:
+
+2016-10-30  Dave Hyatt  <hyatt@apple.com>
+
+        [CSS Parser] Miscellaneous bug fixes
+        https://bugs.webkit.org/show_bug.cgi?id=164211
+
+        Reviewed by Darin Adler.
+
+        * css/parser/CSSPropertyParser.cpp:
+        (WebCore::CSSPropertyParser::consumeTransformOrigin):
+        Make sure to properly reject invalid transform-origin-z values.
+
+        * css/parser/CSSSelectorParser.cpp:
+        (WebCore::CSSSelectorParser::consumeAttribute):
+        Make attribute selector parsing strict about requiring a ] to end
+        the selector.
+
+        (WebCore::CSSSelectorParser::consumePseudo):
+        Force the nth-child "of" syntax to have whitespace after "of" but
+        before the selector. It is unclear if this should be a requirement
+        or not (spec is ambiguous), but for now we match the old parser.
+
+        (WebCore::CSSSelectorParser::consumeCombinator):
+        Fix a bug that caused the double child combinator to match even
+        when there was whitespace between the two > symbols.
+
+2016-10-31  Youenn Fablet  <youenn@apple.com>
+
+        RTCOfferAnswerOptions does not need to be refcounted
+        https://bugs.webkit.org/show_bug.cgi?id=164216
+
+        Reviewed by Darin Adler.
+
+        Covered by existing tests.
+
+        Making RTCOffer/Answer options dictionaries as per specification.
+        Removing code that handles RTCOffer/Answer options dictionary since this is done by the binding generator.
+        Updated users of the options accordingly.
+
+        * CMakeLists.txt:
+        * Modules/mediastream/MediaEndpointPeerConnection.cpp:
+        (WebCore::MediaEndpointPeerConnection::createOffer):
+        (WebCore::MediaEndpointPeerConnection::createOfferTask):
+        (WebCore::MediaEndpointPeerConnection::createAnswer):
+        (WebCore::MediaEndpointPeerConnection::createAnswerTask):
+        * Modules/mediastream/MediaEndpointPeerConnection.h:
+        * Modules/mediastream/PeerConnectionBackend.h:
+        * Modules/mediastream/RTCOfferAnswerOptions.cpp: Removed.
+        * Modules/mediastream/RTCOfferAnswerOptions.h:
+        * Modules/mediastream/RTCPeerConnection.cpp:
+        (WebCore::RTCPeerConnection::queuedCreateOffer):
+        (WebCore::RTCPeerConnection::queuedCreateAnswer):
+        * Modules/mediastream/RTCPeerConnection.h:
+        * Modules/mediastream/RTCPeerConnection.idl:
+        * WebCore.xcodeproj/project.pbxproj:
+
 2016-10-31  Youenn Fablet  <youenn@apple.com>
 
         fast/mediastream/RTCPeerConnection-* tests crashing under ASan