Timeline



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.

Sep 14, 2016:

11:57 PM Changeset in webkit [205952] by bshafiei@apple.com
  • 14 edits
    3 adds in branches/safari-602-branch

Merge r205938. rdar://problem/28227805

11:57 PM Changeset in webkit [205951] by bshafiei@apple.com
  • 5 edits in branches/safari-602-branch

Merge r205878. rdar://problem/28229827

11:57 PM Changeset in webkit [205950] by bshafiei@apple.com
  • 11 edits
    1 copy
    3 adds in branches/safari-602-branch

Merge r205870. rdar://problem/28225774

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

Merge r205935. rdar://problem/26013388

11:56 PM Changeset in webkit [205948] by bshafiei@apple.com
  • 6 edits in branches/safari-602-branch/Source/WebKit2

Merge r205934. rdar://problem/26013388

11:56 PM Changeset in webkit [205947] by bshafiei@apple.com
  • 6 edits in branches/safari-602-branch/Source/WebKit2

Merge r205928. rdar://problem/26013388

9:54 PM Changeset in webkit [205946] by Matt Baker
  • 2 edits in trunk/Source/WebInspectorUI

Web Inspector: Call frame is sometimes not selected in Debugger sidebar on initial pause
https://bugs.webkit.org/show_bug.cgi?id=161835
<rdar://problem/28236680>

Reviewed by Joseph Pecoraro.

  • UserInterface/Views/NavigationSidebarPanel.js:

(WebInspector.NavigationSidebarPanel):
(WebInspector.NavigationSidebarPanel.prototype._contentTreeOutlineTreeSelectionDidChange):
If a tree other than the newly selected element's tree has the selection,
deselect it to prevent multiple tree selections.
(WebInspector.NavigationSidebarPanel.prototype.show): Deleted.
Not needed since the selected tree is no longer tracked. Incidentally,
SidebarPanel.show was only called by SearchSidebarPanel, which doesn't need
to manage selection across multiple tree outlines.

9:32 PM Changeset in webkit [205945] by jiewen_tan@apple.com
  • 4 edits in trunk/LayoutTests

Unreviewed, update ios-simulator-wk1 test expectations after migrating to iOS 10

  • platform/ios-simulator-wk1/TestExpectations:
  • platform/ios-simulator-wk2/TestExpectations:
  • platform/ios-simulator/TestExpectations:
6:14 PM Changeset in webkit [205944] by commit-queue@webkit.org
  • 5 edits in trunk

ASSERT_NOT_REACHED when using spread inside an array literal with Function.prototype.apply
https://bugs.webkit.org/show_bug.cgi?id=162003

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

JSTests:

  • stress/spread-calling.js:
  • test262.yaml:

Source/JavaScriptCore:

  • bytecompiler/NodesCodegen.cpp:

(JSC::ArrayNode::isSimpleArray):
Don't treat an Array that has a spread expression inside it as simple.
This avoids a fast path for f.apply(x, simpleArray) that was not handling
spread expressions within arrays, and instead taking a path that can
handle the spreading.

6:08 PM Changeset in webkit [205943] by bshafiei@apple.com
  • 5 edits in branches/safari-602-branch/Source

Versioning.

5:33 PM Changeset in webkit [205942] by commit-queue@webkit.org
  • 14 edits in trunk/Source

Unreviewed, rolling out r205933 and r205936.
https://bugs.webkit.org/show_bug.cgi?id=162002

broke the build (Requested by keith_miller on #webkit).

Reverted changesets:

"Pragma out undefined-var-template warnings in JSC for
JSObjects that are templatized"
https://bugs.webkit.org/show_bug.cgi?id=161985
http://trac.webkit.org/changeset/205933

"Unreviewed, fix the Windows build."
http://trac.webkit.org/changeset/205936

5:19 PM Changeset in webkit [205941] by jiewen_tan@apple.com
  • 21 edits
    4 adds
    2 deletes in trunk

WebCrypto algorithms should be exposed via KeyAlgorithm dictionary
https://bugs.webkit.org/show_bug.cgi?id=128748
<rdar://problem/27359438>

Reviewed by Brent Fulgham and Chris Dumez.

Source/WebCore:

Replace custom CryptoAlgorithmBuilder/buildAlgorithmDescription with KeyAlgorithm dictionary which is
defined by the spec: https://www.w3.org/TR/WebCryptoAPI/#key-algorithm-dictionary. Moreover, mark
CryptoKey.usages as CachedAttribute.

Tests: crypto/subtle/crypto-key-algorithm-gc.html

crypto/subtle/crypto-key-usages-gc.html

  • PlatformEfl.cmake:
  • PlatformGTK.cmake:
  • PlatformMac.cmake:

Remove CryptoAlgorithmDescriptionBuilder.cpp.

  • WebCore.xcodeproj/project.pbxproj:
  • bindings/js/JSCryptoAlgorithmBuilder.cpp:

(WebCore::JSCryptoAlgorithmBuilder::add):
(WebCore::JSCryptoAlgorithmBuilder::createEmptyClone): Deleted.

  • bindings/js/JSCryptoAlgorithmBuilder.h:
  • bindings/js/JSCryptoKeyCustom.cpp:

(WebCore::JSCryptoKey::algorithm):
Get rid of dependency on CryptoAlgorithmDescriptionBuilder.

  • crypto/CryptoAlgorithmDescriptionBuilder.cpp: Removed.
  • crypto/CryptoAlgorithmDescriptionBuilder.h: Removed.

Replace it with KeyAlgorithm.

  • crypto/CryptoKey.cpp:

(WebCore::CryptoKey::CryptoKey):
(WebCore::CryptoKey::buildAlgorithmDescription): Deleted.

  • crypto/CryptoKey.h:

(WebCore::KeyAlgorithm::KeyAlgorithm):
(WebCore::KeyAlgorithm::~KeyAlgorithm):
(WebCore::CryptoKey::algorithmIdentifier):

  • crypto/CryptoKey.idl:

Add KeyAlgorithm dictionary which is returned via CryptoKey.buildAlgorithm() method,
and rename m_algorithm to m_algorithmIdentifier to distingush it with newly
added KeyAlgorithm dictionary.

  • crypto/gnutls/CryptoKeyRSAGnuTLS.cpp:

(WebCore::buildAlgorithm):
(WebCore::CryptoKeyRSA::buildAlgorithmDescription): Deleted.

  • crypto/keys/CryptoKeyAES.cpp:

(WebCore::CryptoKeyAES::buildAlgorithm):
(WebCore::CryptoKeyAES::buildAlgorithmDescription): Deleted.

  • crypto/keys/CryptoKeyAES.h:

(WebCore::AesKeyAlgorithm::AesKeyAlgorithm):
(WebCore::AesKeyAlgorithm::~AesKeyAlgorithm):

  • crypto/keys/CryptoKeyHMAC.cpp:

(WebCore::CryptoKeyHMAC::buildAlgorithm):
(WebCore::CryptoKeyHMAC::buildAlgorithmDescription): Deleted.

  • crypto/keys/CryptoKeyHMAC.h:

(WebCore::HmacKeyAlgorithm::HmacKeyAlgorithm):
(WebCore::HmacKeyAlgorithm::~HmacKeyAlgorithm):

  • crypto/keys/CryptoKeyRSA.h:

(WebCore::RsaKeyAlgorithm::RsaKeyAlgorithm):
(WebCore::RsaKeyAlgorithm::~RsaKeyAlgorithm):
(WebCore::RsaHashedKeyAlgorithm::RsaHashedKeyAlgorithm):
(WebCore::RsaHashedKeyAlgorithm::~RsaHashedKeyAlgorithm):

  • crypto/mac/CryptoKeyRSAMac.cpp:

(WebCore::CryptoKeyRSA::buildAlgorithm):
(WebCore::CryptoKeyRSA::buildAlgorithmDescription): Deleted.

LayoutTests:

  • crypto/subtle/crypto-key-algorithm-gc-expected.txt: Added.
  • crypto/subtle/crypto-key-algorithm-gc.html: Added.
  • crypto/subtle/crypto-key-usages-gc-expected.txt: Added.
  • crypto/subtle/crypto-key-usages-gc.html: Added.
  • crypto/subtle/hmac-generate-key-expected.txt:
  • crypto/subtle/hmac-generate-key.html:
5:16 PM Changeset in webkit [205940] by bshafiei@apple.com
  • 1 copy in tags/Safari-602.2.8

New tag.

5:03 PM Changeset in webkit [205939] by Chris Dumez
  • 10 edits in trunk

REGRESSION (r205670): ASSERTION FAILED: methodTable(vm)->toThis(this, exec, NotStrictMode) == this
https://bugs.webkit.org/show_bug.cgi?id=161982

Reviewed by Saam Barati.

Source/JavaScriptCore:

Update JSProxy::setPrototype() to return false unconditionally instead
of forwarding the call to its target. We used to forward to the target
and then the JSDOMWindow's SetPrototypeOf would return false.
However, the JSC tests use a different GlobalObject and forwarding
the setPrototypeOf() call to the GlobalObject lead to hitting an
assertion. This patch aligns the behavior of the GlobalObject used by
the JSC tests with JSDOMWindow.

  • runtime/JSProxy.cpp:

(JSC::JSProxy::setPrototype):

Source/WebCore:

We no longer need a custom SetPrototypeOf anymore as JSProxy::setPrototypeOf()
no longer forwards the call to its target.

No new layout tests because the behavior only changes in the context of the JSC
tests (which were updated in this patch).

  • bindings/js/JSDOMWindowCustom.cpp:

(WebCore::JSDOMWindow::setPrototype): Deleted.

  • page/DOMWindow.idl:

LayoutTests:

Bring back JSC test coverage that got lost in r205670.

  • js/object-literal-shorthand-construction-expected.txt:
  • js/script-tests/object-literal-shorthand-construction.js:
  • js/script-tests/sloppy-getter-setter-global-object.js:
  • js/sloppy-getter-setter-global-object-expected.txt:
4:51 PM Changeset in webkit [205938] by Wenson Hsieh
  • 14 edits
    3 adds in trunk

Media controls behave strangely when changing media sources
https://bugs.webkit.org/show_bug.cgi?id=161914
<rdar://problem/28227805>

Reviewed by Tim Horton.

Source/WebCore:

Addresses media controls flickering while changing the source of a media element. To accomplish this, we make
the following changes to the media controls main content heuristic:

  • Prevent elements that are not mostly within the mainframe rect (or elements with empty rects) from showing media controls. Many websites that rely on same document navigation will move videos offscreen when navigating to a section of their site that does not play media. Without this check, we would not know to hide a video element on certain popular websites that use this technique, since the video has been interacted with in the past.
  • Rather than check whether a media element currently has video/audio sources, check whether it has ever had audio. Many websites will use the same media element across different videos and change only the source, and we should not prevent a media element from having media controls on grounds of having no audio or video in this case.
  • Rather than add user gesture and playback behavior restrictions before dispatching an ended event, add only the gesture restriction immediately, and add the playback restriction after waiting for a grace period only if the user has not interacted with the video since ending, and the video is not currently playing or about to play. This gives the user a chance to interact with the controls when a video ends, but also allows the page to load or begin playing a new video with the same media element without thrashing media control state.

Adds 3 new API tests.

  • html/HTMLMediaElement.cpp:

(WebCore::HTMLMediaElement::HTMLMediaElement):
(WebCore::HTMLMediaElement::~HTMLMediaElement):
(WebCore::HTMLMediaElement::mediaPlayerActiveSourceBuffersChanged):
(WebCore::HTMLMediaElement::seekWithTolerance):
(WebCore::HTMLMediaElement::beginScrubbing):
(WebCore::HTMLMediaElement::addBehaviorRestrictionsOnEndIfNecessary):
(WebCore::HTMLMediaElement::mediaPlayerCharacteristicChanged):
(WebCore::HTMLMediaElement::playbackControlsManagerBehaviorRestrictionsTimerFired):

  • html/HTMLMediaElement.h:

(WebCore::HTMLMediaElement::hasEverHadAudio):
(WebCore::HTMLMediaElement::hasEverHadVideo):

  • html/MediaElementSession.cpp:

(WebCore::MediaElementSession::canShowControlsManager):
(WebCore::isElementRectMostlyInMainFrame):

  • platform/graphics/MediaPlayer.h:

(WebCore::MediaPlayerClient::mediaPlayerActiveSourceBuffersChanged):

  • platform/graphics/MediaPlayerPrivate.h:

(WebCore::MediaPlayerPrivateInterface::notifyActiveSourceBuffersChanged):

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

(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::notifyActiveSourceBuffersChanged):

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

(WebCore::MediaSourcePrivateAVFObjC::removeSourceBuffer):
(WebCore::MediaSourcePrivateAVFObjC::sourceBufferPrivateDidChangeActiveState):

Source/WebKit2:

Allows a web page to have an active video for a media control manager even if no audio or video is currently
being produced. This is because the media element may be in a state where it is changing its source and does not
currently have a video or audio track.

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::hasActiveVideoForControlsManager):

Tools:

Adds three new unit tests verifying that media controls remain stable during common src change scenarios. Also
tweaks an existing test to account for new ended behavior.

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

(-[VideoControlsManagerTestWebView waitForMediaControlsToShow]):
(-[VideoControlsManagerTestWebView waitForMediaControlsToHide]):
(TestWebKitAPI::TEST):

  • TestWebKitAPI/Tests/WebKit2Cocoa/change-video-source-on-click.html: Added.
  • TestWebKitAPI/Tests/WebKit2Cocoa/change-video-source-on-end.html: Added.
  • TestWebKitAPI/Tests/WebKit2Cocoa/large-video-offscreen.html: Added.
4:17 PM Changeset in webkit [205937] by msaboff@apple.com
  • 5 edits
    1 add in trunk

YARR doesn't check for invalid flags for literal regular expressions
https://bugs.webkit.org/show_bug.cgi?id=161995

Reviewed by Mark Lam.

JSTests:

New test.

  • stress/regress-161995.js: Added.

(testStatic):
(catch):

Source/JavaScriptCore:

Added a new error and a check that the flags are valid when we create a
literal regular expression.

  • runtime/RegExp.cpp:

(JSC::RegExp::finishCreation):

  • yarr/YarrPattern.cpp:

(JSC::Yarr::YarrPattern::errorMessage):
(JSC::Yarr::YarrPattern::compile):

  • yarr/YarrPattern.h:
4:15 PM Changeset in webkit [205936] by keith_miller@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

Unreviewed, fix the Windows build.

  • runtime/HashMapImpl.cpp:
4:11 PM Changeset in webkit [205935] by Beth Dakin
  • 2 edits in trunk/Source/WebKit2

Add needsPlainTextQuirk and send it to the UIProcess
https://bugs.webkit.org/show_bug.cgi?id=161996
-and corresponding-
rdar://problem/26013388

Rubber-stamped by Simon Fraser.

Quick clean-up.

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::needsPlainTextQuirk):

4:00 PM Changeset in webkit [205934] by Beth Dakin
  • 6 edits in trunk/Source/WebKit2

Add needsPlainTextQuirk and send it to the UIProcess
https://bugs.webkit.org/show_bug.cgi?id=161996
-and corresponding-
rdar://problem/26013388

Reviewed by Anders Carlsson.

WebPageProxy should keep track of m_needsPlainTextQuirk.

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::setNeedsPlainTextQuirk):

  • UIProcess/WebPageProxy.h:

(WebKit::WebPageProxy::needsPlainTextQuirk):
(WebKit::WebPageProxy::needsHiddenContentEditableQuirk): Deleted.

  • UIProcess/WebPageProxy.messages.in:

If m_needsPlainTextQuirk is true, set it back to false on page transition.

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::didStartPageTransition):

The sites that need this quirk.
(WebKit::needsPlainTextQuirk):
(WebKit::WebPage::didChangeSelection):

  • WebProcess/WebPage/WebPage.h:
3:32 PM Changeset in webkit [205933] by keith_miller@apple.com
  • 13 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 Geoffrey Garen.

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.h:
  • 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/WTF:

Fix WTF_EXPORT_PRIVATE for an inline member function. This would
generate a weak export.

  • wtf/MetaAllocator.h:

(WTF::MetaAllocator::getLock):

3:27 PM Changeset in webkit [205932] by commit-queue@webkit.org
  • 13 edits in trunk

test262: TypedArray constructors length should be 3 and configurable
https://bugs.webkit.org/show_bug.cgi?id=161955

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2016-09-14
Reviewed by Mark Lam.

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/JSGenericTypedArrayViewConstructorInlines.h:

(JSC::JSGenericTypedArrayViewConstructor<ViewClass>::finishCreation):

LayoutTests:

  • js/script-tests/typedarray-constructors.js:
  • js/typedarray-constructors-expected.txt:
  • js/dom/constructor-length.html:
  • platform/efl/js/dom/constructor-length-expected.txt:
  • platform/gtk/js/dom/constructor-length-expected.txt:
  • platform/ios-simulator/js/dom/constructor-length-expected.txt:
  • platform/mac/js/dom/constructor-length-expected.txt:
  • platform/win/js/dom/constructor-length-expected.txt:
2:24 PM Changeset in webkit [205931] by commit-queue@webkit.org
  • 12 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-14
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):

2:15 PM Changeset in webkit [205930] by Matt Baker
  • 5 edits
    2 adds in trunk/Source/WebInspectorUI

Web Inspector: Call Stack tree in the Debugger sidebar should mark the active call frame
https://bugs.webkit.org/show_bug.cgi?id=161945
<rdar://problem/28293451>

Reviewed by Joseph Pecoraro.

Add an indicator for the active call frame tree element, patterned after
Xcode's call stack UI. The indicator should be positioned on the left,
with a fill color based on the tree element's selected/focused state.

  • UserInterface/Images/ActiveCallFrame.svg: Added.

Image for "active call frame" tree element status.

  • UserInterface/Main.html:

New file.

  • UserInterface/Views/CallFrameTreeElement.css: Added.

(.tree-outline .item.call-frame .status):
(.tree-outline .item.call-frame .status > .status-image):
(.tree-outline .item.call-frame.selected .status > .status-image):
(.tree-outline:matches(:focus, .force-focus) .item.call-frame.selected .status > .status-image):
New tree element styles.

  • UserInterface/Views/CallFrameTreeElement.js:

(WebInspector.CallFrameTreeElement):
(WebInspector.CallFrameTreeElement.prototype.get callFrame):
(WebInspector.CallFrameTreeElement.prototype.get isActiveCallFrame):
(WebInspector.CallFrameTreeElement.prototype.set isActiveCallFrame):
Add property for toggling active call frame indicator.
(WebInspector.CallFrameTreeElement.prototype.onattach):
(WebInspector.CallFrameTreeElement.prototype._updateStatus):

  • UserInterface/Views/DebuggerSidebarPanel.js:

(WebInspector.DebuggerSidebarPanel):
(WebInspector.DebuggerSidebarPanel.prototype._debuggerCallFramesDidChange):
(WebInspector.DebuggerSidebarPanel.prototype._debuggerActiveCallFrameDidChange):

  • UserInterface/Views/Variables.css:

(:root):
New global for dark border color.

1:57 PM Changeset in webkit [205929] by eric.carlson@apple.com
  • 19 edits
    3 moves
    6 deletes in trunk/Source

[MediaStream] Minor cleanup
https://bugs.webkit.org/show_bug.cgi?id=161976

Reviewed by Youenn Fablet and Dean Jackson.

Source/WebCore:

No new tests, no behavior change.

  • CMakeLists.txt:
  • DerivedSources.make:
  • Modules/mediastream/CaptureDeviceInfo.h: Removed.
  • Modules/mediastream/CaptureDeviceManager.cpp: Removed.
  • Modules/mediastream/CaptureDeviceManager.h: Removed.
  • Modules/mediastream/MediaDevicesRequest.cpp:

(WebCore::MediaDevicesRequest::didCompletePermissionCheck):
(WebCore::MediaDevicesRequest::didCompleteTrackSourceInfoRequest): Deleted.
(WebCore::MediaDevicesRequest::requestOrigin): Deleted.

  • Modules/mediastream/MediaDevicesRequest.h:
  • Modules/mediastream/MediaStreamTrackSourcesCallback.h: Removed.
  • Modules/mediastream/MediaStreamTrackSourcesCallback.idl: Removed.
  • Modules/mediastream/SourceInfo.cpp: Removed.
  • Modules/mediastream/SourceInfo.h: Removed.
  • Modules/mediastream/SourceInfo.idl: Removed.
  • WebCore.xcodeproj/project.pbxproj:
  • platform/mediastream/CaptureDevice.h: Copied from Source/WebCore/Modules/mediastream/CaptureDeviceInfo.h.

(WebCore::CaptureDevice::CaptureDevice):
(WebCore::CaptureDevice::persistentId):
(WebCore::CaptureDevice::label):
(WebCore::CaptureDevice::groupId):
(WebCore::CaptureDevice::kind):
(WebCore::CaptureSessionInfo::~CaptureSessionInfo): Deleted.
(WebCore::CaptureSessionInfo::supportsVideoSize): Deleted.
(WebCore::CaptureSessionInfo::bestSessionPresetForVideoDimensions): Deleted.

  • platform/mediastream/CaptureDeviceManager.cpp: Copied from Source/WebCore/Modules/mediastream/CaptureDeviceManager.cpp.

(CaptureDeviceManager::getSourcesInfo):

  • platform/mediastream/CaptureDeviceManager.h: Copied from Source/WebCore/Modules/mediastream/CaptureDeviceManager.h.

(WebCore::CaptureSessionInfo::~CaptureSessionInfo):
(WebCore::CaptureSessionInfo::supportsVideoSize):
(WebCore::CaptureSessionInfo::bestSessionPresetForVideoDimensions):

  • platform/mediastream/MediaStreamTrackSourcesRequestClient.h: Removed.
  • platform/mediastream/RealtimeMediaSourceCenter.h:
  • platform/mediastream/mac/AVCaptureDeviceManager.h:
  • platform/mediastream/mac/AVCaptureDeviceManager.mm:

(WebCore::AVCaptureDeviceManager::getSourcesInfo):

  • platform/mediastream/mac/RealtimeMediaSourceCenterMac.cpp:

(WebCore::RealtimeMediaSourceCenterMac::getMediaStreamDevices):
(WebCore::RealtimeMediaSourceCenterMac::getMediaStreamTrackSources): Deleted.
(WebCore::RealtimeMediaSourceCenterMac::sourceWithUID): Deleted.

  • platform/mediastream/mac/RealtimeMediaSourceCenterMac.h:
  • platform/mediastream/openwebrtc/RealtimeMediaSourceCenterOwr.cpp:

(WebCore::RealtimeMediaSourceCenterOwr::getMediaStreamDevices):
(WebCore::RealtimeMediaSourceCenterOwr::getMediaStreamTrackSources): Deleted.
(WebCore::RealtimeMediaSourceCenterOwr::sourceWithUID): Deleted.

  • platform/mediastream/openwebrtc/RealtimeMediaSourceCenterOwr.h:
  • platform/mock/MockRealtimeMediaSource.cpp:

(WebCore::MockRealtimeMediaSource::audioDeviceInfo):
(WebCore::MockRealtimeMediaSource::videoDeviceInfo):
(WebCore::MockRealtimeMediaSource::trackSourceWithUID): Deleted.

  • platform/mock/MockRealtimeMediaSource.h:
  • platform/mock/MockRealtimeMediaSourceCenter.cpp:

(WebCore::MockRealtimeMediaSourceCenter::getMediaStreamDevices):
(WebCore::MockRealtimeMediaSourceCenter::getMediaStreamTrackSources): Deleted.
(WebCore::MockRealtimeMediaSourceCenter::sourceWithUID): Deleted.

  • platform/mock/MockRealtimeMediaSourceCenter.h:

Source/WebKit2:

  • UIProcess/UserMediaPermissionRequestProxy.cpp:
1:56 PM Changeset in webkit [205928] by Beth Dakin
  • 6 edits in trunk/Source/WebKit2

Add needsHiddenContentEditableQuirk and send it to the UIProcess
https://bugs.webkit.org/show_bug.cgi?id=161984
-and corresponding-
rdar://problem/26013388

Reviewed by Anders Carlsson.

Keep track of m_needsHiddenContentEditableQuirk in WebPageProxy.

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::setNeedsHiddenContentEditableQuirk):

  • UIProcess/WebPageProxy.h:

(WebKit::WebPageProxy::needsHiddenContentEditableQuirk):
(WebKit::WebPageProxy::hasHadSelectionChangesFromUserInteraction): Deleted.

  • UIProcess/WebPageProxy.messages.in:

If m_needsHiddenContentEditableQuirk is true, set it back to false on page
transition.

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::didStartPageTransition):

Google Docs and iCloud Pages are the sites that need this quirk.
(WebKit::needsHiddenContentEditableQuirk):
(WebKit::WebPage::didChangeSelection):

  • WebProcess/WebPage/WebPage.h:
1:51 PM Changeset in webkit [205927] by Antti Koivisto
  • 9 edits in trunk/Source/WebCore

Move more code out from RenderObject
https://bugs.webkit.org/show_bug.cgi?id=161980

Reviewed by Zalan Bujtas.

Move some functions that are only needed for RenderElement there.
Move collapsing anonymous table rows to RenderTableRow.

  • rendering/RenderElement.cpp:

(WebCore::RenderElement::hasOutlineAnnotation):
(WebCore::RenderElement::hasSelfPaintingLayer):
(WebCore::RenderElement::checkForRepaintDuringLayout):

  • rendering/RenderElement.h:

(WebCore::RenderElement::hasOutline):
(WebCore::RenderElement::hasHiddenBackface): Deleted.

  • rendering/RenderLayerCompositor.cpp:

(WebCore::RenderLayerCompositor::rootOrBodyStyleChanged):

  • rendering/RenderObject.cpp:

(WebCore::RenderObject::pixelSnappedAbsoluteClippedOverflowRect):
(WebCore::RenderObject::destroyAndCleanupAnonymousWrappers):
(WebCore::RenderObject::hasSelfPaintingLayer): Deleted.
(WebCore::RenderObject::checkForRepaintDuringLayout): Deleted.
(WebCore::RenderObject::hasOutlineAnnotation): Deleted.
(WebCore::RenderObject::hasEntirelyFixedBackground): Deleted.
(WebCore::collapseAnonymousTableRowsIfNeeded): Deleted.

  • rendering/RenderObject.h:

(WebCore::RenderObject::hasLayer):
(WebCore::RenderObject::canBeSelectionLeaf):
(WebCore::RenderObject::hasOutline): Deleted.
(WebCore::RenderObject::hasSelectedChildren): Deleted.

  • rendering/RenderTableRow.cpp:

(WebCore::RenderTableRow::destroyAndCollapseAnonymousSiblingRows):

  • rendering/RenderTableRow.h:
  • rendering/RenderView.cpp:

(WebCore::RenderView::rootBackgroundIsEntirelyFixed):

1:46 PM Changeset in webkit [205926] by dbates@webkit.org
  • 4 edits in trunk/Source/WebCore

Switch CSSParser to use CSSParserFastPaths::isKeywordPropertyID()
https://bugs.webkit.org/show_bug.cgi?id=161983

Reviewed by David Hyatt.

Towards switching to the new CSS parser keyword properties validation logic,
switch over the old CSS parser logic for determining a keyword property to
use the analogous logic in the new CSS parser.

A side benefit of this change is that it is a step towards unifying CSS- and
SVG CSS- keyword properties. The new CSS parser does not make a distinction
between these kinds of properties and will allow us to have a shared code path
for validating a keyword property.

No functionality was changed. So, no new tests.

  • css/parser/CSSParser.cpp: Include header CSSParserFastPaths.h.

(WebCore::isValidKeywordPropertyAndValue): Validate SVG CSS keyword properties. This
logic was moved from CSSParser::parseSVGValue(). In subsequent patches we will switch
the old CSS parser from this function to CSSParserFastPaths::isValidKeywordPropertyAndValue().
(WebCore::parseKeywordValue): Modified to call CSSParserFastPaths::isKeywordPropertyID().
(WebCore::CSSParser::parseValue): Ditto.
(WebCore::isKeywordPropertyID): Deleted. Incorporated its functionality into
CSSParserFastPaths::isKeywordPropertyID().

  • css/parser/CSSParserFastPaths.cpp:

(WebCore::CSSParserFastPaths::isKeywordPropertyID): Incorporates the functionality
of WebCore::isKeywordPropertyID().

  • css/parser/SVGCSSParser.cpp:

(WebCore::CSSParser::parseSVGValue): Move properties that can be processed as
keyword properties from here to WebCore::isValidKeywordPropertyAndValue().

1:41 PM Changeset in webkit [205925] by fpizlo@apple.com
  • 5 edits in trunk/Source/JavaScriptCore

Remove Heap::setMarked()

Rubber stamped by Keith Miller.

Nobody uses this function.

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

(JSC::Heap::setMarked): Deleted.

  • heap/LargeAllocation.h:

(JSC::LargeAllocation::testAndSetMarked):
(JSC::LargeAllocation::setMarked): Deleted.

  • heap/MarkedBlock.h:
1:12 PM Changeset in webkit [205924] by dino@apple.com
  • 3 edits in trunk/Source/WebCore

Rename parseColorParameters and clean up conditional
https://bugs.webkit.org/show_bug.cgi?id=161941
<rdar://problem/28292750>

Reviewed by Dan Bates.

In preparation for adding color() support, rename the existing
parseColorParameters to parseRGBParameters.

Also clean up the logic in the parseColorFromValue function.

  • css/parser/CSSParser.cpp:

(WebCore::CSSParser::parseRGBParameters):
(WebCore::CSSParser::parseColorFromValue):
(WebCore::CSSParser::parseColorParameters): Deleted.

  • css/parser/CSSParser.h:
12:56 PM Changeset in webkit [205923] by Chris Dumez
  • 4 edits in trunk

Add support hr.color IDL attribute
https://bugs.webkit.org/show_bug.cgi?id=161977

Reviewed by Darin Adler.

LayoutTests/imported/w3c:

Rebaseline W3C test now that more checks are passing.

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

Source/WebCore:

Add support hr.color IDL attribute as per:

Even though this is a legacy attribute, it is still part of the HTML specification
and it is still supported by Firefox and Chrome.

Also note that even though WebKit does not currently support the 'color' IDL
attribute on <hr>, it does support the 'color' content attribute on <hr>.
Therefore, we only need to reflect the 'color' content attribute.

No new tests, rebaselined existing test.

  • html/HTMLHRElement.idl:
12:34 PM Changeset in webkit [205922] by achristensen@apple.com
  • 3 edits in trunk/Source/WebCore

URLParser: Add fast path for hosts containing no non-ASCII or percent characters
https://bugs.webkit.org/show_bug.cgi?id=161970

Reviewed by Daniel Bates.

Covered by existing tests.

  • platform/URLParser.cpp:

(WebCore::URLParser::parse):
(WebCore::URLParser::parseHost):

  • platform/URLParser.h:

When parsing the host of a URL, if it contains non-ASCII characters or percent-encoded values,
we need to do additional encoding. Many URLs, including all already-parsed URLs, do not have
such characters in their host, and therefore do not need the additional encoding. Skipping
the additional encoding significantly speeds up my URL parsing benchmark.

11:51 AM Changeset in webkit [205921] by jfbastien@apple.com
  • 2 edits in trunk/Source/WTF

Atomics on ARM don't require full-system fencing, and other minutiae
https://bugs.webkit.org/show_bug.cgi?id=161928

Reviewed by Geoffrey Garen.

Add cmpxchg versions with both success and failure memory
ordering. In some interesting cases we can craft code which needs
barriers which aren't as strong.

weakCompareAndSwap is super dubious, its 3 uses seem
questionable... but for now I'm just adding debug asserts.

Rename armv7_dmb* functions to arm_dmb* because they apply to v7
and v8 (or more precisely; to ARMv7's ARM and Thumb2, as well as
ARMv8's aarch32 A32/T32 and aarch64).

Use inner-shareability domain for ARM barriers instead of
full-system. This is what C++ uses.

The default case for barriers simply used a compiler barrier. This
is generally wrong, e.g. for MIPS.

  • wtf/Atomics.h:

(WTF::Atomic::compareExchangeWeak): offer two-order version
(WTF::Atomic::compareExchangeStrong): offer two-order version
(WTF::weakCompareAndSwap): a few assertions
(WTF::arm_dmb): rename since it applies to ARMv7 and v8; make it innser-shareable
(WTF::arm_dmb_st): rename since it applies to ARMv7 and v8; make it innser-shareable
(WTF::loadLoadFence): incorrect generally
(WTF::loadStoreFence): incorrect generally
(WTF::storeLoadFence): incorrect generally
(WTF::storeStoreFence): incorrect generally
(WTF::memoryBarrierAfterLock): incorrect generally
(WTF::memoryBarrierBeforeUnlock): incorrect generally
(WTF::armV7_dmb): Deleted.
(WTF::armV7_dmb_st): Deleted.

11:46 AM Changeset in webkit [205920] by Alan Bujtas
  • 2 edits in trunk/Source/WebCore

ShowRenderTree should take position offset into account when printing inflow positioned renderers.
https://bugs.webkit.org/show_bug.cgi?id=161978

Reviewed by Simon Fraser.

Adjust (x, y) with the inflow positioned renderer's offset.

Not testable.

  • rendering/RenderObject.cpp:

(WebCore::RenderObject::showRenderObject):

11:26 AM Changeset in webkit [205919] by bshafiei@apple.com
  • 2 edits in branches/safari-602-branch/Source/JavaScriptCore

Merge r205882. rdar://problem/28233331

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

URLParser: Add fast path for utf8 encoding queries
https://bugs.webkit.org/show_bug.cgi?id=161968

Reviewed by Daniel Bates.

No change in behavior. Covered by existing tests.

  • platform/URLParser.cpp:

(WebCore::utf8PercentEncodeQuery):
(WebCore::URLParser::parse):
If the text encoding is UTF-8 (which is quite common), then we can encode the query
as we iterate its code points. This reduces memory allocation and significantly speeds
up my URL parsing benchmark.

10:55 AM Changeset in webkit [205917] by mark.lam@apple.com
  • 4 edits in trunk/Source/JavaScriptCore

Use Options::validateExceptionChecks() instead of VM::m_verifyExceptionEvents.
https://bugs.webkit.org/show_bug.cgi?id=161975

Reviewed by Keith Miller.

This makes it less burdensome (no longer needs a rebuild to enable checks) to do
incremental work towards enabling checks all the time.

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

(JSC::VM::verifyExceptionCheckNeedIsSatisfied):

  • runtime/VM.h:
10:48 AM Changeset in webkit [205916] by commit-queue@webkit.org
  • 5 edits in trunk

TaggedTemplateString function calls should emit tail position calls
https://bugs.webkit.org/show_bug.cgi?id=161948

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2016-09-14
Reviewed by Yusuke Suzuki.

JSTests:

  • stress/tail-call-recognize.js:

(runTests):
Ensure a tagged template string function call is tail call.

  • test262.yaml:

These now pass.

Source/JavaScriptCore:

  • bytecompiler/NodesCodegen.cpp:

(JSC::TaggedTemplateNode::emitBytecode):
The tagged template string function call can be a tail call:
https://tc39.github.io/ecma262/#sec-tagged-templates-runtime-semantics-evaluation

10:44 AM Changeset in webkit [205915] by commit-queue@webkit.org
  • 3 edits in trunk/Source/WebKit2

Long tap menu on an image link no longer includes "Save Image" button
https://bugs.webkit.org/show_bug.cgi?id=161761
<rdar://27202717>

Patch by Megan Gardner <Megan Gardner> on 2016-09-14
Reviewed by Beth Dakin.

  • UIProcess/ios/WKActionSheetAssistant.mm:

(-[WKActionSheetAssistant defaultActionsForImageSheet:]):
Added share to image sheet as to not regress current functionality

  • WebProcess/WebPage/ios/WebPageIOS.mm:

(WebKit::WebPage::getPositionInformation):
Gather information for images as well as links, and they can be both

10:11 AM Changeset in webkit [205914] by jfbastien@apple.com
  • 2 edits in trunk/Source/WTF

Alwasys inline atomic operations
https://bugs.webkit.org/show_bug.cgi?id=155371

Reviewed by Geoffrey Garen.

Fixes "build fails with memory model cannot be stronger than
success memory model for ‘atomic_compare_exchange’".

Pre-5 revisions of GCC at Os only generated an error message
related to invalid failure memory ordering. The reason is that
libstdc++ tries to be clever about enforcing the C++ standard's
clause [atomics.types.operations.req] ¶21 which states:

Requires: The failure argument shall not be
memory_order_release nor memory_order_acq_rel. The failure
argument shall be no stronger than the success argument.

It fails at doing this because its inlining heuristics are
modified by Os, and they're not quite as dumb as O0 but not smart
enough to get to the good code at O1. Adding ALWAYS_INLINE fixes
the silliness at Os, leaves O1 great, and makes O0 slightly less
bad but still pretty bad.

The other good news is that I'm going to get this particular
problem fixed in the version of C++ which will come after C++17:

https://github.com/jfbastien/papers/blob/master/source/P0418r1.bs

While we're at it we should always inline all of these wrapped
functions because the generated code is horrendous if the memory
order isn't known at compile time.

  • wtf/Atomics.h:

(WTF::Atomic::load):
(WTF::Atomic::store):
(WTF::Atomic::compareExchangeWeak):
(WTF::Atomic::compareExchangeStrong):
(WTF::Atomic::exchangeAndAdd):
(WTF::Atomic::exchange):

9:56 AM Changeset in webkit [205913] by Chris Dumez
  • 2 edits in trunk/Source/WebCore

Regression(r152725): generate-bindings.pl --write-dependencies does not work
https://bugs.webkit.org/show_bug.cgi?id=161897

Reviewed by Darin Adler.

r152725 inadvertently dropped the code generating the JS*.dep files when
--write-dependencies is passed to the bindings generator. As a result,
our dependency tracking was broken. This patch restores the code that
was dropped in r152725.

  • bindings/scripts/CodeGeneratorJS.pm:

(new):
(GenerateHeader):

9:56 AM Changeset in webkit [205912] by Chris Dumez
  • 16 edits
    4 adds in trunk

input.type cannot be set to "file" after being set to another type
https://bugs.webkit.org/show_bug.cgi?id=161943

Reviewed by Daniel Bates.

LayoutTests/imported/w3c:

Rebaseline a couple of W3C tests now that more checks are passing.

  • web-platform-tests/html/dom/reflection-forms-expected.txt:
  • web-platform-tests/html/semantics/forms/the-input-element/type-change-state-expected.txt:

Source/WebCore:

input.type cannot be set to "file" after being set to another type.
This behavior does not match the HTML specification or the behavior
of Firefox and Chrome. This patch drops this restriction and aligns
our behavior with other browsers.

Test: fast/dom/HTMLInputElement/input-type-change-to-file.html

  • html/FileInputType.cpp:

(WebCore::FileInputType::canChangeFromAnotherType): Deleted.

  • html/FileInputType.h:
  • html/HTMLInputElement.cpp:

(WebCore::HTMLInputElement::updateType):

  • html/InputType.cpp:

(WebCore::InputType::canChangeFromAnotherType): Deleted.

  • html/InputType.h:

LayoutTests:

  • fast/dom/HTMLInputElement/input-type-change-to-file-expected.txt: Added.
  • fast/dom/HTMLInputElement/input-type-change-to-file.html: Added.
  • fast/dom/HTMLInputElement/input-type-file-security-expected.txt: Added
  • fast/dom/HTMLInputElement/input-type-file-security.html: Added

Add layout test coverage. I have verified that these tests are passing in both
Firefox and Chrome.

  • fast/forms/input-type-change3-expected.txt:
  • fast/forms/input-type-change3.html:
  • fast/forms/input-valueasnumber-unsupported-expected.txt:
  • fast/forms/input-valueasnumber-unsupported.html:

Update existing tests to reflect behavior change.

9:55 AM Changeset in webkit [205911] by Ryan Haddad
  • 1 edit
    5 adds in trunk/LayoutTests

Rebaseline tests added with r205905 for ios-simulator.

Unreviewed test gardening.

  • platform/ios-simulator/fast/dom/HTMLImageElement/sizes/image-sizes-w3c-1-expected.txt: Added.
  • platform/ios-simulator/fast/dom/HTMLImageElement/sizes/image-sizes-w3c-2-expected.txt: Added.
  • platform/ios-simulator/fast/dom/HTMLImageElement/sizes/image-sizes-w3c-3-expected.txt: Added.
  • platform/ios-simulator/fast/dom/HTMLImageElement/sizes/image-sizes-w3c-4-expected.txt: Added.
9:47 AM Changeset in webkit [205910] by commit-queue@webkit.org
  • 4 edits in trunk

test262: Array.prototype.slice should always set length
https://bugs.webkit.org/show_bug.cgi?id=161953

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2016-09-14
Reviewed by Mark Lam.

JSTests:

  • test262.yaml:

Source/JavaScriptCore:

  • runtime/ArrayPrototype.cpp:

(JSC::arrayProtoFuncSplice):

9:45 AM Changeset in webkit [205909] by commit-queue@webkit.org
  • 26 edits
    4 adds in trunk/Source

[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.

9:40 AM Changeset in webkit [205908] by commit-queue@webkit.org
  • 4 edits in trunk/LayoutTests

LayoutTest http/tests/security/cross-origin-cached-scripts-parallel.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=161912

Patch by Youenn Fablet <youenn@apple.com> on 2016-09-14
Reviewed by Alexey Proskuryakov.

  • TestExpectations: Removing flaky expectation.
  • http/tests/security/cross-origin-cached-scripts-parallel-expected.txt:
  • http/tests/security/cross-origin-cached-scripts-parallel.html: Increase timeout to ensure load is made in parallel.

Fixed flakiness by doing parallel loads in two shots of two, in lieu of 1 shot of 4.

9:23 AM Changeset in webkit [205907] by Ryan Haddad
  • 3 edits in trunk/LayoutTests

Marking inspector/console/messagesCleared.html as flaky on mac-debug.
https://bugs.webkit.org/show_bug.cgi?id=152025

Unreviewed test gardening.

  • platform/mac-wk2/TestExpectations:
  • platform/mac/TestExpectations:
9:22 AM Changeset in webkit [205906] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Marking fast/scrolling/arrow-key-scroll-in-rtl-document.html as flaky on mac-wk2.
https://bugs.webkit.org/show_bug.cgi?id=161549

Unreviewed test gardening.

  • platform/mac-wk2/TestExpectations:
8:54 AM Changeset in webkit [205905] by hyatt@apple.com
  • 18 edits
    10 adds
    2 deletes in trunk

[CSS Parser] Enable the new sizes parser by default
https://bugs.webkit.org/show_bug.cgi?id=161931

Reviewed by Zalan Bujtas.

Source/WebCore:

Added new tests in fast/dom/HTMLImageElement/sizes.

  • CMakeLists.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • css/CSSGrammar.y.in:

Remove the old code that parsed source size lists.

  • css/MediaQueryEvaluator.cpp:

(WebCore::MediaQueryEvaluator::MediaQueryEvaluator):

  • css/MediaQueryEvaluator.h:

Change to take a const Document&, since the Document is not modified.

  • css/SourceSizeList.cpp: Removed.
  • css/SourceSizeList.h: Removed.
  • css/parser/CSSParser.cpp:

(WebCore::CSSParser::parseSizesAttribute): Deleted.
(WebCore::CSSParser::SourceSize::SourceSize): Deleted.
(WebCore::CSSParser::sourceSize): Deleted.

  • css/parser/CSSParser.h:

Remove the old sizes processing code.

  • css/parser/MediaQueryParser.cpp:

(WebCore::MediaQueryParser::skipUntilComma):
(WebCore::MediaQueryParser::parseInternal):
Fix a bug I introduced when modifying this code from Blink. The Nones should have been Nots.

  • css/parser/SizesAttributeParser.cpp:

(WebCore::SizesAttributeParser::computeLength):
(WebCore::SizesAttributeParser::SizesAttributeParser):
(WebCore::SizesAttributeParser::calculateLengthInPixels):
(WebCore::SizesAttributeParser::mediaConditionMatches):
(WebCore::SizesAttributeParser::effectiveSizeDefaultValue):

  • css/parser/SizesAttributeParser.h:
  • css/parser/SizesCalcParser.cpp:

(WebCore::SizesCalcParser::SizesCalcParser):
(WebCore::SizesCalcParser::appendLength):

  • css/parser/SizesCalcParser.h:

Make the sizes parsers take a Document, since having separate style and view arguments made
no sense, given that the style used is always the view's.

  • html/HTMLImageElement.cpp:

(WebCore::HTMLImageElement::bestFitSourceFromPictureElement):
(WebCore::HTMLImageElement::selectImageSource):

  • html/parser/HTMLPreloadScanner.cpp:

(WebCore::TokenPreloadScanner::StartTagScanner::processAttributes):
Switch image elements and the preload scanner over to the new code.

LayoutTests:

  • fast/dom/HTMLImageElement/resources/green-16x16.png: Added.
  • fast/dom/HTMLImageElement/resources/green-1x1.png: Added.
  • fast/dom/HTMLImageElement/sizes/image-sizes-invalids-expected.txt:
  • fast/dom/HTMLImageElement/sizes/image-sizes-invalids.html:
  • fast/dom/HTMLImageElement/sizes/image-sizes-w3c-1-expected.txt: Added.
  • fast/dom/HTMLImageElement/sizes/image-sizes-w3c-1.html: Added.
  • fast/dom/HTMLImageElement/sizes/image-sizes-w3c-2-expected.txt: Added.
  • fast/dom/HTMLImageElement/sizes/image-sizes-w3c-2.html: Added.
  • fast/dom/HTMLImageElement/sizes/image-sizes-w3c-3-expected.txt: Added.
  • fast/dom/HTMLImageElement/sizes/image-sizes-w3c-3.html: Added.
  • fast/dom/HTMLImageElement/sizes/image-sizes-w3c-4-expected.txt: Added.
  • fast/dom/HTMLImageElement/sizes/image-sizes-w3c-4.html: Added.
8:16 AM Changeset in webkit [205904] by Jonathan Bedard
  • 2 edits in trunk/Tools

Fix mastercfg_unittest
https://bugs.webkit.org/show_bug.cgi?id=161816

Reviewed by Daniel Bates.

(RunWebKitTests.start):

  • BuildSlaveSupport/build.webkit.org-config/mastercfg_unittest.py: Fixed broken unit tests.

Sep 13, 2016:

11:24 PM Changeset in webkit [205903] by bshafiei@apple.com
  • 5 edits in branches/safari-602-branch/Source

Merge r205895. rdar://problem/28287070

11:22 PM Changeset in webkit [205902] by bshafiei@apple.com
  • 5 edits in branches/safari-602-branch/Source

Versioning.

11:06 PM Changeset in webkit [205901] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Marking imported/w3c/web-platform-tests/XMLHttpRequest/response-method.htm as failing on ios-simulator.
https://bugs.webkit.org/show_bug.cgi?id=161949

Unreviewed test gardening.

  • platform/ios-simulator/TestExpectations:
11:02 PM Changeset in webkit [205900] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Rebaseline imported/w3c/web-platform-tests/XMLHttpRequest/setrequestheader-content-type.htm for ios-simulator.

Unreviewed test gardening.

  • platform/ios-simulator/imported/w3c/web-platform-tests/XMLHttpRequest/setrequestheader-content-type-expected.txt:
10:58 PM Changeset in webkit [205899] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

More unreviewed test gardening for iOS 10.

  • platform/ios-simulator/TestExpectations:
10:26 PM Changeset in webkit [205898] by Ryan Haddad
  • 5 edits in trunk/LayoutTests

Unreviewed test gardening for iOS 10.

  • platform/ios-simulator/TestExpectations:
  • platform/ios-simulator/editing/deleting/delete-emoji-expected.txt:
  • platform/ios-simulator/fast/text/font-weights-expected.txt:
  • platform/ios-simulator/fast/text/system-font-weight-expected.txt:
9:56 PM Changeset in webkit [205897] by Chris Dumez
  • 9 edits
    1 delete in trunk/Source/WebCore

Unreviewed, rolling out r205887.

Broke the Windows build

Reverted changeset:

"Merge Element::ScrollToOptions and
DOMWindow::ScrollToOptions"
https://bugs.webkit.org/show_bug.cgi?id=161932
http://trac.webkit.org/changeset/205887

9:11 PM Changeset in webkit [205896] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Rebaseline js/dom/global-constructors-attributes.html for Yosemite.

Unreviewed test gardening.

  • platform/mac-yosemite/js/dom/global-constructors-attributes-expected.txt:
7:29 PM Changeset in webkit [205895] by msaboff@apple.com
  • 5 edits in trunk/Source

Promises aren't resolved properly when making a ObjC API callback
https://bugs.webkit.org/show_bug.cgi?id=161929

Reviewed by Geoffrey Garen.

Source/JavaScriptCore:

When we go to call out to an Objective C function registered via the API,
we first drop all JSC locks to make the call. As part of dropping the locks,
we drain the microtask queue that is used among other things for handling deferred
promise resolution. The DropAllLocks scope class that drops the locks while in
scope, resets the current thread's AtomicStringTable to the default table. This
is wrong for two reasons, first it happens before we drain the microtask queue and
second it isn't needed as JSLock::willReleaseLock() restores the current thread's
AtomicStringTable to the table before the lock was acquired.

In fact, the manipulation of the current thread's AtomicStringTable is already
properly handled as a stack in JSLock::didAcquireLock() and willReleaseLock().
Therefore the manipulation of the AtomicStringTable in DropAllLocks constructor
and destructor should be removed.

  • API/tests/testapi.mm:

(testObjectiveCAPIMain): Added a new test.

  • runtime/JSLock.cpp:

(JSC::JSLock::DropAllLocks::DropAllLocks):
(JSC::JSLock::DropAllLocks::~DropAllLocks):

Source/WTF:

Removed resetCurrentAtomicStringTable() which is no longer referenced.

  • wtf/WTFThreadData.h:

(WTF::WTFThreadData::resetCurrentAtomicStringTable): Deleted.

7:22 PM Changeset in webkit [205894] by dino@apple.com
  • 1 edit
    1 delete in trunk/Source/WebCore

Remove a .rej file.

  • animation/DocumentTimeline.h.rej: Removed.
6:34 PM Changeset in webkit [205893] by achristensen@apple.com
  • 32 edits
    5 adds in trunk

Implement URLSearchParams
https://bugs.webkit.org/show_bug.cgi?id=161920

Reviewed by Chris Dumez.

LayoutTests/imported/w3c:

  • web-platform-tests/XMLHttpRequest/send-usp-expected.txt:
  • web-platform-tests/fetch/api/request/request-init-002-expected.txt:
  • web-platform-tests/fetch/api/response/response-init-002-expected.txt:
  • web-platform-tests/url/interfaces-expected.txt:
  • web-platform-tests/url/url-constructor-expected.txt:
  • web-platform-tests/url/urlsearchparams-append-expected.txt:
  • web-platform-tests/url/urlsearchparams-constructor-expected.txt:
  • web-platform-tests/url/urlsearchparams-delete-expected.txt:
  • web-platform-tests/url/urlsearchparams-get-expected.txt:
  • web-platform-tests/url/urlsearchparams-getall-expected.txt:
  • web-platform-tests/url/urlsearchparams-has-expected.txt:
  • web-platform-tests/url/urlsearchparams-set-expected.txt:
  • web-platform-tests/url/urlsearchparams-stringifier-expected.txt:

Source/WebCore:

Covered by newly passing web platform tests.

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

(WebCore::DOMURL::setQuery):
(WebCore::DOMURL::searchParams):

  • html/DOMURL.h:
  • html/URLSearchParams.cpp: Added.

(WebCore::URLSearchParams::URLSearchParams):
(WebCore::URLSearchParams::get):
(WebCore::URLSearchParams::has):
(WebCore::URLSearchParams::set):
(WebCore::URLSearchParams::append):
(WebCore::URLSearchParams::getAll):
(WebCore::URLSearchParams::remove):
(WebCore::URLSearchParams::toString):
(WebCore::URLSearchParams::updateURL):
(WebCore::URLSearchParams::Iterator::Iterator):

  • html/URLSearchParams.h: Added.

(WebCore::URLSearchParams::create):
(WebCore::URLSearchParams::createIterator):

  • html/URLSearchParams.idl: Added.
  • html/URLUtils.idl:
  • platform/URLParser.cpp:

(WebCore::percentDecode):
(WebCore::URLParser::parseHost):
(WebCore::formURLDecode):
(WebCore::serializeURLEncodedForm):
(WebCore::URLParser::serialize):

  • platform/URLParser.h:

Source/WTF:

  • wtf/text/StringView.h:

(WTF::StringView::split): Added.

LayoutTests:

  • js/dom/global-constructors-attributes-dedicated-worker-expected.txt:
  • platform/mac-wk1/js/dom/global-constructors-attributes-expected.txt:
  • platform/mac/imported/w3c/web-platform-tests/XMLHttpRequest/setrequestheader-content-type-expected.txt:
5:38 PM Changeset in webkit [205892] by dino@apple.com
  • 20 edits in trunk/Source

Replace RGBA32 with Color in member variables
https://bugs.webkit.org/show_bug.cgi?id=161856
<rdar://problem/28254324>

Reviewed by Simon Fraser.

In preparation for the Color class to become more than
just a 4-byte RGBA value, I went through a few places
that were using the RGBA32 type directly, and replaced
them with Color. This will make some objects a little
bigger e.g. BorderValue and its friends.

I mostly looked at the places that were using RGBA32 as
a member variable. There is still a lot of RGBA32 use
around the project, in particular the CSS parser.

There should be no behaviour change.

Source/WebCore:

  • html/canvas/CanvasRenderingContext2D.cpp: Shadows now use Color.

(WebCore::CanvasRenderingContext2D::setShadow):
(WebCore::CanvasRenderingContext2D::shouldDrawShadows):
(WebCore::CanvasRenderingContext2D::didDraw):

  • html/canvas/CanvasRenderingContext2D.h:
  • html/canvas/CanvasStyle.cpp: Canvas style uses Color for fills and strokes.

(WebCore::CanvasStyle::CanvasStyle):
(WebCore::CanvasStyle::isEquivalentColor):
(WebCore::CanvasStyle::isEquivalentRGBA):
(WebCore::CanvasStyle::applyStrokeColor):
(WebCore::CanvasStyle::applyFillColor):

  • html/canvas/CanvasStyle.h:

(WebCore::CanvasStyle::CMYKAValues::CMYKAValues):
(WebCore::CanvasStyle::color):

  • html/track/TextTrackCueGeneric.h: Foreground, background and

highlight colors.

  • platform/graphics/InbandTextTrackPrivateClient.h:

(WebCore::GenericCueData::setForegroundColor):
(WebCore::GenericCueData::setBackgroundColor):
(WebCore::GenericCueData::setHighlightColor):

  • page/PageOverlay.cpp: Background color.

(WebCore::PageOverlay::setBackgroundColor):

  • page/PageOverlay.h:
  • platform/graphics/mac/ColorMac.h: Random function that returned RGBA32.
  • platform/graphics/mac/ColorMac.mm:

(WebCore::oldAquaFocusRingColor):

  • rendering/RenderTableCell.cpp: Update the size of CollapsedBorderValue.
  • rendering/RenderTheme.h: Use a NeverDestroyed Color rather than a static RGBA32.
  • rendering/style/BorderValue.h: Use a Color.

(WebCore::BorderValue::BorderValue):
(WebCore::BorderValue::isTransparent):
(WebCore::BorderValue::operator==):
(WebCore::BorderValue::setColor):
(WebCore::BorderValue::color):

  • rendering/style/CollapsedBorderValue.h:

(WebCore::CollapsedBorderValue::CollapsedBorderValue):
(WebCore::CollapsedBorderValue::color):

  • rendering/style/OutlineValue.h:

(WebCore::OutlineValue::operator==):

  • rendering/style/RenderStyle.cpp: Update to match new BorderValue.

Source/WebKit/mac:

  • Misc/WebKitNSStringExtras.mm:

(-[NSString _web_drawAtPoint:font:textColor:allowingFontSmoothing:]): Explicitly
call a Color constructor, rather than passing an RGBA32.

5:36 PM Changeset in webkit [205891] by bshafiei@apple.com
  • 1 copy in tags/Safari-602.2.7

New tag.

5:11 PM Changeset in webkit [205890] by jer.noble@apple.com
  • 4 edits
    1 add in trunk

[media-source] MediaSource.addSourceBuffer(null) should throw an exception
https://bugs.webkit.org/show_bug.cgi?id=161884

Reviewed by Eric Carlson.

Source/WebCore:

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

  • Modules/mediasource/MediaSource.idl: The addSourceBuffer() parameter is not optional

and not nullable.

LayoutTests:

  • platform/mac/TestExpectations:
  • platform/mac/imported/w3c/web-platform-tests/media-source/mediasource-addsourcebuffer-expected.txt: Added.
5:10 PM Changeset in webkit [205889] by dbates@webkit.org
  • 2 edits in trunk/Source/WebCore

Remove Chrome app-specific CSS property -webkit-app-region
https://bugs.webkit.org/show_bug.cgi?id=161935

Reviewed by Simon Fraser.

  • css/parser/CSSParserFastPaths.cpp:
5:10 PM Changeset in webkit [205888] by dbates@webkit.org
  • 2 edits in trunk/Source/WebCore

Treat some CSS properties as keyword properties
https://bugs.webkit.org/show_bug.cgi?id=161934

Reviewed by Simon Fraser.

Move validation of the following CSS keyword properties from CSSParser::parseValue() to
WebCore::isValidKeywordPropertyAndValue():

CSSPropertyColumnProgression
CSSPropertyFontStretch
CSSPropertyTextAlign
CSSPropertyUnicodeBidi
CSSPropertyWebkitColumnAxis
CSSPropertyWebkitCursorVisibility
CSSPropertyWebkitTextDecorationStyle
CSSPropertyWebkitTextOrientation
CSSPropertyWebkitTextZoom
CSSPropertyWebkitTouchCallout

Among other benefits, this will make it more straightforward to migrate from CSSParser::is{KeywordPropertyID, ValidKeywordPropertyAndValue}()
to CSSParserFastPaths::is{KeywordPropertyID, ValidKeywordPropertyAndValue}(), respectively.

  • css/parser/CSSParser.cpp:

(WebCore::isValidKeywordPropertyAndValue):
(WebCore::isKeywordPropertyID):
(WebCore::CSSParser::parseValue):

4:27 PM Changeset in webkit [205887] by Chris Dumez
  • 9 edits
    1 add in trunk/Source/WebCore

Merge Element::ScrollToOptions and DOMWindow::ScrollToOptions
https://bugs.webkit.org/show_bug.cgi?id=161932

Reviewed by Simon Fraser.

Merge Element::ScrollToOptions and DOMWindow::ScrollToOptions.
Ideally we would merge them on IDL side as well but this is for
another patch.

  • WebCore.xcodeproj/project.pbxproj:
  • bindings/scripts/CodeGeneratorJS.pm:

(GenerateDictionaryImplementationContent):

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

(WebCore::convertDictionary<TestObj::Dictionary>):
(WebCore::convertDictionary<TestObj::DictionaryThatShouldNotTolerateNull>):
(WebCore::convertDictionary<TestObj::DictionaryThatShouldTolerateNull>):
(WebCore::convertDictionary<AlternateDictionaryName>):

  • dom/Element.h:
  • dom/Element.idl:
  • dom/ScrollToOptions.h: Added.
  • html/HTMLBodyElement.cpp:

(WebCore::HTMLBodyElement::scrollTo):

  • page/DOMWindow.h:
  • page/DOMWindow.idl:
4:19 PM Changeset in webkit [205886] by fpizlo@apple.com
  • 3 edits in trunk/Source/JavaScriptCore

Remove Heap::isLive()
https://bugs.webkit.org/show_bug.cgi?id=161933

Reviewed by Mark Lam.

Before I put any more effort into maintaining this weird function, I decided to check how it
was used. It turns out it's not.

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

(JSC::Heap::isLive): Deleted.

4:13 PM Changeset in webkit [205885] by ap@apple.com
  • 6 edits in trunk/Tools

Landing optimized .png files, forgot to do it initially.

  • BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Images/IOS10.png:
  • BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Images/IOS10@2x.png:
  • BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Images/IOS10Simulator.png:
  • BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Images/IOSDevice.png:
  • BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Images/IOSDevice@2x.png:
4:08 PM Changeset in webkit [205884] by ap@apple.com
  • 14 edits
    6 adds in trunk/Tools

Switch build.webkit.org to iOS 10
https://bugs.webkit.org/show_bug.cgi?id=161930

Reviewed by Daniel Bates.

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

(RunWebKitTests.start):

  • BuildSlaveSupport/build.webkit.org-config/mastercfg_unittest.py:
  • BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Images/IOS10.png: Added.
  • BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Images/IOS10@2x.png: Added.
  • BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Images/IOS10Simulator.png: Added.
  • BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Images/IOS10Simulator@2x.png: Added.
  • BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Images/IOSDevice.png:
  • BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Images/IOSDevice@2x.png:
  • BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Images/IOSSimulator.png: Added.
  • BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Images/IOSSimulator@2x.png: Added.
  • BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BubbleQueueServer.js:
  • BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/Dashboard.js:
  • BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/WebKitBuildbot.js:
  • BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Styles/Main.css:
  • BuildSlaveSupport/build.webkit.org-config/wkbuild.py:
  • BuildSlaveSupport/build.webkit.org-config/wkbuild_unittest.py:
  • Scripts/webkitpy/port/ios.py:
  • TestResultServer/static-dashboards/builders.jsonp:
3:38 PM Changeset in webkit [205883] by mmaxfield@apple.com
  • 79 edits
    4 copies in trunk

[Cocoa] Unify font's ascent, descent, and x-height between macOS and iOS
https://bugs.webkit.org/show_bug.cgi?id=161877

Reviewed by Simon Fraser.

Source/WebCore:

macOS and iOS have slightly different handling of ascent, descent, and x-height.
This patch migrates them to have the same handling of them.

There are slight behavior changes here because our previous code converted between
floats and doubles in unnecessary places, and does not handle rounding in
consistent ways. The differences are all miniscule, but nevertheless lead to test
results needing to be updated.

Coincidentally, by performing this unification, there are no longer any places
on macOS Sierra which are using the CGFontRef member of PlatformFontData. This
patch removes the member on that operating system for memory savings as well as
clarity.

Covered by existing tests.

  • platform/graphics/FontPlatformData.cpp:
  • platform/graphics/FontPlatformData.h:
  • platform/graphics/cocoa/FontCocoa.mm:

(WebCore::Font::platformInit):

  • platform/graphics/cocoa/FontPlatformDataCocoa.mm:

(WebCore::FontPlatformData::FontPlatformData):
(WebCore::FontPlatformData::platformIsEqual):
(WebCore::FontPlatformData::ctFont):

LayoutTests:

Updating expected results.

  • imported/blink/svg/text/obb-paintserver-expected.html: Covered tiny unrelated 1px difference.
  • imported/blink/svg/text/obb-paintserver.html: Ditto.
  • platform/ios-simulator/editing/selection/vertical-rl-rtl-extend-line-backward-br-expected.txt:
  • platform/ios-simulator/editing/selection/vertical-rl-rtl-extend-line-backward-p-expected.txt:
  • platform/ios-simulator/editing/selection/vertical-rl-rtl-extend-line-forward-br-expected.txt:
  • platform/ios-simulator/editing/selection/vertical-rl-rtl-extend-line-forward-p-expected.txt:
  • platform/ios-simulator/fast/text/whitespace/pre-wrap-spaces-after-newline-expected.txt:
  • platform/ios-simulator/svg/W3C-SVG-1.1-SE/coords-units-03-b-expected.txt:
  • platform/ios-simulator/svg/custom/glyph-transformation-with-hkern-expected.txt: Copied from LayoutTests/svg/custom/glyph-transformation-with-hkern-expected.txt.
  • platform/ios-simulator/svg/custom/repaint-shadow-expected.txt: Copied from LayoutTests/svg/custom/repaint-shadow-expected.txt.
  • platform/ios-simulator/svg/text/text-hkern-on-vertical-text-expected.txt: Copied from LayoutTests/svg/text/text-hkern-on-vertical-text-expected.txt.
  • platform/ios-simulator/svg/text/text-vkern-on-horizontal-text-expected.txt: Copied from LayoutTests/svg/text/text-vkern-on-horizontal-text-expected.txt.
  • platform/ios-simulator/tables/mozilla/bugs/bug55527-expected.txt:
  • platform/mac-yosemite/fast/text/emoji-expected.txt:
  • platform/mac-yosemite/svg/W3C-SVG-1.1-SE/text-intro-05-t-expected.txt:
  • platform/mac/css2.1/t1202-counter-04-b-expected.txt:
  • platform/mac/css2.1/t1202-counters-04-b-expected.txt:
  • platform/mac/fast/text/emoji-expected.txt:
  • platform/mac/svg/W3C-SVG-1.1-SE/color-prop-05-t-expected.txt:
  • platform/mac/svg/W3C-SVG-1.1-SE/coords-dom-01-f-expected.txt:
  • platform/mac/svg/W3C-SVG-1.1-SE/coords-dom-02-f-expected.txt:
  • platform/mac/svg/W3C-SVG-1.1-SE/coords-dom-03-f-expected.txt:
  • platform/mac/svg/W3C-SVG-1.1-SE/coords-dom-04-f-expected.txt:
  • platform/mac/svg/W3C-SVG-1.1-SE/coords-units-03-b-expected.txt:
  • platform/mac/svg/W3C-SVG-1.1-SE/filters-felem-01-b-expected.txt:
  • platform/mac/svg/W3C-SVG-1.1-SE/filters-image-03-f-expected.txt:
  • platform/mac/svg/W3C-SVG-1.1-SE/interact-pointer-03-t-expected.txt:
  • platform/mac/svg/W3C-SVG-1.1-SE/linking-uri-01-b-expected.txt:
  • platform/mac/svg/W3C-SVG-1.1-SE/painting-marker-07-f-expected.txt:
  • platform/mac/svg/W3C-SVG-1.1-SE/paths-dom-02-f-expected.txt:
  • platform/mac/svg/W3C-SVG-1.1-SE/pservers-grad-17-b-expected.txt:
  • platform/mac/svg/W3C-SVG-1.1-SE/pservers-grad-20-b-expected.txt:
  • platform/mac/svg/W3C-SVG-1.1-SE/pservers-pattern-03-f-expected.txt:
  • platform/mac/svg/W3C-SVG-1.1-SE/pservers-pattern-04-f-expected.txt:
  • platform/mac/svg/W3C-SVG-1.1-SE/struct-use-14-f-expected.txt:
  • platform/mac/svg/W3C-SVG-1.1-SE/styling-css-04-f-expected.txt:
  • platform/mac/svg/W3C-SVG-1.1-SE/styling-pres-02-f-expected.txt:
  • platform/mac/svg/W3C-SVG-1.1-SE/svgdom-over-01-f-expected.txt:
  • platform/mac/svg/W3C-SVG-1.1-SE/text-intro-02-b-expected.txt:
  • platform/mac/svg/W3C-SVG-1.1-SE/text-intro-05-t-expected.txt:
  • platform/mac/svg/W3C-SVG-1.1-SE/text-intro-09-b-expected.txt:
  • platform/mac/svg/W3C-SVG-1.1-SE/text-tref-03-b-expected.txt:
  • platform/mac/svg/W3C-SVG-1.1-SE/text-tspan-02-b-expected.txt:
  • platform/mac/svg/W3C-SVG-1.1-SE/types-dom-01-b-expected.txt:
  • platform/mac/svg/W3C-SVG-1.1-SE/types-dom-02-f-expected.txt:
  • platform/mac/svg/W3C-SVG-1.1-SE/types-dom-03-b-expected.txt:
  • platform/mac/svg/W3C-SVG-1.1-SE/types-dom-04-b-expected.txt:
  • platform/mac/svg/W3C-SVG-1.1-SE/types-dom-05-b-expected.txt:
  • platform/mac/svg/W3C-SVG-1.1-SE/types-dom-06-f-expected.txt:
  • platform/mac/svg/W3C-SVG-1.1-SE/types-dom-07-f-expected.txt:
  • platform/mac/svg/W3C-SVG-1.1/animate-elem-03-t-expected.txt:
  • platform/mac/svg/W3C-SVG-1.1/animate-elem-24-t-expected.txt:
  • platform/mac/svg/W3C-SVG-1.1/animate-elem-36-t-expected.txt:
  • platform/mac/svg/W3C-SVG-1.1/animate-elem-40-t-expected.txt:
  • platform/mac/svg/W3C-SVG-1.1/filters-light-04-f-expected.txt:
  • platform/mac/svg/W3C-SVG-1.1/filters-turb-02-f-expected.txt:
  • platform/mac/svg/W3C-SVG-1.1/fonts-elem-05-t-expected.txt:
  • platform/mac/svg/W3C-SVG-1.1/fonts-elem-06-t-expected.txt:
  • platform/mac/svg/W3C-SVG-1.1/fonts-glyph-02-t-expected.txt:
  • platform/mac/svg/W3C-SVG-1.1/fonts-glyph-03-t-expected.txt:
  • platform/mac/svg/W3C-SVG-1.1/fonts-kern-01-t-expected.txt:
  • platform/mac/svg/W3C-SVG-1.1/render-elems-06-t-expected.txt:
  • platform/mac/svg/W3C-SVG-1.1/render-elems-07-t-expected.txt:
  • platform/mac/svg/W3C-SVG-1.1/render-elems-08-t-expected.txt:
  • platform/mac/svg/W3C-SVG-1.1/text-align-08-b-expected.txt:
  • platform/mac/svg/W3C-SVG-1.1/text-fonts-03-t-expected.txt:
  • platform/mac/svg/W3C-SVG-1.1/text-text-04-t-expected.txt:
  • platform/mac/svg/batik/text/xmlSpace-expected.txt:
  • platform/mac/svg/custom/glyph-selection-bidi-mirror-expected.txt:
  • platform/mac/svg/custom/glyph-setting-d-attribute-expected.txt:
  • platform/mac/svg/foreignObject/text-tref-02-b-expected.txt:
  • platform/mac/svg/text/kerning-expected.txt:
  • platform/mac/svg/text/multichar-glyph-expected.txt:
  • svg/custom/glyph-transformation-with-hkern-expected.txt:
  • svg/custom/repaint-shadow-expected.txt:
  • svg/text/text-hkern-on-vertical-text-expected.txt:
  • svg/text/text-vkern-on-horizontal-text-expected.txt:
3:16 PM Changeset in webkit [205882] by mark.lam@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

DFG NewArrayBuffer node should watch for "have a bad time" state change.
https://bugs.webkit.org/show_bug.cgi?id=161927
<rdar://problem/27995222>

Reviewed by Geoffrey Garen.

  • dfg/DFGFixupPhase.cpp:

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

2:56 PM Changeset in webkit [205881] by Brent Fulgham
  • 9 edits in trunk/Source/WebCore

[Win] Unreviewed build fix.

Based on a suggestion by Simon Fraser, I have corrected the
headers to avoid including <d2d1.h> directly, relying instead
on forward declarations.

  • platform/graphics/FloatPoint.h:
  • platform/graphics/FloatRect.h:
  • platform/graphics/FloatSize.h:
  • platform/graphics/IntPoint.h:
  • platform/graphics/IntRect.h:
  • platform/graphics/IntSize.h:
  • platform/graphics/transforms/AffineTransform.h:
  • platform/graphics/transforms/TransformationMatrix.h:
2:53 PM Changeset in webkit [205880] by jfbastien@apple.com
  • 6 edits
    1 add in trunk

Support jsc shell builtin read
https://bugs.webkit.org/show_bug.cgi?id=161662

Reviewed by Keith Miller.

JSTests:

  • stress/jsc-read.js: Added.

(test): test read and readFile shell builtins, in string and binary mode.

Source/JavaScriptCore:

The jsc shell currently supports a readFile method which returns
a string. SpiderMonkey's js shell and V8's d8 shell both support
similar file-to-string functions, as well as a
binary-file-to-Uint8Array function. jsc should support a similar
binary file method to simplify testing, including testing of
WebAssembly blobs.

Emscripten's shell.js (which is also used for some WebAssembly
things) has a polyfill [1] for a builtin called read. jsc should
therefore have a builtin with the same name if we want things to
"Just Work".

[1]: https://github.com/kripken/emscripten/blob/5f0918409a1407dd168f57cfa34b109cd1770a8a/src/shell.js#L138

  • jsc.cpp:

(GlobalObject::finishCreation): add read, make readFile take up to 2 arguments.
(functionReadFile): support binary files, as per SpiderMonkey.

  • runtime/Error.h:

(JSC::throwVMError): convenience function, I'll add more uses in a follow-up

  • runtime/JSTypedArrays.cpp:

(JSC::createUint8TypedArray): JS private export of JSUint8Array::create.

  • runtime/JSTypedArrays.h: expose private export.
2:25 PM Changeset in webkit [205879] by bshafiei@apple.com
  • 1 copy in tags/Safari-602.1.50.0.10

New tag.

2:09 PM Changeset in webkit [205878] by timothy_horton@apple.com
  • 5 edits in trunk

Provide a mechanism to specify the maximum size of WKThumbnailView snapshots
https://bugs.webkit.org/show_bug.cgi?id=161896
<rdar://problem/28229827>

Reviewed by Simon Fraser.

Some clients know that their thumbnail views will only be displayed up to
a specific size that is significantly smaller than the WKView size. Allow
them to avoid wasting lots of memory on unnecessarily large snapshots.

  • UIProcess/API/Cocoa/_WKThumbnailView.h:
  • UIProcess/API/Cocoa/_WKThumbnailView.mm:

(-[_WKThumbnailView requestSnapshot]):
(-[_WKThumbnailView _requestSnapshotIfNeeded]):
(-[_WKThumbnailView setMaximumSnapshotSize:]):
Add a maximumSnapshotSize property which can be changed dynamically.

  • TestWebKitAPI/Tests/WebKit2/WKThumbnailView.mm:

(TestWebKitAPI::TEST):
Add a test for the new property.
Also fix the old new test to run on arbitrary scale displays without failing.

1:56 PM Changeset in webkit [205877] by commit-queue@webkit.org
  • 10 edits in trunk/Source/WebCore

Get rid of the m_premultiplyAlpha flag of the ImageFrame class
https://bugs.webkit.org/show_bug.cgi?id=159721

Patch by Said Abou-Hallawa <sabouhallawa@apple.com> on 2016-09-13
Reviewed by Simon Fraser.

This flag was only needed when calling ImageBackingStore::create() in
ImageFrame::setSize(). Instead we can pass ImageDecoder::m_premultiplyAlpha
to ImageFrame::setSize(), which is renamed ImageFrame::initializeBackingStore().
The passed premultiplyAlpha can then be passed to ImageBackingStore::create().

  • platform/image-decoders/ImageDecoder.cpp:

(WebCore::ImageFrame::ImageFrame):
(WebCore::ImageFrame::operator=):
(WebCore::ImageFrame::initializeBackingStore):
(WebCore::ImageFrame::copyBitmapData): Deleted.
(WebCore::ImageFrame::setSize): Deleted.

  • platform/image-decoders/ImageDecoder.h:

(WebCore::ImageFrame::disposalMethod):
(WebCore::ImageFrame::setDisposalMethod):
(WebCore::ImageDecoder::premultiplyAlpha):
(WebCore::ImageFrame::premultiplyAlpha): Deleted.
(WebCore::ImageFrame::setPremultiplyAlpha): Deleted.

  • platform/image-decoders/bmp/BMPImageDecoder.cpp:

(WebCore::BMPImageDecoder::frameBufferAtIndex):

  • platform/image-decoders/bmp/BMPImageReader.cpp:

(WebCore::BMPImageReader::decodeBMP):

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

(WebCore::GIFImageDecoder::decode):
(WebCore::GIFImageDecoder::initFrameBuffer):

  • platform/image-decoders/ico/ICOImageDecoder.cpp:

(WebCore::ICOImageDecoder::frameCount):

  • platform/image-decoders/jpeg/JPEGImageDecoder.cpp:

(WebCore::JPEGImageDecoder::frameBufferAtIndex):
(WebCore::JPEGImageDecoder::outputScanlines):

  • platform/image-decoders/png/PNGImageDecoder.cpp:

(WebCore::PNGImageDecoder::frameBufferAtIndex):
(WebCore::PNGImageDecoder::rowAvailable):
(WebCore::PNGImageDecoder::readChunks):
(WebCore::PNGImageDecoder::initFrameBuffer):
(WebCore::setPixelRGB): Deleted.
(WebCore::setPixelRGBA): Deleted.
(WebCore::setPixelPremultipliedRGBA): Deleted.

  • platform/image-decoders/webp/WEBPImageDecoder.cpp:

(WebCore::WEBPImageDecoder::frameBufferAtIndex):
(WebCore::WEBPImageDecoder::decode):

1:47 PM Changeset in webkit [205876] by bshafiei@apple.com
  • 5 edits in branches/safari-602.1.50.0-branch/Source

Versioning.

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

Merge r205873. rdar://problem/28208208

1:38 PM Changeset in webkit [205874] by bshafiei@apple.com
  • 2 edits in branches/safari-602.1.50.0-branch/Source/WebKit2

Merge r205873. rdar://problem/28208208

1:14 PM Changeset in webkit [205873] by andersca@apple.com
  • 2 edits in trunk/Source/WebKit2

REGRESSION (r196321): Amazon Videos are all black in Fullscreen
https://bugs.webkit.org/show_bug.cgi?id=161924
rdar://problem/28208208

Reviewed by Dan Bernstein.

  • Shared/EntryPointUtilities/mac/XPCService/XPCServiceMain.mm:

(main):
Set AppleMagnifiedMode to true.

1:12 PM Changeset in webkit [205872] by Matt Baker
  • 11 edits in trunk

Web Inspector: Use Array.shallowEqual instead of Object.shallowEqual in more places
https://bugs.webkit.org/show_bug.cgi?id=161867
<rdar://problem/28261328>

Reviewed by Joseph Pecoraro.

Source/WebInspectorUI:

  • UserInterface/Base/Utilities.js:

(value):
Array.shallowEqual should return false if passed a non-array.

  • UserInterface/Models/CSSRule.js:

(WebInspector.CSSRule.prototype.update):

  • UserInterface/Models/Color.js:

(WebInspector.Color.prototype.isKeyword):

  • UserInterface/Models/DOMNodeStyles.js:

(WebInspector.DOMNodeStyles.prototype.refresh.fetchedComputedStyle):
(WebInspector.DOMNodeStyles.prototype.refresh):

  • UserInterface/Models/Geometry.js:

(WebInspector.CubicBezier.prototype.toString):

  • UserInterface/Views/GeneralTreeElement.js:

(WebInspector.GeneralTreeElement.prototype.set classNames):

  • UserInterface/Views/NewTabContentView.js:

(WebInspector.NewTabContentView.prototype._updateShownTabs):
Prefer Array.shallowEqual over Obejct.shallowEqual if the arguments
will always be arrays.

LayoutTests:

  • inspector/unit-tests/array-utilities-expected.txt:
  • inspector/unit-tests/array-utilities.html:

Add test coverage for Array.shallowEqual.
Use Array.shallowEqual instead of JSON.stringify in tests.
Use expectFalse and expectEqual in tests where appropriate.

12:54 PM Changeset in webkit [205871] by Brent Fulgham
  • 19 edits
    11 adds in trunk

[Win][Direct2D] Provide Direct2D-based geometry and transform cast operations
https://bugs.webkit.org/show_bug.cgi?id=161818

Reviewed by Dean Jackson.

Source/WebCore:

Tested by new TestWebKitAPI tests.

Add new casting operators to and from various Direct2D data types.

  • PlatformWin.cmake:
  • platform/graphics/FloatPoint.h:

(WebCore::FloatPoint::FloatPoint):

  • platform/graphics/FloatRect.h:
  • platform/graphics/FloatSize.h:

(WebCore::FloatSize::FloatSize):

  • platform/graphics/IntPoint.h:
  • platform/graphics/IntRect.h:
  • platform/graphics/IntSize.h:
  • platform/graphics/transforms/AffineTransform.h:
  • platform/graphics/transforms/TransformationMatrix.h:
  • platform/graphics/win/FloatPointDirect2D.cpp:
  • platform/graphics/win/FloatRectDirect2D.cpp:
  • platform/graphics/win/FloatSizeDirect2D.cpp:
  • platform/graphics/win/IntPointWin.cpp:

(WebCore::IntPoint::IntPoint):
(WebCore::IntPoint::operator D2D1_POINT_2F):
(WebCore::IntPoint::operator D2D1_POINT_2U):

  • platform/graphics/win/IntRectWin.cpp:

(WebCore::IntRect::IntRect):
(WebCore::IntRect::operator D2D1_RECT_F):
(WebCore::IntRect::operator D2D1_RECT_U):

  • platform/graphics/win/IntSizeWin.cpp:

(WebCore::IntSize::IntSize):
(WebCore::IntSize::operator D2D1_SIZE_U):
(WebCore::IntSize::operator D2D1_SIZE_F):

  • platform/graphics/win/TransformationMatrixDirect2D.cpp: Added.

(WebCore::TransformationMatrix::TransformationMatrix):
(WebCore::TransformationMatrix::operator D2D1_MATRIX_3X2_F):
(WebCore::AffineTransform::AffineTransform):
(WebCore::AffineTransform::operator D2D1_MATRIX_3X2_F):

Source/WebKit:

  • PlatformWin.cmake: Link to Direct2D on Windows.

Tools:

Add several new test suites for the various geometric primitives in WebCore.

  • TestWebKitAPI/PlatformWin.cmake: Add new files for test cases.
  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: Ditto.
  • TestWebKitAPI/Tests/WebCore/AffineTransform.cpp: Added.
  • TestWebKitAPI/Tests/WebCore/FloatPoint.cpp: Added.
  • TestWebKitAPI/Tests/WebCore/FloatRect.cpp: Added.
  • TestWebKitAPI/Tests/WebCore/FloatSize.cpp: Added.
  • TestWebKitAPI/Tests/WebCore/IntPoint.cpp: Added.
  • TestWebKitAPI/Tests/WebCore/IntRect.cpp: Added.
  • TestWebKitAPI/Tests/WebCore/IntSize.cpp: Added.
  • TestWebKitAPI/Tests/WebCore/TransformationMatrix.cpp: Add some new

Windows-focused test cases.

12:44 PM Changeset in webkit [205870] by timothy_horton@apple.com
  • 11 edits
    4 adds in trunk

Undoing a candidate insertion results in the replaced text being selected
https://bugs.webkit.org/show_bug.cgi?id=161894
<rdar://problem/28225774>

Reviewed by Simon Fraser.

Test: editing/mac/spelling/accept-candidate-undo-does-not-select.html

  • WebCore.xcodeproj/project.pbxproj:
  • editing/ReplaceRangeWithTextCommand.cpp: Added.

(WebCore::ReplaceRangeWithTextCommand::ReplaceRangeWithTextCommand):
(WebCore::ReplaceRangeWithTextCommand::doApply):

  • editing/ReplaceRangeWithTextCommand.h: Added.

(WebCore::ReplaceRangeWithTextCommand::create):
Add a editor command that replaces a range with the given text.

  • editing/Editor.cpp:

(WebCore::Editor::rangeForTextCheckingResult):
(WebCore::Editor::handleAcceptedCandidate):
(WebCore::Editor::selectTextCheckingResult): Deleted.

  • editing/Editor.h:

Make use of the new editor command to do candidate insertion as a single
composite operation, so that it is undone as a unit. Otherwise, undo ends up
undoing the insertion, but not the selection, and we are left with the old
text, selected, which is undesirable.

  • editing/mac/spelling/accept-candidate-allows-autocorrect-on-next-word-expected.txt:
  • editing/mac/spelling/accept-candidate-replacing-multiple-words-expected.txt:
  • editing/mac/spelling/accept-candidate-undo-does-not-select-expected.txt: Copied from LayoutTests/editing/mac/spelling/accept-candidate-replacing-multiple-words-expected.txt.
  • editing/mac/spelling/accept-candidate-undo-does-not-select.html: Added.
  • editing/mac/spelling/accept-candidate-without-adding-space-expected.txt:
  • editing/mac/spelling/accept-candidate-without-crossing-editing-boundary-expected.txt:

Adjust some test results, and add a new test that ensures that undoing
a candidate insertion does not select the replaced text.

12:08 PM Changeset in webkit [205869] by hyatt@apple.com
  • 13 edits
    10 adds in trunk/Source/WebCore

[CSS Parser] Add CSS Variable Parsing support
https://bugs.webkit.org/show_bug.cgi?id=161916

Reviewed by Dean Jackson.

This patch not only adds the parser for CSS variables (from Blink), but it also brings in
all of the data structures used to store variables and custom property declarations. We
will be abandoning our old data structures eventually in favor of these new ones. They
are not significantly different other than operating on the CSSParserTokenRanges rather
than the soon-to-be-removed parser value lists.

  • CMakeLists.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • css/CSSCustomIdentValue.cpp: Added.

(WebCore::CSSCustomIdentValue::CSSCustomIdentValue):
(WebCore::CSSCustomIdentValue::customCSSText):

  • css/CSSCustomIdentValue.h: Added.

(WebCore::CSSCustomIdentValue::create):
(WebCore::CSSCustomIdentValue::value):
(WebCore::CSSCustomIdentValue::isKnownPropertyID):
(WebCore::CSSCustomIdentValue::valueAsPropertyID):
(WebCore::CSSCustomIdentValue::equals):

  • css/CSSCustomPropertyDeclaration.cpp: Added.

(WebCore::CSSCustomPropertyDeclaration::customCSSText):

  • css/CSSCustomPropertyDeclaration.h: Added.

(WebCore::CSSCustomPropertyDeclaration::create):
(WebCore::CSSCustomPropertyDeclaration::name):
(WebCore::CSSCustomPropertyDeclaration::value):
(WebCore::CSSCustomPropertyDeclaration::id):
(WebCore::CSSCustomPropertyDeclaration::equals):
(WebCore::CSSCustomPropertyDeclaration::CSSCustomPropertyDeclaration):

  • css/CSSCustomPropertyValue.h:
  • css/CSSValue.cpp:

(WebCore::CSSValue::cssText):
(WebCore::CSSValue::destroy):

  • css/CSSValue.h:

(WebCore::CSSValue::isCustomPropertyDeclaration):
(WebCore::CSSValue::isCustomIdentValue):
(WebCore::CSSValue::isVariableReferenceValue):

  • css/CSSValueKeywords.in:
  • css/CSSVariableData.cpp: Added.

(WebCore::CSSVariableData::updateTokens):
(WebCore::CSSVariableData::operator==):
(WebCore::CSSVariableData::consumeAndUpdateTokens):
(WebCore::CSSVariableData::CSSVariableData):

  • css/CSSVariableData.h: Added.

(WebCore::CSSVariableData::create):
(WebCore::CSSVariableData::createResolved):
(WebCore::CSSVariableData::tokenRange):
(WebCore::CSSVariableData::tokens):
(WebCore::CSSVariableData::needsVariableResolution):
(WebCore::CSSVariableData::CSSVariableData):

  • css/CSSVariableDependentValue.h:
  • css/CSSVariableReferenceValue.cpp: Added.

(WebCore::CSSVariableReferenceValue::customCSSText):

  • css/CSSVariableReferenceValue.h: Added.

(WebCore::CSSVariableReferenceValue::create):
(WebCore::CSSVariableReferenceValue::variableDataValue):
(WebCore::CSSVariableReferenceValue::equals):
(WebCore::CSSVariableReferenceValue::CSSVariableReferenceValue):

  • css/CSSVariableValue.h:
  • css/parser/CSSParserImpl.cpp:

(WebCore::filterProperties):
(WebCore::CSSParserImpl::consumeDeclaration):
(WebCore::CSSParserImpl::consumeVariableValue):

  • css/parser/CSSVariableParser.cpp: Added.

(WebCore::CSSVariableParser::isValidVariableName):
(WebCore::classifyBlock):
(WebCore::isValidVariableReference):
(WebCore::classifyVariableRange):
(WebCore::CSSVariableParser::containsValidVariableReferences):
(WebCore::CSSVariableParser::parseDeclarationValue):

  • css/parser/CSSVariableParser.h: Added.
12:01 PM Changeset in webkit [205868] by dbates@webkit.org
  • 2 edits in trunk/Source/WebCore

Remove CSS keyword properties from CSSParser::parseValue(CSSPropertyID, bool)
https://bugs.webkit.org/show_bug.cgi?id=161918

Reviewed by Simon Fraser.

CSSParser::parseValue(CSSPropertyID, bool) calls ASSERT_NOT_REACHED() when processing a CSS property
that is known to accept only keyword values as a means to guide a person to add such a CSS property
to the switch block in WebCore::isValidKeywordPropertyAndValue(). In theory this sounds good, but
in practice it does not work out and the list of such properties is stale. We should remove the
case statements for such properties and the maintenance burden they required, which was manual and
error prone. We should think about a better way to enforce that all CSS properties are parsed/validated.

The approach of calling ASSERT_NOT_REACHED is not beneficial to catching coding mistakes because
CSSParser::parseValue() has a default case statement to parse/validate SVG CSS properties and hence
does not allow the C++ compiler to validate that the switch block covers all CSSPropertyIDs.

  • css/parser/CSSParser.cpp:

(WebCore::CSSParser::parseValue):

12:01 PM Changeset in webkit [205867] by dbates@webkit.org
  • 2 edits in trunk/Source/WebCore

Organize CSS keyword properties in WebCore::isKeywordPropertyID()
https://bugs.webkit.org/show_bug.cgi?id=161917

Reviewed by Simon Fraser.

Group and sort compile-time feature keywords and move them to the end of the switch block
to avoid the distraction of preprocessor statements scattered throughout the list. Sort
all the other keyword properties to make it straightforward to find a property by name.

  • css/parser/CSSParser.cpp:

(WebCore::isKeywordPropertyID):

11:37 AM Changeset in webkit [205866] by commit-queue@webkit.org
  • 14 edits
    2 adds in trunk

Web Inspector: Should be able to pretty print module code (import / export statements)
https://bugs.webkit.org/show_bug.cgi?id=161891
<rdar://problem/28272784>

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2016-09-13
Reviewed by Yusuke Suzuki.

Source/WebInspectorUI:

  • Tools/Formatting/EsprimaFormatterDebug.js:
  • Tools/Formatting/index.html:

Update the formatting tool to toggle between source type modes.

  • UserInterface/Proxies/FormatterWorkerProxy.js:
  • UserInterface/Workers/Formatter/FormatterWorker.js:

(FormatterWorker.prototype.formatJavaScript):
Provide a flag to parse the input as a module instead of a script/program.

  • UserInterface/Views/TextEditor.js:

(WebInspector.TextEditor.prototype._startWorkerPrettyPrint):
Using the formatter here, we may have module scripts in the future.

  • UserInterface/Views/SourceCodeTextEditor.js:

(WebInspector.SourceCodeTextEditor.prototype._showPopoverForFunction.didGetDetails):
Using the formatter for a function is not module source.

  • UserInterface/Workers/Formatter/ESTreeWalker.js:

(ESTreeWalker.prototype._walkChildren):
Visit children of Export/Import nodes.

  • UserInterface/Workers/Formatter/EsprimaFormatter.js:

(EsprimaFormatter.prototype._handleTokenAtNode):
Output tokens with appropriate whitespace.

LayoutTests:

  • inspector/formatting/formatting-javascript-expected.txt:
  • inspector/formatting/formatting-javascript.html:
  • inspector/formatting/resources/javascript-tests/modules-expected.js: Added.
  • inspector/formatting/resources/javascript-tests/modules.js: Added.

Include a new test for modules.

  • inspector/formatting/formatting-json.html:

All of these are non-module source code.

  • inspector/formatting/resources/utilities.js:

Determine if module or not based on the test name.

11:20 AM Changeset in webkit [205865] by n_wang@apple.com
  • 2 edits in trunk/Source/WebCore

AX: Crash at AccessibilityRenderObject::computeAccessibilityIsIgnored const + 552
https://bugs.webkit.org/show_bug.cgi?id=161276

Reviewed by Chris Fleizach.

Sometimes when calling JavaScript removeChild or setAttribute on a node, it seems like
the renderer is deallocated during the process of computeAccessibilityIsIgnored. It's
causing a crash when we are accessing the renderer after that. Since RenderObject is not ref
counted and we cannot hold onto it for the duration of the function, fixed it by adding
more nil checks.

Despite my best efforts, I couldn't make a layout test that destroys the renderer within
the computeAccessibilityIsIgnored function.

  • accessibility/AccessibilityRenderObject.cpp:

(WebCore::AccessibilityRenderObject::computeAccessibilityIsIgnored):

10:53 AM Changeset in webkit [205864] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Marking http/tests/security/cross-origin-cached-scripts-parallel.html as flaky.
https://bugs.webkit.org/show_bug.cgi?id=161912

Unreviewed test gardening.

10:43 AM Changeset in webkit [205863] by jer.noble@apple.com
  • 4 edits
    2 adds in trunk

Media-source backed elements block load event; cause web-platform-test flakiness
https://bugs.webkit.org/show_bug.cgi?id=161881

Reviewed by Eric Carlson.

Source/WebCore:

Test: media/media-source/media-source-delaying-load-event.html

The MSE specification has added an explicit step to their "attaching to media element"
algorithm which tells the media element to stop delaying the load event. And indeed,
the HTMLMediaElement blocks the load event when a MediaSource is attached but its data
is never loaded.

  • Modules/mediasource/MediaSource.cpp:

(WebCore::MediaSource::setPrivateAndOpen):

  • html/HTMLMediaElement.h:

LayoutTests:

  • media/media-source/media-source-delaying-load-event-expected.txt: Added.
  • media/media-source/media-source-delaying-load-event.html: Added.
10:33 AM Changeset in webkit [205862] by jer.noble@apple.com
  • 2 edits in trunk/LayoutTests

Unreviewed gardening; removed duplicate entry for mediasource-config-change-mp4-v-bitrate.html.

  • platform/mac/TestExpectations:
10:05 AM Changeset in webkit [205861] by Alan Bujtas
  • 3 edits
    2 adds in trunk

Input type object and the associated render can go out of sync.
https://bugs.webkit.org/show_bug.cgi?id=161871
<rdar://problem/28178094>

Reviewed by Antti Koivisto.

Source/WebCore:

Bail out when we've got a mismatched renderer.

Test: fast/forms/assert-on-input-type-change.html

  • html/ImageInputType.cpp:

(WebCore::ImageInputType::altAttributeChanged):

LayoutTests:

  • fast/forms/assert-on-input-type-change-expected.txt: Added.
  • fast/forms/assert-on-input-type-change.html: Added.
9:13 AM Changeset in webkit [205860] by Carlos Garcia Campos
  • 12 edits in trunk/Source

[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.

8:59 AM Changeset in webkit [205859] by fpizlo@apple.com
  • 2 edits in trunk/Source/WTF

ParkingLot is going to have a bad time with threads dying
https://bugs.webkit.org/show_bug.cgi?id=161893

Reviewed by Michael Saboff.

If a thread dies right as it falls out of parkConditionally, then unparkOne() and friends
might die because they will dereference a deallocated ThreadData.

The solution is to ref-count ThreadData's. When unparkOne() and friends want to hold onto a
ThreadData past the queue lock, they can use RefPtr<>.

  • wtf/ParkingLot.cpp:

(WTF::ParkingLot::unparkOne):
(WTF::ParkingLot::unparkOneImpl):
(WTF::ParkingLot::unparkAll):

8:02 AM Changeset in webkit [205858] by Chris Dumez
  • 29 edits
    3 adds
    56 deletes in trunk

Drop support for <isindex>
https://bugs.webkit.org/show_bug.cgi?id=7139

Reviewed by Ryosuke Niwa.

LayoutTests/imported/w3c:

Import layout test coverage from W3C web-platform-tests. We used to fail
the last check but we now pass it. Chrome also passes this last check.

  • web-platform-tests/html/semantics/forms/historical-expected.txt: Added.
  • web-platform-tests/html/semantics/forms/historical.html: Added.
  • web-platform-tests/html/semantics/forms/w3c-import.log: Added.

Source/WebCore:

Drop support for <isindex> and <input name=isindex>. Those are no longer
in the HTML specification and Chrome / Edge have already dropped their
support. Firefox is also planning on dropping this.

Test: imported/w3c/web-platform-tests/html/semantics/forms/historical.html

  • css/StyleResolver.cpp:

(WebCore::elementTypeHasAppearanceFromUAStyle):

  • css/html.css:

(input, textarea, keygen, select, button, meter, progress):
(input, textarea, keygen, select, button):
(#if defined(WTF_PLATFORM_IOS) && WTF_PLATFORM_IOS):
(input::placeholder):
(input:focus, textarea:focus, keygen:focus, select:focus):

  • dom/Element.cpp:

(WebCore::Element::ieForbidsInsertHTML):

  • html/HTMLInputElement.cpp:

(WebCore::HTMLInputElement::HTMLInputElement):

  • html/HTMLTagNames.in:
  • html/parser/HTMLStackItem.h:

(WebCore::isSpecialNode):

  • html/parser/HTMLTreeBuilder.cpp:

(WebCore::HTMLTreeBuilder::processStartTagForInBody):
(WebCore::HTMLTreeBuilder::processCloseWhenNestedTag): Deleted.
(WebCore::createCaseMap): Deleted.

  • html/parser/HTMLTreeBuilder.h:
  • platform/network/FormData.cpp:

(WebCore::FormData::appendKeyValuePairItems):

Source/WebInspectorUI:

Drop references to isindex.

  • UserInterface/Views/DOMTreeElement.js:

Source/WebKit/mac:

Drop references to isindex.

  • WebCoreSupport/WebEditorClient.mm:

(attributesForAttributedStringConversion):

  • WebView/WebHTMLView.mm:

(+[WebHTMLView _excludedElementsForAttributedStringConversion]):

LayoutTests:

Drop outdated tests / checks.

  • dom/html/level2/html/HTMLIsIndexElement01-expected.txt: Removed.
  • dom/html/level2/html/HTMLIsIndexElement01.html: Removed.
  • dom/html/level2/html/HTMLIsIndexElement01.js: Removed.
  • dom/html/level2/html/HTMLIsIndexElement02-expected.txt: Removed.
  • dom/html/level2/html/HTMLIsIndexElement02.html: Removed.
  • dom/html/level2/html/HTMLIsIndexElement02.js: Removed.
  • dom/html/level2/html/HTMLIsIndexElement03-expected.txt: Removed.
  • dom/html/level2/html/HTMLIsIndexElement03.html: Removed.
  • dom/html/level2/html/HTMLIsIndexElement03.js: Removed.
  • fast/dom/HTMLIsIndexElement/prototype-chain-expected.txt: Removed.
  • fast/dom/HTMLIsIndexElement/prototype-chain.html: Removed.
  • fast/dom/HTMLIsIndexElement/script-tests/prototype-chain.js: Removed.
  • fast/dom/isindex-001.html: Removed.
  • fast/dom/isindex-002.html: Removed.
  • fast/events/resources/tabindex-focus-blur-all-frame1.html:
  • fast/events/resources/tabindex-focus-blur-all-frame2.html:
  • fast/events/resources/tabindex-focus-blur-all-iframe1.html:
  • fast/events/resources/tabindex-focus-blur-all-iframe2.html:
  • fast/forms/isindex-name-expected.txt: Removed.
  • fast/forms/isindex-name.html: Removed.
  • fast/forms/isindex-placeholder-expected.html: Removed.
  • fast/forms/isindex-placeholder.html: Removed.
  • fast/forms/text-style-color.html: Removed.
  • fast/parser/fragment-parser-expected.txt:
  • fast/parser/script-tests/fragment-parser.js:
  • fast/replaced/table-percent-height-text-controls-expected.txt:
  • fast/replaced/table-percent-height-text-controls.html:
  • html5lib/generated/run-isindex-data-expected.txt: Removed.
  • html5lib/generated/run-isindex-data.html: Removed.
  • html5lib/generated/run-isindex-write-expected.txt: Removed.
  • html5lib/generated/run-isindex-write.html: Removed.
  • html5lib/resources/isindex.dat:
  • html5lib/resources/tests19.dat:
  • html5lib/resources/tests2.dat:
  • html5lib/resources/webkit02.dat:
  • http/tests/misc/isindex-formdata-expected.txt: Removed.
  • http/tests/misc/isindex-formdata.html: Removed.
  • http/tests/misc/isindex-with-no-form-base-href-expected.txt: Removed.
  • http/tests/misc/isindex-with-no-form-base-href.html: Removed.
  • http/tests/misc/isindex-with-no-form-expected.txt: Removed.
  • http/tests/misc/isindex-with-no-form.html: Removed.
  • http/tests/misc/resources/isindex-with-no-form-base-href-submit.html: Removed.
  • http/tests/misc/resources/isindex-with-no-form-base-href.html: Removed.
  • platform/efl/fast/dom/isindex-001-expected.png: Removed.
  • platform/efl/fast/dom/isindex-001-expected.txt: Removed.
  • platform/efl/fast/dom/isindex-002-expected.png: Removed.
  • platform/efl/fast/dom/isindex-002-expected.txt: Removed.
  • platform/efl/fast/forms/text-style-color-expected.png: Removed.
  • platform/efl/fast/forms/text-style-color-expected.txt: Removed.
  • platform/gtk/fast/dom/isindex-001-expected.png: Removed.
  • platform/gtk/fast/dom/isindex-001-expected.txt: Removed.
  • platform/gtk/fast/dom/isindex-002-expected.png: Removed.
  • platform/gtk/fast/dom/isindex-002-expected.txt: Removed.
  • platform/gtk/fast/forms/text-style-color-expected.png: Removed.
  • platform/gtk/fast/forms/text-style-color-expected.txt: Removed.
  • platform/ios-simulator/fast/dom/isindex-001-expected.txt: Removed.
  • platform/ios-simulator/fast/dom/isindex-002-expected.txt: Removed.
  • platform/ios-simulator/fast/forms/text-style-color-expected.txt: Removed.
  • platform/mac-elcapitan/fast/dom/isindex-001-expected.txt: Removed.
  • platform/mac-elcapitan/fast/dom/isindex-002-expected.txt: Removed.
  • platform/mac-elcapitan/fast/forms/text-style-color-expected.txt: Removed.
  • platform/mac/fast/dom/isindex-001-expected.png: Removed.
  • platform/mac/fast/dom/isindex-001-expected.txt: Removed.
  • platform/mac/fast/dom/isindex-002-expected.png: Removed.
  • platform/mac/fast/dom/isindex-002-expected.txt: Removed.
  • platform/mac/fast/forms/text-style-color-expected.png: Removed.
  • platform/mac/fast/forms/text-style-color-expected.txt: Removed.
  • platform/win/fast/dom/isindex-001-expected.txt: Removed.
  • platform/win/fast/dom/isindex-002-expected.txt: Removed.
  • platform/win/fast/forms/text-style-color-expected.txt: Removed.
4:52 AM Changeset in webkit [205857] by pvollan@apple.com
  • 2 edits in trunk/LayoutTests

Skip media source tests since the feature is not enabled on Windows.

Unreviewed test gardening.

  • platform/win/TestExpectations:
1:17 AM Changeset in webkit [205856] by gskachkov@gmail.com
  • 18 edits
    1 copy
    1 move
    4 adds
    2 deletes in trunk

ES6: Classes: Should be allowed to create a static method with name "arguments"
https://bugs.webkit.org/show_bug.cgi?id=152985

Reviewed by Keith Miller.

Source/JavaScriptCore:

Current patch covered 16.2 Forbidden Extensions - first topic
(https://tc39.github.io/ecma262/#sec-forbidden-extensions) ECMAScript Functions
should not have own properties named "caller" or "arguments".
Also added possibility to declare static methods and getters with
name 'arguments' and 'caller' for classes. i.e.:
class A { static arguments() { return 'value'; } }
A.arguments() === 'value';
To implement this patch 'caller' and 'arguments' were put to the FunctionPrototype
object. Also was changed approach to init throwTypeErrorArgumentsCalleeAndCallerGetterSetter
property from Lazy to common because it necessary to use execState during init of the accessors
properties.

  • runtime/Executable.h:
  • runtime/FunctionPrototype.cpp:

(JSC::FunctionPrototype::initRestrictedProperties):
(JSC::FunctionPrototype::addFunctionProperties): Deleted.

  • runtime/FunctionPrototype.h:
  • runtime/JSFunction.cpp:

(JSC::JSFunction::getOwnPropertySlot):
(JSC::JSFunction::getOwnNonIndexPropertyNames):
(JSC::JSFunction::put):
(JSC::JSFunction::deleteProperty):
(JSC::JSFunction::defineOwnProperty):

  • runtime/JSGlobalObject.cpp:

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

  • runtime/JSGlobalObject.h:

(JSC::JSGlobalObject::throwTypeErrorArgumentsCalleeAndCallerGetterSetter):

JSTests:

  • test262.yaml:

LayoutTests:

  • js/Object-getOwnPropertyNames-expected.txt:
  • js/basic-strict-mode-expected.txt:
  • js/class-method-and-constructor-properties-expected.txt: Removed.
  • js/class-syntax-method-names-expected.txt:
  • js/es6-function-properties-expected.txt: Added.
  • js/es6-function-properties.html: Copied from LayoutTests/js/class-method-and-constructor-properties.html.
  • js/kde/script-tests/function_arguments.js:

(f):

  • js/non-strict-function-properties-expected.txt: Added.
  • js/non-strict-function-properties.html: Renamed from LayoutTests/js/class-method-and-constructor-properties.html.
  • js/script-tests/Object-getOwnPropertyNames.js:
  • js/script-tests/basic-strict-mode.js:
  • js/script-tests/class-method-and-constructor-properties.js: Removed.

(shouldThrow): Deleted.
(shouldBe): Deleted.
(A): Deleted.
(B): Deleted.
(C): Deleted.
(D): Deleted.
(E.prototype.getItem): Deleted.
(E): Deleted.
(F.prototype.getElement): Deleted.
(F): Deleted.
(G.prototype.get item): Deleted.
(G): Deleted.
(H.prototype.caller): Deleted.
(H.prototype.arguments): Deleted.
(H): Deleted.

  • js/script-tests/class-syntax-method-names.js:
  • js/script-tests/es6-function-properties.js: Added.

(shouldThrow):
(shouldBe):
(A):
(B):
(C):
(D):
(E.prototype.getItem):
(E):
(F.prototype.getElement):
(F):
(G.prototype.get item):
(G):
(check):
(arr):
(H.prototype.caller):
(H.prototype.arguments):
(H):
(J.prototype.gen):
(J.gen):
(J):

  • js/script-tests/non-strict-function-properties.js: Added.

(foo):
(boo):
(f):
(g):
(doSetCaller):
(doSetArguments):

  • js/script-tests/strict-throw-type-error.js:

Sep 12, 2016:

11:52 PM Changeset in webkit [205855] by pvollan@apple.com
  • 3 edits
    1 delete in trunk/Source/WebCore

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

Reviewed by Brent Fulgham.

Use exported constants from CoreText.dll, instead of creating copies.

  • PlatformAppleWin.cmake:
  • platform/spi/win/CoreTextSPIWin.cpp: Removed.
  • platform/spi/win/CoreTextSPIWin.h:
11:46 PM Changeset in webkit [205854] by commit-queue@webkit.org
  • 14 edits
    1 copy
    4 moves
    10 adds
    1 delete in trunk

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

Patch by Youenn Fablet <youenn@apple.com> on 2016-09-12
Reviewed by Darin Adler.

Source/WebCore:

Setting ScriptElement fetch mode according its crossOrigin attribute.
Removing LoadableClassicScriptchecking of CORS since this is now done at ResourceLoader/CachedResource level.

Updating CachedResourceLoader to ensure that a resource that matches an on-going resource load but with different fetch mode/origin,
always gets its loading started if the resource state is not Cached.

Tests: fast/dom/script-crossorigin-loads-fail-origin.html

http/tests/security/cross-origin-cached-images-parallel.html
http/tests/security/cross-origin-cached-images.html
http/tests/security/cross-origin-cached-scripts-parallel.html
http/tests/security/cross-origin-cached-scripts.html
http/tests/security/script-crossorigin-loads-correctly-credentials.html
http/tests/security/script-with-dataurl.html

  • dom/LoadableClassicScript.cpp:

(WebCore::LoadableClassicScript::create):
(WebCore::LoadableClassicScript::notifyFinished): Checking CORS failures using the resource state.
(WebCore::LoadableClassicScript::~LoadableClassicScript): Deleted.
(WebCore::LoadableClassicScript::isLoaded): Deleted.

  • dom/LoadableClassicScript.h:
  • dom/ScriptElement.cpp:

(WebCore::ScriptElement::requestClassicScript):
(WebCore::ScriptElement::requestScriptWithCache): Using CachedResourceRequest::setAsPotentiallyCrossOrigin to set fetch mode according crossOrigin attribute.

  • dom/ScriptElement.h:
  • loader/cache/CachedImage.cpp:

(WebCore::CachedImage::setBodyDataFrom):

  • loader/cache/CachedResourceLoader.cpp:

(WebCore::CachedResourceLoader::updateCachedResourceWithCurrentRequest): Adding support for script resources.
(WebCore::CachedResourceLoader::requestResource): Ensuring that 'updated' resources gets actually loaded.

  • loader/cache/CachedScript.cpp:

(WebCore::CachedScript::setBodyDataFrom): Implementing specific data copy from another CachedScript.

  • loader/cache/CachedScript.h:

LayoutTests:

Added new tests.
Updated cookie test for robustness as the order of the cookie items when more than one may not be preserved.

Moved one of the blink test to http/tests as it requires HTTP to run properly.
Updated blink test expectation as it is run from file, while it should be run from http.

Copied a similar test to http/tests/local to ensure that script load fails when served from the filesystem , CORS check failing.
The test was previously passing in WebKit as the test file was served from filesystem and was granted universal access.
The CORS checks were done through SecurityOrigin::canRequest which was testing that first.
With the patch, CORS checks are done at a lower level and do not take in to account universal access.
This aligns with Chrome and Firefox behavior.

  • http/tests/local/script-crossorigin-loads-fail-origin-expected.txt: Added.
  • http/tests/local/script-crossorigin-loads-fail-origin.html: Copied from LayoutTests/imported/blink/http/tests/security/script-crossorigin-loads-correctly-credentials.html.
  • http/tests/cookies/resources/third-party-cookie-relaxing-iframe.html: Sorting the cookie to make the test more resistant.
  • http/tests/security/cross-origin-cached-images-expected.txt: Added.
  • http/tests/security/cross-origin-cached-images-parallel-expected.txt: Added.
  • http/tests/security/cross-origin-cached-images-parallel.html: Renamed from LayoutTests/http/tests/security/cross-origin-cached-resource-parallel.html.
  • http/tests/security/cross-origin-cached-images.html: Renamed from LayoutTests/http/tests/security/cross-origin-cached-resource.html.
  • http/tests/security/cross-origin-cached-resource-parallel-expected.txt: Removed.
  • http/tests/security/cross-origin-cached-scripts-expected.txt: Added.
  • http/tests/security/cross-origin-cached-scripts-parallel-expected.txt: Added.
  • http/tests/security/cross-origin-cached-scripts-parallel.html: Added.
  • http/tests/security/cross-origin-cached-scripts.html: Added.
  • http/tests/security/resources/cors-script.php: Updated according chromium script to activate CORS credentials header if requested.
  • http/tests/security/resources/cross-origin-cached-resource-iframe.html:
  • http/tests/security/resources/notify-loaded.js: Added.
  • http/tests/security/script-crossorigin-loads-correctly-credentials-expected.txt: Renamed from LayoutTests/imported/blink/http/tests/security/script-crossorigin-loads-correctly-credentials-expected.txt.
  • http/tests/security/script-crossorigin-loads-correctly-credentials.html: Renamed from LayoutTests/imported/blink/http/tests/security/script-crossorigin-loads-correctly-credentials.html.
  • http/tests/security/script-with-dataurl-expected.txt: Added.
  • http/tests/security/script-with-dataurl.html: Added.
  • http/tests/security/script-with-failed-cors-check-fails-to-load-expected.txt:
11:15 PM Changeset in webkit [205853] by Carlos Garcia Campos
  • 2 edits in trunk/Source/WebCore

[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):

11:12 PM Changeset in webkit [205852] by Carlos Garcia Campos
  • 5 edits in trunk/Source/WebCore

[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.

10:48 PM Changeset in webkit [205851] by bshafiei@apple.com
  • 5 edits in branches/safari-602-branch/Source

Versioning.

9:33 PM Changeset in webkit [205850] by fpizlo@apple.com
  • 14 edits in trunk/Source/JavaScriptCore

MarkedBlock should be able to use flipIfNecessary() as the "I'm not empty" trigger
https://bugs.webkit.org/show_bug.cgi?id=161869

Reviewed by Saam Barati.

In bug 161581, I'm going to use flipIfNecessary() during marking to trigger the "I'm not
empty" hook, which will set a bit in the markingNotEmpty bitvector.

For this to work, we need to ensure that nobody else uses flipIfNecessary() during marking.
If anyone else does it but they aren't marking new objects, then this prevents
flipIfNecessary() from triggering when the first object is marked, which means we won't
always detect when a block became non-empty.

I addressed this by adding a isMarking flag, and asserting in flipIfNecessary() that the flag
isn't set. flipIfNecessaryDuringMarking() is used only on the marking path, so that code
knows that it can trigger something like noteMarked(). The only places that were using
flipIfNecessary() should have been using needsFlip() anyway.

  • heap/CellContainer.h:
  • heap/CellContainerInlines.h:

(JSC::CellContainer::needsFlip):

  • heap/Heap.cpp:

(JSC::Heap::markRoots):
(JSC::Heap::beginMarking):
(JSC::Heap::endMarking):
(JSC::Heap::clearLivenessData): Deleted.
(JSC::Heap::converge): Deleted.
(JSC::Heap::resetVisitors): Deleted.

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

(JSC::Heap::testAndSetMarked):

  • heap/LargeAllocation.h:

(JSC::LargeAllocation::flipIfNecessaryDuringMarking):
(JSC::LargeAllocation::flipIfNecessaryConcurrently): Deleted.

  • heap/MarkedBlock.cpp:

(JSC::MarkedBlock::flipIfNecessarySlow):
(JSC::MarkedBlock::flipIfNecessaryDuringMarkingSlow):
(JSC::MarkedBlock::flipIfNecessaryConcurrentlySlow): Deleted.

  • heap/MarkedBlock.h:

(JSC::MarkedBlock::flipIfNecessaryDuringMarking):
(JSC::MarkedBlock::Handle::flipIfNecessaryDuringMarking):
(JSC::MarkedBlock::flipIfNecessaryConcurrently): Deleted.
(JSC::MarkedBlock::Handle::flipIfNecessaryConcurrently): Deleted.

  • heap/MarkedSpace.h:

(JSC::MarkedSpace::isMarking):
(JSC::MarkedSpace::setIsMarking):
(JSC::MarkedSpace::largeAllocationsForThisCollectionSize): Deleted.

  • heap/SlotVisitor.cpp:

(JSC::SlotVisitor::setMarkedAndAppendToMarkStack):

  • heap/WeakBlock.cpp:

(JSC::WeakBlock::visit):

9:32 PM Changeset in webkit [205849] by commit-queue@webkit.org
  • 2 edits in trunk/LayoutTests

[GTK] Fix lint warnings of LayoutTests/platform/gtk/TestExpectations
https://bugs.webkit.org/show_bug.cgi?id=161890

Unreviewed test gardening.

Patch by Fujii Hironori <Fujii Hironori> on 2016-09-12

  • platform/gtk/TestExpectations: Removed deleted test cases

js/regress/nested-function-parsing.html, js/regress/new-array-buffer-dead.html
and js/regress/method-on-number.html.
Skip imported/w3c/web-platform-tests/media-source/

7:57 PM Changeset in webkit [205848] by sbarati@apple.com
  • 7 edits
    2 adds in trunk

Speed up Function.prototype.bind a bit by making it a builtin
https://bugs.webkit.org/show_bug.cgi?id=161879

Reviewed by Filip Pizlo.

JSTests:

  • microbenchmarks/function-bind-inlining.js: Added.

(assert):
(test):
(test2):
(foo):

  • microbenchmarks/function-bind-no-inlining.js: Added.

(assert):
(test):
(test2):
(foo):

LayoutTests:

  • js/dom/function-bind-expected.txt:
7:12 PM Changeset in webkit [205847] by Chris Dumez
  • 10 edits in trunk

Fix post-landing review comments after r205787
https://bugs.webkit.org/show_bug.cgi?id=161885

Reviewed by Darin Adler.

Source/WebCore:

Leverage new StringBuilder::append(CFStringRef) overload.

  • html/parser/HTMLParserIdioms.cpp:

(WebCore::parseHTTPRefreshInternal):

  • page/CaptionUserPreferencesMediaAF.cpp:

(WebCore::CaptionUserPreferencesMediaAF::captionsDefaultFontCSS):
(WebCore::buildDisplayStringForTrackBase):

  • platform/network/mac/CookieJarMac.mm:

(WebCore::cookiesForSession):

  • rendering/RenderThemeIOS.mm:

(WebCore::RenderThemeIOS::mediaControlsStyleSheet):
(WebCore::RenderThemeIOS::mediaControlsScript):

  • rendering/RenderThemeMac.mm:

(WebCore::RenderThemeMac::mediaControlsStyleSheet):
(WebCore::RenderThemeMac::mediaControlsScript):

Source/WTF:

Add new StringBuilder::append(CFStringRef) / append(NSString*)
overloads to avoid an extra string copy when possible.

  • wtf/text/StringBuilder.cpp:

(WTF::StringBuilder::append):

  • wtf/text/StringBuilder.h:

(WTF::StringBuilder::append):

Tools:

Leverage new StringBuilder::append(CFStringRef) overload.

  • WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:

(WTR::InjectedBundlePage::dumpDOMAsWebArchive):

6:25 PM Changeset in webkit [205846] by achristensen@apple.com
  • 4 edits in trunk

URLParser: Correctly ignore spaces before relative URLs with no scheme
https://bugs.webkit.org/show_bug.cgi?id=161889

Reviewed by Daniel Bates.

Source/WebCore:

Covered by new API tests.

  • platform/URLParser.cpp:

(WebCore::URLParser::parse):

Tools:

  • TestWebKitAPI/Tests/WebCore/URLParser.cpp:

(TestWebKitAPI::TEST_F):

5:58 PM Changeset in webkit [205845] by n_wang@apple.com
  • 3 edits
    2 adds in trunk

AX: Crash at WebCore::Range::compareBoundaryPoints(WebCore::Range::CompareHow, WebCore::Range const&, int&) const + 23
https://bugs.webkit.org/show_bug.cgi?id=161878

Reviewed by Chris Fleizach.

Source/WebCore:

In function characterOffsetsInOrder(const CharacterOffset&, const CharacterOffset&), we are creating two
ranges based on the nodes that are associated to the passed in CharacterOffsets. When the first node is a doctype
node, the first range will be a nullptr, and dereferencing it leads to a crash. Fixed this by adding a
NULL check.

Test: accessibility/mac/doctype-node-in-text-marker-crash.html

  • accessibility/AXObjectCache.cpp:

(WebCore::characterOffsetsInOrder):
(WebCore::resetNodeAndOffsetForReplacedNode):

LayoutTests:

  • accessibility/mac/doctype-node-in-text-marker-crash-expected.txt: Added.
  • accessibility/mac/doctype-node-in-text-marker-crash.html: Added.
5:29 PM Changeset in webkit [205844] by bshafiei@apple.com
  • 5 edits in tags/Safari-603.1.5.1/Source

Versioning.

5:25 PM Changeset in webkit [205843] by bshafiei@apple.com
  • 1 copy in tags/Safari-603.1.5.1

New tag.

5:14 PM Changeset in webkit [205842] by sbarati@apple.com
  • 3 edits
    4 adds in trunk

HashMapImpl should take into account m_deleteCount in its load factor and it should be able to rehash the table to be smaller
https://bugs.webkit.org/show_bug.cgi?id=161640

Reviewed by Geoffrey Garen.

JSTests:

  • microbenchmarks/map-rehash.js: Added.
  • stress/map-delete.js: Added.

(assert):

  • stress/map-rehash-2.js: Added.

(assert):

  • stress/map-rehash.js: Added.

(assert):

Source/JavaScriptCore:

HashMapImpl now takes into account m_deleteCount in its load factor.
It now knows how to rehash to either decrease its capacity, stay at
the same capacity, or increase its capacity. The reason we can sometimes
stay at the same capacity is that we can reduce the load factor enough
by rehashing that growing isn't warranted. The reason for this is that
anytime we rehash, we remove all deleted sentinels from the buffer.
Therefore, staying at the same same capacity, when there are deleted entries,
can still reduce the load factor because it removes all deleted sentinels.

  • runtime/HashMapImpl.h:

(JSC::HashMapBuffer::create):
(JSC::HashMapBuffer::reset):
(JSC::HashMapImpl::HashMapImpl):
(JSC::HashMapImpl::add):
(JSC::HashMapImpl::remove):
(JSC::HashMapImpl::size):
(JSC::HashMapImpl::clear):
(JSC::HashMapImpl::approximateSize):
(JSC::HashMapImpl::shouldRehashAfterAdd):
(JSC::HashMapImpl::shouldShrink):
(JSC::HashMapImpl::rehash):
(JSC::HashMapImpl::checkConsistency):
(JSC::HashMapImpl::makeAndSetNewBuffer):
(JSC::HashMapImpl::assertBufferIsEmpty):

4:51 PM Changeset in webkit [205841] by commit-queue@webkit.org
  • 22 edits
    1 move
    1 add in trunk/Source/WebCore

Move the pixel data of ImageFrame to a separate class named ImageBackingStore
https://bugs.webkit.org/show_bug.cgi?id=159679

Patch by Said Abou-Hallawa <sabouhallawa@apple.com> on 2016-09-12
Reviewed by Simon Fraser.

Move the pixel data manipulation part in ImageFrame into a separate class
and allocate it on demand.

  • PlatformEfl.cmake:
  • PlatformGTK.cmake:
  • PlatformWinCairo.cmake:
  • WebCore.xcodeproj/project.pbxproj:

Add ImageBackingStoreCairo.cpp and remove ImageDecoderCairo.cpp from the
WebKit projects.

  • platform/graphics/Color.cpp:

(WebCore::premultipliedChannel): channel = channel * alpha / 255.
(WebCore::unpremultipliedChannel): channel = channel * 255 / alpha.
(WebCore::makePremultipliedRGBA): Un-premultiplied channels to premultiplied RGBA32.
(WebCore::makeUnPremultipliedRGBA): Premultiplied channels to un-premultiplied RGBA32.
(WebCore::colorFromPremultipliedARGB): Use makeUnPremultipliedRGBA.
(WebCore::premultipliedARGBFromColor): Use makePremultipliedRGBA.

  • platform/graphics/Color.h:

(WebCore::fastMultiplyBy255): x * 255 = x * 256 - x = x << 8 - x.

  • platform/graphics/ImageBackingStore.h: Added.

(WebCore::ImageBackingStore::create): Creates a new ImageBackingStore.
(WebCore::ImageBackingStore::setSize): Changes the pixels size.
(WebCore::ImageBackingStore::setFrameRect): This will always just be the entire buffer except for GIF and PNG frames.
(WebCore::ImageBackingStore::size): Returns the pixels size.
(WebCore::ImageBackingStore::frameRect): Returns the pixels frame rectangle.
(WebCore::ImageBackingStore::clear): Clears the entire image.
(WebCore::ImageBackingStore::clearRect): Clears a rectangle in the image.
(WebCore::ImageBackingStore::repeatFirstRow): Repeats the first row in a rectangle in the image.
(WebCore::ImageBackingStore::pixelAt): Returns a pointer to a pixel data.
(WebCore::ImageBackingStore::setPixel): Sets the color of a pixel in the image.
(WebCore::ImageBackingStore::blendPixel): Blend a color with a pixel in the image.
(WebCore::ImageBackingStore::inBounds): Checks if a rectangle is in the bounds of the image.
(WebCore::ImageBackingStore::isOverSize): Checks whether a size could not be allocated for an image.
(WebCore::ImageBackingStore::ImageBackingStore):

  • platform/graphics/cg/NativeImageCG.cpp:

(WebCore::nativeImageHasAlpha): Implement this function. See comments in https://bugs.webkit.org/show_bug.cgi?id=158684.

  • platform/image-decoders/ImageDecoder.cpp:

(WebCore::ImageFrame::operator=): copyBitmapData() now copies the frameRect of the ImageBackingStore.
(WebCore::ImageFrame::clearPixelData): The pixels data and the pointer to these pixels are now included in the ImageBackingStore.
(WebCore::ImageFrame::zeroFillPixelData): Clearing the image pixels are now in ImageBackingStore::clear().
(WebCore::ImageFrame::zeroFillFrameRect): Clearing the image pixels are now in ImageBackingStore::clearRect().
(WebCore::ImageFrame::copyBitmapData): We either need to create a new ImageBackingStore or nullify the current one.
(WebCore::ImageFrame::setSize): ImageFrame::setSize() is supposed to be called once and to create the ImageBackingStore.
(WebCore::ImageFrame::setOriginalFrameRect): Delegate this call to ImageBackingStore::setFrameRect().
(WebCore::ImageDecoder::frameBytesAtIndex): ImageFrame::PixelData can be replaced by RGBA32.

  • platform/image-decoders/ImageDecoder.h:

(WebCore::ImageFrame::copyRowNTimes): The implementation was moved to ImageBackingStore::repeatFirstRow().
(WebCore::ImageFrame::size): Gets the size of an image from its ImageBackingStore.
(WebCore::ImageFrame::asNewNativeImage): Gets a NtaiveImagePtr from the ImageBackingStore.
(WebCore::ImageFrame::backingStore): Returns a raw pointer to the ImageBackingStore.
(WebCore::ImageFrame::hasBackingStore): Returns whether the ImageFrame has an ImageBackingStore.
(WebCore::ImageFrame::originalFrameRect): Returns the frameRect of the image from its ImageBackingStore.
(WebCore::ImageFrame::pixelAt): Delegates the call to the ImageBackingStore.
(WebCore::ImageFrame::setPixel): Delegates the call to the ImageBackingStore.
(WebCore::ImageFrame::blendPixel): Delegates the call to the ImageBackingStore.

(WebCore::ImageDecoder::setSize): setSize() now takes an IntSize.
(WebCore::ImageFrame::setOriginalFrameRect): Deleted. Moved to ImageDecoder.cpp.
(WebCore::ImageFrame::setRGBA): Deleted. Renamed to ImageFrame::setPixel().
(WebCore::ImageFrame::getAddr): Deleted. Renamed to ImageFrame::pixelAt().
(WebCore::ImageFrame::hasPixelData): Deleted. Renamed to ImageFrame::hasBackingStore().
(WebCore::ImageFrame::fixPointUnsignedMultiply): Deleted.
(WebCore::ImageFrame::divide255): Deleted. Replaced by fastDivideBy255() from Color.h.
(WebCore::ImageFrame::overRGBA): Deleted. Renamed to ImageFrame::blendPixel().
(WebCore::ImageFrame::width): Deleted.
(WebCore::ImageFrame::height): Deleted.
(WebCore::ImageDecoder::isOverSize): Deleted. Moved to ImageBackingStore::isOverSize().

  • platform/image-decoders/bmp/BMPImageReader.cpp:

(WebCore::BMPImageReader::decodeBMP):
(WebCore::BMPImageReader::processInfoHeader):
(WebCore::BMPImageReader::processNonRLEData):

  • platform/image-decoders/bmp/BMPImageReader.h:

(WebCore::BMPImageReader::setI):
(WebCore::BMPImageReader::setPixel):
(WebCore::BMPImageReader::fillRGBA):
(WebCore::BMPImageReader::setRGBA): Deleted.

  • platform/image-decoders/cairo/ImageBackingStoreCairo.cpp: Added.

(WebCore::ImageBackingStore::image):

  • platform/image-decoders/cairo/ImageDecoderCairo.cpp: Removed.
  • platform/image-decoders/gif/GIFImageDecoder.cpp:

(WebCore::GIFImageDecoder::setSize):
(WebCore::GIFImageDecoder::haveDecodedRow):
(WebCore::GIFImageDecoder::initFrameBuffer):

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

(GIFImageReader::parse):

  • platform/image-decoders/ico/ICOImageDecoder.cpp:

(WebCore::ICOImageDecoder::setSize):
(WebCore::ICOImageDecoder::processDirectoryEntries):

  • platform/image-decoders/ico/ICOImageDecoder.h:
  • platform/image-decoders/jpeg/JPEGImageDecoder.cpp:

(WebCore::JPEGImageReader::decode):
(WebCore::JPEGImageDecoder::setSize):
(WebCore::setPixel):
(WebCore::JPEGImageDecoder::outputScanlines):

  • platform/image-decoders/jpeg/JPEGImageDecoder.h:
  • platform/image-decoders/png/PNGImageDecoder.cpp:

(WebCore::PNGImageDecoder::setSize):
(WebCore::PNGImageDecoder::headerAvailable):
(WebCore::setPixelRGB):
(WebCore::setPixelRGBA):
(WebCore::setPixelPremultipliedRGBA):
(WebCore::PNGImageDecoder::rowAvailable):
(WebCore::PNGImageDecoder::initFrameBuffer):
(WebCore::PNGImageDecoder::frameComplete):

  • platform/image-decoders/png/PNGImageDecoder.h:
  • platform/image-decoders/webp/WEBPImageDecoder.cpp:

(WebCore::WEBPImageDecoder::decode):

  • Send an IntSize to ImageFrame::setSize() and ImageDecoder::setSize().
  • Replace ImageFrame::PixelData by RGBA32.
  • No need to call ImageFrame::setOriginalFrameRect() if this sets the frameRect to the entire image rectangle since this is done by default in ImageBackingStore::setSize().
  • ImageBackingStore::image() now replaces ImageFrame::asNewNativeImage().
  • ImageFrame::setPixel() now replaces ImageFrame::setRGBA().
  • ImageFrame::blendPixel() now replaces ImageFrame::overRGBA().
  • ImageFrame::pixelAt() now replaces ImageFrame::getAddr().
4:34 PM Changeset in webkit [205840] by bshafiei@apple.com
  • 1 copy in tags/Safari-602.2.6

New tag.

4:33 PM Changeset in webkit [205839] by commit-queue@webkit.org
  • 3 edits
    2 adds in trunk

HTMLButtonElement.prototype.click should be HTMLElement.prototype.click
https://bugs.webkit.org/show_bug.cgi?id=161874

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2016-09-12
Reviewed by Chris Dumez.

Source/WebCore:

Test: fast/dom/HTMLButtonElement/click.html

  • html/HTMLButtonElement.idl:

Remove the unnecessary 'click' definition. It already exists in HTMLElement.
If this was needed for ObjC code generation on DOMHTMLButtonElement, then
the extra definition is no longer needed now that ObjC bindings have moved.

LayoutTests:

  • fast/dom/HTMLButtonElement/click-expected.txt: Added.
  • fast/dom/HTMLButtonElement/click.html: Added.
4:14 PM Changeset in webkit [205838] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Marking imported/w3c/web-platform-tests/dom/nodes/ProcessingInstruction-escapes-1.xhtml as flaky on mac.
https://bugs.webkit.org/show_bug.cgi?id=161883

Unreviewed test gardening.

  • platform/mac/TestExpectations:
4:11 PM Changeset in webkit [205837] by Yusuke Suzuki
  • 2 edits in trunk/JSTests

Unreviewed, fix tests for different libm environments
https://bugs.webkit.org/show_bug.cgi?id=161857

  • stress/ftl-arithtan.js:
4:08 PM Changeset in webkit [205836] by Yusuke Suzuki
  • 3 edits in trunk/Source/WTF

[WTF] HashTable's rehash is not compatible to Ref<T> and ASan
https://bugs.webkit.org/show_bug.cgi?id=161763

Reviewed by Darin Adler.

Destructors of HashTable's empty values need to be called while ones of deleted values don't.

  • wtf/HashTable.h:

(WTF::KeyTraits>::deallocateTable):

  • wtf/Ref.h:
4:03 PM Changeset in webkit [205835] by achristensen@apple.com
  • 4 edits in trunk

URLParser: Fix relative URLs containing only fragments
https://bugs.webkit.org/show_bug.cgi?id=161882

Reviewed by Brady Eidson.

Source/WebCore:

Covered by new API tests.

  • platform/URLParser.cpp:

(WebCore::URLParser::parse):

Tools:

  • TestWebKitAPI/Tests/WebCore/URLParser.cpp:

(TestWebKitAPI::TEST_F):

3:36 PM Changeset in webkit [205834] by Matt Baker
  • 3 edits
    2 adds in trunk

Source/WebInspectorUI:
Web Inspector: Improve clarity of inspector tests by adding TestHarness.expect* functions similar to XCTest
https://bugs.webkit.org/show_bug.cgi?id=161278
<rdar://problem/28039741>

Reviewed by Joseph Pecoraro.

Under the hood they all call TestHarness.expectThat.

  • UserInterface/Test/TestHarness.js:

(TestHarness.prototype.expectFalse):
(TestHarness.prototype.expectNull):
(TestHarness.prototype.expectNotNull):
(TestHarness.prototype.expectEqual):
(TestHarness.prototype.expectNotEqual):
(TestHarness.prototype.expectShallowEqual):
(TestHarness.prototype.expectNotShallowEqual):
(TestHarness.prototype.expectEqualWithAccuracy):
(TestHarness.prototype.expectLessThan):
(TestHarness.prototype.expectLessThanOrEqual):
(TestHarness.prototype.expectGreaterThan):
(TestHarness.prototype.expectGreaterThanOrEqual):

LayoutTests:
Web Inspector: Add TestHarness assertions/expectations to provide additional semantics similar to XCTest
https://bugs.webkit.org/show_bug.cgi?id=161278
<rdar://problem/28039741>

Reviewed by Joseph Pecoraro.

Add test to verify that the TestHarness.expect* family of functions
trivially work. Since it isn't possible to verify the TestPage results
directly without introducing additional complexity, simply log baseline
"PASS" and "FAIL" results for each function.

  • inspector/unit-tests/test-harness-expect-functions-expected.txt: Added.
  • inspector/unit-tests/test-harness-expect-functions.html: Added.
3:36 PM Changeset in webkit [205833] by achristensen@apple.com
  • 4 edits in trunk

URLParser: Correctly handle relative URLs that are just a scheme and a colon
https://bugs.webkit.org/show_bug.cgi?id=161876

Reviewed by Brady Eidson.

Source/WebCore:

Covered by new API tests.

  • platform/URLParser.cpp:

(WebCore::URLParser::parse):

Tools:

  • TestWebKitAPI/Tests/WebCore/URLParser.cpp:

(TestWebKitAPI::TEST_F):

3:35 PM Changeset in webkit [205832] by Nikita Vasilyev
  • 2 edits in trunk/Source/WebInspectorUI

REGRESSION (r205223): Web Inspector: Debugger popover title and code aren't horizontally aligned
https://bugs.webkit.org/show_bug.cgi?id=161848
<rdar://problem/28250703>

Reviewed by Matt Baker.

  • UserInterface/Views/SourceCodeTextEditor.css:

(.popover .debugger-popover-content > .title):
(.popover .debugger-popover-content.function > .body):
Make left and right padding the same.

(.popover .debugger-popover-content.function > .body .CodeMirror pre):
Override left padding defined in CodeMirrorOverrides.css by .CodeMirror pre rule.

3:16 PM Changeset in webkit [205831] by dino@apple.com
  • 2 edits in trunk/Source/WebCore

Remove OptionalColor
https://bugs.webkit.org/show_bug.cgi?id=161853
<rdar://problem/28252385>

Reviewed by Alex Christensen.

OptionalColor isn't used. The concept will be implemented
in a different manner.

  • platform/graphics/Color.h:
3:13 PM Changeset in webkit [205830] by commit-queue@webkit.org
  • 9 edits
    1 add in trunk

[JSC] Use GetArrayLength for JSArray.length even when the array type is undecided
https://bugs.webkit.org/show_bug.cgi?id=161671

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

JSTests:

  • stress/get-array-length-on-undecided.js: Added.

Source/JavaScriptCore:

UndecidedShape is a type with storage. When we allocate an uninitialized JSArray,
it gets a butterfly with its length.
When we were querying that length, we were generating a generic GetById with inline cache.

This patch adds the missing bits to treat Undecided like the other types with storage.

  • dfg/DFGArrayMode.cpp:

(JSC::DFG::canBecomeGetArrayLength):
(JSC::DFG::ArrayMode::refine):

  • dfg/DFGArrayMode.h:

(JSC::DFG::ArrayMode::usesButterfly):
(JSC::DFG::ArrayMode::lengthNeedsStorage):

  • dfg/DFGClobberize.h:

(JSC::DFG::clobberize):

  • dfg/DFGFixupPhase.cpp:

(JSC::DFG::FixupPhase::checkArray):

  • dfg/DFGSpeculativeJIT.cpp:

(JSC::DFG::SpeculativeJIT::compileGetArrayLength):

  • ftl/FTLCapabilities.cpp:

(JSC::FTL::canCompile):

  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::compileGetArrayLength):

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

Add Intersection Observer to the features.json file.

  • features.json:
3:01 PM Changeset in webkit [205828] by Yusuke Suzuki
  • 22 edits
    3 adds in trunk

[DFG][FTL] Add ArithTan
https://bugs.webkit.org/show_bug.cgi?id=161857

Reviewed by Filip Pizlo.

JSTests:

  • microbenchmarks/tan.js: Added.
  • stress/arith-tan-on-various-types.js: Added.

(let.validInputTypedTestCases.validInputTestCases.map):
(isIdentical):
(opaqueTanNoArgument):
(testNoArgument):
(opaqueAllTypesTan):
(testAllTypesCall):
(testTangleTypeCall):
(testConstant):
(opaqueTanForSideEffects):
(testSideEffect.let.testObject.valueOf):
(testSideEffect):
(opaqueTanForCSE):
(testCSE.let.testObject.valueOf):
(testCSE):
(opaqueTanForDCE):
(testDCE.let.testObject.valueOf):
(testDCE):
(testException.opaqueTanWithException):
(testException):

  • stress/ftl-arithtan.js: Added.

(foo):

Source/JavaScriptCore:

While ArithSin and ArithCos are supported, ArithTan is not supported yet.
And we also find that Math.tan is included in MotionMark's Multiply benchmark.

This patch adds ArithTan support in DFG and FTL. And it also cleans up the
existing ArithSin, ArithCos, and ArithLog compilations by unifying them.
The microbenchmark shows the 9% perf improvement.

tan 322.4819+-0.3766 295.8700+-0.3094 definitely 1.0899x faster

  • 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.cpp:

(JSC::DFG::SpeculativeJIT::compileArithDoubleUnaryOp):
(JSC::DFG::SpeculativeJIT::compileArithCos):
(JSC::DFG::SpeculativeJIT::compileArithTan):
(JSC::DFG::SpeculativeJIT::compileArithSin):
(JSC::DFG::SpeculativeJIT::compileArithLog):

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

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

  • dfg/DFGSpeculativeJIT64.cpp:

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

  • ftl/FTLCapabilities.cpp:

(JSC::FTL::canCompile):

  • ftl/FTLLowerDFGToB3.cpp:

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

  • ftl/FTLOutput.cpp:

(JSC::FTL::Output::doubleTan):

  • ftl/FTLOutput.h:
  • runtime/Intrinsic.h:
  • runtime/MathObject.cpp:

(JSC::MathObject::finishCreation):

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

Web Inspector: Hide PrivateSymbol.concatSlowPath and other PrivateSymbols from memory edges
https://bugs.webkit.org/show_bug.cgi?id=156763

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

  • UserInterface/Proxies/HeapSnapshotEdgeProxy.js:

(WebInspector.HeapSnapshotEdgeProxy.prototype.isPrivateSymbol):
Checks that the edge data does not begin with "PrivateSymbol".

  • UserInterface/Views/HeapSnapshotInstanceDataGridNode.js:

(WebInspector.HeapSnapshotInstanceDataGridNode.prototype._populate):
Only add child nodes if they are not PrivateSymbol nodes.

2:44 PM Changeset in webkit [205826] by mmaxfield@apple.com
  • 6 edits in trunk/Source

[Cocoa] Reduce uses of CGFonts in favor of CTFonts
https://bugs.webkit.org/show_bug.cgi?id=161809

Reviewed by Daniel Bates.

Source/WebCore:

Eventually, we want to remove the cgFont() member of PlatformFontData for both memory
savings and conceptual clarity. Because there is no performance loss from moving from
CGFontGetGlyphsForUnichars() to CTFontGetGlyphsForCharacters(), making this switch
gets us closer to reducing the uses of cgFont().

No new tests because there is no behavior change.

  • platform/graphics/Font.cpp:

(WebCore::createAndFillGlyphPage):

  • platform/graphics/GlyphPage.h:

(WebCore::GlyphData::GlyphData):

  • platform/graphics/mac/GlyphPageMac.cpp:

(WebCore::shouldFillWithVerticalGlyphs):
(WebCore::GlyphPage::fill):
(WebCore::shouldUseCoreText): Deleted.

Source/WTF:

  • wtf/unicode/CharacterNames.h:
2:42 PM Changeset in webkit [205825] by commit-queue@webkit.org
  • 5 edits in trunk

AX: WKWebView for macOS does not allow configuration of tabsToLinks
https://bugs.webkit.org/show_bug.cgi?id=161394

Patch by DAN SAUNDERS <dasau@microsoft.com> on 2016-09-12
Reviewed by Anders Carlsson.

Source/WebKit2:

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

(-[WKPreferences encodeWithCoder:]):
(-[WKPreferences initWithCoder:]):
(-[WKPreferences tabFocusesLinks]):
(-[WKPreferences setTabFocusesLinks:]):

Tools:

  • TestWebKitAPI/Tests/WebKit2Cocoa/Coding.mm:

(TEST):

2:30 PM Changeset in webkit [205824] by achristensen@apple.com
  • 4 edits in trunk

Remove trailing control characters and spaces before parsing a URL
https://bugs.webkit.org/show_bug.cgi?id=161870

Reviewed by Tim Horton.

Source/WebCore:

Covered by new API tests.

  • platform/URLParser.cpp:

(WebCore::bufferView):
(WebCore::URLParser::parse):

Tools:

  • TestWebKitAPI/Tests/WebCore/URLParser.cpp:

(TestWebKitAPI::TEST_F):

2:23 PM Changeset in webkit [205823] by Chris Dumez
  • 3 edits
    2 adds in trunk

window.performance object resets script-applied properties
https://bugs.webkit.org/show_bug.cgi?id=137407

Reviewed by Darin Adler.

Source/WebCore:

Make sure the window.performance wrapper stays alive for as long as the
associated frame, similarly to what we do for window.screen.

Test: fast/performance/performance-object-gc.html

  • page/Performance.idl:

LayoutTests:

Add layout test coverage.

  • fast/performance/performance-object-gc-expected.txt: Added.
  • fast/performance/performance-object-gc.html: Added.
2:13 PM Changeset in webkit [205822] by sbarati@apple.com
  • 10 edits
    1 add in trunk/Source

Add WebKit support for an option in Safari's debug menu similar to "Get Bytecode Profile" but for the Sampling Profiler's data
https://bugs.webkit.org/show_bug.cgi?id=161785

Reviewed by Tim Horton.

Source/WebCore:

  • ForwardingHeaders/runtime/SamplingProfiler.h: Added.

Source/WebKit2:

This patch follows in the steps of how we dump output for the
internal JSC bytecode profiler tool, but now also for the internal
JSC sampling profiler tool. This can be used when doing performance
analysis work analyzing the JS execution of a page.

  • UIProcess/API/C/WKPage.cpp:

(WKPageGetSamplingProfilerOutput):

  • UIProcess/API/C/WKPagePrivate.h:
  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::getSamplingProfilerOutput):
(WebKit::WebPageProxy::invalidateStringCallback):

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

(WebKit::WebPage::getSamplingProfilerOutput):

  • WebProcess/WebPage/WebPage.h:
  • WebProcess/WebPage/WebPage.messages.in:
2:12 PM Changeset in webkit [205821] by hyatt@apple.com
  • 3 edits
    4 adds in trunk/Source/WebCore

[CSS Parser] Add support for the parsing of the HTML sizes attribute
https://bugs.webkit.org/show_bug.cgi?id=161868

Reviewed by Dean Jackson.

This patch adds the parsers for the sizes attribute. This code is heavily modified
from Blink, and it really only makes use of the tokenization/parsing code. What is done
with the results involves the same original code that we used over in SourceSizeList.cpp.

  • CMakeLists.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • css/parser/SizesAttributeParser.cpp: Added.

(WebCore::SizesAttributeParser::computeLength):
(WebCore::SizesAttributeParser::SizesAttributeParser):
(WebCore::SizesAttributeParser::length):
(WebCore::SizesAttributeParser::calculateLengthInPixels):
(WebCore::SizesAttributeParser::mediaConditionMatches):
(WebCore::SizesAttributeParser::parse):
(WebCore::SizesAttributeParser::effectiveSize):
(WebCore::SizesAttributeParser::effectiveSizeDefaultValue):

  • css/parser/SizesAttributeParser.h: Added.
  • css/parser/SizesCalcParser.cpp: Added.

(WebCore::SizesCalcParser::SizesCalcParser):
(WebCore::SizesCalcParser::result):
(WebCore::operatorPriority):
(WebCore::SizesCalcParser::handleOperator):
(WebCore::SizesCalcParser::appendNumber):
(WebCore::SizesCalcParser::appendLength):
(WebCore::SizesCalcParser::appendOperator):
(WebCore::SizesCalcParser::calcToReversePolishNotation):
(WebCore::operateOnStack):
(WebCore::SizesCalcParser::calculate):

  • css/parser/SizesCalcParser.h: Added.

(WebCore::SizesCalcValue::SizesCalcValue):
(WebCore::SizesCalcParser::isValid):

2:09 PM Changeset in webkit [205820] by jer.noble@apple.com
  • 10 edits in trunk

Fix failing mediasource-play.html and mediasource-config-change-mp4-v-bitrate.html tests
https://bugs.webkit.org/show_bug.cgi?id=161819

Reviewed by Eric Carlson.

Source/WebCore:

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

imported/w3c/web-platform-tests/media-source/mediasource-sourcebuffer-mode.html

The newest revision of the web-platform-test suite for Media Source tests new behavior
added to the MSE specification. Specifically, setting a MediaSource's duration will no
longer implicitly truncate the source's active SourceBuffer objects.

  • Modules/mediasource/MediaSource.cpp:

(WebCore::MediaSource::setDuration): Return exception if issued by setDurationInternal.
(WebCore::MediaSource::setDurationInternal): Bring "duration change" algorithm up to spec.

  • Modules/mediasource/MediaSource.h:
  • Modules/mediasource/SampleMap.h:

(WebCore::PresentationOrderSampleMap::begin): Add const accessor.
(WebCore::PresentationOrderSampleMap::end): Ditto.
(WebCore::PresentationOrderSampleMap::rbegin): Ditto.
(WebCore::PresentationOrderSampleMap::rend): DItto.
(WebCore::DecodeOrderSampleMap::begin): Ditto.
(WebCore::DecodeOrderSampleMap::end): Ditto.
(WebCore::DecodeOrderSampleMap::rbegin): Ditto.
(WebCore::DecodeOrderSampleMap::rend): Ditto.

  • Modules/mediasource/SourceBuffer.cpp:

(WebCore::SourceBuffer::highestPresentationTimestamp): Added convenience method.
(WebCore::SourceBuffer::removeCodedFrames): Drive-by fix; use .values() rather than

pulling the value out of each HashMap iterator.

  • Modules/mediasource/SourceBuffer.h:

LayoutTests:

  • media/media-source/media-source-end-of-stream-readyState.html:
  • media/media-source/media-source-end-of-stream-readyState-expected.txt:
  • platform/mac/TestExpectations:
2:04 PM Changeset in webkit [205819] by sbarati@apple.com
  • 7 edits
    1 add in trunk

MapHash should do constant folding when it has a constant argument and its legal to hash that value
https://bugs.webkit.org/show_bug.cgi?id=161639

Reviewed by Filip Pizlo.

JSTests:

  • microbenchmarks/map-constant-key.js: Added.

(assert):
(test):
(foo):

Source/JavaScriptCore:

We now constant fold the MapHash node. We're careful to not resolve
ropes from the compiler thread, and to only hash strings if they're
not too large. The microbenchmark I added runs about 12% faster with
this patch.

  • dfg/DFGAbstractInterpreterInlines.h:

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

  • runtime/HashMapImpl.h:

(JSC::wangsInt64Hash):
(JSC::jsMapHash):
(JSC::concurrentJSMapHash):

Source/WTF:

This patch adds a concurrentHash method to StringImpl. It's
probably safe to get the actual hash while being racy, however,
it's simpler and more future proof to not have to worry about
that and to just compute it on demand. Users of this API should
be aware that it's doing non-trivial work. Currently, the only
user is JSC's JIT compilers, and they only ask for hashes for small-ish
strings.

  • wtf/text/StringImpl.h:
  • wtf/text/StringStatics.cpp:

(WTF::StringImpl::concurrentHash):

12:50 PM Changeset in webkit [205818] by Chris Dumez
  • 23 edits in trunk/Source

Switch remaining users of Document::inPageCache() to pageCacheState()
https://bugs.webkit.org/show_bug.cgi?id=161865

Reviewed by Darin Adler.

Switch remaining users of Document::inPageCache() to pageCacheState() as
the former one is confusing (given that it returns true while the
pagehide event is being fired).

Source/WebCore:

  • dom/Document.cpp:

(WebCore::Document::scheduleStyleRecalc):
(WebCore::Document::fontsNeedUpdate):
(WebCore::Document::removeFocusedNodeOfSubtree):
(WebCore::Document::setFocusedElement):
(WebCore::Document::takeDOMWindowFrom):
(WebCore::Document::topDocument):
(WebCore::Document::webkitWillEnterFullScreenForElement):
(WebCore::Document::webkitDidEnterFullScreenForElement):
(WebCore::Document::webkitWillExitFullScreenForElement):
(WebCore::Document::webkitDidExitFullScreenForElement):

  • dom/Document.h:

(WebCore::Document::needsStyleRecalc):
(WebCore::Document::inPageCache): Deleted.

  • history/CachedFrame.cpp:

(WebCore::CachedFrame::CachedFrame):
(WebCore::CachedFrame::clear):
(WebCore::CachedFrame::destroy):

  • html/HTMLMediaElement.cpp:

(WebCore::mediaElementIsAllowedToAutoplay):

  • html/HTMLPlugInImageElement.cpp:

(WebCore::HTMLPlugInImageElement::createElementRenderer):

  • loader/DocumentLoader.cpp:

(WebCore::DocumentLoader::addSubresourceLoader):

  • loader/HistoryController.cpp:

(WebCore::HistoryController::saveScrollPositionAndViewStateToItem):

  • page/DOMWindow.cpp:

(WebCore::DOMWindow::decrementScrollEventListenersCount):

  • page/FrameView.cpp:

(WebCore::FrameView::layout):

  • page/animation/AnimationBase.cpp:

(WebCore::AnimationBase::setNeedsStyleRecalc):

  • page/animation/AnimationController.cpp:

(WebCore::AnimationControllerPrivate::updateAnimations):
(WebCore::AnimationControllerPrivate::addElementChangeToDispatch):
(WebCore::AnimationController::cancelAnimations):
(WebCore::AnimationController::updateAnimations):

  • page/animation/ImplicitAnimation.cpp:

(WebCore::ImplicitAnimation::sendTransitionEvent):

  • page/animation/KeyframeAnimation.cpp:

(WebCore::KeyframeAnimation::sendAnimationEvent):

  • page/scrolling/AsyncScrollingCoordinator.cpp:

(WebCore::AsyncScrollingCoordinator::requestScrollPositionUpdate):

  • rendering/RenderElement.cpp:

(WebCore::shouldRepaintForImageAnimation):
(WebCore::RenderElement::newImageAnimationFrameAvailable):

  • rendering/RenderImage.cpp:

(WebCore::RenderImage::imageChanged):

  • rendering/RenderLayerCompositor.cpp:

(WebCore::RenderLayerCompositor::updateCompositingLayers):
(WebCore::RenderLayerCompositor::willRemoveScrollingLayerWithBacking):
(WebCore::RenderLayerCompositor::didAddScrollingLayer):

  • rendering/RenderObject.cpp:

(WebCore::printRenderTreeForLiveDocuments):
(WebCore::printLayerTreeForLiveDocuments):

  • rendering/RenderView.cpp:

(WebCore::RenderView::lazyRepaintTimerFired):

  • rendering/SimpleLineLayout.cpp:

(WebCore::SimpleLineLayout::collectNonEmptyLeafRenderBlockFlowsForCurrentPage):

Source/WebKit/mac:

  • WebView/WebHTMLView.mm:

(-[WebHTMLView layoutToMinimumPageWidth:height:originalPageWidth:originalPageHeight:maximumShrinkRatio:adjustingViewSize:]):
(-[WebHTMLView setNeedsLayout:]):
(-[WebHTMLView setNeedsToApplyStyles:]):

11:59 AM Changeset in webkit [205817] by Keith Rollin
  • 7 edits in trunk/Source

Enhance Network logging
https://bugs.webkit.org/show_bug.cgi?id=161771

Reviewed by Antti Koivisto.

Modify current logging statements to follow a consistent pattern in
order to enhance readability and parsing.

Source/WebCore:

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

  • loader/FrameLoader.cpp:

(WebCore::FrameLoader::prepareForLoadStart):
(WebCore::FrameLoader::checkLoadCompleteForThisFrame):

Source/WebKit2:

  • NetworkProcess/Downloads/Download.cpp:

(WebKit::Download::didReceiveResponse):
(WebKit::Download::didReceiveData):
(WebKit::Download::didFinish):
(WebKit::Download::didFail):
(WebKit::Download::didCancel):

  • NetworkProcess/NetworkResourceLoader.cpp:

(WebKit::NetworkResourceLoader::startNetworkLoad):
(WebKit::NetworkResourceLoader::didFinishLoading):
(WebKit::NetworkResourceLoader::didFailLoading):
(WebKit::NetworkResourceLoader::continueWillSendRequest):

  • WebProcess/Network/WebLoaderStrategy.cpp:

(WebKit::WebLoaderStrategy::scheduleLoad):

  • WebProcess/Network/WebResourceLoader.cpp:

(WebKit::WebResourceLoader::willSendRequest):
(WebKit::WebResourceLoader::didReceiveResponse):
(WebKit::WebResourceLoader::didReceiveData):
(WebKit::WebResourceLoader::didFinishResourceLoad):
(WebKit::WebResourceLoader::didFailResourceLoad):
(WebKit::WebResourceLoader::didReceiveResource):

11:45 AM Changeset in webkit [205816] by msaboff@apple.com
  • 2 edits in trunk/JSTests

JSC test timeout: ChakraCore.yaml/ChakraCore/test/Bugs/bug56026_trycatch.js.default
https://bugs.webkit.org/show_bug.cgi?id=161863

Reviewed by Saam Barati.

  • ChakraCore.yaml:

Disabled Bugs/bug56026_trycatch.js.

11:35 AM Changeset in webkit [205815] by Matt Baker
  • 3 edits
    2 adds in trunk

Web Inspector: Object.shallowEqual() should return false if object prototype chains differ
https://bugs.webkit.org/show_bug.cgi?id=161852

Reviewed by Joseph Pecoraro.

Source/WebInspectorUI:

Improve Object.shallowEqual so it won't produce false positives.

  • UserInterface/Base/Utilities.js:

(value):
Object.shallowEqual should return false for non-array arguments.
Since typeof null === "object", use instanceof instead to avoid separate
null checks. Also use Array.shallowEqual fast path when both arguments are arrays.

LayoutTests:

  • inspector/unit-tests/object-utilities-expected.txt: Added.
  • inspector/unit-tests/object-utilities.html: Added.

Add test coverage for Object.shallowEqual.

11:18 AM Changeset in webkit [205814] by beidson@apple.com
  • 2 edits in trunk/Source/WebCore

Crash in com.apple.WebCore: WebCore::NavigatorGamepad::gamepadFromPlatformGamepad.
<rdar://problem/28018073> and https://bugs.webkit.org/show_bug.cgi?id=161694

Reviewed by Alex Christensen.

No new tests (Caught by existing tests in some configurations).

  • Modules/gamepad/GamepadManager.cpp:

(WebCore::GamepadManager::platformGamepadInputActivity): Null check.

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

Fix more URLParser quirks
https://bugs.webkit.org/show_bug.cgi?id=161834

Reviewed by Brady Eidson.

Source/WebCore:

Added new API tests.

  • platform/URLParser.cpp:

(WebCore::URLParser::parse):
Skip some tabs and newlines. The spec says to remove them before processing the String,
but to reduce allocations I am skipping them whenever we increment an iterator.
Fix a few other quirks to be more web platform conformant.

Tools:

  • TestWebKitAPI/Tests/WebCore/URLParser.cpp:

(TestWebKitAPI::TEST_F):

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

Optimize URLParser performance
https://bugs.webkit.org/show_bug.cgi?id=161837

Reviewed by Brady Eidson.

Source/WebCore:

No change in behavior. Existing behavior covered by API tests and added a new API test.

  • platform/URLParser.cpp:

(WebCore::isDefaultPort):
Use switch statements instead of HashMap lookups.
(WebCore::isSpecialScheme):
Use switch statements instead of repeated String comparisons.
(WebCore::URLParser::parsePort):
Reduce String allocation.

Tools:

  • TestWebKitAPI/Tests/WebCore/URLParser.cpp:

(TestWebKitAPI::TEST_F):
Added a test to verify the case insensitivity of the default port checks.

9:52 AM Changeset in webkit [205811] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Marking accessibility/mac/value-change/value-change-user-info-contenteditable.html as flaky on mac-wk2.
https://bugs.webkit.org/show_bug.cgi?id=160042

Unreviewed test gardening.

  • platform/mac-wk2/TestExpectations:
9:08 AM Changeset in webkit [205810] by fpizlo@apple.com
  • 4 edits in trunk/Source

DFG::forAllKilledOperands() could use a faster bitvector scan in the same-inline-stack fast path
https://bugs.webkit.org/show_bug.cgi?id=161849

Reviewed by Saam Barati.

Source/JavaScriptCore:

This is a fairly obvious change. This turns a loop that would query each bit individually
into a loop that will process a word at a time. I would expect a very tiny progression in
DFG compile times.

This also gave me an opportunity to test and fix the new FastBitVector functionality.

  • dfg/DFGForAllKills.h:

(JSC::DFG::forAllKilledOperands):

Source/WTF:

It turns out that templates make private fields weird. FastBitVectorImpl can't necessarily
touch privates in instances of different template specializations of itself. So, I added a
public method called wordView() that exposes the necessary private field.

  • wtf/FastBitVector.h:

(WTF::FastBitVectorImpl::operator&):
(WTF::FastBitVectorImpl::operator|):
(WTF::FastBitVectorImpl::operator~):
(WTF::FastBitVectorImpl::forEachSetBit):
(WTF::FastBitVectorImpl::wordView):

8:50 AM Changeset in webkit [205809] by Simon Fraser
  • 21 edits
    2 adds in trunk

Make -webkit-transition-* and -webkit-animation-* properties be pure aliases of the unprefixed ones
https://bugs.webkit.org/show_bug.cgi?id=160478

Reviewed by Dean Jackson.

Source/WebCore:

Remove the custom -webkit prefixed transition and animation properties, and just make
them aliases of the unprefixed ones, as we do for transforms.

-webkit-animation-trigger remains as the only prefixed-only animation property.

This is mostly code deletion.

Test: fast/css/longhand-overrides-shorthand-prefixing.html

  • css/CSSComputedStyleDeclaration.cpp:

(WebCore::ComputedStyleExtractor::propertyValue):

  • css/CSSProperty.h:

(WebCore::prefixingVariantForPropertyId): Deleted.

  • css/CSSPropertyNames.in:
  • css/CSSToStyleMap.cpp:

(WebCore::CSSToStyleMap::mapAnimationDelay):
(WebCore::CSSToStyleMap::mapAnimationDirection):
(WebCore::CSSToStyleMap::mapAnimationDuration):
(WebCore::CSSToStyleMap::mapAnimationFillMode):
(WebCore::CSSToStyleMap::mapAnimationIterationCount):
(WebCore::CSSToStyleMap::mapAnimationName):
(WebCore::CSSToStyleMap::mapAnimationPlayState):
(WebCore::CSSToStyleMap::mapAnimationProperty):
(WebCore::CSSToStyleMap::mapAnimationTimingFunction):

  • css/PropertySetCSSStyleDeclaration.cpp:

(WebCore::PropertySetCSSStyleDeclaration::getPropertyCSSValueInternal):
(WebCore::PropertySetCSSStyleDeclaration::getPropertyValueInternal):

  • css/StyleProperties.cpp:

(WebCore::StyleProperties::getPropertyValue):
(WebCore::MutableStyleProperties::removeShorthandProperty):
(WebCore::StyleProperties::asText):

  • css/StylePropertyShorthand.cpp:

(WebCore::animationShorthandForParsing):

  • css/StylePropertyShorthand.h:
  • css/StyleResolver.cpp:

(WebCore::StyleResolver::styleForKeyframe):

  • css/parser/CSSParser.cpp:

(WebCore::CSSParser::parseValue):
(WebCore::CSSParser::parseAnimationShorthand):
(WebCore::CSSParser::parseTransitionShorthand):
(WebCore::CSSParser::parseAnimationProperty):
(WebCore::CSSParser::addPropertyWithPrefixingVariant): Deleted.

  • css/parser/CSSParser.h:
  • html/shadow/MediaControlElements.cpp:

(WebCore::MediaControlPanelElement::makeOpaque):
(WebCore::MediaControlPanelElement::makeTransparent):

LayoutTests:

Updated results, and a new test to ensure that longhand properties override
shorthand ones, with various combinations of prefixing.

  • fast/css/getComputedStyle/computed-style-expected.txt:
  • fast/css/getComputedStyle/computed-style-without-renderer-expected.txt:
  • fast/css/longhand-overrides-shorthand-prefixing-expected.txt: Added.
  • fast/css/longhand-overrides-shorthand-prefixing.html: Added.
  • fast/css/prefixed-unprefixed-variant-style-declaration-expected.txt:
  • fast/css/prefixed-unprefixed-variant-style-declaration.html:
  • transitions/svg-transitions-expected.txt:
  • transitions/transitions-parsing-expected.txt:
  • transitions/transitions-parsing.html:
5:31 AM Changeset in webkit [205808] by pvollan@apple.com
  • 2 edits in trunk/Source/WebCore

Unreviewed build fix after r205090.

  • platform/cf/MediaAccessibilitySoftLink.cpp:
4:46 AM Changeset in webkit [205807] by jfernandez@igalia.com
  • 8 edits
    2 adds in trunk

[css-align] Initial values are parsed as invalid for some Alignment properties
https://bugs.webkit.org/show_bug.cgi?id=161303

Reviewed by Darin Adler.

Source/WebCore:

Due to the implementation of the new CSS Box Alignment specification,
some properties have now new values allowed, which are not valid
according to the Flexible Box Layout specification.

In r205102 we have get back the keywordID parsing, originally implemented for
the Flexbible Box Layout specification. Even though the new valued would be
parsed as invalid when they are set, the 'initial' values will be assigned
in any case.

This patch verifies that the 'initial' values depend on whether the Grid
Layout is enabled or not and verifying such values are parsed as valid.

Additionally, it gets back as well they keywordID parsing for the Content
Alignment properties (align-content and justify-content). This required to
touch a bit the StyleBuilderConverter logic, since we will have to deal with
either the complex CSSContentDistributionValue complex or the simpler
CSSPrimitiveValue.

Test: fast/css/ensure-flexbox-compatibility-with-initial-values.html

  • css/StyleBuilderConverter.h:

(WebCore::StyleBuilderConverter::convertContentAlignmentData): Handling a primitive value if Grid Layout is not enabled.

  • css/parser/CSSParser.cpp:

(WebCore::isValidKeywordPropertyAndValue): Simpler parsing of alignment properties if Grid Layout is not enabled.
(WebCore::isKeywordPropertyID): Alignment properties are defined as keyword if Grid Layout is no enabled.
(WebCore::CSSParser::parseValue): Assert Grid Layout is enabled when using the complex parsing.

  • rendering/style/RenderStyle.cpp:

(WebCore::RenderStyle::isCSSGridLayoutEnabled): Checking out the Grid Layout runtime flags.

  • rendering/style/RenderStyle.h:

(WebCore::RenderStyle::initialDefaultAlignment): Initial value will depend on whether Grid Layout is enabled or not.
(WebCore::RenderStyle::initialContentAlignment): Initial value will depend on whether Grid Layout is enabled or not.

LayoutTests:

Test to verify the "initial" values of the CSS Box Alignment properties
are parsed as valid independently of whether Grid Layout is enabled or not.

  • fast/css/ensure-flexbox-compatibility-with-initial-values-expected.txt: Added.
  • fast/css/ensure-flexbox-compatibility-with-initial-values.html: Added.
  • fast/css/resources/alignment-parsing-utils.js:

(checkSupportedValues):

2:28 AM Changeset in webkit [205806] by Chris Dumez
  • 3 edits in trunk/Source/WebCore

ol.start may return incorrect value for reversed lists when not explicitly set
https://bugs.webkit.org/show_bug.cgi?id=161713

Reviewed by Ryosuke Niwa.

Fix style nit after r205689.

  • html/HTMLOListElement.cpp:

(WebCore::HTMLOListElement::itemCount):
(WebCore::HTMLOListElement::itemCountAfterLayout):

  • html/HTMLOListElement.h:
2:26 AM Changeset in webkit [205805] by Chris Dumez
  • 5 edits in trunk/Source/WebCore

Start using Document::pageCacheState() instead of Document::inPageCache()
https://bugs.webkit.org/show_bug.cgi?id=161851

Reviewed by Ryosuke Niwa.

Start using Document::pageCacheState() instead of Document::inPageCache()
as the latter one is confusing (given that it is true when firing the
pagehide event, when the document is about to enter page cache).

  • loader/FrameLoader.cpp:

(WebCore::FrameLoader::closeURL):
(WebCore::FrameLoader::clear):
(WebCore::FrameLoader::dispatchUnloadEvents):

  • loader/cache/CachedResource.cpp:

(WebCore::CachedResource::load):

  • page/Page.cpp:

(WebCore::incrementFrame): Deleted.

  • page/Page.h:
1:09 AM Changeset in webkit [205804] by bshafiei@apple.com
  • 1 copy in tags/Safari-602.1.50.0.9

New tag.

12:54 AM Changeset in webkit [205803] by bshafiei@apple.com
  • 9 edits
    2 copies
    2 adds in branches/safari-602-branch

Merge r205788. rdar://problem/28245097

12:54 AM Changeset in webkit [205802] by bshafiei@apple.com
  • 8 edits in branches/safari-602-branch

Merge r205154. rdar://problem/28233330

12:54 AM Changeset in webkit [205801] by bshafiei@apple.com
  • 2 edits in branches/safari-602-branch/Source/WebCore

Merge r204943. rdar://problem/28233330

12:54 AM Changeset in webkit [205800] by bshafiei@apple.com
  • 4 edits
    2 adds in branches/safari-602-branch

Merge r204923. rdar://problem/28233330

12:53 AM Changeset in webkit [205799] by bshafiei@apple.com
  • 7 edits
    1 add in branches/safari-602-branch

Merge r205784. rdar://problem/28230123

12:53 AM Changeset in webkit [205798] by bshafiei@apple.com
  • 5 edits
    1 add in branches/safari-602-branch

Merge r205783. rdar://problem/28229756

12:53 AM Changeset in webkit [205797] by bshafiei@apple.com
  • 13 edits
    1 copy
    1 add in branches/safari-602-branch

Merge r205765. rdar://problem/28033492

12:21 AM Changeset in webkit [205796] by bshafiei@apple.com
  • 5 edits in branches/safari-602.1.50.0-branch/Source

Versioning.

Note: See TracTimeline for information about the timeline view.