- 17 Apr, 2008 1 commit
-
-
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
-
- 15 Apr, 2008 2 commits
-
-
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
-
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
-
- 14 Apr, 2008 1 commit
-
-
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
-
- 13 Apr, 2008 1 commit
-
-
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
-
- 12 Apr, 2008 2 commits
-
-
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
-
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
-
- 11 Apr, 2008 1 commit
-
-
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
-
- 03 Apr, 2008 1 commit
-
-
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
-
- 01 Apr, 2008 1 commit
-
-
darin@apple.com authored
Reviewed by Mitz. - fix <rdar://problem/5833351> REGRESSION: Leak in JSCustomXPathNSResolver::create - fix <rdar://problem/5833216> REGRESSION: Leak in CSSStyleSelector::addViewportDependentMediaQueryResult * bindings/js/JSCustomXPathNSResolver.cpp: (WebCore::JSCustomXPathNSResolver::create): Added a missing adoptRef. * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::~CSSStyleSelector): Added a missing call to deleteAllValues. git-svn-id: http://svn.webkit.org/repository/webkit/trunk@31530 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
- 29 Mar, 2008 1 commit
-
-
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
-
- 26 Mar, 2008 1 commit
-
-
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
-
- 23 Mar, 2008 1 commit
-
-
eric@webkit.org authored
Bug 17685: [~=] attribute selector failing to match empty string <http://bugs.webkit.org/show_bug.cgi?id=17685> Test: fast/css/attribute-selector-empty-value.html * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::checkOneSelector): git-svn-id: http://svn.webkit.org/repository/webkit/trunk@31238 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
- 19 Mar, 2008 2 commits
-
-
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
-
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
-
- 12 Mar, 2008 2 commits
-
-
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
-
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
-
- 10 Mar, 2008 1 commit
-
-
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
-
- 07 Mar, 2008 1 commit
-
-
slewis@apple.com authored
Reviewed by Stephanie. - try to fix leaks seen on Tiger after r30840 * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::~CSSStyleSelector): Use the default operator delete, rather than arena delete, to deallocate the root default style. git-svn-id: http://svn.webkit.org/repository/webkit/trunk@30893 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
- 06 Mar, 2008 1 commit
-
-
darin@apple.com authored
Reviewed by Mitz. - fix http://bugs.webkit.org/show_bug.cgi?id=17526 REGRESSION: iframes are added to Safari's History menu by separating the visited link machinery from global history This should also make page loading faster due to more efficient visited link coloring. * WebCore.base.exp: Updated. * WebCore.vcproj/WebCore.vcproj: Added PageGroup.h/cpp, removed GlobalHistory.h/cpp. * WebCore.xcodeproj/project.pbxproj: Ditto. Also removed WebCoreHistory.h/m. * css/CSSStyleSelector.cpp: Updated includes. (WebCore::CSSStyleSelector::initElementAndPseudoState): Eliminated code to set currentEncodedURL. (WebCore::checkPseudoState): Moved most of the code inside a new PageGroup::isLinkVisited function. (WebCore::CSSStyleSelector::canShareStyleWithElement): Tightened code a bit by using references and only getting colors when needed. (WebCore::CSSStyleSelector::getColorFromPrimitiveValue): Ditto. * css/CSSStyleSelector.h: Removed EncodedURL, m_encodedURL, and setEncodedURL. * dom/Document.cpp: (WebCore::Document::attach): Removed call to setEncodedURL. (WebCore::Document::setURL): Ditto. (WebCore::Document::recalcStyleSelector): Ditto. * loader/FrameLoader.cpp: (WebCore::FrameLoader::addBackForwardItemClippedAtTarget): Changed code to use early exit idiom to be a little more readable. (WebCore::FrameLoader::urlsMatchItem): Change to use a reference for slightly better efficiency. (WebCore::FrameLoader::goToItem): Use early exit idiom to be a little more readable. (WebCore::FrameLoader::updateHistoryForStandardLoad): Moved history code back in here and got rid of the helper function updateGlobalHistory, restoring the logic before r30549. Also added a call to the new addVisitedLink function. (WebCore::FrameLoader::updateHistoryForClientRedirect): Added code to call addVisitedLink here. (WebCore::FrameLoader::updateHistoryForBackForwardNavigation): Removed comment. (WebCore::FrameLoader::updateHistoryForReload): Removed call to updateGlobalHistory; we can just go without updating global history or visited links here, at least for now, since it's not clear that a reload is a "history event". (WebCore::FrameLoader::updateHistoryForRedirectWithLockedHistory): Moved history code back where it was, and added the call to addVisitedLink, just as in updateHistoryForStandardLoad above. * loader/FrameLoader.h: Removed updateGlobalHistory function. * page/Chrome.cpp: (WebCore::ChromeClient::populateVisitedLinks): Added. Empty placeholder so we don't have to implement this for every port all at once. (WebCore::PageGroupLoadDeferrer::PageGroupLoadDeferrer): Changed to use the new PageGroup class. * page/ChromeClient.h: Added populateVisitedLinks function, used to fill the visited links set from the global history at application startup time. * page/FrameTree.cpp: (WebCore::FrameTree::find): Updated to use the new PageGroup class. * page/GlobalHistory.h: Removed. * page/win/GlobalHistoryWin.cpp: Removed. * page/mac/GlobalHistoryMac.mm: Removed. * platform/mac/WebCoreHistory.h: Removed. * platform/mac/WebCoreHistory.m: Removed. * platform/win/WebCoreHistory.cpp: Removed. * platform/win/WebCoreHistory.h: Removed. * page/Page.cpp: (WebCore::Page::Page): Set m_group to 0. (WebCore::Page::setGroupName): Set up m_group. If the page is not in any group, set it to 0 for now to postpone the cost of creating a group. (WebCore::Page::initGroup): Added. Sets m_group to point to a single-page group; used when getting a group. (WebCore::Page::removeAllVisitedLinks): Added. Calls removeVisitedLinks on all page groups. * page/Page.h: Moved enums inside the WebCore namespace. Removed the frameNamespace function and instead added the group and groupPtr functions. * page/PageGroup.cpp: Added. Contains all the visited code from the CSSStyleSelector in the isVisitedLink function, but more efficient because we don't allocate memory for the buffer. * page/PageGroup.h: Added. * platform/gtk/TemporaryLinkStubs.cpp: Removed historyContains. * platform/qt/TemporaryLinkStubs.cpp: Removed unneeded include. * platform/wx/TemporaryLinkStubs.cpp: Removed historyContains. WebKit: * WebKit.xcodeproj/project.pbxproj: Added WebHistoryInternal.h. WebKit/mac: Reviewed by Mitz. - fix http://bugs.webkit.org/show_bug.cgi?id=17526 REGRESSION: iframes are added to Safari's History menu by separating the visited link machinery from global history * History/WebHistory.mm: Moved WebHistoryPrivate inside this file. (-[WebHistoryPrivate removeItemFromDateCaches:]): Removed the underscore from this method name, since it's on a private object. (-[WebHistoryPrivate removeItemForURLString:]): Added a call to the PageGroup::removeAllVisitedLinks function if the last URL was removed. (-[WebHistoryPrivate addItemToDateCaches:]): Removed the underscore from this method name, since it's on a private object. (-[WebHistoryPrivate removeAllItems]): Call PageGroup::removeAllVisitedLinks. (-[WebHistoryPrivate ageLimitDate]): Removed the underscore from this method name, since it's on a private object. (-[WebHistoryPrivate loadHistoryGutsFromURL:savedItemsCount:collectDiscardedItemsInto:error:]): Ditto. (-[WebHistoryPrivate saveHistoryGuts:URL:error:]): Ditto. Also changed this to correctly return the error by using the newer version of writeToURL: and removed the FIXME about that. (-[WebHistoryPrivate addVisitedLinksToPageGroup:]): Added. Calls addVisitedLink for every link in the history. (-[WebHistory saveToURL:error:]): Removed the FIXME, since we do get the error now. (-[WebHistory addItem:]): Moved into the WebPrivate category. (-[WebHistory addItemForURL:]): Ditto. (-[WebHistory _addItemForURL:title:]): Added. Used for the normal case where we create an item and already know its title. (-[WebHistory ageLimitDate]): Moved into the WebPrivate category. (-[WebHistory containsItemForURLString:]): Ditto. (-[WebHistory removeItem:]): Ditto. (-[WebHistory setLastVisitedTimeInterval:forItem:]): Ditto. (-[WebHistory _itemForURLString:]): Ditto. (-[WebHistory _addVisitedLinksToPageGroup:]): Added. For use only inside WebKit. * History/WebHistoryInternal.h: Added. * History/WebHistoryItemInternal.h: Tweaked formatting and includes. * History/WebHistoryPrivate.h: Moved the WebHistoryPrivate class out of this header. Also reorganized what was left behind. * WebCoreSupport/WebChromeClient.h: Added populateVisitedLinks. * WebCoreSupport/WebChromeClient.mm: (WebChromeClient::populateVisitedLinks): Added a call to the new -[WebHistory _addVisitedLinksToPageGroup:] method. * WebCoreSupport/WebFrameLoaderClient.mm: (WebFrameLoaderClient::updateGlobalHistory): Changed code to use the new -[WebHistory _addItemForURL:title:] method. WebKit/win: Reviewed by Mitz. - fix http://bugs.webkit.org/show_bug.cgi?id=17526 REGRESSION: iframes are added to Safari's History menu by separating the visited link machinery from global history * WebCoreSupport/WebChromeClient.cpp: (WebChromeClient::populateVisitedLinks): Added a call to the new WebHistory::addVisitedLinksToPageGroup function. * WebCoreSupport/WebChromeClient.h: Added populateVisitedLinks. Also fixed the webView function to be non-virtual. * WebCoreSupport/WebFrameLoaderClient.cpp: (WebFrameLoaderClient::updateGlobalHistory): Changed to use the new WebHistory::addItem function. (WebFrameLoaderClient::webHistory): Changed to return a WebHistory*, there's no reason to AddRef the result from this function. * WebCoreSupport/WebFrameLoaderClient.h: Ditto. * WebHistory.cpp: Removed IWebHistoryPrivate and _WebCoreHistoryProvider. (WebHistory::QueryInterface): Removed IWebHistoryPrivate. (sharedHistoryStorage): Added. (WebHistory::sharedHistory): Added. (WebHistory::optionalSharedHistory): Changed to use sharedHistory(). (WebHistory::setOptionalSharedHistory): Changed to require a WebHistory object, not just an IWebHistory. (WebHistory::removeAllItems): Call PageGroup::removeAllVisitedLinks. (WebHistory::addItem): Changed parameter types since this is called with arguments from WebCore -- at some point this could allow better efficiency. (WebHistory::removeItemForURLString): Call PageGroup::removeAllVisitedLinks if the last URL is being removed. (addVisitedLinkToPageGroup): Added. Helper. Adds a single link to a group's visited link set. (WebHistory::addVisitedLinksToPageGroup): Added. Adds all links to a group's visited link. * WebHistory.h: Removed IWebHistoryPrivate. Removed optionalSharedHistoryInternal and added sharedHistory. Replaced addItemForURL and containsItemForURLString with non-virtual addItem and addVisitedLinksToPageGroup functions. git-svn-id: http://svn.webkit.org/repository/webkit/trunk@30840 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
- 05 Mar, 2008 1 commit
-
-
mitz@apple.com authored
- fix "background-position: inherit" * css/CSSStyleSelector.cpp: Made HANDLE_MULTILAYER_INHERIT_AND_INITIAL fall through and added a return statement in HANDLE_MULTILAYER_VALUE. Also removed an unused macro. git-svn-id: http://svn.webkit.org/repository/webkit/trunk@30823 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
- 29 Feb, 2008 2 commits
-
-
http://bugs.webkit.org/show_bug.cgi?id=17559hyatt@apple.com authored
guard malloc. Pass along the style selector so it can be accessed, since it has not yet been assigned into the document's member variable. Reviewed by aroben * css/CSSStyleSelector.cpp: (WebCore::CSSRuleSet::addRulesFromSheet): * css/MediaQueryEvaluator.cpp: (WebCore::MediaQueryEvaluator::eval): * css/MediaQueryEvaluator.h: git-svn-id: http://svn.webkit.org/repository/webkit/trunk@30670 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
rdar://problem/5755916hyatt@apple.com authored
Improve the performance of dynamic sibling and CSS3 selectors so that there is no slowdown any more. Be more precise in terms of what nodes we mark dirty. Reviewed by Beth * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::checkSelector): * dom/Element.cpp: (WebCore::Element::recalcStyle): (WebCore::checkForSiblingStyleChanges): (WebCore::Element::childrenChanged): (WebCore::Element::finishParsingChildren): * rendering/RenderStyle.cpp: (WebCore::RenderStyle::RenderStyle): * rendering/RenderStyle.h: (WebCore::RenderStyle::childrenAffectedByPositionalRules): (WebCore::RenderStyle::childrenAffectedByDirectAdjacentRules): (WebCore::RenderStyle::setChildrenAffectedByDirectAdjacentRules): git-svn-id: http://svn.webkit.org/repository/webkit/trunk@30667 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
- 26 Feb, 2008 1 commit
-
-
weinig@apple.com authored
Reviewed by Dan Bernstein. - Add a variant of remove that takes a position and a length. * wtf/Vector.h: (WTF::Vector::remove): WebCore: Reviewed by Dan Bernstein. Make the cleanPath function in CSSStyleSelector more efficient by using a Vector<UChar>. * css/CSSStyleSelector.cpp: (WebCore::cleanPath): Make this function work on a Vector<UChar> instead of a String. Also remove unnecessary reverseFind call that could be acomplished with two compares. (WebCore::checkPseudoState): Remove reserveCapacity calls now that we are using a stack buffer. * platform/text/PlatformString.h: (WebCore::find): Make this find generic enough that it can be used for String::find. (WebCore::reverseFind): Implement reverseFind so that it can be used for with a UChar* and length. * platform/text/StringImpl.cpp: (WebCore::StringImpl::find): Use implementation in PlatformString.cpp (WebCore::StringImpl::reverseFind): Ditto, git-svn-id: http://svn.webkit.org/repository/webkit/trunk@30593 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
- 22 Feb, 2008 1 commit
-
-
weinig@apple.com authored
- Remove use of DeprecatedString in CSSStyleSelector. * css/CSSStyleSelector.cpp: (WebCore::findHash): Removed. Use find instead. (WebCore::findSlashDotDotSlash): Changed to take a UChar* and a length. (WebCore::findSlashSlash): Ditto. (WebCore::findSlashDotSlash): Ditto. (WebCore::containsColonSlashSlash): Ditto. (WebCore::cleanPath): Change to operate on a String. (WebCore::checkPseudoState): Changed to use a Vector as a buffer. git-svn-id: http://svn.webkit.org/repository/webkit/trunk@30499 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
- 21 Feb, 2008 1 commit
-
-
hyatt@apple.com authored
when contained in documents inside iframes (rather than always using the top-level document's viewport). CSS media queries based on the viewport also needed to be dynamic and update as you resize the window (this is a HOT feature). :) This patch gets Acid3 up to 86/100 with 3 colored boxes filled in. Reviewed by olliej Added fast/media/viewport-media-query.html * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::CSSStyleSelector): (WebCore::CSSStyleSelector::addViewportDependentMediaQueryResult): (WebCore::CSSStyleSelector::affectedByViewportChange): * css/CSSStyleSelector.h: (WebCore::MediaQueryResult::MediaQueryResult): * css/MediaQueryEvaluator.cpp: (WebCore::MediaQueryEvaluator::MediaQueryEvaluator): (WebCore::MediaQueryEvaluator): (WebCore::MediaQueryEvaluator::eval): (WebCore::colorMediaFeatureEval): (WebCore::monochromeMediaFeatureEval): (WebCore::device_aspect_ratioMediaFeatureEval): (WebCore::device_pixel_ratioMediaFeatureEval): (WebCore::gridMediaFeatureEval): (WebCore::device_heightMediaFeatureEval): (WebCore::device_widthMediaFeatureEval): (WebCore::heightMediaFeatureEval): (WebCore::widthMediaFeatureEval): (WebCore::min_colorMediaFeatureEval): (WebCore::max_colorMediaFeatureEval): (WebCore::min_monochromeMediaFeatureEval): (WebCore::max_monochromeMediaFeatureEval): (WebCore::min_device_aspect_ratioMediaFeatureEval): (WebCore::max_device_aspect_ratioMediaFeatureEval): (WebCore::min_device_pixel_ratioMediaFeatureEval): (WebCore::max_device_pixel_ratioMediaFeatureEval): (WebCore::min_heightMediaFeatureEval): (WebCore::max_heightMediaFeatureEval): (WebCore::min_widthMediaFeatureEval): (WebCore::max_widthMediaFeatureEval): (WebCore::min_device_heightMediaFeatureEval): (WebCore::max_device_heightMediaFeatureEval): (WebCore::min_device_widthMediaFeatureEval): (WebCore::max_device_widthMediaFeatureEval): * css/MediaQueryEvaluator.h: * css/MediaQueryExp.cpp: (WebCore::MediaQueryExp::~MediaQueryExp): * css/MediaQueryExp.h: (WebCore::MediaQueryExp::value): (WebCore::MediaQueryExp::isViewportDependent): * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::pickMedia): * page/FrameView.cpp: (WebCore::FrameView::layout): git-svn-id: http://svn.webkit.org/repository/webkit/trunk@30466 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
- 19 Feb, 2008 1 commit
-
-
darin@apple.com authored
- removed use of DeprecatedString for font family names * css/CSSFontSelector.cpp: (WebCore::CSSFontSelector::addFontFaceRule): Update for name change. * css/CSSParser.cpp: (WebCore::CSSParser::parseFontFamily): Update to use new appendSpaceSeparated function and String rather than DeprecatedString. * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::applyProperty): Updated for name change. * css/FontFamilyValue.cpp: (WebCore::FontFamilyValue::FontFamilyValue): Replaced code using a regular expression with code that does the same thing more efficiently. (WebCore::FontFamilyValue::appendSpaceSeparated): Added. (WebCore::FontFamilyValue::cssText): Updated for name change. * css/FontFamilyValue.h: Changed DeprecatedString to String. Renamed fontName to familyName and parsedFontName to m_familyName. Removed unused genericFamilyType and m_genericFamilyType. Added appendSpaceSeparated so that m_familyName can be private instead of public. git-svn-id: http://svn.webkit.org/repository/webkit/trunk@30421 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
- 14 Feb, 2008 1 commit
-
-
darin@apple.com authored
Reviewed by Eric Seidel. Based on work by Marvin Decker <marv.decker@gmail.com> - fix http://bugs.webkit.org/show_bug.cgi?id=16538 KURL should use String instead of DeprecatedString - fix http://bugs.webkit.org/show_bug.cgi?id=16485 DocLoader::checkForReload will crash if the URL isNull and a similar problem in IconDatabase - fix http://bugs.webkit.org/show_bug.cgi?id=16487 KURL doesn't preserve isNull when constructed with a DeprecatedString - changed completeURL and various DOM getters to return KURL, to avoid conversion back and forth from KURL to String - changed the conversion of KURL to NSURL or NSString to be automatic, to ease the use of KURL in Objective C DOM bindings, and eliminated the getNSURL function - because I had to visit the DOM bindings anyway, eliminated almost all the use of the KJS namespace for things in WebCore - fixed HTMLOptionElement constructor to check for undefined rather than size of the arguments array - eliminated some other unnecessary uses of DeprecatedString - changed String::split to take a Vector parameter instead of returning a Vector, for better performance - added a couple of missing calls to do layout in SVG image handling; I was able to reproduce these only because I had broken URLs for a while -- not sure how to reproduce them now but the changes are clearly needed Performance testing shows this to be at least a 1% speedup. Added a new function protocolIs to efficiently compare protocols without case errors and a blankURL function so we don't have to code "about:blank" in multiple places in the code and don't have to construct a frash KURL each time. Moved decode_string and encode_string out of KURL and gave them clearer names. Made KURL constructors explicit to highlight potentially-expensive operations and the poor semantics of KURL's constructor that takes a String. * WebCore.base.exp: Updated. * bindings/js/JSAttrCustom.cpp: (WebCore::JSAttr::setValue): Use protocolIs. * bindings/js/JSAudioConstructor.h: KJS namespace change. * bindings/js/JSCSSRuleCustom.cpp: (WebCore::toJS): Ditto. * bindings/js/JSCSSValueCustom.cpp: (WebCore::toJS): Ditto. * bindings/js/JSDocumentCustom.cpp: (WebCore::JSDocument::location): Ditto. (WebCore::JSDocument::setLocation): Updated for KURL change. (WebCore::toJS): KJS namespace change. * bindings/js/JSElementCustom.cpp: (WebCore::allowSettingSrcToJavascriptURL): Use protocolIs. (WebCore::JSElement::setAttribute): KJS namespace change. (WebCore::JSElement::setAttributeNode): Ditto. (WebCore::JSElement::setAttributeNS): Ditto. (WebCore::JSElement::setAttributeNodeNS): Ditto. * bindings/js/JSHTMLFrameElementCustom.cpp: (WebCore::allowSettingJavascriptURL): Use protocolIs. (WebCore::JSHTMLFrameElement::setSrc): KJS namespace change. (WebCore::JSHTMLFrameElement::setLocation): Ditto. * bindings/js/JSHTMLIFrameElementCustom.cpp: (WebCore::JSHTMLIFrameElement::setSrc): Use protocolIs. * bindings/js/JSHTMLOptionElementConstructor.cpp: (WebCore::JSHTMLOptionElementConstructor::JSHTMLOptionElementConstructor): (WebCore::JSHTMLOptionElementConstructor::construct): Cleaned up the structure a bit and changed checking to check for undefined rather than number of arguments. * bindings/js/JSHTMLOptionElementConstructor.h: KJS namespace change. * bindings/js/JSLocation.cpp: (WebCore::JSLocation::put): Eliminated some DeprecatedString use, and use protocolIs. (WebCore::jsLocationProtoFuncReplace): Ditto. (WebCore::jsLocationProtoFuncReload): Ditto. (WebCore::jsLocationProtoFuncAssign): Ditto. * bindings/js/JSLocation.h: KJS namespace change. * bindings/js/JSNamedNodeMapCustom.cpp: (WebCore::JSNamedNodeMap::canGetItemsForName): Ditto. (WebCore::JSNamedNodeMap::nameGetter): Ditto. * bindings/js/JSNamedNodesCollection.cpp: (WebCore::JSNamedNodesCollection::JSNamedNodesCollection): Ditto. * bindings/js/JSNamedNodesCollection.h: Ditto. * bindings/js/JSXMLHttpRequest.cpp: (WebCore::jsXMLHttpRequestPrototypeFunctionOpen): Removed DeprecatedString use. (WebCore::jsXMLHttpRequestPrototypeFunctionSend): Ditto. * bindings/js/JSXMLHttpRequest.h: Moved this class into the WebCore namespace. * bindings/js/JSXSLTProcessor.cpp: Namespace change. * bindings/js/JSXSLTProcessor.h: Ditto. * bindings/js/kjs_binding.cpp: Updated for namespace change. (WebCore::jsStringOrNull): Added an overload for KURL to allow DOM classes to return KURL even if the DOM expects a string. (WebCore::jsStringOrUndefined): Ditto. (WebCore::jsStringOrFalse): Ditto. * bindings/js/kjs_binding.h: Moved everything into the WebCore namespace. * bindings/js/kjs_css.h: Namespace change. * bindings/js/kjs_events.cpp: Removed an include. * bindings/js/kjs_events.h: Namespace change. * bindings/js/kjs_html.h: Namespace change. * bindings/js/kjs_navigator.cpp: Moved everything into the WebCore namespace. * bindings/js/kjs_navigator.h: Ditto. * bindings/js/kjs_window.cpp: (KJS::parseModalDialogFeatures): Updated for String::split change. (KJS::createWindow): Use protocolIs and removed some DeprecatedString. (KJS::Window::put): Ditto. (KJS::Window::allowsAccessFrom): Ditto. (KJS::windowProtoFuncOpen): Ditto. * bindings/objc/DOM.mm: (-[DOMElement _getURLAttribute:]): Removed getNSURL call. * bindings/objc/DOMHTML.mm: (-[DOMHTMLDocument _createDocumentFragmentWithMarkupString:baseURLString:]): Ditto. * bindings/scripts/CodeGeneratorCOM.pm: Updated includes so conversions from KURL will work. * bindings/scripts/CodeGeneratorJS.pm: Updated for namespace changes, and also updated includes so conversions from KURL will work. * bindings/scripts/CodeGeneratorObjC.pm: Updated includes so conversions from KURL will work. * bridge/mac/WebCoreAXObject.mm: (-[WebCoreAXObject accessibilityAttributeValue:]): Removed getNSURL call. Also streamlined the logic. (AXAttributedStringAppendText): Ditto. * bridge/mac/WebCoreScriptDebugger.mm: (toNSString): Tweaked. (toNSURL): Removed getNSURL call. * css/CSSImageValue.cpp: (WebCore::CSSImageValue::image): Removed DeprecatedString use. * css/CSSImportRule.cpp: (WebCore::CSSImportRule::insertedIntoParent): Ditto. * css/CSSParser.cpp: (WebCore::CSSParser::parseValue): Ditto. (WebCore::CSSParser::parseContent): Ditto. (WebCore::CSSParser::parseBackgroundImage): Ditto. (WebCore::CSSParser::parseFontFaceSrc): Ditto. (WebCore::CSSParser::parseBorderImage): Ditto. * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::setEncodedURL): Ditto. (WebCore::checkPseudoState): Ditto. * css/CSSStyleSelector.h: Ditto. * css/MediaList.cpp: (WebCore::MediaList::setMediaText): Updated for String::split change. * css/StyleBase.cpp: (WebCore::StyleBase::baseURL): Return KURL. * css/StyleBase.h: DItto. * dom/Document.cpp: (WebCore::Document::~Document): Updated for namespace change. (WebCore::Document::documentURI): Return KURL. (WebCore::Document::setDocumentURI): Removed DeprecatedString use. (WebCore::Document::baseURI): Return KURL. (WebCore::Document::open): Updated to use blankURL. (WebCore::Document::setURL): Take KURL. (WebCore::Document::shouldBeAllowedToLoadLocalResources): Updated for change to use KURL (WebCore::Document::setBaseURL): Take KURL. (WebCore::Document::elementSheet): Updated for KURL change. (WebCore::Document::mappedElementSheet): Ditto. (WebCore::Document::processHttpEquiv): Ditto. (WebCore::Document::recalcStyleSelector): Removed use of DeprecatedString -- also noticed some dead code here! (WebCore::Document::setCookie): Ditto. (WebCore::Document::completeURL): Return KURL. * dom/Document.h: Use KURL instead of String in a few places. * dom/DocumentType.cpp: (WebCore::DocumentType::baseURI): Return KURL. * dom/DocumentType.h: Ditto. * dom/Element.cpp: (WebCore::Element::baseURI): Return KURL. * dom/Element.h: Ditto. * dom/Node.cpp: (WebCore::Node::setDocument): Namespace change. (WebCore::Node::baseURI): Return KURL. * dom/Node.h: Ditto. * dom/ProcessingInstruction.cpp: (WebCore::ProcessingInstruction::checkStyleSheet): Updated for KURL change. * dom/StyleElement.cpp: (WebCore::StyleElement::process): Changed to use Vector<UChar> instead of String for better performance. (WebCore::StyleElement::createSheet): Removed use of DeprecateString. * dom/XMLTokenizer.cpp: (WebCore::XMLTokenizer::endElementNs): Updated for KURL change. (WebCore::XMLTokenizer::end): Ditto. (WebCore::xmlDocPtrForString): Removed use of DeprecateString. * dom/XMLTokenizer.h: Ditto. * editing/markup.cpp: Moved appendString to PlatformString.h. (WebCore::appendQuotedURLAttributeValue): Use protocolIs. (WebCore::completeURLs): Removed DeprecatedString use. (WebCore::createFragmentFromMarkup): Use blankURL. (WebCore::fillContainerFromString): Removed DeprecatedString use. (WebCore::createFragmentFromText): Ditto. * history/HistoryItem.cpp: (WebCore::HistoryItem::url): Removed DeprecatedString use. (WebCore::HistoryItem::originalURL): Ditto. * history/HistoryItem.h: Removed include. * html/HTMLAnchorElement.cpp: (WebCore::HTMLAnchorElement::defaultEventHandler): Removed use of DeprecatedString. (WebCore::HTMLAnchorElement::href): Return KURL. (WebCore::HTMLAnchorElement::hash): Removed DeprecatedString use. (WebCore::HTMLAnchorElement::host): Ditto. (WebCore::HTMLAnchorElement::hostname): Ditto. (WebCore::HTMLAnchorElement::pathname): Ditto. (WebCore::HTMLAnchorElement::port): Ditto. (WebCore::HTMLAnchorElement::protocol): Ditto. (WebCore::HTMLAnchorElement::search): Ditto. (WebCore::HTMLAnchorElement::toString): Ditto. * html/HTMLAnchorElement.h: Ditto. * html/HTMLAppletElement.cpp: (WebCore::HTMLAppletElement::createRenderer): Updated for KURL change. * html/HTMLAreaElement.cpp: (WebCore::HTMLAreaElement::href): Return KURL. * html/HTMLAreaElement.h: Ditto. * html/HTMLBaseElement.cpp: (WebCore::HTMLBaseElement::removedFromDocument): Updated for KURL change. (WebCore::HTMLBaseElement::process): Removed DeprecatedString use. * html/HTMLBodyElement.cpp: (WebCore::HTMLBodyElement::parseMappedAttribute): Updated for KURL change. * html/HTMLEmbedElement.cpp: (WebCore::HTMLEmbedElement::parseMappedAttribute): Removed use of DeprecatedString. * html/HTMLEmbedElement.h: Removed DeprecatedString use. * html/HTMLFormElement.cpp: (WebCore::HTMLFormElement::formWouldHaveSecureSubmission): Use protocolIs. (WebCore::encodeCString): Updated for change to String::split. (WebCore::HTMLFormElement::dataEncoding): Ditto. (WebCore::HTMLFormElement::formData): Removed DeprecatedString use. (WebCore::HTMLFormElement::isMailtoForm): Use protocolIs. (WebCore::HTMLFormElement::submit): Updated for KURL change. (WebCore::HTMLFormElement::reset): Ditto. * html/HTMLFrameElementBase.cpp: (WebCore::HTMLFrameElementBase::isURLAllowed): Updated for KURL change and use equalIgnoringRef instead of doing a setRef to get the same effect. (WebCore::HTMLFrameElementBase::openURL): Use blankURL. (WebCore::HTMLFrameElementBase::location): Return KURL. (WebCore::HTMLFrameElementBase::src): Return KURL. * html/HTMLFrameElementBase.h: Ditto. * html/HTMLImageElement.cpp: (WebCore::HTMLImageElement::parseMappedAttribute): Updated for KURL change. (WebCore::HTMLImageElement::longDesc): Return KURL. (WebCore::HTMLImageElement::lowsrc): Return KURL. (WebCore::HTMLImageElement::src): Return KURL. * html/HTMLImageElement.h: Ditto. Also removed imageMap() function. * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::src): Return KURL. * html/HTMLInputElement.h: Ditto. * html/HTMLLinkElement.cpp: (WebCore::HTMLLinkElement::parseMappedAttribute): Updated for KURL change. (WebCore::HTMLLinkElement::tokenizeRelAttribute): Updated for String::split change. (WebCore::HTMLLinkElement::href): Return KURL. * html/HTMLLinkElement.h: Ditto. * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::src): Return KURL. (WebCore::HTMLMediaElement::pickMedia): Updated for KURL change. * html/HTMLMediaElement.h: Ditto. * html/HTMLObjectElement.cpp: (WebCore::HTMLObjectElement::isImageType): Use protocolIs. (WebCore::HTMLObjectElement::data): Return KURL. * html/HTMLObjectElement.h: Ditto. * html/HTMLOptGroupElement.cpp: (WebCore::HTMLOptGroupElement::groupLabelText): Removed DeprecatedString use. * html/HTMLParser.cpp: (WebCore::HTMLParser::reportErrorToConsole): Updated for KURL change. * html/HTMLScriptElement.cpp: (WebCore::HTMLScriptElement::insertedIntoDocument): Ditto. (WebCore::HTMLScriptElement::text): Changed to use Vector<UChar> instead of String for better performance. (WebCore::HTMLScriptElement::src): Return KURL. * html/HTMLScriptElement.h: Ditto. * html/HTMLSourceElement.cpp: (WebCore::HTMLSourceElement::src): Return KURL. * html/HTMLSourceElement.h: Ditto. * html/HTMLTableElement.cpp: (WebCore::HTMLTableElement::parseMappedAttribute): Updated for KURL change. * html/HTMLTablePartElement.cpp: (WebCore::HTMLTablePartElement::parseMappedAttribute): Updated for KURL change. * html/HTMLTextAreaElement.cpp: (WebCore::HTMLTextAreaElement::setValue): Removed DeprecatedString use. * html/HTMLTokenizer.cpp: (WebCore::HTMLTokenizer::scriptExecution): Ditto. (WebCore::HTMLTokenizer::notifyFinished): Use protocolIs. * html/HTMLVideoElement.cpp: (WebCore::HTMLVideoElement::poster): Return KURL. * html/HTMLVideoElement.h: Ditto. * html/HTMLViewSourceDocument.cpp: (WebCore::HTMLViewSourceDocument::addText): Updated for String::split change. * loader/DocLoader.cpp: (WebCore::DocLoader::checkForReload): Add an explicit check for an empty URL here to avoid problems using its string as a hash table key later. (WebCore::DocLoader::requestResource): Removed DeprecatedString use. * loader/FTPDirectoryDocument.cpp: (WebCore::FTPDirectoryTokenizer::createTDForFilename): Updated for KURL change. (WebCore::FTPDirectoryTokenizer::parseAndAppendOneLine): Removed use of DeprecatedString. * loader/FrameLoader.cpp: (WebCore::FrameLoader::requestFrame): Use protocolIs. (WebCore::FrameLoader::loadSubframe): Use blankURL. (WebCore::FrameLoader::submitForm): Use protocolIs and removed use of DeprecatedString. (WebCore::FrameLoader::iconURL): Return KURL. Use protcolIs. (WebCore::FrameLoader::didOpenURL): Use protocolIs. (WebCore::FrameLoader::didExplicitOpen): Use blankURL. (WebCore::FrameLoader::executeIfJavaScriptURL): Use protocolIs. Update for name change to decodeURLEscapeSequences. (WebCore::FrameLoader::receivedFirstData): Updated for KURL changes. (WebCore::FrameLoader::begin): Removed DeprecatedString use. Renamed baseurl to baseURL. Updated to use KURL more. (WebCore::FrameLoader::gotoAnchor): Removed use of encodedHtmlRef function, which is no different from ref. (WebCore::FrameLoader::completeURL): Updated for KURL change. (WebCore::FrameLoader::scheduleLocationChange): Ditto. (WebCore::FrameLoader::canCachePage): Use protocolIs. (WebCore::FrameLoader::updatePolicyBaseURL): Update for KURL change. (WebCore::FrameLoader::setPolicyBaseURL): Take KURL. (WebCore::FrameLoader::startRedirectionTimer): Removed use of DeprecatedString. (WebCore::FrameLoader::load): Use protocolIs. (WebCore::FrameLoader::shouldHideReferrer): Use protocolIs. (WebCore::FrameLoader::shouldAllowNavigation): Updated for KURL change. (WebCore::FrameLoader::commitProvisionalLoad): Use blankURL. (WebCore::FrameLoader::open): Use protcolIs. (WebCore::FrameLoader::createHistoryItem): Use blankURL. (WebCore::FrameLoader::createJavaAppletWidget): Updated for KURL change. (WebCore::FrameLoader::switchOutLowBandwidthDisplayIfReady): Removed DeprecatedString use. * loader/FrameLoader.h: Ditto. * loader/ImageDocument.cpp: (WebCore::ImageDocument::createDocumentStructure): Updated for KURL change. * loader/PluginDocument.cpp: (WebCore::PluginTokenizer::createDocumentStructure): Ditto. * loader/icon/IconDatabase.cpp: (WebCore::IconDatabase::iconForPageURL): Added a check for an empty URL before trying to use it as a hash table key. * loader/icon/IconLoader.h: Tweaked includes. * loader/loader.cpp: (WebCore::Loader::servePendingRequests): Use protcolIs. Also removed some code to set up a local variable that is never used (and a DeprecatedString on to boot!). * loader/mac/LoaderNSURLExtras.m: (suggestedFilenameWithMIMEType): Removed unnecessary typecast. * page/ContextMenuController.cpp: Removed include. * page/mac/EventHandlerMac.mm: (WebCore::EventHandler::needsKeyboardEventDisambiguationQuirks): Use protocolIs. * page/mac/WebCoreFrameBridge.mm: (-[WebCoreFrameBridge URLWithAttributeString:]): Removed getNSURL call. (-[WebCoreFrameBridge baseURL]): Ditto. * platform/KURL.cpp: (WebCore::isSchemeFirstChar): Fixed bug in handling of values >= 0x80. (WebCore::isSchemeChar): Ditto. (WebCore::isPathSegmentEndChar): Ditto. (WebCore::hexDigitValue): Changed parameter type to UChar. (WebCore::copyASCII): Added. (WebCore::findFirstOf): Added. (WebCore::KURL::protocolIs): Added. (WebCore::KURL::KURL): Tightened logic up quite a bit. Changed parameter types from DeprecatedString to String. (WebCore::KURL::init): Changed parameter type to String. Preserved the passed-in string even if the base is invalid. Cleaned up logic to determine if the originalString should be pased in to the parse function. Simplified by calling the new parse overload that takes String in many cases. (WebCore::KURL::lastPathComponent): Return String. (WebCore::KURL::protocol): Ditto. (WebCore::KURL::host): Ditto. (WebCore::KURL::port): Changed logic to use early return for clarity. (WebCore::KURL::pass): Return String. (WebCore::KURL::user): Ditto. (WebCore::KURL::ref): Ditto. (WebCore::assertProtocolIsGood): Added. (WebCore::KURL::protocolIs): Added. (WebCore::KURL::query): Return String. (WebCore::KURL::path): Ditto. (WebCore::KURL::setProtocol): Take String. (WebCore::KURL::setHost): Ditto. (WebCore::KURL::setPort): Use String. (WebCore::KURL::setHostAndPort): Take String. (WebCore::KURL::setUser): Ditto. (WebCore::KURL::setPass): Ditto. (WebCore::KURL::setRef): Ditto. (WebCore::KURL::setQuery): Ditto. (WebCore::KURL::setPath): Ditto. (WebCore::KURL::prettyURL): Return String. Use Vector<UChar> to build it. (WebCore::decodeURLEscapeSequences): Renamed from KURL::decode_string. Return String. Use Vector<UChar> to build it. (WebCore::KURL::isLocalFile): Use protocolIs. (WebCore::KURL::parse): Added an overload that takes a String to replace the use of DeprecatedString::ascii at various call sites. Updated for name change (urlString -> m_string). (WebCore::equalIgnoringRef): Wrote a new implementation that doesn't do any allocation. (WebCore::encodeWithURLEscapeSequences): Renamed from KURL::encode_string. Return String. (WebCore::appendEncodedHostname): Added. Replaces encodeHostname and avoids the need to allocate a string. (WebCore::findHostnamesInMailToURL): Update to use findFirstOf instead of regular expressions. (WebCore::findHostnameInHierarchicalURL): Ditto. (WebCore::encodeHostnames): Use protocolIs and the other helpers above. (WebCore::encodeRelativeString): Changed to put result into a CharBuffer. (WebCore::substituteBackslashes): Updated to use String. (WebCore::KURL::copyToBuffer): Added. (WebCore::protocolIs): Added. (WebCore::blankURL): Added. (WebCore::KURL::print): Updated. * platform/KURL.h: Added a number of comments. Reorganized the header a bit. Made the string constructors explicit. Changed to use String instead of DeprecatedString. Removed encodedHTMLRef. Renamed and added a few functions. * platform/cf/KURLCFNet.cpp: (WebCore::KURL::KURL): Streamlined the logic a bit. (WebCore::KURL::createCFURL): Changed to use copyToBuffer. * platform/graphics/mac/MediaPlayerPrivateQTKit.mm: (WebCore::MediaPlayerPrivate::createQTMovie): Removed getNSURL call. Use protocolIs. * platform/mac/ClipboardMac.mm: (WebCore::ClipboardMac::declareAndWriteDragImage): Removed getNSURL call. * platform/mac/CookieJar.mm: (WebCore::cookies): Removed getNSURL call. (WebCore::setCookies): Removed getNSURL call. * platform/mac/KURLMac.mm: (WebCore::KURL::KURL): Streamlined the logic a bit. * platform/mac/PasteboardMac.mm: (WebCore::Pasteboard::writeURL): Removed getNSURL call. (WebCore::Pasteboard::writeImage): Ditto. * platform/mac/SSLKeyGeneratorMac.mm: (WebCore::signedPublicKeyAndChallengeString): Ditto. * platform/network/HTTPParsers.cpp: (WebCore::filenameFromHTTPContentDisposition): Updated for String::split. * platform/network/ResourceHandle.cpp: (WebCore::ResourceHandle::portAllowed): Use protocolIs. * platform/network/cf/ResourceErrorCF.cpp: (WebCore::ResourceError::operator CFErrorRef): Removed deprecatedString call. * platform/network/curl/ResourceHandleManager.cpp: (WebCore::headerCallback): Ditto. (WebCore::parseDataUrl): Use String instead of DeprecatedString. (WebCore::ResourceHandleManager::startJob): Updated for KURL changes. * platform/network/mac/ResourceErrorMac.mm: (WebCore::ResourceError::operator NSError*): Removed getNSURL call. * platform/network/mac/ResourceRequest.h: (WebCore::ResourceRequest::ResourceRequest): Removed DeprecatedString use. * platform/network/mac/ResourceRequestMac.mm: (WebCore::ResourceRequest::doUpdatePlatformRequest): Removed getNSURL call. * platform/network/mac/ResourceResponseMac.mm: (WebCore::ResourceResponse::nsURLResponse): Removed getNSURL call. * platform/qt/ClipboardQt.cpp: (WebCore::ClipboardQt::writeURL): Removed deprecatedString call. * platform/text/CString.h: (WebCore::CStringBuffer::length): Fixed size_t/unsigned mismatch to make it possible to compile this on Windows with higher warning level * platform/text/PlatformString.h: Updated split to modify a result parameter rather than returning a Vector. Added charactersAreAllASCII and an append function that appends a String to a Vector<UChar>. * platform/text/String.cpp: (WebCore::String::split): Updated. * platform/win/BString.cpp: (WebCore::BString::BString): Added conversion from KURL. * platform/win/BString.h: Ditto. * platform/win/ClipboardUtilitiesWin.cpp: (WebCore::markupToCF_HTML): Removed use of deprecatedString. * platform/win/ClipboardWin.cpp: (WebCore::filesystemPathFromUrlOrTitle): Ditto. (WebCore::createGlobalHDropContent): Ditto. (WebCore::ClipboardWin::setData): Ditto. (WebCore::ClipboardWin::writeRange): Ditto. * platform/win/PasteboardWin.cpp: (WebCore::Pasteboard::writeSelection): Ditto. * plugins/PluginStream.cpp: (WebCore::PluginStream::startStream): Ditto. (WebCore::PluginStream::destroyStream): Ditto. * plugins/win/PluginViewWin.cpp: (WebCore::scriptStringIfJavaScriptURL): Ditto. (WebCore::PluginView::performRequest): Ditto. (WebCore::PluginView::PluginView): Ditto. * rendering/HitTestResult.cpp: (WebCore::HitTestResult::absoluteImageURL): Removed DeprecatedString use. (WebCore::HitTestResult::absoluteLinkURL): Ditto. * rendering/RenderFrameSet.cpp: (WebCore::RenderFrameSet::layOutAxis): Fixed comment wording. * rendering/RenderImage.cpp: (WebCore::RenderImage::paintReplaced): Removed use of DeperecatedString, (WebCore::RenderImage::imageMap): Changed to call useMap instead of imageMap; both do the same thing, and the first is standard DOM. * rendering/RenderObject.cpp: (WebCore::RenderObject::addPDFURLRect): Rewrote and streamlined to remove DeprecatedString use. * rendering/RenderObject.h: Changed addPDFURLRect to take const IntRect&. * rendering/RenderPartObject.cpp: (WebCore::isURLAllowed): Updated for KURL change and use equalIgnoringRef instead of doing a setRef to get the same effect. (WebCore::RenderPartObject::updateWidget): Updated for KURL change. * rendering/RenderText.cpp: (WebCore::charactersAreAllASCII): Moved the guts to PlatformString.h. * rendering/SVGRenderSupport.cpp: (WebCore::renderSubtreeToImage): Added missing call to do layout. I ran into this while doing some layout tests while URL processing was broken. * rendering/SVGRenderTreeAsText.h: Removed include. * svg/SVGImageLoader.cpp: (WebCore::SVGImageLoader::updateFromElement): Removed DeprecatedString use. * svg/graphics/SVGImage.cpp: (WebCore::SVGImage::draw): Added missing call to do layout. I ran into this while doing some layout tests while URL processing was broken. (WebCore::SVGImage::dataChanged): Use a null URL rather than an arbitrary string for the document. * xml/XMLHttpRequest.cpp: (WebCore::XMLHttpRequest::getResponseXML): Removed DeprecatedString use. (WebCore::XMLHttpRequest::urlMatchesDocumentDomain): Ditto. (WebCore::XMLHttpRequest::open): Ditto. (WebCore::XMLHttpRequest::send): Namespace change. (WebCore::XMLHttpRequest::dropProtection): Ditto. * xml/XMLHttpRequest.h: Removed DeprecatedString use. * xml/XSLImportRule.cpp: (WebCore::XSLImportRule::loadSheet): Removed DeprecatedString use. * xml/XSLStyleSheet.cpp: (WebCore::XSLStyleSheet::loadChildSheets): Ditto. (WebCore::XSLStyleSheet::loadChildSheet): Ditto. * xml/XSLStyleSheet.h: Ditto. * xml/XSLTProcessor.cpp: (WebCore::docLoaderFunc): Ditto. (WebCore::xsltStylesheetPointer): Ditto. (WebCore::xmlDocPtrFromNode): Ditto. WebKit/gtk: * webkit/webkitwebframe.cpp: Removed DeprecatedString use to try to keep it building. * webkit/webkitwebview.cpp: Ditto. WebKit/mac: Reviewed by Eric Seidel. - updated for WebCore KURL changes * History/WebHistoryItem.mm: (-[WebHistoryItem URL]): Removed getNSURL call. * Misc/WebElementDictionary.mm: (-[WebElementDictionary _absoluteImageURL]): Ditto. (-[WebElementDictionary _absoluteLinkURL]): Ditto. * Misc/WebNSAttributedStringExtras.mm: (fileWrapperForElement): Ditto. (+[NSAttributedString _web_attributedStringFromRange:]): Ditto. * Misc/WebNSURLExtras.mm: (-[NSString _webkit_stringByReplacingValidPercentEscapes]): Updated for function name change. * WebCoreSupport/WebContextMenuClient.mm: (WebContextMenuClient::downloadURL): Removed getNSURL call. * WebCoreSupport/WebDragClient.mm: (WebDragClient::createDragImageForLink): Ditto. * WebCoreSupport/WebFrameLoaderClient.mm: (WebFrameLoaderClient::dispatchWillPerformClientRedirect): Ditto. (WebFrameLoaderClient::startDownload): Ditto. (WebFrameLoaderClient::updateGlobalHistoryForStandardLoad): Ditto. (WebFrameLoaderClient::updateGlobalHistoryForReload): Ditto. (WebFrameLoaderClient::cancelledError): Ditto. (WebFrameLoaderClient::blockedError): Ditto. (WebFrameLoaderClient::cannotShowURLError): Ditto. (WebFrameLoaderClient::interruptForPolicyChangeError): Ditto. (WebFrameLoaderClient::cannotShowMIMETypeError): Ditto. (WebFrameLoaderClient::fileDoesNotExistError): Ditto. (WebFrameLoaderClient::willUseArchive): Ditto. (WebFrameLoaderClient::setTitle): Ditto. (WebFrameLoaderClient::actionDictionary): Ditto. (WebFrameLoaderClient::createFrame): Ditto. (WebFrameLoaderClient::objectContentType): Ditto. (WebFrameLoaderClient::createPlugin): Ditto. (WebFrameLoaderClient::createJavaAppletWidget): Ditto. * WebView/WebDataSource.mm: (-[WebDataSource _URL]): Ditto. (-[WebDataSource _initWithDocumentLoader:]): Ditto. (-[WebDataSource unreachableURL]): Ditto. * WebView/WebHTMLView.mm: (-[WebHTMLView namesOfPromisedFilesDroppedAtDestination:]): Ditto. WebKit/win: - updated for WebCore KURL changes * MarshallingHelpers.cpp: (MarshallingHelpers::BSTRToKURL): Removed deprecatedString call. (MarshallingHelpers::KURLToBSTR): Tweaked for efficiency. * WebContextMenuClient.cpp: (WebContextMenuClient::searchWithGoogle): Updated for KURL changes. * WebDataSource.cpp: (WebDataSource::unreachableURL): Ditto. * WebDownload.cpp: (WebDownload::init): Ditto. (WebDownload::initWithRequest): Ditto. * WebFrame.cpp: (WebFrame::loadData): Ditto. (WebFrame::loadURLIntoChild): Ditto. (WebFrame::objectContentType): Ditto. * WebResource.cpp: (WebResource::initWithData): Ditto. * WebURLResponse.cpp: (WebURLResponse::createInstance): Ditto. (WebURLResponse::initWithURL): Ditto. * WebView.cpp: (WebView::userAgentForURL): Ditto. (WebView::copyURL): Ditto. (WebView::notifyPreferencesChanged): Ditto. WebKit/wx: * WebView.cpp: Removed use of DeprecatedString to keep this compiling. git-svn-id: http://svn.webkit.org/repository/webkit/trunk@30243 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
- 13 Feb, 2008 1 commit
-
-
zimmermann@webkit.org authored
Fixes: http://bugs.webkit.org/show_bug.cgi?id=17258 (SVG uses erroneous cursor implementation) SVG cursors are not well-integrated within the CSS(3) cursor support in WebCore. SVGCursorElement duplicates CSSCursorImageValue functionality and inherits from CachedResourceClient itself, handling remote-image acquisation on its own. RenderStyle's CursorData class holds "IntPoint hotSpot", "CachedImage* image" and just for SVG a 'String cursorFragmentId' (a reference to a SVG <cursor> element, by id). SVG stores a reference to a SVGCursorElement, which holds a CachedImage pointer itself - instead of storing the CachedImage in the CursorData class, as it's supposed to be. Because of that several places in WebCore contain special SVG cursor handling - which is unneeded. Fix all issues by integrating within CSSCursorImageValue, remove 'String cursorFragmentId' from RenderStyle, kill any special SVG cursor handling in WebCore and fix dynamic attribute changes through DOM / SVG DOM (scripting of 'x' / 'y' / 'xlink:href' attribute). git-svn-id: http://svn.webkit.org/repository/webkit/trunk@30208 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
- 11 Feb, 2008 1 commit
-
-
hyatt@apple.com authored
Reviewed by aroben Added fast/css/empty-generated-content.html * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::checkOneSelector): git-svn-id: http://svn.webkit.org/repository/webkit/trunk@30153 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
- 09 Feb, 2008 4 commits
-
-
hyatt@apple.com authored
Fix for bug 17254, nth-* selectors do not work with negative coefficients. Reviewed by Mitz. fast/css/negative-nth-child.html * css/CSSStyleSelector.cpp: (WebCore::parseNth): LayoutTests: Added test for bug 17254. Reviewed by Mitz. * fast/css/negative-nth-child.html: Added. git-svn-id: http://svn.webkit.org/repository/webkit/trunk@30116 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
hyatt@apple.com authored
The comedy continues. Bungled the rename from Eric's review when doing the backout of CSSStyleSelector's accidental fix for 17254. git-svn-id: http://svn.webkit.org/repository/webkit/trunk@30115 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
hyatt@apple.com authored
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@30113 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
hyatt@apple.com authored
Fix for bug 17203, high CPU usage loading HTML5 spec. This patch significantly improves the performance of CSS3 selectors. (1) Split the notion of being affected by positional rules into "forward" and "backward." The "forward" selectors do not need to re-resolve during parsing, since children are appended on the end. Only the "backward" selectors like last-child or nth-last-child have to re-resolve when a close tag is encountered. (2) Extend childrenChanged to specify whether the children were changed by the parser or not. This allows Element::childrenChanged to know when the parser is adding children so that it can ignore those adds when possible. (3) Make sure all Elements now know whether or not their children are currently parsing. Backwards selectors like last-child will always return false when children are still being parsed. When an Element finishes parsing its children, finishParsingChildren() gets called and will make sure the children re-resolve properly. (4) Added a beginParsingChildren method and renamed finishParsing to finishedParsingChildren. (5) Eliminated one-off hacks that did the same thing in HTMLObjectElement and HTMLAppletElement. (6) Patched many incorrect implementations of finishedParsingChildren that did not properly call into their base class (mostly new SVG elements that got added for SVG fonts around the time this became a requirement). Reviewed by Eric * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::checkSelector): (WebCore::CSSStyleSelector::checkOneSelector): * dom/Attr.cpp: (WebCore::Attr::childrenChanged): * dom/Attr.h: * dom/ContainerNode.cpp: (WebCore::ContainerNode::addChild): * dom/Document.cpp: (WebCore::Document::childrenChanged): * dom/Document.h: * dom/Element.cpp: (WebCore::Element::Element): (WebCore::Element::recalcStyle): (WebCore::checkFirstChildRules): (WebCore::checkLastChildRules): (WebCore::checkEmptyRules): (WebCore::checkStyleRules): (WebCore::Element::childrenChanged): (WebCore::Element::finishParsingChildren): * dom/Element.h: (WebCore::Element::finishedParsingChildren): (WebCore::Element::beginParsingChildren): * dom/Node.cpp: * dom/Node.h: (WebCore::Node::finishParsingChildren): (WebCore::Node::beginParsingChildren): (WebCore::Node::childrenChanged): * dom/StyledElement.cpp: (WebCore::StyledElement::StyledElement): * dom/StyledElement.h: * dom/XMLTokenizer.cpp: (WebCore::XMLTokenizer::startElementNs): (WebCore::XMLTokenizer::endElementNs): (WebCore::): * html/HTMLAppletElement.cpp: (WebCore::HTMLAppletElement::HTMLAppletElement): (WebCore::HTMLAppletElement::finishParsingChildren): * html/HTMLAppletElement.h: * html/HTMLElementFactory.cpp: (WebCore::objectConstructor): * html/HTMLGenericFormElement.cpp: (WebCore::HTMLFormControlElementWithState::finishParsingChildren): * html/HTMLGenericFormElement.h: * html/HTMLObjectElement.cpp: (WebCore::HTMLObjectElement::HTMLObjectElement): (WebCore::HTMLObjectElement::finishParsingChildren): (WebCore::HTMLObjectElement::childrenChanged): * html/HTMLObjectElement.h: * html/HTMLOptGroupElement.cpp: (WebCore::HTMLOptGroupElement::childrenChanged): * html/HTMLOptGroupElement.h: * html/HTMLOptionElement.cpp: (WebCore::HTMLOptionElement::childrenChanged): * html/HTMLOptionElement.h: * html/HTMLParser.cpp: (WebCore::HTMLParser::insertNode): (WebCore::HTMLParser::pushBlock): (WebCore::HTMLParser::popOneBlockCommon): * html/HTMLScriptElement.cpp: (WebCore::HTMLScriptElement::childrenChanged): (WebCore::HTMLScriptElement::finishParsingChildren): * html/HTMLScriptElement.h: * html/HTMLSelectElement.cpp: (WebCore::HTMLSelectElement::childrenChanged): * html/HTMLSelectElement.h: * html/HTMLStyleElement.cpp: (WebCore::HTMLStyleElement::finishParsingChildren): (WebCore::HTMLStyleElement::childrenChanged): * html/HTMLStyleElement.h: * html/HTMLTextAreaElement.cpp: (WebCore::HTMLTextAreaElement::childrenChanged): * html/HTMLTextAreaElement.h: * html/HTMLTitleElement.cpp: (WebCore::HTMLTitleElement::childrenChanged): * html/HTMLTitleElement.h: * rendering/RenderApplet.cpp: (WebCore::RenderApplet::createWidgetIfNecessary): * rendering/RenderPartObject.cpp: (WebCore::RenderPartObject::updateWidget): * rendering/RenderStyle.cpp: (WebCore::RenderStyle::RenderStyle): * rendering/RenderStyle.h: (WebCore::RenderStyle::childrenAffectedByForwardPositionalRules): (WebCore::RenderStyle::setChildrenAffectedByForwardPositionalRules): (WebCore::RenderStyle::childrenAffectedByBackwardPositionalRules): (WebCore::RenderStyle::setChildrenAffectedByBackwardPositionalRules): * svg/SVGAnimationElement.cpp: (WebCore::SVGAnimationElement::finishParsingChildren): * svg/SVGAnimationElement.h: * svg/SVGClipPathElement.cpp: (WebCore::SVGClipPathElement::childrenChanged): * svg/SVGClipPathElement.h: * svg/SVGDefinitionSrcElement.cpp: (WebCore::SVGDefinitionSrcElement::childrenChanged): * svg/SVGDefinitionSrcElement.h: * svg/SVGElement.cpp: (WebCore::SVGElement::finishParsingChildren): * svg/SVGElement.h: * svg/SVGFontFaceElement.cpp: (WebCore::SVGFontFaceElement::childrenChanged): * svg/SVGFontFaceElement.h: * svg/SVGFontFaceFormatElement.cpp: (WebCore::SVGFontFaceFormatElement::childrenChanged): * svg/SVGFontFaceFormatElement.h: * svg/SVGFontFaceSrcElement.cpp: (WebCore::SVGFontFaceSrcElement::childrenChanged): * svg/SVGFontFaceSrcElement.h: * svg/SVGFontFaceUriElement.cpp: (WebCore::SVGFontFaceUriElement::childrenChanged): * svg/SVGFontFaceUriElement.h: * svg/SVGGElement.cpp: (WebCore::SVGGElement::childrenChanged): * svg/SVGGElement.h: * svg/SVGGradientElement.cpp: (WebCore::SVGGradientElement::childrenChanged): * svg/SVGGradientElement.h: * svg/SVGMarkerElement.cpp: (WebCore::SVGMarkerElement::childrenChanged): * svg/SVGMarkerElement.h: * svg/SVGMaskElement.cpp: (WebCore::SVGMaskElement::childrenChanged): * svg/SVGMaskElement.h: * svg/SVGPatternElement.cpp: (WebCore::SVGPatternElement::childrenChanged): * svg/SVGPatternElement.h: * svg/SVGStyleElement.cpp: (WebCore::SVGStyleElement::finishParsingChildren): (WebCore::SVGStyleElement::childrenChanged): * svg/SVGStyleElement.h: * svg/SVGStyledElement.cpp: (WebCore::SVGStyledElement::childrenChanged): * svg/SVGStyledElement.h: * svg/SVGTitleElement.cpp: (WebCore::SVGTitleElement::childrenChanged): * svg/SVGTitleElement.h: * svg/SVGUseElement.cpp: (WebCore::SVGUseElement::childrenChanged): * svg/SVGUseElement.h: git-svn-id: http://svn.webkit.org/repository/webkit/trunk@30112 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
- 07 Feb, 2008 1 commit
-
-
hyatt@apple.com authored
Fix for bug 6248, implement the nth-* CSS3 selectors. Patch based on original KHTML work from Allan Jensen and improved upon by Nick Shanks. Reviewed by Eric * css/CSSGrammar.y: * css/CSSParser.cpp: (WebCore::CSSParser::lex): * css/CSSSelector.cpp: (WebCore::CSSSelector::extractPseudoType): * css/CSSSelector.h: (WebCore::CSSSelector::): * css/CSSStyleSelector.cpp: (WebCore::parseNth): (WebCore::matchNth): (WebCore::CSSStyleSelector::checkOneSelector): * css/tokenizer.flex: * rendering/RenderStyle.cpp: (WebCore::RenderStyle::RenderStyle): * rendering/RenderStyle.h: (WebCore::RenderStyle::childIndex): (WebCore::RenderStyle::setChildIndex): git-svn-id: http://svn.webkit.org/repository/webkit/trunk@30069 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
- 02 Feb, 2008 3 commits
-
-
hyatt@apple.com authored
Fix for bug 5468, support CSS3 :only-child and :only-of-type selectors. Reviewed by olliej Added fast/css/only-child-pseudo-class.html, fast/css/only-of-type-pseudo-class.html * css/CSSSelector.cpp: (WebCore::CSSSelector::extractPseudoType): * css/CSSSelector.h: (WebCore::CSSSelector::): * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::checkOneSelector): LayoutTests: Add test for bug 5468, supporting :only-child and :only-of-type in CSS3. Reviewed by olliej * platform/mac/fast/css/only-child-pseudo-class-expected.checksum: Added. * platform/mac/fast/css/only-child-pseudo-class-expected.png: Added. * platform/mac/fast/css/only-child-pseudo-class-expected.txt: Added. * platform/mac/fast/css/only-of-type-pseudo-class-expected.checksum: Added. * platform/mac/fast/css/only-of-type-pseudo-class-expected.png: Added. * platform/mac/fast/css/only-of-type-pseudo-class-expected.txt: Added. git-svn-id: http://svn.webkit.org/repository/webkit/trunk@29944 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
hyatt@apple.com authored
Fix for bug 4812. Support last-child and last-of-type CSS3 selectors. Brings Acid3 score up to 68/100. Reviewed by olliej Added fast/css/last-child-pseudo-class.html, fast/css/last-of-type-pseudo-class.html * css/CSSGrammar.y: * css/CSSSelector.cpp: (WebCore::CSSSelector::extractPseudoType): * css/CSSSelector.h: (WebCore::CSSSelector::): * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::checkOneSelector): LayoutTests: Fix for bug 4812. Support last-child and last-of-type (and make sure they are properly dynamic). Reviewed by olliej * fast/css/last-child-pseudo-class.html: Added. * fast/css/last-of-type-pseudo-class.html: Added. * platform/mac/fast/css/last-child-pseudo-class-expected.checksum: Added. * platform/mac/fast/css/last-child-pseudo-class-expected.png: Added. * platform/mac/fast/css/last-child-pseudo-class-expected.txt: Added. * platform/mac/fast/css/last-of-type-pseudo-class-expected.checksum: Added. * platform/mac/fast/css/last-of-type-pseudo-class-expected.png: Added. * platform/mac/fast/css/last-of-type-pseudo-class-expected.txt: Added. git-svn-id: http://svn.webkit.org/repository/webkit/trunk@29933 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
hyatt@apple.com authored
Make :first-child and :first-of-type properly dynamic when the DOM changes. Brings the Acid3 score up to 66/100. Reviewed by olliej Added fast/css/first-child-pseudo-class.html, fast/css/first-of-type-pseudo-class.html, fast/css/empty-body-test.html * css/CSSGrammar.y: * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::checkOneSelector): * dom/Element.cpp: (WebCore::Element::recalcStyle): (WebCore::Element::childrenChanged): * rendering/RenderStyle.cpp: (WebCore::RenderStyle::RenderStyle): * rendering/RenderStyle.h: (WebCore::RenderStyle::childrenAffectedByFirstChildRules): (WebCore::RenderStyle::setChildrenAffectedByFirstChildRules): (WebCore::RenderStyle::childrenAffectedByLastChildRules): (WebCore::RenderStyle::setChildrenAffectedByLastChildRules): (WebCore::RenderStyle::childrenAffectedByPositionalRules): (WebCore::RenderStyle::setChildrenAffectedByPositionalRules): (WebCore::RenderStyle::firstChildState): (WebCore::RenderStyle::setFirstChildState): (WebCore::RenderStyle::lastChildState): (WebCore::RenderStyle::setLastChildState): LayoutTests: Added tests for dynamic :first-child support (Acid3). Reviewed by olliej * fast/css/empty-body-test.html: Added. * fast/css/first-child-pseudo-class.html: Added. * fast/css/first-of-type-pseudo-class.html: Added. * platform/mac/fast/css/empty-body-test-expected.checksum: Added. * platform/mac/fast/css/empty-body-test-expected.png: Added. * platform/mac/fast/css/empty-body-test-expected.txt: Added. * platform/mac/fast/css/first-child-pseudo-class-expected.checksum: Added. * platform/mac/fast/css/first-child-pseudo-class-expected.png: Added. * platform/mac/fast/css/first-child-pseudo-class-expected.txt: Added. * platform/mac/fast/css/first-of-type-pseudo-class-expected.checksum: Added. * platform/mac/fast/css/first-of-type-pseudo-class-expected.png: Added. * platform/mac/fast/css/first-of-type-pseudo-class-expected.txt: Added. git-svn-id: http://svn.webkit.org/repository/webkit/trunk@29932 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
- 01 Feb, 2008 1 commit
-
-
hyatt@apple.com authored
Fix for bug 11387, CSS3 :empty selector is not dynamic. Add support for dynamically updating elements whose style is affected by :empty when the child count changes. Reviewed by olliej, mitzpettel fast/css/empty-pseudo-class.html * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::locateSharedStyle): (WebCore::CSSStyleSelector::checkOneSelector): * dom/Element.cpp: (WebCore::Element::childrenChanged): * dom/Element.h: * rendering/RenderStyle.h: (WebCore::RenderStyle::affectedByEmpty): (WebCore::RenderStyle::emptyState): (WebCore::RenderStyle::setEmptyState): LayoutTests: Add a new layout test for dynamic :empty selectors. Reviewed by olliej * fast/css/empty-pseudo-class.html: Added. * platform/mac/fast/css/empty-pseudo-class-expected.checksum: Added. * platform/mac/fast/css/empty-pseudo-class-expected.png: Added. * platform/mac/fast/css/empty-pseudo-class-expected.txt: Added. git-svn-id: http://svn.webkit.org/repository/webkit/trunk@29918 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
- 18 Jan, 2008 1 commit
-
-
hyatt@apple.com authored
Fix for http://bugs.webkit.org/show_bug.cgi?id=14975 Computed size of padding is incorrect because we default padding to auto. This is a made-up value that was only used to implement cellpadding on tables. We needed this made-up value in order to tell that padding wasn't set so that we could then apply cellpadding. This patch rewrites cellpadding to be like other browsers. Instead of being a setting on the table renderer that applies to all cells (even ones that were not <td>s), cellpadding is now mapped into the style of <td>s. With this change it effectively becomes a content model feature and not a rendering feature. For example, a <td> will pick up cellpadding even when it is not a cell and/or the enclosing <table> is not a table. Anonymous cells and CSS-display-type cells will now never pick up cellpadding. This behavior is all consistent with other browsers. Reviewed by Antti Added fast/css/padding-no-renderer.html * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::canShareStyleWithElement): (WebCore::CSSStyleSelector::styleForElement): * css/CSSStyleSelector.h: * dom/StyledElement.cpp: * dom/StyledElement.h: (WebCore::StyledElement::canHaveAdditionalAttributeStyleDecls): (WebCore::StyledElement::additionalAttributeStyleDecls): * html/HTMLTableCellElement.cpp: (WebCore::HTMLTableCellElement::additionalAttributeStyleDecls): * html/HTMLTableCellElement.h: (WebCore::HTMLTableCellElement::canHaveAdditionalAttributeStyleDecls): * html/HTMLTableColElement.cpp: (WebCore::HTMLTableColElement::additionalAttributeStyleDecls): * html/HTMLTableColElement.h: (WebCore::HTMLTableColElement::canHaveAdditionalAttributeStyleDecls): * html/HTMLTableElement.cpp: (WebCore::HTMLTableElement::parseMappedAttribute): (WebCore::HTMLTableElement::additionalAttributeStyleDecls): (WebCore::HTMLTableElement::addSharedCellDecls): (WebCore::HTMLTableElement::addSharedCellBordersDecl): (WebCore::HTMLTableElement::addSharedCellPaddingDecl): (WebCore::HTMLTableElement::addSharedGroupDecls): (WebCore::HTMLTableElement::attach): * html/HTMLTableElement.h: (WebCore::HTMLTableElement::canHaveAdditionalAttributeStyleDecls): * html/HTMLTableSectionElement.cpp: (WebCore::HTMLTableSectionElement::additionalAttributeStyleDecls): * html/HTMLTableSectionElement.h: (WebCore::HTMLTableSectionElement::canHaveAdditionalAttributeStyleDecls): * rendering/AutoTableLayout.cpp: (WebCore::AutoTableLayout::recalcColumn): * rendering/RenderObject.cpp: (WebCore::RenderObject::paddingTop): (WebCore::RenderObject::paddingBottom): (WebCore::RenderObject::paddingLeft): (WebCore::RenderObject::paddingRight): * rendering/RenderStyle.cpp: (WebCore::StyleSurroundData::StyleSurroundData): * rendering/RenderStyle.h: (WebCore::RenderStyle::initialPadding): * rendering/RenderTable.cpp: (WebCore::RenderTable::RenderTable): * rendering/RenderTable.h: LayoutTests: Updated results for http://bugs.webkit.org/show_bug.cgi?id=14975 Reviewed by Antti * fast/css/computed-style-without-renderer-expected.txt: * fast/css/padding-no-renderer-expected.txt: Added. * fast/css/padding-no-renderer.html: Added. * platform/mac/fast/css/acid2-expected.checksum: * platform/mac/fast/css/acid2-expected.png: * platform/mac/fast/css/acid2-expected.txt: * platform/mac/fast/css/acid2-pixel-expected.checksum: * platform/mac/fast/css/acid2-pixel-expected.png: * platform/mac/fast/css/acid2-pixel-expected.txt: * platform/mac/fast/frames/viewsource-attribute-expected.checksum: * platform/mac/fast/frames/viewsource-attribute-expected.png: * platform/mac/fast/frames/viewsource-attribute-expected.txt: * platform/mac/fast/lists/ordered-list-with-no-ol-tag-expected.checksum: * platform/mac/fast/lists/ordered-list-with-no-ol-tag-expected.png: * platform/mac/fast/lists/ordered-list-with-no-ol-tag-expected.txt: * platform/mac/fast/table/add-before-anonymous-child-expected.checksum: * platform/mac/fast/table/add-before-anonymous-child-expected.png: * platform/mac/fast/table/add-before-anonymous-child-expected.txt: * platform/mac/fast/table/cell-absolute-child-expected.checksum: * platform/mac/fast/table/cell-absolute-child-expected.png: * platform/mac/fast/table/cell-absolute-child-expected.txt: * platform/mac/fast/table/frame-and-rules-expected.checksum: * platform/mac/fast/table/frame-and-rules-expected.png: * platform/mac/fast/table/frame-and-rules-expected.txt: * platform/mac/http/tests/misc/acid2-expected.checksum: * platform/mac/http/tests/misc/acid2-expected.png: * platform/mac/http/tests/misc/acid2-expected.txt: * platform/mac/http/tests/misc/acid2-pixel-expected.checksum: * platform/mac/http/tests/misc/acid2-pixel-expected.png: * platform/mac/http/tests/misc/acid2-pixel-expected.txt: * platform/mac/tables/mozilla/bugs/bug30985-expected.checksum: * platform/mac/tables/mozilla/bugs/bug30985-expected.png: * platform/mac/tables/mozilla/bugs/bug30985-expected.txt: git-svn-id: http://svn.webkit.org/repository/webkit/trunk@29647 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-