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
[GTK] Simplify GObject DOM bindings code for handling properties
https://bugs.webkit.org/show_bug.cgi?id=101072

Reviewed by Xan Lopez.

Do not override GObjectClass::set_property if the wrapped object
doesn't have writable properties, and don't override
GObjectClass::get_property if the wrapped object doesn't have
properties at all. It reduces some GObject boilerplate in
generated code for some objects.

* bindings/scripts/CodeGeneratorGObject.pm:
(GenerateProperties):
* bindings/scripts/test/GObject/WebKitDOMFloat64Array.cpp:
(webkit_dom_float64array_class_init):
* bindings/scripts/test/GObject/WebKitDOMTestActiveDOMObject.cpp:
(webkit_dom_test_active_dom_object_class_init):
* bindings/scripts/test/GObject/WebKitDOMTestCallback.cpp:
(webkit_dom_test_callback_class_init):
* bindings/scripts/test/GObject/WebKitDOMTestCustomNamedGetter.cpp:
(webkit_dom_test_custom_named_getter_class_init):
* bindings/scripts/test/GObject/WebKitDOMTestEventConstructor.cpp:
(webkit_dom_test_event_constructor_class_init):
* bindings/scripts/test/GObject/WebKitDOMTestEventTarget.cpp:
(webkit_dom_test_event_target_class_init):
* bindings/scripts/test/GObject/WebKitDOMTestException.cpp:
(webkit_dom_test_exception_class_init):
* bindings/scripts/test/GObject/WebKitDOMTestInterface.cpp:
(webkit_dom_test_interface_class_init):
* bindings/scripts/test/GObject/WebKitDOMTestMediaQueryListListener.cpp:
(webkit_dom_test_media_query_list_listener_class_init):
* bindings/scripts/test/GObject/WebKitDOMTestNamedConstructor.cpp:
(webkit_dom_test_named_constructor_class_init):
* bindings/scripts/test/GObject/WebKitDOMTestNode.cpp:
(webkit_dom_test_node_class_init):
* bindings/scripts/test/GObject/WebKitDOMTestObj.cpp:
(webkit_dom_test_obj_class_init):
* bindings/scripts/test/GObject/WebKitDOMTestSerializedScriptValueInterface.cpp:
(webkit_dom_test_serialized_script_value_interface_class_init):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@136491 268f45cc-cd09-0410-ab3c-d52691b4dbfc
PerformanceTests: Dromaeo should report individual test result
https://bugs.webkit.org/show_bug.cgi?id=99800

Reviewed by Eric Seidel.

Made one small modification to Droameo's webrunner.js so that it reports individual runs/s values
for each subtest. This allows us to compute the aggregated run/s for each iteration like other
performance tests.

Also stop measuring memory usage in Dromaeo tests because some Dromaeo tests (e.g. jslib-modify-jquery)
have unrealistic memory usage, and measuring them at the time of teardown doesn't make much sense.

* Animation/balls.html: Fixed typo: measureValueAync.
* Dromaeo/resources/dromaeo/web/webrunner.js:

* Dromaeo/resources/dromaeorunner.js:
(DRT.setup): Call prepareToMeasureValuesAsync so that DRT.teardown can use meausreValueAsync, and log
"Running 5 times". Since the log container will be inserted before iframe, we need to explicitly insert
the iframe as the first child of the body element to avoid logs from affecting the iframe's position.
Also specify the number of iterations by calling PerfTestRunner.iterationCount() so that we may adjust
the number of iterations in PerfTestRunner.

(DRT.progress): Log individual measurement for each subtest.
(DRT.teardown): Compute the aggregated result for each iteration, and log them using measureValueAsync.

* resources/runner.js:
(PerfTestRunner.logStatistics): Merged printStatistics since it's no longer needed after r131638.
(PerfTestRunner): Removed getAndPrintMemoryStatistics since it was used only in Dromaeo tests but
we no longer measure memory usage in Dromaeo tests.

(start): Increment completedRuns from -1 to 0 for Dromaeo tests where we don't want to ignore the initial
measurement. Note that ignoreWarmUpAndLog ignores the measurements for which completedRuns is negative.

(ignoreWarmUpAndLog): We don't measure memory usage in Dromaeo tests. See above.
(PerfTestRunner.iterationCount): Added. This abstraction allows us to auto-adjust the number of iterations from
run-perf-tests in near future.
(PerfTestRunner.measureValueAsync): Renamed from measureValueAync.

Tools: Dromaeo should report individual test result
https://bugs.webkit.org/show_bug.cgi?id=99800

Reviewed by Eric Seidel.

Ignore subtest results spit out by Dromaeo tests.

* Scripts/webkitpy/performance_tests/perftest.py:
(PerfTest): Added a line to ignore.
* Scripts/webkitpy/performance_tests/perftest_unittest.py:
(MainTest.test_parse_output_with_subtests): Added.

LayoutTests: Fix a test and re-enable fast/harness/perftests on Chromium.

* fast/harness/perftests/runs-per-second-log.html:
* platform/chromium/TestExpectations:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@136492 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: [Overrides] Add ability to override the page CSS media type
https://bugs.webkit.org/show_bug.cgi?id=103752

Reviewed by Pavel Feldman.

Source/WebCore:

This change emulates the CSS media types through the instrumentation of FrameView::mediaType().
Even though it already checks the associated FrameLoaderClient::overrideMediaType(), instrumenting
every single platform FrameLoaderClient implementation out there seems wrong.

Test: inspector/styles/media-emulation.html

* English.lproj/localizedStrings.js:
* inspector/Inspector.json: Add Page.setEmulatedMedia().
* inspector/InspectorInstrumentation.cpp:
(WebCore::InspectorInstrumentation::applyEmulatedMediaImpl): Added.
* inspector/InspectorInstrumentation.h:
(WebCore::InspectorInstrumentation::applyEmulatedMedia): Added.
* inspector/InspectorPageAgent.cpp:
(WebCore::InspectorPageAgent::restore): Restores the media emulation state.
(WebCore::InspectorPageAgent::disable): Resets the media emulation state.
(WebCore::InspectorPageAgent::setEmulatedMedia): Added.
(WebCore::InspectorPageAgent::applyEmulatedMedia): Applies the emulated CSS media if needed.
* inspector/InspectorPageAgent.h:
* inspector/front-end/CSSStyleModel.js: Add the list of media types.
* inspector/front-end/OverridesView.js: Add the CSS media type override UI.
(WebInspector.OverridesView):
(WebInspector.OverridesView.prototype._createMediaEmulationElement): Builds the UI.
(WebInspector.OverridesView.prototype._emulateMediaChanged): Handles the control value changes.
* inspector/front-end/Settings.js: Add the "emulatedCSSMedia" setting.
* page/FrameView.cpp:
(WebCore::FrameView::mediaType):
  Uses InspectorInstrumentation::applyEmulatedMedia() to provide the emulated value.

LayoutTests:

The test invokes PageAgent.setEmulatedMedia() and emits the WebInspector.cssModel.mediaQueryResultChanged() signal.

* inspector/styles/media-emulation-expected.txt: Added.
* inspector/styles/media-emulation.html: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@136493 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[GTK] Avoid unnecessary heap allocations during drag and drop operations
https://bugs.webkit.org/show_bug.cgi?id=87938

Reviewed by Martin Robinson.

Source/WebCore:

* platform/gtk/GtkDragAndDropHelper.cpp:
(WebCore::GtkDragAndDropHelper::handleDragMotion): Return a
pointer to the DataObjectGtk so that the caller can create the
DragData object in the stack.
(WebCore::GtkDragAndDropHelper::handleDragDataReceived): Ditto.
(WebCore::GtkDragAndDropHelper::handleDragDrop): Ditto.
* platform/gtk/GtkDragAndDropHelper.h:

Source/WebKit/gtk:

* webkit/webkitwebview.cpp:
(webkit_web_view_drag_motion): Create DragData for the given
DataObjectGtk in the stack.
(webkit_web_view_drag_data_received): Ditto.
(webkit_web_view_drag_drop): Ditto.

Source/WebKit2:

* UIProcess/API/gtk/WebKitWebViewBase.cpp:
(webkitWebViewBaseDragDataReceived): Create DragData for the given
DataObjectGtk in the stack.
(webkitWebViewBaseDragMotion): Ditto.
(webkitWebViewBaseDragDrop): Ditto.

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