Changeset 124279 in webkit


Ignore:
Timestamp:
Jul 31, 2012 6:31:27 PM (12 years ago)
Author:
tony@chromium.org
Message:

flexbox should avoid floats
https://bugs.webkit.org/show_bug.cgi?id=92661

Reviewed by Ojan Vafai.

Source/WebCore:

Block types should avoid floats. Deprecated flexbox and grid already avoid floats.

Tests: css3/flexbox/floated-flexbox.html - added a test case.

  • rendering/RenderFlexibleBox.h:

LayoutTests:

Add a test case to make sure flexboxen avoid floats.

  • css3/flexbox/floated-flexbox.html:
Location:
trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r124278 r124279  
     12012-07-31  Tony Chang  <tony@chromium.org>
     2
     3        flexbox should avoid floats
     4        https://bugs.webkit.org/show_bug.cgi?id=92661
     5
     6        Reviewed by Ojan Vafai.
     7
     8        Add a test case to make sure flexboxen avoid floats.
     9
     10        * css3/flexbox/floated-flexbox.html:
     11
    1122012-07-31  Tony Chang  <tony@chromium.org>
    213
  • trunk/LayoutTests/css3/flexbox/floated-flexbox-expected.txt

    r107624 r124279  
    11PASS
     2PASS
  • trunk/LayoutTests/css3/flexbox/floated-flexbox.html

    r122623 r124279  
    99}
    1010.flexbox :nth-child(1) {
    11     background-color: blue;
     11    background-color: salmon;
    1212}
    1313.flexbox :nth-child(2) {
    14     background-color: green;
     14    background-color: lime;
    1515}
    1616</style>
     
    2727</div>
    2828
     29<div style="clear: left; position: relative">
     30    <div style="width: 100px; height: 100px; background-color: green; float: left"></div>
     31    <div data-expected-height=30 data-offset-x=100 data-offset-y=0 class="flexbox" style="float: none">
     32        <div data-expected-height=20 data style="height: 20px; -webkit-flex: 1"></div>
     33        <div data-expected-height=20 style="height: 20px; -webkit-flex: 1"></div>
     34    </div>
     35</div>
     36
    2937</body>
    3038</html>
  • trunk/Source/WebCore/ChangeLog

    r124278 r124279  
     12012-07-31  Tony Chang  <tony@chromium.org>
     2
     3        flexbox should avoid floats
     4        https://bugs.webkit.org/show_bug.cgi?id=92661
     5
     6        Reviewed by Ojan Vafai.
     7
     8        Block types should avoid floats. Deprecated flexbox and grid already avoid floats.
     9
     10        Tests: css3/flexbox/floated-flexbox.html - added a test case.
     11
     12        * rendering/RenderFlexibleBox.h:
     13
    1142012-07-31  Tony Chang  <tony@chromium.org>
    215
  • trunk/Source/WebCore/rendering/RenderFlexibleBox.h

    r124278 r124279  
    4545
    4646    virtual bool isFlexibleBox() const OVERRIDE { return true; }
     47    virtual bool avoidsFloats() const OVERRIDE { return true; }
    4748    virtual void computePreferredLogicalWidths() OVERRIDE;
    4849    virtual void layoutBlock(bool relayoutChildren, LayoutUnit pageLogicalHeight = 0) OVERRIDE;
Note: See TracChangeset for help on using the changeset viewer.