Timeline
Sep 17, 2016:
- 10:38 PM Changeset in webkit [206075] by
-
- 2 edits in trunk/Source/WebCore
Inline functions in URLParser
https://bugs.webkit.org/show_bug.cgi?id=162106
Reviewed by Antti Koivisto.
No change in behavior. Just make URLParser faster.
- platform/URLParser.cpp:
(WebCore::isC0Control):
(WebCore::isC0ControlOrSpace):
(WebCore::isTabOrNewline):
(WebCore::isInSimpleEncodeSet):
(WebCore::isInDefaultEncodeSet):
(WebCore::isInUserInfoEncodeSet):
(WebCore::isInvalidDomainCharacter):
(WebCore::isPercentOrNonASCII):
(WebCore::isSlashQuestionOrHash):
(WebCore::isWindowsDriveLetter):
(WebCore::shouldCopyFileURL):
(WebCore::percentEncode):
(WebCore::utf8PercentEncode):
(WebCore::utf8PercentEncodeQuery):
(WebCore::encodeQuery):
(WebCore::isDefaultPort):
(WebCore::isSpecialScheme):
(WebCore::copyASCIIStringUntil):
(WebCore::isPercentEncodedDot):
(WebCore::isSingleDotPathSegment):
(WebCore::isDoubleDotPathSegment):
(WebCore::consumeSingleDotPathSegment):
(WebCore::consumeDoubleDotPathSegment):
(WebCore::serializeIPv4):
(WebCore::zeroSequenceLength):
(WebCore::findLongestZeroSequence):
(WebCore::serializeIPv6Piece):
(WebCore::serializeIPv6):
(WebCore::parseIPv4Number):
(WebCore::pow256):
(WebCore::parseIPv4Host):
(WebCore::parseIPv6Host):
(WebCore::percentDecode):
(WebCore::containsOnlyASCII):
(WebCore::domainToASCII):
(WebCore::hasInvalidDomainCharacter):
(WebCore::formURLDecode):
(WebCore::serializeURLEncodedForm):
- 4:14 AM Changeset in webkit [206074] by
-
- 2 edits in trunk/Source/WebCore
MainThreadBridge needs an isolatedCopy() of SecurityOrigin
<https://webkit.org/b/162116>
<rdar://problem/27525870>
Reviewed by Carlos Garcia Campos.
Covered by existing tests.
- loader/WorkerThreadableLoader.cpp:
(WebCore::WorkerThreadableLoader::MainThreadBridge::MainThreadBridge):
Make an isolatedCopy() of SecurityOrigin here since that's the
correct idiom to use when the object is passed from a worker
thread back to the main thread. Fix suggested by Daniel Bates.
- 3:53 AM Changeset in webkit [206073] by
-
- 5 edits in releases/WebKitGTK/webkit-2.14/Source/WebCore
Merge r206019 - [TextureMapper] Scrolling through 01.org/dleyna crashes WebKitWebProcess
https://bugs.webkit.org/show_bug.cgi?id=162020
Reviewed by Žan Doberšek.
The problem is that we are trying to clone a ReferenceFilterOperation, which is not expected to be cloned, from
FilterAnimationValue copy constructor, and FilterOperations are never expected to be nullptr, so we end up
crashing. We just need to validate the filters before setting then and before creating a TextureMapperAnimation
for them.
- platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
(WebCore::GraphicsLayerTextureMapper::filtersCanBeComposited): Return false if there are reference filters or no
filters at all. I don't know if we really support other filters, but at least we won't crash for the others.
(WebCore::GraphicsLayerTextureMapper::addAnimation): Check if filters can be composited before creating a
TextureMapperAnimation.
(WebCore::GraphicsLayerTextureMapper::setFilters): Check if filters can be composited before setting them.
- platform/graphics/texmap/GraphicsLayerTextureMapper.h:
- platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
(WebCore::CoordinatedGraphicsLayer::filtersCanBeComposited): Return false if there are reference filters or no
filters at all. I don't know if we really support other filters, but at least we won't crash for the others.
(WebCore::CoordinatedGraphicsLayer::setFilters): Check if filters can be composited before setting them.
(WebCore::CoordinatedGraphicsLayer::addAnimation): Check if filters can be composited before creating a
TextureMapperAnimation.
- platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h:
- 3:52 AM Changeset in webkit [206072] by
-
- 3 edits in releases/WebKitGTK/webkit-2.14/Source/WebKit2
Merge r206067 - [GTK] Move the rendering of auth dialog shadow to the auth dialog widget
https://bugs.webkit.org/show_bug.cgi?id=162061
Reviewed by Michael Catanzaro.
Instead of rendering the shadow in the web view, we can let the auth dialog do it. This fixes the rendering of
the shadow in Wayland when using gdk_cairo_draw_from_gl().
- UIProcess/API/gtk/WebKitAuthenticationDialog.cpp:
(webkitAuthenticationDialogDraw): Draw the shadow before rendering the child.
(webkitAuthenticationDialogSizeAllocate): Center the child on the allocated space.
(webkit_authentication_dialog_class_init): Add size_allocate implementation.
- UIProcess/API/gtk/WebKitWebViewBase.cpp:
(webkitWebViewBaseDraw): Do not draw the shadow when auth dialog is present.
(webkitWebViewBaseSizeAllocate): Give the whole web view allocation to the auth dialog.
- 3:51 AM Changeset in webkit [206071] by
-
- 2 edits in releases/WebKitGTK/webkit-2.14/Source/WebKit2
Merge r206066 - [ThreadedCompositor] Scrolling artifacts on accelerated subframes
https://bugs.webkit.org/show_bug.cgi?id=149060
Reviewed by Michael Catanzaro.
The problem is that we are scrolling the main frame even when scrolling is not delegated.
- WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.cpp:
(WebKit::ThreadedCoordinatedLayerTreeHost::scrollNonCompositedContents): Return early if main frame view doesn't
delegate scrolling.
- 3:50 AM Changeset in webkit [206070] by
-
- 2 edits in releases/WebKitGTK/webkit-2.14/Source/WebKit2
Merge r206045 - [GTK] Surface created for glReadPixels path on Wayland is bigger than needed
https://bugs.webkit.org/show_bug.cgi?id=162025
Reviewed by Carlos Garcia Campos.
- UIProcess/gtk/AcceleratedBackingStoreWayland.cpp:
(WebKit::AcceleratedBackingStoreWayland::paint): the texture created by the Wayland
compositor is already scaled, so scaling its size when creating the surface causes it
to end up bigger than necessary.
- 3:48 AM Changeset in webkit [206069] by
-
- 2 edits in releases/WebKitGTK/webkit-2.14/Source/JavaScriptCore
Merge r205998 - REGRESSION (r205462): Lot of leaks
https://bugs.webkit.org/show_bug.cgi?id=161946
Reviewed by Saam Barati.
We were forgetting to delete LargeAllocations on VM exit!
- heap/MarkedSpace.cpp:
(JSC::MarkedSpace::~MarkedSpace):
- 3:47 AM Changeset in webkit [206068] by
-
- 2 edits in releases/WebKitGTK/webkit-2.14
Merge r206020 - [CMake] Build broken with current debian testing
https://bugs.webkit.org/show_bug.cgi?id=162054
Reviewed by Žan Doberšek.
Building WTR bindings is broken now in Debian testing. The reason is that '.' is no longer included in @INC for
perl, see https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=588017 and
https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2016-1238.
- Source/cmake/WebKitMacros.cmake(GENERATE_BINDINGS): Pass also the given BASE_DIR to perl executable so that it
can find modules in the current directory even if '.' is not in @INC. Also include generators in BASE_DIR to the
list of dependencies.
- 1:34 AM Changeset in webkit [206067] by
-
- 3 edits in trunk/Source/WebKit2
[GTK] Move the rendering of auth dialog shadow to the auth dialog widget
https://bugs.webkit.org/show_bug.cgi?id=162061
Reviewed by Michael Catanzaro.
Instead of rendering the shadow in the web view, we can let the auth dialog do it. This fixes the rendering of
the shadow in Wayland when using gdk_cairo_draw_from_gl().
- UIProcess/API/gtk/WebKitAuthenticationDialog.cpp:
(webkitAuthenticationDialogDraw): Draw the shadow before rendering the child.
(webkitAuthenticationDialogSizeAllocate): Center the child on the allocated space.
(webkit_authentication_dialog_class_init): Add size_allocate implementation.
- UIProcess/API/gtk/WebKitWebViewBase.cpp:
(webkitWebViewBaseDraw): Do not draw the shadow when auth dialog is present.
(webkitWebViewBaseSizeAllocate): Give the whole web view allocation to the auth dialog.
- 1:32 AM Changeset in webkit [206066] by
-
- 2 edits in trunk/Source/WebKit2
[ThreadedCompositor] Scrolling artifacts on accelerated subframes
https://bugs.webkit.org/show_bug.cgi?id=149060
Reviewed by Michael Catanzaro.
The problem is that we are scrolling the main frame even when scrolling is not delegated.
- WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.cpp:
(WebKit::ThreadedCoordinatedLayerTreeHost::scrollNonCompositedContents): Return early if main frame view doesn't
delegate scrolling.
Sep 16, 2016:
- 11:32 PM Changeset in webkit [206065] by
-
- 48 edits4 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
-
- 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
-
- 3 edits1 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
-
- 4 edits6 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
-
- 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
-
- 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
-
- 6 edits6 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
-
- 1 copy in tags/Safari-602.2.9
New tag.
- 5:41 PM Changeset in webkit [206057] by
-
- 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
-
- 3 edits1 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
-
- 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
-
- 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
-
- 23 edits in branches/safari-602-branch/Source
Merge r206006. rdar://problem/27991573
- 2:43 PM Changeset in webkit [206052] by
-
- 2 edits in branches/safari-602-branch/Source/WebKit2
Merge r206003. rdar://problem/27991573
- 2:43 PM Changeset in webkit [206051] by
-
- 8 edits in branches/safari-602-branch/Source/WebKit2
Merge r206000. rdar://problem/27991573
- 2:42 PM Changeset in webkit [206050] by
-
- 9 edits2 adds in branches/safari-602-branch
Merge r204916. rdar://problem/27991573
- 2:39 PM Changeset in webkit [206049] by
-
- 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
-
- 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
-
- 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
-
- 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
-
- 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
-
- 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
-
- 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
-
- 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
-
- 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
-
- 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
-
- 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
-
- 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
-
- 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
-
- 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
-
- 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
-
- 2 edits in trunk/Source/WebCore
Fix Windows clean build after r205929
- DerivedSources.cpp:
- 11:14 AM Changeset in webkit [206033] by
-
- 41 edits1 copy3 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
-
- 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
-
- 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
-
- 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
-
- 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
-
- 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
-
- 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
-
- 9 edits2 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
-
- 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
-
- 2 edits in trunk/Source/WebCore
Fix Windows clean build after r205929
- DerivedSources.cpp:
- 9:20 AM Changeset in webkit [206023] by
-
- 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
-
- 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
- (diff)
- 5:02 AM Changeset in webkit [206021] by
-
- 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
-
- 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
-
- 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
-
- 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
-
- 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
-
- 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
-
- 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
-
- 11 edits1 copy2 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
-
- 4 edits in branches/safari-602-branch/Source/WebKit2
Merge r205983. rdar://problem/28312297
- 12:56 AM Changeset in webkit [206012] by
-
- 2 edits in branches/safari-602-branch/Source/WebKit/mac
Merge r205991. rdar://problem/28272353
- 12:54 AM WebKitGTK/2.14.x edited by
- (diff)
- 12:51 AM Changeset in webkit [206011] by
-
- 19 edits1 add1 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
-
- 7 edits4 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
-
- 18 edits2 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.