Timeline



Nov 22, 2016:

8:05 PM Changeset in webkit [208969] by mitz@apple.com
  • 2 edits in trunk/Source/WebKit/mac

[Mac] In Legacy WebKit, pressing an arrow key in editable content doesn’t hide the mouse cursor
https://bugs.webkit.org/show_bug.cgi?id=165036
<rdar://problem/5708580>

Reviewed by Alexey Proskuryakov.

  • WebView/WebHTMLView.mm:

(-[WebHTMLView performKeyEquivalent:]): Hide the cursor if WebCore handled the event,

similarly to what we do in -keyDown: and to what WKWebView does with all key events.

12:52 PM Changeset in webkit [208968] by mark.lam@apple.com
  • 6 edits in trunk/Source/JavaScriptCore

Fix exception scope verification failures in JSC profiler files.
https://bugs.webkit.org/show_bug.cgi?id=164971

Reviewed by Saam Barati.

  • profiler/ProfilerBytecodeSequence.cpp:

(JSC::Profiler::BytecodeSequence::addSequenceProperties):

  • profiler/ProfilerCompilation.cpp:

(JSC::Profiler::Compilation::toJS):

  • profiler/ProfilerDatabase.cpp:

(JSC::Profiler::Database::toJS):
(JSC::Profiler::Database::toJSON):

  • profiler/ProfilerOSRExitSite.cpp:

(JSC::Profiler::OSRExitSite::toJS):

  • profiler/ProfilerOriginStack.cpp:

(JSC::Profiler::OriginStack::toJS):

12:13 PM Changeset in webkit [208967] by Antti Koivisto
  • 6 edits
    2 adds in trunk

CrashTracer: [USER] com.apple.WebKit.WebContent at com.apple.WebCore: WebCore::ExtensionStyleSheets::pageUserSheet + 14
https://bugs.webkit.org/show_bug.cgi?id=165030

Reviewed by Darin Adler.

Source/WebCore:

We failed to reset the style scope when an element was moved to a different document. This could lead to having dangling
document pointers in style scope and style resolver.

Test: fast/shadow-dom/shadow-host-move-to-different-document.html

  • dom/ShadowRoot.cpp:

(WebCore::ShadowRoot::didMoveToNewDocument):

Reset style scope.

  • dom/ShadowRoot.h:
  • style/StyleScope.cpp:

(WebCore::Style::Scope::resolver):

Some more assertions.

  • style/StyleScope.h:

(WebCore::Style::Scope::document):

LayoutTests:

  • fast/shadow-dom/shadow-host-move-to-different-document-expected.html: Added.
  • fast/shadow-dom/shadow-host-move-to-different-document.html: Added.
11:16 AM Changeset in webkit [208966] by mark.lam@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

Fix exception scope verification failures in JSONObject.cpp.
https://bugs.webkit.org/show_bug.cgi?id=165025

Reviewed by Saam Barati.

  • runtime/JSONObject.cpp:

(JSC::gap):
(JSC::Stringifier::Stringifier):
(JSC::Stringifier::stringify):
(JSC::Stringifier::toJSON):
(JSC::Stringifier::appendStringifiedValue):
(JSC::Stringifier::Holder::appendNextProperty):
(JSC::Walker::walk):
(JSC::JSONProtoFuncParse):
(JSC::JSONProtoFuncStringify):
(JSC::JSONStringify):

10:43 AM Changeset in webkit [208965] by Darin Adler
  • 2 edits in trunk/Source/WTF

One more tiny bit of follow-up.

  • wtf/text/TextBreakIterator.cpp:

(WTF::numCharactersInGraphemeClusters): Removed unneeded always-true check.

10:35 AM Changeset in webkit [208964] by Darin Adler
  • 2 edits in trunk/Source/WTF

Quick follow-up to previous patch.

  • wtf/text/TextBreakIterator.cpp:

(WTF::numCharactersInGraphemeClusters): Removed incorrect assertion.

9:16 AM Changeset in webkit [208963] by Darin Adler
  • 12 edits
    1 add in trunk

Make normal case fast in the input element limitString function
https://bugs.webkit.org/show_bug.cgi?id=165023

Reviewed by Dan Bernstein.

Source/WebCore:

When running Speedometer, the limitLength function was showing up as hot.
Fixed a couple obvious problems with that function's performance.

  • html/TextFieldInputType.cpp:

(WebCore::isASCIILineBreak): Deleted. The isHTMLLineBreak function does
the same thing, but faster.
(WebCore::limitLength): Added a FIXME comment explaining that the function
isn't really a good idea. Don't call through to numCharactersInGraphemeClusters
at all for 8-bit strings since we don't allow CR or LF characters in the string
anyway, so there are no grapheme clusters more than a single code unit. Removed
optimization when the length is the string's length that String::left already does.
(WebCore::TextFieldInputType::sanitizeValue): Use isHTMLLineBreak instead of
isASCIILineBreak.
(WebCore::TextFieldInputType::handleBeforeTextInsertedEvent): Ditto.

  • platform/LocalizedStrings.cpp: Use auto a lot more rather than writing out

RetainPtr.
(WebCore::truncatedStringForLookupMenuItem): Removed unneeded special case for
empty strings. Removed unneeded string with the ellipsis character in it, since
the makeString function already knows how to append a character to a string.

  • rendering/RenderText.cpp:

(WebCore::mapLineBreakToIteratorMode): Updated for change to LineBreakIteratorMode.

  • rendering/SimpleLineLayoutTextFragmentIterator.cpp:

(WebCore::SimpleLineLayout::TextFragmentIterator::nextBreakablePosition): Ditto.

Source/WTF:

  • wtf/text/LineBreakIteratorPoolICU.h: Removed many unneeded includes.

Simplified the class a bit, removing some extra definitions.
(WTF::LineBreakIteratorPool::sharedPool): Use NeverDestroyed instead of new.
(WTF::LineBreakIteratorPool::makeLocaleWithBreakKeyword): Reimplemented in
a simpler way without using StringBuilder. Also updated for change to
LineBreakIteratorMode.
(WTF::LineBreakIteratorPool::put): Use uncheckedAppend since the code is
careful to only use the inline capacity in the vector.

  • wtf/text/TextBreakIterator.cpp: Moved some includes in here from the header.

(WTF::mapLineIteratorModeToRules): Updated for change to LineBreakIteratorMode.
(WTF::openLineBreakIterator): Ditto.
(WTF::numGraphemeClusters): Added a fast path for all 8-bit strings; don't
use ICU for that case, even if there is a CR character in it.
(WTF::numCharactersInGraphemeClusters): Added a fast path for strings that are
short enough to entirely fit without even looking at the characters; that's a
case we likely hit all the time. Also added a fast path for all 8-bit strings.

  • wtf/text/TextBreakIterator.h: Changed LineBreakIteratorMode to be an enum

class and not repeat UAX14 in the names of the modes. Initialize data members
in the class definition rather than the constructors.

Tools:

  • TestWebKitAPI/CMakeLists.txt: Added TextBreakIterator.cpp.
  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: Ditto.
  • TestWebKitAPI/Tests/WTF/TextBreakIterator.cpp: Added.

Contains some tests for the numGraphemeClusters and
numCharactersInGraphemeClusters functions that I used to make sure
that the new fast paths I added work correctly.

6:34 AM Changeset in webkit [208962] by svillar@igalia.com
  • 3 edits in trunk/Source/WebCore

[css-grid] Isolate size of internal representation from actual grid size
https://bugs.webkit.org/show_bug.cgi?id=165006

Reviewed by Manuel Rego Casasnovas.

RenderGrid has an internal representation of a grid used to place grid items, compute grid
positions, run the track sizing algorithm etc. That data structure normally has exactly the
same size as the actual grid specified using the grid-template-xxx properties (or any other
shorthand). But in some cases, like for example when the grid is empty, the internal data
structure does not really match the actual grid. In the particular case of empty grids no
memory allocations are done to create a grid representation as it is not needed.

From now on both gridColumnCount() and gridRowCount() will always return the size of the
data structure representing the grid whereas the newly added numTracks() will always return
the actual size of the grid.

This is the first required step of the process of isolating the data used by the grid track
sizing algorithm from the actual internal state of the LayoutGrid object.

No new tests as this is just a code refactoring.

  • rendering/RenderGrid.cpp:

(WebCore::RenderGrid::gridColumnCount): Always return the number of columns of the internal
data structure to represent the grid.
(WebCore::RenderGrid::layoutBlock):
(WebCore::RenderGrid::computeIntrinsicLogicalWidths): Use the actual size of the grid to
create the GridSizingData structure.
(WebCore::RenderGrid::placeItemsOnGrid): Use the actual size of the grid to create the
GridSizingData structure.
(WebCore::RenderGrid::offsetAndBreadthForPositionedChild):
(WebCore::RenderGrid::numTracks): New method which returns the actual size of the grid.

  • rendering/RenderGrid.h:
3:14 AM Changeset in webkit [208961] by svillar@igalia.com
  • 2 edits in trunk/Source/WebKit2

[GTK] Fix introspection warning
https://bugs.webkit.org/show_bug.cgi?id=165026

Reviewed by Michael Catanzaro.

This fixes an introspection annotation for a new API added in r208532.

  • WebProcess/InjectedBundle/API/gtk/WebKitWebPage.cpp:

(webkit_web_page_class_init):

3:09 AM Changeset in webkit [208960] by tpopela@redhat.com
  • 2 edits in trunk/Tools

Unreviewed, add myself as a WebKit committer.

  • Scripts/webkitpy/common/config/contributors.json:

Nov 21, 2016:

11:49 PM Changeset in webkit [208959] by Carlos Garcia Campos
  • 24 edits
    2 moves
    1 add
    10 deletes in trunk/Source/WebKit2

[SOUP] Simplify custom protocols handler implementation
https://bugs.webkit.org/show_bug.cgi?id=164922

Reviewed by Michael Catanzaro.

We are using too many classes for this and also the C API that is not needed, because both GTK+ and EFL have
their own APIs and this is not used by WTR at all.

  • PlatformEfl.cmake: Remove files from compilation.
  • PlatformGTK.cmake: Ditto.
  • Shared/API/c/WKBase.h:
  • Shared/API/c/soup/WKBaseSoup.h: Removed.
  • UIProcess/API/APICustomProtocolManagerClient.h: Added.

(API::CustomProtocolManagerClient::~CustomProtocolManagerClient):
(API::CustomProtocolManagerClient::startLoading):
(API::CustomProtocolManagerClient::stopLoading):
(API::CustomProtocolManagerClient::invalidate):

  • UIProcess/API/C/WKAPICast.h:
  • UIProcess/API/C/soup/WKAPICastSoup.h: Removed.
  • UIProcess/API/C/soup/WKContextSoup.h: Removed.
  • UIProcess/API/C/soup/WKSoupCustomProtocolRequestManager.cpp: Removed.
  • UIProcess/API/C/soup/WKSoupCustomProtocolRequestManager.h: Removed.
  • UIProcess/API/C/soup/WKSoupRequestManager.h: Removed.
  • UIProcess/API/efl/ewk_context.cpp: Remove unneeded include.
  • UIProcess/API/efl/ewk_url_scheme_request.cpp: Use CustomProtocolManagerProxy instead of WKSoupCustomProtocolRequestManagerRef.

(EwkUrlSchemeRequest::EwkUrlSchemeRequest):
(EwkUrlSchemeRequest::finish):
(EwkUrlSchemeRequest::invalidate):

  • UIProcess/API/efl/ewk_url_scheme_request_private.h:

(EwkUrlSchemeRequest::create):
(EwkUrlSchemeRequest::manager):

  • UIProcess/API/gtk/WebKitCustomProtocolManagerClient.cpp: Added.

(attachCustomProtocolManagerClientToContext):

  • UIProcess/API/gtk/WebKitCustomProtocolManagerClient.h: Renamed from Source/WebKit2/UIProcess/API/gtk/WebKitRequestManagerClient.h.
  • UIProcess/API/gtk/WebKitPrivate.h:
  • UIProcess/API/gtk/WebKitRequestManagerClient.cpp: Removed.
  • UIProcess/API/gtk/WebKitRequestManagerClient.h: Removed.
  • UIProcess/API/gtk/WebKitURISchemeRequest.cpp: Use CustomProtocolManagerProxy instead of WebSoupCustomProtocolRequestManager.

(webkitURISchemeRequestCreate):
(webkitURISchemeRequestCancel):
(webkitURISchemeRequestGetManager):
(webkitURISchemeRequestInvalidate):
(webkitURISchemeRequestReadCallback):
(webkit_uri_scheme_request_finish_error):

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

(webkitWebContextConstructed):
(webkitWebContextDispose):
(webkit_web_context_register_uri_scheme):
(webkitWebContextStartLoadingCustomProtocol):
(webkitWebContextInvalidateCustomProtocolRequests):

  • UIProcess/API/gtk/WebKitWebContextPrivate.h:
  • UIProcess/Network/CustomProtocols/CustomProtocolManagerProxy.h:
  • UIProcess/Network/CustomProtocols/mac/CustomProtocolManagerProxyMac.mm:

(WebKit::CustomProtocolManagerProxy::processDidClose):

  • UIProcess/Network/CustomProtocols/soup/CustomProtocolManagerProxySoup.cpp:

(WebKit::CustomProtocolManagerProxy::processDidClose): Invalidate the client.
(WebKit::CustomProtocolManagerProxy::startLoading): Notify the client.
(WebKit::CustomProtocolManagerProxy::stopLoading): Ditto.
(WebKit::CustomProtocolManagerProxy::didReceiveResponse): Notify the network process.
(WebKit::CustomProtocolManagerProxy::didLoadData): Ditto.
(WebKit::CustomProtocolManagerProxy::didFailWithError): Ditto.
(WebKit::CustomProtocolManagerProxy::didFinishLoading): Ditto.

  • UIProcess/Network/CustomProtocols/soup/WebSoupCustomProtocolRequestManager.cpp: Removed.
  • UIProcess/Network/CustomProtocols/soup/WebSoupCustomProtocolRequestManager.h: Removed.
  • UIProcess/Network/CustomProtocols/soup/WebSoupCustomProtocolRequestManagerClient.cpp: Removed.
  • UIProcess/Network/CustomProtocols/soup/WebSoupCustomProtocolRequestManagerClient.h: Removed.
  • UIProcess/Network/NetworkProcessProxy.cpp:

(WebKit::NetworkProcessProxy::didClose): Notify the CustomProtocolManagerProxy.

  • UIProcess/WebProcessPool.cpp:

(WebKit::WebProcessPool::WebProcessPool): Initialize the CustomProtocolManagerClient and remove the all supplement.
(WebKit::WebProcessPool::setCustomProtocolManagerClient):
(WebKit::WebProcessPool::registerSchemeForCustomProtocol): In case of soup cache the given protocol.
(WebKit::WebProcessPool::unregisterSchemeForCustomProtocol): In case of soup delete the given protocol from the cache.

  • UIProcess/WebProcessPool.h:
  • UIProcess/efl/RequestManagerClientEfl.cpp: Do not use the C API, but API::CustomProtocolManagerClient.

(WebKit::RequestManagerClientEfl::RequestManagerClientEfl):
(WebKit::RequestManagerClientEfl::registerURLSchemeHandler):

  • UIProcess/efl/RequestManagerClientEfl.h:
  • UIProcess/efl/WebProcessPoolEfl.cpp:
  • UIProcess/gtk/WebProcessPoolGtk.cpp:
  • UIProcess/soup/WebProcessPoolSoup.cpp:

(WebKit::WebProcessPool::platformInitializeNetworkProcess): Use m_urlSchemesRegisteredForCustomProtocols to
build the list of custom protocols to send to the network process.

10:30 PM Changeset in webkit [208958] by mark.lam@apple.com
  • 4 edits in trunk

Hasher::addCharacters() should be able to handle zero length strings.
https://bugs.webkit.org/show_bug.cgi?id=165024

Reviewed by Yusuke Suzuki.

Source/WTF:

Currently, it will fail to handle zero length strings if it has a pending
character. The fix is simply to return early if length is 0.

  • wtf/Hasher.h:

(WTF::StringHasher::addCharacters):

Tools:

  • TestWebKitAPI/Tests/WTF/StringHasher.cpp:

(TestWebKitAPI::TEST):

7:35 PM Changeset in webkit [208957] by mark.lam@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

Removed an extra space character at the end of line.

Not reviewed.

  • runtime/JSCell.cpp:

(JSC::JSCell::toNumber):

6:05 PM Changeset in webkit [208956] by mark.lam@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

Fix exception scope verification failures in FunctionConstructor.cpp.
https://bugs.webkit.org/show_bug.cgi?id=165011

Reviewed by Saam Barati.

  • runtime/FunctionConstructor.cpp:

(JSC::constructFunction):
(JSC::constructFunctionSkippingEvalEnabledCheck):

6:04 PM Changeset in webkit [208955] by mark.lam@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

Fix exception scope verification failures in GetterSetter.cpp.
https://bugs.webkit.org/show_bug.cgi?id=165013

Reviewed by Saam Barati.

  • runtime/GetterSetter.cpp:

(JSC::callGetter):
(JSC::callSetter):

5:57 PM Changeset in webkit [208954] by Konstantin Tokarev
  • 2 edits in trunk/Source/WebCore

Disable #line markers in bison output on Windows
https://bugs.webkit.org/show_bug.cgi?id=164973

Reviewed by Darin Adler.

New bison versions since 3.0 have bug that causes unescaped paths
to be printed in #line directives. On Windows CMake passes absolute
paths to bison that have backslashes in them, leading to compiler
errors or warnings because of unrecognized escape sequences.

No new tests needed.

  • css/makegrammar.pl:
4:18 PM EnvironmentVariables edited by clopez@igalia.com
(diff)
3:54 PM Changeset in webkit [208953] by Yusuke Suzuki
  • 14 edits
    2 copies
    3 adds in trunk

Crash in com.apple.JavaScriptCore: WTF::ThreadSpecific<WTF::WTFThreadData, + 142
https://bugs.webkit.org/show_bug.cgi?id=164898

Reviewed by Darin Adler.

JSTests:

  • stress/tagged-template-registry-key-collect.js: Added.

(shouldBe):
(tag):
(i.eval):

  • stress/tagged-template-registry-key.js: Added.

(shouldBe):
(tag):
(a):
(b):

Source/JavaScriptCore:

The callsite object (JSArray) of tagged template literal is managed by WeakGCMap since
same tagged template literal need to return an identical object.
The problem is that we used TemplateRegistryKey as the key of the WeakGCMap. WeakGCMap
can prune its entries in the collector thread. At that time, this TemplateRegistryKey
is deallocated. Since it includes String (and then, StringImpl), we accidentally call
ref(), deref() and StringImpl::destroy() in the different thread from the main thread
while this TemplateRegistryKey is allocated in the main thread.

Instead, we use TemplateRegistryKey* as the key of WeakGCMap. Then, to keep its liveness
while the entry of the WeakGCMap is alive, the callsite object has the reference to
the JSTemplateRegistryKey. And it holds Ref<TemplateRegistryKey>.

And now we need to lookup WeakGCMap with TemplateRegistryKey*. To do so, we create
interning system for TemplateRegistryKey. It is similar to AtomicStringTable and
SymbolRegistry. TemplateRegistryKey is allocated from this table. This table atomize the
TemplateRegistryKey. So we can use the pointer comparison between TemplateRegistryKey.
It allows us to lookup the entry from WeakGCMap by TemplateRegistryKey*.

  • CMakeLists.txt:
  • JavaScriptCore.xcodeproj/project.pbxproj:
  • builtins/BuiltinNames.h:
  • bytecompiler/BytecodeGenerator.cpp:

(JSC::BytecodeGenerator::addTemplateRegistryKeyConstant):
(JSC::BytecodeGenerator::emitGetTemplateObject):

  • bytecompiler/BytecodeGenerator.h:
  • runtime/JSGlobalObject.cpp:

(JSC::getTemplateObject):

  • runtime/JSTemplateRegistryKey.cpp:

(JSC::JSTemplateRegistryKey::JSTemplateRegistryKey):
(JSC::JSTemplateRegistryKey::create):

  • runtime/JSTemplateRegistryKey.h:
  • runtime/TemplateRegistry.cpp:

(JSC::TemplateRegistry::getTemplateObject):

  • runtime/TemplateRegistry.h:
  • runtime/TemplateRegistryKey.cpp: Copied from Source/JavaScriptCore/runtime/TemplateRegistry.h.

(JSC::TemplateRegistryKey::~TemplateRegistryKey):

  • runtime/TemplateRegistryKey.h:

(JSC::TemplateRegistryKey::calculateHash):
(JSC::TemplateRegistryKey::create):
(JSC::TemplateRegistryKey::TemplateRegistryKey):

  • runtime/TemplateRegistryKeyTable.cpp: Added.

(JSC::TemplateRegistryKeyTranslator::hash):
(JSC::TemplateRegistryKeyTranslator::equal):
(JSC::TemplateRegistryKeyTranslator::translate):
(JSC::TemplateRegistryKeyTable::~TemplateRegistryKeyTable):
(JSC::TemplateRegistryKeyTable::createKey):
(JSC::TemplateRegistryKeyTable::unregister):

  • runtime/TemplateRegistryKeyTable.h: Copied from Source/JavaScriptCore/runtime/JSTemplateRegistryKey.h.

(JSC::TemplateRegistryKeyTable::KeyHash::hash):
(JSC::TemplateRegistryKeyTable::KeyHash::equal):

  • runtime/VM.h:

(JSC::VM::templateRegistryKeyTable):

3:24 PM Changeset in webkit [208952] by mark.lam@apple.com
  • 5 edits in trunk/Source/JavaScriptCore

Fix exception scope verification failures in runtime/Error* files.
https://bugs.webkit.org/show_bug.cgi?id=164998

Reviewed by Darin Adler.

  • runtime/ErrorConstructor.cpp:

(JSC::Interpreter::constructWithErrorConstructor):

  • runtime/ErrorInstance.cpp:

(JSC::ErrorInstance::create):

  • runtime/ErrorInstance.h:
  • runtime/ErrorPrototype.cpp:

(JSC::errorProtoFuncToString):

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

[CMake] build fails after update to cmake 3.7
https://bugs.webkit.org/show_bug.cgi?id=165008

Reviewed by Dan Bernstein.

When we remove the CMake cache, we should remove both the
CMakeCache.txt file and the CMakeFiles directory.
See: https://gitlab.kitware.com/cmake/cmake/issues/14820

  • Scripts/webkitdirs.pm:

(cmakeFilesPath):
(removeCMakeCache):

9:19 AM Changeset in webkit [208950] by mark.lam@apple.com
  • 5 edits in trunk/Source/JavaScriptCore

Fix exception scope verification failures in *Executable.cpp files.
https://bugs.webkit.org/show_bug.cgi?id=164996

Reviewed by Darin Adler.

  • runtime/DirectEvalExecutable.cpp:

(JSC::DirectEvalExecutable::create):

  • runtime/IndirectEvalExecutable.cpp:

(JSC::IndirectEvalExecutable::create):

  • runtime/ProgramExecutable.cpp:

(JSC::ProgramExecutable::initializeGlobalProperties):

  • runtime/ScriptExecutable.cpp:

(JSC::ScriptExecutable::prepareForExecutionImpl):

8:58 AM Changeset in webkit [208949] by achristensen@apple.com
  • 4 edits in trunk/Source

Fix Sierra CMake build after r208452
https://bugs.webkit.org/show_bug.cgi?id=164437

Source/WebKit/mac:

  • WebView/WebView.mm:

(-[WebView updateMediaTouchBar]):
I haven't enabled VIDEO_PRESENTATION_MODE in the CMake build yet.
It's needed for playbackSessionInterface to exist.

Source/WebKit2:

  • UIProcess/Cocoa/WebViewImpl.mm:

(WebKit::WebViewImpl::updateMediaTouchBar):
I haven't enabled VIDEO_PRESENTATION_MODE in the CMake build yet.
It's needed for WebPlaybackSessionInterfaceMac to exist.

8:25 AM Changeset in webkit [208948] by commit-queue@webkit.org
  • 3 edits in trunk/Source/WebCore

[cmake][OpenWebRTC] Move SDPProcessorScriptResource rules to common WebCore
https://bugs.webkit.org/show_bug.cgi?id=164937

Patch by Olivier Blin <Olivier Blin> on 2016-11-21
Reviewed by Youenn Fablet.

SDPProcessorScriptResource has been moved in common mediastream directory (bug 163940).

Since it is not specific to the GTK port, the matching cmake rules should be
moved out from PlatformGTK.cmake to the main WebCore CMakeLists.txt.

This is needed to build OpenWebRTC support in other ports, WPE in my case,
probably Mac, EFL and Qt as well.

This also fixes the path in SDP scripts dependencies, the old openwebrtc subdir
was still being used.

No new tests, build fix only

  • CMakeLists.txt:
  • PlatformGTK.cmake:
5:12 AM Changeset in webkit [208947] by Carlos Garcia Campos
  • 1 copy in releases/WebKitGTK/webkit-2.15.2

WebKitGTK+ 2.15.2

3:18 AM Changeset in webkit [208946] by Carlos Garcia Campos
  • 4 edits in trunk

Unreviewed. Update OptionsGTK.cmake and NEWS for 2.15.2 release.

.:

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

Source/WebKit2:

  • gtk/NEWS: Add release notes for 2.15.2.
2:04 AM Changeset in webkit [208945] by Carlos Garcia Campos
  • 7 edits in trunk/Source/WebCore

Add URL::hostAndPort()
https://bugs.webkit.org/show_bug.cgi?id=164907

Reviewed by Alex Christensen.

As a convenient way of getting the host and port (if any) as a string.

  • html/URLUtils.h:

(WebCore::URLUtils<T>::host): Use URL::hostAndPort().

  • page/Location.cpp:

(WebCore::Location::host): Ditto.

  • platform/URL.cpp:

(WebCore::URL::hostAndPort): Return host:port or just host if there isn't a port.

  • platform/URL.h:
  • platform/network/CredentialStorage.cpp:

(WebCore::originStringFromURL): Use URL::hostAndPort().

  • workers/WorkerLocation.cpp:

(WebCore::WorkerLocation::host): Ditto.

1:41 AM Changeset in webkit [208944] by Philippe Normand
  • 2 edits in trunk/Source/WebCore

[WebRTC][OpenWebRTC] parse turns urls
https://bugs.webkit.org/show_bug.cgi?id=164587

Reviewed by Alejandro G. Castro.

  • platform/mediastream/openwebrtc/MediaEndpointOwr.cpp:

(WebCore::MediaEndpointOwr::ensureTransportAgentAndTransceivers):
Hook turns servers between the RTCConfiguration and the underlying
OpenWebRTC layer.

1:39 AM Changeset in webkit [208943] by Philippe Normand
  • 3 edits in trunk/Source/WebCore

[Gstreamer] Add volume and mute support to the WebRTC mediaplayer
https://bugs.webkit.org/show_bug.cgi?id=153828

Reviewed by Darin Adler.

  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamerOwr.cpp:

(WebCore::MediaPlayerPrivateGStreamerOwr::setVolume): New implementation setting the OWR source volume property.
(WebCore::MediaPlayerPrivateGStreamerOwr::setMuted): New implementation setting the OWR source mute property.
(WebCore::MediaPlayerPrivateGStreamerOwr::maybeHandleChangeMutedState): Also set audio OWR source mute state depending on the track enabled state.
(WebCore::MediaPlayerPrivateGStreamerOwr::trackEnabledChanged): chain to maybeHandleChangeMuteState.

  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamerOwr.h:
1:29 AM Changeset in webkit [208942] by Philippe Normand
  • 2 edits in trunk/Source/WebCore

[WebRTC][OpenWebRTC] RTP bundling support
https://bugs.webkit.org/show_bug.cgi?id=162333

Reviewed by Alejandro G. Castro.

Configure the OpenWebRTC transport agent bundle policy according
to the RTCConfiguration and pass the receive SSRCs over to
OpenWebRTC as well. Those are needed so the agent is aware of the
bundle layout.

  • platform/mediastream/openwebrtc/MediaEndpointOwr.cpp:

(WebCore::MediaEndpointOwr::updateReceiveConfiguration):
(WebCore::MediaEndpointOwr::updateSendConfiguration):
(WebCore::MediaEndpointOwr::ensureTransportAgentAndTransceivers):

1:24 AM Changeset in webkit [208941] by Carlos Garcia Campos
  • 3 edits in trunk/Source/WebKit2

Remove m_customProtocolManagerProxy from WebProcessProxy
https://bugs.webkit.org/show_bug.cgi?id=164908

Reviewed by Andreas Kling.

Since the network process is mandatory, the custom protocol manager proxy of WebProcessProxy is unused and can
be removed.

  • UIProcess/WebProcessProxy.cpp:

(WebKit::WebProcessProxy::WebProcessProxy):

  • UIProcess/WebProcessProxy.h:
12:09 AM Changeset in webkit [208940] by Philippe Normand
  • 2 edits
    3 adds
    1 delete in trunk/Tools

[GTK][WebRTC] Switch to downstream OpenWebRTC and more recent GStreamer
https://bugs.webkit.org/show_bug.cgi?id=164817

Reviewed by Alejandro G. Castro.

This is temporary, hopefully. The OpenWebRTC patches will/should
be soon reviewed and upstream but meanwhile it makes sense to use
the Igalia downstream fork so that the WebRTC testing is easier.

Recent GStreamer patches are also needed for RTP bundling support
and RTP retransmission fixes.

  • gtk/jhbuild.modules:
  • gtk/openwebrtc.modules: Removed.
  • gtk/patches/gst-plugins-good-0001-rtpbin-pipeline-gets-an-EOS-when-any-rtpsources-byes.patch: Added.
  • gtk/patches/gst-plugins-good-0002-rtpbin-avoid-generating-errors-when-rtcp-messages-ar.patch: Added.
  • gtk/patches/gst-plugins-good-0003-rtpbin-receive-bundle-support.patch: Added.

Nov 20, 2016:

10:22 PM Changeset in webkit [208939] by zandobersek@gmail.com
  • 20 edits in trunk

[EncryptedMedia] Make EME API runtime-enabled
https://bugs.webkit.org/show_bug.cgi?id=164927

Reviewed by Jer Noble.

Source/JavaScriptCore:

  • runtime/CommonIdentifiers.h: Add the necessary identifiers.

Source/WebCore:

Update the EME API IDL definitions to use the EnabledAtRuntime
attribute on the relevant interfaces, attributes and operations.
EncryptedMediaAPI is used as the attribute value.

The corresponding getter, setter and member boolean are added to
the RuntimeEnabledFeatures class.

  • Modules/encryptedmedia/MediaKeyMessageEvent.idl:
  • Modules/encryptedmedia/MediaKeySession.idl:
  • Modules/encryptedmedia/MediaKeyStatusMap.idl:
  • Modules/encryptedmedia/MediaKeySystemAccess.idl:
  • Modules/encryptedmedia/MediaKeys.idl:
  • Modules/encryptedmedia/NavigatorEME.idl:
  • bindings/generic/RuntimeEnabledFeatures.h:

(WebCore::RuntimeEnabledFeatures::setEncryptedMediaAPIEnabled):
(WebCore::RuntimeEnabledFeatures::encryptedMediaAPIEnabled):

  • html/HTMLMediaElement.idl:
  • html/MediaEncryptedEvent.idl:

Source/WebKit2:

Add the new EncryptedMediaAPI preference. Set the same feature
flag on the shared RuntimeEnabledFeatures object to the
corresponding value that's stored in the WebPreferencesStore.

InjectedBundle::overrideBoolPreferenceForTestRunner() does the
same when the 'WebKitEncryptedMediaAPIEnabled' preference is
overridden in WKTR for testing purposes.

  • Shared/WebPreferencesDefinitions.h:
  • WebProcess/InjectedBundle/InjectedBundle.cpp:

(WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner):

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::updatePreferences):

Tools:

Enable the EME API via the WKTR InjectedBundle whenever testing
commences. This does not have any effect unless the EME feature
is enabled at compile-time, but it's still added to match other
features and for future use.

  • WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:

(WTR::InjectedBundle::beginTesting):

  • WebKitTestRunner/InjectedBundle/TestRunner.cpp:

(WTR::TestRunner::setEncryptedMediaAPIEnabled):

  • WebKitTestRunner/InjectedBundle/TestRunner.h:
8:38 PM Changeset in webkit [208938] by eric.carlson@apple.com
  • 2 edits in trunk/Source/WebCore

REGRESSION (r208606?): LayoutTest fast/mediastream/enumerating-crash.html is a flaky crash
https://bugs.webkit.org/show_bug.cgi?id=164715
<rdar://problem/29277180>

Reviewed by Alexey Proskuryakov.

No new tests, fixes an existing test crash.

  • Modules/mediastream/UserMediaRequest.cpp:

(WebCore::UserMediaRequest::contextDestroyed): Call base class method before clearing m_controller

because it nullifies the security context.

5:34 PM Changeset in webkit [208937] by mark.lam@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

Fix exception scope verification failures in ConstructData.cpp.
https://bugs.webkit.org/show_bug.cgi?id=164976

Reviewed by Darin Adler.

  • runtime/ConstructData.cpp:

(JSC::construct):

5:33 PM Changeset in webkit [208936] by mark.lam@apple.com
  • 3 edits in trunk/Source/JavaScriptCore

Fix exception scope verification failures in CommonSlowPaths.cpp/h.
https://bugs.webkit.org/show_bug.cgi?id=164975

Reviewed by Darin Adler.

  • runtime/CommonSlowPaths.cpp:

(JSC::SLOW_PATH_DECL):

  • runtime/CommonSlowPaths.h:

(JSC::CommonSlowPaths::opIn):

5:31 PM Changeset in webkit [208935] by mark.lam@apple.com
  • 3 edits in trunk/Source/JavaScriptCore

Fix exception scope verification failures in DateConstructor.cpp and DatePrototype.cpp.
https://bugs.webkit.org/show_bug.cgi?id=164995

Reviewed by Darin Adler.

  • runtime/DateConstructor.cpp:

(JSC::millisecondsFromComponents):
(JSC::constructDate):

  • runtime/DatePrototype.cpp:

(JSC::dateProtoFuncToPrimitiveSymbol):

4:57 PM Changeset in webkit [208934] by commit-queue@webkit.org
  • 1 edit
    6 adds in trunk/LayoutTests

Add iOS text selection tests - long press clear and multi line selection tests
https://bugs.webkit.org/show_bug.cgi?id=164899

Patch by Megan Gardner <Megan Gardner> on 2016-11-20
Reviewed by Darin Adler.

Test for clearing a selection after a long press.
Test for checking multi-line select, both increasing and decreasing, using the left selection.
Test for checking multi-line select, both increasing and decreasing, using the right selection.

  • fast/events/touch/ios/long-press-then-drag-down-to-change-selected-text-expected.txt: Added.
  • fast/events/touch/ios/long-press-then-drag-down-to-change-selected-text.html: Added.
  • fast/events/touch/ios/long-press-then-drag-up-to-change-selected-text-expected.txt: Added.
  • fast/events/touch/ios/long-press-then-drag-up-to-change-selected-text.html: Added.
  • fast/events/touch/ios/long-press-to-select-and-tap-to-clear-expected.txt: Added.
  • fast/events/touch/ios/long-press-to-select-and-tap-to-clear.html: Added.
9:43 AM WebKitGTK/2.14.x edited by Michael Catanzaro
(diff)
12:58 AM Changeset in webkit [208933] by caitp@igalia.com
  • 8 edits in trunk

[JSC] speed up parsing of async functions
https://bugs.webkit.org/show_bug.cgi?id=164808

Reviewed by Yusuke Suzuki.

JSTests:

Add tests for line terminator following "async" keyword in async
function syntax.

  • stress/async-await-syntax.js:

(shouldBe):

Source/JavaScriptCore:

Minor adjustments to Parser in order to mitigate slowdown with async
function parsing enabled:

  • Tokenize "async" as a keyword
  • Perform less branching in various areas of the Parser
  • parser/Keywords.table:
  • parser/Parser.cpp:

(JSC::Parser<LexerType>::parseStatementListItem):
(JSC::Parser<LexerType>::parseStatement):
(JSC::Parser<LexerType>::maybeParseAsyncFunctionDeclarationStatement):
(JSC::Parser<LexerType>::parseClass):
(JSC::Parser<LexerType>::parseExportDeclaration):
(JSC::Parser<LexerType>::parseAssignmentExpression):
(JSC::Parser<LexerType>::parseProperty):
(JSC::Parser<LexerType>::createResolveAndUseVariable):
(JSC::Parser<LexerType>::parsePrimaryExpression):
(JSC::Parser<LexerType>::parseMemberExpression):
(JSC::Parser<LexerType>::printUnexpectedTokenText):

  • parser/Parser.h:

(JSC::isAnyContextualKeyword):
(JSC::isIdentifierOrAnyContextualKeyword):
(JSC::isSafeContextualKeyword):
(JSC::Parser::matchSpecIdentifier):

  • parser/ParserTokens.h:
  • runtime/CommonIdentifiers.h:

Nov 19, 2016:

7:29 PM Changeset in webkit [208932] by mark.lam@apple.com
  • 4 edits in trunk/JSTests

op_mod-* JSC tests needs a longer timeout too.
https://bugs.webkit.org/show_bug.cgi?id=164994

Reviewed by Yusuke Suzuki.

  • stress/op_mod-ConstVar.js:
  • stress/op_mod-VarConst.js:
  • stress/op_mod-VarVar.js:
4:38 PM Changeset in webkit [208931] by Antti Koivisto
  • 12 edits in trunk/Source/WebKit2

Salt network cache hashes
https://bugs.webkit.org/show_bug.cgi?id=164924

Reviewed by Alex Christensen.

To enhance privacy make cache content unidentifiable from file names alone.
This is done by generating a unique persistent salt for each cache instance.
It is used when computing hashes used in file names.

The patch also replaces plain text partition directory names with salted hashes.

  • NetworkProcess/cache/NetworkCache.cpp:

(WebKit::NetworkCache::Cache::makeCacheKey):
(WebKit::NetworkCache::makeCacheKey): Deleted.

  • NetworkProcess/cache/NetworkCache.h:

Increment cache version.

  • NetworkProcess/cache/NetworkCacheBlobStorage.cpp:

(WebKit::NetworkCache::BlobStorage::BlobStorage):
(WebKit::NetworkCache::BlobStorage::add):
(WebKit::NetworkCache::BlobStorage::get):

Use salt for blob content hash.

  • NetworkProcess/cache/NetworkCacheBlobStorage.h:
  • NetworkProcess/cache/NetworkCacheData.cpp:

(WebKit::NetworkCache::computeSHA1):

For simplicity all SHA1s are now salted.

(WebKit::NetworkCache::makeSalt):
(WebKit::NetworkCache::readOrMakeSalt):

Read salt if it exists, generate and persist it otherwise.

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

(WebKit::NetworkCache::Key::Key):

Remove the "No partition" string and just empty.
That was only needed to have a directory name of some sort.

(WebKit::NetworkCache::Key::computeHash):

Use salt for key hash.

(WebKit::NetworkCache::Key::computePartitionHash):

Separate hash for partition.

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

(WebKit::NetworkCache::makeSubresourcesKey):
(WebKit::NetworkCache::SpeculativeLoadManager::PendingFrameLoad::saveToDiskIfReady):
(WebKit::NetworkCache::SpeculativeLoadManager::retrieveSubresourcesEntry):

  • NetworkProcess/cache/NetworkCacheStorage.cpp:

(WebKit::NetworkCache::makeSaltFilePath):
(WebKit::NetworkCache::Storage::open):

Cache can't be opened if we can't read or persist a salt.

(WebKit::NetworkCache::traverseRecordsFiles):
(WebKit::NetworkCache::Storage::Storage):
(WebKit::NetworkCache::Storage::synchronize):
(WebKit::NetworkCache::Storage::recordDirectoryPathForKey):

Use the partition hash in the directory name instead of a plain text name.

(WebKit::NetworkCache::decodeRecordHeader):
(WebKit::NetworkCache::Storage::readRecord):
(WebKit::NetworkCache::Storage::encodeRecord):
(WebKit::NetworkCache::Storage::traverse):
(WebKit::NetworkCache::Storage::clear):

  • NetworkProcess/cache/NetworkCacheStorage.h:

(WebKit::NetworkCache::Storage::salt):

1:22 PM Changeset in webkit [208930] by Chris Dumez
  • 15 edits in trunk

Update HTML form validation messages
https://bugs.webkit.org/show_bug.cgi?id=164957
<rdar://problem/29338669>

Reviewed by Darin Adler.

Source/WebCore:

Update HTML form validation messages as per recent feedback:

  • Drop the "Please".
  • Drop the period at the end.
  • Drop the "if you want to proceed" that was used only for the checkbox.

No new tests, rebaselined existing tests.

  • English.lproj/Localizable.strings:
  • platform/LocalizedStrings.cpp:

(WebCore::validationMessageValueMissingText):
(WebCore::validationMessageValueMissingForCheckboxText):
(WebCore::validationMessageValueMissingForFileText):
(WebCore::validationMessageValueMissingForRadioText):
(WebCore::validationMessageValueMissingForSelectText):
(WebCore::validationMessageTypeMismatchText):
(WebCore::validationMessageTypeMismatchForEmailText):
(WebCore::validationMessageTypeMismatchForURLText):
(WebCore::validationMessagePatternMismatchText):
(WebCore::validationMessageTooShortText):
(WebCore::validationMessageTooLongText):
(WebCore::validationMessageRangeUnderflowText):
(WebCore::validationMessageRangeOverflowText):
(WebCore::validationMessageStepMismatchText):
(WebCore::validationMessageBadInputForNumberText):

LayoutTests:

Rebaseline existing tests.

  • fast/forms/number/number-validation-message-expected.txt:
  • fast/forms/number/number-validation-message.html:
  • fast/forms/validation-custom-message-expected.txt:
  • fast/forms/validation-custom-message.html:
  • fast/forms/validation-messages-expected.txt:
  • fast/forms/validation-messages.html:
  • fast/forms/validationMessage-expected.txt:
1:12 PM Changeset in webkit [208929] by jdiggs@igalia.com
  • 12 edits
    9 adds in trunk

AX: [ATK] Implement selection interface and states for elements supporting aria-selected and for menu roles
https://bugs.webkit.org/show_bug.cgi?id=164865

Reviewed by Chris Fleizach.

Source/WebCore:

Implement AtkSelection and support ATK_STATE_SELECTABLE and ATK_STATE_SELECTED
for elements supporting aria-selected and for menu-related roles. Also enable the
equivalent support for the Mac because NSAccessibilitySelectedChildrenAttribute is
included as supported on the same roles.

In addition, fix several bugs discovered along the way: Call isSelected() on role
tab, because tab supports aria-selected; not aria-checked. Correct ATK mapping
of ListBoxRole and ListBoxOptionRole for combobox descendants. Always defer to
WebCore for inclusion/exclusion decisions related to elements with an explicit
ARIA role.

Tests: accessibility/aria-combobox-hierarchy.html

accessibility/aria-selected-menu-items.html
accessibility/aria-selected.html

  • accessibility/AccessibilityNodeObject.cpp:

(WebCore::AccessibilityNodeObject::selectedTabItem):
(WebCore::AccessibilityNodeObject::canSetSelectedAttribute):

  • accessibility/AccessibilityObject.cpp:

(WebCore::AccessibilityObject::isDescendantOfRole):

  • accessibility/AccessibilityObject.h:

(WebCore::AccessibilityObject::canHaveSelectedChildren):

  • accessibility/AccessibilityRenderObject.cpp:

(WebCore::AccessibilityRenderObject::isSelected):
(WebCore::AccessibilityRenderObject::canHaveSelectedChildren):
(WebCore::AccessibilityRenderObject::selectedChildren):

  • accessibility/AccessibilityRenderObject.h:
  • accessibility/atk/AccessibilityObjectAtk.cpp:

(WebCore::AccessibilityObject::accessibilityPlatformIncludesObject):

  • accessibility/atk/WebKitAccessibleInterfaceSelection.cpp:

(webkitAccessibleSelectionGetSelectionCount):

  • accessibility/atk/WebKitAccessibleWrapperAtk.cpp:

(atkRole):
(getInterfaceMaskFromObject):

  • accessibility/mac/WebAccessibilityObjectWrapperMac.mm:

(-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):

LayoutTests:

New tests for the added support. In addition, update the expectations for
aria-combobox.html to reflect the corrected ATK mapping of ListBoxRole for
combobox descendants.

  • accessibility/aria-combobox-expected.txt: Updated.
  • accessibility/aria-combobox-hierarchy.html: Added.
  • accessibility/aria-selected-menu-items.html: Added.
  • accessibility/aria-selected.html: Added.
  • platform/gtk/accessibility/aria-combobox-hierarchy-expected.txt: Added.
  • platform/gtk/accessibility/aria-selected-expected.txt: Added.
  • platform/gtk/accessibility/aria-selected-menu-items-expected.txt: Added.
  • platform/mac/accessibility/aria-combobox-hierarchy-expected.txt: Added.
  • platform/mac/accessibility/aria-selected-expected.txt: Added.
  • platform/mac/accessibility/aria-selected-menu-items-expected.txt: Added.
1:04 PM Changeset in webkit [208928] by Simon Fraser
  • 2 edits in trunk/Tools

Fix the Mac and iOS bulds.

  • WebKitTestRunner/cocoa/TestRunnerWKWebView.mm:

(-[TestRunnerWKWebView _stableStateOverride]):
(-[TestRunnerWKWebView _setStableStateOverride:]):

11:34 AM Changeset in webkit [208927] by Simon Fraser
  • 46 edits in trunk

[iOS WK2] When zoomed in and panning on pages with fixed bars, parts of the bars are sometimes missing
https://bugs.webkit.org/show_bug.cgi?id=164855

Reviewed by Sam Weinig.
Source/WebCore:

During UI-process panning and zooming, we send visible rect updates to the web process
with inStableState=false, and don't update GraphicsLayers until we get into a stable state.

This causes a problem where the web process has a stale notion of where the GraphicsLayers
for position:fixed elements are, but is then told to update tiling coverage with an up-to-date
visible rect. The existing "sync layer positions" path isn't useful to fix this, because it
breaks the relationship between the GraphicsLayer positions and their FixedPositionViewportConstraints
in the scrolling tree.

To address this, add the notion of an Optional<> approximatePosition on GraphicsLayers. This is used
only by the coverageRect computation code path, and is cleared by a setPosition(). ApproximatePositions
are pushed onto GraphicsLayers via the syncViewportConstrainedLayerPositions() code path (renamed to
reconcileViewportConstrainedLayerPositions).

This allows us to remmove "viewportIsStable" from GraphicsLayer flushing, and FrameView.

SetOrSyncScrollingLayerPosition is made into an enum class.

Tested by scrollingcoordinator/ios/non-stable-viewport-scroll.html

  • page/FrameView.cpp:

(WebCore::FrameView::reset):

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

(WebCore::AsyncScrollingCoordinator::requestScrollPositionUpdate):
(WebCore::AsyncScrollingCoordinator::scheduleUpdateScrollPositionAfterAsyncScroll):
(WebCore::AsyncScrollingCoordinator::updateScrollPositionAfterAsyncScroll):
(WebCore::AsyncScrollingCoordinator::reconcileScrollingState):
(WebCore::AsyncScrollingCoordinator::reconcileViewportConstrainedLayerPositions):
(WebCore::AsyncScrollingCoordinator::syncViewportConstrainedLayerPositions): Deleted.

  • page/scrolling/AsyncScrollingCoordinator.h:

(WebCore::AsyncScrollingCoordinator::ScheduledScrollUpdate::ScheduledScrollUpdate):

  • page/scrolling/ScrollingCoordinator.cpp:

(WebCore::operator<<):

  • page/scrolling/ScrollingCoordinator.h:

(WebCore::ScrollingCoordinator::reconcileScrollingState):
(WebCore::ScrollingCoordinator::reconcileViewportConstrainedLayerPositions):
(WebCore::ScrollingCoordinator::syncViewportConstrainedLayerPositions): Deleted.

  • page/scrolling/ScrollingStateFixedNode.cpp:

(WebCore::ScrollingStateFixedNode::reconcileLayerPositionForViewportRect):
(WebCore::ScrollingStateFixedNode::syncLayerPositionForViewportRect): Deleted.

  • page/scrolling/ScrollingStateFixedNode.h:
  • page/scrolling/ScrollingStateNode.h:

(WebCore::ScrollingStateNode::reconcileLayerPositionForViewportRect):
(WebCore::ScrollingStateNode::syncLayerPositionForViewportRect): Deleted.

  • page/scrolling/ScrollingStateStickyNode.cpp:

(WebCore::ScrollingStateStickyNode::reconcileLayerPositionForViewportRect):
(WebCore::ScrollingStateStickyNode::syncLayerPositionForViewportRect): Deleted.

  • page/scrolling/ScrollingStateStickyNode.h:
  • page/scrolling/ScrollingTree.cpp:

(WebCore::ScrollingTree::scrollPositionChangedViaDelegatedScrolling):

  • page/scrolling/ScrollingTree.h:
  • page/scrolling/ThreadedScrollingTree.cpp:

(WebCore::ThreadedScrollingTree::scrollingTreeNodeDidScroll):

  • page/scrolling/ThreadedScrollingTree.h:
  • page/scrolling/ios/ScrollingTreeFrameScrollingNodeIOS.mm:

(WebCore::ScrollingTreeFrameScrollingNodeIOS::setScrollPositionWithoutContentEdgeConstraints):

  • page/scrolling/ios/ScrollingTreeIOS.cpp:

(WebCore::ScrollingTreeIOS::scrollingTreeNodeDidScroll):

  • page/scrolling/ios/ScrollingTreeIOS.h:
  • page/scrolling/mac/ScrollingTreeFixedNode.mm:

(WebCore::ScrollingTreeFixedNode::updateLayersAfterAncestorChange):

  • platform/graphics/GraphicsLayer.cpp:

(WebCore::GraphicsLayer::dumpProperties):

  • platform/graphics/GraphicsLayer.h:

(WebCore::GraphicsLayer::setPosition):
(WebCore::GraphicsLayer::approximatePosition):
(WebCore::GraphicsLayer::setApproximatePosition):
(WebCore::GraphicsLayer::flushCompositingState):
(WebCore::GraphicsLayer::flushCompositingStateForThisLayerOnly):

  • platform/graphics/ca/GraphicsLayerCA.cpp:

(WebCore::GraphicsLayerCA::flushCompositingState):
(WebCore::GraphicsLayerCA::flushCompositingStateForThisLayerOnly):
(WebCore::GraphicsLayerCA::computeVisibleAndCoverageRect):
(WebCore::GraphicsLayerCA::setVisibleAndCoverageRects): No longer bail for viewportConstained layers when the viewport is unstable.
(WebCore::GraphicsLayerCA::recursiveCommitChanges):

  • platform/graphics/ca/GraphicsLayerCA.h:

(WebCore::GraphicsLayerCA::CommitState::CommitState): Deleted.

  • platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:

(WebCore::GraphicsLayerTextureMapper::flushCompositingState):

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

(WebCore::CoordinatedGraphicsLayer::flushCompositingState):

  • rendering/RenderLayerCompositor.cpp:

(WebCore::RenderLayerCompositor::flushPendingLayerChanges):

Source/WebKit/win:

Remove the "inStableState" parameter from flushCompositingState() etc.

  • WebCoreSupport/AcceleratedCompositingContext.cpp:

(AcceleratedCompositingContext::flushPendingLayerChanges):

  • WebView.cpp:

(WebView::flushPendingGraphicsLayerChanges):

Source/WebKit2:

During UI-process panning and zooming, we send visible rect updates to the web process
with inStableState=false, and don't update GraphicsLayers until we get into a stable state.

This causes a problem where the web process has a stale notion of where the GraphicsLayers
for position:fixed elements are, but is then told to update tiling coverage with an up-to-date
visible rect. The existing "sync layer positions" path isn't useful to fix this, because it
breaks the relationship between the GraphicsLayer positions and their FixedPositionViewportConstraints
in the scrolling tree.

To address this, add the notion of an Optional<> approximatePosition on GraphicsLayers. This is used
only by the coverageRect computation code path, and is cleared by a setPosition(). ApproximatePositions
are pushed onto GraphicsLayers via the syncViewportConstrainedLayerPositions() code path (renamed to
reconcileViewportConstrainedLayerPositions).

Tested by scrollingcoordinator/ios/non-stable-viewport-scroll.html

  • UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.cpp:

(WebKit::RemoteScrollingCoordinatorProxy::scrollingTreeNodeDidScroll):

  • UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.h:
  • UIProcess/Scrolling/RemoteScrollingTree.cpp:

(WebKit::RemoteScrollingTree::scrollingTreeNodeDidScroll):

  • UIProcess/Scrolling/RemoteScrollingTree.h:
  • WebProcess/Scrolling/RemoteScrollingCoordinator.mm:

(WebKit::RemoteScrollingCoordinator::scrollPositionChangedForNode):

  • WebProcess/WebPage/CoordinatedGraphics/CompositingCoordinator.cpp:

(WebKit::CompositingCoordinator::flushPendingLayerChanges):

  • WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:

(WebKit::CoordinatedLayerTreeHost::didFlushRootLayer):

  • WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp:

(WebKit::LayerTreeHostGtk::flushPendingLayerChanges):

  • WebProcess/WebPage/ios/WebPageIOS.mm:

(WebKit::WebPage::updateVisibleContentRects): Always push the custom fixed position rect down, but send
ScrollingLayerPositionAction::SetApproximate if the state is not stable.

  • WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:

(WebKit::RemoteLayerTreeDrawingArea::flushLayers):

  • WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:

(WebKit::TiledCoreAnimationDrawingArea::flushLayers):

11:02 AM Changeset in webkit [208926] by Simon Fraser
  • 18 edits
    2 adds in trunk

Make it possible to test non-stable-state scrolling on iOS
https://bugs.webkit.org/show_bug.cgi?id=164905

Reviewed by Dan Bernstein.

Source/WebKit2:

Make it possible for an iOS layout test to force every visible rect update
from the UI process to the web process to be in a non-stable state. This emulates
what happens during panning and zooming interactions, and allows us to test the
scrolling and layer trees in these transient states.

This is done by adding a testing property on WKWebView, _stableStateOverride, whose
getters and setters are overridden in TestRunnerWKWebView. When non-nil, we _updateVisibleContentRectAfterScrollInView
consults the NSNumber's boolValue and uses it to override the stable state.

To facilitate this kind of testing, also add immediateScrollToOffset() and
immediateZoomToScale() to UIScriptController. Finally, add doAfterPresentationUpdate()
which provides a callback that fires after one trip to the web process and back.

  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView _updateVisibleContentRectAfterScrollInView:]):
(-[WKWebView _stableStateOverride]):
(-[WKWebView _setStableStateOverride:]):

  • UIProcess/API/Cocoa/WKWebViewPrivate.h:

Tools:

Make it possible for an iOS layout test to force every visible rect update
from the UI process to the web process to be in a non-stable state. This emulates
what happens during panning and zooming interactions, and allows us to test the
scrolling and layer trees in these transient states.

This is done by adding a testing property on WKWebView, _stableStateOverride, whose
getters and setters are overridden in TestRunnerWKWebView. When non-nil, we _updateVisibleContentRectAfterScrollInView
consults the NSNumber's boolValue and uses it to override the stable state.

To facilitate this kind of testing, also add immediateScrollToOffset() and
immediateZoomToScale() to UIScriptController. Finally, add doAfterPresentationUpdate()
which provides a callback that fires after one trip to the web process and back.

Add code generation support for optional boolean attributes in IDL.

Align CodeGeneratorDumpRenderTree.pm and CodeGeneratorTestRunner.pm.

  • DumpRenderTree/Bindings/CodeGeneratorDumpRenderTree.pm:

(_generateImplementationFile):
(_platformTypeConstructor):
(_returnExpression):

  • DumpRenderTree/ios/UIScriptControllerIOS.mm:

(WTR::UIScriptController::doAfterPresentationUpdate):
(WTR::contentOffsetBoundedInValidRange):
(WTR::UIScriptController::scrollToOffset):
(WTR::UIScriptController::immediateScrollToOffset):
(WTR::UIScriptController::immediateZoomToScale):
(WTR::UIScriptController::stableStateOverride):
(WTR::UIScriptController::setStableStateOverride):

  • DumpRenderTree/mac/UIScriptControllerMac.mm:

(WTR::UIScriptController::doAfterPresentationUpdate):

  • TestRunnerShared/Bindings/JSWrappable.h:

(WTR::JSValueMakeBooleanOrNull):
(WTR::JSValueToNullableBoolean):

  • TestRunnerShared/UIScriptContext/Bindings/UIScriptController.idl:
  • TestRunnerShared/UIScriptContext/UIScriptController.cpp:

(WTR::UIScriptController::immediateScrollToOffset):
(WTR::UIScriptController::immediateZoomToScale):
(WTR::UIScriptController::stableStateOverride):
(WTR::UIScriptController::setStableStateOverride):

  • TestRunnerShared/UIScriptContext/UIScriptController.h:
  • WebKitTestRunner/InjectedBundle/Bindings/CodeGeneratorTestRunner.pm:

(_classRefGetter):
(_platformTypeConstructor):
(_returnExpression):

  • WebKitTestRunner/cocoa/TestRunnerWKWebView.mm:

(-[TestRunnerWKWebView dealloc]):
(-[TestRunnerWKWebView _stableStateOverride]):
(-[TestRunnerWKWebView _setStableStateOverride:]):

  • WebKitTestRunner/ios/TestControllerIOS.mm:

(WTR::TestController::platformResetStateToConsistentValues):

  • WebKitTestRunner/ios/UIScriptControllerIOS.mm:

(WTR::UIScriptController::doAsyncTask):
(WTR::UIScriptController::doAfterPresentationUpdate):
(WTR::UIScriptController::zoomToScale):
(WTR::UIScriptController::immediateScrollToOffset):
(WTR::UIScriptController::immediateZoomToScale):
(WTR::UIScriptController::stableStateOverride):
(WTR::UIScriptController::setStableStateOverride):

  • WebKitTestRunner/mac/UIScriptControllerMac.mm:

(WTR::UIScriptController::doAfterPresentationUpdate):

LayoutTests:

  • scrollingcoordinator/ios/non-stable-viewport-scroll-expected.txt: Added.
  • scrollingcoordinator/ios/non-stable-viewport-scroll.html: Added.
9:39 AM Changeset in webkit [208925] by mark.lam@apple.com
  • 6 edits in trunk

Add --timeoutMultiplier option to allow some tests more time to run.
https://bugs.webkit.org/show_bug.cgi?id=164951

Reviewed by Yusuke Suzuki.

JSTests:

Extended the timeout for these tests by 50% more because they run quite slow on
low-end machines.

  • stress/op_div-ConstVar.js:
  • stress/op_div-VarConst.js:
  • stress/op_div-VarVar.js:

Source/JavaScriptCore:

  • jsc.cpp:

(timeoutThreadMain):

  • Modified to factor in a timeout multiplier that can adjust the timeout duration.

(startTimeoutThreadIfNeeded):

  • Moved the code that starts the timeout thread here from main() so that we can

call it after command line args have been parsed instead.
(main):

  • Deleted old timeout thread starting code.

(CommandLine::parseArguments):

  • Added parsing of the --timeoutMultiplier option.

(jscmain):

  • Start the timeout thread if needed after we've parsed the command line args.
12:08 AM Changeset in webkit [208924] by jdiggs@igalia.com
  • 11 edits
    2 adds in trunk

AX: [ATK] Expose aria-busy via ATK_STATE_BUSY
https://bugs.webkit.org/show_bug.cgi?id=164909

Reviewed by Chris Fleizach.

Source/WebCore:

Expose aria-busy via ATK_STATE_BUSY. Also rename ariaLiveRegionBusy()
to isBusy() because in ARIA 1.1 aria-busy is no longer limited to live
regions.

Test: accessibility/aria-busy.html

  • accessibility/AccessibilityObject.h:

(WebCore::AccessibilityObject::isBusy):
(WebCore::AccessibilityObject::ariaLiveRegionBusy): Deleted.

  • accessibility/AccessibilityRenderObject.cpp:

(WebCore::AccessibilityRenderObject::isBusy):
(WebCore::AccessibilityRenderObject::ariaLiveRegionBusy): Deleted.

  • accessibility/AccessibilityRenderObject.h:
  • accessibility/atk/WebKitAccessibleWrapperAtk.cpp:

(setAtkStateSetFromCoreObject):

  • accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:

(-[WebAccessibilityObjectWrapper accessibilityARIAIsBusy]):

  • accessibility/mac/WebAccessibilityObjectWrapperMac.mm:

(-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):

  • inspector/InspectorDOMAgent.cpp:

(WebCore::InspectorDOMAgent::buildObjectForAccessibilityProperties):

Tools:

Implement boolAttributeValue() for ATK so we can test AXElementBusy.

  • WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp:

(WTR::AccessibilityUIElement::boolAttributeValue):

LayoutTests:

  • accessibility/aria-busy-expected.txt: Added.
  • accessibility/aria-busy.html: Added.
12:03 AM Changeset in webkit [208923] by mark.lam@apple.com
  • 3 edits in trunk/Source/JavaScriptCore

Fix missing exception checks in JSC inspector files.
https://bugs.webkit.org/show_bug.cgi?id=164959

Reviewed by Saam Barati.

  • inspector/JSInjectedScriptHost.cpp:

(Inspector::JSInjectedScriptHost::getInternalProperties):
(Inspector::JSInjectedScriptHost::weakMapEntries):
(Inspector::JSInjectedScriptHost::weakSetEntries):
(Inspector::JSInjectedScriptHost::iteratorEntries):

  • inspector/JSJavaScriptCallFrame.cpp:

(Inspector::JSJavaScriptCallFrame::scopeDescriptions):

12:02 AM Changeset in webkit [208922] by rniwa@webkit.org
  • 4 edits
    7 adds in trunk

REGRESSION(r200964): Tab focus navigation is broken on results.en.voyages-sncf.com
https://bugs.webkit.org/show_bug.cgi?id=164888

Reviewed by Antti Koivisto.

Source/WebCore:

The bug was caused by FocusNavigationScope::parentInScope incorrectly returning nullptr when moving out of
a user agent shadow tree of a SVG use element. Fixed the bug by explicitly checking against the focus scope's
root node or its slot element. Also removed a superfluous early return when the parent node is a focus scope.

Tests: fast/shadow-dom/focus-navigation-out-of-slot.html

fast/shadow-dom/focus-navigation-passes-shadow-host.html
fast/shadow-dom/focus-navigation-passes-svg-use-element.html

  • page/FocusController.cpp:

(WebCore::FocusNavigationScope::parentInScope):

LayoutTests:

Add regression tests for moving the focus across a shadow tree and a SVG use element
and the one that moves out of a slot element.

  • fast/shadow-dom/focus-navigation-out-of-slot-expected.txt: Added.
  • fast/shadow-dom/focus-navigation-out-of-slot.html: Added.
  • fast/shadow-dom/focus-navigation-passes-shadow-host-expected.txt: Added.
  • fast/shadow-dom/focus-navigation-passes-shadow-host.html: Added.
  • fast/shadow-dom/focus-navigation-passes-svg-use-element-expected.txt: Added.
  • fast/shadow-dom/focus-navigation-passes-svg-use-element.html: Added.
  • platform/ios-simulator/TestExpectations: Skip the newly added tests on iOS.

Nov 18, 2016:

11:35 PM Changeset in webkit [208921] by Simon Fraser
  • 12 edits
    6 adds in trunk

[iOS WK2] Eliminate a source of flakiness in layout tests by forcing WebPage into "responsive" mode for all tests, with an internals override
https://bugs.webkit.org/show_bug.cgi?id=164980

Reviewed by Chris Dumez.

Source/WebCore:

WebPage::eventThrottlingDelay() uses a latency estimate based on the round-trip time from the UI process
to affect behavior, including whether scroll events are fired. This also affects the FrameView "scrolledByUser"
flag that impacts tile coverage.

During testing, latency falling above or below the 16ms threshold could affect behavior. Fix by forcing
WebPage into "responsive" mode while running tests, via InjectedBundlePage::prepare().

Add a nullable internals property so that a test can specify responsive, unresponsive or default behavior.

Tests: fast/scrolling/ios/scroll-events-default.html

fast/scrolling/ios/scroll-events-responsive.html
fast/scrolling/ios/scroll-events-unresponsive.html

  • page/Page.h:

(WebCore::Page::eventThrottlingBehaviorOverride):
(WebCore::Page::setEventThrottlingBehaviorOverride):

  • testing/Internals.cpp:

(WebCore::Internals::setEventThrottlingBehaviorOverride):
(WebCore::Internals::eventThrottlingBehaviorOverride):

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

Source/WebKit2:

WebPage::eventThrottlingDelay() uses a latency estimate based on the round-trip time from the UI process
to affect behavior, including whether scroll events are fired. This also affects the FrameView "scrolledByUser"
flag that impacts tile coverage.

During testing, latency falling above or below the 16ms threshold could affect behavior. Fix by forcing
WebPage into "responsive" mode while running tests, via InjectedBundlePage::prepare().

Add a nullable internals property so that a test can specify responsive, unresponsive or default behavior.

  • WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:

(WKBundlePageSetEventThrottlingBehaviorOverride):

  • WebProcess/InjectedBundle/API/c/WKBundlePagePrivate.h:
  • WebProcess/WebPage/ios/WebPageIOS.mm:

(WebKit::WebPage::eventThrottlingDelay):

Tools:

  • WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:

(WTR::InjectedBundlePage::prepare):

LayoutTests:

  • fast/scrolling/ios/scroll-events-default-expected.txt: Added.
  • fast/scrolling/ios/scroll-events-default.html: Added.
  • fast/scrolling/ios/scroll-events-responsive-expected.txt: Added.
  • fast/scrolling/ios/scroll-events-responsive.html: Added.
  • fast/scrolling/ios/scroll-events-unresponsive-expected.txt: Added.
  • fast/scrolling/ios/scroll-events-unresponsive.html: Added.
9:09 PM Changeset in webkit [208920] by Chris Dumez
  • 2 edits in trunk/Source/WebCore

Unreviewed attempt to fix the build after r208917.

  • dom/CustomElementReactionQueue.cpp:

(WebCore::CustomElementReactionStack::ElementQueue::invokeAll):

8:45 PM Changeset in webkit [208919] by Chris Dumez
  • 2 edits in trunk/Source/WebCore

Unreviewed attempt to fix the build after r208917.

  • dom/CustomElementReactionQueue.cpp:
8:38 PM Changeset in webkit [208918] by jiewen_tan@apple.com
  • 21 edits
    31 adds in trunk

Update SubtleCrypto::decrypt to match the latest spec
https://bugs.webkit.org/show_bug.cgi?id=164739
<rdar://problem/29257848>

Reviewed by Brent Fulgham.

LayoutTests/imported/w3c:

  • WebCryptoAPI/encrypt_decrypt/test_aes_cbc-expected.txt:
  • WebCryptoAPI/idlharness-expected.txt:

Source/WebCore:

This patch does following few things:

  1. It updates the SubtleCrypto::decrypt method to match the latest spec: https://www.w3.org/TR/WebCryptoAPI/#SubtleCrypto-method-decrypt. It also refers to the latest Editor's Draft to a certain degree: https://w3c.github.io/webcrypto/Overview.html#SubtleCrypto-method-decrypt.
  2. It implements decrypt operations of the following algorithms: AES-CBC, RSAES-PKCS1-V1_5, and RSA-OAEP.

Tests: crypto/subtle/aes-cbc-decrypt-malformed-parameters.html

crypto/subtle/aes-cbc-generate-key-encrypt-decrypt.html
crypto/subtle/aes-cbc-import-key-decrypt.html
crypto/subtle/decrypt-malformed-parameters.html
crypto/subtle/rsa-oaep-decrypt-malformed-parameters.html
crypto/subtle/rsa-oaep-generate-key-encrypt-decrypt-label.html
crypto/subtle/rsa-oaep-generate-key-encrypt-decrypt.html
crypto/subtle/rsa-oaep-import-key-decrypt-label.html
crypto/subtle/rsa-oaep-import-key-decrypt.html
crypto/subtle/rsaes-pkcs1-v1_5-generate-key-encrypt-decrypt.html
crypto/subtle/rsaes-pkcs1-v1_5-import-key-decrypt.html
crypto/workers/subtle/aes-cbc-import-key-decrypt.html
crypto/workers/subtle/rsa-oaep-import-key-decrypt.html
crypto/workers/subtle/rsaes-pkcs1-v1_5-import-key-decrypt.html

  • bindings/js/JSSubtleCryptoCustom.cpp:

(WebCore::normalizeCryptoAlgorithmParameters):
(WebCore::toCryptoKey):
(WebCore::toVector):
(WebCore::jsSubtleCryptoFunctionEncryptPromise):
(WebCore::jsSubtleCryptoFunctionDecryptPromise):
(WebCore::jsSubtleCryptoFunctionExportKeyPromise):
(WebCore::JSSubtleCrypto::decrypt):

  • crypto/CryptoAlgorithm.cpp:

(WebCore::CryptoAlgorithm::decrypt):

  • crypto/CryptoAlgorithm.h:
  • crypto/SubtleCrypto.idl:
  • crypto/algorithms/CryptoAlgorithmAES_CBC.cpp:

(WebCore::CryptoAlgorithmAES_CBC::decrypt):

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

(WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::decrypt):

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

(WebCore::CryptoAlgorithmRSA_OAEP::decrypt):

  • crypto/algorithms/CryptoAlgorithmRSA_OAEP.h:
  • crypto/gnutls/CryptoAlgorithmAES_CBCGnuTLS.cpp:

(WebCore::CryptoAlgorithmAES_CBC::platformDecrypt):

  • crypto/gnutls/CryptoAlgorithmRSAES_PKCS1_v1_5GnuTLS.cpp:

(WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::platformDecrypt):

  • crypto/gnutls/CryptoAlgorithmRSA_OAEPGnuTLS.cpp:

(WebCore::CryptoAlgorithmRSA_OAEP::platformDecrypt):

  • crypto/mac/CryptoAlgorithmAES_CBCMac.cpp:

(WebCore::CryptoAlgorithmAES_CBC::platformDecrypt):

  • crypto/mac/CryptoAlgorithmRSAES_PKCS1_v1_5Mac.cpp:

(WebCore::decryptRSAES_PKCS1_v1_5):
(WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::platformDecrypt):

  • crypto/mac/CryptoAlgorithmRSA_OAEPMac.cpp:

(WebCore::decryptRSA_OAEP):
(WebCore::CryptoAlgorithmRSA_OAEP::platformDecrypt):

LayoutTests:

  • crypto/subtle/aes-cbc-decrypt-malformed-parameters-expected.txt: Added.
  • crypto/subtle/aes-cbc-decrypt-malformed-parameters.html: Added.
  • crypto/subtle/aes-cbc-generate-key-encrypt-decrypt-expected.txt: Added.
  • crypto/subtle/aes-cbc-generate-key-encrypt-decrypt.html: Added.
  • crypto/subtle/aes-cbc-import-key-decrypt-expected.txt: Added.
  • crypto/subtle/aes-cbc-import-key-decrypt.html: Added.
  • crypto/subtle/decrypt-malformed-parameters-expected.txt: Added.
  • crypto/subtle/decrypt-malformed-parameters.html: Added.
  • crypto/subtle/rsa-oaep-decrypt-malformed-parameters-expected.txt: Added.
  • crypto/subtle/rsa-oaep-decrypt-malformed-parameters.html: Added.
  • crypto/subtle/rsa-oaep-generate-key-encrypt-decrypt-expected.txt: Added.
  • crypto/subtle/rsa-oaep-generate-key-encrypt-decrypt-label-expected.txt: Added.
  • crypto/subtle/rsa-oaep-generate-key-encrypt-decrypt-label.html: Added.
  • crypto/subtle/rsa-oaep-generate-key-encrypt-decrypt.html: Added.
  • crypto/subtle/rsa-oaep-import-key-decrypt-expected.txt: Added.
  • crypto/subtle/rsa-oaep-import-key-decrypt-label-expected.txt: Added.
  • crypto/subtle/rsa-oaep-import-key-decrypt-label.html: Added.
  • crypto/subtle/rsa-oaep-import-key-decrypt.html: Added.
  • crypto/subtle/rsaes-pkcs1-v1_5-generate-key-encrypt-decrypt-expected.txt: Added.
  • crypto/subtle/rsaes-pkcs1-v1_5-generate-key-encrypt-decrypt.html: Added.
  • crypto/subtle/rsaes-pkcs1-v1_5-import-key-decrypt-expected.txt: Added.
  • crypto/subtle/rsaes-pkcs1-v1_5-import-key-decrypt.html: Added.
  • crypto/workers/subtle/aes-cbc-import-key-decrypt-expected.txt: Added.
  • crypto/workers/subtle/aes-cbc-import-key-decrypt.html: Added.
  • crypto/workers/subtle/resources/aes-cbc-import-key-decrypt.js: Added.
  • crypto/workers/subtle/resources/rsa-oaep-import-key-decrypt.js: Added.
  • crypto/workers/subtle/resources/rsaes-pkcs1-v1_5-import-key-decrypt.js: Added.
  • crypto/workers/subtle/rsa-oaep-import-key-decrypt-expected.txt: Added.
  • crypto/workers/subtle/rsa-oaep-import-key-decrypt.html: Added.
  • crypto/workers/subtle/rsaes-pkcs1-v1_5-import-key-decrypt-expected.txt: Added.
  • crypto/workers/subtle/rsaes-pkcs1-v1_5-import-key-decrypt.html: Added.
8:25 PM Changeset in webkit [208917] by Chris Dumez
  • 5 edits in trunk

Unreviewed, rolling out r208837.

The bots did not show a progression

Reverted changeset:

"REGRESSION(r208082): 1% Speedometer regression on iOS"
https://bugs.webkit.org/show_bug.cgi?id=164852
http://trac.webkit.org/changeset/208837

7:33 PM Changeset in webkit [208916] by Simon Fraser
  • 20 edits in trunk/Source

Remove use of std::chrono in WebPage and entrained code
https://bugs.webkit.org/show_bug.cgi?id=164967

Reviewed by Tim Horton.

Replace std::chrono with Seconds and Monotonic Time.

Use more C++11 initialization for WebPage data members.

Source/WebCore:

  • page/ChromeClient.h:
  • page/FrameView.cpp:

(WebCore::FrameView::scrollPositionChanged):
(WebCore::FrameView::setScrollVelocity):

  • page/FrameView.h:
  • platform/Timer.h:

(WebCore::TimerBase::startRepeating):
(WebCore::TimerBase::startOneShot):
(WebCore::TimerBase::augmentFireInterval):
(WebCore::TimerBase::augmentRepeatInterval):

  • platform/graphics/TiledBacking.h:

(WebCore::VelocityData::VelocityData):

  • platform/graphics/ca/TileController.cpp:

(WebCore::TileController::adjustTileCoverageRect):

Source/WebKit2:

  • Shared/VisibleContentRectUpdateInfo.cpp:

(WebKit::operator<<):

  • Shared/VisibleContentRectUpdateInfo.h:

(WebKit::VisibleContentRectUpdateInfo::VisibleContentRectUpdateInfo):
(WebKit::VisibleContentRectUpdateInfo::timestamp):

  • Shared/WebCoreArgumentCoders.cpp:

(IPC::ArgumentCoder<MonotonicTime>::encode):
(IPC::ArgumentCoder<MonotonicTime>::decode):
(IPC::ArgumentCoder<Seconds>::encode):
(IPC::ArgumentCoder<Seconds>::decode):

  • Shared/WebCoreArgumentCoders.h:
  • UIProcess/ios/WKContentView.mm:

(WebKit::HistoricalVelocityData::HistoricalVelocityData):
(WebKit::HistoricalVelocityData::velocityForNewData):
(WebKit::HistoricalVelocityData::append):
(-[WKContentView didUpdateVisibleRect:unobscuredRect:unobscuredRectInScrollViewCoordinates:obscuredInset:scale:minimumScale:inStableState:isChangingObscuredInsetsInteractively:enclosedInScrollableAncestorView:]):

  • WebProcess/WebCoreSupport/WebChromeClient.h:
  • WebProcess/WebCoreSupport/ios/WebChromeClientIOS.mm:

(WebKit::WebChromeClient::eventThrottlingDelay):

  • WebProcess/WebPage/ViewUpdateDispatcher.h:
  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::WebPage):
(WebKit::m_userActivityHysteresis):
(WebKit::WebPage::didFlushLayerTreeAtTime):
(WebKit::WebPage::didCommitLoad):

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

(WebKit::WebPage::eventThrottlingDelay):
(WebKit::WebPage::updateVisibleContentRects):

  • WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:

(WebKit::RemoteLayerTreeDrawingArea::flushLayers):

6:51 PM Changeset in webkit [208915] by dino@apple.com
  • 27 edits
    8 adds in trunk

AX: "(inverted-colors)" media query only matches on page reload; should match on change
https://bugs.webkit.org/show_bug.cgi?id=163564
<rdar://problem/28807350>

Source/WebCore:

Reviewed by Simon Fraser.

Mark some media queries as responding to notifications that
system accessibility settings have changed. When Page gets told
that has happened, check if any of the results have changed.

Tests: fast/media/mq-inverted-colors-live-update.html

fast/media/mq-monochrome-live-update.html
fast/media/mq-prefers-reduced-motion-live-update.html

  • css/MediaQueryEvaluator.cpp:

(WebCore::isAccessibilitySettingsDependent):
(WebCore::MediaQueryEvaluator::evaluate):

  • css/StyleResolver.cpp:

(WebCore::StyleResolver::addAccessibilitySettingsDependentMediaQueryResult):
(WebCore::StyleResolver::hasMediaQueriesAffectedByAccessibilitySettingsChange):

  • css/StyleResolver.h:

(WebCore::StyleResolver::hasAccessibilitySettingsDependentMediaQueries):

  • page/Page.cpp:

(WebCore::Page::accessibilitySettingsDidChange):

  • page/Page.h:

Source/WebKit2:

Reviewed by Simon Fraser.

Listen for the appropriate notifications that accessibility settings
have changed. This is a single notification on macOS, which uses WebViewImpl,
and more fine-grained notifications on iOS, using WKWebView.

When we see the notification, send a message to the WebProcess which will
then tell the WebCore::Page.

  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView _initializeWithConfiguration:]):
(-[WKWebView _accessibilitySettingsDidChange:]):

  • UIProcess/API/Cocoa/WKWebViewPrivate.h:
  • UIProcess/Cocoa/WebViewImpl.h:
  • UIProcess/Cocoa/WebViewImpl.mm:

(-[WKAccessibilitySettingsObserver initWithImpl:]):
(-[WKAccessibilitySettingsObserver dealloc]):
(-[WKAccessibilitySettingsObserver _settingsDidChange:]):
(WebKit::WebViewImpl::WebViewImpl):
(WebKit::WebViewImpl::accessibilitySettingsDidChange):

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::accessibilitySettingsDidChange):

  • UIProcess/WebPageProxy.h:
  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::accessibilitySettingsDidChange):

  • WebProcess/WebPage/WebPage.h:
  • WebProcess/WebPage/WebPage.messages.in:

Tools:

Reviewed by NOBODY (OOPS!).

Add a UIScriptController method that tricks WebKit into thinking
it has received a notification that accessibility settings have
changed. Combined with our forced overrides, this allows us to
test if a page would react to the notifications.

  • DumpRenderTree/ios/UIScriptControllerIOS.mm:

(WTR::UIScriptController::simulateAccessibilitySettingsChangeNotification):

  • DumpRenderTree/mac/UIScriptControllerMac.mm:

(WTR::UIScriptController::simulateAccessibilitySettingsChangeNotification):

  • TestRunnerShared/UIScriptContext/Bindings/UIScriptController.idl:
  • TestRunnerShared/UIScriptContext/UIScriptController.cpp:

(WTR::simulateAccessibilitySettingsChangeNotification):

  • TestRunnerShared/UIScriptContext/UIScriptController.h:
  • WebKitTestRunner/ios/UIScriptControllerIOS.mm:

(WTR::UIScriptController::simulateAccessibilitySettingsChangeNotification):

  • WebKitTestRunner/mac/UIScriptControllerMac.mm:

(WTR::UIScriptController::simulateAccessibilitySettingsChangeNotification):

LayoutTests:

Reviewed by Simon Fraser.

  • fast/media/mq-inverted-colors-live-update-in-subframes-expected.html: Added.
  • fast/media/mq-inverted-colors-live-update-in-subframes.html: Added.
  • fast/media/mq-inverted-colors-live-update-expected.html: Added.
  • fast/media/mq-inverted-colors-live-update.html: Added.
  • fast/media/mq-monochrome-live-update-expected.html: Added.
  • fast/media/mq-monochrome-live-update.html: Added.
  • fast/media/mq-prefers-reduced-motion-live-update-expected.html: Added.
  • fast/media/mq-prefers-reduced-motion-live-update.html: Added.
6:45 PM Changeset in webkit [208914] by andersca@apple.com
  • 9 edits in trunk/Source/WebCore

Rename the 'other' Apple Pay Button type to 'donate'
https://bugs.webkit.org/show_bug.cgi?id=164978

Reviewed by Dean Jackson.

  • DerivedSources.make:
  • WebCorePrefix.h:
  • css/CSSPrimitiveValueMappings.h:

(WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
(WebCore::CSSPrimitiveValue::operator ApplePayButtonType):

  • css/CSSValueKeywords.in:
  • css/parser/CSSParser.cpp:

(WebCore::isValidKeywordPropertyAndValue):

  • css/parser/CSSParserFastPaths.cpp:

(WebCore::CSSParserFastPaths::isValidKeywordPropertyAndValue):

  • rendering/RenderThemeCocoa.mm:

(WebCore::toPKPaymentButtonType):

  • rendering/style/RenderStyleConstants.h:
5:46 PM Changeset in webkit [208913] by mark.lam@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

Fix missing exception checks in DFGOperations.cpp.
https://bugs.webkit.org/show_bug.cgi?id=164958

Reviewed by Geoffrey Garen.

  • dfg/DFGOperations.cpp:
5:40 PM Changeset in webkit [208912] by mark.lam@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

Fix exception scope verification failures in ShadowChicken.cpp.
https://bugs.webkit.org/show_bug.cgi?id=164966

Reviewed by Saam Barati.

  • interpreter/ShadowChicken.cpp:

(JSC::ShadowChicken::functionsOnStack):

5:00 PM Changeset in webkit [208911] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebKit2

USE WK_MAC_TBA for version number in _webViewRequestPointerLock:(WKWebView *)webView WK_API_AVAILABLE(macosx(10.12))
https://bugs.webkit.org/show_bug.cgi?id=164962

Patch by Jeremy Jones <jeremyj@apple.com> on 2016-11-18
Reviewed by Dean Jackson.

  • UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
5:00 PM Changeset in webkit [208910] by mmaxfield@apple.com
  • 12 edits
    2 adds in trunk

[WebGL2] Implement texStorage2D()
https://bugs.webkit.org/show_bug.cgi?id=164493

Reviewed by Dean Jackson.

Source/WebCore:

Create a new validation function which only accepts sized internalFormats.
After running texStorage2D(), we also texSubImage2D() to zero-fill it. This
is to compensate for potentially buggy drivers.

Because glTexStorage2D() was only added to OpenGL in version 4.2, not all
OpenGL 3.2+ contexts can implement this command. However, according to
https://developer.apple.com/opengl/capabilities/ all Apple GPUs have the
GL_ARB_texture_storage which implements this call. In the future, we could
implement texStorage2D() on top of texImage2D() if there are any ports which
want WebGL2 but don't have 4.2 and don't have the extension.

Also, when calling texStorage2D, callers specify an internalFormat but not a
type/format pair. This means that storing the texture's type is only valid
for WebGL 1 contexts. This patch surrounds all calls to reading the texture
type with guards and adds an ASSERT() at the read site to make sure the
right thing is happening.

Test: fast/canvas/webgl/webgl2-texStorage.html

  • html/canvas/WebGL2RenderingContext.cpp:

(WebCore::WebGL2RenderingContext::validateTexStorageFuncParameters):
(WebCore::WebGL2RenderingContext::texStorage2D):

  • html/canvas/WebGL2RenderingContext.h:
  • html/canvas/WebGLRenderingContext.cpp:

(WebCore::WebGLRenderingContext::validateIndexArrayConservative):

  • html/canvas/WebGLRenderingContextBase.cpp:

(WebCore::WebGLRenderingContextBase::create):
(WebCore::WebGLRenderingContextBase::copyTexSubImage2D):
(WebCore::WebGLRenderingContextBase::validateTexFunc):
(WebCore::WebGLRenderingContextBase::validateTexFuncData):
(WebCore::WebGLRenderingContextBase::texImage2D):

  • html/canvas/WebGLTexture.cpp:

(WebCore::WebGLTexture::WebGLTexture):
(WebCore::WebGLTexture::getType):
(WebCore::WebGLTexture::needToUseBlackTexture):
(WebCore::WebGLTexture::canGenerateMipmaps):
(WebCore::internalFormatIsFloatType):
(WebCore::internalFormatIsHalfFloatType):
(WebCore::WebGLTexture::update):

  • html/canvas/WebGLTexture.h:
  • platform/graphics/GraphicsContext3D.cpp:

(WebCore::GraphicsContext3D::texImage2DResourceSafe):
(WebCore::GraphicsContext3D::packImageData):
(WebCore::GraphicsContext3D::extractImageData):

  • platform/graphics/GraphicsContext3D.h:
  • platform/graphics/opengl/Extensions3DOpenGLCommon.cpp:

(WebCore::Extensions3DOpenGLCommon::initializeAvailableExtensions):

  • platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:

(WebCore::GraphicsContext3D::texStorage2D):
(WebCore::GraphicsContext3D::texStorage3D):

LayoutTests:

  • fast/canvas/webgl/webgl2-texStorage-expected.txt: Added.
  • fast/canvas/webgl/webgl2-texStorage.html: Added.
4:58 PM Changeset in webkit [208909] by achristensen@apple.com
  • 4 edits in trunk

TextDecoder constructor should not accept replacement encodings
https://bugs.webkit.org/show_bug.cgi?id=164903

Reviewed by Chris Dumez.

LayoutTests/imported/w3c:

  • web-platform-tests/encoding/api-replacement-encodings-expected.txt:

Source/WebCore:

Covered by newly passing web platform tests.

  • dom/TextDecoder.cpp:

(WebCore::TextDecoder::create):
https://encoding.spec.whatwg.org/#textdecoder says about the constructor:
"If label is either not a label or is a label for replacement, throws a RangeError."
See https://bugs.webkit.org/show_bug.cgi?id=159180 for the mapping of the replacement
codec names to "replacement".

4:38 PM Changeset in webkit [208908] by Chris Dumez
  • 2 edits in trunk/Source/WebCore

Assertion failures in ActiveDOMObject::~ActiveDOMObject under Database destructor
https://bugs.webkit.org/show_bug.cgi?id=164955
<rdar://problem/29336715>

Reviewed by Brady Eidson.

Make sure the Database's DatabaseContext object is destroyed on the context
thread given that DatabaseContext is an ActiveDOMObject and there is an
assertion in the ActiveDOMObject destructor that it should be destroyed on
on the context thread.

No new tests, already covered by existing tests.

  • Modules/webdatabase/Database.cpp:

(WebCore::Database::~Database):

4:28 PM Changeset in webkit [208907] by matthew_hanson@apple.com
  • 2 edits in tags/Safari-603.1.13/Source/WebKit/mac

Merge r208877. rdar://problem/29326204

4:28 PM Changeset in webkit [208906] by matthew_hanson@apple.com
  • 5 edits in tags/Safari-603.1.13

Disable INTERSECTION_OBSERVER on the tag. rdar://problem/29324149

3:50 PM Changeset in webkit [208905] by achristensen@apple.com
  • 2 edits in trunk/Tools

Fix API test after r208902
https://bugs.webkit.org/show_bug.cgi?id=144194

  • TestWebKitAPI/Tests/Cocoa/URLExtras.mm:

(TestWebKitAPI::TEST):
The fullwidth solidus, U+FF0F, changed encoding from IDN2003 to IDN2008, probably to prevent domains from using it
to spoof other domains. https://webkit.org/blog/ and https://webkit.org\uFF0Fblog/ would otherwise look
too similar when rendered.

3:35 PM Changeset in webkit [208904] by enrica@apple.com
  • 24 edits in trunk/Source

Refactor drag and drop for WebKit2 to encode DragData message exchange.
https://bugs.webkit.org/show_bug.cgi?id=164945

Reviewed by Tim Horton.

Source/WebCore:

No new tests. No change in functionality.

  • loader/EmptyClients.h:
  • page/DragClient.h:
  • page/DragController.cpp:

(WebCore::createMouseEvent):
(WebCore::documentFragmentFromDragData):
(WebCore::DragController::dragIsMove):
(WebCore::DragController::dragEntered):
(WebCore::DragController::dragExited):
(WebCore::DragController::dragUpdated):
(WebCore::DragController::performDragOperation):
(WebCore::DragController::dragEnteredOrUpdated):
(WebCore::DragController::tryDocumentDrag):
(WebCore::DragController::operationForLoad):
(WebCore::DragController::dispatchTextInputEventFor):
(WebCore::DragController::concludeEditDrag):
(WebCore::DragController::canProcessDrag):
(WebCore::DragController::tryDHTMLDrag):

  • page/DragController.h:
  • page/efl/DragControllerEfl.cpp:

(WebCore::DragController::isCopyKeyDown):
(WebCore::DragController::dragOperation):

  • page/gtk/DragControllerGtk.cpp:

(WebCore::DragController::isCopyKeyDown):
(WebCore::DragController::dragOperation):

  • page/mac/DragControllerMac.mm:

(WebCore::DragController::isCopyKeyDown):
(WebCore::DragController::dragOperation):

  • page/win/DragControllerWin.cpp:

(WebCore::DragController::dragOperation):
(WebCore::DragController::isCopyKeyDown):

  • platform/DragData.h:

(WebCore::DragData::DragData):

Source/WebKit/mac:

  • WebCoreSupport/WebDragClient.h:
  • WebCoreSupport/WebDragClient.mm:

(WebDragClient::actionMaskForDrag):
(WebDragClient::willPerformDragDestinationAction):

Source/WebKit2:

  • Shared/WebCoreArgumentCoders.cpp:

(IPC::ArgumentCoder<DragData>::encode):
(IPC::ArgumentCoder<DragData>::decode):

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

(WebKit::WebPageProxy::performDragControllerAction):

  • WebProcess/WebCoreSupport/WebDragClient.cpp:

(WebKit::WebDragClient::willPerformDragDestinationAction):
(WebKit::WebDragClient::actionMaskForDrag):

  • WebProcess/WebCoreSupport/WebDragClient.h:
  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::performDragControllerAction):

  • WebProcess/WebPage/WebPage.h:
  • WebProcess/WebPage/WebPage.messages.in:
3:33 PM Changeset in webkit [208903] by commit-queue@webkit.org
  • 33 edits in trunk

Add runtime flag to enable pointer lock. Enable pointer lock feature for mac.
https://bugs.webkit.org/show_bug.cgi?id=163801

Patch by Jeremy Jones <jeremyj@apple.com> on 2016-11-18
Reviewed by Simon Fraser.

Source/JavaScriptCore:

  • Configurations/FeatureDefines.xcconfig:

Source/WebCore:

These tests now pass with DumpRenderTree.
LayoutTests/pointer-lock/lock-already-locked.html
LayoutTests/pointer-lock/lock-element-not-in-dom.html
LayoutTests/pointer-lock/locked-element-iframe-removed-from-dom.html
LayoutTests/pointer-lock/mouse-event-api.html

PointerLockController::requestPointerLock now protects against synchronous callback
to allowPointerLock().

Add pointerLockEnabled setting.

  • Configurations/FeatureDefines.xcconfig:
  • dom/Document.cpp:

(WebCore::Document::exitPointerLock): Fix existing typo.
(WebCore::Document::pointerLockElement):

  • features.json:
  • page/EventHandler.cpp:
  • page/PointerLockController.cpp:

(WebCore::PointerLockController::requestPointerLock):
(WebCore::PointerLockController::requestPointerUnlock):

  • page/Settings.in:

Source/WebKit/mac:

Plumb through PointerLockEnabled setting.

  • Configurations/FeatureDefines.xcconfig:
  • WebCoreSupport/WebChromeClient.mm:

(WebChromeClient::requestPointerUnlock):

  • WebView/WebPreferenceKeysPrivate.h:
  • WebView/WebPreferences.mm:

(-[WebPreferences pointerLockEnabled]):
(-[WebPreferences setPointerLockEnabled:]):

  • WebView/WebPreferencesPrivate.h:
  • WebView/WebView.mm:

(-[WebView _preferencesChanged:]):

Source/WebKit2:

Add SPI to notify client of pointer lock and for client to allow or deny.
Unlock pointer when view is not longer active.

  • Configurations/FeatureDefines.xcconfig:
  • Shared/WebPreferencesDefinitions.h:
  • UIProcess/API/APIUIClient.h:

(API::UIClient::requestPointerLock):
(API::UIClient::didLosePointerLock):

  • UIProcess/API/C/WKPage.cpp:

(WKPageSetPageUIClient):
(WKPageDidAllowPointerLock):
(WKPageDidDenyPointerLock):

  • UIProcess/API/C/WKPagePrivate.h:
  • UIProcess/API/C/WKPageUIClient.h:
  • UIProcess/API/C/WKPreferences.cpp:
  • UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
  • UIProcess/Cocoa/UIDelegate.h:
  • UIProcess/Cocoa/UIDelegate.mm:

(WebKit::UIDelegate::setDelegate):
(WebKit::UIDelegate::UIClient::requestPointerLock):
(WebKit::UIDelegate::UIClient::didLosePointerLock):

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::dispatchActivityStateChange):
(WebKit::WebPageProxy::resetStateAfterProcessExited):
(WebKit::WebPageProxy::requestPointerLock):
(WebKit::WebPageProxy::didAllowPointerLock):
(WebKit::WebPageProxy::didDenyPointerLock):
(WebKit::WebPageProxy::requestPointerUnlock):

  • UIProcess/WebPageProxy.h:
  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::updatePreferences):

Source/WTF:

  • wtf/FeatureDefines.h: ENABLE_POINTER_LOCK true for Mac.
2:47 PM Changeset in webkit [208902] by achristensen@apple.com
  • 11 edits in trunk

Support IDN2008 with UTS #46 instead of IDN2003
https://bugs.webkit.org/show_bug.cgi?id=144194

Reviewed by Darin Adler.

Source/WebCore:

Use uidna_nameToASCII instead of the deprecated uidna_IDNToASCII.
It uses IDN2008 instead of IDN2003, and it uses UTF #46 when used with a UIDNA opened with uidna_openUTS46.
This follows https://url.spec.whatwg.org/#concept-domain-to-ascii except we do not use Transitional_Processing
to prevent homograph attacks on german domain names with "ß" and "ss" in them. These are now treated as separate domains.
Firefox also doesn't use Transitional_Processing. Chrome and the current specification use Transitional_processing,
but https://github.com/whatwg/url/issues/110 might change the spec.

In addition, http://unicode.org/reports/tr46/ says:
"implementations are encouraged to apply the Bidi and ContextJ validity criteria"
Bidi checks prevent domain names with bidirectional text, such as latin and hebrew characters in the same domain. Chrome and Firefox do this.

ContextJ checks prevent code points such as U+200D, which is a zero-width joiner which users would not see when looking at the domain name.
Firefox currently enables ContextJ checks and it is suggested by UTS #46, so we'll do it.

ContextO checks, which we do not use and neither does any other browser nor the spec, would fail if a domain contains code points such as U+30FB,
which looks somewhat like a dot. We can investigate enabling these checks later.

Covered by new API tests and rebased LayoutTests.
The new API tests verify that we do not use transitional processing, that we do apply the Bidi and ContextJ checks, but not ContextO checks.

  • platform/URLParser.cpp:

(WebCore::URLParser::domainToASCII):
(WebCore::URLParser::internationalDomainNameTranscoder):

  • platform/URLParser.h:
  • platform/mac/WebCoreNSURLExtras.mm:

(WebCore::mapHostNameWithRange):

Tools:

  • TestWebKitAPI/Tests/WebCore/URLParser.cpp:

(TestWebKitAPI::TEST_F):
Add some tests from http://unicode.org/faq/idn.html verifying that we follow UTS46's deviations from IDN2008.
Add some tests based on https://tools.ietf.org/html/rfc5893 verifying that we check for bidirectional text.
Add a test based on https://tools.ietf.org/html/rfc5892 verifying that we do not do ContextO check.
Add a test for U+321D and U+321E which have particularly interesting punycode encodings. We match Firefox here now.
Also add a test from http://www.unicode.org/reports/tr46/#IDNAComparison verifying we are not using IDN2003.
We should consider importing all of http://www.unicode.org/Public/idna/9.0.0/IdnaTest.txt as URL domain tests.

LayoutTests:

  • fast/encoding/idn-security.html:

Move some characters with changed IDN encodings to inside the check for old ICU.

  • fast/url/idna2003-expected.txt:
  • fast/url/idna2008-expected.txt:

Update expected results. We are now more compliant with IDN2008.

2:32 PM Changeset in webkit [208901] by Yusuke Suzuki
  • 2 edits in trunk/JSTests

REGRESSION(r208867): JSC test failure: ChakraCore.yaml/ChakraCore/test/strict/05.arguments_sm.js.default
https://bugs.webkit.org/show_bug.cgi?id=164929

Reviewed by Mark Lam.

ES2017 drops arguments.caller and JavaScriptCore is updated to meet the spec.
This patch rebaselines the result of ChakraCore test for JSC.

  • ChakraCore/test/strict/05.arguments_sm.baseline-jsc:
2:31 PM Changeset in webkit [208900] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Marking two js/dom/domjit-function-get-element-by-id-* tests as flaky.
https://bugs.webkit.org/show_bug.cgi?id=164797

Unreviewed test gardening.

2:30 PM Changeset in webkit [208899] by dino@apple.com
  • 9 edits
    1 copy
    3 adds in trunk

Better testing for accessibility media queries
https://bugs.webkit.org/show_bug.cgi?id=164954
<rdar://problem/29338292>

Reviewed by Myles Maxfield.

Source/WebCore:

Provide an override mode for the accessibility media queries
that rely on system settings. This way we can test that they
are least responding to something.

Tests: fast/media/mq-inverted-colors-forced-value.html

fast/media/mq-monochrome-forced-value.html

  • css/MediaQueryEvaluator.cpp: Query the Settings to see if we're

forcing a value.
(WebCore::monochromeEvaluate):
(WebCore::invertedColorsEvaluate):
(WebCore::prefersReducedMotionEvaluate):

  • page/Settings.h:
  • testing/InternalSettings.cpp: Add new forcing values for inverted-colors

and monochrome.
(WebCore::InternalSettings::Backup::Backup):
(WebCore::InternalSettings::Backup::restoreTo):
(WebCore::settingsToInternalSettingsValue):
(WebCore::internalSettingsToSettingsValue):
(WebCore::InternalSettings::forcedColorsAreInvertedAccessibilityValue):
(WebCore::InternalSettings::setForcedColorsAreInvertedAccessibilityValue):
(WebCore::InternalSettings::forcedDisplayIsMonochromeAccessibilityValue):
(WebCore::InternalSettings::setForcedDisplayIsMonochromeAccessibilityValue):
(WebCore::InternalSettings::forcedPrefersReducedMotionAccessibilityValue):
(WebCore::InternalSettings::setForcedPrefersReducedMotionAccessibilityValue):
(WebCore::InternalSettings::forcedPrefersReducedMotionValue): Deleted.
(WebCore::InternalSettings::setForcedPrefersReducedMotionValue): Deleted.

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

LayoutTests:

  • fast/media/mq-inverted-colors-forced-value-expected.html: Added.
  • fast/media/mq-inverted-colors-forced-value.html: Copied from LayoutTests/fast/media/mq-prefers-reduced-motion-forced-value.html.
  • fast/media/mq-monochrome-forced-value-expected.html: Added.
  • fast/media/mq-monochrome-forced-value.html: Added.
  • fast/media/mq-prefers-reduced-motion-forced-value.html:
2:29 PM Changeset in webkit [208898] by fpizlo@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

Unreviewed, fix cloop.

  • bytecode/CodeBlock.cpp:

(JSC::CodeBlock::stronglyVisitStrongReferences):

2:11 PM Changeset in webkit [208897] by fpizlo@apple.com
  • 16 edits
    1 add in trunk

Concurrent GC should be able to run splay in debug mode and earley/raytrace in release mode with no perf regression
https://bugs.webkit.org/show_bug.cgi?id=164282

Reviewed by Geoffrey Garen and Oliver Hunt.

PerformanceTests:

CDjs is a fun benchmark for stressing concurrent GCs, but to really give the GC a good
workout you need to increase the amount of work that the test does. This adds a second
configuration of the benchmark that has more aircraft. It uses much more memory and causes us
to do more GCs and those GCs take longer.

  • JetStream/cdjs/benchmark.js:

(benchmarkImpl):
(benchmark):

  • JetStream/cdjs/large.js: Added.

Source/JavaScriptCore:

The two three remaining bugs were:

  • Improper ordering inside putDirectWithoutTransition() and friends. We need to make sure that the GC doesn't see the store to Structure::m_offset until we've resized the butterfly. That proved a bit tricky. On the other hand, this means that we could probably remove the requirement that the GC holds the Structure lock in some cases. I haven't removed that lock yet because I still think it might protect some weird cases, and it doesn't seem to cost us anything.


  • CodeBlock's GC strategy needed to be made thread-safe (visitWeakly, visitChildren, and their friends now hold locks) and incremental-safe (we need to update predictions in the finalizer to make sure we clear anything that was put into a value profile towards the end of GC).


  • The GC timeslicing scheduler needed to be made a bit more aggressive to deal with generational workloads like earley, raytrace, and CDjs. Once I got those benchmarks to run, I found that they would do many useless iterations of GC because they wouldn't pause long enough after rescanning weak references and roots. I added a bunch of knobs for forcing a pause. In the end, I realized that I could get the desired effect by putting a ceiling on mutator utilization. We want the GC to finish quickly if it is possible to do so, even if the amount of allocation that the mutator had done is low. Having a utilization ceiling seems to accomplish this for benchmarks with trivial heaps (earley and raytrace) as well as huge heaps (like CDjs in its "large" configuration).


This preserves splay performance, makes the concurrent GC more stable, and makes the
concurrent GC not a perf regression on earley or raytrace. It seems to give us great CDjs
performance as well, but this is still hard to tell because we crash a lot in that benchmark.

  • bytecode/CodeBlock.cpp:

(JSC::CodeBlock::CodeBlock):
(JSC::CodeBlock::visitWeakly):
(JSC::CodeBlock::visitChildren):
(JSC::CodeBlock::shouldVisitStrongly):
(JSC::CodeBlock::shouldJettisonDueToOldAge):
(JSC::CodeBlock::propagateTransitions):
(JSC::CodeBlock::determineLiveness):
(JSC::CodeBlock::WeakReferenceHarvester::visitWeakReferences):
(JSC::CodeBlock::UnconditionalFinalizer::finalizeUnconditionally):
(JSC::CodeBlock::visitOSRExitTargets):
(JSC::CodeBlock::stronglyVisitStrongReferences):
(JSC::CodeBlock::stronglyVisitWeakReferences):

  • bytecode/CodeBlock.h:

(JSC::CodeBlock::clearVisitWeaklyHasBeenCalled):

  • heap/CodeBlockSet.cpp:

(JSC::CodeBlockSet::deleteUnmarkedAndUnreferenced):

  • heap/Heap.cpp:

(JSC::Heap::ResumeTheWorldScope::ResumeTheWorldScope):
(JSC::Heap::markToFixpoint):
(JSC::Heap::beginMarking):
(JSC::Heap::addToRememberedSet):
(JSC::Heap::collectInThread):

  • heap/Heap.h:
  • heap/HeapInlines.h:

(JSC::Heap::mutatorFence):

  • heap/MarkedBlock.cpp:
  • runtime/JSCellInlines.h:

(JSC::JSCell::finishCreation):

  • runtime/JSObjectInlines.h:

(JSC::JSObject::putDirectWithoutTransition):
(JSC::JSObject::putDirectInternal):

  • runtime/Options.h:
  • runtime/Structure.cpp:

(JSC::Structure::add):

  • runtime/Structure.h:
  • runtime/StructureInlines.h:

(JSC::Structure::add):

2:04 PM Changeset in webkit [208896] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Marking http/tests/misc/link-rel-icon-beforeload.html as failing on mac-wk1.
https://bugs.webkit.org/show_bug.cgi?id=164933

Unreviewed test gardening.

  • platform/mac-wk1/TestExpectations:
2:04 PM Changeset in webkit [208895] by Matt Baker
  • 4 edits in trunk/Source/WebInspectorUI

Web Inspector: TimelineDataGridNode assertions when refreshing page
https://bugs.webkit.org/show_bug.cgi?id=162642
<rdar://problem/28505898>

Reviewed by Timothy Hatcher.

This patch fixes a number of deficiencies in the Network tab that caused
TimelineDataGridNode graphs to refresh before the tab became visible.

  • UserInterface/Views/ElementsTabContentView.js:

(WebInspector.ElementsTabContentView):
(WebInspector.ElementsTabContentView.prototype.shown):
Drive-by fix: defer showing the DOM content view until the tab is shown.

  • UserInterface/Views/NetworkGridContentView.js:

(WebInspector.NetworkGridContentView):
Drive-by event listener cleanup.
(WebInspector.NetworkGridContentView.prototype.get startTime):
(WebInspector.NetworkGridContentView.prototype.get endTime):
Back endTime with a variable, instead of using the ruler value which
isn't valid before the tab is shown for the first time.

(WebInspector.NetworkGridContentView.prototype.shown):
Force the grid to update its layout, and that of the Timeline column ruler.
During layout the ruler's secondsPerPixel value is used, which isn't
valid until the ruler does an initial layout.

(WebInspector.NetworkGridContentView.prototype.reset):
Clear pending records. This was causing duplicates to appear when the
inspected page was refreshed multiple times prior to showing the Network
tab for the first time.

(WebInspector.NetworkGridContentView.prototype.layout):
Should more closely match behavior in NetworkTimelineView.prototype.layout.
Graph end time padding is added if no longer updating the current time.

(WebInspector.NetworkGridContentView.prototype._networkTimelineRecordAdded):
Track endTime of the last record added, so that the graph end time can
be padded once the current time is no longer being updated.

(WebInspector.NetworkGridContentView.prototype._update):
(WebInspector.NetworkGridContentView.prototype._stopUpdatingCurrentTime):
Graph end time padding shouldn't be applied here, since this isn't called
if the inspected page finishes loading before the view is shown.

(WebInspector.NetworkGridContentView.prototype._clearNetworkItems): Deleted.
Replaced by an arrow function.

  • UserInterface/Views/NetworkSidebarPanel.js:

(WebInspector.NetworkSidebarPanel.prototype._networkTimelineReset):
Don't show the content view if the tab is hidden.

1:55 PM Changeset in webkit [208894] by mmaxfield@apple.com
  • 3 edits
    2 adds in trunk

Unsupported emoji are invisible
https://bugs.webkit.org/show_bug.cgi?id=164944
<rdar://problem/28591608>

Reviewed by Dean Jackson.

Source/WebCore:

In WidthIterator, we explicitly skip characters which the OS has no font
to render with. However, for emoji, we should draw something to show that
there is missing content. Because we have nothing to draw, we can draw
the .notdef glyph (empty box, or "tofu").

Test: fast/text/emoji-draws.html

  • platform/graphics/WidthIterator.cpp:

(WebCore::characterMustDrawSomething):
(WebCore::WidthIterator::advanceInternal):

LayoutTests:

  • fast/text/emoji-draws-expected-mismatch.html: Added.
  • fast/text/emoji-draws.html: Added.
1:47 PM Changeset in webkit [208893] by weinig@apple.com
  • 17 edits in trunk

[WebIDL] Add support for record types
https://bugs.webkit.org/show_bug.cgi?id=164935

Reviewed by Tim Horton.

Source/WebCore:

Add support for WebIDLs record types. We map them to HashMap<String, {OtherType}>.

  • bindings/generic/IDLTypes.h:
  • Add IDLRecord type and helper predicate.
  • Remove IDLRegExp which is no longer in WebIDL and we never supported.
  • bindings/js/JSDOMBinding.cpp:

(WebCore::stringToByteString):
(WebCore::identifierToByteString):
(WebCore::valueToByteString):
(WebCore::hasUnpairedSurrogate):
(WebCore::stringToUSVString):
(WebCore::identifierToUSVString):
(WebCore::valueToUSVString):

  • bindings/js/JSDOMBinding.h:

Refactor ByteString and USVString conversion to support converting from
either a JSValue or Identifier.

  • bindings/js/JSDOMConvert.h:

(WebCore::DetailConverter<IDLRecord<K, V>>):
(WebCore::JSConverter<IDLRecord<K, V>>):
Add conversion support for record types. Use Detail::IdentifierConverter helper
to convert identifiers to strings using the correct conversion rules.

(WebCore::Converter<IDLUnion<T...>>::convert):
Update comments in union conversion to match current spec. Remove check
for regular expressions and add support for record types.

  • bindings/scripts/CodeGenerator.pm:

(IsRefPtrType):
Add record and union types to the list of things that aren't RefPtrs.

(IsRecordType):
Add predicate for testing if a type is a record.

(IsWrapperType):
Remove check for union. This is now handled in the IsRefPtrType check.

(SkipIncludeHeader): Deleted.
(GetSequenceInnerType): Deleted.
(GetFrozenArrayInnerType): Deleted.
(GetSequenceOrFrozenArrayInnerType): Deleted.
Remove no longer necessary functions.

  • bindings/scripts/CodeGeneratorJS.pm:

(AddIncludesForImplementationType):
Remove check for includes to skip. This is now only called for interfaces, which should be included
unconditionally.

(AddToIncludesForIDLType):
Add includes and recursive includes for record types.

(GenerateOverloadedFunctionOrConstructor):
Update to account for records.

(GetGnuVTableRefForInterface):
(GetGnuVTableNameForInterface):
(GetGnuMangledNameForInterface):
(GetWinVTableNameForInterface):
(GetWinMangledNameForInterface):
Strength-reduce GetNativeTypeForConversions and GetNamespaceForInterface into their callers.

(GetBaseIDLType):
Add support for IDLRecord. Remove call to GetIDLInterfaceName now that is simply the type name.

(GetNativeType):
Simplify sequence/FrozenArray support and add record support.

(GetNativeInnerType):
Generalize GetNativeVectorInnerType to work for record types as well.

(ShouldPassWrapperByReference):
Moved so native type accessors can be together.

(NativeToJSValueDOMConvertNeedsState):
(NativeToJSValueDOMConvertNeedsGlobalObject):
Add record support.

(GetNativeTypeForConversions): Deleted.
(GetNamespaceForInterface): Deleted.
(GetNativeVectorType): Deleted.
(GetIDLInterfaceName): Deleted.
(GetNativeVectorInnerType): Deleted.
Remove unneeded functions.

  • bindings/scripts/IDLParser.pm:

(typeDescription):
Add helper useful for debugging, that constructs the string form of a type.

(typeByApplyingTypedefs):
Add missing call to typeByApplyingTypedefs (this is noted by a fix in JSTestCallbackFunctionWithTypedefs.h)

(parseNonAnyType):
Remove unused $subtypeName variables and add support for parsing record types.

  • bindings/scripts/test/JS/JSTestCallbackFunctionWithTypedefs.cpp:
  • bindings/scripts/test/JS/JSTestCallbackFunctionWithTypedefs.h:
  • bindings/scripts/test/JS/JSTestObj.cpp:
  • bindings/scripts/test/TestObj.idl:

Add tests for records and update results.

  • testing/TypeConversions.h:

(WebCore::TypeConversions::testLongRecord):
(WebCore::TypeConversions::setTestLongRecord):
(WebCore::TypeConversions::testNodeRecord):
(WebCore::TypeConversions::setTestNodeRecord):
(WebCore::TypeConversions::testSequenceRecord):
(WebCore::TypeConversions::setTestSequenceRecord):

  • testing/TypeConversions.idl:

Add record types so it can be tested from layout tests.

LayoutTests:

  • js/dom/webidl-type-mapping-expected.txt:
  • js/dom/webidl-type-mapping.html:

Add tests for WebIDL record types.

1:41 PM Changeset in webkit [208892] by hyatt@apple.com
  • 2 edits in trunk/Source/WebCore

[CSS Parser] Support font-variation-settings
https://bugs.webkit.org/show_bug.cgi?id=164947

Reviewed by Myles Maxfield.

  • css/parser/CSSPropertyParser.cpp:

(WebCore::consumeFontVariationTag):
(WebCore::consumeFontVariationSettings):
(WebCore::CSSPropertyParser::parseSingleValue):

1:31 PM Changeset in webkit [208891] by jiewen_tan@apple.com
  • 43 edits
    3 copies
    24 adds in trunk

Update SubtleCrypto::encrypt to match the latest spec
https://bugs.webkit.org/show_bug.cgi?id=164738
<rdar://problem/29257812>

Reviewed by Brent Fulgham.

LayoutTests/imported/w3c:

  • WebCryptoAPI/encrypt_decrypt/test_aes_cbc-expected.txt:
  • WebCryptoAPI/encrypt_decrypt/test_aes_ctr-expected.txt:
  • WebCryptoAPI/encrypt_decrypt/test_aes_gcm-expected.txt:
  • WebCryptoAPI/encrypt_decrypt/test_rsa_oaep-expected.txt:
  • WebCryptoAPI/idlharness-expected.txt:

Source/WebCore:

This patch does following few things:

  1. It updates the SubtleCrypto::encrypt method to match the latest spec: https://www.w3.org/TR/WebCryptoAPI/#SubtleCrypto-method-encrypt. It also refers to the latest Editor's Draft to a certain degree: https://w3c.github.io/webcrypto/Overview.html#SubtleCrypto-method-encrypt.
  2. It implements encrypt operations of the following algorithms: AES-CBC, RSAES-PKCS1-V1_5, and RSA-OAEP.
  3. It addes ASSERT(parameters) for every method that accepts a std::unique_ptr<CryptoAlgorithmParameters>&& type parameter.
  4. It changes RefPtr<CryptoKey>&& to Ref<CryptoKey>&& for every method that accepts a CryptoKey.

Tests: crypto/subtle/aes-cbc-encrypt-malformed-parameters.html

crypto/subtle/aes-cbc-import-key-encrypt.html
crypto/subtle/encrypt-malformed-parameters.html
crypto/subtle/rsa-oaep-encrypt-malformed-parameters.html
crypto/subtle/rsa-oaep-import-key-encrypt-label.html
crypto/subtle/rsa-oaep-import-key-encrypt.html
crypto/subtle/rsaes-pkcs1-v1_5-import-key-encrypt.html
crypto/workers/subtle/aes-cbc-import-key-encrypt.html
crypto/workers/subtle/rsa-oaep-import-key-encrypt.html
crypto/workers/subtle/rsaes-pkcs1-v1_5-import-key-encrypt.html

  • CMakeLists.txt:
  • DerivedSources.make:
  • WebCore.xcodeproj/project.pbxproj:
  • bindings/js/BufferSource.h:

(WebCore::BufferSource::BufferSource):
Add a default constructor for initializing an empty BufferSource object.

  • bindings/js/JSSubtleCryptoCustom.cpp:

(WebCore::normalizeCryptoAlgorithmParameters):
(WebCore::jsSubtleCryptoFunctionEncryptPromise):
(WebCore::JSSubtleCrypto::encrypt):

  • crypto/CryptoAlgorithm.cpp:

(WebCore::CryptoAlgorithm::encrypt):
(WebCore::CryptoAlgorithm::exportKey):

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

(WebCore::SubtleCrypto::SubtleCrypto):

  • crypto/SubtleCrypto.h:

(WebCore::SubtleCrypto::workQueue):

  • crypto/SubtleCrypto.idl:
  • crypto/gnutls/CryptoAlgorithmAES_CBCGnuTLS.cpp:

(WebCore::CryptoAlgorithmAES_CBC::platformEncrypt):

  • crypto/gnutls/CryptoAlgorithmRSAES_PKCS1_v1_5GnuTLS.cpp:

(WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::platformEncrypt):

  • crypto/gnutls/CryptoAlgorithmRSA_OAEPGnuTLS.cpp:

(WebCore::CryptoAlgorithmRSA_OAEP::platformEncrypt):

  • crypto/gnutls/CryptoKeyRSAGnuTLS.cpp:

(WebCore::CryptoKeyRSA::generatePair):

  • crypto/algorithms/CryptoAlgorithmAES_CBC.cpp:

(WebCore::CryptoAlgorithmAES_CBC::encrypt):
(WebCore::CryptoAlgorithmAES_CBC::generateKey):
(WebCore::CryptoAlgorithmAES_CBC::importKey):
(WebCore::CryptoAlgorithmAES_CBC::exportKey):

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

(WebCore::CryptoAlgorithmAES_KW::generateKey):
(WebCore::CryptoAlgorithmAES_KW::importKey):
(WebCore::CryptoAlgorithmAES_KW::exportKey):

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

(WebCore::CryptoAlgorithmHMAC::generateKey):
(WebCore::CryptoAlgorithmHMAC::importKey):
(WebCore::CryptoAlgorithmHMAC::exportKey):

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

(WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::encrypt):
(WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::generateKey):
(WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::importKey):
(WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::exportKey):

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

(WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::generateKey):
(WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::importKey):
(WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::exportKey):

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

(WebCore::CryptoAlgorithmRSA_OAEP::encrypt):
(WebCore::CryptoAlgorithmRSA_OAEP::generateKey):
(WebCore::CryptoAlgorithmRSA_OAEP::importKey):
(WebCore::CryptoAlgorithmRSA_OAEP::exportKey):

  • crypto/algorithms/CryptoAlgorithmRSA_OAEP.h:
  • crypto/keys/CryptoKeyRSA.h:
  • crypto/mac/CryptoAlgorithmAES_CBCMac.cpp:

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

  • crypto/mac/CryptoAlgorithmRSAES_PKCS1_v1_5Mac.cpp:

(WebCore::encryptRSAES_PKCS1_v1_5):
(WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::platformEncrypt):

  • crypto/mac/CryptoAlgorithmRSA_OAEPMac.cpp:

(WebCore::encryptRSA_OAEP):
(WebCore::CryptoAlgorithmRSA_OAEP::platformEncrypt):

  • crypto/mac/CryptoKeyRSAMac.cpp:

(WebCore::CryptoKeyRSA::generatePair):

  • crypto/parameters/AesCbcParams.idl: Added.
  • crypto/parameters/CryptoAlgorithmAesCbcParams.h: Added.
  • crypto/parameters/CryptoAlgorithmAesCbcParamsDeprecated.h:
  • crypto/parameters/CryptoAlgorithmRsaOaepParams.h: Added.
  • crypto/parameters/RsaOaepParams.idl: Added.

LayoutTests:

  • TestExpectations:
  • crypto/subtle/aes-cbc-encrypt-malformed-parameters-expected.txt: Added.
  • crypto/subtle/aes-cbc-encrypt-malformed-parameters.html: Added.
  • crypto/subtle/aes-cbc-import-key-encrypt-expected.txt: Added.
  • crypto/subtle/aes-cbc-import-key-encrypt.html: Added.
  • crypto/subtle/encrypt-malformed-parameters-expected.txt: Added.
  • crypto/subtle/encrypt-malformed-parameters.html: Added.
  • crypto/subtle/rsa-oaep-encrypt-malformed-parameters-expected.txt: Added.
  • crypto/subtle/rsa-oaep-encrypt-malformed-parameters.html: Added.
  • crypto/subtle/rsa-oaep-import-key-encrypt-expected.txt: Added.
  • crypto/subtle/rsa-oaep-import-key-encrypt-label-expected.txt: Added.
  • crypto/subtle/rsa-oaep-import-key-encrypt-label.html: Added.
  • crypto/subtle/rsa-oaep-import-key-encrypt.html: Added.
  • crypto/subtle/rsaes-pkcs1-v1_5-import-key-encrypt-expected.txt: Added.
  • crypto/subtle/rsaes-pkcs1-v1_5-import-key-encrypt.html: Added.
  • crypto/workers/subtle/aes-cbc-import-key-encrypt-expected.txt: Added.
  • crypto/workers/subtle/aes-cbc-import-key-encrypt.html: Added.
  • crypto/workers/subtle/resources/aes-cbc-import-key-encrypt.js: Added.
  • crypto/workers/subtle/resources/rsa-oaep-import-key-encrypt.js: Added.
  • crypto/workers/subtle/resources/rsaes-pkcs1-v1_5-import-key-encrypt.js: Added.
  • crypto/workers/subtle/rsa-oaep-import-key-encrypt-expected.txt: Added.
  • crypto/workers/subtle/rsa-oaep-import-key-encrypt.html: Added.
  • crypto/workers/subtle/rsaes-pkcs1-v1_5-import-key-encrypt-expected.txt: Added.
  • crypto/workers/subtle/rsaes-pkcs1-v1_5-import-key-encrypt.html: Added.
1:23 PM Changeset in webkit [208890] by Ryan Haddad
  • 2 edits in trunk/Source/WebCore

Attempt to fix iOS build again.
<rdar://problem/29312689>

Unreviewed build fix.

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

(WebCore::MediaPlayerPrivateAVFoundationObjC::setCurrentTextTrack):
(WebCore::MediaPlayerPrivateAVFoundationObjC::languageOfPrimaryAudioTrack):

12:56 PM Changeset in webkit [208889] by mmaxfield@apple.com
  • 6 edits
    2 adds in trunk

[CSS Font Loading] FontFaceSet.load() promises don't always fire
https://bugs.webkit.org/show_bug.cgi?id=164902

Reviewed by David Hyatt.

Source/WebCore:

Test: fast/text/fontfaceset-rebuild-during-loading.html

We currently handle web fonts in two phases. The first phase is building up
StyleRuleFontFace objects which reflect the style on the page. The second is creating
CSSFontFace objects from those StyleRuleFontFace objects. When script modifies the
style on the page, we can often update the CSSFontFace objects, but there are some
modifications which we don't know how to model. For these operations, we destroy the
CSSFontFace objects and rebuild them from the newly modified StyleRuleFontFace objects.

Normally, this is fine. However, with the CSS font loading API, the CSSFontFaces back
Javascript objects which will persist across the rebuilding step mentioned above. This
means that the FontFace objects need to adopt the new CSSFontFace objects and forget
the old CSSFontFace objects.

There was one bit of state which I forgot to update during this rebuilding phase. The
FontFaceSet object contains an internal HashMap where a reference to a CSSFontFace
is used as a key. After the rebuilding phase, this reference wasn't updated to point
to the new CSSFontFace.

The solution is to instead use a reference to the higher-level FontFace as the key to
the HashMap. This object is persistent across the rebuilding phase (and it adopts
the new CSSFontFaces). There is not a lifetime problem because the FontFace holds a
strong reference to its backing CSSFontFace object.

This bug didn't cause a memory problem because the HashMap was keeping the old
CSSFontFace alive because the key was a strong reference.

This patch also adds a lengthy comment explaining how the migration works.

  • css/CSSFontFace.cpp:

(WebCore::CSSFontFace::initializeWrapper): This is another bit of state which didn't
survive the rebuilding phase. Moving it here causes it to survive.
(WebCore::CSSFontFace::wrapper):

  • css/CSSFontSelector.cpp:

(WebCore::CSSFontSelector::addFontFaceRule):

  • css/FontFaceSet.cpp:

(WebCore::FontFaceSet::load):
(WebCore::FontFaceSet::faceFinished):

  • css/FontFaceSet.h:

LayoutTests:

  • fast/text/fontfaceset-rebuild-during-loading-expected.txt: Added.
  • fast/text/fontfaceset-rebuild-during-loading.html: Added.
12:27 PM Changeset in webkit [208888] by mmaxfield@apple.com
  • 29 edits in trunk

[SVG -> OTF Font Converter] Fonts advances are not internally consistent inside the generated font file
https://bugs.webkit.org/show_bug.cgi?id=164846
<rdar://problem/29031509>

Reviewed by Darin Adler.

Source/WebCore:

The fonts I'm generating in the SVG -> OTF converter have fractional FUnit values for their advances.
The CFF table can encode that, but hmtx can't, which means the font isn't internally consistent.

Covered by existing tests.

  • svg/SVGToOTFFontConversion.cpp:

LayoutTests:

  • platform/ios-simulator/svg/W3C-SVG-1.1/fonts-elem-01-t-expected.txt:
  • platform/ios-simulator/svg/W3C-SVG-1.1/fonts-elem-02-t-expected.txt:
  • platform/ios-simulator/svg/W3C-SVG-1.1/fonts-elem-03-b-expected.txt:
  • platform/ios-simulator/svg/W3C-SVG-1.1/fonts-elem-04-b-expected.txt:
  • platform/ios-simulator/svg/W3C-SVG-1.1/fonts-elem-07-b-expected.txt:
  • platform/ios-simulator/svg/W3C-SVG-1.1/text-intro-01-t-expected.txt:
  • platform/ios-simulator/svg/W3C-SVG-1.1/text-intro-02-b-expected.txt:
  • platform/ios-simulator/svg/W3C-SVG-1.1/text-intro-03-b-expected.txt:
  • platform/ios-simulator/svg/W3C-SVG-1.1/text-intro-04-t-expected.txt:
  • platform/ios-simulator/svg/batik/text/textEffect-expected.txt:
  • platform/ios-simulator/svg/batik/text/textEffect3-expected.txt:
  • platform/ios-simulator/svg/batik/text/textPosition2-expected.txt:
  • platform/mac/svg/W3C-SVG-1.1/fonts-elem-01-t-expected.txt:
  • platform/mac/svg/W3C-SVG-1.1/fonts-elem-02-t-expected.txt:
  • platform/mac/svg/W3C-SVG-1.1/fonts-elem-03-b-expected.txt:
  • platform/mac/svg/W3C-SVG-1.1/fonts-elem-04-b-expected.txt:
  • platform/mac/svg/W3C-SVG-1.1/fonts-elem-07-b-expected.txt:
  • platform/mac/svg/W3C-SVG-1.1/text-intro-01-t-expected.txt:
  • platform/mac/svg/W3C-SVG-1.1/text-intro-02-b-expected.txt:
  • platform/mac/svg/W3C-SVG-1.1/text-intro-03-b-expected.txt:
  • platform/mac/svg/W3C-SVG-1.1/text-intro-04-t-expected.txt:
  • platform/mac/svg/batik/text/textEffect3-expected.txt:
  • platform/mac/svg/batik/text/textPosition2-expected.txt:
  • platform/mac/svg/custom/svg-fonts-fallback-expected.txt:
  • platform/mac/svg/wicd/test-rightsizing-b-expected.txt:
  • svg/W3C-SVG-1.1/fonts-elem-04-b-expected.txt:
12:01 PM Changeset in webkit [208887] by Ryan Haddad
  • 2 edits in trunk/Source/WebCore

Attempt to fix iOS build.
<rdar://problem/29312689>

Unreviewed build fix.

  • platform/graphics/avfoundation/MediaSelectionGroupAVFObjC.mm:

(WebCore::MediaSelectionGroupAVFObjC::updateOptions):

11:09 AM Changeset in webkit [208886] by hyatt@apple.com
  • 9 edits in trunk/Source/WebCore

[CSS Parser] Hook up InspectorStyleSheet to the new CSS parser.
https://bugs.webkit.org/show_bug.cgi?id=164886

Reviewed by Dean Jackson.

  • css/CSSGrammar.y.in:

Get rid of the CSSRuleSourceData type enum, since StyleRule's type
enum is exactly the same.

  • css/CSSPropertySourceData.cpp:

(WebCore::CSSPropertySourceData::CSSPropertySourceData):

  • css/CSSPropertySourceData.h:

Add a concept of disabled to CSSPropertySourceData. This is used for
commented out properties.

(WebCore::CSSRuleSourceData::create):
(WebCore::CSSRuleSourceData::createUnknown):
(WebCore::CSSRuleSourceData::CSSRuleSourceData):
Get rid of the CSSRuleSourceData type enum, since StyleRule's type
enum is exactly the same.

  • css/parser/CSSParser.cpp:

(WebCore::CSSParserContext::CSSParserContext):
(WebCore::CSSParser::parseSheetForInspector):
(WebCore::CSSParser::parseDeclarationForInspector):
(WebCore::CSSParser::markSupportsRuleHeaderStart):
(WebCore::CSSParser::markRuleHeaderStart):
(WebCore::CSSParser::markPropertyEnd):

  • css/parser/CSSParser.h:

Add functions that represent the new API for inspector sheet
and declaration parsing. Patch the old parse code to use StyleRule::Type
now that the CSSRuleSourceData type is gone.

  • css/parser/CSSParserObserver.h:

Tweak the API for our memory management.

  • inspector/InspectorStyleSheet.cpp:

(flattenSourceData):
(WebCore::parserContextForDocument):
(WebCore::StyleSheetHandler::StyleSheetHandler):
(WebCore::StyleSheetHandler::startRuleHeader):
(WebCore::StyleSheetHandler::setRuleHeaderEnd):
(WebCore::StyleSheetHandler::endRuleHeader):
(WebCore::StyleSheetHandler::observeSelector):
(WebCore::StyleSheetHandler::startRuleBody):
(WebCore::StyleSheetHandler::endRuleBody):
(WebCore::StyleSheetHandler::popRuleData):
(WebCore::fixUnparsedProperties):
(WebCore::StyleSheetHandler::fixUnparsedPropertyRanges):
(WebCore::StyleSheetHandler::observeProperty):
(WebCore::StyleSheetHandler::observeComment):
(WebCore::InspectorStyle::populateAllProperties):
(WebCore::isValidSelectorListString):
(WebCore::InspectorStyleSheet::ensureSourceData):
(WebCore::InspectorStyleSheetForInlineStyle::ensureParsedDataReady):
(WebCore::InspectorStyleSheetForInlineStyle::ruleSourceData):
(WebCore::createCSSParser): Deleted.
(WebCore::InspectorStyleSheetForInlineStyle::getStyleAttributeRanges): Deleted.

  • inspector/InspectorStyleSheet.h:

(WebCore::InspectorStyleProperty::setRawTextFromStyleDeclaration):
Add the new implementation. This involves duplicating most of the old
parser code for this into a new class, StyleSheetHandler, that implements
the observer interface and builds up the same data structures as the old
parser did in response to the callbacks.

10:57 AM Changeset in webkit [208885] by Joseph Pecoraro
  • 10 edits in trunk

Web Inspector: Generator functions should have a displayable name when shown in stack traces
https://bugs.webkit.org/show_bug.cgi?id=164844
<rdar://problem/29300697>

Reviewed by Yusuke Suzuki.

JSTests:

  • stress/generator-function-name.js:

Add another test now that we name the inner generator function
that we do not break the lexical resolution of names.

Source/JavaScriptCore:

  • parser/SyntaxChecker.h:

(JSC::SyntaxChecker::createGeneratorFunctionBody):

  • parser/ASTBuilder.h:

(JSC::ASTBuilder::createGeneratorFunctionBody):
New way to create a generator function with an inferred name.

  • parser/Parser.cpp:

(JSC::Parser<LexerType>::parseInner):
(JSC::Parser<LexerType>::parseGeneratorFunctionSourceElements):

  • parser/Parser.h:

Pass on the name of the generator wrapper function so we can
use it on the inner generator function.

LayoutTests:

  • inspector/debugger/js-stacktrace-expected.txt:
  • inspector/debugger/js-stacktrace.html:

Add a test case for console.trace() / Error stack inside of generators.
Modernize the test to reduce redundency and get nicer output.

7:17 AM Changeset in webkit [208884] by mitz@apple.com
  • 2 edits in trunk/Source/WebCore

Tried to fix some non-macOS builds.
<rdar://problems/29331425&29331438&29331722>

  • platform/mac/WebPlaybackControlsManager.h:
3:54 AM WebKitGTK/2.14.x edited by magomez@igalia.com
(diff)
3:53 AM WebKitGTK/2.14.x edited by magomez@igalia.com
(diff)
2:03 AM Changeset in webkit [208883] by pvollan@apple.com
  • 2 edits in trunk/Source/WebCore

[Win32] Start releasing memory earlier when memory is running low.
https://bugs.webkit.org/show_bug.cgi?id=164862

Reviewed by Brent Fulgham.

On Windows, 32-bit processes have 2GB of memory available, where some is used by the system.
Debugging has shown that allocations might fail and cause crashes when memory usage is > ~1GB.
We should start releasing memory before we reach 1GB.

  • platform/win/MemoryPressureHandlerWin.cpp:

(WebCore::CheckMemoryTimer::fired):

Note: See TracTimeline for information about the timeline view.