Bug 60739

Summary: Switch paintCollapsedBorder to use IntRect
Product: WebKit Reporter: Levi Weintraub <leviw>
Component: Layout and RenderingAssignee: Levi Weintraub <leviw>
Status: RESOLVED FIXED    
Severity: Normal CC: darin, dglazkov, eae, eric, gustavo.noronha, gustavo, simon.fraser, webkit.review.bot, xan.lopez
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 60318    
Attachments:
Description Flags
Patch
none
Patch
none
Patch none

Description Levi Weintraub 2011-05-12 17:17:41 PDT
It currently takes four ints representing a rect. This is the *last* function with this bad signature! :)
Comment 1 Levi Weintraub 2011-05-12 17:22:19 PDT
Created attachment 93372 [details]
Patch
Comment 2 Levi Weintraub 2011-05-12 17:23:37 PDT
Comment on attachment 93372 [details]
Patch

Oops, made a mistake :p
Comment 3 Early Warning System Bot 2011-05-12 17:32:12 PDT
Comment on attachment 93372 [details]
Patch

Attachment 93372 [details] did not pass qt-ews (qt):
Output: http://queues.webkit.org/results/8688895
Comment 4 WebKit Review Bot 2011-05-12 17:44:46 PDT
Comment on attachment 93372 [details]
Patch

Attachment 93372 [details] did not pass chromium-ews (chromium-xvfb):
Output: http://queues.webkit.org/results/8687849
Comment 5 WebKit Review Bot 2011-05-12 17:48:51 PDT
Comment on attachment 93372 [details]
Patch

Attachment 93372 [details] did not pass mac-ews (mac):
Output: http://queues.webkit.org/results/8688903
Comment 6 WebKit Review Bot 2011-05-12 18:06:41 PDT
Comment on attachment 93372 [details]
Patch

Attachment 93372 [details] did not pass cr-mac-ews (chromium):
Output: http://queues.webkit.org/results/8687872
Comment 7 Collabora GTK+ EWS bot 2011-05-12 18:13:37 PDT
Comment on attachment 93372 [details]
Patch

Attachment 93372 [details] did not pass gtk-ews (gtk):
Output: http://queues.webkit.org/results/8685931
Comment 8 Levi Weintraub 2011-05-12 18:48:19 PDT
Created attachment 93386 [details]
Patch
Comment 9 Eric Seidel (no email) 2011-05-12 18:56:48 PDT
Comment on attachment 93386 [details]
Patch

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

I don't think the adjustedPaintRect change is a ncessarily a win.

> Source/WebCore/rendering/RenderTableCell.cpp:931
> +    IntRect adjustedPaintRect = IntRect(paintRect.x() - leftWidth / 2,

You don't have to do an equal here, you can just construct directly.  Webkit doesn't normally do cascading indents like this though.

> Source/WebCore/rendering/RenderTableCell.cpp:952
> +    borders.addBorder(topVal, BSTop, renderTop, adjustedPaintRect.x(), adjustedPaintRect.y(), adjustedPaintRect.maxX(), adjustedPaintRect.y() + topWidth, topStyle);
> +    borders.addBorder(bottomVal, BSBottom, renderBottom, adjustedPaintRect.x(), adjustedPaintRect.maxY() - bottomWidth, adjustedPaintRect.maxX(), adjustedPaintRect.maxY(), bottomStyle);
> +    borders.addBorder(leftVal, BSLeft, renderLeft, adjustedPaintRect.x(), adjustedPaintRect.y(), adjustedPaintRect.x() + leftWidth, adjustedPaintRect.maxY(), leftStyle);
> +    borders.addBorder(rightVal, BSRight, renderRight, adjustedPaintRect.maxX() - rightWidth, adjustedPaintRect.y(), adjustedPaintRect.maxX(), adjustedPaintRect.maxY(), rightStyle);

Seems like making the locals above might make this more clear?  Unleass you plan to actually use the adjustedPaintRect as an object somewhere?
Comment 10 Levi Weintraub 2011-05-13 11:05:37 PDT
Created attachment 93484 [details]
Patch
Comment 11 Eric Seidel (no email) 2011-05-13 11:11:46 PDT
Comment on attachment 93484 [details]
Patch

LGTM.
Comment 12 Levi Weintraub 2011-05-13 11:21:15 PDT
Comment on attachment 93484 [details]
Patch

Clearing flags on attachment: 93484

Committed r86449: <http://trac.webkit.org/changeset/86449>
Comment 13 Levi Weintraub 2011-05-13 11:21:19 PDT
All reviewed patches have been landed.  Closing bug.
Comment 14 Levi Weintraub 2011-05-13 11:22:07 PDT
(In reply to comment #11)
> (From update of attachment 93484 [details])
> LGTM.

Thanks for the review!