REGRESSION (r133351, sub-pixel layout): Right-to-left block with text-overflow: ellipsis truncates prematurely (breaks facebook.com Hebrew UI)
https://bugs.webkit.org/show_bug.cgi?id=112227

Reviewed by Maciej Stachowiak.

This patch removes unnecessary integral snapping of inlines at layout time.

Source/WebCore:
The general rule of thumb of using round/floor/ceil at layout time is to not use them.

When some computed values (x, y, width, height) get snapped during layout, while others don't,
intersecting/measuring mismatches could occur and they could end up producing visual artifacts such as truncations.
This patch also enables iframe content to be positioned on odd device pixel positions on retina displays.

Tests: fast/frames/hidpi-position-iframe-on-device-pixel.html
       fast/inline/hidpi-rtl-text-does-not-fit-line-and-gets-cut-off.html

* rendering/RenderBlock.h:
(WebCore::RenderBlock::logicalLeftOffsetForLine):
(WebCore::RenderBlock::pixelSnappedLogicalLeftOffsetForLine): Deleted.
(WebCore::RenderBlock::pixelSnappedLogicalRightOffsetForLine): Deleted.
* rendering/RenderBlockLineLayout.cpp:
(WebCore::updateLogicalInlinePositions):
(WebCore::RenderBlockFlow::deleteEllipsisLineBoxes):
(WebCore::RenderBlockFlow::checkLinesForTextOverflow):

LayoutTests:
1px off differences and rounding expected results to match new behavior. -rebaselining.

* fast/frames/hidpi-position-iframe-on-device-pixel-expected.html: Added.
* fast/frames/hidpi-position-iframe-on-device-pixel.html: Added.
* fast/inline/hidpi-rtl-text-does-not-fit-line-and-gets-cut-off-expected.html: Added.
* fast/inline/hidpi-rtl-text-does-not-fit-line-and-gets-cut-off.html: Added.
* fast/shapes/shape-outside-floats/shape-outside-floats-ellipse-margin-left.html:
* fast/shapes/shape-outside-floats/shape-outside-floats-ellipse-margin-right.html:
* fast/shapes/shape-outside-floats/shape-outside-floats-inset-rounded-different-writing-modes-left.html:
* fast/shapes/shape-outside-floats/shape-outside-floats-inset-rounded-different-writing-modes-right.html:
* fast/shapes/shape-outside-floats/shape-outside-rounded-boxes-001.html:
* fast/shapes/shape-outside-floats/shape-outside-rounded-boxes-002.html:
* fast/shapes/shape-outside-floats/shape-outside-rounded-inset-expected.html:
* platform/mac/TestExpectations:
* platform/mac/css1/box_properties/float_on_text_elements-expected.txt:
* platform/mac/css1/text_properties/text_indent-expected.txt:
* platform/mac/css2.1/t0905-c414-flt-wrap-00-e-expected.txt:
* platform/mac/css2.1/t0905-c5525-fltwidth-00-c-g-expected.txt:
* platform/mac/css2.1/t100801-c544-valgn-00-a-ag-expected.txt:
* platform/mac/css2.1/t100801-c544-valgn-02-d-agi-expected.txt:
* platform/mac/css2.1/t100801-c544-valgn-03-d-agi-expected.txt:
* platform/mac/css2.1/t100801-c544-valgn-04-d-agi-expected.txt:
* platform/mac/css3/unicode-bidi-isolate-basic-expected.txt:
* platform/mac/editing/selection/caret-ltr-2-expected.txt:
* platform/mac/editing/selection/caret-ltr-2-left-expected.txt:
* platform/mac/editing/selection/caret-rtl-expected.txt:
* platform/mac/editing/selection/caret-rtl-right-expected.txt:
* platform/mac/editing/selection/vertical-rl-rtl-extend-line-backward-br-expected.txt:
* platform/mac/editing/selection/vertical-rl-rtl-extend-line-backward-p-expected.txt:
* platform/mac/editing/selection/vertical-rl-rtl-extend-line-forward-br-expected.txt:
* platform/mac/editing/selection/vertical-rl-rtl-extend-line-forward-p-expected.txt:
* platform/mac/fast/block/float/026-expected.txt:
* platform/mac/fast/block/float/028-expected.txt:
* platform/mac/fast/css/absolute-child-with-percent-height-inside-relative-parent-expected.txt: Added.
* platform/mac/fast/css/empty-pseudo-class-expected.txt:
* platform/mac/fast/css/first-child-pseudo-class-expected.txt:
* platform/mac/fast/css/first-of-type-pseudo-class-expected.txt:
* platform/mac/fast/css/last-child-pseudo-class-expected.txt:
* platform/mac/fast/css/last-of-type-pseudo-class-expected.txt:
* platform/mac/fast/css/only-child-pseudo-class-expected.txt:
* platform/mac/fast/css/only-of-type-pseudo-class-expected.txt:
* platform/mac/fast/css/text-overflow-input-expected.txt:
* platform/mac/fast/forms/file/file-input-direction-expected.txt:
* platform/mac/fast/forms/input-text-scroll-left-on-blur-expected.txt:
* platform/mac/fast/forms/number/number-appearance-rtl-expected.txt:
* platform/mac/fast/forms/placeholder-position-expected.txt:
* platform/mac/fast/forms/search-rtl-expected.txt:
* platform/mac/fast/line-grid/line-align-left-edges-expected.txt:
* platform/mac/fast/lists/008-expected.txt:
* platform/mac/fast/lists/008-vertical-expected.txt:
* platform/mac/fast/multicol/column-count-with-rules-expected.txt:
* platform/mac/fast/multicol/float-multicol-expected.txt:
* platform/mac/fast/multicol/layers-in-multicol-expected.txt:
* platform/mac/fast/multicol/vertical-lr/float-multicol-expected.txt:
* platform/mac/fast/multicol/vertical-rl/float-multicol-expected.txt:
* platform/mac/fast/regions/multiple-directionality-changes-in-variable-width-regions-expected.txt:
* platform/mac/fast/regions/repaint/line-flow-with-floats-in-regions-expected.txt:
* platform/mac/fast/repaint/line-flow-with-floats-1-expected.txt:
* platform/mac/fast/repaint/line-flow-with-floats-10-expected.txt:
* platform/mac/fast/repaint/line-flow-with-floats-2-expected.txt:
* platform/mac/fast/repaint/line-flow-with-floats-3-expected.txt:
* platform/mac/fast/repaint/line-flow-with-floats-4-expected.txt:
* platform/mac/fast/repaint/line-flow-with-floats-5-expected.txt:
* platform/mac/fast/repaint/line-flow-with-floats-6-expected.txt:
* platform/mac/fast/repaint/line-flow-with-floats-7-expected.txt:
* platform/mac/fast/repaint/line-flow-with-floats-8-expected.txt:
* platform/mac/fast/repaint/line-flow-with-floats-9-expected.txt:
* platform/mac/fast/text/script-tests/ligature-subdivision.js:
* platform/mac/fast/text/vertical-rl-rtl-linebreak-expected.txt:
* platform/mac/fast/text/whitespace/024-expected.txt:
* platform/mac/fast/text/whitespace/pre-wrap-spaces-after-newline-expected.txt:
* platform/mac/fast/text/word-break-run-rounding-expected.txt:
* platform/mac/svg/wicd/rightsizing-grid-expected.txt:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@169048 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Set WebKitSuppressesIncrementalRenderingKey to NO by default on both Mac and iOS
https://bugs.webkit.org/show_bug.cgi?id=133073

Reviewed by Simon Fraser.

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


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@169049 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Script include paths for js-test-pre.js and js-test-post.js were incorrect.
https://bugs.webkit.org/show_bug.cgi?id=133072

Patch by Jono Wells <jonowells@apple.com> on 2014-05-19
Reviewed by Andy Estes.

* http/tests/navigation/forward-to-fragment-fires-onload.html: Fixed script includes.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@169050 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[WebKit2] Wake up threads blocked in waitForAndDispatchImmediately() if we lose our connection
https://bugs.webkit.org/show_bug.cgi?id=133010

Reviewed by Geoffrey Garen.

If a thread is blocked on m_waitForMessageCondition and we lose our connection, treat that like we do a timeout.

* Platform/IPC/Connection.cpp:
(IPC::Connection::Connection):
(IPC::Connection::waitForMessage):
(IPC::Connection::connectionDidClose):
* Platform/IPC/Connection.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@169051 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Mac] Fix a typo in plug-in sandbox
https://bugs.webkit.org/show_bug.cgi?id=133074

Reviewed by Anders Carlsson.

* Resources/PlugInSandboxProfiles/com.apple.WebKit.plugin-common.sb:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@169052 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Images missing sometimes with composited clipping layers
https://bugs.webkit.org/show_bug.cgi?id=133065
<rdar://problem/15224559>

Reviewed by Beth Dakin.

Source/WebCore:

When support for solid colors on layers was added, a layer was considered a candidate
for the solid color optimization without regard to whether it had descendent layers
with "paintsIntoCompositedAncestor" requirements.

Fix hasVisibleNonCompositingDescendantLayers(), renaming it to isPaintDestinationForDescendentLayers()
and having it take into account whether descendent layers need to paint into an
ancestor.

Also, this test has to happen after those descendent layers have had their
compositing state updated, so move the isSimpleContainerCompositingLayer() to
a new updateAfterDescendents() function which is called from the various
places we do compositing-udpate-tree-walks.

Test: compositing/backing/solid-color-with-paints-into-ancestor.html

* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::updateGeometry):
(WebCore::RenderLayerBacking::updateAfterDescendents):
(WebCore::RenderLayerBacking::paintsChildren):
(WebCore::compositedWithOwnBackingStore):
(WebCore::descendentLayerPaintsIntoAncestor):
(WebCore::RenderLayerBacking::isPaintDestinationForDescendentLayers):
(WebCore::hasVisibleNonCompositingDescendant): Deleted.
(WebCore::RenderLayerBacking::hasVisibleNonCompositingDescendantLayers): Deleted.
* rendering/RenderLayerBacking.h:
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::rebuildCompositingLayerTree):
(WebCore::RenderLayerCompositor::updateLayerTreeGeometry):
(WebCore::RenderLayerCompositor::updateCompositingDescendantGeometry):

LayoutTests:

* compositing/backing/solid-color-with-paints-into-ancestor-expected.html: Added.
* compositing/backing/solid-color-with-paints-into-ancestor.html: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@169053 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Fix Element.offset* and .client* rounding mismatches after r168868.
https://bugs.webkit.org/show_bug.cgi?id=133076

Unreviewed gardening.


* platform/mac-wk2/tiled-drawing/fast-scroll-div-latched-div-with-handler.html:
* platform/mac-wk2/tiled-drawing/fast-scroll-div-latched-div.html:
* platform/mac-wk2/tiled-drawing/fast-scroll-div-latched-mainframe-with-handler.html:
* platform/mac-wk2/tiled-drawing/fast-scroll-div-latched-mainframe.html:
* platform/mac-wk2/tiled-drawing/fast-scroll-select-latched-mainframe-with-handler.html:
* platform/mac-wk2/tiled-drawing/fast-scroll-select-latched-mainframe.html:
* platform/mac-wk2/tiled-drawing/fast-scroll-select-latched-select-with-handler.html:
* platform/mac-wk2/tiled-drawing/fast-scroll-select-latched-select.html:


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