Frame::willDetachPage() shouldn't be called more than once.
https://bugs.webkit.org/show_bug.cgi?id=88056

Reviewed by Ryosuke Niwa.

This change moved willDetachPage() to private and calls it from
detachFromParent().  Also, it checks m_page and call
willDetachPage() only once, if m_page is available.

No new tests. Covered by existing suites.

* loader/FrameLoader.cpp:
(WebCore::FrameLoader::closeAndRemoveChild):
(WebCore::FrameLoader::detachFromParent):
* page/Frame.cpp:
(WebCore::Frame::detachFromPage):
(WebCore):
(WebCore::Frame::willDetachPage):
* page/Frame.h:
(Frame):
* page/Page.cpp:
(WebCore::Page::~Page):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@119219 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Qt] Move suspension to QtViewportInteractionEngine
https://bugs.webkit.org/show_bug.cgi?id=88078

Reviewed by Simon Hausmann.

Next step is to take care of visibility changes.

* UIProcess/API/qt/qquickwebview.cpp:
(QQuickWebViewFlickablePrivate::QQuickWebViewFlickablePrivate):
(QQuickWebViewFlickablePrivate::onComponentComplete):
* UIProcess/API/qt/qquickwebview_p.h:
* UIProcess/API/qt/qquickwebview_p_p.h:
(QQuickWebViewPrivate):
(QQuickWebViewFlickablePrivate):
* UIProcess/qt/QtViewportInteractionEngine.cpp:
(WebKit::ViewportUpdateDeferrer::ViewportUpdateDeferrer):
(WebKit::ViewportUpdateDeferrer::~ViewportUpdateDeferrer):
(WebKit::QtViewportInteractionEngine::suspendPageContent):
(WebKit):
(WebKit::QtViewportInteractionEngine::resumePageContent):
* UIProcess/qt/QtViewportInteractionEngine.h:
(QtViewportInteractionEngine):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@119220 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Qt] Unreviewed gardening, skip new failing and crashing tests.

* platform/qt-5.0-wk2/Skipped:
* platform/qt/Skipped:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@119221 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Qt] Save one copy when going from 8-bit WTF::String to QString

Asking for characters() of an 8-bit string will make a 16-bit copy internally
in WTF::String. Since we're going to copy the data to QStringData anyways, which
is 16-bit, we can do the conversion ourselves and save one copy.

Reviewed by Simon Hausmann.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@119222 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[EFL] New signals in ewk_view to enable global history delegate functionality
https://bugs.webkit.org/show_bug.cgi?id=86343

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

Global history delegate is an interface for WebKit clients to manage their own global history store.
The new ewk_view signals do the following:
1) report that a navigation happened within the view and give the navigation details.
2) report that view performed a client redirect and give source and destination uris.
3) report that view performed a server redirect and give source and destination uris.

* WebCoreSupport/FrameLoaderClientEfl.cpp:
(WebCore::FrameLoaderClientEfl::updateGlobalHistoryRedirectLinks): implementation added.
(WebCore::FrameLoaderClientEfl::updateGlobalHistory): implementation added.
* ewk/ewk_view.h: Added new signals and data types.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@119223 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: Add Closure compiler annotations to WorkerConsole
https://bugs.webkit.org/show_bug.cgi?id=88073

Patch by Alexei Filippov <alexeif@chromium.org> on 2012-06-01
Reviewed by Yury Semikhatsky.

* inspector/front-end/HeapSnapshotWorker.js:
(WebInspector.WorkerConsole.prototype.log):
(WebInspector.WorkerConsole.prototype.error):
(WebInspector.WorkerConsole.prototype.info):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@119224 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed, rolling out r119219.
http://trac.webkit.org/changeset/119219
https://bugs.webkit.org/show_bug.cgi?id=88088

This patch broke two tests on GTK/Qt. The authors are
unavailable. (Requested by kkristof on #webkit).

Patch by Sheriff Bot <webkit.review.bot@gmail.com> on 2012-06-01

* loader/FrameLoader.cpp:
(WebCore::FrameLoader::closeAndRemoveChild):
(WebCore::FrameLoader::detachFromParent):
* page/Frame.cpp:
(WebCore::Frame::willDetachPage):
* page/Frame.h:
(Frame):
(WebCore::Frame::detachFromPage):
(WebCore):
* page/Page.cpp:
(WebCore::Page::~Page):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@119225 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed, rolling out r119213.
http://trac.webkit.org/changeset/119213
https://bugs.webkit.org/show_bug.cgi?id=88084

This patch broke two tests on all platform except Chromium.
The authors are unavailable. (Requested by zherczeg on
#webkit).

Patch by Sheriff Bot <webkit.review.bot@gmail.com> on 2012-06-01

* css/StyleResolver.cpp:
(WebCore::StyleResolver::collectMatchingRulesForList):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@119226 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Layout not updated after setting -webkit-line-clamp to none
https://bugs.webkit.org/show_bug.cgi?id=88049

Reviewed by Abhishek Arya.

Source/WebCore: 

Test: fast/flexbox/line-clamp-removed-dynamically.html

* rendering/RenderDeprecatedFlexibleBox.cpp:
(WebCore::RenderDeprecatedFlexibleBox::styleWillChange): Added. Calls clearLineClamp if
line-clamp will change to none.
(WebCore::RenderDeprecatedFlexibleBox::clearLineClamp): Added. Marks possibly-clamped
children for layout and clears truncation from blocks.
* rendering/RenderDeprecatedFlexibleBox.h:

LayoutTests: 

* fast/flexbox/line-clamp-removed-dynamically-expected.html: Added.
* fast/flexbox/line-clamp-removed-dynamically.html: Added.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@119227 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[EFL] [DRT] editing/execCommand/paste-and-match-style-event.html crashes
https://bugs.webkit.org/show_bug.cgi?id=86961

Patch by Christophe Dumez <christophe.dumez@intel.com> on 2012-06-01
Reviewed by Csaba Osztrogonác.

Source/WebKit/efl:

Call ecore_x_init() in ewk_init() to initialize the ecore_x library.
This avoids crashing upong calling WebCore::systemBeep() which uses
ecore_x_bell() internally.

* ewk/ewk_main.cpp:
(ewk_init):

LayoutTests:

Unskip editing/execCommand/paste-and-match-style-event.html now that
it is no longer crashing thanks to ecore_x library init.

* platform/efl/test_expectations.txt:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@119228 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: Prepare styles-new-API.html results format for a more complex CSS model
https://bugs.webkit.org/show_bug.cgi?id=88090

Reviewed by Antti Koivisto.

* inspector/styles/resources/styles-new-API.css:
* inspector/styles/styles-new-API-expected.txt:
* inspector/styles/styles-new-API.html:

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

* platform/qt-5.0-wk2/Skipped:
* platform/qt-5.0-wk2/compositing/layer-creation/fixed-position-and-transform-expected.txt: Added.
* platform/qt-5.0-wk2/compositing/layer-creation/fixed-position-under-transform-expected.txt: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@119230 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Qt][WK2] Contents not rendered in MiniBrowser for some pages
https://bugs.webkit.org/show_bug.cgi?id=87922

Patch by Dinu Jacob <dinu.jacob@nokia.com> on 2012-06-01
Reviewed by Kenneth Rohde Christiansen.

Set drawing area visible contents rect if new visible contents rect is different from
the previous one.

* UIProcess/qt/QtViewportInteractionEngine.cpp:
(WebKit::QtViewportInteractionEngine::informVisibleContentChange):
* UIProcess/qt/QtViewportInteractionEngine.h:
(QtViewportInteractionEngine):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@119231 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Qt] Remove deprecated to/fromAscii()
https://bugs.webkit.org/show_bug.cgi?id=88086

Patch by Thiago Marcos P. Santos <thiago.santos@intel.com> on 2012-06-01
Reviewed by Simon Hausmann.

Replacing to/fromAscii with to/fromLatin1 since it
is deprecated on Qt5.

Source/WebCore:

* bridge/qt/qt_class.cpp:
(JSC::Bindings::QtClass::fallbackObject):
* platform/network/qt/ResourceRequestQt.cpp:
(WebCore::ResourceRequest::toNetworkRequest):

Source/WebKit/qt:

* WebCoreSupport/InspectorClientQt.cpp:
(WebCore):
* WebCoreSupport/InspectorServerQt.cpp:
(WebCore::InspectorServerRequestHandlerQt::tcpReadyRead):
* tests/qdeclarativewebview/tst_qdeclarativewebview.cpp:
(tst_QDeclarativeWebView::settings):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@119232 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed, rolling out r119228.
http://trac.webkit.org/changeset/119228
https://bugs.webkit.org/show_bug.cgi?id=88098

Caused the EFL debug bot to crash. (Requested by rakuco on
#webkit).

Patch by Sheriff Bot <webkit.review.bot@gmail.com> on 2012-06-01

Source/WebKit/efl:

* ewk/ewk_main.cpp:
(ewk_init):

LayoutTests:

* platform/efl/test_expectations.txt:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@119233 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Qt] Remove QtViewportInteractionEngine::pageItemSizeChanged.
https://bugs.webkit.org/show_bug.cgi?id=88082

Patch by Allan Sandfeld Jensen <allan.jensen@nokia.com> on 2012-06-01
Reviewed by Kenneth Rohde Christiansen.

The function was causing flickering, and after testing it was verified
that it was no longer needed either.

* UIProcess/qt/QtViewportInteractionEngine.cpp:
(WebKit::QtViewportInteractionEngine::QtViewportInteractionEngine):
* UIProcess/qt/QtViewportInteractionEngine.h:
(QtViewportInteractionEngine):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@119234 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Don't set scroll position twice in HistoryController::restoreScrollPositionAndViewState
https://bugs.webkit.org/show_bug.cgi?id=88068

Patch by John Mellor <johnme@chromium.org> on 2012-06-01
Reviewed by Adam Barth.

In the case where pageScaleFactor changes, we were calling
setScrollPosition with an incorrect scroll position (i.e. a scroll
position scaled by the pageScaleFactor we hadn't yet applied), then
fixing it by setting the pageScaleFactor and scroll position together,
overwriting the old scroll position. It's cleaner to just set the
pageScaleFactor and scroll position together.

No new tests as this isn't expected to change the ultimate behavior, just clean up how it happens.

* loader/HistoryController.cpp:
(WebCore::HistoryController::restoreScrollPositionAndViewState):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@119235 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[BlackBerry] Bridge Apps - Apps do not redraw correctly after orientation change
https://bugs.webkit.org/show_bug.cgi?id=88033

Reviewed by Rob Buis.
Patch by Jacky Jiang <zhajiang@rim.com>

PR: 142961
When bridge apps were in carousel mode, the backing store was inactive
as its memory had been released. When we rotated the device, we would
call WebPagPrivate:setViewportSize and resume screen and backing store
to render and blit visible contents. As backing store was inactive and
the window usage was GLES2Usage, we were neither doing backing store
rendering nor direct rendering. Therefore, we drew layers directly
based on the invalid texture contents when blitting contents if
accelerated compositing was enabled.
This patch forces compositing mode to let the accelerated compositing
layer take care of the rendering which can update texture contents
before drawing when backing store is inactive and is openGL compositing.

Reviewed internally by George Staikos and Arvid Nilsson.

* Api/BackingStore.cpp:
(BlackBerry::WebKit::BackingStorePrivate::resumeScreenAndBackingStoreUpdates):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@119236 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[EFL] EFL's LayoutTestController needs to implement deliverWebIntent
https://bugs.webkit.org/show_bug.cgi?id=86865

Patch by Christophe Dumez <christophe.dumez@intel.com> on 2012-06-01
Reviewed by Adam Barth.

Source/WebKit:

Add "${WEBCORE_DIR}/dom/default" to include directories in
CMakeLists.txt.

* CMakeLists.txt:

Source/WebKit/efl:

Add method on Ewk_Frame to deliver an intent.
Add helper function to DumpRenderTreeSupportEfl to deliver a Web
Intent.

* WebCoreSupport/DumpRenderTreeSupportEfl.cpp:
(DumpRenderTreeSupportEfl::deliverWebIntent):
* WebCoreSupport/DumpRenderTreeSupportEfl.h:
* ewk/ewk_frame.cpp:
(ewk_frame_intent_deliver):
* ewk/ewk_frame.h:

Tools:

Add deliverWebIntent method to LayoutTestController and provide
implementation for EFL port.

* DumpRenderTree/LayoutTestController.cpp:
(deliverWebIntentCallback):
(LayoutTestController::staticFunctions):
* DumpRenderTree/LayoutTestController.h:
(LayoutTestController):
* DumpRenderTree/blackberry/LayoutTestControllerBlackBerry.cpp:
(LayoutTestController::deliverWebIntent):
* DumpRenderTree/efl/LayoutTestControllerEfl.cpp:
(LayoutTestController::deliverWebIntent):
* DumpRenderTree/gtk/LayoutTestControllerGtk.cpp:
(LayoutTestController::deliverWebIntent):
* DumpRenderTree/mac/LayoutTestControllerMac.mm:
(LayoutTestController::deliverWebIntent):
* DumpRenderTree/win/LayoutTestControllerWin.cpp:
(LayoutTestController::deliverWebIntent):
* DumpRenderTree/wx/LayoutTestControllerWx.cpp:
(LayoutTestController::deliverWebIntent):

LayoutTests:

Unskip webintents/web-intents-delivery.html now that Web intent
delivery is implemented on EFL port.

* platform/efl/test_expectations.txt:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@119237 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[EFL] ewk_intent_data_get() is not needed and can be removed
https://bugs.webkit.org/show_bug.cgi?id=88072

Patch by Christophe Dumez <christophe.dumez@intel.com> on 2012-06-01
Reviewed by Adam Barth.

Remove ewk_intent_data_get() method from Ewk_Intent. Intent data is
serialized and does not need to be publicly exposed. The browser only
needs action and type to match with services.

* ewk/ewk_intent.cpp:
(_Ewk_Intent):
(ewk_intent_action_get):
(ewk_intent_type_get):
(ewk_intent_service_get):
(ewk_intent_free):
* ewk/ewk_intent.h:

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