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

Timeline



Jan 30, 2017:

11:21 PM Changeset in webkit [211410] by Yusuke Suzuki
  • 4 edits in trunk

[JSC] Do not reject WebAssembly.compile() with Exception
https://bugs.webkit.org/show_bug.cgi?id=167585

Reviewed by Mark Lam.

JSTests:

  • wasm/js-api/Module-compile.js:

(async.testPromiseAPI):

Source/JavaScriptCore:

We accidentally reject the promise with Exception instead of Exception::value()
for the result of WebAssembly::compile().

  • wasm/JSWebAssembly.cpp:

(JSC::webAssemblyCompileFunc):

11:17 PM Changeset in webkit [211409] by Joseph Pecoraro
  • 6 edits
    2 copies
    5 adds in trunk/Source/WebCore

[WebIDL] Add support for inherit serializer attribute
https://bugs.webkit.org/show_bug.cgi?id=167274

Reviewed by Darin Adler.

Support for serializer { inherit }, which will be used by Resource Timing.
https://heycam.github.io/webidl/#idl-serializers

  • bindings/scripts/CodeGenerator.pm:

(GetInterfaceForAttribute):
(IsSerializableAttribute):
Determine if an attribute is serializable at generation time so we can
verify types. This allows us to support typedefs. We don't yet support
serializing an attribute that is itself a serializable interface.

  • bindings/scripts/CodeGeneratorJS.pm:

(GenerateSerializerFunction):
(GenerateSerializerAttributesForInterface):
Generate inherited attributes first, then generate our own list.
Explicitly provided attribute names are expected to be serializable,
so produce an error if they are not.

  • bindings/scripts/IDLParser.pm:

(parseSerializationAttributes):
Update parsing of serializer attributes to allow for multiple
special strings. The spec does not precisely define where the
special "attribute" keyword is allowed.

(applyMemberList):
(isSerializableAttribute): Deleted.
Move serializable attribute checking to generation.

  • bindings/scripts/test/JS/JSTestSerialization.cpp:
  • bindings/scripts/test/JS/JSTestSerializationInherit.cpp: Added.
  • bindings/scripts/test/JS/JSTestSerializationInherit.h: Added.
  • bindings/scripts/test/JS/JSTestSerializationInheritFinal.cpp: Added.
  • bindings/scripts/test/JS/JSTestSerializationInheritFinal.h: Added.

The toJSON implementations are the most interesting.

  • bindings/scripts/test/TestSerialization.idl:

Extend this test for typedefed attributes that are serializable.
Change TestNode (a serializable Interface) to TestException (an
unserializable Interface) for expected behavior of an
unserializable attribute.

  • bindings/scripts/test/TestSerializationInherit.idl:

Test for { inherit, attribute }.

  • bindings/scripts/test/TestSerializationInheritFinal.idl:

Test for { inherit, attribute_names... }, and multi-level inherit.

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

Web Inspector: "bouncy highlight" element in TextEditor/DOMTreeOutline should update or dismiss when user scrolls
https://bugs.webkit.org/show_bug.cgi?id=167146

Patch by Devin Rousso <Devin Rousso> on 2017-01-30
Reviewed by Timothy Hatcher.

  • UserInterface/Views/TextEditor.js:

(WebInspector.TextEditor.prototype._revealSearchResult.scrollHandler):
(WebInspector.TextEditor.prototype._revealSearchResult.animationEnded):
(WebInspector.TextEditor.prototype._revealSearchResult):

10:27 PM Changeset in webkit [211407] by Carlos Garcia Campos
  • 2 edits in trunk/Source/WebKit2

[GTK] HTTP authentication is not implemented for downloads
https://bugs.webkit.org/show_bug.cgi?id=167583

Reviewed by Michael Catanzaro.

When a normal load is converted to a download, the HTTP authentication happens before the load is converted, and
the download starts already authenticated. However, downloads started by DownloadManager::startDownload use the
DownloadClient API to do the authentication. We don't implement didReceiveAuthenticationChallenge() in our
download client, what makes the load to be cancelled and then fail silently. We should probably add API to
handle downloads authentication, but we can also forward the authentication to the web view for downloads having
a web view associated. That would cover most of the cases, like downloading from the context menu.

  • UIProcess/API/gtk/WebKitDownloadClient.cpp: Add didReceiveAuthenticationChallenge implementation.
10:21 PM Changeset in webkit [211406] by Joseph Pecoraro
  • 28 edits
    3 copies
    26 adds in trunk

Implement PerformanceObserver
https://bugs.webkit.org/show_bug.cgi?id=167546
<rdar://problem/30247959>

Reviewed by Ryosuke Niwa.

Source/JavaScriptCore:

  • runtime/CommonIdentifiers.h:

Source/WebCore:

This implements PerformanceObserver from Performance Timeline Level 2:
https://w3c.github.io/performance-timeline/

Tests: performance-api/performance-observer-api.html

performance-api/performance-observer-basic.html
performance-api/performance-observer-callback-mutate.html
performance-api/performance-observer-callback-task.html
performance-api/performance-observer-entry-sort.html
performance-api/performance-observer-exception.html
performance-api/performance-observer-nested.html
performance-api/performance-observer-order.html
performance-api/performance-observer-periodic.html
performance-api/performance-timeline-api.html

  • CMakeLists.txt:
  • DerivedSources.make:
  • WebCore.xcodeproj/project.pbxproj:

New files.

  • page/Performance.h:
  • page/Performance.cpp:

(WebCore::Performance::mark):
(WebCore::Performance::measure):
(WebCore::Performance::registerPerformanceObserver):
(WebCore::Performance::unregisterPerformanceObserver):
(WebCore::Performance::queueEntry):
Register PerformanceObservers with the Performance object.
When new PerformanceEntries are created (Mark and Measure
right now) check them against observers.

  • page/PerformanceEntry.cpp:

(WebCore::PerformanceEntry::PerformanceEntry):
(WebCore::PerformanceEntry::typeForEntryTypeString):

  • page/PerformanceEntry.h:

(WebCore::PerformanceEntry::type):
Give PerformanceEntry a convenience enum for easy comparison
and to know if it is one of the built-in known types (which the
PerformanceObserver API takes into account).

  • page/PerformanceObserver.cpp: Added.

(WebCore::PerformanceObserver::PerformanceObserver):
(WebCore::PerformanceObserver::observe):
(WebCore::PerformanceObserver::disconnect):
(WebCore::PerformanceObserver::queueEntry):
(WebCore::PerformanceObserver::deliver):

  • page/PerformanceObserver.h:

(WebCore::PerformanceObserver::create):
(WebCore::PerformanceObserver::typeFilter):

  • TypeErrors on observe bad behavior
  • Completely replace types filter on observe
  • Handle register and unregister
  • Handle calling the callback
  • page/PerformanceObserverCallback.idl: Added.
  • page/PerformanceObserverEntryList.cpp: Added.

(WebCore::PerformanceObserverEntryList::PerformanceObserverEntryList):
(WebCore::PerformanceObserverEntryList::getEntries):
(WebCore::PerformanceObserverEntryList::getEntriesByType):
(WebCore::PerformanceObserverEntryList::getEntriesByName):

  • page/PerformanceObserverEntryList.h:

(WebCore::PerformanceObserverEntryList::create):

  • page/PerformanceObserverEntryList.idl: Added.

Implement sorting and filtering of entries.

  • page/PerformanceObserver.idl: Added.
  • page/PerformanceObserverCallback.h:

(WebCore::PerformanceObserverCallback::~PerformanceObserverCallback):
Mostly autogenerated.

  • page/PerformanceUserTiming.cpp:

(WebCore::UserTiming::mark):
(WebCore::UserTiming::measure):

  • page/PerformanceUserTiming.h:

Update these to return the entry so it can be passed on to
any interested PerformanceObservers.

Source/WebInspectorUI:

  • UserInterface/Models/NativeFunctionParameters.js:

Improve API view display of built-in performance methods.

LayoutTests:

  • performance-api/performance-observer-api-expected.txt: Added.
  • performance-api/performance-observer-api.html: Added.
  • performance-api/performance-observer-basic-expected.txt: Added.
  • performance-api/performance-observer-basic.html: Added.
  • performance-api/performance-observer-callback-mutate-expected.txt: Added.
  • performance-api/performance-observer-callback-mutate.html: Added.
  • performance-api/performance-observer-callback-task-expected.txt: Added.
  • performance-api/performance-observer-callback-task.html: Added.
  • performance-api/performance-observer-entry-sort-expected.txt: Added.
  • performance-api/performance-observer-entry-sort.html: Added.
  • performance-api/performance-observer-exception-expected.txt: Added.
  • performance-api/performance-observer-exception.html: Added.
  • performance-api/performance-observer-nested-expected.txt: Added.
  • performance-api/performance-observer-nested.html: Added.
  • performance-api/performance-observer-order-expected.txt: Added.
  • performance-api/performance-observer-order.html: Added.
  • performance-api/performance-observer-periodic-expected.txt: Added.
  • performance-api/performance-observer-periodic.html: Added.

PerformanceObserver tests.

  • performance-api/performance-timeline-api-expected.txt: Added.
  • performance-api/performance-timeline-api.html: Added.

Performance timeline tests.

  • platform/efl/js/dom/global-constructors-attributes-expected.txt:
  • platform/gtk/js/dom/global-constructors-attributes-expected.txt:
  • platform/mac-elcapitan/js/dom/global-constructors-attributes-expected.txt:
  • platform/mac-wk1/js/dom/global-constructors-attributes-expected.txt:
  • platform/mac-yosemite/js/dom/global-constructors-attributes-expected.txt:
  • platform/mac/js/dom/global-constructors-attributes-expected.txt:
  • platform/win/js/dom/global-constructors-attributes-expected.txt:

New global constructors.

8:50 PM Changeset in webkit [211405] by Jonathan Bedard
  • 2 edits in trunk/Tools

Workaround for simctl launch bug
https://bugs.webkit.org/show_bug.cgi?id=167613

Reviewed by Daniel Bates.

simctl launch will sometimes fail because of a race condition when many
simulators are being run simultaneously. These failures will always have
an exit code of 1. This change attempts to launch an app multiple times
before reporting a failure to workaround this bug.

  • Scripts/webkitpy/xcode/simulator.py:

(Device.launch_app): Execute multiple launch attempts, better logging of failures.

8:34 PM Changeset in webkit [211404] by commit-queue@webkit.org
  • 11 edits in trunk

[WebRTC] getStats does not support legacy callback
https://bugs.webkit.org/show_bug.cgi?id=167617

Patch by Youenn Fablet <youenn@apple.com> on 2017-01-30
Reviewed by Alex Christensen.

Source/WebCore:

Covered by updated tests.

  • Modules/mediastream/RTCPeerConnection.cpp:

(WebCore::RTCPeerConnection::getStats):
(WebCore::RTCPeerConnection::privateGetStats): Deleted.

  • Modules/mediastream/RTCPeerConnection.h:
  • Modules/mediastream/RTCPeerConnection.idl:
  • Modules/mediastream/RTCPeerConnection.js:

(addIceCandidate):
(getStats): Deleted.

LayoutTests:

  • fast/mediastream/RTCPeerConnection-js-built-ins-check-this-expected.txt:
  • fast/mediastream/RTCPeerConnection-overloaded-operations-params-expected.txt:
  • fast/mediastream/RTCPeerConnection-overloaded-operations-params.html:
  • fast/mediastream/RTCPeerConnection-stats.html:
  • fast/mediastream/RTCPeerConnection-statsSelector.html:
7:37 PM Changeset in webkit [211403] by weinig@apple.com
  • 72 edits
    8 copies
    3 deletes in trunk/Source

JSDOMBinding is too big. Split it up!
https://bugs.webkit.org/show_bug.cgi?id=167601

Reviewed by Darin Adler.

Source/WebCore:

Splits JSDOMBinding.h/cpp up a bit by splitting out:

  • JSDOMBindingCaller.h
  • JSDOMBindingSecurity.h/cpp
  • JSDOMExceptionHandling.h/cpp
  • JSDOMWrapperCache.h/cpp

Also:

  • Moves all constructor objects to JSDOMConstructor.h/cpp,
  • Moves special DOMWindow accessors to JSDOMWindowBase.
  • Deletes unused CallbackFunction.h/cpp
  • CMakeLists.txt:
  • Modules/webdatabase/Database.cpp:
  • WebCore.xcodeproj/project.pbxproj:
  • bindings/js/CallbackFunction.cpp: Removed.
  • bindings/js/CallbackFunction.h: Removed.
  • bindings/js/DOMConstructorWithDocument.h: Removed.
  • bindings/js/JSCryptoCustom.cpp:
  • bindings/js/JSCustomXPathNSResolver.cpp:
  • bindings/js/JSDOMBinding.cpp:
  • bindings/js/JSDOMBinding.h:
  • bindings/js/JSDOMBindingCaller.h: Copied from Source/WebCore/bindings/js/JSDOMBinding.h.
  • bindings/js/JSDOMBindingSecurity.cpp: Copied from Source/WebCore/bindings/js/JSDOMBinding.cpp.
  • bindings/js/JSDOMBindingSecurity.h: Copied from Source/WebCore/bindings/js/JSDOMBinding.h.
  • bindings/js/JSDOMConstructor.cpp: Copied from Source/WebCore/bindings/js/JSDOMBinding.cpp.
  • bindings/js/JSDOMConstructor.h:
  • bindings/js/JSDOMConvert.h:
  • bindings/js/JSDOMExceptionHandling.cpp: Copied from Source/WebCore/bindings/js/JSDOMBinding.cpp.
  • bindings/js/JSDOMExceptionHandling.h: Copied from Source/WebCore/bindings/js/JSDOMBinding.h.
  • bindings/js/JSDOMWindowBase.cpp:

(WebCore::callerDOMWindow): Moved from JSDOMBinding.h
(WebCore::activeDOMWindow): Moved from JSDOMBinding.h
(WebCore::firstDOMWindow): Moved from JSDOMBinding.h

  • bindings/js/JSDOMWindowBase.h:
  • bindings/js/JSDOMWindowCustom.cpp:
  • bindings/js/JSDOMWindowProperties.cpp:
  • bindings/js/JSDOMWrapperCache.cpp: Copied from Source/WebCore/bindings/js/JSDOMBinding.cpp.
  • bindings/js/JSDOMWrapperCache.h: Copied from Source/WebCore/bindings/js/JSDOMBinding.h.
  • bindings/js/JSEventTargetCustom.h:
  • bindings/js/JSHTMLElementCustom.cpp:
  • bindings/js/JSLocationCustom.cpp:
  • bindings/js/JSMutationObserverCustom.cpp:
  • bindings/js/JSSQLStatementErrorCallbackCustom.cpp:
  • bindings/js/JSStorageCustom.cpp:
  • bindings/js/JSWorkerCustom.cpp:
  • bindings/js/JSXPathNSResolverCustom.cpp:
  • bindings/js/ScheduledAction.cpp:
  • bindings/js/ScriptController.cpp:
  • bindings/js/ScriptController.h:
  • bindings/js/ScriptGlobalObject.cpp:

(WebCore::ScriptGlobalObject::set):

  • bindings/js/StructuredClone.cpp:
  • bindings/scripts/CodeGeneratorJS.pm:

(GenerateImplementation):
(GenerateCallWith):
(GenerateParametersCheck):
(GenerateCallbackImplementationContent):
(NativeToJSValue):

  • bridge/objc/WebScriptObject.mm:
  • html/HTMLFrameElementBase.cpp:
  • html/HTMLVideoElement.cpp:
  • inspector/InspectorController.cpp:
  • inspector/InspectorDOMAgent.cpp:
  • inspector/PageScriptDebugServer.cpp:
  • inspector/WorkerScriptDebugServer.cpp:

Source/WebKit2:

  • Shared/WebCoreArgumentCoders.cpp:

Replace include of JSDOMBinding with JSDOMExceptionHandling.

7:06 PM Changeset in webkit [211402] by aestes@apple.com
  • 13 edits in trunk/Source

[QuickLook] FrameLoaderClient should return the new QuickLookHandleClient it creates
https://bugs.webkit.org/show_bug.cgi?id=167625

Reviewed by Andreas Kling.

Source/WebCore:

QuickLookHandleClients were being created by QuickLookHandle calling
FrameLoaderClient::didCreateQuickLookHandle() then having the FrameLoaderClient create a new
QuickLookHandleClient and set it using QuickLookHandle::setClient().

Since all FrameLoaderClient::didCreateQuickLookHandle() does is create a new
QuickLookHandleClient, this patch changes the FrameLoaderClient function to return the new
QuickLookHandleClient directly and removes the API from QuickLookHandle to set a client.
This also removes previewFileName() and previewUTI() from QuickLookHandle and instead passes
these as arguments to the FrameLoaderClient.

No change in behavior. Covered by existing tests.

  • loader/EmptyClients.cpp: Added an implementation of createQuickLookHandleClient() that

returns nullptr.

  • loader/FrameLoaderClient.h: Declared createQuickLookHandleClient() and removed

didCreateQuickLookHandle().

  • loader/ios/QuickLook.h: Removed setClient(), previewFileName(), and previewUTI().
  • loader/ios/QuickLook.mm: Removed testingOrEmptyClient().

(-[WebPreviewLoader initWithResourceLoader:resourceResponse:quickLookHandle:]): Set _client
to testingClient() if it exists, otherwise set it to the client returned by
FrameLoaderClient::createQuickLookHandleClient() it non-null, otherwise set it to
emptyClient().
(testingOrEmptyClient): Deleted.
(-[WebPreviewLoader setClient:]): Deleted.
(-[WebPreviewLoader converter]): Deleted.
(WebCore::QuickLookHandle::setClient): Deleted.
(WebCore::QuickLookHandle::previewFileName): Deleted.
(WebCore::QuickLookHandle::previewUTI): Deleted.

Source/WebKit/mac:

  • WebCoreSupport/WebFrameLoaderClient.h: Declared createQuickLookHandleClient().
  • WebCoreSupport/WebFrameLoaderClient.mm:

(WebFrameLoaderClient::createQuickLookHandleClient): Renamed from didCreateQuickLookHandle().
(WebFrameLoaderClient::didCreateQuickLookHandle): Renamed to createQuickLookHandleClient().

Source/WebKit2:

  • WebProcess/WebCoreSupport/WebFrameLoaderClient.h: Declared createQuickLookHandleClient().
  • WebProcess/WebCoreSupport/ios/WebFrameLoaderClientIOS.mm:

(WebKit::WebFrameLoaderClient::createQuickLookHandleClient): Renamed from didCreateQuickLookHandle().
(WebKit::WebFrameLoaderClient::didCreateQuickLookHandle): Renamed to createQuickLookHandleClient().

  • WebProcess/WebCoreSupport/ios/WebQuickLookHandleClient.cpp:

(WebKit::WebQuickLookHandleClient::WebQuickLookHandleClient): Set m_fileName and m_uti from
the constructor arguments instead of from handle.

  • WebProcess/WebCoreSupport/ios/WebQuickLookHandleClient.h:
6:38 PM Changeset in webkit [211401] by jer.noble@apple.com
  • 2 edits in trunk/Source/WebCore

NULL-deref crash in TextTrack::removeCue()
https://bugs.webkit.org/show_bug.cgi?id=167615

Reviewed by Eric Carlson.

It's possible for a track to be removed which was never actually added to the cue list.
Specifically, if an in-band track with a negative start or end time was parsed, it would
have been rejected by TextTrack::addCue(). When it comes time to flush those in-band cues,
TextTrack::m_cues will still be NULL. Rather than ASSERT in this case, we should revert the
behavior added in r210319 and throw an exception.

  • html/track/TextTrack.cpp:

(WebCore::TextTrack::removeCue):

6:36 PM Changeset in webkit [211400] by Chris Dumez
  • 1 edit
    2 deletes in trunk/LayoutTests

Unreviewed, remove a couple JS files that were missed in r211395.

  • dom/xhtml/level3/core/attrisid04.js: Removed.
  • dom/xhtml/level3/core/attrisid05.js: Removed.
6:12 PM Changeset in webkit [211399] by akling@apple.com
  • 2 edits in trunk/Source/WebCore

Fix CMSampleBuffer leak in MediaSampleAVFObjC::createNonDisplayingCopy().
<https://webkit.org/b/167621>

Reviewed by Andy Estes.

We were failing to adopt the CMSampleBuffer after copying it. Seen on leaks bot.

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

(WebCore::MediaSampleAVFObjC::createNonDisplayingCopy):

5:54 PM Changeset in webkit [211398] by aestes@apple.com
  • 12 edits
    2 adds in trunk/Source/WebCore

[QuickLook] QLPreviewConverter and QuickLookHandle have different lifetime requirements
https://bugs.webkit.org/show_bug.cgi?id=167609

Reviewed by Andreas Kling.

Currently, QuickLookHandles are owned by DocumentLoader so that the underlying
QLPreviewConverter stays alive to service subresource requests. However, the QuickLookHandle
itself only needs to live long enough to handle the main resource load. And in a follow-on
patch we will need to create QLPreviewConverters independent of QuickLookHandle.

This patch moves ownership of QuickLookHandle from DocumentLoader to ResourceLoader. It also
creates a C++ wrapper around QLPreviewConverter and teaches QuickLookHandle to transfer
ownership of the wrapper to DocumentLoader once the main resource conversion is complete.

No change in behavior. Covered by existing tests.

  • WebCore.xcodeproj/project.pbxproj: Added PreviewConverter.{h,mm}.
  • loader/DocumentLoader.cpp:

(WebCore::DocumentLoader::setPreviewConverter): Renamed from setQuickLookHandle().
(WebCore::DocumentLoader::previewConverter): Renamed from quickLookHandle().
(WebCore::DocumentLoader::setQuickLookHandle): Renamed to setPreviewConverter().

  • loader/DocumentLoader.h:

(WebCore::DocumentLoader::quickLookHandle): Renamed to quickLookHandle().

  • loader/ResourceLoader.cpp:

(WebCore::ResourceLoader::willSendRequestInternal): Changed to call PreviewConverter::safeRequest().
(WebCore::ResourceLoader::isQuickLookResource): Changed to check if m_quickLookHandle is null.
(WebCore::ResourceLoader::didCreateQuickLookHandle): Deleted.

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

(WebCore::SubresourceLoader::shouldCreateQuickLookHandleForResponse): Changed to access m_quickLookHandle.
(WebCore::SubresourceLoader::didReceiveResponse): Ditto.
(WebCore::SubresourceLoader::didReceiveData): Ditto.
(WebCore::SubresourceLoader::didReceiveBuffer): Ditto.
(WebCore::SubresourceLoader::didFinishLoading): Ditto.
(WebCore::SubresourceLoader::didFail): Ditto.

  • loader/cache/CachedRawResource.cpp:

(WebCore::CachedRawResource::finishLoading): Wrapped the call to ResourceLoader::isQuickLookResource() in USE(QUICK_LOOK).

  • loader/ios/QuickLook.h: Renamed m_converter to m_previewLoader.
  • loader/ios/QuickLook.mm: Renamed WebPreviewConverter to WebPreviewLoader.

(WebCore::registerQLPreviewConverterIfNeeded): Created a PreviewConverter instead of a QLPreviewConverter.
(-[WebPreviewLoader initWithResourceLoader:resourceResponse:quickLookHandle:]): Ditto.
(-[WebPreviewLoader appendDataArray:]): Accessed the QLPreviewConverter from the PreviewConverter.
(-[WebPreviewLoader finishedAppending]): Ditto.
(-[WebPreviewLoader failed]): Ditto.
(-[WebPreviewLoader converter]): Renamed from platformConverter. Returns a pointer to the PreviewConverter.
(-[WebPreviewLoader _sendDidReceiveResponseIfNecessary]): Moved _converter to DocumentLoader.
(-[WebPreviewLoader connection:didFailWithError:]): Created a PreviewConverter instead of a QLPreviewConverter.
(WebCore::QuickLookHandle::QuickLookHandle): Called FrameLoaderClient::didCreateQuickLookHandle() instead of going through FrameLoader.
(WebCore::QuickLookHandle::didReceiveData): Renamed m_converter to m_previewLoader.
(WebCore::QuickLookHandle::didReceiveBuffer): Ditto.
(WebCore::QuickLookHandle::didFinishLoading): Ditto.
(WebCore::QuickLookHandle::didFail): Ditto.
(WebCore::QuickLookHandle::setClient): Ditto.
(WebCore::QuickLookHandle::previewFileName): Ditto.
(WebCore::QuickLookHandle::previewUTI): Ditto.
(WebCore::QuickLookHandle::willSendRequest): Deleted.

  • platform/ios/QuickLookSoftLink.h: Removed soft-linking of QLPreviewConverter and kQLPreviewOptionPasswordKey.
  • platform/ios/QuickLookSoftLink.mm: Ditto.
  • platform/network/ios/PreviewConverter.h: Added.

(WebCore::PreviewConverter::platformConverter): Added. Returns the underlying QLPreviewConverter.

  • platform/network/ios/PreviewConverter.mm: Added.

(WebCore::optionsWithPassword): Creates a dictionary with the kQLPreviewOptionPasswordKey option set if password is non-null.
(WebCore::PreviewConverter::PreviewConverter): Added constructors for the delegate/response and data/uti cases.
(WebCore::PreviewConverter::safeRequest): Wraps -[QLPreviewConverter safeRequestForRequest:].
(WebCore::PreviewConverter::previewRequest): Wraps -[QLPreviewConverter previewRequest].
(WebCore::PreviewConverter::previewResponse): Wraps -[QLPreviewConverter previewResponse].
(WebCore::PreviewConverter::previewFileName): Wraps -[QLPreviewConverter previewFileName].
(WebCore::PreviewConverter::previewUTI): Wraps -[QLPreviewConverter previewUTI].

5:20 PM Changeset in webkit [211397] by ap@apple.com
  • 4 edits in trunk/Tools

Commit queue fails to look at real name aliases for the reviewer
https://bugs.webkit.org/show_bug.cgi?id=167422

Reviewed by Joseph Pecoraro.

  • Scripts/webkitpy/common/checkout/changelog_unittest.py:

(test_has_valid_reviewer): Added tests.

  • Scripts/webkitpy/common/config/committers.py:

(CommitterList._name_to_contributor_map):
Made _name_to_contributor_map include alias names.

  • Scripts/webkitpy/common/config/committers_unittest.py:

(CommittersTest.test_contributors_by_fuzzy_match):
Removed subtests that are now obsolete, as these matches are strict. It is not
obvious if distance based fuzzy matching for names is useful at all, but we can
look into that some other time.

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

Marking media/modern-media-controls/buttons-container/buttons-container-buttons-property.html as flaky on macOS WK1.
https://bugs.webkit.org/show_bug.cgi?id=167371

Unreviewed test gardening.

  • platform/mac-wk1/TestExpectations:
4:22 PM Changeset in webkit [211395] by Chris Dumez
  • 11 edits
    6 deletes in trunk

Drop legacy Attributes.isId attribute
https://bugs.webkit.org/show_bug.cgi?id=167603

Reviewed by Ryosuke Niwa.

LayoutTests/imported/w3c:

Rebaseline W3C test now that one more check is passing.

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

Source/WebCore:

Drop legacy Attributes.isId attribute.

This attribute is not in the specification:

Both Firefox and Chrome currently do not expose this attribute.

No new tests, rebaselined existing test.

  • dom/Attr.cpp:
  • dom/Attr.h:
  • dom/Attr.idl:

Source/WebKit/mac:

Keep Attr.isId in ObjC bindings.

  • DOM/DOMAttr.mm:

(-[DOMAttr isId]):

LayoutTests:

Drop outdated tests.

  • dom/xhtml/level3/core/attrisid04-expected.txt: Removed.
  • dom/xhtml/level3/core/attrisid04.xhtml: Removed.
  • dom/xhtml/level3/core/attrisid05-expected.txt: Removed.
  • dom/xhtml/level3/core/attrisid05.xhtml: Removed.
  • fast/dom/Attr/change-id-via-attr-node-value-expected.txt:
  • fast/dom/Attr/change-id-via-attr-node-value.html:
  • fast/dom/Element/attrisid-extra01-expected.txt: Removed.
  • fast/dom/Element/attrisid-extra01.html: Removed.
4:17 PM Changeset in webkit [211394] by Alan Bujtas
  • 7 edits
    1 add in trunk

Simple line layout: Small tweaks to improve performance.
https://bugs.webkit.org/show_bug.cgi?id=167611
<rdar://problem/30274294>

Reviewed by Simon Fraser.

PerformanceTests:

  • Layout/simple-line-layout-non-repeating-text.html: Added.

Source/WebCore:

This is ~10% progression on the attached test case (paragraphs with non-redundant content).
median: 102.08 runs/s -> median: 114.25 runs/s

  • rendering/SimpleLineLayout.cpp:

(WebCore::SimpleLineLayout::LineState::appendFragmentAndCreateRunIfNeeded):

  • rendering/SimpleLineLayoutFlowContents.cpp:

(WebCore::SimpleLineLayout::initializeSegments):
(WebCore::SimpleLineLayout::FlowContents::FlowContents):

  • rendering/SimpleLineLayoutFlowContents.h:
  • rendering/SimpleLineLayoutTextFragmentIterator.cpp:

(WebCore::SimpleLineLayout::TextFragmentIterator::nextNonWhitespacePosition):
(WebCore::SimpleLineLayout::TextFragmentIterator::skipToNextPosition):

  • rendering/SimpleLineLayoutTextFragmentIterator.h:
4:11 PM Changeset in webkit [211393] by Chris Dumez
  • 11 edits in trunk

Drop legacy constants on Event interface
https://bugs.webkit.org/show_bug.cgi?id=167602

Reviewed by Sam Weinig.

LayoutTests/imported/w3c:

Rebaseline W3C test now that more checks are passing.

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

Source/WebCore:

Drop legacy constants on Event interface:
MOUSEDOWN, MOUSEUP, MOUSEOVER, MOUSEOUT, MOUSEMOVE, MOUSEDRAG,
CLICK, DBLCLICK, KEYDOWN, KEYUP, KEYPRESS, DRAGDROP, FOCUS,
BLUR, SELECT, and CHANGE.

Those constants are not used for anything, they are not in the
specification and Chrome / Firefox do not have them.

No new tests, rebaselined existing test.

  • dom/Event.idl:

LayoutTests:

Update / Rebaseline existing tests to stop covering those constants.

  • fast/dom/constants-expected.txt:
  • fast/dom/constants.html:
  • fast/xmlhttprequest/xmlhttprequest-get-expected.txt:
  • http/tests/workers/worker-importScriptsOnError-expected.txt:
  • inspector/model/remote-object-get-properties-expected.txt:
4:08 PM Changeset in webkit [211392] by matthew_hanson@apple.com
  • 1 copy in tags/Safari-604.1.5.1

New tag.

4:06 PM Changeset in webkit [211391] by commit-queue@webkit.org
  • 1 edit
    1 add in trunk/Source/ThirdParty/libwebrtc

[WebRTC] Upload a diff of WebKit libwebrtc code and original libwebrtc code
https://bugs.webkit.org/show_bug.cgi?id=167573

Patch by Youenn Fablet <youennf@gmail.com> on 2017-01-30
Reviewed by Alex Christensen.

  • WebKit/patch-libwebrtc: Added.
3:37 PM Changeset in webkit [211390] by andersca@apple.com
  • 2 edits in trunk/Source/WebKit2

Add some more crash reporter information to diagnose a failed mach_msg
https://bugs.webkit.org/show_bug.cgi?id=167610

Reviewed by Dean Jackson.

Include the receive port name as well.

  • Platform/IPC/mac/ConnectionMac.mm:

(IPC::readFromMachPort):

3:21 PM Changeset in webkit [211389] by aakash_jain@apple.com
  • 2 edits in trunk/Tools

QueueStatusServer should have an explicit timeout for _fetch_url
https://bugs.webkit.org/show_bug.cgi?id=167467

Reviewed by Alexey Proskuryakov.

  • Scripts/webkitpy/common/net/statusserver.py:

(StatusServer._fetch_url): Add an explicit timeout of 300s.

3:03 PM Changeset in webkit [211388] by commit-queue@webkit.org
  • 4 edits in trunk/Tools

Add support for Trac instances that host multiple projects.
https://bugs.webkit.org/show_bug.cgi?id=167524

Patch by Kocsen Chung <Kocsen Chung> on 2017-01-30
Reviewed by Alexey Proskuryakov.

When multiple projects are hosted on a single Trac instance, the current
behavior will retrieve changesets from all tracked projects.
This patch teaches Trac.js to get project-specific changesets from Trac.
We do this by replacing the parameter changeset=on to repo-projectname=on
when querying the Trac timeline.

To tell Trac to be aware of multi-project instances we leverage the
options parameter when creating a new instance:

new Trac("https://mytrac.com/", { projectIdentifier: "tracProjectName" });

If this option is not provided, the original behaviour will prevail.
Additionally, add corresponding tests.

  • BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/Trac.js:

(Trac): Reason about new optional parameter 'projectIdentifier'.
(Trac.prototype.revisionURL): Given a projectIdentifier, append it to the end of the URL.
(Trac.prototype._xmlTimelineURL): Given a projectIdentifier,
replace default parameter changeset=on with repo-projectname=on.
(Trac.prototype._convertCommitInfoElementToObject): Fix missing ';'.

  • BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/tests/resources/MockTrac.js:

(MockTrac): Add support for instantiating Trac with a projectIdentifier.

  • BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/tests/resources/tests.js:

(setup): Provide a multiple-project MockTrac instance to all test cases for testing.
Add the following tests:

test("revisionURL")
test("revisionURL with Trac Identifier")
test("_xmlTimelineURL")
test("_xmlTimelineURL with Trac Identifier")

(this.view._latestProductiveIteration): Fix missing ';'.

2:51 PM Changeset in webkit [211387] by Simon Fraser
  • 6 edits
    2 adds in trunk

[iOS] position:fixed inside touch-scrollable overflow is mispositioned
https://bugs.webkit.org/show_bug.cgi?id=167604
Source/WebCore:

rdar://problem/29500273

Reviewed by Zalan Bujtas.

For layers inside touch-scrollable overflow, RenderLayerBacking::computeParentGraphicsLayerRect() needs
to account for the offset from the ancestor compositing layer's origin, to handle scrollable elements with
box-shadow, for example.

Also make the compositing log output a little easier to read.

Test: compositing/scrolling/fixed-inside-scroll.html

  • rendering/RenderLayerBacking.cpp:

(WebCore::RenderLayerBacking::computeParentGraphicsLayerRect):

  • rendering/RenderLayerCompositor.cpp:

(WebCore::RenderLayerCompositor::logLayerInfo):

Source/WebKit2:

rdar://problem/29500273

Reviewed by Zalan Bujtas.

Make sure we tell m_webPageProxy.computeCustomFixedPositionRect() when visual viewports are enabled.

  • UIProcess/ios/RemoteScrollingCoordinatorProxyIOS.mm:

(WebKit::RemoteScrollingCoordinatorProxy::customFixedPositionRect):

LayoutTests:

Reviewed by Zalan Bujtas.

  • compositing/scrolling/fixed-inside-scroll-expected.html: Added.
  • compositing/scrolling/fixed-inside-scroll.html: Added.
2:09 PM Changeset in webkit [211386] by jer.noble@apple.com
  • 2 edits in trunk/Source/WebCore

NULL-deref crash at PlatformMediaSession::endInterruption
https://bugs.webkit.org/show_bug.cgi?id=167595

Reviewed by Eric Carlson.

Use the same, NULL-aware forEachSession() iterator rather than iterating over m_sessions directly.

  • platform/audio/PlatformMediaSessionManager.cpp:

(WebCore::PlatformMediaSessionManager::beginInterruption):
(WebCore::PlatformMediaSessionManager::endInterruption):

2:01 PM Changeset in webkit [211385] by Matt Baker
  • 15 edits
    1 copy
    2 adds in trunk

Web Inspector: Need some limit on Async Call Stacks for async loops (rAF loops)
https://bugs.webkit.org/show_bug.cgi?id=165633
<rdar://problem/29738502>

Reviewed by Joseph Pecoraro.

Source/JavaScriptCore:

This patch limits the memory used by the Inspector backend to store async
stack trace data.

Asynchronous stack traces are stored as a disjoint set of parent pointer
trees. Tree nodes represent asynchronous operations, and hold a copy of
the stack trace at the time the operation was scheduled. Each tree can
be regarded as a set of stack traces, stored as singly linked lists that
share part of their structure (specifically their tails). Traces belonging
to the same tree will at least share a common root. A stack trace begins
at a leaf node and follows the chain of parent pointers to the root of
of the tree. Leaf nodes always contain pending asynchronous calls.

When an asynchronous operation is scheduled with requestAnimationFrame,
setInterval, etc, a node is created containing the current call stack and
some bookkeeping data for the operation. An unique identifier comprised
of an operation type and callback identifier is mapped to the node. If
scheduling the callback was itself the result of an asynchronous call,
the node becomes a child of the node associated with that call, otherwise
it becomes the root of a new tree.

A node is either pending, active, dispatched, or canceled. Nodes
start out as pending. After a callback for a pending node is dispatched
the node is marked as such, unless it is a repeating callback such as
setInterval, in which case it remains pending. Once a node is no longer
pending it is removed, as long as it has no children. Since nodes are
reference counted, it is a property of the stack trace tree that nodes
that are no longer pending and have no children pointing to them will be
automatically pruned from the tree.

If an async operation is canceled (e.g. cancelTimeout), the associated
node is marked as such. If the callback is not being dispatched at the
time, and has no children, it is removed.

Because async operations can be chained indefinitely, stack traces are
limited to a maximum depth. The depth of a stack trace is equal to the
sum of the depths of its nodes, with a node's depth equal to the number
of frames in its associated call stack. For any stack trace,

S = { s𝟶, s𝟷, …, s𝑘 }, with endpoints s𝟶, s𝑘
depth(S) = depth(s𝟶) + depth(s𝟷) + … + depth(s𝑘)

A stack trace is truncated when it exceeds the maximum depth. Truncation
occurs on node boundaries, not call frames, consequently the maximum depth
is more of a target than a guarantee:

d = maximum stack trace depth
for all S, depth(S) ≤ d + depth(s𝑘)

Because nodes can belong to multiple stack traces, it may be necessary
to clone the tail of a stack trace being truncated to prevent other traces
from being effected.

  • CMakeLists.txt:
  • JavaScriptCore.xcodeproj/project.pbxproj:
  • inspector/AsyncStackTrace.cpp: Added.

(Inspector::AsyncStackTrace::create):
(Inspector::AsyncStackTrace::AsyncStackTrace):
(Inspector::AsyncStackTrace::~AsyncStackTrace):
(Inspector::AsyncStackTrace::isPending):
(Inspector::AsyncStackTrace::isLocked):
(Inspector::AsyncStackTrace::willDispatchAsyncCall):
(Inspector::AsyncStackTrace::didDispatchAsyncCall):
(Inspector::AsyncStackTrace::didCancelAsyncCall):
(Inspector::AsyncStackTrace::buildInspectorObject):
(Inspector::AsyncStackTrace::truncate):
(Inspector::AsyncStackTrace::remove):

  • inspector/AsyncStackTrace.h:
  • inspector/agents/InspectorDebuggerAgent.cpp:

(Inspector::InspectorDebuggerAgent::didScheduleAsyncCall):
(Inspector::InspectorDebuggerAgent::didCancelAsyncCall):
(Inspector::InspectorDebuggerAgent::willDispatchAsyncCall):
(Inspector::InspectorDebuggerAgent::didDispatchAsyncCall):
(Inspector::InspectorDebuggerAgent::didPause):
(Inspector::InspectorDebuggerAgent::clearAsyncStackTraceData):
(Inspector::InspectorDebuggerAgent::buildAsyncStackTrace): Deleted.
(Inspector::InspectorDebuggerAgent::refAsyncCallData): Deleted.
(Inspector::InspectorDebuggerAgent::derefAsyncCallData): Deleted.

  • inspector/agents/InspectorDebuggerAgent.h:
  • inspector/protocol/Console.json:

Source/WebInspectorUI:

  • Localizations/en.lproj/localizedStrings.js:

Text for "Truncated" marker tree element.

  • UserInterface/Models/StackTrace.js:

(WebInspector.StackTrace):
(WebInspector.StackTrace.fromPayload):
(WebInspector.StackTrace.prototype.get truncated):
Plumbing for new Console.StackTrace property truncated.

  • UserInterface/Views/ThreadTreeElement.css:

(.tree-outline > .item.thread + ol > .item.truncated-call-frames):
(.tree-outline > .item.thread + ol > .item.truncated-call-frames .icon):
Styles for "Truncated" marker tree element.

  • UserInterface/Views/ThreadTreeElement.js:

(WebInspector.ThreadTreeElement.prototype.refresh):
Append "Truncated" marker tree element if necessary.

  • Versions/Inspector-iOS-10.3.json:

LayoutTests:

Add truncation test cases and cleanup call frame logging.

  • inspector/debugger/async-stack-trace-expected.txt:
  • inspector/debugger/async-stack-trace.html:
  • inspector/debugger/resources/log-active-stack-trace.js: Added.

(TestPage.registerInitializer.window.getActiveStackTrace):
(TestPage.registerInitializer.logStackTrace.logCallFrame):
(TestPage.registerInitializer.):
(TestPage.registerInitializer.window.logActiveStackTrace):
(TestPage.registerInitializer):

1:02 PM Changeset in webkit [211384] by matthew_hanson@apple.com
  • 3 edits in branches/safari-604.1.5-branch/Source/WebKit/mac

Merge r211323. rdar://problem/30107776

1:02 PM Changeset in webkit [211383] by matthew_hanson@apple.com
  • 6 edits in branches/safari-604.1.5-branch/Source

Versioning.

12:43 PM Changeset in webkit [211382] by mmaxfield@apple.com
  • 7 edits in trunk

Correct spacing regression on inter-element complex path shaping on some fonts
https://bugs.webkit.org/show_bug.cgi?id=166013

Reviewed by Simon Fraser.

Source/WebCore:

This patch brings the implementation of ComplexTextController in-line with the
design at https://trac.webkit.org/wiki/ComplexTextController. Previously,
ComplexTextController had a few problems:

you iterated over the entire string and added up the advances

  • FontCascade::getGlyphsAndAdvancesForComplexText() tried to compensate for

the above by construing the concepts of paint advances as distinct from layout
advances

  • Initial advances were considered part of layout sometimes and part of painting

other times, depending on which function reports the information

  • For RTL runs, the wrong origin was added to the initial advance, and the origin

should have been subtracted instead of added

This patch exhaustively updates every function in ComplexTextController to be
consistent with the design linked to above. This design solves all of these
problems.

Tests: ComplexTextControllerTest.InitialAdvanceWithLeftRunInRTL

ComplexTextControllerTest.InitialAdvanceInRTL
ComplexTextControllerTest.InitialAdvanceWithLeftRunInLTR
ComplexTextControllerTest.InitialAdvanceInLTR
ComplexTextControllerTest.InitialAdvanceInRTLNoOrigins
ComplexTextControllerTest.LeadingExpansion
ComplexTextControllerTest.VerticalAdvances

  • platform/graphics/GlyphBuffer.h:

(WebCore::GlyphBuffer::setLeadingExpansion): Deleted. No longer necessary.
(WebCore::GlyphBuffer::leadingExpansion): Deleted. Ditto.

  • platform/graphics/cocoa/FontCascadeCocoa.mm:

(WebCore::FontCascade::adjustSelectionRectForComplexText): Removed use of
unnecessary leadingExpansion().
(WebCore::FontCascade::getGlyphsAndAdvancesForComplexText): This function needs
to compute paint advances, which means that it can't base this information off
of layout advances. This function uses the trick mentioned at the end of the
above link to compute the paint offset of an arbitrary glyph in the middle of
an RTL run.

  • platform/graphics/mac/ComplexTextController.cpp:

(WebCore::ComplexTextController::computeExpansionOpportunity): Refactored for
testing.
(WebCore::ComplexTextController::ComplexTextController): Ditto.
(WebCore::ComplexTextController::finishConstruction): Ditto.
(WebCore::ComplexTextController::offsetForPosition): This function operates on
layout advances, and the initial layout advance is already added into the
m_adjustedBaseAdvances vector by adjustGlyphsAndAdvances(). Therefore, there is
no need to add it again here.
(WebCore::ComplexTextController::advance): This function had completely busted
logic about the relationship between initial advances and the first origin in
each run. Because of the fortunate choice of only representing layout advances
in m_adjustedBaseAdvances, this entire block can be removed and the raw paint
initial advance can be reported to the GlyphBuffer. Later in the function, we
have to update the logic about how to compute a paint advance given a layout
advance and some origins. In particular, there are two tricky pieces here: 1.
The layout advance for the first glyph is equal to (initial advance - first
origin + first Core Text advance, so computing the paint offset must cancel out
the initial layout offset, and 2. the last paint advance in a run must actually
end up at the position of the first glyph in the next run, so the next run's
initial advance must be queried.
(WebCore::ComplexTextController::adjustGlyphsAndAdvances): Previously, we
represented an initial advance of a successive run by just adding it to the
previous run's last advance. However, this is incompatible with the new model
presented in the link above, so we remove this section. We also have to add in
the logic that the layout advance for the first glyph is equal to the formula
presented above.

  • platform/graphics/mac/ComplexTextController.h:

(WebCore::ComplexTextController::ComplexTextRun::initialAdvance): Adjust comment
to reflect reality.
(WebCore::ComplexTextController::leadingExpansion): Deleted.

Tools:

Unskip existing tests and make some new tests:

  • Testing complex text with no origins
  • Testing initial expansions
  • Testing the sign of vertical advances
  • TestWebKitAPI/Tests/WebCore/ComplexTextController.cpp:

(TestWebKitAPI::TEST_F):

12:08 PM Changeset in webkit [211381] by Ryan Haddad
  • 15 edits
    3 deletes in trunk

Unreviewed, rolling out r211345.

The LayoutTest for this change is failing an assertion.

Reverted changeset:

"Web Inspector: Need some limit on Async Call Stacks for async
loops (rAF loops)"
https://bugs.webkit.org/show_bug.cgi?id=165633
http://trac.webkit.org/changeset/211345

12:05 PM Changeset in webkit [211380] by clopez@igalia.com
  • 2 edits in trunk/Tools

[GTK][EFL] Avoid using a thin directory to create the built product on the archive-built-product step.
https://bugs.webkit.org/show_bug.cgi?id=167596

Reviewed by Daniel Bates.

We avoid needing a thin directory by invoking the zip program with
the list of directories from the build directory to be zipped,
and by using the zip feature to exclude files matching a pattern.

  • BuildSlaveSupport/built-product-archive:

(copyBuildFiles):
(createZipFromList):
(archiveBuiltProduct):

11:46 AM Changeset in webkit [211379] by Simon Fraser
  • 16 edits
    6 adds in trunk

Fixed elements should not rubber-band in WK2, nor remain at negative offsets
https://bugs.webkit.org/show_bug.cgi?id=167484
rdar://problem/29453068

Reviewed by Dean Jackson.
Source/WebCore:

There were various problems with the layout rect computation:

  1. It ignored the scrollBehaviorForFixedElements() which we use to avoid rubber-banding fixed elements in WK2, but allow in WK1, so make use of that.
  2. Sometimes layouts/paints of fixed elements would be triggered when coalesced calls to AsyncScrollingCoordinator::scheduleUpdateScrollPositionAfterAsyncScroll() failed to copy the layoutViewportOrigin to the scheduled update.
  3. The layout viewport could be left with a negative top/left after rubber-banding.

Also add a way to do unconstrained scrollTo(), so that a test can call window.scrollTo(-10, -10) to
simulate rubberbanding.

Tests: fast/visual-viewport/rubberbanding-viewport-rects-header-footer.html

fast/visual-viewport/rubberbanding-viewport-rects.html

  • page/FrameView.cpp:

(WebCore::FrameView::computeLayoutViewportOrigin): Handle ScrollBehaviorForFixedElements, incorporating it
into logic that clamps layoutViewportOrigin between min/max when rubberbanding is not allowed, or not in progress.
(WebCore::FrameView::updateLayoutViewport): Pass in scrollBehaviorForFixedElements().
(WebCore::FrameView::visibleDocumentRect): The clamping here was preventing the visible rect from
escaping the document bounds, which caused fixed elements to bounce with rubber-banding, so remove the clamping,
and fix the logic to allow rubber-banding while taking headers and footers into account.

  • page/FrameView.h:
  • page/scrolling/AsyncScrollingCoordinator.cpp:

(WebCore::AsyncScrollingCoordinator::scheduleUpdateScrollPositionAfterAsyncScroll): layoutViewportOrigin has to
be pushed onto the scheduled update, just like scroll position.

  • page/scrolling/ScrollingTreeFrameScrollingNode.cpp:

(WebCore::ScrollingTreeFrameScrollingNode::layoutViewportForScrollPosition): Pass in m_behaviorForFixed.

  • platform/ScrollView.cpp:

(WebCore::ScrollView::ScrollView):
(WebCore::ScrollView::adjustScrollPositionWithinRange):
(WebCore::ScrollView::setScrollOffset):

  • platform/ScrollView.h:

(WebCore::ScrollView::setAllowsUnclampedScrollPositionForTesting):
(WebCore::ScrollView::allowsUnclampedScrollPosition):

  • testing/InternalSettings.cpp:

(WebCore::InternalSettings::setAllowUnclampedScrollPosition):

  • testing/InternalSettings.h:
  • testing/InternalSettings.idl:

Source/WebKit2:

Pass in StickToViewportBounds as we did before visual viewports.

  • UIProcess/ios/WebPageProxyIOS.mm:

(WebKit::WebPageProxy::computeCustomFixedPositionRect):

LayoutTests:

Add two tests that use internals.settings.setAllowUnclampedScrollPosition(true) and then
over-scroll to simulator rubber-banding, dumping viewport rects.

setAllowUnclampedScrollPosition() only works in WebKit2, so skip the tests elsewhere.

  • TestExpectations:
  • fast/visual-viewport/rubberbanding-viewport-rects-expected.txt: Added.
  • fast/visual-viewport/rubberbanding-viewport-rects-header-footer-expected.txt: Added.
  • fast/visual-viewport/rubberbanding-viewport-rects-header-footer.html: Added.
  • fast/visual-viewport/rubberbanding-viewport-rects.html: Added.
  • platform/ios-simulator-wk2/TestExpectations:
  • platform/ios-simulator-wk2/fast/visual-viewport/rubberbanding-viewport-rects-expected.txt: Added.
  • platform/ios-simulator-wk2/fast/visual-viewport/rubberbanding-viewport-rects-header-footer-expected.txt: Added.
  • platform/mac-wk2/TestExpectations:
11:40 AM Changeset in webkit [211378] by matthew_hanson@apple.com
  • 1 copy in branches/safari-604.1.5-branch

New Branch.

10:59 AM Changeset in webkit [211377] by Wenson Hsieh
  • 2 edits in trunk/Source/WebCore

Web content process crashes when initiating a drag on a very large image
https://bugs.webkit.org/show_bug.cgi?id=167564

Reviewed by Beth Dakin.

If we begin dragging an image element that is too large to show the cached image for, we will show an image file
icon instead of the cached image. This may return null if createDragImageIconForCachedImageFilename is
unimplemented, so in the meantime, we should not assume that dragImage will always exist before calling into
doSystemDrag in doImageDrag and bail from the drag operation if that is the case.

  • page/DragController.cpp:

(WebCore::DragController::doImageDrag):

10:45 AM Changeset in webkit [211376] by Chris Dumez
  • 20 edits in trunk/Source

Update DiagnosticLoggingClient::logDiagnosticMessageWithValue() to take in the value as a double
https://bugs.webkit.org/show_bug.cgi?id=167536

Reviewed by Darin Adler.

Update DiagnosticLoggingClient::logDiagnosticMessageWithValue() to take in the value as a double
instead of a string. The value needs to be numeric and the current API is error-prone.

Source/WebCore:

  • html/HTMLMediaElement.cpp:

(WebCore::HTMLMediaElement::mediaPlayerEngineFailedToLoad):

  • loader/EmptyClients.cpp:
  • page/DiagnosticLoggingClient.h:

Source/WebKit2:

  • NetworkProcess/NetworkProcess.cpp:

(WebKit::NetworkProcess::logDiagnosticMessage):
(WebKit::NetworkProcess::logDiagnosticMessageWithResult):
(WebKit::NetworkProcess::logDiagnosticMessageWithValue):

  • NetworkProcess/NetworkProcess.h:
  • Scripts/webkit/messages.py:

(headers_for_type):

  • Shared/WebCoreArgumentCoders.h:
  • UIProcess/HighPerformanceGraphicsUsageSampler.cpp:

(WebKit::HighPerformanceGraphicsUsageSampler::timerFired):

  • UIProcess/Network/NetworkProcessProxy.cpp:

(WebKit::NetworkProcessProxy::logDiagnosticMessage):
(WebKit::NetworkProcessProxy::logDiagnosticMessageWithResult):
(WebKit::NetworkProcessProxy::logDiagnosticMessageWithValue):

  • UIProcess/Network/NetworkProcessProxy.h:
  • UIProcess/Network/NetworkProcessProxy.messages.in:
  • UIProcess/PerActivityStateCPUUsageSampler.cpp:

(WebKit::PerActivityStateCPUUsageSampler::loggingTimerFired):

  • UIProcess/WebBackForwardList.cpp:

(WebKit::WebBackForwardList::goToItem):

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::logDiagnosticMessage):
(WebKit::WebPageProxy::logDiagnosticMessageWithResult):
(WebKit::WebPageProxy::logDiagnosticMessageWithValue):

  • UIProcess/WebPageProxy.h:
  • UIProcess/WebPageProxy.messages.in:
  • WebProcess/WebCoreSupport/WebDiagnosticLoggingClient.cpp:

(WebKit::WebDiagnosticLoggingClient::logDiagnosticMessage):
(WebKit::WebDiagnosticLoggingClient::logDiagnosticMessageWithResult):
(WebKit::WebDiagnosticLoggingClient::logDiagnosticMessageWithValue):

  • WebProcess/WebCoreSupport/WebDiagnosticLoggingClient.h:
10:18 AM Changeset in webkit [211375] by Ryan Haddad
  • 8 edits in trunk

Unreviewed, rollout r211235 Pointer lock events should be delivered directly to the target element.

The LayoutTest for this change is frequently failing.

Source/WebCore:

  • page/EventHandler.cpp:

(WebCore::EventHandler::handleMousePressEvent):
(WebCore::EventHandler::handleMouseDoubleClickEvent):
(WebCore::EventHandler::handleMouseMoveEvent):
(WebCore::EventHandler::handleMouseReleaseEvent):
(WebCore::EventHandler::handleMouseForceEvent):
(WebCore::EventHandler::handleWheelEvent):

  • page/PointerLockController.cpp:

(WebCore::PointerLockController::isLocked): Deleted.
(WebCore::PointerLockController::dispatchLockedWheelEvent): Deleted.

  • page/PointerLockController.h:

LayoutTests:

  • platform/mac/TestExpectations:
  • pointer-lock/mouse-event-delivery-expected.txt:
  • pointer-lock/mouse-event-delivery.html:
10:16 AM Changeset in webkit [211374] by graouts@webkit.org
  • 7 edits in trunk

LayoutTest media/modern-media-controls/media-controller/media-controller-auto-hide-mouse-leave-after-play.html is flaky
https://bugs.webkit.org/show_bug.cgi?id=167254
<rdar://problem/30259293>

Reviewed by Dean Jackson.

Source/WebCore:

When we would identify that we need to prolong an existing auto-hide timer, when the previous
auto-hide timer was marked as non-cancelable, calling _cancelAutoHideTimer() would not actually
cancel the previous timer, which would let it fire and hide the controls bar. We now have two
methods, _cancelAutoHideTimer() which always cancels the current auto-hide timer, and
_cancelNonEnforcedAutoHideTimer() which is used from all other existing call sites, which only
cancels the current auto-hide timer if it was marked as cancelable. This, and revised timing in
the test itself, make media/modern-media-controls/media-controller/media-controller-auto-hide-
mouse-leave-after-play.html a lot more reliable.

We also make a small drive-by fix where we ensure the "autoHideDelay" property is set first so
that setting other members which may set a timer do not used an undefined value for the auto-hide
timer delay.

  • Modules/modern-media-controls/controls/controls-bar.js:

(ControlsBar.prototype.set visible):
(ControlsBar.prototype.handleEvent):
(ControlsBar.prototype._cancelNonEnforcedAutoHideTimer):
(ControlsBar.prototype._cancelAutoHideTimer):

LayoutTests:

We improve the test by setting off timers when the actual "play" and "pause" events are
triggered rather than when we call .play() or .pause() on the media element. This matches
when the auto-hide timer are set in ControlsBar and makes the test more robust. Combined
with the modern-media-controls WebCore module source changes, we can now stop marking this
test as flaky.

We apply the same change to media/modern-media-controls/media-controller/media-controller-auto-hide-pause.html
since it also sets off a timer based on the media being paused.

  • media/modern-media-controls/media-controller/media-controller-auto-hide-mouse-leave-after-play-expected.txt:
  • media/modern-media-controls/media-controller/media-controller-auto-hide-mouse-leave-after-play.html:
  • media/modern-media-controls/media-controller/media-controller-auto-hide-pause.html:
  • platform/mac/TestExpectations:
10:14 AM Changeset in webkit [211373] by dbates@webkit.org
  • 11 edits
    3 adds
    1 delete in trunk/LayoutTests

[QuickLook] Make HTTP QuickLook tests work in Apple Internal DumpRenderTree
https://bugs.webkit.org/show_bug.cgi?id=167483

Reviewed by Andy Estes.

Write QuickLook tests that tap a hyperlink in terms of UIHelper (in LayoutTests/resources/ui-helper.js)
so that we can run these tests in an Apple Internal build of DumpRenderTree.

  • http/tests/quicklook/at-import-stylesheet-blocked.html: Write in terms of UIHelper.
  • http/tests/quicklook/base-url-blocked.html: Ditto.
  • http/tests/quicklook/cross-origin-iframe-blocked.html: Ditto.
  • http/tests/quicklook/document-domain-is-empty-string.html: Ditto.
  • http/tests/quicklook/external-stylesheet-blocked.html: Ditto.
  • http/tests/quicklook/hide-referer-on-navigation.html: Ditto.
  • http/tests/quicklook/resources/tap-at-point-and-notify-done.js: Removed.
  • http/tests/quicklook/resources/tap-run-test-hyperlink.js: Added.

(runTest):

  • http/tests/quicklook/submit-form-blocked.html: Ditto.
  • http/tests/quicklook/top-navigation-blocked.html: Ditto.
  • platform/ios-simulator-wk1/TestExpectations: Unskip QuickLook tests as we can now run

them in an Apple Internal build of DumpRenderTree. Note that these test are listed in
file LayoutTests/platform/ios-simulator/TestExpectations so that they are skipped in
WebKit for iOS Simulator built with the public iOS SDK as we need to fix <https://bugs.webkit.org/show_bug.cgi?id=141906>.

  • platform/ios-simulator-wk1/http/tests/quicklook/top-navigation-blocked-expected.txt: Added.

For some reason the console message "Unsafe JavaScript attempt to initiate navigation" includes
a line number in DumpRenderTree (why?). This line number is not emitted when the test is run
in WebKitTestRunner. Add platform-specific result for now.

10:13 AM Changeset in webkit [211372] by Carlos Garcia Campos
  • 5 edits in trunk/Source/WebCore

REGRESSION(r202615?): [GStreamer] ASSERTION FAILED: isMainThread() in WebCore::BuiltinResourceHandleConstructorMap& WebCore::builtinResourceHandleConstructorMap()
https://bugs.webkit.org/show_bug.cgi?id=167003

Reviewed by Michael Catanzaro.

Add a way to create a ResourceHandle for a given SoupNetworkSession and use it in the GStreamer streaming client
to ensure both the session and the handle are created and destroyed in the secondary thread. This way we also
avoid using the default session for downloading HLS fragments.

  • platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:

(ResourceHandleStreamingClient::ResourceHandleStreamingClient): Create a SoupNetworkSession and pass it to ResourceHandle::create().

  • platform/network/ResourceHandle.h: Add create and constructor to receive a SoupNetworkSession.
  • platform/network/ResourceHandleInternal.h: Add SoupNetworkSession member.
  • platform/network/soup/ResourceHandleSoup.cpp:

(WebCore::ResourceHandleInternal::soupSession): Return the SoupNetworkSession if not nullptr.
(WebCore::ResourceHandle::create): Create a ResourceHandle without trying to use any builtin constructor and
using the given SoupNetworkSession.
(WebCore::ResourceHandle::ResourceHandle): Set the SoupNetworkSession if early request validations didn't fail.

9:36 AM Changeset in webkit [211371] by commit-queue@webkit.org
  • 10 edits
    1 copy
    1 add in trunk/Source/WebCore

[WebRTC] Add support for libwebrtc data channel
https://bugs.webkit.org/show_bug.cgi?id=167489

Patch by Youenn Fablet <youennf@gmail.com> on 2017-01-30
Reviewed by Alex Christensen.

Partially covered by webrtc/datachannel/basic.html but not yet enabled on bots.

Introducing LibWebRTCDataChannelHandler as the integration layer between WebCore (RTCDataChannel)
and libwebrtc (DataChannelObserver).

  • Modules/mediastream/RTCDataChannel.cpp:

(WebCore::RTCDataChannel::create):
(WebCore::RTCDataChannel::RTCDataChannel):
(WebCore::RTCDataChannel::bufferedAmount):
(WebCore::RTCDataChannel::bufferedAmountIsDecreasing):

  • Modules/mediastream/RTCDataChannel.h:
  • Modules/mediastream/libwebrtc/LibWebRTCDataChannelHandler.cpp: Added.

(WebCore::LibWebRTCDataChannelHandler::~LibWebRTCDataChannelHandler):
(WebCore::LibWebRTCDataChannelHandler::setClient):
(WebCore::LibWebRTCDataChannelHandler::sendStringData):
(WebCore::LibWebRTCDataChannelHandler::sendRawData):
(WebCore::LibWebRTCDataChannelHandler::close):
(WebCore::LibWebRTCDataChannelHandler::OnStateChange):
(WebCore::LibWebRTCDataChannelHandler::OnMessage):

  • Modules/mediastream/libwebrtc/LibWebRTCDataChannelHandler.h:
  • Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp:

(WebCore::LibWebRTCMediaEndpoint::OnRemoveStream):
(WebCore::LibWebRTCMediaEndpoint::addDataChannel):
(): Deleted.

  • Modules/mediastream/libwebrtc/LibWebRTCPeerConnectionBackend.cpp:

(WebCore::LibWebRTCPeerConnectionBackend::createDataChannelHandler):

  • dom/EventNames.h:
  • platform/mediastream/RTCDataChannelHandler.h:
  • platform/mediastream/RTCDataChannelHandlerClient.h:
  • platform/mock/RTCDataChannelHandlerMock.h:
9:31 AM Changeset in webkit [211370] by Jonathan Bedard
  • 10 edits
    1 add in trunk/Tools

Use simctl instead of LayoutTestRelay
https://bugs.webkit.org/show_bug.cgi?id=165927

Reviewed by Daniel Bates.

Part 1

LayoutTestRelay uses SPI, since recent versions of the iOS SDK allow for installing apps on
simulators through simctl (iOS 10 and later), use this functionality instead.

  • Scripts/webkitpy/port/base.py:

(Port.init): Added _test_runner_process_constructor.

  • Scripts/webkitpy/port/darwin.py:

(DarwinPort.app_identifier_from_bundle): Added function to extract bundle ID from plist.

  • Scripts/webkitpy/port/driver.py:

(Driver._start): Pass worker_number to server_process so we can look up the correct simulator device to use.
(IOSSimulatorDriver): Deleted.

  • Scripts/webkitpy/port/driver_unittest.py:

(DriverTest.test_stop_cleans_up_properly): Set _test_runner_process_constructor for testing.
(DriverTest.test_two_starts_cleans_up_properly): Ditto.
(DriverTest.test_start_actually_starts): Ditto.

  • Scripts/webkitpy/port/ios.py:

(IOSSimulatorPort): Remove relay_name.
(IOSSimulatorPort.init): Set _test_runner_process_constructor to SimulatorProcess for IOSSimulatorPort.
(IOSSimulatorPort._create_simulators): Formatting change.
(IOSSimulatorPort.relay_path): Deleted.
(IOSSimulatorPort._check_relay): Deleted.
(IOSSimulatorPort._check_port_build): Deleted. Use base class implementation
(IOSSimulatorPort._build_relay): Deleted.
(IOSSimulatorPort._build_driver): Deleted. Use base class implementation
(IOSSimulatorPort._driver_class): Deleted. Use base class implementation

  • Scripts/webkitpy/port/ios_unittest.py:

(iosTest.test_32bit): Update test.
(iosTest.test_64bit): Update test.

  • Scripts/webkitpy/port/server_process.py:

(ServerProcess.init): Added argument worker_number. This class does not make use of it. We will make use of this argument in SimulatorProcess to lookup the associated simulator device.
(ServerProcess._set_file_nonblocking): Added to share common code.

  • Scripts/webkitpy/port/server_process_mock.py:

(MockServerProcess.init): Added argument worker_number.

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

(SimulatorProcess): Added.
(SimulatorProcess.Popen): Added.
(SimulatorProcess.Popen.init): Added. Initialize Popen structure with stdin, stdout, stderr and pid.
(SimulatorProcess.Popen.poll): Added. Check if the process is running.
(SimulatorProcess.Popen.wait): Added. Wait for process to close.
(SimulatorProcess.init): Added. Install app to device specified through port and worker_number.
(SimulatorProcess._reset): Added. Unlink fifos.
(SimulatorProcess._start): Added. Launch app on simulator, link fifos.
(SimulatorProcess._kill): Added. Shutdown app on simulator.

  • Scripts/webkitpy/xcode/simulator.py:

(Device.init): Accept host to run install/launch/terminate.
(Device.install_app): Install app to target Device.
(Device.launch_app): Launch app on target Device.
(Device.terminate_app): Shutdown app on target Device.
(Simulator._parse_devices): Pass host to Device.

9:09 AM Changeset in webkit [211369] by clopez@igalia.com
  • 2 edits in trunk/Tools

[GTK] pixman fails to compile on Raspberry Pi (GCC crash)
https://bugs.webkit.org/show_bug.cgi?id=167411

Reviewed by Michael Catanzaro.

Disable the ARM iwMMXt fast path for pixman, because it triggers
a GCC bug on the RPi with Raspbian/PIXEL causing a build failure.

  • gtk/jhbuild.modules:
9:04 AM Changeset in webkit [211368] by Csaba Osztrogonác
  • 2 edits in trunk/Source/WebKit2

[Mac][cmake] Fix the build after r211354.
https://bugs.webkit.org/show_bug.cgi?id=167565

Unreviewed buildfix.

  • PlatformMac.cmake:
8:53 AM Changeset in webkit [211367] by magomez@igalia.com
  • 2 edits in trunk/Source/WebKit2

[GTK] Scrolling iframes, doesn't redraw their content
https://bugs.webkit.org/show_bug.cgi?id=167581

Reviewed by Carlos Garcia Campos.

Take into account whether we are using AC or not in order to repaint an area after scrolling.

No behaviour change, no new tests.

  • WebProcess/WebCoreSupport/WebChromeClient.cpp:

(WebKit::WebChromeClient::invalidateContentsForSlowScroll):

8:47 AM Changeset in webkit [211366] by Carlos Garcia Campos
  • 2 edits in trunk/Source/WebKit2

Unreviewed. Fix GTK+ debug build after r211365.

Remove invalid assert.

  • WebProcess/WebPage/AcceleratedDrawingArea.cpp:

(WebKit::AcceleratedDrawingArea::exitAcceleratedCompositingModeNow):

8:42 AM Changeset in webkit [211365] by Carlos Garcia Campos
  • 7 edits in trunk/Source/WebKit2

[GTK] Do not release OpenGL resource immediately when leaving accelerated compositing mode
https://bugs.webkit.org/show_bug.cgi?id=167544

Reviewed by Michael Catanzaro.

Sometimes the conditions to be in AC mode or not change quickly, and then we leave AC mode just enter it again
after a very short period of time. In those cases we are dropping all the GL resources and the compositor
thread, and creating it again. We could keep the layer tree host alive for a while when exiting AC mode, and
reuse it if we enter AC mode before the previous one has been discarded. While the previous layer tree host is
alive we still need to keep it up to date, for example if the web view is resized or contents size change, and
synchronize with the threaded compositor when it becomes the layer tree host again.

  • WebProcess/WebPage/AcceleratedDrawingArea.cpp:

(WebKit::AcceleratedDrawingArea::~AcceleratedDrawingArea): Discard the previous layer tree host.
(WebKit::AcceleratedDrawingArea::AcceleratedDrawingArea): Initialize the timer to discard the previous layer
tree host.
(WebKit::AcceleratedDrawingArea::pageBackgroundTransparencyChanged): Notify the previous layer tree host if needed.
(WebKit::AcceleratedDrawingArea::mainFrameContentSizeChanged): Ditto.
(WebKit::AcceleratedDrawingArea::updateBackingStoreState): Ditto.
(WebKit::AcceleratedDrawingArea::enterAcceleratedCompositingMode): Reuse the previous layer tree host if possible.
(WebKit::AcceleratedDrawingArea::exitAcceleratedCompositingModeNow): Exit AC mode and save the layer tree host
starting a timer of 5 seconds to discard it if not reused.
(WebKit::AcceleratedDrawingArea::discardPreviousLayerTreeHost): Invalidate and destroy the previous layer tree host.
(WebKit::AcceleratedDrawingArea::didChangeViewportAttributes): Notify the previous layer tree host if needed.
(WebKit::AcceleratedDrawingArea::deviceOrPageScaleFactorChanged): Ditto.

  • WebProcess/WebPage/AcceleratedDrawingArea.h:
  • WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.cpp:

(WebKit::ThreadedCoordinatedLayerTreeHost::scrollNonCompositedContents): If it's discardable add the action to
be synchronized instead.
(WebKit::ThreadedCoordinatedLayerTreeHost::contentsSizeChanged): Ditto.
(WebKit::ThreadedCoordinatedLayerTreeHost::deviceOrPageScaleFactorChanged): Ditto.
(WebKit::ThreadedCoordinatedLayerTreeHost::pageBackgroundTransparencyChanged): Ditto.
(WebKit::ThreadedCoordinatedLayerTreeHost::sizeDidChange): Ditto.
(WebKit::ThreadedCoordinatedLayerTreeHost::didChangeViewportAttributes): Ditto.
(WebKit::ThreadedCoordinatedLayerTreeHost::setIsDiscardable): When the layer tree host becomes discardable,
reset the sync actions and return. When it becomes the real layer tree host again, apply all pending actions to
synchronize with the threaded compositor.

  • WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.h:
  • WebProcess/WebPage/DrawingAreaImpl.cpp:

(WebKit::DrawingAreaImpl::scroll): Notify the previous layer tree host if needed.
(WebKit::DrawingAreaImpl::mainFrameContentSizeChanged): Ditto.
(WebKit::DrawingAreaImpl::exitAcceleratedCompositingMode): Use AcceleratedDrawingArea::exitAcceleratedCompositingModeNow().

  • WebProcess/WebPage/LayerTreeHost.h:

(WebKit::LayerTreeHost::setIsDiscardable): Added.

8:35 AM Changeset in webkit [211364] by Manuel Rego Casasnovas
  • 3 edits
    2 deletes in trunk/Source/WebKit2

[GTK] Remove support to enable/disable experimental features
https://bugs.webkit.org/show_bug.cgi?id=167586

Reviewed by Michael Catanzaro.

As requested in bug #167578 we should remove the support to enable/disable
experimental features in WebKitGTK+.
One reason is that CSS Grid Layout is going to be enabled by default now,
so we don't need it to be in this file.
Another is that this support needs to be rewritten to use
the enumerable experimental features API.

  • PlatformGTK.cmake:
  • UIProcess/API/gtk/WebKitSettings.cpp:

(webKitSettingsConstructed):

  • UIProcess/gtk/ExperimentalFeatures.cpp: Removed.
  • UIProcess/gtk/ExperimentalFeatures.h: Removed.
7:38 AM EnvironmentVariables edited by Michael Catanzaro
Removed WEBKITGTK_EXPERIMENTAL_FEATURES (diff)
6:31 AM WebKitGTK/2.14.x edited by clopez@igalia.com
(diff)
5:50 AM WebKitGTK/2.14.x edited by Michael Catanzaro
(diff)
5:50 AM Changeset in webkit [211363] by Carlos Garcia Campos
  • 8 edits in trunk

[GTK] Add API to handle the accelerated compositing policy
https://bugs.webkit.org/show_bug.cgi?id=167509

Reviewed by Michael Catanzaro.

Source/WebKit2:

Now that we have brought back the on demand mode, we should allow applications to choose the policy, without
having to deal with environment variables. Settings also allows to set different policy depending on the web
view, so for example evolution could disable AC for the composer, but leave the on demand mode for the email
viewer. This patch adds a single new setting hardware-acceleration-policy to handle both
acceleratedCompositingEnabled and forceCompositingMode preferences using an enum with values
WEBKIT_HARDWARE_ACCELERATION_POLICY_ON_DEMAND, WEBKIT_HARDWARE_ACCELERATION_POLICY_ALWAYS and
WEBKIT_HARDWARE_ACCELERATION_POLICY_NEVER.

  • UIProcess/API/gtk/WebKitSettings.cpp:

(webKitSettingsSetProperty): Add setter for hardware-acceleration-policy property.
(webKitSettingsGetProperty): Add getter for hardware-acceleration-policy property.
(webkit_settings_class_init): Add hardware-acceleration-policy property.
(webkit_settings_get_hardware_acceleration_policy): Return policy according to the preferences.
(webkit_settings_set_hardware_acceleration_policy): set preferences according to the given policy.

  • UIProcess/API/gtk/WebKitSettings.h:
  • UIProcess/API/gtk/docs/webkit2gtk-4.0-sections.txt: Add new symbols.
  • WebProcess/WebPage/DrawingAreaImpl.cpp:

(WebKit::DrawingAreaImpl::updatePreferences):

Tools:

Handle new setting in MiniBrowser. The settings dialog doesn't support enum settings so it needs to be handled
as a special case. Also add test cases to the get/set API.

  • MiniBrowser/gtk/BrowserSettingsDialog.c:

(hardwareAccelerationPolicyToString):
(stringToHardwareAccelerationPolicy):
(cellRendererChanged):
(browserSettingsDialogConstructed):

  • TestWebKitAPI/Tests/WebKit2Gtk/TestWebKitSettings.cpp:

(testWebKitSettings):

4:07 AM Changeset in webkit [211362] by akling@apple.com
  • 2 edits in trunk/Source/WebKit/mac

[macOS] WebHTMLView has an internal retain cycle with its flagsChangedEventMonitor.
<https://webkit.org/b/167580>

Reviewed by Antti Koivisto.

Avoid the implicit strong capture of self by keeping it in a block variable.
Also add code to dealloc to unregister the event monitor, since it will otherwise leak.
This fixes huge WebHTMLView leaks seen on the leaks bot.

  • WebView/WebHTMLView.mm:

(-[WebHTMLViewPrivate dealloc]):
(-[WebHTMLView viewDidMoveToWindow]):

2:27 AM Changeset in webkit [211361] by Carlos Garcia Campos
  • 2 edits in trunk/LayoutTests

Unreviewed. Skip more tests timing out in GTK+ bots.

Skip two mores tests that use UIScriptController to generate events and another one expecting native
HTML form validation popover.

  • platform/gtk/TestExpectations:
2:14 AM Changeset in webkit [211360] by Carlos Garcia Campos
  • 2 edits in trunk/Source/WebCore

Several web timing tests crash in GTK+ and AppleWin bots
https://bugs.webkit.org/show_bug.cgi?id=167577

Reviewed by Ryosuke Niwa.

The problem is that entry is used in both the key, to get name, and in the value with WTFMove. So, the name is
invalidated by the move. It could be fixed by simply copying the name, instead of using entry->name, but I think
that code could be simplified using HashMap::ensure and then we don't need any string copy, nor even the static
insertPerformanceEntry().

Fix crashes in several imported/w3c/web-platform-tests/user-timing/ tests.

  • page/PerformanceUserTiming.cpp:

(WebCore::UserTiming::mark):
(WebCore::UserTiming::measure):
(WebCore::insertPerformanceEntry): Deleted.

2:10 AM Changeset in webkit [211359] by Carlos Garcia Campos
  • 2 edits in trunk/LayoutTests

Unreviewed. Skip form validation tests timing out in GTK+ bots.

  • platform/gtk/TestExpectations:
12:47 AM Changeset in webkit [211358] by Carlos Garcia Campos
  • 2 edits in trunk/Source/WebCore

[Threaded Compositor] Crash in GraphicsContext3D::deleteTexture when destroying TextureMapperPlatformLayerProxy
https://bugs.webkit.org/show_bug.cgi?id=167575

Reviewed by Žan Doberšek.

We should clear all the buffers on invalidate to ensure we don't have textures alive after CoordinatedGraphicsScene::purgeGLResources().

Fix crash in media/video-poster-background.html.

  • platform/graphics/texmap/TextureMapperPlatformLayerProxy.cpp:

(WebCore::TextureMapperPlatformLayerProxy::invalidate): Clear current, pending and all used buffers.

Jan 29, 2017:

9:55 PM Changeset in webkit [211357] by Carlos Garcia Campos
  • 4 edits in trunk/Source

[Threaded Compositor] Crash on WebCore::GLContext::version()
https://bugs.webkit.org/show_bug.cgi?id=167559

Reviewed by Michael Catanzaro.

Source/WebCore:

Fixes crashes in several media tests.

  • platform/graphics/texmap/TextureMapperPlatformLayerProxy.cpp:

(WebCore::TextureMapperPlatformLayerProxy::invalidate): Clear m_compositorThreadUpdateTimer and call the update function.

Source/WebKit2:

This is happening because TextureMapperPlatformLayerProxy::compositorThreadUpdateTimerFired() is fired after the
threaded compositor is deleted. CoordinatedGraphicsScene::purgeGLResources() should invalidate the proxies
before clearing the map.

  • Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp:

(WebKit::CoordinatedGraphicsScene::purgeGLResources):

9:03 PM Changeset in webkit [211356] by n_wang@apple.com
  • 20 edits
    2 adds in trunk

AX: WKContentView needs to implement UITextInput methods to make speak selection highlighting work
https://bugs.webkit.org/show_bug.cgi?id=166955

Reviewed by Ryosuke Niwa.

Source/WebCore:

Created a new version of Range::collectSelectionRect() that returns rects for each
line, so that Speak Selection doesn't need to handle searching for soft line breaks.
Also added a variant of findPlainText to search for the closest matched range to the given position.

Test: editing/text-iterator/range-of-string-closest-to-position.html

  • dom/Range.cpp:

(WebCore::Range::collectSelectionRectsWithoutUnionInteriorLines):
(WebCore::Range::collectSelectionRects):

  • dom/Range.h:
  • editing/TextIterator.cpp:

(WebCore::findPlainTextMatches):
(WebCore::updateSearchBuffer):
(WebCore::findIteratorOptions):
(WebCore::rangeMatches):
(WebCore::findClosestPlainText):
(WebCore::findPlainText):
(WebCore::findPlainTextOffset): Deleted.

  • editing/TextIterator.h:
  • editing/htmlediting.h:
  • testing/Internals.cpp:

(WebCore::Internals::rangeOfStringNearLocation):

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

Source/WebKit2:

Implemented methods that Speak Selection can use to retrieve the word/sentence highlighting rects.

  • Scripts/webkit/messages.py:

(headers_for_type):

  • UIProcess/WebPageProxy.h:
  • UIProcess/WebPageProxy.messages.in:
  • UIProcess/ios/WKContentViewInteraction.h:
  • UIProcess/ios/WKContentViewInteraction.mm:

(-[WKContentView webSelectionRectsForSelectionRects:]):
(-[WKContentView webSelectionRects]):
(-[WKContentView _accessibilityRetrieveRectsEnclosingSelectionOffset:withGranularity:]):
(-[WKContentView _accessibilityRetrieveRectsAtSelectionOffset:withText:]):

  • UIProcess/ios/WebPageProxyIOS.mm:

(WebKit::WebPageProxy::selectionRectsCallback):
(WebKit::WebPageProxy::requestRectsForGranularityWithSelectionOffset):
(WebKit::WebPageProxy::requestRectsAtSelectionOffsetWithText):

  • WebProcess/WebPage/WebPage.h:
  • WebProcess/WebPage/WebPage.messages.in:
  • WebProcess/WebPage/ios/WebPageIOS.mm:

(WebKit::visiblePositionForPositionWithOffset):
(WebKit::WebPage::getRectsForGranularityWithSelectionOffset):
(WebKit::rangeNearPositionMatchesText):
(WebKit::WebPage::getRectsAtSelectionOffsetWithText):

LayoutTests:

  • editing/text-iterator/range-of-string-closest-to-position-expected.txt: Added.
  • editing/text-iterator/range-of-string-closest-to-position.html: Added.
7:08 PM WebKitGTK/Debugging edited by clopez@igalia.com
(diff)
5:40 PM Changeset in webkit [211355] by aestes@apple.com
  • 15 edits in trunk

[QuickLook] Add a WebPreference to enable saving QuickLook documents in WebKitLegacy
https://bugs.webkit.org/show_bug.cgi?id=167563
<rdar://problem/30253207>

Reviewed by Andreas Kling.

Source/WebCore:

  • loader/ios/QuickLook.h: Removed unused declarations.

(WebCore::QuickLookHandle::firstRequestURL): Deleted.

  • loader/ios/QuickLook.mm:

(WebCore::removeQLPreviewConverterForURL): Stopped deleting the temporary file here; that's
now done in QuickLookDocumentWriter.
(addQLPreviewConverterWithFileForURL): Changed from an exported function to a static
function since it's now only called inside QuickLook.mm.
(WebCore::QuickLookHandle::QuickLookHandle): Stopped initializing m_firstRequestURL.
(WebCore::addQLPreviewConverterWithFileForURL): Deleted.
(WebCore::qlPreviewConverterFileNameForURL): Deleted.
(WebCore::qlPreviewConverterUTIForURL): Deleted.
(WebCore::QuickLookHandle::previewRequestURL): Deleted.
(WebCore::QuickLookHandle::converter): Deleted.

Source/WebKit/mac:

Instead of only saving QuickLook documents to a temporary file when the client is
MobileSafari, base this decision on a WebPreference that clients can choose to enable.

This also changes the SPI for accessing the temporary file path and UTI. Instead of
-[WebView quickLookContentForURL:], which requires the client to pass the response URL of
the frame that saved the QuickLook document, the content dictionary is now stored as a
property of WebDataSource.

This also removes the manual lifetime management of the QLPreviewConverter from
QuickLookDocumentWriter. The QLPreviewConverter is kept alive by DocumentLoader these days,
which ensures it lives long enough to respond to subresource requests.

New API test: QuickLook.LegacyQuickLookContent

  • WebCoreSupport/WebFrameLoaderClient.mm:

(WebFrameLoaderClient::didCreateQuickLookHandle): Moved the logic of deciding whether to
write a temporary file to here from the QuickLookDocumentWriter constructor.

  • WebView/WebDataSource.mm: Declared _quickLookContent.

(-[WebDataSource _quickLookContent]):
(-[WebDataSource _setQuickLookContent:]):

  • WebView/WebDataSourceInternal.h: Overrode _quickLookContent as a read/write property.
  • WebView/WebDataSourcePrivate.h: Declared _quickLookContent as a readonly property.
  • WebView/WebPreferenceKeysPrivate.h: Defined WebKitQuickLookDocumentSavingPreferenceKey.
  • WebView/WebPreferences.mm:

(-[WebPreferences quickLookDocumentSavingEnabled]):
(-[WebPreferences setQuickLookDocumentSavingEnabled:]):

  • WebView/WebPreferencesPrivate.h: Declared property quickLookDocumentSavingEnabled.
  • WebView/WebView.mm:

(-[WebView quickLookContentForURL:]): Changed to always return nil.

  • WebView/WebViewPrivate.h: Added a comment stating that clients should use

-[WebDataSource _quickLookContent] instead.

Tools:

  • TestWebKitAPI/Tests/WebKit2Cocoa/QuickLook.mm:

(-[QuickLookNavigationDelegate _webView:didStartLoadForQuickLookDocumentInMainFrameWithFileName:uti:]):
(-[QuickLookNavigationDelegate _webView:didFinishLoadForQuickLookDocumentInMainFrame:]):
(runTest):
(-[QuickLookFrameLoadDelegate webView:didFinishLoadForFrame:]):
(TEST):

4:26 PM Changeset in webkit [211354] by mitz@apple.com
  • 8 edits
    5 adds in trunk

[iOS] Expose WebCore::DataDetection::detectContentInRange WKWebProcessPlugInRangeHandle
https://bugs.webkit.org/show_bug.cgi?id=167565

Reviewed by Sam Weinig.

Source/WebKit2:

Test: TestWebKitAPI/Tests/WebKit2Cocoa/BundleRangeHandle.mm

  • Shared/API/Cocoa/WKDataDetectorTypes.h: Added. Moved the enum definition from WKWebViewConfiguration.h to here.
  • Shared/API/Cocoa/WKDataDetectorTypesInternal.h: Added.

(fromWKDataDetectorTypes): Moved from WKWebView.mm.

  • UIProcess/API/Cocoa/WKWebView.mm:

(fromWKDataDetectorTypes): Moved to WKDataDetectorTypesInternal.h.

  • UIProcess/API/Cocoa/WKWebViewConfiguration.h: Moved WKDataDetectorTypes definition out to WKDataDetectorTypes.h.
  • WebKit2.xcodeproj/project.pbxproj: Added references to new files.
  • WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInRangeHandle.h:
  • WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInRangeHandle.mm:

(-[WKWebProcessPlugInRangeHandle detectDataWithTypes:context:]): Added. Calls

DataDetection::detectContentInRange.

Tools:

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WebKit2Cocoa/BundleRangeHandle.mm: Added.

(-[BundleRangeHandleRemoteObject textFromBodyRange:]):
(-[BundleRangeHandleRemoteObject bodyInnerHTMLAfterDetectingData:]):
(TEST):

  • TestWebKitAPI/Tests/WebKit2Cocoa/BundleRangeHandlePlugIn.mm: Added.

(-[BundleRangeHandlePlugIn webProcessPlugIn:didCreateBrowserContextController:]):
(-[BundleRangeHandlePlugIn webProcessPlugInBrowserContextController:didFinishDocumentLoadForFrame:]):

  • TestWebKitAPI/Tests/WebKit2Cocoa/BundleRangeHandleProtocol.h: Added.
12:21 PM Changeset in webkit [211353] by Alan Bujtas
  • 5 edits in trunk/Source/WebCore

Simple line layout: PerformanceTests/Layout/simple-line-layout-innertext.html regressed at r211108
https://bugs.webkit.org/show_bug.cgi?id=167562

Reviewed by Antti Koivisto.

Apparently RunResolver::Run::constructStringForHyphenIfNeeded() is in a superhot codepath.
The Run should not have any additional members anyway, so let's construct the hyphenated
string on demand.
Progression on simple-line-layout-innertext.html is from ~34runs/sec back to ~50runs/sec.

Covered by existing text.

  • rendering/RenderTreeAsText.cpp:

(WebCore::writeSimpleLine):

  • rendering/SimpleLineLayoutFunctions.cpp:

(WebCore::SimpleLineLayout::paintFlow):

  • rendering/SimpleLineLayoutResolver.cpp:

(WebCore::SimpleLineLayout::RunResolver::Run::Run):
(WebCore::SimpleLineLayout::RunResolver::Run::textWithHyphen):
(WebCore::SimpleLineLayout::RunResolver::Run::text):
(WebCore::SimpleLineLayout::RunResolver::Run::constructStringForHyphenIfNeeded): Deleted.

  • rendering/SimpleLineLayoutResolver.h:
7:13 AM Changeset in webkit [211352] by yoav@yoav.ws
  • 4 edits in trunk/LayoutTests

Add invalid value tests to Link header handling.
https://bugs.webkit.org/show_bug.cgi?id=167366

Reviewed by Alex Christensen.

  • http/tests/preload/download_resources_from_invalid_headers-expected.txt:
  • http/tests/preload/resources/download_resources_from_header.php:
  • http/tests/preload/resources/invalid_resources_from_header.php:
6:30 AM Changeset in webkit [211351] by Gyuyoung Kim
  • 2 edits in trunk/LayoutTests

[EFL] Gardening on 29th Jan.

Unreviewed EFL gardening. Update flaky tests and crash tests.

  • platform/efl/TestExpectations:
2:06 AM Changeset in webkit [211350] by Carlos Garcia Campos
  • 10 edits in trunk/Source/WebKit2

[Coordinated Graphics] WebPage shouldn't use the layerTreeHost directly
https://bugs.webkit.org/show_bug.cgi?id=167494

Reviewed by Michael Catanzaro.

In Coordinated Graphics we have a couple of methods that the WebPage uses directly from the layer tree host,
instead of using the drawing area interface. This patch adds DrawingArea::didChangeViewportAttributes and
DrawingArea::deviceOrPageScaleFactorChanged and renames LayerTreeHost::didChangeViewportProperties as
LayerTreeHost::didChangeViewportAttributes for consistency.

  • Shared/CoordinatedGraphics/SimpleViewportController.cpp:

(WebKit::SimpleViewportController::didChangeViewportAttributes): Receive an rvalue reference to avoid copies.

  • Shared/CoordinatedGraphics/SimpleViewportController.h:
  • WebProcess/WebPage/AcceleratedDrawingArea.cpp:

(WebKit::AcceleratedDrawingArea::didChangeViewportAttributes): Forward it to the layer tree host if any.
(WebKit::AcceleratedDrawingArea::deviceOrPageScaleFactorChanged): Ditto.

  • WebProcess/WebPage/AcceleratedDrawingArea.h:
  • WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.cpp:

(WebKit::ThreadedCoordinatedLayerTreeHost::didChangeViewportAttributes): Renamed and updated to pass an rvalue reference.
(WebKit::ThreadedCoordinatedLayerTreeHost::didChangeViewportProperties): Deleted.

  • WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.h:
  • WebProcess/WebPage/DrawingArea.h:
  • WebProcess/WebPage/LayerTreeHost.h:

(WebKit::LayerTreeHost::didChangeViewportAttributes): Renamed and updated to pass an rvalue reference.
(WebKit::LayerTreeHost::didChangeViewportProperties): Deleted.

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::sendViewportAttributesChanged): Use the drawing area.
(WebKit::WebPage::scalePage): Ditto
(WebKit::WebPage::setDeviceScaleFactor): Ditto.
(WebKit::WebPage::viewportPropertiesDidChange): Ditto.

Note: See TracTimeline for information about the timeline view.