Changeset 143479 in webkit


Ignore:
Timestamp:
Feb 20, 2013 10:45:22 AM (11 years ago)
Author:
ojan@chromium.org
Message:

Remove stretchesToMinIntrinsicLogicalWidth
https://bugs.webkit.org/show_bug.cgi?id=110266

Reviewed by Emil Eklund.

This was only used by fieldsets and now we have a way to express this
concept in CSS.

  • WebCore.order:
  • css/html.css:

Make fieldsets min-width: -webkit-min-content.

  • rendering/RenderBox.cpp:

(WebCore::RenderBox::computeLogicalWidthInRegion):
(WebCore::RenderBox::computePositionedLogicalWidth):

  • rendering/RenderBox.h:

Remove all calls to stretchesToMinIntrinsicLogicalWidth.

Location:
trunk/Source/WebCore
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r143476 r143479  
     12013-02-20  Ojan Vafai  <ojan@chromium.org>
     2
     3        Remove stretchesToMinIntrinsicLogicalWidth
     4        https://bugs.webkit.org/show_bug.cgi?id=110266
     5
     6        Reviewed by Emil Eklund.
     7
     8        This was only used by fieldsets and now we have a way to express this
     9        concept in CSS.
     10
     11        * WebCore.order:
     12        * css/html.css:
     13        Make fieldsets min-width: -webkit-min-content.
     14
     15        * rendering/RenderBox.cpp:
     16        (WebCore::RenderBox::computeLogicalWidthInRegion):
     17        (WebCore::RenderBox::computePositionedLogicalWidth):
     18        * rendering/RenderBox.h:
     19        Remove all calls to stretchesToMinIntrinsicLogicalWidth.
     20
    1212013-02-20  Ojan Vafai  <ojan@chromium.org>
    222
  • trunk/Source/WebCore/WebCore.order

    r143398 r143479  
    16551655__ZNK7WebCore20RenderBoxModelObject12paddingStartEb
    16561656__ZNK7WebCore20RenderBoxModelObject10paddingEndEb
    1657 __ZNK7WebCore9RenderBox35stretchesToMinIntrinsicLogicalWidthEv
    16581657__ZNK7WebCore9RenderBox11marginStartEv
    16591658__ZNK7WebCore9RenderBox9marginEndEv
     
    68176816__ZN7WebCoreL17legendConstructorERKNS_13QualifiedNameEPNS_8DocumentEPNS_15HTMLFormElementEb
    68186817__ZN7WebCore17HTMLLegendElement6createERKNS_13QualifiedNameEPNS_8DocumentEPNS_15HTMLFormElementE
    6819 __ZNK7WebCore14RenderFieldset35stretchesToMinIntrinsicLogicalWidthEv
    68206818__ZN7WebCore14RenderFieldset29computePreferredLogicalWidthsEv
    68216819__ZN7WebCore11RenderBlock34computeBlockPreferredLogicalWidthsEv
  • trunk/Source/WebCore/css/html.css

    r142076 r143479  
    394394    -webkit-padding-end: 0.75em;
    395395    -webkit-padding-after: 0.625em;
    396     border: 2px groove ThreeDFace
     396    border: 2px groove ThreeDFace;
     397    min-width: -webkit-min-content;
    397398}
    398399
  • trunk/Source/WebCore/rendering/RenderBox.cpp

    r143476 r143479  
    20082008        computedValues.m_extent = constrainLogicalWidthInRegionByMinMax(preferredWidth, containerWidthInInlineDirection, cb, region, offsetFromLogicalTopOfFirstPage);
    20092009    }
    2010 
    2011     // Fieldsets are currently the only objects that stretch to their minimum width.
    2012     if (stretchesToMinIntrinsicLogicalWidth())
    2013         computedValues.m_extent = max(computedValues.m_extent, minPreferredLogicalWidth());
    20142010
    20152011    // Margin calculations.
     
    30253021            computedValues.m_margins.m_end = minValues.m_margins.m_end;
    30263022        }
    3027     }
    3028 
    3029     if (stretchesToMinIntrinsicLogicalWidth() && computedValues.m_extent < minPreferredLogicalWidth() - bordersPlusPadding) {
    3030         computePositionedLogicalWidthUsing(MainOrPreferredSize, Length(minPreferredLogicalWidth() - bordersPlusPadding, Fixed), containerBlock, containerDirection,
    3031                                            containerLogicalWidth, bordersPlusPadding,
    3032                                            logicalLeftLength, logicalRightLength, marginLogicalLeft, marginLogicalRight,
    3033                                            computedValues);
    30343023    }
    30353024
  • trunk/Source/WebCore/rendering/RenderBox.h

    r143476 r143479  
    412412    // of a containing block).  HTML4 buttons, <select>s, <input>s, legends, and floating/compact elements do this.
    413413    bool sizesLogicalWidthToFitContent(SizeType) const;
    414     virtual bool stretchesToMinIntrinsicLogicalWidth() const { return false; }
    415414
    416415    LayoutUnit shrinkLogicalWidthToAvoidFloats(LayoutUnit childMarginStart, LayoutUnit childMarginEnd, const RenderBlock* cb, RenderRegion*, LayoutUnit offsetFromLogicalTopOfFirstPage) const;
  • trunk/Source/WebCore/rendering/RenderFieldset.cpp

    r140244 r143479  
    213213}
    214214
    215 bool RenderFieldset::stretchesToMinIntrinsicLogicalWidth() const
    216 {
    217     // If width is explicitly specified then Fieldsets should not stretch
    218     if (style()->width().isPercent())
    219         return false;
    220 
    221     return true;
    222 }
    223 
    224215} // namespace WebCore
  • trunk/Source/WebCore/rendering/RenderFieldset.h

    r140640 r143479  
    4444    virtual void computePreferredLogicalWidths();
    4545    virtual bool avoidsFloats() const { return true; }
    46     virtual bool stretchesToMinIntrinsicLogicalWidth() const OVERRIDE;
    4746
    4847    virtual void paintBoxDecorations(PaintInfo&, const LayoutPoint&);
Note: See TracChangeset for help on using the changeset viewer.