[Qt][WK2] Fix scrolling in touch mode
https://bugs.webkit.org/show_bug.cgi?id=75006

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

Source/WebCore:

* page/FrameView.cpp:
(WebCore::FrameView::setFixedVisibleContentRect):
    On changes to fixedVisibleContentRect update scroll-animators position, and
    recalculate page-step sizes in scrollbars.
* platform/ScrollView.cpp:
(WebCore::ScrollView::scrollTo):
    Forward scrolling-request to the host window.
(WebCore::ScrollView::updateScrollbars):
    Allow ScrollViews to have invisible scrollbars when scrolling is delegated.
* platform/ScrollView.h:
(ScrollView):

Source/WebKit2:

Only handle mouse-wheel events in WebCore to avoid double scrolling, and
scale pixels scrolled by wheel events according to viewport transformation.

* Shared/qt/WebEventFactoryQt.cpp:
(WebKit::WebEventFactory::createWebWheelEvent):
* UIProcess/qt/QtViewportInteractionEngine.cpp:
* UIProcess/qt/QtViewportInteractionEngine.h:
(QtViewportInteractionEngine):
* UIProcess/qt/QtWebPageEventHandler.cpp:
(QtWebPageEventHandler::handleWheelEvent):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@117069 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Qt][WK2] fast/loader/create-frame-in-DOMContentLoaded.html crashes
https://bugs.webkit.org/show_bug.cgi?id=83578

Source/WebKit2:

Retrieve and save page ID only for a valid page in WebFrameNetworkingContext.
The page will be null if the frame was detached from the page.

Patch by Dinu Jacob <dinu.jacob@nokia.com> on 2012-05-15
Reviewed by Simon Hausmann.

* WebProcess/WebCoreSupport/qt/WebFrameNetworkingContext.cpp:
(WebCore::WebFrameNetworkingContext::WebFrameNetworkingContext):

LayoutTests:

Unskip passing test.

Patch by Dinu Jacob <dinu.jacob@nokia.com> on 2012-05-15
Reviewed by Simon Hausmann.

* platform/qt-5.0-wk2/Skipped:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@117070 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Qt] http/tests/xmlhttprequest/xmlhttprequest-check-head-readystate-for-404.html times out
https://bugs.webkit.org/show_bug.cgi?id=84016

Reviewed by Simon Hausmann.

Source/WebCore:

Calling didFail abort the connection and doesn't activate the HEADERS_RECEIVED state.
Since the goal of HEAD is to test then the request should be marked as finished
also in cases of HTTP errors.
This matches other ports behavior.

* platform/network/qt/QNetworkReplyHandler.cpp:
(WebCore::shouldIgnoreHttpError):

LayoutTests:

* platform/qt/Skipped:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@117071 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Qt] css1/box_properties/acid_test.html fails in release mode on 32 bit Linux
https://bugs.webkit.org/show_bug.cgi?id=36954

Unreviewed gardening, unskip it, because it passes on 32/64 bit too now. (Maybe after r112397)

* platform/qt/css1/box_properties/acid_test-expected.png: Added.
* platform/qt/css1/box_properties/acid_test-expected.txt:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@117072 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[EFL] [DRT] Unskip passing tests related to computedStyleIncludingVisitedInfo and display
https://bugs.webkit.org/show_bug.cgi?id=86473

Unreviewed gardening, unskip now passing tests.

Patch by Sudarsana Nagineni <sudarsana.nagineni@linux.intel.com> on 2012-05-15

* platform/efl/Skipped:

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

Unskip test which require USE(ZLIB). It has been enabled for EFL port
since r110896).

Patch by Christophe Dumez <christophe.dumez@intel.com> on 2012-05-15

* platform/efl/Skipped:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@117074 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Qt][WK2] fast/repaint/scroll-in-clipped-layer.html crashes
https://bugs.webkit.org/show_bug.cgi?id=80387

Patch by Viatcheslav Ostapenko <ostapenko.viatcheslav@nokia.com> on 2012-05-15
Reviewed by Csaba Osztrogonác.

Unskip tests for bug 80387. They do not crash now.

* platform/qt-5.0-wk2/Skipped:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@117075 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Qt] css1/box_properties/acid_test.html fails in release mode on 32 bit Linux
https://bugs.webkit.org/show_bug.cgi?id=36954

Unreviewed gardening, unskip it, because it passes on 32/64 bit too now. (Maybe after r112397)

* platform/qt/Skipped: Try to unskip really. :)

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@117076 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Qt][Wk2] Unskip passing svg/dynamic-updates tests after r95878.

Patch by Zoltan Arvai <zarvai@inf.u-szeged.hu> on 2012-05-15
Reviewed by Csaba Osztrogonác.

* platform/qt-5.0-wk2/Skipped:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@117077 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[BlackBerry] adding a functionality for web inspector to inspect current selected element
https://bugs.webkit.org/show_bug.cgi?id=86394

Patch by Hanna Ma <Hanma@rim.com> on 2012-05-15
Reviewed by Rob Buis.

Add a way to trigger the remote web inspector on selected element.

* Api/WebPage.cpp:
(BlackBerry::WebKit::WebPage::inspectCurrentContextElement):
(WebKit):
* Api/WebPage.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@117078 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[EFL] Gardening of flaky tests
https://bugs.webkit.org/show_bug.cgi?id=86485

Unreviewed gardening.

Patch by Thiago Marcos P. Santos <thiago.santos@intel.com> on 2012-05-15

* platform/efl/test_expectations.txt:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@117079 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: AdvancedSearchController is not stopped then view is hidden.
https://bugs.webkit.org/show_bug.cgi?id=86466

Patch by Eugene Klyuchnikov <eustas.bug@gmail.com> on 2012-05-15
Reviewed by Vsevolod Vlasov.

AdvancedSearchController overrides "wasHidden" method instead of "willHide".

UI event-flow, not tested.

* inspector/front-end/AdvancedSearchController.js:
(WebInspector.SearchView.prototype.willHide): Renamed function.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@117080 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Qt] Unreviewed gardening. Remove duplicated entries because of disabled SUBPIXEL_LAYOUT.

* platform/qt-4.8/Skipped:
* platform/qt-5.0-wk1/Skipped:
* platform/qt-5.0-wk2/Skipped:
* platform/qt-5.0/Skipped:
* platform/qt-arm/Skipped:
* platform/qt-mac/Skipped:

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

Move http/tests/cookies/third-party-cookie-relaxing.html from Skipped
list to test_expectations.txt. This test is expected to fail on EFL
port and won't be fixed.

Patch by Christophe Dumez <christophe.dumez@intel.com> on 2012-05-15

* platform/efl/Skipped:
* platform/efl/test_expectations.txt:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@117082 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[CG] CGImageCreateWithImageInRect is too slow, but for now we still need to use it
https://bugs.webkit.org/show_bug.cgi?id=86340

Reviewed by Geoffrey Garen.

This patch adds a subimage cache to defray the cost of CGImageCreateWithImageInRect.
Later, we will restructure the code so it doesn't use that function, but at the
moment there are CG issues blocking that change.

* platform/graphics/cg/GraphicsContextCG.cpp:
(SubimageCacheEntry): Added. An entry in the cache.
(SubimageCacheEntryTraits): Added. Traits for the cache.
(SubimageCacheHash): Added. Hash function for the cache.
(SubimageCacheTimer): Added. Timer that clears the cache after a second
of inactivity.
(SubimageCacheWithTimer): Added. Cache and its timer.
(WebCore::subimageCache): Added. Function returning the single global timer.
(WebCore::SubimageCacheTimer::restart): Added. Start the timer.
(WebCore::SubimageCacheTimer::fired): Added. Clear the cache when the timer fires.
(SubimageRequest): Added. A key to look up in the cache.
(SubimageCacheAdder): Added. Translator to add to the cache.
(WebCore::subimage): Added. Puts an entry in the cache.
(WebCore::GraphicsContext::drawNativeImage): Changed to call the subimage function.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@117083 268f45cc-cd09-0410-ab3c-d52691b4dbfc
RuleSet::addToRuleSet wastes a bit of Vector capacity.
<http://webkit.org/b/86434>

Reviewed by Antti Koivisto.

Have makeRuleSet call shrinkToFit() on the vectors before returning them.
This avoids wasting space for the rulesets constructed in collectFeatures().

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

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@117084 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Guard some AppKit-specific code in WebKit2 with USE(APPKIT)
https://bugs.webkit.org/show_bug.cgi?id=86444

Reviewed by Sam Weinig.

* Shared/NativeWebKeyboardEvent.h:
(NativeWebKeyboardEvent):
(WebKit::NativeWebKeyboardEvent::nativeEvent):
* Shared/NativeWebMouseEvent.h:
(NativeWebMouseEvent):
(WebKit::NativeWebMouseEvent::nativeEvent):
* Shared/NativeWebWheelEvent.h:
(NativeWebWheelEvent):
(WebKit::NativeWebWheelEvent::nativeEvent):
* Shared/mac/ArgumentCodersMac.h:
(CoreIPC):
* Shared/mac/ArgumentCodersMac.mm:
(CoreIPC::typeFromObject):
(CoreIPC::encode):
(CoreIPC::decode):
* Shared/mac/WebEventFactory.mm:
* WebProcess/WebCoreSupport/mac/WebPopupMenuMac.mm:
(WebKit::WebPopupMenu::setUpPlatformData):
* WebProcess/mac/WebProcessMainMac.mm:
(WebKit::WebProcessMain):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@117085 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Refactor SVG parts of Node::addEventListener/removeEventListener
https://bugs.webkit.org/show_bug.cgi?id=86426

Reviewed by Nikolas Zimmermann.

Move SVG parts of Node::addEventListener/removeEventListener into svg/. Now we do not
have to check in Node::addEventListener/removeEventListener if we are dealing with an SVG
element. Make tryAddEventListener/tryRemoveEventListener protected methods on Node to be able to use
it in SVGElement.

No new tests, since no change in behavior, just refactoring.

* dom/Node.cpp:
(WebCore::tryAddEventListener):
(WebCore::Node::addEventListener):
(WebCore::tryRemoveEventListener):
(WebCore::Node::removeEventListener):
* svg/SVGElement.cpp:
(WebCore::collectInstancesForSVGElement):
(WebCore):
(WebCore::SVGElement::addEventListener):
(WebCore::SVGElement::removeEventListener):
* svg/SVGElement.h:
(SVGElement):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@117086 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Chromium] Unreviewed. Rebaseline svg/repaint/mask-clip-target-transform-expected.png.

Patch by Florin Malita <fmalita@chromium.org> on 2012-05-15

* platform/chromium-mac/svg/repaint/mask-clip-target-transform-expected.png: Added.
* platform/chromium-win/svg/repaint/mask-clip-target-transform-expected.png: Added.
* platform/chromium/test_expectations.txt:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@117088 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed. Updated chromium test expectations.

* platform/chromium/test_expectations.txt:

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