Timeline



Jan 10, 2017:

11:53 PM Changeset in webkit [210578] by rniwa@webkit.org
  • 2 edits in trunk/Websites/perf.webkit.org

Another build fix. Always use UTC when expressing commit times in UNIX-epoch timestamps.

  • public/api/measurement-set.php:
8:53 PM Changeset in webkit [210577] by rniwa@webkit.org
  • 2 edits in trunk/Websites/perf.webkit.org

Fix a typo in the previous commit.

  • public/api/measurement-set.php:
8:51 PM Changeset in webkit [210576] by rniwa@webkit.org
  • 4 edits in trunk/Websites/perf.webkit.org

Build fixes for older versions of Postgres.

Also redirect / and /# to /v3/ as intended in r200820.

  • public/api/measurement-set.php:
  • public/api/runs.php:
  • public/index.html:
8:07 PM Changeset in webkit [210575] by clopez@igalia.com
  • 2 edits in trunk/Tools

[GTK] install-dependencies script misses gdb
https://bugs.webkit.org/show_bug.cgi?id=166917

Reviewed by Michael Catanzaro.

gdb is needed for generating the crash logs.

  • gtk/install-dependencies:
7:56 PM Changeset in webkit [210574] by Michael Catanzaro
  • 14 edits in trunk

[GTK] No way for applications to set notification permissions without waiting for permission request
https://bugs.webkit.org/show_bug.cgi?id=163366

Reviewed by Carlos Garcia Campos.

Source/WebKit2:

Websites can check the Notification.permission DOM property to check if they have permission
to show notifications *without triggering a permission request*. But the WebKitGTK+ API has
no way to affirmatively indicate notifications are allowed without a permission request. The
only way is via the permission request API, which is too late. It's a problem for Epiphany.
For example, open the Riot Matrix client in a web app; you will immediately see an info bar
informing the user that Riot does not have permission to send desktop notifications, even
though Epiphany automatically grants notification permission in web app mode when requested.
This problem is not exclusive to web apps; there is simply no way for notification
permission to be set correctly prior to a permission request for it. Fix this by introducing
a webkit_web_context_initialize_notification_permissions() API, and add a signal
WebKitWebContext::initialize-notification-permissions to indicate when it should be called.

  • UIProcess/API/gtk/WebKitNotificationProvider.cpp:

(notificationPermissionsCallback):
(WebKitNotificationProvider::create):
(WebKitNotificationProvider::WebKitNotificationProvider):
(WebKitNotificationProvider::notificationPermissions):
(WebKitNotificationProvider::setNotificationPermissions):

  • UIProcess/API/gtk/WebKitNotificationProvider.h:
  • UIProcess/API/gtk/WebKitSecurityOrigin.cpp:

(webkitSecurityOriginGetSecurityOrigin):

  • UIProcess/API/gtk/WebKitSecurityOriginPrivate.h:
  • UIProcess/API/gtk/WebKitWebContext.cpp:

(webkitWebContextConstructed):
(webkit_web_context_class_init):
(addOriginToMap):
(webkit_web_context_initialize_notification_permissions):
(webkitWebContextInitializeNotificationPermissions):

  • UIProcess/API/gtk/WebKitWebContext.h:
  • UIProcess/API/gtk/WebKitWebContextPrivate.h:
  • UIProcess/API/gtk/docs/webkit2gtk-4.0-sections.txt:

Tools:

  • TestWebKitAPI/Tests/WebKit2Gtk/TestWebKitWebView.cpp:

(testWebViewNotification):
(setInitialNotificationPermissionsAllowedCallback):
(setInitialNotificationPermissionsDisallowedCallback):
(testWebViewNotificationInitialPermissionAllowed):
(testWebViewNotificationInitialPermissionDisallowed):
(beforeAll):

  • TestWebKitAPI/gtk/WebKit2Gtk/TestMain.h:
  • TestWebKitAPI/gtk/WebKit2Gtk/WebViewTest.cpp:

(WebViewTest::WebViewTest):
(WebViewTest::initializeWebView):

  • TestWebKitAPI/gtk/WebKit2Gtk/WebViewTest.h:
6:26 PM Changeset in webkit [210573] by Yusuke Suzuki
  • 19 edits
    3 adds in trunk

Implement JSSourceCode to propagate SourceCode in module pipeline
https://bugs.webkit.org/show_bug.cgi?id=166861

Reviewed by Saam Barati.

Source/JavaScriptCore:

Instead of propagating source code string, we propagate JSSourceCode
cell in the module pipeline. This allows us to attach a metadata
to the propagated source code string. In particular, it propagates
SourceOrigin through the module pipeline.

And it also fixes JSC shell to use Module source type for module source code.

  • CMakeLists.txt:
  • JavaScriptCore.xcodeproj/project.pbxproj:
  • builtins/ModuleLoaderPrototype.js:

(fulfillFetch):
(requestFetch):

  • jsc.cpp:

(GlobalObject::moduleLoaderFetch):
(runWithScripts):

  • llint/LLIntData.cpp:

(JSC::LLInt::Data::performAssertions):

  • llint/LowLevelInterpreter.asm:
  • runtime/Completion.cpp:

(JSC::loadAndEvaluateModule):
(JSC::loadModule):

  • runtime/JSModuleLoader.cpp:

(JSC::JSModuleLoader::provide):

  • runtime/JSModuleLoader.h:
  • runtime/JSSourceCode.cpp: Added.

(JSC::JSSourceCode::destroy):

  • runtime/JSSourceCode.h: Added.

(JSC::JSSourceCode::createStructure):
(JSC::JSSourceCode::create):
(JSC::JSSourceCode::sourceCode):
(JSC::JSSourceCode::JSSourceCode):

  • runtime/JSType.h:
  • runtime/ModuleLoaderPrototype.cpp:

(JSC::moduleLoaderPrototypeParseModule):

  • runtime/VM.cpp:

(JSC::VM::VM):

  • runtime/VM.h:

Source/WebCore:

Now SourceOrigin is correctly propagated through the module pipeline.
So the error reported by http/tests/security/contentSecurityPolicy/module-eval-blocked-expected.html
is updated.

  • ForwardingHeaders/runtime/JSSourceCode.h: Added.
  • bindings/js/JSDOMPromise.h:

(WebCore::DeferredPromise::resolveWithCallback):

  • bindings/js/ScriptModuleLoader.cpp:

(WebCore::ScriptModuleLoader::notifyFinished):

LayoutTests:

  • http/tests/security/contentSecurityPolicy/module-eval-blocked-expected.txt:
5:54 PM Changeset in webkit [210572] by timothy_horton@apple.com
  • 1 edit
    3 adds in trunk/Tools

MobileMiniBrowser tests don't work by default
https://bugs.webkit.org/show_bug.cgi?id=166910

Reviewed by Alex Christensen.

  • MobileMiniBrowser/MobileMiniBrowser.xcodeproj/xcshareddata/xcschemes/MobileMiniBrowserUITests.xcscheme: Added.

Add a shared scheme; the Makefile depends on the MobileMiniBrowserUITests scheme existing, at the very least.

5:51 PM Changeset in webkit [210571] by Brent Fulgham
  • 10 edits
    2 adds in trunk

File scheme should not allow access of a resource on a different volume.
https://bugs.webkit.org/show_bug.cgi?id=158552
<rdar://problem/15307582>

Reviewed by Alex Christensen.

Source/WebCore:

Revise SecurityOrigin to prevent files from one storage device (volume) from accessing content
on a different storage device (volume) unless universal access is enabled.

Pass the current file device as part of the NSURLRequest so that CFNetwork can reject loads
where the device changes in the midst of a load.

Also properly reflect that SecurityOrigin is never null by passing as a reference,
rather than as a pointer.

Tests: Tools/TestWebKitAPI/Tests/mac/CrossPartitionFileSchemeAccess.mm

  • page/SecurityOrigin.cpp:

(WebCore::SecurityOrigin::canAccess): Pass argument as reference.
(WebCore::SecurityOrigin::passesFileCheck): Add check that file URLs refer to files in
the same storage volume.
(WebCore::SecurityOrigin::canDisplay): Add check that files share the same volume.
(WebCore::SecurityOrigin::isSameSchemeHostPort): Pass argument as reference.

  • page/SecurityOrigin.h:
  • platform/FileSystem.cpp:

(WebCore::filesHaveSameVolume): Added.

  • platform/FileSystem.h:
  • platform/network/cocoa/ResourceRequestCocoa.mm:

(WebCore::ResourceRequest::doUpdatePlatformRequest): If loading a file URL, tell CFNetwork
the storage device at the time of the start of the load so we can trigger a failure if this
changes during the load operation.

  • platform/posix/FileSystemPOSIX.cpp:

(WebCore::getFileDeviceId): Added.

  • platform/win/FileSystemWin.cpp:

(WebCore::getFileDeviceId): Added.

Tools:

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: Add new files.
  • TestWebKitAPI/Tests/mac/CrossPartitionFileSchemeAccess.html: Added.
  • TestWebKitAPI/Tests/mac/CrossPartitionFileSchemeAccess.mm: Added.
5:35 PM Changeset in webkit [210570] by commit-queue@webkit.org
  • 6 edits
    1 delete in trunk

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

"breaks web compatability" (Requested by keith_miller on
#webkit).

Reverted changeset:

"Add support for global"
https://bugs.webkit.org/show_bug.cgi?id=165171
http://trac.webkit.org/changeset/210052

5:28 PM Changeset in webkit [210569] by mark.lam@apple.com
  • 2 edits in trunk/Tools

Reverting run-jsc-stress-tests' $buildType to use string values.
https://bugs.webkit.org/show_bug.cgi?id=166912

Rubber stamped by Filip Pizlo.

This is so that we can test for it in the tests e.g.
@ if $buildType == "debug" then runDefault("--maxSingleAllocationSize=1048576") else skip end

  • Scripts/run-jsc-stress-tests:
5:22 PM Changeset in webkit [210568] by matthew_hanson@apple.com
  • 17 edits
    6 deletes in branches/safari-603-branch

Roll out r210028 via r210336. rdar://problem/29912353

5:02 PM Changeset in webkit [210567] by commit-queue@webkit.org
  • 25 edits
    1 add in trunk

[WebIDL] Remove most of the custom bindings for the WebGL code
https://bugs.webkit.org/show_bug.cgi?id=166834

Patch by Sam Weinig <sam@webkit.org> on 2017-01-10
Reviewed by Alex Christensen.

Source/JavaScriptCore:

  • runtime/ArrayPrototype.h:
  • runtime/ObjectPrototype.h:

Export the ClassInfo so it can be used from WebCore.

Source/WebCore:

Removes all but one custom getter (getExtension) from the WebGL code.

  • Modules/indexeddb/IDBKeyRange.idl:

Replace use of non-standard type, with new OverrideIDLType extended attribute, allowing us
to stay more consistent with the IDL files spec's provide.

  • WebCore.xcodeproj/project.pbxproj:

Move JSWebGL2RenderingContextCustom to the GC/Wrapping only group.

  • bindings/IDLTypes.h:

Add IDLWebGLAny, and simplify IDLIDBKey to not be templatized.

  • bindings/js/JSDOMConvert.h:

(WebCore::Converter<IDLLong>::convert):
(WebCore::Converter<IDLFloat>::convert):
(WebCore::Converter<IDLUnrestrictedFloat>::convert):
(WebCore::Converter<IDLDouble>::convert):
(WebCore::Converter<IDLUnrestrictedDouble>::convert):
Add overloads of convert that convert a double to the numeric type.

(WebCore::Detail::GenericSequenceConverter::convert):
Add optimized specialization for JSArrays that does not use the iterator protocol.

(WebCore::Detail::NumericSequenceConverter::convert):
Add an even more optimized specialization for numeric types, which checks to see
if the array's butterfly has an optimized shape, and extracts the numeric values
from that.

(WebCore::Detail::SequenceConverter::convert):
(WebCore::Detail::SequenceConverter<IDLLong>::convert):
(WebCore::Detail::SequenceConverter<IDLFloat>::convert):
(WebCore::Detail::SequenceConverter<IDLUnrestrictedFloat>::convert):
(WebCore::Detail::SequenceConverter<IDLDouble>::convert):
(WebCore::Detail::SequenceConverter<IDLUnrestrictedDouble>::convert):
Select the right specialization based on type.

(WebCore::Converter<IDLSequence<T>>::convert):
(WebCore::Converter<IDLFrozenArray<T>>::convert):
Rename converter to be more accurate.

(WebCore::JSConverter<IDLWebGLAny>::convert):
Added. Calls through to converter in WebGLAny.h. We should replace this with a
call to the IDLUnion JSConverter when feasible.

  • bindings/js/JSWebGL2RenderingContextCustom.cpp:

(WebCore::JSWebGL2RenderingContext::getInternalformatParameter): Deleted.
(WebCore::JSWebGL2RenderingContext::getQueryParameter): Deleted.
(WebCore::JSWebGL2RenderingContext::getSamplerParameter): Deleted.
(WebCore::JSWebGL2RenderingContext::getSyncParameter): Deleted.
(WebCore::JSWebGL2RenderingContext::getIndexedParameter): Deleted.
(WebCore::JSWebGL2RenderingContext::getActiveUniformBlockParameter): Deleted.
(WebCore::JSWebGL2RenderingContext::getActiveUniformBlockName): Deleted.
Remove unnecessary custom functions.

  • bindings/js/JSWebGLRenderingContextBaseCustom.cpp:

(WebCore::objectParameter): Deleted.
(WebCore::JSWebGLRenderingContextBase::getAttachedShaders): Deleted.
(WebCore::JSWebGLRenderingContextBase::getBufferParameter): Deleted.
(WebCore::JSWebGLRenderingContextBase::getFramebufferAttachmentParameter): Deleted.
(WebCore::JSWebGLRenderingContextBase::getParameter): Deleted.
(WebCore::JSWebGLRenderingContextBase::getProgramParameter): Deleted.
(WebCore::JSWebGLRenderingContextBase::getRenderbufferParameter): Deleted.
(WebCore::JSWebGLRenderingContextBase::getShaderParameter): Deleted.
(WebCore::JSWebGLRenderingContextBase::getSupportedExtensions): Deleted.
(WebCore::JSWebGLRenderingContextBase::getTexParameter): Deleted.
(WebCore::JSWebGLRenderingContextBase::getUniform): Deleted.
(WebCore::JSWebGLRenderingContextBase::getVertexAttrib): Deleted.
(WebCore::toNumberVector): Deleted.
(WebCore::functionForUniform): Deleted.
(WebCore::dataFunctionf): Deleted.
(WebCore::dataFunctioni): Deleted.
(WebCore::dataFunctionMatrix): Deleted.
(WebCore::JSWebGLRenderingContextBase::uniform1fv): Deleted.
(WebCore::JSWebGLRenderingContextBase::uniform1iv): Deleted.
(WebCore::JSWebGLRenderingContextBase::uniform2fv): Deleted.
(WebCore::JSWebGLRenderingContextBase::uniform2iv): Deleted.
(WebCore::JSWebGLRenderingContextBase::uniform3fv): Deleted.
(WebCore::JSWebGLRenderingContextBase::uniform3iv): Deleted.
(WebCore::JSWebGLRenderingContextBase::uniform4fv): Deleted.
(WebCore::JSWebGLRenderingContextBase::uniform4iv): Deleted.
(WebCore::JSWebGLRenderingContextBase::uniformMatrix2fv): Deleted.
(WebCore::JSWebGLRenderingContextBase::uniformMatrix3fv): Deleted.
(WebCore::JSWebGLRenderingContextBase::uniformMatrix4fv): Deleted.
(WebCore::JSWebGLRenderingContextBase::vertexAttrib1fv): Deleted.
(WebCore::JSWebGLRenderingContextBase::vertexAttrib2fv): Deleted.
(WebCore::JSWebGLRenderingContextBase::vertexAttrib3fv): Deleted.
(WebCore::JSWebGLRenderingContextBase::vertexAttrib4fv): Deleted.
Remove unnecessary custom functions.

  • bindings/scripts/CodeGenerator.pm:

(IsBuiltinType):
Remove specialization of IDBKey.

  • bindings/scripts/CodeGeneratorJS.pm:

(GetBaseIDLType):
(GetIDLType):
(NativeToJSValueDOMConvertNeedsState):
(NativeToJSValueDOMConvertNeedsGlobalObject):
(NativeToJSValue):
Allow IDL files to override the type of signature using a new OverrideIDLType
extended attribute. Currently this only works conversion to JS, but could be
extended to support more.

  • bindings/scripts/IDLAttributes.txt:

Add OverrideIDLType.

  • html/canvas/WebGL2RenderingContext.idl:

Add OverrideIDLType=IDLWebGLAny annotations to remove the need for custom functions.

  • html/canvas/WebGLAny.cpp:

(WebCore::convertToJSValue):
(WebCore::toJS): Deleted.

  • html/canvas/WebGLAny.h:

Rename the toJS function to convertToJSValue to avoid a template specialization issue.

  • html/canvas/WebGLRenderingContextBase.cpp:

(WebCore::WebGLRenderingContextBase::getAttachedShaders):
Update signature to match IDL, replacing bool return value plus out parameter with an
optional return value. Modernize the code a bit.

(WebCore::WebGLRenderingContextBase::uniform2f):
(WebCore::WebGLRenderingContextBase::uniform3f):
(WebCore::WebGLRenderingContextBase::uniform4f):
(WebCore::WebGLRenderingContextBase::uniform1i):
(WebCore::WebGLRenderingContextBase::uniform3i):
(WebCore::WebGLRenderingContextBase::uniform4i):
(WebCore::WebGLRenderingContextBase::uniform1fv):
(WebCore::WebGLRenderingContextBase::uniform2fv):
(WebCore::WebGLRenderingContextBase::uniform3fv):
(WebCore::WebGLRenderingContextBase::uniform4fv):
(WebCore::WebGLRenderingContextBase::uniform1iv):
(WebCore::WebGLRenderingContextBase::uniform2iv):
(WebCore::WebGLRenderingContextBase::uniform3iv):
(WebCore::WebGLRenderingContextBase::uniform4iv):
(WebCore::WebGLRenderingContextBase::uniformMatrix2fv):
(WebCore::WebGLRenderingContextBase::uniformMatrix3fv):
(WebCore::WebGLRenderingContextBase::uniformMatrix4fv):
(WebCore::WebGLRenderingContextBase::vertexAttrib4f):
(WebCore::WebGLRenderingContextBase::vertexAttrib1fv):
(WebCore::WebGLRenderingContextBase::vertexAttrib2fv):
(WebCore::WebGLRenderingContextBase::vertexAttrib3fv):
(WebCore::WebGLRenderingContextBase::vertexAttrib4fv):
(WebCore::WebGLRenderingContextBase::validateUniformParameters):
(WebCore::WebGLRenderingContextBase::validateUniformMatrixParameters):
(WebCore::WebGLRenderingContextBase::vertexAttribfvImpl):

  • html/canvas/WebGLRenderingContextBase.h:

(WebCore::WebGLRenderingContextBase::TypedList::TypedList):
(WebCore::WebGLRenderingContextBase::TypedList::data):
(WebCore::WebGLRenderingContextBase::TypedList::length):
Re-order/group to match order in the IDL file. Remove overloads taking a pointer and
length, and replace it by having the main function take a specialized TypedList. TypedList
allows the bindings to pass the correct Variant type, but then the code to only think in
terms of the data() and length() functions.

  • html/canvas/WebGLRenderingContextBase.idl:

Remove [Custom] annotations and re-order/group to match the spec. Update types of uniform*fv/iv
functions to take typedef'd unions.

LayoutTests:

  • fast/canvas/webgl/gl-object-get-calls-expected.txt:

Update result for better error message.

3:45 PM Changeset in webkit [210566] by rniwa@webkit.org
  • 1 edit
    1 copy in trunk/Tools

Temporarily add back the file removed in r210463 to unbreak internal bots.

  • Scripts/webkitpy/benchmark_runner/data/patches/Animometer.patch: Copied from Tools/Scripts/webkitpy/benchmark_runner/data/patches/Animometer.patch.
3:41 PM Changeset in webkit [210565] by fpizlo@apple.com
  • 13 edits
    2 deletes in trunk/Source/JavaScriptCore

Streamline the GC barrier slowpath
https://bugs.webkit.org/show_bug.cgi?id=166878

Reviewed by Geoffrey Garen and Saam Barati.

This implements two optimizations to the barrier:

  • Removes the write barrier buffer. This was just overhead.


  • Teaches the slow path how to white an object that was black but unmarked, ensuring that we don't take slow path for this object again.

(JSC::DFG::SpeculativeJIT::compileStoreBarrier):

  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::emitStoreBarrier):

  • heap/CellState.h:
  • heap/Heap.cpp:

(JSC::Heap::Heap):
(JSC::Heap::markToFixpoint):
(JSC::Heap::addToRememberedSet):
(JSC::Heap::stopTheWorld):
(JSC::Heap::writeBarrierSlowPath):
(JSC::Heap::buildConstraintSet):
(JSC::Heap::flushWriteBarrierBuffer): Deleted.

  • heap/Heap.h:

(JSC::Heap::writeBarrierBuffer): Deleted.

  • heap/SlotVisitor.cpp:

(JSC::SlotVisitor::appendJSCellOrAuxiliary):
(JSC::SlotVisitor::setMarkedAndAppendToMarkStack):
(JSC::SlotVisitor::appendToMarkStack):
(JSC::SlotVisitor::visitChildren):

  • heap/WriteBarrierBuffer.cpp: Removed.
  • heap/WriteBarrierBuffer.h: Removed.
  • jit/JITOperations.cpp:
  • jit/JITOperations.h:
  • runtime/JSCellInlines.h:

(JSC::JSCell::JSCell):

  • runtime/StructureIDBlob.h:

(JSC::StructureIDBlob::StructureIDBlob):

3:34 PM Changeset in webkit [210564] by rniwa@webkit.org
  • 6 edits
    4 adds in trunk

:active and :hover states may not be updated across slots
https://bugs.webkit.org/show_bug.cgi?id=166881
<rdar://problem/29944582>

Reviewed by Antti Koivisto.

Source/WebCore:

The bug was caused by updateHoverActiveState not updating :hover and :active states on elements
when nodes are assigned to slots because they were walking up the tree using parentOrShadowHostElement
and parentNode. Fixed the bug by using parentElementInComposedTree instead since :hover and :active
states need to be updated in accordance with the render tree, which is created from the "flat tree"
or the "composed tree" in WebKit's terminology (this is old terminology in the spec).

Tests: fast/shadow-dom/clear-active-state-in-shadow.html

fast/shadow-dom/hover-over-nested-slotted-content.html

  • dom/Document.cpp:

(WebCore::Document::updateHoverActiveState): Fixed the bug.

  • dom/Node.cpp:

(WebCore::Node::parentElementInComposedTree): Added.

  • dom/Node.h:

LayoutTests:

Added two regression tests; one for clearing :active state across a slot, and another one for clearing
a hover state on an ancestor of a slot to which a slot with the hovered element is assigned.

  • fast/shadow-dom/clear-active-state-in-shadow-expected.html: Added.
  • fast/shadow-dom/clear-active-state-in-shadow.html: Added.
  • fast/shadow-dom/hover-over-nested-slotted-content-expected.html: Added.
  • fast/shadow-dom/hover-over-nested-slotted-content.html: Added.
  • platform/ios-simulator/TestExpectations:
3:17 PM Changeset in webkit [210563] by mark.lam@apple.com
  • 5 edits
    1 add in trunk

Property setters should not be called for bound arguments list entries.
https://bugs.webkit.org/show_bug.cgi?id=165631

Reviewed by Filip Pizlo.

JSTests:

  • stress/property-setters-should-not-be-called-for-bound-arguments-list-entries.js: Added.

Source/JavaScriptCore:

  • builtins/FunctionPrototype.js:

(bind):

  • use @putByValDirect to set the bound arguments so that we don't consult the prototype chain for setters.
  • runtime/IntlDateTimeFormatPrototype.cpp:

(JSC::IntlDateTimeFormatPrototypeGetterFormat):

  • runtime/IntlNumberFormatPrototype.cpp:

(JSC::IntlNumberFormatPrototypeGetterFormat):

  • no need to create a bound arguments array because these bound functions binds no arguments according to the spec.
3:09 PM Changeset in webkit [210562] by Keith Rollin
  • 2 edits in trunk/Source/WebCore

Missing logging in IconLoader::startLoading
https://bugs.webkit.org/show_bug.cgi?id=166904

Reviewed by Sam Weinig.

The LOG_ERROR in startLoading references 'resourceRequest', which has
been WTF::Moved as part of a preceding function call. As such, the
logging statement doesn't print out a possibly useful URL. Fix this by
making a copy of the URL before it's affected by the Move.

No new tests -- change only affects logging code.

  • loader/icon/IconLoader.cpp:

(WebCore::IconLoader::startLoading):

2:31 PM Changeset in webkit [210561] by Keith Rollin
  • 5 edits in trunk/Source/WebKit2

Record/replay: fix range used for fuzzy matching
https://bugs.webkit.org/show_bug.cgi?id=166041

Reviewed by Darin Adler and Alex Christensen.

Because of two bugs, the attempt to determine the range of URLs to
check as part of the process of fuzzy matching was failing. The intent
was to find the range of URLs that started with the same
<scheme://host:port> as a given URL. However, because of a reversed
test, the upper end of the range ended up being the "end()" iterator
of the entire collection of URLs. With that fixed, there was another
bug due to one URL being given as <scheme://host:port> and the other
given as <scheme://host:port/> (note the trailing slash). Both of
these issues are now fixed.

  • NetworkProcess/capture/NetworkCaptureManager.cpp:

(WebKit::NetworkCapture::Manager::initialize):
(WebKit::NetworkCapture::Manager::findBestFuzzyMatch):
(WebKit::NetworkCapture::Manager::urlIdentifyingCommonDomain):

  • NetworkProcess/capture/NetworkCaptureManager.h:
  • NetworkProcess/capture/NetworkCaptureResource.cpp:

(WebKit::NetworkCapture::Resource::url):
(WebKit::NetworkCapture::Resource::urlIdentifyingCommonDomain):
(WebKit::NetworkCapture::Resource::baseURL): Deleted.

  • NetworkProcess/capture/NetworkCaptureResource.h:
2:26 PM Changeset in webkit [210560] by Wenson Hsieh
  • 47 edits
    1 copy
    6 adds in trunk

Implement "proximity" scroll snapping
https://bugs.webkit.org/show_bug.cgi?id=135994
<rdar://problem/18162418>

Reviewed by Dean Jackson.

Source/WebCore:

Adds support for proximity scroll snapping. To do this, we introduce scroll offset ranges, a list of scroll
offset ranges that are plumbed alongside the list of scroll snap offsets. Similar to a snap offset, a snap
offset range contains scroll offsets on which scrolling is allowed to come to a rest within a scroll snapping
container. However, unlike normal snap offsets, scrolling may only come to rest within a snap offset range if
the predicted scroll offset already lies within the range. The new algorithm for selecting a target scroll snap
position given a destination offset is now:

  • If the scroll destination lies within a snap offset range, return the scroll destination
  • Otherwise, compute the nearest lower/upper snap offsets and lower/upper snap offset ranges
  • If scrolling ended with no velocity, return the nearest snap offset
  • If scrolling ended with positive velocity, choose the upper snap offset only if there is no snap offset

range in between the scroll destination and the snap offset; else, choose the lower snap offset

  • If scrolling ended with negative velocity, choose the lower snap offset only if there is no snap offset

range in between the scroll destination and the snap offset; else, choose the upper snap offset

The extra rule accounting for scroll offset ranges in between the scroll destination and a potential snap offset
handles the corner case where the user scrolls with momentum very lightly away from a snap offset, such that the
predicted scroll destination is still within proximity of the snap offset. In this case, the regular (mandatory
scroll snapping) behavior would be to snap to the next offset in the direction of momentum scrolling, but
instead, it is more intuitive to return to the original snap position.

We also move scrolling prediction logic into ScrollingMomentumCalculator and adopt the platform
_NSScrollingMomentumCalculator's destinationOrigin property when computing the predicted scroll destination.
Previously, we were simply multiplying by an empirically-derived constant to approximate the scroll destination,
but now that we are supporting proximity scroll snapping, we need more exact scroll destinaton prediction in
order to make sure that scrolling to a snap offset range feels natural.

Tests: tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-then-proximity.html

tiled-drawing/scrolling/scroll-snap/scroll-snap-proximity-mainframe.html
tiled-drawing/scrolling/scroll-snap/scroll-snap-proximity-overflow.html

  • WebCore.xcodeproj/project.pbxproj:
  • page/scrolling/AsyncScrollingCoordinator.cpp:

(WebCore::setStateScrollingNodeSnapOffsetsAsFloat):
(WebCore::AsyncScrollingCoordinator::updateOverflowScrollingNode):
(WebCore::AsyncScrollingCoordinator::updateScrollSnapPropertiesWithFrameView):

Make boilerplate changes to plumb lists of horizontal and vertical snap offset ranges alongside the lists of
horizontal and vertical snap offsets.

  • page/scrolling/AxisScrollSnapOffsets.cpp:

(WebCore::snapOffsetRangesToString):
(WebCore::indicesOfNearestSnapOffsetRanges):
(WebCore::indicesOfNearestSnapOffsets):
(WebCore::adjustAxisSnapOffsetsForScrollExtent):
(WebCore::computeAxisProximitySnapOffsetRanges):
(WebCore::updateSnapOffsetsForScrollableArea):
(WebCore::closestSnapOffset):

Adjust the snap offset selection algorithm to take snap offset ranges into account. See above for more details.
Additionally, augment snap offset update logic to emit snap offset ranges for proximity scroll snapping. To do
this, we run the following steps on the final list of processed snap offsets:

  • Compute the proximity distance, which (for now) is arbitrarily 0.3 * the length or width of the scroll snap

port, depending on whether scroll snapping is taking place in the X or Y axis.

  • For each pair of adjacent snap offsets, if they are more than 2 * proximity distance away from each other,

emit a snap offset range starting from (lower snap offset + proximity distance) and ending on (upper snap
offset + proximity distance).

  • page/scrolling/AxisScrollSnapOffsets.h:

(WebCore::closestSnapOffset): Deleted.

  • page/scrolling/ScrollSnapOffsetsInfo.h:

Introduce ScrollSnapOffsetsInfo, a struct which contains data relevant to scroll snapping. This includes
vertical and horizontal snap offsets, as well as vertical and horizontal snap offset ranges. Snap offset ranges
consist of a vector of ranges of scroll offsets.

  • page/scrolling/ScrollingCoordinator.h:
  • page/scrolling/ScrollingMomentumCalculator.cpp:

(WebCore::projectedInertialScrollDistance):
(WebCore::ScrollingMomentumCalculator::ScrollingMomentumCalculator):
(WebCore::ScrollingMomentumCalculator::setRetargetedScrollOffset):
(WebCore::ScrollingMomentumCalculator::predictedDestinationOffset):
(WebCore::ScrollingMomentumCalculator::create):
(WebCore::ScrollingMomentumCalculator::setPlatformMomentumScrollingPredictionEnabled):
(WebCore::BasicScrollingMomentumCalculator::BasicScrollingMomentumCalculator):
(WebCore::BasicScrollingMomentumCalculator::linearlyInterpolatedOffsetAtProgress):
(WebCore::BasicScrollingMomentumCalculator::initializeInterpolationCoefficientsIfNecessary):
(WebCore::BasicScrollingMomentumCalculator::initializeSnapProgressCurve):

  • page/scrolling/ScrollingMomentumCalculator.h:

(WebCore::ScrollingMomentumCalculator::retargetedScrollOffset):
(WebCore::ScrollingMomentumCalculator::retargetedScrollOffsetDidChange):

Currently, the ScrollingMomentumCalculator is responsible for taking an initial position, initial velocity, and
target position and animating the scroll offset from the initial to target position. Now, we refactor the
ScrollingMomentumCalculator interface to no longer take a target offset upon initialization, and instead compute
the predicted scroll destination given initial position and velocity; clients of the ScrollingMomentumCalculator
then use this predicted scroll destination to compute a retargeted scroll offset and then call
setRetargetedScrollOffset on the calculator, which sets up an animation curve to the new retargeted offset. This
allows both the AppKit-based scrolling momentum calculator and platform-invariant momentum calculator to be used
interchangeably, while still allowing them to compute a destination offset from initial parameters of the
scroll.

  • page/scrolling/ScrollingStateScrollingNode.cpp:

(WebCore::ScrollingStateScrollingNode::ScrollingStateScrollingNode):
(WebCore::ScrollingStateScrollingNode::setHorizontalSnapOffsets):
(WebCore::ScrollingStateScrollingNode::setVerticalSnapOffsets):
(WebCore::ScrollingStateScrollingNode::setHorizontalSnapOffsetRanges):
(WebCore::ScrollingStateScrollingNode::setVerticalSnapOffsetRanges):

  • page/scrolling/ScrollingStateScrollingNode.h:

(WebCore::ScrollingStateScrollingNode::horizontalSnapOffsets):
(WebCore::ScrollingStateScrollingNode::verticalSnapOffsets):
(WebCore::ScrollingStateScrollingNode::horizontalSnapOffsetRanges):
(WebCore::ScrollingStateScrollingNode::verticalSnapOffsetRanges):

  • page/scrolling/ScrollingTreeScrollingNode.cpp:

(WebCore::ScrollingTreeScrollingNode::commitStateBeforeChildren):
(WebCore::ScrollingTreeScrollingNode::dumpProperties):

  • page/scrolling/ScrollingTreeScrollingNode.h:

(WebCore::ScrollingTreeScrollingNode::horizontalSnapOffsets):
(WebCore::ScrollingTreeScrollingNode::verticalSnapOffsets):
(WebCore::ScrollingTreeScrollingNode::horizontalSnapOffsetRanges):
(WebCore::ScrollingTreeScrollingNode::verticalSnapOffsetRanges):

Add more boilerplate support for snap offset ranges.

  • page/scrolling/mac/ScrollingMomentumCalculatorMac.h:
  • page/scrolling/mac/ScrollingMomentumCalculatorMac.mm:

(WebCore::ScrollingMomentumCalculator::create):
(WebCore::ScrollingMomentumCalculator::setPlatformMomentumScrollingPredictionEnabled):
(WebCore::ScrollingMomentumCalculatorMac::ScrollingMomentumCalculatorMac):
(WebCore::ScrollingMomentumCalculatorMac::scrollOffsetAfterElapsedTime):
(WebCore::ScrollingMomentumCalculatorMac::predictedDestinationOffset):
(WebCore::ScrollingMomentumCalculatorMac::retargetedScrollOffsetDidChange):
(WebCore::ScrollingMomentumCalculatorMac::animationDuration):
(WebCore::ScrollingMomentumCalculatorMac::requiresMomentumScrolling):
(WebCore::ScrollingMomentumCalculatorMac::ensurePlatformMomentumCalculator):

Hook into AppKit momentum scroll offset prediction.

  • page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm:

(WebCore::convertToLayoutUnits):
(WebCore::ScrollingTreeFrameScrollingNodeMac::commitStateBeforeChildren):

  • platform/ScrollableArea.cpp:

(WebCore::ScrollableArea::ensureSnapOffsetsInfo):
(WebCore::ScrollableArea::horizontalSnapOffsets):
(WebCore::ScrollableArea::horizontalSnapOffsetRanges):
(WebCore::ScrollableArea::verticalSnapOffsetRanges):
(WebCore::ScrollableArea::verticalSnapOffsets):
(WebCore::ScrollableArea::setHorizontalSnapOffsets):
(WebCore::ScrollableArea::setVerticalSnapOffsets):
(WebCore::ScrollableArea::setHorizontalSnapOffsetRanges):
(WebCore::ScrollableArea::setVerticalSnapOffsetRanges):
(WebCore::ScrollableArea::clearHorizontalSnapOffsets):
(WebCore::ScrollableArea::clearVerticalSnapOffsets):

  • platform/ScrollableArea.h:

(WebCore::ScrollableArea::horizontalSnapOffsets): Deleted.
(WebCore::ScrollableArea::verticalSnapOffsets): Deleted.

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

(WebCore::ScrollController::processWheelEventForScrollSnap):

Fix an issue where initial scrolling velocity would be set to zero at the end of a drag gesture.

(WebCore::ScrollController::updateScrollSnapState):
(WebCore::ScrollController::updateScrollSnapPoints):
(WebCore::ScrollController::setNearestScrollSnapIndexForAxisAndOffset):

  • platform/cocoa/ScrollSnapAnimatorState.h:

(WebCore::ScrollSnapAnimatorState::snapOffsetsForAxis):
(WebCore::ScrollSnapAnimatorState::snapOffsetRangesForAxis):
(WebCore::ScrollSnapAnimatorState::setSnapOffsetsAndPositionRangesForAxis):
(WebCore::ScrollSnapAnimatorState::setSnapOffsetsForAxis): Deleted.

  • platform/cocoa/ScrollSnapAnimatorState.mm:

(WebCore::ScrollSnapAnimatorState::setupAnimationForState):
(WebCore::ScrollSnapAnimatorState::targetOffsetForStartOffset):
(WebCore::projectedInertialScrollDistance): Deleted.

  • rendering/RenderLayerCompositor.cpp:

(WebCore::RenderLayerCompositor::updateScrollCoordinatedLayer):

  • testing/Internals.cpp:

(WebCore::Internals::setPlatformMomentumScrollingPredictionEnabled):

Add a new hook for layout tests to force scrolling momentum calculators to use the platform-invariant momentum
scrolling prediction heuristic instead of the platform-dependent one.

(WebCore::Internals::scrollSnapOffsets):

  • testing/Internals.h:
  • testing/Internals.idl:

Source/WebKit2:

Adds boilerplate support for plumbing lists of snap offset ranges from the web process to the UI process
alongside the list of snap offsets.

  • Shared/Scrolling/RemoteScrollingCoordinatorTransaction.cpp:

(ArgumentCoder<ScrollingStateScrollingNode>::encode):
(ArgumentCoder<ScrollingStateScrollingNode>::decode):

  • Shared/WebCoreArgumentCoders.cpp:

(IPC::ArgumentCoder<ScrollOffsetRange<float>>::encode):
(IPC::ArgumentCoder<ScrollOffsetRange<float>>::decode):

  • Shared/WebCoreArgumentCoders.h:
  • UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.mm:

(-[WKOverflowScrollViewDelegate scrollViewWillEndDragging:withVelocity:targetContentOffset:]):

  • UIProcess/ios/RemoteScrollingCoordinatorProxyIOS.mm:

Adjust mainframe proximity scroll snapping logic to not subtract out the top content inset when there is no
active snap offset (i.e. when snapping rests in a snap offset range). Attempting to subtract out the top inset
in this case caused the scroll offset to jump after ending a drag with no momentum in a snap offset range.

(WebKit::RemoteScrollingCoordinatorProxy::adjustTargetContentOffsetForSnapping):
(WebKit::RemoteScrollingCoordinatorProxy::shouldSnapForMainFrameScrolling):
(WebKit::RemoteScrollingCoordinatorProxy::closestSnapOffsetForMainFrameScrolling):

LayoutTests:

Adds 3 new layout tests for proximity scroll snapping. Also tweaks some existing tests that test scroll snapping
after scrolling with momentum to use the custom heuristic for predicting scroll destination instead of platform
momentum scrolling. This ensures that the results of our layout tests that depend on predicting momentum scroll
destination are consistent across runs.

  • tiled-drawing/scrolling/latched-div-with-scroll-snap.html:
  • tiled-drawing/scrolling/scroll-snap/scroll-snap-iframe.html:
  • tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-2d-overflow.html:
  • tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-borders.html:
  • tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-hidden-scrollbars.html:
  • tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-mainframe-horizontal.html:
  • tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-mainframe-slow-horizontal.html:
  • tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-mainframe-slow-vertical.html:
  • tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-mainframe-vertical-then-horizontal.html:
  • tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-mainframe-vertical.html:
  • tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-overflow-stateless.html:
  • tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-overflow.html:
  • tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-padding.html:
  • tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-rotated.html:

Force these tests to use platform-independent scrolling momentum prediction, by multiplying the last scroll
delta upon release by a constant factor.

  • tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-then-proximity-expected.txt: Added.
  • tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-then-proximity.html: Added.

Tests that after changing scroll-snap-type from mandatory to proximity, swiping downwards no longer snaps the
scroll offset to the second box, but instead leaves the scroll offset somewhere in the middle of the first box.

  • tiled-drawing/scrolling/scroll-snap/scroll-snap-proximity-mainframe-expected.txt: Added.
  • tiled-drawing/scrolling/scroll-snap/scroll-snap-proximity-mainframe.html: Added.

Tests that when scroll-snap-type is proximity in the mainframe, scrolling slightly downwards snaps the scroll
offset back up to the top; scrolling somewhere in the middle of the first box does not snap the scroll offset;
and scrolling near the end of the first box snaps the scroll offset to the second box.

  • tiled-drawing/scrolling/scroll-snap/scroll-snap-proximity-overflow-expected.txt: Added.
  • tiled-drawing/scrolling/scroll-snap/scroll-snap-proximity-overflow.html: Added.

Similar to scroll-snap-proximity-mainframe.html, except for overflow scrolling instead of the mainframe.

  • tiled-drawing/scrolling/scroll-snap/scroll-snap-scrolling-jumps-to-top.html:
1:59 PM Changeset in webkit [210559] by Chris Dumez
  • 5 edits
    2 adds in trunk

Make Event.initEvent()'s first parameter mandatory
https://bugs.webkit.org/show_bug.cgi?id=166894

Reviewed by Alex Christensen.

LayoutTests/imported/w3c:

Rebaseline existing W3C test now that we're closing to the specification.

  • web-platform-tests/dom/interfaces-expected.txt:

Source/WebCore:

Make Event.initEvent()'s first parameter mandatory. As per the
specification, all parameters should be mandatory and we are
currently dicussing the possibility of making them optional in
the specification. However, having the first parameter optional
makes little sense as it would set the event's type to the string
"undefined".

Test: fast/events/initEvent-parameters.html

  • dom/Event.idl:

LayoutTests:

Add layout test coverage.

  • fast/events/initEvent-parameters-expected.txt: Added.
  • fast/events/initEvent-parameters.html: Added.
1:36 PM EnvironmentVariables edited by clopez@igalia.com
(diff)
1:13 PM Changeset in webkit [210558] by gskachkov@gmail.com
  • 5 edits
    1 add in trunk

Calling async arrow function which is in a class's member function will cause error
https://bugs.webkit.org/show_bug.cgi?id=166879

Reviewed by Saam Barati.

JSTests:

  • stress/async-arrow-functions-lexical-binding-in-class.js: Added.

(shouldBe):
(shouldBeAsync):
(BaseClass.prototype.baseClassValue):
(BaseClass.prototype.get property):
(BaseClass):
(runSomething):
(ChildClass.prototype.classValue):
(ChildClass.prototype.get classProperty):
(ChildClass.prototype.asyncValueExp):
(ChildClass.prototype.asyncValueBody):
(ChildClass.prototype.asyncThisPropExp):
(ChildClass.prototype.asyncThisPropBody):
(ChildClass.prototype.asyncThisPropInEvalExp):
(ChildClass.prototype.asyncThisPropInEvalBody):
(ChildClass.prototype.asyncThisValueExp):
(ChildClass.prototype.asyncThisValueBody):
(ChildClass.prototype.asyncThisValueInEvalExp):
(ChildClass.prototype.asyncThisValueInEvalBody):
(ChildClass):
(ChildClass2):
(ChildClass2.prototype.classValue):
(ChildClass2.prototype.get classProperty):

  • stress/async-arrow-functions-lexical-super-binding.js:

Source/JavaScriptCore:

Current patch fixed loading 'super' in async arrow function. Errored appear becuase
super was loaded always nevertherless if it used in async arrow function or not, but bytecompiler
put to arrow function context only if it used within arrow function. So to fix this issue we need to
check if super was used in arrow function.

  • bytecompiler/BytecodeGenerator.h:
  • bytecompiler/NodesCodegen.cpp:

(JSC::FunctionNode::emitBytecode):

12:42 PM Changeset in webkit [210557] by Ryan Haddad
  • 19 edits
    3 deletes in trunk

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

This change introduced JSC test failures (Requested by
ryanhaddad on #webkit).

Reverted changeset:

"Implement JSSourceCode to propagate SourceCode in module
pipeline"
https://bugs.webkit.org/show_bug.cgi?id=166861
http://trac.webkit.org/changeset/210537

Patch by Commit Queue <commit-queue@webkit.org> on 2017-01-10

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

REGRESSION(r189555): ImageDocument title no longer includes the size of the image
https://bugs.webkit.org/show_bug.cgi?id=166876
<rdar://problem/29939970>

Reviewed by Ryosuke Niwa.

Add a code comment to clarify fix that was made in r210536.

  • html/ImageDocument.cpp:

(WebCore::ImageDocument::createDocumentStructure):

12:09 PM Changeset in webkit [210555] by jer.noble@apple.com
  • 19 edits
    1 copy
    3 adds in trunk

Add support for MediaKeys.generateRequest().
https://bugs.webkit.org/show_bug.cgi?id=166880

Reviewed by Xabier Rodriguez-Calvar.

Source/WebCore:

Test: media/encrypted-media/mock-MediaKeySession-generateRequest.html

Implement MediaKeySession::generateRequest(). This requires some additions
to CDM, CDMPrivate, and CDMInstance to support platform adoption and to
implement mock support for testing. Additionally, add an InitDataRegistry
object which can sanitize and extract key data from various initData types.
(At the moment, only the "keyids" initData type is implemented.)

Drive-by fixes: Change all instances of initDataType from String -> AtomicString.
Add "const" flags to all CDMPrivate methods that might be called from a const
reference.

  • CMakeLists.txt:
  • Modules/encryptedmedia/CDM.cpp:

(WebCore::CDM::supportsInitDataType):
(WebCore::CDM::sanitizeInitData):
(WebCore::CDM::supportsInitData):

  • Modules/encryptedmedia/CDM.h:
  • Modules/encryptedmedia/CDMInstance.h:
  • Modules/encryptedmedia/CDMPrivate.h:
  • Modules/encryptedmedia/InitDataRegistry.cpp: Added.

(WebCore::extractKeyIDsKeyids):
(WebCore::sanitizeKeyids):
(WebCore::sanitizeCenc):
(WebCore::extractKeyIDsCenc):
(WebCore::sanitizeWebM):
(WebCore::extractKeyIDsWebM):
(WebCore::InitDataRegistry::shared):
(WebCore::InitDataRegistry::InitDataRegistry):
(WebCore::InitDataRegistry::sanitizeInitData):
(WebCore::InitDataRegistry::extractKeyIDs):
(WebCore::InitDataRegistry::registerInitDataType):

  • Modules/encryptedmedia/InitDataRegistry.h:
  • Modules/encryptedmedia/MediaKeySession.cpp:

(WebCore::messageEventName):
(WebCore::MediaKeySession::MediaKeySession):
(WebCore::MediaKeySession::generateRequest):
(WebCore::MediaKeySession::enqueueMessage):

  • Modules/encryptedmedia/MediaKeySession.h:
  • Modules/encryptedmedia/MediaKeys.cpp:

(WebCore::MediaKeys::setServerCertificate):

  • WebCore.xcodeproj/project.pbxproj:
  • testing/MockCDMFactory.cpp:

(WebCore::MockCDMFactory::addKeysToSessionWithID):
(WebCore::MockCDMFactory::setSupportedDataTypes):
(WebCore::MockCDM::supportsInitDataType):
(WebCore::MockCDM::supportsConfiguration):
(WebCore::MockCDM::supportsConfigurationWithRestrictions):
(WebCore::MockCDM::supportsSessionTypeWithConfiguration):
(WebCore::MockCDM::supportsRobustness):
(WebCore::MockCDM::distinctiveIdentifiersRequirement):
(WebCore::MockCDM::persistentStateRequirement):
(WebCore::MockCDM::distinctiveIdentifiersAreUniquePerOriginAndClearable):
(WebCore::MockCDM::supportsInitData):
(WebCore::MockCDMInstance::setServerCertificate):
(WebCore::MockCDMInstance::requestLicense):

  • testing/MockCDMFactory.h:

(WebCore::MockCDMFactory::supportedDataTypes):
(WebCore::MockCDMFactory::hasSessionWithID):
(WebCore::MockCDMFactory::removeSessionWithID):
(WebCore::MockCDMFactory::setSupportedDataTypes): Deleted.

LayoutTests:

Add shouldResolve() and shouldReject() to video-test.js and update existing
tests to use these new functions.

  • media/encrypted-media/mock-MediaKeys-createSession-expected.txt: Added.
  • media/encrypted-media/mock-MediaKeys-createSession.html: Added.
  • media/encrypted-media/mock-MediaKeys-setServerCertificate.html:
  • media/encrypted-media/mock-MediaKeySession-generateRequest.html:
  • media/encrypted-media/mock-MediaKeySystemAccess.html:
  • media/encrypted-media/mock-navigator-requestMediaKeySystemAccess.html:
  • media/video-test.js:

(shouldResolve):
(shouldReject):

  • platform/mac/TestExpectations:
11:13 AM Changeset in webkit [210554] by commit-queue@webkit.org
  • 3 edits in trunk/Source/JavaScriptCore

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

too crude for non-WebCore clients (Requested by kling on
#webkit).

Reverted changeset:

"Crash when GC heap grows way too large."
https://bugs.webkit.org/show_bug.cgi?id=166875
http://trac.webkit.org/changeset/210540

10:44 AM Changeset in webkit [210553] by fpizlo@apple.com
  • 5 edits in trunk/Source/JavaScriptCore

JSArray has some object scanning races
https://bugs.webkit.org/show_bug.cgi?id=166874

Reviewed by Mark Lam.

This fixes two separate bugs, both of which I detected by running
array-splice-contiguous.js in extreme anger:

1) Some of the paths of shifting and unshifting were not grabbing the internal cell

lock. This was causing the array storage scan to crash, even though it was well
synchronized (the scan does hold the lock). The fix is just to hold the lock anywhere
that memmoves the innards of the butterfly.


2) Out of line property scanning was synchronized using double collect snapshot. Array

storage scanning was synchronized using locks. But what if array storage
transformations messed up the out of line properties? It turns out that we actually
need to hoist the array storage scanner's locking up into the double collect
snapshot.


I don't know how to write a test that does any better of a job of catching this than
array-splice-contiguous.js.

  • heap/DeferGC.h: Make DisallowGC usable even if NDEBUG.
  • runtime/JSArray.cpp:

(JSC::JSArray::unshiftCountSlowCase):
(JSC::JSArray::shiftCountWithArrayStorage):
(JSC::JSArray::unshiftCountWithArrayStorage):

  • runtime/JSObject.cpp:

(JSC::JSObject::visitButterflyImpl):

10:41 AM Changeset in webkit [210552] by jer.noble@apple.com
  • 17 edits
    2 adds in trunk

Add support for MediaKeys.createSession().
https://bugs.webkit.org/show_bug.cgi?id=166796

Reviewed by Eric Carlson.

Source/WebCore:

Test: media/encrypted-media/mock-MediaKeys-createSession.html

Implement MediaKeys::createSession(). This requires some additions to
CDM, CDMPrivate, and CDMInstance to support platform adoption and to
implement mock support for testing. Because the CDMInstance will now
be shared between MediaKeys and MediaKeySession, it cannot be a unique_ptr.
Make CDMInterface ref-counted and store it as a Ref.

  • Modules/encryptedmedia/CDM.cpp:

(WebCore::CDM::createInstance):
(WebCore::CDM::supportsSessions):

  • Modules/encryptedmedia/CDM.h:
  • Modules/encryptedmedia/CDMInstance.h:
  • Modules/encryptedmedia/CDMPrivate.h:
  • Modules/encryptedmedia/MediaKeySession.cpp:

(WebCore::MediaKeySession::create):
(WebCore::MediaKeySession::MediaKeySession):
(WebCore::MediaKeySession::sessionId):
(WebCore::MediaKeySession::expiration):
(WebCore::MediaKeySession::keyStatuses):

  • Modules/encryptedmedia/MediaKeySession.h:
  • Modules/encryptedmedia/MediaKeySessionType.idl:
  • Modules/encryptedmedia/MediaKeySystemAccess.cpp:

(WebCore::MediaKeySystemAccess::createMediaKeys):

  • Modules/encryptedmedia/MediaKeys.cpp:

(WebCore::MediaKeys::MediaKeys):
(WebCore::MediaKeys::createSession):

  • Modules/encryptedmedia/MediaKeys.h:

(WebCore::MediaKeys::create):

  • Modules/encryptedmedia/MediaKeys.idl:

LayoutTests:

  • media/encrypted-media/mock-MediaKeys-createSession-expected.txt: Added.
  • media/encrypted-media/mock-MediaKeys-createSession.html: Added.
  • platform/mac/TestExpectations:
10:05 AM Changeset in webkit [210551] by Jonathan Bedard
  • 3 edits in trunk/Tools

svn-apply failed to apply a patch (deleting file with svn property)
https://bugs.webkit.org/show_bug.cgi?id=165953

Reviewed by Daniel Bates.

  • Scripts/VCSUtils.pm:

(parseSvnPropertyValue): The beginning of a diff will cause an early exit in the case of no empty newlines.

  • Scripts/webkitperl/VCSUtils_unittest/parseSvnProperty.pl: Add tests without break between diffs for properties.
9:54 AM Changeset in webkit [210550] by rniwa@webkit.org
  • 2 edits in trunk/Source/WebKit/mac

Remove pointerLockElement from DOMDocumentPrivate.h
https://bugs.webkit.org/show_bug.cgi?id=166882

Reviewed by Simon Fraser.

Removed pointerLockElement declaration that was supposed to be removed in r209637.

  • DOM/DOMDocumentPrivate.h:
9:25 AM Changeset in webkit [210549] by jer.noble@apple.com
  • 13 edits
    2 adds in trunk

Add support for MediaKeys.setServerCertificate()
https://bugs.webkit.org/show_bug.cgi?id=166772

Reviewed by Darin Adler.

Source/WebCore:

Test: media/encrypted-media/mock-MediaKeys-setServerCertificate.html

Implement MediaKeys::setServerCertificate(). This requires some additions
to CDM, CDMPrivate, and CDMInstance to support platform adoption and to
implement mock support for testing.

  • Modules/encryptedmedia/CDM.cpp:

(WebCore::CDM::supportsServerCertificates):

  • Modules/encryptedmedia/CDM.h:
  • Modules/encryptedmedia/CDMInstance.h:
  • Modules/encryptedmedia/CDMPrivate.h:
  • Modules/encryptedmedia/MediaKeys.cpp:

(WebCore::MediaKeys::setServerCertificate):

  • Modules/encryptedmedia/MediaKeys.h:
  • testing/MockCDMFactory.cpp:

(WebCore::MockCDM::supportsServerCertificates):
(WebCore::MockCDMInstance::setServerCertificate):

  • testing/MockCDMFactory.h:

(WebCore::MockCDMFactory::supportsServerCertificates):
(WebCore::MockCDMFactory::setSupportsServerCertificates):

  • testing/MockCDMFactory.idl:

LayoutTests:

  • media/encrypted-media/mock-MediaKeys-setServerCertificate-expected.txt: Added.
  • media/encrypted-media/mock-MediaKeys-setServerCertificate.html: Added.
9:18 AM Changeset in webkit [210548] by Ryan Haddad
  • 3 edits in trunk/Tools

Update flakiness dashboard configuration.
https://bugs.webkit.org/show_bug.cgi?id=166869

Reviewed by Alexey Proskuryakov.

  • TestResultServer/static-dashboards/builders.jsonp:
  • TestResultServer/static-dashboards/flakiness_dashboard.js:
9:07 AM Changeset in webkit [210547] by clopez@igalia.com
  • 2 edits in trunk/Tools

[GTK] Stop honoring the environment variable USE_NATIVE_XDISPLAY
https://bugs.webkit.org/show_bug.cgi?id=165232

Unreviewed follow-up patch after r210539 and r210523.

Instead of using that environment variable, the argument
--display-server=xorg should be passed now.

The GTK+ performance bot was the only bot using this, and is
already passing --display-server=xorg after r210539.

  • Scripts/webkitpy/port/gtk.py:

(GtkPort._driver_class):

7:07 AM Changeset in webkit [210546] by commit-queue@webkit.org
  • 7 edits in trunk

CachedScript cloning does not clone encodedSize
https://bugs.webkit.org/show_bug.cgi?id=166865

Patch by Youenn Fablet <youenn@apple.com> on 2017-01-10
Reviewed by Darin Adler.

Source/WebCore:

Covered by updated test.

  • loader/cache/CachedResource.cpp:

(WebCore::CachedResource::setBodyDataFrom): set encoded size based on being cloned resource.

  • loader/cache/CachedScript.cpp:

(WebCore::CachedScript::script):
(WebCore::CachedScript::setBodyDataFrom): Making use of CachedResource::setBodyDataFrom for complete cloning.

LayoutTests:

  • http/tests/security/cross-origin-cached-scripts-expected.txt:
  • http/tests/security/cross-origin-cached-scripts.html:
  • http/tests/security/resources/notify-loaded.js:
6:51 AM Changeset in webkit [210545] by zandobersek@gmail.com
  • 3 edits in trunk/Source/WebKit2

ThreadedCoordinatedLayerTreeHost::renderNextFrame() should short-cut to layer flushing
https://bugs.webkit.org/show_bug.cgi?id=157614

Reviewed by Carlos Garcia Campos.

CoordinatedLayerTreeHost prevents any layer flushes while a previously-commited scene
state is still being rendered on the composition thread. renderNextFrame() is called
once that is complete, and a new layer flush is scheduled.

This change improves the whole ordeal by immediately performing the layer flush only if
it was requested during the time we were waiting on the renderer (i.e. when the latest
scene state was being composited), instead of scheduling it unconditionally.
m_scheduledWhileWaitingForRenderer member variable is added to track that occurrence.

  • WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:

(WebKit::CoordinatedLayerTreeHost::scheduleLayerFlush):
(WebKit::CoordinatedLayerTreeHost::renderNextFrame):

  • WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h:
6:49 AM Changeset in webkit [210544] by zandobersek@gmail.com
  • 2 edits in trunk/Source/WebCore

Unreviewed. Remove the unused gReadyStateTimerInterval global from
the MediaPlayerPrivateGStreamerMSE implementation file as it's only
springing up a compiler warning.

  • platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.cpp:
4:32 AM Changeset in webkit [210543] by zandobersek@gmail.com
  • 3 edits in trunk/Source/WebCore

[CoordinatedGraphics] TextureMapperPlatformLayerProxy is constantly getting activated
https://bugs.webkit.org/show_bug.cgi?id=166856

Reviewed by Michael Catanzaro.

When CoordinatedGraphicsLayer::setContentsNeedsDisplay() is called, currently with
the threaded CoordinatedGraphics mode the platform layer is marked for synchronizing.
This means that at flush-time this layer swaps the buffer of the wrapped platform
layer and updates the layer state to indicate that the underlying
TextureMapperPlatformLayerProxy object has to be activated on the composition thread.

This current logic results in the TextureMapperPlatformLayerProxy object being
reactivated for every display request that arrives via setContentsNeedsDisplay().
This is pretty wasteful since this activation heap-allocates a RunLoop::Timer object
which internally also locks up the GLib main context to attach a new source, and
that's only after the source on the previous RunLoop::Timer was detached before
that RunLoop::Timer was destroyed.

To avoid this, CoordinatedGraphicsLayer::setContentsNeedsDisplay() sets a new flag,
m_shouldUpdatePlatformLayer. During flush, this flag is checked in
CoordinatedGraphicsLayer::updatePlatformLayer(), with the buffer swap performed in
case it's set. CoordinatedGraphicsLayer::syncPlatformLayer() now only sets the
platform layer proxy object for that layer's state.

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

(WebCore::CoordinatedGraphicsLayer::CoordinatedGraphicsLayer):
(WebCore::CoordinatedGraphicsLayer::setContentsNeedsDisplay):
(WebCore::CoordinatedGraphicsLayer::syncPlatformLayer):
(WebCore::CoordinatedGraphicsLayer::updatePlatformLayer):
(WebCore::CoordinatedGraphicsLayer::flushCompositingStateForThisLayerOnly):

  • platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h:
4:29 AM Changeset in webkit [210542] by zandobersek@gmail.com
  • 3 edits in trunk/Source/WebCore

[TexMap] Use WTF::Function in TextureMapperPlatformLayerProxy
https://bugs.webkit.org/show_bug.cgi?id=166853

Reviewed by Michael Catanzaro.

Use WTF::Function in the TextureMapperPlatformLayerProxy, instead of
the std::function bloat.

  • platform/graphics/texmap/TextureMapperPlatformLayerProxy.cpp:

(WebCore::TextureMapperPlatformLayerProxy::scheduleUpdateOnCompositorThread):
(WebCore::TextureMapperPlatformLayerProxy::compositorThreadUpdateTimerFired):

  • platform/graphics/texmap/TextureMapperPlatformLayerProxy.h:
4:28 AM Changeset in webkit [210541] by zandobersek@gmail.com
  • 2 edits in trunk/Source/WebCore

[TextureMapper] TextureMapperPlatformLayerProxy::swapBuffers() should hold the lock throughout invocation
https://bugs.webkit.org/show_bug.cgi?id=166852

Reviewed by Michael Catanzaro.

  • platform/graphics/texmap/TextureMapperPlatformLayerProxy.cpp:

(WebCore::TextureMapperPlatformLayerProxy::swapBuffer): Append to previous buffer
to the m_usedBuffers Vector while the object's lock is held. Everywhere else the
m_usedBuffers Vector is used under the lock, no reason to not do the same here.

4:16 AM Changeset in webkit [210540] by akling@apple.com
  • 3 edits in trunk/Source/JavaScriptCore

Crash when GC heap grows way too large.
<https://webkit.org/b/166875>
<rdar://problem/27896585>

Reviewed by Mark Lam.

Hard cap the JavaScript heap at 4GB of live objects (determined post-GC.)
If we go past this limit, crash with a recognizable signature.

  • heap/Heap.cpp:

(JSC::Heap::didExceedHeapSizeLimit):
(JSC::Heap::updateAllocationLimits):

3:03 AM Changeset in webkit [210539] by clopez@igalia.com
  • 4 edits in trunk/Tools

[GTK] Add a new release test bot for Wayland and pass --display-server=xorg to the GTK Perf bot.
https://bugs.webkit.org/show_bug.cgi?id=166872

Reviewed by Michael Catanzaro.

Add the new wayland release test bot as a test-only bot. It will download the built product from the release build-only bot.
Define the required "--display-server=driver" in the bot additionalArguments config entry.
Implement support for honoring additionalArguments on the RunGtkAPITests and RunAndUploadPerfTests steps.
The step RunWebKitTests already has support for it.

  • BuildSlaveSupport/build.webkit.org-config/config.json:
  • BuildSlaveSupport/build.webkit.org-config/master.cfg:

(RunGtkAPITests.start):
(RunAndUploadPerfTests.start):

  • BuildSlaveSupport/build.webkit.org-config/mastercfg_unittest.py:

Jan 9, 2017:

11:02 PM Changeset in webkit [210538] by rniwa@webkit.org
  • 4 edits
    2 adds in trunk/LayoutTests

Add an iOS test for tapping on a text node assigned to a slot
https://bugs.webkit.org/show_bug.cgi?id=166877

Reviewed by Andy Estes.

Add a test for tapping on a text node assigned to a slot.
touchstart event must be fired on a parent of the slot with a touch event handler.

  • TestExpectations:
  • fast/shadow-dom/touch-event-on-text-assigned-to-slot-expected.txt: Added.
  • fast/shadow-dom/touch-event-on-text-assigned-to-slot.html: Added.
  • resources/ui-helper.js:

(window.UIHelper.tapAt): Added.

9:58 PM Changeset in webkit [210537] by Yusuke Suzuki
  • 19 edits
    3 adds in trunk

Implement JSSourceCode to propagate SourceCode in module pipeline
https://bugs.webkit.org/show_bug.cgi?id=166861

Reviewed by Saam Barati.

Source/JavaScriptCore:

Instead of propagating source code string, we propagate JSSourceCode
cell in the module pipeline. This allows us to attach a metadata
to the propagated source code string. In particular, it propagates
SourceOrigin through the module pipeline.

  • CMakeLists.txt:
  • JavaScriptCore.xcodeproj/project.pbxproj:
  • builtins/ModuleLoaderPrototype.js:

(fulfillFetch):
(requestFetch):

  • jsc.cpp:

(GlobalObject::moduleLoaderFetch):

  • llint/LLIntData.cpp:

(JSC::LLInt::Data::performAssertions):

  • llint/LowLevelInterpreter.asm:
  • runtime/Completion.cpp:

(JSC::loadAndEvaluateModule):
(JSC::loadModule):

  • runtime/JSModuleLoader.cpp:

(JSC::JSModuleLoader::provide):

  • runtime/JSModuleLoader.h:
  • runtime/JSSourceCode.cpp: Added.

(JSC::JSSourceCode::destroy):

  • runtime/JSSourceCode.h: Added.

(JSC::JSSourceCode::createStructure):
(JSC::JSSourceCode::create):
(JSC::JSSourceCode::sourceCode):
(JSC::JSSourceCode::JSSourceCode):

  • runtime/JSType.h:
  • runtime/ModuleLoaderPrototype.cpp:

(JSC::moduleLoaderPrototypeParseModule):

  • runtime/VM.cpp:

(JSC::VM::VM):

  • runtime/VM.h:

Source/WebCore:

Now SourceOrigin is correctly propagated through the module pipeline.
So the error reported by http/tests/security/contentSecurityPolicy/module-eval-blocked-expected.html
is updated.

  • ForwardingHeaders/runtime/JSSourceCode.h: Added.
  • bindings/js/JSDOMPromise.h:

(WebCore::DeferredPromise::resolveWithCallback):

  • bindings/js/ScriptModuleLoader.cpp:

(WebCore::ScriptModuleLoader::notifyFinished):

LayoutTests:

  • http/tests/security/contentSecurityPolicy/module-eval-blocked-expected.txt:
9:04 PM Changeset in webkit [210536] by Chris Dumez
  • 3 edits
    2 adds in trunk

REGRESSION(r189555): ImageDocument title no longer includes the size of the image
https://bugs.webkit.org/show_bug.cgi?id=166876
<rdar://problem/29939970>

Reviewed by Tim Horton.

Source/WebCore:

ImageDocument title no longer included the size of the image after r189555.
This is because Document::setTitle() is a no-op if the document does not
have a <head> element. To address the issue, we now include a <head>
element in ImageDocuments so that their title element properly gets added
to it.

Test: fast/images/imageDocument-title.html

  • html/ImageDocument.cpp:

(WebCore::ImageDocument::createDocumentStructure):

LayoutTests:

Add layout test coverage.

  • fast/images/imageDocument-title-expected.txt: Added.
  • fast/images/imageDocument-title.html: Added.
8:19 PM Changeset in webkit [210535] by Yusuke Suzuki
  • 2 edits in trunk/Source/JavaScriptCore

REGRESSION (r210522): ASSERTION FAILED: divot.offset >= divotStart.offset seen with stress/import-basic.js and stress/import-from-eval.js
https://bugs.webkit.org/show_bug.cgi?id=166873

Reviewed by Saam Barati.

The divot should be the end of import token.

  • parser/Parser.cpp:

(JSC::Parser<LexerType>::parseMemberExpression):

6:17 PM Changeset in webkit [210534] by Alan Bujtas
  • 3 edits
    2 adds in trunk

ASSERTION FAILED: newLogicalTop >= logicalTop in WebCore::RenderBlockFlow::getClearDelta
https://bugs.webkit.org/show_bug.cgi?id=151202
<rdar://problem/27711822>

Reviewed by Myles C. Maxfield.

Source/WebCore:

FindNextFloatLogicalBottomAdapter uses LayoutUnit::max() to flag m_nextLogicalBottom uninitialized.
However LayoutUnit::max() can also be a valid value for m_nextLogicalBottom.
FindNextFloatLogicalBottomAdapter::nextLogicalBottom() returns 0 instead of the actual value when
it sees m_nextLogicalBottom uninitialized. In certain cases, it confuses the caller and we end up
with a runaway loop.

Test: fast/block/float/assert-when-line-has-not-enough-space-left.html

  • rendering/FloatingObjects.cpp:

(WebCore::FindNextFloatLogicalBottomAdapter::FindNextFloatLogicalBottomAdapter):
(WebCore::FindNextFloatLogicalBottomAdapter::highValue):
(WebCore::FindNextFloatLogicalBottomAdapter::nextLogicalBottom):
(WebCore::FindNextFloatLogicalBottomAdapter::nextShapeLogicalBottom):
(WebCore::FindNextFloatLogicalBottomAdapter::collectIfNeeded):

LayoutTests:

  • fast/block/float/assert-when-line-has-not-enough-space-left-expected.txt: Added.
  • fast/block/float/assert-when-line-has-not-enough-space-left.html: Added.
5:28 PM Changeset in webkit [210533] by Ryan Haddad
  • 10 edits
    2 deletes in trunk

Unreviewed, rolling out r210531.

This change broke the 32-bit macOS build and caused LayoutTest
failures.

Reverted changeset:

"File scheme should not allow access of a resource on a
different volume."
https://bugs.webkit.org/show_bug.cgi?id=158552
http://trac.webkit.org/changeset/210531

4:46 PM Changeset in webkit [210532] by Chris Dumez
  • 8 edits
    3 deletes in trunk/Source

[iOS] Drop VNodeTracker
https://bugs.webkit.org/show_bug.cgi?id=166868
<rdar://problem/29937587>

Reviewed by Andreas Kling.

Source/WebCore:

Drop VNodeTracker on iOS. This was introduced a while back to try and
address vnode exhaustion issues in long running page load tests.
However, there was no evidence that the VNodeTracker functionality
helped so there is little point in keeping the extra code complexity.

  • WebCore.xcodeproj/project.pbxproj:
  • platform/SharedBuffer.h:
  • platform/VNodeTracker.cpp: Removed.
  • platform/VNodeTracker.h: Removed.
  • platform/cf/SharedBufferCF.cpp:

(WebCore::SharedBuffer::SharedBuffer):

  • platform/cocoa/VNodeTrackerCocoa.cpp: Removed.

Source/WebKit2:

  • WebProcess/cocoa/WebProcessCocoa.mm:

(WebKit::WebProcess::platformInitializeWebProcess):

4:32 PM Changeset in webkit [210531] by Brent Fulgham
  • 10 edits
    2 adds in trunk

File scheme should not allow access of a resource on a different volume.
https://bugs.webkit.org/show_bug.cgi?id=158552
<rdar://problem/15307582>

Reviewed by Alex Christensen.

Source/WebCore:

Revise SecurityOrigin to prevent files from one storage device (volume) from accessing content
on a different storage device (volume) unless universal access is enabled.

Pass the current file device as part of the NSURLRequest so that CFNetwork can reject loads
where the device changes in the midst of a load.

Also properly reflect that SecurityOrigin is never null by passing as a reference,
rather than as a pointer.

Tests: Tools/TestWebKitAPI/Tests/mac/CrossPartitionFileSchemeAccess.mm

  • page/SecurityOrigin.cpp:

(WebCore::SecurityOrigin::canAccess): Pass argument as reference.
(WebCore::SecurityOrigin::passesFileCheck): Add check that file URLs refer to files in
the same storage volume.
(WebCore::SecurityOrigin::canDisplay): Add check that files share the same volume.
(WebCore::SecurityOrigin::isSameSchemeHostPort): Pass argument as reference.

  • page/SecurityOrigin.h:
  • platform/FileSystem.cpp:

(WebCore::filesHaveSameVolume): Added.

  • platform/FileSystem.h:
  • platform/network/cocoa/ResourceRequestCocoa.mm:

(WebCore::ResourceRequest::doUpdatePlatformRequest): If loading a file URL, tell CFNetwork
the storage device at the time of the start of the load so we can trigger a failure if this
changes during the load operation.

  • platform/posix/FileSystemPOSIX.cpp:

(WebCore::getFileDeviceId): Added.

  • platform/win/FileSystemWin.cpp:

(WebCore::getFileDeviceId): Added.

Tools:

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: Add new files.
  • TestWebKitAPI/Tests/mac/CrossPartitionFileSchemeAccess.html: Added.
  • TestWebKitAPI/Tests/mac/CrossPartitionFileSchemeAccess.mm: Added.
4:15 PM Changeset in webkit [210530] by fpizlo@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

Unreviewed, fix cloop.

  • dfg/DFGPlanInlines.h:
4:11 PM Changeset in webkit [210529] by bshafiei@apple.com
  • 3 edits in branches/safari-603-branch/Source/JavaScriptCore

Merge r210458. rdar://problem/29911919

3:58 PM Changeset in webkit [210528] by bshafiei@apple.com
  • 3 edits in tags/Safari-603.1.19.1/Source/JavaScriptCore

Merge r210458. rdar://problem/29911919

3:24 PM Changeset in webkit [210527] by bshafiei@apple.com
  • 5 edits in tags/Safari-603.1.19.1/Source

Versioning.

3:22 PM Changeset in webkit [210526] by bshafiei@apple.com
  • 1 copy in tags/Safari-603.1.19.1

New tag.

3:17 PM Changeset in webkit [210525] by enrica@apple.com
  • 2 edits in trunk/Source/WebKit2

Selection animation flashing on editable content when zooming.
https://bugs.webkit.org/show_bug.cgi?id=166863
rdar://problem/29931470

Reviewed by Tim Horton.

Implementing _allowAnimatedUpdateSelectionRectView and returning NO,
prevents the selection animation in UIKit.

  • UIProcess/ios/WKContentViewInteraction.mm:

(-[WKContentView _allowAnimatedUpdateSelectionRectViews]):

2:35 PM Changeset in webkit [210524] by timothy_horton@apple.com
  • 3 edits
    2 adds in trunk

Unindenting text inside a blockquote can result in the text being reordered
https://bugs.webkit.org/show_bug.cgi?id=166813

Reviewed by Darin Adler and Ryosuke Niwa.

Test: editing/execCommand/unindent-nested-blockquote-with-inner-div.html

  • editing/IndentOutdentCommand.cpp:

(WebCore::IndentOutdentCommand::outdentParagraph):
Start splitting the tree at the beginning of the content being unindented,
not at the containing block flow element, which could e.g. contain other
elements (or even other blockquotes).

  • editing/execCommand/unindent-nested-blockquote-with-inner-div-expected.txt: Added.
  • editing/execCommand/unindent-nested-blockquote-with-inner-div.html: Added.

Old test output:
second<br><blockquote><div><blockquote>first</blockquote><br></div></blockquote>
New test output:
<blockquote><div><blockquote>first</blockquote><br></div></blockquote>second

2:28 PM Changeset in webkit [210523] by clopez@igalia.com
  • 5 edits
    1 add in trunk/Tools

[GTK][Wayland] Allow running the layout tests under a native Wayland environment.
https://bugs.webkit.org/show_bug.cgi?id=165232

Reviewed by Michael Catanzaro.

Add a new WaylandDriver to run the tests in the user current wayland session.

Also merge all the configuration options for selecting the display server inside one
switch --display-server=xvfb/xorg/wayland/weston (defaulting to xvfb).

This switch is supported on the scripts: run-gtk-tests, run-perf-tests and run-webkit-tests.

  • Scripts/run-gtk-tests: Add missing logging.basicConfig() initialization for the error logger.

(TestRunner._create_driver):

  • Scripts/webkitpy/layout_tests/run_webkit_tests.py:

(parse_args):

  • Scripts/webkitpy/performance_tests/perftestsrunner.py:

(PerfTestsRunner._parse_args):

  • Scripts/webkitpy/port/gtk.py:

(GtkPort.init):
(GtkPort._driver_class):
(GtkPort._search_paths):

  • Scripts/webkitpy/port/waylanddriver.py: Added.

(WaylandDriver):
(WaylandDriver.check_driver):
(WaylandDriver._setup_environ_for_test):
(WaylandDriver._start):

2:02 PM Changeset in webkit [210522] by Yusuke Suzuki
  • 25 edits
    8 adds in trunk

[JSC] Prototype dynamic-import
https://bugs.webkit.org/show_bug.cgi?id=165724

Reviewed by Saam Barati.

JSTests:

  • stress/import-basic.js: Added.

(async.async.load):
(async):
(catch):

  • stress/import-from-eval.js: Added.

(async):
(catch):

  • stress/import-syntax.js: Added.

(testSyntaxError):

  • stress/import-tests/cocoa.js: Added.

(export.Cocoa):
(export.hello):

  • stress/import-tests/multiple.js: Added.

(export.result):

  • stress/import-tests/multiple2.js: Added.

(export.ok):

  • stress/import-tests/should.js: Added.

(export.shouldBe):
(export.shouldThrow):

  • stress/modules-syntax-error.js:

Source/JavaScriptCore:

In this patch, we implement stage3 dynamic-import proposal[1].
This patch adds a new special operator import. And by using it, we can import
the module dynamically from modules and scripts. Before this feature, the module
is always imported statically and before executing the modules, importing the modules
needs to be done. And especially, the module can only be imported from the module.
So the classic script cannot import and use the modules. This dynamic-import relaxes
the above restrictions.

The typical dynamic-import form is the following.

import("...").then(function (namespace) { ... });

You can pass any AssignmentExpression for the import operator. So you can determine
the importing modules dynamically.

import(value).then(function (namespace) { ... });

And previously the module import declaration is only allowed in the top level statements.
But this import operator is just an expression. So you can use it in the function.
And you can use it conditionally.

async function go(cond)
{

if (cond)

return import("...");

return undefined;

}
await go(true);

Currently, this patch just implements this feature only for the JSC shell.
JSC module loader requires a new hook, importModule. And the JSC shell implements
this hook. So, for now, this dynamic-import is not available in the browser side.
If you write this import call, it always returns the rejected promise.

import is implemented like a special operator similar to super.
This is because import is context-sensitive. If you call the import, the module
key resolution is done based on the caller's running context.

For example, if you are running the script which filename is "./ok/hello.js", the module
key for the callimport("./resource/syntax.js") becomes "./ok/resource/syntax.js".
But if you write the completely same import form in the script "./error/hello.js", the
key becomes "./error/resource/syntax.js". So exposing this feature as the import
function is misleading: this function becomes caller's context-sensitive. That's why
dynamic-import is specified as a special operator.

To resolve the module key, we need the caller's context information like the filename of
the caller. This is provided by the SourceOrigin implemented in r210149.
In the JSC shell implementation, this SourceOrigin holds the filename of the caller. So
based on this implementation, the module loader resolve the module key.
In the near future, we will extend this SourceOrigin to hold more information needed for
the browser-side import implementation.

[1]: https://tc39.github.io/proposal-dynamic-import/

  • builtins/ModuleLoaderPrototype.js:

(importModule):

  • bytecompiler/BytecodeGenerator.cpp:

(JSC::BytecodeGenerator::emitGetTemplateObject):
(JSC::BytecodeGenerator::emitGetGlobalPrivate):

  • bytecompiler/BytecodeGenerator.h:
  • bytecompiler/NodesCodegen.cpp:

(JSC::ImportNode::emitBytecode):

  • jsc.cpp:

(absolutePath):
(GlobalObject::moduleLoaderImportModule):
(functionRun):
(functionLoad):
(functionCheckSyntax):
(runWithScripts):

  • parser/ASTBuilder.h:

(JSC::ASTBuilder::createImportExpr):

  • parser/NodeConstructors.h:

(JSC::ImportNode::ImportNode):

  • parser/Nodes.h:

(JSC::ExpressionNode::isImportNode):

  • parser/Parser.cpp:

(JSC::Parser<LexerType>::parseMemberExpression):

  • parser/SyntaxChecker.h:

(JSC::SyntaxChecker::createImportExpr):

  • runtime/JSGlobalObject.cpp:

(JSC::JSGlobalObject::init):

  • runtime/JSGlobalObject.h:
  • runtime/JSGlobalObjectFunctions.cpp:

(JSC::globalFuncImportModule):

  • runtime/JSGlobalObjectFunctions.h:
  • runtime/JSModuleLoader.cpp:

(JSC::JSModuleLoader::importModule):
(JSC::JSModuleLoader::getModuleNamespaceObject):

  • runtime/JSModuleLoader.h:
  • runtime/ModuleLoaderPrototype.cpp:

(JSC::moduleLoaderPrototypeGetModuleNamespaceObject):

Source/WebCore:

We do not set a handler for import for now.
So dynamic import feature is only enabled in the JSC shell right now.

  • bindings/js/JSDOMWindowBase.cpp:
  • bindings/js/JSWorkerGlobalScopeBase.cpp:

LayoutTests:

  • sputnik/Conformance/07_Lexical_Conventions/7.5_Tokens/7.5.3_Future_Reserved_Words/S7.5.3_A1.16-expected.txt:
1:45 PM Changeset in webkit [210521] by fpizlo@apple.com
  • 16 edits
    2 moves
    11 adds in trunk/Source/JavaScriptCore

Make the collector's fixpoint smart about scheduling work
https://bugs.webkit.org/show_bug.cgi?id=165910

Reviewed by Keith Miller.

Prior to this change, every time the GC would run any constraints in markToFixpoint, it
would run all of the constraints. It would always run them in the same order. That means
that so long as any one constraint was generating new work, we'd pay the price of all
constraints. This is usually OK because most constraints are cheap but it artificially
inflates the cost of slow constraints - especially ones that are expensive but usually
generate no new work.

This patch redoes how the GC runs constraints by applying ideas from data flow analysis.
The GC now builds a MarkingConstraintSet when it boots up, and this contains all of the
constraints as well as some meta-data about them. Now, markToFixpoint just calls into
MarkingConstraintSet to execute constraints. Because constraint execution and scheduling
need to be aware of each other, I rewrote markToFixpoint in such a way that it's more
obvious how the GC goes between constraint solving, marking with stopped mutator, and
marking with resumed mutator. This also changes the scheduler API in such a way that a
synchronous stop-the-world collection no longer needs to do fake stop/resume - instead we
just swap the space-time scheduler for the stop-the-world scheduler.

This is a big streamlining of the GC. This is a speed-up in GC-heavy tests because we
now execute most constraints exactly twice regardless of how many total fixpoint
iterations we do. Now, when we run out of marking work, the constraint solver will just
run the constraint that is most likely to generate new visiting work, and if it does
generate work, then the GC now goes back to marking. Before, it would run *all*
constraints and then go back to marking. The constraint solver is armed with three
information signals that it uses to sort the constraints in order of descending likelihood
to generate new marking work. Then it runs them in that order until it there is new
marking work. The signals are:

1) Whether the constraint is greyed by marking or execution. We call this the volatility

of the constraint. For example, weak reference constraints have GreyedByMarking as
their volatility because they are most likely to have something to say after we've done
some marking. On the other hand, conservative roots have GreyedByExecution as their
volatility because they will give new information anytime we let the mutator run. The
constraint solver will only run GreyedByExecution constraints as roots and after the
GreyedByMarking constraints go silent. This ensures that we don't try to scan
conservative roots every time we need to re-run weak references and vice-versa.


Another way to look at it is that the constraint solver tries to predict if the
wavefront is advancing or retreating. The wavefront is almost certainly advancing so
long as the mark stacks are non-empty or so long as at least one of the GreyedByMarking
constraints is still producing work. Otherwise the wavefront is almost certainly
retreating. It's most profitable to run GreyedByMarking constraints when the wavefront
is advancing, and most profitable to run GreyedByExecution constraints when the
wavefront is retreating.


We use the predicted wavefront direction and the volatility of constraints as a
first-order signal of constraint profitability.


2) How much visiting work was created the last time the constraint ran. The solver

remembers the lastVisitCount, and uses it to predict how much work the constraint will
generate next time. In practice this means we will keep re-running the one interesting
constraint until it shuts up.


3) Optional work predictors for some constraints. The constraint that shuffles the mutator

mark stack into the main SlotVisitor's mutator mark stack always knows exactly how much
work it will create.


The sum of (2) and (3) are used as a second-order signal of constraint profitability.


The constraint solver will always run all of the GreyedByExecution constraints at GC
start, since these double as the GC's roots. The constraint solver will always run all of
the GreyedByMarking constraints the first time that marking stalls. Other than that, the
solver will keep running constraints, sorted according to their likelihood to create work,
until either work is created or we run out of constraints to run. GC termination happens
when we run out of constraints to run.

This new infrastructure means that we have a much better chance of dealing with worst-case
DOM pathologies. If we can intelligently factor different evil DOM things into different
constraints with the right work predictions then this could reduce the cost of those DOM
things by a factor of N where N is the number of fixpoint iterations the GC typically
does. N is usually around 5-6 even for simple heaps.

My perf measurements say:

PLT3: 0.02% faster with 5.3% confidence.
JetStream: 0.15% faster with 17% confidence.
Speedometer: 0.58% faster with 82% confidence.

Here are the details from JetStream:

splay: 1.02173x faster with 0.996841 confidence
splay-latency: 1.0617x faster with 0.987462 confidence
towers.c: 1.01852x faster with 0.92128 confidence
crypto-md5: 1.06058x faster with 0.482363 confidence
score: 1.00152x faster with 0.16892 confidence

I think that Speedometer is legitimately benefiting from this change based on looking at
--logGC=true output. We are now spending less time reexecuting expensive constraints. I
think that JetStream/splay is also benefiting, because although the constraints it sees
are cheap, it spends 30% of its time in GC so even small improvements matter.

  • CMakeLists.txt:
  • JavaScriptCore.xcodeproj/project.pbxproj:
  • dfg/DFGPlan.cpp:

(JSC::DFG::Plan::markCodeBlocks): Deleted.
(JSC::DFG::Plan::rememberCodeBlocks): Deleted.

  • dfg/DFGPlan.h:
  • dfg/DFGPlanInlines.h: Added.

(JSC::DFG::Plan::iterateCodeBlocksForGC):

  • dfg/DFGWorklist.cpp:

(JSC::DFG::Worklist::markCodeBlocks): Deleted.
(JSC::DFG::Worklist::rememberCodeBlocks): Deleted.
(JSC::DFG::rememberCodeBlocks): Deleted.

  • dfg/DFGWorklist.h:
  • dfg/DFGWorklistInlines.h: Added.

(JSC::DFG::iterateCodeBlocksForGC):
(JSC::DFG::Worklist::iterateCodeBlocksForGC):

  • heap/CodeBlockSet.cpp:

(JSC::CodeBlockSet::writeBarrierCurrentlyExecuting): Deleted.

  • heap/CodeBlockSet.h:

(JSC::CodeBlockSet::iterate): Deleted.

  • heap/CodeBlockSetInlines.h:

(JSC::CodeBlockSet::iterate):
(JSC::CodeBlockSet::iterateCurrentlyExecuting):

  • heap/Heap.cpp:

(JSC::Heap::Heap):
(JSC::Heap::iterateExecutingAndCompilingCodeBlocks):
(JSC::Heap::iterateExecutingAndCompilingCodeBlocksWithoutHoldingLocks):
(JSC::Heap::assertSharedMarkStacksEmpty):
(JSC::Heap::markToFixpoint):
(JSC::Heap::endMarking):
(JSC::Heap::collectInThread):
(JSC::Heap::stopIfNecessarySlow):
(JSC::Heap::acquireAccessSlow):
(JSC::Heap::collectIfNecessaryOrDefer):
(JSC::Heap::buildConstraintSet):
(JSC::Heap::notifyIsSafeToCollect):
(JSC::Heap::ResumeTheWorldScope::ResumeTheWorldScope): Deleted.
(JSC::Heap::ResumeTheWorldScope::~ResumeTheWorldScope): Deleted.
(JSC::Heap::harvestWeakReferences): Deleted.
(JSC::Heap::visitConservativeRoots): Deleted.
(JSC::Heap::visitCompilerWorklistWeakReferences): Deleted.

  • heap/Heap.h:
  • heap/MarkingConstraint.cpp: Added.

(JSC::MarkingConstraint::MarkingConstraint):
(JSC::MarkingConstraint::~MarkingConstraint):
(JSC::MarkingConstraint::resetStats):
(JSC::MarkingConstraint::execute):

  • heap/MarkingConstraint.h: Added.

(JSC::MarkingConstraint::index):
(JSC::MarkingConstraint::abbreviatedName):
(JSC::MarkingConstraint::name):
(JSC::MarkingConstraint::lastVisitCount):
(JSC::MarkingConstraint::quickWorkEstimate):
(JSC::MarkingConstraint::workEstimate):
(JSC::MarkingConstraint::volatility):

  • heap/MarkingConstraintSet.cpp: Added.

(JSC::MarkingConstraintSet::ExecutionContext::ExecutionContext):
(JSC::MarkingConstraintSet::ExecutionContext::didVisitSomething):
(JSC::MarkingConstraintSet::ExecutionContext::shouldTimeOut):
(JSC::MarkingConstraintSet::ExecutionContext::drain):
(JSC::MarkingConstraintSet::ExecutionContext::didExecute):
(JSC::MarkingConstraintSet::ExecutionContext::execute):
(JSC::MarkingConstraintSet::MarkingConstraintSet):
(JSC::MarkingConstraintSet::~MarkingConstraintSet):
(JSC::MarkingConstraintSet::resetStats):
(JSC::MarkingConstraintSet::add):
(JSC::MarkingConstraintSet::executeBootstrap):
(JSC::MarkingConstraintSet::executeConvergence):
(JSC::MarkingConstraintSet::isWavefrontAdvancing):
(JSC::MarkingConstraintSet::executeConvergenceImpl):
(JSC::MarkingConstraintSet::executeAll):

  • heap/MarkingConstraintSet.h: Added.

(JSC::MarkingConstraintSet::isWavefrontRetreating):

  • heap/MutatorScheduler.cpp: Added.

(JSC::MutatorScheduler::MutatorScheduler):
(JSC::MutatorScheduler::~MutatorScheduler):
(JSC::MutatorScheduler::didStop):
(JSC::MutatorScheduler::willResume):
(JSC::MutatorScheduler::didExecuteConstraints):
(JSC::MutatorScheduler::log):
(JSC::MutatorScheduler::shouldStop):
(JSC::MutatorScheduler::shouldResume):

  • heap/MutatorScheduler.h: Added.
  • heap/OpaqueRootSet.h:

(JSC::OpaqueRootSet::add):

  • heap/SlotVisitor.cpp:

(JSC::SlotVisitor::visitAsConstraint):
(JSC::SlotVisitor::drain):
(JSC::SlotVisitor::didReachTermination):
(JSC::SlotVisitor::hasWork):
(JSC::SlotVisitor::drainFromShared):
(JSC::SlotVisitor::drainInParallelPassively):
(JSC::SlotVisitor::addOpaqueRoot):

  • heap/SlotVisitor.h:

(JSC::SlotVisitor::addToVisitCount):

  • heap/SpaceTimeMutatorScheduler.cpp: Copied from Source/JavaScriptCore/heap/SpaceTimeScheduler.cpp.

(JSC::SpaceTimeMutatorScheduler::Snapshot::Snapshot):
(JSC::SpaceTimeMutatorScheduler::Snapshot::now):
(JSC::SpaceTimeMutatorScheduler::Snapshot::bytesAllocatedThisCycle):
(JSC::SpaceTimeMutatorScheduler::SpaceTimeMutatorScheduler):
(JSC::SpaceTimeMutatorScheduler::~SpaceTimeMutatorScheduler):
(JSC::SpaceTimeMutatorScheduler::state):
(JSC::SpaceTimeMutatorScheduler::beginCollection):
(JSC::SpaceTimeMutatorScheduler::didStop):
(JSC::SpaceTimeMutatorScheduler::willResume):
(JSC::SpaceTimeMutatorScheduler::didExecuteConstraints):
(JSC::SpaceTimeMutatorScheduler::timeToStop):
(JSC::SpaceTimeMutatorScheduler::timeToResume):
(JSC::SpaceTimeMutatorScheduler::log):
(JSC::SpaceTimeMutatorScheduler::endCollection):
(JSC::SpaceTimeMutatorScheduler::bytesAllocatedThisCycleImpl):
(JSC::SpaceTimeMutatorScheduler::bytesSinceBeginningOfCycle):
(JSC::SpaceTimeMutatorScheduler::maxHeadroom):
(JSC::SpaceTimeMutatorScheduler::headroomFullness):
(JSC::SpaceTimeMutatorScheduler::mutatorUtilization):
(JSC::SpaceTimeMutatorScheduler::collectorUtilization):
(JSC::SpaceTimeMutatorScheduler::elapsedInPeriod):
(JSC::SpaceTimeMutatorScheduler::phase):
(JSC::SpaceTimeMutatorScheduler::shouldBeResumed):
(JSC::SpaceTimeScheduler::Decision::targetMutatorUtilization): Deleted.
(JSC::SpaceTimeScheduler::Decision::targetCollectorUtilization): Deleted.
(JSC::SpaceTimeScheduler::Decision::elapsedInPeriod): Deleted.
(JSC::SpaceTimeScheduler::Decision::phase): Deleted.
(JSC::SpaceTimeScheduler::Decision::shouldBeResumed): Deleted.
(JSC::SpaceTimeScheduler::Decision::timeToResume): Deleted.
(JSC::SpaceTimeScheduler::Decision::timeToStop): Deleted.
(JSC::SpaceTimeScheduler::SpaceTimeScheduler): Deleted.
(JSC::SpaceTimeScheduler::snapPhase): Deleted.
(JSC::SpaceTimeScheduler::currentDecision): Deleted.

  • heap/SpaceTimeMutatorScheduler.h: Copied from Source/JavaScriptCore/heap/SpaceTimeScheduler.h.

(JSC::SpaceTimeScheduler::Decision::operator bool): Deleted.

  • heap/SpaceTimeScheduler.cpp: Removed.
  • heap/SpaceTimeScheduler.h: Removed.
  • heap/SynchronousStopTheWorldMutatorScheduler.cpp: Added.

(JSC::SynchronousStopTheWorldMutatorScheduler::SynchronousStopTheWorldMutatorScheduler):
(JSC::SynchronousStopTheWorldMutatorScheduler::~SynchronousStopTheWorldMutatorScheduler):
(JSC::SynchronousStopTheWorldMutatorScheduler::state):
(JSC::SynchronousStopTheWorldMutatorScheduler::beginCollection):
(JSC::SynchronousStopTheWorldMutatorScheduler::timeToStop):
(JSC::SynchronousStopTheWorldMutatorScheduler::timeToResume):
(JSC::SynchronousStopTheWorldMutatorScheduler::endCollection):

  • heap/SynchronousStopTheWorldMutatorScheduler.h: Added.
  • heap/VisitingTimeout.h: Added.

(JSC::VisitingTimeout::VisitingTimeout):
(JSC::VisitingTimeout::visitCount):
(JSC::VisitingTimeout::didVisitSomething):
(JSC::VisitingTimeout::shouldTimeOut):

  • runtime/Options.h:
1:31 PM Changeset in webkit [210520] by commit-queue@webkit.org
  • 3 edits in trunk/Source/WebInspectorUI

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

new colorpicker UI doesn't seem to work in trunk,
investigating offline (Requested by brrian on #webkit).

Reverted changeset:

"Web Inspector: color picker should feature an editable CSS
value"
https://bugs.webkit.org/show_bug.cgi?id=124356
http://trac.webkit.org/changeset/210260

1:31 PM Changeset in webkit [210519] by aestes@apple.com
  • 4 edits
    3 adds in trunk

[QuickLook] Add a layout test for webkit.org/b/135651
https://bugs.webkit.org/show_bug.cgi?id=166855

Reviewed by Andreas Kling.

Tools:

  • DumpRenderTree/mac/FrameLoadDelegate.mm:

(-[FrameLoadDelegate webView:didFailProvisionalLoadWithError:forFrame:]): Added output for
errors with code WebKitErrorCannotShowURL.

  • WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:

(WTR::InjectedBundlePage::didFailProvisionalLoadWithErrorForFrame): Made the error output
not specific to WebKit2 error codes.

LayoutTests:

  • quicklook/nil-response-mime-type-expected.txt: Added.
  • quicklook/nil-response-mime-type.html: Added.
  • quicklook/resources/nil-response-mime-type.xls: Added.
1:09 PM Changeset in webkit [210518] by commit-queue@webkit.org
  • 23 edits
    4 deletes in trunk

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

"4% JSBench regression" (Requested by keith_mi_ on #webkit).

Reverted changeset:

"Add a slice intrinsic to the DFG/FTL"
https://bugs.webkit.org/show_bug.cgi?id=166707
http://trac.webkit.org/changeset/210476

11:34 AM Changeset in webkit [210517] by commit-queue@webkit.org
  • 6 edits in trunk/Tools

Support webkit-test-runner key-value pairs in http tests in DumpRenderTree
https://bugs.webkit.org/show_bug.cgi?id=166837

Patch by Antoine Quint <Antoine Quint> on 2017-01-09
Reviewed by Alex Christensen.

We now correctly handle the --absolutePath argument in DumpRenderTree and use
the provided value when trying to determine the path to the test file. Failing
that, we use the computed URL or the raw path provided to cover all cases.

This was tested in the context of https://bugs.webkit.org/show_bug.cgi?id=165668
by applying this patch and seeing the number test failures dramatically reduced
with WK1 due to the option to turn modern media controls off for older media controls
tests.

  • DumpRenderTree/DumpRenderTree.h:
  • DumpRenderTree/DumpRenderTreeCommon.cpp:

(parseInputLine):

  • DumpRenderTree/TestOptions.h:
  • DumpRenderTree/TestOptions.mm:

(TestOptions::TestOptions):

  • DumpRenderTree/mac/DumpRenderTree.mm:

(runTest):

11:09 AM Changeset in webkit [210516] by Beth Dakin
  • 1 edit
    2 adds in trunk/LayoutTests

Add a test to ensure that preventDefault on touchmove prevents scrolling
https://bugs.webkit.org/show_bug.cgi?id=166790

Reviewed by Simon Fraser.

  • fast/events/touch/ios/iphone7/prevent-default-touchmove-prevents-scrolling-expected.txt: Added.
  • fast/events/touch/ios/iphone7/prevent-default-touchmove-prevents-scrolling.html: Added.
10:55 AM Changeset in webkit [210515] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Rebaseline W3C test for ios-simulator after r210468.
https://bugs.webkit.org/show_bug.cgi?id=166850

Unreviewed test gardening.

  • platform/ios-simulator/imported/w3c/web-platform-tests/html/browsers/browsing-the-web/history-traversal/persisted-user-state-restoration/scroll-restoration-fragment-scrolling-cross-origin-expected.txt:
10:26 AM Changeset in webkit [210514] by commit-queue@webkit.org
  • 8 edits in trunk/Source/WebCore

Merging ThreadableLoader redundant options on filtering responses

Merge OpaqueResponseBodyPolicy and ResponseFilteringPolicy ThreadableLoader options
https://bugs.webkit.org/show_bug.cgi?id=166843

Patch by Youenn Fablet <youennf@gmail.com> on 2017-01-09
Reviewed by Darin Adler.

Covered by existing tests.

Removing OpaqueResponseBodyPolicy option.
When ResponseFilteringPolicy is set to Enable, the body is filtered out in DocumentThreadableLoader.

  • Modules/fetch/FetchLoader.cpp:

(WebCore::FetchLoader::start):

  • loader/DocumentThreadableLoader.cpp:

(WebCore::DocumentThreadableLoader::didReceiveResponse): Implementing body filtering based on ResponseFilteringPolicy option.

  • loader/ThreadableLoader.cpp:

(WebCore::ThreadableLoaderOptions::ThreadableLoaderOptions):

  • loader/ThreadableLoader.h:
  • loader/WorkerThreadableLoader.cpp:

(WebCore::LoaderTaskOptions::LoaderTaskOptions):

  • workers/WorkerScriptLoader.cpp:

(WebCore::WorkerScriptLoader::loadSynchronously):
(WebCore::WorkerScriptLoader::loadAsynchronously):

  • xml/XMLHttpRequest.cpp:

(WebCore::XMLHttpRequest::createRequest):

10:14 AM Changeset in webkit [210513] by bshafiei@apple.com
  • 5 edits in branches/safari-603-branch/Source

Versioning.

9:41 AM Changeset in webkit [210512] by commit-queue@webkit.org
  • 2 edits in trunk/Tools

prepare-ChangeLog: Correct help string for --style option
https://bugs.webkit.org/show_bug.cgi?id=166725

Patch by Milan Crha <mcrha@redhat.com> on 2017-01-09
Reviewed by Alexey Proskuryakov.

  • Scripts/prepare-ChangeLog:

(main):

9:39 AM Changeset in webkit [210511] by Ryan Haddad
  • 2 edits in branches/safari-602-branch/LayoutTests

Rebaseline fast/canvas/webgl/context-creation-attributes.html.

Unreviewed test gardening.

  • fast/canvas/webgl/context-creation-attributes-expected.txt:
9:39 AM Changeset in webkit [210510] by Lucas Forschler
  • 4 edits in trunk

https://bugs.webkit.org/show_bug.cgi?id=166839
Add php7 support for macOS.
Tools:

Mirror the debian logic to look for a php7 module on disk, and return the appropriate apache config file.

Reviewed by Alexey Proskuryakov.

  • Scripts/webkitpy/port/base.py:

(Port._is_darwin_php_version_7):
(Port._debian_php_version):
(Port):
(Port._darwin_php_version):
(Port._apache_config_file_name_for_platform):

LayoutTests:

This patch mirrors the solution that debian uses, by adding a php7 specific apache conf file.

Reviewed by Alexey Proskuryakov.

  • http/conf/apache2.4-php7-httpd.conf: Added.
9:33 AM Changeset in webkit [210509] by Lucas Forschler
  • 1 copy in trunk/LayoutTests/http/conf/apache2.4-php7-httpd.conf

Create new php7 config, preserving history via svn cp

9:19 AM Changeset in webkit [210508] by dbates@webkit.org
  • 2 edits in trunk/Source/WebCore

Evaluating window named element may return wrong result
https://bugs.webkit.org/show_bug.cgi?id=166792
<rdar://problem/29801059>

Reviewed by Chris Dumez.

  • bindings/js/JSDOMWindowProperties.cpp:

(WebCore::jsDOMWindowPropertiesGetOwnPropertySlotNamedItemGetter):

8:54 AM Changeset in webkit [210507] by Chris Dumez
  • 2 edits in trunk/Source/WebCore

REGRESSION(r178955): Touching Settings.in doesn't cause JSInternalSettingsGenerated.cpp to be updated on first build
https://bugs.webkit.org/show_bug.cgi?id=166814

Reviewed by Darin Adler.

Stop using .INTERMEDIATE in DerivedSources.make was it seems to break dependency
chains for some reason. We started using .INTERMEDIATE for scripts that generate
several targets when run a single time. It avoided running the script several
times (once per target) unnecessarily, and fixed issues with parallel builds.

To address the same issue without using .INTERMEDIATE, we now use pattern rules
(i.e. rules that have '%'). As per the documentation [1]:
"Pattern rules may have more than one target. Unlike normal rules, this does not

act as many different rules with the same prerequisites and recipe. If a pattern
rule has multiple targets, make knows that the rule’s recipe is responsible for
making all of the targets. The recipe is executed only once to make all the
targets".

We are therefore solving the same problem as with .INTERMEDIATE. However, I have
confirmed that using pattern rules does not break dependency chains. For example,
modifying Settings.in re-generates both InternalSettingsGenerated.idl *and*
JSInternalSettingsGenerated.cpp.

[1] https://www.gnu.org/software/make/manual/html_node/Pattern-Intro.html#Pattern-Intro

  • DerivedSources.make:
8:31 AM Changeset in webkit [210506] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore

Unreviewed, rolling out r210493 and r210495.
https://bugs.webkit.org/show_bug.cgi?id=166842

Causes makeprops.pl to run on every build (Requested by smfr
on #webkit).

Reverted changesets:

"Avoid triggering rebuilds for minor changes of
CSSProperties.json"
https://bugs.webkit.org/show_bug.cgi?id=166810
http://trac.webkit.org/changeset/210493

"Avoid triggering rebuilds for minor changes of
CSSProperties.json"
https://bugs.webkit.org/show_bug.cgi?id=166810
http://trac.webkit.org/changeset/210495

8:02 AM Changeset in webkit [210505] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Marking inspector/debugger/breakpoint-action-log.html as flaky on macOS.
https://bugs.webkit.org/show_bug.cgi?id=165772

Unreviewed test gardening.

  • platform/mac/TestExpectations:
6:14 AM Changeset in webkit [210504] by Gustavo Noronha Silva
  • 12 edits
    1 add in trunk

[GTK] Should support key and code properties on keyboard events
https://bugs.webkit.org/show_bug.cgi?id=166759

Reviewed by Carlos Garcia Campos.

Source/WebCore:

This change fixes a bunch of tests which are currently failing, such as:

  • fast/events/arrow-keys-on-body.html
  • fast/events/constructors/keyboard-event-constructor.html
  • fast/events/key-events-in-input-button.html
  • fast/events/key-events-in-input-text.html
  • fast/events/keyboardevent-code.html
  • fast/events/keyboardevent-key.html
  • platform/PlatformKeyboardEvent.h:
  • platform/gtk/PlatformKeyboardEventGtk.cpp:

(WebCore::PlatformKeyboardEvent::keyValueForGdkKeyCode): match web key value
to GDK key symbol.
(WebCore::PlatformKeyboardEvent::keyCodeForHardwareKeyCode): match web key code
to hardware code as reported by GDK.
(WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent): add web key value and
code to the keyboard event upon creation.

Source/WebKit2:

  • Shared/WebEvent.h:
  • Shared/WebKeyboardEvent.cpp:

(WebKit::WebKeyboardEvent::WebKeyboardEvent): accept web key value and code on construction.

  • Shared/gtk/WebEventFactory.cpp:

(WebKit::WebEventFactory::createWebKeyboardEvent): pass web key value and code on construction.

Source/WTF:

  • wtf/FeatureDefines.h: enable key and code properties support for GTK.

Tools:

  • WebKitTestRunner/gtk/EventSenderProxyGtk.cpp:

(WTR::getGDKKeySymForKeyRef): add missing modifier keys which were being reported as 'l' and 'r' only
on tests.

LayoutTests:

  • platform/gtk/fast/events/keyboardevent-code-expected.txt: Added. Hardware

codes are different for Mac and Linux for a couple of keys, so we need
platform-specific results.

4:46 AM Changeset in webkit [210503] by pvollan@apple.com
  • 13 edits in trunk/Tools

[Win] Some tests are flaky because certain DLLs are writing to stdout.
https://bugs.webkit.org/show_bug.cgi?id=166760

Reviewed by Darin Adler.

Some tests are flaky because certain DLLs are writing to stdout, giving incorrect test results.
We can work around that by duplicating and redirecting stdout.

  • DumpRenderTree/PixelDumpSupport.cpp:

(dumpWebViewAsPixelsAndCompareWithExpected):
(printPNG):

  • DumpRenderTree/win/AccessibilityControllerWin.cpp:

(logEventProc):

  • DumpRenderTree/win/DRTDesktopNotificationPresenter.cpp:

(DRTDesktopNotificationPresenter::showDesktopNotification):
(DRTDesktopNotificationPresenter::cancelDesktopNotification):
(DRTDesktopNotificationPresenter::requestNotificationPermission):

  • DumpRenderTree/win/DumpRenderTree.cpp:

(dumpFrameScrollPosition):
(dumpHistoryItem):
(dumpBackForwardList):
(dump):
(runTest):
(main):

  • DumpRenderTree/win/DumpRenderTreeWin.h:
  • DumpRenderTree/win/EditingDelegate.cpp:

(EditingDelegate::shouldBeginEditingInDOMRange):
(EditingDelegate::shouldEndEditingInDOMRange):
(EditingDelegate::shouldInsertNode):
(EditingDelegate::shouldInsertText):
(EditingDelegate::shouldDeleteDOMRange):
(EditingDelegate::shouldChangeSelectedDOMRange):
(EditingDelegate::shouldApplyStyle):
(EditingDelegate::shouldChangeTypingStyle):
(EditingDelegate::doPlatformCommand):
(EditingDelegate::webViewDidBeginEditing):
(EditingDelegate::webViewDidChange):
(EditingDelegate::webViewDidEndEditing):
(EditingDelegate::webViewDidChangeTypingStyle):
(EditingDelegate::webViewDidChangeSelection):

  • DumpRenderTree/win/FrameLoadDelegate.cpp:

(FrameLoadDelegate::didStartProvisionalLoadForFrame):
(FrameLoadDelegate::didReceiveServerRedirectForProvisionalLoadForFrame):
(FrameLoadDelegate::didChangeLocationWithinPageForFrame):
(FrameLoadDelegate::didFailProvisionalLoadWithError):
(FrameLoadDelegate::didCommitLoadForFrame):
(FrameLoadDelegate::didReceiveTitle):
(FrameLoadDelegate::didFinishLoadForFrame):
(FrameLoadDelegate::didFailLoadWithError):
(FrameLoadDelegate::willPerformClientRedirectToURL):
(FrameLoadDelegate::didCancelClientRedirectForFrame):
(FrameLoadDelegate::windowScriptObjectAvailable):
(FrameLoadDelegate::didFinishDocumentLoadForFrame):
(FrameLoadDelegate::didHandleOnloadEventsForFrame):
(FrameLoadDelegate::didDisplayInsecureContent):
(FrameLoadDelegate::didRunInsecureContent):
(FrameLoadDelegate::webViewProgressFinishedNotification):

  • DumpRenderTree/win/HistoryDelegate.cpp:

(HistoryDelegate::didNavigateWithNavigationData):
(HistoryDelegate::didPerformClientRedirectFromURL):
(HistoryDelegate::didPerformServerRedirectFromURL):
(HistoryDelegate::updateHistoryTitle):
(HistoryDelegate::populateVisitedLinksForWebView):

  • DumpRenderTree/win/PolicyDelegate.cpp:

(PolicyDelegate::decidePolicyForNavigationAction):
(PolicyDelegate::unableToImplementPolicyWithError):

  • DumpRenderTree/win/ResourceLoadDelegate.cpp:

(ResourceLoadDelegate::willSendRequest):
(ResourceLoadDelegate::didReceiveAuthenticationChallenge):
(ResourceLoadDelegate::didReceiveResponse):
(ResourceLoadDelegate::didFinishLoadingFromDataSource):
(ResourceLoadDelegate::didFailLoadingWithError):

  • DumpRenderTree/win/TestRunnerWin.cpp:

(TestRunner::addDisallowedURL):
(TestRunner::originsWithApplicationCache):
(TestRunner::setStorageDatabaseIdleInterval):
(TestRunner::closeIdleLocalStorageDatabases):
(TestRunner::copyDecodedHostName):
(TestRunner::copyEncodedHostName):
(TestRunner::numberOfPendingGeolocationPermissionRequests):
(TestRunner::isGeolocationProviderActive):
(TestRunner::pathToLocalResource):
(TestRunner::setMockDeviceOrientation):
(TestRunner::setMockGeolocationPosition):
(TestRunner::setMockGeolocationPositionUnavailableError):
(TestRunner::setSpatialNavigationEnabled):
(TestRunner::setAutomaticLinkDetectionEnabled):
(TestRunner::isCommandEnabled):
(TestRunner::authenticateSession):
(TestRunner::addChromeInputField):
(TestRunner::removeChromeInputField):
(TestRunner::focusWebView):
(TestRunner::grantWebNotificationPermission):
(TestRunner::denyWebNotificationPermission):
(TestRunner::removeAllWebNotificationPermissions):
(TestRunner::simulateWebNotificationClick):
(TestRunner::imageCountInGeneralPasteboard):

  • DumpRenderTree/win/UIDelegate.cpp:

(UIDelegate::runJavaScriptAlertPanelWithMessage):
(UIDelegate::runJavaScriptConfirmPanelWithMessage):
(UIDelegate::runJavaScriptTextInputPanelWithPrompt):
(UIDelegate::runBeforeUnloadConfirmPanelWithMessage):
(UIDelegate::webViewAddMessageToConsole):
(UIDelegate::exceededDatabaseQuota):
(UIDelegate::setStatusText):
(UIDelegate::didPressMissingPluginButton):

4:43 AM Changeset in webkit [210502] by Antti Koivisto
  • 17 edits
    2 copies
    5 moves
    1 add in trunk/Source

Move cache coders to WTF
https://bugs.webkit.org/show_bug.cgi?id=166825

Rubber-stamped by Sam Weinig.

Source/WebKit2:

  • NetworkProcess/cache/NetworkCache.h:
  • NetworkProcess/cache/NetworkCacheCoder.h: Removed.
  • NetworkProcess/cache/NetworkCacheCoders.cpp:

(WebKit::NetworkCache::Coder<AtomicString>::encode): Deleted.
(WebKit::NetworkCache::Coder<AtomicString>::decode): Deleted.
(WebKit::NetworkCache::Coder<CString>::encode): Deleted.
(WebKit::NetworkCache::Coder<CString>::decode): Deleted.
(WebKit::NetworkCache::Coder<String>::encode): Deleted.
(WebKit::NetworkCache::decodeStringText): Deleted.
(WebKit::NetworkCache::Coder<String>::decode): Deleted.
(WebKit::NetworkCache::Coder<SHA1::Digest>::encode): Deleted.
(WebKit::NetworkCache::Coder<SHA1::Digest>::decode): Deleted.
(WebKit::NetworkCache::Coder<WebCore::HTTPHeaderMap>::encode): Deleted.
(WebKit::NetworkCache::Coder<WebCore::HTTPHeaderMap>::decode): Deleted.

  • NetworkProcess/cache/NetworkCacheCoders.h:

(): Deleted.
(WebKit::NetworkCache::Coder<std::optional<T>>::encode): Deleted.
(WebKit::NetworkCache::Coder<std::optional<T>>::decode): Deleted.

  • NetworkProcess/cache/NetworkCacheCodersCocoa.cpp:

(WebKit::NetworkCache::encodeCFData): Deleted.
(WebKit::NetworkCache::decodeCFData): Deleted.
(WebKit::NetworkCache::encodeSecTrustRef): Deleted.
(WebKit::NetworkCache::decodeSecTrustRef): Deleted.
(WebKit::NetworkCache::encodeCertificateChain): Deleted.
(WebKit::NetworkCache::decodeCertificateChain): Deleted.
(WebKit::NetworkCache::Coder<WebCore::CertificateInfo>::encode): Deleted.
(WebKit::NetworkCache::Coder<WebCore::CertificateInfo>::decode): Deleted.

  • NetworkProcess/cache/NetworkCacheDecoder.cpp: Removed.
  • NetworkProcess/cache/NetworkCacheDecoder.h: Removed.
  • NetworkProcess/cache/NetworkCacheEncoder.cpp: Removed.
  • NetworkProcess/cache/NetworkCacheEncoder.h: Removed.
  • NetworkProcess/cache/NetworkCacheEntry.cpp:

(WebKit::NetworkCache::Entry::encodeAsStorageRecord):
(WebKit::NetworkCache::Entry::decodeStorageRecord):

  • NetworkProcess/cache/NetworkCacheKey.cpp:

(WebKit::NetworkCache::Key::encode):
(WebKit::NetworkCache::Key::decode):

  • NetworkProcess/cache/NetworkCacheKey.h:
  • NetworkProcess/cache/NetworkCacheStorage.cpp:

(WebKit::NetworkCache::decodeRecordMetaData):
(WebKit::NetworkCache::encodeRecordMetaData):

  • NetworkProcess/cache/NetworkCacheSubresourcesEntry.cpp:

(WebKit::NetworkCache::SubresourceInfo::encode):
(WebKit::NetworkCache::SubresourceInfo::decode):
(WebKit::NetworkCache::SubresourcesEntry::encodeAsStorageRecord):
(WebKit::NetworkCache::SubresourcesEntry::decodeStorageRecord):

  • NetworkProcess/cache/NetworkCacheSubresourcesEntry.h:
  • UIProcess/API/APIUserContentExtensionStore.cpp:

(API::encodeContentExtensionMetaData):
(API::decodeContentExtensionMetaData):

  • WebKit2.xcodeproj/project.pbxproj:

Source/WTF:

Make it possible to use robust serialization of WTF types on the lower levels of the stack.

  • WTF.xcodeproj/project.pbxproj:
  • wtf/persistence: Added.
  • wtf/persistence/Coder.h: Copied from Source/WebKit2/NetworkProcess/cache/NetworkCacheCoder.h.

(WebKit::NetworkCache::Coder::encode): Deleted.
(WebKit::NetworkCache::Coder::decode): Deleted.

  • wtf/persistence/Coders.cpp: Copied from Source/WebKit2/NetworkProcess/cache/NetworkCacheCoders.cpp.

(WebKit::NetworkCache::Coder<AtomicString>::encode): Deleted.
(WebKit::NetworkCache::Coder<AtomicString>::decode): Deleted.
(WebKit::NetworkCache::Coder<CString>::encode): Deleted.
(WebKit::NetworkCache::Coder<CString>::decode): Deleted.
(WebKit::NetworkCache::Coder<String>::encode): Deleted.
(WebKit::NetworkCache::decodeStringText): Deleted.
(WebKit::NetworkCache::Coder<String>::decode): Deleted.
(WebKit::NetworkCache::Coder<SHA1::Digest>::encode): Deleted.
(WebKit::NetworkCache::Coder<SHA1::Digest>::decode): Deleted.
(WebKit::NetworkCache::Coder<WebCore::HTTPHeaderMap>::encode): Deleted.
(WebKit::NetworkCache::Coder<WebCore::HTTPHeaderMap>::decode): Deleted.

  • wtf/persistence/Coders.h: Copied from Source/WebKit2/NetworkProcess/cache/NetworkCacheCoders.h.

(WebKit::NetworkCache::Coder<std::optional<T>>::encode): Deleted.
(WebKit::NetworkCache::Coder<std::optional<T>>::decode): Deleted.

  • wtf/persistence/Decoder.cpp: Copied from Source/WebKit2/NetworkProcess/cache/NetworkCacheDecoder.cpp.

(WebKit::NetworkCache::Decoder::Decoder): Deleted.
(WebKit::NetworkCache::Decoder::~Decoder): Deleted.
(WebKit::NetworkCache::Decoder::bufferIsLargeEnoughToContain): Deleted.
(WebKit::NetworkCache::Decoder::decodeFixedLengthData): Deleted.
(WebKit::NetworkCache::Decoder::decodeNumber): Deleted.
(WebKit::NetworkCache::Decoder::decode): Deleted.
(WebKit::NetworkCache::Decoder::verifyChecksum): Deleted.

  • wtf/persistence/Decoder.h: Copied from Source/WebKit2/NetworkProcess/cache/NetworkCacheDecoder.h.

(WebKit::NetworkCache::Decoder::length): Deleted.
(WebKit::NetworkCache::Decoder::currentOffset): Deleted.
(WebKit::NetworkCache::Decoder::decodeEnum): Deleted.
(WebKit::NetworkCache::Decoder::decode): Deleted.
(WebKit::NetworkCache::Decoder::bufferIsLargeEnoughToContain): Deleted.

  • wtf/persistence/Encoder.cpp: Copied from Source/WebKit2/NetworkProcess/cache/NetworkCacheEncoder.cpp.

(WebKit::NetworkCache::Encoder::Encoder): Deleted.
(WebKit::NetworkCache::Encoder::~Encoder): Deleted.
(WebKit::NetworkCache::Encoder::grow): Deleted.
(WebKit::NetworkCache::Encoder::updateChecksumForData): Deleted.
(WebKit::NetworkCache::Encoder::encodeFixedLengthData): Deleted.
(WebKit::NetworkCache::Encoder::encodeNumber): Deleted.
(WebKit::NetworkCache::Encoder::encode): Deleted.
(WebKit::NetworkCache::Encoder::encodeChecksum): Deleted.

  • wtf/persistence/Encoder.h: Copied from Source/WebKit2/NetworkProcess/cache/NetworkCacheEncoder.h.

(WebKit::NetworkCache::Encoder::encodeEnum): Deleted.
(WebKit::NetworkCache::Encoder::encode): Deleted.
(WebKit::NetworkCache::Encoder::operator<<): Deleted.
(WebKit::NetworkCache::Encoder::buffer): Deleted.
(WebKit::NetworkCache::Encoder::bufferSize): Deleted.
(WebKit::NetworkCache::Encoder::updateChecksumForNumber): Deleted.

4:12 AM Changeset in webkit [210501] by Carlos Garcia Campos
  • 5 edits in trunk/Source/WebCore

[GTK] WebProcess from WebKitGtk+ 2.15.2 SIGSEGVs in std::unique_ptr<SoupBuffer, WTF::GPtrDeleter<SoupBuffer> >::get() const () at /usr/include/c++/6/bits/unique_ptr.h:305
https://bugs.webkit.org/show_bug.cgi?id=165848

Reviewed by Michael Catanzaro.

In r208881 several locks were added to ImageDecoder to prevent frameBufferAtIndex() from being called by multiple
threads at the same time, but I forgot isSizeAvailable() also calls frameBufferAtIndex(). However, what we
really need to protect is the GIFImageDecoder, to never allow decoding from more than one thread at the same
time. This patch reverts r208881 and adds a lock to GIFImageDecoder::decode() instead.

  • platform/image-decoders/ImageDecoder.cpp:

(WebCore::ImageDecoder::frameIsCompleteAtIndex):
(WebCore::ImageDecoder::frameDurationAtIndex):
(WebCore::ImageDecoder::createFrameImageAtIndex):

  • platform/image-decoders/ImageDecoder.h:
  • platform/image-decoders/gif/GIFImageDecoder.cpp:

(WebCore::GIFImageDecoder::decode):

  • platform/image-decoders/gif/GIFImageDecoder.h:
3:25 AM Changeset in webkit [210500] by tpopela@redhat.com
  • 3 edits in trunk/Source/WebKit2

[GTK] Replace WebKitWebSettings with WebKitSettings in documentation
https://bugs.webkit.org/show_bug.cgi?id=166836

Reviewed by Carlos Garcia Campos.

Don't use WebKitWebSettings (it was a WebKit1 thing) in documentation,
but replace it with WebKitSettings.

  • UIProcess/API/gtk/WebKitSettings.cpp:

(webkit_settings_class_init):

  • UIProcess/API/gtk/WebKitWebView.cpp:
3:03 AM Changeset in webkit [210499] by commit-queue@webkit.org
  • 9 edits
    3 copies in trunk

[OWR] Unskip fast/mediastream/MediaStream-video-element-track-stop.html
https://bugs.webkit.org/show_bug.cgi?id=165316

Patch by Alejandro G. Castro <alex@igalia.com> on 2017-01-09
Reviewed by Philippe Normand.

Source/WebCore:

Fixed the ended support of the video element in the OWR player and
fixed the videoTracks support. Now the OW player properly adds and
removes the audio and video tracks. Added the getSettings support
to the mediastream interface. Solved also the size handling in
some of the enable/muted situations.

Unskipping fast/mediastream/MediaStream-video-element-track-stop.html.

  • platform/GStreamer.cmake: Added the new

RealtimeMediaSourceOwr.cpp with the new code handling the
settings.

  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamerOwr.cpp:

(WebCore::MediaPlayerPrivateGStreamerOwr::~MediaPlayerPrivateGStreamerOwr):
Release the new video and audio maps that creates a relationship
of the mediastream tracks with the mediatracks of the video element.
(WebCore::MediaPlayerPrivateGStreamerOwr::play): Set ended to
false when we start playing.
(WebCore::MediaPlayerPrivateGStreamerOwr::load): Create the media
tracks to the player so that the videoTracks API returns it, and
add an entry in the map to be able to restore it using the
mediastream track.
(WebCore::MediaPlayerPrivateGStreamerOwr::disableMediaTracks):
Move some part of the stop function to this one in order to use it
in pause method and avoid changing the video selection in that
case.
(WebCore::MediaPlayerPrivateGStreamerOwr::stop): Now we call the
function disableMediaTracks and we also change teh selected
videoTrack.
(WebCore::MediaPlayerPrivateGStreamerOwr::trackEnded): For
videoTrack reset the size and the selected element. In case there
is no media playing we Make sure we set the ended variable to true
and call the timeChange to modify the state of the player.
(WebCore::MediaPlayerPrivateGStreamerOwr::trackEnabledChanged):
Handle properly the situation when the user changed the enabled
value, we disable the media.
(WebCore::MediaPlayerPrivateGStreamerOwr::setSize): Modify the
size of the source.
(WebCore::MediaPlayerPrivateGStreamerOwr::naturalSize): Overrided
to make sure we return a size even when the sample is not ready
for gst.

  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamerOwr.h:

Added the ended attribute and the maps.

  • platform/mediastream/openwebrtc/MediaEndpointOwr.cpp:

(WebCore::MediaEndpointOwr::createMutedRemoteSource): Use the new
realtime video and audio sources classes, this new classes
implement the settings of each type of media element.

  • platform/mediastream/openwebrtc/RealtimeMediaSourceCenterOwr.cpp:

(WebCore::RealtimeMediaSourceCenterOwr::mediaSourcesAvailable):
Use the new audio and video source classes instead of the general
one in order to handle the settings properly.

  • platform/mediastream/openwebrtc/RealtimeMediaSourceOwr.cpp: Added

(WebCore::RealtimeMediaSourceOwr::settings): Initialize using the
subclass and return the new currentSettings attribute.
(WebCore::RealtimeMediaSourceOwr::supportedConstraints): Call the
subclass initialization of the supportedSettings.

  • platform/mediastream/openwebrtc/RealtimeMediaSourceOwr.h:

(WebCore::RealtimeMediaSourceOwr::initializeSettings): Added to
initialize the settings before returning the value. Implemented in
the subclass.
(WebCore::RealtimeMediaSourceOwr::initializeSupportedConstraints):
Added to initialize the supported settings of the
media. Implemented in the subclass.
(WebCore::RealtimeMediaSourceOwr::settings): Moved to the cpp
file, implemented using the initialize functions of the subclass

  • platform/mediastream/openwebrtc/RealtimeVideoSourceOwr.h: Added

this new class to handle the settings of the video elements. The
class initializes the settings and the supportedSettings.

  • platform/mediastream/openwebrtc/RealtimeAudioSourceOwr.h: Added

this new class to handle the settings of the audio elements. The
class initializes the settings and the supportedSettings.

LayoutTests:

  • platform/gtk/TestExpectations: Unskipped the test and moved the

stop one, now it does not timeout because we correctly handle the
ended value but still fails, we need more features in the mock
classes for owr.

Jan 8, 2017:

9:35 PM Changeset in webkit [210498] by akling@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

Inject MarkedSpace size classes for a few more high-volume objects.
<https://webkit.org/b/166815>

Reviewed by Darin Adler.

Add the following classes to the list of manually injected size classes:

  • JSString
  • JSFunction
  • PropertyTable
  • Structure

Only Structure actually ends up with a new size class, the others already
can't get any tighter due to the current MarkedBlock::atomSize being 16.
I've put them in anyway to ensure that we have optimally carved-out cells
for them in the future, should they grow.

With this change, Structures get allocated in 128-byte cells instead of
160-byte cells, giving us 25% more Structures per MarkedBlock.

  • heap/MarkedSpace.cpp:
8:12 PM Changeset in webkit [210497] by fpizlo@apple.com
  • 2 edits in trunk/LayoutTests

Unreviewed, since this test is slow it should run in fewer configurations. This resolves the
occasional timeouts I was seeing.

  • js/script-tests/regress-139548.js:
9:44 AM Changeset in webkit [210496] by Konstantin Tokarev
  • 6 edits in trunk/Source

Introduce CPU(X86_SSE2) instead of various SSE2 checks
https://bugs.webkit.org/show_bug.cgi?id=166808

Reviewed by Michael Catanzaro.

Now copyLCharsFromUCharSource can use SSE2 implementation on non-Darwin
OSes, and all SSE2 code paths are available for MSVC on x86 if /arch:SSE2
or higher is enabled, and for MSVC on x86_64.

Source/WebCore:

No new tests needed.

  • platform/audio/SincResampler.cpp:

(WebCore::SincResampler::process):

  • platform/audio/VectorMath.cpp:

(WebCore::VectorMath::vsma):
(WebCore::VectorMath::vsmul):
(WebCore::VectorMath::vadd):
(WebCore::VectorMath::vmul):
(WebCore::VectorMath::zvmul):
(WebCore::VectorMath::vsvesq):
(WebCore::VectorMath::vmaxmgv):

Source/WTF:

  • wtf/Platform.h:
  • wtf/text/ASCIIFastPath.h:

(WTF::copyLCharsFromUCharSource):

Jan 7, 2017:

10:02 PM Changeset in webkit [210495] by Simon Fraser
  • 2 edits in trunk/Source/WebCore

Avoid triggering rebuilds for minor changes of CSSProperties.json
https://bugs.webkit.org/show_bug.cgi?id=166810

Post-review cleanup suggested by Darin Adler.

  • css/makeprop.pl:
5:22 PM Changeset in webkit [210494] by timothy_horton@apple.com
  • 4 edits in trunk/Tools

Add a setting to create editable MiniBrowser windows by default
https://bugs.webkit.org/show_bug.cgi?id=166806

Reviewed by Beth Dakin.

  • MiniBrowser/mac/AppDelegate.m:

(-[BrowserAppDelegate createBrowserWindowController:]):
(-[BrowserAppDelegate applicationDidFinishLaunching:]):
(-[BrowserAppDelegate _updateNewWindowKeyEquivalents]):

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

(-[SettingsController _populateMenu]):
(-[SettingsController validateMenuItem:]):
(-[SettingsController toggleCreateEditorByDefault:]):
(-[SettingsController createEditorByDefault]):
Add a setting and update the key equivalents accordingly.
Also make sure to make the right kind of window on launch.

3:39 PM Changeset in webkit [210493] by Simon Fraser
  • 2 edits in trunk/Source/WebCore

Avoid triggering rebuilds for minor changes of CSSProperties.json
https://bugs.webkit.org/show_bug.cgi?id=166810

Reviewed by Daniel Bates.

We expect to make lots of metadata-related changes to CSSProperties.json, and
these should not trigger rebuilds.

Have makeprop.pl write to temporary files first, then only replace the generated
files if the contents differ.

  • css/makeprop.pl:

(replaceFileIfChanged):

2:08 PM Changeset in webkit [210492] by Darin Adler
  • 27 edits in trunk/Source

Remove PassRefPtr use from "inspector", "platform/sql", and "platform/text"
https://bugs.webkit.org/show_bug.cgi?id=166797

Reviewed by Alex Christensen.

Source/WebCore:

  • Modules/webdatabase/Database.cpp:

(WebCore::Database::performOpenAndVerify): Pass a reference instead of a pointer.

  • dom/Document.cpp:

(WebCore::canonicalizedTitle): Map backslashes to currency symbols inside the
existing loop through the characters instead of calling a function confusingly
named "displayBuffer" to do it. More straightforward, possibly more efficient,
one less function.
(WebCore::Document::displayStringModifiedByEncoding): Call replace to map
backslashes to currency symbols instead of calling a special displayString
function. There was no real benefit to using that function; the String::replace
function has all the same optimizations, and this was also the only call site.

  • editing/SpellChecker.cpp:

(WebCore::SpellChecker::invokeRequest): Pass a reference instead of a pointer.

  • inspector/InspectorOverlay.cpp:

(WebCore::InspectorOverlay::overlayPage): Call createEmptyEditorClient instead
of using the class EmptyEditorClient directly.

  • loader/EmptyClients.cpp: Moved most of the empty clients here from the header.

Also made lots more things private.
(WebCore::createEmptyEditorClient): Added.
(WebCore::emptyDiagnosticLoggingClient): Added.

  • loader/EmptyClients.h: Updated for above changes. Made more things private.
  • page/DatabaseProvider.h: Removed unneeded include.
  • page/MainFrame.cpp: Ditto.
  • page/Page.cpp:

(WebCore::Page::diagnosticLoggingClient): Call emptyDiagnosticLoggingClient
instead of using the class EmptyDiagnosticLoggingClient directly.

  • platform/sql/SQLiteDatabase.cpp:

(WebCore::SQLiteDatabase::setAuthorizer): Take a reference instead of a
PassRefPtr.

  • platform/sql/SQLiteDatabase.h: Updated for above.
  • platform/text/BidiContext.cpp:

(WebCore::BidiContext::BidiContext): Moved this function here from the header.
(WebCore::copyContextAndRebaselineLevel): Return a Ref instead of a PassRefPtr,
and take a reference rather than a raw pointer.
(WebCore::BidiContext::copyStackRemovingUnicodeEmbeddingContexts): Return a
Ref instead of a PassRefPtr.

  • platform/text/BidiContext.h: Updated for the above changes.
  • platform/text/BidiResolver.h: Simplify initialization, use more references,

auto, modern for loops, refer to derived class as that rather than the non-C++
term subclass.

  • platform/text/TextCheckerClient.h: Changd argument from PassRefPtr to a

reference.

  • platform/text/TextEncoding.h:

(WebCore::TextEncoding::displayString): Deleted.
(WebCore::TextEncoding::displayBuffer): Deleted.

  • rendering/RootInlineBox.cpp: Style tweaks and use a modern for loop.
  • svg/graphics/SVGImage.cpp:

(WebCore::SVGImage::dataChanged): Call createEmptyEditorClient instead
of using the class EmptyEditorClient directly.

Source/WebKit/mac:

  • WebCoreSupport/WebEditorClient.h: Updated to take a reference.
  • WebCoreSupport/WebEditorClient.mm:

(WebEditorClient::requestCheckingOfString): Take a reference
instead of a PassRefPtr.

Source/WebKit/win:

  • WebCoreSupport/WebEditorClient.h: Update argument to take a reference

instead of a PassRefPtr.

Source/WebKit2:

  • WebProcess/WebCoreSupport/WebEditorClient.cpp:

(WebKit::WebEditorClient::requestCheckingOfString): Take a reference
instead of a PassRefPtr.

  • WebProcess/WebCoreSupport/WebEditorClient.h: Updated for above change.
1:29 PM Changeset in webkit [210491] by aestes@apple.com
  • 16 edits
    9 adds
    21 deletes in trunk

[QuickLook] Update quicklook test expectations
https://bugs.webkit.org/show_bug.cgi?id=166798
<rdar://problem/26477735>

Reviewed by Alex Christensen.

Source/WebCore:

QuickLook uses UUIDs to generate x-apple-ql-id: URLs, so they will differ each time a
document is previewed. Since these URLs are included in QuickLook layout test results,
WebArchiveDumpSupport needs to replace them with predictable values when dumping a web
archive.

  • testing/cocoa/WebArchiveDumpSupport.mm:

(WebCoreTestSupport::quickLookURLReplacements): Created a static Vector of CFStringRef pairs
to store x-apple-ql-id: URLs and their replacement values.
(WebCoreTestSupport::normalizeWebResourceURL): If the URL starts with “x-apple-ql-id://”,
replace the text between the scheme and the file extension with “resource”. Store the
original URL along with its replacement in quickLookURLReplacements().
(WebCoreTestSupport::createXMLStringFromWebArchiveData): Replaced all QuickLook URLs in the
final XML text with their replacement URLs.

LayoutTests:

For documents that generate HTML previews, updated the expected results to be web archives.
Web archives capture the same information that the expected HTML files did, but allow for
easy rebasing with --reset-results.

For documents that generate PDF previews, a webarchive expected result is inappropriate
since the generated PDF will differ between runs due to changing metadata (e.g. creation
date). These tests were kept as reftests but with updated expected results.

  • platform/ios-simulator/TestExpectations: Unskipped quicklook/.
  • quicklook/excel-expected.html: Removed.
  • quicklook/excel-expected.txt: Added.
  • quicklook/excel-legacy-expected.html: Removed.
  • quicklook/excel-legacy-expected.txt: Added.
  • quicklook/excel-legacy.html: Updated to dump as webarchive.
  • quicklook/excel.html: Ditto.
  • quicklook/keynote-09-expected.html: Removed.
  • quicklook/keynote-09-expected.txt: Added.
  • quicklook/keynote-09.html: Updated to dump as webarchive.
  • quicklook/numbers-09-expected.html: Removed.
  • quicklook/numbers-09-expected.txt: Added.
  • quicklook/numbers-09.html: Updated to dump as webarchive.
  • quicklook/pages-09-expected.html: Removed.
  • quicklook/pages-09-expected.txt: Added.
  • quicklook/pages-09.html: Updated to dump as webarchive.
  • quicklook/powerpoint-expected.html: Removed.
  • quicklook/powerpoint-expected.txt: Added.
  • quicklook/powerpoint-legacy-expected.html: Removed.
  • quicklook/powerpoint-legacy-expected.txt: Added.
  • quicklook/powerpoint-legacy.html: Updated to dump as webarchive.
  • quicklook/powerpoint.html: Updated to dump as webarchive.
  • quicklook/resources/excel-expected.html: Removed.
  • quicklook/resources/excel-legacy-expected.html: Removed.
  • quicklook/resources/keynote-09-expected/index.css: Removed.
  • quicklook/resources/keynote-09-expected/index.html: Removed.
  • quicklook/resources/keynote-09-expected/index.js: Removed.
  • quicklook/resources/keynote-expected.pdf: Updated.
  • quicklook/resources/numbers-09-expected/canvas.js: Removed.
  • quicklook/resources/numbers-09-expected/index.html: Removed.
  • quicklook/resources/numbers-09-expected/navigation.css: Removed.
  • quicklook/resources/numbers-09-expected/navigation.html: Removed.
  • quicklook/resources/numbers-09-expected/sheet_1.html: Removed.
  • quicklook/resources/numbers-expected.pdf: Updated.
  • quicklook/resources/pages-09-expected/index.css: Removed.
  • quicklook/resources/pages-09-expected/index.html: Removed.
  • quicklook/resources/pages-expected.pdf: Updated.
  • quicklook/resources/powerpoint-expected.html: Removed.
  • quicklook/resources/powerpoint-legacy-expected.html: Removed.
  • quicklook/resources/webkit-icon.pdf: Removed.
  • quicklook/resources/webkit-icon.png: Removed.
  • quicklook/resources/webkit-icon.tiff: Removed.
  • quicklook/resources/word-expected.html: Removed.
  • quicklook/resources/word-legacy-expected.html: Removed.
  • quicklook/word-expected.html: Removed.
  • quicklook/word-expected.txt: Added.
  • quicklook/word-legacy-expected.html: Removed.
  • quicklook/word-legacy-expected.txt: Added.
  • quicklook/word-legacy.html: Updated to dump as webarchive.
  • quicklook/word.html: Updated to dump as webarchive.
1:23 PM Changeset in webkit [210490] by timothy_horton@apple.com
  • 3 edits in trunk/Tools

Fix the 32-bit build.

  • MiniBrowser/mac/BrowserWindowController.h:
  • MiniBrowser/mac/BrowserWindowController.m:
1:18 PM Changeset in webkit [210489] by timothy_horton@apple.com
  • 2 edits in trunk/Tools

Fix the 32-bit build.

  • MiniBrowser/mac/BrowserWindowController.m:
1:15 PM Changeset in webkit [210488] by timothy_horton@apple.com
  • 3 edits in trunk/Tools

Make it possible to drop HTML files on the MiniBrowser icon
https://bugs.webkit.org/show_bug.cgi?id=166802

Reviewed by Simon Fraser.

  • MiniBrowser/mac/AppDelegate.m:

(-[BrowserAppDelegate application:openFile:]):

  • MiniBrowser/mac/Info.plist:

If you're using an editable window, the usual trick of dropping on the
window doesn't work anymore (it makes an <attachment> instead).

1:13 PM Changeset in webkit [210487] by timothy_horton@apple.com
  • 3 edits in trunk/Tools

MiniBrowser window gets smaller each time it is instantiated
https://bugs.webkit.org/show_bug.cgi?id=166807

Reviewed by Andy Estes.

  • MiniBrowser/mac/BrowserWindowController.m:

(-[BrowserWindowController windowDidLoad]):

  • MiniBrowser/mac/BrowserWindow.xib:

Turn on full-window content view support with IB, instead of waiting
until after the views have been loaded. This seems to resolve the
longstanding ever-shrinking-window problem.

1:12 PM Changeset in webkit [210486] by timothy_horton@apple.com
  • 2 edits in trunk/Tools

Add indent/outdent items to MiniBrowser's new format menu
https://bugs.webkit.org/show_bug.cgi?id=166805

Reviewed by Dan Bernstein.

  • MiniBrowser/mac/MainMenu.xib:
1:11 PM Changeset in webkit [210485] by timothy_horton@apple.com
  • 2 edits in trunk/Tools

Add a stock Format menu to MiniBrowser
https://bugs.webkit.org/show_bug.cgi?id=166804

Reviewed by Andy Estes.

  • MiniBrowser/mac/MainMenu.xib:

Many of the features automatically work with editable web views.
However, this seems to expose a bug where none of the font-related features
(Cmd-B, for example) work until the first time the font panel is shown,
per process, which will need to be investigated separately.

1:11 PM Changeset in webkit [210484] by timothy_horton@apple.com
  • 6 edits in trunk/Tools

Remove unused applicationWillTerminate methods from MiniBrowser
https://bugs.webkit.org/show_bug.cgi?id=166803

Reviewed by Andy Estes.

  • MiniBrowser/mac/AppDelegate.m:

(-[BrowserAppDelegate applicationWillTerminate:]): Deleted.

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

(-[BrowserWindowController applicationTerminating]): Deleted.

  • MiniBrowser/mac/WK1BrowserWindowController.m:

(-[WK1BrowserWindowController applicationTerminating]): Deleted.

  • MiniBrowser/mac/WK2BrowserWindowController.m:

(-[WK2BrowserWindowController applicationTerminating]): Deleted.

1:10 PM Changeset in webkit [210483] by timothy_horton@apple.com
  • 8 edits in trunk/Tools

Add the ability to create empty contentEditable windows in MiniBrowser
https://bugs.webkit.org/show_bug.cgi?id=166801

Reviewed by Wenson Hsieh.

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

(-[BrowserAppDelegate createBrowserWindowController:]):
(-[BrowserAppDelegate newWindow:]):
(-[BrowserAppDelegate newEditorWindow:]):
(-[BrowserAppDelegate openDocument:]):
(-[BrowserAppDelegate _updateNewWindowKeyEquivalents]):

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

(-[BrowserWindowController loadHTMLString:]):
(-[BrowserWindowController toggleEditable:]):

  • MiniBrowser/mac/MainMenu.xib:
  • MiniBrowser/mac/WK1BrowserWindowController.m:

(-[WK1BrowserWindowController awakeFromNib]):
(-[WK1BrowserWindowController loadHTMLString:]):
(-[WK1BrowserWindowController validateMenuItem:]):
(-[WK1BrowserWindowController setEditable:]):
(-[WK1BrowserWindowController updateTitle:]):

  • MiniBrowser/mac/WK2BrowserWindowController.m:

(-[WK2BrowserWindowController awakeFromNib]):
(-[WK2BrowserWindowController validateMenuItem:]):
(-[WK2BrowserWindowController setEditable:]):
(-[WK2BrowserWindowController updateTitle:]):
(-[WK2BrowserWindowController loadHTMLString:]):
Merge more functionality from WebEditingTester.
Add two menu items for creating empty editable WebKit1/2 windows.
Add a menu item to the Edit menu to toggle editability on any window.

1:09 PM Changeset in webkit [210482] by timothy_horton@apple.com
  • 7 edits in trunk/Tools

Implement find-in-page in MiniBrowser
https://bugs.webkit.org/show_bug.cgi?id=166799

Reviewed by Andy Estes.

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

(-[BrowserWindowController find:]): Deleted.

  • MiniBrowser/mac/MainMenu.xib:
  • MiniBrowser/mac/WK1BrowserWindowController.m:

(-[WK1BrowserWindowController toggleShrinkToFit:]):
(-[WK1BrowserWindowController find:]): Deleted.

  • MiniBrowser/mac/WK2BrowserWindowController.m:

(-[WK2BrowserWindowController awakeFromNib]):
(-[WK2BrowserWindowController dealloc]):
(-[WK2BrowserWindowController validateMenuItem:]):
(-[WK2BrowserWindowController performTextFinderAction:]):
(-[WK2BrowserWindowController findBarView]):
(-[WK2BrowserWindowController setFindBarView:]):
(-[WK2BrowserWindowController isFindBarVisible]):
(-[WK2BrowserWindowController setFindBarVisible:]):
(-[WK2BrowserWindowController contentView]):
(-[WK2BrowserWindowController findBarViewDidChangeHeight]):
(-[WK2BrowserWindowController performFindPanelAction:]): Deleted.
(-[WK2BrowserWindowController find:]): Deleted.
Implement find-in-page using WKWebView's conformance to the NSTextFinderClient
protocol. At first glance, it's pretty broken, but vaguely works.

1:08 PM Changeset in webkit [210481] by timothy_horton@apple.com
  • 4 edits in trunk/Tools

Share the implementation of MiniBrowser view hiding functionality
https://bugs.webkit.org/show_bug.cgi?id=166800

Reviewed by Andy Estes.

  • MiniBrowser/mac/BrowserWindowController.m:

(-[BrowserWindowController showHideWebView:]):
(-[BrowserWindowController removeReinsertWebView:]):

  • MiniBrowser/mac/WK1BrowserWindowController.m:

(-[WK1BrowserWindowController showHideWebView:]): Deleted.
(-[WK1BrowserWindowController removeReinsertWebView:]): Deleted.

  • MiniBrowser/mac/WK2BrowserWindowController.m:

(-[WK2BrowserWindowController showHideWebView:]): Deleted.
(-[WK2BrowserWindowController removeReinsertWebView:]): Deleted.
Move the implementation of these two things to the shared superclass,
since they don't depend on WebKit-specific things.
Also, there was no reason to retain the (WK)WebView while it was unparented,
as the BrowserWindowController maintains a reference the entire time.

1:00 PM Changeset in webkit [210480] by aestes@apple.com
  • 16 edits in trunk/Source

[QuickLook] Consolidate usage of QuickLookHandle into SubresourceLoader
https://bugs.webkit.org/show_bug.cgi?id=166713

Reviewed by Alex Christensen.

Source/WebCore:

QuickLook conversion was originally implemented by intercepting document loads at the
ResourceHandle level, with separate paths for NSURLConnection and CFURLConnection handles.
When QuickLook was ported to WebKit2, a third path was added in WebResourceLoader.

This change removes these three separate paths and implements a single conversion path in
SubresourceLoader, where QuickLook can intercept document loads regardless of the networking
API being used.

No change in behavior. Covered by existing tests.

  • loader/ResourceLoader.h: Removed override from didCreateQuickLookHandle() since this

function is no longer declared in ResourceHandleClient.

  • loader/SubresourceLoader.cpp:

(WebCore::SubresourceLoader::shouldCreateQuickLookHandleForResponse): Added a helper
function to check if a QuickLookHandle should be created for a response.
(WebCore::SubresourceLoader::didReceiveResponse): Created a QuickLookHandle if necessary
and stored it in the DocumentLoader.
(WebCore::SubresourceLoader::didReceiveData): If there is a QuickLookHandle, call
QuickLookHandle::didReceiveBuffer(), and return early if QuickLook is converting.
(WebCore::SubresourceLoader::didReceiveBuffer): Ditto for QuickLookHandle::didReceiveBuffer().
(WebCore::SubresourceLoader::didFinishLoading): Ditto for QuickLookHandle::didFinishLoading().
(WebCore::SubresourceLoader::didFail): If there is a QuickLookHandle, call QuickLookHandle::didFail().

  • loader/SubresourceLoader.h: Declared shouldCreateQuickLookHandleForResponse().
  • loader/ios/QuickLook.h: Removed declarations used by the ResourceHandles and declared new

functions used by SubresourceLoader.

  • loader/ios/QuickLook.mm:

(WebCore::QuickLookHandle::QuickLookHandle): Removed the NSURLConnection * parameter, since
we’d now always pass nil.
(WebCore::QuickLookHandle::create): Removed create() functions used by ResourceHandles.
(WebCore::QuickLookHandle::didReceiveData): Added. Copies the data into an NSData, wraps it
in an NSArray, and passes it to didReceiveDataArray().
(WebCore::QuickLookHandle::didReceiveBuffer): Added. Creates a NSArray of NSData from the
SharedBuffer and passes it to didReceiveDataArray().
(-[WebQuickLookHandleAsDelegate initWithConnectionDelegate:]): Deleted.
(-[WebQuickLookHandleAsDelegate connection:didReceiveDataArray:]): Deleted.
(-[WebQuickLookHandleAsDelegate connection:didReceiveData:lengthReceived:]): Deleted.
(-[WebQuickLookHandleAsDelegate connectionDidFinishLoading:]): Deleted.
(-[WebQuickLookHandleAsDelegate connection:didFailWithError:]): Deleted.
(-[WebQuickLookHandleAsDelegate detachHandle]): Deleted.
(WebCore::QuickLookHandle::cfResponse): Deleted.
(WebCore::QuickLookHandle::didReceiveDataArray): Passed dataArray to m_converter and m_client.

  • platform/SharedBuffer.h: Const-qualified createNSDataArray().
  • platform/cocoa/SharedBufferCocoa.mm:

(WebCore::SharedBuffer::createNSDataArray): Ditto.

  • platform/network/ResourceHandle.cpp: Stopped including QuickLook.h.
  • platform/network/ResourceHandle.h: Removed m_quickLook.

(WebCore::ResourceHandle::quickLookHandle): Deleted.

  • platform/network/ResourceHandleClient.h:

(WebCore::ResourceHandleClient::didCreateQuickLookHandle): Deleted.

  • platform/network/cf/SynchronousResourceHandleCFURLConnectionDelegate.cpp:

(WebCore::SynchronousResourceHandleCFURLConnectionDelegate::didReceiveResponse): Removed QuickLook code.
(WebCore::SynchronousResourceHandleCFURLConnectionDelegate::didReceiveData): Ditto.
(WebCore::SynchronousResourceHandleCFURLConnectionDelegate::didFinishLoading): Ditto.
(WebCore::SynchronousResourceHandleCFURLConnectionDelegate::didFail): Ditto.
(WebCore::SynchronousResourceHandleCFURLConnectionDelegate::didReceiveDataArray): Ditto.

  • platform/network/mac/ResourceHandleMac.mm:

(WebCore::ResourceHandle::setQuickLookHandle): Deleted.

  • platform/network/mac/WebCoreResourceHandleAsDelegate.mm:

(-[WebCoreResourceHandleAsDelegate connection:didReceiveResponse:]): Removed QuickLook code.
(-[WebCoreResourceHandleAsDelegate connection:didReceiveDataArray:]): Ditto.
(-[WebCoreResourceHandleAsDelegate connection:didReceiveData:lengthReceived:]): Ditto.
(-[WebCoreResourceHandleAsDelegate connectionDidFinishLoading:]): Ditto.
(-[WebCoreResourceHandleAsDelegate connection:didFailWithError:]): Ditto.

Source/WebKit2:

  • WebProcess/Network/WebResourceLoader.cpp:

(WebKit::WebResourceLoader::didReceiveResponse): Removed QuickLook code.
(WebKit::WebResourceLoader::didReceiveData): Ditto.
(WebKit::WebResourceLoader::didFinishResourceLoad): Ditto.
(WebKit::WebResourceLoader::didFailResourceLoad): Ditto.
(WebKit::WebResourceLoader::didReceiveResource): Ditto.

10:51 AM Changeset in webkit [210479] by aestes@apple.com
  • 2 edits in trunk/Tools

Another attempt to fix the Mac CMake build after r210467.

  • DumpRenderTree/PlatformMac.cmake:
  • WebKitTestRunner/PlatformMac.cmake:
10:30 AM Changeset in webkit [210478] by aestes@apple.com
  • 1 edit in trunk/Source/WebCore/testing/cocoa/WebArchiveDumpSupport.h

Attempt to fix the Mac CMake build after r210467.

  • testing/cocoa/WebArchiveDumpSupport.h:
5:55 AM Changeset in webkit [210477] by aestes@apple.com
  • 1 edit in trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj

Attempt to fix the iOS Production build after r210467.

  • WebCore.xcodeproj/project.pbxproj:

Jan 6, 2017:

11:53 PM Changeset in webkit [210476] by sbarati@apple.com
  • 23 edits
    4 adds in trunk

Add a slice intrinsic to the DFG/FTL
https://bugs.webkit.org/show_bug.cgi?id=166707

Reviewed by Filip Pizlo.

JSTests:

  • stress/array-slice-intrinsic.js: Added.

(assert):
(shallowEq):
(runTest1):
(runTest2):

  • stress/array-slice-jettison-on-constructor-change.js: Added.

(assert):
(runTest1):
(runTest2):
(addRandomProperties):
(runTests):

  • stress/array-slice-osr-exit-2.js: Added.

(assert):
(Foo):
(shallowEq):
(runTest1):
(runTest2):
(addRandomProperties):
(runTests):

  • stress/array-slice-osr-exit.js: Added.

(assert):
(Foo):
(shallowEq):
(runTest1):
(runTest2):
(addRandomProperties):
(runTests):

Source/JavaScriptCore:

The gist of this patch is to inline Array.prototype.slice
into the DFG/FTL. The implementation in the DFG-backend
and FTLLowerDFGToB3 is just a straight forward implementation
of what the C function is doing. The more interesting bits
of this patch are setting up the proper watchpoints and conditions
in the executing code to prove that its safe to skip all of the
observable JS actions that Array.prototype.slice normally does.

We perform the following proofs:

  1. Array.prototype.constructor has not changed (via a watchpoint).
  2. That Array.prototype.constructor[Symbol.species] has not changed (via a watchpoint).
  3. The global object is not having a bad time.
  4. The array that is being sliced has an original array structure.
  5. Array.prototype/Object.prototype have not transitioned.

Conditions 1, 2, and 3 are strictly required.

4 is ensuring a couple things:

  1. That a "constructor" property hasn't been added to the array

we're slicing since we're supposed to perform a Get(array, "constructor").

  1. That we're not slicing an instance of a subclass of Array.

We could relax 4.1 in the future if we find other ways to test if
the incoming array hasn't changed the "constructor" property.

I'm seeing a 5% speedup on crypto-pbkdf2 and often a 1% speedup on
the total benchmark (the results are sometimes noisy).

  • bytecode/ExitKind.cpp:

(JSC::exitKindToString):

  • bytecode/ExitKind.h:
  • dfg/DFGAbstractInterpreterInlines.h:

(JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):

  • dfg/DFGByteCodeParser.cpp:

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

  • dfg/DFGClobberize.h:

(JSC::DFG::clobberize):

  • dfg/DFGDoesGC.cpp:

(JSC::DFG::doesGC):

  • dfg/DFGFixupPhase.cpp:

(JSC::DFG::FixupPhase::fixupNode):

  • dfg/DFGNode.h:

(JSC::DFG::Node::hasHeapPrediction):
(JSC::DFG::Node::hasArrayMode):

  • dfg/DFGNodeType.h:
  • dfg/DFGPredictionPropagationPhase.cpp:
  • dfg/DFGSafeToExecute.h:

(JSC::DFG::safeToExecute):

  • dfg/DFGSpeculativeJIT.cpp:

(JSC::DFG::SpeculativeJIT::compileArraySlice):

  • dfg/DFGSpeculativeJIT.h:
  • dfg/DFGSpeculativeJIT32_64.cpp:

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

  • dfg/DFGSpeculativeJIT64.cpp:

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

  • ftl/FTLCapabilities.cpp:

(JSC::FTL::canCompile):

  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::compileNode):
(JSC::FTL::DFG::LowerDFGToB3::compileArraySlice):

  • jit/AssemblyHelpers.cpp:

(JSC::AssemblyHelpers::emitLoadStructure):

  • runtime/ArrayPrototype.cpp:

(JSC::ArrayPrototype::finishCreation):
(JSC::speciesWatchpointIsValid):
(JSC::speciesConstructArray):
(JSC::arrayProtoFuncSlice):
(JSC::arrayProtoPrivateFuncConcatMemcpy):
(JSC::ArrayPrototype::initializeSpeciesWatchpoint):
(JSC::ArrayPrototypeAdaptiveInferredPropertyWatchpoint::handleFire):
(JSC::speciesWatchpointsValid): Deleted.
(JSC::ArrayPrototype::attemptToInitializeSpeciesWatchpoint): Deleted.

  • runtime/ArrayPrototype.h:

(JSC::ArrayPrototype::speciesWatchpointStatus): Deleted.
(): Deleted.

  • runtime/Intrinsic.h:
  • runtime/JSGlobalObject.cpp:

(JSC::JSGlobalObject::JSGlobalObject):
(JSC::JSGlobalObject::init):

  • runtime/JSGlobalObject.h:

(JSC::JSGlobalObject::arraySpeciesWatchpoint):

11:42 PM Changeset in webkit [210475] by dbates@webkit.org
  • 2 edits in trunk/Source/WebKit2

Attempt to fix the EFL build following <http://trac.webkit.org/changeset/210461>
(https://bugs.webkit.org/show_bug.cgi?id=166781)

  • UIProcess/API/C/WKWebsitePolicies.cpp:

(WKWebsitePoliciesGetAutoplayPolicy): Invoke ASSERT_NOT_REACHED() and return kWKWebsiteAutoplayPolicyUseHeuristics
if the specified policy is not covered by a switch case.
(WKWebsitePoliciesSetAutoplayPolicy): Substituted "return" for "break" in each switch case and
invoke ASSERT_NOT_REACHED() if the specified policy is not covered by a switch case.

11:14 PM Changeset in webkit [210474] by dbates@webkit.org
  • 7 edits in trunk/Source/WebCore

Ensure navigation only allowed for documents not in the page cache
https://bugs.webkit.org/show_bug.cgi?id=166773
<rdar://problem/29762809>

Reviewed by Brent Fulgham.

It is wise to ensure that navigation is only allowed when initiated from a document that
is not in- or about to be put in- the page cache. Such a navigation would surprise a
person that had navigated away from the initiating document among other issues.

  • dom/Document.cpp:

(WebCore::Document::canNavigate): Only allow navigation if the document is not in the
page cache.

  • html/HTMLAnchorElement.cpp:

(WebCore::HTMLAnchorElement::handleClick): Ditto.

  • html/HTMLLinkElement.cpp:

(WebCore::HTMLLinkElement::handleClick): Ditto.

  • loader/FrameLoader.cpp:

(WebCore::FrameLoader::urlSelected): Assert triggering event's document is not in the
page cache.
(WebCore::FrameLoader::submitForm): Allow submission if the document is not in the
page cache.
(WebCore::FrameLoader::loadFrameRequest): Assert triggering event's document is not in
the page cache.

  • mathml/MathMLElement.cpp:

(WebCore::MathMLElement::defaultEventHandler): Only allow navigation if the document is
not in the page cache.

  • svg/SVGAElement.cpp:

(WebCore::SVGAElement::defaultEventHandler): Ditto.

11:12 PM Changeset in webkit [210473] by jer.noble@apple.com
  • 2 edits in trunk/Source/WebCore

Crash in WebCore::MediaPlayerPrivateMediaSourceAVFObjC::sizeWillChangeAtTime(const MediaTime&, const FloatSize&)::block_invoke
https://bugs.webkit.org/show_bug.cgi?id=166738

Reviewed by Eric Carlson.

AVFoundation can potentially call the same boundary time observer multiple times, and
in that case, it's possible that the observer queue will be empty when we attempt
to remove the first item from the queue. There's an ASSERT() in Deque for this case,
but we need to explicitly protect against this case.

Drive-by fix: Explicitly unregister the observer before releasing it.

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

(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::sizeWillChangeAtTime):

10:53 PM Changeset in webkit [210472] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore

REGRESSION(r208886) Web Inspector: Toggling CSS Properties in Styles Sidebar (comment / uncomment)
https://bugs.webkit.org/show_bug.cgi?id=166786
<rdar://problem/29767412>

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2017-01-06
Reviewed by Brian Burg.

  • inspector/InspectorStyleSheet.cpp:

(WebCore::InspectorStyle::populateAllProperties):
Match earlier behavior and don't send the frontend information about
disabled (commented out) properties. Follow-up later to send this
information when implementing proper handling of them in the frontend.

10:52 PM Changeset in webkit [210471] by Chris Dumez
  • 2 edits in trunk/LayoutTests/imported/w3c

Unreviewed, rebaseline W3C test after r210468.

The test now fails differently due the the behavior change in r210468.
The test fails because we do not support History.scrollRestoration.

  • web-platform-tests/html/browsers/browsing-the-web/history-traversal/persisted-user-state-restoration/scroll-restoration-fragment-scrolling-cross-origin-expected.txt:
10:19 PM Changeset in webkit [210470] by weinig@apple.com
  • 6 edits in trunk/Source/WebCore

[WebIDL] Remove custom bindings from CanvasRenderingContext2D
https://bugs.webkit.org/show_bug.cgi?id=166793

Reviewed by Darin Adler.

  • WebCore.xcodeproj/project.pbxproj:

Move JSCanvasRenderingContext2DCustom.cpp to the GC only group.

  • bindings/js/JSCanvasRenderingContext2DCustom.cpp:

(WebCore::toJS): Deleted.
(WebCore::toHTMLCanvasStyle): Deleted.
(WebCore::JSCanvasRenderingContext2D::strokeStyle): Deleted.
(WebCore::JSCanvasRenderingContext2D::setStrokeStyle): Deleted.
(WebCore::JSCanvasRenderingContext2D::fillStyle): Deleted.
(WebCore::JSCanvasRenderingContext2D::setFillStyle): Deleted.
Remove non-GC related custom bindings.

  • html/canvas/CanvasRenderingContext2D.cpp:

(WebCore::CanvasRenderingContext2D::setStrokeStyle):
(WebCore::CanvasRenderingContext2D::setFillStyle):
(WebCore::toStyle):
(WebCore::CanvasRenderingContext2D::strokeStyle):
(WebCore::CanvasRenderingContext2D::fillStyle):

  • html/canvas/CanvasRenderingContext2D.h:
  • html/canvas/CanvasRenderingContext2D.idl:

Made existing setStrokeStyle/setFillStyle functions (which take CanvasStyle's)
private, and implemented new ones that operate on Variants, matching the spec.

9:23 PM Changeset in webkit [210469] by Darin Adler
  • 17 edits in trunk/Source/WebCore

Remove PassRefPtr use from "rendering" directory, other improvements
https://bugs.webkit.org/show_bug.cgi?id=166717

Reviewed by Sam Weinig.

  • css/CSSComputedStyleDeclaration.cpp:

(WebCore::shapePropertyValue): Use auto.

  • css/CSSFilterImageValue.cpp:

(WebCore::CSSFilterImageValue::image): Use auto. Pass references.
(WebCore::CSSFilterImageValue::filterImageChanged): Use modern for loop.

  • css/StyleBuilderConverter.h:

(WebCore::StyleBuilderConverter::convertShapeValue): Use overloaded
ShapeValue::create function instead of differently named functions.

  • page/animation/CSSPropertyAnimation.cpp:

(WebCore::blendFunc): Ditto.

  • platform/graphics/filters/Filter.h: Added a protected constructor that takes

a filter resolution.

  • rendering/FilterEffectRenderer.cpp:

(WebCore::FilterEffectRenderer::FilterEffectRenderer): Use new constructor so
we don't have to call setFilterResolution and can initialize m_sourceGraphic.
(WebCore::FilterEffectRenderer::create): Moved here from the header.
(WebCore::FilterEffectRenderer::buildReferenceFilter): Take references and not
PssRefPtr. Use auto and references.
(WebCore::FilterEffectRenderer::build): Take a reference. Updated to work with
references rather than pointer. Use auto.
(WebCore::FilterEffectRenderer::allocateBackingStoreIfNeeded): Use early return.
(WebCore::FilterEffectRenderer::clearIntermediateResults): Use modern for loop.
(WebCore::FilterEffectRenderer::apply): Use references.
(WebCore::FilterEffectRenderer::output): Moved here from header.
(WebCore::FilterEffectRenderer::setMaxEffectRects): Moved here from header.
(WebCore::FilterEffectRenderer::outputRect): Moved here from header.
(WebCore::FilterEffectRendererHelper::prepareFilterEffect): Take references.
(WebCore::FilterEffectRendererHelper::beginFilterEffect): Use auto and references.
(WebCore::FilterEffectRendererHelper::applyFilterEffect): Ditto.

  • rendering/FilterEffectRenderer.h: Updated for the above changes. Made a lot more

things private.

  • rendering/RenderLayer.cpp:

(WebCore::RenderLayer::filterPainter): Added. Helper so setupFilters does not
have to do things twice.
(WebCore::RenderLayer::hasFilterThatIsPainting): Updated to call filterPainter.
(WebCore::RenderLayer::setupFilters): Ditto.
(WebCore::RenderLayer::calculateClipRects): Pass reference.

  • rendering/RenderLayer.h: Updated for the above changes.
  • rendering/style/ContentData.cpp:

(WebCore::ContentData::clone): Use auto.
(WebCore::ImageContentData::createContentRenderer): Updated for reference.

  • rendering/style/ContentData.h: Use Ref&& instead of PassRefPtr. Made more

things private.

  • rendering/style/NinePieceImage.cpp:

(WebCore::NinePieceImage::defaultData): Made this a static member so it can
get at the now-private class NinePieceImage::Data.
(WebCore::NinePieceImage::NinePieceImage): Use RefPtr&& instead of PassRefPtr.
Use construction instead of calling m_data.access() over and over again.
(WebCore::NinePieceImage::Data::Data): Renamed from NinePieceImageData.
Moved initialization to class definition. Added a new overload for the normal
creation case.
(WebCore::NinePieceImage::Data::create): Ditto.
(WebCore::NinePieceImage::Data::copy): Ditto.
(WebCore::NinePieceImage::Data::operator==): Ditto.

  • rendering/style/NinePieceImage.h: Cut down on includes. Moved the class

named NinePieceImageData in to become the private struct NinePieceImage::Data.

  • rendering/style/RenderStyle.cpp:

(WebCore::RenderStyle::setContent): Pass Ref&& instead of RefPtr&& when
creating ImageContentData.

  • rendering/style/ShapeValue.cpp:

(WebCore::ShapeValue::isImageValid): Tighten up by using data member directly
and using a local variabel.
(WebCore::pointersOrValuesEqual): Deleted.
(WebCore::ShapeValue::operator==): Use arePointingToEqualData instead the
above deleted function template. Wrote as a single return statement for clarity.

  • rendering/style/ShapeValue.h: Changed all the create function names to just

create, using overloading instead of separate names. Use Ref&& instead of PassRefPtr.
Removed unused constructor that took a type but no data.

8:02 PM Changeset in webkit [210468] by Chris Dumez
  • 8 edits
    3 adds in trunk

Regression(r189230): DOM Callbacks may use wrong global object
https://bugs.webkit.org/show_bug.cgi?id=166784

Reviewed by Mark Lam.

Source/WebCore:

DOM Callbacks could end up using the wrong global object after r189230
because we were getting the globalObject from the callback object
instead of the one at the point the callback object was passed in by
JavaScript. This patch fixes the issue.

Test: fast/frames/frame-window-as-callback.html

  • bindings/js/JSCallbackData.cpp:

(WebCore::JSCallbackData::invokeCallback):

  • bindings/js/JSCallbackData.h:

(WebCore::JSCallbackData::globalObject):
(WebCore::JSCallbackData::JSCallbackData):
(WebCore::JSCallbackDataStrong::JSCallbackDataStrong):
(WebCore::JSCallbackDataStrong::callback):
(WebCore::JSCallbackDataStrong::invokeCallback):
(WebCore::JSCallbackDataWeak::JSCallbackDataWeak):
(WebCore::JSCallbackDataWeak::callback):
(WebCore::JSCallbackDataWeak::invokeCallback):

  • bindings/scripts/CodeGeneratorJS.pm:

(GenerateCallbackImplementationContent):

LayoutTests:

Add layout test coverage.

  • fast/frames/frame-window-as-callback-expected.txt: Added.
  • fast/frames/frame-window-as-callback.html: Added.
  • fast/frames/resources/wrong-global-object.html: Added.
7:49 PM Changeset in webkit [210467] by aestes@apple.com
  • 12 edits
    1 copy
    2 adds
    4 deletes in trunk

[Cocoa] Consolidate duplicate copies of WebArchiveDumpSupport in DRT and WKTR into WebCoreTestSupport
https://bugs.webkit.org/show_bug.cgi?id=166789

Reviewed by Alex Christensen.

Source/WebCore:

There were duplicate implementations of WebArchiveDumpSupport in DumpRenderTree and
WebKitTestRunner. This change consolidates these into a single implementation in
WebCoreTestSupport.

  • PlatformMac.cmake: Added WebArchiveDumpSupport.mm to WebCoreTestSupport.
  • WebCore.xcodeproj/project.pbxproj: Ditto. Also made WebArchiveDumpSupport.h a Private header.
  • platform/spi/cf/CFNetworkSPI.h: Moved CFNetwork forward declarations from

WebArchiveDumpSupport to here.

  • testing/cocoa/WebArchiveDumpSupport.h: Added.
  • testing/cocoa/WebArchiveDumpSupport.mm: Merged WebArchiveDumpSupport.cpp and

WebArchiveDumpSupport{Cocoa,Mac}.mm into a single file.

Tools:

  • DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj:
  • DumpRenderTree/PlatformMac.cmake:
  • DumpRenderTree/cf/WebArchiveDumpSupport.cpp: Removed.
  • DumpRenderTree/cf/WebArchiveDumpSupport.h: Removed.
  • DumpRenderTree/mac/DumpRenderTree.mm:

Called WebCoreTestSupport::createXMLStringFromWebArchiveData() instead of
createXMLStringFromWebArchiveData().

  • DumpRenderTree/mac/WebArchiveDumpSupportMac.mm: Removed.
  • WebKitTestRunner/Configurations/Base.xcconfig:

Added $(BUILT_PRODUCTS_DIR)/WebCoreTestSupport to HEADER_SEARCH_PATHS.

  • WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:

(WTR::InjectedBundlePage::dumpDOMAsWebArchive):
Called WebCoreTestSupport::createXMLStringFromWebArchiveData() instead of
createXMLStringFromWebArchiveData().

  • WebKitTestRunner/InjectedBundle/cocoa/WebArchiveDumpSupportCocoa.mm: Removed.
  • WebKitTestRunner/PlatformMac.cmake:
  • WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj:
  • WebKitTestRunner/cf/WebArchiveDumpSupport.h: Removed.
6:59 PM Changeset in webkit [210466] by timothy_horton@apple.com
  • 8 edits in trunk

Minor cleanups to IndentOutdentCommand and related code
https://bugs.webkit.org/show_bug.cgi?id=166791

Reviewed by Simon Fraser.

Source/WebCore:

  • editing/IndentOutdentCommand.cpp:

(WebCore::IndentOutdentCommand::IndentOutdentCommand):
(WebCore::IndentOutdentCommand::outdentRegion):

  • editing/IndentOutdentCommand.h:

(WebCore::IndentOutdentCommand::create):
Remove the unused m_marginInPixels and fix the copyright header.

Tools:

  • WebEditingTester/EditingOperations.m:

(editingOperations):
Add the outdent operation to WebEditingTester.

LayoutTests:

  • editing/execCommand/19653-1-expected.txt:
  • editing/execCommand/19653-1.html:

Adjust this indenting test. It had a mislabeled test case (it outdents, not indents),
and also was copy-pasted wrong (it wasn't indented in the first place).

However, since this technically reduces test coverage, keep the existing
(but now correctly labeled) test case, since it caught a bug in code I was changing.

6:41 PM Changeset in webkit [210465] by achristensen@apple.com
  • 3 edits in trunk/Source/WebCore

Fix WinCairo build after r210319.
https://bugs.webkit.org/show_bug.cgi?id=166635

  • DerivedSources.cpp:

A toJS call was ambiguous, but only if the generated IndexedDB bindings are compiled all-in-one in DerivedSources.cpp.
Compiling these few files separately (which happens automatically in the CMake build) fixes the build and won't increase
the total object files beyond MSVC's current 2GB limit.

  • bindings/js/JSWebGLRenderingContextBaseCustom.cpp:

(WebCore::JSWebGLRenderingContextBaseOwner::isReachableFromOpaqueRoots):
Unknown was an ambiguous symbol. It's also defined in winioctl.h.

6:13 PM Changeset in webkit [210464] by matthew_hanson@apple.com
  • 1 copy in tags/Safari-603.1.19

New tag.

5:41 PM Changeset in webkit [210463] by commit-queue@webkit.org
  • 1 edit
    2 moves in trunk/Tools

Create a plan and a patch files for MotionMark and delete the Animometer's ones
https://bugs.webkit.org/show_bug.cgi?id=166785

Patch by Said Abou-Hallawa <sabouhallawa@apple.com> on 2017-01-06
Reviewed by Ryosuke Niwa.

  • Scripts/webkitpy/benchmark_runner/data/patches/MotionMark.patch: Renamed from Tools/Scripts/webkitpy/benchmark_runner/data/patches/Animometer.patch.
  • Scripts/webkitpy/benchmark_runner/data/plans/motionmark.plan: Renamed from Tools/Scripts/webkitpy/benchmark_runner/data/plans/animometer.plan.
5:20 PM Changeset in webkit [210462] by matthew_hanson@apple.com
  • 3 edits in tags/Safari-603.1.18.0.1/Source/JavaScriptCore

Merge r210458. rdar://problem/29761198

5:06 PM Changeset in webkit [210461] by commit-queue@webkit.org
  • 7 edits in trunk/Source/WebKit2

Add infrastructure for sending autoplay website policies to WebKit
https://bugs.webkit.org/show_bug.cgi?id=166781

Patch by Matt Rajca <mrajca@apple.com> on 2017-01-06
Reviewed by Alex Christensen.

  • Shared/WebsitePolicies.h:

(WebKit::WebsitePolicies::encode):
(WebKit::WebsitePolicies::decode):

  • UIProcess/API/APIWebsitePolicies.h:
  • UIProcess/API/C/WKWebsitePolicies.cpp:

(WKWebsitePoliciesGetAutoplayPolicy):
(WKWebsitePoliciesSetAutoplayPolicy):

  • UIProcess/API/C/WKWebsitePolicies.h:
  • UIProcess/API/Cocoa/_WKWebsitePolicies.h:
  • UIProcess/API/Cocoa/_WKWebsitePolicies.mm:

(-[_WKWebsitePolicies setAutoplayPolicy:]):
(-[_WKWebsitePolicies autoplayPolicy]):

4:34 PM Changeset in webkit [210460] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebInspectorUI

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

Introduced a regression commenting out individual properties
(Requested by JoePeck on #webkit).

Reverted changeset:

"Web Inspector: Styles sidebar: Uncommenting CSS rules of
pseudo-elements doesn't work"
https://bugs.webkit.org/show_bug.cgi?id=165831
http://trac.webkit.org/changeset/210110

3:38 PM Changeset in webkit [210459] by commit-queue@webkit.org
  • 1 edit
    108 copies
    18 adds
    1 delete in trunk/PerformanceTests

Rename the directory and the files of MotionMark from Animometer to MotionMark
https://bugs.webkit.org/show_bug.cgi?id=166659

Patch by Said Abou-Hallawa <sabouhallawa@apple.com> on 2017-01-06
Reviewed by Jon Lee.

Rename the directory and the files of the benchmark to its new name.

  • MotionMark/developer.html: Renamed from PerformanceTests/Animometer/developer.html.
  • MotionMark/index.html: Renamed from PerformanceTests/Animometer/index.html.
  • MotionMark/resources/debug-runner/d3.min.js: Renamed from PerformanceTests/Animometer/resources/debug-runner/d3.min.js.
  • MotionMark/resources/debug-runner/graph.js: Renamed from PerformanceTests/Animometer/resources/debug-runner/graph.js.
  • MotionMark/resources/debug-runner/motionmark.css: Renamed from PerformanceTests/Animometer/resources/debug-runner/animometer.css.
  • MotionMark/resources/debug-runner/motionmark.js: Renamed from PerformanceTests/Animometer/resources/debug-runner/animometer.js.
  • MotionMark/resources/debug-runner/tests.js: Renamed from PerformanceTests/Animometer/resources/debug-runner/tests.js.
  • MotionMark/resources/extensions.js: Renamed from PerformanceTests/Animometer/resources/extensions.js.
  • MotionMark/resources/runner/benchmark-runner.js: Renamed from PerformanceTests/Animometer/resources/runner/benchmark-runner.js.
  • MotionMark/resources/runner/crystal.svg: Renamed from PerformanceTests/Animometer/resources/runner/crystal.svg.
  • MotionMark/resources/runner/lines.svg: Renamed from PerformanceTests/Animometer/resources/runner/lines.svg.
  • MotionMark/resources/runner/logo.svg: Renamed from PerformanceTests/Animometer/resources/runner/logo.svg.
  • MotionMark/resources/runner/motionmark.css: Renamed from PerformanceTests/Animometer/resources/runner/animometer.css.
  • MotionMark/resources/runner/motionmark.js: Renamed from PerformanceTests/Animometer/resources/runner/animometer.js.
  • MotionMark/resources/runner/tests.js: Renamed from PerformanceTests/Animometer/resources/runner/tests.js.
  • MotionMark/resources/statistics.js: Renamed from PerformanceTests/Animometer/resources/statistics.js.
  • MotionMark/resources/strings.js: Renamed from PerformanceTests/Animometer/resources/strings.js.
  • MotionMark/tests/3d/resources/webgl.js: Renamed from PerformanceTests/Animometer/tests/3d/resources/webgl.js.
  • MotionMark/tests/3d/webgl.html: Renamed from PerformanceTests/Animometer/tests/3d/webgl.html.
  • MotionMark/tests/bouncing-particles/bouncing-canvas-images.html: Renamed from PerformanceTests/Animometer/tests/bouncing-particles/bouncing-canvas-images.html.
  • MotionMark/tests/bouncing-particles/bouncing-canvas-shapes.html: Renamed from PerformanceTests/Animometer/tests/bouncing-particles/bouncing-canvas-shapes.html.
  • MotionMark/tests/bouncing-particles/bouncing-css-images.html: Renamed from PerformanceTests/Animometer/tests/bouncing-particles/bouncing-css-images.html.
  • MotionMark/tests/bouncing-particles/bouncing-css-shapes.html: Renamed from PerformanceTests/Animometer/tests/bouncing-particles/bouncing-css-shapes.html.
  • MotionMark/tests/bouncing-particles/bouncing-svg-images.html: Renamed from PerformanceTests/Animometer/tests/bouncing-particles/bouncing-svg-images.html.
  • MotionMark/tests/bouncing-particles/bouncing-svg-shapes.html: Renamed from PerformanceTests/Animometer/tests/bouncing-particles/bouncing-svg-shapes.html.
  • MotionMark/tests/bouncing-particles/bouncing-tagged-images.html: Renamed from PerformanceTests/Animometer/tests/bouncing-particles/bouncing-tagged-images.html.
  • MotionMark/tests/bouncing-particles/resources/bouncing-canvas-images.js: Renamed from PerformanceTests/Animometer/tests/bouncing-particles/resources/bouncing-canvas-images.js.
  • MotionMark/tests/bouncing-particles/resources/bouncing-canvas-particles.js: Renamed from PerformanceTests/Animometer/tests/bouncing-particles/resources/bouncing-canvas-particles.js.
  • MotionMark/tests/bouncing-particles/resources/bouncing-canvas-shapes.js: Renamed from PerformanceTests/Animometer/tests/bouncing-particles/resources/bouncing-canvas-shapes.js.
  • MotionMark/tests/bouncing-particles/resources/bouncing-css-images.js: Renamed from PerformanceTests/Animometer/tests/bouncing-particles/resources/bouncing-css-images.js.
  • MotionMark/tests/bouncing-particles/resources/bouncing-css-shapes.js: Renamed from PerformanceTests/Animometer/tests/bouncing-particles/resources/bouncing-css-shapes.js.
  • MotionMark/tests/bouncing-particles/resources/bouncing-svg-images.js: Renamed from PerformanceTests/Animometer/tests/bouncing-particles/resources/bouncing-svg-images.js.
  • MotionMark/tests/bouncing-particles/resources/bouncing-svg-particles.js: Renamed from PerformanceTests/Animometer/tests/bouncing-particles/resources/bouncing-svg-particles.js.
  • MotionMark/tests/bouncing-particles/resources/bouncing-svg-shapes.js: Renamed from PerformanceTests/Animometer/tests/bouncing-particles/resources/bouncing-svg-shapes.js.
  • MotionMark/tests/bouncing-particles/resources/bouncing-tagged-images.js: Renamed from PerformanceTests/Animometer/tests/bouncing-particles/resources/bouncing-tagged-images.js.
  • MotionMark/tests/bouncing-particles/resources/image1.jpg: Renamed from PerformanceTests/Animometer/tests/bouncing-particles/resources/image1.jpg.
  • MotionMark/tests/bouncing-particles/resources/image2.jpg: Renamed from PerformanceTests/Animometer/tests/bouncing-particles/resources/image2.jpg.
  • MotionMark/tests/bouncing-particles/resources/image3.jpg: Renamed from PerformanceTests/Animometer/tests/bouncing-particles/resources/image3.jpg.
  • MotionMark/tests/bouncing-particles/resources/image4.jpg: Renamed from PerformanceTests/Animometer/tests/bouncing-particles/resources/image4.jpg.
  • MotionMark/tests/bouncing-particles/resources/image5.jpg: Renamed from PerformanceTests/Animometer/tests/bouncing-particles/resources/image5.jpg.
  • MotionMark/tests/dom/compositing-transforms.html: Renamed from PerformanceTests/Animometer/tests/dom/compositing-transforms.html.
  • MotionMark/tests/dom/focus.html: Renamed from PerformanceTests/Animometer/tests/dom/focus.html.
  • MotionMark/tests/dom/leaves.html: Renamed from PerformanceTests/Animometer/tests/dom/leaves.html.
  • MotionMark/tests/dom/particles.html: Renamed from PerformanceTests/Animometer/tests/dom/particles.html.
  • MotionMark/tests/dom/resources/compositing-transforms.js: Renamed from PerformanceTests/Animometer/tests/dom/resources/compositing-transforms.js.
  • MotionMark/tests/dom/resources/dom-particles.js: Renamed from PerformanceTests/Animometer/tests/dom/resources/dom-particles.js.
  • MotionMark/tests/dom/resources/focus.js: Renamed from PerformanceTests/Animometer/tests/dom/resources/focus.js.
  • MotionMark/tests/dom/resources/leaves.js: Renamed from PerformanceTests/Animometer/tests/dom/resources/leaves.js.
  • MotionMark/tests/master/canvas-stage.html: Renamed from PerformanceTests/Animometer/tests/master/canvas-stage.html.
  • MotionMark/tests/master/focus.html: Renamed from PerformanceTests/Animometer/tests/master/focus.html.
  • MotionMark/tests/master/image-data.html: Renamed from PerformanceTests/Animometer/tests/master/image-data.html.
  • MotionMark/tests/master/leaves.html: Renamed from PerformanceTests/Animometer/tests/master/leaves.html.
  • MotionMark/tests/master/multiply.html: Renamed from PerformanceTests/Animometer/tests/master/multiply.html.
  • MotionMark/tests/master/resources/canvas-stage.js: Renamed from PerformanceTests/Animometer/tests/master/resources/canvas-stage.js.
  • MotionMark/tests/master/resources/canvas-tests.js: Renamed from PerformanceTests/Animometer/tests/master/resources/canvas-tests.js.
  • MotionMark/tests/master/resources/compass.svg: Renamed from PerformanceTests/Animometer/tests/master/resources/compass.svg.
  • MotionMark/tests/master/resources/compass100.png: Renamed from PerformanceTests/Animometer/tests/master/resources/compass100.png.
  • MotionMark/tests/master/resources/console.svg: Renamed from PerformanceTests/Animometer/tests/master/resources/console.svg.
  • MotionMark/tests/master/resources/console100.png: Renamed from PerformanceTests/Animometer/tests/master/resources/console100.png.
  • MotionMark/tests/master/resources/contribute.svg: Renamed from PerformanceTests/Animometer/tests/master/resources/contribute.svg.
  • MotionMark/tests/master/resources/contribute100.png: Renamed from PerformanceTests/Animometer/tests/master/resources/contribute100.png.
  • MotionMark/tests/master/resources/debugger.svg: Renamed from PerformanceTests/Animometer/tests/master/resources/debugger.svg.
  • MotionMark/tests/master/resources/debugger100.png: Renamed from PerformanceTests/Animometer/tests/master/resources/debugger100.png.
  • MotionMark/tests/master/resources/focus.js: Renamed from PerformanceTests/Animometer/tests/master/resources/focus.js.
  • MotionMark/tests/master/resources/image-data.js: Renamed from PerformanceTests/Animometer/tests/master/resources/image-data.js.
  • MotionMark/tests/master/resources/inspector.svg: Renamed from PerformanceTests/Animometer/tests/master/resources/inspector.svg.
  • MotionMark/tests/master/resources/inspector100.png: Renamed from PerformanceTests/Animometer/tests/master/resources/inspector100.png.
  • MotionMark/tests/master/resources/layout.svg: Renamed from PerformanceTests/Animometer/tests/master/resources/layout.svg.
  • MotionMark/tests/master/resources/layout100.png: Renamed from PerformanceTests/Animometer/tests/master/resources/layout100.png.
  • MotionMark/tests/master/resources/leaves.js: Renamed from PerformanceTests/Animometer/tests/master/resources/leaves.js.
  • MotionMark/tests/master/resources/multiply.js: Renamed from PerformanceTests/Animometer/tests/master/resources/multiply.js.
  • MotionMark/tests/master/resources/particles.js: Renamed from PerformanceTests/Animometer/tests/master/resources/particles.js.
  • MotionMark/tests/master/resources/performance.svg: Renamed from PerformanceTests/Animometer/tests/master/resources/performance.svg.
  • MotionMark/tests/master/resources/performance100.png: Renamed from PerformanceTests/Animometer/tests/master/resources/performance100.png.
  • MotionMark/tests/master/resources/script.svg: Renamed from PerformanceTests/Animometer/tests/master/resources/script.svg.
  • MotionMark/tests/master/resources/script100.png: Renamed from PerformanceTests/Animometer/tests/master/resources/script100.png.
  • MotionMark/tests/master/resources/shortcuts.svg: Renamed from PerformanceTests/Animometer/tests/master/resources/shortcuts.svg.
  • MotionMark/tests/master/resources/shortcuts100.png: Renamed from PerformanceTests/Animometer/tests/master/resources/shortcuts100.png.
  • MotionMark/tests/master/resources/standards.svg: Renamed from PerformanceTests/Animometer/tests/master/resources/standards.svg.
  • MotionMark/tests/master/resources/standards100.png: Renamed from PerformanceTests/Animometer/tests/master/resources/standards100.png.
  • MotionMark/tests/master/resources/storage.svg: Renamed from PerformanceTests/Animometer/tests/master/resources/storage.svg.
  • MotionMark/tests/master/resources/storage100.png: Renamed from PerformanceTests/Animometer/tests/master/resources/storage100.png.
  • MotionMark/tests/master/resources/styles.svg: Renamed from PerformanceTests/Animometer/tests/master/resources/styles.svg.
  • MotionMark/tests/master/resources/styles100.png: Renamed from PerformanceTests/Animometer/tests/master/resources/styles100.png.
  • MotionMark/tests/master/resources/svg-particles.js: Renamed from PerformanceTests/Animometer/tests/master/resources/svg-particles.js.
  • MotionMark/tests/master/resources/text.js: Renamed from PerformanceTests/Animometer/tests/master/resources/text.js.
  • MotionMark/tests/master/resources/timeline.svg: Renamed from PerformanceTests/Animometer/tests/master/resources/timeline.svg.
  • MotionMark/tests/master/resources/timeline100.png: Renamed from PerformanceTests/Animometer/tests/master/resources/timeline100.png.
  • MotionMark/tests/master/svg-particles.html: Renamed from PerformanceTests/Animometer/tests/master/svg-particles.html.
  • MotionMark/tests/master/text.html: Renamed from PerformanceTests/Animometer/tests/master/text.html.
  • MotionMark/tests/resources/main.js: Renamed from PerformanceTests/Animometer/tests/resources/main.js.
  • MotionMark/tests/resources/math.js: Renamed from PerformanceTests/Animometer/tests/resources/math.js.
  • MotionMark/tests/resources/stage.css: Renamed from PerformanceTests/Animometer/tests/resources/stage.css.
  • MotionMark/tests/resources/star.svg: Renamed from PerformanceTests/Animometer/tests/resources/star.svg.
  • MotionMark/tests/resources/yin-yang.png: Renamed from PerformanceTests/Animometer/tests/resources/yin-yang.png.
  • MotionMark/tests/resources/yin-yang.svg: Renamed from PerformanceTests/Animometer/tests/resources/yin-yang.svg.
  • MotionMark/tests/simple/resources/simple-canvas-paths.js: Renamed from PerformanceTests/Animometer/tests/simple/resources/simple-canvas-paths.js.
  • MotionMark/tests/simple/resources/simple-canvas.js: Renamed from PerformanceTests/Animometer/tests/simple/resources/simple-canvas.js.
  • MotionMark/tests/simple/resources/tiled-canvas-image.js: Renamed from PerformanceTests/Animometer/tests/simple/resources/tiled-canvas-image.js.
  • MotionMark/tests/simple/simple-canvas-paths.html: Renamed from PerformanceTests/Animometer/tests/simple/simple-canvas-paths.html.
  • MotionMark/tests/simple/tiled-canvas-image.html: Renamed from PerformanceTests/Animometer/tests/simple/tiled-canvas-image.html.
  • MotionMark/tests/template/resources/template-canvas.js: Renamed from PerformanceTests/Animometer/tests/template/resources/template-canvas.js.
  • MotionMark/tests/template/resources/template-css.js: Renamed from PerformanceTests/Animometer/tests/template/resources/template-css.js.
  • MotionMark/tests/template/resources/template-svg.js: Renamed from PerformanceTests/Animometer/tests/template/resources/template-svg.js.
  • MotionMark/tests/template/template-canvas.html: Renamed from PerformanceTests/Animometer/tests/template/template-canvas.html.
  • MotionMark/tests/template/template-css.html: Renamed from PerformanceTests/Animometer/tests/template/template-css.html.
  • MotionMark/tests/template/template-svg.html: Renamed from PerformanceTests/Animometer/tests/template/template-svg.html.
3:38 PM Changeset in webkit [210458] by mark.lam@apple.com
  • 3 edits in trunk/Source/JavaScriptCore

The ObjC API's JSVirtualMachine's map tables need to be guarded by a lock.
https://bugs.webkit.org/show_bug.cgi?id=166778
<rdar://problem/29761198>

Reviewed by Filip Pizlo.

Now that we have a concurrent GC, access to JSVirtualMachine's
m_externalObjectGraph and m_externalRememberedSet need to be guarded by a lock
since both the GC marker thread and the mutator thread may access them at the
same time.

  • API/JSVirtualMachine.mm:

(-[JSVirtualMachine addExternalRememberedObject:]):
(-[JSVirtualMachine addManagedReference:withOwner:]):
(-[JSVirtualMachine removeManagedReference:withOwner:]):
(-[JSVirtualMachine externalDataMutex]):
(scanExternalObjectGraph):
(scanExternalRememberedSet):

  • API/JSVirtualMachineInternal.h:
  • Deleted externalObjectGraph method. There's no need to expose this.
3:30 PM Changeset in webkit [210457] by msaboff@apple.com
  • 3 edits
    1 add in trunk

@putByValDirect in Array.of and Array.from overwrites non-writable/configurable properties
https://bugs.webkit.org/show_bug.cgi?id=153486

Reviewed by Saam Barati.

JSTests:

New regression test.

  • stress/regress-153486.js: Added.

(shouldEqual):
(makeUnwriteableUnconfigurableObject):
(testArrayOf):
(testArrayFrom):
(runTest):

Source/JavaScriptCore:

Moved read only check in putDirect() to all paths.

  • runtime/SparseArrayValueMap.cpp:

(JSC::SparseArrayValueMap::putDirect):

3:29 PM Changeset in webkit [210456] by Alan Bujtas
  • 3 edits in trunk/Source/WebCore

Text highlight causes Yoon Gothic webfont to reflow.
https://bugs.webkit.org/show_bug.cgi?id=166753

Reviewed by Darin Adler.

Add word-break: keep-all; support for CJK and breaking NBSPs.

Add test later. Need to figure out what font file to use.

  • rendering/SimpleLineLayoutTextFragmentIterator.cpp:

(WebCore::SimpleLineLayout::TextFragmentIterator::Style::Style):
(WebCore::SimpleLineLayout::TextFragmentIterator::nextBreakablePosition): Use BreakingContext's helper functions
to figure out the next breakable position.
(WebCore::SimpleLineLayout::TextFragmentIterator::skipToNextPosition):

  • rendering/SimpleLineLayoutTextFragmentIterator.h:
12:46 PM Changeset in webkit [210455] by bshafiei@apple.com
  • 2 edits in tags/Safari-603.1.18.0.1/Source/JavaScriptCore

Merge r210444. rdar://problem/29906144

12:38 PM Changeset in webkit [210454] by bshafiei@apple.com
  • 5 edits in tags/Safari-603.1.18.0.1/Source

Versioning.

12:38 PM Changeset in webkit [210453] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Marking fast/text/variations/advances.html as failing on Sierra.
https://bugs.webkit.org/show_bug.cgi?id=166672

Unreviewed test gardening.

  • platform/mac/TestExpectations:
12:36 PM Changeset in webkit [210452] by bshafiei@apple.com
  • 1 copy in tags/Safari-603.1.18.0.1

New tag.

12:23 PM Changeset in webkit [210451] by fpizlo@apple.com
  • 10 edits in trunk

DeferGC::~DeferGC should be super cheap
https://bugs.webkit.org/show_bug.cgi?id=166626

Reviewed by Saam Barati.
JSTests:

  • stress/slow-path-generator-updating-current-node-dfg.js:
  • stress/unshift-array-storage.js:

Source/JavaScriptCore:


Right now, ~DeferGC requires running the collector's full collectIfNecessaryOrDefer()
hook, which is super big. Normally, that hook would only be called from GC slow paths,
so it ought to be possible to add complex logic to it. It benefits the GC algorithm to
make that code smart, not necessarily fast.

The right thing for it to do is to have ~DeferGC check a boolean to see if
collectIfNecessaryOrDefer() had previously deferred anything, and only call it if that
is true. That's what this patch does.

Unfortunately, this means that we lose the collectAccordingToDeferGCProbability mode,
which we used for two tests. Since I could only see two tests that used this mode, I
felt that it was better to enhance the GC than to keep the tests. I filed bug 166627 to
bring back something like that mode.

Although this patch does make some paths faster, its real goal is to ensure that bug
165963 can add more logic to collectIfNecessaryOrDefer() without introducing a big
regression. Until then, I wouldn't be surprised if this patch was a progression, but I'm
not betting on it.

  • heap/Heap.cpp:

(JSC::Heap::collectIfNecessaryOrDefer):
(JSC::Heap::decrementDeferralDepthAndGCIfNeededSlow):
(JSC::Heap::canCollect): Deleted.
(JSC::Heap::shouldCollectHeuristic): Deleted.
(JSC::Heap::shouldCollect): Deleted.
(JSC::Heap::collectAccordingToDeferGCProbability): Deleted.
(JSC::Heap::decrementDeferralDepthAndGCIfNeeded): Deleted.

  • heap/Heap.h:
  • heap/HeapInlines.h:

(JSC::Heap::incrementDeferralDepth):
(JSC::Heap::decrementDeferralDepth):
(JSC::Heap::decrementDeferralDepthAndGCIfNeeded):
(JSC::Heap::mayNeedToStop):
(JSC::Heap::stopIfNecessary):

  • runtime/Options.h:
12:17 PM Changeset in webkit [210450] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Skip editing/caret/emoji.html on ios-simulator since it relies on EventSender.keydown().

Unreviewed test gardening.

  • platform/ios-simulator/TestExpectations:
12:02 PM Changeset in webkit [210449] by commit-queue@webkit.org
  • 10 edits in trunk

Add some missing longhand properties to CSSComputedStyleDeclaration and fix default values
https://bugs.webkit.org/show_bug.cgi?id=166674
<rdar://problem/6026159>

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2017-01-06
Reviewed by Darin Adler.

Source/WebCore:

  • css/CSSComputedStyleDeclaration.cpp:

Add some missing longhand properties to the list of all longhand properties.

(WebCore::counterToCSSValue):
The default value for counter-increment and counter-reset should be "none"
not the empty string.

LayoutTests:

  • fast/css/getComputedStyle/computed-style-font-family.html:

Skip font-variation-settings which is only available if the feature flag is enabled.

  • fast/css/getComputedStyle/counterIncrement-without-counter-expected.txt:
  • fast/css/getComputedStyle/counterIncrement-without-counter.html:

Fix the default value to be "none" instead of the empty string.

  • svg/css/getComputedStyle-basic-expected.txt:
  • fast/css/getComputedStyle/computed-style-expected.txt:
  • fast/css/getComputedStyle/computed-style-without-renderer-expected.txt:
  • fast/css/getComputedStyle/resources/property-names.js:

Add some always expected to be available longhand properties to check.

11:54 AM Changeset in webkit [210448] by matthew_hanson@apple.com
  • 90 edits
    80 deletes in branches/safari-603-branch

Roll out r209979-r210282 and r210259 as part of disabling Web Assembly. rdar://problem/29890343

10:55 AM Changeset in webkit [210447] by Chris Dumez
  • 9 edits
    3 adds in trunk

[Form Validation] "character" in maxlength validation message should be singular when maxlength is 1
https://bugs.webkit.org/show_bug.cgi?id=166712
<rdar://problem/29872292>

Reviewed by Darin Adler.

Source/WebCore:

Fix validation message to use singular form of "character" when maxLength value is 1.

Test: fast/forms/validation-message-maxLength.html

  • English.lproj/Localizable.strings:
  • English.lproj/Localizable.stringsdict: Added.
  • WebCore.xcodeproj/project.pbxproj:
  • extract-localizable-strings.pl:
  • platform/LocalizedStrings.cpp:
  • platform/LocalizedStrings.h:
  • platform/cocoa/LocalizedStringsCocoa.mm:

(WebCore::localizedNString):
(WebCore::localizedString):
(WebCore::validationMessageTooLongText):

LayoutTests:

Add layout test coverage.

  • fast/forms/validation-message-maxLength-expected.txt: Added.
  • fast/forms/validation-message-maxLength.html: Added.
  • platform/ios-simulator/TestExpectations:
10:50 AM Changeset in webkit [210446] by commit-queue@webkit.org
  • 5 edits in trunk/Tools

Support webkit-test-runner key-value pairs in http tests
https://bugs.webkit.org/show_bug.cgi?id=149812

Patch by Antoine Quint <Antoine Quint> on 2017-01-06
Reviewed by Alex Christensen.

We pass the absolute path for a test through to WKTR so that we can parse
tests that are running as URLs for webkit-test-runner options.

  • DumpRenderTree/DumpRenderTreeCommon.cpp:

(parseInputLine):

Explicitly skip the --absolute-path option in DRT or else we'd crash.

  • Scripts/webkitpy/port/driver.py:

(Driver._command_from_driver_input):

Pass the absolute path to the file through the CLI.

  • WebKitTestRunner/TestController.cpp:

(WTR::updateTestOptionsFromTestHeader):
(WTR::TestController::testOptionsForTest):
(WTR::parseInputLine):
(WTR::TestController::runTest):

  • WebKitTestRunner/TestController.h:
10:48 AM Changeset in webkit [210445] by jer.noble@apple.com
  • 16 edits
    1 copy
    2 adds in trunk

Add support for MediaKeySystemAccess.createMediaKeys()
https://bugs.webkit.org/show_bug.cgi?id=166749

Reviewed by Eric Carlson.

Source/WebCore:

Test: media/encrypted-media/mock-MediaKeySystemAccess.html

Implement MediaKeySystemAccess::createMediaKeys(). This requires some
additions to CDM, CDMPrivate, and a new interface CDMInstance to support
eventual platform adoption and to implement mock support for testing.

  • Modules/encryptedmedia/CDM.cpp:

(WebCore::CDM::loadAndInitialize):
(WebCore::CDM::createInstance):

  • Modules/encryptedmedia/CDM.h:
  • Modules/encryptedmedia/CDMInstance.h:

(WebCore::CDMInstance::~CDMInstance):

  • Modules/encryptedmedia/CDMPrivate.h:
  • Modules/encryptedmedia/MediaKeySystemAccess.cpp:

(WebCore::MediaKeySystemAccess::createMediaKeys):

  • Modules/encryptedmedia/MediaKeySystemAccess.h:
  • Modules/encryptedmedia/MediaKeys.cpp:

(WebCore::MediaKeys::MediaKeys):

  • Modules/encryptedmedia/MediaKeys.h:

(WebCore::MediaKeys::create):

  • Modules/encryptedmedia/MediaKeys.idl:
  • Modules/encryptedmedia/NavigatorEME.cpp:

(WebCore::tryNextSupportedConfiguration):

  • WebCore.xcodeproj/project.pbxproj:
  • testing/MockCDMFactory.cpp:

(WebCore::MockCDM::MockCDM):
(WebCore::MockCDM::createInstance):
(WebCore::MockCDM::loadAndInitialize):
(WebCore::MockCDMInstance::MockCDMInstance):
(WebCore::MockCDMInstance::initializeWithConfiguration):
(WebCore::MockCDMInstance::setDistinctiveIdentifiersAllowed):
(WebCore::MockCDMInstance::setPersistentStateAllowed):

  • testing/MockCDMFactory.h:

(WebCore::MockCDMFactory::canCreateInstances):
(WebCore::MockCDMFactory::setCanCreateInstances):
(WebCore::MockCDM::factory):

  • testing/MockCDMFactory.idl:

LayoutTests:

  • media/encrypted-media/mock-MediaKeySystemAccess-expected.txt: Added.
  • media/encrypted-media/mock-MediaKeySystemAccess.html: Added.
  • platform/mac/TestExpectations:
9:55 AM Changeset in webkit [210444] by matthew_hanson@apple.com
  • 2 edits in branches/safari-603-branch/Source/JavaScriptCore

Disable WebAssembly. rdar://problem/29890343

9:32 AM Changeset in webkit [210443] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Add pass expectation for fast/text/emoji-num-glyphs.html on Sierra.

Unreviewed test gardening.

  • platform/mac/TestExpectations:
9:23 AM Changeset in webkit [210442] by Ryan Haddad
  • 2 edits in branches/safari-603-branch/LayoutTests

Merge r210377.

9:13 AM Changeset in webkit [210441] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Marking three pointer-lock tests as crashing on mac-wk2 debug.
https://bugs.webkit.org/show_bug.cgi?id=166765

Unreviewed test gardening.

  • platform/mac-wk2/TestExpectations:
7:38 AM Changeset in webkit [210440] by matthew_hanson@apple.com
  • 2 edits in branches/safari-603-branch/JSTests

Merge r210285. rdar://problem/29779182

7:38 AM Changeset in webkit [210439] by matthew_hanson@apple.com
  • 4 edits
    1 add in branches/safari-603-branch

Merge r210276. rdar://problem/28867002

7:38 AM Changeset in webkit [210438] by matthew_hanson@apple.com
  • 2 edits in branches/safari-603-branch/Source/JavaScriptCore

Merge r210259. rdar://problem/29856455

7:38 AM Changeset in webkit [210437] by matthew_hanson@apple.com
  • 19 edits in branches/safari-603-branch

Merge r210221. rdar://problem/29449474

6:05 AM Changeset in webkit [210436] by akling@apple.com
  • 30 edits in trunk/Source/WebCore

Give RenderObject a Page& getter.
<https://webkit.org/b/166735>

Reviewed by Darin Adler.

The render tree should now only ever be live while in a Frame that's connected to a Page.
Hence we can give RenderObject a Page& getter and simplify a lot of code that previously
had to get the Page from Document (or Frame) and perform null checks on it.

  • dom/Document.cpp:

(WebCore::Document::destroyRenderTree): Assert that the Page is present when we tear the render tree down.

  • page/Frame.cpp:

(WebCore::Frame::willDetachPage): Assert that there's no render tree when we're about to detach from the Page.
Also added a comment explaining the two main ways that render trees die.

  • rendering/RenderObject.h:

(WebCore::RenderObject::page): Added. So neat!

  • accessibility/AccessibilityRenderObject.cpp:

(WebCore::AccessibilityRenderObject::estimatedLoadingProgress):

  • rendering/ImageQualityController.cpp:

(WebCore::ImageQualityController::chooseInterpolationQuality):

  • rendering/InlineTextBox.cpp:

(WebCore::InlineTextBox::paint):

  • rendering/RenderAttachment.cpp:

(WebCore::RenderAttachment::layout):
(WebCore::RenderAttachment::baselinePosition):

  • rendering/RenderBlock.cpp:

(WebCore::RenderBlock::paintCaret):

  • rendering/RenderBox.cpp:

(WebCore::RenderBox::styleDidChange):
(WebCore::setupWheelEventTestTrigger):
(WebCore::RenderBox::setScrollLeft):
(WebCore::RenderBox::setScrollTop):

  • rendering/RenderElement.cpp:

(WebCore::RenderElement::paintFocusRing):

  • rendering/RenderEmbeddedObject.cpp:

(WebCore::shouldUnavailablePluginMessageBeButton):
(WebCore::RenderEmbeddedObject::paint):
(WebCore::RenderEmbeddedObject::paintReplaced):
(WebCore::RenderEmbeddedObject::getReplacementTextGeometry):
(WebCore::RenderEmbeddedObject::handleUnavailablePluginIndicatorEvent):
(WebCore::RenderEmbeddedObject::getCursor):

  • rendering/RenderHTMLCanvas.cpp:

(WebCore::RenderHTMLCanvas::paintReplaced):

  • rendering/RenderIFrame.cpp:

(WebCore::RenderIFrame::flattenFrame):

  • rendering/RenderImage.cpp:

(WebCore::RenderImage::paintReplaced):
(WebCore::RenderImage::paintAreaElementFocusRing):

  • rendering/RenderLayer.cpp:

(WebCore::RenderLayer::~RenderLayer):
(WebCore::RenderLayer::forceUpdateScrollbarsOnMainThreadForPerformanceTesting):
(WebCore::RenderLayer::scrollRectToVisible):
(WebCore::RenderLayer::isActive):
(WebCore::RenderLayer::didStartScroll):
(WebCore::RenderLayer::didEndScroll):
(WebCore::RenderLayer::didUpdateScroll):
(WebCore::RenderLayer::createScrollbar):
(WebCore::RenderLayer::setupFontSubpixelQuantization):
(WebCore::RenderLayer::calculateClipRects):

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

(WebCore::RenderLayerBacking::RenderLayerBacking):
(WebCore::RenderLayerBacking::createGraphicsLayer):
(WebCore::RenderLayerBacking::updateOverflowControlsLayers):
(WebCore::RenderLayerBacking::detachFromScrollingCoordinator):
(WebCore::RenderLayerBacking::paintContents):
(WebCore::RenderLayerBacking::shouldAggressivelyRetainTiles):
(WebCore::RenderLayerBacking::shouldTemporarilyRetainTileCohorts):
(WebCore::RenderLayerBacking::useGiantTiles):
(WebCore::RenderLayerBacking::verifyNotPainting):
(WebCore::RenderLayerBacking::startAnimation):
(WebCore::scrollingCoordinatorFromLayer): Deleted.

  • rendering/RenderLayerCompositor.cpp:

(WebCore::RenderLayerCompositor::cacheAcceleratedCompositingFlags):
(WebCore::RenderLayerCompositor::scheduleLayerFlushNow):
(WebCore::RenderLayerCompositor::flushPendingLayerChanges):
(WebCore::updateScrollingLayerWithClient):
(WebCore::RenderLayerCompositor::updateCustomLayersAfterFlush):
(WebCore::RenderLayerCompositor::notifyFlushBeforeDisplayRefresh):
(WebCore::RenderLayerCompositor::layerTiledBackingUsageChanged):
(WebCore::RenderLayerCompositor::updateCompositingLayers):
(WebCore::RenderLayerCompositor::appendDocumentOverlayLayers):
(WebCore::RenderLayerCompositor::layerBecameNonComposited):
(WebCore::RenderLayerCompositor::updateBacking):
(WebCore::RenderLayerCompositor::pageScaleFactor):
(WebCore::RenderLayerCompositor::zoomedOutPageScaleFactor):
(WebCore::RenderLayerCompositor::contentsScaleMultiplierForNewTiles):
(WebCore::RenderLayerCompositor::updateLayerForHeader):
(WebCore::RenderLayerCompositor::updateLayerForFooter):
(WebCore::RenderLayerCompositor::setRootExtendedBackgroundColor):
(WebCore::RenderLayerCompositor::attachRootLayer):
(WebCore::RenderLayerCompositor::detachRootLayer):
(WebCore::RenderLayerCompositor::rootLayerAttachmentChanged):
(WebCore::RenderLayerCompositor::registerAllScrollingLayers):
(WebCore::RenderLayerCompositor::scrollingCoordinator):
(WebCore::RenderLayerCompositor::graphicsLayerFactory):
(WebCore::RenderLayerCompositor::createDisplayRefreshMonitor):
(WebCore::RenderLayerCompositor::page):

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

(WebCore::setupWheelEventTestTrigger):
(WebCore::RenderListBox::setScrollTop):
(WebCore::RenderListBox::isActive):
(WebCore::RenderListBox::forceUpdateScrollbarsOnMainThreadForPerformanceTesting):
(WebCore::RenderListBox::createScrollbar):

  • rendering/RenderObject.cpp:

(WebCore::RenderObject::theme):

  • rendering/RenderObject.h:

(WebCore::RenderObject::page):

  • rendering/RenderSearchField.cpp:

(WebCore::RenderSearchField::addSearchResult):
(WebCore::RenderSearchField::showPopup):
(WebCore::RenderSearchField::valueChanged):

  • rendering/RenderSnapshottedPlugIn.cpp:

(WebCore::RenderSnapshottedPlugIn::updateSnapshot):

  • rendering/RenderTheme.cpp:

(WebCore::RenderTheme::paint):
(WebCore::RenderTheme::updateControlStatesForRenderer):
(WebCore::RenderTheme::isActive):

  • rendering/RenderThemeMac.mm:

(WebCore::RenderThemeMac::paintCellAndSetFocusedElementNeedsRepaintIfNecessary):
(WebCore::RenderThemeMac::paintSliderThumb):

  • rendering/RenderVideo.cpp:

(WebCore::RenderVideo::paintReplaced):

  • rendering/RenderView.cpp:

(WebCore::RenderView::pageNumberForBlockProgressionOffset):
(WebCore::RenderView::pageCount):

  • rendering/svg/RenderSVGRoot.cpp:

(WebCore::RenderSVGRoot::paintReplaced):

  • style/StyleResolveForDocument.cpp:

(WebCore::Style::resolveForDocument):

1:47 AM Changeset in webkit [210435] by pvollan@apple.com
  • 2 edits in trunk/LayoutTests

Fixed duplicate test expectation entries on Windows.

Unreviewed test gardening.

  • platform/win/TestExpectations:
1:16 AM Changeset in webkit [210434] by timothy_horton@apple.com
  • 2 edits in trunk/Tools

Warning about unconnectable outlets when opening a MiniBrowser window
https://bugs.webkit.org/show_bug.cgi?id=166756

Reviewed by Dan Bernstein.

  • MiniBrowser/mac/BrowserWindow.xib:

When launching MiniBrowser, it says:
Failed to connect (Share) outlet from (WK1BrowserWindowController) to

(MBToolbarItem): missing setter or instance variable

Failed to connect (shareButton) outlet from (WK1BrowserWindowController) to

(NSButtonCell): missing setter or instance variable.

It looks like someone added the connection from the share button
to the BrowserWindowController three times; only one of the connections
is valid. Remove the other two.

Note: See TracTimeline for information about the timeline view.