WebKit-https.git
14 months agoMangled WHLSL names don't need to allocate Strings
weinig@apple.com [Mon, 5 Aug 2019 03:26:33 +0000 (03:26 +0000)]
Mangled WHLSL names don't need to allocate Strings
https://bugs.webkit.org/show_bug.cgi?id=200429

Reviewed by Saam Barati.

To avoid allocating strings for each mangled name used to transform WHLSL to Metal, which we'd
like to avoid since it is both unnecessarily expensive in time and space, we can instead just
store the unique integer identifier that was being used to construct the String.

Since the existing mangled names were all of the form "prefix" + unsigned integer value (where
prefix could be "type", "enumerationMember", "structureElement", "variable" or "function") we
strongly type the integer by storing it in a struct (MangledVariableName, MangledTypeName, etc.)
When the full name is actually needed, StringTypeAdapter's specialized for the structs are
used to write directly into the preallocated buffers of StringBuilders or makeString().

* Modules/webgpu/WHLSL/Metal/WHLSLMangledNames.h: Added.
(WebCore::WHLSL::Metal::MangledVariableName):
(WebCore::WHLSL::Metal::MangledTypeName):
(WebCore::WHLSL::Metal::MangledStructureElementName):
(WebCore::WHLSL::Metal::MangledEnumerationMemberName):
(WebCore::WHLSL::Metal::MangledFunctionName):
Adds structs for each type of mangled name and StringTypeAdapter specializations for
each to allow their use in StringBuilder.flexibleAppend() or makeString().

Additionally, a Variant, MangledOrNativeTypeName, of MangledTypeName and String is
declared to allow for the few cases where a native type (e.g. float4) is needed. The
StringTypeAdapter for MangledOrNativeTypeName could be generalized for any Variant
in the future, but I left it non-general for now, as it is non-obvious if one would
want to store Variant<Types...>, and have each member function construct a temporary
StringTypeAdapter, or store a Variant<StringTypeAdapter<Types>...> and perform conversion
in the construction.

* Modules/webgpu/WHLSL/Metal/WHLSLEntryPointScaffolding.cpp:
(WebCore::WHLSL::Metal::EntryPointScaffolding::EntryPointScaffolding):
(WebCore::WHLSL::Metal::internalTypeForSemantic):
(WebCore::WHLSL::Metal::EntryPointScaffolding::builtInsSignature):
(WebCore::WHLSL::Metal::EntryPointScaffolding::mangledInputPath):
(WebCore::WHLSL::Metal::VertexEntryPointScaffolding::VertexEntryPointScaffolding):
(WebCore::WHLSL::Metal::VertexEntryPointScaffolding::signature):
(WebCore::WHLSL::Metal::VertexEntryPointScaffolding::pack):
(WebCore::WHLSL::Metal::FragmentEntryPointScaffolding::FragmentEntryPointScaffolding):
(WebCore::WHLSL::Metal::FragmentEntryPointScaffolding::signature):
(WebCore::WHLSL::Metal::FragmentEntryPointScaffolding::pack):
(WebCore::WHLSL::Metal::ComputeEntryPointScaffolding::ComputeEntryPointScaffolding):
(WebCore::WHLSL::Metal::ComputeEntryPointScaffolding::signature):
(WebCore::WHLSL::Metal::ComputeEntryPointScaffolding::pack):
* Modules/webgpu/WHLSL/Metal/WHLSLEntryPointScaffolding.h:
(WebCore::WHLSL::Metal::EntryPointScaffolding::parameterVariables):
* Modules/webgpu/WHLSL/Metal/WHLSLFunctionWriter.cpp:
(WebCore::WHLSL::Metal::FunctionDeclarationWriter::FunctionDeclarationWriter):
(WebCore::WHLSL::Metal::FunctionDeclarationWriter::visit):
(WebCore::WHLSL::Metal::FunctionDefinitionWriter::FunctionDefinitionWriter):
(WebCore::WHLSL::Metal::FunctionDefinitionWriter::generateNextVariableName):
(WebCore::WHLSL::Metal::FunctionDefinitionWriter::appendRightValueWithNullability):
(WebCore::WHLSL::Metal::FunctionDefinitionWriter::appendRightValue):
(WebCore::WHLSL::Metal::FunctionDefinitionWriter::appendLeftValue):
(WebCore::WHLSL::Metal::FunctionDefinitionWriter::takeLastValue):
(WebCore::WHLSL::Metal::FunctionDefinitionWriter::takeLastValueAndNullability):
(WebCore::WHLSL::Metal::FunctionDefinitionWriter::takeLastLeftValue):
(WebCore::WHLSL::Metal::FunctionDefinitionWriter::visit):
(WebCore::WHLSL::Metal::FunctionDefinitionWriter::emitLoop):
(WebCore::WHLSL::Metal::RenderFunctionDefinitionWriter::RenderFunctionDefinitionWriter):
(WebCore::WHLSL::Metal::RenderFunctionDefinitionWriter::createEntryPointScaffolding):
(WebCore::WHLSL::Metal::ComputeFunctionDefinitionWriter::ComputeFunctionDefinitionWriter):
(WebCore::WHLSL::Metal::ComputeFunctionDefinitionWriter::createEntryPointScaffolding):
(WebCore::WHLSL::Metal::sharedMetalFunctions):
* Modules/webgpu/WHLSL/Metal/WHLSLFunctionWriter.h:
* Modules/webgpu/WHLSL/Metal/WHLSLMetalCodeGenerator.h:
* Modules/webgpu/WHLSL/Metal/WHLSLNativeFunctionWriter.cpp:
(WebCore::WHLSL::Metal::writeNativeFunction):
* Modules/webgpu/WHLSL/Metal/WHLSLNativeFunctionWriter.h:
* Modules/webgpu/WHLSL/Metal/WHLSLTypeNamer.cpp:
(WebCore::WHLSL::Metal::BaseTypeNameNode::BaseTypeNameNode):
(WebCore::WHLSL::Metal::BaseTypeNameNode::mangledName const):
(WebCore::WHLSL::Metal::ArrayTypeNameNode::ArrayTypeNameNode):
(WebCore::WHLSL::Metal::ArrayReferenceTypeNameNode::ArrayReferenceTypeNameNode):
(WebCore::WHLSL::Metal::PointerTypeNameNode::PointerTypeNameNode):
(WebCore::WHLSL::Metal::ReferenceTypeNameNode::ReferenceTypeNameNode):
(WebCore::WHLSL::Metal::MetalTypeDeclarationWriter::MetalTypeDeclarationWriter):
(WebCore::WHLSL::Metal::TypeNamer::metalTypeDeclarations):
(WebCore::WHLSL::Metal::TypeNamer::emitNamedTypeDefinition):
(WebCore::WHLSL::Metal::TypeNamer::mangledNameForType):
(WebCore::WHLSL::Metal::TypeNamer::mangledNameForEnumerationMember):
(WebCore::WHLSL::Metal::TypeNamer::mangledNameForStructureElement):
* Modules/webgpu/WHLSL/Metal/WHLSLTypeNamer.h:
(WebCore::WHLSL::Metal::TypeNamer::generateNextTypeName):
(WebCore::WHLSL::Metal::TypeNamer::generateNextStructureElementName):
(WebCore::WHLSL::Metal::TypeNamer::generateNextEnumerationMemberName):
* Modules/webgpu/WHLSL/WHLSLPrepare.h:
Replace uses of String with the appropriate mangled name type.

* WebCore.xcodeproj/project.pbxproj:
Add WHLSLMangledNames.h

* platform/graphics/gpu/cocoa/GPUComputePipelineMetal.mm:
(WebCore::trySetFunctions):
* platform/graphics/gpu/cocoa/GPURenderPipelineMetal.mm:
(WebCore::trySetFunctions):
Convert the mangled names to Strings for passing to Metal API. NOTE: We could avoid having the
toString() member function on MangledFunctionName if we allowed makeString() to take a single
argument.

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

14 months agoPing loads should not prevent page caching
cdumez@apple.com [Sun, 4 Aug 2019 18:32:44 +0000 (18:32 +0000)]
Ping loads should not prevent page caching
https://bugs.webkit.org/show_bug.cgi?id=200418
<rdar://problem/53901632>

Reviewed by Darin Adler.

Source/WebCore:

We normally prevent page caching if there were any pending subresource loads when navigating,
to avoid caching partial / broken content. However, this should not apply to Ping / Beacon
loads since those do not impact page rendering and can outlive the page.

Tests: http/tests/navigation/page-cache-pending-ping-load-cross-origin.html
       http/tests/navigation/page-cache-pending-ping-load-same-origin.html

* history/PageCache.cpp:
(WebCore::PageCache::addIfCacheable):
After we've fired the 'pagehide' event in each frame, stop all the loads again. This is needed
since pages are allowed to start ping / beacon loads in their 'pagehide' handlers. If we do not
stop those loads, then the next call to canCachePage() would fail because the DocumentLoader is
still loading. Note that we're not actually preventing these ping loads from hitting the server
since we never cancel page loads and those can outlive their page.

* loader/DocumentLoader.cpp:
(WebCore::shouldPendingCachedResourceLoadPreventPageCache):
(WebCore::areAllLoadersPageCacheAcceptable):
Make sure that Ping / Beacon / Prefetches / Icon loads do not prevent page caching.

(WebCore::DocumentLoader::addSubresourceLoader):
Tweak assertion that was incorrect since we actually allow ping / beacon loads when the
document is about to enter PageCache (while firing pagehide event).

Tools:

Add TestOption to enable PageCache at UIProcess-level so that we can test
page caching when navigating cross-origin with PSON enabled.

* WebKitTestRunner/TestController.cpp:
(WTR::TestController::resetPreferencesToConsistentValues):
(WTR::updateTestOptionsFromTestHeader):
* WebKitTestRunner/TestOptions.h:
(WTR::TestOptions::hasSameInitializationOptions const):

LayoutTests:

Add layout test coverage.

* http/tests/navigation/page-cache-pending-ping-load-cross-origin-expected.txt: Added.
* http/tests/navigation/page-cache-pending-ping-load-cross-origin.html: Added.
* http/tests/navigation/page-cache-pending-ping-load-same-origin-expected.txt: Added.
* http/tests/navigation/page-cache-pending-ping-load-same-origin.html: Added.

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

14 months agoRemove unused lambda capture in MemoryPressureMonitor
annulen@yandex.ru [Sun, 4 Aug 2019 18:28:45 +0000 (18:28 +0000)]
Remove unused lambda capture in MemoryPressureMonitor
https://bugs.webkit.org/show_bug.cgi?id=200420

Reviewed by Darin Adler.

* UIProcess/linux/MemoryPressureMonitor.cpp:
(WebKit::MemoryPressureMonitor::start):

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

14 months ago[LFC][TFC] Create formatting context/state.
zalan@apple.com [Sun, 4 Aug 2019 13:59:31 +0000 (13:59 +0000)]
[LFC][TFC] Create formatting context/state.
https://bugs.webkit.org/show_bug.cgi?id=200428
<rdar://problem/53913625>

Reviewed by Antti Koivisto.

* layout/LayoutState.cpp:
(WebCore::Layout::LayoutState::createFormattingStateForFormattingRootIfNeeded):
(WebCore::Layout::LayoutState::createFormattingContext):

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

14 months ago[LFC] Cleanup preferred width computation
zalan@apple.com [Sun, 4 Aug 2019 10:16:06 +0000 (10:16 +0000)]
[LFC] Cleanup preferred width computation
https://bugs.webkit.org/show_bug.cgi?id=200426
<rdar://problem/53912607>

Reviewed by Antti Koivisto.

The intrinsic width for a formatting root box has 2 sets of values now. One set(min/max) is stored in the established formatting context's state
while the other is in the formatting context's state where the box lives.

<div style="position: absolute"><div style="float: left; border: 1px solid green">foobar</div></div>

The float box participates in the formatting context established by the absolutely position box, but it also establishes an inline formatting context.
The min/max width pair in the established context is the width of the "foobar" (same value for min/max). This set is stored in the inline formatting state.
However the float box has horizontal border so the "final" min/max width pair is expanded by this border value and stored in the formatting state where
the box lives (which is different from the one it establishes).

This and the "remove the formatting context type classes from the tree" changes open up interesting optimization opportunities.
Here is a very simple case:
<div style="display: inline-block; width: auto;">
  <div style="float: left">some text</div>
  <div style="float: left">some super long .... text</div>
  <div></div>
</div>
In order to lay out this content properly, we
1. Compute the min/max width of the first float (expensive text measuring)
2. Compute the min/max width of the second float (some more expensive text measuring)
3. Compute the min/max width of the inline-block (that is pretty much the 2 float's min/max)
4. Lay out the 2 floats, the empty div and the inline-block using these min/max width pairs.

Now if the inline-block box's display value is changed to "block" and the positioning is to absolute (style="display: box; position: absolute;")
we currently(on trunk) tear down the render tree, build a new one and run all the steps again from #1 to #4.

In LFC, we start with the following layout tree
<container> -> block formatting context
  <container> -> inline formatting context
    <anonymous inline box>
  <container> -> inline formatting context
    <anonymous inline box>
  <container> -> inline formatting context
and when the style change happens, we don't need to tear down the tree at all. Not only that, but since every formatting contexts stay the same
we can just reuse their states and actually skip all the steps (even the positioning since the absolutely positioned container has static top/bottom/left/right).

Surprisingly the final layout produces the exact same "display boxes" as the original layout.

* layout/FormattingContext.h:
(WebCore::Layout::FormattingContext::IntrinsicWidthConstraints::expand):
* layout/FormattingContextGeometry.cpp:
(WebCore::Layout::FormattingContext::Geometry::shrinkToFitWidth):
* layout/FormattingState.h:
(WebCore::Layout::FormattingState::setIntrinsicWidthConstraints):
(WebCore::Layout::FormattingState::intrinsicWidthConstraints const):
(WebCore::Layout::FormattingState::setIntrinsicWidthConstraintsForBox):
(WebCore::Layout::FormattingState::clearIntrinsicWidthConstraints):
(WebCore::Layout::FormattingState::intrinsicWidthConstraintsForBox const):
* layout/blockformatting/BlockFormattingContext.cpp:
(WebCore::Layout::BlockFormattingContext::computedIntrinsicWidthConstraints const):
(WebCore::Layout::BlockFormattingContext::computeIntrinsicWidthConstraints const): Deleted.
* layout/blockformatting/BlockFormattingContext.h:
* layout/blockformatting/BlockFormattingContextGeometry.cpp:
(WebCore::Layout::BlockFormattingContext::Geometry::intrinsicWidthConstraints):
(WebCore::Layout::BlockFormattingContext::Geometry::intrinsicWidthConstraintsNeedChildrenWidth): Deleted.
* layout/displaytree/DisplayBox.h:
(WebCore::Display::Box::horizontalMarginBorderAndPadding const):
* layout/inlineformatting/InlineFormattingContext.cpp:
(WebCore::Layout::nextInPreOrder):
(WebCore::Layout::InlineFormattingContext::computedIntrinsicWidthConstraints const):
(WebCore::Layout::InlineFormattingContext::computeIntrinsicWidthForFormattingRoot const):
(WebCore::Layout::InlineFormattingContext::computeIntrinsicWidthConstraints const): Deleted.
(WebCore::Layout::InlineFormattingContext::computeIntrinsicWidthForFloatBox const): Deleted.
(WebCore::Layout::InlineFormattingContext::computeIntrinsicWidthForInlineBlock const): Deleted.
* layout/inlineformatting/InlineFormattingContext.h:
* layout/tableformatting/TableFormattingContext.cpp:
(WebCore::Layout::TableFormattingContext::computedIntrinsicWidthConstraints const):
* layout/tableformatting/TableFormattingContext.h:

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

14 months agoWeb Inspector: Elements: Styles: move psuedo-selector rules before inherited rules
drousso@apple.com [Sat, 3 Aug 2019 23:14:15 +0000 (23:14 +0000)]
Web Inspector: Elements: Styles: move psuedo-selector rules before inherited rules
https://bugs.webkit.org/show_bug.cgi?id=199950

Reviewed by Joseph Pecoraro.

Since pseudo-selector rules (usually) affect the selected element, or are related to its
content, it's more useful to have them near that element's rules instead of after all of
it's inherited rules.

* UserInterface/Views/SpreadsheetRulesStyleDetailsPanel.js:
(WI.SpreadsheetRulesStyleDetailsPanel.prototype.layout):

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

14 months agoFix compilation with disabled WebGL
annulen@yandex.ru [Sat, 3 Aug 2019 20:32:57 +0000 (20:32 +0000)]
Fix compilation with disabled WebGL
https://bugs.webkit.org/show_bug.cgi?id=200421

Reviewed by Wenson Hsieh.

After r247452 webGLStateTracker is guarded with #if ENABLE(WEBGL)

* WebProcess/WebPage/WebPage.cpp:
(WebKit::m_textAutoSizingAdjustmentTimer):

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

14 months agoWeb Inspector: Elements: Styles: add icons for various CSS rule types
drousso@apple.com [Sat, 3 Aug 2019 19:36:32 +0000 (19:36 +0000)]
Web Inspector: Elements: Styles: add icons for various CSS rule types
https://bugs.webkit.org/show_bug.cgi?id=199946

Reviewed by Joseph Pecoraro.

Source/WebInspectorUI:

* UserInterface/Controllers/CSSManager.js:
(WI.CSSManager.displayNameForPseudoId):
Add hardcoded pseudo-selector identifiers for older backends.

* UserInterface/Models/CSSSelector.js:
(WI.CSSSelector.prototype.isPseudoSelector): Added.
(WI.CSSSelector.prototype.isPseudoElementSelector): Deleted.
There are more types of pseudo-selectors than just `:{before|after}`.

* UserInterface/Models/CSSStyleDeclaration.js:
(WI.CSSStyleDeclaration.prototype.generateCSSRuleString): Added.

* UserInterface/Views/SpreadsheetRulesStyleDetailsPanel.js:
(WI.SpreadsheetRulesStyleDetailsPanel.prototype.spreadsheetCSSStyleDeclarationSectionAddNewRule): Added.
(WI.SpreadsheetRulesStyleDetailsPanel.prototype.layout):
Provide a delegate method for adding a new rule, so the `WI.SpreadsheetRulesStyleDetailsPanel`
can know what selector to focus once the new rule gets added.

* UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.js:
(WI.SpreadsheetCSSStyleDeclarationSection.prototype.initialLayout):
(WI.SpreadsheetCSSStyleDeclarationSection.prototype._renderSelector):
(WI.SpreadsheetCSSStyleDeclarationSection.prototype._populateIconElementContextMenu): Added.
* UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.css:
(.spreadsheet-css-declaration .header.editing-selector .selector): Added.
(.spreadsheet-css-declaration .selector > .icon): Added.
(.spreadsheet-css-declaration .selector > .icon + *): Added.
(.spreadsheet-css-declaration .selector.style-attribute > span): Added.
When "mousedown" (or "contextmenu") on the icon, show a context menu with helpful actions:
 - Copy Rule
 - {Disable|Enable} Rule
 - Duplicate Selector
 - Add :{active|focus|hover|visited} Rule
 - Create ::{before|after} Rule
 - Reveal in {Resources Tab|Sources Tab|Stylesheet}
Drive-by: add an extra 0.5px of initial margin before the Style Attribute selector (which is
sans-serif) so it properly aligns with the other selectors (which are monospaced).

* UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.js:
(WI.SpreadsheetCSSStyleDeclarationEditor.prototype.layout):
* UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.css:
(.spreadsheet-style-declaration-editor:empty): Added.
(.spreadsheet-style-declaration-editor.no-properties): Deleted.
Add some extra space when there's no inline style so it looks a bit less cramped.

* UserInterface/Main.html:
* UserInterface/Views/StyleRuleIcons.css: Added.
(.author-style-rule-icon .icon):
(.author-style-rule-icon.pseudo-selector .icon):
(.user-style-rule-icon .icon):
(.user-style-rule-icon.pseudo-selector .icon):
(.user-agent-style-rule-icon .icon):
(.user-agent-style-rule-icon.pseudo-selector .icon):
(.inspector-style-rule-icon .icon):
(.inspector-style-rule-icon.pseudo-selector .icon):
(.inherited-style-rule-icon .icon):
(.inherited-element-style-rule-icon .icon):
* UserInterface/Images/StyleRule.svg: Added.
* UserInterface/Images/StyleRuleInheritedElement.svg: Added.
* UserInterface/Images/StyleRulePseudo.svg: Added.
Add generic icon classes for style rule icons.

* UserInterface/Base/Setting.js:
* UserInterface/Views/SettingsTabContentView.js:
(WI.SettingsTabContentView.prototype._createExperimentalSettingsView):
Add experimental setting.

* Localizations/en.lproj/localizedStrings.js:

LayoutTests:

* inspector/css/generateCSSRuleString.html: Added.
* inspector/css/generateCSSRuleString-expected.txt: Added.

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

14 months agoWeb Inspector: DOM: add a special breakpoint for "All Events"
drousso@apple.com [Sat, 3 Aug 2019 19:00:01 +0000 (19:00 +0000)]
Web Inspector: DOM: add a special breakpoint for "All Events"
https://bugs.webkit.org/show_bug.cgi?id=200285

Reviewed by Joseph Pecoraro.

Source/JavaScriptCore:

Similar to the existing "All Requests" breakpoint, there should be a way to set a breakpoint
that would pause for any DOM event, regardless of the event's name. This is useful for
situations where the event name isn't known, or where one simply wants to pause on the next
entry to the event loop.

Along these lines, make the "requestAnimationFrame", "setTimeout", and "setInterval"
event breakpoints into special breakpoints that can be added/removed via the create
breakpoint context menu. This simplifies the process for setting these breakpoints, and also
makes them more discoverable (most people wouldn't consider them to be "events").

* inspector/protocol/Debugger.json:
 - Rename the `EventListener` pause reason to `Listener`.
 - Split the `Timer` pause reason into `Interval` and `Timeout`.

* inspector/protocol/DOMDebugger.json:
 - Split the `timer` type into `interval` and `timeout`.
 - Make `eventName` optional for `addEventBreakpoint`/`removeEventBreakpoint`. When omitted,
   the corresponding breakpoint that is added/removed is treated as a global breakpoint that
   applies to all events of that type (e.g. a global `listener` breakpoint would pause for
   any event that is fired).

Source/WebCore:

Similar to the existing "All Requests" breakpoint, there should be a way to set a breakpoint
that would pause for any DOM event, regardless of the event's name. This is useful for
situations where the event name isn't known, or where one simply want's to pause on the next
entry to the event loop.

Along these lines, make the "requestAnimationFrame", "setTimeout", and "setInterval"
event breakpoints into special breakpoints that can be added/removed via the create
breakpoint context menu. This simplifies the process for setting these breakpoints, and also
makes them more discoverable (most people wouldn't consider them to be "events").

Tests: inspector/dom/breakpoint-for-event-listener.html
       inspector/dom-debugger/event-animation-frame-breakpoints.html
       inspector/dom-debugger/event-breakpoint-with-navigation.html
       inspector/dom-debugger/event-interval-breakpoints.html
       inspector/dom-debugger/event-listener-breakpoints.html
       inspector/dom-debugger/event-timeout-breakpoints.html

* inspector/agents/InspectorDOMDebuggerAgent.h:
* inspector/agents/InspectorDOMDebuggerAgent.cpp:
(WebCore::InspectorDOMDebuggerAgent::disable):
(WebCore::InspectorDOMDebuggerAgent::frameDocumentUpdated):
(WebCore::InspectorDOMDebuggerAgent::setEventBreakpoint):
(WebCore::InspectorDOMDebuggerAgent::removeEventBreakpoint):
(WebCore::InspectorDOMDebuggerAgent::willHandleEvent):
(WebCore::InspectorDOMDebuggerAgent::willFireTimer):
(WebCore::InspectorDOMDebuggerAgent::willFireAnimationFrame):
(WebCore::InspectorDOMDebuggerAgent::discardBindings): Deleted.
Make `eventName` optional for `addEventBreakpoint`/`removeEventBreakpoint`. When omitted,
the corresponding breakpoint that is added/removed is treated as a global breakpoint that
applies to all events of that type (e.g. a global `listener` breakpoint would pause for any
event that is fired).

Source/WebInspectorUI:

Similar to the existing "All Requests" breakpoint, there should be a way to set a breakpoint
that would pause for any DOM event, regardless of the event's name. This is useful for
situations where the event name isn't known, or where one simply want's to pause on the next
entry to the event loop.

Along these lines, make the "requestAnimationFrame", "setTimeout", and "setInterval"
event breakpoints into special breakpoints that can be added/removed via the create
breakpoint context menu. This simplifies the process for setting these breakpoints, and also
makes them more discoverable (most people wouldn't consider them to be "events").

* UserInterface/Models/EventBreakpoint.js:
(WI.EventBreakpoint):
(WI.EventBreakpoint.deserialize):
(WI.EventBreakpoint.prototype.saveIdentityToCookie):
(WI.EventBreakpoint.prototype.toJSON):

* UserInterface/Controllers/DebuggerManager.js:
(WI.DebuggerManager.prototype._pauseReasonFromPayload):

* UserInterface/Controllers/DOMDebuggerManager.js:
(WI.DOMDebuggerManager):
(WI.DOMDebuggerManager.prototype.initializeTarget):
(WI.DOMDebuggerManager.supportsDOMBreakpoints): Added.
(WI.DOMDebuggerManager.supportsEventBreakpoints):
(WI.DOMDebuggerManager.supportsEventListenerBreakpoints): Added.
(WI.DOMDebuggerManager.supportsURLBreakpoints):
(WI.DOMDebuggerManager.supportsXHRBreakpoints): Added.
(WI.DOMDebuggerManager.supportsAllListenersBreakpoint): Added.
(WI.DOMDebuggerManager.prototype.get allAnimationFramesBreakpoint): Added.
(WI.DOMDebuggerManager.prototype.get allIntervalsBreakpoint): Added.
(WI.DOMDebuggerManager.prototype.get allListenersBreakpoint): Added.
(WI.DOMDebuggerManager.prototype.get allTimeoutsBreakpoint): Added.
(WI.DOMDebuggerManager.prototype.get listenerBreakpoints): Added.
(WI.DOMDebuggerManager.prototype.isBreakpointSpecial):
(WI.DOMDebuggerManager.prototype.listenerBreakpointForEventName): Added.
(WI.DOMDebuggerManager.prototype.addEventBreakpoint):
(WI.DOMDebuggerManager.prototype.removeEventBreakpoint):
(WI.DOMDebuggerManager.prototype.addURLBreakpoint):
(WI.DOMDebuggerManager.prototype._resolveDOMBreakpoint):
(WI.DOMDebuggerManager.prototype._updateDOMBreakpoint):
(WI.DOMDebuggerManager.prototype._updateEventBreakpoint):
(WI.DOMDebuggerManager.prototype._updateURLBreakpoint):
(WI.DOMDebuggerManager.prototype._handleDOMBreakpointDisabledStateChanged):
(WI.DOMDebuggerManager.prototype._handleEventBreakpointDisabledStateChanged):
(WI.DOMDebuggerManager.prototype._handleURLBreakpointDisabledStateChanged):
(WI.DOMDebuggerManager.prototype.get eventBreakpoints): Deleted.
(WI.DOMDebuggerManager.prototype.eventBreakpointForTypeAndEventName): Deleted.
Add additional target compatibility checks.

* UserInterface/Views/EventBreakpointPopover.js:
(WI.EventBreakpointPopover.prototype.show):
(WI.EventBreakpointPopover.prototype.dismiss):
(WI.EventBreakpointPopover.prototype._handleTypeSelectChange): Deleted.
* UserInterface/Views/EventBreakpointPopover.css:
(.popover .event-breakpoint-content > input): Added.
(.popover .event-breakpoint-content > input::placeholder): Added.
(.popover .event-breakpoint-content > .event-type): Deleted.
(.popover .event-breakpoint-content > .event-type > input): Deleted.
(.popover .event-breakpoint-content > .event-type > input::placeholder): Deleted.

* UserInterface/Views/EventBreakpointTreeElement.css:
(.breakpoint.event.breakpoint-for-interval:not(.breakpoint-paused-icon) .icon): Added.
(.breakpoint.event.breakpoint-for-timeout:not(.breakpoint-paused-icon) .icon): Added.
(.breakpoint.event.breakpoint-for-timer:not(.breakpoint-paused-icon) .icon): Deleted.

* UserInterface/Views/DebuggerSidebarPanel.js:
(WI.DebuggerSidebarPanel):
(WI.DebuggerSidebarPanel.prototype.saveStateToCookie):
(WI.DebuggerSidebarPanel.prototype.restoreStateFromCookie):
(WI.DebuggerSidebarPanel.prototype._addBreakpoint):
(WI.DebuggerSidebarPanel.prototype._addTreeElement):
(WI.DebuggerSidebarPanel.prototype._updatePauseReasonSection):
(WI.DebuggerSidebarPanel.prototype._handleBreakpointElementAddedOrRemoved):
(WI.DebuggerSidebarPanel.prototype._populateCreateBreakpointContextMenu.addToggleForSpecialEventBreakpoint): Added.
(WI.DebuggerSidebarPanel.prototype._populateCreateBreakpointContextMenu):
* UserInterface/Views/SourcesNavigationSidebarPanel.js:
(WI.SourcesNavigationSidebarPanel):
(WI.SourcesNavigationSidebarPanel.prototype._insertDebuggerTreeElement):
(WI.SourcesNavigationSidebarPanel.prototype._addBreakpoint):
(WI.SourcesNavigationSidebarPanel.prototype._updatePauseReasonSection):
(WI.SourcesNavigationSidebarPanel.prototype._handleBreakpointElementAddedOrRemoved):
(WI.SourcesNavigationSidebarPanel.prototype._populateCreateBreakpointContextMenu.addToggleForSpecialEventBreakpoint): Added.
(WI.SourcesNavigationSidebarPanel.prototype._populateCreateBreakpointContextMenu):
Add create breakpoint context menu items (also sort the breakpoints in this order):
 - "All Animation Frames"  =>  [A] All Animation Frames
 - "All Timeouts"          =>  [T] All Timeouts
 - "All Intervals"         =>  [I] All Intervals
 - "All Events"            =>  [E] All Events

* UserInterface/Controllers/JavaScriptRuntimeCompletionProvider.js:
(WI.JavaScriptRuntimeCompletionProvider.completionControllerCompletionsNeeded.receivedPropertyNames):

* UserInterface/Base/Setting.js:
* UserInterface/Images/EventBreakpointInterval.svg: Added.
* UserInterface/Images/EventBreakpointTimeout.svg: Renamed from Source/WebInspectorUI/UserInterface/Images/EventBreakpointTimer.svg.
* Localizations/en.lproj/localizedStrings.js:

LayoutTests:

* inspector/dom/breakpoint-for-event-listener.html:
* inspector/dom/breakpoint-for-event-listener-expected.txt:

* inspector/dom-debugger/event-animation-frame-breakpoints.html:
* inspector/dom-debugger/event-animation-frame-breakpoints-expected.txt:
* inspector/dom-debugger/event-breakpoint-with-navigation.html:
* inspector/dom-debugger/event-breakpoint-with-navigation-expected.txt:
* inspector/dom-debugger/event-interval-breakpoints.html: Added.
* inspector/dom-debugger/event-interval-breakpoints-expected.txt: Added.
* inspector/dom-debugger/event-listener-breakpoints.html:
* inspector/dom-debugger/event-listener-breakpoints-expected.txt:
* inspector/dom-debugger/event-timeout-breakpoints.html: Added.
* inspector/dom-debugger/event-timeout-breakpoints-expected.txt: Added.

* inspector/dom-debugger/resources/event-breakpoint-utilities.js:
(TestPage.registerInitializer.InspectorTest.EventBreakpoint.teardown):
(TestPage.registerInitializer.InspectorTest.EventBreakpoint.failOnPause):
(TestPage.registerInitializer.InspectorTest.EventBreakpoint.createBreakpoint): Added.
(TestPage.registerInitializer.InspectorTest.EventBreakpoint.addBreakpoint):
(TestPage.registerInitializer.InspectorTest.EventBreakpoint.removeBreakpoint):
(TestPage.registerInitializer.InspectorTest.EventBreakpoint.disableBreakpoint):

* inspector/dom-debugger/event-timer-breakpoints.html: Removed.
* inspector/dom-debugger/event-timer-breakpoints-expected.txt: Removed.

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

14 months ago[LFC] Remove formatting context type leaf classes
zalan@apple.com [Sat, 3 Aug 2019 16:09:47 +0000 (16:09 +0000)]
[LFC] Remove formatting context type leaf classes
https://bugs.webkit.org/show_bug.cgi?id=200224
<rdar://problem/53661907>

Reviewed by Antti Koivisto.

Let's keep the layout tree formatting context type independent.

* Sources.txt:
* WebCore.xcodeproj/project.pbxproj:
* layout/inlineformatting/InlineFormattingContext.cpp:
(WebCore::Layout::InlineFormattingContext::layout const):
(WebCore::Layout::InlineFormattingContext::computeIntrinsicWidthConstraints const):
(WebCore::Layout::InlineFormattingContext::initializeMarginBorderAndPaddingForGenericInlineBox const):
(WebCore::Layout::InlineFormattingContext::collectInlineContent const):
* layout/inlineformatting/InlineFormattingContext.h:
* layout/inlineformatting/InlineFormattingContextLineLayout.cpp:
(WebCore::Layout::inlineItemWidth):
(WebCore::Layout::LineLayout::placeInlineItem):
* layout/inlineformatting/InlineItem.h:
* layout/inlineformatting/InlineTextItem.cpp:
(WebCore::Layout::InlineTextItem::createAndAppendTextItems):
(WebCore::Layout::InlineTextItem::InlineTextItem):
(WebCore::Layout::InlineTextItem::split const):
* layout/inlineformatting/InlineTextItem.h:
(WebCore::Layout::InlineTextItem::inlineBox const): Deleted.
* layout/inlineformatting/text/TextUtil.cpp:
(WebCore::Layout::TextUtil::width):
(WebCore::Layout::TextUtil::split):
* layout/inlineformatting/text/TextUtil.h:
* layout/layouttree/LayoutBox.cpp:
(WebCore::Layout::Box::Box):
(WebCore::Layout::Box::~Box):
(WebCore::Layout::Box::formattingContextRoot const):
(WebCore::Layout::Box::setTextContent):
(WebCore::Layout::Box::hasTextContent const):
(WebCore::Layout::Box::textContent const):
(WebCore::Layout::Box::replaced const):
(WebCore::Layout::Box::replaced):
(WebCore::Layout::Box::rareDataMap):
(WebCore::Layout::Box::rareData const):
(WebCore::Layout::Box::ensureRareData):
(WebCore::Layout::Box::removeRareData):
* layout/layouttree/LayoutBox.h:
(WebCore::Layout::Box::isLineBreakBox const):
(WebCore::Layout::Box::hasRareData const):
(WebCore::Layout::Box::setHasRareData):
(WebCore::Layout::Box::isInlineBox const): Deleted.
(WebCore::Layout::Box::replaced const): Deleted.
(WebCore::Layout::Box::replaced): Deleted.
* layout/layouttree/LayoutContainer.h:
(WebCore::Layout::Container::firstChild const): Deleted.
(WebCore::Layout::Container::lastChild const): Deleted.
(WebCore::Layout::Container::hasChild const): Deleted.
(WebCore::Layout::Container::hasInFlowChild const): Deleted.
(WebCore::Layout::Container::hasInFlowOrFloatingChild const): Deleted.
(WebCore::Layout::Container::outOfFlowDescendants const): Deleted.
* layout/layouttree/LayoutInlineBox.cpp: Removed.
* layout/layouttree/LayoutInlineBox.h: Removed.
* layout/layouttree/LayoutLineBreakBox.cpp: Removed.
* layout/layouttree/LayoutLineBreakBox.h: Removed.
* layout/layouttree/LayoutTreeBuilder.cpp:
(WebCore::Layout::TreeBuilder::createLayoutBox):
(WebCore::Layout::outputLayoutBox):

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

14 months ago[LFC] Remove formatting context type container classes.
zalan@apple.com [Sat, 3 Aug 2019 14:01:20 +0000 (14:01 +0000)]
[LFC] Remove formatting context type container classes.
https://bugs.webkit.org/show_bug.cgi?id=200202

Reviewed by Antti Koivisto.

These are formatting context specific classes. Let's try to have a layout tree without such types.

* Sources.txt:
* WebCore.xcodeproj/project.pbxproj:
* layout/blockformatting/BlockFormattingContext.cpp:
(WebCore::Layout::BlockFormattingContext::computeIntrinsicWidthConstraints const):
* layout/inlineformatting/InlineFormattingContext.cpp:
(WebCore::Layout::InlineFormattingContext::layout const):
(WebCore::Layout::InlineFormattingContext::computeMarginBorderAndPaddingForInlineContainer const):
* layout/inlineformatting/InlineFormattingContext.h:
* layout/inlineformatting/InlineFormattingContextLineLayout.cpp:
(WebCore::Layout::InlineFormattingContext::InlineLayout::layout const):
* layout/inlineformatting/InlineLine.cpp:
(WebCore::Layout::Line::appendTextContent):
* layout/layouttree/LayoutBlockContainer.cpp: Removed.
* layout/layouttree/LayoutBlockContainer.h: Removed.
* layout/layouttree/LayoutBox.cpp:
(WebCore::Layout::Box::establishesInlineFormattingContext const):
(WebCore::Layout::Box::establishesInlineFormattingContextOnly const):
(WebCore::Layout::Box::formattingContextRoot const):
* layout/layouttree/LayoutBox.h:
(WebCore::Layout::Box::isBlockContainer const):
(WebCore::Layout::Box::isInlineContainer const):
(WebCore::Layout::Box::isInlineBox const):
(WebCore::Layout::Box::establishesInlineFormattingContext const): Deleted.
(WebCore::Layout::Box::establishesInlineFormattingContextOnly const): Deleted.
* layout/layouttree/LayoutInlineContainer.cpp: Removed.
* layout/layouttree/LayoutInlineContainer.h: Removed.
* layout/layouttree/LayoutIterator.h:
(WebCore::Layout::LayoutBoxTraversal::firstChild):
* layout/layouttree/LayoutTreeBuilder.cpp:
(WebCore::Layout::TreeBuilder::createLayoutTree):
(WebCore::Layout::TreeBuilder::createLayoutBox):
(WebCore::Layout::TreeBuilder::createTableStructure):
(WebCore::Layout::outputLayoutBox):
* layout/layouttree/LayoutTreeBuilder.h:
* page/FrameViewLayoutContext.cpp:
(WebCore::layoutUsingFormattingContext):

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

14 months agoWeb Inspector: Heap Snapshot Views should be searchable
drousso@apple.com [Sat, 3 Aug 2019 08:56:05 +0000 (08:56 +0000)]
Web Inspector: Heap Snapshot Views should be searchable
https://bugs.webkit.org/show_bug.cgi?id=157582
<rdar://problem/26228629>

Reviewed by Joseph Pecoraro.

Without the ability to filter/search, it's far more difficult to find objects of interest.
Rather than spending time scrolling through the entire heap snapshot or sorting by "Name",
a simple filter/search (which also uses the global search settings) is almost instant.

* UserInterface/Views/HeapAllocationsTimelineView.js:
(WI.HeapAllocationsTimelineView.prototype.updateFilter): Addded.
(WI.HeapAllocationsTimelineView.prototype.get showsFilterBar): Deleted.
* UserInterface/Views/HeapSnapshotClusterContentView.js:
(WI.HeapSnapshotClusterContentView.prototype.updateFilter): Added.
* UserInterface/Views/HeapSnapshotContentView.js:
(WI.HeapSnapshotContentView):
(WI.HeapSnapshotContentView.prototype.updateFilter): Added.
(WI.HeapSnapshotContentView.prototype.dataGridMatchNodeAgainstCustomFilters): Added.
(WI.HeapSnapshotContentView.prototype.dataGridMatchShouldPopulateWhenFilteringNode): Added.
* UserInterface/Views/DataGrid.js:
(WI.DataGrid.prototype._updateFilter.createIteratorForNodesToBeFiltered):
Don't attempt to populate each heap snapshot `WI.DataGridNode` when filtering, as that can
quickly exhaust memory due to the sheer size of a heap snapshot.

* UserInterface/Base/Main.js:
(WI._find):
* UserInterface/Views/TimelineTabContentView.js:
(WI.TimelineTabContentView.prototype.get canHandleFindEvent): Added.
(WI.TimelineTabContentView.prototype.handleFindEvent): Added.
* UserInterface/Views/TimelineRecordingContentView.js:
(WI.TimelineRecordingContentView.prototype.get canFocusFilterBar): Added.
(WI.TimelineRecordingContentView.prototype.focusFilterBar): Added.
* UserInterface/Views/FilterBar.js:
(WI.FilterBar.prototype.focus): Added.
Allow the current tab to intercept the find shortcut and do something custom. In the case
of a `WI.TimelineTabContentView`, declare that it can handle the find event if the displayed
content view (`WI.TimelineRecordingContentView`) can focus it's filter bar. If so, when the
find shortcut is triggered, focus the filter bar.

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

14 months agoWeb Inspector: CSS Formatter: comments with an escape character aren't formatted
drousso@apple.com [Sat, 3 Aug 2019 08:52:53 +0000 (08:52 +0000)]
Web Inspector: CSS Formatter: comments with an escape character aren't formatted
https://bugs.webkit.org/show_bug.cgi?id=200168

Reviewed by Joseph Pecoraro.

Source/WebInspectorUI:

Don't allow escaping of the "*" in CSS comments (e.g. `\*/`).

Add additional pretty printing rules for comments so that there's always some space between
them and the surrounding text. This ensures that they don't interfere with readability.

* UserInterface/Workers/Formatter/CSSFormatter.js:
(CSSFormatter.prototype._format):

* UserInterface/Workers/Formatter/FormatterContentBuilder.js:
(FormatterContentBuilder.prototype.get indented): Added.

LayoutTests:

* inspector/formatting/formatting-css.html:
* inspector/formatting/formatting-css-expected.txt:
* inspector/formatting/resources/css-tests/comment.css: Added.
* inspector/formatting/resources/css-tests/comment-expected.css: Added.

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

14 months agoWeb Inspector: Console: execution context picker doesn't update when switching to...
drousso@apple.com [Sat, 3 Aug 2019 07:37:00 +0000 (07:37 +0000)]
Web Inspector: Console: execution context picker doesn't update when switching to the inferred context from auto
https://bugs.webkit.org/show_bug.cgi?id=200279

Reviewed by Joseph Pecoraro.

The `representedObject` of the "auto" execution context path component is shared with that
execution context's actual path component, meaning that if the user switches from "auto" to
that execution context's path component, the underlying `representedObject` wouldn't change,
and therfore the `RuntimeManager.Event.ActiveExecutionContextChanged` wouldn't fire. In this
case, update the visible ("selected") execution context path component manually.

* UserInterface/Views/QuickConsole.js:
(WI.QuickConsole.prototype._selectExecutionContext):
(WI.QuickConsole.prototype._pathComponentSelected):

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

14 months agoAddress comments on r248178
keith_miller@apple.com [Sat, 3 Aug 2019 04:01:35 +0000 (04:01 +0000)]
Address comments on r248178
https://bugs.webkit.org/show_bug.cgi?id=200411

Reviewed by Saam Barati.

* b3/B3Opcode.h:
* b3/B3Procedure.h:
(JSC::B3::Procedure::tuples const):
* b3/B3Validate.cpp:
* b3/testb3_1.cpp:
(main):

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

14 months ago[WHLSL] Avoid visiting the full AST in computeDimensions
rmorisset@apple.com [Sat, 3 Aug 2019 01:10:43 +0000 (01:10 +0000)]
[WHLSL] Avoid visiting the full AST in computeDimensions
https://bugs.webkit.org/show_bug.cgi?id=200410

Reviewed by Myles C. Maxfield.

Avoid visiting the full AST in computeDimensions
This cuts the time spent in computeDimensions on compute_boids.html from about 2ms to about 0.002ms.

No new tests as there is no functional change intended.

* Modules/webgpu/WHLSL/WHLSLComputeDimensions.cpp:
(WebCore::WHLSL::computeDimensions):
* Modules/webgpu/WHLSL/WHLSLPrepare.cpp:

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

14 months agoRef Frame in DOMWindow::screen* functions
rniwa@webkit.org [Sat, 3 Aug 2019 00:49:41 +0000 (00:49 +0000)]
Ref Frame in DOMWindow::screen* functions
https://bugs.webkit.org/show_bug.cgi?id=200409

Reviewed by Simon Fraser.

Ref Frame in the following functions.

* page/DOMWindow.cpp:
(WebCore::DOMWindow::innerHeight const):
(WebCore::DOMWindow::innerWidth const):
(WebCore::DOMWindow::screenX const):
(WebCore::DOMWindow::screenY const):
(WebCore::DOMWindow::scrollX const):
(WebCore::DOMWindow::scrollY const):

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

14 months ago[ARM64E] Harden the diversity of the DOMJIT::Signature::unsafeFunction pointer.
mark.lam@apple.com [Sat, 3 Aug 2019 00:31:31 +0000 (00:31 +0000)]
[ARM64E] Harden the diversity of the DOMJIT::Signature::unsafeFunction pointer.
https://bugs.webkit.org/show_bug.cgi?id=200292
<rdar://problem/53706881>

Reviewed by Geoffrey Garen.

Source/JavaScriptCore:

Previously, DOMJIT::Signature::functionWithoutTypeCheck was signed as a C function
pointer.  We can do better by signing it like a vtbl function pointer.

No new tests needed.  The DOMJIT mechanism is covered by existing tests.

I also manually confirmed that DOMJIT::Signature::functionWithoutTypeCheck is signed
exactly as expected by reading its bits out of memory (not letting Clang have a
chance to resign it into a C function pointer) and comparing it against manually
signed bits with the expected diversifier.

* assembler/MacroAssemblerCodeRef.h:
(JSC::CFunctionPtr::CFunctionPtr):
(JSC::CFunctionPtr::get const):
(JSC::CFunctionPtr::address const):
(JSC::CFunctionPtr::operator bool const):
(JSC::CFunctionPtr::operator! const):
(JSC::CFunctionPtr::operator== const):
(JSC::CFunctionPtr::operator!= const):

- Introduce a CFunctionPtr abstraction that is used to hold pointers to C functions.
  It can instantiated in 4 ways:

  1. The default constructor.
  2. A constructor that takes a nullptr_t.

     These 2 forms will instantiate a CFunctionPtr with a nullptr.

  3. A constructor that takes the name of a function.
  4. A constructor that takes a function pointer.

      Form 3 already knows that we're initializing with a real function, and
      that Clang will give it to use signed as a C function pointer.  So, it
      doesn't do any assertions.  This form is useful for initializing CFunctionPtrs
      embedded in const data structures.

      Form 4 is an explicit constructor that takes an arbitrary function
      pointer, but does not know if that pointer is already signed as a C function
      pointer.  Hence, this form will do a RELEASE_ASSERT that the given function
      pointer is actually signed as a C function pointer.

  Once instantiated, we are guaranteed that a C function pointer is either null
  or contains a signed C function pointer.

* domjit/DOMJITSignature.h:
(JSC::DOMJIT::Signature::Signature):
- Sign functionWithoutTypeCheck as WTF_VTBL_FUNCPTR_PTRAUTH(DOMJITFunctionPtrTag).

* dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::compileCallDOM):
* ftl/FTLLowerDFGToB3.cpp:
(JSC::FTL::DFG::LowerDFGToB3::compileCallDOM):
- Use the new CFunctionPtr to document that the retrieved signature->functionWithoutTypeCheck
  is signed as a C function pointer.

* runtime/ClassInfo.h:
- Update MethodTable to sign its function pointers using the new WTF_VTBL_FUNCPTR_PTRAUTH_STR
  to be consistent.  No longer need to roll its own PTRAUTH macro.

* runtime/JSCPtrTag.h:
- Add DOMJITFunctionPtrTag.

* tools/JSDollarVM.cpp:
- Update to work with the new DOMJIT::Signature constructor.

Source/WebCore:

* bindings/scripts/CodeGeneratorJS.pm:
(GenerateImplementation):
- Update to work with the new DOMJIT::Signature constructor.

* bindings/scripts/test/JS/JSTestDOMJIT.cpp:
- Re-base test results.

Source/WTF:

* wtf/PtrTag.h:
- Introducing WTF_VTBL_FUNCPTR_PTRAUTH and WTF_VTBL_FUNCPTR_PTRAUTH_STR macros for
  defining vtbl function pointer style pointer signing modifier.

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

14 months agoConsistently use Obj-C boolean literals
krollin@apple.com [Fri, 2 Aug 2019 23:44:46 +0000 (23:44 +0000)]
Consistently use Obj-C boolean literals
https://bugs.webkit.org/show_bug.cgi?id=200405
<rdar://problem/53880043>

Reviewed by Simon Fraser, Joseph Pecoraro.

There are places where we use equivalent but different expressions for
Obj-C boolean objects. For example, we use both [NSNumber
numberWithBool:YES] and @YES. There are places where both are used in
the same function, such as -[WebPreferences initialize]. The boolean
literal is in greater use and is more succinct, so standardize on
that. Also, change @(YES/NO) to @YES/NO.

Examples:

* NetscapeCoreAnimationMoviePlugin/main.m:
(NPP_GetValue):

Source/WebCore:

No new tests -- no new or changed functionality.

* platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
(WebCore::SourceBufferPrivateAVFObjC::enqueueSample):
* platform/graphics/cv/ImageTransferSessionVT.mm:
(WebCore::ImageTransferSessionVT::ImageTransferSessionVT):
(WebCore::ImageTransferSessionVT::setSize):
(WebCore::ImageTransferSessionVT::ioSurfacePixelBufferCreationOptions):
* platform/mediastream/mac/RealtimeIncomingVideoSourceCocoa.mm:
(WebCore::RealtimeIncomingVideoSourceCocoa::pixelBufferPool):
* platform/mediastream/mac/ScreenDisplayCaptureSourceMac.mm:
(WebCore::ScreenDisplayCaptureSourceMac::createDisplayStream):
* platform/network/mac/ResourceHandleMac.mm:
(WebCore::ResourceHandle::applySniffingPoliciesIfNeeded):

Source/WebKit:

* NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:
(WebKit::NetworkDataTaskCocoa::applySniffingPoliciesAndBindRequestToInferfaceIfNeeded):
* NetworkProcess/cocoa/NetworkSessionCocoa.mm:
(WebKit::NetworkSessionCocoa::NetworkSessionCocoa):
* UIProcess/WebAuthentication/Cocoa/LocalConnection.mm:
(WebKit::LocalConnection::getAttestation const):

Source/WebKitLegacy/mac:

* History/WebHistoryItem.mm:
* WebView/WebFrame.mm:
(-[WebFrame _cacheabilityDictionary]):
* WebView/WebPreferences.mm:
(+[WebPreferences initialize]):

Tools:

* DumpRenderTree/mac/ObjCController.m:
(-[ObjCController objectOfClass:]):
* TestWebKitAPI/Tests/WebKitCocoa/BundleEditingDelegate.mm:
(TEST):
* TestWebKitAPI/Tests/WebKitCocoa/TestSOAuthorization.mm:
(overrideAddObserverForName):
* TestWebKitAPI/ios/mainIOS.mm:
(main):
* TestWebKitAPI/mac/InjectedBundleControllerMac.mm:
(TestWebKitAPI::InjectedBundleController::platformInitialize):
* TestWebKitAPI/mac/mainMac.mm:
(main):
* WebKitLauncher/WebKitNightlyEnabler.m:
(enableWebKitNightlyBehaviour):

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

14 months ago[ Mac ] Layout Test accessibility/mac/press-not-work-for-disabled-menu-list.html...
commit-queue@webkit.org [Fri, 2 Aug 2019 23:20:31 +0000 (23:20 +0000)]
[ Mac ] Layout Test accessibility/mac/press-not-work-for-disabled-menu-list.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=196505
<rdar://problem/49532620>

Patch by Andres Gonzalez <andresg_22@apple.com> on 2019-08-02
Reviewed by Chris Fleizach.

Re-wrote test in a timing independent way. This should fix the intermittent failures.
* accessibility/mac/press-not-work-for-disabled-menu-list.html:

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

14 months agoAdd accessibility object method to determine whether an element is inside a table...
commit-queue@webkit.org [Fri, 2 Aug 2019 23:03:06 +0000 (23:03 +0000)]
Add accessibility object method to determine whether an element is inside a table cell. Needed for iOS accessibility client.
https://bugs.webkit.org/show_bug.cgi?id=200394
<rdar://problem/52914964>

Patch by Andres Gonzalez <andresg_22@apple.com> on 2019-08-02
Reviewed by Chris Fleizach.

Explicitly returning BOOL to avoid error in some compiler configurations.
* accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
(-[WebAccessibilityObjectWrapper _accessibilityIsInTableCell]):

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

14 months ago[JSC] Support WebAssembly in SamplingProfiler
ysuzuki@apple.com [Fri, 2 Aug 2019 22:58:09 +0000 (22:58 +0000)]
[JSC] Support WebAssembly in SamplingProfiler
https://bugs.webkit.org/show_bug.cgi?id=200329

Reviewed by Saam Barati.

JSTests:

* stress/sampling-profiler-wasm-name-section.js: Added.
(const.compile):
(platformSupportsSamplingProfiler.vm.isWasmSupported.wasmEntry):
(platformSupportsSamplingProfiler.vm.isWasmSupported):
* stress/sampling-profiler-wasm.js: Added.
(platformSupportsSamplingProfiler.vm.isWasmSupported.wasmEntry):
(platformSupportsSamplingProfiler.vm.isWasmSupported):
* stress/sampling-profiler/loop.wasm: Added.
* stress/sampling-profiler/loop.wast: Added.
* stress/sampling-profiler/nameSection.wasm: Added.

Source/JavaScriptCore:

The sampling profiler support is critical to investigate what is actually time-consuming. This patch adds the sampling profiler support for Wasm functions
to list up hot Wasm functions with compilation mode (BBQ or OMG). This allows us to investigate the hot functions in JetStream2 wasm tests.

In order to retrieve wasm function information from the sampling profiler safely, we need to know whether the given Wasm CalleeBits is valid in the call frame.
To achieve this, we start collecting valid Wasm::Callee pointers in a global hash set. Previously, each Wasm::Callee registered its code region to a hash set
for wasm fault signal handler to know whether the faulted program-counter is in wasm region. We reuse and change this mechanism. Instead of registering code region,
we register Wasm::Callee* to a hash set. The sampling profiler reuses this hash set to determine whether the given bits is a valid Wasm::Callee.

The sampling profiler retrieves the information safely from valid Wasm::Callee* pointer. It is possible that this Wasm::Callee is about to be dead: ref-count is 0,
now in the middle of the destructor of Wasm::Callee. Even in that case, fields of Wasm::Callee are still valid and can be accessed since destroying these fields happens
after we unregister Wasm::Callee from the global hash set.

We retrieve Wasm::IndexOrName and Wasm::CompilationMode. Copying them does not involve any allocations, locking etc. So we can safely copy them while some of threads are suspended.

This patch also fixes the issue that we never called `unregisterCode` while every Wasm::Calllee registers its code region through `registerCode`.

* CMakeLists.txt:
* JavaScriptCore.xcodeproj/project.pbxproj:
* Sources.txt:
* runtime/InitializeThreading.cpp:
(JSC::initializeThreading):
* runtime/SamplingProfiler.cpp:
(JSC::FrameWalker::FrameWalker):
(JSC::FrameWalker::recordJSFrame):
(JSC::CFrameWalker::CFrameWalker):
(JSC::SamplingProfiler::takeSample):
(JSC::SamplingProfiler::processUnverifiedStackTraces):
(JSC::SamplingProfiler::StackFrame::displayName):
(JSC::SamplingProfiler::StackFrame::displayNameForJSONTests):
(JSC::SamplingProfiler::StackFrame::functionStartLine):
(JSC::SamplingProfiler::StackFrame::functionStartColumn):
(JSC::SamplingProfiler::StackFrame::sourceID):
(JSC::SamplingProfiler::StackFrame::url):
(JSC::SamplingProfiler::reportTopBytecodes):
(WTF::printInternal):
* runtime/SamplingProfiler.h:
* tools/JSDollarVM.cpp:
(JSC::functionIsWasmSupported):
(JSC::JSDollarVM::finishCreation):
* wasm/WasmB3IRGenerator.h:
* wasm/WasmBBQPlan.cpp:
(JSC::Wasm::BBQPlan::complete):
* wasm/WasmBBQPlanInlines.h:
(JSC::Wasm::BBQPlan::initializeCallees):
* wasm/WasmCallee.cpp:
(JSC::Wasm::Callee::Callee):
(JSC::Wasm::Callee::~Callee):
* wasm/WasmCallee.h:
(JSC::Wasm::Callee::create): Deleted.
(JSC::Wasm::Callee::entrypoint const): Deleted.
(JSC::Wasm::Callee::calleeSaveRegisters): Deleted.
(JSC::Wasm::Callee::indexOrName const): Deleted.
* wasm/WasmCalleeRegistry.cpp: Copied from Source/JavaScriptCore/wasm/WasmFaultSignalHandler.h.
(JSC::Wasm::CalleeRegistry::initialize):
(JSC::Wasm::CalleeRegistry::singleton):
* wasm/WasmCalleeRegistry.h: Copied from Source/JavaScriptCore/wasm/WasmCallee.cpp.
(JSC::Wasm::CalleeRegistry::getLock):
(JSC::Wasm::CalleeRegistry::registerCallee):
(JSC::Wasm::CalleeRegistry::unregisterCallee):
(JSC::Wasm::CalleeRegistry::isValidCallee):
* wasm/WasmCompilationMode.cpp: Copied from Source/JavaScriptCore/wasm/WasmFaultSignalHandler.h.
(JSC::Wasm::makeString):
* wasm/WasmCompilationMode.h: Copied from Source/JavaScriptCore/wasm/WasmFaultSignalHandler.h.
* wasm/WasmFaultSignalHandler.cpp:
(JSC::Wasm::trapHandler):
(JSC::Wasm::enableFastMemory):
(JSC::Wasm::registerCode): Deleted.
(JSC::Wasm::unregisterCode): Deleted.
* wasm/WasmFaultSignalHandler.h:
* wasm/WasmIndexOrName.h:
* wasm/WasmOMGPlan.cpp:
(JSC::Wasm::OMGPlan::work):

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

14 months agoTextAutosizingBoost.ChangeAutosizingBoostAtRuntime fails on iPad Simulator
wenson_hsieh@apple.com [Fri, 2 Aug 2019 22:57:58 +0000 (22:57 +0000)]
TextAutosizingBoost.ChangeAutosizingBoostAtRuntime fails on iPad Simulator
https://bugs.webkit.org/show_bug.cgi?id=200402
<rdar://problem/53823368>

Reviewed by Tim Horton.

Make it possible to run this test using the iPad simulator.

* TestWebKitAPI/Tests/ios/TextAutosizingBoost.mm:

Two adjustments: (1) override the screen size to be 320 by 568 (so that the legacy text autosizing heuristic
doesn't avoid boosting this text), and (2) force text autosizing on, but disable idempotent text autosizing,
since this would result in differently sized text.

(mainScreenReferenceBoundsOverride):
* TestWebKitAPI/ios/UIKitSPI.h:

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

14 months ago[JSC] LazyJSValue should be robust for empty JSValue
ysuzuki@apple.com [Fri, 2 Aug 2019 22:20:54 +0000 (22:20 +0000)]
[JSC] LazyJSValue should be robust for empty JSValue
https://bugs.webkit.org/show_bug.cgi?id=200388

Reviewed by Saam Barati.

JSTests:

* stress/switch-constant-child-becomes-empty.js: Added.
(foo):

Source/JavaScriptCore:

If the Switch DFG node is preceded by ForceOSRExit or something that invalidates the basic block,
it can take a FrozenValue as a child which includes empty value instead of string, number etc.
If this Switch node is kept and we reached to DFGCFGSimplificationPhase, it will use this FrozenValue.
However, LazyJSValue using this FrozenValue strongly assumes that FrozenValue is never holding empty value.
But this assumption is wrong. This patch makes LazyJSValue robust for empty value.

* dfg/DFGLazyJSValue.cpp:
(JSC::DFG::LazyJSValue::tryGetStringImpl const):
(JSC::DFG::LazyJSValue::tryGetString const):
(JSC::DFG::LazyJSValue::strictEqual const):
(JSC::DFG::LazyJSValue::switchLookupValue const):

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

14 months agoWeb Inspector: fix inverted check in InspectorDOMStorageAgent::enable
drousso@apple.com [Fri, 2 Aug 2019 22:14:30 +0000 (22:14 +0000)]
Web Inspector: fix inverted check in InspectorDOMStorageAgent::enable
Followup to r248179.

Rubber-stamped by Joseph Pecoraro.

* inspector/agents/InspectorDOMStorageAgent.cpp:
(WebCore::InspectorDOMStorageAgent::enable):

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

14 months agouniqueLogIdentifier() should generate a 64-bit identifier
eric.carlson@apple.com [Fri, 2 Aug 2019 21:54:26 +0000 (21:54 +0000)]
uniqueLogIdentifier() should generate a 64-bit identifier
https://bugs.webkit.org/show_bug.cgi?id=200403
<rdar://problem/53878447>

Reviewed by Youenn Fablet.

* wtf/LoggerHelper.h:
(WTF::LoggerHelper::childLogIdentifier const): Use uint64_t masks.
(WTF::LoggerHelper::uniqueLogIdentifier): cryptographicallyRandomNumber returns a
uint32_t so use two to generate a 64-bit identifier.

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

14 months ago[Curl] Crash while destructing a URL in ~SocketStreamHandle due to data race
Hironori.Fujii@sony.com [Fri, 2 Aug 2019 21:32:09 +0000 (21:32 +0000)]
[Curl] Crash while destructing a URL in ~SocketStreamHandle due to data race
https://bugs.webkit.org/show_bug.cgi?id=200378

Reviewed by Ross Kirsling.

URL::isolatedCopy() is called in the worker thread. URL is using a
thread-unsafe ref-counter. It should be called in the main thread.

Covered by existing tests.

* platform/network/curl/SocketStreamHandleImpl.h:
* platform/network/curl/SocketStreamHandleImplCurl.cpp:
(WebCore::SocketStreamHandleImpl::SocketStreamHandleImpl): Call URL::isolatedCopy() in the main thread.
(WebCore::SocketStreamHandleImpl::threadEntryPoint): Added a URL argument.

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

14 months agoAPI tests using permanent credentials should clear credentials left by previous tests
sihui_liu@apple.com [Fri, 2 Aug 2019 21:19:51 +0000 (21:19 +0000)]
API tests using permanent credentials should clear credentials left by previous tests
https://bugs.webkit.org/show_bug.cgi?id=199729

Reviewed by Alex Christensen.

Source/WebCore:

Update existing API tests.

* platform/network/CredentialStorage.cpp:
(WebCore::CredentialStorage::clearSessionCredentials):
(WebCore::CredentialStorage::clearPermanentCredentialsForProtectionSpace): Deleted.
* platform/network/CredentialStorage.h:
* platform/network/mac/CredentialStorageMac.mm:
(WebCore::CredentialStorage::clearPermanentCredentialsForProtectionSpace): Deleted.

Source/WebKit:

Permanent password credentials currently are shared across processes, so we don't need to clear them from
network process.

* NetworkProcess/NetworkProcess.cpp:
(WebKit::NetworkProcess::clearPermanentCredentialsForProtectionSpace): Deleted.
* NetworkProcess/NetworkProcess.h:
* NetworkProcess/NetworkProcess.messages.in:
* UIProcess/API/Cocoa/WKProcessPool.mm:
(-[WKProcessPool _clearPermanentCredentialsForProtectionSpace:]):
(-[WKProcessPool _clearPermanentCredentialsForProtectionSpace:completionHandler:]): Deleted.
* UIProcess/API/Cocoa/WKProcessPoolPrivate.h:
* UIProcess/Cocoa/WebProcessPoolCocoa.mm:
(WebKit::WebProcessPool::clearPermanentCredentialsForProtectionSpace):
* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::clearPermanentCredentialsForProtectionSpace): Deleted.
* UIProcess/WebProcessPool.h:

Tools:

We used to clear the permanent credentials created by API tests at the end of the API tests, to ensure those
credentials will not affect tests running after. There is a case where permanent credentials were left on the
system, so those API tests were timing out themselves before reaching to the cleanup, which caused cascading
failure. To prevent this from happening again, add cleanup at the begining of the tests.

* TestWebKitAPI/Tests/WebKitCocoa/Challenge.mm:
(TEST):
* TestWebKitAPI/Tests/WebKitCocoa/WKWebsiteDatastore.mm:
(TestWebKitAPI::TEST):

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

14 months agoWeb Inspector: Console: all navigation items should be shown in the split console
drousso@apple.com [Fri, 2 Aug 2019 21:07:07 +0000 (21:07 +0000)]
Web Inspector: Console: all navigation items should be shown in the split console
https://bugs.webkit.org/show_bug.cgi?id=200280

Reviewed by Joseph Pecoraro.

* UserInterface/Views/LogContentView.js:
(WI.LogContentView):
(WI.LogContentView.prototype.get navigationItems):
Adjust the `visibilityPriority` of each `navigationItems` so that the filter/scope bars are
kept visible for longer than the "Preserve Log"/"Emulate User Gesture" toggles.

* UserInterface/Views/FindBanner.js:
(WI.FindBanner):
* UserInterface/Views/FindBanner.css:
(.find-banner.console-find-banner > input[type="search"]):
(.find-banner.console-find-banner > :matches(input[type="search"], button)):
(.find-banner.console-find-banner > input[type="search"]:focus, .find-banner.console-find-banner > input[type="search"]:focus ~ button, .find-banner.console-find-banner > input[type="search"]:not(:placeholder-shown), .find-banner.console-find-banner > input[type="search"]:not(:placeholder-shown) ~ button ): Added.
(.find-banner.console-find-banner > input[type="search"]::placeholder): Deleted.
(.find-banner.console-find-banner > input[type="search"]:focus): Deleted.
(.find-banner.console-find-banner > input[type="search"]:not(:placeholder-shown)): Deleted.
(@media (prefers-color-scheme: dark) .find-banner.console-find-banner > input[type=search]:not(:placeholder-shown)): Deleted.
Make the `WI.FindBanner` blend in with the surrounding content when it's not focused or has
no content.

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

14 months agoWeb Inspector: Storage: disable related agents when the tab is closed
drousso@apple.com [Fri, 2 Aug 2019 21:05:39 +0000 (21:05 +0000)]
Web Inspector: Storage: disable related agents when the tab is closed
https://bugs.webkit.org/show_bug.cgi?id=200117

Reviewed by Joseph Pecoraro.

Rework how `enable`/`disable` is used for storage-related agents so that events are not sent
and data isn't kept alive when the Storage tab isn't enabled.

Source/JavaScriptCore:

* inspector/protocol/ApplicationCache.json:
Add `disable` command.

Source/WebCore:

Covered by existing tests.

* inspector/agents/InspectorApplicationCacheAgent.h:
* inspector/agents/InspectorApplicationCacheAgent.cpp:
(WebCore::InspectorApplicationCacheAgent::willDestroyFrontendAndBackend):
(WebCore::InspectorApplicationCacheAgent::enable):
(WebCore::InspectorApplicationCacheAgent::disable): Added.

* inspector/agents/InspectorDOMStorageAgent.cpp:
(WebCore::InspectorDOMStorageAgent::enable):
(WebCore::InspectorDOMStorageAgent::disable):

* inspector/agents/InspectorDatabaseAgent.cpp:
(WebCore::InspectorDatabaseAgent::enable):
(WebCore::InspectorDatabaseAgent::disable):

Source/WebInspectorUI:

* UserInterface/Controllers/ApplicationCacheManager.js:
(WI.ApplicationCacheManager):
(WI.ApplicationCacheManage.prototype.get domains): Added.
(WI.ApplicationCacheManage.prototype.activateExtraDomain): Added.
(WI.ApplicationCacheManager.prototype.initializeTarget):
(WI.ApplicationCacheManager.prototype.enable): Added.
(WI.ApplicationCacheManager.prototype.disable): Added.
(WI.ApplicationCacheManager.prototype.networkStateUpdated):
(WI.ApplicationCacheManager.prototype.applicationCacheStatusUpdated):
(WI.ApplicationCacheManager.prototype._reset): Added.
(WI.ApplicationCacheManager.prototype._mainResourceDidChange):
(WI.ApplicationCacheManager.prototype._manifestForFrameLoaded):
(WI.ApplicationCacheManager.prototype._framesWithManifestsLoaded):
(WI.ApplicationCacheManager.prototype.initialize): Deleted.

* UserInterface/Controllers/DOMStorageManager.js:
(WI.DOMStorageManager):
(WI.DOMStorageManager.prototype.get domains): Added.
(WI.DOMStorageManager.prototype.activateExtraDomain): Added.
(WI.DOMStorageManager.prototype.initializeTarget):
(WI.DOMStorageManager.prototype.enable): Added.
(WI.DOMStorageManager.prototype.disable): Added.
(WI.DOMStorageManager.prototype.itemsCleared):
(WI.DOMStorageManager.prototype.itemRemoved):
(WI.DOMStorageManager.prototype.itemAdded):
(WI.DOMStorageManager.prototype.itemUpdated):
(WI.DOMStorageManager.prototype.inspectDOMStorage):
(WI.DOMStorageManager.prototype._reset): Added.
(WI.DOMStorageManager.prototype._addDOMStorageIfNeeded):
(WI.DOMStorageManager.prototype._addCookieStorageIfNeeded):
(WI.DOMStorageManager.prototype._mainResourceDidChange):
(WI.DOMStorageManager.prototype.initialize): Deleted.
(WI.DOMStorageManager.prototype.domStorageWasAdded): Deleted.

* UserInterface/Controllers/DatabaseManager.js:
(WI.DatabaseManager):
(WI.DatabaseManager.prototype.get domains): Added.
(WI.DatabaseManager.prototype.activateExtraDomain): Added.
(WI.DatabaseManager.prototype.initializeTarget):
(WI.DatabaseManager.prototype.enable): Added.
(WI.DatabaseManager.prototype.disable): Added.
(WI.DatabaseManager.prototype.databaseWasAdded):
(WI.DatabaseManager.prototype.inspectDatabase):
(WI.DatabaseManager.prototype._reset): Added.
(WI.DatabaseManager.prototype._mainResourceDidChange):
(WI.DatabaseManager.prototype.initialize): Deleted.

* UserInterface/Controllers/IndexedDBManager.js:
(WI.IndexedDBManager):
(WI.IndexedDBManager.prototype.get domains): Added.
(WI.IndexedDBManager.prototype.activateExtraDomain): Added.
(WI.IndexedDBManager.prototype.initializeTarget):
(WI.IndexedDBManager.prototype.enable): Added.
(WI.IndexedDBManager.prototype.disable): Added.
(WI.IndexedDBManager.prototype.clearObjectStore):
(WI.IndexedDBManager.prototype._reset): Added.
(WI.IndexedDBManager.prototype._mainResourceDidChange):
(WI.IndexedDBManager.prototype.initialize): Deleted.

* UserInterface/Controllers/AppController.js:
(WI.AppController.prototype.activateExtraDomains):
* UserInterface/Controllers/CanvasManager.js:
(WI.CanvasManager.prototype.get domains): Added.
(WI.CanvasManager.prototype.activateExtraDomain): Added.
Only call `enable` on any extra agents if the domain is not controlled by a manager.

* UserInterface/Views/StorageTabContentView.js:
(WI.StorageTabContentView):
(WI.StorageTabContentView.static isTabAllowed):
(WI.StorageTabContentView.prototype.canShowRepresentedObject):
(WI.StorageTabContentView.prototype.closed): Added.

* UserInterface/Test.html:
* UserInterface/Test/Test.js:
(WI.loaded):
(WI.contentLoaded):

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

14 months agoB3 should support tuple types
keith_miller@apple.com [Fri, 2 Aug 2019 21:02:05 +0000 (21:02 +0000)]
B3 should support tuple types
https://bugs.webkit.org/show_bug.cgi?id=200327

Reviewed by Filip Pizlo.

As part of the Wasm multi-value proposal, we need to teach B3 that
patchpoints can return more than one value.  This is done by
adding a new B3::Type called Tuple. Unlike, other B3 types Tuple
is actually an encoded index into a numeric B3::Type vector on the
procedure. This lets us distinguish any two tuples from each
other, moreover, it's possible to get the vector of types with
just the B3::Tuple type and the procedure.

Since most B3 operations only expect to see a single numeric child
there is a new Opcode, Extract, that takes yields the some, fixed,
entry from a tuple value. Extract would be the only other change
needed to make tuples work in B3 except that some optimizations
expect to be able to take any non-Void value and stick it into a
Variable of the same type. This means both Get/Set from a variable
have to support Tuples as well. For simplicity and consistency,
the ability to accept tuples is also applied to Phi and Upsilon.

In order to lower a Tuple, B3Lowering needs to have a Tmp for each
nested type in a Tuple. While we could reuse the existing
IndexedTables to hold the extra information we need to lower
Tuples, we instead use a two new HashTables for Value->Tmp(s) and
Phi->Tmp(s). It's expected that Tuples will be sufficiently
uncommon the overhead of tracking everything together would be
prohibitive. On the other hand, we don't worry about this for
Variables because we don't expect those to make it to lowering.

* JavaScriptCore.xcodeproj/project.pbxproj:
* Sources.txt:
* b3/B3Bank.h:
(JSC::B3::bankForType):
* b3/B3CheckValue.cpp:
(JSC::B3::CheckValue::CheckValue):
* b3/B3ExtractValue.cpp: Copied from Source/JavaScriptCore/b3/B3ProcedureInlines.h.
(JSC::B3::ExtractValue::~ExtractValue):
(JSC::B3::ExtractValue::dumpMeta const):
* b3/B3ExtractValue.h: Copied from Source/JavaScriptCore/b3/B3FixSSA.h.
* b3/B3FixSSA.h:
* b3/B3LowerMacros.cpp:
* b3/B3LowerMacrosAfterOptimizations.cpp:
* b3/B3LowerToAir.cpp:
* b3/B3NativeTraits.h:
* b3/B3Opcode.cpp:
(JSC::B3::invertedCompare):
(WTF::printInternal):
* b3/B3Opcode.h:
(JSC::B3::opcodeForConstant):
* b3/B3PatchpointSpecial.cpp:
(JSC::B3::PatchpointSpecial::forEachArg):
(JSC::B3::PatchpointSpecial::isValid):
(JSC::B3::PatchpointSpecial::admitsStack):
(JSC::B3::PatchpointSpecial::generate):
* b3/B3PatchpointValue.cpp:
(JSC::B3::PatchpointValue::dumpMeta const):
(JSC::B3::PatchpointValue::PatchpointValue):
* b3/B3PatchpointValue.h:
* b3/B3Procedure.cpp:
(JSC::B3::Procedure::addTuple):
(JSC::B3::Procedure::isValidTuple const):
(JSC::B3::Procedure::tupleForType const):
(JSC::B3::Procedure::addIntConstant):
(JSC::B3::Procedure::addConstant):
* b3/B3Procedure.h:
(JSC::B3::Procedure::returnCount const):
* b3/B3ProcedureInlines.h:
(JSC::B3::Procedure::extractFromTuple const):
* b3/B3ReduceStrength.cpp:
* b3/B3StackmapSpecial.cpp:
(JSC::B3::StackmapSpecial::isValidImpl):
(JSC::B3::StackmapSpecial::isArgValidForType):
(JSC::B3::StackmapSpecial::isArgValidForRep):
(JSC::B3::StackmapSpecial::isArgValidForValue): Deleted.
* b3/B3StackmapSpecial.h:
* b3/B3StackmapValue.h:
* b3/B3Type.cpp:
(WTF::printInternal):
* b3/B3Type.h:
(JSC::B3::Type::Type):
(JSC::B3::Type::tupleFromIndex):
(JSC::B3::Type::kind const):
(JSC::B3::Type::tupleIndex const):
(JSC::B3::Type::hash const):
(JSC::B3::Type::operator== const):
(JSC::B3::Type::operator!= const):
(JSC::B3::Type::isInt const):
(JSC::B3::Type::isFloat const):
(JSC::B3::Type::isNumeric const):
(JSC::B3::Type::isTuple const):
(JSC::B3::sizeofType):
(JSC::B3::isInt): Deleted.
(JSC::B3::isFloat): Deleted.
* b3/B3TypeMap.h:
(JSC::B3::TypeMap::at):
* b3/B3Validate.cpp:
* b3/B3Value.cpp:
(JSC::B3::Value::isRounded const):
(JSC::B3::Value::effects const):
(JSC::B3::Value::typeFor):
* b3/B3Value.h:
* b3/B3ValueInlines.h:
* b3/B3ValueKey.cpp:
(JSC::B3::ValueKey::intConstant):
* b3/B3ValueKey.h:
(JSC::B3::ValueKey::hash const):
* b3/B3ValueRep.h:
* b3/B3Width.h:
(JSC::B3::widthForType):
* b3/air/AirArg.cpp:
(JSC::B3::Air::Arg::canRepresent const):
* b3/air/AirArg.h:
* b3/air/AirCCallingConvention.cpp:
(JSC::B3::Air::cCallResult):
* b3/air/AirLowerMacros.cpp:
(JSC::B3::Air::lowerMacros):
* b3/testb3.h:
(populateWithInterestingValues):
* b3/testb3_1.cpp:
(run):
* b3/testb3_3.cpp:
(testStorePartial8BitRegisterOnX86):
* b3/testb3_5.cpp:
(testPatchpointWithRegisterResult):
(testPatchpointWithStackArgumentResult):
(testPatchpointWithAnyResult):
* b3/testb3_6.cpp:
(testPatchpointDoubleRegs):
(testSomeEarlyRegister):
* b3/testb3_7.cpp:
(testShuffleDoesntTrashCalleeSaves):
(testReportUsedRegistersLateUseFollowedByEarlyDefDoesNotMarkUseAsDead):
(testSimpleTuplePair):
(testSimpleTuplePairUnused):
(testSimpleTuplePairStack):
(tailDupedTuplePair):
(tuplePairVariableLoop):
(tupleNestedLoop):
(addTupleTests):
* b3/testb3_8.cpp:
(testLoad):
(addLoadTests):
* ftl/FTLAbbreviatedTypes.h:
* ftl/FTLLowerDFGToB3.cpp:
(JSC::FTL::DFG::LowerDFGToB3::compileCallOrConstruct):
(JSC::FTL::DFG::LowerDFGToB3::compileDirectCallOrConstruct):
(JSC::FTL::DFG::LowerDFGToB3::compileCallOrConstructVarargsSpread):
(JSC::FTL::DFG::LowerDFGToB3::compileCallOrConstructVarargs):
(JSC::FTL::DFG::LowerDFGToB3::compileCallEval):
(JSC::FTL::DFG::LowerDFGToB3::compileCPUIntrinsic):
(JSC::FTL::DFG::LowerDFGToB3::compileInstanceOf):
(JSC::FTL::DFG::LowerDFGToB3::compileCallDOMGetter):
(JSC::FTL::DFG::LowerDFGToB3::emitBinarySnippet):
(JSC::FTL::DFG::LowerDFGToB3::emitBinaryBitOpSnippet):
(JSC::FTL::DFG::LowerDFGToB3::emitRightShiftSnippet):
(JSC::FTL::DFG::LowerDFGToB3::allocateHeapCell):
* wasm/WasmAirIRGenerator.cpp:
(JSC::Wasm::AirIRGenerator::emitPatchpoint):
* wasm/WasmB3IRGenerator.cpp:
(JSC::Wasm::B3IRGenerator::B3IRGenerator):
* wasm/WasmCallingConvention.h:
(JSC::Wasm::CallingConvention::marshallArgument const):
(JSC::Wasm::CallingConvention::setupFrameInPrologue const):
(JSC::Wasm::CallingConvention::setupCall const):
(JSC::Wasm::CallingConventionAir::setupCall const):

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

14 months agoWeb Inspector: Timelines: Develop > Start Timeline Recording doesn't work when focuse...
drousso@apple.com [Fri, 2 Aug 2019 20:39:21 +0000 (20:39 +0000)]
Web Inspector: Timelines: Develop > Start Timeline Recording doesn't work when focused on a detached inspector window
https://bugs.webkit.org/show_bug.cgi?id=200125
<rdar://problem/53543008>

Reviewed by Brian Burg.

Always show the Timelines tab in Web Inspector whenever timeline recording starts/stops.
Notify the UIProcess whenever the timeline recording state changes.

Source/WebCore:

* inspector/InspectorClient.h:
(WebCore::InspectorClient::timelineRecordingChanged): Added.

* inspector/agents/InspectorTimelineAgent.h:
* inspector/agents/InspectorTimelineAgent.cpp:
(WebCore::InspectorTimelineAgent::InspectorTimelineAgent):
(WebCore::InspectorTimelineAgent::internalStart):
(WebCore::InspectorTimelineAgent::internalStop):

Source/WebInspectorUI:

* UserInterface/Protocol/InspectorFrontendAPI.js:
(InspectorFrontendAPI.setTimelineProfilingEnabled):

Source/WebKit:

* WebProcess/WebPage/WebInspector.messages.in:
* WebProcess/WebPage/WebInspector.h:
* WebProcess/WebPage/WebInspector.cpp:
(WebKit::WebInspector::startPageProfiling):
(WebKit::WebInspector::stopPageProfiling):
(WebKit::WebInspector::timelineRecordingChanged): Added.
(WebKit::WebInspector::showTimelines): Deleted.

* WebProcess/WebPage/WebInspectorUI.messages.in:
* WebProcess/WebPage/WebInspectorUI.h:
* WebProcess/WebPage/WebInspectorUI.cpp:
(WebKit::WebInspectorUI::showTimelines): Deleted.

* WebProcess/WebCoreSupport/WebInspectorClient.h:
* WebProcess/WebCoreSupport/WebInspectorClient.cpp:
(WebKit::WebInspectorClient::timelineRecordingChanged): Added.

* UIProcess/WebInspectorProxy.messages.in:
* UIProcess/WebInspectorProxy.h:
* UIProcess/WebInspectorProxy.cpp:
(WebKit::WebInspectorProxy::togglePageProfiling):
(WebKit::WebInspectorProxy::timelineRecordingChanged): Added.
(WebKit::WebInspectorProxy::showTimelines): Deleted.

* UIProcess/API/C/WKInspector.cpp:
(WKInspectorTogglePageProfiling):

* UIProcess/API/Cocoa/_WKInspector.h:
* UIProcess/API/Cocoa/_WKInspector.mm:
(-[_WKInspector showTimelines]): Deleted.

* WebProcess/InjectedBundle/API/c/WKBundleInspector.cpp:
(WKBundleInspectorSetPageProfilingEnabled):

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

14 months agoWeb Inspector: "Inspector.initialized" happens before breakpoints are set
drousso@apple.com [Fri, 2 Aug 2019 20:25:01 +0000 (20:25 +0000)]
Web Inspector: "Inspector.initialized" happens before breakpoints are set
https://bugs.webkit.org/show_bug.cgi?id=200364

Reviewed by Joseph Pecoraro.

Allow managers to register a promise that will delay `Inspector.initialized`. This is needed
when restoring breakpoints so that "Automatically Show Web Inspector for JSContexts" can set
them before any scripts have evaluated, ensuring that no breakpoints are "skipped".

* UserInterface/Protocol/Target.js:
(WI.Target.prototype.initialize):
(WI.Target.registerInitializationPromise): Added.

* UserInterface/Controllers/DOMDebuggerManager.js:
(WI.DOMDebuggerManager):
* UserInterface/Controllers/DebuggerManager.js:
(WI.DebuggerManager):

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

14 months agoWeb Inspector: Crash when interacting with Template Content in Console
commit-queue@webkit.org [Fri, 2 Aug 2019 20:22:18 +0000 (20:22 +0000)]
Web Inspector: Crash when interacting with Template Content in Console
https://bugs.webkit.org/show_bug.cgi?id=196280

Patch by Yury Semikhatsky <yurys@chromium.org> on 2019-08-02
Reviewed by Joseph Pecoraro.

Source/WebCore:

Test: inspector/dom/inspect-template-node.html

* bindings/js/JSDOMBindingSecurity.cpp:
(WebCore::canAccessDocument): if target element is from a
<template> use its host document to check the access. Elements
from the host document always have access to its template elements content.
* inspector/agents/InspectorDOMAgent.cpp:
(WebCore::InspectorDOMAgent::resolveNode): templates are created in
special template document which doesn't have a frame, in such case get
the frame from the host document.

LayoutTests:

* inspector/dom/inspect-template-node-expected.txt: Added.
* inspector/dom/inspect-template-node.html: Added.

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

14 months ago[iPadOS] slides.google.com: Full Screen API warning is presented when swiping through...
jer.noble@apple.com [Fri, 2 Aug 2019 20:09:06 +0000 (20:09 +0000)]
[iPadOS] slides.google.com: Full Screen API warning is presented when swiping through slides
https://bugs.webkit.org/show_bug.cgi?id=200313
<rdar://problem/53777001>

Reviewed by Eric Carlson.

Only run the secheuristic scoring during UIGestureRecognizerStateEnded, rather than both
UIGestureRecognizerStateEnded and UIGestureRecognizerStateBegan. The goal of the heuristic is
to detect fake on-screen keyboards by detecting gestures that look like "typing". Using only
UIGestureRecognizerStateEnded still allows us to do this (as typing will usually have identical
geometries for both Ended and Began) without generating false-positives during swipe gestures.

* UIProcess/ios/fullscreen/WKFullScreenViewController.mm:
(-[WKFullScreenViewController _touchDetected:]):

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

14 months agoHarden NodeRareData::m_connectedFrameCount
rniwa@webkit.org [Fri, 2 Aug 2019 20:07:11 +0000 (20:07 +0000)]
Harden NodeRareData::m_connectedFrameCount
https://bugs.webkit.org/show_bug.cgi?id=200300

Reviewed by Geoffrey Garen.

Use unsinged integer type in NodeRareData::m_connectedFrameCount since it's padded anyway.

* dom/Node.cpp:
(WebCore::Node::decrementConnectedSubframeCount): Check that hasRareNode() is true in release builds.
* dom/NodeRareData.h:

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

14 months agoDocument::resume should delay resetting of form control elements.
rniwa@webkit.org [Fri, 2 Aug 2019 19:58:50 +0000 (19:58 +0000)]
Document::resume should delay resetting of form control elements.
https://bugs.webkit.org/show_bug.cgi?id=200376

Reviewed by Geoffrey Garen.

Source/WebCore:

Delay the execution of form control element resets until the next task
to avoid synchronously mutating DOM during page cache restoration.

Test: fast/frames/restoring-page-cache-should-not-run-scripts.html

* html/HTMLFormElement.cpp:
(WebCore::HTMLFormElement::resumeFromDocumentSuspension):
* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::resumeFromDocumentSuspension):

LayoutTests:

Added a regression test.

* fast/frames/restoring-page-cache-should-not-run-scripts-expected.txt: Added.
* fast/frames/restoring-page-cache-should-not-run-scripts.html: Added.
* platform/win/TestExpectations: Skip this test on Windows since navigating to blob fails on Windows.

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

14 months ago[JSC] Use "destroy" function directly for JSWebAssemblyCodeBlock and WebAssemblyFunction
ysuzuki@apple.com [Fri, 2 Aug 2019 19:46:45 +0000 (19:46 +0000)]
[JSC] Use "destroy" function directly for JSWebAssemblyCodeBlock and WebAssemblyFunction
https://bugs.webkit.org/show_bug.cgi?id=200385

Reviewed by Mark Lam.

These CellTypes are not using classInfo stored in the cells, so we can just call JSWebAssemblyCodeBlock::destroy
and WebAssemblyFunction::destroy directly.

* wasm/js/JSWebAssemblyCodeBlockHeapCellType.cpp:
(JSC::JSWebAssemblyCodeBlockDestroyFunc::operator() const):
* wasm/js/WebAssemblyFunctionHeapCellType.cpp:
(JSC::WebAssemblyFunctionDestroyFunc::operator() const):

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

14 months ago[iOS] Directly use RealtimeMediaSourceCenter to compute the media capture state
youenn@apple.com [Fri, 2 Aug 2019 19:17:52 +0000 (19:17 +0000)]
[iOS] Directly use RealtimeMediaSourceCenter to compute the media capture  state
https://bugs.webkit.org/show_bug.cgi?id=200368
<rdar://problem/53191450>

Unreviewed.
Build fix by guarding with MEDIA_STREAM in addition to IOS.

* dom/Document.cpp:
(WebCore::Document::updateIsPlayingMedia):
(WebCore::Document::pageMutedStateDidChange):

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

14 months agoAdd accessibility object method to determine whether an element is inside a table...
commit-queue@webkit.org [Fri, 2 Aug 2019 19:10:02 +0000 (19:10 +0000)]
Add accessibility object method to determine whether an element is inside a table cell. Needed for iOS accessibility client.
https://bugs.webkit.org/show_bug.cgi?id=200394
<rdar://problem/52914964>

Patch by Andres Gonzalez <andresg_22@apple.com> on 2019-08-02
Reviewed by Chris Fleizach.

Source/WebCore:

Test: accessibility/ios-simulator/element-in-table-cell.html

Added _accessibilityIsInTableCell needed for iOS accessibility client.
* accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
(-[WebAccessibilityObjectWrapper _accessibilityIsInTableCell]):

Tools:

Glue code to exercise new method [WebAccessibilityObjectWrapper _accessibilityIsInTableCell].

* WebKitTestRunner/InjectedBundle/AccessibilityUIElement.cpp:
(WTR::AccessibilityUIElement::isInTableCell const):
* WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h:
* WebKitTestRunner/InjectedBundle/Bindings/AccessibilityUIElement.idl:
* WebKitTestRunner/InjectedBundle/ios/AccessibilityUIElementIOS.mm:
(WTR::AccessibilityUIElement::isInTableCell const):

LayoutTests:

New test that exercises [WebAccessibilityObjectWrapper _accessibilityIsInTableCell].

* accessibility/ios-simulator/element-in-table-cell-expected.txt: Added.
* accessibility/ios-simulator/element-in-table-cell.html: Added.

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

14 months ago[results.webkit.org Timeline] Using transform matrix to calculate the tag rotation...
commit-queue@webkit.org [Fri, 2 Aug 2019 19:03:35 +0000 (19:03 +0000)]
[results.webkit.org Timeline] Using transform matrix to calculate the tag rotation position
https://bugs.webkit.org/show_bug.cgi?id=200397

Patch by Zhifei Fang <zhifei_fang@apple.com> on 2019-08-02
Reviewed by Jonathan Bedard.

* resultsdbpy/resultsdbpy/view/static/library/js/components/TimelineComponents.js:

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

14 months ago[macOS, iOS] webaudio/silent-audio-interrupted-in-background.html sometimes crashes
eric.carlson@apple.com [Fri, 2 Aug 2019 18:58:46 +0000 (18:58 +0000)]
[macOS, iOS] webaudio/silent-audio-interrupted-in-background.html sometimes crashes
https://bugs.webkit.org/show_bug.cgi?id=200396
<rdar://problem/53819720>

Reviewed by Youenn Fablet.

No new test, this fixes an existing test.

* platform/graphics/avfoundation/AudioSourceProviderAVFObjC.mm:
(WebCore::AudioSourceProviderAVFObjC::~AudioSourceProviderAVFObjC): Drop the
lock before clearing m_tapStorage.

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

14 months ago[macOS 10.15] Image dragged from Safari does not appear in Notes
wenson_hsieh@apple.com [Fri, 2 Aug 2019 18:49:58 +0000 (18:49 +0000)]
[macOS 10.15] Image dragged from Safari does not appear in Notes
https://bugs.webkit.org/show_bug.cgi?id=188490
<rdar://problem/39462717>

Reviewed by Andy Estes.

Source/WebKit:

Removes some logic that clears out the cached promised drag image in the UI process when WebKit is asked to
provide TIFF image data. This prevents the drop destination from asking for promised image data, if anything
else (e.g. the system) also asks the web view to provide the same data. Additionally, this logic didn't
previously guarantee that the promised image would be cleared anyways, since it is dependent on the drop target
actually requesting the promised image in order to perform the cleanup.

In lieu of clearing the promised drag image when it's requested, we instead clear it out upon mainframe
navigation, in PageClientImpl::didCommitLoadForMainFrame.

Test: DragAndDropTests.MultiplePromisedImageDataRequests

* UIProcess/Cocoa/WebViewImpl.h:
* UIProcess/Cocoa/WebViewImpl.mm:
(WebKit::WebViewImpl::clearPromisedDragImage):
(WebKit::WebViewImpl::pasteboardChangedOwner):
(WebKit::WebViewImpl::provideDataForPasteboard):

Fix the bug by not immediately clearing out the promised drag image.

* UIProcess/mac/PageClientImplMac.mm:
(WebKit::PageClientImpl::didCommitLoadForMainFrame):

Tools:

Add a test to verify that promised image data can be delivered to multiple pasteboards when performing a drop.

* TestWebKitAPI/Tests/mac/DragAndDropTestsMac.mm:

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

14 months agoAdd build check for libwebrtc ObjectiveC names
youenn@apple.com [Fri, 2 Aug 2019 18:47:28 +0000 (18:47 +0000)]
Add build check for libwebrtc ObjectiveC names
https://bugs.webkit.org/show_bug.cgi?id=200365

Reviewed by Eric Carlson.

Only allow ObjectiveC names starting with WK_RTC.

* libwebrtc.xcodeproj/project.pbxproj:

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

14 months agomacCatalyst build fails the first attempt, requires a second build
krollin@apple.com [Fri, 2 Aug 2019 18:39:38 +0000 (18:39 +0000)]
macCatalyst build fails the first attempt, requires a second build
https://bugs.webkit.org/show_bug.cgi?id=200242
<rdar://problem/53678481>

macCatalyst builds fail the first time with an error like:

    Code Signing Error: The file
    "/Users/tim_cook/Build/Debug-maccatalyst/DerivedSources/WebKit2/WebContent-macCatalyst-no-sandbox.entitlements"
    could not be opened. Verify the value of the
    CODE_SIGN_ENTITLEMENTS build setting for target "WebContent" is
    correct and that the file exists on disk.

This problem is caused by the file referenced by
CODE_SIGN_ENTITLEMENTS changing during the build process. For
macCatalyst builds, we start with the iOS entitlements files and then
tweak them for macCatalyst. When this occurs during a clean build,
Xcode sees the entitlements file being generated and complains about
it. Restarting the build does so with the file already existing, and
so Xcode does not complain about it.

The approach of generating or tweaking entitlement files may have
worked in the past, but the fact is that Xcode doesn't support it.

We had a similar problem with macOS builds. The entitlements files
used to be generated on the fly with scripts like
WebKit/Scripts/process-network-sandbox-entitlements.sh. That process
was reworked to avoid the issue with Xcode not allowing the files to
be generated (see r241135). In short:

o The various process-*-entitlements.sh scripts were consolidated into
  a single process-entitlements file
o CODE_SIGN_ENTITLEMENTS, which contains the name of the entitlements
  file to use, was de-initialized so that Xcode would not try to
  access our generated entitlements file
o CODE_SIGN_INJECT_BASE_ENTITLEMENTS (which injects some base
  entitlements) was set to NO. If it were left set to YES, Xcode would
  create its own entitlements file and use it as if it were specified
  in CODE_SIGN_ENTITLEMENTS
o WK_LIBRARY_VALIDATION_CODE_SIGN_FLAGS was updated with an
  "--entitlements <generated_file>" option.
  WK_LIBRARY_VALIDATION_CODE_SIGN_FLAGS was then used to initialize
  OTHER_CODE_SIGN_FLAGS. By specifying the entitlements file this way,
  we avoid Xcode complaining about it.

This approach works well for macOS, and so we now also use it to
address the issue with macCatalyst. While we're at it, convert the
rest of the platforms to use the same approach and also generate their
entitlements from the process-entitlements script.

The new process was validated by performing a build with the old
process and the new process, and then comparing the entitlements of
the resulting XPC services to make sure they were the same. Builds
were performed for all platforms, and for Engineering and Production
builds.

Reviewed by Brent Fulgham.

* Configurations/BaseXPCService.xcconfig:
* Configurations/Network-iOS.entitlements: Removed.
* Configurations/Network-macCatalyst.entitlements: Removed.
* Configurations/NetworkService.xcconfig:
* Configurations/PluginService.64.xcconfig:
* Configurations/PluginService.entitlements: Removed.
* Configurations/WebContent-iOS.entitlements: Removed.
* Configurations/WebContent-macCatalyst.entitlements: Removed.
* Configurations/WebContentService.Development.xcconfig:
* Configurations/WebContentService.xcconfig:
* Scripts/copy-webcontent-resources-to-private-headers.sh:
* Scripts/process-entitlements.sh:
* WebKit.xcodeproj/project.pbxproj:

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

14 months agoFix API test after r248139
achristensen@apple.com [Fri, 2 Aug 2019 18:27:13 +0000 (18:27 +0000)]
Fix API test after r248139
https://bugs.webkit.org/show_bug.cgi?id=200102

* TestWebKitAPI/Tests/WebKitCocoa/AdditionalReadAccessAllowedURLsPlugin.mm:
(-[AdditionalReadAccessAllowedURLsPlugIn webProcessPlugIn:didCreateBrowserContextController:]):
This was supposed to be removed as part of reverting r245322.

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

14 months agoGardening: build fix.
mark.lam@apple.com [Fri, 2 Aug 2019 18:16:52 +0000 (18:16 +0000)]
Gardening: build fix.
https://bugs.webkit.org/show_bug.cgi?id=200149
<rdar://problem/53570112>

Not reviewed.

* assembler/CPU.cpp:
(JSC::hwPhysicalCPUMax):

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

14 months ago[iOS] Directly use RealtimeMediaSourceCenter to compute the media capture state
youenn@apple.com [Fri, 2 Aug 2019 17:34:47 +0000 (17:34 +0000)]
[iOS] Directly use RealtimeMediaSourceCenter to compute the media capture  state
https://bugs.webkit.org/show_bug.cgi?id=200368
<rdar://problem/53191450>

Reviewed by Eric Carlson.

Instead of registering a MediaStreamTrack as a media producer to compute capture state,
go directly to the sources from the RealtimeMediaSourceCenter.
Do the same when requested to mute capture tracks.

No observable change of behavior.
Covered by manual test on iOS and existing tests.

* Modules/mediastream/MediaStreamTrack.cpp:
(WebCore::MediaStreamTrack::MediaStreamTrack):
(WebCore::MediaStreamTrack::~MediaStreamTrack):
(WebCore::MediaStreamTrack::mediaState const):
(WebCore::sourceCaptureState):
(WebCore::MediaStreamTrack::captureState):
(WebCore::MediaStreamTrack::muteCapture):
* Modules/mediastream/MediaStreamTrack.h:
* dom/Document.cpp:
(WebCore::Document::updateIsPlayingMedia):
(WebCore::Document::pageMutedStateDidChange):

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

14 months agoUnreviewed, rolling out r248156.
commit-queue@webkit.org [Fri, 2 Aug 2019 17:33:08 +0000 (17:33 +0000)]
Unreviewed, rolling out r248156.
https://bugs.webkit.org/show_bug.cgi?id=200393

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

Reverted changeset:

"Add build check for libwebrtc ObjectiveC names"
https://bugs.webkit.org/show_bug.cgi?id=200365
https://trac.webkit.org/changeset/248156

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

14 months agoFix an internal build after r248139
achristensen@apple.com [Fri, 2 Aug 2019 17:30:45 +0000 (17:30 +0000)]
Fix an internal build after r248139
https://bugs.webkit.org/show_bug.cgi?id=200102

* wtf/cocoa/FileSystemCocoa.mm:
Some internal builds couldn't find BOM framework headers.
No problem.  They're not needed.  Just remove references to them.

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

14 months agoAdd build check for libwebrtc ObjectiveC names
youenn@apple.com [Fri, 2 Aug 2019 17:04:15 +0000 (17:04 +0000)]
Add build check for libwebrtc ObjectiveC names
https://bugs.webkit.org/show_bug.cgi?id=200365

Reviewed by Eric Carlson.

Only allow ObjectiveC names starting with WK_RTC.

* libwebrtc.xcodeproj/project.pbxproj:

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

14 months agoDOMWindow properties may get GC'd before their Window object
cdumez@apple.com [Fri, 2 Aug 2019 16:43:56 +0000 (16:43 +0000)]
DOMWindow properties may get GC'd before their Window object
https://bugs.webkit.org/show_bug.cgi?id=200359

Reviewed by Ryosuke Niwa.

Source/WebCore:

DOMWindow properties may get GC'd before their Window object once their frame is detached. This
is unexpected behavior given that these properties persist on the Window after the frame is
detached. This patch thus updates their bindings so that they live as long as their window, not
their frame.

Note that this also fixes a thread-safety issue since DOMWindowProperty::frame() would get called
from GC threads, although its implementation looks like:
"""
  return m_window ? m_window->frame() : nullptr;
"""

Because m_window is a WeakPtr<DOMWindow> and because windows get destroyed on the main thread,
we could in theory crash when dereferencing m_window->frame() from the GC thread.

Test: fast/dom/dom-window-property-gc-after-frame-detach.html

* bindings/js/JSDOMWindowCustom.cpp:
(WebCore::JSDOMWindow::visitAdditionalChildren):
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateImplementation):
* bindings/scripts/IDLAttributes.json:
* css/StyleMedia.idl:
* loader/appcache/DOMApplicationCache.idl:
* page/BarProp.idl:
* page/DOMSelection.idl:
* page/History.idl:
* page/Location.idl:
* page/Navigator.idl:
* page/Screen.idl:
* page/VisualViewport.idl:
* plugins/DOMMimeTypeArray.idl:
* plugins/DOMPluginArray.idl:
* storage/Storage.idl:

LayoutTests:

Add layout test coverage.

* fast/dom/dom-window-property-gc-after-frame-detach-expected.txt: Added.
* fast/dom/dom-window-property-gc-after-frame-detach.html: Added.

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

14 months agoUnreviewed. Update OptionsGTK.cmake and NEWS for 2.25.4 release
carlosgc@webkit.org [Fri, 2 Aug 2019 13:22:28 +0000 (13:22 +0000)]
Unreviewed. Update OptionsGTK.cmake and NEWS for 2.25.4 release

.:

* Source/cmake/OptionsGTK.cmake: Bump version numbers

Source/WebKit:

* gtk/NEWS: Add release notes for 2.25.4.

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

14 months agoRemove constructors and operators of FontPlatformData defined only for Freetype
annulen@yandex.ru [Fri, 2 Aug 2019 10:20:48 +0000 (10:20 +0000)]
Remove constructors and operators of FontPlatformData defined only for Freetype
https://bugs.webkit.org/show_bug.cgi?id=200379

Reviewed by Carlos Garcia Campos.

These methods only make maintenance harder, as all data fields are
trivially copyable. Constructors generated by compiler should be used
instead.

* platform/graphics/FontPlatformData.h:
* platform/graphics/freetype/FontPlatformDataFreeType.cpp:

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

14 months agoRemove unused constructor declaration from FontPlatformData
annulen@yandex.ru [Fri, 2 Aug 2019 08:58:35 +0000 (08:58 +0000)]
Remove unused constructor declaration from FontPlatformData
https://bugs.webkit.org/show_bug.cgi?id=200371

Reviewed by Carlos Garcia Campos.

It is not implemented by any port.

* platform/graphics/FontPlatformData.h:

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

14 months ago[SOUP] WebSockets: use SOUP_WEBSOCKET_CLOSE_NO_STATUS when closing with no status
commit-queue@webkit.org [Fri, 2 Aug 2019 08:56:47 +0000 (08:56 +0000)]
[SOUP] WebSockets: use SOUP_WEBSOCKET_CLOSE_NO_STATUS when closing with no status
https://bugs.webkit.org/show_bug.cgi?id=200338

Patch by Carlos Garcia Campos <cgarcia@igalia.com> on 2019-08-02
Reviewed by Alex Christensen.

Source/WebKit:

* NetworkProcess/soup/WebSocketTaskSoup.cpp:
(WebKit::WebSocketTask::close):

LayoutTests:

Remove failure expectation for http/tests/websocket/tests/hybi/client-close.html

* platform/gtk/TestExpectations:
* platform/wpe/TestExpectations:

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

14 months agoGetterSetter type confusion during DFG compilation
ysuzuki@apple.com [Fri, 2 Aug 2019 05:58:20 +0000 (05:58 +0000)]
GetterSetter type confusion during DFG compilation
https://bugs.webkit.org/show_bug.cgi?id=199903

Reviewed by Mark Lam.

JSTests:

* stress/cse-propagated-constant-may-not-follow-structure-restrictions.js: Added.

Source/JavaScriptCore:

In AI, we are strongly assuming that GetGetter's child constant value should be GetterSetter if it exists.
However, this can be wrong since nobody ensures that. AI assumed so because the control-flow and preceding
CheckStructure ensures that. But this preceding check can be eliminated if the node becomes (at runtime) unreachable.

Let's consider the following graph.

    129:<!0:->     PutByOffset(KnownCell:@115, KnownCell:@115, Check:Untyped:@124, MustGen, id5{length}, 0, W:NamedProperties(5), ClobbersExit, bc#154, ExitValid)
    130:<!0:->     PutStructure(KnownCell:@115, MustGen, %C8:Object -> %C3:Object, ID:7726, R:JSObject_butterfly, W:JSCell_indexingType,JSCell_structureID,JSCell_typeInfoFlags,JSCell_typeInfoType, ClobbersExit, bc#154, ExitInvalid)
    ...
    158:<!0:->     GetLocal(Check:Untyped:@197, JS|MustGen|UseAsOther, Final, loc7(R<Final>/FlushedCell), R:Stack(-8), bc#187, ExitValid)  predicting Final
    210:< 1:->     DoubleRep(Check:NotCell:@158, Double|PureInt, BytecodeDouble, Exits, bc#187, ExitValid)
    ...
    162:<!0:->     CheckStructure(Cell:@158, MustGen, [%Ad:Object], R:JSCell_structureID, Exits, bc#192, ExitValid)
    163:< 1:->     GetGetterSetterByOffset(KnownCell:@158, KnownCell:@158, JS|UseAsOther, OtherCell, id5{length}, 0, R:NamedProperties(5), Exits, bc#192, ExitValid)
    164:< 1:->     GetGetter(KnownCell:@163, JS|UseAsOther, Function, R:GetterSetter_getter, Exits, bc#192, ExitValid)

At @163 and @164, AI proves that @158's AbstractValue is None because @210's edge filters out Cells @158 is a cell. But we do not invalidate graph status as "Invalid" even if edge filters out all possible value.
This is because the result of edge can be None in a valid program. For example, we can put a dependency edge between a consuming node and a producing node, where the producing node is just like a check and it
does not produce a value actually. So, @163 and @164 are not invalidated. This is totally fine in our compiler pipeline right now.

But after that, global CSE phase found that @115 and @158 are same and @129 dominates @158. As a result, we can replace GetGetter child's @163 with @124. Since CheckStructure is already removed (and now, at runtime,
@163 and @164 are never executed), we do not have any structure guarantee on @158 and the result of @163. This means that @163's CSE result can be non-GetterSetter value.

    124:< 2:->     JSConstant(JS|UseAsOther, Final, Weak:Object: 0x1199e82a0 with butterfly 0x0 (Structure %B4:Object), StructureID: 49116, bc#0, ExitValid)
    ...
    126:< 2:->     GetGetter(KnownCell:Kill:@124, JS|UseAsOther, Function, R:GetterSetter_getter, Exits, bc#192, ExitValid)

AI filters out @124's non-cell values. But @126 can get non-GetterSetter cell at AI phase. But our AI code is like the following.

    JSValue base = forNode(node->child1()).m_value;
    if (base) {
        GetterSetter* getterSetter = jsCast<GetterSetter*>(base);
        ...

Then, jsCast casts the above object with GetterSetter accidentally.

In general, DFG AI can get a proven constant value, which could not be shown at runtime. This happens if the processing node is unreachable at runtime while the graph is not invalid yet, because preceding edge
filters already filter out all the possible execution. DFG AI already considered about this possibility, and it attempts to fold a node into a constant only when the constant input matches against the expected one.
But several DFG nodes are not handling this correctly: GetGetter, GetSetter, and SkipScope.

In this patch, we use `jsDynamicCast` to ensure that the constant input matches against the expected (foldable) one, and fold it only when the expectation is met.
We also remove DFG::Node::castConstant and its use. We should not rely on the constant folded value based on graph's control-flow.

* dfg/DFGAbstractInterpreterInlines.h:
(JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):
* dfg/DFGNode.h:
(JSC::DFG::Node::castConstant): Deleted.
* ftl/FTLLowerDFGToB3.cpp:
(JSC::FTL::DFG::LowerDFGToB3::compileMaterializeCreateActivation):

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

14 months agoPages using MessagePorts should be PageCacheable
cdumez@apple.com [Fri, 2 Aug 2019 05:46:32 +0000 (05:46 +0000)]
Pages using MessagePorts should be PageCacheable
https://bugs.webkit.org/show_bug.cgi?id=200366
<rdar://problem/53837882>

Reviewed by Geoffrey Garen.

Source/WebCore:

Allow a page to enter PageCache, even if it has MessagePorts (potentially with
pending messages). If there are pending messages on the MessagePorts when
entering PageCache, those will get dispatched upon restoring from PageCache.

Test: fast/history/page-cache-MessagePort-pending-message.html

* dom/MessagePort.cpp:
(WebCore::MessagePort::messageAvailable):
(WebCore::MessagePort::dispatchMessages):
Do not dispatch messages while in PageCache.

(WebCore::MessagePort::canSuspendForDocumentSuspension const):
Allow pages with MessagePort objects to enter PageCache.

* dom/ScriptExecutionContext.cpp:
(WebCore::ScriptExecutionContext::resumeActiveDOMObjects):
Make sure pending messages on MessagePorts get dispatched asynchronously after restoring
from PageCache.

* loader/DocumentLoader.cpp:
(WebCore::areAllLoadersPageCacheAcceptable):
Make sure only CachedResources that are still loading upon load cancelation prevent
entering PageCache.

LayoutTests:

Add layout test coverage.

* fast/history/page-cache-MessagePort-pending-message-expected.txt: Added.
* fast/history/page-cache-MessagePort-pending-message.html: Added.

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

14 months agoFix compilation of PageConsoleClient with !ENABLE(VIDEO)
annulen@yandex.ru [Fri, 2 Aug 2019 04:30:38 +0000 (04:30 +0000)]
Fix compilation of PageConsoleClient with !ENABLE(VIDEO)
https://bugs.webkit.org/show_bug.cgi?id=200380

Reviewed by Joseph Pecoraro.

* page/PageConsoleClient.cpp:
(WebCore::PageConsoleClient::screenshot):

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

14 months agoresults.webkit.org: Force update cache when timeline updated
commit-queue@webkit.org [Fri, 2 Aug 2019 03:50:15 +0000 (03:50 +0000)]
results.webkit.org: Force update cache when timeline updated
https://bugs.webkit.org/show_bug.cgi?id=200363

Patch by Zhifei Fang <zhifei_fang@apple.com> on 2019-08-01
Reviewed by Jonathan Bedard.

* resultsdbpy/resultsdbpy/view/static/library/js/components/TimelineComponents.js:
(offscreenCachedRenderFactory): Add ability to force the redraw.
(Timeline.CanvasSeriesComponent): Force redraw when scales or dots are updated.
(Timeline.CanvasXAxisComponent): Force redraw when scales are updated. Add missing exporter for export scales update API

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

14 months agofast/forms/ios/file-upload-panel.html is flaky on iOS 13
cdumez@apple.com [Fri, 2 Aug 2019 03:45:39 +0000 (03:45 +0000)]
fast/forms/ios/file-upload-panel.html is flaky on iOS 13
https://bugs.webkit.org/show_bug.cgi?id=200357
<rdar://problem/53028551>

Reviewed by Zalan Bujtas.

Use UIHelper.activateElementAtHumanSpeed() instead of UIHelper.activateElement()
to address flakiness. If the button taps are issued to quickly, some of them
get swallowed.

* fast/forms/ios/file-upload-panel.html:

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

14 months agoDo not send NetworkProcessProxy::LogTestingEvent message if we are not testing
commit-queue@webkit.org [Fri, 2 Aug 2019 01:59:08 +0000 (01:59 +0000)]
Do not send NetworkProcessProxy::LogTestingEvent message if we are not testing
https://bugs.webkit.org/show_bug.cgi?id=200360

Patch by Alex Christensen <achristensen@webkit.org> on 2019-08-01
Reviewed by Tim Horton.

Source/WebKit:

Sending this message causes instantiation of the default WebsiteDataStore in the UIProcess,
which causes more memory to be used than is needed if we are browsing without the default WebsiteDataStore.

Covered by an API test.

* NetworkProcess/Classifier/WebResourceLoadStatisticsStore.cpp:
(WebKit::WebResourceLoadStatisticsStore::logTestingEvent):
* NetworkProcess/NetworkSession.cpp:
(WebKit::NetworkSession::NetworkSession):
* NetworkProcess/NetworkSession.h:
(WebKit::NetworkSession::enableResourceLoadStatisticsLogTestingEvent const):
* NetworkProcess/NetworkSessionCreationParameters.cpp:
(WebKit::NetworkSessionCreationParameters::encode const):
(WebKit::NetworkSessionCreationParameters::decode):
* NetworkProcess/NetworkSessionCreationParameters.h:
* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::ensureNetworkProcess):
* UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm:
(WebKit::WebsiteDataStore::parameters):
* UIProcess/WebsiteData/WebsiteDataStore.h:
(WebKit::WebsiteDataStore::hasStatisticsTestingCallback const):

Tools:

* TestWebKitAPI/Tests/WebKitCocoa/ResourceLoadStatistics.mm:
(cleanupITPDatabase):
(TEST):

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

14 months agoAdd crash diagnostics for debugging unexpected zapped cells.
mark.lam@apple.com [Fri, 2 Aug 2019 01:58:11 +0000 (01:58 +0000)]
Add crash diagnostics for debugging unexpected zapped cells.
https://bugs.webkit.org/show_bug.cgi?id=200149
<rdar://problem/53570112>

Reviewed by Yusuke Suzuki.

Source/JavaScriptCore:

Add a check for zapped cells in SlotVisitor::appendToMarkStack() and
SlotVisitor::visitChildren().  If a zapped cell is detected, we will crash with
some diagnostic info.

To facilitate this, we've made the following changes:
1. Changed FreeCell to preserve the 1st 8 bytes.  This is fine to do because all
   cells are at least 16 bytes long.
2. Changed HeapCell::zap() to only zap the structureID.  Leave the rest of the
   cell header info intact (including the cell JSType).
3. Changed HeapCell::zap() to record the reason for zapping the cell.  We stash
   the reason immediately after the first 8 bytes.  This is the same location as
   FreeCell::scrambledNext.  However, since a cell is not expected to be zapped
   and on the free list at the same time, it is also fine to do this.
4. Added a few utility functions to MarkedBlock for checking if a cell points
   into the block.
5. Added VMInspector and JSDollarVM utilities to dump in-use subspace hashes.
6. Added some comments to document the hashes of known subspaces.
7. Added Options::dumpZappedCellCrashData() to make this check conditional.
   We use this option to disable this check for slower machines so that their
   PLT5 performance is not impacted.

* assembler/CPU.cpp:
(JSC::hwL3CacheSize):
(JSC::hwPhysicalCPUMax):
* assembler/CPU.h:
(JSC::hwL3CacheSize):
(JSC::hwPhysicalCPUMax):
* heap/FreeList.h:
(JSC::FreeCell::offsetOfScrambledNext):
* heap/HeapCell.h:
(JSC::HeapCell::zap):
(JSC::HeapCell::isZapped const):
* heap/MarkedBlock.cpp:
(JSC::MarkedBlock::Handle::stopAllocating):
* heap/MarkedBlock.h:
(JSC::MarkedBlock::Handle::start const):
(JSC::MarkedBlock::Handle::end const):
(JSC::MarkedBlock::Handle::contains const):
* heap/MarkedBlockInlines.h:
(JSC::MarkedBlock::Handle::specializedSweep):
* heap/MarkedSpace.h:
(JSC::MarkedSpace::forEachSubspace):
* heap/SlotVisitor.cpp:
(JSC::SlotVisitor::appendToMarkStack):
(JSC::SlotVisitor::visitChildren):
(JSC::SlotVisitor::reportZappedCellAndCrash):
* heap/SlotVisitor.h:
* jit/AssemblyHelpers.cpp:
(JSC::AssemblyHelpers::emitAllocateWithNonNullAllocator):
* runtime/Options.cpp:
(JSC::Options::initialize):
* runtime/Options.h:
* runtime/VM.cpp:
(JSC::VM::VM):
* tools/JSDollarVM.cpp:
(JSC::functionDumpSubspaceHashes):
(JSC::JSDollarVM::finishCreation):
* tools/VMInspector.cpp:
(JSC::VMInspector::dumpSubspaceHashes):
* tools/VMInspector.h:

Source/WebCore:

No new tests because this is a feature for debugging crashes.  It has been tested
manually by modifying the code to force a crash at the point of interest.

Added some comments to document the hashes of known subspaces.

* bindings/js/WebCoreJSClientData.cpp:
(WebCore::JSVMClientData::JSVMClientData):

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

14 months agoUnreviewed, remove `emulateUserGesture` parameter from `Debugger.evaluateOnCallFrame...
drousso@apple.com [Fri, 2 Aug 2019 00:03:46 +0000 (00:03 +0000)]
Unreviewed, remove `emulateUserGesture` parameter from `Debugger.evaluateOnCallFrame` for iOS 13

Rubber-stamped by Joseph Pecoraro.

* UserInterface/Protocol/Legacy/13.0/InspectorBackendCommands.js:
* Versions/Inspector-iOS-13.0.json:
The iOS 13 protocol has already been decided, so these shouldn't have been added unless they
were cherry-picked in.

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

14 months ago[WHLSL] Do simple nullptr check elimination using basic data flow analysis when gener...
sbarati@apple.com [Thu, 1 Aug 2019 23:13:37 +0000 (23:13 +0000)]
[WHLSL] Do simple nullptr check elimination using basic data flow analysis when generating metal code
https://bugs.webkit.org/show_bug.cgi?id=200352

Reviewed by Myles C. Maxfield.

When doing metal code generation, we frequently know whether something
is null or not. This patch does a basic propagation of this information
to avoid emitting excessive null checks in the generated Metal code.
This is a 6% speedup (with a p value of 0.0001) in Metal compile times
on compute_boids.

An example of a null check we now eliminate is:
```
int x;
thread int* ptr = &x; // We know that the lvalue for "x" is non-null, so we produce a non-null rvalue here.
*ptr = 42; // We know that the "ptr" rvalue is non-null, so we omit the null check.
```

* Modules/webgpu/WHLSL/Metal/WHLSLFunctionWriter.cpp:
(WebCore::WHLSL::Metal::FunctionDefinitionWriter::appendRightValueWithNullability):
(WebCore::WHLSL::Metal::FunctionDefinitionWriter::appendRightValue):
(WebCore::WHLSL::Metal::FunctionDefinitionWriter::appendLeftValue):
(WebCore::WHLSL::Metal::FunctionDefinitionWriter::takeLastValueAndNullability):
(WebCore::WHLSL::Metal::FunctionDefinitionWriter::takeLastLeftValue):
(WebCore::WHLSL::Metal::FunctionDefinitionWriter::visit):

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

14 months agoMove FormData zip file generation to NetworkProcess and enable it for all WebKit...
commit-queue@webkit.org [Thu, 1 Aug 2019 22:29:52 +0000 (22:29 +0000)]
Move FormData zip file generation to NetworkProcess and enable it for all WebKit clients for uploading directories
https://bugs.webkit.org/show_bug.cgi?id=200102
<rdar://problem/53275114>

Patch by Alex Christensen <achristensen@webkit.org> on 2019-08-01
Reviewed by Darin Adler.

Source/WebCore:

To enable directory uploading in WebKit2, we extended WebKit1's model of asking the application to generate a file for uploading.
This means the WebProcess needed access to everything necessary to zip a whole directory, and clients that have not implemented
the strange WKBundlePageUIClient callbacks won't be able to upload directories.  Safari's implementation had already been copied
to BlobDataFileReference::generateReplacementFile, so I reused that code to do the zipping.  Instead of a complicated model of
keeping track of a filename, possibly a generated filename, and whether we think we own the file or not and having nobody clean up,
we now do the generation, use, and cleaning up in the network process starting with a new function generateFilesForUpload.
This removes unimplemented SPI in WebUIDelegatePrivate in WebKitLegacy and stops calling the WKBundlePageUIClient related to upload
file generation and replaces them with automatic behavior equivalent to Safari's implementation of the WKBundlePageUIClient calls.
Since we no longer need to do these file operations in the WebProcess, I am also reverting r245322 and r246077 which tightens the sandbox.

Covered by an API test.

* Modules/fetch/FetchBody.cpp:
(WebCore::FetchBody::extract):
(WebCore::FetchBody::bodyAsFormData const):
* loader/FormSubmission.cpp:
(WebCore::FormSubmission::create):
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::submitForm):
(WebCore::FrameLoader::loadDifferentDocumentItem):
* loader/ResourceLoader.cpp:
(WebCore::ResourceLoader::didReceiveResponse):
(WebCore::ResourceLoader::cleanupForError):
* page/Chrome.cpp:
(WebCore::ChromeClient::shouldReplaceWithGeneratedFileForUpload): Deleted.
(WebCore::ChromeClient::generateReplacementFile): Deleted.
* page/ChromeClient.h:
* platform/network/FormData.cpp:
(WebCore::FormData::FormData):
(WebCore::FormData::~FormData):
(WebCore::FormData::createMultiPart):
(WebCore::FormDataElement::lengthInBytes const):
(WebCore::FormData::appendFile):
(WebCore::FormData::appendFileRange):
(WebCore::FormData::appendMultiPartFileValue):
(WebCore::FormData::appendMultiPartKeyValuePairItems):
(WebCore::FormData::resolveBlobReferences):
(WebCore::generateFileForUpload):
(WebCore::FormData::generateFilesForUpload):
(WebCore::FormData::generateFiles): Deleted.
(WebCore::FormData::hasGeneratedFiles const): Deleted.
(WebCore::FormData::hasOwnedGeneratedFiles const): Deleted.
(WebCore::FormData::removeGeneratedFilesIfNeeded): Deleted.
* platform/network/FormData.h:
(WebCore::FormDataElement::FormDataElement):
(WebCore::FormDataElement::EncodedFileData::isolatedCopy const):
(WebCore::FormDataElement::EncodedFileData::operator== const):
(WebCore::FormDataElement::EncodedFileData::encode const):
(WebCore::FormDataElement::EncodedFileData::decode):
* platform/network/cf/FormDataStreamCFNet.cpp:
(WebCore::advanceCurrentStream):
(WebCore::formCreate):
(WebCore::formFinalize):
(WebCore::createHTTPBodyCFReadStream):
* platform/network/mac/BlobDataFileReferenceMac.mm:
(WebCore::generateFileForUpload):
(WebCore::BlobDataFileReference::generateReplacementFile):
* xml/XMLHttpRequest.cpp:
(WebCore::XMLHttpRequest::send):

Source/WebKit:

* NetworkProcess/NetworkResourceLoadParameters.cpp:
(WebKit::NetworkResourceLoadParameters::encode const):
* Platform/IPC/FormDataReference.h:
(IPC::FormDataReference::encode const):
* Resources/SandboxProfiles/ios/com.apple.WebKit.Networking.sb:
* WebProcess/InjectedBundle/API/APIInjectedBundlePageUIClient.h:
(API::InjectedBundle::PageUIClient::shouldGenerateFileForUpload): Deleted.
(API::InjectedBundle::PageUIClient::generateFileForUpload): Deleted.
* WebProcess/InjectedBundle/InjectedBundlePageUIClient.cpp:
(WebKit::InjectedBundlePageUIClient::shouldGenerateFileForUpload): Deleted.
(WebKit::InjectedBundlePageUIClient::generateFileForUpload): Deleted.
* WebProcess/InjectedBundle/InjectedBundlePageUIClient.h:
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::shouldReplaceWithGeneratedFileForUpload): Deleted.
(WebKit::WebChromeClient::generateReplacementFile): Deleted.
* WebProcess/WebCoreSupport/WebChromeClient.h:
* WebProcess/com.apple.WebProcess.sb.in:

Source/WebKitLegacy/mac:

* DefaultDelegates/WebDefaultUIDelegate.mm:
(-[WebDefaultUIDelegate webView:shouldReplaceUploadFile:usingGeneratedFilename:]): Deleted.
(-[WebDefaultUIDelegate webView:generateReplacementFile:]): Deleted.
* WebCoreSupport/WebChromeClient.h:
* WebCoreSupport/WebChromeClient.mm:
(WebChromeClient::shouldReplaceWithGeneratedFileForUpload): Deleted.
(WebChromeClient::generateReplacementFile): Deleted.
* WebView/WebUIDelegatePrivate.h:

Source/WTF:

Move code from BlobDataFileReference::generateReplacementFile to FileSystem::createZipArchive.

* wtf/FileSystem.cpp:
(WTF::FileSystemImpl::createZipArchive):
* wtf/FileSystem.h:
* wtf/cocoa/FileSystemCocoa.mm:
(WTF::FileSystemImpl::createZipArchive):

Tools:

Add an API test that is Mac-only right now because runOpenPanelWithParameters is only supported on Mac for some reason
and because clicking on a TestWKWebView only works on Mac.

* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKitCocoa/UploadDirectory.mm: Added.
(-[UploadDelegate initWithDirectory:]):
(-[UploadDelegate webView:runOpenPanelWithParameters:initiatedByFrame:completionHandler:]):
(-[UploadDelegate sentDirectory]):
(TEST):
* TestWebKitAPI/cocoa/TestWKWebView.h:
* TestWebKitAPI/cocoa/TestWKWebView.mm:
(-[TestWKWebView sendClickAtPoint:]):

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

14 months ago[results.webkit.org] Timeline.CanvasXAxisComponent height should be defined by option
commit-queue@webkit.org [Thu, 1 Aug 2019 21:45:42 +0000 (21:45 +0000)]
[results.webkit.org] Timeline.CanvasXAxisComponent height should be defined by option
https://bugs.webkit.org/show_bug.cgi?id=200321

Patch by Zhifei Fang <zhifei_fang@apple.com> on 2019-08-01
Reviewed by Jonathan Bedard.

*resultsdbpy/resultsdbpy/view/static/library/js/components/TimelineComponents.js:
Let the axis' height be defined in the option. Timeine component will use this value as
padding-top for headers which allows headers start in the right position, even with multiple
top axises.
(Timeline.CanvasSeriesComponent):
(prototype.Timeline.CanvasContainer):

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

14 months agoFix bug in testMulImm32SignExtend
keith_miller@apple.com [Thu, 1 Aug 2019 21:30:39 +0000 (21:30 +0000)]
Fix bug in testMulImm32SignExtend
https://bugs.webkit.org/show_bug.cgi?id=200358

Reviewed by Mark Lam.

Also, have it run in more configurations.

* b3/testb3_2.cpp:
(testMulImm32SignExtend):
* b3/testb3_3.cpp:
(addArgTests):

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

14 months agoREGRESSION: HSBC Personal Banking download/print dialog is usually positioned off...
timothy_horton@apple.com [Thu, 1 Aug 2019 20:23:43 +0000 (20:23 +0000)]
REGRESSION: HSBC Personal Banking download/print dialog is usually positioned off screen on iPad
https://bugs.webkit.org/show_bug.cgi?id=200356
<rdar://problem/51885199>

Reviewed by Beth Dakin.

* UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::desktopClassBrowsingRecommendedForRequest):
Add HSBC domains to the list of sites that recommend mobile mode by default.

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

14 months agoCrash under WebProcessProxy::didBecomeUnresponsive()
cdumez@apple.com [Thu, 1 Aug 2019 19:53:19 +0000 (19:53 +0000)]
Crash under WebProcessProxy::didBecomeUnresponsive()
https://bugs.webkit.org/show_bug.cgi?id=200346
<rdar://problem/53795984>

Reviewed by Geoffrey Garen.

Make sure the BackgroundProcessResponsivenessTimer / ResponsivenessTimer ref their client
while they call mayBecomeUnresponsive() / willChangeIsResponsive() / didChangeIsResponsive()
/ didBecomeUnresponsive() on their client, in case calling one of these ends up destroying
the client.

* UIProcess/BackgroundProcessResponsivenessTimer.cpp:
(WebKit::BackgroundProcessResponsivenessTimer::setResponsive):
* UIProcess/ResponsivenessTimer.cpp:
(WebKit::ResponsivenessTimer::timerFired):
* UIProcess/ResponsivenessTimer.h:
* UIProcess/WebProcessProxy.h:

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

14 months agoInitialize memory pressure flag in MemoryPressureHandler
pvollan@apple.com [Thu, 1 Aug 2019 19:43:10 +0000 (19:43 +0000)]
Initialize memory pressure flag in MemoryPressureHandler
https://bugs.webkit.org/show_bug.cgi?id=200353

Reviewed by Geoffrey Garen.

The flag 'm_underMemoryPressure' in MemoryPressureHandler should be initialized to 'false'.

* wtf/MemoryPressureHandler.h:

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

14 months agoresults.webkit.org: Collision detection for dots is off by 2 * dotMargin
commit-queue@webkit.org [Thu, 1 Aug 2019 19:43:02 +0000 (19:43 +0000)]
results.webkit.org: Collision detection for dots is off by 2 * dotMargin
https://bugs.webkit.org/show_bug.cgi?id=200347

Patch by Zhifei Fang <zhifei_fang@apple.com> on 2019-08-01
Reviewed by Jonathan Bedard.

* resultsdbpy/resultsdbpy/view/static/library/js/components/TimelineComponents.js:
(Timeline.CanvasSeriesComponent): Need to change it to dotMargin + radius other than use a fixed 3 * radius, which is for the old wide timeline

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

14 months agoImprove flakiness of SOAuthorizationRedirect tests
jiewen_tan@apple.com [Thu, 1 Aug 2019 19:32:59 +0000 (19:32 +0000)]
Improve flakiness of SOAuthorizationRedirect tests
https://bugs.webkit.org/show_bug.cgi?id=200320
<rdar://problem/53767057>

Reviewed by Alex Christensen.

This patch replaces Util::sleep(0.5) in tests that expect a SOAuthorization session to wait when the corresponding WKWebView
is out of the window with a more precise boolean indicator: navigationPolicyDecided. The new boolean indicator is working and
better because the authorizationPerformed should be set in the same runloop when NavigationState::decidePolicyForNavigationAction
is executed.

* TestWebKitAPI/Tests/WebKitCocoa/TestSOAuthorization.mm:
(-[TestSOAuthorizationDelegate webView:decidePolicyForNavigationAction:decisionHandler:]):
(resetState):
(TestWebKitAPI::TEST):

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

14 months agoUpdate Test262 (2019.08.01)
ross.kirsling@sony.com [Thu, 1 Aug 2019 19:12:29 +0000 (19:12 +0000)]
Update Test262 (2019.08.01)
https://bugs.webkit.org/show_bug.cgi?id=200351

Reviewed by Keith Miller.

* test262/expectations.yaml:
* test262/harness/testIntl.js:
* test262/latest-changes-summary.txt:
* test262/test/:
* test262/test262-Revision.txt:

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

14 months agoAdd threading assertion to WeakPtr's operator->()
cdumez@apple.com [Thu, 1 Aug 2019 18:38:40 +0000 (18:38 +0000)]
Add threading assertion to WeakPtr's operator->()
https://bugs.webkit.org/show_bug.cgi?id=199922

Reviewed by Ryosuke Niwa.

Add threading assertion to WeakPtr's operator->() to make sure that the WeakPtr
always gets dereferenced on the same thread it was constructed on.

* wtf/WeakPtr.h:
(WTF::WeakPtrImpl::get):
(WTF::WeakPtrImpl::WeakPtrImpl):

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

14 months ago[Text autosizing] [iPadOS] Add targeted hacks to address some remaining text autosizi...
wenson_hsieh@apple.com [Thu, 1 Aug 2019 18:32:32 +0000 (18:32 +0000)]
[Text autosizing] [iPadOS] Add targeted hacks to address some remaining text autosizing issues
https://bugs.webkit.org/show_bug.cgi?id=200271
<rdar://problem/51734741>

Reviewed by Zalan Bujtas.

Source/WebCore:

Makes some targeted adjustments to the text autosizing heuristic, to ensure compatibility with several high-
profile websites. See changes below for more detail.

Tests:  fast/text-autosizing/ios/idempotentmode/idempotent-autosizing-candidate-special-cases.html
        fast/text-autosizing/ios/idempotentmode/line-height-boosting.html

* css/StyleResolver.cpp:
(WebCore::StyleResolver::adjustRenderStyleForTextAutosizing):

Avoid clipped sidebar links on sohu.com by not performing line-height boosting in the case where the element
probably has a small, fixed number of lines. See below for more detail. Additionally, don't attempt to adjust
the line height using the boosted font size, in the case where the element is not a candidate for idempotent
text autosizing.

* rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::isIdempotentTextAutosizingCandidate const):

Make various targeted hacks to fix a few websites:

-   Add a special case for top navigation bar links on yandex.ru, where line height greatly exceeds the
    specified font size.

-   Avoid boosting some related video links on v.youku.com by considering the line-clamp CSS property when
    determining the maximum number of lines of text an element is expected to contain.

-   Avoid boosting some front page links on asahi.com, which have non-repeating background images.

-   Add several other adjustments to more aggressively boost pieces of text on Google search results, such as
    taking the `word-break` CSS property into account.

The bottom few pixels of sidebar links on naver.com are also no longer clipped after these changes.

* rendering/style/TextSizeAdjustment.cpp:
(WebCore::AutosizeStatus::probablyContainsASmallFixedNumberOfLines):

Pulls out a piece of the heuristic added to fix sephora.com in r247467 out into a separate helper method. To
recap, this heuristic identifies elements with both a fixed height and fixed line height, for which the fixed
height is close to an integer multiple of the line height.

Also makes several small tweaks in the process: (1) change the max difference between fixed line height and
font size from 6 to 5 to ensure that some multiline caption text on Google search results is boosted, and (2)
replace usages of `lineHeight()` with `specifiedLineHeight()`, which current prevents this function from being
truly idempotent.

(WebCore::AutosizeStatus::updateStatus):
* rendering/style/TextSizeAdjustment.h:

LayoutTests:

Add tests to cover some changes to line height boosting and the idempotent text autosizing candidate heuristic.

* fast/text-autosizing/ios/idempotentmode/idempotent-autosizing-candidate-special-cases-expected.txt: Added.
* fast/text-autosizing/ios/idempotentmode/idempotent-autosizing-candidate-special-cases.html: Added.
* fast/text-autosizing/ios/idempotentmode/line-height-boosting-expected.txt:
* fast/text-autosizing/ios/idempotentmode/line-height-boosting.html:

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

14 months agoRemoving expectations for tests that are now consistently passing
tsavell@apple.com [Thu, 1 Aug 2019 18:29:26 +0000 (18:29 +0000)]
Removing expectations for tests that are now consistently passing

Unreviewed test gardening.

* platform/mac-wk1/TestExpectations:
* platform/mac/TestExpectations:

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

14 months agoDashboard should defaults to first dashboard page when summary page is not available.
dewei_zhu@apple.com [Thu, 1 Aug 2019 18:02:45 +0000 (18:02 +0000)]
Dashboard should defaults to first dashboard page when summary page is not available.
https://bugs.webkit.org/show_bug.cgi?id=200180

Reviewed by Ryosuke Niwa.

Fix a bug that charts page will become the default when there is no summary page but there
is at least one dashboard page.

* public/v3/main.js: Charts page and analysis category page should not be considered as summay pages.
(main):

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

14 months agoUpdate TestWebKitAPI for XCBuild
krollin@apple.com [Thu, 1 Aug 2019 17:52:01 +0000 (17:52 +0000)]
Update TestWebKitAPI for XCBuild
https://bugs.webkit.org/show_bug.cgi?id=200311
<rdar://problem/53773804>

Reviewed by Alex Christensen.

Bug 199728 (svn 247402) updated TestWebKitAPI to use the unified-build
technique. Now update WebKitLegacy to build under XCBuild after those
changes. This work involves adding an "Apply Configuration to
XCFileLists" build target, adding a check-xcfilelists.sh script,
adding a "Check xcfilelists" build phase that calls that script,
adding knowledge of the project to the generate-xcfilelists script,
creating new .xcfilelist files, and adding those to the project.

* Scripts/webkitpy/generate_xcfilelists_lib/application.py:
(Application.__init__):
* Scripts/webkitpy/generate_xcfilelists_lib/generators.py:
(WebKitTestRunnerGenerator._get_generate_derived_sources_script):
(TestWebKitAPIGenerator):
(TestWebKitAPIGenerator._get_project_file_path):
(TestWebKitAPIGenerator._get_generate_unified_sources_script):
* TestWebKitAPI/Scripts/check-xcfilelists.sh: Added.
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/UnifiedSources-output.xcfilelist: Added.

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

14 months agoRename DOMJIT safe/unsafeFunction to functionWithTypeChecks and functionWithoutTypeCh...
mark.lam@apple.com [Thu, 1 Aug 2019 17:13:51 +0000 (17:13 +0000)]
Rename DOMJIT safe/unsafeFunction to functionWithTypeChecks and functionWithoutTypeChecks.
https://bugs.webkit.org/show_bug.cgi?id=200323

Reviewed by Yusuke Suzuki.

Source/JavaScriptCore:

The DOMJIT has a notion of a safeFunction and an unsafeFunction.  The safeFunction
is effectively the same as the unsafeFunction with added type check.  The DFG/FTL
will emit code to call the unsafeFunction if it has already emitted the needed
type check or proven that it isn't needed.  Otherwise, the DFG/FTL will emit
code to call the safeFunction (which does its own type check) instead.

This patch renames these functions to better describe their difference.

* dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::compileCallDOM):
* domjit/DOMJITSignature.h:
(JSC::DOMJIT::Signature::Signature):
* ftl/FTLLowerDFGToB3.cpp:
(JSC::FTL::DFG::LowerDFGToB3::compileCallDOM):
* tools/JSDollarVM.cpp:
(JSC::DOMJITFunctionObject::functionWithTypeCheck):
(JSC::DOMJITFunctionObject::functionWithoutTypeCheck):
(JSC::DOMJITFunctionObject::finishCreation):
(JSC::DOMJITCheckSubClassObject::functionWithTypeCheck):
(JSC::DOMJITCheckSubClassObject::functionWithoutTypeCheck):
(JSC::DOMJITCheckSubClassObject::finishCreation):
(JSC::DOMJITFunctionObject::safeFunction): Deleted.
(JSC::DOMJITFunctionObject::unsafeFunction): Deleted.
(JSC::DOMJITCheckSubClassObject::safeFunction): Deleted.
(JSC::DOMJITCheckSubClassObject::unsafeFunction): Deleted.

Source/WebCore:

No new tests.  This is just a refactoring exercise.

* bindings/scripts/CodeGeneratorJS.pm:
(GetArgumentTypeForFunctionWithoutTypeCheck):
(GenerateImplementation):
(GenerateOperationDefinition):
(ToNativeForFunctionWithoutTypeCheck):
(GetUnsafeArgumentType): Deleted.
(UnsafeToNative): Deleted.
* bindings/scripts/test/JS/JSTestDOMJIT.cpp:
(WebCore::jsTestDOMJITPrototypeFunctionGetAttributeWithoutTypeCheck):
(WebCore::jsTestDOMJITPrototypeFunctionItemWithoutTypeCheck):
(WebCore::jsTestDOMJITPrototypeFunctionHasAttributeWithoutTypeCheck):
(WebCore::jsTestDOMJITPrototypeFunctionGetElementByIdWithoutTypeCheck):
(WebCore::jsTestDOMJITPrototypeFunctionGetElementsByNameWithoutTypeCheck):
(WebCore::unsafeJsTestDOMJITPrototypeFunctionGetAttribute): Deleted.
(WebCore::unsafeJsTestDOMJITPrototypeFunctionItem): Deleted.
(WebCore::unsafeJsTestDOMJITPrototypeFunctionHasAttribute): Deleted.
(WebCore::unsafeJsTestDOMJITPrototypeFunctionGetElementById): Deleted.
(WebCore::unsafeJsTestDOMJITPrototypeFunctionGetElementsByName): Deleted.

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

14 months agoUserMediaPermissionRequestManagerProxy should not use audio+video denied requests...
youenn@apple.com [Thu, 1 Aug 2019 16:17:56 +0000 (16:17 +0000)]
UserMediaPermissionRequestManagerProxy should not use audio+video denied requests to deny audio-only or video-only requests
https://bugs.webkit.org/show_bug.cgi?id=200317

Reviewed by Eric Carlson.

Source/WebKit:

Only match audio+video denied requests with new audio+video requests.
That will ensure that audio can still be captured if user denied access to the camera through preferences
and website started with a getUserMedia({audio: true, video: true}) call.
Covered by added API test.

* UIProcess/UserMediaPermissionRequestManagerProxy.cpp:
(WebKit::UserMediaPermissionRequestManagerProxy::wasRequestDenied):

Tools:

* TestWebKitAPI/Tests/WebKit/getUserMediaAudioVideoCapture.html: Added
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKit/GetUserMediaReprompt.mm:
(-[GetUserMediaOnlyAudioUIDelegate _webView:requestMediaCaptureAuthorization:decisionHandler:]):
(-[GetUserMediaOnlyAudioUIDelegate _webView:checkUserMediaPermissionForURL:mainFrameURL:frameIdentifier:decisionHandler:]):
(TestWebKitAPI::TEST):

LayoutTests:

Update existing test with new behavior.
Added new test for the case where video is blocked but not audio.

* fast/mediastream/getUserMedia-deny-persistency3-expected.txt:
* fast/mediastream/getUserMedia-deny-persistency3.html:
* fast/mediastream/getUserMedia-deny-persistency4-expected.txt: Added.
* fast/mediastream/getUserMedia-deny-persistency4.html: Added.

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

14 months agoNew EWS: Cannot see build status page when patch is waiting for tester
aakash_jain@apple.com [Thu, 1 Aug 2019 15:14:16 +0000 (15:14 +0000)]
New EWS: Cannot see build status page when patch is waiting for tester
https://bugs.webkit.org/show_bug.cgi?id=200333

Reviewed by Jonathan Bedard.

* BuildSlaveSupport/ews-app/ews/views/statusbubble.py:
(StatusBubble): While patch hasn't started processing on tester queue, display build information from builder queue.

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

14 months ago[SOUP] WebSockets: add support for extensions when using web sockets libsoup API
carlosgc@webkit.org [Thu, 1 Aug 2019 14:21:26 +0000 (14:21 +0000)]
[SOUP] WebSockets: add support for extensions when using web sockets libsoup API
https://bugs.webkit.org/show_bug.cgi?id=199943

Reviewed by Alex Christensen.

Source/WebCore:

Add SOUP_TYPE_WEBSOCKET_EXTENSION_MANAGER feature to the soup session to enable WebSocket extensions.

Tests: http/tests/websocket/tests/hybi/imported/blink/permessage-deflate-comp-bit-onoff.html
       http/tests/websocket/tests/hybi/imported/blink/permessage-deflate-invalid-parameter.html
       http/tests/websocket/tests/hybi/imported/blink/permessage-deflate-parameter.html
       http/tests/websocket/tests/hybi/imported/blink/permessage-deflate-set-bfinal.html
       http/tests/websocket/tests/hybi/imported/blink/permessage-deflate-split-frames.html
       http/tests/websocket/tests/hybi/imported/blink/permessage-deflate-unsolicited-negotiation-response.html
       http/tests/websocket/tests/hybi/imported/blink/permessage-deflate-window-bits.html

* platform/network/soup/SoupNetworkSession.cpp:
(WebCore::SoupNetworkSession::SoupNetworkSession):

Source/WebKit:

* NetworkProcess/NetworkSocketChannel.cpp:
(WebKit::NetworkSocketChannel::didConnect): Add extensions parameter and pass it to the IPC message.
* NetworkProcess/NetworkSocketChannel.h:
* NetworkProcess/cocoa/WebSocketTaskCocoa.mm:
(WebKit::WebSocketTask::didConnect): Pass empty extensions string.
* NetworkProcess/soup/WebSocketTaskSoup.cpp:
(WebKit::WebSocketTask::acceptedExtensions const): Build the accepted extensions string.
(WebKit::WebSocketTask::didConnect): Pass accepted extensions to NetworkSocketChannel::didConnect().
* NetworkProcess/soup/WebSocketTaskSoup.h:
* WebProcess/Network/WebSocketChannel.cpp:
(WebKit::WebSocketChannel::extensions): Return the extensions string received from the network process.
(WebKit::WebSocketChannel::didConnect): Save the extensions string.
* WebProcess/Network/WebSocketChannel.h:
* WebProcess/Network/WebSocketChannel.messages.in:

LayoutTests:

Add new tests for permessage-deflate imported from blink and rebaseline existing tests.

* TestExpectations: Skip permessage-deflate tests by default.
* http/tests/websocket/tests/hybi/imported/blink/permessage-deflate-comp-bit-onoff.html: Added.
* http/tests/websocket/tests/hybi/imported/blink/permessage-deflate-invalid-parameter.html: Added.
* http/tests/websocket/tests/hybi/imported/blink/permessage-deflate-invalid-parameter_wsh.py: Added.
* http/tests/websocket/tests/hybi/imported/blink/permessage-deflate-manual_wsh.py: Added.
* http/tests/websocket/tests/hybi/imported/blink/permessage-deflate-parameter.html: Added.
* http/tests/websocket/tests/hybi/imported/blink/permessage-deflate-set-bfinal.html: Added.
* http/tests/websocket/tests/hybi/imported/blink/permessage-deflate-split-frames.html: Added.
* http/tests/websocket/tests/hybi/imported/blink/permessage-deflate-split-frames_wsh.py: Added.
* http/tests/websocket/tests/hybi/imported/blink/permessage-deflate-unsolicited-negotiation-response.html: Added.
* http/tests/websocket/tests/hybi/imported/blink/permessage-deflate-unsolicited-negotiation-response_wsh.py: Added.
* http/tests/websocket/tests/hybi/imported/blink/permessage-deflate-window-bits.html: Added.
* http/tests/websocket/tests/hybi/imported/blink/permessage-deflate_wsh.py: Added.
* platform/gtk/TestExpectations: Enable permessage-deflate tests.
* platform/gtk/http/tests/websocket/tests/hybi/deflate-frame-invalid-parameter-expected.txt: Added.
* platform/gtk/http/tests/websocket/tests/hybi/deflate-frame-parameter-expected.txt: Added.
* platform/gtk/http/tests/websocket/tests/hybi/extensions-expected.txt: Added.
* platform/gtk/http/tests/websocket/tests/hybi/imported/blink/permessage-deflate-comp-bit-onoff-expected.txt: Added.
* platform/gtk/http/tests/websocket/tests/hybi/imported/blink/permessage-deflate-invalid-parameter-expected.txt: Added.
* platform/gtk/http/tests/websocket/tests/hybi/imported/blink/permessage-deflate-parameter-expected.txt: Added.
* platform/gtk/http/tests/websocket/tests/hybi/imported/blink/permessage-deflate-set-bfinal-expected.txt: Added.
* platform/gtk/http/tests/websocket/tests/hybi/imported/blink/permessage-deflate-split-frames-expected.txt: Added.
* platform/gtk/http/tests/websocket/tests/hybi/imported/blink/permessage-deflate-unsolicited-negotiation-response-expected.txt: Added.
* platform/gtk/http/tests/websocket/tests/hybi/imported/blink/permessage-deflate-window-bits-expected.txt: Added.
* platform/wpe/TestExpectations: Enable permessage-deflate tests.
* platform/wpe/http/tests/websocket/tests/hybi/deflate-frame-invalid-parameter-expected.txt: Added.
* platform/wpe/http/tests/websocket/tests/hybi/deflate-frame-parameter-expected.txt: Added.
* platform/wpe/http/tests/websocket/tests/hybi/extensions-expected.txt: Added.
* platform/wpe/http/tests/websocket/tests/hybi/imported/blink/permessage-deflate-comp-bit-onoff-expected.txt: Added.
* platform/wpe/http/tests/websocket/tests/hybi/imported/blink/permessage-deflate-invalid-parameter-expected.txt: Added.
* platform/wpe/http/tests/websocket/tests/hybi/imported/blink/permessage-deflate-parameter-expected.txt: Added.
* platform/wpe/http/tests/websocket/tests/hybi/imported/blink/permessage-deflate-set-bfinal-expected.txt: Added.
* platform/wpe/http/tests/websocket/tests/hybi/imported/blink/permessage-deflate-split-frames-expected.txt: Added.
* platform/wpe/http/tests/websocket/tests/hybi/imported/blink/permessage-deflate-unsolicited-negotiation-response-expected.txt: Added.
* platform/wpe/http/tests/websocket/tests/hybi/imported/blink/permessage-deflate-window-bits-expected.txt: Added.

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

14 months ago[iOS][WK1] Unsafe unsafe of WeakPtr<Document> from UIThread under PlaybackSessionInte...
cdumez@apple.com [Thu, 1 Aug 2019 14:05:13 +0000 (14:05 +0000)]
[iOS][WK1] Unsafe unsafe of WeakPtr<Document> from UIThread under PlaybackSessionInterfaceAVKit::PlaybackSessionInterfaceAVKit()
https://bugs.webkit.org/show_bug.cgi?id=200324

Reviewed by Ryosuke Niwa.

The Document is a WebThread object, but a WeakPtr<Document> was dereferenced from the
UIThread in HTMLMediaElement::supportsSeeking(), from the PlaybackSessionInterfaceAVKit
constructor. To address the issue we now grab the WebThread lock before constructing
the PlaybackSessionInterfaceAVKit.

* platform/ios/WebVideoFullscreenControllerAVKit.mm:
(VideoFullscreenControllerContext::setUpFullscreen):

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

14 months agoFix libwebrtc build with Linux 5.2 headers
commit-queue@webkit.org [Thu, 1 Aug 2019 13:36:44 +0000 (13:36 +0000)]
Fix libwebrtc build with Linux 5.2 headers
https://bugs.webkit.org/show_bug.cgi?id=200342

Patch by Loïc Yhuel <loic.yhuel@softathome.com> on 2019-08-01
Reviewed by Eric Carlson.

We need to include linux/sockios.h for SIOCGSTAMP.
Take upstream fix from https://bugs.chromium.org/p/webrtc/issues/detail?id=10677.

* Source/webrtc/rtc_base/physicalsocketserver.cc:

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

14 months ago[SOUP] Switch to use libsoup WebSockets API
carlosgc@webkit.org [Thu, 1 Aug 2019 11:46:07 +0000 (11:46 +0000)]
[SOUP] Switch to use libsoup WebSockets API
https://bugs.webkit.org/show_bug.cgi?id=200162

Reviewed by Michael Catanzaro.

Source/WebCore:

Use the libsoup WebSockets API unconditionally for libsoup based ports.

* Modules/websockets/ThreadableWebSocketChannel.cpp:
(WebCore::ThreadableWebSocketChannel::create): Do not check the env var anymore.
* platform/SourcesSoup.txt:
* platform/network/SocketStreamHandleImpl.cpp:
* platform/network/StorageSessionProvider.h:
* platform/network/soup/SocketStreamHandleImpl.h:
* platform/network/soup/SocketStreamHandleImplSoup.cpp: Removed.

Source/WebKit:

Remove temporary method added for old WebSockets implementation.

* NetworkProcess/NetworkStorageSessionProvider.h:

Tools:

Update libsoup version to 2.67.90.

* gtk/jhbuild.modules:
* wpe/jhbuild.modules:

LayoutTests:

* platform/gtk/TestExpectations:
* platform/gtk/http/tests/websocket/tests/hybi/broken-utf8-expected.txt: Added.
* platform/gtk/http/tests/websocket/tests/hybi/close-before-open-expected.txt: Added.
* platform/gtk/http/tests/websocket/tests/hybi/close-code-and-reason-expected.txt: Added.
* platform/gtk/http/tests/websocket/tests/hybi/close-expected.txt: Added.
* platform/gtk/http/tests/websocket/tests/hybi/closed-when-entering-page-cache-expected.txt: Added.
* platform/gtk/http/tests/websocket/tests/hybi/compressed-control-frame-expected.txt: Added.
* platform/gtk/http/tests/websocket/tests/hybi/error-event-ready-state-non-existent-url-with-server-responding-404-expected.txt: Added.
* platform/gtk/http/tests/websocket/tests/hybi/fragmented-control-frame-expected.txt: Added.
* platform/gtk/http/tests/websocket/tests/hybi/handshake-error-expected.txt: Added.
* platform/gtk/http/tests/websocket/tests/hybi/handshake-fail-by-extensions-header-expected.txt: Added.
* platform/gtk/http/tests/websocket/tests/hybi/handshake-fail-by-invalid-http-version-expected.txt: Added.
* platform/gtk/http/tests/websocket/tests/hybi/handshake-fail-by-maxlength-expected.txt: Added.
* platform/gtk/http/tests/websocket/tests/hybi/handshake-fail-by-mismatch-protocol-header-expected.txt: Added.
* platform/gtk/http/tests/websocket/tests/hybi/handshake-fail-by-more-accept-header-expected.txt: Added.
* platform/gtk/http/tests/websocket/tests/hybi/handshake-fail-by-more-extensions-header-expected.txt: Added.
* platform/gtk/http/tests/websocket/tests/hybi/handshake-fail-by-more-protocol-header-expected.txt: Added.
* platform/gtk/http/tests/websocket/tests/hybi/handshake-fail-by-no-accept-header-expected.txt: Added.
* platform/gtk/http/tests/websocket/tests/hybi/handshake-fail-by-no-connection-header-expected.txt: Added.
* platform/gtk/http/tests/websocket/tests/hybi/handshake-fail-by-no-cr-expected.txt: Added.
* platform/gtk/http/tests/websocket/tests/hybi/handshake-fail-by-no-upgrade-header-expected.txt: Added.
* platform/gtk/http/tests/websocket/tests/hybi/handshake-fail-by-non-ascii-header-value-sec-websocket-accept-expected.txt: Added.
* platform/gtk/http/tests/websocket/tests/hybi/handshake-fail-by-non-ascii-header-value-sec-websocket-extensions-expected.txt: Added.
* platform/gtk/http/tests/websocket/tests/hybi/handshake-fail-by-non-ascii-header-value-sec-websocket-protocol-expected.txt: Added.
* platform/gtk/http/tests/websocket/tests/hybi/handshake-fail-by-non-ascii-status-line-expected.txt: Added.
* platform/gtk/http/tests/websocket/tests/hybi/handshake-fail-by-null-char-in-status-expected.txt: Added.
* platform/gtk/http/tests/websocket/tests/hybi/handshake-fail-by-prepended-null-expected.txt: Added.
* platform/gtk/http/tests/websocket/tests/hybi/handshake-fail-by-wrong-accept-header-expected.txt: Added.
* platform/gtk/http/tests/websocket/tests/hybi/handshake-ok-with-http-version-beyond-1_1-expected.txt: Added.
* platform/gtk/http/tests/websocket/tests/hybi/interleaved-fragments-expected.txt: Added.
* platform/gtk/http/tests/websocket/tests/hybi/invalid-continuation-expected.txt: Added.
* platform/gtk/http/tests/websocket/tests/hybi/invalid-encode-length-expected.txt: Added.
* platform/gtk/http/tests/websocket/tests/hybi/invalid-masked-frames-from-server-expected.txt: Added.
* platform/gtk/http/tests/websocket/tests/hybi/long-control-frame-expected.txt: Added.
* platform/gtk/http/tests/websocket/tests/hybi/long-invalid-header-expected.txt: Added.
* platform/gtk/http/tests/websocket/tests/hybi/network-process-crash-error-expected.txt: Added.
* platform/gtk/http/tests/websocket/tests/hybi/reserved-bits-expected.txt: Added.
* platform/gtk/http/tests/websocket/tests/hybi/reserved-opcodes-expected.txt: Added.
* platform/gtk/http/tests/websocket/tests/hybi/secure-cookie-secure-connection-expected.txt: Added.
* platform/gtk/http/tests/websocket/tests/hybi/send-object-tostring-check-expected.txt: Added.
* platform/gtk/http/tests/websocket/tests/hybi/simple-wss-expected.txt: Added.
* platform/gtk/http/tests/websocket/tests/hybi/stop-on-resume-in-error-handler-expected.txt: Added.
* platform/gtk/http/tests/websocket/tests/hybi/too-long-payload-expected.txt: Added.
* platform/gtk/http/tests/websocket/tests/hybi/websocket-allowed-setting-cookie-as-third-party-expected.txt: Added.
* platform/gtk/http/tests/websocket/tests/hybi/websocket-cookie-overwrite-behavior-expected.txt: Added.
* platform/gtk/http/tests/websocket/tests/hybi/websocket-event-target-expected.txt: Added.
* platform/gtk/http/tests/websocket/tests/hybi/workers/close-code-and-reason-expected.txt: Added.
* platform/gtk/http/tests/websocket/tests/hybi/workers/close-expected.txt: Added.
* platform/gtk/imported/w3c/web-platform-tests/2dcontext/imagebitmap/createImageBitmap-invalid-args-expected.txt: Removed.
* platform/gtk/imported/w3c/web-platform-tests/pointerevents/pointerevent_touch-action-illegal-expected.txt: Removed.
* platform/gtk/imported/w3c/web-platform-tests/websockets/Create-valid-url-protocol-empty.any-expected.txt: Added.
* platform/gtk/imported/w3c/web-platform-tests/websockets/Create-valid-url-protocol-empty.any.worker-expected.txt: Added.
* platform/gtk/imported/w3c/web-platform-tests/websockets/Send-65K-data.any-expected.txt: Added.
* platform/gtk/imported/w3c/web-platform-tests/websockets/Send-binary-65K-arraybuffer.any-expected.txt: Added.
* platform/gtk/imported/w3c/web-platform-tests/websockets/Send-binary-arraybuffer.any-expected.txt: Added.
* platform/gtk/imported/w3c/web-platform-tests/websockets/Send-data.any-expected.txt: Added.
* platform/gtk/imported/w3c/web-platform-tests/websockets/Send-paired-surrogates.any-expected.txt: Added.
* platform/gtk/imported/w3c/web-platform-tests/websockets/basic-auth.any-expected.txt: Added.
* platform/gtk/imported/w3c/web-platform-tests/websockets/basic-auth.any.worker-expected.txt: Added.
* platform/gtk/imported/w3c/web-platform-tests/websockets/closing-handshake/003-expected.txt: Added.
* platform/gtk/imported/w3c/web-platform-tests/websockets/cookies/004-expected.txt: Added.
* platform/gtk/imported/w3c/web-platform-tests/websockets/interfaces/WebSocket/bufferedAmount/bufferedAmount-arraybuffer-expected.txt: Added.
* platform/gtk/imported/w3c/web-platform-tests/websockets/interfaces/WebSocket/bufferedAmount/bufferedAmount-blob-expected.txt: Added.
* platform/gtk/imported/w3c/web-platform-tests/websockets/interfaces/WebSocket/bufferedAmount/bufferedAmount-deleting-expected.txt: Added.
* platform/gtk/imported/w3c/web-platform-tests/websockets/interfaces/WebSocket/bufferedAmount/bufferedAmount-large-expected.txt: Added.
* platform/gtk/imported/w3c/web-platform-tests/websockets/interfaces/WebSocket/bufferedAmount/bufferedAmount-unicode-expected.txt: Added.
* platform/gtk/imported/w3c/web-platform-tests/websockets/interfaces/WebSocket/close/close-multiple-expected.txt: Added.
* platform/gtk/imported/w3c/web-platform-tests/websockets/interfaces/WebSocket/close/close-nested-expected.txt: Added.
* platform/gtk/imported/w3c/web-platform-tests/websockets/interfaces/WebSocket/close/close-return-expected.txt: Added.
* platform/gtk/imported/w3c/web-platform-tests/websockets/interfaces/WebSocket/events/017-expected.txt: Added.
* platform/gtk/imported/w3c/web-platform-tests/websockets/interfaces/WebSocket/events/018-expected.txt: Added.
* platform/gtk/imported/w3c/web-platform-tests/websockets/interfaces/WebSocket/events/019-expected.txt: Added.
* platform/gtk/imported/w3c/web-platform-tests/websockets/interfaces/WebSocket/readyState/003-expected.txt: Added.
* platform/gtk/imported/w3c/web-platform-tests/websockets/opening-handshake/001-expected.txt: Added.
* platform/gtk/imported/w3c/web-platform-tests/websockets/opening-handshake/003-sets-origin.worker-expected.txt: Added.
* platform/gtk/imported/w3c/web-platform-tests/websockets/opening-handshake/005-expected.txt: Added.
* platform/gtk/imported/w3c/web-platform-tests/websockets/security/001-expected.txt: Added.
* platform/gtk/js/intl-datetimeformat-expected.txt: Removed.
* platform/wpe/TestExpectations:
* platform/wpe/http/tests/websocket/tests/hybi/broken-utf8-expected.txt: Added.
* platform/wpe/http/tests/websocket/tests/hybi/close-before-open-expected.txt: Added.
* platform/wpe/http/tests/websocket/tests/hybi/close-code-and-reason-expected.txt: Added.
* platform/wpe/http/tests/websocket/tests/hybi/close-expected.txt: Added.
* platform/wpe/http/tests/websocket/tests/hybi/closed-when-entering-page-cache-expected.txt: Added.
* platform/wpe/http/tests/websocket/tests/hybi/compressed-control-frame-expected.txt: Added.
* platform/wpe/http/tests/websocket/tests/hybi/error-event-ready-state-non-existent-url-with-server-responding-404-expected.txt: Added.
* platform/wpe/http/tests/websocket/tests/hybi/fragmented-control-frame-expected.txt: Added.
* platform/wpe/http/tests/websocket/tests/hybi/handshake-error-expected.txt: Added.
* platform/wpe/http/tests/websocket/tests/hybi/handshake-fail-by-extensions-header-expected.txt: Added.
* platform/wpe/http/tests/websocket/tests/hybi/handshake-fail-by-invalid-http-version-expected.txt: Added.
* platform/wpe/http/tests/websocket/tests/hybi/handshake-fail-by-maxlength-expected.txt: Added.
* platform/wpe/http/tests/websocket/tests/hybi/handshake-fail-by-mismatch-protocol-header-expected.txt: Added.
* platform/wpe/http/tests/websocket/tests/hybi/handshake-fail-by-more-accept-header-expected.txt: Added.
* platform/wpe/http/tests/websocket/tests/hybi/handshake-fail-by-more-extensions-header-expected.txt: Added.
* platform/wpe/http/tests/websocket/tests/hybi/handshake-fail-by-more-protocol-header-expected.txt: Added.
* platform/wpe/http/tests/websocket/tests/hybi/handshake-fail-by-no-accept-header-expected.txt: Added.
* platform/wpe/http/tests/websocket/tests/hybi/handshake-fail-by-no-connection-header-expected.txt: Added.
* platform/wpe/http/tests/websocket/tests/hybi/handshake-fail-by-no-cr-expected.txt: Added.
* platform/wpe/http/tests/websocket/tests/hybi/handshake-fail-by-no-upgrade-header-expected.txt: Added.
* platform/wpe/http/tests/websocket/tests/hybi/handshake-fail-by-non-ascii-header-value-sec-websocket-accept-expected.txt: Added.
* platform/wpe/http/tests/websocket/tests/hybi/handshake-fail-by-non-ascii-header-value-sec-websocket-extensions-expected.txt: Added.
* platform/wpe/http/tests/websocket/tests/hybi/handshake-fail-by-non-ascii-header-value-sec-websocket-protocol-expected.txt: Added.
* platform/wpe/http/tests/websocket/tests/hybi/handshake-fail-by-non-ascii-status-line-expected.txt: Added.
* platform/wpe/http/tests/websocket/tests/hybi/handshake-fail-by-null-char-in-status-expected.txt: Added.
* platform/wpe/http/tests/websocket/tests/hybi/handshake-fail-by-prepended-null-expected.txt: Added.
* platform/wpe/http/tests/websocket/tests/hybi/handshake-fail-by-wrong-accept-header-expected.txt: Added.
* platform/wpe/http/tests/websocket/tests/hybi/handshake-ok-with-http-version-beyond-1_1-expected.txt: Added.
* platform/wpe/http/tests/websocket/tests/hybi/interleaved-fragments-expected.txt: Added.
* platform/wpe/http/tests/websocket/tests/hybi/invalid-continuation-expected.txt: Added.
* platform/wpe/http/tests/websocket/tests/hybi/invalid-encode-length-expected.txt: Added.
* platform/wpe/http/tests/websocket/tests/hybi/invalid-masked-frames-from-server-expected.txt: Added.
* platform/wpe/http/tests/websocket/tests/hybi/long-control-frame-expected.txt: Added.
* platform/wpe/http/tests/websocket/tests/hybi/long-invalid-header-expected.txt: Added.
* platform/wpe/http/tests/websocket/tests/hybi/network-process-crash-error-expected.txt: Added.
* platform/wpe/http/tests/websocket/tests/hybi/reserved-bits-expected.txt: Added.
* platform/wpe/http/tests/websocket/tests/hybi/reserved-opcodes-expected.txt: Added.
* platform/wpe/http/tests/websocket/tests/hybi/secure-cookie-secure-connection-expected.txt: Added.
* platform/wpe/http/tests/websocket/tests/hybi/send-object-tostring-check-expected.txt: Added.
* platform/wpe/http/tests/websocket/tests/hybi/simple-wss-expected.txt: Added.
* platform/wpe/http/tests/websocket/tests/hybi/stop-on-resume-in-error-handler-expected.txt: Added.
* platform/wpe/http/tests/websocket/tests/hybi/too-long-payload-expected.txt: Added.
* platform/wpe/http/tests/websocket/tests/hybi/websocket-allowed-setting-cookie-as-third-party-expected.txt: Added.
* platform/wpe/http/tests/websocket/tests/hybi/websocket-cookie-overwrite-behavior-expected.txt: Added.
* platform/wpe/http/tests/websocket/tests/hybi/websocket-event-target-expected.txt: Added.
* platform/wpe/http/tests/websocket/tests/hybi/workers/close-code-and-reason-expected.txt: Added.
* platform/wpe/http/tests/websocket/tests/hybi/workers/close-expected.txt: Added.
* platform/wpe/imported/w3c/web-platform-tests/websockets/Create-valid-url-protocol-empty.any-expected.txt: Added.
* platform/wpe/imported/w3c/web-platform-tests/websockets/Create-valid-url-protocol-empty.any.worker-expected.txt: Added.
* platform/wpe/imported/w3c/web-platform-tests/websockets/Send-65K-data.any-expected.txt: Added.
* platform/wpe/imported/w3c/web-platform-tests/websockets/Send-binary-65K-arraybuffer.any-expected.txt: Added.
* platform/wpe/imported/w3c/web-platform-tests/websockets/Send-binary-arraybuffer.any-expected.txt: Added.
* platform/wpe/imported/w3c/web-platform-tests/websockets/Send-data.any-expected.txt: Added.
* platform/wpe/imported/w3c/web-platform-tests/websockets/Send-paired-surrogates.any-expected.txt: Added.
* platform/wpe/imported/w3c/web-platform-tests/websockets/basic-auth.any-expected.txt: Added.
* platform/wpe/imported/w3c/web-platform-tests/websockets/basic-auth.any.worker-expected.txt: Added.
* platform/wpe/imported/w3c/web-platform-tests/websockets/closing-handshake/003-expected.txt: Added.
* platform/wpe/imported/w3c/web-platform-tests/websockets/cookies/004-expected.txt: Added.
* platform/wpe/imported/w3c/web-platform-tests/websockets/interfaces/WebSocket/bufferedAmount/bufferedAmount-arraybuffer-expected.txt: Added.
* platform/wpe/imported/w3c/web-platform-tests/websockets/interfaces/WebSocket/bufferedAmount/bufferedAmount-blob-expected.txt: Added.
* platform/wpe/imported/w3c/web-platform-tests/websockets/interfaces/WebSocket/bufferedAmount/bufferedAmount-deleting-expected.txt: Added.
* platform/wpe/imported/w3c/web-platform-tests/websockets/interfaces/WebSocket/bufferedAmount/bufferedAmount-large-expected.txt: Added.
* platform/wpe/imported/w3c/web-platform-tests/websockets/interfaces/WebSocket/bufferedAmount/bufferedAmount-unicode-expected.txt: Added.
* platform/wpe/imported/w3c/web-platform-tests/websockets/interfaces/WebSocket/close/close-multiple-expected.txt: Added.
* platform/wpe/imported/w3c/web-platform-tests/websockets/interfaces/WebSocket/close/close-nested-expected.txt: Added.
* platform/wpe/imported/w3c/web-platform-tests/websockets/interfaces/WebSocket/close/close-return-expected.txt: Added.
* platform/wpe/imported/w3c/web-platform-tests/websockets/interfaces/WebSocket/events/017-expected.txt: Added.
* platform/wpe/imported/w3c/web-platform-tests/websockets/interfaces/WebSocket/events/018-expected.txt: Added.
* platform/wpe/imported/w3c/web-platform-tests/websockets/interfaces/WebSocket/events/019-expected.txt: Added.
* platform/wpe/imported/w3c/web-platform-tests/websockets/interfaces/WebSocket/readyState/003-expected.txt: Added.
* platform/wpe/imported/w3c/web-platform-tests/websockets/opening-handshake/001-expected.txt: Added.
* platform/wpe/imported/w3c/web-platform-tests/websockets/opening-handshake/003-sets-origin.worker-expected.txt: Added.
* platform/wpe/imported/w3c/web-platform-tests/websockets/opening-handshake/005-expected.txt: Added.
* platform/wpe/imported/w3c/web-platform-tests/websockets/security/001-expected.txt: Added.

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

14 months agoBegin organizing b3 tests
commit-queue@webkit.org [Thu, 1 Aug 2019 05:58:09 +0000 (05:58 +0000)]
Begin organizing b3 tests
https://bugs.webkit.org/show_bug.cgi?id=200330

Patch by Alex Christensen <achristensen@webkit.org> on 2019-07-31
Reviewed by Keith Miller.

* b3/testb3.h:
* b3/testb3_1.cpp:
(run):
(zero): Deleted.
(negativeZero): Deleted.
* b3/testb3_2.cpp:
(testBitXorTreeArgs):
(testBitXorTreeArgsEven):
(testBitXorTreeArgImm):
(testBitAndTreeArg32):
(testBitOrTreeArg32):
(testBitAndArgs):
(testBitAndSameArg):
(testBitAndNotNot):
(testBitAndNotImm):
(testBitAndImms):
(testBitAndArgImm):
(testBitAndImmArg):
(testBitAndBitAndArgImmImm):
(testBitAndImmBitAndArgImm):
(testBitAndArgs32):
(testBitAndSameArg32):
(testBitAndImms32):
(testBitAndArgImm32):
(testBitAndImmArg32):
(testBitAndBitAndArgImmImm32):
(testBitAndImmBitAndArgImm32):
(testBitAndWithMaskReturnsBooleans):
(testBitAndArgDouble):
(testBitAndArgsDouble):
(testBitAndArgImmDouble):
(testBitAndImmsDouble):
(testBitAndArgFloat):
(testBitAndArgsFloat):
(testBitAndArgImmFloat):
(testBitAndImmsFloat):
(testBitAndArgsFloatWithUselessDoubleConversion):
(testBitOrArgs):
(testBitOrSameArg):
(testBitOrAndAndArgs):
(testBitOrAndSameArgs):
(testBitOrNotNot):
(testBitOrNotImm):
(testBitOrImms):
(testBitOrArgImm):
(testBitOrImmArg):
(testBitOrBitOrArgImmImm):
(testBitOrImmBitOrArgImm):
(testBitOrArgs32):
(testBitOrSameArg32):
(testBitOrImms32):
(testBitOrArgImm32):
(testBitOrImmArg32):
(addBitTests):
* b3/testb3_3.cpp:
(testSShrArgs):
(testSShrImms):
(testSShrArgImm):
(testSShrArg32):
(testSShrArgs32):
(testSShrImms32):
(testSShrArgImm32):
(testZShrArgs):
(testZShrImms):
(testZShrArgImm):
(testZShrArg32):
(testZShrArgs32):
(testZShrImms32):
(testZShrArgImm32):
(zero):
(negativeZero):
(addArgTests):
(addCallTests):
(addShrTests):
* b3/testb3_4.cpp:
(addSExtTests):
* b3/testb3_6.cpp:
(testSShrShl32):
(testSShrShl64):
(addSShrShTests):

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

14 months agoWeb Inspector: Debugger: support emulateUserGesture parameter in Debugger.evaluateOnC...
drousso@apple.com [Thu, 1 Aug 2019 05:19:27 +0000 (05:19 +0000)]
Web Inspector: Debugger: support emulateUserGesture parameter in Debugger.evaluateOnCallFrame
https://bugs.webkit.org/show_bug.cgi?id=200272

Reviewed by Joseph Pecoraro.

Source/JavaScriptCore:

When paused, evaluating in the console should still respect the "Emulate User Gesture" checkbox.

* inspector/protocol/Debugger.json:
* inspector/agents/InspectorDebuggerAgent.h:
* inspector/agents/InspectorDebuggerAgent.cpp:
(Inspector::InspectorDebuggerAgent::evaluateOnCallFrame):

Source/WebCore:

When paused, evaluating in the console should still respect the "Emulate User Gesture" checkbox.

Tests: inspector/debugger/evaluateOnCallFrame-emulateUserGesture.html
       inspector/debugger/evaluateOnCallFrame-emulateUserGesture-userIsInteracting.html

* inspector/agents/page/PageDebuggerAgent.h:
* inspector/agents/page/PageDebuggerAgent.cpp:
(WebCore::PageDebuggerAgent::evaluateOnCallFrame): Added.

Source/WebInspectorUI:

When paused, evaluating in the console should still respect the "Emulate User Gesture" checkbox.

* UserInterface/Controllers/RuntimeManager.js:
(WI.RuntimeManager.prototype.evaluateInInspectedWindow):

* UserInterface/Protocol/Legacy/13.0/InspectorBackendCommands.js:
* Versions/Inspector-iOS-13.0.json:

LayoutTests:

* inspector/debugger/evaluateOnCallFrame-emulateUserGesture.html: Added.
* inspector/debugger/evaluateOnCallFrame-emulateUserGesture-expected.txt: Added.
* inspector/debugger/evaluateOnCallFrame-emulateUserGesture-userIsInteracting.html: Added.
* inspector/debugger/evaluateOnCallFrame-emulateUserGesture-userIsInteracting-expected.txt: Added.
* TestExpectations:
* platform/wk2/TestExpectations:

* inspector/runtime/evaluate-emulateUserGesture.html: Added.
* inspector/runtime/evaluate-emulateUserGesture-expected.txt: Added.
* inspector/runtime/evaluate-emulateUserGesture-userIsInteracting.html: Added.
* inspector/runtime/evaluate-emulateUserGesture-userIsInteracting-expected.txt: Added.
* inspector/runtime/evaluate-userGestureEmulation.html: Deleted.
* inspector/runtime/evaluate-userGestureEmulation-expected.txt: Deleted.
* inspector/runtime/evaluate-userGestureEmulation-userIsInteracting.html: Deleted.
* inspector/runtime/evaluate-userGestureEmulation-userIsInteracting-expected.txt: Deleted.
Rename tests from "userGestureEmulation" to "emulateUserGesture" to match the parameter.

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

14 months ago[WHLSL] Replace memsetZero function with inline "= { }" code
sbarati@apple.com [Thu, 1 Aug 2019 05:17:42 +0000 (05:17 +0000)]
[WHLSL] Replace memsetZero function with inline "= { }" code
https://bugs.webkit.org/show_bug.cgi?id=200328

Reviewed by Robin Morisset.

This is a ~20ms metal compile time improvement on compute_boids.

* Modules/webgpu/WHLSL/Metal/WHLSLFunctionWriter.cpp:
(WebCore::WHLSL::Metal::FunctionDefinitionWriter::FunctionDefinitionWriter):
(WebCore::WHLSL::Metal::FunctionDefinitionWriter::visit):
* Modules/webgpu/WHLSL/Metal/WHLSLNativeFunctionWriter.cpp:
(WebCore::WHLSL::Metal::writeNativeFunction):
* Modules/webgpu/WHLSL/Metal/WHLSLNativeFunctionWriter.h:

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

14 months agoREGRESSION (r240942): first visually non-empty layout milestone is not reached in...
aestes@apple.com [Thu, 1 Aug 2019 04:24:57 +0000 (04:24 +0000)]
REGRESSION (r240942): first visually non-empty layout milestone is not reached in media documents until after the video finishes loading
https://bugs.webkit.org/show_bug.cgi?id=200293
<rdar://problem/52937749>

Reviewed by Alex Christensen.

Source/WebCore:

r240942 changed FrameView::qualifiesAsVisuallyNonEmpty() to consider only documents in the
Interactive or Complete ready states as "finished parsing". Documents considered finished
parsing can qualify as visually non-empty even without exceeding the visual character or
pixel thresholds, but documents considered not finished must first exceed one of these
thresholds in order to qualify as visually non-empty.

HTMLDocuments are placed in the Interactive ready state by their HTMLDocumentParsers.
However, HTMLDocument subclasses like ImageDocument and MediaDocument use their own custom
parsers that never set the Interactive ready state on their documents; these documents go
from Loading directly to Complete.

In order for these HTMLDocument subclasses to be considered visually non-empty before they
finish loading they must render something that exceeds the visual character or pixel
thresholds. For image documents, rendering the image is usually enough to cross the
threshold, but for media documents the visual pixel threshold was never crossed because
videos did not contribute to the visually non-empty pixel count.

As a result, media documents are not considered visually non-empty until the main resource
finishes loading. On iOS this means that the layer tree remains frozen until this point,
even though the media might have started autoplaying with audio long before it finished
loading.

Fix this by teaching RenderVideo to contribute the video player's size to FrameView's
visually non-empty pixel count once the video player has loaded enough data to determine its
intrinsic size. Videos that render more than 1024 pixels will qualify a media document as
visually non-empty even when it is still loading its main resource.

Added a new API test.

* rendering/RenderImage.cpp:
(WebCore::RenderImage::imageChanged):
(WebCore::RenderImage::incrementVisuallyNonEmptyPixelCountIfNeeded):
* rendering/RenderImage.h:
* rendering/RenderVideo.cpp:
(WebCore::RenderVideo::updateIntrinsicSize):

Tools:

* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKitCocoa/FirstVisuallyNonEmptyMilestone.mm: Renamed from Tools/TestWebKitAPI/Tests/WebKit/FirstVisuallyNonEmptyMilestoneWithDeferredScript.mm.
(-[FirstPaintMessageHandler userContentController:didReceiveScriptMessage:]):
(-[RenderingProgressNavigationDelegate _webView:renderingProgressDidChange:]):
(-[RenderingProgressNavigationDelegate webView:didFinishNavigation:]):
(TEST):

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

14 months agoWeb Inspector: Uncaught Exception: TypeError: null is not an object (evaluating ...
drousso@apple.com [Thu, 1 Aug 2019 04:24:50 +0000 (04:24 +0000)]
Web Inspector: Uncaught Exception: TypeError: null is not an object (evaluating 'issueMessage.sourceCodeLocation.sourceCode')
https://bugs.webkit.org/show_bug.cgi?id=200296

Reviewed by Joseph Pecoraro.

When fetching all `WI.IssueMessage`s for a given `WI.SourceCode`, the `WI.IssueMessage` may
be associated in a different way (e.g. by url, instead of `WI.SourceCodeLocation`). As such,
we should pass the `WI.SourceCode` along, and use it when adding the `WI.IssueTreeElement`.

* UserInterface/Views/DebuggerSidebarPanel.js:
(WI.DebuggerSidebarPanel.prototype._addIssuesForSourceCode):
(WI.DebuggerSidebarPanel.prototype._addIssue):

* UserInterface/Views/SourcesNavigationSidebarPanel.js:
(WI.SourcesNavigationSidebarPanel.prototype._addIssue):
(WI.SourcesNavigationSidebarPanel.prototype._addIssuesForSourceCode):

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

14 months ago[ews-build] Enable all macOS queues on new EWS
aakash_jain@apple.com [Thu, 1 Aug 2019 01:17:09 +0000 (01:17 +0000)]
[ews-build] Enable all macOS queues on new EWS
https://bugs.webkit.org/show_bug.cgi?id=199944

Reviewed by Jonathan Bedard.

* BuildSlaveSupport/ews-build/config.json: Enabled the triggers for macOS queues.
* BuildSlaveSupport/ews-app/ews/views/statusbubble.py:
(StatusBubble): Enabled status-bubbles for mac queues, separated builders and testers bubbles in separate lines. Also
removed mac-32bit and mac-32bit-wk2 bubbles, these queues were removed from Buildbot configuration previously.
* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BubbleQueueServer.js: Removed mac queues from bot-watcher's dashboard.
* QueueStatusServer/config/queues.py: Removed mac queues from old EWS.

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

14 months agoSplit testb3 into multiple files
achristensen@apple.com [Thu, 1 Aug 2019 01:01:53 +0000 (01:01 +0000)]
Split testb3 into multiple files
https://bugs.webkit.org/show_bug.cgi?id=200326

Reviewed by Keith Miller.

* JavaScriptCore.xcodeproj/project.pbxproj:
* b3/testb3.cpp: Removed.
* b3/testb3.h: Added.
(hiddenTruthBecauseNoReturnIsStupid):
(usage):
(shouldBeVerbose):
(compileProc):
(invoke):
(compileAndRun):
(lowerToAirForTesting):
(checkDisassembly):
(checkUsesInstruction):
(checkDoesNotUseInstruction):
(populateWithInterestingValues):
(floatingPointOperands):
(int64Operands):
(int32Operands):
(add32):
(modelLoad):
(float>):
(double>):
* b3/testb3_1.cpp: Added.
(zero):
(negativeZero):
(shouldRun):
(testRotR):
(testRotL):
(testRotRWithImmShift):
(testRotLWithImmShift):
(testComputeDivisionMagic):
(run):
(main):
(dllLauncherEntryPoint):
* b3/testb3_2.cpp: Added.
(test42):
(testLoad42):
(testLoadAcq42):
(testLoadWithOffsetImpl):
(testLoadOffsetImm9Max):
(testLoadOffsetImm9MaxPlusOne):
(testLoadOffsetImm9MaxPlusTwo):
(testLoadOffsetImm9Min):
(testLoadOffsetImm9MinMinusOne):
(testLoadOffsetScaledUnsignedImm12Max):
(testLoadOffsetScaledUnsignedOverImm12Max):
(testBitXorTreeArgs):
(testBitXorTreeArgsEven):
(testBitXorTreeArgImm):
(testAddTreeArg32):
(testMulTreeArg32):
(testBitAndTreeArg32):
(testBitOrTreeArg32):
(testArg):
(testReturnConst64):
(testReturnVoid):
(testAddArg):
(testAddArgs):
(testAddArgImm):
(testAddImmArg):
(testAddArgMem):
(testAddMemArg):
(testAddImmMem):
(testAddArg32):
(testAddArgs32):
(testAddArgMem32):
(testAddMemArg32):
(testAddImmMem32):
(testAddNeg1):
(testAddNeg2):
(testAddArgZeroImmZDef):
(testAddLoadTwice):
(testAddArgDouble):
(testAddArgsDouble):
(testAddArgImmDouble):
(testAddImmArgDouble):
(testAddImmsDouble):
(testAddArgFloat):
(testAddArgsFloat):
(testAddFPRArgsFloat):
(testAddArgImmFloat):
(testAddImmArgFloat):
(testAddImmsFloat):
(testAddArgFloatWithUselessDoubleConversion):
(testAddArgsFloatWithUselessDoubleConversion):
(testAddArgsFloatWithEffectfulDoubleConversion):
(testAddMulMulArgs):
(testMulArg):
(testMulArgStore):
(testMulAddArg):
(testMulArgs):
(testMulArgNegArg):
(testMulNegArgArg):
(testMulArgImm):
(testMulImmArg):
(testMulArgs32):
(testMulArgs32SignExtend):
(testMulImm32SignExtend):
(testMulLoadTwice):
(testMulAddArgsLeft):
(testMulAddArgsRight):
(testMulAddArgsLeft32):
(testMulAddArgsRight32):
(testMulSubArgsLeft):
(testMulSubArgsRight):
(testMulSubArgsLeft32):
(testMulSubArgsRight32):
(testMulNegArgs):
(testMulNegArgs32):
(testMulArgDouble):
(testMulArgsDouble):
(testMulArgImmDouble):
(testMulImmArgDouble):
(testMulImmsDouble):
(testMulArgFloat):
(testMulArgsFloat):
(testMulArgImmFloat):
(testMulImmArgFloat):
(testMulImmsFloat):
(testMulArgFloatWithUselessDoubleConversion):
(testMulArgsFloatWithUselessDoubleConversion):
(testMulArgsFloatWithEffectfulDoubleConversion):
(testDivArgDouble):
(testDivArgsDouble):
(testDivArgImmDouble):
(testDivImmArgDouble):
(testDivImmsDouble):
(testDivArgFloat):
(testDivArgsFloat):
(testDivArgImmFloat):
(testDivImmArgFloat):
(testDivImmsFloat):
(testModArgDouble):
(testModArgsDouble):
(testModArgImmDouble):
(testModImmArgDouble):
(testModImmsDouble):
(testModArgFloat):
(testModArgsFloat):
(testModArgImmFloat):
(testModImmArgFloat):
(testModImmsFloat):
(testDivArgFloatWithUselessDoubleConversion):
(testDivArgsFloatWithUselessDoubleConversion):
(testDivArgsFloatWithEffectfulDoubleConversion):
(testUDivArgsInt32):
(testUDivArgsInt64):
(testUModArgsInt32):
(testUModArgsInt64):
(testSubArg):
(testSubArgs):
(testSubArgImm):
(testSubNeg):
(testNegSub):
(testNegValueSubOne):
(testSubSub):
(testSubSub2):
(testSubAdd):
(testSubFirstNeg):
(testSubImmArg):
(testSubArgMem):
(testSubMemArg):
(testSubImmMem):
(testSubMemImm):
(testSubArgs32):
(testSubArgImm32):
(testSubImmArg32):
(testSubMemArg32):
(testSubArgMem32):
(testSubImmMem32):
(testSubMemImm32):
(testNegValueSubOne32):
(testNegMulArgImm):
(testSubMulMulArgs):
(testSubArgDouble):
(testSubArgsDouble):
(testSubArgImmDouble):
(testSubImmArgDouble):
(testSubImmsDouble):
(testSubArgFloat):
(testSubArgsFloat):
(testSubArgImmFloat):
(testSubImmArgFloat):
(testSubImmsFloat):
(testSubArgFloatWithUselessDoubleConversion):
(testSubArgsFloatWithUselessDoubleConversion):
(testSubArgsFloatWithEffectfulDoubleConversion):
(testTernarySubInstructionSelection):
(testNegDouble):
(testNegFloat):
(testNegFloatWithUselessDoubleConversion):
(testBitAndArgs):
(testBitAndSameArg):
(testBitAndNotNot):
(testBitAndNotImm):
(testBitAndImms):
(testBitAndArgImm):
(testBitAndImmArg):
(testBitAndBitAndArgImmImm):
(testBitAndImmBitAndArgImm):
(testBitAndArgs32):
(testBitAndSameArg32):
(testBitAndImms32):
(testBitAndArgImm32):
(testBitAndImmArg32):
(testBitAndBitAndArgImmImm32):
(testBitAndImmBitAndArgImm32):
(testBitAndWithMaskReturnsBooleans):
(bitAndDouble):
(testBitAndArgDouble):
(testBitAndArgsDouble):
(testBitAndArgImmDouble):
(testBitAndImmsDouble):
(bitAndFloat):
(testBitAndArgFloat):
(testBitAndArgsFloat):
(testBitAndArgImmFloat):
(testBitAndImmsFloat):
(testBitAndArgsFloatWithUselessDoubleConversion):
(testBitOrArgs):
(testBitOrSameArg):
(testBitOrAndAndArgs):
(testBitOrAndSameArgs):
(testBitOrNotNot):
(testBitOrNotImm):
(testBitOrImms):
(testBitOrArgImm):
(testBitOrImmArg):
(testBitOrBitOrArgImmImm):
(testBitOrImmBitOrArgImm):
(testBitOrArgs32):
(testBitOrSameArg32):
(testBitOrImms32):
(testBitOrArgImm32):
(testBitOrImmArg32):
* b3/testb3_3.cpp: Added.
(testBitOrBitOrArgImmImm32):
(testBitOrImmBitOrArgImm32):
(bitOrDouble):
(testBitOrArgDouble):
(testBitOrArgsDouble):
(testBitOrArgImmDouble):
(testBitOrImmsDouble):
(bitOrFloat):
(testBitOrArgFloat):
(testBitOrArgsFloat):
(testBitOrArgImmFloat):
(testBitOrImmsFloat):
(testBitOrArgsFloatWithUselessDoubleConversion):
(testBitXorArgs):
(testBitXorSameArg):
(testBitXorAndAndArgs):
(testBitXorAndSameArgs):
(testBitXorImms):
(testBitXorArgImm):
(testBitXorImmArg):
(testBitXorBitXorArgImmImm):
(testBitXorImmBitXorArgImm):
(testBitXorArgs32):
(testBitXorSameArg32):
(testBitXorImms32):
(testBitXorArgImm32):
(testBitXorImmArg32):
(testBitXorBitXorArgImmImm32):
(testBitXorImmBitXorArgImm32):
(testBitNotArg):
(testBitNotImm):
(testBitNotMem):
(testBitNotArg32):
(testBitNotImm32):
(testBitNotMem32):
(testNotOnBooleanAndBranch32):
(testBitNotOnBooleanAndBranch32):
(testShlArgs):
(testShlImms):
(testShlArgImm):
(testShlSShrArgImm):
(testShlArg32):
(testShlArgs32):
(testShlImms32):
(testShlArgImm32):
(testShlZShrArgImm32):
(testSShrArgs):
(testSShrImms):
(testSShrArgImm):
(testSShrArg32):
(testSShrArgs32):
(testSShrImms32):
(testSShrArgImm32):
(testZShrArgs):
(testZShrImms):
(testZShrArgImm):
(testZShrArg32):
(testZShrArgs32):
(testZShrImms32):
(testZShrArgImm32):
(countLeadingZero):
(testClzArg64):
(testClzMem64):
(testClzArg32):
(testClzMem32):
(testAbsArg):
(testAbsImm):
(testAbsMem):
(testAbsAbsArg):
(testAbsNegArg):
(testAbsBitwiseCastArg):
(testBitwiseCastAbsBitwiseCastArg):
(testAbsArgWithUselessDoubleConversion):
(testAbsArgWithEffectfulDoubleConversion):
(testCeilArg):
(testCeilImm):
(testCeilMem):
(testCeilCeilArg):
(testFloorCeilArg):
(testCeilIToD64):
(testCeilIToD32):
(testCeilArgWithUselessDoubleConversion):
(testCeilArgWithEffectfulDoubleConversion):
(testFloorArg):
(testFloorImm):
(testFloorMem):
(testFloorFloorArg):
(testCeilFloorArg):
(testFloorIToD64):
(testFloorIToD32):
(testFloorArgWithUselessDoubleConversion):
(testFloorArgWithEffectfulDoubleConversion):
(correctSqrt):
(testSqrtArg):
(testSqrtImm):
(testSqrtMem):
(testSqrtArgWithUselessDoubleConversion):
(testSqrtArgWithEffectfulDoubleConversion):
(testCompareTwoFloatToDouble):
(testCompareOneFloatToDouble):
(testCompareFloatToDoubleThroughPhi):
(testDoubleToFloatThroughPhi):
(testReduceFloatToDoubleValidates):
(testDoubleProducerPhiToFloatConversion):
(testDoubleProducerPhiToFloatConversionWithDoubleConsumer):
(testDoubleProducerPhiWithNonFloatConst):
(testDoubleArgToInt64BitwiseCast):
(testDoubleImmToInt64BitwiseCast):
(testTwoBitwiseCastOnDouble):
(testBitwiseCastOnDoubleInMemory):
(testBitwiseCastOnDoubleInMemoryIndexed):
(testInt64BArgToDoubleBitwiseCast):
(testInt64BImmToDoubleBitwiseCast):
(testTwoBitwiseCastOnInt64):
(testBitwiseCastOnInt64InMemory):
(testBitwiseCastOnInt64InMemoryIndexed):
(testFloatImmToInt32BitwiseCast):
(testBitwiseCastOnFloatInMemory):
(testInt32BArgToFloatBitwiseCast):
(testInt32BImmToFloatBitwiseCast):
(testTwoBitwiseCastOnInt32):
(testBitwiseCastOnInt32InMemory):
(testConvertDoubleToFloatArg):
(testConvertDoubleToFloatImm):
(testConvertDoubleToFloatMem):
(testConvertFloatToDoubleArg):
(testConvertFloatToDoubleImm):
(testConvertFloatToDoubleMem):
(testConvertDoubleToFloatToDoubleToFloat):
(testLoadFloatConvertDoubleConvertFloatStoreFloat):
(testFroundArg):
(testFroundMem):
(testIToD64Arg):
(testIToF64Arg):
(testIToD32Arg):
(testIToF32Arg):
(testIToD64Mem):
(testIToF64Mem):
(testIToD32Mem):
(testIToF32Mem):
(testIToD64Imm):
(testIToF64Imm):
(testIToD32Imm):
(testIToF32Imm):
(testIToDReducedToIToF64Arg):
(testIToDReducedToIToF32Arg):
(testStore32):
(testStoreConstant):
(testStoreConstantPtr):
(testStore8Arg):
(testStore8Imm):
(testStorePartial8BitRegisterOnX86):
(testStore16Arg):
(testStore16Imm):
(testTrunc):
(testAdd1):
(testAdd1Ptr):
(testNeg32):
(testNegPtr):
(testStoreAddLoad32):
* b3/testb3_4.cpp: Added.
(testStoreRelAddLoadAcq32):
(testStoreAddLoadImm32):
(testStoreAddLoad8):
(testStoreRelAddLoadAcq8):
(testStoreRelAddFenceLoadAcq8):
(testStoreAddLoadImm8):
(testStoreAddLoad16):
(testStoreRelAddLoadAcq16):
(testStoreAddLoadImm16):
(testStoreAddLoad64):
(testStoreRelAddLoadAcq64):
(testStoreAddLoadImm64):
(testStoreAddLoad32Index):
(testStoreAddLoadImm32Index):
(testStoreAddLoad8Index):
(testStoreAddLoadImm8Index):
(testStoreAddLoad16Index):
(testStoreAddLoadImm16Index):
(testStoreAddLoad64Index):
(testStoreAddLoadImm64Index):
(testStoreSubLoad):
(testStoreAddLoadInterference):
(testStoreAddAndLoad):
(testStoreNegLoad32):
(testStoreNegLoadPtr):
(testAdd1Uncommuted):
(testLoadOffset):
(testLoadOffsetNotConstant):
(testLoadOffsetUsingAdd):
(testLoadOffsetUsingAddInterference):
(testLoadOffsetUsingAddNotConstant):
(testLoadAddrShift):
(testFramePointer):
(testOverrideFramePointer):
(testStackSlot):
(testLoadFromFramePointer):
(testStoreLoadStackSlot):
(testStoreFloat):
(testStoreDoubleConstantAsFloat):
(testSpillGP):
(testSpillFP):
(testInt32ToDoublePartialRegisterStall):
(testInt32ToDoublePartialRegisterWithoutStall):
(testBranch):
(testBranchPtr):
(testDiamond):
(testBranchNotEqual):
(testBranchNotEqualCommute):
(testBranchNotEqualNotEqual):
(testBranchEqual):
(testBranchEqualEqual):
(testBranchEqualCommute):
(testBranchEqualEqual1):
(testBranchEqualOrUnorderedArgs):
(testBranchNotEqualAndOrderedArgs):
(testBranchEqualOrUnorderedDoubleArgImm):
(testBranchEqualOrUnorderedFloatArgImm):
(testBranchEqualOrUnorderedDoubleImms):
(testBranchEqualOrUnorderedFloatImms):
(testBranchEqualOrUnorderedFloatWithUselessDoubleConversion):
(testBranchFold):
(testDiamondFold):
(testBranchNotEqualFoldPtr):
(testBranchEqualFoldPtr):
(testBranchLoadPtr):
(testBranchLoad32):
(testBranchLoad8S):
(testBranchLoad8Z):
(testBranchLoad16S):
(testBranchLoad16Z):
(testBranch8WithLoad8ZIndex):
(testComplex):
(testBranchBitTest32TmpImm):
(testBranchBitTest32AddrImm):
(testBranchBitTest32TmpTmp):
(testBranchBitTest64TmpTmp):
(testBranchBitTest64AddrTmp):
(testBranchBitTestNegation):
(testBranchBitTestNegation2):
(testSimplePatchpoint):
(testSimplePatchpointWithoutOuputClobbersGPArgs):
(testSimplePatchpointWithOuputClobbersGPArgs):
(testSimplePatchpointWithoutOuputClobbersFPArgs):
(testSimplePatchpointWithOuputClobbersFPArgs):
(testPatchpointWithEarlyClobber):
(testPatchpointCallArg):
(testPatchpointFixedRegister):
(testPatchpointAny):
(testPatchpointGPScratch):
(testPatchpointFPScratch):
(testPatchpointLotsOfLateAnys):
(testPatchpointAnyImm):
* b3/testb3_5.cpp: Added.
(testPatchpointManyImms):
(testPatchpointWithRegisterResult):
(testPatchpointWithStackArgumentResult):
(testPatchpointWithAnyResult):
(testSimpleCheck):
(testCheckFalse):
(testCheckTrue):
(testCheckLessThan):
(testCheckMegaCombo):
(testCheckTrickyMegaCombo):
(testCheckTwoMegaCombos):
(testCheckTwoNonRedundantMegaCombos):
(testCheckAddImm):
(testCheckAddImmCommute):
(testCheckAddImmSomeRegister):
(testCheckAdd):
(testCheckAdd64):
(testCheckAddFold):
(testCheckAddFoldFail):
(testCheckAddArgumentAliasing64):
(testCheckAddArgumentAliasing32):
(testCheckAddSelfOverflow64):
(testCheckAddSelfOverflow32):
(testCheckSubImm):
(testCheckSubBadImm):
(testCheckSub):
(doubleSub):
(testCheckSub64):
(testCheckSubFold):
(testCheckSubFoldFail):
(testCheckNeg):
(testCheckNeg64):
(testCheckMul):
(testCheckMulMemory):
(testCheckMul2):
(testCheckMul64):
(testCheckMulFold):
(testCheckMulFoldFail):
(testCheckMulArgumentAliasing64):
(testCheckMulArgumentAliasing32):
(testCheckMul64SShr):
(genericTestCompare):
(modelCompare):
(testCompareLoad):
(testCompareImpl):
(testCompare):
(testEqualDouble):
(simpleFunction):
(testCallSimple):
(testCallRare):
(testCallRareLive):
(testCallSimplePure):
(functionWithHellaArguments):
(testCallFunctionWithHellaArguments):
(functionWithHellaArguments2):
(testCallFunctionWithHellaArguments2):
(functionWithHellaArguments3):
(testCallFunctionWithHellaArguments3):
(testReturnDouble):
(testReturnFloat):
(simpleFunctionDouble):
(testCallSimpleDouble):
(simpleFunctionFloat):
(testCallSimpleFloat):
(functionWithHellaDoubleArguments):
(testCallFunctionWithHellaDoubleArguments):
(functionWithHellaFloatArguments):
(testCallFunctionWithHellaFloatArguments):
(testLinearScanWithCalleeOnStack):
(testChillDiv):
(testChillDivTwice):
(testChillDiv64):
(testModArg):
(testModArgs):
(testModImms):
(testModArg32):
(testModArgs32):
(testModImms32):
(testChillModArg):
(testChillModArgs):
(testChillModImms):
(testChillModArg32):
(testChillModArgs32):
(testChillModImms32):
(testLoopWithMultipleHeaderEdges):
(testSwitch):
(testSwitchSameCaseAsDefault):
(testSwitchChillDiv):
(testSwitchTargettingSameBlock):
(testSwitchTargettingSameBlockFoldPathConstant):
(testTruncFold):
(testZExt32):
(testZExt32Fold):
(testSExt32):
(testSExt32Fold):
(testTruncZExt32):
(testTruncSExt32):
(testSExt8):
(testSExt8Fold):
(testSExt8SExt8):
(testSExt8SExt16):
(testSExt8BitAnd):
(testBitAndSExt8):
(testSExt16):
(testSExt16Fold):
(testSExt16SExt16):
(testSExt16SExt8):
(testSExt16BitAnd):
(testBitAndSExt16):
(testSExt32BitAnd):
* b3/testb3_6.cpp: Added.
(testBitAndSExt32):
(testBasicSelect):
(testSelectTest):
(testSelectCompareDouble):
(testSelectCompareFloat):
(testSelectCompareFloatToDouble):
(testSelectDouble):
(testSelectDoubleTest):
(testSelectDoubleCompareDouble):
(testSelectDoubleCompareFloat):
(testSelectFloatCompareFloat):
(testSelectDoubleCompareDoubleWithAliasing):
(testSelectFloatCompareFloatWithAliasing):
(testSelectFold):
(testSelectInvert):
(testCheckSelect):
(testCheckSelectCheckSelect):
(testCheckSelectAndCSE):
(b3Pow):
(testPowDoubleByIntegerLoop):
(testTruncOrHigh):
(testTruncOrLow):
(testBitAndOrHigh):
(testBitAndOrLow):
(testBranch64Equal):
(testBranch64EqualImm):
(testBranch64EqualMem):
(testBranch64EqualMemImm):
(testStore8Load8Z):
(testStore16Load16Z):
(testSShrShl32):
(testSShrShl64):
(testTrivialInfiniteLoop):
(testFoldPathEqual):
(testLShiftSelf32):
(testRShiftSelf32):
(testURShiftSelf32):
(testLShiftSelf64):
(testRShiftSelf64):
(testURShiftSelf64):
(testPatchpointDoubleRegs):
(testSpillDefSmallerThanUse):
(testSpillUseLargerThanDef):
(testLateRegister):
(interpreterPrint):
(testInterpreter):
(testReduceStrengthCheckBottomUseInAnotherBlock):
(testResetReachabilityDanglingReference):
(testEntrySwitchSimple):
(testEntrySwitchNoEntrySwitch):
(testEntrySwitchWithCommonPaths):
(testEntrySwitchWithCommonPathsAndNonTrivialEntrypoint):
(testEntrySwitchLoop):
(testSomeEarlyRegister):
(testBranchBitAndImmFusion):
(testTerminalPatchpointThatNeedsToBeSpilled):
(testTerminalPatchpointThatNeedsToBeSpilled2):
(testPatchpointTerminalReturnValue):
(testMemoryFence):
(testStoreFence):
(testLoadFence):
(testTrappingLoad):
(testTrappingStore):
(testTrappingLoadAddStore):
(testTrappingLoadDCE):
(testTrappingStoreElimination):
(testMoveConstants):
(testPCOriginMapDoesntInsertNops):
* b3/testb3_7.cpp: Added.
(testPinRegisters):
(testX86LeaAddAddShlLeft):
(testX86LeaAddAddShlRight):
(testX86LeaAddAdd):
(testX86LeaAddShlRight):
(testX86LeaAddShlLeftScale1):
(testX86LeaAddShlLeftScale2):
(testX86LeaAddShlLeftScale4):
(testX86LeaAddShlLeftScale8):
(testAddShl32):
(testAddShl64):
(testAddShl65):
(testReduceStrengthReassociation):
(testLoadBaseIndexShift2):
(testLoadBaseIndexShift32):
(testOptimizeMaterialization):
(generateLoop):
(makeArrayForLoops):
(generateLoopNotBackwardsDominant):
(oneFunction):
(noOpFunction):
(testLICMPure):
(testLICMPureSideExits):
(testLICMPureWritesPinned):
(testLICMPureWrites):
(testLICMReadsLocalState):
(testLICMReadsPinned):
(testLICMReads):
(testLICMPureNotBackwardsDominant):
(testLICMPureFoiledByChild):
(testLICMPureNotBackwardsDominantFoiledByChild):
(testLICMExitsSideways):
(testLICMWritesLocalState):
(testLICMWrites):
(testLICMFence):
(testLICMWritesPinned):
(testLICMControlDependent):
(testLICMControlDependentNotBackwardsDominant):
(testLICMControlDependentSideExits):
(testLICMReadsPinnedWritesPinned):
(testLICMReadsWritesDifferentHeaps):
(testLICMReadsWritesOverlappingHeaps):
(testLICMDefaultCall):
(testDepend32):
(testDepend64):
(testWasmBoundsCheck):
(testWasmAddress):
(testFastTLSLoad):
(testFastTLSStore):
(doubleEq):
(doubleNeq):
(doubleGt):
(doubleGte):
(doubleLt):
(doubleLte):
(testDoubleLiteralComparison):
(testFloatEqualOrUnorderedFolding):
(testFloatEqualOrUnorderedFoldingNaN):
(testFloatEqualOrUnorderedDontFold):
(functionNineArgs):
(testShuffleDoesntTrashCalleeSaves):
(testDemotePatchpointTerminal):
(testReportUsedRegistersLateUseFollowedByEarlyDefDoesNotMarkUseAsDead):
(testInfiniteLoopDoesntCauseBadHoisting):
* b3/testb3_8.cpp: Added.
(testAtomicWeakCAS):
(testAtomicStrongCAS):
(testAtomicXchg):
(addAtomicTests):
(testLoad):
(addLoadTests):

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

14 months agoWKImagePreviewViewController not being autoreleased
dino@apple.com [Thu, 1 Aug 2019 00:12:18 +0000 (00:12 +0000)]
WKImagePreviewViewController not being autoreleased
https://bugs.webkit.org/show_bug.cgi?id=200325
<rdar://problem/53788214>

Reviewed by Wenson Hsieh.

Wenson noticed I wasn't autoreleasing the WKImagePreviewViewController.

* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView continueContextMenuInteraction:]):

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

14 months agoVersioning.
alancoon@apple.com [Thu, 1 Aug 2019 00:11:35 +0000 (00:11 +0000)]
Versioning.

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

14 months ago[WHLSL] Remove UnnamedType copy/move constructors and mark classes as final
sbarati@apple.com [Thu, 1 Aug 2019 00:04:23 +0000 (00:04 +0000)]
[WHLSL] Remove UnnamedType copy/move constructors and mark classes as final
https://bugs.webkit.org/show_bug.cgi?id=200188
<rdar://problem/53628171>

Unreviewed followup.

As Darin pointed out in the bugzilla comments, when defining a copy
constructor in C++ (either deleted or an implementation), the move
constructor is implicitly deleted. This match removes the excessive
use of WTF_MAKE_NONMOVABLE when we're already using WTF_MAKE_NONCOPYABLE.

* Modules/webgpu/WHLSL/AST/WHLSLArrayReferenceType.h:
* Modules/webgpu/WHLSL/AST/WHLSLArrayType.h:
* Modules/webgpu/WHLSL/AST/WHLSLPointerType.h:
* Modules/webgpu/WHLSL/AST/WHLSLReferenceType.h:
* Modules/webgpu/WHLSL/AST/WHLSLTypeReference.h:
* Modules/webgpu/WHLSL/AST/WHLSLUnnamedType.h:

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

14 months agoUnreviewed test gardening, disable failing test for rdar://51752593.
ryanhaddad@apple.com [Wed, 31 Jul 2019 23:34:14 +0000 (23:34 +0000)]
Unreviewed test gardening, disable failing test for rdar://51752593.

* TestWebKitAPI/Tests/WebKitCocoa/WKAttachmentTests.mm:

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

14 months agoUse CTFontCreateForCharactersWithLanguageAndOption if available instead of CTFontCrea...
youenn@apple.com [Wed, 31 Jul 2019 23:24:09 +0000 (23:24 +0000)]
Use CTFontCreateForCharactersWithLanguageAndOption if available instead of CTFontCreateForCharactersWithLanguage
https://bugs.webkit.org/show_bug.cgi?id=200241
<rdar://problem/53495386>

Build fix for older MacOS for which CTFontFallbackOption is not defined.
Unreviewed.

* pal/spi/cocoa/CoreTextSPI.h:

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

14 months ago[ContentChangeObserver] twitch.tv video controls do not always respond to taps in...
zalan@apple.com [Wed, 31 Jul 2019 23:01:43 +0000 (23:01 +0000)]
[ContentChangeObserver] twitch.tv video controls do not always respond to taps in fullscreen
https://bugs.webkit.org/show_bug.cgi?id=200309
<rdar://problem/52964977>

Reviewed by Simon Fraser.

Source/WebCore:

Do not consider an element visible if it is not a descendant of the active fullscreen element.

This patch fixes the cases when the user taps on a button in fullscreen mode while the non-fullscreen content is being mutated and
the ContentChangeObserver mistakenly registers it as a valid, actionable change and as a result we don't fire the click event (stay at hover).

Test: fast/events/touch/ios/content-observation/non-visible-content-change-in-fullscreen-mode.html

* page/ios/ContentChangeObserver.cpp:
(WebCore::fullscreenElement):
(WebCore::ContentChangeObserver::isVisuallyHidden):

LayoutTests:

* fast/events/touch/ios/content-observation/non-visible-content-change-in-fullscreen-mode-expected.txt: Added.
* fast/events/touch/ios/content-observation/non-visible-content-change-in-fullscreen-mode.html: Added.
* platform/ios/TestExpectations: Fullscreen API is not yet enabled on iOS.

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

14 months ago[iPadOS] Enable simulated mouse events on iqiyi.com to fix the video controls
simon.fraser@apple.com [Wed, 31 Jul 2019 22:58:01 +0000 (22:58 +0000)]
[iPadOS] Enable simulated mouse events on iqiyi.com to fix the video controls
https://bugs.webkit.org/show_bug.cgi?id=200322
rdar://problem/53235709

Reviewed by Wenson Hsieh.

iqiyi.com needs to get mouseMove events for dragging the video scrubber to work.

* page/Quirks.cpp:
(WebCore::Quirks::shouldDispatchSimulatedMouseEvents const):

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