Bug 122282 - Move float logical location/dimension methods to RenderBlockFlow
Summary: Move float logical location/dimension methods to RenderBlockFlow
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Bem Jones-Bey
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-10-03 09:51 PDT by Bem Jones-Bey
Modified: 2013-10-09 17:34 PDT (History)
5 users (show)

See Also:


Attachments
Patch (46.37 KB, patch)
2013-10-03 10:22 PDT, Bem Jones-Bey
no flags Details | Formatted Diff | Diff
Patch (40.38 KB, patch)
2013-10-09 08:03 PDT, Bem Jones-Bey
no flags Details | Formatted Diff | Diff
Patch (41.44 KB, patch)
2013-10-09 16:43 PDT, Bem Jones-Bey
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Bem Jones-Bey 2013-10-03 09:51:54 PDT
Move float logical location/dimension methods to FloatingObjects
Comment 1 Bem Jones-Bey 2013-10-03 10:22:45 PDT
Created attachment 213273 [details]
Patch
Comment 2 Dave Hyatt 2013-10-03 10:29:07 PDT
Comment on attachment 213273 [details]
Patch

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

> Source/WebCore/rendering/FloatingObjects.h:152
> +    LayoutUnit logicalTopForFloat(const FloatingObject* floatingObject) const { return m_horizontalWritingMode ? floatingObject->y() : floatingObject->x(); }
> +    LayoutUnit logicalBottomForFloat(const FloatingObject* floatingObject) const { return m_horizontalWritingMode ? floatingObject->maxY() : floatingObject->maxX(); }
> +    LayoutUnit logicalLeftForFloat(const FloatingObject* floatingObject) const { return m_horizontalWritingMode ? floatingObject->x() : floatingObject->y(); }
> +    LayoutUnit logicalRightForFloat(const FloatingObject* floatingObject) const { return m_horizontalWritingMode ? floatingObject->maxX() : floatingObject->maxY(); }
> +    LayoutUnit logicalWidthForFloat(const FloatingObject* floatingObject) const { return m_horizontalWritingMode ? floatingObject->width() : floatingObject->height(); }
> +    LayoutUnit logicalHeightForFloat(const FloatingObject* floatingObject) const { return m_horizontalWritingMode ? floatingObject->height() : floatingObject->width(); }

You should add corresponding methods to RenderBlock. There's no reason to force callers to fetch floatingObjects() just to ask about a float. I think it's fine to add these methods here, but you should add wrappers in RenderBlock so that the call sites don't have to retrieve a floatingObjects().
Comment 3 Dave Hyatt 2013-10-03 10:30:18 PDT
Actually I guess RenderBlock methods wouldn't even have to call the floatingObjects methods, since a block obviously knows its own writing mode. I don't think these FloatingObjects methods should even exist. Just put them on RenderBlock instead.
Comment 4 Bem Jones-Bey 2013-10-09 08:03:29 PDT
Created attachment 213779 [details]
Patch

Move methods to RenderBlockFlow, now that m_floatingObjects is part of RenderBlockFlow.
Comment 5 Dave Hyatt 2013-10-09 16:12:57 PDT
Comment on attachment 213779 [details]
Patch

r=me
Comment 6 Bem Jones-Bey 2013-10-09 16:43:20 PDT
Created attachment 213833 [details]
Patch

rebase
Comment 7 WebKit Commit Bot 2013-10-09 17:34:08 PDT
Comment on attachment 213833 [details]
Patch

Clearing flags on attachment: 213833

Committed r157197: <http://trac.webkit.org/changeset/157197>
Comment 8 WebKit Commit Bot 2013-10-09 17:34:11 PDT
All reviewed patches have been landed.  Closing bug.