[Qt] Remove Qt 4 specific code paths
https://bugs.webkit.org/show_bug.cgi?id=88161

Reviewed by Kenneth Rohde Christiansen.

.:

* Source/api.pri:
* WebKit.pro:

Source/WebCore:

* Target.pri:
* WebCore.pri:
* bridge/qt/qt_class.cpp:
(JSC::Bindings::QtClass::fallbackObject):
* bridge/qt/qt_instance.cpp:
(JSC::Bindings::QtInstance::getPropertyNames):
(JSC::Bindings::QtInstance::stringValue):
(JSC::Bindings::QtField::setValueToInstance):
* bridge/qt/qt_runtime.h:
(QtConnectionObject):
* bridge/qt/qt_runtime_qt4.cpp: Removed.
* editing/qt/SmartReplaceQt.cpp: Removed.
* page/qt/EventHandlerQt.cpp:
(WebCore::EventHandler::tabsToAllFormControls):
* platform/graphics/GraphicsContext3D.h:
* platform/graphics/OpenGLShims.cpp:
(WebCore::getProcAddress):
* platform/graphics/OpenGLShims.h:
* platform/graphics/gstreamer/PlatformVideoWindowPrivate.h:
* platform/graphics/gstreamer/PlatformVideoWindowQt.cpp:
(FullScreenVideoWindow::FullScreenVideoWindow):
(FullScreenVideoWindow::keyPressEvent):
(FullScreenVideoWindow::event):
(FullScreenVideoWindow::showFullScreen):
(PlatformVideoWindow::PlatformVideoWindow):
* platform/graphics/qt/GraphicsContext3DQt.cpp:
(WebCore::GraphicsContext3DPrivate::blitMultisampleFramebufferAndRestoreContext):
(WebCore::GraphicsContext3DPrivate::makeCurrentIfNeeded):
* platform/graphics/qt/GraphicsContextQt.cpp:
(WebCore::GraphicsContext::releaseWindowsContext):
* platform/graphics/qt/ImageQt.cpp:
(WebCore::BitmapImage::create):
* platform/graphics/qt/SimpleFontDataQt.cpp:
(WebCore::SimpleFontData::platformInit):
* platform/graphics/texmap/TextureMapper.h:
* platform/graphics/texmap/TextureMapperGL.cpp:
(WebCore::TextureMapperGLData::SharedGLData::getCurrentGLContext):
* platform/qt/DeviceMotionProviderQt.h:
* platform/qt/DeviceOrientationProviderQt.h:
* platform/qt/KURLQt.cpp:
(WebCore::KURL::operator QUrl):
* platform/qt/PlatformScreenQt.cpp:
(WebCore::screenDepth):
(WebCore::screenDepthPerComponent):
(WebCore::screenIsMonochrome):
(WebCore::screenRect):
(WebCore::screenAvailableRect):
* platform/qt/QWebPageClient.h:
(QWebPageClient):
* platform/qt/RenderThemeQt.cpp:
* platform/text/qt/TextBreakIteratorQt.cpp: Removed.
* plugins/qt/PluginContainerQt.cpp: Removed.
* plugins/qt/PluginContainerQt.h: Removed.
* plugins/qt/PluginPackageQt.cpp:
(WebCore::PluginPackage::isPluginBlacklisted):
* plugins/qt/PluginViewQt.cpp:
(WebCore::PluginView::setFocus):
(WebCore::PluginView::paintUsingXPixmap):
(WebCore::setSharedXEventFields):
(WebCore::PluginView::setNPWindowIfNeeded):
(WebCore::PluginView::setParentVisible):
(WebCore::PluginView::platformGetValue):
(WebCore::PluginView::invalidateRect):
(WebCore::getVisualAndColormap):
(WebCore::PluginView::platformStart):
* plugins/win/PluginViewWin.cpp:
(windowHandleForPageClient):

Source/WebKit:

* WebKit.pri:
* WebKit1.pri:
* WebKit1.pro:

Source/WebKit/qt:

* Api/qgraphicswebview.cpp:
(QGraphicsWebView::sceneEvent):
* Api/qgraphicswebview.h:
* Api/qwebframe.cpp:
* Api/qwebframe.h:
* Api/qwebframe_p.h:
* Api/qwebpage.cpp:
(QWebPage::event):
* Api/qwebpage.h:
* Api/qwebsettings.cpp:
(QWebSettings::enablePersistentStorage):
* Api/qwebview.cpp:
(QWebView::QWebView):
(QWebView::event):
* Api/qwebview.h:
* WebCoreSupport/ChromeClientQt.cpp:
(WebCore::ChromeClientQt::setToolTip):
* WebCoreSupport/FrameLoaderClientQt.cpp:
(WebCore::FrameLoaderClientQt::createPlugin):
* WebCoreSupport/GeolocationClientQt.cpp:
* WebCoreSupport/GeolocationClientQt.h:
* WebCoreSupport/PageClientQt.cpp:
(createPlatformGraphicsContext3DFromWidget):
(QWebPageClient::ownerWindow):
* WebCoreSupport/WebEventConversion.cpp:
(WebCore::WebKitPlatformTouchEvent::WebKitPlatformTouchEvent):
* declarative/declarative.pro:
* declarative/plugin.cpp:
* declarative/public.pri:
* examples/platformplugin/WebPlugin.cpp:
(WebPlugin::createExtension):
* examples/platformplugin/WebPlugin.h:
(WebPlugin):
* examples/platformplugin/platformplugin.pro:
* tests/qobjectbridge/tst_qobjectbridge.cpp:
(tst_QObjectBridge::arrayObjectEnumerable):
(tst_QObjectBridge::ownership):
(tst_QObjectBridge::qObjectWrapperWithSameIdentity):
* tests/tests.pri:
* tests/util.h:

Source/WebKit2:

* UIProcess/API/qt/qquickwebview.cpp:
* UIProcess/API/qt/tests/publicapi/tst_publicapi.cpp:
(gatherAPI):
* WebKit2.pri:

Source/WTF:

* WTF.pri:
* WTF.pro:
* wtf/qt/StringQt.cpp:
(WTF::String::String):
(WTF::String::operator QString):
* wtf/qt/UtilsQt.h: Removed.
* wtf/qt/compat/QGuiApplication: Removed.
* wtf/qt/compat/qguiapplication.h: Removed.
* wtf/text/StringImpl.cpp:
(WTF::StringImpl::~StringImpl):
(WTF):
* wtf/text/StringImpl.h:
(StringImpl):

Tools:

* DumpRenderTree/qt/DumpRenderTree.pro:
* DumpRenderTree/qt/EventSenderQt.cpp:
(EventSender::touchCancel):
(EventSender::sendTouchEvent):
* DumpRenderTree/qt/EventSenderQt.h:
(EventSender):
* DumpRenderTree/qt/ImageDiff.pro:
* DumpRenderTree/qt/main.cpp:
(main):
* QtTestBrowser/QtTestBrowser.pro:
* QtTestBrowser/cookiejar.cpp:
(TestBrowserCookieJar::TestBrowserCookieJar):
* QtTestBrowser/launcherwindow.cpp:
(LauncherWindow::setDiskCache):
* qmake/configure.pri:
* qmake/mkspecs/features/default_post.prf:
* qmake/mkspecs/features/default_pre.prf:
* qmake/mkspecs/features/features.prf:
* qmake/mkspecs/features/functions.prf:
* qmake/mkspecs/features/qtwebkit.prf: Removed.
* qmake/mkspecs/features/unix/default_pre.prf:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@124879 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Revert "[Qt] Remove Qt 4 specific code paths"

This reverts commit f9a7b5b2a18461d290496f1be088126bf23a8577.
Unreviewed trivial fix: Missed HAVE_QT5 removal as part of r124879

Fixes failing auto-test.

* tests/qobjectbridge/tst_qobjectbridge.cpp:
(tst_QObjectBridge::enumerate_data):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@124883 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Merge branch 'master' of ../trunk into qtwebkit-2.3
Revert "Unreviewed trivial fix: Missed HAVE_QT5 removal as part of r124879"

This reverts commit b388ade35662e9f5c1fca9c7aa8c1347debc3bc5.
Revert "[Qt] Remove Qt 4 specific code paths"

This reverts commit 0beb156abf7cb4c6fb70190bb6288a9facb232c2.
Merge commit '189974113e41f970b08419f75cddea8ca5169fba' into qtwebkit-2.3

Conflicts:
	Source/WebCore/bridge/qt/qt_class.cpp
	Source/WebKit/WebKit1.pri
	Source/api.pri
	Tools/DumpRenderTree/qt/DumpRenderTree.pro
	Tools/QtTestBrowser/QtTestBrowser.pro
	Tools/qmake/mkspecs/features/default_pre.prf
	Tools/qmake/mkspecs/features/features.prf
Revert "Unreviewed trivial fix: Missed HAVE_QT5 removal as part of r124879"

This reverts commit b5a94e81dd7cc9cfccb1e69d2b104189736e30ec.
Allow blocking of Web SQL databases in third-party documents
https://bugs.webkit.org/show_bug.cgi?id=94057

Reviewed by Adam Barth.

Source/WebCore:

Add a check for pages in third-party pages to allow third-party storage blocking of Web SQL databases.

Tests: http/tests/security/cross-origin-websql-allowed.html
       http/tests/security/cross-origin-websql.html

* Modules/webdatabase/DOMWindowWebDatabase.cpp:
(WebCore::DOMWindowWebDatabase::openDatabase): Pass top origin to canAccessDatabase
* page/SecurityOrigin.cpp:
(WebCore::SecurityOrigin::canAccessStorage): Common method for various types of storage that use the same criteria
* page/SecurityOrigin.h:
(WebCore::SecurityOrigin::canAccessDatabase): Use canAccessStorage
(WebCore::SecurityOrigin::canAccessLocalStorage): Change to using canAccessStorage
(SecurityOrigin):

LayoutTests:

Created tests for accessing openDatabase from a third party and first party context when third-party blocking is on and off.

* http/tests/security/cross-origin-websql-allowed-expected.txt: Added.
* http/tests/security/cross-origin-websql-allowed.html: Added.
* http/tests/security/cross-origin-websql-expected.txt: Added.
* http/tests/security/cross-origin-websql.html: Added.
* http/tests/security/resources/cross-origin-iframe-for-websql.html: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@125736 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Add a was-inserted-into-tree notification to RenderObject
https://bugs.webkit.org/show_bug.cgi?id=93874

Reviewed by Eric Seidel.

This change adds insertedIntoTree to RenderObject so that renderers
can now do their post-insertion task inside this function.

Our current architecture has 2 ways of doing post-insertion tasks:
- overriding RenderObject::addChild
- RenderObjectChildList::insertChildNode / appendChildNode

Because the former is not guaranteed to be called for each insertion
(on top of being called on the parent and not the inserted child), the
2 latter functions are the one that have been mostly used recently. This
led to code duplication between the functions but also doesn't scale as
other renderers need to hop on this notification and currently don't (for
example, table parts). The other renderer's migration will be done in
follow-up patches.

Refactoring covered by existing tests.

* rendering/RenderObjectChildList.cpp:
(WebCore::RenderObjectChildList::removeChildNode):
* rendering/RenderObject.cpp:
(WebCore::RenderObject::enclosingRenderNamedFlowThread):
Moved the code from renderNamedFlowThreadContainer to RenderObject::enclosingRenderNamedFlowThread.
This is needed as now 2 classes need to access the function.

* rendering/RenderObjectChildList.cpp:
(WebCore::RenderObjectChildList::appendChildNode):
(WebCore::RenderObjectChildList::insertChildNode):
Moved the code duplicated from those 2 functions into
the instances of insertedIntoTree below.

* rendering/RenderObject.cpp:
(WebCore::RenderObject::insertedIntoTree):
Base function that needs to be called from all the other
specialized functions below.

* rendering/RenderListItem.cpp:
(WebCore::RenderListItem::insertedIntoTree):
* rendering/RenderListItem.h:
* rendering/RenderObject.h:
* rendering/RenderObjectChildList.h:
* rendering/RenderRegion.cpp:
(WebCore::RenderRegion::insertedIntoTree):
* rendering/RenderRegion.h:
Added the overriden insertedIntoTree function.

* rendering/RenderQuote.h:
Moved the comment from RenderObjectChildList about RenderQuote here.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@125737 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Update manual tests and comments to refer to TestRunner instead of LayoutTestController
https://bugs.webkit.org/show_bug.cgi?id=94168

Reviewed by Kent Tamura.

.:

* ManualTests/resources/multiFileResources/post-echo-and-notify-done.cgi:

Source/WebKit:

* PlatformBlackBerry.cmake:

Source/WebKit/chromium:

* public/WebDevToolsAgent.h:
(WebDevToolsAgent):
* public/WebView.h:
(WebView):

Source/WebKit/qt:

* Api/qwebelement.cpp:
(convertJSValueToWebElementVariant):
* WebCoreSupport/DumpRenderTreeSupportQt.h:

Source/WebKit/win:

* Interfaces/IWebPreferencesPrivate.idl:

Source/WebKit2:

* Shared/WebPreferencesStore.cpp:
(WebKit::WebPreferencesStore::getBoolValueForKey):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@125738 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Regression(121518) TextFieldDecorationElement formatting is broken.
https://bugs.webkit.org/show_bug.cgi?id=90913

Reviewed by Dimitri Glazkov.

Source/WebCore:

NodeRenderingContext::nextRenderer() has a problem which cannot retrieve the renderer
across an insertion point in some case. That is because ad-hoc composed tree traversal on
NodeRenderingContext is broken. The problem is hidden before r121518 though.

This change rewrite nextRenderer() using ComposedShadowTreeWalker to eliminate the ad-hoc
traversal. previousRenderer() is also rewritten in the same way.

Test: fast/dom/shadow/shadow-div-reflow.html

* dom/NodeRenderingContext.cpp:
(WebCore):
(WebCore::NodeRenderingContext::nextRenderer):
(WebCore::NodeRenderingContext::previousRenderer):

LayoutTests:

* fast/dom/shadow/shadow-div-reflow-expected.html: Added.
* fast/dom/shadow/shadow-div-reflow.html: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@125739 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Forms] Rename LayoutTests/fast/forms/number/number-wheel.html to number-wheel-event.html
https://bugs.webkit.org/show_bug.cgi?id=94173

Reviewed by Kent Tamura.

This patch renames LayoutTest/fast/forms/number/number-wheel.html to
number-wheel-event.html to indicate the test checks wheel event
handling.

* fast/forms/number/number-wheel-event-expected.txt: Copied from LayoutTests/fast/forms/number/number-wheel-expected.txt.
* fast/forms/number/number-wheel-event.html: Copied from LayoutTests/fast/forms/number/number-wheel.html.
* fast/forms/number/number-wheel-expected.txt: Removed.
* fast/forms/number/number-wheel.html: Removed.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@125740 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Calendar Picker: Localize numbers in a calendar picker
https://bugs.webkit.org/show_bug.cgi?id=93704

Reviewed by Hajime Morita.

.:

* ManualTests/forms/calendar-picker.html:
Add a mock pagePopupController.localizeNumberString().

Source/WebCore:

Because Number.toLocaleString() of V8 returns no localized
numbers, we provide a localization function via
PagePopupController.

No new tests. We have no ways to change the locale in layout tests.

* Resources/pagepopups/calendarPicker.js:
(localizeNumber): Added. A wrapper for pagePopupController.localizeNumberString().
(formatJapaneseImperialEra): Use localizeNumber().
(formatYearMonth): ditto.
(DaysTable.prototype._renderMonth): ditto.
* page/PagePopupController.cpp:
(WebCore::PagePopupController::localizeNumberString):
Added. Just calls WebCore::convertToLocalizedNumber().
* page/PagePopupController.h:
(PagePopupController): Declare localizeNumberString().
* page/PagePopupController.idl: Add localizeNumberString().

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@125741 268f45cc-cd09-0410-ab3c-d52691b4dbfc
(r125629): Newly added test css3/filters/custom/filter-fallback-to-software.html failing on mac
https://bugs.webkit.org/show_bug.cgi?id=94169

Patch by Kiran Muppala <cmuppala@apple.com> on 2012-08-15
Reviewed by Sam Weinig.

Update TestExpecatations of failing test to make the bot green.

* platform/mac/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@125742 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Tests] Copy to fast/forms/resources/common-wheel-event.js from fast/forms/number/number-wheel-event.html
https://bugs.webkit.org/show_bug.cgi?id=94184

Reviewed by Kent Tamura.

This patch copies fast/forms/number/number-wheel-event.html
to fast/forms/resources/common-wheel-event.js for sharing
test code among input types.

* fast/forms/resources/common-wheel-event.js: Copied from LayoutTests/fast/forms/number/number-wheel-event.html.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@125743 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Shadow] Stop 'load' and 'error' events at shadow boundaries
https://bugs.webkit.org/show_bug.cgi?id=93425

Reviewed by Dimitri Glazkov.

Source/WebCore:

The shadow DOM spec has added these events as 'always-be-stopped' events at shadow boundaries.
http://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/shadow/index.html#events-that-are-always-stopped

Test: fast/dom/shadow/events-stopped-at-shadow-boundary.html

* dom/EventDispatcher.cpp:
(WebCore::EventDispatcher::determineDispatchBehavior):

LayoutTests:

* fast/dom/shadow/events-stopped-at-shadow-boundary-expected.txt:
* fast/dom/shadow/events-stopped-at-shadow-boundary.html:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@125744 268f45cc-cd09-0410-ab3c-d52691b4dbfc
VoidCallback should not be a special snowflake
https://bugs.webkit.org/show_bug.cgi?id=94119

Reviewed by Eric Seidel.

VoidCallback is the oldest of the callbacks and it predates our ability
to autogenerate callback objects. The existing implementation of
VoidCallback is wrong because it doesn't call
ActiveDOMCallback::canInvokeCallback. The net result of that is that
void callbacks can race with navigations and occationally execute after
the Frame has navigated to a new Document, which was causing the
flakiness.

This patch changes VoidCallback to no longer be a unique snowflake.
Instead, we autogenerate the implementation, just like every other
callback in WebCore.

Tests: storage/websql/database-lock-after-reload.html is no longer flaky.

* DerivedSources.make:
* GNUmakefile.list.am:
* Modules/filesystem/SyncCallbackHelper.h:
(WebCore::SyncCallbackHelper::SuccessCallbackImpl::handleEvent):
* Target.pri:
* UseJSC.cmake:
* UseV8.cmake:
* WebCore.gyp/WebCore.gyp:
* WebCore.gypi:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.xcodeproj/project.pbxproj:
* bindings/cpp/WebDOMCustomVoidCallback.cpp: Removed.
* bindings/cpp/WebDOMCustomVoidCallback.h: Removed.
* bindings/js/JSBindingsAllInOne.cpp:
* bindings/js/JSCustomVoidCallback.cpp: Removed.
* bindings/js/JSCustomVoidCallback.h: Removed.
* bindings/js/JSDesktopNotificationsCustom.cpp:
(WebCore::JSNotificationCenter::requestPermission):
* bindings/scripts/CodeGeneratorCPP.pm:
(GetClassName):
(AddIncludesForType):
* bindings/scripts/CodeGeneratorJS.pm:
(GetCallbackClassName):
(GenerateCallbackImplementation):
(JSValueToNative):
* bindings/scripts/CodeGeneratorV8.pm:
(GenerateCallbackImplementation):
(TypeCanFailConversion):
(GetCallbackClassName):
* bindings/scripts/test/JS/JSTestCallback.cpp:
(WebCore::JSTestCallback::callbackWithNoParam):
* bindings/scripts/test/V8/V8TestCallback.cpp:
* bindings/v8/custom/V8CustomSQLStatementErrorCallback.cpp:
* bindings/v8/custom/V8CustomVoidCallback.cpp: Removed.
* bindings/v8/custom/V8CustomVoidCallback.h: Removed.
* bindings/v8/custom/V8MutationCallbackCustom.cpp:
* bindings/v8/custom/V8NotificationCenterCustom.cpp:
(WebCore::V8NotificationCenter::requestPermissionCallback):
* html/VoidCallback.h:
(VoidCallback):
* html/VoidCallback.idl:
* inspector/InspectorDatabaseAgent.cpp:
(WebCore):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@125745 268f45cc-cd09-0410-ab3c-d52691b4dbfc
REGRESSION (r125659): 4 HTMLMeterElement tests fail on Mac.
https://bugs.webkit.org/show_bug.cgi?id=94157

Unreviewed, unskip failing tests and  rebaseline after r125659.

* platform/mac/Skipped:
* platform/mac/fast/dom/HTMLMeterElement/meter-element-repaint-on-update-value-expected.txt:
* platform/mac/fast/dom/HTMLMeterElement/meter-styles-changing-pseudo-expected.txt:
* platform/mac/fast/dom/HTMLMeterElement/meter-styles-expected.txt:
* platform/mac/fast/dom/HTMLMeterElement/meter-writing-mode-expected.txt:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@125746 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Forms] Re-factor fast/forms/number/number-wheel-event.html
https://bugs.webkit.org/show_bug.cgi?id=94172

Reviewed by Kent Tamura.

This patch moves test code from number-wheel-event.html to common-wheel-event.js
for sharing test code among input types.

* fast/forms/number/number-wheel-event.html:
* fast/forms/resources/common-wheel-event.js:
(testWheelEvent):

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