Ignore:
Timestamp:
Oct 14, 2013, 12:35:32 PM (12 years ago)
Author:
[email protected]
Message:

[CSS Shapes] Image valued shape-outside shapes should update the layout after the image has been loaded
https://bugs.webkit.org/show_bug.cgi?id=122340

Reviewed by Simon Fraser.

Source/WebCore:

Ensure that the an image-valued shape-outside layout is updated after the image has
been loaded.

Test: http/tests/css/css-image-valued-shape.html

  • rendering/RenderBlock.cpp:

(WebCore::RenderBlock::imageChanged): Added code for the shape-outside case.
(WebCore::RenderBlock::updateShapeInsideInfoAfterStyleChange): Ditto.

  • rendering/RenderElement.cpp:

(WebCore::RenderElement::~RenderElement): Ditto.
(WebCore::RenderElement::setStyle): Ditto.

LayoutTests:

Verify that an image-valued shape-outside layout is updated after the image has been loaded.

  • http/tests/css/css-image-valued-shape-expected.txt: Added.
  • http/tests/css/css-image-valued-shape.html: Added.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/rendering/RenderElement.cpp

    r157408 r157414  
    105105#if ENABLE(CSS_SHAPES)
    106106        if (auto shapeValue = m_style->shapeInside()) {
     107            if (auto shapeImage = shapeValue->image())
     108                shapeImage->removeClient(this);
     109        }
     110        if (auto shapeValue = m_style->shapeOutside()) {
    107111            if (auto shapeImage = shapeValue->image())
    108112                shapeImage->removeClient(this);
     
    382386#if ENABLE(CSS_SHAPES)
    383387    updateShapeImage(oldStyle ? oldStyle->shapeInside() : 0, m_style ? m_style->shapeInside() : 0);
     388    updateShapeImage(oldStyle ? oldStyle->shapeOutside() : 0, m_style ? m_style->shapeOutside() : 0);
    384389#endif
    385390
Note: See TracChangeset for help on using the changeset viewer.