Timeline
Oct 18, 2016:
- 10:25 PM Changeset in webkit [207521] by
-
- 15 edits in trunk/Source/WebCore
Move internal testing classes from ExceptionCode to Exception
https://bugs.webkit.org/show_bug.cgi?id=163553
Reviewed by Ryosuke Niwa.
- bindings/js/JSDOMBinding.h: Added toJSArray. Also exported a function that
is now needed in the testing library.
- bindings/scripts/CodeGeneratorJS.pm:
(NativeToJSValue): Added code to handle the jsArray case with an exception.
- css/parser/CSSPropertyParser.cpp: Fix #if to make code compile when
CSS_SCROLL_SNAP is not enabled.
- dom/Element.cpp:
(WebCore::Element::createShadowRoot): Changed return type to a raw pointer.
There is no reason it needs to be a RefPtr.
- dom/Element.h: Updated for above change.
- svg/SVGPathStringBuilder.h: Exported class and made more public so it can
be used in test code.
- svg/SVGPathUtilities.cpp:
(WebCore::pathIteratorForBuildingString): Deleted. Needed only for test code,
so moved into there.
(WebCore::buildStringFromPath): Deleted. Ditto.
- svg/SVGPathUtilities.h: Removed buildStringFromPath.
- testing/InternalSettings.cpp: Simplified the guard macro and used the all
capitals style that our style guide prescribes for non-function-like macros.
(WebCore::InternalSettings::create): Moved here, no longer inline Use m_page.
(WebCore::InternalSettings::resetToConsistentState): Updated since settings
returns a reference.
(WebCore::InternalSettings::settings): Changed to return a reference and
assert that m_page is not null; functions all check m_page for null first.
(WebCore::InternalSettings::setTouchEventEmulationEnabled): Updated to use
ExceptionOr, do an m_page check, and use settings that returns a reference.
(WebCore::InternalSettings::setStandardFontFamily): Ditto.
(WebCore::InternalSettings::setSerifFontFamily): Ditto.
(WebCore::InternalSettings::setSansSerifFontFamily): Ditto.
(WebCore::InternalSettings::setFixedFontFamily): Ditto.
(WebCore::InternalSettings::setCursiveFontFamily): Ditto.
(WebCore::InternalSettings::setFantasyFontFamily): Ditto.
(WebCore::InternalSettings::setPictographFontFamily): Ditto.
(WebCore::InternalSettings::setTextAutosizingEnabled): Ditto.
(WebCore::InternalSettings::setTextAutosizingWindowSizeOverride): Ditto.
(WebCore::InternalSettings::setMediaTypeOverride): Ditto.
(WebCore::InternalSettings::setCanStartMedia): Ditto.
(WebCore::InternalSettings::setAllowsAirPlayForMediaPlayback): Ditto.
(WebCore::InternalSettings::setEditingBehavior): Ditto.
(WebCore::InternalSettings::setShouldDisplayTrackKind): Ditto.
(WebCore::InternalSettings::shouldDisplayTrackKind): Ditto.
(WebCore::InternalSettings::setStorageBlockingPolicy): Ditto.
(WebCore::InternalSettings::setPreferMIMETypeForImages): Ditto.
(WebCore::InternalSettings::setImagesEnabled): Ditto.
(WebCore::InternalSettings::setPDFImageCachingPolicy): Ditto.
(WebCore::InternalSettings::setMinimumTimerInterval): Ditto.
(WebCore::InternalSettings::setDefaultVideoPosterURL): Ditto.
(WebCore::InternalSettings::setForcePendingWebGLPolicy): Ditto.
(WebCore::InternalSettings::setTimeWithoutMouseMovementBeforeHidingControls): Ditto.
(WebCore::InternalSettings::setUseLegacyBackgroundSizeShorthandBehavior): Ditto.
(WebCore::InternalSettings::setAutoscrollForDragAndDropEnabled): Ditto.
(WebCore::InternalSettings::setFontFallbackPrefersPictographs): Ditto.
(WebCore::InternalSettings::setWebFontsAlwaysFallBack): Ditto.
(WebCore::InternalSettings::setQuickTimePluginReplacementEnabled): Ditto.
(WebCore::InternalSettings::setYouTubeFlashPluginReplacementEnabled): Ditto.
(WebCore::InternalSettings::setBackgroundShouldExtendBeyondPage): Ditto.
(WebCore::InternalSettings::setShouldConvertPositionStyleOnCopy): Ditto.
(WebCore::InternalSettings::setScrollingTreeIncludesFrames): Ditto.
(WebCore::InternalSettings::setAllowsInlineMediaPlayback): Ditto.
(WebCore::InternalSettings::setAllowsInlineMediaPlaybackAfterFullscreen): Ditto.
(WebCore::InternalSettings::setInlineMediaPlaybackRequiresPlaysInlineAttribute): Ditto.
(WebCore::InternalSettings::setIndexedDBWorkersEnabled): Ditto.
(WebCore::InternalSettings::userInterfaceDirectionPolicy): Ditto.
(WebCore::InternalSettings::setUserInterfaceDirectionPolicy): Ditto.
(WebCore::InternalSettings::systemLayoutDirection): Ditto.
(WebCore::InternalSettings::setSystemLayoutDirection): Ditto.
(WebCore::InternalSettings::variationFontsEnabled): Ditto.
(WebCore::InternalSettings::setVariationFontsEnabled): Ditto.
(WebCore::InternalSettings::forcedPrefersReducedMotionValue): Ditto.
(WebCore::InternalSettings::setForcedPrefersReducedMotionValue): Ditto.
- testing/InternalSettings.h: Updated for above changes. Also moved Backup to make
it private instead of public.
- testing/InternalSettings.idl: Use non-legacy execption. Also removed unneeded
exception for setIndexedDBWorkersEnabled.
- testing/Internals.cpp: Marked InspectorStubFrontend final and made everything private.
(WebCore::Internals::setCanShowModalDialogOverride): Use ExceptionOr.
(WebCore::Internals::lastSpatialNavigationCandidateCount): Ditto.
(WebCore::Internals::animationsAreSuspended): Ditto.
(WebCore::Internals::suspendAnimations): Ditto.
(WebCore::Internals::resumeAnimations): Ditto.
(WebCore::Internals::pauseAnimationAtTimeOnElement): Ditto.
(WebCore::Internals::pauseAnimationAtTimeOnPseudoElement): Ditto.
(WebCore::Internals::pauseTransitionAtTimeOnElement): Ditto.
(WebCore::Internals::pauseTransitionAtTimeOnPseudoElement): Ditto.
(WebCore::Internals::elementRenderTreeAsText): Ditto.
(WebCore::Internals::ensureShadowRoot): Ditto.
(WebCore::Internals::createShadowRoot): Ditto.
(WebCore::Internals::shadowRootType): Ditto.
(WebCore::Internals::isTimerThrottled): Ditto.
(WebCore::Internals::formControlStateOfPreviousHistoryItem): Ditto.
(WebCore::Internals::setFormControlStateOfPreviousHistoryItem): Ditto.
(WebCore::Internals::absoluteCaretBounds): Ditto.
(WebCore::Internals::inspectorHighlightRects): Ditto.
(WebCore::Internals::inspectorHighlightObject): Ditto.
(WebCore::Internals::markerCountForNode): Ditto.
(WebCore::Internals::markerAt): Ditto.
(WebCore::Internals::markerRangeForNode): Ditto.
(WebCore::Internals::markerDescriptionForNode): Ditto.
(WebCore::Internals::dumpMarkerRects): Ditto.
(WebCore::Internals::setMarkedTextMatchesAreHighlighted): Ditto.
(WebCore::Internals::setScrollViewPosition): Ditto.
(WebCore::Internals::setViewBaseBackgroundColor): Ditto.
(WebCore::Internals::setPagination): Ditto.
(WebCore::Internals::setPaginationLineGridEnabled): Ditto.
(WebCore::Internals::configurationForViewport): Ditto.
(WebCore::Internals::wasLastChangeUserEdit): Ditto.
(WebCore::Internals::scrollElementToRect): Ditto.
(WebCore::Internals::autofillFieldName): Ditto.
(WebCore::Internals::paintControlTints): Ditto.
(WebCore::Internals::rangeForDictionaryLookupAtLocation): Ditto.
(WebCore::Internals::setDelegatesScrolling): Ditto.
(WebCore::Internals::lastSpellCheckRequestSequence): Ditto.
(WebCore::Internals::lastSpellCheckProcessedSequence): Ditto.
(WebCore::Internals::wheelEventHandlerCount): Ditto.
(WebCore::Internals::touchEventHandlerCount): Ditto.
(WebCore::Internals::nodesFromRect): Ditto.
(WebCore::Internals::setBatteryStatus): Ditto.
(WebCore::Internals::setDeviceProximity): Ditto.
(WebCore::Internals::hasSpellingMarker): Ditto.
(WebCore::Internals::hasAutocorrectedMarker): Ditto.
(WebCore::Internals::handleAcceptedCandidate): Ditto.
(WebCore::Internals::isOverwriteModeEnabled): Ditto.
(WebCore::Internals::toggleOverwriteModeEnabled): Ditto.
(WebCore::Internals::countMatchesForText): Ditto.
(WebCore::Internals::countFindMatches): Ditto.
(WebCore::Internals::setInspectorIsUnderTest): Ditto.
(WebCore::Internals::hasGrammarMarker): Ditto.
(WebCore::Internals::numberOfScrollableAreas): Ditto.
(WebCore::Internals::isPageBoxVisible): Ditto.
(WebCore::Internals::layerTreeAsText): Ditto.
(WebCore::Internals::repaintRectsAsText): Ditto.
(WebCore::Internals::scrollingStateTreeAsText): Ditto.
(WebCore::Internals::mainThreadScrollingReasons): Ditto.
(WebCore::Internals::nonFastScrollableRects): Ditto.
(WebCore::Internals::setElementUsesDisplayListDrawing): Ditto.
(WebCore::Internals::setElementTracksDisplayListReplay): Ditto.
(WebCore::Internals::displayListForElement): Ditto.
(WebCore::Internals::replayDisplayListForElement): Ditto.
(WebCore::Internals::garbageCollectDocumentResources): Ditto.
(WebCore::Internals::insertAuthorCSS): Ditto.
(WebCore::Internals::insertUserCSS): Ditto.
(WebCore::Internals::pageProperty): Ditto.
(WebCore::Internals::pageSizeAndMarginsInPixels): Ditto.
(WebCore::Internals::setPageScaleFactor): Ditto.
(WebCore::Internals::setPageZoomFactor): Ditto.
(WebCore::Internals::setTextZoomFactor): Ditto.
(WebCore::Internals::setUseFixedLayout): Ditto.
(WebCore::Internals::setFixedLayoutSize): Ditto.
(WebCore::Internals::setViewExposedRect): Ditto.
(WebCore::Internals::setHeaderHeight): Ditto.
(WebCore::Internals::setFooterHeight): Ditto.
(WebCore::Internals::setTopContentInset): Ditto.
(WebCore::Internals::setApplicationCacheOriginQuota): Ditto.
(WebCore::Internals::startTrackingRepaints): Ditto.
(WebCore::Internals::stopTrackingRepaints): Ditto.
(WebCore::Internals::startTrackingLayerFlushes): Ditto.
(WebCore::Internals::layerFlushCount): Ditto.
(WebCore::Internals::startTrackingStyleRecalcs): Ditto.
(WebCore::Internals::styleRecalcCount): Ditto.
(WebCore::Internals::startTrackingCompositingUpdates): Ditto.
(WebCore::Internals::compositingUpdateCount): Ditto.
(WebCore::Internals::updateLayoutIgnorePendingStylesheetsAndRunPostLayoutTasks): Ditto.
(WebCore::Internals::getCurrentCursorInfo): Ditto.
(WebCore::Internals::mediaElementHasCharacteristic): Ditto.
(WebCore::Internals::captionsStyleSheetOverride): Ditto.
(WebCore::Internals::setCaptionsStyleSheetOverride): Ditto.
(WebCore::Internals::setPrimaryAudioTrackLanguageOverride): Ditto.
(WebCore::Internals::setCaptionDisplayMode): Ditto.
(WebCore::Internals::selectionBounds): Ditto.
(WebCore::Internals::isVibrating): Ditto.
(WebCore::Internals::isPluginUnavailabilityIndicatorObscured): Ditto.
(WebCore::Internals::beginMediaSessionInterruption): Ditto.
(WebCore::Internals::setMediaSessionRestrictions): Ditto.
(WebCore::Internals::postRemoteControlCommand): Ditto.
(WebCore::Internals::setMockMediaPlaybackTargetPickerState): Ditto.
(WebCore::Internals::installMockPageOverlay): Ditto.
(WebCore::Internals::pageOverlayLayerTreeAsText): Ditto.
(WebCore::Internals::scrollSnapOffsets): Ditto.
(WebCore::Internals::pathStringWithShrinkWrappedRects): Moved the code that builds
the path string in here for now since it's only used for this testing.
(WebCore::Internals::resourceLoadStatisticsForOrigin): Take a const String&.
- testing/Internals.h: Updated for above changes.
- testing/Internals.idl: Use non-legacy exceptions.
- 10:03 PM Changeset in webkit [207520] by
-
- 15 edits8 adds2 deletes in trunk/LayoutTests
Import the latest custom elements tests from W3C
https://bugs.webkit.org/show_bug.cgi?id=163640
Reviewed by Chris Dumez.
LayoutTests/imported/w3c:
Import more custom elements tests from web-platform-tests as of fbe5ac0fd8eecac67d1562032eeba5bd7ec2b735.
Most of these tests are written and fixed by me.
- web-platform-tests/custom-elements/htmlconstructor/newtarget-expected.txt:
- web-platform-tests/custom-elements/htmlconstructor/newtarget.html:
- web-platform-tests/custom-elements/reactions/DOMStringMap-expected.txt: Added.
- web-platform-tests/custom-elements/reactions/DOMStringMap.html: Added.
- web-platform-tests/custom-elements/reactions/Document-expected.txt:
- web-platform-tests/custom-elements/reactions/Document.html:
- web-platform-tests/custom-elements/reactions/Element-expected.txt:
- web-platform-tests/custom-elements/reactions/Element.html:
- web-platform-tests/custom-elements/reactions/ElementContentEditable-expected.txt: Added.
- web-platform-tests/custom-elements/reactions/ElementContentEditable.html: Added.
- web-platform-tests/custom-elements/reactions/HTMLElement-expected.txt: Added.
- web-platform-tests/custom-elements/reactions/HTMLElement.html: Added.
- web-platform-tests/custom-elements/reactions/NamedNodeMap-expected.txt:
- web-platform-tests/custom-elements/reactions/NamedNodeMap.html:
- web-platform-tests/custom-elements/reactions/Range-expected.txt:
- web-platform-tests/custom-elements/reactions/Range.html:
- web-platform-tests/custom-elements/reactions/Selection-expected.txt: Added.
- web-platform-tests/custom-elements/reactions/Selection.html: Added.
- web-platform-tests/custom-elements/reactions/resources/reactions.js:
- web-platform-tests/custom-elements/reactions/w3c-import.log:
- web-platform-tests/custom-elements/resources/custom-elements-helpers.js:
LayoutTests:
Removed the test re-imported via web-platform-tests in r206838.
- fast/custom-elements/lifecycle-callback-timing-expected.txt: Removed.
- fast/custom-elements/lifecycle-callback-timing.html: Removed.
- 9:46 PM Changeset in webkit [207519] by
-
- 9 edits2 adds in trunk
[Web IDL] Drop webkit-specific extended attributes that are no longer useful
https://bugs.webkit.org/show_bug.cgi?id=163643
Reviewed by Ryosuke Niwa.
Source/WebCore:
Drop webkit-specific IDL extended attributes that are no longer useful:
- [CustomReturn]: I believe this used to be for ObjC bindings. It has no impact in JS bindings.
- [Deletable]: It only had an impact on static attributes and was only used on HTMLAllCollection.all, which is not static. I updated the bindings generator to so that static attributes are now configurable by default (unless marked as [Unforgeable], as per Web IDL [1]. This causes Notification.permission (This only static attribute we have) to become deletable. This behavior is consistent with the specification and with Chrome. I added test coverage for this.
- [ImplementationNamespace]: Implemented but unused.
- [PassContext]: Not implemented and unused.
- [TypedArray=*]: Not implemented and unused.
[1] https://heycam.github.io/webidl/#es-attributes
Test: fast/notifications/notification-permisssion-deletable.html
- bindings/scripts/CodeGeneratorJS.pm:
(GetNamespaceForInterface):
(GenerateImplementation):
- bindings/scripts/IDLAttributes.txt:
- bindings/scripts/test/JS/JSTestInterface.cpp:
- bindings/scripts/test/JS/JSTestObj.cpp:
- bindings/scripts/test/JS/JSTestTypedefs.cpp:
- dom/Node.idl:
- html/HTMLDocument.idl:
LayoutTests:
Add layout test to check that Notification.permission is now deletable.
- fast/notifications/notification-permisssion-deletable-expected.txt: Added.
- fast/notifications/notification-permisssion-deletable.html: Added.
- 8:52 PM Changeset in webkit [207518] by
-
- 15 edits1 add in trunk
Invoking Object.prototype.proto accessors directly should throw a TypeError.
https://bugs.webkit.org/show_bug.cgi?id=154377
<rdar://problem/27330808>
Reviewed by Filip Pizlo and Saam Barati.
JSTests:
- stress/object-prototype-proto-accessors-should-throw-on-undefined-this.js: Added.
Source/JavaScriptCore:
In a scenario where we cache the proto accessors in global variables, and
later explicitly invoke those accessors as functions, the spec for Function Calls
(see https://tc39.github.io/ecma262/#sec-function-calls) states that the function
ref value is of type Reference, and base of ref is an Environment Record. Then,
it follows that the thisValue should be set to refEnv.WithBaseObject()
(see section 4.b.ii of 12.3.4.1 at
https://tc39.github.io/ecma262/#sec-function-calls-runtime-semantics-evaluation).
refEnv in this case is the environment record that the cached accessors were
found in i.e. the global object. The WithBaseObject() of the global object is
undefined (see details about WithBaseObject at
https://tc39.github.io/ecma262/#sec-environment-records).
Hence, the proto accessors should see a thisValue of undefined, and throw
TypeErrors. See https://tc39.github.io/ecma262/#sec-get-object.prototype.__proto,
https://tc39.github.io/ecma262/#sec-set-object.prototype.__proto,
https://tc39.github.io/ecma262/#sec-toobject, and
https://tc39.github.io/ecma262/#sec-requireobjectcoercible.
In JSC's implementation, the callee needs to do a ToThis operation on the
incoming "this" argument in order to get the specified thisValue. The
implementations of the proto accessors were not doing this correctly. This
has now been fixed.
- runtime/JSGlobalObjectFunctions.cpp:
(JSC::globalFuncProtoGetter):
(JSC::globalFuncProtoSetter):
LayoutTests:
- http/tests/security/xss-DENIED-htmlelelment-with-iframe-proto-expected.txt:
- http/tests/security/xss-DENIED-method-with-iframe-proto-expected.txt:
- http/tests/security/xss-DENIED-non-shadowable-propterty-with-iframe-proto-expected.txt:
- http/tests/security/xss-DENIED-regular-propterty-with-iframe-proto-expected.txt:
- http/tests/security/xss-DENIED-regular-propterty-with-iframe-proto.html:
- js/dom/activation-proto-expected.txt:
- js/dom/script-tests/activation-proto.js:
- js/object-literal-shorthand-construction-expected.txt:
- js/script-tests/object-literal-shorthand-construction.js:
- js/script-tests/sloppy-getter-setter-global-object.js:
- js/sloppy-getter-setter-global-object-expected.txt:
- 7:43 PM Changeset in webkit [207517] by
-
- 22 edits in trunk
Replace std::experimental::variant with WTF::Variant (or similar)
https://bugs.webkit.org/show_bug.cgi?id=163626
Patch by Sam Weinig <sam@webkit.org> on 2016-10-18
Reviewed by Chris Dumez.
Rename std::experimental::variant, Variant. Move helpers get/holds_alternative/etc.
into the WTF namespace.
Source/JavaScriptCore:
- domjit/DOMJITReg.h:
(JSC::DOMJIT::Reg::gpr):
(JSC::DOMJIT::Reg::fpr):
(JSC::DOMJIT::Reg::jsValueRegs):
Source/WebCore:
- Modules/fetch/FetchBody.h:
(WebCore::FetchBody::isBlob):
(WebCore::FetchBody::isFormData):
(WebCore::FetchBody::isArrayBuffer):
(WebCore::FetchBody::isArrayBufferView):
(WebCore::FetchBody::isURLSearchParams):
(WebCore::FetchBody::isText):
(WebCore::FetchBody::blobBody):
(WebCore::FetchBody::formDataBody):
(WebCore::FetchBody::arrayBufferBody):
(WebCore::FetchBody::arrayBufferViewBody):
(WebCore::FetchBody::textBody):
(WebCore::FetchBody::urlSearchParamsBody):
- bindings/generic/IDLTypes.h:
- dom/ExceptionOr.h:
(WebCore::ExceptionOr<ReturnType>::hasException):
(WebCore::ExceptionOr<ReturnType>::releaseException):
(WebCore::ExceptionOr<ReturnType>::releaseReturnValue):
- dom/MessageEvent.cpp:
(WebCore::MessageEvent::source):
- dom/MessageEvent.h:
- dom/Node.cpp:
(WebCore::nodeSetPreTransformedFromNodeOrStringVector):
(WebCore::Node::convertNodesOrStringsIntoNode):
- dom/Node.h:
- html/HTMLOptionsCollection.h:
- html/HTMLSelectElement.cpp:
(WebCore::HTMLSelectElement::add):
- html/HTMLSelectElement.h:
- html/track/TrackEvent.cpp:
(WebCore::TrackEvent::TrackEvent):
- html/track/TrackEvent.h:
Source/WebKit/mac:
- DOM/DOMHTMLSelectElement.mm:
(-[DOMHTMLSelectElement add:before:]):
Source/WTF:
- wtf/Forward.h:
- wtf/Variant.h:
Tools:
- TestWebKitAPI/Tests/WTF/Variant.cpp:
(TestWebKitAPI::TEST):
- 7:33 PM Changeset in webkit [207516] by
-
- 6 edits in trunk/Source/WebCore
Unreviewed, rebaseline bindings tests after Sam's r207505.
- bindings/scripts/test/JS/JSTestCallback.cpp:
(WebCore::JSTestCallback::callbackWithSerializedScriptValueParam):
- bindings/scripts/test/JS/JSTestCallbackFunction.cpp:
(WebCore::JSTestCallbackFunction::callbackWithSerializedScriptValueParam):
- bindings/scripts/test/JS/JSTestObj.cpp:
(WebCore::jsTestObjPrototypeFunctionSerializedValueCaller):
- bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
(WebCore::jsTestSerializedScriptValueInterfaceValueGetter):
(WebCore::jsTestSerializedScriptValueInterfaceReadonlyValueGetter):
(WebCore::jsTestSerializedScriptValueInterfaceCachedValueGetter):
(WebCore::jsTestSerializedScriptValueInterfaceCachedReadonlyValueGetter):
(WebCore::setJSTestSerializedScriptValueInterfaceValueFunction):
(WebCore::setJSTestSerializedScriptValueInterfaceCachedValueFunction):
- bindings/scripts/test/JS/JSTestTypedefs.cpp:
(WebCore::jsTestTypedefsImmutableSerializedScriptValueGetter):
(WebCore::setJSTestTypedefsImmutableSerializedScriptValueFunction):
- 7:26 PM Changeset in webkit [207515] by
-
- 13 edits in trunk
[Web IDL] Kill support for [LegacyConstructorTemplate=Event] / [LegacyInitializedByEventConstructor]
https://bugs.webkit.org/show_bug.cgi?id=163630
Reviewed by Darin Adler.
Source/WebCore:
Kill support for [LegacyConstructorTemplate=Event] / [LegacyInitializedByEventConstructor] in our
IDL now that all our events use proper constructors instead.
- bindings/scripts/CodeGenerator.pm:
- bindings/scripts/CodeGeneratorJS.pm:
(GenerateHeader):
(GenerateConstructorDefinition):
(GenerateConstructorHelperMethods):
(IsConstructable):
- bindings/scripts/IDLAttributes.txt:
- dom/Event.h:
(WebCore::Event::create):
- dom/Event.idl:
- dom/UIEvent.h:
(WebCore::UIEvent::create):
- dom/UIEvent.idl:
LayoutTests:
Update / rebaseline existing tests to reflect minor behavior changes.
- fast/events/constructors/event-constructors-expected.txt:
- fast/events/constructors/event-constructors.html:
- fast/events/constructors/ui-event-constructor-expected.txt:
- 7:05 PM WebKitIDL edited by
- Drop ConstructorTemplate and TypedArray as those are no longer supported (diff)
- 7:03 PM Changeset in webkit [207514] by
-
- 12 edits2 adds in trunk
Changing details.open should cause a toggle event to be fired asynchronously
https://bugs.webkit.org/show_bug.cgi?id=163568
Reviewed by Darin Adler.
LayoutTests/imported/w3c:
- web-platform-tests/html/dom/interfaces-expected.txt:
Rebaseline W3C test now that more checks are passing.
- web-platform-tests/html/semantics/interactive-elements/the-details-element/toggleEvent-expected.txt: Added.
- web-platform-tests/html/semantics/interactive-elements/the-details-element/toggleEvent.html: Added.
- web-platform-tests/html/semantics/interactive-elements/the-details-element/w3c-import.log:
Import test coverage for the toggle event.
Source/WebCore:
Changing details.open should cause a toggle event to be fired asynchronously:
Firefox and Chrome implement this, we don't.
Test: imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-details-element/toggleEvent.html
- dom/EventNames.h:
- dom/GlobalEventHandlers.idl:
- html/HTMLAttributeNames.in:
- html/HTMLDetailsElement.cpp:
(WebCore::detailToggleEventSender):
(WebCore::HTMLDetailsElement::~HTMLDetailsElement):
(WebCore::HTMLDetailsElement::dispatchPendingEvent):
(WebCore::HTMLDetailsElement::parseAttribute):
- html/HTMLDetailsElement.h:
- html/HTMLElement.cpp:
(WebCore::HTMLElement::createEventHandlerNameMap):
LayoutTests:
Rebaseline existing test now that a new ontoggle attribute is exposed.
- js/dom/dom-static-property-for-in-iteration-expected.txt:
- 6:06 PM Changeset in webkit [207513] by
-
- 7 edits in trunk/Source/WebCore
[CSS Parser] Enable basic parser testing.
https://bugs.webkit.org/show_bug.cgi?id=163639
Reviewed by Dean Jackson.
- css/SelectorChecker.cpp:
(WebCore::SelectorChecker::matchRecursively):
Remove the ASSERT_NOT_REACHED on the new shadow selectors. We need to implement this
eventually, but it's better to not assert on that for now.
- css/parser/CSSParserValues.cpp:
(WebCore::CSSParserSelector::isHostPseudoSelector):
Make sure to check that we're a pseudoclass selector first, since otherwise we'll assert.
- css/parser/CSSParserValues.h:
(WebCore::CSSParserSelector::needsImplicitShadowCombinatorForMatching):
Make sure to check that we're a pseudoelement selector first, since otherwise we'll assert.
- css/parser/CSSPropertyParser.cpp:
(WebCore::CSSPropertyParser::addExpandedPropertyForValue):
copyRef is needed here, since a singleton value is being propagated to all the expanded shorthand properties.
(WebCore::parseSingleShadow):
(WebCore::CSSPropertyParser::consumeFont):
Remove the font properties that aren't part of our shorthand. We will need to revisit this eventually as it seems
some of the font properties should be reset as part of this shorthand but aren't.
- 6:03 PM Changeset in webkit [207512] by
-
- 11 edits in trunk
Add a MiniBrowser menu item to apply page scale in WK1 and WK2
https://bugs.webkit.org/show_bug.cgi?id=163627
Reviewed by Dean Jackson.
Source/WebKit/mac:
Add an explanatory comment about viewScaleFactor not really being viewScaleFactor.
- WebView/WebViewPrivate.h:
Source/WebKit2:
New SPI to set and retrieve page scale.
- UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _setPageScale:withOrigin:]):
(-[WKWebView _pageScale]):
- UIProcess/API/Cocoa/WKWebViewPrivate.h:
Tools:
Rename setScale: to setViewScale: and add setPageScale:, hooking it up for WK1 (via exisiting SPI)
and WK2 (via new SPI).
- MiniBrowser/mac/BrowserWindowController.h:
- MiniBrowser/mac/BrowserWindowController.m:
(-[BrowserWindowController pageScaleForMenuItemTag:]):
(-[BrowserWindowController setPageScale:]):
(-[BrowserWindowController setViewScale:]):
(-[BrowserWindowController setScale:]): Deleted.
- MiniBrowser/mac/MainMenu.xib:
- MiniBrowser/mac/WK1BrowserWindowController.m:
(-[WK1BrowserWindowController setPageScale:]):
(-[WK1BrowserWindowController setViewScale:]):
(areEssentiallyEqual):
(-[WK1BrowserWindowController validateMenuItem:]):
(-[WK1BrowserWindowController setScale:]): Deleted.
- MiniBrowser/mac/WK2BrowserWindowController.m:
(-[WK2BrowserWindowController setPageScale:]):
(-[WK2BrowserWindowController viewScaleForMenuItemTag:]):
(-[WK2BrowserWindowController setViewScale:]):
(areEssentiallyEqual):
(-[WK2BrowserWindowController validateMenuItem:]):
(viewScaleForMenuItemTag): Deleted.
(-[WK2BrowserWindowController setScale:]): Deleted.
- 5:51 PM Changeset in webkit [207511] by
-
- 2 edits in trunk/Source/WebCore
Update the comment for HTML Imports as there is now a proposal to use ES6 Modules for this.
Also replace the contact by me since I'm most familiar with this feature.
- features.json:
- 5:39 PM Changeset in webkit [207510] by
-
- 2 edits in trunk/Source/WebCore
Update the status of shadow DOM API to "Done" with a comment saying we're still fixing bugs.
Also update my contact information since I'm no longer on Twitter.
- features.json:
- 5:27 PM Changeset in webkit [207509] by
-
- 10 edits in trunk
Provide better form validation messages
https://bugs.webkit.org/show_bug.cgi?id=163584
Reviewed by Darin Adler.
Source/WebCore:
Provide better form validation messages that match more closely the ones
from Chrome and Firefox.
No new tests, updated existing tests.
- English.lproj/Localizable.strings:
- platform/LocalizedStrings.cpp:
(WebCore::validationMessageValueMissingText):
(WebCore::validationMessageValueMissingForCheckboxText):
(WebCore::validationMessageValueMissingForFileText):
(WebCore::validationMessageValueMissingForMultipleFileText):
(WebCore::validationMessageValueMissingForRadioText):
(WebCore::validationMessageValueMissingForSelectText):
(WebCore::validationMessageTypeMismatchText):
(WebCore::validationMessageTypeMismatchForEmailText):
(WebCore::validationMessageTypeMismatchForMultipleEmailText):
(WebCore::validationMessageTypeMismatchForURLText):
(WebCore::validationMessagePatternMismatchText):
(WebCore::validationMessageTooShortText):
(WebCore::validationMessageTooLongText):
(WebCore::validationMessageRangeUnderflowText):
(WebCore::validationMessageRangeOverflowText):
(WebCore::validationMessageStepMismatchText):
(WebCore::validationMessageBadInputForNumberText):
LayoutTests:
Update existing tests now that form validation messages differ.
- fast/forms/number/number-validation-message-expected.txt:
- fast/forms/number/number-validation-message.html:
- fast/forms/validationMessage-expected.txt:
- platform/mac/fast/forms/validation-message-appearance-expected.txt:
- 5:21 PM Changeset in webkit [207508] by
-
- 2 edits in trunk/Tools
Add an beforeunload alert to the WebKitLegacy MiniBrowser
https://bugs.webkit.org/show_bug.cgi?id=163634
Reviewed by Sam Weinig.
- MiniBrowser/mac/WK1BrowserWindowController.m:
(-[WK1BrowserWindowController webView:runBeforeUnloadConfirmPanelWithMessage:initiatedByFrame:]):
- 5:20 PM Changeset in webkit [207507] by
-
- 2 edits in trunk/Source/WebCore
Fix GTK build.
- css/parser/CSSPropertyParser.cpp:
(WebCore::CSSPropertyParser::parseSingleValue):
- 5:12 PM Changeset in webkit [207506] by
-
- 2 edits in trunk/LayoutTests
Marking http/tests/security/contentSecurityPolicy/upgrade-insecure-requests/basic-upgrade-cors.https.html as flaky on Sierra.
https://bugs.webkit.org/show_bug.cgi?id=163453
Unreviewed test gardening.
- platform/mac-wk2/TestExpectations:
- 5:05 PM Changeset in webkit [207505] by
-
- 30 edits in trunk/Source/WebCore
Simplify SerializedScriptValue, MessagePortArray and ArrayBufferArray to ease generation
https://bugs.webkit.org/show_bug.cgi?id=163625
Reviewed by Chris Dumez.
- Replace uses of MessagePortArray (a.k.a. Vector<RefPtr<MessagePort>, 1>) with Vector<RefPtr<MessagePort>>.
- Replace uses of ArrayBufferArray (a.k.a. Vector<RefPtr<ArrayBuffer>, 1>) with Vector<RefPtr<ArrayBuffer>>.
- Add convenience functions to SerializedScriptValue to allow calling with fewer parameters.
- Move MessagePorts and ArrayBuffers more where possible.
- Modules/indexeddb/IDBObjectStore.cpp:
(WebCore::IDBObjectStore::putOrAdd):
- Modules/indexeddb/server/UniqueIDBDatabase.cpp:
(WebCore::IDBServer::UniqueIDBDatabase::performPutOrAdd):
- bindings/js/IDBBindingUtilities.cpp:
(WebCore::deserializeIDBValueToJSValue):
- bindings/js/JSCustomEventCustom.cpp:
(WebCore::JSCustomEvent::detail):
- bindings/js/JSHistoryCustom.cpp:
(WebCore::JSHistory::state):
(WebCore::JSHistory::pushState):
(WebCore::JSHistory::replaceState):
- bindings/js/JSPopStateEventCustom.cpp:
(WebCore::JSPopStateEvent::state):
- dom/CustomEvent.cpp:
(WebCore::CustomEvent::trySerializeDetail):
- dom/ErrorEvent.cpp:
(WebCore::ErrorEvent::sanitizedErrorValue):
(WebCore::ErrorEvent::trySerializeError):
- dom/PopStateEvent.cpp:
(WebCore::PopStateEvent::trySerializeState):
- page/DOMWindow.cpp:
(WebCore::DOMWindow::postMessage):
- page/DOMWindow.h:
- workers/DedicatedWorkerGlobalScope.cpp:
(WebCore::DedicatedWorkerGlobalScope::postMessage):
- workers/DedicatedWorkerGlobalScope.h:
- workers/Worker.cpp:
(WebCore::Worker::postMessage):
- workers/Worker.h:
- bindings/js/JSDOMWindowCustom.cpp:
(WebCore::handlePostMessage):
- bindings/js/JSDictionary.cpp:
(WebCore::JSDictionary::convertValue):
- bindings/js/JSDictionary.h:
Updated for new SerializedScriptValue interface/vector naming.
- bindings/js/JSMessageEventCustom.cpp:
(WebCore::handleInitMessageEvent):
Update handleInitMessageEvent to check for exceptions and use convert for the MessagePort sequence.
- bindings/js/JSMessagePortCustom.cpp:
(WebCore::extractTransferables):
(WebCore::fillMessagePortArray): Deleted.
- bindings/js/JSMessagePortCustom.h:
(WebCore::handlePostMessage):
Rename fillMessagePortArray to extractTransferables to better express what it does.
- bindings/js/SerializedScriptValue.cpp:
(WebCore::CloneSerializer::serialize):
(WebCore::CloneSerializer::CloneSerializer):
(WebCore::CloneSerializer::fillTransferMap):
(WebCore::CloneSerializer::dumpIfTerminal):
(WebCore::CloneDeserializer::deserialize):
(WebCore::CloneDeserializer::CloneDeserializer):
(WebCore::CloneDeserializer::readTerminal):
(WebCore::SerializedScriptValue::transferArrayBuffers):
(WebCore::SerializedScriptValue::create):
(WebCore::SerializedScriptValue::deserialize):
- bindings/js/SerializedScriptValue.h:
Simplify interface to allow more callers to avoid passing default arguments. Use ExecState& more.
- bindings/scripts/CodeGeneratorJS.pm:
(GetNativeVectorType):
Remove special case for MessagePort.
(JSValueToNative):
(NativeToJSValue):
Updated for new SerializedScriptValue interface.
- dom/MessageEvent.cpp:
(WebCore::MessageEvent::MessageEvent):
(WebCore::MessageEvent::create):
(WebCore::MessageEvent::initMessageEvent):
(WebCore::MessageEvent::trySerializeData):
- dom/MessageEvent.h:
Store the MessagePort sequence as a Vector<RefPtr<MessagePort>> rather than in a unique_ptr.
- dom/MessageEvent.idl:
Update last type in init functions to be sequence<MessagePort> rather than Array. They are still
custom, as we don't quite generate these correctly yet.
- dom/MessagePort.cpp:
(WebCore::MessagePort::postMessage):
(WebCore::MessagePort::dispatchMessages):
(WebCore::MessagePort::disentanglePorts):
(WebCore::MessagePort::entanglePorts):
- dom/MessagePort.h:
Update interface to take MessagePort vectors by rvalue reference.
- 4:55 PM Changeset in webkit [207504] by
-
- 2 edits in tags/Safari-603.1.9.0.2/Source/WebCore
Merged r207474. rdar://problem/28786160
- 4:54 PM Changeset in webkit [207503] by
-
- 5 edits in tags/Safari-603.1.9.0.2/Source
Versioning.
- 4:52 PM Changeset in webkit [207502] by
-
- 1 copy in tags/Safari-603.1.9.0.2
New tag.
- 4:40 PM Changeset in webkit [207501] by
-
- 2 edits in trunk/Source/WebCore
[iOS] Drop JSDictionary::convertValue() overload taking a TouchList
https://bugs.webkit.org/show_bug.cgi?id=163620
Reviewed by Sam Weinig.
Drop JSDictionary::convertValue() overload taking a TouchList now that
TouchEvent is using a proper constructor with a TouchEventInit
dictionary on iOS.
- bindings/js/JSDictionary.cpp:
- 4:40 PM Changeset in webkit [207500] by
-
- 3 edits1 add in trunk
GetByVal to GetById conversion in the DFG is incorrect for getters with control flow
https://bugs.webkit.org/show_bug.cgi?id=163629
Reviewed by Yusuke Suzuki.
JSTests:
- stress/get-by-val-to-id-with-getter.js: Added.
(foo):
(o.get hello):
Source/JavaScriptCore:
This patch fixes a bug in the DFG when attempt to convert a
GetByVal into a GetById. While converting the GetByVal, during
handleGetById in the Bytecode parser, we would mistakenly use the
opcode length of op_get_by_id rather than op_get_by_val. This causes
the new basic block we create to point to the wrong offset. In the
added test this will cause us to infinite loop.
- dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::handleGetById):
(JSC::DFG::ByteCodeParser::parseBlock):
- 4:33 PM Changeset in webkit [207499] by
-
- 42 edits in trunk
Remove CSS_SHAPES feature definition. This should always be on.
https://bugs.webkit.org/show_bug.cgi?id=163628
<rdar://problem/28834613>
.:
Reviewed by Tim Horton.
- 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:
Reviewed by Tim Horton.
- Configurations/FeatureDefines.xcconfig:
Source/WebCore:
Reviewed by Tim Horton.
CSS Shapes is in Candidate Recommendation. It's a core part
of CSS. It should always be enabled.
- Configurations/FeatureDefines.xcconfig:
- css/CSSComputedStyleDeclaration.cpp:
(WebCore::shapePropertyValue):
(WebCore::ComputedStyleExtractor::propertyValue):
- css/CSSPropertyNames.in:
- css/CSSValueKeywords.in:
- css/StyleBuilderConverter.h:
(WebCore::StyleBuilderConverter::convertShapeValue):
- css/parser/CSSParser.cpp:
(WebCore::isSimpleLengthPropertyID):
(WebCore::CSSParser::parseValue):
(WebCore::CSSParser::parseShapeProperty):
- css/parser/CSSParser.h:
- inspector/InspectorOverlay.cpp:
(WebCore::buildObjectForShapeOutside):
(WebCore::buildObjectForElementData):
- page/animation/CSSPropertyAnimation.cpp:
(WebCore::blendFunc):
(WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap):
- rendering/FloatingObjects.cpp:
(WebCore::FindNextFloatLogicalBottomAdapter::collectIfNeeded):
(WebCore::ComputeFloatOffsetForLineLayoutAdapter<FloatingObject::FloatLeft>::updateOffsetIfNeeded):
(WebCore::ComputeFloatOffsetForLineLayoutAdapter<FloatingObject::FloatRight>::updateOffsetIfNeeded):
- rendering/RenderBlock.cpp:
- rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::positionNewFloats):
- rendering/RenderBox.cpp:
(WebCore::RenderBox::~RenderBox):
(WebCore::RenderBox::styleDidChange):
(WebCore::RenderBox::updateShapeOutsideInfoAfterStyleChange):
(WebCore::isCandidateForOpaquenessTest):
(WebCore::RenderBox::imageChanged):
- rendering/RenderBox.h:
(WebCore::RenderBox::markShapeOutsideDependentsForLayout):
- rendering/RenderElement.cpp:
(WebCore::RenderElement::~RenderElement):
(WebCore::RenderElement::updateShapeImage):
(WebCore::RenderElement::initializeStyle):
(WebCore::RenderElement::setStyle):
- rendering/RenderElement.h:
(WebCore::RenderElement::hasShapeOutside):
- rendering/SimpleLineLayout.cpp:
(WebCore::SimpleLineLayout::canUseForWithReason):
- rendering/line/LineWidth.cpp:
(WebCore::LineWidth::shrinkAvailableWidthForNewFloatIfNeeded):
(WebCore::LineWidth::wrapNextToShapeOutside):
(WebCore::LineWidth::fitBelowFloats):
- rendering/line/LineWidth.h:
- rendering/shapes/ShapeOutsideInfo.cpp:
- rendering/shapes/ShapeOutsideInfo.h:
- rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::changeRequiresLayout):
(WebCore::RenderStyle::changeRequiresRepaint):
- rendering/style/RenderStyle.h:
(WebCore::RenderStyle::initialShapeImageThreshold):
- rendering/style/ShapeValue.cpp:
- rendering/style/ShapeValue.h:
- rendering/style/StyleRareNonInheritedData.cpp:
(WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
(WebCore::StyleRareNonInheritedData::operator==):
- rendering/style/StyleRareNonInheritedData.h:
- style/StylePendingResources.cpp:
(WebCore::Style::loadPendingResources):
Source/WebKit/mac:
Reviewed by Tim Horton.
- Configurations/FeatureDefines.xcconfig:
Source/WebKit2:
Reviewed by Tim Horton.
- Configurations/FeatureDefines.xcconfig:
- 4:18 PM Changeset in webkit [207498] by
-
- 9 edits in trunk/Source/WebCore
convertDictionary<>() no longer needs to return an Optional<> type
https://bugs.webkit.org/show_bug.cgi?id=163624
Reviewed by Sam Weinig.
convertDictionary<>() no longer needs to return an Optional<> type now
that our dictionary structures are all default constructible after
<https://trac.webkit.org/changeset/206974>.
- bindings/js/JSDOMConvert.h:
- bindings/scripts/CodeGeneratorJS.pm:
(GenerateDictionaryHeaderContent):
(GenerateDictionaryImplementationContent):
- bindings/scripts/test/JS/JSTestEventConstructor.cpp:
(WebCore::convertDictionary<TestEventConstructor::Init>):
- bindings/scripts/test/JS/JSTestEventConstructor.h:
- bindings/scripts/test/JS/JSTestObj.cpp:
(WebCore::convertDictionary<TestObj::Dictionary>):
(WebCore::convertDictionary<TestObj::DictionaryThatShouldNotTolerateNull>):
(WebCore::convertDictionary<TestObj::DictionaryThatShouldTolerateNull>):
(WebCore::convertDictionary<AlternateDictionaryName>):
(WebCore::convertDictionary<TestObj::ParentDictionary>):
(WebCore::convertDictionary<TestObj::ChildDictionary>):
- bindings/scripts/test/JS/JSTestObj.h:
- bindings/scripts/test/JS/JSTestStandaloneDictionary.cpp:
(WebCore::convertDictionary<DictionaryImplName>):
- bindings/scripts/test/JS/JSTestStandaloneDictionary.h:
- 4:18 PM Changeset in webkit [207497] by
-
- 20 edits in trunk
Leverage new union type support for HTMLSelectElement.add() / HTMLOptionsCollection.add()
https://bugs.webkit.org/show_bug.cgi?id=163608
Reviewed by Ryosuke Niwa.
LayoutTests/imported/w3c:
Rebaseline W3C test now that one more check is passing. This is because we are now
correctly throwing a TypeError when calling add() with an unexpected HTMLElement type.
- web-platform-tests/html/infrastructure/common-dom-interfaces/collections/htmloptionscollection-expected.txt:
Source/WebCore:
Leverage new union type support for HTMLSelectElement.add() / HTMLOptionsCollection.add():
- https://html.spec.whatwg.org/#htmlselectelement
- https://html.spec.whatwg.org/#htmloptionscollection
No new tests, rebaseline existing test.
- bindings/scripts/CodeGeneratorJS.pm:
(GenerateDefaultValue):
(GenerateParametersCheck):
- bindings/scripts/test/JS/JSTestObj.cpp:
(WebCore::jsTestObjPrototypeFunctionMethodWithOptionalSequenceIsEmptyCaller):
- bindings/scripts/test/JS/JSTestOverloadedConstructorsWithSequence.cpp:
(WebCore::constructJSTestOverloadedConstructorsWithSequence1):
- bindings/scripts/test/JS/JSTestTypedefs.cpp:
(WebCore::jsTestTypedefsPrototypeFunctionFuncCaller):
- html/HTMLOptGroupElement.idl:
- html/HTMLOptionsCollection.cpp:
(WebCore::HTMLOptionsCollection::add):
- html/HTMLOptionsCollection.h:
- html/HTMLOptionsCollection.idl:
- html/HTMLSelectElement.cpp:
(WebCore::HTMLSelectElement::add):
(WebCore::HTMLSelectElement::setOption):
(WebCore::HTMLSelectElement::setLength):
- html/HTMLSelectElement.h:
- html/HTMLSelectElement.idl:
Source/WebKit/mac:
Update add() call sites now that it takes std::variant types in.
- DOM/DOMHTMLOptionsCollection.mm:
(-[DOMHTMLOptionsCollection add:index:]):
- DOM/DOMHTMLSelectElement.mm:
(-[DOMHTMLSelectElement add:before:]):
LayoutTests:
Rebaseline existing tests now that exception messages are different.
- fast/dom/HTMLSelectElement/add-expected.txt:
- fast/dom/HTMLSelectElement/options-collection-add-expected.txt:
- fast/dom/incompatible-operations-expected.txt:
- 4:04 PM Changeset in webkit [207496] by
-
- 2 edits in trunk/Source/WebCore
Web Inspector: AXI: focused/focusable state should be based on Accessibility Object instead of Element
https://bugs.webkit.org/show_bug.cgi?id=163088
<rdar://problem/16421985>
Patch by Aaron Chu <aaron_chu@apple.com> on 2016-10-18
Reviewed by Darin Adler.
Changed code in InspectDOMAgent so that it determines the focusability of a Node based
on the AccessibilityNodeObject and not the Element class.
Covered by existing tests:
LayoutTests/inspector/dom/getAccessibilityPropertiesForNode.html
- inspector/InspectorDOMAgent.cpp:
(WebCore::InspectorDOMAgent::buildObjectForAccessibilityProperties):
- 3:57 PM Changeset in webkit [207495] by
-
- 2 edits in trunk/Source/WebKit/win
Try to fix the Windows build.
- WebHistoryItem.cpp:
(WebHistoryItem::redirectURLs):
- 3:33 PM Changeset in webkit [207494] by
-
- 3 edits in trunk/Source/WebKit2
Unreviewed, rolling out r207413.
This change broke iOS builds.
Reverted changeset:
"[iOS] Hook up WebPlatformTouchPoint's radiusX / radiusY to
_UIWebTouchPoint.majorRadiusInScreenCoordinates"
https://bugs.webkit.org/show_bug.cgi?id=163547
http://trac.webkit.org/changeset/207413
- 3:28 PM Changeset in webkit [207493] by
-
- 6 edits in trunk/Source
Get rid of more WebHistoryItem cruft
https://bugs.webkit.org/show_bug.cgi?id=163623
Reviewed by Tim Horton.
Source/WebCore:
- history/HistoryItem.cpp:
(WebCore::HistoryItem::HistoryItem):
- history/HistoryItem.h:
(WebCore::HistoryItem::setViewportArguments):
(WebCore::HistoryItem::bookmarkID): Deleted.
(WebCore::HistoryItem::setBookmarkID): Deleted.
(WebCore::HistoryItem::sharedLinkUniqueIdentifier): Deleted.
(WebCore::HistoryItem::setSharedLinkUniqueIdentifier): Deleted.
Source/WebKit/mac:
- History/WebHistoryItem.mm:
(-[WebHistoryItem initFromDictionaryRepresentation:]):
- History/WebHistoryItemPrivate.h:
- 3:22 PM Changeset in webkit [207492] by
-
- 5 edits in trunk/Websites/perf.webkit.org
Update test cases for change r206465.
https://bugs.webkit.org/show_bug.cgi?id=163618
Reviewed by Ryosuke Niwa.
Update test case for change r206465 which added support for multiple summary pages.
Use deepStrictEqual instead of deepEqual as deepEqual will not complain in the case like 'deepEqual([],{})'.
Fix a test failure in tools-buildbot-triggerable-tests.js.
Fix a bug in generating manifest.
- config.json:
- public/include/manifest.php:
- server-tests/api-manifest.js:
(TestServer.remoteAPI.getJSON.string_appeared_here.then):
- server-tests/tools-buildbot-triggerable-tests.js:
(then):
- 2:28 PM Changeset in webkit [207491] by
-
- 5 edits in trunk/Source/JavaScriptCore
Add JSC option to show time spent in each optimization phase
https://bugs.webkit.org/show_bug.cgi?id=163617
Reviewed by Saam Barati.
Added reportDFGPhaseTimes option. This outputs one line per phase similar to
Phase CPS rethreading took 0.2661 ms
One line is output for each phase run.
- dfg/DFGPhase.h:
(JSC::DFG::runAndLog):
- dfg/DFGPlan.cpp:
(JSC::DFG::Plan::compileInThread):
- runtime/Options.cpp:
(JSC::recomputeDependentOptions):
- runtime/Options.h:
- 2:26 PM Changeset in webkit [207490] by
-
- 2 edits in trunk/Source/WebCore
Fix Windows build.
- css/parser/CSSPropertyParser.cpp:
(WebCore::CSSPropertyParser::parseSingleValue):
- 2:07 PM Changeset in webkit [207489] by
-
- 2 edits in trunk/Source/WebInspectorUI
Web Inspector: Styles Sidebar highlights "translate" but not "translateX"
https://bugs.webkit.org/show_bug.cgi?id=163613
<rdar://problem/28829610>
Patch by Joseph Pecoraro <Joseph Pecoraro> on 2016-10-18
Reviewed by Timothy Hatcher.
- UserInterface/Models/CSSCompletions.js:
(WebInspector.CSSCompletions.requestCSSCompletions):
The hash table objects we pass to CodeMirror expects keys to be lowercased.
- 2:03 PM Changeset in webkit [207488] by
-
- 2 edits in trunk/Source/WebCore
Modern media controls don't update their rendering correctly
https://bugs.webkit.org/show_bug.cgi?id=163603
<rdar://problem/28826022>
Patch by Antoine Quint <Antoine Quint> on 2016-10-18
Reviewed by Dean Jackson.
There are rendering issues when we use an absolutely-positioned element
as the top-most element in a media element's shadow root (webkit.org/b/163592).
Since we only need for that element to be positioned, we can use "position: relative"
instead, which removes the rendering issues.
- Modules/modern-media-controls/controls/media-controls.css:
(.media-controls):
(.media-controls,): Deleted.
- 1:55 PM Changeset in webkit [207487] by
-
- 5 edits in trunk/Source/WebCore
Add preliminary support for extended colors to WebCore::Color
https://bugs.webkit.org/show_bug.cgi?id=162878
<rdar://problem/28596413>
Follow-up review comments from Darin Adler.
- html/canvas/CanvasGradient.cpp:
(WebCore::CanvasGradient::addColorStop): Use nullptr.
- platform/graphics/Color.cpp:
(WebCore::Color::Color): Explicitly zero before assigning the pointer.
- platform/graphics/Color.h: Add some comments about the failings of operator== and hash.
(WebCore::Color::Color): Add some static_asserts to the constructors. Move the empty and deleted values
to static constants.
(WebCore::Color::isHashTableDeletedValue):
(WebCore::Color::hash): Replacement for asUint64, which was only being used for a hash.
(WebCore::Color::asUint64): Deleted.
- platform/graphics/ColorHash.h: Use new hash functions. Use "using" instead of typedef.
(WTF::ColorHash::hash):
- 1:40 PM Changeset in webkit [207486] by
-
- 4 edits2 adds in trunk
REGRESSION (r201471): Keyboard remains visible when swiping back on twitter.com
https://bugs.webkit.org/show_bug.cgi?id=163581
<rdar://problem/27739558>
Reviewed by Simon Fraser.
Source/WebCore:
The bug was caused by Chrome::elementDidBlur not getting called, which resulted in
StopAssistingNode not getting sent to the UI process.
Test: fast/forms/ios/hide-keyboard-on-node-removal.html
- dom/Document.cpp:
(WebCore::Document::setFocusedElement): Restore the behavior prior to r201471 by calling
Chrome::elementDidBlur explicitly.
- html/HTMLTextFormControlElement.cpp:
(WebCore::HTMLTextFormControlElement::dispatchBlurEvent): Added a comment about ordering.
LayoutTests:
Added a regression test for hiding a keyboard when the focused element is removed from the DOM.
- fast/forms/ios/hide-keyboard-on-node-removal-expected.txt: Added.
- fast/forms/ios/hide-keyboard-on-node-removal.html: Added.
- 1:36 PM Changeset in webkit [207485] by
-
- 2 edits in trunk/LayoutTests
Marking media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-buttons-styles.html as flaky on mac-wk1.
https://bugs.webkit.org/show_bug.cgi?id=163598
Unreviewed test gardening.
- platform/mac-wk1/TestExpectations:
- 1:31 PM Changeset in webkit [207484] by
-
- 6 edits1 delete in trunk
Unreviewed, rolling out r207443.
https://bugs.webkit.org/show_bug.cgi?id=163616
"Caused 5% PLT regression" (Requested by krollin on #webkit).
Reverted changeset:
"Crash in ASCIICaseInsensitiveHash::hash() when a response has
a null MIME type"
https://bugs.webkit.org/show_bug.cgi?id=163476
http://trac.webkit.org/changeset/207443
- 1:30 PM Changeset in webkit [207483] by
-
- 4 edits in trunk/Source/WebKit/mac
Showing and hiding candidates list is very distracting after selecting word
https://bugs.webkit.org/show_bug.cgi?id=163609
<rdar://problem/28747712>
Reviewed by Tim Horton.
Introduce WebView hooks for mousedown and mouseup. See radar for more details.
- WebView/WebHTMLView.mm:
(-[WebHTMLView mouseDown:mouseDown:]):
(-[WebHTMLView mouseUp:mouseUp:]):
- WebView/WebView.mm:
(-[WebView prepareForMouseDown]):
(-[WebView prepareForMouseUp]):
- WebView/WebViewInternal.h:
- 1:22 PM Changeset in webkit [207482] by
-
- 13 edits in trunk/Source
Move some history specific HistoryItem code to WebHistoryItem
https://bugs.webkit.org/show_bug.cgi?id=163567
Reviewed by Tim Horton.
Source/WebCore:
- history/HistoryItem.cpp:
(WebCore::HistoryItem::addRedirectURL): Deleted.
(WebCore::HistoryItem::redirectURLs): Deleted.
(WebCore::HistoryItem::setRedirectURLs): Deleted.
- history/HistoryItem.h:
Source/WebKit/mac:
- History/HistoryPropertyList.mm:
(HistoryPropertyListWriter::writeHistoryItem):
- History/WebHistory.mm:
(-[WebHistory _visitedURL:withTitle:method:wasFailure:]):
- History/WebHistoryItem.mm:
(-[WebHistoryItem initFromDictionaryRepresentation:]):
- History/WebHistoryItemInternal.h:
- WebCoreSupport/WebFrameLoaderClient.mm:
(addRedirectURL):
(WebFrameLoaderClient::updateGlobalHistoryRedirectLinks):
Source/WebKit/win:
Remove these, they aren't used.
- WebCoreSupport/WebFrameLoaderClient.cpp:
(WebFrameLoaderClient::updateGlobalHistoryRedirectLinks):
- WebHistory.cpp:
(WebHistory::visitedURL):
- WebHistoryItem.cpp:
(WebHistoryItem::initFromDictionaryRepresentation):
(WebHistoryItem::dictionaryRepresentation):
- 1:21 PM Changeset in webkit [207481] by
-
- 2 edits in trunk/Source/WebInspectorUI
Web Inspector: CSS Autocompletion sometimes adds extra unexpected characters
https://bugs.webkit.org/show_bug.cgi?id=163612
<rdar://problem/28829557>
Patch by Joseph Pecoraro <Joseph Pecoraro> on 2016-10-18
Reviewed by Timothy Hatcher.
- UserInterface/Controllers/CodeMirrorCompletionController.js:
(WebInspector.CodeMirrorCompletionController.prototype._generateCSSCompletions):
Better handle completions in cases where we are in the middle of a property
to avoid orphaned characters, or at the end of a function name to avoid creating
duplicate parenthesis.
- 1:17 PM Changeset in webkit [207480] by
-
- 7 edits2 adds in trunk/Source
WTF should make it easier to create threads that die automatically after inactivity
https://bugs.webkit.org/show_bug.cgi?id=163576
Reviewed by Andreas Kling.
Source/JavaScriptCore:
Added a sleepSeconds() function, which made it easier for me to test this change.
The WTF changes in this patch change how the JSC GC manages threads: the GC threads will now
shut down automatically after 1 second of inactivity. Maybe this will save some memory.
- jsc.cpp:
(GlobalObject::finishCreation):
(functionSleepSeconds):
Source/WTF:
For a long time now, I've been adding threads to WTF/JSC and each time I do this, I feel
guilty because those threads don't shut down when they are inactive. For example, in bug
163562, I need to add a new GC thread. There will be one of them per VM. This means that a
JSC API client that starts a lot of VMs will have a lot of threads. I don't think that's
good.
A common pattern for all of these threads is that they have some well-defined trigger that
causes them to run. This trigger has a lock, a condition variable, some logic that determines
if there is work to do, and then of course the logic for the thread's actual work. The thread
bodies usually look like this:
void Thingy::runThread()
{
for (;;) {
Work work;
{
LockHolder locker(m_lock);
while (!hasWork())
m_cond.wait(m_lock);
work = takeWork();
}
doWork(work);
}
}
If you look at ParallelHelperPool (the GC's threads) and DFG::Worklist (some of the JIT's
threads), you will see this pattern.
This change adds a new kind of thread, called AutomaticThread, that lets you write threads to
this pattern while getting automatic thread shutdown for free: instead of just waiting on a
condition variable, AutomaticThread will have a timeout that causes the thread to die. The
condition variable associated with AutomaticThread, called AutomaticThreadCondition, is smart
enough to restart any threads that have decided to stop due to inactivity. The inactivity
threshold is current just 1 second.
In this patch I only adopt AutomaticThread for ParallelHelperPool. I plan to adopt it in more
places soon.
- WTF.xcodeproj/project.pbxproj:
- wtf/AutomaticThread.cpp: Added.
(WTF::AutomaticThreadCondition::create):
(WTF::AutomaticThreadCondition::AutomaticThreadCondition):
(WTF::AutomaticThreadCondition::~AutomaticThreadCondition):
(WTF::AutomaticThreadCondition::notifyAll):
(WTF::AutomaticThreadCondition::add):
(WTF::AutomaticThreadCondition::remove):
(WTF::AutomaticThreadCondition::contains):
(WTF::AutomaticThread::AutomaticThread):
(WTF::AutomaticThread::~AutomaticThread):
(WTF::AutomaticThread::join):
(WTF::AutomaticThread::start):
- wtf/AutomaticThread.h: Added.
- wtf/CMakeLists.txt:
- wtf/ParallelHelperPool.cpp:
(WTF::ParallelHelperClient::ParallelHelperClient):
(WTF::ParallelHelperClient::~ParallelHelperClient):
(WTF::ParallelHelperClient::setTask):
(WTF::ParallelHelperClient::finish):
(WTF::ParallelHelperClient::doSomeHelping):
(WTF::ParallelHelperClient::runTask):
(WTF::ParallelHelperPool::ParallelHelperPool):
(WTF::ParallelHelperPool::~ParallelHelperPool):
(WTF::ParallelHelperPool::ensureThreads):
(WTF::ParallelHelperPool::doSomeHelping):
(WTF::ParallelHelperPool::Thread::Thread):
(WTF::ParallelHelperPool::didMakeWorkAvailable):
(WTF::ParallelHelperPool::helperThreadBody): Deleted.
(WTF::ParallelHelperPool::waitForClientWithTask): Deleted.
- wtf/ParallelHelperPool.h:
- 1:03 PM Changeset in webkit [207479] by
-
- 18 edits2 adds in trunk/Source/WebCore
[CSS Parser] Get all the properties turned on
https://bugs.webkit.org/show_bug.cgi?id=163605
Reviewed by Dean Jackson.
- WebCore.xcodeproj/project.pbxproj:
- css/CSSFunctionValue.h:
- css/CSSPendingSubstitutionValue.cpp: Added.
(WebCore::CSSPendingSubstitutionValue::customCSSText):
- css/CSSPendingSubstitutionValue.h: Added.
(WebCore::CSSPendingSubstitutionValue::create):
(WebCore::CSSPendingSubstitutionValue::shorthandValue):
(WebCore::CSSPendingSubstitutionValue::shorthandPropertyId):
(WebCore::CSSPendingSubstitutionValue::equals):
(WebCore::CSSPendingSubstitutionValue::CSSPendingSubstitutionValue):
- css/CSSValue.cpp:
(WebCore::CSSValue::cssText):
(WebCore::CSSValue::destroy):
- css/CSSValue.h:
(WebCore::CSSValue::isPendingSubstitutionValue):
- css/CSSValueKeywords.in:
- css/StylePropertyShorthand.cpp:
(WebCore::transitionShorthandForParsing):
- css/StylePropertyShorthand.h:
- css/parser/CSSParser.cpp:
(WebCore::CSSParser::completeURL):
- css/parser/CSSParserImpl.cpp:
(WebCore::CSSParserImpl::parseValue):
(WebCore::CSSParserImpl::consumeDeclaration):
(WebCore::CSSParserImpl::consumeDeclarationValue):
- css/parser/CSSParserMode.h:
(WebCore::CSSParserContext::completeURL):
- css/parser/CSSParserToken.cpp:
(WebCore::CSSParserToken::parseAsCSSPropertyID):
(WebCore::CSSParserToken::parseAsUnresolvedCSSPropertyID): Deleted.
- css/parser/CSSParserToken.h:
- css/parser/CSSPropertyParser.cpp:
(WebCore::cssPropertyID):
(WebCore::CSSPropertyParser::addProperty):
(WebCore::CSSPropertyParser::addExpandedPropertyForValue):
(WebCore::CSSPropertyParser::parseValue):
(WebCore::CSSPropertyParser::parseSingleValue):
(WebCore::CSSPropertyParser::parseValueStart):
(WebCore::CSSPropertyParser::consumeCSSWideKeyword):
(WebCore::consumeTransformOrigin):
(WebCore::consumeWillChange):
(WebCore::consumeFontFeatureTag):
(WebCore::consumeFontFeatureSettings):
(WebCore::consumePage):
(WebCore::consumeQuotes):
(WebCore::FontVariantLigaturesParser::consumeLigature):
(WebCore::FontVariantLigaturesParser::finalizeValue):
(WebCore::consumeFontVariantLigatures):
(WebCore::consumeFontVariantCaps):
(WebCore::FontVariantNumericParser::consumeNumeric):
(WebCore::FontVariantNumericParser::finalizeValue):
(WebCore::consumeFontVariantNumeric):
(WebCore::consumeFontVariantCSS21):
(WebCore::consumeFontVariantList):
(WebCore::consumeFontWeight):
(WebCore::consumeFamilyName):
(WebCore::consumeGenericFamily):
(WebCore::consumeFontFamily):
(WebCore::consumeSpacing):
(WebCore::consumeTabSize):
(WebCore::consumeTextSizeAdjust):
(WebCore::consumeFontSize):
(WebCore::consumeLineHeight):
(WebCore::createPrimitiveValuePair):
(WebCore::consumeCounter):
(WebCore::consumePageSize):
(WebCore::consumeSize):
(WebCore::consumeTextIndent):
(WebCore::validWidthOrHeightKeyword):
(WebCore::consumeMaxWidthOrHeight):
(WebCore::consumeWidthOrHeight):
(WebCore::consumeMarginOrOffset):
(WebCore::consumeClipComponent):
(WebCore::consumeClip):
(WebCore::consumeTouchAction):
(WebCore::consumeLineClamp):
(WebCore::consumeLocale):
(WebCore::consumeColumnWidth):
(WebCore::consumeColumnCount):
(WebCore::consumeColumnGap):
(WebCore::consumeColumnSpan):
(WebCore::consumeZoom):
(WebCore::consumeAnimationIterationCount):
(WebCore::consumeAnimationName):
(WebCore::consumeTransitionProperty):
(WebCore::consumeCubicBezier):
(WebCore::consumeAnimationTimingFunction):
(WebCore::consumeAnimationValue):
(WebCore::isValidAnimationPropertyList):
(WebCore::consumeAnimationPropertyList):
(WebCore::CSSPropertyParser::consumeAnimationShorthand):
(WebCore::consumeZIndex):
(WebCore::parseSingleShadow):
(WebCore::consumeShadow):
(WebCore::consumeFilterFunction):
(WebCore::consumeFilter):
(WebCore::consumeTextDecorationLine):
(WebCore::consumeTextEmphasisStyle):
(WebCore::consumeOutlineColor):
(WebCore::consumeLineWidth):
(WebCore::consumeBorderWidth):
(WebCore::consumeTextStrokeWidth):
(WebCore::consumeColumnRuleWidth):
(WebCore::consumeTranslate3d):
(WebCore::consumeNumbers):
(WebCore::consumePerspective):
(WebCore::consumeTransformValue):
(WebCore::consumeTransform):
(WebCore::consumePositionLonghand):
(WebCore::consumePositionX):
(WebCore::consumePositionY):
(WebCore::consumePaintStroke):
(WebCore::consumePaintOrder):
(WebCore::consumeNoneOrURI):
(WebCore::consumeFlexBasis):
(WebCore::consumeStrokeDasharray):
(WebCore::consumeBaselineShift):
(WebCore::consumeRxOrRy):
(WebCore::consumeCursor):
(WebCore::consumeAttr):
(WebCore::consumeCounterContent):
(WebCore::consumeContent):
(WebCore::consumePositionList):
(WebCore::consumeScrollSnapCoordinate):
(WebCore::consumeScrollSnapPoints):
(WebCore::consumeBorderRadiusCorner):
(WebCore::consumeVerticalAlign):
(WebCore::consumeShapeRadius):
(WebCore::consumeBasicShapeCircle):
(WebCore::consumeBasicShapeEllipse):
(WebCore::consumeBasicShapePolygon):
(WebCore::complete4Sides):
(WebCore::consumeRadii):
(WebCore::consumeBasicShapeInset):
(WebCore::consumeBasicShape):
(WebCore::consumeWebkitClipPath):
(WebCore::consumeShapeOutside):
(WebCore::consumeContentDistributionOverflowPosition):
(WebCore::consumeBorderImageRepeatKeyword):
(WebCore::consumeBorderImageRepeat):
(WebCore::consumeBorderImageSlice):
(WebCore::consumeBorderImageOutset):
(WebCore::consumeBorderImageWidth):
(WebCore::consumeBorderImageComponents):
(WebCore::consumeWebkitBorderImage):
(WebCore::consumeReflect):
(WebCore::consumeImageOrientation):
(WebCore::consumeBackgroundBlendMode):
(WebCore::consumeBackgroundAttachment):
(WebCore::consumeBackgroundBox):
(WebCore::consumeBackgroundComposite):
(WebCore::consumePrefixedBackgroundBox):
(WebCore::consumeBackgroundSize):
(WebCore::consumeGridAutoFlow):
(WebCore::consumeBackgroundComponent):
(WebCore::addBackgroundValue):
(WebCore::consumeCommaSeparatedBackgroundComponent):
(WebCore::consumeSelfPositionKeyword):
(WebCore::consumeSelfPositionOverflowPosition):
(WebCore::consumeAlignItems):
(WebCore::consumeJustifyItems):
(WebCore::consumeFitContent):
(WebCore::consumeCustomIdentForGridLine):
(WebCore::consumeGridLine):
(WebCore::isGridTrackFixedSized):
(WebCore::consumeGridBreadth):
(WebCore::consumeGridTrackSize):
(WebCore::consumeGridLineNames):
(WebCore::consumeGridTrackRepeatFunction):
(WebCore::consumeGridTrackList):
(WebCore::consumeGridTemplatesRowsOrColumns):
(WebCore::consumeGridTemplateAreas):
(WebCore::consumeFontFaceUnicodeRange):
(WebCore::consumeFontFaceSrcURI):
(WebCore::consumeFontFaceSrcLocal):
(WebCore::consumeFontFaceSrc):
(WebCore::CSSPropertyParser::parseFontFaceDescriptor):
(WebCore::CSSPropertyParser::consumeSystemFont):
(WebCore::CSSPropertyParser::consumeFont):
(WebCore::CSSPropertyParser::consumeFontVariantShorthand):
(WebCore::CSSPropertyParser::consumeBorderSpacing):
(WebCore::consumeSingleViewportDescriptor):
(WebCore::CSSPropertyParser::parseViewportDescriptor):
(WebCore::consumeColumnWidthOrCount):
(WebCore::CSSPropertyParser::consumeColumns):
(WebCore::CSSPropertyParser::consumeShorthandGreedily):
(WebCore::CSSPropertyParser::consumeFlex):
(WebCore::CSSPropertyParser::consumeBorder):
(WebCore::CSSPropertyParser::consume4Values):
(WebCore::CSSPropertyParser::consumeBorderImage):
(WebCore::CSSPropertyParser::consumeLegacyBreakProperty):
(WebCore::consumeBackgroundPosition):
(WebCore::consumeRepeatStyleComponent):
(WebCore::consumeRepeatStyle):
(WebCore::CSSPropertyParser::consumeBackgroundShorthand):
(WebCore::CSSPropertyParser::consumeGridItemPositionShorthand):
(WebCore::CSSPropertyParser::consumeGridAreaShorthand):
(WebCore::CSSPropertyParser::consumeGridTemplateRowsAndAreasAndColumns):
(WebCore::CSSPropertyParser::consumeGridTemplateShorthand):
(WebCore::CSSPropertyParser::consumeGridShorthand):
(WebCore::CSSPropertyParser::parseShorthand):
(WebCore::unresolvedCSSPropertyID): Deleted.
- css/parser/CSSPropertyParser.h:
- css/parser/CSSPropertyParserHelpers.cpp:
(WebCore::CSSPropertyParserHelpers::consumeIdent):
(WebCore::CSSPropertyParserHelpers::consumeCustomIdent):
(WebCore::CSSPropertyParserHelpers::consumeString):
(WebCore::CSSPropertyParserHelpers::consumeImageSet):
- css/parser/CSSPropertyParserHelpers.h:
- 12:22 PM Changeset in webkit [207478] by
-
- 2 edits in trunk/Source/WebKit2
Fix build for platforms where HAVE(LINK_PREVIEW) is false
https://bugs.webkit.org/show_bug.cgi?id=163607
Patch by Megan Gardner <Megan Gardner> on 2016-10-18
Reviewed by Tim Horton.
Added needed # for link preview
- UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView _contentsOfUserInterfaceItem:]):
- 12:19 PM Changeset in webkit [207477] by
-
- 2 edits in trunk/Source/WebCore
Correct Document::removeAllEventListeners
https://bugs.webkit.org/show_bug.cgi?id=163558
<rdar://problem/28716840>
Reviewed by Chris Dumez.
Tested by fast/dom/node-move-to-new-document-crash-main.html.
- dom/Document.cpp:
(WebCore::Document::removeAllEventListeners): Clear out the wheel and
touch event targets when clearing all data.
- 12:03 PM Changeset in webkit [207476] by
-
- 3 edits in trunk/Source/JavaScriptCore
Cleanup Wasm memory.
https://bugs.webkit.org/show_bug.cgi?id=163601
Reviewed by Saam Barati.
There were a couple of issues with the original Wasm memory patch.
This is a follow-up patch to fix those issues.
- wasm/WASMMemory.cpp:
(JSC::WASM::Memory::Memory):
- wasm/WASMMemory.h:
- 11:30 AM Changeset in webkit [207475] by
-
- 46 edits8 adds in trunk
DFG and FTL should be able to use DirectCall ICs when they proved the callee or its executable
https://bugs.webkit.org/show_bug.cgi?id=163371
Reviewed by Geoffrey Garen and Saam Barati.
JSTests:
Add microbenchmarks for all of the cases that this patch optimizes.
- microbenchmarks/direct-call-arity-mismatch.js: Added.
(foo):
(bar):
- microbenchmarks/direct-call.js: Added.
(foo):
(bar):
- microbenchmarks/direct-construct-arity-mismatch.js: Added.
(Foo):
(bar):
- microbenchmarks/direct-construct.js: Added.
(Foo):
(bar):
- microbenchmarks/direct-tail-call-arity-mismatch.js: Added.
(foo):
(bar):
- microbenchmarks/direct-tail-call-inlined-caller-arity-mismatch.js: Added.
(foo):
(bar):
(baz):
- microbenchmarks/direct-tail-call-inlined-caller.js: Added.
(foo):
(bar):
(baz):
- microbenchmarks/direct-tail-call.js: Added.
(foo):
(bar):
Source/JavaScriptCore:
This adds a new kind of call inline cache for when the DFG can prove what the callee
executable is. In those cases, we can skip some of the things that the traditional call IC
would do:
- No need to check who the callee is.
- No need to do arity checks.
This case isn't as simple as just emitting a call instruction since the callee may not be
compiled at the time that the caller is compiled. So, we need lazy resolution. Also, the
callee may be jettisoned independently of the caller, so we need to be able to revert the
call to an unlinked state. This means that we need almost all of the things that
CallLinkInfo has. CallLinkInfo already knows about different kinds of calls. This patch
teaches it about new "Direct" call types.
The direct non-tail call IC looks like this:
set up arguments
FastPath:
call _SlowPath
lea -FrameSize(%rbp), %rsp
SlowPath:
pop
call operationLinkDirectCall
check exception
jmp FastPath
The job of operationLinkDirectCall is to link the fast path's call entrypoint of the callee.
This means that in steady state, a call is just that: a call. There are no extra branches or
checks.
The direct tail call IC is a bit more complicated because the act of setting up arguments
destroys our frame, which would prevent us from being able to throw an exception if we
failed to compile the callee. So, direct tail call ICs look like this:
jmp _SlowPath
FastPath:
set up arguments
jmp 0 patch to jump to callee
SlowPath:
silent spill
call operationLinkDirectCall
silent fill
check exception
jmp FastPath
The jmp to the slow path is patched to be a fall-through jmp when we link the call.
Direct calls mean less code at call sites, fewer checks on the steady state call fast path,
and no need for arity fixup. This looks like a slight speed-up (~0.8%) on both Octane and
AsmBench.
- assembler/ARM64Assembler.h:
(JSC::ARM64Assembler::relinkJumpToNop):
- assembler/ARMv7Assembler.h:
(JSC::ARMv7Assembler::relinkJumpToNop):
(JSC::ARMv7Assembler::relinkJump): Deleted.
- assembler/AbstractMacroAssembler.h:
(JSC::AbstractMacroAssembler::repatchJumpToNop):
(JSC::AbstractMacroAssembler::repatchJump): Deleted.
- assembler/X86Assembler.h:
(JSC::X86Assembler::relinkJumpToNop):
- bytecode/CallLinkInfo.cpp:
(JSC::CallLinkInfo::CallLinkInfo):
(JSC::CallLinkInfo::callReturnLocation):
(JSC::CallLinkInfo::patchableJump):
(JSC::CallLinkInfo::hotPathBegin):
(JSC::CallLinkInfo::slowPathStart):
(JSC::CallLinkInfo::setCallee):
(JSC::CallLinkInfo::clearCallee):
(JSC::CallLinkInfo::callee):
(JSC::CallLinkInfo::setCodeBlock):
(JSC::CallLinkInfo::clearCodeBlock):
(JSC::CallLinkInfo::codeBlock):
(JSC::CallLinkInfo::setLastSeenCallee):
(JSC::CallLinkInfo::clearLastSeenCallee):
(JSC::CallLinkInfo::lastSeenCallee):
(JSC::CallLinkInfo::haveLastSeenCallee):
(JSC::CallLinkInfo::setExecutableDuringCompilation):
(JSC::CallLinkInfo::executable):
(JSC::CallLinkInfo::setMaxNumArguments):
(JSC::CallLinkInfo::visitWeak):
- bytecode/CallLinkInfo.h:
(JSC::CallLinkInfo::specializationKindFor):
(JSC::CallLinkInfo::callModeFor):
(JSC::CallLinkInfo::isDirect):
(JSC::CallLinkInfo::nearCallMode):
(JSC::CallLinkInfo::isLinked):
(JSC::CallLinkInfo::setCallLocations):
(JSC::CallLinkInfo::addressOfMaxNumArguments):
(JSC::CallLinkInfo::maxNumArguments):
(JSC::CallLinkInfo::isTailCall): Deleted.
(JSC::CallLinkInfo::setUpCallFromFTL): Deleted.
(JSC::CallLinkInfo::callReturnLocation): Deleted.
(JSC::CallLinkInfo::hotPathBegin): Deleted.
(JSC::CallLinkInfo::callee): Deleted.
(JSC::CallLinkInfo::setLastSeenCallee): Deleted.
(JSC::CallLinkInfo::clearLastSeenCallee): Deleted.
(JSC::CallLinkInfo::lastSeenCallee): Deleted.
(JSC::CallLinkInfo::haveLastSeenCallee): Deleted.
- bytecode/CallLinkStatus.cpp:
(JSC::CallLinkStatus::computeDFGStatuses):
- bytecode/PolymorphicAccess.cpp:
(JSC::AccessCase::generateImpl):
- bytecode/UnlinkedFunctionExecutable.h:
- bytecode/ValueRecovery.h:
(JSC::ValueRecovery::forEachReg):
- dfg/DFGAbstractInterpreterInlines.h:
(JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):
- dfg/DFGBasicBlock.h:
(JSC::DFG::BasicBlock::findTerminal):
- dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::addCallWithoutSettingResult):
(JSC::DFG::ByteCodeParser::handleCall):
- dfg/DFGClobberize.h:
(JSC::DFG::clobberize):
- dfg/DFGDoesGC.cpp:
(JSC::DFG::doesGC):
- dfg/DFGFixupPhase.cpp:
(JSC::DFG::FixupPhase::fixupNode):
- dfg/DFGGraph.cpp:
(JSC::DFG::Graph::parameterSlotsForArgCount):
- dfg/DFGGraph.h:
- dfg/DFGInPlaceAbstractState.cpp:
(JSC::DFG::InPlaceAbstractState::mergeToSuccessors):
- dfg/DFGJITCompiler.cpp:
(JSC::DFG::JITCompiler::link):
- dfg/DFGJITCompiler.h:
(JSC::DFG::JITCompiler::addJSDirectCall):
(JSC::DFG::JITCompiler::addJSDirectTailCall):
(JSC::DFG::JITCompiler::JSCallRecord::JSCallRecord):
(JSC::DFG::JITCompiler::JSDirectCallRecord::JSDirectCallRecord):
(JSC::DFG::JITCompiler::JSDirectTailCallRecord::JSDirectTailCallRecord):
(JSC::DFG::JITCompiler::currentJSCallIndex): Deleted.
- dfg/DFGNode.cpp:
(JSC::DFG::Node::convertToDirectCall):
- dfg/DFGNode.h:
(JSC::DFG::Node::isTerminal):
(JSC::DFG::Node::hasHeapPrediction):
(JSC::DFG::Node::hasCellOperand):
- dfg/DFGNodeType.h:
- dfg/DFGPredictionPropagationPhase.cpp:
- dfg/DFGSafeToExecute.h:
(JSC::DFG::safeToExecute):
- dfg/DFGSpeculativeJIT.h:
(JSC::DFG::SpeculativeJIT::callOperation):
- dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::emitCall):
(JSC::DFG::SpeculativeJIT::compile):
- dfg/DFGStrengthReductionPhase.cpp:
(JSC::DFG::StrengthReductionPhase::handleNode):
- ftl/FTLCapabilities.cpp:
(JSC::FTL::canCompile):
- ftl/FTLLowerDFGToB3.cpp:
(JSC::FTL::DFG::LowerDFGToB3::compileNode):
(JSC::FTL::DFG::LowerDFGToB3::compileCallOrConstruct):
(JSC::FTL::DFG::LowerDFGToB3::compileDirectCallOrConstruct):
(JSC::FTL::DFG::LowerDFGToB3::compileTailCall):
(JSC::FTL::DFG::LowerDFGToB3::compileCallOrConstructVarargs):
- interpreter/Interpreter.cpp:
(JSC::Interpreter::execute):
(JSC::Interpreter::executeCall):
(JSC::Interpreter::executeConstruct):
(JSC::Interpreter::prepareForRepeatCall):
- jit/JIT.cpp:
(JSC::JIT::link):
- jit/JITCall.cpp:
(JSC::JIT::compileSetupVarargsFrame):
- jit/JITCall32_64.cpp:
(JSC::JIT::compileSetupVarargsFrame):
- jit/JITOperations.cpp:
- jit/JITOperations.h:
- jit/Repatch.cpp:
(JSC::linkDirectFor):
(JSC::revertCall):
- jit/Repatch.h:
- llint/LLIntSlowPaths.cpp:
(JSC::LLInt::setUpCall):
- runtime/Executable.cpp:
(JSC::ScriptExecutable::prepareForExecutionImpl):
- runtime/Executable.h:
(JSC::ScriptExecutable::prepareForExecution):
- runtime/Options.h:
- 11:23 AM Changeset in webkit [207474] by
-
- 2 edits in trunk/Source/WebCore
Remove dependency cycle with UIKit
https://bugs.webkit.org/show_bug.cgi?id=163577
<rdar://problem/28786160>
Reviewed by Tim Horton.
Soft link against UIKit. Followup patch because
I screwed up and forgot to edit the simulator
configuration.
- Configurations/WebCoreTestSupport.xcconfig:
- 11:08 AM Changeset in webkit [207473] by
-
- 2 edits in trunk/Source/WebInspectorUI
REGRESSION(r201171): Web Inspector: Timeline Recording playhead should always start immediately, not wait until first event
https://bugs.webkit.org/show_bug.cgi?id=163583
<rdar://problem/28815882>
Patch by Joseph Pecoraro <Joseph Pecoraro> on 2016-10-18
Reviewed by Timothy Hatcher.
- UserInterface/Views/TimelineRecordingContentView.js:
(WebInspector.TimelineRecordingContentView.prototype._startUpdatingCurrentTime):
Revert logic change introduced by r201171 with no explanation.
Whenever we get a start time we should use it, regardless of
of what the current time is, precisely because the backend is
informing us of the start time to use.
- 10:43 AM Changeset in webkit [207472] by
-
- 2 edits in trunk/LayoutTests
Add flaky expectation for tiled-drawing/scrolling/latched-div-with-scroll-snap.html that was errantly removed.
Unreviewed test gardening.
- platform/mac-wk2/TestExpectations:
- 10:41 AM Changeset in webkit [207471] by
-
- 7 edits2 adds in trunk
SVGCSSParser: m_implicitShorthand value is not reset after adding the shorthand property
https://bugs.webkit.org/show_bug.cgi?id=116470
Reviewed by Simon Fraser.
Source/WebCore:
When we encounter a shorthand css property, we set m_implicitShorthand
to true to tell addProperty() later that the individual properties are
all set through a short hand one. We need to make sure that setting
m_implicitShorthand to true will not be leaked after finishing parsing
the short hand property.
Test: fast/css/implicit-property-restore.html
- css/parser/CSSParser.cpp:
(WebCore::CSSParser::parseValue):
(WebCore::CSSParser::parseFillShorthand):
(WebCore::CSSParser::parseShorthand):
(WebCore::CSSParser::parse4Values):
(WebCore::CSSParser::parseBorderRadius):
(WTF::ImplicitScope::ImplicitScope): Deleted.
(WTF::ImplicitScope::~ImplicitScope): Deleted.
Get rid of ImplicitScope and replace its calls by TemporaryChange<bool>.
- css/parser/SVGCSSParser.cpp:
(WebCore::CSSParser::parseSVGValue):
Restore m_implicitShorthand value after setting it temporarily to true.
Source/WTF:
- wtf/TemporaryChange.h:
(WTF::TemporaryChange::TemporaryChange):
Add a new constructor to make TemporaryChange work as a restorer. The
temporary change will happen after we construct the object.
LayoutTests:
- fast/css/implicit-property-restore-expected.txt: Added.
- fast/css/implicit-property-restore.html: Added.
- fast/css/remove-shorthand-expected.txt:
Rebase-line the test expected results because of fixing the leak of
m_implicitShorthand. The bug was happening because "background: ..." property
comes immediately before the "list-style: ...." property.
- 10:39 AM Changeset in webkit [207470] by
-
- 2 edits in trunk/LayoutTests
Marking inspector/debugger/breakpoint-action-eval.html as a flaky timeout on mac-wk2.
https://bugs.webkit.org/show_bug.cgi?id=163604
Unreviewed test gardening.
- platform/mac-wk2/TestExpectations:
- 10:28 AM Changeset in webkit [207469] by
-
- 2 edits in trunk/LayoutTests
Marking scroll-restoration-fragment-scrolling-cross-origin.html as flaky on mac-wk1.
https://bugs.webkit.org/show_bug.cgi?id=161360
Unreviewed test gardening.
- platform/mac-wk1/TestExpectations:
- 10:13 AM Changeset in webkit [207468] by
-
- 10 edits in trunk
Update TrackEvent to stop using legacy [ConstructorTemplate=Event]
https://bugs.webkit.org/show_bug.cgi?id=163580
Reviewed by Sam Weinig.
LayoutTests/imported/w3c:
Incorporate https://github.com/w3c/web-platform-tests/pull/3999 as the
test was incorrect. Rebaseline now that we are passing the test.
- web-platform-tests/html/semantics/embedded-content/media-elements/interfaces/TrackEvent/constructor-expected.txt:
- web-platform-tests/html/semantics/embedded-content/media-elements/interfaces/TrackEvent/constructor.html:
Source/WebCore:
Update TrackEvent to stop using legacy [ConstructorTemplate=Event]
and use a regular constructor as in the specification:
No new tests, updated existing tests.
- html/track/TrackEvent.cpp:
(WebCore::TrackEvent::TrackEvent):
- html/track/TrackEvent.h:
- html/track/TrackEvent.idl:
LayoutTests:
Update existing test to reflect behavior change. We now correctly throw a TypeError
when passing an unexpected track object type to the TrackEvent constructor.
- fast/events/constructors/track-event-constructor-expected.txt:
- fast/events/constructors/track-event-constructor.html:
- 10:10 AM Changeset in webkit [207467] by
-
- 3 edits in trunk/Source/WebCore
Unreviewed, rolling out r207409.
https://bugs.webkit.org/show_bug.cgi?id=163602
Introduced many test failures and timeouts, causing release
bot to exit early (Requested by mcatanzaro on #webkit).
Reverted changeset:
"[GTK] Several tests crashing on debug bot in (anonymous
namespace)::MediaPlayerPrivateGStreamerBase::repaint"
https://bugs.webkit.org/show_bug.cgi?id=163511
http://trac.webkit.org/changeset/207409
- 10:07 AM Changeset in webkit [207466] by
-
- 2 edits in trunk/Source/WebKit2
Remote Web Inspector: Timeline UI not updating while recording
https://bugs.webkit.org/show_bug.cgi?id=163582
<rdar://problem/28766837>
Patch by Joseph Pecoraro <Joseph Pecoraro> on 2016-10-18
Reviewed by Timothy Hatcher.
- WebProcess/WebPage/RemoteWebInspectorUI.cpp:
(WebKit::RemoteWebInspectorUI::frontendLoaded):
Local inspector windows keep the web view alive and toggle the
WebInspector.visible state depending on whether or not an inspector is
open. Remote Inspector windows go away when closed, so they can always
be marked as open. This matches earlier remote inspector behavior.
- 9:26 AM Changeset in webkit [207465] by
-
- 2 edits in trunk/Source/JavaScriptCore
[DOMJIT] Not emit exception case if it is not necessary
https://bugs.webkit.org/show_bug.cgi?id=163589
Reviewed by Sam Weinig.
We should not emit exception case if we do not use the slow path calls.
For example, nodeType accessor does not use the slow path calls.
- bytecode/PolymorphicAccess.cpp:
(JSC::AccessCase::emitDOMJITGetter):
- 8:09 AM Changeset in webkit [207464] by
-
- 2 edits in trunk/LayoutTests
Rebase test in fast/mediastream
[GTK] Test gardening after r206956
https://bugs.webkit.org/show_bug.cgi?id=163596
Unreviewed.
- fast/mediastream/RTCPeerConnection-add-removeTrack-expected.txt:
- 7:53 AM Changeset in webkit [207463] by
-
- 54 edits2 adds3 deletes in trunk
Source/WebCore:
[MediaStream] Resolve constraints and enumerate devices in the UI process
https://bugs.webkit.org/show_bug.cgi?id=162147
<rdar://problem/28803569>
Reviewed by Darin Adler.
Restructure gUM constraint validation and MediaDevices.enumerateDevices so all media device
access happens in the UI process.
No new tests, updated results of existing tests.
- CMakeLists.txt: Add MediaDevicesEnumerationRequest.cpp, delete UserMediaPermissionCheck.cpp.
- Modules/mediastream/MediaConstraintsImpl.cpp:
(WebCore::MediaConstraintsImpl::create): Only create from MediaConstraintsData.
(WebCore::MediaConstraintsImpl::initialize): Deleted.
- Modules/mediastream/MediaConstraintsImpl.h:
- Modules/mediastream/MediaDevicesEnumerationRequest.cpp: Added.
(WebCore::MediaDevicesEnumerationRequest::create):
(WebCore::MediaDevicesEnumerationRequest::MediaDevicesEnumerationRequest):
(WebCore::MediaDevicesEnumerationRequest::~MediaDevicesEnumerationRequest):
(WebCore::MediaDevicesEnumerationRequest::userMediaDocumentOrigin):
(WebCore::MediaDevicesEnumerationRequest::topLevelDocumentOrigin):
(WebCore::MediaDevicesEnumerationRequest::contextDestroyed):
(WebCore::MediaDevicesEnumerationRequest::start):
(WebCore::MediaDevicesEnumerationRequest::cancel):
(WebCore::MediaDevicesEnumerationRequest::setDeviceInfo):
(WebCore::MediaDevicesEnumerationRequest::finish):
- Modules/mediastream/MediaDevicesEnumerationRequest.h: Added.
- Modules/mediastream/MediaDevicesRequest.cpp:
(WebCore::MediaDevicesRequest::~MediaDevicesRequest): Clear the enumeration request.
(WebCore::MediaDevicesRequest::contextDestroyed): Ditto.
(WebCore::MediaDevicesRequest::start): Create and use a MediaDevicesEnumerationRequest.
(WebCore::MediaDevicesRequest::didCompletePermissionCheck): Deleted.
- Modules/mediastream/MediaDevicesRequest.h:
- Modules/mediastream/UserMediaClient.h:
- Modules/mediastream/UserMediaController.h:
(WebCore::UserMediaController::enumerateMediaDevices): New.
(WebCore::UserMediaController::cancelMediaDevicesEnumerationRequest): New.
(WebCore::UserMediaController::checkUserMediaPermission): Deleted.
(WebCore::UserMediaController::cancelUserMediaPermissionCheck): Deleted.
- Modules/mediastream/UserMediaPermissionCheck.h: Deleted.
- Modules/mediastream/UserMediaPermissionCheck.cpp: Deleted.
- Modules/mediastream/UserMediaRequest.cpp:
(WebCore::UserMediaRequest::UserMediaRequest):
(WebCore::UserMediaRequest::start):
(WebCore::UserMediaRequest::allow):
(WebCore::UserMediaRequest::deny):
(WebCore::UserMediaRequest::constraintsValidated): Deleted.
(WebCore::UserMediaRequest::userMediaAccessGranted): Deleted.
(WebCore::UserMediaRequest::userMediaAccessDenied): Deleted.
(WebCore::UserMediaRequest::constraintsInvalid): Deleted.
(WebCore::UserMediaRequest::didCreateStream): Deleted.
(WebCore::UserMediaRequest::failedToCreateStreamWithConstraintsError): Deleted.
(WebCore::UserMediaRequest::failedToCreateStreamWithPermissionError): Deleted.
- Modules/mediastream/UserMediaRequest.h:
- WebCore.xcodeproj/project.pbxproj: Add MediaDevicesEnumerationRequest.*.
- platform/mediastream/CaptureDevice.h:
(WebCore::CaptureDevice::CaptureDevice):
(WebCore::CaptureDevice::setPersistentId): Add setter for argument decoder.
(WebCore::CaptureDevice::setLabel): Ditto.
(WebCore::CaptureDevice::setGroupId): Ditto.
(WebCore::CaptureDevice::setKind): Ditto.
- platform/mediastream/CaptureDeviceManager.h: Remove unnecessary include.
- platform/mediastream/MediaConstraints.h:
(WebCore::MediaConstraint::encode): New.
(WebCore::MediaConstraint::decode): Ditto.
(WebCore::NumericConstraint::encode): Ditto.
(WebCore::NumericConstraint::decode): Ditto.
- platform/mediastream/MediaStreamCreationClient.h: Deleted.
- platform/mediastream/RealtimeMediaSourceCenter.h: Use completion handlers instead of client interface.
- platform/mediastream/mac/AVCaptureDeviceManager.mm:
(WebCore::AVCaptureDeviceManager::refreshCaptureDeviceList): Drive-by fix: don't initialize
group id, we don't support it.
- platform/mediastream/mac/RealtimeMediaSourceCenterMac.cpp:
(WebCore::RealtimeMediaSourceCenterMac::validateRequestConstraints): Update for interface change.
(WebCore::RealtimeMediaSourceCenterMac::createMediaStream): Ditto.
- platform/mediastream/mac/RealtimeMediaSourceCenterMac.h:
- platform/mediastream/openwebrtc/RealtimeMediaSourceCenterOwr.cpp:
(WebCore::RealtimeMediaSourceCenterOwr::validateRequestConstraints): Ditto.
(WebCore::RealtimeMediaSourceCenterOwr::createMediaStream): Ditto.
(WebCore::RealtimeMediaSourceCenterOwr::mediaSourcesAvailable): Ditto.
- platform/mediastream/openwebrtc/RealtimeMediaSourceCenterOwr.h:
- platform/mock/MockRealtimeMediaSourceCenter.cpp:
(WebCore::MockRealtimeMediaSourceCenter::validateRequestConstraints): Ditto.
(WebCore::MockRealtimeMediaSourceCenter::createMediaStream): Ditto.
- platform/mock/MockRealtimeMediaSourceCenter.h:
Source/WebKit:
Fix CMake build.
Patch by Alex Christensen <achristensen@webkit.org> on 2016-10-14
- PlatformMac.cmake:
Source/WebKit2:
[MediaStream] Resolve constraints and enumerate devices in the UI process
https://bugs.webkit.org/show_bug.cgi?id=162147
<rdar://problem/28803569>
Reviewed by Darin Adler.
Restructure gUM constraint validation and MediaDevices.enumerateDevices so all media device
access happens in the UI process.
- Scripts/webkit/messages.py:
(headers_for_type): Special case MediaConstraintsData.
- Shared/WebCoreArgumentCoders.cpp:
(IPC::encodeMediaTrackConstraintSetMap): MediaTrackConstraintSetMap encoder.
(IPC::ArgumentCoder<MediaConstraintsData>::encode): MediaConstraintsData encoder.
(IPC::decodeMediaTrackConstraintSetMap): MediaTrackConstraintSetMap decoder.
(IPC::ArgumentCoder<MediaConstraintsData>::decode): MediaConstraintsData decoder.
(IPC::ArgumentCoder<CaptureDevice>::encode): CaptureDevice enoder.
(IPC::ArgumentCoder<CaptureDevice>::decode): CaptureDevice decoder.
- Shared/WebCoreArgumentCoders.h:
- UIProcess/API/APIUIClient.h: Remove UserMediaPermissionCheckProxy forward declaration.
- UIProcess/API/C/WKUserMediaPermissionRequest.cpp:
(toWK): Translate UserMediaPermissionRequestDenialReason to UserMediaAccessDenialReason.
(WKUserMediaPermissionRequestDeny): Add "reason" parameter.
- UIProcess/API/C/WKUserMediaPermissionRequest.h:
- UIProcess/UserMediaPermissionRequestManagerProxy.cpp:
(WebKit::UserMediaPermissionRequestManagerProxy::invalidateRequests): Invalidate pending device requests.
(WebKit::UserMediaPermissionRequestManagerProxy::createRequest): Make private.
(WebKit::toWebCore): Map from UserMediaAccessDenialReason to MediaAccessDenialReason, cast to
uint64_t to pass to web process.
(WebKit::UserMediaPermissionRequestManagerProxy::denyRequest): Send to web process.
(WebKit::UserMediaPermissionRequestManagerProxy::userMediaAccessWasGranted): Ditto.
(WebKit::UserMediaPermissionRequestManagerProxy::requestUserMediaPermissionForFrame): Validate
constraints and make sure gUM is enabled before prompting user.
(WebKit::UserMediaPermissionRequestManagerProxy::enumerateMediaDevicesForFrame): New.
(WebKit::UserMediaPermissionRequestManagerProxy::didCompleteUserMediaPermissionCheck): Send
results of device enumeration to web process.
(WebKit::UserMediaPermissionRequestManagerProxy::didReceiveUserMediaPermissionDecision): Deleted.
(WebKit::UserMediaPermissionRequestManagerProxy::createUserMediaPermissionCheck): Deleted.
- UIProcess/UserMediaPermissionRequestManagerProxy.h:
- UIProcess/UserMediaPermissionRequestProxy.cpp:
(WebKit::UserMediaPermissionRequestProxy::allow):
(WebKit::UserMediaPermissionRequestProxy::deny): Take "reason" parameter.
- UIProcess/UserMediaPermissionRequestProxy.h:
- UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::requestUserMediaPermissionForFrame):
(WebKit::WebPageProxy::enumerateMediaDevicesForFrame):
(WebKit::WebPageProxy::checkUserMediaPermissionForFrame): Deleted.
- UIProcess/WebPageProxy.h:
- UIProcess/WebPageProxy.messages.in:
- WebProcess/MediaStream/UserMediaPermissionRequestManager.cpp:
(WebKit::UserMediaPermissionRequestManager::startUserMediaRequest): userMediaAccessDenied -> deny.
Pass the audio and video constraints to the UI process.
(WebKit::UserMediaPermissionRequestManager::userMediaAccessWasGranted):
(WebKit::UserMediaPermissionRequestManager::userMediaAccessWasDenied):
(WebKit::UserMediaPermissionRequestManager::enumerateMediaDevices): Send the enumeration request
to the UI process.
(WebKit::UserMediaPermissionRequestManager::cancelMediaDevicesEnumeration):
(WebKit::UserMediaPermissionRequestManager::didCompleteMediaDeviceEnumeration):
(WebKit::UserMediaPermissionRequestManager::didReceiveUserMediaPermissionDecision): Deleted.
(WebKit::UserMediaPermissionRequestManager::startUserMediaPermissionCheck): Deleted.
(WebKit::UserMediaPermissionRequestManager::cancelUserMediaPermissionCheck): Deleted.
(WebKit::UserMediaPermissionRequestManager::didCompleteUserMediaPermissionCheck): Deleted.
- WebProcess/MediaStream/UserMediaPermissionRequestManager.h:
- WebProcess/WebCoreSupport/WebUserMediaClient.cpp:
(WebKit::WebUserMediaClient::enumerateMediaDevices): New.
(WebKit::WebUserMediaClient::cancelMediaDevicesEnumerationRequest): New.
(WebKit::WebUserMediaClient::checkUserMediaPermission): Deleted.
(WebKit::WebUserMediaClient::cancelUserMediaPermissionCheck): Deleted.
- WebProcess/WebCoreSupport/WebUserMediaClient.h:
- WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::userMediaAccessWasGranted): New.
(WebKit::WebPage::userMediaAccessWasDenied): Ditto.
(WebKit::WebPage::didCompleteMediaDeviceEnumeration):
(WebKit::WebPage::didReceiveUserMediaPermissionDecision): Deleted.
(WebKit::WebPage::didCompleteUserMediaPermissionCheck): Deleted.
- WebProcess/WebPage/WebPage.h:
- WebProcess/WebPage/WebPage.messages.in:
Tools:
[MediaStream] Resolve constraints and enumerate devices in the UI process
https://bugs.webkit.org/show_bug.cgi?id=162147
<rdar://problem/28803569>
Reviewed by Darin Adler.
- WebKitTestRunner/TestController.cpp:
(WTR::TestController::resetPreferencesToConsistentValues): Enable mock capture devices.
(WTR::TestController::decidePolicyForUserMediaPermissionRequestIfPossible): Update for API changes.
LayoutTests:
[MediaStream] Resolve constraints and enumerate devices in the UI process
https://bugs.webkit.org/show_bug.cgi?id=162147
<rdar://problem/28803569>
Reviewed by Darin Adler.
- fast/mediastream/getusermedia-expected.txt: Updated.
- fast/mediastream/getusermedia.html: Ditto.
- fast/mediastream/mock-media-source-expected.txt: Ditto.
- 6:15 AM Changeset in webkit [207462] by
-
- 11 edits1 add in trunk/Source/WebCore
[WebIDL] Support BufferSource
https://bugs.webkit.org/show_bug.cgi?id=163541
Reviewed by Youenn Fablet.
Add support for the BufferSource typedef in WebIDL. The implementation
adds the necessary handling for this type in the generator scripts and
the specialization of the Converter<> template for the IDLBufferSource
struct that enables exposing ArrayBuffer or ArrayBufferView objects by
having WebCore::BufferSource objects pointing to their data.
The SourceBuffer interface in the MSE module has the appendBuffer()
operation modified to accept a BufferSource parameter, instead of
overloading it for ArrayBuffer and ArrayBufferView parameters.
The bindings generator tests cover BufferSource as both an operation
parameter and as a dictionary member.
- Modules/mediasource/SourceBuffer.cpp:
(WebCore::SourceBuffer::appendBuffer):
(WebCore::SourceBuffer::appendBufferInternal):
- Modules/mediasource/SourceBuffer.h:
- Modules/mediasource/SourceBuffer.idl:
- WebCore.xcodeproj/project.pbxproj:
- bindings/generic/IDLTypes.h:
- bindings/js/BufferSource.h: Added.
- bindings/js/JSDOMConvert.h:
(WebCore::Converter<IDLBufferSource>::convert):
- bindings/scripts/CodeGenerator.pm:
(SkipIncludeHeader):
(IsWrapperType):
- bindings/scripts/CodeGeneratorJS.pm:
(AddClassForwardIfNeeded):
(GetBaseIDLType):
(IsHandledByDOMConvert):
- bindings/scripts/test/JS/JSTestObj.cpp:
(WebCore::convertDictionary<TestObj::Dictionary>):
(WebCore::jsTestObjPrototypeFunctionBufferSourceParameter):
(WebCore::jsTestObjPrototypeFunctionBufferSourceParameterCaller):
- bindings/scripts/test/TestObj.idl:
- 5:51 AM Changeset in webkit [207461] by
-
- 19 edits in trunk
[JSC] ES6 Method functions should not have prototype
https://bugs.webkit.org/show_bug.cgi?id=162530
Reviewed by Saam Barati.
JSTests:
Fix test262 expectations about MethodDefinitions
- ChakraCore/test/strict/05.arguments_sm.baseline-jsc:
- stress/reflect-set.js:
- test262.yaml:
Source/JavaScriptCore:
ECMA-262 only adds "prototype" properties to specific syntactic function forms.
Specific items which do not contain "prototype" include (most) built-in functions (such as Math.pow),
MethodDefinitions which are not either class "constructor" methods or GeneratorMethods, AsyncFunctions,
and ArrowFunctions.
For details, see the following spec text, and the difference between GeneratorMethod evaluation and
the evaluation of other MethodDefinition forms.
- https://tc39.github.io/ecma262/#sec-method-definitions-runtime-semantics-propertydefinitionevaluation
- https://tc39.github.io/ecma262/#sec-arrow-function-definitions-runtime-semantics-evaluation
- https://tc39.github.io/ecmascript-asyncawait/#async-function-instances
- https://tc39.github.io/ecma262/#sec-generator-function-definitions-runtime-semantics-propertydefinitionevaluation
- runtime/Executable.h:
- runtime/JSFunction.cpp:
(JSC::JSFunction::callerGetter):
(JSC::JSFunction::getOwnPropertySlot):
(JSC::JSFunction::deleteProperty):
- bytecompiler/BytecodeGenerator.h:
(JSC::BytecodeGenerator::makeFunction):
- runtime/Executable.h:
- runtime/JSFunction.cpp:
(JSC::JSFunction::getOwnPropertySlot):
(JSC::JSFunction::getOwnNonIndexPropertyNames):
(JSC::JSFunction::put):
(JSC::JSFunction::deleteProperty):
(JSC::JSFunction::defineOwnProperty):
- runtime/JSGlobalObjectFunctions.cpp:
(JSC::globalFuncThrowTypeErrorArgumentsCalleeAndCaller):
LayoutTests:
Update expected error message to no longer indicate "strict mode"
(which is not always true), and add additional tests for the presence
of "caller" and "arguments" on accessor MethodDefinitions.
- js/basic-strict-mode-expected.txt:
- js/caller-property-expected.txt:
- js/class-syntax-method-names-expected.txt:
- js/es6-function-properties-expected.txt:
- js/non-strict-function-properties-expected.txt:
- js/script-tests/caller-property.js:
- js/script-tests/class-syntax-method-names.js:
- js/script-tests/es6-function-properties.js:
(k.get getter):
(k.set setter):
(get checkProperties):
- js/script-tests/non-strict-function-properties.js:
- 5:33 AM Changeset in webkit [207460] by
-
- 5 edits2 adds in trunk
[css-grid] Different width of grid container between initial load and refresh
https://bugs.webkit.org/show_bug.cgi?id=163535
Reviewed by Manuel Rego Casasnovas.
Source/WebCore:
Grid's layout logic manages two different override sizes; one it's
designed to implement the grid item's stretching behavior, identified
with the concept of 'overrideContentLogicalSize'; there is another
override size, known as overrideContainingBlockContentLogicalSize,
used to implement the Grid Area abstraction, which will behave as
the actual containing block of any grid item.
During grid's layout logic these override sizes are set according
to the CSS style rules. This affects how the grid container and its
children are going to be sized during layout. Grid Tracks sizing
algorithm depends on these override sizes.
In order to ensure that the tracks sizing algorithm produces the
same results when it's run consecutively several times, we need to
clear these override sizes and perform a layout of the affected grid
items. Otherwise, the affected items will return sizing values which
depend on the override values set in the previous layout, which in
some cases, like orthogonal flows, may change through different runs
of the sizing algorithm.
Test: fast/css-grid-layout/repeating-layout-must-produce-the-same-results.html
- rendering/RenderGrid.cpp:
(WebCore::RenderGrid::layoutBlock):
LayoutTests:
Tests to ensure repeated layouts on grid elements produce the same results when using
orthogonal grid items.
- fast/css-grid-layout/repeating-layout-must-produce-the-same-results-expected.txt: Added.
- fast/css-grid-layout/repeating-layout-must-produce-the-same-results.html: Added.
- 5:30 AM Changeset in webkit [207459] by
-
- 8 edits in trunk/Source/WebCore
CachedResourceLoader should not need to remove fragment identifier
https://bugs.webkit.org/show_bug.cgi?id=163015
Patch by Youenn Fablet <youenn@apple.com> on 2016-10-18
Reviewed by Darin Adler.
No expected change for non-window port.
For window port, CachedResourceLoader will strip the fragment identifier of the URL passed to subresourceForURL
before querying the memory cache.
Removing the fragment identifier from the request stored in CachedResourceRequest.
The fragment identifier is stored in a separate field.
This allows CachedResourceLoader to not care about fragment identifier.
CachedResource can then get access to it.
- loader/cache/CachedResource.cpp:
(WebCore::CachedResource::CachedResource):
(WebCore::CachedResource::finishRequestInitialization): Deleted.
- loader/cache/CachedResource.h:
- loader/cache/CachedResourceLoader.cpp:
(WebCore::CachedResourceLoader::cachedResource):
Updated the method taking a const String& to strip the fragment identifier if needed.
Updated the method taking a const URL& to assert if the fragment identifier is present.
(WebCore::CachedResourceLoader::requestUserCSSStyleSheet):
(WebCore::CachedResourceLoader::requestResource):
- loader/cache/CachedResourceRequest.cpp:
(WebCore::CachedResourceRequest::CachedResourceRequest):
(WebCore::CachedResourceRequest::splitFragmentIdentifierFromRequestURL):
- loader/cache/CachedResourceRequest.h:
(WebCore::CachedResourceRequest::releaseFragmentIdentifier):
(WebCore::CachedResourceRequest::clearFragmentIdentifier):
- loader/cache/MemoryCache.cpp:
(WebCore::MemoryCache::shouldRemoveFragmentIdentifier):
(WebCore::MemoryCache::removeFragmentIdentifierIfNeeded):
(WebCore::MemoryCache::revalidationSucceeded):
(WebCore::MemoryCache::resourceForRequest):
- loader/cache/MemoryCache.h:
- 5:28 AM Changeset in webkit [207458] by
-
- 72 edits1 add in trunk/Source
Rename setNeedsStyleRecalc to invalidateStyle
https://bugs.webkit.org/show_bug.cgi?id=163542
Reviewed by Darin Adler.
Source/WebCore:
Also rename StyleChangeType enum and some related functions for clarity. For example
element.setNeedsStyleRecalc(SyntheticStyleChange);
becomes
element.invalidateStyleAndLayerComposition();
- WebCore.xcodeproj/project.pbxproj:
- css/StyleInvalidationAnalysis.cpp:
(WebCore::StyleInvalidationAnalysis::invalidateIfNeeded):
- dom/Document.cpp:
(WebCore::Document::recalcStyle):
(WebCore::Document::updateViewportUnitsOnResize):
(WebCore::Document::setCSSTarget):
(WebCore::unwrapFullScreenRenderer):
(WebCore::Document::setAnimatingFullScreen):
- dom/Element.cpp:
(WebCore::Element::setActive):
(WebCore::Element::setFocus):
(WebCore::Element::setHovered):
(WebCore::Element::attributeChanged):
(WebCore::Element::invalidateStyle):
(WebCore::Element::invalidateStyleAndLayerComposition):
(WebCore::Element::invalidateStyleForSubtree):
(WebCore::Element::invalidateStyleAndRenderersForSubtree):
Move public invalidation functions to Element tightening typing.
Use separate functions instead of enum values.
This way the call sites look nicer and only useful combinations are exposed.
(WebCore::Element::addShadowRoot):
(WebCore::checkForEmptyStyleChange):
(WebCore::checkForSiblingStyleChanges):
(WebCore::Element::needsStyleInvalidation):
(WebCore::Element::setContainsFullScreenElement):
- dom/Element.h:
(WebCore::Element::setHasFocusWithin):
- dom/Node.cpp:
(WebCore::computeEditabilityFromComputedStyle):
(WebCore::Node::adjustStyleValidity):
Update validity and mode separately. There was a potential bug here where
SyntheticStyleChange could overwrite FullStyleChange (no known repro).
(WebCore::Node::updateAncestorsForStyleRecalc):
(WebCore::Node::invalidateStyle):
(WebCore::Node::insertedInto):
(WebCore::Node::setNeedsStyleRecalc): Deleted.
- dom/Node.h:
(WebCore::Node::needsStyleRecalc):
(WebCore::Node::styleValidity):
(WebCore::Node::styleResolutionShouldRecompositeLayer):
(WebCore::Node::setHasValidStyle):
(WebCore::Node::styleChangeType): Deleted.
(WebCore::Node::clearNeedsStyleRecalc): Deleted.
(WebCore::Node::setStyleChange): Deleted.
- dom/RadioButtonGroups.cpp:
(WebCore::RadioButtonGroup::remove):
(WebCore::RadioButtonGroup::setNeedsStyleRecalcForAllButtons):
- dom/ShadowRoot.cpp:
(WebCore::ShadowRoot::setResetStyleInheritance):
- dom/SlotAssignment.cpp:
(WebCore::SlotAssignment::addSlotElementByName):
(WebCore::SlotAssignment::removeSlotElementByName):
(WebCore::SlotAssignment::didChangeSlot):
- dom/StyledElement.cpp:
(WebCore::StyledElement::attributeChanged):
(WebCore::StyledElement::styleAttributeChanged):
(WebCore::StyledElement::invalidateStyleAttribute):
- dom/Text.cpp:
(WebCore::Text::updateRendererAfterContentChange):
- dom/VisitedLinkState.cpp:
(WebCore::VisitedLinkState::invalidateStyleForAllLinks):
(WebCore::VisitedLinkState::invalidateStyleForLink):
- editing/FrameSelection.cpp:
(WebCore::FrameSelection::focusedOrActiveStateChanged):
- html/BaseDateAndTimeInputType.cpp:
(WebCore::BaseDateAndTimeInputType::minOrMaxAttributeChanged):
- html/FileInputType.cpp:
(WebCore::FileInputType::setValue):
- html/HTMLAnchorElement.cpp:
(WebCore::HTMLAnchorElement::parseAttribute):
- html/HTMLBodyElement.cpp:
(WebCore::HTMLBodyElement::parseAttribute):
- html/HTMLCanvasElement.cpp:
(WebCore::HTMLCanvasElement::getContext):
(WebCore::HTMLCanvasElement::createImageBuffer):
- html/HTMLElement.cpp:
(WebCore::HTMLElement::adjustDirectionalityIfNeededAfterChildAttributeChanged):
(WebCore::HTMLElement::calculateAndAdjustDirectionality):
- html/HTMLFieldSetElement.cpp:
(WebCore::HTMLFieldSetElement::addInvalidDescendant):
(WebCore::HTMLFieldSetElement::removeInvalidDescendant):
- html/HTMLFormControlElement.cpp:
(WebCore::HTMLFormControlElement::disabledStateChanged):
(WebCore::HTMLFormControlElement::readOnlyAttributeChanged):
(WebCore::HTMLFormControlElement::requiredAttributeChanged):
(WebCore::HTMLFormControlElement::setNeedsWillValidateCheck):
(WebCore::HTMLFormControlElement::updateValidity):
- html/HTMLFormElement.cpp:
(WebCore::HTMLFormElement::registerFormElement):
(WebCore::HTMLFormElement::registerInvalidAssociatedFormControl):
(WebCore::HTMLFormElement::removeInvalidAssociatedFormControlIfNeeded):
(WebCore::HTMLFormElement::resetDefaultButton):
- html/HTMLFrameElementBase.cpp:
(WebCore::HTMLFrameElementBase::finishedInsertingSubtree):
- html/HTMLFrameOwnerElement.cpp:
(WebCore::HTMLFrameOwnerElement::scheduleinvalidateStyleAndLayerComposition):
(WebCore::HTMLFrameOwnerElement::scheduleSetNeedsStyleRecalc): Deleted.
- html/HTMLFrameOwnerElement.h:
- html/HTMLFrameSetElement.cpp:
(WebCore::HTMLFrameSetElement::parseAttribute):
(WebCore::HTMLFrameSetElement::willRecalcStyle):
- html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::runPostTypeUpdateTasks):
(WebCore::HTMLInputElement::parseAttribute):
(WebCore::HTMLInputElement::setChecked):
(WebCore::HTMLInputElement::setIndeterminate):
(WebCore::HTMLInputElement::setAutoFilled):
(WebCore::HTMLInputElement::maxLengthAttributeChanged):
(WebCore::HTMLInputElement::minLengthAttributeChanged):
- html/HTMLLinkElement.cpp:
(WebCore::HTMLLinkElement::parseAttribute):
- html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::mediaPlayerRenderingModeChanged):
(WebCore::HTMLMediaElement::setVideoFullscreenLayer):
- html/HTMLObjectElement.cpp:
(WebCore::HTMLObjectElement::parseAttribute):
(WebCore::HTMLObjectElement::childrenChanged):
(WebCore::HTMLObjectElement::renderFallbackContent):
- html/HTMLOptGroupElement.cpp:
(WebCore::HTMLOptGroupElement::parseAttribute):
- html/HTMLOptionElement.cpp:
(WebCore::HTMLOptionElement::parseAttribute):
(WebCore::HTMLOptionElement::setSelectedState):
- html/HTMLPlugInElement.cpp:
(WebCore::HTMLPlugInElement::didAddUserAgentShadowRoot):
- html/HTMLPlugInImageElement.cpp:
(WebCore::HTMLPlugInImageElement::setDisplayState):
(WebCore::HTMLPlugInImageElement::willRecalcStyle):
(WebCore::HTMLPlugInImageElement::finishParsingChildren):
(WebCore::HTMLPlugInImageElement::resumeFromDocumentSuspension):
(WebCore::HTMLPlugInImageElement::removeSnapshotTimerFired):
(WebCore::HTMLPlugInImageElement::restartSnapshottedPlugIn):
- html/HTMLProgressElement.cpp:
(WebCore::HTMLProgressElement::didElementStateChange):
- html/HTMLSelectElement.cpp:
(WebCore::HTMLSelectElement::parseAttribute):
(WebCore::HTMLSelectElement::setRecalcListItems):
(WebCore::HTMLSelectElement::parseMultipleAttribute):
(WebCore::HTMLSelectElement::reset):
- html/HTMLTableElement.cpp:
(WebCore::isTableCellAncestor):
(WebCore::setTableCellsChanged):
(WebCore::HTMLTableElement::parseAttribute):
- html/HTMLTextAreaElement.cpp:
(WebCore::HTMLTextAreaElement::setValueCommon):
- html/HTMLTextFormControlElement.cpp:
(WebCore::HTMLTextFormControlElement::updatePlaceholderVisibility):
- html/InputType.cpp:
(WebCore::InputType::setValue):
- html/NumberInputType.cpp:
(WebCore::NumberInputType::minOrMaxAttributeChanged):
- html/TextFieldInputType.cpp:
(WebCore::TextFieldInputType::subtreeHasChanged):
- mathml/MathMLElement.cpp:
(WebCore::MathMLElement::parseAttribute):
- mathml/MathMLSelectElement.cpp:
(WebCore::MathMLSelectElement::updateSelectedChild):
- page/animation/AnimationBase.cpp:
(WebCore::AnimationBase::setNeedsStyleRecalc):
- page/animation/AnimationController.cpp:
(WebCore::AnimationControllerPrivate::clear):
(WebCore::AnimationControllerPrivate::updateAnimations):
(WebCore::AnimationControllerPrivate::fireEventsAndUpdateStyle):
(WebCore::AnimationControllerPrivate::pauseAnimationAtTime):
(WebCore::AnimationControllerPrivate::pauseTransitionAtTime):
(WebCore::AnimationController::cancelAnimations):
- rendering/RenderImage.cpp:
(WebCore::RenderImage::imageChanged):
- rendering/RenderLayer.cpp:
(WebCore::RenderLayer::calculateClipRects):
- rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::attachRootLayer):
(WebCore::RenderLayerCompositor::detachRootLayer):
(WebCore::RenderLayerCompositor::notifyIFramesOfCompositingChange):
- rendering/RenderObject.cpp:
(WebCore::RenderObject::updateDragState):
- rendering/svg/SVGResourcesCache.cpp:
(WebCore::SVGResourcesCache::clientStyleChanged):
- style/AttributeChangeInvalidation.cpp:
(WebCore::Style::AttributeChangeInvalidation::invalidateStyle):
- style/ClassChangeInvalidation.cpp:
(WebCore::Style::ClassChangeInvalidation::invalidateStyle):
- style/IdChangeInvalidation.cpp:
(WebCore::Style::IdChangeInvalidation::invalidateStyle):
- style/RenderTreeUpdater.cpp:
(WebCore::RenderTreeUpdater::updateElementRenderer):
- style/StyleScope.cpp:
(WebCore::Style::Scope::updateActiveStyleSheets):
- style/StyleTreeResolver.cpp:
(WebCore::Style::resetStyleForNonRenderedDescendants):
(WebCore::Style::TreeResolver::resolveElement):
(WebCore::Style::TreeResolver::createAnimatedElementUpdate):
(WebCore::Style::TreeResolver::popParent):
(WebCore::Style::clearNeedsStyleResolution):
(WebCore::Style::TreeResolver::resolveComposedTree):
- style/StyleUpdate.h:
- style/StyleValidity.h: Added.
StyleChangeType enum splits into Style::Validity and Style::InvalidationMode.
Move to a file of its own.
- svg/SVGAElement.cpp:
(WebCore::SVGAElement::svgAttributeChanged):
- svg/SVGAnimateElementBase.cpp:
(WebCore::applyCSSPropertyToTarget):
(WebCore::removeCSSPropertyFromTarget):
- svg/SVGElement.cpp:
(WebCore::SVGElement::willRecalcStyle):
- svg/SVGElement.h:
(WebCore::SVGElement::invalidateSVGPresentationAttributeStyle):
- svg/SVGTests.cpp:
(WebCore::SVGTests::handleAttributeChange):
- svg/SVGUseElement.cpp:
(WebCore::SVGUseElement::invalidateShadowTree):
- testing/Internals.cpp:
(WebCore::styleValidityToToString):
(WebCore::Internals::styleChangeType):
(WebCore::styleChangeTypeToString): Deleted.
Source/WebKit/mac:
- Plugins/Hosted/WebHostedNetscapePluginView.mm:
(-[WebHostedNetscapePluginView createPluginLayer]):
- Plugins/WebNetscapePluginView.mm:
(-[WebNetscapePluginView createPlugin]):
Source/WebKit2:
- WebProcess/Plugins/PluginView.cpp:
(WebKit::PluginView::didInitializePlugin):
(WebKit::PluginView::pluginProcessCrashed):
- 2:21 AM Changeset in webkit [207457] by
-
- 7 edits in trunk
[css-grid] Constrain by min|max-height on auto repeat computation
https://bugs.webkit.org/show_bug.cgi?id=163540
Reviewed by Darin Adler.
Source/WebCore:
The max-height (if definite) is used to compute the number of auto repeat rows whenever the
height is indefinite. We were using the min-height only in case both values were indefinite.
Although not explicitly mentioned by grid specs, it's reasonable to assume that
the min-height trumps the used value of height/max-height like it always does, per CSS
2.2. Note that the number of rows still needs to fit within that size even if using
min-height, because we're just using min-height to compute the used value of the height
property. If both height and max-height are indefinite we keep doing the same, i.e., compute
the minimum number of rows that fulfill min-height (if definite).
- rendering/RenderGrid.cpp:
(WebCore::RenderGrid::computeAutoRepeatTracksCount):
LayoutTests:
Some new test cases to verify that min-height is used on the auto repeat tracks computation
whenever the height is indefinite and max-height is not.
- fast/css-grid-layout/grid-auto-fill-rows-expected.txt:
- fast/css-grid-layout/grid-auto-fill-rows.html:
- fast/css-grid-layout/grid-indefinite-size-auto-repeat-crash-expected.txt:
- fast/css-grid-layout/grid-indefinite-size-auto-repeat-crash.html:
- 1:13 AM Changeset in webkit [207456] by
-
- 9 edits1 copy1 add in trunk/Source
[DOMJIT] Use NativeCallFrameTracer for operations used for DOMJIT slow calls
https://bugs.webkit.org/show_bug.cgi?id=163586
Reviewed by Saam Barati.
Source/JavaScriptCore:
C functions called from the DOMJIT slow path calls should use NativeCallFrameTracer.
This fixes the debug assertion caused in r207427.
- bytecode/DOMJITAccessCasePatchpointParams.cpp:
(JSC::SlowPathCallGeneratorWithArguments::generateImpl):
(JSC::DOMJITAccessCasePatchpointParams::emitSlowPathCalls):
- bytecode/DOMJITAccessCasePatchpointParams.h:
- bytecode/PolymorphicAccess.cpp:
(JSC::AccessCase::emitDOMJITGetter):
- jsc.cpp:
(WTF::DOMJITGetter::DOMJITNodeDOMJIT::slowCall):
(WTF::DOMJITGetterComplex::DOMJITNodeDOMJIT::slowCall):
Source/WebCore:
- domjit/JSNodeDOMJIT.cpp:
(WebCore::toWrapperSlow):
- 12:11 AM Changeset in webkit [207455] by
-
- 2 edits in trunk/Source/WebCore
[EFL] Build break since r207442
https://bugs.webkit.org/show_bug.cgi?id=163587
Unreviewed.
Since r207442, setRGB is moved to private.
- rendering/RenderThemeEfl.cpp:
(WebCore::fillColorsFromEdjeClass):
Oct 17, 2016:
- 11:03 PM Changeset in webkit [207454] by
-
- 4 edits in trunk/Source/WebKit2
NetworkSession: PendingDownload is leaked if canceled before willDecidePendingDownloadDestination
https://bugs.webkit.org/show_bug.cgi?id=163545
Reviewed by Alex Christensen.
If a download started by DownloadManager::startDownload() is cancelled before
DownloadManager::willDecidePendingDownloadDestination() is called, DownloadManager::cancelDownload() does
nothing, because the Download hasn't been created yet and m_downloadsWaitingForDestination map doesn't contain
the download ID, and the PendingDownload is never removed from the m_pendingDownloads map.
- NetworkProcess/Downloads/DownloadManager.cpp:
(WebKit::DownloadManager::cancelDownload): Always take the PendingDownload from m_pendingDownloads map. Then, if
the download was already in m_downloadsWaitingForDestination map, get the network data task to properly cancel
it and then call the completion handler to ignore the request. Otherwise cancel the pending download if exists.
- NetworkProcess/Downloads/PendingDownload.cpp:
(WebKit::PendingDownload::cancel): Cancel the network load and notify the UI process that the download was canceled.
- NetworkProcess/Downloads/PendingDownload.h:
- 7:02 PM Changeset in webkit [207453] by
-
- 18 edits2 adds in trunk
Add support for WASM Memory.
https://bugs.webkit.org/show_bug.cgi?id=161710
Reviewed by Geoffrey Garen.
JSTests:
Add store and load opcodes to wasm.json. Additionally, add new
enums for those opcodes in the generator.
- stress/wasm/generate-wasmops-header.js:
(const.template.pragma.once.ENABLE.WEBASSEMBLY.include.cstdint.namespace.JSC.namespace.WASM.enum.LoadOpType):
(const.template.pragma.once.ENABLE.WEBASSEMBLY.include.cstdint.namespace.JSC.namespace.WASM.enum.StoreOpType):
Source/JavaScriptCore:
This patch add initial support for WASM memory operations. First,
it adds the concept of a WASM Module memory management object.
This object currently mmaps a 32-bit address space for WASM use,
although it marks all the memory outside the current breakpoint as
PROT_NONE. For now, we do a range check on each store and load. In
the future, we should change this to be an signal handler that
checks what module the program trapped in.
Additionally, this patch changes the way that our temporary tests
call into WASM code. There is now a true "thunk" that relocates
arguments and calls into WASM. This thunk does not tail call
because we use pinned values to memory base-pointer and
size. We use the new B3 pinned register api to pin the values.
- CMakeLists.txt:
- Configurations/ToolExecutable.xcconfig:
- JavaScriptCore.xcodeproj/project.pbxproj:
- testWASM.cpp:
(runWASMTests):
(main):
- wasm/WASMB3IRGenerator.cpp:
(JSC::WASM::createJSWrapper):
(JSC::WASM::parseAndCompile):
- wasm/WASMB3IRGenerator.h:
- wasm/WASMCallingConvention.h:
(JSC::WASM::CallingConvention::iterate):
(JSC::WASM::CallingConvention::setupCall):
(JSC::WASM::nextJSCOffset):
- wasm/WASMFormat.h:
- wasm/WASMFunctionParser.h:
(JSC::WASM::FunctionParser<Context>::parseExpression):
- wasm/WASMMemory.cpp: Copied from Source/JavaScriptCore/wasm/WASMPlan.cpp.
(JSC::WASM::Memory::Memory):
- wasm/WASMMemory.h: Copied from Source/JavaScriptCore/wasm/WASMModuleParser.h.
(JSC::WASM::Memory::~Memory):
(JSC::WASM::Memory::memory):
(JSC::WASM::Memory::size):
(JSC::WASM::Memory::pinnedRegisters):
(JSC::WASM::Memory::mode):
(JSC::WASM::Memory::growMemory):
(JSC::WASM::Memory::offsetOfSize):
- wasm/WASMModuleParser.cpp:
(JSC::WASM::ModuleParser::parse):
(JSC::WASM::ModuleParser::parseMemory):
- wasm/WASMModuleParser.h:
(JSC::WASM::ModuleParser::functionInformation):
(JSC::WASM::ModuleParser::memory):
- wasm/WASMOps.h:
- wasm/WASMPlan.cpp:
(JSC::WASM::Plan::Plan):
- wasm/WASMPlan.h:
- wasm/WASMSections.h:
- 6:25 PM Changeset in webkit [207452] by
-
- 3 edits in tags/Safari-603.1.9.0.1/Source/WebCore
Merged r207446. rdar://problem/28786160
- 6:22 PM Changeset in webkit [207451] by
-
- 5 edits in tags/Safari-603.1.9.0.1/Source
Versioning.
- 6:17 PM Changeset in webkit [207450] by
-
- 1 copy in tags/Safari-603.1.9.0.1
New tag.
- 6:17 PM Changeset in webkit [207449] by
-
- 1 delete in tags/Safari-603.1.9.1
Delete tag.
- 6:14 PM Changeset in webkit [207448] by
-
- 1 copy in tags/Safari-603.1.9.1
New tag.
- 6:08 PM Changeset in webkit [207447] by
-
- 14 edits2 adds in trunk
Add test and infrastructure for link popover
https://bugs.webkit.org/show_bug.cgi?id=163406
Patch by Megan Gardner <Megan Gardner> on 2016-10-17
Reviewed by Simon Fraser.
Source/WebKit2:
Add infrastructure to see when a link popover appears, and what URL it has loaded.
- UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView didShowForcePressPreview]):
(-[WKWebView didDismissForcePressPreview]):
- UIProcess/API/Cocoa/WKWebViewPrivate.h:
- UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView _contentsOfUserInterfaceItem:]):
(-[WKContentView _presentedViewControllerForPreviewItemController:]):
(-[WKContentView _previewItemController:didDismissPreview:committing:]):
(-[WKContentView _previewItemControllerDidCancelPreview:]):
Tools:
Added functionality test for link popovers.
Can query for what URL is loaded, and that the popover has appeared or has
been dismissed.
Added a link popover test.
- DumpRenderTree/ios/UIScriptControllerIOS.mm:
(WTR::UIScriptController::platformSetDidShowForcePressPreviewCallback):
(WTR::UIScriptController::platformSetDidDismissForcePressPreviewCallback):
(WTR::UIScriptController::platformSetDidEndFormControlInteractionCallback): Deleted.
- TestRunnerShared/UIScriptContext/Bindings/UIScriptController.idl:
- TestRunnerShared/UIScriptContext/UIScriptContext.h:
- TestRunnerShared/UIScriptContext/UIScriptController.cpp:
(WTR::UIScriptController::setDidShowForcePressPreviewCallback):
(WTR::UIScriptController::didShowForcePressPreviewCallback):
(WTR::UIScriptController::setDidDismissForcePressPreviewCallback):
(WTR::UIScriptController::didDismissForcePressPreviewCallback):
(WTR::UIScriptController::platformSetDidShowForcePressPreviewCallback):
(WTR::UIScriptController::platformSetDidDismissForcePressPreviewCallback):
(WTR::UIScriptController::didEndFormControlInteractionCallback): Deleted.
(WTR::UIScriptController::platformSetDidEndFormControlInteractionCallback): Deleted.
- TestRunnerShared/UIScriptContext/UIScriptController.h:
- WebKitTestRunner/cocoa/TestRunnerWKWebView.h:
- WebKitTestRunner/cocoa/TestRunnerWKWebView.mm:
(-[TestRunnerWKWebView dealloc]):
(-[TestRunnerWKWebView didShowForcePressPreview]):
(-[TestRunnerWKWebView didDismissForcePressPreview]):
- WebKitTestRunner/ios/UIScriptControllerIOS.mm:
(WTR::UIScriptController::platformSetDidShowForcePressPreviewCallback):
(WTR::UIScriptController::platformSetDidDismissForcePressPreviewCallback):
(WTR::UIScriptController::platformSetDidEndFormControlInteractionCallback): Deleted.
LayoutTests:
- fast/events/touch/ios/iphone7/force-press-on-link-expected.txt: Added.
- fast/events/touch/ios/iphone7/force-press-on-link.html: Added.
- 6:00 PM Changeset in webkit [207446] by
-
- 3 edits in trunk/Source/WebCore
Remove dependency cycle with UIKit
https://bugs.webkit.org/show_bug.cgi?id=163577
<rdar://problem/28786160>
Reviewed by Tim Horton.
Soft link against UIKit.
- Configurations/WebCoreTestSupport.xcconfig:
- testing/Internals.mm:
- 5:45 PM Changeset in webkit [207445] by
-
- 4 edits in trunk
REGRESSION (r169805): WKWebView canGoBack returning YES when nothing is in the back-forward list after restoring session state
https://bugs.webkit.org/show_bug.cgi?id=163573
<rdar://problem/28744549>
Reviewed by Dan Bernstein.
Source/WebKit2:
- UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::restoreFromSessionState):
Update PageLoadState's canGoBack/canGoForward bits when restoring from
session state, because in the don't-navigate case, nothing else will make this happen,
and it will remain stale.
Tools:
- TestWebKitAPI/Tests/WebKit2/WKBackForwardList.mm:
(TEST):
Add a test ensuring that canGoBack returns NO after restoring session state without navigating.
- 5:36 PM Changeset in webkit [207444] by
-
- 12 edits4 adds in trunk
Web Inspector: Add toggles for debugger pauses at console.assert failures
https://bugs.webkit.org/show_bug.cgi?id=139542
<rdar://problem/19281600>
Reviewed by Timothy Hatcher.
Source/JavaScriptCore:
- inspector/agents/InspectorDebuggerAgent.h:
- inspector/agents/InspectorDebuggerAgent.cpp:
(Inspector::InspectorDebuggerAgent::disable):
(Inspector::InspectorDebuggerAgent::setPauseOnAssertions):
Toggle pause on assertions state. Default is disabled,
and disable it when frontends disconnect.
(Inspector::InspectorDebuggerAgent::handleConsoleAssert):
Instead of using the PauseOnAllExceptions state, use this
new state specific to assertions.
- inspector/protocol/Debugger.json:
New protocol method to toggle pausing on assertions.
Source/WebInspectorUI:
- UserInterface/Controllers/DebuggerManager.js:
(WebInspector.DebuggerManager.prototype.get assertionsBreakpoint):
(WebInspector.DebuggerManager.prototype.isBreakpointRemovable):
(WebInspector.DebuggerManager.prototype._breakpointDisabledStateDidChange):
New breakpoint and toggling behavior.
- Localizations/en.lproj/localizedStrings.js:
- UserInterface/Views/DebuggerSidebarPanel.js:
(WebInspector.DebuggerSidebarPanel):
(WebInspector.DebuggerSidebarPanel.prototype._breakpointTreeOutlineDeleteTreeElement):
(WebInspector.DebuggerSidebarPanel.prototype._compareTopLevelTreeElements.isSpecialBreakpoint):
(WebInspector.DebuggerSidebarPanel.prototype._compareTopLevelTreeElements):
New breakpoint tree element behavior.
(WebInspector.DebuggerSidebarPanel.prototype.saveStateToCookie):
(WebInspector.DebuggerSidebarPanel.prototype.restoreStateFromCookie):
Sidebar restoration if it was selected.
- UserInterface/Images/Assertion.svg: Added.
- UserInterface/Images/gtk/Assertion.svg: Added.
- UserInterface/Views/BreakpointTreeElement.css:
(.breakpoint-assertion-icon .icon):
New sidebar icon for the global breakpoint.
LayoutTests:
- inspector/debugger/pause-on-assert.html:
- inspector/debugger/pause-reason.html:
These tests need to enable pause on assertions.
- inspector/debugger/setPauseOnAssertions-expected.txt: Added.
- inspector/debugger/setPauseOnAssertions.html: Added.
Specific tests for the new protocol method.
- 5:28 PM Changeset in webkit [207443] by
-
- 6 edits1 add in trunk
Crash in ASCIICaseInsensitiveHash::hash() when a response has a null MIME type
https://bugs.webkit.org/show_bug.cgi?id=163476
<rdar://problem/26941395>
Reviewed by Tim Horton.
Source/WebKit2:
When custom content providers are registered and a response has a null MIME type, WebPage
will pass a null String to HashSet::contains(). This results in a null pointer dereference,
since the String hash functions do not support null Strings and unconditionally dereference
their StringImpls. Fixed by checking that Strings are non-null before calling
HashSet::contains() on m_mimeTypesWithCustomContentProviders.
Rearranging WebPage::shouldUseCustomContentProviderForResponse() to call
canPluginHandleResponse() before checking m_mimeTypesWithCustomContentProviders uncovered a
crash in existing layout tests where WebPage::m_mainFrame can be NULL during WebPage
construction (m_mainFrame isn't yet initialized). Fixed this by passing the main Frame to
canPluginHandleResponseInFrame() instead of relying on m_mainFrame.
New API test: WebKit2.LoadDataWithNilMIMEType.
- WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::transitionToCommittedFromCachedFrame): Passed
m_frame->coreFrame() to shouldUseCustomContentProviderForResponse().
(WebKit::WebFrameLoaderClient::transitionToCommittedForNewPage): Ditto.
- WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::canPluginHandleResponse): Added a mainFrame parameter and used it instead
of m_mainFrame->coreFrame().
(WebKit::WebPage::shouldUseCustomContentProviderForResponse): Passed mainFrame to
canPluginHandleResponse(), and checked if mimeType is null before calling
m_mimeTypesWithCustomContentProviders.contains().
(WebKit::WebPage::canShowMIMEType): Checked if MIMEType is null before calling
m_mimeTypesWithCustomContentProviders.contains().
- WebProcess/WebPage/WebPage.h: Made canPluginHandleResponse() a private declaration.
Tools:
- TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
- TestWebKitAPI/Tests/WebKit2Cocoa/LoadDataWithNilMIMEType.mm: Added.
(TEST): Added an API test that passes a nil MIMEType to
-[WKWebView loadData:MIMEType:characterEncodingName:baseURL:].
- 5:12 PM Changeset in webkit [207442] by
-
- 14 edits1 add in trunk
Allow creation of ExtendedColors and make Color immutable
https://bugs.webkit.org/show_bug.cgi?id=163557
<rdar://problem/28805360>
Reviewed by Darin Adler and Dave Hyatt.
Source/WebCore:
- Support the creation of ExtendedColor objects via the
Color class.
- Fix the remaining few places where a Color object is
modified after creation, instead creating a new Color.
Move all the mutation methods into the private section,
making Color now immutable.
Changes to Color are covered by existing tests. Changes
to ExtendedColor are covered by the ExtendedColor API test.
- css/parser/CSSParser.cpp:
(WebCore::CSSParser::fastParseColor): Return a new named Color.
- dom/Document.cpp:
(WebCore::Document::resetActiveLinkColor): Set to be the named "red" color.
- html/HTMLElement.cpp:
(WebCore::HTMLElement::addHTMLColorToStyle): Use the string-based constructor
where possible.
- page/CaptionUserPreferencesMediaAF.cpp:
(WebCore::CaptionUserPreferencesMediaAF::captionsTextEdgeCSS): No need to
use the string "black" here - we have a constant value.
- platform/graphics/cairo/GraphicsContextCairo.cpp: Don't use setRGB.
- platform/graphics/Color.cpp:
(WebCore::findNamedColor): Move this up in the file.
(WebCore::Color::Color): Copy in the code from setNamedColor. Also
add a constructor for ExtendedColor.
(WebCore::Color::serialized): Call ExtendedColor's serializer if necessary.
(WebCore::Color::cssText): Ditto.
(WebCore::Color::setNamedColor): Deleted.
(WebCore::Color::tagAsExtended): Deleted.
- platform/graphics/Color.h: Add a new constructor.
(WebCore::Color::setRGB): Move to private.
- platform/graphics/ExtendedColor.cpp:
(WebCore::ExtendedColor::cssText): Implement serializer.
- platform/graphics/ExtendedColor.h:
- rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::colorIncludingFallback): Construct a new Color rather than changing an existing object.
Tools:
API tests for ExtendedColor.
- TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
- TestWebKitAPI/Tests/WebCore/ExtendedColor.cpp: Added.
(TestWebKitAPI::TEST):
(TestWebKitAPI::makeColor):
- 4:27 PM Changeset in webkit [207441] by
-
- 2 edits in trunk/Source/WebKit2
[WK2][NetworkCache] PendingFrameLoad objects are sometimes leaked
https://bugs.webkit.org/show_bug.cgi?id=163569
<rdar://problem/28810836>
Reviewed by Antti Koivisto.
PendingFrameLoad objects are created to track frame loads and added to
the m_pendingFrameLoads hash map. These objects are supposed to remove
themselves from the hash map once they detect that the page load has
finished by calling PendingFrameLoad::m_loadCompletionHandler().
PendingFrameLoad::m_loadCompletionHandler() is called from
markLoadAsCompleted() when we detect that the page load has finished
via the m_loadHysteresisActivity HysteresisActivity. We call impulse()
on the HysteresisActivity every time a subresource is loaded in the
frame. The issue is that if no subresource is ever loaded, then we
never call impulse() on the HysteresisActivity, which is therefore
never started. If it nevers starts, then it nevers stops and never
calls markLoadAsCompleted(). To address the problem, we now call
impulse() on the HysteresisActivity as soon as we construct it.
- NetworkProcess/cache/NetworkCacheSpeculativeLoadManager.cpp:
- 4:00 PM Changeset in webkit [207440] by
-
- 2 edits in trunk/LayoutTests
Marking platform/ios-simulator/ios/plugin/youtube-flash-plugin-iframe.html as flaky on ios-simulator debug.
https://bugs.webkit.org/show_bug.cgi?id=163362
Unreviewed test gardening.
- platform/ios-simulator-wk2/TestExpectations:
- 3:56 PM Changeset in webkit [207439] by
-
- 4 edits in trunk/Source
Enable keyboard in fullscreen.
https://bugs.webkit.org/show_bug.cgi?id=163146
Patch by Jeremy Jones <jeremyj@apple.com> on 2016-10-17
Reviewed by Jer Noble.
Allow keyboard in fullscreen.
Source/WebKit/mac:
- WebView/WebView.mm:
(-[WebView _supportsFullScreenForElement:withKeyboard:]):
Source/WebKit2:
- UIProcess/WebFullScreenManagerProxy.cpp:
(WebKit::WebFullScreenManagerProxy::supportsFullScreen):
- 3:30 PM Changeset in webkit [207438] by
-
- 15 edits8 adds in trunk
Implement DOMRect/DOMRectReadOnly
https://bugs.webkit.org/show_bug.cgi?id=163464
Reviewed by Darin Adler.
Source/WebCore:
Implement the DOMRectInit/DOMRectReadOnly/DOMRect interfaces specified in
https://dev.w3.org/fxtf/geometry/
DOMRects allow negative height/width and require double storage, so we can't just
use FloatRect for storage. They also require handling of NaN and Infinity.
To have the left/right/top/bottom accessors follow IEEE NaN rules, we need to use
custom min/max functions that return NaN if either argument is NaN, so add
nanPropagatingMin/nanPropagatingMax helpers to MathExtras.h.
Test: fast/dom/domrect.html
- CMakeLists.txt:
- DerivedSources.make:
- WebCore.xcodeproj/project.pbxproj:
- dom/DOMRect.h: Added.
(WebCore::DOMRect::create):
(WebCore::DOMRect::fromRect):
(WebCore::DOMRect::setX):
(WebCore::DOMRect::setY):
(WebCore::DOMRect::setWidth):
(WebCore::DOMRect::setHeight):
(WebCore::DOMRect::DOMRect):
- dom/DOMRect.idl: Added.
- dom/DOMRectInit.h: Added.
- dom/DOMRectInit.idl: Added.
- dom/DOMRectReadOnly.h: Added.
(WebCore::DOMRectReadOnly::create):
(WebCore::DOMRectReadOnly::fromRect):
(WebCore::DOMRectReadOnly::x):
(WebCore::DOMRectReadOnly::y):
(WebCore::DOMRectReadOnly::width):
(WebCore::DOMRectReadOnly::height):
(WebCore::DOMRectReadOnly::top):
(WebCore::DOMRectReadOnly::right):
(WebCore::DOMRectReadOnly::bottom):
(WebCore::DOMRectReadOnly::left):
(WebCore::DOMRectReadOnly::DOMRectReadOnly):
- dom/DOMRectReadOnly.idl: Added.
Source/WTF:
Implement min()/max() in a way that follows Math.min/Math.max, which return
NaN if either argument is NaN.
- wtf/MathExtras.h:
(WTF::nanPropagatingMin):
(WTF::nanPropagatingMax):
LayoutTests:
New test and new results for global constructor tests.
- geometry/DOMRect-001-expected.txt: Added.
- geometry/DOMRect-001.html: Added.
- js/dom/global-constructors-attributes-dedicated-worker-expected.txt:
- js/dom/global-constructors-attributes-expected.txt:
- platform/efl/js/dom/global-constructors-attributes-expected.txt:
- platform/gtk/js/dom/global-constructors-attributes-expected.txt:
- platform/mac-wk1/js/dom/global-constructors-attributes-expected.txt:
- platform/mac-yosemite/js/dom/global-constructors-attributes-expected.txt:
- platform/mac/js/dom/global-constructors-attributes-expected.txt:
- platform/win/js/dom/global-constructors-attributes-expected.txt:
- 3:09 PM Changeset in webkit [207437] by
-
- 5 edits in trunk/Source/JavaScriptCore
[DOMJIT][JSC] Add Option::useDOMJIT
https://bugs.webkit.org/show_bug.cgi?id=163457
Reviewed by Saam Barati.
Add an option to switch the DOMJIT optimization.
- bytecode/PolymorphicAccess.cpp:
(JSC::AccessCase::generateImpl):
- dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::handleGetById):
- runtime/Options.cpp:
(JSC::recomputeDependentOptions):
- runtime/Options.h:
- 3:03 PM Changeset in webkit [207436] by
-
- 4 edits10 adds in trunk
[Modern Media Controls] Basic MediaController
https://bugs.webkit.org/show_bug.cgi?id=163539
<rdar://problem/28797542>
Patch by Antoine Quint <Antoine Quint> on 2016-10-17
Reviewed by Darin Adler.
Source/WebCore:
We add a new main.js file which acts as the entry point by implementing the createControls()
function that HTMLMediaElement::ensureMediaControlsInjectedScript() once the shadow root has
been created. That functions creates an instance of the new MediaController class, which is
the controller object that will handle communication between the media controls and the media
element. At first, this MediaController class is very limited and assumes macOS inline
layout traits and forces a start button to be shown over the media, which can be played
to start the media and show the full controls. More functionality will be added by future patches.
Tests: media/modern-media-controls/media-controller/media-controller-click-to-start.html
media/modern-media-controls/media-controller/media-controller-constructor.html
media/modern-media-controls/media-controller/media-controller-resize.html
- Modules/modern-media-controls/main.js: Added.
(createControls):
- Modules/modern-media-controls/media/media-controller.js: Added.
(MediaController):
(MediaController.prototype.set pageScaleFactor):
(MediaController.prototype.set usesLTRUserInterfaceLayoutDirection):
(MediaController.prototype.handleEvent):
(MediaController.prototype.buttonWasClicked):
(MediaController.prototype._updateControlsSize):
- WebCore.xcodeproj/project.pbxproj:
- rendering/RenderThemeMac.mm:
(WebCore::RenderThemeMac::mediaControlsStyleSheet):
(WebCore::RenderThemeMac::mediaControlsScript):
LayoutTests:
Testing the properties of the new MediaController class and the availability and behavior of the
createControls() global function.
- media/modern-media-controls/media-controller/media-controller-click-to-start-expected.txt: Added.
- media/modern-media-controls/media-controller/media-controller-click-to-start.html: Added.
- media/modern-media-controls/media-controller/media-controller-constructor-expected.txt: Added.
- media/modern-media-controls/media-controller/media-controller-constructor.html: Added.
- media/modern-media-controls/media-controller/media-controller-resize-expected.txt: Added.
- media/modern-media-controls/media-controller/media-controller-resize.html: Added.
- 2:51 PM Changeset in webkit [207435] by
-
- 2 edits in trunk/LayoutTests
[GTK] Skip layout tests under crypto/workers/subtle
- platform/gtk/TestExpectations:
- 2:45 PM Changeset in webkit [207434] by
-
- 13 edits2 adds in trunk/Source/JavaScriptCore
Air::IRC doesn't need to have a special-case for uncolored Tmps since they all get colored
https://bugs.webkit.org/show_bug.cgi?id=163548
<rdar://problem/28804381>
Reviewed by Geoffrey Garen.
Before r207408, IRC had a mode where it would silently assign the first assignable register (so
%rax, %xmm0, etc) to any tmp that was not colorable due to a pathological interference fencepost.
We reason about interference at instruction boundaries. This means that if you have, for example,
an instruction that clobbers all registers late followed by an instruction that has an early def
in the same register file, then the early def will not be colorable because it interferes with
all registers. This already happens in our tests, but IRC silently returns the first assignable
register to such tmps. For some reason the resulting code works OK - probably because this tends
to only be hit by fuzzing, which may not then stress that code enough to shake out the register
corruption. Also, this can only happen for floating point registers, so it's hard to get an
exciting crash. The worst case is that your numbers get all messed up.
This change fixes the issue:
- IRC will now crash if it can't color a tmp.
- IRC doesn't crash on our tests anymore because I added a padInterference() utility that works around the interference problem by inserting Nops to pad between those instructions where conflating their early and late actions into one interference fencepost could create an uncolorable graph.
See https://bugs.webkit.org/show_bug.cgi?id=163548#c2 for a detailed discussion of how the
problem can arise.
This problem almost made me want to abandon our use of interference at instruction boundaries,
and introduce something more comprehensive, like interference at various stages of an
instruction's execution. The reason why I didn't do this is that this problem only arises in well
confined corner cases: you need an instruction that does a late use or def followed by an
instruction that does an early def. Register clobbers count as defs for this equation.
Fortunately, early defs are rare, and even when they do happen, you still need the previous
instruction to have a late something. Late uses are rare and many instructions don't have defs at
all, which means that it's actually pretty common for an instruction to not have anything late.
This means that the padInterference() strategy is ideal: our algorithms stay simple because they
only have to worry about interference at boundaries, and we rarely insert any Nops in
padInterference() so the IR stays nice and compact. Those Nops get removed by any phase that does
DCE, which includes eliminateDeadCode(), allocateStack(), and reportUsedRegisters(). In practice
allocateStack() kills them.
This also finally refactors our passing of RegisterSet to pass it by value, since it's small
enough that we're not gaining anything by using references. On x86, RegisterSet ought to be
smaller than a pointer.
- CMakeLists.txt:
- JavaScriptCore.xcodeproj/project.pbxproj:
- b3/B3StackmapSpecial.cpp:
(JSC::B3::StackmapSpecial::extraClobberedRegs):
(JSC::B3::StackmapSpecial::extraEarlyClobberedRegs):
- b3/B3StackmapSpecial.h:
- b3/air/AirCCallSpecial.cpp:
(JSC::B3::Air::CCallSpecial::extraEarlyClobberedRegs):
(JSC::B3::Air::CCallSpecial::extraClobberedRegs):
- b3/air/AirCCallSpecial.h:
- b3/air/AirInst.h:
- b3/air/AirInstInlines.h:
(JSC::B3::Air::Inst::extraClobberedRegs):
(JSC::B3::Air::Inst::extraEarlyClobberedRegs):
- b3/air/AirIteratedRegisterCoalescing.cpp:
(JSC::B3::Air::iteratedRegisterCoalescing):
- b3/air/AirPadInterference.cpp: Added.
(JSC::B3::Air::padInterference):
- b3/air/AirPadInterference.h: Added.
- b3/air/AirSpecial.h:
- b3/air/AirSpillEverything.cpp:
(JSC::B3::Air::spillEverything):
- jit/RegisterSet.h:
(JSC::RegisterSet::isEmpty):
- 2:44 PM Changeset in webkit [207433] by
-
- 2 edits in trunk/JSTests
Add more tests for the double->String conversion in ValueAdd constant folding
https://bugs.webkit.org/show_bug.cgi?id=163517
Reviewed by Yusuke Suzuki.
- microbenchmarks/string-add-constant-folding.js:
(test):
- 2:36 PM Changeset in webkit [207432] by
-
- 11 edits4 adds in trunk
WebAssembly JS API: implement basic stub
Implement the global WebAssembly JavaScript object, and its constructor +
function properties as described in:
These don't do anything at the moment, the parent bug will take care of adding
more functionality and associated tests.
WebAssembly JS API: implement basic stub
https://bugs.webkit.org/show_bug.cgi?id=163404
Reviewed by Keith Miller.
JSTests:
- wasm.yaml:
- wasm/js-api/test_basic_api.js: Added.
(const.f.of.functionProperties.WebAssembly.f.undefined.throw.new.Error.Couldn.const.c.of.constructorProperties.WebAssembly.c.undefined.throw.new.Error.Couldn):
(const.c.of.constructorProperties.catch):
Source/JavaScriptCore:
- CMakeLists.txt:
- JavaScriptCore.xcodeproj/project.pbxproj:
- builtins/BuiltinNames.h: register the new WebAssembly object's name and its constructor properties
- jsc.cpp: remove useless include
- runtime/JSGlobalObject.cpp:
(JSC::JSGlobalObject::init): add the WebAssembly global object and its constructor properties, but only if the JSC option enables it
- runtime/Options.h: add the useWebAssembly (alias: enableWebAssembly) option, defaulting to false
- wasm/WebAssemblyObject.cpp: Added.
(JSC::WebAssemblyObject::create): boilerplate
(JSC::WebAssemblyObject::createStructure): boilerplate
(JSC::WebAssemblyObject::finishCreation): boilerplate
(JSC::WebAssemblyObject::WebAssemblyObject): boilerplate
(JSC::wasmObjectFuncvalidate): auto-throws for now
(JSC::wasmObjectFunccompile): auto-throws for now
- wasm/WebAssemblyObject.h: Added.
Tools:
- Scripts/run-jsc-stress-tests: use the new JSC option which exposes the WebAssembly object.
- 2:17 PM Changeset in webkit [207431] by
-
- 3 edits in trunk/Source/WebCore
Remove an unused HistoryItem function
https://bugs.webkit.org/show_bug.cgi?id=163565
Reviewed by Tim Horton.
- history/HistoryItem.cpp:
(WebCore::HistoryItem::isAncestorOf): Deleted.
- history/HistoryItem.h:
- 2:10 PM Changeset in webkit [207430] by
-
- 2 edits in trunk/Source/JavaScriptCore
Unreviewed, build fix after r207428
https://bugs.webkit.org/show_bug.cgi?id=163223
Previous build fix r207428 broke all the builds.
- bytecode/PolymorphicAccess.h:
- 2:00 PM Changeset in webkit [207429] by
-
- 12 edits2 adds in trunk
AX: [Mac] mapping for output elements
https://bugs.webkit.org/show_bug.cgi?id=163471
Reviewed by Chris Fleizach.
Source/WebCore:
Mapped the output element to status role and exposed its text content
as AXTitle.
Test: accessibility/mac/output-element.html
- English.lproj/Localizable.strings:
- accessibility/AccessibilityNodeObject.cpp:
(WebCore::AccessibilityNodeObject::visibleText):
- accessibility/AccessibilityObject.cpp:
(WebCore::AccessibilityObject::isOutput):
- accessibility/AccessibilityObject.h:
- accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::determineAccessibilityRole):
- accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(-[WebAccessibilityObjectWrapper roleDescription]):
- platform/LocalizedStrings.cpp:
(WebCore::AXOutputText):
- platform/LocalizedStrings.h:
- platform/efl/LocalizedStringsEfl.cpp:
(WebCore::AXOutputText):
- platform/gtk/LocalizedStringsGtk.cpp:
(WebCore::AXOutputText):
LayoutTests:
- accessibility/mac/output-element-expected.txt: Added.
- accessibility/mac/output-element.html: Added.
- 1:57 PM Changeset in webkit [207428] by
-
- 3 edits in trunk/Source/JavaScriptCore
Unreviewed, build fix for GTK and Windows
https://bugs.webkit.org/show_bug.cgi?id=163223
Attempt to fix build failures in GTK port and Windows port.
- bytecode/PolymorphicAccess.cpp:
- bytecode/PolymorphicAccess.h:
(JSC::AccessGenerationState::SpillState::SpillState):
- 1:43 PM Changeset in webkit [207427] by
-
- 16 edits1 copy6 adds in trunk
[DOMJIT] Use DOMJIT::Patchpoint in IC
https://bugs.webkit.org/show_bug.cgi?id=163223
Reviewed by Saam Barati.
JSTests:
- stress/domjit-exception-ic.js: Added.
(shouldBe):
(access):
- stress/domjit-exception.js: Added.
(shouldBe):
(access):
- stress/domjit-getter-complex-with-incorrect-object.js: Added.
(shouldThrow):
(access):
(i.shouldThrow):
- stress/domjit-getter-complex.js: Added.
(shouldBe):
(access):
- stress/domjit-getter-try-catch-getter-as-get-by-id-register-restoration.js: Added.
(assert):
(bar):
(foo):
Source/JavaScriptCore:
This patch uses DOMJIT::Patchpoint to inline DOM accesses even in IC!
It is useful for Baseline JIT cases and GetById cases in DFG and FTL.
In AccessCase, we construct the environment that allows DOMJIT::Patchpoint
to emit code and make DOMJIT accessors inlined in IC.
To allow DOMJIT::Patchpoint to emit code, we create a mechanism to emit calls
required in DOMJIT::Patchpoint. This system is useful when we create the super-
polymorphic support[1] later. And inlining mechanism is useful even after
introducing super-polymorphic support since it can work even after we fire the
watchpoint for super-polymorphic handling.
This patch improves Dromaeo dom-traverse 8% (263.95 runs/s v.s. 244.07 runs/s).
[1]: https://bugs.webkit.org/show_bug.cgi?id=163226
- CMakeLists.txt:
- JavaScriptCore.xcodeproj/project.pbxproj:
- bytecode/DOMJITAccessCasePatchpointParams.cpp: Added.
(JSC::SlowPathCallGeneratorWithArguments::SlowPathCallGeneratorWithArguments):
(JSC::SlowPathCallGeneratorWithArguments::generateImpl):
(JSC::DOMJITAccessCasePatchpointParams::emitSlowPathCalls):
- bytecode/DOMJITAccessCasePatchpointParams.h: Copied from Source/JavaScriptCore/ftl/FTLDOMJITPatchpointParams.h.
(JSC::DOMJITAccessCasePatchpointParams::DOMJITAccessCasePatchpointParams):
(JSC::DOMJITAccessCasePatchpointParams::SlowPathCallGenerator::~SlowPathCallGenerator):
- bytecode/PolymorphicAccess.cpp:
(JSC::AccessGenerationState::liveRegistersForCall):
(JSC::AccessGenerationState::liveRegistersToPreserveAtExceptionHandlingCallSite):
(JSC::calleeSaveRegisters):
(JSC::AccessGenerationState::calculateLiveRegistersForCallAndExceptionHandling):
(JSC::AccessGenerationState::restoreLiveRegistersFromStackForCallWithThrownException):
(JSC::AccessGenerationState::restoreLiveRegistersFromStackForCall):
(JSC::AccessGenerationState::callSiteIndexForExceptionHandlingOrOriginal):
(JSC::AccessGenerationState::originalExceptionHandler):
(JSC::AccessCase::generateImpl):
(JSC::AccessCase::emitDOMJITGetter):
(JSC::PolymorphicAccess::regenerate):
(JSC::AccessGenerationState::preserveLiveRegistersToStackForCall): Deleted.
- bytecode/PolymorphicAccess.h:
(JSC::AccessGenerationState::SpillState::isEmpty):
(JSC::AccessGenerationState::setSpillStateForJSGetterSetter):
(JSC::AccessGenerationState::spillStateForJSGetterSetter):
(JSC::AccessGenerationState::liveRegistersForCall): Deleted.
(JSC::AccessGenerationState::numberOfStackBytesUsedForRegisterPreservation): Deleted.
(JSC::AccessGenerationState::liveRegistersToPreserveAtExceptionHandlingCallSite): Deleted.
- dfg/DFGDOMJITPatchpointParams.cpp:
- dfg/DFGDOMJITPatchpointParams.h:
- domjit/DOMJITPatchpoint.h:
- domjit/DOMJITPatchpointParams.h:
(JSC::DOMJIT::PatchpointParams::addSlowPathCall):
- ftl/FTLDOMJITPatchpointParams.cpp:
- ftl/FTLDOMJITPatchpointParams.h:
- jsc.cpp:
(WTF::DOMJITNode::checkDOMJITNode):
(WTF::DOMJITGetterComplex::DOMJITGetterComplex):
(WTF::DOMJITGetterComplex::createStructure):
(WTF::DOMJITGetterComplex::create):
(WTF::DOMJITGetterComplex::DOMJITNodeDOMJIT::DOMJITNodeDOMJIT):
(WTF::DOMJITGetterComplex::domJITNodeGetterSetter):
(WTF::DOMJITGetterComplex::finishCreation):
(WTF::DOMJITGetterComplex::functionEnableException):
(WTF::DOMJITGetterComplex::customGetter):
(GlobalObject::finishCreation):
(functionCreateDOMJITGetterComplexObject):
Source/WebCore:
Make DOMJITPatchpointParams non-const.
- domjit/DOMJITHelpers.h:
(WebCore::DOMJITHelpers::toWrapper):
- domjit/JSNodeDOMJIT.cpp:
(WebCore::createCallDOMForOffsetAccess):
(WebCore::checkNode):
(WebCore::NodeNodeTypeDOMJIT::callDOM):
- 1:38 PM Changeset in webkit [207426] by
-
- 18 edits in trunk/Source
Move form.reportValidity() behind InteractiveFormValidation setting
https://bugs.webkit.org/show_bug.cgi?id=163550
Reviewed by Darin Adler.
Source/WebCore:
Move form.reportValidity() behind InteractiveFormValidation setting for consistency
given that the two features are strongly related.
Also enable the setting by default so we can get feedback on the implementation.
Demos:
- Interactive form validation: http://jsfiddle.net/tj_vantoll/HdSqt/
- Report validity: https://googlechrome.github.io/samples/report-validity/
- bindings/generic/RuntimeEnabledFeatures.h:
(WebCore::RuntimeEnabledFeatures::setInteractiveFormValidationEnabled):
(WebCore::RuntimeEnabledFeatures::interactiveFormValidationEnabled):
- html/HTMLButtonElement.idl:
- html/HTMLFieldSetElement.idl:
- html/HTMLFormElement.idl:
- html/HTMLInputElement.idl:
- html/HTMLKeygenElement.idl:
- html/HTMLObjectElement.idl:
- html/HTMLOutputElement.idl:
- html/HTMLSelectElement.idl:
- html/HTMLTextAreaElement.idl:
Source/WebKit/mac:
Enable InteractiveFormValidation setting by default and link it to
RuntimeEnabledFeatures so we can use it in the IDL.
- WebView/WebView.mm:
(-[WebView _preferencesChanged:]):
- WebView/WebViewData.mm:
(-[WebViewPrivate init]):
Source/WebKit2:
Enable InteractiveFormValidation setting by default and link it to
RuntimeEnabledFeatures so we can use it in the IDL.
- UIProcess/API/C/WKPreferencesRefPrivate.h:
- WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::updatePreferences):
- 1:34 PM Changeset in webkit [207425] by
-
- 2 edits in trunk/Source/JavaScriptCore
Build fix for HasOwnPropertyCache::Entry caused slowdown by introducing a constructor that doesn't use move semantics for the RefPtr<UniquedStringImpl> parameter
https://bugs.webkit.org/show_bug.cgi?id=163490
Reviewed by Darin Adler.
- runtime/HasOwnPropertyCache.h:
(JSC::HasOwnPropertyCache::Entry::Entry):
(JSC::HasOwnPropertyCache::tryAdd):
- 1:18 PM Changeset in webkit [207424] by
-
- 7 edits in trunk/Source/WebKit2
UIProcess should determine throttle state for WebContent process
https://bugs.webkit.org/show_bug.cgi?id=163556
Reviewed by Anders Carlsson.
This is a step towards merging page/process throttling code for mac & iOS.
Previously WebPage determined whether to start a UserActivity based on page activity,
visibility and the preference to disable. Now WebPage passes the activity state across
to WebPageProxy, which makes the decision & explicitly instructs WebPage to start/stop
the UserActivity.
- UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::WebPageProxy):
- updateActivityToken + updateProccessSuppressionState -> updateThrottleState
(WebKit::WebPageProxy::reattachToWebProcess):
- updateActivityToken -> updateThrottleState
(WebKit::WebPageProxy::dispatchViewStateChange):
- updateActivityToken -> updateThrottleState
(WebKit::WebPageProxy::setPageActivityState):
- Record activity state passed from WebPage, and update.
(WebKit::WebPageProxy::preferencesDidChange):
- updateProccessSuppressionState -> updateThrottleState
(WebKit::WebPageProxy::updateActivityToken): Deleted.
(WebKit::WebPageProxy::updateProccessSuppressionState): Deleted.
(WebKit::WebPageProxy::updateThrottleState):
- Merged existing updateActivityToken/updateProccessSuppressionState to unified updateThrottleState.
- Compute whether page should be suppressed, and send SetPageSuppressed message accordingly.
- UIProcess/WebPageProxy.h:
- Merged existing updateActivityToken/updateProccessSuppressionState to unified updateThrottleState.
- Added setPageActivityState/m_activityState to report/record page activity.
- Added m_pageSuppressed to prevent redundant message sends.
- UIProcess/WebPageProxy.messages.in:
- Expose SetPageActivityState message (called by WebPage).
- WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage):
- removed m_processSuppressionEnabled
- updateUserActivity -> setPageSuppressed - explicitly set the page to not be suppressed, until WebPageProxy tells us to do so.
(WebKit::WebPage::setPageActivityState):
- post activity state on to WebPageProxy.
(WebKit::WebPage::setPageSuppressed):
- Start/stop USerActivity accordingly.
(WebKit::WebPage::setViewState):
- No longer need to monitor ViewState changes on the WebProcess side.
(WebKit::WebPage::updatePreferences):
- No longer need to monitor preference changes on the WebProcess side.
(WebKit::WebPage::updateUserActivity): Deleted.
- Only updated on reciept of setPageSuppressed message.
- WebProcess/WebPage/WebPage.h:
- Removed m_activityState, m_processSuppressionEnabled, updateUserActivity.
- Added setPageSuppressed message.
- WebProcess/WebPage/WebPage.messages.in:
- Added SetPageSuppressed message.
- 12:54 PM Changeset in webkit [207423] by
-
- 11 edits in trunk
[Modern Media Controls] Add a MediaControlsHost API to retrieve images as base64
https://bugs.webkit.org/show_bug.cgi?id=163502
<rdar://problem/28792017>
Patch by Antoine Quint <Antoine Quint> on 2016-10-17
Reviewed by Darin Adler.
Add a new
base64StringForIconAndPlatform()method to MediaControlsHost such that we
may load images from the modern-media-controls directory in the WebCore.framework bundle.
We use this new method in the iconService singleton when amediaControlsHostis set,
which will be set in a later patch.
- Modules/mediacontrols/MediaControlsHost.cpp:
(WebCore::MediaControlsHost::base64StringForIconAndPlatform):
- Modules/mediacontrols/MediaControlsHost.h:
- Modules/mediacontrols/MediaControlsHost.idl:
- Modules/modern-media-controls/controls/icon-service.js:
(const.iconService.new.IconService.prototype.urlForIconNameAndLayoutTraits):
(const.iconService.new.IconService):
- rendering/RenderTheme.h:
(WebCore::RenderTheme::mediaControlsBase64StringForIconAndPlatform):
(WebCore::RenderTheme::mediaControlsScript): Deleted.
- rendering/RenderThemeMac.h:
- rendering/RenderThemeMac.mm:
(WebCore::RenderThemeMac::mediaControlsBase64StringForIconAndPlatform):
- 12:17 PM Changeset in webkit [207422] by
-
- 2 edits in trunk/Source/WebKit/mac
Fix iOS build.
- History/WebBackForwardList.mm:
(-[WebBackForwardList dictionaryRepresentation]):
- 12:11 PM Changeset in webkit [207421] by
-
- 5 edits in trunk/Source/WebCore
[Modern Media Controls] Add a MediaControlsHost API to retrieve the shadow root CSS
https://bugs.webkit.org/show_bug.cgi?id=163501
<rdar://problem/28792014>
Patch by Antoine Quint <Antoine Quint> on 2016-10-17
Reviewed by Darin Adler.
Add a new
shadowRootCSSTextproperty to MediaControlsHost so that we may obtain the
concatenated CSS sources for the media controls shadow root via JS. Actually using this
API will be done in a later patch. We also no longer inject those styles as a user-agent
stylesheet when the runtime flag is on since it will no longer be necessary.
- Modules/mediacontrols/MediaControlsHost.cpp:
(WebCore::MediaControlsHost::shadowRootCSSText):
- Modules/mediacontrols/MediaControlsHost.h:
- Modules/mediacontrols/MediaControlsHost.idl:
- css/CSSDefaultStyleSheets.cpp:
(WebCore::CSSDefaultStyleSheets::ensureDefaultStyleSheetsForElement):
- 12:06 PM Changeset in webkit [207420] by
-
- 13 edits9 adds in trunk
Implement DOMPoint/DOMPointReadOnly
https://bugs.webkit.org/show_bug.cgi?id=133916
Reviewed by Darin Adler.
Source/WebCore:
Patch mostly by Dirk Schultz <krit@webkit.org>.
Implement DOMPoint/DOMPointReadOnly following https://drafts.fxtf.org/geometry/
(although we may need to match https://www.w3.org/TR/geometry-1/ to be compatible
with Chrome).
Test: geometry/DOMPoint-001.html
- CMakeLists.txt:
- DerivedSources.make:
- WebCore.xcodeproj/project.pbxproj:
- dom/DOMPoint.h: Added.
- dom/DOMPoint.idl: Added.
- dom/DOMPointInit.h: Added.
- dom/DOMPointInit.idl: Added.
- dom/DOMPointReadOnly.h: Added.
(WebCore::DOMPointReadOnly::create):
(WebCore::DOMPointReadOnly::fromPoint):
(WebCore::DOMPointReadOnly::x):
(WebCore::DOMPointReadOnly::y):
(WebCore::DOMPointReadOnly::z):
(WebCore::DOMPointReadOnly::w):
(WebCore::DOMPointReadOnly::DOMPointReadOnly):
- dom/DOMPointReadOnly.idl: Added.
LayoutTests:
New Web Platform-style test, and rebaselines.
- geometry/DOMPoint-001-expected.txt: Added.
- geometry/DOMPoint-001.html: Added.
- js/dom/global-constructors-attributes-dedicated-worker-expected.txt:
- js/dom/global-constructors-attributes-expected.txt:
- platform/efl/js/dom/global-constructors-attributes-expected.txt:
- platform/gtk/js/dom/global-constructors-attributes-expected.txt:
- platform/mac-wk1/js/dom/global-constructors-attributes-expected.txt:
- platform/mac-yosemite/js/dom/global-constructors-attributes-expected.txt:
- platform/mac/js/dom/global-constructors-attributes-expected.txt:
- platform/win/js/dom/global-constructors-attributes-expected.txt:
- 11:35 AM Changeset in webkit [207419] by
-
- 4 edits in trunk/Source/WebKit/mac
CTTE some of the BackForwardList member functions
https://bugs.webkit.org/show_bug.cgi?id=163555
Reviewed by Dan Bernstein.
- History/BackForwardList.h:
(BackForwardList::entries):
- History/BackForwardList.mm:
(BackForwardList::removeItem):
(BackForwardList::containsItem):
(BackForwardList::entries): Deleted.
- History/WebBackForwardList.mm:
(-[WebBackForwardList removeItem:]):
(-[WebBackForwardList containsItem:]):
(-[WebBackForwardList description]):
- 11:26 AM Changeset in webkit [207418] by
-
- 3 edits in trunk/Source/WebCore
[Modern Media Controls] Use modern-media-controls module sources for media controls stylesheet and script injection
https://bugs.webkit.org/show_bug.cgi?id=163500
<rdar://problem/28792010>
Patch by Antoine Quint <Antoine Quint> on 2016-10-17
Reviewed by Darin Adler.
Add files from the Modules/modern-media-controls directory to the Xcode project and add a copy phase
to copy those files with their directory stucture as a subdirectory of the WebCore.framework Resources
directory.
Additionally, use the modern-media-controls Module CSS and JS files when concatenating the media controls
scripts and styles in RenderTheme when the runtime flag is on.
- WebCore.xcodeproj/project.pbxproj:
- rendering/RenderThemeMac.mm:
(WebCore::RenderThemeMac::mediaControlsStyleSheet):
(WebCore::RenderThemeMac::mediaControlsScript):
- 11:14 AM Changeset in webkit [207417] by
-
- 2 edits in trunk/Source/WebCore
Fix typo in error message.
- bindings/scripts/CodeGeneratorJS.pm:
(GenerateSerializerFunction):
- 10:59 AM Changeset in webkit [207416] by
-
- 2 edits in trunk/Tools
resolve-ChangeLogs: Specify --no-page to git diff
https://bugs.webkit.org/show_bug.cgi?id=163441
Patch by Fujii Hironori <Fujii Hironori> on 2016-10-17
Reviewed by Darin Adler.
resolve-ChangeLogs shows the result after resolving by invoking
'git diff'. It runs a pager for every ChangeLog if it is under
TTY.
- Scripts/resolve-ChangeLogs:
(showStatus): Specify '--no-page' to git diff.
- 10:59 AM Changeset in webkit [207415] by
-
- 2 edits in trunk/Source/WebKit/mac
Remove WEBCORE_EXPORT from BackForwardList, it lives in WebKit now
https://bugs.webkit.org/show_bug.cgi?id=163551
Reviewed by Tim Horton.
- History/BackForwardList.h:
- 10:49 AM Changeset in webkit [207414] by
-
- 2 edits in trunk/Source/WebKit2
REGRESSION(r206189): logs error statements when API::URLRequest is canceled
https://bugs.webkit.org/show_bug.cgi?id=163393
Reviewed by Antti Koivisto.
Print this case at normal logging level, not as an error.
- WebProcess/Network/WebLoaderStrategy.cpp:
(WebKit::WebLoaderStrategy::loadResource):
- 10:48 AM Changeset in webkit [207413] by
-
- 3 edits in trunk/Source/WebKit2
[iOS] Hook up WebPlatformTouchPoint's radiusX / radiusY to _UIWebTouchPoint.majorRadiusInScreenCoordinates
https://bugs.webkit.org/show_bug.cgi?id=163547
Reviewed by Darin Adler.
Hook up WebPlatformTouchPoint's radiusX / radiusY to _UIWebTouchPoint.majorRadiusInScreenCoordinates
now that it is available in UIKit.
- Platform/spi/ios/UIKitSPI.h:
- Shared/ios/NativeWebTouchEventIOS.mm:
(WebKit::NativeWebTouchEvent::extractWebTouchPoint):
- 10:32 AM Changeset in webkit [207412] by
-
- 2 edits in trunk/Source/WebCore
preprocessor.pm: cl.exe outputs processing filenames if Windows Perl is used
https://bugs.webkit.org/show_bug.cgi?id=163435
Patch by Fujii Hironori <Fujii Hironori> on 2016-10-17
Reviewed by Alex Christensen.
cl.exe outputs processing filenames to stderr. Suppress this
annoying messages by using open3 instead of open2.
- bindings/scripts/preprocessor.pm:
(applyPreprocessor): Use open3 in case of Windows Perl.
- 9:59 AM Changeset in webkit [207411] by
-
- 31 edits in trunk/Source
Use the reject() helper function for conditionally throwing TypeErrors.
https://bugs.webkit.org/show_bug.cgi?id=163491
Reviewed by Filip Pizlo.
Source/JavaScriptCore:
In some places where we may conditionally throw a TypeError (e.g. when in strict
mode), we already use the reject() helper function to conditionally throw the
TypeError. Doing so makes the code mode compact. This patch applies this idiom
consistently in all places that throws TypeError where appropriate.
This patch also does the following:
- Make the reject() helper function take an ASCIILiteral instead of a const char* because we always pass it a literal string anyway.
- Change the reject helper() to take a ThrowScope&. This allows the thrown error to be attributed to its caller.
- When an error message string is instantiated repeatedly in more than 1 place, create a common copy of that literal string in JSObject.cpp (if one doesn't already exist) and use that common string in all those places.
- Since I was auditing call sites of throwTypeError() to check if they should be using the reject() helper instead, I also fixed those up to pass the error message as an ASCIILiteral where appropriate.
- In functions that I touched, change the code to not recompute the VM& when it is already available.
- jit/JITOperations.cpp:
- llint/LLIntSlowPaths.cpp:
(JSC::LLInt::LLINT_SLOW_PATH_DECL):
- runtime/ArrayPrototype.cpp:
(JSC::shift):
(JSC::unshift):
(JSC::arrayProtoFuncPop):
(JSC::arrayProtoFuncReverse):
- runtime/CommonSlowPaths.cpp:
(JSC::SLOW_PATH_DECL):
- runtime/GetterSetter.cpp:
(JSC::callSetter):
- runtime/JSArray.cpp:
(JSC::JSArray::defineOwnProperty):
(JSC::JSArray::setLengthWithArrayStorage):
(JSC::JSArray::pop):
- runtime/JSArrayBuffer.cpp:
(JSC::JSArrayBuffer::put):
(JSC::JSArrayBuffer::defineOwnProperty):
- runtime/JSCJSValue.cpp:
(JSC::JSValue::putToPrimitive):
(JSC::JSValue::putToPrimitiveByIndex):
- runtime/JSDataView.cpp:
(JSC::JSDataView::put):
(JSC::JSDataView::defineOwnProperty):
- runtime/JSFunction.cpp:
(JSC::JSFunction::put):
(JSC::JSFunction::defineOwnProperty):
- runtime/JSGenericTypedArrayView.h:
(JSC::JSGenericTypedArrayView::setIndex):
- runtime/JSGenericTypedArrayViewInlines.h:
(JSC::JSGenericTypedArrayView<Adaptor>::defineOwnProperty):
(JSC::JSGenericTypedArrayView<Adaptor>::deleteProperty):
- runtime/JSGenericTypedArrayViewPrototypeFunctions.h:
(JSC::speciesConstruct):
(JSC::genericTypedArrayViewPrivateFuncSubarrayCreate):
- runtime/JSModuleNamespaceObject.cpp:
(JSC::JSModuleNamespaceObject::defineOwnProperty):
- runtime/JSObject.cpp:
(JSC::ordinarySetSlow):
(JSC::JSObject::putInlineSlow):
(JSC::JSObject::setPrototypeWithCycleCheck):
(JSC::JSObject::defineOwnIndexedProperty):
(JSC::JSObject::putByIndexBeyondVectorLengthWithArrayStorage):
(JSC::JSObject::putDirectIndexBeyondVectorLengthWithArrayStorage):
(JSC::validateAndApplyPropertyDescriptor):
- runtime/JSObject.h:
- runtime/JSObjectInlines.h:
(JSC::JSObject::putInline):
- runtime/JSProxy.cpp:
(JSC::JSProxy::setPrototype):
- runtime/JSSymbolTableObject.h:
(JSC::symbolTablePut):
- runtime/Lookup.h:
(JSC::putEntry):
- runtime/RegExpObject.cpp:
(JSC::RegExpObject::defineOwnProperty):
- runtime/RegExpObject.h:
(JSC::RegExpObject::setLastIndex):
- runtime/Reject.h:
(JSC::reject):
- runtime/SparseArrayValueMap.cpp:
(JSC::SparseArrayValueMap::putEntry):
(JSC::SparseArrayValueMap::putDirect):
(JSC::SparseArrayEntry::put):
- runtime/StringObject.cpp:
(JSC::StringObject::put):
(JSC::StringObject::putByIndex):
- runtime/SymbolConstructor.cpp:
(JSC::symbolConstructorKeyFor):
Source/WebCore:
No new tests because this patch does not introduce new behavior.
- bindings/js/JSCryptoAlgorithmDictionary.cpp:
(WebCore::createRsaKeyGenParams):
- bindings/js/JSIDBDatabaseCustom.cpp:
(WebCore::JSIDBDatabase::createObjectStore):
- bridge/c/c_instance.cpp:
(JSC::Bindings::CInstance::invokeMethod):
- 9:56 AM Changeset in webkit [207410] by
-
- 1 edit1 add in trunk/LayoutTests
Rebaseline mathml/mathml-in-dashboard.html for mac.
Unreviewed test gardening.
- platform/mac/mathml/mathml-in-dashboard-expected.txt: Added.
- 9:56 AM Changeset in webkit [207409] by
-
- 3 edits in trunk/Source/WebCore
[GTK] Several tests crashing on debug bot in (anonymous namespace)::MediaPlayerPrivateGStreamerBase::repaint
https://bugs.webkit.org/show_bug.cgi?id=163511
Patch by Miguel Gomez <magomez@igalia.com> on 2016-10-17
Reviewed by Carlos Garcia Campos.
Perform the video repaint in the main thread when accelerated compositing is disabled.
Covered by existent tests.
- platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
(WebCore::MediaPlayerPrivateGStreamerBase::MediaPlayerPrivateGStreamerBase):
(WebCore::MediaPlayerPrivateGStreamerBase::repaint):
(WebCore::MediaPlayerPrivateGStreamerBase::triggerRepaint):
- platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h:
- 9:19 AM Changeset in webkit [207408] by
-
- 2 edits in trunk/Source/JavaScriptCore
Air::IRC needs to place all Tmps on some worklist, even if they have no interference edges
https://bugs.webkit.org/show_bug.cgi?id=163509
Reviewed by Mark Lam.
The worklist building function in IRC skips temporaries that have no degree. This doesn't appear
to be necessary. This has been there since the original IRC commit. It hasn't caused bugs because
ordinarily, the only way to have a tmp with no degree is to not have any mention of that tmp. But
while working on bug 163371, I hit a crazy corner case where a temporary would have no
interference edges (i.e. no degree). Here's how it happens:
A spill tmp from a previous iteration of IRC may have no degree: imagine a tmp that is live
everywhere and interferes with everyone, but has one use like:
Move %ourTmp, %someOtherTmp
Where there are no other tmps live. After spill conversion, this may look like:
Move (ourSpill), %newTmp
Move %newTmp, %someOtherTmp
Of course, we'd rather not get this kind of spill code but it's totally possible because we now
have a bunch of random conditions under which we won't slap the spill address directly into the
Move.
After this happens, assuming that the only thing live was %someOtherTmp, we will have zero degree
for %newTmp because the Move is coalescable and does not contribute to interference.
Then, we might coalesce %someOtherTmp with %newTmp. Once this happens, if we make the %newTmp be
the master, we're in deep trouble because %newTmp is not on any worklist.
I don't know how to reproduce this except through the patch in bug 163371. Removing the two lines
of code that skipped no-degree tmps causes no regressions, and resolves the problem I was having.
- b3/air/AirIteratedRegisterCoalescing.cpp:
- 4:59 AM Changeset in webkit [207407] by
-
- 5 edits in trunk/Source
Eleminate code duplication between ResourceRequest encoding/decoding implementations
https://bugs.webkit.org/show_bug.cgi?id=163507
Reviewed by Carlos Garcia Campos.
ResourceRequestBase::encodeWithoutPlatformData() and Soup implementation of
ArgumentCoder<ResourceRequest>::encodePlatformData() share most of the code,
ditto for decoding implementations.
Source/WebCore:
No new tests needed.
- platform/network/ResourceRequestBase.h:
(WebCore::ResourceRequestBase::encodeBase):
(WebCore::ResourceRequestBase::decodeBase):
(WebCore::ResourceRequestBase::encodeWithoutPlatformData):
(WebCore::ResourceRequestBase::decodeWithoutPlatformData):
- platform/network/soup/ResourceRequest.h:
(WebCore::ResourceRequest::encodeWithPlatformData):
(WebCore::ResourceRequest::decodeWithPlatformData):
Source/WebKit2:
- Shared/soup/WebCoreArgumentCodersSoup.cpp:
(IPC::ArgumentCoder<ResourceRequest>::encodePlatformData):
(IPC::ArgumentCoder<ResourceRequest>::decodePlatformData):
- 4:30 AM Changeset in webkit [207406] by
-
- 11 edits1 copy2 moves1 add1 delete in trunk
Move user agent quirks to cross-platform location
https://bugs.webkit.org/show_bug.cgi?id=163508
Reviewed by Carlos Garcia Campos.
Source/WebCore:
Tested by Tools/TestWebKitAPI/Tests/WebCore/UserAgentQuirks.cpp.
- PlatformGTK.cmake:
- platform/UserAgent.h: Renamed from Source/WebCore/platform/gtk/UserAgentGtk.h.
- platform/UserAgentQuirks.cpp: Added. Moved from UserAgentGtk.cpp.
(WebCore::urlRequiresChromeBrowser): Sneakily tighten up Google domain detection, it should
only apply to sites if the base domain matches google.*, not any base domain that starts
with google.
(WebCore::urlRequiresMacintoshPlatform):
(WebCore::UserAgentQuirks::quirksForURL):
(WebCore::UserAgentQuirks::stringForQuirk):
- platform/UserAgentQuirks.h: Moved from UserAgentGtk.cpp. prepare-ChangeLog thinks it was
renamed from Source/WebCore/platform/efl/UserAgentEfl.h, but prepare-ChangeLog is dumb.
(WebCore::UserAgentQuirks::UserAgentQuirks):
(WebCore::UserAgentQuirks::add):
(WebCore::UserAgentQuirks::contains):
(WebCore::UserAgentQuirks::isEmpty):
- platform/efl/UserAgentEfl.cpp:
(WebCore::standardUserAgentForURL):
- platform/gtk/UserAgentGtk.cpp:
(WebCore::buildUserAgentString):
(WebCore::standardUserAgentForURL):
(): Deleted.
(WebCore::UserAgentQuirks::UserAgentQuirks): Deleted.
(WebCore::UserAgentQuirks::add): Deleted.
(WebCore::UserAgentQuirks::contains): Deleted.
(WebCore::UserAgentQuirks::isEmpty): Deleted.
(WebCore::urlRequiresChromeBrowser): Deleted.
(WebCore::urlRequiresMacintoshPlatform): Deleted.
Source/WebKit2:
#include <WebCore/UserAgent.h> instead of <WebCore/UserAgentGtk.h>.
- UIProcess/API/gtk/WebKitSettings.cpp:
- UIProcess/efl/WebPageProxyEfl.cpp:
- UIProcess/gtk/WebPageProxyGtk.cpp:
- WebProcess/WebPage/gtk/WebPageGtk.cpp:
Tools:
Move the test to a cross-platform location and improve it to better check the full list of
sites we have defined quirks for.
- TestWebKitAPI/PlatformGTK.cmake:
- TestWebKitAPI/Tests/WebCore/UserAgentQuirks.cpp: Renamed from Tools/TestWebKitAPI/Tests/WebCore/gtk/UserAgentQuirks.cpp.
(TestWebKitAPI::assertUserAgentForURLHasChromeBrowserQuirk):
(TestWebKitAPI::assertUserAgentForURLHasMacPlatformQuirk):
(TestWebKitAPI::TEST):
- 3:52 AM Changeset in webkit [207405] by
-
- 4 edits in trunk
[SOUP] Downloads should always sniff contents
https://bugs.webkit.org/show_bug.cgi?id=163538
Reviewed by Michael Catanzaro.
Source/WebKit2:
It's quite common that downloads have weird filenames with no extension, so it would be better if the loader
sniff the contents to guess the mime type.
- NetworkProcess/Downloads/soup/DownloadSoup.cpp:
(WebKit::Download::startNetworkLoad): Pass true for shouldContentSniff parameter of ResourceHandle::create().
Tools:
Add a test case to check that the MIME type is correctly guessed for downloads.
- TestWebKitAPI/Tests/WebKit2Gtk/TestDownloads.cpp:
(writeNextChunk):
(serverCallback):
(testDownloadMIMEType):
(beforeAll):
(writeNextChunkIdle): Deleted.
- 3:45 AM Changeset in webkit [207404] by
-
- 2 edits in trunk/Source/WebKit2
[GTK] Switch to use API::DownloadClient instead of the C API client
https://bugs.webkit.org/show_bug.cgi?id=163537
Reviewed by Michael Catanzaro.
The code is simpler and we avoid all the toImpl/toAPI.
- UIProcess/API/gtk/WebKitDownloadClient.cpp:
(attachDownloadClientToContext):
(didStart):
(didReceiveResponse):
(didReceiveData):
(decideDestinationWithSuggestedFilename):
(didCreateDestination):
(didFail):
(didCancel):
(didFinish):
- 2:07 AM WebKitGTK/2.14.x edited by
- (diff)
- 2:07 AM WebKitGTK/2.14.x edited by
- (diff)
- 2:06 AM Changeset in webkit [207403] by
-
- 2 edits in trunk/Source/WebCore
[GTK] gobject-introspection on package build with webkit2gtk fails without active X session
https://bugs.webkit.org/show_bug.cgi?id=163105
Reviewed by Carlos Garcia Campos.
Don't call XCompositeQueryExtension() or XDamageQueryExtension()
if m_display is NULL.
- platform/graphics/x11/PlatformDisplayX11.cpp:
(WebCore::PlatformDisplayX11::supportsXComposite):
(WebCore::PlatformDisplayX11::supportsXDamage):
- 12:40 AM WebKitGTK/2.14.x edited by
- (diff)
- 12:23 AM Changeset in webkit [207402] by
-
- 2 edits in trunk/Source/WebKit2
[css-grid] Disable CSS Grid Layout runtime flag by default
https://bugs.webkit.org/show_bug.cgi?id=163432
Reviewed by Darin Adler.
It was enabled in r201042, but now Safari Technology Preview
has a UI to switch runtime flags so it doesn't need to be enabled
by default anymore.
- Shared/WebPreferencesDefinitions.h: Disable grid layout runtime flag
by default.