Timeline



Jul 19, 2018:

11:11 PM Changeset in webkit [234025] by Carlos Garcia Campos
  • 11 edits
    2 adds in trunk

[GLIB] jsc_context_evaluate_in_object() should receive an instance when a JSCClass is given
https://bugs.webkit.org/show_bug.cgi?id=187798

Reviewed by Michael Catanzaro.

Source/JavaScriptCore:

Because a JSCClass is pretty much useless without an instance in this case. It should be similar to
jsc_value_new_object() because indeed we are creating a new object. This makes destroy function and vtable
functions to work. We can't use JSAPIWrapperObject to wrap this object, because it's a global object, so this
patch adds JSAPIWrapperGlobalObject or that.

  • API/glib/JSAPIWrapperGlobalObject.cpp: Added.

(jsAPIWrapperGlobalObjectHandleOwner):
(JSAPIWrapperGlobalObjectHandleOwner::finalize):
(JSC::JSCallbackObject<JSAPIWrapperGlobalObject>::createStructure):
(JSC::JSCallbackObject<JSAPIWrapperGlobalObject>::create):
(JSC::JSAPIWrapperGlobalObject::JSAPIWrapperGlobalObject):
(JSC::JSAPIWrapperGlobalObject::finishCreation):
(JSC::JSAPIWrapperGlobalObject::visitChildren):

  • API/glib/JSAPIWrapperGlobalObject.h: Added.

(JSC::JSAPIWrapperGlobalObject::wrappedObject const):
(JSC::JSAPIWrapperGlobalObject::setWrappedObject):

  • API/glib/JSCClass.cpp:

(isWrappedObject): Helper to check if the given object is a JSAPIWrapperObject or JSAPIWrapperGlobalObject.
(wrappedObjectClass): Return the class of a wrapped object.
(jscContextForObject): Get the execution context of an object. If the object is a JSAPIWrapperGlobalObject, the
scope extension global object is used instead.
(getProperty): Use isWrappedObject, wrappedObjectClass and jscContextForObject.
(setProperty): Ditto.
(hasProperty): Ditto.
(deleteProperty): Ditto.
(getPropertyNames): Ditto.
(jscClassCreateContextWithJSWrapper): Call jscContextCreateContextWithJSWrapper().

  • API/glib/JSCClassPrivate.h:
  • API/glib/JSCContext.cpp:

(jscContextCreateContextWithJSWrapper): Call WrapperMap::createContextWithJSWrappper().
(jsc_context_evaluate_in_object): Use jscClassCreateContextWithJSWrapper() when a JSCClass is given.

  • API/glib/JSCContext.h:
  • API/glib/JSCContextPrivate.h:
  • API/glib/JSCWrapperMap.cpp:

(JSC::WrapperMap::createContextWithJSWrappper): Create the new context for jsc_context_evaluate_in_object() here
when a JSCClass is used to create the JSAPIWrapperGlobalObject.
(JSC::WrapperMap::wrappedObject const): Return the wrapped object also in case of JSAPIWrapperGlobalObject.

  • API/glib/JSCWrapperMap.h:
  • GLib.cmake:

Tools:

Update test cases to the new API and use a destroy function and vtable in the test case of calling
jsc_context_evaluate_in_object() with a JSCClass.

  • TestWebKitAPI/Tests/JavaScriptCore/glib/TestJSC.cpp:

(testJSCEvaluateInObject):

11:10 PM Changeset in webkit [234024] by Ross Kirsling
  • 2 edits in trunk/Tools

TestWTF.WTF.StringConcatenate_Unsigned fails for unsigned short on Windows
https://bugs.webkit.org/show_bug.cgi?id=187712

Reviewed by Fujii Hironori.

  • TestWebKitAPI/Tests/WTF/StringConcatenate.cpp:

Mark result of unsigned short test case as platform-specific,
since Windows' behavior is actually *less* surprising here.

9:53 PM Changeset in webkit [234023] by Chris Dumez
  • 2 edits in trunk/Source/WebKit

Null pointer dereference under WebPage::autofillLoginCredentials()
https://bugs.webkit.org/show_bug.cgi?id=187823
<rdar://problem/37152195>

Reviewed by David Kilzer.

Deal with m_assistedNode being null under WebPage::autofillLoginCredentials().

  • WebProcess/WebPage/ios/WebPageIOS.mm:

(WebKit::WebPage::autofillLoginCredentials):

9:47 PM Changeset in webkit [234022] by sbarati@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

Conservatively make Object.assign's fast path do a two phase protocol of loading everything then storing everything to try to prevent a crash
https://bugs.webkit.org/show_bug.cgi?id=187836
<rdar://problem/42409527>

Reviewed by Mark Lam.

We have crash reports that we're crashing on source->getDirect in Object.assign's
fast path. Mark investigated this and determined we end up with a nullptr for
butterfly. This is curious, because source's Structure indicated that it has
out of line properties. My leading hypothesis for this at the moment is a bit
handwavy, but it's essentially:

  • We end up firing a watchpoint when assigning to the target (this can happen

if a watchpoint was set up for storing to that particular field)

  • When we fire that watchpoint, we end up doing some kind work on the source,

perhaps causing it to flattenDictionaryStructure. Therefore, we end up
mutating source.

I'm not super convinced this is what we're running into, but just by reading
the code, I think it needs to be something similar to this. Seeing if this change
fixes the crasher will give us good data to determine if something like this is
happening or if the bug is something else entirely.

  • runtime/ObjectConstructor.cpp:

(JSC::objectConstructorAssign):

9:29 PM Changeset in webkit [234021] by Ross Kirsling
  • 2 edits in trunk/Source/WebInspectorUI

Web Inspector: Layers visualization shouldn't select on mousedown
https://bugs.webkit.org/show_bug.cgi?id=187488

Reviewed by Matt Baker.

  • UserInterface/Views/Layers3DContentView.js:

(WI.Layers3DContentView):
(WI.Layers3DContentView.prototype.initialLayout):
(WI.Layers3DContentView.prototype._canvasMouseDown):
(WI.Layers3DContentView.prototype._canvasMouseUp):
Don't update selection on mousedown, update on mouseup!
Specifically, only update when mousedown & mouseup targets are the same and mousemove hasn't been triggered.

8:44 PM Changeset in webkit [234020] by Chris Dumez
  • 2 edits in trunk/Source/WebKit

[ITP] Crash under ResourceLoadStatisticsMemoryStore::removeDataRecords()
https://bugs.webkit.org/show_bug.cgi?id=187821
<rdar://problem/42112693>

Reviewed by David Kilzer.

In two cases, ResourceLoadStatisticsMemoryStore (which lives on a background queue) needs to call WebPageProxy
operations on the main thread and then dispatch back on the background queue when the operation completes.
However, it is possible for the ResourceLoadStatisticsMemoryStore to get destroyed on the background queue
during this time and we would then crash when trying to use m_workQueue to re-dispatch. To address the issue,
I now ref the work queue in the lambda so that we're guaranteed to be able to re-dispatch to the background
queue. When we're back on the background queue, we'll realize that weakThis in gone and we'll call the callback
and return early.

Note that I am not checking weakThis on the main thread as this would not be safe. weakThis should only be
used on the background queue.

  • UIProcess/ResourceLoadStatisticsMemoryStore.cpp:

(WebKit::ResourceLoadStatisticsMemoryStore::removeDataRecords):
(WebKit::ResourceLoadStatisticsMemoryStore::grandfatherExistingWebsiteData):

7:24 PM Changeset in webkit [234019] by Fujii Hironori
  • 2 edits in trunk/Source/WebKit

Move WebFrameListenerProxy to WebFramePolicyListenerProxy, its only subclass
https://bugs.webkit.org/show_bug.cgi?id=187825
<rdar://problem/42405081>

Unreviewed build fix for Windows port.

RefPtr.h(45): error C2027: use of undefined type 'API::Navigation'

  • UIProcess/win/WebInspectorProxyWin.cpp: Include "APINavigation.h".
5:46 PM Changeset in webkit [234018] by Kocsen Chung
  • 1 copy in tags/Safari-606.1.27

Tag Safari-606.1.27.

5:06 PM Changeset in webkit [234017] by graouts@webkit.org
  • 10 edits in trunk

Flaky crash in AnimationTimeline::cancelOrRemoveDeclarativeAnimation
https://bugs.webkit.org/show_bug.cgi?id=187530
<rdar://problem/42095186>

Reviewed by Dean Jackson.

LayoutTests/imported/mozilla:

Mark a WPT progression now that we correctly ignore animation names that have no matching @keyframes rule.

  • css-animations/test_element-get-animations-expected.txt:

Source/WebCore:

We would crash in cancelOrRemoveDeclarativeAnimation() because updateCSSAnimationsForElement() would pass
nullptr values due to the return value of cssAnimationsByName.take(nameOfAnimationToRemove). This is because
we would create animations for animation names that may be empty or not match an existing @keyframes rule.
Not only was that wasteful, but it was also non-compliant, and as a result of fixing this we're actually
seeing a progression in the CSS Animations WPT tests.

  • animation/AnimationTimeline.cpp:

(WebCore::shouldConsiderAnimation): New function that performs all required steps to see if a provided animation
is valid and has a name that is not "none", not the empty string and matches the name of a @keyframes rule.
(WebCore::AnimationTimeline::updateCSSAnimationsForElement):

  • animation/KeyframeEffectReadOnly.cpp:

(WebCore::KeyframeEffectReadOnly::computeCSSAnimationBlendingKeyframes): We no longer need to check whether we have
an empty animation name since we're no longer creating CSSAnimation objects in that circumstance.

  • css/StyleResolver.cpp:

(WebCore::StyleResolver::isAnimationNameValid): Add a new method that checks whether the provided animation name
a known @keyframes rule.

  • css/StyleResolver.h:

LayoutTests:

Adjust an existing test which assumes an animation might be running when it's not really, so we test the animation is
not running using an alternate method.

  • animations/keyframes-dynamic-expected.txt:
  • animations/keyframes-dynamic.html:
4:37 PM Changeset in webkit [234016] by Lucas Forschler
  • 3 edits in trunk/Tools

Teach the AWS Lambda to use the [minified]-platforms database

4:30 PM Changeset in webkit [234015] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Mark storage/indexeddb/modern/opendatabase-after-storage-crash.html as flaky.
https://bugs.webkit.org/show_bug.cgi?id=187648

Unreviewed test gardening.

  • platform/wk2/TestExpectations:
4:20 PM Changeset in webkit [234014] by Simon Fraser
  • 2 edits in trunk/LayoutTests

Fix the test.

  • editing/mac/attributed-string/attributed-string-for-typing-with-color-filter.html:
4:19 PM Changeset in webkit [234013] by Chris Dumez
  • 2 edits in trunk/Source/WebCore

Crash under WebCore::DocumentWriter::addData()
https://bugs.webkit.org/show_bug.cgi?id=187819
<rdar://problem/41328743>

Reviewed by Brady Eidson.

When AppCache is used a DocumentLoader may start a NetworkLoad even though it has substitute data.
In DocumentLoader::continueAfterContentPolicy(), if we have substitute data we commit this data
and call finishLoad(). However, if the case where there was a NetworkLoad started, we'll send the
ContinueDidReceiveResponse IPC back to the network process and it will start sending us data for
the load. This could lead to crashes such as <rdar://problem/41328743> since the DocumentLoader
has already committed data and finished loading when it gets the data from the network process.

To address the issue, we now call clearMainResource() in continueAfterContentPolicy(), after we've
decided to commit the substitute data. This effectively removes the DocumentLoader as a client of
the CachedResource so that its will not be notified of following load progress. We do not cancel
the load as other CachedResourceClients may be interested in the load (ApplicationCacheResourceLoader
in particular, in order to update its cached data).

  • loader/DocumentLoader.cpp:

(WebCore::DocumentLoader::continueAfterContentPolicy):

4:17 PM Changeset in webkit [234012] by dino@apple.com
  • 2 edits in trunk/Tools

Provide an lldb type summary for WebCore::Color
https://bugs.webkit.org/show_bug.cgi?id=187776

Dan Bates helped me with this attempted fix. Fingers crossed!

  • Scripts/build-lldbwebkittester:
4:17 PM Changeset in webkit [234011] by dino@apple.com
  • 2 edits in trunk/Source/WebCore

CrashTracer: com.apple.WebKit.WebContent.Development at com.apple.WebCore: std::optional<WTF::Vector<WebCore::PluginInfo, 0ul, WTF::CrashOnOverflow, 16ul> >::operator* & + 73
https://bugs.webkit.org/show_bug.cgi?id=187820
<rdar://problem/42017759>

Reviewed by Antoine Quint.

Speculative fix for this crash, which is accessing an optional without checking
if it exists. The crash logs didn't point to a reproducible test case.

  • plugins/PluginData.cpp:

(WebCore::PluginData::supportsWebVisibleMimeTypeForURL const): Return false if
the optional doesn't exist.

4:11 PM Changeset in webkit [234010] by stephan.szabo@sony.com
  • 4 edits in trunk

[WinCairo] Support DEVELOPER_MODE for allowing inspection of web inspector
https://bugs.webkit.org/show_bug.cgi?id=187786

Reviewed by Fujii Hironori.

.:

  • Source/cmake/OptionsWinCairo.cmake: Add ENABLE_DEVELOPER_MODE

to build when DEVELOPER_MODE is turned on at cmake time.

Tools:

  • Scripts/webkitdirs.pm:

(generateBuildSystemFromCMakeProject): Turn on DEVELOPER_MODE
for WinCairo builds.

4:11 PM Changeset in webkit [234009] by achristensen@apple.com
  • 20 edits
    2 deletes in trunk/Source/WebKit

Move WebFrameListenerProxy to WebFramePolicyListenerProxy, its only subclass
https://bugs.webkit.org/show_bug.cgi?id=187825

Reviewed by Brady Eidson.

  • CMakeLists.txt:
  • UIProcess/API/C/WKPage.cpp:
  • UIProcess/API/Cocoa/WKBrowsingContextController.mm:
  • UIProcess/Automation/WebAutomationSession.cpp:
  • UIProcess/Cocoa/WebViewImpl.mm:
  • UIProcess/RemoteWebInspectorProxy.cpp:
  • UIProcess/WebFormSubmissionListenerProxy.h:

(WebKit::WebFormSubmissionListenerProxy::create):
(WebKit::WebFormSubmissionListenerProxy::WebFormSubmissionListenerProxy):

  • UIProcess/WebFrameListenerProxy.cpp: Removed.
  • UIProcess/WebFrameListenerProxy.h: Removed.
  • UIProcess/WebFramePolicyListenerProxy.cpp:

(WebKit::WebFramePolicyListenerProxy::WebFramePolicyListenerProxy):
(WebKit::WebFramePolicyListenerProxy::receivedPolicyDecision):
(WebKit::WebFramePolicyListenerProxy::changeWebsiteDataStore):
(WebKit::WebFramePolicyListenerProxy::invalidate):
(WebKit::WebFramePolicyListenerProxy::isMainFrame const):
(WebKit::WebFramePolicyListenerProxy::setNavigation):

  • UIProcess/WebFramePolicyListenerProxy.h:

(WebKit::WebFramePolicyListenerProxy::listenerID const):
(WebKit::WebFramePolicyListenerProxy::operator new): Deleted.

  • UIProcess/WebFrameProxy.cpp:

(WebKit::WebFrameProxy::activePolicyListenerProxy):

  • UIProcess/WebFrameProxy.h:
  • UIProcess/WebInspectorProxy.cpp:
  • UIProcess/WebProcessPool.cpp:
  • UIProcess/ios/ViewGestureControllerIOS.mm:
  • UIProcess/mac/ViewGestureControllerMac.mm:
  • UIProcess/mac/WKInspectorViewController.mm:
  • WebKit.xcodeproj/project.pbxproj:
3:56 PM Changeset in webkit [234008] by Chris Dumez
  • 2 edits in trunk/Source/ThirdParty/libwebrtc

PlatformThread::Run does not need to log the fact that it is running
https://bugs.webkit.org/show_bug.cgi?id=187801i
<rdar://problem/40331421>

Patch by Youenn Fablet <youenn@apple.com> on 2018-07-19
Reviewed by Chris Dumez.

  • Source/webrtc/rtc_base/platform_thread.cc:
2:55 PM Changeset in webkit [234007] by graouts@webkit.org
  • 2 edits in trunk/Source/WebCore

Ensure DocumentTimeline is kept alive until the VM::whenIdle callback is called
https://bugs.webkit.org/show_bug.cgi?id=187692

Reviewed by Ryosuke Niwa.

Ensure we keep the DocumentTimeline alive until the VM::whenIdle callback is called.

  • animation/DocumentTimeline.cpp:

(WebCore::DocumentTimeline::currentTime):

2:54 PM Changeset in webkit [234006] by commit-queue@webkit.org
  • 1 edit
    9 adds in trunk/PerformanceTests

Add benchmark for WebKit process launch times
https://bugs.webkit.org/show_bug.cgi?id=186414

Patch by Ben Richards <benton_richards@apple.com> on 2018-07-19
Reviewed by Ryosuke Niwa.

Added two benchmarks, one for measuring browser new tab launch time and one for browser startup time.

  • LaunchTime/.gitignore: Added.
  • LaunchTime/feedback_client.html: Added.

Displays benchmark progress in browser

  • LaunchTime/feedback_server.py: Added.

(FeedbackServer): Sends data to feedback_client via websocket
(FeedbackServer.init):
(FeedbackServer._create_app):
(FeedbackServer._start_server):
(FeedbackServer._send_all_messages):
(FeedbackServer.start):
(FeedbackServer.stop):
(FeedbackServer.send_message): Send a message to the feedback_client
(FeedbackServer.wait_until_client_has_loaded): Wait until the feedback_client has opened a websocket connection to the feedback_server
(FeedbackServer.MainHandler): Handler factory to create handler that serves feedback_client.html
(FeedbackServer.MainHandler.Handler):
(FeedbackServer.MainHandler.Handler.get):
(FeedbackServer.WSHandler): Handler factory to create handler that sends data to feedback client
(FeedbackServer.WSHandler.Handler):
(FeedbackServer.WSHandler.Handler.open): On websocket connection opened
(FeedbackServer.WSHandler.Handler.on_close): On websocket connection closed

  • LaunchTime/launch_time.py: Added.

(DefaultLaunchTimeHandler): Abstract HTTP request handler for launch time benchmarks
(DefaultLaunchTimeHandler.get_test_page): Default test page to be overridden by benchmarks
(DefaultLaunchTimeHandler.get_blank_page):
(DefaultLaunchTimeHandler.on_receive_stop_time):
(DefaultLaunchTimeHandler.do_HEAD):
(DefaultLaunchTimeHandler.do_GET):
(DefaultLaunchTimeHandler.do_POST):
(DefaultLaunchTimeHandler.log_message): Suppresses HTTP logs from SimpleHTTPRequestHandler
(LaunchTimeBenchmark): Abstract class which launch time benchmarks inherit from and override methods desired to customize
(LaunchTimeBenchmark.init):
(LaunchTimeBenchmark._parse_browser_bundle_path): Parser for bundle path option
(LaunchTimeBenchmark._parse_args):
(LaunchTimeBenchmark._run_server): Target function for main server thread
(LaunchTimeBenchmark._setup_servers):
(LaunchTimeBenchmark._clean_up):
(LaunchTimeBenchmark._exit_due_to_exception):
(LaunchTimeBenchmark._geometric_mean):
(LaunchTimeBenchmark._standard_deviation):
(LaunchTimeBenchmark._compute_results): Returns mean and std dev of list of results and pretty prints if should_print=True is specified
(LaunchTimeBenchmark._wait_times): Mimic numpy.linspace
(LaunchTimeBenchmark.open_tab): Open a browser tab with the html given by self.response_handler.get_test_page
(LaunchTimeBenchmark.launch_browser): Open a broser to either the feedback client (if option is set) or a blank page
(LaunchTimeBenchmark.quit_browser):
(LaunchTimeBenchmark.quit_browser.quit_app):
(LaunchTimeBenchmark.quit_browser.is_app_closed):
(LaunchTimeBenchmark.close_tab):
(LaunchTimeBenchmark.wait):
(LaunchTimeBenchmark.log): Print to console and send to feedback client if --feedback-in-browser flag is used
(LaunchTimeBenchmark.log_verbose): Only logs if --verbose flag is used
(LaunchTimeBenchmark.run):
(LaunchTimeBenchmark.group_init): Initialization done before each round of iterations
(LaunchTimeBenchmark.run_iteration):
(LaunchTimeBenchmark.initialize): Convenience method to be overriden by subclasses which is called at the end of init
(LaunchTimeBenchmark.will_parse_arguments): Called before argparse.parse_args to let subclasses add new command line arguments
(LaunchTimeBenchmark.did_parse_arguments): Called after argparse.parse_args to let subclass initialize based on command line arguments

  • LaunchTime/new_tab.py: Added

(NewTabBenchmark):
(NewTabBenchmark._parse_wait_time): Parser for wait time option
(NewTabBenchmark.initialize):
(NewTabBenchmark.run_iteration):
(NewTabBenchmark.group_init):
(NewTabBenchmark.will_parse_arguments):
(NewTabBenchmark.did_parse_arguments):
(NewTabBenchmark.ResponseHandler):
(NewTabBenchmark.ResponseHandler.Handler):
(NewTabBenchmark.ResponseHandler.Handler.get_test_page):

  • LaunchTime/startup.py: Added

(StartupBenchmark): This benchmark measures browser startup time and initial page load time
(StartupBenchmark.initialize):
(StartupBenchmark.run_iteration):
(StartupBenchmark.ResponseHandler):
(StartupBenchmark.ResponseHandler.Handler):
(StartupBenchmark.ResponseHandler.Handler.get_test_page):

  • LaunchTime/thirdparty/init.py: Added.

(AutoinstallImportHook): Auto installs tornado package for feedback server
(AutoinstallImportHook.init):
(AutoinstallImportHook._ensure_autoinstalled_dir_is_in_sys_path):
(AutoinstallImportHook.find_module):
(AutoinstallImportHook._install_tornado):
(AutoinstallImportHook.greater_than_equal_to_version):
(AutoinstallImportHook._install):
(AutoinstallImportHook.get_latest_pypi_url):
(AutoinstallImportHook.install_binary):
(autoinstall_everything):
(get_os_info):

2:18 PM Changeset in webkit [234005] by Simon Fraser
  • 10 edits
    10 adds in trunk

Setting foreground color when editing should take color-filter into account, and report the correct foreground color for collapsed selections
https://bugs.webkit.org/show_bug.cgi?id=187778

Reviewed by Ryosuke Niwa.
Source/WebCore:

Fix two aspects of editing with color-filter:

  1. When setting foreground color, inverse-transform the color through -apple-color-filter so that the user gets the color they chose when in Dark Mode. Tested by editing/style/exec-command-foreColor-with-color-filter.html.
  1. When retrieving the style of the collapsed selection, take color filter into account so that color picker reflects the color the users sees, instead of the content color. Tested by editing/mac/attributed-string/attributed-string-for-typing-with-color-filter.html

Add two additional tests that ensure that -apple-color-filter does not impact the NSAttributedString code
path, since -apple-color-filter should not affect the behavior of Copy.

Tests: editing/mac/attributed-string/attrib-string-colors-with-color-filter.html

editing/mac/attributed-string/attrib-string-range-with-color-filter.html
editing/mac/attributed-string/attributed-string-for-typing-with-color-filter.html
editing/style/exec-command-foreColor-with-color-filter.html

  • editing/EditingStyle.cpp:

(WebCore::StyleChange::StyleChange):
(WebCore::StyleChange::extractTextStyles):

  • editing/EditingStyle.h:
  • editing/cocoa/EditorCocoa.mm:

(WebCore::Editor::fontAttributesForSelectionStart const):

  • platform/graphics/filters/FilterOperation.cpp:

(WebCore::InvertLightnessFilterOperation::inverseTransformColor const):

  • platform/graphics/filters/FilterOperation.h:

(WebCore::FilterOperation::inverseTransformColor const):

  • platform/graphics/filters/FilterOperations.cpp:

(WebCore::FilterOperations::transformColor const):
(WebCore::FilterOperations::inverseTransformColor const):

  • platform/graphics/filters/FilterOperations.h:

LayoutTests:

  • editing/mac/attributed-string/attrib-string-colors-with-color-filter-expected.txt: Added.
  • editing/mac/attributed-string/attrib-string-colors-with-color-filter.html: Added.
  • editing/mac/attributed-string/attrib-string-range-with-color-filter-expected.txt: Added.
  • editing/mac/attributed-string/attrib-string-range-with-color-filter.html: Added.
  • editing/mac/attributed-string/attributed-string-for-typing-with-color-filter-expected.txt: Added.
  • editing/mac/attributed-string/attributed-string-for-typing-with-color-filter.html: Added.
  • editing/style/exec-command-foreColor-with-color-filter-expected.txt: Added.
  • editing/style/exec-command-foreColor-with-color-filter.html: Added.
2:05 PM Changeset in webkit [234004] by dino@apple.com
  • 3 edits in trunk/Tools

Provide an lldb type summary for WebCore::Color
https://bugs.webkit.org/show_bug.cgi?id=187776

Another attempted build fix for Debug.

  • lldb/lldbWebKitTester/Configurations/Base.xcconfig:
  • lldb/lldbWebKitTester/lldbWebKitTester.xcodeproj/project.pbxproj:
1:51 PM Changeset in webkit [234003] by david_fenton@apple.com
  • 6 edits in trunk/Source/WebCore

Unreviewed, rolling out r233994.

Caused EWS and bot failures due to assertions added

Reverted changeset:

"FetchResponse should close its stream when loading finishes"
https://bugs.webkit.org/show_bug.cgi?id=187790
https://trac.webkit.org/changeset/233994

1:48 PM Changeset in webkit [234002] by jer.noble@apple.com
  • 2 edits in trunk/Source/WebCore

REGRESSION(r233926): media/modern-media-controls/media-controller/media-controller-inline-to-fullscreen-to-pip-to-inline.html is a TIMEOUT failure
https://bugs.webkit.org/show_bug.cgi?id=187813

Reviewed by Jon Lee.

In r233926, we changed the behavior of entering PiP to exit fullscreen only after entering PiP completes. The
test in question will immediately request "inline" presentation mode once the PiP animation begins, and thus
it's asking to "exit fullscreen" when both in standard fullscreen and also in PiP. The fix is not to bail out
early if we're in standard (element) fullscreen, but to allow the remaining steps to complete and exit PiP as
well.

  • html/HTMLMediaElement.cpp:

(WebCore::HTMLMediaElement::exitFullscreen):

1:42 PM Changeset in webkit [234001] by commit-queue@webkit.org
  • 3 edits in trunk/Tools

[WHLSL] The interpreter doesn't support boolean short-circuiting
https://bugs.webkit.org/show_bug.cgi?id=187779

Patch by Thomas Denney <tdenney@apple.com> on 2018-07-19
Reviewed by Alex Christensen.

  • WebGPUShadingLanguageRI/Evaluator.js:

(Evaluator.prototype.visitLogicalExpression): RHS is only evaluated when necessary

  • WebGPUShadingLanguageRI/Test.js:

(tests.booleanShortcircuiting): Adds 4 tests for the evaluation of logical expresions

1:36 PM Changeset in webkit [234000] by Alan Bujtas
  • 3 edits
    9 adds in trunk/Source/WebCore

[LFC] Introduce simple line breaker.
https://bugs.webkit.org/show_bug.cgi?id=187688

Reviewed by Antti Koivisto.

This patch takes the simple line layout implementation and refactors it in a way it is no longer requires a RenderBlockFlow object to run on.
Also this patch decouples text run generation and line breaking (and this implementation is going to replace the current simple line layout codebase)

TextContentProvider: Acts both as the container for all the text content (including hard line breaks) and as an iterator for the generated text runs.
SimpleTextRunGenerator: TextContentProvider uses it as the text run generator for simple content (in the future we'll have a ComplexTextRunGenerator).
SimpleLineBreaker: Input -> text runs + line constraints; Output -> layout runs after line breaking.

  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • layout/inlineformatting/textlayout/ContentProvider.cpp: Added.

(WebCore::Layout::TextContentProvider::TextItem::Style::Style):
(WebCore::Layout::TextContentProvider::ContentProvider):
(WebCore::Layout::TextContentProvider::~ContentProvider):
(WebCore::Layout::TextContentProvider::appendText):
(WebCore::Layout::TextContentProvider::appendLineBreak):
(WebCore::Layout::TextContentProvider::width const):
(WebCore::Layout::TextContentProvider::textWidth const):
(WebCore::Layout::TextContentProvider::fixedPitchWidth const):
(WebCore::Layout::TextContentProvider::toTextItemIndex const):
(WebCore::Layout::TextContentProvider::length const):
(WebCore::Layout::TextContentProvider::iterator):
(WebCore::Layout::TextContentProvider::findNextRun):
(WebCore::Layout::TextContentProvider::current const):

  • layout/inlineformatting/textlayout/ContentProvider.h: Added.

(WebCore::Layout::TextContentProvider::textContent const):
(WebCore::Layout::TextContentProvider::hardLineBreaks const):
(WebCore::Layout::TextContentProvider::Iterator::current const):
(WebCore::Layout::TextContentProvider::contains const):
(WebCore::Layout::TextContentProvider::Iterator::Iterator):
(WebCore::Layout::TextContentProvider::Iterator::operator++):

  • layout/inlineformatting/textlayout/Runs.h: Added.

(WebCore::Layout::TextRun::isWhitespace const):
(WebCore::Layout::TextRun::isNonWhitespace const):
(WebCore::Layout::TextRun::isLineBreak const):
(WebCore::Layout::TextRun::isSoftLineBreak const):
(WebCore::Layout::TextRun::isHardLineBreak const):
(WebCore::Layout::TextRun::isValid const):
(WebCore::Layout::TextRun::isCollapsed const):
(WebCore::Layout::TextRun::type const):
(WebCore::Layout::TextRun::setIsCollapsed):
(WebCore::Layout::TextRun::setWidth):
(WebCore::Layout::LayoutRun::start const):
(WebCore::Layout::LayoutRun::end const):
(WebCore::Layout::LayoutRun::length const):
(WebCore::Layout::LayoutRun::left const):
(WebCore::Layout::LayoutRun::right const):
(WebCore::Layout::LayoutRun::width const):
(WebCore::Layout::LayoutRun::isEndOfLine const):
(WebCore::Layout::LayoutRun::setEnd):
(WebCore::Layout::LayoutRun::setRight):
(WebCore::Layout::LayoutRun::setIsEndOfLine):
(WebCore::Layout::LayoutRun::LayoutRun):
(WebCore::Layout::TextRun::createWhitespaceRun):
(WebCore::Layout::TextRun::createNonWhitespaceRun):
(WebCore::Layout::TextRun::createSoftLineBreakRun):
(WebCore::Layout::TextRun::createHardLineBreakRun):
(WebCore::Layout::TextRun::TextRun):
(WebCore::Layout::TextRun::start const):
(WebCore::Layout::TextRun::end const):
(WebCore::Layout::TextRun::length const):
(WebCore::Layout::TextRun::width const):

  • layout/inlineformatting/textlayout/simple/SimpleContentProvider.cpp: Added.

(WebCore::Layout::SimpleContentProvider::SimpleContentProvider):
(WebCore::Layout::SimpleContentProvider::current const):
(WebCore::Layout::SimpleContentProvider::reset):
(WebCore::Layout::SimpleContentProvider::findNextRun):
(WebCore::Layout::SimpleContentProvider::moveToNextBreakablePosition):
(WebCore::Layout::SimpleContentProvider::moveToNextNonWhitespacePosition):
(WebCore::Layout::SimpleContentProvider::isAtLineBreak const):
(WebCore::Layout::SimpleContentProvider::isAtSoftLineBreak const):

  • layout/inlineformatting/textlayout/simple/SimpleContentProvider.h: Added.

(WebCore::Layout::SimpleContentProvider::Iterator::reset):
(WebCore::Layout::SimpleContentProvider::Position::operator== const):
(WebCore::Layout::SimpleContentProvider::Position::operator< const):
(WebCore::Layout::SimpleContentProvider::Position::operator ContentPosition const):
(WebCore::Layout::SimpleContentProvider::Position::resetItemPosition):
(WebCore::Layout::SimpleContentProvider::Position::contentPosition const):
(WebCore::Layout::SimpleContentProvider::Position::itemPosition const):
(WebCore::Layout::SimpleContentProvider::Iterator<T>::Iterator):
(WebCore::Layout::SimpleContentProvider::Iterator<T>::current const):
(WebCore::Layout::SimpleContentProvider::Iterator<T>::operator):
(WebCore::Layout::SimpleContentProvider::Position::operator++):
(WebCore::Layout::SimpleContentProvider::Position::operator+=):

  • layout/inlineformatting/textlayout/simple/SimpleLineBreaker.cpp: Added.

(WebCore::Layout::SimpleLineBreaker::TextRunList::TextRunList):
(WebCore::Layout::SimpleLineBreaker::Line::Line):
(WebCore::Layout::adjustedEndPosition):
(WebCore::Layout::SimpleLineBreaker::Line::append):
(WebCore::Layout::SimpleLineBreaker::Line::collapseTrailingWhitespace):
(WebCore::Layout::SimpleLineBreaker::Line::reset):
(WebCore::Layout::SimpleLineBreaker::Style::Style):
(WebCore::Layout::SimpleLineBreaker::SimpleLineBreaker):
(WebCore::Layout::SimpleLineBreaker::runs):
(WebCore::Layout::SimpleLineBreaker::createRunsForLine):
(WebCore::Layout::SimpleLineBreaker::handleOverflownRun):
(WebCore::Layout::SimpleLineBreaker::collapseLeadingWhitespace):
(WebCore::Layout::SimpleLineBreaker::collapseTrailingWhitespace):
(WebCore::Layout::SimpleLineBreaker::splitTextRun):
(WebCore::Layout::SimpleLineBreaker::split const):
(WebCore::Layout::SimpleLineBreaker::availableWidth const):
(WebCore::Layout::SimpleLineBreaker::verticalPosition const):

  • layout/inlineformatting/textlayout/simple/SimpleLineBreaker.h: Added.

(WebCore::Layout::SimpleLineBreaker::TextRunList::overrideCurrent):
(WebCore::Layout::SimpleLineBreaker::TextRunList::isCurrentOverridden const):
(WebCore::Layout::SimpleLineBreaker::Line::availableWidth const):
(WebCore::Layout::SimpleLineBreaker::Line::hasContent const):
(WebCore::Layout::SimpleLineBreaker::Line::setAvailableWidth):
(WebCore::Layout::SimpleLineBreaker::Line::hasTrailingWhitespace const):
(WebCore::Layout::SimpleLineBreaker::Line::isWhitespaceOnly const):
(WebCore::Layout::SimpleLineBreaker::wrapContentOnOverflow const):
(WebCore::Layout::SimpleLineBreaker::TextRunList::current const):
(WebCore::Layout::SimpleLineBreaker::TextRunList::operator++):

12:43 PM Changeset in webkit [233999] by commit-queue@webkit.org
  • 2 edits in trunk/Source/JavaScriptCore

Unreviewed, rolling out r233998.
https://bugs.webkit.org/show_bug.cgi?id=187815

Not needed. (Requested by mlam|a on #webkit).

Reverted changeset:

"Temporarily mitigate a bug where a source provider is null
when it shouldn't be."
https://bugs.webkit.org/show_bug.cgi?id=187812
https://trac.webkit.org/changeset/233998

12:28 PM Changeset in webkit [233998] by mark.lam@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

Temporarily mitigate a bug where a source provider is null when it shouldn't be.
https://bugs.webkit.org/show_bug.cgi?id=187812
<rdar://problem/41192691>

Reviewed by Michael Saboff.

Adding a null check to temporarily mitigate https://bugs.webkit.org/show_bug.cgi?id=187811.

  • runtime/Error.cpp:

(JSC::addErrorInfo):

12:21 PM Changeset in webkit [233997] by bshafiei@apple.com
  • 2 edits in branches/safari-606-branch/Source/WebKit

Revert r233925. rdar://problem/42354959

12:21 PM Changeset in webkit [233996] by bshafiei@apple.com
  • 3 edits in branches/safari-606-branch/Source/WebCore

Revert r233982. rdar://problem/42389208

12:06 PM Changeset in webkit [233995] by Keith Rollin
  • 2 edits in trunk/Source/WebCore

Remove duplicate compilation of WebKitNSImageExtras.mm
https://bugs.webkit.org/show_bug.cgi?id=187782

Reviewed by Alex Christensen.

WebKitNSImageExtras.mm gets compiled twice, once because it's in
WebCore.xcodeproj/project.pbxproj and once because it's in
Webcore/SourcesCocoa.txt. This can lead to duplicate definition
errors, particularly when building with LTO enabled. Fix this by
removing the entry from the Xcode project.

No new tests -- no change in WebKit functionality.

  • WebCore.xcodeproj/project.pbxproj:
11:32 AM Changeset in webkit [233994] by youenn@apple.com
  • 6 edits in trunk/Source/WebCore

FetchResponse should close its stream when loading finishes
https://bugs.webkit.org/show_bug.cgi?id=187790

Reviewed by Chris Dumez.

It simplifies for a FetchResponse to push all its data into its stream if already created at end of load time.
Did some refactoring in FetchBodyOwner to have a cleaner relationship with the stream source.
Did a minor refactoring to expose the error description when loading fails as part of the rejected promise.
This is consistent to errors sent back through callbacks.

Covered by existing tests.

  • Modules/fetch/FetchBodyOwner.cpp:

(WebCore::FetchBodyOwner::~FetchBodyOwner):

  • Modules/fetch/FetchBodyOwner.h:
  • Modules/fetch/FetchBodySource.cpp:

(WebCore::FetchBodySource::FetchBodySource):
(WebCore::FetchBodySource::setActive):
(WebCore::FetchBodySource::setInactive):
(WebCore::FetchBodySource::doStart):
(WebCore::FetchBodySource::doPull):
(WebCore::FetchBodySource::doCancel):
(WebCore::FetchBodySource::cleanBodyOwner):

  • Modules/fetch/FetchBodySource.h:
  • Modules/fetch/FetchResponse.cpp:

(WebCore::FetchResponse::BodyLoader::didSucceed):
(WebCore::FetchResponse::BodyLoader::didFail):

11:07 AM Changeset in webkit [233993] by Truitt Savell
  • 2 edits in trunk/LayoutTests

[ win-ews ] http/tests/preload/onload_event.html is flakey crash on win-ews
https://bugs.webkit.org/show_bug.cgi?id=187809

Unreviewed test gardening.

  • platform/win/TestExpectations:
10:45 AM Changeset in webkit [233992] by jonlee@apple.com
  • 4 edits in trunk/Source

Update iOS fullscreen alert text again
https://bugs.webkit.org/show_bug.cgi?id=187797
rdar://problem/42373783

Reviewed by Jer Noble.

Source/WebCore:

  • English.lproj/Localizable.strings:

Source/WebKit:

  • UIProcess/ios/fullscreen/WKFullScreenViewController.mm:

(-[WKFullScreenViewController _showPhishingAlert]):

10:45 AM Changeset in webkit [233991] by bshafiei@apple.com
  • 3 edits in branches/safari-606-branch/Source/WebCore

Cherry-pick r233982. rdar://problem/42389208

Hitting RELEASE_ASSERT(!m_activeDOMObjectAdditionForbidden) under HTMLMediaElement::resume()
https://bugs.webkit.org/show_bug.cgi?id=187793
<rdar://problem/42308469>

Patch by Antoine Quint <Antoine Quint> on 2018-07-19
Reviewed by Chris Dumez.

Ensure we do not call JS under resume(), which would happen as a result of calling configureMediaControls() in prepareForLoad().

  • html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::~HTMLMediaElement): (WebCore::HTMLMediaElement::contextDestroyed): (WebCore::HTMLMediaElement::stop): (WebCore::HTMLMediaElement::suspend): (WebCore::HTMLMediaElement::resume):
  • html/HTMLMediaElement.h:

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

10:43 AM Changeset in webkit [233990] by Keith Rollin
  • 12 edits in trunk/Source

Adjust WEBCORE_EXPORT annotations for LTO
https://bugs.webkit.org/show_bug.cgi?id=187781
<rdar://problem/42351124>

Reviewed by Alex Christensen.

Continuation of Bug 186944. This bug addresses issues not caught
during the first pass of adjustments. The initial work focussed on
macOS; this one addresses issues found when building for iOS. From
186944:

Adjust a number of places that result in WebKit's
'check-for-weak-vtables-and-externals' script reporting weak external
symbols:

ERROR: WebCore has a weak external symbol in it (/Volumes/Data/dev/webkit/OpenSource/WebKitBuild/Release/WebCore.framework/Versions/A/WebCore)
ERROR: A weak external symbol is generated when a symbol is defined in multiple compilation units and is also marked as being exported from the library.
ERROR: A common cause of weak external symbols is when an inline function is listed in the linker export file.
...

These cases are caused by inline methods being marked with WTF_EXPORT
(or related macro) or with an inline function being in a class marked
as such, and when enabling LTO builds.

For the most part, address these by removing the WEBCORE_EXPORT
annotation from inline methods. In some cases, move the implementation
out-of-line because it's the class that has the WEBCORE_EXPORT on it
and removing the annotation from the class would be too disruptive.
Finally, in other cases, move the implementation out-of-line because
check-for-weak-vtables-and-externals still complains when keeping the
implementation inline and removing the annotation; this seems to
typically (but not always) happen with destructors.

Source/JavaScriptCore:

  • inspector/remote/RemoteAutomationTarget.cpp:

(Inspector::RemoteAutomationTarget::~RemoteAutomationTarget):

  • inspector/remote/RemoteAutomationTarget.h:
  • inspector/remote/RemoteInspector.cpp:

(Inspector::RemoteInspector::Client::~Client):

  • inspector/remote/RemoteInspector.h:

Source/WebCore:

No new tests. There is no changed functionality. Only the annotation
and treatment of inline methods are altered.

  • platform/graphics/FourCC.h:

(WebCore::FourCC::FourCC):

  • platform/graphics/IntPoint.h:

(WebCore::IntPoint::IntPoint):

  • platform/mediastream/RealtimeMediaSource.cpp:

(WebCore::RealtimeMediaSource::Observer::~Observer):
(WebCore::RealtimeMediaSource::AudioCaptureFactory::~AudioCaptureFactory):
(WebCore::RealtimeMediaSource::VideoCaptureFactory::~VideoCaptureFactory):

  • platform/mediastream/RealtimeMediaSource.h:
  • workers/service/ServiceWorkerProvider.cpp:

(WebCore::ServiceWorkerProvider::~ServiceWorkerProvider):

  • workers/service/ServiceWorkerProvider.h:
10:37 AM Changeset in webkit [233989] by Nikita Vasilyev
  • 3 edits in trunk/Source/WebInspectorUI

Web Inspector: Dark Mode: poor contrast for Search Tab's "the page's content has changed" message
https://bugs.webkit.org/show_bug.cgi?id=187792

Reviewed by Brian Burg.

  • UserInterface/Views/DarkMode.css:

(@media (prefers-dark-interface)):
(:root):
Make the background color slightly more yellow and less red. This slightly dicreases the contrast
but makes the text look less like an error.

  • UserInterface/Views/SearchSidebarPanel.css:

(@media (prefers-dark-interface)):
(.sidebar > .panel.navigation.search.changed > .banner):

10:07 AM Changeset in webkit [233988] by dino@apple.com
  • 2 edits in trunk/Tools

Provide an lldb type summary for WebCore::Color
https://bugs.webkit.org/show_bug.cgi?id=187776

Attempted build fix.

  • lldb/lldbWebKitTester/Configurations/Base.xcconfig:
10:06 AM Changeset in webkit [233987] by Yusuke Suzuki
  • 2 edits in trunk/Source/JavaScriptCore

Unreviewed, check scope after performing getPropertySlot in JSON.stringify
https://bugs.webkit.org/show_bug.cgi?id=187807

Properly putting EXCEPTION_ASSERT to tell our exception checker mechanism
that we know that exception occurrence and handle it well.

  • runtime/JSONObject.cpp:

(JSC::Stringifier::Holder::appendNextProperty):

9:56 AM Changeset in webkit [233986] by beidson@apple.com
  • 11 edits in trunk

Add an SPI policy action to allow clients to explicitly ask for a new process on a navigation.
https://bugs.webkit.org/show_bug.cgi?id=187789

Reviewed by Andy Estes.

Source/WebKit:

At navigation policy time, when a client says "use/allow", they can now say "use/allow in a new process if possible"

  • UIProcess/API/C/WKFramePolicyListener.cpp:

(WKFramePolicyListenerUseInNewProcess):
(WKFramePolicyListenerUseInNewProcessWithPolicies):

  • UIProcess/API/C/WKFramePolicyListener.h:
  • UIProcess/API/Cocoa/WKNavigationDelegatePrivate.h:
  • UIProcess/Cocoa/NavigationState.mm:

(WebKit::NavigationState::NavigationClient::decidePolicyForNavigationAction):

  • UIProcess/WebFrameListenerProxy.h:

(WebKit::WebFrameListenerProxy::setApplyPolicyInNewProcessIfPossible):
(WebKit::WebFrameListenerProxy::applyPolicyInNewProcessIfPossible const):

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::receivedPolicyDecision):

  • UIProcess/WebProcessPool.cpp:

(WebKit::WebProcessPool::processForNavigation):
(WebKit::WebProcessPool::processForNavigationInternal):

  • UIProcess/WebProcessPool.h:

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:

(-[PSONNavigationDelegate init]):
(-[PSONNavigationDelegate webView:decidePolicyForNavigationAction:decisionHandler:]):

9:53 AM Changeset in webkit [233985] by Ryan Haddad
  • 2 edits in branches/safari-606-branch/LayoutTests

Cherry-pick r233938. rdar://problem/42387347

Rebaseline fast/css/apple-system-colors.html.

Unreviewed test gardening.

  • platform/mac/fast/css/apple-system-colors-expected.txt:

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

7:51 AM Changeset in webkit [233984] by cturner@igalia.com
  • 2 edits in trunk/Source/WebCore

[GStreamer] Return a valid time values in unprerolled states
https://bugs.webkit.org/show_bug.cgi?id=187111

Reviewed by Xabier Rodriguez-Calvar.

After r230584 in bug 180253, asserts were added in
PlatformTimeRanges::add to check that both ends of the range were
valid times. In the non-MSE GStreamer player, this assert was
firing on https://www.w3.org/2010/05/video/mediaevents.html due to
seekable being called in nonprerolled states. In this case
MediaPlayerPrivateInterface::seekable was calling GStreamer's
maxTimeSeekable, which calls in durationMediaTime. The guard
against calling gst_element_query_duration when not prerolled was
returning a different time value than when the duration query
itself failed. Hence the assert firing.

  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:

(WebCore::MediaPlayerPrivateGStreamer::durationMediaTime const):

7:39 AM Changeset in webkit [233983] by youenn@apple.com
  • 10 edits in trunk/Source/WebKit

Ensure experimentalPlugInSandboxProfilesEnabled is set on PluginProcess
https://bugs.webkit.org/show_bug.cgi?id=187729

Reviewed by Ryosuke Niwa.

experimentalPlugInSandboxProfilesEnabled flag is used at initialization of the plugin process sandbox.
This flag value should be set according to the value of this flag in the UIProcess.
We set this value in the plugin process manager.
At launch of the plugin process, this flag will also be passed to it so that it is set properly.

  • PluginProcess/EntryPoint/mac/XPCService/PluginServiceEntryPoint.mm:

(WebKit::PluginServiceInitializerDelegate::getExtraInitializationData):

  • PluginProcess/mac/PluginProcessMac.mm:

(WebKit::PluginProcess::platformInitializeProcess):

  • Shared/EntryPointUtilities/mac/XPCService/XPCServiceEntryPoint.h:
  • UIProcess/API/C/WKPreferences.cpp:

(WKPreferencesSetPluginSandboxProfilesEnabledForAllPlugins):
(WKPreferencesGetPluginSandboxProfilesEnabledForAllPlugins):

  • UIProcess/API/C/WKPreferencesRefPrivate.h:
  • UIProcess/API/Cocoa/WKPreferences.mm:

(-[WKPreferences _setExperimentalPlugInSandboxProfilesEnabled:]):
(-[WKPreferences _experimentalPlugInSandboxProfilesEnabled]):

  • UIProcess/API/Cocoa/WKPreferencesPrivate.h:
  • UIProcess/Plugins/PluginProcessManager.h:

(WebKit::PluginProcessManager::experimentalPlugInSandboxProfilesEnabled const):

  • UIProcess/Plugins/mac/PluginProcessManagerMac.mm:

(WebKit::PluginProcessManager::setExperimentalPlugInSandboxProfilesEnabled):

  • UIProcess/Plugins/mac/PluginProcessProxyMac.mm:

(WebKit::PluginProcessProxy::platformGetLaunchOptions):

6:38 AM Changeset in webkit [233982] by commit-queue@webkit.org
  • 3 edits in trunk/Source/WebCore

Hitting RELEASE_ASSERT(!m_activeDOMObjectAdditionForbidden) under HTMLMediaElement::resume()
https://bugs.webkit.org/show_bug.cgi?id=187793
<rdar://problem/42308469>

Patch by Antoine Quint <Antoine Quint> on 2018-07-19
Reviewed by Chris Dumez.

Ensure we do not call JS under resume(), which would happen as a result of calling configureMediaControls() in prepareForLoad().

  • html/HTMLMediaElement.cpp:

(WebCore::HTMLMediaElement::~HTMLMediaElement):
(WebCore::HTMLMediaElement::contextDestroyed):
(WebCore::HTMLMediaElement::stop):
(WebCore::HTMLMediaElement::suspend):
(WebCore::HTMLMediaElement::resume):

  • html/HTMLMediaElement.h:
5:53 AM Changeset in webkit [233981] by Philippe Normand
  • 2 edits in trunk/Source/WebCore

[GStreamer][MSE] imported/w3c/web-platform-tests/media-source/mediasource-is-type-supported.html crashes
https://bugs.webkit.org/show_bug.cgi?id=187469

Reviewed by Žan Doberšek.

  • platform/graphics/gstreamer/mse/WebKitMediaSourceGStreamer.cpp:

(webKitMediaSrcFreeStream): Fix critical warning. The appsrc
element is created only when a valid sourcebuffer is in use.

3:19 AM Changeset in webkit [233980] by commit-queue@webkit.org
  • 3 edits
    2 adds in trunk

Fix message of NotSupportedError exception thrown during custom element creation
https://bugs.webkit.org/show_bug.cgi?id=187757

Patch by Frederic Wang <fwang@igalia.com> on 2018-07-19
Reviewed by Yusuke Suzuki.

Source/WebCore:

In bug 161528, some new exceptions were introduced for custom element creation [1] but the
actual text has some issues. This patch fixes one typo and one wrong message.

[1] https://dom.spec.whatwg.org/#concept-create-element

Test: fast/custom-elements/exceptions-for-synchronous-custom-element-creation.html

  • bindings/js/JSCustomElementInterface.cpp:

(WebCore::constructCustomElementSynchronously):

LayoutTests:

  • fast/custom-elements/exceptions-for-synchronous-custom-element-creation-expected.txt: Added.
  • fast/custom-elements/exceptions-for-synchronous-custom-element-creation.html: Added.
1:24 AM Changeset in webkit [233979] by commit-queue@webkit.org
  • 2 edits in trunk/Tools

[Flatpak] Let flatpak process handle SIGINT
https://bugs.webkit.org/show_bug.cgi?id=187521

Patch by Thibault Saunier <tsaunier@igalia.com> on 2018-07-19
Reviewed by Philippe Normand.

Ensuring that flatpak process ends properly and that the sandbox is teard down.
It also avoids showing usless backtrace to the end user and makes gdb
much more usable.

Also make flatpakutils not verbose by default

  • flatpak/flatpakutils.py:

(disable_signals):
(WebkitFlatpak.run_in_sandbox):
(WebkitFlatpak.run_gdb):

Jul 18, 2018:

10:40 PM Changeset in webkit [233978] by bshafiei@apple.com
  • 13 edits
    1 add in branches/safari-606-branch

Cherry-pick r233915. rdar://problem/42345407

Add SPI to defer running async script until after document load
https://bugs.webkit.org/show_bug.cgi?id=187748
<rdar://problem/42317378>

Reviewed by Ryosuke Niwa and Tim Horton.

Source/WebCore:

On watchOS, we currently observe that time-consuming async scripts can block the first paint of Reader, leaving
the user with a blank screen for tens of seconds. One way to mitigate this is to defer async script execution
until after document load (i.e. the same timing as DOMContentLoaded).

This patch introduces an SPI configuration allowing internal clients to defer execution of asynchronous script
until after document load; this, in combination with the parser yielding token introduced in r233891, allows
Safari on watchOS to avoid being blocked on slow script execution before the first paint of the Reader page on
most article-like pages. See below for more details.

Test: RunScriptAfterDocumentLoad.ExecutionOrderOfScriptsInDocument

  • dom/Document.cpp: (WebCore::Document::shouldDeferAsynchronousScriptsUntilParsingFinishes const): (WebCore::Document::finishedParsing):

Notify ScriptRunner when the Document has finished parsing, and is about to fire DOMContentLoaded.

  • dom/Document.h:
  • dom/ScriptRunner.cpp: (WebCore::ScriptRunner::documentFinishedParsing):

When the document is finished parsing, kick off the script execution timer if needed to run any async script
that has been deferred.

(WebCore::ScriptRunner::notifyFinished):
(WebCore::ScriptRunner::timerFired):

Instead of always taking from the list of async scripts to execute, check our document to see whether we should
defer this until after document load. If so, ignore m_scriptsToExecuteSoon.

  • dom/ScriptRunner.h:
  • page/Settings.yaml:

Add a WebCore setting for this behavior.

Source/WebKit:

Add plumbing for a new ShouldDeferAsynchronousScriptsUntilAfterDocumentLoad configuration that determines
whether async script execution should be deferred until document load (i.e. DOMContentLoaded). This
configuration defaults to NO on all platforms. See WebCore ChangeLog for more detail.

  • Shared/WebPreferences.yaml:
  • UIProcess/API/Cocoa/WKWebView.mm: (-[WKWebView _initializeWithConfiguration:]):
  • UIProcess/API/Cocoa/WKWebViewConfiguration.mm: (-[WKWebViewConfiguration init]): (-[WKWebViewConfiguration copyWithZone:]): (-[WKWebViewConfiguration _shouldDeferAsynchronousScriptsUntilAfterDocumentLoad]): (-[WKWebViewConfiguration _setShouldDeferAsynchronousScriptsUntilAfterDocumentLoad:]):
  • UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h:

Tools:

Add an API test to verify that when the deferred async script configuration is set, async scripts will be
executed after the DOMContentLoaded event.

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WebKitCocoa/RunScriptAfterDocumentLoad.mm: Added. (TEST):

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

10:40 PM Changeset in webkit [233977] by bshafiei@apple.com
  • 15 edits
    3 copies
    4 adds in branches/safari-606-branch

Cherry-pick r233891. rdar://problem/42345327

Add an SPI hook to allow clients to yield document parsing and script execution
https://bugs.webkit.org/show_bug.cgi?id=187682
<rdar://problem/42207453>

Reviewed by Ryosuke Niwa.

Source/WebCore:

Using a single web process for both the Reader page and original web page on watchOS has multiple benefits,
including: (1) allowing the user to bail out of Reader and view the original web page without having to load it
again, and (2) improving the bringup time of the Reader page, since subresources are already cached in process
and we don't eat the additional cost of a web process launch if prewarming fails.

However, this has some drawbacks as well, one of which is that main thread work being done on behalf of the
original page may contend with work being done to load and render the Reader page. This is especially bad when
the page is in the middle of executing heavy script after Safari has already detected that the Reader version of
the page is available, but before it has finished loading the Reader page. The result is that script on the
original page may block the first paint of the Reader page (on New York Times articles, this often leads to an
apparent page load time of 25-35 seconds before the user sees anything besides a blank screen).

To mitigate this, we introduce a way for injected bundle clients to yield parsing and async script execution on
a document. This capability is surfaced in the form of an opaque token which clients may request from a
WKDOMDocument. Construction of the token causes the document to begin yielding and defer execution of previously
scheduled scripts, only if there were no active tokens on the document already. Similarly, destruction of all
active tokens on the document causes it to stop yielding and resume execution of scripts if needed.

Tests: ParserYieldTokenTests.PreventDocumentLoadByTakingParserYieldToken

ParserYieldTokenTests.TakeMultipleParserYieldTokens
ParserYieldTokenTests.DeferredScriptExecutesBeforeDocumentLoadWhenTakingParserYieldToken
ParserYieldTokenTests.AsyncScriptRunsWhenFetched

  • dom/Document.cpp: (WebCore::Document::implicitOpen):

If the parser yield token was taken before the document's parser was created, tell the parser's scheduler to
start yielding immediately after creation.

(WebCore::DocumentParserYieldToken::DocumentParserYieldToken):
(WebCore::DocumentParserYieldToken::~DocumentParserYieldToken):

  • dom/Document.h:

Introduce a parser yield count to Document; as long as this count is greater than 0, we consider the Document to
have active yield tokens. When constructing or destroying a ParserYieldToken, we increment and decrement the
parser yield count (respectively).

(WebCore::Document::createParserYieldToken):
(WebCore::Document::hasActiveParserYieldToken const):

  • dom/DocumentParser.h: (WebCore::DocumentParser::didBeginYieldingParser): (WebCore::DocumentParser::didEndYieldingParser):

Hooks for Document to tell its parser that we've started or finished yielding. This updates a flag on the
parser's scheduler which is consulted when we determine whether to yield before a pumping token or executing
script.

  • dom/ScriptRunner.cpp: (WebCore::ScriptRunner::resume): (WebCore::ScriptRunner::notifyFinished):
  • dom/ScriptRunner.h: (WebCore::ScriptRunner::didBeginYieldingParser): (WebCore::ScriptRunner::didEndYieldingParser):

Hooks for Document to tell its ScriptRunner that we've started or finished yielding. These wrap calls to suspend
and resume.

  • html/parser/HTMLDocumentParser.cpp: (WebCore::HTMLDocumentParser::didBeginYieldingParser): (WebCore::HTMLDocumentParser::didEndYieldingParser):

Plumb to didBegin/didEnd calls to the HTMLParserScheduler.

  • html/parser/HTMLDocumentParser.h:
  • html/parser/HTMLParserScheduler.cpp: (WebCore::HTMLParserScheduler::shouldYieldBeforeExecutingScript):
  • html/parser/HTMLParserScheduler.h: (WebCore::HTMLParserScheduler::shouldYieldBeforeToken):

Consult a flag when determining whether to yield. This flag is set to true only while the document has an active
parser yield token.

(WebCore::HTMLParserScheduler::isScheduledForResume const):

Consider the parser scheduler to be scheduled for resume if there are active tokens. Without this change, we
incorrectly consider the document to be finished loading when we have yield tokens, since it appears that the
parser is no longer scheduled to pump its tokenizer.

(WebCore::HTMLParserScheduler::didBeginYieldingParser):
(WebCore::HTMLParserScheduler::didEndYieldingParser):

When the Document begins yielding due to the documet having active tokens or ends yielding after the document
loses all of its yield tokens, update a flag on the parser scheduler. After we finish yielding, additionally
reschedule the parser if needed to ensure that we continue parsing the document; without this additional change
to resume, we'll never get the document load or load events after relinquishing the yield token.

Source/WebKit:

Add hooks to WKDOMDocument to create and return an internal WKDOMDocumentParserYieldToken object, whose lifetime
is tied to a document parser yield token. See WebCore ChangeLog for more detail.

  • WebProcess/InjectedBundle/API/mac/WKDOMDocument.h:
  • WebProcess/InjectedBundle/API/mac/WKDOMDocument.mm: (-[WKDOMDocumentParserYieldToken initWithDocument:]): (-[WKDOMDocument parserYieldToken]):

Tools:

Add a few tests to exercise the new document yield token SPI, verifying that clients can use the SPI to defer
document load, and that doing so doesn't cause deferred script to execute in the wrong order (i.e. before
synchronous script, or after "DOMContentLoaded").

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WebKitCocoa/ParserYieldTokenPlugIn.mm: Added. (-[ParserYieldTokenPlugIn takeDocumentParserTokenAfterCommittingLoad]): (-[ParserYieldTokenPlugIn releaseDocumentParserToken]): (-[ParserYieldTokenPlugIn webProcessPlugInBrowserContextController:didCommitLoadForFrame:]): (-[ParserYieldTokenPlugIn webProcessPlugIn:didCreateBrowserContextController:]): (-[ParserYieldTokenPlugIn webProcessPlugInBrowserContextController:didFinishDocumentLoadForFrame:]): (-[ParserYieldTokenPlugIn webProcessPlugInBrowserContextController:didFinishLoadForFrame:]):

Add an injected bundle object that knows how to take and release multiple document parser yield tokens.

  • TestWebKitAPI/Tests/WebKitCocoa/ParserYieldTokenTests.h: Added.
  • TestWebKitAPI/Tests/WebKitCocoa/ParserYieldTokenTests.mm: Added. (+[ParserYieldTokenTestWebView webView]): (-[ParserYieldTokenTestWebView bundle]): (-[ParserYieldTokenTestWebView schemeHandler]): (-[ParserYieldTokenTestWebView didFinishDocumentLoad]): (-[ParserYieldTokenTestWebView didFinishLoad]): (waitForDelay): (TEST):
  • TestWebKitAPI/Tests/WebKitCocoa/TestURLSchemeHandler.h: Added.
  • TestWebKitAPI/Tests/WebKitCocoa/TestURLSchemeHandler.mm: Added. (-[TestURLSchemeHandler webView:startURLSchemeTask:]): (-[TestURLSchemeHandler webView:stopURLSchemeTask:]): (-[TestURLSchemeHandler setStartURLSchemeTaskHandler:]): (-[TestURLSchemeHandler startURLSchemeTaskHandler]): (-[TestURLSchemeHandler setStopURLSchemeTaskHandler:]): (-[TestURLSchemeHandler stopURLSchemeTaskHandler]):

Add a new test helper class to handle custom schemes via a block-based API.

  • TestWebKitAPI/Tests/WebKitCocoa/text-with-async-script.html: Added.

New test HTML page that contains a deferred script element, a synchronous script element, another deferred
script element, and then some text, images, and links.

  • TestWebKitAPI/Tests/WebKitCocoa/text-with-deferred-script.html: Added.

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

7:01 PM Changeset in webkit [233976] by bshafiei@apple.com
  • 2 edits in branches/safari-606-branch/Source/WebKit

Cherry-pick r233940. rdar://problem/42359640

CRASH at WebKit: WebKit::WebFullScreenManagerProxy::saveScrollPosition
https://bugs.webkit.org/show_bug.cgi?id=187769
<rdar://problem/42160666>

Reviewed by Tim Horton.

Null-check all uses of _page and _manager in WKFullScreenWindowControllerIOS.

  • UIProcess/ios/fullscreen/WKFullScreenWindowControllerIOS.mm: (WebKit::WKWebViewState::applyTo): (WebKit::WKWebViewState::store): (-[WKFullScreenWindowController enterFullScreen]): (-[WKFullScreenWindowController beganExitFullScreenWithInitialFrame:finalFrame:]): (-[WKFullScreenWindowController _completedExitFullScreen]):

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

7:01 PM Changeset in webkit [233975] by bshafiei@apple.com
  • 2 edits in branches/safari-606-branch/Source/WebKit

Cherry-pick r233939. rdar://problem/42359636

WebContent crash in WebProcess::ensureNetworkProcessConnection
https://bugs.webkit.org/show_bug.cgi?id=187791
<rdar://problem/41995022>

Reviewed by Ryosuke Niwa.

If the WebProcessProxy::GetNetworkProcessConnection synchronous IPC between the WebProcess
and the UIProcess succeeded but we received an invalid connection identifier, then try
once more. This may indicate the network process has crashed, in which case it will be
relaunched.

  • WebProcess/WebProcess.cpp: (WebKit::getNetworkProcessConnection): (WebKit::WebProcess::ensureNetworkProcessConnection):

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

7:01 PM Changeset in webkit [233974] by bshafiei@apple.com
  • 2 edits in branches/safari-606-branch/Source/WebCore

Cherry-pick r233936. rdar://problem/42354941

Unreviewed API Test fix; restored a line inadventantly removed in r233926.

  • platform/mac/VideoFullscreenInterfaceMac.mm: (-[WebVideoFullscreenInterfaceMacObjC pipDidClose:]):

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

7:01 PM Changeset in webkit [233973] by bshafiei@apple.com
  • 7 edits in branches/safari-606-branch/Source

Cherry-pick r233932. rdar://problem/42353789

The WebContent process does not suspend when MiniBrowser is minimized.
https://bugs.webkit.org/show_bug.cgi?id=187708

Reviewed by Chris Dumez.

Source/WebCore/PAL:

Add function for enabling App nap.

  • pal/spi/cf/CFUtilitiesSPI.h:

Source/WebKit:

Using the NSRunLoop runloop type prevents the WebContent process from suspending. Instead, use the new
_WebKit runloop type. Also do not leak a boost to the WebContent process, since this also prevents the
WebContent process from going to sleep. Calling SetApplicationIsDaemon prevents the WebContent process
from being assigned the application process priority level. To block WindowServer connections, call
CGSSetDenyWindowServerConnections(true) instead. Finally, App nap must be manually enabled, since the
WebContent process is no longer a NSApplication.

  • Configurations/WebContentService.xcconfig:
  • UIProcess/Launcher/mac/ProcessLauncherMac.mm: (WebKit::shouldLeakBoost):
  • WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::updateThrottleState):
  • WebProcess/cocoa/WebProcessCocoa.mm: (WebKit::WebProcess::platformInitializeProcess):

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

7:01 PM Changeset in webkit [233972] by bshafiei@apple.com
  • 2 edits in branches/safari-606-branch/Source/WebCore

Cherry-pick r233930. rdar://problem/42354941

Unreviewed build fix after r233926; BOOL !== bool.

  • platform/ios/VideoFullscreenInterfaceAVKit.mm: (VideoFullscreenInterfaceAVKit::pictureInPictureWasStartedWhenEnteringBackground const):

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

7:01 PM Changeset in webkit [233971] by bshafiei@apple.com
  • 4 edits in branches/safari-606-branch

Cherry-pick r233927. rdar://problem/42354954

-_beginAnimatedResizeWithUpdates: can leave view in bad state if called during an existing animation
https://bugs.webkit.org/show_bug.cgi?id=187739
Source/WebKit:

Reviewed by Tim Horton.

It's not enough to reset _dynamicViewportUpdateMode to NotResizing; other parts of the code
check whether _resizeAnimationView is non-nil, the contentView may be hidden, etc. Add a new
internal method _cancelAnimatedResize that cleans up state when a call to
_beginAnimatedResizeWithUpdates: fails.

  • UIProcess/API/Cocoa/WKWebView.mm: (-[WKWebView _processDidExit]): (-[WKWebView _cancelAnimatedResize]): (-[WKWebView _didCompleteAnimatedResize]): (-[WKWebView _beginAnimatedResizeWithUpdates:]):

Tools:

<rdar://problem/42304518>

Reviewed by Tim Horton.

  • TestWebKitAPI/Tests/WebKitCocoa/AnimatedResize.mm: (TEST):

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

7:01 PM Changeset in webkit [233970] by bshafiei@apple.com
  • 25 edits
    2 adds
    4 deletes in branches/safari-606-branch

Cherry-pick r233926. rdar://problem/42354941

PiP from Element Fullscreen should match AVKit's behavior
https://bugs.webkit.org/show_bug.cgi?id=187623
Source/WebCore:

Reviewed by Jon Lee.

PiP behavior should be defined at the WebKit2 level, and not in HTMLMediaElement:

  • html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::enterFullscreen):

Add an accessor for pictureInPictureWasStartedWhenEnteringBackground():

  • platform/cocoa/VideoFullscreenModelVideoElement.mm: (VideoFullscreenInterfaceAVKit::pictureInPictureWasStartedWhenEnteringBackground const):

Add VideoFullscreenModelClient virutal methods for PiP change notifications:

  • platform/cocoa/VideoFullscreenModel.h: (WebCore::VideoFullscreenModelClient::hasVideoChanged): (WebCore::VideoFullscreenModelClient::videoDimensionsChanged): (WebCore::VideoFullscreenModelClient::willEnterPictureInPicture): (WebCore::VideoFullscreenModelClient::didEnterPictureInPicture): (WebCore::VideoFullscreenModelClient::failedToEnterPictureInPicture): (WebCore::VideoFullscreenModelClient::willExitPictureInPicture): (WebCore::VideoFullscreenModelClient::didExitPictureInPicture): (WebCore::VideoFullscreenModelClient::failedToExitPictureInPicture):
  • platform/cocoa/VideoFullscreenModelVideoElement.h:
  • platform/cocoa/VideoFullscreenModelVideoElement.mm: (VideoFullscreenModelVideoElement::willEnterPictureInPicture): (VideoFullscreenModelVideoElement::didEnterPictureInPicture): (VideoFullscreenModelVideoElement::failedToEnterPictureInPicture): (VideoFullscreenModelVideoElement::willExitPictureInPicture): (VideoFullscreenModelVideoElement::didExitPictureInPicture): (VideoFullscreenModelVideoElement::failedToExitPictureInPicture):
  • platform/ios/VideoFullscreenInterfaceAVKit.h:
  • platform/ios/VideoFullscreenInterfaceAVKit.mm: (-[WebAVPlayerLayer layoutSublayers]): (-[WebAVPlayerLayer resolveBounds]): (-[WebAVPlayerLayer setVideoGravity:]): (VideoFullscreenInterfaceAVKit::setupFullscreen): (VideoFullscreenInterfaceAVKit::presentingViewController): (VideoFullscreenInterfaceAVKit::willStartPictureInPicture): (VideoFullscreenInterfaceAVKit::didStartPictureInPicture): (VideoFullscreenInterfaceAVKit::failedToStartPictureInPicture): (VideoFullscreenInterfaceAVKit::willStopPictureInPicture): (VideoFullscreenInterfaceAVKit::didStopPictureInPicture): (VideoFullscreenInterfaceAVKit::shouldExitFullscreenWithReason): (VideoFullscreenInterfaceAVKit::doSetup):
  • platform/ios/WebVideoFullscreenControllerAVKit.mm: (VideoFullscreenControllerContext::willEnterPictureInPicture): (VideoFullscreenControllerContext::didEnterPictureInPicture): (VideoFullscreenControllerContext::failedToEnterPictureInPicture): (VideoFullscreenControllerContext::willExitPictureInPicture): (VideoFullscreenControllerContext::didExitPictureInPicture): (VideoFullscreenControllerContext::failedToExitPictureInPicture):
  • platform/mac/VideoFullscreenInterfaceMac.h: (WebCore::VideoFullscreenInterfaceMac::requestHideAndExitFullscreen): Deleted.
  • platform/mac/VideoFullscreenInterfaceMac.mm: (-[WebVideoFullscreenInterfaceMacObjC invalidateFullscreenState]): (-[WebVideoFullscreenInterfaceMacObjC exitPIP]): (-[WebVideoFullscreenInterfaceMacObjC exitPIPAnimatingToRect:inWindow:]): (-[WebVideoFullscreenInterfaceMacObjC pipShouldClose:]): (-[WebVideoFullscreenInterfaceMacObjC pipDidClose:]): (WebCore::VideoFullscreenInterfaceMac::enterFullscreen): (WebCore::VideoFullscreenInterfaceMac::exitFullscreen): (WebCore::VideoFullscreenInterfaceMac::exitFullscreenWithoutAnimationToMode): (WebCore::VideoFullscreenInterfaceMac::requestHideAndExitFullscreen):

Source/WebCore/PAL:

Reviewed by Jon Lee.

  • pal/spi/mac/PIPSPI.h:

Source/WebKit:

Reviewed by Jon Lee.

  • UIProcess/Cocoa/PlaybackSessionManagerProxy.h: (WebKit::PlaybackSessionManagerProxy::controlsManagerContextId const):
  • UIProcess/Cocoa/VideoFullscreenManagerProxy.h:
  • UIProcess/Cocoa/VideoFullscreenManagerProxy.mm: (WebKit::VideoFullscreenModelContext::willEnterPictureInPicture): (WebKit::VideoFullscreenModelContext::didEnterPictureInPicture): (WebKit::VideoFullscreenModelContext::failedToEnterPictureInPicture): (WebKit::VideoFullscreenModelContext::willExitPictureInPicture): (WebKit::VideoFullscreenModelContext::didExitPictureInPicture): (WebKit::VideoFullscreenModelContext::failedToExitPictureInPicture): (WebKit::VideoFullscreenManagerProxy::controlsManagerInterface):
  • UIProcess/ios/fullscreen/WKFullScreenViewController.mm: (WKFullScreenViewControllerVideoFullscreenModelClient::setParent): (WKFullScreenViewControllerVideoFullscreenModelClient::setInterface): (WKFullScreenViewControllerVideoFullscreenModelClient::interface const): (-[WKFullScreenViewController initWithWebView:]): (-[WKFullScreenViewController dealloc]): (-[WKFullScreenViewController videoControlsManagerDidChange]): (-[WKFullScreenViewController ensurePiPAnimator]): (-[WKFullScreenViewController willEnterPictureInPicture]): (-[WKFullScreenViewController didEnterPictureInPicture]): (-[WKFullScreenViewController failedToEnterPictureInPicture]): (-[WKFullScreenViewController loadView]): (-[WKFullScreenViewController viewWillAppear:]):
  • UIProcess/Cocoa/WebViewImpl.mm: (WebKit::WebViewImpl::videoControlsManagerDidChange):
  • UIProcess/mac/WKFullScreenWindowController.h:
  • UIProcess/mac/WKFullScreenWindowController.mm: (WebKit::WKFullScreenWindowControllerVideoFullscreenModelClient::setParent): (WebKit::WKFullScreenWindowControllerVideoFullscreenModelClient::setInterface): (WebKit::WKFullScreenWindowControllerVideoFullscreenModelClient::interface const): (-[WKFullScreenWindowController initWithWindow:webView:page:]): (-[WKFullScreenWindowController dealloc]): (-[WKFullScreenWindowController videoControlsManagerDidChange]): (-[WKFullScreenWindowController willEnterPictureInPicture]):

Tools:

<rdar://problem/41212379>

Reviewed by Jon Lee.

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WebKitCocoa/ExitFullscreenOnEnterPiP.html: Added.
  • TestWebKitAPI/Tests/WebKitCocoa/ExitFullscreenOnEnterPiP.mm: Added. (-[ExitFullscreenOnEnterPiPUIDelegate _webView:hasVideoInPictureInPictureDidChange:]): (-[ExitFullscreenOnEnterPiPUIDelegate _webViewDidEnterFullscreen:]): (-[ExitFullscreenOnEnterPiPUIDelegate _webViewDidExitFullscreen:]): (TestWebKitAPI::TEST):

LayoutTests:

Reviewed by Jon Lee.

  • TestExpectations:
  • media/fullscreen-video-going-into-pip-expected.txt: Removed.
  • media/fullscreen-video-going-into-pip.html: Removed.
  • media/video-contained-in-fullscreen-element-going-into-pip-expected.txt: Removed.
  • media/video-contained-in-fullscreen-element-going-into-pip.html: Removed.
  • platform/mac-wk2/TestExpectations:

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

7:00 PM Changeset in webkit [233969] by bshafiei@apple.com
  • 2 edits in branches/safari-606-branch/Source/WebKit

Cherry-pick r233925. rdar://problem/42354959

Dissociate the VideoFullscreenInterface from its VideoFullscreenModel before removing it from the manager
https://bugs.webkit.org/show_bug.cgi?id=187775
<rdar://problem/42343229>

Reviewed by Jon Lee.

  • UIProcess/Cocoa/VideoFullscreenManagerProxy.mm: (WebKit::VideoFullscreenManagerProxy::didCleanupFullscreen):

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

7:00 PM Changeset in webkit [233968] by bshafiei@apple.com
  • 3 edits in branches/safari-606-branch/Source/WebInspectorUI

Cherry-pick r233920. rdar://problem/42349819

Web Inspector: REGRESSION(r232591): CodeMirrorEditor should not use a RegExp lineSeparator option
https://bugs.webkit.org/show_bug.cgi?id=187772
<rdar://problem/42331640>

Reviewed by Joseph Pecoraro.

  • UserInterface/Views/CodeMirrorEditor.js: (WI.CodeMirrorEditor.create): (WI.CodeMirrorEditor): CodeMirror should be left to auto-detect line separators. By default it detects \n, \r\n, and \r. By specifying a regular expression we merely cause problems when CodeMirror uses the supplied lineSeparator when joining its array of lines together.
  • UserInterface/Views/TextEditor.js: (WI.TextEditor.set string.update): (WI.TextEditor.prototype.set string): This assertion was only true when we forced "\n" line endings everywhere. It no longer holds for source text with "\r\n" (Windows-style) line endings.

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

7:00 PM Changeset in webkit [233967] by bshafiei@apple.com
  • 22 edits
    3 adds
    9 deletes in branches/safari-606-branch

Cherry-pick r233913. rdar://problem/42354927

Fix the parsing of colors in attributed string tests, and make it possible to dump the typing attributes
https://bugs.webkit.org/show_bug.cgi?id=187747

Reviewed by Ryosuke Niwa.

Tools:

Add textInputController.attributedStringForTyping(), which returns a one-character
attributed string whose attributes are the typing attributes, making it possible to
test -[WebView typingAttributes].

Sadly WebCore's convertObjcValueToValue() doesn't know how to convert NSDictionary,
so we can't return -typingAttributes directly.

  • DumpRenderTree/mac/TextInputControllerMac.m: (+[TextInputController isSelectorExcludedFromWebScript:]): (-[TextInputController attributedStringForTyping]):

LayoutTests:

Fix the parsing of color properties in dump-attributed-string.js, and treat NSStrokeColor as
a color. Rebase all the affected tests. Give macOS Sierra its own expectations with the legacy NSCustomColorSpace.

Add attributed-string-for-typing.html which tests typingAttributes.

  • editing/mac/attributed-string/anchor-element-expected.txt:
  • editing/mac/attributed-string/attributed-string-for-typing-expected.txt: Added.
  • editing/mac/attributed-string/attributed-string-for-typing.html: Added.
  • editing/mac/attributed-string/basic-expected.txt:
  • editing/mac/attributed-string/comment-cdata-section-expected.txt:
  • editing/mac/attributed-string/font-size-expected.txt:
  • editing/mac/attributed-string/font-style-variant-effect-expected.txt:
  • editing/mac/attributed-string/font-weight-expected.txt:
  • editing/mac/attributed-string/letter-spacing-expected.txt:
  • editing/mac/attributed-string/resources/dump-attributed-string.js: (dumpAttributedString): (formatNonParagraphAttributeValue): (parseNSColorDescription): (window.onload): (serializeAttributedString.log): Deleted. (serializeAttributedString.): Deleted. (serializeAttributedString): Deleted.
  • editing/mac/attributed-string/text-decorations-expected.txt:
  • editing/mac/attributed-string/vertical-align-expected.txt:
  • platform/mac-sierra/editing/mac/attributed-string/anchor-element-expected.txt:
  • platform/mac-sierra/editing/mac/attributed-string/attributed-string-for-typing-expected.txt: Added.
  • platform/mac-sierra/editing/mac/attributed-string/basic-expected.txt:
  • platform/mac-sierra/editing/mac/attributed-string/comment-cdata-section-expected.txt:
  • platform/mac-sierra/editing/mac/attributed-string/font-size-expected.txt:
  • platform/mac-sierra/editing/mac/attributed-string/font-style-variant-effect-expected.txt:
  • platform/mac-sierra/editing/mac/attributed-string/font-weight-expected.txt:
  • platform/mac-sierra/editing/mac/attributed-string/letter-spacing-expected.txt:
  • platform/mac-sierra/editing/mac/attributed-string/text-decorations-expected.txt:
  • platform/mac-sierra/editing/mac/attributed-string/vertical-align-expected.txt:
  • platform/mac/editing/mac/attributed-string/anchor-element-expected.txt: Removed.
  • platform/mac/editing/mac/attributed-string/basic-expected.txt: Removed.
  • platform/mac/editing/mac/attributed-string/comment-cdata-section-expected.txt: Removed.
  • platform/mac/editing/mac/attributed-string/font-size-expected.txt: Removed.
  • platform/mac/editing/mac/attributed-string/font-style-variant-effect-expected.txt: Removed.
  • platform/mac/editing/mac/attributed-string/font-weight-expected.txt: Removed.
  • platform/mac/editing/mac/attributed-string/letter-spacing-expected.txt: Removed.
  • platform/mac/editing/mac/attributed-string/text-decorations-expected.txt: Removed.
  • platform/mac/editing/mac/attributed-string/vertical-align-expected.txt: Removed.

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

7:00 PM Changeset in webkit [233966] by bshafiei@apple.com
  • 6 edits in branches/safari-606-branch/Source/WebKit

Cherry-pick r233905. rdar://problem/42345236

REGRESSION (iOS 12): Can't scroll to the bottom of the page in WKWebView while keyboard is up on pages with viewport-fit=cover
https://bugs.webkit.org/show_bug.cgi?id=187743
<rdar://problem/41651546>

Reviewed by Simon Fraser.

UIScrollView's _systemContentInset no longer includes keyboard insets
in apps linked on iOS 12+ when contentInsetAdjustmentBehavior is None.

We use contentInsetAdjustmentBehavior to control adjustment of other
sources of insets, but expect the keyboard inset to always be applied.

For now, barring a more comprehensive way to separate insets, re-add
the keyboard inset in cases where UIKit does not.

  • Platform/spi/ios/UIKitSPI.h: Move some IPI to the SPI header.
  • UIProcess/API/Cocoa/WKWebView.mm: (-[WKWebView _haveSetObscuredInsets]):
  • UIProcess/API/Cocoa/WKWebViewInternal.h: Make it possible for WKScrollView to check whether the client is overriding insets.
  • UIProcess/Cocoa/VersionChecks.h: Add a linkedOnOrAfter() version for this new UIScrollView behavior.
  • UIProcess/ios/WKScrollView.mm: (-[WKScrollView initWithFrame:]): Force WKScrollView's scroll indicator to always respect insets. We always want the scroll bars in a sensible place, even if the page sets viewport-fit=cover.

(-[WKScrollView _adjustForAutomaticKeyboardInfo:animated:lastAdjustment:]):
Store the bottom inset due to the keyboard.

(-[WKScrollView _systemContentInset]):
Add the bottom inset due to the keyboard to the systemContentInset
in all cases where UIKit does not. Also avoid adding it if the client takes
full control of the insets, because the only client that does (MobileSafari)
includes insets-due-to-keyboard in their custom insets.

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

7:00 PM Changeset in webkit [233965] by bshafiei@apple.com
  • 2 edits in branches/safari-606-branch/Source/WebKit

Cherry-pick r233904. rdar://problem/42345140

RELEASE_ASSERT() under IPC::Connection::sendSync() from PluginProxy::supportsSnapshotting()
https://bugs.webkit.org/show_bug.cgi?id=187740
<rdar://problem/41818955>

Reviewed by Youenn Fablet.

As per the crash trace, PluginProxy::supportsSnapshotting() can be called during layout but does synchronous
IPC. As a result, we need to prevent WebCore re-entrancy by using DoNotProcessIncomingMessagesWhenWaitingForSyncReply
sendOption.

  • WebProcess/Plugins/PluginProxy.cpp: (WebKit::PluginProxy::supportsSnapshotting const):

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

7:00 PM Changeset in webkit [233964] by bshafiei@apple.com
  • 3 edits
    2 adds in branches/safari-606-branch

Cherry-pick r233903. rdar://problem/42345392

Ensure timingFunctionForKeyframeAtIndex() can be used from setAnimatedPropertiesInStyle().
https://bugs.webkit.org/show_bug.cgi?id=187637
<rdar://problem/42157915>

Reviewed by Dean Jackson.

Source/WebCore:

Test: webanimations/empty-keyframes-crash.html

Unlike what we assumed, it is possible to have a non-declarative animation without any parsed keyframes.
This can happen as a result of calling Element.animate({}, …). In this case, we want to return a null
value in timingFunctionForKeyframeAtIndex() so we update the call site in setAnimatedPropertiesInStyle()
which is the only place where we didn't check for a null value and didn't know for sure that there would
be parsed keyframes to rely on in the case of a WebAnimation instance.

  • animation/KeyframeEffectReadOnly.cpp: (WebCore::KeyframeEffectReadOnly::setAnimatedPropertiesInStyle): (WebCore::KeyframeEffectReadOnly::timingFunctionForKeyframeAtIndex):

LayoutTests:

Add a new test that would crash prior to this change.

  • webanimations/empty-keyframes-crash-expected.txt: Added.
  • webanimations/empty-keyframes-crash.html: Added.

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

7:00 PM Changeset in webkit [233963] by bshafiei@apple.com
  • 2 edits in branches/safari-606-branch/Tools

Cherry-pick r233899. rdar://problem/42345370

REGRESSION: [macOS Sierra] TestWebKitAPI.WebKit.WebsiteDataStoreCustomPaths is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=187066
<rdar://problem/41609065>

Reviewed by Chris Dumez.

In r232668 we started to do reload if web process crashes by default. As we killed the web
process explicitly in this test, if web page got reloaded, messages would be sent again,
and flag set in message handler could keep the test continue to evaluate the expectation
without waiting for removeDataOfTypes to finish.

  • TestWebKitAPI/Tests/WebKitCocoa/WebsiteDataStoreCustomPaths.mm: (-[WebsiteDataStoreCustomPathsMessageHandler webViewWebContentProcessDidTerminate:]): (TEST):

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

7:00 PM Changeset in webkit [233962] by bshafiei@apple.com
  • 2 edits in branches/safari-606-branch/Source/JavaScriptCore

Cherry-pick r233893. rdar://problem/42345044

CodeBlock::baselineVersion() should account for executables with purged codeBlocks.
https://bugs.webkit.org/show_bug.cgi?id=187736
<rdar://problem/42114371>

Reviewed by Michael Saboff.

CodeBlock::baselineVersion() currently checks for a null replacement but does not
account for the fact that that the replacement can also be null due to the
executable having being purged of its codeBlocks due to a memory event (see
ExecutableBase::clearCode()). This patch adds code to account for this.

  • bytecode/CodeBlock.cpp: (JSC::CodeBlock::baselineVersion):

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

7:00 PM Changeset in webkit [233961] by bshafiei@apple.com
  • 2 edits in branches/safari-606-branch/Tools

Cherry-pick r233889. rdar://problem/42343023

[macOS] TestWebKitAPI.PictureInPicture.WKUIDelegate is timing out
https://bugs.webkit.org/show_bug.cgi?id=187730

Patch by Aditya Keerthi <Aditya Keerthi> on 2018-07-17
Reviewed by Jer Noble.

This regression was introduced by r233865. PIP can now only be initiated from a
window that is on screen.

  • TestWebKitAPI/Tests/WebKitCocoa/PictureInPictureDelegate.mm: (TestWebKitAPI::TEST):

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

7:00 PM Changeset in webkit [233960] by bshafiei@apple.com
  • 54 edits in branches/safari-606-branch

Cherry-pick r233888. rdar://problem/42345191

Add completion handlers to TestRunner functions setStatisticsLastSeen(), setStatisticsPrevalentResource(), setStatisticsVeryPrevalentResource(), setStatisticsHasHadUserInteraction(), and setStatisticsHasHadNonRecentUserInteraction()
https://bugs.webkit.org/show_bug.cgi?id=187710
<rdar://problem/42252757>

Reviewed by Chris Dumez.

Source/WebKit:

These changes are to back the completion handler functionality of
TestRunner functions:

  • setStatisticsLastSeen(),
  • setStatisticsPrevalentResource(),
  • setStatisticsVeryPrevalentResource(),
  • setStatisticsHasHadUserInteraction(), and
  • setStatisticsHasHadNonRecentUserInteraction().
  • UIProcess/API/C/WKWebsiteDataStoreRef.cpp: (WKWebsiteDataStoreSetStatisticsLastSeen): (WKWebsiteDataStoreSetStatisticsPrevalentResource): (WKWebsiteDataStoreSetStatisticsVeryPrevalentResource): (WKWebsiteDataStoreSetStatisticsHasHadUserInteraction): (WKWebsiteDataStoreSetStatisticsHasHadNonRecentUserInteraction):
  • UIProcess/API/C/WKWebsiteDataStoreRef.h:
  • UIProcess/WebResourceLoadStatisticsStore.cpp: (WebKit::WebResourceLoadStatisticsStore::logUserInteraction): (WebKit::WebResourceLoadStatisticsStore::logNonRecentUserInteraction): (WebKit::WebResourceLoadStatisticsStore::clearUserInteraction): (WebKit::WebResourceLoadStatisticsStore::setLastSeen): (WebKit::WebResourceLoadStatisticsStore::setPrevalentResource): (WebKit::WebResourceLoadStatisticsStore::setVeryPrevalentResource): (WebKit::WebResourceLoadStatisticsStore::clearPrevalentResource):
  • UIProcess/WebResourceLoadStatisticsStore.h:

Tools:

  • WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
  • WebKitTestRunner/InjectedBundle/InjectedBundle.cpp: (WTR::InjectedBundle::didReceiveMessageToPage):
  • WebKitTestRunner/InjectedBundle/TestRunner.cpp: (WTR::TestRunner::setStatisticsLastSeen): (WTR::TestRunner::statisticsCallDidSetLastSeenCallback): (WTR::TestRunner::setStatisticsPrevalentResource): (WTR::TestRunner::statisticsCallDidSetPrevalentResourceCallback): (WTR::TestRunner::setStatisticsVeryPrevalentResource): (WTR::TestRunner::statisticsCallDidSetVeryPrevalentResourceCallback): (WTR::TestRunner::setStatisticsHasHadUserInteraction): (WTR::TestRunner::setStatisticsHasHadNonRecentUserInteraction): (WTR::TestRunner::statisticsCallDidSetHasHadUserInteractionCallback):
  • WebKitTestRunner/InjectedBundle/TestRunner.h:
  • WebKitTestRunner/TestController.cpp: (WTR::TestController::setStatisticsLastSeen): (WTR::TestController::setStatisticsPrevalentResource): (WTR::TestController::setStatisticsVeryPrevalentResource): (WTR::TestController::setStatisticsHasHadUserInteraction): (WTR::TestController::setStatisticsHasHadNonRecentUserInteraction):
  • WebKitTestRunner/TestInvocation.cpp: (WTR::TestInvocation::didSetLastSeen): (WTR::TestInvocation::didSetPrevalentResource): (WTR::TestInvocation::didSetVeryPrevalentResource): (WTR::TestInvocation::didSetHasHadUserInteraction): (WTR::TestInvocation::didSetHasHadNonRecentUserInteraction):
  • WebKitTestRunner/TestInvocation.h:

LayoutTests:

These changes are to update all test cases that make use of
TestRunner functions:

  • setStatisticsLastSeen(),
  • setStatisticsPrevalentResource(),
  • setStatisticsVeryPrevalentResource(),
  • setStatisticsHasHadUserInteraction(), and
  • setStatisticsHasHadNonRecentUserInteraction().
  • http/tests/resourceLoadStatistics/add-blocking-to-redirect.html:
  • http/tests/resourceLoadStatistics/add-partitioning-to-redirect.html:
  • http/tests/resourceLoadStatistics/classify-as-non-prevalent-based-on-mixed-statistics.html:
  • http/tests/resourceLoadStatistics/classify-as-non-prevalent-based-on-sub-frame-under-top-frame-origins.html:
  • http/tests/resourceLoadStatistics/classify-as-non-prevalent-based-on-subresource-under-top-frame-origins.html:
  • http/tests/resourceLoadStatistics/classify-as-non-prevalent-based-on-subresource-unique-redirects-to.html:
  • http/tests/resourceLoadStatistics/classify-as-prevalent-based-on-mixed-statistics.html:
  • http/tests/resourceLoadStatistics/classify-as-prevalent-based-on-sub-frame-under-top-frame-origins.html:
  • http/tests/resourceLoadStatistics/classify-as-prevalent-based-on-subresource-redirect-collusion.html:
  • http/tests/resourceLoadStatistics/classify-as-prevalent-based-on-subresource-redirect-to-prevalent.html:
  • http/tests/resourceLoadStatistics/classify-as-prevalent-based-on-subresource-under-top-frame-origins.html:
  • http/tests/resourceLoadStatistics/classify-as-prevalent-based-on-subresource-unique-redirects-to.html:
  • http/tests/resourceLoadStatistics/classify-as-prevalent-based-on-top-frame-redirect-collusion.html:
  • http/tests/resourceLoadStatistics/classify-as-prevalent-based-on-top-frame-redirect-to-prevalent.html:
  • http/tests/resourceLoadStatistics/classify-as-prevalent-based-on-top-frame-unique-redirects-to.html:
  • http/tests/resourceLoadStatistics/classify-as-very-prevalent-based-on-mixed-statistics.html:
  • http/tests/resourceLoadStatistics/clear-in-memory-and-persistent-store-one-hour.html:
  • http/tests/resourceLoadStatistics/clear-in-memory-and-persistent-store.html:
  • http/tests/resourceLoadStatistics/do-not-block-top-level-navigation-redirect.html:
  • http/tests/resourceLoadStatistics/grandfathering.html:
  • http/tests/resourceLoadStatistics/non-prevalent-resource-with-user-interaction.html:
  • http/tests/resourceLoadStatistics/non-prevalent-resource-without-user-interaction.html:
  • http/tests/resourceLoadStatistics/non-prevalent-resources-can-access-cookies-in-a-third-party-context.html:
  • http/tests/resourceLoadStatistics/partitioned-and-unpartitioned-cookie-deletion.html:
  • http/tests/resourceLoadStatistics/partitioned-and-unpartitioned-cookie-with-partitioning-timeout-expected.txt:
  • http/tests/resourceLoadStatistics/partitioned-and-unpartitioned-cookie-with-partitioning-timeout.html:
  • http/tests/resourceLoadStatistics/partitioned-cookies-with-and-without-user-interaction.html:
  • http/tests/resourceLoadStatistics/prevalent-resource-handled-keydown.html:
  • http/tests/resourceLoadStatistics/prevalent-resource-unhandled-keydown.html:
  • http/tests/resourceLoadStatistics/prevalent-resource-with-user-interaction-timeout.html:
  • http/tests/resourceLoadStatistics/prevalent-resource-with-user-interaction.html:
  • http/tests/resourceLoadStatistics/prevalent-resource-without-user-interaction.html:
  • http/tests/resourceLoadStatistics/prune-statistics.html:
  • http/tests/resourceLoadStatistics/remove-blocking-in-redirect.html:
  • http/tests/resourceLoadStatistics/remove-partitioning-in-redirect.html:
  • http/tests/resourceLoadStatistics/strip-referrer-to-origin-for-prevalent-subresource-redirects.html:
  • http/tests/resourceLoadStatistics/strip-referrer-to-origin-for-prevalent-subresource-requests.html:
  • http/tests/resourceLoadStatistics/telemetry-generation.html:
  • http/tests/resourceLoadStatistics/third-party-cookie-with-and-without-user-interaction.html:
  • http/tests/resourceLoadStatistics/user-interaction-only-reported-once-within-short-period-of-time.html:

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

7:00 PM Changeset in webkit [233959] by bshafiei@apple.com
  • 3 edits in branches/safari-606-branch/LayoutTests

Cherry-pick r233887. rdar://problem/42344023

Rebaseline displaylists/extent-includes-* tests for mac-wk1 after r233869.
https://bugs.webkit.org/show_bug.cgi?id=187574

Unreviewed test gardening.

  • platform/mac-wk1/displaylists/extent-includes-shadow-expected.txt:
  • platform/mac-wk1/displaylists/extent-includes-transforms-expected.txt:

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

7:00 PM Changeset in webkit [233958] by bshafiei@apple.com
  • 2 edits in branches/safari-606-branch/Source/WebCore

Cherry-pick r233883. rdar://problem/42345112

Correctly adjust scroll offsets when a page is zoomed
https://bugs.webkit.org/show_bug.cgi?id=187673
<rdar://problem/41712829>

Reviewed by Wenson Hsieh.

Will add test later.

Make sure that distance is scaled by the pageScaleFactor, to
make sure that we scroll correctly when we are zoomed in.

  • page/ios/EventHandlerIOS.mm: (WebCore::autoscrollAdjustmentFactorForScreenBoundaries):

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

7:00 PM Changeset in webkit [233957] by bshafiei@apple.com
  • 2 edits in branches/safari-606-branch/Source/WebCore

Cherry-pick r233879. rdar://problem/42345389

Release assert in ~TimerBase is getting hit in WK1 apps which uses JSC API directly
https://bugs.webkit.org/show_bug.cgi?id=187713
<rdar://problem/41759548>

Reviewed by Simon Fraser.

Turn this into a debug assertion in WebKit1 on iOS since JSC API doesn't grab the web thread lock,
which means that Timer can get destroyed without the web thread lock in the main thread.

  • platform/Timer.cpp: (WebCore::TimerBase::~TimerBase): (WebCore::TimerBase::setNextFireTime):

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

7:00 PM Changeset in webkit [233956] by bshafiei@apple.com
  • 3 edits in branches/safari-606-branch/Tools

Cherry-pick r233878. rdar://problem/42343023

Fix API Test failures introduced by r233865
https://bugs.webkit.org/show_bug.cgi?id=187720

Unreviewed APITest fix after r233865.

Fullscreen can now only be initiated from a window that is on screen.

Patch by Jeremy Jones <jeremyj@apple.com> on 2018-07-16

  • TestWebKitAPI/Tests/WebKitCocoa/FullscreenDelegate.mm: (TestWebKitAPI::TEST):
  • TestWebKitAPI/Tests/WebKitCocoa/FullscreenTopContentInset.mm: (TestWebKitAPI::TEST):

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

7:00 PM Changeset in webkit [233955] by bshafiei@apple.com
  • 20 edits
    2 adds in branches/safari-606-branch

Cherry-pick r233877. rdar://problem/42344047

Add color filter for transforming colors in Dark Mode
https://bugs.webkit.org/show_bug.cgi?id=187717
Source/WebCore:

rdar://problem/41146650

Reviewed by Dean Jackson.

Add a new filter function for use in -apple-color-filter for transforming colors
when in Dark Mode. The filter is called apple-invert-lightness(), and takes no parameters.
It's based on a lightness invert in HSL space, with some adjustments to improve the contrast
of some colors on dark backgrounds, so does a much better job that using invert() with hue-rotate().

Test: css3/color-filters/color-filter-apple-invert-lightness.html

  • css/CSSComputedStyleDeclaration.cpp: (WebCore::ComputedStyleExtractor::valueForFilter):
  • css/CSSValueKeywords.in:
  • css/StyleResolver.cpp: (WebCore::filterOperationForType): (WebCore::StyleResolver::createFilterOperations):
  • css/parser/CSSPropertyParser.cpp: (WebCore::CSSPropertyParser::parseSingleValue):
  • css/parser/CSSPropertyParserHelpers.cpp: (WebCore::CSSPropertyParserHelpers::consumeFilterImage): (WebCore::CSSPropertyParserHelpers::isPixelFilterFunction): (WebCore::CSSPropertyParserHelpers::isColorFilterFunction): (WebCore::CSSPropertyParserHelpers::consumeFilterFunction): (WebCore::CSSPropertyParserHelpers::consumeFilter): (WebCore::CSSPropertyParserHelpers::isValidPrimitiveFilterFunction): Deleted.
  • css/parser/CSSPropertyParserHelpers.h:
  • page/FrameView.cpp: (WebCore::FrameView::paintContents):
  • platform/graphics/Color.cpp:
  • platform/graphics/ColorUtilities.cpp: (WebCore::sRGBToLinearComponents): (WebCore::linearToSRGBComponents): (WebCore::sRGBToLinearColorComponentForLuminance): (WebCore::luminance): (WebCore::sRGBToHSL): (WebCore::calcHue): (WebCore::HSLToSRGB): (WebCore::ColorMatrix::ColorMatrix):
  • platform/graphics/ColorUtilities.h:
  • platform/graphics/ca/cocoa/PlatformCAFiltersCocoa.mm: (PlatformCAFilters::filterValueForOperation): (PlatformCAFilters::colorMatrixValueForFilter):
  • platform/graphics/filters/FEColorMatrix.cpp:
  • platform/graphics/filters/FilterOperation.cpp: (WebCore::InvertLightnessFilterOperation::operator== const): (WebCore::InvertLightnessFilterOperation::blend): (WebCore::InvertLightnessFilterOperation::transformColor const): (WebCore::operator<<):
  • platform/graphics/filters/FilterOperation.h:
  • rendering/FilterEffectRenderer.cpp: (WebCore::FilterEffectRenderer::build):

Source/WebKit:

Reviewed by Dean Jackson.

  • Shared/WebCoreArgumentCoders.cpp: (IPC::ArgumentCoder<FilterOperation>::encode): (IPC::decodeFilterOperation):

LayoutTests:

rdar://problem/41146650

Reviewed by Dean Jackson.

  • css3/color-filters/color-filter-apple-invert-lightness-expected.html: Added.
  • css3/color-filters/color-filter-apple-invert-lightness.html: Added.
  • css3/color-filters/color-filter-parsing-expected.txt:
  • css3/color-filters/color-filter-parsing.html:

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

6:59 PM Changeset in webkit [233954] by bshafiei@apple.com
  • 2 edits in branches/safari-606-branch/Source/WebKit

Cherry-pick r233876. rdar://problem/42345027

Black flash in content area when returning to Mail
https://bugs.webkit.org/show_bug.cgi?id=187719
<rdar://problem/42165340>

Reviewed by Wenson Hsieh.

  • UIProcess/ios/WebPageProxyIOS.mm: (WebKit::WebPageProxy::applicationDidFinishSnapshottingAfterEnteringBackground): This still reproduces sometimes even after r233723, because:

If a pending commit arrives after ApplicationDidEnterBackground (when we
ask the web content process to freeze the layer tree), and after
ApplicationDidFinishSnapshottingAfterEnteringBackground (when we hide
WKContentView), but before the process sleeps, it will cause WKContentView
to be unhidden (potentially including layers with empty surfaces as contents).
Nothing will re-hide WKContentView. Instead, we should wait for the next
*pending* commit, which will necessarily not come until after the application
returns to the foreground because of the strict IPC ordering between
the message that freezes the layer tree and the "next commit" mechanism.

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

6:59 PM Changeset in webkit [233953] by bshafiei@apple.com
  • 28 edits in branches/safari-606-branch

Cherry-pick r233872. rdar://problem/42345272

Source/WebCore:
[iOS] When bringing MobileSafari to the foreground, images, which are pending decoding, won't be drawn into the flush immediate transaction
https://bugs.webkit.org/show_bug.cgi?id=187375

Patch by Said Abou-Hallawa <sabouhallawa@apple.com> on 2018-07-16
Reviewed by Simon Fraser.

An immediate-paint transaction should force all the images which are pending
decoding to be repainted.

To do that, FrameView::paintControlTints() will be re-factored to a new
generic function such that it takes PaintInvalidationReasons. The new function
which is named 'traverseForPaintInvalidation' will traverse the render tree
for a specific PaintInvalidationReasons.

invalidateImagesWithAsyncDecodes() will stop the asynchronous decoding for
the underlying image and repaint all the clients which are waiting for the
decoding to finish.

  • loader/cache/CachedImage.cpp: (WebCore::CachedImage::didRemoveClient): (WebCore::CachedImage::isClientWaitingForAsyncDecoding const): (WebCore::CachedImage::addClientWaitingForAsyncDecoding): (WebCore::CachedImage::removeAllClientsWaitingForAsyncDecoding): (WebCore::CachedImage::allClientsRemoved): (WebCore::CachedImage::clear): (WebCore::CachedImage::createImage): (WebCore::CachedImage::imageFrameAvailable): (WebCore::CachedImage::addPendingImageDrawingClient): Deleted.
  • loader/cache/CachedImage.h:
  • page/FrameView.cpp: (WebCore::FrameView::paintScrollCorner): (WebCore::FrameView::updateControlTints): (WebCore::FrameView::traverseForPaintInvalidation): (WebCore::FrameView::adjustPageHeightDeprecated): (WebCore::FrameView::paintControlTints): Deleted.
  • page/FrameView.h:
  • platform/ScrollView.cpp: (WebCore::ScrollView::paint):
  • platform/Scrollbar.cpp: (WebCore::Scrollbar::paint):
  • platform/graphics/BitmapImage.h:
  • platform/graphics/GraphicsContext.cpp: (WebCore::GraphicsContext::GraphicsContext):
  • platform/graphics/GraphicsContext.h: (WebCore::GraphicsContext::performingPaintInvalidation const): (WebCore::GraphicsContext::invalidatingControlTints const): (WebCore::GraphicsContext::invalidatingImagesWithAsyncDecodes const): (WebCore::GraphicsContext::updatingControlTints const): Deleted.
  • rendering/RenderBoxModelObject.cpp: (WebCore::RenderBoxModelObject::paintFillLayerExtended):
  • rendering/RenderImage.cpp: (WebCore::RenderImage::paintReplaced): (WebCore::RenderImage::paintAreaElementFocusRing): (WebCore::RenderImage::paintIntoRect):
  • rendering/RenderLayer.cpp: (WebCore::RenderLayer::paintScrollCorner): (WebCore::RenderLayer::paintResizer): (WebCore::RenderLayer::paintLayer):
  • rendering/RenderScrollbar.cpp: (WebCore::RenderScrollbar::paint):
  • rendering/RenderTheme.cpp: (WebCore::RenderTheme::paint):
  • testing/Internals.cpp: (WebCore::Internals::invalidateControlTints): (WebCore::Internals::paintControlTints): Deleted.
  • testing/Internals.h:
  • testing/Internals.idl:

Source/WebKit:
[iOS] When bringing MobileSafari to the foreground, images, which are pending decoding, won't be drawn into the immediate-paint transaction
https://bugs.webkit.org/show_bug.cgi?id=187375

Patch by Said Abou-Hallawa <sabouhallawa@apple.com> on 2018-07-16
Reviewed by Simon Fraser.

For immediate-paint transaction, we should force all the images which are
pending decoding to be repainted before building this transaction.

  • WebProcess/Plugins/PDF/PDFPlugin.mm: (WebKit::PDFPlugin::updateControlTints):
  • WebProcess/Plugins/PluginView.cpp: (WebKit::PluginView::paint):
  • WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeDrawingArea.mm: (WebKit::RemoteLayerTreeDrawingArea::flushLayers):

LayoutTests:
[iOS] When bringing MobileSafari to the foreground, images, which are pending decoding, won't be drawn into the immediate-paint transaction
https://bugs.webkit.org/show_bug.cgi?id=187375

Patch by Said Abou-Hallawa <sabouhallawa@apple.com> on 2018-07-16
Reviewed by Simon Fraser.

The Internals API paintControlTints() is now renamed to invalidateControlTints()
to be consistent with the new enum values and with the new name of the
C++ function.

  • fast/css/webkit-mask-crash-fieldset-legend.html:
  • fast/css/webkit-mask-crash-figure.html:
  • fast/css/webkit-mask-crash-table.html:
  • fast/css/webkit-mask-crash-td-2.html:
  • fast/css/webkit-mask-crash-td.html:

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

6:59 PM Changeset in webkit [233952] by bshafiei@apple.com
  • 2 edits in branches/safari-606-branch/Source/WebCore

Cherry-pick r233870. rdar://problem/42344023

Unreviewed attempt to fix the build.

  • rendering/RenderThemeMac.mm:

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

6:59 PM Changeset in webkit [233951] by bshafiei@apple.com
  • 39 edits
    2 adds in branches/safari-606-branch

Cherry-pick r233869. rdar://problem/42344023

Allow removal of white backgrounds
https://bugs.webkit.org/show_bug.cgi?id=187574
<rdar://problem/41146792>

Reviewed by Simon Fraser.

Source/WebCore:

Add a drawing mode that turns white backgrounds into transparent
regions, such that a hosting app can see through to its window.

Test: css3/color-filters/punch-out-white-backgrounds.html

  • page/Settings.yaml: New Setting.
  • rendering/InlineFlowBox.cpp: Draw with a destination out blend mode if the background is white and we are punching out backgrounds, which means that it will erase the destination. (WebCore::InlineFlowBox::paintBoxDecorations):
  • rendering/RenderBox.cpp: (WebCore::RenderBox::paintBackground): Ditto.
  • rendering/RenderTableCell.cpp: (WebCore::RenderTableCell::paintBackgroundsBehindCell): Ditto.
  • rendering/RenderBoxModelObject.cpp: (WebCore::RenderBoxModelObject::paintFillLayerExtended): Save and restore the composition mode if necessary.

Source/WebKit:

Add a new WebPreference for punching out white backgrounds.

  • Shared/WebPreferences.yaml:
  • UIProcess/API/C/WKPreferences.cpp: (WKPreferencesSetPunchOutWhiteBackgroundsInDarkMode): (WKPreferencesGetPunchOutWhiteBackgroundsInDarkMode):
  • UIProcess/API/C/WKPreferencesRefPrivate.h:
  • UIProcess/API/Cocoa/WKWebView.mm: (-[WKWebView _initializeWithConfiguration:]):
  • UIProcess/API/Cocoa/WKWebViewConfiguration.mm: (-[WKWebViewConfiguration init]): (-[WKWebViewConfiguration copyWithZone:]): (-[WKWebViewConfiguration _punchOutWhiteBackgroundsInDarkMode]): (-[WKWebViewConfiguration _setPunchOutWhiteBackgroundsInDarkMode:]):
  • UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h:

Source/WebKitLegacy/mac:

Add a new WebPreference for punching out white backgrounds.

  • WebView/WebPreferenceKeysPrivate.h:
  • WebView/WebPreferences.mm: (+[WebPreferences initialize]): (-[WebPreferences punchOutWhiteBackgroundsInDarkMode]): (-[WebPreferences setPunchOutWhiteBackgroundsInDarkMode:]):
  • WebView/WebPreferencesPrivate.h:
  • WebView/WebView.mm: (-[WebView _preferencesChanged:]):

Tools:

Add a new menu item for punching out white backgrounds in MiniBrowser.
In WebKitTestRunner, expose the new setting and hook that up to
drawing a background in the WebView.

  • MiniBrowser/mac/AppDelegate.m: (defaultConfiguration): Add _punchOutWhiteBackgroundsInDarkMode.
  • MiniBrowser/mac/SettingsController.h: Ditto.
  • MiniBrowser/mac/SettingsController.m: (-[SettingsController _populateMenu]): (-[SettingsController validateMenuItem:]): (-[SettingsController togglePunchOutWhiteBackgroundsInDarkMode:]): (-[SettingsController punchOutWhiteBackgroundsInDarkMode]):
  • MiniBrowser/mac/WK1BrowserWindowController.m: (-[WK1BrowserWindowController didChangeSettings]): Set the new preference.
  • WebKitTestRunner/PlatformWebView.h: Expose a drawsBackground property.
  • WebKitTestRunner/gtk/PlatformWebViewGtk.cpp: Null implementation. (WTR::PlatformWebView::drawsBackground const): (WTR::PlatformWebView::setDrawsBackground):
  • WebKitTestRunner/wpe/PlatformWebViewWPE.cpp: Ditto. (WTR::PlatformWebView::drawsBackground const): (WTR::PlatformWebView::setDrawsBackground):
  • WebKitTestRunner/ios/PlatformWebViewIOS.mm: Call into the WKWebView and set its SPI. (WTR::PlatformWebView::drawsBackground const): (WTR::PlatformWebView::setDrawsBackground):
  • WebKitTestRunner/mac/PlatformWebViewMac.mm: Ditto. (WTR::PlatformWebView::drawsBackground const): (WTR::PlatformWebView::setDrawsBackground):
  • WebKitTestRunner/TestController.cpp: Reset and copy the new preference. (WTR::TestController::resetPreferencesToConsistentValues): (WTR::updateTestOptionsFromTestHeader):
  • WebKitTestRunner/TestOptions.h: (WTR::TestOptions::hasSameInitializationOptions const):
  • WebKitTestRunner/cocoa/TestControllerCocoa.mm: (WTR::TestController::platformCreateWebView): If the option for punching out the background was set, tell the WebView to not draw its background.

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

6:59 PM Changeset in webkit [233950] by bshafiei@apple.com
  • 14 edits
    2 adds in branches/safari-606-branch

Cherry-pick r233865. rdar://problem/42343023

Fullscreen requires active document.
https://bugs.webkit.org/show_bug.cgi?id=186226
rdar://problem/36187413

Patch by Jeremy Jones <jeremyj@apple.com> on 2018-07-16
Reviewed by Jer Noble.

Source/WebCore:

Test: media/no-fullscreen-when-hidden.html

This change guarantees the document to be visible for both element fullscreen and video fullscreen.

User gesture is not enough to guarantee that the document is visible when fullscreen is initiated
because JavaScript can spin wait before initiating fullscreen. During that spin the page or window might
be hidden.

Document::hidden() can't be relied upon because it won't update while JavaScript spins.

This change adds a sync call to the UI process to get the current UI visibility state.

  • dom/Document.cpp: (WebCore::Document::requestFullScreenForElement):
  • html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::enterFullscreen):
  • page/ChromeClient.h:

Source/WebKit:

This change guarantees the document to be visible for both element fullscreen and video fullscreen.

User gesture is not enough to guarantee that the document is visible when fullscreen is initiated
because JavaScript can spin wait before initiating fullscreen. During that spin the page or window might
be hidden.

Document::hidden() can't be relied upon because it won't update while JavaScript spins.

This change adds a sync call to the UI process to get the current UI visibility state.

  • UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::getIsViewVisible):
  • UIProcess/WebPageProxy.h:
  • UIProcess/WebPageProxy.messages.in:
  • WebProcess/WebCoreSupport/WebChromeClient.cpp: (WebKit::WebChromeClient::isViewVisible):
  • WebProcess/WebCoreSupport/WebChromeClient.h:

LayoutTests:

This change guarantees the document to be visible for both element fullscreen and video fullscreen.

User gesture is not enough to guarantee that the document is visible when fullscreen is initiated
because JavaScript can spin wait before initiating fullscreen. During that spin the page or window might
be hidden.

Document::hidden() can't be relied upon because it won't update while JavaScript spins.

This change adds a sync call to the UI process to get the current UI visibility state.

  • media/no-fullscreen-when-hidden.html: Added.
  • media/video-test.js: (eventName.string_appeared_here.thunk): (runWithKeyDown):
  • platform/ios-wk1/TestExpectations:
  • platform/mac-wk1/TestExpectations:

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

6:59 PM Changeset in webkit [233949] by bshafiei@apple.com
  • 2 edits in branches/safari-606-branch/Source/WebKit

Cherry-pick r233864. rdar://problem/42344962

REGRESSION (r233502): Camera in <input type=file> becomes unresponsive after attempting to dismiss it
https://bugs.webkit.org/show_bug.cgi?id=187706
<rdar://problem/42137088>

Reviewed by Wenson Hsieh.

  • UIProcess/ios/forms/WKFileUploadPanel.mm: Remove an unused member.

(-[WKFileUploadPanel _dismissDisplayAnimated:]):
Allow us to dismiss the camera view controller in addition to the menu.

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

6:59 PM Changeset in webkit [233948] by bshafiei@apple.com
  • 3 edits in branches/safari-606-branch/Source/WebInspectorUI

Cherry-pick r233861. rdar://problem/42345123

Web Inspector: Fix execution highlighting after r233820
https://bugs.webkit.org/show_bug.cgi?id=187703
<rdar://problem/42246167>

Reviewed by Joseph Pecoraro.

  • UserInterface/Views/SourceCodeTextEditor.js: (WI.SourceCodeTextEditor.prototype.textEditorExecutionHighlightRange):
  • UserInterface/Views/TextEditor.js: (WI.TextEditor.prototype.currentPositionToOriginalPosition): (WI.TextEditor.prototype._updateExecutionRangeHighlight):

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

6:59 PM Changeset in webkit [233947] by bshafiei@apple.com
  • 3 edits in branches/safari-606-branch/Source/WebCore

Cherry-pick r233857. rdar://problem/42345036

Make sure LibWebRTCMediaEndpoint is always destroyed on the main thread
https://bugs.webkit.org/show_bug.cgi?id=187702

Reviewed by Youenn Fablet.

Make sure LibWebRTCMediaEndpoint is always constructed and destructed on the main thread since
it has a Timer data member and it would not be safe otherwise. LibWebRTCMediaEndpoint is
ThreadSafeRefCounted and frequently passed to other threads.

  • Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp: (WebCore::LibWebRTCMediaEndpoint::LibWebRTCMediaEndpoint):
  • Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.h:

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

6:59 PM Changeset in webkit [233946] by bshafiei@apple.com
  • 7 edits in branches/safari-606-branch

Cherry-pick r233853. rdar://problem/42344991

IndexedDB: closeAndDeleteDatabasesForOrigins should remove all databases for those origins
https://bugs.webkit.org/show_bug.cgi?id=187631
<rdar://problem/42164227>

Reviewed by Brady Eidson.

Source/WebCore:

When asked to delete database for an origin, we deleted the databases whose mainFrameOrigin
is that origin. Given that the origin may create IndexedDB from subframes, we should delete
databases whose openingOrigin is that origin too.

Covered by modified API test: WebKit.WebsiteDataStoreCustomPaths.

  • Modules/indexeddb/server/IDBServer.cpp: (WebCore::IDBServer::IDBServer::performCloseAndDeleteDatabasesForOrigins):

Source/WebKit:

We need to return all origins, both openingOrigin and mainFrameOrigin, of IndexedDB so users
could be better aware of which origins are using databases and decide what they want to
remove.

  • StorageProcess/StorageProcess.cpp: (WebKit::StorageProcess::indexedDatabaseOrigins):
  • StorageProcess/StorageProcess.h:

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/WebsiteDataStoreCustomPaths.mm: (TEST):

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

6:19 PM Changeset in webkit [233945] by Ricky Mondello
  • 3 edits in trunk/Source/WebKit

Let clients override _WKThumbnailView's background color

https://bugs.webkit.org/show_bug.cgi?id=187788

Reviewed by Tim Horton.

  • UIProcess/API/Cocoa/_WKThumbnailView.h: Declare a property.
  • UIProcess/API/Cocoa/_WKThumbnailView.mm: Define an ivar.

(-[_WKThumbnailView updateLayer]): Consult the background color.
(-[_WKThumbnailView setOverrideBackgroundColor:]): Notably, call -updateLayer.
(-[_WKThumbnailView overrideBackgroundColor]): Added.

6:01 PM Changeset in webkit [233944] by stephan.szabo@sony.com
  • 2 edits in trunk/Tools

Unreviewed. Fix contributors entry.

  • Scripts/webkitpy/common/config/contributors.json:
5:47 PM Changeset in webkit [233943] by dino@apple.com
  • 5 edits in trunk/Tools

Provide an lldb type summary for WebCore::Color
https://bugs.webkit.org/show_bug.cgi?id=187776

Reviewed by Dan Bates.

  • lldb/lldbWebKitTester/lldbWebKitTester.xcodeproj/project.pbxproj: Link against WebKit

to get to WebCore.

  • lldb/lldbWebKitTester/main.cpp:

(testSummaryProviders): Create some Color objects for testing.

  • lldb/lldb_webkit.py: Add a Color summary provider.

(lldb_init_module):
(WebCoreColor_SummaryProvider):
(WebCoreColorProvider):
(WebCoreColorProvider.
init):
(WebCoreColorProvider._is_extended):
(WebCoreColorProvider._is_valid):
(WebCoreColorProvider._is_semantic):
(WebCoreColorProvider._to_string_extended):
(WebCoreColorProvider.to_string):

  • lldb/lldb_webkit_unittest.py: Tests.

(TestSummaryProviders.serial_test_WTFVectorProvider_vector_size_and_capacity):
(TestSummaryProviders):
(TestSummaryProviders.serial_test_WebCoreColorProvider_invalid_color):
(TestSummaryProviders.serial_test_WebCoreColorProvider_extended_color):
(TestSummaryProviders.serial_test_WebCoreColorProvider_rgb_color):
(TestSummaryProviders.serial_test_WebCoreColorProvider_rgba_color):

5:38 PM Changeset in webkit [233942] by Truitt Savell
  • 5 edits in trunk/Tools

Unreviewed, rolling out r233934.

Revision caused 5 webkitpy failures on Mac and broke webkitpy
testing on iOS simulator

Reverted changeset:

"Provide an lldb type summary for WebCore::Color"
https://bugs.webkit.org/show_bug.cgi?id=187776
https://trac.webkit.org/changeset/233934

4:33 PM Changeset in webkit [233941] by Chris Dumez
  • 2 edits in trunk/Tools

REGRESSION (r233897): CrashTracer: com.apple.WebKit.WebContent.Development at com.apple.WebKit: WKBooleanGetValue + 9
https://bugs.webkit.org/show_bug.cgi?id=187784
<rdar://problem/42329230>

Reviewed by Brady Eidson.

When process swapping on navigation, WebPageProxy::reattachToWebProcess() unregisters the page as a MessageReceiver
from the old WebProcessProxy and registers itself as a MessageReceiver for the new WebProcessProxy instead. This
means that after this point, IPC sent by the previous WebProcess to its WebPageProxy will fail.

When we process swap, we also navigate the page in the old WebProcess to about:blank, when the navigation to
about:blank would complete, the WebKitTestRunner's injected bundle would try and send IPC to the WebPageProxy
which would fail and would cause WKBundlePagePostSynchronousMessageForTesting() to return a null result. WKTR
would crash when dereferencing this null result. This patch addresses this by dealing with the potential null
result.

  • WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:

(WTR::InjectedBundle::shouldProcessWorkQueue const):

4:29 PM Changeset in webkit [233940] by jer.noble@apple.com
  • 2 edits in trunk/Source/WebKit

CRASH at WebKit: WebKit::WebFullScreenManagerProxy::saveScrollPosition
https://bugs.webkit.org/show_bug.cgi?id=187769
<rdar://problem/42160666>

Reviewed by Tim Horton.

Null-check all uses of _page and _manager in WKFullScreenWindowControllerIOS.

  • UIProcess/ios/fullscreen/WKFullScreenWindowControllerIOS.mm:

(WebKit::WKWebViewState::applyTo):
(WebKit::WKWebViewState::store):
(-[WKFullScreenWindowController enterFullScreen]):
(-[WKFullScreenWindowController beganExitFullScreenWithInitialFrame:finalFrame:]):
(-[WKFullScreenWindowController _completedExitFullScreen]):

4:13 PM Changeset in webkit [233939] by Chris Dumez
  • 2 edits in trunk/Source/WebKit

WebContent crash in WebProcess::ensureNetworkProcessConnection
https://bugs.webkit.org/show_bug.cgi?id=187791
<rdar://problem/41995022>

Reviewed by Ryosuke Niwa.

If the WebProcessProxy::GetNetworkProcessConnection synchronous IPC between the WebProcess
and the UIProcess succeeded but we received an invalid connection identifier, then try
once more. This may indicate the network process has crashed, in which case it will be
relaunched.

  • WebProcess/WebProcess.cpp:

(WebKit::getNetworkProcessConnection):
(WebKit::WebProcess::ensureNetworkProcessConnection):

3:41 PM Changeset in webkit [233938] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Rebaseline fast/css/apple-system-colors.html.

Unreviewed test gardening.

  • platform/mac/fast/css/apple-system-colors-expected.txt:
3:36 PM Changeset in webkit [233937] by Yusuke Suzuki
  • 6 edits in trunk/Source/JavaScriptCore

[JSC] Reduce size of AST nodes
https://bugs.webkit.org/show_bug.cgi?id=187689

Reviewed by Mark Lam.

We clean up AST nodes to reduce size. By doing so, we can reduce the memory consumption
of ParserArena at peak state.

  1. Annotate final to AST nodes to make them solid. And it allows the compiler to

devirtualize a call to the function which are implemented in a final class.

  1. Use default member initializers more.
  1. And use nullptr instead of 0.
  1. Arrange the layout of AST nodes to reduce the size. It includes changing the order

of classes in multiple inheritance. In particular, StatementNode is decreased from 48
to 40. This decreases the sizes of all the derived Statement nodes.

  • parser/NodeConstructors.h:

(JSC::Node::Node):
(JSC::StatementNode::StatementNode):
(JSC::ElementNode::ElementNode):
(JSC::ArrayNode::ArrayNode):
(JSC::PropertyListNode::PropertyListNode):
(JSC::ObjectLiteralNode::ObjectLiteralNode):
(JSC::ArgumentListNode::ArgumentListNode):
(JSC::ArgumentsNode::ArgumentsNode):
(JSC::NewExprNode::NewExprNode):
(JSC::BytecodeIntrinsicNode::BytecodeIntrinsicNode):
(JSC::BinaryOpNode::BinaryOpNode):
(JSC::LogicalOpNode::LogicalOpNode):
(JSC::CommaNode::CommaNode):
(JSC::SourceElements::SourceElements):
(JSC::ClauseListNode::ClauseListNode):

  • parser/Nodes.cpp:

(JSC::FunctionMetadataNode::FunctionMetadataNode):
(JSC::FunctionMetadataNode::operator== const):
(JSC::FunctionMetadataNode::dump const):

  • parser/Nodes.h:

(JSC::BooleanNode::value): Deleted.
(JSC::StringNode::value): Deleted.
(JSC::TemplateExpressionListNode::value): Deleted.
(JSC::TemplateExpressionListNode::next): Deleted.
(JSC::TemplateStringNode::cooked): Deleted.
(JSC::TemplateStringNode::raw): Deleted.
(JSC::TemplateStringListNode::value): Deleted.
(JSC::TemplateStringListNode::next): Deleted.
(JSC::TemplateLiteralNode::templateStrings const): Deleted.
(JSC::TemplateLiteralNode::templateExpressions const): Deleted.
(JSC::TaggedTemplateNode::templateLiteral const): Deleted.
(JSC::ResolveNode::identifier const): Deleted.
(JSC::ElementNode::elision const): Deleted.
(JSC::ElementNode::value): Deleted.
(JSC::ElementNode::next): Deleted.
(JSC::ArrayNode::elements const): Deleted.
(JSC::PropertyNode::expressionName const): Deleted.
(JSC::PropertyNode::name const): Deleted.
(JSC::PropertyNode::type const): Deleted.
(JSC::PropertyNode::needsSuperBinding const): Deleted.
(JSC::PropertyNode::isClassProperty const): Deleted.
(JSC::PropertyNode::isStaticClassProperty const): Deleted.
(JSC::PropertyNode::isInstanceClassProperty const): Deleted.
(JSC::PropertyNode::isOverriddenByDuplicate const): Deleted.
(JSC::PropertyNode::setIsOverriddenByDuplicate): Deleted.
(JSC::PropertyNode::putType const): Deleted.
(JSC::BracketAccessorNode::base const): Deleted.
(JSC::BracketAccessorNode::subscript const): Deleted.
(JSC::BracketAccessorNode::subscriptHasAssignments const): Deleted.
(JSC::DotAccessorNode::base const): Deleted.
(JSC::DotAccessorNode::identifier const): Deleted.
(JSC::SpreadExpressionNode::expression const): Deleted.
(JSC::ObjectSpreadExpressionNode::expression const): Deleted.
(JSC::BytecodeIntrinsicNode::type const): Deleted.
(JSC::BytecodeIntrinsicNode::emitter const): Deleted.
(JSC::BytecodeIntrinsicNode::identifier const): Deleted.
(JSC::TypeOfResolveNode::identifier const): Deleted.
(JSC::BitwiseNotNode::expr): Deleted.
(JSC::BitwiseNotNode::expr const): Deleted.
(JSC::AssignResolveNode::identifier const): Deleted.
(JSC::ExprStatementNode::expr const): Deleted.
(JSC::ForOfNode::isForAwait const): Deleted.
(JSC::ReturnNode::value): Deleted.
(JSC::ProgramNode::startColumn const): Deleted.
(JSC::ProgramNode::endColumn const): Deleted.
(JSC::EvalNode::startColumn const): Deleted.
(JSC::EvalNode::endColumn const): Deleted.
(JSC::ModuleProgramNode::startColumn const): Deleted.
(JSC::ModuleProgramNode::endColumn const): Deleted.
(JSC::ModuleProgramNode::moduleScopeData): Deleted.
(JSC::ModuleNameNode::moduleName): Deleted.
(JSC::ImportSpecifierNode::importedName): Deleted.
(JSC::ImportSpecifierNode::localName): Deleted.
(JSC::ImportSpecifierListNode::specifiers const): Deleted.
(JSC::ImportSpecifierListNode::append): Deleted.
(JSC::ImportDeclarationNode::specifierList const): Deleted.
(JSC::ImportDeclarationNode::moduleName const): Deleted.
(JSC::ExportAllDeclarationNode::moduleName const): Deleted.
(JSC::ExportDefaultDeclarationNode::declaration const): Deleted.
(JSC::ExportDefaultDeclarationNode::localName const): Deleted.
(JSC::ExportLocalDeclarationNode::declaration const): Deleted.
(JSC::ExportSpecifierNode::exportedName): Deleted.
(JSC::ExportSpecifierNode::localName): Deleted.
(JSC::ExportSpecifierListNode::specifiers const): Deleted.
(JSC::ExportSpecifierListNode::append): Deleted.
(JSC::ExportNamedDeclarationNode::specifierList const): Deleted.
(JSC::ExportNamedDeclarationNode::moduleName const): Deleted.
(JSC::ArrayPatternNode::appendIndex): Deleted.
(JSC::ObjectPatternNode::appendEntry): Deleted.
(JSC::ObjectPatternNode::setContainsRestElement): Deleted.
(JSC::ObjectPatternNode::setContainsComputedProperty): Deleted.
(JSC::DestructuringAssignmentNode::bindings): Deleted.
(JSC::FunctionParameters::size const): Deleted.
(JSC::FunctionParameters::append): Deleted.
(JSC::FunctionParameters::isSimpleParameterList const): Deleted.
(JSC::FuncDeclNode::metadata): Deleted.
(JSC::CaseClauseNode::expr const): Deleted.
(JSC::CaseClauseNode::setStartOffset): Deleted.
(JSC::ClauseListNode::getClause const): Deleted.
(JSC::ClauseListNode::getNext const): Deleted.

  • runtime/ExceptionHelpers.cpp:
  • runtime/JSObject.cpp:
3:29 PM Changeset in webkit [233936] by jer.noble@apple.com
  • 2 edits in trunk/Source/WebCore

Unreviewed API Test fix; restored a line inadventantly removed in r233926.

  • platform/mac/VideoFullscreenInterfaceMac.mm:

(-[WebVideoFullscreenInterfaceMacObjC pipDidClose:]):

3:23 PM Changeset in webkit [233935] by graouts@webkit.org
  • 32 edits in trunk

[Web Animations] Interpolation between font-styles with a keyword value should be discrete
https://bugs.webkit.org/show_bug.cgi?id=187722

Reviewed by Myles Maxfield.

LayoutTests/imported/w3c:

Mark some WPT progressions.

  • web-platform-tests/web-animations/animation-model/animation-types/discrete-expected.txt:

Source/WebCore:

Animating between "font-style: normal" or "font-style: oblique" and any another value should yield a discrete
interpolation where the from-value is used from 0 and up to (but excluding) 0.5, and the to-value from 0.5 to 1.

In order to be able to detect the "normal" value, we make the "slope" of a FontSelectionRequest an optional type
where the std::nullopt value indicates "normal" and other values an "oblique" value. Since we also need to
distinguish the "italic" value from an "oblique" value, we implement a custom PropertyWrapper for the "font-style"
property where we ensure the fontStyleAxis property of the font description matches the value we're blending to.
Indeed, in the case where we may animate from "normal" to "italic", the fontStyleAxis on the blended style would
remain "slnt" since it is the base value for "normal".

  • accessibility/AccessibilityRenderObject.cpp:

(WebCore::AccessibilityRenderObject::hasPlainText const):

  • css/CSSComputedStyleDeclaration.cpp:

(WebCore::ComputedStyleExtractor::fontStyleFromStyleValue):

  • css/CSSComputedStyleDeclaration.h:
  • css/CSSFontFace.cpp:

(WebCore::calculateItalicRange):

  • css/CSSFontFaceSet.cpp:

(WebCore::computeFontSelectionRequest):

  • css/FontSelectionValueInlines.h:

(WebCore::fontStyleKeyword):
(WebCore::fontStyleValue): Deleted.

  • css/StyleBuilderConverter.h:

(WebCore::StyleBuilderConverter::convertFontStyleFromValue):

  • page/animation/CSSPropertyAnimation.cpp:

(WebCore::blendFunc):
(WebCore::PropertyWrapperFontStyle::PropertyWrapperFontStyle):
(WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap):

  • platform/graphics/FontCache.h:

(WebCore::FontDescriptionKey::computeHash const):

  • platform/graphics/FontCascade.h:

(WebCore::FontCascade::italic const):

  • platform/graphics/FontDescription.h:

(WebCore::FontDescription::italic const):
(WebCore::FontDescription::setItalic):
(WebCore::FontDescription::setIsItalic):
(WebCore::FontCascadeDescription::initialItalic):

  • platform/graphics/FontSelectionAlgorithm.cpp:

(WebCore::FontSelectionAlgorithm::styleDistance const):

  • platform/graphics/FontSelectionAlgorithm.h:

(WebCore::isItalic):
(WebCore::FontSelectionRequest::tied const):
(WebCore::operator<<): Implement the required stream operator.
(WebCore::operator==): Mark this function as inline instead of constexpr since tied() is no longer constexpr
due to taking an std::optional<>.
(WebCore::operator!=):

  • platform/graphics/cocoa/FontCacheCoreText.cpp:

(WebCore::preparePlatformFont):

  • platform/graphics/win/FontCacheWin.cpp:

(WebCore::FontCache::createFontPlatformData):

  • rendering/style/RenderStyle.cpp:

(WebCore::RenderStyle::setFontItalic):

  • rendering/style/RenderStyle.h:

(WebCore::RenderStyle::fontItalic const):

Source/WebKitLegacy/win:

Use isItalic() since that function knows how to handle an std::optional<FontSelectionValue>.

  • DOMCoreClasses.cpp:

(DOMElement::font):

LayoutTests:

Mark some WPT progressions.

  • platform/mac/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/accumulation-per-property-expected.txt:
  • platform/mac/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/addition-per-property-expected.txt:
  • platform/mac/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/interpolation-per-property-expected.txt:
  • platform/mac-sierra/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/accumulation-per-property-expected.txt:
  • platform/mac-sierra/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/addition-per-property-expected.txt:
  • platform/mac-sierra/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/interpolation-per-property-expected.txt:
3:19 PM Changeset in webkit [233934] by dino@apple.com
  • 5 edits in trunk/Tools

Provide an lldb type summary for WebCore::Color
https://bugs.webkit.org/show_bug.cgi?id=187776

Reviewed by Dan Bates.

  • lldb/lldbWebKitTester/lldbWebKitTester.xcodeproj/project.pbxproj: Link against WebKit

to get to WebCore.

  • lldb/lldbWebKitTester/main.cpp:

(testSummaryProviders): Create some Color objects for testing.

  • lldb/lldb_webkit.py: Add a Color summary provider.

(lldb_init_module):
(WebCoreColor_SummaryProvider):
(WebCoreColorProvider):
(WebCoreColorProvider.
init):
(WebCoreColorProvider._is_extended):
(WebCoreColorProvider._is_valid):
(WebCoreColorProvider._is_semantic):
(WebCoreColorProvider._to_string_extended):
(WebCoreColorProvider.to_string):

  • lldb/lldb_webkit_unittest.py: Tests.

(TestSummaryProviders.serial_test_WTFVectorProvider_vector_size_and_capacity):
(TestSummaryProviders):
(TestSummaryProviders.serial_test_WebCoreColorProvider_invalid_color):
(TestSummaryProviders.serial_test_WebCoreColorProvider_extended_color):
(TestSummaryProviders.serial_test_WebCoreColorProvider_rgb_color):
(TestSummaryProviders.serial_test_WebCoreColorProvider_rgba_color):

2:51 PM Changeset in webkit [233933] by bshafiei@apple.com
  • 7 edits in branches/safari-606-branch/Source

Versioning.

2:50 PM Changeset in webkit [233932] by pvollan@apple.com
  • 7 edits in trunk/Source

The WebContent process does not suspend when MiniBrowser is minimized.
https://bugs.webkit.org/show_bug.cgi?id=187708

Reviewed by Chris Dumez.

Source/WebCore/PAL:

Add function for enabling App nap.

  • pal/spi/cf/CFUtilitiesSPI.h:

Source/WebKit:

Using the NSRunLoop runloop type prevents the WebContent process from suspending. Instead, use the new
_WebKit runloop type. Also do not leak a boost to the WebContent process, since this also prevents the
WebContent process from going to sleep. Calling SetApplicationIsDaemon prevents the WebContent process
from being assigned the application process priority level. To block WindowServer connections, call
CGSSetDenyWindowServerConnections(true) instead. Finally, App nap must be manually enabled, since the
WebContent process is no longer a NSApplication.

  • Configurations/WebContentService.xcconfig:
  • UIProcess/Launcher/mac/ProcessLauncherMac.mm:

(WebKit::shouldLeakBoost):

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::updateThrottleState):

  • WebProcess/cocoa/WebProcessCocoa.mm:

(WebKit::WebProcess::platformInitializeProcess):

2:21 PM Changeset in webkit [233931] by stephan.szabo@sony.com
  • 2 edits in trunk/Tools

Adding myself to contributors.json

Unreviewed contributors.json change.

  • Scripts/webkitpy/common/config/contributors.json:
2:17 PM Changeset in webkit [233930] by jer.noble@apple.com
  • 2 edits in trunk/Source/WebCore

Unreviewed build fix after r233926; BOOL !== bool.

  • platform/ios/VideoFullscreenInterfaceAVKit.mm:

(VideoFullscreenInterfaceAVKit::pictureInPictureWasStartedWhenEnteringBackground const):

2:15 PM Changeset in webkit [233929] by Chris Dumez
  • 2 edits in trunk/Source/WebKit

Crash under WebKit::SuspendedPageProxy::webProcessDidClose(WebKit::WebProcessProxy&)
https://bugs.webkit.org/show_bug.cgi?id=187780

Reviewed by Brady Eidson.

Protect |this| in SuspendedPageProxy::webProcessDidClose() since the call to
WebPageProxy::suspendedPageClosed() may destroy us before the method is done
executing.

  • UIProcess/SuspendedPageProxy.cpp:

(WebKit::SuspendedPageProxy::webProcessDidClose):

1:08 PM Changeset in webkit [233928] by mitz@apple.com
  • 9 copies
    1 add in releases/Apple/Safari Technology Preview 61

Added a tag for Safari Technology Preview release 61.

12:51 PM Changeset in webkit [233927] by jer.noble@apple.com
  • 4 edits in trunk

-_beginAnimatedResizeWithUpdates: can leave view in bad state if called during an existing animation
https://bugs.webkit.org/show_bug.cgi?id=187739
Source/WebKit:

Reviewed by Tim Horton.

It's not enough to reset _dynamicViewportUpdateMode to NotResizing; other parts of the code
check whether _resizeAnimationView is non-nil, the contentView may be hidden, etc. Add a new
internal method _cancelAnimatedResize that cleans up state when a call to
_beginAnimatedResizeWithUpdates: fails.

  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView _processDidExit]):
(-[WKWebView _cancelAnimatedResize]):
(-[WKWebView _didCompleteAnimatedResize]):
(-[WKWebView _beginAnimatedResizeWithUpdates:]):

Tools:

<rdar://problem/42304518>

Reviewed by Tim Horton.

  • TestWebKitAPI/Tests/WebKitCocoa/AnimatedResize.mm:

(TEST):

12:50 PM Changeset in webkit [233926] by jer.noble@apple.com
  • 25 edits
    2 adds
    4 deletes in trunk

PiP from Element Fullscreen should match AVKit's behavior
https://bugs.webkit.org/show_bug.cgi?id=187623
Source/WebCore:

Reviewed by Jon Lee.

PiP behavior should be defined at the WebKit2 level, and not in HTMLMediaElement:

  • html/HTMLMediaElement.cpp:

(WebCore::HTMLMediaElement::enterFullscreen):

Add an accessor for pictureInPictureWasStartedWhenEnteringBackground():

  • platform/cocoa/VideoFullscreenModelVideoElement.mm:

(VideoFullscreenInterfaceAVKit::pictureInPictureWasStartedWhenEnteringBackground const):

Add VideoFullscreenModelClient virutal methods for PiP change notifications:

  • platform/cocoa/VideoFullscreenModel.h:

(WebCore::VideoFullscreenModelClient::hasVideoChanged):
(WebCore::VideoFullscreenModelClient::videoDimensionsChanged):
(WebCore::VideoFullscreenModelClient::willEnterPictureInPicture):
(WebCore::VideoFullscreenModelClient::didEnterPictureInPicture):
(WebCore::VideoFullscreenModelClient::failedToEnterPictureInPicture):
(WebCore::VideoFullscreenModelClient::willExitPictureInPicture):
(WebCore::VideoFullscreenModelClient::didExitPictureInPicture):
(WebCore::VideoFullscreenModelClient::failedToExitPictureInPicture):

  • platform/cocoa/VideoFullscreenModelVideoElement.h:
  • platform/cocoa/VideoFullscreenModelVideoElement.mm:

(VideoFullscreenModelVideoElement::willEnterPictureInPicture):
(VideoFullscreenModelVideoElement::didEnterPictureInPicture):
(VideoFullscreenModelVideoElement::failedToEnterPictureInPicture):
(VideoFullscreenModelVideoElement::willExitPictureInPicture):
(VideoFullscreenModelVideoElement::didExitPictureInPicture):
(VideoFullscreenModelVideoElement::failedToExitPictureInPicture):

  • platform/ios/VideoFullscreenInterfaceAVKit.h:
  • platform/ios/VideoFullscreenInterfaceAVKit.mm:

(-[WebAVPlayerLayer layoutSublayers]):
(-[WebAVPlayerLayer resolveBounds]):
(-[WebAVPlayerLayer setVideoGravity:]):
(VideoFullscreenInterfaceAVKit::setupFullscreen):
(VideoFullscreenInterfaceAVKit::presentingViewController):
(VideoFullscreenInterfaceAVKit::willStartPictureInPicture):
(VideoFullscreenInterfaceAVKit::didStartPictureInPicture):
(VideoFullscreenInterfaceAVKit::failedToStartPictureInPicture):
(VideoFullscreenInterfaceAVKit::willStopPictureInPicture):
(VideoFullscreenInterfaceAVKit::didStopPictureInPicture):
(VideoFullscreenInterfaceAVKit::shouldExitFullscreenWithReason):
(VideoFullscreenInterfaceAVKit::doSetup):

  • platform/ios/WebVideoFullscreenControllerAVKit.mm:

(VideoFullscreenControllerContext::willEnterPictureInPicture):
(VideoFullscreenControllerContext::didEnterPictureInPicture):
(VideoFullscreenControllerContext::failedToEnterPictureInPicture):
(VideoFullscreenControllerContext::willExitPictureInPicture):
(VideoFullscreenControllerContext::didExitPictureInPicture):
(VideoFullscreenControllerContext::failedToExitPictureInPicture):

  • platform/mac/VideoFullscreenInterfaceMac.h:

(WebCore::VideoFullscreenInterfaceMac::requestHideAndExitFullscreen): Deleted.

  • platform/mac/VideoFullscreenInterfaceMac.mm:

(-[WebVideoFullscreenInterfaceMacObjC invalidateFullscreenState]):
(-[WebVideoFullscreenInterfaceMacObjC exitPIP]):
(-[WebVideoFullscreenInterfaceMacObjC exitPIPAnimatingToRect:inWindow:]):
(-[WebVideoFullscreenInterfaceMacObjC pipShouldClose:]):
(-[WebVideoFullscreenInterfaceMacObjC pipDidClose:]):
(WebCore::VideoFullscreenInterfaceMac::enterFullscreen):
(WebCore::VideoFullscreenInterfaceMac::exitFullscreen):
(WebCore::VideoFullscreenInterfaceMac::exitFullscreenWithoutAnimationToMode):
(WebCore::VideoFullscreenInterfaceMac::requestHideAndExitFullscreen):

Source/WebCore/PAL:

Reviewed by Jon Lee.

  • pal/spi/mac/PIPSPI.h:

Source/WebKit:

Reviewed by Jon Lee.

  • UIProcess/Cocoa/PlaybackSessionManagerProxy.h:

(WebKit::PlaybackSessionManagerProxy::controlsManagerContextId const):

  • UIProcess/Cocoa/VideoFullscreenManagerProxy.h:
  • UIProcess/Cocoa/VideoFullscreenManagerProxy.mm:

(WebKit::VideoFullscreenModelContext::willEnterPictureInPicture):
(WebKit::VideoFullscreenModelContext::didEnterPictureInPicture):
(WebKit::VideoFullscreenModelContext::failedToEnterPictureInPicture):
(WebKit::VideoFullscreenModelContext::willExitPictureInPicture):
(WebKit::VideoFullscreenModelContext::didExitPictureInPicture):
(WebKit::VideoFullscreenModelContext::failedToExitPictureInPicture):
(WebKit::VideoFullscreenManagerProxy::controlsManagerInterface):

  • UIProcess/ios/fullscreen/WKFullScreenViewController.mm:

(WKFullScreenViewControllerVideoFullscreenModelClient::setParent):
(WKFullScreenViewControllerVideoFullscreenModelClient::setInterface):
(WKFullScreenViewControllerVideoFullscreenModelClient::interface const):
(-[WKFullScreenViewController initWithWebView:]):
(-[WKFullScreenViewController dealloc]):
(-[WKFullScreenViewController videoControlsManagerDidChange]):
(-[WKFullScreenViewController ensurePiPAnimator]):
(-[WKFullScreenViewController willEnterPictureInPicture]):
(-[WKFullScreenViewController didEnterPictureInPicture]):
(-[WKFullScreenViewController failedToEnterPictureInPicture]):
(-[WKFullScreenViewController loadView]):
(-[WKFullScreenViewController viewWillAppear:]):

  • UIProcess/Cocoa/WebViewImpl.mm:

(WebKit::WebViewImpl::videoControlsManagerDidChange):

  • UIProcess/mac/WKFullScreenWindowController.h:
  • UIProcess/mac/WKFullScreenWindowController.mm:

(WebKit::WKFullScreenWindowControllerVideoFullscreenModelClient::setParent):
(WebKit::WKFullScreenWindowControllerVideoFullscreenModelClient::setInterface):
(WebKit::WKFullScreenWindowControllerVideoFullscreenModelClient::interface const):
(-[WKFullScreenWindowController initWithWindow:webView:page:]):
(-[WKFullScreenWindowController dealloc]):
(-[WKFullScreenWindowController videoControlsManagerDidChange]):
(-[WKFullScreenWindowController willEnterPictureInPicture]):

Tools:

<rdar://problem/41212379>

Reviewed by Jon Lee.

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WebKitCocoa/ExitFullscreenOnEnterPiP.html: Added.
  • TestWebKitAPI/Tests/WebKitCocoa/ExitFullscreenOnEnterPiP.mm: Added.

(-[ExitFullscreenOnEnterPiPUIDelegate _webView:hasVideoInPictureInPictureDidChange:]):
(-[ExitFullscreenOnEnterPiPUIDelegate _webViewDidEnterFullscreen:]):
(-[ExitFullscreenOnEnterPiPUIDelegate _webViewDidExitFullscreen:]):
(TestWebKitAPI::TEST):

LayoutTests:

Reviewed by Jon Lee.

  • TestExpectations:
  • media/fullscreen-video-going-into-pip-expected.txt: Removed.
  • media/fullscreen-video-going-into-pip.html: Removed.
  • media/video-contained-in-fullscreen-element-going-into-pip-expected.txt: Removed.
  • media/video-contained-in-fullscreen-element-going-into-pip.html: Removed.
  • platform/mac-wk2/TestExpectations:
12:44 PM Changeset in webkit [233925] by jer.noble@apple.com
  • 2 edits in trunk/Source/WebKit

Dissociate the VideoFullscreenInterface from its VideoFullscreenModel before removing it from the manager
https://bugs.webkit.org/show_bug.cgi?id=187775
<rdar://problem/42343229>

Reviewed by Jon Lee.

  • UIProcess/Cocoa/VideoFullscreenManagerProxy.mm:

(WebKit::VideoFullscreenManagerProxy::didCleanupFullscreen):

12:01 PM Changeset in webkit [233924] by Yusuke Suzuki
  • 3 edits
    1 add in trunk

JSON.stringify should emit non own properties if second array argument includes
https://bugs.webkit.org/show_bug.cgi?id=187724

Reviewed by Mark Lam.

JSTests:

  • stress/json-stringify-getter-call.js: Added.

(shouldBe):
(A.prototype.get cocoa):
(A.prototype.get cappuccino):
(A):
(shouldBe.JSON.stringify):

Source/JavaScriptCore:

According to the spec[1], JSON.stringify needs to retrieve properties by using Get?,
instead of GetOwnProperty?. It means that we would look up a properties defined
in Prototype? or upper objects in the prototype chain. While enumeration is done
by using EnumerableOwnPropertyNames typically, we can pass replacer array including
property names which does not reside in the own properties. Or we can modify the
own properties by deleting properties while JSON.stringify is calling a getter. So,
using Get? instead of GetOwnProperty? is user-visible.

This patch changes getOwnPropertySlot to getPropertySlot to align the behavior to the spec.
The performance of Kraken/json-stringify-tinderbox is neutral.

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

  • runtime/JSONObject.cpp:

(JSC::Stringifier::toJSON):
(JSC::Stringifier::toJSONImpl):
(JSC::Stringifier::appendStringifiedValue):
(JSC::Stringifier::Holder::Holder):
(JSC::Stringifier::Holder::appendNextProperty):

12:00 PM Changeset in webkit [233923] by Truitt Savell
  • 2 edits in trunk/LayoutTests

[ WK2 ] Layout Test http/wpt/service-workers/update-service-worker.https.html is a flaky Timeout

https://bugs.webkit.org/show_bug.cgi?id=187766

Unreviewed test gardening.

  • platform/wk2/TestExpectations:
11:45 AM Changeset in webkit [233922] by aboya@igalia.com
  • 4 edits in trunk/LayoutTests

[GTK] Unreviewed test gardening
https://bugs.webkit.org/show_bug.cgi?id=187771

  • TestExpectations:
  • platform/gtk/TestExpectations:
  • platform/wpe/TestExpectations:
11:40 AM Changeset in webkit [233921] by aakash_jain@apple.com
  • 4 edits in trunk/Tools

[ews-build] Add build step to run layout-test
https://bugs.webkit.org/show_bug.cgi?id=187674

Reviewed by Lucas Forschler.

  • BuildSlaveSupport/ews-build/steps.py:

(RunWebKitTests): Added build step to run layout-tests. This is similar to current EWS.

  • BuildSlaveSupport/ews-build/steps_unittest.py: Added unit-tests.
  • BuildSlaveSupport/ews-build/factories.py: Added build-step to run layout-test in iOSSimulatorFactory.
11:40 AM Changeset in webkit [233920] by Matt Baker
  • 3 edits in trunk/Source/WebInspectorUI

Web Inspector: REGRESSION(r232591): CodeMirrorEditor should not use a RegExp lineSeparator option
https://bugs.webkit.org/show_bug.cgi?id=187772
<rdar://problem/42331640>

Reviewed by Joseph Pecoraro.

  • UserInterface/Views/CodeMirrorEditor.js:

(WI.CodeMirrorEditor.create):
(WI.CodeMirrorEditor):
CodeMirror should be left to auto-detect line separators. By default
it detects \n, \r\n, and \r. By specifying a regular expression we
merely cause problems when CodeMirror uses the supplied lineSeparator
when joining its array of lines together.

  • UserInterface/Views/TextEditor.js:

(WI.TextEditor.set string.update):
(WI.TextEditor.prototype.set string):
This assertion was only true when we forced "\n" line endings everywhere.
It no longer holds for source text with "\r\n" (Windows-style) line endings.

11:35 AM Changeset in webkit [233919] by Basuke Suzuki
  • 8 edits in trunk/Source/WebCore

[Curl] Disable CURLOPT_SSL_VERIFYPEER and CURLOPT_SSL_VERIFYHOST specified by setAllowsAnyHTTPSCertificate.
https://bugs.webkit.org/show_bug.cgi?id=187611

Reviewed by Fujii Hironori.

Current interface for TLS certificate validation for Curl port are as follows:

  • WEBCORE_EXPORT void setHostAllowsAnyHTTPSCertificate(const String&);
  • bool isAllowedHTTPSCertificateHost(const String&);
  • bool canIgnoredHTTPSCertificate(const String&, const Vector<CertificateInfo::Certificate>&);

First one registers a host to be ignored for any certificate check. Once it is registered, no
further certificate validation check is executed.
Second one checks the host is registered in the list above.
Third one is weird. The method signature implies it checks the certificate for the host and detect
whether we can ignore this certificate for the host, but actually it just check only the host and
register the certificate into the vector. Then in the next request for the host, the certificate
will be checked with the previously stored certificate.

It's hard to understand, but in short,

  • We can register a host as an exception for any TLS certificate validation.
  • But only certificate arrived first is ignored, not any certificates for the host (which is rare, but possible for mis configured web cluster).

This behavior is incomplete. To ignore any certificates of the host, these two methods are enough:

  • void allowAnyHTTPSCertificatesForHost(const String&)
  • bool canIgnoreAnyHTTPSCertificatesForHost(const String&)

No new tests. Covered by existing tests.

  • platform/network/curl/CertificateInfo.h:
  • platform/network/curl/CurlContext.cpp:

(WebCore::CurlHandle::enableSSLForHost): Ignore TLS verification for registered host.

  • platform/network/curl/CurlSSLHandle.cpp:

(WebCore::CurlSSLHandle::allowAnyHTTPSCertificatesForHost): Added.
(WebCore::CurlSSLHandle::canIgnoreAnyHTTPSCertificatesForHost const): Ditto.
(WebCore::CurlSSLHandle::setClientCertificateInfo): Separate lock.
(WebCore::CurlSSLHandle::getSSLClientCertificate const): Ditto and add const.
(WebCore::CurlSSLHandle::setHostAllowsAnyHTTPSCertificate): Deleted.
(WebCore::CurlSSLHandle::isAllowedHTTPSCertificateHost): Deleted.
(WebCore::CurlSSLHandle::canIgnoredHTTPSCertificate): Deleted.
(WebCore::CurlSSLHandle::getSSLClientCertificate): Deleted.

  • platform/network/curl/CurlSSLHandle.h:
  • platform/network/curl/CurlSSLVerifier.cpp:

(WebCore::CurlSSLVerifier::CurlSSLVerifier):
(WebCore::CurlSSLVerifier::collectInfo): Renamed from verify.
(WebCore::CurlSSLVerifier::verifyCallback):
(WebCore::CurlSSLVerifier::verify): Renamed to collectInfo.

  • platform/network/curl/CurlSSLVerifier.h:
  • platform/network/curl/ResourceHandleCurl.cpp:

(WebCore::ResourceHandle::setHostAllowsAnyHTTPSCertificate): Rename calling method.

11:31 AM Changeset in webkit [233918] by Yusuke Suzuki
  • 4 edits
    1 add in trunk

[JSC] JSON.stringify's replacer should use isArray instead of JSArray checks
https://bugs.webkit.org/show_bug.cgi?id=187755

Reviewed by Mark Lam.

JSTests:

  • stress/json-stringify-gap-calculation-should-be-after-replacer-check.js: Added.

(shouldThrow):
(shouldThrow.string.toString):

  • test262/expectations.yaml:

Source/JavaScriptCore:

JSON.stringify used inherits<JSArray>(vm) to determine whether the given replacer is an array replacer.
But this is wrong. According to the spec, we should use isArray[1], which accepts Proxies. This difference
makes one test262 test failed.

This patch changes the code to using isArray(). And we reorder the evaluations of replacer check and ident space check
to align these checks to the spec's order.

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

  • runtime/JSONObject.cpp:

(JSC::Stringifier::Stringifier):

11:27 AM Changeset in webkit [233917] by Yusuke Suzuki
  • 2 edits in trunk/Source/JavaScriptCore

[JSC] Root wrapper object in JSON.stringify is not necessary if replacer is not callable
https://bugs.webkit.org/show_bug.cgi?id=187752

Reviewed by Mark Lam.

JSON.stringify has an implicit root wrapper object since we would like to call replacer
with a wrapper object and a property name. While we always create this wrapper object,
it is unnecessary if the given replacer is not callable.

This patch removes wrapper object creation when a replacer is not callable to avoid unnecessary
allocations. This change slightly improves the performance of Kraken/json-stringify-tinderbox.

baseline patched

json-stringify-tinderbox 39.730+-0.590 38.853+-0.266 definitely 1.0226x faster

  • runtime/JSONObject.cpp:

(JSC::Stringifier::isCallableReplacer const):
(JSC::Stringifier::Stringifier):
(JSC::Stringifier::stringify):
(JSC::Stringifier::appendStringifiedValue):

11:10 AM Changeset in webkit [233916] by mmaxfield@apple.com
  • 5 edits in trunk/Source/WebCore

Rename WordBreak::Break to WordBreak::BreakWord
https://bugs.webkit.org/show_bug.cgi?id=187767

Reviewed by Simon Fraser.

These breaking properties are very confusing. There are:

  1. word-break: break-all, a standard value that allows breaking after every

character.

  1. word-break: break-word, a non-standard value which allows for breaking after

every character, but only if the word is too long for the available width (otherwise
it works the same as word-break: normal). This affects the min-content-size of the
text (and makes it equal to what it would be if word-break: break-all was
specified).

  1. word-wrap: break-word, which is the same as word-break: break-word, but doesn't

affect the min-content-size of the text.

  1. overflow-wrap: break-word, which is the same as word-wrap: break-word.

Because this is so confusing it's valuable for our internal enums to match the names
of the official CSS properties/values.

No new tests because there is no behavior change.

  • css/CSSPrimitiveValueMappings.h:

(WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
(WebCore::CSSPrimitiveValue::operator WordBreak const):

  • rendering/RenderText.cpp:

(WebCore::RenderText::computePreferredLogicalWidths):

  • rendering/style/RenderStyle.h:

(WebCore::RenderStyle::breakWords const):

  • rendering/style/RenderStyleConstants.h:
10:08 AM Changeset in webkit [233915] by Wenson Hsieh
  • 13 edits
    1 add in trunk

Add SPI to defer running async script until after document load
https://bugs.webkit.org/show_bug.cgi?id=187748
<rdar://problem/42317378>

Reviewed by Ryosuke Niwa and Tim Horton.

Source/WebCore:

On watchOS, we currently observe that time-consuming async scripts can block the first paint of Reader, leaving
the user with a blank screen for tens of seconds. One way to mitigate this is to defer async script execution
until after document load (i.e. the same timing as DOMContentLoaded).

This patch introduces an SPI configuration allowing internal clients to defer execution of asynchronous script
until after document load; this, in combination with the parser yielding token introduced in r233891, allows
Safari on watchOS to avoid being blocked on slow script execution before the first paint of the Reader page on
most article-like pages. See below for more details.

Test: RunScriptAfterDocumentLoad.ExecutionOrderOfScriptsInDocument

  • dom/Document.cpp:

(WebCore::Document::shouldDeferAsynchronousScriptsUntilParsingFinishes const):
(WebCore::Document::finishedParsing):

Notify ScriptRunner when the Document has finished parsing, and is about to fire DOMContentLoaded.

  • dom/Document.h:
  • dom/ScriptRunner.cpp:

(WebCore::ScriptRunner::documentFinishedParsing):

When the document is finished parsing, kick off the script execution timer if needed to run any async script
that has been deferred.

(WebCore::ScriptRunner::notifyFinished):
(WebCore::ScriptRunner::timerFired):

Instead of always taking from the list of async scripts to execute, check our document to see whether we should
defer this until after document load. If so, ignore m_scriptsToExecuteSoon.

  • dom/ScriptRunner.h:
  • page/Settings.yaml:

Add a WebCore setting for this behavior.

Source/WebKit:

Add plumbing for a new ShouldDeferAsynchronousScriptsUntilAfterDocumentLoad configuration that determines
whether async script execution should be deferred until document load (i.e. DOMContentLoaded). This
configuration defaults to NO on all platforms. See WebCore ChangeLog for more detail.

  • Shared/WebPreferences.yaml:
  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView _initializeWithConfiguration:]):

  • UIProcess/API/Cocoa/WKWebViewConfiguration.mm:

(-[WKWebViewConfiguration init]):
(-[WKWebViewConfiguration copyWithZone:]):
(-[WKWebViewConfiguration _shouldDeferAsynchronousScriptsUntilAfterDocumentLoad]):
(-[WKWebViewConfiguration _setShouldDeferAsynchronousScriptsUntilAfterDocumentLoad:]):

  • UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h:

Tools:

Add an API test to verify that when the deferred async script configuration is set, async scripts will be
executed after the DOMContentLoaded event.

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WebKitCocoa/RunScriptAfterDocumentLoad.mm: Added.

(TEST):

9:04 AM Changeset in webkit [233914] by cturner@igalia.com
  • 2 edits in trunk/Tools

[WPE] Update WPEBackend in flatpak
https://bugs.webkit.org/show_bug.cgi?id=187753

r233763 updated WPEBackend for the jhbuild, but not the flatpak. This
caused WPE_BACKEND_CHECK_VERSION to not be defined, triggering a bug
in the version guard,

#if defined(WPE_BACKEND_CHECK_VERSION) && WPE_BACKEND_CHECK_VERSION(0, 2, 0)

This doesn't work as intended, since the C preprocessor first expands
all macro arguments in the #if expression before evaluating the
expression. When WPE_BACKEND_CHECK_VERSION is not defined, this will
lead to a syntax error and some head scratching.

A future patch should address the buggy macro check, when it is
decided whether the assume the macro is always defined and bump
the API requirements on WPEBackend, or to move the check into two
conditionals to avoid the expansion problem.

Unreviewed build fix.

  • flatpak/org.webkit.WPE.yaml:
8:55 AM Changeset in webkit [233913] by Simon Fraser
  • 22 edits
    3 adds
    1 delete in trunk

Fix the parsing of colors in attributed string tests, and make it possible to dump the typing attributes
https://bugs.webkit.org/show_bug.cgi?id=187747

Reviewed by Ryosuke Niwa.

Tools:

Add textInputController.attributedStringForTyping(), which returns a one-character
attributed string whose attributes are the typing attributes, making it possible to
test -[WebView typingAttributes].

Sadly WebCore's convertObjcValueToValue() doesn't know how to convert NSDictionary,
so we can't return -typingAttributes directly.

  • DumpRenderTree/mac/TextInputControllerMac.m:

(+[TextInputController isSelectorExcludedFromWebScript:]):
(-[TextInputController attributedStringForTyping]):

LayoutTests:

Fix the parsing of color properties in dump-attributed-string.js, and treat NSStrokeColor as
a color. Rebase all the affected tests. Give macOS Sierra its own expectations with the legacy NSCustomColorSpace.

Add attributed-string-for-typing.html which tests typingAttributes.

  • editing/mac/attributed-string/anchor-element-expected.txt:
  • editing/mac/attributed-string/attributed-string-for-typing-expected.txt: Added.
  • editing/mac/attributed-string/attributed-string-for-typing.html: Added.
  • editing/mac/attributed-string/basic-expected.txt:
  • editing/mac/attributed-string/comment-cdata-section-expected.txt:
  • editing/mac/attributed-string/font-size-expected.txt:
  • editing/mac/attributed-string/font-style-variant-effect-expected.txt:
  • editing/mac/attributed-string/font-weight-expected.txt:
  • editing/mac/attributed-string/letter-spacing-expected.txt:
  • editing/mac/attributed-string/resources/dump-attributed-string.js:

(dumpAttributedString):
(formatNonParagraphAttributeValue):
(parseNSColorDescription):
(window.onload):
(serializeAttributedString.log): Deleted.
(serializeAttributedString.): Deleted.
(serializeAttributedString): Deleted.

  • editing/mac/attributed-string/text-decorations-expected.txt:
  • editing/mac/attributed-string/vertical-align-expected.txt:
  • platform/mac-sierra/editing/mac/attributed-string/anchor-element-expected.txt:
  • platform/mac-sierra/editing/mac/attributed-string/attributed-string-for-typing-expected.txt: Added.
  • platform/mac-sierra/editing/mac/attributed-string/basic-expected.txt:
  • platform/mac-sierra/editing/mac/attributed-string/comment-cdata-section-expected.txt:
  • platform/mac-sierra/editing/mac/attributed-string/font-size-expected.txt:
  • platform/mac-sierra/editing/mac/attributed-string/font-style-variant-effect-expected.txt:
  • platform/mac-sierra/editing/mac/attributed-string/font-weight-expected.txt:
  • platform/mac-sierra/editing/mac/attributed-string/letter-spacing-expected.txt:
  • platform/mac-sierra/editing/mac/attributed-string/text-decorations-expected.txt:
  • platform/mac-sierra/editing/mac/attributed-string/vertical-align-expected.txt:
  • platform/mac/editing/mac/attributed-string/anchor-element-expected.txt: Removed.
  • platform/mac/editing/mac/attributed-string/basic-expected.txt: Removed.
  • platform/mac/editing/mac/attributed-string/comment-cdata-section-expected.txt: Removed.
  • platform/mac/editing/mac/attributed-string/font-size-expected.txt: Removed.
  • platform/mac/editing/mac/attributed-string/font-style-variant-effect-expected.txt: Removed.
  • platform/mac/editing/mac/attributed-string/font-weight-expected.txt: Removed.
  • platform/mac/editing/mac/attributed-string/letter-spacing-expected.txt: Removed.
  • platform/mac/editing/mac/attributed-string/text-decorations-expected.txt: Removed.
  • platform/mac/editing/mac/attributed-string/vertical-align-expected.txt: Removed.
7:43 AM Changeset in webkit [233912] by Michael Catanzaro
  • 4 edits in trunk

Switch CMake ports back to C++ 14
https://bugs.webkit.org/show_bug.cgi?id=187744

Reviewed by Ryosuke Niwa.

.:

The XCode build is still not using C++ 17, it's been several months since CMake ports
switched, everything builds fine without changes if we switch back, and there have been some
unfixed problems. Let's go back to C++ 14 for now. We can switch back to C++ 17 whenever we
are ready to switch over XCode at the same time, to ensure we don't wind up with divergent
behavior for std::optional.

  • Source/cmake/WebKitCompilerFlags.cmake:

Source/WTF:

Always use WTF's internal std::optional implementation, since std::optional is not part of
C++ 14.

  • wtf/Optional.h:
5:54 AM Changeset in webkit [233911] by Carlos Garcia Campos
  • 6 edits in trunk

[GLIB] Add jsc_context_check_syntax() to GLib API
https://bugs.webkit.org/show_bug.cgi?id=187694

Reviewed by Yusuke Suzuki.

Source/JavaScriptCore:

A new function to be able to check for syntax errors without actually evaluating the code.

  • API/glib/JSCContext.cpp:

(jsc_context_check_syntax):

  • API/glib/JSCContext.h:
  • API/glib/docs/jsc-glib-4.0-sections.txt:

Tools:

Add a new test case.

  • TestWebKitAPI/Tests/JavaScriptCore/glib/TestJSC.cpp:

(testJSCCheckSyntax):
(main):

3:22 AM Changeset in webkit [233910] by zandobersek@gmail.com
  • 5 edits in trunk/Source/WebCore

[Nicosia] Add debug border, repaint counter state tracking to Nicosia::CompositionLayer
https://bugs.webkit.org/show_bug.cgi?id=187749

Reviewed by Carlos Garcia Campos.

Add the RepaintCounter and DebugBorder structs to
Nicosia::CompositionLayer::LayerState, tracking visibility as well as
repaint count or debug color and width.

Instances of RepaintCounter and DebugBorder types are kept in each
CoordinatedGraphicsLayer object, updating the relevant data as it is
changed (since the GraphicsLayer object isn't tracking these values on
its own). During layer flush these values (if changed) are then copied
over into the CompositionLayer state.

  • platform/graphics/nicosia/NicosiaPlatformLayer.cpp:

Also fix the year in the license header.

  • platform/graphics/nicosia/NicosiaPlatformLayer.h:

Also fix the year in the license header.

  • platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:

(WebCore::CoordinatedGraphicsLayer::didUpdateTileBuffers):
(WebCore::CoordinatedGraphicsLayer::setShowDebugBorder):
(WebCore::CoordinatedGraphicsLayer::setShowRepaintCounter):
(WebCore::CoordinatedGraphicsLayer::setDebugBorder):
(WebCore::CoordinatedGraphicsLayer::flushCompositingStateForThisLayerOnly):

  • platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h:
3:20 AM Changeset in webkit [233909] by zandobersek@gmail.com
  • 8 edits in trunk/Source

[CoordGraphics] Start tracking Nicosia layers in CoordinatedGraphicsState
https://bugs.webkit.org/show_bug.cgi?id=187751

Reviewed by Carlos Garcia Campos.

Start including the Nicosia::CompositionLayer objects in the
CoordinatedGraphicsState struct, under a separate NicosiaState struct.
References to all the layers in a given scene are kept in a HashSet,
and a separate reference to the root layer kept in a separate member
variable.

Source/WebCore:

  • platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:

(WebCore::CoordinatedGraphicsLayer::compositionLayer const):

  • platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h:

Add the getter method that returns internal Nicosia::CompositionLayer
object. This can't be defined in the class definition because of
WEBCORE_EXPORT used on the CoordinatedGraphicsLayer class.

  • platform/graphics/texmap/coordinated/CoordinatedGraphicsState.h:

Source/WebKit:

CompositingCoordinator now takes care of adding or removing the
Nicosia::CompositionLayer objects to the NicosiaState's HashSet, as well
as setting the root layer object when it's being initialized. Additions
and removals of Nicosia::CompositionLayer correspond to the additions
and removals of CoordinatedGraphicsLayer objects to the coordinator's
m_registeredLayers HashMap.

Upon each state commit that's done in CoordinatedGraphicsScene, the
NicosiaState object will be copied into the member variable. Nothing is
done yet with that state object, but in the near future it will be used
to finally commit all the state details into the TextureMapper layers.

  • Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp:

(WebKit::CoordinatedGraphicsScene::commitSceneState):

  • Shared/CoordinatedGraphics/CoordinatedGraphicsScene.h:
  • WebProcess/WebPage/CoordinatedGraphics/CompositingCoordinator.cpp:

(WebKit::CompositingCoordinator::initializeRootCompositingLayerIfNeeded):
(WebKit::CompositingCoordinator::createGraphicsLayer):
(WebKit::CompositingCoordinator::detachLayer):
(WebKit::CompositingCoordinator::attachLayer):

12:02 AM Changeset in webkit [233908] by Simon Fraser
  • 3 edits in trunk/Source/WebCore

Shrink CompositeAnimation and AnimationBase
https://bugs.webkit.org/show_bug.cgi?id=187683

Reviewed by Daniel Bates.

Reduce the size of CompositeAnimation and AnimationBase.

  • page/animation/AnimationBase.h:
  • page/animation/CompositeAnimation.h:

Jul 17, 2018:

11:08 PM Changeset in webkit [233907] by Michael Catanzaro
  • 5 edits in trunk/Source/ThirdParty

[WPE][GTK] Update xdgmime
https://bugs.webkit.org/show_bug.cgi?id=187727

Reviewed by Carlos Garcia Campos.

  • xdgmime/README:
  • xdgmime/README.webkit:
  • xdgmime/src/xdgmime.c:

(_xdg_mime_mime_type_subclass):

  • xdgmime/src/xdgmimecache.c:

(_xdg_mime_cache_new_from_file):
(_xdg_mime_cache_get_mime_type_for_file):
(_xdg_mime_cache_mime_type_subclass):

10:14 PM Changeset in webkit [233906] by keith_miller@apple.com
  • 7 edits in trunk/Source

Revert r233630 since it broke internal wasm benchmarks
https://bugs.webkit.org/show_bug.cgi?id=187746

Unreviewed revert.

Source/JavaScriptCore:

This patch seems to have broken internal Wasm benchmarks. This
issue is likely due to an underlying bug but let's rollout while
we investigate.

  • bytecode/CodeType.h:
  • bytecode/UnlinkedCodeBlock.cpp:

(JSC::UnlinkedCodeBlock::UnlinkedCodeBlock):

  • bytecode/UnlinkedCodeBlock.h:

(JSC::UnlinkedCodeBlock::codeType const):
(JSC::UnlinkedCodeBlock::didOptimize const):
(JSC::UnlinkedCodeBlock::setDidOptimize):

  • bytecode/VirtualRegister.h:

(JSC::VirtualRegister::VirtualRegister):
(): Deleted.

Source/WTF:

  • wtf/TriState.h:
8:50 PM Changeset in webkit [233905] by timothy_horton@apple.com
  • 6 edits in trunk/Source/WebKit

REGRESSION (iOS 12): Can't scroll to the bottom of the page in WKWebView while keyboard is up on pages with viewport-fit=cover
https://bugs.webkit.org/show_bug.cgi?id=187743
<rdar://problem/41651546>

Reviewed by Simon Fraser.

UIScrollView's _systemContentInset no longer includes keyboard insets
in apps linked on iOS 12+ when contentInsetAdjustmentBehavior is None.

We use contentInsetAdjustmentBehavior to control adjustment of other
sources of insets, but expect the keyboard inset to always be applied.

For now, barring a more comprehensive way to separate insets, re-add
the keyboard inset in cases where UIKit does not.

  • Platform/spi/ios/UIKitSPI.h:

Move some IPI to the SPI header.

  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView _haveSetObscuredInsets]):

  • UIProcess/API/Cocoa/WKWebViewInternal.h:

Make it possible for WKScrollView to check whether the client is overriding insets.

  • UIProcess/Cocoa/VersionChecks.h:

Add a linkedOnOrAfter() version for this new UIScrollView behavior.

  • UIProcess/ios/WKScrollView.mm:

(-[WKScrollView initWithFrame:]):
Force WKScrollView's scroll indicator to always respect insets. We always
want the scroll bars in a sensible place, even if the page sets
viewport-fit=cover.

(-[WKScrollView _adjustForAutomaticKeyboardInfo:animated:lastAdjustment:]):
Store the bottom inset due to the keyboard.

(-[WKScrollView _systemContentInset]):
Add the bottom inset due to the keyboard to the systemContentInset
in all cases where UIKit does not. Also avoid adding it if the client takes
full control of the insets, because the only client that does (MobileSafari)
includes insets-due-to-keyboard in their custom insets.

8:43 PM Changeset in webkit [233904] by Chris Dumez
  • 2 edits in trunk/Source/WebKit

RELEASE_ASSERT() under IPC::Connection::sendSync() from PluginProxy::supportsSnapshotting()
https://bugs.webkit.org/show_bug.cgi?id=187740
<rdar://problem/41818955>

Reviewed by Youenn Fablet.

As per the crash trace, PluginProxy::supportsSnapshotting() can be called during layout but does synchronous
IPC. As a result, we need to prevent WebCore re-entrancy by using DoNotProcessIncomingMessagesWhenWaitingForSyncReply
sendOption.

  • WebProcess/Plugins/PluginProxy.cpp:

(WebKit::PluginProxy::supportsSnapshotting const):

6:05 PM Changeset in webkit [233903] by graouts@webkit.org
  • 3 edits
    2 adds in trunk

Ensure timingFunctionForKeyframeAtIndex() can be used from setAnimatedPropertiesInStyle().
https://bugs.webkit.org/show_bug.cgi?id=187637
<rdar://problem/42157915>

Reviewed by Dean Jackson.

Source/WebCore:

Test: webanimations/empty-keyframes-crash.html

Unlike what we assumed, it is possible to have a non-declarative animation without any parsed keyframes.
This can happen as a result of calling Element.animate({}, …). In this case, we want to return a null
value in timingFunctionForKeyframeAtIndex() so we update the call site in setAnimatedPropertiesInStyle()
which is the only place where we didn't check for a null value and didn't know for sure that there would
be parsed keyframes to rely on in the case of a WebAnimation instance.

  • animation/KeyframeEffectReadOnly.cpp:

(WebCore::KeyframeEffectReadOnly::setAnimatedPropertiesInStyle):
(WebCore::KeyframeEffectReadOnly::timingFunctionForKeyframeAtIndex):

LayoutTests:

Add a new test that would crash prior to this change.

  • webanimations/empty-keyframes-crash-expected.txt: Added.
  • webanimations/empty-keyframes-crash.html: Added.
5:59 PM Changeset in webkit [233902] by Ryan Haddad
  • 1 edit
    2 adds in trunk/LayoutTests

Rebaseline imported/w3c/web-platform-tests/WebCryptoAPI/derive_bits_keys/pbkdf2.https.worker.html for Sierra after r233898.

Unreviewed test gardening.

  • platform/mac-sierra/imported/w3c/web-platform-tests/WebCryptoAPI/derive_bits_keys/pbkdf2.https.worker-expected.txt: Added.
  • platform/mac/imported/w3c/web-platform-tests/WebCryptoAPI/derive_bits_keys/pbkdf2.https.worker-expected.txt: Added.
5:39 PM Changeset in webkit [233901] by Truitt Savell
  • 2 edits in trunk/LayoutTests

Marking test as flakey

5:24 PM Changeset in webkit [233900] by jiewen_tan@apple.com
  • 6 edits in trunk/LayoutTests

Unreviewed, test gardening after r233898.

  • TestExpectations:
  • platform/gtk/TestExpectations:
  • platform/ios/TestExpectations:
  • platform/mac/TestExpectations:
  • platform/wpe/TestExpectations:
4:34 PM Changeset in webkit [233899] by sihui_liu@apple.com
  • 2 edits in trunk/Tools

REGRESSION: [macOS Sierra] TestWebKitAPI.WebKit.WebsiteDataStoreCustomPaths is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=187066
<rdar://problem/41609065>

Reviewed by Chris Dumez.

In r232668 we started to do reload if web process crashes by default. As we killed the web
process explicitly in this test, if web page got reloaded, messages would be sent again,
and flag set in message handler could keep the test continue to evaluate the expectation
without waiting for removeDataOfTypes to finish.

  • TestWebKitAPI/Tests/WebKitCocoa/WebsiteDataStoreCustomPaths.mm:

(-[WebsiteDataStoreCustomPathsMessageHandler webViewWebContentProcessDidTerminate:]):
(TEST):

4:06 PM Changeset in webkit [233898] by jiewen_tan@apple.com
  • 62 edits
    58 adds in trunk

[WebCrypto] Crypto operations should copy their parameters before hoping to another thread
https://bugs.webkit.org/show_bug.cgi?id=187501
<rdar://problem/41438160>

Reviewed by Youenn Fablet.

Source/WebCore:

This patch aims at making all captured variables in all crypto lambdas that need to be passed
to a worker thread thread safe, which includes:
1) changing ref counted objects to thread safe ref counted object.
2) adding isolatedCopy methods to non ref counted classes, so they can be called by CrossThreadCopy().

In addition to above changes, this patch also does the following things:
1) change the name CryptoAlgorithm::dispatchOperation => CryptoAlgorithm::dispatchOperationInWorkQueue
to make it clear that lambdas will be passed to a secondary thread.
2) make CryptoAlgorithmParameters as const parameters for all methods.
3) add null checks on BufferSource.length() and .data().

Tests: crypto/subtle/aes-gcm-import-key-unwrap-ec-raw-key.html

http/wpt/crypto/aes-cbc-crash.any.html
http/wpt/crypto/aes-cbc-crash.any.worker.html
http/wpt/crypto/aes-ctr-crash.any.html
http/wpt/crypto/aes-ctr-crash.any.worker.html
http/wpt/crypto/aes-gcm-crash.any.html
http/wpt/crypto/aes-gcm-crash.any.worker.html
http/wpt/crypto/derive-hmac-key-crash.any.html
http/wpt/crypto/derive-hmac-key-crash.any.worker.html
http/wpt/crypto/ecdsa-crash.any.html
http/wpt/crypto/ecdsa-crash.any.worker.html
http/wpt/crypto/hkdf-crash.any.html
http/wpt/crypto/hkdf-crash.any.worker.html
http/wpt/crypto/pbkdf2-crash.any.html
http/wpt/crypto/pbkdf2-crash.any.worker.html
http/wpt/crypto/rsa-oaep-crash.any.html
http/wpt/crypto/rsa-oaep-crash.any.worker.html
http/wpt/crypto/rsa-pss-crash.any.html
http/wpt/crypto/rsa-pss-crash.any.worker.html
http/wpt/crypto/unwrap-ec-key-crash.any.html
http/wpt/crypto/unwrap-ec-key-crash.any.worker.html
http/wpt/crypto/unwrap-rsa-key-crash.any.html
http/wpt/crypto/unwrap-rsa-key-crash.any.worker.html

  • bindings/js/BufferSource.h:

(WebCore::BufferSource::data const):
(WebCore::BufferSource::length const):

  • crypto/CryptoAlgorithm.cpp:

(WebCore::CryptoAlgorithm::encrypt):
(WebCore::CryptoAlgorithm::decrypt):
(WebCore::CryptoAlgorithm::sign):
(WebCore::CryptoAlgorithm::verify):
(WebCore::CryptoAlgorithm::deriveBits):
(WebCore::CryptoAlgorithm::importKey):
(WebCore::dispatchAlgorithmOperation):
(WebCore::CryptoAlgorithm::dispatchOperationInWorkQueue):
(WebCore::CryptoAlgorithm::dispatchOperation): Deleted.

  • crypto/CryptoAlgorithm.h:
  • crypto/SubtleCrypto.cpp:

(WebCore::crossThreadCopyImportParams):
(WebCore::SubtleCrypto::encrypt):
(WebCore::SubtleCrypto::decrypt):
(WebCore::SubtleCrypto::sign):
(WebCore::SubtleCrypto::verify):
(WebCore::SubtleCrypto::deriveKey):
(WebCore::SubtleCrypto::deriveBits):
(WebCore::SubtleCrypto::importKey):
(WebCore::SubtleCrypto::wrapKey):
(WebCore::SubtleCrypto::unwrapKey):

  • crypto/algorithms/CryptoAlgorithmAES_CBC.cpp:

(WebCore::CryptoAlgorithmAES_CBC::encrypt):
(WebCore::CryptoAlgorithmAES_CBC::decrypt):
(WebCore::CryptoAlgorithmAES_CBC::importKey):

  • crypto/algorithms/CryptoAlgorithmAES_CBC.h:
  • crypto/algorithms/CryptoAlgorithmAES_CFB.cpp:

(WebCore::CryptoAlgorithmAES_CFB::encrypt):
(WebCore::CryptoAlgorithmAES_CFB::decrypt):
(WebCore::CryptoAlgorithmAES_CFB::importKey):

  • crypto/algorithms/CryptoAlgorithmAES_CFB.h:
  • crypto/algorithms/CryptoAlgorithmAES_CTR.cpp:

(WebCore::parametersAreValid):
(WebCore::CryptoAlgorithmAES_CTR::encrypt):
(WebCore::CryptoAlgorithmAES_CTR::decrypt):
(WebCore::CryptoAlgorithmAES_CTR::importKey):

  • crypto/algorithms/CryptoAlgorithmAES_CTR.h:
  • crypto/algorithms/CryptoAlgorithmAES_GCM.cpp:

(WebCore::CryptoAlgorithmAES_GCM::encrypt):
(WebCore::CryptoAlgorithmAES_GCM::decrypt):
(WebCore::CryptoAlgorithmAES_GCM::importKey):

  • crypto/algorithms/CryptoAlgorithmAES_GCM.h:
  • crypto/algorithms/CryptoAlgorithmAES_KW.cpp:

(WebCore::CryptoAlgorithmAES_KW::importKey):

  • crypto/algorithms/CryptoAlgorithmAES_KW.h:
  • crypto/algorithms/CryptoAlgorithmECDH.cpp:

(WebCore::CryptoAlgorithmECDH::deriveBits):
(WebCore::CryptoAlgorithmECDH::importKey):

  • crypto/algorithms/CryptoAlgorithmECDH.h:
  • crypto/algorithms/CryptoAlgorithmECDSA.cpp:

(WebCore::CryptoAlgorithmECDSA::sign):
(WebCore::CryptoAlgorithmECDSA::verify):
(WebCore::CryptoAlgorithmECDSA::importKey):

  • crypto/algorithms/CryptoAlgorithmECDSA.h:
  • crypto/algorithms/CryptoAlgorithmHKDF.cpp:

(WebCore::CryptoAlgorithmHKDF::deriveBits):
(WebCore::CryptoAlgorithmHKDF::importKey):

  • crypto/algorithms/CryptoAlgorithmHKDF.h:
  • crypto/algorithms/CryptoAlgorithmHMAC.cpp:

(WebCore::CryptoAlgorithmHMAC::sign):
(WebCore::CryptoAlgorithmHMAC::verify):
(WebCore::CryptoAlgorithmHMAC::importKey):

  • crypto/algorithms/CryptoAlgorithmHMAC.h:
  • crypto/algorithms/CryptoAlgorithmPBKDF2.cpp:

(WebCore::CryptoAlgorithmPBKDF2::deriveBits):
(WebCore::CryptoAlgorithmPBKDF2::importKey):

  • crypto/algorithms/CryptoAlgorithmPBKDF2.h:
  • crypto/algorithms/CryptoAlgorithmRSAES_PKCS1_v1_5.cpp:

(WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::encrypt):
(WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::decrypt):
(WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::importKey):

  • crypto/algorithms/CryptoAlgorithmRSAES_PKCS1_v1_5.h:
  • crypto/algorithms/CryptoAlgorithmRSASSA_PKCS1_v1_5.cpp:

(WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::sign):
(WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::verify):
(WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::importKey):

  • crypto/algorithms/CryptoAlgorithmRSASSA_PKCS1_v1_5.h:
  • crypto/algorithms/CryptoAlgorithmRSA_OAEP.cpp:

(WebCore::CryptoAlgorithmRSA_OAEP::encrypt):
(WebCore::CryptoAlgorithmRSA_OAEP::decrypt):
(WebCore::CryptoAlgorithmRSA_OAEP::importKey):

  • crypto/algorithms/CryptoAlgorithmRSA_OAEP.h:
  • crypto/algorithms/CryptoAlgorithmRSA_PSS.cpp:

(WebCore::CryptoAlgorithmRSA_PSS::sign):
(WebCore::CryptoAlgorithmRSA_PSS::verify):
(WebCore::CryptoAlgorithmRSA_PSS::importKey):

  • crypto/algorithms/CryptoAlgorithmRSA_PSS.h:
  • crypto/gcrypt/CryptoAlgorithmAES_CBCGCrypt.cpp:

(WebCore::CryptoAlgorithmAES_CBC::platformEncrypt):
(WebCore::CryptoAlgorithmAES_CBC::platformDecrypt):

  • crypto/gcrypt/CryptoAlgorithmAES_CFBGCrypt.cpp:

(WebCore::CryptoAlgorithmAES_CFB::platformEncrypt):
(WebCore::CryptoAlgorithmAES_CFB::platformDecrypt):

  • crypto/gcrypt/CryptoAlgorithmAES_CTRGCrypt.cpp:

(WebCore::CryptoAlgorithmAES_CTR::platformEncrypt):
(WebCore::CryptoAlgorithmAES_CTR::platformDecrypt):

  • crypto/gcrypt/CryptoAlgorithmAES_GCMGCrypt.cpp:

(WebCore::CryptoAlgorithmAES_GCM::platformEncrypt):
(WebCore::CryptoAlgorithmAES_GCM::platformDecrypt):

  • crypto/gcrypt/CryptoAlgorithmHKDFGCrypt.cpp:

(WebCore::CryptoAlgorithmHKDF::platformDeriveBits):

  • crypto/gcrypt/CryptoAlgorithmPBKDF2GCrypt.cpp:

(WebCore::CryptoAlgorithmPBKDF2::platformDeriveBits):

  • crypto/gcrypt/CryptoAlgorithmRSA_OAEPGCrypt.cpp:

(WebCore::CryptoAlgorithmRSA_OAEP::platformEncrypt):
(WebCore::CryptoAlgorithmRSA_OAEP::platformDecrypt):

  • crypto/gcrypt/CryptoAlgorithmRSA_PSSGCrypt.cpp:

(WebCore::CryptoAlgorithmRSA_PSS::platformSign):
(WebCore::CryptoAlgorithmRSA_PSS::platformVerify):

  • crypto/mac/CryptoAlgorithmAES_CBCMac.cpp:

(WebCore::CryptoAlgorithmAES_CBC::platformEncrypt):
(WebCore::CryptoAlgorithmAES_CBC::platformDecrypt):

  • crypto/mac/CryptoAlgorithmAES_CFBMac.cpp:

(WebCore::CryptoAlgorithmAES_CFB::platformEncrypt):
(WebCore::CryptoAlgorithmAES_CFB::platformDecrypt):

  • crypto/mac/CryptoAlgorithmAES_CTRMac.cpp:

(WebCore::CryptoAlgorithmAES_CTR::platformEncrypt):
(WebCore::CryptoAlgorithmAES_CTR::platformDecrypt):

  • crypto/mac/CryptoAlgorithmAES_GCMMac.cpp:

(WebCore::CryptoAlgorithmAES_GCM::platformEncrypt):
(WebCore::CryptoAlgorithmAES_GCM::platformDecrypt):

  • crypto/mac/CryptoAlgorithmHKDFMac.cpp:

(WebCore::CryptoAlgorithmHKDF::platformDeriveBits):

  • crypto/mac/CryptoAlgorithmPBKDF2Mac.cpp:

(WebCore::CryptoAlgorithmPBKDF2::platformDeriveBits):

  • crypto/mac/CryptoAlgorithmRSA_OAEPMac.cpp:

(WebCore::CryptoAlgorithmRSA_OAEP::platformEncrypt):
(WebCore::CryptoAlgorithmRSA_OAEP::platformDecrypt):

  • crypto/mac/CryptoAlgorithmRSA_PSSMac.cpp:

(WebCore::CryptoAlgorithmRSA_PSS::platformSign):
(WebCore::CryptoAlgorithmRSA_PSS::platformVerify):

  • crypto/parameters/CryptoAlgorithmAesCbcCfbParams.h:
  • crypto/parameters/CryptoAlgorithmAesCtrParams.h:
  • crypto/parameters/CryptoAlgorithmAesGcmParams.h:
  • crypto/parameters/CryptoAlgorithmEcKeyParams.h:
  • crypto/parameters/CryptoAlgorithmEcdsaParams.h:
  • crypto/parameters/CryptoAlgorithmHkdfParams.h:
  • crypto/parameters/CryptoAlgorithmHmacKeyParams.h:
  • crypto/parameters/CryptoAlgorithmPbkdf2Params.h:
  • crypto/parameters/CryptoAlgorithmRsaHashedImportParams.h:
  • crypto/parameters/CryptoAlgorithmRsaOaepParams.h:
  • crypto/parameters/CryptoAlgorithmRsaPssParams.h:

LayoutTests:

crypto/subtle/aes-gcm-import-key-unwrap-ec-raw-key.html is an exception of this series of tests as
it only aims to test the correct behavoir of suggested algorithms. This patch aslo does some test
gardening.

  • TestExpectations:
  • crypto/subtle/aes-gcm-import-key-unwrap-ec-raw-key-expected.txt: Added.
  • crypto/subtle/aes-gcm-import-key-unwrap-ec-raw-key.html: Added.
  • http/wpt/crypto/aes-cbc-crash.any-expected.txt: Added.
  • http/wpt/crypto/aes-cbc-crash.any.html: Added.
  • http/wpt/crypto/aes-cbc-crash.any.js: Added.
  • http/wpt/crypto/aes-cbc-crash.any.worker-expected.txt: Added.
  • http/wpt/crypto/aes-cbc-crash.any.worker.html: Added.
  • http/wpt/crypto/aes-ctr-crash.any-expected.txt: Added.
  • http/wpt/crypto/aes-ctr-crash.any.html: Added.
  • http/wpt/crypto/aes-ctr-crash.any.js: Added.
  • http/wpt/crypto/aes-ctr-crash.any.worker-expected.txt: Added.
  • http/wpt/crypto/aes-ctr-crash.any.worker.html: Added.
  • http/wpt/crypto/aes-gcm-crash.any-expected.txt: Added.
  • http/wpt/crypto/aes-gcm-crash.any.html: Added.
  • http/wpt/crypto/aes-gcm-crash.any.js: Added.
  • http/wpt/crypto/aes-gcm-crash.any.worker-expected.txt: Added.
  • http/wpt/crypto/aes-gcm-crash.any.worker.html: Added.
  • http/wpt/crypto/derive-hmac-key-crash.any-expected.txt: Added.
  • http/wpt/crypto/derive-hmac-key-crash.any.html: Added.
  • http/wpt/crypto/derive-hmac-key-crash.any.js: Added.
  • http/wpt/crypto/derive-hmac-key-crash.any.worker-expected.txt: Added.
  • http/wpt/crypto/derive-hmac-key-crash.any.worker.html: Added.
  • http/wpt/crypto/ecdsa-crash.any-expected.txt: Added.
  • http/wpt/crypto/ecdsa-crash.any.html: Added.
  • http/wpt/crypto/ecdsa-crash.any.js: Added.
  • http/wpt/crypto/ecdsa-crash.any.worker-expected.txt: Added.
  • http/wpt/crypto/ecdsa-crash.any.worker.html: Added.
  • http/wpt/crypto/hkdf-crash.any-expected.txt: Added.
  • http/wpt/crypto/hkdf-crash.any.html: Added.
  • http/wpt/crypto/hkdf-crash.any.js: Added.
  • http/wpt/crypto/hkdf-crash.any.worker-expected.txt: Added.
  • http/wpt/crypto/hkdf-crash.any.worker.html: Added.
  • http/wpt/crypto/pbkdf2-crash.any-expected.txt: Added.
  • http/wpt/crypto/pbkdf2-crash.any.html: Added.
  • http/wpt/crypto/pbkdf2-crash.any.js: Added.
  • http/wpt/crypto/pbkdf2-crash.any.worker-expected.txt: Added.
  • http/wpt/crypto/pbkdf2-crash.any.worker.html: Added.
  • http/wpt/crypto/resources/common.js: Added.
  • http/wpt/crypto/rsa-oaep-crash.any-expected.txt: Added.
  • http/wpt/crypto/rsa-oaep-crash.any.html: Added.
  • http/wpt/crypto/rsa-oaep-crash.any.js: Added.
  • http/wpt/crypto/rsa-oaep-crash.any.worker-expected.txt: Added.
  • http/wpt/crypto/rsa-oaep-crash.any.worker.html: Added.
  • http/wpt/crypto/rsa-pss-crash.any-expected.txt: Added.
  • http/wpt/crypto/rsa-pss-crash.any.html: Added.
  • http/wpt/crypto/rsa-pss-crash.any.js: Added.
  • http/wpt/crypto/rsa-pss-crash.any.worker-expected.txt: Added.
  • http/wpt/crypto/rsa-pss-crash.any.worker.html: Added.
  • http/wpt/crypto/unwrap-ec-key-crash.any-expected.txt: Added.
  • http/wpt/crypto/unwrap-ec-key-crash.any.html: Added.
  • http/wpt/crypto/unwrap-ec-key-crash.any.js: Added.
  • http/wpt/crypto/unwrap-ec-key-crash.any.worker-expected.txt: Added.
  • http/wpt/crypto/unwrap-ec-key-crash.any.worker.html: Added.
  • http/wpt/crypto/unwrap-rsa-key-crash.any-expected.txt: Added.
  • http/wpt/crypto/unwrap-rsa-key-crash.any.html: Added.
  • http/wpt/crypto/unwrap-rsa-key-crash.any.js: Added.
  • http/wpt/crypto/unwrap-rsa-key-crash.any.worker.html: Added.
  • http/wpt/crypto/unwrap-rsa-key-crash.any.worker-expected.txt: Added.
2:50 PM Changeset in webkit [233897] by Chris Dumez
  • 7 edits in trunk

Turn on PSON in WebKitTestRunner
https://bugs.webkit.org/show_bug.cgi?id=186542

Reviewed by Brady Eidson.

Source/WebKit:

Fix leaking of pre-warmed WebContent processes which became obvious when turning
on process-swap-on-navigation by default in WebKitTestRunner. The issue was that
the WebProcessPool holds a strong reference to its WebProcessProxy objects via
m_processes data members. In turn, WebProcessProxy objects hold a strong reference
to their WebProcessPool via their m_processPool data member. This reference cycle
normally gets broken by calling WebProcessProxy::shutDown() which removes the
WebProcessProxy objects from its WebProcessPool's m_processes container.
WebProcessProxy::shutDown() normally gets called when a WebProcessProxy no longer
has any WebPageProxy objects. However, in the case of unused pre-warmed
WebProcessProxy objects, those never get any page and therefore we'd never break
the reference cycle. To address the issue, pre-warmed WebProcessProxy objects
now only hold a Weak reference to their process pool, only regular WebProcessProxy
objects hold a strong reference to their pool.

  • UIProcess/WebProcessPool.cpp:

(WebKit::WebProcessPool::~WebProcessPool):
(WebKit::WebProcessPool::tryTakePrewarmedProcess):

  • UIProcess/WebProcessPool.h:
  • UIProcess/WebProcessProxy.cpp:

(WebKit::WebProcessProxy::WebProcessProxy):
(WebKit::WebProcessProxy::getLaunchOptions):
(WebKit::WebProcessProxy::markIsNoLongerInPrewarmedPool):

  • UIProcess/WebProcessProxy.h:

(WebKit::WebProcessProxy::processPool):
(WebKit::WebProcessProxy::WeakOrStrongPtr::WeakOrStrongPtr):
(WebKit::WebProcessProxy::WeakOrStrongPtr::setIsWeak):
(WebKit::WebProcessProxy::WeakOrStrongPtr::get const):
(WebKit::WebProcessProxy::WeakOrStrongPtr::operator-> const):
(WebKit::WebProcessProxy::WeakOrStrongPtr::operator* const):
(WebKit::WebProcessProxy::WeakOrStrongPtr::operator bool const):
(WebKit::WebProcessProxy::WeakOrStrongPtr::updateStrongReference):

Tools:

Turn on PSON by default in WebKitTestRunner.

  • WebKitTestRunner/TestOptions.h:
2:00 PM Changeset in webkit [233896] by Kocsen Chung
  • 7 edits in tags/Safari-606.1.26.1/Source

Versioning.

1:50 PM Changeset in webkit [233895] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Unskip LayoutTest imported/w3c/web-platform-tests/css/css-display/display-contents-first-letter-002.html.
https://bugs.webkit.org/show_bug.cgi?id=186901

Unreviewed test gardening.

1:40 PM Changeset in webkit [233894] by Kocsen Chung
  • 1 copy in tags/Safari-606.1.26.1

New tag.

1:20 PM Changeset in webkit [233893] by mark.lam@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

CodeBlock::baselineVersion() should account for executables with purged codeBlocks.
https://bugs.webkit.org/show_bug.cgi?id=187736
<rdar://problem/42114371>

Reviewed by Michael Saboff.

CodeBlock::baselineVersion() currently checks for a null replacement but does not
account for the fact that that the replacement can also be null due to the
executable having being purged of its codeBlocks due to a memory event (see
ExecutableBase::clearCode()). This patch adds code to account for this.

  • bytecode/CodeBlock.cpp:

(JSC::CodeBlock::baselineVersion):

11:54 AM Changeset in webkit [233892] by commit-queue@webkit.org
  • 9 edits in trunk

[Web Animations] Interpolation between lengths with an "auto" value should be discrete
https://bugs.webkit.org/show_bug.cgi?id=187721

Patch by Antoine Quint <Antoine Quint> on 2018-07-17
Reviewed by Dean Jackson.

LayoutTests/imported/w3c:

Mark 2 new WPT progressions.

  • web-platform-tests/web-animations/animation-model/animation-types/discrete-expected.txt:

Source/WebCore:

When interpolating between two Length values, if one is "auto", we should use the from-value
from 0 and up to (but excluding) 0.5, and use the to-value from 0.5 to 1.

This change caused a regression in the legacy animation engine since it would create a CSS
transition even when the underlying and target values were non-interpolable. As such, the
underlying value would be used until the transition's mid-point and the tests at
legacy-animation-engine/imported/blink/transitions/transition-not-interpolable.html and
legacy-animation-engine/fast/animation/height-auto-transition-computed-value.html would fail
expecting the target value to be used immediately. We now ensure that no transition is actually
started if two values for a given property cannot be interpolated.

  • page/animation/CompositeAnimation.cpp:

(WebCore::CompositeAnimation::updateTransitions):

  • platform/Length.cpp:

(WebCore::blend):

LayoutTests:

Make two more tests opt into the new animation engine since they pass and they're not in the legacy-animation-engine directory.
A third test now has some logging due to transitions not actually running, which is expected and correct.

  • fast/animation/height-auto-transition-computed-value.html:
  • imported/blink/transitions/transition-not-interpolable.html:
  • legacy-animation-engine/transitions/transition-to-from-auto-expected.txt:
11:23 AM Changeset in webkit [233891] by Wenson Hsieh
  • 15 edits
    3 copies
    4 adds in trunk

Add an SPI hook to allow clients to yield document parsing and script execution
https://bugs.webkit.org/show_bug.cgi?id=187682
<rdar://problem/42207453>

Reviewed by Ryosuke Niwa.

Source/WebCore:

Using a single web process for both the Reader page and original web page on watchOS has multiple benefits,
including: (1) allowing the user to bail out of Reader and view the original web page without having to load it
again, and (2) improving the bringup time of the Reader page, since subresources are already cached in process
and we don't eat the additional cost of a web process launch if prewarming fails.

However, this has some drawbacks as well, one of which is that main thread work being done on behalf of the
original page may contend with work being done to load and render the Reader page. This is especially bad when
the page is in the middle of executing heavy script after Safari has already detected that the Reader version of
the page is available, but before it has finished loading the Reader page. The result is that script on the
original page may block the first paint of the Reader page (on New York Times articles, this often leads to an
apparent page load time of 25-35 seconds before the user sees anything besides a blank screen).

To mitigate this, we introduce a way for injected bundle clients to yield parsing and async script execution on
a document. This capability is surfaced in the form of an opaque token which clients may request from a
WKDOMDocument. Construction of the token causes the document to begin yielding and defer execution of previously
scheduled scripts, only if there were no active tokens on the document already. Similarly, destruction of all
active tokens on the document causes it to stop yielding and resume execution of scripts if needed.

Tests: ParserYieldTokenTests.PreventDocumentLoadByTakingParserYieldToken

ParserYieldTokenTests.TakeMultipleParserYieldTokens
ParserYieldTokenTests.DeferredScriptExecutesBeforeDocumentLoadWhenTakingParserYieldToken
ParserYieldTokenTests.AsyncScriptRunsWhenFetched

  • dom/Document.cpp:

(WebCore::Document::implicitOpen):

If the parser yield token was taken before the document's parser was created, tell the parser's scheduler to
start yielding immediately after creation.

(WebCore::DocumentParserYieldToken::DocumentParserYieldToken):
(WebCore::DocumentParserYieldToken::~DocumentParserYieldToken):

  • dom/Document.h:

Introduce a parser yield count to Document; as long as this count is greater than 0, we consider the Document to
have active yield tokens. When constructing or destroying a ParserYieldToken, we increment and decrement the
parser yield count (respectively).

(WebCore::Document::createParserYieldToken):
(WebCore::Document::hasActiveParserYieldToken const):

  • dom/DocumentParser.h:

(WebCore::DocumentParser::didBeginYieldingParser):
(WebCore::DocumentParser::didEndYieldingParser):

Hooks for Document to tell its parser that we've started or finished yielding. This updates a flag on the
parser's scheduler which is consulted when we determine whether to yield before a pumping token or executing
script.

  • dom/ScriptRunner.cpp:

(WebCore::ScriptRunner::resume):
(WebCore::ScriptRunner::notifyFinished):

  • dom/ScriptRunner.h:

(WebCore::ScriptRunner::didBeginYieldingParser):
(WebCore::ScriptRunner::didEndYieldingParser):

Hooks for Document to tell its ScriptRunner that we've started or finished yielding. These wrap calls to suspend
and resume.

  • html/parser/HTMLDocumentParser.cpp:

(WebCore::HTMLDocumentParser::didBeginYieldingParser):
(WebCore::HTMLDocumentParser::didEndYieldingParser):

Plumb to didBegin/didEnd calls to the HTMLParserScheduler.

  • html/parser/HTMLDocumentParser.h:
  • html/parser/HTMLParserScheduler.cpp:

(WebCore::HTMLParserScheduler::shouldYieldBeforeExecutingScript):

  • html/parser/HTMLParserScheduler.h:

(WebCore::HTMLParserScheduler::shouldYieldBeforeToken):

Consult a flag when determining whether to yield. This flag is set to true only while the document has an active
parser yield token.

(WebCore::HTMLParserScheduler::isScheduledForResume const):

Consider the parser scheduler to be scheduled for resume if there are active tokens. Without this change, we
incorrectly consider the document to be finished loading when we have yield tokens, since it appears that the
parser is no longer scheduled to pump its tokenizer.

(WebCore::HTMLParserScheduler::didBeginYieldingParser):
(WebCore::HTMLParserScheduler::didEndYieldingParser):

When the Document begins yielding due to the documet having active tokens or ends yielding after the document
loses all of its yield tokens, update a flag on the parser scheduler. After we finish yielding, additionally
reschedule the parser if needed to ensure that we continue parsing the document; without this additional change
to resume, we'll never get the document load or load events after relinquishing the yield token.

Source/WebKit:

Add hooks to WKDOMDocument to create and return an internal WKDOMDocumentParserYieldToken object, whose lifetime
is tied to a document parser yield token. See WebCore ChangeLog for more detail.

  • WebProcess/InjectedBundle/API/mac/WKDOMDocument.h:
  • WebProcess/InjectedBundle/API/mac/WKDOMDocument.mm:

(-[WKDOMDocumentParserYieldToken initWithDocument:]):
(-[WKDOMDocument parserYieldToken]):

Tools:

Add a few tests to exercise the new document yield token SPI, verifying that clients can use the SPI to defer
document load, and that doing so doesn't cause deferred script to execute in the wrong order (i.e. before
synchronous script, or after "DOMContentLoaded").

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WebKitCocoa/ParserYieldTokenPlugIn.mm: Added.

(-[ParserYieldTokenPlugIn takeDocumentParserTokenAfterCommittingLoad]):
(-[ParserYieldTokenPlugIn releaseDocumentParserToken]):
(-[ParserYieldTokenPlugIn webProcessPlugInBrowserContextController:didCommitLoadForFrame:]):
(-[ParserYieldTokenPlugIn webProcessPlugIn:didCreateBrowserContextController:]):
(-[ParserYieldTokenPlugIn webProcessPlugInBrowserContextController:didFinishDocumentLoadForFrame:]):
(-[ParserYieldTokenPlugIn webProcessPlugInBrowserContextController:didFinishLoadForFrame:]):

Add an injected bundle object that knows how to take and release multiple document parser yield tokens.

  • TestWebKitAPI/Tests/WebKitCocoa/ParserYieldTokenTests.h: Added.
  • TestWebKitAPI/Tests/WebKitCocoa/ParserYieldTokenTests.mm: Added.

(+[ParserYieldTokenTestWebView webView]):
(-[ParserYieldTokenTestWebView bundle]):
(-[ParserYieldTokenTestWebView schemeHandler]):
(-[ParserYieldTokenTestWebView didFinishDocumentLoad]):
(-[ParserYieldTokenTestWebView didFinishLoad]):
(waitForDelay):
(TEST):

  • TestWebKitAPI/Tests/WebKitCocoa/TestURLSchemeHandler.h: Added.
  • TestWebKitAPI/Tests/WebKitCocoa/TestURLSchemeHandler.mm: Added.

(-[TestURLSchemeHandler webView:startURLSchemeTask:]):
(-[TestURLSchemeHandler webView:stopURLSchemeTask:]):
(-[TestURLSchemeHandler setStartURLSchemeTaskHandler:]):
(-[TestURLSchemeHandler startURLSchemeTaskHandler]):
(-[TestURLSchemeHandler setStopURLSchemeTaskHandler:]):
(-[TestURLSchemeHandler stopURLSchemeTaskHandler]):

Add a new test helper class to handle custom schemes via a block-based API.

  • TestWebKitAPI/Tests/WebKitCocoa/text-with-async-script.html: Added.

New test HTML page that contains a deferred script element, a synchronous script element, another deferred
script element, and then some text, images, and links.

  • TestWebKitAPI/Tests/WebKitCocoa/text-with-deferred-script.html: Added.
11:21 AM Changeset in webkit [233890] by Truitt Savell
  • 2 edits in trunk/Tools

Adding myself to Contributors.json

11:04 AM Changeset in webkit [233889] by commit-queue@webkit.org
  • 2 edits in trunk/Tools

[macOS] TestWebKitAPI.PictureInPicture.WKUIDelegate is timing out
https://bugs.webkit.org/show_bug.cgi?id=187730

Patch by Aditya Keerthi <Aditya Keerthi> on 2018-07-17
Reviewed by Jer Noble.

This regression was introduced by r233865. PIP can now only be initiated from a
window that is on screen.

  • TestWebKitAPI/Tests/WebKitCocoa/PictureInPictureDelegate.mm:

(TestWebKitAPI::TEST):

10:45 AM Changeset in webkit [233888] by wilander@apple.com
  • 54 edits in trunk

Add completion handlers to TestRunner functions setStatisticsLastSeen(), setStatisticsPrevalentResource(), setStatisticsVeryPrevalentResource(), setStatisticsHasHadUserInteraction(), and setStatisticsHasHadNonRecentUserInteraction()
https://bugs.webkit.org/show_bug.cgi?id=187710
<rdar://problem/42252757>

Reviewed by Chris Dumez.

Source/WebKit:

These changes are to back the completion handler functionality of
TestRunner functions:

  • setStatisticsLastSeen(),
  • setStatisticsPrevalentResource(),
  • setStatisticsVeryPrevalentResource(),
  • setStatisticsHasHadUserInteraction(), and
  • setStatisticsHasHadNonRecentUserInteraction().
  • UIProcess/API/C/WKWebsiteDataStoreRef.cpp:

(WKWebsiteDataStoreSetStatisticsLastSeen):
(WKWebsiteDataStoreSetStatisticsPrevalentResource):
(WKWebsiteDataStoreSetStatisticsVeryPrevalentResource):
(WKWebsiteDataStoreSetStatisticsHasHadUserInteraction):
(WKWebsiteDataStoreSetStatisticsHasHadNonRecentUserInteraction):

  • UIProcess/API/C/WKWebsiteDataStoreRef.h:
  • UIProcess/WebResourceLoadStatisticsStore.cpp:

(WebKit::WebResourceLoadStatisticsStore::logUserInteraction):
(WebKit::WebResourceLoadStatisticsStore::logNonRecentUserInteraction):
(WebKit::WebResourceLoadStatisticsStore::clearUserInteraction):
(WebKit::WebResourceLoadStatisticsStore::setLastSeen):
(WebKit::WebResourceLoadStatisticsStore::setPrevalentResource):
(WebKit::WebResourceLoadStatisticsStore::setVeryPrevalentResource):
(WebKit::WebResourceLoadStatisticsStore::clearPrevalentResource):

  • UIProcess/WebResourceLoadStatisticsStore.h:

Tools:

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

(WTR::InjectedBundle::didReceiveMessageToPage):

  • WebKitTestRunner/InjectedBundle/TestRunner.cpp:

(WTR::TestRunner::setStatisticsLastSeen):
(WTR::TestRunner::statisticsCallDidSetLastSeenCallback):
(WTR::TestRunner::setStatisticsPrevalentResource):
(WTR::TestRunner::statisticsCallDidSetPrevalentResourceCallback):
(WTR::TestRunner::setStatisticsVeryPrevalentResource):
(WTR::TestRunner::statisticsCallDidSetVeryPrevalentResourceCallback):
(WTR::TestRunner::setStatisticsHasHadUserInteraction):
(WTR::TestRunner::setStatisticsHasHadNonRecentUserInteraction):
(WTR::TestRunner::statisticsCallDidSetHasHadUserInteractionCallback):

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

(WTR::TestController::setStatisticsLastSeen):
(WTR::TestController::setStatisticsPrevalentResource):
(WTR::TestController::setStatisticsVeryPrevalentResource):
(WTR::TestController::setStatisticsHasHadUserInteraction):
(WTR::TestController::setStatisticsHasHadNonRecentUserInteraction):

  • WebKitTestRunner/TestInvocation.cpp:

(WTR::TestInvocation::didSetLastSeen):
(WTR::TestInvocation::didSetPrevalentResource):
(WTR::TestInvocation::didSetVeryPrevalentResource):
(WTR::TestInvocation::didSetHasHadUserInteraction):
(WTR::TestInvocation::didSetHasHadNonRecentUserInteraction):

  • WebKitTestRunner/TestInvocation.h:

LayoutTests:

These changes are to update all test cases that make use of
TestRunner functions:

  • setStatisticsLastSeen(),
  • setStatisticsPrevalentResource(),
  • setStatisticsVeryPrevalentResource(),
  • setStatisticsHasHadUserInteraction(), and
  • setStatisticsHasHadNonRecentUserInteraction().
  • http/tests/resourceLoadStatistics/add-blocking-to-redirect.html:
  • http/tests/resourceLoadStatistics/add-partitioning-to-redirect.html:
  • http/tests/resourceLoadStatistics/classify-as-non-prevalent-based-on-mixed-statistics.html:
  • http/tests/resourceLoadStatistics/classify-as-non-prevalent-based-on-sub-frame-under-top-frame-origins.html:
  • http/tests/resourceLoadStatistics/classify-as-non-prevalent-based-on-subresource-under-top-frame-origins.html:
  • http/tests/resourceLoadStatistics/classify-as-non-prevalent-based-on-subresource-unique-redirects-to.html:
  • http/tests/resourceLoadStatistics/classify-as-prevalent-based-on-mixed-statistics.html:
  • http/tests/resourceLoadStatistics/classify-as-prevalent-based-on-sub-frame-under-top-frame-origins.html:
  • http/tests/resourceLoadStatistics/classify-as-prevalent-based-on-subresource-redirect-collusion.html:
  • http/tests/resourceLoadStatistics/classify-as-prevalent-based-on-subresource-redirect-to-prevalent.html:
  • http/tests/resourceLoadStatistics/classify-as-prevalent-based-on-subresource-under-top-frame-origins.html:
  • http/tests/resourceLoadStatistics/classify-as-prevalent-based-on-subresource-unique-redirects-to.html:
  • http/tests/resourceLoadStatistics/classify-as-prevalent-based-on-top-frame-redirect-collusion.html:
  • http/tests/resourceLoadStatistics/classify-as-prevalent-based-on-top-frame-redirect-to-prevalent.html:
  • http/tests/resourceLoadStatistics/classify-as-prevalent-based-on-top-frame-unique-redirects-to.html:
  • http/tests/resourceLoadStatistics/classify-as-very-prevalent-based-on-mixed-statistics.html:
  • http/tests/resourceLoadStatistics/clear-in-memory-and-persistent-store-one-hour.html:
  • http/tests/resourceLoadStatistics/clear-in-memory-and-persistent-store.html:
  • http/tests/resourceLoadStatistics/do-not-block-top-level-navigation-redirect.html:
  • http/tests/resourceLoadStatistics/grandfathering.html:
  • http/tests/resourceLoadStatistics/non-prevalent-resource-with-user-interaction.html:
  • http/tests/resourceLoadStatistics/non-prevalent-resource-without-user-interaction.html:
  • http/tests/resourceLoadStatistics/non-prevalent-resources-can-access-cookies-in-a-third-party-context.html:
  • http/tests/resourceLoadStatistics/partitioned-and-unpartitioned-cookie-deletion.html:
  • http/tests/resourceLoadStatistics/partitioned-and-unpartitioned-cookie-with-partitioning-timeout-expected.txt:
  • http/tests/resourceLoadStatistics/partitioned-and-unpartitioned-cookie-with-partitioning-timeout.html:
  • http/tests/resourceLoadStatistics/partitioned-cookies-with-and-without-user-interaction.html:
  • http/tests/resourceLoadStatistics/prevalent-resource-handled-keydown.html:
  • http/tests/resourceLoadStatistics/prevalent-resource-unhandled-keydown.html:
  • http/tests/resourceLoadStatistics/prevalent-resource-with-user-interaction-timeout.html:
  • http/tests/resourceLoadStatistics/prevalent-resource-with-user-interaction.html:
  • http/tests/resourceLoadStatistics/prevalent-resource-without-user-interaction.html:
  • http/tests/resourceLoadStatistics/prune-statistics.html:
  • http/tests/resourceLoadStatistics/remove-blocking-in-redirect.html:
  • http/tests/resourceLoadStatistics/remove-partitioning-in-redirect.html:
  • http/tests/resourceLoadStatistics/strip-referrer-to-origin-for-prevalent-subresource-redirects.html:
  • http/tests/resourceLoadStatistics/strip-referrer-to-origin-for-prevalent-subresource-requests.html:
  • http/tests/resourceLoadStatistics/telemetry-generation.html:
  • http/tests/resourceLoadStatistics/third-party-cookie-with-and-without-user-interaction.html:
  • http/tests/resourceLoadStatistics/user-interaction-only-reported-once-within-short-period-of-time.html:
9:59 AM Changeset in webkit [233887] by Ryan Haddad
  • 3 edits in trunk/LayoutTests

Rebaseline displaylists/extent-includes-* tests for mac-wk1 after r233869.
https://bugs.webkit.org/show_bug.cgi?id=187574

Unreviewed test gardening.

  • platform/mac-wk1/displaylists/extent-includes-shadow-expected.txt:
  • platform/mac-wk1/displaylists/extent-includes-transforms-expected.txt:
9:52 AM Changeset in webkit [233886] by krit@webkit.org
  • 5 edits
    3 adds
    2 deletes in trunk

[clip-path] Implement support for margin-box as reference box and box shape
https://bugs.webkit.org/show_bug.cgi?id=127984

Reviewed by Simon Fraser.

Compute the margin-box rectangle as needed for clip-path based on the actual
computed values for the margin-top, *-left, *-bottom, *-right properties.

Source/WebCore:

Test: css3/masking/clip-path-margin-box.html

  • rendering/RenderBox.h:

(WebCore::RenderBox::marginBoxRect const):

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

(WebCore::computeReferenceBox):

LayoutTests:

  • css3/masking/clip-path-circle-margin-box-expected.html: Added.
  • css3/masking/clip-path-margin-box-expected.html: Added.
  • css3/masking/clip-path-margin-box.html: Added.
  • platform/mac/css3/masking/clip-path-circle-margin-box-expected.png: Removed.
  • platform/mac/css3/masking/clip-path-circle-margin-box-expected.txt: Removed.
1:48 AM Changeset in webkit [233885] by jfernandez@igalia.com
  • 5 edits
    6 adds in trunk

Delete content of a single cell table should not delete the whole table
https://bugs.webkit.org/show_bug.cgi?id=173117

Reviewed by Ryosuke Niwa.

Source/WebCore:

We should not extend selection looking for special elements if the
delete operation has been triggered by a caret based selection.

This change is based on a recent [1] resolution of the Editing TF,
which acknowledges that behavior of single-cell tables must be the
same that multi-cell tables and even if the last character is
deleted, we should not delete the whole table structure.

A different case would be when the user actively selects the whole
content of a table; in this case, as we do in multi-cell tables,
the structure of single-cell tables should be deleted together
with the content.

[1] https://github.com/w3c/editing/issues/163

Tests: editing/deleting/backspace-delete-last-char-in-table.html

editing/deleting/forward-delete-last-char-in-table.html
editing/deleting/select-and-delete-last-char-in-table.html

  • editing/TypingCommand.cpp:

(WebCore::TypingCommand::deleteKeyPressed):
(WebCore::TypingCommand::forwardDeleteKeyPressed):

LayoutTests:

Tests to verify that single-cell tables are not deleted when their
last character is deleted, unless it was previously selected by
the user.

Changes two expected files to adapt them to the new logic.

  • LayoutTests/editing/deleting/deleting-relative-positioned-special-element-expected.txt: The paragraph is not deleted, even if it's empty. The paragraphs above are not merged, which was the goal of the test.
  • editing/deleting/delete-last-char-in-table-expected.txt: The table is not removed, even if it's empty. The formatted elements are deleted, which was the goal of the test.
  • editing/deleting/backspace-delete-last-char-in-table-expected.txt: Added.
  • editing/deleting/backspace-delete-last-char-in-table.html: Added.
  • editing/deleting/forward-delete-last-char-in-table-expected.txt: Added.
  • editing/deleting/forward-delete-last-char-in-table.html: Added.
  • editing/deleting/select-and-delete-last-char-in-table-expected.txt: Added.
  • editing/deleting/select-and-delete-last-char-in-table.html: Added.

Jul 16, 2018:

10:07 PM Changeset in webkit [233884] by Dewei Zhu
  • 2 edits in trunk/Websites/perf.webkit.org

CustomConfigurationTestGroupForm should dispatch different arguments based on whether analysis task is created.
https://bugs.webkit.org/show_bug.cgi?id=187675

Reviewed by Ryosuke Niwa.

This change will fix the bug that no notification will be sent for any test groups except the
first one in any custom perf-try A/B task.

  • public/v3/components/custom-configuration-test-group-form.js:

(CustomConfigurationTestGroupForm.prototype.startTesting): Conditionally includes taskName based on
whether or not analysis task is created.

9:44 PM Changeset in webkit [233883] by Megan Gardner
  • 2 edits in trunk/Source/WebCore

Correctly adjust scroll offsets when a page is zoomed
https://bugs.webkit.org/show_bug.cgi?id=187673
<rdar://problem/41712829>

Reviewed by Wenson Hsieh.

Will add test later.

Make sure that distance is scaled by the pageScaleFactor, to
make sure that we scroll correctly when we are zoomed in.

  • page/ios/EventHandlerIOS.mm:

(WebCore::autoscrollAdjustmentFactorForScreenBoundaries):

9:22 PM Changeset in webkit [233882] by Simon Fraser
  • 61 edits
    58 deletes in trunk

Roll out r233873 and r233875 since they caused 8 new layout test crashes.

  • TestExpectations:
  • crypto/subtle/aes-gcm-import-key-unwrap-ec-raw-key-expected.txt: Removed.
  • crypto/subtle/aes-gcm-import-key-unwrap-ec-raw-key.html: Removed.
  • http/wpt/crypto/aes-cbc-crash.any-expected.txt: Removed.
  • http/wpt/crypto/aes-cbc-crash.any.html: Removed.
  • http/wpt/crypto/aes-cbc-crash.any.js: Removed.
  • http/wpt/crypto/aes-cbc-crash.any.worker-expected.txt: Removed.
  • http/wpt/crypto/aes-cbc-crash.any.worker.html: Removed.
  • http/wpt/crypto/aes-ctr-crash.any-expected.txt: Removed.
  • http/wpt/crypto/aes-ctr-crash.any.html: Removed.
  • http/wpt/crypto/aes-ctr-crash.any.js: Removed.
  • http/wpt/crypto/aes-ctr-crash.any.worker-expected.txt: Removed.
  • http/wpt/crypto/aes-ctr-crash.any.worker.html: Removed.
  • http/wpt/crypto/aes-gcm-crash.any-expected.txt: Removed.
  • http/wpt/crypto/aes-gcm-crash.any.html: Removed.
  • http/wpt/crypto/aes-gcm-crash.any.js: Removed.
  • http/wpt/crypto/aes-gcm-crash.any.worker-expected.txt: Removed.
  • http/wpt/crypto/aes-gcm-crash.any.worker.html: Removed.
  • http/wpt/crypto/derive-hmac-key-crash.any-expected.txt: Removed.
  • http/wpt/crypto/derive-hmac-key-crash.any.html: Removed.
  • http/wpt/crypto/derive-hmac-key-crash.any.js: Removed.
  • http/wpt/crypto/derive-hmac-key-crash.any.worker-expected.txt: Removed.
  • http/wpt/crypto/derive-hmac-key-crash.any.worker.html: Removed.
  • http/wpt/crypto/ecdsa-crash.any-expected.txt: Removed.
  • http/wpt/crypto/ecdsa-crash.any.html: Removed.
  • http/wpt/crypto/ecdsa-crash.any.js: Removed.
  • http/wpt/crypto/ecdsa-crash.any.worker-expected.txt: Removed.
  • http/wpt/crypto/ecdsa-crash.any.worker.html: Removed.
  • http/wpt/crypto/hkdf-crash.any-expected.txt: Removed.
  • http/wpt/crypto/hkdf-crash.any.html: Removed.
  • http/wpt/crypto/hkdf-crash.any.js: Removed.
  • http/wpt/crypto/hkdf-crash.any.worker-expected.txt: Removed.
  • http/wpt/crypto/hkdf-crash.any.worker.html: Removed.
  • http/wpt/crypto/pbkdf2-crash.any-expected.txt: Removed.
  • http/wpt/crypto/pbkdf2-crash.any.html: Removed.
  • http/wpt/crypto/pbkdf2-crash.any.js: Removed.
  • http/wpt/crypto/pbkdf2-crash.any.worker-expected.txt: Removed.
  • http/wpt/crypto/pbkdf2-crash.any.worker.html: Removed.
  • http/wpt/crypto/resources/common.js: Removed.
  • http/wpt/crypto/rsa-oaep-crash.any-expected.txt: Removed.
  • http/wpt/crypto/rsa-oaep-crash.any.html: Removed.
  • http/wpt/crypto/rsa-oaep-crash.any.js: Removed.
  • http/wpt/crypto/rsa-oaep-crash.any.worker-expected.txt: Removed.
  • http/wpt/crypto/rsa-oaep-crash.any.worker.html: Removed.
  • http/wpt/crypto/rsa-pss-crash.any-expected.txt: Removed.
  • http/wpt/crypto/rsa-pss-crash.any.html: Removed.
  • http/wpt/crypto/rsa-pss-crash.any.js: Removed.
  • http/wpt/crypto/rsa-pss-crash.any.worker-expected.txt: Removed.
  • http/wpt/crypto/rsa-pss-crash.any.worker.html: Removed.
  • http/wpt/crypto/unwrap-ec-key-crash.any-expected.txt: Removed.
  • http/wpt/crypto/unwrap-ec-key-crash.any.html: Removed.
  • http/wpt/crypto/unwrap-ec-key-crash.any.js: Removed.
  • http/wpt/crypto/unwrap-ec-key-crash.any.worker-expected.txt: Removed.
  • http/wpt/crypto/unwrap-ec-key-crash.any.worker.html: Removed.
  • http/wpt/crypto/unwrap-rsa-key-crash.any-expected.txt: Removed.
  • http/wpt/crypto/unwrap-rsa-key-crash.any.html: Removed.
  • http/wpt/crypto/unwrap-rsa-key-crash.any.js: Removed.
  • http/wpt/crypto/unwrap-rsa-key-crash.any.worker-expected.txt: Removed.
  • http/wpt/crypto/unwrap-rsa-key-crash.any.worker.html: Removed.
8:38 PM Changeset in webkit [233881] by rniwa@webkit.org
  • 2 edits in trunk

Update ReadMe.md line 68
https://bugs.webkit.org/show_bug.cgi?id=187533

Reviewed by Wenson Hsieh.

  • ReadMe.md:
8:33 PM Changeset in webkit [233880] by rniwa@webkit.org
  • 3 edits in trunk/LayoutTests

[ WK2 ] Layout Test editing/selection/update-selection-by-style-change.html is flaky
https://bugs.webkit.org/show_bug.cgi?id=187649

Reviewed by Wenson Hsieh.

Force update the selection before ending the test.

  • editing/selection/update-selection-by-style-change.html:
7:50 PM Changeset in webkit [233879] by rniwa@webkit.org
  • 2 edits in trunk/Source/WebCore

Release assert in ~TimerBase is getting hit in WK1 apps which uses JSC API directly
https://bugs.webkit.org/show_bug.cgi?id=187713
<rdar://problem/41759548>

Reviewed by Simon Fraser.

Turn this into a debug assertion in WebKit1 on iOS since JSC API doesn't grab the web thread lock,
which means that Timer can get destroyed without the web thread lock in the main thread.

  • platform/Timer.cpp:

(WebCore::TimerBase::~TimerBase):
(WebCore::TimerBase::setNextFireTime):

7:17 PM Changeset in webkit [233878] by commit-queue@webkit.org
  • 3 edits in trunk/Tools

Fix API Test failures introduced by r233865
https://bugs.webkit.org/show_bug.cgi?id=187720

Unreviewed APITest fix after r233865.

Fullscreen can now only be initiated from a window that is on screen.

Patch by Jeremy Jones <jeremyj@apple.com> on 2018-07-16

  • TestWebKitAPI/Tests/WebKitCocoa/FullscreenDelegate.mm:

(TestWebKitAPI::TEST):

  • TestWebKitAPI/Tests/WebKitCocoa/FullscreenTopContentInset.mm:

(TestWebKitAPI::TEST):

7:03 PM Changeset in webkit [233877] by Simon Fraser
  • 20 edits
    2 adds in trunk

Add color filter for transforming colors in Dark Mode
https://bugs.webkit.org/show_bug.cgi?id=187717
Source/WebCore:

rdar://problem/41146650

Reviewed by Dean Jackson.

Add a new filter function for use in -apple-color-filter for transforming colors
when in Dark Mode. The filter is called apple-invert-lightness(), and takes no parameters.
It's based on a lightness invert in HSL space, with some adjustments to improve the contrast
of some colors on dark backgrounds, so does a much better job that using invert() with hue-rotate().

Test: css3/color-filters/color-filter-apple-invert-lightness.html

  • css/CSSComputedStyleDeclaration.cpp:

(WebCore::ComputedStyleExtractor::valueForFilter):

  • css/CSSValueKeywords.in:
  • css/StyleResolver.cpp:

(WebCore::filterOperationForType):
(WebCore::StyleResolver::createFilterOperations):

  • css/parser/CSSPropertyParser.cpp:

(WebCore::CSSPropertyParser::parseSingleValue):

  • css/parser/CSSPropertyParserHelpers.cpp:

(WebCore::CSSPropertyParserHelpers::consumeFilterImage):
(WebCore::CSSPropertyParserHelpers::isPixelFilterFunction):
(WebCore::CSSPropertyParserHelpers::isColorFilterFunction):
(WebCore::CSSPropertyParserHelpers::consumeFilterFunction):
(WebCore::CSSPropertyParserHelpers::consumeFilter):
(WebCore::CSSPropertyParserHelpers::isValidPrimitiveFilterFunction): Deleted.

  • css/parser/CSSPropertyParserHelpers.h:
  • page/FrameView.cpp:

(WebCore::FrameView::paintContents):

  • platform/graphics/Color.cpp:
  • platform/graphics/ColorUtilities.cpp:

(WebCore::sRGBToLinearComponents):
(WebCore::linearToSRGBComponents):
(WebCore::sRGBToLinearColorComponentForLuminance):
(WebCore::luminance):
(WebCore::sRGBToHSL):
(WebCore::calcHue):
(WebCore::HSLToSRGB):
(WebCore::ColorMatrix::ColorMatrix):

  • platform/graphics/ColorUtilities.h:
  • platform/graphics/ca/cocoa/PlatformCAFiltersCocoa.mm:

(PlatformCAFilters::filterValueForOperation):
(PlatformCAFilters::colorMatrixValueForFilter):

  • platform/graphics/filters/FEColorMatrix.cpp:
  • platform/graphics/filters/FilterOperation.cpp:

(WebCore::InvertLightnessFilterOperation::operator== const):
(WebCore::InvertLightnessFilterOperation::blend):
(WebCore::InvertLightnessFilterOperation::transformColor const):
(WebCore::operator<<):

  • platform/graphics/filters/FilterOperation.h:
  • rendering/FilterEffectRenderer.cpp:

(WebCore::FilterEffectRenderer::build):

Source/WebKit:

Reviewed by Dean Jackson.

  • Shared/WebCoreArgumentCoders.cpp:

(IPC::ArgumentCoder<FilterOperation>::encode):
(IPC::decodeFilterOperation):

LayoutTests:

rdar://problem/41146650

Reviewed by Dean Jackson.

  • css3/color-filters/color-filter-apple-invert-lightness-expected.html: Added.
  • css3/color-filters/color-filter-apple-invert-lightness.html: Added.
  • css3/color-filters/color-filter-parsing-expected.txt:
  • css3/color-filters/color-filter-parsing.html:
6:10 PM Changeset in webkit [233876] by timothy_horton@apple.com
  • 2 edits in trunk/Source/WebKit

Black flash in content area when returning to Mail
https://bugs.webkit.org/show_bug.cgi?id=187719
<rdar://problem/42165340>

Reviewed by Wenson Hsieh.

  • UIProcess/ios/WebPageProxyIOS.mm:

(WebKit::WebPageProxy::applicationDidFinishSnapshottingAfterEnteringBackground):
This still reproduces sometimes even after r233723, because:

If a pending commit arrives after ApplicationDidEnterBackground (when we
ask the web content process to freeze the layer tree), and after
ApplicationDidFinishSnapshottingAfterEnteringBackground (when we hide
WKContentView), but before the process sleeps, it will cause WKContentView
to be unhidden (potentially including layers with empty surfaces as contents).
Nothing will re-hide WKContentView. Instead, we should wait for the next
*pending* commit, which will necessarily not come until after the application
returns to the foreground because of the strict IPC ordering between
the message that freezes the layer tree and the "next commit" mechanism.

6:03 PM Changeset in webkit [233875] by jiewen_tan@apple.com
  • 2 edits in trunk/Source/WebCore

Unreviewed, build fix for r233873.

  • crypto/SubtleCrypto.cpp:

(WebCore::crossThreadCopyImportParams):

5:54 PM Changeset in webkit [233874] by Kocsen Chung
  • 1 copy in tags/Safari-606.1.26

Tag Safari-606.1.26.

5:31 PM Changeset in webkit [233873] by jiewen_tan@apple.com
  • 61 edits
    60 adds in trunk

[WebCrypto] Crypto operations should copy their parameters before hoping to another thread
https://bugs.webkit.org/show_bug.cgi?id=187501
<rdar://problem/41438160>

Reviewed by Youenn Fablet.

Source/WebCore:

This patch aims at making all captured variables in all crypto lambdas that need to be passed
to a worker thread thread safe, which includes:
1) changing ref counted objects to thread safe ref counted object.
2) adding isolatedCopy methods to non ref counted classes, so they can be called by CrossThreadCopy().

In addition to above changes, this patch also does the following things:
1) change the name CryptoAlgorithm::dispatchOperation => CryptoAlgorithm::dispatchOperationInWorkQueue
to make it clear that lambdas will be passed to a secondary thread.
2) make CryptoAlgorithmParameters as const parameters for all methods.

Tests: crypto/subtle/aes-gcm-import-key-unwrap-ec-raw-key.html

http/wpt/crypto/aes-cbc-crash.any.html
http/wpt/crypto/aes-cbc-crash.any.worker.html
http/wpt/crypto/aes-ctr-crash.any.html
http/wpt/crypto/aes-ctr-crash.any.worker.html
http/wpt/crypto/aes-gcm-crash.any.html
http/wpt/crypto/aes-gcm-crash.any.worker.html
http/wpt/crypto/derive-hmac-key-crash.any.html
http/wpt/crypto/derive-hmac-key-crash.any.worker.html
http/wpt/crypto/ecdsa-crash.any.html
http/wpt/crypto/ecdsa-crash.any.worker.html
http/wpt/crypto/hkdf-crash.any.html
http/wpt/crypto/hkdf-crash.any.worker.html
http/wpt/crypto/pbkdf2-crash.any.html
http/wpt/crypto/pbkdf2-crash.any.worker.html
http/wpt/crypto/rsa-oaep-crash.any.html
http/wpt/crypto/rsa-oaep-crash.any.worker.html
http/wpt/crypto/rsa-pss-crash.any.html
http/wpt/crypto/rsa-pss-crash.any.worker.html
http/wpt/crypto/unwrap-ec-key-crash.any.html
http/wpt/crypto/unwrap-ec-key-crash.any.worker.html
http/wpt/crypto/unwrap-rsa-key-crash.any.html
http/wpt/crypto/unwrap-rsa-key-crash.any.worker.html

  • crypto/CryptoAlgorithm.cpp:

(WebCore::CryptoAlgorithm::encrypt):
(WebCore::CryptoAlgorithm::decrypt):
(WebCore::CryptoAlgorithm::sign):
(WebCore::CryptoAlgorithm::verify):
(WebCore::CryptoAlgorithm::deriveBits):
(WebCore::CryptoAlgorithm::importKey):
(WebCore::dispatchAlgorithmOperation):
(WebCore::CryptoAlgorithm::dispatchOperationInWorkQueue):
(WebCore::CryptoAlgorithm::dispatchOperation): Deleted.

  • crypto/CryptoAlgorithm.h:
  • crypto/SubtleCrypto.cpp:

(WebCore::crossThreadCopyImportParams):
(WebCore::SubtleCrypto::encrypt):
(WebCore::SubtleCrypto::decrypt):
(WebCore::SubtleCrypto::sign):
(WebCore::SubtleCrypto::verify):
(WebCore::SubtleCrypto::deriveKey):
(WebCore::SubtleCrypto::deriveBits):
(WebCore::SubtleCrypto::importKey):
(WebCore::SubtleCrypto::wrapKey):
(WebCore::SubtleCrypto::unwrapKey):

  • crypto/algorithms/CryptoAlgorithmAES_CBC.cpp:

(WebCore::CryptoAlgorithmAES_CBC::encrypt):
(WebCore::CryptoAlgorithmAES_CBC::decrypt):
(WebCore::CryptoAlgorithmAES_CBC::importKey):

  • crypto/algorithms/CryptoAlgorithmAES_CBC.h:
  • crypto/algorithms/CryptoAlgorithmAES_CFB.cpp:

(WebCore::CryptoAlgorithmAES_CFB::encrypt):
(WebCore::CryptoAlgorithmAES_CFB::decrypt):
(WebCore::CryptoAlgorithmAES_CFB::importKey):

  • crypto/algorithms/CryptoAlgorithmAES_CFB.h:
  • crypto/algorithms/CryptoAlgorithmAES_CTR.cpp:

(WebCore::parametersAreValid):
(WebCore::CryptoAlgorithmAES_CTR::encrypt):
(WebCore::CryptoAlgorithmAES_CTR::decrypt):
(WebCore::CryptoAlgorithmAES_CTR::importKey):

  • crypto/algorithms/CryptoAlgorithmAES_CTR.h:
  • crypto/algorithms/CryptoAlgorithmAES_GCM.cpp:

(WebCore::CryptoAlgorithmAES_GCM::encrypt):
(WebCore::CryptoAlgorithmAES_GCM::decrypt):
(WebCore::CryptoAlgorithmAES_GCM::importKey):

  • crypto/algorithms/CryptoAlgorithmAES_GCM.h:
  • crypto/algorithms/CryptoAlgorithmAES_KW.cpp:

(WebCore::CryptoAlgorithmAES_KW::importKey):

  • crypto/algorithms/CryptoAlgorithmAES_KW.h:
  • crypto/algorithms/CryptoAlgorithmECDH.cpp:

(WebCore::CryptoAlgorithmECDH::deriveBits):
(WebCore::CryptoAlgorithmECDH::importKey):

  • crypto/algorithms/CryptoAlgorithmECDH.h:
  • crypto/algorithms/CryptoAlgorithmECDSA.cpp:

(WebCore::CryptoAlgorithmECDSA::sign):
(WebCore::CryptoAlgorithmECDSA::verify):
(WebCore::CryptoAlgorithmECDSA::importKey):

  • crypto/algorithms/CryptoAlgorithmECDSA.h:
  • crypto/algorithms/CryptoAlgorithmHKDF.cpp:

(WebCore::CryptoAlgorithmHKDF::deriveBits):
(WebCore::CryptoAlgorithmHKDF::importKey):

  • crypto/algorithms/CryptoAlgorithmHKDF.h:
  • crypto/algorithms/CryptoAlgorithmHMAC.cpp:

(WebCore::CryptoAlgorithmHMAC::sign):
(WebCore::CryptoAlgorithmHMAC::verify):
(WebCore::CryptoAlgorithmHMAC::importKey):

  • crypto/algorithms/CryptoAlgorithmHMAC.h:
  • crypto/algorithms/CryptoAlgorithmPBKDF2.cpp:

(WebCore::CryptoAlgorithmPBKDF2::deriveBits):
(WebCore::CryptoAlgorithmPBKDF2::importKey):

  • crypto/algorithms/CryptoAlgorithmPBKDF2.h:
  • crypto/algorithms/CryptoAlgorithmRSAES_PKCS1_v1_5.cpp:

(WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::encrypt):
(WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::decrypt):
(WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::importKey):

  • crypto/algorithms/CryptoAlgorithmRSAES_PKCS1_v1_5.h:
  • crypto/algorithms/CryptoAlgorithmRSASSA_PKCS1_v1_5.cpp:

(WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::sign):
(WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::verify):
(WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::importKey):

  • crypto/algorithms/CryptoAlgorithmRSASSA_PKCS1_v1_5.h:
  • crypto/algorithms/CryptoAlgorithmRSA_OAEP.cpp:

(WebCore::CryptoAlgorithmRSA_OAEP::encrypt):
(WebCore::CryptoAlgorithmRSA_OAEP::decrypt):
(WebCore::CryptoAlgorithmRSA_OAEP::importKey):

  • crypto/algorithms/CryptoAlgorithmRSA_OAEP.h:
  • crypto/algorithms/CryptoAlgorithmRSA_PSS.cpp:

(WebCore::CryptoAlgorithmRSA_PSS::sign):
(WebCore::CryptoAlgorithmRSA_PSS::verify):
(WebCore::CryptoAlgorithmRSA_PSS::importKey):

  • crypto/algorithms/CryptoAlgorithmRSA_PSS.h:
  • crypto/gcrypt/CryptoAlgorithmAES_CBCGCrypt.cpp:

(WebCore::CryptoAlgorithmAES_CBC::platformEncrypt):
(WebCore::CryptoAlgorithmAES_CBC::platformDecrypt):

  • crypto/gcrypt/CryptoAlgorithmAES_CFBGCrypt.cpp:

(WebCore::CryptoAlgorithmAES_CFB::platformEncrypt):
(WebCore::CryptoAlgorithmAES_CFB::platformDecrypt):

  • crypto/gcrypt/CryptoAlgorithmAES_CTRGCrypt.cpp:

(WebCore::CryptoAlgorithmAES_CTR::platformEncrypt):
(WebCore::CryptoAlgorithmAES_CTR::platformDecrypt):

  • crypto/gcrypt/CryptoAlgorithmAES_GCMGCrypt.cpp:

(WebCore::CryptoAlgorithmAES_GCM::platformEncrypt):
(WebCore::CryptoAlgorithmAES_GCM::platformDecrypt):

  • crypto/gcrypt/CryptoAlgorithmHKDFGCrypt.cpp:

(WebCore::CryptoAlgorithmHKDF::platformDeriveBits):

  • crypto/gcrypt/CryptoAlgorithmPBKDF2GCrypt.cpp:

(WebCore::CryptoAlgorithmPBKDF2::platformDeriveBits):

  • crypto/gcrypt/CryptoAlgorithmRSA_OAEPGCrypt.cpp:

(WebCore::CryptoAlgorithmRSA_OAEP::platformEncrypt):
(WebCore::CryptoAlgorithmRSA_OAEP::platformDecrypt):

  • crypto/gcrypt/CryptoAlgorithmRSA_PSSGCrypt.cpp:

(WebCore::CryptoAlgorithmRSA_PSS::platformSign):
(WebCore::CryptoAlgorithmRSA_PSS::platformVerify):

  • crypto/mac/CryptoAlgorithmAES_CBCMac.cpp:

(WebCore::CryptoAlgorithmAES_CBC::platformEncrypt):
(WebCore::CryptoAlgorithmAES_CBC::platformDecrypt):

  • crypto/mac/CryptoAlgorithmAES_CFBMac.cpp:

(WebCore::CryptoAlgorithmAES_CFB::platformEncrypt):
(WebCore::CryptoAlgorithmAES_CFB::platformDecrypt):

  • crypto/mac/CryptoAlgorithmAES_CTRMac.cpp:

(WebCore::CryptoAlgorithmAES_CTR::platformEncrypt):
(WebCore::CryptoAlgorithmAES_CTR::platformDecrypt):

  • crypto/mac/CryptoAlgorithmAES_GCMMac.cpp:

(WebCore::CryptoAlgorithmAES_GCM::platformEncrypt):
(WebCore::CryptoAlgorithmAES_GCM::platformDecrypt):

  • crypto/mac/CryptoAlgorithmHKDFMac.cpp:

(WebCore::CryptoAlgorithmHKDF::platformDeriveBits):

  • crypto/mac/CryptoAlgorithmPBKDF2Mac.cpp:

(WebCore::CryptoAlgorithmPBKDF2::platformDeriveBits):

  • crypto/mac/CryptoAlgorithmRSA_OAEPMac.cpp:

(WebCore::CryptoAlgorithmRSA_OAEP::platformEncrypt):
(WebCore::CryptoAlgorithmRSA_OAEP::platformDecrypt):

  • crypto/mac/CryptoAlgorithmRSA_PSSMac.cpp:

(WebCore::CryptoAlgorithmRSA_PSS::platformSign):
(WebCore::CryptoAlgorithmRSA_PSS::platformVerify):

  • crypto/parameters/CryptoAlgorithmAesCbcCfbParams.h:
  • crypto/parameters/CryptoAlgorithmAesCtrParams.h:
  • crypto/parameters/CryptoAlgorithmAesGcmParams.h:
  • crypto/parameters/CryptoAlgorithmEcKeyParams.h:
  • crypto/parameters/CryptoAlgorithmEcdsaParams.h:
  • crypto/parameters/CryptoAlgorithmHkdfParams.h:
  • crypto/parameters/CryptoAlgorithmHmacKeyParams.h:
  • crypto/parameters/CryptoAlgorithmPbkdf2Params.h:
  • crypto/parameters/CryptoAlgorithmRsaHashedImportParams.h:
  • crypto/parameters/CryptoAlgorithmRsaOaepParams.h:
  • crypto/parameters/CryptoAlgorithmRsaPssParams.h:

LayoutTests:

crypto/subtle/aes-gcm-import-key-unwrap-ec-raw-key.html is an exception of this series of tests as
it only aims to test the correct behavoir of suggested algorithms. This patch aslo does some test
gardening.

  • TestExpectations:
  • crypto/subtle/aes-gcm-import-key-unwrap-ec-raw-key-expected.txt: Added.
  • crypto/subtle/aes-gcm-import-key-unwrap-ec-raw-key.html: Added.
  • http/wpt/crypto/aes-cbc-crash.any-expected.txt: Added.
  • http/wpt/crypto/aes-cbc-crash.any.html: Added.
  • http/wpt/crypto/aes-cbc-crash.any.js: Added.
  • http/wpt/crypto/aes-cbc-crash.any.worker-expected.txt: Added.
  • http/wpt/crypto/aes-cbc-crash.any.worker.html: Added.
  • http/wpt/crypto/aes-ctr-crash.any-expected.txt: Added.
  • http/wpt/crypto/aes-ctr-crash.any.html: Added.
  • http/wpt/crypto/aes-ctr-crash.any.js: Added.
  • http/wpt/crypto/aes-ctr-crash.any.worker-expected.txt: Added.
  • http/wpt/crypto/aes-ctr-crash.any.worker.html: Added.
  • http/wpt/crypto/aes-gcm-crash.any-expected.txt: Added.
  • http/wpt/crypto/aes-gcm-crash.any.html: Added.
  • http/wpt/crypto/aes-gcm-crash.any.js: Added.
  • http/wpt/crypto/aes-gcm-crash.any.worker-expected.txt: Added.
  • http/wpt/crypto/aes-gcm-crash.any.worker.html: Added.
  • http/wpt/crypto/derive-hmac-key-crash.any-expected.txt: Added.
  • http/wpt/crypto/derive-hmac-key-crash.any.html: Added.
  • http/wpt/crypto/derive-hmac-key-crash.any.js: Added.
  • http/wpt/crypto/derive-hmac-key-crash.any.worker-expected.txt: Added.
  • http/wpt/crypto/derive-hmac-key-crash.any.worker.html: Added.
  • http/wpt/crypto/ecdsa-crash.any-expected.txt: Added.
  • http/wpt/crypto/ecdsa-crash.any.html: Added.
  • http/wpt/crypto/ecdsa-crash.any.js: Added.
  • http/wpt/crypto/ecdsa-crash.any.worker-expected.txt: Added.
  • http/wpt/crypto/ecdsa-crash.any.worker.html: Added.
  • http/wpt/crypto/hkdf-crash.any-expected.txt: Added.
  • http/wpt/crypto/hkdf-crash.any.html: Added.
  • http/wpt/crypto/hkdf-crash.any.js: Added.
  • http/wpt/crypto/hkdf-crash.any.worker-expected.txt: Added.
  • http/wpt/crypto/hkdf-crash.any.worker.html: Added.
  • http/wpt/crypto/pbkdf2-crash.any-expected.txt: Added.
  • http/wpt/crypto/pbkdf2-crash.any.html: Added.
  • http/wpt/crypto/pbkdf2-crash.any.js: Added.
  • http/wpt/crypto/pbkdf2-crash.any.worker-expected.txt: Added.
  • http/wpt/crypto/pbkdf2-crash.any.worker.html: Added.
  • http/wpt/crypto/resources/common.js: Added.
  • http/wpt/crypto/rsa-oaep-crash.any-expected.txt: Added.
  • http/wpt/crypto/rsa-oaep-crash.any.html: Added.
  • http/wpt/crypto/rsa-oaep-crash.any.js: Added.
  • http/wpt/crypto/rsa-oaep-crash.any.worker-expected.txt: Added.
  • http/wpt/crypto/rsa-oaep-crash.any.worker.html: Added.
  • http/wpt/crypto/rsa-pss-crash.any-expected.txt: Added.
  • http/wpt/crypto/rsa-pss-crash.any.html: Added.
  • http/wpt/crypto/rsa-pss-crash.any.js: Added.
  • http/wpt/crypto/rsa-pss-crash.any.worker-expected.txt: Added.
  • http/wpt/crypto/rsa-pss-crash.any.worker.html: Added.
  • http/wpt/crypto/unwrap-ec-key-crash.any-expected.txt: Added.
  • http/wpt/crypto/unwrap-ec-key-crash.any.html: Added.
  • http/wpt/crypto/unwrap-ec-key-crash.any.js: Added.
  • http/wpt/crypto/unwrap-ec-key-crash.any.worker-expected.txt: Added.
  • http/wpt/crypto/unwrap-ec-key-crash.any.worker.html: Added.
  • http/wpt/crypto/unwrap-rsa-key-crash.any-expected.txt: Added.
  • http/wpt/crypto/unwrap-rsa-key-crash.any.html: Added.
  • http/wpt/crypto/unwrap-rsa-key-crash.any.js: Added.
  • http/wpt/crypto/unwrap-rsa-key-crash.any.worker.html: Added.
  • http/wpt/crypto/unwrap-rsa-key-crash.any.worker-expected.txt: Added.
5:17 PM Changeset in webkit [233872] by commit-queue@webkit.org
  • 28 edits in trunk

Source/WebCore:
[iOS] When bringing MobileSafari to the foreground, images, which are pending decoding, won't be drawn into the flush immediate transaction
https://bugs.webkit.org/show_bug.cgi?id=187375

Patch by Said Abou-Hallawa <sabouhallawa@apple.com> on 2018-07-16
Reviewed by Simon Fraser.

An immediate-paint transaction should force all the images which are pending
decoding to be repainted.

To do that, FrameView::paintControlTints() will be re-factored to a new
generic function such that it takes PaintInvalidationReasons. The new function
which is named 'traverseForPaintInvalidation' will traverse the render tree
for a specific PaintInvalidationReasons.

invalidateImagesWithAsyncDecodes() will stop the asynchronous decoding for
the underlying image and repaint all the clients which are waiting for the
decoding to finish.

  • loader/cache/CachedImage.cpp:

(WebCore::CachedImage::didRemoveClient):
(WebCore::CachedImage::isClientWaitingForAsyncDecoding const):
(WebCore::CachedImage::addClientWaitingForAsyncDecoding):
(WebCore::CachedImage::removeAllClientsWaitingForAsyncDecoding):
(WebCore::CachedImage::allClientsRemoved):
(WebCore::CachedImage::clear):
(WebCore::CachedImage::createImage):
(WebCore::CachedImage::imageFrameAvailable):
(WebCore::CachedImage::addPendingImageDrawingClient): Deleted.

  • loader/cache/CachedImage.h:
  • page/FrameView.cpp:

(WebCore::FrameView::paintScrollCorner):
(WebCore::FrameView::updateControlTints):
(WebCore::FrameView::traverseForPaintInvalidation):
(WebCore::FrameView::adjustPageHeightDeprecated):
(WebCore::FrameView::paintControlTints): Deleted.

  • page/FrameView.h:
  • platform/ScrollView.cpp:

(WebCore::ScrollView::paint):

  • platform/Scrollbar.cpp:

(WebCore::Scrollbar::paint):

  • platform/graphics/BitmapImage.h:
  • platform/graphics/GraphicsContext.cpp:

(WebCore::GraphicsContext::GraphicsContext):

  • platform/graphics/GraphicsContext.h:

(WebCore::GraphicsContext::performingPaintInvalidation const):
(WebCore::GraphicsContext::invalidatingControlTints const):
(WebCore::GraphicsContext::invalidatingImagesWithAsyncDecodes const):
(WebCore::GraphicsContext::updatingControlTints const): Deleted.

  • rendering/RenderBoxModelObject.cpp:

(WebCore::RenderBoxModelObject::paintFillLayerExtended):

  • rendering/RenderImage.cpp:

(WebCore::RenderImage::paintReplaced):
(WebCore::RenderImage::paintAreaElementFocusRing):
(WebCore::RenderImage::paintIntoRect):

  • rendering/RenderLayer.cpp:

(WebCore::RenderLayer::paintScrollCorner):
(WebCore::RenderLayer::paintResizer):
(WebCore::RenderLayer::paintLayer):

  • rendering/RenderScrollbar.cpp:

(WebCore::RenderScrollbar::paint):

  • rendering/RenderTheme.cpp:

(WebCore::RenderTheme::paint):

  • testing/Internals.cpp:

(WebCore::Internals::invalidateControlTints):
(WebCore::Internals::paintControlTints): Deleted.

  • testing/Internals.h:
  • testing/Internals.idl:

Source/WebKit:
[iOS] When bringing MobileSafari to the foreground, images, which are pending decoding, won't be drawn into the immediate-paint transaction
https://bugs.webkit.org/show_bug.cgi?id=187375

Patch by Said Abou-Hallawa <sabouhallawa@apple.com> on 2018-07-16
Reviewed by Simon Fraser.

For immediate-paint transaction, we should force all the images which are
pending decoding to be repainted before building this transaction.

  • WebProcess/Plugins/PDF/PDFPlugin.mm:

(WebKit::PDFPlugin::updateControlTints):

  • WebProcess/Plugins/PluginView.cpp:

(WebKit::PluginView::paint):

  • WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeDrawingArea.mm:

(WebKit::RemoteLayerTreeDrawingArea::flushLayers):

LayoutTests:
[iOS] When bringing MobileSafari to the foreground, images, which are pending decoding, won't be drawn into the immediate-paint transaction
https://bugs.webkit.org/show_bug.cgi?id=187375

Patch by Said Abou-Hallawa <sabouhallawa@apple.com> on 2018-07-16
Reviewed by Simon Fraser.

The Internals API paintControlTints() is now renamed to invalidateControlTints()
to be consistent with the new enum values and with the new name of the
C++ function.

  • fast/css/webkit-mask-crash-fieldset-legend.html:
  • fast/css/webkit-mask-crash-figure.html:
  • fast/css/webkit-mask-crash-table.html:
  • fast/css/webkit-mask-crash-td-2.html:
  • fast/css/webkit-mask-crash-td.html:
4:53 PM Changeset in webkit [233871] by commit-queue@webkit.org
  • 2 edits in trunk/LayoutTests

[ MacOS WK1 Debug ] Layout Test svg/custom/linking-uri-01-b.svg is flakey
https://bugs.webkit.org/show_bug.cgi?id=187711

Unreviewed test gardening.

Patch by Truitt Savell <Truitt Savell> on 2018-07-16

  • platform/mac-wk1/TestExpectations:
4:46 PM Changeset in webkit [233870] by Ryan Haddad
  • 2 edits in trunk/Source/WebCore

Unreviewed attempt to fix the build.

  • rendering/RenderThemeMac.mm:
4:34 PM Changeset in webkit [233869] by dino@apple.com
  • 39 edits
    2 adds in trunk

Allow removal of white backgrounds
https://bugs.webkit.org/show_bug.cgi?id=187574
<rdar://problem/41146792>

Reviewed by Simon Fraser.

Source/WebCore:

Add a drawing mode that turns white backgrounds into transparent
regions, such that a hosting app can see through to its window.

Test: css3/color-filters/punch-out-white-backgrounds.html

  • page/Settings.yaml: New Setting.
  • rendering/InlineFlowBox.cpp: Draw with a destination out blend mode

if the background is white and we are punching out backgrounds, which means
that it will erase the destination.
(WebCore::InlineFlowBox::paintBoxDecorations):

  • rendering/RenderBox.cpp:

(WebCore::RenderBox::paintBackground): Ditto.

  • rendering/RenderTableCell.cpp:

(WebCore::RenderTableCell::paintBackgroundsBehindCell): Ditto.

  • rendering/RenderBoxModelObject.cpp:

(WebCore::RenderBoxModelObject::paintFillLayerExtended): Save and restore
the composition mode if necessary.

Source/WebKit:

Add a new WebPreference for punching out white backgrounds.

  • Shared/WebPreferences.yaml:
  • UIProcess/API/C/WKPreferences.cpp:

(WKPreferencesSetPunchOutWhiteBackgroundsInDarkMode):
(WKPreferencesGetPunchOutWhiteBackgroundsInDarkMode):

  • UIProcess/API/C/WKPreferencesRefPrivate.h:
  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView _initializeWithConfiguration:]):

  • UIProcess/API/Cocoa/WKWebViewConfiguration.mm:

(-[WKWebViewConfiguration init]):
(-[WKWebViewConfiguration copyWithZone:]):
(-[WKWebViewConfiguration _punchOutWhiteBackgroundsInDarkMode]):
(-[WKWebViewConfiguration _setPunchOutWhiteBackgroundsInDarkMode:]):

  • UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h:

Source/WebKitLegacy/mac:

Add a new WebPreference for punching out white backgrounds.

  • WebView/WebPreferenceKeysPrivate.h:
  • WebView/WebPreferences.mm:

(+[WebPreferences initialize]):
(-[WebPreferences punchOutWhiteBackgroundsInDarkMode]):
(-[WebPreferences setPunchOutWhiteBackgroundsInDarkMode:]):

  • WebView/WebPreferencesPrivate.h:
  • WebView/WebView.mm:

(-[WebView _preferencesChanged:]):

Tools:

Add a new menu item for punching out white backgrounds in MiniBrowser.
In WebKitTestRunner, expose the new setting and hook that up to
drawing a background in the WebView.

  • MiniBrowser/mac/AppDelegate.m:

(defaultConfiguration): Add _punchOutWhiteBackgroundsInDarkMode.

  • MiniBrowser/mac/SettingsController.h: Ditto.
  • MiniBrowser/mac/SettingsController.m:

(-[SettingsController _populateMenu]):
(-[SettingsController validateMenuItem:]):
(-[SettingsController togglePunchOutWhiteBackgroundsInDarkMode:]):
(-[SettingsController punchOutWhiteBackgroundsInDarkMode]):

  • MiniBrowser/mac/WK1BrowserWindowController.m:

(-[WK1BrowserWindowController didChangeSettings]): Set the new preference.

  • WebKitTestRunner/PlatformWebView.h: Expose a drawsBackground property.
  • WebKitTestRunner/gtk/PlatformWebViewGtk.cpp: Null implementation.

(WTR::PlatformWebView::drawsBackground const):
(WTR::PlatformWebView::setDrawsBackground):

  • WebKitTestRunner/wpe/PlatformWebViewWPE.cpp: Ditto.

(WTR::PlatformWebView::drawsBackground const):
(WTR::PlatformWebView::setDrawsBackground):

  • WebKitTestRunner/ios/PlatformWebViewIOS.mm: Call into the WKWebView and

set its SPI.
(WTR::PlatformWebView::drawsBackground const):
(WTR::PlatformWebView::setDrawsBackground):

  • WebKitTestRunner/mac/PlatformWebViewMac.mm: Ditto.

(WTR::PlatformWebView::drawsBackground const):
(WTR::PlatformWebView::setDrawsBackground):

  • WebKitTestRunner/TestController.cpp: Reset and copy the new preference.

(WTR::TestController::resetPreferencesToConsistentValues):
(WTR::updateTestOptionsFromTestHeader):

  • WebKitTestRunner/TestOptions.h:

(WTR::TestOptions::hasSameInitializationOptions const):

  • WebKitTestRunner/cocoa/TestControllerCocoa.mm:

(WTR::TestController::platformCreateWebView): If the option for punching
out the background was set, tell the WebView to not draw its background.

4:11 PM Changeset in webkit [233868] by david_fenton@apple.com
  • 61 edits
    3 deletes in trunk

Unreviewed, rolling out r233867.

caused build failures on High Sierra, Sierra and iOS

Reverted changeset:

"[WebCrypto] Crypto operations should copy their parameters
before hoping to another thread"
https://bugs.webkit.org/show_bug.cgi?id=187501
https://trac.webkit.org/changeset/233867

2:58 PM Changeset in webkit [233867] by jiewen_tan@apple.com
  • 61 edits
    60 adds in trunk

[WebCrypto] Crypto operations should copy their parameters before hoping to another thread
https://bugs.webkit.org/show_bug.cgi?id=187501
<rdar://problem/41438160>

Reviewed by Youenn Fablet.

Source/WebCore:

This patch aims at making all captured variables in all crypto lambdas that need to be passed
to a worker thread thread safe, which includes:
1) changing ref counted objects to thread safe ref counted object.
2) adding isolatedCopy methods to non ref counted classes, so they can be called by CrossThreadCopy().

In addition to above changes, this patch also does the following things:
1) change the name CryptoAlgorithm::dispatchOperation => CryptoAlgorithm::dispatchOperationInWorkQueue
to make it clear that lambdas will be passed to a secondary thread.
2) make CryptoAlgorithmParameters as const parameters for all methods.

Tests: crypto/subtle/aes-gcm-import-key-unwrap-ec-raw-key.html

http/wpt/crypto/aes-cbc-crash.any.html
http/wpt/crypto/aes-cbc-crash.any.worker.html
http/wpt/crypto/aes-ctr-crash.any.html
http/wpt/crypto/aes-ctr-crash.any.worker.html
http/wpt/crypto/aes-gcm-crash.any.html
http/wpt/crypto/aes-gcm-crash.any.worker.html
http/wpt/crypto/derive-hmac-key-crash.any.html
http/wpt/crypto/derive-hmac-key-crash.any.worker.html
http/wpt/crypto/ecdsa-crash.any.html
http/wpt/crypto/ecdsa-crash.any.worker.html
http/wpt/crypto/hkdf-crash.any.html
http/wpt/crypto/hkdf-crash.any.worker.html
http/wpt/crypto/pbkdf2-crash.any.html
http/wpt/crypto/pbkdf2-crash.any.worker.html
http/wpt/crypto/rsa-oaep-crash.any.html
http/wpt/crypto/rsa-oaep-crash.any.worker.html
http/wpt/crypto/rsa-pss-crash.any.html
http/wpt/crypto/rsa-pss-crash.any.worker.html
http/wpt/crypto/unwrap-ec-key-crash.any.html
http/wpt/crypto/unwrap-ec-key-crash.any.worker.html
http/wpt/crypto/unwrap-rsa-key-crash.any.html
http/wpt/crypto/unwrap-rsa-key-crash.any.worker.html

  • crypto/CryptoAlgorithm.cpp:

(WebCore::CryptoAlgorithm::encrypt):
(WebCore::CryptoAlgorithm::decrypt):
(WebCore::CryptoAlgorithm::sign):
(WebCore::CryptoAlgorithm::verify):
(WebCore::CryptoAlgorithm::deriveBits):
(WebCore::CryptoAlgorithm::importKey):
(WebCore::dispatchAlgorithmOperation):
(WebCore::CryptoAlgorithm::dispatchOperationInWorkQueue):
(WebCore::CryptoAlgorithm::dispatchOperation): Deleted.

  • crypto/CryptoAlgorithm.h:
  • crypto/SubtleCrypto.cpp:

(WebCore::crossThreadCopyImportParams):
(WebCore::SubtleCrypto::encrypt):
(WebCore::SubtleCrypto::decrypt):
(WebCore::SubtleCrypto::sign):
(WebCore::SubtleCrypto::verify):
(WebCore::SubtleCrypto::deriveKey):
(WebCore::SubtleCrypto::deriveBits):
(WebCore::SubtleCrypto::importKey):
(WebCore::SubtleCrypto::wrapKey):
(WebCore::SubtleCrypto::unwrapKey):

  • crypto/algorithms/CryptoAlgorithmAES_CBC.cpp:

(WebCore::CryptoAlgorithmAES_CBC::encrypt):
(WebCore::CryptoAlgorithmAES_CBC::decrypt):
(WebCore::CryptoAlgorithmAES_CBC::importKey):

  • crypto/algorithms/CryptoAlgorithmAES_CBC.h:
  • crypto/algorithms/CryptoAlgorithmAES_CFB.cpp:

(WebCore::CryptoAlgorithmAES_CFB::encrypt):
(WebCore::CryptoAlgorithmAES_CFB::decrypt):
(WebCore::CryptoAlgorithmAES_CFB::importKey):

  • crypto/algorithms/CryptoAlgorithmAES_CFB.h:
  • crypto/algorithms/CryptoAlgorithmAES_CTR.cpp:

(WebCore::parametersAreValid):
(WebCore::CryptoAlgorithmAES_CTR::encrypt):
(WebCore::CryptoAlgorithmAES_CTR::decrypt):
(WebCore::CryptoAlgorithmAES_CTR::importKey):

  • crypto/algorithms/CryptoAlgorithmAES_CTR.h:
  • crypto/algorithms/CryptoAlgorithmAES_GCM.cpp:

(WebCore::CryptoAlgorithmAES_GCM::encrypt):
(WebCore::CryptoAlgorithmAES_GCM::decrypt):
(WebCore::CryptoAlgorithmAES_GCM::importKey):

  • crypto/algorithms/CryptoAlgorithmAES_GCM.h:
  • crypto/algorithms/CryptoAlgorithmAES_KW.cpp:

(WebCore::CryptoAlgorithmAES_KW::importKey):

  • crypto/algorithms/CryptoAlgorithmAES_KW.h:
  • crypto/algorithms/CryptoAlgorithmECDH.cpp:

(WebCore::CryptoAlgorithmECDH::deriveBits):
(WebCore::CryptoAlgorithmECDH::importKey):

  • crypto/algorithms/CryptoAlgorithmECDH.h:
  • crypto/algorithms/CryptoAlgorithmECDSA.cpp:

(WebCore::CryptoAlgorithmECDSA::sign):
(WebCore::CryptoAlgorithmECDSA::verify):
(WebCore::CryptoAlgorithmECDSA::importKey):

  • crypto/algorithms/CryptoAlgorithmECDSA.h:
  • crypto/algorithms/CryptoAlgorithmHKDF.cpp:

(WebCore::CryptoAlgorithmHKDF::deriveBits):
(WebCore::CryptoAlgorithmHKDF::importKey):

  • crypto/algorithms/CryptoAlgorithmHKDF.h:
  • crypto/algorithms/CryptoAlgorithmHMAC.cpp:

(WebCore::CryptoAlgorithmHMAC::sign):
(WebCore::CryptoAlgorithmHMAC::verify):
(WebCore::CryptoAlgorithmHMAC::importKey):

  • crypto/algorithms/CryptoAlgorithmHMAC.h:
  • crypto/algorithms/CryptoAlgorithmPBKDF2.cpp:

(WebCore::CryptoAlgorithmPBKDF2::deriveBits):
(WebCore::CryptoAlgorithmPBKDF2::importKey):

  • crypto/algorithms/CryptoAlgorithmPBKDF2.h:
  • crypto/algorithms/CryptoAlgorithmRSAES_PKCS1_v1_5.cpp:

(WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::encrypt):
(WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::decrypt):
(WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::importKey):

  • crypto/algorithms/CryptoAlgorithmRSAES_PKCS1_v1_5.h:
  • crypto/algorithms/CryptoAlgorithmRSASSA_PKCS1_v1_5.cpp:

(WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::sign):
(WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::verify):
(WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::importKey):

  • crypto/algorithms/CryptoAlgorithmRSASSA_PKCS1_v1_5.h:
  • crypto/algorithms/CryptoAlgorithmRSA_OAEP.cpp:

(WebCore::CryptoAlgorithmRSA_OAEP::encrypt):
(WebCore::CryptoAlgorithmRSA_OAEP::decrypt):
(WebCore::CryptoAlgorithmRSA_OAEP::importKey):

  • crypto/algorithms/CryptoAlgorithmRSA_OAEP.h:
  • crypto/algorithms/CryptoAlgorithmRSA_PSS.cpp:

(WebCore::CryptoAlgorithmRSA_PSS::sign):
(WebCore::CryptoAlgorithmRSA_PSS::verify):
(WebCore::CryptoAlgorithmRSA_PSS::importKey):

  • crypto/algorithms/CryptoAlgorithmRSA_PSS.h:
  • crypto/gcrypt/CryptoAlgorithmAES_CBCGCrypt.cpp:

(WebCore::CryptoAlgorithmAES_CBC::platformEncrypt):
(WebCore::CryptoAlgorithmAES_CBC::platformDecrypt):

  • crypto/gcrypt/CryptoAlgorithmAES_CFBGCrypt.cpp:

(WebCore::CryptoAlgorithmAES_CFB::platformEncrypt):
(WebCore::CryptoAlgorithmAES_CFB::platformDecrypt):

  • crypto/gcrypt/CryptoAlgorithmAES_CTRGCrypt.cpp:

(WebCore::CryptoAlgorithmAES_CTR::platformEncrypt):
(WebCore::CryptoAlgorithmAES_CTR::platformDecrypt):

  • crypto/gcrypt/CryptoAlgorithmAES_GCMGCrypt.cpp:

(WebCore::CryptoAlgorithmAES_GCM::platformEncrypt):
(WebCore::CryptoAlgorithmAES_GCM::platformDecrypt):

  • crypto/gcrypt/CryptoAlgorithmHKDFGCrypt.cpp:

(WebCore::CryptoAlgorithmHKDF::platformDeriveBits):

  • crypto/gcrypt/CryptoAlgorithmPBKDF2GCrypt.cpp:

(WebCore::CryptoAlgorithmPBKDF2::platformDeriveBits):

  • crypto/gcrypt/CryptoAlgorithmRSA_OAEPGCrypt.cpp:

(WebCore::CryptoAlgorithmRSA_OAEP::platformEncrypt):
(WebCore::CryptoAlgorithmRSA_OAEP::platformDecrypt):

  • crypto/gcrypt/CryptoAlgorithmRSA_PSSGCrypt.cpp:

(WebCore::CryptoAlgorithmRSA_PSS::platformSign):
(WebCore::CryptoAlgorithmRSA_PSS::platformVerify):

  • crypto/mac/CryptoAlgorithmAES_CBCMac.cpp:

(WebCore::CryptoAlgorithmAES_CBC::platformEncrypt):
(WebCore::CryptoAlgorithmAES_CBC::platformDecrypt):

  • crypto/mac/CryptoAlgorithmAES_CFBMac.cpp:

(WebCore::CryptoAlgorithmAES_CFB::platformEncrypt):
(WebCore::CryptoAlgorithmAES_CFB::platformDecrypt):

  • crypto/mac/CryptoAlgorithmAES_CTRMac.cpp:

(WebCore::CryptoAlgorithmAES_CTR::platformEncrypt):
(WebCore::CryptoAlgorithmAES_CTR::platformDecrypt):

  • crypto/mac/CryptoAlgorithmAES_GCMMac.cpp:

(WebCore::CryptoAlgorithmAES_GCM::platformEncrypt):
(WebCore::CryptoAlgorithmAES_GCM::platformDecrypt):

  • crypto/mac/CryptoAlgorithmHKDFMac.cpp:

(WebCore::CryptoAlgorithmHKDF::platformDeriveBits):

  • crypto/mac/CryptoAlgorithmPBKDF2Mac.cpp:

(WebCore::CryptoAlgorithmPBKDF2::platformDeriveBits):

  • crypto/mac/CryptoAlgorithmRSA_OAEPMac.cpp:

(WebCore::CryptoAlgorithmRSA_OAEP::platformEncrypt):
(WebCore::CryptoAlgorithmRSA_OAEP::platformDecrypt):

  • crypto/mac/CryptoAlgorithmRSA_PSSMac.cpp:

(WebCore::CryptoAlgorithmRSA_PSS::platformSign):
(WebCore::CryptoAlgorithmRSA_PSS::platformVerify):

  • crypto/parameters/CryptoAlgorithmAesCbcCfbParams.h:
  • crypto/parameters/CryptoAlgorithmAesCtrParams.h:
  • crypto/parameters/CryptoAlgorithmAesGcmParams.h:
  • crypto/parameters/CryptoAlgorithmEcKeyParams.h:
  • crypto/parameters/CryptoAlgorithmEcdsaParams.h:
  • crypto/parameters/CryptoAlgorithmHkdfParams.h:
  • crypto/parameters/CryptoAlgorithmHmacKeyParams.h:
  • crypto/parameters/CryptoAlgorithmPbkdf2Params.h:
  • crypto/parameters/CryptoAlgorithmRsaHashedImportParams.h:
  • crypto/parameters/CryptoAlgorithmRsaOaepParams.h:
  • crypto/parameters/CryptoAlgorithmRsaPssParams.h:

LayoutTests:

crypto/subtle/aes-gcm-import-key-unwrap-ec-raw-key.html is an exception of this series of tests as
it only aims to test the correct behavoir of suggested algorithms. This patch aslo does some test
gardening.

  • TestExpectations:
  • crypto/subtle/aes-gcm-import-key-unwrap-ec-raw-key-expected.txt: Added.
  • crypto/subtle/aes-gcm-import-key-unwrap-ec-raw-key.html: Added.
  • http/wpt/crypto/aes-cbc-crash.any-expected.txt: Added.
  • http/wpt/crypto/aes-cbc-crash.any.html: Added.
  • http/wpt/crypto/aes-cbc-crash.any.js: Added.
  • http/wpt/crypto/aes-cbc-crash.any.worker-expected.txt: Added.
  • http/wpt/crypto/aes-cbc-crash.any.worker.html: Added.
  • http/wpt/crypto/aes-ctr-crash.any-expected.txt: Added.
  • http/wpt/crypto/aes-ctr-crash.any.html: Added.
  • http/wpt/crypto/aes-ctr-crash.any.js: Added.
  • http/wpt/crypto/aes-ctr-crash.any.worker-expected.txt: Added.
  • http/wpt/crypto/aes-ctr-crash.any.worker.html: Added.
  • http/wpt/crypto/aes-gcm-crash.any-expected.txt: Added.
  • http/wpt/crypto/aes-gcm-crash.any.html: Added.
  • http/wpt/crypto/aes-gcm-crash.any.js: Added.
  • http/wpt/crypto/aes-gcm-crash.any.worker-expected.txt: Added.
  • http/wpt/crypto/aes-gcm-crash.any.worker.html: Added.
  • http/wpt/crypto/derive-hmac-key-crash.any-expected.txt: Added.
  • http/wpt/crypto/derive-hmac-key-crash.any.html: Added.
  • http/wpt/crypto/derive-hmac-key-crash.any.js: Added.
  • http/wpt/crypto/derive-hmac-key-crash.any.worker-expected.txt: Added.
  • http/wpt/crypto/derive-hmac-key-crash.any.worker.html: Added.
  • http/wpt/crypto/ecdsa-crash.any-expected.txt: Added.
  • http/wpt/crypto/ecdsa-crash.any.html: Added.
  • http/wpt/crypto/ecdsa-crash.any.js: Added.
  • http/wpt/crypto/ecdsa-crash.any.worker-expected.txt: Added.
  • http/wpt/crypto/ecdsa-crash.any.worker.html: Added.
  • http/wpt/crypto/hkdf-crash.any-expected.txt: Added.
  • http/wpt/crypto/hkdf-crash.any.html: Added.
  • http/wpt/crypto/hkdf-crash.any.js: Added.
  • http/wpt/crypto/hkdf-crash.any.worker-expected.txt: Added.
  • http/wpt/crypto/hkdf-crash.any.worker.html: Added.
  • http/wpt/crypto/pbkdf2-crash.any-expected.txt: Added.
  • http/wpt/crypto/pbkdf2-crash.any.html: Added.
  • http/wpt/crypto/pbkdf2-crash.any.js: Added.
  • http/wpt/crypto/pbkdf2-crash.any.worker-expected.txt: Added.
  • http/wpt/crypto/pbkdf2-crash.any.worker.html: Added.
  • http/wpt/crypto/resources/common.js: Added.
  • http/wpt/crypto/rsa-oaep-crash.any-expected.txt: Added.
  • http/wpt/crypto/rsa-oaep-crash.any.html: Added.
  • http/wpt/crypto/rsa-oaep-crash.any.js: Added.
  • http/wpt/crypto/rsa-oaep-crash.any.worker-expected.txt: Added.
  • http/wpt/crypto/rsa-oaep-crash.any.worker.html: Added.
  • http/wpt/crypto/rsa-pss-crash.any-expected.txt: Added.
  • http/wpt/crypto/rsa-pss-crash.any.html: Added.
  • http/wpt/crypto/rsa-pss-crash.any.js: Added.
  • http/wpt/crypto/rsa-pss-crash.any.worker-expected.txt: Added.
  • http/wpt/crypto/rsa-pss-crash.any.worker.html: Added.
  • http/wpt/crypto/unwrap-ec-key-crash.any-expected.txt: Added.
  • http/wpt/crypto/unwrap-ec-key-crash.any.html: Added.
  • http/wpt/crypto/unwrap-ec-key-crash.any.js: Added.
  • http/wpt/crypto/unwrap-ec-key-crash.any.worker-expected.txt: Added.
  • http/wpt/crypto/unwrap-ec-key-crash.any.worker.html: Added.
  • http/wpt/crypto/unwrap-rsa-key-crash.any-expected.txt: Added.
  • http/wpt/crypto/unwrap-rsa-key-crash.any.html: Added.
  • http/wpt/crypto/unwrap-rsa-key-crash.any.js: Added.
  • http/wpt/crypto/unwrap-rsa-key-crash.any.worker.html: Added.
  • http/wpt/crypto/unwrap-rsa-key-crash.any.worker-expected.txt: Added.
2:15 PM Changeset in webkit [233866] by commit-queue@webkit.org
  • 25 edits
    3 copies
    5 adds in trunk

[Datalist][macOS] Add suggestions UI for TextFieldInputTypes
https://bugs.webkit.org/show_bug.cgi?id=186531

Patch by Aditya Keerthi <Aditya Keerthi> on 2018-07-16
Reviewed by Tim Horton.

Source/WebCore:

Tests: fast/forms/datalist/datalist-show-hide.html

fast/forms/datalist/datalist-textinput-keydown.html

  • html/TextFieldInputType.cpp:

(WebCore::TextFieldInputType::handleKeydownEvent):
(WebCore::TextFieldInputType::handleKeydownEventForSpinButton): The suggestions view takes precedence when handling arrow key events.

Source/WebKit:

Created WebDataListSuggestionsDropdownMac as a wrapper around the suggestions
view. The suggestions for TextFieldInputTypes are displayed using an NSTableView
in it's own child window. This is done so that suggestions can be presented
outside of the page if the parent window's size is too small. The maximum number
of suggestions that are visible at one time is 6, with additional suggestions made
available by scrolling.

Suggestions in the view can be selected via click or by using arrow keys. If the
input element associated with the suggestions is blurred, or the page is moved in
any way, the suggestions view is hidden.

Added IPC messages to the UIProcess to enable the display of the suggestions view.
This required a new ArgumentCoder for DataListSuggestionInformation.

  • Shared/WebCoreArgumentCoders.cpp:

(IPC::ArgumentCoder<DataListSuggestionInformation>::encode):
(IPC::ArgumentCoder<DataListSuggestionInformation>::decode):

  • Shared/WebCoreArgumentCoders.h:
  • UIProcess/PageClient.h:
  • UIProcess/WebDataListSuggestionsDropdown.cpp: Copied from Source/WebKit/WebProcess/WebCoreSupport/WebDataListSuggestionPicker.h.

(WebKit::WebDataListSuggestionsDropdown::WebDataListSuggestionsDropdown):
(WebKit::WebDataListSuggestionsDropdown::~WebDataListSuggestionsDropdown):
(WebKit::WebDataListSuggestionsDropdown::close):

  • UIProcess/WebDataListSuggestionsDropdown.h: Copied from Source/WebKit/WebProcess/WebCoreSupport/WebDataListSuggestionPicker.h.

(WebKit::WebDataListSuggestionsDropdown::Client::~Client):

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::viewWillStartLiveResize):
(WebKit::WebPageProxy::viewDidLeaveWindow):
(WebKit::WebPageProxy::handleWheelEvent):
(WebKit::WebPageProxy::setPageZoomFactor):
(WebKit::WebPageProxy::setPageAndTextZoomFactors):
(WebKit::WebPageProxy::didStartProvisionalLoadForFrame):
(WebKit::WebPageProxy::pageDidScroll):
(WebKit::WebPageProxy::showDataListSuggestions):
(WebKit::WebPageProxy::handleKeydownInDataList):
(WebKit::WebPageProxy::endDataListSuggestions):
(WebKit::WebPageProxy::didCloseSuggestions):
(WebKit::WebPageProxy::didSelectOption):
(WebKit::WebPageProxy::resetState):
(WebKit::WebPageProxy::closeOverlayedViews):

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

(WebKit::PageClientImpl::createDataListSuggestionsDropdown):

  • UIProcess/mac/PageClientImplMac.h:
  • UIProcess/mac/PageClientImplMac.mm:

(WebKit::PageClientImpl::createDataListSuggestionsDropdown):

  • UIProcess/mac/WebDataListSuggestionsDropdownMac.h: Copied from Source/WebKit/WebProcess/WebCoreSupport/WebDataListSuggestionPicker.h.
  • UIProcess/mac/WebDataListSuggestionsDropdownMac.mm: Added.

(WebKit::WebDataListSuggestionsDropdownMac::create):
(WebKit::WebDataListSuggestionsDropdownMac::~WebDataListSuggestionsDropdownMac):
(WebKit::WebDataListSuggestionsDropdownMac::WebDataListSuggestionsDropdownMac):
(WebKit::WebDataListSuggestionsDropdownMac::show):
(WebKit::WebDataListSuggestionsDropdownMac::didSelectOption):
(WebKit::WebDataListSuggestionsDropdownMac::selectOption):
(WebKit::WebDataListSuggestionsDropdownMac::handleKeydownWithIdentifier):
(WebKit::WebDataListSuggestionsDropdownMac::close):
(-[WKDataListSuggestionCell initWithFrame:]):
(-[WKDataListSuggestionCell setText:]):
(-[WKDataListSuggestionCell setActive:]):
(-[WKDataListSuggestionCell drawRect:]):
(-[WKDataListSuggestionCell mouseEntered:]):
(-[WKDataListSuggestionCell mouseExited:]):
(-[WKDataListSuggestionCell acceptsFirstResponder]):
(-[WKDataListSuggestionTable initWithElementRect:]):
(-[WKDataListSuggestionTable setVisibleRect:]):
(-[WKDataListSuggestionTable currentActiveRow]):
(-[WKDataListSuggestionTable setActiveRow:]):
(-[WKDataListSuggestionTable reload]):
(-[WKDataListSuggestionTable acceptsFirstResponder]):
(-[WKDataListSuggestionTable enclosingScrollView]):
(-[WKDataListSuggestionTable removeFromSuperviewWithoutNeedingDisplay]):
(-[WKDataListSuggestionsView initWithInformation:inView:]):
(-[WKDataListSuggestionsView currentSelectedString]):
(-[WKDataListSuggestionsView updateWithInformation:]):
(-[WKDataListSuggestionsView moveSelectionByDirection:]):
(-[WKDataListSuggestionsView invalidate]):
(-[WKDataListSuggestionsView dropdownRectForElementRect:]):
(-[WKDataListSuggestionsView showSuggestionsDropdown:]):
(-[WKDataListSuggestionsView selectedRow:]):
(-[WKDataListSuggestionsView numberOfRowsInTableView:]):
(-[WKDataListSuggestionsView tableView:heightOfRow:]):
(-[WKDataListSuggestionsView tableView:viewForTableColumn:row:]):

  • WebKit.xcodeproj/project.pbxproj:
  • WebProcess/WebCoreSupport/WebDataListSuggestionPicker.cpp:

(WebKit::WebDataListSuggestionPicker::handleKeydownWithIdentifier):
(WebKit::WebDataListSuggestionPicker::didSelectOption):
(WebKit::WebDataListSuggestionPicker::didCloseSuggestions):
(WebKit::WebDataListSuggestionPicker::close):
(WebKit::WebDataListSuggestionPicker::displayWithActivationType):

  • WebProcess/WebCoreSupport/WebDataListSuggestionPicker.h:

Tools:

Added isShowingDatalistSuggestions testing hook in order to enable testing of the
visibility of the suggestions view.

  • DumpRenderTree/mac/UIScriptControllerMac.mm:

(WTR::UIScriptController::isShowingDataListSuggestions const):

  • TestRunnerShared/UIScriptContext/Bindings/UIScriptController.idl:
  • TestRunnerShared/UIScriptContext/UIScriptController.cpp:

(WTR::UIScriptController::isShowingDataListSuggestions const):

  • TestRunnerShared/UIScriptContext/UIScriptController.h:
  • WebKitTestRunner/mac/UIScriptControllerMac.mm:

(WTR::UIScriptController::isShowingDataListSuggestions const):

LayoutTests:

Added tests to verify that the suggestions are correctly shown and hidden, and that
suggestions can be selected and inserted into an input field.

  • fast/forms/datalist/datalist-show-hide-expected.txt: Added.
  • fast/forms/datalist/datalist-show-hide.html: Added.
  • fast/forms/datalist/datalist-textinput-keydown-expected.txt: Added.
  • fast/forms/datalist/datalist-textinput-keydown.html: Added.
  • platform/ios/TestExpectations:
  • resources/ui-helper.js:

(window.UIHelper.isShowingDataListSuggestions):

1:39 PM Changeset in webkit [233865] by commit-queue@webkit.org
  • 14 edits
    2 adds in trunk

Fullscreen requires active document.
https://bugs.webkit.org/show_bug.cgi?id=186226
rdar://problem/36187413

Patch by Jeremy Jones <jeremyj@apple.com> on 2018-07-16
Reviewed by Jer Noble.

Source/WebCore:

Test: media/no-fullscreen-when-hidden.html

This change guarantees the document to be visible for both element fullscreen and video fullscreen.

User gesture is not enough to guarantee that the document is visible when fullscreen is initiated
because JavaScript can spin wait before initiating fullscreen. During that spin the page or window might
be hidden.

Document::hidden() can't be relied upon because it won't update while JavaScript spins.

This change adds a sync call to the UI process to get the current UI visibility state.

  • dom/Document.cpp:

(WebCore::Document::requestFullScreenForElement):

  • html/HTMLMediaElement.cpp:

(WebCore::HTMLMediaElement::enterFullscreen):

  • page/ChromeClient.h:

Source/WebKit:

This change guarantees the document to be visible for both element fullscreen and video fullscreen.

User gesture is not enough to guarantee that the document is visible when fullscreen is initiated
because JavaScript can spin wait before initiating fullscreen. During that spin the page or window might
be hidden.

Document::hidden() can't be relied upon because it won't update while JavaScript spins.

This change adds a sync call to the UI process to get the current UI visibility state.

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::getIsViewVisible):

  • UIProcess/WebPageProxy.h:
  • UIProcess/WebPageProxy.messages.in:
  • WebProcess/WebCoreSupport/WebChromeClient.cpp:

(WebKit::WebChromeClient::isViewVisible):

  • WebProcess/WebCoreSupport/WebChromeClient.h:

LayoutTests:

This change guarantees the document to be visible for both element fullscreen and video fullscreen.

User gesture is not enough to guarantee that the document is visible when fullscreen is initiated
because JavaScript can spin wait before initiating fullscreen. During that spin the page or window might
be hidden.

Document::hidden() can't be relied upon because it won't update while JavaScript spins.

This change adds a sync call to the UI process to get the current UI visibility state.

  • media/no-fullscreen-when-hidden.html: Added.
  • media/video-test.js:

(eventName.string_appeared_here.thunk):
(runWithKeyDown):

  • platform/ios-wk1/TestExpectations:
  • platform/mac-wk1/TestExpectations:
1:32 PM Changeset in webkit [233864] by timothy_horton@apple.com
  • 2 edits in trunk/Source/WebKit

REGRESSION (r233502): Camera in <input type=file> becomes unresponsive after attempting to dismiss it
https://bugs.webkit.org/show_bug.cgi?id=187706
<rdar://problem/42137088>

Reviewed by Wenson Hsieh.

  • UIProcess/ios/forms/WKFileUploadPanel.mm:

Remove an unused member.

(-[WKFileUploadPanel _dismissDisplayAnimated:]):
Allow us to dismiss the camera view controller in addition to the menu.

1:23 PM Changeset in webkit [233863] by commit-queue@webkit.org
  • 7 edits in trunk/Source

Reduce size of NetworkLoadMetrics and therefore ResourceResponse
https://bugs.webkit.org/show_bug.cgi?id=187671

Patch by Alex Christensen <achristensen@webkit.org> on 2018-07-16
Reviewed by Darin Adler.

Source/WebCore:

  • inspector/agents/InspectorNetworkAgent.cpp:

(WebCore::toProtocol):
(WebCore::InspectorNetworkAgent::buildObjectForMetrics):

  • platform/network/NetworkLoadMetrics.h:

(WebCore::NetworkLoadMetrics::isolatedCopy const):
(WebCore::NetworkLoadMetrics::reset):
(WebCore::NetworkLoadMetrics::clearNonTimingData):

Source/WebKit:

  • Shared/WebCoreArgumentCoders.h:
1:10 PM Changeset in webkit [233862] by Yusuke Suzuki
  • 2 edits in trunk/Source/JavaScriptCore

[JSC] UnlinkedCodeBlock::shrinkToFit miss m_constantIdentifierSets
https://bugs.webkit.org/show_bug.cgi?id=187709

Reviewed by Mark Lam.

UnlinkedCodeBlock::shrinkToFit accidentally misses m_constantIdentifierSets shrinking.

  • bytecode/UnlinkedCodeBlock.cpp:

(JSC::UnlinkedCodeBlock::shrinkToFit):

1:06 PM Changeset in webkit [233861] by Matt Baker
  • 3 edits in trunk/Source/WebInspectorUI

Web Inspector: Fix execution highlighting after r233820
https://bugs.webkit.org/show_bug.cgi?id=187703
<rdar://problem/42246167>

Reviewed by Joseph Pecoraro.

  • UserInterface/Views/SourceCodeTextEditor.js:

(WI.SourceCodeTextEditor.prototype.textEditorExecutionHighlightRange):

  • UserInterface/Views/TextEditor.js:

(WI.TextEditor.prototype.currentPositionToOriginalPosition):
(WI.TextEditor.prototype._updateExecutionRangeHighlight):

12:49 PM Changeset in webkit [233860] by Yusuke Suzuki
  • 2 edits in trunk/Source/JavaScriptCore

[JSC] Make SourceParseMode small
https://bugs.webkit.org/show_bug.cgi?id=187705

Reviewed by Mark Lam.

Each SourceParseMode is distinct. So we do not need to make it a set-style (power of 2 style).
Originally, this is done to make SourceParseModeSet faster because it is critical in our parser.
But we can keep SourceParseModeSet fast by 1U << mode | set. And we can make SourceParseMode
within 5 bits. This reduces the size of UnlinkedCodeBlock from 288 to 280.

  • parser/ParserModes.h:

(JSC::SourceParseModeSet::SourceParseModeSet):
(JSC::SourceParseModeSet::contains):
(JSC::SourceParseModeSet::mergeSourceParseModes):

12:09 PM Changeset in webkit [233859] by Kocsen Chung
  • 1 copy in branches/safari-606-branch

New Branch.

11:57 AM Changeset in webkit [233858] by commit-queue@webkit.org
  • 4 edits
    16 adds in trunk

AX: Audit Tab should have an Audit Manager
https://bugs.webkit.org/show_bug.cgi?id=184071
<rdar://problem/38946364>

Patch by Aaron Chu <aaron_chu@apple.com> on 2018-07-16
Reviewed by Brian Burg.

Source/WebInspectorUI:

This implements the AuditManager for the audit feature. This patch revolves
around building out an AuditManager that facilitates an audit. The AuditManager
is responsible for managing and storing AuditReports and AuditTestSuites. It is
also tasked to decide how to run a test -- whether as a test case or as a test
suite. This patch also includes 4 models with which the AuditManager works to
perform an audit and to generate a report. These models include AuditTestCase,
which as a collection is stored inside an AuditTestSuite; and AuditResult,
which, as a collection is stored inside an AuditReport.

  • UserInterface/Controllers/AuditManager.js: Added.

(WI.AuditManager):
(WI.AuditManager.prototype.get testSuites):
(WI.AuditManager.prototype.get reports):
(WI.AuditManager.prototype.async.runAuditTestByRepresentedObject):
(WI.AuditManager.prototype.reportForId):
(WI.AuditManager.prototype.removeAllReports):
(WI.AuditManager.prototype.async._runTestCase):

  • UserInterface/Main.html:
  • UserInterface/Models/AuditReport.js: Added.

(WI.AuditReport):
(WI.AuditReport.prototype.get representedTestCases):
(WI.AuditReport.prototype.get representedTestSuite):
(WI.AuditReport.prototype.get resultsData):
(WI.AuditReport.prototype.get isWritable):
(WI.AuditReport.prototype.get failedCount):
(WI.AuditReport.prototype.addResult):
(WI.AuditReport.prototype.close):

  • UserInterface/Models/AuditResult.js: Added.

(WI.AuditResult):
(WI.AuditResult.prototype.get testResult):
(WI.AuditResult.prototype.get name):
(WI.AuditResult.prototype.get logLevel):
(WI.AuditResult.prototype.get failed):

  • UserInterface/Models/AuditTestCase.js: Added.

(WI.AuditTestCase.prototype.get id):
(WI.AuditTestCase.prototype.get name):
(WI.AuditTestCase.prototype.get suite):
(WI.AuditTestCase.prototype.get test):
(WI.AuditTestCase.prototype.get setup):
(WI.AuditTestCase.prototype.get tearDown):
(WI.AuditTestCase.prototype.get errorDetails):
(WI.AuditTestCase):

  • UserInterface/Models/AuditTestSuite.js: Added.

(WI.AuditTestSuite):
(WI.AuditTestSuite.testCaseDescriptors):
(WI.AuditTestSuite.prototype.get id):
(WI.AuditTestSuite.prototype.get name):
(WI.AuditTestSuite.prototype.get testCases):
(WI.AuditTestSuite.prototype._buildTestCasesFromDescriptors):

  • UserInterface/Test.html:

LayoutTests:

Test cases for AuditManager, AuditTestCase, AuditTestSuite, AuditResult and AuditReport.

  • inspector/audit/audit-manager-expected.txt: Added.
  • inspector/audit/audit-manager.html: Added.
  • inspector/audit/audit-report-expected.txt: Added.
  • inspector/audit/audit-report.html: Added.
  • inspector/audit/audit-test-case-expected.txt: Added.
  • inspector/audit/audit-test-case.html: Added.
  • inspector/audit/audit-test-suite-expected.txt: Added.
  • inspector/audit/audit-test-suite.html: Added.
  • inspector/audit/resources/audit-test-fixtures.js: Added.

(TestPage.registerInitializer.window.testSuiteFixture1):
(TestPage.registerInitializer.window.testSuiteFixture1.testCaseDescriptors):
(TestPage.registerInitializer.window.testSuiteFixture2):
(TestPage.registerInitializer.window.testSuiteFixture2.testCaseDescriptors):
(TestPage.registerInitializer):

11:55 AM Changeset in webkit [233857] by Chris Dumez
  • 3 edits in trunk/Source/WebCore

Make sure LibWebRTCMediaEndpoint is always destroyed on the main thread
https://bugs.webkit.org/show_bug.cgi?id=187702

Reviewed by Youenn Fablet.

Make sure LibWebRTCMediaEndpoint is always constructed and destructed on the main thread since
it has a Timer data member and it would not be safe otherwise. LibWebRTCMediaEndpoint is
ThreadSafeRefCounted and frequently passed to other threads.

  • Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp:

(WebCore::LibWebRTCMediaEndpoint::LibWebRTCMediaEndpoint):

  • Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.h:
11:52 AM Changeset in webkit [233856] by Yusuke Suzuki
  • 2 edits in trunk/Tools

Add --target-path option to dump-class-layout
https://bugs.webkit.org/show_bug.cgi?id=187687

Reviewed by Simon Fraser.

We add an escape hatch to dump-class-layout for specifying target path directly.
This --target-path allows us to use dump-class-layout in the other ports
like JSCOnly.

We can dump class layout if we build the target with clang by using the following command.

Tools/Scripts/dump-class-layout \

--architecture=x86_64 \
--target-path=path/to/libJavaScriptCore.so \
JavaScriptCore \
ScopeNode

  • Scripts/dump-class-layout:

(main):

11:49 AM Changeset in webkit [233855] by Yusuke Suzuki
  • 10 edits
    3 adds in trunk

[JSC] Generator and AsyncGeneratorMethod's prototype is incorrect
https://bugs.webkit.org/show_bug.cgi?id=187585

Reviewed by Darin Adler.

JSTests:

  • stress/default-proto-for-async-generator.js: Added.

(shouldBe):
(async.asyncGenerator):

  • stress/default-proto-for-generator.js: Added.

(shouldBe):
(generator):

  • stress/prototype-for-async-generator.js: Added.

(shouldBe):
(async.asyncGenerator):
(A.prototype.async.asyncGenerator):
(A):

  • test262/expectations.yaml:

Source/JavaScriptCore:

This patch fixes Generator and AsyncGenerator's prototype issues.

  1. Generator's default prototype is incorrect when generator.prototype = null is performed.

We fix this by changing JSFunction::prototypeForConstruction.

  1. AsyncGeneratorMethod is not handled. We change the name isAsyncGeneratorFunctionParseMode

to isAsyncGeneratorWrapperParseMode since it is aligned to Generator's code. And use it well
to fix prototype issues for AsyncGeneratorMethod.

  • bytecompiler/BytecodeGenerator.cpp:

(JSC::BytecodeGenerator::emitPutAsyncGeneratorFields):
(JSC::BytecodeGenerator::emitNewFunction):

  • bytecompiler/NodesCodegen.cpp:

(JSC::FunctionNode::emitBytecode):

  • parser/ASTBuilder.h:

(JSC::ASTBuilder::createFunctionMetadata):

  • parser/Parser.cpp:

(JSC::getAsynFunctionBodyParseMode):
(JSC::Parser<LexerType>::parseInner):
(JSC::Parser<LexerType>::parseAsyncGeneratorFunctionSourceElements):

  • parser/ParserModes.h:

(JSC::isAsyncGeneratorParseMode):
(JSC::isAsyncGeneratorWrapperParseMode):
(JSC::isAsyncGeneratorFunctionParseMode): Deleted.

  • runtime/FunctionExecutable.h:
  • runtime/JSFunction.cpp:

(JSC::JSFunction::prototypeForConstruction):
(JSC::JSFunction::getOwnPropertySlot):

11:42 AM Changeset in webkit [233854] by mark.lam@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

jsc shell's noFTL utility test function should be more robust.
https://bugs.webkit.org/show_bug.cgi?id=187704
<rdar://problem/42231988>

Reviewed by Michael Saboff and Keith Miller.

  • jsc.cpp:

(functionNoFTL):

  • only setNeverFTLOptimize() if the function is actually a JS function.
11:35 AM Changeset in webkit [233853] by sihui_liu@apple.com
  • 7 edits in trunk

IndexedDB: closeAndDeleteDatabasesForOrigins should remove all databases for those origins
https://bugs.webkit.org/show_bug.cgi?id=187631
<rdar://problem/42164227>

Reviewed by Brady Eidson.

Source/WebCore:

When asked to delete database for an origin, we deleted the databases whose mainFrameOrigin
is that origin. Given that the origin may create IndexedDB from subframes, we should delete
databases whose openingOrigin is that origin too.

Covered by modified API test: WebKit.WebsiteDataStoreCustomPaths.

  • Modules/indexeddb/server/IDBServer.cpp:

(WebCore::IDBServer::IDBServer::performCloseAndDeleteDatabasesForOrigins):

Source/WebKit:

We need to return all origins, both openingOrigin and mainFrameOrigin, of IndexedDB so users
could be better aware of which origins are using databases and decide what they want to
remove.

  • StorageProcess/StorageProcess.cpp:

(WebKit::StorageProcess::indexedDatabaseOrigins):

  • StorageProcess/StorageProcess.h:

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/WebsiteDataStoreCustomPaths.mm:

(TEST):

11:28 AM Changeset in webkit [233852] by Kocsen Chung
  • 7 edits in trunk/Source

Versioning.

10:59 AM Changeset in webkit [233851] by Simon Fraser
  • 29 edits in trunk/Source/WebCore

Shrink some font-related classes and enums
https://bugs.webkit.org/show_bug.cgi?id=187686

Reviewed by Myles Maxfield.

Use enum class for enums in TextFlags.h and make them one byte big.

Re-order members of Font to shrink it from 360 to 328 bytes.

  • css/CSSPrimitiveValueMappings.h:

(WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
(WebCore::CSSPrimitiveValue::operator FontSmoothingMode const):
(WebCore::CSSPrimitiveValue::operator FontSmallCaps const):
(WebCore::CSSPrimitiveValue::operator TextRenderingMode const):

  • platform/graphics/Font.cpp:

(WebCore::Font::Font):
(WebCore::Font::verticalRightOrientationFont const):

  • platform/graphics/Font.h:
  • platform/graphics/FontCascade.cpp:

(WebCore::offsetToMiddleOfGlyph):

  • platform/graphics/FontCascade.h:

(WebCore::FontCascade::advancedTextRenderingMode const):

  • platform/graphics/FontCascadeFonts.cpp:

(WebCore::FontCascadeFonts::glyphDataForSystemFallback):
(WebCore::FontCascadeFonts::glyphDataForVariant):
(WebCore::glyphPageFromFontRanges):

  • platform/graphics/FontDescription.cpp:

(WebCore::FontCascadeDescription::FontCascadeDescription):

  • platform/graphics/FontDescription.h:

(WebCore::FontDescription::setTextRenderingMode):
(WebCore::FontDescription::setOrientation):
(WebCore::FontDescription::setWidthVariant):
(WebCore::FontCascadeDescription::setFontSmoothing):
(WebCore::FontCascadeDescription::initialSmallCaps):
(WebCore::FontCascadeDescription::initialFontSmoothing):
(WebCore::FontCascadeDescription::initialTextRenderingMode):

  • platform/graphics/FontPlatformData.h:

(WebCore::FontPlatformData::isForTextCombine const):

  • platform/graphics/cocoa/FontCacheCoreText.cpp:

(WebCore::preparePlatformFont):

  • platform/graphics/cocoa/FontCascadeCocoa.mm:

(WebCore::showLetterpressedGlyphsWithAdvances):
(WebCore::showGlyphsWithAdvances):
(WebCore::FontCascade::drawGlyphs):
(WebCore::FontCascade::fontForCombiningCharacterSequence const):

  • platform/graphics/cocoa/FontCocoa.mm:

(WebCore::Font::platformInit):
(WebCore::Font::platformBoundsForGlyph const):
(WebCore::Font::platformWidthForGlyph const):

  • platform/graphics/cocoa/FontPlatformDataCocoa.mm:

(WebCore::FontPlatformData::hash const):
(WebCore::mapFontWidthVariantToCTFeatureSelector):
(WebCore::FontPlatformData::ctFont const):
(WebCore::FontPlatformData::description const):

  • platform/graphics/freetype/FontPlatformDataFreeType.cpp:

(WebCore::FontPlatformData::buildScaledFont):

  • platform/graphics/freetype/SimpleFontDataFreeType.cpp:

(WebCore::Font::platformInit):
(WebCore::Font::platformWidthForGlyph const):

  • platform/graphics/harfbuzz/ComplexTextControllerHarfBuzz.cpp:

(WebCore::fontFeatures):
(WebCore::ComplexTextController::collectComplexTextRunsForCharacters):

  • platform/graphics/mac/SimpleFontDataCoreText.cpp:

(WebCore::Font::getCFStringAttributes const):

  • platform/graphics/win/FontCGWin.cpp:

(WebCore::FontCascade::drawGlyphs):

  • platform/graphics/win/FontCascadeDirect2D.cpp:

(WebCore::FontCascade::drawGlyphs):

  • platform/graphics/win/GlyphPageTreeNodeDirect2D.cpp:

(WebCore::GlyphPage::fill):

  • platform/graphics/win/SimpleFontDataDirect2D.cpp:

(WebCore::Font::platformInit):
(WebCore::Font::platformBoundsForGlyph const):
(WebCore::Font::platformWidthForGlyph const):

  • platform/text/TextFlags.h:
  • rendering/RenderCombineText.cpp:

(WebCore::RenderCombineText::combineTextIfNeeded):

  • rendering/RenderLayer.cpp:

(WebCore::RenderLayer::calculateClipRects const):

  • rendering/TextPainter.cpp:

(WebCore::TextPainter::paintTextWithShadows):

  • rendering/TextPainter.h:
  • rendering/style/RenderStyle.cpp:

(WebCore::RenderStyle::fontAndGlyphOrientation):

  • rendering/svg/RenderSVGInlineText.cpp:

(WebCore::RenderSVGInlineText::computeNewScaledFontForStyle):

10:51 AM Changeset in webkit [233850] by commit-queue@webkit.org
  • 2 edits in trunk/LayoutTests

[ iOS ] Layout Test fast/forms/submit-change-fragment.html is a flaky Timeout
https://bugs.webkit.org/show_bug.cgi?id=187699

Unreviewed test gardening.

Patch by Truitt Savell <Truitt Savell> on 2018-07-16

  • platform/ios-simulator-wk2/TestExpectations:
9:54 AM Changeset in webkit [233849] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

[ EWS ] http/tests/security/contentSecurityPolicy/userAgentShadowDOM/allow-audio.html is Crashing on Win-EWS
https://bugs.webkit.org/show_bug.cgi?id=187700

Unreviewed test gardening.

Patch by Truitt Savell <Truitt Savell> on 2018-07-16

  • platform/win/TestExpectations:
9:37 AM Changeset in webkit [233848] by Nikita Vasilyev
  • 2 edits in trunk/Source/WebInspectorUI

Web Inspector: Dark Mode: Console filter field buttons should be darker
https://bugs.webkit.org/show_bug.cgi?id=187626
<rdar://problem/42142744>

Reviewed by Brian Burg.

  • UserInterface/Views/FindBanner.css:

(@media (prefers-dark-interface)):
(.find-banner > button.segmented):
(.find-banner > button.segmented > .glyph):

9:29 AM Changeset in webkit [233847] by Nikita Vasilyev
  • 2 edits in trunk/Source/WebInspectorUI

Web Inspector: Dark Mode: selected item background color is too light
https://bugs.webkit.org/show_bug.cgi?id=187691
<rdar://problem/42225308>

Reviewed by Brian Burg.

  • UserInterface/Views/DarkMode.css:

(@media (prefers-dark-interface)):
(:root):
(.tree-outline.dom li.elements-drag-over .selection-area):
(.tree-outline.dom:focus li.selected .selection-area):

7:24 AM Changeset in webkit [233846] by svillar@igalia.com
  • 14 edits
    2 copies in trunk/Source/WebCore

[WebVR] Add support for connect/disconnect and mount/unmount device events
https://bugs.webkit.org/show_bug.cgi?id=187343

Reviewed by Žan Doberšek.

WebVR specs define a series of events as part of the Window Interface Extension. We're
adding support for the connect/disconnect and mount/unmount events both at the module level
and the platform level using OpenVR.

In order to do that we need to keep lists of VRPlatformDisplays at platform level and
VRDisplays at bindings level. We then update those lists accordingly to detect potential
additions/removals, and emit the corresponding signals. A new client interface
VRPlatformDisplayClient was also defined so that VRPlatformDisplay implementations could
notify their clients (typically a VRDisplay).

Last but not least, NavigatorWebVR was updated so it supplements Navigator instead of
supplementing Page.

  • Modules/webvr/NavigatorWebVR.cpp: Supplement Navigator not Page.

(WebCore::NavigatorWebVR::getVRDisplays): Keep a list of VRDisplays and update them
conveniently, also emitting the required events under certain conditions (like device
disconnection).
(WebCore::NavigatorWebVR::supplementName): New method.
(WebCore::NavigatorWebVR::from): Ditto.

  • Modules/webvr/NavigatorWebVR.h: Supplement Navigator not Page.
  • Modules/webvr/VRDisplay.cpp:

(WebCore::VRDisplay::create): Moved suspendIfNeeded() to constructor.
(WebCore::VRDisplay::VRDisplay): Set itself as VRPlatformDisplay client.
(WebCore::VRDisplay::~VRDisplay): Unset as VRPlatformDisplay client.
(WebCore::VRDisplay::VRPlatformDisplayConnected): Dispatch event on DOM window.
(WebCore::VRDisplay::VRPlatformDisplayDisconnected): Ditto.
(WebCore::VRDisplay::VRPlatformDisplayMounted): Ditto.
(WebCore::VRDisplay::VRPlatformDisplayUnmounted): Ditto.

  • Modules/webvr/VRDisplay.h: Extend from VRPlatformDisplayClient.

(WebCore::VRDisplay::document):

  • Modules/webvr/VRDisplayEvent.cpp: Updated Copyright.
  • Modules/webvr/VRDisplayEvent.h: Ditto.
  • Sources.txt: Added the two new files.
  • WebCore.xcodeproj/project.pbxproj: Ditto.
  • platform/vr/VRManager.cpp:

(WebCore::VRManager::getVRDisplays): Keep a list of VRPlatformDisplays and update them conveniently,
also emitting the required events under certain conditions (like device disconnection).

  • platform/vr/VRManager.h:
  • platform/vr/VRPlatformDisplay.cpp: New file with common implementations for VRPlatformDisplays.

(WebCore::VRPlatformDisplay::setClient):
(WebCore::VRPlatformDisplay::notifyVRPlatformDisplayEvent):

  • platform/vr/VRPlatformDisplay.h: Added a generic method to notify about different

events. Added the client pointer.

  • platform/vr/VRPlatformDisplayClient.h: New file. VRPlatformDisplay implementations will

call the client methods in the event of some circumstances happening.
(WebCore::VRPlatformDisplayClient::VRPlatformDisplayConnected):
(WebCore::VRPlatformDisplayClient::VRPlatformDisplayDisconnected):
(WebCore::VRPlatformDisplayClient::VRPlatformDisplayMounted):
(WebCore::VRPlatformDisplayClient::VRPlatformDisplayUnmounted):

  • platform/vr/openvr/VRPlatformDisplayOpenVR.cpp:

(WebCore::VRPlatformDisplayOpenVR::updateDisplayInfo): Poll the device for new events to
detect connection/disconnections or device activations/deactivations (HMD
mounted/unmounted).

  • platform/vr/openvr/VRPlatformDisplayOpenVR.h:
5:24 AM Changeset in webkit [233845] by zandobersek@gmail.com
  • 4 edits
    2 adds in trunk/Source/WebCore

[Nicosia] Add Nicosia::PlatformLayer, Nicosia::CompositionLayer classes
https://bugs.webkit.org/show_bug.cgi?id=187693

Reviewed by Carlos Garcia Campos.

Add the Nicosia::PlatformLayer class. This will be the base platform
layer class from which different derivatives will be created, addressing
different use cases. The generic PlatformLayer type alias will point to
this class in the future.

First class deriving from Nicosia::PlatformLayer is
Nicosia::CompositionLayer, purpose of which will be to mirror the state
that's stored in the platform-specific GraphicsLayer derivative. It will
also allow making thread-safe updates to that state.

CoordinatedGraphicsLayer implementation now spawns a CompositionLayer
object and tracks state changes in a separate
CompositionLayer::LayerState::Delta object. During flushing, the changed
state is applied to the layer's pending state before the delta is nulled
out. The updated state isn't used anywhere yet, but future changes will
implement committing this state into the rendering pipeline.

There's bits of state not yet being managed by CompositionLayer, e.g.
debug visuals, filters and animations. These will be addressed later.

The m_solidColor member variable is added to CoordinatedGraphicsLayer in
order to properly store the solid color value. Normally this would be
contained by the parent GraphicsLayer class, but no such member variable
exists there.

  • platform/TextureMapper.cmake:
  • platform/graphics/nicosia/NicosiaPlatformLayer.cpp: Added.

(Nicosia::PlatformLayer::PlatformLayer):
(Nicosia::CompositionLayer::CompositionLayer):

  • platform/graphics/nicosia/NicosiaPlatformLayer.h: Added.

(Nicosia::PlatformLayer::isCompositionLayer const):
(Nicosia::PlatformLayer::id const):
(Nicosia::CompositionLayer::create):
(Nicosia::CompositionLayer::LayerState::Flags::Flags):
(Nicosia::CompositionLayer::updateState):

  • platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:

(WebCore::CoordinatedGraphicsLayer::CoordinatedGraphicsLayer):
(WebCore::CoordinatedGraphicsLayer::setPosition):
(WebCore::CoordinatedGraphicsLayer::setAnchorPoint):
(WebCore::CoordinatedGraphicsLayer::setSize):
(WebCore::CoordinatedGraphicsLayer::setTransform):
(WebCore::CoordinatedGraphicsLayer::setChildrenTransform):
(WebCore::CoordinatedGraphicsLayer::setPreserves3D):
(WebCore::CoordinatedGraphicsLayer::setMasksToBounds):
(WebCore::CoordinatedGraphicsLayer::setDrawsContent):
(WebCore::CoordinatedGraphicsLayer::setContentsVisible):
(WebCore::CoordinatedGraphicsLayer::setContentsOpaque):
(WebCore::CoordinatedGraphicsLayer::setBackfaceVisibility):
(WebCore::CoordinatedGraphicsLayer::setOpacity):
(WebCore::CoordinatedGraphicsLayer::setContentsRect):
(WebCore::CoordinatedGraphicsLayer::setContentsTileSize):
(WebCore::CoordinatedGraphicsLayer::setContentsTilePhase):
(WebCore::CoordinatedGraphicsLayer::setContentsToSolidColor):
(WebCore::CoordinatedGraphicsLayer::setMaskLayer):
(WebCore::CoordinatedGraphicsLayer::setReplicatedByLayer):
(WebCore::CoordinatedGraphicsLayer::syncChildren):
(WebCore::CoordinatedGraphicsLayer::flushCompositingStateForThisLayerOnly):

  • platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h:
4:58 AM Changeset in webkit [233844] by Carlos Garcia Campos
  • 6 edits in trunk

[GLIB] Add API to evaluate code using a given object to store global symbols
https://bugs.webkit.org/show_bug.cgi?id=187639

Reviewed by Michael Catanzaro.

Source/JavaScriptCore:

Add jsc_context_evaluate_in_object(). It returns a new object as an out parameter. Global symbols in the
evaluated script are added as properties to the new object instead of to the context global object. This is
similar to JS::Evaluate in spider monkey when a scopeChain parameter is passed, but JSC doesn't support using a
scope for assignments, so we have to create a new context and get its global object. This patch also updates
jsc_context_evaluate_with_source_uri() to receive the starting line number for consistency with the new
jsc_context_evaluate_in_object().

  • API/glib/JSCContext.cpp:

(jsc_context_evaluate): Pass 0 as line number to jsc_context_evaluate_with_source_uri().
(evaluateScriptInContext): Helper function to evaluate a script in a JSGlobalContextRef.
(jsc_context_evaluate_with_source_uri): Use evaluateScriptInContext().
(jsc_context_evaluate_in_object): Create a new context and set the main context global object as extension
scope of it. Evaluate the script in the new context and get its global object to be returned as parameter.

  • API/glib/JSCContext.h:
  • API/glib/docs/jsc-glib-4.0-sections.txt:

Tools:

Add a new test case.

  • TestWebKitAPI/Tests/JavaScriptCore/glib/TestJSC.cpp:

(testJSCEvaluateInObject):
(testJSCExceptions):
(main):

Jul 15, 2018:

11:43 PM Changeset in webkit [233843] by zandobersek@gmail.com
  • 3 edits in trunk/Tools

[webkitpy] run-web-platform-tests should allow specifying custom WPT metadata directories
https://bugs.webkit.org/show_bug.cgi?id=187353

Reviewed by Youenn Fablet.

When using run-web-platform-tests, allow specifying custom WPT metadata
directory. This will avoid generating such metadata-filled directory
from the port-specific JSON expectations file, and instead will search
for the metadata files and the include manifest inside the specified
directory. The MANIFEST.json file will also be generated under there.

Rationale for this change is prototyping using custom metadata
directories and avoiding generating all this content from a JSON file.
Using this by default in the future would avoid sporradic changes in how
WPT handles metadata .ini files and releases us from the obligation of
adjusting the generator for every such change. This would also allow
managing this metadata content in a separate repository, avoiding
polluting the main webkit.org repository with thousands of .ini files.

If this turns out to be the preferable way of managing the metadata
content, the JSON files under WebPlatformTests/ and the related code in
wpt_runner.py would be removed.

  • Scripts/webkitpy/w3c/wpt_runner.py:

(parse_args):
(WPTRunner._wpt_run_paths):
(WPTRunner.run):

  • Scripts/webkitpy/w3c/wpt_runner_unittest.py:

(WPTRunnerTest.test_run_with_specified_options):

10:22 PM Changeset in webkit [233842] by Carlos Garcia Campos
  • 4 edits in trunk/Source/WebKit

[SOUP] http/tests/misc/bubble-drag-events.html crashes
https://bugs.webkit.org/show_bug.cgi?id=182352

Reviewed by Youenn Fablet.

PingLoad is not refcounted and deletes itself when the load finishes. The problem is that the network data
task can also finish the load, causing the PingLoad to be deleted early. We tried to fix it in r233032 in the
network data task soup implementation, but it caused regressions.

  • NetworkProcess/PingLoad.cpp:

(WebKit::PingLoad::didReceiveChallenge): Create a weak ref for the ping load before calling the operation completion
handler and return early after the completion handler if it was deleted.
(WebKit::PingLoad::didReceiveResponseNetworkSession): Ditto.

  • NetworkProcess/PingLoad.h:
  • NetworkProcess/soup/NetworkDataTaskSoup.cpp:

(WebKit::NetworkDataTaskSoup::continueAuthenticate): Revert r233032.

10:19 PM Changeset in webkit [233841] by Wenson Hsieh
  • 2 edits in trunk/Source/WebCore

[iOS apps on macOS] Playing embedded Twitter videos in the News app crashes the web process
https://bugs.webkit.org/show_bug.cgi?id=187690
<rdar://problem/41869703>

Reviewed by Tim Horton.

Work around unexpected behavior when soft-linking AVFoundation. After using dlopen_preflight to check for the
existence of a library prior to loading the library using dlopen, dlsym subsequently returns null for some
symbols that would otherwise be available. This causes us to RELEASE_ASSERT later down the road when we try to
load AVAudioSessionModeDefault in AudioSessionIOS.mm.

To fix this for now, simply check for the library directly instead of using the more lightweight preflight
check. See clone: <rdar://problem/42224780> for more detail.

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

(WebCore::AVFoundationMIMETypeCache::isAvailable const):

Note: See TracTimeline for information about the timeline view.