Move some more assorted classes from ExceptionCode to Exception
[WebKit.git] / Source / WebCore / ChangeLog
index df08fd8..9ec1559 100644 (file)
+2016-10-21  Darin Adler  <darin@apple.com>
+
+        Move some more assorted classes from ExceptionCode to Exception
+        https://bugs.webkit.org/show_bug.cgi?id=163775
+
+        Reviewed by Chris Dumez.
+
+        * Modules/fetch/WorkerGlobalScopeFetch.cpp:
+        (WebCore::WorkerGlobalScopeFetch::fetch): Remove unnecessary calls to
+        WorkerGlobalScope::scriptExcutionObject, which just returns the scope itself.
+
+        * Modules/notifications/Notification.cpp: Added now-needed include.
+        * Modules/webdatabase/DOMWindowWebDatabase.cpp: Ditto.
+
+        * WebCore.xcodeproj/project.pbxproj: Added WindowOrWorkerGlobalScope.idl.
+
+        * bindings/js/JSDedicatedWorkerGlobalScopeCustom.cpp:
+        (WebCore::JSDedicatedWorkerGlobalScope::postMessage): Pass a reference instead
+        of a pointer to handlePostMessage.
+        * bindings/js/JSMessagePortCustom.cpp:
+        (WebCore::JSMessagePort::postMessage): Ditto.
+
+        * bindings/js/JSMessagePortCustom.h: Use pragma once. Change handlePostMessage
+        to take a reference to the object instead of a pointer, and also to use
+        propagateException since postMessage now uses ExceptionOr.
+
+        * bindings/js/JSWorkerCustom.cpp:
+        (WebCore::JSWorker::postMessage): Pass a reference instead of a pointer to
+        handlePostMessage.
+        (WebCore::constructJSWorker): Use the version of toJSNewlyCreated that handles
+        propagating an exception from ExceptionOr.
+
+        * bindings/js/JSWorkerGlobalScopeCustom.cpp:
+        (WebCore::JSWorkerGlobalScope::visitAdditionalChildren): Use auto.
+        Remove unnecessary round trip through the scriptExecutionContext function.
+        (WebCore::JSWorkerGlobalScope::importScripts): Use reserveInitialCapacity and
+        uncheckedAppend to build up the vector of strings. Use propagateException
+        to deal with ExceptionOr result.
+
+        * dom/MessagePort.cpp:
+        (WebCore::MessagePort::MessagePort): Initialize boolean data members in the
+        class definition instead of here.
+        (WebCore::MessagePort::postMessage): Use ExceptionOr.
+        (WebCore::MessagePort::entangle): Use an rvalue reference.
+        (WebCore::MessagePort::dispatchMessages): Use ExceptionOr.
+        (WebCore::MessagePort::disentanglePorts): Ditto. Also use a more efficient
+        idiom that does half as much hashing as the old algorithm, and got rid an
+        unneeded local variable.
+        (WebCore::MessagePort::entanglePorts): Use an rvalue reference.
+        * dom/MessagePort.h: Updated for above changes.
+
+        * fileapi/FileReader.cpp:
+        (WebCore::FileReader::create): Use auto.
+        (WebCore::FileReader::FileReader): Initialize scalars in the class definition.
+        (WebCore::FileReader::~FileReader): Call cancel on the loader directly
+        instead of sharing code with the stop function.
+        (WebCore::FileReader::stop): Moved the body of the terminate function here.
+        (WebCore::FileReader::readAsArrayBuffer): Use ExceptionOr.
+        (WebCore::FileReader::readAsBinaryString): Ditto.
+        (WebCore::FileReader::readAsText): Ditto.
+        (WebCore::FileReader::readAsDataURL): Ditto.
+        (WebCore::FileReader::readInternal): Ditto. Also add a cast now that
+        we derive privately from FileReaderLoaderClient.
+        (WebCore::FileReader::abort): Call stop instead of terminate.
+        (WebCore::FileReader::terminate): Deleted. Moved code into stop.
+        (WebCore::FileReader::didReceiveData): Moved comment to where the constant is.
+        * fileapi/FileReader.h: Updated for above changes. Made more functions private
+        and used final instead of override.
+        * fileapi/FileReader.idl: Use non-legacy exceptions.
+
+        * fileapi/FileReaderSync.cpp:
+        (WebCore::FileReaderSync::readAsArrayBuffer): Use ExceptionOr.
+        (WebCore::FileReaderSync::readAsBinaryString): Ditto.
+        (WebCore::FileReaderSync::readAsText): Ditto.
+        (WebCore::FileReaderSync::readAsDataURL): Ditto.
+        (WebCore::FileReaderSync::startLoading): Ditto.
+        (WebCore::FileReaderSync::startLoadingString): Added. Helper to cut down on
+        repeated code in functions above.
+        * fileapi/FileReaderSync.h: Updated for above changes.
+        * fileapi/FileReaderSync.idl: Use non-legacy exceptions.
+
+        * page/Base64Utilities.cpp:
+        (WebCore::Base64Utilities::btoa): Use ExceptionOr.
+        (WebCore::Base64Utilities::atob): Ditto.
+        * page/Base64Utilities.h: Updated for above changes.
+
+        * page/DOMWindow.cpp:
+        (WebCore::DOMWindow::navigator): Pass a reference to the frame.
+        (WebCore::DOMWindow::postMessage): Use ExceptionOr when calling
+        MessagePort::disentanglePorts. Also udpated for changes to the
+        PostMessageTimer.
+
+        * page/Navigator.cpp:
+        (WebCore::Navigator::Navigator): Take a reference.
+        (WebCore::shouldHideFourDot): Ditto
+        (WebCore::Navigator::appVersion): Pass a reference.
+        (WebCore::Navigator::plugins): Return a reference.
+        (WebCore::Navigator::mimeTypes): Ditto.
+        * page/Navigator.h: Updated for above changes. Also marked the
+        class final and moved derivation from RefCounted to NavigatorBase.
+
+        * page/NavigatorBase.h: Addded derivation from RefCounted since
+        both derived classes want that, and the destructor is already virtual.
+
+        * page/WindowOrWorkerGlobalScope.idl: Use non-legacy exceptions.
+
+        * page/WorkerNavigator.cpp:
+        (WebCore::WorkerNavigator::~WorkerNavigator): Deleted.
+
+        * page/WorkerNavigator.h: Moved derivation from RefCounted to
+        NavigatorBase. Also marked class final.
+
+        * workers/AbstractWorker.cpp:
+        (WebCore::AbstractWorker::resolveURL): Use ExceptionOr.
+        * workers/AbstractWorker.h: Updated for above changes.
+
+        * workers/DedicatedWorkerGlobalScope.cpp:
+        (WebCore::DedicatedWorkerGlobalScope::create): Use RefPtr&&
+        instead of PassRefPtr.
+        (WebCore::DedicatedWorkerGlobalScope::DedicatedWorkerGlobalScope):
+        Ditto.
+        (WebCore::DedicatedWorkerGlobalScope::postMessage): Use ExceptionOr.
+        (WebCore::DedicatedWorkerGlobalScope::importScripts): Ditto.
+        * workers/DedicatedWorkerGlobalScope.h: Updated for above changes.
+        * workers/DedicatedWorkerGlobalScope.idl: Use non-legacy exceptions.
+
+        * workers/Worker.cpp:
+        (WebCore::Worker::create): Use ExceptionOr.
+        (WebCore::Worker::postMessage): Ditto.
+        * workers/Worker.h: Updated for above changes.
+        * workers/Worker.idl: Use non-legacy exception.
+
+        * workers/WorkerGlobalScope.cpp:
+        (WebCore::WorkerGlobalScope::WorkerGlobalScope): Moved initialization
+        of m_closing to class definition.
+        (WebCore::WorkerGlobalScope::~WorkerGlobalScope): Removed call to
+        deleted notifyObserversOfStop function.
+        (WebCore::WorkerGlobalScope::importScripts): Use ExceptionOr. Also use
+        reserveInitialCapacity and uncheckedAppend to build a vector.
+        (WebCore::WorkerGlobalScope::addConsoleMessage): Use an rvalue reference.
+        Also moved the body of one of the addMessageToWorkerConsole overloads into
+        one of the overloads of this function, and changed the other to call addMessage.
+        (WebCore::WorkerGlobalScope::addMessage): Moved the body of the other
+        addMessageToWorkerConsole here.
+        (WebCore::WorkerGlobalScope::addMessageToWorkerConsole): Deleted.
+        (WebCore::WorkerGlobalScope::Observer::Observer): Deleted.
+        (WebCore::WorkerGlobalScope::Observer::~Observer): Deleted.
+        (WebCore::WorkerGlobalScope::Observer::stopObserving): Deleted.
+        (WebCore::WorkerGlobalScope::registerObserver): Deleted.
+        (WebCore::WorkerGlobalScope::unregisterObserver): Deleted.
+        (WebCore::WorkerGlobalScope::notifyObserversOfStop): Deleted.
+        * workers/WorkerGlobalScope.h: Removed unneeded includes. Moved many virtual
+        function overrides into the private section. Marked many functions final instead
+        of just override. Removed unused Observer class and m_workerObservers set.
+
+        * workers/WorkerThread.cpp:
+        (WebCore::WorkerThread::stop): Removed call to deleted
+        WorkerGlobalScope::notifyObserversOfStop function.
+
+2016-10-21  Antti Koivisto  <antti@apple.com>
+
+        Tighten ComputedStyleExtractor to use Element instead of Node
+        https://bugs.webkit.org/show_bug.cgi?id=163798
+
+        Reviewed by Andreas Kling.
+
+        Also make its functions non-const as they may compute style.
+
+        * css/CSSComputedStyleDeclaration.cpp:
+        (WebCore::styleElementForNode):
+        (WebCore::ComputedStyleExtractor::ComputedStyleExtractor):
+
+            If we are called with a Node figure out the style Element in constructor.
+
+        (WebCore::ComputedStyleExtractor::getFontSizeCSSValuePreferringKeyword):
+        (WebCore::ComputedStyleExtractor::useFixedFontDefaultSize):
+        (WebCore::ComputedStyleExtractor::styledElement):
+        (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
+        (WebCore::CSSComputedStyleDeclaration::copyProperties):
+        (WebCore::elementOrItsAncestorNeedsStyleRecalc):
+
+            Use composed tree iterator for increased correctness in shadow trees.
+
+        (WebCore::updateStyleIfNeededForElement):
+        (WebCore::computeRenderStyleForProperty):
+        (WebCore::ComputedStyleExtractor::customPropertyValue):
+        (WebCore::ComputedStyleExtractor::customPropertyText):
+        (WebCore::ComputedStyleExtractor::propertyValue):
+        (WebCore::CSSComputedStyleDeclaration::length):
+        (WebCore::CSSComputedStyleDeclaration::item):
+        (WebCore::ComputedStyleExtractor::propertyMatches):
+        (WebCore::ComputedStyleExtractor::copyProperties):
+        (WebCore::ComputedStyleExtractor::getCSSPropertyValuesForShorthandProperties):
+        (WebCore::ComputedStyleExtractor::getCSSPropertyValuesForSidesShorthand):
+        (WebCore::ComputedStyleExtractor::getCSSPropertyValuesForGridShorthand):
+        (WebCore::ComputedStyleExtractor::copyPropertiesInSet):
+        (WebCore::CSSComputedStyleDeclaration::getPropertyValue):
+        (WebCore::ComputedStyleExtractor::getBackgroundShorthandValue):
+        (WebCore::ComputedStyleExtractor::styledNode): Deleted.
+        (WebCore::nodeOrItsAncestorNeedsStyleRecalc): Deleted.
+        (WebCore::updateStyleIfNeededForNode): Deleted.
+        * css/CSSComputedStyleDeclaration.h:
+        * css/SVGCSSComputedStyleDeclaration.cpp:
+        (WebCore::ComputedStyleExtractor::svgPropertyValue):
+        * editing/EditingStyle.cpp:
+        (WebCore::EditingStyle::removeEquivalentProperties):
+        * editing/EditingStyle.h:
+
+2016-10-21  Chris Dumez  <cdumez@apple.com>
+
+        WebGL2RenderingContext.texSubImage3D() should use a union instead of overloading
+        https://bugs.webkit.org/show_bug.cgi?id=163792
+
+        Reviewed by Darin Adler.
+
+        WebGL2RenderingContext.texSubImage3D() should use a union instead of overloading for 
+        - https://www.khronos.org/registry/webgl/specs/latest/2.0/#3.7 (for texSubImage3D)
+        - https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14 (for TexImageSource)
+
+        * html/canvas/WebGL2RenderingContext.cpp:
+        (WebCore::WebGL2RenderingContext::texSubImage3D):
+        * html/canvas/WebGL2RenderingContext.h:
+        * html/canvas/WebGL2RenderingContext.idl:
+
+2016-10-21  Zalan Bujtas  <zalan@apple.com>
+
+        Do not mutate the render tree while collecting selection repaint rects.
+        https://bugs.webkit.org/show_bug.cgi?id=163800
+        <rdar://problem/28806886>
+
+        Reviewed by David Hyatt.
+
+        RenderListItem not only mutates the tree while in layout but it also uses
+        the old descendant context to find the insertion point.
+        This patch strictly ensures that we only do it while in layout and never
+        in other cases such as collecting repaint rects.
+        This gets redundant when webkit.org/b/163789 is fixed.
+
+        Test: fast/lists/crash-when-list-marker-is-moved-during-selection.html
+
+        * rendering/RenderListItem.cpp:
+        (WebCore::RenderListItem::insertOrMoveMarkerRendererIfNeeded):
+
+2016-10-21  Dave Hyatt  <hyatt@apple.com>
+
+        [CSS Parser] Support horizontal-bt writing mode
+        https://bugs.webkit.org/show_bug.cgi?id=163797
+
+        Reviewed by Zalan Bujtas.
+
+        * css/parser/CSSParserFastPaths.cpp:
+        (WebCore::CSSParserFastPaths::isValidKeywordPropertyAndValue):
+
+2016-10-20  Brent Fulgham  <bfulgham@apple.com>
+
+        [Win][Direct2D] Correct some memory leaks and other minor bugs
+        https://bugs.webkit.org/show_bug.cgi?id=163769
+
+        Reviewed by Alex Christensen.
+
+        Several D2D handles were being leaked.
+        Direct2D sometimes returns an infinite rect containing { -inf, -inf, FloatMax, FloatMax },
+        sometimes { -FloatMax, -FloatMax, inf, inf }, and various combinations thereof. This caused
+        most SVG drawing to decide no screen rect was contained in the "infinite rect" so nothing
+        would be drawn.
+        
+        Tested by existing layout tests. 
+
+        * platform/graphics/GraphicsContext.h:
+        * platform/graphics/win/FloatRectDirect2D.cpp:
+        (WebCore::isInfiniteRect): Recognize various infinite rects in Windows.
+        (WebCore::FloatRect::FloatRect): Convert a Windows infinite rect to the style
+        we use inside WebKit.
+        * platform/graphics/win/FontCascadeDirect2D.cpp:
+        (WebCore::FontCascade::drawGlyphs): Use cached brushes if possible.
+        * platform/graphics/win/GlyphPageTreeNodeDirect2D.cpp:
+        (WebCore::GlyphPage::fill): Don't terminate on this error case.
+        * platform/graphics/win/GradientDirect2D.cpp:
+        (WebCore::Gradient::generateGradient): Don't leak gradients.
+        * platform/graphics/win/GraphicsContextDirect2D.cpp:
+        (WebCore::GraphicsContextPlatformPrivate::brushWithColor): Added.
+        (WebCore::GraphicsContext::brushWithColor): Added.
+        (WebCore::GraphicsContextPlatformPrivate::concatCTM): Perform transform multiplication
+        in the right order (hint: it's not distributive).
+        (WebCore::GraphicsContext::drawWithShadow): Use convenience method.
+        (WebCore::GraphicsContext::fillRect): Ditto.
+        (WebCore::GraphicsContext::platformFillRoundedRect): Ditto.
+        (WebCore::GraphicsContext::clearRect): Ditto.
+        (WebCore::GraphicsContext::setPlatformStrokeColor): Ditto.
+        (WebCore::GraphicsContext::setPlatformFillColor): Ditto.
+        * platform/graphics/win/PathDirect2D.cpp:
+        (WebCore::Path::polygonPathFromPoints): No need to convert manually.
+        (WebCore::Path::~Path): Don't leak ID2D1Geometry entities.
+        (WebCore::Path::appendGeometry): Ditto.
+        (WebCore::Path::createGeometryWithFillMode): Ditto.
+        (WebCore::Path::Path): Ditto.
+        (WebCore::Path::operator=): Ditto.
+        (WebCore::Path::strokeBoundingRect): Provide an implementation.
+        (WebCore::Path::addRect): No need for manual casting here.
+
+2016-10-21  Wenson Hsieh  <wenson_hsieh@apple.com>
+
+        Fix minor style issue in the signature of StaticRange::create
+        https://bugs.webkit.org/show_bug.cgi?id=163786
+        <rdar://problem/28853079>
+
+        Reviewed by Alex Christensen.
+
+        Change `Ref<WebCore::Node> &&` to `Ref<Node>&&`.
+
+        * dom/StaticRange.cpp:
+        (WebCore::StaticRange::create):
+
+2016-10-21  Dave Hyatt  <hyatt@apple.com>
+
+        [CSS Parser] Add support for -webkit-line-box-contain
+        https://bugs.webkit.org/show_bug.cgi?id=163794
+
+        Reviewed by Zalan Bujtas.
+
+        * css/parser/CSSPropertyParser.cpp:
+        (WebCore::consumeLineBoxContain):
+        (WebCore::CSSPropertyParser::parseSingleValue):
+
+2016-10-21  Dave Hyatt  <hyatt@apple.com>
+
+        [CSS Parser] Add support for @-webkit-region rules
+        https://bugs.webkit.org/show_bug.cgi?id=163787
+
+        Reviewed by Zalan Bujtas.
+
+        * css/StyleRule.cpp:
+        (WebCore::StyleRuleRegion::StyleRuleRegion):
+        * css/StyleRule.h:
+        * css/parser/CSSAtRuleID.cpp:
+        (WebCore::cssAtRuleID):
+        * css/parser/CSSAtRuleID.h:
+        * css/parser/CSSParserImpl.cpp:
+        (WebCore::CSSParserImpl::consumeAtRule):
+        (WebCore::CSSParserImpl::consumePageRule):
+        (WebCore::CSSParserImpl::consumeRegionRule):
+        * css/parser/CSSParserImpl.h:
+
+2016-10-21  David Kilzer  <ddkilzer@apple.com>
+
+        Bug 163757: Use IntSize::unclampedArea() in PDFDocumentImage::updateCachedImageIfNeeded()
+        <https://webkit.org/b/163757>
+
+        Reviewed by Brent Fulgham.
+
+        No new tests since there is no change in nominal behavior.
+
+        * platform/graphics/cg/PDFDocumentImage.cpp:
+        (WebCore::PDFDocumentImage::updateCachedImageIfNeeded): Use
+        IntSize::unclampedArea() where manual calculations were used
+        previously.  Also gets rid of more safeCast<size_t>() use.
+
+2016-10-21  Chris Dumez  <cdumez@apple.com>
+
+        [Web IDL] Support unions in our overload resolution algorithm
+        https://bugs.webkit.org/show_bug.cgi?id=163764
+
+        Reviewed by Darin Adler.
+
+        Support unions in our overload resolution algorithm as per:
+        - https://heycam.github.io/webidl/#es-overloads
+        - https://heycam.github.io/webidl/#dfn-distinguishable
+
+        * bindings/scripts/CodeGeneratorJS.pm:
+        (IsIDLTypeDistinguishableWithUnionForOverloadResolution):
+        (AreTypesDistinguishableForOverloadResolution):
+        (GetOverloadThatMatches):
+        (GenerateOverloadedFunctionOrConstructor):
+        * bindings/scripts/test/JS/JSTestObj.cpp:
+        * bindings/scripts/test/TestObj.idl:
+
+2016-10-21  Chris Dumez  <cdumez@apple.com>
+
+        AudioNode.connect(): First parameter should not be nullable
+        https://bugs.webkit.org/show_bug.cgi?id=163773
+
+        Reviewed by Darin Adler.
+
+        AudioNode.connect()'s first parameter should not be nullable:
+        - https://webaudio.github.io/web-audio-api/#idl-def-AudioNode.
+
+        We were throwing a SYNTAX_ERR when passing null, we now throw
+        a TypeError instead.
+
+        No new tests, updated existing test.
+
+        * Modules/webaudio/AudioBasicInspectorNode.cpp:
+        (WebCore::AudioBasicInspectorNode::connect):
+        * Modules/webaudio/AudioBasicInspectorNode.h:
+        * Modules/webaudio/AudioNode.cpp:
+        (WebCore::AudioNode::connect):
+        * Modules/webaudio/AudioNode.h:
+        * Modules/webaudio/AudioNode.idl:
+
+2016-10-21  Wenson Hsieh  <wenson_hsieh@apple.com>
+
+        Implement InputEvent.getTargetRanges() for the input events spec
+        https://bugs.webkit.org/show_bug.cgi?id=162947
+        <rdar://problem/28853079>
+
+        Reviewed by Darin Adler.
+
+        Implements InputEvent.getTargetRanges(). See individual method changes below for more details. Adds a new hook
+        for subclasses of CompositeEditCommand to vend a list of target StaticRanges when retrieving target ranges for
+        an editing command on a contenteditable area.
+
+        Tests: fast/events/before-input-delete-empty-list-target-ranges.html
+               fast/events/before-input-delete-text-target-ranges.html
+               fast/events/before-input-replace-text-target-ranges.html
+
+        * CMakeLists.txt:
+        * DerivedSources.make:
+        * WebCore.xcodeproj/project.pbxproj:
+
+        Add StaticRange.idl, StaticRange.cpp and StaticRange.h.
+
+        * bindings/generic/RuntimeEnabledFeatures.h:
+        (WebCore::RuntimeEnabledFeatures::setInputEventsEnabled):
+        (WebCore::RuntimeEnabledFeatures::inputEventsEnabled):
+
+        Add a new runtime bindings flag for InputEvents and guard both InputEvent and StaticRange behind it.
+
+        * dom/DOMAllInOne.cpp:
+        * dom/InputEvent.cpp:
+        (WebCore::InputEvent::InputEvent):
+        * dom/InputEvent.h:
+        * dom/InputEvent.idl:
+        * dom/StaticRange.cpp: Copied from Source/WebCore/dom/InputEvent.cpp.
+        (WebCore::StaticRange::StaticRange):
+        (WebCore::StaticRange::create):
+        (WebCore::StaticRange::createFromRange):
+
+        Convenience method for creating a StaticRange from a Range's start/end container and offset.
+
+        (WebCore::StaticRange::startContainer):
+        (WebCore::StaticRange::endContainer):
+        (WebCore::StaticRange::collapsed):
+        * dom/StaticRange.h: Copied from Source/WebCore/dom/InputEvent.cpp.
+        (WebCore::StaticRange::startOffset):
+        (WebCore::StaticRange::endOffset):
+        * dom/StaticRange.idl: Copied from Source/WebCore/editing/ReplaceRangeWithTextCommand.h.
+        * editing/CompositeEditCommand.cpp:
+        (WebCore::CompositeEditCommand::willApplyCommand):
+        (WebCore::CompositeEditCommand::targetRanges):
+
+        Virtual method that returns a list of target ranges which are associated with this command.
+
+        (WebCore::CompositeEditCommand::targetRangesForBindings):
+
+        Non-virtual method that calls the above targetRanges(). Takes whether or not the CompositeEditCommand is editing
+        a textarea or plain text input into account.
+
+        (WebCore::CompositeEditCommand::moveParagraphs):
+        * editing/CompositeEditCommand.h:
+        * editing/EditCommand.cpp:
+        (WebCore::EditCommand::frame):
+        * editing/EditCommand.h:
+        (WebCore::EditCommand::document):
+        * editing/Editor.cpp:
+        (WebCore::dispatchBeforeInputEvent):
+        (WebCore::dispatchInputEvent):
+        (WebCore::dispatchBeforeInputEvents):
+
+        Changed the `beforeinput` event dispatch to use the regular Node::dispatchEvent instead of dispatchScopedEvent.
+        This is because if the page prevents the `beforeinput` event, we need to know immediately in order to bail from
+        the default action.
+
+        (WebCore::dispatchInputEvents):
+        (WebCore::Editor::willApplyEditing):
+
+        Added a list of static ranges as a parameter when calling on the Editor to dispatch `beforeinput` events.
+        By default, this uses the composite edit command's targetRangesForBindings(), though it may be special cased
+        by subclasses of CompositeEditCommand (see ReplaceRangeWithTextCommand, SpellingCorrectionCommand, and
+        TypingCommand).
+
+        * editing/Editor.h:
+        * editing/ReplaceRangeWithTextCommand.cpp:
+        (WebCore::ReplaceRangeWithTextCommand::targetRanges):
+        * editing/ReplaceRangeWithTextCommand.h:
+        * editing/SpellingCorrectionCommand.cpp:
+        (WebCore::SpellingCorrectionCommand::targetRanges):
+        * editing/SpellingCorrectionCommand.h:
+        * editing/TypingCommand.cpp:
+        (WebCore::editActionIsDeleteByTyping):
+        (WebCore::TypingCommand::shouldDeferWillApplyCommandUntilAddingTypingCommand):
+        (WebCore::TypingCommand::willApplyCommand):
+        (WebCore::TypingCommand::willAddTypingToOpenCommand):
+        (WebCore::TypingCommand::deleteKeyPressed):
+        (WebCore::TypingCommand::forwardDeleteKeyPressed):
+
+        Moves the firing of the `beforeinput` until after the selection range to delete has been computed.
+
+        * editing/TypingCommand.h:
+
+2016-10-21  Antti Koivisto  <antti@apple.com>
+
+        Style resolver should be updated lazily
+        https://bugs.webkit.org/show_bug.cgi?id=163721
+
+        Reviewed by Andreas Kling.
+
+        Currently when stylesheets change in some way we generally update style resolvers and
+        invalidate style immediately. We should do this lazily to avoid unnecessary work.
+
+        Also improve naming of the stylesheet invalidation functions and use more optimal functions in some places.
+
+        * css/CSSComputedStyleDeclaration.cpp:
+        (WebCore::updateStyleIfNeededForNode):
+        * css/CSSStyleSheet.cpp:
+        (WebCore::CSSStyleSheet::didMutateRules):
+        (WebCore::CSSStyleSheet::didMutate):
+        (WebCore::CSSStyleSheet::setDisabled):
+        * css/StyleResolver.cpp:
+        (WebCore::StyleResolver::StyleResolver):
+
+            Initialize root style font with null font selector.
+            This avoids hitting a CSSFontSelector assert in fast/media/mq-relative-constraints-08.html where
+            media query evaluation requires font information before it is ready.
+            Exposed by increased laziness in this patch.
+
+        * dom/Document.cpp:
+        (WebCore::Document::setContentLanguage):
+        (WebCore::Document::updateLayoutIgnorePendingStylesheets):
+        (WebCore::Document::isPageBoxVisible):
+        (WebCore::Document::pageSizeAndMarginsInPixels):
+        (WebCore::Document::processHttpEquiv):
+        (WebCore::Document::setSelectedStylesheetSet):
+        (WebCore::Document::didInsertInDocumentShadowRoot):
+        (WebCore::Document::didRemoveInDocumentShadowRoot):
+        * dom/Document.h:
+        (WebCore::Document::inDocumentShadowRoots):
+
+            Track all shadow roots in the document. This allows us to find and flush style scopes cheaply.
+
+        * dom/Element.cpp:
+        (WebCore::Element::computedStyle):
+        * dom/ExtensionStyleSheets.cpp:
+        (WebCore::ExtensionStyleSheets::ExtensionStyleSheets):
+        (WebCore::ExtensionStyleSheets::clearPageUserSheet):
+        (WebCore::ExtensionStyleSheets::updatePageUserSheet):
+        (WebCore::ExtensionStyleSheets::invalidateInjectedStyleSheetCache):
+        (WebCore::ExtensionStyleSheets::addUserStyleSheet):
+        (WebCore::ExtensionStyleSheets::addAuthorStyleSheetForTesting):
+        (WebCore::ExtensionStyleSheets::addDisplayNoneSelector):
+        (WebCore::ExtensionStyleSheets::maybeAddContentExtensionSheet):
+        (WebCore::ExtensionStyleSheets::styleResolverChangedTimerFired): Deleted.
+
+            Since updates are now done lazily we don't need a special timer for extension stylesheets.
+
+        * dom/ExtensionStyleSheets.h:
+        * dom/ProcessingInstruction.cpp:
+        (WebCore::ProcessingInstruction::checkStyleSheet):
+        (WebCore::ProcessingInstruction::sheetLoaded):
+        (WebCore::ProcessingInstruction::removedFrom):
+        * dom/ShadowRoot.cpp:
+        (WebCore::ShadowRoot::ShadowRoot):
+        (WebCore::ShadowRoot::insertedInto):
+        (WebCore::ShadowRoot::removedFrom):
+        (WebCore::ShadowRoot::styleScope):
+        * dom/ShadowRoot.h:
+        * html/HTMLLinkElement.cpp:
+        (WebCore::HTMLLinkElement::setDisabledState):
+        (WebCore::HTMLLinkElement::parseAttribute):
+        (WebCore::HTMLLinkElement::process):
+        (WebCore::HTMLLinkElement::removePendingSheet):
+        * html/HTMLStyleElement.cpp:
+        (WebCore::HTMLStyleElement::parseAttribute):
+        * inspector/InspectorCSSAgent.cpp:
+        (WebCore::InspectorCSSAgent::createInspectorStyleSheetForDocument):
+        (WebCore::InspectorCSSAgent::forcePseudoState):
+        (WebCore::InspectorCSSAgent::resetPseudoStates):
+        * inspector/InspectorPageAgent.cpp:
+        (WebCore::InspectorPageAgent::setEmulatedMedia):
+        * page/Frame.cpp:
+        (WebCore::Frame::setPrinting):
+        * page/FrameView.cpp:
+        (WebCore::FrameView::layout):
+        (WebCore::FrameView::setPagination):
+        (WebCore::FrameView::setViewportSizeForCSSViewportUnits):
+        * page/Page.cpp:
+        (WebCore::Page::setViewMode):
+        (WebCore::Page::setNeedsRecalcStyleInAllFrames):
+        (WebCore::Page::invalidateInjectedStyleSheetCacheInAllFrames):
+        * style/StyleScope.cpp:
+        (WebCore::Style::Scope::setPreferredStylesheetSetName):
+        (WebCore::Style::Scope::setSelectedStylesheetSetName):
+        (WebCore::Style::Scope::removePendingSheet):
+        (WebCore::Style::Scope::removeStyleSheetCandidateNode):
+        (WebCore::Style::Scope::activeStyleSheetsForInspector):
+        (WebCore::Style::Scope::flushPendingUpdate):
+
+            Also flush descendant shadow roots.
+
+        (WebCore::Style::Scope::scheduleUpdate):
+        (WebCore::Style::Scope::didChangeActiveStyleSheetCandidates):
+
+            Make lazy.
+
+        (WebCore::Style::Scope::didChangeStyleSheetContents):
+
+            Make lazy.
+
+        (WebCore::Style::Scope::didChangeStyleSheetEnvironment):
+
+            Environment changes also affect author shadow roots.
+
+        (WebCore::Style::Scope::styleSheetsForStyleSheetList):
+        (WebCore::Style::Scope::scheduleActiveSetUpdate): Deleted.
+        (WebCore::Style::Scope::didChangeCandidatesForActiveSet): Deleted.
+        (WebCore::Style::Scope::didChangeContentsOrInterpretation): Deleted.
+
+            Improved naming of these and split didChangeContentsOrInterpretation into two separate functions.
+
+        * style/StyleScope.h:
+        (WebCore::Style::Scope::styleSheetsForStyleSheetList): Deleted.
+        (WebCore::Style::Scope::setPreferredStylesheetSetName): Deleted.
+        (WebCore::Style::Scope::setSelectedStylesheetSetName): Deleted.
+        * svg/SVGFontFaceElement.cpp:
+        (WebCore::SVGFontFaceElement::rebuildFontFace):
+        (WebCore::SVGFontFaceElement::removedFrom):
+        * testing/Internals.cpp:
+        (WebCore::Internals::resetToConsistentState):
+
+            Ensure that cationsStyleSheetOverride really becomes empty. Some tests rely on not having suprise
+            inserted stylesheets. Previously this was racy and the patch affected order of things.
+
+        (WebCore::Internals::styleChangeType):
+        * xml/XMLTreeViewer.cpp:
+        (WebCore::XMLTreeViewer::transformDocumentToTreeView):
+        * xml/parser/XMLDocumentParser.cpp:
+        (WebCore::XMLDocumentParser::end):
+        * xml/parser/XMLDocumentParserLibxml2.cpp:
+        (WebCore::XMLDocumentParser::doEnd):
+
+2016-10-21  Xabier Rodriguez Calvar  <calvaris@igalia.com> and Adam Bergkvist  <adam.bergkvist@ericsson.com>
+
+        WebRTC: [OpenWebRTC] Move SDPProcessorScriptResource(Gtk) to openwebrtc directory
+        https://bugs.webkit.org/show_bug.cgi?id=163778
+
+        Reviewed by Philippe Normand.
+
+        Move SDPProcessorScriptResourceGtk from the platform gtk directory to the port generic
+        openwebrtc directory to make it usable by other ports. Also drop the Gtk-suffix.
+
+        No change of behavior.
+
+        * PlatformGTK.cmake:
+        * platform/mediastream/gtk/SDPProcessorScriptResourceGtk.cpp:
+        (WebCore::SDPProcessorScriptResource::scriptString): Deleted.
+        * platform/mediastream/openwebrtc/SDPProcessorScriptResource.cpp: Renamed from Source/WebCore/platform/mediastream/gtk/SDPProcessorScriptResourceGtk.cpp.
+        (WebCore::SDPProcessorScriptResource::scriptString):
+
+2016-10-21  Miguel Gomez  <magomez@igalia.com>
+
+        [GTK] Several tests crashing on debug bot in (anonymous namespace)::MediaPlayerPrivateGStreamerBase::repaint
+        https://bugs.webkit.org/show_bug.cgi?id=163511
+
+        Reviewed by Carlos Garcia Campos.
+
+        Perform the video repaint in the main thread when accelerated compositing is disabled. Added a new method to
+        MediaPlayerClient to get whether accelerated compositing is enabled from the MediaPlayer. This is needed
+        because mediaPlayerAcceleratedCompositingEnabled() will return false while HTMLMediaElement doesn't have a
+        RenderVideo, even when accelerated compositing is enabled.
+
+        Covered by existent tests.
+
+        * html/HTMLMediaElement.cpp:
+        (WebCore::HTMLMediaElement::mediaPlayerAcceleratedCompositingEnabled):
+        * html/HTMLMediaElement.h:
+        * platform/graphics/MediaPlayer.h:
+        (WebCore::MediaPlayerClient::mediaPlayerAcceleratedCompositingEnabled):
+        * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
+        (WebCore::MediaPlayerPrivateGStreamerBase::MediaPlayerPrivateGStreamerBase):
+        (WebCore::MediaPlayerPrivateGStreamerBase::repaint):
+        (WebCore::MediaPlayerPrivateGStreamerBase::triggerRepaint):
+        * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h:
+
+2016-10-21  Adam Bergkvist  <adam.bergkvist@ericsson.com>
+
+        WebRTC: [GTK] Add MediaEndpointOwr - an OpenWebRTC WebRTC backend
+        https://bugs.webkit.org/show_bug.cgi?id=163327
+
+        Reviewed by Philippe Normand.
+
+        Add MediaEndpointOwr which is a MediaEndpoint implementation (WebRTC backend) based on
+        OpenWebRTC [1]. The WebRTC backend can be tested with a manual test. Automatic testing
+        is still done with MockMediaEndpoint.
+
+        [1] http://www.openwebrtc.org/
+
+        Testing: Added manual test (webrtc-one-tab-p2p.html)
+
+        * CMakeLists.txt:
+        * platform/GStreamer.cmake:
+        * platform/mediastream/openwebrtc/MediaEndpointOwr.cpp: Added.
+        (WebCore::createMediaEndpointOwr):
+        (WebCore::MediaEndpointOwr::MediaEndpointOwr):
+        (WebCore::MediaEndpointOwr::~MediaEndpointOwr):
+        (WebCore::MediaEndpointOwr::setConfiguration):
+        (WebCore::cryptoDataCallback):
+        (WebCore::MediaEndpointOwr::generateDtlsInfo):
+        (WebCore::MediaEndpointOwr::getDefaultAudioPayloads):
+        (WebCore::MediaEndpointOwr::getDefaultVideoPayloads):
+        (WebCore::payloadsContainType):
+        (WebCore::MediaEndpointOwr::filterPayloads):
+        (WebCore::MediaEndpointOwr::updateReceiveConfiguration):
+        (WebCore::findRtxPayload):
+        (WebCore::MediaEndpointOwr::updateSendConfiguration):
+        (WebCore::MediaEndpointOwr::addRemoteCandidate):
+        (WebCore::MediaEndpointOwr::replaceMutedRemoteSourceMid):
+        (WebCore::MediaEndpointOwr::createMutedRemoteSource):
+        (WebCore::MediaEndpointOwr::replaceSendSource):
+        (WebCore::MediaEndpointOwr::stop):
+        (WebCore::MediaEndpointOwr::transceiverIndexForSession):
+        (WebCore::MediaEndpointOwr::sessionMid):
+        (WebCore::MediaEndpointOwr::matchTransceiverByMid):
+        (WebCore::MediaEndpointOwr::dispatchNewIceCandidate):
+        (WebCore::MediaEndpointOwr::dispatchGatheringDone):
+        (WebCore::MediaEndpointOwr::processIceTransportStateChange):
+        (WebCore::MediaEndpointOwr::dispatchDtlsFingerprint):
+        (WebCore::MediaEndpointOwr::unmuteRemoteSource):
+        (WebCore::MediaEndpointOwr::prepareSession):
+        (WebCore::MediaEndpointOwr::prepareMediaSession):
+        (WebCore::parseHelperServerUrl):
+        (WebCore::MediaEndpointOwr::ensureTransportAgentAndTransceivers):
+        (WebCore::MediaEndpointOwr::internalAddRemoteCandidate):
+        (WebCore::gotCandidate):
+        (WebCore::candidateGatheringDone):
+        (WebCore::iceConnectionStateChange):
+        (WebCore::gotIncomingSource):
+        * platform/mediastream/openwebrtc/MediaEndpointOwr.h: Added.
+        (WebCore::OwrTransceiver::create):
+        (WebCore::OwrTransceiver::~OwrTransceiver):
+        (WebCore::OwrTransceiver::mid):
+        (WebCore::OwrTransceiver::session):
+        (WebCore::OwrTransceiver::owrIceState):
+        (WebCore::OwrTransceiver::setOwrIceState):
+        (WebCore::OwrTransceiver::gotEndOfRemoteCandidates):
+        (WebCore::OwrTransceiver::markGotEndOfRemoteCandidates):
+        (WebCore::OwrTransceiver::OwrTransceiver):
+        * platform/mediastream/openwebrtc/RealtimeMediaSourceOwr.h:
+        (WebCore::RealtimeMediaSourceOwr::RealtimeMediaSourceOwr):
+        (WebCore::RealtimeMediaSourceOwr::swapOutShallowSource):
+        Add support for an initially muted source. This is used for early
+        creation of remote sources.
+
+2016-10-21  Javier Fernandez  <jfernandez@igalia.com>
+
+        [css-grid] Content Alignment broken with indefinite sized grid container
+        https://bugs.webkit.org/show_bug.cgi?id=163724
+
+        Reviewed by Manuel Rego Casasnovas.
+
+        The Grid Tracks sizing algorithm receives as parameter the
+        available space to be used as space for tracks. We hold a variable
+        to store the remaining free space for each dimension.
+
+        When the grid container size is indefinite we can't compute the
+        available free space after computing track sizes until such
+        indefinite size is resolved.
+
+        No new tests, just added some additional test cases.
+
+        * rendering/RenderGrid.cpp:
+        (WebCore::RenderGrid::layoutBlock): Compute freeSpace for Rows
+        after doing layout and resolving the indefinite height.
+
+2016-10-21  Jer Noble  <jer.noble@apple.com>
+
+        CRASH in SourceBuffer::sourceBufferPrivateDidReceiveSample + 2169
+        https://bugs.webkit.org/show_bug.cgi?id=163735
+
+        Reviewed by Eric Carlson.
+
+        Test: media/media-source/media-source-sample-wrong-track-id.html
+
+        When SourceBuffer receives a sample in sourceBufferPrivateDidReceiveSample() containing
+        a trackID not previously seen in an initialization segment, it creates a default TrackBuffer
+        object to contain that track's samples. One of the fields in TrackBuffer, description, is
+        normally filled out when an initialization segment is received, but with this default
+        TrackBuffer, it's still null when it's checked later in sourceBufferPrivateDidReceiveSample().
+
+        Rather than adding a null-check on trackBuffer.description, drop any sample that has a 
+        trackID which was not present during a previous initialization segment.
+
+        * Modules/mediasource/SourceBuffer.cpp:
+        (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveSample):
+
+2016-10-20  Carlos Garcia Campos  <cgarcia@igalia.com>
+
+        [GTK] Configures but fails to link with ENABLE_OPENGL=OFF
+        https://bugs.webkit.org/show_bug.cgi?id=163449
+
+        Reviewed by Michael Catanzaro.
+
+        Only define sharingGLContext in PlatformDisplay if EGL or GLX are enabled.
+
+        * platform/graphics/PlatformDisplay.cpp:
+        * platform/graphics/PlatformDisplay.h:
+        * platform/graphics/wayland/PlatformDisplayWayland.cpp:
+        (WebCore::PlatformDisplayWayland::initialize):
+        * platform/graphics/x11/PlatformDisplayX11.cpp:
+        (WebCore::PlatformDisplayX11::~PlatformDisplayX11):
+
+2016-10-20  Filip Pizlo  <fpizlo@apple.com>
+
+        The tracking of the coarse-grain Heap state (allocating or not, collector or not, eden vs full) should respect the orthogonality between allocating and collecting
+        https://bugs.webkit.org/show_bug.cgi?id=163738
+
+        Reviewed by Geoffrey Garen.
+
+        No new tests because no change in behavior.
+
+        * bindings/js/GCController.cpp:
+        (WebCore::GCController::garbageCollectNow):
+
+2016-10-20  Chris Dumez  <cdumez@apple.com>
+
+        [Bindings] Start using signature->idlType instead of signature->type in the overload resolution code
+        https://bugs.webkit.org/show_bug.cgi?id=163767
+
+        Reviewed by Darin Adler.
+
+        Start using signature->idlType instead of signature->type in the overload resolution code
+        to prepare for union type support.
+
+        * bindings/scripts/CodeGeneratorJS.pm:
+        (ComputeEffectiveOverloadSet):
+        (AreTypesDistinguishableForOverloadResolution):
+        (GetDistinguishingArgumentIndex):
+        (GetOverloadThatMatches):
+        (GenerateOverloadedFunctionOrConstructor):
+
+2016-10-20  Myles C. Maxfield  <mmaxfield@apple.com>
+
+        Implement WebGL2 bufferData() and bufferSubData() methods
+        https://bugs.webkit.org/show_bug.cgi?id=163759
+
+        Reviewed by Dean Jackson.
+
+        These new overloads simply clip the input array buffer.
+
+        Test: fast/canvas/webgl/bufferData-offset-length.html
+
+        * html/canvas/WebGL2RenderingContext.cpp:
+        (WebCore::WebGL2RenderingContext::bufferData):
+        (WebCore::WebGL2RenderingContext::bufferSubData):
+        * html/canvas/WebGL2RenderingContext.h:
+        * html/canvas/WebGL2RenderingContext.idl:
+
+2016-10-20  Chris Dumez  <cdumez@apple.com>
+
+        "Download Linked File" context menu action should use 'download' attribute as suggested filename
+        https://bugs.webkit.org/show_bug.cgi?id=163742
+        <rdar://problem/28840734>
+
+        Reviewed by Darin Adler.
+
+        Add convenience method to HitTestResult to return the URL element's
+        download attribute.
+
+        * rendering/HitTestResult.cpp:
+        (WebCore::HitTestResult::URLElementDownloadAttribute):
+        * rendering/HitTestResult.h:
+
+2016-10-20  Nan Wang  <n_wang@apple.com>
+
+        AX: VoiceOver is not detecting ARIA treeview if it contains role="presentation"
+        https://bugs.webkit.org/show_bug.cgi?id=163763
+
+        Reviewed by Chris Fleizach.
+
+        Test: accessibility/mac/aria-tree-with-presentation-role.html
+
+        Web authors sometimes use presentation role in the aria tree to hide elements. We should
+        consider this a valid case if they specify tree items and groups correctly.
+
+        * accessibility/AccessibilityNodeObject.cpp:
+        (WebCore::AccessibilityNodeObject::hierarchicalLevel):
+        * accessibility/AccessibilityTree.cpp:
+        (WebCore::AccessibilityTree::nodeHasTreeItemChild):
+        (WebCore::AccessibilityTree::isTreeValid):
+        * accessibility/AccessibilityTree.h:
+
+2016-10-20  Myles C. Maxfield  <mmaxfield@apple.com>
+
+        Many WebGL functions which don't throw are marked as possibly throwing
+        https://bugs.webkit.org/show_bug.cgi?id=163747
+
+        Reviewed by Dean Jackson.
+
+        Mechanically remove the exception code.
+
+        No new tests because there is no behavior change.
+
+        * bindings/js/JSWebGLRenderingContextBaseCustom.cpp:
+        (WebCore::getObjectParameter):
+        (WebCore::JSWebGLRenderingContextBase::getAttachedShaders):
+        (WebCore::JSWebGLRenderingContextBase::getProgramParameter):
+        (WebCore::JSWebGLRenderingContextBase::getShaderParameter):
+        (WebCore::JSWebGLRenderingContextBase::getUniform):
+        (WebCore::dataFunctionf):
+        (WebCore::dataFunctioni):
+        (WebCore::dataFunctionMatrix):
+        * html/canvas/WebGL2RenderingContext.cpp:
+        (WebCore::WebGL2RenderingContext::texSubImage2D):
+        * html/canvas/WebGLRenderingContext.cpp:
+        (WebCore::WebGLRenderingContext::texSubImage2D):
+        * html/canvas/WebGLRenderingContextBase.cpp:
+        (WebCore::WebGLRenderingContextBase::activeTexture):
+        (WebCore::WebGLRenderingContextBase::attachShader):
+        (WebCore::WebGLRenderingContextBase::bindAttribLocation):
+        (WebCore::WebGLRenderingContextBase::bindBuffer):
+        (WebCore::WebGLRenderingContextBase::bindFramebuffer):
+        (WebCore::WebGLRenderingContextBase::bindRenderbuffer):
+        (WebCore::WebGLRenderingContextBase::bindTexture):
+        (WebCore::WebGLRenderingContextBase::bufferData):
+        (WebCore::WebGLRenderingContextBase::bufferSubData):
+        (WebCore::WebGLRenderingContextBase::compileShader):
+        (WebCore::WebGLRenderingContextBase::createShader):
+        (WebCore::WebGLRenderingContextBase::detachShader):
+        (WebCore::WebGLRenderingContextBase::disableVertexAttribArray):
+        (WebCore::WebGLRenderingContextBase::drawArrays):
+        (WebCore::WebGLRenderingContextBase::drawElements):
+        (WebCore::WebGLRenderingContextBase::enableVertexAttribArray):
+        (WebCore::WebGLRenderingContextBase::framebufferRenderbuffer):
+        (WebCore::WebGLRenderingContextBase::framebufferTexture2D):
+        (WebCore::WebGLRenderingContextBase::getActiveAttrib):
+        (WebCore::WebGLRenderingContextBase::getActiveUniform):
+        (WebCore::WebGLRenderingContextBase::getAttachedShaders):
+        (WebCore::WebGLRenderingContextBase::getBufferParameter):
+        (WebCore::WebGLRenderingContextBase::getProgramParameter):
+        (WebCore::WebGLRenderingContextBase::getProgramInfoLog):
+        (WebCore::WebGLRenderingContextBase::getRenderbufferParameter):
+        (WebCore::WebGLRenderingContextBase::getShaderParameter):
+        (WebCore::WebGLRenderingContextBase::getShaderInfoLog):
+        (WebCore::WebGLRenderingContextBase::getShaderPrecisionFormat):
+        (WebCore::WebGLRenderingContextBase::getShaderSource):
+        (WebCore::WebGLRenderingContextBase::getTexParameter):
+        (WebCore::WebGLRenderingContextBase::getUniform):
+        (WebCore::WebGLRenderingContextBase::getUniformLocation):
+        (WebCore::WebGLRenderingContextBase::getVertexAttrib):
+        (WebCore::WebGLRenderingContextBase::linkProgram):
+        (WebCore::WebGLRenderingContextBase::readPixels):
+        (WebCore::WebGLRenderingContextBase::shaderSource):
+        (WebCore::WebGLRenderingContextBase::videoFrameToImage):
+        (WebCore::WebGLRenderingContextBase::texImage2D):
+        (WebCore::WebGLRenderingContextBase::uniform1f):
+        (WebCore::WebGLRenderingContextBase::uniform1fv):
+        (WebCore::WebGLRenderingContextBase::uniform1i):
+        (WebCore::WebGLRenderingContextBase::uniform1iv):
+        (WebCore::WebGLRenderingContextBase::uniform2f):
+        (WebCore::WebGLRenderingContextBase::uniform2fv):
+        (WebCore::WebGLRenderingContextBase::uniform2i):
+        (WebCore::WebGLRenderingContextBase::uniform2iv):
+        (WebCore::WebGLRenderingContextBase::uniform3f):
+        (WebCore::WebGLRenderingContextBase::uniform3fv):
+        (WebCore::WebGLRenderingContextBase::uniform3i):
+        (WebCore::WebGLRenderingContextBase::uniform3iv):
+        (WebCore::WebGLRenderingContextBase::uniform4f):
+        (WebCore::WebGLRenderingContextBase::uniform4fv):
+        (WebCore::WebGLRenderingContextBase::uniform4i):
+        (WebCore::WebGLRenderingContextBase::uniform4iv):
+        (WebCore::WebGLRenderingContextBase::uniformMatrix2fv):
+        (WebCore::WebGLRenderingContextBase::uniformMatrix3fv):
+        (WebCore::WebGLRenderingContextBase::uniformMatrix4fv):
+        (WebCore::WebGLRenderingContextBase::useProgram):
+        (WebCore::WebGLRenderingContextBase::validateProgram):
+        (WebCore::WebGLRenderingContextBase::vertexAttribPointer):
+        (WebCore::WebGLRenderingContextBase::restoreCurrentFramebuffer):
+        (WebCore::WebGLRenderingContextBase::restoreCurrentTexture2D):
+        * html/canvas/WebGLRenderingContextBase.h:
+        * html/canvas/WebGLRenderingContextBase.idl:
+
+2016-10-19  Myles C. Maxfield  <mmaxfield@apple.com>
+
+        [macOS] [iOS] Disable variation fonts on macOS El Capitan and iOS 9
+        https://bugs.webkit.org/show_bug.cgi?id=163374
+
+        Reviewed by Darin Adler.
+
+        Because of platform lack of support for variations in in-memory fonts,
+        this feature should be disabled on the affected OSes.
+
+        No tests because there is no behavior change (on the relevant platforms).
+
+        * Configurations/FeatureDefines.xcconfig:
+
+2016-10-20  Brady Eidson  <beidson@apple.com>
+
+        IndexedDB 2.0: Support IDBObjectStore name assignment.
+        <rdar://problem/28806931> and https://bugs.webkit.org/show_bug.cgi?id=163749
+
+        Reviewed by Alex Christensen.
+
+        Tests: storage/indexeddb/modern/objectstore-rename-1-private.html
+               storage/indexeddb/modern/objectstore-rename-1.html
+
+        Touches a *lot* of code sites, but none of them are particularly interesting.
+        They are all just getting the new name spread out to all of the various objects that need it.
+
+        * Modules/indexeddb/IDBDatabase.cpp:
+        (WebCore::IDBDatabase::renameObjectStore):
+        * Modules/indexeddb/IDBDatabase.h:
+
+        * Modules/indexeddb/IDBObjectStore.cpp:
+        (WebCore::IDBObjectStore::setName):
+        * Modules/indexeddb/IDBObjectStore.h:
+        * Modules/indexeddb/IDBObjectStore.idl:
+
+        * Modules/indexeddb/IDBTransaction.cpp:
+        (WebCore::IDBTransaction::renameObjectStore):
+        (WebCore::IDBTransaction::renameObjectStoreOnServer):
+        (WebCore::IDBTransaction::didRenameObjectStoreOnServer):
+        * Modules/indexeddb/IDBTransaction.h:
+
+        * Modules/indexeddb/client/IDBConnectionProxy.cpp:
+        (WebCore::IDBClient::IDBConnectionProxy::renameObjectStore):
+        * Modules/indexeddb/client/IDBConnectionProxy.h:
+
+        * Modules/indexeddb/client/IDBConnectionToServer.cpp:
+        (WebCore::IDBClient::IDBConnectionToServer::renameObjectStore):
+        (WebCore::IDBClient::IDBConnectionToServer::didRenameObjectStore):
+        * Modules/indexeddb/client/IDBConnectionToServer.h:
+        * Modules/indexeddb/client/IDBConnectionToServerDelegate.h:
+
+        * Modules/indexeddb/server/IDBBackingStore.h:
+
+        * Modules/indexeddb/server/IDBConnectionToClient.cpp:
+        (WebCore::IDBServer::IDBConnectionToClient::didDeleteObjectStore):
+        (WebCore::IDBServer::IDBConnectionToClient::didRenameObjectStore):
+        * Modules/indexeddb/server/IDBConnectionToClient.h:
+        * Modules/indexeddb/server/IDBConnectionToClientDelegate.h:
+
+        * Modules/indexeddb/server/IDBServer.cpp:
+        (WebCore::IDBServer::IDBServer::renameObjectStore):
+        * Modules/indexeddb/server/IDBServer.h:
+
+        * Modules/indexeddb/server/MemoryBackingStoreTransaction.cpp:
+        (WebCore::IDBServer::MemoryBackingStoreTransaction::objectStoreRenamed):
+        (WebCore::IDBServer::MemoryBackingStoreTransaction::abort):
+        * Modules/indexeddb/server/MemoryBackingStoreTransaction.h:
+
+        * Modules/indexeddb/server/MemoryIDBBackingStore.cpp:
+        (WebCore::IDBServer::MemoryIDBBackingStore::renameObjectStore):
+        * Modules/indexeddb/server/MemoryIDBBackingStore.h:
+
+        * Modules/indexeddb/server/MemoryObjectStore.h:
+        (WebCore::IDBServer::MemoryObjectStore::rename):
+
+        * Modules/indexeddb/server/SQLiteIDBBackingStore.cpp:
+        (WebCore::IDBServer::SQLiteIDBBackingStore::renameObjectStore):
+        * Modules/indexeddb/server/SQLiteIDBBackingStore.h:
+
+        * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
+        (WebCore::IDBServer::UniqueIDBDatabase::renameObjectStore):
+        (WebCore::IDBServer::UniqueIDBDatabase::performRenameObjectStore):
+        (WebCore::IDBServer::UniqueIDBDatabase::didPerformRenameObjectStore):
+        * Modules/indexeddb/server/UniqueIDBDatabase.h:
+
+        * Modules/indexeddb/server/UniqueIDBDatabaseConnection.cpp:
+        (WebCore::IDBServer::UniqueIDBDatabaseConnection::didRenameObjectStore):
+        * Modules/indexeddb/server/UniqueIDBDatabaseConnection.h:
+
+        * Modules/indexeddb/server/UniqueIDBDatabaseTransaction.cpp:
+        (WebCore::IDBServer::UniqueIDBDatabaseTransaction::renameObjectStore):
+        * Modules/indexeddb/server/UniqueIDBDatabaseTransaction.h:
+
+        * Modules/indexeddb/shared/IDBDatabaseInfo.cpp:
+        (WebCore::IDBDatabaseInfo::renameObjectStore):
+        * Modules/indexeddb/shared/IDBDatabaseInfo.h:
+
+        * Modules/indexeddb/shared/IDBObjectStoreInfo.h:
+        (WebCore::IDBObjectStoreInfo::rename):
+
+        * Modules/indexeddb/shared/IDBResultData.cpp:
+        (WebCore::IDBResultData::renameObjectStoreSuccess):
+        * Modules/indexeddb/shared/IDBResultData.h:
+
+        * Modules/indexeddb/shared/InProcessIDBServer.cpp:
+        (WebCore::InProcessIDBServer::didRenameObjectStore):
+        (WebCore::InProcessIDBServer::renameObjectStore):
+        * Modules/indexeddb/shared/InProcessIDBServer.h:
+
+2016-10-20  Chris Dumez  <cdumez@apple.com>
+
+        Make table.deleteRow(-1) a no-op when there are no rows
+        https://bugs.webkit.org/show_bug.cgi?id=163746
+
+        Reviewed by Alex Christensen.
+
+        Make table.deleteRow(-1) a no-op when there are no rows, instead of throwing:
+        - https://github.com/whatwg/html/pull/1924
+
+        This is more consistent with the behavior of tbody.deleteRow(-1) and
+        tr.deleteCell(-1). This is also consistent with Gecko. Blink is doing the
+        same change via:
+        - https://codereview.chromium.org/2427963004/
+
+        No new tests, updated existing tests.
+
+        * html/HTMLTableElement.cpp:
+        (WebCore::HTMLTableElement::deleteRow):
+
+2016-10-20  Dave Hyatt  <hyatt@apple.com>
+
+        [CSS Parser] Make sure to handle prefixed transform-style
+        https://bugs.webkit.org/show_bug.cgi?id=163756
+
+        Reviewed by Dean Jackson.
+
+        * css/parser/CSSParserFastPaths.cpp:
+        (WebCore::CSSParserFastPaths::isValidKeywordPropertyAndValue):
+
+2016-10-20  Dave Hyatt  <hyatt@apple.com>
+
+        [CSS Parser] Fix crash when parsing -webkit-margin-collapse
+        https://bugs.webkit.org/show_bug.cgi?id=163753
+
+        Reviewed by Dean Jackson.
+
+        * css/parser/CSSPropertyParser.cpp:
+        (WebCore::CSSPropertyParser::parseShorthand):
+
+2016-10-20  Chris Dumez  <cdumez@apple.com>
+
+        Passing a number as the pixel parameter to texImage2D() doesn't thrown an exception
+        https://bugs.webkit.org/show_bug.cgi?id=163715
+
+        Reviewed by Darin Adler.
+
+        Enable strict type checking for typed arrays in the bindings, similarly
+        do what we do for other wrapper types, as per Web IDL.
+
+        No new tests, updated existing tests.
+
+        * bindings/scripts/CodeGeneratorJS.pm:
+        (GenerateImplementation):
+        (GenerateParametersCheck):
+
+2016-10-20  Myles C. Maxfield  <mmaxfield@apple.com>
+
+        Improve error message when passing a null ArrayBuffer to bufferData()
+        https://bugs.webkit.org/show_bug.cgi?id=163745
+
+        Reviewed by Dean Jackson.
+
+        Test: fast/canvas/webgl/bufferData-nullable-array-buffer-view.html
+
+        Update the idl file to accept a nullable ArrayBuffer, and throw
+        the relevant error with a more helpful error string.
+
+        * html/canvas/WebGLRenderingContextBase.cpp:
+        (WebCore::WebGLRenderingContextBase::bufferData):
+        * html/canvas/WebGLRenderingContextBase.h:
+        * html/canvas/WebGLRenderingContextBase.idl:
+
+2016-10-20  Zalan Bujtas  <zalan@apple.com>
+
+        Stop searching for first-letter containers at multi-column boundary.
+        https://bugs.webkit.org/show_bug.cgi?id=163739
+        <rdar://problem/28810750>
+
+        We should not cross the multi-column boundary while searching for the first-letter container.
+        While moving first-letter renderers to a multi-column parent, it could result in finding the wrong
+        container and end up adding a new wrapper under the original container (from where we are moving the renderers).    
+
+        Reviewed by David Hyatt.
+
+        Test: fast/css-generated-content/first-letter-move-to-multicolumn-crash.html
+
+        * rendering/RenderBoxModelObject.cpp:
+        (WebCore::RenderBoxModelObject::moveChildrenTo):
+        * rendering/RenderTextFragment.cpp:
+        (WebCore::RenderTextFragment::blockForAccompanyingFirstLetter):
+
+2016-10-19  Dean Jackson  <dino@apple.com>
+
+        Support CSS Shapes Level 1 without a prefix
+        https://bugs.webkit.org/show_bug.cgi?id=163709
+        <rdar://problem/28859369>
+
+        Reviewed by Myles Maxfield.
+
+        Support the unprefixed form of CSS Shapes, now that
+        it is in CR.
+
+        We have a few failing tests:
+
+        - Some image-based shaping failures, now skipped.
+          https://bugs.webkit.org/show_bug.cgi?id=163706
+
+        - Some false negatives, where my understanding
+          of the CSS OM seems to suggest that the W3C tests
+          are incorrect.
+          https://bugs.webkit.org/show_bug.cgi?id=163708
+
+        Tests: imported/w3c/csswg-test/css-shapes-1
+
+        * css/CSSComputedStyleDeclaration.cpp:
+        (WebCore::ComputedStyleExtractor::propertyValue):
+        * css/CSSPropertyNames.in:
+        * css/CSSValueKeywords.in:
+        * css/parser/CSSParser.cpp:
+        (WebCore::isSimpleLengthPropertyID):
+        (WebCore::CSSParser::parseValue):
+        * css/parser/CSSPropertyParser.cpp:
+        (WebCore::CSSPropertyParser::parseSingleValue):
+        * page/animation/CSSPropertyAnimation.cpp:
+        (WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap):
+
+2016-10-20  Dave Hyatt  <hyatt@apple.com>
+
+        [CSS Parser] Fix region, column and page break parsing
+        https://bugs.webkit.org/show_bug.cgi?id=163743
+
+        Reviewed by Simon Fraser.
+
+        * css/parser/CSSParserFastPaths.cpp:
+        (WebCore::CSSParserFastPaths::isValidKeywordPropertyAndValue):
+        Add the missing values for break support.
+
+        * css/parser/CSSPropertyParser.cpp:
+        (WebCore::isLegacyBreakProperty):
+        (WebCore::CSSPropertyParser::parseValueStart):
+        Add a special case for handling legacy break properties. Blink treats them like
+        shorthands, but we can't do that without breaking the old parser, so for now
+        we add a special case.
+
+        (WebCore::mapFromPageBreakBetween):
+        (WebCore::mapFromColumnBreakBetween):
+        (WebCore::mapFromRegionBreakBetween):
+        Updated to have the AvoidXXX values (where XXX is Column/Page/Region).
+
+        (WebCore::CSSPropertyParser::parseShorthand):
+        Remove the consumeLegacyBreak from the shorthand function, since we can't treat
+        the legacy break properties as shorthands yet.
+
+2016-10-20  Sam Weinig  <sam@webkit.org>
+
+        Add convenience function that combines WTF::visit(...) with WTF::makeVisitor(...)
+        https://bugs.webkit.org/show_bug.cgi?id=163713
+
+        Reviewed by Dan Bernstein.
+
+        Switch uses of WTF::visit to use WTF::switchOn.
+
+        * dom/MessageEvent.cpp:
+        (WebCore::MessageEvent::source):
+        * dom/Node.cpp:
+        (WebCore::nodeSetPreTransformedFromNodeOrStringVector):
+        (WebCore::Node::convertNodesOrStringsIntoNode):
+        * html/HTMLSelectElement.cpp:
+        (WebCore::HTMLSelectElement::add):
+        * html/track/TrackEvent.cpp:
+        (WebCore::TrackEvent::TrackEvent):
+        * testing/TypeConversions.h:
+        (WebCore::TypeConversions::typeConversionsDictionaryUnionType):
+
+2016-10-20  Dave Hyatt  <hyatt@apple.com>
+
+        [CSS Parser] Fix font family parsing and add CSS region property parsing
+        https://bugs.webkit.org/show_bug.cgi?id=163741
+
+        Reviewed by Zalan Bujtas.
+
+        * css/parser/CSSParser.cpp:
+        (WebCore::isKeywordPropertyID):
+        (WebCore::parseKeywordValue):
+        (WebCore::CSSParser::parseValue):
+        Modify the old CSSParser to have its own keyword check, since keywords were
+        incorrectly added to the new parser when this check was consolidated. Column
+        and region breaks are considered keyword properties by the old parser, but
+        not by the new parser, since the new parser special cases them and maps them
+        into the generic break property.
+
+        * css/parser/CSSParserFastPaths.cpp:
+        (WebCore::CSSParserFastPaths::isValidKeywordPropertyAndValue):
+        (WebCore::CSSParserFastPaths::isKeywordPropertyID):
+        Update for regions to make sure all the region properties are there. Remove the
+        column and region break properties, since they're not supposed to be here in the
+        new parser.
+
+        * css/parser/CSSPropertyParser.cpp:
+        (WebCore::consumeFamilyName):
+        Fix font parsing to make font family values so that fonts work.
+
+        (WebCore::consumeFlowProperty):
+        Add a function for handling -webkit-flow-from and -webkit-flow-into.
+
+        (WebCore::CSSPropertyParser::parseSingleValue):
+        Add support for the region properties.
+
+        (WebCore::mapFromRegionBreakBetween):
+        (WebCore::mapFromColumnRegionOrPageBreakInside):
+        (WebCore::mapFromLegacyBreakProperty):
+        (WebCore::CSSPropertyParser::consumeLegacyBreakProperty):
+        (WebCore::mapFromColumnOrPageBreakInside): Deleted.
+        Update to handle the region break properties in the same way that column break
+        properties are handled.
+
+2016-10-20  Jer Noble  <jer.noble@apple.com>
+
+        CRASH in WebCore::MediaSource::seekToTime + 185
+        https://bugs.webkit.org/show_bug.cgi?id=163652
+
+        Reviewed by Eric Carlson.
+
+        Test: media/media-source/media-source-seek-detach-crash.html
+
+        Add isClosed() checks (which are effectively m_private null-checks) everywhere m_private is
+        dereferenced. The one place where m_private is cleared without setting the state to closed
+        is stop(), so make stop() set the state to closed as well (without firing any events).
+
+        * Modules/mediasource/MediaSource.cpp:
+        (WebCore::MediaSource::seekToTime):
+        (WebCore::MediaSource::completeSeek):
+        (WebCore::MediaSource::monitorSourceBuffers):
+        (WebCore::MediaSource::streamEndedWithError):
+        (WebCore::MediaSource::stop):
+
+2016-10-20  Andreas Kling  <akling@apple.com>
+
+        Drop StyleResolver and SelectorQueryCache when entering PageCache.
+        <https://webkit.org/b/154238>
+
+        Reviewed by Antti Koivisto.
+
+        Stop keeping these around for cached pages to save lots of memory.
+        We can easily rebuild them if a cached navigation occurs, and this
+        way we also don't need to worry about invalidating style for cached
+        pages in all the right places.
+
+        Restoring a cached page will now lead to a forced style recalc.
+        We don't try to defer this (beyond a zero-timer) since it's going
+        to happen anyway, and it's nicer to front-load the cost rather than
+        stuttering on the first user content interaction.
+
+        * dom/Document.cpp:
+        (WebCore::Document::setPageCacheState):
+        * history/CachedPage.cpp:
+        (WebCore::CachedPage::restore):
+        (WebCore::CachedPage::clear):
+        * history/CachedPage.h:
+        (WebCore::CachedPage::markForVisitedLinkStyleRecalc): Deleted.
+        (WebCore::CachedPage::markForFullStyleRecalc): Deleted.
+        * history/PageCache.cpp:
+        (WebCore::PageCache::markPagesForVisitedLinkStyleRecalc): Deleted.
+        (WebCore::PageCache::markPagesForFullStyleRecalc): Deleted.
+        * history/PageCache.h:
+        * page/Frame.cpp:
+        (WebCore::Frame::setPageAndTextZoomFactors):
+        * page/Page.cpp:
+        (WebCore::Page::setViewScaleFactor):
+        (WebCore::Page::setDeviceScaleFactor):
+        (WebCore::Page::setPagination):
+        (WebCore::Page::setPaginationLineGridEnabled):
+        (WebCore::Page::setVisitedLinkStore):
+
+2016-10-20  Carlos Alberto Lopez Perez  <clopez@igalia.com>
+
+        [GTK] Build fix after r207616
+        https://bugs.webkit.org/show_bug.cgi?id=163333
+
+        Reviewed by Carlos Garcia Campos.
+
+        EGL_PLATFORM_X11_KHR and EGL_PLATFORM_WAYLAND_KHR are not defined
+        on the EGL headers shipped by Mesa 10.3 (shipped by Debian 8)
+
+        * platform/graphics/wayland/PlatformDisplayWayland.cpp:
+        (WebCore::PlatformDisplayWayland::initialize):
+        * platform/graphics/x11/PlatformDisplayX11.cpp:
+        (WebCore::PlatformDisplayX11::initializeEGLDisplay):
+
+2016-10-20  Fujii Hironori  <Hironori.Fujii@sony.com>
+
+        [CMake] CMake does not support the dep files for implicit dependency
+        https://bugs.webkit.org/show_bug.cgi?id=161433
+
+        Reviewed by Brent Fulgham.
+
+        Created a Perl script to generate all IDL bindings for CMake.
+        This script can regenerate outdated bindings by based on the
+        supplemental dependency and dep files created by
+        '--write-dependencies' switch of generate-bindings.pl.
+
+        add_custom_target is used to invoke the script instead of
+        add_custom_command because Ninja deletes all output files before
+        executing the command in case of add_custom_command.
+
+        USES_TERMINAL option of add_custom_target has two effects:
+        1) Not buffering output of the command
+        2) Invoking the command in the special Ninja pool which inhibits parallel build
+        One needs to use CMake 3.2 or later to enable this feature.
+
+        * CMakeLists.txt: Specified target names for
+        GENERATE_BINDINGS. Added dependency for the targets.
+        * bindings/scripts/generate-bindings-all.pl: Added.
+
+2016-10-20  Adam Jackson  <ajax@redhat.com>
+
+        Prefer eglGetPlatformDisplay to eglGetDisplay
+        https://bugs.webkit.org/show_bug.cgi?id=163333
+
+        Reviewed by Carlos Garcia Campos.
+
+        eglGetDisplay forces the implementation to guess what kind of void* it's been handed. Different implementations
+        do different things, in particular glvnd and Mesa behave differently. Fortunately there exists API to tell EGL
+        what kind of display it is, so let's use it.
+
+        * platform/graphics/wayland/PlatformDisplayWayland.cpp:
+        (WebCore::PlatformDisplayWayland::initialize):
+        * platform/graphics/x11/PlatformDisplayX11.cpp:
+        (WebCore::PlatformDisplayX11::initializeEGLDisplay):
+
+2016-10-20  Carlos Garcia Campos  <cgarcia@igalia.com>
+
+        [GTK] Avoid including egl.h headers in internal headers
+        https://bugs.webkit.org/show_bug.cgi?id=163722
+
+        Reviewed by Žan Doberšek.
+
+        egl.h includes eglplatform.h that decides the native types for the platform at compile time. However, we support
+        to build with X11 and Wayland at the same time and decide what to use at runtime. Currently GLContext.h includes
+        eglplatform.h after wayland-egl.h if Wayland is enabled. That means that the wayland native types are used by
+        default from all cpp files including GLContext.h. It currently works in X11 because we cast the value anyway and
+        for example EGLNativeWindowType is a pointer in Wayland that can be casted to unsigned long in X11 to represent
+        the X Window. This is very fragile in any case, we should avoid adding egl headers in our headers and only
+        include it in cpp files. But we also need to ensure we don't use X11 and Wayland in the same cpp file.
+
+        * PlatformGTK.cmake:
+        * platform/graphics/GLContext.cpp:
+        (WebCore::GLContext::createContextForWindow):
+        * platform/graphics/GLContext.h:
+        * platform/graphics/egl/GLContextEGL.cpp:
+        (WebCore::GLContextEGL::createWindowContext):
+        (WebCore::GLContextEGL::createContext):
+        (WebCore::GLContextEGL::~GLContextEGL):
+        * platform/graphics/egl/GLContextEGL.h:
+        * platform/graphics/egl/GLContextEGLWayland.cpp: Added.
+        (WebCore::GLContextEGL::GLContextEGL):
+        (WebCore::GLContextEGL::createWindowSurfaceWayland):
+        (WebCore::GLContextEGL::createWaylandContext):
+        (WebCore::GLContextEGL::destroyWaylandWindow):
+        * platform/graphics/egl/GLContextEGLX11.cpp: Added.
+        (WebCore::GLContextEGL::GLContextEGL):
+        (WebCore::GLContextEGL::createWindowSurfaceX11):
+        (WebCore::GLContextEGL::createPixmapContext):
+        * platform/graphics/glx/GLContextGLX.cpp:
+        (WebCore::GLContextGLX::createWindowContext):
+        (WebCore::GLContextGLX::createContext):
+        (WebCore::GLContextGLX::GLContextGLX):
+        * platform/graphics/glx/GLContextGLX.h:
+        * platform/graphics/wayland/PlatformDisplayWayland.cpp:
+        * platform/graphics/x11/PlatformDisplayX11.cpp:
+
+2016-10-20  Carlos Garcia Campos  <cgarcia@igalia.com>
+
+        [GTK] Avoid strstr() when checking (E)GL extensions
+        https://bugs.webkit.org/show_bug.cgi?id=161958
+
+        Reviewed by Žan Doberšek.
+
+        Add static method GLContext::isExtensionSupported() to properly search extenstions in the given extension
+        list, and use it instead of strstr().
+
+        * platform/graphics/GLContext.cpp:
+        (WebCore::GLContext::isExtensionSupported):
+        * platform/graphics/GLContext.h:
+        * platform/graphics/egl/GLContextEGL.cpp:
+        (WebCore::GLContextEGL::createSurfacelessContext):
+        * platform/graphics/glx/GLContextGLX.cpp:
+        (WebCore::hasSGISwapControlExtension):
+
+2016-10-20  Per Arne Vollan  <pvollan@apple.com>
+
+        [Win][Direct2D] Implement ImageBufferData::getData.
+        https://bugs.webkit.org/show_bug.cgi?id=163668
+
+        Reviewed by Brent Fulgham.
+
+        Render data to a bitmap in system memory, which data can be read from.
+
+        * platform/graphics/win/ImageBufferDataDirect2D.cpp:
+        (WebCore::ImageBufferData::getData):
+        * platform/graphics/win/ImageBufferDirect2D.cpp:
+        (WebCore::ImageBuffer::ImageBuffer):
+
+2016-10-20  Carlos Garcia Campos  <cgarcia@igalia.com>
+
+        Wrong use of EGL_DEPTH_SIZE
+        https://bugs.webkit.org/show_bug.cgi?id=155536
+
+        Reviewed by Michael Catanzaro.
+
+        What happens here is that the driver doesn't implement EGL_DEPTH_SIZE and the default value, which is 0, is
+        returned. Then XCreatePixmap fails because 0 is not a valid depth. The thing is that even if EGL_DEPTH_SIZE or
+        EGL_BUFFER_SIZE returned a valid depth, it still might not be supported by the default screen and XCreatePixmap
+        can fail. What we need to ensure is that the depth we pass is compatible with the X display, not only with the
+        EGL config, to avoid failures when creating the pixmap. So, we can use EGL_NATIVE_VISUAL_ID instead, and
+        then ask X for the visual info for that id. If it isn't found then we just return before creating the pixmap,
+        but if the visual is found then we can be sure that the depth of the visual will not make the pixmap creation
+        fail. However, with the driver I'm using it doesn't matter how we create the pixmap that eglCreatePixmapSurface
+        always fails, again with X errors that are fatal by default. Since the driver is not free, I assume it doesn't
+        support eglCreatePixmapSurface or it's just buggy, so the only option we have here is trap the x errors and
+        ignore them. It turns out that the X errors are not fatal in this case, because eglCreatePixmapSurface ends up
+        returning a surface, and since these are offscreen contexts, it doesn't really matter if they contain an
+        invalid pixmap, because we never do swap buffer on them, so just ignoring the X errors fixes the crashes and
+        makes everythig work. This patch adds a helper class XErrorTrapper that allows to trap XErrors and decide what
+        to do with them (ignore, warn or crash) or even not consider a particular set of errors as errors.
+
+        * PlatformEfl.cmake: Add new file to compilation.
+        * PlatformGTK.cmake: Ditto.
+        * platform/graphics/egl/GLContextEGL.cpp:
+        (WebCore::GLContextEGL::createPixmapContext): Use EGL_NATIVE_VISUAL_ID instead of EGL_DEPTH_SIZE to figure out
+        the depth to be passed to XCreatePixmap. Also use the XErrorTrapper class to ignore all BadDrawable errors
+        produced by eglCreatePixmapSurface() and only show a warning about all other X errors.
+        * platform/graphics/x11/XErrorTrapper.cpp: Added.
+        (WebCore::xErrorTrappersMap):
+        (WebCore::XErrorTrapper::XErrorTrapper):
+        (WebCore::XErrorTrapper::~XErrorTrapper):
+        (WebCore::XErrorTrapper::errorCode):
+        (WebCore::XErrorTrapper::errorEvent):
+        * platform/graphics/x11/XErrorTrapper.h: Added.
+        (WebCore::XErrorTrapper::XErrorTrapper):
+
+2016-10-20  Nael Ouedraogo  <nael.ouedraogo@crf.canon.fr>
+
+        WebRTC: The MediaStreamTrackEvent init dictionary needs a required track member
+        https://bugs.webkit.org/show_bug.cgi?id=146232
+
+        Update MediaStreamTrackEvent IDL as per specification.
+
+        Reviewed by Darin Adler.
+
+        No additional test required, rebase existings tests.
+
+        * Modules/mediastream/MediaStreamTrackEvent.idl:
+
+2016-10-19  Antoine Quint  <graouts@apple.com>
+
+        [Modern Media Controls] Media Controller: mute support
+        https://bugs.webkit.org/show_bug.cgi?id=163677
+        <rdar://problem/28851582>
+
+        Reviewed by Dean Jackson.
+
+        We introduce the MuteSupport class which brings support for muting the media
+        by clicking on the mute button in the media controls and correctly reflecting
+        the media's muted state should the media be muted via the media API.
+
+        Tests: media/modern-media-controls/mute-support/mute-support-button-click.html
+               media/modern-media-controls/mute-support/mute-support-media-api.html
+               media/modern-media-controls/mute-support/mute-support-muted.html
+
+        * Modules/modern-media-controls/media/media-controller.js:
+        (MediaController):
+        * Modules/modern-media-controls/media/mute-support.js: Copied from Source/WebCore/Modules/modern-media-controls/media/media-controller.js.
+        (MuteSupport.prototype.get control):
+        (MuteSupport.prototype.get mediaEvents):
+        (MuteSupport.prototype.buttonWasClicked):
+        (MuteSupport.prototype.syncControl):
+        (MuteSupport):
+        * WebCore.xcodeproj/project.pbxproj:
+        * rendering/RenderThemeMac.mm:
+        (WebCore::RenderThemeMac::mediaControlsScript):
+
+2016-10-19  Alex Christensen  <achristensen@webkit.org>
+
+        Revert r207151
+        https://bugs.webkit.org/show_bug.cgi?id=163675
+
+        Reviewed by Brent Fulgham.
+
+        This code is still useful for comparison with Windows.  I'll remove it again soon.
+
+        No new tests.  No change in behavior.
+
+        * WebCore.xcodeproj/project.pbxproj:
+        * WebCorePrefix.h:
+        * loader/DocumentLoader.h:
+        * loader/EmptyClients.h:
+        * loader/FrameLoaderClient.h:
+        * loader/ResourceLoader.cpp:
+        (WebCore::ResourceLoader::didReceiveAuthenticationChallenge):
+        * loader/ResourceLoader.h:
+        * loader/SubresourceLoader.h:
+        * loader/cf/ResourceLoaderCFNet.cpp:
+        * loader/cocoa/SubresourceLoaderCocoa.mm:
+        (WebCore::SubresourceLoader::willCacheResponse):
+        * loader/mac/DocumentLoaderMac.cpp:
+        * loader/mac/ResourceLoaderMac.mm:
+        (WebCore::ResourceLoader::willCacheResponse):
+        * page/mac/PageMac.mm:
+        (WebCore::Page::platformInitialize):
+        (WebCore::Page::addSchedulePair):
+        (WebCore::Page::removeSchedulePair):
+        * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
+        (WebCore::WebCoreNSURLAuthenticationChallengeClient::create):
+        (WebCore::WebCoreNSURLAuthenticationChallengeClient::WebCoreNSURLAuthenticationChallengeClient):
+        (WebCore::MediaPlayerPrivateAVFoundationObjC::shouldWaitForResponseToAuthenticationChallenge):
+        * platform/mac/WebCoreSystemInterface.h:
+        * platform/network/NetworkStorageSession.h:
+        * platform/network/ProtectionSpace.h:
+        * platform/network/ProtectionSpaceBase.cpp:
+        * platform/network/ResourceHandle.cpp:
+        * platform/network/ResourceHandle.h:
+        * platform/network/ResourceHandleClient.cpp:
+        * platform/network/ResourceHandleClient.h:
+        * platform/network/ResourceHandleInternal.h:
+        (WebCore::ResourceHandleInternal::ResourceHandleInternal):
+        * platform/network/ResourceRequestBase.cpp:
+        * platform/network/cf/AuthenticationCF.cpp:
+        (WebCore::AuthenticationChallenge::AuthenticationChallenge):
+        (WebCore::AuthenticationChallenge::setAuthenticationClient): Deleted.
+        (WebCore::AuthenticationChallenge::authenticationClient): Deleted.
+        (WebCore::AuthenticationChallenge::platformCompare): Deleted.
+        (WebCore::createCF): Deleted.
+        (WebCore::core): Deleted.
+        * platform/network/cf/AuthenticationCF.h:
+        * platform/network/cf/AuthenticationChallenge.h:
+        * platform/network/cf/CookieJarCFNet.cpp:
+        * platform/network/cf/CredentialStorageCFNet.cpp:
+        (WebCore::CredentialStorage::getFromPersistentStorage):
+        (WebCore::CredentialStorage::saveToPersistentStorage):
+        * platform/network/cf/LoaderRunLoopCF.cpp:
+        * platform/network/cf/LoaderRunLoopCF.h:
+        * platform/network/cf/NetworkStorageSessionCFNet.cpp:
+        (WebCore::NetworkStorageSession::cookieStorage):
+        * platform/network/cf/ProtectionSpaceCFNet.cpp:
+        * platform/network/cf/ProtectionSpaceCFNet.h:
+        * platform/network/cf/ResourceError.h:
+        * platform/network/cf/ResourceErrorCF.cpp:
+        * platform/network/cf/ResourceHandleCFNet.cpp:
+        (WebCore::shouldSniffConnectionProperty):
+        (WebCore::ResourceHandle::createCFURLConnection):
+        (WebCore::ResourceHandle::start):
+        (WebCore::ResourceHandle::didReceiveAuthenticationChallenge):
+        (WebCore::ResourceHandle::tryHandlePasswordBasedAuthentication):
+        (WebCore::ResourceHandle::receivedCredential):
+        (WebCore::ResourceHandle::schedule):
+        (WebCore::ResourceHandle::unschedule):
+        * platform/network/cf/ResourceHandleCFURLConnectionDelegate.cpp:
+        * platform/network/cf/ResourceHandleCFURLConnectionDelegate.h:
+        * platform/network/cf/ResourceHandleCFURLConnectionDelegateWithOperationQueue.cpp:
+        (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::setupRequest):
+        (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::didReceiveResponse):
+        (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::canRespondToProtectionSpace):
+        * platform/network/cf/ResourceHandleCFURLConnectionDelegateWithOperationQueue.h:
+        * platform/network/cf/ResourceRequest.h:
+        (WebCore::ResourceRequest::encodingRequiresPlatformData):
+        * platform/network/cf/ResourceRequestCFNet.cpp:
+        (WebCore::findCFURLRequestSetContentDispositionEncodingFallbackArrayFunction):
+        (WebCore::findCFURLRequestCopyContentDispositionEncodingFallbackArrayFunction):
+        (WebCore::ResourceRequest::doUpdatePlatformRequest):
+        (WebCore::ResourceRequest::doUpdatePlatformHTTPBody):
+        (WebCore::ResourceRequest::doUpdateResourceRequest):
+        (WebCore::ResourceRequest::setStorageSession):
+        * platform/network/cf/ResourceRequestCFNet.h:
+        * platform/network/cf/ResourceResponse.h:
+        * platform/network/cf/ResourceResponseCFNet.cpp:
+        (WebCore::ResourceResponse::cfURLResponse):
+        * platform/network/cf/SynchronousLoaderClientCFNet.cpp:
+        * platform/network/cf/SynchronousResourceHandleCFURLConnectionDelegate.cpp:
+        (WebCore::SynchronousResourceHandleCFURLConnectionDelegate::setupRequest):
+        (WebCore::SynchronousResourceHandleCFURLConnectionDelegate::setupConnectionScheduling):
+        (WebCore::SynchronousResourceHandleCFURLConnectionDelegate::didReceiveResponse):
+        (WebCore::SynchronousResourceHandleCFURLConnectionDelegate::willCacheResponse):
+        (WebCore::SynchronousResourceHandleCFURLConnectionDelegate::canRespondToProtectionSpace):
+        * platform/network/cf/SynchronousResourceHandleCFURLConnectionDelegate.h:
+        * platform/network/cocoa/CredentialCocoa.h:
+        * platform/network/cocoa/CredentialCocoa.mm:
+        (WebCore::Credential::Credential):
+        (WebCore::Credential::cfCredential):
+        * platform/network/cocoa/ProtectionSpaceCocoa.h:
+        * platform/network/cocoa/ProtectionSpaceCocoa.mm:
+        (WebCore::ProtectionSpace::ProtectionSpace):
+        (WebCore::ProtectionSpace::cfSpace):
+        * platform/network/cocoa/ResourceRequestCocoa.mm:
+        (WebCore::ResourceRequest::nsURLRequest):
+        * platform/network/cocoa/ResourceResponseCocoa.mm:
+        (WebCore::ResourceResponse::platformCertificateInfo):
+        (WebCore::ResourceResponse::nsURLResponse):
+        (WebCore::ResourceResponse::ResourceResponse):
+        * platform/network/ios/QuickLook.h:
+        * platform/network/ios/QuickLook.mm:
+        (-[WebQuickLookHandleAsDelegate initWithConnectionDelegate:]):
+        (-[WebQuickLookHandleAsDelegate connection:didReceiveDataArray:]):
+        (-[WebQuickLookHandleAsDelegate connection:didReceiveData:lengthReceived:]):
+        (-[WebQuickLookHandleAsDelegate connectionDidFinishLoading:]):
+        (-[WebQuickLookHandleAsDelegate connection:didFailWithError:]):
+        (-[WebQuickLookHandleAsDelegate detachHandle]):
+        (WebCore::QuickLookHandle::create):
+        (WebCore::QuickLookHandle::cfResponse):
+        * platform/network/mac/AuthenticationMac.mm:
+        (-[WebCoreAuthenticationClientAsChallengeSender setCFChallenge:]):
+        (-[WebCoreAuthenticationClientAsChallengeSender cfChallenge]):
+        (WebCore::core):
+        (WebCore::mac):
+        * platform/network/mac/CookieJarMac.mm:
+        (WebCore::setCookiesFromDOM):
+        (WebCore::addCookie):
+        (WebCore::cookieStorage):
+        * platform/network/mac/CredentialStorageMac.mm:
+        * platform/network/mac/FormDataStreamMac.h:
+        * platform/network/mac/FormDataStreamMac.mm:
+        * platform/network/mac/ResourceErrorMac.mm:
+        (NSErrorFromCFError):
+        (WebCore::ResourceError::ResourceError):
+        (WebCore::ResourceError::nsError):
+        (WebCore::ResourceError::operator NSError *):
+        * platform/network/mac/ResourceHandleMac.mm:
+        (WebCore::ResourceHandle::getConnectionTimingData):
+        * platform/network/mac/ResourceRequestMac.mm: Added.
+        (WebCore::ResourceRequest::ResourceRequest):
+        (WebCore::ResourceRequest::updateNSURLRequest):
+        * platform/network/mac/SynchronousLoaderClient.mm:
+        * platform/network/mac/WebCoreResourceHandleAsDelegate.h:
+        * platform/network/mac/WebCoreResourceHandleAsDelegate.mm:
+        * platform/network/mac/WebCoreResourceHandleAsOperationQueueDelegate.h:
+        * platform/network/mac/WebCoreResourceHandleAsOperationQueueDelegate.mm:
+        * platform/network/mac/WebCoreURLResponse.mm:
+        * platform/win/TemporaryLinkStubs.cpp:
+        * testing/js/WebCoreTestSupportPrefix.h:
+
+2016-10-19  Jer Noble  <jer.noble@apple.com>
+
+        REGRESSION (r206025): All YouTube videos play with black bars on all four sides
+        https://bugs.webkit.org/show_bug.cgi?id=163308
+
+        Reviewed by Darin Adler.
+
+        Test: media/media-source/media-source-resize.html
+
+        After r206025, we do not fire resize events when the size change notification happens equal-
+        to-or-before the current time, which can happen at the very beginning of a stream. Take care
+        of this case by checking that the target time isn't actually in the past inside of
+        sizeWillChangeAtTime(), and also always skip the boundary time observer when there was no
+        previous size (such as after a flush due to a seek).
+
+        * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
+        * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
+        (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::sizeWillChangeAtTime):
+        (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::setNaturalSize):
+        * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
+        (WebCore::SourceBufferPrivateAVFObjC::flushAndEnqueueNonDisplayingSamples):
+        (WebCore::SourceBufferPrivateAVFObjC::enqueueSample):
+
+2016-10-19  Nan Wang  <n_wang@apple.com>
+
+        AX: [Mac] Mark element AXAPI should comform to specs
+        https://bugs.webkit.org/show_bug.cgi?id=163707
+
+        Reviewed by Chris Fleizach.
+
+        Created a new role for mark elements on Mac and exposed the role
+        description.
+
+        Changes are covered in modified test expectaions.
+
+        * English.lproj/Localizable.strings:
+        * accessibility/AccessibilityObject.h:
+        * accessibility/AccessibilityRenderObject.cpp:
+        (WebCore::AccessibilityRenderObject::determineAccessibilityRole):
+        * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
+        (-[WebAccessibilityObjectWrapper determineIsAccessibilityElement]):
+        * accessibility/mac/AccessibilityObjectMac.mm:
+        (WebCore::AccessibilityObject::accessibilityPlatformIncludesObject):
+        * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
+        (createAccessibilityRoleMap):
+        (-[WebAccessibilityObjectWrapper roleDescription]):
+        * platform/LocalizedStrings.cpp:
+        (WebCore::AXMarkText):
+        * platform/LocalizedStrings.h:
+
+2016-10-19  Alex Christensen  <achristensen@webkit.org>
+
+        Re-enable URLParser for non-Safari Cocoa apps after r207321
+        https://bugs.webkit.org/show_bug.cgi?id=163690
+
+        Reviewed by Darin Adler.
+
+        I disabled the URLParser for non-Safari applications in r207305
+        to give me time to make URLParser more compatible, which I did in r207321
+
+        Updated some API tests which will be investigated in 
+        https://bugs.webkit.org/show_bug.cgi?id=163127
+
+        * platform/URLParser.cpp:
+        (WebCore::URLParser::setEnabled):
+        (WebCore::URLParser::enabled):
+        * testing/js/WebCoreTestSupport.cpp:
+        (WebCoreTestSupport::setURLParserEnabled): Deleted.
+        * testing/js/WebCoreTestSupport.h:
+
+2016-10-19  Myles C. Maxfield  <mmaxfield@apple.com>
+
+        CSS font-variation-settings does not handle uppercase axis names in variable fonts
+        https://bugs.webkit.org/show_bug.cgi?id=163546
+
+        Reviewed by Dean Jackson.
+
+        Remove the extra toASCIILower() call.
+
+        Test: fast/text/variations/case-axis-names.html
+
+        * css/parser/CSSParser.cpp:
+        (WebCore::CSSParser::parseFontVariationTag):
+
 2016-10-19  Anders Carlsson  <andersca@apple.com>
 
         Remove m_redirectURLs from HistoryItem