[New Multicolumn] Add support for offsetLeft and offsetTop.
authorhyatt@apple.com <hyatt@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 25 Apr 2014 16:21:38 +0000 (16:21 +0000)
committerhyatt@apple.com <hyatt@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 25 Apr 2014 16:21:38 +0000 (16:21 +0000)
commit5ca90e8089a5bbb55e38f1a1049ca2a42ddad6de
tree957fa8515ec09f23584cef8602332eafa169ac40
parent84126ac471a38247b5f7811b167ecd1dbfb7e177
[New Multicolumn] Add support for offsetLeft and offsetTop.
https://bugs.webkit.org/show_bug.cgi?id=132080

Reviewed by Andrei Bucur.

Source/WebCore:
Added fast/multicol/client-spanners-complex.html and offset-top-left.html

* rendering/RenderBoxModelObject.cpp:
(WebCore::RenderBoxModelObject::adjustedPositionRelativeToOffsetParent):
Patch the offsetLeft/Top loop to handle calling into RenderMultiColumnFlowThread
in order to adjust the coordinates for the new multicolumn layout.

* rendering/RenderMultiColumnFlowThread.cpp:
(WebCore::RenderMultiColumnFlowThread::mapFromFlowToRegion):
Modified to use a helper that can be shared by offsetLeft/Top code. This code
ran for client rects, and I'm moving/refactoring it for more sharing.

(WebCore::RenderMultiColumnFlowThread::physicalTranslationOffsetFromFlowToRegion):
(WebCore::RenderMultiColumnFlowThread::physicalTranslationFromFlowToRegion):
* rendering/RenderMultiColumnFlowThread.h:
New functions that beef up what was in mapFromFlowToRegion and fix some bugs
with the translation code.

* rendering/RenderMultiColumnSet.cpp:
(WebCore::RenderMultiColumnSet::columnTranslationForOffset):
Patched to factor in the flow thread portion rect of the specific multicolumn set.

* rendering/RenderObject.h:
(WebCore::RenderObject::isRenderMultiColumnFlowThread):
Added for toRenderMultiColumnFlowThread capability.

LayoutTests:
* fast/multicol/client-rects-spanners-complex.html: Added.
* fast/multicol/client-rects-spanners.html:
* fast/multicol/offset-top-left-expected.txt: Added.
* fast/multicol/offset-top-left.html: Added.
* platform/mac/fast/multicol/client-rects-spanners-complex-expected.png: Added.
* platform/mac/fast/multicol/client-rects-spanners-complex-expected.txt: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@167808 268f45cc-cd09-0410-ab3c-d52691b4dbfc
12 files changed:
LayoutTests/ChangeLog
LayoutTests/fast/multicol/client-rects-spanners-complex.html [new file with mode: 0644]
LayoutTests/fast/multicol/offset-top-left-expected.txt [new file with mode: 0644]
LayoutTests/fast/multicol/offset-top-left.html [new file with mode: 0644]
LayoutTests/platform/mac/fast/multicol/client-rects-spanners-complex-expected.png [new file with mode: 0644]
LayoutTests/platform/mac/fast/multicol/client-rects-spanners-complex-expected.txt [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/rendering/RenderBoxModelObject.cpp
Source/WebCore/rendering/RenderMultiColumnFlowThread.cpp
Source/WebCore/rendering/RenderMultiColumnFlowThread.h
Source/WebCore/rendering/RenderMultiColumnSet.cpp
Source/WebCore/rendering/RenderObject.h