WebCore:
authorhyatt@apple.com <hyatt@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 29 Apr 2008 20:34:44 +0000 (20:34 +0000)
committerhyatt@apple.com <hyatt@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 29 Apr 2008 20:34:44 +0000 (20:34 +0000)
commitfa56239f5668c808b44f3e4497588ed71f9fbc55
tree195ee0b79d220ff1869d3b9e0de03bf5c3b73e86
parentf09745031fbe73496c75dcc1eff4396f66948fef
WebCore:

2008-04-29  David Hyatt  <hyatt@apple.com>

        Implement the new box-reflect property in CSS.  This property enables real-time reflections on
        objects (yes you can reflect <video>!).

        Reviewed by Dan Bernstein

        Test cases added in fast/reflections/

        * GNUmakefile.am:
        * WebCore.pro:
        * WebCore.xcodeproj/project.pbxproj:
        * WebCoreSources.bkl:
        * css/CSSComputedStyleDeclaration.cpp:
        (WebCore::):
        (WebCore::valueForReflection):
        (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
        * css/CSSParser.cpp:
        (WebCore::CSSParser::parseValue):
        (WebCore::CSSParser::parseReflect):
        (WebCore::BorderImageParseContext::commitBorderImage):
        (WebCore::CSSParser::parseBorderImage):
        (WebCore::parseGradientColorStop):
        (WebCore::CSSParser::parseTransform):
        * css/CSSParser.h:
        * css/CSSPropertyNames.in:
        * css/CSSReflectValue.cpp: Added.
        (WebCore::CSSReflectValue::cssText):
        * css/CSSReflectValue.h: Added.
        (WebCore::):
        (WebCore::CSSReflectValue::CSSReflectValue):
        (WebCore::CSSReflectValue::direction):
        (WebCore::CSSReflectValue::offset):
        (WebCore::CSSReflectValue::mask):
        (WebCore::CSSReflectValue::setDirection):
        (WebCore::CSSReflectValue::setOffset):
        (WebCore::CSSReflectValue::setMask):
        * css/CSSStyleSelector.cpp:
        (WebCore::CSSStyleSelector::adjustRenderStyle):
        (WebCore::CSSStyleSelector::applyProperty):
        (WebCore::CSSStyleSelector::mapNinePieceImage):
        * css/CSSStyleSelector.h:
        * rendering/InlineFlowBox.cpp:
        (WebCore::InlineFlowBox::placeBoxesVertically):
        (WebCore::InlineFlowBox::paintMask):
        * rendering/Length.h:
        (WebCore::Length::calcFloatValue):
        * rendering/RenderBlock.cpp:
        (WebCore::RenderBlock::overflowHeight):
        (WebCore::RenderBlock::overflowWidth):
        (WebCore::RenderBlock::overflowLeft):
        (WebCore::RenderBlock::overflowTop):
        (WebCore::RenderBlock::overflowRect):
        (WebCore::RenderBlock::layoutBlock):
        * rendering/RenderBox.cpp:
        (WebCore::RenderBox::setStyle):
        (WebCore::RenderBox::paintMask):
        (WebCore::RenderBox::imageChanged):
        (WebCore::RenderBox::computeAbsoluteRepaintRect):
        * rendering/RenderFlexibleBox.cpp:
        (WebCore::RenderFlexibleBox::layoutBlock):
        * rendering/RenderLayer.cpp:
        (WebCore::RenderLayer::RenderLayer):
        (WebCore::RenderLayer::~RenderLayer):
        (WebCore::RenderLayer::updateLayerPositions):
        (WebCore::RenderLayer::enclosingPositionedAncestor):
        (WebCore::RenderLayer::enclosingTransformedAncestor):
        (WebCore::RenderLayer::isTransparent):
        (WebCore::transparencyClipBox):
        (WebCore::RenderLayer::operator delete):
        (WebCore::RenderLayer::destroy):
        (WebCore::RenderLayer::removeOnlyThisLayer):
        (WebCore::RenderLayer::insertOnlyThisLayer):
        (WebCore::RenderLayer::paintLayer):
        (WebCore::RenderLayer::updateZOrderLists):
        (WebCore::RenderLayer::updateOverflowList):
        (WebCore::RenderLayer::collectLayers):
        (WebCore::RenderLayer::shouldBeOverflowOnly):
        (WebCore::RenderLayer::styleChanged):
        (WebCore::RenderLayer::reflectionLayer):
        (WebCore::RenderLayer::createReflection):
        (WebCore::RenderLayer::updateReflectionStyle):
        * rendering/RenderLayer.h:
        (WebCore::RenderLayer::hasReflection):
        (WebCore::RenderLayer::reflection):
        (WebCore::RenderLayer::paintingInsideReflection):
        * rendering/RenderObject.cpp:
        (WebCore::RenderObject::RenderObject):
        (WebCore::RenderObject::requiresLayer):
        (WebCore::RenderObject::setStyle):
        (WebCore::RenderObject::updateImage):
        (WebCore::RenderObject::reflectionBox):
        (WebCore::RenderObject::reflectionOffset):
        * rendering/RenderObject.h:
        (WebCore::RenderObject::hasTransform):
        (WebCore::RenderObject::setHasReflection):
        (WebCore::RenderObject::hasReflection):
        * rendering/RenderReplica.cpp: Added.
        (WebCore::RenderReplica::RenderReplica):
        (WebCore::RenderReplica::~RenderReplica):
        (WebCore::RenderReplica::layout):
        (WebCore::RenderReplica::calcPrefWidths):
        (WebCore::RenderReplica::paint):
        * rendering/RenderReplica.h: Added.
        (WebCore::RenderReplica::renderName):
        (WebCore::RenderReplica::requiresLayer):
        * rendering/RenderStyle.cpp:
        (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
        (WebCore::StyleRareNonInheritedData::operator==):
        (WebCore::StyleRareNonInheritedData::reflectionDataEquivalent):
        (WebCore::RenderStyle::diff):
        (WebCore::RenderStyle::applyTransform):
        * rendering/RenderStyle.h:
        (WebCore::TranslateTransformOperation::apply):
        (WebCore::StyleReflection::StyleReflection):
        (WebCore::StyleReflection::operator==):
        (WebCore::StyleReflection::operator!=):
        (WebCore::StyleReflection::direction):
        (WebCore::StyleReflection::offset):
        (WebCore::StyleReflection::mask):
        (WebCore::StyleReflection::setDirection):
        (WebCore::StyleReflection::setOffset):
        (WebCore::StyleReflection::setMask):
        (WebCore::RenderStyle::boxReflect):
        (WebCore::RenderStyle::setBoxReflect):
        (WebCore::RenderStyle::initialBoxReflect):
        * rendering/RenderTable.cpp:
        (WebCore::RenderTable::layout):
        (WebCore::RenderTable::paintMask):
        * rendering/RenderTableCell.cpp:
        (WebCore::RenderTableCell::requiresLayer):
        (WebCore::RenderTableCell::paintMask):

LayoutTests:

2008-04-29  David Hyatt  <hyatt@apple.com>

        Implement support for the new box-reflect property.  Tests of the new property.

        Reviewed by Dan Bernstein

        * fast/reflections: Added.
        * fast/reflections/reflection-computed-style-expected.txt: Added.
        * fast/reflections/reflection-computed-style.html: Added.
        * fast/reflections/reflection-direction.html: Added.
        * fast/reflections/reflection-masks.html: Added.
        * fast/reflections/reflection-nesting.html: Added.
        * fast/reflections/resources: Added.
        * fast/reflections/resources/kate.png: Added.
        * fast/reflections/resources/vignette-mask.png: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@32695 268f45cc-cd09-0410-ab3c-d52691b4dbfc
46 files changed:
LayoutTests/ChangeLog
LayoutTests/fast/reflections/reflection-computed-style-expected.txt [new file with mode: 0644]
LayoutTests/fast/reflections/reflection-computed-style.html [new file with mode: 0644]
LayoutTests/fast/reflections/reflection-direction.html [new file with mode: 0644]
LayoutTests/fast/reflections/reflection-masks.html [new file with mode: 0644]
LayoutTests/fast/reflections/reflection-nesting.html [new file with mode: 0644]
LayoutTests/fast/reflections/resources/kate.png [new file with mode: 0644]
LayoutTests/fast/reflections/resources/vignette-mask.png [new file with mode: 0644]
LayoutTests/platform/mac/fast/reflections/reflection-direction-expected.checksum [new file with mode: 0644]
LayoutTests/platform/mac/fast/reflections/reflection-direction-expected.png [new file with mode: 0644]
LayoutTests/platform/mac/fast/reflections/reflection-direction-expected.txt [new file with mode: 0644]
LayoutTests/platform/mac/fast/reflections/reflection-masks-expected.checksum [new file with mode: 0644]
LayoutTests/platform/mac/fast/reflections/reflection-masks-expected.png [new file with mode: 0644]
LayoutTests/platform/mac/fast/reflections/reflection-masks-expected.txt [new file with mode: 0644]
LayoutTests/platform/mac/fast/reflections/reflection-nesting-expected.checksum [new file with mode: 0644]
LayoutTests/platform/mac/fast/reflections/reflection-nesting-expected.png [new file with mode: 0644]
LayoutTests/platform/mac/fast/reflections/reflection-nesting-expected.txt [new file with mode: 0644]
WebCore/ChangeLog
WebCore/GNUmakefile.am
WebCore/WebCore.pro
WebCore/WebCore.vcproj/WebCore.vcproj
WebCore/WebCore.xcodeproj/project.pbxproj
WebCore/WebCoreSources.bkl
WebCore/css/CSSComputedStyleDeclaration.cpp
WebCore/css/CSSParser.cpp
WebCore/css/CSSParser.h
WebCore/css/CSSPropertyNames.in
WebCore/css/CSSReflectValue.cpp [new file with mode: 0644]
WebCore/css/CSSReflectValue.h [new file with mode: 0644]
WebCore/css/CSSStyleSelector.cpp
WebCore/css/CSSStyleSelector.h
WebCore/rendering/InlineFlowBox.cpp
WebCore/rendering/Length.h
WebCore/rendering/RenderBlock.cpp
WebCore/rendering/RenderBox.cpp
WebCore/rendering/RenderFlexibleBox.cpp
WebCore/rendering/RenderLayer.cpp
WebCore/rendering/RenderLayer.h
WebCore/rendering/RenderObject.cpp
WebCore/rendering/RenderObject.h
WebCore/rendering/RenderReplica.cpp [new file with mode: 0644]
WebCore/rendering/RenderReplica.h [new file with mode: 0644]
WebCore/rendering/RenderStyle.cpp
WebCore/rendering/RenderStyle.h
WebCore/rendering/RenderTable.cpp
WebCore/rendering/RenderTableCell.cpp