WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
41163
Need ability to get rendered rectangle.
https://bugs.webkit.org/show_bug.cgi?id=41163
Summary
Need ability to get rendered rectangle.
Damian Kaleta
Reported
2010-06-24 09:21:34 PDT
Need ability to get rendered rectangle.
Attachments
propose patch
(4.11 KB, patch)
2010-06-24 10:00 PDT
,
Damian Kaleta
sam
: review-
Details
Formatted Diff
Diff
propose patch
(4.18 KB, patch)
2010-06-24 10:51 PDT
,
Damian Kaleta
sam
: review+
eric
: commit-queue+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Damian Kaleta
Comment 1
2010-06-24 10:00:15 PDT
Created
attachment 59666
[details]
propose patch
Sam Weinig
Comment 2
2010-06-24 10:20:56 PDT
Comment on
attachment 59666
[details]
propose patch
> > @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.
> +@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.
Damian Kaleta
Comment 3
2010-06-24 10:51:30 PDT
Created
attachment 59677
[details]
propose patch
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug