Bug 83138

Summary: DOM measurement APIs should operate on pixel snapped values.
Product: WebKit Reporter: Levi Weintraub <leviw>
Component: Layout and RenderingAssignee: Levi Weintraub <leviw>
Status: RESOLVED FIXED    
Severity: Normal CC: eae, eric, jchaffraix, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 60318    
Attachments:
Description Flags
Patch
none
Patch for landing none

Description Levi Weintraub 2012-04-04 03:44:59 PDT
These APIs are defined to be integers, so we should use the actual rendered integers when returning values to JS.
Comment 1 Levi Weintraub 2012-04-04 04:03:41 PDT
Created attachment 135550 [details]
Patch
Comment 2 Julien Chaffraix 2012-04-04 14:51:02 PDT
Comment on attachment 135550 [details]
Patch

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

> Source/WebCore/dom/Element.cpp:351
>      if (RenderBoxModelObject* rend = renderBoxModelObject())

Let's remove those abreviations (not repeated on all the other changes) while at it: renderBoxModelObject would be my favorite but at least renderer would be OK.

(note that also most of this logic could use const RenderObject's but that's another - definitely bug-worthy - story)
Comment 3 Levi Weintraub 2012-04-05 04:19:52 PDT
Comment on attachment 135550 [details]
Patch

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

>> Source/WebCore/dom/Element.cpp:351
>>      if (RenderBoxModelObject* rend = renderBoxModelObject())
> 
> Let's remove those abreviations (not repeated on all the other changes) while at it: renderBoxModelObject would be my favorite but at least renderer would be OK.
> 
> (note that also most of this logic could use const RenderObject's but that's another - definitely bug-worthy - story)

Done and done! Good point and thanks for the review :)
Comment 4 Levi Weintraub 2012-04-05 04:43:17 PDT
Created attachment 135804 [details]
Patch for landing
Comment 5 WebKit Review Bot 2012-04-05 05:49:39 PDT
Comment on attachment 135804 [details]
Patch for landing

Clearing flags on attachment: 135804

Committed r113317: <http://trac.webkit.org/changeset/113317>
Comment 6 WebKit Review Bot 2012-04-05 05:49:44 PDT
All reviewed patches have been landed.  Closing bug.