Add failing geolocation test to Mac WK2 TestExpectations
https://bugs.webkit.org/show_bug.cgi?id=98081

* platform/mac-wk2/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130086 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Re-baseline after r130080 for Mac.

* platform/mac/fast/canvas/canvas-render-layer-expected.txt:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130087 268f45cc-cd09-0410-ab3c-d52691b4dbfc
349kB below SelectorDataList::initialize() on Membuster3.
<http://webkit.org/b/98072>
<rdar://problem/12408605>

Reviewed by Anders Carlsson.

Make a separate pass over the CSSSelectorList to figure out the capacity needed for SelectorDataList::m_selectors.
Reduces memory consumption by 322kB on Membuster3.

* dom/SelectorQuery.cpp:
(WebCore::SelectorDataList::initialize):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130088 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Kill transitive effects of SelectorChecker::checkOneSelector.
https://bugs.webkit.org/show_bug.cgi?id=97953

Reviewed by Eric Seidel.

The dynamicPseudo/hasUnknownPseudoelements by-ref parameters that are passed into checkOneSelector make the logic harder to understand and aren't needed. Refactor the code to rid of them, replacing them instead with two flags in SelectorCheckingContext.

No change in behavior, covered by existing tests.

* css/SelectorChecker.cpp:
(WebCore::SelectorChecker::checkSelector): Rolled pseudo-element-checking code out of checkOneSelector into here, since that is where t
(WebCore::SelectorChecker::checkOneSelector): Changed to use SelectorCheckingContext rather than transitive params.
* css/SelectorChecker.h:
(WebCore::SelectorChecker::SelectorCheckingContext::SelectorCheckingContext): Added two new flags.
(SelectorCheckingContext): Ditto.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130089 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed. Skipping http/tests/security/cross-origin-local-storage-wk1.html since support for the feature on Windows has not been added yet.
https://bugs.webkit.org/show_bug.cgi?id=98079

* platform/win/Skipped:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130090 268f45cc-cd09-0410-ab3c-d52691b4dbfc
https://bugs.webkit.org/show_bug.cgi?id=97365
ScrollingTreeState needs to be a tree of nodes

Reviewed by Simon Fraser.

This patch should not change any behavior.

Prior to this patch, ScrollingTreeState attempted to contain all of 
the state information needed for the whole scrolling tree in one 
object. But in the future when there are multiple nodes in the 
scrolling tree, a single state object will not be sufficient. 
ScrollingState should also be represented by a tree. This patch makes 
scrolling state into a tree. The old ScrollingTreeState class has 
become the ScrollingStateScrollingNode class since the majority of 
the class represents scroll state that is specific to ScrollableAreas 
and will not be applicable to fixed or sticky layers.

Some new files and some moved files.
* WebCore.xcodeproj/project.pbxproj:

Everything that used to refer to the ScrollingTreeState should now 
refer to the ScrollingStateTree instead. Right now, all of this code 
continues to deal with only the root node of the tree. In the future, 
it will have to deal with all of the nodes.
* page/scrolling/ScrollingCoordinator.cpp:
(WebCore::ScrollingCoordinator::ScrollingCoordinator):
(WebCore::ScrollingCoordinator::pageDestroyed):
(WebCore::ScrollingCoordinator::requestScrollPositionUpdate):
(WebCore::ScrollingCoordinator::setScrollLayer):
(WebCore::ScrollingCoordinator::setNonFastScrollableRegion):
(WebCore::ScrollingCoordinator::setScrollParameters):
(WebCore::ScrollingCoordinator::setWheelEventHandlerCount):
(WebCore::ScrollingCoordinator::setShouldUpdateScrollLayerPositionOnMainThread):
(WebCore::ScrollingCoordinator::scheduleTreeStateCommit):
(WebCore::ScrollingCoordinator::scrollingStateTreeCommitterTimerFired):
(WebCore::ScrollingCoordinator::commitTreeStateIfNeeded):
(WebCore::ScrollingCoordinator::commitTreeState):
* page/scrolling/ScrollingCoordinator.h:
(WebCore):
(ScrollingCoordinator):

This is a new abstract base class for the nodes in the 
ScrollingStateTree.
* page/scrolling/ScrollingStateNode.cpp: Added.
(WebCore):
(WebCore::ScrollingStateNode::ScrollingStateNode):
(WebCore::ScrollingStateNode::~ScrollingStateNode):
(WebCore::ScrollingStateNode::appendChild):
(WebCore::ScrollingStateNode::cloneChildNodes):
(WebCore::ScrollingStateNode::traverseNext):
* page/scrolling/ScrollingStateNode.h: Added.
(WebCore):
(ScrollingStateNode):
(WebCore::ScrollingStateNode::scrollLayerDidChange):
(WebCore::ScrollingStateNode::setScrollLayerDidChange):
(WebCore::ScrollingStateNode::scrollingStateTree):
(WebCore::ScrollingStateNode::parent):
(WebCore::ScrollingStateNode::firstChild):
(WebCore::ScrollingStateNode::nextSibling):
(WebCore::ScrollingStateNode::setParent):
(WebCore::ScrollingStateNode::setFirstChild):
(WebCore::ScrollingStateNode::setNextSibling):
* page/scrolling/mac/ScrollingCoordinatorMac.mm:
* page/scrolling/mac/ScrollingStateNodeMac.mm: Copied from page/scrolling/mac/ScrollingTreeStateMac.mm.
(WebCore::ScrollingStateNode::platformScrollLayer):
(WebCore::ScrollingStateNode::setScrollLayer):
(WebCore):

Right now, the ScrollingStateScrollingNode is the only type of 
ScrollingStateNode. In the future there will be, for example, 
ScrollingStateFixedNodes that will have a different set of state 
information to keep track of.
* page/scrolling/ScrollingStateScrollingNode.cpp: Copied from page/scrolling/ScrollingTreeState.cpp.
(WebCore::ScrollingStateScrollingNode::create):
(WebCore::ScrollingStateScrollingNode::ScrollingStateScrollingNode):
(WebCore):
(WebCore::ScrollingStateScrollingNode::~ScrollingStateScrollingNode):
(WebCore::ScrollingStateScrollingNode::cloneNode):
(WebCore::ScrollingStateScrollingNode::setViewportRect):
(WebCore::ScrollingStateScrollingNode::setContentsSize):
(WebCore::ScrollingStateScrollingNode::setNonFastScrollableRegion):
(WebCore::ScrollingStateScrollingNode::setWheelEventHandlerCount):
(WebCore::ScrollingStateScrollingNode::setShouldUpdateScrollLayerPositionOnMainThread):
(WebCore::ScrollingStateScrollingNode::setHorizontalScrollElasticity):
(WebCore::ScrollingStateScrollingNode::setVerticalScrollElasticity):
(WebCore::ScrollingStateScrollingNode::setHasEnabledHorizontalScrollbar):
(WebCore::ScrollingStateScrollingNode::setHasEnabledVerticalScrollbar):
(WebCore::ScrollingStateScrollingNode::setHorizontalScrollbarMode):
(WebCore::ScrollingStateScrollingNode::setVerticalScrollbarMode):
(WebCore::ScrollingStateScrollingNode::setRequestedScrollPosition):
(WebCore::ScrollingStateScrollingNode::setScrollOrigin):
* page/scrolling/ScrollingStateScrollingNode.h: Copied from page/scrolling/ScrollingTreeState.h.
(ScrollingStateScrollingNode):
* page/scrolling/ScrollingStateTree.cpp: Added.
(WebCore):
(WebCore::ScrollingStateTree::create):
(WebCore::ScrollingStateTree::ScrollingStateTree):
(WebCore::ScrollingStateTree::~ScrollingStateTree):
(WebCore::ScrollingStateTree::commit):

The ScrollingStateTree manages the nodes in the tree via the root 
node. It is responsible for cloning the tree and sending it over to 
the scrolling thread.
* page/scrolling/ScrollingStateTree.h: Added.
(WebCore):
(ScrollingStateTree):
(WebCore::ScrollingStateTree::rootStateNode):
(WebCore::ScrollingStateTree::setHasChangedProperties):
(WebCore::ScrollingStateTree::hasChangedProperties):
(WebCore::ScrollingStateTree::setRootStateNode):

Everything that used to refer to the ScrollingTreeState should now 
refer to the ScrollingStateTree instead. Right now, all of this code 
continues to deal with only the root node of the tree. In the future, 
it will have to deal with all of the nodes.
* page/scrolling/ScrollingTree.cpp:
(WebCore::ScrollingTree::commitNewTreeState):
* page/scrolling/ScrollingTree.h:
(WebCore):
* page/scrolling/ScrollingTreeNode.cpp:
(WebCore::ScrollingTreeNode::update):
* page/scrolling/ScrollingTreeNode.h:
(WebCore):
(ScrollingTreeNode):
* page/scrolling/mac/ScrollingTreeNodeMac.h:
(ScrollingTreeNodeMac):
* page/scrolling/mac/ScrollingTreeNodeMac.mm:
(WebCore::ScrollingTreeNodeMac::update):

ScrollingTreeState.cpp --> ScrollingStateScrollingNode.cpp
* page/scrolling/ScrollingTreeState.cpp: Removed.

ScrollingTreeState.h --> ScrollingStateScrollingNode.h
* page/scrolling/ScrollingTreeState.h: Removed.

ScrollingTreeStateMac.mm --> ScrollingStateNodeMac.mm
* page/scrolling/mac/ScrollingTreeStateMac.mm: Removed.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130091 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[EFL] Update results again after r130080.

* platform/efl/fast/canvas/canvas-render-layer-expected.txt:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130092 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Build fix. Clearly, these objects could be instantiated in worker threads.
Not sure why my patch asserted that we're in the main thread.

* dom/ContainerNode.h:
(WebCore::NoEventDispatchAssertion::NoEventDispatchAssertion):
(WebCore::NoEventDispatchAssertion::~NoEventDispatchAssertion):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130093 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Add some flaky tests to match what's happening on the bots.
* platform/chromium/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130094 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore: IndexedDB: Fire error rather than raising on request creation if transaction aborts asynchronously.
https://bugs.webkit.org/show_bug.cgi?id=93054

Reviewed by Tony Chang.

All IDB data operations are asynchronous, producing IDBRequest objects. This was implemented
by passing all data from the front-end to the back-end synchronously, and synchronously
returning an exception code back if the request was invalid. Previous changes have moved
request validation to the front-end except for the case of the back-end transaction having
asynchronously aborted in the mean time.

To eliminate that case (which would allow front-end to back-end communication to be
asynchronous in multi-process ports), change from returning an exception code to relying on
the front-end to abort the request when the abort event finally arrives.

The difference would be noticeable in scripts - in a multi-process environment:

var request1 = store.get(0);
request1.onerror = errorHandler; // (A)
// (B)
var request2 = store.get(0); // (C)
request2.onerror = errorHandler; // (D)

If the transaction back-end were to asynchronously abort at exactly point (B), then prior to
this patch an exception would be thrown at (C). With this patch, no exception but (D) would
fire, same as (A).

The back-end explicitly fires an error callback as well, as intermediate layers may rely on
this to stop tracking the pending callback.

No new layout tests - change is not observable in single-process ports.
Added webkit_unit_test IDBRequestTest.AbortErrorAfterAbort to verify that IDBRequest
is resilient to this pattern, but it was previous.

* Modules/indexeddb/IDBCursor.cpp:
(WebCore::IDBCursor::advance): Back end should never fail a request.
(WebCore::IDBCursor::continueFunction): Ditto.
(WebCore::IDBCursor::deleteFunction): Ditto, and also move "is key cursor" test
here from back-end.
* Modules/indexeddb/IDBCursorBackendImpl.cpp:
(WebCore::IDBCursorBackendImpl::continueFunction): Change from EC to firing error.
(WebCore::IDBCursorBackendImpl::advance): Ditto.
(WebCore::IDBCursorBackendImpl::deleteFunction): Ditto, and remove test moved to FE.
(WebCore::IDBCursorBackendImpl::prefetchContinue): Ditto.
* Modules/indexeddb/IDBDatabaseError.cpp:
(WebCore::IDBDatabaseError::create): Add overload that looks up message via code.
(WebCore::IDBDatabaseError::IDBDatabaseError): Look up message via exception table.
* Modules/indexeddb/IDBDatabaseException.h: Add getErrorDescription.
* Modules/indexeddb/IDBDatabaseException.cpp: Implementation of getErrorDescription.
* Modules/indexeddb/IDBIndex.cpp:
(WebCore::IDBIndex::openCursor): Back end should never fail a request.
(WebCore::IDBIndex::count): Ditto.
(WebCore::IDBIndex::openKeyCursor): Ditto.
(WebCore::IDBIndex::get): Ditto.
(WebCore::IDBIndex::getKey): Ditto.
* Modules/indexeddb/IDBIndexBackendImpl.cpp:
(WebCore::IDBIndexBackendImpl::openCursor): Change from EC to firing error.
(WebCore::IDBIndexBackendImpl::openKeyCursor): Ditto.
(WebCore::IDBIndexBackendImpl::count): Ditto.
(WebCore::IDBIndexBackendImpl::get): Ditto.
(WebCore::IDBIndexBackendImpl::getKey): Ditto.
* Modules/indexeddb/IDBObjectStore.cpp:
(WebCore::IDBObjectStore::get): Back end should never fail a request.
(WebCore::IDBObjectStore::put): Ditto.
(WebCore::IDBObjectStore::deleteFunction): Ditto.
(WebCore::IDBObjectStore::clear): Ditto.
(WebCore): Ditto.
(WebCore::IDBObjectStore::openCursor): Ditto.
(WebCore::IDBObjectStore::count): Ditto.
* Modules/indexeddb/IDBObjectStoreBackendImpl.cpp:
(WebCore::IDBObjectStoreBackendImpl::get): Change from EC to firing error.
(WebCore::IDBObjectStoreBackendImpl::putWithIndexKeys): Ditto.
(WebCore):
(WebCore::IDBObjectStoreBackendImpl::deleteFunction): Ditto.
(WebCore::IDBObjectStoreBackendImpl::clear): Ditto.
(WebCore::IDBObjectStoreBackendImpl::openCursor): Ditto.
(WebCore::IDBObjectStoreBackendImpl::count): Ditto.

Source/WebKit/chromium: IndexedDB: Move onSuccess(IDBDatabaseBackendInterface) to IDBOpenDBRequest
https://bugs.webkit.org/show_bug.cgi?id=94757

Reviewed by Tony Chang.

* tests/IDBRequestTest.cpp: Ensure IDBRequest can handle Error after abort.
(WebCore::TEST): Added AbortAfter


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130095 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed. Skipped on other platforms in http://trac.webkit.org/changeset/129897.
Skipping on Windows as well.

* platform/win/TestExpectations:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130096 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[MathML] Baseline wrong for fractions or munder/mover with padding
https://bugs.webkit.org/show_bug.cgi?id=97990

Reviewed by Eric Seidel.

Source/WebCore: 

We include any border or padding in our baseline computation. We also take this opportunity
to quit adding extra left & right padding to numerators and denominators, making our output
tighter and also more compatible with Firefox and TeX, since we are rebaselining some
fraction pixel tests now anyway.

Tests added to LayoutTests/mathml/presentation/{over,row-alignment}.xhtml

* rendering/mathml/RenderMathMLFraction.cpp:
(WebCore::RenderMathMLFraction::fixChildStyle):
(WebCore::RenderMathMLFraction::paint):
(WebCore::RenderMathMLFraction::firstLineBoxBaseline):
* rendering/mathml/RenderMathMLUnderOver.cpp:
(WebCore::RenderMathMLUnderOver::firstLineBoxBaseline):

LayoutTests: 

We handle any border and padding correctly, and quit adding extra left and right padding
to numerators and denominators.

* mathml/presentation/over.xhtml:
* mathml/presentation/row-alignment.xhtml:
* platform/efl/TestExpectations:
* platform/gtk/TestExpectations:
* platform/mac/mathml/presentation/attributes-expected.png:
* platform/mac/mathml/presentation/attributes-expected.txt:
* platform/mac/mathml/presentation/fractions-expected.png:
* platform/mac/mathml/presentation/fractions-expected.txt:
* platform/mac/mathml/presentation/fractions-vertical-alignment-expected.png:
* platform/mac/mathml/presentation/fractions-vertical-alignment-expected.txt:
* platform/mac/mathml/presentation/mo-stretch-expected.png:
* platform/mac/mathml/presentation/mo-stretch-expected.txt:
* platform/mac/mathml/presentation/over-expected.png:
* platform/mac/mathml/presentation/over-expected.txt:
* platform/mac/mathml/presentation/roots-expected.png:
* platform/mac/mathml/presentation/roots-expected.txt:
* platform/mac/mathml/presentation/row-alignment-expected.png:
* platform/mac/mathml/presentation/row-alignment-expected.txt:
* platform/mac/mathml/presentation/subsup-expected.png:
* platform/mac/mathml/presentation/subsup-expected.txt:


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