LLINT loadisFromInstruction doesn't need special case for big endians
https://bugs.webkit.org/show_bug.cgi?id=132330

Patch by Tomas Popela <tpopela@redhat.com> on 2014-04-29
Reviewed by Mark Lam.

The change introduced in r167076 was wrong. We should not apply the offset
adjustment on loadisFromInstruction usage as the instruction
(UnlinkedInstruction) is declared as an union (i.e. with the int32_t
operand variable). The offset of the other union members will be the
same as the offset of the first one, that is 0. The behavior here is the
same on little and big endian architectures. Thus we don't need
special case for big endians.

* llint/LowLevelInterpreter.asm:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@167929 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[CSS Regions] Fix getClientRects() for content nodes
https://bugs.webkit.org/show_bug.cgi?id=117407

Reviewed by David Hyatt.

Source/WebCore:
This patch modifies getClientRects() to return a list of fragments
for a fragmented box instead of a single rectangle positioned inside
the region where the box center would appear.

The approach is to split the border box of the element in regions using
the layout positioning. Then each fragment is mapped to the view coordinates
and the result added to the list of rectangles. To preserve the originating
region when mapping the fragment through the ancestor tree I've introduced
the concept of a current region. The current region is stored inside a
CurrentRenderRegionMaintainer object, created whenever an algorithm needing
it needs to run. When the maintainer is destroyed, the cleanup is made
automatically. The RenderFlowThread holds a pointer to this structure for
easy access.

Tests: fast/regions/cssom/client-rects-fixed-content.html
       fast/regions/cssom/client-rects-forced-breaks.html
       fast/regions/cssom/client-rects-inline-complex.html
       fast/regions/cssom/client-rects-inline.html
       fast/regions/cssom/client-rects-nested-regions.html
       fast/regions/cssom/client-rects-positioned.html
       fast/regions/cssom/client-rects-relative-position.html
       fast/regions/cssom/client-rects-simple-block.html
       fast/regions/cssom/client-rects-transforms.html
       fast/regions/cssom/client-rects-unsplittable-float.html

* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::absoluteQuads): Split the box in fragments.
* rendering/RenderBox.cpp:
(WebCore::RenderBox::absoluteQuads): Split the box in fragments.
* rendering/RenderFlowThread.cpp:
(WebCore::RenderFlowThread::RenderFlowThread):
(WebCore::RenderFlowThread::mapFromFlowToRegion):
(WebCore::RenderFlowThread::mapLocalToContainer):
(WebCore::RenderFlowThread::currentRegion):
* rendering/RenderFlowThread.h:
* rendering/RenderNamedFlowFragment.cpp:
(WebCore::RenderNamedFlowFragment::absoluteQuadsForBoxInRegion): Get
the fragments for this box in the region.
* rendering/RenderNamedFlowFragment.h:
* rendering/RenderNamedFlowThread.cpp:
(WebCore::RenderNamedFlowThread::absoluteQuadsForBox): Virtual function
that can be used to implement fragments to client rects mapping.
* rendering/RenderNamedFlowThread.h:
* rendering/RenderRegion.cpp:
(WebCore::RenderRegion::rectFlowPortionForBox): Small change to correctly
map empty rectangles to containers.
(WebCore::CurrentRenderRegionMaintainer::CurrentRenderRegionMaintainer):
(WebCore::CurrentRenderRegionMaintainer::~CurrentRenderRegionMaintainer):
* rendering/RenderRegion.h:
(WebCore::RenderRegion::absoluteQuadsForBoxInRegion):
(WebCore::CurrentRenderRegionMaintainer::region):

LayoutTests:
Tests verifying getClientRects works correctly in different situations.

* fast/regions/cssom/client-rects-fixed-content-expected.txt: Added.
* fast/regions/cssom/client-rects-fixed-content.html: Added.
* fast/regions/cssom/client-rects-forced-breaks-expected.txt: Added.
* fast/regions/cssom/client-rects-forced-breaks.html: Added.
* fast/regions/cssom/client-rects-inline-complex-expected.txt: Added.
* fast/regions/cssom/client-rects-inline-complex.html: Added.
* fast/regions/cssom/client-rects-inline-expected.txt: Added.
* fast/regions/cssom/client-rects-inline.html: Added.
* fast/regions/cssom/client-rects-nested-regions-expected.txt: Added.
* fast/regions/cssom/client-rects-nested-regions.html: Added.
* fast/regions/cssom/client-rects-positioned-expected.txt: Added.
* fast/regions/cssom/client-rects-positioned.html: Added.
* fast/regions/cssom/client-rects-relative-position-expected.txt: Added.
* fast/regions/cssom/client-rects-relative-position.html: Added.
* fast/regions/cssom/client-rects-simple-block-expected.txt: Added.
* fast/regions/cssom/client-rects-simple-block.html: Added.
* fast/regions/cssom/client-rects-transforms-expected.txt: Added.
* fast/regions/cssom/client-rects-transforms.html: Added.
* fast/regions/cssom/client-rects-unsplittable-float-expected.txt: Added.
* fast/regions/cssom/client-rects-unsplittable-float.html: Added.
* fast/regions/resources/helper.js:
(testClientRects): Function that compares the actual client rects for an
element to a list of expected client rects.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@167930 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[CSS Shapes] shape-outside polygon fails when first vertex is 0,0
https://bugs.webkit.org/show_bug.cgi?id=132132

Reviewed by Bem Jones-Bey.

Source/WebCore:
ShapeInterval now distinguishes between x1==x2 - isEmpty() and x1,x2 haven't been
set yet - isUndefined(). Removed the ShapeInterval setX1() and setX2() methods, since
they're no longer used.

The polygon algorithm for computing excluded intervals now ignores horizontal
edges. It also ignores edges whose lower vertex matches the top of the line, if
the edge's Y direction is upwards (away from the top of the line). The rationale
for this was explained here:
http://hansmuller-webkit.blogspot.com/2012/11/revised-horizontal-box-algorithm.html

Test: fast/shapes/shape-outside-floats/shape-outside-polygon-zero-vertex.html

* rendering/shapes/PolygonShape.cpp:
(WebCore::OffsetPolygonEdge::clippedEdgeXRange):
(WebCore::PolygonShape::getExcludedIntervals):
* rendering/shapes/ShapeInterval.h:
(WebCore::ShapeInterval::ShapeInterval):
(WebCore::ShapeInterval::isUndefined):
(WebCore::ShapeInterval::x1):
(WebCore::ShapeInterval::x2):
(WebCore::ShapeInterval::width):
(WebCore::ShapeInterval::isEmpty):
(WebCore::ShapeInterval::setX1):
(WebCore::ShapeInterval::setX2):
(WebCore::ShapeInterval::overlaps):
(WebCore::ShapeInterval::contains):
(WebCore::ShapeInterval::unite):

LayoutTests:
* fast/shapes/shape-outside-floats/shape-outside-polygon-zero-vertex-expected.html: Added.
* fast/shapes/shape-outside-floats/shape-outside-polygon-zero-vertex.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@167931 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Generate Eclipse project + ninja build for GTK+ if Eclipse in available in the PATH
https://bugs.webkit.org/show_bug.cgi?id=132190

Patch by Enrique Ocaña González <eocanha@igalia.com> on 2014-04-29
Reviewed by Gustavo Noronha Silva.

* Scripts/webkitdirs.pm:
(canUseEclipse): Test if Eclipse is in the path. This is the same method used to test
    if ninja is in the path.
(generateBuildSystemFromCMakeProject): Use the eclipse generator if possible, fallback
    to the previous ninja generator if not.

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