Changeset 151799 in webkit


Ignore:
Timestamp:
Jun 20, 2013 1:46:21 PM (11 years ago)
Author:
commit-queue@webkit.org
Message:

Unreviewed, rolling out r151451.
http://trac.webkit.org/changeset/151451
https://bugs.webkit.org/show_bug.cgi?id=117848

"Broke quite a lot of sites" (Requested by rhogan on #webkit).

Source/WebCore:

  • rendering/RenderBox.cpp:

(WebCore::RenderBox::computePositionedLogicalWidth):
(WebCore::RenderBox::computePositionedLogicalHeight):

  • rendering/RenderBox.h:

(WebCore::RenderBox::intrinsicSize):

  • rendering/RenderButton.h:
  • rendering/RenderListBox.cpp:

(WebCore::RenderListBox::RenderListBox):
(WebCore::RenderListBox::computeLogicalHeight):

  • rendering/RenderListBox.h:
  • rendering/RenderMenuList.h:
  • rendering/RenderReplaced.h:
  • rendering/RenderTextControl.cpp:

(WebCore::RenderTextControl::RenderTextControl):
(WebCore::RenderTextControl::computeLogicalHeight):

  • rendering/RenderTextControl.h:

LayoutTests:

  • fast/forms/onselect-textfield-expected.txt:
  • fast/replaced/width-and-height-of-positioned-replaced-elements-expected.png: Removed.
  • fast/replaced/width-and-height-of-positioned-replaced-elements-expected.txt: Removed.
  • fast/replaced/width-and-height-of-positioned-replaced-elements.html: Removed.
  • platform/mac-wk2/fast/replaced/width-and-height-of-positioned-replaced-elements-expected.txt: Removed.
  • platform/mac/fast/forms/button-positioned-expected.txt:
  • platform/mac/fast/forms/input-appearance-preventDefault-expected.txt:
  • platform/mac/fast/replaced/width-and-height-of-positioned-replaced-elements-expected.txt: Removed.
  • platform/qt/fast/forms/button-positioned-expected.txt:
  • platform/qt/fast/forms/input-appearance-preventDefault-expected.txt:
Location:
trunk
Files:
5 deleted
16 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r151798 r151799  
     12013-06-20  Commit Queue  <commit-queue@webkit.org>
     2
     3        Unreviewed, rolling out r151451.
     4        http://trac.webkit.org/changeset/151451
     5        https://bugs.webkit.org/show_bug.cgi?id=117848
     6
     7        "Broke quite a lot of sites" (Requested by rhogan on #webkit).
     8
     9        * fast/forms/onselect-textfield-expected.txt:
     10        * fast/replaced/width-and-height-of-positioned-replaced-elements-expected.png: Removed.
     11        * fast/replaced/width-and-height-of-positioned-replaced-elements-expected.txt: Removed.
     12        * fast/replaced/width-and-height-of-positioned-replaced-elements.html: Removed.
     13        * platform/mac-wk2/fast/replaced/width-and-height-of-positioned-replaced-elements-expected.txt: Removed.
     14        * platform/mac/fast/forms/button-positioned-expected.txt:
     15        * platform/mac/fast/forms/input-appearance-preventDefault-expected.txt:
     16        * platform/mac/fast/replaced/width-and-height-of-positioned-replaced-elements-expected.txt: Removed.
     17        * platform/qt/fast/forms/button-positioned-expected.txt:
     18        * platform/qt/fast/forms/input-appearance-preventDefault-expected.txt:
     19
    1202013-06-20  Commit Queue  <commit-queue@webkit.org>
    221
  • trunk/LayoutTests/fast/forms/onselect-textfield-expected.txt

    r151798 r151799  
    1010Double clicking to make selection for text field
    1111onselect fired for text field
    12 After double clicking: text field selection start: 0 end: 5
     12After double clicking: text field selection start: 6 end: 10
    1313
    1414Calling blur on text field
    15 After blur: text field selection start: 0 end: 5
     15After blur: text field selection start: 6 end: 10
    1616
    1717Calling focus on text field
    18 After focus: text field selection start: 0 end: 5
     18After focus: text field selection start: 6 end: 10
    1919
  • trunk/LayoutTests/platform/mac/fast/forms/button-positioned-expected.txt

    r151451 r151799  
    44  RenderBlock {HTML} at (0,0) size 800x600
    55    RenderBody {BODY} at (8,8) size 784x584
    6 layer at (10,10) size 170x15
    7   RenderButton {BUTTON} at (10,10) size 170x15 [bgcolor=#C0C0C0] [border: none (2px outset #C0C0C0) none (2px outset #C0C0C0)]
    8     RenderBlock (anonymous) at (8,2) size 154x13
    9       RenderText {#text} at (8,0) size 138x13
    10         text run at (8,0) width 138: "This button is positioned."
    11 layer at (10,10) size 191x18
    12   RenderButton {INPUT} at (10,10) size 191x18 [bgcolor=#C0C0C0]
    13     RenderBlock (anonymous) at (8,2) size 175x13
    14       RenderText at (8,0) size 159x13
    15         text run at (8,0) width 159: "This button is also positioned"
     6layer at (10,10) size 154x18
     7  RenderButton {BUTTON} at (10,10) size 154x18 [bgcolor=#C0C0C0] [border: none (2px outset #C0C0C0) none (2px outset #C0C0C0)]
     8    RenderBlock (anonymous) at (8,2) size 138x13
     9      RenderText {#text} at (0,0) size 138x13
     10        text run at (0,0) width 138: "This button is positioned."
     11layer at (10,10) size 175x18
     12  RenderButton {INPUT} at (10,10) size 175x18 [bgcolor=#C0C0C0]
     13    RenderBlock (anonymous) at (8,2) size 159x13
     14      RenderText at (0,0) size 159x13
     15        text run at (0,0) width 159: "This button is also positioned"
  • trunk/LayoutTests/platform/mac/fast/forms/input-appearance-preventDefault-expected.txt

    r151798 r151799  
    99      RenderText {#text} at (0,0) size 0x0
    1010      RenderText {#text} at (0,0) size 0x0
    11 layer at (12,52) size 129x25
    12   RenderTextControl {INPUT} at (12,52) size 129x25 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
    13 layer at (15,58) size 123x13 scrollWidth 130
    14   RenderBlock {DIV} at (3,6) size 123x13
     11layer at (12,52) size 123x19
     12  RenderTextControl {INPUT} at (12,52) size 123x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
     13layer at (15,55) size 117x13 scrollWidth 130
     14  RenderBlock {DIV} at (3,3) size 117x13
    1515    RenderText {#text} at (0,0) size 129x13
    1616      text run at (0,0) width 129: "No caret should be here"
  • trunk/LayoutTests/platform/qt/fast/forms/button-positioned-expected.txt

    r151451 r151799  
    44  RenderBlock {HTML} at (0,0) size 800x600
    55    RenderBody {BODY} at (8,8) size 784x584
    6 layer at (10,10) size 174x29
    7   RenderButton {BUTTON} at (10,10) size 174x29 [bgcolor=#C0C0C0]
    8     RenderBlock (anonymous) at (6,6) size 162x19
    9       RenderText {#text} at (6,0) size 150x19
    10         text run at (6,0) width 150: "This button is positioned."
    11 layer at (10,10) size 198x29
    12   RenderButton {INPUT} at (10,10) size 198x29 [bgcolor=#C0C0C0]
    13     RenderBlock (anonymous) at (6,6) size 186x19
    14       RenderText at (6,0) size 174x19
    15         text run at (6,0) width 174: "This button is also positioned"
     6layer at (10,10) size 162x31
     7  RenderButton {BUTTON} at (10,10) size 162x31 [bgcolor=#C0C0C0]
     8    RenderBlock (anonymous) at (6,6) size 150x19
     9      RenderText {#text} at (0,0) size 150x19
     10        text run at (0,0) width 150: "This button is positioned."
     11layer at (10,10) size 186x31
     12  RenderButton {INPUT} at (10,10) size 186x31 [bgcolor=#C0C0C0]
     13    RenderBlock (anonymous) at (6,6) size 174x19
     14      RenderText at (0,0) size 174x19
     15        text run at (0,0) width 174: "This button is also positioned"
  • trunk/LayoutTests/platform/qt/fast/forms/input-appearance-preventDefault-expected.txt

    r151798 r151799  
    99      RenderText {#text} at (0,0) size 0x0
    1010      RenderText {#text} at (0,0) size 0x0
    11 layer at (12,52) size 196x27
    12   RenderTextControl {INPUT} at (12,52) size 196x27
    13 layer at (14,56) size 192x19
    14   RenderBlock {DIV} at (2,4) size 192x19
     11layer at (12,52) size 192x23
     12  RenderTextControl {INPUT} at (12,52) size 192x23
     13layer at (14,54) size 188x19
     14  RenderBlock {DIV} at (2,2) size 188x19
    1515    RenderText {#text} at (0,0) size 146x19
    1616      text run at (0,0) width 146: "No caret should be here"
  • trunk/Source/WebCore/ChangeLog

    r151798 r151799  
     12013-06-20  Commit Queue  <commit-queue@webkit.org>
     2
     3        Unreviewed, rolling out r151451.
     4        http://trac.webkit.org/changeset/151451
     5        https://bugs.webkit.org/show_bug.cgi?id=117848
     6
     7        "Broke quite a lot of sites" (Requested by rhogan on #webkit).
     8
     9        * rendering/RenderBox.cpp:
     10        (WebCore::RenderBox::computePositionedLogicalWidth):
     11        (WebCore::RenderBox::computePositionedLogicalHeight):
     12        * rendering/RenderBox.h:
     13        (WebCore::RenderBox::intrinsicSize):
     14        * rendering/RenderButton.h:
     15        * rendering/RenderListBox.cpp:
     16        (WebCore::RenderListBox::RenderListBox):
     17        (WebCore::RenderListBox::computeLogicalHeight):
     18        * rendering/RenderListBox.h:
     19        * rendering/RenderMenuList.h:
     20        * rendering/RenderReplaced.h:
     21        * rendering/RenderTextControl.cpp:
     22        (WebCore::RenderTextControl::RenderTextControl):
     23        (WebCore::RenderTextControl::computeLogicalHeight):
     24        * rendering/RenderTextControl.h:
     25
    1262013-06-20  Commit Queue  <commit-queue@webkit.org>
    227
  • trunk/Source/WebCore/rendering/RenderBox.cpp

    r151761 r151799  
    30553055}
    30563056
    3057 static bool isReplacedElement(const RenderBox* child)
    3058 {
    3059     // FIXME: Bug 117267, we should make form control elements isReplaced too so that we can just check for that.
    3060     return child->isReplaced() || (child->node() && child->node()->isElementNode() && toElement(child->node())->isFormControlElement() && !child->isFieldset());
    3061 }
    3062 
    30633057void RenderBox::computePositionedLogicalWidth(LogicalExtentComputedValues& computedValues, RenderRegion* region) const
    30643058{
    3065     if (isReplacedElement(this)) {
     3059    if (isReplaced()) {
    30663060        // FIXME: Positioned replaced elements inside a flow thread are not working properly
    30673061        // with variable width regions (see https://bugs.webkit.org/show_bug.cgi?id=69896 ).
     
    34053399void RenderBox::computePositionedLogicalHeight(LogicalExtentComputedValues& computedValues) const
    34063400{
    3407     if (isReplacedElement(this)) {
     3401    if (isReplaced()) {
    34083402        computePositionedLogicalHeightReplaced(computedValues);
    34093403        return;
  • trunk/Source/WebCore/rendering/RenderBox.h

    r151623 r151799  
    400400    }
    401401
     402    virtual LayoutSize intrinsicSize() const { return LayoutSize(); }
    402403    LayoutUnit intrinsicLogicalWidth() const { return style()->isHorizontalWritingMode() ? intrinsicSize().width() : intrinsicSize().height(); }
    403404    LayoutUnit intrinsicLogicalHeight() const { return style()->isHorizontalWritingMode() ? intrinsicSize().height() : intrinsicSize().width(); }
     
    642643    LayoutUnit viewLogicalHeightForPercentages() const;
    643644
    644     virtual LayoutSize intrinsicSize() const { return LayoutSize(); }
    645645    void computePositionedLogicalHeight(LogicalExtentComputedValues&) const;
    646646    void computePositionedLogicalWidthUsing(Length logicalWidth, const RenderBoxModelObject* containerBlock, TextDirection containerDirection,
  • trunk/Source/WebCore/rendering/RenderButton.h

    r151451 r151799  
    6868    void timerFired(Timer<RenderButton>*);
    6969
    70     virtual LayoutSize intrinsicSize() const OVERRIDE FINAL { return LayoutSize(maxPreferredLogicalWidth(), LayoutUnit()); }
    71 
    7270    RenderTextFragment* m_buttonText;
    7371    RenderBlock* m_inner;
  • trunk/Source/WebCore/rendering/RenderListBox.cpp

    r151451 r151799  
    9090    , m_optionsWidth(0)
    9191    , m_indexOffset(0)
    92     , m_intrinsicLogicalHeight(0)
    9392{
    9493    ASSERT(element);
     
    271270void RenderListBox::computeLogicalHeight(LayoutUnit, LayoutUnit logicalTop, LogicalExtentComputedValues& computedValues) const
    272271{
    273     m_intrinsicLogicalHeight = itemHeight() * size() - rowSpacing + borderAndPaddingHeight();
    274     RenderBox::computeLogicalHeight(m_intrinsicLogicalHeight, logicalTop, computedValues);
     272    LayoutUnit height = itemHeight() * size() - rowSpacing + borderAndPaddingHeight();
     273    RenderBox::computeLogicalHeight(height, logicalTop, computedValues);
    275274}
    276275
  • trunk/Source/WebCore/rendering/RenderListBox.h

    r151451 r151799  
    8989    virtual void stopAutoscroll();
    9090
    91     virtual LayoutSize intrinsicSize() const OVERRIDE FINAL { return LayoutSize(maxPreferredLogicalWidth(), m_intrinsicLogicalHeight); }
    92 
    9391    virtual bool shouldPanScroll() const { return true; }
    9492    virtual void panScroll(const IntPoint&);
     
    152150    int m_optionsWidth;
    153151    int m_indexOffset;
    154     mutable LayoutUnit m_intrinsicLogicalHeight;
    155152
    156153    RefPtr<Scrollbar> m_vBar;
  • trunk/Source/WebCore/rendering/RenderMenuList.h

    r151451 r151799  
    7676    virtual const char* renderName() const { return "RenderMenuList"; }
    7777
    78     virtual LayoutSize intrinsicSize() const OVERRIDE FINAL { return LayoutSize(maxPreferredLogicalWidth(), logicalHeight()); }
    7978    virtual void computeIntrinsicLogicalWidths(LayoutUnit& minLogicalWidth, LayoutUnit& maxLogicalWidth) const OVERRIDE;
    8079    virtual void computePreferredLogicalWidths() OVERRIDE;
  • trunk/Source/WebCore/rendering/RenderReplaced.h

    r151451 r151799  
    4444    virtual void layout();
    4545
    46     virtual LayoutSize intrinsicSize() const OVERRIDE FINAL { return m_intrinsicSize; }
     46    virtual LayoutSize intrinsicSize() const OVERRIDE { return m_intrinsicSize; }
    4747    virtual void computeIntrinsicRatioInformation(FloatSize& intrinsicSize, double& intrinsicRatio, bool& isPercentageIntrinsicSize) const;
    4848
  • trunk/Source/WebCore/rendering/RenderTextControl.cpp

    r151798 r151799  
    3939RenderTextControl::RenderTextControl(Element* element)
    4040    : RenderBlock(element)
    41     , m_intrinsicLogicalHeight(0)
    4241{
    4342    ASSERT(isHTMLTextFormControlElement(element));
     
    144143}
    145144
    146 void RenderTextControl::computeLogicalHeight(LayoutUnit, LayoutUnit logicalTop, LogicalExtentComputedValues& computedValues) const
     145void RenderTextControl::computeLogicalHeight(LayoutUnit logicalHeight, LayoutUnit logicalTop, LogicalExtentComputedValues& computedValues) const
    147146{
    148147    HTMLElement* innerText = innerTextElement();
     
    150149    if (RenderBox* innerTextBox = innerText->renderBox()) {
    151150        LayoutUnit nonContentHeight = innerTextBox->borderAndPaddingHeight() + innerTextBox->marginHeight();
    152         m_intrinsicLogicalHeight = computeControlLogicalHeight(innerTextBox->lineHeight(true, HorizontalLine, PositionOfInteriorLineBoxes), nonContentHeight) + borderAndPaddingHeight();
     151        logicalHeight = computeControlLogicalHeight(innerTextBox->lineHeight(true, HorizontalLine, PositionOfInteriorLineBoxes), nonContentHeight) + borderAndPaddingHeight();
    153152
    154153        // We are able to have a horizontal scrollbar if the overflow style is scroll, or if its auto and there's no word wrap.
    155154        if ((isHorizontalWritingMode() && (style()->overflowX() == OSCROLL ||  (style()->overflowX() == OAUTO && innerText->renderer()->style()->overflowWrap() == NormalOverflowWrap)))
    156155            || (!isHorizontalWritingMode() && (style()->overflowY() == OSCROLL ||  (style()->overflowY() == OAUTO && innerText->renderer()->style()->overflowWrap() == NormalOverflowWrap))))
    157             m_intrinsicLogicalHeight += scrollbarThickness();
    158     }
    159     RenderBox::computeLogicalHeight(m_intrinsicLogicalHeight, logicalTop, computedValues);
     156            logicalHeight += scrollbarThickness();
     157    }
     158
     159    RenderBox::computeLogicalHeight(logicalHeight, logicalTop, computedValues);
    160160}
    161161
  • trunk/Source/WebCore/rendering/RenderTextControl.h

    r151451 r151799  
    8282
    8383    virtual bool requiresForcedStyleRecalcPropagation() const { return true; }
    84 
    85     virtual LayoutSize intrinsicSize() const OVERRIDE FINAL { return LayoutSize(maxPreferredLogicalWidth(), m_intrinsicLogicalHeight); }
    86 
    87     mutable LayoutUnit m_intrinsicLogicalHeight;
    8884};
    8985
Note: See TracChangeset for help on using the changeset viewer.