Add tests for explicit serialization values
https://bugs.webkit.org/show_bug.cgi?id=96818

Reviewed by Adam Barth.

Source/WebCore:

Expose direct access to the serialization/deserialization mechanisms
of SerializedScriptValue to DumpRenderTree.

* testing/Internals.cpp:
(WebCore::Internals::serializeObject):
(WebCore):
(WebCore::Internals::deserializeBuffer):
* testing/Internals.h:
(WebCore):
* testing/Internals.idl:

LayoutTests:

Make sure SerializedScriptValues are backward compatible with future changes.

* platform/chromium/fast/storage/serialized-script-value.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@134691 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[chromium] WebPreferences reset() should set perTilePainting and acceleratedAnimation settings to false.
https://bugs.webkit.org/show_bug.cgi?id=102296

Reviewed by James Robinson.

These settings are always set by TestShell anyhow, but we should be
setting them to false here along with everything else.

* DumpRenderTree/chromium/WebPreferences.cpp:
(WebPreferences::reset):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@134692 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Convert m_selectorVector back to a stack allocated m_reusableSelectorVector
https://bugs.webkit.org/show_bug.cgi?id=102295

Reviewed by Andreas Kling.

Revert r125252 because we're not going to go forward with implementing CSS hierarchies at this time.

No new tests because there should be no change in behavior.

* css/CSSGrammar.y.in:
* css/CSSParser.cpp:
(WebCore::CSSParser::CSSParser):
(WebCore::CSSParser::parseValue):
(WebCore::CSSParser::parseColor):
(WebCore::CSSParser::parseDeclaration):
(WebCore):
(WebCore::filterProperties):
(WebCore::CSSParser::createStylePropertySet):
(WebCore::CSSParser::addProperty):
(WebCore::CSSParser::rollbackLastProperties):
(WebCore::CSSParser::clearProperties):
(WebCore::CSSParser::parse4Values):
(WebCore::CSSParser::parseFlowThread):
(WebCore::CSSParser::addTextDecorationProperty):
(WebCore::CSSParser::createFloatingSelectorVector):
(WebCore::CSSParser::sinkFloatingSelectorVector):
(WebCore::CSSParser::createStyleRule):
(WebCore::CSSParser::createFontFaceRule):
(WebCore::CSSParser::createPageRule):
(WebCore::CSSParser::setReusableRegionSelectorVector):
(WebCore::CSSParser::startDeclarationsForMarginBox):
(WebCore::CSSParser::endDeclarationsForMarginBox):
(WebCore::CSSParser::deleteFontFaceOnlyValues):
* css/CSSParser.h:
(WebCore::CSSParser::hasProperties):
(WebCore::CSSParser::reusableSelectorVector):
(CSSParser):
(WebCore::CSSParser::reusableRegionSelectorVector):
* css/CSSParserValues.cpp:
(WebCore::CSSParserSelector::adoptSelectorVector):
* css/CSSParserValues.h:
(CSSParserSelector):
* css/CSSSelectorList.cpp:
(WebCore::CSSSelectorList::adoptSelectorVector):
* css/CSSSelectorList.h:
(CSSSelectorList):
* css/SVGCSSParser.cpp:
(WebCore::CSSParser::parseSVGValue):
* css/StyleRule.cpp:
(WebCore::StyleRuleRegion::StyleRuleRegion):
* css/StyleRule.h:
(WebCore::StyleRule::parserAdoptSelectorVector):
(WebCore::StyleRulePage::parserAdoptSelectorVector):
(WebCore::StyleRuleRegion::create):
(StyleRuleRegion):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@134693 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[EFL] Refactor theme to choose whether to support foreground color of selection
https://bugs.webkit.org/show_bug.cgi?id=102037

Patch by Ryuan Choi <ryuan.choi@gmail.com> on 2012-11-14
Reviewed by Gyuyoung Kim.

Source/WebCore:

RenderThemeEfl can change foreground color of selection using theme file.
But it can not disable supports of foreground color to keep the text color
which is selected.

This patch refactors color classes of theme file from active/inactive classes
to foreground/background classes so that RenderThemeEfl checks whether
theme file supports foreground color class.

* platform/efl/RenderThemeEfl.cpp:
(WebCore::fillColorsFromEdjeClass):
(WebCore::RenderThemeEfl::setColorFromThemeClass):
(WebCore::RenderThemeEfl::loadTheme):
(WebCore::RenderThemeEfl::RenderThemeEfl):
(WebCore::RenderThemeEfl::supportsSelectionForegroundColors):
(WebCore):
* platform/efl/RenderThemeEfl.h:
(RenderThemeEfl):

Source/WebKit/efl:

* DefaultTheme/default.edc:
Refactored color classes from active/inactive to foreground/background.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@134694 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Read-only properties created with putDirect() should tell the structure that there are read-only properties
https://bugs.webkit.org/show_bug.cgi?id=102292

Reviewed by Gavin Barraclough.

Source/JavaScriptCore: 

This mostly affects things like function.length.

* runtime/JSObject.h:
(JSC::JSObject::putDirectInternal):

LayoutTests: 

* fast/js/function-dot-length-read-only-expected.txt: Added.
* fast/js/function-dot-length-read-only.html: Added.
* fast/js/jsc-test-list:
* fast/js/script-tests/function-dot-length-read-only.js: Added.
(foo):
(Bar):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@134695 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[V8] Rename dispatchWrap
https://bugs.webkit.org/show_bug.cgi?id=102240

Patch by Dan Carney <dcarney@google.com> on 2012-11-14
Reviewed by Adam Barth.

Mostly a rename:
dispatchWrap->wrap
wrapSlow->createWrapper
dispatchWrapCustom->wrap

No new tests. No change in functionality.

* bindings/scripts/CodeGeneratorV8.pm:
(GenerateHeader):
(GenerateNormalAttrGetter):
(GenerateImplementation):
(GenerateToV8Converters):
* bindings/scripts/IDLAttributes.txt:
* bindings/scripts/test/V8/V8Float64Array.cpp:
(WebCore::wrap):
(WebCore::V8Float64Array::createWrapper):
* bindings/scripts/test/V8/V8Float64Array.h:
(V8Float64Array):
(WebCore):
(WebCore::toV8Object):
(WebCore::toV8):
* bindings/scripts/test/V8/V8TestActiveDOMObject.cpp:
(WebCore::V8TestActiveDOMObject::createWrapper):
* bindings/scripts/test/V8/V8TestActiveDOMObject.h:
(V8TestActiveDOMObject):
(WebCore::wrap):
(WebCore::toV8Object):
(WebCore::toV8):
* bindings/scripts/test/V8/V8TestCustomNamedGetter.cpp:
(WebCore::V8TestCustomNamedGetter::createWrapper):
* bindings/scripts/test/V8/V8TestCustomNamedGetter.h:
(V8TestCustomNamedGetter):
(WebCore::wrap):
(WebCore::toV8Object):
(WebCore::toV8):
* bindings/scripts/test/V8/V8TestEventConstructor.cpp:
(WebCore::V8TestEventConstructor::createWrapper):
* bindings/scripts/test/V8/V8TestEventConstructor.h:
(V8TestEventConstructor):
(WebCore::wrap):
(WebCore::toV8Object):
(WebCore::toV8):
* bindings/scripts/test/V8/V8TestEventTarget.cpp:
(WebCore::V8TestEventTarget::createWrapper):
* bindings/scripts/test/V8/V8TestEventTarget.h:
(V8TestEventTarget):
(WebCore::wrap):
(WebCore::toV8Object):
(WebCore::toV8):
* bindings/scripts/test/V8/V8TestException.cpp:
(WebCore::V8TestException::createWrapper):
* bindings/scripts/test/V8/V8TestException.h:
(V8TestException):
(WebCore::wrap):
(WebCore::toV8Object):
(WebCore::toV8):
* bindings/scripts/test/V8/V8TestInterface.cpp:
(WebCore::V8TestInterface::createWrapper):
* bindings/scripts/test/V8/V8TestInterface.h:
(V8TestInterface):
(WebCore::wrap):
(WebCore::toV8Object):
(WebCore::toV8):
* bindings/scripts/test/V8/V8TestMediaQueryListListener.cpp:
(WebCore::V8TestMediaQueryListListener::createWrapper):
* bindings/scripts/test/V8/V8TestMediaQueryListListener.h:
(V8TestMediaQueryListListener):
(WebCore::wrap):
(WebCore::toV8Object):
(WebCore::toV8):
* bindings/scripts/test/V8/V8TestNamedConstructor.cpp:
(WebCore::V8TestNamedConstructor::createWrapper):
* bindings/scripts/test/V8/V8TestNamedConstructor.h:
(V8TestNamedConstructor):
(WebCore::wrap):
(WebCore::toV8Object):
(WebCore::toV8):
* bindings/scripts/test/V8/V8TestNode.cpp:
(WebCore::V8TestNode::createWrapper):
* bindings/scripts/test/V8/V8TestNode.h:
(V8TestNode):
(WebCore::wrap):
(WebCore::toV8Object):
(WebCore::toV8):
(WebCore::toV8Fast):
* bindings/scripts/test/V8/V8TestObj.cpp:
(WebCore::V8TestObj::createWrapper):
* bindings/scripts/test/V8/V8TestObj.h:
(V8TestObj):
(WebCore::wrap):
(WebCore::toV8Object):
(WebCore::toV8):
* bindings/scripts/test/V8/V8TestOverloadedConstructors.cpp:
(WebCore::V8TestOverloadedConstructors::createWrapper):
* bindings/scripts/test/V8/V8TestOverloadedConstructors.h:
(V8TestOverloadedConstructors):
(WebCore::wrap):
(WebCore::toV8Object):
(WebCore::toV8):
* bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp:
(WebCore::V8TestSerializedScriptValueInterface::createWrapper):
* bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.h:
(V8TestSerializedScriptValueInterface):
(WebCore::wrap):
(WebCore::toV8Object):
(WebCore::toV8):
* bindings/v8/custom/V8BlobCustom.cpp:
(WebCore::wrap):
* bindings/v8/custom/V8CSSRuleCustom.cpp:
(WebCore::wrap):
* bindings/v8/custom/V8CSSValueCustom.cpp:
(WebCore::wrap):
* bindings/v8/custom/V8CanvasRenderingContextCustom.cpp:
(WebCore::wrap):
* bindings/v8/custom/V8DataViewCustom.cpp:
(WebCore::wrap):
* bindings/v8/custom/V8DocumentCustom.cpp:
(WebCore::wrap):
* bindings/v8/custom/V8ElementCustom.cpp:
(WebCore):
(WebCore::wrap):
* bindings/v8/custom/V8EntryCustom.cpp:
(WebCore::wrap):
* bindings/v8/custom/V8EntrySyncCustom.cpp:
(WebCore::wrap):
* bindings/v8/custom/V8EventCustom.cpp:
(WebCore):
(WebCore::wrap):
* bindings/v8/custom/V8HTMLCollectionCustom.cpp:
(WebCore::wrap):
* bindings/v8/custom/V8HTMLDocumentCustom.cpp:
(WebCore::wrap):
* bindings/v8/custom/V8HTMLElementCustom.cpp:
(WebCore::wrap):
* bindings/v8/custom/V8ImageDataCustom.cpp:
(WebCore::wrap):
* bindings/v8/custom/V8NodeCustom.cpp:
(WebCore::wrap):
* bindings/v8/custom/V8PerformanceEntryCustom.cpp:
(WebCore::wrap):
* bindings/v8/custom/V8SVGDocumentCustom.cpp:
(WebCore::wrap):
* bindings/v8/custom/V8SVGElementCustom.cpp:
(WebCore::wrap):
* bindings/v8/custom/V8SVGPathSegCustom.cpp:
(WebCore::wrap):
* bindings/v8/custom/V8StyleSheetCustom.cpp:
(WebCore::wrap):
* dom/make_names.pl:
(printWrapperFunctions):
(printWrapperFactoryCppFile):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@134696 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Change JSEventListener::m_jsFunction to be a weak ref.
https://bugs.webkit.org/show_bug.cgi?id=101989.

Reviewed by Geoffrey Garen.

Source/JavaScriptCore: 

Added infrastructure for scanning weak ref slots.

* heap/SlotVisitor.cpp: Added #include "SlotVisitorInlines.h".
* heap/SlotVisitor.h:
(SlotVisitor): Added SlotVisitor::appendUnbarrieredWeak().
* heap/SlotVisitorInlines.h: Added #include "Weak.h".
(JSC::SlotVisitor::appendUnbarrieredWeak): Added.
* heap/Weak.h:
(JSC::operator==): Added operator==() for Weak.
* runtime/JSCell.h: Removed #include "SlotVisitorInlines.h".
* runtime/JSObject.h: Added #include "SlotVisitorInlines.h".

Source/WebCore: 

No new tests.

* ForwardingHeaders/heap/SlotVisitor.h: Added.
* bindings/js/JSDOMBinding.h: Added #include <heap/SlotVisitor.h>
* bindings/js/JSEventListener.cpp:
(WebCore::JSEventListener::JSEventListener):
(WebCore::JSEventListener::visitJSFunction):
(WebCore::JSEventListener::operator==):
 - Removed the m_wrapper checks in operator==() because they are not
   needed. There is no longer any threat of m_jsFunction pointing to
   recycled memory. The use of weak refs will ensure that m_jsFunction
   is either still holding on to its old memory exclusively, or is 0'ed
   out when the GC collects it.
* bindings/js/JSEventListener.h:
(JSEventListener):
(WebCore::JSEventListener::jsFunction):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@134697 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[chromium/mac] Fix drawing of buttons, checkboxes, radio boxes, and steppers when the page is scaled
https://bugs.webkit.org/show_bug.cgi?id=102282

Reviewed by James Robinson.

Chromium uses skia, and skia state is synced with CG context state at
LocalCurrentGraphicsContext construction time. So delay that
construction after context transforms have happened.
(This regressed in http://trac.webkit.org/changeset/125830)

Covered by the new pixel test fast/forms/zoomed-controls.html. I
couldn't find an existing test for this.

* platform/mac/ThemeMac.mm:
(WebCore::paintCheckbox):
(WebCore::paintRadio):
(WebCore::paintButton):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@134698 268f45cc-cd09-0410-ab3c-d52691b4dbfc
IndexedDB: Test conversions batch 4
https://bugs.webkit.org/show_bug.cgi?id=102267

Reviewed by Tony Chang.

These are tests that don't have the js file in resources. The only
interesting bit is that lazy-index-population uncovered a potential bug.

I think tutorial.html has outlived its usefulness now that there are
more tutorials on the web. It was very outdated. It is deleted in
this patch.

* storage/indexeddb/deletedatabase-transaction-expected.txt:
* storage/indexeddb/deletedatabase-transaction.html:
* storage/indexeddb/dont-commit-on-blocked-expected.txt:
* storage/indexeddb/dont-commit-on-blocked.html:
* storage/indexeddb/lazy-index-population-expected.txt:
* storage/indexeddb/lazy-index-population.html:
* storage/indexeddb/mozilla/index-prev-no-duplicate-expected.txt:
* storage/indexeddb/mozilla/index-prev-no-duplicate.html:
* storage/indexeddb/mozilla/resources/object-identity.js:
  Test added here to replace test covered in tutorial.html

* storage/indexeddb/noblobs-expected.txt:
* storage/indexeddb/noblobs.html:
* storage/indexeddb/resources/dont-commit-on-blocked-worker.js:
(onSetVersionSuccess):
* storage/indexeddb/structured-clone-expected.txt:
* storage/indexeddb/structured-clone.html:
* storage/indexeddb/transaction-complete-with-js-recursion-cross-frame-expected.txt:
* storage/indexeddb/transaction-complete-with-js-recursion-cross-frame.html:
* storage/indexeddb/transaction-complete-with-js-recursion-expected.txt:
* storage/indexeddb/transaction-complete-with-js-recursion.html:
* storage/indexeddb/tutorial-expected.txt: Removed.
* storage/indexeddb/tutorial.html: Removed.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@134700 268f45cc-cd09-0410-ab3c-d52691b4dbfc
webkitpy: consolidate webkit-base-finding code
https://bugs.webkit.org/show_bug.cgi?id=102007

Reviewed by Eric Seidel.

This patch creates a new "WebKitFinder" class that other
modules can use to find the top of the WebKit tree and
commonly used subdirectories. This logic was in the
webkitpy.layout_test.port classes but wasn't specific to those
classes and now can be used by other modules without needing a port
(e.g., by the check-webkit-style python linter).

This code is somewhat redundant with the code for find_checkout_root()
in the scm modules, but it does not rely on the presence of a version
control system to work. This is a requirement for some uses of the
tree (e.g., Chromium tester checkouts).

This patch removes most of the logic from the layout_tests.port.config
module and makes that as private as possible. Now we just need to move
the default_configuration and flag_from_configuration logic into
DeprecatedPort (or someplace else appropriate) and we can finish
getting rid of the Config class (but that is a separate patch).

* Scripts/webkitpy/common/webkit_finder.py: Added.
(WebKitFinder):
(WebKitFinder.__init__):
(WebKitFinder.webkit_base):
(WebKitFinder.path_from_webkit_base):
(WebKitFinder.path_to_script):
(WebKitFinder.layout_tests_dir):
(WebKitFinder.perf_tests_dir):
* Scripts/webkitpy/layout_tests/port/base.py:
(Port.__init__):
(Port):
(Port.webkit_base):
(Port.path_from_webkit_base):
(Port.path_to_script):
(Port.layout_tests_dir):
(Port.perf_tests_dir):
(Port.set_option_default):
(Port._run_script):
* Scripts/webkitpy/layout_tests/port/base_unittest.py:
(PortTest.test_diff_text):
* Scripts/webkitpy/layout_tests/port/chromium_linux.py:
(ChromiumLinuxPort._determine_driver_path_statically):
* Scripts/webkitpy/layout_tests/port/chromium_unittest.py:
* Scripts/webkitpy/layout_tests/port/config.py:
(Config.__init__):
(Config.build_directory):
(Config.default_configuration):
(Config._read_configuration):
* Scripts/webkitpy/layout_tests/port/config_mock.py: Removed.
* Scripts/webkitpy/layout_tests/port/config_unittest.py:
(ConfigTest.test_default_configuration__standalone):
(ConfigTest.test_default_configuration__scripterror):
* Scripts/webkitpy/layout_tests/port/driver_unittest.py:
(DriverTest.make_port):
(DriverTest.test_no_timeout):
* Scripts/webkitpy/layout_tests/port/gtk.py:
(GtkPort.setup_environ_for_server):
* Scripts/webkitpy/layout_tests/port/mac.py:
(MacPort.show_results_html_file):
* Scripts/webkitpy/layout_tests/port/port_testcase.py:
(TestWebKitPort.__init__):
(PortTestCase.make_port):
* Scripts/webkitpy/layout_tests/port/win_unittest.py:
(WinPortTest.test_expectations_files):
* Scripts/webkitpy/layout_tests/port/xvfbdriver_unittest.py:
(XvfbDriverTest.make_driver):
(XvfbDriverTest.test_stop):
* Scripts/webkitpy/style/checkers/python.py:
(Pylinter.__init__):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@134701 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[CF]: XMLHttpRequest "timeout" events firing as "error" events
https://bugs.webkit.org/show_bug.cgi?id=102271

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2012-11-14
Reviewed by David Kilzer.

Initialize the tiemout flag if the error results from a timeout
in the USE(CFNETWORK) cases.

No new tests. This is covered by http/tests/xmlhttprequest/timeout
tests on ports that USE(CFNETWORK).

* platform/network/cf/ResourceErrorCF.cpp:
(WebCore::ResourceError::ResourceError):
* platform/network/mac/ResourceErrorMac.mm:
(WebCore::ResourceError::ResourceError):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@134702 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Fix Windows exports for TestWebKit
https://bugs.webkit.org/show_bug.cgi?id=102302

Unreviewed, fixing Safari Win build.

Add missing exports.


* win/WebKit2.def:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@134703 268f45cc-cd09-0410-ab3c-d52691b4dbfc
document variable in Document::axObjectCache is actually the topDocument
https://bugs.webkit.org/show_bug.cgi?id=101966

Reviewed by Chris Fleizach.

Name change requested by Darin Adler.

* dom/Document.cpp:
(WebCore::Document::axObjectCache):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@134714 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Windows, WinCairo] Correct build failure.
https://bugs.webkit.org/show_bug.cgi?id=102302

WebCore symbols were mistakenly added to the JavaScriptCore
library definition file.

* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: Remove
WebCore symbols that were incorrectly added to the export file.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@134715 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[WinCairo] Build correction after r134703.

* win/WebKit2CFLite.def: Add exports to CFLite version of
Windows build to match Alec's last update.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@134716 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Fix the build.

* TestWebKitAPI/mac/TestBrowsingContextLoadDelegate.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@134717 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Windows, WinCairo] Unreviewed build fix.

* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
Missed one of the exports that was part of the WebKit2.def.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@134719 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Update DOMException name: InvalidModificationError
https://bugs.webkit.org/show_bug.cgi?id=102281

Reviewed by Kentaro Hara.

Patch 13 of 25 to update DOMException name to match the spec and Firefox.

DOMExcecption INVALID_MODIFICATION_ERR is not used in our code.

* dom/DOMCoreException.cpp:


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

* platform/chromium-linux/fast/forms/zoomed-controls-expected.png: Added.
* platform/chromium-mac-lion/fast/forms/zoomed-controls-expected.png: Added.
* platform/chromium-mac-snowleopard/fast/forms/zoomed-controls-expected.png: Added.
* platform/chromium-mac/fast/forms/zoomed-controls-expected.png: Added.
* platform/chromium/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@134721 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviwed. Rebaselined images.

* platform/chromium-mac/fast/forms/select-empty-option-height-expected.png:
* platform/efl-wk1/fast/forms/select-empty-option-height-expected.png: Renamed from LayoutTests/platform/efl/fast/forms/select-empty-option-height-expected.png.

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