Bug 21941 - [Transforms] RenderObject::absolutePosition() needs to be made transform-aware
Summary: [Transforms] RenderObject::absolutePosition() needs to be made transform-aware
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: 528+ (Nightly build)
Hardware: Mac OS X 10.5
: P2 Normal
Assignee: Simon Fraser (smfr)
Depends on:
Blocks: 15670 21870 21906
  Show dependency treegraph
Reported: 2008-10-28 18:08 PDT by Simon Fraser (smfr)
Modified: 2008-11-04 10:55 PST (History)
2 users (show)

See Also:

Testcase to exercise most of the absolutePosition code paths (5.94 KB, text/html)
2008-10-30 21:21 PDT, Simon Fraser (smfr)
no flags Details
First cut patch (54.83 KB, patch)
2008-10-30 21:41 PDT, Simon Fraser (smfr)
no flags Details | Formatted Diff | Diff
Patch, changelog (69.22 KB, patch)
2008-10-31 15:22 PDT, Simon Fraser (smfr)
no flags Details | Formatted Diff | Diff
Patch, changelog (68.23 KB, patch)
2008-11-03 21:37 PST, Simon Fraser (smfr)
no flags Details | Formatted Diff | Diff
Patch with newlines (68.23 KB, patch)
2008-11-04 09:56 PST, Simon Fraser (smfr)
hyatt: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Simon Fraser (smfr) 2008-10-28 18:08:53 PDT
The absolutePosition() method knows nothing about transforms, and gives the wrong answer for elements with transforms. This needs to be fixed.
Comment 1 Simon Fraser (smfr) 2008-10-30 21:21:57 PDT
Created attachment 24791 [details]
Testcase to exercise most of the absolutePosition code paths
Comment 2 Simon Fraser (smfr) 2008-10-30 21:41:33 PDT
Created attachment 24793 [details]
First cut patch
Comment 3 Simon Fraser (smfr) 2008-10-31 15:22:26 PDT
Created attachment 24820 [details]
Patch, changelog
Comment 4 Simon Fraser (smfr) 2008-10-31 15:24:23 PDT
I ran the PLT with and without the patch; no measurable performance impact.
Comment 5 Dave Hyatt 2008-10-31 15:26:48 PDT
Comment on attachment 24820 [details]
Patch, changelog

Can localToAbsolute have = FloatPoint() as the default argument?  (I can't remember if you can construct objects as default arguments or not.)
Comment 6 Simon Fraser (smfr) 2008-11-03 21:37:09 PST
Created attachment 24883 [details]
Patch, changelog
Comment 7 Simon Fraser (smfr) 2008-11-04 09:56:58 PST
Created attachment 24886 [details]
Patch with newlines
Comment 8 Dave Hyatt 2008-11-04 10:27:05 PST
Comment on attachment 24886 [details]
Patch with newlines

Rename addScrolledOffset/subtractScrolledOffset to be addScrolledContentOffset/subtractScrolledContentOffset to match your new method.

Comment 9 Simon Fraser (smfr) 2008-11-04 10:46:34 PST
Filed bug 22064 to clean up addScrolledContentOffset/subtractScrolledContentOffset/scrolledContentOffset
Comment 10 Simon Fraser (smfr) 2008-11-04 10:55:07 PST
Committed r38098
	M	WebKit/mac/ChangeLog
	M	WebKit/mac/WebView/WebRenderNode.mm
	M	WebCore/platform/graphics/FloatPoint.h
	M	WebCore/platform/graphics/IntSize.h
	M	WebCore/svg/SVGSVGElement.cpp
	M	WebCore/html/HTMLInputElement.cpp
	M	WebCore/html/HTMLImageElement.cpp
	M	WebCore/html/HTMLAreaElement.cpp
	M	WebCore/html/HTMLAnchorElement.cpp
	M	WebCore/html/HTMLInputElement.h
	M	WebCore/rendering/RenderPart.cpp
	M	WebCore/rendering/RenderObject.cpp
	M	WebCore/rendering/RenderTableCell.cpp
	M	WebCore/rendering/RenderBox.h
	M	WebCore/rendering/RenderFlow.cpp
	M	WebCore/rendering/RenderObject.h
	M	WebCore/rendering/RenderLayer.cpp
	M	WebCore/rendering/RenderSVGInlineText.cpp
	M	WebCore/rendering/RenderListMarker.cpp
	M	WebCore/rendering/RenderText.cpp
	M	WebCore/rendering/RenderBox.cpp
	M	WebCore/rendering/RenderBlock.cpp
	M	WebCore/rendering/RenderWidget.cpp
	M	WebCore/rendering/RenderView.cpp
	M	WebCore/rendering/LayoutState.cpp
	M	WebCore/rendering/RenderContainer.cpp
	M	WebCore/rendering/RenderListBox.cpp
	M	WebCore/rendering/RenderSVGText.cpp
	M	WebCore/rendering/RenderReplaced.cpp
	M	WebCore/rendering/RenderView.h
	M	WebCore/rendering/RenderLayer.h
	M	WebCore/rendering/RenderVideo.cpp
	M	WebCore/rendering/RenderTableCell.h
	M	WebCore/dom/ContainerNode.cpp
	M	WebCore/dom/Node.cpp
	M	WebCore/dom/MouseRelatedEvent.cpp
	M	WebCore/dom/ContainerNode.h
	M	WebCore/editing/visible_units.cpp
	M	WebCore/editing/SelectionController.cpp
	M	WebCore/ChangeLog
	M	WebCore/WebCore.base.exp
	M	WebCore/page/AccessibilityRenderObject.cpp
	M	WebCore/page/EventHandler.cpp
r38098 = c65d3288003ff07697e37bc5b28bf517124d89b0 (trunk)