[Webkit-unassigned] [Bug 41163] Need ability to get rendered rectangle.
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Thu Jun 24 10:20:55 PDT 2010
https://bugs.webkit.org/show_bug.cgi?id=41163
Sam Weinig <sam at webkit.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #59666|review? |review-
Flag| |
--- Comment #2 from Sam Weinig <sam at webkit.org> 2010-06-24 10:20:56 PST ---
(From update of attachment 59666)
>
> @interface DOMNode (WebDOMNodeOperationsPendingPublic)
> -- (NSString *)markupString;
> +- (CGRect)_renderRect:(bool *)isReplaced;
We should not remove markupString in this patch. If we want to do it it should be done in a subsequent patch.
> + at implementation DOMNode (WebDOMNodeOperationsPendingPublic)
> +
> +- (CGRect)_renderRect:(bool *)isReplaced
> +{
> + return CGRect(core(self)->renderRect(isReplaced));
This should return a NSRect instead of a CGRect since this is an Objective-C API.
> +IntRect Node::renderRect(bool* isReplaced)
> +{
> + IntRect rect(0, 0, 0, 0);
> +
> + RenderObject* hitRenderer = this->renderer();
> + ASSERT(hitRenderer);
> + RenderObject* renderer = hitRenderer;
> + while (renderer && !renderer->isBody() && !renderer->isRoot()) {
> + if (renderer->isRenderBlock() || renderer->isInlineBlockOrInlineTable() || renderer->isReplaced()) {
> + *isReplaced = renderer->isReplaced();
> + return renderer->absoluteBoundingBoxRect(true);
> + }
> + renderer = renderer->parent();
> + }
> + return rect;
This should just be return IntRect(). You can remove the rect declaration at the top.
r-. Lets iterate on this.
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list