1. 10 Dec, 2010 1 commit
    • 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
  2. 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
  3. 04 Nov, 2010 1 commit
    • mitz@apple.com's avatar
      reversion bubble in WebViews · f82f4ad6
      mitz@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=47630
      <rdar://problem/8530960>
      
      Patch by Jia Pu <jpu@apple.com> on 2010-11-04
      Reviewed by Dan Bernstein.
      
      WebCore: 
      
      Added manual test:
      manual-tests/autocorrection/continue-typing-to-dismiss-reversion.html
      manual-tests/autocorrection/delete-to-dismiss-reversion.html
      manual-tests/autocorrection/delete-to-end-of-word-to-show-reversion.html
      manual-tests/autocorrection/move-to-end-of-word-to-show-reversion.html
      manual-tests/autocorrection/type-whitespace-to-dismiss-reversion.html
      
      We can only manully test this feature for two reasons:
      1. On Mac OS X, the result of spell checking is partly determined by past user usage. We can't
         realiably generating test cases until we can disable user custom data during spell checking.
      2. To exerciese this feature, we need a minimum of 0.3 second delay using WebCore timer.
      
      This patch is to add reversion to correction panel. It consists of following major code changes:
      1. Collected all autocorrection related member variables in Editor into a CorrectionPanelInfo
         class to improve readability.
      2. Changed signature of Editor::startCorrectionPanelTimer() to allow caller to specify the
         type of correction panel--regular correction or reversion.
      3. Made necessary changes to adopt reversion API in AppKit.
      4. Use SUPPORT_CORRECTION_PANEL macro to improve readability.
      
      * GNUmakefile.am: Added CorrectionPanelInfo.h.
      * WebCore.gypi: Ditto.
      * WebCore.pro: Ditto.
      * WebCore.vcproj/WebCore.vcproj: Ditto.
      * WebCore.xcodeproj/project.pbxproj:
      * editing/CorrectionPanelInfo.h: Added.
      * editing/Editor.cpp:
      (WebCore::Editor::respondToChangedSelection): Start correction panel timer for reversion when
        the new selection is a caret selection at end of a previously corrected word.
      (WebCore::Editor::appliedEditing): Stop timer at the beginning of the method instead of at the end.
      (WebCore::Editor::~Editor): Adopted new method dismissCorrectionPanel().
      (WebCore::Editor::markMisspellingsAfterTypingToPosition): Adopted new method applyCorrectionPanelInfo().
      (WebCore::Editor::markAllMisspellingsAndBadGrammarInRanges): Code change for new m_correctionPanelInfo
        member variable.
      (WebCore::Editor::correctionPanelTimerFired): Change to handle reversion panel type.
      (WebCore::Editor::handleRejectedCorrection): Ditto.
      (WebCore::Editor::startCorrectionPanelTimer): Changed signature to allow passing in panel type.
      (WebCore::Editor::stopCorrectionPanelTimer): Adopted macro SUPPORT_CORRECTION_PANEL.
      (WebCore::Editor::handleCancelOperation): Ditto.
      (WebCore::Editor::isShowingCorrectionPanel): Ditto.
      (WebCore::Editor::dismissCorrectionPanel): Update m_correctionPanelInfo when correction panel
        is dismissed.
      (WebCore::Editor::applyCorrectionPanelInfo): Factored out code that applies autocorrection.
      (WebCore::Editor::changeSelectionAfterCommand): Adopt macro SUPPORT_CORRECTION_PANEL.
      * editing/Editor.h: Adopted CorrectionPanelInfo and add new member methods.
      * editing/EditorCommand.cpp: Adopted macro SUPPORT_CORRECTION_PANEL
      (WebCore::createCommandMap):
      * editing/TypingCommand.cpp: Adopted macro SUPPORT_CORRECTION_PANEL and new signature of
        startCorrectionPanelTimer().
      (WebCore::TypingCommand::markMisspellingsAfterTyping):
      * loader/EmptyClients.h:
      (WebCore::EmptyEditorClient::showCorrectionPanel): Adopted new signature of base class method.
      (WebCore::EmptyEditorClient::dismissCorrectionPanel):  Ditto.
      * manual-tests/autocorrection/continue-typing-to-dismiss-reversion.html: Added.
      * manual-tests/autocorrection/delete-to-dismiss-reversion.html: Added.
      * manual-tests/autocorrection/delete-to-end-of-word-to-show-reversion.html: Added.
      * manual-tests/autocorrection/move-to-end-of-word-to-show-reversion.html: Added.
      * manual-tests/autocorrection/type-whitespace-to-dismiss-reversion.html: Added.
      * page/EditorClient.h: Changed signature of showCorrectionPanel() and dismissCorrectionPanel().
      * platform/graphics/mac/GraphicsContextMac.mm: Added comment to improve readability.
      (WebCore::GraphicsContext::drawLineForTextChecking):
      
      WebKit/mac: 
      
      This patch is to add reversion to correction panel. Please see WebCore/ChangeLog for detail.
      
      * WebCoreSupport/WebEditorClient.h: Adopted new signature of base class method.
      * WebCoreSupport/WebEditorClient.mm: Adopted new signature of base class method. And code
        change to use new reversion API in AppKit.
      (WebEditorClient::WebEditorClient):
      (WebEditorClient::~WebEditorClient):
      (WebEditorClient::respondToChangedSelection):
      (WebEditorClient::showCorrectionPanel):
      (WebEditorClient::dismissCorrectionPanel):
      (WebEditorClient::isShowingCorrectionPanel):
      
      WebKit2: 
      
      This patch is to add reversion to correction panel. Please see WebCore/ChangeLog for detail.
      
      * WebProcess/WebCoreSupport/WebEditorClient.h: Adopted new signature of base class method.
      * WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm: Ditto.
      (WebKit::WebEditorClient::showCorrectionPanel):
      (WebKit::WebEditorClient::dismissCorrectionPanel):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@71385 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      f82f4ad6
  4. 20 Oct, 2010 1 commit
    • krit@webkit.org's avatar
      2010-10-20 Dirk Schulze <krit@webkit.org> · 2f1d5352
      krit@webkit.org authored
              Reviewed by Nikolas Zimmermann.
      
              Merge ColorSpace and ImageColorSpace enums
              https://bugs.webkit.org/show_bug.cgi?id=47922
      
              Renamed ColorSpace enum entries DeviceColorSpace and sRGBColorSpace to ColorSpaceDeviceRGB and ColorSpaceSRGB
              to follow webkit style rules.
      
              * src/WebFontImpl.cpp:
              (WebKit::WebFontImpl::drawText):
              * src/WebFrameImpl.cpp:
              (WebKit::WebFrameImpl::paintWithContext):
              * src/WebViewImpl.cpp:
              (WebKit::WebViewImpl::doPixelReadbackToCanvas):
              * tests/TransparencyWinTest.cpp:
              (WebCore::TEST):
      2010-10-20  Dirk Schulze  <krit@webkit.org>
      
              Reviewed by Nikolas Zimmermann.
      
              Merge ColorSpace and ImageColorSpace enums
              https://bugs.webkit.org/show_bug.cgi?id=47922
      
              Renamed ColorSpace enum entries DeviceColorSpace and sRGBColorSpace to ColorSpaceDeviceRGB and ColorSpaceSRGB
              to follow webkit style rules.
      
              * FullscreenVideoController.cpp:
              (HUDButton::draw):
              (HUDSlider::draw):
              (FullscreenVideoController::draw):
              * WebCoreSupport/WebDragClient.cpp:
              (WebDragClient::createDragImageForLink):
              * WebKitGraphics.cpp:
              (WebDrawText):
      2010-10-20  Dirk Schulze  <krit@webkit.org>
      
              Reviewed by Nikolas Zimmermann.
      
              Merge ColorSpace and ImageColorSpace enums
              https://bugs.webkit.org/show_bug.cgi?id=47922
      
              Renamed ColorSpace enum entries DeviceColorSpace and sRGBColorSpace to ColorSpaceDeviceRGB and ColorSpaceSRGB
              to follow webkit style rules.
      
              * Misc/WebKitNSStringExtras.mm:
              (-[NSString _web_drawAtPoint:font:textColor:allowingFontSmoothing:]):
      2010-10-20  Dirk Schulze  <krit@webkit.org>
      
              Reviewed by Nikolas Zimmermann.
      
              Merge ColorSpace and ImageColorSpace enums
              https://bugs.webkit.org/show_bug.cgi?id=47922
      
              Merging these two enums makes it easier to implement color-interpolation as well as
              color-interpolation-filter for SVG.
              Added ColorSpaceLinearRGB to the ColorSpace enum and changed ImageColorSpace to ColorSpace in all related
              files. Renamed enum entries DeviceColorSpace and sRGBColorSpace to ColorSpaceDeviceRGB and ColorSpaceSRGB
              to follow webkit style rules.
              Removed gray scale support in ImageBuffer since it is not used anymore on WebKit.
      
              * css/CSSPrimitiveValueMappings.h:
              (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
              (WebCore::CSSPrimitiveValue::operator ColorSpace):
              * css/CSSStyleSelector.cpp:
              (WebCore::CSSStyleSelector::applyProperty):
              * editing/SelectionController.cpp:
              (WebCore::SelectionController::paintCaret):
              * html/HTMLCanvasElement.cpp:
              (WebCore::HTMLCanvasElement::paint):
              * html/canvas/CanvasRenderingContext2D.cpp:
              (WebCore::CanvasRenderingContext2D::setAllAttributesToDefault):
              (WebCore::CanvasRenderingContext2D::setShadow):
              (WebCore::CanvasRenderingContext2D::applyShadow):
              (WebCore::CanvasRenderingContext2D::drawImage):
              (WebCore::CanvasRenderingContext2D::drawImageFromRect):
              (WebCore::CanvasRenderingContext2D::drawTextInternal):
              * html/canvas/CanvasStyle.cpp:
              (WebCore::CanvasStyle::applyStrokeColor):
              (WebCore::CanvasStyle::applyFillColor):
              * inspector/InspectorController.cpp:
              (WebCore::drawOutlinedQuad):
              (WebCore::InspectorController::drawElementTitle):
              * mathml/RenderMathMLBlock.cpp:
              (WebCore::RenderMathMLBlock::paint):
              * mathml/RenderMathMLFraction.cpp:
              (WebCore::RenderMathMLFraction::paint):
              * mathml/RenderMathMLRoot.cpp:
              (WebCore::RenderMathMLRoot::paint):
              * mathml/RenderMathMLSquareRoot.cpp:
              (WebCore::RenderMathMLSquareRoot::paint):
              * page/FrameView.cpp:
              (WebCore::FrameView::paintContents):
              * page/PrintContext.cpp:
              (WebCore::PrintContext::spoolAllPagesWithBoundaries):
              * platform/ScrollView.cpp:
              (WebCore::ScrollView::wheelEvent):
              * platform/ScrollbarTheme.h:
              (WebCore::ScrollbarTheme::paintScrollCorner):
              * platform/ScrollbarThemeComposite.cpp:
              (WebCore::ScrollbarThemeComposite::paintScrollCorner):
              * platform/chromium/PopupMenuChromium.cpp:
              (WebCore::PopupContainer::paintBorder):
              (WebCore::PopupListBox::paint):
              (WebCore::PopupListBox::paintRow):
              * platform/chromium/ScrollbarThemeChromium.cpp:
              (WebCore::ScrollbarThemeChromium::paintTickmarks):
              * platform/chromium/ScrollbarThemeChromiumMac.mm:
              (WebCore::ScrollbarThemeChromiumMac::paint):
              * platform/graphics/ColorSpace.h:
              * platform/graphics/GraphicsContext.cpp:
              (WebCore::GraphicsContext::setStrokePattern):
              (WebCore::GraphicsContext::setFillPattern):
              (WebCore::GraphicsContext::setStrokeGradient):
              (WebCore::GraphicsContext::setFillGradient):
              * platform/graphics/GraphicsContextPrivate.h:
              (WebCore::GraphicsContextState::GraphicsContextState):
              * platform/graphics/ImageBuffer.cpp:
              (WebCore::ImageBuffer::transformColorSpace):
              * platform/graphics/ImageBuffer.h:
              (WebCore::ImageBuffer::create):
              * platform/graphics/cairo/ImageBufferCairo.cpp:
              (WebCore::ImageBuffer::ImageBuffer):
              * platform/graphics/cg/ColorCG.cpp:
              (WebCore::cachedCGColorSpace):
              (WebCore::cachedCGColor):
              * platform/graphics/cg/GraphicsContextCG.cpp:
              (WebCore::linearRGBColorSpaceRef):
              * platform/graphics/cg/GraphicsContextCG.h:
              * platform/graphics/cg/ImageBufferCG.cpp:
              (WebCore::ImageBuffer::ImageBuffer):
              (WebCore::cgImage):
              (WebCore::ImageBuffer::draw):
              * platform/graphics/cg/ImageBufferData.h:
              * platform/graphics/cg/ImageCG.cpp:
              (WebCore::imageWithColorSpace):
              * platform/graphics/chromium/GLES2Canvas.cpp:
              (WebCore::GLES2Canvas::clearRect):
              (WebCore::GLES2Canvas::fillRect):
              * platform/graphics/chromium/TransparencyWin.cpp:
              (WebCore::TransparencyWin::setupLayerForWhiteLayer):
              * platform/graphics/filters/FEColorMatrix.cpp:
              (WebCore::FEColorMatrix::apply):
              * platform/graphics/filters/FEComposite.cpp:
              (WebCore::FEComposite::apply):
              * platform/graphics/filters/FEFlood.cpp:
              (WebCore::FEFlood::apply):
              * platform/graphics/filters/FEMerge.cpp:
              (WebCore::FEMerge::apply):
              * platform/graphics/filters/FEOffset.cpp:
              (WebCore::FEOffset::apply):
              * platform/graphics/filters/FETile.cpp:
              (WebCore::FETile::apply):
              * platform/graphics/filters/FilterEffect.cpp:
              (WebCore::FilterEffect::effectContext):
              * platform/graphics/filters/SourceAlpha.cpp:
              (WebCore::SourceAlpha::apply):
              * platform/graphics/filters/SourceGraphic.cpp:
              (WebCore::SourceGraphic::apply):
              * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
              (WebCore::MediaPlayerPrivateGStreamer::paint):
              * platform/graphics/gtk/FontGtk.cpp:
              (WebCore::Font::drawComplexText):
              * platform/graphics/mac/GraphicsContextMac.mm:
              (WebCore::GraphicsContext::drawFocusRing):
              * platform/graphics/mac/GraphicsLayerCA.mm:
              (WebCore::setLayerBorderColor):
              (WebCore::setLayerBackgroundColor):
              * platform/graphics/qt/GraphicsContextQt.cpp:
              (WebCore::GraphicsContext::GraphicsContext):
              * platform/graphics/qt/ImageBufferQt.cpp:
              (WebCore::ImageBuffer::ImageBuffer):
              (WebCore::ImageBuffer::draw):
              * platform/graphics/skia/ImageBufferSkia.cpp:
              (WebCore::ImageBuffer::ImageBuffer):
              * platform/graphics/skia/PlatformContextSkia.cpp:
              (WebCore::PlatformContextSkia::uploadSoftwareToHardware):
              * platform/graphics/win/FontCGWin.cpp:
              (WebCore::Font::drawGlyphs):
              * platform/graphics/win/GraphicsContextCGWin.cpp:
              (WebCore::GraphicsContext::GraphicsContext):
              (WebCore::GraphicsContext::drawFocusRing):
              * platform/graphics/win/GraphicsLayerCACF.cpp:
              (WebCore::setLayerBorderColor):
              (WebCore::setLayerBackgroundColor):
              * platform/graphics/win/ImageCGWin.cpp:
              (WebCore::BitmapImage::getHBITMAPOfSize):
              * platform/graphics/win/ImageCairoWin.cpp:
              (WebCore::BitmapImage::getHBITMAPOfSize):
              (WebCore::BitmapImage::drawFrameMatchingSourceSize):
              * platform/graphics/win/WebLayer.cpp:
              (WebCore::WebLayer::drawInContext):
              * platform/graphics/wince/GraphicsContextWinCE.cpp:
              (WebCore::GraphicsContext::clearRect):
              (WebCore::GraphicsContext::fillRect):
              * platform/graphics/wince/ImageWinCE.cpp:
              (WebCore::BitmapImage::getHBITMAPOfSize):
              * platform/graphics/wx/GraphicsContextWx.cpp:
              (WebCore::GraphicsContext::GraphicsContext):
              * platform/gtk/RenderThemeGtk.cpp:
              (WebCore::RenderThemeGtk::paintSearchFieldResultsDecoration):
              (WebCore::RenderThemeGtk::paintSearchFieldCancelButton):
              (WebCore::paintMediaButton):
              (WebCore::RenderThemeGtk::paintMediaSliderTrack):
              (WebCore::RenderThemeGtk::paintMediaSliderThumb):
              * platform/mac/ScrollbarThemeMac.mm:
              (WebCore::ScrollbarThemeMac::paint):
              * platform/win/PopupMenuWin.cpp:
              (WebCore::PopupMenuWin::paint):
              * platform/win/WebCoreTextRenderer.cpp:
              (WebCore::doDrawTextAtPoint):
              * platform/wx/wxcode/mac/carbon/non-kerned-drawing.cpp:
              (WebCore::drawTextWithSpacing):
              * plugins/PluginView.cpp:
              (WebCore::PluginView::paintMissingPluginIcon):
              * rendering/RenderLayer.cpp:
              (WebCore::RenderLayer::beginTransparencyLayers):
              (WebCore::RenderLayer::paintResizer):
              * rendering/RenderListMarker.cpp:
              (WebCore::RenderListMarker::paint):
              * rendering/RenderMediaControlsChromium.cpp:
              (WebCore::paintMediaButton):
              (WebCore::paintMediaSlider):
              (WebCore::paintMediaVolumeSlider):
              (WebCore::paintMediaTimelineContainer):
              * rendering/RenderSVGImage.cpp:
              (WebCore::RenderSVGImage::paint):
              * rendering/RenderSVGResourceClipper.cpp:
              (WebCore::RenderSVGResourceClipper::applyClippingToContext):
              * rendering/RenderSVGResourceFilter.cpp:
              (WebCore::RenderSVGResourceFilter::applyResource):
              (WebCore::RenderSVGResourceFilter::postApplyResource):
              * rendering/RenderSVGResourceGradient.cpp:
              (WebCore::createMaskAndSwapContextForTextGradient):
              * rendering/RenderSVGResourceMasker.cpp:
              (WebCore::RenderSVGResourceMasker::applyResource):
              (WebCore::RenderSVGResourceMasker::drawContentIntoMaskImage):
              * rendering/RenderSVGResourcePattern.cpp:
              (WebCore::RenderSVGResourcePattern::createTileImage):
              * rendering/RenderSVGResourceSolidColor.cpp:
              (WebCore::RenderSVGResourceSolidColor::applyResource):
              * rendering/RenderScrollbarTheme.cpp:
              (WebCore::RenderScrollbarTheme::paintScrollCorner):
              * rendering/RenderThemeMac.mm:
              (WebCore::RenderThemeMac::paintProgressBar):
              (WebCore::RenderThemeMac::paintMenuListButton):
              * rendering/RenderThemeSafari.cpp:
              (WebCore::RenderThemeSafari::paintMenuListButton):
              * rendering/RenderThemeWinCE.cpp:
              (WebCore::RenderThemeWinCE::paintSearchFieldCancelButton):
              (WebCore::RenderThemeWinCE::paintSliderTrack):
              (WebCore::RenderThemeWinCE::paintSliderThumb):
              * rendering/SVGImageBufferTools.cpp:
              (WebCore::SVGImageBufferTools::createImageBuffer):
              * rendering/SVGImageBufferTools.h:
              * rendering/style/StyleRareInheritedData.cpp:
              (WebCore::StyleRareInheritedData::StyleRareInheritedData):
              * svg/SVGFEImageElement.cpp:
              (WebCore::SVGFEImageElement::build):
              * svg/graphics/SVGImage.cpp:
              (WebCore::SVGImage::nativeImageForCurrentFrame):
              * svg/graphics/filters/SVGFEImage.cpp:
              (WebCore::FEImage::apply):
      2010-10-20  Dirk Schulze  <krit@webkit.org>
      
              Reviewed by Nikolas Zimmermann.
      
              Merge ColorSpace and ImageColorSpace enums
              https://bugs.webkit.org/show_bug.cgi?id=47922
      
              Renamed ColorSpace enum entries DeviceColorSpace and sRGBColorSpace to ColorSpaceDeviceRGB and ColorSpaceSRGB
              to follow webkit style rules.
      
              * UIProcess/FindIndicator.cpp:
              (WebKit::FindIndicator::draw):
              * WebProcess/WebPage/FindPageOverlay.cpp:
              (WebKit::FindPageOverlay::drawRect):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@70143 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      2f1d5352
  5. 15 Oct, 2010 1 commit
  6. 06 Oct, 2010 1 commit
    • darin@apple.com's avatar
      2010-10-06 Darin Adler <darin@apple.com> · 33f75299
      darin@apple.com authored
              Reviewed by Alexey Proskuryakov.
      
              Cache CGColor as we do NSColor
              https://bugs.webkit.org/show_bug.cgi?id=47226
      
              This fixes performance problems on certain web pages that use
              multiple colors. Once in the past we were using NSColor. Now that
              we are using CGColor, we need the same sort of caching that we have
              for NSColor.
      
              One example: <http://results.active.com/uploads/html/100759.html>.
      
              * WebCore.xcodeproj/project.pbxproj: Add GraphicsContextCG.h.
      
              * platform/graphics/Color.h: Replace createCGColor with cachedCGColor.
      
              * platform/graphics/cg/ColorCG.cpp:
              (WebCore::cachedCGColorSpace): Added.
              (WebCore::leakCGColor): Added. 
              (WebCore::cachedCGColor): Added.
      
              * platform/graphics/cg/GraphicsContextCG.cpp:
              (WebCore::setCGFillColor): Use cachedCGColor.
              (WebCore::setCGStrokeColor): Ditto.
              (WebCore::GraphicsContext::fillRect): Ditto.
              (WebCore::GraphicsContext::setPlatformShadow): Ditto.
      
              * platform/graphics/cg/GraphicsContextCG.h: Added.
              * platform/graphics/cg/GraphicsContextPlatformPrivateCG.h:
              Moved the color space functions here.
      
              * platform/graphics/cg/ImageCG.cpp: Tweaked headers and formatting.
      
              * platform/graphics/mac/ColorMac.mm: Removed the createCGColor
              function.
      
              * platform/graphics/mac/GraphicsContextMac.mm:
              (WebCore::drawFocusRingToContext): Removed innappropriate use of
              RetainPtr for the arguments to this function.
              (WebCore::GraphicsContext::drawFocusRing): Use cachedCGColor.
      
              * platform/graphics/mac/GraphicsLayerCA.mm:
              (WebCore::setLayerBorderColor): Use cachedCGColor.
              (WebCore::setLayerBackgroundColor): Ditto.
              * platform/graphics/win/GraphicsContextCGWin.cpp:
              (WebCore::GraphicsContext::drawFocusRing): Ditto.
              * platform/graphics/win/GraphicsLayerCACF.cpp:
              (WebCore::setLayerBorderColor): Ditto.
              (WebCore::setLayerBackgroundColor): Ditto.
      
              * platform/graphics/win/WKCACFLayerRenderer.cpp:
              (WebCore::WKCACFLayerRenderer::WKCACFLayerRenderer): Use
              CGColorCreateGenericRGB for color used only for debugging.
              * platform/graphics/win/WebTiledLayer.cpp:
              (WebCore::WebTiledLayer::addTile): Ditto.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@69259 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      33f75299
  7. 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
  8. 26 Jan, 2010 1 commit
    • cfleizach@apple.com's avatar
      Add ability for image maps to be focused via tabbing · bc088903
      cfleizach@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=17513
      
      Reviewed by Darin Adler.
      
      WebCore: 
      
      Test: fast/events/tab-imagemap.html
      
      * accessibility/AXObjectCache.cpp:
      (WebCore::AXObjectCache::focusedImageMapUIElement):
      (WebCore::AXObjectCache::focusedUIElementForPage):
      * accessibility/AXObjectCache.h:
      * accessibility/AccessibilityImageMapLink.h:
      (WebCore::AccessibilityImageMapLink::areaElement):
      (WebCore::AccessibilityImageMapLink::mapElement):
      (WebCore::AccessibilityImageMapLink::isImageMapLink):
      * accessibility/AccessibilityObject.h:
      (WebCore::AccessibilityObject::isImageMapLink):
      * accessibility/AccessibilityRenderObject.cpp:
      (WebCore::AccessibilityRenderObject::accessibilityParentForImageMap):
      * html/HTMLAreaElement.cpp:
      (WebCore::HTMLAreaElement::getPath):
      (WebCore::HTMLAreaElement::getRect):
      (WebCore::HTMLAreaElement::imageElement):
      (WebCore::HTMLAreaElement::isKeyboardFocusable):
      (WebCore::HTMLAreaElement::isFocusable):
      (WebCore::HTMLAreaElement::dispatchBlurEvent):
      (WebCore::HTMLAreaElement::updateFocusAppearance):
      (WebCore::HTMLAreaElement::supportsFocus):
      * html/HTMLAreaElement.h:
      * html/HTMLMapElement.cpp:
      (WebCore::HTMLMapElement::imageElement):
      * html/HTMLMapElement.h:
      * 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::drawFocusRingToContext):
      (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.cpp:
      (WebCore::RenderImage::paint):
      (WebCore::RenderImage::paintFocusRings):
      (WebCore::RenderImage::imageMap):
      * rendering/RenderImage.h:
      * rendering/RenderReplaced.h:
      
      LayoutTests: 
      
      * fast/events/resources/tabindex-focus-blur-all.js:
      (test):
      (testProgrammaticFocus):
      * fast/events/tab-imagemap-expected.txt: Added.
      * fast/events/tab-imagemap.html: Added.
      * fast/events/tabindex-focus-blur-all-expected.txt:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@53857 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      bc088903
  9. 29 Dec, 2009 1 commit
    • mitz@apple.com's avatar
      Move the focus ring rect array, width and offset out of GraphicsContext · 5c02ec60
      mitz@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=33028
      
      Reviewed by Sam Weinig.
      
      * platform/graphics/GraphicsContext.cpp: Removed initFocusRing(),
      clearFocusRing(), focusRingBoundingRect(), addFocusRingRect(),
      focusRingWidth(), focusRingOffset(), and focusRingRects().
      * platform/graphics/GraphicsContext.h: Ditto. Added the focus ring rect
      vector, width and offset as parameters to drawFocusRing().
      * platform/graphics/GraphicsContextPrivate.h:
      (WebCore::GraphicsContextState::GraphicsContextState): Cleaned up style.
      (WebCore::GraphicsContextPrivate::GraphicsContextPrivate): Removed
      m_focusRingRects, m_focusRingWidth and m_focusRingOffset.
      * platform/graphics/IntRect.cpp:
      (WebCore::unionRect): Added this helper function.
      * platform/graphics/IntRect.h:
      * platform/graphics/cairo/GraphicsContextCairo.cpp:
      (WebCore::GraphicsContext::drawFocusRing): 
      * platform/graphics/haiku/GraphicsContextHaiku.cpp:
      (WebCore::GraphicsContext::drawFocusRing): Ditto.
      * platform/graphics/mac/GraphicsContextMac.mm:
      (WebCore::GraphicsContext::drawFocusRing): Ditto.
      * platform/graphics/qt/GraphicsContextQt.cpp:
      (WebCore::GraphicsContext::drawFocusRing): Ditto.
      * platform/graphics/skia/GraphicsContextSkia.cpp:
      (WebCore::GraphicsContext::drawFocusRing): Ditto.
      * platform/graphics/win/GraphicsContextCGWin.cpp:
      (WebCore::GraphicsContext::drawFocusRing): Ditto.
      * platform/graphics/wince/GraphicsContextWince.cpp:
      (WebCore::GraphicsContext::drawFocusRing): Ditto.
      * platform/graphics/wx/GraphicsContextWx.cpp:
      (WebCore::GraphicsContext::drawFocusRing): Ditto.
      * rendering/RenderBlock.cpp:
      (WebCore::RenderBlock::addFocusRingRects): Updated for new prototype.
      Added empty rect checks that were previously done in
      GraphicsContext::addFocusRingRect().
      * rendering/RenderBlock.h:
      * rendering/RenderBox.cpp:
      (WebCore::RenderBox::addFocusRingRects): Ditto.
      * rendering/RenderBox.h:
      * rendering/RenderInline.cpp:
      (WebCore::RenderInline::addFocusRingRects): Ditto.
      (WebCore::RenderInline::paintOutline): Collect focus ring rects into a
      vector and pass it to drawFocusRing(). Use unionRect() instead of
      focusRingBoundingRect().
      * rendering/RenderInline.h:
      * rendering/RenderObject.cpp:
      (WebCore::RenderObject::paintOutline): Ditto.
      * rendering/RenderObject.h:
      (WebCore::RenderObject::addFocusRingRects): Changed to take a
      Vector<IntRect> to which the rects are added.
      * rendering/RenderPath.cpp:
      (WebCore::RenderPath::addFocusRingRects): Updated for new prototype.
      Added empty rect check that was previously done in
      GraphicsContext::addFocusRingRect().
      * rendering/RenderPath.h:
      * rendering/RenderSVGContainer.cpp:
      (WebCore::RenderSVGContainer::addFocusRingRects): Updated for new prototype.
      Added empty rect check that was previously done in
      GraphicsContext::addFocusRingRect().
      * rendering/RenderSVGContainer.h:
      * rendering/RenderSVGImage.cpp:
      (WebCore::RenderSVGImage::addFocusRingRects): Updated for new prototype.
      Added empty rect check that was previously done in
      GraphicsContext::addFocusRingRect().
      * rendering/RenderSVGImage.h:
      * rendering/RenderTextControl.cpp:
      (WebCore::RenderTextControl::addFocusRingRects): Updated for new prototype.
      Added empty rect check that was previously done in
      GraphicsContext::addFocusRingRect().
      * rendering/RenderTextControl.h:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@52632 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      5c02ec60
  10. 20 Aug, 2009 1 commit
    • mitz@apple.com's avatar
      Replace many manually-released CFTypeRefs with RetainPtrs · 46464f35
      mitz@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=28498
      
      Reviewed by Geoffrey Garen.
      
      * platform/graphics/cg/ColorCG.cpp:
      (WebCore::createCGColor):
      * platform/graphics/cg/GradientCG.cpp:
      (WebCore::Gradient::platformGradient):
      * platform/graphics/cg/GraphicsContextCG.cpp:
      (WebCore::GraphicsContext::platformContext):
      (WebCore::GraphicsContext::applyStrokePattern):
      (WebCore::GraphicsContext::applyFillPattern):
      (WebCore::GraphicsContext::setPlatformShadow):
      (WebCore::GraphicsContext::setURLForRect):
      * platform/graphics/cg/GraphicsContextPlatformPrivateCG.h:
      (WebCore::GraphicsContextPlatformPrivate::GraphicsContextPlatformPrivate):
      (WebCore::GraphicsContextPlatformPrivate::~GraphicsContextPlatformPrivate):
      * platform/graphics/cg/ImageBufferCG.cpp:
      (WebCore::ImageBuffer::ImageBuffer):
      * platform/graphics/cg/ImageCG.cpp:
      (WebCore::BitmapImage::checkForSolidColor):
      (WebCore::Image::drawPattern):
      * platform/graphics/cg/ImageSourceCG.cpp:
      (WebCore::ImageSource::setData):
      (WebCore::ImageSource::isSizeAvailable):
      (WebCore::ImageSource::frameSizeAtIndex):
      (WebCore::ImageSource::repetitionCount):
      (WebCore::ImageSource::createFrameAtIndex):
      (WebCore::ImageSource::frameDurationAtIndex):
      * platform/graphics/cg/PDFDocumentImage.cpp:
      (WebCore::PDFDocumentImage::dataChanged):
      * platform/graphics/cg/PathCG.cpp:
      (WebCore::createScratchContext):
      (WebCore::Path::contains):
      * platform/graphics/mac/FontCustomPlatformData.cpp:
      (WebCore::createFontCustomPlatformData):
      * platform/graphics/mac/GraphicsContextMac.mm:
      (WebCore::GraphicsContext::drawFocusRing):
      * platform/graphics/mac/ImageMac.mm:
      (WebCore::BitmapImage::getTIFFRepresentation):
      * platform/mac/ClipboardMac.mm:
      (WebCore::cocoaTypeFromMIMEType):
      (WebCore::MIMETypeFromCocoaType):
      * platform/mac/WebCoreNSStringExtras.mm:
      (stringEncodingForResource):
      * platform/network/mac/FormDataStreamMac.mm:
      (WebCore::advanceCurrentStream):
      (WebCore::setHTTPBody):
      * platform/text/mac/TextCodecMac.cpp:
      (WebCore::TextCodecMac::encode):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@47585 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      46464f35
  11. 07 May, 2009 2 commits
    • levin@chromium.org's avatar
      WebCore: · 4cd24395
      levin@chromium.org authored
      2009-05-07  David Levin  <levin@chromium.org>
      
              Reviewed by NOBODY.
              Suggested by Oliver Hunt.
      
              Rolling back http://trac.webkit.org/changeset/43385
              because we have to use mac artwork for the underline on OSX.
      
              * platform/graphics/cg/GraphicsContextCG.cpp:
              * platform/graphics/mac/GraphicsContextMac.mm:
              (WebCore::createPatternColor):
              (WebCore::GraphicsContext::drawLineForMisspellingOrBadGrammar):
              * platform/graphics/win/GraphicsContextCGWin.cpp:
              (WebCore::setCGStrokeColor):
              (WebCore::spellingPatternColor):
              (WebCore::grammarPatternColor):
              (WebCore::GraphicsContext::drawLineForMisspellingOrBadGrammar):
      
      LayoutTests:
      
      2009-05-07  David Levin  <levin@chromium.org>
      
              Reviewed by NOBODY.
              Suggested by Oliver Hunt.
      
              Rolling back http://trac.webkit.org/changeset/43385
              because we have to use mac artwork for the underline on OSX.
      
              * platform/mac/editing/spelling/inline_spelling_markers-expected.checksum:
              * platform/mac/editing/spelling/inline_spelling_markers-expected.png:
              * platform/mac/editing/spelling/spellcheck-attribute-expected.checksum:
              * platform/mac/editing/spelling/spellcheck-attribute-expected.png:
              * platform/mac/editing/spelling/spelling-expected.checksum:
              * platform/mac/editing/spelling/spelling-expected.png:
              * platform/mac/editing/spelling/spelling-linebreak-expected.checksum:
              * platform/mac/editing/spelling/spelling-linebreak-expected.png:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@43389 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      4cd24395
    • levin@chromium.org's avatar
      WebCore: · 570ffe86
      levin@chromium.org authored
      2009-05-07  John Grabowski  <jrg@chromium.org>
      
              Reviewed by Simon Fraser.
      
              https://bugs.webkit.org/show_bug.cgi?id=25573
              Unify use of CG-common routine for drawLineForMisspellingOrBadGrammar.
              Cleanup for WebKit, but required for Chromium happiness.
      
              * platform/graphics/cg/GraphicsContextCG.cpp:
              (WebCore::spellingPatternColor):
              (WebCore::grammarPatternColor):
              (WebCore::GraphicsContext::drawLineForMisspellingOrBadGrammar):
              * platform/graphics/mac/GraphicsContextMac.mm:
              * platform/graphics/win/GraphicsContextCGWin.cpp:
      
      LayoutTests:
      
      2009-05-07  John Grabowski  <jrg@chromium.org>
      
              Reviewed by Simon Fraser.
      
              https://bugs.webkit.org/show_bug.cgi?id=25573
              Rebaseline of spelling tests for Mac.  Tests pass even without this
              change but checksums don't match.  Non-Mac does not need a new baseline.
      
              * platform/mac/editing/spelling/inline_spelling_markers-expected.checksum:
              * platform/mac/editing/spelling/inline_spelling_markers-expected.png:
              * platform/mac/editing/spelling/spellcheck-attribute-expected.checksum:
              * platform/mac/editing/spelling/spellcheck-attribute-expected.png:
              * platform/mac/editing/spelling/spelling-expected.checksum:
              * platform/mac/editing/spelling/spelling-expected.png:
              * platform/mac/editing/spelling/spelling-linebreak-expected.checksum:
              * platform/mac/editing/spelling/spelling-linebreak-expected.png:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@43385 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      570ffe86
  12. 24 Mar, 2009 1 commit
    • dglazkov@chromium.org's avatar
      2009-03-24 Mark Mentovai <mark@chromium.org> · 6b1b6d94
      dglazkov@chromium.org authored
              Reviewed by Mark Rowe.
      
              https://bugs.webkit.org/show_bug.cgi?id=24653
              WebKit should be buildable without prefix header injection.
              Adds missing #includes and forward declarations as needed.
      
              * editing/SmartReplaceCF.cpp:
              * platform/graphics/mac/ColorMac.mm:
              * platform/graphics/mac/FontCacheMac.mm:
              * platform/graphics/mac/FontCustomPlatformData.h:
              * platform/graphics/mac/FontMac.mm:
              * platform/graphics/mac/FontMacATSUI.mm:
              * platform/graphics/mac/FontPlatformData.h:
              * platform/graphics/mac/FontPlatformDataMac.mm:
              * platform/graphics/mac/GraphicsContextMac.mm:
              * platform/graphics/mac/SimpleFontDataMac.mm:
              * platform/mac/FoundationExtras.h:
              * platform/mac/LocalCurrentGraphicsContext.h:
              * platform/mac/WebCoreSystemInterface.h:
              * platform/mac/WebCoreSystemInterface.mm:
              * platform/mac/WebCoreTextRenderer.h:
              * platform/mac/WebCoreTextRenderer.mm:
              * platform/mac/WebFontCache.h:
              * platform/mac/WebFontCache.mm:
              * platform/text/PlatformString.h:
              * platform/text/mac/ShapeArabic.c:
              * platform/text/mac/StringMac.mm:
              * rendering/RenderThemeChromiumMac.h:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@41939 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      6b1b6d94
  13. 01 Mar, 2009 1 commit
    • levin@chromium.org's avatar
      2009-03-01 Jeremy Moskovich <jeremy@chromium.org> · 0851081f
      levin@chromium.org authored
              Reviewed by Simon Fraser.
      
              https://bugs.webkit.org/show_bug.cgi?id=24197 and
              https://bugs.webkit.org/show_bug.cgi?id=23512
      
              The Windows version of cgColor() is conditionally compiled using
              !PLATFORM(MAC) change this to PLATFORM(WIN_OS) so that Chrome
              can use the OS X version instead of the Windows version.
      
              Also rename cgColor() -> createCGColor()
      
              No observable change in behavior, so no test.
      
              * platform/graphics/Color.h:
              * platform/graphics/cg/ColorCG.cpp:
              (WebCore::createCGColor):
              * platform/graphics/cg/GraphicsContextCG.cpp:
              (WebCore::GraphicsContext::setPlatformShadow):
              * platform/graphics/mac/ColorMac.mm:
              (WebCore::createCGColor):
              * platform/graphics/mac/GraphicsContextMac.mm:
              (WebCore::GraphicsContext::drawFocusRing):
              * platform/graphics/mac/GraphicsLayerCA.mm:
              (WebCore::setLayerBorderColor):
              (WebCore::setLayerBackgroundColor):
              (WebCore::GraphicsLayerCA::setBackgroundColor):
              * platform/graphics/win/GraphicsContextCGWin.cpp:
              (WebCore::GraphicsContext::drawFocusRing):
              * svg/graphics/filters/cg/SVGFEHelpersCg.mm:
              (WebCore::ciColor):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@41345 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      0851081f
  14. 16 Nov, 2008 1 commit
  15. 06 Feb, 2008 1 commit
  16. 19 Dec, 2007 2 commits
    • ggaren@apple.com's avatar
      Reviewed by Sam Weinig, Dan Bernstein. · 900402e4
      ggaren@apple.com authored
              Tiger build fix: restored some graphics code still needed on Tiger.
      
              * platform/graphics/GraphicsTypes.h:
              * platform/graphics/cg/GraphicsContextCG.cpp:
              * platform/graphics/mac/GraphicsContextMac.mm:
              (WebCore::GraphicsContext::setCompositeOperation):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@28877 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      900402e4
    • aboule@apple.com's avatar
      LayoutTests: · 39179728
      aboule@apple.com authored
              Reviewed by Dan Bernstein.
      
              Adding tests for canvas compositing modes to make sure the results don't change after:
              <rdar://problem/5640059> GraphicsContext::setCompositeOperation should use CGContextSetBlendMode
      
              The following compositing modes don't pass however that is covered by another bug:
              source-in
              source-out
              destination-in
              destination-atop
              copy
              <rdar://problem/5651783> Some canvas tag compositing modes don't render correctly
      
              * fast/canvas/canvas-composite.html: Added.
              * platform/mac/fast/canvas/canvas-composite-expected.checksum: Added.
              * platform/mac/fast/canvas/canvas-composite-expected.png: Added.
              * platform/mac/fast/canvas/canvas-composite-expected.txt: Added.
      
      WebCore:
      
              Reviewed by Dan Bernstein.
      
              Test: fast/canvas/canvas-composite.html
      
              Fix for:
              <rdar://problem/5640059> GraphicsContext::setCompositeOperation should use CGContextSetBlendMode
      
              This fix makes setCompositeOperation consistent across all platforms that use CG.
      
              The following compositing modes don't pass however that is covered by another bug:
              source-in
              source-out
              destination-in
              destination-atop
              copy
              <rdar://problem/5651783> Some canvas tag compositing modes don't render correctly
      
              * platform/graphics/GraphicsTypes.h:
              * platform/graphics/cg/GraphicsContextCG.cpp:
              (WebCore::GraphicsContext::setCompositeOperation):
              * platform/graphics/mac/GraphicsContextMac.mm:
              * platform/win/GraphicsContextWin.cpp:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@28874 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      39179728
  17. 07 Dec, 2007 1 commit
    • mitz@apple.com's avatar
      WebCore: · a049d95a
      mitz@apple.com authored
              Reviewed by Darin Adler.
      
              - WebCore part of fixing <rdar://problem/5499918> REGRESSION: insertion point in input field with custom border cuts holes in focus ring interior edges
      
              Test: fast/repaint/focus-ring.html
      
              * editing/SelectionController.cpp:
              (WebCore::SelectionController::caretRepaintRect): Changed to return just
              the caret rect without any padding.
              (WebCore::SelectionController::recomputeCaretRect): Changed to repaint
              just the caret rect without any padding.
              * platform/graphics/GraphicsContext.h: Removed setFocusRingClip() and
              clearFocusRingClip().
              * platform/graphics/cairo/GraphicsContextCairo.cpp: Ditto.
              * platform/graphics/cg/GraphicsContextCG.cpp: Ditto.
              * platform/graphics/cg/GraphicsContextPlatformPrivate.h: Removed
              m_focusRingClip member.
              * platform/graphics/mac/GraphicsContextMac.mm:
              (WebCore::GraphicsContext::drawFocusRing): Changed to call
              wkDrawFocusRing() once without setting up additional clip. On Leopard,
              wkDrawFocusRing() respects the context clip now. On Tiger, a
              transparency layer is used to apply clipping to the focus ring.
              * platform/graphics/qt/GraphicsContextQt.cpp: Removed focus ring clip
              methods and member.
              * platform/graphics/wx/GraphicsContextWx.cpp: Ditto.
              * platform/mac/WebCoreSystemInterface.h: Removed the clipRect argument
              to wkDrawFocusRing().
              * platform/mac/WebCoreSystemInterface.mm: Ditto.
              * rendering/RenderLayer.cpp:
              (WebCore::setClip): Removed call to set the focus ring clip.
              (WebCore::restoreClip): Removed call to reset the focus ring clip.
      
      WebKitLibraries:
      
              Reviewed by Darin Adler.
      
              - updated system interface for fixing <rdar://problem/5499918> REGRESSION: insertion point in input field with custom border cuts holes in focus ring interior edges
      
              * WebKitSystemInterface.h:
              * libWebKitSystemInterfaceLeopard.a:
              * libWebKitSystemInterfaceTiger.a:
      
      LayoutTests:
      
              Reviewed by Darin Adler.
      
              - repaint test for <rdar://problem/5499918> REGRESSION: insertion point in input field with custom border cuts holes in focus ring interior edges
      
              * fast/repaint/focus-ring.html: Added.
              * platform/mac/fast/repaint/focus-ring-expected.checksum: Added.
              * platform/mac/fast/repaint/focus-ring-expected.png: Added.
              * platform/mac/fast/repaint/focus-ring-expected.txt: Added.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@28523 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      a049d95a
  18. 25 Oct, 2007 1 commit
    • hyatt's avatar
      WebCore: · e5f31006
      hyatt authored
              Fix for bug 15672, background images don't tile properly inside transforms.  This patch fixes background
              tiling to work in the presence of transforms and fixes bugs in both SVG and CSS transforms.
      
              Reviewed by aroben and mitz
      
              * WebCore.base.exp:
              * platform/graphics/Image.cpp:
              (WebCore::Image::setData):
              * platform/graphics/cg/ImageCG.cpp:
              (WebCore::ImageInfo::ImageInfo):
              (WebCore::Image::drawPatternCallback):
              (WebCore::Image::drawPattern):
              * platform/graphics/mac/GraphicsContextMac.mm:
              (WebCore::GraphicsContext::drawLineForMisspellingOrBadGrammar):
              * platform/mac/WebCoreSystemInterface.h:
              * platform/mac/WebCoreSystemInterface.mm:
      
      WebKit:
      
              Fix for bug 15672, backgrounds don't tile properly inside transforms.  This patch fixes tiling
              of backgrounds inside CSS transforms and also of HTML content with background images inside SVG
              transforms.
      
              Reviewed by aroben and mmitz
      
              * WebCoreSupport/WebSystemInterface.m:
              (InitWebCoreSystemInterface):
              * WebKit.xcodeproj/project.pbxproj:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@27060 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      e5f31006
  19. 25 Apr, 2007 1 commit
    • ggaren's avatar
      WebCore: · 07a5b4aa
      ggaren authored
              Reviewed by Darin Adler, Tim Hatcher.
      
              Fixed a few NSAutoreleasePool issues I noticed while reviewing Brady's patch.
      
              * platform/graphics/mac/GraphicsContextMac.mm:
              (WebCore::GraphicsContext::setCompositeOperation): Call -drain instead of 
              -release, since -release is a no-op in a GC world.
      
      WebKit:
      
              Reviewed by Darin Adler, Tim Hatcher.
      
              Fixed a few NSAutoreleasePool issues I noticed while reviewing Brady's patch.
      
              * Carbon/CarbonUtils.m:
              (PoolCleaner): Call -drain instead of -release, since -release is a 
              no-op in a GC world.
      
              * Misc/WebKitErrors.m:
              (registerErrors): Condensed onto one line.
      
              * Plugins/WebPluginDatabase.m:
              (-[WebPluginDatabase refresh]): Call -drain instead of -release, since
              -release is a no-op in a GC world.
      
              * WebCoreSupport/WebChromeClient.mm:
              (WebChromeClient::setStatusbarText):
      
              * WebInspector/WebNodeHighlightView.m:
              (-[WebNodeHighlightView initWithHighlight:andRects:forView:]): Don't drain
              and then release because drain deallocates the receiver, so the release
              is an over-release.
      
              * WebView/WebView.mm:
              (-[WebView rectsForTextMatches]): Re-allocate the pool after draining it,
              because drain deallocates the receiver, so the drain would leave you without
              any autorelease pool, causing a leak and then an over-release at the bottom
              of the loop.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@21091 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      07a5b4aa
  20. 12 Apr, 2007 1 commit
    • oliver's avatar
      2007-04-11 Oliver Hunt <oliver@apple.com> · 1c8776d9
      oliver authored
              Reviewed by Maciej.
      
      WebCore:
              Adding RetainPtr to the many global obj-c pointers we use in
              C/C++ methods.  This is necessary to prevent GC from collecting
              globals we want to keep around.
      
              We use RetainPtr in obj-c++ and c++ files, and CFRetain/Release in pure
              obj-c.
      
              Also made the Pasteboard::m_pasteboard a RetainPtr although it
              shouldn't be necessary as the only NSPasteboard instances that 
              should ever be inserted are the system clipboard and dragging 
              pasteboard.  Neither of which should ever be collected.
      
              * page/mac/WebCoreFrameBridge.mm:
              (_getPreSmartSet):
              (_getPostSmartSet):
              * platform/Pasteboard.h:
              * platform/graphics/mac/ColorMac.mm:
              (WebCore::nsColor):
              * platform/graphics/mac/GraphicsContextMac.mm:
              (WebCore::GraphicsContext::drawLineForMisspellingOrBadGrammar):
              * platform/mac/FontDataMac.mm:
              (WebCore::webFallbackFontFamily):
              * platform/mac/PasteboardMac.mm:
              (WebCore::writableTypesForURL):
              (WebCore::writableTypesForImage):
              (WebCore::Pasteboard::clear):
              (WebCore::Pasteboard::writeSelection):
              (WebCore::Pasteboard::writeURL):
              (WebCore::Pasteboard::writeFileWrapperAsRTFDAttachment):
              (WebCore::Pasteboard::writeImage):
              (WebCore::Pasteboard::canSmartReplace):
              (WebCore::Pasteboard::plainText):
              (WebCore::Pasteboard::documentFragment):
      
      WebKit:
              Adding RetainPtr to the many global obj-c pointers we use in
              C/C++ methods.  This is necessary to prevent GC from collecting
              globals we want to keep around.
      
              We use RetainPtr in obj-c++ and c++ files, and CFRetain/Release in pure
              obj-c.
      
              This fixes <rdar://problem/5058731> -- Crash in 
              WebCore::DragData::containsCompatibleContent due to early release 
              of types array
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@20858 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      1c8776d9
  21. 19 Dec, 2006 1 commit
    • zimmermann's avatar
      Reviewed by Sam. Previous attempts reviewed by Oliver & Eric. · f10700ae
      zimmermann authored
      Fixes: http://bugs.webkit.org/show_bug.cgi?id=11867
      
      Bring back masking, by adding off-screen rendering functionality in GraphicsContext.
      Add new "static GraphicsContext* createImageContext(const IntSize& size, bool grayScale)"
      function, and implement it with CGBitmapContext in the GraphicsContextCG (stubs for Qt.)
      
      Mask image sizes are dynamically calculated using the passed bounding box in applyMask,
      as it was orignally planned. Gradient stroke mask image sizes aren't hardcoded to 2048x2048
      anymore, but are as well dynamically calculated using getAbsoluteRepaintRect().
      
      Add new ImageBuffer class encapsulating the size of the image, a platform-specific
      handle (ie. CGImageRef for CG platform) plus the GraphicsContext pointer, obtained
      via GraphicsContext::createImageBuffer. Offer a generic logic for rendering subtrees
      of the rendering tree into a ImageBuffer (see renderSubtreeToImage function)
      ImageBufferCG is completly implemented, ImageBufferQt is stubbed.
      
      Also add correct default values for x/y/width/height of <mask>.
      Fixes masking related LayoutTests, and speeds up gradient-on-stroke a lot.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@18315 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      f10700ae
  22. 03 Dec, 2006 2 commits
  23. 30 Nov, 2006 1 commit
    • zimmermann's avatar
      Reviewed by Eric. Rubber stamped by Oliver. · b67995fc
      zimmermann authored
      Fixes: http://bugs.webkit.org/show_bug.cgi?id=10383
      
      This is the final patch after the long "die kcanvas" journey.
      
      All old kcanvas code is gone now, and properly integrated within
      WebCore (stuff like GraphicsContext changes etc.). It shares
      the platform/ design concept: no subclassing, but instead
      implementing parts of the classes/methods per-platform.
      
      This commit removes the last pieces: KRenderingDevice & KRenderingDeviceContext.
      This layer was just obsolete, given the powerful GraphicsContext API we have
      since quite a while now. All the ugly pushContext/popContext stuff is gone now.
      
      The naming issues Cg vs. CG will be fixed in one shot, when moving the whole
      platform/graphics/svg directory down into ksvg2/graphics - as discussed with Darin.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@17947 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      b67995fc
  24. 11 Nov, 2006 1 commit
    • ap's avatar
      2006-11-11 Nikolas Zimmermann <zimmermann@kde.org> · 08a5a1ee
      ap authored
              Reviewed by aroben and ap, landed by ap.
      
              Fixes: http://bugs.webkit.org/show_bug.cgi?id=11468
      
              Group graphics related files in platform/graphics.
              Move certain files from certain subdirectories
              into platform/graphics/{win,mac,cg,gdk,qt}
      
              * CMakeLists.txt:
              * WebCore.xcodeproj/project.pbxproj:
              * platform/AffineTransform.cpp: Removed.
              * platform/AffineTransform.h: Removed.
              * platform/Color.cpp: Removed.
              * platform/Color.h: Removed.
              * platform/FloatPoint.cpp: Removed.
              * platform/FloatPoint.h: Removed.
              * platform/FloatRect.cpp: Removed.
              * platform/FloatRect.h: Removed.
              * platform/FloatSize.cpp: Removed.
              * platform/FloatSize.h: Removed.
              * platform/Icon.h: Removed.
              * platform/Image.cpp: Removed.
              * platform/Image.h: Removed.
              * platform/ImageSource.h: Removed.
              * platform/IntPoint.h: Removed.
              * platform/IntRect.cpp: Removed.
              * platform/IntRect.h: Removed.
              * platform/IntSize.h: Removed.
              * platform/IntSizeHash.h: Removed.
              * platform/Path.cpp: Removed.
              * platform/Path.h: Removed.
              * platform/Pen.cpp: Removed.
              * platform/Pen.h: Removed.
              * platform/cairo/AffineTransformCairo.cpp: Removed.
              * platform/cairo/GraphicsContextCairo.cpp: Removed.
              * platform/cairo/ImageCairo.cpp: Removed.
              * platform/cairo/ImageSourceCairo.cpp: Removed.
              * platform/cairo/cairo/AUTHORS: Removed.
              * platform/cairo/cairo/COPYING: Removed.
              * platform/cairo/cairo/COPYING-LGPL-2.1: Removed.
              * platform/cairo/cairo/COPYING-MPL-1.1: Removed.
              * platform/cairo/cairo/INSTALL: Removed.
              * platform/cairo/cairo/NEWS: Removed.
              * platform/cairo/cairo/README: Removed.
              * platform/cairo/cairo/TODO: Removed.
              * platform/cairo/cairo/src/Makefile.in: Removed.
              * platform/cairo/cairo/src/cairo-arc-private.h: Removed.
              * platform/cairo/cairo/src/cairo-arc.c: Removed.
              * platform/cairo/cairo/src/cairo-array.c: Removed.
              * platform/cairo/cairo/src/cairo-atsui-font.c: Removed.
              * platform/cairo/cairo/src/cairo-atsui.h: Removed.
              * platform/cairo/cairo/src/cairo-beos-surface.cpp: Removed.
              * platform/cairo/cairo/src/cairo-beos.h: Removed.
              * platform/cairo/cairo/src/cairo-cache-private.h: Removed.
              * platform/cairo/cairo/src/cairo-cache.c: Removed.
              * platform/cairo/cairo/src/cairo-clip-private.h: Removed.
              * platform/cairo/cairo/src/cairo-clip.c: Removed.
              * platform/cairo/cairo/src/cairo-color.c: Removed.
              * platform/cairo/cairo/src/cairo-debug.c: Removed.
              * platform/cairo/cairo/src/cairo-debug.h: Removed.
              * platform/cairo/cairo/src/cairo-directfb-surface.c: Removed.
              * platform/cairo/cairo/src/cairo-directfb.h: Removed.
              * platform/cairo/cairo/src/cairo-features.h: Removed.
              * platform/cairo/cairo/src/cairo-features.h.in: Removed.
              * platform/cairo/cairo/src/cairo-fixed.c: Removed.
              * platform/cairo/cairo/src/cairo-font-options.c: Removed.
              * platform/cairo/cairo/src/cairo-font-subset-private.h: Removed.
              * platform/cairo/cairo/src/cairo-font-subset.c: Removed.
              * platform/cairo/cairo/src/cairo-font.c: Removed.
              * platform/cairo/cairo/src/cairo-ft-font.c: Removed.
              * platform/cairo/cairo/src/cairo-ft-private.h: Removed.
              * platform/cairo/cairo/src/cairo-ft.h: Removed.
              * platform/cairo/cairo/src/cairo-glitz-surface.c: Removed.
              * platform/cairo/cairo/src/cairo-glitz.h: Removed.
              * platform/cairo/cairo/src/cairo-gstate-private.h: Removed.
              * platform/cairo/cairo/src/cairo-gstate.c: Removed.
              * platform/cairo/cairo/src/cairo-hash-private.h: Removed.
              * platform/cairo/cairo/src/cairo-hash.c: Removed.
              * platform/cairo/cairo/src/cairo-hull.c: Removed.
              * platform/cairo/cairo/src/cairo-image-surface.c: Removed.
              * platform/cairo/cairo/src/cairo-matrix.c: Removed.
              * platform/cairo/cairo/src/cairo-meta-surface-private.h: Removed.
              * platform/cairo/cairo/src/cairo-meta-surface.c: Removed.
              * platform/cairo/cairo/src/cairo-output-stream.c: Removed.
              * platform/cairo/cairo/src/cairo-paginated-surface-private.h: Removed.
              * platform/cairo/cairo/src/cairo-paginated-surface.c: Removed.
              * platform/cairo/cairo/src/cairo-path-bounds.c: Removed.
              * platform/cairo/cairo/src/cairo-path-data-private.h: Removed.
              * platform/cairo/cairo/src/cairo-path-data.c: Removed.
              * platform/cairo/cairo/src/cairo-path-fill.c: Removed.
              * platform/cairo/cairo/src/cairo-path-fixed-private.h: Removed.
              * platform/cairo/cairo/src/cairo-path-stroke.c: Removed.
              * platform/cairo/cairo/src/cairo-path.c: Removed.
              * platform/cairo/cairo/src/cairo-pattern.c: Removed.
              * platform/cairo/cairo/src/cairo-pdf-surface.c: Removed.
              * platform/cairo/cairo/src/cairo-pdf.h: Removed.
              * platform/cairo/cairo/src/cairo-pen.c: Removed.
              * platform/cairo/cairo/src/cairo-platform.h: Removed.
              * platform/cairo/cairo/src/cairo-png.c: Removed.
              * platform/cairo/cairo/src/cairo-polygon.c: Removed.
              * platform/cairo/cairo/src/cairo-private.h: Removed.
              * platform/cairo/cairo/src/cairo-ps-surface.c: Removed.
              * platform/cairo/cairo/src/cairo-ps.h: Removed.
              * platform/cairo/cairo/src/cairo-quartz-private.h: Removed.
              * platform/cairo/cairo/src/cairo-quartz-surface.c: Removed.
              * platform/cairo/cairo/src/cairo-quartz.h: Removed.
              * platform/cairo/cairo/src/cairo-quartz2-surface.c: Removed.
              * platform/cairo/cairo/src/cairo-quartz2.h: Removed.
              * platform/cairo/cairo/src/cairo-region.c: Removed.
              * platform/cairo/cairo/src/cairo-scaled-font.c: Removed.
              * platform/cairo/cairo/src/cairo-slope.c: Removed.
              * platform/cairo/cairo/src/cairo-spline.c: Removed.
              * platform/cairo/cairo/src/cairo-stroke-style.c: Removed.
              * platform/cairo/cairo/src/cairo-surface-fallback-private.h: Removed.
              * platform/cairo/cairo/src/cairo-surface-fallback.c: Removed.
              * platform/cairo/cairo/src/cairo-surface.c: Removed.
              * platform/cairo/cairo/src/cairo-svg-surface.c: Removed.
              * platform/cairo/cairo/src/cairo-svg.h: Removed.
              * platform/cairo/cairo/src/cairo-traps.c: Removed.
              * platform/cairo/cairo/src/cairo-unicode.c: Removed.
              * platform/cairo/cairo/src/cairo-wideint.c: Removed.
              * platform/cairo/cairo/src/cairo-wideint.h: Removed.
              * platform/cairo/cairo/src/cairo-win32-font.c: Removed.
              * platform/cairo/cairo/src/cairo-win32-private.h: Removed.
              * platform/cairo/cairo/src/cairo-win32-surface.c: Removed.
              * platform/cairo/cairo/src/cairo-win32.h: Removed.
              * platform/cairo/cairo/src/cairo-xcb-surface.c: Removed.
              * platform/cairo/cairo/src/cairo-xcb-xrender.h: Removed.
              * platform/cairo/cairo/src/cairo-xcb.h: Removed.
              * platform/cairo/cairo/src/cairo-xlib-private.h: Removed.
              * platform/cairo/cairo/src/cairo-xlib-screen.c: Removed.
              * platform/cairo/cairo/src/cairo-xlib-surface.c: Removed.
              * platform/cairo/cairo/src/cairo-xlib-test.h: Removed.
              * platform/cairo/cairo/src/cairo-xlib-xrender.h: Removed.
              * platform/cairo/cairo/src/cairo-xlib.h: Removed.
              * platform/cairo/cairo/src/cairo.c: Removed.
              * platform/cairo/cairo/src/cairo.h: Removed.
              * platform/cairo/cairo/src/cairoint.h: Removed.
              * platform/cairo/cairo/src/test-fallback-surface.c: Removed.
              * platform/cairo/cairo/src/test-fallback-surface.h: Removed.
              * platform/cairo/cairo/src/test-meta-surface.c: Removed.
              * platform/cairo/cairo/src/test-meta-surface.h: Removed.
              * platform/cairo/cairo/src/test-paginated-surface.c: Removed.
              * platform/cairo/cairo/src/test-paginated-surface.h: Removed.
              * platform/cairo/pixman/AUTHORS: Removed.
              * platform/cairo/pixman/COPYING: Removed.
              * platform/cairo/pixman/README: Removed.
              * platform/cairo/pixman/src/Makefile.in: Removed.
              * platform/cairo/pixman/src/fbcompose.c: Removed.
              * platform/cairo/pixman/src/fbedge.c: Removed.
              * platform/cairo/pixman/src/fbedgeimp.h: Removed.
              * platform/cairo/pixman/src/fbmmx.c: Removed.
              * platform/cairo/pixman/src/fbmmx.h: Removed.
              * platform/cairo/pixman/src/fbpict.c: Removed.
              * platform/cairo/pixman/src/fbpict.h: Removed.
              * platform/cairo/pixman/src/fbtrap.c: Removed.
              * platform/cairo/pixman/src/icblt.c: Removed.
              * platform/cairo/pixman/src/icbltone.c: Removed.
              * platform/cairo/pixman/src/iccolor.c: Removed.
              * platform/cairo/pixman/src/icformat.c: Removed.
              * platform/cairo/pixman/src/icimage.c: Removed.
              * platform/cairo/pixman/src/icimage.h: Removed.
              * platform/cairo/pixman/src/icint.h: Removed.
              * platform/cairo/pixman/src/icpixels.c: Removed.
              * platform/cairo/pixman/src/icrect.c: Removed.
              * platform/cairo/pixman/src/icrop.h: Removed.
              * platform/cairo/pixman/src/icstipple.c: Removed.
              * platform/cairo/pixman/src/ictransform.c: Removed.
              * platform/cairo/pixman/src/ictrap.c: Removed.
              * platform/cairo/pixman/src/ictri.c: Removed.
              * platform/cairo/pixman/src/icutil.c: Removed.
              * platform/cairo/pixman/src/pixman-remap.h: Removed.
              * platform/cairo/pixman/src/pixman-xserver-compat.h: Removed.
              * platform/cairo/pixman/src/pixman.h: Removed.
              * platform/cairo/pixman/src/pixregion.c: Removed.
              * platform/cairo/pixman/src/pixregionint.h: Removed.
              * platform/cairo/pixman/src/renderedge.c: Removed.
              * platform/cairo/pixman/src/renderedge.h: Removed.
              * platform/cairo/pixman/src/slim_internal.h: Removed.
              * platform/cairo/rgb24-hacks.txt: Removed.
              * platform/cairo/scale-removal.txt: Removed.
              * platform/cg/AffineTransformCG.cpp: Removed.
              * platform/cg/FloatPointCG.cpp: Removed.
              * platform/cg/FloatRectCG.cpp: Removed.
              * platform/cg/FloatSizeCG.cpp: Removed.
              * platform/cg/GraphicsContextCG.cpp: Removed.
              * platform/cg/GraphicsContextPlatformPrivate.h: Removed.
              * platform/cg/ImageCG.cpp: Removed.
              * platform/cg/ImageSourceCG.cpp: Removed.
              * platform/cg/IntPointCG.cpp: Removed.
              * platform/cg/IntRectCG.cpp: Removed.
              * platform/cg/IntSizeCG.cpp: Removed.
              * platform/cg/PDFDocumentImage.cpp: Removed.
              * platform/cg/PDFDocumentImage.h: Removed.
              * platform/cg/PathCG.cpp: Removed.
              * platform/gdk/ImageGdk.cpp: Removed.
              * platform/mac/ColorMac.mm: Removed.
              * platform/mac/FloatPointMac.mm: Removed.
              * platform/mac/FloatRectMac.mm: Removed.
              * platform/mac/FloatSizeMac.mm: Removed.
              * platform/mac/GraphicsContextMac.mm:
              * platform/mac/IconMac.mm: Removed.
              * platform/mac/ImageMac.mm: Removed.
              * platform/mac/IntPointMac.mm: Removed.
              * platform/mac/IntRectMac.mm: Removed.
              * platform/mac/IntSizeMac.mm: Removed.
              * platform/qt/AffineTransformQt.cpp: Removed.
              * platform/qt/ColorQt.cpp: Removed.
              * platform/qt/FloatPointQt.cpp: Removed.
              * platform/qt/FloatRectQt.cpp: Removed.
              * platform/qt/IconQt.cpp: Removed.
              * platform/qt/ImageQt.cpp: Removed.
              * platform/qt/ImageSourceQt.cpp: Removed.
              * platform/qt/IntPointQt.cpp: Removed.
              * platform/qt/IntRectQt.cpp: Removed.
              * platform/qt/IntSizeQt.cpp: Removed.
              * platform/qt/PathQt.cpp: Removed.
              * platform/win/ImageWin.cpp: Removed.
              * platform/win/IntPointWin.cpp: Removed.
              * platform/win/IntRectWin.cpp: Removed.
              * platform/win/IntSizeWin.cpp: Removed.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@17727 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      08a5a1ee
  25. 26 Oct, 2006 1 commit
    • sullivan's avatar
      Reviewed by Darin · 88373cb7
      sullivan authored
              
              More plumbing for grammar checking. Still no grammars is checked.
      
              * dom/DocumentMarker.h:
              (WebCore::DocumentMarker::):
              added Grammar to enum of marker types; removed explicit enum values; removed unnecessary "enum"
              
              * platform/GraphicsContext.h:
              renamed method drawLineForMisspelling to drawLineForMisspellingOrBadGrammar;
              now takes a bool parameter for whether it represents bad grammar or a misspelling 
              
              * platform/mac/GraphicsContextMac.mm:
              (WebCore::GraphicsContext::drawLineForMisspellingOrBadGrammar):
              Renamed from drawLineForMisspelling; uses green dot instead of red dot for grammar case. Changed
              an existing "assert" to "ASSERT".
              
              * rendering/InlineTextBox.h:
              renamed function paintSpellingMarker to paintSpellingOrGrammarMarker;
      
              * rendering/InlineTextBox.cpp:
              (WebCore::InlineTextBox::paintSpellingOrGrammarMarker):
              Renamed from paintSpellingMarker; now takes a bool parameter for whether it represents
              bad grammar or a misspelling
              (WebCore::InlineTextBox::paintAllMarkersOfType):
              now handles markers of type Grammar
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@17345 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      88373cb7
  26. 10 Sep, 2006 1 commit
    • eseidel's avatar
      2006-09-10 Eric Seidel <eric@eseidel.com> · c64d603f
      eseidel authored
              Reviewed by darin.
              
              Remove a bunch more NSGraphicsContext related code.
              Add a LocalCurrentGraphicsContext to simplify methods which need to call up into AppKit controls (and thus depend on the [NSGraphicsContext currentContext] being set correctly)
              Add an "isPrinting" flag to many of the text drawing functions in order to avoid the need for a GraphicsContext::isPrinting() function.
      
              No tests were harmed in the making of this patch.
      
              * bridge/mac/WebCoreFrameBridge.mm:
              (-[WebCoreFrameBridge drawRect:]):
              * kcanvas/device/quartz/KRenderingDeviceQuartz.h:
              (WebCore::KRenderingDeviceContextQuartz::cgContext):
              (WebCore::KRenderingDeviceQuartz::isBuffered):
              * kcanvas/device/quartz/KRenderingDeviceQuartz.mm:
              (WebCore::KRenderingDeviceContextQuartz::KRenderingDeviceContextQuartz):
              (WebCore::KRenderingDeviceContextQuartz::~KRenderingDeviceContextQuartz):
              * kcanvas/device/quartz/QuartzSupport.mm:
              * platform/Font.cpp:
              (WebCore::Font::drawSimpleText):
              (WebCore::Font::drawText):
              * platform/Font.h:
              * platform/GraphicsContext.cpp:
              (WebCore::GraphicsContext::drawText):
              * platform/GraphicsContext.h:
              * platform/mac/FileButtonMac.mm:
              (-[WebFileChooserButton drawRect:]):
              * platform/mac/FontMac.mm:
              (WebCore::ATSULayoutParameters::ATSULayoutParameters):
              (WebCore::ATSULayoutParameters::initialize):
              (WebCore::Font::drawComplexText):
              (WebCore::Font::drawGlyphs):
              * platform/mac/GraphicsContextMac.mm:
              (WebCore::GraphicsContext::drawLineForMisspelling):
              * platform/mac/ListBoxMac.mm:
              (-[WebCoreTableView drawRow:clipRect:]):
              * platform/mac/WebCoreTextRenderer.mm:
              (WebCoreDrawTextAtPoint):
              * rendering/EllipsisBox.cpp:
              (WebCore::EllipsisBox::paint):
              * rendering/InlineTextBox.cpp:
              (WebCore::InlineTextBox::paint):
              * rendering/RenderImage.cpp:
              (WebCore::RenderImage::paint):
              * rendering/RenderListMarker.cpp:
              (WebCore::RenderListMarker::paint):
              * rendering/RenderThemeMac.mm:
              (WebCore::WebCoreNSGraphicsContextBridge::WebCoreNSGraphicsContextBridge):
              (WebCore::WebCoreNSGraphicsContextBridge::~WebCoreNSGraphicsContextBridge):
              (WebCore::RenderThemeMac::paintButton):
              (WebCore::RenderThemeMac::paintTextField):
              (WebCore::RenderThemeMac::paintTextArea):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@16286 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      c64d603f
  27. 23 Aug, 2006 1 commit
    • hyatt's avatar
      Refactor Cairo and CoreGraphics to use platform ifdefs. This patch · 7d8d9656
      hyatt authored
              separates the graphics engines from their respective platforms and replaces
              #ifdef PLATFORM(MAC) and PLATFORM(WIN) with PLATFORM(CG) and PLATFORM(CAIRO).
      
              Reviewed by darin
      
              * WebCore.xcodeproj/project.pbxproj:
              * platform/AffineTransform.h:
              * platform/Color.h:
              * platform/Cursor.h:
              * platform/FloatPoint.h:
              * platform/FloatRect.h:
              * platform/FloatSize.h:
              * platform/Font.h:
              * platform/FontData.h:
              * platform/GlyphBuffer.h:
              (WebCore::GlyphBuffer::glyphAt):
              (WebCore::GlyphBuffer::advanceAt):
              (WebCore::GlyphBuffer::add):
              * platform/GraphicsContext.h:
              * platform/Image.h:
              * platform/ImageSource.h:
              * platform/IntPoint.h:
              * platform/IntRect.h:
              * platform/IntSize.h:
              * platform/ResourceLoader.h:
              * platform/ResourceLoaderClient.h:
              * platform/Widget.h:
              * platform/cairo/GraphicsContextCairo.cpp:
              * platform/cairo/ImageCairo.cpp:
              * platform/cairo/ImageSourceCairo.cpp:
              * platform/cg/AffineTransformCG.cpp:
              * platform/cg/FloatPointCG.cpp: Added.
              * platform/cg/FloatRectCG.cpp: Added.
              * platform/cg/FloatSizeCG.cpp: Added.
              * platform/cg/GraphicsContextCG.cpp:
              (WebCore::GraphicsContext::GraphicsContext):
              (WebCore::GraphicsContext::~GraphicsContext):
              (WebCore::GraphicsContext::setFocusRingClip):
              (WebCore::GraphicsContext::clearFocusRingClip):
              (WebCore::GraphicsContext::platformContext):
              (WebCore::GraphicsContext::drawRect):
              (WebCore::GraphicsContext::drawLine):
              * platform/cg/GraphicsContextPlatformPrivate.h: Added.
              (WebCore::GraphicsContextPlatformPrivate:::m_cgContext):
              (WebCore::GraphicsContextPlatformPrivate::~GraphicsContextPlatformPrivate):
              * platform/cg/ImageCG.cpp: Added.
              (WebCore::Image::drawTiled):
              * platform/cg/ImageSourceCG.cpp: Added.
              * platform/cg/IntPointCG.cpp: Added.
              * platform/cg/IntRectCG.cpp: Added.
              * platform/cg/IntSizeCG.cpp: Added.
              * platform/cg/PDFDocumentImage.cpp: Added.
              (WebCore::PDFDocumentImage::adjustCTM):
              * platform/cg/PDFDocumentImage.h: Added.
              * platform/cg/PathCG.cpp:
              * platform/image-decoders/bmp/BMPImageDecoder.cpp:
              * platform/image-decoders/gif/GIFImageDecoder.cpp:
              * platform/image-decoders/gif/GIFImageReader.cpp:
              * platform/image-decoders/ico/ICOImageDecoder.cpp:
              * platform/image-decoders/jpeg/JPEGImageDecoder.cpp:
              * platform/image-decoders/png/PNGImageDecoder.cpp:
              * platform/image-decoders/xbm/XBMImageDecoder.cpp:
              * platform/mac/FloatPointMac.mm:
              * platform/mac/FloatRectMac.mm:
              * platform/mac/FloatSizeMac.mm:
              * platform/mac/GraphicsContextMac.mm:
              * platform/mac/ImageMac.mm:
              * platform/mac/ImageSourceMac.cpp: Removed.
              * platform/mac/IntPointMac.mm:
              * platform/mac/IntRectMac.mm:
              * platform/mac/IntSizeMac.mm:
              * platform/mac/PDFDocumentImage.h: Removed.
              * platform/mac/PDFDocumentImage.mm: Removed.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@15999 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      7d8d9656
  28. 03 Aug, 2006 1 commit
    • weinig's avatar
      JavaScriptCore: · f18aae37
      weinig authored
              Reviewed by Darin.
      
              - patch for http://bugzilla.opendarwin.org/show_bug.cgi?id=10176
                Make WebCore compile with -Wundef
      
                * Adds -Wundef flag to Xcode project
                * Converts #ifs to #ifdef and #ifndefs where needed.
                * Added #define YYMAXDEPTH 10000 in kjs/grammar.y
                  to fix a warning from within Bison.
      
              * JavaScriptCore.xcodeproj/project.pbxproj:
              * bindings/jni/jni_jsobject.cpp:
              (JavaJSObject::getSlot):
              (JavaJSObject::setSlot):
              * bindings/npapi.h:
              * bindings/objc/objc_class.mm:
              (KJS::Bindings::ObjcClass::methodsNamed):
              (KJS::Bindings::ObjcClass::fieldNamed):
              * bindings/objc/objc_instance.mm:
              (ObjcInstance::invokeMethod):
              * bindings/objc/objc_runtime.mm:
              (ObjcMethod::getMethodSignature):
              (ObjcField::name):
              (ObjcField::type):
              * kjs/grammar.y:
              * kjs/identifier.h:
      
      JavaScriptGlue:
      
              Reviewed by Darin.
      
              - patch for http://bugzilla.opendarwin.org/show_bug.cgi?id=10176
                Make WebCore compile with -Wundef
      
                * Adds -Wundef flag to Xcode project
      
              * JavaScriptGlue.xcodeproj/project.pbxproj:
      
      WebCore:
      
              Reviewed by Darin.
      
              - patch for http://bugzilla.opendarwin.org/show_bug.cgi?id=10176
                Make WebCore compile with -Wundef
      
                * Adds -Wundef flag to Xcode project
                * Converts #ifs to #ifdef and #ifndefs where needed.
                * Replaces #ifdef WIN32 with #if PLATFORM(WIN_OS) or PLATFORM(WIN)
                  (and in one instance in config.h with #if !COMPILER(MSVC))
                * Added #define YYMAXDEPTH 10000 in XPathGrammar.y and CSSGrammar.y
                  to fix a warning from within Bison.
                * Cleaned up style a little in surrounding code.
      
              * WebCore.xcodeproj/project.pbxproj:
              * bridge/mac/WebCoreAXObject.mm:
              (-[WebCoreAXObject doAXTextMarkerRangeForUnorderedTextMarkers:]):
              * config.h:
              * css/CSSGrammar.y:
              * css/MediaFeatureNames.cpp:
              * css/MediaFeatureNames.h:
              * css/cssparser.cpp:
              * dom/ContainerNode.cpp:
              (WebCore::ContainerNode::setActive):
              * dom/Element.cpp:
              (WebCore::Element::attach):
              * dom/Element.h:
              * dom/EventNames.cpp:
              * dom/EventNames.h:
              * dom/NamedAttrMap.h:
              * dom/Position.cpp:
              * dom/QualifiedName.cpp:
              * dom/QualifiedName.h:
              * dom/Range.h:
              * dom/XMLTokenizer.cpp:
              (WebCore::XMLTokenizer::error):
              * html/HTMLTokenizer.cpp:
              (WebCore::HTMLTokenizer::scriptHandler):
              (WebCore::HTMLTokenizer::scriptExecution):
              (WebCore::HTMLTokenizer::parseTag):
              (WebCore::HTMLTokenizer::continueProcessing):
              (WebCore::HTMLTokenizer::write):
              (WebCore::HTMLTokenizer::timerFired):
              (WebCore::HTMLTokenizer::notifyFinished):
              * kcanvas/device/quartz/KCanvasFilterQuartz.h:
              * kcanvas/device/quartz/KRenderingDeviceQuartz.h:
              * ksvg2/css/SVGRenderStyle.h:
              * ksvg2/css/SVGRenderStyleDefs.h:
              * ksvg2/scripts/make_names.pl:
              * loader/CachedResource.h:
              * loader/LoaderFunctions.h:
              * loader/loader.h:
              * page/Frame.cpp:
              * page/FrameTree.cpp:
              * page/FrameView.cpp:
              (WebCore::FrameView::clear):
              (WebCore::FrameView::layout):
              (WebCore::FrameView::layoutTimerFired):
              (WebCore::FrameView::scheduleRelayout):
              (WebCore::FrameView::unscheduleRelayout):
              * platform/AtomicString.cpp:
              * platform/AtomicString.h:
              * platform/Cursor.h:
              * platform/DeprecatedArray.h:
              * platform/DeprecatedString.cpp:
              (WebCore::allocateHandle):
              (WebCore::initializeHandleNodeBlock):
              (WebCore::freeHandle):
              * platform/FloatPoint.h:
              * platform/FloatRect.h:
              * platform/FloatSize.h:
              * platform/GraphicsContext.h:
              * platform/Image.h:
              * platform/IntPoint.h:
              * platform/IntRect.h:
              (WebCore::IntRect::inflateX):
              (WebCore::IntRect::inflateY):
              * platform/IntSize.h:
              * platform/PlatformKeyboardEvent.h:
              * platform/PlatformMouseEvent.h:
              * platform/PlatformString.h:
              * platform/ResourceLoader.h:
              * platform/ResourceLoaderInternal.h:
              (WebCore::ResourceLoaderInternal::ResourceLoaderInternal):
              * platform/ScrollView.h:
              * platform/StaticConstructors.h:
              * platform/StreamingTextDecoderICU.cpp:
              (WebCore::StreamingTextDecoderICU::convert):
              * platform/StringImpl.h:
              * platform/Widget.h:
              * platform/mac/BlockExceptions.mm:
              * platform/mac/ColorMac.mm:
              (+[WebCoreControlTintObserver WebCore]):
              * platform/mac/FloatPointMac.mm:
              * platform/mac/FloatRectMac.mm:
              * platform/mac/FloatSizeMac.mm:
              * platform/mac/FontMac.mm:
              * platform/mac/GraphicsContextMac.mm:
              (WebCore::GraphicsContext::drawFocusRing):
              * platform/mac/IntPointMac.mm:
              * platform/mac/IntRectMac.mm:
              * platform/mac/IntSizeMac.mm:
              * platform/mac/WebCoreSystemInterface.h:
              * rendering/RenderBlock.h:
              * rendering/RenderTableCell.h:
              * rendering/bidi.cpp:
              (WebCore::appendRun):
              (WebCore::RenderBlock::layoutInlineChildren):
              * xml/XSLTProcessor.cpp:
              (WebCore::parseErrorFunc):
              * xpath/impl/XPathGrammar.y:
      
      WebKit:
      
              Reviewed by Darin.
      
              - patch for http://bugzilla.opendarwin.org/show_bug.cgi?id=10176
                Make WebCore compile with -Wundef
      
                * Adds -Wundef flag to Xcode project
                * Converts #ifs to #ifdef and #ifndefs where needed.
      
              * Carbon/CarbonUtils.m:
              * Carbon/CarbonWindowAdapter.m:
              * Carbon/HIViewAdapter.m:
              (+[NSView bindHIViewToNSView:nsView:]):
              * Carbon/HIWebView.m:
              (HIWebViewEventHandler):
              * Misc/WebFileDatabase.m:
              (UniqueFilePathForKey):
              * Misc/WebNSWindowExtras.m:
              (swizzleInstanceMethod):
              * Misc/WebTypesInternal.h:
              * Plugins/WebNetscapeDeprecatedFunctions.c:
              * Plugins/WebNetscapeDeprecatedFunctions.h:
              * Plugins/WebNetscapePluginPackage.h:
              * Plugins/WebNetscapePluginPackage.m:
              (-[WebNetscapePluginPackage unloadWithoutShutdown]):
              (-[WebNetscapePluginPackage load]):
              * WebKit.xcodeproj/project.pbxproj:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@15781 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      f18aae37
  29. 21 Jun, 2006 1 commit
    • bdakin's avatar
      Reviewed by John. · 92072b7f
      bdakin authored
              Fix for <rdar://problem/3914965> Misspelled text underline doesn't 
              look right at non-standard scale factors
      
              * platform/mac/GraphicsContextMac.mm:
              (WebCore::GraphicsContext::drawLineForMisspelling): We need to call  
              into our previously-created SPI for pattern-drawing so that the 
              phase is right at all scale factors.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@14957 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      92072b7f
  30. 16 Jun, 2006 1 commit
    • harrison's avatar
      <rdar://problem/4565312> Mail has a weird drawing artifact with dotted... · 08f03cc4
      harrison authored
              <rdar://problem/4565312> Mail has a weird drawing artifact with dotted red lines running across the window
      
              Problem was that revision lost a check to not draw the markers
              when paintingDisabled().   This led the markers to be drawn when
              the window deactivated, at which time the view happens to be flipped.
      
              It is similar but not the same as the Mail ToDo highlighting
              issue, which is due to the custom highlight method
              drawing when the focusView is nil.  Mail team knows this
              and has tested the fix.
      
              * platform/mac/GraphicsContextMac.mm:
              (WebCore::GraphicsContext::drawLineForMisspelling):
              Early return if paintingDisabled().
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@14894 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      08f03cc4
  31. 09 Jun, 2006 1 commit
    • hyatt's avatar
      WebCore: · 76a0c024
      hyatt authored
              Rework selection coloring.  Rename displaysWithFocusAttributes
              to isActive.  Move the white-blending code onto the Color API to make
              it more convenient to mutate colors for selection blending.  Eliminate all
              the selection state from the GraphicsContext and move it to the RenderTheme.
              Implement both Win32 and Mac theme selection colors.
      
              Reviewed by sfalken
      
              * bridge/mac/FrameMac.h:
              * bridge/mac/FrameMac.mm:
              (WebCore::FrameMac::setIsActive):
              * bridge/mac/WebCoreFrameBridge.h:
              * bridge/mac/WebCoreFrameBridge.mm:
              (-[WebCoreFrameBridge drawRect:]):
              (-[WebCoreFrameBridge setIsActive:]):
              (-[WebCoreFrameBridge selectionColor]):
              * css/cssstyleselector.cpp:
              (WebCore::CSSStyleSelector::checkOneSelector):
              * page/Frame.cpp:
              (WebCore::Frame::isActive):
              (WebCore::Frame::setIsActive):
              * page/Frame.h:
              * platform/Color.cpp:
              (WebCore::blend):
              (WebCore::Color::blendWithWhite):
              * platform/Color.h:
              (WebCore::Color::hasAlpha):
              * platform/GraphicsContext.cpp:
              (WebCore::GraphicsContextPrivate::GraphicsContextPrivate):
              * platform/GraphicsContext.h:
              * platform/mac/GraphicsContextMac.mm:
              * platform/win/TemporaryLinkStubs.cpp:
              (GraphicsContext::endTransparencyLayer):
              * rendering/InlineTextBox.cpp:
              (WebCore::InlineTextBox::paintSelection):
              * rendering/RenderBlock.cpp:
              (WebCore::RenderBlock::fillHorizontalSelectionGap):
              (WebCore::RenderBlock::fillVerticalSelectionGap):
              (WebCore::RenderBlock::fillLeftSelectionGap):
              (WebCore::RenderBlock::fillRightSelectionGap):
              * rendering/RenderHTMLCanvas.cpp:
              (WebCore::RenderHTMLCanvas::paint):
              * rendering/RenderImage.cpp:
              (WebCore::RenderImage::paint):
              * rendering/RenderListMarker.cpp:
              (WebCore::RenderListMarker::paint):
              * rendering/RenderListMarker.h:
              * rendering/RenderObject.cpp:
              (WebCore::RenderObject::selectionColor):
              * rendering/RenderObject.h:
              * rendering/RenderReplaced.cpp:
              * rendering/RenderReplaced.h:
              * rendering/RenderTheme.cpp:
              (WebCore::RenderTheme::activeSelectionColor):
              (WebCore::RenderTheme::inactiveSelectionColor):
              (WebCore::RenderTheme::platformActiveSelectionColor):
              (WebCore::RenderTheme::platformInactiveSelectionColor):
              * rendering/RenderTheme.h:
              * rendering/RenderThemeMac.h:
              * rendering/RenderThemeMac.mm:
              (WebCore::RenderThemeMac::platformActiveSelectionColor):
              (WebCore::RenderThemeMac::platformInactiveSelectionColor):
              * rendering/RenderThemeWin.cpp:
              (WebCore::RenderThemeWin::platformActiveSelectionColor):
              (WebCore::RenderThemeWin::platformInactiveSelectionColor):
              * rendering/RenderThemeWin.h:
              * rendering/RenderWidget.cpp:
              (WebCore::RenderWidget::paint):
      
      WebKit:
      
              Rename displaysWithFocusAttributes to isActive.
      
              Reviewed by sfalken
      
              * WebKit.xcodeproj/project.pbxproj:
              * WebView/WebHTMLView.m:
              (-[WebHTMLView _updateFocusState]):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@14784 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      76a0c024
  32. 15 May, 2006 1 commit
  33. 11 May, 2006 1 commit
    • hyatt's avatar
      Remove the misspelling drawing code from Font and FontData. Implement it · a19cbc48
      hyatt authored
              natively in GraphicContext instead.
      
              Reviewed by maciej
      
              * platform/FontData.h:
              * platform/GraphicsContext.cpp:
              * platform/GraphicsContext.h:
              * platform/cairo/GraphicsContextCairo.cpp:
              (WebCore::GraphicsContext::drawLineForMisspelling):
              * platform/mac/FontData.mm:
              * platform/mac/FontMac.mm:
              * platform/mac/GraphicsContextMac.mm:
              (WebCore::GraphicsContext::drawLineForMisspelling):
              * platform/win/FontWin.cpp:
              * rendering/InlineTextBox.cpp:
              (WebCore::InlineTextBox::paintSpellingMarker):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@14318 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      a19cbc48
  34. 03 May, 2006 1 commit
    • darin's avatar
      Reviewed by Eric. · 9e90f51c
      darin authored
              - http://bugzilla.opendarwin.org/show_bug.cgi?id=8696
                another round of GraphicsContext improvements
      
              * WebCore.xcodeproj/project.pbxproj: Added GraphicsContextCG.cpp.
              * html/CanvasRenderingContext2D.cpp:
              (WebCore::CanvasRenderingContext2D::scale): Use new GraphicsContext function.
              (WebCore::CanvasRenderingContext2D::rotate): Ditto.
              (WebCore::CanvasRenderingContext2D::translate): Ditto.
              * kwq/KWQComboBox.mm: Added include (not sure if this is needed for this patch,
              but it's needed for one of my upcoming ones).
      
              * platform/GraphicsContext.h: Changed fillColor and setFillColor to use Color
              instead of RGBA32. Removed setColorFromFillColor and setColorFromPen. Added
              scale, rotate, and translate functions.
              * platform/GraphicsContext.cpp:
              (WebCore::GraphicsContext::setFillColor): Changed to use Color instead of RGBA32.
              (WebCore::GraphicsContext::fillColor): Ditto.
      
              * platform/GraphicsTypes.h: Moved HorizontalAlignment here.
              * platform/Widget.h: Removed HorizontalAlignment from here.
      
              * platform/cg/GraphicsContextCG.cpp: Added. Started as a copy of GraphicsContextMac.mm.
              (WebCore::GraphicsContext::drawRect): Rewrote to not rely on [NSGraphicsContext currentContext].
              (WebCore::GraphicsContext::drawLine): Ditto.
              (WebCore::GraphicsContext::drawEllipse): Ditto.
              (WebCore::GraphicsContext::drawArc): Ditto.
              (WebCore::GraphicsContext::drawConvexPolygon): Ditto.
              (WebCore::GraphicsContext::fillRect): Ditto.
              (WebCore::GraphicsContext::setLineWidth):  Added check of paintingDisabled(). 
              (WebCore::GraphicsContext::setMiterLimit): Ditto.
              (WebCore::GraphicsContext::setAlpha): Ditto.
              (WebCore::GraphicsContext::clearRect): Ditto.
              (WebCore::GraphicsContext::strokeRect): Ditto.
              (WebCore::GraphicsContext::setLineCap): Ditto.
              (WebCore::GraphicsContext::setLineJoin): Ditto.
              (WebCore::GraphicsContext::clip): Ditto.
              (WebCore::GraphicsContext::scale): Added.
              (WebCore::GraphicsContext::rotate): Added.
              (WebCore::GraphicsContext::translate): Added.
      
              * platform/mac/GraphicsContextMac.mm: Moved most of this file into GraphicsContextCG.cpp.
              (WebCore::GraphicsContext::setCompositeOperation): Added check of paintingDisabled().
      
              * platform/mac/WebCoreSystemInterface.h: Added declarations so this header
              stands alone.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@14174 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      9e90f51c
  35. 28 Apr, 2006 1 commit
    • darin's avatar
      Reviewed by Eric. · 77e2136b
      darin authored
              - http://bugzilla.opendarwin.org/show_bug.cgi?id=8608
                make GraphicsContext more suitable for cross-platform use, step 2
      
              - Changed GraphicsContext to use NSGraphicsContext as little as possible.
              - Removed the printing flag from GraphicsContext.
              - Changed GraphicsContext to assume the NSGraphicsContext is always flipped,
                and got rid of parameters to pass the flipped boolean around.
      
              * WebCore.vcproj/WebCore/WebCore.vcproj: Add GraphicsTypes.h/cpp and remove
              CompositeOperator.h/cpp.
              * WebCore.xcodeproj/project.pbxproj: Ditto.
      
              * bridge/mac/FrameMac.mm: (WebCore::FrameMac::setDisplaysWithFocusAttributes):
              * bridge/mac/WebCoreFrameBridge.mm: (-[WebCoreFrameBridge drawRect:]):
              * html/CanvasPattern.cpp: (WebCore::patternCallback):
              * html/HTMLCanvasElement.cpp: (WebCore::HTMLCanvasElement::createDrawingContext):
              * kcanvas/device/quartz/KRenderingDeviceQuartz.mm:
              (WebCore::KRenderingDeviceContextQuartz::createGraphicsContext):
              * platform/mac/WidgetMac.mm: (WebCore::Widget::lockDrawingFocus):
              Update for changes to GraphicsContext constructor (no flipped or printing boolean).
      
              * html/CanvasRenderingContext2D.h: Added a Path to the context state. Changed the
              LineCap and LineJoin types to use the new ones in GraphicsTypes.h instead of defining
              types here in this class. Changed m_platformContextStrokeStyleIsPattern and
              m_platformContextFillStyleIsPattern to be named m_appliedStrokePattern and
              m_appliedFillPattern and moved them outside the __APPLE__ ifdefs. Removed the
              platformContext() function. Moved applyStrokePattern and applyFillPattern out of
              the __APPLE__ ifdef.
      
              * html/CanvasRenderingContext2D.cpp:
              (WebCore::CanvasRenderingContext2D::State::State): Moved the stroke pattern
              booleans out of Mac-specific ifdef.
              (WebCore::CanvasRenderingContext2D::save): Changed to use GraphicsContext instead
              of using CGContext directly.
              (WebCore::CanvasRenderingContext2D::restore): Ditto.
              (WebCore::CanvasRenderingContext2D::setStrokeStyle): Ditto.
              (WebCore::CanvasRenderingContext2D::setFillStyle): Ditto.
              (WebCore::CanvasRenderingContext2D::setLineWidth): Ditto.
              (WebCore::CanvasRenderingContext2D::lineCap): Ditto.
              (WebCore::CanvasRenderingContext2D::setLineCap): Ditto.
              (WebCore::CanvasRenderingContext2D::lineJoin): Ditto.
              (WebCore::CanvasRenderingContext2D::setLineJoin): Ditto.
              (WebCore::CanvasRenderingContext2D::setMiterLimit): Ditto.
              (WebCore::CanvasRenderingContext2D::shadowColor): Ditto.
              (WebCore::CanvasRenderingContext2D::setGlobalAlpha): Ditto.
              (WebCore::CanvasRenderingContext2D::setGlobalCompositeOperation): Ditto.
              (WebCore::CanvasRenderingContext2D::scale): Update since platformContext() function
              no longer exists.
              (WebCore::CanvasRenderingContext2D::rotate): Ditto.
              (WebCore::CanvasRenderingContext2D::translate): Ditto.
              (WebCore::CanvasRenderingContext2D::beginPath): Changed to use GraphicsContext instead
              of using CGContext directly.
              (WebCore::CanvasRenderingContext2D::closePath): Ditto.
              (WebCore::CanvasRenderingContext2D::moveTo): Ditto.
              (WebCore::CanvasRenderingContext2D::lineTo): Ditto.
              (WebCore::CanvasRenderingContext2D::quadraticCurveTo): Ditto.
              (WebCore::CanvasRenderingContext2D::bezierCurveTo): Ditto.
              (WebCore::CanvasRenderingContext2D::arcTo): Ditto.
              (WebCore::CanvasRenderingContext2D::arc): Ditto.
              (WebCore::CanvasRenderingContext2D::rect): Ditto.
              (WebCore::CanvasRenderingContext2D::fill): Changed to use the current path from this class
              instead of relying on the CGContext's current path.
              (WebCore::CanvasRenderingContext2D::stroke): Ditto.
              (WebCore::CanvasRenderingContext2D::clip): Changed to use the current path and use the
              GraphicsContext instead of using CGContext directly.
              (WebCore::CanvasRenderingContext2D::clearRect): Changed to use GraphicsContext instead
              of using CGContext directly.
              (WebCore::CanvasRenderingContext2D::fillRect): Update since platformContext() function
              no longer exists.
              (WebCore::CanvasRenderingContext2D::strokeRect): Ditto.
              (WebCore::CanvasRenderingContext2D::setShadow): Ditto.
              (WebCore::CanvasRenderingContext2D::applyShadow): Ditto.
              (WebCore::CanvasRenderingContext2D::drawImage): Ditto.
              (WebCore::CanvasRenderingContext2D::drawImageFromRect): Ditto.
              (WebCore::CanvasRenderingContext2D::createPattern): Ditto.
              (WebCore::CanvasRenderingContext2D::applyStrokePattern): Made a tiny bit of this function
              cross-platform. The bulk is still Mac-specific.
              (WebCore::CanvasRenderingContext2D::applyFillPattern): Ditto.
      
              * html/CanvasStyle.h: Changed to use GraphicsContext instead of CGContext. Now the
              platform-specific stuff is in the implementation, not the header.
              * html/CanvasStyle.cpp:
              (WebCore::CanvasStyle::applyStrokeColor): Moved the ifdefs inside the function, getting
              us one step closer to platform independence.
              (WebCore::CanvasStyle::applyFillColor): Ditto.
      
              * html/html_imageimpl.cpp:
              (WebCore::HTMLAreaElement::getRect): Update for changes to the Path class.
              (WebCore::HTMLAreaElement::getRegion): Ditto.
      
              * page/Frame.cpp:
              (WebCore::Frame::paint): Change to check printing flag on the document, rather than on
              the GraphicsContext, since there is no printing flag for GraphicsContext any more.
              (WebCore::Frame::adjustPageHeight): Update for change to GraphicsContext constructor.
      
              * platform/GraphicsContext.h: Define a type called PlatformGraphicsContext so the
              platform-specific getter and constructor don't have to be ifdef'd. Added clearRect,
              strokeRect, setLineWidth, setLineCap, setLineJoin, setMiterLimit, setAlpha, setCompositeOperation,
              and clip functions. Removed the isForPrinting parameter from createGraphicsContextPrivate.
              * platform/GraphicsContext.cpp:
              (WebCore::GraphicsContextPrivate::GraphicsContextPrivate): Removed isForPrinting.
              (WebCore::GraphicsContext::createGraphicsContextPrivate): Ditto.
              * platform/mac/GraphicsContextMac.mm:
              (WebCore::GraphicsContextPlatformPrivate::GraphicsContextPlatformPrivate):
              Removed NSGraphicsContext.
              (WebCore::GraphicsContextPlatformPrivate::~GraphicsContextPlatformPrivate):
              Ditto.
              (WebCore::GraphicsContext::GraphicsContext): Removed constructor that
              takes an NSGraphicsContext. Removed the flipText and forPrinting parameters
              to the other constructor.
              (WebCore::GraphicsContext::savePlatformState): Removed NSGraphicsContext code.
              (WebCore::GraphicsContext::restorePlatformState): Ditto.
              (WebCore::GraphicsContext::drawRect): Updated assertion to more-precisely
              reflect the limitation of the current version of this function.
              (WebCore::GraphicsContext::setColorFromFillColor): Ditto.
              (WebCore::GraphicsContext::setColorFromPen): Ditto.
              (WebCore::GraphicsContext::drawLine): Updated assertion to more-precisely
              reflect the limitation of the current version of this function.
              (WebCore::setCompositeOperation):
              (WebCore::GraphicsContext::fillRect): Ditto.
              (WebCore::GraphicsContext::setLineWidth): Added.
              (WebCore::GraphicsContext::setMiterLimit): Added.
              (WebCore::GraphicsContext::setAlpha): Added.
              (WebCore::GraphicsContext::setCompositeOperation): Added.
              (WebCore::GraphicsContext::clearRect): Added.
              (WebCore::GraphicsContext::strokeRect): Added.
              (WebCore::GraphicsContext::setLineCap): Added.
              (WebCore::GraphicsContext::setLineJoin): Added.
              (WebCore::GraphicsContext::clip): Added.
      
              * platform/CompositeOperator.cpp: Removed.
              * platform/CompositeOperator.h: Removed.
              * platform/GraphicsTypes.cpp: Added. Includes CompositeOperator, LineCap, and LineJoin.
              * platform/GraphicsTypes.h: Added.
      
              * platform/Image.h: Changed include to GraphicsTypes.h from CompositeOperator.h.
      
              * platform/Path.h: Removed constructors that take a Rect and an array of points. Made
              the Path mutable. Changed the types for contains and boundingRect to be float-based
              instead of int-based. Changed translate to take a FloatSize instead of two integers.
              Added clear, moveTo, addLineTo, addQuadCurveTo, addBezierCurveTo, addArcTo, closeSubpath,
              addArc, addRect, addEllipse, and platformPath functions. Defined a PlatformPath type
              so we don't have to ifdef the header so much.
              * platform/cg/PathCG.cpp:
              (WebCore::Path::Path): Changed class to always have a mutable path.
              (WebCore::Path::operator=): Changed to make a mutable copy.
              (WebCore::Path::contains): Changed to take a FloatPoint instead of IntPoint.
              (WebCore::Path::translate): Changed to use a FloatSize instead of two ints.
              (WebCore::Path::boundingRect): Changed to return a FloatRect.
              (WebCore::Path::moveTo): Added.
              (WebCore::Path::addLineTo): Added.
              (WebCore::Path::addQuadCurveTo): Added.
              (WebCore::Path::addBezierCurveTo): Added.
              (WebCore::Path::addArcTo): Added.
              (WebCore::Path::closeSubpath): Added.
              (WebCore::Path::addArc): Added.
              (WebCore::Path::addRect): Added.
              (WebCore::Path::addEllipse): Added.
              (WebCore::Path::clear): Added.
      
              * platform/mac/ImageMac.mm:
              (WebCore::fillSolidColorInRect): Changed to take a GraphicsContext instead of
              a CGContext.
              (WebCore::Image::checkForSolidColor): Changed to use the new setCompositeOperation
              in GraphicsContex.
              (WebCore::Image::draw): Changed to use the new PDF image and fillSolidColorInRect
              function that take GraphicsContext instead of CGContext.
              (WebCore::Image::drawTiled): Ditto.
      
              * platform/mac/PDFDocumentImage.h: Made most functions private. Changed to
              use GraphicsContext and FloatRect instead of CGContext and NSRect. Also
              removed the unused alpha and flipped booleans.
              * platform/mac/PDFDocumentImage.mm:
              (WebCore::PDFDocumentImage::bounds): Update for change in types.
              (WebCore::PDFDocumentImage::adjustCTM): Ditto.
              (WebCore::PDFDocumentImage::setCurrentPage): Ditto.
              (WebCore::PDFDocumentImage::draw): Ditto.
      
              * platform/win/TemporaryLinkStubs.cpp: Added lots of new stubs.
      
              * rendering/InlineTextBox.cpp: (WebCore::InlineTextBox::paint): Changed to get
              printing boolean from document instead graphics context.
              * rendering/RenderBlock.cpp:
              (WebCore::RenderBlock::paintChildren): Ditto.
              (WebCore::RenderBlock::paintObject): Ditto.
              * rendering/RenderFlow.cpp: (WebCore::RenderFlow::paintLines): Ditto.
              * rendering/RenderHTMLCanvas.cpp: (WebCore::RenderHTMLCanvas::paint): Ditto.
              * rendering/RenderImage.cpp: (WebCore::RenderImage::paint): Ditto.
              * rendering/RenderThemeMac.mm: (WebCore::RenderThemeMac::paintButton): Ditto.
              * rendering/render_list.cpp: (WebCore::RenderListMarker::paint): Ditto.
              * rendering/render_replaced.cpp: (WebCore::RenderWidget::paint): Ditto.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@14102 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      77e2136b
  36. 25 Apr, 2006 1 commit
  37. 21 Apr, 2006 1 commit
    • darin's avatar
      Reviewed by Hyatt. · 33137f7d
      darin authored
              - make <canvas> element and related API behave more like the draft of
                the WhatWG Web Application specification, checking parameter validity
                and raising exceptions
              - changed HTMLCanvasElement bindings to be auto-generated, fixing all
                issues so we can generate bindings for classes drived from HTMLElement
              - change GraphicsContext API to use IntRect/Point/Size in more cases
              - change GraphicsContext so it is closer to truly wrapping a graphics
                context rather than representing the current NSGraphicsContext; there
                are still some things like text and rectangle fills that are tied to
                NSGraphicsContext, but we're most of the way there
              - removed Brush class since it just amounted to a color, using an RGBA32
                instead where we used to use a Brush
      
              * DerivedSources.make: Added JSHTMLCanvasElement.h.
              * WebCore.xcodeproj/project.pbxproj: Added new files.
      
              * bindings/js/JSCanvasRenderingContext2DBase.h: Added toJS.
              * bindings/js/JSCanvasRenderingContext2DBase.cpp:
              (WebCore::JSCanvasRenderingContext2DBaseProtoFunc::callAsFunction):
              Added exception code handling for strokeRect, drawImage, and createPattern.
              Added version of createPattern that takes a canvas. Use TYPE_MISMATCH_ERR
              instead of JavaScript TypeError when parameter is neither an image or canvas
              element. Adapt for new HTMLCanvasElement binding.
              (WebCore::toJS): Added. Converts context object to JS wrapper.
      
              * bindings/js/JSHTMLElementWrapperFactory.h: Added.
              * bindings/js/JSHTMLElementWrapperFactory.cpp: Added. Creates a JavaScript
              wrapper for an arbitrary HTML element. Better than putting this all in the
              DOM node class toJS function.
      
              * bindings/js/JSXMLSerializer.cpp: Tweaked to make it build.
              * bindings/js/kjs_dom.cpp: (KJS::toJS): Changed to call the
              JSHTMLElementWrapperFactory function createJSWrapper, instead
              of always creating a JSHTMLElement.
      
              * bindings/js/kjs_html.h: Removed canvas-related stuff. Added HTMLElement
              prototype.
              * bindings/js/kjs_html.cpp:
              (KJS::JSHTMLElement::classInfo): Removed canvas element.
              (KJS::JSHTMLElement::accessors): Ditto.
              (KJS::JSHTMLElementProtoFunc::callAsFunction): Added, to help the auto-binding
              machiner cope with HTMLElement.
              (KJS::HTMLElementFunction::callAsFunction): Removed canvas element.
      
              * bindings/scripts/CodeGeneratorJS.pm: Added types needed for HTMLCanvasElement.
      
              * bridge/mac/FrameMac.mm: (WebCore::FrameMac::setDisplaysWithFocusAttributes):
              Changed to create a GraphicsContext with the new constructor that takes
              a CGContextRef.
              * bridge/mac/WebCoreFrameBridge.mm: (-[WebCoreFrameBridge drawRect:]):
              Changed to create a GraphicsContext with the new constructor that takes
              a NSGraphicsContext.
              * page/Frame.cpp: (WebCore::Frame::adjustPageHeight): Changed to create a
              GraphicsContext with the new constructor that takes a CGContextRef.
      
              * editing/SelectionController.cpp: (WebCore::SelectionController::paintCaret):
              Eliminated a use of obsolete class Brush.
      
              * html/CanvasPattern.h:
              * html/CanvasPattern.cpp:
              (WebCore::CanvasPattern::parseRepetitionType): Added. Parses a repetition
              type. Different from the old logic in that it is case-sensitive and rejects
              anything other than null, empty string, or the four repeat types.
              (WebCore::CanvasPattern::CanvasPattern): Added constructor that takes
              a CGImageRef. Changed constructor to take two booleans instead of the repetition
              type string. It's the caller's responsibility to parse the string.
              (WebCore::CanvasPattern::~CanvasPattern): Release the CGImage.
              (WebCore::patternCallback): Handle the CGImage case. Also changed the code
              to create a GraphicsContext as needed and call the image drawing code with that.
              (WebCore::CanvasPattern::createPattern): Handle both the image element case and
              the canvas element case.
              
              * html/CanvasRenderingContext2D.h:
              * html/CanvasRenderingContext2D.cpp:
              (WebCore::CanvasRenderingContext2D::State::State): Change line cap, line join,
              and global composite to store enum values instead of strings.
              (WebCore::CanvasRenderingContext2D::setLineWidth): Do nothing if width is NaN
              or <= 0.
              (WebCore::CanvasRenderingContext2D::lineCap): Return a string based on a
              stored enum, rather than returning a stored string.
              (WebCore::CanvasRenderingContext2D::setLineCap): Do nothing if the string is
              not one of the standard line cap types. Also case sensitive and stores enum
              rather than the string.
              (WebCore::CanvasRenderingContext2D::lineJoin): Return a string based on a
              stored enum, rather than returning a stored string.
              (WebCore::CanvasRenderingContext2D::setLineJoin): Do nothing if the string is
              not one of the standard line join types. Also case sensitive and stores enum
              rather than the string.
              (WebCore::CanvasRenderingContext2D::setMiterLimit): Do nothing if limit is NaN
              or <= 0.
              (WebCore::CanvasRenderingContext2D::setGlobalAlpha): Do nothing if alpha is NaN
              or < 0 or > 1.
              (WebCore::CanvasRenderingContext2D::globalCompositeOperation): Return a string
              based on a stored enum, rather than returning a stored string.
              (WebCore::CanvasRenderingContext2D::setGlobalCompositeOperation): Do nothing if
              the string is not one of the standard compositing modes. Also case sensitive and
              stores enum rather than the string.
              (WebCore::CanvasRenderingContext2D::arcTo): Generate INDEX_SIZE_ERR exception
              if radius is NaN or <= 0.
              (WebCore::CanvasRenderingContext2D::arc): Ditto.
              (WebCore::CanvasRenderingContext2D::rect): Generate INDEX_SIZE_ERR exception
              if width or height is NaN or <= 0.
              (WebCore::CanvasRenderingContext2D::clearRect): Ditto.
              (WebCore::CanvasRenderingContext2D::fillRect): Ditto.
              (WebCore::CanvasRenderingContext2D::strokeRect): Ditto, same for line width.
              Changed the case where the line width is not specified to share code with the
              case where it is.
              (WebCore::size): Renamed from imageSize, since C++ overloads based on parameter
              types anyway.
              (WebCore::CanvasRenderingContext2D::drawImage): Generate INDEX_SIZE_ERR exception
              if the source rect is not entirely inside the image rect, or if the width or height
              of either the source or destination rect is NaN or <= 0. Changed image drawing
              code to be platform-independent for the image element case, but not yet for the
              canvas case.
              (WebCore::CanvasRenderingContext2D::drawImageFromRect): Change code to parse the
              composite operation to use the new code shared with Image.
              (WebCore::CanvasRenderingContext2D::createPattern): Added code to parse the
              repetition type separately before creating the pattern. Added an overload for
              canvas elements.
              (WebCore::CanvasRenderingContext2D::drawingContext): Changed to return a
              GraphicsContext*.
              (WebCore::CanvasRenderingContext2D::platformContext): Added. Now does what
              drawingContext used to do.
      
              * html/CanvasRenderingContext2D.idl: Added exception declarations as needed
              for changes above.
      
              * html/HTMLCanvasElement.h:
              * html/HTMLCanvasElement.cpp:
              (WebCore::HTMLCanvasElement::HTMLCanvasElement): Changed m_drawingContext
              to be a GraphicsContext instead of a CGContextRef.
              (WebCore::HTMLCanvasElement::~HTMLCanvasElement): Ditto.
              (WebCore::HTMLCanvasElement::getContext): Removed special cases for null
              and empty string. Only give a 2D graphics context if the string is "2d".
              (WebCore::HTMLCanvasElement::reset): Updated for change to GraphicsContext
              from CGContextRef.
              (WebCore::HTMLCanvasElement::paint): Ditto.
              (WebCore::HTMLCanvasElement::createDrawingContext): Changed to create a
              GraphicsContext* instead of a CGContextRef.
              (WebCore::HTMLCanvasElement::drawingContext): Changed to return a
              GraphicsContext* instead of a CGContextRef.
              (WebCore::HTMLCanvasElement::createPlatformImage): Updated for changes above.
      
              * html/HTMLCanvasElement.idl: Added.
      
              * html/HTMLParser.h:
              * html/HTMLParser.cpp:
              (WebCore::HTMLParser::canvasCreateErrorCheck): Added. An attempt to implement the
              fallback behavior for canvas elements when JavaScript is off.
              (WebCore::HTMLParser::getNode): Sorted list of functions. Added case for canvas.
      
              * html/html_imageimpl.h:
              * html/html_imageimpl.cpp:
              (WebCore::HTMLImageElement::HTMLImageElement): Changed m_compositeOperator to be
              an enum instead of a string.
              (WebCore::HTMLImageElement::parseMappedAttribute): Parse the enum here.
      
              * kcanvas/KCanvasResources.h:
              * kcanvas/KCanvasResources.cpp: (WebCore::KCanvasMarker::draw): Changed to take a
              GraphicsContext parameter.
      
              * kcanvas/RenderPath.h: Added GraphicsContext parameter to drawMarkersIfNeeded.
      
              * kcanvas/RenderPath.cpp: (WebCore::RenderPath::paint):
              * kcanvas/RenderSVGImage.cpp: (WebCore::RenderSVGImage::paint):
              * kcanvas/RenderSVGText.cpp: (WebCore::RenderSVGText::paint):
              Changed to generate and use an appropriate GraphicsContext.
      
              * kcanvas/device/quartz/KCanvasItemQuartz.h: Added GraphicsContext parameter to
              drawMarkersIfNeeded.
              * kcanvas/device/quartz/KCanvasItemQuartz.mm:
              (WebCore::DrawMarkersData::DrawMarkersData): Added GraphicsContext*.
              (WebCore::drawMarkerWithData): Pass along a GraphicsContext*.
              (WebCore::drawStartAndMidMarkers): Ditto.
              (WebCore::KCanvasItemQuartz::drawMarkersIfNeeded): Pass a long a GraphicsContext*.
      
              * kcanvas/device/KRenderingDevice.h: Added a pure virtual createGraphicsContext
              to bridge back to a GraphicsContext. Long term that class will replace this one.
              * kcanvas/device/quartz/KRenderingDeviceQuartz.h:
              * kcanvas/device/quartz/KRenderingDeviceQuartz.mm:
              (WebCore::KRenderingDeviceContextQuartz::createGraphicsContext): Added.
      
              * ksvg2/svg/SVGMaskElement.cpp: (WebCore::SVGMaskElement::drawMaskerContent):
              Create and pass a GraphicsContext -- old code used the default constructor for
              GraphicsContext which meant "current context", and that no longer exists.
              * ksvg2/svg/SVGPatternElement.cpp:
              (WebCore::SVGPatternElement::drawPatternContentIntoTile): Ditto.
      
              * platform/Brush.h: Removed.
              * platform/CompositeOperator.h: Added.
              * platform/CompositeOperator.cpp: Added.
      
              * platform/Font.h: Changed calls to use IntPoint instead of pairs of ints.
              Also removed the const from all the uses of GraphicsContext*.
      
              * platform/GraphicsContext.h: Eliminated default constructor and constructor
              that takes only a boolean. Replaced with constructors that take platform
              graphics contexts only. Replaced brush-related calls with fill color calls.
              Replaced use of Brush with use of Color. Changed Image::CompositeOperator to
              just plain CompositeOperator. Changed tuples of ints into IntRect and IntPoint.
              Moved setFocusRingClip and clearFocusRingClip out of ifdefs. Removed unused
              getCompositeOperation and string-based setCompositeOperation. Moved
              currentCGContext and the other setCompositeOperation out of the GraphicsContext
              class and made them global functions. Fixed platformContext so it won't always
              return the CGContextRef of the current NSGraphicsContext. Instead, it will
              return the appropriate CGContextRef for the GraphicsContext. This eliminates
              the need to use void* for the image-drawing functions.
      
              * platform/GraphicsContext.cpp:
              (WebCore::GraphicsContextState::GraphicsContextState): Replaced Brush with
              an RGBA fill color.
              (WebCore::GraphicsContext::setFillColor): Renamed from setBrush.
              (WebCore::GraphicsContext::fillColor): Renamed from brush.
              (WebCore::GraphicsContext::drawImage): Changed to use IntRect.
              (WebCore::GraphicsContext::drawTiledImage): Moved here from GraphicsContextMac.mm.
              (WebCore::GraphicsContext::drawText): Changed to use IntPoint.
              (WebCore::GraphicsContext::drawHighlightForText): Ditto.
              (WebCore::GraphicsContext::drawLineForText): Ditto.
              (WebCore::GraphicsContext::drawLineForMisspelling): Ditto.
      
              * platform/Image.h: Removed CompositeOperator and related functions.
              Removed void* context parameters from draw functions.
      
              * platform/Image.cpp: Removed compositeOperatorFromString.
      
              * platform/Widget.h: Added a GraphicsContext* return value from lockDrawingFocus
              that you pass back to unlockDrawingFocus (for deletion).
      
              * platform/mac/FontMac.mm:
              (WebCore::Font::selectionRectForText): Changed parameter to point and removed
              const on GraphicsContext* parameter.
              (WebCore::Font::drawText): Ditto.
              (WebCore::Font::drawHighlightForText): Ditto.
              (WebCore::Font::drawLineForText): Ditto.
              (WebCore::Font::drawLineForMisspelling): Ditto.
              (WebCore::Font::misspellingLineThickness): Removed const.
      
              * platform/mac/GraphicsContextMac.mm:
              (WebCore::GraphicsContextPlatformPrivate::GraphicsContextPlatformPrivate):
              Added fields to store a CGContextRef and an NSGraphicsContext.
              (WebCore::GraphicsContextPlatformPrivate::~GraphicsContextPlatformPrivate):
              Release both the CGContextRef and the NSGraphicsContext.
              (WebCore::GraphicsContext::GraphicsContext): Implement to set up both the
              CGContextRef and the NSGraphicsContext in one case, and only the CGContextRef
              in the other.
              (WebCore::GraphicsContext::savePlatformState): Implement for the CGContext-only
              case.
              (WebCore::GraphicsContext::restorePlatformState): Ditto.
              (WebCore::GraphicsContext::drawRect): Assert that the NS context is present
              and 
              (WebCore::GraphicsContext::setColorFromFillColor): Renamed from
              setColorFromBrush.
              (WebCore::GraphicsContext::setColorFromPen): Added assertion.
              (WebCore::GraphicsContext::drawLine): Added assertion.
              (WebCore::GraphicsContext::drawEllipse): Get CGContext from the platformContext
              function instead of currentCGContext, and changed to use fillColor.
              (WebCore::GraphicsContext::drawArc): Ditto.
              (WebCore::GraphicsContext::drawConvexPolygon): Ditto.
              (WebCore::setCompositeOperation): Changed to global function and also changed
              to do the work here -- no need to use WebCoreImageRendererFactory.
              (WebCore::GraphicsContext::drawImage): Move most of this into GraphicsContext.cpp.
              Remove the void* context parameter. Changed to take rects instead of separate coordinates.
              (WebCore::GraphicsContext::fillRect): Changed to take color instead of Brush.
              (WebCore::GraphicsContext::addClip): Added assertion.
              (WebCore::GraphicsContext::addRoundedRectClip): Get CGContextRef from the platformContext
              function instead of currentCGContext.
              (WebCore::GraphicsContext::createRenderingDeviceContext): Ditto.
              (WebCore::GraphicsContext::beginTransparencyLayer): Ditto.
              (WebCore::GraphicsContext::endTransparencyLayer): Ditto.
              (WebCore::GraphicsContext::setShadow): Change to take size instead of x,y. Also get
              CGCOntextRef from the platformContext function instead of currentCGContext.
              (WebCore::GraphicsContext::clearShadow): Get CGContextRef from the platformContext
              function instead of currentCGContext.
              (WebCore::GraphicsContext::platformContext): Added. Returns m_data->m_cgContext.
      
              * platform/mac/ImageMac.mm:
              (WebCore::fillSolidColorInRect): Updated for change in CompositeOperator type.
              (WebCore::Image::checkForSolidColor): Ditto.
              (WebCore::Image::draw): Removed void* context parameter and replaced it with
              a GraphicsContext* parameter. Renamed from drawInRect.
              (WebCore::Image::drawTiled): Ditto. Renamed from tileInRect and scaleAndTileInRect.
      
              * platform/mac/PDFDocumentImage.h: Updated for change in CompositeOperator type.
              * platform/mac/PDFDocumentImage.mm: (WebCore::PDFDocumentImage::draw): Ditto.
      
              * platform/mac/WidgetMac.mm:
              (WebCore::Widget::lockDrawingFocus): Changed to return a GraphicsContext*.
              (WebCore::Widget::unlockDrawingFocus): Changed to take a GraphicsContext*.
      
              * rendering/InlineTextBox.cpp:
              (WebCore::InlineTextBox::selectionRect): Changed to pass IntPoint.
              (WebCore::InlineTextBox::paint): Changed to pass IntSize.
              (WebCore::InlineTextBox::paintSelection): More of the same.
              (WebCore::InlineTextBox::paintMarkedTextBackground): Ditto.
              (WebCore::InlineTextBox::paintDecoration): Ditto.
              (WebCore::InlineTextBox::paintSpellingMarker): Ditto.
              (WebCore::InlineTextBox::paintTextMatchMarker): Ditto.
              (WebCore::InlineTextBox::paintMarkedTextUnderline): Ditto.
              (WebCore::InlineTextBox::positionForOffset): Ditto.
              * rendering/RenderBlock.cpp:
              (WebCore::RenderBlock::fillHorizontalSelectionGap): Ditto.
              (WebCore::RenderBlock::fillVerticalSelectionGap): Ditto.
              (WebCore::RenderBlock::fillLeftSelectionGap): Ditto.
              (WebCore::RenderBlock::fillRightSelectionGap): Ditto.
              * rendering/RenderBox.cpp:
              (WebCore::RenderBox::paintBackgroundExtended): Ditto.
              (WebCore::RenderBox::outlineBox): Ditto.
              * rendering/RenderImage.cpp:
              (WebCore::RenderImage::paint): Ditto.
              * rendering/RenderLayer.cpp:
              (WebCore::setClip): Take out ifdefs. We'll do that inside GraphicsContext instead.
              (WebCore::restoreClip): Ditto.
              * rendering/RenderObject.cpp:
              (WebCore::RenderObject::drawBorder): More of the same.
              (WebCore::RenderObject::paintBorderImage): Ditto.
              * rendering/render_line.cpp:
              (WebCore::InlineFlowBox::paintDecorations): Ditto.
              (WebCore::EllipsisBox::paint): Ditto.
              * rendering/render_list.cpp:
              (WebCore::RenderListMarker::paint): Ditto.
      
              * rendering/render_frames.cpp: (WebCore::RenderFrameSet::userResize): Set up a graphics
              context by calling lockDrawingFocus. Also changed a color here to be a constant.
      
              * platform/cairo/GraphicsContextCairo.cpp:
              (WebCore::GraphicsContext::drawImage): Update for parameter type changes.
              (WebCore::GraphicsContext::drawScaledAndTiledImage):
              (WebCore::GraphicsContext::setFocusRingClip):
              (WebCore::GraphicsContext::clearFocusRingClip):
              * platform/cairo/ImageCairo.cpp:
              (WebCore::setCompositingOperation):
              (WebCore::Image::tileInRect):
              (WebCore::Image::scaleAndTileInRect):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@13992 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      33137f7d