Bug 122282

Summary: Move float logical location/dimension methods to RenderBlockFlow
Product: WebKit Reporter: Bem Jones-Bey <bjonesbe>
Component: New BugsAssignee: Bem Jones-Bey <bjonesbe>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, esprehn+autocc, glenn, hyatt, kondapallykalyan
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch
none
Patch none

Bem Jones-Bey
Reported 2013-10-03 09:51:54 PDT
Move float logical location/dimension methods to FloatingObjects
Attachments
Patch (46.37 KB, patch)
2013-10-03 10:22 PDT, Bem Jones-Bey
no flags
Patch (40.38 KB, patch)
2013-10-09 08:03 PDT, Bem Jones-Bey
no flags
Patch (41.44 KB, patch)
2013-10-09 16:43 PDT, Bem Jones-Bey
no flags
Bem Jones-Bey
Comment 1 2013-10-03 10:22:45 PDT
Dave Hyatt
Comment 2 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().
Dave Hyatt
Comment 3 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.
Bem Jones-Bey
Comment 4 2013-10-09 08:03:29 PDT
Created attachment 213779 [details] Patch Move methods to RenderBlockFlow, now that m_floatingObjects is part of RenderBlockFlow.
Dave Hyatt
Comment 5 2013-10-09 16:12:57 PDT
Comment on attachment 213779 [details] Patch r=me
Bem Jones-Bey
Comment 6 2013-10-09 16:43:20 PDT
Created attachment 213833 [details] Patch rebase
WebKit Commit Bot
Comment 7 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>
WebKit Commit Bot
Comment 8 2013-10-09 17:34:11 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.