⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Timeline



Oct 22, 2016:

10:06 PM Changeset in webkit [207725] by Chris Dumez
  • 4 edits in trunk/Source/WebCore

[Web IDL] Two types are distinguishable for overload resolution if at most one of the two includes a nullable type
https://bugs.webkit.org/show_bug.cgi?id=163791

Reviewed by Sam Weinig.

Update overload resolution in the bindings generator so that 2 nullable types
are no longer considered as distinguishable, as per Web IDL:

  • bindings/scripts/CodeGeneratorJS.pm:

(AreTypesDistinguishableForOverloadResolution):

  • bindings/scripts/test/JS/JSTestObj.cpp:

(WebCore::jsTestObjPrototypeFunctionOverloadWithNullableNonDistinguishingParameter1):
(WebCore::jsTestObjPrototypeFunctionOverloadWithNullableNonDistinguishingParameter1Caller):
(WebCore::jsTestObjPrototypeFunctionOverloadWithNullableNonDistinguishingParameter2):
(WebCore::jsTestObjPrototypeFunctionOverloadWithNullableNonDistinguishingParameter2Caller):
(WebCore::jsTestObjPrototypeFunctionOverloadWithNullableNonDistinguishingParameter):

  • bindings/scripts/test/TestObj.idl:
7:53 PM Changeset in webkit [207724] by Chris Dumez
  • 7 edits in trunk/Source/WebCore

WebGLRenderingContextBase.texSubImage2D() should use a union instead of overloading
https://bugs.webkit.org/show_bug.cgi?id=163859

Reviewed by Darin Adler.

WebGLRenderingContextBase.texSubImage2D() should use a union instead of overloading:

No new tests, no Web-exposed behavior change.

  • html/canvas/WebGL2RenderingContext.cpp:

(WebCore::WebGL2RenderingContext::texSubImage2D):

  • html/canvas/WebGL2RenderingContext.h:
  • html/canvas/WebGLRenderingContext.cpp:

(WebCore::WebGLRenderingContext::texSubImage2D):

  • html/canvas/WebGLRenderingContext.h:
  • html/canvas/WebGLRenderingContextBase.h:
  • html/canvas/WebGLRenderingContextBase.idl:
7:49 PM Changeset in webkit [207723] by mitz@apple.com
  • 3 edits
    2 adds in trunk

Dynamically-added backdrop filter to clip-path'd element with 3D transform renders incorrectly (without clip)
https://bugs.webkit.org/show_bug.cgi?id=163497

Reviewed by Simon Fraser.

Source/WebCore:

Test: css3/filters/backdrop/dynamic-with-clip-path.html

  • platform/graphics/ca/GraphicsLayerCA.cpp:

(WebCore::GraphicsLayerCA::ensureStructuralLayer): Added MaskLayerChanged to

structuralLayerChangeFlags to ensure that the mask layer is updated.

LayoutTests:

Based on the test case from Tim Horton.

  • css3/filters/backdrop/dynamic-with-clip-path-expected.html: Added.
  • css3/filters/backdrop/dynamic-with-clip-path.html: Added.
7:43 PM Changeset in webkit [207722] by Simon Fraser
  • 3 edits
    2 adds in trunk

Backdrop filter doesn't show if removed then re-added
https://bugs.webkit.org/show_bug.cgi?id=163860

Reviewed by Dan Bernstein.

Source/WebCore:

When a backdrop filter is removed the re-added, updateBackdropFiltersRect() never
runs the second time because m_backdropFiltersRect doesn't change. However, we need
to run that code to size and position the newly re-created backdrop layer, so run
it explicitly if we just created the backdrop layer. This is similar to how
updateContentsImage() calls updateContentsRects().

Test: css3/filters/backdrop/add-remove-add-backdrop-filter.html

  • platform/graphics/ca/GraphicsLayerCA.cpp:

(WebCore::GraphicsLayerCA::setBackdropFilters):
(WebCore::GraphicsLayerCA::updateBackdropFilters):

LayoutTests:

  • css3/filters/backdrop/add-remove-add-backdrop-filter-expected.html: Added.
  • css3/filters/backdrop/add-remove-add-backdrop-filter.html: Added.
7:43 PM Changeset in webkit [207721] by Simon Fraser
  • 3 edits
    3 adds in trunk

Fix repainting of slow repaint objects in WK1 when page scale is applied
https://bugs.webkit.org/show_bug.cgi?id=163854

Reviewed by Zalan Bujtas.

Source/WebCore:

RenderObject::repaintSlowRepaintObject() always set the repaint container to the RenderView
if it was null. This is before the call to clippedOverflowRectForRepaint(). If that function
is called with a null repaintContainer, it maps the rect up through the RenderView's transform
(which represents page scale), which is what we want here. Passing the RenderView itself
stops the transform from being applied, which led to the bug.

WebKit2 doesn't suffer from this bug because containerForRepaint() always returns the
composited RenderView.

Test: fast/repaint/zoomed-fixed-background.html

  • rendering/RenderObject.cpp:

(WebCore::RenderObject::repaintSlowRepaintObject):

LayoutTests:

Test that logs the repaint rect after scrolling a page with an element
with a fixed background. The WebKit1 result is the interesting one.

  • fast/repaint/zoomed-fixed-background-expected.txt: Added.
  • fast/repaint/zoomed-fixed-background.html: Added.
  • platform/mac-wk1/fast/repaint/zoomed-fixed-background-expected.txt: Added.
6:05 PM Changeset in webkit [207720] by Darin Adler
  • 51 edits in trunk

Move HTML canvas and tracks from ExceptionCode to Exception
https://bugs.webkit.org/show_bug.cgi?id=163853

Reviewed by Chris Dumez.

Source/WebCore:

  • WebCore.xcodeproj/project.pbxproj: Added CanvasPath.idl.
  • bindings/js/JSWebGL2RenderingContextCustom.cpp: Tweaked a bit.
  • bindings/js/JSWebGLRenderingContextBaseCustom.cpp:

(WebCore::JSWebGLRenderingContextBase::getExtension): Tweaked a bit.
(WebCore::JSWebGLRenderingContextBase::getFramebufferAttachmentParameter):
Removed unneeded exception handling.
(WebCore::JSWebGLRenderingContextBase::getParameter): Ditto.
(WebCore::JSWebGLRenderingContextBase::getProgramParameter): Ditto.
(WebCore::JSWebGLRenderingContextBase::getShaderParameter): Ditto.
(WebCore::JSWebGLRenderingContextBase::getSupportedExtensions): Use a
modern for loop.
(WebCore::JSWebGLRenderingContextBase::getUniform): Removed unneeded
exception handling.

  • html/HTMLCanvasElement.cpp:

(WebCore::HTMLCanvasElement::getContext): Pass a reference.
(WebCore::HTMLCanvasElement::reset): Use is<CanvasRenderingContext2D>.
(WebCore::HTMLCanvasElement::setUsesDisplayListDrawing): Ditto.
(WebCore::HTMLCanvasElement::setTracksDisplayListReplay) Ditto.:
(WebCore::HTMLCanvasElement::displayListAsText): Ditto.
(WebCore::HTMLCanvasElement::replayDisplayListAsText): Ditto.
(WebCore::HTMLCanvasElement::clearImageBuffer): Ditto.

  • html/canvas/CanvasGradient.cpp:

(WebCore::CanvasGradient::CanvasGradient): Streamlined.
(WebCore::CanvasGradient::addColorStop): Use ExceptionOr.

  • html/canvas/CanvasGradient.h: Updated for above changes.
  • html/canvas/CanvasGradient.idl: Use non-legacy exception.
  • html/canvas/CanvasPath.cpp:

(WebCore::CanvasPath::arcTo): Use ExceptionOr.
(WebCore::CanvasPath::arc): Ditto.
(WebCore::CanvasPath::ellipse): Ditto.

  • html/canvas/CanvasPath.h: Updated for above changes.
  • html/canvas/CanvasPath.idl: Use non-legacy exceptions.
  • html/canvas/CanvasPattern.cpp:

(WebCore::CanvasPattern::create): Use Ref&&.
(WebCore::CanvasPattern::CanvasPattern): Ditto.
(WebCore::CanvasPattern::parseRepetitionType): Return a boolean
instead of using an ExceptionCode.

  • html/canvas/CanvasPattern.h: Updated for above changes.
  • html/canvas/CanvasRenderingContext.cpp:

(CanvasRenderingContext::wouldTaintOrigin): Reordered function so
that it's safe to call it on an image element without a cached
image, or a cached image without an underlying image.

  • html/canvas/CanvasRenderingContext2D.cpp:

(WebCore::CanvasRenderingContext2D::CanvasRenderingContext2D):
Take a reference.
(WebCore::CanvasRenderingContext2D::drawImage): Use ExceptionOr.
(WebCore::CanvasRenderingContext2D::drawImageFromRect): Ditto.
(WebCore::CanvasRenderingContext2D::createLinearGradient): Ditto.
(WebCore::CanvasRenderingContext2D::createRadialGradient): Ditto.
(WebCore::CanvasRenderingContext2D::createPattern): Ditto.
(WebCore::CanvasRenderingContext2D::createImageData): Ditto.
(WebCore::CanvasRenderingContext2D::getImageData): Ditto.
(WebCore::CanvasRenderingContext2D::webkitGetImageDataHD): Ditto.
(WebCore::CanvasRenderingContext2D::putImageData): Removed unneeded
ExceptionCode because this does not throw exceptions; the only one
was for non-finite numeric values but this is now handled by bindings.
(WebCore::CanvasRenderingContext2D::webkitPutImageDataHD): Ditto.

  • html/canvas/CanvasRenderingContext2D.h: Updated for above.
  • html/canvas/CanvasRenderingContext2D.idl: Use non-legacy exceptions

and removed exceptions entirely in other cases.

  • html/canvas/OESVertexArrayObject.cpp:

(WebCore::OESVertexArrayObject::OESVertexArrayObject): Take a reference.
(WebCore::OESVertexArrayObject::~OESVertexArrayObject): Deleted.
(WebCore::OESVertexArrayObject::isVertexArrayOES): Use && instead of
multiple return statements.
(WebCore::OESVertexArrayObject::bindVertexArrayOES): Removed unneeded
ExceptionCode since this does not throw an exception.

  • html/canvas/OESVertexArrayObject.h: Updated for above.
  • html/canvas/OESVertexArrayObject.idl: Removed unneeded exception.
  • html/canvas/WebGL2RenderingContext.cpp:

(WebCore::WebGL2RenderingContext::getFramebufferAttachmentParameter):
Removed unneeded ExceptionCode since this does not throw an exception.
(WebCore::WebGL2RenderingContext::texSubImage2DBase): Ditto.
(WebCore::WebGL2RenderingContext::texSubImage2DImpl): Ditto.
(WebCore::WebGL2RenderingContext::texSubImage2D): Removed unneeded
ExceptionCode for some overloads, for the others, use ExceptionOr
for the security exception. Moved security exception code here from
the validate functions.
(WebCore::WebGL2RenderingContext::validateTexFuncParameters): Removed
unneeded ExceptionCode.
(WebCore::WebGL2RenderingContext::getParameter): Ditto.

  • html/canvas/WebGL2RenderingContext.h: Updated for above.
  • html/canvas/WebGLRenderingContext.cpp:

(WebCore::WebGLRenderingContext::getExtension): Pass a reference.
(WebCore::WebGLRenderingContext::getFramebufferAttachmentParameter):
Remvoed unneeded ExceptionCode since this does not throw an exception.
(WebCore::WebGLRenderingContext::texSubImage2DBase): Ditto.
(WebCore::WebGLRenderingContext::texSubImage2DImpl): Ditto.
(WebCore::WebGLRenderingContext::texSubImage2D): Removed unneeded
ExceptionCode for some overloads, for the others, use ExceptionOr
for the security exception. Moved security exception code here from
the validate functions.
(WebCore::WebGLRenderingContext::getParameter): Removed unneeded
ExceptionCode.

  • html/canvas/WebGLRenderingContext.h: Updated for above changes.
  • html/canvas/WebGLRenderingContextBase.cpp:

(WebCore::WebGLRenderingContextBase::texImage2DBase):
Remvoed unneeded ExceptionCode since this does not throw an exception.
(WebCore::WebGLRenderingContextBase::texImage2DImpl): Ditto.
(WebCore::WebGLRenderingContextBase::texImage2D): Removed unneeded
ExceptionCode for some overloads, for the others, use ExceptionOr
for the security exception. Moved security exception code here from
the validate functions.
(WebCore::WebGLRenderingContextBase::validateHTMLImageElement):
Moved the security exception out of here to the call sites.
(WebCore::WebGLRenderingContextBase::validateHTMLCanvasElement): Ditto.
(WebCore::WebGLRenderingContextBase::validateHTMLVideoElement): Ditto.

  • html/canvas/WebGLRenderingContextBase.h: Updated for above changes.
  • html/canvas/WebGLRenderingContextBase.idl: Use non-legacy exceptions

in some cases and no exceptions at all in many others.

  • html/shadow/MediaControlElements.cpp:

(WebCore::MediaControlTextTrackContainerElement::updateDisplay):
Use a reference instead of a pointer.

  • html/track/DataCue.h: Use pragma once.
  • html/track/DataCue.idl: Use non-legacy exception for constructor

attribute, even though it is custom and so it has no effect.

  • html/track/InbandDataTextTrack.cpp:

(WebCore::InbandDataTextTrack::create): Use RefPtr&&.
(WebCore::InbandDataTextTrack::InbandDataTextTrack): Ditto.
(WebCore::InbandDataTextTrack::addDataCue): Stop using
ASSERT_NO_EXCEPTION.
(WebCore::InbandDataTextTrack::removeDataCue): Stop using
IGNORE_EXCEPTION.
(WebCore::InbandDataTextTrack::removeCue): Use ExceptionOr.
Also use remove instead of find/remove.

  • html/track/InbandDataTextTrack.h: Updated for above changes.
  • html/track/InbandGenericTextTrack.cpp:

(WebCore::GenericTextTrackCueMap::GenericTextTrackCueMap): Deleted.
(WebCore::GenericTextTrackCueMap::~GenericTextTrackCueMap): Deleted.
(WebCore::GenericTextTrackCueMap::add): Take references intead of
pointers.
(WebCore::GenericTextTrackCueMap::find): Ditto. Also use get
instead of find.
(WebCore::GenericTextTrackCueMap::remove): Ditto. Also use take
instead of double hashing to both find and remove.
(WebCore::InbandGenericTextTrack::updateCueFromCueData): Stop using
IGNORE_EXCEPTION. Also got rid of code that is converting a double
to a long and then back to a double by using lround. Instead just
use std::round, which keeps it a double. But also, why does this need
to round?!
(WebCore::InbandGenericTextTrack::addGenericCue): Updated to use
reference to work with m_cueMap.
(WebCore::InbandGenericTextTrack::updateGenericCue): Ditto.
(WebCore::InbandGenericTextTrack::removeGenericCue): Ditto.
(WebCore::InbandGenericTextTrack::removeCue): Use ExceptionOr.
(WebCore::InbandGenericTextTrack::newCuesParsed): Removed
ASSERT_NO_EXCEPTION.

  • html/track/InbandGenericTextTrack.h: Updated for above changes.
  • html/track/InbandWebVTTTextTrack.cpp:

(WebCore::InbandWebVTTTextTrack::newCuesParsed): Removed
ASSERT_NO_EXCEPTION.

  • html/track/TextTrack.cpp:

(WebCore::TextTrack::addCue): Use ExcepctionOr.
(WebCore::TextTrack::removeCue): Ditto.
(WebCore::TextTrack::addRegion): Ditto.
(WebCore::TextTrack::removeRegion): Ditto.

  • html/track/TextTrack.h: Updated for above changes.
  • html/track/TextTrack.idl: Ditto.
  • html/track/TextTrackCue.cpp:

(WebCore::TextTrackCue::cueShadowPseudoId): Moved this here
since it does not need to be inlined in the header.
(WebCore::TextTrackCue::~TextTrackCue): Deleted.
(WebCore::TextTrackCue::setStartTime): Removed ExceptionCode&
since the exceptions were for non-finite values, but this is
now handled by the bindings.
(WebCore::TextTrackCue::setEndTime): Ditto.

  • html/track/TextTrackCue.h: Updated for the above.
  • html/track/TextTrackCue.idl: Removed SetterMayThrowLegacyException

and made startTime and endTime be double rather than unrestricted double.

  • html/track/TextTrackCueGeneric.cpp:

(WebCore::TextTrackCueGenericBoxElement::applyCSSProperties):
Use a reference instead of a pointer.
(WebCore::TextTrackCueGeneric::TextTrackCueGeneric): Initialize
m_defaultPosition in the class definition instead of here.
(WebCore::TextTrackCueGeneric::createDisplayTree): Return a Ref.
(WebCore::TextTrackCueGeneric::setLine): Use ExceptionOr.
(WebCore::TextTrackCueGeneric::setPosition): Ditto.
(WebCore::TextTrackCueGeneric::setFontSize): Updated since
displayTreeInternal() now returns a reference.

  • html/track/TextTrackCueGeneric.h: Updated for above changes.

Also fixed some arguument types and made some more things private.

  • html/track/VTTCue.cpp:

(WebCore::VTTCue::createDisplayTree): Return a Ref.
(WebCore::VTTCue::displayTreeInternal): Return a reference.
(WebCore::VTTCue::setVertical): Use ExceptionOr.
(WebCore::VTTCue::setLine): Ditto.
(WebCore::VTTCue::setPosition): Ditto.
(WebCore::VTTCue::setSize): Ditto.
(WebCore::VTTCue::setAlign): Ditto.
(WebCore::VTTCue::getDisplayTree): Return a reference.
(WebCore::VTTCue::removeDisplayTree): Updated since
displayTreeInternal returns a reference.
(WebCore::VTTCue::setFontSize): Ditto.

  • html/track/VTTCue.h: Updated for the above.
  • html/track/VTTCue.idl: Use non-legacy exceptions and also

restricted doubles.

  • html/track/VTTRegion.cpp:

(WebCore::VTTRegion::VTTRegion): Moved default values all into
the class definition.
(WebCore::VTTRegion::setWidth): Removed the check for non-finite
since the bindings now handle that. Use ExcpetionOr.
(WebCore::VTTRegion::setHeight): Ditto.
(WebCore::VTTRegion::setRegionAnchorX): Ditto.
(WebCore::VTTRegion::setRegionAnchorY): Ditto.
(WebCore::VTTRegion::setViewportAnchorX): Ditto.
(WebCore::VTTRegion::setViewportAnchorY): Ditto.
(WebCore::upKeyword): Added. Shared by the code below.
(WebCore::VTTRegion::scroll): Rewrote to be simpler.
(WebCore::VTTRegion::setScroll): Rewrote to be simpler.
(WebCore::VTTRegion::updateParametersFromRegion): Read and
write data members directly to avoid awkward code that is otherwise
required just to copy from one object to the other. Also take a
const& instead of a pointer for the thing to update from.
(WebCore::VTTRegion::parseSettingValue): Use upKeyword.
(WebCore::VTTRegion::appendTextTrackCueBox): Take a Ref&&.
(WebCore::VTTRegion::getDisplayTree): Do the downcast to Document
here instead of using the helper function.
(WebCore::VTTRegion::prepareRegionDisplayTree): Ditto.

  • html/track/VTTRegion.h: Updated for the above.
  • html/track/VTTRegion.idl: Use non-legacy exceptions and also

use restricted dobules, not unrestricted.

LayoutTests:

  • media/track/regions-webvtt/vtt-region-constructor-expected.txt:

Change expectations to expect the more specific TypeError message
that the bindings generate as opposed to the generic ones that the
WebVTT DOM code was generating before.

4:28 PM Changeset in webkit [207719] by Chris Dumez
  • 4 edits in trunk/Source/WebCore

WebGLRenderingContextBase.texImage2D() should use a union instead of overloading
https://bugs.webkit.org/show_bug.cgi?id=163856

Reviewed by Darin Adler.

WebGLRenderingContextBase.texImage2D() should use a union instead of overloading:

  • html/canvas/WebGLRenderingContextBase.cpp:

(WebCore::WebGLRenderingContextBase::texImage2D):

  • html/canvas/WebGLRenderingContextBase.h:
  • html/canvas/WebGLRenderingContextBase.idl:
3:14 PM Changeset in webkit [207718] by Michael Catanzaro
  • 2 edits
    2 moves
    3 adds in trunk/LayoutTests

Unreviewed GTK test gardening

  • platform/gtk/TestExpectations:
  • platform/gtk/imported/w3c/web-platform-tests/touch-events/historical-expected.txt: Added.
  • platform/gtk/imported/w3c/web-platform-tests/touch-events/touch-globaleventhandler-interface-expected.txt: Added.
  • platform/gtk/svg/custom/repaint-shadow-expected.txt: Renamed from LayoutTests/platform/gtk/svg/text/repaint-shadow-expected.txt.
  • platform/gtk/svg/custom/simple-text-double-shadow-expected.txt: Renamed from LayoutTests/platform/gtk/svg/custom/simple-text-double-shadow.txt.
3:13 PM WebKitGTK/Gardening/Calendar edited by Michael Catanzaro
(diff)
2:27 PM Changeset in webkit [207717] by Antti Koivisto
  • 3 edits in trunk/Source/WebCore

REGRESSION(r207669): Dromaeo/jslib-style-jquery.html regressed >20%
https://bugs.webkit.org/show_bug.cgi?id=163851

Reviewed by Darin Adler.

The test calls Scope::flushPendingUpdate a lot and nothing ever happens there.

Add a separate invalidity bit for descendant scopes and inline the fast path.

  • style/StyleScope.cpp:

(WebCore::Style::Scope::flushPendingSelfUpdate):
(WebCore::Style::Scope::flushPendingDescendantUpdates):
(WebCore::Style::Scope::scheduleUpdate):
(WebCore::Style::Scope::flushPendingUpdate): Deleted.

  • style/StyleScope.h:

(WebCore::Style::Scope::hasPendingUpdate):
(WebCore::Style::Scope::flushPendingUpdate):

1:56 PM Changeset in webkit [207716] by Darin Adler
  • 81 edits in trunk/Source/WebCore

Move SVG from ExceptionCode to Exception
https://bugs.webkit.org/show_bug.cgi?id=163837

Reviewed by Chris Dumez.

  • WebCore.xcodeproj/project.pbxproj: Added SVGGraphicsElement.idl.
  • bindings/js/JSSVGLengthCustom.cpp:

(WebCore::JSSVGLength::value): Use toJSNumber.
(WebCore::JSSVGLength::setValue): Use propagateException.
(WebCore::JSSVGLength::convertToSpecifiedUnits): Ditto.

  • bindings/scripts/CodeGeneratorJS.pm:

(GenerateImplementation): Properly handle SetterMayThrowException
in the special case for SVG setters.

  • rendering/style/SVGRenderStyle.h:

(WebCore::SVGRenderStyle::initialBaselineShiftValue): Removed
ASSERT_NO_EXCEPTION, no longer needed.
(WebCore::SVGRenderStyle::initialKerning): Ditto.

  • svg/SVGAltGlyphElement.cpp:

(WebCore::SVGAltGlyphElement::setGlyphRef): Use ExceptionOr.
(WebCore::SVGAltGlyphElement::setFormat): Ditto.
(WebCore::SVGAltGlyphElement::hasValidGlyphElements): Tweaked a bit.

  • svg/SVGAltGlyphElement.h: Updated for above changes.
  • svg/SVGAltGlyphElement.idl: Use non-legacy exceptions.
  • svg/SVGAngle.cpp:

(WebCore::SVGAngle::valueAsString): Removed unneeded String globals.
(WebCore::parseAngleType): Rewrote to be simpler and more direct.
(WebCore::SVGAngle::setValueAsString): Use ExceptionOr.
(WebCore::SVGAngle::newValueSpecifiedUnits): Ditto.
(WebCore::SVGAngle::convertToSpecifiedUnits): Ditto.

  • svg/SVGAngle.h: Updated for above changes. Initialized data members

here in the class definite and removed constructor; default now works.

  • svg/SVGAngle.idl: Use non-legacy exceptions.
  • svg/SVGAnimateElementBase.cpp:

(WebCore::SVGAnimateElementBase::calculateAnimatedValue): Update since
CalcMode is now an enum class.

  • svg/SVGAnimateMotionElement.cpp:

(WebCore::SVGAnimateMotionElement::SVGAnimateMotionElement): Ditto.

  • svg/SVGAnimateTransformElement.cpp:

(WebCore::SVGAnimateTransformElement::hasValidAttributeType): Update
since AttributeType is now an enum class.

  • svg/SVGAnimatedAngle.cpp:

(WebCore::SVGAnimatedAngleAnimator::calculateDistance): Removed
ASSERT_NO_EXCEPTION, no longer needed.

  • svg/SVGAnimatedBoolean.idl: Use non-legacy exception.
  • svg/SVGAnimatedEnumeration.idl: Ditto.
  • svg/SVGAnimatedInteger.idl: Ditto.
  • svg/SVGAnimatedLength.cpp:

(WebCore::sharedSVGLength): Deleted.
(WebCore::SVGAnimatedLengthAnimator::addAnimatedTypes): Removed
ASSERT_NO_EXCEPTION, no longer needed.
(WebCore::parseLengthFromString): Ditto. Also rewrote to not use
a shared SVGLength; no benefit to doing that.
(WebCore::SVGAnimatedLengthAnimator::calculateAnimatedValue): Ditto.

  • svg/SVGAnimatedLengthList.cpp:

(WebCore::SVGAnimatedLengthListAnimator::addAnimatedTypes): Ditto.
(WebCore::SVGAnimatedLengthListAnimator::calculateAnimatedValue): Ditto.

  • svg/SVGAnimatedNumber.idl: Use non-legacy exception.
  • svg/SVGAnimatedString.idl: Ditto.
  • svg/SVGAnimatedType.cpp:

(WebCore::SVGAnimatedType::setValueAsString): Updated since
setValueAsString now uses ExceptionOr.

  • svg/SVGAnimationElement.cpp:

(WebCore::SVGAnimationElement::SVGAnimationElement): Initialized scalars
in the class definition instead of here.
(WebCore::SVGAnimationElement::getSimpleDuration): Removed uneeded ExceptionCode&.
(WebCore::SVGAnimationElement::setCalcMode): Updated since CalcMode is now an enum class.
(WebCore::SVGAnimationElement::setAttributeType): Updated since AttributeType
is now an enum class.
(WebCore::SVGAnimationElement::shouldApplyAnimation): Ditto.
(WebCore::SVGAnimationElement::calculateKeyTimesForCalcModePaced): Ditto.
(WebCore::SVGAnimationElement::calculatePercentForSpline): Ditto.
(WebCore::SVGAnimationElement::calculatePercentFromKeyPoints): Ditto.
(WebCore::SVGAnimationElement::calculatePercentForFromTo): Ditto.
(WebCore::SVGAnimationElement::currentValuesFromKeyPoints): Ditto.
(WebCore::SVGAnimationElement::currentValuesForValuesAnimation): Ditto.
(WebCore::SVGAnimationElement::startedActiveInterval): Ditto.
(WebCore::SVGAnimationElement::updateAnimation): Ditto.
(WebCore::SVGAnimationElement::checkInvalidCSSAttributeType): Ditto.

  • svg/SVGAnimationElement.h: Changed CalcMode into an enum class.

Updated for above changes.

  • svg/SVGAnimationElement.idl: Removed MayThrowLegacyException from

getSimpleDuration.

  • svg/SVGColor.cpp:

(WebCore::SVGColor::SVGColor): Updated to take scalar in the straightforward
manner instead of constt SVGColorType&.
(WebCore::SVGColor::setRGBColor): Use ExceptionOr.
(WebCore::SVGColor::setRGBColorICCColor): Ditto.
(WebCore::SVGColor::setColor): Ditto.

  • svg/SVGColor.h: Updated for above changes. Removed unneeded destructor.
  • svg/SVGColor.idl: Use non-legacy exceptions.
  • svg/SVGGlyphRefElement.cpp:

(WebCore::SVGGlyphRefElement::SVGGlyphRefElement): Initialize data members
in class definition, not here.
(WebCore::parseFloat): Added helper. Used in parseAttribute.
(WebCore::SVGGlyphRefElement::parseAttribute): Updated to use parseFloat helper.
(WebCore::SVGGlyphRefElement::glyphRef): Deleted.
(WebCore::SVGGlyphRefElement::setGlyphRef): Deleted.
(WebCore::SVGGlyphRefElement::setX): Removed unused Exception& argument.
(WebCore::SVGGlyphRefElement::setY): Ditto.
(WebCore::SVGGlyphRefElement::setDx): Ditto.
(WebCore::SVGGlyphRefElement::setDy): Ditto.

  • svg/SVGGlyphRefElement.h: Updated for above changes.
  • svg/SVGGlyphRefElement.idl: Use Reflect on glyphRef. Removed incorrect

SetterMayThrowLegacyException attributes for x, y, dx, and dy. Longer term
it might be nice to use [Reflect] on these too.

  • svg/SVGGraphicsElement.idl: Use non-legacy exception.
  • svg/SVGLength.cpp:

(WebCore::parseLengthType): Changed argument type since caller does not
need to know how many characters are consumed.
(WebCore::SVGLength::SVGLength): Removed IGNORE_EXCEPTION and ASSERT_NO_EXCEPTION.
Also removed the copy constructor, letting the compiler generate the default.
(WebCore::SVGLength::setValueAsString): Use ExceptionOr.
(WebCore::SVGLength::construct): Updated since setValueAsString uses ExceptionOr.
(WebCore::SVGLength::value): Ditto.
(WebCore::SVGLength::valueForBindings): Use ExceptionOr. Also renamed to
disambiguate with the version used outside of bindings.
(WebCore::SVGLength::setValue): Use ExceptionOr.
(WebCore::SVGLength::newValueSpecifiedUnits): Ditto.
(WebCore::SVGLength::convertToSpecifiedUnits): Ditto.
(WebCore::SVGLength::fromCSSPrimitiveValue): Updated since newValueSpecifiedUnits
uses ExceptionOr.
(WebCore::SVGLength::lengthModeForAnimatedLengthAttribute): Rewrote map generation
code to be more efficient and not unrolled. Only do one hash table lookup.

  • svg/SVGLength.h: Updated for above changes.
  • svg/SVGLength.idl: Use non-legacy exceptions.
  • svg/SVGLengthContext.cpp:

(WebCore::SVGLengthContext::valueForLength): Update since function
uses ExceptionOr.
(WebCore::SVGLengthContext::convertValueToUserUnits): Use ExceptionOr.
(WebCore::SVGLengthContext::convertValueFromUserUnits): Ditto.
(WebCore::SVGLengthContext::convertValueFromUserUnitsToPercentage): Ditto.
(WebCore::SVGLengthContext::convertValueFromPercentageToUserUnits): Ditto.
(WebCore::SVGLengthContext::convertValueFromUserUnitsToEMS): Ditto.
(WebCore::SVGLengthContext::convertValueFromEMSToUserUnits): Ditto.
(WebCore::SVGLengthContext::convertValueFromUserUnitsToEXS): Ditto.
(WebCore::SVGLengthContext::convertValueFromEXSToUserUnits): Ditto.

  • svg/SVGLengthContext.h: Updatedfor above changes.
  • svg/SVGLengthList.cpp:

(WebCore::SVGLengthList::parse): Updated since setValueAsString uses
ExceptionOr now.

  • svg/SVGLengthList.h: Removed unneeded constructor.
  • svg/SVGLengthList.idl: Use non-legacy exceptions.
  • svg/SVGLocatable.cpp:

(WebCore::SVGLocatable::getTransformToElement): Use ExceptionOr.

  • svg/SVGLocatable.h: Updated for above change.
  • svg/SVGMarkerElement.h:

(WebCore::SVGPropertyTraits<SVGMarkerOrientType>::fromString):
Updated since setValueAsString uses ExceptionOr now.

  • svg/SVGMatrix.h: Use ExceptionOr.
  • svg/SVGMatrix.idl: Use non-legacy exceptions.
  • svg/SVGNumberList.h: Removed unneeded constructor.
  • svg/SVGNumberList.idl: Use non-legacy exceptions.
  • svg/SVGPaint.cpp:

(WebCore::SVGPaint::setPaint): Use ExceptionOr.

  • svg/SVGPaint.h: Updated for above chagne.
  • svg/SVGPaint.idl: Use non-legacy exception.
  • svg/SVGPathSegList.h: Tweaked a bit.
  • svg/SVGPathSegList.idl: Use non-legacy exceptions.
  • svg/SVGPointList.h: Removed unneeded constructor.
  • svg/SVGPointList.idl: Use non-legacy exceptions.
  • svg/SVGPreserveAspectRatio.cpp:

(WebCore::SVGPreserveAspectRatio::setAlign): Use ExceptionOr.
(WebCore::SVGPreserveAspectRatio::setMeetOrSlice): Ditto.

  • svg/SVGPreserveAspectRatio.h: Updated for above changes.
  • svg/SVGPreserveAspectRatio.idl: Use non-legacy exceptions.
  • svg/SVGSVGElement.cpp:

(WebCore::SVGSVGElement::currentView): Pass a reference.

  • svg/SVGStringList.h: Tweaked a bit.
  • svg/SVGStringList.idl: Use non-legacy exceptions.
  • svg/SVGStyleElement.cpp:

(WebCore::SVGStyleElement::setType): Removed unneeded ExceptionCode&.
(WebCore::SVGStyleElement::setMedia): Ditto.
(WebCore::SVGStyleElement::setTitle): Deleted.

  • svg/SVGStyleElement.h: Updated for above changes, and made the title

function override be private.

  • svg/SVGStyleElement.idl: Use Reflect for title. Removed unneeded

SetterMayThrowLegacyException on all attributes.

  • svg/SVGTextContentElement.cpp:

(WebCore::SVGTextContentElement::textLengthAnimated): Removed
ASSERT_NO_EXCEPTION, won't work any more.
(WebCore::SVGTextContentElement::getSubStringLength): Use ExceptionOr.
Also remove redundant call to updateLayoutIgnorePendingStylesheets,
called by getNumberOfChars.
(WebCore::SVGTextContentElement::getStartPositionOfChar): Ditto.
(WebCore::SVGTextContentElement::getEndPositionOfChar): Ditto.
(WebCore::SVGTextContentElement::getExtentOfChar): Ditto.
(WebCore::SVGTextContentElement::getRotationOfChar): Ditto.
(WebCore::SVGTextContentElement::selectSubString): Ditto.

  • svg/SVGTextContentElement.h: Updated for above changes.
  • svg/SVGTextContentElement.idl: Use non-legacy exceptions.
  • svg/SVGTransformList.h: Removed unneeded constructor.
  • svg/SVGTransformList.idl: Use non-legacy exceptions.
  • svg/SVGViewSpec.cpp:

(WebCore::SVGViewSpec::SVGViewSpec): Updated to take a reference.
(WebCore::SVGViewSpec::setZoomAndPan): Use ExceptionOr.
(WebCore::SVGViewSpec::setTransformString): Deleted.
(WebCore::SVGViewSpec::viewBoxString): Use m_viewBox directly.
(WebCore::SVGViewSpec::preserveAspectRatioString): Use
m_preserveAspectRatio directly.
(WebCore::SVGViewSpec::viewTarget): Use is<SVGElement>.
(WebCore::SVGViewSpec::lookupOrCreateViewBoxWrapper): Use
m_contextElement directly.
(WebCore::SVGViewSpec::lookupOrCreatePreserveAspectRatioWrapper):
Ditto.
(WebCore::SVGViewSpec::lookupOrCreateTransformWrapper): Ditto.
(WebCore::SVGViewSpec::parseViewSpec): Set m_viewTargetString directly.

  • svg/SVGViewSpec.h: Updated for above changes. Removed unneeded virtual

destructor, unneeded using for ref/deref, unused functions including
setTransformString, setViewTargetString, non-exception setZoomAndPan,
contextElement, viewBoxBaseValue, and preserveAspectRatioBaseValue.

  • svg/SVGViewSpec.idl: Use non-legacy exceptions. Also specify

ImplementationLacksVTable.

  • svg/properties/SVGAnimatedEnumerationPropertyTearOff.h:

Use ExceptionOr.

  • svg/properties/SVGAnimatedStaticPropertyTearOff.h: Ditto.
  • svg/properties/SVGListProperty.h: Ditto.
  • svg/properties/SVGListPropertyTearOff.h: Ditto.
    • svg/properties/SVGPathSegListPropertyTearOff.cpp:

(WebCore::SVGPathSegListPropertyTearOff::clear): Ditto.
(WebCore::SVGPathSegListPropertyTearOff::getItem): Ditto.
(WebCore::SVGPathSegListPropertyTearOff::replaceItem): Ditto.
(WebCore::SVGPathSegListPropertyTearOff::removeItem): Ditto.

  • svg/properties/SVGPathSegListPropertyTearOff.h: Ditto.
  • svg/properties/SVGPropertyTearOff.h: Ditto. Also added an overload

of create that knows how to deal with exceptions.

  • svg/properties/SVGStaticListPropertyTearOff.h: Ditto.
  • svg/properties/SVGTransformListPropertyTearOff.h: Ditto.
1:46 PM Changeset in webkit [207715] by Chris Dumez
  • 39 edits in trunk/Source

WebGLRenderingContextBase.bufferData() should use a union instead of overloading
https://bugs.webkit.org/show_bug.cgi?id=163795

Reviewed by Darin Adler.

Source/JavaScriptCore:

  • runtime/ArrayBufferView.h:

(JSC::ArrayBufferView::data):
Add a data() method which aliases baseAddress() to align the API with
ArrayBuffer and reduce special handling at call sites.

  • runtime/JSArrayBuffer.h:

(JSC::toArrayBuffer):
(JSC::JSArrayBuffer::toWrapped):
Add toWrapped() method similarly with WebCore wrapper types to
reduce special handling of JSArrayBuffer type.

  • runtime/JSArrayBufferView.cpp:

(JSC::JSArrayBufferView::toWrapped):

  • runtime/JSArrayBufferView.h:

Add toWrapped() method similarly with WebCore wrapper types to
reduce special handling of JSArrayBufferView type.

Source/WebCore:

WebGLRenderingContextBase.bufferData() / bufferSubData() should use a union
instead of overloading:

No new tests, no web-exposed behavior change.

  • bindings/js/JSDOMConvert.h:

(WebCore::Converter<IDLInterface<T>>::convert):

  • bindings/scripts/CodeGeneratorJS.pm:

(GenerateHeader):

  • bindings/scripts/test/JS/JSInterfaceName.h:
  • bindings/scripts/test/JS/JSTestActiveDOMObject.h:
  • bindings/scripts/test/JS/JSTestCEReactions.h:
  • bindings/scripts/test/JS/JSTestCEReactionsStringifier.h:
  • bindings/scripts/test/JS/JSTestClassWithJSBuiltinConstructor.h:
  • bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.h:
  • bindings/scripts/test/JS/JSTestCustomNamedGetter.h:
  • bindings/scripts/test/JS/JSTestEventConstructor.h:
  • bindings/scripts/test/JS/JSTestEventTarget.h:
  • bindings/scripts/test/JS/JSTestException.h:
  • bindings/scripts/test/JS/JSTestGenerateIsReachable.h:
  • bindings/scripts/test/JS/JSTestGlobalObject.h:
  • bindings/scripts/test/JS/JSTestInterface.h:
  • bindings/scripts/test/JS/JSTestIterable.h:
  • bindings/scripts/test/JS/JSTestMediaQueryListListener.h:
  • bindings/scripts/test/JS/JSTestNamedConstructor.h:
  • bindings/scripts/test/JS/JSTestNode.h:
  • bindings/scripts/test/JS/JSTestNondeterministic.h:
  • bindings/scripts/test/JS/JSTestObj.h:
  • bindings/scripts/test/JS/JSTestOverloadedConstructors.h:
  • bindings/scripts/test/JS/JSTestOverloadedConstructorsWithSequence.h:
  • bindings/scripts/test/JS/JSTestOverrideBuiltins.h:
  • bindings/scripts/test/JS/JSTestSerialization.h:
  • bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h:
  • bindings/scripts/test/JS/JSTestTypedefs.h:
  • bindings/scripts/test/JS/JSattribute.h:
  • bindings/scripts/test/JS/JSreadonly.h:
  • html/canvas/WebGL2RenderingContext.cpp:

(WebCore::WebGL2RenderingContext::bufferData):
(WebCore::WebGL2RenderingContext::bufferSubData):

  • html/canvas/WebGLRenderingContextBase.cpp:

(WebCore::WebGLRenderingContextBase::bufferData):
(WebCore::WebGLRenderingContextBase::bufferSubData):

  • html/canvas/WebGLRenderingContextBase.h:
  • html/canvas/WebGLRenderingContextBase.idl:
12:34 PM Changeset in webkit [207714] by fpizlo@apple.com
  • 4 edits in trunk/Source/JavaScriptCore

Slow and big Heap methods should not be inline
https://bugs.webkit.org/show_bug.cgi?id=163802

Reviewed by Keith Miller.

JSC often suffers from the inline cargo cult, and Heap is a prime example. This outlines a
bunch of Heap methods that are either already very big, or call out-of-line methods, or call
very big methods, or are not called often enough for inlining to matter.

This simplifies concurrent GC work because I'm so tired of recompiling the world when I touch
one of these methods.

This looks to be perf-neutral.

  • heap/Heap.cpp:

(JSC::Heap::shouldCollect):
(JSC::Heap::isCurrentThreadBusy):
(JSC::Heap::reportExtraMemoryVisited):
(JSC::Heap::reportExternalMemoryVisited):
(JSC::Heap::collectIfNecessaryOrDefer):
(JSC::Heap::collectAccordingToDeferGCProbability):
(JSC::Heap::decrementDeferralDepthAndGCIfNeeded):
(JSC::Heap::registerWeakGCMap):
(JSC::Heap::unregisterWeakGCMap):
(JSC::Heap::didAllocateBlock):
(JSC::Heap::didFreeBlock):

  • heap/HeapInlines.h:

(JSC::Heap::shouldCollect): Deleted.
(JSC::Heap::isCurrentThreadBusy): Deleted.
(JSC::Heap::reportExtraMemoryVisited): Deleted.
(JSC::Heap::reportExternalMemoryVisited): Deleted.
(JSC::Heap::collectIfNecessaryOrDefer): Deleted.
(JSC::Heap::collectAccordingToDeferGCProbability): Deleted.
(JSC::Heap::decrementDeferralDepthAndGCIfNeeded): Deleted.
(JSC::Heap::registerWeakGCMap): Deleted.
(JSC::Heap::unregisterWeakGCMap): Deleted.
(JSC::Heap::didAllocateBlock): Deleted.
(JSC::Heap::didFreeBlock): Deleted.

9:30 AM Changeset in webkit [207713] by mitz@apple.com
  • 3 edits in trunk/Tools

Improve MiniBrowser window titles for URLs without paths and with no title
<https://webkit.org/b/163843>

Reviewed by Darin Adler.

  • MiniBrowser/mac/WK1BrowserWindowController.m:

(-[WK1BrowserWindowController fetch:]): While we’re here, deploy

+[NSURL _webkit_URLWithUserTypedString:] here to match the WK2BrowserWindowController
version of this method.

(-[WK1BrowserWindowController updateTitle:]): If the URL doesn’t have a lastPathComponent,

use the entire URL.

(-[WK1BrowserWindowController webView:didCommitLoadForFrame:]): Also while we’re here,

deploy +[NSURL _web_userVisibleString] here to match the WK2BrowserWindowController
behavior.

  • MiniBrowser/mac/WK2BrowserWindowController.m:

(-[WK2BrowserWindowController updateTitle:]): If the URL doesn’t have a lastPathComponent,

use the entire URL.

9:26 AM Changeset in webkit [207712] by Darin Adler
  • 2 edits in trunk/Source/WebCore

[Cocoa] REGRESSION (r204508): Crash in init_WebCreateFragment when pasting (seen in multiple apps using legacy WebKit)
https://bugs.webkit.org/show_bug.cgi?id=163839

Reviewed by Dan Bernstein.

  • editing/cocoa/EditorCocoa.mm: Use the appropriate SOFT_LINK macros to find

the WebKitLegacy platform in the correct location for iOS and macOS.

3:19 AM Changeset in webkit [207711] by nael.ouedraogo@crf.canon.fr
  • 7 edits in trunk

Bindings error message for missing required dictionary member should be more explicit
https://bugs.webkit.org/show_bug.cgi?id=163665

Reviewed by Darin Adler.

Source/WebCore:

Add throwRequiredMemberTypeError function to throw a TypeError exception with an error
message indicating the missing required member.

No new test required, rebase existing tests.

  • bindings/js/JSDOMBinding.cpp:

(WebCore::throwRequiredMemberTypeError):

  • bindings/js/JSDOMBinding.h:
  • bindings/scripts/CodeGeneratorJS.pm:

(GenerateDictionaryImplementationContent):

  • bindings/scripts/test/JS/JSTestObj.cpp:

(WebCore::convertDictionary<TestObj::DictionaryThatShouldNotTolerateNull>):

LayoutTests:

Update existing tests.

  • fast/mediastream/MediaStreamTrackEvent-constructor-expected.txt:
1:15 AM Changeset in webkit [207710] by rniwa@webkit.org
  • 9 edits
    2 adds in trunk

Upgrading custom element should enqueue attributeChanged and connected callbacks
https://bugs.webkit.org/show_bug.cgi?id=163840

Reviewed by Darin Adler.

LayoutTests/imported/w3c:

Rebaselined the tests as more test cases are passing now.

  • web-platform-tests/custom-elements/reactions/Node-expected.txt:
  • web-platform-tests/custom-elements/reactions/Range-expected.txt:

Source/WebCore:

When upgrading a custom element, enqueue attributeChanged and connectedCallbacks as needed as specified
in step 3 and 4 of: https://html.spec.whatwg.org/multipage/scripting.html#concept-upgrade-an-element

Test: fast/custom-elements/upgrading-enqueue-reactions.html

  • bindings/js/JSCustomElementInterface.cpp:

(WebCore::JSCustomElementInterface::upgradeElement): Enqueue

  • dom/CustomElementReactionQueue.cpp:

(WebCore::CustomElementReactionQueueItem::invoke): Don't invoke callbacks when the custom element had
failed to upgrade.
(WebCore::CustomElementReactionQueue::enqueuePostUpgradeReactions): Added.
(WebCore::CustomElementReactionQueue::invokeAll): Upgrading a custom element may enqueue more reactions.
Keep invoking reactions until the queue becomes empty.

  • dom/CustomElementReactionQueue.h:
  • dom/Range.idl: Added a forgotten CEReactions here.

LayoutTests:

Added a W3C style testharness.js test for making sure upgrading custom custom elements
would enqueue attributedChanged and connected reactions.

  • fast/custom-elements/upgrading-enqueue-reactions-expected.txt: Added.
  • fast/custom-elements/upgrading-enqueue-reactions.html: Added.
12:23 AM Changeset in webkit [207709] by mitz@apple.com
  • 2 edits in trunk/Source/WebKit2

[iOS] _webViewWillEndNavigationGesture:withNavigationToBackForwardListItem: is never called
https://bugs.webkit.org/show_bug.cgi?id=163758

Reviewed by Darin Adler.

  • UIProcess/ios/ViewGestureControllerIOS.mm:

(WebKit::ViewGestureController::beginSwipeGesture): Don’t reset the interactive update

handler.

Oct 21, 2016:

11:38 PM Changeset in webkit [207708] by ddkilzer@apple.com
  • 27 edits in trunk

Bug 163762: IntSize::area() should used checked arithmetic
<https://webkit.org/b/163762>

Reviewed by Darin Adler.

Source/WebCore:

No new tests since no change in nominal behavior.

  • platform/graphics/IntSize.h:

(WebCore::IntSize::area): Change to return a
Checked<unsigned, T> value. Use WTF:: namespace to avoid
including another header.

  • platform/graphics/IntRect.h:

(WebCore::IntRect::area): Ditto.

The remaining changes are to use the Checked<unsigned> return
value of IntSize::area() and IntRect::area() correctly in
context, in addition to items noted below.

  • html/HTMLPlugInImageElement.cpp:

(WebCore::HTMLPlugInImageElement::isTopLevelFullPagePlugin):
Declare contentWidth and contentHeight as float values to
prevent overflow when computing the area, and to make the
inequality comparison in the return statement uses the same type
for both sides.

  • html/ImageData.cpp:

(WebCore::ImageData::ImageData):

  • html/MediaElementSession.cpp:

(WebCore::isElementRectMostlyInMainFrame):

  • platform/graphics/ImageBackingStore.h:

(WebCore::ImageBackingStore::setSize): Restructure logic to
compute area only once.
(WebCore::ImageBackingStore::clear):

  • platform/graphics/ImageFrame.h:

(WebCore::ImageFrame::frameBytes):

  • platform/graphics/ImageSource.cpp:

(WebCore::ImageSource::maximumSubsamplingLevel):

  • platform/graphics/ca/LayerPool.cpp:

(WebCore::LayerPool::backingStoreBytesForSize):

  • platform/graphics/cg/ImageDecoderCG.cpp:

(WebCore::ImageDecoder::frameBytesAtIndex):

  • platform/graphics/filters/FEGaussianBlur.cpp:

(WebCore::FEGaussianBlur::platformApplySoftware):

  • platform/graphics/filters/FilterEffect.cpp:

(WebCore::FilterEffect::asUnmultipliedImage):
(WebCore::FilterEffect::asPremultipliedImage):
(WebCore::FilterEffect::copyUnmultipliedImage):
(WebCore::FilterEffect::copyPremultipliedImage):
(WebCore::FilterEffect::createUnmultipliedImageResult):
(WebCore::FilterEffect::createPremultipliedImageResult):

  • platform/graphics/win/ImageBufferDataDirect2D.cpp:

(WebCore::ImageBufferData::getData): Update overflow check,
rename local variable to numBytes, and compute numBytes once.

  • platform/graphics/win/ImageDecoderDirect2D.cpp:

(WebCore::ImageDecoder::frameBytesAtIndex):

  • platform/image-decoders/ImageDecoder.cpp:

(WebCore::ImageDecoder::frameBytesAtIndex):

  • platform/ios/LegacyTileLayerPool.mm:

(WebCore::LegacyTileLayerPool::bytesBackingLayerWithPixelSize):

  • rendering/RenderLayerCompositor.cpp:

(WebCore::RenderLayerCompositor::requiresCompositingForCanvas):

  • rendering/shapes/Shape.cpp:

(WebCore::Shape::createRasterShape):

Source/WebKit2:

  • Shared/ShareableBitmap.cpp:

(WebKit::ShareableBitmap::create): Add overflow check and return
nullptr on overflow.
(WebKit::ShareableBitmap::createShareable): Ditto.
(WebKit::ShareableBitmap::create): Change debug assert for
adequate buffer size check into release check.

  • Shared/ShareableBitmap.h:

(WebKit::ShareableBitmap::numBytesForSize): Change to return a
Checked<unsigned, RecordOverflow> value.
(WebKit::ShareableBitmap::sizeInBytes):

  • Shared/cairo/ShareableBitmapCairo.cpp:

(WebKit::ShareableBitmap::numBytesForSize): Ditto.

  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView _takeViewSnapshot]): Call unsafeGet().

Tools:

  • TestWebKitAPI/Tests/WebCore/IntRect.cpp:

(TestWebKitAPI::TEST): Call unsafeGet().

  • TestWebKitAPI/Tests/WebCore/IntSize.cpp:

(TestWebKitAPI::TEST): Ditto.

11:14 PM Changeset in webkit [207707] by jcraig@apple.com
  • 2 edits in trunk/Tools

Unreviewed: Added Aaron Chu <aaron_chu@apple.com> to contributors list.

  • Scripts/webkitpy/common/config/contributors.json:
11:07 PM Changeset in webkit [207706] by barraclough@apple.com
  • 15 edits in trunk/Source

Source/WebCore:
WebPageProxy should not need PageActivityState
https://bugs.webkit.org/show_bug.cgi?id=163821

Reviewed by Geoff Garen.

The PageActivityState is currently plumbed back from WebCore up to the UI process, to
determine whether to enabled process suppression. However the information it contains
(whether a page load is ongoing, whether audio is playing) is already available via
other means. Remove this use of PageActivityState.

  • html/HTMLMediaElement.cpp:

(WebCore::HTMLMediaElement::mediaState):

  • Fix a bug in how we compute IsPlayingAudio - if the volume of the MediaElement is set to zero, then audio is not playing (we were already checking muted).
  • page/ChromeClient.h:
    • removed setPageActivityState
  • page/Page.cpp:

(WebCore::Page::setPageActivityState): Deleted.

  • setPageActivityState -> pageActivityStateChanged, remove call to ChromeClient
  • page/Page.h:

(WebCore::Page::pageActivityStateChanged):

  • setPageActivityState -> pageActivityStateChanged
  • page/PageThrottler.cpp:

(WebCore::PageThrottler::setActivityFlag):

  • setPageActivityState -> pageActivityStateChanged

Source/WebKit2:
[MediaStream] Dynamically generate media capture sandbox extensions
https://bugs.webkit.org/show_bug.cgi?id=154861
<rdar://problem/24909411>

Patch by Eric Carlson <eric.carlson@apple.com> on 2016-10-21
Reviewed by Tim Horton.

  • Shared/SandboxExtension.h:

(WebKit::SandboxExtension::createHandleForGenericExtension):

  • Shared/mac/SandboxExtensionMac.mm:

(WebKit::wkSandboxExtensionType): Add case for generic handle.
(WebKit::SandboxExtension::createHandleForGenericExtension): New.

  • UIProcess/UserMediaPermissionRequestManagerProxy.cpp:

(WebKit::UserMediaPermissionRequestManagerProxy::invalidateRequests): Clear the list of extensions granted.
(WebKit::UserMediaPermissionRequestManagerProxy::userMediaAccessWasGranted): Extend the web

process sandbox as necessary.

  • UIProcess/UserMediaPermissionRequestManagerProxy.h:
  • WebProcess/MediaStream/UserMediaPermissionRequestManager.cpp:

(WebKit::UserMediaPermissionRequestManager::~UserMediaPermissionRequestManager): Revoke all

sandbox extensions.

(WebKit::UserMediaPermissionRequestManager::grantUserMediaDevicesSandboxExtension): Consume

sandbox extensions.

  • WebProcess/MediaStream/UserMediaPermissionRequestManager.h:
  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::grantUserMediaDevicesSandboxExtension): Pass-through to user media manager.

  • WebProcess/WebPage/WebPage.h:
  • WebProcess/WebPage/WebPage.messages.in: Add GrantUserMediaDevicesSandboxExtension.
  • WebProcess/com.apple.WebProcess.sb.in: Add rules, defines, and a macro to allow dynamic extensions for media capture devices.
10:27 PM Changeset in webkit [207705] by Chris Dumez
  • 4 edits in trunk/Source/WebCore

[Web ID] Overload resolution is wrong if one of the types is a nullable union
https://bugs.webkit.org/show_bug.cgi?id=163816

Reviewed by Alex Christensen.

Overload resolution was wrong if one of the types was a nullable union. This
is because we never considered the union type itself, only its subtypes.
Therefore, we checked if any of the union's subtypes were nullable but we
failed to check if the union itself was nullable.

See:

No new tests, extended bindings tests.

  • bindings/scripts/CodeGeneratorJS.pm:

(GetOverloadThatMatchesIgnoringUnionSubtypes):
(GenerateOverloadedFunctionOrConstructor):

  • bindings/scripts/test/JS/JSTestObj.cpp:

(WebCore::jsTestObjPrototypeFunctionOverloadWithNullableUnion1):
(WebCore::jsTestObjPrototypeFunctionOverloadWithNullableUnion1Caller):
(WebCore::jsTestObjPrototypeFunctionOverloadWithNullableUnion2):
(WebCore::jsTestObjPrototypeFunctionOverloadWithNullableUnion2Caller):
(WebCore::jsTestObjPrototypeFunctionOverloadWithNullableUnion):
(WebCore::jsTestObjPrototypeFunctionOverloadWithOptionalUnion1):
(WebCore::jsTestObjPrototypeFunctionOverloadWithOptionalUnion1Caller):
(WebCore::jsTestObjPrototypeFunctionOverloadWithOptionalUnion2):
(WebCore::jsTestObjPrototypeFunctionOverloadWithOptionalUnion2Caller):
(WebCore::jsTestObjPrototypeFunctionOverloadWithOptionalUnion):

  • bindings/scripts/test/TestObj.idl:
8:35 PM Changeset in webkit [207704] by eric.carlson@apple.com
  • 17 edits in trunk/Source

[MediaStream] Dynamically generate media capture sandbox extensions
https://bugs.webkit.org/show_bug.cgi?id=154861
<rdar://problem/24909411>

Reviewed by Tim Horton.

Source/WebCore:

No new tests, some of these changes are covered by existing tests and some can only be tested
with physical capture devices.

  • platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm: AVSampleBufferAudioRenderer and AVSampleBufferRenderSynchronizer are now declared in AVFoundationSPI.h.
  • platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.h:
  • platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm:

(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::MediaPlayerPrivateMediaStreamAVFObjC): Initialize

AVSampleBufferRenderSynchronizer.

(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::isAvailable): Fail if AVSampleBufferRenderSynchronizer

isn't available.

(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::enqueueAudioSampleBufferFromTrack): Take a MediaSample&

instead of a PlatformSample&.

(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::enqueueVideoSampleBufferFromTrack): Ditto.
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::ensureLayer): Add the sample buffer display

later to the synchronizer.

(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::destroyLayer): Remove the sample buffer display

later from the synchronizer.

(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::play): Start the synchronizer.
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::pause): Stash the current clock time in

m_pausedTime, but leave the clock running. Pause the synchronizer.

(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::currentMediaTime): Return the clock time

when playing, m_pausedTime time when paused because we leave the clock running forever.

(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::sampleBufferUpdated):

  • platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm: AVSampleBufferAudioRenderer is now declared in AVFoundationSPI.h.
  • platform/spi/mac/AVFoundationSPI.h: Add AVSampleBufferAudioRenderer and AVSampleBufferRenderSynchronizer.

Source/WebKit2:

  • Shared/SandboxExtension.h:

(WebKit::SandboxExtension::createHandleForGenericExtension):

  • Shared/mac/SandboxExtensionMac.mm:

(WebKit::wkSandboxExtensionType): Add case for generic handle.
(WebKit::SandboxExtension::createHandleForGenericExtension): New.

  • UIProcess/UserMediaPermissionRequestManagerProxy.cpp:

(WebKit::UserMediaPermissionRequestManagerProxy::invalidateRequests): Clear the list of extensions granted.
(WebKit::UserMediaPermissionRequestManagerProxy::userMediaAccessWasGranted): Extend the web

process sandbox as necessary.

  • UIProcess/UserMediaPermissionRequestManagerProxy.h:
  • WebProcess/MediaStream/UserMediaPermissionRequestManager.cpp:

(WebKit::UserMediaPermissionRequestManager::~UserMediaPermissionRequestManager): Revoke all

sandbox extensions.

(WebKit::UserMediaPermissionRequestManager::grantUserMediaDevicesSandboxExtension): Consume

sandbox extensions.

  • WebProcess/MediaStream/UserMediaPermissionRequestManager.h:
  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::grantUserMediaDevicesSandboxExtension): Pass-through to user media manager.

  • WebProcess/WebPage/WebPage.h:
  • WebProcess/WebPage/WebPage.messages.in: Add GrantUserMediaDevicesSandboxExtension.
  • WebProcess/com.apple.WebProcess.sb.in: Add rules, defines, and a macro to allow dynamic extensions for media capture devices.
7:47 PM Changeset in webkit [207703] by rniwa@webkit.org
  • 9 edits
    16 copies
    2 moves
    8 adds
    4 deletes in trunk/LayoutTests

Update custom elements tests
https://bugs.webkit.org/show_bug.cgi?id=163815

Reviewed by Joseph Pecoraro.

LayoutTests/imported/w3c:

Re-import the custom elements as of 5078aa44879c87c38b6430670583951dbeae3025.

  • web-platform-tests/custom-elements/Document-createElement-expected.txt: Moved from from fast/custom-elements/Document-createElement.html.
  • web-platform-tests/custom-elements/Document-createElement.html: Ditto.
  • web-platform-tests/custom-elements/parser/parser-constructs-custom-element-in-document-write-expected.txt: Moved from from fast/custom-elements/parser/.
  • web-platform-tests/custom-elements/parser/parser-constructs-custom-element-in-document-write.html: Ditto.
  • web-platform-tests/custom-elements/parser/parser-constructs-custom-element-synchronously-expected.txt: Ditto.
  • web-platform-tests/custom-elements/parser/parser-constructs-custom-element-synchronously.html: Ditto.
  • web-platform-tests/custom-elements/parser/parser-constructs-custom-elements-expected.txt: Ditto.
  • web-platform-tests/custom-elements/parser/parser-constructs-custom-elements.html: Ditto.
  • web-platform-tests/custom-elements/parser/parser-fallsback-to-unknown-element-expected.txt: Ditto.
  • web-platform-tests/custom-elements/parser/parser-fallsback-to-unknown-element.html: Ditto.
  • web-platform-tests/custom-elements/parser/parser-sets-attributes-and-children-expected.txt: Ditto.
  • web-platform-tests/custom-elements/parser/parser-sets-attributes-and-children.html: Ditto.
  • web-platform-tests/custom-elements/parser/parser-uses-constructed-element-expected.txt: Ditto.
  • web-platform-tests/custom-elements/parser/parser-uses-constructed-element.html: Ditto.
  • web-platform-tests/custom-elements/parser/parser-uses-registry-of-owner-document-expected.txt: Ditto.
  • web-platform-tests/custom-elements/parser/parser-uses-registry-of-owner-document.html: Ditto.
  • web-platform-tests/custom-elements/parser/w3c-import.log: Added.
  • web-platform-tests/custom-elements/reactions/DOMTokenList-expected.txt:
  • web-platform-tests/custom-elements/reactions/DOMTokenList.html:
  • web-platform-tests/custom-elements/reactions/Document-expected.txt:
  • web-platform-tests/custom-elements/reactions/Document.html:
  • web-platform-tests/custom-elements/reactions/Range-expected.txt:
  • web-platform-tests/custom-elements/reactions/resources/reactions.js:
  • web-platform-tests/custom-elements/upgrading-expected.txt: Added.
  • web-platform-tests/custom-elements/upgrading.html: Moved from fast/custom-elements/enqueue-custom-element-upgrade-reaction.html.
  • web-platform-tests/custom-elements/upgrading/Node-cloneNode-expected.txt: Moved from fast/custom-elements/upgrading/.
  • web-platform-tests/custom-elements/upgrading/Node-cloneNode.html: Ditto.
  • web-platform-tests/custom-elements/upgrading/upgrading-parser-created-element-expected.txt: Ditto.
  • web-platform-tests/custom-elements/upgrading/upgrading-parser-created-element.html: Ditto.
  • web-platform-tests/custom-elements/upgrading/w3c-import.log: Added.
  • web-platform-tests/custom-elements/w3c-import.log:

LayoutTests:

Removed the tests that have been upstreamed and reimported from web-platform-tests.

  • fast/custom-elements/Document-createElement-expected.txt: Removed.
  • fast/custom-elements/enqueue-custom-element-upgrade-reaction-expected.txt: Removed.
  • fast/custom-elements/parser/: Removed.
  • fast/custom-elements/upgrading/: Removed.
7:17 PM Changeset in webkit [207702] by Michael Catanzaro
  • 4 edits
    7 adds in trunk/LayoutTests

Unreviewed GTK test gardening

  • platform/gtk/TestExpectations:
  • platform/gtk/svg/W3C-SVG-1.1/struct-dom-03-b-expected.txt: Added.
  • platform/gtk/svg/W3C-SVG-1.1/struct-dom-04-b-expected.txt: Added.
  • platform/gtk/svg/W3C-SVG-1.1/struct-dom-05-b-expected.txt: Added.
  • platform/gtk/svg/custom/dynamic-svg-document-creation-expected.txt:
  • platform/gtk/svg/custom/simple-text-double-shadow.txt: Added.
  • platform/gtk/svg/text/repaint-shadow-expected.txt: Added.
  • platform/gtk/svg/text/text-hkern-on-vertical-text-expected.png:
  • platform/gtk/svg/text/text-hkern-on-vertical-text-expected.txt: Added.
  • platform/gtk/svg/text/text-vkern-on-horizontal-text-expected.txt: Added.
7:17 PM WebKitGTK/Gardening/Calendar edited by Michael Catanzaro
(diff)
5:03 PM Changeset in webkit [207701] by matthew_hanson@apple.com
  • 9 edits in tags/Safari-603.1.10

Merge r207700. rdar://problem/28897179

4:55 PM Changeset in webkit [207700] by achristensen@apple.com
  • 9 edits in trunk

Unreviewed, rolling out r207582.
https://bugs.webkit.org/show_bug.cgi?id=163819

Not quite ready rdar://problem/28897179 (Requested by
alexchristensen on #webkit).

Reverted changeset:

"Re-enable URLParser for non-Safari Cocoa apps after r207321"
https://bugs.webkit.org/show_bug.cgi?id=163690
http://trac.webkit.org/changeset/207582

Patch by Commit Queue <commit-queue@webkit.org> on 2016-10-21

4:20 PM Changeset in webkit [207699] by barraclough@apple.com
  • 6 edits in trunk/Source

WebPage should take UserActivity directly for user input
https://bugs.webkit.org/show_bug.cgi?id=163813

Reviewed by Anders Carlsson.

When we receive mouse/keyboard events in a page, we want to prevent AppNap. We currently do so
via the PageThrottler. This patch is to just make the WebPage drive the UserActivity directly.

Two reasons to do so: (1) to cleanup & simplify for further refactoring. (2) The current code
isn't really achieving the desired effect. The page setting the flag in the throttler to get
the activity to be set is now a less effective way of achieving this goal, since the
PageActivityState bounces back across to the UI process & then messages back to the WebContent
process to take the UserActivity. These extra hops defeat the purpose of making sure the boost
from the initial message isn't lost.

Source/WebCore:

  • page/PageThrottler.cpp:

(WebCore::PageThrottler::PageThrottler):
(WebCore::m_userInputHysteresis): Deleted.

  • page/PageThrottler.h:

(WebCore::PageThrottler::didReceiveUserInput): Deleted.

  • removed PageActivityState::UserInputActivity, didReceiveUserInput, m_userInputHysteresis.

Source/WebKit2:

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::m_userActivityHysteresis):

  • m_userActivityHysteresis triggers updateUserActivity.

(WebKit::WebPage::setPageSuppressed):

  • setPageSuppressed starts/stops m_userActivityHysteresis.

(WebKit::WebPage::updateUserActivity):

  • update UserActivity based on state of m_userActivityHysteresis.

(WebKit::WebPage::mouseEvent):
(WebKit::WebPage::wheelEvent):
(WebKit::WebPage::keyEvent):

  • input events impulse m_userActivityHysteresis.
  • WebProcess/WebPage/WebPage.h:
4:06 PM Changeset in webkit [207698] by Wenson Hsieh
  • 15 edits
    8 adds in trunk

Support (insertFrom|deleteBy)Composition and (insert|delete)CompositionText inputTypes for InputEvents
https://bugs.webkit.org/show_bug.cgi?id=163460
<rdar://problem/28784142>

Reviewed by Darin Adler.

Source/WebCore:

Adds basic support for the composition inputTypes in the InputEvent spec. See w3.org/TR/input-events,
github.com/w3c/input-events/issues/41 and github.com/w3c/input-events/issues/42 for more details. While input
events are fired in the correct order with respect to each other, additional work will be required to ensure
that input events are fired in the correct order with respect to composition(start|update|end) events and
textInput events. This is held off until the expected ordering of events is officially defined in the spec.

Tests: fast/events/before-input-events-prevent-insert-composition.html

fast/events/before-input-events-prevent-recomposition.html
fast/events/input-events-ime-composition.html
fast/events/input-events-ime-recomposition.html

  • editing/CompositeEditCommand.cpp:

(WebCore::CompositeEditCommand::apply):

  • editing/CompositeEditCommand.h:

(WebCore::CompositeEditCommand::isBeforeInputEventCancelable):

Adds a new virtual method hook for subclasses to mark their beforeinput events as non-cancelable (see
TypingCommand::isBeforeInputEventCancelable). By default, beforeinput events are cancelable.

  • editing/EditAction.h:

Adds 4 new EditActions corresponding to the 4 composition-related inputTypes. These are:
EditActionTypingDeletePendingComposition => "deleteCompositionText"
EditActionTypingDeleteFinalComposition => "deleteByComposition"
EditActionTypingInsertPendingComposition => "insertCompositionText"
EditActionTypingInsertFinalComposition => "insertFromComposition"

  • editing/EditCommand.cpp:

(WebCore::inputTypeNameForEditingAction):

  • editing/Editor.cpp:

(WebCore::dispatchBeforeInputEvent):
(WebCore::dispatchBeforeInputEvents):
(WebCore::Editor::willApplyEditing):
(WebCore::Editor::insertTextWithoutSendingTextEvent):
(WebCore::Editor::setComposition):

In setComposition(text, mode), tweak the logic for committing a composition to always delete the selection
before inserting the final composition text. In setComposition(text, underlines, start, end), catch the case
where we're beginning to recompose an existing range in the DOM and delete the recomposed text first.

  • editing/TypingCommand.cpp:

(WebCore::editActionForTypingCommand):
(WebCore::TypingCommand::TypingCommand):
(WebCore::TypingCommand::deleteSelection):

Adds a TextCompositionType parameter so that call sites (see Editor::setComposition) can indicate what state the
edited composition is in. This allows us to differentiate between deletion of finalized composition text in
preparation of recomposing a range in the DOM, and deletion of composition text that has not yet been committed
in preparation for inserting a finalized composition into the DOM.

(WebCore::TypingCommand::deleteKeyPressed):
(WebCore::TypingCommand::forwardDeleteKeyPressed):
(WebCore::TypingCommand::insertText):
(WebCore::TypingCommand::insertLineBreak):
(WebCore::TypingCommand::insertParagraphSeparatorInQuotedContent):
(WebCore::TypingCommand::insertParagraphSeparator):
(WebCore::TypingCommand::isBeforeInputEventCancelable):
(WebCore::TypingCommand::inputEventData):
(WebCore::TypingCommand::willAddTypingToOpenCommand):

  • editing/TypingCommand.h:

Source/WebKit/mac:

Handle new EditAction types for inserting/deleting pending/final compositions.

  • WebCoreSupport/WebEditorClient.mm:

(undoNameForEditAction):

Source/WebKit2:

Handle new EditAction types for inserting/deleting pending/final compositions.

  • UIProcess/WebEditCommandProxy.cpp:

(WebKit::WebEditCommandProxy::nameForEditAction):

LayoutTests:

Adds 4 new layout tests to verify that composition events are dispatched as expected when using IME, and that
input events of type "insertFromComposition" and "deleteByComposition" can be prevented.

Also rebaselines an existing WK1 editing test (text-input-controller.html) to account for how we now delete the
existing composition text before inserting the finalized composition text in Editor::setComposition. This means
that there are a few more delegate calls than there were before (as seen in the expected output), although the
resulting behavior is still the same.

  • editing/mac/input/text-input-controller-expected.txt:
  • fast/events/before-input-events-prevent-insert-composition.html: Added.
  • fast/events/before-input-events-prevent-recomposition.html: Added.
  • fast/events/input-events-ime-composition.html: Added.
  • fast/events/input-events-ime-recomposition.html: Added.
  • platform/ios-simulator/TestExpectations:
3:38 PM Changeset in webkit [207697] by sbarati@apple.com
  • 3 edits
    1 add in trunk

SpeculativeJIT::compileTryGetById needs to pass in NeedsToSpill along both the cell speculation and untyped speculation path
https://bugs.webkit.org/show_bug.cgi?id=163622

Reviewed by Yusuke Suzuki.

JSTests:

  • stress/try-get-by-id-should-spill-registers-dfg.js: Added.

(let.f.createBuiltin):

Source/JavaScriptCore:

We were passing in DontSpill in the Untyped:child1() case, which caused us
not to spill the base register. This is obviously wrong because the
DFG's register allocator expected the base to still be in the register
that it allocated for it after the TryGetById node executed.

  • dfg/DFGSpeculativeJIT.cpp:

(JSC::DFG::SpeculativeJIT::compileTryGetById):

3:20 PM Changeset in webkit [207696] by keith_miller@apple.com
  • 10 edits in trunk

Expand Trunc in B3 to support Double to Float
https://bugs.webkit.org/show_bug.cgi?id=163809

Source/JavaScriptCore:

Reviewed by Geoffrey Garen.

This feature is useful for passing floating point arguments via registers.
Currently, ArgumentRegValue returns a the full 64-bit register. Thus, we
need a way to indicate to B3 that we only want the low 32-bits.

  • b3/B3Common.h:

(JSC::B3::isIdentical):

  • b3/B3LowerToAir.cpp:

(JSC::B3::Air::LowerToAir::lower):

  • b3/B3Opcode.h:
  • b3/B3ReduceStrength.cpp:
  • b3/B3Validate.cpp:
  • b3/B3Value.cpp:

(JSC::B3::Value::typeFor):

  • b3/testb3.cpp:

(JSC::B3::testAddFPRArgsFloat):
(JSC::B3::testCeilArgWithEffectfulDoubleConversion):
(JSC::B3::testFloorArgWithEffectfulDoubleConversion):
(JSC::B3::testDoubleProducerPhiToFloatConversionWithDoubleConsumer):
(JSC::B3::run):

Websites/webkit.org:

Update the docs to explain that Trunc now works with fleating point numbers.

Reviewed by Geoffrey Garen.

  • docs/b3/intermediate-representation.html:
2:23 PM October 2016 Meeting edited by Jon Davis
(diff)
2:19 PM October 2016 Meeting edited by Jon Davis
(diff)
2:08 PM October 2016 Meeting edited by Simon Fraser
(diff)
2:07 PM Changeset in webkit [207695] by hyatt@apple.com
  • 2 edits in trunk/Source/WebCore

[CSS Parser] Make sure shadow user agent sheets parse in UASheetMode
https://bugs.webkit.org/show_bug.cgi?id=163810

Reviewed by Dean Jackson.

  • dom/InlineStyleSheetOwner.cpp:

(WebCore::parserContextForElement):
(WebCore::makeInlineStyleSheetCacheKey):
(WebCore::InlineStyleSheetOwner::createSheet):
(WebCore::parserContextForForElement): Deleted.

2:05 PM October 2016 Meeting edited by Simon Fraser
(diff)
12:52 PM Changeset in webkit [207694] by jer.noble@apple.com
  • 16 edits in trunk/Source/WebCore

YouTube stalls when seeking beyond buffered range
https://bugs.webkit.org/show_bug.cgi?id=162813

Reviewed by Eric Carlson.

When seeking a MediaPlayerPrivateMediaSourceAVFObjC, we will first seek the AVSampleBufferRenderSynchronizer,
flush and enqueue non-displaying frames, enqueue regular frames, then begin playback. The above stall will occur
when we enqueue so many non- displaying frames that the display layer is not ready for normal ones before
playback begins. Then, when the synchronizer attempts to synchronize the enqueued audio and video renderers, the
only available samples are back at the original media time, and so it "seeks" by updating the CMTimebase back to
the original media time, causing playback to appear "stalled". The overall solution is to "flush" the contents
of the renderers before the seek, so that the synchronizer doesn't reset the currentTime, and to only restart
the synchronizer when there are visible (or audible) samples available for display.

Breaking the fix down into sections:

Don't enqueue too many non-displaying samples at once:

  • Rename SourceBufferPrivate::flushAndEnqueueNonDisplayingSamples() to SourceBufferPrivate::flush(), and no longer pass in an array of non-displaying samples.
  • Add a new virtual method to MediaSample, createNonDisplayingCopy(), used by SourceBuffer to enqueue non-displaying samples.
  • in SourceBuffer::reenqueueMediaForTime(), use that new createNonDisplayingCopy() method to enqueue non-displaying samples in the same queue as regular samples.
  • Modules/mediasource/SourceBuffer.cpp:

(WebCore::SourceBuffer::provideMediaData):
(WebCore::SourceBuffer::reenqueueMediaForTime):

  • platform/MediaSample.h:

(WebCore::MediaSample::isNonDisplaying):

  • platform/graphics/SourceBufferPrivate.h:

(WebCore::SourceBufferPrivate::flush):
(WebCore::SourceBufferPrivate::flushAndEnqueueNonDisplayingSamples): Renamed -> flush().

  • platform/graphics/avfoundation/MediaSampleAVFObjC.h:
  • platform/graphics/avfoundation/objc/MediaSampleAVFObjC.mm:

(WebCore::CMSampleBufferIsNonDisplaying):
(WebCore::MediaSampleAVFObjC::flags):
(WebCore::MediaSampleAVFObjC::createNonDisplayingCopy):

  • platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:

(WebCore::SourceBufferPrivateAVFObjC::trackDidChangeEnabled):
(WebCore::SourceBufferPrivateAVFObjC::willSeek):
(WebCore::createNonDisplayingCopy): Moved to MediaSampleAVFObjC.
(WebCore::SourceBufferPrivateAVFObjC::flushAndEnqueueNonDisplayingSamples): Renamed -> flush().

  • platform/mock/mediasource/MockBox.h:
  • platform/mock/mediasource/MockSourceBufferPrivate.cpp:

(WebCore::MockMediaSample::flags):
(WebCore::MockMediaSample::createNonDisplayingCopy):

  • platform/mock/mediasource/MockSourceBufferPrivate.h:

Don't start playing until all renderers have visible/audible samples:

  • SourceBufferPrivateAVFObjC will notify its associated MediaPlayerPrivateMediaSourceAVFObjC when it flushes and receives visible/audible samples.
  • The MediaPlayer will store audio renderers as keys to a HashMap which allows it to track which have available samples.
  • This requires changing all the places where we loop over the available renderers.
  • platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:

(WebCore::SourceBufferPrivateAVFObjC::trackDidChangeEnabled):
(WebCore::SourceBufferPrivateAVFObjC::enqueueSample):
(WebCore::SourceBufferPrivateAVFObjC::flush):
(WebCore::SourceBufferPrivateAVFObjC::willSeek):

  • platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:

(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::allRenderersHaveAvailableSamples):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::setHasAvailableVideoFrame): Deleted.

  • platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:

(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::MediaPlayerPrivateMediaSourceAVFObjC):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::setVolume):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::setMuted):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::setHasAvailableVideoFrame):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::setHasAvailableAudioSample):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::updateAllRenderersHaveAvailableSamples):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::addAudioRenderer):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::removeAudioRenderer):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::setPreservesPitch):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::seeking):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::shouldBePlaying):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::seekInternal):

  • platform/graphics/avfoundation/objc/MediaSourcePrivateAVFObjC.h:
  • platform/graphics/avfoundation/objc/MediaSourcePrivateAVFObjC.mm:

(WebCore::MediaSourcePrivateAVFObjC::willSeek):

  • platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.h:

Don't display new samples mid-seek.

  • MediaSource should clear its m_pendingSeekTime ivar, which is used whyn SourceBuffer queries whether or not a seek is pending, when instructing its SourceBuffers to seekToTime().
  • This allows SourceBuffer to decline to enqueue new samples during a MediaSource seek operation.
  • Modules/mediasource/MediaSource.cpp:

(WebCore::MediaSource::completeSeek):

12:14 PM Changeset in webkit [207693] by keith_miller@apple.com
  • 9 edits
    18 moves in trunk/Source/JavaScriptCore

Rename WASM to Wasm
https://bugs.webkit.org/show_bug.cgi?id=163796

Rubber stamped by Filip Pizlo.

  • CMakeLists.txt:
  • Configurations/ToolExecutable.xcconfig:
  • JavaScriptCore.xcodeproj/project.pbxproj:
  • llint/LLIntThunks.cpp:

(JSC::vmEntryToWasm):
(JSC::vmEntryToWASM): Deleted.

  • llint/LLIntThunks.h:
  • runtime/Executable.cpp:

(JSC::WebAssemblyExecutable::WebAssemblyExecutable):

  • runtime/Executable.h:
  • shell/CMakeLists.txt:
  • testWASM.cpp:

(runWASMTests): Deleted.

  • testWasm.cpp: Renamed from Source/JavaScriptCore/testWASM.cpp.

(CommandLine::CommandLine):
(printUsageStatement):
(CommandLine::parseArguments):
(runLEBTests):
(invoke):
(box):
(runWasmTests):
(main):

  • wasm/JSWASMModule.cpp:

(JSC::JSWASMModule::JSWASMModule): Deleted.
(JSC::JSWASMModule::destroy): Deleted.
(JSC::JSWASMModule::visitChildren): Deleted.

  • wasm/JSWASMModule.h:

(JSC::JSWASMModule::create): Deleted.
(JSC::JSWASMModule::createStructure): Deleted.
(JSC::JSWASMModule::i32Constants): Deleted.
(JSC::JSWASMModule::f32Constants): Deleted.
(JSC::JSWASMModule::f64Constants): Deleted.
(JSC::JSWASMModule::signatures): Deleted.
(JSC::JSWASMModule::functionImports): Deleted.
(JSC::JSWASMModule::functionImportSignatures): Deleted.
(JSC::JSWASMModule::globalVariableTypes): Deleted.
(JSC::JSWASMModule::functionDeclarations): Deleted.
(JSC::JSWASMModule::functionPointerTables): Deleted.
(JSC::JSWASMModule::arrayBuffer): Deleted.
(JSC::JSWASMModule::functions): Deleted.
(JSC::JSWASMModule::functionStartOffsetsInSource): Deleted.
(JSC::JSWASMModule::functionStackHeights): Deleted.
(JSC::JSWASMModule::globalVariables): Deleted.
(JSC::JSWASMModule::importedFunctions): Deleted.

  • wasm/JSWasmModule.cpp: Renamed from Source/JavaScriptCore/wasm/JSWASMModule.cpp.

(JSC::JSWasmModule::JSWasmModule):
(JSC::JSWasmModule::destroy):
(JSC::JSWasmModule::visitChildren):

  • wasm/JSWasmModule.h: Renamed from Source/JavaScriptCore/wasm/JSWASMModule.h.

(JSC::JSWasmModule::create):
(JSC::JSWasmModule::createStructure):
(JSC::JSWasmModule::i32Constants):
(JSC::JSWasmModule::f32Constants):
(JSC::JSWasmModule::f64Constants):
(JSC::JSWasmModule::signatures):
(JSC::JSWasmModule::functionImports):
(JSC::JSWasmModule::functionImportSignatures):
(JSC::JSWasmModule::globalVariableTypes):
(JSC::JSWasmModule::functionDeclarations):
(JSC::JSWasmModule::functionPointerTables):
(JSC::JSWasmModule::arrayBuffer):
(JSC::JSWasmModule::functions):
(JSC::JSWasmModule::functionStartOffsetsInSource):
(JSC::JSWasmModule::functionStackHeights):
(JSC::JSWasmModule::globalVariables):
(JSC::JSWasmModule::importedFunctions):

  • wasm/WASMB3IRGenerator.cpp:

(JSC::WASM::createJSWrapper): Deleted.
(JSC::WASM::parseAndCompile): Deleted.

  • wasm/WASMCallingConvention.cpp:

(JSC::WASM::jscCallingConvention): Deleted.
(JSC::WASM::wasmCallingConvention): Deleted.

  • wasm/WASMCallingConvention.h:

(JSC::WASM::CallingConvention::CallingConvention): Deleted.
(JSC::WASM::CallingConvention::marshallArgumentImpl): Deleted.
(JSC::WASM::CallingConvention::marshallArgument): Deleted.
(JSC::WASM::CallingConvention::loadArguments): Deleted.
(JSC::WASM::CallingConvention::setupCall): Deleted.
(JSC::WASM::nextJSCOffset): Deleted.

  • wasm/WASMFormat.h:

(JSC::WASM::toB3Type): Deleted.
(JSC::WASM::isValueType): Deleted.

  • wasm/WASMFunctionParser.h:

(JSC::WASM::FunctionParser<Context>::FunctionParser): Deleted.
(JSC::WASM::FunctionParser<Context>::parse): Deleted.
(JSC::WASM::FunctionParser<Context>::parseBlock): Deleted.
(JSC::WASM::FunctionParser<Context>::parseExpression): Deleted.
(JSC::WASM::FunctionParser<Context>::parseUnreachableExpression): Deleted.

  • wasm/WASMMemory.cpp:

(JSC::WASM::Memory::Memory): Deleted.

  • wasm/WASMMemory.h:

(JSC::WASM::Memory::~Memory): Deleted.
(JSC::WASM::Memory::memory): Deleted.
(JSC::WASM::Memory::size): Deleted.
(JSC::WASM::Memory::pinnedRegisters): Deleted.
(JSC::WASM::Memory::mode): Deleted.
(JSC::WASM::Memory::grow): Deleted.
(JSC::WASM::Memory::offsetOfSize): Deleted.

  • wasm/WASMModuleParser.cpp:

(JSC::WASM::ModuleParser::parse): Deleted.
(JSC::WASM::ModuleParser::parseMemory): Deleted.
(JSC::WASM::ModuleParser::parseFunctionTypes): Deleted.
(JSC::WASM::ModuleParser::parseFunctionSignatures): Deleted.
(JSC::WASM::ModuleParser::parseFunctionDefinitions): Deleted.

  • wasm/WASMModuleParser.h:

(JSC::WASM::ModuleParser::ModuleParser): Deleted.
(JSC::WASM::ModuleParser::functionInformation): Deleted.
(JSC::WASM::ModuleParser::memory): Deleted.

  • wasm/WASMOps.h:

(JSC::WASM::isValidOpType): Deleted.
(JSC::WASM::isControlOp): Deleted.

  • wasm/WASMParser.h:

(JSC::WASM::Parser::parseVarUInt32): Deleted.
(JSC::WASM::Parser::parseVarUInt64): Deleted.
(JSC::WASM::Parser::Parser): Deleted.
(JSC::WASM::Parser::consumeCharacter): Deleted.
(JSC::WASM::Parser::consumeString): Deleted.
(JSC::WASM::Parser::parseUInt32): Deleted.
(JSC::WASM::Parser::parseUInt7): Deleted.
(JSC::WASM::Parser::parseVarUInt1): Deleted.
(JSC::WASM::Parser::parseValueType): Deleted.

  • wasm/WASMPlan.cpp:

(JSC::WASM::Plan::Plan): Deleted.

  • wasm/WASMSections.h:

(JSC::WASM::Sections::validateOrder): Deleted.

  • wasm/WasmB3IRGenerator.cpp: Renamed from Source/JavaScriptCore/wasm/WASMB3IRGenerator.cpp.

(dumpProcedure):
(JSC::Wasm::createJSWrapper):
(JSC::Wasm::parseAndCompile):

  • wasm/WasmB3IRGenerator.h: Renamed from Source/JavaScriptCore/wasm/WASMB3IRGenerator.h.
  • wasm/WasmCallingConvention.cpp: Renamed from Source/JavaScriptCore/wasm/WASMCallingConvention.cpp.

(JSC::Wasm::jscCallingConvention):
(JSC::Wasm::wasmCallingConvention):

  • wasm/WasmCallingConvention.h: Renamed from Source/JavaScriptCore/wasm/WASMCallingConvention.h.

(JSC::Wasm::CallingConvention::CallingConvention):
(JSC::Wasm::CallingConvention::marshallArgumentImpl):
(JSC::Wasm::CallingConvention::marshallArgument):
(JSC::Wasm::CallingConvention::loadArguments):
(JSC::Wasm::CallingConvention::setupCall):
(JSC::Wasm::nextJSCOffset):

  • wasm/WasmFormat.h: Renamed from Source/JavaScriptCore/wasm/WASMFormat.h.

(JSC::Wasm::toB3Type):
(JSC::Wasm::isValueType):

  • wasm/WasmFunctionParser.h: Renamed from Source/JavaScriptCore/wasm/WASMFunctionParser.h.

(JSC::Wasm::FunctionParser<Context>::FunctionParser):
(JSC::Wasm::FunctionParser<Context>::parse):
(JSC::Wasm::FunctionParser<Context>::parseBlock):
(JSC::Wasm::FunctionParser<Context>::parseExpression):
(JSC::Wasm::FunctionParser<Context>::parseUnreachableExpression):

  • wasm/WasmMemory.cpp: Renamed from Source/JavaScriptCore/wasm/WASMMemory.cpp.

(JSC::Wasm::Memory::Memory):

  • wasm/WasmMemory.h: Renamed from Source/JavaScriptCore/wasm/WASMMemory.h.

(JSC::Wasm::Memory::~Memory):
(JSC::Wasm::Memory::memory):
(JSC::Wasm::Memory::size):
(JSC::Wasm::Memory::pinnedRegisters):
(JSC::Wasm::Memory::mode):
(JSC::Wasm::Memory::grow):
(JSC::Wasm::Memory::offsetOfSize):

  • wasm/WasmModuleParser.cpp: Renamed from Source/JavaScriptCore/wasm/WASMModuleParser.cpp.

(JSC::Wasm::ModuleParser::parse):
(JSC::Wasm::ModuleParser::parseMemory):
(JSC::Wasm::ModuleParser::parseFunctionTypes):
(JSC::Wasm::ModuleParser::parseFunctionSignatures):
(JSC::Wasm::ModuleParser::parseFunctionDefinitions):

  • wasm/WasmModuleParser.h: Renamed from Source/JavaScriptCore/wasm/WASMModuleParser.h.

(JSC::Wasm::ModuleParser::ModuleParser):
(JSC::Wasm::ModuleParser::functionInformation):
(JSC::Wasm::ModuleParser::memory):

  • wasm/WasmOps.h: Renamed from Source/JavaScriptCore/wasm/WASMOps.h.

(JSC::Wasm::isValidOpType):
(JSC::Wasm::isControlOp):

  • wasm/WasmParser.h: Renamed from Source/JavaScriptCore/wasm/WASMParser.h.

(JSC::Wasm::Parser::parseVarUInt32):
(JSC::Wasm::Parser::parseVarUInt64):
(JSC::Wasm::Parser::Parser):
(JSC::Wasm::Parser::consumeCharacter):
(JSC::Wasm::Parser::consumeString):
(JSC::Wasm::Parser::parseUInt32):
(JSC::Wasm::Parser::parseUInt7):
(JSC::Wasm::Parser::parseVarUInt1):
(JSC::Wasm::Parser::parseValueType):

  • wasm/WasmPlan.cpp: Renamed from Source/JavaScriptCore/wasm/WASMPlan.cpp.

(JSC::Wasm::Plan::Plan):

  • wasm/WasmPlan.h: Renamed from Source/JavaScriptCore/wasm/WASMPlan.h.
  • wasm/WasmSections.h: Renamed from Source/JavaScriptCore/wasm/WASMSections.h.

(JSC::Wasm::Sections::validateOrder):

12:10 PM Changeset in webkit [207692] by dino@apple.com
  • 6 edits
    2 adds in trunk

SVG should not paint selection within a mask
https://bugs.webkit.org/show_bug.cgi?id=163772
<rdar://problem/28705129>

Reviewed by Simon Fraser.

Source/WebCore:

When masking content, we shouldn't paint the text
selection as we are rendering into the masking
offscreen buffer.

Test: svg/masking/mask-should-not-paint-selection.html

  • rendering/PaintPhase.h: Add a new behavior - PaintBehaviorSkipSelectionHighlight.
  • rendering/svg/SVGInlineTextBox.cpp:

(WebCore::SVGInlineTextBox::paint): Don't update the selectionStyle if
PaintBehaviorSkipSelectionHighlight is true.

  • rendering/svg/SVGRenderingContext.cpp:

(WebCore::SVGRenderingContext::renderSubtreeToImageBuffer): Add PaintBehaviorSkipSelectionHighlight
to the PaintInfo.

LayoutTests:

  • svg/masking/mask-should-not-paint-selection-expected.html: Added.
  • svg/masking/mask-should-not-paint-selection.html: Added.
11:58 AM Changeset in webkit [207691] by Jonathan Bedard
  • 2 edits in trunk/Tools

WebKitTestRunnerApp packages .idl file
https://bugs.webkit.org/show_bug.cgi?id=163788

Reviewed by Darin Adler.

  • WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj: Removed .idl file from app package, removed bad reference to app icon.
11:53 AM Changeset in webkit [207690] by Chris Dumez
  • 4 edits in trunk/Source/WebCore

[Web IDL] MediaControlsHost has invalid operation overloads
https://bugs.webkit.org/show_bug.cgi?id=163793

Reviewed by Darin Adler.

MediaControlsHost has invalid operation overloads:

  • sortedTrackListForMenu()
  • displayNameForTrack()

The parameter is nullable for both overloads which is not valid IDL.

  • sortedTrackListForMenu(): The parameter is no longer nullable. This is a minor behavior change and it should be safe since this is Apple-specific and only called from mediaControlsApple.js which uses HTMLMediaElement.videoTracks and HTMLMediaElement.audioTracks as input, both of which are not nullable. Note that we could have also kept one of the parameters as nullable to not change behavior but allowing null does not seem useful here.
  • displayNameForTrack(): Use a union instead of overloading, no behavior change.
  • Modules/mediacontrols/MediaControlsHost.cpp:

(WebCore::MediaControlsHost::sortedTrackListForMenu):
(WebCore::MediaControlsHost::displayNameForTrack):

  • Modules/mediacontrols/MediaControlsHost.h:
  • Modules/mediacontrols/MediaControlsHost.idl:
11:45 AM Changeset in webkit [207689] by commit-queue@webkit.org
  • 21 edits in trunk/Source

Implement basic pointer lock behavior for WebKit and WebKit2.
https://bugs.webkit.org/show_bug.cgi?id=162745

Patch by Jeremy Jones <jeremyj@apple.com> on 2016-10-21
Reviewed by Simon Fraser.

Source/WebCore:

When ENABLE_POINTER_LOCK is enabled, these tests now pass with DumpRenderTree.
LayoutTests/pointer-lock/lock-already-locked.html
LayoutTests/pointer-lock/lock-element-not-in-dom.html
LayoutTests/pointer-lock/locked-element-iframe-removed-from-dom.html
LayoutTests/pointer-lock/mouse-event-api.html

Export pointer lock symbols and cancel pointer lock on "escape".

  • dom/Document.h: Export symbols.
  • dom/Element.h: Export symbols.
  • page/EventHandler.cpp:

(WebCore::EventHandler::keyEvent): Cancel pointer lock on "escape".

  • page/PointerLockController.cpp: Add missing include.
  • page/PointerLockController.h: Export symbols.

Source/WebKit/mac:

Add basic pointer lock functionality. User permission is not yet implemented.

  • WebCoreSupport/WebChromeClient.h:
  • WebCoreSupport/WebChromeClient.mm:

(WebChromeClient::requestPointerLock):
(WebChromeClient::requestPointerUnlock):

Source/WebKit2:

Enable basic pointer lock functionality by plumbing requests through WebPage IPC.
Pass through mouse movement deltas.
Unlock pointer when view is no longer visible.

  • Shared/WebEventConversion.cpp:

(WebKit::WebKit2PlatformMouseEvent::WebKit2PlatformMouseEvent): Pass along mouse movement.

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::dispatchViewStateChange): Unlock pointer when page is not visible.
(WebKit::WebPageProxy::requestPointerLock): Hide and disassociate pointer.
(WebKit::WebPageProxy::requestPointerUnlock): Show and associate pointer.

  • UIProcess/WebPageProxy.h:
  • UIProcess/WebPageProxy.messages.in: Add methods.
  • WebProcess/WebCoreSupport/WebChromeClient.cpp:

(WebKit::WebChromeClient::requestPointerLock): Pass along to web page.
(WebKit::WebChromeClient::requestPointerUnlock): Ditto.

  • WebProcess/WebCoreSupport/WebChromeClient.h:
  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::didAcquirePointerLock): Forward to PointerLockController.
(WebKit::WebPage::didNotAcquirePointerLock): Ditto.
(WebKit::WebPage::didLosePointerLock): Ditto.

  • WebProcess/WebPage/WebPage.h:
  • WebProcess/WebPage/WebPage.messages.in: Add methods.
11:37 AM Changeset in webkit [207688] by jer.noble@apple.com
  • 3 edits in trunk/Source/WebCore

WebCore::PlatformMediaSession::stopSession + 13
https://bugs.webkit.org/show_bug.cgi?id=163799

Reviewed by Eric Carlson.

Because m_sessions can be mutated by removeSession() while iterating over m_sessions, and because
PlatformMediaSessions are not refcounted, it is not enough to copy m_sessions into a copied Vector
before iterating. Instead, wrap iteration of m_sessions in a convenience function, which sets an
iteration counter which, when cleared, removes all null entries from m_session. In parallel, modify
removeSession() to check this iteration counter, and replace the session with a null value rather
than mutating the m_sessions vector itself.

  • platform/audio/PlatformMediaSessionManager.cpp:

(WebCore::PlatformMediaSessionManager::has):
(WebCore::PlatformMediaSessionManager::activeAudioSessionRequired):
(WebCore::PlatformMediaSessionManager::canProduceAudio):
(WebCore::PlatformMediaSessionManager::removeSession):
(WebCore::PlatformMediaSessionManager::sessionWillBeginPlayback):
(WebCore::PlatformMediaSessionManager::sessionWillEndPlayback):
(WebCore::PlatformMediaSessionManager::currentSessionsMatching):
(WebCore::PlatformMediaSessionManager::applicationWillEnterBackground):
(WebCore::PlatformMediaSessionManager::applicationDidEnterForeground):
(WebCore::PlatformMediaSessionManager::systemWillSleep):
(WebCore::PlatformMediaSessionManager::systemDidWake):
(WebCore::PlatformMediaSessionManager::stopAllMediaPlaybackForDocument):
(WebCore::PlatformMediaSessionManager::stopAllMediaPlaybackForProcess):
(WebCore::PlatformMediaSessionManager::forEachSession):
(WebCore::PlatformMediaSessionManager::anyOfSessions):

  • platform/audio/PlatformMediaSessionManager.h:
11:32 AM Changeset in webkit [207687] by Darin Adler
  • 38 edits in trunk/Source/WebCore

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.

11:20 AM Changeset in webkit [207686] by Antti Koivisto
  • 6 edits in trunk/Source/WebCore

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:
10:56 AM Changeset in webkit [207685] by Chris Dumez
  • 4 edits in trunk/Source/WebCore

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

  • html/canvas/WebGL2RenderingContext.cpp:

(WebCore::WebGL2RenderingContext::texSubImage3D):

  • html/canvas/WebGL2RenderingContext.h:
  • html/canvas/WebGL2RenderingContext.idl:
10:49 AM Changeset in webkit [207684] by caitp@igalia.com
  • 3 edits
    1 add in trunk

[JSC] don't crash when arguments to new Function() produce unexpected AST
https://bugs.webkit.org/show_bug.cgi?id=163748

Reviewed by Mark Lam.

JSTests:

  • stress/regress-163748.js: Added.

(assert):
(shouldThrowSyntaxError):
(GeneratorFunction):

Source/JavaScriptCore:

The ASSERT(statement); and ASSERT(funcDecl); lines are removed, replaced with blocks
to report a generic Parser error message. These lines are only possible to be reached
if the input string produced an unexpected AST, which previously could be used to crash
the process via ASSERT failure.

The node type assertions are left in the tree, as it should be impossible for a top-level
{ to produce anything other than a Block node. If the node turns out not to be a Block,
it indicates that the (C++) caller of this function (E.g in FunctionConstructor.cpp), is
doing something incorrect. Similarly, it should be impossible for the funcDecl node to
be anything other than a function declaration given the conventions of the caller of this
function.

  • runtime/CodeCache.cpp:

(JSC::CodeCache::getFunctionExecutableFromGlobalCode):

10:39 AM Changeset in webkit [207683] by Alan Bujtas
  • 3 edits
    2 adds in trunk

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.

Source/WebCore:

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):

LayoutTests:

  • fast/lists/crash-when-list-marker-is-moved-during-selection-expected.txt: Added.
  • fast/lists/crash-when-list-marker-is-moved-during-selection.html: Added.
10:23 AM Changeset in webkit [207682] by hyatt@apple.com
  • 2 edits in trunk/Source/WebCore

[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):

10:10 AM Changeset in webkit [207681] by Brent Fulgham
  • 8 edits in trunk/Source/WebCore

[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.

10:08 AM Changeset in webkit [207680] by Wenson Hsieh
  • 2 edits in trunk/Source/WebCore

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):

10:03 AM Changeset in webkit [207679] by hyatt@apple.com
  • 2 edits in trunk/Source/WebCore

[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):

10:00 AM Changeset in webkit [207678] by matthew_hanson@apple.com
  • 5 edits in trunk/Source

Versioning.

9:49 AM WikiStart edited by Jon Davis
Added 2016 WebKit Contributors Meeting (diff)
9:47 AM October 2016 Meeting created by Jon Davis
9:35 AM Changeset in webkit [207677] by hyatt@apple.com
  • 7 edits in trunk/Source/WebCore

[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:
9:14 AM Changeset in webkit [207676] by ddkilzer@apple.com
  • 2 edits in trunk/Source/WebCore

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.

9:12 AM Changeset in webkit [207675] by commit-queue@webkit.org
  • 2 edits in trunk/LayoutTests

[GTK] Unreviewed gardening: update expectations after r207664
https://bugs.webkit.org/show_bug.cgi?id=163784

Unreviewed gardening.

Patch by Miguel Gomez <magomez@igalia.com> on 2016-10-21

  • platform/gtk/TestExpectations:
9:12 AM Changeset in webkit [207674] by Chris Dumez
  • 4 edits in trunk/Source/WebCore

[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:

  • bindings/scripts/CodeGeneratorJS.pm:

(IsIDLTypeDistinguishableWithUnionForOverloadResolution):
(AreTypesDistinguishableForOverloadResolution):
(GetOverloadThatMatches):
(GenerateOverloadedFunctionOrConstructor):

  • bindings/scripts/test/JS/JSTestObj.cpp:
  • bindings/scripts/test/TestObj.idl:
9:10 AM Changeset in webkit [207673] by matthew_hanson@apple.com
  • 1 copy in tags/Safari-603.1.10

New tag.

9:09 AM Changeset in webkit [207672] by Chris Dumez
  • 9 edits in trunk

AudioNode.connect(): First parameter should not be nullable
https://bugs.webkit.org/show_bug.cgi?id=163773

Reviewed by Darin Adler.

Source/WebCore:

AudioNode.connect()'s first parameter should not be nullable:

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:

LayoutTests:

Improve test coverage.

  • webaudio/audionode-expected.txt:
  • webaudio/audionode.html:
9:02 AM Changeset in webkit [207671] by keith_miller@apple.com
  • 16 edits in trunk

Add support for WASM calls
https://bugs.webkit.org/show_bug.cgi?id=161727

Reviewed by Filip Pizlo and Michael Saboff.

JSTests:

Add members of the Call category to the WASMOps special group.

  • wasm/generate-wasmops-header.js:

Source/JavaScriptCore:

Add support for WASM calls. Since most of the work for this was already done when we added
WASM Memory, this is mostly just cleanup work. The main interesting part of this patch is
how we link calls to other WASM functions in the same module. Since a WASM callee may not
have been compiled by the time the current function has started compilation we don't know
what address we need to call to. For each callsite in the compiling function, WASM
remembers the CodeLocationCall and the target function index. Once all WASM functions are
compiled, each callsite is linked to the appropriate entrypoint.

  • testWASM.cpp:

(runWASMTests):

  • wasm/WASMB3IRGenerator.cpp:

(JSC::WASM::createJSWrapper):
(JSC::WASM::parseAndCompile):

  • wasm/WASMB3IRGenerator.h:
  • wasm/WASMCallingConvention.cpp:

(JSC::WASM::jscCallingConvention):
(JSC::WASM::wasmCallingConvention):

  • wasm/WASMCallingConvention.h:

(JSC::WASM::CallingConvention::CallingConvention):
(JSC::WASM::CallingConvention::marshallArgumentImpl):
(JSC::WASM::CallingConvention::marshallArgument):
(JSC::WASM::CallingConvention::loadArguments):
(JSC::WASM::CallingConvention::setupCall):
(JSC::WASM::CallingConvention::iterate): Deleted.

  • wasm/WASMFormat.h:
  • wasm/WASMFunctionParser.h:

(JSC::WASM::FunctionParser<Context>::FunctionParser):
(JSC::WASM::FunctionParser<Context>::parseBlock):
(JSC::WASM::FunctionParser<Context>::parseExpression):

  • wasm/WASMModuleParser.cpp:

(JSC::WASM::ModuleParser::parse):

  • wasm/WASMOps.h:
  • wasm/WASMParser.h:

(JSC::WASM::Parser::parseVarUInt32):
(JSC::WASM::Parser::parseVarUInt64):

  • wasm/WASMPlan.cpp:

(JSC::WASM::Plan::Plan):

Source/WTF:

Added a new decodeUInt64. Also, added WTF::LEBDecoder namespace.

  • wtf/LEBDecoder.h:

(WTF::LEBDecoder::decodeUInt):
(WTF::LEBDecoder::decodeUInt32):
(WTF::LEBDecoder::decodeUInt64):
(WTF::LEBDecoder::decodeInt32):
(decodeUInt32): Deleted.
(decodeInt32): Deleted.

8:51 AM Changeset in webkit [207670] by Wenson Hsieh
  • 34 edits
    3 copies
    6 adds in trunk

Implement InputEvent.getTargetRanges() for the input events spec
https://bugs.webkit.org/show_bug.cgi?id=162947
<rdar://problem/28853079>

Reviewed by Darin Adler.

Source/JavaScriptCore:

Boilerplate change to add a runtime guard for InputEvents-related IDL interfaces. See WebCore ChangeLog entry
for more details.

  • runtime/CommonIdentifiers.h:

Source/WebCore:

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:

Source/WebKit2:

Boilerplate change to add a runtime guard for InputEvents-related IDL interfaces. See WebCore ChangeLog entry
for more details.

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::updatePreferences):

LayoutTests:

Adds 3 new layout tests and tweaks some existing unit tests. See WebCore ChangeLog entry for more details.
Tests verify the result of getTargetRanges() when breaking out of a list, deleting backwards and forwards at
all text granularities, deleting selected text, and spell checking (candidate text replacement).

  • fast/events/before-input-delete-empty-list-target-ranges-expected.txt: Added.
  • fast/events/before-input-delete-empty-list-target-ranges.html: Added.
  • fast/events/before-input-delete-text-target-ranges-expected.txt: Added.
  • fast/events/before-input-delete-text-target-ranges.html: Added.
  • fast/events/before-input-events-prevent-default-in-textfield.html:
  • fast/events/before-input-replace-text-target-ranges-expected.txt: Added.
  • fast/events/before-input-replace-text-target-ranges.html: Added.
  • fast/events/input-events-fired-when-typing-expected.txt:
  • fast/events/input-events-fired-when-typing.html:
  • js/dom/global-constructors-attributes-expected.txt:
  • platform/ios-simulator/TestExpectations:
  • platform/mac-wk1/js/dom/global-constructors-attributes-expected.txt:
  • platform/mac-yosemite/js/dom/global-constructors-attributes-expected.txt:
  • platform/mac/js/dom/global-constructors-attributes-expected.txt:
8:36 AM WebKitGTK/Gardening/Calendar edited by clopez@igalia.com
(diff)
8:36 AM WebKitGTK/Gardening/Calendar edited by clopez@igalia.com
(diff)
6:36 AM Changeset in webkit [207669] by Antti Koivisto
  • 29 edits in trunk/Source

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):

6:27 AM Changeset in webkit [207668] by Csaba Osztrogonác
  • 4 edits in trunk

[EFL] REGRESSION(r207616): Build is broken due to missing libgeoclue-dev package
https://bugs.webkit.org/show_bug.cgi?id=163733

Reviewed by Gyuyoung Kim.

.:

  • Source/cmake/OptionsEfl.cmake: Expose USE_GEOCLUE2 to the build properly.

Tools:

  • efl/install-dependencies: Added geoclue-2.0 package.
5:24 AM Changeset in webkit [207667] by adam.bergkvist@ericsson.com
  • 2 edits
    1 copy
    1 delete in trunk/Source/WebCore

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):

3:26 AM Changeset in webkit [207666] by commit-queue@webkit.org
  • 6 edits in trunk/Source/WebCore

[GTK] Several tests crashing on debug bot in (anonymous namespace)::MediaPlayerPrivateGStreamerBase::repaint
https://bugs.webkit.org/show_bug.cgi?id=163511

Patch by Miguel Gomez <magomez@igalia.com> on 2016-10-21
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:
3:20 AM Changeset in webkit [207665] by adam.bergkvist@ericsson.com
  • 5 edits
    3 adds in trunk

WebRTC: [GTK] Add MediaEndpointOwr - an OpenWebRTC WebRTC backend
https://bugs.webkit.org/show_bug.cgi?id=163327

Reviewed by Philippe Normand.

.:

Add manual WebRTC test. Test features:

  • Two RTCPeerConnection instances communicate in a single browser tab.
  • Supports setting up bidirectional media with a single SDP dialog, as well as one direction at a time.
  • Strips vendor prefixes (runs in Chrome and Firefox as well)
  • Supports modern as well as legacy APIs (mainly to make the test run in Chrome)
  • ManualTests/webrtc-one-tab-p2p.html: Added.

Source/WebCore:

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.

1:17 AM Changeset in webkit [207664] by commit-queue@webkit.org
  • 2 edits
    1 delete in trunk/Tools

Unreviewed, rolling out r207609.
https://bugs.webkit.org/show_bug.cgi?id=163776

As glib bump was rollout, we need to rollout this too
(Requested by rego on #webkit).

Reverted changeset:

"[GTK] Cannot build GTK+ with CUPS 2.* versions"
https://bugs.webkit.org/show_bug.cgi?id=163591
http://trac.webkit.org/changeset/207609

1:11 AM Changeset in webkit [207663] by jfernandez@igalia.com
  • 5 edits in trunk

[css-grid] Content Alignment broken with indefinite sized grid container
https://bugs.webkit.org/show_bug.cgi?id=163724

Reviewed by Manuel Rego Casasnovas.

Source/WebCore:

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.

LayoutTests:

Added additional test cases to verify we compute properly the
available free space for content-alignment, handling correctly the
overflow when needed.

  • fast/css-grid-layout/grid-content-alignment-overflow.html:
1:04 AM Changeset in webkit [207662] by jer.noble@apple.com
  • 3 edits in trunk/LayoutTests

[mac-wk2 release] LayoutTest media/media-source/media-source-seek-detach-crash.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=163751

Reviewed by Eric Carlson.

Don't log when we receive an "error" event; this makes the test non-deterministic.

  • media/media-source/media-source-seek-detach-crash-expected.txt:
  • media/media-source/media-source-seek-detach-crash.html:
1:03 AM Changeset in webkit [207661] by jer.noble@apple.com
  • 3 edits
    2 adds in trunk

CRASH in SourceBuffer::sourceBufferPrivateDidReceiveSample + 2169
https://bugs.webkit.org/show_bug.cgi?id=163735

Reviewed by Eric Carlson.

Source/WebCore:

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):

LayoutTests:

  • media/media-source/media-source-sample-wrong-track-id-expected.txt: Added.
  • media/media-source/media-source-sample-wrong-track-id.html: Added.
Note: See TracTimeline for information about the timeline view.