Subpixel rendering: icloud.com password arrow has clipped circle at some window sizes.
https://bugs.webkit.org/show_bug.cgi?id=134824
<rdar://problem/17612729>

Reviewed by Simon Fraser.

Transparent layer clipping needs device pixel offset adjusting.

Source/WebCore:
Test: fast/layers/wrong-clipping-semi-transparent-compositing-layer-on-subpixel-position.html

* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::beginTransparencyLayers):
(WebCore::RenderLayer::paintLayer):
(WebCore::RenderLayer::paintLayerContents):
(WebCore::RenderLayer::paintBackgroundForFragments):
(WebCore::RenderLayer::paintForegroundForFragments):
* rendering/RenderLayer.h:

LayoutTests:
* fast/layers/wrong-clipping-semi-transparent-compositing-layer-on-subpixel-position-expected.html: Added.
* fast/layers/wrong-clipping-semi-transparent-compositing-layer-on-subpixel-position.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@171000 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Subpixel layout: return integral results for offset*, client*, scroll* by default.
https://bugs.webkit.org/show_bug.cgi?id=134651

Reviewed by Simon Fraser.

Revert to returning integral values for Element.offset* client* scroll* by default.
Fractional values break number of sites(tight design) and JS frameworks(fail to handle fractional values).

Since snapped dimension depends on both the original point and the width/height of the box,
we need to call RenderBoxModelObject::pixelSnapped*() helpers, instead of round().

Covered by existing tests

Source/WebCore:

* dom/Element.cpp:
(WebCore::subpixelMetricsEnabled):
(WebCore::convertToNonSubpixelValueIfNeeded):
(WebCore::Element::offsetLeft):
(WebCore::Element::offsetTop):
(WebCore::Element::offsetWidth):
(WebCore::Element::offsetHeight):
(WebCore::Element::clientLeft):
(WebCore::Element::clientTop):
(WebCore::Element::clientWidth):
(WebCore::Element::clientHeight):
* page/Settings.in:

Source/WebKit/mac:

* WebView/WebPreferences.mm:
(+[WebPreferences initialize]):

Source/WebKit2:

* Shared/WebPreferencesDefinitions.h:
* UIProcess/API/C/WKPreferencesRefPrivate.h:

LayoutTests:

* cssom/subpixel-offsetleft-top-width-height-values-expected.txt:


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