1. 17 Apr, 2008 3 commits
    • adele@apple.com's avatar
      WebCore: · 22ad69c3
      adele@apple.com authored
      2008-04-17  Dean Jackson  <dino@apple.com>
      
              Reviewed by Hyatt.
      
              Fix for <rdar://problem/5849968> translate method should have Y=0 when only X is present
      
              Test: fast/css/transform-default-parameter.html
      
              * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::applyProperty):
              translate function with only X parameter now leaves the Y parameter as zero.
      
      LayoutTests:
      
      2008-04-17  Dean Jackson  <dino@apple.com>
      
              Reviewed by Hyatt.
      
              Test for <rdar://problem/5849968> translate method should have Y=0 when only X is present
      
              * fast/css/transform-default-parameter.html: Added.
              * platform/mac/fast/css/transform-default-parameter-expected.checksum: Added.
              * platform/mac/fast/css/transform-default-parameter-expected.png: Added.
              * platform/mac/fast/css/transform-default-parameter-expected.txt: Added.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@32002 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      22ad69c3
    • mrowe@apple.com's avatar
      2008-04-17 Mark Rowe <mrowe@apple.com> · f8d942a9
      mrowe@apple.com authored
              Fix the non-Mac builds that I broke with my Mac build fix.
      
              * css/CSSMutableStyleDeclaration.cpp:
              (WebCore::CSSMutableStyleDeclaration::getLayeredShorthandValue): Explicitly use the size_t version of max
              to avoid making assumptions about sizeof(size_t).
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@31993 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      f8d942a9
    • mrowe@apple.com's avatar
      2008-04-17 Mark Rowe <mrowe@apple.com> · 0b524a0a
      mrowe@apple.com authored
              Rubber-stamped by Dan Bernstein.
      
              Fix the Mac build.
      
              * css/CSSMutableStyleDeclaration.cpp:
              (WebCore::CSSMutableStyleDeclaration::getLayeredShorthandValue): Update to use size_t in place of unsigned.
              * dom/NamedNodeMap.h: Ditto.
              * page/AccessibilityObject.h: Forward-declare AccessibilityObjectWrapper in the non-Objective-C case too.
      
      2008-04-17  Mark Rowe  <mrowe@apple.com>
      
              Rubber-stamped by Dan Bernstein.
      
              Fix the Mac build.
      
              * WebView/WebFrame.mm: Define HAVE_ACCESSIBILITY before including AccessibilityObject.h and AXObjectCache.h to get things building
              for now.  This comes from config.h in WebCore but we don't have an equivalent in WebKit so we'll need to work out the correct place
              for this to live going forward.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@31992 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      0b524a0a
  2. 16 Apr, 2008 2 commits
    • jhoneycutt@apple.com's avatar
      Fix size_t -> unsigned conversion warnings. · 46831a6e
      jhoneycutt@apple.com authored
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@31989 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      46831a6e
    • hyatt@apple.com's avatar
      2008-04-16 David Hyatt <hyatt@apple.com> · 6838215c
      hyatt@apple.com authored
              Add support for the ability to draw directly into CSS images using CanvasRenderingContext2D.
      
              Reviewed by olliej
      
              Added fast/canvas/canvas-bg.html
      
              * GNUmakefile.am:
              * WebCore.pro:
              * WebCore.vcproj/WebCore.vcproj:
              * WebCore.xcodeproj/project.pbxproj:
              * WebCoreSources.bkl:
              * css/CSSCanvasValue.cpp: Added.
              (WebCore::CSSCanvasValue::~CSSCanvasValue):
              (WebCore::CSSCanvasValue::cssText):
              (WebCore::CSSCanvasValue::canvasChanged):
              (WebCore::CSSCanvasValue::canvasResized):
              (WebCore::CSSCanvasValue::fixedSize):
              (WebCore::CSSCanvasValue::element):
              (WebCore::CSSCanvasValue::image):
              * css/CSSCanvasValue.h: Added.
              (WebCore::CSSCanvasValue::CSSCanvasValue):
              (WebCore::CSSCanvasValue::isFixedSize):
              (WebCore::CSSCanvasValue::setName):
              * css/CSSGradientValue.cpp:
              * css/CSSGradientValue.h:
              * css/CSSImageGeneratorValue.cpp:
              (WebCore::CSSImageGeneratorValue::generatedImage):
              * css/CSSImageGeneratorValue.h:
              (WebCore::CSSImageGeneratorValue::isFixedSize):
              (WebCore::CSSImageGeneratorValue::fixedSize):
              * css/CSSParser.cpp:
              (WebCore::CSSParser::parseContent):
              (WebCore::CSSParser::parseBackgroundImage):
              (WebCore::CSSParser::parseBorderImage):
              (WebCore::CSSParser::parseCanvas):
              * css/CSSParser.h:
              * dom/Document.cpp:
              (WebCore::Document::getCSSCanvasContext):
              (WebCore::Document::getCSSCanvasElement):
              * dom/Document.h:
              * dom/Document.idl:
              * html/HTMLCanvasElement.cpp:
              (WebCore::HTMLCanvasElement::HTMLCanvasElement):
              (WebCore::HTMLCanvasElement::reset):
              * html/HTMLCanvasElement.h:
              (WebCore::HTMLCanvasElement::setSize):
              * rendering/RenderBox.cpp:
              (WebCore::RenderBox::calculateBackgroundSize):
              (WebCore::RenderBox::imageChanged):
              * rendering/RenderBox.h:
              * rendering/RenderImage.cpp:
              (WebCore::RenderImage::imageChanged):
              * rendering/RenderImage.h:
              (WebCore::RenderImage::imagePtr):
              (WebCore::RenderImage::intrinsicSizeChanged):
              * rendering/RenderImageGeneratedContent.h:
              (WebCore::RenderImageGeneratedContent::imageSize):
              (WebCore::RenderImageGeneratedContent::imagePtr):
              * rendering/RenderListMarker.cpp:
              (WebCore::RenderListMarker::layout):
              (WebCore::RenderListMarker::imageChanged):
              (WebCore::RenderListMarker::calcPrefWidths):
              (WebCore::RenderListMarker::getRelativeMarkerRect):
              * rendering/RenderListMarker.h:
              * rendering/RenderObject.cpp:
              (WebCore::RenderObject::paintBorderImage):
              (WebCore::RenderObject::imageChanged):
              * rendering/RenderObject.h:
              (WebCore::RenderObject::imageChanged):
              * rendering/RenderSVGImage.cpp:
              (WebCore::RenderSVGImage::imageChanged):
              * rendering/RenderSVGImage.h:
              * rendering/RenderStyle.cpp:
              (WebCore::StyleCachedImage::imageSize):
              (WebCore::StyleGeneratedImage::imageSize):
              * rendering/RenderStyle.h:
              (WebCore::StyleCachedImage::data):
              (WebCore::StyleGeneratedImage::StyleGeneratedImage):
              (WebCore::StyleGeneratedImage::data):
              (WebCore::StyleGeneratedImage::imageHasRelativeWidth):
              (WebCore::StyleGeneratedImage::imageHasRelativeHeight):
              (WebCore::StyleGeneratedImage::usesImageContainerSize):
              * rendering/RenderTableCol.cpp:
              (WebCore::RenderTableCol::imageChanged):
              * rendering/RenderTableCol.h:
              * rendering/RenderTableRow.cpp:
              (WebCore::RenderTableRow::imageChanged):
              * rendering/RenderTableRow.h:
              * rendering/RenderTableSection.cpp:
              (WebCore::RenderTableSection::imageChanged):
              * rendering/RenderTableSection.h:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@31981 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      6838215c
  3. 15 Apr, 2008 3 commits
    • hyatt@apple.com's avatar
      2008-04-15 David Hyatt <hyatt@apple.com> · f629f62a
      hyatt@apple.com authored
              Fix the zoom property so that it works properly with font-size.
      
              Reviewed by John Sullivan
      
              Added fast/css/zoom-font-size.html
      
              * css/CSSStyleSelector.cpp:
              (WebCore::CSSStyleSelector::updateFont):
              (WebCore::CSSStyleSelector::applyProperty):
              (WebCore::CSSStyleSelector::checkForZoomChange):
              * css/CSSStyleSelector.h:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@31920 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      f629f62a
    • hyatt@apple.com's avatar
      2008-04-15 David Hyatt <hyatt@apple.com> · d877372b
      hyatt@apple.com authored
              https://bugs.webkit.org/show_bug.cgi?id=18467
      
              Make sure to ignore zoom:0.  That is not supposed to actually do anything.  It's a hack in IE
              to cause an element to set "hasLayout."
      
              Reviewed by Anders
      
              Added fast/css/zoom-property-parsing.html
      
              * css/CSSParser.cpp:
              (WebCore::CSSParser::parseValue):
              * css/CSSStyleSelector.cpp:
              (WebCore::CSSStyleSelector::applyProperty):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@31915 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      d877372b
    • timothy@apple.com's avatar
      Fixes the regression where error and warning bubbles would not be added · 3bf4826f
      timothy@apple.com authored
      to the source view of a resource.
      
      https://bugs.webkit.org/show_bug.cgi?id=18495
      
      Reviewed by Adam Roben.
      
      * css/view-source.css:
      (.webkit-html-message-bubble): Add a min-height to make sure the border-radius
      has enough room to apply.
      * page/inspector/Console.js:
      (WebInspector.Console.prototype.addMessage): Removed code that added messages
      to resource panels and incremented error and warning counts on resources.
      Now just call ResourcesPanel.addMessageToResource after assigning the resource
      to the console message.
      (WebInspector.Console.prototype.clearMessages): Removed code that cleared error
      and warning counts from resources an call ResourcesPanel.clearMessages.
      * page/inspector/ResourcesPanel.js:
      (WebInspector.ResourcesPanel.prototype.addMessageToResource): Call addMessage
      on the resource's view, if it is implemented.
      (WebInspector.ResourcesPanel.prototype.clearMessages): Call clearMessages
      on all the resource views for the ones that implement it.
      (WebInspector.ResourcesPanel.prototype.refreshResource): Call _resourceView
      to make the resource's view if needed. Use a local view variable.
      (WebInspector.ResourcesPanel.prototype._resourceView): Added helper function
      to create a resource view if needed.
      * page/inspector/SourceView.js:
      (WebInspector.SourceView.prototype.setupSourceFrameIfNeeded): Delete the
      _frameNeedsSetup property at the beginning to prevent recursion. Get the
      length of the messages array when assigning the local length variable.
      (WebInspector.SourceView.prototype.addMessage): Renamed from addMessageToSource.
      (WebInspector.SourceView.prototype.clearMessages): Added. Clear all the message
      bubbles that might be sprinkled in the source. Also clears the messages array.
      (WebInspector.SourceView.prototype._addMessageToSource): Create the image
      element in the Inspector's document so we can use relative image URLs. Then
      adopt the image element into the frame's document.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@31909 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      3bf4826f
  4. 14 Apr, 2008 1 commit
    • hyatt@apple.com's avatar
      2008-04-14 David Hyatt <hyatt@apple.com> · 82b7dbbd
      hyatt@apple.com authored
              Add support for gradients in the CSS content property.
      
              Reviewed by olliej
      
              Added fast/gradients/generated-gradients.html
      
              * GNUmakefile.am:
              * WebCore.pro:
              * WebCore.vcproj/WebCore.vcproj:
              * WebCore.xcodeproj/project.pbxproj:
              * WebCoreSources.bkl:
              * css/CSSParser.cpp:
              (WebCore::CSSParser::parseContent):
              * css/CSSStyleSelector.cpp:
              (WebCore::CSSStyleSelector::applyProperty):
              (WebCore::CSSStyleSelector::styleImage):
              (WebCore::CSSStyleSelector::mapBackgroundImage):
              * css/CSSStyleSelector.h:
              * html/HTMLImageElement.cpp:
              (WebCore::HTMLImageElement::attach):
              * rendering/RenderContainer.cpp:
              (WebCore::RenderContainer::updateBeforeAfterContentForContainer):
              * rendering/RenderImage.cpp:
              (WebCore::RenderImage::RenderImage):
              (WebCore::RenderImage::setCachedImage):
              (WebCore::RenderImage::paintReplaced):
              (WebCore::RenderImage::calcReplacedWidth):
              (WebCore::RenderImage::calcReplacedHeight):
              (WebCore::RenderImage::calcAspectRatioWidth):
              (WebCore::RenderImage::calcAspectRatioHeight):
              * rendering/RenderImage.h:
              (WebCore::RenderImage::hasImage):
              (WebCore::RenderImage::image):
              (WebCore::RenderImage::errorOccurred):
              (WebCore::RenderImage::usesImageContainerSize):
              (WebCore::RenderImage::setImageContainerSize):
              (WebCore::RenderImage::imageHasRelativeWidth):
              (WebCore::RenderImage::imageHasRelativeHeight):
              (WebCore::RenderImage::imageSize):
              * rendering/RenderImageGeneratedContent.cpp: Added.
              (WebCore::RenderImageGeneratedContent::RenderImageGeneratedContent):
              (WebCore::RenderImageGeneratedContent::~RenderImageGeneratedContent):
              (WebCore::RenderImageGeneratedContent::setStyleImage):
              * rendering/RenderImageGeneratedContent.h: Added.
              (WebCore::RenderImageGeneratedContent::hasImage):
              (WebCore::RenderImageGeneratedContent::image):
              (WebCore::RenderImageGeneratedContent::errorOccurred):
              (WebCore::RenderImageGeneratedContent::usesImageContainerSize):
              (WebCore::RenderImageGeneratedContent::setImageContainerSize):
              (WebCore::RenderImageGeneratedContent::imageHasRelativeWidth):
              (WebCore::RenderImageGeneratedContent::imageHasRelativeHeight):
              (WebCore::RenderImageGeneratedContent::imageSize):
              * rendering/RenderObject.cpp:
              (WebCore::RenderObject::createObject):
              * rendering/RenderStyle.cpp:
              (WebCore::StyleCachedImage::imageHasRelativeWidth):
              (WebCore::StyleCachedImage::imageHasRelativeHeight):
              (WebCore::StyleCachedImage::usesImageContainerSize):
              (WebCore::RenderStyle::contentDataEquivalent):
              (WebCore::RenderStyle::setContent):
              (WebCore::ContentData::clear):
              * rendering/RenderStyle.h:
              (WebCore::StyleGeneratedImage::imageHasRelativeWidth):
              (WebCore::StyleGeneratedImage::imageHasRelativeHeight):
              (WebCore::StyleGeneratedImage::usesImageContainerSize):
              (WebCore::BackgroundLayer::setBackgroundImage):
              (WebCore::ContentData::):
              (WebCore::RenderStyle::setListStyleImage):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@31873 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      82b7dbbd
  5. 13 Apr, 2008 1 commit
    • hyatt@apple.com's avatar
      2008-04-12 David Hyatt <hyatt@apple.com> · 18d8fbf3
      hyatt@apple.com authored
              Memory management cleanup for the new StyleCachedImage and StyleGeneratedImage classes.  Make the back end
              values hold refptrs to cached front end values.  This will avoid malloc churn as RenderStyles get
              re-resolved.
      
              Reviewed by olliej
      
              * css/CSSCursorImageValue.cpp:
              (WebCore::CSSCursorImageValue::updateIfSVGCursorIsUsed):
              (WebCore::CSSCursorImageValue::cachedImage):
              * css/CSSCursorImageValue.h:
              * css/CSSImageGeneratorValue.cpp:
              (WebCore::CSSImageGeneratorValue::CSSImageGeneratorValue):
              (WebCore::CSSImageGeneratorValue::generatedImage):
              * css/CSSImageGeneratorValue.h:
              * css/CSSImageValue.cpp:
              (WebCore::CSSImageValue::CSSImageValue):
              (WebCore::CSSImageValue::~CSSImageValue):
              (WebCore::CSSImageValue::cachedImage):
              * css/CSSImageValue.h:
              * css/CSSStyleSelector.cpp:
              (WebCore::CSSStyleSelector::applyProperty):
              (WebCore::CSSStyleSelector::createStyleImage):
              * css/CSSStyleSelector.h:
              * rendering/RenderStyle.h:
              (WebCore::StyleCachedImage::cachedImage):
              (WebCore::StyleGeneratedImage::StyleGeneratedImage):
              (WebCore::StyleGeneratedImage::data):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@31849 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      18d8fbf3
  6. 12 Apr, 2008 2 commits
    • hyatt@apple.com's avatar
      2008-04-12 David Hyatt <hyatt@apple.com> · 5aee0498
      hyatt@apple.com authored
              Add support for list-style-image gradients.  Also improve the image comparisons between two RenderStyles        
              to not mistakenly believe that images have changed.
      
              Reviewed by olliej
      
              Added fast/gradients/list-item-gradient.html
      
              * css/CSSComputedStyleDeclaration.cpp:
              (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
              * css/CSSParser.cpp:
              (WebCore::CSSParser::parseValue):
              * css/CSSStyleSelector.cpp:
              (WebCore::CSSStyleSelector::applyProperty):
              (WebCore::CSSStyleSelector::createStyleImage):
              * rendering/RenderListMarker.cpp:
              (WebCore::RenderListMarker::RenderListMarker):
              (WebCore::RenderListMarker::paint):
              (WebCore::RenderListMarker::imageChanged):
              (WebCore::RenderListMarker::calcPrefWidths):
              * rendering/RenderListMarker.h:
              * rendering/RenderStyle.cpp:
              (WebCore::imagesEquivalent):
              (WebCore::BorderImage::operator==):
              (WebCore::StyleCachedImage::errorOccurred):
              (WebCore::BackgroundLayer::operator==):
              (WebCore::StyleInheritedData::StyleInheritedData):
              (WebCore::cursorDataEquivalent):
              (WebCore::StyleInheritedData::operator==):
              (WebCore::RenderStyle::diff):
              * rendering/RenderStyle.h:
              (WebCore::StyleImage::errorOccurred):
              (WebCore::RenderStyle::listStyleImage):
              (WebCore::RenderStyle::setListStyleImage):
              (WebCore::RenderStyle::initialListStyleImage):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@31845 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      5aee0498
    • hyatt@apple.com's avatar
      2008-04-12 David Hyatt <hyatt@apple.com> · 01f2c572
      hyatt@apple.com authored
              Add gradient support to border-image (even though it's mostly just weird).
      
              Reviewed by Dan
      
              Added fast/gradients/border-image-gradient.html
                    fast/gradients/border-image-gradient-sides-and-corners.html
      
              * css/CSSBorderImageValue.h:
              (WebCore::CSSBorderImageValue::imageValue):
              * css/CSSStyleSelector.cpp:
              (WebCore::CSSStyleSelector::applyProperty):
              * platform/graphics/GeneratedImage.cpp:
              (WebCore::GeneratedImage::draw):
              * rendering/InlineFlowBox.cpp:
              (WebCore::InlineFlowBox::paintBoxDecorations):
              * rendering/RenderBox.cpp:
              (WebCore::RenderBox::imageChanged):
              * rendering/RenderObject.cpp:
              (WebCore::RenderObject::mustRepaintBackgroundOrBorder):
              (WebCore::RenderObject::paintBorderImage):
              (WebCore::RenderObject::paintBorder):
              (WebCore::RenderObject::updateBackgroundImages):
              (WebCore::RenderObject::arenaDelete):
              * rendering/RenderStyle.cpp:
              (WebCore::StyleCachedImage::isLoaded):
              * rendering/RenderStyle.h:
              (WebCore::StyleImage::isLoaded):
              (WebCore::BorderImage::image):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@31837 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      01f2c572
  7. 11 Apr, 2008 2 commits
    • hyatt@apple.com's avatar
      WebCore: · 2c814c47
      hyatt@apple.com authored
      2008-04-11  David Hyatt  <hyatt@apple.com>
      
              Rename CachedResource's ref/deref methods to addClient/removeClient.  This matches the new
              StyleImage class and is a more accurate description of what those methods really do.
      
              Reviewed by olliej
      
              * WebCore.base.exp:
              * css/CSSCursorImageValue.cpp:
              (WebCore::CSSCursorImageValue::updateIfSVGCursorIsUsed):
              * css/CSSFontFaceSource.cpp:
              (WebCore::CSSFontFaceSource::CSSFontFaceSource):
              (WebCore::CSSFontFaceSource::~CSSFontFaceSource):
              * css/CSSImageValue.cpp:
              (WebCore::CSSImageValue::~CSSImageValue):
              (WebCore::CSSImageValue::image):
              * css/CSSImportRule.cpp:
              (WebCore::CSSImportRule::~CSSImportRule):
              (WebCore::CSSImportRule::insertedIntoParent):
              * dom/ProcessingInstruction.cpp:
              (WebCore::ProcessingInstruction::~ProcessingInstruction):
              (WebCore::ProcessingInstruction::checkStyleSheet):
              (WebCore::ProcessingInstruction::parseStyleSheet):
              * dom/XMLTokenizer.cpp:
              (WebCore::XMLTokenizer::~XMLTokenizer):
              (WebCore::XMLTokenizer::endElementNs):
              (WebCore::XMLTokenizer::notifyFinished):
              * html/CanvasPattern.cpp:
              (WebCore::CanvasPattern::CanvasPattern):
              (WebCore::CanvasPattern::~CanvasPattern):
              * html/HTMLImageLoader.cpp:
              (WebCore::HTMLImageLoader::~HTMLImageLoader):
              (WebCore::HTMLImageLoader::setImage):
              (WebCore::HTMLImageLoader::updateFromElement):
              * html/HTMLLinkElement.cpp:
              (WebCore::HTMLLinkElement::~HTMLLinkElement):
              (WebCore::HTMLLinkElement::process):
              * html/HTMLScriptElement.cpp:
              (WebCore::HTMLScriptElement::~HTMLScriptElement):
              (WebCore::HTMLScriptElement::parseMappedAttribute):
              (WebCore::HTMLScriptElement::insertedIntoDocument):
              (WebCore::HTMLScriptElement::removedFromDocument):
              (WebCore::HTMLScriptElement::notifyFinished):
              * html/HTMLTokenizer.cpp:
              (WebCore::HTMLTokenizer::reset):
              (WebCore::HTMLTokenizer::scriptHandler):
              (WebCore::HTMLTokenizer::notifyFinished):
              * loader/CachedCSSStyleSheet.cpp:
              (WebCore::CachedCSSStyleSheet::addClient):
              * loader/CachedCSSStyleSheet.h:
              * loader/CachedFont.cpp:
              (WebCore::CachedFont::addClient):
              * loader/CachedFont.h:
              * loader/CachedImage.cpp:
              (WebCore::CachedImage::addClient):
              * loader/CachedImage.h:
              * loader/CachedResource.cpp:
              (WebCore::CachedResource::addClient):
              (WebCore::CachedResource::removeClient):
              * loader/CachedResource.h:
              * loader/CachedScript.cpp:
              (WebCore::CachedScript::addClient):
              * loader/CachedScript.h:
              * loader/CachedXBLDocument.h:
              * loader/CachedXSLStyleSheet.cpp:
              (WebCore::CachedXSLStyleSheet::addClient):
              * loader/CachedXSLStyleSheet.h:
              * loader/mac/UserStyleSheetLoader.cpp:
              (UserStyleSheetLoader::UserStyleSheetLoader):
              (UserStyleSheetLoader::~UserStyleSheetLoader):
              * platform/mac/ClipboardMac.mm:
              (WebCore::ClipboardMac::setDragImage):
              * rendering/RenderImage.cpp:
              (WebCore::RenderImage::~RenderImage):
              (WebCore::RenderImage::setCachedImage):
              * rendering/RenderListMarker.cpp:
              (WebCore::RenderListMarker::~RenderListMarker):
              (WebCore::RenderListMarker::setStyle):
              * rendering/RenderObject.cpp:
              (WebCore::RenderObject::updateBackgroundImages):
              (WebCore::RenderObject::arenaDelete):
              * rendering/RenderStyle.cpp:
              (WebCore::StyleCachedImage::addClient):
              (WebCore::StyleCachedImage::removeClient):
              * svg/SVGImageLoader.cpp:
              (WebCore::SVGImageLoader::updateFromElement):
              * xml/XSLImportRule.cpp:
              (WebCore::XSLImportRule::~XSLImportRule):
              (WebCore::XSLImportRule::loadSheet):
      
      WebKit/mac:
      
      2008-04-11  David Hyatt  <hyatt@apple.com>
      
              Rename CachedResource ref/deref methods to addClient/removeClient.
      
              Reviewed by olliej
      
              * WebView/WebHTMLView.mm:
              (-[WebHTMLViewPrivate dealloc]):
              (-[WebHTMLViewPrivate finalize]):
              (-[WebHTMLViewPrivate clear]):
              (-[WebHTMLView setPromisedDragTIFFDataSource:WebCore::]):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@31834 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      2c814c47
    • hyatt@apple.com's avatar
      2008-04-11 David Hyatt <hyatt@apple.com> · 805aaf43
      hyatt@apple.com authored
              This patch adds support for CSS gradients as background images.  RenderStyles now hold a StyleImage
              RefPtr, which is a wrapper for two types of images: CachedImages (loaded from URLs) and generated images
              (patterns created on the fly such as gradients).
      
              All of the features of <canvas> are supported: gradients can be linear or radial, have multiple stops, and
              can specify their points as percentages (for reusable gradients across different box sizes).
      
              Reviewed by olliej
      
              Added fast/gradients/simple-gradients.html
      
              * WebCore.xcodeproj/project.pbxproj:
              * css/CSSBorderImageValue.cpp:
              (WebCore::CSSBorderImageValue::CSSBorderImageValue):
              * css/CSSBorderImageValue.h:
              (WebCore::CSSBorderImageValue::imageValue):
              (WebCore::CSSBorderImageValue::generatorValue):
              * css/CSSComputedStyleDeclaration.cpp:
              (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
              * css/CSSGradientValue.cpp: Added.
              (WebCore::CSSGradientValue::cssText):
              (WebCore::CSSGradientValue::createGradient):
              (WebCore::CSSGradientValue::image):
              (WebCore::compareStops):
              (WebCore::CSSGradientValue::sortStopsIfNeeded):
              (WebCore::CSSGradientValue::resolvePoint):
              (WebCore::CSSGradientValue::resolveRadius):
              * css/CSSGradientValue.h: Added.
              (WebCore::):
              (WebCore::CSSGradientColorStop::CSSGradientColorStop):
              (WebCore::CSSGradientValue::CSSGradientValue):
              (WebCore::CSSGradientValue::type):
              (WebCore::CSSGradientValue::setType):
              (WebCore::CSSGradientValue::setFirstX):
              (WebCore::CSSGradientValue::setFirstY):
              (WebCore::CSSGradientValue::setSecondX):
              (WebCore::CSSGradientValue::setSecondY):
              (WebCore::CSSGradientValue::setFirstRadius):
              (WebCore::CSSGradientValue::setSecondRadius):
              (WebCore::CSSGradientValue::addStop):
              * css/CSSImageGeneratorValue.cpp: Added.
              (WebCore::CSSImageGeneratorValue::~CSSImageGeneratorValue):
              (WebCore::CSSImageGeneratorValue::addClient):
              (WebCore::CSSImageGeneratorValue::removeClient):
              (WebCore::CSSImageGeneratorValue::getImage):
              (WebCore::CSSImageGeneratorValue::putImage):
              * css/CSSImageGeneratorValue.h: Added.
              (WebCore::CSSImageGeneratorValue::isImageGeneratorValue):
              * css/CSSImageValue.h:
              (WebCore::CSSImageValue::isImageValue):
              * css/CSSParser.cpp:
              (WebCore::CSSParser::parseBackgroundImage):
              (WebCore::BorderImageParseContext::commitImage):
              (WebCore::CSSParser::parseBorderImage):
              (WebCore::parseGradientPoint):
              (WebCore::parseGradientColorStop):
              (WebCore::CSSParser::parseGradient):
              * css/CSSParser.h:
              * css/CSSStyleSelector.cpp:
              (WebCore::CSSStyleSelector::applyProperty):
              (WebCore::CSSStyleSelector::createStyleImage):
              (WebCore::CSSStyleSelector::mapBackgroundImage):
              * css/CSSStyleSelector.h:
              * css/CSSValue.h:
              (WebCore::CSSValue::isImageValue):
              (WebCore::CSSValue::isImageGeneratorValue):
              * html/CanvasRenderingContext2D.cpp:
              (WebCore::CanvasRenderingContext2D::isPointInPath):
              * platform/graphics/BitmapImage.cpp:
              (WebCore::BitmapImage::BitmapImage):
              (WebCore::BitmapImage::dataChanged):
              (WebCore::BitmapImage::frameCount):
              * platform/graphics/BitmapImage.h:
              * platform/graphics/GraphicsContext.cpp:
              (WebCore::GraphicsContext::clipToImageBuffer):
              * platform/graphics/GraphicsContext.h:
              * platform/graphics/ImageBuffer.h:
              (WebCore::ImageBuffer::cgImage):
              (WebCore::ImageBuffer::image):
              * platform/graphics/cg/GraphicsContextCG.cpp:
              (WebCore::GraphicsContext::clipToImageBuffer):
              (WebCore::GraphicsContext::paintBuffer):
              (WebCore::GraphicsContext::drawImage):
              * platform/graphics/cg/ImageBufferCG.cpp:
              (WebCore::ImageBuffer::create):
              (WebCore::ImageBuffer::ImageBuffer):
              (WebCore::ImageBuffer::~ImageBuffer):
              (WebCore::ImageBuffer::image):
              (WebCore::ImageBuffer::getImageData):
              (WebCore::ImageBuffer::putImageData):
              (WebCore::ImageBuffer::toDataURL):
              * platform/graphics/cg/ImageCG.cpp:
              (WebCore::BitmapImage::BitmapImage):
              (WebCore::BitmapImage::draw):
              (WebCore::Image::drawPattern):
              * platform/graphics/qt/ImageQt.cpp:
              (WebCore::BitmapImage::BitmapImage):
              * rendering/InlineFlowBox.cpp:
              (WebCore::InlineFlowBox::paintBackground):
              * rendering/RenderBox.cpp:
              (WebCore::RenderBox::calculateBackgroundSize):
              (WebCore::RenderBox::imageChanged):
              (WebCore::RenderBox::paintBackgroundExtended):
              * rendering/RenderObject.cpp:
              (WebCore::RenderObject::mustRepaintBackgroundOrBorder):
              (WebCore::RenderObject::updateBackgroundImages):
              (WebCore::RenderObject::arenaDelete):
              * rendering/RenderStyle.cpp:
              (WebCore::StyleCachedImage::cssValue):
              (WebCore::StyleCachedImage::canRender):
              (WebCore::StyleCachedImage::imageSize):
              (WebCore::StyleCachedImage::setImageContainerSize):
              (WebCore::StyleCachedImage::addClient):
              (WebCore::StyleCachedImage::removeClient):
              (WebCore::StyleCachedImage::image):
              (WebCore::StyleGeneratedImage::cssValue):
              (WebCore::StyleGeneratedImage::imageSize):
              (WebCore::StyleGeneratedImage::setImageContainerSize):
              (WebCore::StyleGeneratedImage::addClient):
              (WebCore::StyleGeneratedImage::removeClient):
              (WebCore::StyleGeneratedImage::image):
              * rendering/RenderStyle.h:
              (WebCore::StyleImage::StyleImage):
              (WebCore::StyleImage::~StyleImage):
              (WebCore::StyleImage::operator==):
              (WebCore::StyleImage::canRender):
              (WebCore::StyleImage::isCachedImage):
              (WebCore::StyleImage::isGeneratedImage):
              (WebCore::StyleCachedImage::StyleCachedImage):
              (WebCore::StyleCachedImage::data):
              (WebCore::StyleCachedImage::isCachedImage):
              (WebCore::StyleGeneratedImage::StyleGeneratedImage):
              (WebCore::StyleGeneratedImage::data):
              (WebCore::StyleGeneratedImage::isGeneratedImage):
              (WebCore::BackgroundLayer::backgroundImage):
              (WebCore::BackgroundLayer::setBackgroundImage):
              (WebCore::BackgroundLayer::containsImage):
              (WebCore::RenderStyle::backgroundImage):
              (WebCore::RenderStyle::initialBackgroundImage):
              * svg/graphics/cg/SVGPaintServerGradientCg.cpp:
              (WebCore::SVGPaintServerGradient::teardown):
              * svg/graphics/cg/SVGResourceMaskerCg.mm:
              (WebCore::SVGResourceMasker::applyMask):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@31830 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      805aaf43
  8. 04 Apr, 2008 2 commits
    • mitz@apple.com's avatar
      Reviewed by Sam Weinig. · 6a397794
      mitz@apple.com authored
              - speed up CSSFontSelector::getFontData()
      
              * css/CSSFontSelector.cpp:
              (WebCore::fontDataForGenericFamily): Factored out of getFontData().
              (WebCore::CSSFontSelector::getFontData): Changed to call
              fontDataForGenericFamily() directly if the map is empty.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@31653 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      6a397794
    • timothy@apple.com's avatar
      Correctly show DOCTYPE in the breadcrumbs and match the CSS rules · 8f6a18bd
      timothy@apple.com authored
      from view-source.css for the DOCTYPE in the DOM tree.
      
      Reviewed by Adam Roben.
      
      * css/view-source.css: Add and correct comments about keeping
      in-sync with inspector.css.
      * page/inspector/ElementsPanel.js:
      (WebInspector.DocumentPanel.prototype.updateBreadcrumb):
      Add a case for Node.DOCUMENT_TYPE_NODE.
      * page/inspector/inspector.css: Add a rule for .webkit-html-doctype.
      * page/inspector/utilities.js:
      (nodeTitleInfo): Use the webkit-html-doctype class for nodes
      with Node.DOCUMENT_TYPE_NODE.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@31639 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      8f6a18bd
  9. 03 Apr, 2008 1 commit
    • mitz@apple.com's avatar
      WebCore: · cd4813bc
      mitz@apple.com authored
      2008-04-03  Nicholas Shanks  <webkit@nickshanks.com>
      
              Updated by Dan Bernstein. Reviewed by Dave Hyatt.
      
              - WebCore part of fixing http://bugs.webkit.org/show_bug.cgi?id=6484
                font-weight does not properly support graded weights
      
              Tests to come: <http://bugs.webkit.org/show_bug.cgi?id=18306>
      
              Build fixes for platforms other than Mac and Windows to come.
      
              * WebCore.vcproj/WebCore.vcproj: Added FontDescription.cpp.
      
              * WebCore.xcodeproj/project.pbxproj: Ditto.
      
              * css/CSSComputedStyleDeclaration.cpp:
              (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): Changed to
              return additional weight value keywords 100, 200, 300, 500, 600, 800
              and 900.
      
              * css/CSSFontSelector.cpp:
              (WebCore::hashForFont): Changed the bold parameter into a weight
              parameter and added the weight to the string to be hashed.
              (WebCore::CSSFontSelector::addFontFaceRule): Changed to apply all CSS
              weight values to the font description.
              (WebCore::CSSFontSelector::getFontData): Updated the fallback logic to
              go through all weights equal or lighter from the desired weight. For
              SVG, to also consider heavier weights.
      
              * css/CSSParser.cpp:
              (WebCore::CSSParser::parseValue): Cleaned up parsing of the font-weight
              property.
      
              * css/CSSStyleSelector.cpp:
              (WebCore::CSSStyleSelector::applyProperty): Changed to apply all CSS
              weight values to the font description.
      
              * platform/graphics/Font.h:
              (WebCore::Font::weight): Updated for the change to
              FontDescription::weight().
      
              * platform/graphics/FontCache.cpp:
              (WebCore::FontPlatformDataCacheKey::FontPlatformDataCacheKey): Replaced
              the bold component of the key with a weight component.
              (WebCore::FontPlatformDataCacheKey::operator==): Updated for the above.
              (WebCore::computeHash): Ditto.
              (WebCore::FontPlatformDataCacheKeyTraits::deletedValue): Removed
              unnecessary parameters.
              (WebCore::FontPlatformDataCacheKeyTraits::emptyValue): Ditto.
              (WebCore::FontCache::getCachedFontPlatformData): Updated for the change
              in FontPlatformDataCacheKey.
      
              * platform/graphics/FontDescription.cpp: Added.
              (WebCore::FontDescription::lighterWeight): Added. Returns a lighter CSS
              font-weight value if there is one, or the lightest value.
              (WebCore::FontDescription::bolderWeight): Added. Returns a heavier CSS
              font-weight value if there is one, or the heaviest value.
      
              * platform/graphics/FontDescription.h:
              (WebCore::FontWeight): Added this enumeration.
              (WebCore::FontDescription::FontDescription):
              (WebCore::FontDescription::bold): Removed.
              (WebCore::FontDescription::weight): Changed to return a FontWeight.
              (WebCore::FontDescription::setBold): Removed.
              (WebCore::FontDescription::setWeight): Changed to take a FontWeight.
      
              * platform/graphics/mac/FontCacheMac.mm:
              (WebCore::toAppKitFontWeight): Added. Maps a FontWeight to the AppKit
              font weight scale of 0-15.
              (WebCore::isAppKitFontWeightBold): Added.
              (WebCore::FontCache::getFontDataForCharacters): Changed to use a weight
              instead of the bold trait for custom fonts, and to decide whether to
              synthesize bold based on the weights rather than the bold trait.
              (WebCore::FontCache::fontExists): Updated for the change in
              WebFontCache .
              (WebCore::FontCache::createFontPlatformData): Ditto. Also changed to
              decide whether to synthesize bold based on the weights rather than on
              the bold trait.
      
              * platform/graphics/win/FontCacheWin.cpp:
              (WebCore::toGDIFontWeight): Added. Maps a FontWeight to a GDI font
              weight constant.
              (WebCore::isGDIFontWeightBold): Added.
              (WebCore::adjustedGDIFontWeight): Added.
              (WebCore::MatchImprovingProcData::MatchImprovingProcData): Added this
              data structure for use by the following callback.
              (WebCore::matchImprovingEnumProc): Added. The logic of this method is a
              simplification of the betterChoice() predicate in WebFontCache.mm, which
              considers only the italic trait and the weight.
              (WebCore::createGDIFont): Added. Similarly to
              +[WebFontCache fontWithFamily:traits:weight:size:], this function
              finds the closest match in the family for the desired italic bit and
              weight.
              (WebCore::FontCache::fontExists): Changed to call createGDIFont().
              (WebCore::FontCache::createFontPlatformData): Ditto. Also changed to
              compute the synthetic bold and synthetic italic flags based on weights
              and italic bits and pass them to the FontPlatformData constructor.
      
              * platform/graphics/win/FontPlatformDataWin.cpp:
              (WebCore::FontPlatformData::FontPlatformData): Changed the bold and
              oblique parameters to mean whether these should be synthesized and
              removed the font enumeration code that used to decide that.
      
              * platform/graphics/win/SimpleFontDataWin.cpp:
              (WebCore::SimpleFontData::smallCapsFontData): Changed to pass the
              synthetic bold and oblique flags from the full-size FontPlatformData to
              the FontPlatformData constructor for the small caps font.
      
              * platform/mac/WebCoreTextRenderer.h:
              * platform/mac/WebCoreTextRenderer.mm:
              (WebCoreFindFont): Added a weight parameter, which is passed to
              +[WebFontCache fontWithFamily:traits:weight:size:].
      
              * platform/mac/WebFontCache.h:
              * platform/mac/WebFontCache.mm:
              (acceptableChoice):
              (betterChoice): Changed to ignore the bold trait. Changed the logic for
              deciding based on weights to prefer the font whose weight is closer to
              the desired one, or, if both candidates' weights are the same distance
              from the desired weight, the one that is more "off-center". 
              (+[WebFontCache internalFontWithFamily:traits:weight:size:]): Changed to
              check for weight when matching by full name. Changed to pass
              the actual desired weight instead of the constant 5 to
              acceptableChoice() and betterChoice(). Changed to use weights to decide
              whether to synthesize bold.
              (+[WebFontCache fontWithFamily:traits:weight:size:]): Added a weight
              parameter, which is passed to the internal method.
      
              * platform/win/PopupMenuWin.cpp:
              (WebCore::PopupMenu::paint): Updated for the change to FontDescription.
      
              * rendering/RenderListBox.cpp:
              (WebCore::RenderListBox::updateFromElement): Ditto.
              (WebCore::RenderListBox::paintItemForeground): Ditto.
      
              * rendering/RenderThemeMac.mm:
              (WebCore::toFontWeight): Added. Maps the AppKit font weight range of
              0-15 to the FontWeight range.
              (WebCore::RenderThemeMac::systemFont): Updated for the change to
              FontDescription.
      
              * rendering/RenderThemeSafari.cpp:
              (WebCore::RenderThemeSafari::systemFont): Ditto.
      
      WebKit/mac:
      
      2008-04-03  Nicholas Shanks  <webkit@nickshanks.com>
      
              Updated by Dan Bernstein. Reviewed by Dave Hyatt.
      
              - WebKit part of fixing http://bugs.webkit.org/show_bug.cgi?id=6484
                font-weight does not properly support graded weights
      
              * WebView/WebHTMLView.mm:
              (-[WebHTMLView _styleFromFontAttributes:]):
              (-[WebHTMLView _originalFontB]):
              (-[WebHTMLView _addToStyle:fontA:fontB:]):
      
      WebKit/win:
      
      2008-04-03  Dan Bernstein  <mitz@apple.com>
      
              Reviewed by Dave Hyatt.
      
              - WebKit part of fixing http://bugs.webkit.org/show_bug.cgi?id=6484
                font-weight does not properly support graded weights
      
              * DOMCoreClasses.cpp:
              (DOMElement::font): Updated for the change to FontDescription.
              * WebCoreSupport/WebDragClient.cpp:
              (dragLabelFont): Ditto.
              * WebKitGraphics.cpp:
              (makeFont): Ditto.
              * WebKitGraphics.h: Added a FIXME.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@31620 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      cd4813bc
  10. 02 Apr, 2008 2 commits
    • beidson@apple.com's avatar
      WebCore: · 96bfd56f
      beidson@apple.com authored
      2008-04-02  Brady Eidson  <beidson@apple.com>
      
              Reviewed by Mitz Pettel
      
              <rdar://problem/5838347> and http://bugs.webkit.org/show_bug.cgi?id=11839
              Webarchive fails to save CSS files in @import statements
      
              * css/CSSStyleSheet.cpp:
              (WebCore::CSSStyleSheet::addSubresourceURLStrings): Recursively add the URL each @import rule under the current style sheet.
              * css/CSSStyleSheet.h:
              * css/StyleSheet.h:
              (WebCore::StyleSheet::addSubresourceURLStrings):
      
              * html/HTMLLinkElement.cpp:
              (WebCore::HTMLLinkElement::getSubresourceAttributeStrings): Add the linked URL as well as all @import
                rules rooted at the linked stylesheet.
      
              * html/HTMLStyleElement.cpp:
              (WebCore::HTMLStyleElement::getSubresourceAttributeStrings): Walk all @import rules rooted at this
                stylesheet to add to the list.
              * html/HTMLStyleElement.h:
      
      LayoutTests:
      
      2008-04-02  Brady Eidson  <beidson@apple.com>
      
              Written by David Kilzer, tweaked by Brady, Reviewed by Mitz Pettel
      
              - test for http://bugs.webkit.org/show_bug.cgi?id=11839
                Webarchive fails to save CSS files in @import statements
      
              The idea is to <link> to a CSS file which @imports another CSS file,
              and also @import a CSS file inside a <style> element, which also @imports another CSS file
      
              Then make sure all 4 of the css files are in the resulting webarchive
      
              * webarchive/resources/test-css-import-recurse.css: Added.
              * webarchive/resources/test-css-import.css: Added.
              * webarchive/resources/test-css-link-recurse.css: Added.
              * webarchive/resources/test-css-link.css: Added.
              * webarchive/test-css-import-expected.txt: Added.
              * webarchive/test-css-import.html: Added.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@31578 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      96bfd56f
    • eric@webkit.org's avatar
      No review, build fix only. · fab59d2a
      eric@webkit.org authored
              Speculative build fix for no-svg build.
              Use #if ENABLE(SVG) instead of #if ENABLE_SVG
      
              * css/CSSMutableStyleDeclaration.cpp:
              (WebCore::CSSMutableStyleDeclaration::getPropertyValue):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@31572 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      fab59d2a
  11. 01 Apr, 2008 1 commit
  12. 31 Mar, 2008 2 commits
    • mitz@apple.com's avatar
      2008-03-31 Dan Bernstein <mitz@apple.com> · 26b747ac
      mitz@apple.com authored
              Reviewed by Darin Adler.
      
              - fix <rdar://problem/5792638> @font-face with downloadable fonts doesn't work with GDI text
      
              * WebCore.vcproj/WebCore.vcproj: Added GetEOTHeader.{h,cpp}
      
              * css/CSSFontFaceSource.cpp:
              (WebCore::CSSFontFaceSource::getFontData): Changed to pass the rendering
              mode to CachedFont::platformDataFromCustomData().
      
              * loader/CachedFont.cpp:
              (WebCore::CachedFont::platformDataFromCustomData): Added a rendering
              mode parameter which is passed down to
              FontCustomPlatformData::fontPlatformData().
      
              * loader/CachedFont.h:
      
              * platform/graphics/win/FontCacheWin.cpp:
              (WebCore::FontCache::fontExists): Changed the number 5 to the named
              constant CLEARTYPE_QUALITY.
      
              * platform/graphics/win/FontCustomPlatformData.cpp:
              (WebCore::FontCustomPlatformData::~FontCustomPlatformData): Added code
              to delete the embedded font reference.
              (WebCore::FontCustomPlatformData::fontPlatformData): Added code to
              create an HFONT from the embedded font reference and pass it along with
              the CGFontRef to the FontPlatformData constructor. Added a rendering
              mode parameter which is passed down to the FontPlatformData constructor.
              (WebCore::EOTStream::EOTStream): Added this helper class used to feed
              data to TTLoadEmbeddedFont().
              (WebCore::EOTStream::read): Added.
              (WebCore::readEmbedProc): Added this TTLoadEmbeddedFont() callback.
              (WebCore::createUniqueFontName): Added. Creates a unique GUID-derived
              font name. 
              (WebCore::createFontCustomPlatformData): Added code to make the font
              accessible to GDI by creating an Embedded OpenType stream and
              activating it in the process under a globally-unique name.
      
              * platform/graphics/win/FontCustomPlatformData.h:
              Added a font reference data member which holds the embedded font.
              (WebCore::FontCustomPlatformData::FontCustomPlatformData): Added a
              rendering mode parameter.
      
              * platform/graphics/win/FontPlatformData.h:
              (WebCore::FontPlatformData::FontPlatformData): Made this class always
              own the CGFontRef and the HFONT by turning these data members into a
              RetainPtr and a RefPtr around a RefCountedHFONT.
              Added an HFONT parameter to the CGFontRef-based constructor.
              Made platformDataInit() private.
              (WebCore::FontPlatformData::hfont):
              (WebCore::FontPlatformData::cgFont):
              (WebCore::FontPlatformData::hash):
              (WebCore::FontPlatformData::RefCountedHFONT::RefCountedHFONT): Added.
              (WebCore::FontPlatformData::RefCountedHFONT::~RefCountedHFONT):
              (WebCore::FontPlatformData::RefCountedHFONT::hfont):
              (WebCore::FontPlatformData::RefCountedHFONT::hash):
      
              * platform/graphics/win/FontPlatformDataCGWin.cpp:
              (WebCore::FontPlatformData::platformDataInit): Changed to take
              ownership of the CGFontRef created here.
              (WebCore::FontPlatformData::FontPlatformData): Added an HFONT parameter
              and a useGDI flag.
      
              * platform/graphics/win/FontPlatformDataWin.cpp:
              (WebCore::FontPlatformData::FontPlatformData): Changed to take ownership
              of the HFONT.
      
              * platform/graphics/win/GetEOTHeader.cpp: Added.
              (WebCore::BigEndianUShort::operator unsigned short):
              (WebCore::BigEndianULong::operator unsigned):
              (WebCore::appendBigEndianStringToEOTHeader):
              (WebCore::getEOTHeader): Added. Creates an Embedded OpenType (.eot)
              header for the given font data, making it suitable as input for
              TTLoadEmbeddedFont.
      
              * platform/graphics/win/GetEOTHeader.h: Added.
      
              * platform/graphics/win/SimpleFontDataCGWin.cpp:
              (WebCore::SimpleFontData::platformDestroy): Removed code to delete parts
              of the FontPlatformData, since they are now always owned and managed
              by the FontPlatformData.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@31507 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      26b747ac
    • rwlbuis@webkit.org's avatar
      Reviewed by Darin. · 796715fe
      rwlbuis@webkit.org authored
              http://bugs.webkit.org/show_bug.cgi?id=15595
              marker property doesn't show up correctly as "shorthand" in inspector
      
              Make sure parsing the marker property sets the individual
              marker properties as implicit with marker as shorthand.
              Also let CSSStyleDecleration::getPropertyValue return
              the correct value for the marker property.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@31453 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      796715fe
  13. 30 Mar, 2008 1 commit
    • mitz@apple.com's avatar
      WebCore: · 35265d31
      mitz@apple.com authored
              Reviewed by Maciej Stachowiak.
      
              - fix assertion failure in CSSParser.cpp's equalIgnoringCase() when
                parsing certain transforms.
      
              Test: fast/css/transform-function-lowercase-assert.html
      
              * css/CSSParser.cpp:
              (WebCore::TransformOperationInfo::TransformOperationInfo): Changed to
              always pass a lowercase string as the second argument of
              equalIgnoringCase().
      
      LayoutTests:
      
              Reviewed by Maciej Stachowiak.
      
              - test for an assertion failure in CSSParser.cpp's
                equalIgnoringCase() when parsing certain transforms.
      
              * fast/css/transform-function-lowercase-assert-expected.txt: Added.
              * fast/css/transform-function-lowercase-assert.html: Added.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@31445 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      35265d31
  14. 29 Mar, 2008 1 commit
    • darin@apple.com's avatar
      2008-03-29 Darin Adler <darin@apple.com> · e6e59e7e
      darin@apple.com authored
              Reviewed by Sam.
      
              - tweak handling of the class attribute to speed up code that
                sets it but never needs to parse it
      
              6% speedup of Acid3 test 26
      
              * css/CSSStyleSelector.cpp:
              (WebCore::CSSStyleSelector::matchRules): Change to use non-virtual
              classNames function since the hasClass bit can only be set for a
              StyledElement.
              (WebCore::CSSStyleSelector::checkOneSelector): Ditto. Also
              streamlined the code a bit for the tag matching as well.
      
              * dom/ClassNames.cpp:
              (WebCore::hasNonASCIIOrUpper): Added. This function does what other
              callers seem to want isLower() to do. We should merge this with
              isLower() in a subsequent cleanup pass.
              (WebCore::ClassNamesData::createVector): Renamed from parseClassAttribute.
              Turns the string into a vector.
              (WebCore::ClassNamesData::containsAll): Added. Used by getElementsByClassName.
      
              * dom/ClassNames.h: Added a separate ClassNameData class so we could hold
              the string and case folding flag as well as the vector. Changed ClassNames
              to have a set function rather than a parseClassAttribute function. Removed
              the "static" from isClassWhitespace. There's no reason to ask for internal linkage.
      
              * dom/ClassNodeList.cpp:
              (WebCore::ClassNodeList::ClassNodeList): Use constructor instead of the
              parseClassAttribute function.
              (WebCore::ClassNodeList::nodeMatches): Get rid of unnneeded isElementNode
              check, since hasClass will only be true for StyledElement nodes. Use the new
              containsAll function in ClassNames instead of having a loop here.
      
              * dom/ClassNodeList.h: Removed unneeded forward declaration.
      
              * dom/Document.cpp: Removed unneeded include.
      
              * dom/Element.cpp:
              (WebCore::Element::cloneNode): Changed code to copy attributes to use a
              function call instead of the assignment operator. This paves the way to
              making the function more efficient, using a virtual function.
              (WebCore::Element::setAttributeMap): Updated for PassRefPtr and for name change
              (element -> m_element).
              (WebCore::Element::createAttributeMap): Changed to use create function instead of
              calling the constructor directly.
              * dom/Element.h: Removed unneeded virtual getClassNames function.
              Changed the argument to setAttributeMap to be a PassRefPtr.
      
              * dom/NamedAttrMap.cpp:
              (WebCore::NamedAttrMap::NamedAttrMap): Updated for name change (element -> m_element).
              (WebCore::NamedAttrMap::getNamedItem): Ditto.
              (WebCore::NamedAttrMap::removeNamedItem): Ditto.
              (WebCore::NamedAttrMap::setNamedItem): Ditto.
              (WebCore::NamedAttrMap::item): Ditto.
              (WebCore::NamedAttrMap::detachFromElement): Ditto.
              (WebCore::NamedAttrMap::setAttributes): Renamed this from the assignment operator.
              (WebCore::NamedAttrMap::addAttribute): Ditto.
              (WebCore::NamedAttrMap::removeAttribute): Ditto.
              (WebCore::NamedAttrMap::isReadOnlyNode): Ditto.
              * dom/NamedAttrMap.h: Removed the copy constructor and assignment operator and added
              a new function, setAttributes, possibly to be made virtual in the future. Made
              isReadOnlyNode non-virtual. Renamed element -> m_element. Made constructor protected
              and added a create function.
      
              * dom/NamedMappedAttrMap.cpp:
              (WebCore::NamedMappedAttrMap::NamedMappedAttrMap): Changed constructor parameter to
              take a StyledElement.
              (WebCore::NamedMappedAttrMap::setClass): Changed to use the new set function.
      
              * dom/NamedMappedAttrMap.h: Made constructor private and added a create function.
              Replaced theparseClassAttribute function with clearClass and setClass functions.
              Replaced the getClassNames function with a classNames function returning a reference
              instead of a pointer.
      
              * dom/NamedNodeMap.h: Changed to start refcount at 1 instead of 0. Removed unneeded
              virtual function isReadOnlyNode.
      
              * dom/StyledElement.cpp:
              (WebCore::StyledElement::parseMappedAttribute): Rewrote class attribute handling to
              use new function names and took out uneeded special case for null attribute.
              (WebCore::StyledElement::createAttributeMap): Changed to use create function instead
              of a direct call to new.
      
              * dom/StyledElement.h: Replaced the virtual getClassNames function with a non-virtual
              inline classNames function.
      
              * html/HTMLElement.cpp:
              (WebCore::HTMLElement::cloneNode): Changed code to copy attributes to use a
              function call instead of the assignment operator.
      
              * html/HTMLTokenizer.cpp:
              (WebCore::Token::addAttribute): Use create function instead of a a direct call
              to new.
      
              * html/HTMLViewSourceDocument.cpp:
              (WebCore::HTMLViewSourceDocument::createContainingTable): Use RefPtr and the new
              create function.
              (WebCore::HTMLViewSourceDocument::addViewSourceToken): Ditto.
              (WebCore::HTMLViewSourceDocument::addSpanWithClassName): Ditto.
              (WebCore::HTMLViewSourceDocument::addLine): Ditto.
              (WebCore::HTMLViewSourceDocument::addText): Ditto.
              (WebCore::HTMLViewSourceDocument::addLink): Ditto.
              * html/HTMLViewSourceDocument.h: Ditto.
      
              * svg/SVGUseElement.cpp:
              (WebCore::SVGUseElement::expandSymbolElementsInShadowTree): Changed code to copy
              attributes to use a function call instead of the assignment operator.
              (WebCore::SVGUseElement::transferUseAttributesToReplacedElement): Ditto.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@31435 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      e6e59e7e
  15. 28 Mar, 2008 1 commit
    • darin@apple.com's avatar
      2008-03-28 Darin Adler <darin@apple.com> · 1d7b3d74
      darin@apple.com authored
              Reviewed by Maciej.
      
              - cut down on copying and refcount churn a little by using references a bit more for
                KURL and String
      
              * bindings/js/JSXMLHttpRequest.cpp:
              (WebCore::jsXMLHttpRequestPrototypeFunctionOpen): Use const KURL& instead of KURL.
              * css/StyleSheet.h:
              (WebCore::StyleSheet::href): Return const String& instead of String.
              (WebCore::StyleSheet::title): Ditto.
              * dom/Document.cpp:
              (WebCore::Document::completeURL): Use const KURL* for a local variable instead of
              KURL to avoid copying the KURL.
              * dom/Element.cpp:
              (WebCore::Element::baseURI): Use const KURL& instead of KURL.
              * html/HTMLAnchorElement.cpp:
              (WebCore::HTMLAnchorElement::hostname): Ditto.
              * html/HTMLFrameElementBase.cpp:
              (WebCore::HTMLFrameElementBase::isURLAllowed): Ditto.
              * html/HTMLKeygenElement.cpp: Removed unneeded include of KURL.
              * page/ContextMenuController.cpp:
              (WebCore::ContextMenuController::contextMenuItemSelected): Get rid of temporary
              KURL.
              * platform/SecurityOrigin.cpp:
              (WebCore::SecurityOrigin::createForFrame): Use const KURL& instead of KURL.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@31405 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      1d7b3d74
  16. 26 Mar, 2008 1 commit
    • bdakin@apple.com's avatar
      WebCore: · 2d15955c
      bdakin@apple.com authored
      2008-03-25  Beth Dakin  <bdakin@apple.com>
      
              Reviewed by Oliver.
      
              Fix for <rdar://problem/5811826> CSSValueList::item() does not 
              range-check index
      
              Check bounds before accessing the item to avoid a crash. 
              itemWithoutBoundsCheck() is still inlined and not bounds-checked to 
              avoid slowing down our internal callers of item().
              * css/CSSValueList.cpp:
              (WebCore::CSSValueList::item):
              * css/CSSValueList.h:
              (WebCore::CSSValueList::itemWithoutBoundsCheck):
      
              Call itemWithoutBoundsCheck() to avoid slowing down these internal 
              callers.
              * css/CSSFontSelector.cpp:
              (WebCore::CSSFontSelector::addFontFaceRule):
              * css/CSSMutableStyleDeclaration.cpp:
              (WebCore::CSSMutableStyleDeclaration::getLayeredShorthandValue):
              * css/CSSStyleSelector.cpp:
              (WebCore::applyCounterList):
              (WebCore::CSSStyleSelector::applyProperty):
              * css/MediaQueryEvaluator.cpp:
              (WebCore::parseAspectRatio):
              * svg/SVGFontFaceElement.cpp:
              (WebCore::SVGFontFaceElement::rebuildFontFace):
              * svg/graphics/SVGPaintServer.cpp:
              (WebCore::dashArrayFromRenderingStyle):
      
      LayoutTests:
      
      2008-03-25  Beth Dakin  <bdakin@apple.com>
      
              Reviewed by Oliver.
      
              Test for <rdar://problem/5811826> CSSValueList::item() does not 
              range-check index
      
              * fast/css/resources/bikes.bmp: Added.
              * fast/css/value-list-out-of-bounds-crash.html: Added.
              * platform/mac/fast/css/value-list-out-of-bounds-crash-expected.checksum: Added.
              * platform/mac/fast/css/value-list-out-of-bounds-crash-expected.png: Added.
              * platform/mac/fast/css/value-list-out-of-bounds-crash-expected.txt: Added.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@31309 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      2d15955c
  17. 25 Mar, 2008 2 commits
    • eric@webkit.org's avatar
      Reviewed by Oliver. · ba303425
      eric@webkit.org authored
              Speculative crash fix for Acid3 crasher.
              I couldn't figure out how to make a test case for this?
              Suggestions welcome.
      
              * css/CSSFontSelector.cpp: null check document->renderer()
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@31290 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      ba303425
    • antti@apple.com's avatar
      2008-03-25 Antti Koivisto <antti@apple.com> · b4122c5c
      antti@apple.com authored
              Reviewed by Geoff Garen.
      
              Some memory cache cleanups:
              - Separate CachedResource loading from construction, initiate load using a separate load() method.
              - Add special case function to Cache for loading user stylesheets. This allows removal
                of a bunch of parameters from several methods and CachedResource constructors.
              - Construct CachedResources with m_inCache set to false which is quite a bit more logical as they
                are not yet in the cache at that point.
              - Pass encoding around as const String& instead of const String*.
      
              * css/CSSImageValue.cpp:
              (WebCore::CSSImageValue::image):
              * html/HTMLImageLoader.cpp:
              (WebCore::HTMLImageLoader::updateFromElement):
              * loader/Cache.cpp:
              (WebCore::createResource):
              (WebCore::Cache::requestResource):
              (WebCore::Cache::requestUserCSSStyleSheet):
              (WebCore::Cache::remove):
              * loader/Cache.h:
              * loader/CachedCSSStyleSheet.cpp:
              (WebCore::CachedCSSStyleSheet::CachedCSSStyleSheet):
              * loader/CachedCSSStyleSheet.h:
              * loader/CachedFont.cpp:
              (WebCore::CachedFont::CachedFont):
              (WebCore::CachedFont::load):
              (WebCore::CachedFont::ref):
              * loader/CachedFont.h:
              * loader/CachedImage.cpp:
              (WebCore::CachedImage::CachedImage):
              (WebCore::CachedImage::load):
              * loader/CachedImage.h:
              * loader/CachedResource.cpp:
              (WebCore::CachedResource::CachedResource):
              (WebCore::CachedResource::~CachedResource):
              (WebCore::CachedResource::load):
              * loader/CachedResource.h:
              (WebCore::CachedResource::load):
              * loader/CachedScript.cpp:
              (WebCore::CachedScript::CachedScript):
              * loader/CachedScript.h:
              * loader/CachedXBLDocument.cpp:
              (WebCore::CachedXBLDocument::CachedXBLDocument):
              * loader/CachedXBLDocument.h:
              * loader/CachedXSLStyleSheet.cpp:
              (WebCore::CachedXSLStyleSheet::CachedXSLStyleSheet):
              * loader/CachedXSLStyleSheet.h:
              * loader/DocLoader.cpp:
              (WebCore::DocLoader::requestImage):
              (WebCore::DocLoader::requestFont):
              (WebCore::DocLoader::requestCSSStyleSheet):
              (WebCore::DocLoader::requestUserCSSStyleSheet):
              (WebCore::DocLoader::requestScript):
              (WebCore::DocLoader::requestXSLStyleSheet):
              (WebCore::DocLoader::requestXBLDocument):
              (WebCore::DocLoader::requestResource):
              (WebCore::DocLoader::preload):
              * loader/DocLoader.h:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@31287 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      b4122c5c
  18. 23 Mar, 2008 1 commit
  19. 21 Mar, 2008 1 commit
  20. 20 Mar, 2008 1 commit
    • hyatt@apple.com's avatar
      2008-03-20 David Hyatt <hyatt@apple.com> · 861325fe
      hyatt@apple.com authored
              Add a new value to background-clip, "text", that allows backgrounds to be clipped to foreground text (and
              associated text decorations like shadows and underlines).
      
              Reviewed by Beth
      
              * css/CSSParser.cpp:
              (WebCore::CSSParser::parseBackgroundProperty):
              * css/CSSPrimitiveValueMappings.h:
              (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
              (WebCore::CSSPrimitiveValue::operator EBackgroundBox):
              * platform/graphics/GraphicsContext.cpp:
              (WebCore::GraphicsContext::clipToImageBuffer):
              * platform/graphics/GraphicsContext.h:
              * platform/graphics/cg/GraphicsContextCG.cpp:
              (WebCore::GraphicsContext::clipToImageBuffer):
              * rendering/InlineBox.cpp:
              (WebCore::InlineBox::paint):
              * rendering/InlineFlowBox.cpp:
              (WebCore::InlineFlowBox::paintBackgrounds):
              (WebCore::InlineFlowBox::paintBackground):
              (WebCore::InlineFlowBox::paintBoxDecorations):
              * rendering/InlineFlowBox.h:
              * rendering/InlineTextBox.cpp:
              (WebCore::InlineTextBox::paint):
              * rendering/RenderBlock.cpp:
              (WebCore::RenderBlock::paintColumns):
              (WebCore::RenderBlock::paintObject):
              (WebCore::RenderBlock::paintFloats):
              * rendering/RenderBlock.h:
              * rendering/RenderBox.cpp:
              (WebCore::RenderBox::paintRootBoxDecorations):
              (WebCore::RenderBox::paintBoxDecorations):
              (WebCore::RenderBox::paintBackgrounds):
              (WebCore::RenderBox::paintBackground):
              (WebCore::RenderBox::paintBackgroundExtended):
              * rendering/RenderBox.h:
              * rendering/RenderFieldset.cpp:
              (WebCore::RenderFieldset::paintBoxDecorations):
              * rendering/RenderFlow.cpp:
              (WebCore::RenderFlow::paintLines):
              * rendering/RenderObject.h:
              (WebCore::):
              (WebCore::RenderObject::paintBackgroundExtended):
              * rendering/RenderStyle.h:
              (WebCore::):
              * rendering/RenderTable.cpp:
              (WebCore::RenderTable::paintBoxDecorations):
              * rendering/RenderTableCell.cpp:
              (WebCore::RenderTableCell::paintBackgroundsBehindCell):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@31200 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      861325fe
  21. 19 Mar, 2008 3 commits
    • justin.garcia@apple.com's avatar
      WebCore: · bb4385ce
      justin.garcia@apple.com authored
      2008-03-19  Justin Garcia  <justin.garcia@apple.com>
      
              Reviewed by Oliver.
              
              <rdar://problem/5780697> Copying content with CSS property values that are percentages can cause fidelity issues
               
              Elements with height: x%; overflow: visible; overlap what's below them when they are copied from
              a document in quirksmode and pasted into to one in standards mode.  This fix uses the computed 
              the value for a property if its value is a percentage.
              
              * css/CSSMutableStyleDeclaration.cpp:
              (WebCore::CSSMutableStyleDeclaration::addParsedProperty): Added so that we don't have to use
              setProperty from appendStartMarkup.  We already have a parsed property value, so we shouldn't
              use setProperty, since it takes in a String.  If we did, we would have to call CSSValue::cssText()
              for a String only to re-parse it in setProperty.  This wasn't extremely important now, but it will 
              be as we compute more properties to fix the rest of the copy/paste fidelity bugs.
              * css/CSSMutableStyleDeclaration.h:
              * editing/markup.cpp:
              (WebCore::appendStartMarkup): Compute values for properties that have percentage values.  We could
              perhaps narrow this special case to only include properties that are effected by quirksmode.
      
      LayoutTests:
      
      2008-03-19  Justin Garcia  <justin.garcia@apple.com>
      
              Reviewed by Oliver.
              
              <rdar://problem/5780697> Copying content with CSS property values that are percentages can cause fidelity issues
      
              * editing/pasteboard/5780697-2-expected.txt: Added.
              * editing/pasteboard/5780697-2.html: Added.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@31169 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      bb4385ce
    • mitz@apple.com's avatar
      2008-03-19 Dan Bernstein <mitz@apple.com> · 920b8e07
      mitz@apple.com authored
              Rubber-stamped by John Sullivan.
      
              - change CSS property and value keyword constants from all-caps with
                underscores to intra-caps.
      
              * css/makeprop.pl:
              * css/makevalues.pl:
              * All files using the constants
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@31160 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      920b8e07
    • hyatt@apple.com's avatar
      2008-03-19 David Hyatt <hyatt@apple.com> · a8031486
      hyatt@apple.com authored
              New implementation of full page zoom.  Because of how much doesn't transform when zooming, and because
              of the need to obey viewport constraints, I decided to take a completely different approach.  Now CSS
              lengths and intrinsic sizes are simply adjusted by the zoom factor.  This approach works much better and
              avoids pixel cracks more than the old approach.   In addition widgets "just work", namely plugins zoom
              and scrollbars do not.
      
              This patch also implements the IE zoom CSS property.  This property allows fine-grained control over
              zooming at the element level.  It takes values of normal | <number> | <percentage> to match WinIE.  In
              addition, in the vein of text-size-adjust for text zooming, I have extended the zoom property with an
              extra value, reset.  The reset keyword can be used to prevent a section of the page from scaling at all
              when a zoom is applied.
      
              Reviewed by olliej
      
              * css/CSSComputedStyleDeclaration.cpp:
              (WebCore::):
              (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
              Support the new 'zoom' property for getComputedStyle.
      
              * css/CSSParser.cpp:
              (WebCore::CSSParser::parseValue):
              Code that parses the 'zoom' property.
      
              * css/CSSPrimitiveValue.cpp:
              (WebCore::CSSPrimitiveValue::computeLengthInt):
              (WebCore::CSSPrimitiveValue::computeLengthIntForLength):
              (WebCore::CSSPrimitiveValue::computeLengthShort):
              (WebCore::CSSPrimitiveValue::computeLengthFloat):
              (WebCore::CSSPrimitiveValue::computeLengthDouble):
              * css/CSSPrimitiveValue.h:
              Extend all of the computeLength methods to take a multiplier so that lengths can be adjusted by the
              zoom factor.
      
              * css/CSSPropertyNames.in:
              Add the new zoom property to the list of properties we understand.
      
              * css/CSSStyleSelector.cpp:
              (WebCore::CSSStyleSelector::applyDeclarations):
              (WebCore::CSSStyleSelector::applyProperty):
              (WebCore::CSSStyleSelector::mapBackgroundSize):
              (WebCore::CSSStyleSelector::mapBackgroundXPosition):
              (WebCore::CSSStyleSelector::mapBackgroundYPosition):
              (WebCore::CSSStyleSelector::getComputedSizeFromSpecifiedSize):
              * css/CSSStyleSelector.h:
              (WebCore::CSSStyleSelector::setStyle):
              Pass in the zoom factor when computing all lengths in CSS.
      
              * css/CSSValueKeywords.in:
              Add support for the 'reset' keyword of the zoom property.
      
              * dom/Document.cpp:
              (WebCore::Document::recalcStyle):
              Set the 'zoom' CSS property on the RenderView.  This is how we implement full page zoom.
      
              * html/CanvasRenderingContext2D.cpp:
              (WebCore::size):
              Make sure the back end canvas size ignores zooming when rendering images.
      
              * html/HTMLImageElement.cpp:
              (WebCore::HTMLImageElement::width):
              (WebCore::HTMLImageElement::height):
              (WebCore::HTMLImageElement::naturalWidth):
              (WebCore::HTMLImageElement::naturalHeight):
              Use the unzoomed width/height if we have no style information in HTMLImageElement.cpp.
      
              * loader/CachedImage.cpp:
              (WebCore::CachedImage::ref):
              (WebCore::CachedImage::imageSize):
              (WebCore::CachedImage::imageRect):
              * loader/CachedImage.h:
              (WebCore::CachedImage::canRender):
              Force access to the CachedImage metrics to take a multiplier so that people have to think about
              the zoom factor.  The "intrinsic size" of the image then takes that into account.
      
              * loader/ImageDocument.cpp:
              (WebCore::ImageTokenizer::finish):
              (WebCore::ImageDocument::scale):
              (WebCore::ImageDocument::resizeImageToFit):
              (WebCore::ImageDocument::imageChanged):
              (WebCore::ImageDocument::restoreImageSize):
              (WebCore::ImageDocument::imageFitsInWindow):
              Make sure image documents respect the zoom.
      
              * page/AnimationController.cpp:
              (WebCore::ImplicitAnimation::animate):
              Make the 'zoom' CSS property work with CSS transitions.
      
              * page/Frame.h:
              (WebCore::Frame::pageZoomFactor):
              (WebCore::Frame::textZoomFactor):
              Add accessors for obtaining the pageZoom vs. textZoom.
      
              * page/FrameView.cpp:
              (WebCore::FrameView::adjustViewSize):
              Remove the old zoom implementation that used transforms.
      
              * page/mac/WebCoreAXObject.mm:
              (-[WebCoreAXObject accessibilityIsIgnored]):
              Pass in the zoom factor.
      
              * rendering/InlineFlowBox.cpp:
              (WebCore::InlineFlowBox::paintBackground):
              (WebCore::InlineFlowBox::paintBoxDecorations):
              Pass in the zoom factor when testing for size.
      
              * rendering/RenderBox.cpp:
              (WebCore::RenderBox::calculateBackgroundSize):
              (WebCore::RenderBox::imageChanged):
              (WebCore::RenderBox::paintBackgroundExtended):
              (WebCore::RenderBox::calcHeight):
              * rendering/RenderFrameSet.cpp:
              (WebCore::RenderFrameSet::layout):
              * rendering/RenderHTMLCanvas.cpp:
              (WebCore::RenderHTMLCanvas::canvasSizeChanged):
              * rendering/RenderHTMLCanvas.h:
              (WebCore::RenderHTMLCanvas::renderName):
              (WebCore::RenderHTMLCanvas::intrinsicSizeChanged):
              * rendering/RenderImage.cpp:
              (WebCore::RenderImage::setImageSizeForAltText):
              (WebCore::RenderImage::imageChanged):
              (WebCore::RenderImage::calcReplacedWidth):
              (WebCore::RenderImage::calcReplacedHeight):
              * rendering/RenderImage.h:
              (WebCore::RenderImage::intrinsicSizeChanged):
              * rendering/RenderListMarker.cpp:
              (WebCore::RenderListMarker::layout):
              (WebCore::RenderListMarker::imageChanged):
              (WebCore::RenderListMarker::getRelativeMarkerRect):
              * rendering/RenderObject.cpp:
              (WebCore::RenderObject::mustRepaintBackgroundOrBorder):
              (WebCore::RenderObject::paintBorder):
              Pass in the zoom factor when testing for size.
      
              * rendering/RenderReplaced.cpp:
              (WebCore::RenderReplaced::RenderReplaced):
              (WebCore::RenderReplaced::setStyle):
              (WebCore::RenderReplaced::intrinsicSizeChanged):
              * rendering/RenderReplaced.h:
              Added a new call when the zoom factor changes, intrinsicSizeChanged().  Replaced element subclasses
              respond to this via overrides.
      
              * rendering/RenderStyle.cpp:
              (WebCore::StyleVisualData::StyleVisualData):
              (WebCore::StyleInheritedData::StyleInheritedData):
              (WebCore::StyleInheritedData::operator==):
              (WebCore::RenderStyle::diff):
              * rendering/RenderStyle.h:
              (WebCore::StyleVisualData::operator==):
              (WebCore::RenderStyle::zoom):
              (WebCore::RenderStyle::zoomInEffect):
              (WebCore::RenderStyle::setZoom):
              (WebCore::RenderStyle::setZoomInEffect):
              (WebCore::RenderStyle::initialZoom):
              Support for 'zoom' in the RenderStyle.  "zoomInEffect" represents the computed zoom taking into account
              all the zooms specified on ancestors.
      
              * rendering/RenderTableCol.cpp:
              (WebCore::RenderTableCol::imageChanged):
              * rendering/RenderTableRow.cpp:
              (WebCore::RenderTableRow::imageChanged):
              * rendering/RenderTableSection.cpp:
              (WebCore::RenderTableSection::imageChanged):
              * rendering/RenderVideo.h:
              (WebCore::RenderVideo::intrinsicSizeChanged):
              Pass in the zoom factor.
      
              * rendering/RenderView.cpp:
              (WebCore::RenderView::calcHeight):
              (WebCore::RenderView::calcWidth):
              (WebCore::RenderView::layout):
              (WebCore::RenderView::viewHeight):
              (WebCore::RenderView::viewWidth):
              * rendering/RenderView.h:
              (WebCore::RenderView::zoomFactor):
              Back out the old implementation.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@31155 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      a8031486
  22. 17 Mar, 2008 1 commit
    • darin@apple.com's avatar
      WebCore: · 706da539
      darin@apple.com authored
      2008-03-17  Robert Blaut  <webkit@blaut.biz>
      
              Reviewed by Darin.
      
              Fix for bug http://bugs.webkit.org/show_bug.cgi?id=17696
              Set default margin-bottom for form element in quirk mode
              and be compatible with Gecko.
      
              Tests: fast/css/margin-bottom-form-element-quirk.html
                     fast/css/margin-bottom-form-element-strict.html
      
              * css/html4.css:
              * css/quirks.css:
      
      LayoutTests:
      
      2008-03-17  Robert Blaut  <webkit@blaut.biz>
      
              Reviewed by Darin.
      
              Fix for bug http://bugs.webkit.org/show_bug.cgi?id=17696
              Set default margin-bottom for form element in quirk mode
              and be compatible with Gecko.
      
              * fast/css/margin-bottom-form-element-quirk.html: Added.
              * fast/css/margin-bottom-form-element-strict.html: Added.
              * fast/frames/viewsource-empty-attribute-value-expected.txt:
              * platform/mac/fast/block/margin-collapse/103-expected.checksum:
              * platform/mac/fast/block/margin-collapse/103-expected.png:
              * platform/mac/fast/block/margin-collapse/103-expected.txt:
              * platform/mac/fast/css/margin-bottom-form-element-quirk-expected.checksum: Added.
              * platform/mac/fast/css/margin-bottom-form-element-quirk-expected.png: Added.
              * platform/mac/fast/css/margin-bottom-form-element-quirk-expected.txt: Added.
              * platform/mac/fast/css/margin-bottom-form-element-strict-expected.checksum: Added.
              * platform/mac/fast/css/margin-bottom-form-element-strict-expected.png: Added.
              * platform/mac/fast/css/margin-bottom-form-element-strict-expected.txt: Added.
              * platform/mac/tables/mozilla/bugs/bug44505-expected.checksum:
              * platform/mac/tables/mozilla/bugs/bug44505-expected.png:
              * platform/mac/tables/mozilla/bugs/bug44505-expected.txt:
              * platform/mac/tables/mozilla/bugs/bug51727-expected.checksum:
              * platform/mac/tables/mozilla/bugs/bug51727-expected.png:
              * platform/mac/tables/mozilla/bugs/bug51727-expected.txt:
              * platform/mac/tables/mozilla/bugs/bug52505-expected.checksum:
              * platform/mac/tables/mozilla/bugs/bug52505-expected.png:
              * platform/mac/tables/mozilla/bugs/bug52505-expected.txt:
              * platform/mac/tables/mozilla/bugs/bug52506-expected.checksum:
              * platform/mac/tables/mozilla/bugs/bug52506-expected.png:
              * platform/mac/tables/mozilla/bugs/bug52506-expected.txt:
              * platform/mac/tables/mozilla_expected_failures/bugs/bug2479-2-expected.checksum:
              * platform/mac/tables/mozilla_expected_failures/bugs/bug2479-2-expected.png:
              * platform/mac/tables/mozilla_expected_failures/bugs/bug2479-2-expected.txt:
              * platform/mac/tables/mozilla_expected_failures/bugs/bug56024-expected.checksum:
              * platform/mac/tables/mozilla_expected_failures/bugs/bug56024-expected.png:
              * platform/mac/tables/mozilla_expected_failures/bugs/bug56024-expected.txt:
              * platform/qt/fast/block/margin-collapse/103-expected.txt: Removed.
              * platform/qt/tables/mozilla/bugs/bug44505-expected.txt: Removed.
              * platform/qt/tables/mozilla/bugs/bug51727-expected.txt: Removed.
              * platform/qt/tables/mozilla/bugs/bug52505-expected.txt: Removed.
              * platform/qt/tables/mozilla/bugs/bug52506-expected.txt: Removed.
              * platform/qt/tables/mozilla_expected_failures/bugs/bug2479-2-expected.txt: Removed.
              * platform/qt/tables/mozilla_expected_failures/bugs/bug56024-expected.txt: Removed.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@31100 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      706da539
  23. 13 Mar, 2008 1 commit
  24. 12 Mar, 2008 2 commits
    • hyatt@apple.com's avatar
      Make full page zoom vaguely work. This patch uses the CSS transform... · db00ad98
      hyatt@apple.com authored
              Make full page zoom vaguely work.  This patch uses the CSS transform system to turn on full page zoom at the
              document level.  There are many many bugs that I'm going to file to track all the issues (most of the issues
              are just bugs with transforms themselves).
      
              Reviewed by Adam Roben
      
              * css/CSSStyleSelector.cpp:
              (WebCore::CSSStyleSelector::applyProperty):
              (WebCore::CSSStyleSelector::getComputedSizeFromSpecifiedSize):
              * dom/Document.cpp:
              (WebCore::Document::recalcStyle):
              * page/Frame.cpp:
              (WebCore::Frame::shouldApplyTextZoom):
              (WebCore::Frame::shouldApplyPageZoom):
              * page/Frame.h:
              * rendering/RenderLayer.cpp:
              (WebCore::RenderLayer::updateLayerPositions):
              (WebCore::RenderLayer::setHasVisibleContent):
              (WebCore::RenderLayer::paintLayer):
              (WebCore::RenderLayer::hitTestLayer):
              * rendering/RenderLayer.h:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@31007 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      db00ad98
    • hyatt@apple.com's avatar
      WebCore: · 29be35f6
      hyatt@apple.com authored
              Make the zoom factor a float and not a percent.
      
              Reviewed by antti
      
              * WebCore.base.exp:
              * css/CSSStyleSelector.cpp:
              (WebCore::CSSStyleSelector::applyProperty):
              (WebCore::CSSStyleSelector::getComputedSizeFromSpecifiedSize):
              * page/Frame.cpp:
              (WebCore::Frame::zoomFactor):
              (WebCore::Frame::setZoomFactor):
              * page/Frame.h:
              * page/FramePrivate.h:
              * svg/SVGSVGElement.cpp:
              (WebCore::SVGSVGElement::currentScale):
              (WebCore::SVGSVGElement::setCurrentScale):
      
      WebKit/mac:
      
              Make the zoom factor a float and not a percent.
      
              Reviewed by antti
      
              * WebView/WebView.mm:
              (-[WebView _setZoomMultiplier:isTextOnly:]):
      
      WebKit/win:
      
              Make the zoom factor a float and not a percent.
      
              Reviewed by antti
      
              * WebFrame.cpp:
              (WebFrame::setTextSizeMultiplier):
      
      WebKit/wx:
      
              Make the zoom factor a float and not a percent.
      
              Reviewed by antti
      
              * WebView.cpp:
              (wxWebView::IncreaseTextSize):
              (wxWebView::DecreaseTextSize):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@31003 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      29be35f6
  25. 10 Mar, 2008 1 commit
    • darin@apple.com's avatar
      Reviewed by Antti. · d69216d5
      darin@apple.com authored
              - fix <rdar://problem/3059610> VIP: links opened in new frame, window, or tab
                should be redrawn as visited immediately
              - fix <rdar://problem/4382809> Going "back" a page doesn't change the color of
                the visited URL at directory.umi
              - fix http://bugs.webkit.org/show_bug.cgi?id=4941
                Visited links should be marked as visited
              - fix http://bugs.webkit.org/show_bug.cgi?id=7960
                REGRESSION: Visited link color doesn't displayed after loading page from cache
      
              We now mark all links on a page as "changed" at the appropriate times.
      
              * WebCore.base.exp: Update since I made completeURL be a const member function.
      
              * css/CSSStyleSelector.cpp: Got rid of some unneeded globals that could be turned
              into locals. Also changed some static data members to file-scoped globals with
              internal linkage. Renamed the globals to get rid of the m_ prefix. Changed the
              prefix on m_styleNotYetAvailable to s_styleNotYetAvailable.
              (WebCore::CSSStyleSelector::CSSStyleSelector): Updated for name changes.
              (WebCore::parseUASheet): Tweak the comment.
              (WebCore::CSSStyleSelector::loadDefaultStyle): Updated for name changes and to
              use local variables instead of globals where possible.
              (WebCore::CSSStyleSelector::checkPseudoState): Made this a member function so
              it can store the link in a hash. Also changed it to have a return value instead
              of having it modify a global variable. Added code to put the hash into a set so
              we can tell later if this is one of the links that affects this page.
              (WebCore::CSSStyleSelector::canShareStyleWithElement): Updated for the change to
              checkPseudoState.
              (WebCore::CSSStyleSelector::matchUARules): Updated for name changes.
              (WebCore::CSSStyleSelector::styleForElement): Ditto.
              (WebCore::CSSStyleSelector::adjustRenderStyle): Ditto.
              (WebCore::CSSStyleSelector::pseudoStyleRulesForElement): Changed code to read
              the SVG style sheet to use a boolean global and put it right here in the function
              since this is the only code that needs to know about it.
              (WebCore::CSSStyleSelector::checkOneSelector): Updated for name changes.
              (WebCore::colorForCSSValue): Moved code inside the function that is not needed
              anywhere else.
              (WebCore::CSSStyleSelector::getColorFromPrimitiveValue): Updaed for the change
              to checkPseudoState.
              (WebCore::CSSStyleSelector::allVisitedStateChanged): Added. Calls setChanged on
              all links if there were any in the set.
              (WebCore::CSSStyleSelector::visitedStateChanged): Added. Calls setChanged on all
              links if the one that changed is in the set.
      
              * css/CSSStyleSelector.h: Removed unused StyleSelector class and State enum. Made
              CSSStyleSelector derive from Noncopyable. Made lots of member functions private that
              didn't need to be public, and removed others that could be made into non-member
              functions. Changed pseudoStyleRulesForElement to take a const String& instead of
              a StringImpl*. Added new allVisitedStateChanged and visitedStateChanged functions.
              Got rid of unneeded friend declarations.
      
              * dom/Document.cpp:
              (WebCore::Document::completeURL): Made const.
              (WebCore::findSlashDotDotSlash): Moved here from PageGroup.
              (WebCore::findSlashSlash): Ditto.
              (WebCore::findSlashDotSlash): Ditto.
              (WebCore::containsColonSlashSlash):
              (WebCore::cleanPath): Ditto.
              (WebCore::matchLetter): Ditto.
              (WebCore::needsTrailingSlash): Ditto.
              (WebCore::Document::visitedLinkHash): Moved this here from PageGroup. This is
              the poor-man's completeURL function. The idea of putting it here is that this
              way it can be alongside the real completeURL function. Later we should figure out
              a way to make this function share more code with the real thing and match behavior.
      
              * dom/Document.h: Marked completeURL function const. Added visitedLinkHash function.
      
              * page/DOMWindow.cpp:
              (WebCore::DOMWindow::getMatchedCSSRules): Updated for change to CSSStyleSelector.
      
              * page/Page.cpp:
              (WebCore::Page::allVisitedStateChanged): Added. Calls allVisitedStateChanged on all
              style selectors.
              (WebCore::Page::visitedStateChanged): Ditto.
              * page/Page.h: Added the above functions.
      
              * page/PageGroup.cpp:
              (WebCore::PageGroup::isLinkVisited): Changed to take a visitedLinkHash parameter.
              The CSSStyleSelector now handles actually computing the hash, and it does so by
              calling code in Document.
              (WebCore::PageGroup::addVisitedLink): Refactored so the two overloaded copies share
              a bit more code. Added code that calls visitedStateChanged if a new link was added.
              (WebCore::PageGroup::removeVisitedLinks): Added code to call allVisitedStateChanged
              if any visited links are removed.
              * page/PageGroup.h: Include StringHash.h instead of having the AlreadyHashed struct
              definition here.
      
              * platform/text/StringHash.h:
              (WebCore::CaseFoldingHash::hash): Tweaked to make this a bit more consistent with
              the StringImpl::computeHash function, using the same technique for avoiding 0.
              (WebCore::AlreadyHashed::hash): Added. Was formerly in PageGroup.h.
              (WebCore::AlreadyHashed::avoidDeletedValue): Added. Was formerly in PageGroup.cpp.
      
              * rendering/RenderStyle.cpp:
              (WebCore::RenderStyle::isStyleAvailable): Changed to use an inline function instead
              of getting directly at a data member so the data member could be made private.
      
              * loader/FrameLoader.cpp:
              (WebCore::FrameLoader::scrollToAnchor): Added call to updateHistoryForAnchorScroll.
              (WebCore::FrameLoader::updateHistoryForAnchorScroll): Added.
              * loader/FrameLoader.h: Added updateHistoryForAnchorScroll.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@30949 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      d69216d5
  26. 07 Mar, 2008 1 commit