1. 21 Apr, 2006 12 commits
    • adele's avatar
      LayoutTests: · a6d67cb5
      adele authored
              Reviewed by Darin.
      
              Test for: http://bugzilla.opendarwin.org/show_bug.cgi?id=8213
              REGRESSION: Can't tab out of text field if iframe comes after it
      
              * fast/forms/tabbing-input-iframe-expected.checksum: Added.
              * fast/forms/tabbing-input-iframe-expected.png: Added.
              * fast/forms/tabbing-input-iframe-expected.txt: Added.
              * fast/forms/tabbing-input-iframe.html: Added.
      
      WebCore:
      
              Reviewed by Darin.
      
              Fix for: http://bugzilla.opendarwin.org/show_bug.cgi?id=8213
              REGRESSION: Can't tab out of text field if iframe comes after it
      
              Test: fast/forms/tabbing-input-iframe.html
      
              * bridge/mac/FrameMac.mm: (WebCore::FrameMac::nextKeyViewInFrame):
                If the next focusable node is a RenderWidget without a view, then continue in the loop.  We used to break out in this case. 
                I also made some formatting changes and reorganized the function to make it easier to read.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@14003 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      a6d67cb5
    • adele's avatar
      Reviewed by Beth. · ace6082a
      adele authored
              Fix for: http://bugzilla.opendarwin.org/show_bug.cgi?id=8496
              REGRESSION: Dragging to select text around a text field causes the text field to scroll.
      
              Test: manual-tests/text-field-autoscroll.html
      
              * bridge/mac/FrameMac.mm: (WebCore::FrameMac::handleMouseMoveEvent): Start the frame's autoscroll timer
              even when we're calling over the bridge to handle the autoscroll.
              * page/Frame.cpp: (WebCore::Frame::stopAutoscrollTimer): Clear out pointer to layer.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@14002 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      ace6082a
    • tomernic's avatar
      Reviewed by John Sullivan. · f1ed87e2
      tomernic authored
              <rdar://problem/4476875> Support printing for embedded Netscape plugins
      
              NOTE: This only works with the Flash plugin right now.  It appears that the other
              major plugins either have awful printing support, or no printing support.  If someone
              can find an example of any other embedded Netscape plugin printing in any browser on
              the Mac, I will be happy to eat my own words!
      
              * Plugins/WebBaseNetscapePluginView.m:
              (-[WebBaseNetscapePluginView drawRect:]):
              When printing, get the printed bitmap via -_printedPluginBitmap, and draw it into the
              plugin view.
              (-[WebBaseNetscapePluginView _printedPluginBitmap]):
              Call NPP_Print on the plugin to render it into a GWorld.  This GWorld has the same
              underlying buffer as an NSBitmapImageRep, which is returned to the caller.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@14001 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      f1ed87e2
    • bdakin's avatar
      Adding a few more background-size tests that include background- · 6d864cbf
      bdakin authored
              origin.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@14000 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      6d864cbf
    • ggaren's avatar
      - And again. · e613d9b6
      ggaren authored
              * WebCore.vcproj/WebCore/WebCore.vcproj:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@13999 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      e613d9b6
    • ggaren's avatar
      - Futile attempt to fix Windows build. · 6830f7c2
      ggaren authored
              
              * WebCore.vcproj/WebCore/WebCore.vcproj:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@13998 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      6830f7c2
    • ggaren's avatar
      LayoutTests: · 23e4afae
      ggaren authored
              Tests for global constants related to CSSRule, CSSValue, Event, and
              NodeFilter objects.
      
              * fast/dom/constants-expected.txt: Added.
              * fast/dom/constants.html: Added.
              * fast/dom/prototype-chain-expected.txt:
              * fast/dom/resources/stylesheet.css: Added.
              * fast/dom/xmlhttprequest-get-expected.txt:
      
      WebCore:
      
              Reviewed by Maciej.
      
              - Added autogeneration of JS bindings for CSSRule, CSSValue,
              Event, and NodeFilter.  
      
              - Made related prototype objects hold the relevant constants, to
              match Mozilla and the DOM 2 spec. (Previously, only the related
              constructor objects held those constants, in accordance with the
              DOM 3 spec.)
      
              - Fixed up remaining Windows build issues.
      
              * DerivedSources.make: Added new autogenerated files
              * WebCore.xcodeproj/project.pbxproj: ditto
              * bindings/js/kjs_css.cpp:
              (KJS::DOMCSSRule::classInfo):
              (KJS::DOMCSSRule::getOwnPropertySlot): scope call to classInfo()
              because it's virtual and DOMCSSRule has a derrived class now.
              (KJS::DOMCSSRule::put): ditto
              (KJS::DOMCSSRuleFunc::callAsFunction):
              (KJS::toJS):
              * bindings/js/kjs_css.h:
              * bindings/js/kjs_events.cpp:
              (KJS::toJS):
              * bindings/js/kjs_events.h:
              * bindings/js/kjs_html.cpp:
              (KJS::OptionConstructorImp::OptionConstructorImp):
              * bindings/js/kjs_traversal.cpp:
              (KJS::toJS):
              * bindings/js/kjs_traversal.h:
              * bindings/js/kjs_window.cpp: 
              (KJS::Window::getValueProperty): added CSSValue global object
              * bindings/js/kjs_window.h:
              (KJS::Window::):
              * bindings/scripts/CodeGeneratorJS.pm: Changed generator to write
              constants to prototype objects (previously only wrote constants to
              constructor objects)
              * css/CSSPrimitiveValue.idl: Removed LegacyParent since CSSValue now
              exists in IDL
              * css/CSSRule.idl: Added.
              * css/CSSValue.idl: Added.
              * css/css_ruleimpl.h:
              (WebCore::CSSRule::):
              * css/css_valueimpl.h:
              * dom/Event.idl: Added.
              * dom/MutationEvent.idl: Removed LegacyParent since Event now exists
              in IDL
              * dom/NodeFilter.idl: Added.
              * dom/UIEvent.idl: Removed LegacyParent since event now exists in IDL
              * dom/dom2_eventsimpl.h:
              (WebCore::Event::):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@13997 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      23e4afae
    • darin's avatar
      - one more attempt to fix Windows build · 6157f010
      darin authored
              * platform/cairo/GraphicsContextCairo.cpp:
              (WebCore::GraphicsContext::fillRect): Update to use Color and match
              the similar function on GraphicsContextMac.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@13996 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      6157f010
    • bdakin's avatar
      Reviewed by Hyatt. · 24e0f6cd
      bdakin authored
              Fix for http://bugzilla.opendarwin.org/show_bug.cgi?id=8495 
              REGRESSION: Sidebar on cnn.com is hosed
      
              * platform/mac/ImageMac.mm:
              (WebCore::Image::drawTiled): Use the size of the destination rect, 
              not the oneTileRect in the no-pattern case.
              * rendering/RenderBox.cpp:
              (WebCore::RenderBox::paintBackgroundExtended): Initialize 
              scaledWidth and scaledHeight to the appropriate value (was wrong in 
              scroll case), adjust position at appropriate times, and take out 
              no-repeat clause for now since we don't have enough test cases yet 
              to be sure we won't cause massive regressions.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@13995 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      24e0f6cd
    • darin's avatar
      - attempt to fix Windows build after my last check-in · 9bfad4b8
      darin authored
              * WebCore.vcproj/Image Viewer/ImageView.cpp: Changed calls to use the
              new IntRect-based API.
      
              * html/CanvasPattern.cpp: (WebCore::CanvasPattern::CanvasPattern):
              Put appropriate ifdefs around the m_platformImage initializer.
      
              * page/Frame.cpp: Make Frame::adjustPageHeight Mac-OS-X-only for now
              since it's used for printing and we don't have printing going on any
              other platforms yet.
      
              * platform/cairo/GraphicsContextCairo.cpp: Take out constructor that
              takes only the "for printing" boolean for now.
      
              * platform/cairo/ImageCairo.cpp: Include the GraphicsContext.h header.
      
              * platform/win/TemporaryLinkStubs.cpp: (GraphicsContext::setShadow):
              Fix up this stub and remove the GraphicsContext empty constructor stub.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@13994 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      9bfad4b8
    • darin's avatar
      - fix build · bf5dd419
      darin authored
              * WebCore.xcodeproj/project.pbxproj: Replaced absolute path on my system
              with a build-result-relative path; also removed some source files from the
              list of resources to install!
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@13993 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      bf5dd419
    • 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
  2. 20 Apr, 2006 7 commits
    • adele's avatar
      Updated test results for: · 745df9ff
      adele authored
              - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=8276
                REGRESSION (NativeTextField): Pasting a Finder item into a text field results in
                  a file: URL being pasted instead of just the file name
              - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=8283
                REGRESSION: File's path doesn't appear after dragging file into input field
      
              * editing/pasteboard/drop-text-without-selection-expected.txt:
              * fast/forms/input-paste-undo-expected.txt:
              * fast/forms/input-truncate-newline-expected.txt:
              * fast/forms/plaintext-mode-2-expected.txt:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@13991 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      745df9ff
    • adele's avatar
      WebCore: · 335aaaae
      adele authored
              Reviewed by Darin.
      
              WebCore part of:
              - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=8276
                REGRESSION (NativeTextField): Pasting a Finder item into a text field results in
                  a file: URL being pasted instead of just the file name
              - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=8283
                REGRESSION: File's path doesn't appear after dragging file into input field
      
              * bridge/mac/WebCoreFrameBridge.h:
              * bridge/mac/WebCoreFrameBridge.mm:
              (-[WebCoreFrameBridge isDragCaretRichlyEditable]): Added.
              * manual-tests/plain-text-paste.html: Added.
              * manual-tests/resources/plain-text-paste: Added.
              * manual-tests/resources/plain-text-paste/1.textClipping: Added.
              * manual-tests/resources/plain-text-paste/2.textClipping: Added.
              * manual-tests/resources/plain-text-paste/3.gif: Added.
              * manual-tests/resources/plain-text-paste/4.txt: Added.
              * manual-tests/resources/plain-text-paste/5.webloc: Added.
      
      WebKit:
      
              Reviewed by Darin.
      
              WebKit part of:
              - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=8276
                REGRESSION (NativeTextField): Pasting a Finder item into a text field results in
                  a file: URL being pasted instead of just the file name
              - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=8283
                REGRESSION: File's path doesn't appear after dragging file into input field
      
              * WebView/WebHTMLView.m:
              (-[WebHTMLView _plainTextFromPasteboard:]): Added method that tries to copy AppKit
              text fields' logic for extracting plain text from the pasteboard.
              (-[WebHTMLView _pasteAsPlainTextWithPasteboard:]): Added helper method.
              (-[WebHTMLView _shouldInsertText:replacingDOMRange:givenAction:]):
              (-[WebHTMLView _shouldReplaceSelectionWithText:givenAction:]):
              (-[WebHTMLView readSelectionFromPasteboard:]): Paste as plain text if
              rich text is not allowed.
              (-[WebHTMLView validateUserInterfaceItem:]): Changed to not allow pasteAsRichText:
              if the paste is not going to be handled by the DOM and the selection
              does not allow pasting rich text.
              (-[WebHTMLView concludeDragForDraggingInfo:actionMask:]): Paste as plain text if
              rich text is not allowed.
              (-[WebHTMLView paste:]): Ditto.
              (-[WebHTMLView pasteAsPlainText:]):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@13990 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      335aaaae
    • darin's avatar
      WebCore: · 331b6de1
      darin authored
              Reviewed by Adele.
      
              - WebCore part of http://bugzilla.opendarwin.org/show_bug.cgi?id=8505
                eliminate WebCoreGraphics bridge, demonstrate new SystemInterface technique
      
              * platform/mac/WebCoreGraphicsBridge.h: Removed.
              * platform/mac/WebCoreGraphicsBridge.m: Removed.
              * platform/mac/WebCoreSystemInterface.h: Added.
              * platform/mac/WebCoreSystemInterface.mm: Added.
      
              * WebCore.exp: Add new SystemInterface globals, remove WebCoreGraphicsBridge.
      
              * WebCore.xcodeproj/project.pbxproj: Updated for removed and added files.
              Sorted files.
      
              * bridge/mac/FrameMac.mm: Removed unneeded include of WebCoreGraphicsBridge.h.
      
              * platform/mac/ClipboardMac.mm: (WebCore::ClipboardMac::setDragImage):
              Moved code from WebGraphicsBridge here, using WebCoreSystemInterface so we can
              call wkSetDragImage.
      
              * platform/mac/GraphicsContextMac.mm: (WebCore::GraphicsContext::drawFocusRing):
              Moved code from WebGraphicsBridge here, using WebCoreSystemInterface so we can
              call wkDrawFocusRing.
      
              * rendering/RenderThemeMac.mm: (WebCore::RenderThemeMac::paintTextField):
              Call wkDrawBezeledTextFieldCell from WebCoreSystemInterface instead of using
              WebGraphicsBridge to do the same thing.
      
      WebKit:
      
              Reviewed by Adele.
      
              - WebKit part of http://bugzilla.opendarwin.org/show_bug.cgi?id=8505
                eliminate WebCoreGraphics bridge, demonstrate new SystemInterface technique
      
              * WebCoreSupport/WebGraphicsBridge.h: Removed.
              * WebCoreSupport/WebGraphicsBridge.m: Removed.
              * WebCoreSupport/WebSystemInterface.h: Added.
              * WebCoreSupport/WebSystemInterface.m: Added.
      
              * WebKit.xcodeproj/project.pbxproj: Updated for removed and added files.
      
              * WebCoreSupport/WebImageData.m: Removed unneeded include of WebGraphicsBridge.h.
              * WebCoreSupport/WebImageRenderer.m: Ditto.
              * WebCoreSupport/WebTextRenderer.m: Ditto.
      
              * WebView/WebFrameView.m: (-[WebFrameView initWithFrame:]): Guarded all the one-time
              initialization inside a boolean, just in case some things take a little time. Added
              a call to InitWebCoreSystemInterface to the one-time initialization here. Later, we
              will need to add it in some other places if we call code that requires the use of
              WebCoreSystemInterface functions from anywhere that can be invoked before creations
              of the first WebFrameView, but for now there is no need.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@13989 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      331b6de1
    • adele's avatar
      LayoutTests: · 7a470a72
      adele authored
              Test for http://bugzilla.opendarwin.org/show_bug.cgi?id=8273
              REGRESSION: Read only input text field renders at the wrong height when value attribute is not present
      
              * fast/forms/input-readonly-empty-expected.checksum: Added.
              * fast/forms/input-readonly-empty-expected.png: Added.
              * fast/forms/input-readonly-empty-expected.txt: Added.
              * fast/forms/input-readonly-empty.html: Added.
      
      WebCore:
      
              Reviewed by Hyatt.
      
              Fix for http://bugzilla.opendarwin.org/show_bug.cgi?id=8273
              REGRESSION: Read only input text field renders at the wrong height when value attribute is not present
      
              Test: fast/forms/input-readonly-empty.html
      
              * rendering/RenderBlock.h: Added hasLineIfEmpty.
              * rendering/RenderBlock.cpp:
              (WebCore::RenderBlock::hasLineIfEmpty): Added.  Checks for rootEditableElement as well as 
               a shadowNode who has an input element as a parent.
              (WebCore::RenderBlock::getBaselineOfLastLineBox): Calls hasLineIfEmpty instead of just checking for the rootEditableElement.
              * rendering/bidi.cpp: (WebCore::RenderBlock::layoutInlineChildren): ditto.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@13988 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      7a470a72
    • thatcher's avatar
      Reviewed by Timothy. · 034c3c5b
      thatcher authored
              Removed TO_NODE_OFFSET and TO_NODE_ADDRESS macros. These can just be done inline with pointer math.
      
              * platform/DeprecatedString.cpp:
              (allocateNode):
              (freeHandle):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@13987 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      034c3c5b
    • adele's avatar
      Updated test to use webkit-block-placeholder instead of khtml-block-placeholder. · 9fb85916
      adele authored
              * editing/inserting/insert-div-010.html:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@13986 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      9fb85916
    • adele's avatar
      Updating test results that were incorrectly checked in · 42f2d1c0
      adele authored
              when many of the table test results changed recently due to Color
              improvements.
      
              * tables/mozilla/bugs/bug625-expected.checksum:
              * tables/mozilla/bugs/bug625-expected.png:
              * tables/mozilla/bugs/bug625-expected.txt:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@13985 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      42f2d1c0
  3. 19 Apr, 2006 18 commits
    • adele's avatar
      Updated results after rolling out optimizations in setInnerText and setInnerHTML. · 2080b38c
      adele authored
              * fast/events/updateLayoutForHitTest-expected.txt:
              * fast/forms/input-text-paste-maxlength-expected.txt:
              * fast/text/attributed-substring-from-range-expected.txt:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@13984 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      2080b38c
    • adele's avatar
      Rubber-stamped by Darin. · e3b7f4ed
      adele authored
              Removed optimizations recently added in setInnerHTML and setInnerText.  The setInnerHTML change broke a first-letter style test.
              The setInnerText change caused an empty text node to get added when setting inner text to an empty string.  The bug that this
              change went in with remains fixed.
      
              * html/HTMLElement.cpp:
              (WebCore::HTMLElement::setInnerHTML):
              (WebCore::HTMLElement::setInnerText):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@13983 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      e3b7f4ed
    • thatcher's avatar
      Reviewed by Haytt. · 71bcaf83
      thatcher authored
              - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=6770
                REGRESSION: Incomplete repaint when block with clipping grows
      
              * manual-tests/repaint-resized-overflow.html: Added.
              * rendering/RenderLayer.cpp:
              (WebCore::RenderLayer::RenderLayer):
              (WebCore::RenderLayer::computeRepaintRects): Set the m_repaintOverflowOnResize
              flag to true if our object itself needs layout or if we're an overflow
              and have a normal child that needs layout, in which case if we end up
              resizing it will be because of the child, and that child might have not repainted
              itself correctly during its own layout.
              (WebCore::RenderLayer::updateLayerPositions): Do a full repaint if
              m_repaintOverflowOnResize is set and we resized but didn't move.
              * rendering/RenderLayer.h:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@13982 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      71bcaf83
    • thatcher's avatar
      Reviewed by Hyatt. · 005ab4fd
      thatcher authored
              - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=8352
                CSS text-shadow does not repaint completely when changed
      
              * manual-tests/dynamic-shadow.html: Added.
              * rendering/render_style.cpp:
              (WebCore::RenderStyle::diff): Changed to return Layout when text-shadow
              changes.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@13981 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      005ab4fd
    • thatcher's avatar
      Reviewed by Timothy. · 87e718c5
      thatcher authored
              http://bugzilla.opendarwin.org/show_bug.cgi?id=8442
              Bug 8442: improvements to Cocoa bindings support in WebView - code simplification
      
              Removes the WebController class added earlier; changes NSTreeController and 
              WebView to together without it. Now you can just bind the contentObject binding
              of the tree controller directly to the mainFrameDocument key of the WebView.
      
              * WebCoreSupport/WebFrameBridge.m:
              (-[WebFrameBridge windowObjectCleared]):
              * WebView/WebDataSource.m:
              (-[WebDataSource _setTitle:]):
              * WebView/WebFrame.m:
              (-[WebFrame _closeOldDataSources]):
              * WebView/WebView.m:
              (-[WebView _progressStarted:]):
              (-[WebView _finalProgressComplete]):
              (-[WebView _commonInitializationWithFrameName:groupName:]):
              (-[WebView setMainFrameDocumentReady:]):
              (-[WebView mainFrameDocument]):
              * WebView/WebViewPrivate.h:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@13980 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      87e718c5
    • thatcher's avatar
    • thatcher's avatar
      Reviewed by Timothy. · 2e83e641
      thatcher authored
              http://bugzilla.opendarwin.org/show_bug.cgi?id=6635
              Bug 6635: Crash selecting inspector nodes for tabs that aren't foremost
      
              Stop observing window will close notifications before we tell the highlight window to close,
              this prevents the crash. Also prevent drawing highlights for hidden tabs.
      
              * WebInspector/WebInspector.m:
              (-[WebInspector _highlightNode:]):
              * WebInspector/WebNodeHighlight.m:
              (-[WebNodeHighlight expire]):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@13978 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      2e83e641
    • adele's avatar
      Reviewed by Darin. · a063b9e0
      adele authored
              Added readOnly methods for HTMLInputElement and HTMLTextAreaElement so the DOM bindings can call
              a method with the same name.  This will make it easier to autogenerate the DOM bindings in the future.
       
              * html/HTMLInputElement.h: (WebCore::HTMLInputElement::readOnly): Added. Calls isReadOnlyControl.
              * html/HTMLTextAreaElement.h: (WebCore::HTMLTextAreaElement::readOnly): ditto.
              * bindings/js/kjs_html.cpp:
              (KJS::JSHTMLElement::inputGetter): Calls readOnly instead of isReadOnlyControl.
              (KJS::JSHTMLElement::textAreaGetter): ditto.
              * bindings/objc/DOMHTML.mm:
              (-[DOMHTMLInputElement readOnly]): ditto.
              (-[DOMHTMLTextAreaElement readOnly]): Calls readOnly instead of getting the attribute directly.
              (-[DOMHTMLTextAreaElement setReadOnly:]): Calls setReadOnly instead of setting the attribute directly.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@13977 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      a063b9e0
    • thatcher's avatar
      Reviewed by Timothy. · 3fbf3b0b
      thatcher authored
              http://bugzilla.opendarwin.org/show_bug.cgi?id=6637
              Bug 6637: selecting node in Inspector after closing window crashes Safari
      
              When the window the Web Inspector was inspecting is closed, the inspector goes into its
              no-selection state. Choosing to inspect another element activates it again. The inspector
              will also follow the WebView if the URL changes and select the root element on the new page.
      
              * WebInspector/WebInspector.m:
              (-[NSWindow setWebFrame:]):
              (-[NSWindow setRootDOMNode:]):
              (-[WebInspector _revealAndSelectNodeInTree:]):
              (-[WebInspector _update]):
              (-[WebInspector _updateRoot]):
              (-[WebInspector inspectedWebViewProgressFinished:]):
              (-[WebInspector inspectedWindowWillClose:]):
              (-[WebInspector webView:didFinishLoadForFrame:]):
              * WebInspector/WebInspectorPanel.m:
              (-[WebInspectorPanel canBecomeMainWindow]):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@13976 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      3fbf3b0b
    • adele's avatar
      LayoutTests: · d8a760c2
      adele authored
              Updated results for: http://bugzilla.opendarwin.org/show_bug.cgi?id=8297
              REGRESSION: Input element extends outside of DIV element at http://www.macdock.com/
      
              * editing/selection/3690703-2-expected.checksum:
              * editing/selection/3690703-2-expected.png:
              * editing/selection/3690703-2-expected.txt:
              * editing/selection/3690703-expected.checksum:
              * editing/selection/3690703-expected.png:
              * editing/selection/3690703-expected.txt:
              * editing/selection/3690719-expected.checksum:
              * editing/selection/3690719-expected.png:
              * editing/selection/3690719-expected.txt:
              * fast/forms/input-appearance-minWidth-expected.checksum:
              * fast/forms/input-appearance-minWidth-expected.png:
              * fast/forms/input-appearance-minWidth-expected.txt:
              * fast/forms/input-appearance-width-expected.checksum:
              * fast/forms/input-appearance-width-expected.png:
              * fast/forms/input-appearance-width-expected.txt:
              * fast/forms/input-double-click-selection-gap-bug-expected.checksum:
              * fast/replaced/width100percent-expected.checksum:
              * fast/replaced/width100percent-expected.png:
              * fast/replaced/width100percent-expected.txt:
              * tables/mozilla/bugs/bug1188-expected.checksum:
              * tables/mozilla/bugs/bug1188-expected.png:
              * tables/mozilla/bugs/bug1188-expected.txt:
              * tables/mozilla/bugs/bug12384-expected.checksum:
              * tables/mozilla/bugs/bug12384-expected.png:
              * tables/mozilla/bugs/bug12384-expected.txt:
              * tables/mozilla/bugs/bug18359-expected.checksum:
              * tables/mozilla/bugs/bug18359-expected.png:
              * tables/mozilla/bugs/bug18359-expected.txt:
              * tables/mozilla/bugs/bug55545-expected.checksum:
              * tables/mozilla/bugs/bug55545-expected.png:
              * tables/mozilla/bugs/bug55545-expected.txt:
              * tables/mozilla/bugs/bug7342-expected.checksum:
              * tables/mozilla/bugs/bug7342-expected.png:
              * tables/mozilla/bugs/bug7342-expected.txt:
              * tables/mozilla_expected_failures/bugs/bug2479-2-expected.checksum:
              * tables/mozilla_expected_failures/bugs/bug2479-2-expected.png:
              * tables/mozilla_expected_failures/bugs/bug2479-2-expected.txt:
      
      WebCore:
      
              Reviewed by Hyatt.
      
              Fix for: http://bugzilla.opendarwin.org/show_bug.cgi?id=8297
              REGRESSION: Input element extends outside of DIV element at http://www.macdock.com/
      
              * platform/Font.h: Added runRounding parameter to floatWidth.
              * platform/mac/FontMac.mm: (WebCore::Font::floatWidth): ditto.
              * platform/win/FontWin.cpp: (WebCore::Font::floatWidth): ditto.
              * rendering/RenderTextField.cpp: (WebCore::RenderTextField::calcMinMaxWidth):
                Use new floatWidth parameter to turn off run rounding.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@13975 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      d8a760c2
    • adele's avatar
      Reviewed by Beth. · 35103099
      adele authored
              Fix for Windows build.
      
              * rendering/RenderThemeWin.cpp: (WebCore::RenderThemeWin::determineState):
              Use isReadOnlyControl instead of isReadOnly.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@13974 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      35103099
    • adele's avatar
      LayoutTests: · 6c464a17
      adele authored
              Tests for change to make readonly text fields have dimmed borders.
      
              * fast/forms/input-appearance-readonly-expected.checksum:
              * fast/forms/input-appearance-readonly-expected.png:
              * fast/forms/input-readonly-dimmed-expected.checksum: Added.
              * fast/forms/input-readonly-dimmed-expected.png: Added.
              * fast/forms/input-readonly-dimmed-expected.txt: Added.
              * fast/forms/input-readonly-dimmed.html: Added.
      
      WebCore:
      
       2006-04-19  Adele Peterson  <adele@apple.com>
       
               Reviewed by Beth.
       
               Fix to make readonly text fields have dimmed borders to match AppKit behavior.
       
               Test: fast/forms/input-readonly-dimmed.html
       
               * dom/Node.h: (WebCore::Node::isReadOnlyControl): Changed from const version of isReadOnly.
               * dom/Node.cpp:
               (WebCore::Node::isReadOnlyNode): Changed from isReadOnly.
               (WebCore::Node::setNodeValue): Uses isReadOnlyNode instead of isReadOnly.
               (WebCore::Node::checkSetPrefix): ditto.
               (WebCore::Node::checkAddChild): ditto.
               * dom/Attr.cpp: (WebCore::Attr::setValue): ditto.
               * dom/CharacterData.cpp:
               (WebCore::CharacterData::setData): ditto.
               (WebCore::CharacterData::appendData): ditto.
               (WebCore::CharacterData::checkCharDataOperation): ditto.
               * dom/ContainerNode.cpp: (WebCore::ContainerNode::removeChild): ditto.
               * dom/Element.cpp: (WebCore::Element::setAttribute): ditto.
               * dom/NamedAttrMap.cpp:
               (WebCore::NamedAttrMap::setNamedItem): ditto.
               (WebCore::NamedAttrMap::removeNamedItem): ditto.
               * dom/NamedAttrMap.h: (WebCore::NamedAttrMap::isReadOnlyNode): ditto.
               * dom/NamedNodeMap.h: (WebCore::NamedNodeMap::isReadOnlyNode): ditto.
               * dom/Range.cpp:
               (WebCore::Range::checkDeleteExtract): ditto.
               (WebCore::Range::containedByReadOnly): ditto.
               * dom/Text.cpp: (WebCore::Text::splitText): ditto.
               * dom/dom_xmlimpl.cpp: (WebCore::ProcessingInstruction::setData): ditto.
       
               * bindings/js/kjs_html.cpp:
               (KJS::JSHTMLElement::inputGetter): Uses isReadOnlyControl instead of isReadOnly.
               (KJS::JSHTMLElement::textAreaGetter): ditto.
               * bindings/objc/DOMHTML.mm: (-[DOMHTMLInputElement readOnly]): ditto.
               * rendering/render_form.cpp:
               (WebCore::RenderLineEdit::updateFromElement): ditto.
               (WebCore::RenderTextArea::updateFromElement): ditto.
               * rendering/RenderTextField.cpp:
               (WebCore::RenderTextField::createDivStyle): ditto.
               (WebCore::RenderTextField::updateFromElement): ditto.
       
               * html/HTMLGenericFormElement.cpp: (WebCore::HTMLGenericFormElement::parseMappedAttribute): 
                 When readonly attribute changes, update the theme so the control will repaint.
               * html/HTMLGenericFormElement.h: (WebCore::HTMLGenericFormElement::isReadOnlyControl): Renamed from readOnly.
               * html/HTMLInputElement.h: Removed isReadOnly, since isReadOnlyControl now exists on HTMLGenericFormElement.
               * rendering/RenderTheme.cpp: (WebCore::RenderTheme::isReadOnlyControl): Renamed from isReadOnly.
               * rendering/RenderTheme.h: (WebCore::): Added ReadOnlyState to ControlState enum.
               * rendering/RenderThemeMac.h: Removed NSTextFieldCell since it was only being used to store the enabled state.
                 Removed setTextFieldState since it was updating the enabled state of the cell, which is only used in one place.
               * rendering/RenderThemeMac.mm:
               (WebCore::RenderThemeMac::RenderThemeMac): No longer initialized the NSTextFieldCell.
               (WebCore::RenderThemeMac::adjustRepaintRect): No longer calls setTextFieldState.
               (WebCore::RenderThemeMac::paintTextField): Uses the enabled state and the readonly state to determine whether to draw
                a dimmed version of the aqua border.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@13973 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      6c464a17
    • bdakin's avatar
      Reviewed by Hyatt. · 1e52d833
      bdakin authored
              Fix for http://bugzilla.opendarwin.org/show_bug.cgi?id=8467 Block 
              with percentage background-size doesn't repaint properly when it 
              grows
      
              * manual-tests/backgroundSizeRepaint.html: Added.
              * manual-tests/resources/apple.jpg: Added.
              * rendering/RenderObject.cpp:
              (WebCore::RenderObject::mustRepaintBackgroundOrBorder): We must 
              return true if we have a percentage background-size.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@13972 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      1e52d833
    • hyatt's avatar
      Fix for a regression in the new text fields. Don't allow the repaint · ea43b00b
      hyatt authored
              rect created by dynamic line layout changes to spill out of an overflow
              area's clip region.
      
              (There is no test, since we have no way of testing cases where we repaint
               too much rather than too little.)
      
              Reviewed by darin
      
              * rendering/bidi.cpp:
              (WebCore::RenderBlock::layoutInlineChildren):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@13971 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      ea43b00b
    • hyatt's avatar
      Fix for bug 8449, incomplete repaint of table cell that moved. This · cdb22472
      hyatt authored
              fix also solves some of the textfield repainting problems (e.g., on
              google.com and lxr.mozilla.org).
      
              Reviewed by hyatt
      
              * manual-tests/table-cell-move.html: Added.
              * rendering/RenderCanvas.cpp:
              (WebCore::RenderCanvas::repaintViewRectangle):
              * rendering/RenderTableSection.cpp:
              (WebCore::RenderTableSection::layoutRows):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@13970 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      cdb22472
    • ap's avatar
      Fix by Mitz Pettel, reviewed by Eric. · 67b32c35
      ap authored
              - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=8469
                CRASH: WebCore::CSSParser::parseDashboardRegions when attr() is passed
      
              Test: fast/css/dashboard-regions-attr-crash.html
      
              * css/cssparser.cpp:
              (WebCore::CSSParser::parseDashboardRegions): Added null check for args.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@13969 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      67b32c35
    • eseidel's avatar
      2006-04-18 Rob Buis <buis@kde.org> · 0e0cb73c
      eseidel authored
              Reviewed by eseidel & darin.  Landed by eseidel.
      
              No automated tests possible (from javascript).
      
              Fix for http://bugzilla.opendarwin.org/show_bug.cgi?id=6664:
              Inspector does not highlight SVG elements properly
      
              Make sure RenderObject::absoluteBoundingBoxRect works for
              svg specific render objects by overriding absoluteRects.
              This fixes highlighting in the Inspector of svg shapes, paths,
              images and text.
      
              * kcanvas/RenderPath.cpp:
              (WebCore::RenderPath::absoluteRects):
              * kcanvas/RenderPath.h:
              * kcanvas/RenderSVGImage.cpp:
              (WebCore::RenderSVGImage::getAbsoluteRepaintRect):
              (WebCore::RenderSVGImage::absoluteRects):
              * kcanvas/RenderSVGImage.h:
              * kcanvas/RenderSVGText.cpp:
              (WebCore::RenderSVGText::absoluteRects):
              * kcanvas/RenderSVGText.h:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@13968 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      0e0cb73c
    • eseidel's avatar
      2006-04-17 Rob Buis <buis@kde.org> · 1ae9103a
      eseidel authored
              Reviewed by eseidel.  Landed by eseidel.
      
              Test: svg/custom/tref-update.svg
      
              Fix for http://bugzilla.opendarwin.org/show_bug.cgi?id=6427:
              <tref> element not implemented
      
              Implementation of <tref> element.
      
              * WebCore.xcodeproj/project.pbxproj:
              * ksvg2/svg/SVGTRefElement.cpp: Added.
              (SVGTRefElement::SVGTRefElement):
              (SVGTRefElement::~SVGTRefElement):
              (SVGTRefElement::parseMappedAttribute):
              (SVGTRefElement::closeRenderer):
              (SVGTRefElement::childShouldCreateRenderer):
              (SVGTRefElement::createRenderer):
              * ksvg2/svg/SVGTRefElement.h: Added.
              (WebCore::SVGTRefElement::rendererIsNeeded):
              * ksvg2/svg/SVGTSpanElement.cpp:
              (SVGTSpanElement::childShouldCreateRenderer):
              * ksvg2/svg/SVGTextElement.cpp:
              (WebCore::SVGTextElement::childShouldCreateRenderer):
              * ksvg2/svg/svgtags.in:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@13967 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      1ae9103a
  4. 18 Apr, 2006 3 commits
    • darin's avatar
      - attempt to fix Windows buildbot · 97af04bd
      darin authored
              * Scripts/install-win-extras: Temporarily changed URLs to fr.rpmfind.net.
              We need a better long-term solution for this.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@13966 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      97af04bd
    • darin's avatar
      Reviewed by Beth. · 8674a49c
      darin authored
              * WebInspector/webInspector/inspector.css: Add "-webkit-" prefixes to the border
              radius properties to make the corners rounded again.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@13965 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      8674a49c
    • darin's avatar
      Reviewed by Beth. · aec742f5
      darin authored
              - updated some results that were affected by recent changes
      
              There are some other failures that might be reflecting actual
              bugs; these seem fine though.
      
              * fast/events/updateLayoutForHitTest-expected.checksum:
              * fast/events/updateLayoutForHitTest-expected.png:
              * fast/events/updateLayoutForHitTest-expected.txt:
              Updated because the 4 clicks done in this test now seem to be
              behaving as a triple-click and selecting some text.
      
              * fast/forms/input-appearance-maxlength-expected.txt:
              * fast/forms/input-paste-undo-expected.txt:
              * fast/text/attributed-substring-from-range-expected.txt:
              Unimportant changes to the editing delegate calls.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@13964 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      aec742f5