Use const AtomicStringImpl* in DocumentOrderedMap
https://bugs.webkit.org/show_bug.cgi?id=119700

Reviewed by Benjamin Poulain.

Use const AtomicStringImpl* in DocumentOrderedMap. It caught at least one bug that HTMLNameCollection'
subclasses' nodeMatches were taking const AtomicString& instead of AtomicStringImpl*. This was forcing
DocumentOrderedMap::getElementByWindowNamedItem and DocumentOrderedMap::getElementByDocumentNamedItem
to create temporary AtomicStrings.

* dom/DocumentOrderedMap.cpp:
(WebCore::keyMatchesId):
(WebCore::keyMatchesName):
(WebCore::keyMatchesMapName):
(WebCore::keyMatchesLowercasedMapName):
(WebCore::keyMatchesLabelForAttribute):
(WebCore::keyMatchesWindowNamedItem):
(WebCore::keyMatchesDocumentNamedItem):
(WebCore::DocumentOrderedMap::add):
(WebCore::DocumentOrderedMap::remove):
(WebCore::DocumentOrderedMap::get):
(WebCore::DocumentOrderedMap::getElementById):
(WebCore::DocumentOrderedMap::getElementByName):
(WebCore::DocumentOrderedMap::getElementByMapName):
(WebCore::DocumentOrderedMap::getElementByLowercasedMapName):
(WebCore::DocumentOrderedMap::getElementByLabelForAttribute):
(WebCore::DocumentOrderedMap::getElementByWindowNamedItem):
(WebCore::DocumentOrderedMap::getElementByDocumentNamedItem):
(WebCore::DocumentOrderedMap::getAllElementsById):
* dom/DocumentOrderedMap.h:
(WebCore::DocumentOrderedMap::containsSingle):
(WebCore::DocumentOrderedMap::contains):
(WebCore::DocumentOrderedMap::containsMultiple):
* html/HTMLNameCollection.cpp:
(WebCore::WindowNameCollection::nodeMatches):
(WebCore::DocumentNameCollection::nodeMatches):
* html/HTMLNameCollection.h:
(WebCore::WindowNameCollection::nodeMatches):
(WebCore::DocumentNameCollection::nodeMatches):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@153959 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Layout Test fast/overflow/scrollbar-click-retains-focus.html is failing on Apple Mac WK1 and GTK.
https://bugs.webkit.org/show_bug.cgi?id=104104

Add back test expectation for Mac since it's still failing on ML WK1 bots.

* platform/mac/TestExpectations:
* platform/mac-wk2/TestExpectations:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@153960 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[cairo] memory corruption with putImageData and accelerated canvas.
https://bugs.webkit.org/show_bug.cgi?id=118621

Reviewed by Martin Robinson.

When we have an accelerated imageBuffer, and we putByteArray with a
non zero destPoint, we create temporary surface of sourceSize. Then,
we write to image data with an offset. This results in an out of bound
write.

In order to avoid that, we use a 0 offset when writing data.

In addition, we also create image with the minimal needed size in
getImageData, and also use a 0 offset. This decrease data transfer
between cpu and gpu

Instead of the map/unmap mechanism, perform an explicit surface copy
when needed. This change also removes an unneeded glReadPixels at the
start of putByteArray

Add two parameters to copyRectFromOneSurfaceToAnother: destination
offset, and cairo drawing operator.

No new tests. Accelerated canvas is not enabled for testing yet.

* platform/graphics/cairo/CairoUtilities.cpp:
(WebCore::copyRectFromOneSurfaceToAnother):
* platform/graphics/cairo/CairoUtilities.h:
* platform/graphics/cairo/ImageBufferCairo.cpp:
(WebCore::copySurfaceToImageAndAdjustRect):
(WebCore::getImageData):
(WebCore::ImageBuffer::putByteArray):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@153961 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Stop making unnecessary copy of CodeBlock Identifier Vector
https://bugs.webkit.org/show_bug.cgi?id=119702

Reviewed by Michael Saboff.

Make CodeBlock simply use a separate Vector for additional Identifiers
and use the UnlinkedCodeBlock for the initial set of identifiers.

* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::printGetByIdOp):
(JSC::dumpStructure):
(JSC::dumpChain):
(JSC::CodeBlock::printGetByIdCacheStatus):
(JSC::CodeBlock::printPutByIdOp):
(JSC::CodeBlock::dumpBytecode):
(JSC::CodeBlock::CodeBlock):
(JSC::CodeBlock::shrinkToFit):
* bytecode/CodeBlock.h:
(JSC::CodeBlock::numberOfIdentifiers):
(JSC::CodeBlock::numberOfAdditionalIdentifiers):
(JSC::CodeBlock::addAdditionalIdentifier):
(JSC::CodeBlock::identifier):
* dfg/DFGDesiredIdentifiers.cpp:
(JSC::DFG::DesiredIdentifiers::reallyAdd):
* jit/JIT.h:
* jit/JITOpcodes.cpp:
(JSC::JIT::emitSlow_op_get_arguments_length):
* jit/JITPropertyAccess.cpp:
(JSC::JIT::emit_op_get_by_id):
(JSC::JIT::compileGetByIdHotPath):
(JSC::JIT::emitSlow_op_get_by_id):
(JSC::JIT::compileGetByIdSlowCase):
(JSC::JIT::emitSlow_op_put_by_id):
* jit/JITPropertyAccess32_64.cpp:
(JSC::JIT::emit_op_get_by_id):
(JSC::JIT::compileGetByIdHotPath):
(JSC::JIT::compileGetByIdSlowCase):
* jit/JITStubs.cpp:
(JSC::DEFINE_STUB_FUNCTION):
* llint/LLIntSlowPaths.cpp:
(JSC::LLInt::LLINT_SLOW_PATH_DECL):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@153962 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Move additionalIdentifiers into DFGCommonData as only the optimising JITs use them
https://bugs.webkit.org/show_bug.cgi?id=119705

Reviewed by Geoffrey Garen.

Relatively trivial refactoring

* bytecode/CodeBlock.h:
(JSC::CodeBlock::numberOfAdditionalIdentifiers):
(JSC::CodeBlock::addAdditionalIdentifier):
(JSC::CodeBlock::identifier):
(JSC::CodeBlock::numberOfIdentifiers):
* dfg/DFGCommonData.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@153963 268f45cc-cd09-0410-ab3c-d52691b4dbfc
https://bugs.webkit.org/show_bug.cgi?id=119693
[Mac] security/contentSecurityPolicy/connect-src-websocket-blocked.html is flaky
because of connect-src-websocket-allowed.html

Reviewed by Darin Adler.

Starting a load of about:blank and immediately stopping it cancels outstanding
resource loads, but the page has to transition to committed state to have timers
or WebSockets stopped too.

* DumpRenderTree/mac/DumpRenderTree.mm: (runTest): Use a synchronous load to
ensure that transition to committed state happens before we start the next test.


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