Bug 94366

Summary: Move transformFriendlyBoundingBox out of Range
Product: WebKit Reporter: Leandro Graciá Gil <leandrogracia>
Component: HTML EditingAssignee: Leandro Graciá Gil <leandrogracia>
Status: RESOLVED FIXED    
Severity: Normal CC: abarth, eric, rniwa, simon.fraser, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch rniwa: review+, rniwa: commit-queue+

Description Leandro Graciá Gil 2012-08-17 11:09:44 PDT
Bug 93111 introduced a new method in Range called transformFriendlyBoundingBox. However, these methods should be moved out of Range in order to attach as much as possible to the DOM specification. This patch moves this functionality to a static method in RenderView. It also updates the code making using of such method.
Comment 1 Leandro Graciá Gil 2012-08-17 11:39:07 PDT
Created attachment 159169 [details]
Patch
Comment 2 Leandro Graciá Gil 2012-08-17 11:41:08 PDT
Comment on attachment 159169 [details]
Patch

I suggest using RenderObject instead of RenderView as it implements a very similar method called absoluteBoundingBoxRect.
Comment 3 Ryosuke Niwa 2012-08-17 16:52:31 PDT
I'd like to hear smfr's opinion here.
Comment 4 Simon Fraser (smfr) 2012-08-20 11:18:50 PDT
Comment on attachment 159169 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=159169&action=review

Looks good.

> Source/WebCore/rendering/RenderObject.h:714
> +    static FloatRect absoluteBoundingBoxRectForRange(Range*);

Can that be a const Range*?
Comment 5 Leandro Graciá Gil 2012-08-20 14:21:41 PDT
Created attachment 159519 [details]
Patch
Comment 6 Leandro Graciá Gil 2012-08-20 14:22:02 PDT
Comment on attachment 159169 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=159169&action=review

>> Source/WebCore/rendering/RenderObject.h:714
>> +    static FloatRect absoluteBoundingBoxRectForRange(Range*);
> 
> Can that be a const Range*?

Fixed.
Comment 7 Ryosuke Niwa 2012-08-20 14:36:39 PDT
Comment on attachment 159519 [details]
Patch

I'll land this manually.
Comment 8 Ryosuke Niwa 2012-08-20 14:41:09 PDT
Committed r126074: <http://trac.webkit.org/changeset/126074>