Changeset 41769 in webkit


Ignore:
Timestamp:
Mar 17, 2009 10:30:52 AM (15 years ago)
Author:
hyatt@apple.com
Message:

WebCore:

2009-03-16 David Hyatt <hyatt@apple.com>

<rdar://problem/6648411> REGRESSION: Layout of page is wrong at http://www.popcap.com/

Make sure that the initial shouldPaint check that looks at enclosingLayers properly skips over
layers that don't paint themselves. This is done by adding a new boolean parameter to enclosingLayer
so that RenderObjects can walk up the enclosing layer chain and skip any layers that don't paint
themselves.

Reviewed by Darin Adler.

Added fast/block/float/overlapping-floats-with-overflow-hidden.html

  • WebCore.base.exp:
  • rendering/RenderBlock.cpp: (WebCore::RenderBlock::addOverhangingFloats):
  • rendering/RenderObject.cpp: (WebCore::RenderObject::enclosingSelfPaintingLayer):
  • rendering/RenderObject.h:

LayoutTests:

2009-03-16 David Hyatt <hyatt@apple.com>

<rdar://problem/6648411> REGRESSION: Layout of page is wrong at http://www.popcap.com/

Make sure that the initial shouldPaint check that looks at enclosingLayers properly skips over
layers that don't paint themselves. This is done by adding a new enclosingSelfPaintingLayer method
so that RenderObjects can walk up the enclosing layer chain and skip any layers that don't paint
themselves.

Reviewed by Darin Adler.

  • fast/block/float/overlapping-floats-with-overflow-hidden.html: Added.
  • platform/mac/fast/block/float/overlapping-floats-with-overflow-hidden-expected.checksum: Added.
  • platform/mac/fast/block/float/overlapping-floats-with-overflow-hidden-expected.png: Added.
  • platform/mac/fast/block/float/overlapping-floats-with-overflow-hidden-expected.txt: Added.
Location:
trunk
Files:
4 added
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r41766 r41769  
     12009-03-16  David Hyatt  <hyatt@apple.com>
     2
     3        <rdar://problem/6648411> REGRESSION: Layout of page is wrong at http://www.popcap.com/
     4
     5        Make sure that the initial shouldPaint check that looks at enclosingLayers properly skips over
     6        layers that don't paint themselves.  This is done by adding a new enclosingSelfPaintingLayer method
     7        so that RenderObjects can walk up the enclosing layer chain and skip any layers that don't paint
     8        themselves.
     9
     10        Reviewed by Darin Adler.
     11
     12        * fast/block/float/overlapping-floats-with-overflow-hidden.html: Added.
     13        * platform/mac/fast/block/float/overlapping-floats-with-overflow-hidden-expected.checksum: Added.
     14        * platform/mac/fast/block/float/overlapping-floats-with-overflow-hidden-expected.png: Added.
     15        * platform/mac/fast/block/float/overlapping-floats-with-overflow-hidden-expected.txt: Added.
     16
    1172009-03-17  Darin Adler  <darin@apple.com>
    218
  • trunk/WebCore/ChangeLog

    r41768 r41769  
     12009-03-16  David Hyatt  <hyatt@apple.com>
     2
     3        <rdar://problem/6648411> REGRESSION: Layout of page is wrong at http://www.popcap.com/
     4
     5        Make sure that the initial shouldPaint check that looks at enclosingLayers properly skips over
     6        layers that don't paint themselves.  This is done by adding a new boolean parameter to enclosingLayer
     7        so that RenderObjects can walk up the enclosing layer chain and skip any layers that don't paint
     8        themselves.
     9
     10        Reviewed by Darin Adler.
     11
     12        Added fast/block/float/overlapping-floats-with-overflow-hidden.html
     13
     14        * WebCore.base.exp:
     15        * rendering/RenderBlock.cpp:
     16        (WebCore::RenderBlock::addOverhangingFloats):
     17        * rendering/RenderObject.cpp:
     18        (WebCore::RenderObject::enclosingSelfPaintingLayer):
     19        * rendering/RenderObject.h:
     20
    1212009-03-17  Xan Lopez  <xlopez@igalia.com>
    222
  • trunk/WebCore/rendering/RenderBlock.cpp

    r41742 r41769  
    30773077                // behaves properly).  We always want to propagate the desire to paint the float as
    30783078                // far out as we can, to the outermost block that overlaps the float, stopping only
    3079                 // if we hit a layer boundary.
    3080                 if (r->m_renderer->enclosingLayer() == enclosingLayer())
     3079                // if we hit a self-painting layer boundary.
     3080                if (r->m_renderer->enclosingSelfPaintingLayer() == enclosingSelfPaintingLayer())
    30813081                    r->m_shouldPaint = false;
    30823082                else
  • trunk/WebCore/rendering/RenderObject.cpp

    r41725 r41769  
    514514        RenderLayer* layer = curr->hasLayer() ? toRenderBoxModelObject(curr)->layer() : 0;
    515515        if (layer)
     516            return layer;
     517        curr = curr->parent();
     518    }
     519    return 0;
     520}
     521
     522RenderLayer* RenderObject::enclosingSelfPaintingLayer() const
     523{
     524    const RenderObject* curr = this;
     525    while (curr) {
     526        RenderLayer* layer = curr->hasLayer() ? toRenderBoxModelObject(curr)->layer() : 0;
     527        if (layer && layer->isSelfPaintingLayer())
    516528            return layer;
    517529        curr = curr->parent();
  • trunk/WebCore/rendering/RenderObject.h

    r41748 r41769  
    166166    RenderObject* lastLeafChild() const;
    167167
    168     // The following five functions are used when the render tree hierarchy changes to make sure layers get
     168    // The following six functions are used when the render tree hierarchy changes to make sure layers get
    169169    // properly added and removed.  Since containership can be implemented by any subclass, and since a hierarchy
    170170    // can contain a mixture of boxes and other object types, these functions need to be in the base class.
    171171    RenderLayer* enclosingLayer() const;
    172    
     172    RenderLayer* enclosingSelfPaintingLayer() const;
    173173    void addLayers(RenderLayer* parentLayer, RenderObject* newObject);
    174174    void removeLayers(RenderLayer* parentLayer);
Note: See TracChangeset for help on using the changeset viewer.