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

Timeline



May 10, 2020:

11:57 PM Changeset in webkit [261468] by commit-queue@webkit.org
  • 7 edits in trunk

Fix base64.any.html test
https://bugs.webkit.org/show_bug.cgi?id=211671

Patch by Rob Buis <rbuis@igalia.com> on 2020-05-10
Reviewed by Darin Adler.

LayoutTests/imported/w3c:

Update improved test expectation.

  • web-platform-tests/fetch/data-urls/base64.any-expected.txt:
  • web-platform-tests/fetch/data-urls/base64.any.worker-expected.txt:

Source/WebCore:

Fix base64.any.html test by extending DataURLDecoder with a
forgiving-base64 decode mode [1], as used by the Fetch
data: URL processor algorithm [2].

Behavior matches Chrome and Firefox.

[1] https://infra.spec.whatwg.org/#forgiving-base64-decode
[2] https://fetch.spec.whatwg.org/#data-url-processor

Test: imported/w3c/web-platform-tests/fetch/data-urls/base64.any.html

  • loader/ResourceLoader.cpp:

(WebCore::ResourceLoader::loadDataURL):

  • platform/network/DataURLDecoder.cpp:

(WebCore::DataURLDecoder::decodeBase64):
(WebCore::DataURLDecoder::decode):

  • platform/network/DataURLDecoder.h:
11:14 PM Changeset in webkit [261467] by Darin Adler
  • 4 edits in trunk/Source

Add copy constructor and assignment operator to Ref<>
https://bugs.webkit.org/show_bug.cgi?id=211705

Reviewed by Sam Weinig.

Source/WebCore:

  • dom/BoundaryPoint.h: As a test of the change to Ref, remove the explicit

copy and move constructors and assignment operators, relying on the defaults
instead, which are now exactly what we want.

Source/WTF:

As recently discussed in some WebKit bug patch review, we think that Ref and RefPtr
should have the same design, except for whether the value can be null. Ref had a
more ambitious approach to avoiding reference count churn, requiring a
call to copyRef to make any copying explicit, partly by analogy with raw C
references, which also can't be copied (but they can't be moved either). We choose
to change Ref to match RefPtr and to take the risk of additional churn. This makes
it easier to use Ref in contexts like collection classes and structures. An
alternative would be to go the other direction, and make RefPtr require a call to
copyRef: seems like an obviously worse option.

  • wtf/Ref.h: Add the copy constructor and assignment operator.

These follow a similar pattern to the move constructor and assignment operator.
Also add a deprecation comment before copyRef, which we will eventually remove.

10:16 PM Changeset in webkit [261466] by commit-queue@webkit.org
  • 4 edits in trunk

Update user agent quirk for bankofamerica.com
https://bugs.webkit.org/show_bug.cgi?id=211700

Patch by Michael Catanzaro <Michael Catanzaro> on 2020-05-10
Reviewed by Carlos Garcia Campos.

Source/WebCore:

The Mac platform quirk isn't working anymore. The Chrome quirk works.

  • platform/UserAgentQuirks.cpp:

(WebCore::urlRequiresChromeBrowser):
(WebCore::urlRequiresMacintoshPlatform):

Tools:

  • TestWebKitAPI/Tests/WebCore/UserAgentQuirks.cpp:

(TestWebKitAPI::TEST):

9:46 PM Changeset in webkit [261465] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WTF

Use alias template to define match_constness_t in Wtf/wtp/TypeCasts.h
https://bugs.webkit.org/show_bug.cgi?id=211698

Patch by Tetsuharu Ohzeki <Tetsuharu Ohzeki> on 2020-05-10
Reviewed by Yusuke Suzuki.

  • wtf/TypeCasts.h:

(WTF::downcast):

7:36 PM Changeset in webkit [261464] by Ross Kirsling
  • 166 edits in trunk/Source/JavaScriptCore

[clang-tidy] Run modernize-use-nullptr over JSC
https://bugs.webkit.org/show_bug.cgi?id=211706

Reviewed by Darin Adler.

  • API/APICallbackFunction.h:
  • API/JSAPIGlobalObject.h:
  • API/JSBase.cpp:
  • API/JSCallbackObjectFunctions.h:
  • API/JSClassRef.cpp:
  • API/JSContextRef.cpp:
  • API/JSObjectRef.cpp:
  • API/JSScriptRef.cpp:
  • API/JSValueRef.cpp:
  • API/JSWeakObjectMapRefPrivate.cpp:
  • API/tests/ExecutionTimeLimitTest.cpp:
  • API/tests/PingPongStackOverflowTest.cpp:
  • assembler/AbstractMacroAssembler.h:
  • assembler/CPU.cpp:
  • bytecode/CodeBlock.cpp:
  • bytecode/DeleteByIdVariant.cpp:
  • bytecode/GetByIdVariant.cpp:
  • bytecode/InByIdVariant.cpp:
  • bytecode/InlineCallFrame.cpp:
  • bytecode/LazyOperandValueProfile.cpp:
  • bytecode/PutByIdVariant.cpp:
  • bytecode/ValueProfile.h:
  • bytecode/ValueRecovery.cpp:
  • bytecompiler/BytecodeGenerator.h:
  • bytecompiler/NodesCodegen.cpp:
  • debugger/DebuggerScope.h:
  • dfg/DFGAbstractValue.cpp:
  • dfg/DFGAdjacencyList.h:
  • dfg/DFGArgumentPosition.h:
  • dfg/DFGArrayifySlowPathGenerator.h:
  • dfg/DFGAvailability.h:
  • dfg/DFGByteCodeParser.cpp:
  • dfg/DFGCFGSimplificationPhase.cpp:
  • dfg/DFGCPSRethreadingPhase.cpp:
  • dfg/DFGCompilationKey.h:
  • dfg/DFGConstantFoldingPhase.cpp:
  • dfg/DFGDisassembler.cpp:
  • dfg/DFGDoubleFormatState.h:
  • dfg/DFGEdge.h:
  • dfg/DFGFixupPhase.cpp:
  • dfg/DFGFrozenValue.cpp:
  • dfg/DFGGenerationInfo.h:
  • dfg/DFGGraph.h:
  • dfg/DFGInPlaceAbstractState.cpp:
  • dfg/DFGIntegerCheckCombiningPhase.cpp:
  • dfg/DFGLazyJSValue.cpp:
  • dfg/DFGNode.h:
  • dfg/DFGOSREntrypointCreationPhase.cpp:
  • dfg/DFGOSRExit.cpp:
  • dfg/DFGOperations.cpp:
  • dfg/DFGSilentRegisterSavePlan.h:
  • dfg/DFGSpeculativeJIT.cpp:
  • dfg/DFGSpeculativeJIT.h:
  • dfg/DFGSpeculativeJIT64.cpp:
  • dfg/DFGStructureAbstractValue.cpp:
  • dfg/DFGTransition.cpp:
  • dfg/DFGTypeCheckHoistingPhase.cpp:
  • dfg/DFGWorklist.cpp:
  • ftl/FTLAbstractHeapRepository.h:
  • ftl/FTLAvailableRecovery.h:
  • ftl/FTLExitValue.cpp:
  • ftl/FTLFormattedValue.h:
  • ftl/FTLJITCode.cpp:
  • ftl/FTLLink.cpp:
  • ftl/FTLLowerDFGToB3.cpp:
  • ftl/FTLLoweredNodeValue.h:
  • ftl/FTLOSREntry.cpp:
  • ftl/FTLOSRExitCompiler.cpp:
  • ftl/FTLTypedPointer.h:
  • ftl/FTLValueFromBlock.h:
  • ftl/FTLValueRange.h:
  • heap/GCSegmentedArray.h:
  • heap/Handle.h:
  • heap/HandleSet.h:
  • heap/HandleTypes.h:
  • heap/HeapSnapshotBuilder.cpp:
  • heap/MarkedBlockInlines.h:
  • heap/Strong.h:
  • heap/WeakImpl.h:
  • heap/WeakInlines.h:
  • heap/WeakSet.cpp:
  • heap/WeakSet.h:
  • interpreter/CallFrame.cpp:
  • interpreter/CallFrame.h:
  • interpreter/Interpreter.cpp:
  • interpreter/ProtoCallFrame.h:
  • interpreter/StackVisitor.cpp:
  • interpreter/StackVisitor.h:
  • jit/AssemblyHelpers.h:
  • jit/CCallHelpers.h:
  • jit/JITCode.cpp:
  • jit/JITOperations.cpp:
  • jit/Repatch.cpp:
  • jit/ThunkGenerators.cpp:
  • jsc.cpp:
  • llint/LLIntSlowPaths.cpp:
  • parser/ASTBuilder.h:
  • parser/Lexer.cpp:
  • parser/Lexer.h:
  • parser/Nodes.cpp:
  • parser/Nodes.h:
  • parser/Parser.cpp:
  • parser/Parser.h:
  • parser/ParserArena.cpp:
  • parser/ParserArena.h:
  • parser/ParserFunctionInfo.h:
  • parser/SyntaxChecker.h:
  • parser/UnlinkedSourceCode.h:
  • profiler/ProfilerBytecodeSequence.cpp:
  • profiler/ProfilerCompilation.cpp:
  • profiler/ProfilerDatabase.cpp:
  • profiler/ProfilerOSRExitSite.cpp:
  • profiler/ProfilerOriginStack.cpp:
  • runtime/ArgList.h:
  • runtime/ArrayPrototype.cpp:
  • runtime/ClonedArguments.cpp:
  • runtime/CommonSlowPaths.cpp:
  • runtime/Completion.h:
  • runtime/DataView.h:
  • runtime/DatePrototype.cpp:
  • runtime/DirectEvalExecutable.cpp:
  • runtime/DumpContext.cpp:
  • runtime/FunctionExecutable.cpp:
  • runtime/IndirectEvalExecutable.cpp:
  • runtime/JSArray.cpp:
  • runtime/JSArrayBufferView.cpp:
  • runtime/JSCJSValue.cpp:
  • runtime/JSCJSValueInlines.h:
  • runtime/JSCell.cpp:
  • runtime/JSDataView.cpp:
  • runtime/JSDestructibleObject.h:
  • runtime/JSFunction.cpp:
  • runtime/JSGlobalObject.cpp:
  • runtime/JSGlobalObject.h:
  • runtime/JSONObject.cpp:
  • runtime/JSObject.cpp:
  • runtime/JSObject.h:
  • runtime/JSScope.cpp:
  • runtime/JSScope.h:
  • runtime/LiteralParser.cpp:
  • runtime/OptionsList.h:
  • runtime/PropertyDescriptor.cpp:
  • runtime/PropertyMapHashTable.h:
  • runtime/PropertySlot.h:
  • runtime/PutPropertySlot.h:
  • runtime/RegExpMatchesArray.h:
  • runtime/RegExpPrototype.cpp:
  • runtime/StringPrototype.cpp:
  • runtime/Structure.cpp:
  • runtime/Structure.h:
  • runtime/TestRunnerUtils.cpp:
  • runtime/TypedArrayType.cpp:
  • runtime/VM.cpp:
  • runtime/Watchdog.cpp:
  • runtime/Watchdog.h:
  • runtime/WriteBarrier.h:
  • testRegExp.cpp:
  • tools/JSDollarVM.cpp:
  • wasm/WasmSlowPaths.cpp:
  • yarr/RegularExpression.h:
  • yarr/YarrInterpreter.cpp:
  • yarr/YarrJIT.cpp:
  • yarr/YarrJIT.h:
  • yarr/YarrPattern.cpp:
  • yarr/YarrPattern.h:
7:08 PM Changeset in webkit [261463] by Fujii Hironori
  • 2 edits in trunk/Source/WebKitLegacy/win

[WinCairo][WK1] requestAnimationFrame doesn't work since r261113
https://bugs.webkit.org/show_bug.cgi?id=211702

Reviewed by Darin Adler.

Since r261113 (Bug 204713), WinCairo WK1 is failing some rAF tests
even though AppleWin isn't.

WinCairo also should do m_page->updateRendering() in
WebView::flushPendingGraphicsLayerChangesSoon as well as AppleWin.

  • WebView.cpp:

(WebView::flushPendingGraphicsLayerChangesSoon): Call
updateRendering.

4:56 PM Changeset in webkit [261462] by basuke.suzuki@sony.com
  • 11 edits in trunk

Add ENABLE_PERIODIC_MEMORY_MONITOR flag.
https://bugs.webkit.org/show_bug.cgi?id=211704

Reviewed by Yusuke Suzuki.

.:

Define ENABLE_PERIODIC_MEMORY_MONITOR flags in specific platform's options.
Enable it for PlayStation port.

  • Source/cmake/OptionsGTK.cmake:
  • Source/cmake/OptionsMac.cmake:
  • Source/cmake/OptionsPlayStation.cmake:
  • Source/cmake/OptionsWPE.cmake:
  • Source/cmake/WebKitFeatures.cmake:

Source/WebKit:

No new tests because there's no behavior change.

Replace PLATFORM() macros with ENABLE() macro.

  • WebProcess/WebProcess.cpp:

(WebKit::WebProcess::initializeWebProcess):

Source/WTF:

Define ENABLE_PERIODIC_MEMORY_MONITOR flags in specific platform file.

  • wtf/PlatformEnable.h:
  • wtf/PlatformEnableCocoa.h:
3:37 PM Changeset in webkit [261461] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebKit

REGRESSION(r261270): Broke build with python3
https://bugs.webkit.org/show_bug.cgi?id=211699

Patch by Michael Catanzaro <Michael Catanzaro> on 2020-05-10
Reviewed by Yusuke Suzuki.

Remove the problematic print statement. It causes the script to fail. If fixed, it spams the
build output. We only print messages during the build when there are problems to be fixed.

  • Scripts/generate-message-receiver.py:

(main):

2:35 PM Changeset in webkit [261460] by Darin Adler
  • 14 edits in trunk/Source

Remove now-unneeded HAVE(CORE_VIDEO)
https://bugs.webkit.org/show_bug.cgi?id=211677

Reviewed by Dan Bernstein.

Source/WebCore:

  • page/cocoa/MemoryReleaseCocoa.mm:
  • platform/cocoa/CoreVideoSoftLink.cpp: Remove HAVE(CORE_VIDEO).
  • platform/cocoa/CoreVideoSoftLink.h: Ditto.
  • platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h: Ditto.
  • platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:

(WebCore::MediaPlayerPrivateAVFoundationObjC::updateLastImage): Ditto.

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

(WebCore::MediaSampleAVFObjC::getRGBAImageData const): Ditto.

  • platform/graphics/cv/PixelBufferConformerCV.cpp: Ditto.
  • platform/graphics/cv/PixelBufferConformerCV.h: Ditto.
  • platform/graphics/cv/TextureCacheCV.h: Ditto.
  • platform/graphics/cv/TextureCacheCV.mm: Ditto.
  • platform/graphics/cv/VideoTextureCopierCV.cpp: Ditto.
  • platform/graphics/cv/VideoTextureCopierCV.h: Ditto.

Source/WTF:

  • wtf/PlatformHave.h: Remove HAVE_CORE_VIDEO.
2:21 PM Changeset in webkit [261459] by Darin Adler
  • 2 edits in trunk/Source/WebCore

Tighten up logic in DocumentTimelinesController::updateAnimationsAndSendEvents
https://bugs.webkit.org/show_bug.cgi?id=211668

Reviewed by Antoine Quint.

  • animation/DocumentTimelinesController.cpp:

(WebCore::DocumentTimelinesController::updateAnimationsAndSendEvents):
Use Ref instead of RefPtr. Use Ref even in timelinesToUpdate; no harm in doing
a little bit of extra ref'ing. Use copyToVector when iterating relevantAnimations
since it could be a problem if the current animation was removed from the
ListHashSet while we are iterating it and there is no obvious reason that can't
happen. Use makeRef instead of makeRefPtr. Take advantage of the behavior of
the Optional operator<, which already treats nullopt as less than any non-nullopt
value, and remove unnecessary checks that weere doing the same thing explicitly.
This fixes a mistake where we were returning true when both are nullopt, which
could harm the stability of the sort, in theory. Add a null check of the timeline
when iterating completedTransitions, since there is no obvious guarantee they
could not have been removed as a side effect earlier.

2:21 PM Changeset in webkit [261458] by Darin Adler
  • 2 edits in trunk/Source/WebCore

Use makeReversedRange and get rid of one-off ReverseView
https://bugs.webkit.org/show_bug.cgi?id=211675

Reviewed by Sam Weinig.

  • editing/markup.cpp:

(WebCore::ReverseView): Deleted.
(WebCore::StyledMarkupAccumulator::takeResults): Use makeReversedRange.

12:28 PM Changeset in webkit [261457] by timothy_horton@apple.com
  • 25 edits in trunk/Source

Clicking a tel:// link on iPad with a trackpad presents different UI than tapping on it
https://bugs.webkit.org/show_bug.cgi?id=211686
<rdar://problem/57941589>

Reviewed by Wenson Hsieh.

Source/WebCore:

  • dom/MouseRelatedEvent.h:
  • editing/cocoa/DataDetection.h:
  • editing/cocoa/DataDetection.mm:

(WebCore::DataDetection::canPresentDataDetectorsUIForElement):
(WebCore::DataDetection::shouldCancelDefaultAction): Deleted.
Rename shouldCancelDefaultAction to canPresentDataDetectorsUIForElement.
This bit indicates whether a given element should invoke DD UI instead of
doing its default action, so either name is OK, but it feels better to
have it in the affirmative direction.

  • html/HTMLAnchorElement.cpp:

(WebCore::HTMLAnchorElement::handleClick):
Determine if tapping on an anchor should invoke DataDetectors UI instead
of performing the default action, and short-circuit if that is possible.

  • loader/EmptyClients.h:
  • page/ChromeClient.h:

Source/WebKit:

Previously, iOS WebKit had code in handleTap, handleTwoFingerTapAtPoint, and commitPotentialTap,
which introspected the hit element /before/ dispatching the tap (or synthetic click) to the DOM,
short circuiting all normal event handling machinery in order to prevent the default action
and present the Data Detectors UI for the given link.

There's one immediate problem with this, which is that there is no similar code in the direct
click event handler path, which we now use for trackpad/mouse input on iPad. There's also a
secondary problem (which we have not seen in practice), which is that pages cannot preventDefault
to avoid launching the Data Detectors UI on a link, like they could to prevent an ordinary
link from being followed.

In order to resolve both issues and reduce duplication of logic, move the code that introspects
the element and invokes Data Detectors UI from high-level WebKit event dispatch code (where it
doesn't really belong) down to WebCore's default click event handler for anchors, right next to
the code that would ordinarily cause a navigation. This way, no matter how we get here, whether
by synthetic click or real click, we'll invoke the Data Detectors UI.

One alternative considered at length: we could actually let the navigation happen, and instead
handle the switch in navigation policy code, but there are a few reasons that did not seem ideal:
1) We'd need to plumb platform-specific data structures through a ton of FrameLoader code.
2) Clients often block non-HTTP(S) navigations, so in order to keep the feature functional,

we'd have to disregard the client's policy decision, defeating much of the purpose of making
use of the navigation mechanism in the first place.

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

(WebKit::PageClientImpl::showDataDetectorsUIForPositionInformation):

  • UIProcess/ios/WebPageProxyIOS.mm:

(WebKit::WebPageProxy::showDataDetectorsUIForPositionInformation):

  • WebProcess/WebCoreSupport/WebChromeClient.h:
  • WebProcess/WebCoreSupport/ios/WebChromeClientIOS.mm:

(WebKit::WebChromeClient::showDataDetectorsUIForElement):
Plumb showDataDetectorsUIForPositionInformation from iOS WebKit's ChromeClient
implementation all the way to WKContentView.

  • UIProcess/ios/WKActionSheetAssistant.h:
  • UIProcess/ios/WKActionSheetAssistant.mm:

(-[WKActionSheetAssistant showDataDetectorsUIForPositionInformation:]):
(-[WKActionSheetAssistant contextMenuInteraction:configurationForMenuAtLocation:]):
(-[WKActionSheetAssistant contextMenuInteraction:previewForHighlightingMenuWithConfiguration:]):
(-[WKActionSheetAssistant showDataDetectorsSheet]): Deleted.
Make it possible to push InteractionInformationAtPosition into WKActionSheetAssistant,
instead of having it always pull a fresh one upon invocation, so that we can use the
position information passed along with the showDataDetectorsUIForPositionInformation message.

(-[WKActionSheetAssistant _contextMenuInteraction:overrideSuggestedActionsForConfiguration:]):
(-[WKActionSheetAssistant suggestedActionsForContextMenuWithPositionInformation:]):
Fix an existing bug where Data Detectors context menus would show extra default actions,
by moving our implementation of the -_contextMenuInteraction:overrideSuggestedActionsForConfiguration:
delegate here, sharing it with WKContentViewInteraction.

In a future patch, we should reconsider having three separate UIContextMenuInteractions.

Also, remove the contextMenuPresentationLocationForActionSheetAssistant: delegate,
since it will be wrong in the case of pushed-in position information, and instead
use the position information's original hit test point.

  • UIProcess/ios/WKContentViewInteraction.h:
  • UIProcess/ios/WKContentViewInteraction.mm:

(-[WKContentView _showDataDetectorsUI]):
(-[WKContentView _showDataDetectorsUIForPositionInformation:]):
(-[WKContentView _actionForLongPressFromPositionInformation:]):
(-[WKContentView _didNotHandleTapAsClick:]):
(-[WKContentView dataDetectionContextForPositionInformation:]):
(-[WKContentView dataDetectionContextForActionSheetAssistant:positionInformation:]):
(-[WKContentView _showDataDetectorsSheet]): Deleted.
(-[WKContentView currentPositionInformation]): Deleted.
(-[WKContentView dataDetectionContextForActionSheetAssistant:]): Deleted.
Instead of exposing an unnecessary -currentPositionInformation getter on WKActionSheetAssistant,
provide it as an argument to the WKActionSheetAssistantDelegate methods that actually need it.

(-[WKContentView contextMenuPresentationLocationForActionSheetAssistant:]): Deleted.
(-[WKContentView _contextMenuInteraction:overrideSuggestedActionsForConfiguration:]):
Adopt WKActionSheetAssistant's suggestedActions mechanism so we can share code.

  • UIProcess/ios/WKPDFView.mm:

(-[WKPDFView _showActionSheetForURL:atLocation:withAnnotationRect:]):
(-[WKPDFView dataDetectionContextForActionSheetAssistant:positionInformation:]):
(-[WKPDFView dataDetectionContextForActionSheetAssistant:]): Deleted.
Adapt to some WKActionSheetAssistantDelegate changes.

  • WebProcess/WebPage/WebPage.h:
  • WebProcess/WebPage/ios/WebPageIOS.mm:

(WebKit::WebPage::handleTap):
(WebKit::WebPage::handleTwoFingerTapAtPoint):
(WebKit::WebPage::commitPotentialTap):
Remove the aforementioned short-circuiting paths for Data Detectors links.

Source/WebKitLegacy/ios:

  • WebCoreSupport/WebChromeClientIOS.h:
3:17 AM Changeset in webkit [261456] by Diego Pino Garcia
  • 3 edits in trunk/LayoutTests

[GTK] Gardening, update test expectations
https://bugs.webkit.org/show_bug.cgi?id=211694

Unreviewed gardening.

Gardening of flaky failures.

  • platform/glib/TestExpectations:
  • platform/gtk/TestExpectations:
12:26 AM Changeset in webkit [261455] by commit-queue@webkit.org
  • 3 edits in trunk/LayoutTests/imported/w3c

[ iOS wk2 and Mac wk2 ] imported/w3c/web-platform-tests/fetch/stale-while-revalidate/frame-removal.html is flaky failing.
https://bugs.webkit.org/show_bug.cgi?id=209281

Patch by Rob Buis <rbuis@igalia.com> on 2020-05-10
Reviewed by Darin Adler.

Since it is difficult to estimate when the revalidations are received
in relation to the frame loads, add two polling loops to make sure
revalidations have been received before proceding with the next
test step. This is similar to what fetch.html does.

  • web-platform-tests/fetch/stale-while-revalidate/frame-removal.html:
  • web-platform-tests/fetch/stale-while-revalidate/resources/stale-frame.py:

(main):

May 9, 2020:

8:44 PM Changeset in webkit [261454] by ddkilzer@apple.com
  • 2 edits in trunk/Source/WebKit

Attempt #2 to fix internal iOS build

  • UIProcess/ios/WKMouseGestureRecognizer.mm:
  • Use ALLOW_DEPRECATED_IMPLEMENTATIONS_{BEGIN,END}.
8:36 PM Changeset in webkit [261453] by ddkilzer@apple.com
  • 2 edits in trunk

Remove duplicate ChangeLog entries committed by accident.

8:08 PM Changeset in webkit [261452] by ddkilzer@apple.com
  • 3 edits in trunk/Source/WebKit

Attemp to fix internal iOS build

  • Platform/spi/ios/UIKitSPI.h:
  • Define @class UIHoverEvent using header if available, else fall back to local class definition.
  • Define methods separately from class definition.
  • UIProcess/ios/WKMouseGestureRecognizer.mm:

(-[WKMouseGestureRecognizer setView:]):

  • Use new method if it is available.
8:08 PM Changeset in webkit [261451] by ddkilzer@apple.com
  • 2 edits in trunk

XML external entity resources should only be loaded from XML MIME types
<https://webkit.org/b/211488>
<rdar://problem/62869515>

Reviewed by Darin Adler.

Source/WebCore:

Tests: dom/xhtml/level3/core/entitygetinputencoding03.xhtml

dom/xhtml/level3/core/entitygetinputencoding04.xhtml
dom/xhtml/level3/core/entitygetxmlencoding02.xhtml
dom/xhtml/level3/core/entitygetxmlencoding03.xhtml
dom/xhtml/level3/core/entitygetxmlencoding04.xhtml
dom/xhtml/level3/core/entitygetxmlversion03.xhtml
dom/xhtml/level3/core/entitygetxmlversion04.xhtml
dom/xhtml/level3/core/nodegetbaseuri16.xhtml
dom/xhtml/level3/core/nodegetbaseuri19.xhtml
dom/xhtml/level3/core/nodegetbaseuri20.xhtml
fast/parser/external-entities-in-xslt.xml
fast/xsl/dtd-in-source-document.xml
fast/xsl/xslt-second-level-import.xml
http/tests/security/contentTypeOptions/nosniff-xml-external-entity.xhtml
http/tests/security/xss-DENIED-xsl-external-entity-redirect.xml

  • html/HTMLBaseElement.cpp:

(WebCore::HTMLBaseElement::href const):

  • Add comment about keeping code in sync with openFunc() in XMLDocumentParserLibxml2.cpp.
  • xml/XMLHttpRequest.cpp:

(WebCore::XMLHttpRequest::responseMIMEType const):

  • Add comment about keeping code in sync with externalEntityMimeTypeAllowed() in XMLDocumentParserLibxml2.cpp.
  • xml/parser/XMLDocumentParserLibxml2.cpp:

(WebCore::externalEntityMimeTypeAllowed):

  • Rename from externalEntityMimeTypeAllowedByNosniff().
  • Change to only allow XML MIME types regardless of nosniff option.
  • Add fallback path to determine MIME type for file:/// URLs to make layout tests work properly. Logic taken from XMLHttpRequest::responseMIMEType(). Not sure if there was a good place to share it.

(WebCore::openFunc):

  • Fix relative URLs by providing the document's URL as a base. Also provide an encoding if needed. Logic taken from HTMLBaseElement::href(). (Not sure if there was a good place to share it.) This was required to fix loading of external entity resources in the dom/xhtml/level3/core tests, which hadn't been loading these resources for a while. Ultimately this didn't matter--except for new error messages being printed in test results--because the tests fail due to missing DOM features for XHTML documents).
  • Change the fix for Bug 21963 into an empty URL check since setting FetchOptions.mode to Mode::SameOrigin prevents a redirect from loading a resource outside the document's origin. The previous check worked, but the relaxed check in externalEntityMimeTypeAllowed() caused the XML MIME type warning to be output on redirects to non-same-origin URLs. I didn't see a way to check for a cross-origin loading error.
  • Add a console message for a cross-origin load failing.
  • Update for function rename.
  • Remove double negative from console message for an invalid MIME type.

(WebCore::externalEntityMimeTypeAllowedByNosniff):

  • Rename to externalEntityMimeTypeAllowed().

LayoutTests:

To fix these layout tests, the following changes were made:

  • Rename *.ent files to *.ent.xml so that an XML MIME type would be given to the resources when loading from a file:/// URL.
  • Similarly, rename *.dtd files to *.dtd.xml.
  • Update tests to refer to new entity/dtd file names.
  • There are more *.dtd and *.ent files that weren't renamed. I will fix those in a follow-up patch. They weren't needed to fix any tests, so may be unused.
  • dom/xhtml/level3/core/entitygetinputencoding03.xhtml:
  • dom/xhtml/level3/core/entitygetinputencoding04.xhtml:
  • dom/xhtml/level3/core/entitygetxmlencoding02.xhtml:
  • dom/xhtml/level3/core/entitygetxmlencoding03.xhtml:
  • dom/xhtml/level3/core/entitygetxmlencoding04.xhtml:
  • dom/xhtml/level3/core/entitygetxmlversion03.xhtml:
  • dom/xhtml/level3/core/entitygetxmlversion04.xhtml:
  • dom/xhtml/level3/core/resources/external_foo.ent.xml: Rename from LayoutTests/dom/xhtml/level3/core/external_foo.ent.xml.
  • dom/xhtml/level3/core/resources/external_foobr.ent.xml: Rename from LayoutTests/dom/xhtml/level3/core/external_foobr.ent.xml.
  • dom/xhtml/level3/core/resources/external_widget.ent.xml: Rename from LayoutTests/dom/xhtml/level3/core/external_widget.ent.xml.
  • dom/xhtml/level3/core/nodegetbaseuri16.xhtml:
  • dom/xhtml/level3/core/nodegetbaseuri19.xhtml:
  • dom/xhtml/level3/core/nodegetbaseuri20.xhtml:
  • fast/parser/external-entities.xml:
  • fast/parser/resources/external-entities.dtd.xml: Rename from LayoutTests/fast/parser/resources/external-entities.dtd.
  • fast/parser/resources/external-entities.xsl:
  • fast/xsl/dtd-in-source-document.xml:
  • fast/xsl/resources/dtd-in-source-document.dtd.xml: Rename from LayoutTests/fast/xsl/resources/dtd-in-source-document.dtd.
  • fast/xsl/resources/xslt-second-level-import.xsl:
  • fast/xsl/resources/xslt-second-level-import.xsl.dtd.xml: Rename from LayoutTests/fast/xsl/resources/xslt-second-level-import.xsl.dtd.
  • http/tests/security/contentTypeOptions/nosniff-xml-external-entity-expected.txt:
  • http/tests/security/contentTypeOptions/nosniff-xml-external-entity.xhtml:
  • Add test cases without "X-Content-Type-Options: nosniff" header.
  • http/tests/security/xss-DENIED-xsl-external-entity-redirect-expected.txt:
  • Add newly expected console error messages about cross-origin resource load failures.
8:05 PM Changeset in webkit [261450] by Wenson Hsieh
  • 5 edits in trunk

[macOS] Search field on mayoclinic.org/forms/us-resident-appointment clips the submit button
https://bugs.webkit.org/show_bug.cgi?id=211673
<rdar://problem/62572501>

Reviewed by Tim Horton.

Source/WebCore:

Allow search fields to be style-able, but only if the CSS border value is non-default.

Note that there was a previous attempt to achieve something similar in r157443 by adding search fields to the
base class implementation of RenderTheme::isControlStyled; however, this patch wasn't actually accompanied by
support for rendering native search fields with a non-default background, which meant that customizing just the
background of a search field would cause the entire search field to opt out of the native search field
appearance (a pill with rounded corners on macOS).

However, in the case where the border is customized on macOS, it is incorrect to use the default search field
appearance, since the search field cell just consists of a border; as such, there should be little compatibility
risk of a web page unexpectedly getting the fallback (non-native) appearance for a search field, due to having
custom border styles.

This also makes the behavior of search fields match that of text fields, textareas, and list boxes (multi-option
selects) on macOS, in terms of what is needed in order to bail out of native appearance rendering.

Rebaselined existing tests: fast/css/text-input-with-webkit-border-radius.html

fast/forms/search-styled.html

  • rendering/RenderThemeMac.mm:

(WebCore::RenderThemeMac::isControlStyled const): Add SearchFieldPart.

LayoutTests:

Rebaseline a couple of layout tests that contain search fields with custom CSS border styles.

  • platform/mac/fast/css/text-input-with-webkit-border-radius-expected.txt:
  • platform/mac/fast/forms/search-styled-expected.txt:
6:21 PM Changeset in webkit [261449] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebKit

Unreviewed, reverting r261389.
https://bugs.webkit.org/show_bug.cgi?id=211678

Introduced page loading regression. (Requested by perarne on
#webkit).

Reverted changeset:

"[iOS] Update message filtering rules in the WebContent
process' sandbox"
https://bugs.webkit.org/show_bug.cgi?id=211188
https://trac.webkit.org/changeset/261389

5:48 PM Changeset in webkit [261448] by Darin Adler
  • 2 edits in trunk/Source/WTF

Delete some dead code in WorkQueueCocoa.cpp
https://bugs.webkit.org/show_bug.cgi?id=211676

Reviewed by Chris Dumez.

  • wtf/cocoa/WorkQueueCocoa.cpp:

(WTF::targetQueueForQOSClass): Deleted.

5:05 PM Changeset in webkit [261447] by jer.noble@apple.com
  • 2 edits in trunk/Source/WebCore

REGRESSION(r258493): CRASH running fast/mediastream/RTCPeerConnection tests
https://bugs.webkit.org/show_bug.cgi?id=211666
<rdar://problem/63055644>

Reviewed by Eric Carlson.

MockMediaStreamTrack advertises that it's a webrtc::VideoTrackInterface, but doesn't inherit from
that interface, leading to a crash when its pointer is cast to webrtc::VideoTrackInterface and a
virtual method called on the resulting pointer. Since it's only used in one place, and since there's
an existing mock webrtc::VideoTrackInterface object in that same file, remove MockMediaStreamTrack
and replace the one place it's used with MockLibWebRTCVideoTrack.

  • testing/MockLibWebRTCPeerConnection.h:

(WebCore::MockMediaStreamTrack::state const): Deleted.

5:02 PM Changeset in webkit [261446] by commit-queue@webkit.org
  • 2 edits in trunk/LayoutTests

[ macOS ] REGRESSION (r259139): webgl/2.0.0/conformance2/rendering/framebuffer-completeness-unaffected.html is failing
https://bugs.webkit.org/show_bug.cgi?id=209740

Patch by Kenneth Russell <kbr@chromium.org> on 2020-05-09
Reviewed by Darin Adler.

Reenable framebuffer-completeness-unaffected.html, which is now
passing after several other bug fixes.

  • platform/mac/TestExpectations:
5:02 PM Changeset in webkit [261445] by commit-queue@webkit.org
  • 2 edits in trunk/LayoutTests

[ Mojave wk1 Release ] fast/canvas/webgl/texImage2D-mse-flipY-true.html is timing out.
https://bugs.webkit.org/show_bug.cgi?id=209837

Patch by Kenneth Russell <kbr@chromium.org> on 2020-05-09
Reviewed by Darin Adler.

Remove flaky timeout suppression for
texImage2D-mse-flipY-true.html, which has been passing reliably
for over a month.

  • platform/mac-wk1/TestExpectations:
4:35 PM Changeset in webkit [261444] by don.olmstead@sony.com
  • 7 edits in trunk

[CMake] Use WEBKIT_EXECUTABLE in MallocBench
https://bugs.webkit.org/show_bug.cgi?id=211665

Reviewed by Yusuke Suzuki.

.:

Add the PerformanceTest subdirectory for all ports when in DEVELOPER_MODE.

  • CMakeLists.txt:

PerformanceTests:

Cleanup MallocBench definitions using WEBKIT_EXECUTABLE. Notify developers
that MallocBench is unavailable only if bmalloc is being used but the platform
does not have the functionality required.

  • CMakeLists.txt:
  • MallocBench/MallocBench/CMakeLists.txt:

Source/bmalloc:

Only build mbmalloc if its possible to run MallocBench.

  • CMakeLists.txt:
4:20 PM Changeset in webkit [261443] by ddkilzer@apple.com
  • 22 edits
    6 moves in trunk

XML external entity resources should only be loaded from XML MIME types
<https://webkit.org/b/211488>
<rdar://problem/62869515>

Reviewed by Darin Adler.

Source/WebCore:

Tests: dom/xhtml/level3/core/entitygetinputencoding03.xhtml

dom/xhtml/level3/core/entitygetinputencoding04.xhtml
dom/xhtml/level3/core/entitygetxmlencoding02.xhtml
dom/xhtml/level3/core/entitygetxmlencoding03.xhtml
dom/xhtml/level3/core/entitygetxmlencoding04.xhtml
dom/xhtml/level3/core/entitygetxmlversion03.xhtml
dom/xhtml/level3/core/entitygetxmlversion04.xhtml
dom/xhtml/level3/core/nodegetbaseuri16.xhtml
dom/xhtml/level3/core/nodegetbaseuri19.xhtml
dom/xhtml/level3/core/nodegetbaseuri20.xhtml
fast/parser/external-entities-in-xslt.xml
fast/xsl/dtd-in-source-document.xml
fast/xsl/xslt-second-level-import.xml
http/tests/security/contentTypeOptions/nosniff-xml-external-entity.xhtml
http/tests/security/xss-DENIED-xsl-external-entity-redirect.xml

  • html/HTMLBaseElement.cpp:

(WebCore::HTMLBaseElement::href const):

  • Add comment about keeping code in sync with openFunc() in XMLDocumentParserLibxml2.cpp.
  • xml/XMLHttpRequest.cpp:

(WebCore::XMLHttpRequest::responseMIMEType const):

  • Add comment about keeping code in sync with externalEntityMimeTypeAllowed() in XMLDocumentParserLibxml2.cpp.
  • xml/parser/XMLDocumentParserLibxml2.cpp:

(WebCore::externalEntityMimeTypeAllowed):

  • Rename from externalEntityMimeTypeAllowedByNosniff().
  • Change to only allow XML MIME types regardless of nosniff option.
  • Add fallback path to determine MIME type for file:/// URLs to make layout tests work properly. Logic taken from XMLHttpRequest::responseMIMEType(). Not sure if there was a good place to share it.

(WebCore::openFunc):

  • Fix relative URLs by providing the document's URL as a base. Also provide an encoding if needed. Logic taken from HTMLBaseElement::href(). (Not sure if there was a good place to share it.) This was required to fix loading of external entity resources in the dom/xhtml/level3/core tests, which hadn't been loading these resources for a while. Ultimately this didn't matter--except for new error messages being printed in test results--because the tests fail due to missing DOM features for XHTML documents).
  • Change the fix for Bug 21963 into an empty URL check since setting FetchOptions.mode to Mode::SameOrigin prevents a redirect from loading a resource outside the document's origin. The previous check worked, but the relaxed check in externalEntityMimeTypeAllowed() caused the XML MIME type warning to be output on redirects to non-same-origin URLs. I didn't see a way to check for a cross-origin loading error.
  • Add a console message for a cross-origin load failing.
  • Update for function rename.
  • Remove double negative from console message for an invalid MIME type.

(WebCore::externalEntityMimeTypeAllowedByNosniff):

  • Rename to externalEntityMimeTypeAllowed().

LayoutTests:

To fix these layout tests, the following changes were made:

  • Rename *.ent files to *.ent.xml so that an XML MIME type would be given to the resources when loading from a file:/// URL.
  • Similarly, rename *.dtd files to *.dtd.xml.
  • Update tests to refer to new entity/dtd file names.
  • There are more *.dtd and *.ent files that weren't renamed. I will fix those in a follow-up patch. They weren't needed to fix any tests, so may be unused.
  • dom/xhtml/level3/core/entitygetinputencoding03.xhtml:
  • dom/xhtml/level3/core/entitygetinputencoding04.xhtml:
  • dom/xhtml/level3/core/entitygetxmlencoding02.xhtml:
  • dom/xhtml/level3/core/entitygetxmlencoding03.xhtml:
  • dom/xhtml/level3/core/entitygetxmlencoding04.xhtml:
  • dom/xhtml/level3/core/entitygetxmlversion03.xhtml:
  • dom/xhtml/level3/core/entitygetxmlversion04.xhtml:
  • dom/xhtml/level3/core/resources/external_foo.ent.xml: Rename from LayoutTests/dom/xhtml/level3/core/external_foo.ent.xml.
  • dom/xhtml/level3/core/resources/external_foobr.ent.xml: Rename from LayoutTests/dom/xhtml/level3/core/external_foobr.ent.xml.
  • dom/xhtml/level3/core/resources/external_widget.ent.xml: Rename from LayoutTests/dom/xhtml/level3/core/external_widget.ent.xml.
  • dom/xhtml/level3/core/nodegetbaseuri16.xhtml:
  • dom/xhtml/level3/core/nodegetbaseuri19.xhtml:
  • dom/xhtml/level3/core/nodegetbaseuri20.xhtml:
  • fast/parser/external-entities.xml:
  • fast/parser/resources/external-entities.dtd.xml: Rename from LayoutTests/fast/parser/resources/external-entities.dtd.
  • fast/parser/resources/external-entities.xsl:
  • fast/xsl/dtd-in-source-document.xml:
  • fast/xsl/resources/dtd-in-source-document.dtd.xml: Rename from LayoutTests/fast/xsl/resources/dtd-in-source-document.dtd.
  • fast/xsl/resources/xslt-second-level-import.xsl:
  • fast/xsl/resources/xslt-second-level-import.xsl.dtd.xml: Rename from LayoutTests/fast/xsl/resources/xslt-second-level-import.xsl.dtd.
  • http/tests/security/contentTypeOptions/nosniff-xml-external-entity-expected.txt:
  • http/tests/security/contentTypeOptions/nosniff-xml-external-entity.xhtml:
  • Add test cases without "X-Content-Type-Options: nosniff" header.
  • http/tests/security/xss-DENIED-xsl-external-entity-redirect-expected.txt:
  • Add newly expected console error messages about cross-origin resource load failures.
4:10 PM Changeset in webkit [261442] by ddkilzer@apple.com
  • 10 edits
    1 copy
    2 moves in trunk/Source

Adapt LocalCurrentGraphicsContext for iOS
<https://webkit.org/b/211660>

Reviewed by Darin Adler.

Source/WebCore:

  • PlatformMac.cmake:
  • SourcesCocoa.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • Update build files for:
    • Rename of LocalCurrentGraphicsContext.mm to LocalCurrentGraphicsContextMac.mm.
    • Move of LocalCurrentGraphicsContext.h from platform/mac to platform/cocoa.
    • Addition of LocalCurrentGraphicsContextIOS.mm.
  • platform/cocoa/LocalCurrentGraphicsContext.h: Renamed from Source/WebCore/platform/mac/LocalCurrentGraphicsContext.h.
  • Make this work for iOS by using PLATFORM(COCOA) for the outer guard and USE(APPKIT) for the Mac-specific bits.
  • Use RetainPtr<> for NSGraphicsContext to clean up code in LocalCurrentGraphicsContextMac.mm.

(WebCore::LocalCurrentGraphicsContext::cgContext):

  • Inline from LocalCurrentGraphicsContextMac.mm.
  • platform/ios/LocalCurrentGraphicsContextIOS.mm: Copied from Source/WebCore/platform/mac/LocalCurrentGraphicsContext.mm.

(WebCore::LocalCurrentGraphicsContext::LocalCurrentGraphicsContext):
(WebCore::LocalCurrentGraphicsContext::~LocalCurrentGraphicsContext):

  • Implement based on LocalCurrentGraphicsContextMac.mm. Use UIGraphics{GetCurrent,Pop,Push}Context() functions added to UIKitSoftLink.h.
  • platform/mac/LocalCurrentGraphicsContextMac.mm: Renamed from Source/WebCore/platform/mac/LocalCurrentGraphicsContext.mm.

(WebCore::LocalCurrentGraphicsContext::LocalCurrentGraphicsContext):

  • Use m_savedGraphicsContext instead of graphicsContext in the body of the constructor.
  • Remove set-to-nil/retain of m_savedNSGraphicsContext since that is handled by RetainPtr<> now.

(WebCore::LocalCurrentGraphicsContext::~LocalCurrentGraphicsContext):

  • Remove release of m_savedNSGraphicsContext since that is handled by RetainPtr<> now.

(WebCore::LocalCurrentGraphicsContext::cgContext): Delete.

  • Inline into header to share implementation with iOS.

Source/WebCore/PAL:

  • pal/ios/UIKitSoftLink.h:
  • pal/ios/UIKitSoftLink.mm:
  • Add soft linking of UIGraphics{GetCurrent,Pop,Push}Context() functions.

Source/WebKit:

  • UIProcess/Cocoa/WebPageProxyCocoa.mm:

(WebKit::convertPlatformImageToBitmap):

  • Use LocalCurrentGraphicsContext for both iOS and Mac code paths.
  • WebProcess/WebCoreSupport/mac/WebDragClientMac.mm:
  • Switch from PLATFORM(MAC) and PLATFORM(IOS_FAMIY) to USE(APPKIT) to separate platform code.

(WebKit::convertDragImageToBitmap):
(WebKit::convertImageToBitmap): Delete.
(WebKit::convertCGImageToBitmap): Delete.

  • Combine Mac-specific convertImageToBitmap() and iOS-specific convertCGImageToBitmap() into a single method using DragImage type and special-casing one line of code.

(WebKit::WebDragClient::startDrag):
(WebKit::WebDragClient::didConcludeEditDrag):

  • Combine iOS and Mac methods into a singe method.
3:40 PM Changeset in webkit [261441] by Ross Kirsling
  • 11 edits in trunk/Source/JavaScriptCore

Fix build errors and warnings for non-unified JSCOnly
https://bugs.webkit.org/show_bug.cgi?id=211655

Reviewed by Darin Adler and Yusuke Suzuki.

  • bytecode/BytecodeDumper.cpp:

(JSC::isConstantRegisterIndex): Deleted.
Remove unused function.

  • llint/LLIntEntrypoint.cpp:
  • llint/LLIntThunks.cpp:
  • llint/LLIntThunks.h:
  • runtime/AggregateErrorConstructor.cpp:
  • runtime/AggregateErrorPrototype.cpp:
  • wasm/js/WebAssemblyFunction.cpp:

Fix includes.

  • tools/JSDollarVM.cpp:

Deal with "unused constant" warnings for needsDestruction.

  • wasm/WasmLLIntPlan.cpp:
  • wasm/WasmSignature.cpp:

Remove unused constants.

3:29 PM Changeset in webkit [261440] by Darin Adler
  • 2 edits in trunk/Source/WTF

Add iterator checking to ListHashSet
https://bugs.webkit.org/show_bug.cgi?id=211669

Reviewed by Anders Carlsson.

HashSet and HashMap have iterator checking in debug builds.
Add similar checking to ListHashSet, controlled by the same
macro, CHECK_HASHTABLE_ITERATORS. Use WeakPtr to make the
implementation simple.

  • wtf/ListHashSet.h: Make ListHashSet and ListHashSetNode derive

from CanMakeWeakPtr. Add m_weakSet and m_weakPosition members to
ListHashSetConstIterator, and assert their values at the appropriate
times so we will get a breakpoint or crash.

1:15 PM Changeset in webkit [261439] by Darin Adler
  • 2 edits in trunk/Source/WebCore

Fix null-dereference in DocumentTimelinesController::updateAnimationsAndSendEvents
https://bugs.webkit.org/show_bug.cgi?id=211667

Reviewed by Antoine Quint.

  • animation/DocumentTimelinesController.cpp:

(WebCore::DocumentTimelinesController::updateAnimationsAndSendEvents): Add null
check before removing animationsToRemove, which may already have been removed
since any arbitrary change could occur while animations are firing.

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

Add missing null-check of page in ResourceLoader::loadDataURL
https://bugs.webkit.org/show_bug.cgi?id=211589
rdar://57213601

Reviewed by Anders Carlsson.

  • loader/ResourceLoader.cpp:

(WebCore::ResourceLoader::loadDataURL): Add null check before using page.

9:04 AM Changeset in webkit [261437] by Darin Adler
  • 15 edits in trunk

Streamline MarkupAccumulator to improve efficiency a bit
https://bugs.webkit.org/show_bug.cgi?id=211656

Reviewed by Anders Carlsson.

Source/JavaScriptCore:

  • b3/air/AirFixPartialRegisterStalls.h: Fix spelling of "explicitly".

Source/WebCore:

  • editing/MarkupAccumulator.cpp:

(WebCore::MarkupAccumulator::appendCharactersReplacingEntities): Corrected early
exit so it returns any time the length is 0. For some reason the code before
wouldn't do the early return when offset is non-zero, which is unnecessary.
(WebCore::MarkupAccumulator::appendString): Deleted.
(WebCore::MarkupAccumulator::appendStringView): Deleted.
(WebCore::MarkupAccumulator::appendEndTag): Use variadic append to cut down
on memory allocations.
(WebCore::MarkupAccumulator::totalLength): Deleted.
(WebCore::MarkupAccumulator::concatenateMarkup): Deleted.
(WebCore::MarkupAccumulator::takeMarkup): Added.
(WebCore::MarkupAccumulator::appendQuotedURLAttributeValue): Use variadic
append to cut down on memory allocations. Also use char instead of UChar so
the string building code doesn't have to do an 8/16 bit check.
(WebCore::shouldAddNamespaceElement): Prepend a literal, don't bother to
make a String just to append to another String. Also made this a
non-member function.
(WebCore::shouldAddNamespaceAttribute): Made this a non-member function.
(WebCore::MarkupAccumulator::appendNamespace): Fix hash table usage
to use add instead of get followed by set to avoid double hashing.
Use variadic append to cut down on memory allocation.
(WebCore::MarkupAccumulator::appendText): Tweaked style to make this a
one-line function.
(WebCore::appendComment): Deleted.
(WebCore::appendXMLDeclaration): Made this a non-member function.
Use variadic append to cut down on memory allocation.
(WebCore::appendDocumentType): Made this a non-member function.
Use variadic append to cut down on memory allocation.
(WebCore::MarkupAccumulator::appendCDATASection): Deleted.
(WebCore::MarkupAccumulator::appendNonElementNode): Moved the bodies of
appendComment, appendProcessingInstruction, and appendCDATASection in
here since they can all be one-line variadic append calls.

  • editing/MarkupAccumulator.h:

(WebCore::MarkupAccumulator::length const): Changed the return type
of length to be unsigned since that's what StringBuilder returns.
Made isAllASCII call StringBuilder::isAllASCII. Replaced appendString
and appendStringView with variadic append. Removed many functions
that no longer need to be member functions. Made appendAttributeValue
a static member function. Made appendNamespace private. Made
m_serializationSyntax const.

  • editing/markup.cpp:

(WebCore::StyledMarkupAccumulator::wrapWithStyleNode): Use append
instead of appenString.
(WebCore::StyledMarkupAccumulator::isAllASCII const): Added. Before
the code would only check the StringBuilder, but we also need to
check m_reversedPrecedingMarkup.
(WebCore::StyledMarkupAccumulator::takeResults): Use CheckedUint32
since StringBuilder's reserveCapacity function takes unsigned, not
size_t. The old code, using totalLength, would just pass a size_t
and let it get chopped off, which didn't do any harm, but it seems
strange to compute a 64-bit value just to chop off the lower 32
bits. An alternative is to compute the 32-bit value and just let
it overflow. Use a modern for loop by defining a ReverseView
template rather than writing a confusing backwards loop. Use the
new takeMarkup instead of concatenateMarkup.
(WebCore::StyledMarkupAccumulator::appendText): Tweak coding
style a little bit.
(WebCore::StyledMarkupAccumulator::appendStartTag): Ditto.
(WebCore::StyledMarkupAccumulator::appendNodeToPreserveMSOList):
Use variadic append to cut down on memory allocations.
(WebCore::propertyMissingOrEqualToNone): Tweak coding style a bit.
(WebCore::serializePreservingVisualAppearanceInternal): Use
append instead of appendString.
(WebCore::shouldPreserveMSOLists): Take a StringView instead of a
String to eliminate unnecessary memory allocation in call to substring.
(WebCore::sanitizedMarkupForFragmentInDocument): Use makeString
instead of StringBuilder to cut down on memory allocation.

  • html/HTMLFormElement.cpp:

(WebCore::HTMLFormElement::resetDefaultButton): Fix spelling error
in the word "explicitly".

  • mathml/MathMLOperatorDictionary.cpp:

(WebCore::MathMLOperatorDictionary::search): Ditto.

  • page/PageSerializer.cpp:

(WebCore::PageSerializer::SerializerMarkupAccumulator::SerializerMarkupAccumulator):
Use variadic append instead of appendString to cut down on
memory allocations.

  • rendering/svg/SVGInlineTextBox.cpp:

(WebCore::SVGInlineTextBox::paint): Fix spelling error in the word
"explicitly".

Source/WTF:

  • wtf/text/StringBuilder.cpp:

(WTF::StringBuilder::isAllASCII const): Added.

  • wtf/text/StringBuilder.h: Added isAllASCII.

Tools:

  • TestWebKitAPI/Tests/WTF/StringImpl.cpp:

(TestWebKitAPI::TEST): Fix spellling error in the word "explicitly".

9:02 AM Changeset in webkit [261436] by david_quesada@apple.com
  • 5 edits in trunk/Source

Remove HAVE_UI_SCROLL_VIEW_INDICATOR_FLASHING_SPI
https://bugs.webkit.org/show_bug.cgi?id=211662
rdar://problem/63048713

Reviewed by Darin Adler.

Source/WebKit:

Remove this platform conditional and unconditionally use -[UIScrolView _flashScrollIndicatorsForAxes:
persistingPreviousFlashes:]. All supported platforms with UIScrollView have this SPI, and the conditional
was excluding Mac Catalyst, making WKKeyboardScrollViewAnimator send a message to its scroll view that
is no longer implemented.

  • Platform/spi/ios/UIKitSPI.h:

Remove the declaration of the now unused -_flashScrollIndicatorsPersistingPreviousFlashes:.

  • UIProcess/ios/WKKeyboardScrollingAnimator.mm:

(axesForDelta):
(-[WKKeyboardScrollViewAnimator scrollToContentOffset:animated:]):

Source/WTF:

  • wtf/PlatformHave.h:
4:10 AM Changeset in webkit [261435] by Diego Pino Garcia
  • 2 edits in trunk/LayoutTests

[GTK] Gardening, update test expectations
https://bugs.webkit.org/show_bug.cgi?id=211664

Gardening of flaky failures and failures reintroduced after latest
patches reverted.

  • platform/gtk/TestExpectations:
1:07 AM Changeset in webkit [261434] by Jack Lee
  • 3 edits
    2 adds in trunk

Nullptr crash in LegacyWebArchive::createPropertyListRepresentation when copying selected range that contains surrogate characters
https://bugs.webkit.org/show_bug.cgi?id=211658
<rdar://problem/62844424>

Reviewed by Ryosuke Niwa.

Source/WebCore:

Added check for null LegacyWebArchive in LegacyWebArchive::createFromSelection. Return nullptr when creation fails.

Test: webarchive/copy-surrogate-char-crash.html

  • loader/archive/cf/LegacyWebArchive.cpp:

(WebCore::LegacyWebArchive::createFromSelection):

LayoutTests:

Added a regression test for the crash.

  • webarchive/copy-surrogate-char-crash-expected.txt: Added.
  • webarchive/copy-surrogate-char-crash.html: Added.
12:00 AM Changeset in webkit [261433] by commit-queue@webkit.org
  • 5 edits in trunk

Fix wpt shadow-dom/slots-fallback-in-document.html
https://bugs.webkit.org/show_bug.cgi?id=211640

Patch by Tetsuharu Ohzeki <Tetsuharu Ohzeki> on 2020-05-09
Reviewed by Ryosuke Niwa.

By specs, HTMLSlotElement.assignedNodes() should not count children of
a slot in a document tree for flattened assigned nodes.

https://html.spec.whatwg.org/multipage/scripting.html#dom-slot-assignednodes
https://dom.spec.whatwg.org/#find-flattened-slotables

As sideeffect, this patch also fix wpt
shadow-dom/slots-outside-shadow-dom-expected.html

LayoutTests/imported/w3c:

  • web-platform-tests/shadow-dom/slots-fallback-in-document-expected.txt:
  • web-platform-tests/shadow-dom/slots-outside-shadow-dom-expected.txt:

Source/WebCore:

Test: web-platform-tests/shadow-dom/slots-fallback-in-document.html

web-platform-tests/shadow-dom/slots-outside-shadow-dom.html

  • html/HTMLSlotElement.cpp:

(WebCore::flattenAssignedNodes):

Note: See TracTimeline for information about the timeline view.