Timeline
Apr 26, 2020:
- 10:12 PM Changeset in webkit [260739] by
-
- 42 edits1 move1 delete in trunk/Source
[Cocoa] stop using out arguments for document attributes when converting to attributed strings
https://bugs.webkit.org/show_bug.cgi?id=211048
Reviewed by Sam Weinig.
Source/WebCore:
- DerivedSources-input.xcfilelist: Building modified this file automatically. Uploading
the new version.
- WebCore.xcodeproj/project.pbxproj: Added AttributedString.h.
- editing/cocoa/AttributedString.h: Added. Moved this from WebKit, but removed a lot of
inessentials.
- editing/cocoa/DictionaryLookup.mm: Removed unneeded include.
- editing/cocoa/EditorCocoa.mm:
(WebCore::selectionAsAttributedString): Updated for change to the return value of the
attributedString function, and use init instead of initWithString:@"".
- editing/cocoa/HTMLConverter.h: Changed to an Objective-C-only header, omitting things
like #pramga once. Return the AttributedString struct from the functions instead of
using an out argument for document attributes.
- editing/cocoa/HTMLConverter.mm:
(HTMLConverter::convert): Return an AttributedString and drop the out argument.
(WebCore::attributedString): Ditto.
(WebCore::editingAttributedString): Ditto. Also refactor a little bit.
- editing/ios/EditorIOS.mm: Removed unneeded include.
- editing/mac/DictionaryLookupLegacy.mm: Removed unneeded include.
- editing/mac/EditorMac.mm:
(WebCore::Editor::dataSelectionForPasteboard): Updated since attributedString
now returns a structure.
- platform/network/cocoa/NetworkStorageSessionCocoa.mm:
(WebCore::policyProperties): Use init instead of initWithString:@"".
- platform/network/cocoa/ResourceRequestCocoa.mm:
(WebCore::siteForCookies): Use init instead of initWithString:@"".
Source/WebKit:
- NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:
(WebKit::updateTaskWithFirstPartyForSameSiteCookies): Use init instead of initWithString:@"".
- Shared/Cocoa/WebCoreArgumentCodersCocoa.mm:
(IPC::ArgumentCoder<WebCore::AttributedString>::encode): Moved here from AttributedString.mm.
(IPC::ArgumentCoder<WebCore::AttributedString>::decode): Ditto.
- Shared/DocumentEditingContext.h: Updated to use WebCore::AttributeString.
- Shared/DocumentEditingContext.mm:
(IPC::ArgumentCoder<WebKit::DocumentEditingContext>::decode): Ditto.
- Shared/WebCoreArgumentCoders.h: Added coder for WebCore::AttributedString.
- Shared/mac/AttributedString.h: Removed.
- Shared/mac/AttributedString.mm: Removed.
- SourcesCocoa.txt: Removed AttributedString.mm.
- UIProcess/API/Cocoa/WKWebView.mm: Updated to use WebCore::AttributedString.
- UIProcess/Cocoa/TextCheckingController.mm: Ditto.
- UIProcess/Cocoa/WebViewImpl.mm:
(WebKit::WebViewImpl::attributedSubstringForProposedRange): Ditto.
- UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::getContentsAsAttributedString): Ditto.
- UIProcess/WebPageProxy.h: Ditto.
- UIProcess/WebPageProxy.messages.in: Ditto.
- UIProcess/mac/WebPageProxyMac.mm:
(WebKit::WebPageProxy::attributedSubstringForCharacterRangeAsync): Ditto.
(WebKit::WebPageProxy::attributedStringForCharacterRangeCallback): Ditto.
- WebKit.xcodeproj/project.pbxproj: Removed AttributedString.h and AttributedString.mm.
- WebProcess/WebPage/Cocoa/TextCheckingControllerProxy.h: Updated to use WebCore::AttributedString.
- WebProcess/WebPage/Cocoa/TextCheckingControllerProxy.messages.in: Ditto.
- WebProcess/WebPage/Cocoa/TextCheckingControllerProxy.mm:
(WebKit::TextCheckingControllerProxy::replaceRelativeToSelection): Ditto.
(WebKit::TextCheckingControllerProxy::annotatedSubstringBetweenPositions): Ditto.
- WebProcess/WebPage/Cocoa/WebPageCocoa.mm:
(WebKit::WebPage::dictionaryPopupInfoForRange): Updated since editingAttributedString
returns a struct.
(WebKit::WebPage::getContentsAsAttributedString): Updated to use SimpleRange and
since attributedString returns a struct.
- WebProcess/WebPage/WebPage.h: Updated to use WebCore::AttributedString.
- WebProcess/WebPage/WebPage.messages.in: Ditto.
- WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::requestDocumentEditingContext): Ditto.
- WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::attributedSubstringForCharacterRangeAsync): Ditto.
(WebKit::WebPage::handleSelectionServiceClick): Ditto.
Source/WebKitLegacy/mac:
- WebCoreSupport/WebSelectionServiceController.mm:
(WebSelectionServiceController::handleSelectionServiceClick): Updated since
attributedString returns a struct.
- WebView/WebHTMLRepresentation.mm:
(-[WebHTMLRepresentation attributedStringFrom:startOffset:to:endOffset:]): Ditto.
Also use init instead of initWithString:@"".
- WebView/WebHTMLView.mm:
(-[WebHTMLView textStorage]): DItto.
(-[WebHTMLView attributedSubstringFromRange:]): Ditto.
(-[WebHTMLView _attributedStringFromDOMRange:]): Ditto.
(-[WebHTMLView _legacyAttributedStringFrom:offset:to:offset:]): Ditto.
(-[WebHTMLView attributedString]): Ditto.
(-[WebHTMLView selectedAttributedString]): Ditto.
- WebView/WebImmediateActionController.mm:
(+[WebImmediateActionController _dictionaryPopupInfoForRange:inFrame:withLookupOptions:indicatorOptions:transition:]):
Updated.
Source/WTF:
- wtf/cocoa/URLCocoa.mm:
(WTF::URL::createCFURL const): Use init instead of initWithString:@"". The two are
equivalent in more recent versions of Foundation.
- 10:07 PM Changeset in webkit [260738] by
-
- 8 edits1 add in trunk
[PlayStation] Enable TestWTF and TestWebCore
https://bugs.webkit.org/show_bug.cgi?id=208849
Reviewed by Don Olmstead.
.:
- Source/cmake/OptionsPlayStation.cmake:
- Add PLAYSTATION_COPY_SHARED_LIBRARIES() to install dependencies.
- Add -g option for "Release" configuration.
- Drop "RelWithDebInfo" and "MinSizeRel" configuration.
Source/WebCore:
- PlatformPlayStation.cmake:
Add WebCore_CopySharedLibs to install dependencies.
Source/WTF:
- wtf/PlatformPlayStation.cmake:
Add WTF_CopySharedLibs() to install dependencies.
Tools:
- TestWebKitAPI/PlatformPlayStation.cmake:
- TestWebKitAPI/playstation/main.cpp: Added.
(main): Load runtime libraries.
- 9:05 PM Changeset in webkit [260737] by
-
- 2 edits in trunk/LayoutTests
[GTK] Gardening, skipping more inspector tests.
Some inspector tests (like from bug149916) had more specific
expectations than the gtk-global Skip from bug211035 and ended up
being executed. These expectations were not marked as timeout (only
Slow), and this caused the Debug bot to reach the test timeout limit.
As there is already at least three patches involved in this issue,
mark these expectations as Release only, allowing the Debug build to
use the generic expectation from bug2011035.
Unreviewed test gardening.
- platform/gtk/TestExpectations:
- 6:02 PM Changeset in webkit [260736] by
-
- 21 edits1 add in trunk/Source
Rendering update steps should use Seconds for the timestamps
https://bugs.webkit.org/show_bug.cgi?id=210990
Patch by Said Abou-Hallawa <sabouhallawa@apple.com> on 2020-04-26
Reviewed by Daniel Bates.
Source/WebCore:
Make DOMWindow::nowTimestamp() return ReducedResolutionSeconds and change
the callers accordingly. ReducedResolutionSeconds is a new type but it's
just an alias of the type Seconds. It indicates that the returned value
is a web-safe seconds.
- Headers.cmake:
- WebCore.xcodeproj/project.pbxproj:
- animation/DocumentTimeline.cpp:
(WebCore::DocumentTimeline::suspendAnimations):
(WebCore::DocumentTimeline::liveCurrentTime const):
(WebCore::DocumentTimeline::cacheCurrentTime):
(WebCore::DocumentTimeline::documentWillUpdateAnimationsAndSendEvents):
- animation/DocumentTimeline.h:
- animation/DocumentTimelinesController.cpp:
(WebCore::DocumentTimelinesController::updateAnimationsAndSendEvents):
- animation/DocumentTimelinesController.h:
- dom/Document.cpp:
(WebCore::Document::serviceRequestAnimationFrameCallbacks):
(WebCore::Document::updateIntersectionObservations):
- dom/Document.h:
- dom/ScriptedAnimationController.cpp:
(WebCore::ScriptedAnimationController::serviceRequestAnimationFrameCallbacks):
(WebCore::ScriptedAnimationController::scheduleAnimation):
- dom/ScriptedAnimationController.h:
- html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::getVideoPlaybackQuality):
- page/DOMWindow.cpp:
(WebCore::DOMWindow::nowTimestamp const):
- page/DOMWindow.h:
- page/IntersectionObserver.cpp:
(WebCore::IntersectionObserver::nowTimestamp const):
(WebCore::IntersectionObserver::createTimestamp const): Deleted.
- page/IntersectionObserver.h:
- page/Page.cpp:
(WebCore::Page::updateRendering):
- page/Performance.cpp:
(WebCore::Performance::now const):
(WebCore::Performance::nowInReducedResolutionSeconds const):
- page/Performance.h:
- page/ReducedResolutionSeconds.h: Added.
Source/WebKit:
- WebProcess/WebPage/CoordinatedGraphics/CompositingCoordinator.cpp:
(WebKit::CompositingCoordinator::timestamp const):
- 5:37 PM Changeset in webkit [260735] by
-
- 8 edits in trunk/Source/JavaScriptCore
[JSC] Clearly distinguish isConstructor from getConstructData
https://bugs.webkit.org/show_bug.cgi?id=211053
Reviewed by Sam Weinig.
Follow-up to r260722. Remove the isConstructor overload that duplicates getConstructData
and clearly distinguish the usage of these two functions.
- runtime/JSCJSValue.h:
- runtime/JSCJSValueInlines.h:
- runtime/JSCell.h:
- runtime/JSCellInlines.h:
(JSC::JSCell::isConstructor):
Remove isConstructor overload.
- runtime/JSBoundFunction.cpp:
(JSC::JSBoundFunction::create):
Don't use getConstructData if you don't need ConstructData.
- runtime/ReflectObject.cpp:
(JSC::reflectObjectConstruct):
Use getConstructData if you need ConstructData.
- API/JSObjectRef.cpp:
(JSObjectIsFunction):
Use isFunction (leftover spot from last patch).
- 4:04 PM Changeset in webkit [260734] by
-
- 3 edits in trunk/Tools
Warn when NeverDestroyed<Lock> is used
https://bugs.webkit.org/show_bug.cgi?id=211054
Reviewed by Darin Adler.
WTF::Lock and WTF::Condition are designed to be constant-initialize compliant. So NeverDestroyed<> for these types are not necessary,
or rather, introducing race condition issue whilestatic Lockdoesn't have that issue. This patch adds lint rules which prevent
us from usingNeverDestroyed<Lock>andLazyNeverDestroyed<Lock>.
- Scripts/webkitpy/style/checkers/cpp.py:
(check_wtf_never_destroyed):
(check_style):
(CppChecker):
- Scripts/webkitpy/style/checkers/cpp_unittest.py:
(WebKitStyleTest.test_wtf_never_destroyed):
- 3:54 PM Changeset in webkit [260733] by
-
- 5 edits in trunk
Symbol should have Construct internal method
https://bugs.webkit.org/show_bug.cgi?id=211050
Reviewed by Yusuke Suzuki.
JSTests:
- stress/is-constructor.js:
- test262/expectations.yaml: Mark 2 test cases as passing.
Source/JavaScriptCore:
This change introduces constructSymbol() method, which unconditionally throws
a TypeError, since its presence is observable when, for example, Symbol is a
ProxyTarget itself [1]. Aligns JSC with the spec [2], V8, and SpiderMonkey.
[1]: https://tc39.es/ecma262/#sec-proxycreate (step 7.b)
[2]: https://tc39.es/ecma262/#constructor
- runtime/SymbolConstructor.cpp:
(JSC::SymbolConstructor::SymbolConstructor):
(JSC::constructSymbol):
- 2:30 PM Changeset in webkit [260732] by
-
- 53 edits1 add in trunk
InternalFunction::createSubclassStructure should use newTarget's globalObject
https://bugs.webkit.org/show_bug.cgi?id=202599
Reviewed by Yusuke Suzuki.
JSTests:
- stress/promise-proto-from-ctor-realm.js: Added.
- test262/expectations.yaml: Mark 88 test cases as passing.
LayoutTests/imported/w3c:
- web-platform-tests/WebIDL/ecmascript-binding/constructors-expected.txt:
- web-platform-tests/custom-elements/htmlconstructor/newtarget-expected.txt:
- web-platform-tests/wasm/jsapi/proto-from-ctor-realm-expected.txt:
Source/JavaScriptCore:
If "prototype" of NewTarget is not an object, built-in constructors [1] should acquire
default Prototype from realm of NewTarget, utilizing GetFunctionRealm helper [2].
Before this change, realm of active constructor was used instead. This patch introduces
GetFunctionRealm and aligns all subclassable constructors with the spec, V8, and SpiderMonkey.
This change inlines fast paths checks of InternalFunction::createSubclassStructure() and
simplifies its signature; getFunctionRealm() is invoked in slow paths only.
While a dynamically created function uses NewTarget's realm for its default Prototype
similar to other built-ins, its "prototype" object inherit from ObjectPrototype
of active constructor's realm [3] (just like their scope), making it retain references
to 2 different global objects. To accomodate this behavior, this change introduces
scopeGlobalObjectin JSFunction.cpp methods.
Above-mentioned behavior also simplifies creation of JSGenerator and JSAsyncGenerator
instances since NewTarget's realm is irrelevant to them.
IntlCollatorConstructor::collatorStructure() and 6 similar methods are removed:
a) to impose good practice of using newTarget's globalObject;
b) with this change, each of them have 1 call site max;
c) other JSC constructors have no methods alike.
[1]: https://tc39.es/ecma262/#sec-map-constructor (step 2)
[2]: https://tc39.es/ecma262/#sec-getfunctionrealm
[3]: https://tc39.es/ecma262/#sec-createdynamicfunction (steps 23-25)
- dfg/DFGOperations.cpp:
- runtime/AggregateErrorConstructor.cpp:
(JSC::callAggregateErrorConstructor):
(JSC::constructAggregateErrorConstructor):
- runtime/AggregateErrorConstructor.h:
- runtime/AsyncFunctionConstructor.cpp:
(JSC::constructAsyncFunctionConstructor):
- runtime/AsyncGeneratorFunctionConstructor.cpp:
(JSC::constructAsyncGeneratorFunctionConstructor):
- runtime/BooleanConstructor.cpp:
(JSC::constructWithBooleanConstructor):
- runtime/CommonSlowPaths.cpp:
(JSC::SLOW_PATH_DECL):
(JSC::createInternalFieldObject):
- runtime/DateConstructor.cpp:
(JSC::constructDate):
- runtime/ErrorConstructor.cpp:
(JSC::constructErrorConstructor):
- runtime/FunctionConstructor.cpp:
(JSC::constructFunctionSkippingEvalEnabledCheck):
- runtime/InternalFunction.cpp:
(JSC::InternalFunction::createSubclassStructure):
(JSC::getFunctionRealm):
(JSC::InternalFunction::createSubclassStructureSlow): Deleted.
- runtime/InternalFunction.h:
(JSC::InternalFunction::createSubclassStructure): Deleted.
- runtime/IntlCollatorConstructor.cpp:
(JSC::constructIntlCollator):
(JSC::callIntlCollator):
- runtime/IntlCollatorConstructor.h:
- runtime/IntlDateTimeFormatConstructor.cpp:
(JSC::constructIntlDateTimeFormat):
(JSC::callIntlDateTimeFormat):
- runtime/IntlDateTimeFormatConstructor.h:
- runtime/IntlNumberFormatConstructor.cpp:
(JSC::constructIntlNumberFormat):
(JSC::callIntlNumberFormat):
- runtime/IntlNumberFormatConstructor.h:
- runtime/IntlPluralRulesConstructor.cpp:
(JSC::constructIntlPluralRules):
- runtime/IntlPluralRulesConstructor.h:
- runtime/IntlRelativeTimeFormatConstructor.cpp:
(JSC::constructIntlRelativeTimeFormat):
- runtime/IntlRelativeTimeFormatConstructor.h:
- runtime/JSArrayBufferConstructor.cpp:
(JSC::JSGenericArrayBufferConstructor<sharingMode>::constructArrayBuffer):
- runtime/JSFunction.cpp:
(JSC::JSFunction::prototypeForConstruction):
(JSC::JSFunction::getOwnPropertySlot):
- runtime/JSGenericTypedArrayViewConstructorInlines.h:
(JSC::constructGenericTypedArrayView):
- runtime/JSGlobalObjectInlines.h:
(JSC::JSGlobalObject::arrayStructureForIndexingTypeDuringAllocation const):
- runtime/MapConstructor.cpp:
(JSC::constructMap):
- runtime/NativeErrorConstructor.cpp:
(JSC::NativeErrorConstructor<errorType>::constructNativeErrorConstructor):
(JSC::NativeErrorConstructor<errorType>::callNativeErrorConstructor):
- runtime/NativeErrorConstructor.h:
- runtime/NumberConstructor.cpp:
(JSC::constructNumberConstructor):
- runtime/ObjectConstructor.cpp:
(JSC::constructObjectWithNewTarget):
- runtime/RegExpConstructor.cpp:
(JSC::getRegExpStructure):
(JSC::constructRegExp):
(JSC::esSpecRegExpCreate):
- runtime/RegExpConstructor.h:
- runtime/SetConstructor.cpp:
(JSC::constructSet):
- runtime/StringConstructor.cpp:
(JSC::constructWithStringConstructor):
- runtime/WeakMapConstructor.cpp:
(JSC::constructWeakMap):
- runtime/WeakObjectRefConstructor.cpp:
(JSC::constructWeakRef):
- runtime/WeakSetConstructor.cpp:
(JSC::constructWeakSet):
- wasm/js/WebAssemblyCompileErrorConstructor.cpp:
(JSC::constructJSWebAssemblyCompileError):
- wasm/js/WebAssemblyInstanceConstructor.cpp:
(JSC::constructJSWebAssemblyInstance):
- wasm/js/WebAssemblyLinkErrorConstructor.cpp:
(JSC::constructJSWebAssemblyLinkError):
- wasm/js/WebAssemblyModuleConstructor.cpp:
(JSC::WebAssemblyModuleConstructor::createModule):
- wasm/js/WebAssemblyRuntimeErrorConstructor.cpp:
(JSC::constructJSWebAssemblyRuntimeError):
Source/WebCore:
Accounts for InternalFunction::createSubclassStructure() signature change and
utilizes getFunctionRealm() helper to handle cross-realm JSBoundFunction and
ProxyObject instances as NewTarget value.
Tests: web-platform-tests/WebIDL/ecmascript-binding/constructors.html
web-platform-tests/custom-elements/htmlconstructor/newtarget.html
- bindings/js/JSDOMWrapperCache.h:
(WebCore::setSubclassStructureIfNeeded):
- bindings/js/JSHTMLElementCustom.cpp:
(WebCore::constructJSHTMLElement):
- 2:17 PM Changeset in webkit [260731] by
-
- 4 edits in trunk/Source
Use
static Lockinstead ofstatic NeverDestroyed<Lock>
https://bugs.webkit.org/show_bug.cgi?id=211036
Reviewed by Darin Adler.
Source/WebCore:
- platform/GenericTaskQueue.cpp:
(WebCore::TaskDispatcher<Timer>::sharedLock):
Source/WTF:
Lock can be static-initialized since it has constexpr constructor. No need to use NeverDestroyed<Lock>.
- wtf/Logger.h:
(WTF::Logger::observerLock):
- 2:11 PM Changeset in webkit [260730] by
-
- 15 edits5 adds in trunk
[JSC] ValueAdd, VaueSub, ValueMul, Inc, Dec should say SpecBigInt32 prediction based on ArithProfile
https://bugs.webkit.org/show_bug.cgi?id=211038
Reviewed by Filip Pizlo.
JSTests:
- stress/bigint32-add-overflow.js: Added.
(shouldBe):
(add):
(noInline):
- stress/bigint32-dec-overflow.js: Added.
(shouldBe):
(dec):
(noInline):
- stress/bigint32-inc-overflow.js: Added.
(shouldBe):
(inc):
(noInline):
- stress/bigint32-mul-overflow.js: Added.
(shouldBe):
(mul):
(noInline):
- stress/bigint32-sub-overflow.js: Added.
(shouldBe):
(sub):
(noInline):
Source/JavaScriptCore:
This patch adds profile feedback to ValueAdd, ValueSub, ValueMul, Inc, Dec to say SpecBigInt32 prediction.
Our HeapBigInt v.s. BigInt32 strategy is simpler than Double v.s. Int32 strategy: we always
prefer BigInt32 over HeapBigInt. This is because HeapBigInt calculation and conversion require
much higher cost than BigInt32. This tradeoff is largely different from Double v.s. Int32.
So keeping HeapBigInt is simply inefficient when we can use BigInt32.
This means that ArithProfile's feedback is also very simple. If we see HeapBigInt, this means
overflow happens. In DFG, we propagate this information to ValueAdd, ValueSub, and ValueMul nodes
and record it in DFGNodeFlags. And based on this information, we change the prediction and
speculation in prediction propagation and fixup phase.
We change exit reason from Overflow to BigInt32Overflow since Overflow is solely used for Int32 case,
and we have Int52Overflow for Int52 case. We should have BigInt32Overflow for BigInt32 to precisely
record and tell about what happens in DFG as a feedback for the next compilation.
We add BigInt32 speculation for ValueSub. Previously, we missed that in fixup phase and we always
speculate ValueSub with AnyBigIntUse or HeapBigIntUse. Now it can use BigInt32Use.
We also fix Inc / Dec's fixup phase to use BigInt path. Previously, it was always using UntypedUse since
node->child1()->shouldSpeculateUntypedForArithmetic()returns true for BigInt. We fix the ordering of
speculation attempts as it is done in the other places in fixup phase.
This patch offers 7.9% performance improvement in sunspider-sha1-big-int.
ToT Patched
sunspider-sha1-big-int 134.5668+-2.8695 124.6743+-0.7541 definitely 1.0793x faster
- bytecode/ExitKind.cpp:
(JSC::exitKindToString):
- bytecode/ExitKind.h:
- bytecode/SpeculatedType.h:
- dfg/DFGAbstractInterpreterInlines.h:
(JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):
- dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::makeSafe):
(JSC::DFG::ByteCodeParser::makeDivSafe):
- dfg/DFGFixupPhase.cpp:
(JSC::DFG::FixupPhase::fixupNode):
- dfg/DFGGraph.h:
(JSC::DFG::Graph::binaryArithShouldSpeculateBigInt32):
(JSC::DFG::Graph::unaryArithShouldSpeculateBigInt32):
- dfg/DFGNode.h:
(JSC::DFG::Node::mayHaveBigInt32Result):
(JSC::DFG::Node::mayHaveHeapBigIntResult):
(JSC::DFG::Node::mayHaveBigIntResult):
(JSC::DFG::Node::canSpeculateBigInt32):
(JSC::DFG::Node::canSpeculateInt52):
- dfg/DFGNodeFlags.cpp:
(JSC::DFG::dumpNodeFlags):
- dfg/DFGNodeFlags.h:
(JSC::DFG::nodeMayHaveHeapBigInt):
(JSC::DFG::nodeCanSpeculateBigInt32):
- dfg/DFGPredictionPropagationPhase.cpp:
- dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::compileValueAdd):
(JSC::DFG::SpeculativeJIT::compileValueSub):
(JSC::DFG::SpeculativeJIT::compileValueMul):
(JSC::DFG::SpeculativeJIT::compileValueDiv):
(JSC::DFG::SpeculativeJIT::speculateHeapBigInt):
- ftl/FTLLowerDFGToB3.cpp:
(JSC::FTL::DFG::LowerDFGToB3::compileValueAdd):
(JSC::FTL::DFG::LowerDFGToB3::compileValueSub):
(JSC::FTL::DFG::LowerDFGToB3::compileValueMul):
(JSC::FTL::DFG::LowerDFGToB3::compileValueDiv):
- 1:02 PM Changeset in webkit [260729] by
-
- 7 edits1 delete in trunk/Source
Remove unused class PlaybackSessionInterface
https://bugs.webkit.org/show_bug.cgi?id=211031
Reviewed by Daniel Bates.
Source/WebCore:
No new tests, no functional changes.
- WebCore.xcodeproj/project.pbxproj:
- platform/cocoa/PlaybackSessionInterface.h: Removed.
- platform/cocoa/PlaybackSessionModelMediaElement.h:
- platform/ios/PlaybackSessionInterfaceAVKit.h:
- platform/mac/PlaybackSessionInterfaceMac.h:
Source/WebKit:
- WebProcess/cocoa/PlaybackSessionManager.h:
- 12:51 PM Changeset in webkit [260728] by
-
- 2 edits in trunk/Source/WebInspectorUI
[Win] Fix windows build with MSBuild after 260672
https://bugs.webkit.org/show_bug.cgi?id=211047
Unreviewed build fix.
- CMakeLists.txt:
- 11:55 AM Changeset in webkit [260727] by
-
- 2 edits in trunk/Source/WTF
[WTF] Workaround gcc bug for unsigned bitfield related usual arithmetic conversions
https://bugs.webkit.org/show_bug.cgi?id=211044
Reviewed by Darin Adler.
- wtf/URL.cpp:
(WTF::URL::setHost):
(WTF::URL::setHostAndPort):
(WTF::URL::setUser):
(WTF::URL::setPassword):
- 9:34 AM Changeset in webkit [260726] by
-
- 2 edits in trunk/Source/WebCore
[LFC][TFC] Compute and distribute extra vertical space for rows
https://bugs.webkit.org/show_bug.cgi?id=211046
Reviewed by Antti Koivisto.
When the table computed height is bigger than the sum of the row heigts, we need to distribute the extra vertical
space among the non-fixed height rows. The distribution is based on the preferred height of those non-fixed rows.
- layout/tableformatting/TableFormattingContext.cpp:
(WebCore::Layout::TableFormattingContext::computeAndDistributeExtraVerticalSpace):
- 8:33 AM Changeset in webkit [260725] by
-
- 63 edits in trunk/Source
Stop using live ranges in functions that return range of the selection
https://bugs.webkit.org/show_bug.cgi?id=210396
Reviewed by Sam Weinig.
Source/WebCore:
- Added makeRangeSelectingNode, to create a range that selects a node and all its descendants.
- Improved intersectingNodes so it can now easily be used in a while loop style as well as the range-for loop style. Also made it more robust against tree changes while iterating; it will now always stop at the end of the document.
- Changed functions that work with selection to get a SimpleRange, and then either do all the work without a live range, or call createLiveRange right where it's needed, making it clearer when we can delete that call later as we cut down live ranges even more.
- accessibility/AccessibilityObject.cpp:
(WebCore::AccessibilityObject::selectionRange const): Return a SimpleRange
instead of a live range.
(WebCore::AccessibilityObject::findTextRanges const): Use createLiveRange
on the result of selectionRange since this still mostly uses live ranges.
- accessibility/AccessibilityObject.h: Updated for the above.
- accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::documentBasedSelectedTextRange const):
Updated to create a live range only in the one place we need to call a
Range class member function.
- accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
(-[WebAccessibilityObjectWrapper textMarkerRangeForSelection]):
Use createLiveRange here.
- dom/SimpleRange.cpp:
(WebCore::makeRangeSelectingNode): Added. For use when we need to make
a range that selects a node, not just the node's contents.
(WebCore::firstIntersectingNode): Renamed from IntersectingNodeRange::first
since this is now used in the iterator class, not the range class. Also
letting it be a non-member function so we can tweak it without touching
the haeder file.
(WebCore::nodePastLastIntersectingNode): Ditto.
(WebCore::IntersectingNodeIterator::IntersectingNodeIterator): Changed
this constructor to take a SimpleRange. To add the advanceSkippingChildren
feature, had to build the termination condition into the iterator rather
than basing it on the value of the sentinel.
(WebCore::IntersectingNodeIterator::advance): Added. Contains the logic
from the ++ operator, so it can be called in a more straightforward way
when this is being used with a while loop rather than a range-for loop.
(WebCore::IntersectingNodeIterator::advanceSkippingChildren): Added.
- dom/SimpleRange.h: Updated for the changes to IntersectingNodeIterator
and IntersectingNodeRange.
- editing/AlternativeTextController.cpp:
(WebCore::AlternativeTextController::timerFired): Use createLiveRange.
- editing/CompositeEditCommand.cpp:
(WebCore::CompositeEditCommand::targetRanges const): Use WTFMove in
a place where the old code was copying instead.
- editing/DeleteSelectionCommand.cpp:
(WebCore::DeleteSelectionCommand::makeStylingElementsDirectChildrenOfEditableRootToPreventStyleLoss):
Use intersectingNodes to make the function's logic easier to understand.
- editing/Editing.cpp:
(WebCore::visibleImageElementsInRangeWithNonLoadedImages): Changed
the argument type to SimpleRange.
- editing/Editing.h: Updated for the change above.
- editing/EditingStyle.cpp:
(WebCore::EditingStyle::styleAtSelectionStart): Use createLiveRange.
- editing/Editor.cpp:
(WebCore::Editor::selectedRange): Use createLiveRange.
(WebCore::Editor::applyStyleToSelection): Ditto.
(WebCore::Editor::applyParagraphStyleToSelection): Ditto.
(WebCore::Editor::insertTextWithoutSendingTextEvent): Ditto.
(WebCore::Editor::insertLineBreak): Ditto.
(WebCore::Editor::insertParagraphSeparator): Ditto.
(WebCore::Editor::ignoreSpelling): Remove use of live range.
(WebCore::Editor::learnSpelling): Ditto.
(WebCore::Editor::misspelledWordAtCaretOrRange const): Ditto.
(WebCore::Editor::isSelectionUngrammatical): Ditto.
(WebCore::Editor::guessesForMisspelledOrUngrammatical): Ditto.
(WebCore::Editor::markMisspellingsAfterTypingToWord): Use createLiveRange.
(WebCore::Editor::markMisspellingsOrBadGrammar): Ditto.
(WebCore::Editor::markMisspellingsAndBadGrammar): Ditto.
(WebCore::Editor::rangeForPoint): Ditto.
(WebCore::Editor::insertTextPlaceholder): Ditto.
(WebCore::Editor::shouldChangeSelection const): Ditto.
(WebCore::Editor::findString): Ditto.
(WebCore::Editor::rangeOfString): Ditto.
(WebCore::Editor::scanSelectionForTelephoneNumbers): Ditto.
(WebCore::Editor::editorUIUpdateTimerFired): Remove use of live range.
(WebCore::candidateRangeForSelection): Deleted.
(WebCore::Editor::stringForCandidateRequest const): Use createLiveRange
and merged in the logic from candidateRangeForSelection.
(WebCore::Editor::fontForSelection const): Remove use of live range.
- editing/EditorCommand.cpp:
(WebCore::expandSelectionToGranularity): Use createLiveRange.
(WebCore::executeDeleteToMark): Ditto.
(WebCore::executeSelectToMark): Ditto.
(WebCore::valueFormatBlock): Ditto.
- editing/FrameSelection.cpp:
(WebCore::FrameSelection::respondToNodeModification): Use createLiveRange.
(WebCore::FrameSelection::shouldDeleteSelection const): Ditto.
(WebCore::FrameSelection::getClippedVisibleTextRectangles const): Do the work
without a live range.
(WebCore::FrameSelection::expandSelectionToElementContainingCaretSelection): Ditto.
(WebCore::FrameSelection::elementRangeContainingCaretSelection const): Changed
to return a SimpleRange rather than a live range. Also removed redundant checks
and renamed locals to streamline the function.
(WebCore::FrameSelection::wordRangeContainingCaretSelection): Return a
SimpleRange instead of a live range.
(WebCore::FrameSelection::rangeByMovingCurrentSelection const): Ditto.
(WebCore::FrameSelection::rangeByExtendingCurrentSelection const): Ditto.
(WebCore::FrameSelection::rangeByAlteringCurrentSelection const): Ditto.
- editing/FrameSelection.h: Removed the toNormalizedRange function, since the
VisibleSelection class has a comment claiming most callers should not call it.
Updated forthe other changes above.
- editing/InsertListCommand.cpp:
(WebCore::InsertListCommand::doApply): Use createLiveRange.
- editing/ReplaceSelectionCommand.cpp:
(WebCore::ReplacementFragment::ReplacementFragment): Ditto.
- editing/TextCheckingHelper.cpp:
(WebCore::TextCheckingHelper::TextCheckingHelper): Remove use of live range,
changing the type of m_range to SimpleRange.
(WebCore::TextCheckingHelper::findFirstMisspellingOrBadGrammar): Reduce use
of live range.
(WebCore::TextCheckingHelper::findFirstGrammarDetail const): Use createLiveRange.
(WebCore::TextCheckingHelper::findFirstBadGrammar const): Ditto.
(WebCore::TextCheckingHelper::isUngrammatical const): Remove use of live range.
(WebCore::TextCheckingHelper::guessesForMisspelledOrUngrammaticalRange const):
Use createLiveRange.
(WebCore::TextCheckingHelper::unifiedTextCheckerEnabled const): Updated for
different interface to get the document for a SimpleRange.
- editing/TextCheckingHelper.h: Change constructor to take a SimpleRange.
- editing/TypingCommand.cpp:
(WebCore::TypingCommand::deleteKeyPressed): Use createLiveRange.
(WebCore::TypingCommand::forwardDeleteKeyPressed): Ditto.
- editing/VisibleSelection.cpp:
(WebCore::VisibleSelection::firstRange const): Return a SimpleRange.
(WebCore::VisibleSelection::toNormalizedRange const): Ditto.
- editing/VisibleSelection.h: Updated for the above.
- editing/cocoa/DictionaryLookup.mm: Removed an uneeded check of the
selection range against null. Code already guards against null endpoints.
- editing/cocoa/EditorCocoa.mm:
(WebCore::selectionAsAttributedString): Added. Uses the attributedString
function with it's new argument and return value types. There's no longer
a special function for the selection in the HTMLConverter header, so we
put it here instead.
(WebCore::Editor::writeSelectionToPasteboard): Updated to use the function
above and to deal with RetainPtr.
(WebCore::Editor::writeSelection): Ditto.
- editing/cocoa/HTMLConverter.h: Removed attributedStringFromSelection and
attributedStringBetweenStartAndEnd. Renamed attributedStringFromRange to
just attributedString and renamed editingAttributedStringFromRange to
just editingAttributedString. Also renamed IncludeImagesInAttributedString
to just IncludeImages.
- editing/cocoa/HTMLConverter.mm:
(HTMLConverter::HTMLConverter): Use a SimpleRange rther than two Position
arguments to the constructor.
(HTMLConverter::convert): Use RetainPtr for the return value and the
optional out argument.
(WebCore::attributedStringFromSelection): Deleted.
(WebCore::attributedStringBetweenStartAndEnd): Deleted.
(WebCore::attributedString): Renamed the version that takes a range and
made it take a SimpleRange, not a live range.
(WebCore::editingAttributedString): Ditto.
- editing/mac/EditorMac.mm:
(WebCore::Editor::dataSelectionForPasteboard): Updated for changes to
attributedString.
- html/HTMLTextAreaElement.cpp:
(WebCore::HTMLTextAreaElement::handleBeforeTextInsertedEvent const):
Changed to not use live ranges any more.
- page/ContextMenuController.cpp:
(WebCore::ContextMenuController::contextMenuItemSelected):
Use createLiveRange.
- page/DOMSelection.cpp:
(WebCore::DOMSelection::getRangeAt): Use createLiveRange.
(WebCore::DOMSelection::addRange): Use Ditto.
(WebCore::DOMSelection::deleteFromDocument): Ditto.
- page/DragController.cpp:
(WebCore::setSelectionToDragCaret): Removed in/out argument that was
used to update a range that was never looked at afterward.
(WebCore::DragController::concludeEditDrag): Use createLiveRange.
(WebCore::DragController::draggableElement const): Ditto.
(WebCore::DragController::startDrag): Ditto.
- page/EventHandler.cpp:
(WebCore::EventHandler::dispatchMouseEvent): Use createLiveRange.
(WebCore::EventHandler::sendContextMenuEventForKey): Ditto.
(WebCore::EventHandler::didStartDrag): Remove use of live range.
- page/Page.cpp:
(WebCore::Page::findStringMatchingRanges): Use createLiveRange.
- page/TextIndicator.cpp:
(WebCore::TextIndicator::createWithRange): Ditto.
(WebCore::TextIndicator::createWithSelectionInFrame): Ditto.
- page/mac/ServicesOverlayController.mm:
(WebCore::ServicesOverlayController::buildSelectionHighlight):
Use createLiveRange.
(WebCore::ServicesOverlayController::findTelephoneNumberHighlightContainingSelectionHighlight):
Use createLiveRange.
- rendering/HitTestResult.cpp:
(WebCore::HitTestResult::selectedText const): Remove use of
live range.
Source/WebKit:
- WebProcess/WebCoreSupport/gtk/WebEditorClientGtk.cpp:
(WebKit::WebEditorClient::updateGlobalSelection): Remove use of live range.
- WebProcess/WebPage/Cocoa/WebPageCocoa.mm:
(WebKit::WebPage::dictionaryPopupInfoForRange): Updated for changes
to attributedString functions.
(WebKit::WebPage::getContentsAsAttributedString): Ditto.
- WebProcess/WebPage/FindController.cpp:
(WebKit::FindController::updateFindUIAfterPageScroll): Use createLiveRange.
- WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::getSelectedRangeAsync): Ditto.
(WebKit::WebPage::currentSelectionAsRange): Ditto.
- WebProcess/WebPage/WebPage.h: Change m_rangeForDropSnapshot
to use a SimpleRange instead of a live range.
- WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::plainTextForContext): Overloaded for SimpleRange and
Optional<SimpleRange> as needed by code below.
(WebKit::plainTextForDisplay): Ditto.
(WebKit::WebPage::getPlatformEditorState const): Use createLiveRange.
(WebKit::WebPage::getSelectionContext): Remove use of live range.
(WebKit::WebPage::didConcludeDrop): Ditto.
(WebKit::WebPage::didConcludeEditDrag): Use createLiveRange.
(WebKit::WebPage::computeAndSendEditDragSnapshot): Ditto.
(WebKit::WebPage::startAutoscrollAtPosition): Remove use of
live range.
(WebKit::WebPage::requestEvasionRectsAboveSelection): Use
createLiveRange.
(WebKit::WebPage::requestDictationContext): Remove use of live range.
(WebKit::WebPage::replaceSelectedText): Use createLiveRange.
(WebKit::WebPage::applyAutocorrectionInternal): Ditto.
(WebKit::WebPage::autocorrectionContext): Remove use of live range.
(WebKit::WebPage::requestDocumentEditingContext): Use createLiveRange.
- WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::getPlatformEditorState const): Remove use of
live range.
(WebKit::WebPage::attributedSubstringForCharacterRangeAsync):
Updated for change to HTMLConverter functions.
(WebKit::WebPage::handleSelectionServiceClick): Ditto.
(WebKit::WebPage::performImmediateActionHitTestAtLocation):
Remove use of live range.
Source/WebKitLegacy/ios:
- WebCoreSupport/WebFrameIOS.mm:
(-[WebFrame selectionRectsForCoreRange:]): Changed argument type to
not require a live range. Internally, use createLiveRange and also
use a range-for loop.
(-[WebFrame selectionRectsForRange:]): Remove use of live range.
(-[WebFrame selectionRects]): Ditto.
Source/WebKitLegacy/mac:
- WebCoreSupport/WebEditorClient.mm:
(WebEditorClient::handleRequestedCandidates): Remove use of live range.
- WebCoreSupport/WebSelectionServiceController.mm:
(WebSelectionServiceController::handleSelectionServiceClick): Ditto.
- WebView/WebFrame.mm:
(-[WebFrame _rangeByAlteringCurrentSelection:direction:granularity:]):
Use createLiveRange.
(-[WebFrame _convertToNSRange:]): Changed to take SimpleRange.
(-[WebFrame _convertDOMRangeToNSRange:]): Updated for the above.
(-[WebFrame _markDOMRange]): Use createLiveRange.
(-[WebFrame _selectionRangeForFirstPoint:secondPoint:]): Ditto.
(-[WebFrame _selectionRangeForPoint:]): Ditto.
(-[WebFrame _selectedNSRange]): Remove use of live range.
(-[WebFrame selectedDOMRange]): Use crateLiveRange.
(-[WebFrame elementRangeContainingCaretSelection]): Ditto.
(-[WebFrame expandSelectionToWordContainingCaretSelection]): Tweaked
coding style a little.
(-[WebFrame expandSelectionToStartOfWordContainingCaretSelection]): Ditto.
(-[WebFrame wordRangeContainingCaretSelection]): Use createLiveRange.
(-[WebFrame rangeByMovingCurrentSelection:]): Ditto.
(-[WebFrame rangeByExtendingCurrentSelection:]): Ditto.
(-[WebFrame _replaceSelectionWithText:selectReplacement:smartReplace:matchStyle:]):
Use createLiveRange.
(-[WebFrame _replaceSelectionWithText:selectReplacement:smartReplace:]): Ditto.
(-[WebFrame _documentFragmentForText:]): Ditto.
- WebView/WebFrameInternal.h: Updated for changes above.
- WebView/WebHTMLRepresentation.mm:
(-[WebHTMLRepresentation attributedStringFrom:startOffset:to:endOffset:]):
Remove use of live range.
- WebView/WebHTMLView.mm:
(-[WebHTMLView _selectedRange]): Use createLiveRange.
(-[WebHTMLView _lookUpInDictionaryFromMenu:]): Remove use of live range.
(-[WebHTMLView markedRange]): Updated for change to _convertToNSRange.
(-[WebHTMLView attributedSubstringFromRange:]): Ditto.
(-[WebHTMLView _attributedStringFromDOMRange:]): Updated for changes to
HTMLConverter.
(-[WebHTMLView _legacyAttributedStringFrom:offset:to:offset:]): Remove
use of live range.
(-[WebHTMLView attributedString]): Ditto.
(-[WebHTMLView selectedAttributedString]): Ditto.
- WebView/WebImmediateActionController.h: Updated method to take a
SimpleRange instead of a live range.
- WebView/WebImmediateActionController.mm:
(+[WebImmediateActionController _dictionaryPopupInfoForRange:inFrame:withLookupOptions:indicatorOptions:transition:]):
Remove use of live range.
- WebView/WebTextCompletionController.mm:
(-[WebTextCompletionController doCompletion]): Use createLiveRange.
- WebView/WebView.mm:
(-[WebView _didConcludeEditDrag]): Ditto.
Source/WebKitLegacy/win:
- WebView.cpp:
(WebView::prepareCandidateWindow): Updated since toNormalizedRange
returns a SimpleRange.
(WebView::onIMERequestCharPosition): Ditto.
(WebView::onIMERequestReconvertString): Ditto.
- 7:53 AM Changeset in webkit [260724] by
-
- 13 edits1 copy1 add1 delete in trunk/Source/WebCore
Remove unnecessary inlining and templates for URL decomposition DOM functions
https://bugs.webkit.org/show_bug.cgi?id=211025
Reviewed by Alex Christensen.
- Headers.cmake: Renamed URLUtils.h to URLDecomposition.h.
- Modules/cache/DOMCacheStorage.cpp: Updated include and using namespace.
- Sources.txt: Added URLDecomposition.cpp.
- WebCore.xcodeproj/project.pbxproj: Added URLDecomposition.cpp and
renamed URLUtils.h to URLDecomposition.h.
- html/DOMURL.h: Removed the WEBCORE_EXPORT on this class. Added final.
Derive from URLDecomposition instead of URLUtils. Changed return type of
href to const&. Moved toJSON here from URLUtils. Added overrides of the
fullURL and setFullURL functions for URLDecomposition.
- html/DOMURL.idl: Removed ImplementationLacksVTable.
- html/HTMLAnchorElement.cpp:
(WebCore::HTMLAnchorElement::HTMLAnchorElement): Moved initialization of
boolean data members to the class definition.
- html/HTMLAnchorElement.h: Derive from URLDecomposition instead of
URLUtils. Added overrides of the fullURL and setFullURL functions for
URLDecomposition. Initialize data members here in the class definition.
- html/HTMLMediaElement.cpp: Removed unnecessary include of DOMURL.h.
- html/URLDecomposition.cpp: Added. Contains most of the code from
the URLUtils class template, which no longer needs to be in a header.
- html/URLDecomposition.h: Renamed URLUtils.h to this. It's now an
abstract base class rather than a class template using the curiously
recurring template pattern.
- html/URLSearchParams.h: Forward-declare DOMURL rather than including
the DOMURL.h header.
- html/URLUtils.h: Removed. Renamed to URLDecompostion.h.
- page/DOMWindow.cpp: Removed unneeded include of DOMURL.h.
- testing/Internals.cpp: Added include of DOMURL.h.
- 12:37 AM Changeset in webkit [260723] by
-
- 2 edits in trunk/Source/WebCore
fast/scrolling/scroll-behavior-invalidate-if-disabled.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=210917
Reviewed by Darin Adler.
The flaky failure is caused by reusing the CSSPropertyInfo value cached propertyInfoCache
after experimental flags changed. Add propertyInfoFromJavaScriptCSSPropertyName
to perform disabled checking after parsing. If the property is disabled, it will return
an invalid CSSPropertyInfo instead.
- css/CSSStyleDeclaration.cpp:
(WebCore::CSSStyleDeclaration::getCSSPropertyIDFromJavaScriptPropertyName):
(WebCore::CSSStyleDeclaration::namedItem):
(WebCore::CSSStyleDeclaration::setNamedItem):
Apr 25, 2020:
- 10:07 PM Changeset in webkit [260722] by
-
- 12 edits in trunk/Source
[JSC] isCallable is redundant with isFunction
https://bugs.webkit.org/show_bug.cgi?id=211037
Reviewed by Yusuke Suzuki.
Source/JavaScriptCore:
isCallable is only being used in two places and has the same definition as isFunction (aside from out params).
Where CallData is needed, getCallData should be used; where CallData is not needed, isFunction should be used.
- runtime/JSCJSValue.h:
- runtime/JSCJSValueInlines.h:
(JSC::JSValue::isCallable const): Deleted.
- runtime/JSCell.h:
- runtime/JSCellInlines.h:
(JSC::JSCell::isCallable): Deleted.
Remove isCallable.
- runtime/JSONObject.cpp:
(JSC::Stringifier::Stringifier):
(JSC::Stringifier::toJSON):
Use getCallData if you need CallData.
- runtime/ExceptionHelpers.cpp:
(JSC::errorDescriptionForValue):
- runtime/ObjectConstructor.cpp:
(JSC::toPropertyDescriptor):
- runtime/ObjectPrototype.cpp:
(JSC::objectProtoFuncDefineGetter):
(JSC::objectProtoFuncDefineSetter):
Don't use getCallData if you don't need CallData.
Source/WebCore:
- bindings/js/JSDOMConvertScheduledAction.h:
(WebCore::Converter<IDLScheduledAction>::convert):
- worklets/PaintWorkletGlobalScope.cpp:
(WebCore::PaintWorkletGlobalScope::registerPaint):
Don't use getCallData if you don't need CallData.
- 9:57 PM Changeset in webkit [260721] by
-
- 2 edits in trunk/Source/WebKit
Fix internal iOS build.
https://bugs.webkit.org/show_bug.cgi?id=210521
- Shared/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.mm:
(WebKit::WebPaymentCoordinatorProxy::platformBeginApplePaySetup):
- 9:44 PM Changeset in webkit [260720] by
-
- 3 edits1 add in trunk
[JSC] Handle BigInt32 INT32_MIN shift amount
https://bugs.webkit.org/show_bug.cgi?id=211030
Reviewed by Darin Adler.
JSTests:
- stress/bigint-int32-min-shift.js: Added.
(shouldBe):
(shouldThrow):
Source/JavaScriptCore:
Our BigInt shift-operation does not correctly handle INT32_MIN shift amount, and producing a wrong result.
This patch fixes it.
- runtime/Operations.h:
(JSC::shift):
- 9:09 PM Changeset in webkit [260719] by
-
- 2 edits in trunk/Source/WebCore
Build fix.
https://bugs.webkit.org/show_bug.cgi?id=210521
- Modules/applepay/ApplePaySetupFeature.mm:
- 8:32 PM Changeset in webkit [260718] by
-
- 15 edits17 adds7 deletes in trunk/Source
Move ApplePay code from WebKitAdditions to WebCore and WebKit
https://bugs.webkit.org/show_bug.cgi?id=210521
Source/WebCore:
I accidentally committed an older version of the patch.
This is the diff between the two to fix the internal build.
Source/WebCore/PAL:
Reviewed by Andy Estes.
- pal/cocoa/PassKitSoftLink.h:
- pal/cocoa/PassKitSoftLink.mm:
- pal/spi/cocoa/PassKitSPI.h:
- 8:03 PM Changeset in webkit [260717] by
-
- 39 edits17 adds in trunk/Source
Move ApplePay code from WebKitAdditions to WebCore and WebKit
https://bugs.webkit.org/show_bug.cgi?id=210521
Reviewed by Andy Estes.
Source/WebCore:
Only 4 minor modifications were necessary, as follows:
- PaymentSetupFeatures's RetainPtr<NSArray<PKPaymentSetupFeature *>> was changed to RetainPtr<NSArray> to work with C++.
- WebPaymentCoordinatorProxyAdditions messages were moved to WebPaymentCoordinatorProxy, removing the need for the extra message receiver, the Optional<WebPaymentCoordinatorProxyAdditions>, and the finishConstruction.
- WebMediaSessionManager.cpp's macros that collided with other macros were renamed. This was necessary because of different source unification.
- PaymentSetupFeatures.h was renamed to ApplePayPaymentSetupFeatures.h to be able to build with PaymentSetupFeatures.h in the SDK.
The rest is just copy and paste.
There isn't a good way to land this without breaking the build without removing the files from WebKitAdditions at the same time,
so I'll do the two at the same time late at night to not cause disruption.
- DerivedSources.make:
- Modules/applepay/ApplePayInstallmentConfiguration.h: Added.
- Modules/applepay/ApplePayInstallmentConfiguration.idl: Added.
- Modules/applepay/ApplePayPayment.h:
- Modules/applepay/ApplePayPayment.idl:
- Modules/applepay/ApplePayPaymentMethod.h:
- Modules/applepay/ApplePayPaymentMethod.idl:
- Modules/applepay/ApplePayPaymentMethodUpdate.h:
- Modules/applepay/ApplePayPaymentMethodUpdate.idl:
- Modules/applepay/ApplePayRequestBase.cpp:
(WebCore::finishConverting):
(WebCore::requiresSupportedNetworks):
- Modules/applepay/ApplePayRequestBase.h:
- Modules/applepay/ApplePaySession.cpp:
(WebCore::finishConverting):
- Modules/applepay/ApplePaySessionPaymentRequest.h:
(WebCore::ApplePaySessionPaymentRequest::installmentConfiguration const):
(WebCore::ApplePaySessionPaymentRequest::setInstallmentConfiguration):
- Modules/applepay/ApplePaySetup.cpp: Added.
(WebCore::shouldDiscloseFeatures):
(WebCore::ApplePaySetup::getSetupFeatures):
(WebCore::ApplePaySetup::begin):
(WebCore::ApplePaySetup::ApplePaySetup):
(WebCore::ApplePaySetup::stop):
(WebCore::ApplePaySetup::suspend):
- Modules/applepay/ApplePaySetup.h: Added.
(WebCore::ApplePaySetup::create):
- Modules/applepay/ApplePaySetup.idl: Added.
- Modules/applepay/ApplePaySetupFeature.h: Added.
(WebCore::ApplePaySetupFeature::create):
(WebCore::ApplePaySetupFeature::platformFeature const):
- Modules/applepay/ApplePaySetupFeature.idl: Added.
- Modules/applepay/ApplePaySetupFeature.mm: Added.
(WebCore::ApplePaySetupFeature::type const):
(WebCore::ApplePaySetupFeature::state const):
(WebCore::ApplePaySetupFeature::supportsInstallments const):
(WebCore::ApplePaySetupFeature::ApplePaySetupFeature):
- Modules/applepay/ApplePaySetupFeatureType.h: Added.
- Modules/applepay/ApplePaySetupFeatureType.idl: Added.
- Modules/applepay/PaymentCoordinatorClient.h:
(WebCore::PaymentCoordinatorClient::getSetupFeatures):
(WebCore::PaymentCoordinatorClient::beginApplePaySetup):
(WebCore::PaymentCoordinatorClient::endApplePaySetup):
- Modules/applepay/PaymentInstallmentConfiguration.h: Added.
- Modules/applepay/PaymentInstallmentConfiguration.mm: Added.
(WebCore::toDecimalNumber):
(WebCore::platformFeatureType):
(WebCore::createPlatformConfiguration):
(WebCore::PaymentInstallmentConfiguration::PaymentInstallmentConfiguration):
(WebCore::PaymentInstallmentConfiguration::platformConfiguration const):
- Modules/applepay/PaymentMethodUpdate.h:
- Modules/applepay/cocoa/PaymentCocoa.mm:
(WebCore::finishConverting):
- Modules/applepay/cocoa/PaymentMethodCocoa.mm:
(WebCore::finishConverting):
- Modules/applepay/cocoa/PaymentMethodUpdateCocoa.mm:
(WebCore::PaymentMethodUpdate::setInstallmentGroupIdentifier):
- Modules/applepay/cocoa/PaymentSessionErrorCocoa.mm:
(WebCore::additionalError):
- Modules/applepay/paymentrequest/ApplePayRequest.idl:
- Modules/mediasession/WebMediaSessionManager.cpp:
(WebCore::WebMediaSessionManager::setMockMediaPlaybackTargetPickerEnabled):
(WebCore::WebMediaSessionManager::setMockMediaPlaybackTargetPickerState):
(WebCore::WebMediaSessionManager::mockMediaPlaybackTargetPickerDismissPopup):
(WebCore::WebMediaSessionManager::addPlaybackTargetPickerClient):
(WebCore::WebMediaSessionManager::removePlaybackTargetPickerClient):
(WebCore::WebMediaSessionManager::removeAllPlaybackTargetPickerClients):
(WebCore::WebMediaSessionManager::showPlaybackTargetPicker):
(WebCore::WebMediaSessionManager::clientStateDidChange):
(WebCore::WebMediaSessionManager::setPlaybackTarget):
(WebCore::WebMediaSessionManager::externalOutputDeviceAvailableDidChange):
(WebCore::WebMediaSessionManager::playbackTargetPickerWasDismissed):
(WebCore::WebMediaSessionManager::configurePlaybackTargetClients):
(WebCore::WebMediaSessionManager::configurePlaybackTargetMonitoring):
(WebCore::WebMediaSessionManager::configureWatchdogTimer):
(WebCore::WebMediaSessionManager::watchdogTimerFired):
- SourcesCocoa.txt:
- WebCore.xcodeproj/project.pbxproj:
- platform/cocoa/WebCoreAdditions.mm:
Source/WebCore/PAL:
- pal/cocoa/PassKitSoftLink.h:
- pal/cocoa/PassKitSoftLink.mm:
- pal/spi/cocoa/PassKitSPI.h:
Source/WebKit:
- DerivedSources.make:
- Scripts/webkit/messages.py:
- Shared/ApplePay/ApplePayPaymentSetupFeatures.h: Added.
(WebKit::PaymentSetupFeatures::platformFeatures const):
- Shared/ApplePay/ApplePayPaymentSetupFeatures.mm: Added.
(WebKit::PaymentSetupFeatures::PaymentSetupFeatures):
(WebKit::PaymentSetupFeatures::encode const):
(WebKit::PaymentSetupFeatures::decode):
(WebKit::PaymentSetupFeatures::operator Vector<Ref<WebCore::ApplePaySetupFeature>> const):
- Shared/ApplePay/PaymentSetupConfiguration.h: Added.
(WebKit::PaymentSetupConfiguration::platformConfiguration const):
- Shared/ApplePay/PaymentSetupConfiguration.mm: Added.
(WebKit::toPlatformConfiguration):
(WebKit::PaymentSetupConfiguration::PaymentSetupConfiguration):
(WebKit::PaymentSetupConfiguration::encode const):
(WebKit::PaymentSetupConfiguration::decode):
- Shared/ApplePay/WebPaymentCoordinatorProxy.cpp:
- Shared/ApplePay/WebPaymentCoordinatorProxy.h:
(WebKit::WebPaymentCoordinatorProxy::finishConstruction): Deleted.
- Shared/ApplePay/WebPaymentCoordinatorProxy.messages.in:
- Shared/ApplePay/cocoa/PaymentSetupConfiguration.mm: Added.
(WebKitAdditions::toPlatformConfiguration):
(WebKitAdditions::PaymentSetupConfiguration::PaymentSetupConfiguration):
(WebKitAdditions::PaymentSetupConfiguration::encode const):
(WebKitAdditions::PaymentSetupConfiguration::decode):
- Shared/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.mm:
(WebKit::finishCreating):
(WebKit::WebPaymentCoordinatorProxy::getSetupFeatures):
(WebKit::WebPaymentCoordinatorProxy::beginApplePaySetup):
(WebKit::WebPaymentCoordinatorProxy::endApplePaySetup):
(WebKit::WebPaymentCoordinatorProxy::platformBeginApplePaySetup):
(WebKit::WebPaymentCoordinatorProxy::platformEndApplePaySetup):
- Shared/Cocoa/WebCoreArgumentCodersCocoa.mm:
(IPC::finishDecoding):
(IPC::finishEncoding):
(IPC::ArgumentCoder<WebCore::PaymentInstallmentConfiguration>::encode):
(IPC::ArgumentCoder<WebCore::PaymentInstallmentConfiguration>::decode):
- SourcesCocoa.txt:
- WebKit.xcodeproj/project.pbxproj:
- WebProcess/ApplePay/WebPaymentCoordinator.cpp:
(WebKit::WebPaymentCoordinator::getSetupFeatures):
(WebKit::WebPaymentCoordinator::beginApplePaySetup):
(WebKit::WebPaymentCoordinator::endApplePaySetup):
- WebProcess/ApplePay/WebPaymentCoordinator.h:
- 6:24 PM Changeset in webkit [260716] by
-
- 8 edits in trunk/Source/WebCore
Commit the scrolling tree from the main thread
https://bugs.webkit.org/show_bug.cgi?id=211026
<rdar://problem/62374855>
Reviewed by Darin Adler.
ScrollingCoordinatorMac::commitTreeStateIfNeeded() passed the new state tree to
the scrolling thread which then did the commit (which updates the scrolling tree
from the state tree). However, applyLayerPositions() immediately waited for that
commit to complete, blocking the main thread anyway.
We might as well just commit the scrolling tree on the main thread. ScrollingTree::commitTreeState()
locks m_treeMutex, so this is still safe. Lock contention with the scrolling or event dispatcher
threads should be rare; those threads are both mostly responsive.
- page/scrolling/AsyncScrollingCoordinator.cpp:
(WebCore::AsyncScrollingCoordinator::scrollingTreeAsText const):
- page/scrolling/ScrollingTree.cpp:
(WebCore::ScrollingTree::commitTreeState):
- page/scrolling/ScrollingTree.h:
(WebCore::ScrollingTree::waitForScrollingTreeCommit): Deleted.
- page/scrolling/ThreadedScrollingTree.cpp:
(WebCore::ThreadedScrollingTree::commitTreeState): Deleted.
(WebCore::ThreadedScrollingTree::incrementPendingCommitCount): Deleted.
(WebCore::ThreadedScrollingTree::decrementPendingCommitCount): Deleted.
(WebCore::ThreadedScrollingTree::waitForPendingCommits): Deleted.
(WebCore::ThreadedScrollingTree::waitForScrollingTreeCommit): Deleted.
(WebCore::ThreadedScrollingTree::applyLayerPositions): Deleted.
- page/scrolling/ThreadedScrollingTree.h:
- page/scrolling/mac/ScrollingCoordinatorMac.mm:
(WebCore::ScrollingCoordinatorMac::commitTreeStateIfNeeded):
- page/scrolling/nicosia/ScrollingCoordinatorNicosia.cpp:
(WebCore::ScrollingCoordinatorNicosia::commitTreeState):
- 6:01 PM Changeset in webkit [260715] by
-
- 2 edits in trunk/Source/WTF
Unreviewed. Remove the bulid warnings below since r260707.
warning: comparison of integer expressions of different signedness: ‘unsigned int’ and ‘int’ [-Wsign-compare]
- wtf/URL.cpp:
(WTF::URL::setHost):
(WTF::URL::setHostAndPort):
(WTF::URL::setUser):
(WTF::URL::setPassword):
- 5:31 PM Changeset in webkit [260714] by
-
- 5 edits in trunk/Source/WebCore
Use static initialized Lock instead of LazyNeverDestroyed<Lock>
https://bugs.webkit.org/show_bug.cgi?id=211010
Reviewed by Mark Lam.
WTF::Lock can be static-initialized, so no need to use LazyNeverDestroyed<Lock>.
- Modules/webgpu/WebGPUDevice.cpp:
(WebCore::WebGPUDevice::instancesMutex):
- Modules/webgpu/WebGPUPipeline.cpp:
(WebCore::WebGPUPipeline::instancesMutex):
- html/canvas/CanvasRenderingContext.cpp:
(WebCore::CanvasRenderingContext::instancesMutex):
- html/canvas/WebGLProgram.cpp:
(WebCore::WebGLProgram::instancesMutex):
- 5:13 PM Changeset in webkit [260713] by
-
- 2 edits in trunk/LayoutTests
[GTK] Gardening, temporarily skip WebInspector tests after r210942 and r260696
https://bugs.webkit.org/show_bug.cgi?id=211035
Unreviewed gardening.
- platform/gtk/TestExpectations:
- 5:00 PM Changeset in webkit [260712] by
-
- 24 edits in trunk
[Cocoa] Deal with another round of Xcode upgrade checks
https://bugs.webkit.org/show_bug.cgi?id=211027
Reviewed by Alexey Proskuryakov.
Source/bmalloc:
- bmalloc.xcodeproj/project.pbxproj: Bump the upgrade check version.
Add a harmless base localization; this project contains nothing localized.
Source/JavaScriptCore:
- JavaScriptCore.xcodeproj/project.pbxproj: Bump the upgrade check version.
Add a harmless base localization; this project contains nothing localized.
Source/ThirdParty:
- gtest/xcode/gtest.xcodeproj/project.pbxproj: Bump the upgrade check version.
Add a harmless base localization, rename English localization to en,
remove Japanese, French, German; this project contains nothing localized.
Source/ThirdParty/ANGLE:
- ANGLE.xcodeproj/project.pbxproj: Bump the upgrade check version.
Add a harmless base localization, rename English localization to en,
remove Japanese, French, German; this project contains nothing localized.
Source/WebCore:
- WebCore.xcodeproj/project.pbxproj: Bump the upgrade check version.
Source/WebCore/PAL:
- PAL.xcodeproj/project.pbxproj: Bump the upgrade check version.
Source/WebInspectorUI:
- WebInspectorUI.xcodeproj/project.pbxproj: Bump the upgrade check version.
Add a harmless base localization; this project contains nothing localized.
Source/WebKit:
- WebKit.xcodeproj/project.pbxproj: Bump the upgrade check version.
Add a base localization.
Source/WebKitLegacy:
- WebKitLegacy.xcodeproj/project.pbxproj: Bump the upgrade check version.
Source/WTF:
- WTF.xcodeproj/project.pbxproj: Bump the upgrade check version.
Add a harmless base localization; this project contains nothing localized.
Tools:
- DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj: Bump the upgrade check version.
- TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: Bump the upgrade check version.
Add a harmless base localization; this project contains nothing localized. Also let the
script sort the project.
- WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj: Bump the upgrade check version.
Add a harmless base localization; this project contains nothing localized. Also let the
script sort the project.
- 4:56 PM Changeset in webkit [260711] by
-
- 4 edits2 adds in trunk
[JSC] Add fast path for BigInt32 left-shift
https://bugs.webkit.org/show_bug.cgi?id=211029
Reviewed by Saam Barati.
JSTests:
- stress/bigint-left-shift-overflow.js: Added.
(shouldBe):
(leftShift):
(noInline):
- stress/bigint-right-shift-large.js: Added.
(shouldBe):
Source/JavaScriptCore:
Currently, the left-shift operation misses the fast path for BigInt32 <> BigInt32 case. This patch adds it. We also fixes
prediction-propagation for left/right shift to use existing heap prediction instead of polluting the result with SpecBigInt.
This offer 4.5% improvement in microbenchmarks/sunspider-sha1-big-int.js.
- dfg/DFGPredictionPropagationPhase.cpp:
- runtime/Operations.h:
(JSC::shift):
- 4:47 PM Changeset in webkit [260710] by
-
- 2 edits in trunk/Source/JavaScriptCore
Unreviewed fix for JSC Debug tests following r210853.
- runtime/IntlObject.cpp:
(JSC::canonicalizeLanguageTag):
(JSC::canonicalizeLocaleList):
(JSC::defaultLocale):
Deal with unchecked exception by moving tryGetUtf8 call out of canonicalizeLanguageTag; it's meant to
verify the user input from canonicalizeLocaleList and needn't change the noexcept-ness of defaultLocale.
- 2:28 PM Changeset in webkit [260709] by
-
- 123 edits in trunk/Source
Prepare to remove automatic URL->String conversion operators
https://bugs.webkit.org/show_bug.cgi?id=211007
Patch by Alex Christensen <achristensen@webkit.org> on 2020-04-25
Reviewed by Darin Adler.
Source/JavaScriptCore:
- API/JSAPIGlobalObject.mm:
(JSC::JSAPIGlobalObject::moduleLoaderResolve):
(JSC::JSAPIGlobalObject::moduleLoaderImportModule):
- API/JSScript.mm:
(validateBytecodeCachePath):
(+[JSScript scriptOfType:memoryMappedFromASCIIFile:withSourceURL:andBytecodeCache:inVirtualMachine:error:]):
- inspector/ScriptDebugServer.cpp:
(Inspector::ScriptDebugServer::sourceParsed):
- parser/Nodes.h:
(JSC::ScopeNode::sourceURL const):
- runtime/CachedTypes.cpp:
(JSC::CachedSourceProviderShape::encode):
- runtime/Error.cpp:
(JSC::addErrorInfo):
- runtime/ScriptExecutable.h:
(JSC::ScriptExecutable::sourceURL const):
Source/WebCore:
- Modules/cache/DOMCache.cpp:
(WebCore::DOMCache::requestFromInfo):
- Modules/fetch/FetchRequest.cpp:
(WebCore::FetchRequest::urlString const):
- Modules/fetch/FetchResponse.cpp:
(WebCore::FetchResponse::fetch):
- Modules/websockets/WebSocket.cpp:
(WebCore::WebSocket::create):
- accessibility/AccessibilityImageMapLink.cpp:
(WebCore::AccessibilityImageMapLink::stringValueForMSAA const):
- bindings/IDLTypes.h:
(WebCore::IDLString::isNullValue):
- bindings/js/CachedScriptSourceProvider.h:
(WebCore::CachedScriptSourceProvider::CachedScriptSourceProvider):
- bindings/js/JSDOMConvertStrings.h:
(WebCore::JSConverter<IDLDOMString>::convert):
(WebCore::Converter<IDLUSVString>::convert):
(WebCore::JSConverter<IDLUSVString>::convert):
- bindings/js/ScriptController.cpp:
(WebCore::ScriptController::evaluateInWorld):
(WebCore::ScriptController::evaluateModule):
(WebCore::ScriptController::callInWorld):
(WebCore::ScriptController::executeIfJavaScriptURL):
- bindings/js/SerializedScriptValue.cpp:
(WebCore::CloneSerializer::dumpIfTerminal):
(WebCore::CloneSerializer::write):
- css/CSSCursorImageValue.cpp:
(WebCore::CSSCursorImageValue::updateCursorElement):
- css/CSSImageValue.cpp:
(WebCore::CSSImageValue::customCSSText const):
(WebCore::CSSImageValue::createDeprecatedCSSOMWrapper const):
- css/parser/CSSPropertyParser.cpp:
(WebCore::consumeFontFaceSrcURI):
- dom/Document.cpp:
(WebCore::Document::processHttpEquiv):
- dom/ExtensionStyleSheets.cpp:
(WebCore::createExtensionsStyleSheet):
- dom/InlineStyleSheetOwner.cpp:
(WebCore::InlineStyleSheetOwner::createSheet):
- dom/ScriptElement.cpp:
(WebCore::ScriptElement::requestModuleScript):
(WebCore::ScriptElement::executeClassicScript):
- dom/StyledElement.cpp:
(WebCore::StyledElement::styleAttributeChanged):
- editing/cocoa/WebContentReaderCocoa.mm:
(WebCore::sanitizeMarkupWithArchive):
(WebCore::WebContentReader::readWebArchive):
- html/HTMLFormControlElement.cpp:
(WebCore::HTMLFormControlElement::formAction const):
- html/HTMLFrameElementBase.cpp:
(WebCore::HTMLFrameElementBase::canLoadURL const):
- html/HTMLLinkElement.cpp:
(WebCore::HTMLLinkElement::shouldLoadLink):
- html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::selectNextSourceChild):
- html/HTMLPlugInImageElement.cpp:
(WebCore::HTMLPlugInImageElement::canLoadURL const):
- html/parser/XSSAuditor.cpp:
(WebCore::XSSAuditor::filterToken):
- inspector/InspectorAuditResourcesObject.cpp:
(WebCore::InspectorAuditResourcesObject::getResources):
- inspector/InspectorStyleSheet.cpp:
(WebCore::buildArrayForGroupings):
- inspector/NetworkResourcesData.cpp:
(WebCore::NetworkResourcesData::responseReceived):
- inspector/agents/InspectorNetworkAgent.cpp:
(WebCore::InspectorNetworkAgent::buildObjectForCachedResource):
(WebCore::InspectorNetworkAgent::willSendRequest):
- inspector/agents/InspectorPageAgent.cpp:
(WebCore::InspectorPageAgent::getCookies):
(WebCore::InspectorPageAgent::searchInResources):
(WebCore::InspectorPageAgent::buildObjectForFrameTree):
- inspector/agents/InspectorWorkerAgent.cpp:
(WebCore::InspectorWorkerAgent::connectToWorkerInspectorProxy):
- inspector/agents/WebConsoleAgent.cpp:
(WebCore::WebConsoleAgent::didFailLoading):
- inspector/agents/worker/ServiceWorkerAgent.cpp:
(WebCore::ServiceWorkerAgent::getInitializationInfo):
- loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::subresources const):
- loader/DocumentLoader.h:
(WebCore::DocumentLoader::clientRedirectDestinationForHistory const):
(WebCore::DocumentLoader::serverRedirectDestinationForHistory const):
- loader/FrameLoader.cpp:
(WebCore::FrameLoader::submitForm):
(WebCore::FrameLoader::receivedFirstData):
(WebCore::FrameLoader::loadInSameDocument):
(WebCore::FrameLoader::loadedResourceFromMemoryCache):
(WebCore::createWindow):
- loader/HistoryController.cpp:
(WebCore::HistoryController::currentItemShouldBeReplaced const):
- loader/ImageLoader.cpp:
(WebCore::ImageLoader::updateFromElement):
(WebCore::ImageLoader::dispatchPendingBeforeLoadEvent):
- loader/LinkLoader.cpp:
(WebCore::LinkLoader::preloadIfNeeded):
(WebCore::LinkLoader::prefetchIfNeeded):
- loader/MixedContentChecker.cpp:
(WebCore::MixedContentChecker::checkFormForMixedContent const):
- loader/NavigationScheduler.cpp:
(WebCore::NavigationScheduler::shouldScheduleNavigation const):
(WebCore::NavigationScheduler::scheduleLocationChange):
- loader/PingLoader.cpp:
(WebCore::PingLoader::loadImage):
(WebCore::PingLoader::sendPing):
- loader/ResourceLoadNotifier.cpp:
(WebCore::ResourceLoadNotifier::dispatchWillSendRequest):
- loader/SubframeLoader.cpp:
(WebCore::SubframeLoader::requestObject):
- loader/TextTrackLoader.cpp:
(WebCore::TextTrackLoader::load):
- loader/appcache/ApplicationCache.cpp:
(WebCore::ApplicationCache::addResource):
(WebCore::ApplicationCache::resourceForRequest):
- loader/appcache/ApplicationCacheGroup.cpp:
(WebCore::ApplicationCacheGroup::selectCache):
(WebCore::ApplicationCacheGroup::finishedLoadingMainResource):
(WebCore::ApplicationCacheGroup::didFinishLoadingEntry):
(WebCore::ApplicationCacheGroup::didFailLoadingEntry):
(WebCore::ApplicationCacheGroup::didFinishLoadingManifest):
- loader/appcache/ApplicationCacheHost.cpp:
(WebCore::ApplicationCacheHost::shouldLoadResourceFromApplicationCache):
(WebCore::ApplicationCacheHost::getApplicationCacheFallbackResource):
- loader/appcache/ApplicationCacheStorage.cpp:
(WebCore::ApplicationCacheStorage::loadCacheGroup):
(WebCore::ApplicationCacheStorage::findOrCreateCacheGroup):
(WebCore::ApplicationCacheStorage::findInMemoryCacheGroup const):
(WebCore::ApplicationCacheStorage::cacheGroupForURL):
(WebCore::ApplicationCacheStorage::fallbackCacheGroupForURL):
(WebCore::ApplicationCacheStorage::cacheGroupDestroyed):
(WebCore::ApplicationCacheStorage::cacheGroupMadeObsolete):
(WebCore::ApplicationCacheStorage::store):
(WebCore::ApplicationCacheStorage::deleteCacheForOrigin):
- loader/archive/ArchiveResourceCollection.cpp:
(WebCore::ArchiveResourceCollection::addAllResources):
(WebCore::ArchiveResourceCollection::addResource):
(WebCore::ArchiveResourceCollection::archiveResourceForURL):
- loader/cache/CachedCSSStyleSheet.cpp:
(WebCore::CachedCSSStyleSheet::didAddClient):
(WebCore::CachedCSSStyleSheet::checkNotify):
- loader/cache/CachedResourceLoader.cpp:
(WebCore::CachedResourceLoader::cachedResource const):
(WebCore::CachedResourceLoader::requestResource):
(WebCore::CachedResourceLoader::determineRevalidationPolicy const):
(WebCore::CachedResourceLoader::notifyFinished):
- loader/cache/CachedXSLStyleSheet.cpp:
(WebCore::CachedXSLStyleSheet::didAddClient):
(WebCore::CachedXSLStyleSheet::checkNotify):
- page/ContextMenuController.cpp:
(WebCore::ContextMenuController::checkOrEnableIfNeeded const):
- page/DOMWindow.cpp:
(WebCore::DOMWindow::setLocation):
(WebCore::DOMWindow::createWindow):
(WebCore::DOMWindow::open):
- page/Location.cpp:
(WebCore::Location::reload):
- page/PageSerializer.cpp:
(WebCore::PageSerializer::retrieveResourcesForProperties):
- page/SecurityOrigin.cpp:
(WebCore::SecurityOrigin::shouldIgnoreHost):
- page/SecurityPolicy.cpp:
(WebCore::SecurityPolicy::shouldInheritSecurityOriginFromOwner):
(WebCore::SecurityPolicy::isBaseURLSchemeAllowed):
- page/csp/ContentSecurityPolicy.cpp:
(WebCore::ContentSecurityPolicy::reportViolation const):
- platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
(WebCore::MediaPlayerPrivateAVFoundation::assetURL const):
- platform/network/BlobRegistryImpl.cpp:
(WebCore::BlobRegistryImpl::writeBlobToFilePath):
- platform/network/mac/ResourceErrorMac.mm:
(WebCore::ResourceError::platformLazyInit):
- storage/StorageEventDispatcher.cpp:
(WebCore::StorageEventDispatcher::dispatchSessionStorageEvents):
(WebCore::StorageEventDispatcher::dispatchLocalStorageEvents):
- svg/SVGImageLoader.cpp:
(WebCore::SVGImageLoader::sourceURI const):
- workers/WorkerScriptLoader.cpp:
(WebCore::WorkerScriptLoader::loadSynchronously):
- workers/service/ServiceWorkerRegistration.cpp:
(WebCore::ServiceWorkerRegistration::scope const):
- workers/service/ServiceWorkerRegistrationKey.cpp:
(WebCore::ServiceWorkerRegistrationKey::hash const):
(WebCore::ServiceWorkerRegistrationKey::isMatching const):
- workers/service/context/ServiceWorkerDebuggable.cpp:
(WebCore::ServiceWorkerDebuggable::ServiceWorkerDebuggable):
- workers/service/server/SWServer.cpp:
(WebCore::SWServer::startScriptFetch):
- xml/XMLHttpRequest.cpp:
(WebCore::XMLHttpRequest::send):
Source/WebKit:
- Shared/API/APIError.h:
(API::Error::failingURL const):
- Shared/API/c/WKSharedAPICast.h:
(WebKit::toCopiedURLAPI):
- UIProcess/API/Cocoa/WKBrowsingContextController.mm:
(setUpPagePolicyClient):
- UIProcess/Cocoa/SafeBrowsingWarningCocoa.mm:
(WebKit::reportAnErrorURL):
- UIProcess/Cocoa/UIDelegate.mm:
(WebKit::requestUserMediaAuthorizationForFrame):
(WebKit::UIDelegate::UIClient::checkUserMediaPermissionForOrigin):
- UIProcess/Cocoa/WebPasteboardProxyCocoa.mm:
(WebKit::WebPasteboardProxy::readURLFromPasteboard):
- UIProcess/ProvisionalPageProxy.cpp:
(WebKit::ProvisionalPageProxy::cancel):
- UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::maybeInitializeSandboxExtensionHandle):
(WebKit::WebPageProxy::loadRequestWithNavigationShared):
(WebKit::WebPageProxy::loadAlternateHTML):
(WebKit::WebPageProxy::didStartProvisionalLoadForFrameShared):
(WebKit::WebPageProxy::didExplicitOpenForFrame):
(WebKit::WebPageProxy::didReceiveServerRedirectForProvisionalLoadForFrameShared):
(WebKit::WebPageProxy::didChangeProvisionalURLForFrameShared):
(WebKit::WebPageProxy::didSameDocumentNavigationForFrame):
(WebKit::WebPageProxy::decidePolicyForNavigationAction):
(WebKit::WebPageProxy::createNewPage):
- WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFrame.mm:
(-[WKWebProcessPlugInFrame URL]):
- WebProcess/Plugins/Netscape/NetscapePluginStream.cpp:
(WebKit::NetscapePluginStream::didReceiveResponse):
- WebProcess/Plugins/PDF/PDFPlugin.mm:
(WebKit::PDFPlugin::clickedLink):
(WebKit::PDFPlugin::openWithNativeApplication):
- WebProcess/Plugins/PluginView.cpp:
(WebKit::PluginView::performURLRequest):
(WebKit::PluginView::performJavaScriptURLRequest):
- WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::dispatchWillPerformClientRedirect):
(WebKit::WebFrameLoaderClient::dispatchDidFailProvisionalLoad):
(WebKit::WebFrameLoaderClient::shouldForceUniversalAccessFromLocalURL):
- WebProcess/WebPage/WebFrame.cpp:
(WebKit::WebFrame::info const):
- WebProcess/WebStorage/StorageAreaMap.cpp:
(WebKit::StorageAreaMap::setItem):
(WebKit::StorageAreaMap::removeItem):
(WebKit::StorageAreaMap::clear):
- WebProcess/cocoa/WebProcessCocoa.mm:
(WebKit::origin):
Source/WebKitLegacy/mac:
- DOM/DOMDocument.mm:
(-[DOMDocument URL]):
- DOM/DOMHTMLAnchorElement.mm:
(-[DOMHTMLAnchorElement href]):
- DOM/DOMHTMLAreaElement.mm:
(-[DOMHTMLAreaElement href]):
- DOM/DOMHTMLEmbedElement.mm:
(-[DOMHTMLEmbedElement src]):
- DOM/DOMHTMLFormElement.mm:
(-[DOMHTMLFormElement action]):
- DOM/DOMHTMLFrameElement.mm:
(-[DOMHTMLFrameElement src]):
(-[DOMHTMLFrameElement location]):
- DOM/DOMHTMLHtmlElement.mm:
(-[DOMHTMLHtmlElement manifest]):
- DOM/DOMHTMLIFrameElement.mm:
(-[DOMHTMLIFrameElement src]):
- DOM/DOMHTMLImageElement.mm:
(-[DOMHTMLImageElement longDesc]):
(-[DOMHTMLImageElement src]):
(-[DOMHTMLImageElement currentSrc]):
(-[DOMHTMLImageElement lowsrc]):
- DOM/DOMHTMLInputElement.mm:
(-[DOMHTMLInputElement src]):
- DOM/DOMHTMLLinkElement.mm:
(-[DOMHTMLLinkElement href]):
- DOM/DOMHTMLMediaElement.mm:
(-[DOMHTMLMediaElement src]):
(-[DOMHTMLMediaElement currentSrc]):
- DOM/DOMHTMLModElement.mm:
(-[DOMHTMLModElement cite]):
- DOM/DOMHTMLObjectElement.mm:
(-[DOMHTMLObjectElement data]):
- DOM/DOMHTMLQuoteElement.mm:
(-[DOMHTMLQuoteElement cite]):
- DOM/DOMHTMLScriptElement.mm:
(-[DOMHTMLScriptElement src]):
- DOM/DOMHTMLVideoElement.mm:
(-[DOMHTMLVideoElement poster]):
- DOM/DOMNode.mm:
(-[DOMNode baseURI]):
- WebCoreSupport/WebFrameLoaderClient.mm:
(WebFrameLoaderClient::updateGlobalHistory):
(WebFrameLoaderClient::setTitle):
- WebView/WebImmediateActionController.mm:
(-[WebImmediateActionController _animationControllerForDataDetectedLink]):
- WebView/WebNotification.mm:
(-[WebNotification iconURL]):
- WebView/WebScriptDebugger.mm:
(WebScriptDebugger::sourceParsed):
(toNSURL): Deleted.
Source/WTF:
Too many bugs have been caused by the compiler finding a way to make a String from a URL without being visible in the code.
This does all the easy things to prepare to remove operator String& and operator NSString*.
The hard things will be done in the smaller patch that actually removes them.
- wtf/URL.cpp:
(WTF::URL::protocolIsJavaScript const):
- wtf/URL.h:
- 12:13 PM Changeset in webkit [260708] by
-
- 4 edits2 adds in trunk
[LFC][TFC] Add vertical-align: baseline support
https://bugs.webkit.org/show_bug.cgi?id=211024
Reviewed by Antti Koivisto.
Source/WebCore:
Adjust the padding with the baseline offset when the cell is baseline aligned (as opposed to the initial value of 'middle').
Test: fast/layoutformattingcontext/table-basic-row-vertical-align-baseline.html
- layout/tableformatting/TableFormattingContext.cpp:
(WebCore::Layout::TableFormattingContext::setUsedGeometryForCells):
(WebCore::Layout::TableFormattingContext::computeAndDistributeExtraVerticalSpace):
- layout/tableformatting/TableGrid.h:
(WebCore::Layout::TableGrid::Cell::setBaselineOffset):
(WebCore::Layout::TableGrid::Cell::baselineOffset const):
LayoutTests:
- fast/layoutformattingcontext/table-basic-row-vertical-align-baseline-expected.txt: Added.
- fast/layoutformattingcontext/table-basic-row-vertical-align-baseline.html: Added.
- 11:01 AM Changeset in webkit [260707] by
-
- 89 edits in trunk
Move URL to use StringView when returning substrings of the URL
https://bugs.webkit.org/show_bug.cgi?id=210431
Reviewed by Anders Carlsson.
LayoutTests/imported/w3c:
- web-platform-tests/url/url-setters-expected.txt: Updated expected results for progression in
correct behavior when port numbers are >65535. I didn't originally intend to make this improvement,
but it fell out naturally from the refactoring changes.
Source/WebCore:
- Modules/cache/DOMCacheEngine.cpp:
(WebCore::DOMCacheEngine::matchURLs): Removed unneeded calls to hasQuery.
- Modules/fetch/FetchRequest.cpp:
(WebCore::FetchRequest::initializeWith): Use hasCredentials.
- Modules/fetch/FetchResponse.cpp:
(WebCore::FetchResponse::redirect): Use hasCredentials.
- Modules/paymentrequest/PaymentRequest.cpp:
(WebCore::isValidURLBasedPaymentMethodIdentifier): Use hasCredentials.
- Modules/plugins/YouTubePluginReplacement.cpp:
(WebCore::createYouTubeURL): Take StringView.
(WebCore::queryKeysAndValues): Take StringView.
(WebCore::processAndCreateYouTubeURL): Use auto since URL pieces are
now returned as StringView.
(WebCore::YouTubePluginReplacement::youTubeURLFromAbsoluteURL):
Use StringView and makeString rather than StringBuilder.
- Modules/websockets/WebSocketHandshake.cpp:
(WebCore::resourceName): Use queryWithLeadingQuestionMark.
- accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::internalLinkElement const):
Use StringView.
- dom/Document.cpp:
(WebCore::Document::setURL): Use setHostAndPort.
- dom/Element.cpp:
(WebCore::Element::findAnchorElementForLink): Update since
fragmentIdentifier returns StringView.
- dom/TreeScope.cpp: Added a comment.
- editing/cocoa/WebContentReaderCocoa.mm:
(WebCore::replaceRichContentWithAttachments): Update since
lastPathComponent returns a StringView. Also got rid of some strange
use of AtomString that was not necessary and used WTFMove more.
- editing/ios/EditorIOS.mm:
(WebCore::Editor::writeImageToPasteboard): Update since
lastPathComponent returns a StringView.
- html/HTMLAttachmentElement.cpp:
(WebCore::HTMLAttachmentElement::attachmentTitleForDisplay const):
Use makeString instead of StringBuilder, and StringView instead of
String for name and extension values.
- html/HTMLPlugInElement.cpp:
(WebCore::pluginReplacementForType): Update since lastPathComponent
returns a StringView.
- html/MediaFragmentURIParser.cpp:
(WebCore::MediaFragmentURIParser::parseFragments): Update since
fragmentIdentifier returns a StringView.
- html/URLUtils.h: Changed many functions to take a StringView, changed
various other functions to call toString, since the underlying URL
function now returns a StringView. Updated names since "pass" is now
"password".
(WebCore::countASCIIDigits): Added. Replaces unusual function
named parsePortFromStringPosition because we can use StringView now
and so don't need such an unusual function.
- loader/AdClickAttribution.cpp:
(WebCore::AdClickAttribution::parseConversionRequest): Use hasCredentials.
Also removed unnecessary use of ASCIILiteral that hurts performance
a tiny bit.
(WebCore::AdClickAttribution::urlForTesting const): Use makeString
instead of StringBuilder.
- loader/CrossOriginAccessControl.cpp:
(WebCore::validateCrossOriginRedirectionURL): Use hasCredentials.
- loader/DocumentThreadableLoader.cpp:
(WebCore::DocumentThreadableLoader::loadRequest): Use hasCredentials.
- loader/FormSubmission.cpp:
(WebCore::appendMailtoPostFormDataToURL): Update since query returns
StringView.
- loader/FrameLoader.cpp:
(WebCore::FrameLoader::loadInSameDocument): Use equalRespectingNullity on
fragment identifiers to preserve behavior, since at this time
StringView == StringView does not respect nullity, but String == String does.
- loader/appcache/ApplicationCacheHost.cpp:
(WebCore::ApplicationCacheHost::createFileURL): Use fileURLWithFileSystemPath.
- loader/appcache/ManifestParser.cpp:
(WebCore::manifestPath): Return a StringView.
(WebCore::parseManifest): Use StringView.
- loader/cache/CachedFont.cpp:
(WebCore::CachedFont::calculateItemInCollection const): Update since
fragmentIdentifer returns a StringView.
- loader/cache/CachedResourceRequest.cpp:
(WebCore::CachedResourceRequest::splitFragmentIdentifierFromRequestURL): Ditto.
- page/FrameView.cpp:
(WebCore::FrameView::scrollToFragment): Ditto.
(WebCore::FrameView::scrollToFragmentInternal): Updated log message.
- page/History.cpp:
(WebCore::History::stateObjectAdded): Updated for URL::password name change
and to use the new stringWithoutQueryOrFragmentIdentifier rather than the
old equalIgnoringQueryAndFragment.
- page/Location.cpp:
(WebCore::Location::href const): Use removeCredentials.
(WebCore::Location::port const): Streamlined.
(WebCore::Location::pathname const): Use an ASCIILiteral.
(WebCore::Location::search const): Use queryWithLeadingQuestionMark.
(WebCore::Location::hash const): Use fragmentIdentifierWithLeadingNumberSign.
(WebCore::Location::setPort): Use parseUInt16.
- page/UserContentURLPattern.cpp: Coding style tweaks.
- platform/MIMETypeRegistry.cpp:
(WebCore::MIMETypeRegistry::appendFileExtensionIfNecessary):
Use contains instead of reverseFind to check for a period in the filename.
- platform/graphics/MediaPlayer.cpp:
(WebCore::MediaPlayer::load): Updated since lastPathComponent is a StringView.
- platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::convertToInternalProtocol): Updated to use makeString since
setProtocol takes a StringView.
- platform/network/ResourceHandleInternal.h: Renamed m_pass to m_password
and call password instead of pass.
- platform/network/ResourceRequestBase.cpp:
(WebCore::ResourceRequestBase::removeCredentials): Use removeCredentials.
- platform/network/cf/ResourceHandleCFNet.cpp:
(WebCore::ResourceHandle::createCFURLConnection): Updated for m_password
name change.
(WebCore::ResourceHandle::willSendRequest): Updated for m_password and
password name changes.
(WebCore::ResourceHandle::tryHandlePasswordBasedAuthentication): Ditto.
- platform/network/curl/CurlProxySettings.cpp:
(WebCore::CurlProxySettings::setUserPass): Updated for setPassword name change.
(WebCore::createProxyUrl): Use hasCredentials, updated for password name change.
- platform/network/curl/CurlProxySettings.h:
(WebCore::CurlProxySettings::password const): Updated for password name change.
- platform/network/curl/ResourceHandleCurl.cpp:
(WebCore::ResourceHandle::didReceiveAuthenticationChallenge): Updated for
m_password name change.
(WebCore::ResourceHandle::getCredential): Ditto.
(WebCore::ResourceHandle::willSendRequest): Updated for m_password and
password name changes.
- platform/network/mac/ResourceHandleMac.mm:
(WebCore::ResourceHandle::createNSURLConnection): Updated for m_password
and setPassword name changes.
(WebCore::ResourceHandle::willSendRequest): Ditto.
(WebCore::ResourceHandle::tryHandlePasswordBasedAuthentication): Ditto.
- platform/network/soup/ResourceRequestSoup.cpp:
(WebCore::ResourceRequest::createSoupURI const): Updated for password name change.
- platform/network/soup/URLSoup.cpp:
(WebCore::soupURIToURL): Updated for setPassword name change.
- platform/win/PasteboardWin.cpp:
(WebCore::writeURL): Updated since lastPathComponent returns a StringView.
(WebCore::filesystemPathFromUrlOrTitle): Ditto.
(WebCore::Pasteboard::write): Ditto.
- style/StyleBuilderState.cpp:
(WebCore::Style::BuilderState::createFilterOperations): Updated since
fragmentIdentifier returns a StringView.
- workers/WorkerLocation.cpp:
(WebCore::WorkerLocation::port const): Streamlined.
(WebCore::WorkerLocation::pathname const): Use an ASCIILiteral.
(WebCore::WorkerLocation::search const): Use queryWithLeadingQuestionMark.
(WebCore::WorkerLocation::hash const): Use fragmentIdentifierWithLeadingNumberSign.
- workers/service/ServiceWorkerRegistrationKey.cpp:
(WebCore::ServiceWorkerRegistrationKey::ServiceWorkerRegistrationKey):
Updated for hasFragmentIdentifier name change.
- workers/service/context/ServiceWorkerThreadProxy.cpp:
(WebCore::topOriginURL): Simplified code to set port.
- workers/service/server/SWServer.cpp:
(WebCore::originURL): Ditto.
- xml/XMLHttpRequest.cpp:
(WebCore::XMLHttpRequest::open): Updated for setPassword name change.
Source/WebKit:
- NetworkProcess/NetworkLoadChecker.cpp:
(WebKit::NetworkLoadChecker::checkRedirection): Use hasCredentials.
(WebKit::NetworkLoadChecker::applyHTTPSUpgradeIfNeeded const):
Remove use of ASCIILiteral for setProtocol.
- NetworkProcess/curl/NetworkDataTaskCurl.cpp:
(WebKit::NetworkDataTaskCurl::NetworkDataTaskCurl): Updated for
password name change.
(WebKit::NetworkDataTaskCurl::willPerformHTTPRedirection): Ditto.
- NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:
(WebKit::NetworkDataTaskCocoa::NetworkDataTaskCocoa): Updated
for password name change.
(WebKit::NetworkDataTaskCocoa::willPerformHTTPRedirection): Ditto.
- NetworkProcess/soup/NetworkDataTaskSoup.cpp:
(WebKit::NetworkDataTaskSoup::NetworkDataTaskSoup): Updated for
password name change.
(WebKit::NetworkDataTaskSoup::applyAuthenticationToRequest): Ditto.
(WebKit::NetworkDataTaskSoup::continueHTTPRedirection): Ditto.
(WebKit::NetworkDataTaskSoup::shouldAllowHSTSPolicySetting const):
Use != to compare hosts, rather than hostsAreEqual.
(WebKit::NetworkDataTaskSoup::shouldAllowHSTSProtocolUpgrade const):
Refactored to use to match the function above. - Shared/API/APIURL.h:
(API::URL::host const): Removed validity check; WTF::URL::host
returns null if the URL is invalid.
(API::URL::protocol const): Ditto.
(API::URL::path const): Ditto.
(API::URL::lastPathComponent const): Ditto. Also added toString
since WTF::URL::lastPathComponent now returns a StringView.
- UIProcess/Cocoa/DownloadClient.mm:
(WebKit::DownloadClient::didFinish): Use hasFragmentIdentifier.
- UIProcess/DeviceIdHashSaltStorage.cpp:
(WebKit::DeviceIdHashSaltStorage::loadStorageFromDisk):
Refactored a bit and use fileURLWithFileSystemPath and
updated since lastPathComponent returns a StringView.
- UIProcess/Plugins/PluginInfoStore.cpp:
(WebKit::pathExtension): Updated since lastPathComponent
returns a StringView. Refactored a little.
- UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::maybeInitializeSandboxExtensionHandle):
Use truncatedForUseAsBase.
(WebKit::WebPageProxy::decidePolicyForNavigationAction):
Use != to compare hosts, rather than hostsAreEqual.
(WebKit::WebPageProxy::decidePolicyForNewWindowAction): Ditto.
(WebKit::WebPageProxy::createNewPage): Ditto.
- UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::assumeReadAccessToBaseURL):
Use truncatedForUseAsBase.
- UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm:
(WebKit::WebsiteDataStore::initializeAppBoundDomains):
Don't use ASCIILiteral for argument to setProtocol.
- WebProcess/MediaCache/WebMediaKeyStorageManager.cpp:
(WebKit::WebMediaKeyStorageManager::getMediaKeyOrigins):
Use fileURLWithFileSystemPath, also refactored a bit.
- WebProcess/Plugins/PDF/PDFPlugin.mm:
(WebKit::PDFPlugin::installPDFDocument): Updated since
fragmentIdentifier returns a StringView.
- WebProcess/WebCoreSupport/WebContextMenuClient.cpp:
(WebKit::WebContextMenuClient::searchWithGoogle): Streamlined
the implementation a bit.
- WebProcess/WebCoreSupport/mac/WebDragClientMac.mm:
(WebKit::WebDragClient::declareAndWriteDragImage):
Updated since lastPathComponent returns a StringView.
Source/WebKitLegacy/mac:
- WebCoreSupport/WebFrameLoaderClient.mm:
(shouldTryAppLink): Compare hosts with == rather than using hostsAreEqual.
- WebView/WebFrame.mm:
(-[WebFrame _documentFragmentForImageData:withRelativeURLPart:andMIMEType:]):
Updated since fakeURLWithRelativePart takes a StringView. Also use RetainPtr
instead of an explicit call to release.
- WebView/WebHTMLView.mm:
(-[WebHTMLView _web_documentFragmentFromPasteboard:pasteboardType:imageMIMEType:]):
Updated since fakeURLWithRelativePart takes a StringView. No conversion
directly from NSString to StringView, so we have to explicitly use a String.
- WebView/WebImmediateActionController.mm:
(-[WebImmediateActionController _defaultAnimationController]): Update
since protocolIs takes a StringView. No conversion directly from
NSString to StringView, so we have to explicitly use a String.
Source/WebKitLegacy/win:
- Plugins/PluginDatabase.cpp:
(WebCore::PluginDatabase::PluginDatabase): Moved initialization of
m_persistentMetadataCacheIsLoaded to the class definition.
(WebCore::PluginDatabase::MIMETypeForExtension const): Take StringView.
(WebCore::PluginDatabase::findPlugin): Use StringView.
- Plugins/PluginDatabase.h: Changed MIMETypeForExtension to take
a StringView. Took out some unneeded declarations. Initialized
m_persistentMetadataCacheIsLoaded here in the class definition.
- WebCoreSupport/WebFrameLoaderClient.cpp:
(WebFrameLoaderClient::objectContentType): Use StringView a little more.
- WebCoreSupport/WebContextMenuClient.cpp:
(WebContextMenuClient::searchWithGoogle): Streamlined the implementation a bit.
(WebContextMenuClient::lookUpInDictionary): Added "using namespace WebCore".
Source/WTF:
- wtf/URL.cpp: Remove unused CharBuffer type. Remove UCharBuffer
type and write the type explicitly in the 3 places it's used.
Removed the invalidPortNumber constant, since we use Optional
instead of a special port number now.
(WTF::copyASCII): Remove unnecessary special case for empty string.
Tweaked coding style and comment a bit.
(WTF::URL::URL): Streamlined by getting rid of a local variable.
(WTF::shouldTrimFromURL): Tweaked coding style.
(WTF::URL::lastPathComponent const): Return a StringView.
Also, use the pathStart function for clarity.
(WTF::URL::port const): Use a StringView to call parseUInt16.
(WTF::URL::protocolHostAndPort const): Optimized to always allocate
the string in the right size rather than removing characters from it
after creating it.
(WTF::decodeEscapeSequence): Added. Factored out from the function
below to make it a little more readable.
(WTF::decodeEscapeSequencesFromParsedURL): Convert a null StringView
to a null String rather than an empty String, use a stack buffer and
the helper function above, and added some FIXME comments about
encoding handling.
(WTF::URL::user const): Simplified by calling encodedUser.
(WTF::URL::password const): Simplified by calling encodedPassword.
(WTF::URL::encodedUser const): Return a StringView.
(WTF::URL::encodedPassword const): Ditto. Also renamed from encodedPass.
(WTF::URL::fragmentIdentifier const): Ditto.
(WTF::URL::hasFragmentIdentifier const): Moved to header so it can
be inlined.
(WTF::URL::truncatedForUseAsBase const): Renamed from baseAsString.
This function is currently only used with local file URLs and it's
not perfectly clear to me precisely what it is for, hence the name
is not so great.
(WTF::URL::fileSystemPath const): Removed unneeded check for validity
since isLocalFile does that check. Removed unneeded typecast now that
path returns a StringView.
(WTF::defaultPortForProtocolMapForTesting): Deleted.
(WTF::ensureDefaultPortForProtocolMapForTesting): Deleted.
(WTF::registerDefaultPortForProtocolForTesting): Deleted.
(WTF::clearDefaultPortForProtocolMapForTesting): Deleted.
(WTF::defaultPortForProtocol): Deleted.
(WTF::isDefaultPortForProtocol): Deleted.
(WTF::protocolIsInternal): Rewrote to take a StringView. Before it
was written as a template that looked like it supported classes other
than String, but actually would crash if called on a StringView.
(WTF::URL::protocolIs const): Removed unneeded explicit cast to StringView.
(WTF::URL::query const): Return a StringView.
(WTF::URL::path const): Return a StringView, use the pathStart
function for clarity.
(WTF::URL::setProtocol): Use a toStringWithoutCopying to save some
work when making the protocol canonical. Call parse instead of
creating a URLParser here.
(WTF::URL::credentialsEnd const): Added. Helper for various functions
that manipulate the credentials section.
(WTF::URL::setHost): Take StringView. Streamlined the code by using
StringView::contains, by using makeString rather than StringBuilder,
and by calling parse instead of creating a URLParser here.
(WTF::URL::removePort): Deleted, since setPort takes an Optional now.
(WTF::URL::setPort): Take Optional<uint16_t>. Call parse instead of
creating a URLParser here.
(WTF::URL::removeHostAndPort): Deleted. Callers can pass a null
StringView to setHostAndPort instead.
(WTF::URL::setHostAndPort): Take StringView. Don't remove the old
host and port in the nomral case where we end up overwriting the entire
URL at the end of the function anyway. Use parseUInt16 instead of
toIntStrict to check port number for validity, which makes sure we will
reject port numbers larger than 65535. Use makeString instead of
StringBuilder and call parse rather than creating a URLParser here.
(WTF::parse): Added. Helper function for when we create a new string
and want to parse it as the new contents of the URL. Used in almost
every setter function.
(WTF::URL::remove): Added. Helper function for efficiently removing
a piece of the URL string and re-parsing. Used in many setter functions.
(WTF::URL::setUser): Take StringView. Use makeString instead of
StringBuilder, and parse and remove instead of creating a URLParser here.
(WTF::URL::setPassword): Renamed from setPass. Take StringView.
Use makeString instead of StringBuilder, and parse and remove instead of
creating a URLParser here.
(WTF::URL::removeCredientials): Added. Efficiently removes both the
user name and password if either is present.
(WTF::URL::setFragmentIdentifier): Use parse instead of creating
a URL parser here.
(WTF::URL::removeFragmentIdentifier): Removed unnecessary checks for
things already optimized by String::left. Could later consider merging
this in with setFragmentIdentifier, using a null vs. empty distinction,
but not doing that for now.
(WTF::URL::setQuery): Take StringView.
(WTF::URL::setPath): Take StringView.
(WTF::stringWithoutQueryOrFragmentIdentifier): Added.
(WTF::stringWithoutFragmentIdentifier): Added.
(WTF::equalIgnoringFragmentIdentifier): Simplified implementation by
using stringWithoutFragmentIdentifier.
(WTF::equalIgnoringQueryAndFragment): Deleted.
(WTF::hostsAreEqual): Deleted.
(WTF::URL::isMatchingDomain const): Take StringView.
(WTF::protocolIs): Take StringView.
(WTF::URL::protocolIs): Moved to inline in the header.
(WTF::URL::strippedForUseAsReferrer const): Rewrite for efficiency.
(WTF::protocolIsJavaScript): Moved to inline in the header.
(WTF::protocolIsInHTTPFamily): Take StringView.
(WTF::aboutBlankURL): Use ASCIILiteral.
(WTF::aboutSrcDocURL): Use ASCIILiteral.
(WTF::portAllowed): Removed 65535 as a blocked port; wasn't needed.
(WTF::mimeTypeFromDataURL): Take StringView.
(WTF::URL::stringCenterEllipsizedToLength const): Tweaked style.
(WTF::URL::fakeURLWithRelativePart): Take StringView.
(WTF::URL::fileURLWithFileSystemPath): Take StringView..
(WTF::URL::queryWithLeadingQuestionMark const): Added.
(WTF::URL::fragmentIdentifierWithLeadingNumberSign const): Added.
(WTF::URL::hostIsIPAddress): Tweak coding style.
- wtf/URL.h: Made URLTextEncoding destructor protected. Removed
unused forward declaration of URLHash structure. Use WTF_EXPORT_PRIVATE
on functions from URL rather than on the whole class, since the style
checker told me to do that. Moved some inline function bodies out of
the class definition for clarity and to keep the style checker happy.
Updated many arguemnts from String to StringView and return values for
substrings of the URL to StringView. Removed some unused functions and
some obsolete comments.
- wtf/cf/CFURLExtras.cpp:
(WTF::isCFURLSameOrigin): Use hasCredentials.
- wtf/text/StringView.cpp:
(WTF::StringView::endsWith const): Added.
(WTF::parseUInt16): Added.
(WTF::equalRespectingNullity): Added.
(WTF::StringView::contains const): Added overload that takes a
const char* so the call site doesn't have to convert it to a StringView.
- wtf/text/StringView.h: Updated for the additions above.
Also added a default start of 0 to the find function.
- wtf/text/WTFString.cpp:
(WTF::charactersToIntStrict): Removed unneeded explicit template argument.
(WTF::charactersToUIntStrict): Ditto.
(WTF::charactersToInt64Strict): Ditto.
(WTF::charactersToUInt64Strict): Ditto.
(WTF::charactersToIntPtrStrict): Ditto.
(WTF::charactersToInt): Ditto.
(WTF::charactersToUInt): Ditto.
(WTF::charactersToInt64): Ditto.
(WTF::charactersToUInt64): Ditto.
(WTF::charactersToIntPtr): Ditto.
Tools:
- TestWebKitAPI/Tests/WTF/URL.cpp: Removed the test for
equalIgnoringQueryAndFragment since we removed that function.
Updated for rename of URL::password from URL::pass.
Updated arguments to isMatchingDomain to pass literals that can be converted
to StringView rather than ASCIILiteral, which StringView doesn't yet support.
- TestWebKitAPI/Tests/WebCore/URLParserTextEncoding.cpp:
(TestWebKitAPI::checkURL): Updated for rename of URL::password from URL::pass.
(TestWebKitAPI::checkRelativeURL): Ditto.
(TestWebKitAPI::checkURLDifferences): Ditto.
(TestWebKitAPI::checkRelativeURLDifferences): Ditto.
(TestWebKitAPI::testUserPassword): Ditto.
- 10:03 AM Changeset in webkit [260706] by
-
- 3 edits in trunk/Source/WebCore
AX: Improve tracking of Element* pointers in AXObjectCache with WeakHashSet
https://bugs.webkit.org/show_bug.cgi?id=210879
Reviewed by Daniel Bates.
- accessibility/AXObjectCache.cpp:
(WebCore::AXObjectCache::remove):
(WebCore::AXObjectCache::handleFocusedUIElementChanged):
(WebCore::filterListForRemoval):
(WebCore::AXObjectCache::performDeferredCacheUpdate):
- accessibility/AXObjectCache.h:
- 9:08 AM Changeset in webkit [260705] by
-
- 4 edits2 adds in trunk
[Web Animations] KeyframeEffect should ensure its target remains alive
https://bugs.webkit.org/show_bug.cgi?id=211019
Patch by Antoine Quint <Antoine Quint> on 2020-04-25
Reviewed by Daniel Bates.
Source/WebCore:
Test: webanimations/keyframe-effect-target-kept-alive.html
Make KeyframeEffect::m_target a RefPtr so that assigning an element to effect.target guarantees that element
is kept alive even if there are no other references to that element.
- animation/KeyframeEffect.cpp:
(WebCore::KeyframeEffect::KeyframeEffect):
(WebCore::KeyframeEffect::setTarget):
- animation/KeyframeEffect.h:
LayoutTests:
Add a test that creates a KeyframeEffect targeting an element with no other reference and trigger
garbage collection to check that the effect's target exists. This test would have failed prior to
this patch's code changes.
- webanimations/keyframe-effect-target-kept-alive-expected.txt: Added.
- webanimations/keyframe-effect-target-kept-alive.html: Added.
- 8:46 AM Changeset in webkit [260704] by
-
- 7 edits in trunk/Source/WebKit
IPC::Decoder::isInvalid() should be renamed to isValid()
<https://webkit.org/b/211000>
Reviewed by Darin Adler.
Negative logic is more difficult to reason about than positive
logic.
- Platform/IPC/Connection.cpp:
(IPC::Connection::dispatchMessage):
(IPC::Connection::dispatchWorkQueueMessageReceiverMessage):
(IPC::Connection::dispatchThreadMessageReceiverMessage):
(IPC::Connection::dispatchSyncMessage):
- Platform/IPC/Connection.h:
(IPC::Connection::sendWithAsyncReply):
- Platform/IPC/Decoder.cpp:
(IPC::Decoder::create):
- Platform/IPC/Decoder.h:
(IPC::Decoder::isValid const): Rename from isInvalid()
and invert logic.
(IPC::Decoder::isInvalid const): Rename to isValid().
- Platform/IPC/MessageSender.h:
- UIProcess/AuxiliaryProcessProxy.h:
(WebKit::AuxiliaryProcessProxy::sendWithAsyncReply):
- Change Decoder::isInvalid() to Decoder::isValid() and reverse the Boolean logic.
- 8:22 AM Changeset in webkit [260703] by
-
- 4 edits in trunk/Source/WebCore
[LFC][TFC] Cleanup TableFormattingContext::layoutInFlowContent
https://bugs.webkit.org/show_bug.cgi?id=211023
Reviewed by Sam Weinig.
Move some code to dedicated functions.
- layout/tableformatting/TableFormattingContext.cpp:
(WebCore::Layout::TableFormattingContext::layoutInFlowContent):
(WebCore::Layout::TableFormattingContext::setUsedGeometryForCells):
(WebCore::Layout::TableFormattingContext::setUsedGeometryForRows):
(WebCore::Layout::TableFormattingContext::setUsedGeometryForSections):
(WebCore::Layout::TableFormattingContext::layoutCell):
(WebCore::Layout::TableFormattingContext::computeAndDistributeExtraHorizontalSpace):
(WebCore::Layout::TableFormattingContext::computeAndDistributeExtraVerticalSpace):
(WebCore::Layout::TableFormattingContext::initializeDisplayBoxToBlank const): Deleted.
(WebCore::Layout::TableFormattingContext::setComputedGeometryForRows): Deleted.
(WebCore::Layout::TableFormattingContext::setComputedGeometryForSections): Deleted.
- layout/tableformatting/TableFormattingContext.h:
- layout/tableformatting/TableFormattingContextGeometry.cpp:
(WebCore::Layout::TableFormattingContext::Geometry::cellHeigh const):
(WebCore::Layout::TableFormattingContext::Geometry::computedColumnWidth const):
(WebCore::Layout::TableFormattingContext::Geometry::tableCellHeightAndMargin const): Deleted.
- 7:46 AM Changeset in webkit [260702] by
-
- 3 edits in trunk/Tools
[Flatpak SDK][EWS] Install dependencies step needs configuration as argument
https://bugs.webkit.org/show_bug.cgi?id=210913
Follow-up on r260560. The same change is needed for EWS bots.
Reviewed by Philippe Normand.
- BuildSlaveSupport/ews-build/steps.py:
(InstallGtkDependencies): Pass 'configuration' value (Release, Debug).
(InstallWpeDependencies): Pass 'configuration' value (Release, Debug).
- 7:41 AM Changeset in webkit [260701] by
-
- 1 edit6 adds in trunk/LayoutTests
[GTK] Gardening, emit baselines after r260690
https://bugs.webkit.org/show_bug.cgi?id=211022
Unreviewed gardening.
- platform/gtk/imported/w3c/web-platform-tests/css/css-animations/animation-base-response-001-expected.txt:
Added after r260690.
- platform/gtk/imported/w3c/web-platform-tests/wasm/jsapi/global/value-set.any-expected.txt:
Added after r260690.
- platform/gtk/imported/w3c/web-platform-tests/wasm/jsapi/global/value-set.any.worker-expected.txt:
Added after r260662.
- 6:50 AM Changeset in webkit [260700] by
-
- 2 edits in trunk/JSTests
Skip stress/butterfly-zero-unused-butterfly-properties.js on MIPS
https://bugs.webkit.org/show_bug.cgi?id=211016
Unreviewed Gardening.
Patch by Paulo Matos <Paulo Matos> on 2020-04-25
- stress/butterfly-zero-unused-butterfly-properties.js:
- 5:05 AM Changeset in webkit [260699] by
-
- 2 edits in trunk/Source/WebCore
Unreviewed. Remove the build warning below since r260247.
warning: unused parameter ‘foo’ [-Wunused-parameter]
No new tests, no new behaviors.
- testing/Internals.cpp:
(WebCore::Internals::hasSandboxIOKitOpenAccessToClass):
- 2:23 AM Changeset in webkit [260698] by
-
- 5 edits in trunk/LayoutTests
Skip legacy media controls tests on macOS and iOS
https://bugs.webkit.org/show_bug.cgi?id=211015
<rdar://problem/62064255>
Unreviewed test gardening.
- platform/ios/TestExpectations:
- platform/mac-wk2/TestExpectations:
- platform/mac/TestExpectations:
- platform/wk2/TestExpectations:
- 2:14 AM Changeset in webkit [260697] by
-
- 15 edits2 deletes in trunk
[Intl] Locale validation/canonicalization should defer to ICU
https://bugs.webkit.org/show_bug.cgi?id=210853
Reviewed by Darin Adler.
JSTests:
- stress/intl-collator.js:
- stress/intl-datetimeformat.js:
- stress/intl-numberformat.js:
- stress/intl-object.js:
- stress/intl-pluralrules.js:
- stress/intl-relativetimeformat.js:
Adjust tests, since one of the two fixes in r260151 no longer applies
(and certain sensitivities apply to older ICU versions).
- test262/expectations.yaml:
Mark eight new passes, two new fails, and six changed failures.
It is an unfortunate and baffling truth that the Intl tests of test262 are often not spec tests at all,
but effectively ICU/CLDR regression tests. These are not carrots worth chasing.
Source/JavaScriptCore:
The mappings for locale canonicalization in latest CLDR are sufficiently complex
that it really no longer makes sense not to have ICU do this work for us.
This means the UTS 35 canonicalization desired by ECMA-402 will not be fully achievable until ICU ~67,
but it's better than reaching right into CLDR and pretending that we *are* ICU.
(On this point, we thus align with V8 and diverge from SM.)
Of course, we can still add our own pre-validations / post-canonicalizations if desired.
- CMakeLists.txt:
- DerivedSources-input.xcfilelist:
- DerivedSources-output.xcfilelist:
- DerivedSources.make:
- JavaScriptCore.xcodeproj/project.pbxproj:
- Scripts/generateIntlCanonicalizeLanguage.py: Removed.
- runtime/IntlObject.cpp:
(JSC::intlAvailableLocales):
(JSC::intlCollatorAvailableLocales):
(JSC::canonicalizeLanguageTag):
(JSC::canonicalizeLocaleList):
(JSC::defaultLocale):
(JSC::removeUnicodeLocaleExtension):
(JSC::addMissingScriptLocales): Deleted. This one was ostensibly a fix for an old ICU bug.
(JSC::privateUseLangTag): Deleted.
(JSC::preferredLanguage): Deleted.
(JSC::preferredRegion): Deleted.
(JSC::canonicalLangTag): Deleted.
- ucd/language-subtag-registry.txt: Removed.
- 1:56 AM Changeset in webkit [260696] by
-
- 4 edits in trunk/Source
Source/WebInspectorUI:
REGRESSION(210942): [GTK][WPE] Unreviewed, EWS build bots fail in compile-webkit step
https://bugs.webkit.org/show_bug.cgi?id=211014
- CMakeLists.txt: Remove creation of file 'inspector-resources.stamp'.
Source/WebKit:
REGRESSION(210942): [GTK][WPE] EWS build bots fail in compile-webkit step
https://bugs.webkit.org/show_bug.cgi?id=211014
Make command that generates 'InspectorGResourceBundle.xml' depend on target
WebInspectorUI, instead of file 'inspector-resources.stamp'.
- InspectorGResources.cmake:
- 1:10 AM Changeset in webkit [260695] by
-
- 8 edits in branches/safari-610.1.11-branch/Source
Versioning.
- 1:00 AM Changeset in webkit [260694] by
-
- 1 copy in tags/Safari-610.1.11.2
Tag Safari-610.1.11.2.
- 12:47 AM Changeset in webkit [260693] by
-
- 2 edits in trunk/Source/JavaScriptCore
Fix internal build by using strcmp instead of using string literal comparison
https://bugs.webkit.org/show_bug.cgi?id=211011
Reviewed by Keith Miller.
Use strcmp for string literal comparison to expect that this is fully handled by compiler and converted into constant at compile time.
- runtime/JSGlobalObject.cpp:
(JSC::JSGlobalObject::init):
- 12:24 AM Changeset in webkit [260692] by
-
- 3 edits2 adds in trunk
Suppress ASan on DFG::clobberize() to work around an ASan bug.
https://bugs.webkit.org/show_bug.cgi?id=211012
<rdar://problem/62275430>
Reviewed by Yusuke Suzuki.
Source/JavaScriptCore:
ASan was incorrectly thinking that we're accessing invalid stack memory when we're not.
- dfg/DFGClobberize.h:
(JSC::DFG::clobberize):
LayoutTests:
Test is courtesy of Fabien Duchene and Pinki Gyanchandani.
- js/suppress-asan-on-clobberize-to-workaround-asan-bug-expected.txt: Added.
- js/suppress-asan-on-clobberize-to-workaround-asan-bug.html: Added.