Bug 94146 - Remove dependency on RenderStyle from FractionalLayoutBoxExtent and LayoutBox
Summary: Remove dependency on RenderStyle from FractionalLayoutBoxExtent and LayoutBox
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Emil A Eklund
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-08-15 13:50 PDT by Emil A Eklund
Modified: 2012-08-23 09:22 PDT (History)
10 users (show)

See Also:


Attachments
Patch (39.48 KB, patch)
2012-08-15 15:48 PDT, Emil A Eklund
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Emil A Eklund 2012-08-15 13:50:11 PDT
FractionalLayoutBoxExtent and LayoutBox currently have a dependency on RenderStyle to resolve writing mode and directional. This breaks encapsulation and makes it hard to reuse the box classes.
Comment 1 Emil A Eklund 2012-08-15 15:48:45 PDT
Created attachment 158651 [details]
Patch
Comment 2 Emil A Eklund 2012-08-15 15:50:00 PDT
s/directional/directionality/
Comment 3 Emil A Eklund 2012-08-17 13:39:39 PDT
Simon, any chance you could take a look at this change?
Comment 4 Emil A Eklund 2012-08-22 09:43:14 PDT
Ping?
Comment 5 Eric Seidel (no email) 2012-08-22 11:57:41 PDT
Comment on attachment 158651 [details]
Patch

I think this is a fantastic change.
Comment 6 WebKit Review Bot 2012-08-22 12:01:04 PDT
Comment on attachment 158651 [details]
Patch

Rejecting attachment 158651 [details] from commit-queue.

Failed to run "['/mnt/git/webkit-commit-queue/Tools/Scripts/webkit-patch', '--status-host=queues.webkit.org', '-..." exit_code: 2

Last 500 characters of output:
at 3145 (offset 5 lines).
Hunk #4 succeeded at 3306 (offset 5 lines).
patching file Source/WebCore/rendering/RenderBox.h
Hunk #1 succeeded at 234 (offset 4 lines).
patching file Source/WebCore/rendering/style/RenderStyle.h
Hunk #2 succeeded at 725 (offset 7 lines).
patching file Source/WebCore/rendering/style/RenderStyleConstants.h

Failed to run "[u'/mnt/git/webkit-commit-queue/Tools/Scripts/svn-apply', u'--force', u'--reviewer', u'Eric Seidel']" exit_code: 1 cwd: /mnt/git/webkit-commit-queue/

Full output: http://queues.webkit.org/results/13570324
Comment 7 Julien Chaffraix 2012-08-22 12:33:18 PDT
Comment on attachment 158651 [details]
Patch

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

Thanks for fixing this platform violation.

> Source/WebCore/ChangeLog:54
> +        Change methods to take a WirtingMode parameter instead of a RenderStyle pointer.

Typo: WritingMode

> Source/WebCore/rendering/style/RenderStyleConstants.h:-136
> -};

Nit: May be good to leave some comment about where to find WritingMode's definition, especially since we don't include it here.
Comment 8 Emil A Eklund 2012-08-23 09:21:48 PDT
Committed r126437: <http://trac.webkit.org/changeset/126437>