Changeset 145374 in webkit


Ignore:
Timestamp:
Mar 11, 2013 10:32:14 AM (11 years ago)
Author:
jchaffraix@webkit.org
Message:

Merge 145296

Unreviewed, rolling out r142015.
http://trac.webkit.org/changeset/142015
https://bugs.webkit.org/show_bug.cgi?id=111904

The change caused 2 major regressions (bug 111091 and bug
111595) and Pravin doesn't have time to investigate them
(Requested by jchaffraix on #webkit).

Patch by Sheriff Bot <webkit.review.bot@gmail.com> on 2013-03-08

Source/WebCore:

  • dom/Node.cpp:

(WebCore::Node::diff):

  • rendering/RenderBlock.cpp:

(WebCore::RenderBlock::childBecameNonInline):
(WebCore):

  • rendering/RenderBlock.h:

(RenderBlock):

  • rendering/RenderBoxModelObject.h:

(WebCore::RenderBoxModelObject::childBecameNonInline):
(RenderBoxModelObject):

  • rendering/RenderInline.cpp:

(WebCore::RenderInline::childBecameNonInline):
(WebCore):

  • rendering/RenderInline.h:

(RenderInline):

  • rendering/RenderObject.cpp:

(WebCore):
(WebCore::RenderObject::handleDynamicFloatPositionChange):
(WebCore::RenderObject::styleWillChange):
(WebCore::RenderObject::styleDidChange):

  • rendering/RenderObject.h:

(RenderObject):

LayoutTests:

  • fast/css/first-letter-removed-added-expected.txt:
  • fast/dynamic/absolute-positioned-to-static-positioned-expected.txt: Removed.
  • fast/dynamic/absolute-positioned-to-static-positioned.html: Removed.
  • fast/dynamic/floating-to-non-floating-expected.txt: Removed.
  • fast/dynamic/floating-to-non-floating.html: Removed.
  • fast/dynamic/non-floating-to-floating-expected.txt: Removed.
  • fast/dynamic/non-floating-to-floating.html: Removed.
  • fast/dynamic/resources/helper-bug91665.js: Removed.
  • fast/dynamic/resources/style-bug91665.css: Removed.
  • fast/dynamic/static-positioned-to-absolute-positioned-expected.txt: Removed.
  • fast/dynamic/static-positioned-to-absolute-positioned.html: Removed.
  • fullscreen/full-screen-fixed-pos-parent-expected.txt:
  • platform/chromium-mac/fast/repaint/absolute-position-change-containing-block-expected.png:
  • platform/chromium-mac/fast/repaint/fixed-to-relative-position-with-absolute-child-expected.png:
  • platform/chromium-win/fast/dynamic/002-expected.txt:
  • platform/chromium/fast/dynamic/002-expected.txt:
  • platform/chromium/fast/repaint/absolute-position-change-containing-block-expected.png: Removed.
  • platform/chromium/fast/repaint/fixed-to-relative-position-with-absolute-child-expected.png: Removed.
  • platform/mac/fast/dynamic/002-expected.txt:
  • platform/mac/fast/repaint/absolute-position-change-containing-block-expected.png: Removed.
  • platform/mac/fast/repaint/fixed-to-relative-position-with-absolute-child-expected.png: Removed.

TBR=jchaffraix@webkit.org

Location:
branches/chromium/1410
Files:
14 deleted
15 edited

Legend:

Unmodified
Added
Removed
  • branches/chromium/1410/LayoutTests/fast/css/first-letter-removed-added-expected.txt

    r142015 r145374  
    3535PASS document.getElementById('test5').offsetWidth == document.getElementById('ref5').offsetWidth is true
    3636PASS document.getElementById('test6').offsetWidth == document.getElementById('ref6').offsetWidth is true
    37 PASS document.getElementById('test7').offsetWidth == document.getElementById('ref7').offsetWidth is true
     37FAIL document.getElementById('test7').offsetWidth == document.getElementById('ref7').offsetWidth should be true. Was false.
    3838PASS document.getElementById('test8').offsetWidth == document.getElementById('ref8').offsetWidth is true
    3939PASS successfullyParsed is true
  • branches/chromium/1410/LayoutTests/fullscreen/full-screen-fixed-pos-parent-expected.txt

    r142015 r145374  
    11
     2
  • branches/chromium/1410/LayoutTests/platform/chromium-win/fast/dynamic/002-expected.txt

    r142015 r145374  
    88          RenderText {#text} at (2,2) size 244x19
    99            text run at (2,2) width 244: "I should become a right-floating element."
    10         RenderText {#text} at (0,0) size 371x19
    11           text run at (0,0) width 184: "This text should be on the left. "
    12           text run at (184,0) width 187: "The float should be to the right."
     10        RenderBlock (anonymous) at (0,0) size 784x20
     11          RenderText {#text} at (0,0) size 371x19
     12            text run at (0,0) width 184: "This text should be on the left. "
     13            text run at (184,0) width 187: "The float should be to the right."
    1314      RenderBlock {DIV} at (0,20) size 784x30
    1415      RenderBlock {DIV} at (0,50) size 784x40
  • branches/chromium/1410/LayoutTests/platform/chromium/fast/dynamic/002-expected.txt

    r142015 r145374  
    88          RenderText {#text} at (2,2) size 258x18
    99            text run at (2,2) width 258: "I should become a right-floating element."
    10         RenderText {#text} at (0,0) size 393x18
    11           text run at (0,0) width 195: "This text should be on the left. "
    12           text run at (195,0) width 198: "The float should be to the right."
     10        RenderBlock (anonymous) at (0,0) size 784x18
     11          RenderText {#text} at (0,0) size 393x18
     12            text run at (0,0) width 195: "This text should be on the left. "
     13            text run at (195,0) width 198: "The float should be to the right."
    1314      RenderBlock {DIV} at (0,18) size 784x30
    1415      RenderBlock {DIV} at (0,48) size 784x36
  • branches/chromium/1410/LayoutTests/platform/mac/fast/dynamic/002-expected.txt

    r142015 r145374  
    88          RenderText {#text} at (2,2) size 258x18
    99            text run at (2,2) width 258: "I should become a right-floating element."
    10         RenderText {#text} at (0,0) size 393x18
    11           text run at (0,0) width 195: "This text should be on the left. "
    12           text run at (195,0) width 198: "The float should be to the right."
     10        RenderBlock (anonymous) at (0,0) size 784x18
     11          RenderText {#text} at (0,0) size 393x18
     12            text run at (0,0) width 195: "This text should be on the left. "
     13            text run at (195,0) width 198: "The float should be to the right."
    1314      RenderBlock {DIV} at (0,18) size 784x30
    1415      RenderBlock {DIV} at (0,48) size 784x36
  • branches/chromium/1410/Source/WebCore/dom/Node.cpp

    r143086 r145374  
    383383        ch = Detach;
    384384
    385     // Re-attach the renderer when either the element changes from position:static to position:absolute/fixed, vice-versa
    386     // or float:none to floating, vice-versa.
    387     if ((s1 && s2 ) && (s1->isFloating() != s2->isFloating() || s1->hasOutOfFlowPosition() != s2->hasOutOfFlowPosition()))
    388         ch = Detach;
    389 
    390385    return ch;
    391386}
  • branches/chromium/1410/Source/WebCore/rendering/RenderBlock.cpp

    r145118 r145374  
    69366936}
    69376937
     6938void RenderBlock::childBecameNonInline(RenderObject*)
     6939{
     6940    makeChildrenNonInline();
     6941    if (isAnonymousBlock() && parent() && parent()->isRenderBlock())
     6942        toRenderBlock(parent())->removeLeftoverAnonymousBlock(this);
     6943    // |this| may be dead here
     6944}
     6945
    69386946void RenderBlock::updateHitTestResult(HitTestResult& result, const LayoutPoint& point)
    69396947{
  • branches/chromium/1410/Source/WebCore/rendering/RenderBlock.h

    r145118 r145374  
    881881    virtual RenderObject* hoverAncestor() const;
    882882    virtual void updateDragState(bool dragOn);
     883    virtual void childBecameNonInline(RenderObject* child);
    883884
    884885    virtual LayoutRect selectionRectForRepaint(const RenderLayerModelObject* repaintContainer, bool /*clipToVisibleContent*/) OVERRIDE
  • branches/chromium/1410/Source/WebCore/rendering/RenderBoxModelObject.h

    r142015 r145374  
    146146
    147147    virtual LayoutUnit containingBlockLogicalWidthForContent() const;
     148
     149    virtual void childBecameNonInline(RenderObject* /*child*/) { }
    148150
    149151    void paintBorder(const PaintInfo&, const LayoutRect&, const RenderStyle*, BackgroundBleedAvoidance = BackgroundBleedNone, bool includeLogicalLeftEdge = true, bool includeLogicalRightEdge = true);
  • branches/chromium/1410/Source/WebCore/rendering/RenderInline.cpp

    r145118 r145374  
    12251225}
    12261226
     1227void RenderInline::childBecameNonInline(RenderObject* child)
     1228{
     1229    // We have to split the parent flow.
     1230    RenderBlock* newBox = containingBlock()->createAnonymousBlock();
     1231    RenderBoxModelObject* oldContinuation = continuation();
     1232    setContinuation(newBox);
     1233    RenderObject* beforeChild = child->nextSibling();
     1234    children()->removeChildNode(this, child);
     1235    splitFlow(beforeChild, newBox, child, oldContinuation);
     1236}
     1237
    12271238void RenderInline::updateHitTestResult(HitTestResult& result, const LayoutPoint& point)
    12281239{
  • branches/chromium/1410/Source/WebCore/rendering/RenderInline.h

    r145118 r145374  
    166166    virtual LayoutUnit lineHeight(bool firstLine, LineDirectionMode, LinePositionMode = PositionOnContainingLine) const;
    167167    virtual int baselinePosition(FontBaseline, bool firstLine, LineDirectionMode, LinePositionMode = PositionOnContainingLine) const;
     168   
     169    virtual void childBecameNonInline(RenderObject* child);
    168170
    169171    virtual void updateHitTestResult(HitTestResult&, const LayoutPoint&);
  • branches/chromium/1410/Source/WebCore/rendering/RenderObject.cpp

    r145118 r145374  
    118118
    119119COMPILE_ASSERT(sizeof(RenderObject) == sizeof(SameSizeAsRenderObject), RenderObject_should_stay_small);
     120
     121bool RenderObject::s_affectsParentBlock = false;
    120122
    121123RenderObjectAncestorLineboxDirtySet* RenderObject::s_ancestorLineboxDirtySet = 0;
     
    16771679}
    16781680
     1681void RenderObject::handleDynamicFloatPositionChange()
     1682{
     1683    // We have gone from not affecting the inline status of the parent flow to suddenly
     1684    // having an impact.  See if there is a mismatch between the parent flow's
     1685    // childrenInline() state and our state.
     1686    setInline(style()->isDisplayInlineType());
     1687    if (isInline() != parent()->childrenInline()) {
     1688        if (!isInline())
     1689            toRenderBoxModelObject(parent())->childBecameNonInline(this);
     1690        else {
     1691            // An anonymous block must be made to wrap this inline.
     1692            RenderBlock* block = toRenderBlock(parent())->createAnonymousBlock();
     1693            RenderObjectChildList* childlist = parent()->virtualChildren();
     1694            childlist->insertChildNode(parent(), block, this);
     1695            block->children()->appendChildNode(block, childlist->removeChildNode(parent(), this));
     1696        }
     1697    }
     1698}
     1699
    16791700void RenderObject::setAnimatableStyle(PassRefPtr<RenderStyle> style)
    16801701{
     
    18741895            toRenderBox(this)->removeFloatingOrPositionedChildFromBlockLists();
    18751896
     1897        s_affectsParentBlock = isFloatingOrOutOfFlowPositioned()
     1898            && (!newStyle->isFloating() && !newStyle->hasOutOfFlowPosition())
     1899            && parent() && (parent()->isBlockFlow() || parent()->isRenderInline());
     1900
    18761901        // reset style flags
    18771902        if (diff == StyleDifferenceLayout || diff == StyleDifferenceLayoutPositionedMovementOnly) {
     
    18841909        setHasTransform(false);
    18851910        setHasReflection(false);
    1886     }
     1911    } else
     1912        s_affectsParentBlock = false;
    18871913
    18881914    if (view()->frameView()) {
     
    19361962void RenderObject::styleDidChange(StyleDifference diff, const RenderStyle* oldStyle)
    19371963{
     1964    if (s_affectsParentBlock)
     1965        handleDynamicFloatPositionChange();
    19381966
    19391967#if ENABLE(SVG)
  • branches/chromium/1410/Source/WebCore/rendering/RenderObject.h

    r145118 r145374  
    243243    virtual RenderBlock* firstLineBlock() const;
    244244
     245    // Called when an object that was floating or positioned becomes a normal flow object
     246    // again.  We have to make sure the render tree updates as needed to accommodate the new
     247    // normal flow object.
     248    void handleDynamicFloatPositionChange();
     249   
    245250    // RenderObject tree manipulation
    246251    //////////////////////////////////////////
     
    11391144    void setIsDragging(bool b) { m_bitfields.setIsDragging(b); }
    11401145    void setEverHadLayout(bool b) { m_bitfields.setEverHadLayout(b); }
     1146
     1147private:
     1148    // Store state between styleWillChange and styleDidChange
     1149    static bool s_affectsParentBlock;
    11411150};
    11421151
Note: See TracChangeset for help on using the changeset viewer.