Bug 93050 - Remove LayoutTypes abstraction
Summary: Remove LayoutTypes abstraction
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Platform (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Emil A Eklund
URL:
Keywords:
Depends on: 93037
Blocks:
  Show dependency treegraph
 
Reported: 2012-08-02 17:02 PDT by Emil A Eklund
Modified: 2012-11-07 16:37 PST (History)
28 users (show)

See Also:


Attachments
Patch (385.47 KB, patch)
2012-11-05 13:46 PST, Emil A Eklund
no flags Details | Formatted Diff | Diff
Patch (385.26 KB, patch)
2012-11-05 14:27 PST, Emil A Eklund
no flags Details | Formatted Diff | Diff
Patch (385.68 KB, patch)
2012-11-05 16:18 PST, Emil A Eklund
no flags Details | Formatted Diff | Diff
Patch (381.54 KB, patch)
2012-11-06 13:42 PST, Emil A Eklund
no flags Details | Formatted Diff | Diff
Patch (381.55 KB, patch)
2012-11-06 15:13 PST, Emil A Eklund
no flags Details | Formatted Diff | Diff
Patch (383.39 KB, patch)
2012-11-07 08:36 PST, 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-02 17:02:38 PDT
LayoutTypes.h acts as an abstraction for types mapping LayoutRect/Point/Size to IntRect/Point/Size or FractionalLayoutRect/Point/Size. This abstraction should be removed now that all platforms use the FractionalLayout version (albeit with different fractions).
Comment 1 Emil A Eklund 2012-11-05 13:46:23 PST
Created attachment 172394 [details]
Patch
Comment 2 WebKit Review Bot 2012-11-05 13:50:54 PST
Attachment 172394 [details] did not pass style-queue:

Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WebCore/CMakeLists.txt', u'Source/W..." exit_code: 1
Source/WebCore/platform/graphics/LayoutRect.h:215:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
Source/WebCore/platform/LayoutUnit.h:191:  wtf_ceil is incorrectly named. Don't use underscores in your identifier names.  [readability/naming/underscores] [4]
Source/WebCore/platform/graphics/LayoutRect.cpp:38:  Use 'using namespace std;' instead of 'using std::max;'.  [build/using_std] [4]
Source/WebCore/platform/graphics/LayoutRect.cpp:39:  Use 'using namespace std;' instead of 'using std::min;'.  [build/using_std] [4]
Source/WebCore/platform/graphics/LayoutBoxExtent.cpp:187:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
Source/WebCore/platform/graphics/LayoutBoxExtent.cpp:193:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
Total errors found: 6 in 125 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 3 Levi Weintraub 2012-11-05 13:57:13 PST
Comment on attachment 172394 [details]
Patch

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

> Source/WebCore/rendering/RenderBox.cpp:366
> +    return clientWidth() - min(LayoutUnit(0), layoutOverflowRect().x() - borderLeft());

Why not just LayoutUnit()?
Comment 4 Early Warning System Bot 2012-11-05 14:02:38 PST
Comment on attachment 172394 [details]
Patch

Attachment 172394 [details] did not pass qt-ews (qt):
Output: http://queues.webkit.org/results/14726747
Comment 5 Early Warning System Bot 2012-11-05 14:05:14 PST
Comment on attachment 172394 [details]
Patch

Attachment 172394 [details] did not pass qt-wk2-ews (qt):
Output: http://queues.webkit.org/results/14675328
Comment 6 WebKit Review Bot 2012-11-05 14:26:46 PST
Comment on attachment 172394 [details]
Patch

Attachment 172394 [details] did not pass chromium-ews (chromium-xvfb):
Output: http://queues.webkit.org/results/14745206
Comment 7 Emil A Eklund 2012-11-05 14:27:59 PST
Created attachment 172408 [details]
Patch
Comment 8 WebKit Review Bot 2012-11-05 14:32:07 PST
Attachment 172408 [details] did not pass style-queue:

Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WebCore/CMakeLists.txt', u'Source/W..." exit_code: 1
Source/WebCore/platform/graphics/LayoutRect.h:215:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
Source/WebCore/platform/LayoutUnit.h:191:  wtf_ceil is incorrectly named. Don't use underscores in your identifier names.  [readability/naming/underscores] [4]
Source/WebCore/platform/graphics/LayoutRect.cpp:38:  Use 'using namespace std;' instead of 'using std::max;'.  [build/using_std] [4]
Source/WebCore/platform/graphics/LayoutRect.cpp:39:  Use 'using namespace std;' instead of 'using std::min;'.  [build/using_std] [4]
Source/WebCore/platform/graphics/LayoutBoxExtent.cpp:187:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
Source/WebCore/platform/graphics/LayoutBoxExtent.cpp:193:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
Total errors found: 6 in 125 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 9 Emil A Eklund 2012-11-05 14:51:49 PST
(In reply to comment #3)
> (From update of attachment 172394 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=172394&action=review
> 
> > Source/WebCore/rendering/RenderBox.cpp:366
> > +    return clientWidth() - min(LayoutUnit(0), layoutOverflowRect().x() - borderLeft());
> 
> Why not just LayoutUnit()?

No reason, expanded the ZERO_LAYOUT_UNIT define which was LayoutUnit(0). Changed to LayoutUnit().
Comment 10 EFL EWS Bot 2012-11-05 15:27:31 PST
Comment on attachment 172408 [details]
Patch

Attachment 172408 [details] did not pass efl-ews (efl):
Output: http://queues.webkit.org/results/14682292
Comment 11 Build Bot 2012-11-05 16:08:13 PST
Comment on attachment 172408 [details]
Patch

Attachment 172408 [details] did not pass mac-ews (mac):
Output: http://queues.webkit.org/results/14690297
Comment 12 WebKit Review Bot 2012-11-05 16:13:12 PST
Comment on attachment 172408 [details]
Patch

Attachment 172408 [details] did not pass chromium-ews (chromium-xvfb):
Output: http://queues.webkit.org/results/14728695
Comment 13 Emil A Eklund 2012-11-05 16:14:59 PST
r133536 added a new dependency on LayoutTypes.h (which is why the mac and cr-linux bots fails), will upload a new patch momentarily.
Comment 14 Emil A Eklund 2012-11-05 16:18:25 PST
Created attachment 172430 [details]
Patch
Comment 15 WebKit Review Bot 2012-11-05 16:29:10 PST
Attachment 172430 [details] did not pass style-queue:

Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WebCore/CMakeLists.txt', u'Source/W..." exit_code: 1
Source/WebCore/platform/graphics/LayoutRect.h:215:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
Source/WebCore/platform/LayoutUnit.h:191:  wtf_ceil is incorrectly named. Don't use underscores in your identifier names.  [readability/naming/underscores] [4]
Source/WebCore/platform/graphics/LayoutRect.cpp:38:  Use 'using namespace std;' instead of 'using std::max;'.  [build/using_std] [4]
Source/WebCore/platform/graphics/LayoutRect.cpp:39:  Use 'using namespace std;' instead of 'using std::min;'.  [build/using_std] [4]
Source/WebCore/platform/graphics/LayoutBoxExtent.cpp:187:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
Source/WebCore/platform/graphics/LayoutBoxExtent.cpp:193:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
Total errors found: 6 in 126 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 16 Emil A Eklund 2012-11-05 16:30:02 PST
The style failure is to be expected, the other bots should all pass assuming they run before anyone else adds a new dependency...
Comment 17 EFL EWS Bot 2012-11-05 20:47:13 PST
Comment on attachment 172430 [details]
Patch

Attachment 172430 [details] did not pass efl-ews (efl):
Output: http://queues.webkit.org/results/14755036
Comment 18 EFL EWS Bot 2012-11-05 21:16:40 PST
Comment on attachment 172430 [details]
Patch

Attachment 172430 [details] did not pass efl-ews (efl):
Output: http://queues.webkit.org/results/14665446
Comment 19 Build Bot 2012-11-05 21:27:35 PST
Comment on attachment 172430 [details]
Patch

Attachment 172430 [details] did not pass mac-ews (mac):
Output: http://queues.webkit.org/results/14717942

New failing tests:
fast/css/text-overflow-ellipsis-bidi.html
fast/multicol/span/span-as-immediate-child-property-removal.html
fast/forms/basic-textareas-quirks.html
fast/forms/input-readonly-dimmed.html
fast/replaced/width100percent-textarea.html
fast/forms/input-text-scroll-left-on-blur.html
fast/css/text-overflow-input.html
svg/text/text-overflow-ellipsis-svgfont.html
fast/css/vertical-text-overflow-ellipsis-text-align-center.html
fast/css/text-overflow-ellipsis-strict.html
fast/multicol/span/clone-anonymous-block-non-inline-child-crash.html
fast/forms/input-readonly-autoscroll.html
fast/css/text-overflow-ellipsis.html
fast/forms/input-disabled-color.html
fast/multicol/span/anonymous-split-block-crash.html
fast/forms/search-rtl.html
fast/forms/basic-textareas.html
Comment 20 WebKit Review Bot 2012-11-06 01:01:18 PST
Comment on attachment 172430 [details]
Patch

Attachment 172430 [details] did not pass chromium-ews (chromium-xvfb):
Output: http://queues.webkit.org/results/14738186

New failing tests:
fast/css/vertical-text-overflow-ellipsis-text-align-center.html
fast/multicol/span/anonymous-split-block-crash.html
fast/css/text-overflow-ellipsis-text-align-center.html
svg/text/text-overflow-ellipsis-svgfont.html
fast/multicol/span/clone-anonymous-block-non-inline-child-crash.html
Comment 21 WebKit Review Bot 2012-11-06 01:56:26 PST
Comment on attachment 172430 [details]
Patch

Attachment 172430 [details] did not pass chromium-ews (chromium-xvfb):
Output: http://queues.webkit.org/results/14691331

New failing tests:
fast/css/vertical-text-overflow-ellipsis-text-align-center.html
fast/multicol/span/anonymous-split-block-crash.html
fast/css/text-overflow-ellipsis-text-align-center.html
svg/text/text-overflow-ellipsis-svgfont.html
fast/multicol/span/clone-anonymous-block-non-inline-child-crash.html
Comment 22 Levi Weintraub 2012-11-06 07:55:44 PST
(In reply to comment #21)
> (From update of attachment 172430 [details])
> Attachment 172430 [details] did not pass chromium-ews (chromium-xvfb):
> Output: http://queues.webkit.org/results/14691331
> 
> New failing tests:
> fast/css/vertical-text-overflow-ellipsis-text-align-center.html
> fast/multicol/span/anonymous-split-block-crash.html
> fast/css/text-overflow-ellipsis-text-align-center.html
> svg/text/text-overflow-ellipsis-svgfont.html
> fast/multicol/span/clone-anonymous-block-non-inline-child-crash.html

Failed tests? That seems very curious.
Comment 23 Emil A Eklund 2012-11-06 08:03:24 PST
(In reply to comment #22)
> Failed tests? That seems very curious.

Seems unlikely, rerunning all tests now just to make sure.
Comment 24 Levi Weintraub 2012-11-06 08:10:07 PST
(In reply to comment #23)
> (In reply to comment #22)
> > Failed tests? That seems very curious.
> 
> Seems unlikely, rerunning all tests now just to make sure.

I was thinking the same thing, though the multicol tests are notoriously finicky with changes in LayoutUnits.
Comment 25 Emil A Eklund 2012-11-06 12:56:48 PST
(In reply to comment #24)
> (In reply to comment #23)
> > (In reply to comment #22)
> > > Failed tests? That seems very curious.
> > 
> > Seems unlikely, rerunning all tests now just to make sure.
> 
> I was thinking the same thing, though the multicol tests are notoriously finicky with changes in LayoutUnits.

The failures are all due to the inline enclosingLayoutRect function in LayoutTypesInlineMethods.h masking a function of the same name LayoutRect.cpp.

The LayoutTypesInlineMethods versions is an alias for enclosingIntRect, this is likely incorrect but I'll make that change in a separate patch.
Comment 26 Emil A Eklund 2012-11-06 13:42:43 PST
Created attachment 172641 [details]
Patch
Comment 27 WebKit Review Bot 2012-11-06 13:47:48 PST
Attachment 172641 [details] did not pass style-queue:

Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WebCore/CMakeLists.txt', u'Source/W..." exit_code: 1
Source/WebCore/platform/graphics/LayoutRect.h:215:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
Source/WebCore/platform/LayoutUnit.h:191:  wtf_ceil is incorrectly named. Don't use underscores in your identifier names.  [readability/naming/underscores] [4]
Source/WebCore/platform/graphics/LayoutRect.cpp:38:  Use 'using namespace std;' instead of 'using std::max;'.  [build/using_std] [4]
Source/WebCore/platform/graphics/LayoutRect.cpp:39:  Use 'using namespace std;' instead of 'using std::min;'.  [build/using_std] [4]
Source/WebCore/platform/graphics/LayoutBoxExtent.cpp:187:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
Source/WebCore/platform/graphics/LayoutBoxExtent.cpp:193:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
Total errors found: 6 in 123 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 28 WebKit Review Bot 2012-11-06 14:36:46 PST
Comment on attachment 172641 [details]
Patch

Attachment 172641 [details] did not pass chromium-ews (chromium-xvfb):
Output: http://queues.webkit.org/results/14744515
Comment 29 Emil A Eklund 2012-11-06 15:07:43 PST
The cr-linux bot failed to remove the old FractionalLayoutUnit.h file even though it is marked as deleted in the patch :( It is almost like the bots don't like me.
Comment 30 Emil A Eklund 2012-11-06 15:13:21 PST
Created attachment 172658 [details]
Patch
Comment 31 WebKit Review Bot 2012-11-06 15:19:10 PST
Attachment 172658 [details] did not pass style-queue:

Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WebCore/CMakeLists.txt', u'Source/W..." exit_code: 1
Source/WebCore/platform/graphics/LayoutRect.h:215:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
Source/WebCore/platform/LayoutUnit.h:191:  wtf_ceil is incorrectly named. Don't use underscores in your identifier names.  [readability/naming/underscores] [4]
Source/WebCore/platform/graphics/LayoutRect.cpp:38:  Use 'using namespace std;' instead of 'using std::max;'.  [build/using_std] [4]
Source/WebCore/platform/graphics/LayoutRect.cpp:39:  Use 'using namespace std;' instead of 'using std::min;'.  [build/using_std] [4]
Source/WebCore/platform/graphics/LayoutBoxExtent.cpp:187:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
Source/WebCore/platform/graphics/LayoutBoxExtent.cpp:193:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
Total errors found: 6 in 123 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 32 WebKit Review Bot 2012-11-06 18:06:50 PST
Comment on attachment 172658 [details]
Patch

Attachment 172658 [details] did not pass chromium-ews (chromium-xvfb):
Output: http://queues.webkit.org/results/14755305
Comment 33 EFL EWS Bot 2012-11-06 18:58:20 PST
Comment on attachment 172658 [details]
Patch

Attachment 172658 [details] did not pass efl-ews (efl):
Output: http://queues.webkit.org/results/14745534
Comment 34 EFL EWS Bot 2012-11-06 19:02:08 PST
Comment on attachment 172658 [details]
Patch

Attachment 172658 [details] did not pass efl-ews (efl):
Output: http://queues.webkit.org/results/14748467
Comment 35 Build Bot 2012-11-06 23:52:30 PST
Comment on attachment 172658 [details]
Patch

Attachment 172658 [details] did not pass mac-ews (mac):
Output: http://queues.webkit.org/results/14762159

New failing tests:
fast/transforms/rotated-transform-affects-scrolling-2.html
fast/clip/overflow-border-radius-composited.html
compositing/tiling/tile-cache-zoomed.html
fast/transforms/rotated-transform-affects-scrolling-1.html
transforms/2d/hindi-rotated.html
fast/clip/overflow-border-radius-transformed.html
fast/forms/validation-message-appearance.html
Comment 36 Build Bot 2012-11-07 00:50:24 PST
Comment on attachment 172658 [details]
Patch

Attachment 172658 [details] did not pass mac-ews (mac):
Output: http://queues.webkit.org/results/14762172

New failing tests:
fast/transforms/rotated-transform-affects-scrolling-2.html
fast/clip/overflow-border-radius-composited.html
compositing/tiling/tile-cache-zoomed.html
fast/transforms/rotated-transform-affects-scrolling-1.html
transforms/2d/hindi-rotated.html
fast/clip/overflow-border-radius-transformed.html
fast/forms/validation-message-appearance.html
Comment 37 Emil A Eklund 2012-11-07 08:36:41 PST
Created attachment 172815 [details]
Patch
Comment 38 WebKit Review Bot 2012-11-07 08:40:31 PST
Attachment 172815 [details] did not pass style-queue:

Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WebCore/CMakeLists.txt', u'Source/W..." exit_code: 1
Source/WebCore/platform/graphics/LayoutRect.h:215:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
Source/WebCore/platform/LayoutUnit.h:191:  wtf_ceil is incorrectly named. Don't use underscores in your identifier names.  [readability/naming/underscores] [4]
Source/WebCore/platform/graphics/LayoutRect.cpp:38:  Use 'using namespace std;' instead of 'using std::max;'.  [build/using_std] [4]
Source/WebCore/platform/graphics/LayoutRect.cpp:39:  Use 'using namespace std;' instead of 'using std::min;'.  [build/using_std] [4]
Source/WebCore/platform/graphics/LayoutBoxExtent.cpp:187:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
Source/WebCore/platform/graphics/LayoutBoxExtent.cpp:193:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
Total errors found: 6 in 124 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 39 EFL EWS Bot 2012-11-07 09:28:02 PST
Comment on attachment 172815 [details]
Patch

Attachment 172815 [details] did not pass efl-ews (efl):
Output: http://queues.webkit.org/results/14761371
Comment 40 WebKit Review Bot 2012-11-07 09:50:46 PST
Comment on attachment 172815 [details]
Patch

Attachment 172815 [details] did not pass chromium-ews (chromium-xvfb):
Output: http://queues.webkit.org/results/14759414
Comment 41 Emil A Eklund 2012-11-07 10:08:05 PST
Passed on mac now and the cr-linux bot is broken again (didn't remove old files). Please review.
Comment 42 Levi Weintraub 2012-11-07 10:15:20 PST
Comment on attachment 172815 [details]
Patch

You may want to warn the troopers before trying to land this. I suspect there'll need to be some clobbers.
Comment 43 Emil A Eklund 2012-11-07 16:37:38 PST
Committed r133779: <http://trac.webkit.org/changeset/133779>