Unreviewed, WebKit gardening.

* platform/chromium/TestExpectations:
Marked the following tests as crash timeout for Android:
media/encrypted-media/encrypted-media-syntax.html,
media/encrypted-media/encrypted-media-events.html, and
media/encrypted-media/encrypted-media-not-loaded.html.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@136471 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed gardening of Apple Windows Port.
https://bugs.webkit.org/show_bug.cgi?id=97026

* platform/win/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@136472 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed. Gardening of Apple Windows port.
https://bugs.webkit.org/show_bug.cgi?id=102603.

* platform/win/TestExpectations:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@136473 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed, functionality fix after r136437.

Calling sys.exit actually raises a SystemExit exception that
is then handled in the second block and causes the script to
return an 'exceptional' exit code rather than the code presenting
the number of failed tests.

This is just a temporary fix to get the faultless bots green while
they are unnecessarily red at the moment. The problem and a proper
fix will be properly addressed.

* Scripts/webkitpy/layout_tests/run_webkit_tests.py:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@136474 268f45cc-cd09-0410-ab3c-d52691b4dbfc
IndexedDB: Correct database version after aborted upgrade
https://bugs.webkit.org/show_bug.cgi?id=103763

Reviewed by Tony Chang.

Source/WebCore:

After an aborted "versionchange" transaction, the IDBDatabase would fetch a fresh snapshot
of the metadata from the back end. If the back end had already started a new "versionchange"
transaction the snapshot would be bogus. Instead, save a copy of the IDBDatabase's metadata
and roll back to that, as is done for IDBObjectStore.

Tests: storage/indexeddb/intversion-abort-in-initial-upgradeneeded.html
       storage/indexeddb/mozilla/versionchange-abort.html
       storage/indexeddb/unblocked-version-changes.html

* Modules/indexeddb/IDBDatabase.cpp:
(WebCore::IDBDatabase::IDBDatabase):
(WebCore::IDBDatabase::transactionCreated):
* Modules/indexeddb/IDBDatabase.h:
(WebCore::IDBDatabase::setMetadata): Let IDBOpenDBRequest and IDBTransaction tinker.
* Modules/indexeddb/IDBOpenDBRequest.cpp:
(WebCore::IDBOpenDBRequest::onUpgradeNeeded): Fetch new and compute old metadata.
(WebCore::IDBOpenDBRequest::onSuccess): Fetch new metadata, in case upgrade changed it.
* Modules/indexeddb/IDBTransaction.cpp:
(WebCore::IDBTransaction::create): Stash the old metadata, in case of rollback.
(WebCore::IDBTransaction::IDBTransaction):
(WebCore::IDBTransaction::onAbort): Revert the database as well as the stores.
* Modules/indexeddb/IDBTransaction.h:
(IDBTransaction):

Source/WebKit/chromium:

Pass previously created proxy along in an open onSuccess, rather than a useless wrapper.

* src/WebIDBCallbacksImpl.cpp:
(WebKit::WebIDBCallbacksImpl::WebIDBCallbacksImpl):
(WebKit::WebIDBCallbacksImpl::onSuccess):
(WebKit::WebIDBCallbacksImpl::onUpgradeNeeded):
* src/WebIDBCallbacksImpl.h:
(WebCore):
(WebIDBCallbacksImpl):

LayoutTests:

Update test expectations and tweak a test so it's testing what it claimed.

* storage/indexeddb/intversion-abort-in-initial-upgradeneeded-expected.txt:
* storage/indexeddb/mozilla/resources/versionchange-abort.js:
(postAbort):
* storage/indexeddb/mozilla/versionchange-abort-expected.txt:
* storage/indexeddb/resources/unblocked-version-changes.js:
(onUpgradeNeeded):
* storage/indexeddb/unblocked-version-changes-expected.txt:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@136475 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[GTK] Add WebKitDOMShadowRoot.h to the list of public API headers after r135693
https://bugs.webkit.org/show_bug.cgi?id=103909

Reviewed by Martin Robinson.

WebKitDOMShadowRoot was added in r135693. As it is added to
webkitdom.h we have to export the include file, otherwise clients
will fail to build due to the missing file.

* bindings/gobject/GNUmakefile.am:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@136476 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Coordinated Graphics: Reorder messages to LayerTreeCoordinatorProxy
https://bugs.webkit.org/show_bug.cgi?id=103843

Patch by Huang Dongsung <luxtella@company100.net> on 2012-12-03
Reviewed by Noam Rosenthal.

Remove updateViewport() in LayerTreeCoordinatorProxy::setRootCompositingLayer()
because LayerTreeCoordinatorProxy::didRenderFrame() is always called after
setting the root layer. There is no behaviour changes because setting the root
layer isn't actually applied to TextureMapperLayer until DidRenderFrame message
is received.

This is in preparation for refactoring TextureMapper to work in an actor
model (http://webkit.org/b/103854).

* UIProcess/CoordinatedGraphics/LayerTreeCoordinatorProxy.cpp:
(WebKit::LayerTreeCoordinatorProxy::setRootCompositingLayer):
* WebProcess/WebPage/CoordinatedGraphics/LayerTreeCoordinator.cpp:
(WebKit::LayerTreeCoordinator::flushPendingLayerChanges):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@136477 268f45cc-cd09-0410-ab3c-d52691b4dbfc
svg/foreignObject/viewport-foreignObject-crash.html recurses infinitely sometimes
https://bugs.webkit.org/show_bug.cgi?id=103935.

Reviewed by Abhishek Arya.

* svg/foreignObject/viewport-foreignobject-crash.html:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@136478 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[V8] Enter an Isolate before initializing PerIsolateData
https://bugs.webkit.org/show_bug.cgi?id=103949

Reviewed by Adam Barth.

Currently we initialize PerIsolateData before entering an Isolate,
which prevents us from using an Isolate in the PerIsolateData
constructor. We should enter an Isolate first and then initialize
PerIsolateData.

No tests. No change in behavior.

* bindings/v8/WorkerScriptController.cpp:
(WebCore::WorkerScriptController::WorkerScriptController):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@136479 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed build fix after r136467

The template element patch added asserts in parserAppendChild and parserInsertBefore which should be valid, but DOMImplementation::createDocument() calls parserAppendChild with docType without regard to its owner. This patch removes the assert and adds a FIXME.

Patch by Rafael Weinstein <rafaelw@chromium.org> on 2012-12-03

* dom/ContainerNode.cpp:
(WebCore::ContainerNode::parserInsertBefore):
(WebCore::ContainerNode::parserAppendChild):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@136480 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Change ChildNodeInsertionNotifier::m_postInsertionsNotificationTargets from a Vector to an OwnPtr
https://bugs.webkit.org/show_bug.cgi?id=103868

Reviewed by Darin Adler.

ChildNodeInsertionNotifier::m_postInsertionsNotificationTargets is
used for HTMLFrameElement and HTMLBodyElement only, which would be
a cold path. We can change it from a Vector to an OwnPtr<Vector>
so that ChildNodeInsertionNotifier can be allocated faster. This patch
optimizes Dromaeo/dom-modify by 1.4%.

[Dromaeo/dom-modify in Chromium/Linux]
Before: 4532 runs/sec, 4545 runs/sec, 4530 runs/sec, 4536 runs/sec
After:  4595 runs/sec, 4606 runs/sec, 4597 runs/sec, 4602 runs/sec

No tests. No change in behavior.

* dom/ContainerNodeAlgorithms.h:
(ChildNodeInsertionNotifier):
(WebCore::ChildNodeInsertionNotifier::notifyNodeInsertedIntoDocument):
(WebCore::ChildNodeInsertionNotifier::notifyNodeInsertedIntoTree):
(WebCore::ChildNodeInsertionNotifier::notify):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@136481 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[JSC] Generate visitChildren() for uncustomized EventTarget interfaces
https://bugs.webkit.org/show_bug.cgi?id=103908

Patch by Michael Pruett <michael@68k.org> on 2012-12-04
Reviewed by Geoffrey Garen.

CodeGeneratorJS.pm should automatically generate visitChildren()
for EventTarget interfaces without custom mark functions even if
those interfaces have no functions or cached attributes.

This change is needed for IDBOpenDBRequest and IDBVersionChangeRequest.

No new tests. Covered by existing tests.

* bindings/scripts/CodeGeneratorJS.pm:
(GenerateImplementation):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@136482 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[BlackBerry] On taking over a backingstore, reset the previous page's tiles.
https://bugs.webkit.org/show_bug.cgi?id=103969
RIM PR 253496

Reviewed by George Staikos.

With buffers being explicitly reclaimed from backingstore
geometries, we have to make sure that the previously
active backingstore releases its front buffers for use
in the newly active one.

Previously, this clearing of backingstore tiles occurred
after the dormant backingstore is reactivated,
the backingstore active in the meantime would just use
the back buffer anyway and leave the dormant one with
dangling pointers that would just not be shown.
Now that we have a counted list of back buffers,
we need to be explicit about this thing upfront.

Fixes a crash that would occur after switching ownership
of the backingstore to a different WebPage.

* Api/WebPage.cpp:
(BlackBerry::WebKit::WebPagePrivate::resumeBackingStore):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@136483 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[BlackBerry] Use updated API for backingstore tiles.
https://bugs.webkit.org/show_bug.cgi?id=103970
PR 212369

Reviewed by George Staikos.
Internally reviewed by Arvid Nilsson.

We now make use of Platform::Settings::tileSize() in the
backingstore and don't hardcode the number of back buffers
like we used to.

* Api/BackingStore.cpp:
(BlackBerry::WebKit::bestDivisor):
(BlackBerry::WebKit::BackingStorePrivate::tileWidth):
(BlackBerry::WebKit::BackingStorePrivate::tileHeight):
(BlackBerry::WebKit::BackingStorePrivate::tileSize):
* WebKitSupport/AboutData.cpp:
(BlackBerry::WebKit::configPage):
* WebKitSupport/SurfacePool.cpp:
(BlackBerry::WebKit::SurfacePool::SurfacePool):
(BlackBerry::WebKit::SurfacePool::numberOfBackingStoreFrontBuffers):
(BlackBerry::WebKit::SurfacePool::initialize):
* WebKitSupport/SurfacePool.h:
(SurfacePool):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@136484 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[EFL][WK2] Use consistent class names inside Ewk classes
https://bugs.webkit.org/show_bug.cgi?id=103015

Patch by Jaehun Lim <ljaehun.lim@samsung.com> on 2012-12-04
Reviewed by Gyuyoung Kim.

WebKit EFL doesn't use '_' in class names.
This patch removes the remaining uses of '_' inside Ewk classes.

* UIProcess/API/efl/EwkViewImpl.cpp:
(EwkViewImpl::EwkViewImpl):
(EwkViewImpl::~EwkViewImpl):
(EwkViewImpl::informIconChange):
(EwkViewImpl::requestColorPicker):
(EwkViewImpl::requestPopupMenu):
* UIProcess/API/efl/ewk_back_forward_list.cpp:
(EwkBackForwardList::nextItem):
(EwkBackForwardList::previousItem):
(EwkBackForwardList::currentItem):
(EwkBackForwardList::itemAt):
(EwkBackForwardList::getFromCacheOrCreate):
(EwkBackForwardList::createEinaList):
* UIProcess/API/efl/ewk_back_forward_list_private.h:
(EwkBackForwardList):
* UIProcess/API/efl/ewk_context.cpp:
(EwkContext::EwkContext):
(EwkContext::cookieManager):
(EwkContext::databaseManager):
(EwkContext::ensureFaviconDatabase):
(EwkContext::faviconDatabase):
(EwkContext::storageManager):
* UIProcess/API/efl/ewk_context_private.h:
(EwkContext):
* UIProcess/API/efl/ewk_cookie_manager.cpp:
(EwkCookieManager::cookiesDidChange):
(getAcceptPolicyCallback):
(getHostnamesWithCookiesCallback):
* UIProcess/API/efl/ewk_cookie_manager_private.h:
(EwkCookieManager::create):
* UIProcess/API/efl/ewk_database_manager.cpp:
(EwkDatabaseManager::createOriginList):
(getDatabaseOriginsCallback):
* UIProcess/API/efl/ewk_database_manager_private.h:
(EwkDatabaseManager):
* UIProcess/API/efl/ewk_favicon_database.cpp:
(EwkFaviconDatabase::didChangeIconForPageURL):
(EwkFaviconDatabase::iconDataReadyForPageURL):
* UIProcess/API/efl/ewk_popup_menu.cpp:
(EwkPopupMenu::EwkPopupMenu):
(EwkPopupMenu::~EwkPopupMenu):
* UIProcess/API/efl/ewk_storage_manager.cpp:
(EwkStorageManager::createOriginList):
(getStorageOriginsCallback):
* UIProcess/API/efl/ewk_storage_manager_private.h:
(EwkStorageManager):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@136485 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Make svg/dom/viewspec-parser-*.html non-flaky
https://bugs.webkit.org/show_bug.cgi?id=103744

Patch by Jussi Kukkonen <jussi.kukkonen@intel.com> on 2012-12-04
Reviewed by Dirk Schulze.

Modified viewspec-parser-*.html in two ways:
- remove duplicate testing: the five files were all running
  the exact same tests (only a few percent were unique).
- move the test division out of viewspec-parser.js to make it more
  visible, divide the tests into logical sets.

* platform/efl-wk2/TestExpectations:
* svg/dom/resources/viewspec-parser.js:
(startViewspecTests):
* svg/dom/viewspec-parser-1-expected.txt:
* svg/dom/viewspec-parser-1.html:
* svg/dom/viewspec-parser-2-expected.txt:
* svg/dom/viewspec-parser-2.html:
* svg/dom/viewspec-parser-3-expected.txt:
* svg/dom/viewspec-parser-3.html:
* svg/dom/viewspec-parser-4-expected.txt:
* svg/dom/viewspec-parser-4.html:
* svg/dom/viewspec-parser-5-expected.txt:
* svg/dom/viewspec-parser-5.html:
* svg/dom/viewspec-parser-6-expected.txt: Added.
* svg/dom/viewspec-parser-6.html: Added.
* svg/dom/viewspec-parser-7-expected.txt: Added.
* svg/dom/viewspec-parser-7.html: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@136486 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[EFL][WK2][AC] USE_GRAPHICS_SURFACE should be enabled only if Xcomposite and Xrender extensions are found.
https://bugs.webkit.org/show_bug.cgi?id=103710.

Patch by Kondapally Kalyan <kalyan.kondapally@intel.com> on 2012-12-04
Reviewed by Kenneth Rohde Christiansen.

When using GLX back-end we are dependent on GLX support, Xcomposite and Xrender extensions.
In this case, GraphicsSurface usage depends on Xcomposite and Xrender extensions.
USE_GRAPHICS_SURFACE should be enabled only if Xcomposite and Xrender extensions are found.

.:

* Source/cmake/OptionsEfl.cmake:

Source/WebCore:

* platform/graphics/opengl/GLPlatformSurface.cpp:
(WebCore::GLPlatformSurface::createTransportSurface):
* platform/graphics/surfaces/glx/GLXSurface.cpp:
(WebCore):
* platform/graphics/surfaces/glx/GLXSurface.h:
(WebCore::SharedX11Resources::createConfig):
(SharedX11Resources):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@136487 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: [REGRESSION] [Styles] Rule disappears if edited selector does not affect selected node
https://bugs.webkit.org/show_bug.cgi?id=103059

Reviewed by Pavel Feldman.

Source/WebCore:

This change effectively turns WebInspector.cssModel.setRuleSelector() into a _userOperation
(in terms of StylesSidebarPane), which finishes upon the _finishOperationAndMoveEditor() invocation.

* inspector/front-end/CSSStyleModel.js:
(WebInspector.CSSRule): Fix selectorText now that r136370 has landed.
* inspector/front-end/StylesSidebarPane.js:
(WebInspector.StylePropertiesSection.prototype.update): Update the selector text from the model.
(WebInspector.StylePropertiesSection.prototype._markSelectorMatches): Set the "selector" className regardless of the matched selectors presence.
(WebInspector.StylePropertiesSection.prototype.successCallback): Make use of the _userOperation flag.
(WebInspector.StylePropertiesSection.prototype.finishOperationAndMoveEditor): Delete the _userOperation flag.
(WebInspector.StylePropertiesSection.prototype.editingSelectorCommitted): Make use of the _userOperation flag.
(WebInspector.BlankStylePropertiesSection.prototype.editingSelectorCommitted): Mark selector matches.
(WebInspector.BlankStylePropertiesSection.prototype.editingSelectorCancelled): Delete the _userOperation flag.

LayoutTests:

* http/tests/inspector/elements-test.js:
(initialize_ElementTest.InspectorTest.dumpSelectedElementStyles):
  Add dumping of the [no-affect] flag for rules not affecting the currently selected element.
* inspector/styles/commit-selector-expected.txt: Rebaseline.

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

* platform/chromium/TestExpectations:
Updated about 200 tests' expectations, because the tests were
reported as "expected to XXX, but YYY".

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@136489 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed. Rebaselined run-bindings-tests.

* bindings/scripts/test/JS/JSTestNode.cpp:
(WebCore::JSTestNode::visitChildren):
(WebCore):

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