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

Timeline



Apr 30, 2020:

11:50 PM Changeset in webkit [260985] by commit-queue@webkit.org
  • 5 edits in trunk/Source/WebCore

Inline reportBlockedPortFailed and reportAuthenticationChallengeBlocked
https://bugs.webkit.org/show_bug.cgi?id=211250

Patch by Rob Buis <rbuis@igalia.com> on 2020-04-30
Reviewed by Alex Christensen.

These two static methods have only one caller each, so we can just
inline them at the call site since there is nothing tying them to FrameLoader.

  • loader/DocumentLoader.cpp:

(WebCore::DocumentLoader::willSendRequest):

  • loader/FrameLoader.cpp:

(WebCore::FrameLoader::reportBlockedPortFailed): Deleted.
(WebCore::FrameLoader::reportAuthenticationChallengeBlocked): Deleted.

  • loader/FrameLoader.h:
  • loader/ResourceLoader.cpp:

(WebCore::ResourceLoader::didBlockAuthenticationChallenge):

10:38 PM Changeset in webkit [260984] by Ross Kirsling
  • 42 edits in trunk/Source

TriState should be an enum class and use "Indeterminate" instead of "Mixed"
https://bugs.webkit.org/show_bug.cgi?id=211268

Reviewed by Mark Lam.

Source/JavaScriptCore:

  • b3/B3Const32Value.cpp:

(JSC::B3::Const32Value::equalConstant const):
(JSC::B3::Const32Value::notEqualConstant const):
(JSC::B3::Const32Value::lessThanConstant const):
(JSC::B3::Const32Value::greaterThanConstant const):
(JSC::B3::Const32Value::lessEqualConstant const):
(JSC::B3::Const32Value::greaterEqualConstant const):
(JSC::B3::Const32Value::aboveConstant const):
(JSC::B3::Const32Value::belowConstant const):
(JSC::B3::Const32Value::aboveEqualConstant const):
(JSC::B3::Const32Value::belowEqualConstant const):

  • b3/B3Const64Value.cpp:

(JSC::B3::Const64Value::equalConstant const):
(JSC::B3::Const64Value::notEqualConstant const):
(JSC::B3::Const64Value::lessThanConstant const):
(JSC::B3::Const64Value::greaterThanConstant const):
(JSC::B3::Const64Value::lessEqualConstant const):
(JSC::B3::Const64Value::greaterEqualConstant const):
(JSC::B3::Const64Value::aboveConstant const):
(JSC::B3::Const64Value::belowConstant const):
(JSC::B3::Const64Value::aboveEqualConstant const):
(JSC::B3::Const64Value::belowEqualConstant const):

  • b3/B3ConstDoubleValue.cpp:

(JSC::B3::ConstDoubleValue::equalConstant const):
(JSC::B3::ConstDoubleValue::notEqualConstant const):
(JSC::B3::ConstDoubleValue::lessThanConstant const):
(JSC::B3::ConstDoubleValue::greaterThanConstant const):
(JSC::B3::ConstDoubleValue::lessEqualConstant const):
(JSC::B3::ConstDoubleValue::greaterEqualConstant const):
(JSC::B3::ConstDoubleValue::equalOrUnorderedConstant const):

  • b3/B3ConstFloatValue.cpp:

(JSC::B3::ConstFloatValue::equalConstant const):
(JSC::B3::ConstFloatValue::notEqualConstant const):
(JSC::B3::ConstFloatValue::lessThanConstant const):
(JSC::B3::ConstFloatValue::greaterThanConstant const):
(JSC::B3::ConstFloatValue::lessEqualConstant const):
(JSC::B3::ConstFloatValue::greaterEqualConstant const):
(JSC::B3::ConstFloatValue::equalOrUnorderedConstant const):

  • b3/B3Procedure.cpp:

(JSC::B3::Procedure::addBoolConstant):

  • b3/B3Procedure.h:
  • b3/B3ReduceStrength.cpp:
  • b3/B3Value.cpp:

(JSC::B3::Value::equalConstant const):
(JSC::B3::Value::notEqualConstant const):
(JSC::B3::Value::lessThanConstant const):
(JSC::B3::Value::greaterThanConstant const):
(JSC::B3::Value::lessEqualConstant const):
(JSC::B3::Value::greaterEqualConstant const):
(JSC::B3::Value::aboveConstant const):
(JSC::B3::Value::belowConstant const):
(JSC::B3::Value::aboveEqualConstant const):
(JSC::B3::Value::belowEqualConstant const):
(JSC::B3::Value::equalOrUnorderedConstant const):
(JSC::B3::Value::asTriState const):

  • b3/B3Value.h:
  • bytecode/CodeBlock.cpp:

(JSC::CodeBlock::~CodeBlock):
(JSC::CodeBlock::thresholdForJIT):

  • bytecode/UnlinkedCodeBlock.cpp:

(JSC::UnlinkedCodeBlock::UnlinkedCodeBlock):

  • bytecode/UnlinkedFunctionExecutable.cpp:

(JSC::UnlinkedFunctionExecutable::visitChildren):

  • bytecompiler/NodesCodegen.cpp:

(JSC::ConstantNode::emitBytecodeInConditionContext):
(JSC::BinaryOpNode::emitBytecodeInConditionContext):
(JSC::BinaryOpNode::tryFoldToBranch):

  • dfg/DFGByteCodeParser.cpp:

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

  • dfg/DFGCFGSimplificationPhase.cpp:

(JSC::DFG::CFGSimplificationPhase::run):

  • dfg/DFGLazyJSValue.cpp:

(JSC::DFG::equalToSingleCharacter):
(JSC::DFG::equalToStringImpl):
(JSC::DFG::LazyJSValue::strictEqual const):

  • dfg/DFGSpeculativeJIT64.cpp:

(JSC::DFG::SpeculativeJIT::compile):

  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::compileDataViewGet):
(JSC::FTL::DFG::LowerDFGToB3::compileDataViewSet):

  • ftl/FTLOutput.cpp:

(JSC::FTL::Output::equal):
(JSC::FTL::Output::notEqual):
(JSC::FTL::Output::above):
(JSC::FTL::Output::aboveOrEqual):
(JSC::FTL::Output::below):
(JSC::FTL::Output::belowOrEqual):
(JSC::FTL::Output::greaterThan):
(JSC::FTL::Output::greaterThanOrEqual):
(JSC::FTL::Output::lessThan):
(JSC::FTL::Output::lessThanOrEqual):

  • jit/JITOperations.cpp:
  • runtime/CachedTypes.cpp:

(JSC::UnlinkedCodeBlock::UnlinkedCodeBlock):

  • runtime/DefinePropertyAttributes.h:

(JSC::DefinePropertyAttributes::DefinePropertyAttributes):
(JSC::DefinePropertyAttributes::hasWritable const):
(JSC::DefinePropertyAttributes::writable const):
(JSC::DefinePropertyAttributes::hasConfigurable const):
(JSC::DefinePropertyAttributes::configurable const):
(JSC::DefinePropertyAttributes::hasEnumerable const):
(JSC::DefinePropertyAttributes::enumerable const):
(JSC::DefinePropertyAttributes::setWritable):
(JSC::DefinePropertyAttributes::setConfigurable):
(JSC::DefinePropertyAttributes::setEnumerable):

  • runtime/IntlCollator.cpp:

(JSC::IntlCollator::initializeCollator):

  • runtime/IntlDateTimeFormat.cpp:

(JSC::IntlDateTimeFormat::initializeDateTimeFormat):

  • runtime/IntlNumberFormat.cpp:

(JSC::IntlNumberFormat::initializeNumberFormat):

  • runtime/IntlObject.cpp:

(JSC::intlBooleanOption):

  • runtime/JSCJSValueInlines.h:

(JSC::JSValue::pureStrictEqual):
(JSC::JSValue::pureToBoolean const):

  • runtime/JSCellInlines.h:

(JSC::JSCell::pureToBoolean const):

Source/WebCore:

  • dom/Document.cpp:

(WebCore::Document::queryCommandIndeterm):
(WebCore::Document::queryCommandState):

  • editing/EditingStyle.cpp:

(WebCore::EditingStyle::triStateOfStyle const):
(WebCore::EditingStyle::hasStyle):

  • editing/Editor.cpp:

(WebCore::Editor::selectionUnorderedListState const):
(WebCore::Editor::selectionOrderedListState const):

  • editing/EditorCommand.cpp:

(WebCore::isStylePresent):
(WebCore::stateStyle):
(WebCore::stateTextWritingDirection):
(WebCore::stateNone):
(WebCore::stateStyleWithCSS):
(WebCore::Editor::Command::state const):
(WebCore::Editor::Command::value const):

  • page/ContextMenuController.cpp:

(WebCore::ContextMenuController::checkOrEnableIfNeeded const):

Source/WebKit:

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::validateCommand):

  • WebProcess/WebPage/glib/WebPageGLib.cpp:

(WebKit::WebPage::getPlatformEditorState const):

Source/WebKitLegacy/mac:

  • WebView/WebHTMLView.mm:

(kit):
(-[WebHTMLView validateUserInterfaceItemWithoutDelegate:]):

Source/WTF:

The word "indeterminate" comes from boost::tribool.
A third state is generally not "mixed" but rather unknown.

  • wtf/TriState.h:
9:43 PM Changeset in webkit [260983] by jiewen_tan@apple.com
  • 10 edits
    2 adds in trunk

[WebAuthn] Require user gestures for LocalAuthenticator
https://bugs.webkit.org/show_bug.cgi?id=182893
<rdar://problem/43357293>

Reviewed by Brent Fulgham.

Source/WebKit:

Covered by API tests.

  • UIProcess/WebAuthentication/AuthenticatorManager.cpp:

(WebKit::AuthenticatorManager::filterTransports const):
(WebKit::AuthenticatorManager::getTransports const):
Checks UserGesture here. Since filterTransports will be overrided in mock testings,
all mock tests don't require user gestures.

  • UIProcess/WebAuthentication/WebAuthenticationRequestData.h:
  • UIProcess/WebAuthentication/WebAuthenticatorCoordinatorProxy.cpp:

(WebKit::WebAuthenticatorCoordinatorProxy::makeCredential):
(WebKit::WebAuthenticatorCoordinatorProxy::getAssertion):

  • UIProcess/WebAuthentication/WebAuthenticatorCoordinatorProxy.h:
  • UIProcess/WebAuthentication/WebAuthenticatorCoordinatorProxy.messages.in:
  • WebProcess/WebAuthentication/WebAuthenticatorCoordinator.cpp:

(WebKit::WebAuthenticatorCoordinator::makeCredential):
(WebKit::WebAuthenticatorCoordinator::getAssertion):
Adds user gesture corresponding fields.

Tools:

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WebKitCocoa/_WKWebAuthenticationPanel.mm:

(TestWebKitAPI::TEST):

  • TestWebKitAPI/Tests/WebKitCocoa/web-authentication-get-assertion-la-no-mock.html: Added.
  • TestWebKitAPI/Tests/WebKitCocoa/web-authentication-make-credential-la-no-mock.html: Added.
8:57 PM Changeset in webkit [260982] by Wenson Hsieh
  • 2 edits in trunk/Source/WebKit

Unreviewed, fix the Mac Catalyst build after r260979

The presence of _contextMenuInteraction is conditional not only on USE(UICONTEXTMENU), but also
HAVE(LINK_PREVIEW). Guard logic in -deferringGestureRecognizer:shouldDeferOtherGestureRecognizer: with the
latter as well.

  • UIProcess/ios/WKContentViewInteraction.mm:

(-[WKContentView deferringGestureRecognizer:shouldDeferOtherGestureRecognizer:]):

8:48 PM Changeset in webkit [260981] by Simon Fraser
  • 17 edits in trunk/Source

Clean up some EventHandler coordinate-related naming and fix ScrollableArea::lastKnownMousePosition() conversions
https://bugs.webkit.org/show_bug.cgi?id=211259

Reviewed by Zalan Bujtas.

Source/WebCore:

On EventHandler, rename m_lastKnownMousePosition, m_mouseDownPos and m_mouseDown for clarity.

Rename ScrollableArea::lastKnownMousePosition() to be lastKnownMousePositionInView().
Previously, lastKnownMousePosition() would fetch it from EventHandler, which simply stashed
event.position() (which is in a coordinate system that differs between WK1 and Wk2) which
was not relative to the EventHandler's frame. This cause mouseLocationInScrollerForScrollerImp:
to give wrong answers.

Instead, lastKnownMousePositionInView() now specifically returns coordinates relative to the Frame.
This behavior change will be tested in future overlay scrollbar tests.

Document::showPlaybackTargetPicker() was using FrameView::lastKnownMousePosition(), so to avoid
changing its (probably broken) behavior, have it call frame()->eventHandler().lastKnownMousePosition().

  • dom/Document.cpp:

(WebCore::Document::showPlaybackTargetPicker):

  • page/EventHandler.cpp:

(WebCore::EventHandler::clear):
(WebCore::EventHandler::handleMousePressEvent):
(WebCore::EventHandler::handleMouseDraggedEvent):
(WebCore::EventHandler::updateDragSourceActionsAllowed const):
(WebCore::EventHandler::dispatchDragStartEventOnSourceElement):
(WebCore::EventHandler::handleDrag):
(WebCore::EventHandler::mouseMovementExceedsThreshold const):

  • page/EventHandler.h:
  • page/FrameView.cpp:

(WebCore::FrameView::lastKnownMousePositionInView const):
(WebCore::FrameView::lastKnownMousePosition const): Deleted.

  • page/FrameView.h:
  • platform/PlatformMouseEvent.h:
  • platform/ScrollableArea.h:

(WebCore::ScrollableArea::lastKnownMousePositionInView const):
(WebCore::ScrollableArea::lastKnownMousePosition const): Deleted.

  • platform/mac/ScrollAnimatorMac.mm:

(-[WebScrollerImpPairDelegate mouseLocationInContentAreaForScrollerImpPair:]):
(-[WebScrollerImpPairDelegate scrollerImpPair:convertContentPoint:toScrollerImp:]):
(-[WebScrollerImpDelegate mouseLocationInScrollerForScrollerImp:]):

  • rendering/RenderLayer.cpp:

(WebCore::RenderLayer::lastKnownMousePositionInView const):
(WebCore::RenderLayer::lastKnownMousePosition const): Deleted.

  • rendering/RenderLayer.h:
  • rendering/RenderListBox.cpp:

(WebCore::RenderListBox::lastKnownMousePositionInView const):
(WebCore::RenderListBox::lastKnownMousePosition const): Deleted.

  • rendering/RenderListBox.h:

Source/WebKit:

  • Shared/WebEvent.h:

(WebKit::WebMouseEvent::position const):

  • Shared/WebMouseEvent.cpp:

(WebKit::WebMouseEvent::WebMouseEvent):

  • WebProcess/Plugins/PDF/PDFPlugin.h:
8:26 PM Changeset in webkit [260980] by ddkilzer@apple.com
  • 2 edits in trunk/Source/WebKit

[iOS] Fix confusing idiom for releasing _selectionRects in -[WKTextRange dealloc]
<https://webkit.org/b/211269>

Reviewed by Wenson Hsieh.

  • UIProcess/ios/WKContentViewInteraction.mm:

(-[WKTextRange dealloc]):

  • Switch to more common idiom to release an instance variable. This fixes a false positive warning from the clang static analyzer about releasing a variable not owned by the caller.
8:01 PM Changeset in webkit [260979] by Wenson Hsieh
  • 4 edits
    2 adds in trunk

REGRESSION: Double tap dispatches one click event on iOS 13.4 when it would dispatch two on iOS 13.3
https://bugs.webkit.org/show_bug.cgi?id=211179
<rdar://problem/62594779>

Reviewed by Tim Horton.

Source/WebKit:

https://trac.webkit.org/r253267 introduced deferring gesture recognizers as a way to handle preventable (non-
passive) touchstart events without blocking the UI process. These deferring gesture recognizers work by having
other gesture recognizers at or below WKWebView (with few exceptions) require the failure of these deferring
gestures. These gestures transition to possible state when beginning a touch inside a non-passive touch event
handling region, and transition to either failed or ended state (depending on whether preventDefault() was
called) after the web content process finished handling the touch event.

However, this means that the resulting dependency graph now has an edge between each gesture under WKWebView and
one of the deferring gesture recognizers, due to these new failure requirements. Since gestures that have been
recognized or have failed don't get reset until all other gestures in the same dependency subgraph have also
recognized or failed, some gestures (such as the synthetic single tap gesture recognizer in this bug) might not
be resetting as soon after ending as they did before, since they may be connected to other gesture recognizers
that are still in possible state by way of the failure requirements added by the new deferring gestures.

I was already aware of this problem in r253267, and attempted to solve this by bisecting the gesture dependency
graph into two subgraphs: one containing all the one-finger multi-tap gestures that are reset after a lengthy
delay, and another containing everything else. To do this, I added two different deferring gesture recognizers:
one for immediately resettable gestures (meant for gestures in the latter subgraph), and another for gestures
that are reset after a delay (meant for gestures in the former subgraph).

Unfortunately, unrelated changes around text interactions in UIKit in iOS 13.4 caused the tap-and-a-half
gesture for selecting a range of text to now have a delayed reset; this means that gestures in the "immediately
resettable" gesture subgraph are all forced to wait on the tap-and-a-half text interaction gesture before
resetting, which causes the bug here, since the synthetic single tap gesture is in this "immediately resettable"
gesture subgraph.

To mitigate this, this patch pushes the tap-and-a-half text selection gesture, along with the loupe gesture,
context menu relationship gesture, and drag lift gestures (i.e. the other gestures that are connected to the
tap-and-a-half gesture via failure requirements) out of the "immediately resettable" subgraph, and into the
"delayed" subgraph.

Test: fast/events/touch/ios/two-click-events-after-double-tap-with-touch-handler.html

  • Platform/spi/ios/UIKitSPI.h:
  • UIProcess/ios/WKContentViewInteraction.mm:

(-[WKContentView deferringGestureRecognizer:shouldDeferOtherGestureRecognizer:]):

LayoutTests:

Add a new layout test to verify that double tapping a button with fast-clicking enabled (i.e. in a device-width
viewport) fires two click events.

  • fast/events/touch/ios/two-click-events-after-double-tap-with-touch-handler-expected.txt: Added.
  • fast/events/touch/ios/two-click-events-after-double-tap-with-touch-handler.html: Added.
7:20 PM Changeset in webkit [260978] by Nikita Vasilyev
  • 4 edits in trunk/Source/WebInspectorUI

Web Inspector: Computed: shouldn't display focus outline on click
https://bugs.webkit.org/show_bug.cgi?id=211118
<rdar://problem/62491002>

Reviewed by Devin Rousso.

  • CSS property view is no longer focusable.
  • Disclosure triangle is now tabbable.
  • UserInterface/Views/ComputedStyleSection.css:

(.computed-style-section .computed-property-item):
(.computed-style-section .computed-property-item.expanded):
(.computed-style-section .computed-property-item > .disclosure-button:focus):

  • UserInterface/Views/ExpandableView.js:

(WI.ExpandableView):
(WI.ExpandableView.prototype._onDisclosureButtonClick):
(WI.ExpandableView.prototype._update):
Drive-by: add ariaExpanded so VoiceOver reads whether it's expanded or collapsed.

  • UserInterface/Views/SpreadsheetStyleProperty.js:

Remove tabIndex so we don't show any focus outline around the entire CSS property view.

6:47 PM Changeset in webkit [260977] by ysuzuki@apple.com
  • 19 edits in trunk/Source/WebCore

Some HTML element critical paths include AtomString materialization
https://bugs.webkit.org/show_bug.cgi?id=211223

Reviewed by Saam Barati.

While measuring Speedometer2, I've noticed that every time we create some type of input element, we call AtomString multiple times while it is not necessary.
It turned out that this is because some places are using AtomString("...", AtomString::ConstructFromLiteral) instead of
static NeverDestroyed<const AtomString> ...("...", AtomString::ConstructFromLiteral). Since HTML is in the main thread, we can just use static NeverDestroyed<>.
This patch fixes AtomString() calls by changing them to NeverDestroyed<const AtomString> if it is under WebCore/html directory.
And in this patch, we omit FTPDirectoryDocument, MediaDocument, and PluginDocument's fixes for now since their AtomString content has a bit different nature (some
pseudo CSS value ("-webkit-xxx") v.s. some particular CSS property value ("100%").

  • html/ColorInputType.cpp:

(WebCore::ColorInputType::createShadowSubtree):

  • html/FileInputType.cpp:

(WebCore::UploadButtonElement::UploadButtonElement):

  • html/HTMLElement.cpp:

(WebCore::trueName):
(WebCore::falseName):
(WebCore::plaintextOnlyName):
(WebCore::HTMLElement::setContentEditable):
(WebCore::HTMLElement::setDraggable):
(WebCore::HTMLElement::setSpellcheck):
(WebCore::HTMLElement::setAutocorrect):

  • html/HTMLTextFormControlElement.cpp:

(WebCore::HTMLTextFormControlElement::updateInnerTextElementEditability):

  • html/RangeInputType.cpp:

(WebCore::RangeInputType::createShadowSubtree):

  • html/SearchInputType.cpp:

(WebCore::updateResultButtonPseudoType):

  • html/TextFieldInputType.cpp:

(WebCore::TextFieldInputType::createShadowSubtree):
(WebCore::TextFieldInputType::createDataListDropdownIndicator):
(WebCore::TextFieldInputType::createContainer):
(WebCore::TextFieldInputType::createAutoFillButton):

  • html/ValidationMessage.cpp:

(WebCore::ValidationMessage::buildBubbleTree):

  • html/shadow/DetailsMarkerControl.cpp:

(WebCore::DetailsMarkerControl::DetailsMarkerControl):

  • html/shadow/MediaControlTextTrackContainerElement.cpp:

(WebCore::MediaControlTextTrackContainerElement::MediaControlTextTrackContainerElement):

  • html/shadow/ProgressShadowElement.cpp:

(WebCore::ProgressInnerElement::create):
(WebCore::ProgressBarElement::create):
(WebCore::ProgressValueElement::create):

  • html/shadow/ProgressShadowElement.h:

(WebCore::ProgressInnerElement::create): Deleted.
(WebCore::ProgressBarElement::create): Deleted.
(WebCore::ProgressValueElement::create): Deleted.

  • html/shadow/SpinButtonElement.cpp:

(WebCore::SpinButtonElement::SpinButtonElement):

  • html/shadow/TextControlInnerElements.cpp:

(WebCore::TextControlPlaceholderElement::TextControlPlaceholderElement):
(WebCore::SearchFieldCancelButtonElement::SearchFieldCancelButtonElement):

  • html/shadow/YouTubeEmbedShadowElement.cpp:

(WebCore::YouTubeEmbedShadowElement::YouTubeEmbedShadowElement):

  • html/shadow/mac/ImageControlsButtonElementMac.cpp:

(WebCore::ImageControlsButtonElementMac::tryCreate):

  • html/shadow/mac/ImageControlsRootElementMac.cpp:

(WebCore::ImageControlsRootElement::tryCreate):

  • html/track/TextTrackCue.cpp:

(WebCore::TextTrackCue::rebuildDisplayTree):

6:13 PM Changeset in webkit [260976] by Ross Kirsling
  • 6 edits in trunk/Source/JavaScriptCore

[JSC] intlBooleanOption should return TriState instead of taking an out param
https://bugs.webkit.org/show_bug.cgi?id=211256

Reviewed by Darin Adler and Mark Lam.

Boolean options for Intl constructors can have default values of true, false, or undefined.
To handle the undefined case, intlBooleanOption currently has a bool& usesFallback param;
we should have the return type simply be a TriState instead.

  • runtime/IntlCollator.cpp:

(JSC::IntlCollator::initializeCollator):

  • runtime/IntlDateTimeFormat.cpp:

(JSC::IntlDateTimeFormat::initializeDateTimeFormat):

  • runtime/IntlNumberFormat.cpp:

(JSC::IntlNumberFormat::initializeNumberFormat):

  • runtime/IntlObject.cpp:

(JSC::intlBooleanOption):

  • runtime/IntlObject.h:
5:30 PM Changeset in webkit [260975] by Alan Coon
  • 1 copy in tags/Safari-610.1.11.4

Tag Safari-610.1.11.4.

4:46 PM Changeset in webkit [260974] by Brent Fulgham
  • 2 edits in trunk/Source/WebKit

REGRESSION (r260932): ASSERTION FAILED: ok in webkit::SandboxExtension::consumePermanently for 3 tests
https://bugs.webkit.org/show_bug.cgi?id=211253
<rdar://problem/62673727>

Reviewed by Per Arne Vollan.

In r260932 I added an assertion to confirm that a sandbox extension was successfully consumed. This triggered three
test failures because those tests attempt to pass a sandbox extension from the WebContent process to the UIProcess.

After speaking with the Sandbox team, I learned that an unsandboxed program that attempts to consume a valid
sandbox extension will return 0. Sandboxed processes either receive -1 (for error), or a handle representing the
newly added extension (so that it can be removed when no longer needed).

Since the TestWebKitAPI (and WebKitTestRunner) processes are not sandboxed they receive a zero return value here.

We should recognize this as a valid and expected result. We should also consider making some form of sandboxed
driver for WebKit.

  • Shared/Cocoa/SandboxExtensionCocoa.mm:

(WebKit::SandboxExtensionImpl::consume): Recognize a 0 handle as valid.

4:20 PM Changeset in webkit [260973] by Truitt Savell
  • 2 edits in trunk/LayoutTests

[ iOS ] compositing/iframes/border-radius-composited-frame.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=211261

unreviewed test gardening.

  • platform/ios/TestExpectations:
4:18 PM Changeset in webkit [260972] by Truitt Savell
  • 2 edits in trunk/LayoutTests

[ iOS ] compositing/iframes/border-radius-composited-frame.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=211261

Unreviewed test gardening.

  • platform/ios/TestExpectations:
3:37 PM Changeset in webkit [260971] by commit-queue@webkit.org
  • 2 edits in trunk/Tools

TestWebKitAPI.WebKit.DefaultDisplayName and TestWebKitAPI.WebKit.CustomDisplayName are flaky failures
https://bugs.webkit.org/show_bug.cgi?id=209993
<rdar://problem/61282602>

Patch by Alex Christensen <achristensen@webkit.org> on 2020-04-30
Reviewed by Chris Dumez.

The display name for the web process is set on a low-priority background queue in WebProcess::updateProcessName()
so sometimes in our test it hasn't executed yet. If it hasn't executed yet, it will soon, so try until it succeeds.

  • TestWebKitAPI/Tests/WebKitCocoa/DisplayName.mm:

(TestWebKitAPI::checkUntilDisplayNameIs):
(TestWebKitAPI::TEST):

3:27 PM Changeset in webkit [260970] by jiewen_tan@apple.com
  • 18 edits in trunk

[WebAuthn] Optimize LocalAuthenticator
https://bugs.webkit.org/show_bug.cgi?id=183534
<rdar://problem/43357408>

Reviewed by Brent Fulgham.

Source/WebCore:

Covered by new API tests.

  • en.lproj/Localizable.strings:
  • platform/LocalizedStrings.cpp:

(WebCore::getAssertionTouchIDPromptTitle):
(WebCore::genericTouchIDPromptTitle):

  • platform/LocalizedStrings.h:

Improving the LocalAuthentication dialog titles for iOS.

Source/WebKit:

This patch implements the following small optimizations:

  1. Replacing local constants with ones from FidoConstants.h;
  2. Merging m_assertionResponses and m_existingCredentials by replacing HashSet with Vector in Authenticator::Observer::selectAssertionResponse;
  3. Using Base64 encoded strings as the keys of the HashSet in produceHashSet() instead of the old casting hack;
  4. Invaliding the LAContext in LocalConnection::~LocalConnection() such that any displaying LocalAuthentication dialogs can be dismissed after the object is destroyed;
  5. Sorting existing credentials according to LRU before returning to UI clients;
  6. Improving the LocalAuthentication dialog titles for iOS.
  • UIProcess/WebAuthentication/Authenticator.h:
  • UIProcess/WebAuthentication/AuthenticatorManager.cpp:

(WebKit::AuthenticatorManager::selectAssertionResponse):

  • UIProcess/WebAuthentication/AuthenticatorManager.h:
  • UIProcess/WebAuthentication/Cocoa/LocalAuthenticator.h:
  • UIProcess/WebAuthentication/Cocoa/LocalAuthenticator.mm:

(WebKit::LocalAuthenticatorInternal::produceHashSet):
(WebKit::LocalAuthenticatorInternal::toNSData):
(WebKit::LocalAuthenticatorInternal::getExistingCredentials):
(WebKit::LocalAuthenticator::makeCredential):
(WebKit::LocalAuthenticator::continueMakeCredentialAfterUserVerification):
(WebKit::LocalAuthenticator::getAssertion):
(WebKit::LocalAuthenticator::continueGetAssertionAfterUserVerification):

  • UIProcess/WebAuthentication/Cocoa/LocalConnection.h:

(WebKit::LocalConnection::filterResponses const):

  • UIProcess/WebAuthentication/Cocoa/LocalConnection.mm:

(WebKit::WebCore::bundleName):
(WebKit::LocalConnection::~LocalConnection):
(WebKit::LocalConnection::verifyUser):
(WebKit::LocalConnection::verifyUser const): Deleted.

  • UIProcess/WebAuthentication/Mock/MockLocalConnection.h:
  • UIProcess/WebAuthentication/Mock/MockLocalConnection.mm:

(WebKit::MockLocalConnection::verifyUser):
(WebKit::MockLocalConnection::filterResponses const):
(WebKit::MockLocalConnection::verifyUser const): Deleted.

  • UIProcess/WebAuthentication/fido/CtapAuthenticator.cpp:

(WebKit::CtapAuthenticator::continueGetAssertionAfterResponseReceived):
(WebKit::CtapAuthenticator::continueGetNextAssertionAfterResponseReceived):

  • UIProcess/WebAuthentication/fido/CtapAuthenticator.h:

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/_WKWebAuthenticationPanel.mm:

(-[TestWebAuthenticationPanelDelegate panel:selectAssertionResponse:source:completionHandler:]):
(TestWebKitAPI::TEST):
Adds a new test case for the LRU.

2:58 PM Changeset in webkit [260969] by Kate Cheney
  • 2 edits in trunk/Source/WebCore

clearApplicationBundleIdentifierTestingOverride() should set the bundle identifier to a null string, not an empty string
https://bugs.webkit.org/show_bug.cgi?id=211255
<rdar://problem/62651110>

Reviewed by John Wilander.

No new tests, behavior confirmed by existing tests.

Clearing the bundle identifier during tests should reset the override
value to be a null string so that the following calls to applicationBundleIdentifier()
use the [NSBundle mainBundle] bundleIdentifier] call.

  • platform/cocoa/RuntimeApplicationChecksCocoa.mm:

(WebCore::clearApplicationBundleIdentifierTestingOverride):

2:39 PM Changeset in webkit [260968] by Kate Cheney
  • 4 edits in trunk

Change default of "inAppBrowserPrivacyQuirks" testing toggle to use it for tests only
https://bugs.webkit.org/show_bug.cgi?id=211209
<rdar://problem/62619659>

Reviewed by Brent Fulgham.

Source/WebKit:

No new tests, behavior confirmed by existing tests.

  • Shared/WebPreferences.yaml:

Tools:

Manually enable inAppBrowserPrivacyQuirks for certain tests which
need script evaluation to test other aspects of In-App Browser Privacy.

  • TestWebKitAPI/Tests/WebKitCocoa/InAppBrowserPrivacy.mm:

(TEST):

2:28 PM Changeset in webkit [260967] by Devin Rousso
  • 2 edits in trunk/Source/WebKit

Unreviewed, add missing parenthesis

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::handleMediaEvent):

2:19 PM Changeset in webkit [260966] by Chris Dumez
  • 6 edits in trunk/Source/WebKit

[iOS][WK2] Add timeout for "Client navigation" foreground assertion
https://bugs.webkit.org/show_bug.cgi?id=211202

Reviewed by Alex Christensen.

Add a 30s timeout for "Client navigation" foreground assertion. Foreground assertions do not timeout
at RunningBoard level and we thus need to make sure we release them to avoid power leaks.

  • UIProcess/API/APINavigation.cpp:

(API::Navigation::Navigation):

  • UIProcess/API/APINavigation.h:

(API::Navigation::setClientNavigationActivity):
(API::Navigation::setForegroundActivity): Deleted.

  • UIProcess/ProcessThrottler.cpp:

(WebKit::ProcessThrottler::TimedActivity::TimedActivity):
(WebKit::ProcessThrottler::TimedActivity::operator=):
(WebKit::ProcessThrottler::TimedActivity::activityTimedOut):
(WebKit::ProcessThrottler::TimedActivity::updateTimer):

  • UIProcess/ProcessThrottler.h:
  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::loadRequest):
(WebKit::WebPageProxy::loadFile):
(WebKit::WebPageProxy::loadData):
(WebKit::WebPageProxy::didFailProvisionalLoadForFrameShared):
(WebKit::WebPageProxy::didFinishLoadForFrame):
(WebKit::WebPageProxy::didFailLoadForFrame):

2:15 PM Changeset in webkit [260965] by Jonathan Bedard
  • 3 edits in trunk/Tools

results.webkit.org: Sort out certificates on Catalina
https://bugs.webkit.org/show_bug.cgi?id=202837
<rdar://problem/56177210>

Reviewed by Alex Christensen.

  • Scripts/run-javascriptcore-tests:

(uploadResults): Do not allow insecure requests.

  • Scripts/webkitpy/results/upload.py:

(Upload.upload): Verify ssl certificates.
(Upload.upload_archive): Ditto.

1:50 PM Changeset in webkit [260964] by Russell Epstein
  • 1 copy in tags/Safari-609.2.9.0.4

Tag Safari-609.2.9.0.4.

1:46 PM Changeset in webkit [260963] by Devin Rousso
  • 8 edits
    3 adds in trunk

WebKit.WebContent process crashes when web developer tools are opened in Safari
https://bugs.webkit.org/show_bug.cgi?id=210794
<rdar://problem/62214651>

Reviewed by Brian Burg.

Source/JavaScriptCore:

  • inspector/InjectedScriptManager.cpp:

(Inspector::InjectedScriptManager::injectedScriptFor):
Don't crash if a TerminatedExecutionError is thrown.

  • inspector/InjectedScriptBase.cpp:

(Inspector::InjectedScriptBase::makeCall):
Report the actual error message. Check that the result has a value before attempting to make
a JSON::Value out of it.

Source/WebCore:

Test: inspector/worker/dom-debugger-event-after-terminate-crash.html

  • inspector/agents/InspectorDOMDebuggerAgent.cpp:

(WebCore::InspectorDOMDebuggerAgent::willHandleEvent):
Don't ASSERT(injectedScript.hasNoValue()) as it's possible for the event to be fired after
Worker.prototype.terminate, in which case InjectedScriptManager::injectedScriptFor will
now return an InjectedScript that would fail that ASSERT.

Source/WebInspectorUI:

  • UserInterface/Views/QuickConsole.js:

(WI.QuickConsole.prototype._handleFrameExecutionContextsCleared):
(WI.QuickConsole.prototype._handleTargetRemoved):
If a Worker is removed and is not the active execution context, still check to see if the
execution context picker should be hidden, such as if there is only one other execution
context (e.g. the main page execution context). Previously, the execution context picker
would only be hidden in this case if the Worker was the active execution context.

LayoutTests:

  • inspector/worker/resources/worker-echo.js: Added.
  • inspector/worker/dom-debugger-event-after-terminate-crash.html: Added.
  • inspector/worker/dom-debugger-event-after-terminate-crash-expected.txt: Added.
1:03 PM Changeset in webkit [260962] by commit-queue@webkit.org
  • 12 edits in trunk

Add SPI to change a WKWebView's CORS disabling pattern after initialization
https://bugs.webkit.org/show_bug.cgi?id=211211
<rdar://problem/61837474>

Patch by Alex Christensen <achristensen@webkit.org> on 2020-04-30
Reviewed by Chris Dumez.

Source/WebCore:

  • page/Page.h:

(WebCore::Page::setCORSDisablingPatterns):

Source/WebKit:

  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView _corsDisablingPatterns]):
(-[WKWebView _setCORSDisablingPatterns:]):

  • UIProcess/API/Cocoa/WKWebViewPrivate.h:
  • UIProcess/WebPageProxy.cpp:
  • UIProcess/WebPageProxy.h:

(WebKit::WebPageProxy::corsDisablingPatterns const):

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::parseAndAllowAccessToCORSDisablingPatterns):
(WebKit::m_isNavigatingToAppBoundDomain):
(WebKit::WebPage::updateCORSDisablingPatterns):

  • WebProcess/WebPage/WebPage.h:
  • WebProcess/WebPage/WebPage.messages.in:

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/WKURLSchemeHandler-1.mm:
12:50 PM Changeset in webkit [260961] by commit-queue@webkit.org
  • 2 edits in trunk/Tools

REGRESSION: [ iOS ] http/tests/resourceLoadStatistics/standalone-web-application-exempt-from-website-data-deletion tests are flaky crashing, failing an timing out.
https://bugs.webkit.org/show_bug.cgi?id=211190

Patch by Alex Christensen <achristensen@webkit.org> on 2020-04-30
Reviewed by Chris Dumez.

  • WebKitTestRunner/TestController.cpp:

(WTR::TestController::configureWebsiteDataStoreTemporaryDirectories):
In tests that swap out the WebsiteDataStore, don't use the same paths as the other WebsiteDataStore.

12:43 PM Changeset in webkit [260960] by Chris Dumez
  • 2 edits in trunk/Source/WebCore

WebCore::systemHasBattery() is unnecessarily expensive on iOS
https://bugs.webkit.org/show_bug.cgi?id=211240
<rdar://problem/62619971>

Reviewed by Geoffrey Garen.

Update WebCore::systemHasBattery() to return true unconditionally on
PLATFORM(IOS) and PLATFORM(WATCHOS) since iOS devices always have a
battery. Also return false unconditionally for PLATFORM(APPLETV).

  • platform/cocoa/SystemBattery.mm:

(WebCore::systemHasBattery):

12:19 PM Changeset in webkit [260959] by ddkilzer@apple.com
  • 2 edits in trunk/Tools

REGRESSION (r176862, r210483): Leaks of BrowserWindowController in MiniBrowser/mac/AppDelegate.m
<https://webkit.org/b/211243>

Reviewed by Tim Horton.

  • MiniBrowser/mac/AppDelegate.m:

(-[BrowserAppDelegate createBrowserWindowController:]):

  • Autorelease return value to fix leak.

(-[BrowserAppDelegate newPrivateWindow:]):

  • Release controller to fix leak.
12:01 PM Changeset in webkit [260958] by ddkilzer@apple.com
  • 2 edits in trunk/Tools

REGRESSION (r247490): Leak of MiniBrowserNSTextFinder._hideInterfaceCallback
<https://webkit.org/b/211242>

Reviewed by Tim Horton.

  • MiniBrowser/mac/WK2BrowserWindowController.m:

(-[MiniBrowserNSTextFinder dealloc]): Add.

  • Release _hideInterfaceCallback to fix the leak.
11:41 AM Changeset in webkit [260957] by Caio Lima
  • 2 edits in trunk/JSTests

Investigate stress/v8-bitint32-inc.js failure on mips
https://bugs.webkit.org/show_bug.cgi?id=210907

Unreviewed test gardening.

  • stress/v8-bigint32-inc.js:
11:36 AM Changeset in webkit [260956] by youenn@apple.com
  • 2 edits in trunk/Source/ThirdParty/libwebrtc

Disable low latency encoder on iOS
https://bugs.webkit.org/show_bug.cgi?id=211229

Reviewed by Eric Carlson.

  • Source/webrtc/sdk/WebKit/VideoProcessingSoftLink.h:

This is not yet fully ready.

10:56 AM Changeset in webkit [260955] by Russell Epstein
  • 8 edits in branches/safari-609.2.9.0-branch/Source/WebKit

Apply patch. rdar://problem/62623152

10:52 AM Changeset in webkit [260954] by Russell Epstein
  • 8 edits in branches/safari-609.2.9.0-branch/Source

Versioning.

9:48 AM Changeset in webkit [260953] by Andres Gonzalez
  • 2 edits in trunk/Source/WebCore

Fix for crash in AXLogger.
https://bugs.webkit.org/show_bug.cgi?id=211236

Reviewed by Chris Fleizach.

Covered by existing tests.

Notifications may have a null AXCoreObject target, so must check for
nullity before streaming the object.

  • accessibility/AXLogger.cpp:

(WebCore::AXLogger::log):

9:01 AM Changeset in webkit [260952] by dbates@webkit.org
  • 9 edits in trunk

[iOS] Implement -markedTextRange
https://bugs.webkit.org/show_bug.cgi?id=211148
<rdar://problem/57865890>

Reviewed by Wenson Hsieh.

Source/WebKit:

Return the UITextRange-like object for the marked text range. Clients can use this range to
access the selection rects or query for the caret rect at the start or end of the range,
if desired.

  • Shared/EditorState.cpp:

(WebKit::EditorState::PostLayoutData::encode const):
(WebKit::EditorState::PostLayoutData::decode):
Encode and decode the marked text selection rects and caret rects at the state and end
of the marked text range. This is the same information that we compute in order to
implement -selectedTextRange. I thought about collecting these details into class and
having editor state hold two instances of it: one for selected text and one for marked text.
However I decided against it because this class is unlikely to find use outside of what is
needed to implement -selectedTextRange and -markedTextRange. This is because only those
functions require such details so as to return an opaque UITextRange-derived object that
can be passed to- or its sub-objects can be passed to WKContentView's -caretRectForPosition
and -selectionRectsForRange. Literally, WKContentView does not support other UITextInput
functions that operate on UITextRange or UITextPosition. I didn't pursue fixing this in
general because 1) I don't need it to solve my problem and 2) UIWKDocumentContext SPI seems
to be the new general-purpose solution.

(WebKit::operator<<): Pretty print all the new marked text details we collect. While I am here,
use Vector::isEmpty() instead of Vector::size() to check if there are selection rects.

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

(-[WKContentView textFirstRect]):
(-[WKContentView textLastRect]):
Update code now that the marked text rects are in the post layout data sub-object.

(-[WKContentView _scaledCaretRectForSelectionStart:]): Extracted from -selectedTextRange.
(-[WKContentView _scaledCaretRectForSelectionEnd:]): Ditto.
(-[WKContentView selectedTextRange]): Write in terms of -_scaledCaretRectForSelectionStart
and -_scaledCaretRectForSelectionEnd. Also modernize the code while I am here.
(-[WKContentView markedTextRange]): Added.

  • WebProcess/WebPage/ios/WebPageIOS.mm:

(WebKit::WebPage::getPlatformEditorState const): Collect the marked text rects and the caret
rects at the start and end of the range.

Tools:

Add some tests.

  • TestWebKitAPI/Tests/WebKitCocoa/EditorStateTests.mm:

(TestWebKitAPI::applyAhemStyle): Added.
(TestWebKitAPI::TEST):

  • TestWebKitAPI/cocoa/TestWKWebView.h:
  • TestWebKitAPI/cocoa/TestWKWebView.mm:

(-[TestWKWebView synchronouslyLoadHTMLStringAndWaitUntilAllImmediateChildFramesPaint:]): Added.

8:12 AM Changeset in webkit [260951] by cturner@igalia.com
  • 4 edits in trunk/Source/WebCore

[clang 11] fix build errors due to -WWc++11-narrowing
https://bugs.webkit.org/show_bug.cgi?id=211193

Reviewed by Adrian Perez de Castro.

Fixes the following errors,

Source/WebCore/html/MediaElementSession.cpp:1059:9: error: type 'WebCore::RenderMedia *' cannot be narrowed to 'bool' in initializer list [-Wc++11-narrowing]
m_element.renderer(),
~

Source/WebCore/style/StyleResolver.cpp:106:55: error: type 'const char [4]' cannot be narrowed to 'bool' in initializer list [-Wc++11-narrowing]
m_mediaQueryEvaluator = MediaQueryEvaluator { "all" };


Source/WebCore/style/StyleResolver.cpp:106:55: note: insert an explicit cast to silence this issue
m_mediaQueryEvaluator = MediaQueryEvaluator { "all" };


static_cast<bool>( )

  • html/HTMLMediaElement.h:

(WebCore::HTMLMediaElement::hasRenderer const):
MediaElementSession was implicitly casting a pointer to a bool,
which is not allowed with modern Clang checks. Add a helper method
to encapsulate the now required static_cast<bool>.

  • html/MediaElementSession.cpp: Use the new helper method to see

if the HTMLMediaElement has an associated renderer.
(WebCore::MediaElementSession::updateMediaUsageIfChanged):

  • style/StyleResolver.cpp: This was calling MediaQueryEvaluator {

"all" }; and seemingly expecting to cast a const char[] to a bool,
or maybe String? It's confusing because of the MediaQueryEvaluator
API. If it was implicitly converting to bool then that could be
unintentional. Such casts are not allowed either now. The
MediaQueryEvaluator's default constructor says it returns true for
"all", which appears to be the original intent of this call, so I
replaced it with that.
(WebCore::Style::Resolver::Resolver):

7:39 AM Changeset in webkit [260950] by Simon Fraser
  • 10 edits
    4 adds in trunk

border-radius fails to clip iframe contents
https://bugs.webkit.org/show_bug.cgi?id=211199
Source/WebCore:

<rdar://problem/61945671>

Reviewed by Zalan Bujtas.

iframes need to use the same composited clipping strategy that we use for other
replaced elements with composited contents, like video and WebGL. To achieve this,
change GraphicsLayer to allow child GraphicsLayers to be parented in the contents
clipping layer, just like content layers are. (We don't want to do this unconditionally,
because it will change behavior for video with controls.)

Add GraphicsLayer::contentsRectClipsDescendants(), and used it to run code that
creates the contents clipping (and optional shape) layers even when no contents
layer is present. Fix up the sublayer list building to parent layers from
children in the contents clipping layer.

Tests: compositing/iframes/border-radius-composited-frame.html

compositing/iframes/border-uneven-radius-composited-frame.html

  • platform/graphics/GraphicsLayer.cpp:

(WebCore::GraphicsLayer::GraphicsLayer):

  • platform/graphics/GraphicsLayer.h:

(WebCore::GraphicsLayer::contentsRectClipsDescendants const):
(WebCore::GraphicsLayer::setContentsRectClipsDescendants):

  • platform/graphics/ca/GraphicsLayerCA.cpp:

(WebCore::GraphicsLayerCA::setContentsRectClipsDescendants):
(WebCore::GraphicsLayerCA::updateSublayerList):
(WebCore::GraphicsLayerCA::updateContentsRects):
(WebCore::GraphicsLayerCA::createTransformAnimationsFromKeyframes):

  • platform/graphics/ca/GraphicsLayerCA.h:
  • rendering/RenderLayerBacking.cpp:

(WebCore::RenderLayerBacking::updateConfiguration):

  • rendering/RenderLayerCompositor.cpp:

(WebCore::RenderLayerCompositor::isCompositedSubframeRenderer):

  • rendering/RenderLayerCompositor.h:

LayoutTests:

Reviewed by Zalan Bujtas.

  • compositing/iframes/border-radius-composited-frame-expected.html: Added.
  • compositing/iframes/border-radius-composited-frame.html: Added.
  • compositing/iframes/border-uneven-radius-composited-frame-expected.html: Added.
  • compositing/iframes/border-uneven-radius-composited-frame.html: Added.
7:04 AM Changeset in webkit [260949] by Claudio Saavedra
  • 2 edits in trunk/Tools

[GTK4] Add navigation and reload buttons to MiniBrowser
https://bugs.webkit.org/show_bug.cgi?id=211231

Reviewed by Adrian Perez de Castro.

  • MiniBrowser/gtk/BrowserWindow.c:

(browserWindowUpdateNavigationMenu):
(webViewIsLoadingChanged):
(browserWindowSetupToolbarItem):
(browser_window_init):

6:55 AM Changeset in webkit [260948] by Alan Bujtas
  • 2 edits in trunk/Source/WebCore

[LFC][TFC] Adjust the available vertical space with the row span for cell layout
https://bugs.webkit.org/show_bug.cgi?id=211218

Reviewed by Antti Koivisto.

The vertical available space for a cell should include all row heights it spans.
(can't include test, current table layout logic is incompatible with LFC -and FF/Chrome.)

  • layout/tableformatting/TableFormattingContext.cpp:

(WebCore::Layout::TableFormattingContext::setUsedGeometryForCells):

6:38 AM Changeset in webkit [260947] by Philippe Normand
  • 8 edits in trunk

[SOUP] http/tests/media/video-accept-encoding.html fails
https://bugs.webkit.org/show_bug.cgi?id=211228

Reviewed by Carlos Garcia Campos.

Source/WebCore:

The resource requests received by the network process always had
the accept-encoding setting enabled due to lack of IPC
(de)serialization for this boolean.

The patch also enables soup release logging, set WEBKIT_DEBUG=Network=debug.

  • platform/network/soup/ResourceRequest.h:

(WebCore::ResourceRequest::encodeWithPlatformData const):
(WebCore::ResourceRequest::decodeWithPlatformData):

  • platform/network/soup/SoupNetworkSession.cpp:

(WebCore::soupLogPrinter):
(WebCore::SoupNetworkSession::setupLogger):

Tools:

  • Scripts/webkitpy/port/gtk.py:

(GtkPort.setup_environ_for_server):

  • Scripts/webkitpy/port/wpe.py:

(WPEPort.setup_environ_for_server):

LayoutTests:

  • platform/gtk/TestExpectations: Unflag passing tests.
5:58 AM Changeset in webkit [260946] by Carlos Garcia Campos
  • 6 edits in trunk/Source

[GTK4][X11] Add support for rendering web view contents
https://bugs.webkit.org/show_bug.cgi?id=211189

Reviewed by Adrian Perez de Castro.

Source/WebCore:

Add PlatformDisplayX11::visual() to get the X visual used for rendering.

  • platform/graphics/x11/PlatformDisplayX11.cpp:

(WebCore::PlatformDisplayX11::visual const):

  • platform/graphics/x11/PlatformDisplayX11.h:

Source/WebKit:

Use GdkDisplayX11::xevent signal instead of filtering events that is no longer available in GTK4. GdkVisual no
longer exists either, so we get the X visual from the PlatformDisplay.

  • UIProcess/gtk/AcceleratedBackingStoreX11.cpp:

(WebKit::XDamageNotifier::add):
(WebKit::XDamageNotifier::remove):
(WebKit::XDamageNotifier::filterXDamageEvent):
(WebKit::AcceleratedBackingStoreX11::~AcceleratedBackingStoreX11):
(WebKit::AcceleratedBackingStoreX11::update):
(WebKit::AcceleratedBackingStoreX11::snapshot):

  • WebProcess/WebPage/gtk/AcceleratedSurfaceX11.cpp:

(WebKit::AcceleratedSurfaceX11::AcceleratedSurfaceX11):
(WebKit::AcceleratedSurfaceX11::createPixmap):

5:57 AM Changeset in webkit [260945] by Andres Gonzalez
  • 8 edits in trunk/Source/WebCore

Add logging of AXIsolatedTree and AXNotifications.
https://bugs.webkit.org/show_bug.cgi?id=211214

Reviewed by Chris Fleizach.

  • Added operator<< implementations for AXIsolatedTree and AX notifications.
  • Added corresponding AXLogger::log overloads for the above types.
  • To set the root node and the focused node we are now always using

setRootNodeID and setFocusedNodeID respectively. Therefore, before
returning the root or the focused nodes, it is necessary to applyPendingChanges.

  • accessibility/AXLogger.cpp:

(WebCore::AXLogger::add): Used for recursive logging of the hierarchy.
(WebCore::AXLogger::log):
(WebCore::operator<<):

  • accessibility/AXLogger.h:
  • accessibility/AXObjectCache.cpp:

Added logging of the isolated tree when it's generated and before and after updates.
(WebCore::AXObjectCache::isolatedTreeFocusedObject):
(WebCore::AXObjectCache::generateIsolatedTree):
(WebCore::AXObjectCache::updateIsolatedTree):

  • accessibility/AXObjectCache.h:
  • accessibility/isolatedtree/AXIsolatedObject.cpp:

(WebCore::AXIsolatedObject::focusedUIElement const):

  • accessibility/isolatedtree/AXIsolatedTree.cpp:

(WebCore::AXIsolatedTree::createTreeForPageID):
(WebCore::AXIsolatedTree::removeTreeForPageID):
(WebCore::AXIsolatedTree::nodeForID const):
(WebCore::AXIsolatedTree::generateSubtree):
(WebCore::AXIsolatedTree::focusedNode):
(WebCore::AXIsolatedTree::rootNode):
(WebCore::AXIsolatedTree::setRootNodeID):
(WebCore::AXIsolatedTree::setFocusedNodeID):
(WebCore::AXIsolatedTree::applyPendingChanges):
(WebCore::AXIsolatedTree::focusedUIElement): Renamed focusedNode for naming consistency.
(WebCore::AXIsolatedTree::setRootNode): Deleted. Using setRootNodeID instead,
(WebCore::AXIsolatedTree::setFocusedNode): Deleted. Use setFocusedNodeID instead.

  • accessibility/isolatedtree/AXIsolatedTree.h:

(WebCore::AXIsolatedTree::treeID const):
(WebCore::AXIsolatedTree::treeIdentifier const): renamed treeID for naming consistency.

5:52 AM Changeset in webkit [260944] by Andres Gonzalez
  • 4 edits in trunk/Tools

Fix for crashes in accessibility/accessibility-node-memory-management.html in isolated tree mode.
https://bugs.webkit.org/show_bug.cgi?id=211215

Reviewed by Chris Fleizach.

  • WebKitTestRunner/InjectedBundle/AccessibilityController.cpp:

(WTR::AccessibilityController::executeOnAXThreadIfPossible):
Removed the call CFRunLoopRunInMode and instead we'll use setTimeout in
each of the tests that require to complete a spin of the main run loop.

  • WebKitTestRunner/InjectedBundle/mac/AccessibilityControllerMac.mm:

(WTR::AccessibilityController::accessibleElementById):
Need to retain ObjectiveC object when it is retrieved from the secondary thread.

  • WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm:

(WTR::AccessibilityUIElement::getChildrenWithRange): Dito as above.

5:25 AM Changeset in webkit [260943] by commit-queue@webkit.org
  • 3 edits in trunk/LayoutTests

REGRESSION(r260822): Apparently broke media/track/track-cue-missing.html on Mac
https://bugs.webkit.org/show_bug.cgi?id=211194

Patch by Philippe Normand <pnormand@igalia.com> on 2020-04-30
Reviewed by Xabier Rodriguez-Calvar.

  • media/track/track-cue-missing-expected.txt:
  • media/track/track-cue-missing.html: Prospective fix, set display mode to automatic.
5:10 AM Changeset in webkit [260942] by Claudio Saavedra
  • 2 edits in trunk/Tools

[GTK4] Bring back the URI entry to MiniBrowser
https://bugs.webkit.org/show_bug.cgi?id=211186

Reviewed by Carlos Garcia Campos.

GTK4 support for the URI entry added, using a GtkCenterBox
to start layouting a modern version of the toolbar.

  • MiniBrowser/gtk/BrowserWindow.c:

(activateUriEntryCallback):
(webViewURIChanged):
(updateUriEntryIcon):
(faviconChanged):
(insertLinkCommandCallback):
(browser_window_init):

4:41 AM Changeset in webkit [260941] by commit-queue@webkit.org
  • 3 edits in trunk/Source/WebKitLegacy/mac

Remove -[WebView setCSSAnimationsSuspended:]
https://bugs.webkit.org/show_bug.cgi?id=211227
<rdar://problem/62439454>

Patch by Antoine Quint <Antoine Quint> on 2020-04-30
Reviewed by Antti Koivisto.

This SPI has no user and it has no equivalent for the new animation engine.

  • WebView/WebView.mm:
  • WebView/WebViewPrivate.h:
4:31 AM Changeset in webkit [260940] by chris.reid@sony.com
  • 2 edits in trunk/Source/WebInspectorUI

[CMake] Don't copy inspector resources in every incremental build
https://bugs.webkit.org/show_bug.cgi?id=211212

Reviewed by Žan Doberšek.

Moving the copy to a custom_command with a stamp so the copy isn't done each build.

  • CMakeLists.txt:
4:23 AM Changeset in webkit [260939] by Carlos Garcia Campos
  • 2 edits in trunk/Source/WebKit

[GTK4] Add support click events
https://bugs.webkit.org/show_bug.cgi?id=211175

Reviewed by Adrian Perez de Castro.

Handle button pressed and released events using a GtkGestureClick.

  • UIProcess/API/gtk/WebKitWebViewBase.cpp:

(ClickCounter::currentClickCountForGdkButtonEvent):
(webkitWebViewBaseButtonPressed):
(webkitWebViewBaseButtonReleased):
(webkitWebViewBaseConstructed):
(webkitWebViewBaseResetClickCounter):

3:43 AM Changeset in webkit [260938] by Philippe Normand
  • 2 edits in trunk/Source/WebCore

Unreviewed, GStreamer build warning fix after r260755.

  • platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:

(webKitWebSrcMakeRequest): There is no need to capture src in the
closure, its protector is used instead.

1:12 AM Changeset in webkit [260937] by Philippe Normand
  • 6 edits
    1 copy
    1 move
    2 adds
    3 deletes in trunk

[GStreamer] fast/mediastream/get-user-media-device-id.html failing
https://bugs.webkit.org/show_bug.cgi?id=190576

Reviewed by Xabier Rodriguez-Calvar.

Source/WebCore:

The test was failing due to deviceId invalid constraint, which led
me to rewrite the GStreamer Mock sources, removing various hacks
and appsrc usage, which is not needed because we rely on
audioSamplesAvailable and videoSamplesAvailable notifications.

This patch also fixes the audio mock, which was generating silence
until now.

  • platform/GStreamer.cmake:
  • platform/mediastream/gstreamer/GStreamerMediaStreamSource.cpp:

(WebCore::WebKitMediaStreamTrackObserver::WebKitMediaStreamTrackObserver):

  • platform/mediastream/gstreamer/MockGStreamerAudioCaptureSource.cpp: Removed.
  • platform/mediastream/gstreamer/MockGStreamerVideoCaptureSource.cpp: Removed.
  • platform/mediastream/gstreamer/MockGStreamerVideoCaptureSource.h: Removed.
  • platform/mediastream/gstreamer/MockRealtimeAudioSourceGStreamer.cpp: Added.

(WebCore::MockRealtimeAudioSource::create):
(WebCore::MockRealtimeAudioSourceGStreamer::createForMockAudioCapturer):
(WebCore::MockRealtimeAudioSourceGStreamer::MockRealtimeAudioSourceGStreamer):
(WebCore::MockRealtimeAudioSourceGStreamer::render):
(WebCore::MockRealtimeAudioSourceGStreamer::addHum):
(WebCore::MockRealtimeAudioSourceGStreamer::reconfigure):

  • platform/mediastream/gstreamer/MockRealtimeAudioSourceGStreamer.h: Copied from Source/WebCore/platform/mediastream/gstreamer/MockGStreamerAudioCaptureSource.h.
  • platform/mediastream/gstreamer/MockRealtimeVideoSourceGStreamer.cpp: Added.

(WebCore::MockRealtimeVideoSource::create):
(WebCore::MockRealtimeVideoSourceGStreamer::createForMockDisplayCapturer):
(WebCore::MockRealtimeVideoSourceGStreamer::MockRealtimeVideoSourceGStreamer):
(WebCore::MockRealtimeVideoSourceGStreamer::updateSampleBuffer):

  • platform/mediastream/gstreamer/MockRealtimeVideoSourceGStreamer.h: Renamed from Source/WebCore/platform/mediastream/gstreamer/MockGStreamerAudioCaptureSource.h.
  • platform/mock/MockRealtimeVideoSource.h:

LayoutTests:

  • platform/gtk/TestExpectations: Unskip now-passing mediastream tests.
1:02 AM Changeset in webkit [260936] by svillar@igalia.com
  • 3 edits in trunk/LayoutTests/imported/w3c

[WebXR] Import latest changes from webxr/resources in tests
https://bugs.webkit.org/show_bug.cgi?id=211129

Reviewed by Žan Doberšek.

The code in webxr_utils.js had some engine detecting code that was not
working, and thus was unconditionally loading Chromium-only resources when
running tests with other engines (as WebKit). I fixed it upstream in
https://github.com/web-platform-tests/wpt/pull/23200 and now I'm importing it
along with a recent fix in webxr_test_constants.js.

  • web-platform-tests/webxr/resources/webxr_test_constants.js: Reverse position.
  • web-platform-tests/webxr/resources/webxr_util.js:

(xr_promise_test): Properly detect browser engines.

Apr 29, 2020:

10:30 PM Changeset in webkit [260935] by Noam Rosenthal
  • 2 edits in trunk/LayoutTests

[Mac] http/tests/performance/paint-timing/performance-paint-timing-fcp-after-visually-non-empty-for-num-chars.html is flaky
https://bugs.webkit.org/show_bug.cgi?id=211221

Unreviewed test gardening.

  • platform/mac/TestExpectations:

Mark as flaky.

9:16 PM Changeset in webkit [260934] by Simon Fraser
  • 8 edits in trunk/Tools

Add a MiniBrowser option to inset the web view so it doesn't fill the window
https://bugs.webkit.org/show_bug.cgi?id=211216

Reviewed by Tim Horton.

Add a menu item, Debug > Inset Web View to MiniBrowser which insets the view from
the edges of the window, making it possible to debug coordinate conversion issues.

The state is stored in Settings, but unlike other Settings this one doesn't
get populated into the Settings menu because it makes more logical sense grouped
with the options to Hide and Remove the web view.

  • MiniBrowser/mac/BrowserWindowController.h:
  • MiniBrowser/mac/BrowserWindowController.m:

(-[BrowserWindowController toggleFullWindowWebView:]):
(-[BrowserWindowController webViewFillsWindow]):
(-[BrowserWindowController setWebViewFillsWindow:]):

  • MiniBrowser/mac/MainMenu.xib:
  • MiniBrowser/mac/SettingsController.h:
  • MiniBrowser/mac/SettingsController.m:

(-[SettingsController initWithMenu:]):
(-[SettingsController webViewFillsWindow]):
(-[SettingsController setWebViewFillsWindow:]):

  • MiniBrowser/mac/WK1BrowserWindowController.m:

(-[WK1BrowserWindowController validateMenuItem:]):
(-[WK1BrowserWindowController didChangeSettings]):

  • MiniBrowser/mac/WK2BrowserWindowController.m:

(-[WK2BrowserWindowController validateMenuItem:]):
(-[WK2BrowserWindowController didChangeSettings]):

9:16 PM Changeset in webkit [260933] by Simon Fraser
  • 5 edits in trunk/Source

Use initializers in PlatformMouseEvent and WebEvent
https://bugs.webkit.org/show_bug.cgi?id=211217

Reviewed by Tim Horton.

Source/WebCore:

Use initializers im PlatformMouseEvent.

  • platform/PlatformMouseEvent.h:

(WebCore::PlatformMouseEvent::PlatformMouseEvent):

Source/WebKit:

Use initializers im WebEvent.

  • Shared/WebEvent.h:
  • Shared/WebMouseEvent.cpp:
8:03 PM Changeset in webkit [260932] by Brent Fulgham
  • 11 edits in trunk/Source/WebKit

Improve SandboxExtension::HandleArray to reduce boilerplate
https://bugs.webkit.org/show_bug.cgi?id=211103
<rdar://problem/62533632>

Reviewed by Per Arne Vollan.

There are a number of boilerplate patterns needed when using SandboxExtension::HandleArray.
We could make these simpler and less error prone by improving the class.

This patch:

  1. Adds convenience methods to create and consume HandleArrays.
  2. Updates uses of HandleArray to use the convenience methods.

Tested by existing tests.

  • Platform/IPC/FormDataReference.h:

(IPC::FormDataReference::decode):

  • Shared/Cocoa/SandboxExtensionCocoa.mm:

(WebKit::SandboxExtension::createHandlesForFiles):
(WebKit::SandboxExtension::createHandlesForMachLookup):
(WebKit::SandboxExtension::consumePermanently):

  • Shared/SandboxExtension.h:

(WebKit::createHandlesForFiles):
(WebKit::SandboxExtension::consumePermanently):

  • UIProcess/Cocoa/WebProcessPoolCocoa.mm:

(WebKit::WebProcessPool::platformInitializeWebProcess):

  • UIProcess/Cocoa/WebProcessProxyCocoa.mm:

(WebKit::WebProcessProxy::unblockPreferenceServiceIfNeeded):

  • UIProcess/WebPageProxy.cpp:
  • WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:

(WebKit::WebPlatformStrategies::getPathnamesForType):

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::extendSandboxForFilesFromOpenPanel):

  • WebProcess/WebProcess.cpp:

(WebKit::WebProcess::initializeWebProcess):

  • WebProcess/cocoa/WebProcessCocoa.mm:

(WebKit::WebProcess::platformInitializeWebProcess):
(WebKit::WebProcess::unblockPreferenceService):

8:00 PM Changeset in webkit [260931] by Ross Kirsling
  • 13 edits in trunk/Source/JavaScriptCore

Ensure Intl classes don't have naming conflicts with unified builds
https://bugs.webkit.org/show_bug.cgi?id=211213

Reviewed by Yusuke Suzuki.

Each Intl class usually has an array named relevantExtensionsKeys and a function named localeData.
This can result in redefinition errors when unified builds put two of them into the same translation unit.
Some are already guarding against this with an internal namespace while others are not.

As a uniform approach, this patch makes each localeData function a static method and
puts each relevantExtensionsKeys array (as well as any constants for its indices) into an internal namespace.

Furthermore, since three different classes are defining an identical UFieldPositionIteratorDeleter,
this patch consolidates them into one definition in IntlObject.

  • runtime/IntlCollator.cpp:

(JSC::IntlCollator::sortLocaleData): Renamed from JSC::sortLocaleData.
(JSC::IntlCollator::searchLocaleData): Renamed from JSC::searchLocaleData.
(JSC::IntlCollator::initializeCollator):

  • runtime/IntlCollator.h:
  • runtime/IntlDateTimeFormat.cpp:

(JSC::IntlDateTimeFormat::localeData): Renamed from JSC::IntlDTFInternal::localeData.
(JSC::toDateTimeOptionsAnyDate): Renamed from JSC::IntlDTFInternal::toDateTimeOptionsAnyDate.
(JSC::IntlDateTimeFormat::initializeDateTimeFormat):
(JSC::UFieldPositionIteratorDeleter::operator() const): Deleted.

  • runtime/IntlDateTimeFormat.h:
  • runtime/IntlNumberFormat.cpp:

(JSC::IntlNumberFormat::localeData): Renamed from JSC::IntlNFInternal::localeData.
(JSC::IntlNumberFormat::initializeNumberFormat):
(JSC::UFieldPositionIteratorDeleter::operator() const): Deleted.

  • runtime/IntlNumberFormat.h:
  • runtime/IntlObject.cpp:

(JSC::UFieldPositionIteratorDeleter::operator() const): Added.

  • runtime/IntlObject.h:
  • runtime/IntlPluralRules.cpp:

(JSC::IntlPluralRules::localeData): Renamed from JSC::localeData.

  • runtime/IntlPluralRules.h:
  • runtime/IntlRelativeTimeFormat.cpp:

(JSC::IntlRelativeTimeFormat::localeData): Renamed from JSC::localeData.
(JSC::IntlRelativeTimeFormat::initializeRelativeTimeFormat):
(JSC::UFieldPositionIteratorDeleter::operator() const): Deleted.

  • runtime/IntlRelativeTimeFormat.h:
7:47 PM Changeset in webkit [260930] by Lauro Moura
  • 2 edits in trunk/LayoutTests

[GTK] Gardening Wayland compositing tests.

Unreviewed test gardening.

  • platform/gtk-wayland/TestExpectations:
6:35 PM Changeset in webkit [260929] by Alan Coon
  • 2 edits in branches/safari-610.1.11-branch/Source/WebKit

Cherry-pick r260920. rdar://problem/62627737

Unreviewed sandbox compile fix.

  • Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@260920 268f45cc-cd09-0410-ab3c-d52691b4dbfc

5:50 PM Changeset in webkit [260928] by Chris Dumez
  • 11 edits in trunk

REGRESSION(r260791) Network process fails to suspend promptly
https://bugs.webkit.org/show_bug.cgi?id=211207
<rdar://problem/62620454>

Reviewed by Alex Christensen.

Source/WebKit:

After r260791, all WebResourceLoadStatisticsStore instances share a single WorkQueue.
As a result, the logic to suspend WebResourceLoadStatisticsStore's WorkQueues in
NetworkProcess::prepareToSuspend() needs to get updated to reflect this.

  • NetworkProcess/Classifier/WebResourceLoadStatisticsStore.cpp:

(WebKit::WebResourceLoadStatisticsStore::suspend):
(WebKit::WebResourceLoadStatisticsStore::resume):

  • NetworkProcess/Classifier/WebResourceLoadStatisticsStore.h:
  • NetworkProcess/NetworkProcess.cpp:

(WebKit::NetworkProcess::prepareToSuspend):
(WebKit::NetworkProcess::resume):

Tools:

Add API test coverage.

  • TestWebKitAPI/Tests/WebKitCocoa/ResourceLoadStatistics.mm:

(TEST):

5:10 PM Changeset in webkit [260927] by Alan Bujtas
  • 2 edits in trunk/LayoutTests

[Win] Skip fast/text/text-indent-inside-float.html

Unreviewed test gardening.

  • platform/win/TestExpectations:
4:42 PM Changeset in webkit [260926] by Kate Cheney
  • 2 edits in trunk/Tools

Add better handling of an uncleared bundle identifier in WebKitTestRunner
https://bugs.webkit.org/show_bug.cgi?id=211195
<rdar://problem/62117145>

Reviewed by Alexey Proskuryakov.

  • WebKitTestRunner/TestController.cpp:

(WTR::TestController::createWebViewWithOptions):

4:37 PM Changeset in webkit [260925] by Alan Coon
  • 2 edits in branches/safari-610.1.11-branch/Source/WebKit

Cherry-pick r260904. rdar://problem/62622460

Set _STAttributionDisplayName to iOS WebContent Info plist
https://bugs.webkit.org/show_bug.cgi?id=210772
<rdar://problem/62075201>

Reviewed by Eric Carlson.

Set _STAttributionDisplayName to 'Website' value.

  • WebProcess/EntryPoint/Cocoa/XPCService/WebContentService/Info-iOS.plist:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@260904 268f45cc-cd09-0410-ab3c-d52691b4dbfc

4:37 PM Changeset in webkit [260924] by Alan Coon
  • 12 edits
    1 add in branches/safari-610.1.11-branch/Source

Cherry-pick r260650. rdar://problem/62622460

Call STDynamicActivityAttributionPublisher in the WebProcess
https://bugs.webkit.org/show_bug.cgi?id=210772
<rdar://problem/62075201>

Patch by Youenn Fablet <youenn@apple.com> and Luming Yin <luming_yin@apple.com> on 2020-04-24
Reviewed by Geoffrey Garen.

Source/WebKit:

Call STDynamicActivityAttributionPublisher in WebProcess to make use of the newly added plist entry.
Use of a sandbox extension to protect this call.

  • Configurations/WebKit.xcconfig:
  • Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
  • Scripts/process-entitlements.sh:
  • Shared/WebProcessCreationParameters.cpp: (WebKit::WebProcessCreationParameters::encode const): (WebKit::WebProcessCreationParameters::decode):
  • Shared/WebProcessCreationParameters.h:
  • UIProcess/Cocoa/WebProcessPoolCocoa.mm: (WebKit::WebProcessPool::platformInitializeWebProcess):
  • WebKit.xcodeproj/project.pbxproj:
  • WebProcess/EntryPoint/Cocoa/XPCService/WebContentService/Info-iOS.plist:
  • WebProcess/EntryPoint/Cocoa/XPCService/WebContentService/InfoPlist.strings: Added.
  • WebProcess/cocoa/WebProcessCocoa.mm: (WebKit::WebProcess::platformInitializeWebProcess):

Source/WTF:

  • wtf/PlatformHave.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@260650 268f45cc-cd09-0410-ab3c-d52691b4dbfc

4:31 PM Changeset in webkit [260923] by Adrian Perez de Castro
  • 2 edits in trunk/Source/WebKit

REGRESSION(r260889): TestContextMenu:/webkit/WebKitWebView/populate-menu no longer passes
https://bugs.webkit.org/show_bug.cgi?id=211203

Reviewed by Aakash Jain.

No new tests needed.

  • UIProcess/gtk/WebContextMenuProxyGtk.cpp:

(WebKit::WebContextMenuProxyGtk::WebContextMenuProxyGtk): Attach the correct action
group to the popover widget, instead of a temporary which will always be empty.

4:08 PM Changeset in webkit [260922] by ddkilzer@apple.com
  • 2 edits in trunk/Source/WebKit

REGRESSION (r246395): Leak of ARQuickLookPreviewItem and ARQuickLookWebKitItem in -[_WKPreviewControllerDataSource previewController:previewItemAtIndex:]
<https://webkit.org/b/211197>
<rdar://problem/62612483>

Reviewed by Darin Adler.

  • UIProcess/Cocoa/SystemPreviewControllerCocoa.mm:

(-[_WKPreviewControllerDataSource previewController:previewItemAtIndex:]):

  • Use RetainPtr<> and adoptNS() to fix leaks.
3:45 PM Changeset in webkit [260921] by jer.noble@apple.com
  • 2 edits in trunk/Source/WebCore

Remove the debug ASSERT in ImageDecoderAVFObjC::storeSampleBuffer()
https://bugs.webkit.org/show_bug.cgi?id=211191
<rdar://problem/62542285>

Reviewed by Said Abou-Hallawa.

r259594 added an iterator check and a RELEASE_LOG_ERROR for that check, making this ASSERT superfluous.

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

(WebCore::ImageDecoderAVFObjC::storeSampleBuffer):

3:37 PM Changeset in webkit [260920] by pvollan@apple.com
  • 2 edits in trunk/Source/WebKit

Unreviewed sandbox compile fix.

  • Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
3:16 PM Changeset in webkit [260919] by Ross Kirsling
  • 2 edits in trunk/Source/JavaScriptCore

Unreviewed follow-up to r260848.
LowerDFGToB3 has its own isFunction which should NOT have been renamed.

  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::compileCreateThis):
(JSC::FTL::DFG::LowerDFGToB3::compileCreatePromise):
(JSC::FTL::DFG::LowerDFGToB3::compileCreateInternalFieldObject):
(JSC::FTL::DFG::LowerDFGToB3::compileIsObjectOrNull):
(JSC::FTL::DFG::LowerDFGToB3::compileIsFunction):
(JSC::FTL::DFG::LowerDFGToB3::buildTypeOf):
(JSC::FTL::DFG::LowerDFGToB3::isFunction): Renamed from isCallable.

3:13 PM Changeset in webkit [260918] by Alan Coon
  • 5 edits in branches/safari-610.1.11-branch

Cherry-pick r260408. rdar://problem/62617775

App-bound domain behavior should abide by the limitsNavigationsToAppBoundDomains argument in WKWebView configuration
https://bugs.webkit.org/show_bug.cgi?id=210769
<rdar://problem/62065241>

Reviewed by Brent Fulgham.

Source/WebKit:

Changes app-bound domain behavior to be triggered by the value of
limitsNavigationsToAppBoundDomains, a WebView configuration flag.
If the WebView has this parameter set and is currently navigating to
an app bound domain, then app-bound privileges will be granted.

  • UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::setIsNavigatingToAppBoundDomainAndCheckIfPermitted): Update this function to return a boolean to indicate whether the navigation should fail. A failure should occur if a WebView has set the limitsNavigationsToAppBoundDomains flag and attempts to navigate away from an app-bound domain.

If the limitsNavigationsToAppBoundDomains value has not been set to
true, maintain non-app bound behavior regardless of whether the domain
is app-bound or not.

(WebKit::WebPageProxy::decidePolicyForNavigationAction):
Check the result of setIsNavigatingToAppBoundDomainAndCheckIfPermitted and fail the
navigation if needed, with both RELEASE logging and an appropriate
error message.

(WebKit::WebPageProxy::setIsNavigatingToAppBoundDomain): Deleted.

  • UIProcess/WebPageProxy.h: Renamed for clarity.

Tools:

Removes any tests for swapping between app-bound and non app-bound
domains as this behavior is no longer supported.

Sets the limitsNavigationsToAppBoundDomains flag for tests which should
have app-bound behavior to maintain test functionality.

Adds 5 new tests for new behavior.

  • TestWebKitAPI/Tests/WebKitCocoa/InAppBrowserPrivacy.mm: (TEST): (-[AppBoundDomainDelegate webView:didFinishNavigation:]): (-[AppBoundDomainDelegate webView:didFailProvisionalNavigation:withError:]): (-[AppBoundDomainDelegate waitForDidFinishNavigation]): (-[AppBoundDomainDelegate waitForDidFailProvisionalNavigationError]):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@260408 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2:57 PM Changeset in webkit [260917] by sbarati@apple.com
  • 2 edits in trunk/Tools

build-jsc should quote the value of compile flags it forwards
https://bugs.webkit.org/show_bug.cgi?id=211204

Reviewed by Mark Lam.

We should quote outgoing compile flags that have an equal in them. Before,
if build-jsc were invoked like:
$ build-jsc --release ARCHS="x86_64 i386"
It'd invoke make like:
$ make release ARCHS=x86_64 i386
leading us to try to build the "i386" target, which doesn't exist.

This patch makes us invoke make like so:
$ make release ARCHS="x86_64 i386"

  • Scripts/build-jsc:

(buildMyProject):

2:43 PM Changeset in webkit [260916] by Alan Bujtas
  • 2 edits in trunk/LayoutTests

[iOS] Skip fast/text/text-indent-inside-float.html

Unreviewed test gardening.

Apparently float sizing/ahem font produces a different result on iOS.

  • platform/ios/TestExpectations:
2:39 PM Changeset in webkit [260915] by Alexey Shvayka
  • 4 edits in trunk

AsyncFromSyncIterator methods should not pass absent values
https://bugs.webkit.org/show_bug.cgi?id=211147

Reviewed by Ross Kirsling.

JSTests:

  • test262/expectations.yaml: Mark 4 test cases as passing.

Source/JavaScriptCore:

This patch implements minor spec change [1] to match async and sync iteration
from the perspective of userland next and return iterator methods.
throw method always receives an argument, yet we align with others to be
consistent and future-proof.

This change is already implemented in SpiderMonkey.

[1]: https://github.com/tc39/ecma262/pull/1776

  • builtins/AsyncFromSyncIteratorPrototype.js:
2:18 PM Changeset in webkit [260914] by commit-queue@webkit.org
  • 7 edits in trunk

Add WKNavigationDelegate API shouldAllowDeprecatedTLS
https://bugs.webkit.org/show_bug.cgi?id=210981
<rdar://problem/61742976>

Patch by Alex Christensen <achristensen@webkit.org> on 2020-04-29
Reviewed by Geoffrey Garen.

Source/WebKit:

  • UIProcess/API/Cocoa/WKNavigationDelegate.h:
  • UIProcess/Cocoa/NavigationState.h:
  • UIProcess/Cocoa/NavigationState.mm:

(WebKit::NavigationState::setNavigationDelegate):
(WebKit::NavigationState::NavigationClient::shouldAllowLegacyTLS):

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/TLSDeprecation.mm:

(-[TLSNavigationDelegate receivedShouldAllowDeprecatedTLS]):
(-[TLSNavigationDelegate webView:authenticationChallenge:shouldAllowDeprecatedTLS:]):
(TestWebKitAPI::TEST):
(-[TLSNavigationDelegate receivedShouldAllowLegacyTLS]): Deleted.
(-[TLSNavigationDelegate _webView:authenticationChallenge:shouldAllowLegacyTLS:]): Deleted.

  • TestWebKitAPI/config.h:
1:39 PM Changeset in webkit [260913] by mark.lam@apple.com
  • 4 edits in trunk/Source

Freezing of Gigacage and JSC Configs should be thread safe.
https://bugs.webkit.org/show_bug.cgi?id=211201
<rdar://problem/62597619>

Reviewed by Yusuke Suzuki.

Source/bmalloc:

  • bmalloc/Gigacage.cpp:

(Gigacage::bmalloc::permanentlyFreezeGigacageConfig):

Source/JavaScriptCore:

If a client creates multiple VM instances in different threads concurrently, the
following race can occur:

Config::permanentlyFreeze() contains the following code:

if (!g_jscConfig.isPermanentlyFrozen) Point P1

g_jscConfig.isPermanentlyFrozen = true; Point P2

Let's say there are 2 threads T1 and T2.

  1. T1 creates a VM and gets to point P1, and sees that g_jscConfig.isPermanentlyFrozen is not set. T1 is about to execute P2 when it gets pre-empted.
  1. T2 creates a VM and gets to point P1, and sees that g_jscConfig.isPermanentlyFrozen is not set. T2 proceeds to point P2 and sets g_jscConfig.isPermanentlyFrozen to true. T2 goes on to freeze the Config and makes it not writable.
  1. T1 gets to run again, and proceeds to point P2. T1 tries to set g_jscConfig.isPermanentlyFrozen to true. But because the Config has been frozen against writes, the write to g_jscConfig.isPermanentlyFrozen results in a crash.

This is a classic TOCTOU bug. The fix is simply to ensure that only one thread
can enter Config::permanentlyFreeze() at a time.

Ditto for Gigacage::permanentlyFreezeGigacageConfig().

  • runtime/JSCConfig.cpp:

(JSC::Config::permanentlyFreeze):

1:16 PM Changeset in webkit [260912] by Chris Dumez
  • 4 edits in trunk/Source/WebKit

[iOS][WK2] Temporarily stop using RunningBoard for the foreground process assertion
https://bugs.webkit.org/show_bug.cgi?id=211196
<rdar://problem/62535822>

Reviewed by Tim Horton.

Temporarily stop using RunningBoard for the foreground process assertion. On recent iOS builds, there
are issues where this assertion can time out after 30 seconds, even though the process is still
foreground.

  • Configurations/WebKit.xcconfig:
  • UIProcess/ProcessAssertion.h:
  • UIProcess/ios/ProcessAssertionIOS.mm:

(WebKit::runningBoardNameForAssertionType):
(WebKit::ProcessAssertion::ProcessAssertion):
(WebKit::ProcessAssertion::~ProcessAssertion):

1:06 PM Changeset in webkit [260911] by Fujii Hironori
  • 2 edits in trunk/Source/WTF

[Win] Deadlock in WTF::Thread::didExit() while WebKitNetworkProcess.exe is exiting
https://bugs.webkit.org/show_bug.cgi?id=210955

Reviewed by Don Olmstead.

The thread_local object of the main thread is destructed after
Windows terminates other threads. If the terminated thread was
holding a mutex, trying to lock the mutex causes deadlock.

  • wtf/win/ThreadingWin.cpp:

(WTF::Thread::ThreadHolder::~ThreadHolder): Do nothing if the
thread is the main thread.

12:38 PM Changeset in webkit [260910] by Simon Fraser
  • 7 edits in trunk

Simplify contents clipping layer geometry
https://bugs.webkit.org/show_bug.cgi?id=211162

Reviewed by Zalan Bujtas.

Source/WebCore:

GraphicsLayerCA uses a contents clipping layer, with an optional shape layer, to support
clipping replaced elements with composited contents, like video and WebGL canvas.

A future patch will use this code path for composited subframes. To achieve this,
we need to host the layers of child GraphicsLayers under m_contentsClippingLayer, but
without the GraphicsLayer client having to do geometry math. We can do this by setting
the bounds origin of m_contentsClippingLayer to adjust for its position relative
to the GraphicsLayer origin.

This patch does that, adjusting the position of the contents layer accordingly.
The shape mask layer also needs adjusting; its position has to be at the layer's
bounds origin, and the shape itself needs to have a zero origin.

Tested by existing tests.

  • platform/graphics/ca/GraphicsLayerCA.cpp:

(WebCore::GraphicsLayerCA::updateSublayerList):
(WebCore::GraphicsLayerCA::updateClippingStrategy):
(WebCore::GraphicsLayerCA::updateContentsRects):

LayoutTests:

New content layer positions.

  • compositing/video/video-object-fit.html:
  • compositing/video/video-object-position-expected.txt:
  • platform/ios/compositing/video/video-object-position-expected.txt:
  • platform/mac/compositing/video/video-object-fit-expected.txt:
12:12 PM Changeset in webkit [260909] by Wenson Hsieh
  • 3 edits in trunk/LayoutTests

editing/selection/ios/selection-handles-after-touch-end.html is failing on iOS 13.4 after r260367
https://bugs.webkit.org/show_bug.cgi?id=211185
<rdar://problem/62560030>

Reviewed by Tim Horton.

Clean up a test and test expectation after r260367. Before this change, the test was trying to verify
that selection handles didn't show up before ending a long press when selecting text. However, the test
expectation in platform/ios/editing/selection/ios/selection-handles-after-touch-end-expected.txt prior
to r260367, which overrode editing/selection/ios/selection-handles-after-touch-end-expected.txt, was
verifying that selection handles showed up after making the text selection, but before ending the touch.
r260367 removed this redundant test expectation in favor of a single test expectation file in
editing/selection/ios, but did not transfer over the expectation of non-empty grabber rects before
ending the touch. This is because the version of the iOS SDK I was testing against happened to _not_
show selection handles before ending the touch.

In a more recent version of that iOS SDK, selection handles are now shown again before ending the touch,
which matches behavior expected in iOS 13.4 once again. This means that the expectation across both
versions of iOS is, once again, to show selection handles before ending the touch. As such, fix this
failing test by refactoring it to only verify that selection handles are present after ending the touch.
We can also take this opportunity to rewrite parts of the test to use more modern idioms, like the
testing facilities in js-test.js and ui-helper.js.

  • editing/selection/ios/selection-handles-after-touch-end-expected.txt:
  • editing/selection/ios/selection-handles-after-touch-end.html:
12:01 PM Changeset in webkit [260908] by commit-queue@webkit.org
  • 26 edits
    6 copies
    3 adds in trunk

REGRESSION (r256784?): Shadertoy demo no longer works in Safari
https://bugs.webkit.org/show_bug.cgi?id=210994

Patch by Kenneth Russell <kbr@chromium.org> on 2020-04-29
Reviewed by Dean Jackson.

Source/WebCore:

Certain Shadertoy examples stopped working with the ANGLE backend
for WebGL because rendering to floating-point render targets was
no longer being enabled implicitly along with the
OES_texture_float extension.

Add support for the WebGL 1.0 extensions
EXT_color_buffer_half_float and WEBGL_color_buffer_float, and the
WebGL 2.0 extension EXT_color_buffer_float. Enable these
implicitly for WebGL 1.0 in the OES_texture_float and
OES_texture_half_float extensions, restoring the previous
functionality.

Translate 32-bit floating point texture formats appropriately for
the ANGLE backend. Fix some failures in previously-skipped
conformance tests. The new code passes the more stringent
top-of-tree WebGL 1.0.4 and 2.0.1 conformance tests related to
floating-point texture renderability, which are not yet in the
WebKit repository.

  • CMakeLists.txt:
  • DerivedSources-input.xcfilelist:
  • DerivedSources-output.xcfilelist:
  • DerivedSources.make:
  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • bindings/js/JSDOMConvertWebGL.cpp:

(WebCore::convertToJSValue):

  • html/canvas/EXTColorBufferFloat.cpp: Copied from Source/WebCore/html/canvas/OESTextureHalfFloat.cpp.

(WebCore::EXTColorBufferFloat::EXTColorBufferFloat):
(WebCore::EXTColorBufferFloat::getName const):
(WebCore::EXTColorBufferFloat::supported):

  • html/canvas/EXTColorBufferFloat.h: Copied from Source/WebCore/html/canvas/OESTextureFloat.h.
  • html/canvas/EXTColorBufferFloat.idl: Added.
  • html/canvas/EXTColorBufferHalfFloat.cpp: Copied from Source/WebCore/html/canvas/OESTextureFloat.cpp.

(WebCore::EXTColorBufferHalfFloat::EXTColorBufferHalfFloat):
(WebCore::EXTColorBufferHalfFloat::getName const):
(WebCore::EXTColorBufferHalfFloat::supported):

  • html/canvas/EXTColorBufferHalfFloat.h: Copied from Source/WebCore/html/canvas/OESTextureFloat.h.
  • html/canvas/EXTColorBufferHalfFloat.idl: Added.
  • html/canvas/OESTextureFloat.cpp:

(WebCore::OESTextureFloat::OESTextureFloat):
(WebCore::OESTextureFloat::supported):

  • html/canvas/OESTextureFloat.h:
  • html/canvas/OESTextureHalfFloat.cpp:

(WebCore::OESTextureHalfFloat::OESTextureHalfFloat):
(WebCore::OESTextureHalfFloat::supported):

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

(WebCore::WebGL2RenderingContext::getExtension):
(WebCore::WebGL2RenderingContext::getSupportedExtensions):
(WebCore::WebGL2RenderingContext::getParameter):

  • html/canvas/WebGLColorBufferFloat.cpp: Copied from Source/WebCore/html/canvas/OESTextureFloat.cpp.

(WebCore::WebGLColorBufferFloat::WebGLColorBufferFloat):
(WebCore::WebGLColorBufferFloat::getName const):
(WebCore::WebGLColorBufferFloat::supported):

  • html/canvas/WebGLColorBufferFloat.h: Copied from Source/WebCore/html/canvas/OESTextureFloat.h.
  • html/canvas/WebGLColorBufferFloat.idl: Added.
  • html/canvas/WebGLExtension.h:
  • html/canvas/WebGLRenderingContext.cpp:

(WebCore::WebGLRenderingContext::getExtension):
(WebCore::WebGLRenderingContext::getSupportedExtensions):
(WebCore::WebGLRenderingContext::getParameter):

  • html/canvas/WebGLRenderingContextBase.cpp:

(WebCore::WebGLRenderingContextBase::extensionIsEnabled):
(WebCore::WebGLRenderingContextBase::copyTexImage2D):

  • html/canvas/WebGLRenderingContextBase.h:
  • platform/graphics/angle/ExtensionsGLANGLE.cpp:

(WebCore::ExtensionsGLANGLE::adjustWebGL1TextureInternalFormat):
(WebCore::ExtensionsGLANGLE::texImage2DRobustANGLE):

  • platform/graphics/angle/ExtensionsGLANGLE.h:
  • platform/graphics/angle/GraphicsContextGLANGLE.cpp:

(WebCore::GraphicsContextGLOpenGL::texImage2DDirect):

LayoutTests:

Update tex-mipmap-levels.html to top-of-tree to fix incorrect test
cases. Rebaseline layout tests which are either now all passing,
or have progressed. Temporarily skip a couple of tests, previously
skipped because of lack of the EXT_color_buffer_float extension,
which are failing because of Bug 211156.

  • TestExpectations:
  • fast/canvas/webgl/readPixels-float-expected.txt:
  • webgl/2.0.0/conformance2/textures/misc/copy-texture-image-expected.txt:
  • webgl/2.0.0/conformance2/textures/misc/tex-mipmap-levels-expected.txt:
  • webgl/2.0.0/resources/webgl_test_files/conformance2/textures/misc/tex-mipmap-levels.html:
11:53 AM Changeset in webkit [260907] by jer.noble@apple.com
  • 2 edits in trunk/Source/WTF

[Mac] Adopt kMTSupportNotification_ShouldPlayHDRVideoChanged notification
https://bugs.webkit.org/show_bug.cgi?id=211028
<rdar://problem/61173289>

Reviewed by Aakash Jain.

Follow-up test failure fix; correct the debug/non-debug variants of SOFT_LINK_FRAMEWORK_FOR_SOURCE_WITH_EXPORT.

  • wtf/win/SoftLinking.h:
11:03 AM Changeset in webkit [260906] by ysuzuki@apple.com
  • 3 edits
    1 add in trunk

[JSC] JSStringJoiner is missing BigInt handling
https://bugs.webkit.org/show_bug.cgi?id=211174

Reviewed by Mark Lam.

JSTests:

  • stress/bigint-to-string-in-array.js: Added.

(shouldBe):

Source/JavaScriptCore:

JSStringJoiner missed handling of BigInt (specifically BigInt32) and appending empty string incorrectly.
In debug build, assertion hits. We should support BigInt in JSStringJoiner.

  • runtime/JSStringJoiner.h:

(JSC::JSStringJoiner::appendWithoutSideEffects):

10:52 AM Changeset in webkit [260905] by Alan Bujtas
  • 4 edits
    2 adds in trunk

Header is blank on https://nader.org
https://bugs.webkit.org/show_bug.cgi?id=205747
<rdar://problem/58305910>

Reviewed by Simon Fraser.

Source/WebCore:

Do not use stale containing block width value while computing preferred width.

Test: fast/text/text-indent-inside-float.html

  • rendering/RenderBlockFlow.cpp:

(WebCore::RenderBlockFlow::computeInlinePreferredLogicalWidths const):

LayoutTests:

  • fast/text/text-indent-inside-float-expected.html: Added.
  • fast/text/text-indent-inside-float.html: Added.
  • platform/mac/editing/pasteboard/drop-text-without-selection-expected.txt:
10:20 AM Changeset in webkit [260904] by youenn@apple.com
  • 2 edits in trunk/Source/WebKit

Set _STAttributionDisplayName to iOS WebContent Info plist
https://bugs.webkit.org/show_bug.cgi?id=210772
<rdar://problem/62075201>

Reviewed by Eric Carlson.

Set _STAttributionDisplayName to 'Website' value.

  • WebProcess/EntryPoint/Cocoa/XPCService/WebContentService/Info-iOS.plist:
10:20 AM Changeset in webkit [260903] by Alan Bujtas
  • 2 edits in trunk/Source/WebCore

[LFC][TFC] Take row span into account when checking for missing cells
https://bugs.webkit.org/show_bug.cgi?id=211184

Reviewed by Antti Koivisto.

The tree builder looks for missing cells in the table grid and fills in the gaps with empty cells.
This patch takes row spanning into account and make sure we don't end up adding an extra, redundant cell.

  • layout/layouttree/LayoutTreeBuilder.cpp:

(WebCore::Layout::TreeBuilder::buildTableStructure):

9:55 AM Changeset in webkit [260902] by youenn@apple.com
  • 2 edits in trunk/Source/WebCore

Update SWServer.cpp originURL after https://trac.webkit.org/changeset/260707
https://bugs.webkit.org/show_bug.cgi?id=211169

Reviewed by Alex Christensen.

  • workers/service/server/SWServer.cpp:

(WebCore::originURL):
No need to dereference port since URL::setPort takes an Optional.

9:50 AM Changeset in webkit [260901] by youenn@apple.com
  • 4 edits in trunk/LayoutTests

http/tests/media/media-stream/device-change-event-in-iframe.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=211119
<rdar://problem/62457151>

Reviewed by Eric Carlson.

Make sure duplicate ondevicechange events do not create flakiness.

  • http/tests/media/media-stream/device-change-event-in-iframe-expected.txt:
  • http/tests/media/media-stream/device-change-event-in-iframe.html:
  • http/tests/media/media-stream/resources/device-change-iframe.html:
9:17 AM Changeset in webkit [260900] by Kate Cheney
  • 27 edits
    4 adds
    4 deletes in trunk

Refactor layout tests after updates to In-App Browser Privacy
https://bugs.webkit.org/show_bug.cgi?id=211146
<rdar://problem/62524127>

Reviewed by Brent Fulgham.

Source/WebKit:

Tests: http/tests/in-app-browser-privacy/app-bound-domain-gets-app-bound-session.html

http/tests/in-app-browser-privacy/non-app-bound-domain-does-not-get-app-bound-session.html

Removes setInAppBrowserPrivacyEnabled, which is no longer needed by
layout tests. Setting this in TestOptions is enough.
getWebViewCategory is not needed because this patch deletes the only test
which uses it. Lastly, adds a new function to clear app-bound sessions
now that multiple tests are checking for them.

  • NetworkProcess/NetworkProcess.cpp:

(WebKit::NetworkProcess::clearAppBoundSession):
(WebKit::NetworkProcess::setInAppBrowserPrivacyEnabled): Deleted.

  • NetworkProcess/NetworkProcess.h:
  • NetworkProcess/NetworkProcess.messages.in:
  • NetworkProcess/NetworkSession.h:

(WebKit::NetworkSession::clearAppBoundSession):
(WebKit::NetworkSession::setInAppBrowserPrivacyEnabled): Deleted.

  • NetworkProcess/cocoa/NetworkSessionCocoa.h:
  • NetworkProcess/cocoa/NetworkSessionCocoa.mm:

(WebKit::NetworkSessionCocoa::appBoundSession):
(WebKit::NetworkSessionCocoa::clearAppBoundSession):

  • UIProcess/API/C/WKWebsiteDataStoreRef.cpp:

(WKWebsiteDataStoreClearAppBoundSession):
(WKWebsiteDataStoreSetInAppBrowserPrivacyEnabled): Deleted.

  • UIProcess/API/C/WKWebsiteDataStoreRef.h:
  • UIProcess/API/Cocoa/WKWebsiteDataStore.mm:

(-[WKWebsiteDataStore _getWebViewCategoryFor:completionHandler:]): Deleted.

  • UIProcess/API/Cocoa/WKWebsiteDataStorePrivate.h:
  • UIProcess/Network/NetworkProcessProxy.cpp:

(WebKit::NetworkProcessProxy::clearAppBoundSession):
(WebKit::NetworkProcessProxy::setInAppBrowserPrivacyEnabled): Deleted.

  • UIProcess/Network/NetworkProcessProxy.h:
  • UIProcess/WebsiteData/WebsiteDataStore.cpp:

(WebKit::WebsiteDataStore::clearAppBoundSession):
(WebKit::WebsiteDataStore::setInAppBrowserPrivacyEnabled): Deleted.

  • UIProcess/WebsiteData/WebsiteDataStore.h:

Tools:

Removes two unused functions after updating the test cases.
setInAppBrowserPrivacyEnabled is no longer needed, setting this
in TestOptions is enough. getWebViewCategory is not needed because
this patch deletes the only test which uses it.

Adds a function to clear app-bound sessions between tests now that
multiple tests check for them.

  • WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
  • WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:

(WTR::InjectedBundle::didReceiveMessageToPage):

  • WebKitTestRunner/InjectedBundle/TestRunner.cpp:

(WTR::TestRunner::getWebViewCategory): Deleted.
(WTR::TestRunner::callDidReceiveWebViewCategoryCallback): Deleted.
(WTR::TestRunner::setInAppBrowserPrivacyEnabled): Deleted.
(WTR::TestRunner::callDidSetInAppBrowserPrivacyEnabledCallback): Deleted.

  • WebKitTestRunner/InjectedBundle/TestRunner.h:
  • WebKitTestRunner/TestController.cpp:

(WTR::TestController::createWebViewWithOptions):
(WTR::TestController::resetStateToConsistentValues):
Move the call to clear the bundle id to happen in
resetStateToConsistentValues to make sure the next test can set the
value if needed (otherwise results in a call to exit(1)).

(WTR::updateTestOptionsFromTestHeader):
(WTR::TestController::clearAppBoundSession):
(WTR::TestController::getWebViewCategory): Deleted.
(WTR::TestController::setInAppBrowserPrivacyEnabled): Deleted.

  • WebKitTestRunner/TestController.h:
  • WebKitTestRunner/TestInvocation.cpp:

(WTR::TestInvocation::didReceiveMessageFromInjectedBundle):
(WTR::TestInvocation::didSetInAppBrowserPrivacyEnabled): Deleted.
(WTR::TestInvocation::didReceiveWebViewCategory): Deleted.

  • WebKitTestRunner/TestInvocation.h:
  • WebKitTestRunner/TestOptions.h:

(WTR::TestOptions::hasSameInitializationOptions const):

  • WebKitTestRunner/cocoa/TestControllerCocoa.mm:

(WTR::TestController::platformCreateWebView):
App-bound WebViews now require a special configuration argument. This
patch adds logic to enable that using a new TestOption.
(WTR::TestController::getWebViewCategory): Deleted.

LayoutTests:

Updates the test cases in 2 ways:

  1. Deletes app-bound-domain.html, which is fully and properly tested

using API tests and is unnecessary here.

  1. Splits switch-session-on-navigation-to-app-bound-domain.html into

two separate tests now that navigation between app-bound and
non-app-bound WebViews is not allowed.

  • http/tests/in-app-browser-privacy/app-bound-domain-expected.txt: Removed.
  • http/tests/in-app-browser-privacy/app-bound-domain-gets-app-bound-session-expected.txt: Added.
  • http/tests/in-app-browser-privacy/app-bound-domain-gets-app-bound-session.html: Added.
  • http/tests/in-app-browser-privacy/app-bound-domain.html: Removed.
  • http/tests/in-app-browser-privacy/non-app-bound-domain-does-not-get-app-bound-session-expected.txt: Added.
  • http/tests/in-app-browser-privacy/non-app-bound-domain-does-not-get-app-bound-session.html: Added.
  • http/tests/in-app-browser-privacy/switch-session-on-navigation-to-app-bound-domain-expected.txt: Removed.
  • http/tests/in-app-browser-privacy/switch-session-on-navigation-to-app-bound-domain.html: Removed.
9:09 AM Changeset in webkit [260899] by commit-queue@webkit.org
  • 10 edits
    7 adds in trunk

[GPUP][GTK] compile GPUProcess in GTK port
https://bugs.webkit.org/show_bug.cgi?id=208814

Patch by Víctor Manuel Jáquez Leal <vjaquez@igalia.com> on 2020-04-29
Reviewed by Don Olmstead.

Enable GPUProcess compilation in WebKitGTK as an experimental
feature

.:

  • Source/cmake/OptionsGTK.cmake: sort alphabetically WebKit

options for GTK port and enable GPU_PROCESS if experimental
features option is enabled.

Source/WebKit:

No new tests required.

  • GPUProcess/GPUConnectionToWebProcess.cpp: guard

UserMediaCaptureManagerProxy for Cocoa platform only.
(WebKit::GPUConnectionToWebProcess::dispatchMessage): guard
messages from UserMediaCaptureManagerProxy for Cocoa platform,
moving up this guard from video track messages.
(WebKit::GPUConnectionToWebProcess::mediaKeyStorageDirectory):
removed guard for this function of ENCRYPTED_MEDIA leaving only
LEGACY_ENCRYPTED_MEDIA, since it's were it is defined.
(WebKit::GPUConnectionToWebProcess::setOrientationForMediaCapture):
guard the content of this function for Cocoa platform, since it is
calling a UserMediaCaptureManagerProxy object.

  • GPUProcess/GPUProcess.cpp: Replace the included header to match

with the used symbols in file.

  • GPUProcess/gstreamer/GPUProcessGStreamer.cpp: Added.

(WebKit::GPUProcess::initializeProcess): Empty function.
(WebKit::GPUProcess::initializeProcessName): Empty function.
(WebKit::GPUProcess::initializeSandbox): Empty function.

  • GPUProcess/gstreamer/GPUProcessMainGStreamer.cpp: Added.

(WebKit::initializeAuxiliaryProcess<GPUProcess>): New function.
(WebKit::GPUProcessMain): New function.

  • GPUProcess/media/RemoteLegacyCDMFactoryProxy.cpp: changed guard

for this file from ENCRYPTED_MEDIA to LEGACY_ENCRYPTED_MEDIA to
match with its header file.

  • GPUProcess/media/gstreamer/RemoteMediaPlayerProxyGStreamer.cpp: Added.

(WebKit::RemoteMediaPlayerProxy::prepareForPlayback):
New function that raises noImplemented()
(WebKit::RemoteMediaPlayerProxy::mediaPlayerFirstVideoFrameAvailable):
New function that raises noImplemented()
(WebKit::RemoteMediaPlayerProxy::mediaPlayerRenderingModeChanged):
New function that raises noImplemented()
(WebKit::RemoteMediaPlayerProxy::enterFullscreen): New function
that raises noImplemented()
(WebKit::RemoteMediaPlayerProxy::exitFullscreen): New function
that raises noImplemented()

  • PlatformGTK.cmake: add Platform/generic header directory.
  • SourcesGTK.txt: Add the new files and

GPUProcess/media/RemoteAudioDestinationManager.cpp

  • WebProcess/GPU/GPUProcessConnection.cpp: guard

UserMediaCaptureManager for Cocoa platform only.
(WebKit::GPUProcessConnection::dispatchMessage): guard messages
from UserMediaCaptureManager for Cocoa platform, moving up this
guard applied also for video track.

  • WebProcess/GPU/media/RemoteCDM.cpp: include missing header

GPUProcessConnection.h

  • WebProcess/GPU/media/gstreamer/VideoLayerRemoteGStreamer.cpp: Added.

(WebKit::createVideoLayerRemote): New function
that raises noImplemented()

9:06 AM Changeset in webkit [260898] by Alan Bujtas
  • 10 edits in trunk/Source/WebCore

[LFC] FormattingContext::constraintsForInFlow/OutOfFlowContent should take const ContainerBox&
https://bugs.webkit.org/show_bug.cgi?id=211161

Reviewed by Antti Koivisto.

Leaf boxes should not need to compute constraints (as by definition they don't have in/out-of-flow descendants).

  • layout/FormattingContext.cpp:

(WebCore::Layout::FormattingContext::layoutOutOfFlowContent):

  • layout/FormattingContext.h:
  • layout/FormattingContextGeometry.cpp:

(WebCore::Layout::FormattingContext::Geometry::constraintsForOutOfFlowContent):
(WebCore::Layout::FormattingContext::Geometry::constraintsForInFlowContent):

  • layout/FormattingContextQuirks.cpp:

(WebCore::Layout::FormattingContext::Quirks::heightValueOfNearestContainingBlockWithFixedHeight):

  • layout/blockformatting/BlockFormattingContext.cpp:

(WebCore::Layout::BlockFormattingContext::layoutInFlowContent):
(WebCore::Layout::BlockFormattingContext::precomputeVerticalPositionForBoxAndAncestors):

  • layout/blockformatting/BlockFormattingContextQuirks.cpp:

(WebCore::Layout::BlockFormattingContext::Quirks::stretchedInFlowHeight):

  • layout/blockformatting/PrecomputedBlockMarginCollapse.cpp:

(WebCore::Layout::BlockFormattingContext::MarginCollapse::precomputedPositiveNegativeValues const):

  • layout/inlineformatting/InlineFormattingContext.cpp:

(WebCore::Layout::InlineFormattingContext::layoutInFlowContent):

  • layout/tableformatting/TableFormattingContext.cpp:

(WebCore::Layout::TableFormattingContext::layoutCell):

8:25 AM Changeset in webkit [260897] by aakash_jain@apple.com
  • 3 edits in trunk/Tools

[ews] Display flaky test names in build summary when ReRunJavaScriptCoreTests passes
https://bugs.webkit.org/show_bug.cgi?id=210855

Reviewed by Jonathan Bedard.

  • BuildSlaveSupport/ews-build/steps.py:

(ReRunJavaScriptCoreTests.evaluateCommand): Display flaky test names in build summary.

  • BuildSlaveSupport/ews-build/steps_unittest.py: Added unit-tests and removed extra TestReRunJavaScriptCoreTests class.
7:55 AM Changeset in webkit [260896] by jh718.park@samsung.com
  • 2 edits in trunk/Source/WebCore

Unreviewed. Remove no longer used variable and the build warning below.
warning: unused variable ‘view’ [-Wunused-variable]

No new tests, no new behaviour changes.

  • page/EventHandler.cpp:

(WebCore::EventHandler::handleMousePressEvent):

7:49 AM Changeset in webkit [260895] by Devin Rousso
  • 4 edits in trunk/Source/WebInspectorUI

Web Inspector: don't immediately attempt to perform a search whenever the find string changes
https://bugs.webkit.org/show_bug.cgi?id=211164

Reviewed by Timothy Hatcher.

  • UserInterface/Base/Main.js:

(WI.updateFindString):
(WI._populateFind):

  • UserInterface/Views/ContentBrowser.js:

(WI.ContentBrowser.prototype.handlePopulateFindShortcut):
(WI.ContentBrowser.prototype.handleFindStringUpdated): Deleted.
Only update the searchQuery of the WI.FindBanner and performSearch when the find
next/previous keyboard shortcut is activated, not when the find string is populated/updated,
unless the update came from the populate find keyboard shortcut.

  • UserInterface/Views/LogContentView.js:

(WI.LogContentView.prototype.handlePopulateFindShortcut):
(WI.LogContentView.prototype.handleFindNextShortcut):
(WI.LogContentView.prototype.handleFindPreviousShortcut):
(WI.LogContentView.prototype.highlightPreviousSearchMatch):
(WI.LogContentView.prototype.highlightNextSearchMatch):
(WI.LogContentView.prototype.handleFindStringUpdated): Deleted.
Ensure that the logic for performing a search if the searchQuery of the WI.FindBanner
doesn't match the current WI.findString is also performed when in the split console.

4:47 AM Changeset in webkit [260894] by Claudio Saavedra
  • 2 edits in trunk/Source/WebKit

[GTK4] Unreviewed compile-warning fixes

  • UIProcess/API/gtk/WebKitWebViewBase.cpp:

(webkitWebViewBaseSetEnableBackForwardNavigationGesture):
(webkitWebViewBaseWillSwapWebProcess):

4:40 AM Changeset in webkit [260893] by Carlos Garcia Campos
  • 2 edits in trunk/Tools

Unreviewed. Fix GTK4 build after r260891

  • MiniBrowser/gtk/BrowserWindow.c:
4:33 AM Changeset in webkit [260892] by aboya@igalia.com
  • 3 edits in trunk/Source/WebCore

PlatformMediaResourceLoader should be destroyed on the main thread
https://bugs.webkit.org/show_bug.cgi?id=211155

Reviewed by Xabier Rodriguez-Calvar.

PlatformMediaResourceLoader is only safe to use from the main thread.
A tricky detail is this includes its destruction. The same is true for
PlatformMediaResource.

Both classes are ThreadSafeRefCounted<> classes and therefore
WTF::DestructionThread::Main can be used to ensure destruction is run
in the correct thread with no need for additional client code.

  • platform/graphics/PlatformMediaResourceLoader.h:
  • platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:

(WebKitWebSrcPrivate::StreamingMembers::~StreamingMembers):

3:36 AM Changeset in webkit [260891] by Claudio Saavedra
  • 7 edits in trunk/Tools

[GTK] Remove deprecated GTK API calls from MiniBrowser
https://bugs.webkit.org/show_bug.cgi?id=211171

Reviewed by Carlos Garcia Campos.

In preparation to porting MiniBrowser to GTK4, remove
all deprecated API calls. Also get rid of the --geometry
command-line argument and make it a no-op.

  • MiniBrowser/gtk/BrowserDownloadsBar.c:

(browser_downloads_bar_init):
(browser_downloads_bar_new):
(actionButtonClicked):
(browser_download_init):
(downloadFinished):

  • MiniBrowser/gtk/BrowserSearchBar.c:

(doSearch):
(searchEntryMenuIconPressedCallback):
(browser_search_bar_init):

  • MiniBrowser/gtk/BrowserSettingsDialog.c:

(browser_settings_dialog_init):

  • MiniBrowser/gtk/BrowserTab.c:

(createInfoBarQuestionMessage):
(browserTabConstructed):

  • MiniBrowser/gtk/BrowserWindow.c:

(browserWindowHistoryItemSelected):
(browserWindowHistoryItemActivated):
(browserWindowCreateBackForwardMenu):
(browserWindowUpdateNavigationMenu):
(backForwardlistChanged):
(updateUriEntryIcon):
(webViewIsLoadingChanged):
(browserWindowSetupEditorToolbarItem):
(browserWindowSetupEditorToolbar):
(browserWindowSwitchTab):
(browserWindowSetupToolbarItem):
(browser_window_init):
(browserWindowUpdateNavigationActions): Deleted.

  • MiniBrowser/gtk/main.c:

(main):

3:23 AM Changeset in webkit [260890] by commit-queue@webkit.org
  • 20 edits in trunk/Source

Make PolicyChecker an inner class of FrameLoader
https://bugs.webkit.org/show_bug.cgi?id=211138

Patch by Rob Buis <rbuis@igalia.com> on 2020-04-29
Reviewed by Alex Christensen.

Source/WebCore:

PolicyChecker HistoryController an inner class of FrameLoader, this allows us to move some methods
only used by PolicyChecker out of the FrameLoader public API. Because it is not possible to forward declare
an enum class in an inner class, move ShouldContinue out of the PolicyChecker class and rename it
to ShouldContinuePolicyCheck.

  • loader/FrameLoader.cpp:

(WebCore::FrameLoader::loadURL):
(WebCore::FrameLoader::load):
(WebCore::FrameLoader::loadPostRequest):
(WebCore::FrameLoader::continueLoadAfterNewWindowPolicy):

  • loader/FrameLoader.h:
  • loader/FrameLoaderTypes.h:
  • loader/MediaResourceLoader.cpp:

(WebCore::MediaResource::responseReceived):

  • loader/PolicyChecker.cpp:
  • loader/PolicyChecker.h:
  • platform/graphics/PlatformMediaResourceLoader.h:

(WebCore::PlatformMediaResourceClient::responseReceived):

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

(WebCore::PlatformResourceMediaLoader::responseReceived):

  • platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:

(CachedResourceStreamingClient::responseReceived):

  • platform/network/cocoa/WebCoreNSURLSession.mm:

(WebCore::WebCoreNSURLSessionDataTaskClient::responseReceived):
(-[WebCoreNSURLSessionDataTask resource:receivedResponse:completionHandler:]):

Source/WebKit:

Adapt to PolicyChecker::ShouldContinue change.

  • GPUProcess/media/RemoteMediaResource.cpp:

(WebKit::RemoteMediaResource::responseReceived):

  • GPUProcess/media/RemoteMediaResource.h:
  • GPUProcess/media/RemoteMediaResourceManager.cpp:

(WebKit::RemoteMediaResourceManager::responseReceived):

  • GPUProcess/media/RemoteMediaResourceManager.h:
  • GPUProcess/media/RemoteMediaResourceManager.messages.in:
  • Scripts/webkit/messages.py:
  • WebProcess/GPU/media/RemoteMediaResourceProxy.cpp:

(WebKit::RemoteMediaResourceProxy::responseReceived):

  • WebProcess/GPU/media/RemoteMediaResourceProxy.h:
3:06 AM Changeset in webkit [260889] by Adrian Perez de Castro
  • 12 edits in trunk

[GTK] Misplaced right click menu on web page due to deprecated gtk_menu_popup()
https://bugs.webkit.org/show_bug.cgi?id=170553

Source/WebCore:

Reviewed by Carlos Garcia Campos.

  • platform/gtk/GtkVersioning.h: Add replacements for GtkPopover functions which are no longet available in GTK4.

(gtk_popover_menu_new): Added.
(gtk_popover_bind_model): Added.
(gtk_popover_set_relative_to): Added.

Source/WebKit:

Reviewed by Carlos Garcia Campos.

Replace GtkMenuShell with a GtkPopoverMenu for context menus. The former is not available
at all in GTK4, and the later allows for simplifying the positioning code: it is enough
to provide a point in WebKitWebView widget where to place the popup, and GTK takes care
of everything. This removes the custom positioning code (as it is not needed anymore),
which did GdkScreen-relative calculations that GTK4 does not support.

No new tests needed.

  • Shared/glib/WebContextMenuItemGlib.h:
  • UIProcess/API/glib/WebKitWebView.cpp:

(contextMenuDismissed): Change parameter from GtkMenuShell to GtkMenuShell to GtkWidget.
(webkitWebViewPopulateContextMenu): Connect to the GtkPopover::closed signal instead of
GtkMenuShell::deactivate.

  • UIProcess/API/gtk/WebKitWebViewBase.cpp:

(activeContextMenuClosed): Renamed from activeContextMenuUnmapped(), changed parameter
from GtkMenuShell to GtkWidget, and compare with WebContextMenuProxyGtk::gtkWidget().
(activeContextMenuUnmapped): Renamed to activeContextMenuClosed().
(webkitWebViewBaseSetActiveContextMenuProxy): Connect to the GtkPopover::closed signal
instead of GtkMenuShell::deactivate.
(webkitWebViewBaseGetActiveContextMenuProxy):

  • UIProcess/API/gtk/WebKitWebViewBasePrivate.h:
  • UIProcess/API/gtk/WebKitWebViewGtk.cpp:
  • UIProcess/gtk/WebContextMenuProxyGtk.cpp: Arrange to use GtkPopoverMenu instead of

GtkMenuShell.

  • UIProcess/gtk/WebContextMenuProxyGtk.cpp:

(WebKit::WebContextMenuProxyGtk::populate):
(WebKit::WebContextMenuProxyGtk::showContextMenuWithItems): Simplify using
m_context.menuLocation() to obtain the location where to make the context menu popup
next to, which allows removing the ::menuPositionFunction() callback as well.
(WebKit::WebContextMenuProxyGtk::WebContextMenuProxyGtk):
(WebKit::WebContextMenuProxyGtk::~WebContextMenuProxyGtk):

  • UIProcess/gtk/WebContextMenuProxyGtk.h: Remove declarations for ::menuPositionFunction()

and ::m_popupPosition, which are now unneeded.
(WebKit::WebContextMenuProxyGtk::gtkWidget const): Renamed from ::gtkMenu(), and made it
return a GtkWidget.

Tools:

Minor adaptations needed in the API tests to account for the differences between
GtkMenuShell and GtkPopoverMenu.

Reviewed by Carlos Garcia Campos.

  • TestWebKitAPI/Tests/WebKitGtk/TestContextMenu.cpp:

(lookupWidgetsWalkChild): Added.
(lookupWidgets): Added.

2:06 AM Changeset in webkit [260888] by commit-queue@webkit.org
  • 12 edits
    1 delete in trunk/Source

Unreviewed, reverting r260650.
https://bugs.webkit.org/show_bug.cgi?id=211172

It is breaking internal bots (Requested by youenn on #webkit).

Reverted changeset:

"Call STDynamicActivityAttributionPublisher in the WebProcess"
https://bugs.webkit.org/show_bug.cgi?id=210772
https://trac.webkit.org/changeset/260650

1:23 AM Changeset in webkit [260887] by Devin Rousso
  • 6 edits in trunk/Source

Web Inspector: Uncaught Exception: SyntaxError: Unexpected identifier 'E'. Expected either a closing ']' or a ',' following an array element.
https://bugs.webkit.org/show_bug.cgi?id=211163

Reviewed by Joseph Pecoraro.

Source/WebKit:

  • WebProcess/Inspector/WebInspectorUI.cpp:

(WebKit::WebInspectorUI::updateFindString):

  • WebProcess/Inspector/RemoteWebInspectorUI.cpp:

(WebKit::RemoteWebInspectorUI::updateFindString):
Use the newly exposed JSON::Value::escapeString to ensure that the findString will not
throw a JavaScript exception when placed in the InspectorFrontendAPI call.

Source/WTF:

  • wtf/JSONValues.h:
  • wtf/JSONValues.cpp:

(WTF::JSONImpl::appendDoubleQuotedString):
(WTF::JSONImpl::Value::escapeString): Added.
Pull out and expose the logic for escaping strings so it can be used elsewhere.

1:14 AM Changeset in webkit [260886] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore

[GStreamer] Switch to audiointerleave
https://bugs.webkit.org/show_bug.cgi?id=211124

Patch by Philippe Normand <pnormand@igalia.com> on 2020-04-29
Reviewed by Xabier Rodriguez-Calvar.

The audiointerleave element is a drop-in replacement of
interleave. It should behave a bit better in live.

No new tests, existing webaudio tests cover this change.

  • platform/audio/gstreamer/WebKitWebAudioSourceGStreamer.cpp:

(webKitWebAudioSrcConstructed):
(webKitWebAudioSrcChangeState):

12:59 AM Changeset in webkit [260885] by svillar@igalia.com
  • 2 edits in trunk

Add ccls config file to the list of ignored files
https://bugs.webkit.org/show_bug.cgi?id=210426

Reviewed by Tim Horton.

  • .gitignore: ccls can read configuration options from a .ccls file in

the project root directory. Let's just ignore it.

12:57 AM Changeset in webkit [260884] by svillar@igalia.com
  • 14 edits in trunk/Source/WebCore

[WebXR][WPE] Implement XRTest::simulateDeviceConnection()
https://bugs.webkit.org/show_bug.cgi?id=210912

Reviewed by Dean Jackson.

This API gives tests the ability to spin up a simulated XR device which
is an XR device which from the point of view of the WebXR API behaves
like a normal XR device. These simulated XR devices can be controlled by
the associated FakeXRDevice object.

No new tests as this is machinery required to execute tests when
implementing the WebXR API.

  • Modules/webxr/WebXRSystem.cpp:

(WebCore::WebXRSystem::WebXRSystem): Initialize the default inline device.
(WebCore::WebXRSystem::registerSimulatedXRDeviceForTesting): Add a newly
created simulated XR device to the list of available devices. Update
also the active immersive device and current inline device.
(WebCore::WebXRSystem::unregisterSimulatedXRDeviceForTesting): Remove
all simulated devices from the list of immersive XR devices.

  • Modules/webxr/WebXRSystem.h: New DummyInlineDevice which represents

the default inline device which must not provide pose information.

  • Modules/webxr/WebXRView.cpp:

(WebCore::WebXRView::WebXRView): Removed some methods that should be
really part of a fake XRView instance.
(WebCore::WebXRView::setProjectionMatrix): Add implementation.
(WebCore::WebXRView::eye const): Deleted.
(WebCore::WebXRView::projectionMatrix const): Deleted.
(WebCore::WebXRView::transform const): Deleted.

  • Modules/webxr/WebXRView.h:

(WebCore::WebXRView::eye const): Implemented.
(WebCore::WebXRView::projectionMatrix const): Ditto.
(WebCore::WebXRView::transform const): Ditto.
(WebCore::WebXRView::setEye): Ditto.
(WebCore::WebXRView::setTransform): Ditto.

  • Modules/webxr/XRReferenceSpaceType.h: Moved the definitions to PlatformXR.
  • platform/xr/PlatformXR.cpp:

(PlatformXR::Instance::nextDeviceId): New method which returns uniquely
defined ids for XR devices.
(PlatformXR::Device::Device):

  • platform/xr/PlatformXR.h:

(PlatformXR::Device::id const): New method.
(PlatformXR::Device::supports const): Ditto.
(PlatformXR::Device::setSupportedModes): Ditto.
(PlatformXR::Device::setEnabledFeatures): Ditto.
(PlatformXR::Device::operator== const): Ditto.

  • testing/FakeXRViewInit.h: fieldOfView is optional.
  • testing/WebFakeXRDevice.cpp:

(WebCore::FakeXRView::setFieldOfView): Implemented.
(WebCore::WebFakeXRDevice::setViews): Ditto.
(WebCore::WebFakeXRDevice::setViewerOrigin): Ditto.
(WebCore::WebFakeXRDevice::clearViewerOrigin): Ditto.
(WebCore::WebFakeXRDevice::setFloorOrigin): Ditoo.
(WebCore::WebFakeXRDevice::clearFloorOrigin): Ditto.
(WebCore::WebFakeXRDevice::parseRigidTransform): Added.
(WebCore::WebFakeXRDevice::parseView): Ditto.

  • testing/WebFakeXRDevice.h: Defined FakeXRView class which wraps a

XRView adding some associated data as the field of view and viewport.
Also defined the SimulatedXRDevice which is an PlatformXR::Device with
some additional data useful for testing purpouses.

  • testing/WebXRTest.cpp:

(WebCore::WebXRTest::simulateDeviceConnection): Create a new
FakeXRDevice with an associated simulated XR device with the data
provided by a FakeXRDeviceInit.
(WebCore::WebXRTest::disconnectAllDevices): Remove all simulated devices
from the list of immersive devices.

  • testing/WebXRTest.h: Call simulateDeviceConnection with ScriptExecutionContext.
  • testing/WebXRTest.idl: Ditto.
12:36 AM Changeset in webkit [260883] by Diego Pino Garcia
  • 2 edits in trunk/LayoutTests

[GTK] Gardening, update expectations after r260815
https://bugs.webkit.org/show_bug.cgi?id=211168

Unreviewed gardening.

  • platform/gtk/TestExpectations:
12:15 AM Changeset in webkit [260882] by sbarati@apple.com
  • 16 edits
    1 add in trunk/Source

U_STRING_NOT_TERMINATED_WARNING ICU must be handled when using the output buffer as a C string
https://bugs.webkit.org/show_bug.cgi?id=211142
<rdar://problem/62530860>

Reviewed by Darin Adler.

Source/JavaScriptCore:

  • runtime/IntlDateTimeFormat.cpp:

(JSC::defaultTimeZone):
(JSC::canonicalizeTimeZoneName):
(JSC::IntlDateTimeFormat::initializeDateTimeFormat):
(JSC::IntlDateTimeFormat::format):
(JSC::IntlDateTimeFormat::formatToParts):

  • runtime/IntlNumberFormat.cpp:

(JSC::IntlNumberFormat::format):
(JSC::IntlNumberFormat::formatToParts):

  • runtime/IntlObject.cpp:

(JSC::convertICULocaleToBCP47LanguageTag):
(JSC::canonicalizeLanguageTag):

  • runtime/IntlRelativeTimeFormat.cpp:

(JSC::IntlRelativeTimeFormat::formatInternal):
(JSC::IntlRelativeTimeFormat::formatToParts):

  • runtime/StringPrototype.cpp:

(JSC::toLocaleCase):
(JSC::normalize):

Source/WebCore:

  • editing/TextIterator.cpp:

(WebCore::normalizeCharacters):

  • platform/text/LocaleICU.cpp:

(WebCore::LocaleICU::decimalSymbol):
(WebCore::LocaleICU::decimalTextAttribute):
(WebCore::getDateFormatPattern):
(WebCore::LocaleICU::createLabelVector):
(WebCore::getFormatForSkeleton):

  • platform/text/LocaleToScriptMappingICU.cpp:

(WebCore::localeToScriptCodeForFontSelection):

  • platform/text/TextCodecICU.cpp:

(WebCore::TextCodecICU::decode):
(WebCore::TextCodecICU::encode):

Source/WTF:

Most of our uses of ICU require us to produce a buffer of the correct
length. We often test if the first call to ICU API succeeds, and if it
doesn't, we grow to the required buffer size, and try again. However,
there are a few APIs that we use like this, except that they write their
output to a C string instead of a buffer.

In a couple scenarios when we were producing C strings, we were only testing
for the U_BUFFER_OVERFLOW_ERROR, instead of both U_BUFFER_OVERFLOW_ERROR and
U_STRING_NOT_TERMINATED_WARNING. This patch fixes those bugs. It also
introduces two new helper methods for testing error codes returned by ICU.

  • The first is needsToGrowToProduceBuffer, which returns true if we need to

grow the buffer and re-call into ICU to get the result.

  • The second is needsToGrowToProduceCString, which returns true if we need to

grow the buffer and re-call into ICU to produce a valid C string.

I've audited all uses of U_BUFFER_OVERFLOW_ERROR and converted them to use one
of the above helper methods instead.

The issues in our handling of U_STRING_NOT_TERMINATED_WARNING were caught on iOS JSC
tests in JSTests/stress/intl-datetimeformat.js

  • WTF.xcodeproj/project.pbxproj:
  • wtf/CMakeLists.txt:
  • wtf/text/LineBreakIteratorPoolICU.h:

(WTF::LineBreakIteratorPool::makeLocaleWithBreakKeyword):

  • wtf/text/StringView.cpp:

(WTF::normalizedNFC):

  • wtf/unicode/icu/ICUHelpers.h: Added.

(WTF::needsToGrowToProduceCString):
(WTF::needsToGrowToProduceBuffer):

12:09 AM Changeset in webkit [260881] by Noam Rosenthal
  • 4 edits in trunk/Source

Add StringView::isAllSpecialCharacters()
https://bugs.webkit.org/show_bug.cgi?id=211150

Source/WebCore:

Reviewed by Darin Adler.

Uses new StringView::isAllSpecialCharacters() instead of creating a StringImpl.

No new tests.

  • rendering/TextPainter.cpp:

(WebCore::TextPainter::paintTextOrEmphasisMarks):

Source/WTF:

This enables checking for whitespace-only strings without allocating a StringImpl wrapper.

Reviewed by Darin Adler.

  • wtf/text/StringView.h:

(WTF::isSpecialCharacter const):

Note: See TracTimeline for information about the timeline view.