Timeline



Sep 19, 2016:

11:02 PM Changeset in webkit [206141] by Carlos Garcia Campos
  • 2 edits in releases/WebKitGTK/webkit-2.14

Merge r206095 - [GTK] Make ENABLE_THREADED_COMPOSITOR a public option
https://bugs.webkit.org/show_bug.cgi?id=162148

Reviewed by Carlos Garcia Campos.

  • Source/cmake/OptionsGTK.cmake:
9:22 PM Changeset in webkit [206140] by Chris Dumez
  • 4 edits in trunk

Add support for HTMLSourceElement.prototype.sizes / HTMLSourceElement.prototype.srcset
https://bugs.webkit.org/show_bug.cgi?id=162244

Reviewed by Alex Christensen.

LayoutTests/imported/w3c:

Rebaseline now that more checks are passing.

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

Source/WebCore:

Add support for HTMLPrototype.prototype.sizes / HTMLPrototype.prototype.srcset:

We already support the corresponding content attributes internally. However, we
are missing the corresponding IDL attributes that are supposed to reflect them.

Chrome and Firefox support them. We already had those IDL attributes on
HTMLImageElement.

No new tests, rebaselined existing test.

  • html/HTMLSourceElement.idl:
8:38 PM Changeset in webkit [206139] by bshafiei@apple.com
  • 5 edits in tags/Safari-603.1.5.2/Source

Versioning.

8:34 PM Changeset in webkit [206138] by bshafiei@apple.com
  • 1 copy in tags/Safari-603.1.5.2

New tag.

7:00 PM Changeset in webkit [206137] by Wenson Hsieh
  • 2 edits in trunk/Tools

Unreviewed build fix after r206135

NSEventMaskLeftMouseDown and friends are only available on 10.12.

  • TestWebKitAPI/mac/TestWKWebViewMac.mm:

(simulated_forceClickAssociatedEventsMask):

6:05 PM Changeset in webkit [206136] by sbarati@apple.com
  • 29 edits
    6 adds in trunk

Make HasOwnProperty faster
https://bugs.webkit.org/show_bug.cgi?id=161708

Reviewed by Geoffrey Garen.

JSTests:

  • microbenchmarks/has-own-property-name-cache.js: Added.

(foo):

  • stress/has-own-property-cache-basics.js: Added.

(assert):
(foo):

  • stress/has-own-property-name-cache-string-keys.js: Added.

(assert):
(foo):

  • stress/has-own-property-name-cache-symbol-keys.js: Added.

(assert):
(foo):

  • stress/has-own-property-name-cache-symbols-and-strings.js: Added.

(assert):
(foo):

Source/JavaScriptCore:

This patch adds a cache for HasOwnProperty. The cache holds tuples
of {StructureID, UniquedStringImpl*, boolean} where the boolean indicates
the result of performing hasOwnProperty on an object with StructureID and
UniquedStringImpl*. If the cache contains an item, we can be guaranteed
that it contains the same result as performing hasOwnProperty on an
object O with a given structure and key. To guarantee this, we only add
items into the cache when the Structure of the given item is cacheable.

The caching strategy is simple: when adding new items into the cache,
we will evict any item that was in the location that the new item
is hashed into. We also clear the cache on every GC. This strategy
proves to be successful on speedometer, which sees a cache hit rate
over 90%. This caching strategy is now inlined into the DFG/FTL JITs
by now recognizing hasOwnProperty as an intrinsic with the corresponding
HasOwnProperty node. The goal of the node is to emit inlined code for
the cache lookup to prevent the overhead of the call for the common
case where we get a cache hit.

I'm seeing around a 1% to 1.5% percent improvement on Speedometer on
my machine. Hopefully the perf bots agree with my machine.

This patch also speeds up the microbenchmark I added by 2.5x.

  • JavaScriptCore.xcodeproj/project.pbxproj:
  • dfg/DFGAbstractInterpreterInlines.h:

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

  • dfg/DFGByteCodeParser.cpp:

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

  • dfg/DFGClobberize.h:

(JSC::DFG::clobberize):

  • dfg/DFGDoesGC.cpp:

(JSC::DFG::doesGC):

  • dfg/DFGFixupPhase.cpp:

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

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

(JSC::DFG::safeToExecute):

  • dfg/DFGSpeculativeJIT.h:

(JSC::DFG::SpeculativeJIT::callOperation):
(JSC::DFG::SpeculateCellOperand::SpeculateCellOperand):

  • dfg/DFGSpeculativeJIT32_64.cpp:

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

  • dfg/DFGSpeculativeJIT64.cpp:

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

  • dfg/DFGValidate.cpp:
  • ftl/FTLAbstractHeapRepository.h:
  • ftl/FTLCapabilities.cpp:

(JSC::FTL::canCompile):

  • ftl/FTLLowerDFGToB3.cpp:

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

  • heap/Heap.cpp:

(JSC::Heap::collectImpl):

  • jit/JITOperations.h:
  • runtime/HasOwnPropertyCache.h: Added.

(JSC::HasOwnPropertyCache::Entry::offsetOfStructureID):
(JSC::HasOwnPropertyCache::Entry::offsetOfImpl):
(JSC::HasOwnPropertyCache::Entry::offsetOfResult):
(JSC::HasOwnPropertyCache::operator delete):
(JSC::HasOwnPropertyCache::create):
(JSC::HasOwnPropertyCache::hash):
(JSC::HasOwnPropertyCache::get):
(JSC::HasOwnPropertyCache::tryAdd):
(JSC::HasOwnPropertyCache::clear):
(JSC::VM::ensureHasOwnPropertyCache):

  • runtime/Intrinsic.h:
  • runtime/JSObject.h:
  • runtime/JSObjectInlines.h:

(JSC::JSObject::hasOwnProperty):

  • runtime/ObjectPrototype.cpp:

(JSC::ObjectPrototype::finishCreation):
(JSC::objectProtoFuncHasOwnProperty):

  • runtime/Symbol.h:
  • runtime/VM.cpp:
  • runtime/VM.h:

(JSC::VM::hasOwnPropertyCache):

6:02 PM Changeset in webkit [206135] by Wenson Hsieh
  • 9 edits
    2 adds in trunk

Add a unit test covering <https://trac.webkit.org/changeset/205983>
https://bugs.webkit.org/show_bug.cgi?id=162112

Reviewed by Beth Dakin.

Source/WebKit2:

Adds some a test support method as SPI on WKWebView to determine whether to request candidates. See
Tools/ChangeLog for more details.

  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView _shouldRequestCandidates]):
(-[WKWebView _forceRequestCandidates]): Deleted.

  • UIProcess/API/Cocoa/WKWebViewPrivate.h:

Tools:

Adds a new unit test covering the changes in r205983 along with the infrastructure needed to support it. Also
further refactors the TestWKWebView used by VideoControlsManager and WKWebViewCandidateTests so that in both
cases, we add the WKWebView to a visible key window, and when sending a mouse down event, we propagate the event
at the window level rather than the view level, allowing greater flexibility to simulate behaviors such as
pressure-sensitive events that are needed for the new test.

Also rewrites currently disabled unit tests in CandidateTests as WebKit2 unit tests in WKWebViewCandidateTests,
checking whether or not to should be requesting candidates in password and non-password fields.

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WebKit2Cocoa/VideoControlsManager.mm:

(TestWebKitAPI::setUpWebViewForTestingVideoControlsManager):
(TestWebKitAPI::TEST):

  • TestWebKitAPI/Tests/WebKit2Cocoa/WKWebViewCandidateTests.mm:

(-[CandidateTestWebView typeString:inputMessage:]):
(+[CandidateTestWebView setUpWithFrame:testPage:]):

  • TestWebKitAPI/Tests/WebKit2Cocoa/large-input-field-focus-onload.html: Added.
  • TestWebKitAPI/Tests/WebKit2Cocoa/text-and-password-inputs.html: Added.
  • TestWebKitAPI/mac/TestWKWebViewMac.h:
  • TestWebKitAPI/mac/TestWKWebViewMac.mm:

(simulated_forceClickAssociatedEventsMask):
(-[TestWKWebViewHostWindow _mouseDownAtPoint:simulatePressure:]):
(-[TestWKWebView initWithFrame:]):
(-[TestWKWebView initWithFrame:configuration:]):
(-[TestWKWebView _setUpTestWindow:]):
(-[TestWKWebView mouseDownAtPoint:simulatePressure:]):
(-[TestWKWebView typeCharacter:]):
(-[TestWKWebView mouseDownAtPoint:]): Deleted.

5:48 PM Changeset in webkit [206134] by commit-queue@webkit.org
  • 13 edits
    4 adds in trunk

[JSC] Make the rounding-related nodes support any type
https://bugs.webkit.org/show_bug.cgi?id=161895

Patch by Benjamin Poulain <bpoulain@apple.com> on 2016-09-19
Reviewed by Geoffrey Garen.

JSTests:

  • stress/arith-ceil-on-various-types.js: Added.
  • stress/arith-floor-on-various-types.js: Added.
  • stress/arith-round-on-various-types.js: Added.
  • stress/arith-trunc-on-various-types.js: Added.

Source/JavaScriptCore:

This patch changes ArithRound, ArithFloor, ArithCeil and ArithTrunc
to support polymorphic input without exiting on entry.

  • dfg/DFGAbstractInterpreterInlines.h:

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

  • dfg/DFGByteCodeParser.cpp:

(JSC::DFG::ByteCodeParser::handleIntrinsicCall):
The 4 functions ignore any input past the first argument. It is okay
to use the nodes with the first argument and let the Phantoms keep
the remaining arguments live.

  • dfg/DFGClobberize.h:

(JSC::DFG::clobberize):

  • dfg/DFGFixupPhase.cpp:

(JSC::DFG::FixupPhase::fixupNode):
Our fixup had the issue we have seen on previous nodes: unaryArithShouldSpeculateInt32()
prevents us from picking a good type if we do not see any double.

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

Prediction propagation of those nodes are fully determined
from their flags and results's prediction. They are moved
to the invariant processing.

  • dfg/DFGSpeculativeJIT.cpp:

(JSC::DFG::SpeculativeJIT::compileArithRounding):

  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::compileArithRound):
(JSC::FTL::DFG::LowerDFGToB3::compileArithFloor):
(JSC::FTL::DFG::LowerDFGToB3::compileArithCeil):
(JSC::FTL::DFG::LowerDFGToB3::compileArithTrunc):

4:51 PM Changeset in webkit [206133] by commit-queue@webkit.org
  • 8 edits in trunk/LayoutTests

Web Inspector: adopt Object.awaitEvent in LayoutTests/inspector/css
https://bugs.webkit.org/show_bug.cgi?id=162071

Patch by Devin Rousso <Devin Rousso> on 2016-09-19
Reviewed by Brian Burg.

Replace instances of singleFireEventListener with awaitEvent and use promise logic to make
tests more readable.

  • inspector/css/createStyleSheet.html:
  • inspector/css/generate-css-rule-string.html:
  • inspector/css/manager-preferredInspectorStyleSheetForFrame-expected.txt:
  • inspector/css/manager-preferredInspectorStyleSheetForFrame.html:
  • inspector/css/stylesheet-events-basic.html:
  • inspector/css/stylesheet-events-inspector-stylesheet.html:
  • inspector/css/stylesheet-events-multiple-documents.html:
4:46 PM Changeset in webkit [206132] by andersca@apple.com
  • 5 edits in trunk/Source

Suppress JavaScript prompts early on in certain cases
https://bugs.webkit.org/show_bug.cgi?id=162243
rdar://problem/27661602

Reviewed by Geoffrey Garen.

Source/WebCore:

Export symbols needed by WebKit2.

  • loader/FrameLoader.h:
  • loader/FrameLoaderStateMachine.h:

Source/WebKit2:

  • WebProcess/WebCoreSupport/WebChromeClient.cpp:

(WebKit::shouldSuppressJavaScriptDialogs):
Add helper function.

(WebKit::WebChromeClient::runJavaScriptAlert):
(WebKit::WebChromeClient::runJavaScriptConfirm):
(WebKit::WebChromeClient::runJavaScriptPrompt):
Call helper function and return early if we should supress dialogs.

4:45 PM Changeset in webkit [206131] by Chris Dumez
  • 10 edits
    12 deletes in trunk

Align HTMLAppletElement with the specification
https://bugs.webkit.org/show_bug.cgi?id=162240

Reviewed by Alex Christensen.

LayoutTests/imported/w3c:

Rebaseline W3C test now that all checks are passing.

  • web-platform-tests/html/dom/reflection-obsolete-expected.txt:

Source/WebCore:

Align HTMLAppletElement with the specification:

In particular:

  • space / vspace should be of type "unsigned long", not DOMString
  • codeBase and object should reflect as URLs

Firefox agree with the specification. Chrome does not have
HTMLAppletElement anymore.

No new tests, rebaselined existing test.

  • html/HTMLAppletElement.cpp:

(WebCore::HTMLAppletElement::isURLAttribute):

  • html/HTMLAppletElement.h:
  • html/HTMLAppletElement.idl:

LayoutTests:

Drop outdated tests. Update existing tests to reflect behavior change.

  • dom/html/level2/html/HTMLAppletElement11-expected.txt: Removed.
  • dom/html/level2/html/HTMLAppletElement11.html: Removed.
  • dom/html/level2/html/HTMLAppletElement11.js: Removed.
  • dom/xhtml/level2/html/HTMLAppletElement11-expected.txt: Removed.
  • dom/xhtml/level2/html/HTMLAppletElement11.js: Removed.
  • dom/xhtml/level2/html/HTMLAppletElement11.xhtml: Removed.
  • fast/dom/element-attribute-js-null-expected.txt:
  • fast/dom/element-attribute-js-null.html:
4:36 PM Changeset in webkit [206130] by commit-queue@webkit.org
  • 6 edits in trunk/LayoutTests

Web Inspector: adopt Object.awaitEvent in LayoutTests/http/tests/inspector
https://bugs.webkit.org/show_bug.cgi?id=162069

Patch by Devin Rousso <Devin Rousso> on 2016-09-19
Reviewed by Brian Burg.

Replace instances of singleFireEventListener with awaitEvent and use promise logic to make
tests more readable.

  • http/tests/inspector/dom/disconnect-dom-tree-after-main-frame-navigation.html:
  • http/tests/inspector/network/copy-as-curl.html:
  • http/tests/inspector/network/resource-timing-expected.txt:
  • http/tests/inspector/network/resource-timing.html:
  • http/tests/inspector/network/xhr-request-data-encoded-correctly.html:
4:30 PM Changeset in webkit [206129] by jer.noble@apple.com
  • 26 edits
    2 adds in trunk/LayoutTests/imported/w3c

Unreviewed gardening; update LayoutTests/media-source to the most recent version (5a011ca).

  • resources/TestRepositories:
  • web-platform-tests/media-source/OWNERS:
  • web-platform-tests/media-source/interfaces.html:
  • web-platform-tests/media-source/manifest.txt:
  • web-platform-tests/media-source/mediasource-appendbuffer-quota-exceeded.html:
  • web-platform-tests/media-source/mediasource-attach-stops-delaying-load-event.html: Added.
  • web-platform-tests/media-source/mediasource-avtracks.html:
  • web-platform-tests/media-source/mediasource-detach.html:
  • web-platform-tests/media-source/mediasource-duration-expected.txt:
  • web-platform-tests/media-source/mediasource-duration.html:
  • web-platform-tests/media-source/mediasource-endofstream.html:
  • web-platform-tests/media-source/mediasource-errors.html:
  • web-platform-tests/media-source/mediasource-getvideoplaybackquality-expected.txt:
  • web-platform-tests/media-source/mediasource-getvideoplaybackquality.html:
  • web-platform-tests/media-source/mediasource-is-type-supported.html:
  • web-platform-tests/media-source/mediasource-liveseekable.html:
  • web-platform-tests/media-source/mediasource-remove-expected.txt:
  • web-platform-tests/media-source/mediasource-remove.html:
  • web-platform-tests/media-source/mediasource-removesourcebuffer.html:
  • web-platform-tests/media-source/mediasource-seekable.html:
  • web-platform-tests/media-source/mediasource-sourcebuffer-mode-timestamps.html: Added.
  • web-platform-tests/media-source/mediasource-sourcebuffer-mode.html:
  • web-platform-tests/media-source/mediasource-sourcebuffer-trackdefaults.html:
  • web-platform-tests/media-source/mediasource-timestamp-offset.html:
  • web-platform-tests/media-source/mediasource-trackdefault.html:
  • web-platform-tests/media-source/mediasource-trackdefaultlist.html:
  • web-platform-tests/media-source/mediasource-util.js:
4:27 PM Changeset in webkit [206128] by Yusuke Suzuki
  • 2 edits in trunk/Source/JavaScriptCore

Unreviewed, build fix for Win64
https://bugs.webkit.org/show_bug.cgi?id=162132

In Windows 64bit, t3 register in LLInt is not r[a-d]x.
It means that this cannot be used for byte operation.

  • llint/LowLevelInterpreter64.asm:
4:24 PM Changeset in webkit [206127] by jer.noble@apple.com
  • 9 edits
    1 add in trunk

[media-source] Fix imported/w3c/web-platform-tests/media-source/mediasource-avtracks.html
https://bugs.webkit.org/show_bug.cgi?id=162104

Reviewed by Eric Carlson.

Source/WebCore:

Fixes test: imported/w3c/web-platform-tests/media-source/mediasource-avtracks.html

Multiple overlapping issues are causing this test to fail:

  • When a MediaSource object is not attached from a HTMLMediaElement, it's SourceBuffer objects will return null from .videoTracks and .audioTracks, foiling the tests ability to assert that sourceBuffer.videoTracks.length == 0.
  • When a MediaSource object is detached from a HTMLMediaElement, it's tracks are removed but do not generate 'removedtrack' events.

When these bugs were fixed, a few more popped up:

  • The HTMLMediaElement removes its tracks before it closes the MediaSource, which causes an assertion when the MediaSource tells the HTMLMediaElement to remove its copy of the source's tracks (which have already been removed).
  • When the HTMLMediaElement is stop()-ed due to its ScriptExecutionContext being destroyed, it tries to close its MediaSource, which has itself already been stop()-ed and thus asserts.

To eliminate all these bugs and make the code more self explanatory, we will rename the
HTMLMediaElement's closeMediaSource() method to detachMediaSource(), and the MediaSource's
close() method to detachFromElement(). The only way to close a MediaSource is now by calling
detachMediaSource() from the HTMLMediaElement. The parts of the "Detaching from a media
element" algorithm which were previously spread across setReadyState() and onReadyStateChange()
are now unified in the newly renamed detachFromElement() method. The HTMLMediaElement will
first detach its MediaSource, and only after that remove all its tracks.

  • Modules/mediasource/MediaSource.cpp:

(WebCore::MediaSource::setReadyState): Move steps into detachFromElement().
(WebCore::MediaSource::onReadyStateChange): Ditto.
(WebCore::MediaSource::detachFromElement): Perform the steps as specified.
(WebCore::MediaSource::attachToElement): Takes a reference rather than a bare pointer.
(WebCore::MediaSource::stop): Ask the media elemnet to detach.
(WebCore::MediaSource::close): Renamed to detachFromElement().

  • Modules/mediasource/MediaSource.h:
  • Modules/mediasource/SourceBuffer.cpp:

(WebCore::SourceBuffer::videoTracks): Always return a valid TrackList object.
(WebCore::SourceBuffer::audioTracks): Ditto.
(WebCore::SourceBuffer::textTracks): Ditto.

  • html/HTMLMediaElement.cpp:

(WebCore::HTMLMediaElement::~HTMLMediaElement): Renamed closeMediaSource() -> detachMediaSource().
(WebCore::HTMLMediaElement::prepareForLoad): Ditto.
(WebCore::HTMLMediaElement::loadResource): Ditto.
(WebCore::HTMLMediaElement::noneSupported): Ditto.
(WebCore::HTMLMediaElement::mediaLoadingFailedFatally): Ditto.
(WebCore::HTMLMediaElement::detachMediaSource): Ditto.
(WebCore::HTMLMediaElement::userCancelledLoad): Ditto.
(WebCore::HTMLMediaElement::createMediaPlayer): Ditto.
(WebCore::HTMLMediaElement::clearMediaPlayer): Ditto. Also, detach from the MediaSource before

removing tracks.

(WebCore::HTMLMediaElement::closeMediaSource): Deleted.

  • html/HTMLMediaElement.h:
  • html/track/TrackListBase.cpp:

(TrackListBase::remove): Only try to clear the media element from Tracks that have one.

LayoutTests:

  • imported/w3c/web-platform-tests/media-source/mediasource-avtracks-expected.txt
  • platform/mac/TestExpectations:
4:05 PM Changeset in webkit [206126] by achristensen@apple.com
  • 4 edits in trunk

URLParser can read memory out of bounds
https://bugs.webkit.org/show_bug.cgi?id=162206

Reviewed by Geoff Garen.

Source/WebCore:

Covered by new API tests.
URLParser is disabled by default still.

  • platform/URLParser.cpp:

(WebCore::parseIPv4Host):
If there are fewer than two numbers in an ipv4 address, we would subtract two from the Vector's size,
causing us to read memory up to std::numeric_limits<size_t>::max() - 2. Added a bounds check and many tests.

Tools:

  • TestWebKitAPI/Tests/WebCore/URLParser.cpp:

(TestWebKitAPI::TEST_F):

4:03 PM Changeset in webkit [206125] by achristensen@apple.com
  • 4 edits in trunk/Source/WebCore

URLParser should parse serialized valid URLs faster than unknown input
https://bugs.webkit.org/show_bug.cgi?id=162228

Reviewed by Chris Dumez.

The URL constructor with ParsedURLStringTag is almost twice as fast as the other URL constructors.
Assuming there are no tabs or newlines, and assuming characters are already encoded decreases the URLParser
runtime by over 25% and adds infrastructure for more optimizations.

No new tests. No change in behaviour.

  • platform/URL.cpp:

(WebCore::URL::URL):

  • platform/URLParser.cpp:

(WebCore::utf8PercentEncode):
(WebCore::utf8PercentEncodeQuery):
(WebCore::URLParser::parse):
(WebCore::URLParser::parseSerializedURL):
(WebCore::incrementIterator):
(WebCore::URLParser::parseAuthority):
(WebCore::URLParser::parsePort):
(WebCore::URLParser::parseHost):

  • platform/URLParser.h:

(WebCore::URLParser::parse): Deleted.

4:02 PM Changeset in webkit [206124] by bshafiei@apple.com
  • 1 copy in tags/Safari-602.2.10

New tag.

3:53 PM Changeset in webkit [206123] by Keith Rollin
  • 3 edits in trunk/Source/WebKit2

Reduce logging from WebResourceLoader::didReceiveData
https://bugs.webkit.org/show_bug.cgi?id=162233

Reviewed by Antti Koivisto.

Only log once even if called multiple times for a single resource.

  • WebProcess/Network/WebResourceLoader.cpp:

(WebKit::WebResourceLoader::didReceiveData):

  • WebProcess/Network/WebResourceLoader.h:
3:33 PM Changeset in webkit [206122] by dbates@webkit.org
  • 2 edits in trunk/Source/WebCore

Cleanup: Remove an extraneous copy of SecurityOrigin
https://bugs.webkit.org/show_bug.cgi?id=162118

Reviewed by Youenn Fablet.

Share one isolated copy of the SecurityOrigin between the ContentSecurityPolicy and
LoaderTaskOptions objects instead of creating two isolated copies of the SecurityOrigin.
This is safe because both ContentSecurityPolicy and LoaderTaskOptions are instantiated
in WorkerThreadableLoader::MainThreadBridge for use on the main thread only.

  • loader/WorkerThreadableLoader.cpp:

(WebCore::LoaderTaskOptions::LoaderTaskOptions):
(WebCore::WorkerThreadableLoader::MainThreadBridge::MainThreadBridge):

3:12 PM Changeset in webkit [206121] by Antti Koivisto
  • 3 edits in trunk/Source/WebCore

Add size assert for RenderElement
https://bugs.webkit.org/show_bug.cgi?id=162096

Reviewed by Simon Fraser.

Also remove the unused m_visibleInViewportState field.

  • rendering/RenderElement.cpp:

(WebCore::RenderElement::unregisterForVisibleInViewportCallback):

  • rendering/RenderElement.h:
2:59 PM Changeset in webkit [206120] by Keith Rollin
  • 4 edits in trunk/Source/WebCore

REGRESSION (r205275): LOG_WITH_STREAM() macros are all compiled in release builds now
https://bugs.webkit.org/show_bug.cgi?id=162180

Reviewed by Simon Fraser.

Disable LOG_WITH_STREAM in release mode. Along with this, remove a
local variable in GraphcsContextCG.cpp in release mode that's no
longer referenced. And adjust logFunctionResult so that it gets
defined only in debug mode, too, to match its declaration in
LogMacros.h.

No new tests -- there are no tests for logging.

  • platform/LogMacros.h:
  • platform/Logging.cpp:
  • platform/graphics/cg/GraphicsContextCG.cpp:

(WebCore::GraphicsContext::drawNativeImage):

2:25 PM Changeset in webkit [206119] by dbates@webkit.org
  • 44 edits
    112 deletes in trunk

Remove ENABLE(TEXT_AUTOSIZING) automatic text size adjustment code
https://bugs.webkit.org/show_bug.cgi?id=162167

Reviewed by Simon Fraser.

.:

  • Source/cmake/OptionsMac.cmake:
  • Source/cmake/OptionsWin.cmake:
  • Source/cmake/WebKitFeatures.cmake:

Source/JavaScriptCore:

  • Configurations/FeatureDefines.xcconfig:

Source/WebCore:

Remove the automatic text size adjustment code guarded by ENABLE(TEXT_AUTOSIZING)
because it is not used by any port. On Mac and iOS, analogous code guarded by
ENABLE(IOS_TEXT_AUTOSIZING) is used.

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

(WebCore::Document::Document):

  • dom/Document.h:

(WebCore::Document::textAutosizer): Deleted.

  • page/FrameView.cpp:

(WebCore::FrameView::setFrameRect):
(WebCore::FrameView::layout):

  • page/Settings.cpp:

(WebCore::Settings::Settings):
(WebCore::Settings::setTextAutosizingFontScaleFactor): Deleted.

  • page/Settings.h:

(WebCore::Settings::textAutosizingFontScaleFactor): Deleted.

  • page/animation/CSSPropertyAnimation.cpp:

(WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap):

  • rendering/RenderingAllInOne.cpp:
  • rendering/TextAutosizer.cpp: Removed.
  • rendering/TextAutosizer.h: Removed.
  • rendering/style/RenderStyle.cpp:

(WebCore::RenderStyle::changeRequiresLayout):
(WebCore::RenderStyle::lineHeight):
(WebCore::RenderStyle::setFontSize):

  • rendering/style/RenderStyle.h:

(WebCore::RenderStyle::textAutosizingMultiplier): Deleted.
(WebCore::RenderStyle::setTextAutosizingMultiplier): Deleted.

  • rendering/style/StyleVisualData.cpp:

(WebCore::StyleVisualData::StyleVisualData):

  • rendering/style/StyleVisualData.h:
  • testing/InternalSettings.cpp:

(WebCore::InternalSettings::Backup::Backup):
(WebCore::InternalSettings::Backup::restoreTo):
(WebCore::InternalSettings::setTextAutosizingEnabled):
(WebCore::InternalSettings::setTextAutosizingWindowSizeOverride):
(WebCore::InternalSettings::setTextAutosizingFontScaleFactor): Deleted.

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

Source/WebKit/mac:

  • Configurations/FeatureDefines.xcconfig:

Source/WebKit2:

  • Configurations/FeatureDefines.xcconfig:
  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::updatePreferences):

Source/WTF:

  • wtf/FeatureDefines.h:

Tools:

  • Scripts/webkitperl/FeatureList.pm:
  • TestWebKitAPI/Configurations/FeatureDefines.xcconfig:

LayoutTests:

  • TestExpectations:
  • fast/text-autosizing/cluster-inline-block-or-table-expected.html: Removed.
  • fast/text-autosizing/cluster-inline-block-or-table.html: Removed.
  • fast/text-autosizing/cluster-inline-grid-flex-box-expected.html: Removed.
  • fast/text-autosizing/cluster-inline-grid-flex-box.html: Removed.
  • fast/text-autosizing/cluster-list-item-expected.html: Removed.
  • fast/text-autosizing/cluster-list-item.html: Removed.
  • fast/text-autosizing/cluster-narrow-in-wide-expected.html: Removed.
  • fast/text-autosizing/cluster-narrow-in-wide-ohidden-expected.html: Removed.
  • fast/text-autosizing/cluster-narrow-in-wide-ohidden.html: Removed.
  • fast/text-autosizing/cluster-narrow-in-wide.html: Removed.
  • fast/text-autosizing/cluster-wide-in-narrow-expected.html: Removed.
  • fast/text-autosizing/cluster-wide-in-narrow.html: Removed.
  • fast/text-autosizing/cluster-with-narrow-lca-and-cluster-expected.html: Removed.
  • fast/text-autosizing/cluster-with-narrow-lca-and-cluster.html: Removed.
  • fast/text-autosizing/cluster-with-narrow-lca-expected.html: Removed.
  • fast/text-autosizing/cluster-with-narrow-lca.html: Removed.
  • fast/text-autosizing/cluster-with-wide-lca-expected.html: Removed.
  • fast/text-autosizing/cluster-with-wide-lca.html: Removed.
  • fast/text-autosizing/clusters-insufficient-text-expected.html: Removed.
  • fast/text-autosizing/clusters-insufficient-text.html: Removed.
  • fast/text-autosizing/clusters-insufficient-width-expected.html: Removed.
  • fast/text-autosizing/clusters-insufficient-width.html: Removed.
  • fast/text-autosizing/clusters-sufficient-text-except-in-root-expected.html: Removed.
  • fast/text-autosizing/clusters-sufficient-text-except-in-root.html: Removed.
  • fast/text-autosizing/clusters-sufficient-width-expected.html: Removed.
  • fast/text-autosizing/clusters-sufficient-width.html: Removed.
  • fast/text-autosizing/constrained-and-overflow-auto-ancestor-expected.html: Removed.
  • fast/text-autosizing/constrained-and-overflow-auto-ancestor.html: Removed.
  • fast/text-autosizing/constrained-and-overflow-hidden-ancestor-expected.html: Removed.
  • fast/text-autosizing/constrained-and-overflow-hidden-ancestor.html: Removed.
  • fast/text-autosizing/constrained-and-overflow-paged-x-ancestor-expected.html: Removed.
  • fast/text-autosizing/constrained-and-overflow-paged-x-ancestor.html: Removed.
  • fast/text-autosizing/constrained-and-overflow-scroll-ancestor-expected.html: Removed.
  • fast/text-autosizing/constrained-and-overflow-scroll-ancestor.html: Removed.
  • fast/text-autosizing/constrained-height-ancestor-expected.html: Removed.
  • fast/text-autosizing/constrained-height-ancestor.html: Removed.
  • fast/text-autosizing/constrained-height-body-expected.html: Removed.
  • fast/text-autosizing/constrained-height-body.html: Removed.
  • fast/text-autosizing/constrained-maxheight-ancestor-expected.html: Removed.
  • fast/text-autosizing/constrained-maxheight-ancestor.html: Removed.
  • fast/text-autosizing/constrained-maxheight-expected.html: Removed.
  • fast/text-autosizing/constrained-maxheight.html: Removed.
  • fast/text-autosizing/constrained-out-of-flow-expected.html: Removed.
  • fast/text-autosizing/constrained-out-of-flow.html: Removed.
  • fast/text-autosizing/constrained-percent-maxheight-expected.html: Removed.
  • fast/text-autosizing/constrained-percent-maxheight.html: Removed.
  • fast/text-autosizing/constrained-percent-of-viewport-maxheight-expected.html: Removed.
  • fast/text-autosizing/constrained-percent-of-viewport-maxheight.html: Removed.
  • fast/text-autosizing/constrained-then-float-ancestors-expected.html: Removed.
  • fast/text-autosizing/constrained-then-float-ancestors.html: Removed.
  • fast/text-autosizing/constrained-then-overflow-ancestors-expected.html: Removed.
  • fast/text-autosizing/constrained-then-overflow-ancestors.html: Removed.
  • fast/text-autosizing/constrained-then-position-absolute-ancestors-expected.html: Removed.
  • fast/text-autosizing/constrained-then-position-absolute-ancestors.html: Removed.
  • fast/text-autosizing/constrained-then-position-fixed-ancestors-expected.html: Removed.
  • fast/text-autosizing/constrained-then-position-fixed-ancestors.html: Removed.
  • fast/text-autosizing/constrained-within-overflow-ancestor-expected.html: Removed.
  • fast/text-autosizing/constrained-within-overflow-ancestor.html: Removed.
  • fast/text-autosizing/em-margin-border-padding-expected.html: Removed.
  • fast/text-autosizing/em-margin-border-padding.html: Removed.
  • fast/text-autosizing/font-scale-factor-expected.html: Removed.
  • fast/text-autosizing/font-scale-factor.html: Removed.
  • fast/text-autosizing/form-controls-autosizing-button-input-elements-expected.html: Removed.
  • fast/text-autosizing/form-controls-autosizing-button-input-elements.html: Removed.
  • fast/text-autosizing/form-controls-autosizing-checkbox-input-element-expected.html: Removed.
  • fast/text-autosizing/form-controls-autosizing-checkbox-input-element.html: Removed.
  • fast/text-autosizing/form-controls-autosizing-radio-input-element-expected.html: Removed.
  • fast/text-autosizing/form-controls-autosizing-radio-input-element.html: Removed.
  • fast/text-autosizing/form-controls-autosizing-select-element-expected.html: Removed.
  • fast/text-autosizing/form-controls-autosizing-select-element.html: Removed.
  • fast/text-autosizing/form-controls-autosizing-textfield-input-elements-expected.html: Removed.
  • fast/text-autosizing/form-controls-autosizing-textfield-input-elements.html: Removed.
  • fast/text-autosizing/header-li-links-autosizing-expected.html: Removed.
  • fast/text-autosizing/header-li-links-autosizing.html: Removed.
  • fast/text-autosizing/header-links-autosizing-different-fontsize-expected.html: Removed.
  • fast/text-autosizing/header-links-autosizing-different-fontsize.html: Removed.
  • fast/text-autosizing/header-links-autosizing-expected.html: Removed.
  • fast/text-autosizing/header-links-autosizing.html: Removed.
  • fast/text-autosizing/narrow-child-expected.html: Removed.
  • fast/text-autosizing/narrow-child.html: Removed.
  • fast/text-autosizing/narrow-descendants-combined-expected.html: Removed.
  • fast/text-autosizing/narrow-descendants-combined.html: Removed.
  • fast/text-autosizing/narrow-iframe-expected.html: Removed.
  • fast/text-autosizing/narrow-iframe-flattened-expected.html: Removed.
  • fast/text-autosizing/narrow-iframe-flattened.html: Removed.
  • fast/text-autosizing/narrow-iframe.html: Removed.
  • fast/text-autosizing/nested-child-expected.html: Removed.
  • fast/text-autosizing/nested-child.html: Removed.
  • fast/text-autosizing/nested-em-line-height-expected.html: Removed.
  • fast/text-autosizing/nested-em-line-height.html: Removed.
  • fast/text-autosizing/oscillation-javascript-fontsize-change-expected.html: Removed.
  • fast/text-autosizing/oscillation-javascript-fontsize-change.html: Removed.
  • fast/text-autosizing/simple-paragraph-expected.html: Removed.
  • fast/text-autosizing/simple-paragraph.html: Removed.
  • fast/text-autosizing/span-child-expected.html: Removed.
  • fast/text-autosizing/span-child.html: Removed.
  • fast/text-autosizing/unwrappable-blocks-expected.html: Removed.
  • fast/text-autosizing/unwrappable-blocks.html: Removed.
  • fast/text-autosizing/unwrappable-inlines-expected.html: Removed.
  • fast/text-autosizing/unwrappable-inlines.html: Removed.
  • fast/text-autosizing/various-font-sizes-expected.html: Removed.
  • fast/text-autosizing/various-font-sizes.html: Removed.
  • fast/text-autosizing/wide-block-expected.html: Removed.
  • fast/text-autosizing/wide-block.html: Removed.
  • fast/text-autosizing/wide-child-expected.html: Removed.
  • fast/text-autosizing/wide-child.html: Removed.
  • fast/text-autosizing/wide-iframe-expected.html: Removed.
  • fast/text-autosizing/wide-iframe.html: Removed.
  • fast/text-autosizing/wide-in-narrow-overflow-scroll-expected.html: Removed.
  • fast/text-autosizing/wide-in-narrow-overflow-scroll.html: Removed.
  • platform/efl/TestExpectations:
  • platform/gtk/TestExpectations:
  • platform/ios-simulator-wk1/TestExpectations: Move Failure entry for test

fast/text-autosizing/ios/line-height-text-autosizing.html from here to platform/ios-simulator/TestExpectations.

  • platform/ios-simulator-wk2/TestExpectations: Ditto.
  • platform/ios-simulator/TestExpectations: Associated failure of test

fast/text-autosizing/ios/line-height-text-autosizing.html with <https://bugs.webkit.org/show_bug.cgi?id=162236>.

  • platform/mac-wk2/TestExpectations:
  • platform/mac/TestExpectations:
  • platform/win/TestExpectations:
  • platform/wk2/TestExpectations:
2:10 PM Changeset in webkit [206118] by Chris Dumez
  • 3 edits
    5 adds in trunk

Update XHTMLParser to recognize "-W3CDTD MathML 2.0EN" public identifier
https://bugs.webkit.org/show_bug.cgi?id=162166

Reviewed by Alex Christensen.

LayoutTests/imported/w3c:

Import test coverage from W3C web-platform-tests.

  • web-platform-tests/html/the-xhtml-syntax/parsing-xhtml-documents/w3c-import.log: Added.
  • web-platform-tests/html/the-xhtml-syntax/parsing-xhtml-documents/xhtml-mathml-dtd-entity-support-expected.txt: Added.
  • web-platform-tests/html/the-xhtml-syntax/parsing-xhtml-documents/xhtml-mathml-dtd-entity-support.htm: Added.

Source/WebCore:

Update XHTMLParser to recognize "-W3CDTD MathML 2.0EN" public identifier as
per the latest HTML specification.

Firefox already recognizes it properly.

Test: imported/w3c/web-platform-tests/html/the-xhtml-syntax/parsing-xhtml-documents/xhtml-mathml-dtd-entity-support.htm

  • xml/parser/XMLDocumentParserLibxml2.cpp:

(WebCore::convertUTF16EntityToUTF8):
Fix assertion that was causing the new test to crash in debug. The input '\u0026'
gets converted to '&' which is only 1 character. However, the assertion wrongly
expected WTF::Unicode::convertUTF16ToUTF8() to generate more than 1 character.

(WebCore::externalSubsetHandler):
Add "-W3CDTD MathML 2.0EN" to the list.

2:07 PM Changeset in webkit [206117] by commit-queue@webkit.org
  • 3 edits in trunk/LayoutTests

Web Inspector: adopt Object.awaitEvent in LayoutTests/inspector/unit-tests
https://bugs.webkit.org/show_bug.cgi?id=162103

Patch by Devin Rousso <Devin Rousso> on 2016-09-19
Reviewed by Brian Burg.

Replace instances of singleFireEventListener with awaitEvent and use promise logic to make
tests more readable.

  • inspector/unit-tests/inspector-test-dispatch-event-to-frontend.html:
  • inspector/unit-tests/protocol-test-dispatch-event-to-frontend.html:
1:49 PM Changeset in webkit [206116] by commit-queue@webkit.org
  • 8 edits in trunk/LayoutTests

Web Inspector: adopt Object.awaitEvent in LayoutTests/inspector/console
https://bugs.webkit.org/show_bug.cgi?id=162070

Patch by Devin Rousso <Devin Rousso> on 2016-09-19
Reviewed by Brian Burg.

Replace instances of singleFireEventListener with awaitEvent and use promise logic to make
tests more readable.

  • inspector/console/clearMessages.html:
  • inspector/console/command-line-api.html:
  • inspector/console/console-time.html:
  • inspector/console/messageAdded-from-named-evaluations.html:
  • inspector/console/messageAdded-from-worker.html:
  • inspector/console/messageRepeatCountUpdated.html:
  • inspector/console/messagesCleared.html:
1:47 PM Changeset in webkit [206115] by commit-queue@webkit.org
  • 2 edits in trunk/LayoutTests

Web Inspector: adopt Object.awaitEvent in LayoutTests/inspector/script-profiler
https://bugs.webkit.org/show_bug.cgi?id=162101

Patch by Devin Rousso <Devin Rousso> on 2016-09-19
Reviewed by Brian Burg.

Replace instances of singleFireEventListener with awaitEvent and use promise logic to make
tests more readable.

  • inspector/script-profiler/event-type-Other.html:
1:46 PM Changeset in webkit [206114] by commit-queue@webkit.org
  • 2 edits in trunk/LayoutTests

Web Inspector: adopt Object.awaitEvent in LayoutTests/inspector/page
https://bugs.webkit.org/show_bug.cgi?id=162100

Patch by Devin Rousso <Devin Rousso> on 2016-09-19
Reviewed by Brian Burg.

Replace instances of singleFireEventListener with awaitEvent and use promise logic to make
tests more readable.

  • inspector/page/searchInResources.html:
1:45 PM Changeset in webkit [206113] by commit-queue@webkit.org
  • 2 edits in trunk/LayoutTests

Web Inspector: adopt Object.awaitEvent in LayoutTests/inspector/storage
https://bugs.webkit.org/show_bug.cgi?id=162102

Patch by Devin Rousso <Devin Rousso> on 2016-09-19
Reviewed by Brian Burg.

Replace instances of singleFireEventListener with awaitEvent and use promise logic to make
tests more readable.

  • inspector/storage/domStorage-events.html:
1:45 PM Changeset in webkit [206112] by commit-queue@webkit.org
  • 4 edits in trunk/LayoutTests

Web Inspector: adopt Object.awaitEvent in LayoutTests/inspector/network
https://bugs.webkit.org/show_bug.cgi?id=162099

Patch by Devin Rousso <Devin Rousso> on 2016-09-19
Reviewed by Brian Burg.

Replace instances of singleFireEventListener with awaitEvent and use promise logic to make
tests more readable.

  • inspector/network/client-blocked-load-expected.txt:
  • inspector/network/client-blocked-load.html:
  • inspector/network/xhr-json-blob-has-content.html:
1:41 PM Changeset in webkit [206111] by commit-queue@webkit.org
  • 5 edits in trunk/LayoutTests

Web Inspector: adopt Object.awaitEvent in LayoutTests/inspector/indexeddb
https://bugs.webkit.org/show_bug.cgi?id=162073

Patch by Devin Rousso <Devin Rousso> on 2016-09-19
Reviewed by Brian Burg.

Replace instances of singleFireEventListener with awaitEvent and use promise logic to make
tests more readable.

  • inspector/indexeddb/clearObjectStore.html:
  • inspector/indexeddb/deleteDatabaseNamesWithSpace.html:
  • inspector/indexeddb/requestDatabase.html:
  • inspector/indexeddb/requestDatabaseNames.html:
1:39 PM Changeset in webkit [206110] by keith_miller@apple.com
  • 9 edits
    1 delete in trunk/Source/JavaScriptCore

Update WASM towards 0xc
https://bugs.webkit.org/show_bug.cgi?id=162067

Reviewed by Geoffrey Garen.

This patch updates some of the core parts of the WASM frontend to the 0xc standard.
First, it changes the section names from strings to bytecodes. It also adds support
for inline block signatures. This is a change from the old version that used to have
each branch indicate the arity. Finally, this patch updates all the tests and deletes
a duplicate test.

  • CMakeLists.txt:
  • JavaScriptCore.xcodeproj/project.pbxproj:
  • testWASM.cpp:

(runWASMTests):

  • wasm/WASMB3IRGenerator.cpp:
  • wasm/WASMFormat.h:
  • wasm/WASMFunctionParser.h:

(JSC::WASM::FunctionParser<Context>::FunctionParser):
(JSC::WASM::FunctionParser<Context>::parseBlock):
(JSC::WASM::FunctionParser<Context>::parseExpression):

  • wasm/WASMModuleParser.cpp:

(JSC::WASM::ModuleParser::parse):

  • wasm/WASMSections.cpp: Removed.

(JSC::WASM::Sections::lookup): Deleted.

  • wasm/WASMSections.h:

(JSC::WASM::Sections::validateOrder):

1:35 PM Changeset in webkit [206109] by Chris Dumez
  • 11 edits in trunk

Window's pageXOffset / pageYOffset attributes should be replaceable
https://bugs.webkit.org/show_bug.cgi?id=162046

Reviewed by Darin Adler.

LayoutTests/imported/w3c:

Rebaseline W3C test now that more checks are passing.

  • web-platform-tests/html/browsers/the-window-object/window-properties-expected.txt:

Source/WebCore:

Window's pageXOffset / pageYOffset attributes should be replaceable as per:

Firefox agrees with the specification.

No new tests, rebaselined existing test.

  • page/DOMWindow.h:
  • page/DOMWindow.idl:

LayoutTests:

Update existing tests to reflect behavior change.

  • fast/dom/Window/get-set-properties-expected.txt:
  • fast/dom/Window/get-set-properties.html:
  • js/dom/var-declarations-shadowing-expected.txt:
  • js/dom/var-declarations-shadowing.html:
1:22 PM Changeset in webkit [206108] by commit-queue@webkit.org
  • 3 edits in trunk/Source/WebCore

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

still failing on armv7 for some reason (Requested by anttik on
#webkit).

Reverted changeset:

"Add size assert for RenderElement"
https://bugs.webkit.org/show_bug.cgi?id=162096
http://trac.webkit.org/changeset/206107

12:26 PM Changeset in webkit [206107] by Antti Koivisto
  • 3 edits in trunk/Source/WebCore

Add size assert for RenderElement
https://bugs.webkit.org/show_bug.cgi?id=162096

Reviewed by Simon Fraser.

Also remove the unused m_visibleInViewportState field.

  • rendering/RenderElement.cpp:

(WebCore::RenderElement::unregisterForVisibleInViewportCallback):

  • rendering/RenderElement.h:
12:08 PM Changeset in webkit [206106] by Matt Baker
  • 3 edits in trunk/Source/WebInspectorUI

Unreviewed, reverting changeset https://trac.webkit.org/changeset/206101.

Revert https://bugs.webkit.org/show_bug.cgi?id=162165:
Web Inspector: Make it easier to create a view from an existing DOM element.

  • UserInterface/Base/Main.js:

(WebInspector.contentLoaded):

  • UserInterface/Views/View.js:

(WebInspector.View):

11:59 AM Changeset in webkit [206105] by commit-queue@webkit.org
  • 6 edits in trunk

Web Inspector: Scope sidebar shows "Closure" instead of "Local" when paused in anonymous function
https://bugs.webkit.org/show_bug.cgi?id=162113
<rdar://problem/28348954>

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2016-09-19
Reviewed by Brian Burg.

Source/WebInspectorUI:

  • UserInterface/Models/CallFrame.js:

(WebInspector.CallFrame):
Default the functionName to the empty string. This will compare
favorably against other empty function names instead of null.

LayoutTests:

  • inspector/debugger/paused-scopes-expected.txt:
  • inspector/debugger/paused-scopes.html:
  • inspector/debugger/resources/paused-scopes.js:

Add a third pause to test behavior paused inside an
unnamed anonymous function.

11:46 AM Changeset in webkit [206104] by Yusuke Suzuki
  • 15 edits in trunk/Source/JavaScriptCore

[JSC] Use is_cell_with_type for @isRegExpObject, @isMap, and @isSet
https://bugs.webkit.org/show_bug.cgi?id=162142

Reviewed by Michael Saboff.

Use is_cell_with_type for @isRegExpObject, @isMap and @isSet.
Previously, they were implemented as functions and only @isRegExpObject was handled in the DFG and FTL.
The recently added op_is_cell_with_type bytecode and DFG IsCellWithType node allows us to simplify the above checks in all JIT tiers.
Changed these checks to bytecode intrinsics using op_is_cell_with_type.

  • builtins/BuiltinNames.h:
  • bytecode/BytecodeIntrinsicRegistry.h:
  • bytecode/SpeculatedType.cpp:

(JSC::speculationFromJSType):

  • bytecompiler/BytecodeGenerator.h:

(JSC::BytecodeGenerator::emitIsRegExpObject):
(JSC::BytecodeGenerator::emitIsMap):
(JSC::BytecodeGenerator::emitIsSet):
(JSC::BytecodeGenerator::emitIsProxyObject): Deleted.

  • bytecompiler/NodesCodegen.cpp:

(JSC::BytecodeIntrinsicNode::emit_intrinsic_isRegExpObject):
(JSC::BytecodeIntrinsicNode::emit_intrinsic_isMap):
(JSC::BytecodeIntrinsicNode::emit_intrinsic_isSet):

  • dfg/DFGByteCodeParser.cpp:

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

  • runtime/ECMAScriptSpecInternalFunctions.cpp:

(JSC::esSpecIsRegExpObject): Deleted.

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

(JSC::JSGlobalObject::init):

  • runtime/MapPrototype.cpp:

(JSC::privateFuncIsMap): Deleted.

  • runtime/MapPrototype.h:
  • runtime/SetPrototype.cpp:

(JSC::privateFuncIsSet): Deleted.

  • runtime/SetPrototype.h:
11:38 AM Changeset in webkit [206103] by bshafiei@apple.com
  • 5 edits in branches/safari-602-branch/Source

Versioning.

11:32 AM Changeset in webkit [206102] by n_wang@apple.com
  • 6 edits
    2 adds in trunk

AX: Add accessibility support for details element on iOS
https://bugs.webkit.org/show_bug.cgi?id=162041

Reviewed by Chris Fleizach.

Source/WebCore:

The details and summary elements are poorly supported on iOS.
Two major issues:

  1. Assistive technologies taking focus onto details/summary elements will cause unexpected behavior.
  2. VoiceOver is not speaking the expanded status of the details element.

Fixed them by not setting focus onto elements inside details and exposing the details element's expanded
status to its summary's accessible children.

Test: accessibility/ios-simulator/detail-summary-ios.html

  • accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:

(matchedParent):
(-[WebAccessibilityObjectWrapper _accessibilityListAncestor]):
(-[WebAccessibilityObjectWrapper _accessibilityLandmarkAncestor]):
(-[WebAccessibilityObjectWrapper _accessibilityTableAncestor]):
(-[WebAccessibilityObjectWrapper _accessibilityFieldsetAncestor]):
(-[WebAccessibilityObjectWrapper tableCellParent]):
(-[WebAccessibilityObjectWrapper tableParent]):
(-[WebAccessibilityObjectWrapper convertPointToScreenSpace:]):
(-[WebAccessibilityObjectWrapper convertRectToScreenSpace:]):
(-[WebAccessibilityObjectWrapper detailParentForSummaryObject:]):
(-[WebAccessibilityObjectWrapper detailParentForObject:]):
(-[WebAccessibilityObjectWrapper accessibilityElementDidBecomeFocused]):
(-[WebAccessibilityObjectWrapper accessibilitySupportsARIAExpanded]):
(-[WebAccessibilityObjectWrapper accessibilityIsExpanded]):

Tools:

  • DumpRenderTree/ios/AccessibilityUIElementIOS.mm:

(AccessibilityUIElement::isExpanded):

  • WebKitTestRunner/InjectedBundle/ios/AccessibilityUIElementIOS.mm:

(WTR::AccessibilityUIElement::isExpanded):

LayoutTests:

  • accessibility/ios-simulator/detail-summary-ios-expected.txt: Added.
  • accessibility/ios-simulator/detail-summary-ios.html: Added.
10:53 AM Changeset in webkit [206101] by Matt Baker
  • 3 edits in trunk/Source/WebInspectorUI

Web Inspector: Make it easier to create a view from an existing DOM element
https://bugs.webkit.org/show_bug.cgi?id=162165
<rdar://problem/28365848>

Reviewed by Timothy Hatcher.

  • UserInterface/Base/Main.js:

(WebInspector.contentLoaded):
Pass id string for views created from existing DOM elements.

  • UserInterface/Views/View.js:

(WebInspector.View):
Change element to elementOrIdentifier. If the value is a string,
treat it as an element identifier. If the identifier is invalid, create
a default element.

10:36 AM Changeset in webkit [206100] by Alan Bujtas
  • 3 edits
    2 adds in trunk

ASSERTION FAILED: clipRectsContext.rootLayer == m_clipRectsCache->m_clipRectsRoot[clipRectsType] while loading guardian.co.uk
https://bugs.webkit.org/show_bug.cgi?id=162129
<rdar://problem/28353350>

Reviewed by Antti Koivisto.

Source/WebCore:

Neither ::localClipRect() nor ::selfClipRect() accounts for paginated context while computing the cliprects (See FIXMEs).
This patch ensures that we don't end up caching these invalid cliprects.

Test: fast/multicol/assert-on-cliprect-caching-when-paginated.html

  • rendering/RenderLayer.cpp:

(WebCore::RenderLayer::calculateClipRects):

LayoutTests:

  • fast/multicol/assert-on-cliprect-caching-when-paginated-expected.txt: Added.
  • fast/multicol/assert-on-cliprect-caching-when-paginated.html: Added.
10:16 AM Changeset in webkit [206099] by BJ Burg
  • 8 edits in trunk/Source/JavaScriptCore

Web Replay: teach the replay inputs generator to encode and decode OptionSet<T>
https://bugs.webkit.org/show_bug.cgi?id=162107

Reviewed by Anders Carlsson.

Add a new type flag OPTION_SET. This means that the type is a typechecked enum class
declaration, but it's stored in an OptionSet object and can contain multiple
distinct enumeration values like an untyped enum declaration.

Do some cleanup since the generator now supports three different enumerable types:
'enum', 'enum class', and 'OptionSet<T>' where T is an enum class.

Also clean up some sloppy variable names. Using an 'enum_' prefix is really confusing now.

  • replay/scripts/CodeGeneratorReplayInputs.py:

(Type.is_enum_declaration):
(Type.is_enum_class_declaration):
(Type.is_option_set):
(Type):
(Type.is_enumerable):
When we want all enumerable types, this property includes all three variants.

(Type.declaration_kind): Forward-declare OptionSet's type parameter as an enum class.
(VectorType.is_enum_declaration): Renamed from is_enum().
(VectorType.is_enum_class_declaration): Renamed from is_enum_class().
(VectorType.is_option_set): Added.
(InputsModel.enumerable_types): Added.
(InputsModel.parse_type_with_framework):
(Generator.generate_header):
(Generator.generate_implementation):
(Generator.generate_includes):
(Generator.generate_type_forward_declarations):
(Generator.generate_enumerable_type_trait_declaration):
(Generator.generate_enum_trait_declaration): Renamed.
(Generator.generate_enum_trait_implementation): Renamed.

  • replay/scripts/CodeGeneratorReplayInputsTemplates.py:

Add new templates for OptionSet types. Clean up parameter names and simplify the
enumerable type declaration template, which is the same for all enumerable type variants.

  • replay/scripts/tests/expected/fail-on-c-style-enum-no-storage.json-error:
  • replay/scripts/tests/expected/generate-enum-encoding-helpers.json-TestReplayInputs.cpp:

(JSC::EncodingTraits<Test::PlatformEvent::OtherType>::encodeValue):
(JSC::EncodingTraits<Test::PlatformEvent::OtherType>::decodeValue):

  • replay/scripts/tests/expected/generate-enum-encoding-helpers.json-TestReplayInputs.h:
  • replay/scripts/tests/expected/generate-enum-with-guard.json-TestReplayInputs.h:

Rebaseline test results.

  • replay/scripts/tests/generate-enum-encoding-helpers.json:

Add a new type for OptionSet<PlatformEvent::Modifier> to capture generated encode/decode methods.

10:00 AM Changeset in webkit [206098] by Yusuke Suzuki
  • 29 edits in trunk/Source/JavaScriptCore

[JSC][LLInt] Introduce is_cell_with_type
https://bugs.webkit.org/show_bug.cgi?id=162132

Reviewed by Sam Weinig.

In this patch, we introduce is_cell_with_type bytecode. This bytecode can unify the following predicates,
op_is_string, op_is_jsarray, op_is_proxy_object, and op_is_derived_array!
And we now drop DFG node IsString since we can use IsCellWithType instead.
This automatically offers optimization to previous IsString node: dropping cell check by using CellUse edge filter.

Later, we are planning to use this is_cell_with_type to optimize @isRegExpObject, @isSet, and @isMap[1].

The performance results are neutral.

[1]: https://bugs.webkit.org/show_bug.cgi?id=162142

  • bytecode/BytecodeList.json:
  • bytecode/BytecodeUseDef.h:

(JSC::computeUsesForBytecodeOffset):
(JSC::computeDefsForBytecodeOffset):

  • bytecode/CodeBlock.cpp:

(JSC::CodeBlock::dumpBytecode):

  • bytecode/SpeculatedType.cpp:

(JSC::speculationFromJSType):

  • bytecode/SpeculatedType.h:
  • bytecompiler/BytecodeGenerator.cpp:

(JSC::BytecodeGenerator::emitEqualityOp):
(JSC::BytecodeGenerator::emitIsCellWithType):

  • bytecompiler/BytecodeGenerator.h:

(JSC::BytecodeGenerator::emitIsJSArray):
(JSC::BytecodeGenerator::emitIsProxyObject):
(JSC::BytecodeGenerator::emitIsDerivedArray):

  • dfg/DFGAbstractInterpreterInlines.h:

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

  • dfg/DFGByteCodeParser.cpp:

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

  • dfg/DFGCapabilities.cpp:

(JSC::DFG::capabilityLevel):

  • dfg/DFGClobberize.h:

(JSC::DFG::clobberize):

  • dfg/DFGDoesGC.cpp:

(JSC::DFG::doesGC):

  • dfg/DFGFixupPhase.cpp:

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

  • dfg/DFGNode.h:

(JSC::DFG::Node::speculatedTypeForQuery):

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

(JSC::DFG::safeToExecute):

  • dfg/DFGSpeculativeJIT32_64.cpp:

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

  • dfg/DFGSpeculativeJIT64.cpp:

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

  • ftl/FTLCapabilities.cpp:

(JSC::FTL::canCompile):

  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::compileNode):
(JSC::FTL::DFG::LowerDFGToB3::compileIsString): Deleted.

  • jit/JIT.cpp:

(JSC::JIT::privateCompileMainPass):

  • jit/JIT.h:
  • jit/JITOpcodes.cpp:

(JSC::JIT::emit_op_is_cell_with_type):
(JSC::JIT::emitIsCellWithType): Deleted.
(JSC::JIT::emit_op_is_string): Deleted.
(JSC::JIT::emit_op_is_jsarray): Deleted.
(JSC::JIT::emit_op_is_proxy_object): Deleted.
(JSC::JIT::emit_op_is_derived_array): Deleted.

  • jit/JITOpcodes32_64.cpp:

(JSC::JIT::emit_op_is_cell_with_type):
(JSC::JIT::emitIsCellWithType): Deleted.
(JSC::JIT::emit_op_is_string): Deleted.
(JSC::JIT::emit_op_is_jsarray): Deleted.
(JSC::JIT::emit_op_is_proxy_object): Deleted.
(JSC::JIT::emit_op_is_derived_array): Deleted.

  • llint/LLIntData.cpp:

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

  • llint/LowLevelInterpreter32_64.asm:
  • llint/LowLevelInterpreter64.asm:
9:01 AM Changeset in webkit [206097] by commit-queue@webkit.org
  • 3 edits in trunk/Source/WebKit2

Only override URLParser::enabled if NSUserDefaults object exists
https://bugs.webkit.org/show_bug.cgi?id=162131

Patch by Alex Christensen <achristensen@webkit.org> on 2016-09-19
Reviewed by Sam Weinig.

  • Shared/Cocoa/WebKit2InitializeCocoa.mm:

(WebKit::platformInitializeWebKit2):

  • Shared/WebKit2Initialize.cpp:

When I enable URLParser by default, I will want the default to only be overwritten if there is a
NSUserDefaults key for URLParserEnabled. Right now it is setting URLParser::enabled to false always,
which isn't a problem because the default is also false. When the default is true, that will overwrite the default.

7:31 AM Changeset in webkit [206096] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore

Clean-up after r206014
https://bugs.webkit.org/show_bug.cgi?id=162140

Patch by Youenn Fablet <youenn@apple.com> on 2016-09-19
Reviewed by Sam Weinig.

Covered by existing tests.

  • platform/network/HTTPHeaderMap.cpp:

(WebCore::HTTPHeaderMap::add):

6:30 AM Changeset in webkit [206095] by Michael Catanzaro
  • 2 edits in trunk

[GTK] Make ENABLE_THREADED_COMPOSITOR a public option
https://bugs.webkit.org/show_bug.cgi?id=162148

Reviewed by Carlos Garcia Campos.

  • Source/cmake/OptionsGTK.cmake:
5:30 AM Changeset in webkit [206094] by nael.ouedraogo@crf.canon.fr
  • 4 edits in trunk/Source/WebCore

If a host object is only used as a variadic argument, its bindings header isn't properly included
https://bugs.webkit.org/show_bug.cgi?id=150121

Reviewed by Youenn Fablet.

Modify JS binding generator to include binding headers of objects passed
as variadic argument.

  • Modules/mediastream/RTCPeerConnection.h: Remove workaround.
  • bindings/scripts/CodeGeneratorJS.pm:

(AddVariadicToImplIncludes):
(GenerateParametersCheck):

  • bindings/scripts/test/JS/JSTestObj.cpp:
4:30 AM Changeset in webkit [206093] by commit-queue@webkit.org
  • 3 edits in trunk/Source/WebCore

Web Inspector: ⇧⌘C should highlight node under cursor without re-moving mouse
https://bugs.webkit.org/show_bug.cgi?id=162128

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2016-09-19
Reviewed by Brian Burg.

  • inspector/InspectorDOMAgent.h:
  • inspector/InspectorDOMAgent.cpp:

(WebCore::InspectorDOMAgent::willDestroyFrontendAndBackend):
(WebCore::InspectorDOMAgent::mouseDidMoveOverElement):
(WebCore::InspectorDOMAgent::highlightMousedOverNode):
(WebCore::InspectorDOMAgent::setSearchingForNode):
When the inspector is connected, remember the last moused over node.
This produces far more consistent results of highlighting under
the cursor when pressing and releasing the keyboard shortcut keys,
without having to move the mouse. Even when using the shortcut to
first connect the inspector this produces far more consistent
results because releasing the keys for the shortcut produce new
mouseDidMoveOverElement events.

4:29 AM Changeset in webkit [206092] by commit-queue@webkit.org
  • 4 edits in trunk/Source/WebInspectorUI

Web Inspector: Color picker in Style sidebar stops working after 1st color change
https://bugs.webkit.org/show_bug.cgi?id=162115
<rdar://problem/28349875>

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2016-09-19
Reviewed by Brian Burg.

  • UserInterface/Views/CSSStyleDeclarationTextEditor.js:

(WebInspector.CSSStyleDeclarationTextEditor):
(WebInspector.CSSStyleDeclarationTextEditor.prototype._updateTextMarkers):
(WebInspector.CSSStyleDeclarationTextEditor.prototype._updateTextMarkers.createSwatch):
(WebInspector.CSSStyleDeclarationTextEditor.prototype._inlineSwatchActivated):
(WebInspector.CSSStyleDeclarationTextEditor.prototype._inlineSwatchDeactivated):
Listen for swatch activated / inactivated events to set some state.

(WebInspector.CSSStyleDeclarationTextEditor.prototype._propertiesChanged):
Do not wipe markers if there is an active inline swatch. That
would break behavior for that active swatch.

(WebInspector.CSSStyleDeclarationTextEditor.prototype._inlineSwatchValueChanged):
Eliminate old, incorrect, and now unnecessary code for trying to recover
a textMarker for an inline swatch if the textMarker went away. Besides being
incorrect, if an inline swatch's textMarker goes away, then we will already
have issues, because any active popover will still be connected to the
original marker and swatch element that no longer appear in the editor.

  • UserInterface/Views/ColorPicker.js:

(WebInspector.ColorPicker):
(WebInspector.ColorPicker.prototype.set color):

  • UserInterface/Views/InlineSwatch.js:

(WebInspector.InlineSwatch.prototype.didDismissPopover):
(WebInspector.InlineSwatch.prototype._swatchElementClicked):

2:39 AM Changeset in webkit [206091] by commit-queue@webkit.org
  • 8 edits in trunk/Source

Web Inspector: Bring the inspected page's window forward when activating element search
https://bugs.webkit.org/show_bug.cgi?id=162114
<rdar://problem/28349357>

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2016-09-19
Reviewed by Brian Burg.

Source/WebKit/mac:

  • WebCoreSupport/WebInspectorClient.mm:

(WebInspectorClient::didSetSearchingForNode):
When element search is activated bring the window
containing the inspected page to the foreground.

Source/WebKit2:

  • UIProcess/WebInspectorProxy.h:
  • UIProcess/WebInspectorProxy.cpp:

(WebKit::WebInspectorProxy::elementSelectionChanged):
When element search is activated allow the platform to bring
the window containing the inspected page to the foreground.

(WebKit::WebInspectorProxy::platformBringInspectedPageToFront):

  • UIProcess/efl/WebInspectorProxyEfl.cpp:

(WebKit::WebInspectorProxy::platformBringInspectedPageToFront):

  • UIProcess/gtk/WebInspectorProxyGtk.cpp:

(WebKit::WebInspectorProxy::platformBringInspectedPageToFront):
Default empty implementation for ports.

  • UIProcess/mac/WebInspectorProxyMac.mm:

(WebKit::WebInspectorProxy::platformBringInspectedPageToFront):
Bring the window containing the inspected page to the foreground.

2:00 AM Changeset in webkit [206090] by nael.ouedraogo@crf.canon.fr
  • 4 edits in trunk/Source/WebCore

JSDOMBindings' toArguments() should return a more descriptive object
https://bugs.webkit.org/show_bug.cgi?id=161793

Reviewed by Youenn Fablet.

Replace std::pair with new VariadicHelperResult class with more
readable members names.

No additional tests required.

  • bindings/js/JSDOMBinding.h:

(WebCore::VariadicHelper::Result::Result):

  • bindings/scripts/CodeGeneratorJS.pm:

(GenerateParametersCheck):

  • bindings/scripts/test/JS/JSTestObj.cpp:

(WebCore::jsTestObjPrototypeFunctionOverloadedMethod12):
(WebCore::jsTestObjPrototypeFunctionVariadicStringMethod):
(WebCore::jsTestObjPrototypeFunctionVariadicDoubleMethod):
(WebCore::jsTestObjPrototypeFunctionVariadicNodeMethod):

12:23 AM Changeset in webkit [206089] by Carlos Garcia Campos
  • 9 edits in releases/WebKitGTK/webkit-2.14/Source/WebKit2

Merge r206080 - [GTK] Stop using glReadPixels() to blit AC surfaces in the UIProcess under Wayland
https://bugs.webkit.org/show_bug.cgi?id=161530

Reviewed by Carlos Garcia Campos.

Use gdk_cairo_draw_from_gl when all necessary conditions exist.

  • Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp:

(WebKit::ThreadedCompositor::create): take TextureMapper::PaintFlags as optional argument.
(WebKit::ThreadedCompositor::ThreadedCompositor): ditto.
(WebKit::ThreadedCompositor::renderLayerTree): relay paint flags to TextureMapper::beginPaint.

  • Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.h:
  • UIProcess/gtk/AcceleratedBackingStoreWayland.cpp:

(WebKit::AcceleratedBackingStoreWayland::paint): use the faster gdk_cairo_draw_from_gl when a new
enough GTK+ is in use.

  • WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.cpp:

(WebKit::ThreadedCoordinatedLayerTreeHost::ThreadedCoordinatedLayerTreeHost): create compositor
with PaintingMirrored flag if we have recent GTK+ and are running under Wayland.

  • WebProcess/WebPage/gtk/AcceleratedSurfaceX11.h: implement shouldPaintMirrored by always

returning false.

  • WebProcess/WebPage/gtk/AcceleratedSurfaceWayland.h: implement shouldPaintMirrored by always

returning true.

  • WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp:

(WebKit::LayerTreeHostGtk::compositeLayersToContext): pass PaintingMirror flag to TextureMapper
when under a recent enough GTK+ and Wayland.

12:22 AM Changeset in webkit [206088] by Carlos Garcia Campos
  • 2 edits in releases/WebKitGTK/webkit-2.14/Source/WebCore/platform/gtk/po

Merge r206079 - [GTK] [l10n] Updated Ukrainian translation of WebKitGTK+
https://bugs.webkit.org/show_bug.cgi?id=162136

Patch by Yuri Chornoivan <yurchor@ukr.net> on 2016-09-18
Rubber-stamped by Michael Catanzaro.

  • uk.po:
12:21 AM Changeset in webkit [206087] by Carlos Garcia Campos
  • 2 edits in releases/WebKitGTK/webkit-2.14/Source/WebKit2

Merge r206086 - [GTK] Empty referer header after WebKit session state restoration trips Bad Behavior Wordpress plugin
https://bugs.webkit.org/show_bug.cgi?id=159606

Reviewed by Carlos Garcia Campos.

Leave the referrer member of FrameState unset when restoring from session state, unless
there is actually a nonempty referrer saved in the state. If we set it to an empty string,
then an empty referrer gets sent to the server, which some servers do not accept. It
triggers the Bad Behavior plugin on my WordPress blog, for instance. It also breaks vox.com.

  • UIProcess/API/gtk/WebKitWebViewSessionState.cpp:

(decodeFrameState):

Sep 18, 2016:

11:51 PM Changeset in webkit [206086] by Michael Catanzaro
  • 2 edits in trunk/Source/WebKit2

[GTK] Empty referer header after WebKit session state restoration trips Bad Behavior Wordpress plugin
https://bugs.webkit.org/show_bug.cgi?id=159606

Reviewed by Carlos Garcia Campos.

Leave the referrer member of FrameState unset when restoring from session state, unless
there is actually a nonempty referrer saved in the state. If we set it to an empty string,
then an empty referrer gets sent to the server, which some servers do not accept. It
triggers the Bad Behavior plugin on my WordPress blog, for instance. It also breaks vox.com.

  • UIProcess/API/gtk/WebKitWebViewSessionState.cpp:

(decodeFrameState):

12:49 PM Changeset in webkit [206085] by Matt Baker
  • 3 edits in trunk/LayoutTests

Web Inspector: Add test coverage for all array utility functions
https://bugs.webkit.org/show_bug.cgi?id=162044
<rdar://problem/28330846>

Reviewed by Joseph Pecoraro.

New test cases and expectations for Array utility functions.

  • inspector/unit-tests/array-utilities-expected.txt:
  • inspector/unit-tests/array-utilities.html:
12:04 PM Changeset in webkit [206084] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebKit2

[iOS] Remove unused methods from _WKInputDelegate
https://bugs.webkit.org/show_bug.cgi?id=162098

Patch by Chelsea Pugh <cpugh@apple.com> on 2016-09-18
Reviewed by Anders Carlsson.

  • UIProcess/API/Cocoa/_WKInputDelegate.h:
11:03 AM Changeset in webkit [206083] by Yusuke Suzuki
  • 2 edits in trunk/Source/JavaScriptCore

[JSC] Assert length of LLInt opcodes using isCellWithType is 3
https://bugs.webkit.org/show_bug.cgi?id=162134

Reviewed by Saam Barati.

  • llint/LLIntData.cpp:

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

10:40 AM Changeset in webkit [206082] by Yusuke Suzuki
  • 3 edits
    1 add in trunk

[JSC] Do not need to use defineProperty to define methods for object literals
https://bugs.webkit.org/show_bug.cgi?id=162111

Reviewed by Saam Barati.

JSTests:

  • stress/object-literal-methods.js: Added.

(shouldBe):
(throw.new.Error.let.object.get name):
(throw.new.Error):
(shouldBe.let.object.get name):
(shouldBe.let.object.get prototype):
(shouldBe.let.object.get 42):

Source/JavaScriptCore:

When we receive the following code,

var object = { method() { } };

currently, we use defineProperty to define "method" function for "object".
This patch replaces it with the ordinary put_by_id_direct / put_by_val_direct
because the following 2 conditions are met.

  1. While methods in classes have special attributes ({configurable: true, writable: true, enumerable: false}), the attributes of methods in object literals is just the same to the other normal properties ({configurable: true, writable: true, enumerable: true}). This means that we can use the usual put_by_id_direct / put_by_val_direct to define method properties for object literals.
  1. Furthermore, all the own properties that can reside in objects created by object literals have {configurable: true}. So there is no need to check conflict by defineProperty. Always overwriting is OK.

let name = 'method';
var object = { get [name]() { }, method() { } };
Latter method wins.

On the other hand, in class syntax, conflict check is necessary since "prototype" own property is defined as {configurable: false}.

class Hello { static prototype() { } } Should throw error by defineProperty's check.

This means that conflict check done in defneProperty is not necessary for object literals' properties.

  • bytecompiler/NodesCodegen.cpp:

(JSC::PropertyListNode::emitPutConstantProperty):

10:36 AM Changeset in webkit [206081] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebInspectorUI

Uncaught Exception: null is not an object (evaluating 'this.listItemElement.classList')
https://bugs.webkit.org/show_bug.cgi?id=162123
<rdar://problem/28352900>

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2016-09-18
Reviewed by Matt Baker.

  • UserInterface/Views/DOMTreeElement.js:

(WebInspector.DOMTreeElement.prototype.onexpand):
If not attached yet, don't update title. We will update title
when attaching, so this avoids work and avoids doing that
work when the tree element is not fully setup.

(WebInspector.DOMTreeElement.prototype._startEditing):
(WebInspector.DOMTreeElement.prototype._nodeTitleInfo):
(WebInspector.DOMTreeElement.prototype._nodePseudoClassesDidChange):
Switch to the public name instead of the private name.

8:10 AM Changeset in webkit [206080] by Gustavo Noronha Silva
  • 9 edits in trunk/Source/WebKit2

[GTK] Stop using glReadPixels() to blit AC surfaces in the UIProcess under Wayland
https://bugs.webkit.org/show_bug.cgi?id=161530

Reviewed by Carlos Garcia Campos.

Use gdk_cairo_draw_from_gl when all necessary conditions exist.

  • Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp:

(WebKit::ThreadedCompositor::create): take TextureMapper::PaintFlags as optional argument.
(WebKit::ThreadedCompositor::ThreadedCompositor): ditto.
(WebKit::ThreadedCompositor::renderLayerTree): relay paint flags to TextureMapper::beginPaint.

  • Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.h:
  • UIProcess/gtk/AcceleratedBackingStoreWayland.cpp:

(WebKit::AcceleratedBackingStoreWayland::paint): use the faster gdk_cairo_draw_from_gl when a new
enough GTK+ is in use.

  • WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.cpp:

(WebKit::ThreadedCoordinatedLayerTreeHost::ThreadedCoordinatedLayerTreeHost): create compositor
with PaintingMirrored flag if we have recent GTK+ and are running under Wayland.

  • WebProcess/WebPage/gtk/AcceleratedSurfaceX11.h: implement shouldPaintMirrored by always

returning false.

  • WebProcess/WebPage/gtk/AcceleratedSurfaceWayland.h: implement shouldPaintMirrored by always

returning true.

  • WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp:

(WebKit::LayerTreeHostGtk::compositeLayersToContext): pass PaintingMirror flag to TextureMapper
when under a recent enough GTK+ and Wayland.

7:03 AM Changeset in webkit [206079] by Michael Catanzaro
  • 2 edits in trunk/Source/WebCore/platform/gtk/po

[GTK] [l10n] Updated Ukrainian translation of WebKitGTK+
https://bugs.webkit.org/show_bug.cgi?id=162136

Patch by Yuri Chornoivan <yurchor@ukr.net> on 2016-09-18
Rubber-stamped by Michael Catanzaro.

  • uk.po:
6:47 AM Changeset in webkit [206078] by Gyuyoung Kim
  • 4 edits in trunk

[EFL] Bump efl library to 1.18.1
https://bugs.webkit.org/show_bug.cgi?id=162120

Patch by Gyuyoung Kim <gyuyoung.kim@navercorp.com> on 2016-09-18
Reviewed by Michael Catanzaro.

.:

  • Source/cmake/OptionsEfl.cmake: Use efl-1.18.1 instead of 1.18.

Tools:

  • efl/jhbuild.modules: Use efl-1.18.1 instead of 1.18.
6:13 AM Changeset in webkit [206077] by Gyuyoung Kim
  • 3 edits in trunk/Tools

[EFL] Adjust EFL coding style to EFL MiniBrowser
https://bugs.webkit.org/show_bug.cgi?id=162119

Reviewed by Michael Catanzaro.

Apply EFL coding style to main.c for MiniBrowser.

  • Use _foo_cb instead of on_foo for callback function
  • Use 3 spaces and use 2 spaces in keywords.

Additionally this patch adds an exception rule that style checker doesn't
check indentation rule in EFL MiniBrowser.

  • MiniBrowser/efl/main.c:

(miniBrowserViewSmartClass):
(window_find_with_ewk_view):
(_tooltip_show):
(window_tooltip_hide):
(window_tooltip_update):
(_mouse_in_cb):
(_mouse_move_cb):
(_mouse_out_cb):
(_mouse_wheel_cb):
(_window_resize_cb):
(update_view_favicon):
(_icon_changed_cb):
(window_free):
(window_close):
(search_icon_show):
(search_box_show):
(search_box_hide):
(history_list_hide):
(save_page_contents_callback):
(script_execute_callback):
(toggle_window_fullscreen):
(_key_down_cb):
(_mouse_down_cb):
(_title_changed_cb):
(_url_changed_cb):
(_back_forward_list_changed_cb):
(_progress_cb):
(_error_cb):
(_download_request_cb):
(close_file_picker):
(_filepicker_parent_deletion_cb):
(_filepicker_deletion_cb):
(_fileselector_done_cb):
(_file_chooser_request_cb):
(_download_finished_cb):
(_download_failed_cb):
(_color_changed_cb):
(_color_item_selected_cb):
(_color_picker_ok_clicked_cb):
(_color_picker_cancel_clicked_cb):
(_color_picker_dismiss_cb):
(_color_picker_request_cb):
(_url_bar_activated_cb):
(_url_bar_clicked_cb):
(_search_field_aborted_cb):
(_search_field_activated_cb):
(_search_field_clicked_cb):
(_back_button_clicked_cb):
(_forward_button_clicked_cb):
(_search_backward_button_clicked_cb):
(_search_forward_button_clicked_cb):
(_search_case_option_changed):
(_search_word_start_option_changed_cb):
(_search_close_button_clicked_cb):
(_refresh_button_clicked_cb):
(_stop_button_clicked_cb):
(_list_item_select_cb):
(navigation_button_longpress_process):
(_forward_button_longpress_cb):
(_back_button_longpress_cb):
(_ok_clicked_cb):
(_file_entry_dialog_show):
(_javascript_alert_cb):
(_javascript_confirm_cb):
(_javascript_prompt_cb):
(_javascript_before_unload_confirm_cb):
(_popup_menu_item_clicked_cb):
(popup_menu_populate):
(_popup_menu_show):
(_popup_menu_hide):
(_window_geometry_get):
(_window_geometry_set):
(_fullscreen_accept_cb):
(_fullscreen_deny_cb):
(_fullscreen_enter_cb):
(_fullscreen_exit_cb):
(_window_create_cb):
(_window_close_cb):
(_context_menu_item_selected_cb):
(context_menu_populate):
(_context_menu_show):
(_context_menu_hide):
(auth_popup_close):
(_auth_cancel_cb):
(_auth_ok_cb):
(_authentication_request_cb):
(_search_text_found_cb):
(_tooltip_text_set):
(_tooltip_text_unset):
(_navigation_policy_decision_cb):
(_home_button_clicked_cb):
(_window_deletion_cb):
(create_toolbar_button):
(window_create):
(configuration):
(parse_cookies_policy):
(parse_window_size):
(elm_main):
(on_tooltip_show): Deleted.
(on_mouse_in): Deleted.
(on_mouse_move): Deleted.
(on_mouse_out): Deleted.
(on_mouse_wheel): Deleted.
(on_window_resize): Deleted.
(on_icon_changed_cb): Deleted.
(on_key_down): Deleted.
(on_mouse_down): Deleted.
(on_title_changed): Deleted.
(on_url_changed): Deleted.
(on_back_forward_list_changed): Deleted.
(on_progress): Deleted.
(on_error): Deleted.
(on_download_request): Deleted.
(on_filepicker_parent_deletion): Deleted.
(on_filepicker_deletion): Deleted.
(on_fileselector_done): Deleted.
(on_file_chooser_request): Deleted.
(on_download_finished): Deleted.
(on_download_failed): Deleted.
(on_color_changed): Deleted.
(on_color_item_selected): Deleted.
(on_color_picker_ok_clicked): Deleted.
(on_color_picker_cancel_clicked): Deleted.
(on_color_picker_dismiss): Deleted.
(on_color_picker_request): Deleted.
(on_url_bar_activated): Deleted.
(on_url_bar_clicked): Deleted.
(on_search_field_aborted): Deleted.
(on_search_field_activated): Deleted.
(on_search_field_clicked): Deleted.
(on_back_button_clicked): Deleted.
(on_forward_button_clicked): Deleted.
(on_search_backward_button_clicked): Deleted.
(on_search_forward_button_clicked): Deleted.
(on_search_case_option_changed): Deleted.
(on_search_word_start_option_changed): Deleted.
(on_search_close_button_clicked): Deleted.
(on_refresh_button_clicked): Deleted.
(on_stop_button_clicked): Deleted.
(on_list_item_select): Deleted.
(on_forward_button_longpress): Deleted.
(on_back_button_longpress): Deleted.
(on_ok_clicked): Deleted.
(show_file_entry_dialog): Deleted.
(on_javascript_alert): Deleted.
(on_javascript_confirm): Deleted.
(on_javascript_prompt): Deleted.
(on_javascript_before_unload_confirm): Deleted.
(on_popup_menu_item_clicked): Deleted.
(on_popup_menu_show): Deleted.
(on_popup_menu_hide): Deleted.
(on_window_geometry_get): Deleted.
(on_window_geometry_set): Deleted.
(on_fullscreen_accept): Deleted.
(on_fullscreen_deny): Deleted.
(on_fullscreen_enter): Deleted.
(on_fullscreen_exit): Deleted.
(on_window_create): Deleted.
(on_window_close): Deleted.
(context_menu_item_selected_cb): Deleted.
(on_context_menu_show): Deleted.
(on_context_menu_hide): Deleted.
(on_auth_cancel): Deleted.
(on_auth_ok): Deleted.
(on_authentication_request): Deleted.
(on_search_text_found): Deleted.
(on_tooltip_text_set): Deleted.
(on_tooltip_text_unset): Deleted.
(on_navigation_policy_decision): Deleted.
(on_home_button_clicked): Deleted.
(on_window_deletion): Deleted.

  • Scripts/webkitpy/style/checker.py:
1:01 AM Changeset in webkit [206076] by achristensen@apple.com
  • 4 edits in trunk/Source/WebCore

Remove unnecessary String allocations in URLParser
https://bugs.webkit.org/show_bug.cgi?id=162089

Reviewed by Chris Dumez.

No change in behavior except a performance improvement.

  • platform/URL.cpp:

(WebCore::assertProtocolIsGood):
(WebCore::URL::protocolIs):
(WebCore::protocolIs):

  • platform/URL.h:

Added a new protocolIs for non-null-terminated strings from user input.

  • platform/URLParser.cpp:

(WebCore::URLParser::parse):
Don't make a String to compare protocols.

Sep 17, 2016:

10:38 PM Changeset in webkit [206075] by achristensen@apple.com
  • 2 edits in trunk/Source/WebCore

Inline functions in URLParser
https://bugs.webkit.org/show_bug.cgi?id=162106

Reviewed by Antti Koivisto.

No change in behavior. Just make URLParser faster.

  • platform/URLParser.cpp:

(WebCore::isC0Control):
(WebCore::isC0ControlOrSpace):
(WebCore::isTabOrNewline):
(WebCore::isInSimpleEncodeSet):
(WebCore::isInDefaultEncodeSet):
(WebCore::isInUserInfoEncodeSet):
(WebCore::isInvalidDomainCharacter):
(WebCore::isPercentOrNonASCII):
(WebCore::isSlashQuestionOrHash):
(WebCore::isWindowsDriveLetter):
(WebCore::shouldCopyFileURL):
(WebCore::percentEncode):
(WebCore::utf8PercentEncode):
(WebCore::utf8PercentEncodeQuery):
(WebCore::encodeQuery):
(WebCore::isDefaultPort):
(WebCore::isSpecialScheme):
(WebCore::copyASCIIStringUntil):
(WebCore::isPercentEncodedDot):
(WebCore::isSingleDotPathSegment):
(WebCore::isDoubleDotPathSegment):
(WebCore::consumeSingleDotPathSegment):
(WebCore::consumeDoubleDotPathSegment):
(WebCore::serializeIPv4):
(WebCore::zeroSequenceLength):
(WebCore::findLongestZeroSequence):
(WebCore::serializeIPv6Piece):
(WebCore::serializeIPv6):
(WebCore::parseIPv4Number):
(WebCore::pow256):
(WebCore::parseIPv4Host):
(WebCore::parseIPv6Host):
(WebCore::percentDecode):
(WebCore::containsOnlyASCII):
(WebCore::domainToASCII):
(WebCore::hasInvalidDomainCharacter):
(WebCore::formURLDecode):
(WebCore::serializeURLEncodedForm):

4:14 AM Changeset in webkit [206074] by ddkilzer@apple.com
  • 2 edits in trunk/Source/WebCore

MainThreadBridge needs an isolatedCopy() of SecurityOrigin
<https://webkit.org/b/162116>
<rdar://problem/27525870>

Reviewed by Carlos Garcia Campos.

Covered by existing tests.

  • loader/WorkerThreadableLoader.cpp:

(WebCore::WorkerThreadableLoader::MainThreadBridge::MainThreadBridge):
Make an isolatedCopy() of SecurityOrigin here since that's the
correct idiom to use when the object is passed from a worker
thread back to the main thread. Fix suggested by Daniel Bates.

3:53 AM Changeset in webkit [206073] by Carlos Garcia Campos
  • 5 edits in releases/WebKitGTK/webkit-2.14/Source/WebCore

Merge r206019 - [TextureMapper] Scrolling through 01.org/dleyna crashes WebKitWebProcess
https://bugs.webkit.org/show_bug.cgi?id=162020

Reviewed by Žan Doberšek.

The problem is that we are trying to clone a ReferenceFilterOperation, which is not expected to be cloned, from
FilterAnimationValue copy constructor, and FilterOperations are never expected to be nullptr, so we end up
crashing. We just need to validate the filters before setting then and before creating a TextureMapperAnimation
for them.

  • platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:

(WebCore::GraphicsLayerTextureMapper::filtersCanBeComposited): Return false if there are reference filters or no
filters at all. I don't know if we really support other filters, but at least we won't crash for the others.
(WebCore::GraphicsLayerTextureMapper::addAnimation): Check if filters can be composited before creating a
TextureMapperAnimation.
(WebCore::GraphicsLayerTextureMapper::setFilters): Check if filters can be composited before setting them.

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

(WebCore::CoordinatedGraphicsLayer::filtersCanBeComposited): Return false if there are reference filters or no
filters at all. I don't know if we really support other filters, but at least we won't crash for the others.
(WebCore::CoordinatedGraphicsLayer::setFilters): Check if filters can be composited before setting them.
(WebCore::CoordinatedGraphicsLayer::addAnimation): Check if filters can be composited before creating a
TextureMapperAnimation.

  • platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h:
3:52 AM Changeset in webkit [206072] by Carlos Garcia Campos
  • 3 edits in releases/WebKitGTK/webkit-2.14/Source/WebKit2

Merge r206067 - [GTK] Move the rendering of auth dialog shadow to the auth dialog widget
https://bugs.webkit.org/show_bug.cgi?id=162061

Reviewed by Michael Catanzaro.

Instead of rendering the shadow in the web view, we can let the auth dialog do it. This fixes the rendering of
the shadow in Wayland when using gdk_cairo_draw_from_gl().

  • UIProcess/API/gtk/WebKitAuthenticationDialog.cpp:

(webkitAuthenticationDialogDraw): Draw the shadow before rendering the child.
(webkitAuthenticationDialogSizeAllocate): Center the child on the allocated space.
(webkit_authentication_dialog_class_init): Add size_allocate implementation.

  • UIProcess/API/gtk/WebKitWebViewBase.cpp:

(webkitWebViewBaseDraw): Do not draw the shadow when auth dialog is present.
(webkitWebViewBaseSizeAllocate): Give the whole web view allocation to the auth dialog.

3:51 AM Changeset in webkit [206071] by Carlos Garcia Campos
  • 2 edits in releases/WebKitGTK/webkit-2.14/Source/WebKit2

Merge r206066 - [ThreadedCompositor] Scrolling artifacts on accelerated subframes
https://bugs.webkit.org/show_bug.cgi?id=149060

Reviewed by Michael Catanzaro.

The problem is that we are scrolling the main frame even when scrolling is not delegated.

  • WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.cpp:

(WebKit::ThreadedCoordinatedLayerTreeHost::scrollNonCompositedContents): Return early if main frame view doesn't
delegate scrolling.

3:50 AM Changeset in webkit [206070] by Carlos Garcia Campos
  • 2 edits in releases/WebKitGTK/webkit-2.14/Source/WebKit2

Merge r206045 - [GTK] Surface created for glReadPixels path on Wayland is bigger than needed
https://bugs.webkit.org/show_bug.cgi?id=162025

Reviewed by Carlos Garcia Campos.

  • UIProcess/gtk/AcceleratedBackingStoreWayland.cpp:

(WebKit::AcceleratedBackingStoreWayland::paint): the texture created by the Wayland
compositor is already scaled, so scaling its size when creating the surface causes it
to end up bigger than necessary.

3:48 AM Changeset in webkit [206069] by Carlos Garcia Campos
  • 2 edits in releases/WebKitGTK/webkit-2.14/Source/JavaScriptCore

Merge r205998 - REGRESSION (r205462): Lot of leaks
https://bugs.webkit.org/show_bug.cgi?id=161946

Reviewed by Saam Barati.

We were forgetting to delete LargeAllocations on VM exit!

  • heap/MarkedSpace.cpp:

(JSC::MarkedSpace::~MarkedSpace):

3:47 AM Changeset in webkit [206068] by Carlos Garcia Campos
  • 2 edits in releases/WebKitGTK/webkit-2.14

Merge r206020 - [CMake] Build broken with current debian testing
https://bugs.webkit.org/show_bug.cgi?id=162054

Reviewed by Žan Doberšek.

Building WTR bindings is broken now in Debian testing. The reason is that '.' is no longer included in @INC for
perl, see https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=588017 and
https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2016-1238.

  • Source/cmake/WebKitMacros.cmake(GENERATE_BINDINGS): Pass also the given BASE_DIR to perl executable so that it

can find modules in the current directory even if '.' is not in @INC. Also include generators in BASE_DIR to the
list of dependencies.

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

[GTK] Move the rendering of auth dialog shadow to the auth dialog widget
https://bugs.webkit.org/show_bug.cgi?id=162061

Reviewed by Michael Catanzaro.

Instead of rendering the shadow in the web view, we can let the auth dialog do it. This fixes the rendering of
the shadow in Wayland when using gdk_cairo_draw_from_gl().

  • UIProcess/API/gtk/WebKitAuthenticationDialog.cpp:

(webkitAuthenticationDialogDraw): Draw the shadow before rendering the child.
(webkitAuthenticationDialogSizeAllocate): Center the child on the allocated space.
(webkit_authentication_dialog_class_init): Add size_allocate implementation.

  • UIProcess/API/gtk/WebKitWebViewBase.cpp:

(webkitWebViewBaseDraw): Do not draw the shadow when auth dialog is present.
(webkitWebViewBaseSizeAllocate): Give the whole web view allocation to the auth dialog.

1:32 AM Changeset in webkit [206066] by Carlos Garcia Campos
  • 2 edits in trunk/Source/WebKit2

[ThreadedCompositor] Scrolling artifacts on accelerated subframes
https://bugs.webkit.org/show_bug.cgi?id=149060

Reviewed by Michael Catanzaro.

The problem is that we are scrolling the main frame even when scrolling is not delegated.

  • WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.cpp:

(WebKit::ThreadedCoordinatedLayerTreeHost::scrollNonCompositedContents): Return early if main frame view doesn't
delegate scrolling.

Sep 16, 2016:

11:32 PM Changeset in webkit [206065] by Yusuke Suzuki
  • 48 edits
    4 adds in trunk

[DFG] Introduce IsCellWithType node and unify IsJSArray, IsRegExpObject and newly added IsProxyObject
https://bugs.webkit.org/show_bug.cgi?id=162000

Reviewed by Filip Pizlo.

JSTests:

  • microbenchmarks/is-array-for-array.js: Added.

(isArray):

  • microbenchmarks/is-array-for-mixed-case.js: Added.

(isArray):

  • microbenchmarks/is-array-for-non-array-object.js: Added.

(isArray):

  • microbenchmarks/is-array-for-proxy.js: Added.

(isArray):
(isArray.proxy.throw.new.Error.isArray):
(isArray.proxy.throw.new.Error):

Source/JavaScriptCore:

Sampling profiler tells that ES6SampleBench/Basic frequently calls Array.isArray(). This function is introduced in
ES5 and it is well-used to distinguish Array from the other objects. Moreover, this function is used in Array.prototype.xxx
methods as @isArray. So it's worth optimizing.

The difference between Array.isArray and @isJSArray is that Array.isArray need to consider about ProxyObject while
@isJSArray builtin intrinsic does not. So in this patch, we leverage the existing @isJSArray to implement Array.isArray.
Array.isArray is written in builtin JS code using @isJSArray and newly added @isProxyObject(). That allow us to inline
Array.isArray() code and the inlined code uses existing DFG nodes well.

Another problem is RuntimeArray and ArrayPrototype. They inherit JSArray and their JSType is ObjectType. But Array.isArray need
to return true for those types. While optimizing type checking in generic way by type display is nice, RuntimeArray and
ArrayPrototype are a bit tricky and it is super rare that these functions are passed to Array.isArray(). So instead of introducing
type display in this patch, we just introduce a new JSType, DerivedArrayType and use it in the above 2 use classes. Since
Array.isArray is specially handled in the spec (while we don't have any Date.isDate() like functions, only Array.isArray
is specified in the spec because we frequently want to distinguish Arrays from other Objects), optimizing Array.isArray specially
by introducing special DerivedArrayType is reasonable.

In LLInt level, we add a new opcode, op_is_proxy_object and op_is_derived_array. This works similar to op_is_jsarray.
And we also perform LLInt code cleanup by introducing a macro isCellWithType.

In baseline, we perform some clean up for op_is_proxy_object etc. Now duplicate code is reduced.

In DFG, we unify IsJSArray, IsRegExpObject, IsProxyObject, and IsDerivedArray into one IsCellWithType node. And we clean up
some AI code related to IsJSArray and IsRegExpObject since SpeculatedType now recognizes ProxyObject. IsJSArray and IsRegExpObject
does not do anything special for proxy objects.

The above change simplify things to create a new IsXXX DFG handling and paves the way for optimizing @isMap & @isSet in DFG.
Furthermore, introducing @isProxyObject() is nice for the first step to optimize ProxyObject handling.

Here is microbenchmark result. We can see stable performance improvement (Even if we use Proxies!).

baseline patched

is-array-for-array 2.5156+-0.0288 2.0668+-0.0285 definitely 1.2171x faster
is-array-for-mixed-case 4.7787+-0.0755 4.4722+-0.0789 definitely 1.0686x faster
is-array-for-non-array-object 2.3596+-0.0368 1.8178+-0.0262 definitely 1.2980x faster
is-array-for-proxy 4.0469+-0.0437 3.3845+-0.0404 definitely 1.1957x faster

And ES6SampleBench/Basic reports 5.2% perf improvement. And now sampling result in ES6SampleBench/Basic does not pose Array.isArray.

Benchmark First Iteration Worst 2% Steady State
baseline:Basic 28.59 ms +- 1.03 ms 15.08 ms +- 0.28 ms 1656.96 ms +- 18.02 ms
patched:Basic 27.82 ms +- 0.44 ms 14.59 ms +- 0.16 ms 1574.65 ms +- 8.44 ms

  • builtins/ArrayConstructor.js:

(isArray):
(from): Deleted.

  • builtins/BuiltinNames.h:
  • bytecode/BytecodeIntrinsicRegistry.h:
  • bytecode/BytecodeList.json:
  • bytecode/BytecodeUseDef.h:

(JSC::computeUsesForBytecodeOffset):
(JSC::computeDefsForBytecodeOffset):

  • bytecode/CodeBlock.cpp:

(JSC::CodeBlock::dumpBytecode):

  • bytecode/SpeculatedType.cpp:

(JSC::dumpSpeculation):
(JSC::speculationFromClassInfo):
(JSC::speculationFromStructure):

  • bytecode/SpeculatedType.h:

(JSC::isProxyObjectSpeculation):
(JSC::isDerivedArraySpeculation):

  • bytecompiler/BytecodeGenerator.h:

(JSC::BytecodeGenerator::emitIsProxyObject):
(JSC::BytecodeGenerator::emitIsDerivedArray):
(JSC::BytecodeGenerator::emitIsJSArray): Deleted.

  • bytecompiler/NodesCodegen.cpp:

(JSC::BytecodeIntrinsicNode::emit_intrinsic_isProxyObject):
(JSC::BytecodeIntrinsicNode::emit_intrinsic_isDerivedArray):

  • dfg/DFGAbstractInterpreterInlines.h:

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

  • dfg/DFGByteCodeParser.cpp:

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

  • dfg/DFGCapabilities.cpp:

(JSC::DFG::capabilityLevel):

  • dfg/DFGClobberize.h:

(JSC::DFG::clobberize):

  • dfg/DFGDoesGC.cpp:

(JSC::DFG::doesGC):

  • dfg/DFGFixupPhase.cpp:

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

  • dfg/DFGGraph.cpp:

(JSC::DFG::Graph::dump):

  • dfg/DFGNode.h:

(JSC::DFG::Node::hasQueriedType):
(JSC::DFG::Node::queriedType):
(JSC::DFG::Node::hasSpeculatedTypeForQuery):
(JSC::DFG::Node::speculatedTypeForQuery):
(JSC::DFG::Node::shouldSpeculateProxyObject):
(JSC::DFG::Node::shouldSpeculateDerivedArray):
(JSC::DFG::Node::loadVarargsData): Deleted.
(JSC::DFG::Node::shouldSpeculateArray): Deleted.

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

(JSC::DFG::SafeToExecuteEdge::operator()):
(JSC::DFG::safeToExecute):

  • dfg/DFGSpeculativeJIT.cpp:

(JSC::DFG::SpeculativeJIT::compileIsCellWithType):
(JSC::DFG::SpeculativeJIT::speculateProxyObject):
(JSC::DFG::SpeculativeJIT::speculateDerivedArray):
(JSC::DFG::SpeculativeJIT::speculate):
(JSC::DFG::SpeculativeJIT::compileIsJSArray): Deleted.
(JSC::DFG::SpeculativeJIT::compileIsRegExpObject): Deleted.

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

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

  • dfg/DFGSpeculativeJIT64.cpp:

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

  • dfg/DFGUseKind.cpp:

(WTF::printInternal):

  • dfg/DFGUseKind.h:

(JSC::DFG::typeFilterFor):
(JSC::DFG::isCell):

  • ftl/FTLCapabilities.cpp:

(JSC::FTL::canCompile):

  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::compileNode):
(JSC::FTL::DFG::LowerDFGToB3::compileIsCellWithType):
(JSC::FTL::DFG::LowerDFGToB3::speculate):
(JSC::FTL::DFG::LowerDFGToB3::isCellWithType):
(JSC::FTL::DFG::LowerDFGToB3::speculateProxyObject):
(JSC::FTL::DFG::LowerDFGToB3::speculateDerivedArray):
(JSC::FTL::DFG::LowerDFGToB3::compileIsJSArray): Deleted.
(JSC::FTL::DFG::LowerDFGToB3::compileIsRegExpObject): Deleted.
(JSC::FTL::DFG::LowerDFGToB3::isArray): Deleted.
(JSC::FTL::DFG::LowerDFGToB3::isRegExpObject): Deleted.

  • jit/JIT.cpp:

(JSC::JIT::privateCompileMainPass):

  • jit/JIT.h:
  • jit/JITOpcodes.cpp:

(JSC::JIT::emitIsCellWithType):
(JSC::JIT::emit_op_is_string):
(JSC::JIT::emit_op_is_jsarray):
(JSC::JIT::emit_op_is_proxy_object):
(JSC::JIT::emit_op_is_derived_array):

  • jit/JITOpcodes32_64.cpp:

(JSC::JIT::emitIsCellWithType):
(JSC::JIT::emit_op_is_string):
(JSC::JIT::emit_op_is_jsarray):
(JSC::JIT::emit_op_is_proxy_object):
(JSC::JIT::emit_op_is_derived_array):

  • jsc.cpp:

(WTF::RuntimeArray::createStructure):

  • llint/LLIntData.cpp:

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

  • llint/LowLevelInterpreter.asm:
  • llint/LowLevelInterpreter32_64.asm:
  • llint/LowLevelInterpreter64.asm:
  • runtime/ArrayConstructor.cpp:

(JSC::ArrayConstructor::finishCreation):
(JSC::isArraySlowInline):
(JSC::isArraySlow):
(JSC::arrayConstructorPrivateFuncIsArraySlow):
(JSC::arrayConstructorIsArray): Deleted.

  • runtime/ArrayConstructor.h:

(JSC::isArray):

  • runtime/ArrayPrototype.h:

(JSC::ArrayPrototype::createStructure):

  • runtime/JSArray.h:

(JSC::JSArray::finishCreation):

  • runtime/JSGlobalObject.cpp:

(JSC::JSGlobalObject::init):

  • runtime/JSType.h:

Source/WebCore:

  • bridge/runtime_array.h:

(JSC::RuntimeArray::createStructure):

10:18 PM Changeset in webkit [206064] by Yusuke Suzuki
  • 2 edits in trunk/JSTests

Unreviewed, gardening test262 results

Some tests are now passed with JSC, but marked as failed.

  • test262.yaml:
8:53 PM Changeset in webkit [206063] by Joseph Pecoraro
  • 3 edits
    1 add in trunk/LayoutTests

Unreviewed cleanup of some inspector tests.

Start skipping some debugger stepping test flakeyness on
Debug builds until that bug is addressed.

  • inspector/debugger/break-on-exception-throw-in-promise.html:

Remove debug only.

  • inspector/debugger/paused-scopes.html: Added.

This test was missing for 3 months. Its expectations got added
but the test itself got lost after a rollout and re-land.

8:18 PM Changeset in webkit [206062] by Chris Dumez
  • 4 edits
    6 adds in trunk

Cancelling one frame's load cancels load in other frames that have the same URL as well
https://bugs.webkit.org/show_bug.cgi?id=162094

Reviewed by Antti Koivisto.

Source/WebCore:

Cancelling one frame's load cancels load in other frames that have the same URL as well.

So if you have several frames that are loading URL X and you navigate one of the frames
to Y, then the load of X will be cancelled and this frame will navigate to Y. All other
frames will not load URL X even though they should.

The issue is that all the DocumentLoaders share the same CachedResource because of the
memoryCache. When we call DocumentLoader::stopLoading(), it will cancel the
CachedResource's load even though there are several clients for this CachedResource
and other clients still want the load.

The approach chosen in this patch is to not reuse CachedResources that are still
loading when trying to load a main resource. This is not the most efficient approach.
I still chose this approach because:

  • It is very unlikely to introduce new bugs.
  • The change is very simple.
  • This is a corner case (several iframes having the same URL and cancelling the load in one of them).

Test: http/tests/navigation/frames-same-url-cancel-load.html

  • loader/cache/CachedResourceLoader.cpp:

(WebCore::CachedResourceLoader::determineRevalidationPolicy):

LayoutTests:

Add layout test coverage.

  • http/tests/cache/iframe-detach-expected.txt: Added.
  • http/tests/cache/iframe-detach.html: Added.
  • http/tests/cache/resources/slow-iframe.php: Added.

Import Alex Christensen's test from Bug 157563.

  • http/tests/navigation/frames-same-url-cancel-load-expected.txt: Added.
  • http/tests/navigation/frames-same-url-cancel-load.html: Added.
  • http/tests/navigation/resources/success.html: Added.
  • http/tests/security/XFrameOptions/x-frame-options-deny-multiple-clients-expected.txt:
7:53 PM Changeset in webkit [206061] by Michael Catanzaro
  • 2 edits in trunk/Source/WebCore

ASSERTION FAILED: The string being removed is atomic in the string table of an other thread! iterator != atomicStringTable.end() at Source/WTF/wtf/text/AtomicStringImpl.cpp(453)
https://bugs.webkit.org/show_bug.cgi?id=161800

Reviewed by Žan Doberšek.

Speculative fix. These strings are created as static objects on a secondary thread, but all
static objects are destroyed in exit handlers on the main thread, and AtomicStrings must
always be destroyed on the same thread they are created.

  • platform/graphics/texmap/TextureMapperShaderProgram.h:
7:39 PM Changeset in webkit [206060] by commit-queue@webkit.org
  • 3 edits in trunk/Source/WebCore

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

broke 32bit ARM build (Requested by anttik on #webkit).

Reverted changeset:

"Add size assert for RenderElement"
https://bugs.webkit.org/show_bug.cgi?id=162096
http://trac.webkit.org/changeset/206055

7:14 PM Changeset in webkit [206059] by Joseph Pecoraro
  • 6 edits
    6 adds in trunk

Web Inspector: Implement Copy CSS Selector and Copy Xpath Selector context menus
https://bugs.webkit.org/show_bug.cgi?id=158881
<rdar://problem/8181156>

Reviewed by Matt Baker.

Source/WebInspectorUI:

This is based off of the Blink implementation (DOMPresentationUtils)
with some minor modifications and using our own utility methods.

  • Localizations/en.lproj/localizedStrings.js:

New context menu strings.

  • UserInterface/Base/DOMUtilities.js:

(WebInspector.cssPath):
(WebInspector.cssPathComponent.classNames):
(WebInspector.cssPathComponent):
(WebInspector.xpath):
(WebInspector.xpathIndex.isSimiliarNode):
(WebInspector.xpathIndex):
Build strings for a CSS selector path or XPath path to a node.

  • UserInterface/Views/DOMTreeElement.js:

(WebInspector.DOMTreeElement.prototype._populateNodeContextMenu):

  • UserInterface/Views/DOMTreeOutline.js:

(WebInspector.DOMTreeOutline.prototype.populateContextMenu):
Include copy path context menu items on nodes.
Pseudo elements do not get Copy XPath.
Non-node elements do not get Copy Selector Path.

LayoutTests:

  • inspector/dom/domutilities-csspath-expected.txt: Added.
  • inspector/dom/domutilities-csspath.html: Added.
  • inspector/dom/domutilities-path-dump-expected.txt: Added.
  • inspector/dom/domutilities-path-dump.html: Added.
  • inspector/dom/domutilities-xpath-expected.txt: Added.
  • inspector/dom/domutilities-xpath.html: Added.
5:43 PM Changeset in webkit [206058] by bshafiei@apple.com
  • 1 copy in tags/Safari-602.2.9

New tag.

5:41 PM Changeset in webkit [206057] by Nikita Vasilyev
  • 7 edits in trunk/Source/WebInspectorUI

Web Inspector: Make console session dividers more pronounced
https://bugs.webkit.org/show_bug.cgi?id=161938
<rdar://problem/28291166>

Reviewed by Brian Burg.

Instead of using a dim dashed line as a console session separator, include time and reason why
the new session started, which could be one of the following values:

  • Console opened (for the first time)
  • Console cleared
  • Page reloaded
  • Page navigated
  • Localizations/en.lproj/localizedStrings.js:
  • UserInterface/Controllers/JavaScriptLogViewController.js:

(WebInspector.JavaScriptLogViewController.prototype.clear):
(WebInspector.JavaScriptLogViewController.prototype.startNewSession):
Remove previous session if it doesn't have any messages.

  • UserInterface/Controllers/LogManager.js:

(WebInspector.LogManager.prototype._mainResourceDidChange):
(WebInspector.LogManager):
Session separator wasn't appended when navigating to a different web page. Always dispatch
SessionStarted events when the main resource changes. Distinguish between reload and navigation.

  • UserInterface/Views/ConsoleSession.js:

(WebInspector.ConsoleSession):
(WebInspector.ConsoleSession.prototype.addMessageView):
(WebInspector.ConsoleSession.prototype.append):
(WebInspector.ConsoleSession.prototype.hasMessages):

  • UserInterface/Views/LogContentView.css:

(.console-session-header):
(.console-session:first-of-type .console-session-header):
(.console-session:not(:first-of-type)):
(.console-session:not(:first-of-type) .console-session-header):

  • UserInterface/Views/LogContentView.js:

(WebInspector.LogContentView.prototype._sessionStarted):

5:14 PM Changeset in webkit [206056] by Brent Fulgham
  • 3 edits
    1 add in trunk/Source/WebCore

[Win][Direct2D] Provide Color support for Direct2D
https://bugs.webkit.org/show_bug.cgi?id=162090

Reviewed by Dean Jackson.

Add casting operations to the Color class to allow easy interoption with
native Direct2D operations.

No new tests. No change in behavior.

  • PlatformWin.cmake: Add new Windows implementation file.
  • platform/graphics/Color.h:
  • platform/graphics/win/ColorDirect2D.cpp: Added.

(WebCore::Color::Color):
(WebCore::Color::operator D2D1_COLOR_F):

4:33 PM Changeset in webkit [206055] by Antti Koivisto
  • 3 edits in trunk/Source/WebCore

Add size assert for RenderElement
https://bugs.webkit.org/show_bug.cgi?id=162096

Reviewed by Simon Fraser.

Also remove the unused m_visibleInViewportState field.

  • rendering/RenderElement.cpp:

(WebCore::RenderElement::unregisterForVisibleInViewportCallback):

  • rendering/RenderElement.h:
3:14 PM Changeset in webkit [206054] by Simon Fraser
  • 3 edits in trunk/Source/WebKit2

WKWebViewConfiguration's _incrementalRenderingSuppressionTimeout should be an NSTimeInterval
https://bugs.webkit.org/show_bug.cgi?id=162092

Reviewed by Anders Carlsson.

The _incrementalRenderingSuppressionTimeout property should be a NSTimeInterval, not a CGFloat.

  • UIProcess/API/Cocoa/WKWebViewConfiguration.mm:

(-[WKWebViewConfiguration _incrementalRenderingSuppressionTimeout]):
(-[WKWebViewConfiguration _setIncrementalRenderingSuppressionTimeout:]):

  • UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h:
2:43 PM Changeset in webkit [206053] by bshafiei@apple.com
  • 23 edits in branches/safari-602-branch/Source

Merge r206006. rdar://problem/27991573

2:43 PM Changeset in webkit [206052] by bshafiei@apple.com
  • 2 edits in branches/safari-602-branch/Source/WebKit2

Merge r206003. rdar://problem/27991573

2:43 PM Changeset in webkit [206051] by bshafiei@apple.com
  • 8 edits in branches/safari-602-branch/Source/WebKit2

Merge r206000. rdar://problem/27991573

2:42 PM Changeset in webkit [206050] by bshafiei@apple.com
  • 9 edits
    2 adds in branches/safari-602-branch

Merge r204916. rdar://problem/27991573

2:39 PM Changeset in webkit [206049] by Antti Koivisto
  • 11 edits in trunk/Source/WebCore

Tighten region style map to use RenderElement instead of RenderObject
https://bugs.webkit.org/show_bug.cgi?id=162064

Reviewed by Zalan Bujtas.

RenderTexts don't have styles of their own so the map can operate on RenderElements.

  • rendering/RenderElement.cpp:

(WebCore::RenderElement::willBeRemovedFromTree):
(WebCore::RenderElement::removeFromRenderFlowThread):
(WebCore::RenderElement::removeFromRenderFlowThreadIncludingDescendants):
(WebCore::RenderElement::invalidateFlowThreadContainingBlockIncludingDescendants):

  • rendering/RenderElement.h:
  • rendering/RenderFlowThread.cpp:

(WebCore::RenderFlowThread::removeFlowChildInfo):

  • rendering/RenderFlowThread.h:
  • rendering/RenderNamedFlowFragment.cpp:

(WebCore::RenderNamedFlowFragment::computeChildrenStyleInRegion):
(WebCore::RenderNamedFlowFragment::setRendererStyleInRegion):
(WebCore::RenderNamedFlowFragment::clearObjectStyleInRegion):
(WebCore::RenderNamedFlowFragment::setRegionObjectsRegionStyle):
(WebCore::RenderNamedFlowFragment::restoreRegionObjectsOriginalStyle):
(WebCore::RenderNamedFlowFragment::setObjectStyleInRegion): Deleted.

  • rendering/RenderNamedFlowFragment.h:
  • rendering/RenderNamedFlowThread.cpp:

(WebCore::RenderNamedFlowThread::clearRenderObjectCustomStyle):
(WebCore::RenderNamedFlowThread::removeFlowChildInfo):

  • rendering/RenderNamedFlowThread.h:
  • rendering/RenderObject.cpp:

(WebCore::RenderObject::willBeRemovedFromTree):
(WebCore::RenderObject::removeFromRenderFlowThread): Deleted.
(WebCore::RenderObject::removeFromRenderFlowThreadIncludingDescendants): Deleted.
(WebCore::RenderObject::invalidateFlowThreadContainingBlockIncludingDescendants): Deleted.

These can now move to RenderElement.

  • rendering/RenderObject.h:
2:20 PM Changeset in webkit [206048] by Brent Fulgham
  • 3 edits in trunk/Source/WebCore

CaptionUserPreferences's use of the PageGroup's page map is incorrect
https://bugs.webkit.org/show_bug.cgi?id=122194
<rdar://problem/27332004>

Reviewed by Zalan Bujtas.

Avoid the possibility of dereferencing an unsafe iterator by checking
for an empty HashSet before using the result of 'begin()'.

No new tests because there is no change in behavior.

  • page/CaptionUserPreferences.cpp:

(WebCore::CaptionUserPreferences::CaptionUserPreferences): Use new safer
accessor to retrieve the current page.
(WebCore::CaptionUserPreferences::setCaptionDisplayMode): Ditto.
(WebCore::CaptionUserPreferences::currentPage): Added.
(WebCore::CaptionUserPreferences::userPrefersCaptions): Use new safer
accessor to retrieve the current page.
(WebCore::CaptionUserPreferences::setUserPrefersCaptions): Ditto.
(WebCore::CaptionUserPreferences::userPrefersSubtitles): Ditto.
(WebCore::CaptionUserPreferences::setUserPrefersSubtitles): Ditto.
(WebCore::CaptionUserPreferences::userPrefersTextDescriptions): Ditto.
(WebCore::CaptionUserPreferences::setUserPrefersTextDescriptions): Ditto.

  • page/CaptionUserPreferences.h:
2:17 PM Changeset in webkit [206047] by Yusuke Suzuki
  • 9 edits in trunk/Source/JavaScriptCore

[DFG] Introduce ArrayUse
https://bugs.webkit.org/show_bug.cgi?id=162063

Reviewed by Keith Miller.

ArrayUse is particularly useful: for IsJSArray.
We can drop IsJSArray in fixup phase by setting ArrayUse edge filter.

Since @isJSArray user is limited (Array.prototype.concat), the effect of this patch is small.
But later, I'll update {@isArray, Array.isArray} to use @isJSArray[1]. In that patch, we are planning
to implement more aggressive optimization like, setting CellUse edge filter to avoid cell check in
SpeculativeJIT::compileIsJSArray.

In the benchmark using Array.prototype.concat, we can see perf improvement since we can drop IsJSArray in fixup phase.

baseline patched

lazy-array-species-watchpoints 25.0911+-0.0516 24.7687+-0.0767 definitely 1.0130x faster

[1]: https://bugs.webkit.org/show_bug.cgi?id=162000

  • dfg/DFGFixupPhase.cpp:

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

  • dfg/DFGSafeToExecute.h:

(JSC::DFG::SafeToExecuteEdge::operator()):

  • dfg/DFGSpeculativeJIT.cpp:

(JSC::DFG::SpeculativeJIT::speculateArray):
(JSC::DFG::SpeculativeJIT::speculate):

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

(WTF::printInternal):

  • dfg/DFGUseKind.h:

(JSC::DFG::typeFilterFor):
(JSC::DFG::isCell):

  • ftl/FTLCapabilities.cpp:

(JSC::FTL::canCompile):

  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::speculate):
(JSC::FTL::DFG::LowerDFGToB3::speculateArray):
(JSC::FTL::DFG::LowerDFGToB3::speculateObject): Deleted.

1:49 PM Changeset in webkit [206046] by commit-queue@webkit.org
  • 3 edits in trunk/Source/WebInspectorUI

Web Inspector: make Object.awaitEvent synchronously add an event listener
https://bugs.webkit.org/show_bug.cgi?id=162066

Reviewed by Brian Burg.

Patch by Devin Rousso <Devin Rousso> on 2016-09-16

  • UserInterface/Base/Object.js:

(WebInspector.Object.awaitEvent):
Utilize a WebInspector.WrappedPromise to not worry about adding the singleFireEventListener
on the next tick due to the promise construction.

  • UserInterface/TestStub.html:

Add WebInspector.WrappedPromise.

1:46 PM Changeset in webkit [206045] by Gustavo Noronha Silva
  • 2 edits in trunk/Source/WebKit2

[GTK] Surface created for glReadPixels path on Wayland is bigger than needed
https://bugs.webkit.org/show_bug.cgi?id=162025

Reviewed by Carlos Garcia Campos.

  • UIProcess/gtk/AcceleratedBackingStoreWayland.cpp:

(WebKit::AcceleratedBackingStoreWayland::paint): the texture created by the Wayland
compositor is already scaled, so scaling its size when creating the surface causes it
to end up bigger than necessary.

1:35 PM Changeset in webkit [206044] by achristensen@apple.com
  • 3 edits in trunk/Source/WebCore

Use Vector<LChar> instead of StringBuilder for the ASCII parts of URLParser
https://bugs.webkit.org/show_bug.cgi?id=162035

Reviewed by Chris Dumez.

StringBuilder::append checks to see whether its StringBuffer is 8-bit or 16-bit each time it is called.
When parsing URLs, almost all of the parsed URL is guaranteed to be 8-bit ASCII.
Using a Vector<LChar> for this allows us to use uncheckedAppend in some places, and it always eliminates the 8-bit check.
This is a ~20% speedup in url parsing.

Covered by existing API tests.

  • platform/URLParser.cpp:

(WebCore::isWindowsDriveLetter):
(WebCore::percentEncode):
(WebCore::utf8PercentEncode):
(WebCore::utf8PercentEncodeQuery):
(WebCore::encodeQuery):
(WebCore::URLParser::copyURLPartsUntil):
(WebCore::URLParser::popPath):
(WebCore::URLParser::parse):
(WebCore::URLParser::parseAuthority):
(WebCore::appendNumber):
(WebCore::serializeIPv4):
(WebCore::serializeIPv6Piece):
(WebCore::serializeIPv6):
(WebCore::URLParser::parsePort):
(WebCore::URLParser::parseHost):
(WebCore::serializeURLEncodedForm):
(WebCore::URLParser::serialize):
(WebCore::bufferView): Deleted.

  • platform/URLParser.h:
1:24 PM Changeset in webkit [206043] by hyatt@apple.com
  • 23 edits in trunk

[CSS Parser] Get CSSPropertyParserHelpers.cpp compiling
https://bugs.webkit.org/show_bug.cgi?id=162078

Reviewed by Dean Jackson.

Source/WebCore:

  • css/CSSCalculationValue.cpp:

(WebCore::hasDoubleValue):
(WebCore::checkDepthAndIndex):
(WebCore::CSSCalcExpressionNodeParser::parseCalc):
(WebCore::CSSCalcExpressionNodeParser::operatorValue):
(WebCore::CSSCalcExpressionNodeParser::parseValue):
(WebCore::CSSCalcExpressionNodeParser::parseValueTerm):
(WebCore::CSSCalcExpressionNodeParser::parseValueMultiplicativeExpression):
(WebCore::CSSCalcExpressionNodeParser::parseAdditiveValueExpression):
(WebCore::CSSCalcExpressionNodeParser::parseValueExpression):
(WebCore::checkDepthAndIndexDeprecated):
(WebCore::CSSCalcExpressionNodeParserDeprecated::parseValueTerm):
(WebCore::CSSCalcExpressionNodeParserDeprecated::parseValueMultiplicativeExpression):
(WebCore::CSSCalcExpressionNodeParserDeprecated::parseAdditiveValueExpression):
(WebCore::CSSCalcValue::create):

  • css/CSSCalculationValue.h:

(WebCore::CSSCalcValue::createCalculationValue):
(WebCore::CSSCalcValue::setPermittedValueRange):
Switch off the permitted calc value range enum, since we can just use the identical ValueRange enum.
Deprecate the CSSParserValueList-based parser by renaming it, and add a new parser that operates
on tokens.

  • css/CSSPrimitiveValue.cpp:

(WebCore::isValidCSSUnitTypeForDoubleConversion):
(WebCore::isStringType):
(WebCore::CSSPrimitiveValue::cleanup):
(WebCore::CSSPrimitiveValue::computeNonCalcLengthDouble):
(WebCore::CSSPrimitiveValue::formatNumberForCustomCSSText):
(WebCore::CSSPrimitiveValue::cloneForCSSOM):
(WebCore::CSSPrimitiveValue::equals):
(WebCore::CSSPrimitiveValue::buildParserValue):

  • css/CSSPrimitiveValue.h:

Add support for CSS_QUIRKY_EMS as a unit type. This will let us eliminate the extra m_isQuirkValue boolean
eventually.

  • css/parser/CSSParser.cpp:

(WebCore::CSSParser::validateCalculationUnit):
(WebCore::CSSParser::parseCalculation):

  • css/parser/CSSParser.h:

Switch to ValueRange.

  • css/parser/CSSParserIdioms.cpp:

(WebCore::completeURL):

  • css/parser/CSSParserIdioms.h:

Make the URL completion function from CSSParser.cpp available to all.

  • css/parser/CSSParserMode.h:

(WebCore::isUnitLessValueParsingEnabledForMode):
(WebCore::isUnitLessLengthParsingEnabledForMode): Deleted.
Rename this to value, since for now we're not supporting Blink's UserUnits. This means we need to support
unitless parsing for times and angles in addition to lengths, making the name of the function inappropriate.

  • css/parser/CSSParserToken.cpp:

(WebCore::cssPrimitiveValueUnitFromTrie):
Turn quirky ems support back on.

  • css/parser/CSSParserValues.cpp:

(WebCore::CSSParserValue::createCSSValue):
Support quirky ems.

  • css/parser/CSSPropertyParserHelpers.cpp:

(WebCore::CSSPropertyParserHelpers::CalcParser::consumeValue):
(WebCore::CSSPropertyParserHelpers::CalcParser::consumeNumber):
(WebCore::CSSPropertyParserHelpers::consumeInteger):
(WebCore::CSSPropertyParserHelpers::consumePositiveInteger):
(WebCore::CSSPropertyParserHelpers::consumeNumber):
(WebCore::CSSPropertyParserHelpers::shouldAcceptUnitlessValue):
(WebCore::CSSPropertyParserHelpers::consumeLength):
(WebCore::CSSPropertyParserHelpers::consumePercent):
(WebCore::CSSPropertyParserHelpers::canConsumeCalcValue):
(WebCore::CSSPropertyParserHelpers::consumeLengthOrPercent):
(WebCore::CSSPropertyParserHelpers::consumeAngle):
(WebCore::CSSPropertyParserHelpers::consumeTime):
(WebCore::CSSPropertyParserHelpers::consumeIdent):
(WebCore::CSSPropertyParserHelpers::consumeIdentRange):
(WebCore::CSSPropertyParserHelpers::consumeCustomIdent):
(WebCore::CSSPropertyParserHelpers::consumeString):
(WebCore::CSSPropertyParserHelpers::consumeUrl):
(WebCore::CSSPropertyParserHelpers::parseRGBParameters):
(WebCore::CSSPropertyParserHelpers::parseHSLParameters):
(WebCore::CSSPropertyParserHelpers::consumeColor):
(WebCore::CSSPropertyParserHelpers::consumePositionComponent):
(WebCore::CSSPropertyParserHelpers::positionFromOneValue):
(WebCore::CSSPropertyParserHelpers::positionFromTwoValues):
(WebCore::CSSPropertyParserHelpers::createPrimitiveValuePair):
(WebCore::CSSPropertyParserHelpers::positionFromThreeOrFourValues):
(WebCore::CSSPropertyParserHelpers::consumePosition):
(WebCore::CSSPropertyParserHelpers::consumeOneOrTwoValuedPosition):
(WebCore::CSSPropertyParserHelpers::consumeDeprecatedGradientPoint):
(WebCore::CSSPropertyParserHelpers::consumeDeprecatedGradientStopColor):
(WebCore::CSSPropertyParserHelpers::consumeDeprecatedGradientColorStop):
(WebCore::CSSPropertyParserHelpers::consumeDeprecatedGradient):
(WebCore::CSSPropertyParserHelpers::consumeDeprecatedRadialGradient):
(WebCore::CSSPropertyParserHelpers::consumeRadialGradient):
(WebCore::CSSPropertyParserHelpers::consumeLinearGradient):
(WebCore::CSSPropertyParserHelpers::consumeImageOrNone):
(WebCore::CSSPropertyParserHelpers::consumeCrossFade):
(WebCore::CSSPropertyParserHelpers::consumeGeneratedImage):
(WebCore::CSSPropertyParserHelpers::consumeImageSet):
(WebCore::CSSPropertyParserHelpers::consumeImage):

  • css/parser/CSSPropertyParserHelpers.h:

(WebCore::CSSPropertyParserHelpers::isCSSWideKeyword):
Lots of changes here. The most important is switching over to RefPtrs and Refs where appropriate, with the
requisite WTFMoves. Unit types also have to be converted back to our values, and unitless parsing has
to work with consumeTime and consumeAngle.

  • platform/CalculationValue.cpp:

(WebCore::CalculationValue::create):

  • platform/CalculationValue.h:

(WebCore::CalculationValue::CalculationValue):
Use ValueRange.

  • platform/graphics/Color.cpp:

(WebCore::Color::parseHexColor):
(WebCore::Color::Color):

  • platform/graphics/Color.h:

Add a StringView-based parseHexColor function.

  • rendering/style/BasicShapes.cpp:

(WebCore::BasicShapeCenterCoordinate::updateComputedLength):
Use ValueRange

Tools:

  • TestWebKitAPI/Tests/WebCore/CalculationValue.cpp:

(TestWebKitAPI::createTestValue):
Convert to ValueRange.

1:19 PM Changeset in webkit [206042] by achristensen@apple.com
  • 2 edits in trunk/Tools

Fix API tests after r206036
https://bugs.webkit.org/show_bug.cgi?id=162049

  • TestWebKitAPI/Tests/WebCore/URLParser.cpp:

(TestWebKitAPI::TEST_F):
An emoji had been UTF-8 encoded in the patch that was applied.
The test needed to check the encoding of the emoji, not the UTF-8 encoding of the emoji.
Everything was correct except applying the patch before committing.

12:55 PM Changeset in webkit [206041] by jer.noble@apple.com
  • 2 edits in trunk/LayoutTests

Unreviewed gardening; enable newly passing media/media-source/ tests.

  • platform/mac/TestExpectations:
12:44 PM Changeset in webkit [206040] by ddkilzer@apple.com
  • 2 edits in trunk/Source/WebKit2

ASSERT accidentally commented out in r204916
<https://webkit.org/b/162077>

Reviewed by Anders Carlsson.

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::terminateProcess): Comment in the ASSERT
back in.

12:33 PM Changeset in webkit [206039] by jer.noble@apple.com
  • 2 edits in trunk/LayoutTests

Unreviewed gardening; enable newly passing imported/w3c/web-platform-tests/media-source/ tests.

  • platform/mac/TestExpectations:
12:32 PM Changeset in webkit [206038] by Wenson Hsieh
  • 2 edits in trunk/Tools

RequiresUserActionForPlayback TestWebKitAPI tests are broken after r206033.
https://bugs.webkit.org/show_bug.cgi?id=162080

Reviewed by Jer Noble.

I renamed "playingHandler" to the more generalized "testHandler", but did not realize that the
RequiresUserActionForPlayback tests also used "playingHandler". Renames the handler to account for this change.

  • TestWebKitAPI/Tests/WebKit2Cocoa/RequiresUserActionForPlayback.mm:

(RequiresUserActionForPlaybackTest::SetUp):

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

[media-source] Fix imported/w3c/web-platform-tests/media-source/mediasource-config-change-mp4-av-audio-bitrate.html
https://bugs.webkit.org/show_bug.cgi?id=162052

Reviewed by Brent Fulgham.

Source/WebCore:

Fixes tests: imported/w3c/web-platform-tests/media-source/mediasource-config-change-mp4-av-audio-bitrate.html

imported/w3c/web-platform-tests/media-source/mediasource-config-change-mp4-av-video-bitrate.html

The above tests would throw an assertion while trying to invert a range with an invalid end time. Check the
validity of trackBuffer.lastEnqueuedPresentationTime before comparing it and assigning it to a range.

  • Modules/mediasource/SourceBuffer.cpp:

(WebCore::SourceBuffer::removeCodedFrames):

LayoutTests:

  • platform/mac/TestExpectations:
11:59 AM Changeset in webkit [206036] by achristensen@apple.com
  • 4 edits in trunk

URLParser should percent encode the user and password according to spec
https://bugs.webkit.org/show_bug.cgi?id=162049

Reviewed by Tim Horton.

Source/WebCore:

Covered by new API tests based on the web platform tests.

  • platform/URLParser.cpp:

(WebCore::URLParser::parseAuthority):

Tools:

  • TestWebKitAPI/Tests/WebCore/URLParser.cpp:

(TestWebKitAPI::TEST_F):

11:57 AM Changeset in webkit [206035] by achristensen@apple.com
  • 4 edits in trunk

Fix more edge cases in URLParser
https://bugs.webkit.org/show_bug.cgi?id=162051

Reviewed by Tim Horton.

Source/WebCore:

Added new API tests.

  • platform/URLParser.cpp:

(WebCore::URLParser::parse):
Some edge case handling was wrong. Also, some of the terminal states are not possible
to reach because we transition to those states without incrementing the iterator.

Tools:

  • TestWebKitAPI/Tests/WebCore/URLParser.cpp:

(TestWebKitAPI::TEST_F):

11:49 AM Changeset in webkit [206034] by achristensen@apple.com
  • 2 edits in trunk/Source/WebCore

Fix Windows clean build after r205929

  • DerivedSources.cpp:
11:14 AM Changeset in webkit [206033] by Wenson Hsieh
  • 41 edits
    1 copy
    3 adds in trunk

Inserting a space after inserting an accepted candidate scrolls the document and causes a flicker
https://bugs.webkit.org/show_bug.cgi?id=162009
<rdar://problem/28086237>

Reviewed by Tim Horton.

Source/WebKit2:

After inserting a text candidate, if the candidate ended with a soft space, the next space we insert should just
replace the soft space. This currently works because we leave the text insertion out of the list of
KeypressCommands sent to the web process and instead replace the soft space via WebPage::InsertTextAsync.
However, this means when the web process handles this keydown event, the current editor will not handle it,
since the list of key commands is empty despite the text and unmodified text being non-empty.

To fix this, when sending keydown or keyup events where we replace a soft space, we set the key event's text to
an empty string instead of a space. This allows us to return early in EventHandler::keyEvent and avoid the
codepath that tries to insert text into the current editor and (in the case of inserting a ' ') scrolls the
document if necessary. Since we've already handled text insertion via WebPage::InsertTextAsync, there is no need
to also dispatch the keypress to the editor.

Additionally, this patch addresses flickering in the candidates UI due to the fact that we're asynchronously
replacing the last soft space. During this operation, we select the range of the soft space and then insert the
new text. This causes a momentary range selection which the web process notifies the UI process about, prompting
us to hide the candidates list. To address this, we suppress the EditorStateChanged message fired from the web
process to the UI process while we're selecting the original range to replace.

This patch adds 3 new WebKit API tests.

  • Shared/NativeWebKeyboardEvent.h:
  • Shared/mac/NativeWebKeyboardEventMac.mm:

(WebKit::NativeWebKeyboardEvent::NativeWebKeyboardEvent):

  • Shared/mac/WebEventFactory.h:
  • Shared/mac/WebEventFactory.mm:

(WebKit::textFromEvent):
(WebKit::unmodifiedTextFromEvent):
(WebKit::WebEventFactory::createWebKeyboardEvent):

  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView _handleAcceptedCandidate:]):
(-[WKWebView _didHandleAcceptedCandidate]):
(-[WKWebView _didUpdateCandidateListVisibility:]):
(-[WKWebView _forceRequestCandidates]):
(-[WKWebView _handleControlledElementIDResponse:]): Deleted.

  • UIProcess/API/Cocoa/WKWebViewPrivate.h:
  • UIProcess/API/mac/WKView.mm:

(-[WKView _didHandleAcceptedCandidate]):
(-[WKView _didUpdateCandidateListVisibility:]):

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

(WebKit::WebViewImpl::forceRequestCandidatesForTesting):
(WebKit::WebViewImpl::becomeFirstResponder):
(WebKit::WebViewImpl::didHandleAcceptedCandidate):
(WebKit::WebViewImpl::insertText):
(WebKit::WebViewImpl::performKeyEquivalent):
(WebKit::WebViewImpl::keyUp):
(WebKit::WebViewImpl::keyDown):
(WebKit::WebViewImpl::flagsChanged):

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::insertTextAsync):

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

(WebKit::WebPage::insertTextAsync):
(WebKit::WebPage::didChangeSelection):

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

Tools:

Adds 3 new text editing API tests covering candidate insertion, as well as support for testing candidates in
WKWebViews. Refactors common WKWebView helpers across both VideoControlsManager tests and the new
WKWebViewCandidateTests into a new utility class, TestWKWebView in TestWKWebView.mm, which is capable of
simulating mouse and keyboard events as well as waiting for JavaScript messages sent from the web process and
performing actions in response.

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WebKit/ios/audio-only.html:
  • TestWebKitAPI/Tests/WebKit/ios/video-with-audio.html:
  • TestWebKitAPI/Tests/WebKit/ios/video-without-audio.html:
  • TestWebKitAPI/Tests/WebKit2Cocoa/VideoControlsManager.mm:

(TestWebKitAPI::TEST):
(-[MessageHandler initWithMessage:handler:]): Deleted.
(-[MessageHandler userContentController:didReceiveScriptMessage:]): Deleted.
(-[VideoControlsManagerTestWebView mouseDownAtPoint:]): Deleted.
(-[VideoControlsManagerTestWebView performAfterLoading:]): Deleted.
(-[VideoControlsManagerTestWebView callJavascriptFunction:]): Deleted.
(-[VideoControlsManagerTestWebView loadTestPageNamed:]): Deleted.
(-[VideoControlsManagerTestWebView performAfterReceivingMessage:action:]): Deleted.

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

(-[TestCandidate initWithReplacementString:inRange:]):
(-[TestCandidate replacementString]):
(-[TestCandidate resultType]):
(-[TestCandidate range]):
(-[CandidateTestWebView insertCandidatesAndWaitForResponse:range:]):
(-[CandidateTestWebView _didHandleAcceptedCandidate]):
(-[CandidateTestWebView expectCandidateListVisibilityUpdates:whenPerformingActions:]):
(-[CandidateTestWebView _didUpdateCandidateListVisibility:]):
(TEST):

  • TestWebKitAPI/Tests/WebKit2Cocoa/autoplaying-video-with-audio.html:
  • TestWebKitAPI/Tests/WebKit2Cocoa/change-video-source-on-click.html:
  • TestWebKitAPI/Tests/WebKit2Cocoa/change-video-source-on-end.html:
  • TestWebKitAPI/Tests/WebKit2Cocoa/full-size-autoplaying-video-with-audio.html:
  • TestWebKitAPI/Tests/WebKit2Cocoa/input-field-in-scrollable-document.html: Added.
  • TestWebKitAPI/Tests/WebKit2Cocoa/large-video-hides-controls-after-seek-to-end.html:
  • TestWebKitAPI/Tests/WebKit2Cocoa/large-video-mutes-onplaying.html:
  • TestWebKitAPI/Tests/WebKit2Cocoa/large-video-offscreen.html:
  • TestWebKitAPI/Tests/WebKit2Cocoa/large-video-playing-scroll-away.html:
  • TestWebKitAPI/Tests/WebKit2Cocoa/large-video-seek-after-ending.html:
  • TestWebKitAPI/Tests/WebKit2Cocoa/large-video-seek-to-beginning-and-play-after-ending.html:
  • TestWebKitAPI/Tests/WebKit2Cocoa/large-video-with-audio.html:
  • TestWebKitAPI/Tests/WebKit2Cocoa/large-video-without-audio.html:
  • TestWebKitAPI/Tests/WebKit2Cocoa/large-videos-autoplaying-click-to-pause.html:
  • TestWebKitAPI/Tests/WebKit2Cocoa/large-videos-autoplaying-scroll-to-video.html:
  • TestWebKitAPI/Tests/WebKit2Cocoa/large-videos-paused-video-hides-controls.html:
  • TestWebKitAPI/Tests/WebKit2Cocoa/large-videos-playing-muted-video-hides-controls.html:
  • TestWebKitAPI/Tests/WebKit2Cocoa/large-videos-playing-video-keeps-controls.html:
  • TestWebKitAPI/Tests/WebKit2Cocoa/large-videos-with-audio-autoplay.html:
  • TestWebKitAPI/Tests/WebKit2Cocoa/skinny-autoplaying-video-with-audio.html:
  • TestWebKitAPI/Tests/WebKit2Cocoa/wide-autoplaying-video-with-audio.html:
  • TestWebKitAPI/mac/TestWKWebViewMac.h: Added.
  • TestWebKitAPI/mac/TestWKWebViewMac.mm: Added.

(-[TestMessageHandler initWithMessage:handler:]):
(-[TestMessageHandler userContentController:didReceiveScriptMessage:]):
(-[TestWKWebView mouseDownAtPoint:]):
(-[TestWKWebView performAfterReceivingMessage:action:]):
(-[TestWKWebView loadTestPageNamed:]):
(-[TestWKWebView typeCharacter:]):
(-[TestWKWebView stringByEvaluatingJavaScript:]):
(-[TestWKWebView waitForMessage:]):
(-[TestWKWebView performAfterLoading:]):

11:04 AM Changeset in webkit [206032] by jer.noble@apple.com
  • 8 edits in trunk

[media-source] fix imported/w3c/web-platform-tests/media-source/mediasource-duration.html
https://bugs.webkit.org/show_bug.cgi?id=161999

Reviewed by Eric Carlson.

LayoutTests/imported/w3c:

Expected results had a stray newline.

  • web-platform-tests/media-source/mediasource-duration-expected.txt:

Source/WTF:

The mediasource-duration.html test tries to set the duration of a MediaSource to a double value
(5.0), then some work happens and the duration is set to a media time (12533/2500, or 5.0132).
The test then tries to set that value as the duration, converted from a media time to a double,
and asserts that no duration change event is fired. But because the floating point value and the
media time value are ever so slightly different, this round-tripping fails.

Fix this bug in MediaTime by, when one side or the other of a comparison is a floating point
MediaTime, convert both sides to doubles and run the comparison against those values. This preserves
the transitive equality of doubles <-> MediaTimes.

  • wtf/MediaTime.cpp:

(WTF::MediaTime::compare):

Tools:

  • TestWebKitAPI/Tests/WTF/MediaTime.cpp:

(TestWebKitAPI::TEST):

LayoutTests:

  • platform/mac/TestExpectations:
10:46 AM Changeset in webkit [206031] by andersca@apple.com
  • 4 edits in trunk

Fix isValidEnum to work with older versions of GCC
https://bugs.webkit.org/show_bug.cgi?id=162065

Reviewed by Michael Catanzaro.

Source/WTF:

Use the ternary operator instead of a more complex function body.

  • wtf/EnumTraits.h:

Tools:

Add EnumTraits.cpp to the CMake build.

  • TestWebKitAPI/CMakeLists.txt:
10:35 AM Changeset in webkit [206030] by andersca@apple.com
  • 8 edits in trunk/Source/WebKit2

Add support for enum class parameters in the message generator
https://bugs.webkit.org/show_bug.cgi?id=162036

Reviewed by Brady Eidson.

Also, convert the WebPage::SetLayerHostingMode to take an actual enum class.

  • Scripts/webkit/messages.py:

(function_parameter_type):
Change this to take the parameter kind as well, and use the raw type for enums.

(arguments_type):
(message_to_struct_declaration):
Pass the kind to function_parameter_type.

(forward_declaration):
(forward_declarations_for_namespace):
Forward declare enums with "enum class".

(headers_for_type):
Add WebKit::LayerHostingMode as a special case.

(generate_message_handler):
Pass the kind to function_parameter_type.

  • Scripts/webkit/parser.py:

(parse_parameters_string):
Parse 'enum' as well.

  • Shared/LayerTreeContext.h:

Add enum traits.

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::viewDidEnterWindow):
(WebKit::WebPageProxy::layerHostingModeDidChange):

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::reinitializeWebPage):
(WebKit::WebPage::setLayerHostingMode):

  • WebProcess/WebPage/WebPage.h:

Change unsigned to LayerHostingMode.

  • WebProcess/WebPage/WebPage.messages.in:

Change unsigned to LayerHostingMode.

10:08 AM Changeset in webkit [206029] by commit-queue@webkit.org
  • 8 edits in trunk/Source/WebKit2

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

inadvertent GCC requirement bump (Requested by mcatanzaro on
#webkit).

Reverted changeset:

"Add support for enum class parameters in the message
generator"
https://bugs.webkit.org/show_bug.cgi?id=162036
http://trac.webkit.org/changeset/206000

9:45 AM Changeset in webkit [206028] by jer.noble@apple.com
  • 4 edits in trunk

[media-source] Fix imported/w3c/web-platform-tests/media-source/mediasource-timestamp-offset.html
https://bugs.webkit.org/show_bug.cgi?id=162038

Reviewed by Eric Carlson.

Source/WebCore:

The timestampOffset property is no longer specified as an 'unrestricted' double.

  • Modules/mediasource/SourceBuffer.idl:

LayoutTests:

  • platform/mac/TestExpectations:
9:40 AM Changeset in webkit [206027] by pvollan@apple.com
  • 2 edits in trunk/Source/WebCore

[Win] Compile fix.
https://bugs.webkit.org/show_bug.cgi?id=162059

Reviewed by Alex Christensen.

If an include file exists in two places in the include paths, we can end up including the file twice,
since #pragma once will not protect us against this.

  • PlatformWin.cmake: Put WebCore forwarding folder first in include list.
9:32 AM Changeset in webkit [206026] by Chris Dumez
  • 9 edits
    2 adds in trunk

Cloning a textarea does not clone the textarea's value
https://bugs.webkit.org/show_bug.cgi?id=156637

Reviewed by Ryosuke Niwa.

LayoutTests/imported/w3c:

Import corresponding W3C web platform test.

  • web-platform-tests/html/semantics/forms/the-textarea-element/cloning-steps-expected.txt: Added.
  • web-platform-tests/html/semantics/forms/the-textarea-element/cloning-steps.html: Added.
  • web-platform-tests/html/semantics/forms/the-textarea-element/w3c-import.log:

Source/WebCore:

Update WebKit so that cloning a textarea element also clones its value.
This matches the HTML specification after:

The new behavior also matches Chrome and Edge.

Test: imported/w3c/web-platform-tests/html/semantics/forms/the-textarea-element/cloning-steps.html

  • html/HTMLInputElement.cpp:

(WebCore::HTMLInputElement::copyNonAttributePropertiesFromElement):

  • html/HTMLTextAreaElement.cpp:

(WebCore::HTMLTextAreaElement::copyNonAttributePropertiesFromElement):

  • html/HTMLTextAreaElement.h:

LayoutTests:

Update existing test to reflect behavior change.

  • fast/forms/checkValidity-cloneNode-crash-expected.txt:
  • fast/forms/checkValidity-cloneNode-crash.html:
9:21 AM Changeset in webkit [206025] by jer.noble@apple.com
  • 6 edits in trunk/Source/WebCore

[media-source] Only fire 'resize' events when new sized frame is displayed, not parsed.
https://bugs.webkit.org/show_bug.cgi?id=162039

Reviewed by Eric Carlson.

Fixes tests: imported/w3c/web-platform-tests/media-source/mediasource-config-change-mp4-av-framesize.html

imported/w3c/web-platform-tests/media-source/mediasource-config-change-mp4-v-framesize.html

Currently, the SourceBufferPrivateAVFObjC will signal a size change as soon as the sample is
parsed during appendData(). This is incorrect, as the intrinsic size of the video element
should be based on when the sample is displayed, and it causes some W3C test cases to fail.
Set a boundary time observer on the player's synchronizer at each sample's presentation time
where that sample signals a change in intrinsic size. Flush those observers whenever the
samples are flushed un-displayed (typically, during a seek). Because the observer callback
may have already been issued (but not executed) at a flush, use a separate weak pointer
factory, and invalidate all outstanding size change observer weak pointers when flushing.

  • Modules/mediasource/SourceBuffer.cpp:

(WebCore::SourceBuffer::reenqueueMediaForTime): When re-enqueing, enqueue the next decodable

sample, even if it doesn't include the current time. This handles cases where the current
time is 0, and the first video sample starts at 0.033.

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

(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::MediaPlayerPrivateMediaSourceAVFObjC):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::~MediaPlayerPrivateMediaSourceAVFObjC):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::naturalSize):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::sizeWillChangeAtTime):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::flushPendingSizeChanges):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::sizeChanged): Deleted.

  • platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.h:
  • platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:

(WebCore::SourceBufferPrivateAVFObjC::processCodedFrame):
(WebCore::SourceBufferPrivateAVFObjC::flushAndEnqueueNonDisplayingSamples):
(WebCore::SourceBufferPrivateAVFObjC::enqueueSample):

9:21 AM Changeset in webkit [206024] by achristensen@apple.com
  • 2 edits in trunk/Source/WebCore

Fix Windows clean build after r205929

  • DerivedSources.cpp:
9:20 AM Changeset in webkit [206023] by jer.noble@apple.com
  • 3 edits in trunk/Source/WebCore

[media-source] ASAN crash running imported/w3c/web-platform-tests/media-source/mediasource-remove.html
https://bugs.webkit.org/show_bug.cgi?id=162050

Reviewed by Brent Fulgham.

SampleMap::removeSample() was accessing the passed-in sample after removing it from its own storage. If
the SampleMap held the last reference to the sample, it would end up acessing freed memory. Fix the
post-removal access, but also ensure that the caller, SourceBuffer::removeCodedFrames(), retains the
sample it passes into removeSample().

  • Modules/mediasource/SampleMap.cpp:

(WebCore::SampleMap::removeSample):

  • Modules/mediasource/SourceBuffer.cpp:

(WebCore::SourceBuffer::removeCodedFrames):

6:08 AM Changeset in webkit [206022] by jfernandez@igalia.com
  • 2 edits in trunk/Source/WebCore

[GTK] Unreviewed build fix after r206007.
https://bugs.webkit.org/show_bug.cgi?id=162058

  • css/parser/CSSParserFastPaths.cpp:

(WebCore::CSSParserFastPaths::isValidKeywordPropertyAndValue):

5:41 AM WebKitGTK/Gardening/Calendar edited by jfernandez@igalia.com
(diff)
5:02 AM Changeset in webkit [206021] by nael.ouedraogo@crf.canon.fr
  • 2 edits in trunk/Tools

Unreviewed: Change my primary address for auto-complete in bugzilla.

  • Scripts/webkitpy/common/config/contributors.json:
3:02 AM Changeset in webkit [206020] by Carlos Garcia Campos
  • 2 edits in trunk

[CMake] Build broken with current debian testing
https://bugs.webkit.org/show_bug.cgi?id=162054

Reviewed by Žan Doberšek.

Building WTR bindings is broken now in Debian testing. The reason is that '.' is no longer included in @INC for
perl, see https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=588017 and
https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2016-1238.

  • Source/cmake/WebKitMacros.cmake(GENERATE_BINDINGS): Pass also the given BASE_DIR to perl executable so that it

can find modules in the current directory even if '.' is not in @INC. Also include generators in BASE_DIR to the
list of dependencies.

2:59 AM Changeset in webkit [206019] by Carlos Garcia Campos
  • 5 edits in trunk/Source/WebCore

[TextureMapper] Scrolling through 01.org/dleyna crashes WebKitWebProcess
https://bugs.webkit.org/show_bug.cgi?id=162020

Reviewed by Žan Doberšek.

The problem is that we are trying to clone a ReferenceFilterOperation, which is not expected to be cloned, from
FilterAnimationValue copy constructor, and FilterOperations are never expected to be nullptr, so we end up
crashing. We just need to validate the filters before setting then and before creating a TextureMapperAnimation
for them.

  • platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:

(WebCore::GraphicsLayerTextureMapper::filtersCanBeComposited): Return false if there are reference filters or no
filters at all. I don't know if we really support other filters, but at least we won't crash for the others.
(WebCore::GraphicsLayerTextureMapper::addAnimation): Check if filters can be composited before creating a
TextureMapperAnimation.
(WebCore::GraphicsLayerTextureMapper::setFilters): Check if filters can be composited before setting them.

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

(WebCore::CoordinatedGraphicsLayer::filtersCanBeComposited): Return false if there are reference filters or no
filters at all. I don't know if we really support other filters, but at least we won't crash for the others.
(WebCore::CoordinatedGraphicsLayer::setFilters): Check if filters can be composited before setting them.
(WebCore::CoordinatedGraphicsLayer::addAnimation): Check if filters can be composited before creating a
TextureMapperAnimation.

  • platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h:
2:47 AM Changeset in webkit [206018] by commit-queue@webkit.org
  • 11 edits in trunk

test262: Various Constructors length properties should be configurable
https://bugs.webkit.org/show_bug.cgi?id=161998

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2016-09-16
Reviewed by Saam Barati.

JSTests:

  • test262.yaml:

Source/JavaScriptCore:

https://tc39.github.io/ecma262/#sec-ecmascript-standard-built-in-objects
Unless otherwise specified, the length property of a built-in Function
object has the attributes:
{ Writable?: false, Enumerable?: false, Configurable?: true }.

  • runtime/ErrorConstructor.cpp:

(JSC::ErrorConstructor::finishCreation):

  • runtime/JSPromiseConstructor.cpp:

(JSC::JSPromiseConstructor::finishCreation):

  • runtime/MapConstructor.cpp:

(JSC::MapConstructor::finishCreation):

  • runtime/NativeErrorConstructor.cpp:

(JSC::NativeErrorConstructor::finishCreation):

  • runtime/ProxyConstructor.cpp:

(JSC::ProxyConstructor::finishCreation):

  • runtime/SetConstructor.cpp:

(JSC::SetConstructor::finishCreation):

  • runtime/WeakMapConstructor.cpp:

(JSC::WeakMapConstructor::finishCreation):

  • runtime/WeakSetConstructor.cpp:

(JSC::WeakSetConstructor::finishCreation):

2:44 AM Changeset in webkit [206017] by commit-queue@webkit.org
  • 3 edits in trunk/Source/WebCore

CachedFont do not need to be updated according Origin/Fetch mode
https://bugs.webkit.org/show_bug.cgi?id=161909

Patch by Youenn Fablet <youenn@apple.com> on 2016-09-16
Reviewed by Sam Weinig.

No change of behavior.

  • loader/cache/CachedFont.h: Ensuring CachedFont is not reused.
  • loader/cache/CachedResourceLoader.cpp:

(WebCore::CachedResourceLoader::updateCachedResourceWithCurrentRequest): Doing direct reuse for CachedFont as WebKit is ignoring CORS for all fonts related stuff.

1:56 AM Changeset in webkit [206016] by commit-queue@webkit.org
  • 48 edits in trunk/Source/WebCore

CachedResource should efficiently construct its ResourceRequest
https://bugs.webkit.org/show_bug.cgi?id=161609

Patch by Youenn Fablet <youenn@apple.com> on 2016-09-16
Reviewed by Sam Weinig.

Covered by existing tests.

Making CachedResourceLoader take a CachedResourceRequest&& when being asked to load resources.
Making CachedResource et al take a CachedResourceRequest&& as constructor parameter.

CachedResource now sets its options at construction time instead of load time.
This may change some specific behaviors, for instance when loading manually images.

Made some refactoring when both the resource and request are needed, for ResourceTimingInformation.
Made local copies of some CachedResourceRequest fields so that we do not need it after being WTFMoved.
Some of these properties may be put outside CachedResourceRequest in a later refactoring step.

  • css/CSSFontFaceSrcValue.cpp:

(WebCore::CSSFontFaceSrcValue::cachedFont):

  • css/CSSImageSetValue.cpp:

(WebCore::CSSImageSetValue::loadBestFitImage):

  • css/CSSImageValue.cpp:

(WebCore::CSSImageValue::loadImage):

  • css/StyleRuleImport.cpp:

(WebCore::StyleRuleImport::requestStyleSheet):

  • dom/ProcessingInstruction.cpp:

(WebCore::ProcessingInstruction::checkStyleSheet):

  • dom/ScriptElement.cpp:

(WebCore::ScriptElement::requestScriptWithCache):

  • html/HTMLLinkElement.cpp:

(WebCore::HTMLLinkElement::process):

  • html/parser/HTMLResourcePreloader.cpp:

(WebCore::HTMLResourcePreloader::preload):

  • loader/CrossOriginPreflightChecker.cpp:

(WebCore::CrossOriginPreflightChecker::startPreflight):

  • loader/DocumentLoader.cpp:

(WebCore::DocumentLoader::startLoadingMainResource):

  • loader/DocumentThreadableLoader.cpp:

(WebCore::DocumentThreadableLoader::loadRequest):

  • loader/ImageLoader.cpp:

(WebCore::ImageLoader::updateFromElement):

  • loader/LinkLoader.cpp:

(WebCore::LinkLoader::preloadIfNeeded):
(WebCore::LinkLoader::loadLink):

  • loader/MediaResourceLoader.cpp:

(WebCore::MediaResourceLoader::requestResource):

  • loader/ResourceTimingInformation.cpp:

(WebCore::ResourceTimingInformation::storeResourceTimingInitiatorInformation):

  • loader/ResourceTimingInformation.h:
  • loader/TextTrackLoader.cpp:

(WebCore::TextTrackLoader::load):

  • loader/cache/CachedCSSStyleSheet.cpp:

(WebCore::CachedCSSStyleSheet::CachedCSSStyleSheet):

  • loader/cache/CachedCSSStyleSheet.h:
  • loader/cache/CachedFont.cpp:

(WebCore::CachedFont::CachedFont):
(WebCore::CachedFont::load):
(WebCore::CachedFont::beginLoadIfNeeded):

  • loader/cache/CachedFont.h:
  • loader/cache/CachedImage.cpp:

(WebCore::CachedImage::CachedImage):
(WebCore::CachedImage::load):

  • loader/cache/CachedImage.h:
  • loader/cache/CachedRawResource.cpp:

(WebCore::CachedRawResource::CachedRawResource):

  • loader/cache/CachedRawResource.h:
  • loader/cache/CachedResource.cpp:

(WebCore::CachedResource::CachedResource):
(WebCore::CachedResource::load):
(WebCore::CachedResource::loadFrom):

  • loader/cache/CachedResource.h:

(WebCore::CachedResource::resourceRequest):

  • loader/cache/CachedResourceLoader.cpp:

(WebCore::createResource):
(WebCore::CachedResourceLoader::requestImage):
(WebCore::CachedResourceLoader::requestFont):
(WebCore::CachedResourceLoader::requestTextTrack):
(WebCore::CachedResourceLoader::requestCSSStyleSheet):
(WebCore::CachedResourceLoader::requestUserCSSStyleSheet):
(WebCore::CachedResourceLoader::requestScript):
(WebCore::CachedResourceLoader::requestXSLStyleSheet):
(WebCore::CachedResourceLoader::requestSVGDocument):
(WebCore::CachedResourceLoader::requestLinkResource):
(WebCore::CachedResourceLoader::requestMedia):
(WebCore::CachedResourceLoader::requestRawResource):
(WebCore::CachedResourceLoader::requestMainResource):
(WebCore::CachedResourceLoader::shouldUpdateCachedResourceWithCurrentRequest):
(WebCore::CachedResourceLoader::updateCachedResourceWithCurrentRequest):
(WebCore::CachedResourceLoader::requestResource):
(WebCore::CachedResourceLoader::revalidateResource):
(WebCore::CachedResourceLoader::loadResource):
(WebCore::CachedResourceLoader::reloadImagesIfNotDeferred):
(WebCore::CachedResourceLoader::preload):
(WebCore::CachedResourceLoader::checkForPendingPreloads):
(WebCore::CachedResourceLoader::requestPreload):

  • loader/cache/CachedResourceLoader.h:
  • loader/cache/CachedSVGDocument.cpp:

(WebCore::CachedSVGDocument::CachedSVGDocument):

  • loader/cache/CachedSVGDocument.h:
  • loader/cache/CachedSVGDocumentReference.cpp:

(WebCore::CachedSVGDocumentReference::load):

  • loader/cache/CachedSVGFont.cpp:

(WebCore::CachedSVGFont::CachedSVGFont):

  • loader/cache/CachedSVGFont.h:
  • loader/cache/CachedScript.cpp:

(WebCore::CachedScript::CachedScript):

  • loader/cache/CachedScript.h:
  • loader/cache/CachedTextTrack.cpp:

(WebCore::CachedTextTrack::CachedTextTrack):

  • loader/cache/CachedTextTrack.h:
  • loader/cache/CachedXSLStyleSheet.cpp:

(WebCore::CachedXSLStyleSheet::CachedXSLStyleSheet):
(WebCore::CachedXSLStyleSheet::didAddClient):

  • loader/cache/CachedXSLStyleSheet.h:
  • loader/icon/IconLoader.cpp:

(WebCore::IconLoader::startLoading):

  • platform/graphics/avfoundation/cf/WebCoreAVCFResourceLoader.cpp:

(WebCore::WebCoreAVCFResourceLoader::startLoading):

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

(WebCore::WebCoreAVFResourceLoader::startLoading):

  • svg/SVGFEImageElement.cpp:

(WebCore::SVGFEImageElement::requestImageResource):

  • svg/SVGFontFaceUriElement.cpp:

(WebCore::SVGFontFaceUriElement::loadFont):

  • svg/SVGUseElement.cpp:

(WebCore::SVGUseElement::updateExternalDocument):

  • xml/XSLImportRule.cpp:

(WebCore::XSLImportRule::loadSheet):

1:47 AM Changeset in webkit [206015] by Joseph Pecoraro
  • 4 edits in trunk/Source/WebInspectorUI

Web Inspector: Include JavaScript completion for ES6 keywords and global variables
https://bugs.webkit.org/show_bug.cgi?id=162027

Reviewed by Brian Burg.

  • UserInterface/Controllers/CodeMirrorCompletionController.js:

(WebInspector.CodeMirrorCompletionController.prototype._generateJavaScriptCompletions):
Include ES6 keywords and provide them when they may be available.

  • UserInterface/Views/ConsolePrompt.js:

(WebInspector.ConsolePrompt):

  • UserInterface/Views/TextEditor.js:

(WebInspector.TextEditor.prototype.set mimeType):
For editors that might want to provide completion for global variables
use the mode with options way of setting the mode for CodeMirror. The
only mode that cares about "globalVars" are the JavaScript variants.

1:24 AM Changeset in webkit [206014] by commit-queue@webkit.org
  • 11 edits
    1 copy
    2 adds in trunk

[Fetch API] Headers should be combine with ',' and not ', '
https://bugs.webkit.org/show_bug.cgi?id=161736

Patch by Youenn Fablet <youenn@apple.com> on 2016-09-16
Reviewed by Sam Weinig.

LayoutTests/imported/w3c:

  • web-platform-tests/XMLHttpRequest/setrequestheader-case-insensitive.htm: Making ',' combination as expected.
  • web-platform-tests/XMLHttpRequest/setrequestheader-header-allowed-expected.txt: Some new header tests are failing.

This is due to the fact that the underlying HTTP code is probably reprocessing those headers and readding ', ' in lieu of ','.

  • web-platform-tests/XMLHttpRequest/setrequestheader-header-allowed.htm: Ditto.
  • web-platform-tests/fetch/api/cors/cors-preflight.js:

(corsPreflight): Removing stripping of whitespaces

  • web-platform-tests/fetch/api/headers/headers-combine.html: Making ',' combination as expected.

Source/WebCore:

Covered by updated tests and http/tests/xmlhttprequest/check-combining-headers.html.

  • loader/CrossOriginAccessControl.cpp:

(WebCore::createAccessControlPreflightRequest): Combining with ',' for Access-Control-Request-Headers

  • platform/network/HTTPHeaderMap.cpp:

(HTTPHeaderMap::add): Combining with ','

LayoutTests:

  • http/tests/xmlhttprequest/check-combining-headers-expected.txt:
  • http/tests/xmlhttprequest/check-combining-headers.html: Checking combined headers.
  • http/tests/xmlhttprequest/resources/print-headers.php: Printing all request headers in a JSON response.
  • http/tests/xmlhttprequest/web-apps/005.html: Making ',' combination as expected.
12:56 AM Changeset in webkit [206013] by bshafiei@apple.com
  • 4 edits in branches/safari-602-branch/Source/WebKit2

Merge r205983. rdar://problem/28312297

12:56 AM Changeset in webkit [206012] by bshafiei@apple.com
  • 2 edits in branches/safari-602-branch/Source/WebKit/mac

Merge r205991. rdar://problem/28272353

12:54 AM WebKitGTK/2.14.x edited by Carlos Garcia Campos
(diff)
12:51 AM Changeset in webkit [206011] by commit-queue@webkit.org
  • 19 edits
    1 add
    1 delete in trunk

Custom promise-returning functions should not throw if callee has not the expected type
https://bugs.webkit.org/show_bug.cgi?id=162011

Patch by Youenn Fablet <youenn@apple.com> on 2016-09-16
Reviewed by Sam Weinig.

Source/JavaScriptCore:

  • JavaScriptCore.xcodeproj/project.pbxproj: Making JSPromiseConstructor.h private

Source/WebCore:

Covered by added test.

Updating code generator to handle this case.
Cleaning related getUserMedia implementation.

  • CMakeLists.txt: Removing Modules/mediastream/MediaDevices.js.
  • DerivedSources.make: Removing Modules/mediastream/MediaDevices.js.
  • Modules/mediastream/MediaDevices.idl: Cleaning IDL definition
  • Modules/mediastream/MediaDevices.js: Removing error throwing and so removing file.
  • Modules/mediastream/NavigatorUserMedia.js: getUsermMediaFromJS to getUserMedia.
  • WebCore.xcodeproj/project.pbxproj: Removing Modules/mediastream/MediaDevices.js.
  • bindings/js/JSDOMPromise.cpp:

(WebCore::createRejectedPromiseWithTypeError): Helper routine.

  • bindings/js/JSDOMPromise.h:
  • bindings/js/WebCoreBuiltinNames.h: getUsermMediaFromJS to getUserMedia.
  • bindings/scripts/CodeGeneratorJS.pm:

(GenerateImplementation): Rejecting promise in case of failing castedThis, but only for custom functions since
they are handled differently for non custom methods.
(GenerateFunctionCastedThis):

  • bindings/scripts/test/JS/JSTestObj.cpp:
  • bindings/scripts/test/JS/JSTestObj.h:
  • bindings/scripts/test/TestObj.idl: Adding custom promise test.

LayoutTests:

  • fast/mediastream/MediaDevices-getUserMedia-expected.txt:
  • fast/mediastream/MediaDevices-getUserMedia.html: Enusing calling getUserMedia on something else than MediaDevices does not throw.
  • http/tests/media/media-stream/disconnected-frame-already-expected.txt:
12:41 AM Changeset in webkit [206010] by commit-queue@webkit.org
  • 7 edits
    4 adds in trunk

Link loader should use FetchOptions::mode according its crossOrigin attribute
https://bugs.webkit.org/show_bug.cgi?id=161859

Patch by Youenn Fablet <youenn@apple.com> on 2016-09-16
Reviewed by Sam Weinig.

Source/WebCore:

Tests: http/tests/security/cached-cross-origin-preloaded-css-stylesheet.html

http/tests/security/cached-cross-origin-preloading-css-stylesheet.html

Setting fetch mode according crossorigin attribute for link preload elements.
This allows calling onerror callback for CORS failures, which was not the case before the patch.

Making cached CSS stylesheet reusable accross origins and fetch modes.

  • loader/LinkLoader.cpp:

(WebCore::LinkLoader::preloadIfNeeded): Using CachedResourceRequest::setAsPotentiallyCrossOrigin to set fetch mode.

  • loader/cache/CachedCSSStyleSheet.cpp:

(WebCore::CachedCSSStyleSheet::sheetText): clean-up.
(WebCore::CachedCSSStyleSheet::setBodyDataFrom): Implementing data init for cached css stylesheets.

  • loader/cache/CachedCSSStyleSheet.h:
  • loader/cache/CachedResourceLoader.cpp:

(WebCore::CachedResourceLoader::updateCachedResourceWithCurrentRequest): Activating update support for stylesheets.
(WebCore::CachedResourceLoader::requestResource): Fixing for matching cached resources that need being reloaded due to different origin/fetch mode.

LayoutTests:

  • http/tests/security/cached-cross-origin-preloaded-css-stylesheet-expected.txt: Added.
  • http/tests/security/cached-cross-origin-preloaded-css-stylesheet.html: Added.
  • http/tests/security/cached-cross-origin-preloading-css-stylesheet-expected.txt: Added.
  • http/tests/security/cached-cross-origin-preloading-css-stylesheet.html: Added.
  • http/tests/security/resources/allow-if-origin.php: Adding support for allowing credentials and setting contentType.
12:33 AM Changeset in webkit [206009] by commit-queue@webkit.org
  • 18 edits
    2 adds in trunk

[Fetch API] Referrer and Origin header should not be considered as safe request headers
https://bugs.webkit.org/show_bug.cgi?id=161902

Patch by Youenn Fablet <youenn@apple.com> on 2016-09-16
Reviewed by Sam Weinig.

LayoutTests/imported/w3c:

  • web-platform-tests/fetch/api/cors/cors-preflight-referrer-expected.txt:
  • web-platform-tests/fetch/api/cors/cors-preflight-referrer-worker-expected.txt:
  • web-platform-tests/fetch/api/cors/cors-preflight-referrer.js:

(corsPreflightReferrer): Adding check of the preflight Access-Control-Request-Headers header value.
Added new tests to check for non-default referrer values.

Source/WebCore:

Test: http/tests/fetch/fetch-cors-with-referrer.html and updated WPT tests.

Removing Origin and Referrer from safe request headers.
Making referrer header setting after preflight for fetch API code path.

Ensuring that no ThreadableLoader client sets Origin or Referrer headers of the ResourceRequest, as they should use the proper mechanisms for that.

Handling no-referrer referrer special value by setting the referrer-policy to NoReferrer in FetchLoader.

  • Modules/fetch/FetchLoader.cpp:

(WebCore::FetchLoader::start): Computing referrer value and handling special "client"and "no-referrer" cases.
Passing the value directly to ThreadableLoader.

  • Modules/fetch/FetchRequest.cpp:

(WebCore::FetchRequest::internalRequest): Removing setting of ResourceRequest referrer header.
(WebCore::FetchRequest::clone): Removing obsolete FIXME.

  • Modules/fetch/FetchRequest.h:
  • loader/CrossOriginAccessControl.cpp:

(WebCore::isOnAccessControlSimpleRequestHeaderWhitelist): Removing Origin and Referrer headers.

  • loader/DocumentThreadableLoader.cpp:

(WebCore::DocumentThreadableLoader::create): Updated to take a referrer as parameter.
(WebCore::DocumentThreadableLoader::DocumentThreadableLoader): Ditto.

  • loader/DocumentThreadableLoader.h: Ditto.
  • loader/ThreadableLoader.cpp: Ditto.

(WebCore::ThreadableLoader::create): Ditto.

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

(WebCore::WorkerThreadableLoader::WorkerThreadableLoader): Ditto.
(WebCore::WorkerThreadableLoader::loadResourceSynchronously): Ditto.

  • loader/WorkerThreadableLoader.h: Ditto.

(WebCore::WorkerThreadableLoader::create): Ditto.

  • platform/network/ResourceRequestBase.cpp:

(WebCore::ResourceRequestBase::hasHTTPReferrer): Added to enable asserting that no threadable loader client sets the referrer in the request.

  • platform/network/ResourceRequestBase.h:

LayoutTests:

  • http/tests/fetch/fetch-cors-with-referrer-expected.txt: Added.
  • http/tests/fetch/fetch-cors-with-referrer.html: Added.

Sep 15, 2016:

5:56 PM Changeset in webkit [206008] by commit-queue@webkit.org
  • 5 edits in trunk/Source/WebInspectorUI

Web Inspector: support drag and drop of CSS classes and ids onto DOM nodes
https://bugs.webkit.org/show_bug.cgi?id=16529

Patch by Devin Rousso <Devin Rousso> on 2016-09-15
Reviewed by Joseph Pecoraro.

  • UserInterface/Models/DOMNode.js:

(WebInspector.DOMNode.prototype.toggleClass.resolvedNode.inspectedPage_node_toggleClass):
(WebInspector.DOMNode.prototype.toggleClass.resolvedNode):
(WebInspector.DOMNode.prototype.toggleClass):
Moved from WebInspector.CSSStyleDetailsSidebarPanel.prototype._toggleClass.

  • UserInterface/Views/CSSStyleDetailsSidebarPanel.css:

(.sidebar > .panel.details.css-style > .content ~ :matches(.options-container, .class-list-container)):
Added z-index to fix overlapping with selector origin.

  • UserInterface/Views/CSSStyleDetailsSidebarPanel.js:

(WebInspector.CSSStyleDetailsSidebarPanel):
(WebInspector.CSSStyleDetailsSidebarPanel.prototype.computedStyleDetailsPanelShowProperty):
(WebInspector.CSSStyleDetailsSidebarPanel.prototype.initialLayout):
(WebInspector.CSSStyleDetailsSidebarPanel.prototype._switchPanels):
(WebInspector.CSSStyleDetailsSidebarPanel.prototype._classToggleButtonClicked):
(WebInspector.CSSStyleDetailsSidebarPanel.prototype._addClassInputBlur):
Added a setting for auto-expanding the Classes toggle list based on the previous state.
Also renamed the existing _lastSelectedSectionSetting to _lastSelectedPanelSetting since the
setting doesn't have anything to do with the last selected section.

(WebInspector.CSSStyleDetailsSidebarPanel.prototype._createToggleForClassName):
(WebInspector.CSSStyleDetailsSidebarPanel.ToggledClassesDragType):
Added functionality to allow dragging of a className toggle's text (not the checkbox) by
using a custom type, preventing the value from being dropped anywhere except the DOM tree.

(WebInspector.CSSStyleDetailsSidebarPanel.prototype._createToggleForClassName.classNameToggleChanged):
Restructured to use arrow function to avoid function binding.

(WebInspector.CSSStyleDetailsSidebarPanel.prototype._toggleClass.resolvedNode.toggleClass): Deleted.
(WebInspector.CSSStyleDetailsSidebarPanel.prototype._toggleClass.resolvedNode): Deleted.
(WebInspector.CSSStyleDetailsSidebarPanel.prototype._toggleClass): Deleted.

  • UserInterface/Views/DOMTreeOutline.js:

(WebInspector.DOMTreeOutline.prototype._ondragover):
(WebInspector.DOMTreeOutline.prototype._ondrop.callback):
(WebInspector.DOMTreeOutline.prototype._ondrop):
Allow dragging when the dataTransfer object contains the type specified by
WebInspector.CSSStyleDetailsSidebarPanel.ToggledClassesDragType. The value for that type
will be added to the dropped element's classList.

5:33 PM Changeset in webkit [206007] by hyatt@apple.com
  • 12 edits
    2 adds in trunk/Source/WebCore

[CSS Parser] Get CSSParserFastPaths.cpp compiling
https://bugs.webkit.org/show_bug.cgi?id=162033

Reviewed by Dean Jackson.

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

Add new StyleColor.h/.cpp files to the projecty

  • css/CSSFunctionValue.cpp:

(WebCore::CSSFunctionValue::CSSFunctionValue):
(WebCore::CSSFunctionValue::customCSSText):
(WebCore::CSSFunctionValue::append):
(WebCore::CSSFunctionValue::buildParserValueSubstitutingVariables):

  • css/CSSFunctionValue.h:

Tweak CSSFunctionValue so that the name can be represented as a keyword ID instead of a String. Eventually we also
want to make CSSFunctionValue subclass CSSValueList rather than referencing a separate CSSValueList as a member. For now
I left that alone though in order to not change too much in the old parser.

  • css/CSSProperty.cpp:

(WebCore::CSSProperty::isDescriptorOnly):
Whether or not a property is only a descriptor, e.g., used in viewport and font face stuff.

  • css/CSSProperty.h:
  • css/CSSValueKeywords.in:

Added new keywords for functions that can be used as values. The new parser uses keywords to represent function names.

  • css/StyleColor.cpp: Added.

(WebCore::StyleColor::colorFromKeyword):
(WebCore::StyleColor::isColorKeyword):
(WebCore::StyleColor::isSystemColor):

  • css/StyleColor.h: Added.

(WebCore::StyleColor::StyleColor):
(WebCore::StyleColor::currentColor):
(WebCore::StyleColor::isCurrentColor):
(WebCore::StyleColor::getColor):
(WebCore::StyleColor::resolve):
(WebCore::operator==):
(WebCore::operator!=):
New color helper that contains code for checking and looking up colors. This code is similar to some code we already
had in the old CSSParser.cpp file, but this way it can be used outside the parser and/or in different files.

  • css/parser/CSSParserFastPaths.cpp:

(WebCore::parseSimpleLengthValue):
(WebCore::isColorPropertyID):
(WebCore::parseColorIntOrPercentage):
(WebCore::fastParseColorInternal):
(WebCore::CSSParserFastPaths::parseColor):
(WebCore::CSSParserFastPaths::isValidKeywordPropertyAndValue):
(WebCore::isUniversalKeyword):
(WebCore::parseKeywordValue):
(WebCore::parseTransformTranslateArguments):
(WebCore::parseTransformNumberArguments):
(WebCore::parseSimpleTransformValue):
(WebCore::transformCanLikelyUseFastPath):
(WebCore::parseSimpleTransformList):
(WebCore::parseSimpleTransform):
(WebCore::CSSParserFastPaths::maybeParseValue):

  • css/parser/CSSParserFastPaths.h:

Get everything compiling in this file. Key changes included reverting to our old unit names, making CSSFunctionValue compatible,
adding support for StyleColor, adding support for mode checking of keywords, and fixing up the memory management model so that
RefPtrs are used on returns from parsing functions.

  • css/parser/CSSParserIdioms.cpp:

(WebCore::isValueAllowedInMode):

  • css/parser/CSSParserIdioms.h:

New helper function for restricting keywords to certain modes only. The -webkit-text color quirk has been moved to this function.

5:27 PM Changeset in webkit [206006] by beidson@apple.com
  • 23 edits in trunk/Source

WKWebView.hasOnlySecureContent always returns "YES" after going back to a CachedPage (even if it has http resources).
<rdar://problem/27681261> and https://bugs.webkit.org/show_bug.cgi?id=162043

Reviewed by Brent Fulgham.

Source/WebCore:

No new tests (Not possible with current testing infrastructure).

This adds the infrastructure for WebCore to track whether or not a CachedFrame had insecure content at the time
it was cached, and then to report that back to the client when a CachedPage is restored.

Since "has insecure content" is currently only tracked in the WK2 UI process, that is the only client of this code.

  • history/CachedFrame.cpp:

(WebCore::CachedFrame::setHasInsecureContent):

  • history/CachedFrame.h:

(WebCore::CachedFrame::hasInsecureContent):

  • loader/EmptyClients.h:
  • loader/FrameLoader.cpp:

(WebCore::FrameLoader::receivedFirstData):
(WebCore::FrameLoader::commitProvisionalLoad):
(WebCore::FrameLoader::dispatchDidCommitLoad):

  • loader/FrameLoader.h:
  • loader/FrameLoaderClient.h:
  • loader/FrameLoaderTypes.h:

Source/WebKit/mac:

  • WebCoreSupport/WebFrameLoaderClient.h:
  • WebCoreSupport/WebFrameLoaderClient.mm:

(WebFrameLoaderClient::dispatchDidCommitLoad):

Source/WebKit/win:

  • WebCoreSupport/WebFrameLoaderClient.cpp:

(WebFrameLoaderClient::dispatchDidCommitLoad):

  • WebCoreSupport/WebFrameLoaderClient.h:

Source/WebKit2:

  • Scripts/webkit/messages.py:

(headers_for_type): Add a custom header, and alphabetize existing ones.

  • Shared/WebCoreArgumentCoders.h: Add EnumTraits for HasInsecureContent.
  • UIProcess/PageLoadState.h:

(WebKit::PageLoadState::committedHasInsecureContent):

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::hasInsecureContent):
(WebKit::WebPageProxy::didCommitLoadForFrame): If the WebProcess included an existing "HasInsecureContent" value, use it.

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

(WebKit::WebFrameLoaderClient::dispatchDidCommitLoad):
(WebKit::WebFrameLoaderClient::savePlatformDataToCachedFrame): Save the "HasInsecureContent" value to the CachedFrame in

case we restore it in the future.

  • WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
5:20 PM Changeset in webkit [206005] by Matt Baker
  • 4 edits in trunk/Source/WebInspectorUI

Web Inspector: Use more global color variables in TreeOutline and DataGrid
https://bugs.webkit.org/show_bug.cgi?id=161940
<rdar://problem/28292555>

Reviewed by Brian Burg.

  • UserInterface/Views/DataGrid.css:

(.data-grid tr.selected):
(.data-grid:matches(:focus, .force-focus) tr.selected):
Use global color vars.

  • UserInterface/Views/TreeOutline.css:

(.tree-outline .item.selected):
Use global color vars.
(body.window-inactive .tree-outline .item.selected): Deleted.
Not needed. Unfocused color is the same when window is inactive.

  • UserInterface/Views/Variables.css:

(:root):
Add --selected-background-color-unfocused.

4:42 PM Changeset in webkit [206004] by andersca@apple.com
  • 2 edits in trunk/Source/WebKit/mac

This was supposed to be committed with the previous patch!

  • Plugins/WebBasePluginPackage.mm:

(pathByResolvingSymlinksAndAliases): Deleted.

4:38 PM Changeset in webkit [206003] by andersca@apple.com
  • 2 edits in trunk/Source/WebKit2

Actually assign the decoded enum value to the output value
https://bugs.webkit.org/show_bug.cgi?id=162042

Reviewed by Brady Eidson.

  • Platform/IPC/Decoder.h:
4:34 PM Changeset in webkit [206002] by andersca@apple.com
  • 2 edits in trunk/Source/WebKit/mac

Replace use of Carbon file system APIs in plug-in loading
https://bugs.webkit.org/show_bug.cgi?id=162040
rdar://problem/6017896

Reviewed by Sam Weinig.

  • Plugins/WebBasePluginPackage.mm:

(-[WebBasePluginPackage initWithPath:]):
Use -[NSString stringByResolvingSymlinksInPath] directly here. We already check for duplicate bundle IDs, so there's no need to try
to resolve aliases as well (and the modern WebKit plug-in implementation doesn't do this).

4:13 PM Changeset in webkit [206001] by jer.noble@apple.com
  • 14 edits in trunk

[media-source] web-platform-test/media-source/mediasource-remove.html test failing
https://bugs.webkit.org/show_bug.cgi?id=161950

Reviewed by Eric Carlson.

Source/WebCore:

Fixes test: web-platform-test/media-source/mediasource-remove.html

The mediasource-remove.html test was failing in a number of ways:

  • Tests with invalid start or end times were not throwing the correct exception code, or not throwing exception codes at all
  • Tests were showing an incorrect start buffered range at the beginning of each test.
  • Tests which removed samples were not getting the expected buffered values at the end each test.

For the exception failures, update the implementation of abort() and remove() to throw
the correct exceptions at the correct times.

For the incorrect initial buffered range, update our buffered calculations to store
individual PlatformTimeRanges on each TrackBuffer, and coalesce them into a single
value when an append operation completes, a remove operation completes, or when the
MediaSource's ready state changes.

For the incorrect buffered ranges after removal, this is caused because the "samples"
that make up an audio track are actually a collection of a large number of individual
samples. So when we are asked to remove media data in a given range, break these audio
meta-samples into two pieces at the removal points. This allows the removal algorithm
to operate on a individual audio sample basis. (We should look into using this technique
when audio samples are evicted during an append operation.) This requires adding some
methods to MediaSample and it's concrete subclasses to "divide" a sample into two at
a given presentation time.

Fixing these behaviors, however, breaks the media-source-end-of-stream-buffered.html
test, which expects the buffered range for the entire element to expand to the maximum
buffered time of any of the element's MediaSource's active sourceBuffers. To fix this,
update the MediaSource's monitorSourceBuffer() implementation to match the current
specification. The new spec no longer queries the individual SourceBuffers, but rather
queries the already coalesced buffered ranges. So move the helper methods hasCurrentTime()
hasFutureTime(), and canPlayThrough() up into MediaSource from SourceBuffer. Also, update
seekToTime, since it has the same problem as monitorSourceBuffer().

However, this breaks the media-source-monitor-source-buffers.html test, which appends
10s of movie data instantaneously, then never appends again. The SourceBuffer's
monitorBufferingRate() method only re-evaluates the rate after data has been appended,
so the SourceBuffer thinks it's buffered data at a prodigious rate forever. Instead,
allow the SourceBuffer to continuously re-evalute it's buffering rate by modifying the
exponential moving average so that the co-efficient scales based on how frequently the
method is called. Call the method more often, and the moving average changes less quickly,
and it means that when media is stalled out at the end of a buffered range, the readyState
of a video element will eventually drop to HAVE_CURRENT_DATA when the average buffering
rate falls below the level where playback would continue uninterrupted.

  • Modules/mediasource/MediaSource.cpp:

(WebCore::MediaSource::seekToTime):
(WebCore::MediaSource::currentTimeFudgeFactor):
(WebCore::MediaSource::hasBufferedTime):
(WebCore::MediaSource::hasCurrentTime):
(WebCore::MediaSource::hasFutureTime):
(WebCore::MediaSource::monitorSourceBuffers):

  • Modules/mediasource/MediaSource.h:
  • Modules/mediasource/SourceBuffer.cpp:

(WebCore::SourceBuffer::abort):
(WebCore::SourceBuffer::remove):
(WebCore::SourceBuffer::abortIfUpdating):
(WebCore::SourceBuffer::removeCodedFrames):
(WebCore::SourceBuffer::sourceBufferPrivateDidReceiveSample):
(WebCore::SourceBuffer::updateBufferedFromTrackBuffers):
(WebCore::SourceBuffer::canPlayThroughRange):
(WebCore::SourceBuffer::monitorBufferingRate):
(WebCore::currentTimeFudgeFactor): Deleted.
(WebCore::SourceBuffer::hasCurrentTime): Deleted.
(WebCore::SourceBuffer::hasFutureTime): Deleted.
(WebCore::SourceBuffer::canPlayThrough): Deleted.

  • platform/MediaSample.h:
  • platform/cf/CoreMediaSoftLink.cpp:
  • platform/cf/CoreMediaSoftLink.h:
  • platform/graphics/avfoundation/MediaSampleAVFObjC.h:
  • platform/graphics/avfoundation/objc/MediaSampleAVFObjC.mm:

(WebCore::MediaSampleAVFObjC::isDivisable):
(WebCore::MediaSampleAVFObjC::divide):

  • platform/mock/mediasource/MockSourceBufferPrivate.cpp:

LayoutTests:

  • platform/mac/TestExpectations:
3:38 PM Changeset in webkit [206000] by andersca@apple.com
  • 8 edits in trunk/Source/WebKit2

Add support for enum class parameters in the message generator
https://bugs.webkit.org/show_bug.cgi?id=162036

Reviewed by Brady Eidson.

Also, convert the WebPage::SetLayerHostingMode to take an actual enum class.

  • Scripts/webkit/messages.py:

(function_parameter_type):
Change this to take the parameter kind as well, and use the raw type for enums.

(arguments_type):
(message_to_struct_declaration):
Pass the kind to function_parameter_type.

(forward_declaration):
(forward_declarations_for_namespace):
Forward declare enums with "enum class".

(headers_for_type):
Add WebKit::LayerHostingMode as a special case.

(generate_message_handler):
Pass the kind to function_parameter_type.

  • Scripts/webkit/parser.py:

(parse_parameters_string):
Parse 'enum' as well.

  • Shared/LayerTreeContext.h:

Add enum traits.

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::viewDidEnterWindow):
(WebKit::WebPageProxy::layerHostingModeDidChange):

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::reinitializeWebPage):
(WebKit::WebPage::setLayerHostingMode):

  • WebProcess/WebPage/WebPage.h:

Change unsigned to LayerHostingMode.

  • WebProcess/WebPage/WebPage.messages.in:

Change unsigned to LayerHostingMode.

3:13 PM Changeset in webkit [205999] by Alan Bujtas
  • 5 edits
    2 adds in trunk

ASSERTION FAILED: willBeComposited == needsToBeComposited(layer) in WebCore::RenderLayerCompositor::computeCompositingRequirements
https://bugs.webkit.org/show_bug.cgi?id=151097
<rdar://problem/27711678>

Reviewed by Simon Fraser.

Source/WebCore:

This patch ensures that when will-change property triggers stacking context, we make the associated layer a non-normal flow layer.
(This is similar to what any other stacking context-triggering CSS property does.)

Test: compositing/assert-on-will-change-transform-with-composited-descendant.html

  • rendering/RenderLayer.cpp:

(WebCore::RenderLayer::calculateClipRects):

LayoutTests:

  • compositing/assert-on-will-change-transform-with-composited-descendant-expected.txt: Added.
  • compositing/assert-on-will-change-transform-with-composited-descendant.html: Added.
3:01 PM Changeset in webkit [205998] by fpizlo@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

REGRESSION (r205462): Lot of leaks
https://bugs.webkit.org/show_bug.cgi?id=161946

Reviewed by Saam Barati.

We were forgetting to delete LargeAllocations on VM exit!

  • heap/MarkedSpace.cpp:

(JSC::MarkedSpace::~MarkedSpace):

2:57 PM Changeset in webkit [205997] by Alan Bujtas
  • 11 edits in trunk/Source/WebCore

Move RenderObject::shouldRespectImageOrientation to RenderElement.
https://bugs.webkit.org/show_bug.cgi?id=162028

Reviewed by Antti Koivisto.

Tighten the type for imageSizeForRenderer/canRender so that RenderObject::shouldRespectImageOrientation could
be moved to RenderElement.

No change in functionality.

  • loader/cache/CachedImage.cpp:

(WebCore::CachedImage::imageSizeForRenderer):

  • loader/cache/CachedImage.h:
  • rendering/RenderElement.cpp:

(WebCore::RenderElement::shouldRespectImageOrientation):

  • rendering/RenderElement.h:
  • rendering/RenderObject.cpp:

(WebCore::RenderObject::shouldRespectImageOrientation): Deleted.

  • rendering/RenderObject.h:
  • rendering/style/StyleCachedImage.cpp:

(WebCore::StyleCachedImage::canRender):

  • rendering/style/StyleCachedImage.h:
  • rendering/style/StyleImage.h:

(WebCore::StyleImage::canRender):

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

Marking js/date-constructor.html as flaky on ios-simulator-wk2
https://bugs.webkit.org/show_bug.cgi?id=162032

Unreviewed test gardening.

  • platform/ios-simulator-wk2/TestExpectations:
1:43 PM Changeset in webkit [205995] by jfbastien@apple.com
  • 2 edits in trunk/Source/WTF

TextBreakIterator: unconvolute character break cache
https://bugs.webkit.org/show_bug.cgi?id=162001

Reviewed by Michael Saboff.

Simplify the one-element cache.

Added here (fixed a bit after): https://bugs.webkit.org/attachment.cgi?id=144118&action=prettypatch
Updated to never use a lock, and always use weak cmpxchg here: https://bugs.webkit.org/attachment.cgi?id=261719&action=prettypatch

It's just trying to reduce the number of times it calls into ICU
to initialize a UBRK_CHARACTER. The implementation keeps a
one-element cache of the latest used one, which threads can
optimistically grab. Failure is fine (just create a new one), same
for failure to cache (just destroy it), but the logic is odd and
you technically need release / acquire semantics because the
UBRK_CHARACTER creation's store need to be visible on acquisition
(but realistically it was created and then used and *then* cached,
so it's probably been long ago enough that read reorders never
manifested).

Using exchange directly achieves this without the headache.

  • wtf/text/TextBreakIterator.cpp:

(WTF::getNonSharedCharacterBreakIterator):
(WTF::cacheNonSharedCharacterBreakIterator):
(WTF::NonSharedCharacterBreakIterator::NonSharedCharacterBreakIterator):
(WTF::NonSharedCharacterBreakIterator::~NonSharedCharacterBreakIterator):
(WTF::compareAndSwapNonSharedCharacterBreakIterator): Deleted.

1:41 PM Changeset in webkit [205994] by mitz@apple.com
  • 8 copies
    1 add in releases/Apple/Safari Technology Preview 13

Added a tag for Safari Technology Preview release 13.

1:07 PM Changeset in webkit [205993] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Skip two crashing media tests, remove flaky expectation for one that was wrongly blamed.
https://bugs.webkit.org/show_bug.cgi?id=161323

Unreviewed test gardening.

  • platform/ios-simulator-wk2/TestExpectations:
12:46 PM Changeset in webkit [205992] by andersca@apple.com
  • 2 edits in trunk/Source/WebCore

Fix build.

  • platform/spi/cocoa/PassKitSPI.h:
12:18 PM Changeset in webkit [205991] by Beth Dakin
  • 2 edits in trunk/Source/WebKit/mac

Need hasMarkedText on Mac
https://bugs.webkit.org/show_bug.cgi?id=162026
-and corresponding-
rdar://problem/28272353

Reviewed by Anders Carlsson.

  • WebView/WebHTMLViewInternal.h:
11:48 AM Changeset in webkit [205990] by achristensen@apple.com
  • 2 edits in trunk/Source/WebCore

Use character class table in URLParser
https://bugs.webkit.org/show_bug.cgi?id=161997

Reviewed by Chris Dumez.

No change in behavior except a performance improvement.

Before this change, URLParser took 1.514x as long to run my URL Parsing benchmark as URL::parse
with a standard deviation of the ration of the runtimes of 0.063 after 8 runs with each parser.
After this change, URLParser took 1.328x as long with a standard deviation of 0.037.
This isn't the cleanest data, but it's enough to convince me that this is a significant improvement.

  • platform/URLParser.cpp:

(WebCore::isC0Control):
(WebCore::isC0ControlOrSpace):
(WebCore::isTabOrNewline):
(WebCore::isInSimpleEncodeSet):
(WebCore::isInDefaultEncodeSet):
(WebCore::isInUserInfoEncodeSet):
(WebCore::isInvalidDomainCharacter):
(WebCore::isSlashQuestionOrHash):
(WebCore::shouldPercentEncodeQueryByte):
(WebCore::shouldCopyFileURL):
(WebCore::isSingleDotPathSegment):
(WebCore::URLParser::parse):

11:35 AM Changeset in webkit [205989] by keith_miller@apple.com
  • 16 edits in trunk/Source

Pragma out undefined-var-template warnings in JSC for JSObjects that are templatized
https://bugs.webkit.org/show_bug.cgi?id=161985

Reviewed by Alex Christensen.

Source/JavaScriptCore:

I started a true fix for this in
https://bugs.webkit.org/show_bug.cgi?id=161979, however the fix
for this issue is not sustainable. Since the scope of this issue
is just limited to the static const ClassInfo member it is
simpler to just pragma out this warning. This works because
COMDAT will, AFAIK, pick the actual specialization. If, in the
future, we want to expose these classes to WebCore we will need to
do what we do for JSGenericTypedArrayViews and create a custom
info() function with a switch.

This patch also fixes a bunch of weak external symbols due to one of:
1) out of line template member definitions functions not being marked inline.
2) inline member functions definitions being marked as exported.
3) missing header file includes for forward function declarations.

  • API/JSCallbackObject.h:
  • b3/B3ValueInlines.h:

(JSC::B3::Value::as):

  • runtime/HashMapImpl.cpp:

(JSC::getHashMapBucketKeyClassInfo):
(JSC::getHashMapBucketKeyValueClassInfo):
(JSC::getHashMapImplKeyClassInfo):
(JSC::getHashMapImplKeyValueClassInfo):

  • runtime/HashMapImpl.h:

(JSC::HashMapBucket::info):
(JSC::HashMapImpl::info):

  • runtime/JSCJSValue.h:

(JSC::toUInt32): Deleted.

  • runtime/JSGenericTypedArrayView.h:

(JSC::JSGenericTypedArrayView::setIndexQuicklyToDouble):

  • runtime/JSGenericTypedArrayViewConstructor.h:
  • runtime/JSGenericTypedArrayViewPrototype.h:
  • runtime/MathCommon.h:

(JSC::toUInt32):

  • runtime/TypedArrayAdaptors.h:
  • runtime/VM.h:

(JSC::VM::watchdog):
(JSC::VM::heapProfiler):
(JSC::VM::samplingProfiler):

Source/WebCore:

Delete unneeded using, which broke the build on newer versions of clang.

  • bridge/objc/WebScriptObject.mm:

Source/WTF:

Fix WTF_EXPORT_PRIVATE for an inline member function. This would
generate a weak export.

  • wtf/MetaAllocator.h:

(WTF::MetaAllocator::getLock):

11:20 AM Changeset in webkit [205988] by achristensen@apple.com
  • 4 edits in trunk

URLParser: Check for invalid characters in the host
https://bugs.webkit.org/show_bug.cgi?id=162023

Reviewed by Tim Horton.

Source/WebCore:

Covered by new API tests.

  • platform/URLParser.cpp:

(WebCore::URLParser::failure):
(WebCore::URLParser::parseHost):

Tools:

  • TestWebKitAPI/Tests/WebCore/URLParser.cpp:

(TestWebKitAPI::TEST_F):

11:16 AM Changeset in webkit [205987] by Antti Koivisto
  • 2 edits in trunk/Source/WebCore

Remove some extra spaces.

  • rendering/TextDecorationPainter.cpp:

(WebCore::collectStylesForRenderer):

11:12 AM Changeset in webkit [205986] by achristensen@apple.com
  • 3 edits in trunk/Source/WebCore

Use efficient iterators in URLParser
https://bugs.webkit.org/show_bug.cgi?id=162007

Reviewed by Tim Horton.

URLParser used to use StringView::CodePoints::Iterator, which needs to check if
the StringView is 8-bit or 16-bit every time it does anything.
I wrote a new CodePointIterator template which already knows whether it is iterating
8-bit or 16-bit characters, so it does not need to do the checks each time it gets a
code point or advances to the next code point.

No change in behavior except a performance increase.
Covered by existing tests.

  • platform/URLParser.cpp:

(WebCore::CodePointIterator::CodePointIterator):
(WebCore::CodePointIterator::operator==):
(WebCore::CodePointIterator::operator!=):
(WebCore::CodePointIterator::operator=):
(WebCore::CodePointIterator::atEnd):
(WebCore::CodePointIterator<LChar>::operator):
(WebCore::CodePointIterator<UChar>::operator):
(WebCore::isWindowsDriveLetter):
(WebCore::shouldCopyFileURL):
(WebCore::isPercentEncodedDot):
(WebCore::isSingleDotPathSegment):
(WebCore::isDoubleDotPathSegment):
(WebCore::consumeSingleDotPathSegment):
(WebCore::consumeDoubleDotPathSegment):
(WebCore::URLParser::failure):
(WebCore::URLParser::parse):
(WebCore::URLParser::parseAuthority):
(WebCore::parseIPv4Number):
(WebCore::parseIPv4Host):
(WebCore::parseIPv6Host):
(WebCore::URLParser::parsePort):
(WebCore::URLParser::parseHost):

  • platform/URLParser.h:
11:11 AM Changeset in webkit [205985] by Antti Koivisto
  • 7 edits in trunk/Source/WebCore

Move text decoration style computation from RenderObject to TextDecorationPainter
https://bugs.webkit.org/show_bug.cgi?id=162004

Reviewed by Zalan Bujtas.

It is mostly an implementation detail of TextDecorationPainter.

  • accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:

(AXAttributeStringSetStyle):

  • accessibility/mac/WebAccessibilityObjectWrapperMac.mm:

(AXAttributeStringSetStyle):

  • rendering/RenderObject.cpp:

(WebCore::decorationColor): Deleted.
(WebCore::RenderObject::getTextDecorationColorsAndStyles): Deleted.

  • rendering/RenderObject.h:
  • rendering/TextDecorationPainter.cpp:

(WebCore::TextDecorationPainter::TextDecorationPainter):
(WebCore::TextDecorationPainter::paintTextDecoration):
(WebCore::decorationColor):

  • rendering/TextDecorationPainter.h:
11:04 AM Changeset in webkit [205984] by hyatt@apple.com
  • 3 edits in trunk/Source/WebCore

[CSS Parser] Make stylesheets parse using the new parser if the setting is enabled
https://bugs.webkit.org/show_bug.cgi?id=162018

Reviewed by Zalan Bujtas.

  • css/parser/CSSParser.cpp:

(WebCore::CSSParserContext::CSSParserContext):
(WebCore::CSSParser::parseSheet):

  • css/parser/CSSParserMode.h:
10:58 AM Changeset in webkit [205983] by Beth Dakin
  • 4 edits in trunk/Source/WebKit2

dictionaryPopupInfoForRange() can change selection temporarily; updates should not
be sent to the UIProcess.
https://bugs.webkit.org/show_bug.cgi?id=162008
-and corresponding-
rdar://problem/28312297

Reviewed by Tim Horton.

This patch prevents the selection changes that occur while gathering
dictionaryPopupInfo from being propagated to the UIProcess.

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::didChangeSelection):

  • WebProcess/WebPage/WebPage.h:
  • WebProcess/WebPage/mac/WebPageMac.mm:

(WebKit::WebPage::dictionaryPopupInfoForRange):

10:48 AM Changeset in webkit [205982] by commit-queue@webkit.org
  • 7 edits in trunk

[CMake] Refactor GENERATE_BINDINGS
https://bugs.webkit.org/show_bug.cgi?id=161854

Patch by Fujii Hironori <Fujii Hironori> on 2016-09-15
Reviewed by Gyuyoung Kim.

.:

  • Source/cmake/WebKitMacros.cmake(GENERATE_BINDINGS): Use

CMakeParseArguments for argument parsing. Defined as a function
instread of a macro because function has its own variable scope.
Wrapped both preprocess-idls.pl and generate-bindings.pl scripts.
Downcased local variables COMMON_GENERATOR_DEPENDENCIES and
BINDING_GENERATOR. Generate idl_files.tmp. Removed arguments
_prefix and _extension because they are always JS and cpp now.

Source/WebCore:

  • CMakeLists.txt: Changed the arguments of GENERATE_BINDINGS to

new style. Removed add_custom_command of preprocess-idls.pl which
is moved to GENERATE_BINDINGS. Moved IDL_ATTRIBUTES_FILE into
GENERATE_BINDINGS.

Tools:

  • DumpRenderTree/CMakeLists.txt: Changed the arguments of

GENERATE_BINDINGS to new style.

  • WebKitTestRunner/CMakeLists.txt: Ditto.
10:46 AM Changeset in webkit [205981] by andersca@apple.com
  • 1 edit in trunk/Source/WebCore/ChangeLog

Add radar link

10:45 AM Changeset in webkit [205980] by andersca@apple.com
  • 18 edits
    2 adds in trunk/Source/WebCore

Add CSS -webkit-appearance property for Apple Pay buttons
https://bugs.webkit.org/show_bug.cgi?id=161986

Reviewed by Dean Jackson.

Add a new -webkit-appearance property, "-apple-pay-button".
Also, add two properties, "-apple-pay-button-type" and "-apple-pay-button-style".

  • WebCore.xcodeproj/project.pbxproj:

Add RenderThemeCocoa.h and RenderThemeCocoa.mm.

  • css/CSSComputedStyleDeclaration.cpp:

(WebCore::ComputedStyleExtractor::propertyValue):
Handle CSSPropertyApplePayButtonStyle and CSSPropertyApplePayButtonType.

  • css/CSSPrimitiveValueMappings.h:

(WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
(WebCore::CSSPrimitiveValue::operator ApplePayButtonStyle):
(WebCore::CSSPrimitiveValue::operator ApplePayButtonType):
Add ApplePayButtonStyle and ApplePayButtonType conversion routines.

  • css/CSSPropertyNames.in:

Add -apple-pay-button-style and -apple-pay-button-type.

  • css/CSSValueKeywords.in:

Add CSS values.

  • css/parser/CSSParser.cpp:

(WebCore::isValidKeywordPropertyAndValue):
Handle CSSPropertyApplePayButtonStyle and CSSPropertyApplePayButtonType.

  • css/parser/CSSParserFastPaths.cpp:

(WebCore::CSSParserFastPaths::isKeywordPropertyID):
Handle CSSPropertyApplePayButtonStyle and CSSPropertyApplePayButtonType.

(WebCore::isAppleLegacyCSSPropertyKeyword):
New function that returns whether the CSS property should be rewritten to -webkit-.
We want to rewrite -apple- but not -apple-pay-.

(WebCore::cssPropertyID):
Use the newly added isAppleLegacyCSSPropertyKeyword.

(WebCore::isAppleLegacyCSSValueKeyword):
Check for "-apple-pay-" in addition to "-apple-system-".

  • platform/ThemeTypes.h:

Add ApplePayButtonPart.

  • platform/spi/cocoa/PassKitSPI.h:

Add PKDrawApplePayButton declaration.

  • rendering/RenderTheme.cpp:

(WebCore::RenderTheme::adjustStyle):
Handle ApplePayButtonPart.

(WebCore::RenderTheme::paint):
Handle ApplePayButtonPart.

  • rendering/RenderTheme.h:

(WebCore::RenderTheme::adjustApplePayButtonStyle):
(WebCore::RenderTheme::paintApplePayButton):
Add new functions.

  • rendering/RenderThemeCocoa.h: Added.
  • rendering/RenderThemeCocoa.mm: Added.

(WebCore::RenderThemeCocoa::adjustApplePayButtonStyle):
Adjust the minimum width and minimum height accordingly.

(WebCore::toPKPaymentButtonStyle):
(WebCore::toPKPaymentButtonType):
Helper functions that convert our WebCore types to PK types.

(WebCore::RenderThemeCocoa::paintApplePayButton):
Call PKDrawApplePayButton.

  • rendering/RenderThemeIOS.h:
  • rendering/RenderThemeMac.h:

Inherit from RenderThemeCocoa.

  • rendering/style/RenderStyle.h:

(WebCore::RenderStyle::applePayButtonStyle):
(WebCore::RenderStyle::applePayButtonType):
(WebCore::RenderStyle::setApplePayButtonStyle):
(WebCore::RenderStyle::setApplePayButtonType):
(WebCore::RenderStyle::initialApplePayButtonStyle):
(WebCore::RenderStyle::initialApplePayButtonType):

  • rendering/style/RenderStyleConstants.h:
  • rendering/style/StyleRareInheritedData.cpp:

(WebCore::StyleRareInheritedData::StyleRareInheritedData):
(WebCore::StyleRareInheritedData::operator==):

  • rendering/style/StyleRareInheritedData.h:

Add new style members for the button style and button type properties.

10:17 AM Changeset in webkit [205979] by fpizlo@apple.com
  • 4 edits in trunk/Source/JavaScriptCore

There is no good reason for WeakBlock to care about newly allocated objects
https://bugs.webkit.org/show_bug.cgi?id=162006

Reviewed by Geoffrey Garen.

WeakBlock scans itself in two modes:

visit: if a Weak in the block belongs to an unmarked object, ask the Weak to consider whether

it should do things.


reap: if a Weak in a block belongs to an unmarked object, delete the Weak.

Except that "unmarked" has a peculiar meaning: WeakBlock defines it as
!markedOrNewlyAllocated. So, a newly allocated object will never be consulted about anything.
That sounds scary until you realize that newlyAllocated must have been cleared before we even
got here.

So, we were paying the price of checking newlyAllocated for no reason. This switches the code
to using isMarked(). I don't know why the code previously checked newlyAllocated, but I do
trust my reasoning.

  • heap/LargeAllocation.h:

(JSC::LargeAllocation::isMarkedDuringWeakVisiting):
(JSC::LargeAllocation::isMarkedOrNewlyAllocatedDuringWeakVisiting): Deleted.

  • heap/MarkedBlock.h:

(JSC::MarkedBlock::isMarkedDuringWeakVisiting):
(JSC::MarkedBlock::isMarkedOrNewlyAllocatedDuringWeakVisiting): Deleted.

  • heap/WeakBlock.cpp:

(JSC::WeakBlock::specializedVisit):
(JSC::WeakBlock::reap):

10:10 AM Changeset in webkit [205978] by jfernandez@igalia.com
  • 8 edits in trunk/LayoutTests

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

  • platform/gtk/TestExpectations:
  • platform/gtk/fast/forms/menulist-clip-expected.png:
  • platform/gtk/fast/forms/menulist-clip-expected.txt:
  • platform/gtk/imported/w3c/web-platform-tests/fetch/api/basic/request-headers-expected.txt:
  • platform/gtk/imported/w3c/web-platform-tests/fetch/api/basic/request-headers-worker-expected.txt:
  • platform/gtk/imported/w3c/web-platform-tests/fetch/api/redirect/redirect-location-expected.txt:
  • platform/gtk/imported/w3c/web-platform-tests/fetch/api/redirect/redirect-location-worker-expected.txt:
10:07 AM Changeset in webkit [205977] by svillar@igalia.com
  • 14 edits
    4 adds in trunk

[css-grid] Implement fit-content track size
https://bugs.webkit.org/show_bug.cgi?id=161379

Reviewed by Manuel Rego Casasnovas.

Source/WebCore:

This implements the new <fit-content> track size which is defined as follows: "Represents
the formula min(max-content, max(auto, argument)), which is calculated similar to auto
(i.e. minmax(auto, max-content)), except that the track size is clamped at argument if it is
greater than the auto minimum."

From the parsing POV fit-content was implemented as a new type of function which only takes
one argument. That forced us to refactor some code because minmax() was the only allowed
function for <track-size>s so far.

The implementation key is a new attribute in GridTrack called growthLimitCap which is
precisely the single attribute of fit-content(). Some parts of the track sizing algorithm
were adapted to this change like for example the sorting of tracks by growth potential (we
need to consider the caps).

Tests: fast/css-grid-layout/fit-content-columns.html
fast/css-grid-layout/fit-content-rows.html

  • css/CSSComputedStyleDeclaration.cpp:

(WebCore::specifiedValueForGridTrackSize): Added support for fit-content sizes.

  • css/StyleBuilderConverter.h:

(WebCore::StyleBuilderConverter::createGridTrackSize): Added support for fit-content sizes.

  • css/parser/CSSParser.cpp:

(WebCore::isGridTrackFixedSized): Added support for fit-content sizes.
(WebCore::CSSParser::parseGridTrackSize): Added support for parsing fit-content() functions.

  • css/parser/CSSPropertyParser.cpp: Added support for parsing fit-content() functions so

it'll be available once we switch to the new parser.

  • rendering/RenderGrid.cpp:

(WebCore::GridTrack::baseSize): Just return a LayoutUnit, the return value optimization will
keep it fast in any case.
(WebCore::GridTrack::growthLimit): Ditto.
(WebCore::GridTrack::setGrowthLimit): Added an ASSERT to check that the growth limit is
never higher than the cap.
(WebCore::GridTrack::infiniteGrowthPotential):
(WebCore::GridTrack::plannedSize): Just return a LayoutUnit, the return value optimization will
keep it fast in any case.
(WebCore::GridTrack::tempSize): Just return a LayoutUnit, the return value optimization will
keep it fast in any case.
(WebCore::GridTrack::setTempSize): Added as we no longer return a reference in tempSize().
(WebCore::GridTrack::growTempSize): New utility function which increases the tempSize.
(WebCore::GridTrack::setInfinitelyGrowable):
(WebCore::GridTrack::setGrowthLimitCap): Added.
(WebCore::GridTrack::growthLimitCap): Ditto.
(WebCore::GridTrack::growthLimitIsInfinite): Made private.
(WebCore::RenderGrid::GridSizingData::freeSpace): Renamed from freeSpaceForDirection.
(WebCore::RenderGrid::GridSizingData::availableSpace): We now cache the available space as
it is used to compute relative (percentage) sizes.
(WebCore::RenderGrid::GridSizingData::setAvailableSpace): Ditto.
(WebCore::RenderGrid::GridSizingData::setFreeSpace): Renamed from setFreeSpaceForDirection.
(WebCore::RenderGrid::computeTrackSizesForDirection): Receives the available space instead
of the free space.
(WebCore::RenderGrid::computeIntrinsicLogicalWidths): Properly initialize free and available
spaces.
(WebCore::RenderGrid::computeIntrinsicLogicalHeight): Ditto.
(WebCore::RenderGrid::computeUsedBreadthOfGridTracks): Use available space to initialize the
track sizes. Also use sizingOperation to decide whether or not sizes are indefinite. Last
but not least, added support for fit-content tracks.
(WebCore::RenderGrid::computeUsedBreadthOfMinLength): Pass a GridTrackSize instead of a GridLength.
(WebCore::RenderGrid::computeUsedBreadthOfMaxLength): Ditto.
(WebCore::RenderGrid::gridTrackSize): Added support for fit-content.
(WebCore::RenderGrid::resolveContentBasedTrackSizingFunctions): Ditto.
(WebCore::RenderGrid::resolveContentBasedTrackSizingFunctionsForNonSpanningItems): Ditto.
(WebCore::trackSizeForTrackSizeComputationPhase):
(WebCore::sortByGridTrackGrowthPotential): Reworked the function so it properly sorts tracks
with growth limit caps to support fit-content().
(WebCore::clampGrowthShareIfNeeded): Clamps the given growthShare passed as argument to the
track growth limit cap.
(WebCore::RenderGrid::distributeSpaceToTracks): Use the new setTempSize() method. Also sort
the selected tracks to grow over growth limits in order to respect the track caps eventually
set by fit-content (otherwise those tracks could indefinitely grow over the specified value).
(WebCore::RenderGrid::tracksAreWiderThanMinTrackBreadth): Use the new defined functions.
(WebCore::RenderGrid::applyStretchAlignmentToTracksIfNeeded): Use freeSpace().
(WebCore::RenderGrid::populateGridPositionsForDirection): Ditto.
(WebCore::GridTrack::infinitelyGrowable): Deleted.
(WebCore::RenderGrid::GridSizingData::freeSpaceForDirection): Deleted.
(WebCore::RenderGrid::GridSizingData::setFreeSpaceForDirection): Deleted.
(WebCore::RenderGrid::trackSizeForTrackSizeComputationPhase): Deleted.

  • rendering/RenderGrid.h: Changed the signature of some methods. Moved

TrackSizeComputationPhase out of the RenderGrid class.

  • rendering/style/GridTrackSize.h:

(WebCore::GridTrackSize::GridTrackSize): Added some extra documentation. Added a new
attribute to the constructor to support fit-content GridTrackSizes.
(WebCore::GridTrackSize::fitContentTrackBreadth): New method which returns the growth limit
cap set by fit-content().
(WebCore::GridTrackSize::minTrackBreadth):
(WebCore::GridTrackSize::isFitContent): Added.
(WebCore::GridTrackSize::length): Deleted.
(WebCore::GridTrackSize::isPercentage): Deleted.

LayoutTests:

New tests to verify that fit-content track sizes work as expected for columns and for
rows. Also added some more test cases to verify that we properly parse fit-content().

  • fast/css-grid-layout/fit-content-columns-expected.html: Added.
  • fast/css-grid-layout/fit-content-columns.html: Added.
  • fast/css-grid-layout/fit-content-rows-expected.html: Added.
  • fast/css-grid-layout/fit-content-rows.html: Added.
  • fast/css-grid-layout/grid-auto-columns-rows-get-set-expected.txt:
  • fast/css-grid-layout/grid-auto-columns-rows-get-set.html:
  • fast/css-grid-layout/grid-columns-rows-get-set-expected.txt:
  • fast/css-grid-layout/grid-columns-rows-get-set.html:
  • fast/css-grid-layout/resources/grid-columns-rows-get-set.js:
9:59 AM Changeset in webkit [205976] by Ryan Haddad
  • 2 edits in trunk/Tools

Disable failing API WebKit2.DataDetectionReferenceDate until it can be investigated.
https://bugs.webkit.org/show_bug.cgi?id=161967

Unreviewed test gardening.

  • TestWebKitAPI/Tests/WebKit2Cocoa/DataDetection.mm:

(TEST):

9:59 AM Changeset in webkit [205975] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Marking transitions/3d/interrupted-transition.html as flaky on ios-simulator.
https://bugs.webkit.org/show_bug.cgi?id=130972

Unreviewed test gardening.

  • platform/ios-simulator/TestExpectations:
9:51 AM Changeset in webkit [205974] by commit-queue@webkit.org
  • 12 edits
    4 deletes in trunk

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

Tests for this change fail on 32-bit JSC bots (Requested by
ryanhaddad on #webkit).

Reverted changeset:

"[JSC] Make the rounding-related nodes support any type"
https://bugs.webkit.org/show_bug.cgi?id=161895
http://trac.webkit.org/changeset/205931

9:39 AM WebKitGTK/Gardening/Calendar edited by jfernandez@igalia.com
(diff)
9:32 AM Changeset in webkit [205973] by svillar@igalia.com
  • 2 edits in trunk/Source/WebCore

[css-grid] Fix a dangling reference
https://bugs.webkit.org/show_bug.cgi?id=161739

Reviewed by Alexey Proskuryakov.

The code was trying to get a reference to a private attribute of a temporary object returned
by gridTrackSize().

  • rendering/RenderGrid.cpp:

(WebCore::RenderGrid::assumedRowsSizeForOrthogonalChild):

8:51 AM Changeset in webkit [205972] by svillar@igalia.com
  • 14 edits
    4 deletes in trunk

Unreviewed, rolling out r205966.

Triggered some assertions

Reverted changeset:

"[css-grid] Implement fit-content track size"
https://bugs.webkit.org/show_bug.cgi?id=161379
http://trac.webkit.org/changeset/205966

8:46 AM Changeset in webkit [205971] by pvollan@apple.com
  • 2 edits in trunk/Tools

[Win] run-api-tests is failing.
https://bugs.webkit.org/show_bug.cgi?id=162015

Reviewed by Brent Fulgham.

MSVC is not interpreting C++ string literals with unicode characters correctly when the source file
doesn't contain encoding information. Save the file with utf8 encoding with signature.

  • TestWebKitAPI/Tests/WebCore/URLParser.cpp:
8:42 AM Changeset in webkit [205970] by Alan Bujtas
  • 5 edits in trunk

Cleanup RenderLayer::shouldBeNormalFlowOnly
https://bugs.webkit.org/show_bug.cgi?id=161981

Reviewed by Simon Fraser.

Source/WebCore:

This patch changes the logic of figuring about if a particular layer is normal flow only by simply checking
if the layer creates a stacking context. If it does, we assume that it can't be a normal flow layer anymore.
This patch slightly changes behaviour by making layers with isolation and reflection to be non normal flow layers anymore.

Covered by existing testcases.

  • rendering/RenderLayer.cpp:

(WebCore::RenderLayer::calculateClipRects):

LayoutTests:

Rebaselining.

  • fast/table/overflow-table-collapsed-borders-section-self-painting-layer-painting-expected.txt:
8:40 AM Changeset in webkit [205969] by commit-queue@webkit.org
  • 5 edits in trunk

test262: Should be a SyntaxError for duplicate parameter names in function with default parameters
https://bugs.webkit.org/show_bug.cgi?id=162013

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2016-09-15
Reviewed by Saam Barati.

JSTests:

  • stress/es6-default-parameters.js:
  • test262.yaml:

Source/JavaScriptCore:

https://tc39.github.io/ecma262/#sec-function-definitions-static-semantics-early-errors
It is a Syntax Error if IsSimpleParameterList of FormalParameterList is
false and BoundNames of FormalParameterList contains any duplicate elements.

Non-simple parameter lists include rest parameters, destructuring,
and default parameters.

  • parser/Parser.cpp:

(JSC::Parser<LexerType>::parseFormalParameters):
Previously, we were not failing if there were default parameters
early in the parameter list that were not yet identified as duplicates
and simple parameters later were duplicates. Now, we fail if there
are default parameters anywhere in the parameter list with a duplicate.

8:30 AM Changeset in webkit [205968] by Jonathan Bedard
  • 3 edits in trunk/Tools

Move --no-sample-on-timeout to config.json for each bot
https://bugs.webkit.org/show_bug.cgi?id=161964

Reviewed by Daniel Bates.

Roll out changes from 205573 and move them into config.json. At this time, only macOS and iOS simulator sample a process on timeout, —no-sample-on-timeout is unneeded for GTK, EFL and Windows.

  • BuildSlaveSupport/build.webkit.org-config/config.json: Each bot now independently defines if it will be running sample on timeout.
  • BuildSlaveSupport/build.webkit.org-config/master.cfg:

(RunWebKitTests.start): Rolled out changes from 205573.

4:18 AM Changeset in webkit [205967] by Csaba Osztrogonác
  • 8 edits in trunk

js/stringimpl-to-jsstring-on-large-strings tests consume huge memory
https://bugs.webkit.org/show_bug.cgi?id=159807

Reviewed by Saam Barati.

Tools:

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

(RunRemoteJavaScriptCoreTests.start): JSCOnly bots are memory limited devices, tests should run with --memory-limited option.

  • Scripts/run-javascriptcore-tests:

(runJSCStressTests): Pass through --memory-limited option to run-jsc-stress-tests.

  • Scripts/run-jsc-stress-tests: Typo fix.

LayoutTests:

  • js/script-tests/stringimpl-to-jsstring-on-large-strings-1.js: Skipped on memory limited devices.
  • js/script-tests/stringimpl-to-jsstring-on-large-strings-2.js: Skipped on memory limited devices.
  • js/script-tests/stringimpl-to-jsstring-on-large-strings-3.js: Skipped on memory limited devices.
2:45 AM Changeset in webkit [205966] by svillar@igalia.com
  • 14 edits
    4 adds in trunk

[css-grid] Implement fit-content track size
https://bugs.webkit.org/show_bug.cgi?id=161379

Reviewed by Manuel Rego Casasnovas.

Source/WebCore:

This implements the new <fit-content> track size which is defined as follows: "Represents
the formula min(max-content, max(auto, argument)), which is calculated similar to auto
(i.e. minmax(auto, max-content)), except that the track size is clamped at argument if it is
greater than the auto minimum."

From the parsing POV fit-content was implemented as a new type of function which only takes
one argument. That forced us to refactor some code because minmax() was the only allowed
function for <track-size>s so far.

The implementation key is a new attribute in GridTrack called growthLimitCap which is
precisely the single attribute of fit-content(). Some parts of the track sizing algorithm
were adapted to this change like for example the sorting of tracks by growth potential (we
need to consider the caps).

Tests: fast/css-grid-layout/fit-content-columns.html
fast/css-grid-layout/fit-content-rows.html

  • css/CSSComputedStyleDeclaration.cpp:

(WebCore::specifiedValueForGridTrackSize): Added support for fit-content sizes.

  • css/StyleBuilderConverter.h:

(WebCore::StyleBuilderConverter::createGridTrackSize): Added support for fit-content sizes.

  • css/parser/CSSParser.cpp:

(WebCore::isGridTrackFixedSized): Added support for fit-content sizes.
(WebCore::CSSParser::parseGridTrackSize): Added support for parsing fit-content() functions.

  • css/parser/CSSPropertyParser.cpp: Added support for parsing fit-content() functions so

it'll be available once we switch to the new parser.

  • rendering/RenderGrid.cpp:

(WebCore::GridTrack::baseSize): Just return a LayoutUnit, the return value optimization will
keep it fast in any case.
(WebCore::GridTrack::growthLimit): Ditto.
(WebCore::GridTrack::setGrowthLimit): Added an ASSERT to check that the growth limit is
never higher than the cap.
(WebCore::GridTrack::infiniteGrowthPotential):
(WebCore::GridTrack::plannedSize): Just return a LayoutUnit, the return value optimization will
keep it fast in any case.
(WebCore::GridTrack::tempSize): Just return a LayoutUnit, the return value optimization will
keep it fast in any case.
(WebCore::GridTrack::setTempSize): Added as we no longer return a reference in tempSize().
(WebCore::GridTrack::growTempSize): New utility function which increases the tempSize.
(WebCore::GridTrack::setInfinitelyGrowable):
(WebCore::GridTrack::setGrowthLimitCap): Added.
(WebCore::GridTrack::growthLimitCap): Ditto.
(WebCore::GridTrack::growthLimitIsInfinite): Made private.
(WebCore::RenderGrid::GridSizingData::freeSpace): Renamed from freeSpaceForDirection.
(WebCore::RenderGrid::GridSizingData::availableSpace): We now cache the available space as
it is used to compute relative (percentage) sizes.
(WebCore::RenderGrid::GridSizingData::setAvailableSpace): Ditto.
(WebCore::RenderGrid::GridSizingData::setFreeSpace): Renamed from setFreeSpaceForDirection.
(WebCore::RenderGrid::computeTrackSizesForDirection): Receives the available space instead
of the free space.
(WebCore::RenderGrid::computeIntrinsicLogicalWidths): Properly initialize free and available
spaces.
(WebCore::RenderGrid::computeIntrinsicLogicalHeight): Ditto.
(WebCore::RenderGrid::computeUsedBreadthOfGridTracks): Use available space to initialize the
track sizes. Also use sizingOperation to decide whether or not sizes are indefinite. Last
but not least, added support for fit-content tracks.
(WebCore::RenderGrid::computeUsedBreadthOfMinLength): Pass a GridTrackSize instead of a GridLength.
(WebCore::RenderGrid::computeUsedBreadthOfMaxLength): Ditto.
(WebCore::RenderGrid::gridTrackSize): Added support for fit-content.
(WebCore::RenderGrid::resolveContentBasedTrackSizingFunctions): Ditto.
(WebCore::RenderGrid::resolveContentBasedTrackSizingFunctionsForNonSpanningItems): Ditto.
(WebCore::trackSizeForTrackSizeComputationPhase):
(WebCore::sortByGridTrackGrowthPotential): Reworked the function so it properly sorts tracks
with growth limit caps to support fit-content().
(WebCore::clampGrowthShareIfNeeded): Clamps the given growthShare passed as argument to the
track growth limit cap.
(WebCore::RenderGrid::distributeSpaceToTracks): Use the new setTempSize() method. Also sort
the selected tracks to grow over growth limits in order to respect the track caps eventually
set by fit-content (otherwise those tracks could indefinitely grow over the specified value).
(WebCore::RenderGrid::tracksAreWiderThanMinTrackBreadth): Use the new defined functions.
(WebCore::RenderGrid::applyStretchAlignmentToTracksIfNeeded): Use freeSpace().
(WebCore::RenderGrid::populateGridPositionsForDirection): Ditto.
(WebCore::GridTrack::infinitelyGrowable): Deleted.
(WebCore::RenderGrid::GridSizingData::freeSpaceForDirection): Deleted.
(WebCore::RenderGrid::GridSizingData::setFreeSpaceForDirection): Deleted.
(WebCore::RenderGrid::trackSizeForTrackSizeComputationPhase): Deleted.

  • rendering/RenderGrid.h: Changed the signature of some methods. Moved

TrackSizeComputationPhase out of the RenderGrid class.

  • rendering/style/GridTrackSize.h:

(WebCore::GridTrackSize::GridTrackSize): Added some extra documentation. Added a new
attribute to the constructor to support fit-content GridTrackSizes.
(WebCore::GridTrackSize::fitContentTrackBreadth): New method which returns the growth limit
cap set by fit-content().
(WebCore::GridTrackSize::minTrackBreadth):
(WebCore::GridTrackSize::isFitContent): Added.
(WebCore::GridTrackSize::length): Deleted.
(WebCore::GridTrackSize::isPercentage): Deleted.

LayoutTests:

New tests to verify that fit-content track sizes work as expected for columns and for
rows. Also added some more test cases to verify that we properly parse fit-content().

  • fast/css-grid-layout/fit-content-columns-expected.html: Added.
  • fast/css-grid-layout/fit-content-columns.html: Added.
  • fast/css-grid-layout/fit-content-rows-expected.html: Added.
  • fast/css-grid-layout/fit-content-rows.html: Added.
  • fast/css-grid-layout/grid-auto-columns-rows-get-set-expected.txt:
  • fast/css-grid-layout/grid-auto-columns-rows-get-set.html:
  • fast/css-grid-layout/grid-columns-rows-get-set-expected.txt:
  • fast/css-grid-layout/grid-columns-rows-get-set.html:
  • fast/css-grid-layout/resources/grid-columns-rows-get-set.js:
2:24 AM Changeset in webkit [205965] by commit-queue@webkit.org
  • 3 edits in trunk/Source/WebCore

Fix build warnings in the mediastream code
https://bugs.webkit.org/show_bug.cgi?id=161957

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

  • platform/mediastream/MediaConstraints.cpp:

(WebCore::MediaConstraint::create): Added assertion and mock return.

  • platform/mediastream/RealtimeMediaSourceSupportedConstraints.cpp:

(WebCore::RealtimeMediaSourceSupportedConstraints::nameForConstraint):
Added assertion and mock return.
(WebCore::RealtimeMediaSourceSupportedConstraints::supportsConstraint):
Added assertion and mock return.

2:15 AM Changeset in webkit [205964] by commit-queue@webkit.org
  • 3 edits in trunk/Source/WebCore

Rebase binding tests after r205953
https://bugs.webkit.org/show_bug.cgi?id=162012

Unreviewed.

Patch by Youenn Fablet <youenn@apple.com> on 2016-09-15

  • bindings/scripts/test/JS/JSTestNode.cpp:

(WebCore::jsTestNodePrototypeFunctionTestWorkerPromise):
(WebCore::jsTestNodePrototypeFunctionTestWorkerPromisePromise):

  • bindings/scripts/test/JS/JSTestObj.cpp:

(WebCore::jsTestObjPrototypeFunctionTestPromiseFunction):
(WebCore::jsTestObjPrototypeFunctionTestPromiseFunctionPromise):
(WebCore::jsTestObjPrototypeFunctionTestPromiseFunctionWithFloatArgument):
(WebCore::jsTestObjPrototypeFunctionTestPromiseFunctionWithFloatArgumentPromise):
(WebCore::jsTestObjPrototypeFunctionTestPromiseFunctionWithException):
(WebCore::jsTestObjPrototypeFunctionTestPromiseFunctionWithExceptionPromise):
(WebCore::jsTestObjPrototypeFunctionTestPromiseFunctionWithOptionalIntArgument):
(WebCore::jsTestObjPrototypeFunctionTestPromiseFunctionWithOptionalIntArgumentPromise):
(WebCore::jsTestObjPrototypeFunctionTestPromiseOverloadedFunction1):
(WebCore::jsTestObjPrototypeFunctionTestPromiseOverloadedFunction1Promise):
(WebCore::jsTestObjPrototypeFunctionTestPromiseOverloadedFunction2):
(WebCore::jsTestObjPrototypeFunctionTestPromiseOverloadedFunction2Promise):
(WebCore::jsTestObjConstructorFunctionTestStaticPromiseFunction):
(WebCore::jsTestObjConstructorFunctionTestStaticPromiseFunctionPromise):
(WebCore::jsTestObjConstructorFunctionTestStaticPromiseFunctionWithException):
(WebCore::jsTestObjConstructorFunctionTestStaticPromiseFunctionWithExceptionPromise):

2:12 AM Changeset in webkit [205963] by Carlos Garcia Campos
  • 1 copy in releases/WebKitGTK/webkit-2.13.92

WebKitGTK+ 2.13.92

2:11 AM Changeset in webkit [205962] by Carlos Garcia Campos
  • 4 edits in releases/WebKitGTK/webkit-2.14

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

.:

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

Source/WebKit2:

  • gtk/NEWS: Add release notes for 2.13.92.
1:47 AM Changeset in webkit [205961] by commit-queue@webkit.org
  • 6 edits in trunk

[WebRTC][OpenWebRTC] crash in maybeHandleChangeMutedState
https://bugs.webkit.org/show_bug.cgi?id=161619

Source/WebCore:

Added OpenWebRTC support to the RealtimeMediaSource mock class.

Patch by Alejandro G. Castro <alex@igalia.com> on 2016-09-15
Reviewed by Eric Carlson.

Fixed tests.

  • platform/mediastream/openwebrtc/RealtimeMediaSourceOwr.h:

(WebCore::RealtimeMediaSourceOwr::RealtimeMediaSourceOwr): Allowed
inheritance of the class, required to use it when creating the
mock class. Added a new constructor to create the class with null
mediastream.

  • platform/mock/MockRealtimeMediaSource.cpp:

(WebCore::MockRealtimeMediaSource::MockRealtimeMediaSource): Use
the new BaseRealtimeMediaSourceClass in the constructor.

  • platform/mock/MockRealtimeMediaSource.h: Added a new

BaseRealtimeMediaSourceClass defined using the
RealtimeMediaSourceOwr class for OpenWebRTC platform.

LayoutTests:

Patch by Alejandro G. Castro <alex@igalia.com> on 2016-09-15
Reviewed by Eric Carlson.

  • platform/gtk/TestExpectations: Modify the expectations, the

tests do not crash anymore.

1:42 AM Changeset in webkit [205960] by svillar@igalia.com
  • 5 edits in trunk

[css-grid] Fix intrinsic size computation with flexible sized tracks
https://bugs.webkit.org/show_bug.cgi?id=161903

Reviewed by Manuel Rego Casasnovas.

Source/WebCore:

This is fixing a regression added in r192154. When computing the min content size of a grid
container (min preferred logical width) we should not take into account the fr tracks. As
stated in the early versions of the spec that size is the sum of the tracks' base sizes
before running the maximize tracks step.

That regression was causing sizing issues in grids with fr tracks both when under
min|max-content constrains and also when used as grid items (in nested grids).

  • rendering/RenderGrid.cpp:

(WebCore::RenderGrid::computeUsedBreadthOfGridTracks):

LayoutTests:

Added a couple of new test cases, grid with fr tracks inside a container with intrinsic
dimensions and and grid with fr tracks inside another grid with fr tracks.

  • fast/css-grid-layout/flex-and-intrinsic-sizes-expected.txt:
  • fast/css-grid-layout/flex-and-intrinsic-sizes.html:
1:11 AM Changeset in webkit [205959] by Carlos Garcia Campos
  • 26 edits
    4 adds in releases/WebKitGTK/webkit-2.14/Source

Merge r205909 - [GTK][Wayland] Implement clipboard support
https://bugs.webkit.org/show_bug.cgi?id=146574

Patch by Carlos Garnacho <carlosg@gnome.org> on 2016-09-14
Reviewed by Carlos Garcia Campos.

Source/WebCore:

Implement PlatformPasteboard in the GTK+ platform, and move Pasteboard
to using PasteboardStrategy so clipboard management is left to the
UIProcess.

DataObjectGtk is still used in the Pasteboard GTK implementation, it's
now just never backed by a GtkClipboard, this object is instead
serialized through PasteboardStrategy, so the UIProcess side can mirror
the content in a GtkClipboard-backed DataObjectGtk, which is then
exposed to the windowing through PlatformPasteboard/PasteboardHelper.

When requesting clipboard content, it works similarly, the UIProcess
side first updates its DataObjectGtk, which is then mirrored by the
WebProcess through the PasteboardStrategy requests.

  • PlatformGTK.cmake: Added PlatformPasteboardGtk.cpp
  • editing/gtk/EditorGtk.cpp:

(WebCore::Editor::writeSelectionToPasteboard): Eliminate usage of
PasteboardWebContent callback argument. This is done differently as
we have to signal back the WebProcess.

  • platform/Pasteboard.h: Cleaned up of direct GTK+ dependency.
  • platform/PasteboardStrategy.h: Added plumbing towards the pasteboard

proxy.

  • platform/PlatformPasteboard.h:
  • platform/gtk/DataObjectGtk.cpp:

(WebCore::DataObjectGtk::clearAllExceptFilenames): Clear the "smart
paste" flag if set, now that this is DataObjectGtk data.

  • platform/gtk/DataObjectGtk.h:

(WebCore::DataObjectGtk::canSmartReplace):
(WebCore::DataObjectGtk::setCanSmartReplace): Added functions, in order
to flag whether a DataObjectGtk has the "smart paste" feature enabled
or not.

  • platform/gtk/PasteboardGtk.cpp:

(WebCore::Pasteboard::createForCopyAndPaste):
(WebCore::Pasteboard::createForGlobalSelection):
(WebCore::Pasteboard::Pasteboard):
(WebCore::Pasteboard::writeToClipboard):
(WebCore::Pasteboard::readFromClipboard):
(WebCore::Pasteboard::writePlainText):
(WebCore::Pasteboard::write):
(WebCore::Pasteboard::writePasteboard):
(WebCore::Pasteboard::clear):
(WebCore::Pasteboard::canSmartReplace):
(WebCore::Pasteboard::read):
(WebCore::Pasteboard::hasData):
(WebCore::Pasteboard::types):
(WebCore::Pasteboard::readString):
(WebCore::Pasteboard::readFilenames): Made to use the
PasteboardStrategy instead of PasteboardHelper/GTK+ API.

  • platform/gtk/PasteboardHelper.cpp:

(WebCore::PasteboardHelper::~PasteboardHelper):
(WebCore::ClipboardSetData::ClipboardSetData):
(WebCore::clearClipboardContentsCallback):
(WebCore::PasteboardHelper::writeClipboardContents): Remove the GClosure
to notify whether the global selection has been replaced. Use std:function
instead. Remove SmartPasteInclusion argument, now figured out through
DataObjectGtk canSmartPaste() member.

  • platform/gtk/PasteboardHelper.h:
  • platform/gtk/PlatformPasteboardGtk.cpp: Added.

(WebCore::PlatformPasteboard::PlatformPasteboard):
(WebCore::PlatformPasteboard::writeToClipboard):
(WebCore::PlatformPasteboard::readFromClipboard): Implemented
PlatformPasteboard using PasteboardHelper/GTK+ API.

Source/WebKit2:

Add the necessary plumbing for the GTK+ backend to use the
PlatformPasteboard in WebCore. All selection data is transmitted
at once through the serialization of PasteboardContentGtk/DataObjectGtk.

  • PlatformGTK.cmake: Add PasteboardContentGtk.cpp and

WebPasteboardProxyGtk.cpp

  • Shared/gtk/ArgumentCodersGtk.cpp:

(IPC::encode):
(IPC::decode): Renamed from encodeDataObject/decodeDataObject
and made public.
(IPC::ArgumentCoder<DragData>::encode):
(IPC::ArgumentCoder<DragData>::decode): Update DataObjectGtk
encode/decode callers. Encode the extra canSmartReplace field.

  • Shared/gtk/ArgumentCodersGtk.h: Expose encode/decode methods for

DataObjectGtk.

  • Shared/gtk/PasteboardContent.cpp: Added. Wraps a DataObjectGtk

so it can be serialized on WebProcess/UIProcess messaging.
(WebKit::PasteboardContent::PasteboardContent):
(WebKit::PasteboardContent::encode):
(WebKit::PasteboardContent::decode): Methods to encode/decode a
PasteboardContent.

  • Shared/gtk/PasteboardContent.h: Added.
  • UIProcess/WebFrameProxy.cpp:

(WebKit::WebFrameProxy::collapseSelection): Added plumbing to allow
collapsing the global selection from the UI process side.

  • UIProcess/WebFrameProxy.h:
  • UIProcess/WebPasteboardProxy.h:
  • UIProcess/WebPasteboardProxy.messages.in: Added plumbing for the

GTK+ pasteboard proxy functions.

  • UIProcess/gtk/WebPageProxyGtk.cpp:

(WebKit::WebPageProxy::editorStateChanged):

  • UIProcess/gtk/WebPasteboardProxyGtk.cpp: Added.

(WebKit::WebPasteboardProxy::writeToClipboard):
(WebKit::WebPasteboardProxy::readFromClipboard): Implemented functions
hooking into the PlatformPasteboard. Per-selection (ie.
primary/clipboard) PlatformPasteboards are kept at this level, so those
are independently set and dealt with.
(WebKit::WebPasteboardProxy::setPrimarySelectionOwner):
(WebKit::WebPasteboardProxy::didDestroyFrame): Implemented functions
to manage the frame currently being currently interacted, so we can
signal back when the global selection has been replaced.

  • WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:

(WebKit::WebPlatformStrategies::writeToClipboard):
(WebKit::WebPlatformStrategies::readFromClipboard): Added methods to
send the WebProcess->UIProcess messages.

  • WebProcess/WebCoreSupport/WebPlatformStrategies.h:
  • WebProcess/WebCoreSupport/gtk/WebEditorClientGtk.cpp:

(WebKit::WebEditorClient::updateGlobalSelection): Remove GClosure to
get notifications about changes in global selection ownership. This
is done through a WebPage message now, as the UI process manages the
clipboard.

  • WebProcess/WebPage/WebPage.h:
  • WebProcess/WebPage/WebPage.messages.in:
  • WebProcess/WebPage/gtk/WebPageGtk.cpp:

(WebKit::WebPage::collapseSelectionInFrame): Added methods to send
the UIProcess->WebProcess notification that the global selection has
been replaced.

1:02 AM Changeset in webkit [205958] by Carlos Garcia Campos
  • 12 edits in releases/WebKitGTK/webkit-2.14/Source

Merge r205860 - [GTK] Get rid of DataObjectGtk::forClipboard and cleanup pasteboard code
https://bugs.webkit.org/show_bug.cgi?id=161907

Reviewed by Michael Catanzaro.

Source/WebCore:

We don't really need to keep a DataObjectGtk for every clipboard, we could simply pass the DataObjectGtk to read
and write methods of PasteboardHelper.

  • editing/gtk/EditorGtk.cpp:

(WebCore::createFragmentFromPasteboardData): Update for DataObjectGtk API changes.

  • platform/Pasteboard.h:
  • platform/gtk/DataObjectGtk.cpp: Remove forClipboard() static method.
  • platform/gtk/DataObjectGtk.h: Ditto.
  • platform/gtk/PasteboardGtk.cpp:

(WebCore::Pasteboard::Pasteboard): Always create a new DataObjectGtk.
(WebCore::Pasteboard::dataObject): Return a const reference instead of a pointer.
(WebCore::Pasteboard::writePlainText): Pass the DataObjectGtk to PasteboardHelper.
(WebCore::Pasteboard::write): Ditto.
(WebCore::Pasteboard::writePasteboard): Ditto.
(WebCore::Pasteboard::clear): Ditto.
(WebCore::Pasteboard::read): Ditto.
(WebCore::Pasteboard::hasData): Ditto.
(WebCore::Pasteboard::types): Ditto.
(WebCore::Pasteboard::readString): Ditto.
(WebCore::Pasteboard::readFilenames): Ditto.

  • platform/gtk/PasteboardHelper.cpp:

(WebCore::PasteboardHelper::getClipboardContents): Update the given DataObjectGtk.
(WebCore::PasteboardHelper::fillSelectionData): Use a const reference to DataObjectGtk instead of a pointer.
(WebCore::PasteboardHelper::targetListForDataObject): Ditto.
(WebCore::PasteboardHelper::fillDataObjectFromDropData): Use a reference to DataObjectGtk instead of a pointer.
(WebCore::ClipboardSetData::ClipboardSetData): Helper struct to pass DataObjectGtk and callback to clipboard callbacks.
(WebCore::ClipboardSetData::~ClipboardSetData):
(WebCore::getClipboardContentsCallback): Get the DataObjectGtk from ClipboardSetData struct passed as user data.
(WebCore::clearClipboardContentsCallback): Get the DataObjectGtk and callback from ClipboardSetData struct
passed as user data.
(WebCore::PasteboardHelper::writeClipboardContents): Write the given DataObjectGtk.

  • platform/gtk/PasteboardHelper.h:

Source/WebKit2:

Update to DataObjectGtk and PasteboardHelper API changes.

  • UIProcess/gtk/DragAndDropHandler.cpp:

(WebKit::DragAndDropHandler::startDrag):
(WebKit::DragAndDropHandler::fillDragData):
(WebKit::DragAndDropHandler::dataObjectForDropData):

  • WebProcess/WebCoreSupport/gtk/WebDragClientGtk.cpp:

(WebKit::WebDragClient::startDrag):

  • WebProcess/WebCoreSupport/gtk/WebEditorClientGtk.cpp:

(WebKit::collapseSelection):
(WebKit::WebEditorClient::updateGlobalSelection): Remove wrong X11 guards, since that code is not X11 specific.

1:00 AM Changeset in webkit [205957] by Carlos Garcia Campos
  • 2 edits in releases/WebKitGTK/webkit-2.14/Source/WebCore

Merge r205853 - [GTK] Scrollbar too large
https://bugs.webkit.org/show_bug.cgi?id=161735

Reviewed by Michael Catanzaro.

We were not calculating the total scrollbar size correctly when the theme defines a minimum width/height. In
that case we need to take the extra size into account (border, margin, padding), but not adding the minimum
size. We were also adjusting the thumb position when rendering in indicator mode, but we really need to adjust
the whole rectangle. This worked in Adwaita because it uses a transparent track when in indicator mode. We are
also now taking into account the text direction when doing this adjustment for the indicator mode.

  • platform/gtk/ScrollbarThemeGtk.cpp:

(WebCore::ScrollbarThemeGtk::paint):
(WebCore::ScrollbarThemeGtk::scrollbarThickness):

12:59 AM Changeset in webkit [205956] by Carlos Garcia Campos
  • 5 edits in releases/WebKitGTK/webkit-2.14/Source/WebCore

Merge r205852 - [GTK] Crash of WebProcess on the last WebView disconnect (take two)
https://bugs.webkit.org/show_bug.cgi?id=161842

Reviewed by Michael Catanzaro.

The problem is that when PlatformDisplayX11 is destroyed, the sharing GL context is deleted and its destructor
makes a downcast of PlatformDisplay to get the native X11 display. We could simply keep a pointer to the native
X11 display in GLContextGLX, got at construction time from the PlatformDisplay, and ensure the sharing GL
context is deleted before the native X11 display is closed.

  • platform/graphics/PlatformDisplay.h: Make m_sharingGLContext protected.
  • platform/graphics/glx/GLContextGLX.cpp:

(WebCore::GLContextGLX::GLContextGLX): Initialize m_x11Display.
(WebCore::GLContextGLX::~GLContextGLX): Use m_x11Display and remove confusing comment about possible crash with
nviedia closed drivers.
(WebCore::GLContextGLX::defaultFrameBufferSize): Use m_x11Display.
(WebCore::GLContextGLX::makeContextCurrent): Ditto.
(WebCore::GLContextGLX::swapBuffers): Ditto.
(WebCore::GLContextGLX::swapInterval): Ditto.
(WebCore::GLContextGLX::cairoDevice): Ditto.

  • platform/graphics/glx/GLContextGLX.h:
  • platform/graphics/x11/PlatformDisplayX11.cpp:

(WebCore::PlatformDisplayX11::~PlatformDisplayX11): Delete the sharing GL context before closing the display.

12:50 AM Changeset in webkit [205955] by Carlos Garcia Campos
  • 2 edits in releases/WebKitGTK/webkit-2.14

Merge r205672 - [CMake] Build failure with GCC 6 (fatal error: stdlib.h: No such file or directory)
https://bugs.webkit.org/show_bug.cgi?id=161697

Reviewed by Michael Catanzaro.

Get the list of system includes from GCC and add it to the CMake
list of implicit includes. This way, CMake will filter any of this
directories from the list of includes when calling the compiler.

This avoids an issue with GCC 6 that causes build failures when
including the default include path as a system include (-isystem).

  • Source/cmake/OptionsCommon.cmake:
12:40 AM Changeset in webkit [205954] by svillar@igalia.com
  • 5 edits in trunk

[css-grid] Too many gaps with trailing collapsing tracks
https://bugs.webkit.org/show_bug.cgi?id=161905

Reviewed by Darin Adler.

Source/WebCore:

The total number and size of gaps were incorrectly computed whenever there were trailing
collapsed tracks (with collapsed gaps). The problem was that we were trying to optimize too
much the amount of hash table queries required to know the gaps between two lines. We were
considering that a gap always exist between 2 consecutive tracks if the first one is not
empty. That's generally true (for both NOTEMPTY|NOTEMPTY and NOTEMPTY|EMPTY+|NOTEMPTY
sequences) but not for all the cases (NOTEMPTY|EMPTY+).

  • rendering/RenderGrid.cpp:

(WebCore::RenderGrid::guttersSize):

LayoutTests:

Added new test cases to check that trailing collapsed tracks do not add gutters at the end.

  • fast/css-grid-layout/grid-auto-fit-columns-expected.txt:
  • fast/css-grid-layout/grid-auto-fit-columns.html:
12:21 AM Changeset in webkit [205953] by commit-queue@webkit.org
  • 11 edits in trunk

callPromiseFunction should be made usable for custom binding code
https://bugs.webkit.org/show_bug.cgi?id=161961

Patch by Youenn Fablet <youenn@apple.com> on 2016-09-15
Reviewed by Darin Adler.

Source/WebCore:

Covered by updated test.

  • bindings/js/JSDOMBinding.h:

(WebCore::castThisValue): Utility function to cast this value to a specific type.

  • bindings/js/JSDOMPromise.h:

(WebCore::callPromiseFunction): Updated to take real promise function as a template parameter
for improved efficiency. Added workerMode template parameter.
(WebCore::bindingPromiseFunctionAdapter): Function signature adaptor.

  • bindings/js/JSMediaDevicesCustom.cpp:

(WebCore::JSMediaDevicesGetUserMediaPromiseFunction):
(WebCore::JSMediaDevices::getUserMedia): Making use of callPromiseFunction to properly handle exceptions.

  • bindings/scripts/CodeGeneratorJS.pm:

(GenerateImplementation): Updated to use template parameter.

  • bindings/scripts/test/JS/JSTestNode.cpp:

(WebCore::jsTestNodePrototypeFunctionTestWorkerPromise):
(WebCore::jsTestNodePrototypeFunctionTestWorkerPromisePromise):

  • bindings/scripts/test/JS/JSTestObj.cpp:

(WebCore::jsTestObjPrototypeFunctionTestPromiseFunction):
(WebCore::jsTestObjPrototypeFunctionTestPromiseFunctionWithFloatArgument):
(WebCore::jsTestObjPrototypeFunctionTestPromiseFunctionWithException):
(WebCore::jsTestObjPrototypeFunctionTestPromiseFunctionWithOptionalIntArgument):
(WebCore::jsTestObjPrototypeFunctionTestPromiseOverloadedFunction1):
(WebCore::jsTestObjPrototypeFunctionTestPromiseOverloadedFunction2):
(WebCore::jsTestObjConstructorFunctionTestStaticPromiseFunction):
(WebCore::jsTestObjConstructorFunctionTestStaticPromiseFunctionWithException):

  • bindings/scripts/test/TestNode.idl: Adding Worker promise binding test.

LayoutTests:

  • fast/mediastream/MediaDevices-getUserMedia-expected.txt:
  • fast/mediastream/MediaDevices-getUserMedia.html: Updated to expect a rejected promise in lieu of an exception.
Note: See TracTimeline for information about the timeline view.