[chromium] add WebCursorInfo::imageScaleFactor
https://bugs.webkit.org/show_bug.cgi?id=102612

Patch by Rick Byers <rbyers@chromium.org> on 2012-11-18
Reviewed by Adam Barth.

Add cursor image scale factor (currently always 1) to chromium API, in preparation for
high-dpi cursor support in bug 99493.

* public/WebCursorInfo.h:
(WebKit::WebCursorInfo::WebCursorInfo):
* src/WebCursorInfo.cpp:
(WebKit::WebCursorInfo::WebCursorInfo):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@135076 268f45cc-cd09-0410-ab3c-d52691b4dbfc
HTMLMediaElement: Skip unnecessary attribute lookup in parsing of "src" attribute.
<http://webkit.org/b/102614>

Reviewed by Anders Carlsson.

When parsing the "src" attribute, we don't need to look it up with fastHasAttribute()
to know if it's present. If it's not present, 'value' argument will be null.

* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::parseAttribute):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@135077 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Inline the StyledElement constructor.
<http://webkit.org/b/102615>

Reviewed by Antti Koivisto.

StyledElement sits between Element and HTMLElement in the inheritance chain, and both of those are inline.
Knocks ~0.4% of samples off of the DOM/CreateNodes performance test.

* dom/StyledElement.cpp:
* dom/StyledElement.h:
(WebCore::StyledElement::StyledElement):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@135078 268f45cc-cd09-0410-ab3c-d52691b4dbfc
DFG constant folding phase should say 'changed = true' whenever it changes the graph
https://bugs.webkit.org/show_bug.cgi?id=102550

Rubber stamped by Mark Hahnenberg.

* dfg/DFGConstantFoldingPhase.cpp:
(JSC::DFG::ConstantFoldingPhase::foldConstants):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@135079 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Make convertToLayerCoords iterative, rather than recursive
https://bugs.webkit.org/show_bug.cgi?id=102618

Reviewed by Antti Koivisto.

RenderLayer::convertToLayerCoords() is a hot function on profiles.
Change it to be iterative, rather than recursive, so that the
bulk of the function can be inlined.

Was tested with assertions against the old code during development.

* rendering/RenderLayer.cpp:
(WebCore::accumulateOffsetTowardsAncestor):
(WebCore::RenderLayer::convertToLayerCoords):

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

Update run-bindings-tests baselines after
http://trac.webkit.org/changeset/135063

* bindings/scripts/test/JS/JSTestActiveDOMObject.h:
(JSTestActiveDOMObjectOwner):
* bindings/scripts/test/JS/JSTestCustomNamedGetter.h:
(JSTestCustomNamedGetterOwner):
* bindings/scripts/test/JS/JSTestEventConstructor.h:
(JSTestEventConstructorOwner):
* bindings/scripts/test/JS/JSTestEventTarget.h:
(JSTestEventTargetOwner):
* bindings/scripts/test/JS/JSTestException.h:
(JSTestExceptionOwner):
* bindings/scripts/test/JS/JSTestInterface.h:
(JSTestInterfaceOwner):
* bindings/scripts/test/JS/JSTestMediaQueryListListener.h:
(JSTestMediaQueryListListenerOwner):
* bindings/scripts/test/JS/JSTestNamedConstructor.h:
(JSTestNamedConstructorOwner):
* bindings/scripts/test/JS/JSTestObj.h:
(JSTestObjOwner):
* bindings/scripts/test/JS/JSTestOverloadedConstructors.h:
(JSTestOverloadedConstructorsOwner):
* bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h:
(JSTestSerializedScriptValueInterfaceOwner):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@135081 268f45cc-cd09-0410-ab3c-d52691b4dbfc
REGRESSION(r129644): User StyleSheet not applying
https://bugs.webkit.org/show_bug.cgi?id=102110

Reviewed by Andreas Kling.

Source/WebCore:

Injected stylesheets added as UserStyleAuthorLevel fail to apply. r129644 implicitly assumed that
such things don't exists but on Chromium addUserStyleSheet() confusingly uses them.

The patch adds injected author stylesheets to DocumentStyleSheetCollection::activeStyleSheets().
It also generally cleans up the code around injected and user stylesheets.

Tests: userscripts/user-script-and-stylesheet.html
       userscripts/user-stylesheet-invalidate.html

* css/StyleResolver.cpp:
(WebCore::StyleResolver::StyleResolver):
(WebCore::StyleResolver::collectRulesFromUserStyleSheets):
(WebCore::collectCSSOMWrappers):
* css/StyleResolver.h:
(StyleResolver):
* dom/Document.cpp:
(WebCore::Document::setCompatibilityMode):
* dom/DocumentStyleSheetCollection.cpp:
(WebCore::DocumentStyleSheetCollection::DocumentStyleSheetCollection):
(WebCore::DocumentStyleSheetCollection::~DocumentStyleSheetCollection):
(WebCore::DocumentStyleSheetCollection::injectedUserStyleSheets):
(WebCore):
(WebCore::DocumentStyleSheetCollection::injectedAuthorStyleSheets):
(WebCore::DocumentStyleSheetCollection::updateInjectedStyleSheetCache):
(WebCore::DocumentStyleSheetCollection::invalidateInjectedStyleSheetCache):
(WebCore::DocumentStyleSheetCollection::addUserSheet):
(WebCore::DocumentStyleSheetCollection::updateActiveStyleSheets):
(WebCore::DocumentStyleSheetCollection::reportMemoryUsage):
* dom/DocumentStyleSheetCollection.h:
(WebCore::DocumentStyleSheetCollection::documentUserStyleSheets):
(DocumentStyleSheetCollection):
* page/PageGroup.cpp:
(WebCore::PageGroup::addUserStyleSheetToWorld):
(WebCore::PageGroup::removeUserStyleSheetFromWorld):
(WebCore::PageGroup::removeUserStyleSheetsFromWorld):
(WebCore::PageGroup::removeAllUserContent):
(WebCore::PageGroup::invalidatedInjectedStyleSheetCacheInAllFrames):
* page/PageGroup.h:
(PageGroup):

LayoutTests:

* inspector/timeline/timeline-script-tag-1-expected.txt:

    Update the test result. The style invalidation log is slightly different.

* userscripts/user-stylesheet-invalidate-expected.txt: Added.
* userscripts/user-stylesheet-invalidate.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@135082 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed, rolling out r135074.
http://trac.webkit.org/changeset/135074
https://bugs.webkit.org/show_bug.cgi?id=102619

Made most layout tests crash. (Requested by rakuco on
#webkit).

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

* PlatformEfl.cmake:
* platform/graphics/efl/GraphicsContext3DEfl.cpp:
(WebCore::GraphicsContext3D::create):
(WebCore::GraphicsContext3D::GraphicsContext3D):
(WebCore::GraphicsContext3D::~GraphicsContext3D):
(WebCore::GraphicsContext3D::makeContextCurrent):
(WebCore::GraphicsContext3D::setContextLostCallback):
* platform/graphics/efl/GraphicsContext3DPrivate.cpp:
(WebCore::GraphicsContext3DPrivate::GraphicsContext3DPrivate):
(WebCore::GraphicsContext3DPrivate::~GraphicsContext3DPrivate):
(WebCore::GraphicsContext3DPrivate::createSurface):
(WebCore::GraphicsContext3DPrivate::setCurrentGLContext):
(WebCore::GraphicsContext3DPrivate::platformGraphicsContext3D):
(WebCore::GraphicsContext3DPrivate::makeContextCurrent):
(WebCore::GraphicsContext3DPrivate::createGraphicsSurfaces):
(WebCore::GraphicsContext3DPrivate::copyToGraphicsSurface):
(WebCore::GraphicsContext3DPrivate::graphicsSurfaceToken):
* platform/graphics/efl/GraphicsContext3DPrivate.h:
(GraphicsContext3DPrivate):
* platform/graphics/opengl/GLDefs.h: Removed.
* platform/graphics/opengl/GLPlatformContext.cpp: Removed.
* platform/graphics/opengl/GLPlatformContext.h: Removed.
* platform/graphics/opengl/GLPlatformSurface.cpp: Removed.
* platform/graphics/opengl/GLPlatformSurface.h: Removed.
* platform/graphics/surfaces/glx/GLXContext.cpp: Removed.
* platform/graphics/surfaces/glx/GLXContext.h: Removed.
* platform/graphics/surfaces/glx/GLXSurface.cpp: Removed.
* platform/graphics/surfaces/glx/GLXSurface.h: Removed.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@135083 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[V8] Get rid of unused functions and inline redundant functions in CodeGeneratorV8.pm
https://bugs.webkit.org/show_bug.cgi?id=102497

Reviewed by Adam Barth.

No tests. No change in behavior.

* bindings/scripts/CodeGeneratorV8.pm:
(GenerateDomainSafeFunctionGetter):
(GenerateNormalAttrGetter):
(GenerateFunctionCallString):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@135084 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Remove GenerateModule() from all code generators
https://bugs.webkit.org/show_bug.cgi?id=102490

Reviewed by Adam Barth.

WebKit IDL files no longer support modules. The Web IDL spec
no longer supports modules. We can remove it from code generators.

No tests. No change in behavior.

* bindings/scripts/CodeGenerator.pm:
(ProcessDocument):
* bindings/scripts/CodeGeneratorCPP.pm:
* bindings/scripts/CodeGeneratorGObject.pm:
* bindings/scripts/CodeGeneratorJS.pm:
* bindings/scripts/CodeGeneratorObjC.pm:
* bindings/scripts/CodeGeneratorV8.pm:


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

* platform/mac/fast/media/mq-js-media-except-02-expected.txt:
* platform/mac/fast/media/mq-js-media-except-03-expected.txt:
* platform/mac/svg/custom/baseval-animval-equality-expected.txt:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@135086 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[V8] Remove GetTypeFromSignature() from CodeGeneratorV8.pm
https://bugs.webkit.org/show_bug.cgi?id=102499

Reviewed by Adam Barth.

No tests. No change in behavior.

* bindings/scripts/CodeGeneratorV8.pm:
(GenerateNormalAttrGetter):
(GenerateNormalAttrSetter):
(GenerateParametersCheckExpression):
(GenerateParametersCheck):
(GenerateFunctionCallString):
(GetNativeTypeFromSignature):
(TranslateParameter):
(TypeCanFailConversion):
(JSValueToNative):
(NativeToJSValue):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@135087 268f45cc-cd09-0410-ab3c-d52691b4dbfc
.:  [BlackBerry] Enable Touch Sliders
 https://bugs.webkit.org/show_bug.cgi?id=102516

 Reviewed by Rob Buis.

 Enabled for BlackBerry only
 PR #242781
 PR #176014

 * Source/cmake/OptionsBlackBerry.cmake:
 * Source/cmake/WebKitFeatures.cmake:
 * Source/cmakeconfig.h.cmake:

Patch by Genevieve Mak <gmak@rim.com> on 2012-11-18

Tools: [BlackBerry] Enable Touch Sliders
https://bugs.webkit.org/show_bug.cgi?id=102516

Patch by Genevieve Mak <gmak@rim.com> on 2012-11-18
Reviewed by Rob Buis.

Enabled for BlackBerry only
PR #242781
PR #176014

* Scripts/webkitperl/FeatureList.pm:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@135088 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed. Marked fast/images/webgl-teximage2d.html as TIMEOUT.

* platform/chromium/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@135089 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed. Marked platform/chromium/virtual/deferred/fast/images/webgl-teximage2d.html as TIMEOUT.

* platform/chromium/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@135090 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed.
r135025 marked a couple of tests as SKIP in Mac.
This patch marks the tests as SKIP in Chormium.

* platform/chromium/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@135091 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[V8] Rename $className to $v8InterfaceName
https://bugs.webkit.org/show_bug.cgi?id=102487

Reviewed by Adam Barth.

In CodeGeneratorV8.pm, $className is always "V8$interfaceName".
We should rename $className to $v8InterfaceName. Also we can
remove GetCallbackClassName().

No tests. No change in behavior.

* bindings/scripts/CodeGeneratorV8.pm:
(GenerateHeader):
(GetHeaderClassInclude):
(GenerateDomainSafeFunctionGetter):
(GenerateDomainSafeFunctionSetter):
(GenerateParametersCheck):
(GenerateImplementation):
(GenerateHeaderContentHeader):
(GenerateImplementationContentHeader):
(GenerateCallbackHeader):
(GenerateCallbackImplementation):
(GenerateToV8Converters):
(GetPassRefPtrType):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@135092 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Make namedItem return a node list only in HTMLFormControlsCollection and HTMLOptionsCollection
https://bugs.webkit.org/show_bug.cgi?id=101311

Reviewed by Darin Adler.

Source/WebCore: 

Introduce two new interfaces HTMLFormControlsCollection and HTMLOptionsCollection to be used by form.elements
and select.options. These two interfaces have the named getter and namedItem that returns a live NodeList when
there are multiple matches. Introducing these two interfaces allow us to make "regular" HTMLCollection's named
getter and namedItem return exactly one node or null as specified in HTML5:
http://www.whatwg.org/specs/web-apps/current-work/multipage/common-dom-interfaces.html#collections-0

Unfortunately, HTMLOptionsCollection still has a bug that its named getter and namedItem returns
a static NodeList instead of a live NodeList (DynamicNodeList) at the moment.

Also got rid of Document::objects since it's not exposed in IDL or called anywhere.

Test: fast/dom/html-collections-namedItem.html

* CMakeLists.txt:
* DerivedSources.cpp:
* DerivedSources.make:
* DerivedSources.pri:
* GNUmakefile.list.am:
* Target.pri:
* UseJSC.cmake:
* UseV8.cmake:
* WebCore.gypi:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/JSBindingsAllInOne.cpp:
* bindings/js/JSHTMLAllCollectionCustom.cpp:
(WebCore::getNamedItems):
* bindings/js/JSHTMLCollectionCustom.cpp:
(WebCore::JSHTMLCollection::nameGetter): Now returns exactly one node or null.
(WebCore::toJS):
* bindings/js/JSHTMLFormControlsCollectionCustom.cpp: Added.
(WebCore::getNamedItems): Returns RadioNodeList when there are multiple matches.
(WebCore::JSHTMLFormControlsCollection::canGetItemsForName):
(WebCore::JSHTMLFormControlsCollection::nameGetter):
(WebCore::JSHTMLFormControlsCollection::namedItem):
* bindings/js/JSHTMLOptionsCollectionCustom.cpp:
(WebCore::getNamedItems): Returns a static NodeList when there are multiple matches.
This is a bug. It should be a live NodeList instead.
(WebCore::JSHTMLOptionsCollection::canGetItemsForName):
(WebCore::JSHTMLOptionsCollection::nameGetter):
(WebCore::JSHTMLOptionsCollection::namedItem):
* bindings/js/CodeGeneratorJS.pm: Include JSNode.js for all HTML*Collection interfaces for simplicity.
* bindings/js/CodeGeneratorV8.pm: HTMLOptionsCollection now inherits from HTMLCollection. See
http://www.whatwg.org/specs/web-apps/current-work/multipage/common-dom-interfaces.html#htmloptionscollection
* bindings/v8/custom/V8HTMLAllCollectionCustom.cpp: Pass in isolate when we can.
(WebCore::getNamedItems): Added a comment about how we should be returning
a HTMLCollection when there are multiple matches.
(WebCore::getItem):
(WebCore::V8HTMLAllCollection::namedPropertyGetter):
(WebCore::V8HTMLAllCollection::namedItemCallback):
* bindings/v8/custom/V8HTMLCollectionCustom.cpp: Now returns exactly one node or null.
(WebCore::V8HTMLCollection::namedPropertyGetter):
(WebCore::toV8):
* bindings/v8/custom/V8HTMLFormControlsCollectionCustom.cpp: Added.
(WebCore::getNamedItems): Returns RadioNodeList when there are multiple matches.
(WebCore::V8HTMLFormControlsCollection::namedPropertyGetter):
(WebCore::V8HTMLFormControlsCollection::namedItemCallback):
* bindings/v8/custom/V8HTMLOptionsCollectionCustom.cpp:
(WebCore::getNamedItems): Returns a static NodeList when there are multiple matches.
This is a bug. It should be a live NodeList instead.
(WebCore::V8HTMLOptionsCollection::namedPropertyGetter):
(WebCore::V8HTMLOptionsCollection::namedItemCallback):
* dom/Document.cpp: Removed Document::objects since it was not used anywhere.
* dom/Document.h:
(Document):
* dom/Element.cpp:
(WebCore::ElementRareData::ensureCachedHTMLCollection): form.elements should instantiate
a HTMLFormControlsCollection instead of a HTMLCollection.
* html/CollectionType.h:
* html/HTMLCollection.idl: Removed [Custom] since namedItem is a regular function call now.
* html/HTMLFieldSetElement.cpp:
* html/HTMLFieldSetElement.h:
* html/HTMLFormCollection.cpp: Removed.
* html/HTMLFormCollection.h: Removed.
* html/HTMLFormControlsCollection.cpp: Copied from Source/WebCore/html/HTMLFormCollection.cpp.
(WebCore::HTMLFormControlsCollection::HTMLFormControlsCollection):
(WebCore::HTMLFormControlsCollection::create):
(WebCore::HTMLFormControlsCollection::~HTMLFormControlsCollection):
(WebCore::HTMLFormControlsCollection::formControlElements):
(WebCore::HTMLFormControlsCollection::formImageElements):
(WebCore::HTMLFormControlsCollection::virtualItemAfter):
(WebCore::HTMLFormControlsCollection::namedItem):
(WebCore::HTMLFormControlsCollection::updateNameCache):
* html/HTMLFormControlsCollection.h: Copied from Source/WebCore/html/HTMLFormCollection.h.
(HTMLFormControlsCollection):
* html/HTMLFormControlsCollection.idl: Added.
* html/HTMLFormElement.cpp:
* html/HTMLFormElement.h:
* html/HTMLOptionsCollection.idl:

LayoutTests: 

Added a regression test to ensure form.elements and select.options use correct interfaces,
and named getter for those two properties return a NodeList when there are multiple matches.

Also added appropriate IDL options to HTMLOptionsCollection.idl.

* fast/dom/collection-nameditem-move-between-documents-expected.txt: Rebaselined since namedItem
now correctly returns null when there is no match. This test result demonstrates a bug that
HTMLAllCollection doesn't inherit from HTMLCollection.
* fast/dom/collection-nameditem-move-between-documents.html: Ditto.
* fast/dom/dom-constructors-expected.txt: Rebaselined.
* fast/dom/html-collections-named-getter-expected.txt: Added.
* fast/dom/html-collections-named-getter.html: Added.
* fast/dom/wrapper-classes-expected.txt: Rebaselined. Since we're exposing HTMLOptionsCollection
on the window object, the constructor property of an instance of HTMLOptionsCollection object
shows up as a function. We should update the test to support this behavior in the future.
* inspector/console/console-format-collections-expected.txt: Rebaselined.
* platform/chromium/fast/dom/gc-9-expected.txt: Rebaselined since a test case for
HTMLOptionsCollection now passes.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@135093 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed, rolling out r135047.
http://trac.webkit.org/changeset/135047
https://bugs.webkit.org/show_bug.cgi?id=102339

it broke Chromium Windows/Mac build

* WebKit.gyp:
* WebKit.gypi:
* public/WebNode.h:
(WebKit):
* public/WebPluginContainer.h:
(WebKit):
(WebPluginContainer):
* src/WebFrameImpl.cpp:
(WebKit::pluginContainerFromNode):
(WebKit):
(WebKit::WebFrameImpl::executeCommand):
(WebKit::WebFrameImpl::printBegin):
(WebKit::WebFrameImpl::isPrintScalingDisabledForPlugin):
* src/WebNode.cpp:
* src/WebPluginContainerImpl.cpp:
* src/WebPluginContainerImpl.h:
(WebPluginContainerImpl):
* tests/FakeWebPlugin.cpp: Removed.
* tests/FakeWebPlugin.h: Removed.
* tests/WebPluginContainerTest.cpp: Removed.
* tests/data/plugin_container.html: Removed.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@135094 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed. Removed a duplicated entry.

* platform/chromium/TestExpectations:

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