[GTK] Don't use the C API internally in WebKitFormSubmissionRequest
https://bugs.webkit.org/show_bug.cgi?id=96777

Reviewed by Xan Lopez.

Using the C++ classes directly instead of the C API wrappers we
avoid a lot of toImpl/toAPI casts, string conversions and
allocations. The code is also a lot simpler and easier to read.

* UIProcess/API/gtk/WebKitFormClient.cpp:
(willSubmitForm):
* UIProcess/API/gtk/WebKitFormSubmissionRequest.cpp:
(_WebKitFormSubmissionRequestPrivate):
(webkitFormSubmissionRequestCreate):
(webkit_form_submission_request_get_text_fields):
(webkit_form_submission_request_submit):
* UIProcess/API/gtk/WebKitFormSubmissionRequestPrivate.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@131756 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[GTK] Don't use the C API internally in WebKitFileChooserRequest
https://bugs.webkit.org/show_bug.cgi?id=96774

Reviewed by Xan Lopez.

Using the C++ classes directly instead of the C API wrappers we
avoid a lot of toImpl/toAPI casts, string conversions and
allocations. The code is also a lot simpler and easier to read.

* UIProcess/API/gtk/WebKitFileChooserRequest.cpp:
(_WebKitFileChooserRequestPrivate):
(webkitFileChooserRequestCreate):
(webkit_file_chooser_request_get_mime_types):
(webkit_file_chooser_request_get_mime_types_filter):
(webkit_file_chooser_request_get_select_multiple):
(webkit_file_chooser_request_select_files):
(webkit_file_chooser_request_get_selected_files):
(webkit_file_chooser_request_cancel):
* UIProcess/API/gtk/WebKitFileChooserRequestPrivate.h:
* UIProcess/API/gtk/WebKitUIClient.cpp:
(runOpenPanel):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@131757 268f45cc-cd09-0410-ab3c-d52691b4dbfc
REGRESSION(r131464): Null-pointer crash in StyleResolver::styleForElement
https://bugs.webkit.org/show_bug.cgi?id=99587

Patch by Takashi Sakamoto <tasak@google.com> on 2012-10-18
Reviewed by Dimitri Glazkov.

Source/WebCore:

Since contents in datalist are not shown, summary in datalist is not
shown either. So the summary has no render style. On the other hand,
the summary is implemented by shadow DOM and it has some insertion
point. Its child, e.g. title in the below test, is distributed.
To solve the child's user-modify, looking at shadow host(=summary)'s
style causes null-pointer crash.

Test: fast/dom/shadow/user-modify-in-datalist-crash.html

* css/StyleResolver.cpp:
(WebCore::StyleResolver::styleForElement):
Added a code to check whether the shadow host has any style or not.

LayoutTests:

* fast/dom/shadow/user-modify-in-datalist-crash-expected.txt: Added.
* fast/dom/shadow/user-modify-in-datalist-crash.html: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@131758 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[BlackBerry] Possible redundant zoomToInitialScaleOnLoad() in WebPagePrivate::setLoadState
https://bugs.webkit.org/show_bug.cgi?id=99624

Reviewed by Rob Buis.
Patch by Jacky Jiang <zhajiang@rim.com>
Internally reviewed by Arvid Nilsson

PR: 225981
Several reasons to eliminate the ancient unnecessary
zoomToInitialScaleOnLoad() in WebPagePrivate::setLoadState committed:
- At this point, we have only committed the data we received.
- For the new load, we haven't started parsing the tokens and building
  the DOM tree and the first layout will happen after that.
- For the load restored from cache, the first layout will happen after
  setLoadState committed which is called by
  FrameLoader::dispatchDidCommitLoad().
- zoomToInitialScaleOnLoad() can still be called after the first
  layout finished.
- zoomToInitialScaleOnLoad() is expensive and it will boost the load
  performance after the removal.
- Removal of this can fix some weird rendering defects on yahoo.com,
  maps.google.com, news.qq.com and so on during load and rotation
  mentioned on the PR.

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

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@131759 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[GTK] Don't use using namespace WebKit in private headers in WebKit2
https://bugs.webkit.org/show_bug.cgi?id=99724

Reviewed by Xan Lopez.

Move using namespace WebKit from private headers to the cpp file.

* UIProcess/API/gtk/WebKitBackForwardList.cpp:
* UIProcess/API/gtk/WebKitBackForwardListPrivate.h:
* UIProcess/API/gtk/WebKitContextMenu.cpp:
* UIProcess/API/gtk/WebKitContextMenuItem.cpp:
* UIProcess/API/gtk/WebKitContextMenuItemPrivate.h:
* UIProcess/API/gtk/WebKitContextMenuPrivate.h:
* UIProcess/API/gtk/WebKitCookieManager.cpp:
* UIProcess/API/gtk/WebKitCookieManagerPrivate.h:
* UIProcess/API/gtk/WebKitDownload.cpp:
* UIProcess/API/gtk/WebKitDownloadPrivate.h:
* UIProcess/API/gtk/WebKitFaviconDatabasePrivate.h:
* UIProcess/API/gtk/WebKitFileChooserRequest.cpp:
* UIProcess/API/gtk/WebKitFileChooserRequestPrivate.h:
* UIProcess/API/gtk/WebKitFindController.cpp:
* UIProcess/API/gtk/WebKitFormSubmissionRequest.cpp:
* UIProcess/API/gtk/WebKitFormSubmissionRequestPrivate.h:
* UIProcess/API/gtk/WebKitGeolocationPermissionRequest.cpp:
* UIProcess/API/gtk/WebKitGeolocationPermissionRequestPrivate.h:
* UIProcess/API/gtk/WebKitGeolocationProvider.cpp:
* UIProcess/API/gtk/WebKitGeolocationProvider.h:
* UIProcess/API/gtk/WebKitHitTestResult.cpp:
* UIProcess/API/gtk/WebKitHitTestResultPrivate.h:
* UIProcess/API/gtk/WebKitJavascriptResult.cpp:
* UIProcess/API/gtk/WebKitJavascriptResultPrivate.h:
* UIProcess/API/gtk/WebKitNavigationPolicyDecision.cpp:
* UIProcess/API/gtk/WebKitNavigationPolicyDecisionPrivate.h:
* UIProcess/API/gtk/WebKitPolicyDecision.cpp:
* UIProcess/API/gtk/WebKitPolicyDecisionPrivate.h:
* UIProcess/API/gtk/WebKitResponsePolicyDecision.cpp:
* UIProcess/API/gtk/WebKitResponsePolicyDecisionPrivate.h:
* UIProcess/API/gtk/WebKitSettings.cpp:
* UIProcess/API/gtk/WebKitSettingsPrivate.h:
* UIProcess/API/gtk/WebKitURIResponse.cpp:
* UIProcess/API/gtk/WebKitURIResponsePrivate.h:
* UIProcess/API/gtk/WebKitURISchemeRequest.cpp:
* UIProcess/API/gtk/WebKitURISchemeRequestPrivate.h:
* UIProcess/API/gtk/WebKitWebContext.cpp:
* UIProcess/API/gtk/WebKitWebContextPrivate.h:
* UIProcess/API/gtk/WebKitWebInspector.cpp:
* UIProcess/API/gtk/WebKitWebInspectorPrivate.h:
* UIProcess/API/gtk/WebKitWebResource.cpp:
* UIProcess/API/gtk/WebKitWebResourcePrivate.h:
* UIProcess/API/gtk/WebKitWebView.cpp:
* UIProcess/API/gtk/WebKitWebViewBasePrivate.h:
* UIProcess/API/gtk/WebKitWebViewPrivate.h:
* UIProcess/API/gtk/WebKitWindowProperties.cpp:
* UIProcess/API/gtk/WebKitWindowPropertiesPrivate.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@131760 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[BlackBerry] Dump DRT output to stdout if test is passed as command line argument
https://bugs.webkit.org/show_bug.cgi?id=99150

Patch by Xiaobo Wang <xbwang@torchmobile.com.cn> on 2012-10-18
Reviewed by Rob Buis.

Fixed some code style errors as well.

* DumpRenderTree/blackberry/DumpRenderTree.cpp:
(BlackBerry::WebKit::DumpRenderTree::runTest):
(BlackBerry::WebKit::DumpRenderTree::runRemainingTests):
(BlackBerry::WebKit::DumpRenderTree::runTests):
(BlackBerry::WebKit::DumpRenderTree::isHTTPTest):
(BlackBerry::WebKit::DumpRenderTree::dump):
(BlackBerry::WebKit::DumpRenderTree::addMessageToConsole):
* DumpRenderTree/blackberry/DumpRenderTreeBlackBerry.h:
(DumpRenderTree):

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