Diff
Modified: trunk/Source/WebCore/ChangeLog (143478 => 143479)
--- trunk/Source/WebCore/ChangeLog 2013-02-20 18:41:12 UTC (rev 143478)
+++ trunk/Source/WebCore/ChangeLog 2013-02-20 18:45:22 UTC (rev 143479)
@@ -1,5 +1,25 @@
2013-02-20 Ojan Vafai <o...@chromium.org>
+ 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.
+
+2013-02-20 Ojan Vafai <o...@chromium.org>
+
Make intrinsic width values work for positioned elements
https://bugs.webkit.org/show_bug.cgi?id=110264
Modified: trunk/Source/WebCore/WebCore.order (143478 => 143479)
--- trunk/Source/WebCore/WebCore.order 2013-02-20 18:41:12 UTC (rev 143478)
+++ trunk/Source/WebCore/WebCore.order 2013-02-20 18:45:22 UTC (rev 143479)
@@ -1654,7 +1654,6 @@
__ZNK7WebCore11RenderStyle14borderEndWidthEv
__ZNK7WebCore20RenderBoxModelObject12paddingStartEb
__ZNK7WebCore20RenderBoxModelObject10paddingEndEb
-__ZNK7WebCore9RenderBox35stretchesToMinIntrinsicLogicalWidthEv
__ZNK7WebCore9RenderBox11marginStartEv
__ZNK7WebCore9RenderBox9marginEndEv
__ZN7WebCore11RenderBlock20layoutInlineChildrenEbRiS1_
@@ -6816,7 +6815,6 @@
__ZNK7WebCore14RenderFieldset12avoidsFloatsEv
__ZN7WebCoreL17legendConstructorERKNS_13QualifiedNameEPNS_8DocumentEPNS_15HTMLFormElementEb
__ZN7WebCore17HTMLLegendElement6createERKNS_13QualifiedNameEPNS_8DocumentEPNS_15HTMLFormElementE
-__ZNK7WebCore14RenderFieldset35stretchesToMinIntrinsicLogicalWidthEv
__ZN7WebCore14RenderFieldset29computePreferredLogicalWidthsEv
__ZN7WebCore11RenderBlock34computeBlockPreferredLogicalWidthsEv
__ZNK7WebCore14RenderFieldset10findLegendEv
Modified: trunk/Source/WebCore/css/html.css (143478 => 143479)
--- trunk/Source/WebCore/css/html.css 2013-02-20 18:41:12 UTC (rev 143478)
+++ trunk/Source/WebCore/css/html.css 2013-02-20 18:45:22 UTC (rev 143479)
@@ -393,7 +393,8 @@
-webkit-padding-start: 0.75em;
-webkit-padding-end: 0.75em;
-webkit-padding-after: 0.625em;
- border: 2px groove ThreeDFace
+ border: 2px groove ThreeDFace;
+ min-width: -webkit-min-content;
}
button {
Modified: trunk/Source/WebCore/rendering/RenderBox.cpp (143478 => 143479)
--- trunk/Source/WebCore/rendering/RenderBox.cpp 2013-02-20 18:41:12 UTC (rev 143478)
+++ trunk/Source/WebCore/rendering/RenderBox.cpp 2013-02-20 18:45:22 UTC (rev 143479)
@@ -2008,10 +2008,6 @@
computedValues.m_extent = constrainLogicalWidthInRegionByMinMax(preferredWidth, containerWidthInInlineDirection, cb, region, offsetFromLogicalTopOfFirstPage);
}
- // Fieldsets are currently the only objects that stretch to their minimum width.
- if (stretchesToMinIntrinsicLogicalWidth())
- computedValues.m_extent = max(computedValues.m_extent, minPreferredLogicalWidth());
-
// Margin calculations.
if (hasPerpendicularContainingBlock || isFloating() || isInline()) {
RenderView* renderView = view();
@@ -3026,13 +3022,6 @@
}
}
- if (stretchesToMinIntrinsicLogicalWidth() && computedValues.m_extent < minPreferredLogicalWidth() - bordersPlusPadding) {
- computePositionedLogicalWidthUsing(MainOrPreferredSize, Length(minPreferredLogicalWidth() - bordersPlusPadding, Fixed), containerBlock, containerDirection,
- containerLogicalWidth, bordersPlusPadding,
- logicalLeftLength, logicalRightLength, marginLogicalLeft, marginLogicalRight,
- computedValues);
- }
-
computedValues.m_extent += bordersPlusPadding;
// Adjust logicalLeft if we need to for the flipped version of our writing mode in regions.
Modified: trunk/Source/WebCore/rendering/RenderBox.h (143478 => 143479)
--- trunk/Source/WebCore/rendering/RenderBox.h 2013-02-20 18:41:12 UTC (rev 143478)
+++ trunk/Source/WebCore/rendering/RenderBox.h 2013-02-20 18:45:22 UTC (rev 143479)
@@ -411,7 +411,6 @@
// Whether or not the element shrinks to its intrinsic width (rather than filling the width
// of a containing block). HTML4 buttons, <select>s, <input>s, legends, and floating/compact elements do this.
bool sizesLogicalWidthToFitContent(SizeType) const;
- virtual bool stretchesToMinIntrinsicLogicalWidth() const { return false; }
LayoutUnit shrinkLogicalWidthToAvoidFloats(LayoutUnit childMarginStart, LayoutUnit childMarginEnd, const RenderBlock* cb, RenderRegion*, LayoutUnit offsetFromLogicalTopOfFirstPage) const;
Modified: trunk/Source/WebCore/rendering/RenderFieldset.cpp (143478 => 143479)
--- trunk/Source/WebCore/rendering/RenderFieldset.cpp 2013-02-20 18:41:12 UTC (rev 143478)
+++ trunk/Source/WebCore/rendering/RenderFieldset.cpp 2013-02-20 18:45:22 UTC (rev 143479)
@@ -212,13 +212,4 @@
paintMaskImages(paintInfo, paintRect);
}
-bool RenderFieldset::stretchesToMinIntrinsicLogicalWidth() const
-{
- // If width is explicitly specified then Fieldsets should not stretch
- if (style()->width().isPercent())
- return false;
-
- return true;
-}
-
} // namespace WebCore
Modified: trunk/Source/WebCore/rendering/RenderFieldset.h (143478 => 143479)
--- trunk/Source/WebCore/rendering/RenderFieldset.h 2013-02-20 18:41:12 UTC (rev 143478)
+++ trunk/Source/WebCore/rendering/RenderFieldset.h 2013-02-20 18:45:22 UTC (rev 143479)
@@ -43,7 +43,6 @@
virtual void computePreferredLogicalWidths();
virtual bool avoidsFloats() const { return true; }
- virtual bool stretchesToMinIntrinsicLogicalWidth() const OVERRIDE;
virtual void paintBoxDecorations(PaintInfo&, const LayoutPoint&);
virtual void paintMask(PaintInfo&, const LayoutPoint&);