Reviewed by Hyatt.
authoradele <adele@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 2 Jun 2006 00:05:15 +0000 (00:05 +0000)
committeradele <adele@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 2 Jun 2006 00:05:15 +0000 (00:05 +0000)
commitebd6f6dce886fff6d0b25f2e562d47c5db0e74e3
tree2f4e52cda6e8a1cf84cccddce64dd4aadf60339e
parenta3c97fef85f8c6ad388b6139b7c1eb297ad32b6d
    Reviewed by Hyatt.

        Fix for http://bugzilla.opendarwin.org/show_bug.cgi?id=9216
        Implement CSS3 resize property

        * css/html4.css: Sets resize:both for textareas. This won't affect old-style textareas.

        * css/CSSPropertyNames.in: Added resize property.
        * css/cssparser.cpp: (WebCore::CSSParser::parseValue): Added case for CSS_PROP_RESIZE.
        * css/cssstyleselector.cpp: (WebCore::CSSStyleSelector::applyProperty): ditto.
        * css/CSSComputedStyleDeclaration.cpp: (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): ditto.

        * rendering/render_style.cpp: (WebCore::StyleCSS3InheritedData): Initialize resize.
        * rendering/render_style.h:
        (WebCore::): Added EResize enum.
        (WebCore::RenderStyle::resize):
        (WebCore::RenderStyle::setResize):
        (WebCore::RenderStyle::initialResize):

        * page/FrameView.cpp:
        (WebCore::FrameViewPrivate::FrameViewPrivate): Added m_resizeLayer to keep track of a layer that has begun resizing.
        (WebCore::FrameViewPrivate::reset): Reset m_resizeLayer.
        (WebCore::FrameView::handleMousePressEvent): If the mouse was pressed in a layer's resize control, then put the layer into resize mode.
        (WebCore::selectCursor): Updated so we get a pointer cursor for the resize control.
        (WebCore::FrameView::handleMouseMoveEvent): If there's a layer currently resizing, then tell the layer to continue resizing.
        (WebCore::FrameView::handleMouseReleaseEvent): If there's a layer currently resizing, then pull it out of resize mode.

        * rendering/RenderBlock.cpp: (WebCore::RenderBlock::isPointInScrollbar): Updated so the resize control isn't considered part of the scrollbar.
        * rendering/RenderLayer.cpp:
        (WebCore::RenderLayer::RenderLayer): Initialize m_inResizeMode
        (WebCore::RenderLayer::updateLayerPositions): Calls positionResizeControl.
        (WebCore::RenderLayer::resize): Added. Sets a new width and height based on the current mouse point.
        (WebCore::RenderLayer::isPointInResizeControl): Added.
        (WebCore::RenderLayer::positionResizeControl): Added.
        (WebCore::RenderLayer::positionScrollbars): Calls positionResizeControl.
        (WebCore::RenderLayer::paintScrollbars): Calls positionResizeControl.
        (WebCore::RenderLayer::paintResizeControl): Added.
        (WebCore::RenderLayer::paintLayer): Calls paintResizeControl.
        * rendering/RenderLayer.h: Added m_inResizeMode.
        (WebCore::RenderLayer::resizeControlRect):
        (WebCore::RenderLayer::setResizeControlRect):
        (WebCore::RenderLayer::inResizeMode): Added.
        (WebCore::RenderLayer::setInResizeMode): Added.

        * platform/mac/ImageMac.mm: (WebCore::Image::loadResource): Moved code from WebImageRendererFactory.  Now loads images from WebCore's resources.
        WebImageRendererFactory is no longer used and should be removed.
        * Resources/missingImage.tiff: Added. Copied from WebKit.
        * WebCore.xcodeproj/project.pbxproj: Added missingImage.tiff
        * loader/Cache.cpp: (WebCore::Cache::init): Updated name from missing_image to missingImage.

        * rendering/RenderTheme.h:
        * rendering/RenderTheme.cpp: (WebCore::RenderTheme::paintResizeControl): Added.
        * rendering/RenderThemeMac.h:
        * rendering/RenderThemeMac.mm:
        (WebCore::RenderThemeMac::RenderThemeMac): Initialize resizeCornerImage.
        (WebCore::RenderThemeMac::paintResizeControl): Paints resizeCornerImage.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@14674 268f45cc-cd09-0410-ab3c-d52691b4dbfc
20 files changed:
WebCore/ChangeLog
WebCore/Resources/missingImage.tiff [new file with mode: 0644]
WebCore/WebCore.xcodeproj/project.pbxproj
WebCore/css/CSSComputedStyleDeclaration.cpp
WebCore/css/CSSPropertyNames.in
WebCore/css/cssparser.cpp
WebCore/css/cssstyleselector.cpp
WebCore/css/html4.css
WebCore/loader/Cache.cpp
WebCore/page/FrameView.cpp
WebCore/platform/mac/ImageMac.mm
WebCore/rendering/RenderBlock.cpp
WebCore/rendering/RenderLayer.cpp
WebCore/rendering/RenderLayer.h
WebCore/rendering/RenderTheme.cpp
WebCore/rendering/RenderTheme.h
WebCore/rendering/RenderThemeMac.h
WebCore/rendering/RenderThemeMac.mm
WebCore/rendering/render_style.cpp
WebCore/rendering/render_style.h