1. 10 Dec, 2010 2 commits
    • andreas.kling@nokia.com's avatar
      2010-12-10 Andreas Kling <kling@webkit.org> · 39078312
      andreas.kling@nokia.com authored
              Reviewed by Eric Seidel.
      
              Don't do GraphicsContext save/restore just to preserve the CompositeOperator
              https://bugs.webkit.org/show_bug.cgi?id=50070
      
              Add GraphicsContext::compositeOperation() so we don't have to do a full
              save/restore if the only context-tainting call is setCompositeOperation().
      
              GraphicsContext::setCompositeOperation() now stores the op in its state
              and calls a port-specific setPlatformCompositeOperation().
      
              No new tests, this is an optimization.
      
              * platform/graphics/GraphicsContext.cpp:
              (WebCore::GraphicsContext::setCompositeOperation):
              (WebCore::GraphicsContext::compositeOperation):
              * platform/graphics/GraphicsContext.h:
              * platform/graphics/GraphicsContextPrivate.h:
              (WebCore::GraphicsContextState::GraphicsContextState):
              * platform/graphics/Image.cpp:
              (WebCore::Image::fillWithSolidColor):
              * platform/graphics/cairo/GraphicsContextCairo.cpp:
              (WebCore::GraphicsContext::setPlatformCompositeOperation):
              * platform/graphics/cg/GraphicsContextCG.cpp:
              (WebCore::GraphicsContext::setPlatformCompositeOperation):
              * platform/graphics/haiku/GraphicsContextHaiku.cpp:
              (WebCore::GraphicsContext::setPlatformCompositeOperation):
              * platform/graphics/mac/GraphicsContextMac.mm:
              (WebCore::GraphicsContext::setPlatformCompositeOperation):
              * platform/graphics/openvg/GraphicsContextOpenVG.cpp:
              (WebCore::GraphicsContext::setPlatformCompositeOperation):
              * platform/graphics/qt/GraphicsContextQt.cpp:
              (WebCore::GraphicsContext::setPlatformCompositeOperation):
              * platform/graphics/skia/GraphicsContextSkia.cpp:
              (WebCore::GraphicsContext::setPlatformCompositeOperation):
              * platform/graphics/skia/SkiaUtils.cpp:
              (WebCore::WebCoreCompositeToSkiaComposite):
              * platform/graphics/wince/GraphicsContextWinCE.cpp:
              (WebCore::GraphicsContext::setPlatformCompositeOperation):
              * platform/graphics/wx/GraphicsContextWx.cpp:
              (WebCore::GraphicsContext::setPlatformCompositeOperation):
              * rendering/RenderBoxModelObject.cpp:
              (WebCore::RenderBoxModelObject::paintFillLayerExtended):
              * rendering/RenderView.cpp:
              (WebCore::RenderView::paintBoxDecorations):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@73729 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      39078312
    • reni@webkit.org's avatar
      GraphicsContext: Merge m_common and m_data · a1db5cff
      reni@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=49914
      
      Patch by Renata Hodovan <reni@webkit.org> on 2010-12-10
      Reviewed by Andreas Kling.
      
      Move data members from GraphicsContextPrivate into GraphicsContext. So GraphicsContextPlatform.h
      and m_common became unnecessary. They are removed.
      Add two methods to GraphicsContext: platformInit() and platformDestroy(), which
      make the constructor of GraphicsContext clearer.
      Besides add a getter to the private GraphicsContext::m_state member, because some inline
      functions in cairo need it.
      
      No new test is needed, because this is a refactoring.
      
      * WebCore.xcodeproj/project.pbxproj:
      * platform/graphics/GraphicsContext.cpp:
      (WebCore::GraphicsContext::GraphicsContext):
      (WebCore::GraphicsContext::~GraphicsContext):
      (WebCore::GraphicsContext::save):
      (WebCore::GraphicsContext::restore):
      (WebCore::GraphicsContext::setStrokeThickness):
      (WebCore::GraphicsContext::setStrokeStyle):
      (WebCore::GraphicsContext::setStrokeColor):
      (WebCore::GraphicsContext::setShadow):
      (WebCore::GraphicsContext::clearShadow):
      (WebCore::GraphicsContext::getShadow):
      (WebCore::GraphicsContext::strokeThickness):
      (WebCore::GraphicsContext::strokeStyle):
      (WebCore::GraphicsContext::strokeColor):
      (WebCore::GraphicsContext::strokeColorSpace):
      (WebCore::GraphicsContext::fillRule):
      (WebCore::GraphicsContext::setFillRule):
      (WebCore::GraphicsContext::setFillColor):
      (WebCore::GraphicsContext::fillColor):
      (WebCore::GraphicsContext::fillColorSpace):
      (WebCore::GraphicsContext::setShouldAntialias):
      (WebCore::GraphicsContext::shouldAntialias):
      (WebCore::GraphicsContext::state):
      (WebCore::GraphicsContext::setStrokePattern):
      (WebCore::GraphicsContext::setFillPattern):
      (WebCore::GraphicsContext::setStrokeGradient):
      (WebCore::GraphicsContext::setFillGradient):
      (WebCore::GraphicsContext::fillGradient):
      (WebCore::GraphicsContext::strokeGradient):
      (WebCore::GraphicsContext::fillPattern):
      (WebCore::GraphicsContext::strokePattern):
      (WebCore::GraphicsContext::setShadowsIgnoreTransforms):
      (WebCore::GraphicsContext::updatingControlTints):
      (WebCore::GraphicsContext::setUpdatingControlTints):
      (WebCore::GraphicsContext::setPaintingDisabled):
      (WebCore::GraphicsContext::paintingDisabled):
      (WebCore::GraphicsContext::textDrawingMode):
      (WebCore::GraphicsContext::setTextDrawingMode):
      * platform/graphics/GraphicsContext.h:
      (WebCore::GraphicsContextState::GraphicsContextState):
      * platform/graphics/GraphicsContextPrivate.h: Removed.
      * platform/graphics/cairo/GraphicsContextCairo.cpp:
      (WebCore::setPlatformFill):
      (WebCore::setPlatformStroke):
      (WebCore::drawPathShadow):
      (WebCore::fillCurrentCairoPath):
      (WebCore::strokeCurrentCairoPath):
      (WebCore::GraphicsContext::platformInit):
      (WebCore::GraphicsContext::platformDestroy):
      (WebCore::GraphicsContext::fillPath):
      (WebCore::GraphicsContext::strokePath):
      (WebCore::GraphicsContext::fillRect):
      (WebCore::GraphicsContext::setPlatformShadow):
      (WebCore::GraphicsContext::strokeRect):
      (WebCore::GraphicsContext::setAlpha):
      (WebCore::GraphicsContext::getAlpha):
      * platform/graphics/cg/GraphicsContextCG.cpp:
      (WebCore::GraphicsContext::platformInit):
      (WebCore::GraphicsContext::platformDestroy):
      (WebCore::GraphicsContext::applyStrokePattern):
      (WebCore::GraphicsContext::applyFillPattern):
      (WebCore::GraphicsContext::drawPath):
      (WebCore::GraphicsContext::fillPath):
      (WebCore::GraphicsContext::strokePath):
      (WebCore::GraphicsContext::fillRect):
      (WebCore::GraphicsContext::setPlatformShadow):
      (WebCore::GraphicsContext::strokeRect):
      * platform/graphics/haiku/GraphicsContextHaiku.cpp:
      (WebCore::GraphicsContext::platformInit):
      (WebCore::GraphicsContext::platformDestroy):
      * platform/graphics/openvg/GraphicsContextOpenVG.cpp:
      (WebCore::GraphicsContext::platformInit):
      (WebCore::GraphicsContext::platformDestroy):
      (WebCore::GraphicsContext::fillPath):
      (WebCore::GraphicsContext::strokePath):
      (WebCore::GraphicsContext::clip):
      (WebCore::GraphicsContext::clipOut):
      (WebCore::GraphicsContext::addInnerRoundedRectClip):
      * platform/graphics/qt/GraphicsContextQt.cpp:
      (WebCore::GraphicsContext::platformInit):
      (WebCore::GraphicsContext::platformDestroy):
      (WebCore::GraphicsContext::fillPath):
      (WebCore::GraphicsContext::strokePath):
      (WebCore::GraphicsContext::fillRect):
      (WebCore::GraphicsContext::setPlatformShadow):
      * platform/graphics/skia/GraphicsContextSkia.cpp:
      (WebCore::GraphicsContext::platformInit):
      (WebCore::GraphicsContext::platformDestroy):
      (WebCore::GraphicsContext::fillPath):
      (WebCore::GraphicsContext::setPlatformShadow):
      * platform/graphics/win/GraphicsContextCGWin.cpp:
      (WebCore::GraphicsContext::GraphicsContext):
      (WebCore::GraphicsContext::platformInit):
      * platform/graphics/win/GraphicsContextCairoWin.cpp:
      (WebCore::GraphicsContext::GraphicsContext):
      (WebCore::GraphicsContext::platformInit):
      * platform/graphics/wince/GraphicsContextWinCE.cpp:
      (WebCore::GraphicsContext::platformInit):
      (WebCore::GraphicsContext::platformDestroy):
      (WebCore::GraphicsContext::fillPath):
      (WebCore::GraphicsContext::fillRect):
      * platform/graphics/wx/GraphicsContextWx.cpp:
      (WebCore::GraphicsContext::platformInit):
      (WebCore::GraphicsContext::platformDestroy):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@73728 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      a1db5cff
  2. 08 Dec, 2010 2 commits
    • yutak@chromium.org's avatar
      2010-12-08 Yuta Kitamura <yutak@chromium.org> · a046e9c6
      yutak@chromium.org authored
              Unreviewed, rolling out r73492.
              http://trac.webkit.org/changeset/73492
              https://bugs.webkit.org/show_bug.cgi?id=49914
      
              Caused a lot of pixel test failures and broke Windows build.
      
              * WebCore.xcodeproj/project.pbxproj:
              * platform/graphics/GraphicsContext.cpp:
              (WebCore::GraphicsContext::createGraphicsContextPrivate):
              (WebCore::GraphicsContext::destroyGraphicsContextPrivate):
              (WebCore::GraphicsContext::save):
              (WebCore::GraphicsContext::restore):
              (WebCore::GraphicsContext::setStrokeThickness):
              (WebCore::GraphicsContext::setStrokeStyle):
              (WebCore::GraphicsContext::setStrokeColor):
              (WebCore::GraphicsContext::setShadow):
              (WebCore::GraphicsContext::clearShadow):
              (WebCore::GraphicsContext::getShadow):
              (WebCore::GraphicsContext::strokeThickness):
              (WebCore::GraphicsContext::strokeStyle):
              (WebCore::GraphicsContext::strokeColor):
              (WebCore::GraphicsContext::strokeColorSpace):
              (WebCore::GraphicsContext::fillRule):
              (WebCore::GraphicsContext::setFillRule):
              (WebCore::GraphicsContext::setFillColor):
              (WebCore::GraphicsContext::fillColor):
              (WebCore::GraphicsContext::fillColorSpace):
              (WebCore::GraphicsContext::setShouldAntialias):
              (WebCore::GraphicsContext::shouldAntialias):
              (WebCore::GraphicsContext::setStrokePattern):
              (WebCore::GraphicsContext::setFillPattern):
              (WebCore::GraphicsContext::setStrokeGradient):
              (WebCore::GraphicsContext::setFillGradient):
              (WebCore::GraphicsContext::fillGradient):
              (WebCore::GraphicsContext::strokeGradient):
              (WebCore::GraphicsContext::fillPattern):
              (WebCore::GraphicsContext::strokePattern):
              (WebCore::GraphicsContext::setShadowsIgnoreTransforms):
              (WebCore::GraphicsContext::updatingControlTints):
              (WebCore::GraphicsContext::setUpdatingControlTints):
              (WebCore::GraphicsContext::setPaintingDisabled):
              (WebCore::GraphicsContext::paintingDisabled):
              (WebCore::GraphicsContext::textDrawingMode):
              (WebCore::GraphicsContext::setTextDrawingMode):
              * platform/graphics/GraphicsContext.h:
              * platform/graphics/GraphicsContextPrivate.h: Added.
              (WebCore::GraphicsContextState::GraphicsContextState):
              (WebCore::GraphicsContextPrivate::GraphicsContextPrivate):
              * platform/graphics/cairo/GraphicsContextCairo.cpp:
              (WebCore::setPlatformFill):
              (WebCore::setPlatformStroke):
              (WebCore::drawPathShadow):
              (WebCore::fillCurrentCairoPath):
              (WebCore::strokeCurrentCairoPath):
              (WebCore::GraphicsContext::GraphicsContext):
              (WebCore::GraphicsContext::~GraphicsContext):
              (WebCore::GraphicsContext::fillPath):
              (WebCore::GraphicsContext::strokePath):
              (WebCore::GraphicsContext::fillRect):
              (WebCore::GraphicsContext::setPlatformShadow):
              (WebCore::GraphicsContext::strokeRect):
              (WebCore::GraphicsContext::setAlpha):
              (WebCore::GraphicsContext::getAlpha):
              * platform/graphics/cg/GraphicsContextCG.cpp:
              (WebCore::GraphicsContext::GraphicsContext):
              (WebCore::GraphicsContext::~GraphicsContext):
              (WebCore::GraphicsContext::applyStrokePattern):
              (WebCore::GraphicsContext::applyFillPattern):
              (WebCore::GraphicsContext::drawPath):
              (WebCore::GraphicsContext::fillPath):
              (WebCore::GraphicsContext::strokePath):
              (WebCore::GraphicsContext::fillRect):
              (WebCore::GraphicsContext::setPlatformShadow):
              (WebCore::GraphicsContext::strokeRect):
              * platform/graphics/haiku/GraphicsContextHaiku.cpp:
              (WebCore::GraphicsContext::GraphicsContext):
              (WebCore::GraphicsContext::~GraphicsContext):
              * platform/graphics/openvg/GraphicsContextOpenVG.cpp:
              (WebCore::GraphicsContext::GraphicsContext):
              (WebCore::GraphicsContext::~GraphicsContext):
              (WebCore::GraphicsContext::fillPath):
              (WebCore::GraphicsContext::strokePath):
              (WebCore::GraphicsContext::clip):
              (WebCore::GraphicsContext::clipOut):
              (WebCore::GraphicsContext::addInnerRoundedRectClip):
              * platform/graphics/qt/GraphicsContextQt.cpp:
              (WebCore::GraphicsContext::GraphicsContext):
              (WebCore::GraphicsContext::~GraphicsContext):
              (WebCore::GraphicsContext::fillPath):
              (WebCore::GraphicsContext::strokePath):
              (WebCore::GraphicsContext::fillRect):
              (WebCore::GraphicsContext::setPlatformShadow):
              * platform/graphics/skia/GraphicsContextSkia.cpp:
              (WebCore::GraphicsContext::GraphicsContext):
              (WebCore::GraphicsContext::~GraphicsContext):
              (WebCore::GraphicsContext::fillPath):
              (WebCore::GraphicsContext::setPlatformShadow):
              * platform/graphics/win/GraphicsContextCGWin.cpp:
              (WebCore::GraphicsContext::GraphicsContext):
              * platform/graphics/win/GraphicsContextCairoWin.cpp:
              (WebCore::GraphicsContext::GraphicsContext):
              * platform/graphics/wince/GraphicsContextWinCE.cpp:
              (WebCore::GraphicsContext::GraphicsContext):
              (WebCore::GraphicsContext::~GraphicsContext):
              (WebCore::GraphicsContext::fillPath):
              (WebCore::GraphicsContext::fillRect):
              * platform/graphics/wx/GraphicsContextWx.cpp:
              (WebCore::GraphicsContext::GraphicsContext):
              (WebCore::GraphicsContext::~GraphicsContext):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@73496 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      a046e9c6
    • reni@webkit.org's avatar
      2010-12-08 Renata Hodovan <reni@webkit.org> · 0a15b59f
      reni@webkit.org authored
              Reviewed by Andreas Kling.
      
              GraphicsContext: Merge m_common and m_data
              https://bugs.webkit.org/show_bug.cgi?id=49914
      
              Move data members from GraphicsContextPrivate into GraphicsContext. So GraphicsContextPlatform.h
              and m_common became unnecessary. They are removed.
              Add two methods to GraphicsContext: platformInit() and platformDestroy(), which
              make the constructor of GraphicsContext clearer.
              Besides add a getter to the private GraphicsContext::m_state member, because some inline
              functions in cairo need it.
      
              No new test is needed, because this is a refactoring.
      
              * WebCore.xcodeproj/project.pbxproj:
              * platform/graphics/GraphicsContext.cpp:
              (WebCore::GraphicsContext::GraphicsContext):
              (WebCore::GraphicsContext::~GraphicsContext):
              (WebCore::GraphicsContext::save):
              (WebCore::GraphicsContext::restore):
              (WebCore::GraphicsContext::setStrokeThickness):
              (WebCore::GraphicsContext::setStrokeStyle):
              (WebCore::GraphicsContext::setStrokeColor):
              (WebCore::GraphicsContext::setShadow):
              (WebCore::GraphicsContext::clearShadow):
              (WebCore::GraphicsContext::getShadow):
              (WebCore::GraphicsContext::strokeThickness):
              (WebCore::GraphicsContext::strokeStyle):
              (WebCore::GraphicsContext::strokeColor):
              (WebCore::GraphicsContext::strokeColorSpace):
              (WebCore::GraphicsContext::fillRule):
              (WebCore::GraphicsContext::setFillRule):
              (WebCore::GraphicsContext::setFillColor):
              (WebCore::GraphicsContext::fillColor):
              (WebCore::GraphicsContext::fillColorSpace):
              (WebCore::GraphicsContext::setShouldAntialias):
              (WebCore::GraphicsContext::shouldAntialias):
              (WebCore::GraphicsContext::state):
              (WebCore::GraphicsContext::setStrokePattern):
              (WebCore::GraphicsContext::setFillPattern):
              (WebCore::GraphicsContext::setStrokeGradient):
              (WebCore::GraphicsContext::setFillGradient):
              (WebCore::GraphicsContext::fillGradient):
              (WebCore::GraphicsContext::strokeGradient):
              (WebCore::GraphicsContext::fillPattern):
              (WebCore::GraphicsContext::strokePattern):
              (WebCore::GraphicsContext::setShadowsIgnoreTransforms):
              (WebCore::GraphicsContext::updatingControlTints):
              (WebCore::GraphicsContext::setUpdatingControlTints):
              (WebCore::GraphicsContext::setPaintingDisabled):
              (WebCore::GraphicsContext::paintingDisabled):
              (WebCore::GraphicsContext::textDrawingMode):
              (WebCore::GraphicsContext::setTextDrawingMode):
              * platform/graphics/GraphicsContext.h:
              (WebCore::GraphicsContextState::GraphicsContextState):
              * platform/graphics/GraphicsContextPrivate.h: Removed.
              * platform/graphics/cairo/GraphicsContextCairo.cpp:
              (WebCore::setPlatformFill):
              (WebCore::setPlatformStroke):
              (WebCore::drawPathShadow):
              (WebCore::fillCurrentCairoPath):
              (WebCore::strokeCurrentCairoPath):
              (WebCore::GraphicsContext::platformInit):
              (WebCore::GraphicsContext::platformDestroy):
              (WebCore::GraphicsContext::fillPath):
              (WebCore::GraphicsContext::strokePath):
              (WebCore::GraphicsContext::fillRect):
              (WebCore::GraphicsContext::setPlatformShadow):
              (WebCore::GraphicsContext::strokeRect):
              (WebCore::GraphicsContext::setAlpha):
              (WebCore::GraphicsContext::getAlpha):
              * platform/graphics/cg/GraphicsContextCG.cpp:
              (WebCore::GraphicsContext::platformInit):
              (WebCore::GraphicsContext::platformDestroy):
              (WebCore::GraphicsContext::applyStrokePattern):
              (WebCore::GraphicsContext::applyFillPattern):
              (WebCore::GraphicsContext::drawPath):
              (WebCore::GraphicsContext::fillPath):
              (WebCore::GraphicsContext::strokePath):
              (WebCore::GraphicsContext::fillRect):
              (WebCore::GraphicsContext::setPlatformShadow):
              (WebCore::GraphicsContext::strokeRect):
              * platform/graphics/haiku/GraphicsContextHaiku.cpp:
              (WebCore::GraphicsContext::platformInit):
              (WebCore::GraphicsContext::platformDestroy):
              * platform/graphics/openvg/GraphicsContextOpenVG.cpp:
              (WebCore::GraphicsContext::platformInit):
              (WebCore::GraphicsContext::platformDestroy):
              (WebCore::GraphicsContext::fillPath):
              (WebCore::GraphicsContext::strokePath):
              (WebCore::GraphicsContext::clip):
              (WebCore::GraphicsContext::clipOut):
              (WebCore::GraphicsContext::addInnerRoundedRectClip):
              * platform/graphics/qt/GraphicsContextQt.cpp:
              (WebCore::GraphicsContext::platformInit):
              (WebCore::GraphicsContext::platformDestroy):
              (WebCore::GraphicsContext::fillPath):
              (WebCore::GraphicsContext::strokePath):
              (WebCore::GraphicsContext::fillRect):
              (WebCore::GraphicsContext::setPlatformShadow):
              * platform/graphics/skia/GraphicsContextSkia.cpp:
              (WebCore::GraphicsContext::platformInit):
              (WebCore::GraphicsContext::platformDestroy):
              (WebCore::GraphicsContext::fillPath):
              (WebCore::GraphicsContext::setPlatformShadow):
              * platform/graphics/win/GraphicsContextCGWin.cpp:
              (WebCore::GraphicsContext::platformInit):
              * platform/graphics/win/GraphicsContextCairoWin.cpp:
              (WebCore::GraphicsContext::platformInit):
              * platform/graphics/wince/GraphicsContextWinCE.cpp:
              (WebCore::GraphicsContext::platformInit):
              (WebCore::GraphicsContext::platformDestroy):
              (WebCore::GraphicsContext::fillPath):
              (WebCore::GraphicsContext::fillRect):
              * platform/graphics/wx/GraphicsContextWx.cpp:
              (WebCore::GraphicsContext::platformInit):
              (WebCore::GraphicsContext::platformDestroy):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@73492 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      0a15b59f
  3. 03 Dec, 2010 1 commit
  4. 30 Nov, 2010 1 commit
    • andreas.kling@nokia.com's avatar
      2010-11-30 Andreas Kling <kling@webkit.org> · bc1e1623
      andreas.kling@nokia.com authored
              Reviewed by Dirk Schulze.
      
              GraphicsContext: Remove "current path" and have strokePath, fillPath and clipPath take a Path argument.
              https://bugs.webkit.org/show_bug.cgi?id=48516
      
              No new tests, this is refactoring only.
      
              fillPath() -> fillPath(const Path&)
              strokePath() -> strokePath(const Path&)
              clipPath(WindRule) -> clipPath(const Path&, WindRule)
      
              drawPath() was only used by CG, so made it PLATFORM(CG) specific.
      
              The Qt, CG and Cairo implementations are best-effort.
              For the rest, I've put beginPath/addPath and FIXMEs in the three affected methods.
      
              * WebCore.exp.in:
              * html/canvas/CanvasRenderingContext2D.cpp:
              (WebCore::CanvasRenderingContext2D::fill):
              (WebCore::CanvasRenderingContext2D::stroke):
              * inspector/InspectorController.cpp:
              (WebCore::drawOutlinedQuad):
              * mathml/RenderMathMLRoot.cpp:
              (WebCore::RenderMathMLRoot::paint):
              * mathml/RenderMathMLSquareRoot.cpp:
              (WebCore::RenderMathMLSquareRoot::paint):
              * platform/graphics/GraphicsContext.h:
              * platform/graphics/GraphicsContextPrivate.h:
              * platform/graphics/cairo/GraphicsContextCairo.cpp:
              (WebCore::GraphicsContext::fillPath):
              (WebCore::GraphicsContext::strokePath):
              (WebCore::GraphicsContext::clipPath):
              * platform/graphics/cairo/GraphicsContextPlatformPrivateCairo.h:
              * platform/graphics/cg/GraphicsContextCG.cpp:
              (WebCore::GraphicsContext::drawEllipse):
              (WebCore::addConvexPolygonToPath):
              (WebCore::GraphicsContext::drawConvexPolygon):
              (WebCore::GraphicsContext::clipConvexPolygon):
              (WebCore::GraphicsContext::drawPath):
              (WebCore::GraphicsContext::fillPath):
              (WebCore::GraphicsContext::strokePath):
              (WebCore::GraphicsContext::fillRoundedRect):
              (WebCore::GraphicsContext::clipPath):
              * platform/graphics/haiku/GraphicsContextHaiku.cpp:
              (WebCore::GraphicsContext::strokePath):
              (WebCore::GraphicsContext::fillPath):
              * platform/graphics/openvg/GraphicsContextOpenVG.cpp:
              (WebCore::GraphicsContext::fillPath):
              (WebCore::GraphicsContext::strokePath):
              (WebCore::GraphicsContext::clipPath):
              * platform/graphics/qt/GraphicsContextQt.cpp:
              (WebCore::GraphicsContext::restorePlatformState):
              (WebCore::GraphicsContext::fillPath):
              (WebCore::GraphicsContext::strokePath):
              (WebCore::GraphicsContext::clipPath):
              (WebCore::GraphicsContext::strokeRect):
              (WebCore::GraphicsContext::translate):
              (WebCore::GraphicsContext::rotate):
              (WebCore::GraphicsContext::scale):
              (WebCore::GraphicsContext::concatCTM):
              * platform/graphics/skia/GraphicsContextSkia.cpp:
              (WebCore::GraphicsContext::clipPath):
              (WebCore::GraphicsContext::fillPath):
              (WebCore::GraphicsContext::strokePath):
              * platform/graphics/wince/GraphicsContextWinCE.cpp:
              (WebCore::GraphicsContext::fillPath):
              (WebCore::GraphicsContext::strokePath):
              (WebCore::GraphicsContext::clipPath):
              * platform/graphics/wx/GraphicsContextWx.cpp:
              (WebCore::GraphicsContext::clipPath):
              (WebCore::GraphicsContext::fillPath):
              (WebCore::GraphicsContext::strokePath):
              * rendering/RenderBoxModelObject.cpp:
              (WebCore::RenderBoxModelObject::paintBorder):
              (WebCore::RenderBoxModelObject::paintBoxShadow):
              * rendering/RenderEmbeddedObject.cpp:
              (WebCore::RenderEmbeddedObject::paintReplaced):
              * rendering/RenderObject.cpp:
              (WebCore::RenderObject::drawBoxSideFromPath):
              * rendering/RenderSVGResource.h:
              (WebCore::RenderSVGResource::postApplyResource):
              * rendering/RenderSVGResourceClipper.cpp:
              (WebCore::RenderSVGResourceClipper::pathOnlyClipping):
              * rendering/RenderSVGResourceFilter.cpp:
              (WebCore::RenderSVGResourceFilter::postApplyResource):
              * rendering/RenderSVGResourceFilter.h:
              * rendering/RenderSVGResourceGradient.cpp:
              (WebCore::RenderSVGResourceGradient::applyResource):
              * rendering/RenderSVGResourceGradient.h:
              * rendering/RenderSVGResourcePattern.cpp:
              (WebCore::RenderSVGResourcePattern::postApplyResource):
              * rendering/RenderSVGResourcePattern.h:
              * rendering/RenderSVGResourceSolidColor.cpp:
              (WebCore::RenderSVGResourceSolidColor::postApplyResource):
              * rendering/RenderSVGResourceSolidColor.h:
              * rendering/SVGRenderSupport.cpp:
              (WebCore::SVGRenderSupport::finishRenderSVGContent):
              * rendering/svg/RenderSVGPath.cpp:
              (WebCore::RenderSVGPath::fillAndStrokePath):
              * rendering/svg/SVGInlineTextBox.cpp:
              (WebCore::SVGInlineTextBox::releasePaintingResource):
              (WebCore::SVGInlineTextBox::restoreGraphicsContextAfterTextPainting):
              (WebCore::SVGInlineTextBox::paintDecorationWithStyle):
              * rendering/svg/SVGInlineTextBox.h:
              * svg/SVGFont.cpp:
              (WebCore::Font::drawTextUsingSVGFont):
      2010-11-30  Andreas Kling  <kling@webkit.org>
      
              Reviewed by Dirk Schulze.
      
              GraphicsContext: Remove "current path" and have strokePath, fillPath and clipPath take a Path argument
              https://bugs.webkit.org/show_bug.cgi?id=48516
      
              * UIProcess/FindIndicator.cpp:
              (WebKit::FindIndicator::draw):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@72926 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      bc1e1623
  5. 22 Nov, 2010 1 commit
    • andreas.kling@nokia.com's avatar
      2010-11-22 Andreas Kling <kling@webkit.org> · e77b4212
      andreas.kling@nokia.com authored
              Reviewed by Nikolas Zimmermann.
      
              GraphicsContext: Make drawFocusRing() take a Path instead of a Vector<Path>
              https://bugs.webkit.org/show_bug.cgi?id=49840
      
              This avoid copying a Path object when drawing focus rings.
      
              * platform/graphics/GraphicsContext.h:
              * platform/graphics/cairo/GraphicsContextCairo.cpp:
              (WebCore::GraphicsContext::drawFocusRing):
              * platform/graphics/haiku/GraphicsContextHaiku.cpp:
              (WebCore::GraphicsContext::drawFocusRing):
              * platform/graphics/mac/GraphicsContextMac.mm:
              (WebCore::GraphicsContext::drawFocusRing):
              * platform/graphics/qt/GraphicsContextQt.cpp:
              (WebCore::GraphicsContext::drawFocusRing):
              * platform/graphics/skia/GraphicsContextSkia.cpp:
              (WebCore::GraphicsContext::drawFocusRing):
              * platform/graphics/win/GraphicsContextCGWin.cpp:
              (WebCore::GraphicsContext::drawFocusRing):
              * platform/graphics/wince/GraphicsContextWinCE.cpp:
              (WebCore::GraphicsContext::drawFocusRing):
              * platform/graphics/wx/GraphicsContextWx.cpp:
              (WebCore::GraphicsContext::drawFocusRing):
              * rendering/RenderImage.h:
              * rendering/RenderImage.cpp:
              (WebCore::RenderImage::paint):
              (WebCore::RenderImage::paintFocusRing):
              Renamed from paintFocusRings since it only paints one ring.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@72528 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      e77b4212
  6. 04 Nov, 2010 1 commit
    • andreas.kling@nokia.com's avatar
      2010-11-04 Andreas Kling <kling@webkit.org> · e05dd4fe
      andreas.kling@nokia.com authored
              Reviewed by Nikolas Zimmermann.
      
              GraphicsContext: Don't do full save/restore when painting with low quality scaling
              https://bugs.webkit.org/show_bug.cgi?id=48738
      
              Stash the imageInterpolationQuality() in a local and reset it after painting.
      
              * platform/graphics/GraphicsContext.cpp:
              (WebCore::GraphicsContext::drawImage):
              (WebCore::GraphicsContext::drawTiledImage):
              (WebCore::GraphicsContext::drawImageBuffer):
              * platform/graphics/haiku/GraphicsContextHaiku.cpp:
              (WebCore::GraphicsContext::imageInterpolationQuality):
              * platform/graphics/skia/GraphicsContextSkia.cpp:
              (WebCore::GraphicsContext::imageInterpolationQuality):
              * platform/graphics/wince/GraphicsContextWinCE.cpp:
              (WebCore::GraphicsContext::imageInterpolationQuality):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@71337 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      e05dd4fe
  7. 31 Oct, 2010 1 commit
  8. 27 Sep, 2010 1 commit
  9. 09 Sep, 2010 1 commit
    • jamesr@google.com's avatar
      2010-09-09 Vincent Scheib <scheib@chromium.org> · 7fc9d09f
      jamesr@google.com authored
              Reviewed by James Robinson.
      
              [Chromium] Minimize uploads in canvas 2d mixed mode rendering
              https://bugs.webkit.org/show_bug.cgi?id=45476
      
              No new tests - change is for performance, logic fixes only apparent when running hardware acceleration.
      
              - Enumeration values fixed, "CavasWillDraw" -> "CanvasDidDraw".
              - markDirtyRect() plumbed through GraphicsContext to PlatformContextSkia.
              - Texture::updateSubRect() added to allow uploading only a dirty rect.
              - Logic fix in ImageBuffer::draw(), caused canvas to canvas copies to be incorrect.
      
              * html/canvas/CanvasRenderingContext2D.cpp:
              (WebCore::CanvasRenderingContext2D::setAllAttributesToDefault):
              (WebCore::CanvasRenderingContext2D::strokeRect):
              (WebCore::CanvasRenderingContext2D::drawImage):
              (WebCore::CanvasRenderingContext2D::didDraw):
                - Logic fix for drawingContext()->markDirtyRect() call.
              (WebCore::CanvasRenderingContext2D::putImageData):
              (WebCore::CanvasRenderingContext2D::drawTextInternal):
                - Logic fix for calls to "didDraw()", use peer method first.
              * html/canvas/CanvasRenderingContext2D.h:
              * platform/graphics/GraphicsContext.cpp:
              (WebCore::GraphicsContext::drawImageBuffer):
              (WebCore::GraphicsContext::markDirtyRect):
              * platform/graphics/GraphicsContext.h:
              * platform/graphics/gpu/Texture.cpp:
              (WebCore::Texture::create):
              (WebCore::Texture::load):
              (WebCore::Texture::updateSubRect):
              * platform/graphics/gpu/Texture.h:
              * platform/graphics/gpu/TilingData.h:
              (WebCore::TilingData::borderTexels):
              * platform/graphics/skia/GraphicsContextSkia.cpp:
              (WebCore::GraphicsContext::clipConvexPolygon):
              (WebCore::GraphicsContext::markDirtyRect):
              * platform/graphics/skia/ImageBufferSkia.cpp:
              (WebCore::ImageBuffer::draw):
              * platform/graphics/skia/PlatformContextSkia.cpp:
              (WebCore::PlatformContextSkia::State::cloneInheritedProperties):
              (WebCore::PlatformContextSkia::drawRect):
              (WebCore::PlatformContextSkia::setFillColor):
              (WebCore::PlatformContextSkia::setStrokeColor):
              (WebCore::PlatformContextSkia::markDirtyRect):
              (WebCore::PlatformContextSkia::uploadSoftwareToHardware):
              * platform/graphics/skia/PlatformContextSkia.h:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@67123 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      7fc9d09f
  10. 08 Sep, 2010 2 commits
    • jamesr@google.com's avatar
      2010-09-08 James Robinson <jamesr@chromium.org> · cbb36dab
      jamesr@google.com authored
              Reviewed by Kenneth Russell.
      
              [chromium] Always do 2d canvas clearRect() in hardware
              https://bugs.webkit.org/show_bug.cgi?id=45415
      
              r67003 forced Canvas 2d's clearRect() to happen in software if a gradient/shadow/etc was
              active.  This is subtly wrong for mixed mode rendering since it results in only the
              software backing store being cleared and not the hardware.  This forces clearRect() to
              happen in hardware.  Since we upload mixed mode results before doing any hardware draw
              this means we always clear everything.
      
              * platform/graphics/skia/GraphicsContextSkia.cpp:
              (WebCore::GraphicsContext::clearRect):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@67039 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      cbb36dab
    • jamesr@google.com's avatar
      2010-09-08 James Robinson <jamesr@chromium.org> · d92f51f2
      jamesr@google.com authored
              Reviewed by Kenneth Russell.
      
              [chromium] Force canvas 2d draw calls to happen in software if a gradient, pattern, shadow, or clip are active
              https://bugs.webkit.org/show_bug.cgi?id=45405
      
              This forces all draw calls to happen in software instead of hardware if there is a fill pattern, gradient,
              shadow, or clip applied; at least until we can handle these in hardware.  Otherwise the pattern/gradient/etc
              is completely ignored by the hardware drawing routine and we render incorrectly.
      
              The test is slightly convervative - for example it will force drawImage() calls to happen in software if a
              fill gradient is set even though it's irrelevant.  This doesn't seem to be an issue in practice and we
              can tighten the checks later if needed.
      
              Tested by fast/canvas/canvas-incremental-repaint.html.
      
              * platform/graphics/skia/GraphicsContextSkia.cpp:
              (WebCore::GraphicsContext::canvasClip):
              (WebCore::GraphicsContext::fillRect):
              * platform/graphics/skia/ImageBufferSkia.cpp:
              (WebCore::ImageBuffer::draw):
              * platform/graphics/skia/ImageSkia.cpp:
              (WebCore::BitmapImage::draw):
              (WebCore::BitmapImageSingleFrameSkia::draw):
              * platform/graphics/skia/PlatformContextSkia.cpp:
              (WebCore::PlatformContextSkia::State::State):
              (WebCore::PlatformContextSkia::canvasClipPath):
              (WebCore::PlatformContextSkia::canAccelerate):
              * platform/graphics/skia/PlatformContextSkia.h:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@67003 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      d92f51f2
  11. 03 Sep, 2010 1 commit
    • jamesr@google.com's avatar
      2010-09-03 James Robinson <jamesr@chromium.org> · bab91910
      jamesr@google.com authored
              Reviewed by Chris Marrin.
      
              Multiple accelerated 2D canvases should be able to use the same GraphicsContext3D
              https://bugs.webkit.org/show_bug.cgi?id=44926
      
              This allows many accelerated 2d canvases to render using a single underlying GraphicsContext3D.
              It introduces a new class SharedGraphicsContext3D that manages several callers.  This class could
              also cache the current state to avoid issuing redundant calls, although in this first cut it doesn't.
              The SharedGraphicsContext3D is provided through the ChromeClient so that its lifetime can be tied to that
              of the platform-specific compositor infrastructure.
      
              Accelerated 2d canvases maintain a reference to a SharedGraphicsContext3D and have ownership of a CanvasFramebuffer,
              which represents the canvas's rendering target.  The compositing layer for an accelerated 2d canvas is
              aware only of the canvas's CanvasFramebuffer.  This means that WebGL and 2d canvases are no longer treated
              as the same time of layer by the compositor.
      
              Covered by existing canvas tests.
      
              * WebCore.gypi:
              * html/canvas/CanvasRenderingContext.cpp:
              * html/canvas/CanvasRenderingContext.h:
              (WebCore::CanvasRenderingContext::paintsIntoCanvasBuffer):
              (WebCore::CanvasRenderingContext::platformLayer):
              * html/canvas/CanvasRenderingContext2D.cpp:
              (WebCore::CanvasRenderingContext2D::CanvasRenderingContext2D):
              (WebCore::CanvasRenderingContext2D::paintsIntoCanvasBuffer):
              (WebCore::CanvasRenderingContext2D::reset):
              (WebCore::CanvasRenderingContext2D::didDraw):
              (WebCore::CanvasRenderingContext2D::platformLayer):
              * html/canvas/CanvasRenderingContext2D.h:
              * html/canvas/WebGLRenderingContext.cpp:
              (WebCore::WebGLRenderingContext::paintsIntoCanvasBuffer):
              * html/canvas/WebGLRenderingContext.h:
              (WebCore::WebGLRenderingContext::graphicsContext3D):
              (WebCore::WebGLRenderingContext::platformLayer):
              * loader/EmptyClients.h:
              (WebCore::EmptyChromeClient::attachRootGraphicsLayer):
              (WebCore::EmptyChromeClient::setNeedsOneShotDrawingSynchronization):
              (WebCore::EmptyChromeClient::scheduleCompositingLayerSync):
              * page/ChromeClient.h:
              (WebCore::ChromeClient::getSharedGraphicsContext3D):
              * platform/graphics/GraphicsContext.cpp:
              (WebCore::GraphicsContext::setSharedGraphicsContext3D):
              (WebCore::GraphicsContext::syncSoftwareCanvas):
              * platform/graphics/GraphicsContext.h:
              * platform/graphics/chromium/Canvas2DLayerChromium.cpp: Added.
              (WebCore::Canvas2DLayerChromium::create):
              (WebCore::Canvas2DLayerChromium::Canvas2DLayerChromium):
              (WebCore::Canvas2DLayerChromium::~Canvas2DLayerChromium):
              (WebCore::Canvas2DLayerChromium::updateContents):
              (WebCore::Canvas2DLayerChromium::setTextureChanged):
              (WebCore::Canvas2DLayerChromium::textureId):
              * platform/graphics/chromium/Canvas2DLayerChromium.h: Added.
              (WebCore::Canvas2DLayerChromium::drawsContent):
              * platform/graphics/chromium/CanvasLayerChromium.cpp:
              (WebCore::CanvasLayerChromium::CanvasLayerChromium):
              (WebCore::CanvasLayerChromium::~CanvasLayerChromium):
              (WebCore::CanvasLayerChromium::draw):
              * platform/graphics/chromium/CanvasLayerChromium.h:
              * platform/graphics/chromium/DrawingBufferChromium.cpp: Added.
              (WebCore::generateColorTexture):
              (WebCore::DrawingBuffer::DrawingBuffer):
              (WebCore::DrawingBuffer::~DrawingBuffer):
              (WebCore::DrawingBuffer::publishToPlatformLayer):
              (WebCore::DrawingBuffer::reset):
              (WebCore::DrawingBuffer::platformLayer):
              * platform/graphics/chromium/GLES2Canvas.cpp:
              (WebCore::GLES2Canvas::GLES2Canvas):
              (WebCore::GLES2Canvas::~GLES2Canvas):
              (WebCore::GLES2Canvas::bindFramebuffer):
              (WebCore::GLES2Canvas::clearRect):
              (WebCore::GLES2Canvas::fillRect):
              (WebCore::GLES2Canvas::drawTexturedRect):
              (WebCore::GLES2Canvas::drawTexturedRectTile):
              (WebCore::GLES2Canvas::drawQuad):
              (WebCore::GLES2Canvas::createTexture):
              (WebCore::GLES2Canvas::getTexture):
              * platform/graphics/chromium/GLES2Canvas.h:
              (WebCore::GLES2Canvas::context):
              (WebCore::GLES2Canvas::drawingBuffer):
              * platform/graphics/chromium/GraphicsLayerChromium.cpp:
              (WebCore::GraphicsLayerChromium::setContentsToCanvas):
              * platform/graphics/chromium/GraphicsLayerChromium.h:
              * platform/graphics/chromium/WebGLLayerChromium.cpp: Added.
              (WebCore::WebGLLayerChromium::create):
              (WebCore::WebGLLayerChromium::WebGLLayerChromium):
              (WebCore::WebGLLayerChromium::updateContents):
              (WebCore::WebGLLayerChromium::setContext):
              * platform/graphics/chromium/WebGLLayerChromium.h: Added.
              (WebCore::WebGLLayerChromium::drawsContent):
              * platform/graphics/gpu/DrawingBuffer.cpp: Added.
              (WebCore::DrawingBuffer::create):
              (WebCore::DrawingBuffer::bind):
              (WebCore::DrawingBuffer::setWillPublishCallback):
              * platform/graphics/gpu/DrawingBuffer.h: Added.
              (WebCore::DrawingBuffer::size):
              * platform/graphics/gpu/SharedGraphicsContext3D.cpp: Added.
              (WebCore::SharedGraphicsContext3D::create):
              (WebCore::SharedGraphicsContext3D::SharedGraphicsContext3D):
              (WebCore::SharedGraphicsContext3D::~SharedGraphicsContext3D):
              (WebCore::SharedGraphicsContext3D::makeContextCurrent):
              (WebCore::SharedGraphicsContext3D::scissor):
              (WebCore::SharedGraphicsContext3D::enable):
              (WebCore::SharedGraphicsContext3D::disable):
              (WebCore::SharedGraphicsContext3D::clearColor):
              (WebCore::SharedGraphicsContext3D::clear):
              (WebCore::SharedGraphicsContext3D::drawArrays):
              (WebCore::SharedGraphicsContext3D::getError):
              (WebCore::SharedGraphicsContext3D::getIntegerv):
              (WebCore::SharedGraphicsContext3D::createFramebuffer):
              (WebCore::SharedGraphicsContext3D::createTexture):
              (WebCore::SharedGraphicsContext3D::deleteFramebuffer):
              (WebCore::SharedGraphicsContext3D::deleteTexture):
              (WebCore::SharedGraphicsContext3D::framebufferTexture2D):
              (WebCore::SharedGraphicsContext3D::texParameteri):
              (WebCore::SharedGraphicsContext3D::texImage2D):
              (WebCore::SharedGraphicsContext3D::texSubImage2D):
              (WebCore::SharedGraphicsContext3D::readPixels):
              (WebCore::SharedGraphicsContext3D::supportsBGRA):
              (WebCore::SharedGraphicsContext3D::getTexture):
              (WebCore::SharedGraphicsContext3D::applyCompositeOperator):
              (WebCore::SharedGraphicsContext3D::useQuadVertices):
              (WebCore::SharedGraphicsContext3D::setActiveTexture):
              (WebCore::SharedGraphicsContext3D::bindTexture):
              (WebCore::SharedGraphicsContext3D::useFillSolidProgram):
              (WebCore::SharedGraphicsContext3D::useTextureProgram):
              (WebCore::SharedGraphicsContext3D::bindFramebuffer):
              (WebCore::SharedGraphicsContext3D::setViewport):
              (WebCore::SharedGraphicsContext3D::paintsIntoCanvasBuffer):
              * platform/graphics/gpu/SharedGraphicsContext3D.h: Added.
              * platform/graphics/gpu/Texture.cpp:
              * platform/graphics/skia/GraphicsContextSkia.cpp:
              (WebCore::GraphicsContext::syncSoftwareCanvas):
              (WebCore::GraphicsContext::setSharedGraphicsContext3D):
              * platform/graphics/skia/ImageSkia.cpp:
              * platform/graphics/skia/PlatformContextSkia.cpp:
              (WebCore::PlatformContextSkia::~PlatformContextSkia):
              (WebCore::WillPublishCallbackImpl::create):
              (WebCore::WillPublishCallbackImpl::willPublish):
              (WebCore::WillPublishCallbackImpl::WillPublishCallbackImpl):
              (WebCore::PlatformContextSkia::setSharedGraphicsContext3D):
              (WebCore::PlatformContextSkia::uploadSoftwareToHardware):
              (WebCore::PlatformContextSkia::readbackHardwareToSoftware):
              * platform/graphics/skia/PlatformContextSkia.h:
              * rendering/RenderLayerBacking.cpp:
              (WebCore::RenderLayerBacking::updateGraphicsLayerConfiguration):
      2010-09-03  James Robinson  <jamesr@chromium.org>
      
              Reviewed by Chris Marrin.
      
              Multiple accelerated 2D canvases should be able to use the same GraphicsContext3D
              https://bugs.webkit.org/show_bug.cgi?id=44926
      
              Adds a SharedContext3D to WebViewImpl. The SharedContext3D has to live on WebViewImpl to be
              tied to the lifetime of the compositor context.
      
              * src/ChromeClientImpl.cpp:
              (WebKit::ChromeClientImpl::getSharedGraphicsContext3D):
              * src/ChromeClientImpl.h:
              * src/GraphicsContext3D.cpp:
              (WebCore::GraphicsContext3DInternal::initialize):
              (WebCore::GraphicsContext3DInternal::platformLayer):
              (WebCore::GraphicsContext3D::platformLayer):
              * src/WebViewImpl.cpp:
              (WebKit::WebViewImpl::getSharedGraphicsContext3D):
              * src/WebViewImpl.h:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@66746 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      bab91910
  12. 02 Sep, 2010 1 commit
    • mitz@apple.com's avatar
      Add support for autocorrection UI on Mac OS X. · 1f24e24a
      mitz@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=44958
      <rdar://problem/7299621>
      
      Patch by Jia Pu <jpu@apple.com> on 2010-09-01
      Reviewed by Dan Bernstein.
      
      WebCore: 
      
      Several new member methods are added to EditorClient for communication
      between WebCore and WebKit. A new handler, executeCancelOperation(), is
      added to EditorCommand.cpp so that WebCore can intercept the ESC key event
      to dismiss autocorrection UI. A new DocumentMarker value, RejectedCorrection,
      is added to keep track of the corrections that user has rejected, so that it
      will not be suggested again later. The autocorrection is driven by a timer.
      Every time the editor inserts a new letter, the timer is reset. If the timer
      fires, it means neither has user entered any new letter for current word, nor
      has he entered whitespace or punctuation to complete the word. In this case,
      we query for autocorrection.
      
      * WebCore.exp.in: Updated
      
      * dom/DocumentMarker.h: Added RejectedCorrection to indicate word on which user
        has rejected autocorrection.
      
      * editing/Editor.cpp:
      (WebCore::Editor::Editor): Initialize autocorrection timer.
      (WebCore::Editor::~Editor): Make sure autocorrection UI is dismissed before
        destroying Editor object.
      (WebCore::Editor::markMisspellingsAfterTypingToPosition): Adopted new signature
        of markAllMisspellingsAndBadGrammarInRanges().
      (WebCore::Editor::markAllMisspellingsAndBadGrammarInRanges): Consolidated all
        boolean arguments into one bitfield. This improves readability and allows us to
        pass in a bit to indicate whether we want to show autocorrection UI. Also added
        code to show autocorrection UI if it is necessary.
      (WebCore::Editor::markMisspellingsAndBadGrammar): Adopted new signature of
        markAllMisspellingsAndBadGrammarInRanges().
      (WebCore::Editor::correctionPanelTimerFired): Check to see if we should show
        autocorrection UI when user pauses during typing.
      (WebCore::Editor::handleRejectedCorrection): Update user dictionary when an autocorrection is rejected.
      (WebCore::Editor::startCorrectionPanelTimer): Start autocorrection timer.
      (WebCore::Editor::handleCancelOperation): Dismiss autocorrection UI when ESC key is pressed.
      
      * editing/Editor.h: Added autocorrection related member methods and variables.
      
      * editing/EditorCommand.cpp:
      (WebCore::executeCancelOperation): Handle ESC key event. Dismiss autocorrection UI.
      (WebCore::createCommandMap): Updated for executeCancelOperation().
      
      * editing/TypingCommand.cpp:
      (WebCore::TypingCommand::markMisspellingsAfterTyping): Reset autocorrection timer after insertion.
      
      * loader/EmptyClients.h:
      (WebCore::EmptyEditorClient::showCorrectionPanel): Dummy implementation.
      (WebCore::EmptyEditorClient::dismissCorrectionPanel): Ditto
      
      * page/EditorClient.h: Added methods for communication between WebCore and WebKit regarding autocorrection.
      
      * page/Frame.cpp:
      (WebCore::Frame::respondToChangedSelection): Remove Replacement marker where we used to only remove Spelling
        mark, because whenever we need to remove spelling underline we also should remove autocorrection underline.
      
      * platform/graphics/GraphicsContext.h: Added enum TextCheckingLineStyle to specify the underline
        for different type of text checking result. Replaced drawLineForMisspellingOrBadGrammar() with
        drawLineForTextChecking(), which allows autocorrection to have different indication from misspelling
        and grammatical error.
      
      * platform/graphics/cairo/GraphicsContextCairo.cpp:
      (WebCore::GraphicsContext::drawLineForTextChecking): Replaced drawLineForMisspellingOrBadGrammar() with drawLineForTextChecking().
      
      * platform/graphics/haiku/GraphicsContextHaiku.cpp:
      (WebCore::GraphicsContext::drawLineForTextChecking): Ditto
      
      * platform/graphics/mac/GraphicsContextMac.mm:
      (WebCore::GraphicsContext::drawLineForTextChecking): Ditto
      
      * platform/graphics/openvg/GraphicsContextOpenVG.cpp:
      (WebCore::GraphicsContext::drawLineForTextChecking): Ditto
      
      * platform/graphics/qt/GraphicsContextQt.cpp:
      (WebCore::GraphicsContext::drawLineForTextChecking): Ditto
      
      * platform/graphics/skia/GraphicsContextSkia.cpp:
      (WebCore::GraphicsContext::drawLineForTextChecking): Ditto
      
      * platform/graphics/win/GraphicsContextCGWin.cpp:
      (WebCore::GraphicsContext::drawLineForTextChecking): Ditto
      
      * platform/graphics/wince/GraphicsContextWince.cpp:
      (WebCore::GraphicsContext::drawLineForTextChecking): Ditto
      
      * platform/graphics/wx/GraphicsContextWx.cpp:
      (WebCore::GraphicsContext::drawLineForTextChecking): Ditto
      
      * rendering/InlineTextBox.cpp:
      (WebCore::textCheckingLineStyleForMarkerType): Return line style for a given document marker type.
      (WebCore::InlineTextBox::paintSpellingOrGrammarMarker):  Replaced drawLineForMisspellingOrBadGrammar() with drawLineForTextChecking().
      (WebCore::InlineTextBox::paintDocumentMarkers): Handle new marker value, RejectedCorrection.
      
      WebKit/mac: 
      
      See detailed high level description in WebCore/ChangeLog.
      
      * WebCoreSupport/WebEditorClient.h: Added new member methods declared in
        EditorClient. Added m_correctionPanelTag to store the ID of current autocorrection UI object.
      
      * WebCoreSupport/WebEditorClient.mm:
      (WebEditorClient::WebEditorClient): Initialize m_correctionPanelTag.
      (WebEditorClient::~WebEditorClient): Make sure the autocorrection UI is
        dismissed before destroying the object.
      (WebEditorClient::respondToChangedSelection): Dismiss autocorrection UI whenever the selection changes.
      (WebEditorClient::showCorrectionPanel): Show autocorrection UI.
      (WebEditorClient::dismissCorrectionPanel): Dismiss autocorrection UI.
      
      WebKit2: 
      
      See detailed high level description in WebCore/ChangeLog.
      
      * WebProcess/WebCoreSupport/WebEditorClient.cpp:
      (WebKit::WebEditorClient::showCorrectionPanel): Dummy implementation.
      (WebKit::WebEditorClient::dismissCorrectionPanel): Ditto
      
      * WebProcess/WebCoreSupport/WebEditorClient.h: Added new methods declared in base class.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@66643 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      1f24e24a
  13. 26 Aug, 2010 1 commit
    • jamesr@google.com's avatar
      2010-08-26 James Robinson <jamesr@chromium.org> · be759374
      jamesr@google.com authored
              Reviewed by Darin Fisher.
      
              [chromium] Remove the USE(GLES2_RENDERING) define and associated code
              https://bugs.webkit.org/show_bug.cgi?id=43761
      
              Remove WTF_USE_GLES2_RENDERING from the list of defines in chromium, it's unused.
      
              * wtf/Platform.h:
      2010-08-26  James Robinson  <jamesr@chromium.org>
      
              Reviewed by Darin Fisher.
      
              [chromium] Remove the USE(GLES2_RENDERING) define and associated code
              https://bugs.webkit.org/show_bug.cgi?id=43761
      
              USE(GLES2_RENDERING) will not be useful since we'll be coding to GraphicsContext3D
              instead of OpenGL and can use ENABLE(ACCELERATED_2D_CANVAS) for canvas 2d specific
              changes.  This deletes the macro and deletes the ChromeClient API to query
              GLES2Contexts since we'll never need one of these outside of the compositor, which
              is created in platform-specific code.
      
              * loader/EmptyClients.h:
              * page/ChromeClient.h:
              * platform/graphics/chromium/GLES2Canvas.cpp:
              * platform/graphics/chromium/GLES2Canvas.h:
              * platform/graphics/chromium/GLES2Texture.cpp:
              * platform/graphics/chromium/GLES2Texture.h:
              * platform/graphics/skia/GraphicsContextSkia.cpp:
              (WebCore::GraphicsContext::savePlatformState):
              (WebCore::GraphicsContext::restorePlatformState):
              (WebCore::GraphicsContext::clearRect):
              (WebCore::GraphicsContext::concatCTM):
              (WebCore::GraphicsContext::fillRect):
              (WebCore::GraphicsContext::scale):
              (WebCore::GraphicsContext::setAlpha):
              (WebCore::GraphicsContext::setCompositeOperation):
              (WebCore::GraphicsContext::setPlatformFillColor):
              (WebCore::GraphicsContext::rotate):
              (WebCore::GraphicsContext::translate):
              (WebCore::GraphicsContext::setGraphicsContext3D):
              (WebCore::GraphicsContext::syncSoftwareCanvas):
              * platform/graphics/skia/ImageSkia.cpp:
              (WebCore::drawBitmapGLES2):
              (WebCore::BitmapImage::draw):
              (WebCore::BitmapImageSingleFrameSkia::draw):
              * platform/graphics/skia/PlatformContextSkia.cpp:
              (WebCore::PlatformContextSkia::PlatformContextSkia):
              (WebCore::PlatformContextSkia::~PlatformContextSkia):
              * platform/graphics/skia/PlatformContextSkia.h:
      2010-08-26  James Robinson  <jamesr@chromium.org>
      
              Reviewed by Darin Fisher.
      
              [chromium] Remove the USE(GLES2_RENDERING) define and associated code
              https://bugs.webkit.org/show_bug.cgi?id=43761
      
              Removes API support to grab a GLES2Context from within WebCore.  The compositor
              has a special codepath to grab its GLES2Context and no other codepaths
              need access to a raw context.  Accelerated drawing elsewhere will go through
              GraphicsContext3D.
      
              * src/ChromeClientImpl.cpp:
              * src/ChromeClientImpl.h:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@66155 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      be759374
  14. 23 Aug, 2010 1 commit
    • senorblanco@chromium.org's avatar
      2010-08-20 Stephen White <senorblanco@chromium.org> · b65a8617
      senorblanco@chromium.org authored
              Reviewed by Kenneth Russell.
      
              [CHROMIUM] Fix some failing layout tests w/ACCELERATED_2D_CANVAS
              https://bugs.webkit.org/show_bug.cgi?id=44346
      
              LayoutTests/fast/canvas/canvas-incremental-repaint.html (top middle
              pane).
              Failing because we were not applying the CTM in clearRect().  Now using
              the fast path when the CTM is identity, and a fillRect() for the rest.
              LayoutTests/fast/canvas/canvas-strokeRect.html
              LayoutTests/fast/canvas/shadow-offset-[1-7].html
              Failing because we weren't switching to the software path when a 
              shadow is present.
              Also refactor the two versions of fillRect(), and use TRIANGLE_STRIP
              strip instead of TRIANGLES, which lets us get rid of the element array
              and use drawArrays() instead of drawElements().
      
              Covered by the above layout tests.
      
              * platform/graphics/chromium/GLES2Canvas.cpp:
              (WebCore::GLES2Canvas::GLES2Canvas):
              (WebCore::GLES2Canvas::~GLES2Canvas):
              Remove m_quadIndices (now unused).
              (WebCore::GLES2Canvas::clearRect):
              Use a glClear() fast path for the identity-CTM clear, and fillRect()
              for the rest.
              (WebCore::GLES2Canvas::fillRect):
              Refactor the two versions of fillRect().
              (WebCore::GLES2Canvas::drawTexturedRect):
              (WebCore::GLES2Canvas::drawTexturedRectTile):
              Get rid of the ELEMENT_ARRAY_BUFFER bind.  Use drawArrays() instead of
              drawElements().
              (WebCore::GLES2Canvas::getQuadVertices):
              Re-order the vertices so they form a triangle strip.
              * platform/graphics/chromium/GLES2Canvas.h:
              Remove m_quadIndices (now unused).
              * platform/graphics/skia/GraphicsContextSkia.cpp:
              (WebCore::GraphicsContext::fillRect):
              Check for a draw looper (shadow), and drop to the software path.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@65836 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      b65a8617
  15. 19 Aug, 2010 1 commit
    • senorblanco@chromium.org's avatar
      2010-08-19 Stephen White <senorblanco@chromium.org> · 243caa23
      senorblanco@chromium.org authored
              Reviewed by Kenneth Russell.
      
              [CHROMIUM] Assert w/canvas image draw
              https://bugs.webkit.org/show_bug.cgi?id=44279
      
              Don't use bitmap->pixelRef()->getPixels() directly; prefer
              bitmap->pixels() and an SkAutoLockPixels.  Also, make sure to set
              the backing store state to Software when it was None.  This handles
              missing draws when the first call is software.  Finally, remove some
              spurious prepareForSoftwareDraw() calls in addPath() and beginPath().
              It's really the fillPath() or strokePath() that matters.
      
              Covered by LayoutTests/fast/canvas/arc360.html and others.
      
              * platform/graphics/skia/GraphicsContextSkia.cpp:
              (WebCore::GraphicsContext::addPath):
              (WebCore::GraphicsContext::beginPath):
              Remove spurious prepareForSoftwareDraw() calls.
              * platform/graphics/skia/ImageSkia.cpp:
              (WebCore::drawBitmapGLES2):
              Lock SkBitmap's pixels, and use ->getPixels().
              * platform/graphics/skia/PlatformContextSkia.cpp:
              (WebCore::PlatformContextSkia::prepareForSoftwareDraw):
              Switch backing store state to Software when it was None.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@65700 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      243caa23
  16. 16 Aug, 2010 1 commit
    • hyatt@apple.com's avatar
      https://bugs.webkit.org/show_bug.cgi?id=43507, stop ImageBuffer from copying... · ffec3a47
      hyatt@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=43507, stop ImageBuffer from copying its data when rendering after canvas changes happen.
              
      Reviewed by Anders Carlsson.
      
      This patch renames ImageBuffer::image() to ImageBuffer::copyImage(). The new method always returns a new copy that is a current
      snapshot of the ImageBuffer.
              
      To draw an ImageBuffer, you now use new GraphicsContext calls: drawImageBuffer.  Platforms can then optimize these calls to draw
      efficiently without having to copy the bits of the ImageBuffer into an Image.
      
      * WebCore.xcodeproj/project.pbxproj:
      * css/CSSCanvasValue.cpp:
      (WebCore::CSSCanvasValue::image):
      * html/HTMLCanvasElement.cpp:
      (WebCore::HTMLCanvasElement::willDraw):
      (WebCore::HTMLCanvasElement::reset):
      (WebCore::HTMLCanvasElement::paint):
      (WebCore::HTMLCanvasElement::setSurfaceSize):
      (WebCore::HTMLCanvasElement::copiedImage):
      (WebCore::HTMLCanvasElement::clearCopiedImage):
      * html/HTMLCanvasElement.h:
      * html/canvas/CanvasPattern.cpp:
      (WebCore::CanvasPattern::CanvasPattern):
      * html/canvas/CanvasPattern.h:
      (WebCore::CanvasPattern::create):
      * html/canvas/CanvasRenderingContext2D.cpp:
      (WebCore::CanvasRenderingContext2D::drawImage):
      (WebCore::CanvasRenderingContext2D::createPattern):
      (WebCore::CanvasRenderingContext2D::drawTextInternal):
      * html/canvas/WebGLRenderingContext.cpp:
      (WebCore::WebGLRenderingContext::paintRenderingResultsToCanvas):
      (WebCore::WebGLRenderingContext::reshape):
      (WebCore::WebGLRenderingContext::texImage2D):
      (WebCore::WebGLRenderingContext::texSubImage2D):
      * html/canvas/WebGLRenderingContext.h:
      (WebCore::WebGLRenderingContext::paintsIntoCanvasBuffer):
      * platform/graphics/GeneratedImage.cpp:
      (WebCore::GeneratedImage::drawPattern):
      * platform/graphics/GraphicsContext.cpp:
      (WebCore::GraphicsContext::drawImageBuffer):
      (WebCore::GraphicsContext::clipToImageBuffer):
      * platform/graphics/GraphicsContext.h:
      * platform/graphics/GraphicsContext3D.h:
      (WebCore::GraphicsContext3D::paintsIntoCanvasBuffer):
      * platform/graphics/Image.h:
      * platform/graphics/ImageBuffer.h:
      (WebCore::ImageBuffer::width):
      (WebCore::ImageBuffer::height):
      * platform/graphics/Pattern.cpp:
      (WebCore::Pattern::Pattern):
      * platform/graphics/Pattern.h:
      (WebCore::Pattern::create):
      * platform/graphics/cairo/GraphicsContextCairo.cpp:
      * platform/graphics/cairo/ImageBufferCairo.cpp:
      (WebCore::ImageBuffer::drawsUsingCopy):
      (WebCore::ImageBuffer::copyImage):
      (WebCore::ImageBuffer::clip):
      (WebCore::ImageBuffer::draw):
      (WebCore::ImageBuffer::drawPattern):
      * platform/graphics/cg/GraphicsContextCG.cpp:
      * platform/graphics/cg/ImageBufferCG.cpp:
      (WebCore::ImageBuffer::ImageBuffer):
      (WebCore::ImageBuffer::drawsUsingCopy):
      (WebCore::ImageBuffer::copyImage):
      (WebCore::ImageBuffer::draw):
      (WebCore::ImageBuffer::drawPattern):
      (WebCore::ImageBuffer::clip):
      * platform/graphics/cg/ImageBufferData.h:
      * platform/graphics/filters/FEColorMatrix.cpp:
      (WebCore::FEColorMatrix::apply):
      * platform/graphics/filters/FEComposite.cpp:
      (WebCore::FEComposite::apply):
      * platform/graphics/filters/SourceAlpha.cpp:
      (WebCore::SourceAlpha::apply):
      * platform/graphics/filters/SourceGraphic.cpp:
      (WebCore::SourceGraphic::apply):
      * platform/graphics/mac/GraphicsContext3DMac.mm:
      * platform/graphics/qt/GraphicsContext3DQt.cpp:
      * platform/graphics/qt/GraphicsContextQt.cpp:
      * platform/graphics/qt/ImageBufferData.h:
      * platform/graphics/qt/ImageBufferQt.cpp:
      (WebCore::ImageBufferData::ImageBufferData):
      (WebCore::ImageBuffer::drawsUsingCopy):
      (WebCore::ImageBuffer::copyImage):
      (WebCore::ImageBuffer::draw):
      (WebCore::ImageBuffer::drawPattern):
      (WebCore::ImageBuffer::clip):
      * platform/graphics/skia/GraphicsContextSkia.cpp:
      * platform/graphics/skia/ImageBufferSkia.cpp:
      (WebCore::ImageBuffer::drawsUsingCopy):
      (WebCore::ImageBuffer::copyImage):
      (WebCore::ImageBuffer::clip):
      (WebCore::):
      * platform/graphics/wx/GraphicsContextWx.cpp:
      * platform/graphics/wx/ImageBufferWx.cpp:
      (WebCore::ImageBuffer::drawsUsingCopy):
      (WebCore::ImageBuffer::copyImage):
      (WebCore::ImageBuffer::clip):
      (WebCore::ImageBuffer::draw):
      (WebCore::ImageBuffer::drawPattern):
      * platform/mac/ScrollbarThemeMac.mm:
      (WebCore::ScrollbarThemeMac::paint):
      * rendering/RenderBoxModelObject.cpp:
      (WebCore::RenderBoxModelObject::paintFillLayerExtended):
      * rendering/RenderSVGResourceClipper.cpp:
      (WebCore::RenderSVGResourceClipper::applyClippingToContext):
      * rendering/RenderSVGResourceFilter.cpp:
      (WebCore::RenderSVGResourceFilter::postApplyResource):
      * rendering/RenderSVGResourceGradient.cpp:
      (WebCore::clipToTextMask):
      * rendering/RenderSVGResourceMasker.cpp:
      (WebCore::RenderSVGResourceMasker::applyResource):
      * rendering/RenderSVGResourcePattern.cpp:
      (WebCore::RenderSVGResourcePattern::buildPattern):
      * rendering/RenderThemeMac.mm:
      (WebCore::RenderThemeMac::paintProgressBar):
      * svg/SVGFEImageElement.cpp:
      (WebCore::SVGFEImageElement::build):
      * svg/graphics/SVGImage.cpp:
      (WebCore::SVGImage::nativeImageForCurrentFrame):
      * svg/graphics/SVGImage.h:
      * svg/graphics/filters/SVGFEMerge.cpp:
      (WebCore::FEMerge::apply):
      * svg/graphics/filters/SVGFEOffset.cpp:
      (WebCore::FEOffset::apply):
      * svg/graphics/filters/SVGFETile.cpp:
      (WebCore::FETile::apply):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@65449 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      ffec3a47
  17. 11 Aug, 2010 1 commit
  18. 06 Aug, 2010 2 commits
    • jamesr@google.com's avatar
      2010-08-06 James Robinson <jamesr@chromium.org> · adc38860
      jamesr@google.com authored
              Reviewed by Simon Fraser.
      
              Accelerated 2d canvases should get compositing layers
              https://bugs.webkit.org/show_bug.cgi?id=43362
      
              Allows for 2d canvas rendering contexts to use a GraphicsContext3D for
              accelerated rendering.  The rendering context holds the GraphicsContext3D
              alive and exposes it to the compositor.  The 3d context itself is passed
              down through the GraphicsContext to use for actual rendering:
              https://bug-43362-attachments.webkit.org/attachment.cgi?id=63557
      
              This approach will let us simultaneously prototype accelerated techniques
              for canvas 2d and revise the design of canvas elements without destabilizing
              all ports.
      
              * html/HTMLCanvasElement.cpp:
              (WebCore::HTMLCanvasElement::getContext):
              (WebCore::HTMLCanvasElement::willDraw):
              (WebCore::HTMLCanvasElement::makeRenderingResultsAvailable):
              * html/canvas/CanvasRenderingContext.h:
              (WebCore::CanvasRenderingContext::paintRenderingResultsToCanvas):
              * html/canvas/CanvasRenderingContext2D.cpp:
              (WebCore::CanvasRenderingContext2D::CanvasRenderingContext2D):
              (WebCore::CanvasRenderingContext2D::isAccelerated):
              (WebCore::CanvasRenderingContext2D::reset):
              (WebCore::CanvasRenderingContext2D::willDraw):
              (WebCore::CanvasRenderingContext2D::paintRenderingResultsToCanvas):
              * html/canvas/CanvasRenderingContext2D.h:
              (WebCore::CanvasRenderingContext2D::graphicsContext3D):
              * html/canvas/WebGLRenderingContext.cpp:
              (WebCore::WebGLRenderingContext::paintRenderingResultsToCanvas):
              * html/canvas/WebGLRenderingContext.h:
              * platform/graphics/GraphicsContext.h:
              * platform/graphics/skia/GraphicsContextSkia.cpp:
              (WebCore::GraphicsContext::syncSoftwareCanvas):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@64881 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      adc38860
    • jamesr@google.com's avatar
      2010-08-06 James Robinson <jamesr@chromium.org> · eb963679
      jamesr@google.com authored
              Reviewed by Dimitri Glazkov.
      
              [chromium] Implement GLES2Canvas/Texture in terms of GraphicsContext3D instead of direct OpenGL calls
              https://bugs.webkit.org/show_bug.cgi?id=43608
      
              This converts all OpenGL calls in GLES2(Canvas|Texture) to calls on the corresponding GraphicsContext3D
              API, due to feedback on https://bugs.webkit.org/show_bug.cgi?id=43362.  Nearly all the changes are
              applying the regex s/gl([A-Z])/m_context->%1</ and removing unnecessary makeCurrent() calls.
              Other changes hilighted below.
      
              * platform/graphics/chromium/GLES2Canvas.cpp:
              (WebCore::affineTo3x3):
              (WebCore::GLES2Canvas::GLES2Canvas):
              (WebCore::GLES2Canvas::~GLES2Canvas):
              (WebCore::GLES2Canvas::clearRect):
              (WebCore::GLES2Canvas::fillRect):
              (WebCore::GLES2Canvas::drawTexturedRect):
              (WebCore::GLES2Canvas::applyCompositeOperator):
              (WebCore::GLES2Canvas::getQuadVertices):
              (WebCore::GLES2Canvas::getQuadIndices):
                  - use new typed XXArray classes for buffer uploads
              (WebCore::loadShader):
              (WebCore::GLES2Canvas::getSimpleProgram):
              (WebCore::GLES2Canvas::getTexProgram):
              (WebCore::GLES2Canvas::createTexture):
              (WebCore::GLES2Canvas::checkGLError):
              * platform/graphics/chromium/GLES2Canvas.h:
              (WebCore::GLES2Canvas::context):
              * platform/graphics/chromium/GLES2Texture.cpp:
              (WebCore::GLES2Texture::GLES2Texture):
              (WebCore::GLES2Texture::~GLES2Texture):
              (WebCore::GLES2Texture::create):
              (WebCore::convertFormat):
              (WebCore::GLES2Texture::load):
              (WebCore::GLES2Texture::bind):
              * platform/graphics/chromium/GLES2Texture.h:
              * platform/graphics/skia/GraphicsContextSkia.cpp:
              (WebCore::GraphicsContext::fillRect):
                  - add a missing restore() call to the H/W path
              * platform/graphics/skia/ImageSkia.cpp:
              (WebCore::drawBitmapGLES2):
              * platform/graphics/skia/PlatformContextSkia.cpp:
              (WebCore::PlatformContextSkia::setGraphicsContext3D):
              (WebCore::PlatformContextSkia::uploadSoftwareToHardware):
                  - avoid applying CTM to uploads
              (WebCore::PlatformContextSkia::readbackHardwareToSoftware):
              * platform/graphics/skia/PlatformContextSkia.h:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@64872 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      eb963679
  19. 28 Jul, 2010 1 commit
    • senorblanco@chromium.org's avatar
      2010-07-28 Stephen White <senorblanco@chromium.org> · af7756d6
      senorblanco@chromium.org authored
              Reviewed by Darin Fisher.
      
              Hook the GLES2 rendering path up to GraphicsContextSkia.
              https://bugs.webkit.org/show_bug.cgi?id=43119
              
              This connects the state-setting and drawing calls implemented in
              so far in GLES2Canvas, and calls PlatformContextSkia's
              prepareForSoftwareDraw() for all the non-accelerated paths.
      
              * platform/graphics/skia/GraphicsContextSkia.cpp:
              (WebCore::GraphicsContext::addInnerRoundedRectClip):
              (WebCore::GraphicsContext::addPath):
              (WebCore::GraphicsContext::beginPath):
              (WebCore::GraphicsContext::clip):
              (WebCore::GraphicsContext::drawConvexPolygon):
              (WebCore::GraphicsContext::drawEllipse):
              (WebCore::GraphicsContext::drawFocusRing):
              (WebCore::GraphicsContext::drawLine):
              (WebCore::GraphicsContext::drawLineForMisspellingOrBadGrammar):
              (WebCore::GraphicsContext::drawLineForText):
              (WebCore::GraphicsContext::drawRect):
              (WebCore::GraphicsContext::fillPath):
              (WebCore::GraphicsContext::fillRoundedRect):
              (WebCore::GraphicsContext::strokeArc):
              (WebCore::GraphicsContext::strokePath):
              (WebCore::GraphicsContext::strokeRect):
              These calls are software-only; call preSoftwareDraw() for these.
              (WebCore::GraphicsContext::savePlatformState):
              (WebCore::GraphicsContext::restorePlatformState):
              (WebCore::GraphicsContext::setAlpha):
              (WebCore::GraphicsContext::setCompositeOperation):
              (WebCore::GraphicsContext::setPlatformFillColor):
              (WebCore::GraphicsContext::scale):
              (WebCore::GraphicsContext::rotate):
              (WebCore::GraphicsContext::translate):
              (WebCore::GraphicsContext::concatCTM):
              These ones set state on both Skia and GLES2Canvas.
              (WebCore::GraphicsContext::clearRect):
              (WebCore::GraphicsContext::fillRect):
              These ones have a GLES2 implementation; call through to it if PlatformContextSkia's useGPU() flag is set and the state permits.
              * platform/graphics/skia/PlatformContextSkia.cpp:
              (PlatformContextSkia::prepareForSoftwareDraw):
              (PlatformContextSkia::prepareForHardwareDraw):
              Rename preXXXDraw() -> prepareForXXXDraw().
              * platform/graphics/skia/PlatformContextSkia.h:
              (PlatformContextSkia::prepareForSoftwareDraw):
              (PlatformContextSkia::prepareForHardwareDraw):
              Rename preXXXDraw() -> prepareForXXXDraw().
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@64227 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      af7756d6
  20. 21 Jul, 2010 1 commit
    • bdakin@apple.com's avatar
      WebCore: Fix for https://bugs.webkit.org/show_bug.cgi?id=42605 New border- · 39eeba47
      bdakin@apple.com authored
      radius path-based drawing code has some issues with corner-joins
      
      Reviewed by Dan Bernstein.
      
      GraphicsContext::clipConvexPolygon() now takes a boolean parameter 
      indicating whether or not the clip should be antialiased.
      * platform/graphics/GraphicsContext.h:
      * platform/graphics/cairo/GraphicsContextCairo.cpp:
      (WebCore::GraphicsContext::clipConvexPolygon):
      * platform/graphics/cg/GraphicsContextCG.cpp:
      (WebCore::GraphicsContext::clipConvexPolygon):
      * platform/graphics/haiku/GraphicsContextHaiku.cpp:
      (WebCore::GraphicsContext::clipConvexPolygon):
      * platform/graphics/qt/GraphicsContextQt.cpp:
      (WebCore::GraphicsContext::clipConvexPolygon):
      * platform/graphics/skia/GraphicsContextSkia.cpp:
      (WebCore::GraphicsContext::clipConvexPolygon):
      * platform/graphics/wince/GraphicsContextWince.cpp:
      (WebCore::GraphicsContext::clipConvexPolygon):
      * platform/graphics/wx/GraphicsContextWx.cpp:
      (WebCore::GraphicsContext::clipConvexPolygon):
      
      Compute 4 booleans determining if each edge is a "matching" edge of 
      not. Send the two appropriate values to clipBorderSidePolygon() so 
      we can decide there whether or not to antialias the clip based on 
      matchy-ness.
      * rendering/RenderBoxModelObject.cpp:
      (WebCore::RenderBoxModelObject::paintBorder):
      
      If both edges are matching, don't antialias. If neither edge 
      matches, never antialias. If one edge matches and one does not, 
      apply two clips to get the appropriate antialiasing in each corner.
      (WebCore::RenderBoxModelObject::clipBorderSidePolygon):
      * rendering/RenderBoxModelObject.h:
      
      LayoutTests: Some of these layout tests are updated results from the fix for 
      https://bugs.webkit.org/show_bug.cgi?id=42605 New border-
      radius path-based drawing code has some issues with corner-joins. 
      The others have been in need of an update since 
      https://bugs.webkit.org/show_bug.cgi?id=9197 , but since the 
      differences were only detectable visually and with a pixel-text 
      tolerance of 0 (not the default), they slipped under the rug until 
      now.
      
      Reviewed by Dan Bernstein.
      
      New test:
      * fast/borders/different-color-borders.html: Added.
      * platform/mac/fast/borders/border-radius-circle-expected.checksum:
      * platform/mac/fast/borders/border-radius-circle-expected.png:
      
      * platform/mac/fast/borders/border-radius-constraints-expected.checksum:
      * platform/mac/fast/borders/border-radius-constraints-expected.png:
      * platform/mac/fast/borders/border-radius-groove-01-expected.checksum:
      * platform/mac/fast/borders/border-radius-groove-01-expected.png:
      * platform/mac/fast/borders/border-radius-groove-02-expected.checksum:
      * platform/mac/fast/borders/border-radius-groove-02-expected.png:
      * platform/mac/fast/borders/border-radius-groove-03-expected.checksum:
      * platform/mac/fast/borders/border-radius-groove-03-expected.png:
      * platform/mac/fast/borders/border-radius-huge-assert-expected.checksum:
      * platform/mac/fast/borders/border-radius-huge-assert-expected.png:
      * platform/mac/fast/borders/border-radius-wide-border-02-expected.checksum:
      * platform/mac/fast/borders/border-radius-wide-border-02-expected.png:
      * platform/mac/fast/borders/border-radius-wide-border-03-expected.checksum:
      * platform/mac/fast/borders/border-radius-wide-border-03-expected.png:
      * platform/mac/fast/borders/border-radius-wide-border-04-expected.checksum:
      * platform/mac/fast/borders/border-radius-wide-border-04-expected.png:
      * platform/mac/fast/borders/borderRadiusAllStylesAllCorners-expected.checksum:
      * platform/mac/fast/borders/borderRadiusAllStylesAllCorners-expected.png:
      * platform/mac/fast/borders/borderRadiusArcs01-expected.checksum:
      * platform/mac/fast/borders/borderRadiusArcs01-expected.png:
      * platform/mac/fast/borders/borderRadiusDashed01-expected.checksum:
      * platform/mac/fast/borders/borderRadiusDashed01-expected.png:
      * platform/mac/fast/borders/borderRadiusDashed02-expected.checksum:
      * platform/mac/fast/borders/borderRadiusDashed02-expected.png:
      * platform/mac/fast/borders/borderRadiusDashed03-expected.checksum:
      * platform/mac/fast/borders/borderRadiusDashed03-expected.png:
      * platform/mac/fast/borders/borderRadiusDashed04-expected.checksum:
      * platform/mac/fast/borders/borderRadiusDashed04-expected.png:
      * platform/mac/fast/borders/borderRadiusDotted02-expected.checksum:
      * platform/mac/fast/borders/borderRadiusDotted02-expected.png:
      * platform/mac/fast/borders/borderRadiusDotted03-expected.checksum:
      * platform/mac/fast/borders/borderRadiusDotted03-expected.png:
      * platform/mac/fast/borders/borderRadiusDotted04-expected.checksum:
      * platform/mac/fast/borders/borderRadiusDotted04-expected.png:
      * platform/mac/fast/borders/borderRadiusDotted06-expected.checksum:
      * platform/mac/fast/borders/borderRadiusDotted06-expected.png:
      * platform/mac/fast/borders/borderRadiusDouble01-expected.checksum:
      * platform/mac/fast/borders/borderRadiusDouble01-expected.png:
      * platform/mac/fast/borders/borderRadiusDouble02-expected.checksum:
      * platform/mac/fast/borders/borderRadiusDouble02-expected.png:
      * platform/mac/fast/borders/borderRadiusDouble03-expected.checksum:
      * platform/mac/fast/borders/borderRadiusDouble03-expected.png:
      * platform/mac/fast/borders/borderRadiusDouble05-expected.checksum:
      * platform/mac/fast/borders/borderRadiusDouble05-expected.png:
      * platform/mac/fast/borders/borderRadiusDouble06-expected.checksum:
      * platform/mac/fast/borders/borderRadiusDouble06-expected.png:
      * platform/mac/fast/borders/borderRadiusDouble08-expected.checksum:
      * platform/mac/fast/borders/borderRadiusDouble08-expected.png:
      * platform/mac/fast/borders/borderRadiusGroove01-expected.checksum:
      * platform/mac/fast/borders/borderRadiusGroove01-expected.png:
      * platform/mac/fast/borders/borderRadiusGroove02-expected.checksum:
      * platform/mac/fast/borders/borderRadiusGroove02-expected.png:
      * platform/mac/fast/borders/borderRadiusInset01-expected.checksum:
      * platform/mac/fast/borders/borderRadiusInset01-expected.png:
      * platform/mac/fast/borders/borderRadiusInvalidColor-expected.checksum:
      * platform/mac/fast/borders/borderRadiusInvalidColor-expected.png:
      * platform/mac/fast/borders/borderRadiusOutset01-expected.checksum:
      * platform/mac/fast/borders/borderRadiusOutset01-expected.png:
      * platform/mac/fast/borders/borderRadiusRidge01-expected.checksum:
      * platform/mac/fast/borders/borderRadiusRidge01-expected.png:
      * platform/mac/fast/borders/borderRadiusSolid01-expected.checksum:
      * platform/mac/fast/borders/borderRadiusSolid01-expected.png:
      * platform/mac/fast/borders/borderRadiusSolid02-expected.checksum:
      * platform/mac/fast/borders/borderRadiusSolid02-expected.png:
      * platform/mac/fast/borders/borderRadiusSolid03-expected.checksum:
      * platform/mac/fast/borders/borderRadiusSolid03-expected.png:
      * platform/mac/fast/borders/borderRadiusSolid04-expected.checksum:
      * platform/mac/fast/borders/borderRadiusSolid04-expected.png:
      * platform/mac/fast/borders/different-color-borders-expected.checksum: Added.
      * platform/mac/fast/borders/different-color-borders-expected.png: Added.
      * platform/mac/fast/borders/different-color-borders-expected.txt: Added.
      * platform/mac/fast/borders/fieldsetBorderRadius-expected.checksum:
      * platform/mac/fast/borders/fieldsetBorderRadius-expected.png:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@63864 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      39eeba47
  21. 16 Jul, 2010 2 commits
    • tony@chromium.org's avatar
      2010-07-16 Sheriff Bot <webkit.review.bot@gmail.com> · 48d91f1e
      tony@chromium.org authored
              Unreviewed, rolling out r63593.
              http://trac.webkit.org/changeset/63593
              https://bugs.webkit.org/show_bug.cgi?id=42487
      
              Broke a few chromium pixel tests (Requested by tony^work on
              #webkit).
      
              * platform/chromium-linux/svg/stroke/path-zero-strokewidth-test-expected.checksum: Removed.
              * platform/chromium-linux/svg/stroke/path-zero-strokewidth-test-expected.png: Removed.
              * platform/chromium-linux/svg/stroke/path-zero-strokewidth-test-expected.txt: Removed.
              * platform/chromium-mac/svg/stroke/path-zero-strokewidth-test-expected.checksum: Removed.
              * platform/chromium-mac/svg/stroke/path-zero-strokewidth-test-expected.png: Removed.
              * platform/chromium-mac/svg/stroke/path-zero-strokewidth-test-expected.txt: Removed.
              * platform/mac/svg/stroke/path-zero-strokewidth-test-expected.checksum: Removed.
              * platform/mac/svg/stroke/path-zero-strokewidth-test-expected.png: Removed.
              * platform/mac/svg/stroke/path-zero-strokewidth-test-expected.txt: Removed.
              * svg/stroke/path-zero-strokewidth-test.svg: Removed.
      2010-07-16  Sheriff Bot  <webkit.review.bot@gmail.com>
      
              Unreviewed, rolling out r63593.
              http://trac.webkit.org/changeset/63593
              https://bugs.webkit.org/show_bug.cgi?id=42487
      
              Broke a few chromium pixel tests (Requested by tony^work on
              #webkit).
      
              * platform/graphics/skia/GraphicsContextSkia.cpp:
              (WebCore::GraphicsContext::drawConvexPolygon):
              (WebCore::GraphicsContext::drawEllipse):
              (WebCore::GraphicsContext::drawLine):
              (WebCore::GraphicsContext::strokeArc):
              (WebCore::GraphicsContext::strokePath):
              (WebCore::GraphicsContext::strokeRect):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@63598 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      48d91f1e
    • commit-queue@webkit.org's avatar
      2010-07-16 Fady Samuel <fsamuel@chromium.org> · da73a565
      commit-queue@webkit.org authored
              Reviewed by David Levin.
      
              Added layout test to show correct zero-width stroke.
      
              SVG - stroke-width:0 bug with stroke other than "none"
              https://bugs.webkit.org/show_bug.cgi?id=42387
      
              * platform/chromium-linux/svg/stroke/path-zero-strokewidth-test-expected.checksum: Added.
              * platform/chromium-linux/svg/stroke/path-zero-strokewidth-test-expected.png: Added.
              * platform/chromium-linux/svg/stroke/path-zero-strokewidth-test-expected.txt: Added.
              * platform/chromium-mac/svg/stroke/path-zero-strokewidth-test-expected.checksum: Added.
              * platform/chromium-mac/svg/stroke/path-zero-strokewidth-test-expected.png: Added.
              * platform/chromium-mac/svg/stroke/path-zero-strokewidth-test-expected.txt: Added.
              * platform/mac/svg/stroke/path-zero-strokewidth-test-expected.checksum: Added.
              * platform/mac/svg/stroke/path-zero-strokewidth-test-expected.png: Added.
              * platform/mac/svg/stroke/path-zero-strokewidth-test-expected.txt: Added.
              * svg/stroke/path-zero-strokewidth-test.svg: Added.
      2010-07-16  Fady Samuel  <fsamuel@chromium.org>
      
              Reviewed by David Levin.
      
              Avoids adding stroke when stroke-width is zero.
      
              SVG - stroke-width:0 bug with stroke other than "none"
              https://bugs.webkit.org/show_bug.cgi?id=42387
      
              Test: svg/stroke/path-zero-strokewidth-test.svg
      
              * platform/graphics/skia/GraphicsContextSkia.cpp:
              (WebCore::GraphicsContext::drawConvexPolygon):
              (WebCore::GraphicsContext::drawEllipse):
              (WebCore::GraphicsContext::drawLine):
              (WebCore::GraphicsContext::strokeArc):
              (WebCore::GraphicsContext::strokePath):
              (WebCore::GraphicsContext::strokeRect):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@63593 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      da73a565
  22. 12 Jul, 2010 1 commit
    • commit-queue@webkit.org's avatar
      2010-07-12 Andreas Kling <andreas.kling@nokia.com> · edd4644d
      commit-queue@webkit.org authored
              Reviewed by Oliver Hunt.
      
              Canvas: Move fillRect() save/restore into GraphicsContext implementations
              https://bugs.webkit.org/show_bug.cgi?id=42088
      
              Saving the platform painter state is an expensive operation,
              so don't do it in fillRect() for platforms that don't need it. (CG, Qt)
      
              * html/canvas/CanvasRenderingContext2D.cpp:
              (WebCore::CanvasRenderingContext2D::fillRect):
              * platform/graphics/cairo/GraphicsContextCairo.cpp:
              (WebCore::GraphicsContext::fillRect):
              * platform/graphics/skia/GraphicsContextSkia.cpp:
              (WebCore::GraphicsContext::fillRect):
              * platform/graphics/wince/GraphicsContextWince.cpp:
              (WebCore::GraphicsContext::fillRect):
              * platform/graphics/wx/GraphicsContextWx.cpp:
              (WebCore::GraphicsContext::fillRect):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@63102 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      edd4644d
  23. 28 Jun, 2010 1 commit
    • bdakin@apple.com's avatar
      WebCore: Fix for https://bugs.webkit.org/show_bug.cgi?id=9197 CSS3: Borders · b4a27629
      bdakin@apple.com authored
      with border-radius and double, groove, or ridge styles should look 
      better
      
      Reviewed by Sam Weinig.
      
      This patch re-works border radius painting to stroke paths instead 
      of arcs. 
      
      Added new function clipConvexPolygon(). Added static 
      addConvexPolygonToContext so that code can be shared between 
      drawConvexPolygon() and clipConvexPolygon().
      * platform/graphics/GraphicsContext.h:
      * platform/graphics/cg/GraphicsContextCG.cpp:
      (WebCore::addConvexPolygonToContext):
      (WebCore::GraphicsContext::drawConvexPolygon):
      (WebCore::GraphicsContext::clipConvexPolygon):
      
      Shells of implementations on non-CG platforms.
      * platform/graphics/cairo/GraphicsContextCairo.cpp:
      (WebCore::GraphicsContext::clipConvexPolygon):
      * platform/graphics/haiku/GraphicsContextHaiku.cpp:
      (WebCore::GraphicsContext::clipConvexPolygon):
      * platform/graphics/qt/GraphicsContextQt.cpp:
      (WebCore::GraphicsContext::clipConvexPolygon):
      * platform/graphics/skia/GraphicsContextSkia.cpp:
      (WebCore::GraphicsContext::clipConvexPolygon):
      * platform/graphics/wince/GraphicsContextWince.cpp:
      (WebCore::GraphicsContext::clipConvexPolygon):
      * platform/graphics/wx/GraphicsContextWx.cpp:
      (WebCore::GraphicsContext::clipConvexPolygon):
      
      This new helper function determines if the inner corners of the 
      border will arch in or meet at a right angle. 
      * rendering/RenderBoxModelObject.cpp:
      (WebCore::borderWillArcInnerEdge):
      
      This function is re-written so that, for each side of the border, 
      if borderWillArcInnerEdge() is true, we go down a brand new code 
      path of clipping to a convex polygon for the border side and then 
      we paint the side using the new function drawBoxSideFromPath(). If 
      borderWillArcInnerEdge() is false, then we call into the old 
      familiar drawLineForBoxSide() which relies on the rounder clip 
      rects we have set up to arch the outer edge of the border.
      (WebCore::RenderBoxModelObject::paintBorder):
      
      This new function does the math to figure out the convex polygon 
      to clip to in the case where we need to arch the inner edge of the 
      border. This calls into a new GraphicsContext function that is only 
      implemented on CG at this time. This is the reason we are keeping 
      around an old version of paintBorder() for now.
      (WebCore::RenderBoxModelObject::clipBorderSidePolygon):
      * rendering/RenderBoxModelObject.h:
      
      borderInnerRect() is a new convenience function called from 
      RenderObject and RenderBoxModelObject to determine the rect of the 
      inside edge of the border.
      * rendering/RenderObject.cpp:
      (WebCore::RenderObject::borderInnerRect):
      
      This new function re-works drawArcForBoxSide to draw from Paths 
      when appropriate instead of stroking arcs. 
      (WebCore::RenderObject::drawBoxSideFromPath):
      
      Keep this around for that do not HAVE(PATH_BASED_BORDER_RADIUS_DRAWING) until 
      GraphicsContext::clipConvexPolygon() is implemented.
      (WebCore::RenderObject::drawArcForBoxSide):
      * rendering/RenderObject.h:
      
      New function 
      RenderStyle::getInnerBorderRadiiForRectWithBorderWidths() gets the 
      inner radius values for a rect. It takes border widths a parameters 
      rather than using the style's border widths so that it can be used 
      in inner radius calculations for double and groove/ridge 
      calculations. The W3C corner constraining rules were moved to a 
      static function that can be called from both getBorderRadiiForRect
      () and getInnerBorderRadiiForRectWithBorderWidths().
      * rendering/style/RenderStyle.cpp:
      (WebCore::constrainCornerRadiiForRect):
      (WebCore::RenderStyle::getBorderRadiiForRect):
      (WebCore::RenderStyle::getInnerBorderRadiiForRectWithBorderWidths):
      * rendering/style/RenderStyle.h:
      
      LayoutTests: Tests with new results after 
      https://bugs.webkit.org/show_bug.cgi?id=9197 CSS3: Borders 
      with border-radius and double, groove, or ridge styles should look 
      better
      
      Reviewed by Sam Weinig.
      
      * platform/mac/fast/borders/borderRadiusAllStylesAllCorners-expected.checksum:
      * platform/mac/fast/borders/borderRadiusAllStylesAllCorners-expected.png:
      * platform/mac/fast/borders/borderRadiusDashed01-expected.checksum:
      * platform/mac/fast/borders/borderRadiusDashed01-expected.png:
      * platform/mac/fast/borders/borderRadiusDashed02-expected.checksum:
      * platform/mac/fast/borders/borderRadiusDashed02-expected.png:
      * platform/mac/fast/borders/borderRadiusDashed03-expected.checksum:
      * platform/mac/fast/borders/borderRadiusDashed03-expected.png:
      * platform/mac/fast/borders/borderRadiusDotted01-expected.checksum:
      * platform/mac/fast/borders/borderRadiusDotted01-expected.png:
      * platform/mac/fast/borders/borderRadiusDotted02-expected.checksum:
      * platform/mac/fast/borders/borderRadiusDotted02-expected.png:
      * platform/mac/fast/borders/borderRadiusDotted03-expected.checksum:
      * platform/mac/fast/borders/borderRadiusDotted03-expected.png:
      * platform/mac/fast/borders/borderRadiusDouble01-expected.checksum:
      * platform/mac/fast/borders/borderRadiusDouble01-expected.png:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@62035 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      b4a27629
  24. 14 Jun, 2010 1 commit
    • eric@webkit.org's avatar
      2010-06-14 Chang Shu <chang.shu@nokia.com> · adea216f
      eric@webkit.org authored
              Reviewed by Kenneth Rohde Christiansen.
      
              [Qt] Unskip canvas/philip/tests/2d.shadow.enable.x.html
              and canvas/philip/tests/2d.shadow.enable.y.html.
      
              https://bugs.webkit.org/show_bug.cgi?id=40434
      
              * platform/qt/Skipped:
      2010-06-14  Chang Shu  <chang.shu@nokia.com>
      
              Reviewed by Kenneth Rohde Christiansen.
      
              Change the type of ShadowSize from IntSize to FloatSize in GraphicsContext.
              Using IntSize loses precision and fails the test.
              Note: This code change fixes Qt port but Mac is still failing due to
              platform issue.
      
              https://bugs.webkit.org/show_bug.cgi?id=40434
      
              * html/canvas/CanvasRenderingContext2D.cpp:
              (WebCore::CanvasRenderingContext2D::applyShadow):
              * platform/graphics/GraphicsContext.cpp:
              (WebCore::GraphicsContext::setShadow):
              (WebCore::GraphicsContext::getShadow):
              * platform/graphics/GraphicsContext.h:
              * platform/graphics/GraphicsContextPrivate.h:
              * platform/graphics/cairo/FontCairo.cpp:
              (WebCore::Font::drawGlyphs):
              * platform/graphics/cairo/GraphicsContextCairo.cpp:
              (WebCore::GraphicsContext::calculateShadowBufferDimensions):
              (WebCore::drawPathShadow):
              (WebCore::drawBorderlessRectShadow):
              (WebCore::GraphicsContext::setPlatformShadow):
              * platform/graphics/cairo/ImageCairo.cpp:
              (WebCore::BitmapImage::draw):
              * platform/graphics/cg/GraphicsContextCG.cpp:
              (WebCore::GraphicsContext::setPlatformShadow):
              * platform/graphics/chromium/FontChromiumWin.cpp:
              (WebCore::TransparencyAwareFontPainter::TransparencyAwareGlyphPainter::drawGlyphs):
              (WebCore::Font::drawComplexText):
              * platform/graphics/gtk/FontGtk.cpp:
              (WebCore::Font::drawComplexText):
              * platform/graphics/haiku/GraphicsContextHaiku.cpp:
              (WebCore::GraphicsContext::setPlatformShadow):
              * platform/graphics/mac/FontMac.mm:
              (WebCore::Font::drawGlyphs):
              * platform/graphics/openvg/GraphicsContextOpenVG.cpp:
              (WebCore::GraphicsContext::setPlatformShadow):
              * platform/graphics/qt/FontQt.cpp:
              (WebCore::drawTextCommon):
              * platform/graphics/qt/GraphicsContextQt.cpp:
              (WebCore::GraphicsContext::drawRect):
              (WebCore::GraphicsContext::drawLine):
              (WebCore::GraphicsContext::strokeArc):
              (WebCore::GraphicsContext::drawConvexPolygon):
              (WebCore::drawFilledShadowPath):
              (WebCore::GraphicsContext::strokePath):
              (WebCore::drawBorderlessRectShadow):
              (WebCore::GraphicsContext::setPlatformShadow):
              * platform/graphics/qt/ImageQt.cpp:
              (WebCore::BitmapImage::draw):
              * platform/graphics/skia/GraphicsContextSkia.cpp:
              (WebCore::GraphicsContext::setPlatformShadow):
              * platform/graphics/skia/SkiaFontWin.cpp:
              (WebCore::windowsCanHandleDrawTextShadow):
              * platform/graphics/win/FontCGWin.cpp:
              (WebCore::drawGDIGlyphs):
              (WebCore::Font::drawGlyphs):
              * platform/graphics/wince/GraphicsContextWince.cpp:
              (WebCore::GraphicsContext::fillRoundedRect):
              (WebCore::GraphicsContext::setPlatformShadow):
              (WebCore::GraphicsContext::drawText):
              * platform/graphics/wx/GraphicsContextWx.cpp:
              (WebCore::GraphicsContext::setPlatformShadow):
      2010-06-14  Chang Shu  <chang.shu@nokia.com>
      
              Reviewed by Kenneth Rohde Christiansen.
      
              [win] Make windows compile after API changes.
      
              https://bugs.webkit.org/show_bug.cgi?id=40434
      
              * WebKitGraphics.cpp:
              (WebDrawText):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@61129 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      adea216f
  25. 10 Jun, 2010 1 commit
    • eric@webkit.org's avatar
      2010-06-10 Chang Shu <chang.shu@nokia.com> · 33b45e81
      eric@webkit.org authored
              Reviewed by Kenneth Rohde Christiansen.
      
              [Qt] Unskip canvas/philip/tests/2d.shadow.enable.blur.html.
      
              * platform/qt/Skipped:
      2010-06-10  Shu Chang  <chang.shu@nokia.com>
      
              Reviewed by Kenneth Rohde Christiansen.
      
              Change the type of ShadowBlur from int to float in GraphicsContext.
              Using int for ShadowBlur loses precision and fails the test.
              Note: This code change fixes Qt port but Mac is still failing due to
              platform issue. Function CGContextSetShadowWithColor() does not take
              a blur value less than 0.5.
      
              https://bugs.webkit.org/show_bug.cgi?id=40370
      
              * platform/graphics/GraphicsContext.cpp:
              (WebCore::GraphicsContext::setShadow):
              (WebCore::GraphicsContext::getShadow):
              * platform/graphics/GraphicsContext.h:
              * platform/graphics/GraphicsContextPrivate.h:
              * platform/graphics/cairo/FontCairo.cpp:
              (WebCore::Font::drawGlyphs):
              * platform/graphics/cairo/GraphicsContextCairo.cpp:
              (WebCore::GraphicsContext::calculateShadowBufferDimensions):
              (WebCore::drawPathShadow):
              (WebCore::drawBorderlessRectShadow):
              (WebCore::GraphicsContext::setPlatformShadow):
              * platform/graphics/cairo/ImageCairo.cpp:
              (WebCore::BitmapImage::draw):
              * platform/graphics/cg/GraphicsContextCG.cpp:
              (WebCore::GraphicsContext::setPlatformShadow):
              * platform/graphics/chromium/FontChromiumWin.cpp:
              (WebCore::TransparencyAwareFontPainter::TransparencyAwareGlyphPainter::drawGlyphs):
              (WebCore::Font::drawComplexText):
              * platform/graphics/gtk/FontGtk.cpp:
              (WebCore::Font::drawComplexText):
              * platform/graphics/haiku/GraphicsContextHaiku.cpp:
              (WebCore::GraphicsContext::setPlatformShadow):
              * platform/graphics/mac/FontMac.mm:
              (WebCore::Font::drawGlyphs):
              * platform/graphics/openvg/GraphicsContextOpenVG.cpp:
              (WebCore::GraphicsContext::setPlatformShadow):
              * platform/graphics/qt/FontQt.cpp:
              (WebCore::Font::drawComplexText):
              * platform/graphics/qt/GraphicsContextQt.cpp:
              (WebCore::GraphicsContext::drawRect):
              (WebCore::GraphicsContext::drawLine):
              (WebCore::GraphicsContext::strokeArc):
              (WebCore::GraphicsContext::drawConvexPolygon):
              (WebCore::drawFilledShadowPath):
              (WebCore::GraphicsContext::strokePath):
              (WebCore::drawBorderlessRectShadow):
              (WebCore::GraphicsContext::setPlatformShadow):
              * platform/graphics/qt/ImageQt.cpp:
              (WebCore::BitmapImage::draw):
              * platform/graphics/skia/GraphicsContextSkia.cpp:
              (WebCore::GraphicsContext::setPlatformShadow):
              * platform/graphics/skia/SkiaFontWin.cpp:
              (WebCore::windowsCanHandleDrawTextShadow):
              * platform/graphics/win/FontCGWin.cpp:
              (WebCore::drawGDIGlyphs):
              (WebCore::Font::drawGlyphs):
              * platform/graphics/wince/GraphicsContextWince.cpp:
              (WebCore::GraphicsContext::fillRoundedRect):
              (WebCore::GraphicsContext::setPlatformShadow):
              (WebCore::GraphicsContext::drawText):
              * platform/graphics/wx/GraphicsContextWx.cpp:
              (WebCore::GraphicsContext::setPlatformShadow):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@60961 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      33b45e81
  26. 29 May, 2010 1 commit
    • eric@webkit.org's avatar
      2010-05-28 Stephen White <senorblanco@chromium.org> · c9afdae3
      eric@webkit.org authored
              Reviewed by Darin Fisher.
      
              [CHROMIUM] Chromium port should support image interpolation quality
              https://bugs.webkit.org/show_bug.cgi?id=38686
      
              * platform/chromium/test_expectations.txt:
              Add failure expectations for resizing-based tests, so they can be
              rebaselined by the bots.
      2010-05-28  Stephen White  <senorblanco@chromium.org>
      
              Reviewed by Darin Fisher.
      
              Implement GraphicsContext::setImageInterpolation() for the Chromium
              port.  This is preparatory work for bug 38233.  A number of
              background-resize tests will need a rebaseline, since the images are
              taken during the initial "low quality" phase (<800ms).
      
              [CHROMIUM] Chromium port should support image interpolation quality
              https://bugs.webkit.org/show_bug.cgi?id=38686
      
              Covered by fast/backgrounds/size/backgroundSize15.html, and others.
      
              * platform/graphics/skia/GraphicsContextSkia.cpp:
              Implement WebCore::GraphicsContext::setImageInterpolationQuality.
              * platform/graphics/skia/ImageSkia.cpp:
              (WebCore::computeResamplingMode):  Only enable high quality
              interpolation if it has been requested in the GraphicsContext.
              (WebCore::drawResampledBitmap):  Enable cacheing of resampled images
              even if the size is not full (fix from Brett Wilson).
              (WebCore::paintSkBitmap):  Pass in the PlatformContextSkia to
              computeResamplingMode, so it can query it for interpolation quality.
              (WebCore::Image::drawPattern):  Ibid.
              * platform/graphics/skia/PlatformContextSkia.cpp:
              (PlatformContextSkia::State::State):
              (PlatformContextSkia::interpolationQuality):
              (PlatformContextSkia::setInterpolationQuality):
              * platform/graphics/skia/PlatformContextSkia.h:
              Add a member fn and accessors to retain the image interpolation quality
              in the platform context, and to save/restore it with the state.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@60391 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      c9afdae3
  27. 06 May, 2010 1 commit
    • jamesr@google.com's avatar
      2010-05-06 James Robinson <jamesr@chromium.org> · c3e2b34f
      jamesr@google.com authored
              Reviewed by Eric Seidel.
      
              Fix warnings emitted by gcc 4.4.1 on linux in chromium-specific platform graphics files.
              https://bugs.webkit.org/show_bug.cgi?id=38158
      
              Fixes:
              - replace NULL with 0
              - remove unusued locals
              - add parens around ambiguous looking compound predicates like (a || b && c)
      
              This also adds a check for x >= 0 to FontLinux.cpp's in this statement:
                if (x < walker.width())
              This is more documentation than anything else since walker.width() returns
              an unsigned the current behavior is that x is promoted to unsigned and as
              long as x + walker.width() is less than 2^31 all negative values of x
              end up wrapping around and not being < walker.width().  This behavior is
              tested by fast/text/international/khmer-selection.html
      
              * platform/graphics/chromium/FontLinux.cpp:
              (WebCore::adjustTextRenderMode):
              (WebCore::TextRunWalker::TextRunWalker):
              (WebCore::TextRunWalker::length):
              (WebCore::TextRunWalker::width):
              (WebCore::TextRunWalker::getTextRun):
              (WebCore::TextRunWalker::getNormalizedTextRun):
              (WebCore::Font::offsetForPositionForComplexText):
              * platform/graphics/chromium/FontPlatformDataLinux.cpp:
              (WebCore::FontPlatformData::setupPaint):
              * platform/graphics/chromium/HarfbuzzSkia.cpp:
              (WebCore::getOutlinePoint):
              * platform/graphics/skia/GraphicsContext3DSkia.cpp:
              (WebCore::GraphicsContext3D::getImageData):
              * platform/graphics/skia/GraphicsContextSkia.cpp:
              (WebCore::isCoordinateSkiaSafe):
              (WebCore::GraphicsContext::fillRect):
              (WebCore::GraphicsContext::strokePath):
              (WebCore::GraphicsContext::strokeRect):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@58916 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      c3e2b34f
  28. 28 Apr, 2010 1 commit
    • eric@webkit.org's avatar
      2010-04-28 Marcus Bulach <bulach@chromium.org> · 294a60ac
      eric@webkit.org authored
              Reviewed by Jeremy Orlow.
      
              Reverts 58340 (https://bugs.webkit.org/show_bug.cgi?id=38158) due to regression on fast/text/international/khmer-selection.html
              https://bugs.webkit.org/show_bug.cgi?id=38254
      
              * platform/graphics/chromium/FontLinux.cpp:
              (WebCore::adjustTextRenderMode):
              (WebCore::TextRunWalker::getTextRun):
              (WebCore::TextRunWalker::getNormalizedTextRun):
              (WebCore::TextRunWalker::setGlyphXPositions):
              (WebCore::glyphIndexForXPositionInScriptRun):
              (WebCore::Font::offsetForPositionForComplexText):
              (WebCore::Font::selectionRectForComplexText):
              * platform/graphics/chromium/FontPlatformDataLinux.cpp:
              (WebCore::FontPlatformData::setupPaint):
              * platform/graphics/chromium/HarfbuzzSkia.cpp:
              (WebCore::getOutlinePoint):
              * platform/graphics/skia/GraphicsContext3DSkia.cpp:
              (WebCore::GraphicsContext3D::getImageData):
              * platform/graphics/skia/GraphicsContextSkia.cpp:
              (WebCore::isCoordinateSkiaSafe):
              (WebCore::GraphicsContext::fillRect):
              (WebCore::GraphicsContext::strokePath):
              (WebCore::GraphicsContext::strokeRect):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@58404 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      294a60ac
  29. 27 Apr, 2010 1 commit
    • jamesr@google.com's avatar
      2010-04-27 James Robinson <jamesr@chromium.org> · cac2e10a
      jamesr@google.com authored
              Reviewed by Darin Adler.
      
              Fix warnings emitted by gcc 4.4.1 on linux in chromium-specific platform graphics files.
              https://bugs.webkit.org/show_bug.cgi?id=38158
      
              Most of the issues are signed/unsigned mismatches, but there are a few unusued variables
              and functions mixed in.
      
              * platform/graphics/chromium/FontLinux.cpp:
              (WebCore::adjustTextRenderMode):
              (WebCore::TextRunWalker::getTextRun):
              (WebCore::TextRunWalker::getNormalizedTextRun):
              (WebCore::TextRunWalker::setGlyphXPositions):
              (WebCore::glyphIndexForXPositionInScriptRun):
              (WebCore::Font::offsetForPositionForComplexText):
              (WebCore::Font::selectionRectForComplexText):
              * platform/graphics/chromium/FontPlatformDataLinux.cpp:
              (WebCore::FontPlatformData::setupPaint):
              * platform/graphics/chromium/HarfbuzzSkia.cpp:
              (WebCore::getOutlinePoint):
              * platform/graphics/skia/GraphicsContext3DSkia.cpp:
              (WebCore::GraphicsContext3D::getImageData):
              * platform/graphics/skia/GraphicsContextSkia.cpp:
              (WebCore::isCoordinateSkiaSafe):
              (WebCore::GraphicsContext::fillRect):
              (WebCore::GraphicsContext::strokePath):
              (WebCore::GraphicsContext::strokeRect):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@58340 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      cac2e10a
  30. 08 Feb, 2010 1 commit
    • krit@webkit.org's avatar
      2010-02-08 Dirk Schulze <krit@webkit.org> · 2b95a9a6
      krit@webkit.org authored
              Reviewed by Nikolas Zimmermann.
      
              Add back an AffineTransform class for use by SVG
              https://bugs.webkit.org/show_bug.cgi?id=33750
      
              This adds back AffineTransform. This saves additional 4% memory consumption
              on the 50k rects stress test: https://bugs.webkit.org/attachment.cgi?id=46721
              It also makes it possible to optimize the calculations internally of
              AffineTransform to the needs of 2D transformations (the second benefit for SVG,
              which uses transformations relative often at the moment.
              Everything that is 2D related (like images, patterns, gradients, fonts), uses
              AffineTransform now.
      
              * WebCore.xcodeproj/project.pbxproj:
              * bindings/js/JSSVGMatrixCustom.cpp:
              (WebCore::JSSVGMatrix::multiply):
              (WebCore::JSSVGMatrix::inverse):
              (WebCore::JSSVGMatrix::rotateFromVector):
              * bindings/js/JSSVGPODTypeWrapper.h:
              * bindings/scripts/CodeGeneratorJS.pm:
              * bindings/scripts/CodeGeneratorObjC.pm:
              * bindings/scripts/CodeGeneratorV8.pm:
              * bindings/v8/V8Index.h:
              * bindings/v8/custom/V8SVGMatrixCustom.cpp:
              (WebCore::V8SVGMatrix::multiplyCallback):
              (WebCore::V8SVGMatrix::inverseCallback):
              (WebCore::V8SVGMatrix::rotateFromVectorCallback):
              * html/HTMLCanvasElement.cpp: Changed to AffineTransform now
              (WebCore::HTMLCanvasElement::baseTransform):
              * html/HTMLCanvasElement.h:
              * platform/graphics/FloatPoint.cpp:
              (WebCore::FloatPoint::matrixTransform):
              * platform/graphics/FloatPoint.h:
              * platform/graphics/GeneratedImage.cpp:
              (WebCore::GeneratedImage::drawPattern):
              * platform/graphics/GeneratedImage.h:
              * platform/graphics/Gradient.cpp:
              (WebCore::Gradient::setGradientSpaceTransform):
              (WebCore::Gradient::setPlatformGradientSpaceTransform):
              * platform/graphics/Gradient.h:
              (WebCore::Gradient::gradientSpaceTransform):
              * platform/graphics/GraphicsContext.h:
              * platform/graphics/Image.cpp:
              (WebCore::Image::drawTiled):
              * platform/graphics/Image.h:
              * platform/graphics/ImageBuffer.h:
              (WebCore::ImageBuffer::baseTransform):
              * platform/graphics/Path.h:
              * platform/graphics/Pattern.cpp:
              (WebCore::Pattern::setPatternSpaceTransform):
              * platform/graphics/Pattern.h:
              (WebCore::Pattern::create):
              (WebCore::Pattern::tileImage):
              * platform/graphics/cairo/FontCairo.cpp:
              (WebCore::Font::drawGlyphs):
              * platform/graphics/cairo/GraphicsContextCairo.cpp:
              (WebCore::setPlatformFill):
              (WebCore::setPlatformStroke):
              (WebCore::GraphicsContext::getCTM):
              * platform/graphics/cairo/ImageCairo.cpp:
              (WebCore::Image::drawPattern):
              * platform/graphics/cairo/PathCairo.cpp:
              * platform/graphics/cairo/PatternCairo.cpp:
              (WebCore::Pattern::createPlatformPattern):
              * platform/graphics/cg/GraphicsContextCG.cpp:
              (WebCore::GraphicsContext::getCTM):
              * platform/graphics/cg/GraphicsContextPlatformPrivateCG.h:
              (WebCore::GraphicsContextPlatformPrivate::concatCTM):
              * platform/graphics/cg/ImageCG.cpp:
              (WebCore::Image::drawPattern):
              * platform/graphics/cg/PathCG.cpp:
              * platform/graphics/cg/PatternCG.cpp:
              (WebCore::Pattern::createPlatformPattern):
              * platform/graphics/haiku/GraphicsContextHaiku.cpp:
              (WebCore::GraphicsContext::getCTM):
              * platform/graphics/haiku/ImageHaiku.cpp:
              (WebCore::Image::drawPattern):
              * platform/graphics/haiku/PathHaiku.cpp:
              * platform/graphics/qt/FontQt.cpp:
              (WebCore::Font::drawComplexText):
              * platform/graphics/qt/GraphicsContextQt.cpp:
              (WebCore::GraphicsContext::getCTM):
              (WebCore::GraphicsContext::fillPath):
              (WebCore::GraphicsContext::strokePath):
              (WebCore::GraphicsContext::fillRect):
              * platform/graphics/qt/ImageQt.cpp:
              (WebCore::Image::drawPattern):
              * platform/graphics/qt/PathQt.cpp:
              * platform/graphics/qt/PatternQt.cpp:
              (WebCore::Pattern::createPlatformPattern):
              * platform/graphics/skia/GradientSkia.cpp:
              (WebCore::Gradient::setPlatformGradientSpaceTransform):
              * platform/graphics/skia/GraphicsContextSkia.cpp:
              (WebCore::GraphicsContext::getCTM):
              * platform/graphics/skia/ImageSkia.cpp:
              (WebCore::Image::drawPattern):
              * platform/graphics/skia/PathSkia.cpp:
              * platform/graphics/skia/PatternSkia.cpp:
              (WebCore::Pattern::platformPattern):
              * platform/graphics/skia/SkiaFontWin.cpp:
              (WebCore::windowsCanHandleTextDrawing):
              * platform/graphics/transforms/AffineTransform.cpp:
              (WebCore::AffineTransform::makeIdentity): needed by some parts of WebCore
              (WebCore::AffineTransform::scale): Didn't scale the complete matrix
              (WebCore::AffineTransform::translate): Didn't respect other transformations
              (WebCore::AffineTransform::shear): direct calculation, no extra multiply of matrices
              (WebCore::AffineTransform::map):
              (WebCore::AffineTransform::mapPoint):
              (WebCore::AffineTransform::mapRect):
              * platform/graphics/transforms/AffineTransform.h:
              (WebCore::AffineTransform::isIdentityOrTranslation):
              * platform/graphics/transforms/TransformationMatrix.cpp:
              (WebCore::TransformationMatrix::toAffineTransform):
              * platform/graphics/transforms/TransformationMatrix.h:
              * platform/graphics/win/FontCGWin.cpp:
              (WebCore::drawGDIGlyphs):
              * platform/graphics/win/GraphicsContextCGWin.cpp:
              * platform/graphics/win/GraphicsContextCairoWin.cpp:
              * platform/graphics/win/GraphicsContextWin.cpp:
              (WebCore::GraphicsContextPlatformPrivate::concatCTM):
              * platform/graphics/wince/FontWince.cpp:
              * platform/graphics/wince/GraphicsContextWince.cpp:
              (WebCore::GraphicsContextPlatformPrivate::concatCTM):
              (WebCore::GraphicsContext::fillPath):
              (WebCore::GraphicsContext::strokePath):
              (WebCore::GraphicsContext::getCTM):
              (WebCore::GraphicsContext::drawBitmapPattern):
              * platform/graphics/wince/ImageBufferWince.cpp:
              (WebCore::):
              (WebCore::BufferedImage::drawPattern):
              * platform/graphics/wince/PathWince.cpp:
              (WebCore::Path::transform):
              * platform/graphics/wince/PlatformPathWince.cpp:
              (WebCore::drawPolygons):
              (WebCore::PathPolygon::transform):
              (WebCore::PlatformPathElement::transform):
              (WebCore::PlatformPath::strokePath):
              (WebCore::PlatformPath::fillPath):
              (WebCore::PlatformPath::transform):
              * platform/graphics/wince/PlatformPathWince.h:
              (WebCore::):
              * platform/graphics/wx/GraphicsContextWx.cpp:
              (WebCore::GraphicsContext::getCTM):
              * platform/graphics/wx/ImageWx.cpp:
              (WebCore::BitmapImage::drawPattern):
              (WebCore::Image::drawPattern):
              * platform/graphics/wx/PathWx.cpp:
              * platform/gtk/RenderThemeGtk.cpp:
              (WebCore::paintMozillaGtkWidget):
              * plugins/win/PluginViewWin.cpp:
              (WebCore::PluginView::paintWindowedPluginIntoContext):
              * rendering/RenderBox.cpp:
              (WebCore::RenderBox::localTransform):
              * rendering/RenderBox.h:
              * rendering/RenderBoxModelObject.cpp:
              (WebCore::RenderBoxModelScaleData::RenderBoxModelScaleData):
              (WebCore::RenderBoxModelScaleData::transform):
              (WebCore::RenderBoxModelScaleData::setTransform):
              (WebCore::RenderBoxModelScaleObserver::shouldPaintBackgroundAtLowQuality):
              (WebCore::RenderBoxModelObject::paintBoxShadow):
              * rendering/RenderForeignObject.cpp:
              (WebCore::RenderForeignObject::translationForAttributes):
              (WebCore::RenderForeignObject::localToParentTransform):
              * rendering/RenderForeignObject.h:
              (WebCore::RenderForeignObject::localTransform):
              * rendering/RenderLayer.cpp:
              (WebCore::RenderLayer::paintLayer):
              * rendering/RenderObject.cpp:
              (WebCore::RenderObject::localTransform):
              (WebCore::RenderObject::localToParentTransform):
              (WebCore::RenderObject::absoluteTransform):
              * rendering/RenderObject.h:
              * rendering/RenderPath.cpp:
              (WebCore::RenderPath::localToParentTransform):
              (WebCore::RenderPath::localTransform):
              * rendering/RenderPath.h:
              * rendering/RenderSVGHiddenContainer.h:
              (WebCore::RenderSVGHiddenContainer::absoluteTransform):
              * rendering/RenderSVGImage.h:
              (WebCore::RenderSVGImage::localToParentTransform):
              (WebCore::RenderSVGImage::localTransform):
              * rendering/RenderSVGRoot.cpp:
              (WebCore::RenderSVGRoot::localToBorderBoxTransform):
              (WebCore::RenderSVGRoot::localToRepaintContainerTransform):
              (WebCore::RenderSVGRoot::localToParentTransform):
              (WebCore::RenderSVGRoot::absoluteTransform):
              (WebCore::RenderSVGRoot::localTransform):
              * rendering/RenderSVGRoot.h:
              * rendering/RenderSVGText.h:
              (WebCore::RenderSVGText::localToParentTransform):
              (WebCore::RenderSVGText::localTransform):
              * rendering/RenderSVGTransformableContainer.cpp:
              (WebCore::RenderSVGTransformableContainer::localToParentTransform):
              (WebCore::RenderSVGTransformableContainer::localTransform):
              (WebCore::RenderSVGTransformableContainer::calculateLocalTransform):
              * rendering/RenderSVGTransformableContainer.h:
              * rendering/RenderSVGViewportContainer.cpp:
              (WebCore::RenderSVGViewportContainer::markerBoundaries):
              (WebCore::RenderSVGViewportContainer::markerContentTransformation):
              (WebCore::RenderSVGViewportContainer::viewportTransform):
              (WebCore::RenderSVGViewportContainer::localToParentTransform):
              (WebCore::RenderSVGViewportContainer::absoluteTransform):
              * rendering/RenderSVGViewportContainer.h:
              * rendering/SVGCharacterLayoutInfo.cpp:
              (WebCore::SVGChar::characterTransform):
              * rendering/SVGCharacterLayoutInfo.h:
              (WebCore::SVGTextChunkWalker::operator()):
              * rendering/SVGInlineTextBox.cpp:
              (WebCore::SVGInlineTextBox::calculateGlyphBoundaries):
              (WebCore::SVGInlineTextBoxClosestCharacterToPositionWalker::chunkPortionCallback):
              (WebCore::SVGInlineTextBoxSelectionRectWalker::chunkPortionCallback):
              (WebCore::SVGInlineTextBox::paintCharacters):
              (WebCore::SVGInlineTextBox::paintDecoration):
              * rendering/SVGMarkerLayoutInfo.h:
              (WebCore::MarkerLayout::MarkerLayout):
              * rendering/SVGRenderSupport.cpp:
              (WebCore::applyTransformToPaintInfo):
              * rendering/SVGRenderSupport.h:
              * rendering/SVGRenderTreeAsText.cpp:
              (WebCore::operator<<):
              * rendering/SVGRenderTreeAsText.h:
              * rendering/SVGRootInlineBox.cpp:
              (WebCore::SVGRootInlineBoxPaintWalker::chunkPortionCallback):
              (WebCore::applyTextLengthCorrectionToTextChunk):
              (WebCore::SVGRootInlineBox::buildLayoutInformation):
              * rendering/TransformState.cpp:
              (WebCore::TransformState::applyTransform):
              * rendering/TransformState.h:
              * svg/GradientAttributes.h:
              (WebCore::GradientAttributes::gradientTransform):
              (WebCore::GradientAttributes::setGradientTransform):
              * svg/PatternAttributes.h:
              (WebCore::PatternAttributes::patternTransform):
              (WebCore::PatternAttributes::setPatternTransform):
              * svg/SVGAnimateMotionElement.cpp:
              (WebCore::SVGAnimateMotionElement::resetToBaseValue):
              (WebCore::SVGAnimateMotionElement::calculateAnimatedValue):
              (WebCore::SVGAnimateMotionElement::applyResultsToTarget):
              * svg/SVGAnimateMotionElement.h:
              * svg/SVGAnimateTransformElement.cpp:
              * svg/SVGAnimateTransformElement.h:
              * svg/SVGElement.h:
              (WebCore::SVGElement::supplementalTransform):
              * svg/SVGFitToViewBox.cpp:
              (WebCore::SVGFitToViewBox::viewBoxToViewTransform):
              * svg/SVGFitToViewBox.h:
              * svg/SVGLocatable.cpp:
              (WebCore::SVGLocatable::getCTM):
              (WebCore::SVGLocatable::getScreenCTM):
              (WebCore::SVGLocatable::getTransformToElement):
              * svg/SVGLocatable.h:
              * svg/SVGMarkerElement.cpp:
              (WebCore::SVGMarkerElement::viewBoxToViewTransform):
              * svg/SVGMarkerElement.h:
              * svg/SVGMaskElement.cpp:
              (WebCore::SVGMaskElement::drawMaskerContent):
              * svg/SVGMatrix.idl:
              * svg/SVGPatternElement.cpp:
              (WebCore::SVGPatternElement::buildPattern):
              * svg/SVGPreserveAspectRatio.cpp:
              (WebCore::SVGPreserveAspectRatio::getCTM):
              * svg/SVGPreserveAspectRatio.h:
              * svg/SVGSVGElement.cpp:
              (WebCore::SVGSVGElement::viewport):
              (WebCore::SVGSVGElement::createSVGMatrix):
              (WebCore::SVGSVGElement::createSVGTransformFromMatrix):
              (WebCore::SVGSVGElement::getCTM):
              (WebCore::SVGSVGElement::getScreenCTM):
              (WebCore::SVGSVGElement::viewBoxToViewTransform):
              * svg/SVGSVGElement.h:
              * svg/SVGStyledLocatableElement.cpp:
              (WebCore::SVGStyledLocatableElement::getCTM):
              (WebCore::SVGStyledLocatableElement::getScreenCTM):
              * svg/SVGStyledLocatableElement.h:
              * svg/SVGStyledTransformableElement.cpp:
              (WebCore::SVGStyledTransformableElement::getCTM):
              (WebCore::SVGStyledTransformableElement::getScreenCTM):
              (WebCore::SVGStyledTransformableElement::animatedLocalTransform):
              (WebCore::SVGStyledTransformableElement::supplementalTransform):
              * svg/SVGStyledTransformableElement.h:
              (WebCore::SVGStyledTransformableElement::isStyledTransformable):
              (WebCore::SVGStyledTransformableElement::toPathData):
              * svg/SVGTextContentElement.cpp:
              (WebCore::SVGInlineTextBoxQueryWalker::chunkPortionCallback):
              * svg/SVGTextElement.cpp:
              (WebCore::SVGTextElement::getScreenCTM):
              (WebCore::SVGTextElement::getCTM):
              (WebCore::SVGTextElement::animatedLocalTransform):
              (WebCore::SVGTextElement::supplementalTransform):
              * svg/SVGTextElement.h:
              * svg/SVGTextPathElement.cpp:
              * svg/SVGTransform.cpp:
              (SVGTransform::SVGTransform):
              (SVGTransform::matrix):
              (SVGTransform::setMatrix):
              * svg/SVGTransform.h:
              * svg/SVGTransformDistance.cpp:
              (WebCore::SVGTransformDistance::SVGTransformDistance):
              (WebCore::SVGTransformDistance::scaledDistance):
              (WebCore::SVGTransformDistance::isZero):
              * svg/SVGTransformDistance.h:
              * svg/SVGTransformList.cpp:
              (SVGTransformList::createSVGTransformFromMatrix):
              (SVGTransformList::concatenate):
              (SVGTransformList::valueAsString):
              * svg/SVGTransformList.h:
              * svg/SVGTransformable.cpp:
              (WebCore::SVGTransformable::getCTM):
              (WebCore::SVGTransformable::getScreenCTM):
              (WebCore::SVGTransformable::parseTransformValue):
              * svg/SVGTransformable.h:
              (WebCore::SVGTransformable::):
              * svg/graphics/SVGPaintServerGradient.cpp:
              (WebCore::SVGPaintServerGradient::gradientTransform):
              (WebCore::SVGPaintServerGradient::setGradientTransform):
              (WebCore::clipToTextMask):
              (WebCore::SVGPaintServerGradient::setup):
              * svg/graphics/SVGPaintServerGradient.h:
              * svg/graphics/SVGPaintServerPattern.cpp:
              (WebCore::SVGPaintServerPattern::patternTransform):
              (WebCore::SVGPaintServerPattern::setPatternTransform):
              (WebCore::SVGPaintServerPattern::setup):
              * svg/graphics/SVGPaintServerPattern.h:
              * svg/graphics/SVGResourceClipper.cpp:
              (WebCore::SVGResourceClipper::applyClip):
              * svg/graphics/SVGResourceMarker.cpp:
              (WebCore::SVGResourceMarker::markerTransformation):
              (WebCore::SVGResourceMarker::draw):
              * svg/graphics/SVGResourceMarker.h:
              * svg/graphics/filters/SVGFEImage.cpp:
              * svg/graphics/filters/SVGFETile.cpp:
              (WebCore::FETile::apply):
      
      2010-02-08  Dirk Schulze  <krit@webkit.org>
      
              Reviewed by Nikolas Zimmermann.
      
              Add back an AffineTransform class for use by SVG
              https://bugs.webkit.org/show_bug.cgi?id=33750
      
              Some negative zero problems fixed, but new one were added on other places. A seperate
              patch should fix it all at once.
              use-on-disallowed-foreign-object-3 and 4 had wrong results. The old SVG code
              with TransformationMatrix used translateRight, that was wrong at this place and is
              fixed now.
      
              * platform/mac/svg/W3C-SVG-1.1/animate-elem-80-t-expected.txt:
              * platform/mac/svg/W3C-SVG-1.1/fonts-elem-01-t-expected.txt:
              * platform/mac/svg/W3C-SVG-1.1/fonts-elem-02-t-expected.txt:
              * platform/mac/svg/W3C-SVG-1.1/fonts-elem-03-b-expected.txt:
              * platform/mac/svg/W3C-SVG-1.1/fonts-elem-04-b-expected.txt:
              * platform/mac/svg/W3C-SVG-1.1/fonts-elem-07-b-expected.txt:
              * platform/mac/svg/custom/use-on-disallowed-foreign-object-3-expected.txt:
              * platform/mac/svg/custom/use-on-disallowed-foreign-object-4-expected.txt:
              * svg/dom/SVGMatrix-interface-expected.txt:
              * svg/dom/SVGMatrix-interface.xhtml:
      
      2010-02-08  Dirk Schulze  <krit@webkit.org>
      
              Reviewed by Nikolas Zimmermann.
      
              Add back an AffineTransform class for use by SVG
              https://bugs.webkit.org/show_bug.cgi?id=33750
      
              Use AffineTransform instead of TransformationMatrix here.
      
              * tests/TransparencyWinTest.cpp:
              (WebCore::TEST):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@54503 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      2b95a9a6
  31. 02 Feb, 2010 2 commits
  32. 01 Feb, 2010 2 commits
    • eric@webkit.org's avatar
      2010-02-01 Stephen White <senorblanco@chromium.org> · 1afdbee1
      eric@webkit.org authored
              Reviewed by Eric Seidel.
      
              Fix for Pattern transformations in Chromium/Skia.  This required
              reworking Pattern a bit to be more like the Gradient implementation.
              In particular, it now holds an m_pattern reference to the
              platform-specific implementation, and passes along changes to the
              m_patternSpaceTransformation, in the same way that Gradient does for
              m_gradientSpaceTransformation.  This is necessary since Skia creates the
              platform-specific pattern (SkShader) once, rather than recreating it
              on each draw.
              For platforms other than Skia, m_pattern is unused, they will
              continue to use the static createPlatformPattern(), and the new
              notification functions are stubbed out.  Other platforms can switch to
              the new implementation if they so choose.
      
              https://bugs.webkit.org/show_bug.cgi?id=24534
      
              Covered by svg/custom/pattern-y-offset.svg,
              svg/custom/pattern-cycle-detection.svg, and many more.
      
              * platform/graphics/Pattern.cpp:
              (WebCore::Pattern::Pattern):
              Initializer for m_pattern.
              (WebCore::Pattern::~Pattern):
              call platformDestroy().
              (WebCore::Pattern::setPatternSpaceTransform):
              Pass along the transform via setPlatformPatternSpaceTransform().
              (WebCore::Pattern::platformDestroy):
              (WebCore::Pattern::setPlatformPatternSpaceTransform):
              Stub implementations for non-skia platforms.
              * platform/graphics/Pattern.h:
              * platform/graphics/skia/GraphicsContextSkia.cpp:
              (WebCore::GraphicsContext::setPlatformFillPattern):
              (WebCore::GraphicsContext::setPlatformStrokePattern):
              Call platformPattern() instead of static version.
              Since Pattern now owns its SkShader, no need to unref here.
              * platform/graphics/skia/PatternSkia.cpp:
              (WebCore::Pattern::platformDestroy):
              Unref the SkShader on destroy.
              (WebCore::Pattern::platformPattern):
              Create the platform pattern (SkShader) once, and cache it.
              (WebCore::Pattern::setPlatformPatternSpaceTransform):
              Set the shader's local matrix from the m_patternSpaceTransformation.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@54203 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      1afdbee1
    • krit@webkit.org's avatar
      2010-02-01 Dirk Schulze <krit@webkit.org> · 10affde4
      krit@webkit.org authored
              Reviewed by Simon Fraser.
      
              Add back an AffineTransform class for use by SVG
              https://bugs.webkit.org/show_bug.cgi?id=33750
      
              These are the first steps on reimplementing AffineTransform. Unlike
              the old affine code, this one is platform independent like TransformationMatrix.
              AffineTransform has the benefit, that it stores just 6 doubles instead of
              16 in TransformationMatrix. The calculations of transformations are not that
              complex and can improve the memory usage and speed of SVG.
              AffineTransform can be used by HTML Canvas3D or SVG, since they are 2D related (at
              least for the moment).
              HTML Canvas is the first that makes use of the new AffineTransform. Next patches
              will introduce the affine code to SVG.
      
              No new tests. The new AffineTransformation code is tested by fast/canvas.
      
              * Android.mk:
              * GNUmakefile.am:
              * WebCore.gypi:
              * WebCore.pro:
              * WebCore.vcproj/WebCore.vcproj:
              * WebCore.xcodeproj/project.pbxproj:
              * html/canvas/CanvasRenderingContext2D.cpp:
              (WebCore::CanvasRenderingContext2D::scale):
              (WebCore::CanvasRenderingContext2D::rotate):
              (WebCore::CanvasRenderingContext2D::translate):
              (WebCore::CanvasRenderingContext2D::transform):
              (WebCore::CanvasRenderingContext2D::setTransform):
              (WebCore::CanvasRenderingContext2D::isPointInPath):
              (WebCore::CanvasRenderingContext2D::willDraw):
              * html/canvas/CanvasRenderingContext2D.h:
              * platform/graphics/GraphicsContext.h:
              * platform/graphics/Path.h:
              * platform/graphics/cairo/GraphicsContextCairo.cpp:
              (WebCore::GraphicsContext::getAffineCTM):
              (WebCore::GraphicsContext::concatCTM):
              * platform/graphics/cairo/GraphicsContextPlatformPrivateCairo.h:
              (WebCore::GraphicsContextPlatformPrivate::concatCTM):
              * platform/graphics/cairo/PathCairo.cpp:
              (WebCore::Path::transform):
              * platform/graphics/cairo/TransformationMatrixCairo.cpp:
              (WebCore::AffineTransform::operator cairo_matrix_t):
              * platform/graphics/cg/GraphicsContextCG.cpp:
              (WebCore::GraphicsContext::concatCTM):
              (WebCore::GraphicsContext::getAffineCTM):
              * platform/graphics/cg/GraphicsContextPlatformPrivateCG.h:
              (WebCore::GraphicsContextPlatformPrivate::concatCTM):
              * platform/graphics/cg/PathCG.cpp:
              (WebCore::Path::transform):
              * platform/graphics/cg/TransformationMatrixCG.cpp:
              (WebCore::AffineTransform::operator CGAffineTransform):
              * platform/graphics/haiku/GraphicsContextHaiku.cpp:
              (WebCore::GraphicsContext::getAffineCTM):
              (WebCore::GraphicsContext::concatCTM):
              * platform/graphics/haiku/PathHaiku.cpp:
              (WebCore::Path::transform):
              * platform/graphics/qt/GraphicsContextQt.cpp:
              (WebCore::GraphicsContext::getAffineCTM):
              (WebCore::GraphicsContext::concatCTM):
              * platform/graphics/qt/PathQt.cpp:
              (WebCore::Path::transform):
              * platform/graphics/qt/TransformationMatrixQt.cpp:
              (WebCore::AffineTransform::operator QTransform):
              * platform/graphics/skia/GraphicsContextSkia.cpp:
              (WebCore::GraphicsContext::concatCTM):
              (WebCore::GraphicsContext::getAffineCTM):
              * platform/graphics/skia/PathSkia.cpp:
              (WebCore::Path::transform):
              * platform/graphics/skia/TransformationMatrixSkia.cpp:
              (WebCore::AffineTransform::operator SkMatrix):
              * platform/graphics/transforms/AffineTransform.cpp: Added.
              (WebCore::affineTransformDecompose):
              (WebCore::affineTransformCompose):
              (WebCore::AffineTransform::AffineTransform):
              (WebCore::AffineTransform::reset):
              (WebCore::AffineTransform::setMatrix):
              (WebCore::AffineTransform::isIdentity):
              (WebCore::AffineTransform::det):
              (WebCore::AffineTransform::isInvertible):
              (WebCore::AffineTransform::inverse):
              (WebCore::AffineTransform::multiply):
              (WebCore::AffineTransform::multLeft):
              (WebCore::AffineTransform::rotate):
              (WebCore::AffineTransform::scale):
              (WebCore::AffineTransform::translate):
              (WebCore::AffineTransform::scaleNonUniform):
              (WebCore::AffineTransform::rotateFromVector):
              (WebCore::AffineTransform::flipX):
              (WebCore::AffineTransform::flipY):
              (WebCore::AffineTransform::shear):
              (WebCore::AffineTransform::skew):
              (WebCore::AffineTransform::skewX):
              (WebCore::AffineTransform::skewY):
              (WebCore::makeMapBetweenRects):
              (WebCore::AffineTransform::map):
              (WebCore::AffineTransform::mapPoint):
              (WebCore::AffineTransform::mapRect):
              (WebCore::AffineTransform::blend):
              (WebCore::AffineTransform::toTransformationMatrix):
              * platform/graphics/transforms/AffineTransform.h: Added.
              (WebCore::AffineTransform::a):
              (WebCore::AffineTransform::setA):
              (WebCore::AffineTransform::b):
              (WebCore::AffineTransform::setB):
              (WebCore::AffineTransform::c):
              (WebCore::AffineTransform::setC):
              (WebCore::AffineTransform::d):
              (WebCore::AffineTransform::setD):
              (WebCore::AffineTransform::e):
              (WebCore::AffineTransform::setE):
              (WebCore::AffineTransform::f):
              (WebCore::AffineTransform::setF):
              (WebCore::AffineTransform::operator== ):
              (WebCore::AffineTransform::operator!=):
              (WebCore::AffineTransform::operator*=):
              (WebCore::AffineTransform::operator*):
              (WebCore::AffineTransform::setMatrix):
              * platform/graphics/win/GraphicsContextWin.cpp:
              (WebCore::GraphicsContextPlatformPrivate::concatCTM):
              * platform/graphics/wince/GraphicsContextWince.cpp:
              (WebCore::GraphicsContext::concatCTM):
              (WebCore::GraphicsContext::getAffineCTM):
              * platform/graphics/wx/GraphicsContextWx.cpp:
              (WebCore::GraphicsContext::getAffineCTM):
              (WebCore::GraphicsContext::concatCTM):
              * platform/graphics/wx/PathWx.cpp:
              (WebCore::Path::transform):
              * platform/graphics/wx/TransformationMatrixWx.cpp:
              (WebCore::AffineTransform::operator wxGraphicsMatrix):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@54137 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      10affde4
  33. 31 Jan, 2010 1 commit
    • tkent@chromium.org's avatar
      2010-01-31 Kent Tamura <tkent@chromium.org> · 453e746a
      tkent@chromium.org authored
              Unreviewed. Revert r54112 and r54124 because of Windows build error.
      
              * Android.mk:
              * GNUmakefile.am:
              * WebCore.gypi:
              * WebCore.pro:
              * WebCore.vcproj/WebCore.vcproj:
              * WebCore.xcodeproj/project.pbxproj:
              * html/canvas/CanvasRenderingContext2D.cpp:
              (WebCore::CanvasRenderingContext2D::scale):
              (WebCore::CanvasRenderingContext2D::rotate):
              (WebCore::CanvasRenderingContext2D::translate):
              (WebCore::CanvasRenderingContext2D::transform):
              (WebCore::CanvasRenderingContext2D::setTransform):
              (WebCore::CanvasRenderingContext2D::isPointInPath):
              (WebCore::CanvasRenderingContext2D::willDraw):
              * html/canvas/CanvasRenderingContext2D.h:
              * platform/graphics/GraphicsContext.h:
              * platform/graphics/Path.h:
              * platform/graphics/cairo/GraphicsContextCairo.cpp:
              * platform/graphics/cairo/GraphicsContextPlatformPrivateCairo.h:
              * platform/graphics/cairo/PathCairo.cpp:
              * platform/graphics/cairo/TransformationMatrixCairo.cpp:
              * platform/graphics/cg/GraphicsContextCG.cpp:
              * platform/graphics/cg/GraphicsContextPlatformPrivateCG.h:
              * platform/graphics/cg/PathCG.cpp:
              * platform/graphics/cg/TransformationMatrixCG.cpp:
              * platform/graphics/haiku/GraphicsContextHaiku.cpp:
              * platform/graphics/haiku/PathHaiku.cpp:
              * platform/graphics/qt/GraphicsContextQt.cpp:
              * platform/graphics/qt/PathQt.cpp:
              * platform/graphics/qt/TransformationMatrixQt.cpp:
              * platform/graphics/skia/GraphicsContextSkia.cpp:
              * platform/graphics/skia/PathSkia.cpp:
              * platform/graphics/skia/TransformationMatrixSkia.cpp:
              * platform/graphics/transforms/AffineTransform.cpp: Removed.
              * platform/graphics/transforms/AffineTransform.h: Removed.
              * platform/graphics/wince/GraphicsContextWince.cpp:
              * platform/graphics/wx/GraphicsContextWx.cpp:
              * platform/graphics/wx/PathWx.cpp:
              * platform/graphics/wx/TransformationMatrixWx.cpp:
              (WebCore::TransformationMatrix::operator wxGraphicsMatrix):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@54125 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      453e746a