Timeline



Jan 13, 2017:

11:09 PM Changeset in webkit [210764] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebInspectorUI

Web Inspector: Settings tab is restored when reopening inspector
https://bugs.webkit.org/show_bug.cgi?id=167025

Patch by Devin Rousso <Devin Rousso> on 2017-01-13
Reviewed by Matt Baker.

  • UserInterface/Base/Main.js:

(WebInspector._tabBrowserSelectedTabContentViewDidChange):
Only save the selectedTabIndex if the current tab should be saved and reloaded upon opening
the WebInspector window.

9:59 PM Changeset in webkit [210763] by commit-queue@webkit.org
  • 30 edits in trunk

Remove ENABLE(DETAILS_ELEMENT) guards
https://bugs.webkit.org/show_bug.cgi?id=167042

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2017-01-13
Reviewed by Alex Christensen.

.:

  • Source/cmake/OptionsMac.cmake:
  • Source/cmake/OptionsWin.cmake:
  • Source/cmake/WebKitFeatures.cmake:
  • Source/cmake/tools/vsprops/FeatureDefines.props:
  • Source/cmake/tools/vsprops/FeatureDefinesCairo.props:

Source/JavaScriptCore:

  • Configurations/FeatureDefines.xcconfig:

Source/WebCore:

  • Configurations/FeatureDefines.xcconfig:
  • DerivedSources.make:
  • accessibility/AccessibilityNodeObject.cpp:

(WebCore::AccessibilityNodeObject::setIsExpanded):

  • html/HTMLDetailsElement.cpp:
  • html/HTMLDetailsElement.idl:
  • html/HTMLSummaryElement.cpp:
  • html/HTMLTagNames.in:
  • html/shadow/DetailsMarkerControl.cpp:
  • rendering/RenderDetailsMarker.cpp:
  • rendering/RenderDetailsMarker.h:
  • rendering/RenderObject.h:

(WebCore::RenderObject::isDetailsMarker):

  • rendering/RenderTreeAsText.cpp:

(WebCore::RenderTreeAsText::writeRenderObject):

Source/WebKit/mac:

  • Configurations/FeatureDefines.xcconfig:

Source/WebKit2:

  • Configurations/FeatureDefines.xcconfig:

Source/WTF:

  • wtf/FeatureDefines.h:

Tools:

  • TestWebKitAPI/Configurations/FeatureDefines.xcconfig:
9:52 PM Changeset in webkit [210762] by achristensen@apple.com
  • 2 edits in trunk/Source/WebCore

Fix WinCairo build after r210753.
https://bugs.webkit.org/show_bug.cgi?id=166730

  • platform/WebGLStateTracker.h:

WTF::Function apparently needs to explicitly be differentiated from JSC::Attribute Function in PropertySlot.h.

8:04 PM Changeset in webkit [210761] by beidson@apple.com
  • 4 edits in trunk/Source/WebKit2

Crash when visiting a webpage that uses Gamepads in a new WebProcess after a previous page has used gamepads..
https://bugs.webkit.org/show_bug.cgi?id=167033

Reviewed by Alex Christensen.

  • UIProcess/Gamepad/UIGamepadProvider.cpp:

(WebKit::UIGamepadProvider::processPoolStartedUsingGamepads): Don't schedule a state update here.
(WebKit::UIGamepadProvider::processPoolStoppedUsingGamepads): Ditto.

  • UIProcess/Gamepad/UIGamepadProvider.h:
  • UIProcess/WebProcessPool.cpp:

(WebKit::WebProcessPool::startedUsingGamepads): Populate the WebProcess with initial gamepads.

7:42 PM Changeset in webkit [210760] by Brent Fulgham
  • 2 edits in trunk/Source/WebCore

Potential nullptr dereference in RenderLayer::updateLayerPosition()
https://bugs.webkit.org/show_bug.cgi?id=167036
<rdar://problem/30023019>

Reviewed by Dean Jackson.

A value was being used without nullptr checking, even though it had been checked for null a
few lines prior.

  • rendering/RenderLayer.cpp:

(WebCore::RenderLayer::updateLayerPosition): Add missing nullptr check.

7:40 PM Changeset in webkit [210759] by Nikita Vasilyev
  • 2 edits in trunk/Source/WebInspectorUI

Web Inspector: Resources disappear from the network tab when iframe gets removed from DOM
https://bugs.webkit.org/show_bug.cgi?id=166776
<rdar://problem/29909640>

Reviewed by Matt Baker.

  • UserInterface/Views/NetworkSidebarPanel.js:

(WebInspector.NetworkSidebarPanel):
Don't remove resource tree elements from Network tab when iframe gets detached from the DOM.

7:35 PM Changeset in webkit [210758] by Darin Adler
  • 166 edits
    3 deletes in trunk/Source

Remove PassRefPtr from more of "platform"
https://bugs.webkit.org/show_bug.cgi?id=166809

Reviewed by Sam Weinig.

Source/JavaScriptCore:

  • inspector/JSInjectedScriptHost.h:

(Inspector::JSInjectedScriptHost::impl): Simplified code since we don't need a
const_cast here any more.

  • runtime/PrivateName.h:

(JSC::PrivateName::uid): Ditto.

Source/WebCore:

  • CMakeLists.txt: Removed DeviceMotionClientMock.cpp.
  • Modules/encryptedmedia/legacy/LegacyCDMSessionClearKey.h:

Added now-needed include.

  • Modules/speech/SpeechSynthesisUtterance.cpp:

(WebCore::SpeechSynthesisUtterance::SpeechSynthesisUtterance):
Pass a reference instead of a pointer.

  • Modules/speech/SpeechSynthesisUtterance.h: Tweaks, msade a few things

more private and final.

  • bindings/js/JSDOMConvert.h:

(WebCore::Detail::getPtrOrRef): Removed no-longer-needed const_cast.

  • bindings/js/JSDOMWrapper.h:

(WebCore::JSDOMWrapper::wrapped): Ditto.

  • bindings/js/ScriptModuleLoader.cpp:

(WebCore::ScriptModuleLoader::~ScriptModuleLoader): Ditto.

  • css/BasicShapeFunctions.cpp:

(WebCore::convertToLengthSize): Updated for LengthSize struct.
(WebCore::convertToCenterCoordinate): Ditto.

  • css/CSSComputedStyleDeclaration.cpp:

(WebCore::createPositionListForLayer): Take a reference.
(WebCore::getBorderRadiusCornerValues): Updated for LengthSize struct.
(WebCore::getBorderRadiusCornerValue): Ditto.
(WebCore::getBorderRadiusShorthandValue): Ditto.
(WebCore::fillSizeToCSSValue): Ditto.
(WebCore::ComputedStyleExtractor::propertyValue): Updated many properties
since the layer properties now return references rather than pointers.

  • css/CSSImageGeneratorValue.cpp:

(WebCore::CSSImageGeneratorValue::CachedGeneratedImage::image): Removed
no-longer-needed const_cast.

  • css/CSSKeyframesRule.cpp:

(WebCore::CSSKeyframesRule::item): Ditto.

  • css/CSSPrimitiveValue.cpp:

(WebCore::CSSPrimitiveValue::init): Updated for LengthSize struct.

  • css/CSSStyleRule.h: Removed no-longer-needed const_cast.
  • css/CSSToStyleMap.cpp:

(WebCore::convertToLengthSize): Updated for LengthSize struct.

  • css/FontFace.cpp:

(WebCore::FontFace::family): Removed no-longer-needed const_cast.
(WebCore::FontFace::style): Ditto.
(WebCore::FontFace::weight): Ditto.
(WebCore::FontFace::unicodeRange): Ditto.
(WebCore::FontFace::variant): Ditto.
(WebCore::FontFace::featureSettings): Ditto.

  • css/LengthFunctions.cpp:

(WebCore::sizeForLengthSize): Added.
(WebCore::floatSizeForLengthSize): Updated for LengthSize struct.

  • css/LengthFunctions.h: Added sizeForLengthSize.
  • css/SVGCSSComputedStyleDeclaration.cpp:

(WebCore::paintOrder): Cut down on creation of unused objects.
We now create only what we actually use.

  • css/StyleBuilderConverter.h:

(WebCore::StyleBuilderConverter::convertRadius): Updated for
LengthSize struct.
(WebCore::StyleBuilderConverter::convertShapeValue): Pass references
when creating ShapeValue.

  • css/StyleBuilderCustom.h:

(WebCore::forwardInheritedValue): Added. This set of overloaded
functions allows us to use move semantics for some types, but copy
them when inheriting. Doing it with special cases here allows us to
resolve this without adding overloads someone might be tempted to
call outside the style builder, and without adding special cases to
the JSON file for each property.
(WebCore::StyleBuilderCustom::applyValueWebkitDashboardRegion):
Add WTFMove as needed to work with rvalue references.
(WebCore::StyleBuilderCustom::applyValueSize): Ditto.
(WebCore::StyleBuilderCustom::applyInheritTextIndent): Ditto.
(WebCore::StyleBuilderCustom::applyValueTextIndent): Ditto.
(WebCore::StyleBuilderCustom::applyInheritLineHeight): Ditto.
(WebCore::StyleBuilderCustom::applyValueLineHeight): Ditto.
(WebCore::StyleBuilderCustom::applyInheritClip): Ditto.
(WebCore::StyleBuilderCustom::applyValueClip): Ditto.

  • css/StyleResolver.cpp:

(WebCore::StyleResolver::State::cacheBorderAndBackground): Use
references instead of pointers.
(WebCore::StyleResolver::applyMatchedProperties): Ditto.
(WebCore::StyleResolver::applyProperty): Update for changes to the
custom property data in RenderStyle.

  • css/makeprop.pl: Use auto quite a bit more in the generated code.

Updated special cases for layers to expect references. Added a WTFMove
so we can get move semantics for converted values that come out in
an optional. Added call to forwardInheritedValue (see above).

  • dom/Document.cpp:

(WebCore::Document::pageSizeAndMarginsInPixels): Use auto and update
since LengthSize is a struct.

  • dom/EventPath.cpp:

(WebCore::EventPath::computePathUnclosedToTarget): Use auto.

  • dom/LiveNodeList.h:

(WebCore::LiveNodeList::ownerNode): Removed no-longer-needed const_cast.

  • dom/MessageEvent.cpp:

(WebCore::MessageEvent::source): Removed unneeded static_cast.

  • dom/Node.cpp:

(WebCore::nodeSetPreTransformedFromNodeOrStringVector): Tweaked formatting.

  • dom/Range.h:

(WebCore::Range::ownerDocument): Removed no-longer-needed const_cast.

  • dom/RegisteredEventListener.h:

(WebCore::RegisteredEventListener::callback): Ditto.

  • dom/ScriptRunner.cpp:

(WebCore::ScriptRunner::~ScriptRunner): Ditto.

  • html/HTMLCollection.h:

(WebCore::HTMLCollection::ownerNode): Ditto.

  • html/parser/HTMLStackItem.h:

(WebCore::HTMLStackItem::node): Ditto.

  • inspector/PageScriptDebugServer.cpp:

(WebCore::PageScriptDebugServer::setJavaScriptPaused): Cut down on the number
of different functions here. Also use reference rather than pointer.

  • inspector/PageScriptDebugServer.h: Updated for above change.
  • loader/HistoryController.cpp:

(WebCore::HistoryController::recursiveSetProvisionalItem): Removed
no-longer-needed const_cast.
(WebCore::HistoryController::recursiveGoToItem): Ditto.

  • page/Frame.cpp:

(WebCore::Frame::ownerRenderer): Use auto. Let the is<> function do null
checking for us.
(WebCore::Frame::frameForWidget): Take a reference rather than a pointer.

  • page/Frame.h: Updated for the above.
  • page/FrameView.cpp:

(WebCore::FrameView::invalidateRect): Use Chrome directly instead of using
HostWindow. HostWindow is an abstraction for the platform layer, and there
is no good reason to use it here.
(WebCore::FrameView::scheduleAnimation): Ditto.
(WebCore::FrameView::graphicsLayerForPlatformWidget): Updated to use reference
when calling RenderWidget::find.
(WebCore::FrameView::scrollContentsFastPath): Use Chrome instead of HostWindow.
(WebCore::FrameView::hostWindow): Use early return.
(WebCore::FrameView::updateScrollCorner): Removed unneeded call through to base
class function, which was empty.
(WebCore::FrameView::hasCustomScrollbars): Updated since the children set now
contains Ref rather than RefPtr.
(WebCore::FrameView::parentFrameView): Use early return.
(WebCore::FrameView::updateWidgetPositions): Use reference instead of pointer.

  • page/FrameView.h: Use final instead of override. Remove now-unneeded const_cast.
  • page/Page.cpp:

(WebCore::Page::pluginViews): Updated since the children set now contains
Ref rather than RefPtr.

  • page/PrintContext.cpp:

(WebCore::PrintContext::pageProperty): Updated for LengthSize struct.

  • page/animation/AnimationBase.cpp:

(WebCore::AnimationBase::fireAnimationEventsIfNeeded): Updated for changes to
the types in animation function members.
(WebCore::AnimationBase::timeToNextService): Ditto.
(WebCore::AnimationBase::progress): Ditto.
(WebCore::AnimationBase::getElapsedTime): Ditto.

  • page/animation/CSSPropertyAnimation.cpp:

(WebCore::blendFunc): Updated for LengthSize struct.
(WebCore::LengthPropertyWrapper::LengthPropertyWrapper): Updated since we now
use rvalue references and move semantics when setting length properties.

  • page/scrolling/ScrollingCoordinator.cpp:

(WebCore::ScrollingCoordinator::absoluteEventTrackingRegionsForFrame): Tweaked to
use auto, pass references.

  • platform/KeyedCoding.h: Return RefPtr instead of PassRefPtr.
  • platform/LengthBox.h: Added a constructor that moves the lengths in, rather

than always copying them.

  • platform/LengthSize.cpp:

(WebCore::operator<<): Updated since LengthSize is a struct.

  • platform/LengthSize.h: Turned LengthSize into a struct and removed all the

getter and setter code.

  • platform/PlatformSpeechSynthesis.h: Removed. Unused.
  • platform/PlatformSpeechSynthesisUtterance.cpp:

(WebCore::PlatformSpeechSynthesisUtterance::create): Return Ref rather than PassRefPtr.
(WebCore::PlatformSpeechSynthesisUtterance::PlatformSpeechSynthesisUtterance): Take
a reference. Initialize data members in class definition.

  • platform/PlatformSpeechSynthesisUtterance.h: Updated for the above.
  • platform/PlatformSpeechSynthesisVoice.cpp:

(WebCore::PlatformSpeechSynthesisVoice::create): Return Ref rather than PassRefPtr.

  • platform/PlatformSpeechSynthesisVoice.h: Updated for the above.
  • platform/ScrollView.cpp:

(WebCore::ScrollView::addChild): Take a reference rather than a PassRefPtr.
(WebCore::ScrollView::setHasScrollbarInternal): Updated for change to addChild
(WebCore::ScrollView::scrollContentsFastPath): Deleted. This was never called,
so made it pure virtual.
(WebCore::ScrollView::frameRectsChanged): Use a modern for loop.
(WebCore::ScrollView::clipRectChanged): Ditto.
(WebCore::ScrollView::updateScrollCorner): Deleted. This was empty so made it pure
virtual and changed FrameView to not call it.
(WebCore::ScrollView::setParentVisible): Use a modern for loop.
(WebCore::ScrollView::show): Ditto.
(WebCore::ScrollView::hide): Ditto.

  • platform/ScrollView.h: Changed the children set to contain Ref instead of RefPtr.

Changed functions that were never overridden to either be final or non-virtual,
Changed functions that were never called to be pure virtual.

  • platform/Theme.h:

(WebCore::Theme::minimumControlSize): Updated for LengthSize struct.

  • platform/animation/Animation.h: Changed timingFunction and trigger to return

raw pointers instead of PassRefPtr. Changed setTimingFunction and setTrigger to
take RefPtr&& and Ref&& instead of PassRefPtr. CHanged initialTimingfunction and
initialTrigger to return Ref.

  • platform/animation/AnimationList.cpp: Removed redundant check in FILL_UNSET_PROPERTY.

(WebCore::AnimationList::AnimationList): Use modern for loop, reserveInitialCapacity,
and uncheckedAppend.

  • platform/animation/AnimationList.h: Changed append to take Ref&& instead of PassRefPtr.

changed vecto to contain Ref instead of RefPtr. Added move constructor and assignment
operator.

  • platform/animation/AnimationTrigger.h:

(WebCore::AutoAnimationTrigger::clone): Return Ref instead of PassRefPtr.
(WebCore::AutoAnimationTrigger::create): Ditto.
(WebCore::AutoAnimationTrigger::clone): Ditto.
(WebCore::ScrollAnimationTrigger::create): Ditto.
(WebCore::ScrollAnimationTrigger::clone): Ditto.

  • platform/animation/TimingFunction.h:

(WebCore::LinearTimingFunction::create): Return Ref instead of PassRefPtr.
(WebCore::CubicBezierTimingFunction::create): Ditto.
(WebCore::CubicBezierTimingFunction::defaultTimingFunction): Return a reference
instead of a pointer.
(WebCore::CubicBezierTimingFunction::createReversed): Return Ref instead of PassRefPtr.
(WebCore::CubicBezierTimingFunction::clone): Ditto.
(WebCore::StepsTimingFunction::create): Ditto.
(WebCore::StepsTimingFunction::clone): Ditto.
(WebCore::SpringTimingFunction::create): Ditto.
(WebCore::SpringTimingFunction::clone): Ditto.

  • platform/audio/AudioBus.h:

(WebCore::AudioBus::channel): Removed no-longer-needed const_cast.

  • platform/cf/KeyedEncoderCF.cpp:

(WebCore::KeyedEncoderCF::finishEncoding): Return RefPtr instead of PassRefPtr.

  • platform/cf/KeyedEncoderCF.h: Use final instead of override. Made even more

private. Changed return value of finishEncoding to Ref instead of PassRefPtr.

  • platform/efl/PlatformSpeechSynthesisProviderEfl.h: Removed include of PassRefPtr.h.
  • platform/glib/KeyedEncoderGlib.cpp:

(WebCore::KeyedEncoderGlib::finishEncoding): Return RefPtr instead of PassRefPtr.

  • platform/glib/KeyedEncoderGlib.h: Use final instead of override. Made even more

private. Changed return value of finishEncoding to Ref instead of PassRefPtr.

  • platform/graphics/filters/FilterOperations.cpp:

(WebCore::outsetSizeForBlur): Simplified, removing unnecessary floating point math.
(WebCore::FilterOperations::FilterOperations): Deleted. Let the compiler generate this.
(WebCore::FilterOperations::operator=): Deleted. Let the compiler generate this.
(WebCore::FilterOperations::operator==): Streamlined.
(WebCore::FilterOperations::operationsMatch): Ditto.
(WebCore::FilterOperations::hasReferenceFilter): Ditto.
(WebCore::FilterOperations::hasOutsets): Ditto.
(WebCore::FilterOperations::outsets): Ditto.
(WebCore::FilterOperations::hasFilterThatAffectsOpacity): Ditto.
(WebCore::FilterOperations::hasFilterThatMovesPixels): Ditto.

  • platform/graphics/filters/FilterOperations.h: Updated for above changes.
  • platform/graphics/FontCache.h: Removed included of PassRefPtr.h.
  • platform/graphics/FontPlatformData.h: Tweaked formatting. Removed nesting

from #if since our formatting makes it hard to see nesting. Let the compiler
generate the default move and copy constructors and assignemnt operators except
in the USE(FREETYPE) case.

  • platform/graphics/GraphicsLayer.h:

(WebCore::AnimationValue::AnimationValue): Updated since clone now returns a Ref
rather than a RefPtr.
(WebCore::FloatAnimationValue::FloatAnimationValue): Deleted. Let the compiler
generate the copy constructor without defining it explicitly.
(WebCore::TransformAnimationValue::TransformAnimationValue): Use a modern for
loop, reserveInitialCapacity, and unchecked append. Also tell the compiler to
generate the move constructor, since the special work is only needed for the
copy constructor.
(WebCore::FilterAnimationValue::FilterAnimationValue): Ditto.
(WebCore::KeyframeValueList::KeyframeValueList): Ditto.

  • platform/graphics/LegacyCDMSession.h: Removed include of PassRefPtr.h.
  • platform/graphics/PathUtilities.cpp:

(WebCore::PathUtilities::pathWithShrinkWrappedRectsForOutline): Updated
for LengthSize struct.

  • platform/graphics/avfoundation/cf/CDMSessionAVFoundationCF.cpp:

(WebCore::CDMSessionAVFoundationCF::CDMSessionAVFoundationCF): Take a reference.
Don't bother setting m_client since we never use it.
(WebCore::CDMSessionAVFoundationCF::generateKeyRequest): Clean up code a bit
by using auto a lot more.

  • platform/graphics/avfoundation/cf/CDMSessionAVFoundationCF.h: Added include

that is now needed since it was removed from the base class. Tidied the class
up a bit, marking it final, making everything private, taking a reference, and
removing an unused data member, m_client.

  • platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:

(WebCore::MediaPlayerPrivateAVFoundationCF::createSession): Pass a reference.

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

added include of WTFString.h, now needed because of removing an unneeded
include from another header file.

  • platform/graphics/ca/GraphicsLayerCA.cpp:

(WebCore::GraphicsLayerCA::animationCanBeAccelerated): Updated since trigger
is a raw pointer now.
(WebCore::GraphicsLayerCA::timingFunctionForAnimationValue): Updated to
return a reference rather than a pointer.
(WebCore::GraphicsLayerCA::setAnimationEndpoints): Updated for the above change.
(WebCore::GraphicsLayerCA::setAnimationKeyframes): Ditto.
(WebCore::GraphicsLayerCA::setTransformAnimationEndpoints): Ditto.
(WebCore::GraphicsLayerCA::setTransformAnimationKeyframes): Ditto.
(WebCore::GraphicsLayerCA::setFilterAnimationEndpoints): Ditto.
(WebCore::GraphicsLayerCA::setFilterAnimationKeyframes): Ditto.

  • platform/graphics/ca/GraphicsLayerCA.h: Ditto.
  • platform/ios/PlatformSpeechSynthesizerIOS.mm:

(-[WebSpeechSynthesisWrapper speakUtterance:]): CHanged argument to be a
RefPtr&& instead of a PassRefPtr.

  • platform/mac/ThemeMac.mm:

(WebCore::sizeFromNSControlSize): Updated for LenghtSize struct.
(WebCore::checkboxSize): Ditto.
(WebCore::radioSize): Ditto.
(WebCore::ThemeMac::controlSize): Ditto.
(WebCore::ThemeMac::minimumControlSize): Ditto.

  • platform/mac/WidgetMac.mm:

(WebCore::Widget::setFocus): Updated to pass a reference.

  • platform/mock/DeviceMotionClientMock.cpp: Removed. Unused.
  • platform/mock/DeviceMotionClientMock.h: Removed. Unused.
  • platform/win/CursorWin.cpp:

(WebCore::createSharedCursor): Return a Ref instead of a PassRefPtr.
(WebCore::loadSharedCursor): Ditto.
(WebCore::loadCursorByName): Ditto.

  • rendering/FilterEffectRenderer.cpp:

(WebCore::FilterEffectRenderer::output): Removed a no-longer-needed const_cast.
(WebCore::FilterEffectRenderer::outputRect): Ditto.

  • rendering/ImageQualityController.cpp:

(WebCore::ImageQualityController::chooseInterpolationQuality): Tweaked formatting.

  • rendering/InlineFlowBox.cpp:

(WebCore::InlineFlowBox::paintFillLayers): Updated to take a reference. Also
used a vector to iterate the linked list in reverse order instead of recursion.
(WebCore::InlineFlowBox::paintFillLayer): Take a reference.
(WebCore::InlineFlowBox::paintMask):

  • rendering/InlineFlowBox.h: Updated for the above.
  • rendering/RenderBox.cpp:

(WebCore::RenderBox::paintRootBoxFillLayers): Use auto a bit.
(WebCore::RenderBox::getBackgroundPaintedExtent): Use reference for the layers.
(WebCore::RenderBox::backgroundIsKnownToBeOpaqueInRect): Ditto.
(WebCore::RenderBox::backgroundHasOpaqueTopLayer): Ditto.
(WebCore::RenderBox::paintMaskImages): Ditto.
(WebCore::RenderBox::maskClipRect): Ditto.
(WebCore::RenderBox::paintFillLayers): Ditto.
(WebCore::RenderBox::paintFillLayer): Ditto.
(WebCore::layersUseImage): Ditto.
(WebCore::RenderBox::repaintLayerRectsForImage): Ditto.

  • rendering/RenderBox.h: Updated for the above.
  • rendering/RenderBoxModelObject.cpp:

(WebCore::RenderBoxModelObject::paintFillLayerExtended): Use reference for
the layers.
(WebCore::RenderBoxModelObject::calculateFillTileSize): Ditto.
(WebCore::RenderBoxModelObject::calculateBackgroundImageGeometry): Ditto.
(WebCore::RenderBoxModelObject::getGeometryForBackgroundImage): Ditto.
(WebCore::RenderBoxModelObject::boxShadowShouldBeAppliedToBackground): Ditto.

  • rendering/RenderBoxModelObject.h: Updated for the above.
  • rendering/RenderElement.cpp:

(WebCore::RenderElement::~RenderElement): Use references for the layers.
(WebCore::RenderElement::adjustStyleDifference): Ditto.
(WebCore::RenderElement::updateFillImages): Ditto.
(WebCore::RenderElement::setStyle): Use RenderStyle::replace to replace the
old style with the new style, and get the old one out at the same time.
(WebCore::RenderElement::styleDidChange): Use references for the layers.
(WebCore::mustRepaintFillLayers): Ditto.
(WebCore::RenderElement::repaintAfterLayoutIfNeeded): Ditto.

  • rendering/RenderElement.h: Updated for the above.
  • rendering/RenderGrid.cpp:

(WebCore::RenderGrid::computeContentPositionAndDistributionOffset):
Refactor so we don't need so many functions in RenderStyle.

  • rendering/RenderMenuList.cpp:

(WebCore::RenderMenuList::adjustInnerStyle): Ditto.

  • rendering/RenderLayer.cpp:

(WebCore::RenderLayer::createScrollbar): Pass widget as reference to addChild.
Also did a few other tweaks and used more specific types.

  • rendering/RenderLayerBacking.cpp:

(WebCore::canCreateTiledImage): Updated since layers are references.
(WebCore::RenderLayerBacking::updateDirectlyCompositedBackgroundImage): Ditto.

  • rendering/RenderListBox.cpp:

(WebCore::RenderListBox::createScrollbar): Pass widget as reference to addChild.

  • rendering/RenderTableCell.cpp:

(WebCore::RenderTableCell::paintBackgroundsBehindCell): Updated to use
references for layers.

  • rendering/RenderTheme.cpp:

(WebCore::RenderTheme::adjustStyle): Use WTFMove to pass a LengthBox.
(WebCore::RenderTheme::isControlStyled): Updated since LengthSize is a struct,
more WTFMove, change since layers are ferences.

  • rendering/RenderThemeEfl.cpp:

(WebCore::RenderThemeEfl::adjustSizeConstraints): Update for Length and
LengthSize changes.
(WebCore::RenderThemeEfl::paintThemePart): Use reference instead of pointer.
(WebCore::RenderThemeEfl::applyPartDescriptionFallback): Update for Length and
LengthSize changes.
(WebCore::RenderThemeEfl::applyPartDescription): Ditto.
(WebCore::RenderThemeEfl::adjustCheckboxStyle): Ditto.
(WebCore::RenderThemeEfl::adjustRadioStyle): Ditto.

  • rendering/RenderThemeGtk.cpp:

(WebCore::borderRadiiFromStyle): Update for Length and LengthSize changes.

  • rendering/RenderThemeIOS.mm:

(WebCore::RenderThemeIOS::adjustCheckboxStyle): Update for Length and
LengthSize changes.
(WebCore::RenderThemeIOS::isControlStyled): Ditto.
(WebCore::RenderThemeIOS::adjustRadioStyle): Ditto.
(WebCore::RenderThemeIOS::adjustRoundBorderRadius): Ditto.
(WebCore::RenderThemeIOS::paintMenuListButtonDecorations): Ditto.
(WebCore::RenderThemeIOS::adjustSliderTrackStyle): Ditto.
(WebCore::RenderThemeIOS::adjustSliderThumbSize): Ditto.

  • rendering/RenderWidget.cpp:

(WebCore::WidgetHierarchyUpdatesSuspensionScope::moveWidgets): Use move
insteead of swap and modern for loop instead of iterators.
(WebCore::moveWidgetToParentSoon): Take a reference instead of a pointer.
(WebCore::RenderWidget::setWidget): Update for above change.
(WebCore::RenderWidget::find): Take a reference instead of a pointer.

  • rendering/RenderWidget.h: Updated for above changes.
  • rendering/TextAutoSizing.cpp:

(WebCore::TextAutoSizingValue::reset): Updated since Length is passed as
rvalue reference now.

  • rendering/mathml/MathMLStyle.cpp:

(WebCore::MathMLStyle::getMathMLStyle): Updated since mathMLStyle returns
a reference.
(WebCore::MathMLStyle::resolveMathMLStyleTree): Ditto.

  • rendering/mathml/RenderMathMLBlock.h:

(WebCore::RenderMathMLBlock::mathMLStyle): Removed no-longer needed const_cast,
changed to return a reference rather than a pointer.
(WebCore::RenderMathMLTable::mathMLStyle): Ditto.

  • rendering/mathml/RenderMathMLFraction.cpp:

(WebCore::RenderMathMLFraction::fractionParameters): Updated since mathMLStyle
returns a reference.
(WebCore::RenderMathMLFraction::stackParameters): Ditto.

  • rendering/mathml/RenderMathMLOperator.h:

(WebCore::RenderMathMLOperator::isLargeOperatorInDisplayStyle): Ditto.
(WebCore::RenderMathMLOperator::shouldMoveLimits): Ditto.

  • rendering/mathml/RenderMathMLRoot.cpp:

(WebCore::RenderMathMLRoot::verticalParameters): Ditto.

  • rendering/mathml/RenderMathMLToken.cpp:

(WebCore::RenderMathMLToken::updateMathVariantGlyph): Ditto.

  • rendering/style/BasicShapes.cpp:

(WebCore::floatSizeForLengthSize): Updated for LengthSize struct.

  • rendering/style/BorderData.h:

(WebCore::BorderData::BorderData): Ditto.
(WebCore::BorderData::hasBorderRadius): Ditto.

  • rendering/style/ContentData.cpp:

(WebCore::ContentData::clone): Updated member names.

  • rendering/style/ContentData.h: Ditto.
  • rendering/style/NinePieceImage.cpp:

(WebCore::NinePieceImage::computeSlices): Use initializer lists so we get
move optimization without requiring explicit WTFMove.

  • rendering/style/DataRef.h:

(WebCore::DataRef::DataRef): Removed no-longer needed const_cast.
(WebCore::DataRef::replace): Added. This function is like Ref::replace, and
can be used to put a new value in and get an old value out without running into
the rule Ref has about not being reused once it becomes null because of being
moved out of. This function is a lot like std::exchange.
(WebCore::DataRef::operator const T&): Added operator so we can use these
as references without any function call in read-only contexts.
(WebCore::DataRef::get): Changed to return a reference rather than pointer.
(WebCore::DataRef::access): Ditto.

  • rendering/style/KeyframeList.cpp:

(WebCore::KeyframeValue::timingFunction): Updated since timingFunction
returns a raw pointer.
(WebCore::KeyframeList::~KeyframeList): Removed unneeded call to clear,
which does things that are redundant since we are about to destroy all the
data members.
(WebCore::KeyframeList::operator==): Tweaked codign style a bit.

  • rendering/style/NinePieceImage.h: Updated most functions in this class

for the changes to DataRef.

  • rendering/style/RenderStyle.cpp: Updated nearly every function in this

class for the changes to DataRef, to eliminate the peculiar naming and use
our standard data member naming, m_memberName in a class, and memberName in a
struct or struct-like class for publicly accessible members, to pass, take,
and return more references and rvalue references, and to use modern for loops.
Other changes listed below function by function.
(WebCore::RenderStyle::defaultStyle): Use NeverDestroyed instead of allocating
on the heap.
(WebCore::RenderStyle::RenderStyle): Added a new constructor that performs
the replace operation, using a combination of DataRef::replace and std::exchange.
(WebCore::RenderStyle::replace): Added. Calls the above constructor.
(WebCore::RenderStyle::setScrollSnapType): Use SET_NESTED_VAR so we get equality
checks on this property, for the normal efficiency benefit.
(WebCore::RenderStyle::setDashboardRegion): Moved this here from the header.
(WebCore::RenderStyle::appendContent): Deleted.
(WebCore::RenderStyle::setContent): Refactored this set of functions to simplify.

  • rendering/style/RenderStyle.h: Updated most functions as mentioned above.

Also updated macros to use the do/while(0) technique. Removed the long list of
friend classes with the elaborate comments; turned out none needed friendship
despite the comments. Made more things private. Moved large functions out of the
class definition.
(WebCore::RenderStyle::getTextShadowExtent): Deleted.
(WebCore::RenderStyle::getTextShadowHorizontalExtent): Deleted.
(WebCore::RenderStyle::getTextShadowVerticalExtent): Deleted.
(WebCore::RenderStyle::aspectRatio): Deleted.
(WebCore::RenderStyle::alignContentPosition): Deleted.
(WebCore::RenderStyle::alignContentDistribution): Deleted.
(WebCore::RenderStyle::alignContentOverflowAlignment): Deleted.
(WebCore::RenderStyle::alignItemsPosition): Deleted.
(WebCore::RenderStyle::alignItemsOverflowAlignment): Deleted.
(WebCore::RenderStyle::alignSelfPosition): Deleted.
(WebCore::RenderStyle::alignSelfOverflowAlignment): Deleted.
(WebCore::RenderStyle::justifyContentPosition): Deleted.
(WebCore::RenderStyle::justifyContentDistribution): Deleted.
(WebCore::RenderStyle::justifyContentOverflowAlignment): Deleted.
(WebCore::RenderStyle::justifyItemsPosition): Deleted.
(WebCore::RenderStyle::justifyItemsOverflowAlignment): Deleted.
(WebCore::RenderStyle::justifyItemsPositionType): Deleted.
(WebCore::RenderStyle::justifySelfPosition): Deleted.
(WebCore::RenderStyle::justifySelfOverflowAlignment): Deleted.
(WebCore::RenderStyle::setAlignContentPosition): Deleted.
(WebCore::RenderStyle::setAlignContentOverflow): Deleted.
(WebCore::RenderStyle::setAlignContentDistribution): Deleted.
(WebCore::RenderStyle::setAlignItemsOverflow): Deleted.
(WebCore::RenderStyle::setAlignSelfOverflow): Deleted.
(WebCore::RenderStyle::setJustifyContentOverflow): Deleted.
(WebCore::RenderStyle::setJustifyContentDistribution): Deleted.
(WebCore::RenderStyle::setJustifyItemsPosition): Deleted.
(WebCore::RenderStyle::setJustifyItemsOverflow): Deleted.
(WebCore::RenderStyle::setJustifyItemsPositionType): Deleted.
(WebCore::RenderStyle::setJustifySelfPosition): Deleted.
(WebCore::RenderStyle::setJustifySelfOverflow): Deleted.
(WebCore::RenderStyle::noninheritedFlagsMemoryOffset): Deleted.

  • rendering/style/SVGRenderStyle.cpp: Similar changes to RenderStyle.cpp above.
  • rendering/style/SVGRenderStyle.h: Ditto.
  • rendering/style/ShapeValue.h:

(WebCore::ShapeValue::create): Take a Ref&& instead of a RefPtr.
(WebCore::ShapeValue::ShapeValue): Ditto.

  • rendering/style/StyleBackgroundData.cpp: Update data member names.
  • rendering/style/StyleBackgroundData.h: Ditto; make them public and remove the

getter functions.

  • rendering/style/StyleCachedImage.cpp:

(WebCore::StyleCachedImage::cssValue): Removed no-longer-needed const_cast.

  • rendering/style/StyleCustomPropertyData.h: Update data member names.

(WebCore::StyleCustomPropertyData::operator==): Removed unnecessary reference
count churn.
(WebCore::StyleCustomPropertyData::setCustomPropertyValue): Take an rvalue
reference.
(WebCore::StyleCustomPropertyData::getCustomPropertyValue): Deleted.
(WebCore::StyleCustomPropertyData::values): Deleted.
(WebCore::StyleCustomPropertyData::hasCustomProperty): Deleted.
(WebCore::StyleCustomPropertyData::containsVariables): Deleted.
(WebCore::StyleCustomPropertyData::setContainsVariables): Deleted.

  • rendering/style/StyleFilterData.cpp: Update data member names.
  • rendering/style/StyleFilterData.h: Ditto.
  • rendering/style/StyleFlexibleBoxData.cpp: Ditto.
  • rendering/style/StyleFlexibleBoxData.h: Ditto.
  • rendering/style/StyleGridData.cpp: Ditto.
  • rendering/style/StyleGridData.h: Ditto.
  • rendering/style/StyleGridItemData.cpp: Ditto.
  • rendering/style/StyleGridItemData.h: Ditto.
  • rendering/style/StyleGeneratedImage.cpp:

(WebCore::StyleGeneratedImage::cssValue): Removed no-longer-needed const_cast.
(WebCore::StyleGeneratedImage::imageSize): Ditto.
(WebCore::StyleGeneratedImage::image): Ditto.

  • rendering/style/StyleInheritedData.cpp: Update data member names.
  • rendering/style/StyleInheritedData.h: Ditto.
  • rendering/style/StyleRareInheritedData.cpp: Ditto.
  • rendering/style/StyleRareInheritedData.h: Ditto.
  • rendering/style/StyleMultiColData.cpp: Ditto.
  • rendering/style/StyleMultiColData.h: Ditto.
  • rendering/style/StyleRareNonInheritedData.cpp: Ditto.
  • rendering/style/StyleRareNonInheritedData.h: Ditto.
  • rendering/style/StyleTransformData.cpp: Ditto.
  • rendering/style/StyleTransformData.h: Ditto.
  • rendering/style/StyleVisualData.cpp: Ditto.
  • rendering/style/StyleVisualData.h: Ditto.
  • style/StylePendingResources.cpp:

(WebCore::Style::loadPendingResources): Update since layers are references.

Source/WebKit/mac:

  • WebCoreSupport/WebFrameLoaderClient.mm:

(NetscapePluginWidget::handleEvent): Pass a reference.

  • WebView/WebView.mm:

(-[WebView _addScrollerDashboardRegionsForFrameView:dashboardRegions:]):
Updated since the children set now contains Ref instead of RefPtr.

Source/WebKit2:

  • Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.cpp:

(IPC::ArgumentCoder<TextureMapperAnimation>::encode): Updated since timing function
returns a raw pointer.
(IPC::ArgumentCoder<TextureMapperAnimation>::decode): Updated since timing function
setters now takes an rvalue reference.

  • WebProcess/Plugins/PDF/DeprecatedPDFPlugin.mm:

(WebKit::PDFPlugin::createScrollbar): Updated since addChild now takes a reference.

Source/WTF:

  • wtf/Ref.h: Changed the template so that a const Ref<T> does not prohibit non-const

use of T. We can still use const Ref<const T> to express that. The earlier design
was intentional, but was not consistent with either actual references or with
other smart pointer classes like RefPtr. One way to see how much better this is,
is to see all the many, many cases where we have const_cast just to work around
this. I searched for those and included fixes for many in this patch.

7:17 PM Changeset in webkit [210757] by commit-queue@webkit.org
  • 4 edits in trunk

26 MotionMark performance tests failing
https://bugs.webkit.org/show_bug.cgi?id=166854

Patch by Said Abou-Hallawa <sabouhallawa@apple.com> on 2017-01-13
Reviewed by Ryosuke Niwa.
PerformanceTests:

Skip running MotionMark on WebKit perf bots.

  • Skipped:

Tools:

Unrelated change. This is the last place that we need to rename Animometer
to MotionMark.

  • Scripts/webkitpy/common/config/watchlist:
7:07 PM Changeset in webkit [210756] by Nikita Vasilyev
  • 4 edits in trunk/Source/WebInspectorUI

Web Inspector: the 'lock' icon for non-editable rules in the Style Rules sidebar lacks a tooltip
https://bugs.webkit.org/show_bug.cgi?id=166909
<rdar://problem/29959406>

Reviewed by Matt Baker.

Convert the lock icon from a pseudo-element to an 'img' element and add a title attribute.

  • Localizations/en.lproj/localizedStrings.js:
  • UserInterface/Views/CSSStyleDeclarationSection.css:

(.style-declaration-section.locked > .header > .locked-icon):
(.style-declaration-section.locked > .header::before): Deleted.

  • UserInterface/Views/CSSStyleDeclarationSection.js:

(WebInspector.CSSStyleDeclarationSection):

6:53 PM Changeset in webkit [210755] by rniwa@webkit.org
  • 23 edits in trunk/Websites/perf.webkit.org

Instrument calls to render()
https://bugs.webkit.org/show_bug.cgi?id=167037

Reviewed by Sam Weinig.

Wrap every call to render() by newly added ComponentBase.updateRendering() to instrument it.
Also, use arrow functions instead of this.render.bind or regular closures for simplicity.

Currently, we're making 5100 calls to render() while opening the summary page, and that's way too high.

  • public/v3/components/analysis-results-viewer.js:

(AnalysisResultsViewer.prototype._expandBetween):

  • public/v3/components/bar-graph-group.js:

(BarGraphGroup.prototype.updateGroupRendering): Renamed form render() as BarGraphGroup is not a component.

  • public/v3/components/base.js:

(ComponentBase.prototype.updateRendering): Added. Instruments render() call.

  • public/v3/components/chart-pane-base.js:

(ChartPaneBase.prototype.fetchAnalysisTasks):
(ChartPaneBase.prototype._mainSelectionDidZoom):
(ChartPaneBase.prototype._updateStatus):
(ChartPaneBase.prototype._requestOpeningCommitViewer):
(ChartPaneBase.prototype._keyup):
(ChartPaneBase.prototype.render):

  • public/v3/components/commit-log-viewer.js:
  • public/v3/components/customizable-test-group-form.js:

(CustomizableTestGroupForm):
(CustomizableTestGroupForm.prototype._customize):

  • public/v3/components/editable-text.js:

(EditableText.prototype._didUpdate):

  • public/v3/components/pane-selector.js:

(PaneSelector.prototype._selectedItem):

  • public/v3/components/results-table.js:

(ResultsTable.prototype.render):

  • public/v3/components/time-series-chart.js:

(TimeSeriesChart._renderEnqueuedCharts):

  • public/v3/pages/analysis-category-page.js:

(AnalysisCategoryPage.prototype.open):
(AnalysisCategoryPage.prototype.updateFromSerializedState):
(AnalysisCategoryPage.prototype.filterDidChange):
(AnalysisCategoryPage.prototype.render):

  • public/v3/pages/analysis-task-page.js:

(AnalysisTaskChartPane.prototype._updateStatus):
(AnalysisTaskPage.prototype.updateFromSerializedState):
(AnalysisTaskPage.prototype._didFetchTask):
(AnalysisTaskPage.prototype._didFetchRelatedAnalysisTasks):
(AnalysisTaskPage.prototype._didFetchMeasurement):
(AnalysisTaskPage.prototype._didFetchTestGroups):
(AnalysisTaskPage.prototype._showAllTestGroups):
(AnalysisTaskPage.prototype._didFetchAnalysisResults):
(AnalysisTaskPage.prototype.render):
(AnalysisTaskPage.prototype._renderTestGroupList.):
(AnalysisTaskPage.prototype._renderTestGroupList):
(AnalysisTaskPage.prototype._createTestGroupListItem):
(AnalysisTaskPage.prototype._showTestGroup):
(AnalysisTaskPage.prototype._didStartEditingTaskName):
(AnalysisTaskPage.prototype._updateTaskName):
(AnalysisTaskPage.prototype._updateTestGroupName):
(AnalysisTaskPage.prototype._hideCurrentTestGroup):
(AnalysisTaskPage.prototype._updateChangeType):
(AnalysisTaskPage.prototype._associateBug):
(AnalysisTaskPage.prototype._dissociateBug):
(AnalysisTaskPage.prototype._associateCommit):
(AnalysisTaskPage.prototype._dissociateCommit):
(AnalysisTaskPage.prototype._chartSelectionDidChange):
(AnalysisTaskPage.prototype._selectedRowInAnalysisResultsViewer):

  • public/v3/pages/build-request-queue-page.js:

(BuildRequestQueuePage.prototype.open.):
(BuildRequestQueuePage.prototype.open):

  • public/v3/pages/chart-pane.js:

(ChartPane.prototype.setOpenRepository):
(ChartPane.prototype._trendLineTypeDidChange):
(ChartPane.prototype._updateTrendLine):

  • public/v3/pages/charts-page.js:

(ChartsPage.prototype.updateFromSerializedState):
(ChartsPage.prototype._updateDomainsFromSerializedState):
(ChartsPage.prototype.setNumberOfDaysFromToolbar):
(ChartsPage.prototype._didMutatePaneList):
(ChartsPage.prototype.render):

  • public/v3/pages/charts-toolbar.js:

(ChartsToolbar.prototype.render):

  • public/v3/pages/create-analysis-task-page.js:

(CreateAnalysisTaskPage.prototype.updateFromSerializedState):

  • public/v3/pages/dashboard-page.js:

(DashboardPage.prototype.updateFromSerializedState):
(DashboardPage.prototype._fetchedData):

  • public/v3/pages/heading.js:

(Heading.prototype.render):

  • public/v3/pages/page-with-heading.js:

(PageWithHeading.prototype.render):

  • public/v3/pages/page.js:

(Page.prototype.open):

  • public/v3/pages/summary-page.js:

(SummaryPage.prototype.open):
(SummaryPage.prototype.this._renderQueue.push):
(SummaryPage):
(SummaryPage.prototype._renderCell):

5:32 PM Changeset in webkit [210754] by Ryan Haddad
  • 3 edits in trunk/LayoutTests

Marking inspector/worker/debugger-scripts.html as flaky on macOS.
https://trac.webkit.org/changeset/209517

Unreviewed test gardening.

  • platform/mac-wk2/TestExpectations:
  • platform/mac/TestExpectations:
5:05 PM Changeset in webkit [210753] by Chris Dumez
  • 19 edits
    3 copies
    1 add in trunk/Source

[WK2] Add diagnostic logging to measure WebGL usage
https://bugs.webkit.org/show_bug.cgi?id=166730
<rdar://problem/29883469>

Reviewed by Alex Christensen.

Add diagnostic logging to measure high performance WebGL usage. We report
at regular intervals in which WebGL state Safari is:

  • Inactive
  • ActiveInForegroundTab
  • ActiveInBackgroundTabOnly

This should give us an estimate of:

  • What % of the time is Safari using high performance graphics
  • What % of this time is only due to background tabs

Source/WebCore:

No new tests, no Web-facing behavior change.

  • WebCore.xcodeproj/project.pbxproj:
  • html/canvas/WebGLRenderingContextBase.cpp:

(WebCore::WebGLRenderingContextBase::create):
(WebCore::WebGLRenderingContextBase::WebGLRenderingContextBase):
(WebCore::WebGLRenderingContextBase::registerWithWebGLStateTracker):

  • html/canvas/WebGLRenderingContextBase.h:
  • page/DiagnosticLoggingKeys.cpp:

(WebCore::DiagnosticLoggingKeys::inactiveKey):
(WebCore::DiagnosticLoggingKeys::activeInForegroundTabKey):
(WebCore::DiagnosticLoggingKeys::activeInBackgroundTabOnlyKey):
(WebCore::DiagnosticLoggingKeys::stateKey):
(WebCore::WebCore::DiagnosticLoggingKeys::webGLKey):

  • page/DiagnosticLoggingKeys.h:
  • page/Page.cpp:

(WebCore::Page::Page):

  • page/Page.h:

(WebCore::Page::webGLStateTracker):

  • page/PageConfiguration.cpp:
  • page/PageConfiguration.h:
  • platform/WebGLStateTracker.cpp: Copied from Source/WebCore/platform/graphics/GraphicsContext3DAttributes.h.

(WebCore::WebGLStateTracker::WebGLStateTracker):
(WebCore::m_stateChangeHandler):
(WebCore::WebGLStateTracker::updateWebGLState):

  • platform/WebGLStateTracker.h: Copied from Source/WebCore/platform/graphics/GraphicsContext3DAttributes.h.
  • platform/graphics/GraphicsContext3DAttributes.h:

Source/WebKit2:

  • UIProcess/HighPerformanceGraphicsUsageSampler.cpp: Added.

(WebKit::HighPerformanceGraphicsUsageSampler::HighPerformanceGraphicsUsageSampler):
(WebKit::HighPerformanceGraphicsUsageSampler::timerFired):

  • UIProcess/HighPerformanceGraphicsUsageSampler.h: Copied from Source/WebCore/platform/graphics/GraphicsContext3DAttributes.h.
  • UIProcess/WebPageProxy.h:

(WebKit::WebPageProxy::setIsUsingHighPerformanceWebGL):
(WebKit::WebPageProxy::isUsingHighPerformanceWebGL):

  • UIProcess/WebPageProxy.messages.in:
  • UIProcess/WebProcessPool.cpp:

(WebKit::m_highPerformanceGraphicsUsageSampler):

  • UIProcess/WebProcessPool.h:
  • WebKit2.xcodeproj/project.pbxproj:
  • WebProcess/WebPage/WebPage.cpp:

(WebKit::m_userInterfaceLayoutDirection):

5:03 PM Changeset in webkit [210752] by Ryan Haddad
  • 2 edits in trunk/Source/JavaScriptCore

Unreviewed, rolling out r210735.

This change introduced LayoutTest and JSC test flakiness.

Reverted changeset:

"Reserve capacity for StringBuilder in unescape"
https://bugs.webkit.org/show_bug.cgi?id=167008
http://trac.webkit.org/changeset/210735

4:46 PM Changeset in webkit [210751] by Chris Dumez
  • 1 edit
    8 adds in trunk/LayoutTests/imported/w3c

Import innerText/ w3c web-platform-tests
https://bugs.webkit.org/show_bug.cgi?id=167024

Reviewed by Alex Christensen.

Import innerText/ w3c web-platform-tests from upstream 4b4b2eeb.

  • web-platform-tests/innerText/getter-expected.txt: Added.
  • web-platform-tests/innerText/getter-tests.js: Added.

(CSS.supports):

  • web-platform-tests/innerText/getter.html: Added.
  • web-platform-tests/innerText/setter-expected.txt: Added.
  • web-platform-tests/innerText/setter-tests.js: Added.

(string_appeared_here.forEach):

  • web-platform-tests/innerText/setter.html: Added.
  • web-platform-tests/innerText/w3c-import.log: Added.
4:36 PM Changeset in webkit [210750] by Brent Fulgham
  • 2 edits in trunk/Source/WebCore

Avoid nullptr frame dereference when scrollTo is called on a disconnected DOMWindow
https://bugs.webkit.org/show_bug.cgi?id=167030
<rdar://problem/29995070>

Reviewed by Dean Jackson.

Correct DOMWindow::scrollTo to match all other functions in the class so that the it
checks that the current frame is valid before attempting to use it.

  • page/DOMWindow.cpp:

(WebCore::DOMWindow::scrollTo):

4:16 PM Changeset in webkit [210749] by Chris Dumez
  • 4 edits
    10 adds in trunk/LayoutTests/imported/w3c

Resync domparsing/ web-platform-tests from upstream
https://bugs.webkit.org/show_bug.cgi?id=167023

Reviewed by Alex Christensen.

Resync domparsing/ web-platform-tests from upstream 4b4b2eeb.

  • web-platform-tests/domparsing/DOMParser-parseFromString-xml-doctype-expected.txt: Added.
  • web-platform-tests/domparsing/DOMParser-parseFromString-xml-doctype.html: Added.
  • web-platform-tests/domparsing/DOMParser-parseFromString-xml-expected.txt: Added.
  • web-platform-tests/domparsing/DOMParser-parseFromString-xml.html: Added.
  • web-platform-tests/domparsing/XMLSerializer-serializeToString-expected.txt: Added.
  • web-platform-tests/domparsing/XMLSerializer-serializeToString.html: Added.
  • web-platform-tests/domparsing/createContextualFragment-expected.txt:
  • web-platform-tests/domparsing/createContextualFragment.html:
  • web-platform-tests/domparsing/insert_adjacent_html-xhtml-expected.txt: Added.
  • web-platform-tests/domparsing/insert_adjacent_html-xhtml.xhtml: Added.
  • web-platform-tests/domparsing/style_attribute_html-expected.txt: Added.
  • web-platform-tests/domparsing/style_attribute_html.html: Added.
  • web-platform-tests/domparsing/w3c-import.log:
3:46 PM Changeset in webkit [210748] by jer.noble@apple.com
  • 2 edits in trunk/Source/WebCore

Use a strong reference when calling callOnMainThread to schedule events in AudioScheduledSourceNode.
https://bugs.webkit.org/show_bug.cgi?id=166983

Reviewed by Brent Fulgham.

  • Modules/webaudio/AudioScheduledSourceNode.cpp:

(WebCore::AudioScheduledSourceNode::finish):

  • Modules/webaudio/AudioScheduledSourceNode.h:
3:42 PM Changeset in webkit [210747] by jer.noble@apple.com
  • 5 edits in trunk/Source/WebCore

Protect MediaPlayer from being destroyed mid-load()
https://bugs.webkit.org/show_bug.cgi?id=166976

Reviewed by Eric Carlson.

It's possible for a message sent by MediaPlayer to HTMLMediaElement to cause
MediaPlayer to be destroyed before MediaPlayer::load() completes. We have
previously protected against this same problem in HTMLMediaElement::loadResource()
by ref'ing at the beginning of the function and deref'ing on exit. To do the
same in MediaPlayer, it must become RefCounted.

To keep the same semantics about m_client in MediaPlayer (always available without
requiring a null-check), make a new static MediaPlayerClient object which can
replace the real (HTMLMediaElement) client when the MediaPlayer is invalidated.

  • html/HTMLMediaElement.cpp:

(WebCore::HTMLMediaElement::~HTMLMediaElement):
(WebCore::HTMLMediaElement::clearMediaPlayer):
(WebCore::HTMLMediaElement::createMediaPlayer):

  • html/HTMLMediaElement.h:
  • platform/graphics/MediaPlayer.cpp:

(WebCore::nullMediaPlayerClient):
(WebCore::MediaPlayer::create):
(WebCore::MediaPlayer::MediaPlayer):
(WebCore::MediaPlayer::invalidate):
(WebCore::MediaPlayer::load):
(WebCore::MediaPlayer::loadWithNextMediaEngine):
(WebCore::MediaPlayer::inMediaDocument):
(WebCore::MediaPlayer::fullscreenMode):
(WebCore::MediaPlayer::requestedRate):
(WebCore::MediaPlayer::currentPlaybackTargetIsWirelessChanged):
(WebCore::MediaPlayer::networkStateChanged):
(WebCore::MediaPlayer::readyStateChanged):
(WebCore::MediaPlayer::volumeChanged):
(WebCore::MediaPlayer::muteChanged):
(WebCore::MediaPlayer::timeChanged):
(WebCore::MediaPlayer::sizeChanged):
(WebCore::MediaPlayer::repaint):
(WebCore::MediaPlayer::durationChanged):
(WebCore::MediaPlayer::rateChanged):
(WebCore::MediaPlayer::playbackStateChanged):
(WebCore::MediaPlayer::firstVideoFrameAvailable):
(WebCore::MediaPlayer::characteristicChanged):
(WebCore::MediaPlayer::cachedKeyForKeyId):
(WebCore::MediaPlayer::keyNeeded):
(WebCore::MediaPlayer::mediaKeysStorageDirectory):
(WebCore::MediaPlayer::referrer):
(WebCore::MediaPlayer::userAgent):
(WebCore::MediaPlayer::graphicsDeviceAdapter):
(WebCore::MediaPlayer::cachedResourceLoader):
(WebCore::MediaPlayer::createResourceLoader):
(WebCore::MediaPlayer::addAudioTrack):
(WebCore::MediaPlayer::removeAudioTrack):
(WebCore::MediaPlayer::addTextTrack):
(WebCore::MediaPlayer::removeTextTrack):
(WebCore::MediaPlayer::addVideoTrack):
(WebCore::MediaPlayer::removeVideoTrack):
(WebCore::MediaPlayer::outOfBandTrackSources):
(WebCore::MediaPlayer::shouldWaitForResponseToAuthenticationChallenge):
(WebCore::MediaPlayer::handlePlaybackCommand):
(WebCore::MediaPlayer::sourceApplicationIdentifier):
(WebCore::MediaPlayer::preferredAudioCharacteristics):
(WebCore::MediaPlayer::doesHaveAttribute):
(WebCore::MediaPlayer::mediaPlayerNetworkInterfaceName):
(WebCore::MediaPlayer::getRawCookies):
(WebCore::MediaPlayer::shouldDisableSleep):

  • platform/graphics/MediaPlayer.h:

(WebCore::MediaPlayer::platformVolumeConfigurationRequired):
(WebCore::MediaPlayer::client):

3:39 PM Changeset in webkit [210746] by ggaren@apple.com
  • 12 edits
    2 adds in trunk/Source/bmalloc

bmalloc: Use a separate zone when using system malloc
https://bugs.webkit.org/show_bug.cgi?id=167014

Reviewed by Filip Pizlo.

Harris asked for this so he could separate Safari and WebKit memory use
when doing memory analysis.

This patch adds an explicit DebugHeap class that contains all our
code for specialized allocation with debugging.

  • bmalloc.xcodeproj/project.pbxproj:
  • bmalloc/Allocator.cpp:

(bmalloc::Allocator::Allocator):
(bmalloc::Allocator::tryAllocate):
(bmalloc::Allocator::allocateImpl):
(bmalloc::Allocator::reallocate):
(bmalloc::Allocator::allocateSlowCase):

  • bmalloc/Allocator.h: Forward to DebugHeap instead of inlining all the

code. This is required for our new interface, and it is also a nice
simplification that moves some not-very-important code out of the way.

  • bmalloc/Deallocator.cpp:

(bmalloc::Deallocator::Deallocator):
(bmalloc::Deallocator::scavenge):
(bmalloc::Deallocator::deallocateSlowCase):

  • bmalloc/Deallocator.h: Ditto.
  • bmalloc/DebugHeap.cpp: Added.

(bmalloc::DebugHeap::DebugHeap):
(bmalloc::DebugHeap::malloc):
(bmalloc::DebugHeap::memalign):
(bmalloc::DebugHeap::realloc):
(bmalloc::DebugHeap::free):

  • bmalloc/DebugHeap.h: Added. New class for overriding normal heap

behavior. Right now, it just adds a malloc zone and then forwards to
system malloc -- but we can add lots more kinds of debug heaps in the
future if we find them useful.

  • bmalloc/Environment.cpp:

(bmalloc::Environment::Environment):
(bmalloc::Environment::computeIsDebugHeapEnabled):
(bmalloc::Environment::computeIsBmallocEnabled): Deleted.

  • bmalloc/Environment.h:

(bmalloc::Environment::isDebugHeapEnabled):
(bmalloc::Environment::isBmallocEnabled): Deleted. Renamed everything to
reflect our new use of DebugHeap.

  • bmalloc/Heap.cpp:

(bmalloc::Heap::Heap):

  • bmalloc/Heap.h:

(bmalloc::Heap::debugHeap): Updated to use DebugHeap.
(bmalloc::Heap::environment): Deleted.

  • bmalloc/bmalloc.h:

(bmalloc::api::isEnabled): Updated to use DebugHeap.

3:30 PM Changeset in webkit [210745] by sbarati@apple.com
  • 5 edits in trunk/Source/JavaScriptCore

Initialize the ArraySpecies watchpoint as Clear and transition to IsWatched once slice is called for the first time
https://bugs.webkit.org/show_bug.cgi?id=167017
<rdar://problem/30019309>

Reviewed by Keith Miller and Filip Pizlo.

This patch is to reverse the JSBench regression from r210695.

The new state diagram for the array species watchpoint is as
follows:

  1. On GlobalObject construction, it starts life out as ClearWatchpoint.
  2. When slice is called for the first time, we observe the state

of the world, and either transition it to IsWatched if we were able
to set up the object property conditions, or to IsInvalidated if we
were not.

  1. The DFG compiler will now only lower slice as an intrinsic if

it observed the speciesWatchpoint.state() as IsWatched.

  1. The IsWatched => IsInvalidated transition happens only when

one of the object property condition watchpoints fire.

  • dfg/DFGByteCodeParser.cpp:

(JSC::DFG::ByteCodeParser::handleIntrinsicCall):

  • runtime/ArrayPrototype.cpp:

(JSC::speciesWatchpointIsValid):
(JSC::speciesConstructArray):
(JSC::arrayProtoPrivateFuncConcatMemcpy):
(JSC::ArrayPrototype::tryInitializeSpeciesWatchpoint):
(JSC::ArrayPrototype::initializeSpeciesWatchpoint): Deleted.

  • runtime/ArrayPrototype.h:
  • runtime/JSGlobalObject.cpp:

(JSC::JSGlobalObject::JSGlobalObject):
(JSC::JSGlobalObject::init):

3:02 PM Changeset in webkit [210744] by matthew_hanson@apple.com
  • 5 edits in branches/safari-603-branch/Source

Versioning.

3:01 PM Changeset in webkit [210743] by matthew_hanson@apple.com
  • 1 copy in tags/Safari-603.1.20

New tag.

1:27 PM Changeset in webkit [210742] by eric.carlson@apple.com
  • 12 edits
    1 copy
    3 adds in trunk

[MediaStream, Mac] Add mock audio source
https://bugs.webkit.org/show_bug.cgi?id=166974

Reviewed by Jer Noble.
Source/WebCore:

Add a mock audio source for testing media streams.

No new tests, updated webaudio/mediastreamaudiosourcenode.html.

  • WebCore.xcodeproj/project.pbxproj:
  • platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm:

(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::enqueueAudioSample):
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::enqueueVideoSample):

  • platform/mediastream/mac/AVAudioCaptureSource.h:

(WebCore::AVAudioCaptureSource::Observer::~Observer): Deleted.

  • platform/mediastream/mac/AVAudioCaptureSource.mm:

(WebCore::AVAudioCaptureSource::addObserver):
(WebCore::AVAudioCaptureSource::removeObserver):
(WebCore::AVAudioCaptureSource::start):

  • platform/mediastream/mac/MockRealtimeAudioSourceMac.h: Added.
  • platform/mediastream/mac/MockRealtimeAudioSourceMac.mm: Added.

(WebCore::MockRealtimeAudioSource::create):
(WebCore::MockRealtimeAudioSourceMac::MockRealtimeAudioSourceMac):
(WebCore::MockRealtimeAudioSource::createMuted):
(WebCore::MockRealtimeAudioSourceMac::addObserver):
(WebCore::MockRealtimeAudioSourceMac::removeObserver):
(WebCore::MockRealtimeAudioSourceMac::start):
(WebCore::MockRealtimeAudioSourceMac::emitSampleBuffers):
(WebCore::MockRealtimeAudioSourceMac::reconfigure):
(WebCore::MockRealtimeAudioSourceMac::render):
(WebCore::MockRealtimeAudioSourceMac::applySampleRate):
(WebCore::MockRealtimeAudioSourceMac::audioSourceProvider):

  • platform/mediastream/mac/WebAudioSourceProviderAVFObjC.h:
  • platform/mediastream/mac/WebAudioSourceProviderAVFObjC.mm:

(WebCore::WebAudioSourceProviderAVFObjC::create):
(WebCore::WebAudioSourceProviderAVFObjC::WebAudioSourceProviderAVFObjC):
(WebCore::WebAudioSourceProviderAVFObjC::~WebAudioSourceProviderAVFObjC):
(WebCore::WebAudioSourceProviderAVFObjC::provideInput):
(WebCore::WebAudioSourceProviderAVFObjC::setClient):
(WebCore::WebAudioSourceProviderAVFObjC::startProducingData): Deleted.
(WebCore::WebAudioSourceProviderAVFObjC::stopProducingData): Deleted.

  • platform/mock/MockRealtimeAudioSource.cpp:

(WebCore::MockRealtimeAudioSource::MockRealtimeAudioSource):
(WebCore::MockRealtimeAudioSource::startProducingData):
(WebCore::MockRealtimeAudioSource::stopProducingData):
(WebCore::MockRealtimeAudioSource::elapsedTime):
(WebCore::MockRealtimeAudioSource::tick):

  • platform/mock/MockRealtimeAudioSource.h:

(WebCore::MockRealtimeAudioSource::render):
(WebCore::MockRealtimeAudioSource::renderInterval):
(WebCore::MockRealtimeAudioSource::~MockRealtimeAudioSource): Deleted.

LayoutTests:

  • webaudio/mediastreamaudiosourcenode-expected.txt:
  • webaudio/mediastreamaudiosourcenode.html:
1:19 PM Changeset in webkit [210741] by weinig@apple.com
  • 22 edits
    2 deletes in trunk

[WebIDL] Remove custom bindings for DeviceMotionEvent and DeviceOrientationEvent
https://bugs.webkit.org/show_bug.cgi?id=167006

Reviewed by Geoffrey Garen.

Source/WebCore:

  • CMakeLists.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • bindings/js/JSBindingsAllInOne.cpp:
  • bindings/js/JSDeviceMotionEventCustom.cpp: Removed.
  • bindings/js/JSDeviceOrientationEventCustom.cpp: Removed.

Remove Custom bindings files.

  • dom/DeviceMotionData.cpp:

(WebCore::DeviceMotionData::create):
(WebCore::DeviceMotionData::DeviceMotionData):
(WebCore::DeviceMotionData::Acceleration::create): Deleted.
(WebCore::DeviceMotionData::Acceleration::Acceleration): Deleted.
(WebCore::DeviceMotionData::RotationRate::create): Deleted.
(WebCore::DeviceMotionData::RotationRate::RotationRate): Deleted.

  • dom/DeviceMotionData.h:

(WebCore::DeviceMotionData::Acceleration::create):
(WebCore::DeviceMotionData::Acceleration::x):
(WebCore::DeviceMotionData::Acceleration::y):
(WebCore::DeviceMotionData::Acceleration::z):
(WebCore::DeviceMotionData::Acceleration::Acceleration):
(WebCore::DeviceMotionData::RotationRate::create):
(WebCore::DeviceMotionData::RotationRate::alpha):
(WebCore::DeviceMotionData::RotationRate::beta):
(WebCore::DeviceMotionData::RotationRate::gamma):
(WebCore::DeviceMotionData::RotationRate::RotationRate):
(WebCore::DeviceMotionData::interval):
(WebCore::DeviceMotionData::Acceleration::canProvideX): Deleted.
(WebCore::DeviceMotionData::Acceleration::canProvideY): Deleted.
(WebCore::DeviceMotionData::Acceleration::canProvideZ): Deleted.
(WebCore::DeviceMotionData::RotationRate::canProvideAlpha): Deleted.
(WebCore::DeviceMotionData::RotationRate::canProvideBeta): Deleted.
(WebCore::DeviceMotionData::RotationRate::canProvideGamma): Deleted.
(WebCore::DeviceMotionData::canProvideInterval): Deleted.
Re-work using std::optional rather than an explicit bool/value pair.

  • dom/DeviceMotionEvent.cpp:

(WebCore::convert):
(WebCore::DeviceMotionEvent::acceleration):
(WebCore::DeviceMotionEvent::accelerationIncludingGravity):
(WebCore::DeviceMotionEvent::rotationRate):
(WebCore::DeviceMotionEvent::interval):
(WebCore::DeviceMotionEvent::initDeviceMotionEvent):

  • dom/DeviceMotionEvent.h:

Implement IDL interface. For now, we have duplicate structs for
Acceleration and RotationRate (one here, one in DeviceMotionData)
which can be consolidated in the future.

  • dom/DeviceMotionEvent.idl:

Add dictionaries for Acceleration and RotationRate, and update IDL to
specify the correct nullability of attributes and arguments.

  • dom/DeviceOrientationData.cpp:

(WebCore::DeviceOrientationData::create):
(WebCore::DeviceOrientationData::DeviceOrientationData):
(WebCore::DeviceOrientationData::alpha): Deleted.
(WebCore::DeviceOrientationData::beta): Deleted.
(WebCore::DeviceOrientationData::gamma): Deleted.
(WebCore::DeviceOrientationData::absolute): Deleted.
(WebCore::DeviceOrientationData::canProvideAlpha): Deleted.
(WebCore::DeviceOrientationData::canProvideBeta): Deleted.
(WebCore::DeviceOrientationData::canProvideGamma): Deleted.
(WebCore::DeviceOrientationData::compassHeading): Deleted.
(WebCore::DeviceOrientationData::compassAccuracy): Deleted.
(WebCore::DeviceOrientationData::canProvideCompassHeading): Deleted.
(WebCore::DeviceOrientationData::canProvideCompassAccuracy): Deleted.
(WebCore::DeviceOrientationData::canProvideAbsolute): Deleted.

  • dom/DeviceOrientationData.h:

(WebCore::DeviceOrientationData::create):
(WebCore::DeviceOrientationData::alpha):
(WebCore::DeviceOrientationData::beta):
(WebCore::DeviceOrientationData::gamma):
(WebCore::DeviceOrientationData::compassHeading):
(WebCore::DeviceOrientationData::compassAccuracy):
(WebCore::DeviceOrientationData::absolute):
Re-work using std::optional rather than an explicit bool/value pair.

  • dom/DeviceOrientationEvent.cpp:

(WebCore::DeviceOrientationEvent::alpha):
(WebCore::DeviceOrientationEvent::beta):
(WebCore::DeviceOrientationEvent::gamma):
(WebCore::DeviceOrientationEvent::compassHeading):
(WebCore::DeviceOrientationEvent::compassAccuracy):
(WebCore::DeviceOrientationEvent::initDeviceOrientationEvent):
(WebCore::DeviceOrientationEvent::absolute):

  • dom/DeviceOrientationEvent.h:

Implement IDL interface.

  • dom/DeviceOrientationEvent.idl:

Update IDL to specify the correct nullability of attributes and arguments.

  • platform/ios/DeviceMotionClientIOS.mm:

(WebCore::DeviceMotionClientIOS::motionChanged):

  • platform/ios/DeviceOrientationClientIOS.mm:

(WebCore::DeviceOrientationClientIOS::orientationChanged):
Update for use of std:optional.

Source/WebKit/mac:

  • WebView/WebDeviceOrientation.mm:

(convert):
(-[WebDeviceOrientation initWithCanProvideAlpha:alpha:canProvideBeta:beta:canProvideGamma:gamma:]):
Update for new use of std::optional.

LayoutTests:

  • fast/dom/DeviceMotion/optional-event-properties-expected.txt:
  • fast/dom/DeviceMotion/script-tests/optional-event-properties.js:

Update test to account for slightly stricter, but more consistent IDL conversion rules.

12:53 PM Changeset in webkit [210740] by zandobersek@gmail.com
  • 4 edits in trunk/Source/WebCore

[GStreamer] Cache the accelerated capability of MediaPlayerClient in MediaPlayerPrivateGStreamerBase
https://bugs.webkit.org/show_bug.cgi?id=167015

Reviewed by Jer Noble.

In MediaPlayerPrivateGStreamerBase, avoid continuously querying the MediaPlayerClient
object about the accelerated compositing capabilities. Instead, cache this information
when creating the video sink (which is most affected by this information anyway), storing
it in a new protected boolean member variable in the MediaPlayerPrivateGStreamerBase class.

All calls to MediaPlayerClient::mediaPlayerRenderingCanBeAccelerated() and
MediaPlayerClient::mediaPlayerAcceleratedCompositingEnabled() are replaced by tests
on the value of this new member variable.

  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:

(WebCore::MediaPlayerPrivateGStreamer::createGSTPlayBin):

  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:

(WebCore::MediaPlayerPrivateGStreamerBase::naturalSize):
(WebCore::MediaPlayerPrivateGStreamerBase::repaint):
(WebCore::MediaPlayerPrivateGStreamerBase::triggerRepaint):
(WebCore::MediaPlayerPrivateGStreamerBase::paint):
(WebCore::MediaPlayerPrivateGStreamerBase::createVideoSink):

  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h:
11:18 AM Changeset in webkit [210739] by matthew_hanson@apple.com
  • 12 edits in branches/safari-603-branch/Source/WebKit2

Roll out r209189 via r210726. rdar://problem/29428877

11:18 AM Changeset in webkit [210738] by matthew_hanson@apple.com
  • 9 edits in branches/safari-603-branch/Source/JavaScriptCore

Merge r210694. rdar://problem/29983526

11:16 AM Changeset in webkit [210737] by commit-queue@webkit.org
  • 7 edits in trunk/Source/WebKit2

Defer use of autoplay heuristics to clients
https://bugs.webkit.org/show_bug.cgi?id=167010

Patch by Matt Rajca <mrajca@apple.com> on 2017-01-13
Reviewed by Alex Christensen.

Switch the autoplay policy tristate to an on/off option since clients should run any
heuristics and simply send their final decision to WebKit.

  • Shared/WebsitePolicies.h:

(WebKit::WebsitePolicies::encode):
(WebKit::WebsitePolicies::decode):

  • UIProcess/API/APIWebsitePolicies.h:
  • UIProcess/API/C/WKWebsitePolicies.cpp:

(WKWebsitePoliciesGetAutoplayEnabled):
(WKWebsitePoliciesSetAutoplayEnabled):
(WKWebsitePoliciesGetAutoplayPolicy): Replaced.
(WKWebsitePoliciesSetAutoplayPolicy): Replaced.

  • UIProcess/API/C/WKWebsitePolicies.h:
  • UIProcess/API/Cocoa/_WKWebsitePolicies.h:
  • UIProcess/API/Cocoa/_WKWebsitePolicies.mm:

(-[_WKWebsitePolicies setAutoplayEnabled:]):
(-[_WKWebsitePolicies autoplayEnabled]):
(-[_WKWebsitePolicies setAutoplayPolicy:]): Replaced.
(-[_WKWebsitePolicies autoplayPolicy]): Replaced.

11:00 AM Changeset in webkit [210736] by Yusuke Suzuki
  • 2 edits in trunk/Tools

run-jsc-benchmarks' echo should have -e option
https://bugs.webkit.org/show_bug.cgi?id=167009

Reviewed by Sam Weinig.

echo requires -e option to use escape sequence.
Without it, in some environment (in my Fedora 25), the escape sequence is not
recognized and just dumped as \c etc.

  • Scripts/run-jsc-benchmarks:
10:30 AM Changeset in webkit [210735] by Yusuke Suzuki
  • 2 edits in trunk/Source/JavaScriptCore

Reserve capacity for StringBuilder in unescape
https://bugs.webkit.org/show_bug.cgi?id=167008

Reviewed by Sam Weinig.

unescape function is frequently called in Kraken sha256-iterative.
This patch just reserves the capacity for the StringBuilder.

Currently, we select the length of the string for the reserved capacity.
It improves the performance 2.73%.

Benchmark report for Kraken on sakura-trick.

VMs tested:
"baseline" at /home/yusukesuzuki/dev/WebKit/WebKitBuild/untot/Release/bin/jsc
"patched" at /home/yusukesuzuki/dev/WebKit/WebKitBuild/un/Release/bin/jsc

Collected 100 samples per benchmark/VM, with 100 VM invocations per benchmark. Emitted a call to gc() between
sample measurements. Used 1 benchmark iteration per VM invocation for warm-up. Used the jsc-specific preciseTime()
function to get microsecond-level timing. Reporting benchmark execution times with 95% confidence intervals in
milliseconds.

baseline patched

stanford-crypto-sha256-iterative 51.609+-0.672 50.237+-0.860 might be 1.0273x faster

<arithmetic> 51.609+-0.672 50.237+-0.860 might be 1.0273x faster

  • runtime/JSGlobalObjectFunctions.cpp:

(JSC::globalFuncUnescape):

10:09 AM Changeset in webkit [210734] by Michael Catanzaro
  • 2 edits in trunk

[CMake] Clean up SHARED_CORE option
https://bugs.webkit.org/show_bug.cgi?id=167004

Reviewed by Alex Christensen.

  • CMakeLists.txt:
9:54 AM Changeset in webkit [210733] by Chris Dumez
  • 10 edits
    3 adds in trunk/Source/WebCore

Report post-page load CPU usage using diagnostic logging
https://bugs.webkit.org/show_bug.cgi?id=166950
<rdar://problem/30014496>

Reviewed by Alex Christensen.

Shortly after page load (5 seconds), we measure the WebContent process'
CPU usage over 10 seconds and report the percentage back via release
logging. We also log the percentage using diagnostic logging using the
following buckets:

  • Below 10%
  • 10 to 20%
  • 20 to 40%
  • 60 to 80%
  • Over 80%

The logging works on both Mac and iOS. I verified that I get results
consistent with Activity Monitor or top.

No new tests, no Web-facing behavior change, only extra logging.

  • CMakeLists.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • loader/FrameLoader.cpp:

(WebCore::FrameLoader::checkLoadCompleteForThisFrame):

  • page/DiagnosticLoggingKeys.cpp:

(WebCore::DiagnosticLoggingKeys::postPageLoadKey):
(WebCore::DiagnosticLoggingKeys::cpuUsageKey):

  • page/DiagnosticLoggingKeys.h:
  • page/Page.cpp:

(WebCore::Page::Page):
(WebCore::Page::didFinishLoad):
(WebCore::cpuUsageToDiagnosticLogginKey):
(WebCore::Page::measurePostLoadCPUUsage):

  • page/Page.h:
  • page/Settings.cpp:

(WebCore::Settings::isPostLoadCPUUsageMeasurementEnabled):

  • page/Settings.h:
  • platform/CPUTime.cpp: Added.

(WebCore::getCPUTime):
(WebCore::CPUTime::percentageCPUUsageSince):

  • platform/CPUTime.h: Added.
  • platform/cocoa/CPUTimeCocoa.mm: Added.

(WebCore::timeValueToMicroseconds):
(WebCore::getCPUTime):

9:54 AM Changeset in webkit [210732] by Michael Catanzaro
  • 5 edits in trunk/Source/WebCore

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

Caused many layout test timeouts on GTK+ bots

Reverted changeset:

"Protect MediaPlayer from being destroyed mid-load()"
https://bugs.webkit.org/show_bug.cgi?id=166976
http://trac.webkit.org/changeset/210677

9:23 AM Changeset in webkit [210731] by Konstantin Tokarev
  • 2 edits in trunk/Source/WebCore

Added preprocessor guard for iOS-specific piece of code in GraphicsContext3DOpenGL
https://bugs.webkit.org/show_bug.cgi?id=167005

Reviewed by Alex Christensen.

Variable "boundFrameBuffer" is used only in iOS-specific code

No new tests needed.

  • platform/graphics/opengl/GraphicsContext3DOpenGL.cpp:

(WebCore::GraphicsContext3D::resolveMultisamplingIfNecessary):

6:26 AM Changeset in webkit [210730] by eric.carlson@apple.com
  • 6 edits in trunk

REGRESSION (r210621): [mac-wk2] LayoutTest fast/mediastream/MediaStream-video-element-video-tracks-disabled-then-enabled.html timing out
https://bugs.webkit.org/show_bug.cgi?id=166980
Source/WebCore:

Unreviewed, fix test broken by r210621.

No new tests, updated fast/mediastream/MediaStream-video-element-video-tracks-disabled-then-enabled.html
and results.

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

(-[WebAVSampleBufferStatusChangeListener observeValueForKeyPath:ofObject:change:context:]):

Drive-by fix: null-check parent.

(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::layerStatusDidChange): Do nothing if the layer

has changed since the KVO notification.

LayoutTests:


Unreviewed, fix test broken by r210621.

  • fast/mediastream/MediaStream-video-element-video-tracks-disabled-then-enabled-expected.txt:
  • fast/mediastream/MediaStream-video-element-video-tracks-disabled-then-enabled.html:
  • platform/mac-wk2/TestExpectations: Un-skip fixed test.
12:24 AM Changeset in webkit [210729] by Carlos Garcia Campos
  • 16 edits
    1 delete in trunk/Source

[SOUP] Simplify cookie storage handling
https://bugs.webkit.org/show_bug.cgi?id=166967

Reviewed by Sergio Villar Senin.

Source/WebCore:

We currently have a global cookie storage, and several create() methods in SoupNetworkSession to create sessions
with different cookie jars. This could be simplified by moving the cookie storage handling to
NetworkStorageSession and removing all create() methods from SoupNetworkSession. This patch also removes the
default SoupNetworkSession in favor of using the default NetworkStorageSession.

  • platform/network/NetworkStorageSession.h: Add a default cookie storage to be used when the

NetworkStorageSession doesn't have a platform soup session.

  • platform/network/soup/CookieJarSoup.cpp: Remove the global cookie storage handling.

(WebCore::setCookiesFromDOM): Use NetworkStorageSession::cookieStorage() instead.
(WebCore::cookiesForSession): Ditto.
(WebCore::cookiesEnabled): Check the policy instead like all other ports do, since now we will always have a
default shared cookie jar.
(WebCore::getRawCookies): Use NetworkStorageSession::cookieStorage() instead.
(WebCore::deleteCookie): Ditto.
(WebCore::addCookie): Ditto.
(WebCore::getHostnamesWithCookies): Ditto.
(WebCore::deleteCookiesForHostnames): Ditto.
(WebCore::deleteAllCookies): Ditto.

  • platform/network/soup/CookieJarSoup.h: Removed.
  • platform/network/soup/CookieStorageSoup.cpp:

(WebCore::soupCookiesChanged): Use the cookie storage from the NetworkStorageSession::defaultStorageSession().
(WebCore::startObservingCookieChanges): Ditto.
(WebCore::stopObservingCookieChanges): Ditto.

  • platform/network/soup/DNSSoup.cpp:

(WebCore::DNSResolveQueue::updateIsUsingProxy): Get the SoupSession from the NetworkStorageSession::defaultStorageSession().
(WebCore::DNSResolveQueue::platformResolve): Ditto.

  • platform/network/soup/NetworkStorageSessionSoup.cpp:

(WebCore::NetworkStorageSession::NetworkStorageSession):
(WebCore::NetworkStorageSession::ensurePrivateBrowsingSession): Create a new SoupNetworkSession without
providing a cookie storage to ensure it creates its own private one.
(WebCore::NetworkStorageSession::switchToNewTestingSession): Ditto.
(WebCore::NetworkStorageSession::soupNetworkSession): Create the SoupNetworkSession on demand passing the global
shared cookie storage.
(WebCore::NetworkStorageSession::cookieStorage): Return the cookie storage from the SoupNetworkSession if we
have one, otherwise create the global shared one and return it.

  • platform/network/soup/ResourceHandleSoup.cpp:

(WebCore::sessionFromContext): Get the SoupSession from the NetworkStorageSession::defaultStorageSession().

  • platform/network/soup/SoupNetworkSession.cpp:

(WebCore::SoupNetworkSession::SoupNetworkSession): Remove all create methods and the unused constructor that
receives a SoupSession. Allow to pass a nullptr SoupCookieJar and create one in such case.

  • platform/network/soup/SoupNetworkSession.h:

Source/WebKit2:

Get the SoupSession from NetworkStorageSession::defaultStorageSession().

  • NetworkProcess/CustomProtocols/soup/CustomProtocolManagerSoup.cpp:

(WebKit::CustomProtocolManager::registerScheme): Get the SoupSession from NetworkStorageSession::defaultStorageSession().

  • NetworkProcess/efl/NetworkProcessMainEfl.cpp: Ditto.
  • NetworkProcess/soup/NetworkProcessSoup.cpp:

(WebKit::NetworkProcess::userPreferredLanguagesChanged): Ditto.
(WebKit::NetworkProcess::platformInitializeNetworkProcess): SoupNetworkSession::clearOldSoupCache is static.

  • WebProcess/Cookies/soup/WebCookieManagerSoup.cpp:

(WebKit::WebCookieManager::platformGetHTTPCookieAcceptPolicy): Use the cookie storage from NetworkStorageSession::defaultStorageSession().
(WebKit::WebCookieManager::setCookiePersistentStorage): Ditto.

  • WebProcess/WebCoreSupport/soup/WebFrameNetworkingContext.cpp:

(WebKit::WebFrameNetworkingContext::setCookieAcceptPolicyForAllContexts): Ditto.

  • WebProcess/efl/WebProcessMainEfl.cpp:
12:17 AM Changeset in webkit [210728] by Carlos Garcia Campos
  • 2 edits in trunk/Source/WebKit2

[SOUP] Do not use the legacy session ID in WebFrameNetworkingContext::storageSession()
https://bugs.webkit.org/show_bug.cgi?id=166970

Reviewed by Sergio Villar Senin.

Get the session for the current page instead.

  • WebProcess/WebCoreSupport/soup/WebFrameNetworkingContext.cpp:

(WebKit::WebFrameNetworkingContext::storageSession):

Jan 12, 2017:

11:36 PM Changeset in webkit [210727] by timothy_horton@apple.com
  • 2 edits in trunk/Source/WebCore

Keyboard accessory bar can appear on top of full-screen video
https://bugs.webkit.org/show_bug.cgi?id=166902
<rdar://problem/29668223>

Reviewed by Darin Adler.

  • platform/ios/WebVideoFullscreenInterfaceAVKit.mm:

(WebVideoFullscreenInterfaceAVKit::setupFullscreen):
Increase the full-screen video window level to one above the keyboard,
to ensure that the video is never obscured by the keyboard or its
accessory views.

11:12 PM Changeset in webkit [210726] by matthew_hanson@apple.com
  • 12 edits in branches/safari-603-branch/Source/WebKit2

Merge r209189. rdar://problem/29428877

11:11 PM Changeset in webkit [210725] by matthew_hanson@apple.com
  • 1 edit in branches/safari-603-branch/Source/WebKit2/ChangeLog

Merge r209554. rdar://problem/29428877

11:05 PM Changeset in webkit [210724] by matthew_hanson@apple.com
  • 9 edits
    3 adds in branches/safari-603-branch

Merge r210447. rdar://problem/29872292

11:05 PM Changeset in webkit [210723] by matthew_hanson@apple.com
  • 7 edits in branches/safari-603-branch/Source/WebCore

Merge r210474. rdar://problem/29762809

11:05 PM Changeset in webkit [210722] by matthew_hanson@apple.com
  • 5 edits
    2 adds in branches/safari-603-branch

Merge r210586. rdar://problem/29861147

11:05 PM Changeset in webkit [210721] by matthew_hanson@apple.com
  • 3 edits
    2 adds in branches/safari-603-branch

Merge r210536. rdar://problem/29939970

11:05 PM Changeset in webkit [210720] by matthew_hanson@apple.com
  • 4 edits
    4 adds in branches/safari-603-branch

Merge r210399. rdar://problem/29019333

10:10 PM Changeset in webkit [210719] by matthew_hanson@apple.com
  • 2 edits in branches/safari-603-branch/Source/WebInspectorUI

Merge r210691. rdar://problem/29951737

10:10 PM Changeset in webkit [210718] by matthew_hanson@apple.com
  • 13 edits in branches/safari-603-branch/Source

Merge r210689. rdar://problem/29985957

10:10 PM Changeset in webkit [210717] by matthew_hanson@apple.com
  • 3 edits
    2 adds in branches/safari-603-branch

Merge r210687. rdar://problem/29388806

10:10 PM Changeset in webkit [210716] by matthew_hanson@apple.com
  • 2 edits in branches/safari-603-branch/Source/WebCore

Merge r210685. rdar://problem/29775711

10:10 PM Changeset in webkit [210715] by matthew_hanson@apple.com
  • 3 edits in branches/safari-603-branch/Source/WebCore

Merge r210684. rdar://problem/29775711

10:10 PM Changeset in webkit [210714] by matthew_hanson@apple.com
  • 6 edits in branches/safari-603-branch/Source/WebKit2

Merge r210683. rdar://problem/11187315

10:10 PM Changeset in webkit [210713] by matthew_hanson@apple.com
  • 2 edits in branches/safari-603-branch/Source/WebCore

Merge r210679. rdar://problem/29910273

10:10 PM Changeset in webkit [210712] by matthew_hanson@apple.com
  • 5 edits in branches/safari-603-branch/Source/WebCore

Merge r210677. rdar://problem/21482487

10:10 PM Changeset in webkit [210711] by matthew_hanson@apple.com
  • 4 edits in branches/safari-603-branch/Source/WebKit2

Merge r210666. rdar://problem/28904157

10:10 PM Changeset in webkit [210710] by matthew_hanson@apple.com
  • 2 edits in branches/safari-603-branch/Source/WebCore

Merge r210663. rdar://problem/29916484

10:10 PM Changeset in webkit [210709] by matthew_hanson@apple.com
  • 1 edit
    3 adds in branches/safari-603-branch/Source/WebInspectorUI

Merge r210623. rdar://problem/29980631

10:10 PM Changeset in webkit [210708] by matthew_hanson@apple.com
  • 4 edits in branches/safari-603-branch/LayoutTests

Merge r210622. rdar://problem/28389364

10:10 PM Changeset in webkit [210707] by matthew_hanson@apple.com
  • 2 edits in branches/safari-603-branch/Source/WebKit2

Merge r210619. rdar://problem/27745004

10:10 PM Changeset in webkit [210706] by matthew_hanson@apple.com
  • 7 edits in branches/safari-603-branch

Merge r210616. rdar://problem/29971105

10:10 PM Changeset in webkit [210705] by matthew_hanson@apple.com
  • 5 edits in branches/safari-603-branch/LayoutTests

Merge r210611. rdar://problem/29471892

10:10 PM Changeset in webkit [210704] by matthew_hanson@apple.com
  • 7 edits in branches/safari-603-branch/Source

Merge r210609. rdar://problem/27896585

10:10 PM Changeset in webkit [210703] by matthew_hanson@apple.com
  • 3 edits in branches/safari-603-branch/LayoutTests

Merge r210610. rdar://problem/15307582

10:10 PM Changeset in webkit [210702] by matthew_hanson@apple.com
  • 2 edits in branches/safari-603-branch/Tools

Merge r210608. rdar://problem/15307582

10:10 PM Changeset in webkit [210701] by matthew_hanson@apple.com
  • 1 edit
    2 adds in branches/safari-603-branch/Tools

Merge r210600. rdar://problem/15307582

10:10 PM Changeset in webkit [210700] by matthew_hanson@apple.com
  • 11 edits in branches/safari-603-branch

Merge r210599. rdar://problem/15307582

10:09 PM Changeset in webkit [210699] by matthew_hanson@apple.com
  • 2 edits in branches/safari-603-branch/Source/WebKit2

Merge r210596. rdar://problem/29757269

10:09 PM Changeset in webkit [210698] by matthew_hanson@apple.com
  • 7 edits
    2 adds in branches/safari-603-branch

Merge r210593. rdar://problem/29970907

10:01 PM Changeset in webkit [210697] by commit-queue@webkit.org
  • 62 edits in trunk/Source

Remove unnecessary includes of Page.h
https://bugs.webkit.org/show_bug.cgi?id=166996

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2017-01-12
Reviewed by Yusuke Suzuki.

Source/WebCore:

  • Modules/plugins/QuickTimePluginReplacement.mm:
  • Modules/plugins/YouTubePluginReplacement.cpp:
  • Modules/webdatabase/Database.cpp:
  • Modules/webdatabase/DatabaseTracker.cpp:
  • Modules/webdriver/NavigatorWebDriver.cpp:
  • accessibility/AccessibilityNodeObject.cpp:
  • dom/Range.cpp:
  • dom/ScriptElement.cpp:
  • dom/ViewportArguments.cpp:
  • html/HTMLBodyElement.cpp:
  • html/HTMLCanvasElement.cpp:
  • html/HTMLDocument.cpp:
  • html/HTMLFormControlElementWithState.cpp:
  • html/HTMLImageElement.cpp:
  • html/HTMLLinkElement.cpp:
  • html/PluginDocument.cpp:
  • inspector/InspectorApplicationCacheAgent.cpp:
  • loader/LoadTiming.cpp:
  • loader/cache/CachedImage.cpp:
  • loader/cache/CachedResource.cpp:
  • page/DeviceController.cpp:
  • page/TextIndicator.cpp:
  • page/efl/DragControllerEfl.cpp:
  • platform/audio/ios/AudioDestinationIOS.cpp:
  • platform/ios/PasteboardIOS.mm:
  • platform/ios/ScrollAnimatorIOS.mm:
  • platform/ios/WidgetIOS.mm:
  • platform/mac/PasteboardMac.mm:
  • platform/network/mac/ResourceHandleMac.mm:
  • platform/win/MainThreadSharedTimerWin.cpp:
  • platform/win/PasteboardWin.cpp:
  • platform/win/PlatformScreenWin.cpp:
  • platform/win/WidgetWin.cpp:
  • rendering/InlineBox.cpp:
  • rendering/RenderAttachment.cpp:
  • rendering/RenderBoxModelObject.cpp:
  • rendering/RenderIFrame.cpp:
  • rendering/RenderInline.cpp:
  • rendering/RenderReplaced.cpp:
  • rendering/RenderTextControlSingleLine.cpp:
  • rendering/RootInlineBox.cpp:
  • rendering/svg/RenderSVGResourceFilter.cpp:
  • rendering/svg/SVGRenderingContext.cpp:
  • style/StyleScope.cpp:
  • svg/SVGDocumentExtensions.cpp:
  • svg/graphics/SVGImageCache.cpp:
  • xml/XSLTProcessor.cpp:
  • xml/parser/XMLDocumentParserLibxml2.cpp:

Source/WebKit/mac:

  • DOM/DOMHTML.mm:
  • History/WebBackForwardList.mm:
  • Plugins/WebPluginController.mm:
  • WebCoreSupport/WebNotificationClient.mm:
  • WebCoreSupport/WebPlatformStrategies.mm:
  • WebCoreSupport/WebUserMediaClient.mm:
  • WebView/WebFullScreenController.mm:

Source/WebKit/win:

  • AccessibleTextImpl.cpp:
  • BackForwardList.cpp:

Source/WebKit2:

  • WebProcess/Plugins/Netscape/NPRuntimeObjectMap.cpp:
9:44 PM Changeset in webkit [210696] by Gyuyoung Kim
  • 2 edits in trunk/LayoutTests

[EFL] Skip to test imported/w3c/web-platform-tests

Unreviewed EFL gardening. There are too many timeout and crash.

  • platform/efl/TestExpectations:
8:03 PM Changeset in webkit [210695] by sbarati@apple.com
  • 25 edits
    4 adds in trunk

Add a slice intrinsic to the DFG/FTL
https://bugs.webkit.org/show_bug.cgi?id=166707
<rdar://problem/29913445>

Reviewed by Filip Pizlo.

JSTests:

  • stress/array-slice-intrinsic.js: Added.

(assert):
(shallowEq):
(runTest1):
(runTest2):

  • stress/array-slice-jettison-on-constructor-change.js: Added.

(assert):
(runTest1):
(runTest2):
(addRandomProperties):
(runTests):

  • stress/array-slice-osr-exit-2.js: Added.

(assert):
(Foo):
(shallowEq):
(runTest1):
(runTest2):
(addRandomProperties):
(runTests):

  • stress/array-slice-osr-exit.js: Added.

(assert):
(Foo):
(shallowEq):
(runTest1):
(runTest2):
(addRandomProperties):
(runTests):

Source/JavaScriptCore:

The gist of this patch is to inline Array.prototype.slice
into the DFG/FTL. The implementation in the DFG-backend
and FTLLowerDFGToB3 is just a straight forward implementation
of what the C function is doing. The more interesting bits
of this patch are setting up the proper watchpoints and conditions
in the executing code to prove that its safe to skip all of the
observable JS actions that Array.prototype.slice normally does.

We perform the following proofs:

  1. Array.prototype.constructor has not changed (via a watchpoint).
  2. That Array.prototype.constructor[Symbol.species] has not changed (via a watchpoint).
  3. The global object is not having a bad time.
  4. The array that is being sliced has an original array structure.
  5. Array.prototype/Object.prototype have not transitioned.

Conditions 1, 2, and 3 are strictly required.

4 is ensuring a couple things:

  1. That a "constructor" property hasn't been added to the array

we're slicing since we're supposed to perform a Get(array, "constructor").

  1. That we're not slicing an instance of a subclass of Array.

We could relax 4.1 in the future if we find other ways to test if
the incoming array hasn't changed the "constructor" property. We
would probably use TryGetById to do this.

I'm seeing a 5% speedup on crypto-pbkdf2 and often a 1% speedup on
the total benchmark (the results are sometimes noisy).

  • dfg/DFGAbstractInterpreterInlines.h:

(JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):

  • dfg/DFGByteCodeParser.cpp:

(JSC::DFG::ByteCodeParser::handleIntrinsicCall):

  • dfg/DFGCallArrayAllocatorSlowPathGenerator.h:

(JSC::DFG::CallArrayAllocatorWithVariableStructureVariableSizeSlowPathGenerator::CallArrayAllocatorWithVariableStructureVariableSizeSlowPathGenerator):

  • dfg/DFGClobberize.h:

(JSC::DFG::clobberize):

  • dfg/DFGDoesGC.cpp:

(JSC::DFG::doesGC):

  • dfg/DFGFixupPhase.cpp:

(JSC::DFG::FixupPhase::fixupNode):

  • dfg/DFGNodeType.h:
  • dfg/DFGPredictionPropagationPhase.cpp:
  • dfg/DFGSafeToExecute.h:

(JSC::DFG::safeToExecute):

  • dfg/DFGSpeculativeJIT.cpp:

(JSC::DFG::SpeculativeJIT::compileArraySlice):
(JSC::DFG::SpeculativeJIT::emitAllocateButterfly):

  • dfg/DFGSpeculativeJIT.h:
  • dfg/DFGSpeculativeJIT32_64.cpp:

(JSC::DFG::SpeculativeJIT::compile):
(JSC::DFG::SpeculativeJIT::emitInitializeButterfly):
(JSC::DFG::SpeculativeJIT::compileAllocateNewArrayWithSize):

  • dfg/DFGSpeculativeJIT64.cpp:

(JSC::DFG::SpeculativeJIT::compile):
(JSC::DFG::SpeculativeJIT::emitInitializeButterfly):
(JSC::DFG::SpeculativeJIT::compileAllocateNewArrayWithSize):

  • ftl/FTLAbstractHeapRepository.h:
  • ftl/FTLCapabilities.cpp:

(JSC::FTL::canCompile):

  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::compileNode):
(JSC::FTL::DFG::LowerDFGToB3::compileArraySlice):
(JSC::FTL::DFG::LowerDFGToB3::compileNewArrayWithSize):
(JSC::FTL::DFG::LowerDFGToB3::compileMaterializeNewObject):
(JSC::FTL::DFG::LowerDFGToB3::initializeArrayElements):
(JSC::FTL::DFG::LowerDFGToB3::storeStructure):
(JSC::FTL::DFG::LowerDFGToB3::allocateCell):
(JSC::FTL::DFG::LowerDFGToB3::allocateObject):
(JSC::FTL::DFG::LowerDFGToB3::allocateJSArray):
(JSC::FTL::DFG::LowerDFGToB3::allocateUninitializedContiguousJSArray):

  • jit/AssemblyHelpers.cpp:

(JSC::AssemblyHelpers::emitLoadStructure):

  • runtime/ArrayPrototype.cpp:

(JSC::ArrayPrototype::finishCreation):
(JSC::speciesWatchpointIsValid):
(JSC::speciesConstructArray):
(JSC::arrayProtoFuncSlice):
(JSC::arrayProtoPrivateFuncConcatMemcpy):
(JSC::ArrayPrototype::initializeSpeciesWatchpoint):
(JSC::ArrayPrototypeAdaptiveInferredPropertyWatchpoint::handleFire):
(JSC::speciesWatchpointsValid): Deleted.
(JSC::ArrayPrototype::attemptToInitializeSpeciesWatchpoint): Deleted.

  • runtime/ArrayPrototype.h:

(JSC::ArrayPrototype::speciesWatchpointStatus): Deleted.
(): Deleted.

  • runtime/Intrinsic.h:
  • runtime/JSGlobalObject.cpp:

(JSC::JSGlobalObject::JSGlobalObject):
(JSC::JSGlobalObject::init):

  • runtime/JSGlobalObject.h:

(JSC::JSGlobalObject::arraySpeciesWatchpoint):

  • runtime/Structure.h:
7:12 PM Changeset in webkit [210694] by sbarati@apple.com
  • 9 edits in trunk/Source/JavaScriptCore

Concurrent GC has a bug where we would detect a race but fail to rescan the object
https://bugs.webkit.org/show_bug.cgi?id=166960
<rdar://problem/29983526>

Reviewed by Filip Pizlo and Mark Lam.

We have code like this in JSC:

`
Butterfly* butterfly = allocateMoreOutOfLineStorage(vm, oldOutOfLineCapacity, newOutOfLineCapacity);
nukeStructureAndSetButterfly(vm, structureID, butterfly);
structure->setLastOffset(newLastOffset);
WTF::storeStoreFence();
setStructureIDDirectly(structureID);
`

Note that the collector could detect a race here, which sometimes
incorrectly caused us to not visit the object again.

Mutator Thread: M, Collector Thread: C, assuming sequential consistency via
proper barriers:

M: allocate new butterfly
M: Set nuked structure ID
M: Set butterfly (this does a barrier)
C: Start scanning O
C: load structure ID
C: See it's nuked and bail, (we used to rely on a write barrier to rescan).

We sometimes never rescanned here because we were calling
setStructureIDDirectly which doesn't do a write barrier.
(Note, the places that do this but call setStructure were
OK because setStructure will perform a write barrier.)

(This same issue also existed in places where the collector thread
detected races for Structure::m_offset, but places that changed
Structure::m_offset didn't perform a write barrier on the object
after changing its Structure's m_offset.)

To prevent such code from requiring every call site to perform
a write barrier on the object, I've changed the collector code
to keep a stack of cells to be revisited due to races. This stack
is then consulted when we do marking. Because such races are rare,
we have a single stack on Heap that is guarded by a lock.

  • heap/Heap.cpp:

(JSC::Heap::Heap):
(JSC::Heap::~Heap):
(JSC::Heap::markToFixpoint):
(JSC::Heap::endMarking):
(JSC::Heap::buildConstraintSet):
(JSC::Heap::addToRaceMarkStack):

  • heap/Heap.h:

(JSC::Heap::collectorSlotVisitor):
(JSC::Heap::mutatorMarkStack): Deleted.

  • heap/SlotVisitor.cpp:

(JSC::SlotVisitor::didRace):

  • heap/SlotVisitor.h:

(JSC::SlotVisitor::didRace):
(JSC::SlotVisitor::didNotRace): Deleted.

  • heap/SlotVisitorInlines.h:

(JSC::SlotVisitor::didNotRace): Deleted.

  • runtime/JSObject.cpp:

(JSC::JSObject::visitButterfly):
(JSC::JSObject::visitButterflyImpl):

  • runtime/JSObjectInlines.h:

(JSC::JSObject::prepareToPutDirectWithoutTransition):

  • runtime/Structure.cpp:

(JSC::Structure::flattenDictionaryStructure):

6:46 PM Changeset in webkit [210693] by Chris Dumez
  • 11 edits in trunk

Add KEYBOARD_KEY_ATTRIBUTE / KEYBOARD_CODE_ATTRIBUTE to FeatureDefines.xcconfig
https://bugs.webkit.org/show_bug.cgi?id=166995

Reviewed by Jer Noble.

Add KEYBOARD_KEY_ATTRIBUTE / KEYBOARD_CODE_ATTRIBUTE to FeatureDefines.xcconfig
as some people are having trouble building without it.

Source/JavaScriptCore:

  • Configurations/FeatureDefines.xcconfig:

Source/WebCore:

  • Configurations/FeatureDefines.xcconfig:

Source/WebKit/mac:

  • Configurations/FeatureDefines.xcconfig:

Source/WebKit2:

  • Configurations/FeatureDefines.xcconfig:
  • Shared/WebKeyboardEvent.cpp:

(WebKit::WebKeyboardEvent::WebKeyboardEvent):

Tools:

  • TestWebKitAPI/Configurations/FeatureDefines.xcconfig:
5:42 PM Changeset in webkit [210692] by Ryan Haddad
  • 3 edits in trunk/Source/WebCore

Unreviewed, rolling out r210680.

This change caused LayoutTest timeouts and assertion failures.

Reverted changeset:

"Use GenericEventQueue rather than callOnMainThread to
schedule events in AudioScheduledSourceNode."
https://bugs.webkit.org/show_bug.cgi?id=166983
http://trac.webkit.org/changeset/210680

5:30 PM Changeset in webkit [210691] by Nikita Vasilyev
  • 2 edits in trunk/Source/WebInspectorUI

REGRESSION (r209711): Web Inspector: in Elements Tab, selecting a deeply nested DOM element causes navigation bar buttons to be pushed off the leading edge
https://bugs.webkit.org/show_bug.cgi?id=166898
<rdar://problem/29951737>

Reviewed by Timothy Hatcher.

  • UserInterface/Views/HierarchicalPathComponent.js:

(WebInspector.HierarchicalPathComponent.prototype.set selectorArrows):
The following operations do NOT produce the same result:

classList.toogle(aString, undefined)
classList.toogle(aString, false)

The former is an equivalent of classList.toogle(aString), e.g. it set a class if it wasn't set before.

5:26 PM Changeset in webkit [210690] by matthew_hanson@apple.com
  • 1 delete in tags/Safari-603.1.20

Remove Tag.

4:59 PM Changeset in webkit [210689] by Chris Dumez
  • 13 edits in trunk/Source

Source/WebCore:
[iOS] HTML form validation popover sometimes does not go away
https://bugs.webkit.org/show_bug.cgi?id=166990
<rdar://problem/29985957>

Reviewed by Tim Horton.

The issue was that [UIViewController presentViewController:] is asynchronous
and that we sometimes tried to call [m_popoverController dismissViewControllerAnimated:]
before presentViewController had completed. This is something that UIKit does
not handle nicely and the popover just stays visible even though we have
asked for the controller to be dismissed and destroyed the ValidationBubble
object.

To address the issue, I made ValidationBubble RefCounted and make sure the
ValidationBubble object stays alive at least until the completion handler for
[UIViewController presentViewController:] has been called. This is done via
protecting the object using a RefPtr<> and capturing it in the lambda.
Because dismissViewControllerAnimated is called in the destructor, it is no
longer possible to call dismissViewControllerAnimated before the call to
presentViewController has completed.

No new tests, no easily testable since the popover was staying visible
after being destroyed (held on by UIKit).

  • platform/ValidationBubble.h:

(WebCore::ValidationBubble::create):

  • platform/ios/ValidationBubbleIOS.mm:

(WebCore::ValidationBubble::show):

Source/WebKit/mac:
HTML form validation popover sometimes does not go away
https://bugs.webkit.org/show_bug.cgi?id=166990
<rdar://problem/29985957>

Reviewed by Tim Horton.

Update code using ValidationBubble now that it is RefCounted.

  • WebView/WebView.mm:

(-[WebView showFormValidationMessage:withAnchorRect:]):

Source/WebKit2:
[iOS] HTML form validation popover sometimes does not go away
https://bugs.webkit.org/show_bug.cgi?id=166990
<rdar://problem/29985957>

Reviewed by Tim Horton.

Update code using ValidationBubble now that it is RefCounted.

  • UIProcess/PageClient.h:
  • UIProcess/WebPageProxy.h:
  • UIProcess/ios/PageClientImplIOS.h:
  • UIProcess/ios/PageClientImplIOS.mm:

(WebKit::PageClientImpl::createValidationBubble):

  • UIProcess/mac/PageClientImpl.h:
  • UIProcess/mac/PageClientImpl.mm:

(WebKit::PageClientImpl::createValidationBubble):

4:47 PM Changeset in webkit [210688] by akling@apple.com
  • 7 edits in trunk

[iOS] Purge GraphicsServices font cache on memory warning.
<https://webkit.org/b/154343>

Reviewed by Antti Koivisto.

Source/WebCore:

The GS font cache was retaining CSS fonts after we stopped using them.
Call SPI to release them on memory pressure. This is one of multiple
steps necessary to actually free the fonts.

  • Configurations/WebCore.xcconfig:
  • page/cocoa/MemoryReleaseCocoa.mm:

(WebCore::platformReleaseMemory):

  • platform/cocoa/MemoryPressureHandlerCocoa.mm:
  • platform/spi/ios/GraphicsServicesSPI.h:

WebKitLibraries:

  • WebKitPrivateFrameworkStubs/iOS/10/GraphicsServices.framework/GraphicsServices.tbd: Add SPI.
4:36 PM Changeset in webkit [210687] by enrica@apple.com
  • 3 edits
    2 adds in trunk

Do not allow selection of editable content when not editing.
https://bugs.webkit.org/show_bug.cgi?id=166897
<rdar://problem/29388806>

Reviewed by Tim Horton.

Source/WebKit2:

Test: fast/events/touch/ios/long-press-on-editable.html

When retrieving the position information, we should not consider
as candidates for selection editable elements, since this is only
used for non editable selections.

  • WebProcess/WebPage/ios/WebPageIOS.mm:

(WebKit::isAssistableElement): Moved within the file.
(WebKit::WebPage::getPositionInformation):

LayoutTests:

  • fast/events/touch/ios/long-press-on-editable-expected.txt: Added.
  • fast/events/touch/ios/long-press-on-editable.html: Added.
4:15 PM Changeset in webkit [210686] by matthew_hanson@apple.com
  • 5 edits in branches/safari-603-branch/Source

Versioning.

4:11 PM Changeset in webkit [210685] by Chris Dumez
  • 2 edits in trunk/Source/WebCore

Unreviewed EFL/GTK build fix after r210684.

  • Modules/indexeddb/server/UniqueIDBDatabase.cpp:

(WebCore::IDBServer::UniqueIDBDatabase::performPrefetchCursor):

3:48 PM Changeset in webkit [210684] by beidson@apple.com
  • 3 edits in trunk/Source/WebCore

REGRESSION (r209977): Crash in UniqueIDBDatabase::executeNextDatabaseTask.
https://bugs.webkit.org/show_bug.cgi?id=166984

Reviewed by Alex Christensen.

No new tests (Unable to reproduce, speculative fix).

  • Modules/indexeddb/server/UniqueIDBDatabase.cpp:

(WebCore::IDBServer::UniqueIDBDatabase::performIterateCursor): If we're not already prefetching for this cursor,

starting doing so after holding a protector ref.

(WebCore::IDBServer::UniqueIDBDatabase::performPrefetchCursor): If we're now done prefetching for this cursor,

schedule the protector ref to be destroyed on the main thread.

  • Modules/indexeddb/server/UniqueIDBDatabase.h:
3:45 PM Changeset in webkit [210683] by Megan Gardner
  • 6 edits in trunk/Source/WebKit2

Double Check URLs on UI side before putting in pasteboard
https://bugs.webkit.org/show_bug.cgi?id=166945
<rdar://problem/11187315>

Reviewed by Tim Horton.

Check URLs sent from the web process before putting the on pasteboard.

  • UIProcess/Cocoa/WebPasteboardProxyCocoa.mm:

(WebKit::WebPasteboardProxy::setPasteboardPathnamesForType):
Add a check to make sure the URLs we've received are valid and not compromising to the user's system.

  • UIProcess/WebPasteboardProxy.cpp:

(WebKit::WebPasteboardProxy::addWebProcessProxy):
Keep track of the webProcesses associated with the pasteboard proxies specifically, so that we can
use it to check the URLs before putting them on pasteboard.
(WebKit::WebPasteboardProxy::removeWebProcessProxy):
Remove dead webProcesses.

  • UIProcess/WebPasteboardProxy.h:
  • UIProcess/WebPasteboardProxy.messages.in:

Allow for the connection to be passed in, so that we can determine which webProcess we need to
check the URLs of.

  • UIProcess/WebProcessProxy.cpp:

(WebKit::WebProcessProxy::~WebProcessProxy):
Make sure to remove WebProcessProxys from the list stored in WebPasteboardProxy

3:12 PM Changeset in webkit [210682] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore

Make ApplicationCacheHost::maybeLoadSynchronously more robust
https://bugs.webkit.org/show_bug.cgi?id=165192

Patch by Youenn Fablet <youenn@apple.com> on 2017-01-12
Reviewed by Alex Christensen.

No change of behavior.
Currently, in case out parameter "data" is not null and shouldLoadResourceFromApplicationCache returns false and resource is null, we might dereference a null pointer when calling maybeLoadSynchronously.
We refactor the code to ensure that this case cannot happen anymore.

  • loader/appcache/ApplicationCacheHost.cpp:

(WebCore::bufferFromResource):
(WebCore::ApplicationCacheHost::maybeLoadSynchronously):

2:49 PM Changeset in webkit [210681] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore

Update style of ResourceHandleInternal
https://bugs.webkit.org/show_bug.cgi?id=166952

Patch by Alex Christensen <achristensen@webkit.org> on 2017-01-12
Reviewed by Andreas Kling.

No change in behavior. Just un-indent and use initializer lists.

  • platform/network/ResourceHandleInternal.h:

(WebCore::ResourceHandleInternal::ResourceHandleInternal):
(WebCore::ResourceHandleInternal::client):

2:14 PM Changeset in webkit [210680] by jer.noble@apple.com
  • 3 edits in trunk/Source/WebCore

Use GenericEventQueue rather than callOnMainThread to schedule events in AudioScheduledSourceNode.
https://bugs.webkit.org/show_bug.cgi?id=166983

Reviewed by Brent Fulgham.

  • Modules/webaudio/AudioScheduledSourceNode.cpp:

(WebCore::AudioScheduledSourceNode::AudioScheduledSourceNode):
(WebCore::AudioScheduledSourceNode::finish):

  • Modules/webaudio/AudioScheduledSourceNode.h:
1:26 PM Changeset in webkit [210679] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore

OneDrive application crashes upon launch
https://bugs.webkit.org/show_bug.cgi?id=166975

Patch by Youenn Fablet <youenn@apple.com> on 2017-01-12
Reviewed by Brady Eidson.

Checking whether load is terminated just after calling ResourceLoader::willSendRequestInternal.
The reason is that delegate call may actually cancel the load at that point.

  • loader/SubresourceLoader.cpp:

(WebCore::SubresourceLoader::willSendRequestInternal):

1:05 PM Changeset in webkit [210678] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Marking fast/mediastream/MediaStream-video-element-video-tracks-disabled-then-enabled.html as a timeout on mac-wk2.
https://bugs.webkit.org/show_bug.cgi?id=166980

Unreviewed test gardening.

  • platform/mac-wk2/TestExpectations:
12:57 PM Changeset in webkit [210677] by jer.noble@apple.com
  • 5 edits in trunk/Source/WebCore

Protect MediaPlayer from being destroyed mid-load()
https://bugs.webkit.org/show_bug.cgi?id=166976

Reviewed by Eric Carlson.

It's possible for a message sent by MediaPlayer to HTMLMediaElement to cause
MediaPlayer to be destroyed before MediaPlayer::load() completes. We have
previously protected against this same problem in HTMLMediaElement::loadResource()
by ref'ing at the beginning of the function and deref'ing on exit. To do the
same in MediaPlayer, it must become RefCounted.

To keep the same semantics about m_client in MediaPlayer (always available without
requiring a null-check), make a new static MediaPlayerClient object which can
replace the real (HTMLMediaElement) client when the MediaPlayer is invalidated.

  • html/HTMLMediaElement.cpp:

(WebCore::HTMLMediaElement::~HTMLMediaElement):
(WebCore::HTMLMediaElement::clearMediaPlayer):
(WebCore::HTMLMediaElement::createMediaPlayer):

  • html/HTMLMediaElement.h:
  • platform/graphics/MediaPlayer.cpp:

(WebCore::nullMediaPlayerClient):
(WebCore::MediaPlayer::create):
(WebCore::MediaPlayer::MediaPlayer):
(WebCore::MediaPlayer::invalidate):
(WebCore::MediaPlayer::load):
(WebCore::MediaPlayer::loadWithNextMediaEngine):
(WebCore::MediaPlayer::inMediaDocument):
(WebCore::MediaPlayer::fullscreenMode):
(WebCore::MediaPlayer::requestedRate):
(WebCore::MediaPlayer::currentPlaybackTargetIsWirelessChanged):
(WebCore::MediaPlayer::networkStateChanged):
(WebCore::MediaPlayer::readyStateChanged):
(WebCore::MediaPlayer::volumeChanged):
(WebCore::MediaPlayer::muteChanged):
(WebCore::MediaPlayer::timeChanged):
(WebCore::MediaPlayer::sizeChanged):
(WebCore::MediaPlayer::repaint):
(WebCore::MediaPlayer::durationChanged):
(WebCore::MediaPlayer::rateChanged):
(WebCore::MediaPlayer::playbackStateChanged):
(WebCore::MediaPlayer::firstVideoFrameAvailable):
(WebCore::MediaPlayer::characteristicChanged):
(WebCore::MediaPlayer::cachedKeyForKeyId):
(WebCore::MediaPlayer::keyNeeded):
(WebCore::MediaPlayer::mediaKeysStorageDirectory):
(WebCore::MediaPlayer::referrer):
(WebCore::MediaPlayer::userAgent):
(WebCore::MediaPlayer::graphicsDeviceAdapter):
(WebCore::MediaPlayer::cachedResourceLoader):
(WebCore::MediaPlayer::createResourceLoader):
(WebCore::MediaPlayer::addAudioTrack):
(WebCore::MediaPlayer::removeAudioTrack):
(WebCore::MediaPlayer::addTextTrack):
(WebCore::MediaPlayer::removeTextTrack):
(WebCore::MediaPlayer::addVideoTrack):
(WebCore::MediaPlayer::removeVideoTrack):
(WebCore::MediaPlayer::outOfBandTrackSources):
(WebCore::MediaPlayer::shouldWaitForResponseToAuthenticationChallenge):
(WebCore::MediaPlayer::handlePlaybackCommand):
(WebCore::MediaPlayer::sourceApplicationIdentifier):
(WebCore::MediaPlayer::preferredAudioCharacteristics):
(WebCore::MediaPlayer::doesHaveAttribute):
(WebCore::MediaPlayer::mediaPlayerNetworkInterfaceName):
(WebCore::MediaPlayer::getRawCookies):
(WebCore::MediaPlayer::shouldDisableSleep):

  • platform/graphics/MediaPlayer.h:

(WebCore::MediaPlayer::platformVolumeConfigurationRequired):
(WebCore::MediaPlayer::client):

12:39 PM Changeset in webkit [210676] by weinig@apple.com
  • 3 edits in trunk/Tools

Add the ability to filter the set of bindings tests you want to run
https://bugs.webkit.org/show_bug.cgi?id=166977

Reviewed by Tim Horton.

Allows doing things like:

run-bindings-tests TestObj* TestCEReactions*


to run only those tests that match the patterns.

  • Scripts/run-bindings-tests:

(main):
Switch to using optparse and pass the remaining args as the filters.

  • Scripts/webkitpy/bindings/main.py:

(BindingsTests.init):
Store the pattens.

(BindingsTests.test_matches_patterns):
Add helper predicate to determine if a test should be run. When no
patterns are present, all tests should run.

(BindingsTests.run_tests):
Filter tests using the passed in patterns.

12:38 PM Changeset in webkit [210675] by weinig@apple.com
  • 10 edits in trunk/Source/WebCore

Update bindings test results.

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

(WebCore::JSTestCustomNamedGetter::getOwnPropertySlot):
(WebCore::JSTestCustomNamedGetter::getOwnPropertySlotByIndex):

  • bindings/scripts/test/JS/JSTestCustomNamedGetter.h:
  • bindings/scripts/test/JS/JSTestEventTarget.cpp:

(WebCore::JSTestEventTarget::getOwnPropertySlot):
(WebCore::JSTestEventTarget::getOwnPropertySlotByIndex):
(WebCore::JSTestEventTarget::getOwnPropertyNames):

  • bindings/scripts/test/JS/JSTestEventTarget.h:
  • bindings/scripts/test/JS/JSTestInterface.cpp:

(WebCore::JSTestInterface::put):
(WebCore::JSTestInterface::putByIndex):

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

(WebCore::JSTestObj::getOwnPropertySlot):
(WebCore::JSTestObj::getOwnPropertySlotByIndex):
(WebCore::JSTestObj::getOwnPropertyNames):

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

(WebCore::JSTestOverrideBuiltins::getOwnPropertySlot):
(WebCore::JSTestOverrideBuiltins::getOwnPropertySlotByIndex):
(WebCore::JSTestOverrideBuiltins::getOwnPropertyNames):

  • bindings/scripts/test/JS/JSTestOverrideBuiltins.h:
12:21 PM Changeset in webkit [210674] by commit-queue@webkit.org
  • 3 edits in trunk/Source/WebInspectorUI

Web Inspector: cubic-bezier editor behaves poorly for invalid inputs in component fields
https://bugs.webkit.org/show_bug.cgi?id=166928

Patch by Devin Rousso <Devin Rousso> on 2017-01-12
Reviewed by Brian Burg.

  • UserInterface/Views/BezierEditor.css:

(.bezier-editor):
(.bezier-editor > .number-input-container > input):

  • UserInterface/Views/BezierEditor.js:

(WebInspector.BezierEditor.createBezierInput):
(WebInspector.BezierEditor):
Add type, step, min, and max to the bezier component inputs to better control user input.

11:32 AM Changeset in webkit [210673] by rniwa@webkit.org
  • 4 edits in trunk/Websites/perf.webkit.org

Outliers are not hidden in v3 UI
https://bugs.webkit.org/show_bug.cgi?id=166966

Reviewed by Andreas Kling.

Fixed the typo in addToSeries. An outlier has markedOutlier set to true, not isOutlier.

Also fixed a bug unveiled by new tests in MeasurementRootSet.ensureSingleton. It was was creating
a new MeasurementRootSet each time it was called instead of finding an existing instance. Fixed the bug
by merging the static maps of MeasurementRootSet and RootSet.

  • public/v3/models/measurement-cluster.js:

(MeasurementCluster.prototype.addToSeries): Fixed the bug.

  • public/v3/models/root-set.js:

(MeasurementRootSet.prototype.namedStaticMap): Added.
(MeasurementRootSet.prototype.ensureNamedStaticMap): Added.
(MeasurementRootSet.namedStaticMap): Added.
(MeasurementRootSet.ensureNamedStaticMap): Added.

  • unit-tests/measurement-set-tests.js: Added tests for adopting time series data from a cluster.
11:27 AM Changeset in webkit [210672] by matthew_hanson@apple.com
  • 5 edits in branches/safari-603-branch/Source

Versioning.

11:26 AM Changeset in webkit [210671] by matthew_hanson@apple.com
  • 1 copy in tags/Safari-603.1.20

New tag.

10:46 AM WebKitGTK/2.14.x edited by Michael Catanzaro
(diff)
10:44 AM Changeset in webkit [210670] by zandobersek@gmail.com
  • 2 edits in trunk/Source/WebCore

[GTK] WebKitWebProcess at 100% CPU loading hyphenation dictionaries
https://bugs.webkit.org/show_bug.cgi?id=165601

Reviewed by Carlos Garcia Campos.

In HyphenationLibHyphen, retrieve the canonicalized absolute pathname of the dictionary file
in order to avoid storing symbolic links as the target files for specific locales. libhyphen
distributes its dictionary files by linking a set of similar locales files to a single file.
Not resolving those symbolic links means we'll be opening a single file via multiple
HyphenationDictionary objects, which is far from optimal.

To add insult to injury, these HyphenationDictionary objects were stored in a TinyLRUCache
with a slim capacity of 4. This meant that while already loading one single file through
multiple symlinks, because of continuous eviciton from this LRU cache the same symlinks
continued to be processed, in some cases resulting in opening the same dictionary file
hundreds or thousands of times. The capacity of this TinyLRUCache is increased to 32
to keep the amount of open libhyphen dictionaries capped at some reasonable number.

  • platform/text/hyphen/HyphenationLibHyphen.cpp:

(WebCore::scanDirectoryForDicionaries):

10:41 AM Changeset in webkit [210669] by jfernandez@igalia.com
  • 6 edits
    8 adds in trunk

[css-grid] Make the grid sizing data persistent through layouts
https://bugs.webkit.org/show_bug.cgi?id=166883

Reviewed by Darin Adler and Manuel Rego Casasnovas.

Source/WebCore:

We want to keep the grid sizing data structures through different
layouts. This will allow to optimize some operations, reusing
these data while still valid. Additionally, operations like
determining the baseline position when the grid container is under
an inline formatting context need these data once the grid has
been laid out.

This patch controls the sizing data validity and make the data
structures persistent after layout.

Tests: fast/css-grid-layout/grid-add-item-with-positioned-items.html

fast/css-grid-layout/grid-add-positioned-block-item-after-inline-item.html
fast/css-grid-layout/grid-container-change-explicit-grid-recompute-child.html
fast/css-grid-layout/grid-item-change-order-auto-flow.html

  • rendering/RenderBox.cpp:

(WebCore::RenderBox::styleDidChange): Evaluate if the style change made the grid data invalid.
(WebCore::RenderBox::updateGridPositionAfterStyleChange): Evaluate if the style change made the grid data invalid.

  • rendering/RenderBox.h:
  • rendering/RenderGrid.cpp:

(WebCore::RenderGrid::Grid::setNeedsItemsPlacement): The grid must execute the items placement logic before continue processing the layout.
(WebCore::RenderGrid::addChild): Mark the grid data as dirty.
(WebCore::RenderGrid::removeChild): Mark the grid data as dirty.
(WebCore::RenderGrid::styleDidChange): Evaluate grid data validity.
(WebCore::RenderGrid::explicitGridDidResize): Mark the grid data as dirty.
(WebCore::RenderGrid::namedGridLinesDefinitionDidChange): Mark the grid data as dirty.
(WebCore::RenderGrid::layoutBlock): We don't need to clear the grid data anymore.
(WebCore::RenderGrid::dirtyGrid): Clearing the grid data and mark is as needing to execute the items placement logic.
(WebCore::RenderGrid::trackSizesForComputedStyle): Assert we don't need to perform the items placement logic.
(WebCore::RenderGrid::paintChildren): Assert we don't need to perform the items placement logic.

  • rendering/RenderGrid.h:

(WebCore::RenderGrid::clear): Deleted.

LayoutTests:

The tests added are now needed to verify we perform correctly the
data validation after certain style changes.

  • fast/css-grid-layout/grid-add-item-with-positioned-items-expected.txt: Added.
  • fast/css-grid-layout/grid-add-item-with-positioned-items.html: Added.
  • fast/css-grid-layout/grid-add-positioned-block-item-after-inline-item-expected.txt: Added.
  • fast/css-grid-layout/grid-add-positioned-block-item-after-inline-item.html: Added.
  • fast/css-grid-layout/grid-container-change-explicit-grid-recompute-child-expected.txt: Added.
  • fast/css-grid-layout/grid-container-change-explicit-grid-recompute-child.html: Added.
  • fast/css-grid-layout/grid-item-change-order-auto-flow-expected.txt: Added.
  • fast/css-grid-layout/grid-item-change-order-auto-flow.html: Added.
10:34 AM Changeset in webkit [210668] by Chris Dumez
  • 14 edits in trunk

[iOS] Implement support for KeyboardEvent.code
https://bugs.webkit.org/show_bug.cgi?id=166932
<rdar://problem/29972518>

Reviewed by Darin Adler.

Source/WebCore:

Implement support for KeyboardEvent.code on iOS.

No new tests, updated existing test.

  • platform/ios/PlatformEventFactoryIOS.h:
  • platform/ios/PlatformEventFactoryIOS.mm:

(WebCore::codeForKeyEvent):
(WebCore::PlatformKeyboardEventBuilder::PlatformKeyboardEventBuilder):

Source/WebKit2:

Make sure KeyboardEvent.code is properly initialized on
iOS WK2.

  • Shared/WebEvent.h:
  • Shared/WebKeyboardEvent.cpp:

(WebKit::WebKeyboardEvent::WebKeyboardEvent):

  • Shared/ios/WebIOSEventFactory.mm:

(WebIOSEventFactory::createWebKeyboardEvent):

Source/WTF:

Enable KEYBOARD_CODE_ATTRIBUTE feature on iOS.

  • wtf/FeatureDefines.h:

LayoutTests:

Extend layout test coverage and rebaseline a couple of existing tests
now that more checks are passing.

  • fast/events/ios/keyboard-event-key-attribute-expected.txt:
  • fast/events/ios/keyboard-event-key-attribute.html:
  • platform/ios-simulator/fast/events/constructors/keyboard-event-constructor-expected.txt:
  • platform/ios-simulator/imported/w3c/web-platform-tests/dom/events/Event-subclasses-constructors-expected.txt:
10:30 AM Changeset in webkit [210667] by commit-queue@webkit.org
  • 38 edits
    8 deletes in trunk

[WebIDL] Autogenerate named getters
https://bugs.webkit.org/show_bug.cgi?id=166835

Patch by Sam Weinig <sam@webkit.org> on 2017-01-12
Reviewed by Alex Christensen.

Source/WebCore:

  • Modules/mediastream/RTCStatsResponse.idl:

Update type to be nullable, since generator expects that for now.

  • WebCore.xcodeproj/project.pbxproj:
  • bindings/js/JSCustomSQLStatementErrorCallback.cpp: Removed.
  • bindings/js/JSDOMMimeTypeArrayCustom.cpp: Removed.
  • bindings/js/JSDOMNamedFlowCollectionCustom.cpp: Removed.
  • bindings/js/JSDOMPluginArrayCustom.cpp: Removed.
  • bindings/js/JSDOMPluginCustom.cpp: Removed.
  • bindings/js/JSNamedNodeMapCustom.cpp: Removed.
  • bindings/js/JSRTCStatsResponseCustom.cpp: Removed.
  • bindings/js/JSStyleSheetListCustom.cpp: Removed.

Remove deleted files.

  • bindings/js/JSSQLStatementErrorCallbackCustom.cpp:

Renamed from Source/WebCore/bindings/js/JSCustomSQLStatementErrorCallback.cpp for consistency.

  • bindings/IDLTypes.h:

(WebCore::IDLNullable::nullValue):
(WebCore::IDLNullable::isNullValue):
(WebCore::IDLNullable::extractValueFromNullable):
Add Nullable traits for IDLNullable, that call down to the underlying type. This allows
us to more easily tests for nullability without stripping the IDLNullable off.

  • bindings/js/JSDOMStringMapCustom.cpp:

(WebCore::JSDOMStringMap::getOwnPropertySlotDelegate): Deleted.
(WebCore::JSDOMStringMap::getOwnPropertyNames): Deleted.
Remove overriden getOwnPropertySlot and getOwnPropertyNames.

  • bindings/js/JSHTMLCollectionCustom.cpp:

(WebCore::JSHTMLCollection::nameGetter): Deleted.

  • bindings/js/JSHTMLFormElementCustom.cpp:

(WebCore::JSHTMLFormElement::nameGetter): Deleted.

  • bindings/js/JSHTMLOptionsCollectionCustom.cpp:

(WebCore::JSHTMLOptionsCollection::nameGetter): Deleted.

  • bindings/js/JSStorageCustom.cpp:

(WebCore::JSStorage::nameGetter): Deleted.
Remove custom name getters.

  • bindings/js/JSHTMLSelectElementCustom.cpp:

(WebCore::selectElementIndexSetter):

  • html/HTMLSelectElement.cpp:

(WebCore::HTMLSelectElement::setItem):
(WebCore::HTMLSelectElement::setLength):
(WebCore::HTMLSelectElement::setOption): Deleted.

  • html/HTMLSelectElement.h:

Add implementation of HTMLSelectElement::setItem() that does properly
removes if the option is null. Re-implement selectElementIndexSetter to
use it and switch conversion code to use JSDOMConvert.

  • bindings/scripts/CodeGeneratorJS.pm:

(GenerateIndexedGetter):
(GenerateNamedGetter):
Extract typed getter generation into their own functions.

(GenerateGetOwnPropertySlotBody):
(GenerateGetOwnPropertySlotBodyByIndex):
Extract getOwnPropertySlotBody / getOwnPropertySlotBodyByIndex generation
into their own functions. Add support for generating name getters.

(GenerateGetOwnPropertyNames):
Extract getOwnPropertyNames generation into its own function, adding support
for respecting the LegacyUnenumerableNamedProperties attribute and switching
the default to not include named properties in the enumerated names.

(GeneratePut):
(GeneratePutByIndex):
Extract put / putByIndex generators into their own functions in preparation
of supporting namedSetters in the future.

(GetIndexedSetterFunction):
(GetNamedSetterFunction):
(GetNamedDeleterFunction):
Add helper getter functions to extract named/index setter/deleters.

(InstanceOverridesPut):
Add helper predicate to determine if an interface needs an implementation
of put.

(GenerateHeader):
Place custom helper functions (e.g. nameGetter/putDelegate/etc.) together
in the generated header.

(GenerateImplementation):
(GenerateCallbackImplementationContent):
Replace inline generation with calls to the new helper generator functions.

(NativeToJSValueUsingReferences):
(NativeToJSValueUsingPointers):
(NativeToJSValue):
Remove unused inFunctionCall parameter, and add new suppressExceptionCheck
parameter, which is used for nameGetters.

  • bindings/scripts/IDLAttributes.txt:

Add LegacyUnenumerableNamedProperties.

  • css/StyleSheetList.cpp:

(WebCore::StyleSheetList::namedItem):
(WebCore::StyleSheetList::getNamedItem): Deleted.

  • css/StyleSheetList.h:
  • css/StyleSheetList.idl:

Rename getNamedItem to namedItem, and make it return a CSSStyleSheet*
which is what the bindings specify.

  • dom/DOMNamedFlowCollection.idl:

Add LegacyUnenumerableNamedProperties to match existing behavior.

  • dom/DOMStringMap.h:

Switch from typedef to type alias.

  • dom/DOMStringMap.idl:

Remove CustomEnumerateProperty and JSCustomGetOwnPropertySlotAndDescriptor
and add the getter. Also add the missing setter and deleter commented out.

  • dom/DatasetDOMStringMap.h:
  • dom/DatasetDOMStringMap.cpp:

(WebCore::DatasetDOMStringMap::supportedPropertyNames):
(WebCore::DatasetDOMStringMap::names): Deleted.
Rename names to supportedPropertyNames to support the bindings.

(WebCore::DatasetDOMStringMap::item):
(WebCore::DatasetDOMStringMap::namedItem):
Add namedItems (to support the bindings), and rework item to return
an optional rather than using a bool out parameter.

  • dom/NamedNodeMap.idl:

Add LegacyUnenumerableNamedProperties matching the spec.

  • html/HTMLAllCollection.idl:

Add CustomNamedGetter and LegacyUnenumerableNamedProperties. Update signatures
to match the spec. Commenting out ones not implemented yet.

  • html/HTMLCollection.idl:

Add LegacyUnenumerableNamedProperties matching the spec.

  • html/HTMLFormControlsCollection.idl:

Add CustomNamedGetter. Update signature of the getter to match the spec.
The reason this can't be generated yet is that we don't have a good strategy
for functions with differing return types that shadow each other.

  • html/HTMLFormElement.h:
  • html/HTMLFormElement.cpp:

(WebCore::HTMLFormElement::namedItem):
(WebCore::HTMLFormElement::supportedPropertyNames):
Add implementation of namedItem and stub of supportedPropertyNames.

  • html/HTMLFormElement.idl:

Add LegacyUnenumerableNamedProperties and remove CustomNamedGetter. Update
the signatures to match the spec.

  • page/DOMWindow.idl:

Add LegacyUnenumerableNamedProperties matching the spec.

  • plugins/DOMMimeTypeArray.idl:
  • plugins/DOMPlugin.idl:
  • plugins/DOMPluginArray.idl:

Add LegacyUnenumerableNamedProperties and add nullability to return types.

LayoutTests:

  • fast/dom/HTMLSelectElement/select-selectedIndex-expected.txt:
  • fast/dom/HTMLSelectElement/select-selectedIndex-multiple-expected.txt:
  • js/dom/reflect-set-onto-dom-expected.txt:

Update exception text.

9:52 AM Changeset in webkit [210666] by akling@apple.com
  • 4 edits in trunk/Source/WebKit2

WebBackForwardListProxy should remove restored session history items from PageCache on close.
<https://webkit.org/b/166972>
<rdar://problem/28904157>

Reviewed by Brady Eidson.

Register history item ID's from the UIProcess with the associated-items map
so that we can remove any PageCache entries associated with them immediately
when closing a WebPage.

Otherwise they might not get removed until the next PageCache pruning happens.
This patch is a speculative fix for what looks like it might be weirdness
related to a PageCache entry outliving its originating Page.

  • WebProcess/WebPage/WebBackForwardListProxy.cpp:

(WebKit::WebBackForwardListProxy::addItemFromUIProcess):

  • WebProcess/WebPage/WebBackForwardListProxy.h:
  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::restoreSessionInternal):

9:49 AM Changeset in webkit [210665] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Rebaseline inspector/dom/getAccessibilityPropertiesForNode.html after r210605.

Unreviewed test gardening.

  • inspector/dom/getAccessibilityPropertiesForNode-expected.txt:
9:31 AM Changeset in webkit [210664] by Michael Catanzaro
  • 4 edits in trunk/Source/WebKit2

[GTK] Correct license on WebKitSecurityOrigin headers

These ought to be LGPLv2+, because the rest of the GTK+ API is LPGLv2+.

  • UIProcess/API/gtk/WebKitSecurityOrigin.cpp:
  • UIProcess/API/gtk/WebKitSecurityOrigin.h:
  • UIProcess/API/gtk/WebKitSecurityOriginPrivate.h:
9:06 AM Changeset in webkit [210663] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore

[iOS][WK1] Fix initialization of CADisplayLink::preferredFramesPerSecond
https://bugs.webkit.org/show_bug.cgi?id=166956

Patch by Said Abou-Hallawa <sabouhallawa@apple.com> on 2017-01-12
Reviewed by Tim Horton.

Set this option to 60fps instead of leaving set to the default.

  • platform/graphics/ios/DisplayRefreshMonitorIOS.mm:

(-[WebDisplayLinkHandler initWithMonitor:]):

8:46 AM Changeset in webkit [210662] by matthew_hanson@apple.com
  • 13 edits
    2 deletes in branches/safari-603-branch/Source/JavaScriptCore

Merge r210565. rdar://problem/29942167

8:46 AM Changeset in webkit [210661] by matthew_hanson@apple.com
  • 6 edits
    4 adds in branches/safari-603-branch

Merge r210564. rdar://problem/29944582

8:46 AM Changeset in webkit [210660] by matthew_hanson@apple.com
  • 5 edits
    1 add in branches/safari-603-branch

Merge r210563. rdar://problem/29940224

8:46 AM Changeset in webkit [210659] by matthew_hanson@apple.com
  • 5 edits in branches/safari-603-branch/Source/JavaScriptCore

Merge r210553. rdar://problem/29941356

8:46 AM Changeset in webkit [210658] by matthew_hanson@apple.com
  • 2 edits in branches/safari-603-branch/Source/WebKit/mac

Merge r210550. rdar://problem/29944874

8:45 AM Changeset in webkit [210657] by matthew_hanson@apple.com
  • 7 edits in branches/safari-603-branch

Merge r210546. rdar://problem/29491188

8:45 AM Changeset in webkit [210656] by matthew_hanson@apple.com
  • 4 edits
    2 adds in branches/safari-603-branch/LayoutTests

Merge r210538. rdar://problem/29941747

8:45 AM Changeset in webkit [210655] by matthew_hanson@apple.com
  • 2 edits in branches/safari-603-branch/Source/JavaScriptCore

Merge r210530. rdar://problem/29909896

8:45 AM Changeset in webkit [210654] by matthew_hanson@apple.com
  • 2 edits in branches/safari-603-branch/Source/WebKit2

Merge r210525. rdar://problem/29931470

8:45 AM Changeset in webkit [210653] by matthew_hanson@apple.com
  • 16 edits
    2 copies
    1 move
    10 adds
    1 delete in branches/safari-603-branch/Source/JavaScriptCore

Merge r210521. rdar://problem/29909896

8:45 AM Changeset in webkit [210652] by matthew_hanson@apple.com
  • 1 edit
    2 adds in branches/safari-603-branch/LayoutTests

Merge r210516. rdar://problem/28693432

8:45 AM Changeset in webkit [210651] by matthew_hanson@apple.com
  • 2 edits in branches/safari-603-branch/Source/WebCore

Merge r210508. rdar://problem/29801059

8:45 AM Changeset in webkit [210650] by matthew_hanson@apple.com
  • 2 edits in branches/safari-603-branch/Source/WebCore

Merge r210472. rdar://problem/29767412

8:45 AM Changeset in webkit [210649] by matthew_hanson@apple.com
  • 2 edits in branches/safari-603-branch/LayoutTests/imported/w3c

Merge r210471. rdar://problem/29859121

8:45 AM Changeset in webkit [210648] by matthew_hanson@apple.com
  • 8 edits
    3 adds in branches/safari-603-branch

Merge r210468. rdar://problem/29859121

8:45 AM Changeset in webkit [210647] by matthew_hanson@apple.com
  • 3 edits
    1 add in branches/safari-603-branch

Merge r210457. rdar://problem/27330808

8:45 AM Changeset in webkit [210646] by matthew_hanson@apple.com
  • 2 edits in branches/safari-603-branch/LayoutTests

Merge r210443. rdar://problem/28215999

8:45 AM Changeset in webkit [210645] by matthew_hanson@apple.com
  • 3 edits in branches/safari-603-branch/Source/WebCore

Merge r210425. rdar://problem/29872021

8:45 AM Changeset in webkit [210644] by matthew_hanson@apple.com
  • 2 edits in branches/safari-603-branch/Source/WebCore

Merge r210378. rdar://problem/29024384

8:45 AM Changeset in webkit [210643] by matthew_hanson@apple.com
  • 2 edits in branches/safari-603-branch/Source/WebCore

Merge r210376. rdar://problem/29763079

8:45 AM Changeset in webkit [210642] by matthew_hanson@apple.com
  • 4 edits in branches/safari-603-branch/LayoutTests

Merge r210371. rdar://problem/29851126

8:45 AM Changeset in webkit [210641] by matthew_hanson@apple.com
  • 2 edits in branches/safari-603-branch/Source/WebKit2

Merge r210281. rdar://problem/29849769

8:45 AM Changeset in webkit [210640] by matthew_hanson@apple.com
  • 10 edits
    10 adds in branches/safari-603-branch

Merge r210147. rdar://problem/29675551

8:45 AM Changeset in webkit [210639] by matthew_hanson@apple.com
  • 2 edits in branches/safari-603-branch/Source/WebCore

Merge r210095. rdar://problem/29912221

8:44 AM Changeset in webkit [210638] by matthew_hanson@apple.com
  • 24 edits
    2 adds in branches/safari-603-branch

Merge r210432. rdar://problem/29633667

8:44 AM Changeset in webkit [210637] by matthew_hanson@apple.com
  • 3 edits in branches/safari-603-branch/Source/WebCore

Merge r210131. rdar://problem/29633667

8:44 AM Changeset in webkit [210636] by matthew_hanson@apple.com
  • 2 edits in branches/safari-603-branch/Source/WebCore

Merge r210094. rdar://problem/29912214

8:44 AM Changeset in webkit [210635] by matthew_hanson@apple.com
  • 2 edits in branches/safari-603-branch/Source/WebCore

Merge r210078. rdar://problem/29633667

8:44 AM Changeset in webkit [210634] by matthew_hanson@apple.com
  • 10 edits in branches/safari-603-branch

Merge r210451. rdar://problem/29909812

8:44 AM Changeset in webkit [210633] by matthew_hanson@apple.com
  • 5 edits in branches/safari-603-branch/Source

Merge r210398. rdar://problem/29229439

8:07 AM Changeset in webkit [210632] by Gyuyoung Kim
  • 2 edits in trunk/LayoutTests

[EFL] Gardening on 13th Jan.

Unreviewed EFL Gardening. Update crash and timeout tests after bumping Ubuntu version.

  • platform/efl/TestExpectations:
5:56 AM Changeset in webkit [210631] by eric.carlson@apple.com
  • 2 edits in trunk/Source/WebKit2

[MediaStream, Mac] Render media stream audio buffers
https://bugs.webkit.org/show_bug.cgi?id=159836
<rdar://problem/27380390>

Unreviewed, revert accidental change.

  • WebProcess/com.apple.WebProcess.sb.in:
3:49 AM Changeset in webkit [210630] by Yusuke Suzuki
  • 2 edits in trunk/Source/WebCore

Unreviewed, build fix for macOS ports
https://bugs.webkit.org/show_bug.cgi?id=166925

  • WebCore.xcodeproj/project.pbxproj:
3:26 AM Changeset in webkit [210629] by Gyuyoung Kim
  • 2 edits in trunk/LayoutTests

[EFL] Second update TestExpectation file for Ubuntu 16.04.

Unreviewed EFL gardening.

  • platform/efl/TestExpectations: Need to update this file for EFL bot again.
1:22 AM Changeset in webkit [210628] by pvollan@apple.com
  • 8 edits in trunk/Tools

Followup fix after r210503.
https://bugs.webkit.org/show_bug.cgi?id=166887

Reviewed by Alex Christensen.

After <http://trac.webkit.org/changeset/210503>, test results are written to a
duplicated file handle on Windows. This patch fixes the remaining call sites.

  • DumpRenderTree/PixelDumpSupport.cpp:
  • DumpRenderTree/TestRunner.cpp:

(TestRunner::waitToDumpWatchdogTimerFired):

  • DumpRenderTree/TestRunner.h:
  • DumpRenderTree/win/AccessibilityControllerWin.cpp:
  • DumpRenderTree/win/DumpRenderTree.cpp:
  • DumpRenderTree/win/DumpRenderTreeWin.h:
  • DumpRenderTree/win/TestRunnerWin.cpp:

(TestRunner::setSpellCheckerLoggingEnabled):

1:01 AM Changeset in webkit [210627] by Yusuke Suzuki
  • 19 edits
    2 copies
    2 adds in trunk/Source

Implement InlineClassicScript
https://bugs.webkit.org/show_bug.cgi?id=166925

Reviewed by Ryosuke Niwa.

Source/JavaScriptCore:

Add ScriptFetcher field for SourceOrigin.

  • runtime/SourceOrigin.h:

(JSC::SourceOrigin::SourceOrigin):
(JSC::SourceOrigin::fetcher):

Source/WebCore:

As of r210585, ScriptFetcher functionality is decoupled from ScriptElement.
This patch is a further cleanup. We introduce InlineClassicScript, which is
similar to LoadableClassicScript / LoadableModuleScript. And we move ScriptFetcher
functionality from LoadableScript to CachedScriptFetcher, which is the base
class of InlineClassicScript and LoadableScript.

And we start setting this CachedScriptFetcher to the member of JSC::SourceOrigin.
This allows us to examine the ScriptFetcher from the SourceOrigin.
When dynamic-import operator is called, we need to get the ScriptFetcher from the
caller script SourceOrigin since the subsequent module loading needs to know the
metadata about fetching and ScriptFetcher delivers it.

No behavior change.

  • CMakeLists.txt:
  • bindings/js/CachedModuleScript.cpp:

(WebCore::CachedModuleScript::load):

  • bindings/js/CachedModuleScript.h:
  • bindings/js/CachedModuleScriptLoader.cpp:

(WebCore::CachedModuleScriptLoader::create):
(WebCore::CachedModuleScriptLoader::CachedModuleScriptLoader):
(WebCore::CachedModuleScriptLoader::load):

  • bindings/js/CachedModuleScriptLoader.h:
  • bindings/js/CachedScriptFetcher.cpp: Copied from Source/WebCore/dom/LoadableScript.cpp.

(WebCore::CachedScriptFetcher::requestScriptWithCache):

  • bindings/js/CachedScriptFetcher.h: Copied from Source/JavaScriptCore/runtime/SourceOrigin.h.

(WebCore::CachedScriptFetcher::CachedScriptFetcher):

  • bindings/js/CachedScriptSourceProvider.h:

(WebCore::CachedScriptSourceProvider::create):
(WebCore::CachedScriptSourceProvider::CachedScriptSourceProvider):
(WebCore::makeSource): Deleted.

  • bindings/js/ScriptController.cpp:

(WebCore::ScriptController::loadModuleScriptInWorld):
(WebCore::ScriptController::loadModuleScript):

  • bindings/js/ScriptController.h:
  • bindings/js/ScriptModuleLoader.cpp:

(WebCore::ScriptModuleLoader::fetch):
(WebCore::ScriptModuleLoader::notifyFinished):

  • bindings/js/ScriptSourceCode.h:

(WebCore::ScriptSourceCode::ScriptSourceCode):
(WebCore::ScriptSourceCode::m_url):

  • dom/InlineClassicScript.cpp: Added.

(WebCore::InlineClassicScript::create):

  • dom/InlineClassicScript.h: Added.
  • dom/LoadableClassicScript.cpp:

(WebCore::LoadableClassicScript::execute):

  • dom/LoadableScript.cpp:

(WebCore::LoadableScript::requestScriptWithCache): Deleted.

  • dom/LoadableScript.h:

(WebCore::LoadableScript::LoadableScript):
(): Deleted.

  • dom/ScriptElement.cpp:

(WebCore::ScriptElement::prepareScript):
(WebCore::ScriptElement::requestModuleScript):
(WebCore::ScriptElement::executePendingScript):

  • html/parser/HTMLScriptRunner.cpp:

(WebCore::HTMLScriptRunner::runScript):

  • xml/parser/XMLDocumentParserLibxml2.cpp:

(WebCore::XMLDocumentParser::endElementNs):

Jan 11, 2017:

11:18 PM Changeset in webkit [210626] by rniwa@webkit.org
  • 16 edits
    1 move
    1 add in trunk/Websites/perf.webkit.org

Hide the UI to trigger an A/B testing when there are no triggerables
https://bugs.webkit.org/show_bug.cgi?id=166964

Reviewed by Yusuke Suzuki.

Hide the "Start A/B Testing" button on analysis task pages instead of showing it and failing later
when the user tries to create one it with a TriggerableNotFound error.

Added the list of triggerables to the manifest JSON so that we can determine this condition without
having to fetch /api/triggerable for each analysis task as done in v2 UI.

  • public/admin/reprocess-report.php:
  • public/api/manifest.php:
  • public/api/report.php:
  • public/include/admin-header.php:
  • public/include/manifest-generator.php: Moved from public/include/manifest.php.

(ManifestGenerator::generate):
(ManifestGenerator::triggerables): Added. Include the list of repositories this triggerable accepts
as well as the list of (test, platform) pairs on which this triggerable is available.
Use [testId, platformId] instead of a dictionary to reduce the file size.

  • public/v3/components/customizable-test-group-form.js:

(CustomizableTestGroupForm): Removed this._disabled. This variable was used in TestGroupFrom to
disable the "Start A/B Testing" button when no range is selected but this ended up racy. Compute
the visibility of the button in render() function instead.
(CustomizableTestGroupForm.prototype.setRootSetMap):
(CustomizableTestGroupForm.prototype._submitted):
(CustomizableTestGroupForm.prototype.render): Hide the customize link and the button as needed.
The "Start A/B Testing" button must be hidden when either no range is selected or no title is typed.
"Customize" button must be hidden when no range is selected.

  • public/v3/components/test-group-form.js:

(TestGroupForm): Removed _disabled since it's no longer used.
(TestGroupForm.prototype.setDisabled): Ditto.
(TestGroupForm.prototype.render): Ditto.

  • public/v3/index.html: Include triggerable.js.
  • public/v3/models/manifest.js:

(Manifest._didFetchManifest): Modernized. Create Triggerable objects from the manifest JSON.

  • public/v3/models/triggerable.js: Added.

(Triggerable): Add this triggerable object to the static map of (test id, platform id) pair.
(Triggerable.prototype.acceptedRepositories): Added.
(Triggerable.findByTestConfiguration): Added. Finds a triggerable in the aforementioned static map.

  • public/v3/pages/analysis-task-page.js:

(AnalysisTaskChartPane.prototype._updateStatus): Added. Re-render the page since time series data
points that were previously not available may have become available. The lack of this update was
causing a race condition in which the "Start A/B Testing" button for the charts is disabled even
after a group name had been specified because setRootSetMap was never called with a valid set.
(AnalysisTaskPage): Added this._triggerable.
(AnalysisTaskPage.prototype._didFetchTask): Find the triggerable now that we've fetched the task.
(AnalysisTaskPage.prototype.render): Hide the group view (the table of A/B testing results) entirely
when there are no groups to show. Also hide the forms to start A/B testing when there are no matching
triggerable, which is the main feature of this patch.

  • server-tests/api-manifest.js: Added a test for including a list of triggerables in the manifest JSON.
  • server-tests/resources/mock-data.js:

(MockData.resetV3Models): Reset Triggerable's static map.

  • server-tests/tools-buildbot-triggerable-tests.js: Assert that Triggerable objects are constructed

with appropriate list of repositories and (test, platform) associations.

  • tools/js/database.js:

(tableToPrefixMap): Added triggerable_repositories's prefix.

  • tools/js/remote.js:

(RemoteAPI.prototype.getJSON): Log the entire response to stderr when JSON.parse fails to aid debugging.

  • tools/js/v3-models.js: Import triggerable.js.
10:50 PM Changeset in webkit [210625] by rniwa@webkit.org
  • 2 edits in trunk/Websites/perf.webkit.org

fetch-from-remote doesn’t work with some websites
https://bugs.webkit.org/show_bug.cgi?id=166963

Reviewed by Yusuke Suzuki.

Apparently file_get_contents is not compatible with some SSL/TLS connections.
Use curl_* functions to access remote servers instead.

  • public/admin/fetch-from-remote.php:

(fetch_remote):

10:16 PM Changeset in webkit [210624] by beidson@apple.com
  • 2 edits in trunk/Source/WebKit2

Add IconLoadingDelegate functionality to WKView.
https://bugs.webkit.org/show_bug.cgi?id=166951

Reviewed by Tim Horton.

  • UIProcess/API/mac/WKView.mm:

(-[WKView dealloc]):
(-[WKView maybeInstallIconLoadingClient]): If the subclass implements the delegate method, install the

icon loading client. Otherwise, maintain the normal IconDatabase loading behavior.

(-[WKView initWithFrame:processPool:configuration:webView:]):

9:59 PM Changeset in webkit [210623] by commit-queue@webkit.org
  • 1 edit
    3 adds in trunk/Source/WebInspectorUI

Web Inspector: Add another Protocol Version
https://bugs.webkit.org/show_bug.cgi?id=166953
<rdar://problem/29980631>

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2017-01-11
Reviewed by Timothy Hatcher.

  • UserInterface/Protocol/Legacy/10.3/InspectorBackendCommands.js: Added.
  • Versions/Inspector-iOS-10.3.json: Added.
9:56 PM Changeset in webkit [210622] by commit-queue@webkit.org
  • 4 edits in trunk/LayoutTests

REGRESSION(r206133): LayoutTest inspector/css/manager-preferredInspectorStyleSheetForFrame.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=162305
<rdar://problem/28389364>

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2017-01-11
Reviewed by Timothy Hatcher.

  • inspector/css/manager-preferredInspectorStyleSheetForFrame-expected.txt:
  • inspector/css/manager-preferredInspectorStyleSheetForFrame.html:

Revert the change that broke this and move to more deterministic callbacks
that don't include the extra variance in producing output.

9:22 PM Changeset in webkit [210621] by eric.carlson@apple.com
  • 24 edits
    1 delete in trunk/Source

[MediaStream, Mac] Render media stream audio buffers
https://bugs.webkit.org/show_bug.cgi?id=159836
<rdar://problem/27380390>

Reviewed by Jer Noble.

No new tests, it isn't possible to test audio rendering directly. A follow-up patch will
add a mock audio source that will enable audio testing.

  • platform/cf/CoreMediaSoftLink.cpp: Include new functions used.
  • platform/cf/CoreMediaSoftLink.h:
  • WebCore.xcodeproj/project.pbxproj: Remove references to the deleted previews.
  • platform/Logging.h: Add MediaCaptureSamples.
  • platform/MediaSample.h: Add outputPresentationTime and outputDuration.
  • platform/cf/CoreMediaSoftLink.cpp: Add CMSampleBufferGetOutputDuration, CMSampleBufferGetOutputPresentationTimeStamp,

CMTimeConvertScale, CMTimebaseGetEffectiveRate, CMAudioSampleBufferCreateWithPacketDescriptions,
CMSampleBufferSetDataBufferFromAudioBufferList, CMSampleBufferSetDataReady,
CMAudioFormatDescriptionCreate, CMClockGetHostTimeClock, and CMClockGetTime.

  • platform/cf/CoreMediaSoftLink.h:

Create and use an AVSampleBufferAudioRenderer each audio stream track, when it is available,
to render for audio samples. Store the offset between the first sample received from a track's
output presentation and the synchronizer time so we can adjust sample timestamps to be
relative to the synchronizer's timeline regardless of their source. Remove the use of source
previews because not all sources will have them.

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

Add an ObjC helper to catch renderer status changes.
(-[WebAVSampleBufferStatusChangeListener initWithParent:]):
(-[WebAVSampleBufferStatusChangeListener dealloc]):
(-[WebAVSampleBufferStatusChangeListener invalidate]):
(-[WebAVSampleBufferStatusChangeListener beginObservingLayer:]):
(-[WebAVSampleBufferStatusChangeListener stopObservingLayer:]):
(-[WebAVSampleBufferStatusChangeListener beginObservingRenderer:]):
(-[WebAVSampleBufferStatusChangeListener stopObservingRenderer:]):
(-[WebAVSampleBufferStatusChangeListener observeValueForKeyPath:ofObject:change:context:]):
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::MediaPlayerPrivateMediaStreamAVFObjC):
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::~MediaPlayerPrivateMediaStreamAVFObjC):
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::removeOldSamplesFromPendingQueue):
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::addSampleToPendingQueue):
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::updateSampleTimes):
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::enqueueAudioSample):
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::enqueueVideoSample):
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::requestNotificationWhenReadyForVideoData):
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::requestNotificationWhenReadyForAudioData):
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::createAudioRenderer):
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::destroyAudioRenderer):
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::destroyAudioRenderers):
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::audioSourceProvider):
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::rendererStatusDidChange):
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::layerStatusDidChange):
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::flushRenderers):
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::ensureLayer):
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::destroyLayer):
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::platformLayer):
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::currentDisplayMode):
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::play):
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::enqueueAudioSampleBufferFromTrack): Deleted.
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::requestNotificationWhenReadyForMediaData): Deleted.
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::enqueueVideoSampleBuffer): Deleted.
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::prepareVideoSampleBufferFromTrack): Deleted.
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::internalSetVolume): Deleted.

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

(WebCore::MediaSampleAVFObjC::outputPresentationTime): New.
(WebCore::MediaSampleAVFObjC::outputDuration): New.
(WebCore::MediaSampleAVFObjC::dump): Log outputPresentationTime.

  • platform/mediastream/AudioTrackPrivateMediaStream.h: Add timelineOffset.
  • platform/mediastream/MediaStreamTrackPrivate.cpp:

(WebCore::MediaStreamTrackPrivate::setEnabled): No more m_preview.
(WebCore::MediaStreamTrackPrivate::endTrack): Ditto.
(WebCore::MediaStreamTrackPrivate::preview): Deleted.

  • platform/mediastream/MediaStreamTrackPrivate.h:
  • platform/mediastream/RealtimeMediaSource.h:

(WebCore::RealtimeMediaSource::preview): Deleted.

  • platform/mediastream/RealtimeMediaSourcePreview.h: Removed.
  • platform/mediastream/VideoTrackPrivateMediaStream.h: Add timelineOffset.
  • platform/mediastream/mac/AVAudioCaptureSource.h:
  • platform/mediastream/mac/AVAudioCaptureSource.mm:

(WebCore::AVAudioCaptureSource::updateSettings):
(WebCore::AVAudioCaptureSource::captureOutputDidOutputSampleBufferFromConnection): Pass the
sample buffer up the chain.
(WebCore::AVAudioSourcePreview::create): Deleted.
(WebCore::AVAudioSourcePreview::AVAudioSourcePreview): Deleted.
(WebCore::AVAudioSourcePreview::invalidate): Deleted.
(WebCore::AVAudioSourcePreview::play): Deleted.
(WebCore::AVAudioSourcePreview::pause): Deleted.
(WebCore::AVAudioSourcePreview::setEnabled): Deleted.
(WebCore::AVAudioSourcePreview::setVolume): Deleted.
(WebCore::AVAudioSourcePreview::updateState): Deleted.
(WebCore::AVAudioCaptureSource::createPreview): Deleted.

  • platform/mediastream/mac/AVMediaCaptureSource.h:

(WebCore::AVMediaSourcePreview): Deleted.
(WebCore::AVMediaCaptureSource::createWeakPtr): Deleted.

  • platform/mediastream/mac/AVMediaCaptureSource.mm:

(WebCore::AVMediaCaptureSource::AVMediaCaptureSource): No more preview.
(WebCore::AVMediaCaptureSource::reset):
(WebCore::AVMediaCaptureSource::preview): Deleted.
(WebCore::AVMediaCaptureSource::removePreview): Deleted.
(WebCore::AVMediaSourcePreview::AVMediaSourcePreview): Deleted.
(WebCore::AVMediaSourcePreview::~AVMediaSourcePreview): Deleted.
(WebCore::AVMediaSourcePreview::invalidate): Deleted.

  • platform/mediastream/mac/AVVideoCaptureSource.h:
  • platform/mediastream/mac/AVVideoCaptureSource.mm:

(WebCore::AVVideoCaptureSource::processNewFrame): Don't set the "display immediately" attachment.
(WebCore::AVVideoSourcePreview::create): Deleted.
(WebCore::AVVideoSourcePreview::AVVideoSourcePreview): Deleted.
(WebCore::AVVideoSourcePreview::backgroundLayerBoundsChanged): Deleted.
(WebCore::AVVideoSourcePreview::invalidate): Deleted.
(WebCore::AVVideoSourcePreview::play): Deleted.
(WebCore::AVVideoSourcePreview::pause): Deleted.
(WebCore::AVVideoSourcePreview::setPaused): Deleted.
(WebCore::AVVideoSourcePreview::setEnabled): Deleted.
(WebCore::AVVideoCaptureSource::createPreview): Deleted.
(-[WebCoreAVVideoCaptureSourceObserver setParent:]): Deleted.
(-[WebCoreAVVideoCaptureSourceObserver observeValueForKeyPath:ofObject:change:context:]): Deleted.

  • platform/mediastream/mac/MockRealtimeVideoSourceMac.mm:

(WebCore::MockRealtimeVideoSourceMac::CMSampleBufferFromPixelBuffer): Use a more typical video
time scale. Set the sample decode time.
(WebCore::MockRealtimeVideoSourceMac::pixelBufferFromCGImage): Use a static for colorspace
instead of fetching it for every frame.

  • platform/mock/mediasource/MockSourceBufferPrivate.cpp: Add outputPresentationTime and outputDuration.
9:15 PM Changeset in webkit [210620] by commit-queue@webkit.org
  • 2 edits in trunk/LayoutTests

REGRESSION: [mac-wk2] LayoutTest inspector/debugger/breakpoint-columns.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=161774
<rdar://problem/28217256>

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2017-01-11
Reviewed by Mark Lam.

  • platform/mac-wk2/TestExpectations:

Remove flaky expectations for a test that hasn't failed in a month.

9:03 PM Changeset in webkit [210619] by Brent Fulgham
  • 2 edits in trunk/Source/WebKit2

[WK2][Cocoa] Avoid null dereference in FullScreen code.
https://bugs.webkit.org/show_bug.cgi?id=166957
<rdar://problem/27745004>

Reviewed by Eric Carlson.

  • WebProcess/cocoa/WebVideoFullscreenManager.mm:

(WebKit::WebVideoFullscreenManager::didSetupFullscreen): Use protected reference to 'this', and check for valid
page before attempting to use it.

8:11 PM Changeset in webkit [210618] by commit-queue@webkit.org
  • 4 edits in trunk/Source/WebInspectorUI

Web Inspector: spring function editor has unusual layout, should have left-aligned labels and slider tracks
https://bugs.webkit.org/show_bug.cgi?id=166933

Patch by Devin Rousso <Devin Rousso> on 2017-01-11
Reviewed by Brian Burg.

  • UserInterface/Views/Main.css:

(input[type=range]::-webkit-slider-thumb):
(input[type=range]::-webkit-slider-runnable-track):
(input[type=range]::-webkit-slider-runnable-track::before): Deleted.
Fix slider styles.

  • UserInterface/Views/SpringEditor.css:

(.spring-editor):
(.spring-editor > .spring-preview):
(.spring-editor > .spring-timing):
(.spring-editor > .number-input-container > .number-input-row > .number-input-row-title):
(.spring-editor > .number-input-container > .number-input-row > input):
(.spring-editor > .number-input-container > .number-input-row > input::-webkit-inner-spin-button):
(.spring-editor > .number-input-container > .number-input-row > input[type="range"]):
Decrease spacing and left-align text.

  • UserInterface/Views/SpringEditor.js:

(WebInspector.SpringEditor.prototype._handleNumberInputKeydown):
(WebInspector.SpringEditor.prototype._changeSpringForInput):
Only update editor values when the new value of any input has changed. This allows users to
enter decimal values ("." was being stripped by parseFloat).

8:03 PM Changeset in webkit [210617] by Megan Gardner
  • 2 edits in trunk/Tools

Add committer status for Megan
https://bugs.webkit.org/show_bug.cgi?id=166954

Reviewed by Tim Horton.

Add committer status for Megan Gardner

  • Scripts/webkitpy/common/config/contributors.json:
6:44 PM Changeset in webkit [210616] by commit-queue@webkit.org
  • 7 edits in trunk

Remove request.formData property until it gets implemented
https://bugs.webkit.org/show_bug.cgi?id=166920
<rdar://problem/29971105>

Patch by Youenn Fablet <youenn@apple.com> on 2017-01-11
Reviewed by Chris Dumez.

LayoutTests/imported/w3c:

  • web-platform-tests/fetch/api/request/request-consume-empty-expected.txt:
  • web-platform-tests/fetch/api/request/request-consume-expected.txt:
  • web-platform-tests/fetch/api/request/request-idl-expected.txt:
  • web-platform-tests/fetch/api/request/request-structure-expected.txt:

Source/WebCore:

Covered by rebased tests.

  • Modules/fetch/FetchBody.idl:
6:08 PM Changeset in webkit [210615] by commit-queue@webkit.org
  • 3 edits in trunk/Source/WebInspectorUI

Web Inspector: color, gradient, cubic-bezier, spring editors should be dismissable using ESC
https://bugs.webkit.org/show_bug.cgi?id=166934

Patch by Devin Rousso <Devin Rousso> on 2017-01-11
Reviewed by Brian Burg.

  • UserInterface/Views/Popover.js:

(WebInspector.Popover):
(WebInspector.Popover.prototype.dismiss):
(WebInspector.Popover.prototype.handleEvent):
(WebInspector.Popover.prototype._addListenersIfNeeded):
Adds a keydown listener while visible for the Escape key that dismisses the popover.

  • UserInterface/Views/QuickConsole.js:

(WebInspector.QuickConsole.prototype.set keyboardShortcutDisabled):
Expose the ability to disable the global keyboard shortcut. This allows the Popover to have
its own Escape keyboard shortcut to take precedence.

5:57 PM Changeset in webkit [210614] by matthew_hanson@apple.com
  • 1 copy in tags/Safari-604.1.3

New tag.

5:55 PM Changeset in webkit [210613] by matthew_hanson@apple.com
  • 5 edits in trunk/Source

Versioning.

5:52 PM Changeset in webkit [210612] by Ryan Haddad
  • 2 edits in trunk/Source/WebCore

Reverting r210598, r210597, and r210591 to fix the iOS simulator build.
https://bugs.webkit.org/show_bug.cgi?id=166672

Unreviewed build fix.

  • platform/graphics/cocoa/FontCacheCoreText.cpp:

(WebCore::preparePlatformFont):
(WebCore::fontIsSystemFont): Deleted.

5:24 PM Changeset in webkit [210611] by commit-queue@webkit.org
  • 5 edits in trunk/LayoutTests

REGRESSION: LayoutTest inspector/debugger/csp-exceptions.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=165292
<rdar://problem/29471892>

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2017-01-11
Reviewed by Geoffrey Garen.

  • inspector/debugger/csp-exceptions-expected.txt:
  • inspector/debugger/csp-exceptions.html:
  • inspector/debugger/resources/csp-exception-iframe.html:

Improve the test to handle all console messages more carefully,
including outputing the console messages to test them as well.

  • platform/mac-wk2/TestExpectations:

Unskip the test, it should no longer be flakey.

5:18 PM Changeset in webkit [210610] by Brent Fulgham
  • 3 edits in trunk/LayoutTests

Rebaseline two tests after r210599.

  • fast/xmlhttprequest/xmlhttprequest-nonexistent-file-expected.txt:
  • storage/domstorage/sessionstorage/blocked-file-access-expected.txt:
4:55 PM Changeset in webkit [210609] by akling@apple.com
  • 7 edits in trunk/Source

Crash when WebCore's GC heap grows way too large.
<https://webkit.org/b/166875>
<rdar://problem/27896585>

Reviewed by Mark Lam.

Source/JavaScriptCore:

Add a simple API to JSC::Heap that allows setting a hard limit on the amount
of live bytes. If this is exceeded, we crash with a recognizable signature.
By default there is no limit.

  • heap/Heap.cpp:

(JSC::Heap::didExceedMaxLiveSize):
(JSC::Heap::updateAllocationLimits):

  • heap/Heap.h:

(JSC::Heap::setMaxLiveSize):

Source/WebCore:

Cap the common WebCore VM at 4 GB of live JavaScript heap objects.

  • bindings/js/CommonVM.cpp:

(WebCore::commonVMSlow):

Source/WTF:

Publish the WTF::GB constant.

  • wtf/StdLibExtras.h:
4:44 PM Changeset in webkit [210608] by Brent Fulgham
  • 2 edits in trunk/Tools

Unreviewed test fix after r210599.

  • TestWebKitAPI/Tests/WebKit2/WKPageIsPlayingAudio.cpp:

(TestWebKitAPI::TEST): Remove debugging code that was causing a timeout.

4:38 PM Changeset in webkit [210607] by bshafiei@apple.com
  • 5 edits in tags/Safari-602.4.8.0.1/Source

Versioning.

4:35 PM Changeset in webkit [210606] by bshafiei@apple.com
  • 1 copy in tags/Safari-602.4.8.0.1

New tag.

4:11 PM Changeset in webkit [210605] by n_wang@apple.com
  • 3 edits
    2 adds in trunk

AX: role=treeitem accessible name not spoken to VoiceOver macOS when using string contained inside element
https://bugs.webkit.org/show_bug.cgi?id=164950
<rdar://problem/29337573>

Reviewed by Chris Fleizach.

Source/WebCore:

From the spec: https://www.w3.org/TR/wai-aria-practices/#TreeView
The element with role treeitem missing a label is labeled by its child elements.

Test: accessibility/mac/aria-tree-item-name.html

  • accessibility/AccessibilityNodeObject.cpp:

(WebCore::AccessibilityNodeObject::alternativeText):

LayoutTests:

  • accessibility/mac/aria-tree-item-name-expected.txt: Added.
  • accessibility/mac/aria-tree-item-name.html: Added.
4:05 PM Changeset in webkit [210604] by Brent Fulgham
  • 2 edits in trunk/Source/WebCore

[GTK] Unreviewed build fix after r210600.

  • platform/glib/FileSystemGlib.cpp:

(WebCore::getFileDeviceId): Attempting to use proper API here.

3:55 PM Changeset in webkit [210603] by andersca@apple.com
  • 4 edits in trunk/Source

navigator.plugins.refresh and WKContextRefreshPlugIns doesn't pick up changes to already-present plug-ins
https://bugs.webkit.org/show_bug.cgi?id=166942
rdar://problem/29839194

Reviewed by Sam Weinig.

Source/WebKit2:

Use _CFBundleCreateUnique so the resulting bundle won't be cached.

  • Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm:

(WebKit::NetscapePluginModule::getPluginInfo):

Source/WTF:

  • wtf/spi/cf/CFBundleSPI.h:

Add SPI declaration.

3:07 PM Changeset in webkit [210602] by Brent Fulgham
  • 2 edits in trunk/Source/WebCore

[GTK] Unreviewed build fix after r210599.

  • platform/glib/FileSystemGlib.cpp:

(WebCore::getFileDeviceId): Revise for new signature.

3:06 PM Changeset in webkit [210601] by mmaxfield@apple.com
  • 3 edits
    2 adds in trunk

ASSERTION FAILED: run->m_stop > 0 in *WebCore::RenderBlockFlow::computeInlineDirectionPositionsForSegment
https://bugs.webkit.org/show_bug.cgi?id=166030

Reviewed by Ryosuke Niwa.

Source/WebCore:

Ordinarily, we don't process empty BiDi runs (because we filter them out).
However, when using isolates, we invoke extra machinery to create a
placeholder BiDi run, and replace it with the runs for the isolate. The
isolate's runs, though, can be empty, and rather than just deleting the
placeholder run, we will keep it around so that the m_logicallyLastRun is
still valid. This means that it is possible when all is said and done to
have empty runs, and computeInlineDirectionPositionsForSegment() needs to
not ASSERT() in this case.

Test: fast/text/bidi-isolate-empty-run.html

  • rendering/RenderBlockLineLayout.cpp:

(WebCore::RenderBlockFlow::computeInlineDirectionPositionsForSegment):

LayoutTests:

  • fast/text/bidi-isolate-empty-run-expected.txt: Added.
  • fast/text/bidi-isolate-empty-run.html: Added.
2:44 PM Changeset in webkit [210600] by Brent Fulgham
  • 1 edit
    2 adds in trunk/Tools

Unreviewed build fix after r210599.

Add missing files.

  • TestWebKitAPI/Tests/mac/CrossPartitionFileSchemeAccess.html: Added.
  • TestWebKitAPI/Tests/mac/CrossPartitionFileSchemeAccess.mm: Added.
1:55 PM Changeset in webkit [210599] by Brent Fulgham
  • 11 edits in trunk

File scheme should not allow access of a resource on a different volume.
https://bugs.webkit.org/show_bug.cgi?id=158552
<rdar://problem/15307582>

Reviewed by Alex Christensen.

Source/WebCore:

Revise SecurityOrigin to prevent files from one storage device (volume) from accessing content
on a different storage device (volume) unless universal access is enabled.

Pass the current file device as part of the NSURLRequest so that CFNetwork can reject loads
where the device changes in the midst of a load.

Also properly reflect that SecurityOrigin is never null by passing as a reference,
rather than as a pointer.

Tests: Tools/TestWebKitAPI/Tests/mac/CrossPartitionFileSchemeAccess.mm

  • page/SecurityOrigin.cpp:

(WebCore::SecurityOrigin::canAccess): Pass argument as reference.
(WebCore::SecurityOrigin::canDisplay): Add check that files share the same volume.
(WebCore::SecurityOrigin::isSameSchemeHostPort): Pass argument as reference.

  • page/SecurityOrigin.h:
  • platform/FileSystem.cpp:

(WebCore::filesHaveSameVolume): Added.

  • platform/FileSystem.h:
  • platform/network/cocoa/ResourceRequestCocoa.mm:

(WebCore::ResourceRequest::doUpdatePlatformRequest): If loading a file URL, tell CFNetwork
the storage device at the time of the start of the load so we can trigger a failure if this
changes during the load operation.

  • platform/posix/FileSystemPOSIX.cpp:

(WebCore::getFileDeviceId): Added.

  • platform/win/FileSystemWin.cpp:

(WebCore::getFileDeviceId): Added.

Tools:

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: Add new files.
  • TestWebKitAPI/Tests/mac/CrossPartitionFileSchemeAccess.html: Added.
  • TestWebKitAPI/Tests/mac/CrossPartitionFileSchemeAccess.mm: Added.
1:46 PM Changeset in webkit [210598] by mmaxfield@apple.com
  • 2 edits in trunk/Source/WebCore

[Cocoa] Testing fix after r210597
https://bugs.webkit.org/show_bug.cgi?id=166672

Unreviewed.

  • platform/graphics/cocoa/FontCacheCoreText.cpp:

(WebCore::preparePlatformFont):

1:40 PM Changeset in webkit [210597] by mmaxfield@apple.com
  • 2 edits in trunk/Source/WebCore

[Cocoa] Testing fix after r210591
https://bugs.webkit.org/show_bug.cgi?id=166672

Unreviewed.

Fixes fast/text/trak-optimizeLegibility.html and
fast/text/system-font-features.html

  • platform/graphics/cocoa/FontCacheCoreText.cpp:

(WebCore::fontIsSystemFont):
(WebCore::preparePlatformFont):

1:28 PM Changeset in webkit [210596] by andersca@apple.com
  • 2 edits in trunk/Source/WebKit2

REGRESSION: Crash in com.apple.WebKit: IPC::Connection::sendMessage(std::1::unique_ptr<IPC::MachMessage, std::__1::default_delete<IPC::MachMessage> >) + 27
https://bugs.webkit.org/show_bug.cgi?id=165854
rdar://problem/29757269

Reviewed by Tim Horton.

  • Platform/IPC/mac/ConnectionMac.mm:

(IPC::Connection::sendMessage):
Add assertion.

(IPC::Connection::initializeSendSource):
Turns out the event handler can be called spuriously, so guard against that.

1:07 PM Changeset in webkit [210595] by mitz@apple.com
  • 8 copies
    1 add in releases/Apple/Safari Technology Preview 21

Added a tag for Safari Technology Preview release 21.

12:30 PM Changeset in webkit [210594] by commit-queue@webkit.org
  • 3 edits in trunk/Source/WebInspectorUI

Web Inspector: fix UIString for Print Styles button
https://bugs.webkit.org/show_bug.cgi?id=166892

Patch by Devin Rousso <Devin Rousso> on 2017-01-11
Reviewed by Brian Burg.

  • Localizations/en.lproj/localizedStrings.js:
  • UserInterface/Views/DOMTreeContentView.js:

(WebInspector.DOMTreeContentView):
Changed UIString to better match documentation.

11:18 AM Changeset in webkit [210593] by Chris Dumez
  • 7 edits
    2 adds in trunk

Iterating over URLSearchParams does not work
https://bugs.webkit.org/show_bug.cgi?id=166921
<rdar://problem/29970907>

Reviewed by Alex Christensen.

LayoutTests/imported/w3c:

Rebaseline W3C test now that more checks are passing.

  • web-platform-tests/url/urlsearchparams-foreach-expected.txt:

Source/WebCore:

Make URLSearchParams iterable, as per:

Test: fast/dom/DOMURL/searchparams-iterable.html

  • html/URLSearchParams.cpp:

(WebCore::URLSearchParams::Iterator::next):
(WebCore::URLSearchParams::Iterator::Iterator):

  • html/URLSearchParams.h:

(WebCore::URLSearchParams::createIterator):

  • html/URLSearchParams.idl:

LayoutTests:

Add layout test coverage.

  • fast/dom/DOMURL/searchparams-iterable-expected.txt: Added.
  • fast/dom/DOMURL/searchparams-iterable.html: Added.
10:48 AM Changeset in webkit [210592] by Ryan Haddad
  • 2 edits in trunk/JSTests

Mark es6/typed_arrays_correct_prototype_chains.js as failing after r210570.
https://bugs.webkit.org/show_bug.cgi?id=166931i

Unreviewed test gardening.

  • es6.yaml:
10:26 AM Changeset in webkit [210591] by mmaxfield@apple.com
  • 2 edits in trunk/Source/WebCore

[Cocoa] Variation fonts without variations specified are not rendered as if the default variations were specified
https://bugs.webkit.org/show_bug.cgi?id=166672
<rdar://problem/29779119>
<rdar://problem/29848883>

Reviewed by Simon Fraser.

CoreText has a bug (<rdar://problem/29859207>) where variation fonts without
a specified variation value are rendered as if the minimum value is specified,
rather than the default value. The solution is to apply default values where
they are omitted.

Test: fast/text/variations/advances.html

  • platform/graphics/cocoa/FontCacheCoreText.cpp:

(WebCore::preparePlatformFont):

10:08 AM Changeset in webkit [210590] by Ryan Haddad
  • 2 edits in trunk/Source/WebCore

Attempt to fix the Windows build after r210588.

Unreviewed build fix.

  • bindings/js/JSBindingsAllInOne.cpp:
9:42 AM Changeset in webkit [210589] by weinig@apple.com
  • 2 edits in trunk/Source/WebCore

Address some feedback from r210567.

  • bindings/scripts/CodeGeneratorJS.pm:

(NativeToJSValueDOMConvertNeedsState):
(NativeToJSValueDOMConvertNeedsGlobalObject):
Fix typo. robost -> robust.

9:38 AM Changeset in webkit [210588] by weinig@apple.com
  • 3 edits
    1 move in trunk/Source/WebCore

Rename JSCustomSQLStatementErrorCallback.cpp to JSSQLStatementErrorCallbackCustom.cpp
https://bugs.webkit.org/show_bug.cgi?id=166913

Reviewed by Alex Christensen.

  • CMakeLists.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • bindings/js/JSCustomSQLStatementErrorCallback.cpp: Removed.
  • bindings/js/JSSQLStatementErrorCallbackCustom.cpp: Copied from Source/WebCore/bindings/js/JSCustomSQLStatementErrorCallback.cpp.

Rename to match conventions.

8:00 AM Changeset in webkit [210587] by Ryan Haddad
  • 10 edits
    2 deletes in trunk

Unreviewed, rolling out r210571.

This change broke the 32-bit macOS build and caused LayoutTest
failures.

Reverted changeset:

"File scheme should not allow access of a resource on a
different volume."
https://bugs.webkit.org/show_bug.cgi?id=158552
http://trac.webkit.org/changeset/210571

7:45 AM Changeset in webkit [210586] by Chris Dumez
  • 5 edits
    2 adds in trunk

[iOS][WK2] KeyboardEvent.key always returns an empty string
https://bugs.webkit.org/show_bug.cgi?id=166918
<rdar://problem/29861147>

Reviewed by Wenson Hsieh.

Source/WebKit2:

Make sure that KeyboardEvent.key gets properly initialized on iOS / WK2.

  • Shared/WebEvent.h:
  • Shared/WebKeyboardEvent.cpp:

(WebKit::WebKeyboardEvent::WebKeyboardEvent):

  • Shared/ios/WebIOSEventFactory.mm:

(WebIOSEventFactory::createWebKeyboardEvent):

LayoutTests:

Add layout test coverage.

  • fast/events/ios/keyboard-event-key-attribute-expected.txt: Added.
  • fast/events/ios/keyboard-event-key-attribute.html: Added.
4:12 AM Changeset in webkit [210585] by Yusuke Suzuki
  • 32 edits
    4 copies
    1 add in trunk/Source

Decouple module loading initiator from ScriptElement
https://bugs.webkit.org/show_bug.cgi?id=166888

Reviewed by Saam Barati and Ryosuke Niwa.

Source/JavaScriptCore:

Add ScriptFetcher and JSScriptFetcher.

  • CMakeLists.txt:
  • JavaScriptCore.xcodeproj/project.pbxproj:
  • builtins/ModuleLoaderPrototype.js:

(requestFetch):
(requestInstantiate):
(requestSatisfy):
(requestInstantiateAll):
(requestLink):
(moduleEvaluation):
(loadAndEvaluateModule):
(importModule):

  • llint/LLIntData.cpp:

(JSC::LLInt::Data::performAssertions):

  • llint/LowLevelInterpreter.asm:
  • runtime/Completion.cpp:

(JSC::loadAndEvaluateModule):
(JSC::loadModule):
(JSC::linkAndEvaluateModule):

  • runtime/Completion.h:
  • runtime/JSModuleLoader.cpp:

(JSC::JSModuleLoader::loadAndEvaluateModule):
(JSC::JSModuleLoader::loadModule):
(JSC::JSModuleLoader::linkAndEvaluateModule):
(JSC::JSModuleLoader::resolve):
(JSC::JSModuleLoader::fetch):
(JSC::JSModuleLoader::instantiate):
(JSC::JSModuleLoader::evaluate):

  • runtime/JSModuleLoader.h:
  • runtime/JSScriptFetcher.cpp: Copied from Source/WebCore/dom/LoadableScript.cpp.

(JSC::JSScriptFetcher::destroy):

  • runtime/JSScriptFetcher.h: Added.

(JSC::JSScriptFetcher::createStructure):
(JSC::JSScriptFetcher::create):
(JSC::JSScriptFetcher::fetcher):
(JSC::JSScriptFetcher::JSScriptFetcher):

  • runtime/JSType.h:
  • runtime/ScriptFetcher.h: Copied from Source/WebCore/dom/LoadableScript.cpp.

(JSC::ScriptFetcher::~ScriptFetcher):

  • runtime/VM.cpp:

(JSC::VM::VM):

  • runtime/VM.h:

Source/WebCore:

Previously, we use ScriptElement (JSElement for ScriptElement) as the module loading initiator.
This element is used to transfer the metadata like charset throughout the module pipeline.
As a result, our module loader in the browser side is tightly coupled with ScriptElement.
It is not good since it prevent us from using the module loader in the non-DOM environment like
Web Workers.

So we decouple the necessary informations from ScriptElement. We move these information to
LoadableScript. And we use JSScriptFetcher to transfer LoadableScript through the JS implemented
module loader pipeline. We select LoadableScript instead of LoadableModuleScript since this initiator
information will be leveraged even in classic scripts once we implement the dynamic import.

No behavior change.

  • ForwardingHeaders/runtime/JSScriptFetcher.h: Copied from Source/WebCore/dom/LoadableScript.cpp.
  • ForwardingHeaders/runtime/ScriptFetcher.h: Copied from Source/WebCore/dom/LoadableScript.cpp.
  • bindings/js/CachedModuleScript.cpp:

(WebCore::CachedModuleScript::create):
(WebCore::CachedModuleScript::load):
(WebCore::CachedModuleScript::CachedModuleScript): Deleted.

  • bindings/js/CachedModuleScript.h:

Now we can merge CachedModuleScript to LoadableScript. But we do not do this in this patch since
we focus on decoupling the initiator information from ScriptElement.

(WebCore::CachedModuleScript::nonce): Deleted.
(WebCore::CachedModuleScript::crossOriginMode): Deleted.

  • bindings/js/CachedModuleScriptLoader.cpp:

(WebCore::CachedModuleScriptLoader::load):

  • bindings/js/CachedModuleScriptLoader.h:
  • bindings/js/JSDOMWindowBase.cpp:

(WebCore::JSDOMWindowBase::moduleLoaderResolve):
(WebCore::JSDOMWindowBase::moduleLoaderFetch):
(WebCore::JSDOMWindowBase::moduleLoaderEvaluate):

  • bindings/js/JSMainThreadExecState.h:

(WebCore::JSMainThreadExecState::loadModule):
(WebCore::JSMainThreadExecState::linkAndEvaluateModule):

  • bindings/js/ScriptController.cpp:

(WebCore::ScriptController::loadModuleScriptInWorld):
(WebCore::ScriptController::loadModuleScript):
(WebCore::ScriptController::linkAndEvaluateModuleScriptInWorld):
(WebCore::ScriptController::linkAndEvaluateModuleScript):

  • bindings/js/ScriptController.h:
  • bindings/js/ScriptModuleLoader.cpp:

(WebCore::ScriptModuleLoader::fetch):

  • bindings/js/ScriptModuleLoader.h:
  • dom/LoadableClassicScript.cpp:

(WebCore::LoadableClassicScript::create):
(WebCore::LoadableClassicScript::~LoadableClassicScript):
(WebCore::LoadableClassicScript::isLoaded):
(WebCore::LoadableClassicScript::error):
(WebCore::LoadableClassicScript::wasCanceled):
(WebCore::LoadableClassicScript::notifyFinished):
(WebCore::LoadableClassicScript::load):

  • dom/LoadableClassicScript.h:
  • dom/LoadableModuleScript.cpp:

(WebCore::LoadableModuleScript::create):
(WebCore::LoadableModuleScript::LoadableModuleScript):
(WebCore::LoadableModuleScript::load):

  • dom/LoadableModuleScript.h:
  • dom/LoadableScript.cpp:

(WebCore::LoadableScript::requestScriptWithCache):

  • dom/LoadableScript.h:

(WebCore::LoadableScript::LoadableScript):

  • dom/ScriptElement.cpp:

(WebCore::ScriptElement::requestClassicScript):
(WebCore::ScriptElement::requestModuleScript):
(WebCore::ScriptElement::executeModuleScript):
(WebCore::ScriptElement::requestScriptWithCacheForModuleScript): Deleted.
(WebCore::ScriptElement::requestScriptWithCache): Deleted.

  • dom/ScriptElement.h:
3:27 AM Changeset in webkit [210584] by Carlos Garcia Campos
  • 7 edits in trunk/Source/WebCore

[GStreamer] Use smart pointers and modernize code in WebKitWebAudioSourceGStreamer
https://bugs.webkit.org/show_bug.cgi?id=166886

Reviewed by Xabier Rodriguez-Calvar.

This patch doesn't change the behavior, so it's covered by existing Web Audio tests. It replaces pointers with
smart pointers, uses WTF::Vector instead of GSList and simplifies the code to map/unmap GstBuffers.

  • platform/audio/gstreamer/WebKitWebAudioSourceGStreamer.cpp:

(webKitWebAudioSrcConstructed):
(webKitWebAudioSrcFinalize):
(webKitWebAudioSrcLoop):
(webKitWebAudioSrcChangeState):

  • platform/graphics/gstreamer/GRefPtrGStreamer.cpp:

(WTF::derefGPtr<GstBufferList>):
(WTF::adoptGRef):
(WTF::refGPtr<GstBufferPool>):
(WTF::derefGPtr<GstBufferPool>):

  • platform/graphics/gstreamer/GRefPtrGStreamer.h:
  • platform/graphics/gstreamer/GStreamerUtilities.cpp:

(WebCore::mapGstBuffer):

  • platform/graphics/gstreamer/GStreamerUtilities.h:
  • platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:

(StreamingClient::createReadBuffer):

2:08 AM WebKitGTK edited by rakuco@webkit.org
Link to WebKitGTK/Debugging (diff)
1:08 AM Changeset in webkit [210583] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore

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

Caused huge memory leak see https://webkit.org/b/166884
(Requested by KaL on #webkit).

Reverted changeset:

"[GStreamer] Silent WebAudio buffers support"
https://bugs.webkit.org/show_bug.cgi?id=143869
http://trac.webkit.org/changeset/182947

12:55 AM Changeset in webkit [210582] by Carlos Garcia Campos
  • 2 edits in trunk/Source/WebCore

Unreviewed, rolling out r210579.

That was not the right fix

Reverted changeset:

"Unreviewed GTK buildfix after r210571."
http://trac.webkit.org/changeset/210579

12:53 AM Changeset in webkit [210581] by Gyuyoung Kim
  • 2 edits in trunk/LayoutTests

[EFL] Update TestExpectation file for Ubuntu 16.04.

Unreviewed EFL gardening.

After bumping Ubuntu version to 16.04, there are many tests are failed.
This gardening is to update all failure tests on Ubuntu 16.04.

  • platform/efl/TestExpectations:
12:52 AM Changeset in webkit [210580] by Carlos Garcia Campos
  • 2 edits in trunk/Source/WebCore

Unreviewed. Fix GTK+ build after r210571.

Add getFileDeviceId implementation to FileSystemGlib.cpp.

  • platform/glib/FileSystemGlib.cpp:

(WebCore::getFileDeviceId):

12:47 AM Changeset in webkit [210579] by Csaba Osztrogonác
  • 2 edits in trunk/Source/WebCore

Unreviewed GTK buildfix after r210571.

  • PlatformGTK.cmake:

Jan 10, 2017:

11:53 PM Changeset in webkit [210578] by rniwa@webkit.org
  • 2 edits in trunk/Websites/perf.webkit.org

Another build fix. Always use UTC when expressing commit times in UNIX-epoch timestamps.

  • public/api/measurement-set.php:
8:53 PM Changeset in webkit [210577] by rniwa@webkit.org
  • 2 edits in trunk/Websites/perf.webkit.org

Fix a typo in the previous commit.

  • public/api/measurement-set.php:
8:51 PM Changeset in webkit [210576] by rniwa@webkit.org
  • 4 edits in trunk/Websites/perf.webkit.org

Build fixes for older versions of Postgres.

Also redirect / and /# to /v3/ as intended in r200820.

  • public/api/measurement-set.php:
  • public/api/runs.php:
  • public/index.html:
8:07 PM Changeset in webkit [210575] by clopez@igalia.com
  • 2 edits in trunk/Tools

[GTK] install-dependencies script misses gdb
https://bugs.webkit.org/show_bug.cgi?id=166917

Reviewed by Michael Catanzaro.

gdb is needed for generating the crash logs.

  • gtk/install-dependencies:
7:56 PM Changeset in webkit [210574] by Michael Catanzaro
  • 14 edits in trunk

[GTK] No way for applications to set notification permissions without waiting for permission request
https://bugs.webkit.org/show_bug.cgi?id=163366

Reviewed by Carlos Garcia Campos.

Source/WebKit2:

Websites can check the Notification.permission DOM property to check if they have permission
to show notifications *without triggering a permission request*. But the WebKitGTK+ API has
no way to affirmatively indicate notifications are allowed without a permission request. The
only way is via the permission request API, which is too late. It's a problem for Epiphany.
For example, open the Riot Matrix client in a web app; you will immediately see an info bar
informing the user that Riot does not have permission to send desktop notifications, even
though Epiphany automatically grants notification permission in web app mode when requested.
This problem is not exclusive to web apps; there is simply no way for notification
permission to be set correctly prior to a permission request for it. Fix this by introducing
a webkit_web_context_initialize_notification_permissions() API, and add a signal
WebKitWebContext::initialize-notification-permissions to indicate when it should be called.

  • UIProcess/API/gtk/WebKitNotificationProvider.cpp:

(notificationPermissionsCallback):
(WebKitNotificationProvider::create):
(WebKitNotificationProvider::WebKitNotificationProvider):
(WebKitNotificationProvider::notificationPermissions):
(WebKitNotificationProvider::setNotificationPermissions):

  • UIProcess/API/gtk/WebKitNotificationProvider.h:
  • UIProcess/API/gtk/WebKitSecurityOrigin.cpp:

(webkitSecurityOriginGetSecurityOrigin):

  • UIProcess/API/gtk/WebKitSecurityOriginPrivate.h:
  • UIProcess/API/gtk/WebKitWebContext.cpp:

(webkitWebContextConstructed):
(webkit_web_context_class_init):
(addOriginToMap):
(webkit_web_context_initialize_notification_permissions):
(webkitWebContextInitializeNotificationPermissions):

  • UIProcess/API/gtk/WebKitWebContext.h:
  • UIProcess/API/gtk/WebKitWebContextPrivate.h:
  • UIProcess/API/gtk/docs/webkit2gtk-4.0-sections.txt:

Tools:

  • TestWebKitAPI/Tests/WebKit2Gtk/TestWebKitWebView.cpp:

(testWebViewNotification):
(setInitialNotificationPermissionsAllowedCallback):
(setInitialNotificationPermissionsDisallowedCallback):
(testWebViewNotificationInitialPermissionAllowed):
(testWebViewNotificationInitialPermissionDisallowed):
(beforeAll):

  • TestWebKitAPI/gtk/WebKit2Gtk/TestMain.h:
  • TestWebKitAPI/gtk/WebKit2Gtk/WebViewTest.cpp:

(WebViewTest::WebViewTest):
(WebViewTest::initializeWebView):

  • TestWebKitAPI/gtk/WebKit2Gtk/WebViewTest.h:
6:26 PM Changeset in webkit [210573] by Yusuke Suzuki
  • 19 edits
    3 adds in trunk

Implement JSSourceCode to propagate SourceCode in module pipeline
https://bugs.webkit.org/show_bug.cgi?id=166861

Reviewed by Saam Barati.

Source/JavaScriptCore:

Instead of propagating source code string, we propagate JSSourceCode
cell in the module pipeline. This allows us to attach a metadata
to the propagated source code string. In particular, it propagates
SourceOrigin through the module pipeline.

And it also fixes JSC shell to use Module source type for module source code.

  • CMakeLists.txt:
  • JavaScriptCore.xcodeproj/project.pbxproj:
  • builtins/ModuleLoaderPrototype.js:

(fulfillFetch):
(requestFetch):

  • jsc.cpp:

(GlobalObject::moduleLoaderFetch):
(runWithScripts):

  • llint/LLIntData.cpp:

(JSC::LLInt::Data::performAssertions):

  • llint/LowLevelInterpreter.asm:
  • runtime/Completion.cpp:

(JSC::loadAndEvaluateModule):
(JSC::loadModule):

  • runtime/JSModuleLoader.cpp:

(JSC::JSModuleLoader::provide):

  • runtime/JSModuleLoader.h:
  • runtime/JSSourceCode.cpp: Added.

(JSC::JSSourceCode::destroy):

  • runtime/JSSourceCode.h: Added.

(JSC::JSSourceCode::createStructure):
(JSC::JSSourceCode::create):
(JSC::JSSourceCode::sourceCode):
(JSC::JSSourceCode::JSSourceCode):

  • runtime/JSType.h:
  • runtime/ModuleLoaderPrototype.cpp:

(JSC::moduleLoaderPrototypeParseModule):

  • runtime/VM.cpp:

(JSC::VM::VM):

  • runtime/VM.h:

Source/WebCore:

Now SourceOrigin is correctly propagated through the module pipeline.
So the error reported by http/tests/security/contentSecurityPolicy/module-eval-blocked-expected.html
is updated.

  • ForwardingHeaders/runtime/JSSourceCode.h: Added.
  • bindings/js/JSDOMPromise.h:

(WebCore::DeferredPromise::resolveWithCallback):

  • bindings/js/ScriptModuleLoader.cpp:

(WebCore::ScriptModuleLoader::notifyFinished):

LayoutTests:

  • http/tests/security/contentSecurityPolicy/module-eval-blocked-expected.txt:
5:54 PM Changeset in webkit [210572] by timothy_horton@apple.com
  • 1 edit
    3 adds in trunk/Tools

MobileMiniBrowser tests don't work by default
https://bugs.webkit.org/show_bug.cgi?id=166910

Reviewed by Alex Christensen.

  • MobileMiniBrowser/MobileMiniBrowser.xcodeproj/xcshareddata/xcschemes/MobileMiniBrowserUITests.xcscheme: Added.

Add a shared scheme; the Makefile depends on the MobileMiniBrowserUITests scheme existing, at the very least.

5:51 PM Changeset in webkit [210571] by Brent Fulgham
  • 10 edits
    2 adds in trunk

File scheme should not allow access of a resource on a different volume.
https://bugs.webkit.org/show_bug.cgi?id=158552
<rdar://problem/15307582>

Reviewed by Alex Christensen.

Source/WebCore:

Revise SecurityOrigin to prevent files from one storage device (volume) from accessing content
on a different storage device (volume) unless universal access is enabled.

Pass the current file device as part of the NSURLRequest so that CFNetwork can reject loads
where the device changes in the midst of a load.

Also properly reflect that SecurityOrigin is never null by passing as a reference,
rather than as a pointer.

Tests: Tools/TestWebKitAPI/Tests/mac/CrossPartitionFileSchemeAccess.mm

  • page/SecurityOrigin.cpp:

(WebCore::SecurityOrigin::canAccess): Pass argument as reference.
(WebCore::SecurityOrigin::passesFileCheck): Add check that file URLs refer to files in
the same storage volume.
(WebCore::SecurityOrigin::canDisplay): Add check that files share the same volume.
(WebCore::SecurityOrigin::isSameSchemeHostPort): Pass argument as reference.

  • page/SecurityOrigin.h:
  • platform/FileSystem.cpp:

(WebCore::filesHaveSameVolume): Added.

  • platform/FileSystem.h:
  • platform/network/cocoa/ResourceRequestCocoa.mm:

(WebCore::ResourceRequest::doUpdatePlatformRequest): If loading a file URL, tell CFNetwork
the storage device at the time of the start of the load so we can trigger a failure if this
changes during the load operation.

  • platform/posix/FileSystemPOSIX.cpp:

(WebCore::getFileDeviceId): Added.

  • platform/win/FileSystemWin.cpp:

(WebCore::getFileDeviceId): Added.

Tools:

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: Add new files.
  • TestWebKitAPI/Tests/mac/CrossPartitionFileSchemeAccess.html: Added.
  • TestWebKitAPI/Tests/mac/CrossPartitionFileSchemeAccess.mm: Added.
5:35 PM Changeset in webkit [210570] by commit-queue@webkit.org
  • 6 edits
    1 delete in trunk

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

"breaks web compatability" (Requested by keith_miller on
#webkit).

Reverted changeset:

"Add support for global"
https://bugs.webkit.org/show_bug.cgi?id=165171
http://trac.webkit.org/changeset/210052

5:28 PM Changeset in webkit [210569] by mark.lam@apple.com
  • 2 edits in trunk/Tools

Reverting run-jsc-stress-tests' $buildType to use string values.
https://bugs.webkit.org/show_bug.cgi?id=166912

Rubber stamped by Filip Pizlo.

This is so that we can test for it in the tests e.g.
@ if $buildType == "debug" then runDefault("--maxSingleAllocationSize=1048576") else skip end

  • Scripts/run-jsc-stress-tests:
5:22 PM Changeset in webkit [210568] by matthew_hanson@apple.com
  • 17 edits
    6 deletes in branches/safari-603-branch

Roll out r210028 via r210336. rdar://problem/29912353

5:02 PM Changeset in webkit [210567] by commit-queue@webkit.org
  • 25 edits
    1 add in trunk

[WebIDL] Remove most of the custom bindings for the WebGL code
https://bugs.webkit.org/show_bug.cgi?id=166834

Patch by Sam Weinig <sam@webkit.org> on 2017-01-10
Reviewed by Alex Christensen.

Source/JavaScriptCore:

  • runtime/ArrayPrototype.h:
  • runtime/ObjectPrototype.h:

Export the ClassInfo so it can be used from WebCore.

Source/WebCore:

Removes all but one custom getter (getExtension) from the WebGL code.

  • Modules/indexeddb/IDBKeyRange.idl:

Replace use of non-standard type, with new OverrideIDLType extended attribute, allowing us
to stay more consistent with the IDL files spec's provide.

  • WebCore.xcodeproj/project.pbxproj:

Move JSWebGL2RenderingContextCustom to the GC/Wrapping only group.

  • bindings/IDLTypes.h:

Add IDLWebGLAny, and simplify IDLIDBKey to not be templatized.

  • bindings/js/JSDOMConvert.h:

(WebCore::Converter<IDLLong>::convert):
(WebCore::Converter<IDLFloat>::convert):
(WebCore::Converter<IDLUnrestrictedFloat>::convert):
(WebCore::Converter<IDLDouble>::convert):
(WebCore::Converter<IDLUnrestrictedDouble>::convert):
Add overloads of convert that convert a double to the numeric type.

(WebCore::Detail::GenericSequenceConverter::convert):
Add optimized specialization for JSArrays that does not use the iterator protocol.

(WebCore::Detail::NumericSequenceConverter::convert):
Add an even more optimized specialization for numeric types, which checks to see
if the array's butterfly has an optimized shape, and extracts the numeric values
from that.

(WebCore::Detail::SequenceConverter::convert):
(WebCore::Detail::SequenceConverter<IDLLong>::convert):
(WebCore::Detail::SequenceConverter<IDLFloat>::convert):
(WebCore::Detail::SequenceConverter<IDLUnrestrictedFloat>::convert):
(WebCore::Detail::SequenceConverter<IDLDouble>::convert):
(WebCore::Detail::SequenceConverter<IDLUnrestrictedDouble>::convert):
Select the right specialization based on type.

(WebCore::Converter<IDLSequence<T>>::convert):
(WebCore::Converter<IDLFrozenArray<T>>::convert):
Rename converter to be more accurate.

(WebCore::JSConverter<IDLWebGLAny>::convert):
Added. Calls through to converter in WebGLAny.h. We should replace this with a
call to the IDLUnion JSConverter when feasible.

  • bindings/js/JSWebGL2RenderingContextCustom.cpp:

(WebCore::JSWebGL2RenderingContext::getInternalformatParameter): Deleted.
(WebCore::JSWebGL2RenderingContext::getQueryParameter): Deleted.
(WebCore::JSWebGL2RenderingContext::getSamplerParameter): Deleted.
(WebCore::JSWebGL2RenderingContext::getSyncParameter): Deleted.
(WebCore::JSWebGL2RenderingContext::getIndexedParameter): Deleted.
(WebCore::JSWebGL2RenderingContext::getActiveUniformBlockParameter): Deleted.
(WebCore::JSWebGL2RenderingContext::getActiveUniformBlockName): Deleted.
Remove unnecessary custom functions.

  • bindings/js/JSWebGLRenderingContextBaseCustom.cpp:

(WebCore::objectParameter): Deleted.
(WebCore::JSWebGLRenderingContextBase::getAttachedShaders): Deleted.
(WebCore::JSWebGLRenderingContextBase::getBufferParameter): Deleted.
(WebCore::JSWebGLRenderingContextBase::getFramebufferAttachmentParameter): Deleted.
(WebCore::JSWebGLRenderingContextBase::getParameter): Deleted.
(WebCore::JSWebGLRenderingContextBase::getProgramParameter): Deleted.
(WebCore::JSWebGLRenderingContextBase::getRenderbufferParameter): Deleted.
(WebCore::JSWebGLRenderingContextBase::getShaderParameter): Deleted.
(WebCore::JSWebGLRenderingContextBase::getSupportedExtensions): Deleted.
(WebCore::JSWebGLRenderingContextBase::getTexParameter): Deleted.
(WebCore::JSWebGLRenderingContextBase::getUniform): Deleted.
(WebCore::JSWebGLRenderingContextBase::getVertexAttrib): Deleted.
(WebCore::toNumberVector): Deleted.
(WebCore::functionForUniform): Deleted.
(WebCore::dataFunctionf): Deleted.
(WebCore::dataFunctioni): Deleted.
(WebCore::dataFunctionMatrix): Deleted.
(WebCore::JSWebGLRenderingContextBase::uniform1fv): Deleted.
(WebCore::JSWebGLRenderingContextBase::uniform1iv): Deleted.
(WebCore::JSWebGLRenderingContextBase::uniform2fv): Deleted.
(WebCore::JSWebGLRenderingContextBase::uniform2iv): Deleted.
(WebCore::JSWebGLRenderingContextBase::uniform3fv): Deleted.
(WebCore::JSWebGLRenderingContextBase::uniform3iv): Deleted.
(WebCore::JSWebGLRenderingContextBase::uniform4fv): Deleted.
(WebCore::JSWebGLRenderingContextBase::uniform4iv): Deleted.
(WebCore::JSWebGLRenderingContextBase::uniformMatrix2fv): Deleted.
(WebCore::JSWebGLRenderingContextBase::uniformMatrix3fv): Deleted.
(WebCore::JSWebGLRenderingContextBase::uniformMatrix4fv): Deleted.
(WebCore::JSWebGLRenderingContextBase::vertexAttrib1fv): Deleted.
(WebCore::JSWebGLRenderingContextBase::vertexAttrib2fv): Deleted.
(WebCore::JSWebGLRenderingContextBase::vertexAttrib3fv): Deleted.
(WebCore::JSWebGLRenderingContextBase::vertexAttrib4fv): Deleted.
Remove unnecessary custom functions.

  • bindings/scripts/CodeGenerator.pm:

(IsBuiltinType):
Remove specialization of IDBKey.

  • bindings/scripts/CodeGeneratorJS.pm:

(GetBaseIDLType):
(GetIDLType):
(NativeToJSValueDOMConvertNeedsState):
(NativeToJSValueDOMConvertNeedsGlobalObject):
(NativeToJSValue):
Allow IDL files to override the type of signature using a new OverrideIDLType
extended attribute. Currently this only works conversion to JS, but could be
extended to support more.

  • bindings/scripts/IDLAttributes.txt:

Add OverrideIDLType.

  • html/canvas/WebGL2RenderingContext.idl:

Add OverrideIDLType=IDLWebGLAny annotations to remove the need for custom functions.

  • html/canvas/WebGLAny.cpp:

(WebCore::convertToJSValue):
(WebCore::toJS): Deleted.

  • html/canvas/WebGLAny.h:

Rename the toJS function to convertToJSValue to avoid a template specialization issue.

  • html/canvas/WebGLRenderingContextBase.cpp:

(WebCore::WebGLRenderingContextBase::getAttachedShaders):
Update signature to match IDL, replacing bool return value plus out parameter with an
optional return value. Modernize the code a bit.

(WebCore::WebGLRenderingContextBase::uniform2f):
(WebCore::WebGLRenderingContextBase::uniform3f):
(WebCore::WebGLRenderingContextBase::uniform4f):
(WebCore::WebGLRenderingContextBase::uniform1i):
(WebCore::WebGLRenderingContextBase::uniform3i):
(WebCore::WebGLRenderingContextBase::uniform4i):
(WebCore::WebGLRenderingContextBase::uniform1fv):
(WebCore::WebGLRenderingContextBase::uniform2fv):
(WebCore::WebGLRenderingContextBase::uniform3fv):
(WebCore::WebGLRenderingContextBase::uniform4fv):
(WebCore::WebGLRenderingContextBase::uniform1iv):
(WebCore::WebGLRenderingContextBase::uniform2iv):
(WebCore::WebGLRenderingContextBase::uniform3iv):
(WebCore::WebGLRenderingContextBase::uniform4iv):
(WebCore::WebGLRenderingContextBase::uniformMatrix2fv):
(WebCore::WebGLRenderingContextBase::uniformMatrix3fv):
(WebCore::WebGLRenderingContextBase::uniformMatrix4fv):
(WebCore::WebGLRenderingContextBase::vertexAttrib4f):
(WebCore::WebGLRenderingContextBase::vertexAttrib1fv):
(WebCore::WebGLRenderingContextBase::vertexAttrib2fv):
(WebCore::WebGLRenderingContextBase::vertexAttrib3fv):
(WebCore::WebGLRenderingContextBase::vertexAttrib4fv):
(WebCore::WebGLRenderingContextBase::validateUniformParameters):
(WebCore::WebGLRenderingContextBase::validateUniformMatrixParameters):
(WebCore::WebGLRenderingContextBase::vertexAttribfvImpl):

  • html/canvas/WebGLRenderingContextBase.h:

(WebCore::WebGLRenderingContextBase::TypedList::TypedList):
(WebCore::WebGLRenderingContextBase::TypedList::data):
(WebCore::WebGLRenderingContextBase::TypedList::length):
Re-order/group to match order in the IDL file. Remove overloads taking a pointer and
length, and replace it by having the main function take a specialized TypedList. TypedList
allows the bindings to pass the correct Variant type, but then the code to only think in
terms of the data() and length() functions.

  • html/canvas/WebGLRenderingContextBase.idl:

Remove [Custom] annotations and re-order/group to match the spec. Update types of uniform*fv/iv
functions to take typedef'd unions.

LayoutTests:

  • fast/canvas/webgl/gl-object-get-calls-expected.txt:

Update result for better error message.

3:45 PM Changeset in webkit [210566] by rniwa@webkit.org
  • 1 edit
    1 copy in trunk/Tools

Temporarily add back the file removed in r210463 to unbreak internal bots.

  • Scripts/webkitpy/benchmark_runner/data/patches/Animometer.patch: Copied from Tools/Scripts/webkitpy/benchmark_runner/data/patches/Animometer.patch.
3:41 PM Changeset in webkit [210565] by fpizlo@apple.com
  • 13 edits
    2 deletes in trunk/Source/JavaScriptCore

Streamline the GC barrier slowpath
https://bugs.webkit.org/show_bug.cgi?id=166878

Reviewed by Geoffrey Garen and Saam Barati.

This implements two optimizations to the barrier:

  • Removes the write barrier buffer. This was just overhead.


  • Teaches the slow path how to white an object that was black but unmarked, ensuring that we don't take slow path for this object again.

(JSC::DFG::SpeculativeJIT::compileStoreBarrier):

  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::emitStoreBarrier):

  • heap/CellState.h:
  • heap/Heap.cpp:

(JSC::Heap::Heap):
(JSC::Heap::markToFixpoint):
(JSC::Heap::addToRememberedSet):
(JSC::Heap::stopTheWorld):
(JSC::Heap::writeBarrierSlowPath):
(JSC::Heap::buildConstraintSet):
(JSC::Heap::flushWriteBarrierBuffer): Deleted.

  • heap/Heap.h:

(JSC::Heap::writeBarrierBuffer): Deleted.

  • heap/SlotVisitor.cpp:

(JSC::SlotVisitor::appendJSCellOrAuxiliary):
(JSC::SlotVisitor::setMarkedAndAppendToMarkStack):
(JSC::SlotVisitor::appendToMarkStack):
(JSC::SlotVisitor::visitChildren):

  • heap/WriteBarrierBuffer.cpp: Removed.
  • heap/WriteBarrierBuffer.h: Removed.
  • jit/JITOperations.cpp:
  • jit/JITOperations.h:
  • runtime/JSCellInlines.h:

(JSC::JSCell::JSCell):

  • runtime/StructureIDBlob.h:

(JSC::StructureIDBlob::StructureIDBlob):

3:34 PM Changeset in webkit [210564] by rniwa@webkit.org
  • 6 edits
    4 adds in trunk

:active and :hover states may not be updated across slots
https://bugs.webkit.org/show_bug.cgi?id=166881
<rdar://problem/29944582>

Reviewed by Antti Koivisto.

Source/WebCore:

The bug was caused by updateHoverActiveState not updating :hover and :active states on elements
when nodes are assigned to slots because they were walking up the tree using parentOrShadowHostElement
and parentNode. Fixed the bug by using parentElementInComposedTree instead since :hover and :active
states need to be updated in accordance with the render tree, which is created from the "flat tree"
or the "composed tree" in WebKit's terminology (this is old terminology in the spec).

Tests: fast/shadow-dom/clear-active-state-in-shadow.html

fast/shadow-dom/hover-over-nested-slotted-content.html

  • dom/Document.cpp:

(WebCore::Document::updateHoverActiveState): Fixed the bug.

  • dom/Node.cpp:

(WebCore::Node::parentElementInComposedTree): Added.

  • dom/Node.h:

LayoutTests:

Added two regression tests; one for clearing :active state across a slot, and another one for clearing
a hover state on an ancestor of a slot to which a slot with the hovered element is assigned.

  • fast/shadow-dom/clear-active-state-in-shadow-expected.html: Added.
  • fast/shadow-dom/clear-active-state-in-shadow.html: Added.
  • fast/shadow-dom/hover-over-nested-slotted-content-expected.html: Added.
  • fast/shadow-dom/hover-over-nested-slotted-content.html: Added.
  • platform/ios-simulator/TestExpectations:
3:17 PM Changeset in webkit [210563] by mark.lam@apple.com
  • 5 edits
    1 add in trunk

Property setters should not be called for bound arguments list entries.
https://bugs.webkit.org/show_bug.cgi?id=165631

Reviewed by Filip Pizlo.

JSTests:

  • stress/property-setters-should-not-be-called-for-bound-arguments-list-entries.js: Added.

Source/JavaScriptCore:

  • builtins/FunctionPrototype.js:

(bind):

  • use @putByValDirect to set the bound arguments so that we don't consult the prototype chain for setters.
  • runtime/IntlDateTimeFormatPrototype.cpp:

(JSC::IntlDateTimeFormatPrototypeGetterFormat):

  • runtime/IntlNumberFormatPrototype.cpp:

(JSC::IntlNumberFormatPrototypeGetterFormat):

  • no need to create a bound arguments array because these bound functions binds no arguments according to the spec.
3:09 PM Changeset in webkit [210562] by Keith Rollin
  • 2 edits in trunk/Source/WebCore

Missing logging in IconLoader::startLoading
https://bugs.webkit.org/show_bug.cgi?id=166904

Reviewed by Sam Weinig.

The LOG_ERROR in startLoading references 'resourceRequest', which has
been WTF::Moved as part of a preceding function call. As such, the
logging statement doesn't print out a possibly useful URL. Fix this by
making a copy of the URL before it's affected by the Move.

No new tests -- change only affects logging code.

  • loader/icon/IconLoader.cpp:

(WebCore::IconLoader::startLoading):

2:31 PM Changeset in webkit [210561] by Keith Rollin
  • 5 edits in trunk/Source/WebKit2

Record/replay: fix range used for fuzzy matching
https://bugs.webkit.org/show_bug.cgi?id=166041

Reviewed by Darin Adler and Alex Christensen.

Because of two bugs, the attempt to determine the range of URLs to
check as part of the process of fuzzy matching was failing. The intent
was to find the range of URLs that started with the same
<scheme://host:port> as a given URL. However, because of a reversed
test, the upper end of the range ended up being the "end()" iterator
of the entire collection of URLs. With that fixed, there was another
bug due to one URL being given as <scheme://host:port> and the other
given as <scheme://host:port/> (note the trailing slash). Both of
these issues are now fixed.

  • NetworkProcess/capture/NetworkCaptureManager.cpp:

(WebKit::NetworkCapture::Manager::initialize):
(WebKit::NetworkCapture::Manager::findBestFuzzyMatch):
(WebKit::NetworkCapture::Manager::urlIdentifyingCommonDomain):

  • NetworkProcess/capture/NetworkCaptureManager.h:
  • NetworkProcess/capture/NetworkCaptureResource.cpp:

(WebKit::NetworkCapture::Resource::url):
(WebKit::NetworkCapture::Resource::urlIdentifyingCommonDomain):
(WebKit::NetworkCapture::Resource::baseURL): Deleted.

  • NetworkProcess/capture/NetworkCaptureResource.h:
2:26 PM Changeset in webkit [210560] by Wenson Hsieh
  • 47 edits
    1 copy
    6 adds in trunk

Implement "proximity" scroll snapping
https://bugs.webkit.org/show_bug.cgi?id=135994
<rdar://problem/18162418>

Reviewed by Dean Jackson.

Source/WebCore:

Adds support for proximity scroll snapping. To do this, we introduce scroll offset ranges, a list of scroll
offset ranges that are plumbed alongside the list of scroll snap offsets. Similar to a snap offset, a snap
offset range contains scroll offsets on which scrolling is allowed to come to a rest within a scroll snapping
container. However, unlike normal snap offsets, scrolling may only come to rest within a snap offset range if
the predicted scroll offset already lies within the range. The new algorithm for selecting a target scroll snap
position given a destination offset is now:

  • If the scroll destination lies within a snap offset range, return the scroll destination
  • Otherwise, compute the nearest lower/upper snap offsets and lower/upper snap offset ranges
  • If scrolling ended with no velocity, return the nearest snap offset
  • If scrolling ended with positive velocity, choose the upper snap offset only if there is no snap offset

range in between the scroll destination and the snap offset; else, choose the lower snap offset

  • If scrolling ended with negative velocity, choose the lower snap offset only if there is no snap offset

range in between the scroll destination and the snap offset; else, choose the upper snap offset

The extra rule accounting for scroll offset ranges in between the scroll destination and a potential snap offset
handles the corner case where the user scrolls with momentum very lightly away from a snap offset, such that the
predicted scroll destination is still within proximity of the snap offset. In this case, the regular (mandatory
scroll snapping) behavior would be to snap to the next offset in the direction of momentum scrolling, but
instead, it is more intuitive to return to the original snap position.

We also move scrolling prediction logic into ScrollingMomentumCalculator and adopt the platform
_NSScrollingMomentumCalculator's destinationOrigin property when computing the predicted scroll destination.
Previously, we were simply multiplying by an empirically-derived constant to approximate the scroll destination,
but now that we are supporting proximity scroll snapping, we need more exact scroll destinaton prediction in
order to make sure that scrolling to a snap offset range feels natural.

Tests: tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-then-proximity.html

tiled-drawing/scrolling/scroll-snap/scroll-snap-proximity-mainframe.html
tiled-drawing/scrolling/scroll-snap/scroll-snap-proximity-overflow.html

  • WebCore.xcodeproj/project.pbxproj:
  • page/scrolling/AsyncScrollingCoordinator.cpp:

(WebCore::setStateScrollingNodeSnapOffsetsAsFloat):
(WebCore::AsyncScrollingCoordinator::updateOverflowScrollingNode):
(WebCore::AsyncScrollingCoordinator::updateScrollSnapPropertiesWithFrameView):

Make boilerplate changes to plumb lists of horizontal and vertical snap offset ranges alongside the lists of
horizontal and vertical snap offsets.

  • page/scrolling/AxisScrollSnapOffsets.cpp:

(WebCore::snapOffsetRangesToString):
(WebCore::indicesOfNearestSnapOffsetRanges):
(WebCore::indicesOfNearestSnapOffsets):
(WebCore::adjustAxisSnapOffsetsForScrollExtent):
(WebCore::computeAxisProximitySnapOffsetRanges):
(WebCore::updateSnapOffsetsForScrollableArea):
(WebCore::closestSnapOffset):

Adjust the snap offset selection algorithm to take snap offset ranges into account. See above for more details.
Additionally, augment snap offset update logic to emit snap offset ranges for proximity scroll snapping. To do
this, we run the following steps on the final list of processed snap offsets:

  • Compute the proximity distance, which (for now) is arbitrarily 0.3 * the length or width of the scroll snap

port, depending on whether scroll snapping is taking place in the X or Y axis.

  • For each pair of adjacent snap offsets, if they are more than 2 * proximity distance away from each other,

emit a snap offset range starting from (lower snap offset + proximity distance) and ending on (upper snap
offset + proximity distance).

  • page/scrolling/AxisScrollSnapOffsets.h:

(WebCore::closestSnapOffset): Deleted.

  • page/scrolling/ScrollSnapOffsetsInfo.h:

Introduce ScrollSnapOffsetsInfo, a struct which contains data relevant to scroll snapping. This includes
vertical and horizontal snap offsets, as well as vertical and horizontal snap offset ranges. Snap offset ranges
consist of a vector of ranges of scroll offsets.

  • page/scrolling/ScrollingCoordinator.h:
  • page/scrolling/ScrollingMomentumCalculator.cpp:

(WebCore::projectedInertialScrollDistance):
(WebCore::ScrollingMomentumCalculator::ScrollingMomentumCalculator):
(WebCore::ScrollingMomentumCalculator::setRetargetedScrollOffset):
(WebCore::ScrollingMomentumCalculator::predictedDestinationOffset):
(WebCore::ScrollingMomentumCalculator::create):
(WebCore::ScrollingMomentumCalculator::setPlatformMomentumScrollingPredictionEnabled):
(WebCore::BasicScrollingMomentumCalculator::BasicScrollingMomentumCalculator):
(WebCore::BasicScrollingMomentumCalculator::linearlyInterpolatedOffsetAtProgress):
(WebCore::BasicScrollingMomentumCalculator::initializeInterpolationCoefficientsIfNecessary):
(WebCore::BasicScrollingMomentumCalculator::initializeSnapProgressCurve):

  • page/scrolling/ScrollingMomentumCalculator.h:

(WebCore::ScrollingMomentumCalculator::retargetedScrollOffset):
(WebCore::ScrollingMomentumCalculator::retargetedScrollOffsetDidChange):

Currently, the ScrollingMomentumCalculator is responsible for taking an initial position, initial velocity, and
target position and animating the scroll offset from the initial to target position. Now, we refactor the
ScrollingMomentumCalculator interface to no longer take a target offset upon initialization, and instead compute
the predicted scroll destination given initial position and velocity; clients of the ScrollingMomentumCalculator
then use this predicted scroll destination to compute a retargeted scroll offset and then call
setRetargetedScrollOffset on the calculator, which sets up an animation curve to the new retargeted offset. This
allows both the AppKit-based scrolling momentum calculator and platform-invariant momentum calculator to be used
interchangeably, while still allowing them to compute a destination offset from initial parameters of the
scroll.

  • page/scrolling/ScrollingStateScrollingNode.cpp:

(WebCore::ScrollingStateScrollingNode::ScrollingStateScrollingNode):
(WebCore::ScrollingStateScrollingNode::setHorizontalSnapOffsets):
(WebCore::ScrollingStateScrollingNode::setVerticalSnapOffsets):
(WebCore::ScrollingStateScrollingNode::setHorizontalSnapOffsetRanges):
(WebCore::ScrollingStateScrollingNode::setVerticalSnapOffsetRanges):

  • page/scrolling/ScrollingStateScrollingNode.h:

(WebCore::ScrollingStateScrollingNode::horizontalSnapOffsets):
(WebCore::ScrollingStateScrollingNode::verticalSnapOffsets):
(WebCore::ScrollingStateScrollingNode::horizontalSnapOffsetRanges):
(WebCore::ScrollingStateScrollingNode::verticalSnapOffsetRanges):

  • page/scrolling/ScrollingTreeScrollingNode.cpp:

(WebCore::ScrollingTreeScrollingNode::commitStateBeforeChildren):
(WebCore::ScrollingTreeScrollingNode::dumpProperties):

  • page/scrolling/ScrollingTreeScrollingNode.h:

(WebCore::ScrollingTreeScrollingNode::horizontalSnapOffsets):
(WebCore::ScrollingTreeScrollingNode::verticalSnapOffsets):
(WebCore::ScrollingTreeScrollingNode::horizontalSnapOffsetRanges):
(WebCore::ScrollingTreeScrollingNode::verticalSnapOffsetRanges):

Add more boilerplate support for snap offset ranges.

  • page/scrolling/mac/ScrollingMomentumCalculatorMac.h:
  • page/scrolling/mac/ScrollingMomentumCalculatorMac.mm:

(WebCore::ScrollingMomentumCalculator::create):
(WebCore::ScrollingMomentumCalculator::setPlatformMomentumScrollingPredictionEnabled):
(WebCore::ScrollingMomentumCalculatorMac::ScrollingMomentumCalculatorMac):
(WebCore::ScrollingMomentumCalculatorMac::scrollOffsetAfterElapsedTime):
(WebCore::ScrollingMomentumCalculatorMac::predictedDestinationOffset):
(WebCore::ScrollingMomentumCalculatorMac::retargetedScrollOffsetDidChange):
(WebCore::ScrollingMomentumCalculatorMac::animationDuration):
(WebCore::ScrollingMomentumCalculatorMac::requiresMomentumScrolling):
(WebCore::ScrollingMomentumCalculatorMac::ensurePlatformMomentumCalculator):

Hook into AppKit momentum scroll offset prediction.

  • page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm:

(WebCore::convertToLayoutUnits):
(WebCore::ScrollingTreeFrameScrollingNodeMac::commitStateBeforeChildren):

  • platform/ScrollableArea.cpp:

(WebCore::ScrollableArea::ensureSnapOffsetsInfo):
(WebCore::ScrollableArea::horizontalSnapOffsets):
(WebCore::ScrollableArea::horizontalSnapOffsetRanges):
(WebCore::ScrollableArea::verticalSnapOffsetRanges):
(WebCore::ScrollableArea::verticalSnapOffsets):
(WebCore::ScrollableArea::setHorizontalSnapOffsets):
(WebCore::ScrollableArea::setVerticalSnapOffsets):
(WebCore::ScrollableArea::setHorizontalSnapOffsetRanges):
(WebCore::ScrollableArea::setVerticalSnapOffsetRanges):
(WebCore::ScrollableArea::clearHorizontalSnapOffsets):
(WebCore::ScrollableArea::clearVerticalSnapOffsets):

  • platform/ScrollableArea.h:

(WebCore::ScrollableArea::horizontalSnapOffsets): Deleted.
(WebCore::ScrollableArea::verticalSnapOffsets): Deleted.

  • platform/cocoa/ScrollController.h:
  • platform/cocoa/ScrollController.mm:

(WebCore::ScrollController::processWheelEventForScrollSnap):

Fix an issue where initial scrolling velocity would be set to zero at the end of a drag gesture.

(WebCore::ScrollController::updateScrollSnapState):
(WebCore::ScrollController::updateScrollSnapPoints):
(WebCore::ScrollController::setNearestScrollSnapIndexForAxisAndOffset):

  • platform/cocoa/ScrollSnapAnimatorState.h:

(WebCore::ScrollSnapAnimatorState::snapOffsetsForAxis):
(WebCore::ScrollSnapAnimatorState::snapOffsetRangesForAxis):
(WebCore::ScrollSnapAnimatorState::setSnapOffsetsAndPositionRangesForAxis):
(WebCore::ScrollSnapAnimatorState::setSnapOffsetsForAxis): Deleted.

  • platform/cocoa/ScrollSnapAnimatorState.mm:

(WebCore::ScrollSnapAnimatorState::setupAnimationForState):
(WebCore::ScrollSnapAnimatorState::targetOffsetForStartOffset):
(WebCore::projectedInertialScrollDistance): Deleted.

  • rendering/RenderLayerCompositor.cpp:

(WebCore::RenderLayerCompositor::updateScrollCoordinatedLayer):

  • testing/Internals.cpp:

(WebCore::Internals::setPlatformMomentumScrollingPredictionEnabled):

Add a new hook for layout tests to force scrolling momentum calculators to use the platform-invariant momentum
scrolling prediction heuristic instead of the platform-dependent one.

(WebCore::Internals::scrollSnapOffsets):

  • testing/Internals.h:
  • testing/Internals.idl:

Source/WebKit2:

Adds boilerplate support for plumbing lists of snap offset ranges from the web process to the UI process
alongside the list of snap offsets.

  • Shared/Scrolling/RemoteScrollingCoordinatorTransaction.cpp:

(ArgumentCoder<ScrollingStateScrollingNode>::encode):
(ArgumentCoder<ScrollingStateScrollingNode>::decode):

  • Shared/WebCoreArgumentCoders.cpp:

(IPC::ArgumentCoder<ScrollOffsetRange<float>>::encode):
(IPC::ArgumentCoder<ScrollOffsetRange<float>>::decode):

  • Shared/WebCoreArgumentCoders.h:
  • UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.mm:

(-[WKOverflowScrollViewDelegate scrollViewWillEndDragging:withVelocity:targetContentOffset:]):

  • UIProcess/ios/RemoteScrollingCoordinatorProxyIOS.mm:

Adjust mainframe proximity scroll snapping logic to not subtract out the top content inset when there is no
active snap offset (i.e. when snapping rests in a snap offset range). Attempting to subtract out the top inset
in this case caused the scroll offset to jump after ending a drag with no momentum in a snap offset range.

(WebKit::RemoteScrollingCoordinatorProxy::adjustTargetContentOffsetForSnapping):
(WebKit::RemoteScrollingCoordinatorProxy::shouldSnapForMainFrameScrolling):
(WebKit::RemoteScrollingCoordinatorProxy::closestSnapOffsetForMainFrameScrolling):

LayoutTests:

Adds 3 new layout tests for proximity scroll snapping. Also tweaks some existing tests that test scroll snapping
after scrolling with momentum to use the custom heuristic for predicting scroll destination instead of platform
momentum scrolling. This ensures that the results of our layout tests that depend on predicting momentum scroll
destination are consistent across runs.

  • tiled-drawing/scrolling/latched-div-with-scroll-snap.html:
  • tiled-drawing/scrolling/scroll-snap/scroll-snap-iframe.html:
  • tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-2d-overflow.html:
  • tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-borders.html:
  • tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-hidden-scrollbars.html:
  • tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-mainframe-horizontal.html:
  • tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-mainframe-slow-horizontal.html:
  • tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-mainframe-slow-vertical.html:
  • tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-mainframe-vertical-then-horizontal.html:
  • tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-mainframe-vertical.html:
  • tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-overflow-stateless.html:
  • tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-overflow.html:
  • tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-padding.html:
  • tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-rotated.html:

Force these tests to use platform-independent scrolling momentum prediction, by multiplying the last scroll
delta upon release by a constant factor.

  • tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-then-proximity-expected.txt: Added.
  • tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-then-proximity.html: Added.

Tests that after changing scroll-snap-type from mandatory to proximity, swiping downwards no longer snaps the
scroll offset to the second box, but instead leaves the scroll offset somewhere in the middle of the first box.

  • tiled-drawing/scrolling/scroll-snap/scroll-snap-proximity-mainframe-expected.txt: Added.
  • tiled-drawing/scrolling/scroll-snap/scroll-snap-proximity-mainframe.html: Added.

Tests that when scroll-snap-type is proximity in the mainframe, scrolling slightly downwards snaps the scroll
offset back up to the top; scrolling somewhere in the middle of the first box does not snap the scroll offset;
and scrolling near the end of the first box snaps the scroll offset to the second box.

  • tiled-drawing/scrolling/scroll-snap/scroll-snap-proximity-overflow-expected.txt: Added.
  • tiled-drawing/scrolling/scroll-snap/scroll-snap-proximity-overflow.html: Added.

Similar to scroll-snap-proximity-mainframe.html, except for overflow scrolling instead of the mainframe.

  • tiled-drawing/scrolling/scroll-snap/scroll-snap-scrolling-jumps-to-top.html:
1:59 PM Changeset in webkit [210559] by Chris Dumez
  • 5 edits
    2 adds in trunk

Make Event.initEvent()'s first parameter mandatory
https://bugs.webkit.org/show_bug.cgi?id=166894

Reviewed by Alex Christensen.

LayoutTests/imported/w3c:

Rebaseline existing W3C test now that we're closing to the specification.

  • web-platform-tests/dom/interfaces-expected.txt:

Source/WebCore:

Make Event.initEvent()'s first parameter mandatory. As per the
specification, all parameters should be mandatory and we are
currently dicussing the possibility of making them optional in
the specification. However, having the first parameter optional
makes little sense as it would set the event's type to the string
"undefined".

Test: fast/events/initEvent-parameters.html

  • dom/Event.idl:

LayoutTests:

Add layout test coverage.

  • fast/events/initEvent-parameters-expected.txt: Added.
  • fast/events/initEvent-parameters.html: Added.
1:36 PM EnvironmentVariables edited by clopez@igalia.com
(diff)
1:13 PM Changeset in webkit [210558] by gskachkov@gmail.com
  • 5 edits
    1 add in trunk

Calling async arrow function which is in a class's member function will cause error
https://bugs.webkit.org/show_bug.cgi?id=166879

Reviewed by Saam Barati.

JSTests:

  • stress/async-arrow-functions-lexical-binding-in-class.js: Added.

(shouldBe):
(shouldBeAsync):
(BaseClass.prototype.baseClassValue):
(BaseClass.prototype.get property):
(BaseClass):
(runSomething):
(ChildClass.prototype.classValue):
(ChildClass.prototype.get classProperty):
(ChildClass.prototype.asyncValueExp):
(ChildClass.prototype.asyncValueBody):
(ChildClass.prototype.asyncThisPropExp):
(ChildClass.prototype.asyncThisPropBody):
(ChildClass.prototype.asyncThisPropInEvalExp):
(ChildClass.prototype.asyncThisPropInEvalBody):
(ChildClass.prototype.asyncThisValueExp):
(ChildClass.prototype.asyncThisValueBody):
(ChildClass.prototype.asyncThisValueInEvalExp):
(ChildClass.prototype.asyncThisValueInEvalBody):
(ChildClass):
(ChildClass2):
(ChildClass2.prototype.classValue):
(ChildClass2.prototype.get classProperty):

  • stress/async-arrow-functions-lexical-super-binding.js:

Source/JavaScriptCore:

Current patch fixed loading 'super' in async arrow function. Errored appear becuase
super was loaded always nevertherless if it used in async arrow function or not, but bytecompiler
put to arrow function context only if it used within arrow function. So to fix this issue we need to
check if super was used in arrow function.

  • bytecompiler/BytecodeGenerator.h:
  • bytecompiler/NodesCodegen.cpp:

(JSC::FunctionNode::emitBytecode):

12:42 PM Changeset in webkit [210557] by Ryan Haddad
  • 19 edits
    3 deletes in trunk

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

This change introduced JSC test failures (Requested by
ryanhaddad on #webkit).

Reverted changeset:

"Implement JSSourceCode to propagate SourceCode in module
pipeline"
https://bugs.webkit.org/show_bug.cgi?id=166861
http://trac.webkit.org/changeset/210537

Patch by Commit Queue <commit-queue@webkit.org> on 2017-01-10

12:12 PM Changeset in webkit [210556] by Chris Dumez
  • 2 edits in trunk/Source/WebCore

REGRESSION(r189555): ImageDocument title no longer includes the size of the image
https://bugs.webkit.org/show_bug.cgi?id=166876
<rdar://problem/29939970>

Reviewed by Ryosuke Niwa.

Add a code comment to clarify fix that was made in r210536.

  • html/ImageDocument.cpp:

(WebCore::ImageDocument::createDocumentStructure):

12:09 PM Changeset in webkit [210555] by jer.noble@apple.com
  • 19 edits
    1 copy
    3 adds in trunk

Add support for MediaKeys.generateRequest().
https://bugs.webkit.org/show_bug.cgi?id=166880

Reviewed by Xabier Rodriguez-Calvar.

Source/WebCore:

Test: media/encrypted-media/mock-MediaKeySession-generateRequest.html

Implement MediaKeySession::generateRequest(). This requires some additions
to CDM, CDMPrivate, and CDMInstance to support platform adoption and to
implement mock support for testing. Additionally, add an InitDataRegistry
object which can sanitize and extract key data from various initData types.
(At the moment, only the "keyids" initData type is implemented.)

Drive-by fixes: Change all instances of initDataType from String -> AtomicString.
Add "const" flags to all CDMPrivate methods that might be called from a const
reference.

  • CMakeLists.txt:
  • Modules/encryptedmedia/CDM.cpp:

(WebCore::CDM::supportsInitDataType):
(WebCore::CDM::sanitizeInitData):
(WebCore::CDM::supportsInitData):

  • Modules/encryptedmedia/CDM.h:
  • Modules/encryptedmedia/CDMInstance.h:
  • Modules/encryptedmedia/CDMPrivate.h:
  • Modules/encryptedmedia/InitDataRegistry.cpp: Added.

(WebCore::extractKeyIDsKeyids):
(WebCore::sanitizeKeyids):
(WebCore::sanitizeCenc):
(WebCore::extractKeyIDsCenc):
(WebCore::sanitizeWebM):
(WebCore::extractKeyIDsWebM):
(WebCore::InitDataRegistry::shared):
(WebCore::InitDataRegistry::InitDataRegistry):
(WebCore::InitDataRegistry::sanitizeInitData):
(WebCore::InitDataRegistry::extractKeyIDs):
(WebCore::InitDataRegistry::registerInitDataType):

  • Modules/encryptedmedia/InitDataRegistry.h:
  • Modules/encryptedmedia/MediaKeySession.cpp:

(WebCore::messageEventName):
(WebCore::MediaKeySession::MediaKeySession):
(WebCore::MediaKeySession::generateRequest):
(WebCore::MediaKeySession::enqueueMessage):

  • Modules/encryptedmedia/MediaKeySession.h:
  • Modules/encryptedmedia/MediaKeys.cpp:

(WebCore::MediaKeys::setServerCertificate):

  • WebCore.xcodeproj/project.pbxproj:
  • testing/MockCDMFactory.cpp:

(WebCore::MockCDMFactory::addKeysToSessionWithID):
(WebCore::MockCDMFactory::setSupportedDataTypes):
(WebCore::MockCDM::supportsInitDataType):
(WebCore::MockCDM::supportsConfiguration):
(WebCore::MockCDM::supportsConfigurationWithRestrictions):
(WebCore::MockCDM::supportsSessionTypeWithConfiguration):
(WebCore::MockCDM::supportsRobustness):
(WebCore::MockCDM::distinctiveIdentifiersRequirement):
(WebCore::MockCDM::persistentStateRequirement):
(WebCore::MockCDM::distinctiveIdentifiersAreUniquePerOriginAndClearable):
(WebCore::MockCDM::supportsInitData):
(WebCore::MockCDMInstance::setServerCertificate):
(WebCore::MockCDMInstance::requestLicense):

  • testing/MockCDMFactory.h:

(WebCore::MockCDMFactory::supportedDataTypes):
(WebCore::MockCDMFactory::hasSessionWithID):
(WebCore::MockCDMFactory::removeSessionWithID):
(WebCore::MockCDMFactory::setSupportedDataTypes): Deleted.

LayoutTests:

Add shouldResolve() and shouldReject() to video-test.js and update existing
tests to use these new functions.

  • media/encrypted-media/mock-MediaKeys-createSession-expected.txt: Added.
  • media/encrypted-media/mock-MediaKeys-createSession.html: Added.
  • media/encrypted-media/mock-MediaKeys-setServerCertificate.html:
  • media/encrypted-media/mock-MediaKeySession-generateRequest.html:
  • media/encrypted-media/mock-MediaKeySystemAccess.html:
  • media/encrypted-media/mock-navigator-requestMediaKeySystemAccess.html:
  • media/video-test.js:

(shouldResolve):
(shouldReject):

  • platform/mac/TestExpectations:
11:13 AM Changeset in webkit [210554] by commit-queue@webkit.org
  • 3 edits in trunk/Source/JavaScriptCore

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

too crude for non-WebCore clients (Requested by kling on
#webkit).

Reverted changeset:

"Crash when GC heap grows way too large."
https://bugs.webkit.org/show_bug.cgi?id=166875
http://trac.webkit.org/changeset/210540

10:44 AM Changeset in webkit [210553] by fpizlo@apple.com
  • 5 edits in trunk/Source/JavaScriptCore

JSArray has some object scanning races
https://bugs.webkit.org/show_bug.cgi?id=166874

Reviewed by Mark Lam.

This fixes two separate bugs, both of which I detected by running
array-splice-contiguous.js in extreme anger:

1) Some of the paths of shifting and unshifting were not grabbing the internal cell

lock. This was causing the array storage scan to crash, even though it was well
synchronized (the scan does hold the lock). The fix is just to hold the lock anywhere
that memmoves the innards of the butterfly.


2) Out of line property scanning was synchronized using double collect snapshot. Array

storage scanning was synchronized using locks. But what if array storage
transformations messed up the out of line properties? It turns out that we actually
need to hoist the array storage scanner's locking up into the double collect
snapshot.


I don't know how to write a test that does any better of a job of catching this than
array-splice-contiguous.js.

  • heap/DeferGC.h: Make DisallowGC usable even if NDEBUG.
  • runtime/JSArray.cpp:

(JSC::JSArray::unshiftCountSlowCase):
(JSC::JSArray::shiftCountWithArrayStorage):
(JSC::JSArray::unshiftCountWithArrayStorage):

  • runtime/JSObject.cpp:

(JSC::JSObject::visitButterflyImpl):

10:41 AM Changeset in webkit [210552] by jer.noble@apple.com
  • 17 edits
    2 adds in trunk

Add support for MediaKeys.createSession().
https://bugs.webkit.org/show_bug.cgi?id=166796

Reviewed by Eric Carlson.

Source/WebCore:

Test: media/encrypted-media/mock-MediaKeys-createSession.html

Implement MediaKeys::createSession(). This requires some additions to
CDM, CDMPrivate, and CDMInstance to support platform adoption and to
implement mock support for testing. Because the CDMInstance will now
be shared between MediaKeys and MediaKeySession, it cannot be a unique_ptr.
Make CDMInterface ref-counted and store it as a Ref.

  • Modules/encryptedmedia/CDM.cpp:

(WebCore::CDM::createInstance):
(WebCore::CDM::supportsSessions):

  • Modules/encryptedmedia/CDM.h:
  • Modules/encryptedmedia/CDMInstance.h:
  • Modules/encryptedmedia/CDMPrivate.h:
  • Modules/encryptedmedia/MediaKeySession.cpp:

(WebCore::MediaKeySession::create):
(WebCore::MediaKeySession::MediaKeySession):
(WebCore::MediaKeySession::sessionId):
(WebCore::MediaKeySession::expiration):
(WebCore::MediaKeySession::keyStatuses):

  • Modules/encryptedmedia/MediaKeySession.h:
  • Modules/encryptedmedia/MediaKeySessionType.idl:
  • Modules/encryptedmedia/MediaKeySystemAccess.cpp:

(WebCore::MediaKeySystemAccess::createMediaKeys):

  • Modules/encryptedmedia/MediaKeys.cpp:

(WebCore::MediaKeys::MediaKeys):
(WebCore::MediaKeys::createSession):

  • Modules/encryptedmedia/MediaKeys.h:

(WebCore::MediaKeys::create):

  • Modules/encryptedmedia/MediaKeys.idl:

LayoutTests:

  • media/encrypted-media/mock-MediaKeys-createSession-expected.txt: Added.
  • media/encrypted-media/mock-MediaKeys-createSession.html: Added.
  • platform/mac/TestExpectations:
10:05 AM Changeset in webkit [210551] by Jonathan Bedard
  • 3 edits in trunk/Tools

svn-apply failed to apply a patch (deleting file with svn property)
https://bugs.webkit.org/show_bug.cgi?id=165953

Reviewed by Daniel Bates.

  • Scripts/VCSUtils.pm:

(parseSvnPropertyValue): The beginning of a diff will cause an early exit in the case of no empty newlines.

  • Scripts/webkitperl/VCSUtils_unittest/parseSvnProperty.pl: Add tests without break between diffs for properties.
9:54 AM Changeset in webkit [210550] by rniwa@webkit.org
  • 2 edits in trunk/Source/WebKit/mac

Remove pointerLockElement from DOMDocumentPrivate.h
https://bugs.webkit.org/show_bug.cgi?id=166882

Reviewed by Simon Fraser.

Removed pointerLockElement declaration that was supposed to be removed in r209637.

  • DOM/DOMDocumentPrivate.h:
9:25 AM Changeset in webkit [210549] by jer.noble@apple.com
  • 13 edits
    2 adds in trunk

Add support for MediaKeys.setServerCertificate()
https://bugs.webkit.org/show_bug.cgi?id=166772

Reviewed by Darin Adler.

Source/WebCore:

Test: media/encrypted-media/mock-MediaKeys-setServerCertificate.html

Implement MediaKeys::setServerCertificate(). This requires some additions
to CDM, CDMPrivate, and CDMInstance to support platform adoption and to
implement mock support for testing.

  • Modules/encryptedmedia/CDM.cpp:

(WebCore::CDM::supportsServerCertificates):

  • Modules/encryptedmedia/CDM.h:
  • Modules/encryptedmedia/CDMInstance.h:
  • Modules/encryptedmedia/CDMPrivate.h:
  • Modules/encryptedmedia/MediaKeys.cpp:

(WebCore::MediaKeys::setServerCertificate):

  • Modules/encryptedmedia/MediaKeys.h:
  • testing/MockCDMFactory.cpp:

(WebCore::MockCDM::supportsServerCertificates):
(WebCore::MockCDMInstance::setServerCertificate):

  • testing/MockCDMFactory.h:

(WebCore::MockCDMFactory::supportsServerCertificates):
(WebCore::MockCDMFactory::setSupportsServerCertificates):

  • testing/MockCDMFactory.idl:

LayoutTests:

  • media/encrypted-media/mock-MediaKeys-setServerCertificate-expected.txt: Added.
  • media/encrypted-media/mock-MediaKeys-setServerCertificate.html: Added.
9:18 AM Changeset in webkit [210548] by Ryan Haddad
  • 3 edits in trunk/Tools

Update flakiness dashboard configuration.
https://bugs.webkit.org/show_bug.cgi?id=166869

Reviewed by Alexey Proskuryakov.

  • TestResultServer/static-dashboards/builders.jsonp:
  • TestResultServer/static-dashboards/flakiness_dashboard.js:
9:07 AM Changeset in webkit [210547] by clopez@igalia.com
  • 2 edits in trunk/Tools

[GTK] Stop honoring the environment variable USE_NATIVE_XDISPLAY
https://bugs.webkit.org/show_bug.cgi?id=165232

Unreviewed follow-up patch after r210539 and r210523.

Instead of using that environment variable, the argument
--display-server=xorg should be passed now.

The GTK+ performance bot was the only bot using this, and is
already passing --display-server=xorg after r210539.

  • Scripts/webkitpy/port/gtk.py:

(GtkPort._driver_class):

7:07 AM Changeset in webkit [210546] by commit-queue@webkit.org
  • 7 edits in trunk

CachedScript cloning does not clone encodedSize
https://bugs.webkit.org/show_bug.cgi?id=166865

Patch by Youenn Fablet <youenn@apple.com> on 2017-01-10
Reviewed by Darin Adler.

Source/WebCore:

Covered by updated test.

  • loader/cache/CachedResource.cpp:

(WebCore::CachedResource::setBodyDataFrom): set encoded size based on being cloned resource.

  • loader/cache/CachedScript.cpp:

(WebCore::CachedScript::script):
(WebCore::CachedScript::setBodyDataFrom): Making use of CachedResource::setBodyDataFrom for complete cloning.

LayoutTests:

  • http/tests/security/cross-origin-cached-scripts-expected.txt:
  • http/tests/security/cross-origin-cached-scripts.html:
  • http/tests/security/resources/notify-loaded.js:
6:51 AM Changeset in webkit [210545] by zandobersek@gmail.com
  • 3 edits in trunk/Source/WebKit2

ThreadedCoordinatedLayerTreeHost::renderNextFrame() should short-cut to layer flushing
https://bugs.webkit.org/show_bug.cgi?id=157614

Reviewed by Carlos Garcia Campos.

CoordinatedLayerTreeHost prevents any layer flushes while a previously-commited scene
state is still being rendered on the composition thread. renderNextFrame() is called
once that is complete, and a new layer flush is scheduled.

This change improves the whole ordeal by immediately performing the layer flush only if
it was requested during the time we were waiting on the renderer (i.e. when the latest
scene state was being composited), instead of scheduling it unconditionally.
m_scheduledWhileWaitingForRenderer member variable is added to track that occurrence.

  • WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:

(WebKit::CoordinatedLayerTreeHost::scheduleLayerFlush):
(WebKit::CoordinatedLayerTreeHost::renderNextFrame):

  • WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h:
6:49 AM Changeset in webkit [210544] by zandobersek@gmail.com
  • 2 edits in trunk/Source/WebCore

Unreviewed. Remove the unused gReadyStateTimerInterval global from
the MediaPlayerPrivateGStreamerMSE implementation file as it's only
springing up a compiler warning.

  • platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.cpp:
4:32 AM Changeset in webkit [210543] by zandobersek@gmail.com
  • 3 edits in trunk/Source/WebCore

[CoordinatedGraphics] TextureMapperPlatformLayerProxy is constantly getting activated
https://bugs.webkit.org/show_bug.cgi?id=166856

Reviewed by Michael Catanzaro.

When CoordinatedGraphicsLayer::setContentsNeedsDisplay() is called, currently with
the threaded CoordinatedGraphics mode the platform layer is marked for synchronizing.
This means that at flush-time this layer swaps the buffer of the wrapped platform
layer and updates the layer state to indicate that the underlying
TextureMapperPlatformLayerProxy object has to be activated on the composition thread.

This current logic results in the TextureMapperPlatformLayerProxy object being
reactivated for every display request that arrives via setContentsNeedsDisplay().
This is pretty wasteful since this activation heap-allocates a RunLoop::Timer object
which internally also locks up the GLib main context to attach a new source, and
that's only after the source on the previous RunLoop::Timer was detached before
that RunLoop::Timer was destroyed.

To avoid this, CoordinatedGraphicsLayer::setContentsNeedsDisplay() sets a new flag,
m_shouldUpdatePlatformLayer. During flush, this flag is checked in
CoordinatedGraphicsLayer::updatePlatformLayer(), with the buffer swap performed in
case it's set. CoordinatedGraphicsLayer::syncPlatformLayer() now only sets the
platform layer proxy object for that layer's state.

  • platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:

(WebCore::CoordinatedGraphicsLayer::CoordinatedGraphicsLayer):
(WebCore::CoordinatedGraphicsLayer::setContentsNeedsDisplay):
(WebCore::CoordinatedGraphicsLayer::syncPlatformLayer):
(WebCore::CoordinatedGraphicsLayer::updatePlatformLayer):
(WebCore::CoordinatedGraphicsLayer::flushCompositingStateForThisLayerOnly):

  • platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h:
4:29 AM Changeset in webkit [210542] by zandobersek@gmail.com
  • 3 edits in trunk/Source/WebCore

[TexMap] Use WTF::Function in TextureMapperPlatformLayerProxy
https://bugs.webkit.org/show_bug.cgi?id=166853

Reviewed by Michael Catanzaro.

Use WTF::Function in the TextureMapperPlatformLayerProxy, instead of
the std::function bloat.

  • platform/graphics/texmap/TextureMapperPlatformLayerProxy.cpp:

(WebCore::TextureMapperPlatformLayerProxy::scheduleUpdateOnCompositorThread):
(WebCore::TextureMapperPlatformLayerProxy::compositorThreadUpdateTimerFired):

  • platform/graphics/texmap/TextureMapperPlatformLayerProxy.h:
4:28 AM Changeset in webkit [210541] by zandobersek@gmail.com
  • 2 edits in trunk/Source/WebCore

[TextureMapper] TextureMapperPlatformLayerProxy::swapBuffers() should hold the lock throughout invocation
https://bugs.webkit.org/show_bug.cgi?id=166852

Reviewed by Michael Catanzaro.

  • platform/graphics/texmap/TextureMapperPlatformLayerProxy.cpp:

(WebCore::TextureMapperPlatformLayerProxy::swapBuffer): Append to previous buffer
to the m_usedBuffers Vector while the object's lock is held. Everywhere else the
m_usedBuffers Vector is used under the lock, no reason to not do the same here.

4:16 AM Changeset in webkit [210540] by akling@apple.com
  • 3 edits in trunk/Source/JavaScriptCore

Crash when GC heap grows way too large.
<https://webkit.org/b/166875>
<rdar://problem/27896585>

Reviewed by Mark Lam.

Hard cap the JavaScript heap at 4GB of live objects (determined post-GC.)
If we go past this limit, crash with a recognizable signature.

  • heap/Heap.cpp:

(JSC::Heap::didExceedHeapSizeLimit):
(JSC::Heap::updateAllocationLimits):

3:03 AM Changeset in webkit [210539] by clopez@igalia.com
  • 4 edits in trunk/Tools

[GTK] Add a new release test bot for Wayland and pass --display-server=xorg to the GTK Perf bot.
https://bugs.webkit.org/show_bug.cgi?id=166872

Reviewed by Michael Catanzaro.

Add the new wayland release test bot as a test-only bot. It will download the built product from the release build-only bot.
Define the required "--display-server=driver" in the bot additionalArguments config entry.
Implement support for honoring additionalArguments on the RunGtkAPITests and RunAndUploadPerfTests steps.
The step RunWebKitTests already has support for it.

  • BuildSlaveSupport/build.webkit.org-config/config.json:
  • BuildSlaveSupport/build.webkit.org-config/master.cfg:

(RunGtkAPITests.start):
(RunAndUploadPerfTests.start):

  • BuildSlaveSupport/build.webkit.org-config/mastercfg_unittest.py:

Jan 9, 2017:

11:02 PM Changeset in webkit [210538] by rniwa@webkit.org
  • 4 edits
    2 adds in trunk/LayoutTests

Add an iOS test for tapping on a text node assigned to a slot
https://bugs.webkit.org/show_bug.cgi?id=166877

Reviewed by Andy Estes.

Add a test for tapping on a text node assigned to a slot.
touchstart event must be fired on a parent of the slot with a touch event handler.

  • TestExpectations:
  • fast/shadow-dom/touch-event-on-text-assigned-to-slot-expected.txt: Added.
  • fast/shadow-dom/touch-event-on-text-assigned-to-slot.html: Added.
  • resources/ui-helper.js:

(window.UIHelper.tapAt): Added.

9:58 PM Changeset in webkit [210537] by Yusuke Suzuki
  • 19 edits
    3 adds in trunk

Implement JSSourceCode to propagate SourceCode in module pipeline
https://bugs.webkit.org/show_bug.cgi?id=166861

Reviewed by Saam Barati.

Source/JavaScriptCore:

Instead of propagating source code string, we propagate JSSourceCode
cell in the module pipeline. This allows us to attach a metadata
to the propagated source code string. In particular, it propagates
SourceOrigin through the module pipeline.

  • CMakeLists.txt:
  • JavaScriptCore.xcodeproj/project.pbxproj:
  • builtins/ModuleLoaderPrototype.js:

(fulfillFetch):
(requestFetch):

  • jsc.cpp:

(GlobalObject::moduleLoaderFetch):

  • llint/LLIntData.cpp:

(JSC::LLInt::Data::performAssertions):

  • llint/LowLevelInterpreter.asm:
  • runtime/Completion.cpp:

(JSC::loadAndEvaluateModule):
(JSC::loadModule):

  • runtime/JSModuleLoader.cpp:

(JSC::JSModuleLoader::provide):

  • runtime/JSModuleLoader.h:
  • runtime/JSSourceCode.cpp: Added.

(JSC::JSSourceCode::destroy):

  • runtime/JSSourceCode.h: Added.

(JSC::JSSourceCode::createStructure):
(JSC::JSSourceCode::create):
(JSC::JSSourceCode::sourceCode):
(JSC::JSSourceCode::JSSourceCode):

  • runtime/JSType.h:
  • runtime/ModuleLoaderPrototype.cpp:

(JSC::moduleLoaderPrototypeParseModule):

  • runtime/VM.cpp:

(JSC::VM::VM):

  • runtime/VM.h:

Source/WebCore:

Now SourceOrigin is correctly propagated through the module pipeline.
So the error reported by http/tests/security/contentSecurityPolicy/module-eval-blocked-expected.html
is updated.

  • ForwardingHeaders/runtime/JSSourceCode.h: Added.
  • bindings/js/JSDOMPromise.h:

(WebCore::DeferredPromise::resolveWithCallback):

  • bindings/js/ScriptModuleLoader.cpp:

(WebCore::ScriptModuleLoader::notifyFinished):

LayoutTests:

  • http/tests/security/contentSecurityPolicy/module-eval-blocked-expected.txt:
9:04 PM Changeset in webkit [210536] by Chris Dumez
  • 3 edits
    2 adds in trunk

REGRESSION(r189555): ImageDocument title no longer includes the size of the image
https://bugs.webkit.org/show_bug.cgi?id=166876
<rdar://problem/29939970>

Reviewed by Tim Horton.

Source/WebCore:

ImageDocument title no longer included the size of the image after r189555.
This is because Document::setTitle() is a no-op if the document does not
have a <head> element. To address the issue, we now include a <head>
element in ImageDocuments so that their title element properly gets added
to it.

Test: fast/images/imageDocument-title.html

  • html/ImageDocument.cpp:

(WebCore::ImageDocument::createDocumentStructure):

LayoutTests:

Add layout test coverage.

  • fast/images/imageDocument-title-expected.txt: Added.
  • fast/images/imageDocument-title.html: Added.
8:19 PM Changeset in webkit [210535] by Yusuke Suzuki
  • 2 edits in trunk/Source/JavaScriptCore

REGRESSION (r210522): ASSERTION FAILED: divot.offset >= divotStart.offset seen with stress/import-basic.js and stress/import-from-eval.js
https://bugs.webkit.org/show_bug.cgi?id=166873

Reviewed by Saam Barati.

The divot should be the end of import token.

  • parser/Parser.cpp:

(JSC::Parser<LexerType>::parseMemberExpression):

6:17 PM Changeset in webkit [210534] by Alan Bujtas
  • 3 edits
    2 adds in trunk

ASSERTION FAILED: newLogicalTop >= logicalTop in WebCore::RenderBlockFlow::getClearDelta
https://bugs.webkit.org/show_bug.cgi?id=151202
<rdar://problem/27711822>

Reviewed by Myles C. Maxfield.

Source/WebCore:

FindNextFloatLogicalBottomAdapter uses LayoutUnit::max() to flag m_nextLogicalBottom uninitialized.
However LayoutUnit::max() can also be a valid value for m_nextLogicalBottom.
FindNextFloatLogicalBottomAdapter::nextLogicalBottom() returns 0 instead of the actual value when
it sees m_nextLogicalBottom uninitialized. In certain cases, it confuses the caller and we end up
with a runaway loop.

Test: fast/block/float/assert-when-line-has-not-enough-space-left.html

  • rendering/FloatingObjects.cpp:

(WebCore::FindNextFloatLogicalBottomAdapter::FindNextFloatLogicalBottomAdapter):
(WebCore::FindNextFloatLogicalBottomAdapter::highValue):
(WebCore::FindNextFloatLogicalBottomAdapter::nextLogicalBottom):
(WebCore::FindNextFloatLogicalBottomAdapter::nextShapeLogicalBottom):
(WebCore::FindNextFloatLogicalBottomAdapter::collectIfNeeded):

LayoutTests:

  • fast/block/float/assert-when-line-has-not-enough-space-left-expected.txt: Added.
  • fast/block/float/assert-when-line-has-not-enough-space-left.html: Added.
5:28 PM Changeset in webkit [210533] by Ryan Haddad
  • 10 edits
    2 deletes in trunk

Unreviewed, rolling out r210531.

This change broke the 32-bit macOS build and caused LayoutTest
failures.

Reverted changeset:

"File scheme should not allow access of a resource on a
different volume."
https://bugs.webkit.org/show_bug.cgi?id=158552
http://trac.webkit.org/changeset/210531

4:46 PM Changeset in webkit [210532] by Chris Dumez
  • 8 edits
    3 deletes in trunk/Source

[iOS] Drop VNodeTracker
https://bugs.webkit.org/show_bug.cgi?id=166868
<rdar://problem/29937587>

Reviewed by Andreas Kling.

Source/WebCore:

Drop VNodeTracker on iOS. This was introduced a while back to try and
address vnode exhaustion issues in long running page load tests.
However, there was no evidence that the VNodeTracker functionality
helped so there is little point in keeping the extra code complexity.

  • WebCore.xcodeproj/project.pbxproj:
  • platform/SharedBuffer.h:
  • platform/VNodeTracker.cpp: Removed.
  • platform/VNodeTracker.h: Removed.
  • platform/cf/SharedBufferCF.cpp:

(WebCore::SharedBuffer::SharedBuffer):

  • platform/cocoa/VNodeTrackerCocoa.cpp: Removed.

Source/WebKit2:

  • WebProcess/cocoa/WebProcessCocoa.mm:

(WebKit::WebProcess::platformInitializeWebProcess):

4:32 PM Changeset in webkit [210531] by Brent Fulgham
  • 10 edits
    2 adds in trunk

File scheme should not allow access of a resource on a different volume.
https://bugs.webkit.org/show_bug.cgi?id=158552
<rdar://problem/15307582>

Reviewed by Alex Christensen.

Source/WebCore:

Revise SecurityOrigin to prevent files from one storage device (volume) from accessing content
on a different storage device (volume) unless universal access is enabled.

Pass the current file device as part of the NSURLRequest so that CFNetwork can reject loads
where the device changes in the midst of a load.

Also properly reflect that SecurityOrigin is never null by passing as a reference,
rather than as a pointer.

Tests: Tools/TestWebKitAPI/Tests/mac/CrossPartitionFileSchemeAccess.mm

  • page/SecurityOrigin.cpp:

(WebCore::SecurityOrigin::canAccess): Pass argument as reference.
(WebCore::SecurityOrigin::passesFileCheck): Add check that file URLs refer to files in
the same storage volume.
(WebCore::SecurityOrigin::canDisplay): Add check that files share the same volume.
(WebCore::SecurityOrigin::isSameSchemeHostPort): Pass argument as reference.

  • page/SecurityOrigin.h:
  • platform/FileSystem.cpp:

(WebCore::filesHaveSameVolume): Added.

  • platform/FileSystem.h:
  • platform/network/cocoa/ResourceRequestCocoa.mm:

(WebCore::ResourceRequest::doUpdatePlatformRequest): If loading a file URL, tell CFNetwork
the storage device at the time of the start of the load so we can trigger a failure if this
changes during the load operation.

  • platform/posix/FileSystemPOSIX.cpp:

(WebCore::getFileDeviceId): Added.

  • platform/win/FileSystemWin.cpp:

(WebCore::getFileDeviceId): Added.

Tools:

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: Add new files.
  • TestWebKitAPI/Tests/mac/CrossPartitionFileSchemeAccess.html: Added.
  • TestWebKitAPI/Tests/mac/CrossPartitionFileSchemeAccess.mm: Added.
4:15 PM Changeset in webkit [210530] by fpizlo@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

Unreviewed, fix cloop.

  • dfg/DFGPlanInlines.h:
4:11 PM Changeset in webkit [210529] by bshafiei@apple.com
  • 3 edits in branches/safari-603-branch/Source/JavaScriptCore

Merge r210458. rdar://problem/29911919

3:58 PM Changeset in webkit [210528] by bshafiei@apple.com
  • 3 edits in tags/Safari-603.1.19.1/Source/JavaScriptCore

Merge r210458. rdar://problem/29911919

3:24 PM Changeset in webkit [210527] by bshafiei@apple.com
  • 5 edits in tags/Safari-603.1.19.1/Source

Versioning.

3:22 PM Changeset in webkit [210526] by bshafiei@apple.com
  • 1 copy in tags/Safari-603.1.19.1

New tag.

3:17 PM Changeset in webkit [210525] by enrica@apple.com
  • 2 edits in trunk/Source/WebKit2

Selection animation flashing on editable content when zooming.
https://bugs.webkit.org/show_bug.cgi?id=166863
rdar://problem/29931470

Reviewed by Tim Horton.

Implementing _allowAnimatedUpdateSelectionRectView and returning NO,
prevents the selection animation in UIKit.

  • UIProcess/ios/WKContentViewInteraction.mm:

(-[WKContentView _allowAnimatedUpdateSelectionRectViews]):

2:35 PM Changeset in webkit [210524] by timothy_horton@apple.com
  • 3 edits
    2 adds in trunk

Unindenting text inside a blockquote can result in the text being reordered
https://bugs.webkit.org/show_bug.cgi?id=166813

Reviewed by Darin Adler and Ryosuke Niwa.

Test: editing/execCommand/unindent-nested-blockquote-with-inner-div.html

  • editing/IndentOutdentCommand.cpp:

(WebCore::IndentOutdentCommand::outdentParagraph):
Start splitting the tree at the beginning of the content being unindented,
not at the containing block flow element, which could e.g. contain other
elements (or even other blockquotes).

  • editing/execCommand/unindent-nested-blockquote-with-inner-div-expected.txt: Added.
  • editing/execCommand/unindent-nested-blockquote-with-inner-div.html: Added.

Old test output:
second<br><blockquote><div><blockquote>first</blockquote><br></div></blockquote>
New test output:
<blockquote><div><blockquote>first</blockquote><br></div></blockquote>second

2:28 PM Changeset in webkit [210523] by clopez@igalia.com
  • 5 edits
    1 add in trunk/Tools

[GTK][Wayland] Allow running the layout tests under a native Wayland environment.
https://bugs.webkit.org/show_bug.cgi?id=165232

Reviewed by Michael Catanzaro.

Add a new WaylandDriver to run the tests in the user current wayland session.

Also merge all the configuration options for selecting the display server inside one
switch --display-server=xvfb/xorg/wayland/weston (defaulting to xvfb).

This switch is supported on the scripts: run-gtk-tests, run-perf-tests and run-webkit-tests.

  • Scripts/run-gtk-tests: Add missing logging.basicConfig() initialization for the error logger.

(TestRunner._create_driver):

  • Scripts/webkitpy/layout_tests/run_webkit_tests.py:

(parse_args):

  • Scripts/webkitpy/performance_tests/perftestsrunner.py:

(PerfTestsRunner._parse_args):

  • Scripts/webkitpy/port/gtk.py:

(GtkPort.init):
(GtkPort._driver_class):
(GtkPort._search_paths):

  • Scripts/webkitpy/port/waylanddriver.py: Added.

(WaylandDriver):
(WaylandDriver.check_driver):
(WaylandDriver._setup_environ_for_test):
(WaylandDriver._start):

2:02 PM Changeset in webkit [210522] by Yusuke Suzuki
  • 25 edits
    8 adds in trunk

[JSC] Prototype dynamic-import
https://bugs.webkit.org/show_bug.cgi?id=165724

Reviewed by Saam Barati.

JSTests:

  • stress/import-basic.js: Added.

(async.async.load):
(async):
(catch):

  • stress/import-from-eval.js: Added.

(async):
(catch):

  • stress/import-syntax.js: Added.

(testSyntaxError):

  • stress/import-tests/cocoa.js: Added.

(export.Cocoa):
(export.hello):

  • stress/import-tests/multiple.js: Added.

(export.result):

  • stress/import-tests/multiple2.js: Added.

(export.ok):

  • stress/import-tests/should.js: Added.

(export.shouldBe):
(export.shouldThrow):

  • stress/modules-syntax-error.js:

Source/JavaScriptCore:

In this patch, we implement stage3 dynamic-import proposal[1].
This patch adds a new special operator import. And by using it, we can import
the module dynamically from modules and scripts. Before this feature, the module
is always imported statically and before executing the modules, importing the modules
needs to be done. And especially, the module can only be imported from the module.
So the classic script cannot import and use the modules. This dynamic-import relaxes
the above restrictions.

The typical dynamic-import form is the following.

import("...").then(function (namespace) { ... });

You can pass any AssignmentExpression for the import operator. So you can determine
the importing modules dynamically.

import(value).then(function (namespace) { ... });

And previously the module import declaration is only allowed in the top level statements.
But this import operator is just an expression. So you can use it in the function.
And you can use it conditionally.

async function go(cond)
{

if (cond)

return import("...");

return undefined;

}
await go(true);

Currently, this patch just implements this feature only for the JSC shell.
JSC module loader requires a new hook, importModule. And the JSC shell implements
this hook. So, for now, this dynamic-import is not available in the browser side.
If you write this import call, it always returns the rejected promise.

import is implemented like a special operator similar to super.
This is because import is context-sensitive. If you call the import, the module
key resolution is done based on the caller's running context.

For example, if you are running the script which filename is "./ok/hello.js", the module
key for the callimport("./resource/syntax.js") becomes "./ok/resource/syntax.js".
But if you write the completely same import form in the script "./error/hello.js", the
key becomes "./error/resource/syntax.js". So exposing this feature as the import
function is misleading: this function becomes caller's context-sensitive. That's why
dynamic-import is specified as a special operator.

To resolve the module key, we need the caller's context information like the filename of
the caller. This is provided by the SourceOrigin implemented in r210149.
In the JSC shell implementation, this SourceOrigin holds the filename of the caller. So
based on this implementation, the module loader resolve the module key.
In the near future, we will extend this SourceOrigin to hold more information needed for
the browser-side import implementation.

[1]: https://tc39.github.io/proposal-dynamic-import/

  • builtins/ModuleLoaderPrototype.js:

(importModule):

  • bytecompiler/BytecodeGenerator.cpp:

(JSC::BytecodeGenerator::emitGetTemplateObject):
(JSC::BytecodeGenerator::emitGetGlobalPrivate):

  • bytecompiler/BytecodeGenerator.h:
  • bytecompiler/NodesCodegen.cpp:

(JSC::ImportNode::emitBytecode):

  • jsc.cpp:

(absolutePath):
(GlobalObject::moduleLoaderImportModule):
(functionRun):
(functionLoad):
(functionCheckSyntax):
(runWithScripts):

  • parser/ASTBuilder.h:

(JSC::ASTBuilder::createImportExpr):

  • parser/NodeConstructors.h:

(JSC::ImportNode::ImportNode):

  • parser/Nodes.h:

(JSC::ExpressionNode::isImportNode):

  • parser/Parser.cpp:

(JSC::Parser<LexerType>::parseMemberExpression):

  • parser/SyntaxChecker.h:

(JSC::SyntaxChecker::createImportExpr):

  • runtime/JSGlobalObject.cpp:

(JSC::JSGlobalObject::init):

  • runtime/JSGlobalObject.h:
  • runtime/JSGlobalObjectFunctions.cpp:

(JSC::globalFuncImportModule):

  • runtime/JSGlobalObjectFunctions.h:
  • runtime/JSModuleLoader.cpp:

(JSC::JSModuleLoader::importModule):
(JSC::JSModuleLoader::getModuleNamespaceObject):

  • runtime/JSModuleLoader.h:
  • runtime/ModuleLoaderPrototype.cpp:

(JSC::moduleLoaderPrototypeGetModuleNamespaceObject):

Source/WebCore:

We do not set a handler for import for now.
So dynamic import feature is only enabled in the JSC shell right now.

  • bindings/js/JSDOMWindowBase.cpp:
  • bindings/js/JSWorkerGlobalScopeBase.cpp:

LayoutTests:

  • sputnik/Conformance/07_Lexical_Conventions/7.5_Tokens/7.5.3_Future_Reserved_Words/S7.5.3_A1.16-expected.txt:
1:45 PM Changeset in webkit [210521] by fpizlo@apple.com
  • 16 edits
    2 moves
    11 adds in trunk/Source/JavaScriptCore

Make the collector's fixpoint smart about scheduling work
https://bugs.webkit.org/show_bug.cgi?id=165910

Reviewed by Keith Miller.

Prior to this change, every time the GC would run any constraints in markToFixpoint, it
would run all of the constraints. It would always run them in the same order. That means
that so long as any one constraint was generating new work, we'd pay the price of all
constraints. This is usually OK because most constraints are cheap but it artificially
inflates the cost of slow constraints - especially ones that are expensive but usually
generate no new work.

This patch redoes how the GC runs constraints by applying ideas from data flow analysis.
The GC now builds a MarkingConstraintSet when it boots up, and this contains all of the
constraints as well as some meta-data about them. Now, markToFixpoint just calls into
MarkingConstraintSet to execute constraints. Because constraint execution and scheduling
need to be aware of each other, I rewrote markToFixpoint in such a way that it's more
obvious how the GC goes between constraint solving, marking with stopped mutator, and
marking with resumed mutator. This also changes the scheduler API in such a way that a
synchronous stop-the-world collection no longer needs to do fake stop/resume - instead we
just swap the space-time scheduler for the stop-the-world scheduler.

This is a big streamlining of the GC. This is a speed-up in GC-heavy tests because we
now execute most constraints exactly twice regardless of how many total fixpoint
iterations we do. Now, when we run out of marking work, the constraint solver will just
run the constraint that is most likely to generate new visiting work, and if it does
generate work, then the GC now goes back to marking. Before, it would run *all*
constraints and then go back to marking. The constraint solver is armed with three
information signals that it uses to sort the constraints in order of descending likelihood
to generate new marking work. Then it runs them in that order until it there is new
marking work. The signals are:

1) Whether the constraint is greyed by marking or execution. We call this the volatility

of the constraint. For example, weak reference constraints have GreyedByMarking as
their volatility because they are most likely to have something to say after we've done
some marking. On the other hand, conservative roots have GreyedByExecution as their
volatility because they will give new information anytime we let the mutator run. The
constraint solver will only run GreyedByExecution constraints as roots and after the
GreyedByMarking constraints go silent. This ensures that we don't try to scan
conservative roots every time we need to re-run weak references and vice-versa.


Another way to look at it is that the constraint solver tries to predict if the
wavefront is advancing or retreating. The wavefront is almost certainly advancing so
long as the mark stacks are non-empty or so long as at least one of the GreyedByMarking
constraints is still producing work. Otherwise the wavefront is almost certainly
retreating. It's most profitable to run GreyedByMarking constraints when the wavefront
is advancing, and most profitable to run GreyedByExecution constraints when the
wavefront is retreating.


We use the predicted wavefront direction and the volatility of constraints as a
first-order signal of constraint profitability.


2) How much visiting work was created the last time the constraint ran. The solver

remembers the lastVisitCount, and uses it to predict how much work the constraint will
generate next time. In practice this means we will keep re-running the one interesting
constraint until it shuts up.


3) Optional work predictors for some constraints. The constraint that shuffles the mutator

mark stack into the main SlotVisitor's mutator mark stack always knows exactly how much
work it will create.


The sum of (2) and (3) are used as a second-order signal of constraint profitability.


The constraint solver will always run all of the GreyedByExecution constraints at GC
start, since these double as the GC's roots. The constraint solver will always run all of
the GreyedByMarking constraints the first time that marking stalls. Other than that, the
solver will keep running constraints, sorted according to their likelihood to create work,
until either work is created or we run out of constraints to run. GC termination happens
when we run out of constraints to run.

This new infrastructure means that we have a much better chance of dealing with worst-case
DOM pathologies. If we can intelligently factor different evil DOM things into different
constraints with the right work predictions then this could reduce the cost of those DOM
things by a factor of N where N is the number of fixpoint iterations the GC typically
does. N is usually around 5-6 even for simple heaps.

My perf measurements say:

PLT3: 0.02% faster with 5.3% confidence.
JetStream: 0.15% faster with 17% confidence.
Speedometer: 0.58% faster with 82% confidence.

Here are the details from JetStream:

splay: 1.02173x faster with 0.996841 confidence
splay-latency: 1.0617x faster with 0.987462 confidence
towers.c: 1.01852x faster with 0.92128 confidence
crypto-md5: 1.06058x faster with 0.482363 confidence
score: 1.00152x faster with 0.16892 confidence

I think that Speedometer is legitimately benefiting from this change based on looking at
--logGC=true output. We are now spending less time reexecuting expensive constraints. I
think that JetStream/splay is also benefiting, because although the constraints it sees
are cheap, it spends 30% of its time in GC so even small improvements matter.

  • CMakeLists.txt:
  • JavaScriptCore.xcodeproj/project.pbxproj:
  • dfg/DFGPlan.cpp:

(JSC::DFG::Plan::markCodeBlocks): Deleted.
(JSC::DFG::Plan::rememberCodeBlocks): Deleted.

  • dfg/DFGPlan.h:
  • dfg/DFGPlanInlines.h: Added.

(JSC::DFG::Plan::iterateCodeBlocksForGC):

  • dfg/DFGWorklist.cpp:

(JSC::DFG::Worklist::markCodeBlocks): Deleted.
(JSC::DFG::Worklist::rememberCodeBlocks): Deleted.
(JSC::DFG::rememberCodeBlocks): Deleted.

  • dfg/DFGWorklist.h:
  • dfg/DFGWorklistInlines.h: Added.

(JSC::DFG::iterateCodeBlocksForGC):
(JSC::DFG::Worklist::iterateCodeBlocksForGC):

  • heap/CodeBlockSet.cpp:

(JSC::CodeBlockSet::writeBarrierCurrentlyExecuting): Deleted.

  • heap/CodeBlockSet.h:

(JSC::CodeBlockSet::iterate): Deleted.

  • heap/CodeBlockSetInlines.h:

(JSC::CodeBlockSet::iterate):
(JSC::CodeBlockSet::iterateCurrentlyExecuting):

  • heap/Heap.cpp:

(JSC::Heap::Heap):
(JSC::Heap::iterateExecutingAndCompilingCodeBlocks):
(JSC::Heap::iterateExecutingAndCompilingCodeBlocksWithoutHoldingLocks):
(JSC::Heap::assertSharedMarkStacksEmpty):
(JSC::Heap::markToFixpoint):
(JSC::Heap::endMarking):
(JSC::Heap::collectInThread):
(JSC::Heap::stopIfNecessarySlow):
(JSC::Heap::acquireAccessSlow):
(JSC::Heap::collectIfNecessaryOrDefer):
(JSC::Heap::buildConstraintSet):
(JSC::Heap::notifyIsSafeToCollect):
(JSC::Heap::ResumeTheWorldScope::ResumeTheWorldScope): Deleted.
(JSC::Heap::ResumeTheWorldScope::~ResumeTheWorldScope): Deleted.
(JSC::Heap::harvestWeakReferences): Deleted.
(JSC::Heap::visitConservativeRoots): Deleted.
(JSC::Heap::visitCompilerWorklistWeakReferences): Deleted.

  • heap/Heap.h:
  • heap/MarkingConstraint.cpp: Added.

(JSC::MarkingConstraint::MarkingConstraint):
(JSC::MarkingConstraint::~MarkingConstraint):
(JSC::MarkingConstraint::resetStats):
(JSC::MarkingConstraint::execute):

  • heap/MarkingConstraint.h: Added.

(JSC::MarkingConstraint::index):
(JSC::MarkingConstraint::abbreviatedName):
(JSC::MarkingConstraint::name):
(JSC::MarkingConstraint::lastVisitCount):
(JSC::MarkingConstraint::quickWorkEstimate):
(JSC::MarkingConstraint::workEstimate):
(JSC::MarkingConstraint::volatility):

  • heap/MarkingConstraintSet.cpp: Added.

(JSC::MarkingConstraintSet::ExecutionContext::ExecutionContext):
(JSC::MarkingConstraintSet::ExecutionContext::didVisitSomething):
(JSC::MarkingConstraintSet::ExecutionContext::shouldTimeOut):
(JSC::MarkingConstraintSet::ExecutionContext::drain):
(JSC::MarkingConstraintSet::ExecutionContext::didExecute):
(JSC::MarkingConstraintSet::ExecutionContext::execute):
(JSC::MarkingConstraintSet::MarkingConstraintSet):
(JSC::MarkingConstraintSet::~MarkingConstraintSet):
(JSC::MarkingConstraintSet::resetStats):
(JSC::MarkingConstraintSet::add):
(JSC::MarkingConstraintSet::executeBootstrap):
(JSC::MarkingConstraintSet::executeConvergence):
(JSC::MarkingConstraintSet::isWavefrontAdvancing):
(JSC::MarkingConstraintSet::executeConvergenceImpl):
(JSC::MarkingConstraintSet::executeAll):

  • heap/MarkingConstraintSet.h: Added.

(JSC::MarkingConstraintSet::isWavefrontRetreating):

  • heap/MutatorScheduler.cpp: Added.

(JSC::MutatorScheduler::MutatorScheduler):
(JSC::MutatorScheduler::~MutatorScheduler):
(JSC::MutatorScheduler::didStop):
(JSC::MutatorScheduler::willResume):
(JSC::MutatorScheduler::didExecuteConstraints):
(JSC::MutatorScheduler::log):
(JSC::MutatorScheduler::shouldStop):
(JSC::MutatorScheduler::shouldResume):

  • heap/MutatorScheduler.h: Added.
  • heap/OpaqueRootSet.h:

(JSC::OpaqueRootSet::add):

  • heap/SlotVisitor.cpp:

(JSC::SlotVisitor::visitAsConstraint):
(JSC::SlotVisitor::drain):
(JSC::SlotVisitor::didReachTermination):
(JSC::SlotVisitor::hasWork):
(JSC::SlotVisitor::drainFromShared):
(JSC::SlotVisitor::drainInParallelPassively):
(JSC::SlotVisitor::addOpaqueRoot):

  • heap/SlotVisitor.h:

(JSC::SlotVisitor::addToVisitCount):

  • heap/SpaceTimeMutatorScheduler.cpp: Copied from Source/JavaScriptCore/heap/SpaceTimeScheduler.cpp.

(JSC::SpaceTimeMutatorScheduler::Snapshot::Snapshot):
(JSC::SpaceTimeMutatorScheduler::Snapshot::now):
(JSC::SpaceTimeMutatorScheduler::Snapshot::bytesAllocatedThisCycle):
(JSC::SpaceTimeMutatorScheduler::SpaceTimeMutatorScheduler):
(JSC::SpaceTimeMutatorScheduler::~SpaceTimeMutatorScheduler):
(JSC::SpaceTimeMutatorScheduler::state):
(JSC::SpaceTimeMutatorScheduler::beginCollection):
(JSC::SpaceTimeMutatorScheduler::didStop):
(JSC::SpaceTimeMutatorScheduler::willResume):
(JSC::SpaceTimeMutatorScheduler::didExecuteConstraints):
(JSC::SpaceTimeMutatorScheduler::timeToStop):
(JSC::SpaceTimeMutatorScheduler::timeToResume):
(JSC::SpaceTimeMutatorScheduler::log):
(JSC::SpaceTimeMutatorScheduler::endCollection):
(JSC::SpaceTimeMutatorScheduler::bytesAllocatedThisCycleImpl):
(JSC::SpaceTimeMutatorScheduler::bytesSinceBeginningOfCycle):
(JSC::SpaceTimeMutatorScheduler::maxHeadroom):
(JSC::SpaceTimeMutatorScheduler::headroomFullness):
(JSC::SpaceTimeMutatorScheduler::mutatorUtilization):
(JSC::SpaceTimeMutatorScheduler::collectorUtilization):
(JSC::SpaceTimeMutatorScheduler::elapsedInPeriod):
(JSC::SpaceTimeMutatorScheduler::phase):
(JSC::SpaceTimeMutatorScheduler::shouldBeResumed):
(JSC::SpaceTimeScheduler::Decision::targetMutatorUtilization): Deleted.
(JSC::SpaceTimeScheduler::Decision::targetCollectorUtilization): Deleted.
(JSC::SpaceTimeScheduler::Decision::elapsedInPeriod): Deleted.
(JSC::SpaceTimeScheduler::Decision::phase): Deleted.
(JSC::SpaceTimeScheduler::Decision::shouldBeResumed): Deleted.
(JSC::SpaceTimeScheduler::Decision::timeToResume): Deleted.
(JSC::SpaceTimeScheduler::Decision::timeToStop): Deleted.
(JSC::SpaceTimeScheduler::SpaceTimeScheduler): Deleted.
(JSC::SpaceTimeScheduler::snapPhase): Deleted.
(JSC::SpaceTimeScheduler::currentDecision): Deleted.

  • heap/SpaceTimeMutatorScheduler.h: Copied from Source/JavaScriptCore/heap/SpaceTimeScheduler.h.

(JSC::SpaceTimeScheduler::Decision::operator bool): Deleted.

  • heap/SpaceTimeScheduler.cpp: Removed.
  • heap/SpaceTimeScheduler.h: Removed.
  • heap/SynchronousStopTheWorldMutatorScheduler.cpp: Added.

(JSC::SynchronousStopTheWorldMutatorScheduler::SynchronousStopTheWorldMutatorScheduler):
(JSC::SynchronousStopTheWorldMutatorScheduler::~SynchronousStopTheWorldMutatorScheduler):
(JSC::SynchronousStopTheWorldMutatorScheduler::state):
(JSC::SynchronousStopTheWorldMutatorScheduler::beginCollection):
(JSC::SynchronousStopTheWorldMutatorScheduler::timeToStop):
(JSC::SynchronousStopTheWorldMutatorScheduler::timeToResume):
(JSC::SynchronousStopTheWorldMutatorScheduler::endCollection):

  • heap/SynchronousStopTheWorldMutatorScheduler.h: Added.
  • heap/VisitingTimeout.h: Added.

(JSC::VisitingTimeout::VisitingTimeout):
(JSC::VisitingTimeout::visitCount):
(JSC::VisitingTimeout::didVisitSomething):
(JSC::VisitingTimeout::shouldTimeOut):

  • runtime/Options.h:
1:31 PM Changeset in webkit [210520] by commit-queue@webkit.org
  • 3 edits in trunk/Source/WebInspectorUI

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

new colorpicker UI doesn't seem to work in trunk,
investigating offline (Requested by brrian on #webkit).

Reverted changeset:

"Web Inspector: color picker should feature an editable CSS
value"
https://bugs.webkit.org/show_bug.cgi?id=124356
http://trac.webkit.org/changeset/210260

1:31 PM Changeset in webkit [210519] by aestes@apple.com
  • 4 edits
    3 adds in trunk

[QuickLook] Add a layout test for webkit.org/b/135651
https://bugs.webkit.org/show_bug.cgi?id=166855

Reviewed by Andreas Kling.

Tools:

  • DumpRenderTree/mac/FrameLoadDelegate.mm:

(-[FrameLoadDelegate webView:didFailProvisionalLoadWithError:forFrame:]): Added output for
errors with code WebKitErrorCannotShowURL.

  • WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:

(WTR::InjectedBundlePage::didFailProvisionalLoadWithErrorForFrame): Made the error output
not specific to WebKit2 error codes.

LayoutTests:

  • quicklook/nil-response-mime-type-expected.txt: Added.
  • quicklook/nil-response-mime-type.html: Added.
  • quicklook/resources/nil-response-mime-type.xls: Added.
1:09 PM Changeset in webkit [210518] by commit-queue@webkit.org
  • 23 edits
    4 deletes in trunk

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

"4% JSBench regression" (Requested by keith_mi_ on #webkit).

Reverted changeset:

"Add a slice intrinsic to the DFG/FTL"
https://bugs.webkit.org/show_bug.cgi?id=166707
http://trac.webkit.org/changeset/210476

11:34 AM Changeset in webkit [210517] by commit-queue@webkit.org
  • 6 edits in trunk/Tools

Support webkit-test-runner key-value pairs in http tests in DumpRenderTree
https://bugs.webkit.org/show_bug.cgi?id=166837

Patch by Antoine Quint <Antoine Quint> on 2017-01-09
Reviewed by Alex Christensen.

We now correctly handle the --absolutePath argument in DumpRenderTree and use
the provided value when trying to determine the path to the test file. Failing
that, we use the computed URL or the raw path provided to cover all cases.

This was tested in the context of https://bugs.webkit.org/show_bug.cgi?id=165668
by applying this patch and seeing the number test failures dramatically reduced
with WK1 due to the option to turn modern media controls off for older media controls
tests.

  • DumpRenderTree/DumpRenderTree.h:
  • DumpRenderTree/DumpRenderTreeCommon.cpp:

(parseInputLine):

  • DumpRenderTree/TestOptions.h:
  • DumpRenderTree/TestOptions.mm:

(TestOptions::TestOptions):

  • DumpRenderTree/mac/DumpRenderTree.mm:

(runTest):

11:09 AM Changeset in webkit [210516] by Beth Dakin
  • 1 edit
    2 adds in trunk/LayoutTests

Add a test to ensure that preventDefault on touchmove prevents scrolling
https://bugs.webkit.org/show_bug.cgi?id=166790

Reviewed by Simon Fraser.

  • fast/events/touch/ios/iphone7/prevent-default-touchmove-prevents-scrolling-expected.txt: Added.
  • fast/events/touch/ios/iphone7/prevent-default-touchmove-prevents-scrolling.html: Added.
10:55 AM Changeset in webkit [210515] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Rebaseline W3C test for ios-simulator after r210468.
https://bugs.webkit.org/show_bug.cgi?id=166850

Unreviewed test gardening.

  • platform/ios-simulator/imported/w3c/web-platform-tests/html/browsers/browsing-the-web/history-traversal/persisted-user-state-restoration/scroll-restoration-fragment-scrolling-cross-origin-expected.txt:
10:26 AM Changeset in webkit [210514] by commit-queue@webkit.org
  • 8 edits in trunk/Source/WebCore

Merging ThreadableLoader redundant options on filtering responses

Merge OpaqueResponseBodyPolicy and ResponseFilteringPolicy ThreadableLoader options
https://bugs.webkit.org/show_bug.cgi?id=166843

Patch by Youenn Fablet <youennf@gmail.com> on 2017-01-09
Reviewed by Darin Adler.

Covered by existing tests.

Removing OpaqueResponseBodyPolicy option.
When ResponseFilteringPolicy is set to Enable, the body is filtered out in DocumentThreadableLoader.

  • Modules/fetch/FetchLoader.cpp:

(WebCore::FetchLoader::start):

  • loader/DocumentThreadableLoader.cpp:

(WebCore::DocumentThreadableLoader::didReceiveResponse): Implementing body filtering based on ResponseFilteringPolicy option.

  • loader/ThreadableLoader.cpp:

(WebCore::ThreadableLoaderOptions::ThreadableLoaderOptions):

  • loader/ThreadableLoader.h:
  • loader/WorkerThreadableLoader.cpp:

(WebCore::LoaderTaskOptions::LoaderTaskOptions):

  • workers/WorkerScriptLoader.cpp:

(WebCore::WorkerScriptLoader::loadSynchronously):
(WebCore::WorkerScriptLoader::loadAsynchronously):

  • xml/XMLHttpRequest.cpp:

(WebCore::XMLHttpRequest::createRequest):

10:14 AM Changeset in webkit [210513] by bshafiei@apple.com
  • 5 edits in branches/safari-603-branch/Source

Versioning.

9:41 AM Changeset in webkit [210512] by commit-queue@webkit.org
  • 2 edits in trunk/Tools

prepare-ChangeLog: Correct help string for --style option
https://bugs.webkit.org/show_bug.cgi?id=166725

Patch by Milan Crha <mcrha@redhat.com> on 2017-01-09
Reviewed by Alexey Proskuryakov.

  • Scripts/prepare-ChangeLog:

(main):

9:39 AM Changeset in webkit [210511] by Ryan Haddad
  • 2 edits in branches/safari-602-branch/LayoutTests

Rebaseline fast/canvas/webgl/context-creation-attributes.html.

Unreviewed test gardening.

  • fast/canvas/webgl/context-creation-attributes-expected.txt:
9:39 AM Changeset in webkit [210510] by Lucas Forschler
  • 4 edits in trunk

https://bugs.webkit.org/show_bug.cgi?id=166839
Add php7 support for macOS.
Tools:

Mirror the debian logic to look for a php7 module on disk, and return the appropriate apache config file.

Reviewed by Alexey Proskuryakov.

  • Scripts/webkitpy/port/base.py:

(Port._is_darwin_php_version_7):
(Port._debian_php_version):
(Port):
(Port._darwin_php_version):
(Port._apache_config_file_name_for_platform):

LayoutTests:

This patch mirrors the solution that debian uses, by adding a php7 specific apache conf file.

Reviewed by Alexey Proskuryakov.

  • http/conf/apache2.4-php7-httpd.conf: Added.
9:33 AM Changeset in webkit [210509] by Lucas Forschler
  • 1 copy in trunk/LayoutTests/http/conf/apache2.4-php7-httpd.conf

Create new php7 config, preserving history via svn cp

9:19 AM Changeset in webkit [210508] by dbates@webkit.org
  • 2 edits in trunk/Source/WebCore

Evaluating window named element may return wrong result
https://bugs.webkit.org/show_bug.cgi?id=166792
<rdar://problem/29801059>

Reviewed by Chris Dumez.

  • bindings/js/JSDOMWindowProperties.cpp:

(WebCore::jsDOMWindowPropertiesGetOwnPropertySlotNamedItemGetter):

8:54 AM Changeset in webkit [210507] by Chris Dumez
  • 2 edits in trunk/Source/WebCore

REGRESSION(r178955): Touching Settings.in doesn't cause JSInternalSettingsGenerated.cpp to be updated on first build
https://bugs.webkit.org/show_bug.cgi?id=166814

Reviewed by Darin Adler.

Stop using .INTERMEDIATE in DerivedSources.make was it seems to break dependency
chains for some reason. We started using .INTERMEDIATE for scripts that generate
several targets when run a single time. It avoided running the script several
times (once per target) unnecessarily, and fixed issues with parallel builds.

To address the same issue without using .INTERMEDIATE, we now use pattern rules
(i.e. rules that have '%'). As per the documentation [1]:
"Pattern rules may have more than one target. Unlike normal rules, this does not

act as many different rules with the same prerequisites and recipe. If a pattern
rule has multiple targets, make knows that the rule’s recipe is responsible for
making all of the targets. The recipe is executed only once to make all the
targets".

We are therefore solving the same problem as with .INTERMEDIATE. However, I have
confirmed that using pattern rules does not break dependency chains. For example,
modifying Settings.in re-generates both InternalSettingsGenerated.idl *and*
JSInternalSettingsGenerated.cpp.

[1] https://www.gnu.org/software/make/manual/html_node/Pattern-Intro.html#Pattern-Intro

  • DerivedSources.make:
8:31 AM Changeset in webkit [210506] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore

Unreviewed, rolling out r210493 and r210495.
https://bugs.webkit.org/show_bug.cgi?id=166842

Causes makeprops.pl to run on every build (Requested by smfr
on #webkit).

Reverted changesets:

"Avoid triggering rebuilds for minor changes of
CSSProperties.json"
https://bugs.webkit.org/show_bug.cgi?id=166810
http://trac.webkit.org/changeset/210493

"Avoid triggering rebuilds for minor changes of
CSSProperties.json"
https://bugs.webkit.org/show_bug.cgi?id=166810
http://trac.webkit.org/changeset/210495

8:02 AM Changeset in webkit [210505] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Marking inspector/debugger/breakpoint-action-log.html as flaky on macOS.
https://bugs.webkit.org/show_bug.cgi?id=165772

Unreviewed test gardening.

  • platform/mac/TestExpectations:
6:14 AM Changeset in webkit [210504] by Gustavo Noronha Silva
  • 12 edits
    1 add in trunk

[GTK] Should support key and code properties on keyboard events
https://bugs.webkit.org/show_bug.cgi?id=166759

Reviewed by Carlos Garcia Campos.

Source/WebCore:

This change fixes a bunch of tests which are currently failing, such as:

  • fast/events/arrow-keys-on-body.html
  • fast/events/constructors/keyboard-event-constructor.html
  • fast/events/key-events-in-input-button.html
  • fast/events/key-events-in-input-text.html
  • fast/events/keyboardevent-code.html
  • fast/events/keyboardevent-key.html
  • platform/PlatformKeyboardEvent.h:
  • platform/gtk/PlatformKeyboardEventGtk.cpp:

(WebCore::PlatformKeyboardEvent::keyValueForGdkKeyCode): match web key value
to GDK key symbol.
(WebCore::PlatformKeyboardEvent::keyCodeForHardwareKeyCode): match web key code
to hardware code as reported by GDK.
(WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent): add web key value and
code to the keyboard event upon creation.

Source/WebKit2:

  • Shared/WebEvent.h:
  • Shared/WebKeyboardEvent.cpp:

(WebKit::WebKeyboardEvent::WebKeyboardEvent): accept web key value and code on construction.

  • Shared/gtk/WebEventFactory.cpp:

(WebKit::WebEventFactory::createWebKeyboardEvent): pass web key value and code on construction.

Source/WTF:

  • wtf/FeatureDefines.h: enable key and code properties support for GTK.

Tools:

  • WebKitTestRunner/gtk/EventSenderProxyGtk.cpp:

(WTR::getGDKKeySymForKeyRef): add missing modifier keys which were being reported as 'l' and 'r' only
on tests.

LayoutTests:

  • platform/gtk/fast/events/keyboardevent-code-expected.txt: Added. Hardware

codes are different for Mac and Linux for a couple of keys, so we need
platform-specific results.

4:46 AM Changeset in webkit [210503] by pvollan@apple.com
  • 13 edits in trunk/Tools

[Win] Some tests are flaky because certain DLLs are writing to stdout.
https://bugs.webkit.org/show_bug.cgi?id=166760

Reviewed by Darin Adler.

Some tests are flaky because certain DLLs are writing to stdout, giving incorrect test results.
We can work around that by duplicating and redirecting stdout.

  • DumpRenderTree/PixelDumpSupport.cpp:

(dumpWebViewAsPixelsAndCompareWithExpected):
(printPNG):

  • DumpRenderTree/win/AccessibilityControllerWin.cpp:

(logEventProc):

  • DumpRenderTree/win/DRTDesktopNotificationPresenter.cpp:

(DRTDesktopNotificationPresenter::showDesktopNotification):
(DRTDesktopNotificationPresenter::cancelDesktopNotification):
(DRTDesktopNotificationPresenter::requestNotificationPermission):

  • DumpRenderTree/win/DumpRenderTree.cpp:

(dumpFrameScrollPosition):
(dumpHistoryItem):
(dumpBackForwardList):
(dump):
(runTest):
(main):

  • DumpRenderTree/win/DumpRenderTreeWin.h:
  • DumpRenderTree/win/EditingDelegate.cpp:

(EditingDelegate::shouldBeginEditingInDOMRange):
(EditingDelegate::shouldEndEditingInDOMRange):
(EditingDelegate::shouldInsertNode):
(EditingDelegate::shouldInsertText):
(EditingDelegate::shouldDeleteDOMRange):
(EditingDelegate::shouldChangeSelectedDOMRange):
(EditingDelegate::shouldApplyStyle):
(EditingDelegate::shouldChangeTypingStyle):
(EditingDelegate::doPlatformCommand):
(EditingDelegate::webViewDidBeginEditing):
(EditingDelegate::webViewDidChange):
(EditingDelegate::webViewDidEndEditing):
(EditingDelegate::webViewDidChangeTypingStyle):
(EditingDelegate::webViewDidChangeSelection):

  • DumpRenderTree/win/FrameLoadDelegate.cpp:

(FrameLoadDelegate::didStartProvisionalLoadForFrame):
(FrameLoadDelegate::didReceiveServerRedirectForProvisionalLoadForFrame):
(FrameLoadDelegate::didChangeLocationWithinPageForFrame):
(FrameLoadDelegate::didFailProvisionalLoadWithError):
(FrameLoadDelegate::didCommitLoadForFrame):
(FrameLoadDelegate::didReceiveTitle):
(FrameLoadDelegate::didFinishLoadForFrame):
(FrameLoadDelegate::didFailLoadWithError):
(FrameLoadDelegate::willPerformClientRedirectToURL):
(FrameLoadDelegate::didCancelClientRedirectForFrame):
(FrameLoadDelegate::windowScriptObjectAvailable):
(FrameLoadDelegate::didFinishDocumentLoadForFrame):
(FrameLoadDelegate::didHandleOnloadEventsForFrame):
(FrameLoadDelegate::didDisplayInsecureContent):
(FrameLoadDelegate::didRunInsecureContent):
(FrameLoadDelegate::webViewProgressFinishedNotification):

  • DumpRenderTree/win/HistoryDelegate.cpp:

(HistoryDelegate::didNavigateWithNavigationData):
(HistoryDelegate::didPerformClientRedirectFromURL):
(HistoryDelegate::didPerformServerRedirectFromURL):
(HistoryDelegate::updateHistoryTitle):
(HistoryDelegate::populateVisitedLinksForWebView):

  • DumpRenderTree/win/PolicyDelegate.cpp:

(PolicyDelegate::decidePolicyForNavigationAction):
(PolicyDelegate::unableToImplementPolicyWithError):

  • DumpRenderTree/win/ResourceLoadDelegate.cpp:

(ResourceLoadDelegate::willSendRequest):
(ResourceLoadDelegate::didReceiveAuthenticationChallenge):
(ResourceLoadDelegate::didReceiveResponse):
(ResourceLoadDelegate::didFinishLoadingFromDataSource):
(ResourceLoadDelegate::didFailLoadingWithError):

  • DumpRenderTree/win/TestRunnerWin.cpp:

(TestRunner::addDisallowedURL):
(TestRunner::originsWithApplicationCache):
(TestRunner::setStorageDatabaseIdleInterval):
(TestRunner::closeIdleLocalStorageDatabases):
(TestRunner::copyDecodedHostName):
(TestRunner::copyEncodedHostName):
(TestRunner::numberOfPendingGeolocationPermissionRequests):
(TestRunner::isGeolocationProviderActive):
(TestRunner::pathToLocalResource):
(TestRunner::setMockDeviceOrientation):
(TestRunner::setMockGeolocationPosition):
(TestRunner::setMockGeolocationPositionUnavailableError):
(TestRunner::setSpatialNavigationEnabled):
(TestRunner::setAutomaticLinkDetectionEnabled):
(TestRunner::isCommandEnabled):
(TestRunner::authenticateSession):
(TestRunner::addChromeInputField):
(TestRunner::removeChromeInputField):
(TestRunner::focusWebView):
(TestRunner::grantWebNotificationPermission):
(TestRunner::denyWebNotificationPermission):
(TestRunner::removeAllWebNotificationPermissions):
(TestRunner::simulateWebNotificationClick):
(TestRunner::imageCountInGeneralPasteboard):

  • DumpRenderTree/win/UIDelegate.cpp:

(UIDelegate::runJavaScriptAlertPanelWithMessage):
(UIDelegate::runJavaScriptConfirmPanelWithMessage):
(UIDelegate::runJavaScriptTextInputPanelWithPrompt):
(UIDelegate::runBeforeUnloadConfirmPanelWithMessage):
(UIDelegate::webViewAddMessageToConsole):
(UIDelegate::exceededDatabaseQuota):
(UIDelegate::setStatusText):
(UIDelegate::didPressMissingPluginButton):

4:43 AM Changeset in webkit [210502] by Antti Koivisto
  • 17 edits
    2 copies
    5 moves
    1 add in trunk/Source

Move cache coders to WTF
https://bugs.webkit.org/show_bug.cgi?id=166825

Rubber-stamped by Sam Weinig.

Source/WebKit2:

  • NetworkProcess/cache/NetworkCache.h:
  • NetworkProcess/cache/NetworkCacheCoder.h: Removed.
  • NetworkProcess/cache/NetworkCacheCoders.cpp:

(WebKit::NetworkCache::Coder<AtomicString>::encode): Deleted.
(WebKit::NetworkCache::Coder<AtomicString>::decode): Deleted.
(WebKit::NetworkCache::Coder<CString>::encode): Deleted.
(WebKit::NetworkCache::Coder<CString>::decode): Deleted.
(WebKit::NetworkCache::Coder<String>::encode): Deleted.
(WebKit::NetworkCache::decodeStringText): Deleted.
(WebKit::NetworkCache::Coder<String>::decode): Deleted.
(WebKit::NetworkCache::Coder<SHA1::Digest>::encode): Deleted.
(WebKit::NetworkCache::Coder<SHA1::Digest>::decode): Deleted.
(WebKit::NetworkCache::Coder<WebCore::HTTPHeaderMap>::encode): Deleted.
(WebKit::NetworkCache::Coder<WebCore::HTTPHeaderMap>::decode): Deleted.

  • NetworkProcess/cache/NetworkCacheCoders.h:

(): Deleted.
(WebKit::NetworkCache::Coder<std::optional<T>>::encode): Deleted.
(WebKit::NetworkCache::Coder<std::optional<T>>::decode): Deleted.

  • NetworkProcess/cache/NetworkCacheCodersCocoa.cpp:

(WebKit::NetworkCache::encodeCFData): Deleted.
(WebKit::NetworkCache::decodeCFData): Deleted.
(WebKit::NetworkCache::encodeSecTrustRef): Deleted.
(WebKit::NetworkCache::decodeSecTrustRef): Deleted.
(WebKit::NetworkCache::encodeCertificateChain): Deleted.
(WebKit::NetworkCache::decodeCertificateChain): Deleted.
(WebKit::NetworkCache::Coder<WebCore::CertificateInfo>::encode): Deleted.
(WebKit::NetworkCache::Coder<WebCore::CertificateInfo>::decode): Deleted.

  • NetworkProcess/cache/NetworkCacheDecoder.cpp: Removed.
  • NetworkProcess/cache/NetworkCacheDecoder.h: Removed.
  • NetworkProcess/cache/NetworkCacheEncoder.cpp: Removed.
  • NetworkProcess/cache/NetworkCacheEncoder.h: Removed.
  • NetworkProcess/cache/NetworkCacheEntry.cpp:

(WebKit::NetworkCache::Entry::encodeAsStorageRecord):
(WebKit::NetworkCache::Entry::decodeStorageRecord):

  • NetworkProcess/cache/NetworkCacheKey.cpp:

(WebKit::NetworkCache::Key::encode):
(WebKit::NetworkCache::Key::decode):

  • NetworkProcess/cache/NetworkCacheKey.h:
  • NetworkProcess/cache/NetworkCacheStorage.cpp:

(WebKit::NetworkCache::decodeRecordMetaData):
(WebKit::NetworkCache::encodeRecordMetaData):

  • NetworkProcess/cache/NetworkCacheSubresourcesEntry.cpp:

(WebKit::NetworkCache::SubresourceInfo::encode):
(WebKit::NetworkCache::SubresourceInfo::decode):
(WebKit::NetworkCache::SubresourcesEntry::encodeAsStorageRecord):
(WebKit::NetworkCache::SubresourcesEntry::decodeStorageRecord):

  • NetworkProcess/cache/NetworkCacheSubresourcesEntry.h:
  • UIProcess/API/APIUserContentExtensionStore.cpp:

(API::encodeContentExtensionMetaData):
(API::decodeContentExtensionMetaData):

  • WebKit2.xcodeproj/project.pbxproj:

Source/WTF:

Make it possible to use robust serialization of WTF types on the lower levels of the stack.

  • WTF.xcodeproj/project.pbxproj:
  • wtf/persistence: Added.
  • wtf/persistence/Coder.h: Copied from Source/WebKit2/NetworkProcess/cache/NetworkCacheCoder.h.

(WebKit::NetworkCache::Coder::encode): Deleted.
(WebKit::NetworkCache::Coder::decode): Deleted.

  • wtf/persistence/Coders.cpp: Copied from Source/WebKit2/NetworkProcess/cache/NetworkCacheCoders.cpp.

(WebKit::NetworkCache::Coder<AtomicString>::encode): Deleted.
(WebKit::NetworkCache::Coder<AtomicString>::decode): Deleted.
(WebKit::NetworkCache::Coder<CString>::encode): Deleted.
(WebKit::NetworkCache::Coder<CString>::decode): Deleted.
(WebKit::NetworkCache::Coder<String>::encode): Deleted.
(WebKit::NetworkCache::decodeStringText): Deleted.
(WebKit::NetworkCache::Coder<String>::decode): Deleted.
(WebKit::NetworkCache::Coder<SHA1::Digest>::encode): Deleted.
(WebKit::NetworkCache::Coder<SHA1::Digest>::decode): Deleted.
(WebKit::NetworkCache::Coder<WebCore::HTTPHeaderMap>::encode): Deleted.
(WebKit::NetworkCache::Coder<WebCore::HTTPHeaderMap>::decode): Deleted.

  • wtf/persistence/Coders.h: Copied from Source/WebKit2/NetworkProcess/cache/NetworkCacheCoders.h.

(WebKit::NetworkCache::Coder<std::optional<T>>::encode): Deleted.
(WebKit::NetworkCache::Coder<std::optional<T>>::decode): Deleted.

  • wtf/persistence/Decoder.cpp: Copied from Source/WebKit2/NetworkProcess/cache/NetworkCacheDecoder.cpp.

(WebKit::NetworkCache::Decoder::Decoder): Deleted.
(WebKit::NetworkCache::Decoder::~Decoder): Deleted.
(WebKit::NetworkCache::Decoder::bufferIsLargeEnoughToContain): Deleted.
(WebKit::NetworkCache::Decoder::decodeFixedLengthData): Deleted.
(WebKit::NetworkCache::Decoder::decodeNumber): Deleted.
(WebKit::NetworkCache::Decoder::decode): Deleted.
(WebKit::NetworkCache::Decoder::verifyChecksum): Deleted.

  • wtf/persistence/Decoder.h: Copied from Source/WebKit2/NetworkProcess/cache/NetworkCacheDecoder.h.

(WebKit::NetworkCache::Decoder::length): Deleted.
(WebKit::NetworkCache::Decoder::currentOffset): Deleted.
(WebKit::NetworkCache::Decoder::decodeEnum): Deleted.
(WebKit::NetworkCache::Decoder::decode): Deleted.
(WebKit::NetworkCache::Decoder::bufferIsLargeEnoughToContain): Deleted.

  • wtf/persistence/Encoder.cpp: Copied from Source/WebKit2/NetworkProcess/cache/NetworkCacheEncoder.cpp.

(WebKit::NetworkCache::Encoder::Encoder): Deleted.
(WebKit::NetworkCache::Encoder::~Encoder): Deleted.
(WebKit::NetworkCache::Encoder::grow): Deleted.
(WebKit::NetworkCache::Encoder::updateChecksumForData): Deleted.
(WebKit::NetworkCache::Encoder::encodeFixedLengthData): Deleted.
(WebKit::NetworkCache::Encoder::encodeNumber): Deleted.
(WebKit::NetworkCache::Encoder::encode): Deleted.
(WebKit::NetworkCache::Encoder::encodeChecksum): Deleted.

  • wtf/persistence/Encoder.h: Copied from Source/WebKit2/NetworkProcess/cache/NetworkCacheEncoder.h.

(WebKit::NetworkCache::Encoder::encodeEnum): Deleted.
(WebKit::NetworkCache::Encoder::encode): Deleted.
(WebKit::NetworkCache::Encoder::operator<<): Deleted.
(WebKit::NetworkCache::Encoder::buffer): Deleted.
(WebKit::NetworkCache::Encoder::bufferSize): Deleted.
(WebKit::NetworkCache::Encoder::updateChecksumForNumber): Deleted.

4:12 AM Changeset in webkit [210501] by Carlos Garcia Campos
  • 5 edits in trunk/Source/WebCore

[GTK] WebProcess from WebKitGtk+ 2.15.2 SIGSEGVs in std::unique_ptr<SoupBuffer, WTF::GPtrDeleter<SoupBuffer> >::get() const () at /usr/include/c++/6/bits/unique_ptr.h:305
https://bugs.webkit.org/show_bug.cgi?id=165848

Reviewed by Michael Catanzaro.

In r208881 several locks were added to ImageDecoder to prevent frameBufferAtIndex() from being called by multiple
threads at the same time, but I forgot isSizeAvailable() also calls frameBufferAtIndex(). However, what we
really need to protect is the GIFImageDecoder, to never allow decoding from more than one thread at the same
time. This patch reverts r208881 and adds a lock to GIFImageDecoder::decode() instead.

  • platform/image-decoders/ImageDecoder.cpp:

(WebCore::ImageDecoder::frameIsCompleteAtIndex):
(WebCore::ImageDecoder::frameDurationAtIndex):
(WebCore::ImageDecoder::createFrameImageAtIndex):

  • platform/image-decoders/ImageDecoder.h:
  • platform/image-decoders/gif/GIFImageDecoder.cpp:

(WebCore::GIFImageDecoder::decode):

  • platform/image-decoders/gif/GIFImageDecoder.h:
3:25 AM Changeset in webkit [210500] by tpopela@redhat.com
  • 3 edits in trunk/Source/WebKit2

[GTK] Replace WebKitWebSettings with WebKitSettings in documentation
https://bugs.webkit.org/show_bug.cgi?id=166836

Reviewed by Carlos Garcia Campos.

Don't use WebKitWebSettings (it was a WebKit1 thing) in documentation,
but replace it with WebKitSettings.

  • UIProcess/API/gtk/WebKitSettings.cpp:

(webkit_settings_class_init):

  • UIProcess/API/gtk/WebKitWebView.cpp:
3:03 AM Changeset in webkit [210499] by commit-queue@webkit.org
  • 9 edits
    3 copies in trunk

[OWR] Unskip fast/mediastream/MediaStream-video-element-track-stop.html
https://bugs.webkit.org/show_bug.cgi?id=165316

Patch by Alejandro G. Castro <alex@igalia.com> on 2017-01-09
Reviewed by Philippe Normand.

Source/WebCore:

Fixed the ended support of the video element in the OWR player and
fixed the videoTracks support. Now the OW player properly adds and
removes the audio and video tracks. Added the getSettings support
to the mediastream interface. Solved also the size handling in
some of the enable/muted situations.

Unskipping fast/mediastream/MediaStream-video-element-track-stop.html.

  • platform/GStreamer.cmake: Added the new

RealtimeMediaSourceOwr.cpp with the new code handling the
settings.

  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamerOwr.cpp:

(WebCore::MediaPlayerPrivateGStreamerOwr::~MediaPlayerPrivateGStreamerOwr):
Release the new video and audio maps that creates a relationship
of the mediastream tracks with the mediatracks of the video element.
(WebCore::MediaPlayerPrivateGStreamerOwr::play): Set ended to
false when we start playing.
(WebCore::MediaPlayerPrivateGStreamerOwr::load): Create the media
tracks to the player so that the videoTracks API returns it, and
add an entry in the map to be able to restore it using the
mediastream track.
(WebCore::MediaPlayerPrivateGStreamerOwr::disableMediaTracks):
Move some part of the stop function to this one in order to use it
in pause method and avoid changing the video selection in that
case.
(WebCore::MediaPlayerPrivateGStreamerOwr::stop): Now we call the
function disableMediaTracks and we also change teh selected
videoTrack.
(WebCore::MediaPlayerPrivateGStreamerOwr::trackEnded): For
videoTrack reset the size and the selected element. In case there
is no media playing we Make sure we set the ended variable to true
and call the timeChange to modify the state of the player.
(WebCore::MediaPlayerPrivateGStreamerOwr::trackEnabledChanged):
Handle properly the situation when the user changed the enabled
value, we disable the media.
(WebCore::MediaPlayerPrivateGStreamerOwr::setSize): Modify the
size of the source.
(WebCore::MediaPlayerPrivateGStreamerOwr::naturalSize): Overrided
to make sure we return a size even when the sample is not ready
for gst.

  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamerOwr.h:

Added the ended attribute and the maps.

  • platform/mediastream/openwebrtc/MediaEndpointOwr.cpp:

(WebCore::MediaEndpointOwr::createMutedRemoteSource): Use the new
realtime video and audio sources classes, this new classes
implement the settings of each type of media element.

  • platform/mediastream/openwebrtc/RealtimeMediaSourceCenterOwr.cpp:

(WebCore::RealtimeMediaSourceCenterOwr::mediaSourcesAvailable):
Use the new audio and video source classes instead of the general
one in order to handle the settings properly.

  • platform/mediastream/openwebrtc/RealtimeMediaSourceOwr.cpp: Added

(WebCore::RealtimeMediaSourceOwr::settings): Initialize using the
subclass and return the new currentSettings attribute.
(WebCore::RealtimeMediaSourceOwr::supportedConstraints): Call the
subclass initialization of the supportedSettings.

  • platform/mediastream/openwebrtc/RealtimeMediaSourceOwr.h:

(WebCore::RealtimeMediaSourceOwr::initializeSettings): Added to
initialize the settings before returning the value. Implemented in
the subclass.
(WebCore::RealtimeMediaSourceOwr::initializeSupportedConstraints):
Added to initialize the supported settings of the
media. Implemented in the subclass.
(WebCore::RealtimeMediaSourceOwr::settings): Moved to the cpp
file, implemented using the initialize functions of the subclass

  • platform/mediastream/openwebrtc/RealtimeVideoSourceOwr.h: Added

this new class to handle the settings of the video elements. The
class initializes the settings and the supportedSettings.

  • platform/mediastream/openwebrtc/RealtimeAudioSourceOwr.h: Added

this new class to handle the settings of the audio elements. The
class initializes the settings and the supportedSettings.

LayoutTests:

  • platform/gtk/TestExpectations: Unskipped the test and moved the

stop one, now it does not timeout because we correctly handle the
ended value but still fails, we need more features in the mock
classes for owr.

Note: See TracTimeline for information about the timeline view.