Make old-run-webkit-tests handle setting the results directory properly.
https://bugs.webkit.org/show_bug.cgi?id=102273
<rdar://problem/11571607>

Reviewed by Timothy Horton.

A call to chdirWebkit in old-run-webkit-tests set the current working directory to the OpenSource folder.
Thus setting --results-directory to OpenSource/layout-test-results would create OpenSource/layout-test-results inside the main OpenSource folder.
This caused many other problems including failure to upload test results and failed future test runs.
The solution is to save the current working directory before calling chdirWebKit and then reconstructing the full path to the results directory 
using the saved directory when setting $testResultsDirectory.

* Scripts/old-run-webkit-tests:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@134824 268f45cc-cd09-0410-ab3c-d52691b4dbfc
IndexedDB: setVersion test conversion batch 6
https://bugs.webkit.org/show_bug.cgi?id=102318

Reviewed by Tony Chang.

Salvaged the useful parts of intversion-and-setversion as
intversion-upgrades.

* storage/indexeddb/intversion-and-setversion-expected.txt: Removed.
* storage/indexeddb/intversion-upgrades-expected.txt: Added.
* storage/indexeddb/intversion-upgrades.html: Renamed from LayoutTests/storage/indexeddb/intversion-and-setversion.html.
* storage/indexeddb/resources/intversion-and-setversion.js: Removed.
* storage/indexeddb/resources/intversion-upgrades.js: Added.
(test):
(deleteSuccess):
(initialUpgradeNeeded):
(openSuccess):
(connection1VersionChangeCallback):
(connection2BlockedCallback):
(connection2UpgradeNeeded):
(transactionCompleted):
(connection2Success):
(connection3Success):
(errorWhenTryingLowVersion):
(connection4UpgradeNeeded):
(connection4Success):
(connection5Success):
* storage/indexeddb/resources/shared.js:
(unexpectedVersionChangeCallback):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@134825 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Generate Settings from a .in file
https://bugs.webkit.org/show_bug.cgi?id=100393

Reviewed by Adam Barth.

.:

Generate SettingsMacros.h for cmake.

* Source/cmake/WebKitMacros.cmake:

Source/WebCore:

Generate most settings from an .in file to reduce human mistakes and
to make it easier to add/remove new settings.

I only moved settings that are easy to move at this point.  There are many more that
have some minor naming inconsistencies that we can also move to Settings.in, but I'll
do that in a follow up patch.

This doesn't generate SettingInternals.* yet-- we can do that in a follow up patch.

No new tests, this is a refactor.

* CMakeLists.txt:
* DerivedSources.make: Run make_settings.pl.
* DerivedSources.pri: Run make_settings.pl.
* GNUmakefile.am: Run make_settings.pl.
* GNUmakefile.list.am:
* WebCore.exp.in: Remove functions that are now inline in the header.
* WebCore.gyp/WebCore.gyp: Run action_makenames.py, which will run make_settings.pl.
* WebCore.gyp/scripts/action_makenames.py:
(main): Allow make_settings.pl.
* WebCore.order: Remove functions that are now inline in the header.
* html/ValidationMessage.cpp:
(WebCore::ValidationMessage::setMessageDOMAndStartTimer): Fix a typo in "magnification".
* page/Settings.cpp:
(WebCore::Settings::Settings): Replace generated settings with SETTINGS_INITIALIZER_LIST.
* page/Settings.h:
(Settings): Replace generated settings with SETTINGS_GETTERS_AND_SETTERS and SETTINGS_MEMBER_VARIABLES.
* page/Settings.in: Added.
* page/make_settings.pl: Added.
(defaultItemFactory):
(generateCode):
(generateHeader): Use a similar model as make_names.pl.
(printConditionalMacros):
(printGettersAndSetters):
(printMemberVariables):
(printGetterAndSetter):
(printInitializerList):
(printInitializer):

Tools:

Add the generated WebCore files to the include dir.

* TestWebKitAPI/CMakeLists.txt:
* WebKitTestRunner/CMakeLists.txt:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@134828 268f45cc-cd09-0410-ab3c-d52691b4dbfc
MutationObserver wrapper should not be collected while still observing
https://bugs.webkit.org/show_bug.cgi?id=102328

Patch by Elliott Sprehn <esprehn@chromium.org> on 2012-11-15
Reviewed by Adam Barth.

Source/WebCore:

Make MutationObserver an ActiveDOMObject so that the wrapper is not
collected while it is still observing the DOM. This is needed because
the wrapper is passed into the callback and expandos on the wrapper
should be preserved.

Test: fast/mutation/observer-wrapper-dropoff.html

* bindings/js/JSMutationObserverCustom.cpp:
(WebCore::JSMutationObserverConstructor::constructJSMutationObserver):
* bindings/v8/custom/V8MutationObserverCustom.cpp:
(WebCore::V8MutationObserver::constructorCallback):
* dom/MutationObserver.cpp:
(WebCore::MutationObserver::create):
(WebCore::MutationObserver::MutationObserver):
(WebCore::MutationObserver::observationStarted):
(WebCore::MutationObserver::observationEnded):
* dom/MutationObserver.h:
(WebCore):
* dom/MutationObserver.idl:

LayoutTests:

Test that a MutationObserver wrapper is not collected while the observer
is still observing since the wrapper must be passed into the callback
later.

* fast/mutation/observer-wrapper-dropoff-expected.txt: Added.
* fast/mutation/observer-wrapper-dropoff.html: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@134830 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed. Update chromium test expectations.

* platform/chromium/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@134832 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[chromium] Remove unused debug border setters from the WebLayer API
https://bugs.webkit.org/show_bug.cgi?id=102274

Reviewed by James Robinson.

* chromium/public/WebLayer.h:
(WebLayer):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@134833 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed. WebGL not supported on Windows. Skipping fast/images/webgl-teximage2d.html.

* platform/win/TestExpectations:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@134835 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed. HiDPI is not enabled on Windows (as indicated by test result). Adding failing expected result.

* platform/win/fast/canvas/canvas-resize-reset-pixelRatio-expected.txt: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@134836 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[chromium] Create default directory so that cq can apply patch
https://bugs.webkit.org/show_bug.cgi?id=102421

Patch by Scott Violet <sky@chromium.org> on 2012-11-15
Reviewed by Tony Chang.

Done in hopes of patch that copies files to this directory working.

Source/Platform:

* chromium/public/default: Added.

Source/WebKit/chromium:

* public/platform/default: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@134837 268f45cc-cd09-0410-ab3c-d52691b4dbfc
IndexedDB: Indexing tests are flaky-crashing
https://bugs.webkit.org/show_bug.cgi?id=102283

Reviewed by Tony Chang.

Source/WebCore:

Processing the final task can cause IDBTransactionBackendImpl references to be released
by all holders. Prior to looping over the tasks (or, in an even earlier implementation,
swapping queues) control would fall off the end of the function. The loop termination
check introduced in http://wkrev.com/134529 requires that |this| be kept alive until
the method completes.

Test: storage/indexeddb/transaction-crash-in-tasks.html

* Modules/indexeddb/IDBTransactionBackendImpl.cpp:
(WebCore::IDBTransactionBackendImpl::abort): Rename self => protect.
(WebCore::IDBTransactionBackendImpl::commit): Rename self => protect.
(WebCore::IDBTransactionBackendImpl::taskTimerFired): New self-ref.

LayoutTests:

Reduced repro case, although the behavior is still flaky.

* storage/indexeddb/transaction-crash-in-tasks-expected.txt: Added.
* storage/indexeddb/transaction-crash-in-tasks.html: Added.


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

Rebaselining pixel tests after r102427

* platform/chromium-mac-lion/svg/custom/baseval-animval-equality-expected.png:
* platform/chromium-mac-lion/svg/custom/baseval-animval-equality-expected.txt: Copied from LayoutTests/platform/gtk/svg/custom/baseval-animval-equality-expected.txt.
* platform/chromium-mac-lion/svg/dom/SVGLengthList-basics-expected.png:
* platform/chromium-mac-snowleopard/svg/custom/baseval-animval-equality-expected.png:
* platform/chromium-mac-snowleopard/svg/custom/baseval-animval-equality-expected.txt: Copied from LayoutTests/platform/gtk/svg/custom/baseval-animval-equality-expected.txt.
* platform/chromium-mac-snowleopard/svg/dom/SVGLengthList-basics-expected.png:
* platform/chromium-mac/svg/dom/SVGLengthList-basics-expected.png:
* platform/chromium-win-xp/svg/custom/baseval-animval-equality-expected.png: Added.
* platform/chromium-win-xp/svg/dom/SVGLengthList-basics-expected.png: Added.
* platform/efl-wk1/svg/dom/SVGLengthList-basics-expected.png: Renamed from LayoutTests/platform/efl/svg/dom/SVGLengthList-basics-expected.png.
* platform/gtk/svg/custom/baseval-animval-equality-expected.txt:
* platform/mac-lion/svg/custom/baseval-animval-equality-expected.txt: Copied from LayoutTests/platform/gtk/svg/custom/baseval-animval-equality-expected.txt.
* platform/mac-wk2/svg/custom/baseval-animval-equality-expected.txt: Copied from LayoutTests/platform/gtk/svg/custom/baseval-animval-equality-expected.txt.
* platform/qt/svg/custom/baseval-animval-equality-expected.txt:

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

Reviewed by Ojan Vafai.

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

DOMSTRING_SIZE_ERR is historical and not used in any spec or in our code.

* dom/DOMCoreException.cpp:
* dom/ExceptionCode.h:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@134840 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed. More subpixel layout test rebaselines for Windows.

* platform/win/fast/multicol/vertical-rl/float-multicol-expected.txt: Added.
* platform/win/fast/multicol/vertical-rl/nested-columns-expected.txt: Added.
* platform/win/scrollbars/custom-scrollbar-with-incomplete-style-expected.txt:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@134841 268f45cc-cd09-0410-ab3c-d52691b4dbfc
ASSERTION FAILED: fastAttributeLookupAllowed(name) for 7 layout tests
<http://webkit.org/b/102423>

Reviewed by Anders Carlsson.

Use Element::getAttributeItem() to find out if the element has a given attribute
instead of fastHasAttribute() since that causes assertions for the "style" attribute.

* html/parser/HTMLConstructionSite.cpp:
(WebCore::HTMLConstructionSite::mergeAttributesFromTokenIntoElement):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@134842 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Ensure that scrollbar layers show debug borders
https://bugs.webkit.org/show_bug.cgi?id=102429

Reviewed by Anders Carlsson.

After r133517, scrollbar layers no longer showed debug borders, which
was very confusing. Fix this by explicitly calling setShowDebugBorder()
on the scrollbar-related layers owned by RenderLayerCompositor
and RenderLayerBacking.

* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::updateDebugIndicators):
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::cacheAcceleratedCompositingFlags):
(WebCore::RenderLayerCompositor::updateOverflowControlsLayers):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@134843 268f45cc-cd09-0410-ab3c-d52691b4dbfc
IndexedDB: remove setVersion from intversion-long-queue
https://bugs.webkit.org/show_bug.cgi?id=102322

Reviewed by Tony Chang.

This test probably doesn't provide as much value as it used to but
tests like this, where there's a long sequence of interdependent
events, have caught stuff for us in the past. There are endless
variants that will all exercise our code differently.

* storage/indexeddb/intversion-long-queue-expected.txt:
* storage/indexeddb/resources/intversion-long-queue.js:
(prepareDatabase):
(connection1Success):
(connection1VersionChangeCallback):
(connection2Blocked):
(deleteDatabaseBlockedCallback):
(deleteDatabaseSuccessCallback):
(connection2UpgradeNeeded):
(connection2Success):
(connection2TransactionComplete):
(connection2VersionChangeEvent):
(connection3UpgradeNeeded):
(connection3Success):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@134844 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[V8] Remove redundant $interfaceName from function parameters
https://bugs.webkit.org/show_bug.cgi?id=102334

Reviewed by Adam Barth.

'sub func { my $dataNode = shift; my $interfaceName = shift; }'
is redundant. We can get $interfaceName by $dataNode->name.

No tests. No change in behavior.

* bindings/scripts/CodeGeneratorV8.pm:
(GenerateOpaqueRootForGC):
(GenerateHeader):
(GenerateConstructorGetter):
(GenerateNormalAttrGetter):
(GenerateReplaceableAttrSetter):
(GenerateNormalAttrSetter):
(GenerateOverloadedFunctionCallback):
(GenerateFunctionCallback):
(GenerateOverloadedConstructorCallback):
(GenerateSingleConstructorCallback):
(GenerateConstructorCallback):
(GenerateEventConstructorCallback):
(GenerateTypedArrayConstructorCallback):
(GenerateNamedConstructorCallback):
(GenerateBatchedAttributeData):
(GenerateImplementation):
(GenerateToV8Converters):
(GetNativeTypeForConversions):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@134845 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Make assumptions about m_parentStyle consistent within StyleResolver::applyProperty()
https://bugs.webkit.org/show_bug.cgi?id=101696

Reviewed by Tony Chang.

Most of the code in StyleResolver::applyProperty assumes that isInherit implies that m_parentStyle is available.
This patch ASSERTs that this assumption is correct, and removes the few existing checks to maintain consistency.

No new tests / covered by all existing CSS tests.

* css/StyleResolver.cpp:
(WebCore::StyleResolver::applyProperty):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@134846 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Chromium] Test expectations - we're passing!

Unreviewed expectations for canvas-shadow.html

* platform/chromium-linux-x86/platform/chromium/virtual/gpu/fast/canvas/canvas-shadow-expected.txt: Added.
* platform/chromium-linux/platform/chromium/virtual/gpu/fast/canvas/canvas-shadow-expected.txt: Added.
* platform/chromium-win-xp/platform/chromium/virtual/gpu/fast/canvas/canvas-shadow-expected.txt: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@134847 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed. CSS3_TEXT is not enabled on Windows. 
Skipping tests:
fast/css3-text/css3-text-align-last/getComputedStyle/getComputedStyle-text-align-last-inherited.html
fast/css3-text/css3-text-align-last/getComputedStyle/getComputedStyle-text-align-last.html
fast/css3-text/css3-text-decoration/getComputedStyle/getComputedStyle-text-decoration-line.html

* platform/win/TestExpectations:


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