Unreviewed, rolling out r154826.
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 30 Aug 2013 09:34:35 +0000 (09:34 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 30 Aug 2013 09:34:35 +0000 (09:34 +0000)
http://trac.webkit.org/changeset/154826
https://bugs.webkit.org/show_bug.cgi?id=120517

Still breaks icloud.com (Requested by mwenge_ on #webkit).

Source/WebCore:

* rendering/RenderBox.cpp:
(WebCore::RenderBox::computePositionedLogicalWidth):
(WebCore::RenderBox::computePositionedLogicalHeight):
* rendering/RenderBox.h:
(WebCore::RenderBox::intrinsicSize):
* rendering/RenderButton.h:
* rendering/RenderFileUploadControl.cpp:
(WebCore::RenderFileUploadControl::computePreferredLogicalWidths):
* rendering/RenderListBox.cpp:
(WebCore::RenderListBox::RenderListBox):
(WebCore::RenderListBox::computePreferredLogicalWidths):
(WebCore::RenderListBox::computeLogicalHeight):
* rendering/RenderListBox.h:
* rendering/RenderMenuList.h:
* rendering/RenderSlider.cpp:
(WebCore::RenderSlider::computePreferredLogicalWidths):
* rendering/RenderTextControl.cpp:
(WebCore::RenderTextControl::RenderTextControl):
(WebCore::RenderTextControl::computeLogicalHeight):
* rendering/RenderTextControl.h:

LayoutTests:

* fast/replaced/intrinsic-button-and-input-height-expected.txt: Removed.
* fast/replaced/intrinsic-button-and-input-height.html: Removed.
* fast/replaced/width-and-height-of-positioned-replaced-elements.html: Removed.
* platform/qt/fast/replaced/width-and-height-of-positioned-replaced-elements-expected.png: Removed.
* platform/qt/fast/replaced/width-and-height-of-positioned-replaced-elements-expected.txt: Removed.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154871 268f45cc-cd09-0410-ab3c-d52691b4dbfc

17 files changed:
LayoutTests/ChangeLog
LayoutTests/fast/replaced/intrinsic-button-and-input-height-expected.txt [deleted file]
LayoutTests/fast/replaced/intrinsic-button-and-input-height.html [deleted file]
LayoutTests/fast/replaced/width-and-height-of-positioned-replaced-elements.html [deleted file]
LayoutTests/platform/qt/fast/replaced/width-and-height-of-positioned-replaced-elements-expected.png [deleted file]
LayoutTests/platform/qt/fast/replaced/width-and-height-of-positioned-replaced-elements-expected.txt [deleted file]
Source/WebCore/ChangeLog
Source/WebCore/rendering/RenderBox.cpp
Source/WebCore/rendering/RenderBox.h
Source/WebCore/rendering/RenderButton.h
Source/WebCore/rendering/RenderFileUploadControl.cpp
Source/WebCore/rendering/RenderListBox.cpp
Source/WebCore/rendering/RenderListBox.h
Source/WebCore/rendering/RenderMenuList.h
Source/WebCore/rendering/RenderSlider.cpp
Source/WebCore/rendering/RenderTextControl.cpp
Source/WebCore/rendering/RenderTextControl.h

index 28005086737cadf6e041d4bdc4dd9afcf9864e24..6080bb83bb2e45b2da8d0bca3137d4331bb44ee8 100644 (file)
@@ -1,3 +1,17 @@
+2013-08-30  Commit Queue  <commit-queue@webkit.org>
+
+        Unreviewed, rolling out r154826.
+        http://trac.webkit.org/changeset/154826
+        https://bugs.webkit.org/show_bug.cgi?id=120517
+
+        Still breaks icloud.com (Requested by mwenge_ on #webkit).
+
+        * fast/replaced/intrinsic-button-and-input-height-expected.txt: Removed.
+        * fast/replaced/intrinsic-button-and-input-height.html: Removed.
+        * fast/replaced/width-and-height-of-positioned-replaced-elements.html: Removed.
+        * platform/qt/fast/replaced/width-and-height-of-positioned-replaced-elements-expected.png: Removed.
+        * platform/qt/fast/replaced/width-and-height-of-positioned-replaced-elements-expected.txt: Removed.
+
 2013-08-29  Grzegorz Czajkowski  <g.czajkowski@samsung.com>
 
         TEST COMPLETE does not appear at the end of spellchecking tests
diff --git a/LayoutTests/fast/replaced/intrinsic-button-and-input-height-expected.txt b/LayoutTests/fast/replaced/intrinsic-button-and-input-height-expected.txt
deleted file mode 100644 (file)
index e01e6c3..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-webkit.org/b/93735 : Ensure positioned, replaced buttons and input elements get the correct intrinsic height when none is specified.
-
-Text
-PASS
-
-PASS
diff --git a/LayoutTests/fast/replaced/intrinsic-button-and-input-height.html b/LayoutTests/fast/replaced/intrinsic-button-and-input-height.html
deleted file mode 100644 (file)
index b343451..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-<!doctype html> 
-<head>
-    <style>
-
-    button, input {
-        position: absolute;
-        text-align: center;
-        padding: 7px 0 8px;
-        top: 8px
-        width: 70px ;
-        border: 0px;
-        font: 10px/1 Ahem;
-    }
-    input {
-        top: 80px;
-    }
-
-    </style>
-    
-    <script src="../../resources/check-layout.js"></script>
-</head>
-<body>
-    <p>webkit.org/b/93735 : Ensure positioned, replaced buttons and input elements get the correct intrinsic height when none is specified.</p>
-    <div>
-        <button data-expected-height=25>
-            <span class="login">Text</span>
-        </button>
-        <input type="text" value="text" data-expected-height=25>
-    </div>
-    <script>
-    checkLayout('button');
-    checkLayout('input');
-    </script>
-</body>
-</html>
diff --git a/LayoutTests/fast/replaced/width-and-height-of-positioned-replaced-elements.html b/LayoutTests/fast/replaced/width-and-height-of-positioned-replaced-elements.html
deleted file mode 100644 (file)
index ae2c37a..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-<!DOCTYPE html>\r
-<html>\r
-<head>\r
-<style>\r
-input, select, textarea {\r
-    left: 5px;\r
-    right: 5px;\r
-    position: absolute;\r
-}\r
-</style>\r
-</head>\r
-<body>\r
-    <!-- webkit.org/b/93735: Use the replaced height and width computation for positioned form controls -->\r
-    <input id="input" style="top: 30px">\r
-    <input type="button" id="button" value="text" style="top: 80px">\r
-    <select id="select" style="top: 130px"><option>test</select>\r
-    <textarea id="textarea" style="top: 180px"></textarea>\r
-</body>\r
-</html>\r
diff --git a/LayoutTests/platform/qt/fast/replaced/width-and-height-of-positioned-replaced-elements-expected.png b/LayoutTests/platform/qt/fast/replaced/width-and-height-of-positioned-replaced-elements-expected.png
deleted file mode 100644 (file)
index cac1852..0000000
Binary files a/LayoutTests/platform/qt/fast/replaced/width-and-height-of-positioned-replaced-elements-expected.png and /dev/null differ
diff --git a/LayoutTests/platform/qt/fast/replaced/width-and-height-of-positioned-replaced-elements-expected.txt b/LayoutTests/platform/qt/fast/replaced/width-and-height-of-positioned-replaced-elements-expected.txt
deleted file mode 100644 (file)
index 2a8302c..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-layer at (0,0) size 800x600
-  RenderView at (0,0) size 800x600
-layer at (0,0) size 800x8
-  RenderBlock {HTML} at (0,0) size 800x8
-    RenderBody {BODY} at (8,8) size 784x0
-layer at (7,32) size 192x23
-  RenderTextControl {INPUT} at (7,32) size 192x23
-layer at (9,34) size 188x19
-  RenderBlock {DIV} at (2,2) size 188x19
-layer at (7,82) size 34x31
-  RenderButton {INPUT} at (7,82) size 34x31 [bgcolor=#C0C0C0]
-    RenderBlock (anonymous) at (6,6) size 22x19
-      RenderText at (0,0) size 22x19
-        text run at (0,0) width 22: "text"
-layer at (7,132) size 49x24
-  RenderMenuList {SELECT} at (7,132) size 49x24 [bgcolor=#FFFFFF]
-    RenderBlock (anonymous) at (4,2) size 21x20
-      RenderText at (0,0) size 21x19
-        text run at (0,0) width 21: "test"
-layer at (7,182) size 199x42
-  RenderTextControl {TEXTAREA} at (7,182) size 199x42
-    RenderBlock {DIV} at (2,2) size 195x19
index 9a2f47419cf9cfcd3b9ec58349b89093c4e35f08..2290433b53043183cf393aa748d930876b4bd5e3 100644 (file)
@@ -1,3 +1,32 @@
+2013-08-30  Commit Queue  <commit-queue@webkit.org>
+
+        Unreviewed, rolling out r154826.
+        http://trac.webkit.org/changeset/154826
+        https://bugs.webkit.org/show_bug.cgi?id=120517
+
+        Still breaks icloud.com (Requested by mwenge_ on #webkit).
+
+        * rendering/RenderBox.cpp:
+        (WebCore::RenderBox::computePositionedLogicalWidth):
+        (WebCore::RenderBox::computePositionedLogicalHeight):
+        * rendering/RenderBox.h:
+        (WebCore::RenderBox::intrinsicSize):
+        * rendering/RenderButton.h:
+        * rendering/RenderFileUploadControl.cpp:
+        (WebCore::RenderFileUploadControl::computePreferredLogicalWidths):
+        * rendering/RenderListBox.cpp:
+        (WebCore::RenderListBox::RenderListBox):
+        (WebCore::RenderListBox::computePreferredLogicalWidths):
+        (WebCore::RenderListBox::computeLogicalHeight):
+        * rendering/RenderListBox.h:
+        * rendering/RenderMenuList.h:
+        * rendering/RenderSlider.cpp:
+        (WebCore::RenderSlider::computePreferredLogicalWidths):
+        * rendering/RenderTextControl.cpp:
+        (WebCore::RenderTextControl::RenderTextControl):
+        (WebCore::RenderTextControl::computeLogicalHeight):
+        * rendering/RenderTextControl.h:
+
 2013-08-29  Ryosuke Niwa  <rniwa@webkit.org>
 
         Unduplicate the code to convert between VisiblePosition and index
index 0aedaffc399fe2f9438db834b806027ab1d59507..69614331bab33e68570f54648f62ca20672c5e69 100644 (file)
@@ -3095,15 +3095,9 @@ static void computeInlineStaticDistance(Length& logicalLeft, Length& logicalRigh
     }
 }
 
-static bool isReplacedElement(const RenderBox* child)
-{
-    // FIXME: Bug 117267, we should make form control elements isReplaced too so that we can just check for that.
-    return child->isReplaced() || (child->node() && child->node()->isElementNode() && toElement(child->node())->isFormControlElement() && !child->isFieldset());
-}
-
 void RenderBox::computePositionedLogicalWidth(LogicalExtentComputedValues& computedValues, RenderRegion* region) const
 {
-    if (isReplacedElement(this)) {
+    if (isReplaced()) {
         // FIXME: Positioned replaced elements inside a flow thread are not working properly
         // with variable width regions (see https://bugs.webkit.org/show_bug.cgi?id=69896 ).
         computePositionedLogicalWidthReplaced(computedValues);
@@ -3444,7 +3438,7 @@ static void computeBlockStaticDistance(Length& logicalTop, Length& logicalBottom
 
 void RenderBox::computePositionedLogicalHeight(LogicalExtentComputedValues& computedValues) const
 {
-    if (isReplacedElement(this)) {
+    if (isReplaced()) {
         computePositionedLogicalHeightReplaced(computedValues);
         return;
     }
index ecbff74096c511faf2246c196659984140ea5bc0..0e3625cc75aeb1f2633fffd2764daf4d365dfa79 100644 (file)
@@ -408,6 +408,7 @@ public:
         return document().inQuirksMode() && style()->logicalHeight().isAuto() && !isFloatingOrOutOfFlowPositioned() && (isRoot() || isBody()) && !document().shouldDisplaySeamlesslyWithParent() && !isInline();
     }
 
+    virtual LayoutSize intrinsicSize() const { return LayoutSize(); }
     LayoutUnit intrinsicLogicalWidth() const { return style()->isHorizontalWritingMode() ? intrinsicSize().width() : intrinsicSize().height(); }
     LayoutUnit intrinsicLogicalHeight() const { return style()->isHorizontalWritingMode() ? intrinsicSize().height() : intrinsicSize().width(); }
 
@@ -656,7 +657,6 @@ private:
 
     LayoutUnit viewLogicalHeightForPercentages() const;
 
-    virtual LayoutSize intrinsicSize() const { return LayoutSize(); }
     void computePositionedLogicalHeight(LogicalExtentComputedValues&) const;
     void computePositionedLogicalWidthUsing(Length logicalWidth, const RenderBoxModelObject* containerBlock, TextDirection containerDirection,
                                             LayoutUnit containerLogicalWidth, LayoutUnit bordersPlusPadding,
index 2e163352531e3e227d3e176a774088a558d47d1e..4f20cf53bd00092f4b89d3b531ecf217f85097f7 100644 (file)
@@ -67,8 +67,6 @@ private:
 
     void timerFired(Timer<RenderButton>*);
 
-    virtual LayoutSize intrinsicSize() const OVERRIDE FINAL { return LayoutSize(maxPreferredLogicalWidth() - borderAndPaddingLogicalWidth(), logicalHeight() - borderAndPaddingLogicalHeight()); }
-
     RenderTextFragment* m_buttonText;
     RenderBlock* m_inner;
 
index dd818472ad1cf03f1bfad788faf415857f414ca0..cff6cbf9538b346ef68939a36001b9005efb459f 100644 (file)
@@ -211,7 +211,7 @@ void RenderFileUploadControl::computePreferredLogicalWidths()
         m_minPreferredLogicalWidth = min(m_minPreferredLogicalWidth, adjustContentBoxLogicalWidthForBoxSizing(style()->maxWidth().value()));
     }
 
-    int toAdd = borderAndPaddingLogicalWidth();
+    int toAdd = borderAndPaddingWidth();
     m_minPreferredLogicalWidth += toAdd;
     m_maxPreferredLogicalWidth += toAdd;
 
index 58a84936fb1f22a5440cbe5817c79420d7795e2b..a0300a742ab2c632caa7d7dd5f5fbb433e12b25f 100644 (file)
@@ -89,7 +89,6 @@ RenderListBox::RenderListBox(Element* element)
     , m_inAutoscroll(false)
     , m_optionsWidth(0)
     , m_indexOffset(0)
-    , m_intrinsicLogicalHeight(0)
 {
     ASSERT(element);
     ASSERT(element->isHTMLElement());
@@ -233,7 +232,7 @@ void RenderListBox::computePreferredLogicalWidths()
         m_minPreferredLogicalWidth = min(m_minPreferredLogicalWidth, adjustContentBoxLogicalWidthForBoxSizing(style()->maxWidth().value()));
     }
 
-    LayoutUnit toAdd = borderAndPaddingLogicalWidth();
+    LayoutUnit toAdd = borderAndPaddingWidth();
     m_minPreferredLogicalWidth += toAdd;
     m_maxPreferredLogicalWidth += toAdd;
                                 
@@ -267,8 +266,8 @@ LayoutUnit RenderListBox::listHeight() const
 
 void RenderListBox::computeLogicalHeight(LayoutUnit, LayoutUnit logicalTop, LogicalExtentComputedValues& computedValues) const
 {
-    m_intrinsicLogicalHeight = itemHeight() * size() - rowSpacing + borderAndPaddingLogicalHeight();
-    RenderBox::computeLogicalHeight(m_intrinsicLogicalHeight, logicalTop, computedValues);
+    LayoutUnit height = itemHeight() * size() - rowSpacing + borderAndPaddingHeight();
+    RenderBox::computeLogicalHeight(height, logicalTop, computedValues);
 }
 
 int RenderListBox::baselinePosition(FontBaseline baselineType, bool firstLine, LineDirectionMode lineDirection, LinePositionMode linePositionMode) const
index 56bba2a5f470899ea277ef6c958e2817d03d9be1..2d73653ae52ff980bc89ee416c55ccefce9886e6 100644 (file)
@@ -88,8 +88,6 @@ private:
     virtual void autoscroll(const IntPoint&);
     virtual void stopAutoscroll();
 
-    virtual LayoutSize intrinsicSize() const OVERRIDE FINAL { return LayoutSize(maxPreferredLogicalWidth() - borderAndPaddingLogicalWidth(), m_intrinsicLogicalHeight - borderAndPaddingLogicalHeight()); }
-
     virtual bool shouldPanScroll() const { return true; }
     virtual void panScroll(const IntPoint&);
 
@@ -151,7 +149,6 @@ private:
     bool m_inAutoscroll;
     int m_optionsWidth;
     int m_indexOffset;
-    mutable LayoutUnit m_intrinsicLogicalHeight;
 
     RefPtr<Scrollbar> m_vBar;
 };
index 7da425e344816e4cf7bd7fd470b81d97e4c526c8..ef1e3451c4e461a8653dd3a1c2778a2cff77b82c 100644 (file)
@@ -75,7 +75,6 @@ private:
 
     virtual const char* renderName() const { return "RenderMenuList"; }
 
-    virtual LayoutSize intrinsicSize() const OVERRIDE FINAL { return LayoutSize(maxPreferredLogicalWidth() - borderAndPaddingLogicalWidth(), logicalHeight() - borderAndPaddingLogicalHeight()); }
     virtual void computeIntrinsicLogicalWidths(LayoutUnit& minLogicalWidth, LayoutUnit& maxLogicalWidth) const OVERRIDE;
     virtual void computePreferredLogicalWidths() OVERRIDE;
 
index a6711babbb316188f68cf81ffa3f1528d48ef4f2..55df4fdea212fe6576a2dc9a34bdfbd76a03f0f6 100644 (file)
@@ -98,7 +98,7 @@ void RenderSlider::computePreferredLogicalWidths()
         m_minPreferredLogicalWidth = min(m_minPreferredLogicalWidth, adjustContentBoxLogicalWidthForBoxSizing(style()->maxWidth().value()));
     }
 
-    LayoutUnit toAdd = borderAndPaddingLogicalWidth();
+    LayoutUnit toAdd = borderAndPaddingWidth();
     m_minPreferredLogicalWidth += toAdd;
     m_maxPreferredLogicalWidth += toAdd;
 
index 10779a9c932b3af3a72164632b8677072f4bd36a..a84bb8c093cc93a41e0a6aadebb189afe0244a77 100644 (file)
@@ -38,7 +38,6 @@ namespace WebCore {
 
 RenderTextControl::RenderTextControl(Element* element)
     : RenderBlock(element)
-    , m_intrinsicLogicalHeight(0)
 {
     ASSERT(isHTMLTextFormControlElement(element));
 }
@@ -132,20 +131,21 @@ int RenderTextControl::scrollbarThickness() const
     return ScrollbarTheme::theme()->scrollbarThickness();
 }
 
-void RenderTextControl::computeLogicalHeight(LayoutUnit, LayoutUnit logicalTop, LogicalExtentComputedValues& computedValues) const
+void RenderTextControl::computeLogicalHeight(LayoutUnit logicalHeight, LayoutUnit logicalTop, LogicalExtentComputedValues& computedValues) const
 {
     HTMLElement* innerText = innerTextElement();
     ASSERT(innerText);
     if (RenderBox* innerTextBox = innerText->renderBox()) {
         LayoutUnit nonContentHeight = innerTextBox->borderAndPaddingHeight() + innerTextBox->marginHeight();
-        m_intrinsicLogicalHeight = computeControlLogicalHeight(innerTextBox->lineHeight(true, HorizontalLine, PositionOfInteriorLineBoxes), nonContentHeight) + borderAndPaddingLogicalHeight();
+        logicalHeight = computeControlLogicalHeight(innerTextBox->lineHeight(true, HorizontalLine, PositionOfInteriorLineBoxes), nonContentHeight) + borderAndPaddingHeight();
 
         // We are able to have a horizontal scrollbar if the overflow style is scroll, or if its auto and there's no word wrap.
         if ((isHorizontalWritingMode() && (style()->overflowX() == OSCROLL ||  (style()->overflowX() == OAUTO && innerText->renderer()->style()->overflowWrap() == NormalOverflowWrap)))
             || (!isHorizontalWritingMode() && (style()->overflowY() == OSCROLL ||  (style()->overflowY() == OAUTO && innerText->renderer()->style()->overflowWrap() == NormalOverflowWrap))))
-            m_intrinsicLogicalHeight += scrollbarThickness();
+            logicalHeight += scrollbarThickness();
     }
-    RenderBox::computeLogicalHeight(m_intrinsicLogicalHeight, logicalTop, computedValues);
+
+    RenderBox::computeLogicalHeight(logicalHeight, logicalTop, computedValues);
 }
 
 void RenderTextControl::hitInnerTextElement(HitTestResult& result, const LayoutPoint& pointInContainer, const LayoutPoint& accumulatedOffset)
index 30712612299e504f2a0364cad8a35a2304ed3bd7..4d192acd3d701a55db7c009e8848e2574e845734 100644 (file)
@@ -79,10 +79,6 @@ private:
     virtual bool canBeProgramaticallyScrolled() const { return true; }
 
     virtual bool requiresForcedStyleRecalcPropagation() const { return true; }
-
-    virtual LayoutSize intrinsicSize() const OVERRIDE FINAL { return LayoutSize(maxPreferredLogicalWidth() - borderAndPaddingLogicalWidth(), m_intrinsicLogicalHeight - borderAndPaddingLogicalHeight()); }
-
-    mutable LayoutUnit m_intrinsicLogicalHeight;
 };
 
 inline RenderTextControl* toRenderTextControl(RenderObject* object)