WebKit-https.git
9 months agoUserMedia test should use WKPageNavigationClient
mcatanzaro@igalia.com [Thu, 3 Jan 2019 18:20:57 +0000 (18:20 +0000)]
UserMedia test should use WKPageNavigationClient
https://bugs.webkit.org/show_bug.cgi?id=192913

Reviewed by Youenn Fablet.

The test currently uses the deprecated WKPageLoaderClient. It should use
WKPageNavigationClient instead, which provides the same callback under a similar name.

* TestWebKitAPI/Tests/WebKit/UserMedia.cpp:
(TestWebKitAPI::TEST):

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

9 months agoDFG IntegerRangeOptimization phase exceeding loop limit shouldn't ASSERT
msaboff@apple.com [Thu, 3 Jan 2019 17:58:32 +0000 (17:58 +0000)]
DFG IntegerRangeOptimization phase exceeding loop limit shouldn't ASSERT
https://bugs.webkit.org/show_bug.cgi?id=193094

Reviewed by Saam Barati.

Removed this debug only ASSERT as one can construct test cases that will exceed the giveUpThreshold
amount.   This can be done with a large switch statement with at least one const or variable case
clause.  Such code bytecompiles to compare / jtrue sequences.  Increasing the giveUpThreshold count
doesn't help with the eventual code generated as B3 has optimizations to coalesce compare / branch
code sequences even when we don't run the IntegerRangeOptimization phase.

* dfg/DFGIntegerRangeOptimizationPhase.cpp:

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

9 months agoRemove logic handling DNT header during redirects
bfulgham@apple.com [Thu, 3 Jan 2019 17:44:55 +0000 (17:44 +0000)]
Remove logic handling DNT header during redirects
https://bugs.webkit.org/show_bug.cgi?id=193082
<rdar://problem/45555965>

Reviewed by Chris Dumez.

Source/WebKit:

Test: http/wpt/fetch/dnt-header-after-redirection.html.

Don't bother looking for (or passing along) DNT headers during redirects.

* NetworkProcess/NetworkLoadChecker.cpp:
(WebKit::NetworkLoadChecker::check):
(WebKit::NetworkLoadChecker::prepareRedirectedRequest): Deleted.
* NetworkProcess/NetworkLoadChecker.h:
* NetworkProcess/NetworkResourceLoader.cpp:
(WebKit::NetworkResourceLoader::restartNetworkLoad):
(WebKit::NetworkResourceLoader::continueWillSendRequest):
* NetworkProcess/PingLoad.cpp:
(WebKit::PingLoad::willPerformHTTPRedirection):

LayoutTests:

Revise test case to reflect fact that we no longer include the DNT
header in redirects.

* http/wpt/fetch/dnt-header-after-redirection-expected.txt:
* http/wpt/fetch/dnt-header-after-redirection.html:

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

9 months agoAdd release logging to help debug HTTPS upgrade issues
cdumez@apple.com [Thu, 3 Jan 2019 17:03:44 +0000 (17:03 +0000)]
Add release logging to help debug HTTPS upgrade issues
https://bugs.webkit.org/show_bug.cgi?id=193075

Reviewed by Alex Christensen.

Add release logging to help debug HTTPS upgrade issues like Bug 193026.

* NetworkProcess/NetworkHTTPSUpgradeChecker.cpp:
(WebKit::NetworkHTTPSUpgradeChecker::NetworkHTTPSUpgradeChecker):
(WebKit::NetworkHTTPSUpgradeChecker::query):

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

9 months agoNetworkProcess should initialize its default NetworkSession with parameters from...
achristensen@apple.com [Thu, 3 Jan 2019 16:51:44 +0000 (16:51 +0000)]
NetworkProcess should initialize its default NetworkSession with parameters from the UIProcess
https://bugs.webkit.org/show_bug.cgi?id=192967

Reviewed by Brent Fulgham.

I moved 3 of the NetworkProcessCreationParameters to use corresponding values of a WebsiteDataStoreParameters.
More will be moved in the near future, like indexedDatabaseDirectory.

* NetworkProcess/NetworkProcess.cpp:
(WebKit::NetworkProcess::initializeNetworkProcess):
* NetworkProcess/NetworkProcessCreationParameters.cpp:
(WebKit::NetworkProcessCreationParameters::encode const):
(WebKit::NetworkProcessCreationParameters::decode):
* NetworkProcess/NetworkProcessCreationParameters.h:
* UIProcess/Cocoa/WebProcessPoolCocoa.mm:
(WebKit::WebProcessPool::platformInitializeNetworkProcess):
* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::ensureNetworkProcess):

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

9 months agoREGRESSION (r239306): Don't disable font smoothing in transparent layers on macOS...
simon.fraser@apple.com [Thu, 3 Jan 2019 16:03:06 +0000 (16:03 +0000)]
REGRESSION (r239306): Don't disable font smoothing in transparent layers on macOS Mojave and later
https://bugs.webkit.org/show_bug.cgi?id=193095
<rdar://problem/47014944>

Reviewed by Zalan Bujtas.

Source/WebCore:

In r239306 we stopped making CALayers for font-smoothed text when not necessary on macOS Mojave
and later. However, we still turned off smoothing for non-opaque layers (setShouldSmoothFonts(false)),
which continues to affect the appearance of text.

Fix by only calling setShouldSmoothFonts(false) when the OS supports font smoothing.

Test: compositing/contents-format/subpixel-antialiased-text.html

* platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm:
(WebCore::PlatformCALayer::drawLayerContents):

LayoutTests:

A ref test that compares the rendering of layer and non-layer text with smoothing and antialiasing.

* compositing/contents-format/subpixel-antialiased-text-expected.html: Added.
* compositing/contents-format/subpixel-antialiased-text.html: Added.
* platform/mac/TestExpectations:

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

9 months ago[iOS] REGRESSION (r239441): Tab cycling to offscreen <select> may not scroll it into...
wenson_hsieh@apple.com [Thu, 3 Jan 2019 15:38:33 +0000 (15:38 +0000)]
[iOS] REGRESSION (r239441): Tab cycling to offscreen <select> may not scroll it into view
https://bugs.webkit.org/show_bug.cgi?id=193084
<rdar://problem/47006882>

Reviewed by Simon Fraser.

Source/WebKit:

In `WKWebView.mm`, `-_zoomToFocusRect:` will ignore the given selection rect if it is of size `{ 0, 0 }` and at
the origin. Prior to r239441, when using the tab key to move focus between non-editable form controls (or any
other method that doesn't involve tapping on the focused select element, with the exception of the next and
previous buttons in the input accessory view), we would compute a selection rect of `{{ 0, 0 }, { 0, 0 }}`, and
subsequently try to scroll the focused element to the center of the visible area, without taking the selection
rect into account.

However, after r239441, the web process sends the element interaction location to the UI process, which then
computes the selection rect by taking this location and adding a size of `{ 1, 1 }` (before r239441, this was
done in `WebPage::getAssistedNodeInformation`). However, our new implementation doesn't take into account the
case where the element interaction rect is null, which happens when the last interaction location is outside of
the bounding rect of the element. In this case, we set the element interaction location to { 0, 0 } and end up
computing a selection rect of `{{ 0, 0 }, { 1, 1 }}` instead of `{{ 0, 0 }, { 0, 0 }}` as we would have
previously done. This causes us to scroll up to the origin, instead of revealing the focused element.

To fix this, we restore the pre-r239441 behavior. See additional comments below for details.

Test: fast/forms/ios/scroll-to-reveal-focused-select.html

* Shared/FocusedElementInformation.cpp:
(WebKit::FocusedElementInformation::encode const):
(WebKit::FocusedElementInformation::decode):
* Shared/FocusedElementInformation.h:

Rename `elementInteractionLocation` to `lastInteractionLocation`. This was previously
`elementInteractionLocation` due to existing logic that tries to move the interaction location into the bounding
rect of the element in the case where visual viewports are disabled; however, since this feature has long been
enabled by default for all modern WebKit clients (internal and external), it's simpler to just use always send
the last interaction location over to the UI process, and have the UI process use `{{ 0, 0 }, { 0, 0 }}` if
the interaction location is outside of the element rect.

In the very unlikely event that any modern WebKit client disables visual viewports, this will still behave
reasonably, since we'll just use `{{ 0, 0 }, { 0, 0 }}` as the target rect and scroll to reveal the entire
element rather than the top left corner of the element.

* UIProcess/ios/WKContentViewInteraction.mm:
(rectToRevealWhenZoomingToFocusedElement):
* WebProcess/WebPage/ios/WebPageIOS.mm:

Move the check for whether the interaction location is inside the element's bounding rect from the web process
to the UI process. This relocates the logic to determine whether the selection rect should be a 1 by 1 fallback
interaction rect or the zero rect (`{{ 0, 0 }, { 0, 0 }}`) closer to the code that actually uses this rect.

(WebKit::WebPage::getFocusedElementInformation):

LayoutTests:

Add a layout test to verify that focusing a select element by tapping outside of it scrolls to reveal the
focused select element.

* fast/forms/ios/scroll-to-reveal-focused-select-expected.txt: Added.
* fast/forms/ios/scroll-to-reveal-focused-select.html: Added.

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

9 months agoWebUndoStep's monotonically increasing identifier should be a WebUndoStepID instead...
wenson_hsieh@apple.com [Thu, 3 Jan 2019 15:34:34 +0000 (15:34 +0000)]
WebUndoStep's monotonically increasing identifier should be a WebUndoStepID instead of uint64_t
https://bugs.webkit.org/show_bug.cgi?id=193100

Reviewed by Simon Fraser.

Add a type alias, WebUndoStepID, to represent the monotonically increasing undo step ID for each undoable
editing command, and use this type alias in lieu of `uint64_t`. No change in behavior.

* UIProcess/WebEditCommandProxy.cpp:
(WebKit::WebEditCommandProxy::WebEditCommandProxy):
* UIProcess/WebEditCommandProxy.h:
(WebKit::WebEditCommandProxy::create):
(WebKit::WebEditCommandProxy::commandID const):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::registerEditCommandForUndo):
* UIProcess/WebPageProxy.h:
* WebKit.xcodeproj/project.pbxproj:
* WebProcess/WebCoreSupport/WebEditorClient.cpp:
(WebKit::WebEditorClient::registerUndoStep):

Store the step ID in a temporary variable, since `webUndoStep` is now moved when calling `addWebUndoStep`.

* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::webUndoStep):
(WebKit::WebPage::addWebUndoStep):

Make this take a `Ref<WebUndoStep>&&` instead of a `WebUndoStep*`, and use move semantics to transfer the
given `Ref` to the table.

(WebKit::WebPage::removeWebEditCommand):
(WebKit::WebPage::unapplyEditCommand):
(WebKit::WebPage::reapplyEditCommand):

Use `auto*` in a couple of places.

(WebKit::WebPage::didRemoveEditCommand):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebUndoStep.cpp:
(WebKit::generateUndoStep):
* WebProcess/WebPage/WebUndoStep.h:
(WebKit::WebUndoStep::stepID const):
(WebKit::WebUndoStep::WebUndoStep):
* WebProcess/WebPage/WebUndoStepID.h: Copied from Source/WebKit/WebProcess/WebPage/WebUndoStep.cpp.

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

9 months agoWeb Inspector: Styles: selection lost when inspector is blurred
nvasilyev@apple.com [Thu, 3 Jan 2019 07:18:32 +0000 (07:18 +0000)]
Web Inspector: Styles: selection lost when inspector is blurred
https://bugs.webkit.org/show_bug.cgi?id=192124
<rdar://problem/46800965>

Reviewed by Devin Rousso.

* UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.css:
(body:matches(.window-docked-inactive, .window-inactive) .spreadsheet-style-declaration-editor .property.selected):
Selection should be gray when Web Inspector window isn't focused.

* UserInterface/Views/SpreadsheetStyleProperty.js:

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

9 months agoLeak of CMSampleBuffer (752 bytes) in com.apple.WebKit.WebContent running WebKit...
ddkilzer@apple.com [Thu, 3 Jan 2019 06:42:52 +0000 (06:42 +0000)]
Leak of CMSampleBuffer (752 bytes) in com.apple.WebKit.WebContent running WebKit layout tests
<https://webkit.org/b/193016>
<rdar://problem/46925703>

Reviewed by Simon Fraser.

* platform/mediarecorder/cocoa/MediaRecorderPrivateWriterCocoa.mm:
(WebCore::copySampleBufferWithCurrentTimeStamp):
- Change to return RetainPtr<CMSampleBufferRef>.
- Check return value of CMSampleBufferCreateCopyWithNewTiming().
(WebCore::MediaRecorderPrivateWriter::appendVideoSampleBuffer):
- Check return value of copySampleBufferWithCurrentTimeStamp().
- Fix leak by using RetainPtr<CMSampleBufferRef> returned from
  copySampleBufferWithCurrentTimeStamp() instead of leaking
  `bufferWithCurrentTime` by using retainPtr().
(WebCore::createAudioFormatDescription):
- Extract method from appendAudioSampleBuffer() to return
  RetainPtr<CMFormatDescriptionRef> after calling
  CMAudioFormatDescriptionCreate().
- Check return value of CMAudioFormatDescriptionCreate().
(WebCore::createAudioSampleBufferWithPacketDescriptions):
- Extract method from appendAudioSampleBuffer() to return
  RetainPtr<CMSampleBufferRef> after calling
  CMAudioSampleBufferCreateWithPacketDescriptions().
(WebCore::MediaRecorderPrivateWriter::appendAudioSampleBuffer):
- Check return values of createAudioFormatDescription() and
  createAudioSampleBufferWithPacketDescriptions().
- Fix leaks by extracting code into helper methods that return
  RetainPtr<> objects instead of leaking CMFormatDescriptionRef
  directly or leaking `sampleBuffer` by using retainPtr().

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

9 months agoHomograph with LATIN SMALL LETTER R WITH FISHHOOK
achristensen@apple.com [Thu, 3 Jan 2019 04:33:52 +0000 (04:33 +0000)]
Homograph with LATIN SMALL LETTER R WITH FISHHOOK
https://bugs.webkit.org/show_bug.cgi?id=192944

Reviewed by Tim Horton.

Source/WTF:

* wtf/cocoa/NSURLExtras.mm:
(WTF::isLookalikeCharacter):

Tools:

* TestWebKitAPI/Tests/WTF/cocoa/URLExtras.mm:
(TestWebKitAPI::TEST):

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

9 months agoWeb Inspector: Styles: it shouldn't be possible to delete read-only properties
nvasilyev@apple.com [Thu, 3 Jan 2019 04:05:04 +0000 (04:05 +0000)]
Web Inspector: Styles: it shouldn't be possible to delete read-only properties
https://bugs.webkit.org/show_bug.cgi?id=193099
<rdar://problem/47016335>

Reviewed by Devin Rousso.

* UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.js:
(WI.SpreadsheetCSSStyleDeclarationEditor):
Drive-by: Forward Delete should work the same way as Delete (Backspace).
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@239585 268f45cc-cd09-0410-ab3c-d52691b4dbfc

9 months agoAdd support for using the current text selection as the find string on iOS
wenson_hsieh@apple.com [Thu, 3 Jan 2019 04:00:47 +0000 (04:00 +0000)]
Add support for using the current text selection as the find string on iOS
https://bugs.webkit.org/show_bug.cgi?id=193034
<rdar://problem/45138739>

Reviewed by Tim Horton.

Source/WebCore:

Add support for "TakeFindStringFromSelection" on iOS. Unlike macOS, iOS does not have a notion of a "find
pasteboard" like macOS; instead, we handle this editing command by sending the selection string to the UI
process, where it is exposed via WebKit SPI so that clients that present find-in-page UI (i.e. MobileSafari) are
able to trigger find-in-page with this string.

Test: WebKit.UseSelectionAsFindString

* editing/Editor.cpp:
(WebCore::Editor::canCopyExcludingStandaloneImages const):

Make this helper function cross-platform.

* editing/Editor.h:
* editing/EditorCommand.cpp:
(WebCore::createCommandMap):
* editing/cocoa/EditorCocoa.mm:
(WebCore::Editor::takeFindStringFromSelection):

Move this from EditorMac to EditorCocoa, and implement it on iOS by calling into the editor client to update the
find string (see WebKit/ChangeLog for more details).

* editing/mac/EditorMac.mm:
(WebCore::Editor::canCopyExcludingStandaloneImages): Deleted.
(WebCore::Editor::takeFindStringFromSelection): Deleted.
* loader/EmptyClients.cpp:
* page/EditorClient.h:

Add a new editor client method to send the string for find-in-page to the UI process.

Source/WebKit:

* SourcesCocoa.txt:
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _takeFindStringFromSelection:]):

Provides a way to set the find string on iOS and macOS (an aside: takeFindStringFromSelection: already exists on
macOS, but there is no equivalent protocol method on iOS, so this new SPI acts as a cross-platform way for
WebKit clients to take the find string from the selection across all Cocoa platforms).

(+[WKWebView _stringForFind]):
(+[WKWebView _setStringForFind:]):

Call into find-in-page helper functions.

(-[WKWebView _findString:options:maxCount:]):

On iOS, additionally update the find-in-page string when exercising the _findString:options:maxCount: SPI. This
mirrors macOS behavior of updating the find pasteboard every time the find string changes; however, on macOS,
this is implemented by the platform (in AppKit), whereas there's no platform find pasteboard on iOS, let alone
logic to update it in UIKit. As such, we directly drive updates to the find string within WebKit.

* UIProcess/API/Cocoa/WKWebViewPrivate.h:

Add some new cross-platform find-in-page SPI. See above for more details.

* UIProcess/Cocoa/GlobalFindInPageState.h: Added.
* UIProcess/Cocoa/GlobalFindInPageState.mm: Added.
(WebKit::findPasteboard):
(WebKit::globalStringForFind):

Fetch the string to use when finding text in the page. On macOS, this accesses the AppKit find pasteboard; on
iOS, this instead returns the current global find string.

(WebKit::updateStringForFind):

Sets the global find string. Uses the find pasteboard on macOS, and sets the global find string on iOS.

(WebKit::stringForFind):
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:

Add plumbing to allow WebEditorClient to deliver the update the global find string in the UI process.

* UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::updateStringForFind):
* WebKit.xcodeproj/project.pbxproj:
* WebProcess/WebCoreSupport/WebEditorClient.h:
* WebProcess/WebCoreSupport/ios/WebEditorClientIOS.mm:
(WebKit::WebEditorClient::updateStringForFind):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::updateStringForFind):

Source/WebKitLegacy/mac:

Add a method stub for WebKitLegacy.

* WebCoreSupport/WebEditorClient.h:

Tools:

Add a new API test to verify that the new WebKit SPI (_stringForFind, _takeFindStringFromSelection:, and
_setStringForFind) works as expected.

* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKitCocoa/UseSelectionAsFindString.mm: Added.

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

9 months agoWeb Inspector: Implement `queryObjects` Command Line API
webkit@devinrousso.com [Thu, 3 Jan 2019 03:48:19 +0000 (03:48 +0000)]
Web Inspector: Implement `queryObjects` Command Line API
https://bugs.webkit.org/show_bug.cgi?id=176766
<rdar://problem/34890689>

Reviewed by Joseph Pecoraro.

Source/JavaScriptCore:

Introduces a new Command Line function called `queryObjects` that will return an array of
object that have the given constructor/prototype argument in their prototype chain.
 - `queryObjects(Promise)` will return an array of all Promises.
 - `queryObjects(Foo)` will return all objects created with the constructor `Foo`.

Currently, an error is thrown if the first argument is one of the following:
 - Object
 - Object.prototype
 - Function
 - Function.prototype
 - Array
 - Array.prototype
 - Map
 - Map.prototype
 - Set
 - Set.prototype
 - Proxy

The reason for this is that we don't want to expose any internal/builtin objects, as some of
them are highly sensitive and undefined behaviour can occur if they are modified.

* inspector/JSInjectedScriptHost.h:
* inspector/JSInjectedScriptHost.cpp:
(Inspector::checkForbiddenPrototype): Added.
(Inspector::JSInjectedScriptHost::queryObjects): Added.
Does a GC and then iterates over all live JSCell in the heap to find these objects.

* inspector/JSInjectedScriptHostPrototype.cpp:
(Inspector::JSInjectedScriptHostPrototype::finishCreation):
(Inspector::jsInjectedScriptHostPrototypeFunctionQueryObjects): Added.

* inspector/InjectedScriptSource.js:
(queryObjects): Added.

* runtime/JSGlobalObject.h:
(JSC::JSGlobalObject::promisePrototype): Added.

Source/WebCore:

Test: inspector/console/queryObjects.html

* inspector/CommandLineAPIModuleSource.js:
(CommandLineAPI):
(CommandLineAPIImpl.prototype.queryObjects): Added.

Source/WebInspectorUI:

* UserInterface/Controllers/JavaScriptRuntimeCompletionProvider.js:
(WI.JavaScriptRuntimeCompletionProvider.completionControllerCompletionsNeeded.receivedPropertyNames):
Add `queryObjects` to the list of command line functions.

LayoutTests:

* inspector/console/queryObjects-expected.html: Added.
* inspector/console/queryObjects.html: Added.

* http/tests/inspector/console/cross-domain-inspected-node-access-expected.txt:

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

9 months ago[ews-build] Use git on OpenSource EWS bots
aakash_jain@apple.com [Thu, 3 Jan 2019 00:48:44 +0000 (00:48 +0000)]
[ews-build] Use git on OpenSource EWS bots
https://bugs.webkit.org/show_bug.cgi?id=193092

Reviewed by Lucas Forschler.

* BuildSlaveSupport/ews-build/steps.py:
(CheckOutSource): Use git instead of svn.
(CheckOutSource.__init__): Use timeout of 2 hours since the initial checkout might take a long time.

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

9 months agoAllow WebContent process access to some drawing-related IOKit properties
bfulgham@apple.com [Wed, 2 Jan 2019 23:50:22 +0000 (23:50 +0000)]
Allow WebContent process access to some drawing-related IOKit properties
https://bugs.webkit.org/show_bug.cgi?id=193086
<rdar://problem/46568088>

Reviewed by Eric Carlson.

Update the iOS WebContent process sandbox to allow access to some IOKit properties
that are needed for drawing and media playback operations.

* Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
* WebProcess/com.apple.WebKit.WebContent.sb.in:

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

9 months agoFix resourcetimingbufferfull bubbles attribute
commit-queue@webkit.org [Wed, 2 Jan 2019 23:41:56 +0000 (23:41 +0000)]
Fix resourcetimingbufferfull bubbles attribute
https://bugs.webkit.org/show_bug.cgi?id=193087

Patch by Charles Vazac <cvazac@gmail.com> on 2019-01-02
Reviewed by Chris Dumez.

Source/WebCore:

This change is covered by web-platform-tests [1].

[1] https://github.com/web-platform-tests/wpt/blob/master/resource-timing/buffer-full-when-populate-entries.html#L20

* page/Performance.cpp:
(WebCore::Performance::resourceTimingBufferFullTimerFired):

LayoutTests:

* http/wpt/resource-timing/rt-performance-extensions.js:
(promise_test):

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

9 months agoRemove unused logging service
bfulgham@apple.com [Wed, 2 Jan 2019 21:32:07 +0000 (21:32 +0000)]
Remove unused logging service
https://bugs.webkit.org/show_bug.cgi?id=193081
<rdar://problem/40414815>

Reviewed by Alexey Proskuryakov.

We don't use this logging service, so don't open an exception for it.

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

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

9 months agoRemove temporary workaround for CVMS code signing objects
bfulgham@apple.com [Wed, 2 Jan 2019 21:30:54 +0000 (21:30 +0000)]
Remove temporary workaround for CVMS code signing objects
https://bugs.webkit.org/show_bug.cgi?id=193079
<rdar://problem/40139202>

Reviewed by Alexey Proskuryakov.

* WebProcess/com.apple.WebProcess.sb.in:

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

9 months agoRename LayerScrollCoordinationRole to ScrollCoordinationRole and make an enum class
simon.fraser@apple.com [Wed, 2 Jan 2019 21:22:07 +0000 (21:22 +0000)]
Rename LayerScrollCoordinationRole to ScrollCoordinationRole and make an enum class
https://bugs.webkit.org/show_bug.cgi?id=193010

Reviewed by Zalan Bujtas.

Move the enum LayerScrollCoordinationRole from RenderLayer.h to RenderLayerCompositor.h,
and make it an enum class.

* page/FrameView.cpp:
(WebCore::FrameView::scrollLayerID const):
* rendering/RenderLayer.h:
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::~RenderLayerBacking):
(WebCore::RenderLayerBacking::detachFromScrollingCoordinator):
(WebCore::operator<<):
* rendering/RenderLayerBacking.h:
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::updateScrollCoordinatedStatus):
(WebCore::RenderLayerCompositor::removeFromScrollCoordinatedLayers):
(WebCore::scrollCoordinationRoleForNodeType):
(WebCore::RenderLayerCompositor::attachScrollingNode):
(WebCore::RenderLayerCompositor::detachScrollCoordinatedLayer):
(WebCore::RenderLayerCompositor::updateScrollCoordinatedLayer):
(WebCore::RenderLayerCompositor::willRemoveScrollingLayerWithBacking):
* rendering/RenderLayerCompositor.h:

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

9 months agoDon't spin up a CalcParser if the current token is not a function token
simon.fraser@apple.com [Wed, 2 Jan 2019 21:09:13 +0000 (21:09 +0000)]
Don't spin up a CalcParser if the current token is not a function token
https://bugs.webkit.org/show_bug.cgi?id=193067

Reviewed by Zalan Bujtas.

Various functions in CSSPropertyParserHelpers fall back to trying to parse
a calc expression if the normal parsing fails. Don't do this unless the
current token is a function token, which should be slightly more efficient.

* css/parser/CSSPropertyParserHelpers.cpp:
(WebCore::CSSPropertyParserHelpers::consumeInteger):
(WebCore::CSSPropertyParserHelpers::consumePositiveIntegerRaw):
(WebCore::CSSPropertyParserHelpers::consumeNumberRaw):
(WebCore::CSSPropertyParserHelpers::consumeNumber):
(WebCore::CSSPropertyParserHelpers::consumeFontWeightNumber):
(WebCore::CSSPropertyParserHelpers::consumeLength):
(WebCore::CSSPropertyParserHelpers::consumePercent):
(WebCore::CSSPropertyParserHelpers::consumeLengthOrPercent):
(WebCore::CSSPropertyParserHelpers::consumeAngle):
(WebCore::CSSPropertyParserHelpers::consumeAngleOrPercent):
(WebCore::CSSPropertyParserHelpers::consumeTime):

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

9 months agoSupport css-color-4 rgb functions
simon.fraser@apple.com [Wed, 2 Jan 2019 20:53:37 +0000 (20:53 +0000)]
Support css-color-4 rgb functions
https://bugs.webkit.org/show_bug.cgi?id=192321

Reviewed by Zalan Bujtas.
LayoutTests/imported/w3c:

New expected results.

* web-platform-tests/css/css-color/color-resolving-expected.txt:
* web-platform-tests/css/css-color/rgb-rounding-001-expected.txt:

Source/WebCore:

Support the new rgb()/rgba() syntax described in https://drafts.csswg.org/css-color/#rgb-functions.
The differences are:
1. There is a new comma-free syntax, where the optional alpha is separated by a slash:
    rgb(128 34 56)
    rgb(128 34 56 / 50%)
2. Floating point values are allowed, and rounded:
    rgb(128.5 34.2 56.5) becomes rgb(129 34 57)
3. rgba() is a pure alias for rgb(), so these are equivalent:
    rgb(128 34 56 / 50%)
    rgba(128 34 56 / 50%)

hsl()/hsla() parsing was already updated to this new syntax in r230861.

Tested by tests in imported/w3c/web-platform-tests/css/css-color/

* css/parser/CSSPropertyParserHelpers.cpp:
(WebCore::CSSPropertyParserHelpers::clampRGBComponent):
(WebCore::CSSPropertyParserHelpers::parseRGBParameters):
(WebCore::CSSPropertyParserHelpers::parseColorFunction):

LayoutTests:

* TestExpectations: Unskip most of the WPT css-color rgb tests. Skip old imported WPT canvas tests.
* canvas/philip/tests/2d.fillStyle.parse.invalid.rgb-1-expected.txt: Removed.
* canvas/philip/tests/2d.fillStyle.parse.invalid.rgb-1.html: Removed.
* canvas/philip/tests/2d.fillStyle.parse.invalid.rgb-2-expected.txt: Removed.
* canvas/philip/tests/2d.fillStyle.parse.invalid.rgb-2.html: Removed.
* canvas/philip/tests/2d.fillStyle.parse.invalid.rgb-5-expected.txt: Removed.
* canvas/philip/tests/2d.fillStyle.parse.invalid.rgb-5.html: Removed.
* canvas/philip/tests/2d.fillStyle.parse.invalid.rgb-7-expected.txt: Removed.
* canvas/philip/tests/2d.fillStyle.parse.invalid.rgb-7.html: Removed.
* canvas/philip/tests/2d.fillStyle.parse.invalid.rgba-1-expected.txt: Removed.
* canvas/philip/tests/2d.fillStyle.parse.invalid.rgba-1.html: Removed.
* canvas/philip/tests/2d.fillStyle.parse.invalid.rgba-2-expected.txt: Removed.
* canvas/philip/tests/2d.fillStyle.parse.invalid.rgba-2.html: Removed.
* canvas/philip/tests/2d.fillStyle.parse.invalid.rgba-4-expected.txt: Removed.
* canvas/philip/tests/2d.fillStyle.parse.invalid.rgba-4.html: Removed.
* css3/calc/color-rgb-expected.txt:
* fast/canvas/gradient-addColorStop-with-invalid-color-expected.txt:
* fast/canvas/gradient-addColorStop-with-invalid-color.html: Remove a test that is no longer invalid.
* fast/css/rgb-float.html: Removed. This test is no longer value, since rgb() accepts floating point values.
* platform/gtk/css2.1/t040306-syntax-01-f-expected.txt:
* platform/gtk/fast/css/rgb-float-expected.png: Removed.
* platform/gtk/fast/css/rgb-float-expected.txt: Removed.
* platform/gtk/svg/hixie/perf/007-expected.txt:
* platform/ios/css2.1/t040306-syntax-01-f-expected.txt:
* platform/ios/fast/css/rgb-float-expected.txt: Removed.
* platform/mac/css2.1/t040306-syntax-01-f-expected.txt:
* platform/mac/fast/css/rgb-float-expected.png: Removed.
* platform/mac/fast/css/rgb-float-expected.txt: Removed.
* platform/mac/svg/hixie/perf/007-expected.txt:
* platform/win-future/svg/hixie/perf/007-expected.txt:
* platform/win/css2.1/t040306-syntax-01-f-expected.txt:
* platform/win/svg/hixie/perf/007-expected.txt:
* platform/wincairo/css2.1/t040306-syntax-01-f-expected.txt:
* platform/wincairo/fast/css/rgb-float-expected.txt: Removed.
* platform/wpe/css2.1/t040306-syntax-01-f-expected.txt:
* platform/wpe/fast/css/rgb-float-expected.txt: Removed.
* platform/wpe/svg/hixie/perf/007-expected.txt:
* svg/hixie/perf/007-expected.txt:

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

9 months agoREGRESSION (r239441): [iOS] Selection UI sometimes doesn't change after tapping ...
wenson_hsieh@apple.com [Wed, 2 Jan 2019 20:28:24 +0000 (20:28 +0000)]
REGRESSION (r239441): [iOS] Selection UI sometimes doesn't change after tapping "select all" in the callout bar
https://bugs.webkit.org/show_bug.cgi?id=193070
<rdar://problem/46921508>

Reviewed by Tim Horton.

Source/WebKit:

r239441 added logic to include an EditorState in the next layer tree commit when refocusing an element; this was
done to ensure that after tapping an element that has already been programmatically focused, we still send up-
to-date editor information to the UI process for the purposes of zooming to the selection rect, even if the
selection in the DOM is unchanged, since other aspects of the editor state may have changed since the element
was initially focused.

We currently try to flag the next layer tree commit by setting `m_hasPendingEditorStateUpdate` to `true`.
However, this is problematic since we aren't guaranteed in all cases that a compositing flush has been
scheduled. In the case where it hasn't, we'll end up in a state where the editor state update flag has been set,
yet the update will not make it over to the UI process until something happens that forces a layer tree commit
(e.g. scrolling, pinch zooming). Worse still, if the selection is then programmatically changed from the web
process, we will bail from sending a subsequent editor state update to the UI process because `WebPage` thinks
that a pending editor state has already been scheduled. This manifests in selection UI not updating after
tapping "Select All" in the callout bar, if the callout bar was brought up by tapping near the selection (since
this refocuses the element).

To fix this, we adjust this logic in `WebPage::elementDidRefocus` so that it sets the flag and then schedules a
compositing flush, but only if the user is actually interacting with the focused element (i.e., if the page
calls `focus` repeatedly, we won't continue to schedule compositing flushes).

Test: editing/selection/ios/change-selection-after-tapping-focused-element.html

* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::elementDidRefocus):
(WebKit::WebPage::sendEditorStateUpdate):
(WebKit::WebPage::scheduleFullEditorStateUpdate):

Add a private helper method to schedule an editor state update by setting `m_hasPendingEditorStateUpdate` to
`true` and then scheduling a compositing layer flush. Also, add a FIXME aluding to the fact that scheduling an
entire compositing layer flush to send an editor state update is somewhat wasteful, and should be replaced by
just scheduling this work to be done before the next frame (see: <rdar://problem/36523583> for more detail).

We also use this helper method in a few places where we currently turn on the editor state flag and schedule a
subsequent compositing flush.

(WebKit::WebPage::sendPartialEditorStateAndSchedulePostLayoutUpdate):
* WebProcess/WebPage/WebPage.h:

LayoutTests:

Add a test to ensure that selection UI is shown after tapping on a focused element and then changing the
selection programmatically.

* editing/selection/ios/change-selection-after-tapping-focused-element-expected.txt: Added.
* editing/selection/ios/change-selection-after-tapping-focused-element.html: Added.

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

9 months agoUnreviewed, rolling out r239524.
commit-queue@webkit.org [Wed, 2 Jan 2019 19:40:05 +0000 (19:40 +0000)]
Unreviewed, rolling out r239524.
https://bugs.webkit.org/show_bug.cgi?id=193083

basic browsing seems not to work (Requested by thorton on
#webkit).

Reverted changeset:

"Expand use of sourceApplicationAuditData"
https://bugs.webkit.org/show_bug.cgi?id=192995
https://trac.webkit.org/changeset/239524

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

9 months agoHandle calc() expressions in gradient color stops
simon.fraser@apple.com [Wed, 2 Jan 2019 19:24:48 +0000 (19:24 +0000)]
Handle calc() expressions in gradient color stops
https://bugs.webkit.org/show_bug.cgi?id=193066
rdar://problem/46961985

Reviewed by Sam Weinig.
Source/WebCore:

Fix two issues that prevented calc() expressions from working in conic-gradient color stops,
for the angle or percent value. First, consumeAngleOrPercent() needs to look for CalculationCategory::Percent
calc values as well as angle ones.

Second, CSSPrimitiveValue::isAngle() needs to use primitiveType() (which takes calc into account),
just as isPx() etc do.

Test: fast/gradients/conic-calc-stop-position.html

* css/CSSPrimitiveValue.h:
(WebCore::CSSPrimitiveValue::isAngle const):
* css/parser/CSSPropertyParserHelpers.cpp:
(WebCore::CSSPropertyParserHelpers::consumeAngleOrPercent):
(WebCore::CSSPropertyParserHelpers::consumeGradientColorStops):

LayoutTests:

* fast/gradients/conic-calc-stop-position-expected.html: Added.
* fast/gradients/conic-calc-stop-position.html: Added.

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

9 months ago[lldb-webkit] Remove broken code to print WTF::OptionSet::m_storage
dbates@webkit.org [Wed, 2 Jan 2019 18:50:16 +0000 (18:50 +0000)]
[lldb-webkit] Remove broken code to print WTF::OptionSet::m_storage
https://bugs.webkit.org/show_bug.cgi?id=193023

Reviewed by Simon Fraser.

The code to print WTF::OptionSet::m_storage as an item in the set never worked and does
not seem meaningful to fix because WTF::OptionSet::m_storage is just the sum of the printed
enumerator values. We should just remove this code.

* lldb/lldb_webkit.py:
(WTFOptionSetProvider.has_children):
(WTFOptionSetProvider.num_children):
(WTFOptionSetProvider.get_child_index):
(WTFOptionSetProvider.get_child_at_index):

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

9 months agoSourceProviders should use an actual URL instead of a string
keith_miller@apple.com [Wed, 2 Jan 2019 17:59:08 +0000 (17:59 +0000)]
SourceProviders should use an actual URL instead of a string
https://bugs.webkit.org/show_bug.cgi?id=192734

Reviewed by Yusuke Suzuki.

Source/JavaScriptCore:

This will be useful for the Module loader API in the future where
by default it will use the relative path from the referring module
to resolve dependencies.

I didn't change the JSC shell's urls to be absolute paths as it
caused problems with the stack traces in our Chakra tests. Since
the absolute paths included system directories the diff would
appear incorrect.
See: https://bugs.webkit.org/show_bug.cgi?id=193077

* API/JSBase.cpp:
(JSEvaluateScript):
(JSCheckScriptSyntax):
* API/JSScriptRef.cpp:
(OpaqueJSScript::create):
(OpaqueJSScript::OpaqueJSScript):
* API/glib/JSCContext.cpp:
(jsc_context_check_syntax):
* jsc.cpp:
(jscSource):
(GlobalObject::moduleLoaderFetch):
(functionCheckModuleSyntax):
(runWithOptions):
* parser/SourceCode.h:
(JSC::makeSource):
* parser/SourceProvider.cpp:
(JSC::SourceProvider::SourceProvider):
* parser/SourceProvider.h:
(JSC::SourceProvider::url const):
(JSC::StringSourceProvider::create):
(JSC::StringSourceProvider::StringSourceProvider):
(JSC::WebAssemblySourceProvider::create):
(JSC::WebAssemblySourceProvider::WebAssemblySourceProvider):
* runtime/FunctionConstructor.cpp:
(JSC::constructFunctionSkippingEvalEnabledCheck):
* tools/CodeProfile.h:
(JSC::CodeProfile::CodeProfile):
* tools/FunctionOverrides.cpp:
(JSC::initializeOverrideInfo):

Source/WebCore:

Remove ScriptSourceCode's URL member and make the url() method
reference the URL on the SourceProvider. Also, avoid some
ref count churn.

Additionally, this patch fixes an existing bug in
WorkletGlobalScope() that would use a ScriptSourceCode after
WTFMoving it.

* bindings/js/CachedScriptSourceProvider.h:
(WebCore::CachedScriptSourceProvider::CachedScriptSourceProvider):
* bindings/js/ScheduledAction.cpp:
(WebCore::ScheduledAction::execute):
* bindings/js/ScriptController.cpp:
(WebCore::ScriptController::executeScriptInWorld):
(WebCore::ScriptController::executeScript):
* bindings/js/ScriptSourceCode.h:
(WebCore::ScriptSourceCode::ScriptSourceCode):
(WebCore::ScriptSourceCode::m_code):
(WebCore::ScriptSourceCode::url const):
(WebCore::ScriptSourceCode::m_url): Deleted.
* dom/ScriptElement.cpp:
(WebCore::ScriptElement::prepareScript):
(WebCore::ScriptElement::requestModuleScript):
(WebCore::ScriptElement::executePendingScript):
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::ensureMediaControlsInjectedScript):
* page/Frame.cpp:
(WebCore::Frame::injectUserScriptImmediately):
* workers/WorkerGlobalScope.cpp:
(WebCore::WorkerGlobalScope::importScripts):
* workers/WorkerThread.cpp:
(WebCore::WorkerThread::workerThread):
* worklets/WorkletGlobalScope.cpp:
(WebCore::WorkletGlobalScope::WorkletGlobalScope):
* xml/parser/XMLDocumentParserLibxml2.cpp:
(WebCore::XMLDocumentParser::endElementNs):

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

9 months agoUpdate user-visible copyright strings to include 2019
jeffm@apple.com [Tue, 1 Jan 2019 19:29:55 +0000 (19:29 +0000)]
Update user-visible copyright strings to include 2019
https://bugs.webkit.org/show_bug.cgi?id=192811

Reviewed by Mark Lam.

Source/JavaScriptCore:

* Info.plist:

Source/WebCore:

* Info.plist:

Source/WebKit:

* Info.plist:
* NetworkProcess/EntryPoint/mac/XPCService/NetworkService/Info-OSX.plist:
* NetworkProcess/EntryPoint/mac/XPCService/NetworkService/Info-iOS.plist:
* PluginProcess/EntryPoint/mac/XPCService/PluginService.32-64.Info.plist:
* WebProcess/EntryPoint/mac/XPCService/WebContentService/Info-OSX.plist:
* WebProcess/EntryPoint/mac/XPCService/WebContentService/Info-iOS.plist:

Source/WebKitLegacy/mac:

* Info.plist:

WebKitLibraries:

* win/tools/scripts/COPYRIGHT-END-YEAR:

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

9 months ago.ycm_extra_conf.py should handle XXXInlines.h
yusukesuzuki@slowstart.org [Mon, 31 Dec 2018 15:31:15 +0000 (15:31 +0000)]
.ycm_extra_conf.py should handle XXXInlines.h
https://bugs.webkit.org/show_bug.cgi?id=193055

Reviewed by Carlos Garcia Campos.

compile_commands.json database only records flags and options for cpp source files.
So, when we open headers, this database does not have any information for that.
Our .ycm_extra_conf.py alleviates this by using XXX.cpp's configuration for XXX.h.
But this mitigation does not handle XXXInlines.h well since we do not have XXXInlines.cpp.
This patch adds support for XXXInlines.h in .ycm_extra_conf.py. When XXXInlines.h is queried,
we attempt to find XXX.cpp and use the configuration if it exists.

* gtk/ycm_extra_conf.py:
(getImplementationFilename):
(FlagsForFile):

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

9 months agoUnreviewed. Support PHP 7.3 in Debian.
carlosgc@webkit.org [Mon, 31 Dec 2018 14:53:38 +0000 (14:53 +0000)]
Unreviewed. Support PHP 7.3 in Debian.

Tools:

Add 7.3 to the list of php versions supported in Debian.

* Scripts/webkitpy/port/base.py:
(Port._debian_php_version):

LayoutTests:

* http/conf/debian-httpd-2.4-php7.3.conf: Added.

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

9 months agoUnreviewed GTK+ gardening. Rebaseline several tests after r239156.
carlosgc@webkit.org [Mon, 31 Dec 2018 14:08:21 +0000 (14:08 +0000)]
Unreviewed GTK+ gardening. Rebaseline several tests after r239156.

* platform/gtk/fast/frames/onlyCommentInIFrame-expected.txt:
* platform/gtk/fast/invalid/junk-data-expected.txt:
* platform/gtk/fast/invalid/missing-end-tag-expected.txt:
* platform/gtk/fast/parser/xhtml-alternate-entities-expected.txt:
* platform/gtk/fast/sub-pixel/selection/selection-rect-in-sub-pixel-table-expected.png:
* platform/gtk/fast/sub-pixel/selection/selection-rect-in-sub-pixel-table-expected.txt:
* platform/gtk/fast/xsl/xslt-extra-content-at-end-expected.txt:
* platform/gtk/fast/xsl/xslt-missing-namespace-in-xslt-expected.txt:
* platform/gtk/svg/custom/bug45331-expected.txt:
* platform/gtk/svg/custom/junk-data-expected.txt:
* platform/gtk/svg/custom/missing-xlink-expected.txt:
* platform/gtk/svg/custom/path-bad-data-expected.txt:
* platform/gtk/svg/custom/use-font-face-crash-expected.txt:
* platform/gtk/svg/hixie/error/012-expected.txt:

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

9 months agoUnreviewed GTK+ gardening. Rebaseline several tests after r238730.
carlosgc@webkit.org [Mon, 31 Dec 2018 13:36:20 +0000 (13:36 +0000)]
Unreviewed GTK+ gardening. Rebaseline several tests after r238730.

innerText works differently when using complex text path.
See https://bugs.webkit.org/show_bug.cgi?id=192750.

* platform/gtk/fast/events/nested-window-event-expected.txt: Added.
* platform/gtk/fast/events/window-events-bubble-expected.txt: Added.
* platform/gtk/fast/events/window-events-bubble2-expected.txt: Added.
* platform/gtk/fast/tokenizer/script_extra_close-expected.txt: Added.
* platform/gtk/imported/w3c/web-platform-tests/css/css-grid/alignment/grid-row-axis-alignment-positioned-items-015-expected.txt: Added.
* platform/gtk/imported/w3c/web-platform-tests/css/css-grid/alignment/grid-row-axis-alignment-positioned-items-016-expected.txt: Added.
* platform/gtk/imported/w3c/web-platform-tests/html/semantics/forms/constraints/form-validation-validity-badInput-expected.txt:
* platform/gtk/imported/w3c/web-platform-tests/html/semantics/forms/constraints/form-validation-willValidate-expected.txt:
* platform/gtk/imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/selection-expected.txt:
* platform/gtk/legacy-animation-engine/animations/lineheight-animation-expected.txt: Added.
* platform/gtk/legacy-animation-engine/animations/simultaneous-start-transform-expected.txt: Added.
* platform/gtk/legacy-animation-engine/animations/width-using-ems-expected.txt: Added.

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

9 months agoclang-tidy: Save 8 padding bytes on WebCore::BorderEdge
ddkilzer@apple.com [Sun, 30 Dec 2018 21:56:50 +0000 (21:56 +0000)]
clang-tidy: Save 8 padding bytes on WebCore::BorderEdge
<https://webkit.org/b/193058>
<rdar://problem/46979275>

Reviewed by Yusuke Suzuki.

* rendering/BorderEdge.cpp:
(WebCore::BorderEdge::BorderEdge): Reorder initialization to
match new instance variable order.
* rendering/BorderEdge.h: Reorder instance variables to save
8 padding bytes.

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

9 months agogperf is only used in WebCore
yusukesuzuki@slowstart.org [Sun, 30 Dec 2018 21:23:11 +0000 (21:23 +0000)]
gperf is only used in WebCore
https://bugs.webkit.org/show_bug.cgi?id=193061

Reviewed by Don Olmstead.

gperf is only used in WebCore. So if the port does not have WebCore,
it is not necessary. For example, JSCOnly port does not require it.
This patch removes gperf dependency in these ports by checking
ENABLE_WEBCORE.

* Source/cmake/WebKitCommon.cmake:

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

9 months agoAdd ENABLE_UNIFIED_BUILDS option to cmake ports
yusukesuzuki@slowstart.org [Sun, 30 Dec 2018 21:19:09 +0000 (21:19 +0000)]
Add ENABLE_UNIFIED_BUILDS option to cmake ports
https://bugs.webkit.org/show_bug.cgi?id=193045

Reviewed by Don Olmstead.

.:

This patch adds ENABLE_UNIFIED_BUILDS option to cmake ports, which allows us to disable Unified Builds in WebKit.
This makes `compile_commands.json` sane when the unified builds is disabled, and various tools can use this
compilation database. For example, YouCompleteMe completion server can use it.

* Source/cmake/WebKitFeatures.cmake:
* Source/cmake/WebKitMacros.cmake:

Source/WTF:

* Scripts/generate-unified-source-bundles.rb:

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

9 months agoUnreviewed, JSTests gardening with memoryLimited
yusukesuzuki@slowstart.org [Sun, 30 Dec 2018 20:53:48 +0000 (20:53 +0000)]
Unreviewed, JSTests gardening with memoryLimited

* stress/string-overflow-createError.js:

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

9 months ago[JSC] Identifier validity should be based on ID_Start / ID_Continue properties
ross.kirsling@sony.com [Sun, 30 Dec 2018 17:38:56 +0000 (17:38 +0000)]
[JSC] Identifier validity should be based on ID_Start / ID_Continue properties
https://bugs.webkit.org/show_bug.cgi?id=193050

Reviewed by Yusuke Suzuki.

JSTests:

* test262.yaml:
* test262/expectations.yaml:
Mark 16 tests as passing.

Source/JavaScriptCore:

From https://tc39.github.io/ecma262/#sec-names-and-keywords:
    UnicodeIDStart::
        any Unicode code point with the Unicode property "ID_Start"
    UnicodeIDContinue::
        any Unicode code point with the Unicode property "ID_Continue"

* parser/Lexer.cpp:
(JSC::Lexer<T>::Lexer):
(JSC::isNonLatin1IdentStart):
(JSC::isNonLatin1IdentPart):
(JSC::isIdentPart):
(JSC::Lexer<T>::lex):
Ensure identifier start / part is based on ID_Start / ID_Continue.
(Implies a special case for U+00B7, which is Latin-1 but Other_ID_Continue.)

LayoutTests:

* sputnik/Unicode/Unicode_218/S7.6_A1.1_T2-expected.txt:
* sputnik/Unicode/Unicode_218/S7.6_A1.1_T6-expected.txt:
* sputnik/Unicode/Unicode_218/S7.6_A5.2_T2-expected.txt:
* sputnik/Unicode/Unicode_218/S7.6_A5.2_T6-expected.txt:
* sputnik/Unicode/Unicode_218/S7.6_A5.3_T1-expected.txt:
* sputnik/Unicode/Unicode_218/S7.6_A5.3_T2-expected.txt:
* sputnik/Unicode/Unicode_320/S7.6_A1.1_T6-expected.txt:
* sputnik/Unicode/Unicode_320/S7.6_A2.3-expected.txt:
* sputnik/Unicode/Unicode_320/S7.6_A3.1-expected.txt:
* sputnik/Unicode/Unicode_320/S7.6_A5.2_T6-expected.txt:
* sputnik/Unicode/Unicode_320/S7.6_A5.2_T9-expected.txt:
* sputnik/Unicode/Unicode_320/S7.6_A5.3_T1-expected.txt:
* sputnik/Unicode/Unicode_320/S7.6_A5.3_T2-expected.txt:
* sputnik/Unicode/Unicode_410/S7.6_A1.1_T6-expected.txt:
* sputnik/Unicode/Unicode_410/S7.6_A3.1-expected.txt:
* sputnik/Unicode/Unicode_410/S7.6_A5.2_T6-expected.txt:
* sputnik/Unicode/Unicode_410/S7.6_A5.3_T1-expected.txt:
* sputnik/Unicode/Unicode_410/S7.6_A5.3_T2-expected.txt:
* sputnik/Unicode/Unicode_500/S7.6_A1.1_T6-expected.txt:
* sputnik/Unicode/Unicode_500/S7.6_A3.1-expected.txt:
* sputnik/Unicode/Unicode_500/S7.6_A5.2_T6-expected.txt:
* sputnik/Unicode/Unicode_500/S7.6_A5.3_T1-expected.txt:
* sputnik/Unicode/Unicode_500/S7.6_A5.3_T2-expected.txt:
* sputnik/Unicode/Unicode_510/S7.6_A1.1_T4-expected.txt:
* sputnik/Unicode/Unicode_510/S7.6_A1.1_T6-expected.txt:
* sputnik/Unicode/Unicode_510/S7.6_A5.2_T4-expected.txt:
* sputnik/Unicode/Unicode_510/S7.6_A5.2_T6-expected.txt:
Update expectations for outdated tests.

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

9 months agoMove WKEditCommandObjC and WKEditorUndoTargetObjC into a separate file
wenson_hsieh@apple.com [Sat, 29 Dec 2018 05:50:04 +0000 (05:50 +0000)]
Move WKEditCommandObjC and WKEditorUndoTargetObjC into a separate file
https://bugs.webkit.org/show_bug.cgi?id=193049

Reviewed by Sam Weinig.

Pull common code (WKEditCommandObjC and WKEditorUndoTargetObjC) on iOS and macOS out into a separate file. No
change in behavior.

* SourcesCocoa.txt:
* UIProcess/Cocoa/WKEditCommand.h: Added.
* UIProcess/Cocoa/WKEditCommand.mm: Added.

Rename WKEditCommandObjC to WKEditCommand, and WKEditorUndoTargetObjC to WKEditorUndoTarget. The ObjC suffix in
the name seems to diverge from the common naming scheme in other parts of WebKit, where most WK- and _WK-
prefixed names already refer to Objective-C objects. Additionally, mark -[WKEditCommand init] as unavailable.

(-[WKEditCommand initWithWebEditCommandProxy:]):

Make the return type instancetype instead of id, and also make this take a Ref<WebEditCommandProxy>&& instead
of a RefPtr.

(-[WKEditCommand command]):

Make this return a reference to the WebEditCommandProxy, rather than a pointer, since the WebEditCommandProxy
should always be non-null.

(-[WKEditorUndoTarget undoEditing:]):
(-[WKEditorUndoTarget redoEditing:]):
* UIProcess/Cocoa/WebViewImpl.h:
* UIProcess/Cocoa/WebViewImpl.mm:
(WebKit::WebViewImpl::WebViewImpl):
(WebKit::WebViewImpl::registerEditCommand):

Use WTFMove instead of copying the Ref when creating a WKEditCommand.

(-[WKEditCommandObjC initWithWebEditCommandProxy:]): Deleted.
(-[WKEditCommandObjC command]): Deleted.
(-[WKEditorUndoTargetObjC undoEditing:]): Deleted.
(-[WKEditorUndoTargetObjC redoEditing:]): Deleted.
* UIProcess/ios/PageClientImplIOS.h:
* UIProcess/ios/PageClientImplIOS.mm:
(WebKit::PageClientImpl::PageClientImpl):
(WebKit::PageClientImpl::registerEditCommand):

Use WTFMove instead of creating a new RefPtr when creating a WKEditCommand.

(-[WKEditCommandObjC initWithWebEditCommandProxy:]): Deleted.
(-[WKEditCommandObjC command]): Deleted.
(-[WKEditorUndoTargetObjC undoEditing:]): Deleted.
(-[WKEditorUndoTargetObjC redoEditing:]): Deleted.
* UIProcess/mac/PageClientImplMac.h:
* WebKit.xcodeproj/project.pbxproj:

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

9 months ago[JSC] Remove one indirection in JSObject::toStringName
yusukesuzuki@slowstart.org [Sat, 29 Dec 2018 04:24:29 +0000 (04:24 +0000)]
[JSC] Remove one indirection in JSObject::toStringName
https://bugs.webkit.org/show_bug.cgi?id=193037

Reviewed by Keith Miller.

Source/JavaScriptCore:

We should not have additional one-level indirection in JSObject::toStringName.
JSObject::toStringName is dispatched through methodTable. Even after that, we
need to call JSObject::className function through methodTable again. But className
function is rarely defined. So instead of introducing this indirection here,
classes having className functions should have toStringName function too. This can
remove one-level indirection in toStringName in major cases.

* API/JSCallbackObject.h:
* API/JSCallbackObjectFunctions.h:
(JSC::JSCallbackObject<Parent>::toStringName):
* debugger/DebuggerScope.cpp:
(JSC::DebuggerScope::toStringName):
* debugger/DebuggerScope.h:
* runtime/JSObject.cpp:
(JSC::JSObject::toStringName):

Source/WebCore:

Use old JSObject::toStringName function here.

* bindings/js/JSDOMConstructorBase.cpp:
(WebCore::JSDOMConstructorBase::className):
(WebCore::JSDOMConstructorBase::toStringName):
* bindings/js/JSDOMConstructorBase.h:
(WebCore::JSDOMConstructorBase::className): Deleted.

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

9 months agoResurrect Mac CMake build
achristensen@apple.com [Thu, 27 Dec 2018 16:13:47 +0000 (16:13 +0000)]
Resurrect Mac CMake build
https://bugs.webkit.org/show_bug.cgi?id=192658

Reviewed by Yusuke Suzuki.

.:

* Source/cmake/OptionsMac.cmake:

Source/JavaScriptCore:

* PlatformMac.cmake:

Source/WebCore:

This makes it so JSC and most of WebCore builds.
WebCore's use of ARC seems inconsistent, so I'll fix that later.

* PlatformMac.cmake:
* config.h:

Source/WebCore/PAL:

* pal/PlatformMac.cmake:

Source/WebKit:

* PlatformMac.cmake:

Source/WebKitLegacy:

* PlatformMac.cmake:

Source/WTF:

* wtf/PlatformMac.cmake:
* wtf/cf/CFURLExtras.cpp:
* wtf/cf/CFURLExtras.h:
* wtf/cf/URLCF.cpp:
* wtf/cocoa/NSURLExtras.h:
* wtf/cocoa/NSURLExtras.mm:
* wtf/cocoa/URLCocoa.mm:

Tools:

* DumpRenderTree/PlatformMac.cmake:
* MiniBrowser/mac/CMakeLists.txt:
* TestWebKitAPI/PlatformMac.cmake:

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

9 months ago[MSVC] error C2381: 'WebKit::NetworkHTTPSUpgradeChecker::~NetworkHTTPSUpgradeChecker...
Hironori.Fujii@sony.com [Thu, 27 Dec 2018 04:01:23 +0000 (04:01 +0000)]
[MSVC] error C2381: 'WebKit::NetworkHTTPSUpgradeChecker::~NetworkHTTPSUpgradeChecker': redefinition; '__declspec(noreturn)' or '[[noreturn]]' differs
https://bugs.webkit.org/show_bug.cgi?id=193030

Reviewed by Ross Kirsling.

Windows Debug builds are failing to compile due to
NO_RETURN_DUE_TO_ASSERT inconsistency of
NetworkHTTPSUpgradeChecker destructor's definition and
declaration.

* NetworkProcess/NetworkHTTPSUpgradeChecker.h: Added
NO_RETURN_DUE_TO_ASSERT to NetworkHTTPSUpgradeChecker destructor
declaration.
* NetworkProcess/NetworkHTTPSUpgradeChecker.cpp: Removed
NO_RETURN_DUE_TO_ASSERT from the definition.

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

9 months ago[FreeType] Restore conditional compilation logic for recent HarfBuzz refactoring
commit-queue@webkit.org [Wed, 26 Dec 2018 20:42:47 +0000 (20:42 +0000)]
[FreeType] Restore conditional compilation logic for recent HarfBuzz refactoring
https://bugs.webkit.org/show_bug.cgi?id=193036

Patch by Jim Mason <jmason@ibinx.com> on 2018-12-26
Reviewed by Michael Catanzaro.

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

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

9 months ago[Tools] Remove references to Bison and Flex
aperez@igalia.com [Wed, 26 Dec 2018 18:30:10 +0000 (18:30 +0000)]
[Tools] Remove references to Bison and Flex
https://bugs.webkit.org/show_bug.cgi?id=193033

Reviewed by Michael Catanzaro.

The Bison and Flex tools are not needed anymore since r209883.

* CygwinDownloader/cygwin-downloader.py:
* EWSTools/ubuntu-ews-packages:
* Scripts/filter-build-webkit:
(shouldIgnoreLine):
* gtk/install-dependencies:
* wpe/install-dependencies:

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

9 months ago[JSC][Win][Clang] warning: implicit conversion from 'size_t' (aka 'unsigned long...
Hironori.Fujii@sony.com [Wed, 26 Dec 2018 07:52:38 +0000 (07:52 +0000)]
[JSC][Win][Clang] warning: implicit conversion from 'size_t' (aka 'unsigned long long') to 'int32_t' (aka 'int') changes value from 18446744073709551552 to -64 [-Wconstant-conversion]
https://bugs.webkit.org/show_bug.cgi?id=193035

Reviewed by Yusuke Suzuki.

Clang-cl reports a compilation warning for implicit conversion
from -64 size_t to int. Replaced '-maxFrameExtentForSlowPathCall'
with '-static_cast<int32_t>(maxFrameExtentForSlowPathCall)'.

* dfg/DFGJITCompiler.cpp:
(JSC::DFG::JITCompiler::compile):
(JSC::DFG::JITCompiler::compileFunction):
* jit/JIT.cpp:
(JSC::JIT::compileWithoutLinking):
* jit/ThunkGenerators.cpp:
(JSC::slowPathFor):

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

9 months agoRemove "using namespace std;"
Hironori.Fujii@sony.com [Tue, 25 Dec 2018 04:40:16 +0000 (04:40 +0000)]
Remove "using namespace std;"
https://bugs.webkit.org/show_bug.cgi?id=192973
<rdar://problem/46937309>

Unreviewed Windows port Debug builds fix.

No new tests since no behavior changes.

* accessibility/win/AXObjectCacheWin.cpp:
(WebCore::AXObjectCache::postPlatformNotification): Add "std::" prefix to numeric_limits in ASSERT macro.

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

9 months ago[WebKit][Win] Remove using namespace in the global scope
Hironori.Fujii@sony.com [Tue, 25 Dec 2018 02:14:37 +0000 (02:14 +0000)]
[WebKit][Win] Remove using namespace in the global scope
https://bugs.webkit.org/show_bug.cgi?id=192968

Reviewed by Alex Christensen.

Moved using namespace statements in the global scope to inside
namespaces.
<https://webkit.org/code-style-guidelines/#using-position>

* NetworkProcess/Cookies/curl/WebCookieManagerCurl.cpp:
* NetworkProcess/curl/NetworkDataTaskCurl.cpp:
* NetworkProcess/curl/NetworkProcessCurl.cpp:
* NetworkProcess/curl/NetworkSessionCurl.cpp:
* NetworkProcess/curl/RemoteNetworkingContextCurl.cpp:
* Shared/Plugins/Netscape/NetscapePluginModuleNone.cpp:
* Shared/WebWheelEvent.cpp:
* Shared/curl/WebCoreArgumentCodersCurl.cpp:
* Shared/win/NativeWebKeyboardEventWin.cpp:
* Shared/win/WebEventFactory.cpp:
* UIProcess/Automation/WebAutomationSession.cpp:

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

9 months agoRemove "using namespace std;"
Hironori.Fujii@sony.com [Tue, 25 Dec 2018 02:00:11 +0000 (02:00 +0000)]
Remove "using namespace std;"
https://bugs.webkit.org/show_bug.cgi?id=192973

Reviewed by Alex Christensen.

Source/WebCore:

Removed "using namespace std" statement, and use std:: prefix.

No new tests since no behavior changes.

* accessibility/win/AXObjectCacheWin.cpp:
* platform/graphics/GraphicsContext3DPrivate.cpp:
* platform/graphics/cairo/ImageBufferCairo.cpp:
* platform/graphics/win/FontPlatformDataCairoWin.cpp:
* platform/graphics/win/FontWin.cpp:
(WebCore::FontCascade::floatWidthForComplexText const):
* platform/graphics/win/GraphicsContextCGWin.cpp:
* platform/graphics/win/GraphicsContextCairoWin.cpp:
* platform/graphics/win/GraphicsContextDirect2D.cpp:
* platform/graphics/win/GraphicsContextWin.cpp:
* platform/graphics/win/SimpleFontDataCGWin.cpp:
* platform/graphics/win/UniscribeController.cpp:
(WebCore::UniscribeController::UniscribeController):
(WebCore::UniscribeController::shapeAndPlaceItem):
* platform/image-decoders/ScalableImageDecoder.cpp:
* platform/text/LocaleICU.cpp:
* platform/text/win/LocaleWin.cpp:
* platform/win/ScrollbarThemeWin.cpp:
* rendering/RenderRubyRun.cpp:
(WebCore::RenderRubyRun::layoutBlock):
* rendering/RenderThemeWin.cpp:
(WebCore::RenderThemeWin::adjustMenuListButtonStyle const):
(WebCore::RenderThemeWin::paintSearchFieldCancelButton):
(WebCore::RenderThemeWin::adjustSearchFieldCancelButtonStyle const):
(WebCore::RenderThemeWin::adjustSearchFieldResultsDecorationPartStyle const):
(WebCore::RenderThemeWin::paintSearchFieldResultsDecorationPart):
(WebCore::RenderThemeWin::adjustSearchFieldResultsButtonStyle const):
(WebCore::RenderThemeWin::paintSearchFieldResultsButton):

Source/WebKit:

* Platform/IPC/win/ConnectionWin.cpp:

Source/WebKitLegacy/win:

* FullscreenVideoController.cpp:
* WebFrame.cpp:
(WebFrame::drawFooter):
* WebHistory.cpp:
* WebKitQuartzCoreAdditions/CAD3DRenderer.cpp:
* WebKitQuartzCoreAdditions/CAView.cpp:
* WebView.cpp:
(PreferencesChangedOrRemovedObserver::notifyPreferencesChanged):
(PreferencesChangedOrRemovedObserver::notifyPreferencesRemoved):
(WebView::setCacheModel):
(WebView::maxCacheModelInAnyInstance):

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

9 months agoChange ScrollingNodeType to an enum class
simon.fraser@apple.com [Mon, 24 Dec 2018 19:20:18 +0000 (19:20 +0000)]
Change ScrollingNodeType to an enum class
https://bugs.webkit.org/show_bug.cgi?id=193009

Reviewed by Zalan Bujtas.

Change the ScrollingNodeType enum to an enum class.

No behavior change.

Source/WebCore:

* page/scrolling/AsyncScrollingCoordinator.cpp:
(WebCore::AsyncScrollingCoordinator::ensureRootStateNodeForFrameView):
* page/scrolling/ScrollingCoordinator.cpp:
(WebCore::operator<<):
* page/scrolling/ScrollingCoordinator.h:
* page/scrolling/ScrollingStateFixedNode.cpp:
(WebCore::ScrollingStateFixedNode::ScrollingStateFixedNode):
* page/scrolling/ScrollingStateNode.h:
(WebCore::ScrollingStateNode::isFixedNode const):
(WebCore::ScrollingStateNode::isStickyNode const):
(WebCore::ScrollingStateNode::isFrameScrollingNode const):
(WebCore::ScrollingStateNode::isOverflowScrollingNode const):
* page/scrolling/ScrollingStateOverflowScrollingNode.cpp:
(WebCore::ScrollingStateOverflowScrollingNode::ScrollingStateOverflowScrollingNode):
* page/scrolling/ScrollingStateStickyNode.cpp:
(WebCore::ScrollingStateStickyNode::ScrollingStateStickyNode):
* page/scrolling/ScrollingStateTree.cpp:
(WebCore::ScrollingStateTree::createNode):
(WebCore::ScrollingStateTree::attachNode):
* page/scrolling/ScrollingTreeNode.h:
(WebCore::ScrollingTreeNode::isFixedNode const):
(WebCore::ScrollingTreeNode::isStickyNode const):
(WebCore::ScrollingTreeNode::isFrameScrollingNode const):
(WebCore::ScrollingTreeNode::isOverflowScrollingNode const):
* page/scrolling/ScrollingTreeOverflowScrollingNode.cpp:
(WebCore::ScrollingTreeOverflowScrollingNode::ScrollingTreeOverflowScrollingNode):
* page/scrolling/ios/ScrollingTreeIOS.cpp:
(WebCore::ScrollingTreeIOS::createScrollingTreeNode):
* page/scrolling/mac/ScrollingTreeFixedNode.mm:
(WebCore::ScrollingTreeFixedNode::ScrollingTreeFixedNode):
* page/scrolling/mac/ScrollingTreeMac.cpp:
(ScrollingTreeMac::createScrollingTreeNode):
* page/scrolling/mac/ScrollingTreeStickyNode.mm:
(WebCore::ScrollingTreeStickyNode::ScrollingTreeStickyNode):
* platform/graphics/GraphicsLayerClient.h:
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::reattachSubframeScrollLayers):
(WebCore::scrollCoordinationRoleForNodeType):
(WebCore::RenderLayerCompositor::updateScrollCoordinationForThisFrame):
(WebCore::RenderLayerCompositor::updateScrollCoordinatedLayer):

Source/WebKit:

* Shared/RemoteLayerTree/RemoteScrollingCoordinatorTransaction.cpp:
(WebKit::encodeNodeAndDescendants):
(WebKit::RemoteScrollingCoordinatorTransaction::decode):
(WebKit::dump):
* UIProcess/RemoteLayerTree/RemoteScrollingCoordinatorProxy.cpp:
(WebKit::RemoteScrollingCoordinatorProxy::connectStateNodeLayers):
* UIProcess/RemoteLayerTree/RemoteScrollingTree.cpp:
(WebKit::RemoteScrollingTree::createScrollingTreeNode):
* UIProcess/RemoteLayerTree/ios/RemoteScrollingCoordinatorProxyIOS.mm:
(WebKit::RemoteScrollingCoordinatorProxy::connectStateNodeLayers):
* UIProcess/RemoteLayerTree/ios/ScrollingTreeScrollingNodeDelegateIOS.mm:
(WebKit::ScrollingTreeScrollingNodeDelegateIOS::updateChildNodesAfterScroll):

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

9 months ago[iOS] Remove some unnecessary editing SPI after <rdar://problem/46047546>
wenson_hsieh@apple.com [Mon, 24 Dec 2018 05:07:01 +0000 (05:07 +0000)]
[iOS] Remove some unnecessary editing SPI after <rdar://problem/46047546>
https://bugs.webkit.org/show_bug.cgi?id=193019

Reviewed by Dan Bernstein.

Remove these SPI method declarations, as well as method forwarding in WKContentView. Mail was the only adoptee
of these methods; after <rdar://problem/46047546>, they have moved to the underscore-prefixed versions, so we
we have no need for these erroneously-named SPI methods anymore. There is no change in behavior; verified this
through existing API tests (WKWebViewEditActions), as well as building iOS Mail against WebKit with these
changes to WKWebViewPrivate.h.

* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView canPerformAction:withSender:]):
(-[WKWebView targetForAction:withSender:]):
(-[WKWebView _setFont:sender:]):
(-[WKWebView _setFontSize:sender:]):
(-[WKWebView _setTextColor:sender:]):
(-[WKWebView setFont:sender:]): Deleted.
(-[WKWebView setTextColor:sender:]): Deleted.
(-[WKWebView setFontSize:sender:]): Deleted.
* UIProcess/API/Cocoa/WKWebViewPrivate.h:
* UIProcess/ios/WKContentViewInteraction.h:
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView canPerformActionForWebView:withSender:]):
(-[WKContentView setFontForWebView:sender:]): Deleted.
(-[WKContentView setFontSizeForWebView:sender:]): Deleted.
(-[WKContentView setTextColorForWebView:sender:]): Deleted.

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

9 months agoFix fast/ruby/ruby-base-merge-block-children-crash-2.html after r239543
wenson_hsieh@apple.com [Sun, 23 Dec 2018 23:51:30 +0000 (23:51 +0000)]
Fix fast/ruby/ruby-base-merge-block-children-crash-2.html after r239543
https://bugs.webkit.org/show_bug.cgi?id=193015
<rdar://problem/46583527>

Reviewed by Tim Horton.

Fix the crash by gracefully handling integer overflow when computing the area of a very large editable element.

* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView _elementDidFocus:userIsInteracting:blurPreviousNode:changingActivityState:userObject:]):
(-[WKContentView _updateChangedSelection:]):

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

9 months agoUnreviewed GTK+ gardening. Rebaseline fast/text/zero-font-size.html after r239539.
carlosgc@webkit.org [Sun, 23 Dec 2018 10:46:38 +0000 (10:46 +0000)]
Unreviewed GTK+ gardening. Rebaseline fast/text/zero-font-size.html after r239539.

* platform/gtk/fast/text/zero-font-size-expected.txt:

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

9 months ago[BigInt] Support BigInt in JSON.stringify
yusukesuzuki@slowstart.org [Sun, 23 Dec 2018 10:09:09 +0000 (10:09 +0000)]
[BigInt] Support BigInt in JSON.stringify
https://bugs.webkit.org/show_bug.cgi?id=192624

Reviewed by Saam Barati.

JSTests:

* stress/big-int-json-stringify-to-json.js: Added.
(shouldBe):
(shouldThrow):
(BigInt.prototype.toJSON):
(shouldBe.JSON.stringify):
* stress/big-int-json-stringify.js: Added.
(shouldBe):
(shouldThrow):

Source/JavaScriptCore:

This patch adds BigInt support to JSON.stringify, specified in [1].

[1]: https://tc39.github.io/proposal-bigint/#sec-serializejsonproperty

* runtime/JSONObject.cpp:
(JSC::unwrapBoxedPrimitive):
(JSC::Stringifier::toJSON):
(JSC::Stringifier::toJSONImpl):
(JSC::Stringifier::appendStringifiedValue):

LayoutTests:

The test is wrong according to the spec[1]. valueOf of Boolean object won't be called.

[1]: https://tc39.github.io/ecma262/#sec-serializejsonproperty

* js/resources/JSON-stringify.js:
* js/resources/json2-es5-compat.js:
(str):

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

9 months ago[iOS] Suppress native selection behaviors when focusing a very small editable element
wenson_hsieh@apple.com [Sun, 23 Dec 2018 06:38:24 +0000 (06:38 +0000)]
[iOS] Suppress native selection behaviors when focusing a very small editable element
https://bugs.webkit.org/show_bug.cgi?id=193005
<rdar://problem/46583527>

Reviewed by Tim Horton.

Source/WebKit:

In r238146, I added a mechanism to detect when the selection is hidden within transparent editable elements, and
used this to suppress native selection on iOS (such as selection handles, highlight, callout bar, etc.) to avoid
conflicts between the page's editing UI and the platform.

However, one additional technique observed on some websites involves hiding the selection by moving it into a
tiny (1x1) editable element. Here, we currently still present a callout bar with editing actions, as well as
show a selection caret or handles on iOS. To fix this, we extend the mechanism added in r238146 by also
suppressing the selection assistant in the case where the editable element's area is beneath a tiny minimum
threshold.

Test: editing/selection/ios/hide-selection-in-tiny-contenteditable.html

* Shared/EditorState.cpp:
(WebKit::EditorState::PostLayoutData::encode const):
(WebKit::EditorState::PostLayoutData::decode):
(WebKit::operator<<):
* Shared/EditorState.h:

Rename selectionClipRect to focusedElementRect. We currently propagate the bounds of the focused element to the
UI process through EditorState updates, but only for the purpose of returning it in the computed selection clip
rect; instead, rename this member to something more general-purpose, so we can also use it when determining
whether to suppress the selection assistant.

* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _candidateRect]):
* UIProcess/Cocoa/WebViewImpl.mm:
(WebKit::WebViewImpl::handleRequestedCandidates):
* UIProcess/ios/WKContentViewInteraction.h:

Add a new SuppressSelectionAssistantReason that corresponds to focusing tiny editable elements.

* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView _zoomToRevealFocusedElement]):
(-[WKContentView _selectionClipRect]):
(-[WKContentView _elementDidFocus:userIsInteracting:blurPreviousNode:changingActivityState:userObject:]):
(-[WKContentView _updateChangedSelection:]):

Check the size of the focused element, and begin or stop suppressing the selection assistant accordingly.

* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::platformEditorState const):
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::platformEditorState const):

LayoutTests:

Add a new layout test to verify that native selection UI is suppressed when focusing a tiny (1px by 1px)
editable element.

* editing/selection/ios/hide-selection-in-tiny-contenteditable-expected.txt: Added.
* editing/selection/ios/hide-selection-in-tiny-contenteditable.html: Added.
* resources/ui-helper.js:
(window.UIHelper.zoomToScale):

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

9 months agoFixed Apple production builds.
mitz@apple.com [Sat, 22 Dec 2018 22:54:38 +0000 (22:54 +0000)]
Fixed Apple production builds.

* Configurations/Base.xcconfig: Exclude the Source/third_party/boringssl/src/util
  subdirectory, which contains binaries, from installsrc. Its contents are not used for
  building any of the targets in the project.

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

9 months agoWebDriver: warn about non existing tests when parsing expectations
carlosgc@webkit.org [Sat, 22 Dec 2018 12:37:15 +0000 (12:37 +0000)]
WebDriver: warn about non existing tests when parsing expectations
https://bugs.webkit.org/show_bug.cgi?id=192979

Reviewed by Michael Catanzaro.

It's common to update web driver tests and forget updating the test expectations in case of tests removed or
renamed.

* Scripts/webkitpy/webdriver_tests/webdriver_test_runner.py:
(WebDriverTestRunner.__init__):

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

9 months ago[HarfBuzz] Width not correctly reported as 0 for zero font size
carlosgc@webkit.org [Sat, 22 Dec 2018 12:33:52 +0000 (12:33 +0000)]
[HarfBuzz] Width not correctly reported as 0 for zero font size
https://bugs.webkit.org/show_bug.cgi?id=192986

Reviewed by Michael Catanzaro.

Fixes test fast/text/font-size-zero.html

* platform/graphics/harfbuzz/ComplexTextControllerHarfBuzz.cpp:
(WebCore::ComplexTextController::ComplexTextRun::ComplexTextRun): Use empty advances for glyphs when the font
size is zero.

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

9 months agoFixed building for macOS 10.13 using the macOS 10.14 SDK.
mitz@apple.com [Sat, 22 Dec 2018 07:53:26 +0000 (07:53 +0000)]
Fixed building for macOS 10.13 using the macOS 10.14 SDK.

* wtf/Platform.h: Changed HAVE_AUTHORIZATION_STATUS_FOR_MEDIA_TYPE to depend on the
  deployment target, not the SDK.

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

9 months ago[JSC] Implement "well-formed JSON.stringify" proposal
yusukesuzuki@slowstart.org [Sat, 22 Dec 2018 06:41:03 +0000 (06:41 +0000)]
[JSC] Implement "well-formed JSON.stringify" proposal
https://bugs.webkit.org/show_bug.cgi?id=191677

Reviewed by Darin Adler.

JSTests:

* stress/json-surrogate-pair.js: Added.
(shouldBe):
* test262/expectations.yaml:

Source/WTF:

This patch implements "well-formed JSON.stringify" proposal[1], which is now stage 3.
JSON.stringify appended surrogate pair codes even if it is not paired appropriately.
The proposal requires that broken surrogate pairs are unicode-escaped.

[1]: https://github.com/tc39/proposal-well-formed-stringify

* wtf/text/StringBuilderJSON.cpp:
(WTF::appendQuotedJSONStringInternal):

LayoutTests:

* css3/escape-dom-api-expected.txt:
* js/dom/webidl-type-mapping-expected.txt:
* js/resources/json2-es5-compat.js:
(isHighSurrogate):
(isLowSurrogate):
(isSurrogate):
(quote):

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

9 months ago[JSC] Use appendUnbarriered for cached own keys
yusukesuzuki@slowstart.org [Sat, 22 Dec 2018 06:39:23 +0000 (06:39 +0000)]
[JSC] Use appendUnbarriered for cached own keys
https://bugs.webkit.org/show_bug.cgi?id=192981

Reviewed by Saam Barati.

m_cachedOwnKeys would be changed to sentinel after checking `thisObject->m_cachedOwnKeys.unvalidatedGet() != cachedOwnKeysSentinel()`
and before executing `visitor.append(thisObject->m_cachedOwnKeys)`. We never do this now, but might in the future.
To make the code safe, we should use appendUnbarriered to mark non sentinel cell.

* runtime/StructureRareData.cpp:
(JSC::StructureRareData::visitChildren):

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

9 months agoUse Ref<> as much as possible
yusukesuzuki@slowstart.org [Sat, 22 Dec 2018 06:37:39 +0000 (06:37 +0000)]
Use Ref<> as much as possible
https://bugs.webkit.org/show_bug.cgi?id=192808

Reviewed by Alex Christensen.

Source/JavaScriptCore:

* API/JSTypedArray.cpp:
(JSObjectMakeTypedArrayWithBytesNoCopy):
* API/JSWeakObjectMapRefPrivate.cpp:
* bytecompiler/StaticPropertyAnalyzer.h:
(JSC::StaticPropertyAnalyzer::newObject):
* dfg/DFGDesiredWatchpoints.cpp:
(JSC::DFG::ArrayBufferViewWatchpointAdaptor::add):
* heap/Heap.cpp:
(JSC::Heap::Heap):
(JSC::Heap::sweeper):
* heap/Heap.h:
* heap/IsoCellSet.cpp:
(JSC::IsoCellSet::parallelNotEmptyMarkedBlockSource):
* heap/IsoCellSet.h:
* heap/IsoCellSetInlines.h:
(JSC::IsoCellSet::forEachMarkedCellInParallel):
* heap/Subspace.cpp:
(JSC::Subspace::parallelDirectorySource):
(JSC::Subspace::parallelNotEmptyMarkedBlockSource):
* heap/Subspace.h:
* heap/SubspaceInlines.h:
(JSC::Subspace::forEachMarkedCellInParallel):
* jsc.cpp:
(functionDollarAgentReceiveBroadcast):
* runtime/ArrayBuffer.cpp:
(JSC::ArrayBuffer::slice const):
(JSC::ArrayBuffer::sliceImpl const):
* runtime/ArrayBuffer.h:
* runtime/ArrayBufferNeuteringWatchpoint.cpp:
(JSC::ArrayBufferNeuteringWatchpoint::ArrayBufferNeuteringWatchpoint):
(JSC::ArrayBufferNeuteringWatchpoint::fireAll):
* runtime/ArrayBufferNeuteringWatchpoint.h:
* runtime/JSArrayBufferPrototype.cpp:
(JSC::arrayBufferProtoFuncSlice):

Source/WebCore:

* Modules/encryptedmedia/NavigatorEME.cpp:
(WebCore::NavigatorEME::requestMediaKeySystemAccess):
* Modules/fetch/FetchBody.cpp:
(WebCore::FetchBody::bodyAsFormData const):
* Modules/geolocation/Geolocation.cpp:
(WebCore::Geolocation::getCurrentPosition):
(WebCore::Geolocation::watchPosition):
* Modules/indexeddb/IDBDatabase.cpp:
(WebCore::IDBDatabase::objectStoreNames const):
* Modules/indexeddb/IDBDatabase.h:
* Modules/indexeddb/IDBObjectStore.cpp:
(WebCore::IDBObjectStore::indexNames const):
* Modules/indexeddb/IDBObjectStore.h:
* Modules/indexeddb/IDBTransaction.cpp:
(WebCore::IDBTransaction::scheduleOperation):
* Modules/indexeddb/IDBTransaction.h:
* Modules/indexeddb/client/TransactionOperation.h:
(WebCore::IDBClient::createTransactionOperation):
* Modules/mediastream/MediaDevices.cpp:
(WebCore::MediaDevices::getUserMedia const):
(WebCore::MediaDevices::getDisplayMedia const):
* Modules/mediastream/UserMediaRequest.cpp:
(WebCore::UserMediaRequest::create):
* Modules/mediastream/UserMediaRequest.h:
* Modules/webaudio/AudioParam.cpp:
(WebCore::AudioParam::calculateFinalValues):
* Modules/webaudio/ScriptProcessorNode.cpp:
(WebCore::ScriptProcessorNode::initialize):
* Modules/webdatabase/SQLStatement.cpp:
(WebCore::SQLStatement::execute):
* Modules/webgpu/WebGPU.cpp:
(WebCore::WebGPU::requestAdapter const):
* Modules/webgpu/WebGPUAdapter.cpp:
(WebCore::WebGPUAdapter::create):
* Modules/webgpu/WebGPUAdapter.h:
* Modules/webgpu/WebGPUBuffer.cpp:
(WebCore::WebGPUBuffer::create):
* Modules/webgpu/WebGPUBuffer.h:
* Modules/webgpu/WebGPUCommandBuffer.cpp:
(WebCore::WebGPUCommandBuffer::create):
(WebCore::WebGPUCommandBuffer::beginRenderPass):
* Modules/webgpu/WebGPUCommandBuffer.h:
* Modules/webgpu/WebGPUDevice.cpp:
(WebCore::WebGPUDevice::create):
(WebCore::WebGPUDevice::createBuffer const):
(WebCore::WebGPUDevice::createShaderModule const):
(WebCore::WebGPUDevice::createRenderPipeline const):
(WebCore::WebGPUDevice::createCommandBuffer const):
* Modules/webgpu/WebGPURenderPassEncoder.cpp:
(WebCore::WebGPURenderPassEncoder::create):
* Modules/webgpu/WebGPURenderPassEncoder.h:
* Modules/webgpu/WebGPURenderPipeline.cpp:
(WebCore::WebGPURenderPipeline::create):
* Modules/webgpu/WebGPURenderPipeline.h:
* Modules/webgpu/WebGPUShaderModule.cpp:
(WebCore::WebGPUShaderModule::create):
* Modules/webgpu/WebGPUShaderModule.h:
* Modules/webgpu/WebGPUTexture.cpp:
(WebCore::WebGPUTexture::createDefaultTextureView):
* Modules/webgpu/WebGPUTextureView.cpp:
(WebCore::WebGPUTextureView::create):
* Modules/webgpu/WebGPUTextureView.h:
* accessibility/AXObjectCache.cpp:
(WebCore::AXObjectCache::rangeMatchesTextNearRange):
* accessibility/atk/AXObjectCacheAtk.cpp:
(WebCore::AXObjectCache::nodeTextChangePlatformNotification):
* accessibility/atk/WebKitAccessibleHyperlink.cpp:
(webkitAccessibleHyperlinkGetStartIndex):
(webkitAccessibleHyperlinkGetEndIndex):
* accessibility/atk/WebKitAccessibleInterfaceText.cpp:
(getSelectionOffsetsForObject):
* accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
(-[WebAccessibilityObjectWrapper _convertToNSRange:]):
* bindings/js/JSDOMGlobalObjectTask.cpp:
* bindings/js/JSDOMWindowBase.cpp:
(WebCore::JSDOMWindowBase::queueTaskToEventLoop):
* bindings/js/JSWorkerGlobalScopeBase.cpp:
(WebCore::JSWorkerGlobalScopeBase::queueTaskToEventLoop):
* bindings/js/ScriptControllerMac.mm:
(WebCore::ScriptController::createScriptInstanceForWidget):
* bindings/js/SerializedScriptValue.cpp:
(WebCore::CloneDeserializer::readTerminal):
(WebCore::SerializedScriptValue::create):
* bridge/objc/objc_instance.h:
* bridge/objc/objc_instance.mm:
(ObjcInstance::create):
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::ComputedStyleExtractor::currentColorOrValidColor const):
(WebCore::ComputedStyleExtractor::getCSSPropertyValuesForShorthandProperties):
(WebCore::ComputedStyleExtractor::getCSSPropertyValuesForGridShorthand):
(WebCore::ComputedStyleExtractor::getBackgroundShorthandValue):
* css/CSSComputedStyleDeclaration.h:
* css/CSSFontFaceSource.cpp:
(WebCore::CSSFontFaceSource::load):
* css/CSSStyleSheet.cpp:
(WebCore::CSSStyleSheet::rules):
* css/FontFace.cpp:
(WebCore::FontFace::unicodeRange const):
(WebCore::FontFace::featureSettings const):
* css/InspectorCSSOMWrappers.cpp:
(WebCore::InspectorCSSOMWrappers::collectFromStyleSheetContents):
* css/SVGCSSComputedStyleDeclaration.cpp:
(WebCore::strokeDashArrayToCSSValueList):
(WebCore::ComputedStyleExtractor::adjustSVGPaintForCurrentColor const):
* css/StyleResolver.cpp:
(WebCore::StyleResolver::createFilterOperations):
* css/StyleRule.cpp:
(WebCore::StyleRuleBase::createCSSOMWrapper const):
* css/StyleRule.h:
* dom/ChildListMutationScope.cpp:
(WebCore::ChildListMutationAccumulator::getOrCreate):
* dom/ChildListMutationScope.h:
* dom/DocumentMarkerController.cpp:
(WebCore::updateRenderedRectsForMarker):
* dom/InlineStyleSheetOwner.cpp:
(WebCore::InlineStyleSheetOwner::createSheet):
* dom/PointerEvent.h:
* dom/UserGestureIndicator.h:
(WebCore::UserGestureToken::create):
* editing/AlternativeTextController.cpp:
(WebCore::AlternativeTextController::applyAlternativeTextToRange):
(WebCore::AlternativeTextController::respondToUnappliedSpellCorrection):
(WebCore::AlternativeTextController::respondToUnappliedEditing):
(WebCore::AlternativeTextController::markPrecedingWhitespaceForDeletedAutocorrectionAfterCommand):
(WebCore::AlternativeTextController::respondToMarkerAtEndOfWord):
* editing/ApplyStyleCommand.cpp:
(WebCore::ApplyStyleCommand::applyBlockStyle):
(WebCore::ApplyStyleCommand::pushDownInlineStyleAroundNode):
* editing/CompositeEditCommand.cpp:
(WebCore::CompositeEditCommand::targetRanges const):
(WebCore::CompositeEditCommand::replaceTextInNodePreservingMarkers):
(WebCore::CompositeEditCommand::moveParagraphs):
* editing/DeleteSelectionCommand.cpp:
(WebCore::DeleteSelectionCommand::mergeParagraphs):
* editing/Editing.cpp:
(WebCore::visiblePositionForIndexUsingCharacterIterator):
* editing/EditingStyle.cpp:
(WebCore::EditingStyle::removeStyleConflictingWithStyleOfNode):
(WebCore::EditingStyle::conflictsWithInlineStyleOfElement const):
(WebCore::EditingStyle::prepareToApplyAt):
(WebCore::EditingStyle::mergeInlineAndImplicitStyleOfElement):
(WebCore::EditingStyle::mergeStyleFromRulesForSerialization):
(WebCore::EditingStyle::removeStyleFromRulesAndContext):
(WebCore::extractPropertiesNotIn):
* editing/Editor.cpp:
(WebCore::Editor::setBaseWritingDirection):
(WebCore::Editor::setComposition):
* editing/EditorCommand.cpp:
(WebCore::executeApplyParagraphStyle):
(WebCore::executeMakeTextWritingDirectionLeftToRight):
(WebCore::executeMakeTextWritingDirectionNatural):
(WebCore::executeMakeTextWritingDirectionRightToLeft):
* editing/FormatBlockCommand.cpp:
(WebCore::FormatBlockCommand::formatRange):
* editing/RemoveFormatCommand.cpp:
(WebCore::RemoveFormatCommand::doApply):
* editing/ReplaceRangeWithTextCommand.cpp:
(WebCore::ReplaceRangeWithTextCommand::targetRanges const):
* editing/ReplaceSelectionCommand.cpp:
(WebCore::ReplaceSelectionCommand::removeRedundantStylesAndKeepStyleSpanInline):
(WebCore::handleStyleSpansBeforeInsertion):
(WebCore::ReplaceSelectionCommand::handleStyleSpans):
* editing/SpellingCorrectionCommand.cpp:
(WebCore::SpellingCorrectionCommand::targetRanges const):
* editing/TextCheckingHelper.cpp:
(WebCore::TextCheckingHelper::findFirstMisspellingOrBadGrammar):
* editing/TypingCommand.cpp:
(WebCore::TypingCommand::insertText):
(WebCore::TypingCommand::willAddTypingToOpenCommand):
* editing/VisibleUnits.cpp:
(WebCore::distanceBetweenPositions):
* editing/cocoa/EditorCocoa.mm:
(WebCore::Editor::selectionInWebArchiveFormat):
* editing/ios/DictationCommandIOS.cpp:
(WebCore::DictationCommandIOS::doApply):
* editing/ios/EditorIOS.mm:
(WebCore::Editor::setTextAlignmentForChangedBaseWritingDirection):
(WebCore::Editor::removeUnchangeableStyles):
(WebCore::Editor::writeImageToPasteboard):
* editing/mac/EditorMac.mm:
(WebCore::Editor::replaceNodeFromPasteboard):
(WebCore::Editor::imageInWebArchiveFormat):
* editing/markup.cpp:
(WebCore::styleFromMatchedRulesAndInlineDecl):
(WebCore::createFragmentForTransformToFragment):
* fileapi/FileReaderLoader.cpp:
(WebCore::FileReaderLoader::didFinishLoading):
* html/FTPDirectoryDocument.cpp:
(WebCore::createTemplateDocumentData):
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::scheduleEvent):
(WebCore::HTMLMediaElement::createMediaControls):
* html/HTMLTableElement.cpp:
(WebCore::HTMLTableElement::createSharedCellStyle):
* html/HTMLTableElement.h:
* html/URLUtils.h:
(WebCore::URLUtils<T>::origin const):
* html/parser/HTMLConstructionSite.cpp:
(WebCore::HTMLConstructionSite::createHTMLElementOrFindCustomElementInterface):
* html/shadow/TextControlInnerElements.cpp:
(WebCore::TextControlInnerElement::resolveCustomStyle):
* html/track/WebVTTParser.cpp:
(WebCore::WebVTTParser::createNewCue):
* inspector/DOMPatchSupport.cpp:
* inspector/InspectorCanvas.cpp:
(WebCore::InspectorCanvas::buildInitialState):
(WebCore::InspectorCanvas::buildAction):
* inspector/InspectorFrontendClientLocal.cpp:
(WebCore::InspectorFrontendClientLocal::openInNewTab):
* inspector/InspectorStyleSheet.cpp:
(WebCore::asCSSRuleList):
(WebCore::InspectorStyle::styleWithProperties const):
(WebCore::InspectorStyleSheet::ensureSourceData):
* inspector/agents/InspectorCanvasAgent.cpp:
(WebCore::InspectorCanvasAgent::didCreateCanvasRenderingContext):
* inspector/agents/InspectorIndexedDBAgent.cpp:
(WebCore::Inspector::keyPathFromIDBKeyPath):
* inspector/agents/InspectorPageAgent.cpp:
(WebCore::InspectorPageAgent::archive):
* loader/EmptyClients.cpp:
(WebCore::EmptyStorageNamespaceProvider::createSessionStorageNamespace):
(WebCore::EmptyStorageNamespaceProvider::createLocalStorageNamespace):
(WebCore::EmptyStorageNamespaceProvider::createEphemeralLocalStorageNamespace):
(WebCore::EmptyStorageNamespaceProvider::createTransientLocalStorageNamespace):
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::loadURL):
(WebCore::FrameLoader::shouldInterruptLoadForXFrameOptions):
(WebCore::FrameLoader::loadDifferentDocumentItem):
* loader/WorkerThreadableLoader.cpp:
(WebCore::WorkerThreadableLoader::loadResourceSynchronously):
* loader/archive/mhtml/MHTMLParser.cpp:
(WebCore::MHTMLParser::addResourceToArchive):
(WebCore::MHTMLParser::parseNextPart):
* loader/cache/MemoryCache.cpp:
(WebCore::MemoryCache::addImageToCache):
(WebCore::MemoryCache::removeResourcesWithOrigin):
* page/DOMWindow.cpp:
(WebCore::DOMWindow::getMatchedCSSRules const):
(WebCore::DOMWindow::createWindow):
* page/EventHandler.cpp:
(WebCore::textDistance):
* page/Page.cpp:
(WebCore::Page::userStyleSheet const):
* page/animation/CSSPropertyAnimation.cpp:
(WebCore::blendFilterOperations):
* page/ios/FrameIOS.mm:
(WebCore::Frame::initWithSimpleHTMLDocument):
(WebCore::Frame::interpretationsForCurrentRoot const):
* page/mac/ServicesOverlayController.mm:
(WebCore::ServicesOverlayController::Highlight::fadeIn):
(WebCore::ServicesOverlayController::Highlight::fadeOut):
* platform/SharedBuffer.cpp:
(WebCore::SharedBuffer::tryCreateArrayBuffer const):
* platform/audio/HRTFElevation.cpp:
(WebCore::HRTFElevation::calculateKernelsForAzimuthElevation):
* platform/audio/SincResampler.cpp:
(WebCore::SincResampler::consumeSource):
* platform/audio/gstreamer/AudioFileReaderGStreamer.cpp:
(WebCore::AudioFileReader::createBus):
* platform/audio/mac/AudioFileReaderMac.cpp:
(WebCore::AudioFileReader::createBus):
* platform/graphics/Icon.h:
(WebCore::Icon::create):
* platform/graphics/InbandTextTrackPrivate.h:
(WebCore::InbandTextTrackPrivate::create):
* platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
(WebCore::AVFWrapper::shouldWaitForLoadingOfResource):
* platform/graphics/avfoundation/objc/AudioTrackPrivateMediaSourceAVFObjC.h:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::fulfillRequestWithKeyData):
(WebCore::MediaPlayerPrivateAVFoundationObjC::shouldWaitForLoadingOfResource):
* platform/graphics/avfoundation/objc/MediaSourcePrivateAVFObjC.h:
* platform/graphics/avfoundation/objc/MediaSourcePrivateAVFObjC.mm:
(WebCore::MediaSourcePrivateAVFObjC::create):
(WebCore::MediaSourcePrivateAVFObjC::addSourceBuffer):
* platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.h:
* platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
(WebCore::SourceBufferPrivateAVFObjC::create):
(WebCore::SourceBufferPrivateAVFObjC::didParseStreamDataAsAsset):
* platform/graphics/avfoundation/objc/VideoTrackPrivateMediaSourceAVFObjC.h:
* platform/graphics/ca/TileController.cpp:
(WebCore::TileController::createTileLayer):
* platform/graphics/ca/TileController.h:
* platform/graphics/ca/win/CACFLayerTreeHost.cpp:
(WebCore::CACFLayerTreeHost::acceleratedCompositingAvailable):
(WebCore::CACFLayerTreeHost::create):
* platform/graphics/gpu/cocoa/GPUBufferMetal.mm:
(WebCore::GPUBuffer::create):
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::MediaPlayerPrivateGStreamer::updateTracks):
(WebCore::MediaPlayerPrivateGStreamer::notifyPlayerOfVideo):
(WebCore::MediaPlayerPrivateGStreamer::notifyPlayerOfAudio):
(WebCore::MediaPlayerPrivateGStreamer::notifyPlayerOfText):
(WebCore::MediaPlayerPrivateGStreamer::handleMessage):
(WebCore::MediaPlayerPrivateGStreamer::processMpegTsSection):
(WebCore::MediaPlayerPrivateGStreamer::loadNextLocation):
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
(WebCore::MediaPlayerPrivateGStreamerBase::paint):
* platform/graphics/gstreamer/mse/AppendPipeline.cpp:
(WebCore::AppendPipeline::appsinkNewSample):
* platform/graphics/iso/ISOProtectionSystemSpecificHeaderBox.cpp:
(WebCore::ISOProtectionSystemSpecificHeaderBox::parse):
* platform/graphics/iso/ISOTrackEncryptionBox.cpp:
(WebCore::ISOTrackEncryptionBox::parse):
* platform/graphics/texmap/TextureMapperAnimation.cpp:
(WebCore::applyFilterAnimation):
* platform/graphics/texmap/TextureMapperPlatformLayerBuffer.cpp:
(WebCore::TextureMapperPlatformLayerBuffer::clone):
* platform/graphics/transforms/TransformOperations.cpp:
(WebCore::TransformOperations::blendByMatchingOperations const):
* platform/image-decoders/ico/ICOImageDecoder.cpp:
(WebCore::ICOImageDecoder::setDataForPNGDecoderAtIndex):
* platform/mock/mediasource/MockBox.cpp:
(WebCore::MockInitializationBox::MockInitializationBox):
* platform/mock/mediasource/MockSourceBufferPrivate.cpp:
(WebCore::MockSourceBufferPrivate::create):
(WebCore::MockSourceBufferPrivate::append):
* platform/mock/mediasource/MockSourceBufferPrivate.h:
* platform/mock/mediasource/MockTracks.h:
(WebCore::MockTextTrackPrivate::create):
(WebCore::MockVideoTrackPrivate::create):
* platform/network/FormData.h:
(WebCore::FormData::decode):
* platform/network/cocoa/CookieStorageObserver.h:
* platform/network/cocoa/CookieStorageObserver.mm:
(WebCore::CookieStorageObserver::create):
* platform/network/soup/ResourceRequestSoup.cpp:
(WebCore::appendEncodedBlobItemToSoupMessageBody):
(WebCore::ResourceRequest::updateSoupMessageBody const):
* platform/text/hyphen/HyphenationLibHyphen.cpp:
(WebCore::HyphenationDictionary::createNull):
(WebCore::HyphenationDictionary::create):
* platform/win/SearchPopupMenuWin.cpp:
(WebCore::SearchPopupMenuWin::SearchPopupMenuWin):
(WebCore::SearchPopupMenuWin::popupMenu):
* platform/win/SearchPopupMenuWin.h:
* rendering/RenderThemeIOS.mm:
(WebCore::applyCommonButtonPaddingToStyle):
(WebCore::RenderThemeIOS::paintProgressBar):
(WebCore::RenderThemeIOS::adjustButtonStyle const):
(WebCore::paintAttachmentIcon):
* rendering/svg/SVGRenderTreeAsText.cpp:
(WebCore::writeSVGResourceContainer):
* storage/Storage.cpp:
(WebCore::Storage::create):
(WebCore::Storage::Storage):
* storage/Storage.h:
(WebCore::Storage::area const):
* storage/StorageNamespace.h:
* storage/StorageNamespaceProvider.cpp:
(WebCore::StorageNamespaceProvider::localStorageArea):
* storage/StorageNamespaceProvider.h:
* svg/SVGElement.cpp:
(WebCore::SVGElement::getPresentationAttribute):
* svg/SVGFEBlendElement.cpp:
(WebCore::SVGFEBlendElement::build):
* svg/SVGFEColorMatrixElement.cpp:
(WebCore::SVGFEColorMatrixElement::build):
* svg/SVGFEComponentTransferElement.cpp:
(WebCore::SVGFEComponentTransferElement::build):
* svg/SVGFECompositeElement.cpp:
(WebCore::SVGFECompositeElement::build):
* svg/SVGFEDiffuseLightingElement.cpp:
(WebCore::SVGFEDiffuseLightingElement::build):
* svg/SVGFEDisplacementMapElement.cpp:
(WebCore::SVGFEDisplacementMapElement::build):
* svg/SVGFEDropShadowElement.cpp:
(WebCore::SVGFEDropShadowElement::build):
* svg/SVGFEGaussianBlurElement.cpp:
(WebCore::SVGFEGaussianBlurElement::build):
* svg/SVGFEMergeElement.cpp:
(WebCore::SVGFEMergeElement::build):
* svg/SVGFEMorphologyElement.cpp:
(WebCore::SVGFEMorphologyElement::build):
* svg/SVGFEOffsetElement.cpp:
(WebCore::SVGFEOffsetElement::build):
* svg/SVGFESpecularLightingElement.cpp:
(WebCore::SVGFESpecularLightingElement::build):
* svg/SVGFETileElement.cpp:
(WebCore::SVGFETileElement::build):
* testing/GCObservation.h:
* xml/XSLTProcessor.cpp:
(WebCore::XSLTProcessor::createDocumentFromSource):
* xml/parser/XMLDocumentParser.cpp:
(WebCore::XMLDocumentParser::parseDocumentFragment):

Source/WebKit:

* PluginProcess/WebProcessConnection.cpp:
(WebKit::WebProcessConnection::create):
* PluginProcess/WebProcessConnection.h:
* UIProcess/API/Cocoa/WKConnection.mm:
(-[WKConnection sendMessageWithName:body:]):
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView takeSnapshotWithConfiguration:completionHandler:]):
(-[WKWebView _takeViewSnapshot]):
(-[WKWebView _snapshotRect:intoImageOfWidth:completionHandler:]):
* UIProcess/API/glib/WebKitGeolocationProvider.cpp:
(WebKit::WebKitGeolocationProvider::notifyPositionChanged):
* UIProcess/API/glib/WebKitWebContext.cpp:
(webkit_web_context_allow_tls_certificate_for_host):
* UIProcess/Automation/cairo/WebAutomationSessionCairo.cpp:
(WebKit::WebAutomationSession::platformGetBase64EncodedPNGData):
* UIProcess/Automation/cocoa/WebAutomationSessionCocoa.mm:
(WebKit::WebAutomationSession::platformGetBase64EncodedPNGData):
* UIProcess/BackingStore.cpp:
(WebKit::BackingStore::incorporateUpdate):
* UIProcess/Cocoa/NavigationState.mm:
(WebKit::createErrorWithRecoveryAttempter):
* UIProcess/Cocoa/PlaybackSessionManagerProxy.h:
* UIProcess/Cocoa/PlaybackSessionManagerProxy.mm:
(WebKit::PlaybackSessionManagerProxy::create):
* UIProcess/Cocoa/VideoFullscreenManagerProxy.h:
* UIProcess/Cocoa/VideoFullscreenManagerProxy.mm:
(WebKit::VideoFullscreenManagerProxy::create):
* UIProcess/Cocoa/WebPasteboardProxyCocoa.mm:
(WebKit::WebPasteboardProxy::setPasteboardBufferForType):
* UIProcess/Cocoa/WebViewImpl.mm:
(WebKit::WebViewImpl::takeViewSnapshot):
* UIProcess/Downloads/DownloadProxyMap.cpp:
(WebKit::DownloadProxyMap::createDownloadProxy):
* UIProcess/Notifications/WebNotificationManagerProxy.cpp:
(WebKit::WebNotificationManagerProxy::show):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::didCreateSubframe):
* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::getStatistics):
(WebKit::WebProcessPool::requestWebContentStatistics):
(WebKit::WebProcessPool::requestNetworkingStatistics):
* UIProcess/WebProcessPool.h:
* UIProcess/gstreamer/WebPageProxyGStreamer.cpp:
(WebKit::WebPageProxy::requestInstallMissingMediaPlugins):
* UIProcess/gtk/RemoteWebInspectorProxyGtk.cpp:
(WebKit::RemoteWebInspectorProxy::platformCreateFrontendPageAndWindow):
* UIProcess/gtk/WebInspectorProxyGtk.cpp:
(WebKit::WebInspectorProxy::platformCreateFrontendPage):
* UIProcess/ios/WKGeolocationProviderIOS.mm:
(-[WKGeolocationProviderIOS geolocationAuthorizationGranted]):
* UIProcess/mac/PageClientImplMac.mm:
(WebKit::PageClientImpl::setPromisedDataForImage):
* UIProcess/win/WebInspectorProxyWin.cpp:
(WebKit::WebInspectorProxy::platformCreateFrontendPage):
* WebProcess/InjectedBundle/API/mac/WKDOMRange.mm:
(-[WKDOMRange initWithDocument:]):
* WebProcess/InjectedBundle/DOM/InjectedBundleRangeHandle.cpp:
(WebKit::InjectedBundleRangeHandle::renderedImage):
* WebProcess/InjectedBundle/InjectedBundlePageEditorClient.cpp:
(WebKit::InjectedBundlePageEditorClient::getPasteboardDataForRange):
* WebProcess/InjectedBundle/InjectedBundlePageUIClient.cpp:
(WebKit::InjectedBundlePageUIClient::mouseDidMoveOverElement):
* WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
(WebKit::NetscapePlugin::snapshot):
* WebProcess/Plugins/PDF/PDFPlugin.mm:
(WebKit::PDFPlugin::addArchiveResource):
(WebKit::PDFPlugin::snapshot):
(WebKit::PDFPlugin::writeItemsToPasteboard):
* WebProcess/Plugins/PluginProcessConnectionManager.cpp:
(WebKit::PluginProcessConnectionManager::getPluginProcessConnection):
* WebProcess/Plugins/PluginProxy.cpp:
(WebKit::PluginProxy::snapshot):
* WebProcess/Plugins/PluginView.cpp:
(WebKit::PluginView::performURLRequest):
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::exceededDatabaseQuota):
(WebKit::WebChromeClient::reachedApplicationCacheOriginQuota):
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNewWindowAction):
* WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
(WebKit::WebPlatformStrategies::getPathnamesForType):
* WebProcess/WebCoreSupport/gtk/WebDragClientGtk.cpp:
(WebKit::convertCairoSurfaceToShareableBitmap):
* WebProcess/WebCoreSupport/mac/WebDragClientMac.mm:
(WebKit::WebDragClient::declareAndWriteDragImage):
* WebProcess/WebPage/Cocoa/WebPageCocoa.mm:
(WebKit::WebPage::dictionaryPopupInfoForRange):
* WebProcess/WebPage/DrawingAreaImpl.cpp:
(WebKit::DrawingAreaImpl::display):
* WebProcess/WebPage/FindController.cpp:
(WebKit::FindController::updateFindIndicator):
* WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeDrawingArea.mm:
(WebKit::RemoteLayerTreeDrawingArea::flushLayers):
* WebProcess/WebPage/WebFrame.cpp:
(WebKit::WebFrame::webArchiveData):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::navigateToPDFLinkWithSimulatedClick):
(WebKit::WebPage::performDragControllerAction):
* WebProcess/WebPage/ios/FindControllerIOS.mm:
(WebKit::FindController::updateFindIndicator):
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::replaceDictatedText):
(WebKit::WebPage::getPositionInformation):
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
(WebKit::TiledCoreAnimationDrawingArea::commitTransientZoom):
* WebProcess/WebStorage/StorageNamespaceImpl.cpp:
(WebKit::StorageNamespaceImpl::createSessionStorageNamespace):
(WebKit::StorageNamespaceImpl::createEphemeralLocalStorageNamespace):
(WebKit::StorageNamespaceImpl::createLocalStorageNamespace):
(WebKit::StorageNamespaceImpl::createTransientLocalStorageNamespace):
(WebKit::StorageNamespaceImpl::storageArea):
(WebKit::StorageNamespaceImpl::ephemeralLocalStorageArea):
(WebKit::StorageNamespaceImpl::copy):
* WebProcess/WebStorage/StorageNamespaceImpl.h:
* WebProcess/WebStorage/WebStorageNamespaceProvider.cpp:
(WebKit::WebStorageNamespaceProvider::getOrCreate):
(WebKit::WebStorageNamespaceProvider::createSessionStorageNamespace):
(WebKit::WebStorageNamespaceProvider::createEphemeralLocalStorageNamespace):
(WebKit::WebStorageNamespaceProvider::createLocalStorageNamespace):
(WebKit::WebStorageNamespaceProvider::createTransientLocalStorageNamespace):
* WebProcess/WebStorage/WebStorageNamespaceProvider.h:
* WebProcess/cocoa/PlaybackSessionManager.mm:
(WebKit::PlaybackSessionManager::createModelAndInterface):
* WebProcess/cocoa/VideoFullscreenManager.mm:
(WebKit::VideoFullscreenManager::createModelAndInterface):

Source/WebKitLegacy:

* Storage/StorageNamespaceImpl.cpp:
(WebKit::StorageNamespaceImpl::copy):
(WebKit::StorageNamespaceImpl::storageArea):
* Storage/StorageNamespaceImpl.h:
* Storage/WebStorageNamespaceProvider.cpp:
(WebKit::WebStorageNamespaceProvider::create):
(WebKit::WebStorageNamespaceProvider::createSessionStorageNamespace):
(WebKit::WebStorageNamespaceProvider::createEphemeralLocalStorageNamespace):
(WebKit::WebStorageNamespaceProvider::createLocalStorageNamespace):
(WebKit::WebStorageNamespaceProvider::createTransientLocalStorageNamespace):
* Storage/WebStorageNamespaceProvider.h:
* WebCoreSupport/WebViewGroup.cpp:
(WebViewGroup::getOrCreate):
* WebCoreSupport/WebViewGroup.h:

Source/WebKitLegacy/ios:

* WebCoreSupport/SearchPopupMenuIOS.cpp:
(SearchPopupMenuIOS::SearchPopupMenuIOS):
(SearchPopupMenuIOS::popupMenu):
* WebCoreSupport/SearchPopupMenuIOS.h:
* WebCoreSupport/WebVisiblePosition.mm:
(-[WebVisiblePosition enclosingRangeWithDictationPhraseAlternatives:]):
(-[WebVisiblePosition enclosingRangeWithCorrectionIndicator]):
* WebView/WebPDFViewPlaceholder.mm:
(-[WebPDFViewPlaceholder simulateClickOnLinkToURL:]):

Source/WebKitLegacy/mac:

* DOM/DOM.mm:
(-[DOMNode getPreviewSnapshotImage:andRects:]):
* Plugins/Hosted/NetscapePluginHostManager.mm:
(WebKit::NetscapePluginHostManager::instantiatePlugin):
* Plugins/Hosted/NetscapePluginInstanceProxy.mm:
(WebKit::NetscapePluginInstanceProxy::evaluateJavaScript):
(WebKit::NetscapePluginInstanceProxy::loadRequest):
* Plugins/WebNetscapePluginView.mm:
(-[WebNetscapePluginView evaluateJavaScriptPluginRequest:]):
(-[WebNetscapePluginView loadRequest:inTarget:withNotifyData:sendNotification:]):
* WebCoreSupport/WebContextMenuClient.mm:
(WebContextMenuClient::imageForCurrentSharingServicePickerItem):
* WebCoreSupport/WebFrameLoaderClient.mm:
(WebFrameLoaderClient::transitionToCommittedForNewPage):
* WebView/WebFrame.mm:
(-[WebFrame getDictationResultRanges:andMetadatas:]):
* WebView/WebHTMLView.mm:
(-[WebHTMLView _writeSelectionWithPasteboardTypes:toPasteboard:cachedAttributedString:]):
* WebView/WebView.mm:
(+[WebView _addUserScriptToGroup:world:source:url:whitelist:blacklist:injectionTime:injectedFrames:]):
(+[WebView _addUserStyleSheetToGroup:world:source:url:whitelist:blacklist:injectedFrames:]):

Source/WebKitLegacy/win:

* Plugins/PluginDatabase.cpp:
(WebCore::PluginDatabase::refresh):
* Plugins/PluginView.cpp:
(WebCore::PluginView::mediaCanStart):
(WebCore::PluginView::performRequest):
(WebCore::PluginView::bindingInstance):
* Plugins/PluginView.h:
* WebCoreSupport/WebFrameLoaderClient.cpp:
(WebFrameLoaderClient::dispatchDidFailToStartPlugin const):
(WebFrameLoaderClient::createPlugin):
(WebFrameLoaderClient::createJavaAppletWidget):
* WebCoreSupport/WebFrameLoaderClient.h:
* WebFrame.cpp:
(WebFrame::loadData):
(WebFrame::loadPlainTextString):
(WebFrame::loadHTMLString):
* WebFrame.h:
* WebKitQuartzCoreAdditions/CAView.cpp:
(WKQCA::CAView::create):
* WebKitQuartzCoreAdditions/CAView.h:
* WebKitQuartzCoreAdditions/CVDisplayLink.cpp:
(WKQCA::CVDisplayLink::create):
* WebKitQuartzCoreAdditions/CVDisplayLink.h:
* WebKitQuartzCoreAdditions/ImageConversion.cpp:
(WKQCA::getImageCopy):
* WebView.cpp:
(WebView::addUserScriptToGroup):
(WebView::addUserStyleSheetToGroup):

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

9 months agonavigator.userAgent in service workers does not reflect customUserAgent set by client
cdumez@apple.com [Sat, 22 Dec 2018 03:23:08 +0000 (03:23 +0000)]
navigator.userAgent in service workers does not reflect customUserAgent set by client
https://bugs.webkit.org/show_bug.cgi?id=192951

Reviewed by Youenn Fablet.

Source/WebCore:

Whenever a service worker client registers itself, also pass its effective user agent.
In the network process, for each origin, we store the latest client's user agent and
use it when starting the service worker.

* dom/Document.cpp:
(WebCore::Document::setServiceWorkerConnection):
* loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::registerTemporaryServiceWorkerClient):
* workers/service/SWClientConnection.h:
* workers/service/server/SWServer.cpp:
(WebCore::SWServer::serviceWorkerClientUserAgent const):
(WebCore::SWServer::installContextData):
(WebCore::SWServer::runServiceWorker):
(WebCore::SWServer::registerServiceWorkerClient):
* workers/service/server/SWServer.h:
* workers/service/server/SWServerToContextConnection.h:
* workers/service/server/SWServerWorker.cpp:
(WebCore::SWServerWorker::userAgent const):
* workers/service/server/SWServerWorker.h:

Source/WebKit:

* NetworkProcess/ServiceWorker/WebSWServerConnection.cpp:
(WebKit::WebSWServerConnection::registerServiceWorkerClient):
* NetworkProcess/ServiceWorker/WebSWServerConnection.h:
* NetworkProcess/ServiceWorker/WebSWServerConnection.messages.in:
* NetworkProcess/ServiceWorker/WebSWServerToContextConnection.cpp:
(WebKit::WebSWServerToContextConnection::installServiceWorkerContext):
* NetworkProcess/ServiceWorker/WebSWServerToContextConnection.h:
* WebProcess/Storage/WebSWClientConnection.cpp:
(WebKit::WebSWClientConnection::registerServiceWorkerClient):
* WebProcess/Storage/WebSWClientConnection.h:
* WebProcess/Storage/WebSWContextManagerConnection.cpp:
(WebKit::WebSWContextManagerConnection::installServiceWorker):
* WebProcess/Storage/WebSWContextManagerConnection.h:
* WebProcess/Storage/WebSWContextManagerConnection.messages.in:

Tools:

Extend API test coverage.

* TestWebKitAPI/Tests/WebKitCocoa/ServiceWorkerBasic.mm:
(-[SWCustomUserAgentDelegate initWithUserAgent:]):
(-[SWCustomUserAgentDelegate _webView:decidePolicyForNavigationAction:userInfo:decisionHandler:]):
(-[SWUserAgentMessageHandler initWithExpectedMessage:]):
(-[SWUserAgentMessageHandler userContentController:didReceiveScriptMessage:]):

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

9 months agoResync BoringSSL to M72
commit-queue@webkit.org [Sat, 22 Dec 2018 02:19:01 +0000 (02:19 +0000)]
Resync BoringSSL to M72
https://bugs.webkit.org/show_bug.cgi?id=192860

Patch by Youenn Fablet  <youenn@apple.com> and Alejandro G. Castro <alex@igalia.com> on 2018-12-21
Reviewed by Eric Carlson.

* Source/third_party/boringssl: Resynced to Chrome M72 branch.

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

9 months agoRTCRtpSender.setParameters() does set active parameter
youenn@apple.com [Sat, 22 Dec 2018 02:14:31 +0000 (02:14 +0000)]
RTCRtpSender.setParameters() does set active parameter
https://bugs.webkit.org/show_bug.cgi?id=192848

Reviewed by Eric Carlson.

Source/WebCore:

Covered by updated test.

* Modules/mediastream/libwebrtc/LibWebRTCUtils.cpp:
(WebCore::updateRTCRtpSendParameters):
The routine was updating the local value, not the out parameter.

LayoutTests:

* webrtc/video.html:
Add a check for active value.
Test video freezing through canvas instead of stats.

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

9 months ago'ended' Event doesn't fire on MediaStreamTrack when a USB camera is unplugged
eric.carlson@apple.com [Sat, 22 Dec 2018 01:37:00 +0000 (01:37 +0000)]
'ended' Event doesn't fire on MediaStreamTrack when a USB camera is unplugged
https://bugs.webkit.org/show_bug.cgi?id=187896
<rdar://problem/42681445>

Reviewed by Jer Noble.

Source/WebCore:

No new tests, tested manually.

* platform/mediastream/mac/AVVideoCaptureSource.h:
* platform/mediastream/mac/AVVideoCaptureSource.mm:
(WebCore::AVVideoCaptureSource::deviceDisconnected):
(-[WebCoreAVVideoCaptureSourceObserver addNotificationObservers]):
(-[WebCoreAVVideoCaptureSourceObserver removeNotificationObservers]):
(-[WebCoreAVVideoCaptureSourceObserver deviceConnectedDidChange:]):
* platform/mediastream/mac/CoreAudioCaptureDeviceManager.cpp:
(WebCore::deviceHasInputStreams):
(WebCore::isValidCaptureDevice):
(WebCore::CoreAudioCaptureDeviceManager::coreAudioCaptureDevices):
(WebCore::CoreAudioCaptureDeviceManager::refreshAudioCaptureDevices):
(WebCore::CoreAudioCaptureDeviceManager::devicesChanged): Deleted.
* platform/mediastream/mac/CoreAudioCaptureDeviceManager.h:
* platform/mediastream/mac/CoreAudioCaptureSource.cpp:
(WebCore::CoreAudioSharedUnit::setCaptureDevice):
(WebCore::CoreAudioSharedUnit::devicesChanged):
(WebCore::CoreAudioSharedUnit::startProducingData):
(WebCore::CoreAudioSharedUnit::startInternal):
(WebCore::CoreAudioSharedUnit::verifyIsCapturing):
(WebCore::CoreAudioSharedUnit::captureFailed):
(WebCore::CoreAudioCaptureSourceFactory::devicesChanged):
(WebCore::CoreAudioCaptureSource::CoreAudioCaptureSource):
(WebCore::CoreAudioSharedUnit::setCaptureDeviceID): Deleted.
* platform/mediastream/mac/CoreAudioCaptureSource.h:

Source/WebCore/PAL:

* pal/spi/cf/CoreAudioSPI.h:

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

9 months agoWeb Inspector: Styles Redesign: remove unused CSS style icons
drousso@apple.com [Sat, 22 Dec 2018 00:39:04 +0000 (00:39 +0000)]
Web Inspector: Styles Redesign: remove unused CSS style icons
https://bugs.webkit.org/show_bug.cgi?id=192999
<rdar://problem/46912094>

Reviewed by Matt Baker.

* UserInterface/Main.html:
* UserInterface/Views/StyleRuleIcons.css: Removed.
* UserInterface/Images/StyleRule.svg: Removed.
* UserInterface/Images/StyleRuleInheritedElement.svg: Removed.
* UserInterface/Images/StyleRulePseudoElement.svg: Removed.

* WebInspectorUI.vcxproj/WebInspectorUI.vcxproj:
* WebInspectorUI.vcxproj/WebInspectorUI.vcxproj.filters:

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

9 months agoREGRESSION(r239353): iOS WK1 Assertion failure in notifyChildNodeRemoved while running
rniwa@webkit.org [Sat, 22 Dec 2018 00:28:44 +0000 (00:28 +0000)]
REGRESSION(r239353): iOS WK1 Assertion failure in notifyChildNodeRemoved while running
TestWebKitAPI.QuickLook.LegacyQuickLookContent
https://bugs.webkit.org/show_bug.cgi?id=192859
<rdar://problem/46887237>

Reviewed by Antti Koivisto.

After r239353, ScriptDisallowedScope::InMainThread::isScriptAllowed() may return false when the web thread
is inside a delegate callback even when there is a ScriptDisallowedScope defined.

Replace the existign debug assertions which assert !ScriptDisallowedScope::InMainThread::isScriptAllowed()
by a newly added ScriptDisallowedScope::InMainThread::hasDisallowedScope to avoid hitting this assertion.

Tests: TestWebKitAPI.QuickLook.LegacyQuickLookContent

* dom/ContainerNodeAlgorithms.cpp:
(WebCore::notifyChildNodeInserted):
(WebCore::notifyChildNodeRemoved):
* dom/Document.cpp:
(WebCore::Document::nodeChildrenWillBeRemoved):
(WebCore::Document::nodeWillBeRemoved):
* dom/ScriptDisallowedScope.h:
(WebCore::ScriptDisallowedScope::InMainThread::hasDisallowedScope):
* html/HTMLFormElement.cpp:
(WebCore:: const):

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

9 months agoUpdate status of some WebCore features in features.json
commit-queue@webkit.org [Sat, 22 Dec 2018 00:26:28 +0000 (00:26 +0000)]
Update status of some WebCore features in features.json
https://bugs.webkit.org/show_bug.cgi?id=192998

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2018-12-21
Reviewed by Tim Horton.

* features.json:
- Variation Fonts: Supported
- Conic Gradients: Supported in Preview
- Web Share: Supported in Preview
- <datalist>: Supported in Preview
- Intersection Observers: Supported in Preview

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

9 months agoWeb Inspector: Styles: editing focus lost when inspector is blurred
nvasilyev@apple.com [Sat, 22 Dec 2018 00:16:20 +0000 (00:16 +0000)]
Web Inspector: Styles: editing focus lost when inspector is blurred
https://bugs.webkit.org/show_bug.cgi?id=192123
<rdar://problem/46800966>

Reviewed by Devin Rousso.

* UserInterface/Views/SpreadsheetSelectorField.js:
(WI.SpreadsheetSelectorField.prototype._handleBlur):
* UserInterface/Views/SpreadsheetTextField.js:
(WI.SpreadsheetTextField.prototype._handleBlur):

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

9 months ago[iOS] Using file upload can trigger a crash under RenderThemeIOS::paintFileUploadIcon...
zalan@apple.com [Sat, 22 Dec 2018 00:02:19 +0000 (00:02 +0000)]
[iOS] Using file upload can trigger a crash under RenderThemeIOS::paintFileUploadIconDecorations()
https://bugs.webkit.org/show_bug.cgi?id=192357
<rdar://problem/42852260>

Reviewed by Simon Fraser.

Do not try to paint the file picker when painting is disabled.

* rendering/RenderFileUploadControl.cpp:
(WebCore::RenderFileUploadControl::paintObject):

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

9 months agoWeb Inspector: Crashes seen under Inspector::ScriptCallFrame::~ScriptCallFrame
joepeck@webkit.org [Fri, 21 Dec 2018 23:49:26 +0000 (23:49 +0000)]
Web Inspector: Crashes seen under Inspector::ScriptCallFrame::~ScriptCallFrame
https://bugs.webkit.org/show_bug.cgi?id=180373
<rdar://problem/33894170>

Rubber-stamped by Devin Rousso.

* inspector/AsyncStackTrace.cpp:
(Inspector::AsyncStackTrace::truncate):
The `lastUnlockedAncestor->remove()` may release the only reference to it's
parent which we intend to use later but don't hold a RefPtr to. Keep the
parent alive explicitly by protecting it.

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

9 months agoExpand use of sourceApplicationAuditData
achristensen@apple.com [Fri, 21 Dec 2018 23:40:30 +0000 (23:40 +0000)]
Expand use of sourceApplicationAuditData
https://bugs.webkit.org/show_bug.cgi?id=192995
<rdar://problem/46627875>

Reviewed by Brady Eidson.

Source/WebKit:

sourceApplicationAuditData has been used for a long time on iOS, but it's needed on more platforms.
I also made it return an Optional instead of a bool and returning by reference. Ahhh. So much nicer.

* NetworkProcess/cocoa/NetworkProcessCocoa.mm:
(WebKit::NetworkProcess::sourceApplicationAuditData const):
* Platform/IPC/Connection.h:
* Platform/IPC/mac/ConnectionMac.mm:
(IPC::Connection::getAuditToken):
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::initializeWebProcess):
* WebProcess/cocoa/WebProcessCocoa.mm:
(WebKit::WebProcess::sourceApplicationAuditData const):

Source/WTF:

* wtf/Platform.h:

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

9 months ago[WebAuthN] userPresence should always be true
jiewen_tan@apple.com [Fri, 21 Dec 2018 23:27:27 +0000 (23:27 +0000)]
[WebAuthN] userPresence should always be true
https://bugs.webkit.org/show_bug.cgi?id=192835
<rdar://problem/46538788>

Reviewed by Brent Fulgham.

Source/WebCore:

In the current spec as of 7 August 2018, userPresence is suggested to set to the inverse of userVerification.
This doesn't comply with the CTAP spec. Details in: https://github.com/w3c/webauthn/issues/1123.
After discussing with other members of the working group, we decided to make userPresence always default to true.

Covered by exisiting tests.

* Modules/webauthn/fido/DeviceRequestConverter.cpp:
(fido::encodeGetAssertionRequestAsCBOR):

Tools:

* TestWebKitAPI/Tests/WebCore/CtapRequestTest.cpp:
(TestWebKitAPI::TEST):

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

9 months agoAdd support to run-benchmark to use non-default copies of the browser apps
simon.fraser@apple.com [Fri, 21 Dec 2018 23:26:05 +0000 (23:26 +0000)]
Add support to run-benchmark to use non-default copies of the browser apps
https://bugs.webkit.org/show_bug.cgi?id=192905
rdar://problem/46845840

Reviewed by Dewei Zhu.

Add support for a --browser-path argument to run-benchmark, which allows you to use
a custom app bundle for a given browser (only implemented for Safari at present).

* Scripts/webkitpy/benchmark_runner/benchmark_runner.py:
(BenchmarkRunner.__init__):
* Scripts/webkitpy/benchmark_runner/browser_driver/browser_driver.py:
(BrowserDriver.__init__):
* Scripts/webkitpy/benchmark_runner/browser_driver/browser_driver_factory.py:
(BrowserDriverFactory.create):
* Scripts/webkitpy/benchmark_runner/browser_driver/osx_browser_driver.py:
(OSXBrowserDriver._launch_process):
(OSXBrowserDriver._launch_process_with_caffeinate): Fix spelling.
(OSXBrowserDriver._launch_process_with_caffinate): Deleted.
* Scripts/webkitpy/benchmark_runner/browser_driver/osx_chrome_driver.py:
(OSXChromeCanaryDriver.launch_url):
* Scripts/webkitpy/benchmark_runner/browser_driver/osx_firefox_driver.py:
(OSXFirefoxNightlyDriver.launch_url):
* Scripts/webkitpy/benchmark_runner/browser_driver/osx_safari_driver.py:
(OSXSafariDriver.__init__):
(OSXSafariDriver.launch_url):
* Scripts/webkitpy/benchmark_runner/run_benchmark.py:
(parse_args):
(run_benchmark_plan):
* Scripts/webkitpy/benchmark_runner/webserver_benchmark_runner.py:
(WebServerBenchmarkRunner.__init__):
* Scripts/webkitpy/browserperfdash/browserperfdash_unittest.py:
(FakeBenchmarkRunner.__init__):

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

9 months agoWeb Inspector: Settings: experimental setting editors are misaligned in other locales
drousso@apple.com [Fri, 21 Dec 2018 23:10:11 +0000 (23:10 +0000)]
Web Inspector: Settings: experimental setting editors are misaligned in other locales
https://bugs.webkit.org/show_bug.cgi?id=192971
<rdar://problem/46718451>

Reviewed by Joseph Pecoraro.

* UserInterface/Views/SettingsTabContentView.css:
(.content-view.settings > .settings-view > .container):
(.content-view.settings > .settings-view > .container > .title):

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

9 months ago[WebAuthN] Import an APDU coder from Chromium
jiewen_tan@apple.com [Fri, 21 Dec 2018 23:06:54 +0000 (23:06 +0000)]
[WebAuthN] Import an APDU coder from Chromium
https://bugs.webkit.org/show_bug.cgi?id=192949
<rdar://problem/46879933>

Reviewed by Brent Fulgham.

Source/WebCore:

This patch imports an APDU coder from Chromium. Here is the documentation:
https://fidoalliance.org/specs/fido-u2f-v1.2-ps-20170411/fido-u2f-raw-message-formats-v1.2-ps-20170411.html#u2f-message-framing
APDU is a binary format to frame any U2F requests/responses into binaries. It is equivalent to CBOR in CTAP2.

Here is a list of files that are imported from Chromium:
https://cs.chromium.org/chromium/src/components/apdu/apdu_command.cc?rcl=a2f290c10d132f53518e7f99d5635ee814ff8090
https://cs.chromium.org/chromium/src/components/apdu/apdu_command.h?rcl=867b103481f6f4ccc79a69bba16c11eefac3cdb6
https://cs.chromium.org/chromium/src/components/apdu/apdu_response.cc?rcl=867b103481f6f4ccc79a69bba16c11eefac3cdb6
https://cs.chromium.org/chromium/src/components/apdu/apdu_response.h?rcl=867b103481f6f4ccc79a69bba16c11eefac3cdb6
https://cs.chromium.org/chromium/src/components/apdu/apdu_unittest.cc?rcl=867b103481f6f4ccc79a69bba16c11eefac3cdb6

Covered by API tests.

* Modules/webauthn/apdu/ApduCommand.cpp: Added.
(apdu::ApduCommand::createFromMessage):
(apdu::ApduCommand::ApduCommand):
(apdu::ApduCommand::getEncodedCommand const):
* Modules/webauthn/apdu/ApduCommand.h: Added.
* Modules/webauthn/apdu/ApduResponse.cpp: Added.
(apdu::ApduResponse::createFromMessage):
(apdu::ApduResponse::ApduResponse):
(apdu::ApduResponse::getEncodedResponse const):
* Modules/webauthn/apdu/ApduResponse.h: Added.
* Sources.txt:
* WebCore.xcodeproj/project.pbxproj:

Tools:

* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebCore/ApduTest.cpp: Added.
(TestWebKitAPI::TEST):

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

9 months agoConvert raw CDMSessionMediaSourceAVFObjC pointer in MediaPlayerPrivateMediaSourceAVFObjC
jer.noble@apple.com [Fri, 21 Dec 2018 23:00:24 +0000 (23:00 +0000)]
Convert raw CDMSessionMediaSourceAVFObjC pointer in MediaPlayerPrivateMediaSourceAVFObjC
https://bugs.webkit.org/show_bug.cgi?id=192985
<rdar://problem/46750743>

Reviewed by Eric Carlson.

Make m_session a RefPtr; drive-by fix: make m_mediaElement in WebKitMediaKeys a WeakPtr.

* Modules/encryptedmedia/legacy/WebKitMediaKeys.cpp:
(WebCore::WebKitMediaKeys::setMediaElement):
* Modules/encryptedmedia/legacy/WebKitMediaKeys.h:
* platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.h:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::MediaPlayerPrivateMediaSourceAVFObjC):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::setCDMSession):

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

9 months ago[Mac] Layout Test http/wpt/webauthn/public-key-credential-create-success-hid.https...
jiewen_tan@apple.com [Fri, 21 Dec 2018 22:39:32 +0000 (22:39 +0000)]
[Mac] Layout Test http/wpt/webauthn/public-key-credential-create-success-hid.https.html and http/wpt/webauthn/public-key-credential-get-success-hid.https.html are flaky
https://bugs.webkit.org/show_bug.cgi?id=192061

Reviewed by Dewei Zhu.

Part 5.

Add some additional temporary logging info to determine if the time out value passed to the timer is respected.
Once the bug is determined and fixed, we should remove all logging added in this patch.

Reviewed by Dewei Zhu.

* UIProcess/WebAuthentication/AuthenticatorManager.cpp:
(WebKit::AuthenticatorManager::initTimeOutTimer):
(WebKit::AuthenticatorManager::timeOutTimerFired):

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

9 months agoWeb Inspector: update scroll position when revealing a virtualized WI.DataGridNode
drousso@apple.com [Fri, 21 Dec 2018 22:27:50 +0000 (22:27 +0000)]
Web Inspector: update scroll position when revealing a virtualized WI.DataGridNode
https://bugs.webkit.org/show_bug.cgi?id=192992
<rdar://problem/46886427>

Reviewed by Joseph Pecoraro.

When `reveal`ing a `WI.DataGridNode`, if it is not currently in the DOM tree (e.g. it's been
virtualized by it's owner `WI.DataGrid`), we need to scroll to it's position so that it gets
added to the DOM tree before it can be revealed/selected.

* UserInterface/Views/DataGrid.js:
(WI.DataGrid.prototype.layout):
(WI.DataGrid.prototype.updateVisibleRows):
(WI.DataGrid.prototype._updateVisibleRows): Deleted.

* UserInterface/Views/DataGridNode.js:
(WI.DataGridNode.prototype.reveal):

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

9 months agoCSS variables don't work for colors in "border" property
justin_michaud@apple.com [Fri, 21 Dec 2018 21:33:03 +0000 (21:33 +0000)]
CSS variables don't work for colors in "border" property
https://bugs.webkit.org/show_bug.cgi?id=192922

Reviewed by Simon Fraser.

Source/WebCore:

ParseColorFunction no longer consumes anything if the color was not valid.

Test: css-custom-properties-api/border-variable-parsing.html

* css/parser/CSSPropertyParserHelpers.cpp:
(WebCore::CSSPropertyParserHelpers::parseColorFunction):

LayoutTests:

* css-custom-properties-api/border-variable-parsing-expected.html: Added.
* css-custom-properties-api/border-variable-parsing.html: Added.

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

9 months ago[WebGPU] GPUBindGroupLayout refactoring: no HashMap, and failure logging
justin_fan@apple.com [Fri, 21 Dec 2018 20:46:03 +0000 (20:46 +0000)]
[WebGPU] GPUBindGroupLayout refactoring: no HashMap, and failure logging
https://bugs.webkit.org/show_bug.cgi?id=192990

Reviewed by Myles C. Maxfield.

Refactor away the unnecessary HashMaps when creating MTLArgumentEncoders in GPUBindGroupLayout creation.
Also update GPUBindGroupLayout::create -> tryCreate, in order to better handle Objective-C exceptions.

No new tests; no change in behavior.

* Modules/webgpu/WebGPUBindGroupLayout.cpp:
(WebCore::WebGPUBindGroupLayout::create):
(WebCore::WebGPUBindGroupLayout::WebGPUBindGroupLayout):
* Modules/webgpu/WebGPUBindGroupLayout.h:
(WebCore::WebGPUBindGroupLayout::bindGroupLayout const):
* Modules/webgpu/WebGPUDevice.cpp:
(WebCore::WebGPUDevice::createBindGroupLayout const):
* platform/graphics/gpu/GPUBindGroupLayout.h:
* platform/graphics/gpu/GPUDevice.cpp:
(WebCore::GPUDevice::tryCreateBindGroupLayout const): Renamed from ::create*. Now returning a RefPtr.
(WebCore::GPUDevice::createBindGroupLayout const): Deleted.
* platform/graphics/gpu/GPUDevice.h:
* platform/graphics/gpu/cocoa/GPUBindGroupLayoutMetal.mm:
(WebCore::appendArgumentToArray):
(WebCore::newEncoder):
(WebCore::GPUBindGroupLayout::tryCreate): Renamed from ::create. Now returning a RefPtr.
(WebCore::GPUBindGroupLayout::GPUBindGroupLayout):
(WebCore::appendArgumentToArrayInMap): Deleted.
(WebCore::GPUBindGroupLayout::create): Deleted.

Deleted unneeded GPUBindGroupLayout.cpp:
* Sources.txt:
* WebCore.xcodeproj/project.pbxproj:
* platform/graphics/gpu/GPUBindGroupLayout.cpp: Removed.

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

9 months agoCrash in com.apple.WebKit: WebKit::WebResourceLoader::willSendRequest + 223
krollin@apple.com [Fri, 21 Dec 2018 20:25:23 +0000 (20:25 +0000)]
Crash in com.apple.WebKit: WebKit::WebResourceLoader::willSendRequest + 223
https://bugs.webkit.org/show_bug.cgi?id=192989

Reviewed by Chris Dumez.

willSendRequest is calling maybeLoadFallbackForRedirect, which can
delete “this”. After that, some new logging code tries to access
“this” and causes the crash. Fix this by adjusting the scope of a
"protectedThis".

* WebProcess/Network/WebResourceLoader.cpp:
(WebKit::WebResourceLoader::willSendRequest):

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

9 months ago[GTK][WPE] Add DeviceIdHashSaltStorage disk persistence
commit-queue@webkit.org [Fri, 21 Dec 2018 20:00:41 +0000 (20:00 +0000)]
[GTK][WPE] Add DeviceIdHashSaltStorage disk persistence
https://bugs.webkit.org/show_bug.cgi?id=190466

Patch by Alejandro G. Castro <alex@igalia.com> on 2018-12-21
Reviewed by Youenn Fablet.

Source/WebCore:

Added persistency to the DeviceIdHashSaltStorage.

* platform/glib/FileSystemGlib.cpp:
(WebCore::FileSystem::getFileSize): Implemented this function to
allow sharing code with the statistics storage class.
* platform/glib/KeyedDecoderGlib.cpp:
(WebCore::KeyedDecoderGlib::dictionaryFromGVariant): Added a
condition to control situations where the key is empty, it can
happen if the user modifies the file in the disk.
* Modules/indexeddb/shared/IDBResourceIdentifier.cpp: Add include
to make work compilation with debug, unified builds.

Source/WebKit:

Added persistency to the DeviceIdHashSaltStorage. Implemented a
decoder and an encoder for the HashSaltForOrigin struct to store
it in a file, this allows us to save the lastTimeUsed, the origin
and the hash salt. It uses a new directory where it creates a file
per hash salt, the name of the file is the hash salt to avoid
leaking information in the system. The last time used and the
origin are stored inside the file, it also adds a version
directory used to change the structure of the file in the future,
if we need to do it. In the DeviceIdHashSaltStorage class the disk
operations happen in a WorkQueue, but all interactions go in the
main thread. We added code to handle the operations when the load
still did not finish.

* Platform/Logging.h:
Added channel DiskPersistency..
* Sources.txt: Added new files.
* UIProcess/API/APIProcessPoolConfiguration.cpp: Added code to set
the directory for the deviceIdHashSalts. That way we can use the
configuration when creating the DeviceIdHashSaltStorage.
(API::ProcessPoolConfiguration::createWithWebsiteDataStoreConfiguration):
(API::ProcessPoolConfiguration::ProcessPoolConfiguration):
(API::ProcessPoolConfiguration::copy):
* UIProcess/API/APIProcessPoolConfiguration.h:
* UIProcess/API/APIWebsiteDataStore.cpp:
(API::WebsiteDataStore::legacyDefaultDataStoreConfiguration):
Added code to set the directory in the disk used to store the
information.
* UIProcess/API/APIWebsiteDataStore.h: Ditto.
* UIProcess/API/Cocoa/APIWebsiteDataStoreCocoa.mm: Added dummy
implementation to get the directory in cocoa.
(API::WebsiteDataStore::defaultDeviceIdHashSaltsStorageDirectory):
(API::WebsiteDataStore::legacyDefaultDeviceIdHashSaltsStorageDirectory):
* UIProcess/API/glib/APIWebsiteDataStoreGLib.cpp: Defined the
default directories used to store the information in the disk.
(API::WebsiteDataStore::defaultDeviceIdHashSaltsStorageDirectory):
(API::WebsiteDataStore::legacyDefaultDeviceIdHashSaltsStorageDirectory):
(API::WebsiteDataStore::defaultDataStoreConfiguration):
* UIProcess/API/glib/WebKitWebsiteDataManager.cpp:
(webkitWebsiteDataManagerGetDataStore): Added the directory used
to store the information.
(webkit_website_data_manager_remove): Modified the way we use to
make sure when we remove the cookies we also remove the hash salts.
* UIProcess/API/win/APIWebsiteDataStoreWin.cpp: Added dummy
implementations to get the directory in windows platform.
(API::WebsiteDataStore::defaultDeviceIdHashSaltsStorageDirectory):
(API::WebsiteDataStore::legacyDefaultDeviceIdHashSaltsStorageDirectory):
* UIProcess/API/C/WKBackForwardListItemRef.cpp: Add namespace, it
seems some unified build compilation issue.
* UIProcess/DeviceIdHashSaltStorage.cpp:
(WebKit::DeviceIdHashSaltStorage::create): Added a create method
used to pass the directory and the persistency status of the websitedatastore.
(WebKit::DeviceIdHashSaltStorage::completeHandler): Added to share
the code copying the origins to complete the get handler.
(WebKit::DeviceIdHashSaltStorage::completeDeviceIdHashSaltForOriginCall):
Added to share the code when completing the task of getting a new
hash salt.
(WebKit::DeviceIdHashSaltStorage::DeviceIdHashSaltStorage): Added
a new constructor for the create method.
(WebKit::getSecurityOriginData): Added to get the
SecurityOriginData from a field in the decoder and do all the
checks.
(WebKit::DeviceIdHashSaltStorage::loadStorageFromDisk): Open the
directory and restore all the hash salts from disk to the memory
structure.
(WebKit::DeviceIdHashSaltStorage::createEncoderFromData const):
Creates the decoder to store the HashSaltForOrigin structure.
(WebKit::DeviceIdHashSaltStorage::storeHashSaltToDisk): Write to
disk a decoder object created from a HashSaltForOrigin
structure. It uses the writeEncoderToDisk function.
(WebKit::DeviceIdHashSaltStorage::deviceIdHashSaltForOrigin): Make
sure we store in disk a new hash salt when it is generated and the
WebsiteDataStore is persistent. Add a completionHandler to return
the value found or generated, this way we can control if the
HashMap is already loaded from disk.
(WebKit::DeviceIdHashSaltStorage::getDeviceIdHashSaltOrigins):
Make sure we run the get in a queue now that we store information
in disk.
(WebKit::DeviceIdHashSaltStorage::deleteHashSaltFromDiskIfNeeded):
Added code to make sure we remove the files in disk.
(WebKit::DeviceIdHashSaltStorage::deleteDeviceIdHashSaltForOrigins):
Added code to use the deleteHashSaltFromDiskIfNeeded and remove the files in disk.
(WebKit::DeviceIdHashSaltStorage::deleteDeviceIdHashSaltOriginsModifiedSince):
Added code to use the deleteHashSaltFromDiskIfNeeded and remove the files in disk.
* UIProcess/DeviceIdHashSaltStorage.h: Ditto.
* UIProcess/PersistencyUtils.cpp: Added file to share the
persistency code with the ResourceLoadStatisticsPersistentStorage class.
(WebKit::createDecoderForFile): Ditto.
(WebKit::writeEncoderToDisk): Ditto.
* UIProcess/PersistencyUtils.h: Ditto.
* UIProcess/ResourceLoadStatisticsPersistentStorage.cpp: Use the
new PersistencyUtils functions shared with the
DeviceIdHashSaltStorage class.
(WebKit::ResourceLoadStatisticsPersistentStorage::refreshMemoryStoreFromDisk):
(WebKit::ResourceLoadStatisticsPersistentStorage::populateMemoryStoreFromDisk):
(WebKit::ResourceLoadStatisticsPersistentStorage::writeMemoryStoreToDisk):
* UIProcess/UserMediaPermissionRequestManagerProxy.cpp: After
changing the API of the deviceIdHashSaltForOrigin we now use a
completionHandler because it could happen the HashMap is not still
loaded and we would have to wait for it. We refactored the calls
to the method to use this new completionHandler.
(WebKit::UserMediaPermissionRequestManagerProxy::userMediaAccessWasGranted):
(WebKit::UserMediaPermissionRequestManagerProxy::requestUserMediaPermissionForFrame):
(WebKit::UserMediaPermissionRequestManagerProxy::enumerateMediaDevicesForFrame):
* UIProcess/WebsiteData/WebsiteDataStore.cpp:
(WebKit::WebsiteDataStore::WebsiteDataStore): Create the
DeviceIdHashSaltStorage class with the persistency information.
(WebKit::WebsiteDataStore::resolveDirectoriesIfNecessary): Make
sure we have the directory to store the information.
* UIProcess/WebsiteData/WebsiteDataStoreConfiguration.h: Add get
and set functions for the deviceHashSaltStorageDirectory.
* WebKit.xcodeproj/project.pbxproj: Added PersistencyUtils file to
the xcode compilation.

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

9 months agoSynchronous media query evaluation could destroy current Frame/FrameView.
zalan@apple.com [Fri, 21 Dec 2018 19:57:14 +0000 (19:57 +0000)]
Synchronous media query evaluation could destroy current Frame/FrameView.
https://bugs.webkit.org/show_bug.cgi?id=192781
<rdar://problem/34416793>

Reviewed by Chris Dumez.

Source/WebCore:

Protect Frame and FrameView when coming back from printing and check if the current Frame/FrameView/FrameLoader objects are still valid.

Test: printing/print-with-media-query-destory.html

* loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::finishedLoading):
* page/Frame.cpp:
(WebCore::Frame::setPrinting):
* page/FrameView.cpp:
(WebCore::FrameView::forceLayoutForPagination):
* page/PrintContext.cpp:
(WebCore::PrintContext::PrintContext):
(WebCore::PrintContext::computePageRects):
(WebCore::PrintContext::computePageRectsWithPageSizeInternal):
(WebCore::PrintContext::begin):
(WebCore::PrintContext::computeAutomaticScaleFactor):
(WebCore::PrintContext::spoolPage):
(WebCore::PrintContext::spoolRect):
(WebCore::PrintContext::end):
* page/PrintContext.h:
(WebCore::PrintContext::frame const): Deleted.

LayoutTests:

* printing/print-with-media-query-destory-expected.txt: Added.
* printing/print-with-media-query-destory.html: Added.

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

9 months agoSetting the file wrapper and content type of an attachment to a PDF should update...
wenson_hsieh@apple.com [Fri, 21 Dec 2018 19:40:41 +0000 (19:40 +0000)]
Setting the file wrapper and content type of an attachment to a PDF should update its image
https://bugs.webkit.org/show_bug.cgi?id=192984
<rdar://problem/46798028>

Reviewed by Tim Horton.

Source/WebCore:

Allow PDF data to be used to update enclosing image elements when setting the file wrapper for an attachment.
Covered by a new API test: WKAttachmentTests.SetFileWrapperForPDFImageAttachment.

* html/HTMLAttachmentElement.cpp:
(WebCore::mimeTypeIsSuitableForInlineImageAttachment):
(WebCore::HTMLAttachmentElement::updateEnclosingImageWithData):

Tools:

Add an API test to verify that setting the file wrapper for a _WKAttachment with an enclosing image element with
PDF data correctly updates the image element.

* TestWebKitAPI/Tests/WebKitCocoa/WKAttachmentTests.mm:

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

9 months agoResync opus to M72
youenn@apple.com [Fri, 21 Dec 2018 19:37:40 +0000 (19:37 +0000)]
Resync opus to M72
https://bugs.webkit.org/show_bug.cgi?id=192867

Reviewed by Alex Christensen.

* Configurations/opus.xcconfig: Updated compilation flag.
* Source/third_party/opus: Resynced to Chrome M72 branch.

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

9 months agoResync libsrtp to M72
youenn@apple.com [Fri, 21 Dec 2018 19:28:09 +0000 (19:28 +0000)]
Resync libsrtp to M72
https://bugs.webkit.org/show_bug.cgi?id=192861

Reviewed by Eric Carlson.

* Source/third_party/libsrtp/: Resynced to Chrome M72 branch.

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

9 months agoUse kVTCompressionPropertyKey_Usage instead of kVTVideoEncoderSpecification_Usage
youenn@apple.com [Fri, 21 Dec 2018 19:22:44 +0000 (19:22 +0000)]
Use kVTCompressionPropertyKey_Usage instead of kVTVideoEncoderSpecification_Usage
https://bugs.webkit.org/show_bug.cgi?id=192885

Reviewed by Eric Carlson.

When VCP is enabled, use kVTCompressionPropertyKey_Usage as this is
kVTVideoEncoderSpecification_Usage no longer works to activate VCP on iOS.
Tested manually.

* Source/webrtc/sdk/objc/components/video_codec/RTCVideoEncoderH264.mm:
(-[RTCSingleVideoEncoderH264 resetCompressionSessionWithPixelFormat:]):
(-[RTCSingleVideoEncoderH264 configureCompressionSession]):

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

9 months agoAdd JSCOnly to bot dashboard
mcatanzaro@igalia.com [Fri, 21 Dec 2018 17:57:50 +0000 (17:57 +0000)]
Add JSCOnly to bot dashboard
https://bugs.webkit.org/show_bug.cgi?id=192964

Reviewed by Alexey Proskuryakov.

Apparently we have five JSCOnly test bots and multiple developers working on keeping them in
good shape. Sadly, they are hidden bots not exposed in the dashboard. They would be more
useful if they were not so secret, so add them.

There appear to be no build-only bots, so the first column is blank. And of course there are
no WebKit1 or WebKit2 bots, because this is JSCOnly, so the second and third columns are
blank too. That's OK. This will be the last bot on the dashboard, so it won't look too bad,
and there's plenty of room in the final column for all the bots.

I had a hard time picking a logo to use, because the JavaScript language does not have an
official logo. But I believe I've found one that will be satisfactory.

I will sneak in one bonus change: WPE's EWS queue was missing, and has been added.

* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Images/SquirrelFish.png: Added.
* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Images/SquirrelFish@2x.png: Added.
* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BubbleQueueServer.js:
(BubbleQueueServer):
* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/Dashboard.js:
* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/WebKitBuildbot.js:
(WebKitBuildbot):
* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Styles/Main.css:
(table.queue-grid tr.platform.linux-jsconly img.logo):

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

9 months agoRevert r239503.
achristensen@apple.com [Fri, 21 Dec 2018 17:52:57 +0000 (17:52 +0000)]
Revert r239503.
https://bugs.webkit.org/show_bug.cgi?id=192944

Source/WTF:

* wtf/cocoa/NSURLExtras.mm:
(WTF::isLookalikeCharacter):

LayoutTests:

* fast/url/host-expected.txt:
* fast/url/host.html:

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

9 months agoSkipping webgpu/ tests after https://trac.webkit.org/changeset/239495/webkit disabled...
tsavell@apple.com [Fri, 21 Dec 2018 17:40:14 +0000 (17:40 +0000)]
Skipping webgpu/ tests after https://trac.webkit.org/changeset/239495/webkit disabled webgpu on 10.12
https://bugs.webkit.org/show_bug.cgi?id=192956

Unreviewed Test Gardening.

* platform/mac/TestExpectations:

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

9 months agoRepeated background images with zero size should display the background color
justin_michaud@apple.com [Fri, 21 Dec 2018 17:33:14 +0000 (17:33 +0000)]
Repeated background images with zero size should display the background color
https://bugs.webkit.org/show_bug.cgi?id=192962

Reviewed by Antti Koivisto.

Source/WebCore:

Test: fast/backgrounds/background-repeat-with-zero-size.html

* platform/LengthSize.h:
(WebCore::LengthSize::isEmpty const):
* rendering/RenderBoxModelObject.cpp:
(WebCore::RenderBoxModelObject::paintFillLayerExtended):
* rendering/style/FillLayer.h:
(WebCore::FillLayer::isEmpty const):

LayoutTests:

Fix a rendering bug exposed by the CSS Variable wpt tests where repeated backgrounds with zero size
not draw the background colour underneath.

* fast/backgrounds/background-repeat-with-zero-size-expected.html: Added.
* fast/backgrounds/background-repeat-with-zero-size.html: Added.

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

9 months agoShow punycode if URL contains Latin small letter dotless i
bfulgham@apple.com [Fri, 21 Dec 2018 16:20:03 +0000 (16:20 +0000)]
Show punycode if URL contains Latin small letter dotless i
https://bugs.webkit.org/show_bug.cgi?id=192944
<rdar://problem/46103047>

Reviewed by Andy Estes.

Source/WTF:

Revise our "lookalike character" logic to include the small Latin
dotless i character.

Test: fast/url/host.html

* wtf/cocoa/NSURLExtras.mm:
(WTF::isLookalikeCharacter):

LayoutTests:

* fast/url/host-expected.txt:
* fast/url/host.html:

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

9 months ago[css-grid] Fix percentages in relative offsets for grid items
rego@igalia.com [Fri, 21 Dec 2018 12:29:57 +0000 (12:29 +0000)]
[css-grid] Fix percentages in relative offsets for grid items
https://bugs.webkit.org/show_bug.cgi?id=190492

Reviewed by Sergio Villar Senin.

LayoutTests/imported/w3c:

* web-platform-tests/css/css-grid/grid-items/grid-items-relative-offsets-002-expected.txt:
  Update expected file as we're now passing this test.

Source/WebCore:

The method RenderBoxModelObject::relativePositionOffset() was not considering the case of grid items,
where the containing block is the grid area.
The patch modifies the method so the new code uses overrideContainingBlockContentWidth|Height when required.

Test: imported/w3c/web-platform-tests/css/css-grid/grid-items/grid-items-relative-offsets-002.html

* rendering/RenderBox.cpp: Implement the physical versions of the already existent methods.
(WebCore::RenderBox::overrideContainingBlockContentWidth const):
(WebCore::RenderBox::overrideContainingBlockContentHeight const):
(WebCore::RenderBox::hasOverrideContainingBlockContentWidth const):
(WebCore::RenderBox::hasOverrideContainingBlockContentHeight const):
* rendering/RenderBox.h:
* rendering/RenderBoxModelObject.cpp:
(WebCore::RenderBoxModelObject::relativePositionOffset const): Modified method
to take into account overrideContainingBlockContentWidth|Height for grid items.
* rendering/RenderBoxModelObject.h: Added new headers for physical virtual methods
that will be overridden in RenderBox.
(WebCore::RenderBoxModelObject::overrideContainingBlockContentWidth const):
(WebCore::RenderBoxModelObject::overrideContainingBlockContentHeight const):
(WebCore::RenderBoxModelObject::hasOverrideContainingBlockContentWidth const):
(WebCore::RenderBoxModelObject::hasOverrideContainingBlockContentHeight const):

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

9 months agoUnreviewed GTK+ gardening. Remove platform specific files that are exactly the same...
carlosgc@webkit.org [Fri, 21 Dec 2018 11:47:28 +0000 (11:47 +0000)]
Unreviewed GTK+ gardening. Remove platform specific files that are exactly the same as the generic expectation.

* platform/gtk/fast/text/selection-in-initial-advance-region-expected.txt: Removed.
* platform/gtk/imported/w3c/web-platform-tests/2dcontext/imagebitmap/createImageBitmap-invalid-args-expected.txt: Removed.
* platform/gtk/legacy-animation-engine/animations/lineheight-animation-expected.txt: Removed.
* platform/gtk/legacy-animation-engine/animations/simultaneous-start-transform-expected.txt: Removed.
* platform/gtk/legacy-animation-engine/animations/width-using-ems-expected.txt: Removed.
* platform/gtk/security/block-test-expected.txt: Removed.
* platform/gtk/webaudio/codec-tests/wav/24bit-22khz-resample-expected.wav: Removed.

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

9 months agoUnreviewed GTK+ gardening. Rebaseline several tests.
carlosgc@webkit.org [Fri, 21 Dec 2018 11:44:56 +0000 (11:44 +0000)]
Unreviewed GTK+ gardening. Rebaseline several tests.

* platform/gtk/css2.1/t051201-c23-first-line-00-b-expected.png:
* platform/gtk/css2.1/t051201-c23-first-line-00-b-expected.txt:
* platform/gtk/css2.1/t1508-c527-font-04-b-expected.png:
* platform/gtk/css2.1/t1508-c527-font-04-b-expected.txt:
* platform/gtk/css2.1/t1508-c527-font-05-b-expected.png:
* platform/gtk/css2.1/t1508-c527-font-05-b-expected.txt:
* platform/gtk/css2.1/t1508-c527-font-07-b-expected.png:
* platform/gtk/css2.1/t1508-c527-font-07-b-expected.txt:
* platform/gtk/fast/css/getComputedStyle/computed-style-expected.txt: Added.
* platform/gtk/fast/css/getComputedStyle/computed-style-font-family-expected.txt: Added.
* platform/gtk/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt: Added.
* platform/gtk/fast/text/font-selection-font-loading-api-parse-expected.txt: Added.
* platform/gtk/fast/text/font-stretch-parse-expected.txt: Added.
* platform/gtk/fast/text/font-style-parse-expected.txt: Added.
* platform/gtk/fast/text/font-weight-parse-expected.txt: Added.
* platform/gtk/svg/css/getComputedStyle-basic-expected.txt: Added.

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

9 months ago[GLIB] WebDriver: dbusConnectionClosedCallback can be called after SessionHost has...
carlosgc@webkit.org [Fri, 21 Dec 2018 10:53:17 +0000 (10:53 +0000)]
[GLIB] WebDriver: dbusConnectionClosedCallback can be called after SessionHost has been deleted
https://bugs.webkit.org/show_bug.cgi?id=192976

Reviewed by Alejandro G. Castro.

Disconnect DBus connection signals using SessionHost as user data in SessionHost destructor.

* glib/SessionHostGlib.cpp:
(WebDriver::SessionHost::~SessionHost):

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

9 months agoUnreviewed gardening. Skip imported/w3c/webdriver/tests/permissions/set.py.
carlosgc@webkit.org [Fri, 21 Dec 2018 10:34:44 +0000 (10:34 +0000)]
Unreviewed gardening. Skip imported/w3c/webdriver/tests/permissions/set.py.

Permissions command is not implemented yet.

* TestExpectations.json:

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

9 months agoUnreviewed. WebDriver: remove deleted tests after r238881.
carlosgc@webkit.org [Fri, 21 Dec 2018 10:28:43 +0000 (10:28 +0000)]
Unreviewed. WebDriver: remove deleted tests after r238881.

Deleted files were not removed from the repository in r238881. Also update the test names in the test
expectations file.

* TestExpectations.json:
* imported/w3c/webdriver/tests/actions/__init__.py: Removed.
* imported/w3c/webdriver/tests/actions/conftest.py: Removed.
* imported/w3c/webdriver/tests/actions/control_click.py: Removed.
* imported/w3c/webdriver/tests/actions/key.py: Removed.
* imported/w3c/webdriver/tests/actions/key_shortcuts.py: Removed.
* imported/w3c/webdriver/tests/actions/modifier_click.py: Removed.
* imported/w3c/webdriver/tests/actions/mouse.py: Removed.
* imported/w3c/webdriver/tests/actions/mouse_dblclick.py: Removed.
* imported/w3c/webdriver/tests/actions/mouse_pause_dblclick.py: Removed.
* imported/w3c/webdriver/tests/actions/pointer_origin.py: Removed.
* imported/w3c/webdriver/tests/actions/sequence.py: Removed.
* imported/w3c/webdriver/tests/actions/special_keys.py: Removed.
* imported/w3c/webdriver/tests/actions/support/__init__.py: Removed.
* imported/w3c/webdriver/tests/actions/support/keys.py: Removed.
* imported/w3c/webdriver/tests/actions/support/mouse.py: Removed.
* imported/w3c/webdriver/tests/actions/support/refine.py: Removed.
* imported/w3c/webdriver/tests/actions/support/test_actions_wdspec.html: Removed.
* imported/w3c/webdriver/tests/page_source/__init__.py: Removed.
* imported/w3c/webdriver/tests/page_source/source.py: Removed.
* imported/w3c/webdriver/tests/support/wait.py: Removed.

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

9 months ago<rdar://problem/46194315> macOS: WebKit1 does not handle occlusion changes
benjamin@webkit.org [Fri, 21 Dec 2018 08:37:57 +0000 (08:37 +0000)]
<rdar://problem/46194315> macOS: WebKit1 does not handle occlusion changes
https://bugs.webkit.org/show_bug.cgi?id=192821

Reviewed by Chris Dumez.

Source/WebKitLegacy/mac:

When a window becomes occluded, the window server informs the application.
This should be used to suspend any work that is not visible by the user.

WebKit2 handles it just fine, but WebKit1 did not handle the notification.
In some cases, that lead to performance impact (see radar).

This patch adds an observer for the occlusion notification. I tried to stick
with the same names used by WebKit2.

* WebView/WebView.mm:
(-[WebView _isViewVisible]):
(-[WebView addWindowObserversForWindow:]):
(-[WebView removeWindowObservers]):
(-[WebView _windowDidChangeOcclusionState:]):

Tools:

* DumpRenderTree/mac/DumpRenderTree.mm:
(createWebViewAndOffscreenWindow):
* TestWebKitAPI/mac/WebKitAgnosticTest.mm:

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

9 months ago[WebGPU] Convert WebGPUBindGroups into MTLArgumentEncoders
justin_fan@apple.com [Fri, 21 Dec 2018 03:04:52 +0000 (03:04 +0000)]
[WebGPU] Convert WebGPUBindGroups into MTLArgumentEncoders
https://bugs.webkit.org/show_bug.cgi?id=192956

Reviewed by Myles Maxfield.

No testable behavior change. Existing tests cover possible crashing.

Add GPUBindGroupLayoutMetal.mm:
* SourcesCocoa.txt:
* WebCore.xcodeproj/project.pbxproj:

Flesh out GPUBindGroupLayout::create:
* platform/graphics/gpu/GPUBindGroupLayout.cpp:
* platform/graphics/gpu/GPUBindGroupLayout.h:
* platform/graphics/gpu/GPUDevice.cpp:
(WebCore::GPUDevice::createBindGroupLayout const):
* platform/graphics/gpu/cocoa/GPUBindGroupLayoutMetal.mm: Added.
(WebCore::appendArgumentToArrayInMap): Added.
(WebCore::GPUBindGroupLayout::create):
(WebCore::GPUBindGroupLayout::GPUBindGroupLayout):
(WebCore::MTLDataTypeForBindingType): Added.

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