Web Inspector: Migrate inspector IndexedDB support to frontend API.
https://bugs.webkit.org/show_bug.cgi?id=101457

Reviewed by Pavel Feldman.

Source/WebCore:

Migrated IndexedDB support to web facing IndexedDB API.

* inspector/Inspector.json:
* inspector/InspectorIndexedDBAgent.cpp:
(WebCore):
(WebCore::assertIDBFactory):
(WebCore::InspectorIndexedDBAgent::requestDatabaseNamesForFrame):
(WebCore::InspectorIndexedDBAgent::requestDatabase):
(WebCore::InspectorIndexedDBAgent::requestData):
* inspector/front-end/IndexedDBModel.js:
(WebInspector.IndexedDBModel.prototype.innerCallback):
(WebInspector.IndexedDBModel.prototype._requestData):
* inspector/front-end/IndexedDBViews.js:
(WebInspector.IDBDataView.prototype._updateData.callback):
(WebInspector.IDBDataView.prototype._updateData):
(WebInspector.IDBDataGridNode):
(WebInspector.IDBDataGridNode.prototype.createCell):

LayoutTests:

* http/tests/inspector/indexeddb/database-data.html:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@133855 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Chromium] Web Inspector: some tests failing with "Cannot call method 'hasTextContent' of undefined"
https://bugs.webkit.org/show_bug.cgi?id=94501

Unreviewed unskipped test.

* platform/chromium/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@133856 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: console error after inspecting IndexedDB
https://bugs.webkit.org/show_bug.cgi?id=101481

Reviewed by Pavel Feldman.

Added objectId nullity check to RemoteOBject::release.
Drive-by added release for entry key and primaryKey.

* inspector/front-end/IndexedDBViews.js:
(WebInspector.IDBDataView.prototype.clear):
* inspector/front-end/RemoteObject.js:
(WebInspector.RemoteObject.prototype.release):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@133857 268f45cc-cd09-0410-ab3c-d52691b4dbfc
IndexedDB: Rename methods and remove dead code from IDBBackingStore
https://bugs.webkit.org/show_bug.cgi?id=101488

Reviewed by Ojan Vafai.

Source/WebCore:

In preparation for merging IDBBackingStore and IDBLevelDBBackingStore:

1) rename ObjectStoreRecordIdentifier to RecordIdentifier
2) remove IDBBackingStore::forEachRecord and friends
3) remove IDBBackingStore::Cursor::close, since it was an empty method.

No new tests as this is purely code cleanup.

* Modules/indexeddb/IDBBackingStore.cpp:
(WebCore::IDBLevelDBBackingStore::getRecord):
(WebCore):
(WebCore::IDBLevelDBBackingStore::putRecord):
(WebCore::IDBLevelDBBackingStore::createInvalidRecordIdentifier):
(WebCore::IDBLevelDBBackingStore::deleteRecord):
(WebCore::IDBLevelDBBackingStore::keyExistsInObjectStore):
(WebCore::IDBLevelDBBackingStore::putIndexDataForRecord):
(WebCore::IDBLevelDBBackingStore::deleteIndexDataForRecord):
* Modules/indexeddb/IDBBackingStore.h:
(WebCore::IDBBackingStore::RecordIdentifier::~RecordIdentifier):
(IDBBackingStore):
* Modules/indexeddb/IDBCursorBackendImpl.cpp:
(WebCore::IDBCursorBackendImpl::close):
* Modules/indexeddb/IDBIndexBackendImpl.cpp:
(WebCore::IDBIndexBackendImpl::countInternal):
(WebCore::IDBIndexBackendImpl::getInternal):
(WebCore::IDBIndexBackendImpl::getKeyInternal):
* Modules/indexeddb/IDBLevelDBBackingStore.h:
(IDBLevelDBBackingStore):
* Modules/indexeddb/IDBObjectStoreBackendImpl.cpp:
(WebCore::IDBObjectStoreBackendImpl::getInternal):
(WebCore):
(WebCore::IDBObjectStoreBackendImpl::setIndexKeys):
(WebCore::IDBObjectStoreBackendImpl::putInternal):
(WebCore::IDBObjectStoreBackendImpl::deleteInternal):
(WebCore::IDBObjectStoreBackendImpl::countInternal):

Source/WebKit/chromium:

Update IDBFakeBackingStore to reflect method changes in IDBBackingStore.

* tests/IDBFakeBackingStore.h:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@133858 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[EFL] Turn on WTF_USE_TILED_BACKING_STORE by default
https://bugs.webkit.org/show_bug.cgi?id=101526

Patch by Yael Aharon <yael.aharon@intel.com> on 2012-11-08
Reviewed by Kenneth Rohde Christiansen.

.:

Separate out ENABLE_WEBGL. It is not ready to be enabled by default.

* Source/cmake/OptionsEfl.cmake:

Tools:

Turn on WTF_USE_TILED_BACKING_STORE for EFL port.

* Scripts/webkitperl/FeatureList.pm:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@133859 268f45cc-cd09-0410-ab3c-d52691b4dbfc
User can change a disabled select (drop down box)
https://bugs.webkit.org/show_bug.cgi?id=100932

Patch by Kunihiko Sakamoto <ksakamoto@chromium.org> on 2012-11-08
Reviewed by Kent Tamura.

Source/WebCore:

<select> should not handle events if it's disabled.

Test: fast/forms/select/select-disabled.html

* html/HTMLSelectElement.cpp:
(WebCore::HTMLSelectElement::defaultEventHandler):

LayoutTests:

Verify that keyboard events do not change value of disabled select.

* fast/forms/select/select-disabled-expected.txt: Added.
* fast/forms/select/select-disabled.html: Added.

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

Rebaselining after r131974, r133037 and r133834.

* platform/gtk/TestExpectations:
* platform/gtk/fast/repaint/moving-shadow-on-container-expected.png:
* platform/gtk/fast/table/025-expected.png:
* platform/gtk/fast/table/025-expected.txt:
* platform/gtk/svg/css/arrow-with-shadow-expected.png:
* platform/gtk/svg/css/arrow-with-shadow-expected.txt:
* platform/gtk/svg/css/clippath-with-shadow-expected.txt:
* platform/gtk/svg/css/composite-shadow-example-expected.png:
* platform/gtk/svg/css/composite-shadow-example-expected.txt:
* platform/gtk/svg/css/composite-shadow-text-expected.png:
* platform/gtk/svg/css/composite-shadow-with-opacity-expected.png: Added.
* platform/gtk/svg/css/composite-shadow-with-opacity-expected.txt:
* platform/gtk/svg/css/shadow-changes-expected.png:
* platform/gtk/svg/css/shadow-changes-expected.txt:
* platform/gtk/svg/custom/pattern-scaling-expected.png: Added.
* platform/gtk/svg/custom/pattern-scaling-expected.txt: Added.
* platform/gtk/svg/custom/pattern-skew-transformed-expected.png:
* platform/gtk/svg/custom/pattern-skew-transformed-expected.txt: Added.
* platform/gtk/svg/custom/pattern-with-transformation-expected.png:
* platform/gtk/svg/custom/simple-text-double-shadow-expected.txt:
* platform/gtk/svg/repaint/repaint-webkit-svg-shadow-expected.png: Added.
* platform/gtk/svg/transforms/text-with-pattern-inside-transformed-html-expected.png:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@133861 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: move front-end methods called from native part to InspectorFrontendAPI
https://bugs.webkit.org/show_bug.cgi?id=101463

Reviewed by Vsevolod Vlasov.

Source/WebCore:

Moved Web Inspector methods called from native code to InspectorFrontendAPI.

* inspector/InspectorClient.cpp:
(WebCore::InspectorClient::doDispatchMessageOnFrontendPage):
* inspector/InspectorFrontendHost.cpp:
(WebCore::FrontendMenuProvider::create):
(WebCore::FrontendMenuProvider::disconnect):
(WebCore::FrontendMenuProvider::FrontendMenuProvider):
(WebCore::FrontendMenuProvider::contextMenuItemSelected):
(WebCore::FrontendMenuProvider::contextMenuCleared):
(FrontendMenuProvider):
(WebCore::InspectorFrontendHost::showContextMenu):
* inspector/front-end/InspectorFrontendAPI.js:
(InspectorFrontendAPI.loadCompleted):
(InspectorFrontendAPI.contextMenuItemSelected):
(InspectorFrontendAPI.contextMenuCleared):
(InspectorFrontendAPI.dispatchMessageAsync):
(InspectorFrontendAPI.dispatchMessage):
* inspector/front-end/inspector.js:

Source/WebKit/chromium:

Moved Web Inspector methods called from native code to InspectorFrontendAPI. Updated
WebDevToolsFrontendImpl appropriately.

* src/WebDevToolsFrontendImpl.cpp:
(WebKit::WebDevToolsFrontendImpl::dispatchOnInspectorFrontend):

LayoutTests:

Moved Web Inspector methods called from native code to InspectorFrontendAPI.

* http/tests/inspector-protocol/resources/InspectorTest.js:
(InspectorFrontendAPI.dispatchMessageAsync):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@133862 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: Timeline: Improve time/timeEnd appearance.
https://bugs.webkit.org/show_bug.cgi?id=100936

Patch by Eugene Klyuchnikov <eustas.bug@gmail.com> on 2012-11-08
Reviewed by Yury Semikhatsky.

Source/WebCore:

Changes:
- time/timeEnd records should be top level records only in "glue" mode
- time/timeEnd records should display "message" in record list / popover
- glued records add aggregated statistics to root record
- glued records do not reduce their origin self time

Test: inspector/timeline/timeline-time.html

* English.lproj/localizedStrings.js: Added "Message" string.
* inspector/front-end/TimelinePresentationModel.js:
(WebInspector.TimelinePresentationModel.Record): Added "origin" field.

LayoutTests:

Tested gluing of time/timeEnd records.

* inspector/timeline/timeline-time-expected.txt: Added.
* inspector/timeline/timeline-time.html: Added.

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

Moving some expectations to proper sections, unskiping a couple of tests
and merging expectations for tests in printing/.

* platform/gtk/TestExpectations:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@133864 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[EFL] Turn WTF_USE_TILED_BACKING_STORE in OptionsEfl.cmake.
https://bugs.webkit.org/show_bug.cgi?id=101559

Reviewed by Kenneth Rohde Christiansen.

Follow-up to 133859; also change the default value in
OptionsEfl.cmake so that the default changes for people not using
build-webkit (ie. users) as well.

* Source/cmake/OptionsEfl.cmake:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@133865 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Attempt to silence a compiler warning.

* WebProcess/WebPage/mac/RemoteGraphicsLayer.mm:
(WebKit::RemoteGraphicsLayer::RemoteGraphicsLayer):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@133866 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[GTK] WebKitWebView doesn't notify of favicon changes for known favicons but new pages
https://bugs.webkit.org/show_bug.cgi?id=98874

Reviewed by Martin Robinson.

If the page is unknown (not registered in the icon database) but
the icon is known (registered by another page) favicon-ready
signal is not emitted because the icon has already been imported
from the database. The view always asks for the favicon when the
load has been committed, but it's usually too early and the
favicon of the page is still unkown. We can use
didChangeIconForPageURLCallback to know when to ask for the
favicon emitting a favicon-changed signal. The callback
iconDataReadyForPageURLCallback is still useful to process pending
icon requests, but the favicon-ready signal can be removed in
favor of favicon-changed.

* UIProcess/API/gtk/WebKitFaviconDatabase.cpp:
(_WebKitFaviconDatabasePrivate): Keep a map of page icons that has
been imported to make sure we only emit favicon-changed signal
when the favicon URI has actually changed, because
didChangeIconForPageURLCallback can be called multiple times for
the same favicon URI in some cases.
(webkit_favicon_database_class_init): Remove favicon-ready signal
and add favicon-changed that includes the new favicon URI for the
given page URI.
(didChangeIconForPageURLCallback): Emit favicon-changed signal if
the favicon URI is new or has changed for the given page URI.
(iconDataReadyForPageURLCallback): Process pending icon requests.
(webkitFaviconDatabaseCreate): Add implementation for
didChangeIconForPageURLCallback.
* UIProcess/API/gtk/WebKitFaviconDatabasePrivate.h:
* UIProcess/API/gtk/WebKitWebView.cpp:
(_WebKitWebViewPrivate): Add favicon URI to make sure we only ask for a
new favicon when the favicon URI has changed.
(webkitWebViewUpdateFavicon): Update the favicon and emit
notify::favicon if it has changed.
(gotFaviconCallback): Update the favicon if the request hasn't
been cancelled.
(webkitWebViewRequestFavicon): Ask for the page favicon.
(webkitWebViewUpdateFaviconURI): Updated the favicon URI and
request the page favicon if the favicon URI has changed.
(faviconChangedCallback): Call webkitWebViewUpdateFaviconURI() with
the given favicon URI.
(webkitWebViewWatchForChangesInFavicon): Connect to
WebKitFaviconDatabase::favicon-changed.
(webkitWebViewDisconnectFaviconDatabaseSignalHandlers): Disconnect
WebKitFaviconDatabase::favicon-changed signal.
(webkitWebViewLoadChanged): Call webkitWebViewUpdateFaviconURI()
with the current favicon URI when the load has been committed.
* UIProcess/API/gtk/tests/TestWebKitFaviconDatabase.cpp:
(serverCallback):
(testNotInitialized):
(testGetFavicon):
(testGetFaviconURI):
(testWebViewFavicon):
(beforeAll):
* UIProcess/API/gtk/webkit2marshal.list: Add new marshaler.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@133867 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Warn when parsing an invalid X-Frame-Options header.
https://bugs.webkit.org/show_bug.cgi?id=101447

Reviewed by Adam Barth.

Source/WebCore:

An 'X-Frame-Options' header that contains an invalid option (that is,
neither 'DENY' nor 'SAMEORIGIN') is ignored. This patch adds a console
warning to notify developers that they've made a mistake.

Test: http/tests/security/XFrameOptions/x-frame-options-invalid.html

* dom/Document.cpp:
(WebCore::Document::processHttpEquiv):
    Move the request identifier generation out of the failure block in
    order to pass it into 'shouldInterruptLoadForXFrameOptions'. This
    ensures that the console message is properly tied to a request.
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::shouldInterruptLoadForXFrameOptions):
* loader/FrameLoader.h:
(FrameLoader):
    'shouldInterruptLoadForXFrameOptions' now accepts a request
    identifier as a parameter, and generates a console message if the
    load is blocked.
* loader/MainResourceLoader.cpp:
(WebCore::MainResourceLoader::didReceiveResponse):
    Pass the request identifier into 'shouldInterruptLoadForXFrameOptions'.

LayoutTests:

* http/tests/security/XFrameOptions/resources/x-frame-options-invalid.cgi: Added.
* http/tests/security/XFrameOptions/x-frame-options-invalid-expected.txt: Added.
* http/tests/security/XFrameOptions/x-frame-options-invalid.html: Added.
    New test with an invalid frame option value.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@133868 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Qt] DumpRenderTree does not honor the shouldDumpPixels boolean argument of dumpAsText
https://bugs.webkit.org/show_bug.cgi?id=101485

Reviewed by Csaba Osztrogonác.

[Qt] DumpRenderTree does not honor the shouldDumpPixels boolean argument of dumpAsText

Support dumpAsText(true) which means we should not dump a render tree
but should dump pixels. All other platforms already support it.

* DumpRenderTree/qt/DumpRenderTreeQt.cpp:
(WebCore::DumpRenderTree::dump):
* DumpRenderTree/qt/TestRunnerQt.cpp:
(TestRunner::reset):
(TestRunner::dumpAsText):
* DumpRenderTree/qt/TestRunnerQt.h:
(TestRunner::shouldDumpPixels):
(TestRunner):

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

Adding a failure expectation for editing/execCommand/switch-list-type-with-orphaned-li.html,
the test regressed in r133820
Further rebaselining after r133834.

* platform/gtk/TestExpectations:
* platform/gtk/fast/canvas/fillText-shadow-expected.txt:
* platform/gtk/svg/css/group-with-shadow-expected.png:
* platform/gtk/svg/css/group-with-shadow-expected.txt:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@133870 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[EFL][MiniBrowser] Add encoding detector option.
https://bugs.webkit.org/show_bug.cgi?id=100931

Patch by Kangil Han <kangil.han@samsung.com> on 2012-11-08
Reviewed by Gyuyoung Kim.

Source/WebKit2:

Add triggering Settings::setUsesEncodingDetector for WK2 UI process.

* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::updatePreferences):

Tools:

Add a runtime option to enable/disable encoding detector.

* MiniBrowser/efl/main.c:
(window_create):
(elm_main):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@133871 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Qt] Unreviewed Gardening.

Skip a failing after r133820. Added new baseline after 133834. Update expectation after 133638.

* platform/qt/TestExpectations:
* platform/qt/css3/filters/effect-reference-expected.png:
* platform/qt/css3/filters/effect-reference-expected.txt:
* platform/qt/svg/css/group-with-shadow-expected.txt:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@133872 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Qt] Reduce the number of clean builds
https://bugs.webkit.org/show_bug.cgi?id=100844

Reviewed by Tor Arne Vestbø.

A change in any Qt project file shouldn't trigger clean
build always, but only if the incremental build failed.

* Scripts/webkitdirs.pm:
(buildQMakeProjects):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@133873 268f45cc-cd09-0410-ab3c-d52691b4dbfc
GraphicsSurfaceGLX needs to query the drawable for YInversion.
https://bugs.webkit.org/show_bug.cgi?id=101472

After r133049 the WebGL content is now displayed upside down
for the Qt port. We cannot just apply a generic rule, that
the content needs to be flipped upside down.
Instead we have to query GLX to tell us, if the drawable's
framebuffer is y-inverted.

Reviewed by Kenneth Rohde Christiansen.

* platform/graphics/surfaces/qt/GraphicsSurfaceGLX.cpp:
(WebCore::GraphicsSurfacePrivate::textureIsYInverted):
(GraphicsSurfacePrivate):
(WebCore::GraphicsSurface::platformPaintToTextureMapper):

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