[EFL] Fix event mapping for WebKit2 with coordinated graphics
https://bugs.webkit.org/show_bug.cgi?id=100956

Reviewed by Alexis Menard.

Apply scale after translation.

* UIProcess/API/efl/ewk_view.cpp:
(toWebContentTransform):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@133170 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Chromium] Unreviewed gardening.  New reftest from
http://trac.webkit.org/changeset/133146 doesn't seem to work on
MacOS 10.8.

* platform/chromium/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@133171 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[subpixel] Change intrinsicSize to LayoutUnit
https://bugs.webkit.org/show_bug.cgi?id=99104

Reviewed by Levi Weintraub.

Source/WebCore:

Change RenderReplaced and intrinsicSize to LayoutUnit to avoid
rounding problems when zooming/scaling. Also change imageSize to
LayoutUnit as it can return a scaled size.

Test: fast/sub-pixel/tiled-canvas-elements.html

* html/ImageDocument.cpp:
(WebCore::ImageDocumentParser::finish):
* loader/cache/CachedImage.cpp:
(WebCore::CachedImage::imageSizeForRenderer):
* loader/cache/CachedImage.h:
(CachedImage):
* platform/graphics/FractionalLayoutSize.h:
(FractionalLayoutSize):
(WebCore::FractionalLayoutSize::scale):
(WebCore::FractionalLayoutSize::clampToMinimumSize):
* rendering/RenderBox.h:
(WebCore::RenderBox::intrinsicSize):
* rendering/RenderHTMLCanvas.cpp:
(WebCore::RenderHTMLCanvas::canvasSizeChanged):
* rendering/RenderImage.cpp:
(WebCore::RenderImage::imageChanged):
(WebCore::RenderImage::updateIntrinsicSizeIfNeeded):
(WebCore::RenderImage::paintReplaced):
(WebCore::RenderImage::minimumReplacedHeight):
* rendering/RenderImage.h:
(RenderImage):
* rendering/RenderImageResource.h:
(WebCore::RenderImageResource::imageSize):
* rendering/RenderImageResourceStyleImage.h:
* rendering/RenderReplaced.cpp:
(WebCore::RenderReplaced::RenderReplaced):
(WebCore::RenderReplaced::computeAspectRatioInformationForRenderBox):
(WebCore::RenderReplaced::computeReplacedLogicalWidth):
(WebCore::RenderReplaced::computeReplacedLogicalHeight):
* rendering/RenderReplaced.h:
(RenderReplaced):
(WebCore::RenderReplaced::minimumReplacedHeight):
(WebCore::RenderReplaced::setIntrinsicSize):
* rendering/RenderVideo.cpp:
(WebCore::RenderVideo::updateIntrinsicSize):
(WebCore::RenderVideo::calculateIntrinsicSize):
(WebCore::RenderVideo::videoBox):
(WebCore::RenderVideo::minimumReplacedHeight):
* rendering/RenderVideo.h:
(RenderVideo):
* rendering/style/StyleCachedImage.cpp:
(WebCore::StyleCachedImage::imageSize):
* rendering/style/StyleCachedImage.h:
(StyleCachedImage):
* rendering/style/StyleCachedImageSet.cpp:
(WebCore::StyleCachedImageSet::imageSize):
* rendering/style/StyleCachedImageSet.h:
(StyleCachedImageSet):
* rendering/style/StyleGeneratedImage.cpp:
(WebCore::StyleGeneratedImage::imageSize):
(WebCore::StyleGeneratedImage::computeIntrinsicDimensions):
* rendering/style/StyleGeneratedImage.h:
(StyleGeneratedImage):
* rendering/style/StyleImage.h:
(StyleImage):
* rendering/style/StylePendingImage.h:

LayoutTests:

Add test for tiled replaced elements and update existing expectations as needed.

* fast/sub-pixel/tiled-canvas-elements-expected.txt: Added.
* fast/sub-pixel/tiled-canvas-elements.html: Added.
* platform/chromium-linux/compositing/overflow/overflow-compositing-descendant-expected.png:
* platform/chromium-linux/compositing/overflow/scroll-ancestor-update-expected.png:
* platform/chromium-linux/svg/zoom/page/zoom-svg-through-object-with-absolute-size-2-expected.png:
* platform/chromium-linux/svg/zoom/page/zoom-svg-through-object-with-absolute-size-2-expected.txt:
* platform/chromium-linux/svg/zoom/page/zoom-svg-through-object-with-absolute-size-expected.txt:
* platform/chromium-linux/svg/zoom/page/zoom-svg-through-object-with-auto-size-expected.png:
* platform/chromium-linux/svg/zoom/page/zoom-svg-through-object-with-percentage-size-expected.png:
* platform/chromium-linux/svg/zoom/page/zoom-svg-through-object-with-percentage-size-expected.txt:
* platform/chromium-win/svg/as-image/svg-non-integer-scaled-image-expected.png:
* platform/chromium-win/svg/zoom/page/zoom-svg-through-object-with-auto-size-expected.txt:
* platform/chromium/fast/reflections/reflection-with-zoom-expected.txt:
* platform/chromium/svg/as-image/svg-non-integer-scaled-image-expected.txt:
* platform/chromium/svg/zoom/page/zoom-svg-as-image-expected.txt:
* platform/chromium/svg/zoom/page/zoom-svg-as-relative-image-expected.txt:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@133172 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Chromium] Unreviewed gardening.  Remove some no-longer-flaky tests
from TestExpectations.

* platform/chromium/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@133173 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: make component subitems use parent color in native memory snapshots.
https://bugs.webkit.org/show_bug.cgi?id=100876

A component subitems use the color of the component itself if the color
is not explicitly specified for the subitem.

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

* inspector/front-end/NativeMemorySnapshotView.js:
(WebInspector.NativeSnapshotNode.prototype._createSizeCell):
(WebInspector.MemoryBlockViewProperties._initialize):
(WebInspector.MemoryBlockViewProperties._forMemoryBlock):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@133174 268f45cc-cd09-0410-ab3c-d52691b4dbfc
WebIconDatabase: Properly clean up on destruction
https://bugs.webkit.org/show_bug.cgi?id=100237

Reviewed by Brady Eidson.

Source/WebCore:

It's now possible that the IconDatabase gets destroyed since WebKit2
isn't using it as a singleton.

Check that the database was properly closed rather than asserting that
it won't get deleted.

* loader/icon/IconDatabase.cpp:
(WebCore::IconDatabase::~IconDatabase):

Source/WebKit2:

* UIProcess/WebIconDatabase.cpp:
(WebKit::WebIconDatabase::invalidate):
Make sure that IconDatabaseBase::iconDatabase won't return a dangling pointer.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@133175 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Fix the Mac breakage
https://bugs.webkit.org/show_bug.cgi?id=100383

Reviewed by Kenneth Rohde Christiansen.

acceleratedCompositingForFixedPositionEnabled needs to be enabled
for fixed layout to work efficiently but it's wrong to force it
to false if fixed layout isn't enabled.

Separate hard requirements for fixed layout from rendering optimizations
and guard the later with USE(COORDINATED_GRAPHICS).
Also add an early return to make sure that ports always having a false
useFixedLayout creation parameter won't get their settings adjusted.

* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::setUseFixedLayout):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@133176 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[EFL][WK2] Add Ewk_Auth_Request API
https://bugs.webkit.org/show_bug.cgi?id=100858

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

Source/WebCore:

Provide an AuthenticationClient for EFL port in WebCore so
that we can handle authentication similarly to other ports
of WebKit.

No new tests, no behavior change for layout tests.

* PlatformEfl.cmake: Add AuthenticationChallengeSoup.cpp to CMake.
* loader/ResourceLoader.cpp:
(WebCore::ResourceLoader::didReceiveAuthenticationChallenge):
* platform/network/ResourceHandle.h:
(ResourceHandle): Have ResourceHandle subclass AuthenticationClient like
most of the other ports.
* platform/network/soup/AuthenticationChallengeSoup.cpp: Fix initialization
of previousFailureCount member. It should be 1 if we are retrying
authentication and 0 otherwise, not the opposite.
(WebCore::AuthenticationChallenge::AuthenticationChallenge):
* platform/network/soup/ResourceHandleSoup.cpp: Provide implementation for EFL
port of AuthenticationClient methods.
(WebCore::WebCoreSynchronousLoader::didReceiveAuthenticationChallenge):
(WebCoreSynchronousLoader):
(WebCore):
(WebCore::ResourceHandle::didReceiveAuthenticationChallenge):
(WebCore::ResourceHandle::receivedRequestToContinueWithoutCredential):
(WebCore::ResourceHandle::receivedCredential):
(WebCore::ResourceHandle::receivedCancellation):
(WebCore::authenticateCallback):
(WebCore::ResourceHandle::defaultSession):

Source/WebKit2:

Add Ewk_Auth_Request API for the client to handle
HTTP authentication.

* PlatformEfl.cmake:
* UIProcess/API/efl/EWebKit2.h:
* UIProcess/API/efl/EwkViewCallbacks.h:
(EwkViewCallbacks):
* UIProcess/API/efl/ewk_auth_request.cpp: Added.
(Ewk_Auth_Request::Ewk_Auth_Request):
(Ewk_Auth_Request::~Ewk_Auth_Request):
(Ewk_Auth_Request::suggestedUsername):
(Ewk_Auth_Request::realm):
(Ewk_Auth_Request::host):
(Ewk_Auth_Request::cancel):
(Ewk_Auth_Request::authenticate):
(Ewk_Auth_Request::isRetrying):
(ewk_auth_request_ref):
(ewk_auth_request_unref):
(ewk_auth_request_suggested_username_get):
(ewk_auth_request_cancel):
(ewk_auth_request_authenticate):
(ewk_auth_request_retrying_get):
(ewk_auth_request_realm_get):
(ewk_auth_request_host_get):
* UIProcess/API/efl/ewk_auth_request.h: Added.
* UIProcess/API/efl/ewk_auth_request_private.h: Added.
(WebKit):
(Ewk_Auth_Request):
(Ewk_Auth_Request::create):
* UIProcess/API/efl/ewk_view.h:
* UIProcess/API/efl/tests/test_ewk2_auth_request.cpp: Added corresponding API tests.
(serverCallback):
(onAuthenticationRequest):
(TEST_F):
(onResourceLoadResponse):
* UIProcess/efl/PageLoadClientEfl.cpp:
(WebKit::PageLoadClientEfl::didReceiveAuthenticationChallengeInFrame):
(WebKit):
(WebKit::PageLoadClientEfl::PageLoadClientEfl):
* UIProcess/efl/PageLoadClientEfl.h:
(PageLoadClientEfl):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@133177 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed. Build fix.

* bindings/v8/V8GCController.cpp:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@133178 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Crash beneath WKRelease after failed load in MiniBrowser
https://bugs.webkit.org/show_bug.cgi?id=100954

Reviewed by Sam Weinig.

There were just some simple retain/release bugs.

* MiniBrowser/mac/WK2BrowserWindowController.m:
(-[WK2BrowserWindowController updateTextFieldFromURL:]):
(-[WK2BrowserWindowController updateProvisionalURLForFrame:]):
Don't try to release null URLs.

(-[WK2BrowserWindowController updateCommittedURLForFrame:]): Don't
release a URL for which we don't have ownership.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@133179 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Add suppressions for images for new skia roll
https://bugs.webkit.org/show_bug.cgi?id=100961

Reviewed by NOBODY.

New skia roll improves clipped antialias hairlines, and this means a few images need to be rebaselined.
crbug.com/148638

* platform/chromium/TestExpectations:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@133180 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed chromium rebaseline for r133172.

* platform/chromium-linux-x86/svg/zoom/page: Removed.
* platform/chromium-linux-x86/svg/zoom/page/zoom-svg-as-relative-image-expected.txt: Removed.
* platform/chromium-mac-lion/compositing/overflow/overflow-compositing-descendant-expected.png:
* platform/chromium-mac-lion/compositing/overflow/scroll-ancestor-update-expected.png:
* platform/chromium-mac-lion/svg/zoom/page/zoom-svg-through-object-with-absolute-size-2-expected.png: Added.
* platform/chromium-mac-lion/svg/zoom/page/zoom-svg-through-object-with-percentage-size-expected.png:
* platform/chromium-mac-snowleopard/compositing/overflow/overflow-compositing-descendant-expected.png:
* platform/chromium-mac-snowleopard/compositing/overflow/scroll-ancestor-update-expected.png:
* platform/chromium-mac-snowleopard/svg/zoom/page/zoom-svg-through-object-with-absolute-size-2-expected.png:
* platform/chromium-mac-snowleopard/svg/zoom/page/zoom-svg-through-object-with-percentage-size-expected.png:
* platform/chromium-mac/compositing/overflow/overflow-compositing-descendant-expected.png:
* platform/chromium-mac/compositing/overflow/scroll-ancestor-update-expected.png:
* platform/chromium-mac/svg/as-image/svg-non-integer-scaled-image-expected.png:
* platform/chromium-mac/svg/zoom/page/zoom-svg-through-object-with-absolute-size-2-expected.png:
* platform/chromium-mac/svg/zoom/page/zoom-svg-through-object-with-absolute-size-2-expected.txt:
* platform/chromium-mac/svg/zoom/page/zoom-svg-through-object-with-absolute-size-expected.txt:
* platform/chromium-mac/svg/zoom/page/zoom-svg-through-object-with-auto-size-expected.png:
* platform/chromium-mac/svg/zoom/page/zoom-svg-through-object-with-auto-size-expected.txt:
* platform/chromium-mac/svg/zoom/page/zoom-svg-through-object-with-percentage-size-expected.png:
* platform/chromium-mac/svg/zoom/page/zoom-svg-through-object-with-percentage-size-expected.txt:
* platform/efl/compositing/overflow/overflow-compositing-descendant-expected.png: Removed.
* platform/efl/compositing/overflow/scroll-ancestor-update-expected.png: Removed.
* platform/efl/svg/zoom/page/zoom-svg-through-object-with-absolute-size-2-expected.png: Removed.
* platform/efl/svg/zoom/page/zoom-svg-through-object-with-auto-size-expected.png: Removed.
* platform/efl/svg/zoom/page/zoom-svg-through-object-with-percentage-size-expected.png: Removed.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@133181 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Coordinated Graphics: Clean up headers of Coordinated Graphics.
https://bugs.webkit.org/show_bug.cgi?id=100907

Patch by Huang Dongsung <luxtella@company100.net> on 2012-11-01
Reviewed by Noam Rosenthal.

This patch performs:
1. Remove unused methods.
2. Change public methods to private if needed.
3. Put virtual, OVERRIDE and explicit keywords if needed.

* UIProcess/CoordinatedGraphics/LayerTreeCoordinatorProxy.h:
(LayerTreeCoordinatorProxy):
* UIProcess/CoordinatedGraphics/LayerTreeRenderer.h:
(LayerTreeRenderer):
* WebProcess/WebPage/CoordinatedGraphics/CoordinatedGraphicsLayer.cpp:
* WebProcess/WebPage/CoordinatedGraphics/CoordinatedGraphicsLayer.h:
(CoordinatedGraphicsLayer):
(WebCore::CoordinatedGraphicsLayer::fixedToViewport):
(WebCore::CoordinatedGraphicsLayer::setMaskTarget):
* WebProcess/WebPage/CoordinatedGraphics/LayerTreeCoordinator.h:
(LayerTreeCoordinator):

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