Use std::chrono functions in dispatchFunctionsFromMainThread()
https://bugs.webkit.org/show_bug.cgi?id=128308

Reviewed by Antti Koivisto.

* wtf/MainThread.cpp:
(WTF::dispatchFunctionsFromMainThread):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@163536 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Re-enable simple line layout on non-Mac platforms
https://bugs.webkit.org/show_bug.cgi?id=123338

Reviewed by Anders Carlsson.

* rendering/SimpleLineLayout.cpp:
(WebCore::SimpleLineLayout::canUseFor):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@163537 268f45cc-cd09-0410-ab3c-d52691b4dbfc
IDB: storage/indexeddb/mozilla/clear.html fails
<rdar://problem/15997155> and https://bugs.webkit.org/show_bug.cgi?id=128282

Reviewed by David Kilzer.

Source/WebCore:

Covered by storage/indexeddb/mozilla/clear.html (and probably others)

Update the value deserializer to take into account whether or not there was an IDBKey:
* bindings/js/IDBBindingUtilities.cpp:
(WebCore::deserializeIDBValueBuffer):
* bindings/js/IDBBindingUtilities.h:

* Modules/indexeddb/IDBRequest.cpp:
(WebCore::IDBRequest::onSuccess): Call the new form of deserializeIDBValueBuffer.

* Modules/indexeddb/IDBDatabaseBackend.cpp:
(WebCore::IDBDatabaseBackend::clearObjectStore): Update logging.

* Modules/indexeddb/IDBTransaction.cpp:
(WebCore::IDBTransaction::setActive): Update logging.

* Modules/indexeddb/IDBTransactionBackend.cpp:
(WebCore::IDBTransactionBackend::commit): Fix ASSERTs to reflect multi-process worlds.

Source/WebKit2:

* DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.cpp:
(WebKit::DatabaseProcessIDBConnection::openTransaction): Update logging.

* DatabaseProcess/IndexedDB/sqlite/SQLiteIDBTransaction.cpp:
(WebKit::SQLiteIDBTransaction::commit): Update ASSERT.

LayoutTests:

* platform/mac-wk2/TestExpectations: Enable this test.

Update the test for (what I can only assume are) changes in the spec:
* storage/indexeddb/mozilla/clear-expected.txt:
* storage/indexeddb/mozilla/resources/clear.js:
(areWeClearYet):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@163538 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed, rolling out r163530.
http://trac.webkit.org/changeset/163530
https://bugs.webkit.org/show_bug.cgi?id=128311

It broke run-gtk-tests (Requested by Ossy on #webkit).

* efl/common.py: Copied from Tools/gtk/jhbuildrc.
(script_path):
(top_level_path):
* efl/jhbuildrc:
* gtk/common.py:
(script_path):
(top_level_path):
* gtk/find-make-dist-errors:
(get_missing_headers):
* gtk/generate-gtkdoc:
(get_webkit2_options):
(get_webkit1_options.src_path):
(get_webkit1_options):
(get_webkitdom_options.src_path):
(get_webkitdom_options):
* gtk/generate-inspector-gresource-manifest.py:
* gtk/jhbuildrc:
* jhbuild/jhbuildrc_common.py: Removed.
* nix/common.py: Copied from Tools/nix/jhbuildrc.
(script_path):
(top_level_path):
* nix/jhbuildrc:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@163539 268f45cc-cd09-0410-ab3c-d52691b4dbfc
media/video-load-preload-metadata.html is flaky
https://bugs.webkit.org/show_bug.cgi?id=128312

* platform/mac/TestExpectations: Marked it as such.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@163541 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Heap::writeBarrier shouldn't be static
https://bugs.webkit.org/show_bug.cgi?id=127807

Reviewed by Geoffrey Garen.

Currently it looks up the Heap in which to fire the write barrier by using 
the cell passed to it. Almost every call site already has a reference to the 
VM or the Heap itself. It seems wasteful to look it up all over again.

Source/JavaScriptCore: 

* GNUmakefile.list.am:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters:
* JavaScriptCore.xcodeproj/project.pbxproj:
* heap/CopyWriteBarrier.h:
(JSC::CopyWriteBarrier::set):
* heap/Heap.cpp:
(JSC::Heap::writeBarrier):
* heap/Heap.h:
(JSC::Heap::writeBarrier):
* jit/JITOperations.cpp:
* jit/JITWriteBarrier.h:
(JSC::JITWriteBarrierBase::set):
* llint/LLIntSlowPaths.cpp:
(JSC::LLInt::llint_write_barrier_slow):
* runtime/Arguments.h:
* runtime/JSWeakMap.cpp:
* runtime/MapData.cpp:
(JSC::MapData::ensureSpaceForAppend):
* runtime/PropertyTable.cpp:
(JSC::PropertyTable::PropertyTable):
* runtime/Structure.h:
* runtime/WriteBarrier.h:
* runtime/WriteBarrierInlines.h: Added.

Source/WebCore: 

* bindings/js/JSEventListener.cpp:
(WebCore::JSEventListener::JSEventListener):
* bindings/js/JSEventListener.h:
(WebCore::JSEventListener::jsFunction):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@163542 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Menclose with no notation attribute does not display anything.
https://bugs.webkit.org/show_bug.cgi?id=127889

Patch by Gurpreet Kaur <k.gurpreet@samsung.com> on 2014-02-06
Reviewed by Chris Fleizach.

Source/WebCore:

Menclose with no notation attribute should behave same as menclose with
notation attribute with value as longdiv. By default the division
symbol should be displayed. For empty and invalid notation attribute
nothing should be displayed.

Tests: mathml/presentation/menclose-notation-default-longdiv.html
       mathml/presentation/menclose-notation-invalid-empty.html

* mathml/MathMLMencloseElement.h:
* rendering/mathml/RenderMathMLMenclose.cpp:
(WebCore::RenderMathMLMenclose::computePreferredLogicalWidths):
(WebCore::RenderMathMLMenclose::paint):
Added style for menclose with no notation attribute and handled this
condition in paint also where for longdiv we are explicitly drawing
the division symbol.

LayoutTests:

* mathml/presentation/menclose-notation-default-longdiv.html: Added.
* mathml/presentation/menclose-notation-invalid-empty-expected.html: Added.
* mathml/presentation/menclose-notation-invalid-empty.html: Added.
* platform/efl/mathml/presentation/menclose-notation-default-longdiv-expected.png: Added.
* platform/efl/mathml/presentation/menclose-notation-default-longdiv-expected.txt: Added.
* platform/gtk/mathml/presentation/menclose-notation-default-longdiv-expected.png: Added.
* platform/gtk/mathml/presentation/menclose-notation-default-longdiv-expected.txt: Added.
* platform/mac/mathml/presentation/menclose-notation-default-longdiv-expected.png: Added.
* platform/mac/mathml/presentation/menclose-notation-default-longdiv-expected.txt: Added.
Added new test cases to test the functionality of menclose with no
notation attribute, invalid and empty notation attribute.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@163543 268f45cc-cd09-0410-ab3c-d52691b4dbfc
editing/caret/caret-color.html is flaky on WK2
https://bugs.webkit.org/show_bug.cgi?id=128315

* platform/mac-wk2/TestExpectations: Marked it as such.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@163544 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Modernize CrossOriginPreflightResultCache
https://bugs.webkit.org/show_bug.cgi?id=128309

Reviewed by Antti Koivisto.

Use std::chrono::steady_clock instead of currentTime() for determining when
cache items expire, Use std::unique_ptr instead of OwnPtr, use NeverDestroyed,
get rid of unnecessary container typedefs now that we have auto. Finally,
de-indent the entire class declaration.

* loader/CrossOriginPreflightResultCache.cpp:
(WebCore::CrossOriginPreflightResultCache::CrossOriginPreflightResultCache):
(WebCore::parseAccessControlMaxAge):
(WebCore::CrossOriginPreflightResultCacheItem::parse):
(WebCore::CrossOriginPreflightResultCacheItem::allowsRequest):
(WebCore::CrossOriginPreflightResultCache::shared):
(WebCore::CrossOriginPreflightResultCache::appendEntry):
(WebCore::CrossOriginPreflightResultCache::canSkipPreflight):
* loader/CrossOriginPreflightResultCache.h:
(WebCore::CrossOriginPreflightResultCacheItem::CrossOriginPreflightResultCacheItem):
* loader/DocumentThreadableLoader.cpp:
(WebCore::DocumentThreadableLoader::didReceiveResponse):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@163545 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[CSS Grid Layout] getComputedStyle() is wrong for grid-definition-{columns|rows}
https://bugs.webkit.org/show_bug.cgi?id=127033

Reviewed by Andreas Kling.

Source/WebCore:

Tests: fast/css-grid-layout/non-grid-columns-rows-get-set-multiple.html
       fast/css-grid-layout/non-grid-columns-rows-get-set.html
       fast/css-grid-layout/non-grid-element-repeat-get-set.html
       fast/css-grid-layout/non-named-grid-line-get-set.html

According to the specs getComputedStyle() should return the used
values instead of the resolved values for compatibility with early
implementations. This means that grid-definition-{columns|rows}
are now layout dependent as we need to compute the used values for
grid track sizes.

Updated the outcome of existing tests and added a bunch of new
ones that check the behavior of the different properties outside
grid containers.

* css/CSSComputedStyleDeclaration.cpp:
(WebCore::specifiedValueForGridTrackSize):
(WebCore::valueForGridTrackList):
(WebCore::isLayoutDependent):
(WebCore::ComputedStyleExtractor::propertyValue):
* rendering/RenderGrid.cpp:
(WebCore::RenderGrid::GridIterator::GridIterator):
(WebCore::RenderGrid::computedUsedBreadthOfGridTracks):
(WebCore::RenderGrid::computeUsedBreadthOfMinLength):
(WebCore::RenderGrid::computeUsedBreadthOfMaxLength):
(WebCore::RenderGrid::computeUsedBreadthOfSpecifiedLength):
(WebCore::RenderGrid::computeNormalizedFractionBreadth):
(WebCore::RenderGrid::gridTrackSize):
(WebCore::RenderGrid::minContentForChild):
(WebCore::RenderGrid::maxContentForChild):
(WebCore::RenderGrid::resolveContentBasedTrackSizingFunctions):
(WebCore::RenderGrid::resolveContentBasedTrackSizingFunctionsForItems):
(WebCore::RenderGrid::tracksAreWiderThanMinTrackBreadth):
(WebCore::RenderGrid::growGrid):
(WebCore::RenderGrid::autoPlacementMajorAxisDirection):
(WebCore::RenderGrid::autoPlacementMinorAxisDirection):
(WebCore::RenderGrid::layoutGridItems):
(WebCore::RenderGrid::resolveGridPositionsFromAutoPlacementPosition):
(WebCore::RenderGrid::resolveGridPositionsFromStyle):
(WebCore::RenderGrid::gridAreaBreadthForChild):
(WebCore::RenderGrid::populateGridPositions):
(WebCore::RenderGrid::findChildLogicalPosition):
* rendering/RenderGrid.h:

LayoutTests:

Updated the expected results of many tests, as we should expect
the used values instead of the resolved ones when asking for
getComputedStyle().

* fast/css-grid-layout/grid-columns-rows-get-set-expected.txt:
* fast/css-grid-layout/grid-columns-rows-get-set-multiple-expected.txt:
* fast/css-grid-layout/grid-columns-rows-get-set-multiple.html:
* fast/css-grid-layout/grid-columns-rows-get-set.html:
* fast/css-grid-layout/grid-element-repeat-get-set-expected.txt:
* fast/css-grid-layout/grid-element-repeat-get-set.html:
* fast/css-grid-layout/named-grid-line-get-set-expected.txt:
* fast/css-grid-layout/named-grid-line-get-set.html:
* fast/css-grid-layout/non-grid-columns-rows-get-set-expected.txt: Copied from LayoutTests/fast/css-grid-layout/grid-columns-rows-get-set-expected.txt.
* fast/css-grid-layout/non-grid-columns-rows-get-set-multiple-expected.txt: Copied from LayoutTests/fast/css-grid-layout/grid-columns-rows-get-set-multiple-expected.txt.
* fast/css-grid-layout/non-grid-columns-rows-get-set-multiple.html: Copied from LayoutTests/fast/css-grid-layout/grid-columns-rows-get-set-multiple.html.
* fast/css-grid-layout/non-grid-columns-rows-get-set.html: Copied from LayoutTests/fast/css-grid-layout/grid-columns-rows-get-set.html.
* fast/css-grid-layout/non-grid-element-repeat-get-set-expected.txt: Copied from LayoutTests/fast/css-grid-layout/grid-element-repeat-get-set-expected.txt.
* fast/css-grid-layout/non-grid-element-repeat-get-set.html: Copied from LayoutTests/fast/css-grid-layout/grid-element-repeat-get-set.html.
* fast/css-grid-layout/non-named-grid-line-get-set-expected.txt: Copied from LayoutTests/fast/css-grid-layout/named-grid-line-get-set-expected.txt.
* fast/css-grid-layout/non-named-grid-line-get-set.html: Added.
* fast/css-grid-layout/resources/grid-columns-rows-get-set-multiple.js:
(testInherit):
(testInitial):
* fast/css-grid-layout/resources/grid-columns-rows-get-set.js:
(testInherit):
(testInitial):
* fast/css-grid-layout/resources/grid-definitions-parsing-utils.js:
(testGridDefinitionsValues):
(checkGridDefinitionsSetJSValues):
* fast/css-grid-layout/resources/non-grid-columns-rows-get-set-multiple.js: Copied from LayoutTests/fast/css-grid-layout/resources/grid-columns-rows-get-set-multiple.js.
(testInherit):
(testInitial):
* fast/css-grid-layout/resources/non-grid-columns-rows-get-set.js: Copied from LayoutTests/fast/css-grid-layout/resources/grid-columns-rows-get-set.js.
(testInherit):
(testInitial):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@163547 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Fix a copy/paste mistake in TestExpectations.

* platform/mac/TestExpectations:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@163548 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Make 32bit pass the correct this value to custom getters
https://bugs.webkit.org/show_bug.cgi?id=128313

Reviewed by Mark Lam.

Now that the custom getter calling convetion uses a single register
for the slot base we can easily pass the correct |thisValue| instead
of simply relying on the thisValue not be relevant to existing
custom getters. This also means that 32bit can call custom getters
directly.

* jit/CCallHelpers.h:
(JSC::CCallHelpers::setupArgumentsWithExecState):
* jit/Repatch.cpp:
(JSC::generateProtoChainAccessStub):
(JSC::tryBuildGetByIDList):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@163549 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Try to fix the Windows build.

* loader/DocumentThreadableLoader.cpp:
(WebCore::DocumentThreadableLoader::didReceiveResponse):

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