Replace calls to QString::fromAscii which is deprecated in Qt5
https://bugs.webkit.org/show_bug.cgi?id=96242

Patch by Kevin Funk <kevin.funk@kdab.com> on 2012-09-10
Reviewed by Simon Hausmann.

Replace with QString::fromLatin1 which does the same.

Source/WebCore:

* bridge/qt/qt_runtime.cpp:

Source/WebKit2:

* UIProcess/API/qt/tests/qrawwebview/tst_qrawwebview.cpp:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@128031 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[EFL] fast/forms/menulist-restrict-line-height.html is failing
https://bugs.webkit.org/show_bug.cgi?id=94878

Patch by Christophe Dumez <christophe.dumez@intel.com> on 2012-09-10
Reviewed by Kenneth Rohde Christiansen.

Source/WebCore:

<select> element's text is no longer clipped when a CSS
line-height is specified. The fix is the same as for
Mac port in r24886.

Test: fast/forms/menulist-restrict-line-height.html

* platform/efl/RenderThemeEfl.cpp:
(WebCore::RenderThemeEfl::adjustMenuListStyle):

LayoutTests:

Generate baseline for fast/forms/menulist-restrict-line-height.html
and unskip the test now that <select> element's text is no longer
clipped when a CSS line-height is specified.

* platform/efl/TestExpectations:
* platform/efl/fast/forms/menulist-restrict-line-height-expected.png: Added.
* platform/efl/fast/forms/menulist-restrict-line-height-expected.txt: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@128032 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[WK2] Make WK2 C API headers compile in the Qt build on Windows
https://bugs.webkit.org/show_bug.cgi?id=96246

Patch by Simon Hausmann <simon.hausmann@nokia.com> on 2012-09-10
Reviewed by Kenneth Rohde Christiansen.

WKBase.h and WKAPICast.h include files that are specific to the Safari/Windows
port if WIN32 or _WIN32 is defined. When building WebKit2 on Windows with Qt, we
do not want to include these files, as they define an API that is different to ours
(the view aspect differs). Therefore guard the inclusion with !defined(BUILDING_QT__)

* Shared/API/c/WKBase.h:
* UIProcess/API/C/WKAPICast.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@128033 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Fix build of WTR with Qt on Windows
https://bugs.webkit.org/show_bug.cgi?id=96249

Patch by Simon Hausmann <simon.hausmann@nokia.com> on 2012-09-10
Reviewed by Kenneth Rohde Christiansen.

Windows loves to define min and max as macros, which beautifully
clashes in many places where min and max are used as variable or method
names. It can be convinced not to do this when min and max are already
define as macros (expanding to themselves). We have this kind of
workaround in config.h files all over WebKit and as it turns out when
building WTR with Qt on Windows we do end up with such a clash. Therefore
we need the same workaround.

* WebKitTestRunner/config.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@128034 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Qt][WK2] QWebKitTest should retrieve the viewport state from the PageViewportController
https://bugs.webkit.org/show_bug.cgi?id=96106

Reviewed by Simon Hausmann.

The functions in PageViewportControllerClientQt proxying the
viewport state values can be removed if QWebKitTest uses the
PageViewportController to retrieve these values.

* UIProcess/API/qt/qquickwebview_p_p.h:
(QQuickWebViewPrivate::viewportController):
* UIProcess/API/qt/qwebkittest.cpp:
(QWebKitTest::viewport):
(QWebKitTest::devicePixelRatio):
(QWebKitTest::contentsScale):
* UIProcess/PageViewportController.h:
(WebKit::PageViewportController::currentContentsScale):
* UIProcess/qt/PageViewportControllerClientQt.cpp:
* UIProcess/qt/PageViewportControllerClientQt.h:
(PageViewportControllerClientQt):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@128035 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Qt] Fix linking of QtWebKit.dll on Windows
https://bugs.webkit.org/show_bug.cgi?id=96250

Patch by Simon Hausmann <simon.hausmann@nokia.com> on 2012-09-10
Reviewed by Kenneth Rohde Christiansen.

On Windows when using ANGLE, the DLL import library of EGL is called libEGL.lib instead of EGL.lib.
However as it turns out we do not need to explicitly link against EGL, because when Qt is configured with ANGLE
support it will do that automatically for us.

* WebCore.pri:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@128036 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed. Fix make distcheck.

Source/JavaScriptCore:

* GNUmakefile.list.am: Add missing files.

Source/WebCore:

* GNUmakefile.list.am: Add missing header files.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@128037 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Qt] WK2 build fixes for MSVC
https://bugs.webkit.org/show_bug.cgi?id=96248

Patch by Simon Hausmann <simon.hausmann@nokia.com> on 2012-09-10
Reviewed by Tor Arne Vestbø.

MSVC is picky when it comes to the use of forward declaration and the use of
such forward declared types in templates. In these instances inline functions were
passed parameters in RefPtrs that were only forward declared, but at compile time
MSVC wants to know what type it is in order to completely instantiate RefPtr (which
needs to call the type destructor for example). Therefore this patch resolves a couple
of forward declarations with direct header file inclusions.

* UIProcess/API/qt/raw/qrawwebview_p_p.h:
* UIProcess/InspectorServer/WebSocketServerClient.h:
* UIProcess/qt/QtPageClient.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@128038 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[EFL] 2 fast/forms tests need rebaseline after r128032
https://bugs.webkit.org/show_bug.cgi?id=96253

Unreviewed EFL gardening.

Rebaseline 2 fast/forms tests due to r128032.

Patch by Christophe Dumez <christophe.dumez@intel.com> on 2012-09-10

* platform/efl/fast/forms/control-restrict-line-height-expected.png:
* platform/efl/fast/forms/control-restrict-line-height-expected.txt:
* platform/efl/fast/forms/menulist-restrict-line-height-expected.txt:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@128039 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Qt][WK2] REGRESSION(r127861): It made one test fail and one test crash
https://bugs.webkit.org/show_bug.cgi?id=96243

Reviewed by Kenneth Rohde Christiansen.

Skip the code if QClipboard is not available, and give WebCore a chance to handle the event first.

* WebProcess/WebPage/WebPage.cpp:
(WebKit::handleMouseEvent):
* WebProcess/WebPage/qt/WebPageQt.cpp:
(WebKit::WebPage::handleMouseReleaseEvent):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@128040 268f45cc-cd09-0410-ab3c-d52691b4dbfc
http/tests/security/contentSecurityPolicy/blob-urls-match-self.html fails on Windows port
https://bugs.webkit.org/show_bug.cgi?id=96133

Patch by Mike West <mkwst@chromium.org> on 2012-09-10
Reviewed by Jochen Eisinger.

Blob is indeed disabled on Windows. Moving this skipped test up with
the other ENABLE(BLOB) tests so that it can be reenabled when BLOB
rolls in.

* platform/win/Skipped:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@128041 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore: Warn authors about CSP directives ignored due to non-ASCII values.
https://bugs.webkit.org/show_bug.cgi?id=96061

Patch by Mike West <mkwst@chromium.org> on 2012-09-10
Reviewed by Adam Barth.

CSP defines directive values as VCHAR minus ';' and ','. Currently, we
ignore these directives completely in CSPDirectiveList::parseDirective,
but we don't warn authors. We ought to set their expectations correctly,
and help them fix issues in their policy.

This patch adds a console warning for directives that are ignored, and
points authors to the wonderful world of percent-encoding for situations
where high-ASCII or Unicode (or whatever) characters are required.

Test: http/tests/security/contentSecurityPolicy/source-list-parsing-nonascii.html

* page/ContentSecurityPolicy.cpp:
(WebCore::CSPDirectiveList::parseDirective):
    Call ContentSecurityPolicy::reportInvalidDirectiveValueCharacter in
    order to report ignored directives.
(WebCore::ContentSecurityPolicy::reportInvalidDirectiveValueCharacter):
(WebCore):
* page/ContentSecurityPolicy.h:
    Add new error message.

LayoutTests: CSP parsing doesn't seem treat as invalid policies with a non-ASCII path
https://bugs.webkit.org/show_bug.cgi?id=96061

Patch by Mike West <mkwst@chromium.org> on 2012-09-10
Reviewed by Adam Barth.

* http/tests/security/contentSecurityPolicy/resources/multiple-iframe-test.js:
(testPreescapedPolicy):
(test):
(testImpl):
    To test non-ASCII characters, we need to ensure that we don't encode
    them when testing.
* http/tests/security/contentSecurityPolicy/source-list-parsing-04-expected.txt:
    Adding a warning for the policy here that contains an invalid
    character.
* http/tests/security/contentSecurityPolicy/source-list-parsing-nonascii-expected.txt: Added.
* http/tests/security/contentSecurityPolicy/source-list-parsing-nonascii.html: Added.
    Test paths with invalid characters.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@128042 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: [Elements] Poor performance upon continuous attribute changes
https://bugs.webkit.org/show_bug.cgi?id=96252

Reviewed by Vsevolod Vlasov.

The DOM tree is now updated after a non-zero timeout, and same node updates are coalesced rather than added into an array
as many times as the DOM node has been tampered with during the update interval.

* inspector/front-end/ElementsTreeOutline.js:
* inspector/front-end/utilities.js: Implement Map.prototype.size

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

Adding flaky crash expectation for editing/deleting/25322-2.html.

* platform/gtk/TestExpectations:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@128044 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Qt] Fix generation of forward headers for generated files in WebCore on Windows
https://bugs.webkit.org/show_bug.cgi?id=96245

Patch by Simon Hausmann <simon.hausmann@nokia.com> on 2012-09-10
Reviewed by Tor Arne Vestbø.

We generate the forwarding header files of generated WebCore sources by using
mkdir to ensure the target directory exists, followed by
echo #include "..." > file.h. On Windows mkdir returns with an error if the
target directory exists. For us that is not an error, so work around it with
(mkdir path 2>nul || echo>nul)

* DerivedSources.pri:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@128045 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed gardening, unskip tests passing after r128040 landed.

* platform/qt-5.0-wk2/Skipped:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@128046 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[TexMap] Fix compilation on Windows
https://bugs.webkit.org/show_bug.cgi?id=96257

Patch by Simon Hausmann <simon.hausmann@nokia.com> on 2012-09-10
Reviewed by Noam Rosenthal.

TextureMapperGL uses near and far as variable names and unfortunately
WinDefs.h on Windows has the nasty habit of unconditionally(!) defining
near and far as empty macros. There's no way to prevent WinDefs.h from
doing so. Instead we rename the variables. (Another option would've been to
#undef)

* platform/graphics/texmap/TextureMapperGL.cpp:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@128047 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[WK2][WTR] User style sheet location should be reset before each test
https://bugs.webkit.org/show_bug.cgi?id=96262

Patch by Mikhail Pozdnyakov <mikhail.pozdnyakov@intel.com> on 2012-09-10
Reviewed by Kenneth Rohde Christiansen.

User style sheet location is reset before each test now.

* WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:
(WTR::InjectedBundle::beginTesting):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@128048 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[EFL] Create a toggle button for closed captions
https://bugs.webkit.org/show_bug.cgi?id=96259

Patch by Christophe Dumez <christophe.dumez@intel.com> on 2012-09-10
Reviewed by Kenneth Rohde Christiansen.

Source/WebCore:

Add toggle button for closed captions to EFL's
RenderTheme.

Test: media/video-controls-captions.html

* platform/efl/RenderThemeEfl.cpp:
(WebCore::RenderThemeEfl::edjeGroupFromFormType):
(WebCore::RenderThemeEfl::emitMediaButtonSignal):
(WebCore):
(WebCore::RenderThemeEfl::supportsClosedCaptioning):
(WebCore::RenderThemeEfl::paintMediaToggleClosedCaptionsButton):
* platform/efl/RenderThemeEfl.h:
(RenderThemeEfl):

Source/WebKit/efl:

Add closed caption toggling button to default WebKitEFL
theme.

* DefaultTheme/default.edc:
* DefaultTheme/widget/mediacontrol/togglecaptionsbutton/closedcaption.png: Added.
* DefaultTheme/widget/mediacontrol/togglecaptionsbutton/closedcaption_disabled.png: Added.
* DefaultTheme/widget/mediacontrol/togglecaptionsbutton/toggle_captions_button.edc: Added.

LayoutTests:

Unskip media/video-controls-captions.html test case
now that EFL has a toggle button for closed captions.

Rebaseline a few media track test cases that now
display the new closed caption toggling button.

* platform/efl/TestExpectations:
* platform/efl/media/track/track-cue-rendering-horizontal-expected.png:
* platform/efl/media/track/track-cue-rendering-horizontal-expected.txt:
* platform/efl/media/track/track-cue-rendering-vertical-expected.png:
* platform/efl/media/track/track-cue-rendering-vertical-expected.txt:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@128049 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[GTK] Sanitize the suggested filename when building the download destination URI
https://bugs.webkit.org/show_bug.cgi?id=96260

Reviewed by Gustavo Noronha Silva.

The suggested filename returned by the server can contain
directory separators so that the filename would be interpreted as
a full path.

* UIProcess/API/gtk/WebKitDownload.cpp:
(webkitDownloadDecideDestination): Convert any directory separator
contained in the suggested filename to an underscore.

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