Replace uses of ArgumentEncoder/ArgumentDecoder with MessageEncoder/MessageDecoder
https://bugs.webkit.org/show_bug.cgi?id=99746

Reviewed by Andreas Kling.

Change all occurrences of ArgumentDecoder* to MessageDecoder& and all occurrences of ArgumentEncoder*
to ArgumentEncoder& in all the message receivers. This is the second step towards getting rid of MessageID.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@131807 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[CSS Shaders] Validate types of built-in vertex attributes
https://bugs.webkit.org/show_bug.cgi?id=98972

Patch by Max Vujovic <mvujovic@adobe.com> on 2012-10-18
Reviewed by Dean Jackson.

Source/WebCore:

Reject custom filters in which the author defined built-in attributes with the wrong type.
For example, the GLSL declaration "attribute float a_position" is incorrect because
a_position should be a vec4, not a float.

Test: css3/filters/custom/invalid-custom-filter-attribute-types.html

* platform/graphics/ANGLEWebKitBridge.h:
(WebCore::ANGLEShaderSymbol::isSampler):
    Add const qualifier to isSampler method.
* platform/graphics/filters/CustomFilterValidatedProgram.cpp:
(WebCore):
(WebCore::builtInAttributeNameToTypeMap):
    New file static function. Returns a map of the CSS Custom Filters built-in attribute
    names and their expected types.
(WebCore::validateSymbols):
    New file static function. Loop through all of the symbols. Reject the shader if we find
    a built-in attribute defined with the wrong type.
(WebCore::CustomFilterValidatedProgram::CustomFilterValidatedProgram):
    Call the new validateSymbols function. If it returns false, exit the constructor early,
    which rejects the program.
    Move the loop that checks if any uniform is a sampler into the the validateSymbols
    function.

LayoutTests:

invalid-custom-filter-attribute-types.html uses a set of vertex shaders. Each vertex shader
defines a specific attribute with the wrong type. None of the vertex shaders in the test
should execute. If a vertex shader does execute, its associated fragment shader will render
a green div as red.

* css3/filters/custom/invalid-custom-filter-attribute-types-expected.html: Added.
* css3/filters/custom/invalid-custom-filter-attribute-types.html: Added.
* css3/filters/resources/invalid-type-a-mesh-coord.vs: Added.
* css3/filters/resources/invalid-type-a-position.vs: Added.
* css3/filters/resources/invalid-type-a-tex-coord.vs: Added.
* css3/filters/resources/invalid-type-a-triangle-coord.vs: Added.
* css3/filters/resources/invalid-type-attribute-array.vs: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@131809 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[chromium] Implement deferred image decoding
https://bugs.webkit.org/show_bug.cgi?id=94240

Reviewed by Stephen White.

Source/WebCore:

Objectives:

To record image decoding operations during painting and to defer
decoding operations until rasterization.

Rationale:

This is a key feature that enables impl-side painting which requires
fast recording of drawing operations. The existing decode-on-draw
restricts that recording has to block on expensive decoding operations.
This change allows recording of image decoding operations during paint
time.

Design:

Image decoding happens when a BitmapImage is drawn into a
GraphicsContext. When per-tile painting is enabled GraphicsContext
is backed by SkCanvas in recording mode. This SkCanvas records drawing
and image decoding operations to minimize recording time.

An image decoding operation is recorded as a SkPixelRef object
implemented by LazyDecodingPixelRef. This object references raw encoded
data, regions to be decoded and scaling information.

When used in conjunction with per-tile painting this feature defers
image decoding until the SkCanvas referencing the image is rasterized.

Both recording and rasterization happen on the main thread.

Performance Impact:

This feature is enabled by WebKit::setDeferredImageDecodingEnabled()
and does not have an impact when disabled.

This feature is disabled by default.

Upcoming Changes:

1. Implement a full-featured image cache in ImageDecodingStore.
2. Allow rasterization and decoding on impl thread.

Classes Involved:

BitmapImage

BitmapImage is the entry point for deferred image decoding. When
drawing a BitmapImage into a GraphicsContext it makes a request to
create a NativeImageSkia. We substitute the content in NativeImageSkia
such that it is lazily decoded.

DeferredImageDecoder

This is the platform implementation of a image decoder for Chromium.
This is a bridge layer that either delegates calls to the actual
ImageDecoder or create a lazily-decoded SkBitmap and delegates calls
to ImageDecodingStore.

ImageDecodingStore

This object manages all encoded images. It keeps track of encoded
data and the corresponding ImageDecoder for doing actual decoding. It
is also responsible for generating lazily decoded SkBitmaps. This
SkBitmap contains a LazyDecodingPixelRef object which references to an
image entry in ImageDecodingStore.

ScaledImageFragment

A container for a scaled image fragment. In addition to bitmap pixels
it contains information about the ID of the image, scale and clipping.

ImageFrameGenerator

This object is responsible for generating decoded pixels. It is also
a container for encoded image data and corresponding image decoder.

LazyDecodingPixelRef

This object is embedded in a SkBitmap to enable lazy decoding. When
SkBitmap needs to access pixels LazyDecodingPixelRef is locked. It
contains information to locate an image and scaling info, these
information is submitted to ImageDecodingStore to access actual pixels.

Layout tests. There are about 80 tests in this virtual test suite
running this feature in this directory:

platform/chromium/virtual/deferred/fast/images

Unit tests. Added DeferredImageDecoderTest to verify deferred
image decoding behavior.

* WebCore.gypi:
* platform/graphics/ImageSource.cpp:
(WebCore::ImageSource::setData):
* platform/graphics/ImageSource.h:
(WebCore):
(ImageSource):
* platform/graphics/chromium/DeferredImageDecoder.cpp: Added.
(WebCore):
(WebCore::DeferredImageDecoder::DeferredImageDecoder):
(WebCore::DeferredImageDecoder::~DeferredImageDecoder):
(WebCore::DeferredImageDecoder::create):
(WebCore::DeferredImageDecoder::createForTesting):
(WebCore::DeferredImageDecoder::filenameExtension):
(WebCore::DeferredImageDecoder::frameBufferAtIndex):
(WebCore::DeferredImageDecoder::setData):
(WebCore::DeferredImageDecoder::isSizeAvailable):
(WebCore::DeferredImageDecoder::size):
(WebCore::DeferredImageDecoder::frameSizeAtIndex):
(WebCore::DeferredImageDecoder::frameCount):
(WebCore::DeferredImageDecoder::repetitionCount):
(WebCore::DeferredImageDecoder::clearFrameBufferCache):
(WebCore::DeferredImageDecoder::frameHasAlphaAtIndex):
(WebCore::DeferredImageDecoder::frameBytesAtIndex):
* platform/graphics/chromium/DeferredImageDecoder.h: Added.
(WebCore):
(DeferredImageDecoder):
* platform/graphics/chromium/ImageDecodingStore.cpp: Added.
(WebCore::ImageDecodingStore::ImageDecodingStore):
(WebCore):
(WebCore::ImageDecodingStore::~ImageDecodingStore):
(WebCore::ImageDecodingStore::instanceOnMainThread):
(WebCore::ImageDecodingStore::initializeOnMainThread):
(WebCore::ImageDecodingStore::shutdown):
(WebCore::ImageDecodingStore::isLazyDecoded):
(WebCore::ImageDecodingStore::createLazyDecodedSkBitmap):
(WebCore::ImageDecodingStore::resizeLazyDecodedSkBitmap):
(WebCore::ImageDecodingStore::setData):
(WebCore::ImageDecodingStore::lockPixels):
(WebCore::ImageDecodingStore::unlockPixels):
(WebCore::ImageDecodingStore::frameGeneratorBeingDestroyed):
(WebCore::ImageDecodingStore::calledOnValidThread):
(WebCore::ImageDecodingStore::lookupFrameCache):
(WebCore::ImageDecodingStore::deleteFrameCache):
* platform/graphics/chromium/ImageDecodingStore.h: Added.
(WebCore):
(ImageDecodingStore):
(WebCore::ImageDecodingStore::create):
* platform/graphics/chromium/ScaledImageFragment.cpp: Added.
(WebCore):
(WebCore::ScaledImageFragment::~ScaledImageFragment):
(WebCore::ScaledImageFragment::ScaledImageFragment):
(WebCore::ScaledImageFragment::isEqual):
* platform/graphics/chromium/ScaledImageFragment.h: Added.
(WebCore):
(ScaledImageFragment):
(WebCore::ScaledImageFragment::create):
(WebCore::ScaledImageFragment::bitmap):
(WebCore::ScaledImageFragment::isComplete):
* platform/graphics/chromium/ImageFrameGenerator.cpp: Added.
(WebCore):
(WebCore::ImageFrameGenerator::ImageFrameGenerator):
(WebCore::ImageFrameGenerator::~ImageFrameGenerator):
(WebCore::ImageFrameGenerator::decoder):
(WebCore::ImageFrameGenerator::setData):
* platform/graphics/chromium/ImageFrameGenerator.h: Added.
(WebCore):
(ImageFrameGenerator):
(WebCore::ImageFrameGenerator::create):
(WebCore::ImageFrameGenerator::size):
(WebCore::ImageFrameGenerator::imageId):
* platform/graphics/chromium/LazyDecodingPixelRef.cpp: Added.
(WebCore):
(WebCore::LazyDecodingPixelRef::LazyDecodingPixelRef):
(WebCore::LazyDecodingPixelRef::~LazyDecodingPixelRef):
(WebCore::LazyDecodingPixelRef::isScaled):
(WebCore::LazyDecodingPixelRef::isClipped):
(WebCore::LazyDecodingPixelRef::onLockPixels):
(WebCore::LazyDecodingPixelRef::onUnlockPixels):
(WebCore::LazyDecodingPixelRef::onLockPixelsAreWritable):
* platform/graphics/chromium/LazyDecodingPixelRef.h: Added.
(WebCore):
(LazyDecodingPixelRef):
(WebCore::LazyDecodingPixelRef::frameGenerator):
* platform/graphics/skia/NativeImageSkia.cpp:
(WebCore::NativeImageSkia::resizedBitmap):
* platform/image-decoders/ImageDecoder.h:
(ImageFrame):
(WebCore::ImageFrame::setSkBitmap):
(WebCore::ImageFrame::getSkBitmap):

Source/WebKit/chromium:

Adding new unit tests for deferred image decoding.
These tests are defined in DeferredImageDecoderTest.cpp. They verify
image decoding happens only when SkPicture is rasterized for both
scaled and non-scaled cases.

Tests: DeferredImageDecoderTest.drawIntoSkPicture
       DeferredImageDecoderTest.drawScaledIntoSkPicture

* WebKit.gypi:
* public/WebSettings.h:
* src/WebKit.cpp:
(WebKit::shutdown):
* src/WebSettingsImpl.cpp:
(WebKit::WebSettingsImpl::setDeferredImageDecodingEnabled):
(WebKit):
* src/WebSettingsImpl.h:
(WebSettingsImpl):
* tests/DeferredImageDecoderTest.cpp: Added.
(WebCore):
(DeferredImageDecoderTest):
(WebCore::DeferredImageDecoderTest::SetUp):
(WebCore::DeferredImageDecoderTest::TearDown):
(WebCore::TEST_F):
* tests/MockImageDecoder.h: Added.
(WebCore):
(MockImageDecoder):
(WebCore::MockImageDecoder::MockImageDecoder):
(WebCore::MockImageDecoder::filenameExtension):
(WebCore::MockImageDecoder::frameBufferAtIndex):
(WebCore::MockImageDecoder::frameBufferRequestCount):

Tools:

Add --enable-deferred-image-decoding to DRT.

* DumpRenderTree/chromium/DumpRenderTree.cpp:
(main):
* DumpRenderTree/chromium/TestShell.cpp:
(TestShell::TestShell):
(TestShell::resetWebSettings):
* DumpRenderTree/chromium/TestShell.h:
(TestShell::setDeferredImageDecodingEnabled):
(TestShell):
* DumpRenderTree/chromium/WebPreferences.cpp:
(WebPreferences::reset):
(WebPreferences::applyTo):
* DumpRenderTree/chromium/WebPreferences.h:
(WebPreferences):
* Scripts/webkitpy/layout_tests/port/chromium.py:
(ChromiumPort.virtual_test_suites):

LayoutTests:

Adding a virtual test suite for Chromium to test deferred image
decoding.

platform/chromium/virtual/deferred/fast/images will be tested with
--force-compositing --enable-per-tile-painting --enable-deferred-image-decoding.

* platform/chromium/virtual/deferred/fast/images/README.txt: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@131810 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[chromium] update ML-specific failures
https://bugs.webkit.org/show_bug.cgi?id=99505

Unreviewed, expectations change.

* platform/chromium-mac-mountainlion/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@131812 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Add layout tests for wildcarded hosts in CSP directives.
https://bugs.webkit.org/show_bug.cgi?id=99693

Reviewed by Adam Barth.

Adds four test cases to ensure that wildcarded hosts in Content Security
Policy source expressions function correctly with and without paths,
and with wildcarded ports.

* http/tests/security/contentSecurityPolicy/source-list-parsing-09-expected.txt: Added.
* http/tests/security/contentSecurityPolicy/source-list-parsing-09.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@131813 268f45cc-cd09-0410-ab3c-d52691b4dbfc
MediaStream API: Do some cleanup in the chromium WebKit API
https://bugs.webkit.org/show_bug.cgi?id=99713

Reviewed by Adam Barth.

Source/Platform:

Removing the deprecated version of WebMediaStreamDescriptor::initialize and making
the two constructSDP functions in WebMediaStreamCenter optional to override.
This is part of the preparation to remove PeerConnection00.

* chromium/public/WebMediaStreamCenter.h:
(WebKit::WebMediaStreamCenter::constructSDP):
* chromium/public/WebMediaStreamDescriptor.h:
(WebMediaStreamDescriptor):

Source/WebCore:

Removing the deprecated version of WebMediaStreamDescriptor::initialize.

No testing needed since only an unused function is removed.

* platform/chromium/support/WebMediaStreamDescriptor.cpp:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@131814 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed, rolling out r131810.
http://trac.webkit.org/changeset/131810
https://bugs.webkit.org/show_bug.cgi?id=99762

Broke linux debug webkit_unit_tests (Requested by
danakj|gardening on #webkit).

Patch by Sheriff Bot <webkit.review.bot@gmail.com> on 2012-10-18

Source/WebCore:

* WebCore.gypi:
* platform/graphics/ImageSource.cpp:
(WebCore::ImageSource::setData):
* platform/graphics/ImageSource.h:
(WebCore):
(ImageSource):
* platform/graphics/chromium/DeferredImageDecoder.cpp: Removed.
* platform/graphics/chromium/DeferredImageDecoder.h: Removed.
* platform/graphics/chromium/ImageDecodingStore.cpp: Removed.
* platform/graphics/chromium/ImageDecodingStore.h: Removed.
* platform/graphics/chromium/ImageFrameGenerator.cpp: Removed.
* platform/graphics/chromium/ImageFrameGenerator.h: Removed.
* platform/graphics/chromium/LazyDecodingPixelRef.cpp: Removed.
* platform/graphics/chromium/LazyDecodingPixelRef.h: Removed.
* platform/graphics/chromium/ScaledImageFragment.cpp: Removed.
* platform/graphics/chromium/ScaledImageFragment.h: Removed.
* platform/graphics/skia/NativeImageSkia.cpp:
(WebCore::NativeImageSkia::resizedBitmap):
* platform/image-decoders/ImageDecoder.h:
(ImageFrame):

Source/WebKit/chromium:

* WebKit.gypi:
* public/WebSettings.h:
* src/WebKit.cpp:
(WebKit::shutdown):
* src/WebSettingsImpl.cpp:
(WebKit::WebSettingsImpl::WebSettingsImpl):
* src/WebSettingsImpl.h:
(WebSettingsImpl):
* tests/DeferredImageDecoderTest.cpp: Removed.
* tests/MockImageDecoder.h: Removed.

Tools:

* DumpRenderTree/chromium/DumpRenderTree.cpp:
(main):
* DumpRenderTree/chromium/TestShell.cpp:
(TestShell::TestShell):
(TestShell::resetWebSettings):
* DumpRenderTree/chromium/TestShell.h:
(TestShell):
* DumpRenderTree/chromium/WebPreferences.cpp:
(WebPreferences::reset):
(WebPreferences::applyTo):
* DumpRenderTree/chromium/WebPreferences.h:
(WebPreferences):
* Scripts/webkitpy/layout_tests/port/chromium.py:
(ChromiumPort.virtual_test_suites):

LayoutTests:

* platform/chromium/TestExpectations:
* platform/chromium/virtual/deferred/fast/images/README.txt: Removed.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@131815 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[BlackBerry] Page viewport aspect ratio not kept on navigating back
https://bugs.webkit.org/show_bug.cgi?id=99760

Reviewed by Rob Buis.
Patch by Jacky Jiang  <zhajiang@rim.com>.
Internally reviewed by Konrad Piascik.

PR: 190469
This was added in r127628 which was trying to fix some rendering
defects on maps.google.com and news.qq.com, however it was very harmful
and caused regressions.
zoomToFitScale() depends on the current contents size. During history
navigation and device rotation, if zoomToFitScale() is based on the
final contents size which is expected, there will still be a scale
calculation like this afterwards
screenSize.width()/screenSize.height()*zoomToFitScale() which will
result in a wrong scale. During the history navigation, if
zoomToFitScale() isn't based on the final contents size, then we will
get the wrong scale as well for sure.
This issue will be fixed by removing the wrong calculation.
The original issue of r127628 was fixed by the patch of PR225981.

* WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
(WebCore::FrameLoaderClientBlackBerry::restoreViewState):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@131816 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[chromium] fix lint errors/conflicts in ML TestExpectations

Unreviewed, expectations change.

* platform/chromium-mac-mountainlion/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@131817 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Live oversize copied blocks should count toward overall heap fragmentation
https://bugs.webkit.org/show_bug.cgi?id=99548

Reviewed by Filip Pizlo.

The CopiedSpace uses overall heap fragmentation to determine whether or not it should do any copying.
Currently it doesn't include live oversize CopiedBlocks in the calculation, but it should. We should
treat them as 100% utilized, since running a copying phase won't be able to free/compact any of their
memory. We can also free any dead oversize CopiedBlocks while we're iterating over them, rather than
iterating over them again at the end of the copying phase.

* heap/CopiedSpace.cpp:
(JSC::CopiedSpace::doneFillingBlock):
(JSC::CopiedSpace::startedCopying):
(JSC::CopiedSpace::doneCopying): Also removed a branch when iterating over from-space at the end of
copying. Since we eagerly recycle blocks as soon as they're fully evacuated, we should see no
unpinned blocks in from-space at the end of copying.
* heap/CopiedSpaceInlineMethods.h:
(JSC::CopiedSpace::recycleBorrowedBlock):
* heap/CopyVisitorInlineMethods.h:
(JSC::CopyVisitor::checkIfShouldCopy):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@131818 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Mac WTF build checks dependencies before copying header files
https://bugs.webkit.org/show_bug.cgi?id=99770

Reviewed by Geoffrey Garen.

Added a new build target "Copy WTF HEaders" to copy the header files and made that new target a dependency
for the main WTF build target.  Moved the "Copy WTF Headers" phase from WTF target to the new target.

* WTF.xcodeproj/project.pbxproj:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@131819 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[GTK] Invalid read from WebKit::DOMObjectCache::clearByFrame
https://bugs.webkit.org/show_bug.cgi?id=82882

Patch by Claudio Saavedra <csaavedra@igalia.com> on 2012-10-18
Reviewed by Xan Lopez.

Based on a patch by Milan Crha <mcrha@redhat.com>

Prevent an invalid access to a pointer while clearing the DOM
object cache.
* bindings/gobject/DOMObjectCache.cpp:
(WebKit::DOMObjectCache::clearByFrame): Prevent an invalid access.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@131820 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[chromium] Simplify TestInterfaces, as this class won't be directly exposed in the TestRunner library's interface
https://bugs.webkit.org/show_bug.cgi?id=99766

Reviewed by Adam Barth.

This reverts http://trac.webkit.org/changeset/123240

* DumpRenderTree/chromium/TestRunner/TestInterfaces.cpp:
(TestInterfaces::TestInterfaces):
(TestInterfaces::~TestInterfaces):
(TestInterfaces::setWebView):
(TestInterfaces::setDelegate):
(TestInterfaces::bindTo):
(TestInterfaces::resetAll):
(TestInterfaces::accessibilityController):
(TestInterfaces::eventSender):
* DumpRenderTree/chromium/TestRunner/TestInterfaces.h:
(TestInterfaces):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@131821 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Bytecode should not have responsibility for determining how to perform non-local resolves
https://bugs.webkit.org/show_bug.cgi?id=99349

Reviewed by Gavin Barraclough.

This patch removes lexical analysis from the bytecode generation.  This allows
us to delay lookup of a non-local variables until the lookup is actually necessary,
and simplifies a lot of the resolve logic in BytecodeGenerator.

Once a lookup is performed we cache the lookup information in a set of out-of-line
buffers in CodeBlock.  This allows subsequent lookups to avoid unnecessary hashing,
etc, and allows the respective JITs to recreated optimal lookup code.

This is currently still a performance regression in LLInt, but most of the remaining
regression is caused by a lot of indirection that I'll remove in future work, as well
as some work necessary to allow LLInt to perform in line instruction repatching.
We will also want to improve the behaviour of the baseline JIT for some of the lookup
operations, however this patch was getting quite large already so I'm landing it now
that we've reached the bar of "performance-neutral".

Basic browsing seems to work.

* GNUmakefile.list.am:
* JavaScriptCore.xcodeproj/project.pbxproj:
* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::printStructures):
(JSC::CodeBlock::dump):
(JSC::CodeBlock::CodeBlock):
(JSC::CodeBlock::visitStructures):
(JSC):
(JSC::CodeBlock::finalizeUnconditionally):
(JSC::CodeBlock::shrinkToFit):
* bytecode/CodeBlock.h:
(JSC::CodeBlock::addResolve):
(JSC::CodeBlock::addPutToBase):
(CodeBlock):
(JSC::CodeBlock::resolveOperations):
(JSC::CodeBlock::putToBaseOperation):
(JSC::CodeBlock::numberOfResolveOperations):
(JSC::CodeBlock::numberOfPutToBaseOperations):
(JSC::CodeBlock::addPropertyAccessInstruction):
(JSC::CodeBlock::globalObjectConstant):
(JSC::CodeBlock::setGlobalObjectConstant):
* bytecode/Opcode.h:
(JSC):
(JSC::padOpcodeName):
* bytecode/ResolveGlobalStatus.cpp:
(JSC::computeForStructure):
(JSC::ResolveGlobalStatus::computeFor):
* bytecode/ResolveGlobalStatus.h:
(JSC):
(ResolveGlobalStatus):
* bytecompiler/BytecodeGenerator.cpp:
(JSC::ResolveResult::checkValidity):
(JSC):
(JSC::BytecodeGenerator::BytecodeGenerator):
(JSC::BytecodeGenerator::resolve):
(JSC::BytecodeGenerator::resolveConstDecl):
(JSC::BytecodeGenerator::shouldAvoidResolveGlobal):
(JSC::BytecodeGenerator::emitResolve):
(JSC::BytecodeGenerator::emitResolveBase):
(JSC::BytecodeGenerator::emitResolveBaseForPut):
(JSC::BytecodeGenerator::emitResolveWithBaseForPut):
(JSC::BytecodeGenerator::emitResolveWithThis):
(JSC::BytecodeGenerator::emitGetLocalVar):
(JSC::BytecodeGenerator::emitInitGlobalConst):
(JSC::BytecodeGenerator::emitPutToBase):
* bytecompiler/BytecodeGenerator.h:
(JSC::ResolveResult::registerResolve):
(JSC::ResolveResult::dynamicResolve):
(ResolveResult):
(JSC::ResolveResult::ResolveResult):
(JSC):
(NonlocalResolveInfo):
(JSC::NonlocalResolveInfo::NonlocalResolveInfo):
(JSC::NonlocalResolveInfo::~NonlocalResolveInfo):
(JSC::NonlocalResolveInfo::resolved):
(JSC::NonlocalResolveInfo::put):
(BytecodeGenerator):
(JSC::BytecodeGenerator::getResolveOperations):
(JSC::BytecodeGenerator::getResolveWithThisOperations):
(JSC::BytecodeGenerator::getResolveBaseOperations):
(JSC::BytecodeGenerator::getResolveBaseForPutOperations):
(JSC::BytecodeGenerator::getResolveWithBaseForPutOperations):
(JSC::BytecodeGenerator::getPutToBaseOperation):
* bytecompiler/NodesCodegen.cpp:
(JSC::ResolveNode::isPure):
(JSC::FunctionCallResolveNode::emitBytecode):
(JSC::PostfixNode::emitResolve):
(JSC::PrefixNode::emitResolve):
(JSC::ReadModifyResolveNode::emitBytecode):
(JSC::AssignResolveNode::emitBytecode):
(JSC::ConstDeclNode::emitCodeSingle):
(JSC::ForInNode::emitBytecode):
* dfg/DFGAbstractState.cpp:
(JSC::DFG::AbstractState::execute):
* dfg/DFGByteCodeParser.cpp:
(ByteCodeParser):
(InlineStackEntry):
(JSC::DFG::ByteCodeParser::handleGetByOffset):
(DFG):
(JSC::DFG::ByteCodeParser::parseResolveOperations):
(JSC::DFG::ByteCodeParser::parseBlock):
(JSC::DFG::ByteCodeParser::InlineStackEntry::InlineStackEntry):
* dfg/DFGCapabilities.h:
(JSC::DFG::canInlineResolveOperations):
(DFG):
(JSC::DFG::canCompileOpcode):
(JSC::DFG::canInlineOpcode):
* dfg/DFGGraph.h:
(ResolveGlobalData):
(ResolveOperationData):
(DFG):
(PutToBaseOperationData):
(Graph):
* dfg/DFGNode.h:
(JSC::DFG::Node::hasIdentifier):
(JSC::DFG::Node::resolveOperationsDataIndex):
(Node):
* dfg/DFGNodeType.h:
(DFG):
* dfg/DFGOSRExit.cpp:
(JSC::DFG::OSRExit::OSRExit):
* dfg/DFGOSRExit.h:
(OSRExit):
* dfg/DFGOSRExitCompiler.cpp:
* dfg/DFGOSRExitCompiler32_64.cpp:
(JSC::DFG::OSRExitCompiler::compileExit):
* dfg/DFGOSRExitCompiler64.cpp:
(JSC::DFG::OSRExitCompiler::compileExit):
* dfg/DFGOperations.cpp:
* dfg/DFGOperations.h:
* dfg/DFGPredictionPropagationPhase.cpp:
(JSC::DFG::PredictionPropagationPhase::propagate):
* dfg/DFGRepatch.cpp:
(JSC::DFG::tryCacheGetByID):
* dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::convertLastOSRExitToForward):
* dfg/DFGSpeculativeJIT.h:
(JSC::DFG::SpeculativeJIT::resolveOperations):
(SpeculativeJIT):
(JSC::DFG::SpeculativeJIT::putToBaseOperation):
(JSC::DFG::SpeculativeJIT::callOperation):
* dfg/DFGSpeculativeJIT32_64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* dfg/DFGStructureCheckHoistingPhase.cpp:
(JSC::DFG::StructureCheckHoistingPhase::run):
* jit/JIT.cpp:
(JSC::JIT::privateCompileMainPass):
(JSC::JIT::privateCompileSlowCases):
* jit/JIT.h:
(JIT):
* jit/JITOpcodes.cpp:
(JSC::JIT::emit_op_put_to_base):
(JSC):
(JSC::JIT::emit_resolve_operations):
(JSC::JIT::emitSlow_link_resolve_operations):
(JSC::JIT::emit_op_resolve):
(JSC::JIT::emitSlow_op_resolve):
(JSC::JIT::emit_op_resolve_base):
(JSC::JIT::emitSlow_op_resolve_base):
(JSC::JIT::emit_op_resolve_with_base):
(JSC::JIT::emitSlow_op_resolve_with_base):
(JSC::JIT::emit_op_resolve_with_this):
(JSC::JIT::emitSlow_op_resolve_with_this):
(JSC::JIT::emitSlow_op_put_to_base):
* jit/JITOpcodes32_64.cpp:
(JSC::JIT::emit_op_put_to_base):
(JSC):
* jit/JITPropertyAccess.cpp:
(JSC::JIT::emit_op_init_global_const):
(JSC::JIT::emit_op_init_global_const_check):
(JSC::JIT::emitSlow_op_init_global_const_check):
* jit/JITPropertyAccess32_64.cpp:
(JSC::JIT::emit_op_init_global_const):
(JSC::JIT::emit_op_init_global_const_check):
(JSC::JIT::emitSlow_op_init_global_const_check):
* jit/JITStubs.cpp:
(JSC::DEFINE_STUB_FUNCTION):
(JSC):
* jit/JITStubs.h:
* llint/LLIntSlowPaths.cpp:
(LLInt):
(JSC::LLInt::LLINT_SLOW_PATH_DECL):
* llint/LLIntSlowPaths.h:
(LLInt):
* llint/LowLevelInterpreter.asm:
* llint/LowLevelInterpreter32_64.asm:
* llint/LowLevelInterpreter64.asm:
* runtime/JSScope.cpp:
(JSC::LookupResult::base):
(JSC::LookupResult::value):
(JSC::LookupResult::setBase):
(JSC::LookupResult::setValue):
(LookupResult):
(JSC):
(JSC::setPutPropertyAccessOffset):
(JSC::executeResolveOperations):
(JSC::JSScope::resolveContainingScopeInternal):
(JSC::JSScope::resolveContainingScope):
(JSC::JSScope::resolve):
(JSC::JSScope::resolveBase):
(JSC::JSScope::resolveWithBase):
(JSC::JSScope::resolveWithThis):
(JSC::JSScope::resolvePut):
(JSC::JSScope::resolveGlobal):
* runtime/JSScope.h:
(JSScope):
* runtime/JSVariableObject.cpp:
(JSC):
* runtime/JSVariableObject.h:
(JSVariableObject):
* runtime/Structure.h:
(JSC::Structure::propertyAccessesAreCacheable):
(Structure):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@131822 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[chromium] Re-enable gesture highlight layout tests, fix GestureLongPress regression.
https://bugs.webkit.org/show_bug.cgi?id=99632

Reviewed by James Robinson.

Re-enable layout tests for gesture highlights. Includes fix for GestureTapCancel test.

Source/WebKit/chromium:

* src/WebViewImpl.cpp:
(WebKit::WebViewImpl::handleGestureEvent):

LayoutTests:

* platform/chromium-linux/compositing/gestures/gesture-tapHighlight-simple-longPress.html:
* platform/chromium/TestExpectations:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@131823 268f45cc-cd09-0410-ab3c-d52691b4dbfc
REGRESSION(r130411): Copying & pasting the first line of text can move caret to the end of text area
https://bugs.webkit.org/show_bug.cgi?id=99663

Reviewed by Enrica Casucci and Levi Weintraub.

Source/WebCore: 

The bug was caused by positionOnlyToBeUpdated's offset not being shifted correctly in
ReplaceSelectionCommand::mergeTextNodesAroundPosition. Suppose we have text nodes t1 and t2 and
positionOnlyToBeUpdated had offset k in t2. When t2 is merged into t1, positionOnlyToBeUpdated should be
moved to (t1, n + k) where n is the ORIGINAL length of t1 before t2 is merged. But we were using
the length after t2 is merged.

Fixed the bug by saving the original length of t1 and using that in the offset adjustment.
Also use the right offset.

Test: editing/pasteboard/copy-paste-first-line-in-textarea.html

* editing/ReplaceSelectionCommand.cpp:
(WebCore::ReplaceSelectionCommand::mergeTextNodesAroundPosition):

LayoutTests: 

Add a regression test for copying and pasting the first line in a textarea with two lines of text.

* editing/pasteboard/copy-paste-first-line-in-textarea-expected.txt: Added.
* editing/pasteboard/copy-paste-first-line-in-textarea.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@131824 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Add support for float-valued prefernces
https://bugs.webkit.org/show_bug.cgi?id=99419

Patch by Jaehun Lim <ljaehun.lim@samsung.com> on 2012-10-18
Reviewed by Anders Carlsson.

Support float values for preferences in WK2.

* Shared/WebPreferencesStore.cpp:
(WebKit::WebPreferencesStore::encode):
(WebKit::WebPreferencesStore::decode):
(WebKit):
(WebKit::defaultValueForKey):
* Shared/WebPreferencesStore.h:
(WebKit):
(WebPreferencesStore):
* UIProcess/WebPreferences.cpp:
(WebKit::WebPreferences::updateFloatValueForKey):
(WebKit):
* UIProcess/WebPreferences.h:
(WebPreferences):
* UIProcess/cf/WebPreferencesCF.cpp:
(WebKit::WebPreferences::platformUpdateFloatValueForKey):
(WebKit):
* UIProcess/efl/WebPreferencesEfl.cpp:
(WebKit::WebPreferences::platformUpdateFloatValueForKey):
(WebKit):
* UIProcess/gtk/WebPreferencesGtk.cpp:
(WebKit::WebPreferences::platformUpdateFloatValueForKey):
(WebKit):
* UIProcess/mac/WebPreferencesMac.mm:
(WebKit::WebPreferences::platformUpdateFloatValueForKey):
(WebKit):
* UIProcess/qt/WebPreferencesQt.cpp:
(WebKit::WebPreferences::platformUpdateFloatValueForKey):
(WebKit):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@131825 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Build fix. Remove the svn:executable property from a bunch of files that have no business having it set.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@131826 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[chromium] garden-o-matic should ignore the 10.8 Tests bot
https://bugs.webkit.org/show_bug.cgi?id=99765

Reviewed by Adam Barth.

It's really more of an FYI bot at this point and can be safely
ignored like the Content Shell bots.

* BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/config.js:
(.):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@131827 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[chromium] move TestRunner files into a src/ sub directory
https://bugs.webkit.org/show_bug.cgi?id=99776

Reviewed by Adam Barth.

This is in preparation of adding a public API to the TestRunner library.

* DumpRenderTree/DumpRenderTree.gyp/DumpRenderTree.gyp:
* DumpRenderTree/DumpRenderTree.gypi:
* DumpRenderTree/chromium/DRTTestRunner.h:
* DumpRenderTree/chromium/TestRunner/src/AccessibilityControllerChromium.cpp: Renamed from Tools/DumpRenderTree/chromium/TestRunner/AccessibilityControllerChromium.cpp.
* DumpRenderTree/chromium/TestRunner/src/AccessibilityControllerChromium.h: Renamed from Tools/DumpRenderTree/chromium/TestRunner/AccessibilityControllerChromium.h.
* DumpRenderTree/chromium/TestRunner/src/AccessibilityUIElementChromium.cpp: Renamed from Tools/DumpRenderTree/chromium/TestRunner/AccessibilityUIElementChromium.cpp.
* DumpRenderTree/chromium/TestRunner/src/AccessibilityUIElementChromium.h: Renamed from Tools/DumpRenderTree/chromium/TestRunner/AccessibilityUIElementChromium.h.
* DumpRenderTree/chromium/TestRunner/src/CppBoundClass.cpp: Renamed from Tools/DumpRenderTree/chromium/TestRunner/CppBoundClass.cpp.
* DumpRenderTree/chromium/TestRunner/src/CppBoundClass.h: Renamed from Tools/DumpRenderTree/chromium/TestRunner/CppBoundClass.h.
* DumpRenderTree/chromium/TestRunner/src/CppVariant.cpp: Renamed from Tools/DumpRenderTree/chromium/TestRunner/CppVariant.cpp.
* DumpRenderTree/chromium/TestRunner/src/CppVariant.h: Renamed from Tools/DumpRenderTree/chromium/TestRunner/CppVariant.h.
* DumpRenderTree/chromium/TestRunner/src/EventSender.cpp: Renamed from Tools/DumpRenderTree/chromium/TestRunner/EventSender.cpp.
* DumpRenderTree/chromium/TestRunner/src/EventSender.h: Renamed from Tools/DumpRenderTree/chromium/TestRunner/EventSender.h.
* DumpRenderTree/chromium/TestRunner/src/GamepadController.cpp: Renamed from Tools/DumpRenderTree/chromium/TestRunner/GamepadController.cpp.
* DumpRenderTree/chromium/TestRunner/src/GamepadController.h: Renamed from Tools/DumpRenderTree/chromium/TestRunner/GamepadController.h.
* DumpRenderTree/chromium/TestRunner/src/Task.cpp: Renamed from Tools/DumpRenderTree/chromium/TestRunner/Task.cpp.
* DumpRenderTree/chromium/TestRunner/src/Task.h: Renamed from Tools/DumpRenderTree/chromium/TestRunner/Task.h.
* DumpRenderTree/chromium/TestRunner/src/TestDelegate.h: Renamed from Tools/DumpRenderTree/chromium/TestRunner/TestDelegate.h.
* DumpRenderTree/chromium/TestRunner/src/TestInterfaces.cpp: Renamed from Tools/DumpRenderTree/chromium/TestRunner/TestInterfaces.cpp.
* DumpRenderTree/chromium/TestRunner/src/TestInterfaces.h: Renamed from Tools/DumpRenderTree/chromium/TestRunner/TestInterfaces.h.
* DumpRenderTree/chromium/TestRunner/src/TestRunner.cpp: Renamed from Tools/DumpRenderTree/chromium/TestRunner/TestRunner.cpp.
* DumpRenderTree/chromium/TestRunner/src/TestRunner.h: Renamed from Tools/DumpRenderTree/chromium/TestRunner/TestRunner.h.
* DumpRenderTree/chromium/TestRunner/src/TextInputController.cpp: Renamed from Tools/DumpRenderTree/chromium/TestRunner/TextInputController.cpp.
* DumpRenderTree/chromium/TestRunner/src/TextInputController.h: Renamed from Tools/DumpRenderTree/chromium/TestRunner/TextInputController.h.


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