[Chromium] WebTouchCandidatesInfo should be part of the Client API
https://bugs.webkit.org/show_bug.cgi?id=93088

Reviewed by Eric Seidel.

Source/Platform:

All the input related interfaces are part of the client (rather than
the platform) part of the API. This patch moves WebTouchCandidatesInfo
to the client part of the API.

* Platform.gypi:
* chromium/public/WebTouchCandidatesInfo.h: Removed.

Source/WebKit/chromium:

* WebKit.gyp:
* public/WebTouchCandidatesInfo.h: Copied from Source/Platform/chromium/public/WebTouchCandidatesInfo.h.
* src/WebViewImpl.cpp:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@124813 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Out-of-process plug-ins should support asynchronous initialization
<rdar://problem/10598594> and https://bugs.webkit.org/show_bug.cgi?id=92919

Reviewed by Anders Carlsson.

Source/WebKit2:

If a plug-in has been deemed capable of asynchronous initialization when run out of process...
...then do that!

Add flags to communicate that this plugin create is meant to create a plug-in already requested asynchronously and
to include whether or not the initialize call should include an artificial delay (for testing):
* PluginProcess/PluginCreationParameters.cpp:
(WebKit::PluginCreationParameters::PluginCreationParameters):
(WebKit::PluginCreationParameters::encode):
(WebKit::PluginCreationParameters::decode):
* PluginProcess/PluginCreationParameters.h:
(PluginCreationParameters):

Add a flag for the UI Process to tell the PluginProcess that it supports asynchronous initialization:
* Shared/Plugins/PluginProcessCreationParameters.cpp:
(WebKit::PluginProcessCreationParameters::PluginProcessCreationParameters):
(WebKit::PluginProcessCreationParameters::encode):
(WebKit::PluginProcessCreationParameters::decode):
* Shared/Plugins/PluginProcessCreationParameters.h:
(PluginProcessCreationParameters):

Allow the UI Process to pass along whether the plug-on supports asynchronous initialization:
* UIProcess/Plugins/PluginProcessProxy.cpp:
(WebKit::PluginProcessProxy::pluginProcessCrashedOrFailedToLaunch):
(WebKit::PluginProcessProxy::didCreateWebProcessConnection):
* UIProcess/Plugins/PluginProcessProxy.h:
(PluginProcessProxy):
* UIProcess/Plugins/mac/PluginProcessProxyMac.mm:
(WebKit::PluginProcessProxy::platformInitializePluginProcess):
* UIProcess/WebProcessProxy.messages.in:

Allow the Plugin Process to pass whether or not it supports asynchronous initialization, originally determined
in the UI Process, along to the WebProcess:
* PluginProcess/PluginProcess.cpp:
(WebKit::PluginProcess::PluginProcess):
(WebKit::PluginProcess::initializePluginProcess):
(WebKit::PluginProcess::createWebProcessConnection):
* PluginProcess/PluginProcess.h:
(PluginProcess):
* UIProcess/Plugins/PluginProcessProxy.messages.in:

Add a flag so PluginProcessConnections remember whether or not they support asynchronous initialization:
* WebProcess/Plugins/PluginProcessConnection.cpp:
(WebKit::PluginProcessConnection::PluginProcessConnection):
(WebKit::PluginProcessConnection::setSupportsAsynchronousPluginInitialization):
(WebKit):
* WebProcess/Plugins/PluginProcessConnection.h:
(WebKit::PluginProcessConnection::create):
(WebKit::PluginProcessConnection::supportsAsynchronousPluginInitialization):
(PluginProcessConnection):

Create PluginProcessConnections with the flag passed down from the PluginProcess about whether or not they
support asynchronous initialization:
* WebProcess/Plugins/PluginProcessConnectionManager.cpp:
(WebKit::PluginProcessConnectionManager::getPluginProcessConnection):

Responding to messages from the WebProcess, most of the heavy decision making in asynchronous initialization is here:
* PluginProcess/WebProcessConnection.cpp:
(WebKit::asynchronousInstanceIDsToIgnore): A set of instance IDs to *not* create asynchronously later because we know
  we no longer need to.
(WebKit):
(WebKit::WebProcessConnection::didReceiveMessage):
(WebKit::WebProcessConnection::destroyPlugin): If the plug-in doesn't exist but is awaiting asynchronous creation, flag
  this instance ID in the "asynchronous ignore set".
(WebKit::WebProcessConnection::createPluginInternal): Renamed from createPlugin, actually does the plug-in creation.
(WebKit::WebProcessConnection::createPlugin): Adds the instance ID to the "asynchronous ignore set" then calls createPluginInternal.
(WebKit::WebProcessConnection::createPluginAsynchronously): If the instance ID is in the "asynchronous ignore set", remove it from the
  set and do nothing else. Otherwise, perform the initialization and then send the asynchronous result back to the WebProcess.
* PluginProcess/WebProcessConnection.h:
(WebProcessConnection):
* PluginProcess/WebProcessConnection.messages.in:

Add helpers for asynchronous initialization that all plug-in types must implement:
* WebProcess/Plugins/Plugin.h:
(Plugin):

Add helpers for asynchronous initialization that plug-in controllers can override:
* WebProcess/Plugins/PluginController.h:
(PluginController):
(WebKit::PluginController::asynchronousPluginInitializationEnabled):
(WebKit::PluginController::asynchronousPluginInitializationEnabledForAllPlugins):
(WebKit::PluginController::artificialPluginInitializationDelayEnabled):

Give PluginProxys the ability to initialize either asynchronously or synchronously, and also the ability to synchronously
wait for previously asynchronous initialization (in case their PluginScriptObject is required):
* WebProcess/Plugins/PluginProxy.cpp:
(WebKit::PluginProxy::PluginProxy):
(WebKit::PluginProxy::initialize): Store the plugin creation parameters as a member, and decide whether to try synchronous
  or asynchronous initialization.
(WebKit):
(WebKit::PluginProxy::canInitializeAsynchronously): Answer based on preferences and what the PluginProcessConnection says
  that it supports.
(WebKit::PluginProxy::waitForAsynchronousInitialization): Synchronously wait on initialization when asynchronous initialization
  was previously requested.
(WebKit::PluginProxy::initializeSynchronously):
(WebKit::PluginProxy::didCreatePlugin): Double-check that we're still expecting asynchronous initialization, then call
  through to didCreatePluginInternal.
(WebKit::PluginProxy::didCreatePluginInternal): Handle completion of initialization (both synchronously and asynchronously)
(WebKit::PluginProxy::didFailToCreatePlugin): Double-check that we're still expecting asynchronous initialization, then call
  through to didFailToCreatePluginInternal.
(WebKit::PluginProxy::didFailToCreatePluginInternal): Handle failure to initialize (both synchronously and asynchronously)
(WebKit::PluginProxy::destroy):
* WebProcess/Plugins/PluginProxy.h:
(WebKit):
(WebKit::PluginProxy::isInitializingAsynchronously):
(PluginProxy):
* WebProcess/Plugins/PluginProxy.messages.in:

* WebProcess/Plugins/PluginView.cpp:
(WebKit::PluginView::PluginView):
(WebKit::PluginView::~PluginView): Always destroy the plug-in even if it hasn't been initialized yet, as it might be initializing
  right now.
(WebKit::PluginView::initializePlugin): Don't handle the result of initialization immediately. Break that out in to two
  methods that will be called later.
(WebKit):
(WebKit::PluginView::didFailToInitializePlugin):
(WebKit::PluginView::didInitializePlugin):
(WebKit::PluginView::scriptObject): If we truly need the script object, then wait for a synchronous initialization of the plug-in.
(WebKit::PluginView::asynchronousPluginInitializationEnabled):
(WebKit::PluginView::asynchronousPluginInitializationEnabledForAllPlugins):
(WebKit::PluginView::artificialPluginInitializationDelayEnabled):
* WebProcess/Plugins/PluginView.h:
(PluginView):

These methods shouldn't be called in the PluginProcess, only in the WebProcess:
* PluginProcess/PluginControllerProxy.cpp:
(WebKit::PluginControllerProxy::didInitializePlugin):
(WebKit):
(WebKit::PluginControllerProxy::didFailToInitializePlugin):
* PluginProcess/PluginControllerProxy.h:
(PluginControllerProxy):

NetscapePlugin is for in-process plug-ins:
* WebProcess/Plugins/Netscape/NetscapePlugin.h:
(NetscapePlugin):
(WebKit::NetscapePlugin::waitForAsynchronousInitialization):
(WebKit::NetscapePlugin::isInitializingAsynchronously):

Built-in PDFView is currently only in-process:
* WebProcess/Plugins/PDF/BuiltInPDFView.h:
(BuiltInPDFView):
(WebKit::BuiltInPDFView::waitForAsynchronousInitialization):
(WebKit::BuiltInPDFView::isInitializingAsynchronously):

Tools:

Add a plug-in with an NPP_New that takes 550ms (a reasonable trade-off between a solid test and a slow running test)
for testing asynchronous plug-in initialization.

* DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj:
* DumpRenderTree/TestNetscapePlugIn/Tests/SlowNPPNew.cpp: Copied from Source/WebKit2/Shared/Plugins/PluginProcessCreationParameters.h.
(SlowNPPNew):
(SlowNPPNew::SlowNPPNew):
(SlowNPPNew::NPP_New):

LayoutTests:

Add tests to make sure a plug-in with a long running NPP_New does not block the web thread.

* platform/mac-wk2/plugins/slow/asynchronous-plugin-initialization-expected.txt: Added.
* platform/mac-wk2/plugins/slow/asynchronous-plugin-initialization-multiple-expected.txt: Added.
* platform/mac-wk2/plugins/slow/asynchronous-plugin-initialization-multiple.html: Added.
* platform/mac-wk2/plugins/slow/asynchronous-plugin-initialization.html: Added.
* platform/mac-wk2/plugins/slow/resources/asynchronous-plugin-initialization-multiple-finish.html: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@124815 268f45cc-cd09-0410-ab3c-d52691b4dbfc
GraphicsLayerAnimation shouldn't use HashMap<String>
https://bugs.webkit.org/show_bug.cgi?id=93284

Reviewed by Kenneth Rohde Christiansen.

Source/WebCore:

Use a vector containing all the animations instead of a map of String to Vector.
The HashMap contains very few elements, which makes it inefficient relatively to a vector.
This has been shown to be a bottleneck in valgrind.

Covered by existing animation tests.

* platform/graphics/GraphicsLayerAnimation.cpp:
(WebCore::GraphicsLayerAnimation::GraphicsLayerAnimation):
(WebCore::GraphicsLayerAnimations::hasActiveAnimationsOfType):
(WebCore::GraphicsLayerAnimations::hasRunningAnimations):
(WebCore::GraphicsLayerAnimations::add):
(WebCore::GraphicsLayerAnimations::pause):
(WebCore::GraphicsLayerAnimations::remove):
(WebCore::GraphicsLayerAnimations::apply):
* platform/graphics/GraphicsLayerAnimation.h:
(GraphicsLayerAnimation):
(WebCore::GraphicsLayerAnimation::name):
(GraphicsLayerAnimations):
* platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
(WebCore::GraphicsLayerTextureMapper::addAnimation):

Source/WebKit2:

Apply the changes to GraphicsLayerAnimation API.

* WebProcess/WebPage/CoordinatedGraphics/CoordinatedGraphicsLayer.cpp:
(WebCore::CoordinatedGraphicsLayer::addAnimation):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@124816 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unify JSC date and time formating functions
https://bugs.webkit.org/show_bug.cgi?id=92282

Reviewed by Geoffrey Garen.

Replace the existing functions for formating GregorianDateTime
with one single function. This removes some code duplications
in DatePrototype and is a preperation to fix encoding issues,
since we can add UChar* values to the resulting string now.

* runtime/DateConstructor.cpp:
(JSC::callDate):
* runtime/DateConversion.cpp:
(JSC::formatDateTime):
* runtime/DateConversion.h:
(JSC):
* runtime/DatePrototype.cpp:
(JSC::formateDateInstance):
(JSC::dateProtoFuncToString):
(JSC::dateProtoFuncToUTCString):
(JSC::dateProtoFuncToDateString):
(JSC::dateProtoFuncToTimeString):
(JSC::dateProtoFuncToGMTString):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@124817 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[CSS Shaders] Parse mix function
https://bugs.webkit.org/show_bug.cgi?id=90101

Patch by Max Vujovic <mvujovic@adobe.com> on 2012-08-06
Reviewed by Dirk Schulze.

Source/WebCore:

Parse the mix function syntax for CSS Shaders as defined in the Filter Effects spec:
https://dvcs.w3.org/hg/FXTF/raw-file/tip/filters/index.html#FilterFunction

The fragment shader argument of the custom filter function can now be a mix function with
the following syntax:
mix(<uri> [ <blend-mode> || <alpha-compositing> ]?)

For example:
-webkit-filter: custom(url(shader.vert) mix(url(shader.frag multiply source-over))

The Filter Effects spec references the Compositing and Blending spec, which defines the
supported blend modes and alpha compositing modes.

Blend modes:
https://dvcs.w3.org/hg/FXTF/rawfile/tip/compositing/index.html#blend-mode

This patch adds all of the blend modes in the spec.

Alpha compositing modes:
https://dvcs.w3.org/hg/FXTF/rawfile/tip/compositing/index.html#alpha-compositing

This patch does not add any new CSS values for alpha compositing. Currently, we parse the
values that are the same between the spec and the -webkit-background-composite property,
including:
    clear
    copy
    source-over
    source-in
    source-out
    source-atop
    destination-over
    destination-in
    destination-out
    destination-atop
    xor

In the future, we may need to add the following CSS values for alpha compositing:
    lighter
    destination

This is currently under discussion on the www-style mailing list:
http://lists.w3.org/Archives/Public/www-style/2012Aug/0123.html

No new test files. Add test cases in:
    css3/filters/script-tests/custom-filter-property-computed-style.js:
    css3/filters/script-tests/custom-filter-property-parsing-invalid.js:
    css3/filters/script-tests/custom-filter-property-parsing.js:

* GNUmakefile.list.am:
* Target.pri:
* WebCore.gypi:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.xcodeproj/project.pbxproj:
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::CSSComputedStyleDeclaration::valueForFilter):
* css/CSSParser.cpp:
(WebCore::CSSParser::isBlendMode):
(WebCore):
(WebCore::CSSParser::isCompositeOperator):
(WebCore::CSSParser::parseMixFunction):
(WebCore::CSSParser::parseCustomFilter):
* css/CSSParser.h:
(WebCore):
* css/CSSParserValues.h:
(WebCore::CSSParserValueList::currentIndex):
* css/CSSPrimitiveValueMappings.h:
(WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
(WebCore):
(WebCore::CSSPrimitiveValue::operator BlendMode):
* css/CSSValue.cpp:
(WebCore::CSSValue::reportMemoryUsage):
(WebCore::CSSValue::cssText):
(WebCore::CSSValue::destroy):
(WebCore::CSSValue::cloneForCSSOM):
* css/CSSValue.h:
(WebCore::CSSValue::isWebKitCSSMixFunctionValue):
(CSSValue):
* css/CSSValueKeywords.in:
* css/StyleResolver.cpp:
(WebCore::StyleResolver::collectMatchingRulesForList):
* css/WebKitCSSMixFunctionValue.cpp: Added.
(WebCore):
(WebCore::WebKitCSSMixFunctionValue::WebKitCSSMixFunctionValue):
(WebCore::WebKitCSSMixFunctionValue::customCssText):
(WebCore::WebKitCSSMixFunctionValue::cloneForCSSOM):
(WebCore::WebKitCSSMixFunctionValue::reportDescendantMemoryUsage):
* css/WebKitCSSMixFunctionValue.h: Added.
(WebCore):
(WebKitCSSMixFunctionValue):
(WebCore::WebKitCSSMixFunctionValue::create):
* platform/graphics/GraphicsTypes.h:
* platform/graphics/filters/CustomFilterProgram.cpp:
(WebCore::CustomFilterProgram::CustomFilterProgram):
* platform/graphics/filters/CustomFilterProgram.h:
(WebCore::CustomFilterProgramMixSettings::CustomFilterProgramMixSettings):
(CustomFilterProgramMixSettings):
(WebCore):
* rendering/style/StyleCustomFilterProgram.h:
(WebCore::StyleCustomFilterProgram::create):
(WebCore::StyleCustomFilterProgram::StyleCustomFilterProgram):

LayoutTests:

Add tests for custom filter mix function parsing as defined in the Filter Effects spec:
https://dvcs.w3.org/hg/FXTF/raw-file/tip/filters/index.html#FilterFunction

Remove some mac-wk2 and chromium expectations because they are the same as the general
expectations.

* css3/filters/custom/custom-filter-property-computed-style-expected.txt:
* css3/filters/custom/custom-filter-property-parsing-expected.txt:
* css3/filters/custom/custom-filter-property-parsing-invalid-expected.txt:
* css3/filters/script-tests/custom-filter-property-computed-style.js:
* css3/filters/script-tests/custom-filter-property-parsing-invalid.js:
* css3/filters/script-tests/custom-filter-property-parsing.js:
* platform/chromium/css3/filters/custom/custom-filter-property-computed-style-expected.txt:
* platform/chromium/css3/filters/custom/custom-filter-property-parsing-expected.txt:
* platform/chromium/css3/filters/custom/custom-filter-property-parsing-invalid-expected.txt: Removed.
* platform/mac-wk2/css3/filters/custom/custom-filter-property-computed-style-expected.txt: Removed.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@124820 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[WIN] Remove dependency on pthread from MachineStackMarker
https://bugs.webkit.org/show_bug.cgi?id=68429

Reviewed by Geoffrey Garen.

Windows has no support for calling a destructor for thread specific data.
Since we need more control over creating and deleting thread specific keys
we can not simply extend WTF::ThreadSpecific with this functionality.

All thread specific keys created via the new API get stored in a list.
After a thread function finished we iterate over this list and call
the registered destructor for every item if needed.

Source/JavaScriptCore:

* heap/MachineStackMarker.cpp:  Use the new functions instead of pthread directly.
(JSC::MachineThreads::~MachineThreads):
(JSC::MachineThreads::makeUsableFromMultipleThreads):
(JSC::MachineThreads::addCurrentThread):
* heap/MachineStackMarker.h:
(MachineThreads):

Source/WTF:

* wtf/ThreadSpecific.h:
(WTF):
(WTF::threadSpecificKeyCreate): Added wrapper around pthread_key_create.
(WTF::threadSpecificKeyDelete): Added wrapper around pthread_key_delete.
(WTF::threadSpecificSet): Added wrapper around pthread_setspecific.
(WTF::threadSpecificGet): Added wrapper around pthread_getspecific.
* wtf/ThreadSpecificWin.cpp:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@124823 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[CSS Exclusions] Add a command-line flag to enable / disable exclusions
https://bugs.webkit.org/show_bug.cgi?id=91420

Patch by Bear Travis <betravis@adobe.com> on 2012-08-06
Reviewed by Dimitri Glazkov.

Adding the interface code to expose the css exclusions runtime flag to
Chromium.

* public/WebRuntimeFeatures.h:
(WebRuntimeFeatures): Adding getters/setters for cssExclusions
* src/WebRuntimeFeatures.cpp:
(WebKit::WebRuntimeFeatures::enableCSSExclusions):
(WebKit):
(WebKit::WebRuntimeFeatures::isCSSExclusionsEnabled):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@124824 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed, rolling out r124816.
http://trac.webkit.org/changeset/124816
https://bugs.webkit.org/show_bug.cgi?id=93311

made some tests crash (Requested by noamr on #webkit).

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

Source/WebCore:

* platform/graphics/GraphicsLayerAnimation.cpp:
(WebCore::GraphicsLayerAnimation::GraphicsLayerAnimation):
(WebCore::GraphicsLayerAnimations::hasActiveAnimationsOfType):
(WebCore::GraphicsLayerAnimations::hasRunningAnimations):
(WebCore::GraphicsLayerAnimations::add):
(WebCore::GraphicsLayerAnimations::pause):
(WebCore::GraphicsLayerAnimations::apply):
* platform/graphics/GraphicsLayerAnimation.h:
(GraphicsLayerAnimation):
(GraphicsLayerAnimations):
(WebCore::GraphicsLayerAnimations::remove):
* platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
(WebCore::GraphicsLayerTextureMapper::addAnimation):

Source/WebKit2:

* WebProcess/WebPage/CoordinatedGraphics/CoordinatedGraphicsLayer.cpp:
(WebCore::CoordinatedGraphicsLayer::addAnimation):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@124825 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[GTK] Cleanup configure.ac build options output
https://bugs.webkit.org/show_bug.cgi?id=93245

Patch by Xan Lopez <xlopez@igalia.com> on 2012-08-06
Reviewed by Laszlo Gombos.

Remove duplicated elements, sort alphabetically.

* configure.ac: ditto.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@124826 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Clear out the TileCache backpointer for all tile layers when the tile cache is destroyed
https://bugs.webkit.org/show_bug.cgi?id=93317
<rdar://problem/11566543>

Reviewed by Dean Jackson.

It seems that in some rare cases, the tile cache layer can be destroyed in the same transaction as tile layers
are being asked to paint. Make sure to null out the TileCache back pointer for all layers in the TileCache destructor.

* platform/graphics/ca/mac/TileCache.mm:
(WebCore::TileCache::~TileCache):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@124829 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Chromium] Rename CCTextureUpdater to CCTextureUpdateQueue.
https://bugs.webkit.org/show_bug.cgi?id=93293

Patch by David Reveman <reveman@chromium.org> on 2012-08-06
Reviewed by Adrienne Walker.

Source/WebCore:

No new tests.

* WebCore.gypi:
* platform/graphics/chromium/ContentLayerChromium.cpp:
(WebCore::ContentLayerChromium::update):
* platform/graphics/chromium/ContentLayerChromium.h:
(ContentLayerChromium):
* platform/graphics/chromium/HeadsUpDisplayLayerChromium.cpp:
(WebCore::HeadsUpDisplayLayerChromium::update):
* platform/graphics/chromium/HeadsUpDisplayLayerChromium.h:
(HeadsUpDisplayLayerChromium):
* platform/graphics/chromium/ImageLayerChromium.cpp:
(WebCore::ImageLayerChromium::update):
* platform/graphics/chromium/ImageLayerChromium.h:
(ImageLayerChromium):
* platform/graphics/chromium/LayerChromium.h:
(WebCore):
(WebCore::LayerChromium::update):
* platform/graphics/chromium/ScrollbarLayerChromium.cpp:
(WebCore::ScrollbarLayerChromium::updatePart):
(WebCore::ScrollbarLayerChromium::update):
* platform/graphics/chromium/ScrollbarLayerChromium.h:
(WebCore):
(ScrollbarLayerChromium):
* platform/graphics/chromium/TextureLayerChromium.cpp:
(WebCore::TextureLayerChromium::update):
* platform/graphics/chromium/TextureLayerChromium.h:
(TextureLayerChromiumClient):
(TextureLayerChromium):
* platform/graphics/chromium/TiledLayerChromium.cpp:
(WebCore::TiledLayerChromium::updateTiles):
(WebCore::TiledLayerChromium::updateContentRect):
* platform/graphics/chromium/TiledLayerChromium.h:
(TiledLayerChromium):
* platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
(WebCore::CCLayerTreeHost::updateLayers):
(WebCore::CCLayerTreeHost::paintMasksForRenderSurface):
(WebCore::CCLayerTreeHost::paintLayerContents):
* platform/graphics/chromium/cc/CCLayerTreeHost.h:
(WebCore):
(CCLayerTreeHost):
* platform/graphics/chromium/cc/CCSingleThreadProxy.cpp:
(WebCore::CCSingleThreadProxy::doCommit):
(WebCore::CCSingleThreadProxy::commitAndComposite):
* platform/graphics/chromium/cc/CCSingleThreadProxy.h:
* platform/graphics/chromium/cc/CCTextureUpdateController.cpp:
(WebCore::CCTextureUpdateController::updateTextures):
(WebCore::CCTextureUpdateController::CCTextureUpdateController):
(WebCore::CCTextureUpdateController::hasMoreUpdates):
(WebCore::CCTextureUpdateController::updateMoreTextures):
* platform/graphics/chromium/cc/CCTextureUpdateController.h:
(WebCore::CCTextureUpdateController::create):
(CCTextureUpdateController):
* platform/graphics/chromium/cc/CCTextureUpdateQueue.cpp: Renamed from Source/WebCore/platform/graphics/chromium/cc/CCTextureUpdater.cpp.
(WebCore):
(WebCore::CCTextureUpdateQueue::CCTextureUpdateQueue):
(WebCore::CCTextureUpdateQueue::~CCTextureUpdateQueue):
(WebCore::CCTextureUpdateQueue::appendFullUpload):
(WebCore::CCTextureUpdateQueue::appendPartialUpload):
(WebCore::CCTextureUpdateQueue::appendCopy):
(WebCore::CCTextureUpdateQueue::takeFirstFullUpload):
(WebCore::CCTextureUpdateQueue::takeFirstPartialUpload):
(WebCore::CCTextureUpdateQueue::takeFirstCopy):
(WebCore::CCTextureUpdateQueue::hasMoreUpdates):
* platform/graphics/chromium/cc/CCTextureUpdateQueue.h: Renamed from Source/WebCore/platform/graphics/chromium/cc/CCTextureUpdater.h.
(WebCore):
(CCTextureUpdateQueue):
(WebCore::CCTextureUpdateQueue::fullUploadSize):
(WebCore::CCTextureUpdateQueue::partialUploadSize):
(WebCore::CCTextureUpdateQueue::copySize):
* platform/graphics/chromium/cc/CCThreadProxy.cpp:
(WebCore::CCThreadProxy::beginFrame):
(WebCore::CCThreadProxy::beginFrameCompleteOnImplThread):
* platform/graphics/chromium/cc/CCThreadProxy.h:
(WebCore):
(CCThreadProxy):

Source/WebKit/chromium:

* src/WebExternalTextureLayer.cpp:
(WebKit::WebTextureUpdaterImpl::WebTextureUpdaterImpl):
* tests/CCLayerTreeHostTest.cpp:
(WTF::CCLayerTreeHostTestLayerOcclusion::beginTest):
(WTF::CCLayerTreeHostTestLayerOcclusionWithFilters::beginTest):
(WTF::CCLayerTreeHostTestManySurfaces::beginTest):
* tests/CCTextureUpdateControllerTest.cpp:
* tests/CCThreadedTest.cpp:
* tests/CCTiledLayerTestCommon.cpp:
(WebKitTests::FakeTiledLayerChromium::update):
* tests/CCTiledLayerTestCommon.h:
(FakeTiledLayerChromium):
* tests/Canvas2DLayerBridgeTest.cpp:
* tests/TiledLayerChromiumTest.cpp:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@124830 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTest: fast/forms/validation-message-user-modify.html fails.
https://bugs.webkit.org/show_bug.cgi?id=93207

Patch by Roger Fong <roger_fong@apple.com> on 2012-08-06
Reviewed by Tim Horton.

This test uses the "required" form element property which currently does not work on Safari,
see <rdar://problem/119655018>.
This test should not be run.

* platform/win/Skipped:
Adding test to skip list.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@124831 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[chromium] Update chromium DEPS r150037 -> r150169
https://bugs.webkit.org/show_bug.cgi?id=93309

As the title says. Unreviewed.

Patch by James Robinson <jamesr@chromium.org> on 2012-08-06

* DEPS:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@124832 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Handle variables in CSSParser::parseValidPrimitive(), preventing null return value.
https://bugs.webkit.org/show_bug.cgi?id=93235

Reviewed by Tony Chang.

Source/WebCore:

By returning null here (and failing to handle the variable) the current code would cause null pointer dereferences in StyleResolver at several points.
Instead we create a primitive value for the variable reference and return it.

Test: fast/css/variables/invalid-font-reference.html

* css/CSSParser.cpp:
(WebCore::CSSParser::parseValidPrimitive):

LayoutTests:

Exercises the code path where variables are parsed in CSSParser::parseValidPrimitive().

* fast/css/variables/invalid-font-reference-expected.txt: Added.
* fast/css/variables/invalid-font-reference.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@124833 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Chromium-Mac] Use the default locale only if the browser locale matches to it
https://bugs.webkit.org/show_bug.cgi?id=93227

Reviewed by Hajime Morita.

For a calendar picker, we have used month names and day-of-week names
obtained from the OS default locale. However, the year-month format and
[Today] [Clear] labels are decided with the browser locale. It made
calendar pickers with mixed languages.

To make calendar pickers with a single language, we use the OS default
locale only if the browser locale matches to it.

No new tests. Behavior for locale setting is not testable in WebKit.

* platform/text/mac/LocaleMac.mm:
(WebCore::languageFromLocale):
A helper for determineLocale. This returns the language part of the
specified locale identifier.
(WebCore::determineLocale):
If the browser language matches to the language of the current NSLocale,
returns the current NSLocale. Otherwise, returns a NSLocale with the
browser language.
Note that [NSLolca localeIdentifier] returns a string in
<language>_<country> format though defaultLanguage() in Chromium returns
a string in <language>-<country> format.
(WebCore::LocaleMac::currentLocale):
Use determineLocale.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@124834 268f45cc-cd09-0410-ab3c-d52691b4dbfc
JSC should use BindingState to determine the activeDOMWindow
https://bugs.webkit.org/show_bug.cgi?id=93307

Reviewed by Eric Seidel.

This patch moves activeDOMWindow from JSDOMBindings.cpp to
BindingState.cpp. This is a first step towards sharing the core
security logic in the bindings between JavaScriptCore and V8. Once the
logic is shared, we will be able to refactor the logic to avoid the
need for DOMWindow::m_securityOrigin.

This patch doesn't actually share any code (yet). It just sets the
stage by creating BindingState as a typedef of ExecState and adding the
appropriate files to the build systems.

This patch also renames activeWindow and firstWindow in the V8 bindings
to activeDOMWindow and firstDOMWindow to match the names in the
JavaScriptCore bindings.

* GNUmakefile.list.am:
* Target.pri:
* UseJSC.cmake:
* WebCore.gypi:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.xcodeproj/project.pbxproj:
* bindings/generic/BindingSecurity.cpp:
(WebCore::canAccessDocument):
* bindings/js/JSBindingsAllInOne.cpp:
* bindings/js/JSDOMBinding.cpp:
(WebCore):
* bindings/js/JSDOMBinding.h:
(WebCore):
* bindings/v8/BindingState.cpp:
(WebCore::activeDOMWindow):
(WebCore::firstDOMWindow):
* bindings/v8/BindingState.h:
(WebCore):
* bindings/v8/custom/V8DOMWindowCustom.cpp:
(WebCore::V8DOMWindow::locationAccessorSetter):
(WebCore::handlePostMessageCallback):
(WebCore::V8DOMWindow::showModalDialogCallback):
(WebCore::V8DOMWindow::openCallback):
* bindings/v8/custom/V8DocumentLocationCustom.cpp:
(WebCore::V8Document::locationAccessorSetter):
* bindings/v8/custom/V8LocationCustom.cpp:
(WebCore::V8Location::hashAccessorSetter):
(WebCore::V8Location::hostAccessorSetter):
(WebCore::V8Location::hostnameAccessorSetter):
(WebCore::V8Location::hrefAccessorSetter):
(WebCore::V8Location::pathnameAccessorSetter):
(WebCore::V8Location::portAccessorSetter):
(WebCore::V8Location::protocolAccessorSetter):
(WebCore::V8Location::searchAccessorSetter):
(WebCore::V8Location::reloadCallback):
(WebCore::V8Location::replaceCallback):
(WebCore::V8Location::assignCallback):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@124835 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Chromium] Rebaseline test color-suggestion-picker-appearance.html
https://bugs.webkit.org/show_bug.cgi?id=92444

Unreviewed.

* platform/chromium-linux-x86/platform/chromium/fast/forms/color/color-suggestion-picker-appearance-expected.png: Removed.
* platform/chromium-linux/platform/chromium/fast/forms/color/color-suggestion-picker-appearance-expected.png:
* platform/chromium-linux/platform/chromium/fast/forms/color/color-suggestion-picker-one-row-appearance-expected.png: Added.
* platform/chromium-linux/platform/chromium/fast/forms/color/color-suggestion-picker-two-row-appearance-expected.png: Added.
* platform/chromium-mac-snowleopard/platform/chromium/fast/forms/color/color-suggestion-picker-appearance-expected.png:
* platform/chromium-mac-snowleopard/platform/chromium/fast/forms/color/color-suggestion-picker-one-row-appearance-expected.png: Added.
* platform/chromium-mac-snowleopard/platform/chromium/fast/forms/color/color-suggestion-picker-two-row-appearance-expected.png: Added.
* platform/chromium-mac/platform/chromium/fast/forms/color/color-suggestion-picker-appearance-expected.png:
* platform/chromium-win-xp/platform/chromium/fast/forms/color/color-suggestion-picker-appearance-expected.png: Removed.
* platform/chromium-win/platform/chromium/fast/forms/color/color-suggestion-picker-appearance-expected.png:
* platform/chromium-win/platform/chromium/fast/forms/color/color-suggestion-picker-one-row-appearance-expected.png: Added.
* platform/chromium-win/platform/chromium/fast/forms/color/color-suggestion-picker-two-row-appearance-expected.png: Added.
* platform/chromium/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@124836 268f45cc-cd09-0410-ab3c-d52691b4dbfc
IndexedDB: Throw proper exceptions
https://bugs.webkit.org/show_bug.cgi?id=85513

Reviewed by Tony Chang.

Test all of the exception throwing clauses in the spec, unless they are
well covered elsewhere (indicated by a comment in the script).

* storage/indexeddb/exceptions-expected.txt: Added.
* storage/indexeddb/exceptions.html: Added.
* storage/indexeddb/resources/exceptions.js: Added.
(test.request.onsuccess.request.onsuccess.request.onsuccess):
(test.request.onsuccess.request.onsuccess):
(test.request.onsuccess):
(test):
(testDatabase.request.onsuccess.trans.oncomplete):
(testDatabase.request.onsuccess):
(testDatabase):
(prepareStoreAndIndex.request.onsuccess):
(prepareStoreAndIndex):
(testObjectStore.request.onsuccess.trans.oncomplete):
(testObjectStore.request.onsuccess):
(testObjectStore):
(testIndex):
(testCursor.makeCursor.request.onsuccess):
(testCursor.makeCursor):
(testCursor.makeKeyCursor.request.onsuccess):
(testCursor.makeKeyCursor):
(testCursor.makeReverseCursor.request.onsuccess):
(testCursor.makeReverseCursor):
(testCursor.makeInlineCursor.request.onsuccess):
(testCursor.makeInlineCursor):
(testCursor.testCursorAdvance):
(testCursor.testCursorContinue):
(testCursor.testCursorDelete):
(testCursor.testCursorUpdate):
(testCursor.makeReadOnlyCursor.request.onsuccess):
(testCursor.makeReadOnlyCursor):
(testCursor.doReadOnlyCursorTests):
(testCursor):
(testTransaction):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@124837 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[BlackBerry] About: shows PAGE_CACHE not enabled.
https://bugs.webkit.org/show_bug.cgi?id=93216

Reviewed by Antonio Gomes.

Page cache is a feature that can be enabled/disabled at runtime, there's no
MACRO named PAGE_CACHE to control the feature.

* WebCoreSupport/AboutDataEnableFeatures.in:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@124838 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[chromium] Convert WebScrollbarThemeGeometry from a concrete class to an interface
https://bugs.webkit.org/show_bug.cgi?id=93308

Reviewed by James Robinson.

Source/Platform:

Convert WebScrollbarThemeGeometry to be an interface. Update
WebScrollbarLayer to take a pointer to this interface.

* chromium/public/WebScrollbarLayer.h:
(WebScrollbarLayer):
* chromium/public/WebScrollbarThemeGeometry.h:
(WebScrollbarThemeGeometry):

Source/WebCore:

Convert WebScrollbarThemeGeometry to be an interface. Create a new
WebScrollbarThemeGeometryNative implementation to wrap a native theme
pointer.

Update ScrollbarLayerChromium/CCScrollbarLayerImpl to use a pointer to
this interface rather than a concrete member variable. Because both
layer types need to access the theme during painting or compositing
and either layer could go away at any time, the theme is cloned during
commit rather than dealing with refcounting across threads or having
one layer type be the sole owner.

* WebCore.gypi:
* page/scrolling/chromium/ScrollingCoordinatorChromium.cpp:
(WebCore::createScrollbarLayer):
* platform/chromium/support/WebScrollbarThemeGeometryNative.cpp: Renamed from Source/WebKit/chromium/src/WebScrollbarThemeGeometry.cpp.
(WebKit):
(WebKit::WebScrollbarThemeGeometryNative::create):
(WebKit::WebScrollbarThemeGeometryNative::WebScrollbarThemeGeometryNative):
(WebKit::WebScrollbarThemeGeometryNative::clone):
(WebKit::WebScrollbarThemeGeometryNative::thumbPosition):
(WebKit::WebScrollbarThemeGeometryNative::thumbLength):
(WebKit::WebScrollbarThemeGeometryNative::trackPosition):
(WebKit::WebScrollbarThemeGeometryNative::trackLength):
(WebKit::WebScrollbarThemeGeometryNative::hasButtons):
(WebKit::WebScrollbarThemeGeometryNative::hasThumb):
(WebKit::WebScrollbarThemeGeometryNative::trackRect):
(WebKit::WebScrollbarThemeGeometryNative::thumbRect):
(WebKit::WebScrollbarThemeGeometryNative::minimumThumbLength):
(WebKit::WebScrollbarThemeGeometryNative::scrollbarThickness):
(WebKit::WebScrollbarThemeGeometryNative::backButtonStartRect):
(WebKit::WebScrollbarThemeGeometryNative::backButtonEndRect):
(WebKit::WebScrollbarThemeGeometryNative::forwardButtonStartRect):
(WebKit::WebScrollbarThemeGeometryNative::forwardButtonEndRect):
(WebKit::WebScrollbarThemeGeometryNative::constrainTrackRectToTrackPieces):
(WebKit::WebScrollbarThemeGeometryNative::splitTrack):
* platform/chromium/support/WebScrollbarThemeGeometryNative.h: Added.
(WebKit):
(WebScrollbarThemeGeometryNative):
* platform/graphics/chromium/ScrollbarLayerChromium.cpp:
(WebCore::ScrollbarLayerChromium::create):
(WebCore::ScrollbarLayerChromium::ScrollbarLayerChromium):
(WebCore::ScrollbarLayerChromium::pushPropertiesTo):
(WebCore::ScrollbarBackgroundPainter::create):
(WebCore::ScrollbarBackgroundPainter::ScrollbarBackgroundPainter):
(ScrollbarBackgroundPainter):
(WebCore::ScrollbarThumbPainter::create):
(WebCore::ScrollbarThumbPainter::ScrollbarThumbPainter):
(ScrollbarThumbPainter):
(WebCore::ScrollbarLayerChromium::createTextureUpdaterIfNeeded):
(WebCore::ScrollbarLayerChromium::setTexturePriorities):
(WebCore::ScrollbarLayerChromium::update):
* platform/graphics/chromium/ScrollbarLayerChromium.h:
(ScrollbarLayerChromium):
* platform/graphics/chromium/cc/CCScrollbarLayerImpl.cpp:
(WebCore::CCScrollbarLayerImpl::setScrollbarGeometry):
(WebCore::CCScrollbarLayerImpl::setScrollbarData):
(WebCore::CCScrollbarLayerImpl::appendQuads):
* platform/graphics/chromium/cc/CCScrollbarLayerImpl.h:
(WebCore::CCScrollbarLayerImpl::scrollbarGeometry):
(CCScrollbarLayerImpl):

Source/WebKit/chromium:

Now that WebScrollbarThemeGeometry can have different implementations,
create a FakeWebScrollbarThemeGeometry for testing purposes rather
than just overriding a geometry-related virtual.

* WebKit.gyp:
* WebKit.gypi:
* src/WebScrollbarLayer.cpp:
(WebKit::WebScrollbarLayer::create):
* tests/CCLayerTreeHostImplTest.cpp:
* tests/FakeWebScrollbarThemeGeometry.h: Added.
(WebKit):
(FakeWebScrollbarThemeGeometry):
(WebKit::FakeWebScrollbarThemeGeometry::create):
* tests/ScrollbarLayerChromiumTest.cpp:
(WebCore::TEST):


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