• betravis@adobe.com's avatar
    [CSS Shapes] Layout using [<box> || <shape>] value · d86e74f7
    betravis@adobe.com authored
    https://bugs.webkit.org/show_bug.cgi?id=124428
    
    Reviewed by David Hyatt.
    
    Source/WebCore:
    
    When a box value is supplied, use it to size and position the shape. Otherwise,
    use a default value (content-box for shape-inside, margin-box for shape-outside).
    This patch extends the sizing and positioning code used for the box patch (Bug 124227)
    to also apply to shapes. With this patch, we also no longer use the box-sizing
    property to size and position shapes.
    
    Tests: fast/shapes/shape-outside-floats/shape-outside-shape-boxes-001.html
           fast/shapes/shape-outside-floats/shape-outside-shape-boxes-002.html
           fast/shapes/shape-outside-floats/shape-outside-shape-boxes-003.html
    
    * css/CSSComputedStyleDeclaration.cpp:
    (WebCore::ComputedStyleExtractor::propertyValue): Adjust for ShapeValues storing
    BasicShape::ReferenceBox as their box value, rather than a CSSValueID.
    * css/DeprecatedStyleBuilder.cpp:
    (WebCore::ApplyPropertyShape::applyValue): Ditto.
    * rendering/shapes/ShapeInfo.h:
    (WebCore::ShapeInfo::setShapeSize): Adjust for BasicShapes with reference boxes
    as well as plain box values. Also, remove old box-sizing code.
    (WebCore::ShapeInfo::logicalTopOffset): Ditto.
    (WebCore::ShapeInfo::logicalLeftOffset): Ditto.
    * rendering/shapes/ShapeInsideInfo.h:
    * rendering/shapes/ShapeOutsideInfo.h:
    * rendering/style/ShapeValue.h:
    (WebCore::ShapeValue::createBoxValue): Adjust for boxes being stored as
    BasicShape::ReferenceBoxes.
    (WebCore::ShapeValue::box): Ditto.
    (WebCore::ShapeValue::ShapeValue): Ditto.
    
    LayoutTests:
    
    Adding tests to make sure that shapes properly size and position themselves across box values
    and writing modes. Some shape-outside tests needed to be updated to explicitly size themselves
    to content-box, as they were relying on that being the default value. Some shape-inside tests
    needed to be adjusted as box-sizing no longer affects the shape size and position.
    
    * csswg/contributors/adobe/submitted/shapes/shape-outside/shape-outside-floats-circle-001.html:
    Explicitly size to content-box.
    * csswg/contributors/adobe/submitted/shapes/shape-outside/shape-outside-floats-margin-001.html: Ditto.
    * csswg/contributors/adobe/submitted/shapes/shape-outside/shape-outside-floats-margin-002.html: Ditto.
    * csswg/contributors/adobe/submitted/shapes/shape-outside/shape-outside-floats-margin-003.html: Ditto.
    * csswg/contributors/adobe/submitted/shapes/shape-outside/shape-outside-floats-margin-004.html: Ditto.
    * csswg/contributors/adobe/submitted/shapes/shape-outside/shape-outside-floats-margin-010.html: Ditto.
    * csswg/contributors/adobe/submitted/shapes/shape-outside/shape-outside-floats-margin-011.html: Ditto.
    * csswg/contributors/adobe/submitted/shapes/shape-outside/shape-outside-floats-margin-012.html: Ditto.
    * csswg/contributors/adobe/submitted/shapes/shape-outside/shape-outside-floats-margin-014.html: Ditto.
    * csswg/contributors/adobe/submitted/shapes/shape-outside/shape-outside-floats-margin-015.html: Ditto.
    * csswg/contributors/adobe/submitted/shapes/shape-outside/shape-outside-floats-margin-016.html: Ditto.
    * csswg/contributors/adobe/submitted/shapes/shape-outside/shape-outside-floats-margin-017.html: Ditto.
    * csswg/contributors/adobe/submitted/shapes/shape-outside/shape-outside-floats-margin-018.html: Ditto.
    * csswg/contributors/adobe/submitted/shapes/shape-outside/shape-outside-floats-margin-021.html: Ditto.
    * csswg/contributors/adobe/submitted/shapes/shape-outside/shape-outside-floats-padding-001.html: Ditto.
    * csswg/contributors/adobe/submitted/shapes/shape-outside/shape-outside-floats-padding-002.html: Ditto.
    * csswg/contributors/adobe/submitted/shapes/shape-outside/shape-outside-floats-padding-003.html: Ditto.
    * csswg/contributors/adobe/submitted/shapes/shape-outside/shape-outside-floats-padding-004.html: Ditto.
    * csswg/contributors/adobe/submitted/shapes/shape-outside/shape-outside-floats-polygon-000.html: Ditto.
    * csswg/contributors/adobe/submitted/shapes/shape-outside/shape-outside-floats-polygon-001.html: Ditto.
    * csswg/contributors/adobe/submitted/shapes/shape-outside/shape-outside-floats-polygon-002.html: Ditto.
    * csswg/contributors/adobe/submitted/shapes/shape-outside/shape-outside-floats-square-border-000.html: Ditto.
    * fast/shapes/shape-inside/shape-inside-box-sizing-expected.html: Small test cleanup.
    * fast/shapes/shape-inside/shape-inside-box-sizing.html: Modify shapes to provide their sizing box.
    * fast/shapes/shape-inside/shape-inside-empty-expected.html: Small test cleanup.
    * fast/shapes/shape-inside/shape-inside-empty.html: Modify shapes to provide their sizing box.
    * fast/shapes/shape-outside-floats/shape-outside-floats-different-writing-modes.html: Ditto.
    * fast/shapes/shape-outside-floats/shape-outside-shape-boxes-001-expected.html: Added.
    * fast/shapes/shape-outside-floats/shape-outside-shape-boxes-001.html: Added.
    * fast/shapes/shape-outside-floats/shape-outside-shape-boxes-002-expected.html: Added.
    * fast/shapes/shape-outside-floats/shape-outside-shape-boxes-002.html: Added.
    * fast/shapes/shape-outside-floats/shape-outside-shape-boxes-003-expected.html: Added.
    * fast/shapes/shape-outside-floats/shape-outside-shape-boxes-003.html: Added.
    * inspector-protocol/model/highlight-shape-outside.html: Modify shapes to provide their sizing box.
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@159792 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    d86e74f7
Name
Last commit
Last update
..
resources Loading commit data...
shape-outside-floats-circle-000-expected.html Loading commit data...
shape-outside-floats-circle-000.html Loading commit data...
shape-outside-floats-circle-001-expected.html Loading commit data...
shape-outside-floats-circle-001.html Loading commit data...
shape-outside-floats-clipped-000-expected.html Loading commit data...
shape-outside-floats-clipped-000.html Loading commit data...
shape-outside-floats-clipped-001-expected.html Loading commit data...
shape-outside-floats-clipped-001-ref-expected.html Loading commit data...
shape-outside-floats-clipped-001-ref.html Loading commit data...
shape-outside-floats-clipped-001.html Loading commit data...
shape-outside-floats-clipped-002-expected.html Loading commit data...
shape-outside-floats-clipped-002.html Loading commit data...
shape-outside-floats-clipped-003-expected.html Loading commit data...
shape-outside-floats-clipped-003.html Loading commit data...
shape-outside-floats-clipped-004-expected.html Loading commit data...
shape-outside-floats-clipped-004.html Loading commit data...
shape-outside-floats-clipped-005-expected.html Loading commit data...
shape-outside-floats-clipped-005.html Loading commit data...
shape-outside-floats-clipped-006-expected.html Loading commit data...
shape-outside-floats-clipped-006.html Loading commit data...
shape-outside-floats-ellipse-000-expected.html Loading commit data...
shape-outside-floats-ellipse-000.html Loading commit data...
shape-outside-floats-horizontal-rectangle-000-expected.html Loading commit data...
shape-outside-floats-horizontal-rectangle-000.html Loading commit data...
shape-outside-floats-horizontal-rectangle-001-expected.html Loading commit data...
shape-outside-floats-horizontal-rectangle-001.html Loading commit data...
shape-outside-floats-horizontal-rectangle-002-expected.html Loading commit data...
shape-outside-floats-horizontal-rectangle-002.html Loading commit data...
shape-outside-floats-horizontal-rectangle-003-expected.html Loading commit data...
shape-outside-floats-horizontal-rectangle-003.html Loading commit data...
shape-outside-floats-horizontal-rectangle-004-expected.html Loading commit data...
shape-outside-floats-horizontal-rectangle-004.html Loading commit data...
shape-outside-floats-inset-rectangle-000-expected.html Loading commit data...
shape-outside-floats-inset-rectangle-000.html Loading commit data...
shape-outside-floats-inset-rectangle-001-expected.html Loading commit data...
shape-outside-floats-inset-rectangle-001.html Loading commit data...
shape-outside-floats-inset-rectangle-002-expected.html Loading commit data...
shape-outside-floats-inset-rectangle-002.html Loading commit data...
shape-outside-floats-margin-000-expected.html Loading commit data...
shape-outside-floats-margin-000.html Loading commit data...
shape-outside-floats-margin-001-expected.html Loading commit data...
shape-outside-floats-margin-001.html Loading commit data...
shape-outside-floats-margin-002-expected.html Loading commit data...
shape-outside-floats-margin-002.html Loading commit data...
shape-outside-floats-margin-003-expected.html Loading commit data...
shape-outside-floats-margin-003.html Loading commit data...
shape-outside-floats-margin-004-expected.html Loading commit data...
shape-outside-floats-margin-004.html Loading commit data...
shape-outside-floats-margin-005-expected.html Loading commit data...
shape-outside-floats-margin-005.html Loading commit data...
shape-outside-floats-margin-006-expected.html Loading commit data...
shape-outside-floats-margin-006.html Loading commit data...
shape-outside-floats-margin-007-expected.html Loading commit data...
shape-outside-floats-margin-007.html Loading commit data...
shape-outside-floats-margin-008-expected.html Loading commit data...
shape-outside-floats-margin-008.html Loading commit data...
shape-outside-floats-margin-009-expected.html Loading commit data...
shape-outside-floats-margin-009.html Loading commit data...
shape-outside-floats-margin-010-expected.html Loading commit data...
shape-outside-floats-margin-010.html Loading commit data...
shape-outside-floats-margin-011-expected.html Loading commit data...
shape-outside-floats-margin-011.html Loading commit data...
shape-outside-floats-margin-012-expected.html Loading commit data...
shape-outside-floats-margin-012.html Loading commit data...
shape-outside-floats-margin-013-expected.html Loading commit data...
shape-outside-floats-margin-013.html Loading commit data...
shape-outside-floats-margin-014-expected.html Loading commit data...
shape-outside-floats-margin-014.html Loading commit data...
shape-outside-floats-margin-015-expected.html Loading commit data...
shape-outside-floats-margin-015.html Loading commit data...
shape-outside-floats-margin-016-expected.html Loading commit data...
shape-outside-floats-margin-016.html Loading commit data...
shape-outside-floats-margin-017-expected.html Loading commit data...
shape-outside-floats-margin-017.html Loading commit data...
shape-outside-floats-margin-018-expected.html Loading commit data...
shape-outside-floats-margin-018.html Loading commit data...
shape-outside-floats-margin-019-expected.html Loading commit data...
shape-outside-floats-margin-019.html Loading commit data...
shape-outside-floats-margin-020-expected.html Loading commit data...
shape-outside-floats-margin-020.html Loading commit data...
shape-outside-floats-margin-021-expected.html Loading commit data...
shape-outside-floats-margin-021.html Loading commit data...
shape-outside-floats-padding-000-expected.html Loading commit data...
shape-outside-floats-padding-000.html Loading commit data...
shape-outside-floats-padding-001-expected.html Loading commit data...
shape-outside-floats-padding-001.html Loading commit data...
shape-outside-floats-padding-002-expected.html Loading commit data...
shape-outside-floats-padding-002.html Loading commit data...
shape-outside-floats-padding-003-expected.html Loading commit data...
shape-outside-floats-padding-003.html Loading commit data...
shape-outside-floats-padding-004-expected.html Loading commit data...
shape-outside-floats-padding-004.html Loading commit data...
shape-outside-floats-padding-005-expected.html Loading commit data...
shape-outside-floats-padding-005.html Loading commit data...
shape-outside-floats-padding-006-expected.html Loading commit data...
shape-outside-floats-padding-006.html Loading commit data...
shape-outside-floats-padding-007-expected.html Loading commit data...
shape-outside-floats-padding-007.html Loading commit data...
shape-outside-floats-padding-008-expected.html Loading commit data...
shape-outside-floats-padding-008.html Loading commit data...
shape-outside-floats-padding-009-expected.html Loading commit data...
shape-outside-floats-padding-009.html Loading commit data...
shape-outside-floats-polygon-000-expected.html Loading commit data...
shape-outside-floats-polygon-000.html Loading commit data...
shape-outside-floats-polygon-001-expected.html Loading commit data...
shape-outside-floats-polygon-001.html Loading commit data...
shape-outside-floats-polygon-002-expected.html Loading commit data...
shape-outside-floats-polygon-002.html Loading commit data...
shape-outside-floats-rounded-rectangle-001-expected.html Loading commit data...
shape-outside-floats-rounded-rectangle-001.html Loading commit data...
shape-outside-floats-rounded-rectangle-002-expected.html Loading commit data...
shape-outside-floats-rounded-rectangle-002.html Loading commit data...
shape-outside-floats-rounded-rectangle-003-expected.html Loading commit data...
shape-outside-floats-rounded-rectangle-003.html Loading commit data...
shape-outside-floats-rounded-rectangle-004-expected.html Loading commit data...
shape-outside-floats-rounded-rectangle-004.html Loading commit data...
shape-outside-floats-shape-margin-000-expected.html Loading commit data...
shape-outside-floats-shape-margin-000.html Loading commit data...
shape-outside-floats-shape-margin-001-expected.html Loading commit data...
shape-outside-floats-shape-margin-001.html Loading commit data...
shape-outside-floats-square-000-expected.html Loading commit data...
shape-outside-floats-square-000.html Loading commit data...
shape-outside-floats-square-border-000-expected.html Loading commit data...
shape-outside-floats-square-border-000.html Loading commit data...
shape-outside-floats-stacked-000-expected.html Loading commit data...
shape-outside-floats-stacked-000.html Loading commit data...
shape-outside-floats-vertical-rectangle-000-expected.html Loading commit data...
shape-outside-floats-vertical-rectangle-000.html Loading commit data...
shape-outside-floats-vertical-rectangle-001-expected.html Loading commit data...
shape-outside-floats-vertical-rectangle-001.html Loading commit data...
shape-outside-floats-vertical-rectangle-002-expected.html Loading commit data...
shape-outside-floats-vertical-rectangle-002.html Loading commit data...
w3c-import.log Loading commit data...