[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