Changeset 137930 in webkit


Ignore:
Timestamp:
Dec 17, 2012 12:07:57 PM (11 years ago)
Author:
commit-queue@webkit.org
Message:

[CSS Exclusions] shape-outside on floats for rectangle shapes height/width
https://bugs.webkit.org/show_bug.cgi?id=100398

Patch by Bem Jones-Bey <Bem Jones-Bey> on 2012-12-17
Reviewed by Julien Chaffraix.

Source/WebCore:

Implement shape outside for floats changing only the height and width
as a simple starting point.

This implementation changes floats to use the bounding box of the
shape outside instead of the margin box for layout. The content box of
the float is unchanged. This patch does not support positioning the
shape outside box, so the x and y parameters are currently ignored in
the specified shape. This will be fixed in a patch for bug 100399.

Tests: fast/exclusions/shape-outside-floats/shape-outside-floats-margin-is-ignored.html

fast/exclusions/shape-outside-floats/shape-outside-floats-simple-rectangle-horizontal-multiple.html
fast/exclusions/shape-outside-floats/shape-outside-floats-simple-rectangle-percentage.html
fast/exclusions/shape-outside-floats/shape-outside-floats-simple-rectangle.html

  • CMakeLists.txt: Add ExclusionShapeOutsideInfo.{cpp,h}.
  • GNUmakefile.list.am: Add ExclusionShapeOutsideInfo.{cpp,h}.
  • Target.pri: Add ExclusionShapeOutsideInfo.{cpp,h}.
  • WebCore.gypi: Add ExclusionShapeOutsideInfo.{cpp,h}.
  • WebCore.vcproj/WebCore.vcproj: Add ExclusionShapeOutsideInfo.{cpp,h}.
  • WebCore.xcodeproj/project.pbxproj: Add ExclusionShapeOutsideInfo.{cpp,h}.
  • rendering/ExclusionShapeOutsideInfo.cpp: Added. Associates the

ExclusionShape object for shape outside with a RenderBox. Analagous to
ExclusionShapeInsideInfo.

(WebCore::exclusionShapeOutsideInfoMap):
(WebCore::ExclusionShapeOutsideInfo::ExclusionShapeOutsideInfo):
(WebCore::ExclusionShapeOutsideInfo::~ExclusionShapeOutsideInfo):
(WebCore::ExclusionShapeOutsideInfo::ensureInfoForRenderBox):
(WebCore::ExclusionShapeOutsideInfo::infoForRenderBox):
(WebCore::ExclusionShapeOutsideInfo::isInfoEnabledForRenderBox):
(WebCore::ExclusionShapeOutsideInfo::removeInfoForRenderBox):
(WebCore::ExclusionShapeOutsideInfo::computedShape):

  • rendering/ExclusionShapeOutsideInfo.h: Added. Associates the

ExclusionShape object for shape outside with a RenderBox. Analagous to
ExclusionShapeInsideInfo.

(ExclusionShapeOutsideInfo):
(WebCore::ExclusionShapeOutsideInfo::create):
(WebCore::ExclusionShapeOutsideInfo::shapeLogicalLeft):
(WebCore::ExclusionShapeOutsideInfo::shapeLogicalRight):
(WebCore::ExclusionShapeOutsideInfo::shapeLogicalTop):
(WebCore::ExclusionShapeOutsideInfo::shapeLogicalBottom):
(WebCore::ExclusionShapeOutsideInfo::shapeLogicalWidth):
(WebCore::ExclusionShapeOutsideInfo::shapeLogicalHeight):
(WebCore::ExclusionShapeOutsideInfo::setShapeSize):
(WebCore::ExclusionShapeOutsideInfo::dirtyShapeSize):

  • rendering/RenderBlock.cpp:

(WebCore::RenderBlock::insertFloatingObject): Use the shape outside's bounding box to set the width that is

used for inline layout for the float and it's siblings.

(WebCore::RenderBlock::positionNewFloats): Use the shape outside's bounding box to set the height that

is used for inline layout for the float and it's siblings. Ignore margins when positioning if the float
has shape outside, per the exclusions spec.

  • rendering/RenderBox.cpp:

(WebCore::RenderBox::willBeDestroyed): Clean up associated ExclusionShape.
(WebCore::RenderBox::styleDidChange): Handle style change for shape outside.
(WebCore::RenderBox::updateExclusionShapeOutsideInfoAfterStyleChange): Handle style change for shape outside.

  • rendering/RenderBox.h:

(WebCore::RenderBox::exclusionShapeOutsideInfo): Get the ExclusionShapeOutsideInfo associated with this

RenderBox.

LayoutTests:

Tests for the basic shape outside functionality to show how the shape affects inline text and other floats.
Also test using percentages to specify the shape and that margins are properly ignored (per the spec), when a
shape is applied to a float.

  • fast/exclusions/shape-outside-floats/shape-outside-floats-margin-is-ignored-expected.html: Added.
  • fast/exclusions/shape-outside-floats/shape-outside-floats-margin-is-ignored.html: Added.
  • fast/exclusions/shape-outside-floats/shape-outside-floats-simple-rectangle-expected.html: Added.
  • fast/exclusions/shape-outside-floats/shape-outside-floats-simple-rectangle-horizontal-multiple-expected.html: Added.
  • fast/exclusions/shape-outside-floats/shape-outside-floats-simple-rectangle-horizontal-multiple.html: Added.
  • fast/exclusions/shape-outside-floats/shape-outside-floats-simple-rectangle-percentage-expected.html: Added.
  • fast/exclusions/shape-outside-floats/shape-outside-floats-simple-rectangle-percentage.html: Added.
  • fast/exclusions/shape-outside-floats/shape-outside-floats-simple-rectangle.html: Added.
Location:
trunk
Files:
11 added
11 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r137928 r137930  
     12012-12-17  Bem Jones-Bey  <bjonesbe@adobe.com>
     2
     3        [CSS Exclusions] shape-outside on floats for rectangle shapes height/width
     4        https://bugs.webkit.org/show_bug.cgi?id=100398
     5
     6        Reviewed by Julien Chaffraix.
     7
     8        Tests for the basic shape outside functionality to show how the shape affects inline text and other floats.
     9        Also test using percentages to specify the shape and that margins are properly ignored (per the spec), when a
     10        shape is applied to a float.
     11
     12        * fast/exclusions/shape-outside-floats/shape-outside-floats-margin-is-ignored-expected.html: Added.
     13        * fast/exclusions/shape-outside-floats/shape-outside-floats-margin-is-ignored.html: Added.
     14        * fast/exclusions/shape-outside-floats/shape-outside-floats-simple-rectangle-expected.html: Added.
     15        * fast/exclusions/shape-outside-floats/shape-outside-floats-simple-rectangle-horizontal-multiple-expected.html: Added.
     16        * fast/exclusions/shape-outside-floats/shape-outside-floats-simple-rectangle-horizontal-multiple.html: Added.
     17        * fast/exclusions/shape-outside-floats/shape-outside-floats-simple-rectangle-percentage-expected.html: Added.
     18        * fast/exclusions/shape-outside-floats/shape-outside-floats-simple-rectangle-percentage.html: Added.
     19        * fast/exclusions/shape-outside-floats/shape-outside-floats-simple-rectangle.html: Added.
     20
    1212012-12-17  John J. Barton  <johnjbarton@chromium.org>
    222
  • trunk/Source/WebCore/CMakeLists.txt

    r137795 r137930  
    20862086    rendering/ExclusionShape.cpp
    20872087    rendering/ExclusionShapeInsideInfo.cpp
     2088    rendering/ExclusionShapeOutsideInfo.cpp
    20882089    rendering/FilterEffectRenderer.cpp
    20892090    rendering/FixedTableLayout.cpp
  • trunk/Source/WebCore/ChangeLog

    r137928 r137930  
     12012-12-17  Bem Jones-Bey  <bjonesbe@adobe.com>
     2
     3        [CSS Exclusions] shape-outside on floats for rectangle shapes height/width
     4        https://bugs.webkit.org/show_bug.cgi?id=100398
     5
     6        Reviewed by Julien Chaffraix.
     7
     8        Implement shape outside for floats changing only the height and width
     9        as a simple starting point.
     10
     11        This implementation changes floats to use the bounding box of the
     12        shape outside instead of the margin box for layout. The content box of
     13        the float is unchanged. This patch does not support positioning the
     14        shape outside box, so the x and y parameters are currently ignored in
     15        the specified shape. This will be fixed in a patch for bug 100399.
     16
     17        Tests: fast/exclusions/shape-outside-floats/shape-outside-floats-margin-is-ignored.html
     18               fast/exclusions/shape-outside-floats/shape-outside-floats-simple-rectangle-horizontal-multiple.html
     19               fast/exclusions/shape-outside-floats/shape-outside-floats-simple-rectangle-percentage.html
     20               fast/exclusions/shape-outside-floats/shape-outside-floats-simple-rectangle.html
     21
     22        * CMakeLists.txt: Add ExclusionShapeOutsideInfo.{cpp,h}.
     23        * GNUmakefile.list.am: Add ExclusionShapeOutsideInfo.{cpp,h}.
     24        * Target.pri: Add ExclusionShapeOutsideInfo.{cpp,h}.
     25        * WebCore.gypi: Add ExclusionShapeOutsideInfo.{cpp,h}.
     26        * WebCore.vcproj/WebCore.vcproj: Add ExclusionShapeOutsideInfo.{cpp,h}.
     27        * WebCore.xcodeproj/project.pbxproj: Add ExclusionShapeOutsideInfo.{cpp,h}.
     28        * rendering/ExclusionShapeOutsideInfo.cpp: Added. Associates the
     29            ExclusionShape object for shape outside with a RenderBox. Analagous to
     30            ExclusionShapeInsideInfo.
     31        (WebCore::exclusionShapeOutsideInfoMap):
     32        (WebCore::ExclusionShapeOutsideInfo::ExclusionShapeOutsideInfo):
     33        (WebCore::ExclusionShapeOutsideInfo::~ExclusionShapeOutsideInfo):
     34        (WebCore::ExclusionShapeOutsideInfo::ensureInfoForRenderBox):
     35        (WebCore::ExclusionShapeOutsideInfo::infoForRenderBox):
     36        (WebCore::ExclusionShapeOutsideInfo::isInfoEnabledForRenderBox):
     37        (WebCore::ExclusionShapeOutsideInfo::removeInfoForRenderBox):
     38        (WebCore::ExclusionShapeOutsideInfo::computedShape):
     39        * rendering/ExclusionShapeOutsideInfo.h: Added. Associates the
     40            ExclusionShape object for shape outside with a RenderBox. Analagous to
     41            ExclusionShapeInsideInfo.
     42        (ExclusionShapeOutsideInfo):
     43        (WebCore::ExclusionShapeOutsideInfo::create):
     44        (WebCore::ExclusionShapeOutsideInfo::shapeLogicalLeft):
     45        (WebCore::ExclusionShapeOutsideInfo::shapeLogicalRight):
     46        (WebCore::ExclusionShapeOutsideInfo::shapeLogicalTop):
     47        (WebCore::ExclusionShapeOutsideInfo::shapeLogicalBottom):
     48        (WebCore::ExclusionShapeOutsideInfo::shapeLogicalWidth):
     49        (WebCore::ExclusionShapeOutsideInfo::shapeLogicalHeight):
     50        (WebCore::ExclusionShapeOutsideInfo::setShapeSize):
     51        (WebCore::ExclusionShapeOutsideInfo::dirtyShapeSize):
     52        * rendering/RenderBlock.cpp:
     53        (WebCore::RenderBlock::insertFloatingObject): Use the shape outside's bounding box to set the width that is
     54            used for inline layout for the float and it's siblings.
     55        (WebCore::RenderBlock::positionNewFloats): Use the shape outside's bounding box to set the height that
     56            is used for inline layout for the float and it's siblings. Ignore margins when positioning if the float
     57            has shape outside, per the exclusions spec.
     58        * rendering/RenderBox.cpp:
     59        (WebCore::RenderBox::willBeDestroyed): Clean up associated ExclusionShape.
     60        (WebCore::RenderBox::styleDidChange): Handle style change for shape outside.
     61        (WebCore::RenderBox::updateExclusionShapeOutsideInfoAfterStyleChange): Handle style change for shape outside.
     62        * rendering/RenderBox.h:
     63        (WebCore::RenderBox::exclusionShapeOutsideInfo): Get the ExclusionShapeOutsideInfo associated with this
     64            RenderBox.
     65
    1662012-12-17  John J. Barton  <johnjbarton@chromium.org>
    267
  • trunk/Source/WebCore/GNUmakefile.list.am

    r137839 r137930  
    42444244        Source/WebCore/rendering/ExclusionShapeInsideInfo.cpp \
    42454245        Source/WebCore/rendering/ExclusionShapeInsideInfo.h \
     4246        Source/WebCore/rendering/ExclusionShapeOutsideInfo.cpp \
     4247        Source/WebCore/rendering/ExclusionShapeOutsideInfo.h \
    42464248        Source/WebCore/rendering/FilterEffectRenderer.cpp \
    42474249        Source/WebCore/rendering/FilterEffectRenderer.h \
  • trunk/Source/WebCore/Target.pri

    r137795 r137930  
    11291129    rendering/ExclusionShape.cpp \
    11301130    rendering/ExclusionShapeInsideInfo.cpp \
     1131    rendering/ExclusionShapeOutsideInfo.cpp \
    11311132    rendering/FilterEffectRenderer.cpp \
    11321133    rendering/FixedTableLayout.cpp \
     
    23672368    rendering/ExclusionShape.h \
    23682369    rendering/ExclusionShapeInsideInfo.h \
     2370    rendering/ExclusionShapeOutsideInfo.h \
    23692371    rendering/FilterEffectRenderer.h \
    23702372    rendering/FixedTableLayout.h \
  • trunk/Source/WebCore/WebCore.gypi

    r137795 r137930  
    22462246            'rendering/ExclusionShapeInsideInfo.cpp',
    22472247            'rendering/ExclusionShapeInsideInfo.h',
     2248            'rendering/ExclusionShapeOutsideInfo.cpp',
     2249            'rendering/ExclusionShapeOutsideInfo.h',
    22482250            'rendering/FilterEffectRenderer.cpp',
    22492251            'rendering/FilterEffectRenderer.h',
  • trunk/Source/WebCore/WebCore.vcproj/WebCore.vcproj

    r137795 r137930  
    3857538575                        </File>
    3857638576                        <File
     38577                                RelativePath="..\rendering\ExclusionShapeOutsideInfo.cpp"
     38578                                >
     38579                        </File>
     38580                        <File
     38581                                RelativePath="..\rendering\ExclusionShapeOutsideInfo.h"
     38582                                >
     38583                        </File>
     38584                        <File
    3857738585                                RelativePath="..\rendering\FilterEffectRenderer.cpp"
    3857838586                                >
  • trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj

    r137876 r137930  
    37593759                98EB1F951313FE0500D0E1EA /* NotImplemented.h in Headers */ = {isa = PBXBuildFile; fileRef = 98EB1F941313FE0500D0E1EA /* NotImplemented.h */; settings = {ATTRIBUTES = (Private, ); }; };
    37603760                9A1B6F97158869C80011A8C4 /* JSDOMStringListCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9A1B6F96158869C80011A8C4 /* JSDOMStringListCustom.cpp */; };
     3761                9A9CEF8D163B3EA100DE7EFE /* ExclusionShapeOutsideInfo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9A9CEF8B163B3EA100DE7EFE /* ExclusionShapeOutsideInfo.cpp */; };
     3762                9A9CEF8E163B3EA100DE7EFE /* ExclusionShapeOutsideInfo.h in Headers */ = {isa = PBXBuildFile; fileRef = 9A9CEF8C163B3EA100DE7EFE /* ExclusionShapeOutsideInfo.h */; settings = {ATTRIBUTES = (Private, ); }; };
    37613763                9B0FB191140DB5790022588F /* HTTPValidation.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9B0FB18F140DB5790022588F /* HTTPValidation.cpp */; };
    37623764                9B0FB192140DB5790022588F /* HTTPValidation.h in Headers */ = {isa = PBXBuildFile; fileRef = 9B0FB190140DB5790022588F /* HTTPValidation.h */; };
     
    1109311095                98EB1F941313FE0500D0E1EA /* NotImplemented.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NotImplemented.h; sourceTree = "<group>"; };
    1109411096                9A1B6F96158869C80011A8C4 /* JSDOMStringListCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSDOMStringListCustom.cpp; sourceTree = "<group>"; };
     11097                9A9CEF8B163B3EA100DE7EFE /* ExclusionShapeOutsideInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ExclusionShapeOutsideInfo.cpp; sourceTree = "<group>"; };
     11098                9A9CEF8C163B3EA100DE7EFE /* ExclusionShapeOutsideInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ExclusionShapeOutsideInfo.h; sourceTree = "<group>"; };
    1109511099                9B0FB18F140DB5790022588F /* HTTPValidation.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = HTTPValidation.cpp; sourceTree = "<group>"; };
    1109611100                9B0FB190140DB5790022588F /* HTTPValidation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HTTPValidation.h; sourceTree = "<group>"; };
     
    2165721661                                FD748ABD15BF74ED0059CF0D /* ExclusionShapeInsideInfo.cpp */,
    2165821662                                FD748ABE15BF74ED0059CF0D /* ExclusionShapeInsideInfo.h */,
     21663                                9A9CEF8B163B3EA100DE7EFE /* ExclusionShapeOutsideInfo.cpp */,
     21664                                9A9CEF8C163B3EA100DE7EFE /* ExclusionShapeOutsideInfo.h */,
    2165921665                                31313F631443B35E006E2A90 /* FilterEffectRenderer.cpp */,
    2166021666                                31313F641443B35E006E2A90 /* FilterEffectRenderer.h */,
     
    2261822624                                41E1B1D10FF5986900576B3B /* AbstractWorker.h in Headers */,
    2261922625                                29A8122E0FBB9C1D00510293 /* AccessibilityARIAGridCell.h in Headers */,
     22626                                9A9CEF8E163B3EA100DE7EFE /* ExclusionShapeOutsideInfo.h in Headers */,
    2262022627                                29A812330FBB9C1D00510293 /* AccessibilityARIAGridRow.h in Headers */,
    2262122628                                29A8123B0FBB9C1D00510293 /* AccessibilityImageMapLink.h in Headers */,
     
    2906829075                                F37A56221679CF7B00C57046 /* HeapGraphSerializer.cpp in Sources */,
    2906929076                                CD1E7347167BC78E009A885D /* TextTrackRepresentation.cpp in Sources */,
     29077                                9A9CEF8D163B3EA100DE7EFE /* ExclusionShapeOutsideInfo.cpp in Sources */,
    2907029078                        );
    2907129079                        runOnlyForDeploymentPostprocessing = 0;
  • trunk/Source/WebCore/rendering/RenderBlock.cpp

    r137920 r137930  
    6666#if ENABLE(CSS_EXCLUSIONS)
    6767#include "ExclusionShapeInsideInfo.h"
     68#include "ExclusionShapeOutsideInfo.h"
    6869#endif
    6970#include <wtf/MemoryInstrumentationHashMap.h>
     
    37503751        o->computeAndSetBlockDirectionMargins(this);
    37513752    }
    3752     setLogicalWidthForFloat(newObj, logicalWidthForChild(o) + marginStartForChild(o) + marginEndForChild(o));
     3753
     3754#if ENABLE(CSS_EXCLUSIONS)
     3755    ExclusionShapeOutsideInfo* shapeOutside = o->exclusionShapeOutsideInfo();
     3756    if (shapeOutside) {
     3757        shapeOutside->setShapeSize(o->logicalWidth(), o->logicalHeight());
     3758        // The CSS Exclusions specification says that the margins are ignored
     3759        // when a float has a shape outside.
     3760        setLogicalWidthForFloat(newObj, shapeOutside->shapeLogicalWidth());
     3761    } else
     3762#endif
     3763        setLogicalWidthForFloat(newObj, logicalWidthForChild(o) + marginStartForChild(o) + marginEndForChild(o));
    37533764
    37543765    newObj->setShouldPaint(!o->hasSelfPaintingLayer()); // If a layer exists, the float will paint itself. Otherwise someone else will.
     
    39363947
    39373948        setLogicalLeftForFloat(floatingObject, floatLogicalLocation.x());
    3938         setLogicalLeftForChild(childBox, floatLogicalLocation.x() + childLogicalLeftMargin);
    3939         setLogicalTopForChild(childBox, floatLogicalLocation.y() + marginBeforeForChild(childBox));
     3949
     3950        bool hasShapeOutside = false;
     3951#if ENABLE(CSS_EXCLUSIONS)
     3952        hasShapeOutside = floatingObject->renderer()->exclusionShapeOutsideInfo();
     3953#endif
     3954        // The CSS Exclusions specification says that the margins are ignored when a float has a shape outside.
     3955        setLogicalLeftForChild(childBox, floatLogicalLocation.x() + (hasShapeOutside ? LayoutUnit() : childLogicalLeftMargin));
     3956        setLogicalTopForChild(childBox, floatLogicalLocation.y() + (hasShapeOutside ? LayoutUnit() : marginBeforeForChild(childBox)));
    39403957
    39413958        LayoutState* layoutState = view()->layoutState();
     
    39653982                floatLogicalLocation = computeLogicalLocationForFloat(floatingObject, newLogicalTop);
    39663983                setLogicalLeftForFloat(floatingObject, floatLogicalLocation.x());
    3967                 setLogicalLeftForChild(childBox, floatLogicalLocation.x() + childLogicalLeftMargin);
    3968                 setLogicalTopForChild(childBox, floatLogicalLocation.y() + marginBeforeForChild(childBox));
     3984
     3985                // The CSS Exclusions specification says that the margins are ignored when a float has a shape outside.
     3986                setLogicalLeftForChild(childBox, floatLogicalLocation.x() + (hasShapeOutside ? LayoutUnit() : childLogicalLeftMargin));
     3987                setLogicalTopForChild(childBox, floatLogicalLocation.y() + (hasShapeOutside ? LayoutUnit() : marginBeforeForChild(childBox)));
    39693988       
    39703989                if (childBlock)
     
    39753994
    39763995        setLogicalTopForFloat(floatingObject, floatLogicalLocation.y());
    3977         setLogicalHeightForFloat(floatingObject, logicalHeightForChild(childBox) + marginBeforeForChild(childBox) + marginAfterForChild(childBox));
     3996#if ENABLE(CSS_EXCLUSIONS)
     3997        if (hasShapeOutside)
     3998            setLogicalHeightForFloat(floatingObject, floatingObject->renderer()->exclusionShapeOutsideInfo()->shapeLogicalHeight());
     3999        else
     4000#endif
     4001            setLogicalHeightForFloat(floatingObject, logicalHeightForChild(childBox) + marginBeforeForChild(childBox) + marginAfterForChild(childBox));
    39784002
    39794003        m_floatingObjects->addPlacedObject(floatingObject);
  • trunk/Source/WebCore/rendering/RenderBox.cpp

    r137847 r137930  
    151151    RenderBlock::removePercentHeightDescendantIfNeeded(this);
    152152
     153#if ENABLE(CSS_EXCLUSIONS)
     154    ExclusionShapeOutsideInfo::removeInfoForRenderBox(this);
     155#endif
     156
    153157    RenderBoxModelObject::willBeDestroyed();
    154158}
     
    283287        frame()->view()->recalculateScrollbarOverlayStyle();
    284288    }
    285 }
     289
     290#if ENABLE(CSS_EXCLUSIONS)
     291    updateExclusionShapeOutsideInfoAfterStyleChange(style()->shapeOutside(), oldStyle ? oldStyle->shapeOutside() : 0);
     292#endif
     293}
     294
     295#if ENABLE(CSS_EXCLUSIONS)
     296void RenderBox::updateExclusionShapeOutsideInfoAfterStyleChange(const ExclusionShapeValue* shapeOutside, const ExclusionShapeValue* oldShapeOutside)
     297{
     298    // FIXME: A future optimization would do a deep comparison for equality. (bug 100811)
     299    if (shapeOutside == oldShapeOutside)
     300        return;
     301
     302    if (shapeOutside) {
     303        ExclusionShapeOutsideInfo* exclusionShapeOutsideInfo = ExclusionShapeOutsideInfo::ensureInfoForRenderBox(this);
     304        exclusionShapeOutsideInfo->dirtyShapeSize();
     305    } else
     306        ExclusionShapeOutsideInfo::removeInfoForRenderBox(this);
     307}
     308#endif
    286309
    287310void RenderBox::updateFromStyle()
  • trunk/Source/WebCore/rendering/RenderBox.h

    r137847 r137930  
    2727#include "RenderOverflow.h"
    2828#include "ScrollTypes.h"
     29#if ENABLE(CSS_EXCLUSIONS)
     30#include "ExclusionShapeOutsideInfo.h"
     31#endif
    2932
    3033namespace WebCore {
     
    572575    static void reportStaticMembersMemoryUsage(MemoryInstrumentation*);
    573576
     577#if ENABLE(CSS_EXCLUSIONS)
     578    ExclusionShapeOutsideInfo* exclusionShapeOutsideInfo() const
     579    {
     580        return style()->shapeOutside() && ExclusionShapeOutsideInfo::isInfoEnabledForRenderBox(this) ? ExclusionShapeOutsideInfo::infoForRenderBox(this) : 0;
     581    }
     582#endif
     583
    574584protected:
    575585    virtual void willBeDestroyed();
     
    607617 
    608618private:
     619#if ENABLE(CSS_EXCLUSIONS)
     620    void updateExclusionShapeOutsideInfoAfterStyleChange(const ExclusionShapeValue* shapeOutside, const ExclusionShapeValue* oldShapeOutside);
     621#endif
     622
    609623    bool fixedElementLaysOutRelativeToFrame(Frame*, FrameView*) const;
    610624
Note: See TracChangeset for help on using the changeset viewer.