WebKit-https.git
7 years agoFixed multiple API test failures after r158764.
mitz@apple.com [Wed, 6 Nov 2013 23:53:02 +0000 (23:53 +0000)]
Fixed multiple API test failures after r158764.

Reviewed by Sam Weinig.

* UIProcess/API/mac/WKBrowsingContextController.mm:
(setUpPagePolicyClient): If the delegate isn’t set or doesn’t respond to a selector, respond
with WKFramePolicyListenerUse().

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@158799 268f45cc-cd09-0410-ab3c-d52691b4dbfc

7 years ago[WebGL] We should not allow generateMipMap on compressed textures
bfulgham@apple.com [Wed, 6 Nov 2013 23:08:56 +0000 (23:08 +0000)]
[WebGL] We should not allow generateMipMap on compressed textures
https://bugs.webkit.org/show_bug.cgi?id=123915
<rdar://problem/15201274>

Reviewed by Dean Jackson.

Found by existing conformance/extensions/webgl-compressed-texture-s3tc.html

* html/canvas/WebGLRenderingContext.cpp:
(WebCore::WebGLRenderingContext::compressedTexImage2D): Set compressed flag.
(WebCore::WebGLRenderingContext::compressedTexSubImage2D): Ditto.
(WebCore::WebGLRenderingContext::generateMipmap): For Apple builds, check state
of compressed flag and generate appropriate WebGL error if necessary.
* html/canvas/WebGLTexture.cpp:
(WebCore::WebGLTexture::WebGLTexture): Set compressed flag to false by default
(WebCore::WebGLTexture::isCompressed): Added
(WebCore::WebGLTexture::setCompressed): Added
* html/canvas/WebGLTexture.h:
* platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
(WebCore::GraphicsContext3D::generateMipmap): Switch implementation to use proper
glGenerateMipmaps, rather than the glGenerateMipmapsEXT method.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@158798 268f45cc-cd09-0410-ab3c-d52691b4dbfc

7 years agoMove allowed classes handling to decodeObject
andersca@apple.com [Wed, 6 Nov 2013 23:04:39 +0000 (23:04 +0000)]
Move allowed classes handling to decodeObject
https://bugs.webkit.org/show_bug.cgi?id=123930

Reviewed by Andreas Kling.

* Shared/API/Cocoa/WKRemoteObjectCoder.mm:
(decodeObjectFromObjectStream):
Pass allowed classes through to decodeObject.

(decodeObject):
Update to take an NSSet of allowed classes. If the set is nil, use the current set.

(-[WKRemoteObjectDecoder decodeObjectOfClasses:forKey:]):
Pass classes to decodeObject.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@158797 268f45cc-cd09-0410-ab3c-d52691b4dbfc

7 years agoWeb Inspector: Changes to CodeGeneratorInspectorStrings.py should rebuild inspector...
commit-queue@webkit.org [Wed, 6 Nov 2013 22:44:23 +0000 (22:44 +0000)]
Web Inspector: Changes to CodeGeneratorInspectorStrings.py should rebuild inspector generated files
https://bugs.webkit.org/show_bug.cgi?id=123925

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2013-11-06
Reviewed by Timothy Hatcher.

* CMakeLists.txt:
* DerivedSources.make:
* GNUmakefile.am:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@158796 268f45cc-cd09-0410-ab3c-d52691b4dbfc

7 years agoSupport iteration of the Arguments object
oliver@apple.com [Wed, 6 Nov 2013 22:37:46 +0000 (22:37 +0000)]
Support iteration of the Arguments object
https://bugs.webkit.org/show_bug.cgi?id=123835

Reviewed by Mark Lam.

Source/JavaScriptCore:

Add an ArgumentsIterator object, and associated classes so that we can support
iteration of the arguments object.

This is a largely mechanical patch.  The only gnarliness is in the
logic to avoid reifying the Arguments object in for(... of arguments)
scenarios.

* GNUmakefile.list.am:
* JavaScriptCore.xcodeproj/project.pbxproj:
* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::emitEnumeration):
* runtime/Arguments.cpp:
(JSC::Arguments::getOwnPropertySlot):
(JSC::argumentsFuncIterator):
* runtime/Arguments.h:
* runtime/ArgumentsIteratorConstructor.cpp: Added.
(JSC::ArgumentsIteratorConstructor::finishCreation):
* runtime/ArgumentsIteratorConstructor.h: Added.
(JSC::ArgumentsIteratorConstructor::create):
(JSC::ArgumentsIteratorConstructor::createStructure):
(JSC::ArgumentsIteratorConstructor::ArgumentsIteratorConstructor):
* runtime/ArgumentsIteratorPrototype.cpp: Added.
(JSC::ArgumentsIteratorPrototype::finishCreation):
(JSC::argumentsIteratorPrototypeFuncIterator):
(JSC::argumentsIteratorPrototypeFuncNext):
* runtime/ArgumentsIteratorPrototype.h: Added.
(JSC::ArgumentsIteratorPrototype::create):
(JSC::ArgumentsIteratorPrototype::createStructure):
(JSC::ArgumentsIteratorPrototype::ArgumentsIteratorPrototype):
* runtime/CommonIdentifiers.h:
* runtime/JSArgumentsIterator.cpp: Added.
(JSC::JSArgumentsIterator::finishCreation):
* runtime/JSArgumentsIterator.h: Added.
(JSC::JSArgumentsIterator::createStructure):
(JSC::JSArgumentsIterator::create):
(JSC::JSArgumentsIterator::next):
(JSC::JSArgumentsIterator::JSArgumentsIterator):
* runtime/JSArrayIterator.cpp:
(JSC::createIteratorResult):
* runtime/JSGlobalObject.cpp:
* runtime/JSGlobalObject.h:

LayoutTests:

Add test cases

* js/arguments-iterator-expected.txt: Added.
* js/arguments-iterator.html: Added.
* js/script-tests/arguments-iterator.js: Added.
(shouldThrow.test):
(testAlias):
(testStrict):
(testReifiedArguments):
(testOverwrittenArguments):
(testNullArguments):
(testNonArrayLikeArguments):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@158793 268f45cc-cd09-0410-ab3c-d52691b4dbfc

7 years agoFix EFL build after r158753
commit-queue@webkit.org [Wed, 6 Nov 2013 22:37:34 +0000 (22:37 +0000)]
Fix EFL build after r158753
https://bugs.webkit.org/show_bug.cgi?id=123923

r158753 renamed WKNavigationData.h as WKNavigationDataRef.h, so
update it in UIProcess/API/efl/ewk_navigation_data_private.h.

Patch by Sergio Correia <sergio.correia@openbossa.org> on 2013-11-06
Reviewed by Csaba Osztrogonác.

* UIProcess/API/efl/ewk_navigation_data_private.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@158792 268f45cc-cd09-0410-ab3c-d52691b4dbfc

7 years agoFix the display of query parameters when the value is missing.
timothy@apple.com [Wed, 6 Nov 2013 22:29:17 +0000 (22:29 +0000)]
Fix the display of query parameters when the value is missing.

https://bugs.webkit.org/show_bug.cgi?id=123920

Reviewed by Joseph Pecoraro.

* UserInterface/ResourceDetailsSidebarPanel.js:
(WebInspector.ResourceDetailsSidebarPanel.prototype._createNameValueDataGrid):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@158790 268f45cc-cd09-0410-ab3c-d52691b4dbfc

7 years agoWeb Inspector: CSS Regions: When a flow is clicked the content of flow needs to be...
achicu@adobe.com [Wed, 6 Nov 2013 22:08:46 +0000 (22:08 +0000)]
Web Inspector: CSS Regions: When a flow is clicked the content of flow needs to be displayed
https://bugs.webkit.org/show_bug.cgi?id=122927

Reviewed by Joseph Pecoraro.

ContentFlowTreeContentView is now used to display the content nodes of a ContentFlow. It is
very similar to the DOMTreeContentView class, but can handle multiple root nodes.

* UserInterface/ContentFlowTreeContentView.js: Added.
(WebInspector.ContentFlowTreeContentView):
(WebInspector.ContentFlowTreeContentView.prototype.get selectionPathComponents):
(WebInspector.ContentFlowTreeContentView.prototype.updateLayout):
(WebInspector.ContentFlowTreeContentView.prototype.shown):
(WebInspector.ContentFlowTreeContentView.prototype.hidden):
(WebInspector.ContentFlowTreeContentView.prototype.closed):
(WebInspector.ContentFlowTreeContentView.prototype._selectedNodeDidChange):
(WebInspector.ContentFlowTreeContentView.prototype._pathComponentSelected):
(WebInspector.ContentFlowTreeContentView.prototype._createContentNodeTree):
(WebInspector.ContentFlowTreeContentView.prototype._createContentTrees):
(WebInspector.ContentFlowTreeContentView.prototype._contentNodeWasAdded):
(WebInspector.ContentFlowTreeContentView.prototype._contentNodeWasRemoved):
* UserInterface/ContentView.js:
(WebInspector.ContentView):
(WebInspector.ContentView.isViewable):
* UserInterface/DOMTreeElement.js:
(WebInspector.DOMTreeElement.prototype.ondeselect): We need to remove the selected "dom node"
so that the element is not going to stay selected after the we move to a different DOM tree.
* UserInterface/DOMTreeOutline.js:
(WebInspector.DOMTreeOutline.prototype.selectDOMNode):
* UserInterface/Main.html:
* UserInterface/Main.js:
(WebInspector.sidebarPanelForRepresentedObject):
* UserInterface/ResourceSidebarPanel.js:
(WebInspector.ResourceSidebarPanel.prototype._treeElementSelected):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@158788 268f45cc-cd09-0410-ab3c-d52691b4dbfc

7 years agoFix test case
oliver@apple.com [Wed, 6 Nov 2013 21:57:22 +0000 (21:57 +0000)]
Fix test case

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@158786 268f45cc-cd09-0410-ab3c-d52691b4dbfc

7 years agoRemove the flaky test expectation after r158720 now that the test is not flaky.
rniwa@webkit.org [Wed, 6 Nov 2013 21:54:52 +0000 (21:54 +0000)]
Remove the flaky test expectation after r158720 now that the test is not flaky.

* platform/mac/TestExpectations:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@158785 268f45cc-cd09-0410-ab3c-d52691b4dbfc

7 years agoImplement more decoding methods
andersca@apple.com [Wed, 6 Nov 2013 21:52:54 +0000 (21:52 +0000)]
Implement more decoding methods
https://bugs.webkit.org/show_bug.cgi?id=123922

Reviewed by Dan Bernstein.

* Shared/API/Cocoa/WKRemoteObjectCoder.mm:
(-[WKRemoteObjectDecoder decodeObjectForKey:]):
Call decodeObjectOfClasses:forKey: passing nil as the classes set.

(-[WKRemoteObjectDecoder decodeInt64ForKey:]):
Try to get a WebUInt64 and return its value.

(-[WKRemoteObjectDecoder decodeDoubleForKey:]):
Try to get a WebDouble and return its value.

(-[WKRemoteObjectDecoder decodeBytesForKey:returnedLength:]):
Move this method next to the other decoding methods.

(-[WKRemoteObjectDecoder requiresSecureCoding]):
Ditto.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@158784 268f45cc-cd09-0410-ab3c-d52691b4dbfc

7 years agoDisable "unused local typedefs" warning for GCC 4.7
commit-queue@webkit.org [Wed, 6 Nov 2013 21:39:17 +0000 (21:39 +0000)]
Disable "unused local typedefs" warning for GCC 4.7
https://bugs.webkit.org/show_bug.cgi?id=123913

Patch by Nick Diego Yamane <nick.yamane@openbossa.org> on 2013-11-06
Reviewed by Martin Robinson.

That warning was actually introduced in gcc 4.7.0.
See: http://gcc.gnu.org/gcc-4.7/changes.html

* wtf/Compiler.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@158783 268f45cc-cd09-0410-ab3c-d52691b4dbfc

7 years ago[Gtk][EFL] Fix build after r158759
commit-queue@webkit.org [Wed, 6 Nov 2013 21:31:52 +0000 (21:31 +0000)]
[Gtk][EFL] Fix build after r158759
https://bugs.webkit.org/show_bug.cgi?id=123910

Patch by Brendan Long <b.long@cablelabs.com> on 2013-11-06
Reviewed by Gustavo Noronha Silva.

* UIProcess/API/gtk/PageClientImpl.cpp: Remove flashBackingStoreUpdates().
* UIProcess/API/gtk/PageClientImpl.h: Same.
* UIProcess/CoordinatedGraphics/WebView.cpp: Same.
* UIProcess/CoordinatedGraphics/WebView.h: Same.
* UIProcess/DrawingAreaProxyImpl.cpp:
(WebKit::DrawingAreaProxyImpl::incorporateUpdate): Don't call flashBackingStoreUpdates().

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@158782 268f45cc-cd09-0410-ab3c-d52691b4dbfc

7 years agoUnreviewed Mac build fix; include ResourceResponse.
jer.noble@apple.com [Wed, 6 Nov 2013 21:21:17 +0000 (21:21 +0000)]
Unreviewed Mac build fix; include ResourceResponse.

* Shared/WebNavigationDataStore.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@158781 268f45cc-cd09-0410-ab3c-d52691b4dbfc

7 years agoDecode invocation arguments
andersca@apple.com [Wed, 6 Nov 2013 21:17:47 +0000 (21:17 +0000)]
Decode invocation arguments
https://bugs.webkit.org/show_bug.cgi?id=123917

Reviewed by Sam Weinig.

* Shared/API/Cocoa/WKRemoteObjectCoder.mm:
(-[WKRemoteObjectDecoder initWithInterface:rootObjectDictionary:WebKit::]):
Initialize the object stream.

(decodeObjectFromObjectStream):
Check that we're not reading past the end of the stream, then decode the object.

(decodeInvocationArguments):
Decode arguments from the object stream.

(decodeInvocation):
Call decodeInvocationArguments and set up the selector argument.

* Shared/ImmutableArray.h:
(WebKit::ImmutableArray::at):
(WebKit::ImmutableArray::size):
(WebKit::ImmutableArray::entries):
Constify.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@158780 268f45cc-cd09-0410-ab3c-d52691b4dbfc

7 years ago[Cocoa] Add -[WKNavigationData response]
mitz@apple.com [Wed, 6 Nov 2013 20:56:52 +0000 (20:56 +0000)]
[Cocoa] Add -[WKNavigationData response]
https://bugs.webkit.org/show_bug.cgi?id=123918

Reviewed by Sam Weinig.

* Shared/WebNavigationDataStore.h: Added a ResourceResponse data member.
(WebKit::WebNavigationDataStore::encode): Encode the response.
(WebKit::WebNavigationDataStore::decode): Decode the response.
* UIProcess/Cocoa/WKNavigationData.h: Declared new property.
* UIProcess/Cocoa/WKNavigationData.mm:
(-[WKNavigationData response]): Added.
* UIProcess/WebNavigationData.h:
(WebKit::WebNavigationData::response): Added.
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::updateGlobalHistory): Set the response in the data store.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@158779 268f45cc-cd09-0410-ab3c-d52691b4dbfc

7 years agoRename region line offset methods
bjonesbe@adobe.com [Wed, 6 Nov 2013 20:49:38 +0000 (20:49 +0000)]
Rename region line offset methods
https://bugs.webkit.org/show_bug.cgi?id=123897

Reviewed by Sam Weinig.

Because of the large number of overloads on the line offset methods,
it is very hard to read code using them, which also makes it harder to
move them out of RenderBlock. This patch renames the methods that take
a region as an argument to make it clearer when looking at the code
how the differ from the ones that don't.

No new tests, no behavior change.

* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::computeStartPositionDeltaForChildAvoidingFloats):
* rendering/RenderBlock.h:
(WebCore::RenderBlock::availableLogicalWidthForLineInRegion):
(WebCore::RenderBlock::logicalRightOffsetForLineInRegion):
(WebCore::RenderBlock::logicalLeftOffsetForLineInRegion):
(WebCore::RenderBlock::startOffsetForLineInRegion):
(WebCore::RenderBlock::endOffsetForLineInRegion):
(WebCore::RenderBlock::availableLogicalWidthForLine):
* rendering/RenderBox.cpp:
(WebCore::RenderBox::shrinkLogicalWidthToAvoidFloats):
(WebCore::RenderBox::containingBlockAvailableLineWidthInRegion):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@158777 268f45cc-cd09-0410-ab3c-d52691b4dbfc

7 years agoFix the 32-bit build.
weinig@apple.com [Wed, 6 Nov 2013 20:49:19 +0000 (20:49 +0000)]
Fix the 32-bit build.

* UIProcess/API/mac/WKBrowsingContextController.h:
* UIProcess/API/mac/WKBrowsingContextController.mm:
(-[WKBrowsingContextController dealloc]):
(-[WKBrowsingContextController _initWithPageRef:]):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@158776 268f45cc-cd09-0410-ab3c-d52691b4dbfc

7 years ago[Cocoa] Add -[WKBrowsingContextController unreachableURL]
mitz@apple.com [Wed, 6 Nov 2013 20:48:59 +0000 (20:48 +0000)]
[Cocoa] Add -[WKBrowsingContextController unreachableURL]
https://bugs.webkit.org/show_bug.cgi?id=123909

Reviewed by Anders Carlsson.

* UIProcess/API/mac/WKBrowsingContextController.h: Declared unreachableURL property.
* UIProcess/API/mac/WKBrowsingContextController.mm:
(-[WKBrowsingContextController unreachableURL]): Added.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::unreachableURL): Added.
* UIProcess/WebPageProxy.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@158775 268f45cc-cd09-0410-ab3c-d52691b4dbfc

7 years agoHTMLCollection should use CollectionIndexCache
antti@apple.com [Wed, 6 Nov 2013 20:38:37 +0000 (20:38 +0000)]
HTMLCollection should use CollectionIndexCache
https://bugs.webkit.org/show_bug.cgi?id=123906

Reviewed by Ryosuke Niwa.

More code sharing.

* bindings/js/JSDOMWindowCustom.cpp:
(WebCore::namedItemGetter):
* bindings/js/JSHTMLDocumentCustom.cpp:
(WebCore::JSHTMLDocument::nameGetter):
* dom/ChildNodeList.h:
* dom/CollectionIndexCache.h:
(WebCore::::nodeBeforeCached):
(WebCore::::nodeAfterCached):
(WebCore::::nodeAt):

    Add a mechanism for disabling use of backward traversal.

* dom/LiveNodeList.h:
(WebCore::LiveNodeList::collectionCanTraverseBackward):
* html/HTMLCollection.cpp:
(WebCore::HTMLCollection::HTMLCollection):
(WebCore::isMatchingElement):
(WebCore::HTMLCollection::iterateForPreviousElement):
(WebCore::firstMatchingElement):
(WebCore::nextMatchingElement):
(WebCore::HTMLCollection::length):
(WebCore::HTMLCollection::item):
(WebCore::nameShouldBeVisibleInDocumentAll):
(WebCore::firstMatchingChildElement):
(WebCore::nextMatchingSiblingElement):
(WebCore::HTMLCollection::firstElement):
(WebCore::HTMLCollection::traverseForward):
(WebCore::HTMLCollection::collectionFirst):
(WebCore::HTMLCollection::collectionLast):
(WebCore::HTMLCollection::collectionTraverseForward):
(WebCore::HTMLCollection::collectionTraverseBackward):
(WebCore::HTMLCollection::invalidateCache):
(WebCore::HTMLCollection::namedItem):
(WebCore::HTMLCollection::updateNameCache):
* html/HTMLCollection.h:
(WebCore::HTMLCollection::collectionCanTraverseBackward):

    Disable use of backward traversal for collections that use custom traversal.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@158774 268f45cc-cd09-0410-ab3c-d52691b4dbfc

7 years agoDFG CheckArray(NonArray) should prove that the child isn't an array
fpizlo@apple.com [Wed, 6 Nov 2013 20:32:19 +0000 (20:32 +0000)]
DFG CheckArray(NonArray) should prove that the child isn't an array
https://bugs.webkit.org/show_bug.cgi?id=123911
<rdar://problem/15202803>

Reviewed by Mark Hahnenberg.

Source/JavaScriptCore:

* dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::jumpSlowForUnwantedArrayMode):
* ftl/FTLLowerDFGToLLVM.cpp:
(JSC::FTL::LowerDFGToLLVM::isArrayType):

LayoutTests:

* js/dfg-check-array-non-array-expected.txt: Added.
* js/dfg-check-array-non-array.html: Added.
* js/script-tests/dfg-check-array-non-array.js: Added.
(foo):
(bar):
(baz):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@158773 268f45cc-cd09-0410-ab3c-d52691b4dbfc

7 years agoEncode parameters as objects
andersca@apple.com [Wed, 6 Nov 2013 20:31:40 +0000 (20:31 +0000)]
Encode parameters as objects
https://bugs.webkit.org/show_bug.cgi?id=123912

Reviewed by Beth Dakin.

We want to ensure that the objects have the right types when decoded, so just encode them as objects.

* Shared/API/Cocoa/WKRemoteObjectCoder.mm:
(encodeInvocation):
(-[WKRemoteObjectEncoder encodeValueOfObjCType:at:]):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@158772 268f45cc-cd09-0410-ab3c-d52691b4dbfc

7 years agoUnreviewed webkitpy unit test fix; update baselines after r158765
jer.noble@apple.com [Wed, 6 Nov 2013 20:16:55 +0000 (20:16 +0000)]
Unreviewed webkitpy unit test fix; update baselines after r158765

* Scripts/webkitpy/port/win_unittest.py:
(WinPortTest.test_baseline_search_path):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@158767 268f45cc-cd09-0410-ab3c-d52691b4dbfc

7 years ago[Win] run-webkit-tests on the win platform should fall back to mac-mountainlion,...
jer.noble@apple.com [Wed, 6 Nov 2013 19:53:42 +0000 (19:53 +0000)]
[Win] run-webkit-tests on the win platform should fall back to mac-mountainlion, not mac-lion.
https://bugs.webkit.org/show_bug.cgi?id=123905

Reviewed by Brent Fulgham.

Now that the mac-lion results have been removed, the win port should fall back to
the mac-mountainlion results.

* Scripts/webkitpy/port/win.py:
(WinPort.default_baseline_search_path):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@158765 268f45cc-cd09-0410-ab3c-d52691b4dbfc

7 years agoAdd WKBrowsingContextPolicyDelegate
weinig@apple.com [Wed, 6 Nov 2013 19:42:09 +0000 (19:42 +0000)]
Add WKBrowsingContextPolicyDelegate
https://bugs.webkit.org/show_bug.cgi?id=123904

Reviewed by Anders Carlsson.

* UIProcess/API/mac/WKBrowsingContextController.h:
* UIProcess/API/mac/WKBrowsingContextController.mm:
Implement a WKPagePolicyClient in terms of the new WKBrowsingContextPolicyDelegate protocol.

* UIProcess/API/mac/WKBrowsingContextPolicyDelegate.h:
Added.

* UIProcess/API/mac/WebKit2.h:
Add new #include of WKBrowsingContextPolicyDelegate.h

* WebKit2.xcodeproj/project.pbxproj:
Add new file.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@158764 268f45cc-cd09-0410-ab3c-d52691b4dbfc

7 years agoWKRemoteObjectInterface should keep track of allowed decodable classes
andersca@apple.com [Wed, 6 Nov 2013 19:23:20 +0000 (19:23 +0000)]
WKRemoteObjectInterface should keep track of allowed decodable classes
https://bugs.webkit.org/show_bug.cgi?id=123903

Reviewed by Sam Weinig.

* Shared/API/Cocoa/WKRemoteObjectInterface.mm:
(allowedArgumentClassesForMethod):
Helper function that returns a vector of sets of allowed classes for each method argument.

(initializeAllowedArgumentClasses):
Iterate over the methods in the protocol, get the extended method type encoding and create an
NSMethodSignature from it. Finally, pass the signature to allowedArgumentClassesForMethod.

(initializeAllowedArgumentClasses):
Call the other initializeAllowedArgumentClasses twice, once for required methods,
and once for optional methods.

(-[WKRemoteObjectInterface initWithProtocol:identifier:]):
Call initializeAllowedArgumentClasses.

(-[WKRemoteObjectInterface _allowedArgumentClassesForSelector:]):
Add new getter.

* Shared/API/Cocoa/WKRemoteObjectInterfaceInternal.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@158763 268f45cc-cd09-0410-ab3c-d52691b4dbfc

7 years agoJSExport doesn't support constructors
mhahnenberg@apple.com [Wed, 6 Nov 2013 19:21:47 +0000 (19:21 +0000)]
JSExport doesn't support constructors
https://bugs.webkit.org/show_bug.cgi?id=123380

Reviewed by Geoffrey Garen.

Needed another linked-on-or-after check for when we're deciding whether
we should copy over init family methods.

Factored out the link time checks into a separate function so that they can be cached.

Factored out the check for init-family method selectors into helper function and changed it to
match the description in the clang docs, namely that there can be underscores at the beginning
and the first letter after 'init' part of the selector (if there is one) must be a capital letter.

Updated tests to make sure we don't treat "initialize" as an init-family method and that we do
treat "_init" as an init-family method.

* API/JSWrapperMap.h:
* API/JSWrapperMap.mm:
(isInitFamilyMethod):
(shouldSkipMethodWithName):
(copyMethodsToObject):
(allocateConstructorForCustomClass):
(supportsInitMethodConstructors):
* API/tests/testapi.mm:
(-[ClassA initialize]):
(-[ClassD initialize]):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@158762 268f45cc-cd09-0410-ab3c-d52691b4dbfc

7 years agoFix a Mountain Lion test failure.
andersca@apple.com [Wed, 6 Nov 2013 19:01:30 +0000 (19:01 +0000)]
Fix a Mountain Lion test failure.

NSURLRequest doesn't conform to NSSecureCoding on Mountain Lion, so don't try to test encoding it.

* TestWebKitAPI/Tests/WebKit2ObjC/WKRemoteObjectRegistry.mm:
(TestWebKitAPI::TEST):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@158761 268f45cc-cd09-0410-ab3c-d52691b4dbfc

7 years agoAdd "id" attribute to TextTrack
commit-queue@webkit.org [Wed, 6 Nov 2013 18:53:17 +0000 (18:53 +0000)]
Add "id" attribute to TextTrack
https://bugs.webkit.org/show_bug.cgi?id=123825

Patch by Brendan Long <b.long@cablelabs.com> on 2013-11-06
Reviewed by Eric Carlson.

Source/WebCore:

Test: media/track/track-id.html

* html/HTMLMediaElement.cpp:
(HTMLMediaElement::addTextTrack): Add emptyString() for track id.
* html/track/AudioTrack.cpp:
(WebCore::AudioTrack::AudioTrack): Pass trackPrivate->id() to TrackBase.
(WebCore::AudioTrack::idChanged): Added, set id.
* html/track/AudioTrack.h: Move m_id to TrackBase.
* html/track/InbandTextTrack.cpp:
(WebCore::InbandTextTrack::InbandTextTrack): Pass trackPrivate->id() to TrackBase.
(WebCore::InbandTextTrack::idChanged): Added, set id.
* html/track/InbandTextTrack.h: Add idChanged().
* html/track/LoadableTextTrack.cpp:
(WebCore::LoadableTextTrack::LoadableTextTrack): Add emptyString() for track id.
(WebCore::LoadableTextTrack::id): Override to return the track element's id.
* html/track/TextTrack.cpp:
(WebCore::TextTrack::captionMenuOffItem): Add empty string for track id.
(WebCore::TextTrack::captionMenuAutomaticItem): Add empty string for track id.
(WebCore::TextTrack::TextTrack): Pass id to TrackBase.
* html/track/TextTrack.h:
(WebCore::TextTrack::create): Add id parameter.
* html/track/TextTrack.idl: Add id attribute.
* html/track/TrackBase.cpp:
(WebCore::TrackBase::TrackBase): Add m_id.
* html/track/TrackBase.h: Add id attribute / m_id.
* html/track/VideoTrack.cpp:
(WebCore::VideoTrack::VideoTrack): Pass trackPrivate->id() to TrackBase.
(WebCore::VideoTrack::idChanged): Added, set id.
* html/track/VideoTrack.h: Move m_id to TrackBase.
* platform/graphics/TrackPrivateBase.h: Add idChanged() callback.

LayoutTests:

* media/track/track-id-expected.txt: Added.
* media/track/track-id.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@158760 268f45cc-cd09-0410-ab3c-d52691b4dbfc

7 years agoRemove dead code
andersca@apple.com [Wed, 6 Nov 2013 18:51:58 +0000 (18:51 +0000)]
Remove dead code
https://bugs.webkit.org/show_bug.cgi?id=123902

Reviewed by Tim Horton.

Remove the PageClient::containingWindowGraphicsContext() as well as the
WKPageSetDebugPaintFlags and WKPageGetDebugPaintFlags API functions.

* UIProcess/API/C/WKPage.cpp:
* UIProcess/API/mac/PageClientImpl.h:
* UIProcess/API/mac/PageClientImpl.mm:
* UIProcess/PageClient.h:
* UIProcess/WebPageProxy.cpp:
* UIProcess/WebPageProxy.h:
* UIProcess/mac/WebPageProxyMac.mm:
(WebKit::WebPageProxy::searchTheWeb):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@158759 268f45cc-cd09-0410-ab3c-d52691b4dbfc

7 years agoMove array position caching out from HTMLCollection
antti@apple.com [Wed, 6 Nov 2013 18:18:48 +0000 (18:18 +0000)]
Move array position caching out from HTMLCollection
https://bugs.webkit.org/show_bug.cgi?id=123895

Reviewed by Darin Adler.

This caching complicates the logic but is used by a single subclass
(HTMLFormControlsCollection) only. The subclass can do the caching itself.

* html/HTMLAllCollection.cpp:
(WebCore::HTMLAllCollection::HTMLAllCollection):
* html/HTMLCollection.cpp:
(WebCore::HTMLCollection::HTMLCollection):
(WebCore::HTMLCollection::create):
(WebCore::HTMLCollection::item):
(WebCore::HTMLCollection::elementBeforeOrAfterCachedElement):
(WebCore::HTMLCollection::firstElement):

    Renamed from traverseFirstElement.

(WebCore::HTMLCollection::traverseForwardToOffset):
(WebCore::HTMLCollection::invalidateCache):

    Make cache invalidation virtual so we can clear HTMLTableRowsCollection index cache.

(WebCore::HTMLCollection::namedItem):
(WebCore::HTMLCollection::updateNameCache):

    Use traverseForwardToOffset instead traverseNextElement. This allows removal of traverseNextElement.

* html/HTMLCollection.h:
(WebCore::HTMLCollection::usesCustomForwardOnlyTraversal):

    Renamed the enum and the accessor to be more informative.

(WebCore::HTMLCollection::setCachedElement):
(WebCore::HTMLCollection::customElementAfter):

    Renamed from virtualItemAfter.

* html/HTMLFormControlsCollection.cpp:
(WebCore::HTMLFormControlsCollection::HTMLFormControlsCollection):
(WebCore::findFormAssociatedElement):
(WebCore::HTMLFormControlsCollection::customElementAfter):

    Move the array position caching logic here.

(WebCore::HTMLFormControlsCollection::invalidateCache):
* html/HTMLFormControlsCollection.h:
* html/HTMLNameCollection.cpp:
(WebCore::HTMLNameCollection::HTMLNameCollection):
* html/HTMLOptionsCollection.cpp:
(WebCore::HTMLOptionsCollection::HTMLOptionsCollection):
* html/HTMLTableRowsCollection.cpp:
(WebCore::HTMLTableRowsCollection::HTMLTableRowsCollection):
(WebCore::HTMLTableRowsCollection::customElementAfter):
* html/HTMLTableRowsCollection.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@158758 268f45cc-cd09-0410-ab3c-d52691b4dbfc

7 years ago[ATK] accessibility/title-ui-element-correctness.html fails
m.pakula@samsung.com [Wed, 6 Nov 2013 18:17:03 +0000 (18:17 +0000)]
[ATK] accessibility/title-ui-element-correctness.html fails
https://bugs.webkit.org/show_bug.cgi?id=99825

Reviewed by Mario Sanchez Prada.

Source/WebCore:

When calling setAtkRelationSetFromCoreObject a new ATK_LABELLED_BY_RELATION
is added, adding proper label element as a relation. When the document structure
has been changed and a different label should be linked as a relation, current ATK
implementation adds it as a next target on relation's target list, while
WTR/DumpRenderTree implementation takes only first one into account.
This patch adds a new function removing current relations before adding new ones.

Covered by existing tests.

* accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
(removeAtkRelationFromRelationSetByType):
(setAtkRelationSetFromCoreObject):

LayoutTests:

Remove failure test expectation for the test fixed by this patch.

* platform/efl-wk1/TestExpectations:
* platform/efl-wk2/TestExpectations:
* platform/gtk/TestExpectations:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@158757 268f45cc-cd09-0410-ab3c-d52691b4dbfc

7 years agoPromoted WKBrowsingContextHistoryDelegate.h to private.
mitz@apple.com [Wed, 6 Nov 2013 18:12:48 +0000 (18:12 +0000)]
Promoted WKBrowsingContextHistoryDelegate.h to private.

Rubber-stamped by Sam Weinig.

* WebKit2.xcodeproj/project.pbxproj:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@158756 268f45cc-cd09-0410-ab3c-d52691b4dbfc

7 years agoUnreviewed GTK gardening. Media elements wrongly exposed after r158743.
mario@webkit.org [Wed, 6 Nov 2013 17:43:33 +0000 (17:43 +0000)]
Unreviewed GTK gardening. Media elements wrongly exposed after r158743.

* platform/gtk/TestExpectations: Added failure expectations.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@158755 268f45cc-cd09-0410-ab3c-d52691b4dbfc

7 years ago[ATK] Providing new table related accessibility expectations after r158742
commit-queue@webkit.org [Wed, 6 Nov 2013 17:39:01 +0000 (17:39 +0000)]
[ATK] Providing new table related accessibility expectations after r158742
https://bugs.webkit.org/show_bug.cgi?id=123893

Patch by Krzysztof Czech <k.czech@samsung.com> on 2013-11-06
Reviewed by Chris Fleizach.

New baselines after added missing implementation in r158742.

* platform/efl-wk1/TestExpectations: Tests are no longer failing.
* platform/efl-wk2/TestExpectations: Tests are no longer failing.
* platform/efl-wk2/accessibility/table-attributes-expected.txt: Added.
* platform/efl-wk2/accessibility/table-sections-expected.txt: Added.
* platform/efl/accessibility/table-attributes-expected.txt: Added.
* platform/efl/accessibility/table-sections-expected.txt: Added.
* platform/gtk-wk2/accessibility/table-attributes-expected.txt: Added.
* platform/gtk-wk2/accessibility/table-sections-expected.txt: Added.
* platform/gtk/TestExpectations: Tests are no longer failing.
* platform/gtk/accessibility/table-attributes-expected.txt: Added.
* platform/gtk/accessibility/table-sections-expected.txt: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@158754 268f45cc-cd09-0410-ab3c-d52691b4dbfc

7 years ago[Cocoa] History delegate
mitz@apple.com [Wed, 6 Nov 2013 17:36:26 +0000 (17:36 +0000)]
[Cocoa] History delegate
https://bugs.webkit.org/show_bug.cgi?id=123837

Reviewed by Sam Weinig.

* Shared/Cocoa/APIObject.mm:
(WebKit::APIObject::newObject): Allocate a WKNavigationData if the object is a
WebNavigationData.

* Shared/Cocoa/WKNSString.h:
(WebKit::wrapper): Added. Returns a WebString’s wrapper as an NSString.

* Shared/Cocoa/WKNSURL.h:
(WebKit::wrapper): Added. Returns a WebURL’s wrapper as an NSURL.

* UIProcess/API/C/WKNavigationData.cpp: Renamed.
* UIProcess/API/C/WKNavigationData.h: Renamed.
* UIProcess/API/C/WKNavigationDataRef.cpp: Copied from Source/WebKit2/UIProcess/API/C/WKNavigationData.cpp.
* UIProcess/API/C/WKNavigationDataRef.h: Copied from Source/WebKit2/UIProcess/API/C/WKNavigationData.h.

* UIProcess/API/mac/WKBrowsingContextController.h: Declared historyDelegate property.

* UIProcess/API/mac/WKProcessGroup.mm:
(didNavigateWithNavigationData): Added history client callback that calls the browsing
context’s history delegate.
(didPerformClientRedirect): Ditto.
(didPerformServerRedirect): Ditto.
(didUpdateHistoryTitle): Ditto.
(setUpHistoryClient): Added.
(-[WKProcessGroup initWithInjectedBundleURL:]): Added call to setUpHistoryClient.
(-[WKProcessGroup dealloc]): Clear the history client.

* UIProcess/Cocoa/WKBrowsingContextHistoryDelegate.h: Added.

* UIProcess/Cocoa/WKNavigationData.h: Added.
* UIProcess/Cocoa/WKNavigationData.mm: Added.
(-[WKNavigationData dealloc]): Calls the WebNavigationData destructor.
(-[WKNavigationData title]): Added.
(-[WKNavigationData originalRequest]): Added.
(-[WKNavigationData destinationURL]): Added.
(-[WKNavigationData _apiObject]): Returns the wrapped WebNavigationData.
* UIProcess/Cocoa/WKNavigationDataInternal.h: Added.
(WebKit::wrapper): Added. Returns a WebNavigationData’s wrapper as a WKNavigationData.
* WebKit2.xcodeproj/project.pbxproj: Updated for renames and additions.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@158753 268f45cc-cd09-0410-ab3c-d52691b4dbfc

7 years agoUnreviewed gardening; Fix expected results for video-seek-with-negative-playback...
jer.noble@apple.com [Wed, 6 Nov 2013 17:31:44 +0000 (17:31 +0000)]
Unreviewed gardening; Fix expected results for video-seek-with-negative-playback.html,
and modify the test to conform to media test style.

* media/video-seek-with-negative-playback-expected.txt:
* media/video-seek-with-negative-playback.html:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@158752 268f45cc-cd09-0410-ab3c-d52691b4dbfc

7 years agoChange ctiTrampoline into a thunk
msaboff@apple.com [Wed, 6 Nov 2013 17:29:12 +0000 (17:29 +0000)]
Change ctiTrampoline into a thunk
https://bugs.webkit.org/show_bug.cgi?id=123844

Reviewed by Filip Pizlo.

Converted ctiTrampoline and ctiOpThrowNotCaught into thunks named callToJavaScript
and returnFromJavaScript.  Cleaned up and in some cases removed JITStubsXXX.h files
after removing ctiTrampoline and ctiOpThrowNotCaught.  Added callJavaScriptJITFunction
to VM that is a function pointer to the callToJavaScript thunk.

* GNUmakefile.list.am:
* JavaScriptCore.xcodeproj/project.pbxproj:
* dfg/DFGDriver.cpp:
(JSC::DFG::compileImpl):
* jit/JITCode.cpp:
(JSC::JITCode::execute):
* jit/JITExceptions.cpp:
(JSC::genericUnwind):
* jit/JITStubs.cpp:
* jit/JITStubs.h:
* jit/JITStubsARM.h:
* jit/JITStubsARM64.h: Removed.
* jit/JITStubsARMv7.h:
* jit/JITStubsMIPS.h: Removed.
* jit/JITStubsMSVC64.asm:
* jit/JITStubsSH4.h: Removed.
* jit/JITStubsX86.h:
* jit/JITStubsX86_64.h:
* jit/JSInterfaceJIT.h:
* jit/ThunkGenerators.cpp:
(JSC::returnFromJavaScript):
(JSC::callToJavaScript):
* jit/ThunkGenerators.h:
* runtime/VM.cpp:
(JSC::VM::VM):
* runtime/VM.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@158751 268f45cc-cd09-0410-ab3c-d52691b4dbfc

7 years agoAdd ENABLE(TEXT_SELECTION)
dbates@webkit.org [Wed, 6 Nov 2013 16:48:17 +0000 (16:48 +0000)]
Add ENABLE(TEXT_SELECTION)
https://bugs.webkit.org/show_bug.cgi?id=123827

Reviewed by Ryosuke Niwa.

Source/WebCore:

Add compile-time guard, ENABLE(TEXT_SELECTION), to enable or
disable selection painting in WebCore (enabled by default).

On iOS we disable WebCore selection painting and have UIKit
paint the selection.

* rendering/InlineTextBox.cpp:
(WebCore::InlineTextBox::paintSelection): Only paint selection when
TEXT_SELECTION is enabled.
* rendering/LogicalSelectionOffsetCaches.h:
(WebCore::LogicalSelectionOffsetCaches::LogicalSelectionOffsetCaches):
For now, add a ENABLE(TEXT_SELECTION)-guard around an assertion. Added
a FIXME comment to investigate the callers and either move the assertion
to the appropriate callers or structure the code such that we can remove
the assertion.
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::paintSelection): Only paint selection when
TEXT_SELECTION is enabled.
* rendering/TextPaintStyle.cpp:
(WebCore::computeTextSelectionPaintStyle): Only compute the selection
paint style when TEXT_SELECTION is enabled. Otherwise, return a paint
style identical to the text paint style. Also, substitute nullptr for 0.

Source/WTF:

Enable selection painting by default on all ports except iOS.

* wtf/FeatureDefines.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@158750 268f45cc-cd09-0410-ab3c-d52691b4dbfc

7 years agoUnrevewied Windows build fix after r158736; add InlineElementBox.cpp to the Rendering...
jer.noble@apple.com [Wed, 6 Nov 2013 16:45:28 +0000 (16:45 +0000)]
Unrevewied Windows build fix after r158736; add InlineElementBox.cpp to the RenderingAllInOne.cpp file.

* rendering/RenderingAllInOne.cpp:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@158749 268f45cc-cd09-0410-ab3c-d52691b4dbfc

7 years agoFTL should support StringCharCodeAt
fpizlo@apple.com [Wed, 6 Nov 2013 16:38:45 +0000 (16:38 +0000)]
FTL should support StringCharCodeAt
https://bugs.webkit.org/show_bug.cgi?id=123854

Reviewed by Sam Weinig.

* ftl/FTLCapabilities.cpp:
(JSC::FTL::canCompile):
* ftl/FTLLowerDFGToLLVM.cpp:
(JSC::FTL::LowerDFGToLLVM::compileNode):
(JSC::FTL::LowerDFGToLLVM::compileStringCharCodeAt):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@158748 268f45cc-cd09-0410-ab3c-d52691b4dbfc

7 years agoUnreviewed build fix, style() return type is now a reference.
svillar@igalia.com [Wed, 6 Nov 2013 16:36:46 +0000 (16:36 +0000)]
Unreviewed build fix, style() return type is now a reference.

* rendering/RenderGrid.cpp:
(WebCore::RenderGrid::resolveGridPositionFromStyle):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@158747 268f45cc-cd09-0410-ab3c-d52691b4dbfc

7 years agoUnreviewed 32-bit Mac build fix; use an explicit FloatSize -> IntSize conversion...
jer.noble@apple.com [Wed, 6 Nov 2013 16:26:06 +0000 (16:26 +0000)]
Unreviewed 32-bit Mac build fix; use an explicit FloatSize -> IntSize conversion function.

* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::sizeChanged):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@158746 268f45cc-cd09-0410-ab3c-d52691b4dbfc

7 years agoPlaying many sounds with HTML5 Audio makes WebKit unresponsive
jer.noble@apple.com [Wed, 6 Nov 2013 16:15:16 +0000 (16:15 +0000)]
Playing many sounds with HTML5 Audio makes WebKit unresponsive
https://bugs.webkit.org/show_bug.cgi?id=116145

Reviewed by Eric Carlson.

Cache as much information as possible from AVPlayerItem to eliminate unneccesary
calls into AVFoundation.

Add WillChange/DidChange functions to handle the results of KVO notifications
from AVPlayerItem and AVPlayer:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::platformPlay):
(WebCore::MediaPlayerPrivateAVFoundationObjC::platformPause):
(WebCore::MediaPlayerPrivateAVFoundationObjC::updateRate):
(WebCore::MediaPlayerPrivateAVFoundationObjC::playerItemStatusDidChange):
(WebCore::MediaPlayerPrivateAVFoundationObjC::playbackLikelyToKeepUpWillChange):
(WebCore::MediaPlayerPrivateAVFoundationObjC::playbackLikelyToKeepUpDidChange):
(WebCore::MediaPlayerPrivateAVFoundationObjC::playbackBufferEmptyWillChange):
(WebCore::MediaPlayerPrivateAVFoundationObjC::playbackBufferEmptyDidChange):
(WebCore::MediaPlayerPrivateAVFoundationObjC::playbackBufferFullWillChange):
(WebCore::MediaPlayerPrivateAVFoundationObjC::playbackBufferFullDidChange):
(WebCore::MediaPlayerPrivateAVFoundationObjC::seekableTimeRangesDidChange):
(WebCore::MediaPlayerPrivateAVFoundationObjC::loadedTimeRangesDidChange):
(WebCore::MediaPlayerPrivateAVFoundationObjC::tracksDidChange):
(WebCore::MediaPlayerPrivateAVFoundationObjC::hasEnabledAudioDidChange):
(WebCore::MediaPlayerPrivateAVFoundationObjC::presentationSizeDidChange):
(WebCore::MediaPlayerPrivateAVFoundationObjC::durationDidChange):
(WebCore::MediaPlayerPrivateAVFoundationObjC::rateDidChange):
(WebCore::itemKVOProperties):
(-[WebCoreAVFMovieObserver observeValueForKeyPath:ofObject:change:context:]):

Instruct the HTMLMediaElement to cache the currentTime value for 5 seconds:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
(WebCore::MediaPlayerPrivateAVFoundationObjC::maximumDurationToCacheMediaTime):

Add and initialize member variables to hold these cached values:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::MediaPlayerPrivateAVFoundationObjC):
(WebCore::MediaPlayerPrivateAVFoundationObjC::cancelLoad):

Add a new Notification type which can take (and call) a Function object:
* platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
(WebCore::MediaPlayerPrivateAVFoundation::dispatchNotification):
* platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
(WebCore::MediaPlayerPrivateAVFoundation::Notification::Notification):
(WebCore::MediaPlayerPrivateAVFoundation::Notification::function):

Implement queries in terms of the cached values of AVPlayerItem and AVPlayer
properties:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayer):
(WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayerItem):
(WebCore::MediaPlayerPrivateAVFoundationObjC::playerItemStatus):
(WebCore::MediaPlayerPrivateAVFoundationObjC::rate):
(WebCore::MediaPlayerPrivateAVFoundationObjC::platformBufferedTimeRanges):
(WebCore::MediaPlayerPrivateAVFoundationObjC::platformMinTimeSeekable):
(WebCore::MediaPlayerPrivateAVFoundationObjC::platformMaxTimeSeekable):
(WebCore::MediaPlayerPrivateAVFoundationObjC::platformMaxTimeLoaded):
(WebCore::MediaPlayerPrivateAVFoundationObjC::totalBytes):
(WebCore::MediaPlayerPrivateAVFoundationObjC::tracksChanged):
(WebCore::MediaPlayerPrivateAVFoundationObjC::updateAudioTracks):
(WebCore::MediaPlayerPrivateAVFoundationObjC::updateVideoTracks):
(WebCore::MediaPlayerPrivateAVFoundationObjC::sizeChanged):
(WebCore::MediaPlayerPrivateAVFoundationObjC::processLegacyClosedCaptionsTracks):

Invalidate the cached currentTime before calling scheduleTimeUpdate so that the
correct movieTime is saved in m_clockTimeAtLastUpdateEvent:
* html/HTMLMediaElement.cpp:
(HTMLMediaElement::setReadyState):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@158745 268f45cc-cd09-0410-ab3c-d52691b4dbfc

7 years ago[CSS Grid Layout] Add support for named grid areas
svillar@igalia.com [Wed, 6 Nov 2013 15:54:08 +0000 (15:54 +0000)]
[CSS Grid Layout] Add support for named grid areas
https://bugs.webkit.org/show_bug.cgi?id=120045

Reviewed by Andreas Kling.

From Blink r155555, r155850 and r155889 by <jchaffraix@chromium.org>

Source/WebCore:

Added support for named grid areas. Basically a named grid area is
now a valid grid position. The shorthand parsing of grid-area was
split from the grid-{row|column} as the rules for expanding are
slightly different.

Unknown grid area names are treated as 'auto' as per the
specification. This means that for those cases we need to trigger
the auto-placement algorithm.

Tests: fast/css-grid-layout/grid-item-bad-named-area-auto-placement.html
       fast/css-grid-layout/grid-item-named-grid-area-resolution.html

* css/CSSComputedStyleDeclaration.cpp:
(WebCore::valueForGridPosition):
* css/CSSParser.cpp:
(WebCore::CSSParser::parseValue):
(WebCore::CSSParser::parseGridPosition):
(WebCore::gridMissingGridPositionValue):
(WebCore::CSSParser::parseGridItemPositionShorthand):
(WebCore::CSSParser::parseGridAreaShorthand):
(WebCore::CSSParser::parseSingleGridAreaLonghand):
* css/CSSParser.h:
* css/StyleResolver.cpp:
(WebCore::StyleResolver::adjustRenderStyle):
(WebCore::StyleResolver::adjustGridItemPosition):
(WebCore::createGridPosition):
* css/StyleResolver.h:
* rendering/RenderGrid.cpp:
(WebCore::RenderGrid::resolveGridPositionFromStyle):
* rendering/style/GridPosition.h:
(WebCore::GridPosition::isNamedGridArea):
(WebCore::GridPosition::setNamedGridArea):
(WebCore::GridPosition::namedGridLine):

LayoutTests:

Added a couple of new tests to check that both known and unknown
named grid areas are properly handled.

Also extended some of the existing tests to use named grid areas
as any other possible grid position.

* fast/css-grid-layout/grid-item-area-get-set-expected.txt:
* fast/css-grid-layout/grid-item-area-get-set.html:
* fast/css-grid-layout/grid-item-bad-named-area-auto-placement-expected.txt: Added.
* fast/css-grid-layout/grid-item-bad-named-area-auto-placement.html: Added.
* fast/css-grid-layout/grid-item-column-row-get-set-expected.txt:
* fast/css-grid-layout/grid-item-column-row-get-set.html:
* fast/css-grid-layout/grid-item-end-after-get-set-expected.txt:
* fast/css-grid-layout/grid-item-end-after-get-set.html:
* fast/css-grid-layout/grid-item-named-grid-area-resolution-expected.txt: Added.
* fast/css-grid-layout/grid-item-named-grid-area-resolution.html: Added.
* fast/css-grid-layout/grid-item-start-before-get-set-expected.txt:
* fast/css-grid-layout/grid-item-start-before-get-set.html:
* fast/css-grid-layout/resources/grid-item-column-row-parsing-utils.js:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@158744 268f45cc-cd09-0410-ab3c-d52691b4dbfc

7 years agoAX: Audio and Video attachments are not output to VoiceOver
cfleizach@apple.com [Wed, 6 Nov 2013 14:15:42 +0000 (14:15 +0000)]
AX: Audio and Video attachments are not output to VoiceOver
https://bugs.webkit.org/show_bug.cgi?id=123479

Reviewed by Mario Sanchez Prada.

Source/WebCore:

Video and audio elements don't appear as distinct objects in the AX hierarchy,
nor are they treated as replaceable objects when emitting the text. We should
treat these characters like attachments, for one. On the Mac platform, we should
also identify them with special subroles.

Tests: platform/mac/accessibility/media-emits-object-replacement.html
       platform/mac/accessibility/media-role-descriptions.html

* accessibility/AccessibilityNodeObject.cpp:
(WebCore::AccessibilityNodeObject::isGenericFocusableElement):
* accessibility/AccessibilityObject.h:
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::computeAccessibilityIsIgnored):
(WebCore::AccessibilityRenderObject::determineAccessibilityRole):
* accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(createAccessibilityRoleMap):
(-[WebAccessibilityObjectWrapper subrole]):
(-[WebAccessibilityObjectWrapper roleDescription]):
* editing/TextIterator.cpp:
(WebCore::isRendererReplacedElement):

LayoutTests:

Making media elements int replaced elements has the unfortunate side-effect
of causing a new line to be inserted into any test using a <video> or <audio> tag.

* compositing/video/video-poster-expected.txt:
* compositing/video/video-reflection-expected.txt:
* compositing/visibility/visibility-simple-video-layer-expected.txt:
* fast/css/first-letter-block-form-controls-crash-expected.txt:
* fast/css/relative-position-replaced-in-table-display-crash-expected.txt:
* fast/forms/access-key-for-all-elements-expected.txt:
* fast/forms/form-associated-element-crash3-expected.txt:
* fast/multicol/renderer-positioned-assert-crash-expected.txt:
* fast/regions/full-screen-video-from-region-expected.txt:
* fast/runin/nonblock-runin-expected.txt:
* fast/spatial-navigation/snav-media-elements-expected.txt:
* fullscreen/full-screen-crash-offsetLeft-expected.txt:
* fullscreen/full-screen-no-style-sharing-expected.txt:
* fullscreen/full-screen-stacking-context-expected.txt:
* fullscreen/video-controls-drag-expected.txt:
* fullscreen/video-controls-timeline-expected.txt:
* fullscreen/video-cursor-auto-hide-expected.txt:
* fullscreen/video-specified-size-expected.txt:
* http/tests/appcache/video-expected.txt:
* http/tests/media/pdf-served-as-pdf-expected.txt:
* http/tests/media/reload-after-dialog-expected.txt:
* http/tests/media/text-served-as-text-expected.txt:
* http/tests/media/video-accept-encoding-expected.txt:
* http/tests/media/video-buffered-range-contains-currentTime-expected.txt:
* http/tests/media/video-cross-site-expected.txt:
* http/tests/media/video-error-abort-expected.txt:
* http/tests/media/video-load-suspend-expected.txt:
* http/tests/media/video-play-progress-expected.txt:
* http/tests/media/video-play-stall-before-meta-data-expected.txt:
* http/tests/media/video-preload-expected.txt:
* http/tests/media/video-redirect-expected.txt:
* http/tests/media/video-referer-expected.txt:
* http/tests/media/video-served-as-text-expected.txt:
* http/tests/media/video-throttled-load-metadata-expected.txt:
* http/tests/misc/empty-urls-expected.txt:
* http/tests/security/contentSecurityPolicy/media-src-allowed-expected.txt:
* http/tests/security/contentSecurityPolicy/media-src-blocked-expected.txt:
* http/tests/security/local-video-poster-from-remote-expected.txt:
* http/tests/security/local-video-source-from-remote-expected.txt:
* http/tests/security/local-video-src-from-remote-expected.txt:
* http/tests/security/text-track-crossorigin-expected.txt:
* media/W3C/audio/events/event_canplay-expected.txt:
* media/W3C/audio/events/event_canplay_manual-expected.txt:
* media/W3C/audio/events/event_canplaythrough-expected.txt:
* media/W3C/audio/events/event_canplaythrough_manual-expected.txt:
* media/W3C/audio/events/event_loadeddata-expected.txt:
* media/W3C/audio/events/event_loadeddata_manual-expected.txt:
* media/W3C/audio/events/event_loadedmetadata-expected.txt:
* media/W3C/audio/events/event_loadedmetadata_manual-expected.txt:
* media/W3C/audio/events/event_loadstart-expected.txt:
* media/W3C/audio/events/event_loadstart_manual-expected.txt:
* media/W3C/audio/events/event_order_canplay_canplaythrough-expected.txt:
* media/W3C/audio/events/event_order_canplay_playing-expected.txt:
* media/W3C/audio/events/event_order_loadedmetadata_loadeddata-expected.txt:
* media/W3C/audio/events/event_order_loadstart_progress-expected.txt:
* media/W3C/audio/events/event_pause_manual-expected.txt:
* media/W3C/audio/events/event_play-expected.txt:
* media/W3C/audio/events/event_play_manual-expected.txt:
* media/W3C/audio/events/event_playing-expected.txt:
* media/W3C/audio/events/event_playing_manual-expected.txt:
* media/W3C/audio/events/event_progress-expected.txt:
* media/W3C/audio/events/event_progress_manual-expected.txt:
* media/W3C/audio/events/event_timeupdate-expected.txt:
* media/W3C/audio/events/event_timeupdate_manual-expected.txt:
* media/W3C/audio/networkState/networkState_during_loadstart-expected.txt:
* media/W3C/audio/paused/paused_false_during_play-expected.txt:
* media/W3C/audio/paused/paused_true_during_pause-expected.txt:
* media/W3C/audio/readyState/readyState_during_canplay-expected.txt:
* media/W3C/audio/readyState/readyState_during_canplaythrough-expected.txt:
* media/W3C/audio/readyState/readyState_during_loadeddata-expected.txt:
* media/W3C/audio/readyState/readyState_during_loadedmetadata-expected.txt:
* media/W3C/audio/readyState/readyState_during_playing-expected.txt:
* media/W3C/video/canPlayType/canPlayType_application_octet_stream-expected.txt:
* media/W3C/video/canPlayType/canPlayType_application_octet_stream_with_codecs_1-expected.txt:
* media/W3C/video/canPlayType/canPlayType_application_octet_stream_with_codecs_2-expected.txt:
* media/W3C/video/canPlayType/canPlayType_application_octet_stream_with_codecs_3-expected.txt:
* media/W3C/video/canPlayType/canPlayType_bogus_type-expected.txt:
* media/W3C/video/canPlayType/canPlayType_codecs_order_1-expected.txt:
* media/W3C/video/canPlayType/canPlayType_method_exists-expected.txt:
* media/W3C/video/canPlayType/canPlayType_supported_but_no_codecs_parameter_1-expected.txt:
* media/W3C/video/canPlayType/canPlayType_two_implies_one_1-expected.txt:
* media/W3C/video/canPlayType/canPlayType_two_implies_one_2-expected.txt:
* media/W3C/video/currentSrc/currentSrc_empty_if_no_src-expected.txt:
* media/W3C/video/currentSrc/currentSrc_property_exists-expected.txt:
* media/W3C/video/error/error_null-expected.txt:
* media/W3C/video/error/error_onerror_called_on_bogus_source-expected.txt:
* media/W3C/video/error/error_property_exists-expected.txt:
* media/W3C/video/events/event_canplay-expected.txt:
* media/W3C/video/events/event_canplay_manual-expected.txt:
* media/W3C/video/events/event_canplaythrough-expected.txt:
* media/W3C/video/events/event_canplaythrough_manual-expected.txt:
* media/W3C/video/events/event_loadeddata-expected.txt:
* media/W3C/video/events/event_loadeddata_manual-expected.txt:
* media/W3C/video/events/event_loadedmetadata-expected.txt:
* media/W3C/video/events/event_loadedmetadata_manual-expected.txt:
* media/W3C/video/events/event_loadstart-expected.txt:
* media/W3C/video/events/event_loadstart_manual-expected.txt:
* media/W3C/video/events/event_order_canplay_canplaythrough-expected.txt:
* media/W3C/video/events/event_order_canplay_playing-expected.txt:
* media/W3C/video/events/event_order_loadedmetadata_loadeddata-expected.txt:
* media/W3C/video/events/event_order_loadstart_progress-expected.txt:
* media/W3C/video/events/event_pause_manual-expected.txt:
* media/W3C/video/events/event_play-expected.txt:
* media/W3C/video/events/event_play_manual-expected.txt:
* media/W3C/video/events/event_playing-expected.txt:
* media/W3C/video/events/event_playing_manual-expected.txt:
* media/W3C/video/events/event_progress-expected.txt:
* media/W3C/video/events/event_progress_manual-expected.txt:
* media/W3C/video/events/event_timeupdate-expected.txt:
* media/W3C/video/events/event_timeupdate_manual-expected.txt:
* media/W3C/video/networkState/networkState_during_loadstart-expected.txt:
* media/W3C/video/networkState/networkState_during_progress-expected.txt:
* media/W3C/video/networkState/networkState_initial-expected.txt:
* media/W3C/video/networkState/networkState_property_exists-expected.txt:
* media/W3C/video/paused/paused_false_during_play-expected.txt:
* media/W3C/video/paused/paused_true_during_pause-expected.txt:
* media/W3C/video/preload/preload_property_exists-expected.txt:
* media/W3C/video/preload/preload_reflects_auto_value-expected.txt:
* media/W3C/video/preload/preload_reflects_bogus_value-expected.txt:
* media/W3C/video/preload/preload_reflects_empty-expected.txt:
* media/W3C/video/preload/preload_reflects_metadata-expected.txt:
* media/W3C/video/preload/preload_reflects_no_value-expected.txt:
* media/W3C/video/preload/preload_reflects_none-expected.txt:
* media/W3C/video/preload/preload_reflects_none_autoplay-expected.txt:
* media/W3C/video/readyState/readyState_during_canplay-expected.txt:
* media/W3C/video/readyState/readyState_during_canplaythrough-expected.txt:
* media/W3C/video/readyState/readyState_during_loadeddata-expected.txt:
* media/W3C/video/readyState/readyState_during_loadedmetadata-expected.txt:
* media/W3C/video/readyState/readyState_during_playing-expected.txt:
* media/W3C/video/readyState/readyState_initial-expected.txt:
* media/W3C/video/readyState/readyState_property_exists-expected.txt:
* media/W3C/video/src/src_reflects_attribute_not_source_elements-expected.txt:
* media/W3C/video/src/src_reflects_no_value-expected.txt:
* media/W3C/video/src/src_removal_does_not_trigger_loadstart-expected.txt:
* media/audio-mpeg-supported-expected.txt:
* media/audio-mpeg4-supported-expected.txt:
* media/audio-only-video-intrinsic-size-expected.txt:
* media/auto-play-in-sandbox-with-allow-scripts-expected.txt:
* media/before-load-member-access-expected.txt:
* media/broken-video-expected.txt:
* media/constructors-expected.txt:
* media/controls-css-overload-expected.txt:
* media/controls-drag-timebar-expected.txt:
* media/controls-layout-direction-expected.txt:
* media/controls-right-click-on-timebar-expected.txt:
* media/csp-blocks-video-expected.txt:
* media/event-attributes-expected.txt:
* media/media-blocked-by-beforeload-expected.txt:
* media/media-blocked-by-willsendrequest-expected.txt:
* media/media-can-play-mpeg-audio-expected.txt:
* media/media-can-play-mpeg4-video-expected.txt:
* media/media-can-play-octet-stream-expected.txt:
* media/media-can-play-type-expected.txt:
* media/media-can-play-wav-audio-expected.txt:
* media/media-captions-expected.txt:
* media/media-captions-no-controls-expected.txt:
* media/media-controller-expected.txt:
* media/media-controller-playback-expected.txt:
* media/media-controller-playbackrate-expected.txt:
* media/media-controller-time-clamp-expected.txt:
* media/media-controller-time-constant-expected.txt:
* media/media-controller-time-expected.txt:
* media/media-controller-timeupdate-expected.txt:
* media/media-controller-unpause-expected.txt:
* media/media-controls-invalid-url-expected.txt:
* media/media-ended-expected.txt:
* media/media-extension-with-fragment-expected.txt:
* media/media-fragments/TC0001-expected.txt:
* media/media-fragments/TC0002-expected.txt:
* media/media-fragments/TC0003-expected.txt:
* media/media-fragments/TC0004-expected.txt:
* media/media-fragments/TC0005-expected.txt:
* media/media-fragments/TC0006-expected.txt:
* media/media-fragments/TC0009-expected.txt:
* media/media-fragments/TC0011-expected.txt:
* media/media-fragments/TC0012-expected.txt:
* media/media-fragments/TC0014-expected.txt:
* media/media-fragments/TC0015-expected.txt:
* media/media-fragments/TC0017-expected.txt:
* media/media-fragments/TC0024-expected.txt:
* media/media-fragments/TC0027-expected.txt:
* media/media-fragments/TC0028-expected.txt:
* media/media-fragments/TC0029-expected.txt:
* media/media-fragments/TC0030-expected.txt:
* media/media-fragments/TC0031-expected.txt:
* media/media-fragments/TC0032-expected.txt:
* media/media-fragments/TC0033-expected.txt:
* media/media-fragments/TC0034-expected.txt:
* media/media-fragments/TC0035-expected.txt:
* media/media-fragments/TC0036-expected.txt:
* media/media-fragments/TC0037-expected.txt:
* media/media-fragments/TC0038-expected.txt:
* media/media-fragments/TC0039-expected.txt:
* media/media-fragments/TC0044-expected.txt:
* media/media-fragments/TC0051-expected.txt:
* media/media-fragments/TC0052-expected.txt:
* media/media-fragments/TC0053-expected.txt:
* media/media-fragments/TC0054-expected.txt:
* media/media-fragments/TC0055-expected.txt:
* media/media-fragments/TC0058-expected.txt:
* media/media-fragments/TC0059-expected.txt:
* media/media-fragments/TC0061-expected.txt:
* media/media-fragments/TC0062-expected.txt:
* media/media-fragments/TC0063-expected.txt:
* media/media-fragments/TC0064-expected.txt:
* media/media-fragments/TC0065-expected.txt:
* media/media-fragments/TC0066-expected.txt:
* media/media-fragments/TC0067-expected.txt:
* media/media-fragments/TC0068-expected.txt:
* media/media-fragments/TC0069-expected.txt:
* media/media-fragments/TC0070-expected.txt:
* media/media-fragments/TC0071-expected.txt:
* media/media-fragments/TC0072-expected.txt:
* media/media-fragments/TC0073-expected.txt:
* media/media-fragments/TC0074-expected.txt:
* media/media-fragments/TC0075-expected.txt:
* media/media-fragments/TC0076-expected.txt:
* media/media-fragments/TC0077-expected.txt:
* media/media-fragments/TC0078-expected.txt:
* media/media-fragments/TC0079-expected.txt:
* media/media-fragments/TC0080-expected.txt:
* media/media-fragments/TC0081-expected.txt:
* media/media-fragments/TC0082-expected.txt:
* media/media-fragments/TC0083-expected.txt:
* media/media-fragments/TC0084-expected.txt:
* media/media-fragments/TC0085-expected.txt:
* media/media-fragments/TC0086-expected.txt:
* media/media-fragments/TC0087-expected.txt:
* media/media-fragments/TC0088-expected.txt:
* media/media-fragments/TC0089-expected.txt:
* media/media-fragments/TC0090-expected.txt:
* media/media-fragments/TC0091-expected.txt:
* media/media-fragments/TC0092-expected.txt:
* media/media-fragments/TC0093-expected.txt:
* media/media-fragments/TC0094-expected.txt:
* media/media-fullscreen-inline-expected.txt:
* media/media-preload-no-delay-loadevent-expected.txt:
* media/no-autoplay-with-user-gesture-requirement-expected.txt:
* media/nodesFromRect-shadowContent-expected.txt:
* media/restore-from-page-cache-expected.txt:
* media/sources-fallback-codecs-expected.txt:
* media/track/add-and-remove-track-expected.txt:
* media/track/audio-track-expected.txt:
* media/track/opera/interfaces/TextTrack/addCue-expected.txt:
* media/track/opera/interfaces/TextTrack/removeCue-expected.txt:
* media/track/opera/interfaces/TextTrackCue/align-expected.txt:
* media/track/opera/interfaces/TextTrackCue/endTime-expected.txt:
* media/track/opera/interfaces/TextTrackCue/id-expected.txt:
* media/track/opera/interfaces/TextTrackCue/pauseOnExit-expected.txt:
* media/track/opera/interfaces/TextTrackCue/startTime-expected.txt:
* media/track/opera/interfaces/TextTrackCue/track-expected.txt:
* media/track/opera/interfaces/TextTrackCueList/getCueById-expected.txt:
* media/track/opera/interfaces/TextTrackCueList/length-expected.txt:
* media/track/text-track-cue-is-reachable-expected.txt:
* media/track/text-track-is-reachable-expected.txt:
* media/track/track-active-cues-expected.txt:
* media/track/track-add-remove-cue-expected.txt:
* media/track/track-add-track-expected.txt:
* media/track/track-addtrack-kind-expected.txt:
* media/track/track-automatic-subtitles-expected.txt:
* media/track/track-css-all-cues-expected.txt:
* media/track/track-css-cue-lifetime-expected.txt:
* media/track/track-css-matching-default-expected.txt:
* media/track/track-css-matching-expected.txt:
* media/track/track-css-matching-lang-expected.txt:
* media/track/track-css-matching-timestamps-expected.txt:
* media/track/track-css-property-whitelist-expected.txt:
* media/track/track-css-user-override-expected.txt:
* media/track/track-cue-container-rendering-position-expected.txt:
* media/track/track-cue-empty-text-crash-expected.txt:
* media/track/track-cue-inline-assertion-crash-expected.txt:
* media/track/track-cue-mutable-expected.txt:
* media/track/track-cue-mutable-fragment-expected.txt:
* media/track/track-cue-negative-timestamp-expected.txt:
* media/track/track-cue-nothing-to-render-expected.txt:
* media/track/track-cue-overlap-snap-to-lines-not-set-expected.txt:
* media/track/track-cue-rendering-empty-cue-crash-expected.txt:
* media/track/track-cue-rendering-expected.txt:
* media/track/track-cue-rendering-on-resize-expected.txt:
* media/track/track-cue-rendering-rtl-expected.txt:
* media/track/track-cue-rendering-snap-to-lines-not-set-expected.txt:
* media/track/track-cue-rendering-tree-is-removed-properly-expected.txt:
* media/track/track-cue-rendering-with-padding-expected.txt:
* media/track/track-cues-cuechange-expected.txt:
* media/track/track-cues-enter-exit-expected.txt:
* media/track/track-cues-missed-expected.txt:
* media/track/track-cues-pause-on-exit-expected.txt:
* media/track/track-cues-seeking-expected.txt:
* media/track/track-cues-sorted-before-dispatch-expected.txt:
* media/track/track-default-attribute-expected.txt:
* media/track/track-disabled-addcue-expected.txt:
* media/track/track-disabled-expected.txt:
* media/track/track-element-load-event-expected.txt:
* media/track/track-in-band-cues-added-once-expected.txt:
* media/track/track-in-band-duplicate-tracks-when-source-changes-expected.txt:
* media/track/track-in-band-expected.txt:
* media/track/track-in-band-legacy-api-expected.txt:
* media/track/track-in-band-style-expected.txt:
* media/track/track-kind-expected.txt:
* media/track/track-large-timestamp-expected.txt:
* media/track/track-legacyapi-with-automatic-mode-expected.txt:
* media/track/track-load-from-element-readyState-expected.txt:
* media/track/track-load-from-src-readyState-expected.txt:
* media/track/track-long-captions-file-expected.txt:
* media/track/track-mode-disabled-crash-expected.txt:
* media/track/track-mode-expected.txt:
* media/track/track-mode-not-changed-by-new-track-expected.txt:
* media/track/track-mode-triggers-loading-expected.txt:
* media/track/track-remove-active-cue-crash-expected.txt:
* media/track/track-remove-by-setting-innerHTML-expected.txt:
* media/track/track-remove-quickly-expected.txt:
* media/track/track-text-track-cue-list-expected.txt:
* media/track/track-texttracks-expected.txt:
* media/track/track-webvtt-tc000-empty-expected.txt:
* media/track/track-webvtt-tc001-utf8-expected.txt:
* media/track/track-webvtt-tc002-bom-expected.txt:
* media/track/track-webvtt-tc003-newlines-expected.txt:
* media/track/track-webvtt-tc004-magic-header-expected.txt:
* media/track/track-webvtt-tc005-header-comment-expected.txt:
* media/track/track-webvtt-tc006-cue-identifiers-expected.txt:
* media/track/track-webvtt-tc007-cue-no-id-expected.txt:
* media/track/track-webvtt-tc008-timings-no-hours-expected.txt:
* media/track/track-webvtt-tc009-timings-hour-expected.txt:
* media/track/track-webvtt-tc010-no-timings-expected.txt:
* media/track/track-webvtt-tc011-blank-lines-expected.txt:
* media/track/track-webvtt-tc013-settings-expected.txt:
* media/track/track-webvtt-tc014-alignment-expected.txt:
* media/track/track-webvtt-tc015-positioning-expected.txt:
* media/track/track-webvtt-tc016-align-positioning-expected.txt:
* media/track/track-webvtt-tc017-line-position-expected.txt:
* media/track/track-webvtt-tc018-align-text-line-position-expected.txt:
* media/track/track-webvtt-tc019-cue-size-expected.txt:
* media/track/track-webvtt-tc020-cue-size-align-expected.txt:
* media/track/track-webvtt-tc021-valign-expected.txt:
* media/track/track-webvtt-tc022-entities-expected.txt:
* media/track/track-webvtt-tc023-markup-expected.txt:
* media/track/track-webvtt-tc024-timestamp-expected.txt:
* media/track/track-webvtt-tc025-class-markup-expected.txt:
* media/track/track-webvtt-tc026-voice-expected.txt:
* media/track/track-webvtt-tc027-empty-cue-expected.txt:
* media/track/track-webvtt-tc028-unsupported-markup-expected.txt:
* media/track/track-word-breaking-expected.txt:
* media/track/tracklist-is-reachable-expected.txt:
* media/track/video-track-expected.txt:
* media/unsupported-rtsp-expected.txt:
* media/unsupported-tracks-expected.txt:
* media/video-append-source-expected.txt:
* media/video-autoplay-expected.txt:
* media/video-beforeload-remove-source-expected.txt:
* media/video-buffered-expected.txt:
* media/video-canvas-drawing-expected.txt:
* media/video-canvas-drawing-output-expected.txt:
* media/video-controls-captions-trackmenu-hide-on-click-outside-expected.txt:
* media/video-controls-captions-trackmenu-includes-enabled-track-expected.txt:
* media/video-controls-expected.txt:
* media/video-controls-transformed-expected.txt:
* media/video-controls-with-mutation-event-handler-expected.txt:
* media/video-controls-zoomed-expected.txt:
* media/video-currentTime-delay-expected.txt:
* media/video-currentTime-expected.txt:
* media/video-currentTime-set-expected.txt:
* media/video-currentTime-set2-expected.txt:
* media/video-delay-load-event-expected.txt:
* media/video-display-aspect-ratio-expected.txt:
* media/video-dom-autoplay-expected.txt:
* media/video-dom-preload-expected.txt:
* media/video-dom-src-expected.txt:
* media/video-duration-known-after-eos-expected.txt:
* media/video-error-does-not-exist-expected.txt:
* media/video-load-networkState-expected.txt:
* media/video-load-preload-metadata-expected.txt:
* media/video-load-preload-none-expected.txt:
* media/video-load-readyState-expected.txt:
* media/video-load-require-user-gesture-expected.txt:
* media/video-loop-expected.txt:
* media/video-mouse-focus-expected.txt:
* media/video-muted-expected.txt:
* media/video-no-autoplay-expected.txt:
* media/video-pause-empty-events-expected.txt:
* media/video-pause-immediately-expected.txt:
* media/video-play-empty-events-expected.txt:
* media/video-play-pause-events-expected.txt:
* media/video-play-pause-exception-expected.txt:
* media/video-play-require-user-gesture-expected.txt:
* media/video-playbackrate-expected.txt:
* media/video-played-collapse-expected.txt:
* media/video-played-ranges-1-expected.txt:
* media/video-played-reset-expected.txt:
* media/video-plays-past-end-of-test-expected.txt:
* media/video-poster-blocked-by-willsendrequest-expected.txt:
* media/video-poster-delayed-expected.txt:
* media/video-poster-expected.txt:
* media/video-poster-scale-expected.txt:
* media/video-preload-expected.txt:
* media/video-replaces-poster-expected.txt:
* media/video-reverse-play-duration-expected.txt:
* media/video-seek-after-end-expected.txt:
* media/video-seek-by-small-increment-expected.txt:
* media/video-seek-multiple-expected.txt:
* media/video-seek-no-src-exception-expected.txt:
* media/video-seek-past-end-playing-expected.txt:
* media/video-seekable-expected.txt:
* media/video-seeking-expected.txt:
* media/video-set-rate-from-pause-expected.txt:
* media/video-single-valid-source-expected.txt:
* media/video-size-expected.txt:
* media/video-source-error-expected.txt:
* media/video-source-error-no-candidate-expected.txt:
* media/video-source-expected.txt:
* media/video-source-inserted-expected.txt:
* media/video-source-load-expected.txt:
* media/video-source-none-supported-expected.txt:
* media/video-source-type-expected.txt:
* media/video-src-blob-expected.txt:
* media/video-src-change-expected.txt:
* media/video-src-empty-expected.txt:
* media/video-src-expected.txt:
* media/video-src-invalid-poster-expected.txt:
* media/video-src-invalid-remove-expected.txt:
* media/video-src-none-expected.txt:
* media/video-src-plus-source-expected.txt:
* media/video-src-remove-expected.txt:
* media/video-src-set-expected.txt:
* media/video-src-source-expected.txt:
* media/video-timeupdate-during-playback-expected.txt:
* media/video-timeupdate-reverse-play-expected.txt:
* media/video-volume-expected.txt:
* media/video-width-height-expected.txt:
* platform/mac/accessibility/media-element-expected.txt:
* platform/mac/accessibility/media-emits-object-replacement-expected.txt: Added.
* platform/mac/accessibility/media-emits-object-replacement.html: Added.
* platform/mac/accessibility/media-role-descriptions-expected.txt: Added.
* platform/mac/accessibility/media-role-descriptions.html: Added.
* platform/mac/compositing/video/video-object-fit-expected.txt:
* platform/mac/fullscreen/video-controls-override-expected.txt:
* platform/mac/media/media-can-play-wav-audio-expected.txt:
* platform/mac/media/media-can-play-webm-expected.txt:
* platform/mac/media/video-seek-past-end-paused-expected.txt:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@158743 268f45cc-cd09-0410-ab3c-d52691b4dbfc

7 years ago[ATK] Implement tables-related attributesOf*() functions for AccessibilityUIElement
commit-queue@webkit.org [Wed, 6 Nov 2013 13:55:36 +0000 (13:55 +0000)]
[ATK] Implement tables-related attributesOf*() functions for AccessibilityUIElement
https://bugs.webkit.org/show_bug.cgi?id=118969

Patch by Krzysztof Czech <k.czech@samsung.com> on 2013-11-06
Reviewed by Mario Sanchez Prada.

Added missing implementation of attributesOfColumnHeaders, attributesOfRowHeaders, attributesOfVisibleCells.

* DumpRenderTree/atk/AccessibilityUIElementAtk.cpp:
(AccessibilityUIElement::attributesOfChildren):
(AccessibilityUIElement::attributesOfColumnHeaders):
(AccessibilityUIElement::attributesOfRowHeaders):
(AccessibilityUIElement::attributesOfVisibleCells):
* WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp:
(WTR::AccessibilityUIElement::attributesOfChildren):
(WTR::AccessibilityUIElement::attributesOfColumnHeaders):
(WTR::AccessibilityUIElement::attributesOfRowHeaders):
(WTR::AccessibilityUIElement::attributesOfVisibleCells):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@158742 268f45cc-cd09-0410-ab3c-d52691b4dbfc

7 years ago[ATK] accessibility/tabindex-elements-are-accessible.html is failing
commit-queue@webkit.org [Wed, 6 Nov 2013 11:31:12 +0000 (11:31 +0000)]
[ATK] accessibility/tabindex-elements-are-accessible.html is failing
https://bugs.webkit.org/show_bug.cgi?id=123884

Patch by Krzysztof Czech <k.czech@samsung.com> on 2013-11-06
Reviewed by Mario Sanchez Prada.

Added new accessibility expectation file. ATK represents paragraph's role as a ATK_ROLE_PARAGRAPH.

* platform/efl/TestExpectations: Test is no longer failing.
* platform/efl/accessibility/tabindex-elements-are-accessible-expected.txt: Added.
* platform/gtk/accessibility/tabindex-elements-are-accessible-expected.txt: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@158741 268f45cc-cd09-0410-ab3c-d52691b4dbfc

7 years agoUnreviewed GTK gardening. Tests failing after r158195
mario@webkit.org [Wed, 6 Nov 2013 11:17:45 +0000 (11:17 +0000)]
Unreviewed GTK gardening. Tests failing after r158195

* platform/gtk/TestExpectations: Added failure expectations.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@158740 268f45cc-cd09-0410-ab3c-d52691b4dbfc

7 years agoNotify nodes removal to Range/Selection after dispatching blur and mutation event
rniwa@webkit.org [Wed, 6 Nov 2013 11:11:07 +0000 (11:11 +0000)]
Notify nodes removal to Range/Selection after dispatching blur and mutation event
https://bugs.webkit.org/show_bug.cgi?id=123880

Reviewed by Andreas Kling.

Source/WebCore:

Merge https://chromium.googlesource.com/chromium/blink/+/b60576a0560d14f8757e58d55d37b7cefa48a6ac

In willRemoveChildren in ContainerNode.cpp, call Document::nodeChildrenWillBeRemoved after instead of
before dispatching mutation events because we need to update ranges created by those mutation event
listeners. willRemoveChild was fixed in r115686.

Tests: editing/selection/selection-change-in-blur-event-by-remove-children.html
       editing/selection/selection-change-in-mutation-event-by-remove-children.html
       fast/dom/Range/range-created-during-remove-children.html

* dom/ContainerNode.cpp:
(WebCore::willRemoveChildren):

LayoutTests:

* editing/selection/selection-change-in-blur-event-by-remove-children-expected.txt: Added.
* editing/selection/selection-change-in-blur-event-by-remove-children.html: Added.
* editing/selection/selection-change-in-mutation-event-by-remove-children-expected.txt: Added.
* editing/selection/selection-change-in-mutation-event-by-remove-children.html: Added.
* fast/dom/Range/range-created-during-remove-children-expected.txt: Added.
* fast/dom/Range/range-created-during-remove-children.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@158739 268f45cc-cd09-0410-ab3c-d52691b4dbfc

7 years agoFix out-of-date offset in selection range code in range.surroundContents
rniwa@webkit.org [Wed, 6 Nov 2013 10:55:08 +0000 (10:55 +0000)]
Fix out-of-date offset in selection range code in range.surroundContents
https://bugs.webkit.org/show_bug.cgi?id=123871

Source/WebCore:

Reviewed by Andreas Kling.

Merge https://chromium.googlesource.com/chromium/blink/+/c89b413ff0fc4aafa0c71d180b0b1e131bb37707

The code in Range::insertNode assumeed that the start offset of the selection range within its container
doesn't change across a call to insertBefore on the container but this is wrong. This patch recomputes
the start offset when it is used after the insertBefore call.

Test: editing/selection/range-surroundContents-with-preceding-node.html

* dom/Range.cpp:
(WebCore::Range::insertNode):

LayoutTests:

Reviewed by Andreas Kling.

* editing/selection/range-surroundContents-with-preceding-node-expected.txt: Added.
* editing/selection/range-surroundContents-with-preceding-node.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@158738 268f45cc-cd09-0410-ab3c-d52691b4dbfc

7 years ago[GTK] accessibility/svg-group-element-with-title.html is failing
commit-queue@webkit.org [Wed, 6 Nov 2013 10:33:02 +0000 (10:33 +0000)]
[GTK] accessibility/svg-group-element-with-title.html is failing
https://bugs.webkit.org/show_bug.cgi?id=114251

Unreviewed GTK gardening.

Removed failure expectation as the test is passing since r158664.

Patch by Robert Plociennik <r.plociennik@samsung.com> on 2013-11-06

* platform/gtk/TestExpectations: The test is no longer failing.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@158737 268f45cc-cd09-0410-ab3c-d52691b4dbfc

7 years agoAdd InlineElementBox and stop instantiating InlineBox directly.
akling@apple.com [Wed, 6 Nov 2013 10:26:56 +0000 (10:26 +0000)]
Add InlineElementBox and stop instantiating InlineBox directly.
<https://webkit.org/b/123882>

Make the InlineBox constructors protected and add a new class
called InlineElementBox on top. This is somewhat analogous to the
split between RenderText and RenderElement, and allows us to make
renderer() return a far tighter RenderBoxModelObject& instead
of a RenderObject&.

Moved over attachLine(), deleteLine() and extractLine() to start
things off. More things will follow.

Reviewed by Antti Koivisto.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@158736 268f45cc-cd09-0410-ab3c-d52691b4dbfc

7 years ago[EFL] Change required version of ATK to 2.10.0
commit-queue@webkit.org [Wed, 6 Nov 2013 10:21:26 +0000 (10:21 +0000)]
[EFL] Change required version of ATK to 2.10.0
https://bugs.webkit.org/show_bug.cgi?id=123883

Patch by Krzysztof Czech <k.czech@samsung.com> on 2013-11-06
Reviewed by Mario Sanchez Prada.

Changing a required version of ATK to 2.10.0

* Source/cmake/OptionsEfl.cmake:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@158735 268f45cc-cd09-0410-ab3c-d52691b4dbfc

7 years agoSource/WebCore: Seek for video doesn't work when playback rate is negative
commit-queue@webkit.org [Wed, 6 Nov 2013 09:32:26 +0000 (09:32 +0000)]
Source/WebCore: Seek for video doesn't work when playback rate is negative
https://bugs.webkit.org/show_bug.cgi?id=123791

In MediaPlayerPrivateGStreamer::seek negative playback rate was not taken to account.

Patch by Piotr Grad <p.grad@samsung.com> on 2013-11-06
Reviewed by Philippe Normand.

Test: media/video-seek-with-negative-playback.html

* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::MediaPlayerPrivateGStreamer::seek):

LayoutTests: Test for seek not working properly with negative playback rate.
https://bugs.webkit.org/show_bug.cgi?id=123791

Seek method should work properly with negative playback rate.

Patch by Piotr Grad <p.grad@samsung.com> on 2013-11-06
Reviewed by Philippe Normand.

* media/video-seek-with-negative-playback.html: Added.
* media/video-seek-with-negative-playback-expected.txt: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@158734 268f45cc-cd09-0410-ab3c-d52691b4dbfc

7 years agoReinstate an annoying assertion that I accidentally commented out.
akling@apple.com [Wed, 6 Nov 2013 08:19:38 +0000 (08:19 +0000)]
Reinstate an annoying assertion that I accidentally commented out.

* loader/icon/IconDatabase.cpp:
(WebCore::IconDatabase::synchronousIconForPageURL):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@158733 268f45cc-cd09-0410-ab3c-d52691b4dbfc

7 years ago[GStreamer] Override label() and language() in Audio and VideoTrackPrivateGStreamer
commit-queue@webkit.org [Wed, 6 Nov 2013 08:14:46 +0000 (08:14 +0000)]
[GStreamer] Override label() and language() in Audio and VideoTrackPrivateGStreamer
https://bugs.webkit.org/show_bug.cgi?id=123836

The tests are currently flakey because we only get the label and language if we get
tags after the track client is set.

Patch by Brendan Long <b.long@cablelabs.com> on 2013-11-06
Reviewed by Philippe Normand.

No new tests because the tests already exist (this fixes flakeyness).

* platform/graphics/gstreamer/AudioTrackPrivateGStreamer.h: Override label() and language() to use m_label and m_language.
* platform/graphics/gstreamer/VideoTrackPrivateGStreamer.h: Same.
* platform/graphics/gstreamer/TrackPrivateBaseGStreamer.h: Make m_label and m_language protected so they can be used in the functions above.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@158732 268f45cc-cd09-0410-ab3c-d52691b4dbfc

7 years agoAdd a test for queries whose leftmost selector matches the root node
rniwa@webkit.org [Wed, 6 Nov 2013 08:13:33 +0000 (08:13 +0000)]
Add a test for queries whose leftmost selector matches the root node
https://bugs.webkit.org/show_bug.cgi?id=123877

Reviewed by Andreas Kling.

Merge https://chromium.googlesource.com/chromium/blink/+/22981c70bf93e8a07ee7b4d68a4522aee21b26ce
so that we won't introduce the regression they had.

* fast/selectors/querySelector-leftmost-selector-matches-rootNode-expected.txt: Added.
* fast/selectors/querySelector-leftmost-selector-matches-rootNode.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@158731 268f45cc-cd09-0410-ab3c-d52691b4dbfc

7 years agoRenderBlockFlow should only expose its line boxes as RootInlineBox.
akling@apple.com [Wed, 6 Nov 2013 08:09:44 +0000 (08:09 +0000)]
RenderBlockFlow should only expose its line boxes as RootInlineBox.
<https://webkit.org/b/123878>

The line boxes attached directly to a RenderBlockFlow are always
RootInlineBox objects, so call sites should always use the tightly
typed firstRootBox() and lastRootBox().

This allows the compiler to devirtualize calls to member functions
of RootInlineBox that are marked FINAL.

Reviewed by Antti Koivisto.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@158730 268f45cc-cd09-0410-ab3c-d52691b4dbfc

7 years agoAssertion failure end < m_runCount in WebCore::BidiRunList<WebCore::BidiRun>::reverseRuns
rniwa@webkit.org [Wed, 6 Nov 2013 08:05:09 +0000 (08:05 +0000)]
Assertion failure end < m_runCount in WebCore::BidiRunList<WebCore::BidiRun>::reverseRuns
https://bugs.webkit.org/show_bug.cgi?id=123863

Reviewed by Andreas Kling.

Source/WebCore:

Merge https://chromium.googlesource.com/chromium/blink/+/cbaa92c763a37d89eeabd01658e522219299290c

Test: fast/text/bidi-reverse-runs-crash.html

* platform/text/BidiResolver.h:
(WebCore::BidiResolver<Iterator, Run>::createBidiRunsForLine): Don't reverse the runs if there's
nothing to be reversed.

LayoutTests:

* fast/text/bidi-reverse-runs-crash-expected.txt: Added.
* fast/text/bidi-reverse-runs-crash.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@158729 268f45cc-cd09-0410-ab3c-d52691b4dbfc

7 years agoAddress the review comment after r158724.
rniwa@webkit.org [Wed, 6 Nov 2013 08:02:18 +0000 (08:02 +0000)]
Address the review comment after r158724.

* html/RangeInputType.cpp:
(WebCore::RangeInputType::handleMouseDownEvent):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@158728 268f45cc-cd09-0410-ab3c-d52691b4dbfc

7 years agoWidget's position change should not initiate layout, only when its size changes.
zalan@apple.com [Wed, 6 Nov 2013 07:31:52 +0000 (07:31 +0000)]
Widget's position change should not initiate layout, only when its size changes.
https://bugs.webkit.org/show_bug.cgi?id=123860

Reviewed by Andreas Kling.

RenderWidgets initiate unnecessary layouts while scrolling when they are embedded to
overflow:scroll containers. Scroll position change doesn't dirty the render tree
so it should not trigger layout either.

.:

* ManualTests/layouts-on-renderwidgets-while-scrolling.html: Added.

Source/WebCore:

Manual test added. Unfortunately we can't test against the number of layouts yet.

* rendering/RenderWidget.cpp:
(WebCore::RenderWidget::setWidgetGeometry):
(WebCore::RenderWidget::updateWidgetGeometry):
(WebCore::RenderWidget::updateWidgetPosition):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@158727 268f45cc-cd09-0410-ab3c-d52691b4dbfc

7 years agoAdd more tests for formaction, formenctype, formmethod, formnovalidate, and formtarge...
rniwa@webkit.org [Wed, 6 Nov 2013 07:30:55 +0000 (07:30 +0000)]
Add more tests for formaction, formenctype, formmethod, formnovalidate, and formtarget attributes
https://bugs.webkit.org/show_bug.cgi?id=123876

Reviewed by Andreas Kling.

Merge tests from https://chromium.googlesource.com/chromium/blink/+/5f4ccd416fec39a6878af66e87bda191cc59ea7e
so that we won't introduce regressions they had.

* fast/forms/formaction-attribute-expected.txt:
* fast/forms/formaction-attribute.html:
* fast/forms/formmethod-attribute-input-2-expected.txt: Added.
* fast/forms/formmethod-attribute-input-2.html: Added.
* fast/forms/formtarget-attribute-input-2-expected.txt: Added.
* fast/forms/formtarget-attribute-input-2.html: Added.
* fast/forms/interactive-validation-formnovalidate-2-expected.txt: Added.
* fast/forms/interactive-validation-formnovalidate-2.html: Added.
* fast/forms/mailto/formenctype-attribute-input-2-expected.txt: Added.
* fast/forms/mailto/formenctype-attribute-input-2.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@158726 268f45cc-cd09-0410-ab3c-d52691b4dbfc

7 years agoMac Mavericks rebaseline after r158714.
rniwa@webkit.org [Wed, 6 Nov 2013 07:20:02 +0000 (07:20 +0000)]
Mac Mavericks rebaseline after r158714.

* platform/mac/fast/forms/textAreaLineHeight-expected.txt:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@158725 268f45cc-cd09-0410-ab3c-d52691b4dbfc

7 years agoUse-after-free in SliderThumbElement::dragFrom
rniwa@webkit.org [Wed, 6 Nov 2013 07:11:31 +0000 (07:11 +0000)]
Use-after-free in SliderThumbElement::dragFrom
https://bugs.webkit.org/show_bug.cgi?id=123873

Reviewed by Andreas Kling.

Source/WebCore:

Ref the SliderThumbElement since it could go away inside dragFrom.

Test: fast/forms/range/range-type-change-onchange-2.html

* html/RangeInputType.cpp:
(WebCore::RangeInputType::handleMouseDownEvent):

LayoutTests:

Merge https://chromium.googlesource.com/chromium/blink/+/04a23bfca2d04101a1828d36ff36c29f3a24f34b

* fast/forms/range/range-type-change-onchange-2-expected.txt: Added.
* fast/forms/range/range-type-change-onchange-2.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@158724 268f45cc-cd09-0410-ab3c-d52691b4dbfc

7 years agoChange the order of conditions to avoid computing rendererIsEditable()
rniwa@webkit.org [Wed, 6 Nov 2013 06:14:47 +0000 (06:14 +0000)]
Change the order of conditions to avoid computing rendererIsEditable()
https://bugs.webkit.org/show_bug.cgi?id=123868

Reviewed by Andreas Kling.

Merge https://chromium.googlesource.com/chromium/blink/+/c89b413ff0fc4aafa0c71d180b0b1e131bb37707

When we need both Node::renderer() and Node::rendererIsEditable() conditions to be true to perform
some operation, it is more effective to check for renderer() first, so that if this condition fails
we can avoid unnecessary computation of rendererIsEditable().

* dom/Position.cpp:
(WebCore::nextRenderedEditable):
(WebCore::previousRenderedEditable):
* page/EventHandler.cpp:
(WebCore::EventHandler::handleMouseReleaseEvent):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@158723 268f45cc-cd09-0410-ab3c-d52691b4dbfc

7 years agosimpleUserAgentStyleSheet doesn't have focus ring on anchor element
rniwa@webkit.org [Wed, 6 Nov 2013 06:02:35 +0000 (06:02 +0000)]
simpleUserAgentStyleSheet doesn't have focus ring on anchor element
https://bugs.webkit.org/show_bug.cgi?id=123867

Reviewed by Andreas Kling.

Merge https://chromium.googlesource.com/chromium/blink/+/08ecc23c4d80be9969918c4baf0ac83dc6cb6cbd

* css/CSSDefaultStyleSheets.cpp:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@158722 268f45cc-cd09-0410-ab3c-d52691b4dbfc

7 years agovalueForBorderRadiusShorthand returns wrong values in some case
rniwa@webkit.org [Wed, 6 Nov 2013 06:00:46 +0000 (06:00 +0000)]
valueForBorderRadiusShorthand returns wrong values in some case
https://bugs.webkit.org/show_bug.cgi?id=123866

Reviewed by Andreas Kling.

Source/WebCore:

Merge https://chromium.googlesource.com/chromium/blink/+/0933728126f2db06ab8e945efc98bffa2d42af1c

Because valueForBorderRadiusShorthand misses the followings:
- showHorizontalBottomRight depends on showHorizontalBottomLeft.
- showHorizontalTopRight depends on showHorizontalBottomRight (including showHorizontalBottomLeft).

See also http://dev.w3.org/csswg/css-backgrounds/#the-border-radius

Test: fast/css/getComputedStyle/getComputedStyle-borderRadius-2.html

* css/CSSComputedStyleDeclaration.cpp:
(WebCore::getBorderRadiusShorthandValue):

LayoutTests:

* fast/css/getComputedStyle/getComputedStyle-borderRadius-2-expected.txt: Added.
* fast/css/getComputedStyle/getComputedStyle-borderRadius-2.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@158721 268f45cc-cd09-0410-ab3c-d52691b4dbfc

7 years agoFlaky Test: transitions/cancel-transition.html
rniwa@webkit.org [Wed, 6 Nov 2013 05:50:35 +0000 (05:50 +0000)]
Flaky Test: transitions/cancel-transition.html
https://bugs.webkit.org/show_bug.cgi?id=114193

Reviewed by Simon Fraser.

Merge https://chromium.googlesource.com/chromium/blink/+/983dbbff6c46b6365540bf1451f25b31d72ce893

* transitions/cancel-transition.html:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@158720 268f45cc-cd09-0410-ab3c-d52691b4dbfc

7 years agoProtect DOM nodes in IndentOutdentCommand::tryIndentingAsListItem()
rniwa@webkit.org [Wed, 6 Nov 2013 05:21:42 +0000 (05:21 +0000)]
Protect DOM nodes in IndentOutdentCommand::tryIndentingAsListItem()
https://bugs.webkit.org/show_bug.cgi?id=123861

Reviewed by Benjamin Poulain.

Merge https://chromium.googlesource.com/chromium/blink/+/297442eb539a2b764fdad323de79099a70179186 partially.

* editing/IndentOutdentCommand.cpp:
(WebCore::IndentOutdentCommand::tryIndentingAsListItem): Make selectedListItem, previousList, and nextList
RefPtr since they're are used after calling insertNodeBefore.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@158719 268f45cc-cd09-0410-ab3c-d52691b4dbfc

7 years agoApply more unique_ptr to line box management.
akling@apple.com [Wed, 6 Nov 2013 04:47:12 +0000 (04:47 +0000)]
Apply more unique_ptr to line box management.
<https://webkit.org/b/123857>

Make all of the functions that return newly-created line boxes
return them packed up in std::unique_ptrs.

There is one exception in RenderBlockLineLayout where the function
createInlineBoxForRenderer() is inconsistent about the ownership of
the returned object. This will be addressed by a subsequent patch.

We now "release" the line boxes into their various home structures,
so the pointer smartness doesn't go end-to-end just yet.

Reviewed by Anders Carlsson.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@158718 268f45cc-cd09-0410-ab3c-d52691b4dbfc

7 years agoFTL should support NewObject
fpizlo@apple.com [Wed, 6 Nov 2013 04:40:02 +0000 (04:40 +0000)]
FTL should support NewObject
https://bugs.webkit.org/show_bug.cgi?id=123849

Reviewed by Oliver Hunt.

* ftl/FTLAbstractHeapRepository.cpp:
(JSC::FTL::AbstractHeapRepository::AbstractHeapRepository):
* ftl/FTLAbstractHeapRepository.h:
* ftl/FTLCapabilities.cpp:
(JSC::FTL::canCompile):
* ftl/FTLIntrinsicRepository.h:
* ftl/FTLLowerDFGToLLVM.cpp:
(JSC::FTL::LowerDFGToLLVM::compileNode):
(JSC::FTL::LowerDFGToLLVM::compileNewObject):
(JSC::FTL::LowerDFGToLLVM::allocate):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@158717 268f45cc-cd09-0410-ab3c-d52691b4dbfc

7 years agoFTL should support StringCharAt
fpizlo@apple.com [Wed, 6 Nov 2013 04:38:23 +0000 (04:38 +0000)]
FTL should support StringCharAt
https://bugs.webkit.org/show_bug.cgi?id=123855

Reviewed by Oliver Hunt.

This is just like GetByVal for String, so we reuse that code.

* ftl/FTLCapabilities.cpp:
(JSC::FTL::canCompile):
* ftl/FTLLowerDFGToLLVM.cpp:
(JSC::FTL::LowerDFGToLLVM::compileNode):
(JSC::FTL::LowerDFGToLLVM::compileGetByVal):
(JSC::FTL::LowerDFGToLLVM::compileStringCharAt):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@158716 268f45cc-cd09-0410-ab3c-d52691b4dbfc

7 years agoWindows build fix attempt after r158704.
rniwa@webkit.org [Wed, 6 Nov 2013 03:59:43 +0000 (03:59 +0000)]
Windows build fix attempt after r158704.

* FullscreenVideoController.cpp:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@158715 268f45cc-cd09-0410-ab3c-d52691b4dbfc

7 years agogetComputedStyle(x).lineHeight is affected by zooming
rniwa@webkit.org [Wed, 6 Nov 2013 03:55:02 +0000 (03:55 +0000)]
getComputedStyle(x).lineHeight is affected by zooming
https://bugs.webkit.org/show_bug.cgi?id=123847

Reviewed by Benjamin Poulain.

Source/WebCore:

Merge https://chromium.googlesource.com/chromium/blink/+/7957097afbab2899ababd0d9c8acbf6e3eddb870

Test: fast/css/line-height-zoom-get-computed-style.html

* css/CSSComputedStyleDeclaration.cpp:
(WebCore::lineHeightFromStyle): Don't round line-height values.
* css/DeprecatedStyleBuilder.cpp:
(WebCore::ApplyPropertyLineHeight::applyValue): Use the computed value instead of the used value.

LayoutTests:

Cleaned up the test.

* fast/css/line-height-zoom-get-computed-style-expected.txt: Added.
* fast/css/line-height-zoom-get-computed-style.html: Added.
* platform/mac-mountainlion/fast/forms/textAreaLineHeight-expected.txt: Rebaselined.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@158714 268f45cc-cd09-0410-ab3c-d52691b4dbfc

7 years agoAX: media controls accessibility needs more work
commit-queue@webkit.org [Wed, 6 Nov 2013 03:50:51 +0000 (03:50 +0000)]
AX: media controls accessibility needs more work
https://bugs.webkit.org/show_bug.cgi?id=123749

Patch by James Craig <jcraig@apple.com> on 2013-11-05
Reviewed by Jer Noble.

Updated some of the control labels/roles to improve accessibility.
  - Volume slider is now keyboard/screenreader accessible.
  - muteButton was a checkbox toggling checked state, now a button that toggles label "mute/unmute"
  - fullscreenButton was a checkbox toggling checked state, now a button that toggles label "display/exit full screen"
  - captionButton was a checkbox, now a popup button that launches the newly accessible menu.
Subtitles menu is now keyboard/screenreader accessible (uses roaming tabindex).
Render dump expectations changed because volume slider is now hidden via...
...opacity/size (to make accessible without hover) instead of display:none.

Updated existing test coverage.

Source/WebCore:

* Modules/mediacontrols/mediaControlsApple.css:
(audio::-webkit-media-controls-panel .volume-box):
(audio::-webkit-media-controls-panel .volume-box:active):
(audio::-webkit-media-controls-toggle-closed-captions-button):
(audio::-webkit-media-controls-closed-captions-container .list):
(audio::-webkit-media-controls-closed-captions-container li:focus):
* Modules/mediacontrols/mediaControlsApple.js:
(Controller.prototype.createControls):
(Controller.prototype.handleFullscreenChange):
(Controller.prototype.handleMuteButtonClicked):
(Controller.prototype.handleMinButtonClicked):
(Controller.prototype.handleMaxButtonClicked):
(Controller.prototype.handleVolumeSliderChange):
(Controller.prototype.buildCaptionMenu):
(Controller.prototype.focusSiblingCaptionItem):
(Controller.prototype.handleCaptionItemKeyUp):

LayoutTests:

* platform/mac/accessibility/media-element-expected.txt:
* platform/mac/media/audio-controls-rendering-expected.txt:
* platform/mac/media/controls-after-reload-expected.txt:
* platform/mac/media/controls-strict-expected.txt:
* platform/mac/media/controls-styling-strict-expected.txt:
* platform/mac/media/controls-without-preload-expected.txt:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@158713 268f45cc-cd09-0410-ab3c-d52691b4dbfc

7 years agoMove some plugin-specific code from RenderWidget to RenderEmbeddedObject.
akling@apple.com [Wed, 6 Nov 2013 03:36:32 +0000 (03:36 +0000)]
Move some plugin-specific code from RenderWidget to RenderEmbeddedObject.
<https://webkit.org/b/123845>

All RenderWidgets representing plugins will be RenderEmbeddedObjects.
Move some of the plugin-specific logic to RenderEmbeddedObject since it
doesn't make sense for all RenderWidgets (frames, embedded documents)
to care about this.

Reviewed by Anders Carlsson.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@158712 268f45cc-cd09-0410-ab3c-d52691b4dbfc

7 years agoAdd a test to obtain offsetWidth of expanded table cell
rniwa@webkit.org [Wed, 6 Nov 2013 02:48:49 +0000 (02:48 +0000)]
Add a test to obtain offsetWidth of expanded table cell
https://bugs.webkit.org/show_bug.cgi?id=123843

Reviewed by Tim Horton.

Merge the test fix in https://chromium.googlesource.com/chromium/blink/+/b249d552497c0939d8277360b99dd3c56b0c9659.

* fast/table/table-cell-offset-width-expected.txt:
* fast/table/table-cell-offset-width.html:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@158711 268f45cc-cd09-0410-ab3c-d52691b4dbfc

7 years agoAdd a test to obtain offsetWidth of expanded table cell
rniwa@webkit.org [Wed, 6 Nov 2013 02:40:07 +0000 (02:40 +0000)]
Add a test to obtain offsetWidth of expanded table cell
https://bugs.webkit.org/show_bug.cgi?id=123843

Reviewed by Tim Horton.

Merge the test from https://chromium.googlesource.com/chromium/blink/+/58a5fac292a5b3f79b00cdc71074fbf8be2ebc2b
so that we'll never introduce the regression they had.

* fast/table/table-cell-offset-width-expected.txt: Added.
* fast/table/table-cell-offset-width.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@158710 268f45cc-cd09-0410-ab3c-d52691b4dbfc

7 years agoFix the 32-bit build.
timothy_horton@apple.com [Wed, 6 Nov 2013 02:39:39 +0000 (02:39 +0000)]
Fix the 32-bit build.

* WebCore.exp.in:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@158709 268f45cc-cd09-0410-ab3c-d52691b4dbfc

7 years agoWeb Inspector: Moving an element while in the DOMNodeRemoved handler will hide it...
achicu@adobe.com [Wed, 6 Nov 2013 02:15:50 +0000 (02:15 +0000)]
Web Inspector: Moving an element while in the DOMNodeRemoved handler will hide it in the inspector
https://bugs.webkit.org/show_bug.cgi?id=123516

Reviewed by Timothy Hatcher.

Source/WebCore:

InspectorInstrumentation::willRemoveDOMNode was actually calling both willRemoveDOMNodeImpl and
didRemoveDOMNodeImpl, making the DOMAgent unbind the element even if it was still part of the DOM.

Because of that the DOMAgent was sending two events:
1. When the element was about to be removed, just before JS "DOMNodeRemoved" was triggered.
2. When the element was actually removed.

Note that inspector's event #2 will not know about the node, as it just removed it from the
internal hashmap, so it will just use a nodeID == 0 for it.

This patch adds a separate call to InspectorInstrumentation::didRemoveDOMNode, just before the
element is about to be removed. The InspectorInstrumentation::willRemoveDOMNode call is now only used
by the DOMDebugger to trigger the DOM breakpoints in the Web Inspector. That feature is not exposed
in the new Inspector UI, but can be used/tested using the protocol directly.

Tests: inspector-protocol/dom-debugger/node-removed.html
       inspector-protocol/dom/dom-remove-events.html
       inspector-protocol/dom/remove-multiple-nodes.html

* dom/ContainerNode.cpp:
(WebCore::ContainerNode::removeBetween):
* inspector/InspectorInstrumentation.h:
(WebCore::InspectorInstrumentation::willRemoveDOMNode):
(WebCore::InspectorInstrumentation::didRemoveDOMNode):

LayoutTests:

Added tests to check that the DOM.childNodeRemoved inspector-protocol message is dispatched
correctly when DOM nodes are moved while inside the "DOMNodeRemoved" event handler.

* inspector-protocol/dom-debugger/node-removed-expected.txt: Added.
* inspector-protocol/dom-debugger/node-removed.html: Added. Checking that the DOMDebugger agent
is still sending the node-removed events.
* inspector-protocol/dom/dom-remove-events-expected.txt: Added.
* inspector-protocol/dom/dom-remove-events.html: Added. Test with a single DOM remove event.
* inspector-protocol/dom/remove-multiple-nodes-expected.txt: Added.
* inspector-protocol/dom/remove-multiple-nodes.html: Added. Test case when multiple children
are removed at once with parentNode.textContent = "String".

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@158708 268f45cc-cd09-0410-ab3c-d52691b4dbfc

7 years agoRemove old unused code for hypothetical LLVM intrinsics
fpizlo@apple.com [Wed, 6 Nov 2013 02:09:45 +0000 (02:09 +0000)]
Remove old unused code for hypothetical LLVM intrinsics
https://bugs.webkit.org/show_bug.cgi?id=123824

Reviewed by Oliver Hunt.

* ftl/FTLIntrinsicRepository.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@158707 268f45cc-cd09-0410-ab3c-d52691b4dbfc

7 years agoFTL should support String character access operations
fpizlo@apple.com [Wed, 6 Nov 2013 02:07:43 +0000 (02:07 +0000)]
FTL should support String character access operations
https://bugs.webkit.org/show_bug.cgi?id=123783

Reviewed by Oliver Hunt.

Implements:

- string.length

- string[index]

* ftl/FTLAbstractHeapRepository.h:
* ftl/FTLCapabilities.cpp:
(JSC::FTL::canCompile):
* ftl/FTLIntrinsicRepository.h:
* ftl/FTLLowerDFGToLLVM.cpp:
(JSC::FTL::LowerDFGToLLVM::compileGetIndexedPropertyStorage):
(JSC::FTL::LowerDFGToLLVM::compileGetArrayLength):
(JSC::FTL::LowerDFGToLLVM::compileGetByVal):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@158706 268f45cc-cd09-0410-ab3c-d52691b4dbfc

7 years agoUnreviewed build fix on CMake based ports with GLES.
ryuan.choi@samsung.com [Wed, 6 Nov 2013 02:03:16 +0000 (02:03 +0000)]
Unreviewed build fix on CMake based ports with GLES.

* CMakeLists.txt:
Added OPENGLES2_LIBRARIES and OPENGLES2_INCLUDE_DIR into the includes and
libraries list.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@158705 268f45cc-cd09-0410-ab3c-d52691b4dbfc

7 years agoplatformCALayerDeviceScaleFactor should be const
timothy_horton@apple.com [Wed, 6 Nov 2013 01:44:50 +0000 (01:44 +0000)]
platformCALayerDeviceScaleFactor should be const
https://bugs.webkit.org/show_bug.cgi?id=123842

Reviewed by Simon Fraser.

* WebCore.exp.in:
* platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
(WebCore::LayerClient::platformCALayerDeviceScaleFactor):
* platform/graphics/ca/GraphicsLayerCA.cpp:
(WebCore::GraphicsLayerCA::platformCALayerDeviceScaleFactor):
* platform/graphics/ca/GraphicsLayerCA.h:
* platform/graphics/ca/PlatformCALayerClient.h:
* platform/graphics/ca/mac/TileController.h:
* platform/graphics/ca/mac/TileController.mm:
(WebCore::TileController::platformCALayerDeviceScaleFactor):
* platform/graphics/win/MediaPlayerPrivateQuickTimeVisualContext.cpp:
(WebCore::MediaPlayerPrivateQuickTimeVisualContext::LayerClient::platformCALayerDeviceScaleFactor):
Constify PlatformCALayerClient::platformCALayerDeviceScaleFactor.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@158704 268f45cc-cd09-0410-ab3c-d52691b4dbfc

7 years agotext-decoration-skip: ink isn't tested with underlines that don't intersect the under...
commit-queue@webkit.org [Wed, 6 Nov 2013 01:39:04 +0000 (01:39 +0000)]
text-decoration-skip: ink isn't tested with underlines that don't intersect the underlined text
https://bugs.webkit.org/show_bug.cgi?id=123839

Patch by Myles C. Maxfield <mmaxfield@apple.com> on 2013-11-05
Reviewed by Simon Fraser.

text-decoration-skip: ink uses a mask to determine where the underline can be drawn. Right now,
there is not a test that makes sure that the mask always gets applied to the location
where the underline will get drawn.

* fast/css3-text/css3-text-decoration/text-decoration-skip/text-decoration-skip-non-intersecting-underline-expected.html: Added.
* fast/css3-text/css3-text-decoration/text-decoration-skip/text-decoration-skip-non-intersecting-underline.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@158703 268f45cc-cd09-0410-ab3c-d52691b4dbfc

7 years agoSubresource loads should not prevent page throttling
barraclough@apple.com [Wed, 6 Nov 2013 01:26:53 +0000 (01:26 +0000)]
Subresource loads should not prevent page throttling
https://bugs.webkit.org/show_bug.cgi?id=123757

Reviewed by Alexey Proskuryakov.

The page-is-loading test for inhibiting process supression is currently
too conservative, preventing supression of pages with infinitely loading
resources (commonly XHRs). Instead, just rely on the FrameLoader being
active (with hysteresis).

* loader/SubresourceLoader.cpp:
(WebCore::SubresourceLoader::init):
(WebCore::SubresourceLoader::checkForHTTPStatusCodeError):
(WebCore::SubresourceLoader::didFinishLoading):
(WebCore::SubresourceLoader::didFail):
(WebCore::SubresourceLoader::willCancel):
* loader/SubresourceLoader.h:
    - remove m_activityAssertion from SubresourceLoader.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@158702 268f45cc-cd09-0410-ab3c-d52691b4dbfc

7 years ago[mac] PDFDocumentImage is too big if PDF has a crop box smaller than the media box
timothy_horton@apple.com [Wed, 6 Nov 2013 01:13:17 +0000 (01:13 +0000)]
[mac] PDFDocumentImage is too big if PDF has a crop box smaller than the media box
https://bugs.webkit.org/show_bug.cgi?id=123840
<rdar://problem/15308765>

Reviewed by Alexey Proskuryakov.

Test: fast/images/pdf-as-image-crop-box.html

* platform/graphics/cg/PDFDocumentImage.cpp:
(WebCore::PDFDocumentImage::size):
Use the crop box when determining the size of the image.

(WebCore::PDFDocumentImage::computeBoundsForCurrentPage):
* platform/graphics/cg/PDFDocumentImage.h:
* platform/graphics/mac/PDFDocumentImageMac.mm:
(WebCore::PDFDocumentImage::computeBoundsForCurrentPage):
Get rid of m_mediaBox, since we don't need it anymore.

(WebCore::PDFDocumentImage::drawPDFPage):
PDFKit does the translation by the crop box origin for us;
if we do it additionally, we'll be painting the wrong part of the image.
So, don't do the translation here.

* fast/images/pdf-as-image-crop-box-expected.html: Added.
* fast/images/pdf-as-image-crop-box.html: Added.
* fast/images/resources/green-1x1.pdf: Added.
* fast/images/resources/red-green-2x2-cropped-to-1x1.pdf: Added.
Add a test that ensures that PDFDocumentImage respects the PDF's crop box.
red-green-2x2-cropped-to-1x1 has a 2"x2" red square with a 1"x1" green
square centered in it, a media box of 2"x2", and a crop box of 1"x1"
offset by 0.5", 0.5". green-1x1 has a 1"x1" green square. The two images
should render the same if the crop box is being respected correctly.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@158701 268f45cc-cd09-0410-ab3c-d52691b4dbfc

7 years agoBegin work on decoding invocations
andersca@apple.com [Wed, 6 Nov 2013 00:58:10 +0000 (00:58 +0000)]
Begin work on decoding invocations
https://bugs.webkit.org/show_bug.cgi?id=123838

Reviewed by Dan Bernstein.

* Shared/API/Cocoa/WKRemoteObjectCoder.mm:
(encodeInvocation):
Declare the type string and selector keys as constants.

(encodeObject):
Make sure to encode the class name for NSInvocations as well.

(decodeInvocation):
Figure out the local and remove method signatures and make sure that they are equal.

* Shared/API/Cocoa/WKRemoteObjectInterface.mm:
(methodArgumentTypeEncodingForSelector):
Helper function that returns the type encoding for a given selector.

(-[WKRemoteObjectInterface _methodSignatureForSelector:]):
Helper function that returns a method signature for the method with the name referred to by selector.

* Shared/API/Cocoa/WKRemoteObjectInterfaceInternal.h: Added.
Add internal header.

* Shared/API/Cocoa/WKRemoteObjectRegistry.mm:
(-[WKRemoteObjectRegistry _invokeMessageWithInterfaceIdentifier:encodedInvocation:]):
Pass the right object to the WKRemoteObjectDecoder initializer and decode the invocation.

* WebKit2.xcodeproj/project.pbxproj:
Add internal header.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@158700 268f45cc-cd09-0410-ab3c-d52691b4dbfc

7 years agoWKRemoteObjectDecoder should know which interface it's decoding for
andersca@apple.com [Tue, 5 Nov 2013 23:58:36 +0000 (23:58 +0000)]
WKRemoteObjectDecoder should know which interface it's decoding for
https://bugs.webkit.org/show_bug.cgi?id=123833

Reviewed by Andreas Kling.

Move the interface identifier out into the root object body dictionary and make
the encoded invocation a sibling of it. That way we can look up the interface before
creating the decoder.

Also, manage exported objects and interfaces in a separate hash map.

* Shared/API/Cocoa/WKRemoteObjectCoder.h:
* Shared/API/Cocoa/WKRemoteObjectCoder.mm:
(-[WKRemoteObjectDecoder initWithInterface:rootObjectDictionary:WebKit::]):
(decodeInvocation):
(decodeObject):
* Shared/API/Cocoa/WKRemoteObjectRegistry.mm:
(-[WKRemoteObjectRegistry registerExportedObject:interface:]):
(-[WKRemoteObjectRegistry unregisterExportedObject:interface:]):
(-[WKRemoteObjectRegistry _sendInvocation:interface:]):
(-[WKRemoteObjectRegistry _handleMessageWithName:body:]):
(-[WKRemoteObjectRegistry _invokeMessageWithInterfaceIdentifier:encodedInvocation:]):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@158699 268f45cc-cd09-0410-ab3c-d52691b4dbfc

7 years agoFactor index cache for NodeLists and HTMLCollections to a class
antti@apple.com [Tue, 5 Nov 2013 23:45:43 +0000 (23:45 +0000)]
Factor index cache for NodeLists and HTMLCollections to a class
https://bugs.webkit.org/show_bug.cgi?id=123823

Reviewed by Ryosuke Niwa.

Implement index cache class that can used by NodeLists and HTMLCollections that currently
each have implementations of their own.

This patch also implements ChildNodeList and LiveNodeList using CollectionIndexCache.
HTMLCollection is will be transitioned later.

* GNUmakefile.list.am:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.xcodeproj/project.pbxproj:
* dom/ChildNodeList.cpp:
(WebCore::ChildNodeList::ChildNodeList):
(WebCore::ChildNodeList::length):
(WebCore::ChildNodeList::item):

    The client calls to cache to for indexed and size access.

(WebCore::ChildNodeList::collectionFirst):
(WebCore::ChildNodeList::collectionLast):
(WebCore::ChildNodeList::collectionTraverseForward):
(WebCore::ChildNodeList::collectionTraverseBackward):

    Cache calls back to these as needed to do the actual traversal.

(WebCore::ChildNodeList::invalidateCache):
* dom/ChildNodeList.h:
* dom/CollectionIndexCache.h: Added.

    Templated cache class itself.

(WebCore::::CollectionIndexCache):
(WebCore::::nodeCount):
(WebCore::::nodeBeforeCached):
(WebCore::::nodeAfterCached):
(WebCore::::nodeAt):
(WebCore::::invalidate):
* dom/LiveNodeList.cpp:
(WebCore::firstMatchingElement):
(WebCore::nextMatchingElement):
(WebCore::traverseMatchingElementsForward):
(WebCore::LiveNodeList::collectionFirst):
(WebCore::LiveNodeList::collectionLast):
(WebCore::LiveNodeList::collectionTraverseForward):
(WebCore::LiveNodeList::collectionTraverseBackward):
(WebCore::LiveNodeList::length):
(WebCore::LiveNodeList::item):
(WebCore::LiveNodeList::invalidateCache):
* dom/LiveNodeList.h:
(WebCore::LiveNodeList::LiveNodeList):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@158698 268f45cc-cd09-0410-ab3c-d52691b4dbfc

7 years agoFull width semicolon is wrong in vertical text.
enrica@apple.com [Tue, 5 Nov 2013 23:14:59 +0000 (23:14 +0000)]
Full width semicolon is wrong in vertical text.
https://bugs.webkit.org/show_bug.cgi?id=123814
<rdar://problem/15312541>

Reviewed by Benjamin Poulain.

Source/WebCore:

The full width semicolon should always be upright.
Adding it to the list of characters that should
ignore rotation.

* platform/graphics/FontGlyphs.cpp:
(WebCore::shouldIgnoreRotation):

LayoutTests:

Extended the existing test to include the full width
semicolon.

* platform/mac/fast/text/vertical-no-sideways.html:
* platform/mac/platform/mac/fast/text/vertical-no-sideways-expected.txt:
* platform/mac-mountainlion/platform/mac/fast/text/vertical-no-sideways-expected.txt

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@158697 268f45cc-cd09-0410-ab3c-d52691b4dbfc

7 years agoAdd support for decoding NSStrings
andersca@apple.com [Tue, 5 Nov 2013 23:00:58 +0000 (23:00 +0000)]
Add support for decoding NSStrings
https://bugs.webkit.org/show_bug.cgi?id=123829

Reviewed by Andreas Kling.

* Shared/API/Cocoa/WKRemoteObjectCoder.mm:
(encodeObject):
(-[WKRemoteObjectDecoder allowsKeyedCoding]):
Always return YES.

(-[WKRemoteObjectDecoder containsValueForKey:]):
Look up the key in the current dictionary.

(-[WKRemoteObjectDecoder decodeBytesForKey:returnedLength:]):
Try to get the WebData object and return its data + size.

(-[WKRemoteObjectDecoder requiresSecureCoding]):
Return YES.

(checkIfClassIsAllowed):
Check if the class or any of its superclasses are are allowed.

(validateClass):
Call checkIfClassIsAllowed and validate that the class conforms to NSSecureCoding.

(decodeObject):
Get the class name, verify that the class exists and is allowed.
Allocate and initialize an object using initWithCoder:.

(-[WKRemoteObjectDecoder decodeObjectOfClasses:forKey:]):
Set the allowed classes, look up the object in _currentDictionary and call decodeObject.

(-[WKRemoteObjectDecoder allowedClasses]):
Return _allowedClasses.

* Shared/API/Cocoa/WKRemoteObjectRegistry.mm:
(-[WKRemoteObjectRegistry _sendInvocation:interface:]):
Declare interfaceIdentifier as a constant.

(-[WKRemoteObjectRegistry _invokeMessageWithBody:]):
Decode the interface identifier.

* Shared/ImmutableDictionary.h:
(WebKit::ImmutableDictionary::get):
(WebKit::ImmutableDictionary::size):
(WebKit::ImmutableDictionary::map):
Make member functions const.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@158696 268f45cc-cd09-0410-ab3c-d52691b4dbfc

7 years agoObjCCallbackFunctionImpl's NSInvocation shouldn't retain its target or arguments
mhahnenberg@apple.com [Tue, 5 Nov 2013 22:51:52 +0000 (22:51 +0000)]
ObjCCallbackFunctionImpl's NSInvocation shouldn't retain its target or arguments
https://bugs.webkit.org/show_bug.cgi?id=123822

Reviewed by Geoffrey Garen.

Using -retainArguments on ObjCCallbackFunctionImpl's NSInvocation leads to memory leaks.
We should handle retaining/releasing the target ourselves, and we should never retain the arguments.

* API/ObjCCallbackFunction.mm:
(JSC::ObjCCallbackFunctionImpl::~ObjCCallbackFunctionImpl):
(JSC::ObjCCallbackFunctionImpl::name):
(objCCallbackFunctionForInvocation):
(objCCallbackFunctionForMethod):
(objCCallbackFunctionForBlock):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@158695 268f45cc-cd09-0410-ab3c-d52691b4dbfc

7 years agoFix Mountain Lion Debug bot after r158689
benjamin@webkit.org [Tue, 5 Nov 2013 22:44:07 +0000 (22:44 +0000)]
Fix Mountain Lion Debug bot after r158689

Unreviewed.

It looks like WebGeolocationManagerProxy::stopUpdating() and WebGeolocationManagerProxy::processDidClose()
are racing in some cases, causing the assertion to fail.

That case is handled properly in the last if() branch of WebGeolocationManagerProxy::removeRequester().
This patch remove the overzealous assertion.

* UIProcess/WebGeolocationManagerProxy.cpp:
(WebKit::WebGeolocationManagerProxy::removeRequester):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@158694 268f45cc-cd09-0410-ab3c-d52691b4dbfc

7 years agoRemove unused RenderWidget::notifyWidget().
akling@apple.com [Tue, 5 Nov 2013 22:38:36 +0000 (22:38 +0000)]
Remove unused RenderWidget::notifyWidget().

Rubber-stamped by Anders Carlsson.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@158693 268f45cc-cd09-0410-ab3c-d52691b4dbfc

7 years agoFix build for architectures with 4 argument registers (broken since r158681).
commit-queue@webkit.org [Tue, 5 Nov 2013 22:30:15 +0000 (22:30 +0000)]
Fix build for architectures with 4 argument registers (broken since r158681).
https://bugs.webkit.org/show_bug.cgi?id=123826

Patch by Julien Brianceau <jbriance@cisco.com> on 2013-11-05
Reviewed by Michael Saboff.

* jit/CCallHelpers.h:
(JSC::CCallHelpers::setupArgumentsWithExecState):
(JSC::CCallHelpers::setupArguments):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@158692 268f45cc-cd09-0410-ab3c-d52691b4dbfc

7 years agoRemote Layer Tree: Apply layer changes to LayerTypeCustom layers to the custom layer...
timothy_horton@apple.com [Tue, 5 Nov 2013 22:04:27 +0000 (22:04 +0000)]
Remote Layer Tree: Apply layer changes to LayerTypeCustom layers to the custom layer in the Web process, not to the CALayerHost
https://bugs.webkit.org/show_bug.cgi?id=123818

Reviewed by Anders Carlsson.

Changes to the properties of a PlatformCALayer of type LayerTypeCustom are intended
to affect the custom CALayer; however, we were bundling them up with the transaction
and applying them to the CALayerHost, leading to important properties being lost.

Instead, apply them to the Web-process-side CALayer when building the transaction.

* Shared/mac/RemoteLayerTreePropertyApplier.h: Added.
* Shared/mac/RemoteLayerTreePropertyApplier.mm: Added.
(WebKit::cgColorFromColor):
(WebKit::toCAFilterType):
(WebKit::RemoteLayerTreePropertyApplier::applyPropertiesToLayer):
(WebKit::RemoteLayerTreePropertyApplier::disableActionsForLayer):
Move code to apply LayerProperties to a CALayer from RemoteLayerTreeHost.
Move code to disable actions on a CALayer from RemoteLayerTreeHost.

* UIProcess/mac/RemoteLayerTreeHost.mm:
(WebKit::RemoteLayerTreeHost::commit):
(WebKit::RemoteLayerTreeHost::createLayer):
Use RemoteLayerTreePropertyApplier.
Hand it a map of LayerID->CALayer so that it can look up related layers
for children and mask layers.

* WebKit2.xcodeproj/project.pbxproj:
Add RemoteLayerTreePropertyApplier.{h,mm}

* WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
(PlatformCALayerRemote::recursiveBuildTransaction):
Upon commit, apply changes to LayerTypeCustom layers to the platform layer.
Setting children or maskLayer won't work, since we don't know about other raw CALayers.
This is OK, since nothing uses those properties on custom layers.

* WebProcess/WebPage/mac/PlatformCALayerRemoteCustom.cpp:
(PlatformCALayerRemoteCustom::PlatformCALayerRemoteCustom):
Disable actions on the root custom layer.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@158691 268f45cc-cd09-0410-ab3c-d52691b4dbfc

7 years agoBegin work on a WKRemoteObjectDecoder object
andersca@apple.com [Tue, 5 Nov 2013 21:21:50 +0000 (21:21 +0000)]
Begin work on a WKRemoteObjectDecoder object
https://bugs.webkit.org/show_bug.cgi?id=123819

Reviewed by Dan Bernstein.

* Shared/API/Cocoa/WKRemoteObjectCoder.h:
* Shared/API/Cocoa/WKRemoteObjectCoder.mm:
(-[WKRemoteObjectDecoder initWithRootObjectDictionary:]):
Add designated initializer.

* Shared/API/Cocoa/WKRemoteObjectRegistry.mm:
(-[WKRemoteObjectRegistry _handleMessageWithName:body:]):
If the message has the expected name and body type, pass it along to -_invokeMessageWithBody:.

(-[WKRemoteObjectRegistry _invokeMessageWithBody:]):
Create a decoder.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@158690 268f45cc-cd09-0410-ab3c-d52691b4dbfc

7 years ago[WK2] Add a WebKit2 API for Geolocation's highAccuracy
benjamin@webkit.org [Tue, 5 Nov 2013 21:17:07 +0000 (21:17 +0000)]
[WK2] Add a WebKit2 API for Geolocation's highAccuracy
https://bugs.webkit.org/show_bug.cgi?id=123786

Reviewed by Darin Adler.

Source/WebKit2:

This adds support for highAccuracy Geolocation with WebKit2.

The key is to track which page/requester need what kind of geolocation
in order to change between high and low accuracy as pages run and disappear.

WebGeolocationManager and WebGeolocationManagerProxy have very similar roles
but for different sources:
-WebGeolocationManager tracks which live page require high accuracy geolocation.
 When the state changes, it forward the information to the UIProcess.
-WebGeolocationManagerProxy tracks which WebContent processes needs high accuracy.

* Shared/APIClientTraits.cpp:
* Shared/APIClientTraits.h:
* UIProcess/API/C/WKGeolocationManager.h:
* UIProcess/WebGeolocationManagerProxy.cpp:
(WebKit::WebGeolocationManagerProxy::startUpdating):
(WebKit::WebGeolocationManagerProxy::removeRequester):
(WebKit::WebGeolocationManagerProxy::setEnableHighAccuracy):
* UIProcess/WebGeolocationManagerProxy.h:
(WebKit::WebGeolocationManagerProxy::isUpdating):
(WebKit::WebGeolocationManagerProxy::isHighAccuracyEnabled):
* UIProcess/WebGeolocationManagerProxy.messages.in:
* UIProcess/WebGeolocationProvider.cpp:
(WebKit::WebGeolocationProvider::setEnableHighAccuracy):
* UIProcess/WebGeolocationProvider.h:
* WebProcess/Geolocation/WebGeolocationManager.cpp:
(WebKit::WebGeolocationManager::registerWebPage):
(WebKit::WebGeolocationManager::unregisterWebPage):
(WebKit::WebGeolocationManager::setEnableHighAccuracyForPage):
* WebProcess/Geolocation/WebGeolocationManager.h:
(WebKit::WebGeolocationManager::isUpdating):
(WebKit::WebGeolocationManager::isHighAccuracyEnabled):
* WebProcess/WebCoreSupport/WebGeolocationClient.cpp:
(WebKit::WebGeolocationClient::setEnableHighAccuracy):

Tools:

Add basic testing for the Geolocation API (start, stop and change accuracy).

* TestWebKitAPI/GNUmakefile.am:
* TestWebKitAPI/PlatformEfl.cmake:
* TestWebKitAPI/PlatformGTK.cmake:
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKit2/Geolocation.cpp: Added.
(TestWebKitAPI::operator<<):
(TestWebKitAPI::GeolocationStateTracker::~GeolocationStateTracker):
(TestWebKitAPI::GeolocationStateTracker::eventsChanged):
(TestWebKitAPI::GeolocationStateTracker::startUpdatingCallback):
(TestWebKitAPI::GeolocationStateTracker::stopUpdatingCallback):
(TestWebKitAPI::GeolocationStateTracker::setEnableHighAccuracyCallback):
(TestWebKitAPI::decidePolicyForGeolocationPermissionRequestCallBack):
(TestWebKitAPI::setupGeolocationProvider):
(TestWebKitAPI::setupView):
(TestWebKitAPI::GeolocationBasicStateTracker::GeolocationBasicStateTracker):
(TestWebKitAPI::GeolocationBasicStateTracker::eventsChanged):
(TestWebKitAPI::GeolocationBasicWithHighAccuracyStateTracker::GeolocationBasicWithHighAccuracyStateTracker):
(TestWebKitAPI::GeolocationBasicWithHighAccuracyStateTracker::eventsChanged):
(TestWebKitAPI::GeolocationTransitionToHighAccuracyStateTracker::GeolocationTransitionToHighAccuracyStateTracker):
(TestWebKitAPI::GeolocationTransitionToHighAccuracyStateTracker::eventsChanged):
(TestWebKitAPI::GeolocationTransitionToLowAccuracyStateTracker::GeolocationTransitionToLowAccuracyStateTracker):
(TestWebKitAPI::GeolocationTransitionToLowAccuracyStateTracker::eventsChanged):
(TestWebKitAPI::didFinishLoadForFrame):
* TestWebKitAPI/Tests/WebKit2/geolocationGetCurrentPosition.html: Added.
* TestWebKitAPI/Tests/WebKit2/geolocationGetCurrentPositionWithHighAccuracy.html: Added.
* TestWebKitAPI/Tests/WebKit2/geolocationWatchPosition.html: Added.
* TestWebKitAPI/Tests/WebKit2/geolocationWatchPositionWithHighAccuracy.html: Added.
* WebKitTestRunner/GeolocationProviderMock.cpp:
(WTR::GeolocationProviderMock::GeolocationProviderMock):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@158689 268f45cc-cd09-0410-ab3c-d52691b4dbfc