1. 29 Jul, 2010 9 commits
    • simon.fraser@apple.com's avatar
      2010-07-29 Simon Fraser <simon.fraser@apple.com> · e3a3b735
      simon.fraser@apple.com authored
              Reviewed by Pavel Feldman.
      
              Crash when computing pseudo-style of a vanished scrollbar in inspector
              https://bugs.webkit.org/show_bug.cgi?id=42561
      
              When a styled overflow:scroll scrollbar gets destroyed, we need to clear out the m_owner pointer,
              otherwise the event handling code (which keeps the Scrollbar alive) later causes the scrollbar
              to try to use m_owner to get pseudo style.
      
              Test: scrollbars/overflow-custom-scrollbar-crash.html
      
              * rendering/RenderLayer.cpp:
              (WebCore::RenderLayer::destroyScrollbar): If this is a custom scrollbar, clear the owning renderer.
              * rendering/RenderScrollbar.cpp:
              (WebCore::RenderScrollbar::getScrollbarPseudoStyle): Bail if m_owner is 0.
              * rendering/RenderScrollbar.h:
              (WebCore::RenderScrollbar::clearOwningRenderer): New method.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@64289 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      e3a3b735
    • zimmermann@webkit.org's avatar
      2010-07-29 Nikolas Zimmermann <nzimmermann@rim.com> · 0c8b0223
      zimmermann@webkit.org authored
              Not reviewed. Fix release builds, by removing unused variables, that only served for ASSERTs that are no longer needed.
      
              * rendering/SVGRenderSupport.cpp:
              (WebCore::SVGRenderSupport::prepareToRenderSVGContent):
              (WebCore::SVGRenderSupport::pointInClippingArea):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@64277 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      0c8b0223
    • zimmermann@webkit.org's avatar
      2010-07-29 Nikolas Zimmermann <nzimmermann@rim.com> · 1a97a8ca
      zimmermann@webkit.org authored
              Not reviewed. Fix build warning about unreachable code, seen on the windows slave.
      
              * rendering/RenderSVGContainer.cpp:
              (WebCore::RenderSVGContainer::selfWillPaint):
              * rendering/RenderSVGRoot.cpp:
              (WebCore::RenderSVGRoot::selfWillPaint):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@64276 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      1a97a8ca
    • zimmermann@webkit.org's avatar
      2010-07-29 Nikolas Zimmermann <nzimmermann@rim.com> · b984a40e
      zimmermann@webkit.org authored
              Reviewed by Dirk Schulze.
      
              WebKit shouldn't ignore resource cycles, but break them as Opera does
              https://bugs.webkit.org/show_bug.cgi?id=43031
      
              mask images are not updated when render objects' bounds change
              https://bugs.webkit.org/show_bug.cgi?id=15124
      
              SVG Gradients do not resize correctly
              https://bugs.webkit.org/show_bug.cgi?id=41902
      
              svg/dynamic-updates: SVGMarkerElement markerHeight/Width tests are broken
              https://bugs.webkit.org/show_bug.cgi?id=42616
      
              svg/dynamic-updates: SVGMaskElement tests are all broken
              https://bugs.webkit.org/show_bug.cgi?id=42617
      
              Don't ignore resources containing cyclic references, but break them, as discussed on SVG WG mailing lists - to be compatible with Opera which already does that.
      
              We used to lookup RenderSVGResourceContainers objects, by extracting the URI reference from the SVGRenderStyle, then utilizing getElementById() to lookup the
              node, and access its renderer. Opera ignores such references, if they point to resources that contain cyclic references. Ignoring them would mean we have
              to mutate the render style to empty the resource strings. That obviously doesn't work, as it would break expectations (getComputedStyle, etc.).
      
              Introduce a SVGResources class that stores pointers to all resources, that can be applied to a RenderObject (clipper/filter/markers/masker).
              Add a SVGResourcesCache class, which is basically a HashMap<RenderObject*, SVGResources*>. Whenever a RenderObject receives style, we extract the URI references
              from the SVGRenderStyle, look up the RenderSVGResourceContainer* objects, and store them in a SVGResources* class. Then we execute a cycle detection logic,
              which detects cyclic references and breaks them. Breaking them means just nulling the pointer to the resource in the SVGResources object. Those SVGResources
              objects are cached, and used throughout the render tree to access resources. This way it's guaranteed that all cyclic references are resolved until layout/paint
              phase begins.
      
              Add destroy/styleDidChange/updateFromElement methods to all SVG renderers, in order to keep track of resource/client changes in the SVGResourcesCache.
              As side-effect the SVGResourcesCache now knows which RenderObject references which resource, and thus can handle client registration for a RenderSVGResourceContainer.
              The RenderSVGResourceContainer now holds a HashSet of RenderObjects, that's always up2date, and not related to the fact wheter a resources has already been used
              for painting. The old logic missed to register clients for a resource, when the resource was in an invalid state. Fixing that fixes the svg/dynamic-updates/SVGMaskElement* tests.
      
              Rewrite all svg/custom/recursive-(filter|gradient|mask|pattern).svg tests to contain a reference image how it should be renderered. All 1:1 compatible with Opera now.
      
              * rendering/RenderForeignObject.cpp:
              (WebCore::RenderForeignObject::layout): Grab selfNeedsLayout() before calling RenderBlock::layout(), otherwhise it's always false.
              * rendering/RenderPath.cpp: Don't look up resources manually, use SVGResourcesCache.
              (WebCore::RenderPath::fillContains): Remove constness, to avoid the need to pass around const RenderObjects* to the SVGResourcesCache.
              (WebCore::RenderPath::strokeContains): Ditto.
              (WebCore::RenderPath::layout): s/RenderSVGResource::invalidateAllResourcesOfRenderer/SVGResourcesCache::clientLayoutChanged/.
              (WebCore::RenderPath::calculateMarkerBoundsIfNeeded): Remove special client handling for markers, it's all unified now.
              (WebCore::RenderPath::styleWillChange): Only call setNeedsBoundariesUpdate when handling StyleDifferenceRepaint/Layout.
              * rendering/RenderPath.h:
              * rendering/RenderSVGBlock.cpp:
              (WebCore::RenderSVGBlock::destroy): Forward to SVGResourcesCache::clientDestroyed.
              (WebCore::RenderSVGBlock::styleDidChange): Forward to SVGResourcesCache::clientStyleChanged.
              (WebCore::RenderSVGBlock::updateFromElement): Forward to SVGResourcesCache::clientUpdatedFromElement.
              * rendering/RenderSVGBlock.h:
              * rendering/RenderSVGContainer.cpp:
              (WebCore::RenderSVGContainer::layout): s/RenderSVGResource::invalidateAllResourcesOfRenderer/SVGResourcesCache::clientLayoutChanged/.
              (WebCore::RenderSVGContainer::selfWillPaint): Don't look up resources manually, use SVGResourcesCache.
              * rendering/RenderSVGContainer.h:
              * rendering/RenderSVGGradientStop.cpp:
              (WebCore::RenderSVGGradientStop::styleDidChange): Rewrite, as invalidateResourceClients() is gone.
              * rendering/RenderSVGHiddenContainer.h: Make layout() protected, as RenderSVGResourceContainer overrides it.
              * rendering/RenderSVGImage.cpp:
              (WebCore::RenderSVGImage::layout): s/RenderSVGResource::invalidateAllResourcesOfRenderer/SVGResourcesCache::clientLayoutChanged/.
              (WebCore::RenderSVGImage::destroy): Forward to SVGResourcesCache::clientDestroyed.
              (WebCore::RenderSVGImage::styleDidChange): Forward to SVGResourcesCache::clientStyleChanged.
              (WebCore::RenderSVGImage::updateFromElement): Forward to SVGResourcesCache::clientUpdatedFromElement.
              (WebCore::RenderSVGImage::imageChanged): Don't look up resources manually, use SVGResourcesCache.
              * rendering/RenderSVGImage.h:
              * rendering/RenderSVGInline.cpp:
              (WebCore::RenderSVGInline::destroy): Forward to SVGResourcesCache::clientDestroyed.
              (WebCore::RenderSVGInline::styleDidChange): Forward to SVGResourcesCache::clientStyleChanged.
              (WebCore::RenderSVGInline::updateFromElement): Forward to SVGResourcesCache::clientUpdatedFromElement.
              * rendering/RenderSVGInline.h:
              * rendering/RenderSVGModelObject.cpp:
              (WebCore::RenderSVGModelObject::destroy): Forward to SVGResourcesCache::clientDestroyed.
              (WebCore::RenderSVGModelObject::styleDidChange): Forward to SVGResourcesCache::clientStyleChanged.
              (WebCore::RenderSVGModelObject::updateFromElement): Forward to SVGResourcesCache::clientUpdatedFromElement.
              * rendering/RenderSVGModelObject.h:
              * rendering/RenderSVGResource.cpp:
              (WebCore::RenderSVGResource::fillPaintingResource): Remove const from RenderObject parameter.
              (WebCore::RenderSVGResource::strokePaintingResource): Ditto.
              (WebCore::RenderSVGResource::markForLayoutAndParentResourceInvalidation): Early exit if we found the first parent resource.
              * rendering/RenderSVGResource.h:
              * rendering/RenderSVGResourceClipper.cpp:
              (WebCore::RenderSVGResourceClipper::~RenderSVGResourceClipper): Early exit if m_clipper is empty.
              (WebCore::RenderSVGResourceClipper::invalidateClients): Use new helper functions to invalidate clients, shared between all resources in RenderSVGResourceContainer.
              (WebCore::RenderSVGResourceClipper::invalidateClient): Ditto.
              (WebCore::RenderSVGResourceClipper::applyResource): Remove containsCyclicReference() check, SVGResourcesCycleSolver breaks cyclic references, resources do not need to take care anymore.
              (WebCore::RenderSVGResourceClipper::createClipData): Don't look up resources manually, use SVGResourcesCache.
              (WebCore::RenderSVGResourceClipper::hitTestClipContent): Remove containsCyclicReference() check, SVGResourcesCycleSolver breaks cyclic references, resources do not need to take care anymore.
              * rendering/RenderSVGResourceClipper.h:
              * rendering/RenderSVGResourceContainer.cpp:
              (WebCore::svgExtensionsFromNode):
              (WebCore::RenderSVGResourceContainer::RenderSVGResourceContainer): Stop registering resource from the constructor, delegate to styleDidChange.
              (WebCore::RenderSVGResourceContainer::~RenderSVGResourceContainer): Only deregister resource if it was ever registered.
              (WebCore::RenderSVGResourceContainer::layout): invalidateClients() here, to avoid the need for invalidateResourceClients() in the SVG DOM. Just call setNeedsLayout() from the SVG DOM.
              (WebCore::RenderSVGResourceContainer::destroy): Forward to SVGResourcesCache::resourceDestroyed.
              (WebCore::RenderSVGResourceContainer::styleDidChange): Register resource not in the constructor but when it first receives style.
              (WebCore::RenderSVGResourceContainer::idChanged): Don't duplicate code, use existing methods from SVGResourcesCache.
              (WebCore::RenderSVGResourceContainer::markAllClientsForInvalidation): Add new helper function, to share code between all resources.
              (WebCore::RenderSVGResourceContainer::markClientForInvalidation): Ditto.
              (WebCore::RenderSVGResourceContainer::addClient): SVGResourcesCache now manages the list of clients. It calls addClient() for each RenderObject that uses this resource.
              (WebCore::RenderSVGResourceContainer::removeClient): SVGResourcesCache now manages the list of clients.
              (WebCore::RenderSVGResourceContainer::registerResource): New helper function sharing code between idChanged / styleDidChange.
              (WebCore::RenderSVGResourceContainer::transformOnNonScalingStroke): Add FIXME that the function is misplaced.
              * rendering/RenderSVGResourceContainer.h: Move most functions to the new RenderSVGResourceContainer.cpp file.
              * rendering/RenderSVGResourceFilter.cpp:
              (WebCore::RenderSVGResourceFilter::~RenderSVGResourceFilter): Early exit if m_filter is empty.
              (WebCore::RenderSVGResourceFilter::invalidateClients): Use new helper functions to invalidate clients, shared between all resources in RenderSVGResourceContainer.
              (WebCore::RenderSVGResourceFilter::invalidateClient): Ditto.
              * rendering/RenderSVGResourceGradient.cpp:
              (WebCore::RenderSVGResourceGradient::~RenderSVGResourceGradient): Early exit if m_gradient is empty.
              (WebCore::RenderSVGResourceGradient::invalidateClients): Use new helper functions to invalidate clients, shared between all resources in RenderSVGResourceContainer.
              (WebCore::RenderSVGResourceGradient::invalidateClient): Ditto.
              * rendering/RenderSVGResourceMarker.cpp:
              (WebCore::RenderSVGResourceMarker::~RenderSVGResourceMarker): Now a no-op, markers are unified within the new client handling concept, no more special code needed.
              (WebCore::RenderSVGResourceMarker::layout): As RenderSVGResourceMarker skips the RenderSVGResourceContainer::layout() method, we also need to call invalidateClients() here.
              (WebCore::RenderSVGResourceMarker::invalidateClients): Use new helper functions to invalidate clients, shared between all resources in RenderSVGResourceContainer.
              (WebCore::RenderSVGResourceMarker::invalidateClient): Ditto.
              (WebCore::RenderSVGResourceMarker::draw): Remove marker specific logic to catch circular references.
              * rendering/RenderSVGResourceMarker.h:
              * rendering/RenderSVGResourceMasker.cpp:
              (WebCore::RenderSVGResourceMasker::~RenderSVGResourceMasker): Early exit if m_masker is empty.
              (WebCore::RenderSVGResourceMasker::invalidateClients): Use new helper functions to invalidate clients, shared between all resources in RenderSVGResourceContainer.
              (WebCore::RenderSVGResourceMasker::invalidateClient): Ditto.
              (WebCore::RenderSVGResourceMasker::applyResource): Remove containsCyclicReference() check, SVGResourcesCycleSolver breaks cyclic references, resources do not need to take care anymore.
              * rendering/RenderSVGResourceMasker.h:
              * rendering/RenderSVGResourcePattern.cpp:
              (WebCore::RenderSVGResourcePattern::~RenderSVGResourcePattern): Early exit if m_pattern is empty.
              (WebCore::RenderSVGResourcePattern::invalidateClients): Use new helper functions to invalidate clients, shared between all resources in RenderSVGResourceContainer.
              (WebCore::RenderSVGResourcePattern::invalidateClient): Ditto.
              (WebCore::RenderSVGResourcePattern::createTileImage): Remove containsCyclicReference() check, SVGResourcesCycleSolver breaks cyclic references, resources do not need to take care anymore.
              * rendering/RenderSVGResourcePattern.h:
              * rendering/RenderSVGRoot.cpp:
              (WebCore::RenderSVGRoot::selfWillPaint): Don't look up resources manually, use SVGResourcesCache.
              (WebCore::RenderSVGRoot::destroy): Forward to SVGResourcesCache::clientDestroyed.
              (WebCore::RenderSVGRoot::styleDidChange): Forward to SVGResourcesCache::clientStyleChanged.
              (WebCore::RenderSVGRoot::updateFromElement): Forward to SVGResourcesCache::clientUpdatedFromElement.
              * rendering/RenderSVGRoot.h:
              * rendering/RenderSVGText.cpp:
              (WebCore::RenderSVGText::layout): s/RenderSVGResource::invalidateAllResourcesOfRenderer/SVGResourcesCache::clientLayoutChanged/.
              * rendering/RenderSVGText.h:
              * rendering/SVGInlineTextBox.cpp:
              (WebCore::SVGInlineTextBox::acquirePaintingResource): Add RenderObject* parameter, don't assume the style comes from the InlineTextBox parent renderer.
              (WebCore::SVGInlineTextBox::prepareGraphicsContextForTextPainting): Pass the parent()->renderer() to acquirePaintingResource.
              (WebCore::SVGInlineTextBox::paintDecoration): Pass the decoration renderer to acquirePaintingResource.
              (WebCore::SVGInlineTextBox::paintDecorationWithStyle): Ditto.
              (WebCore::SVGInlineTextBox::paintText): When a selection pseudo style is used to paint the selection, swap styles in the SVGResourcesCache, to take the right resources when painting.
              * rendering/SVGInlineTextBox.h:
              * rendering/SVGRenderSupport.cpp:
              (WebCore::SVGRenderSupport::prepareToRenderSVGContent): Don't look up resources manually, use SVGResourcesCache.
              (WebCore::SVGRenderSupport::finishRenderSVGContent): Ditto.
              (WebCore::SVGRenderSupport::intersectRepaintRectWithResources): Ditto.
              (WebCore::SVGRenderSupport::pointInClippingArea): Remove const from RenderObject parameter. 
              * rendering/SVGRenderSupport.h:
              * rendering/SVGRenderTreeAsText.cpp:
              (WebCore::writeStyle): Add two const_cast now that fill/strokePaintingResource take RenderObject* parameters. This was the less intrusive approach, otherwhise more const_casts would be needed.
              (WebCore::writeResources): Add FIXME that we should dump the resources present in the SVGResourcesCache instead of manually looking them up from the SVGRenderStyle, to avoid dumping cycles.
              * rendering/SVGResourcesCache.cpp:
              (WebCore::SVGResourcesCache::clientStyleChanged): Use markForLayoutAndParentResourceInvalidation() instead of duplicating code.
              * rendering/SVGResourcesCycleSolver.cpp:
              (WebCore::setFollowLinkForChainableResource): Implemented stub method.
              * rendering/style/SVGRenderStyle.cpp:
              (WebCore::SVGRenderStyle::diff): Return StyleDifferenceLayout, not Repaint for stroke paint changes, otherwhise the cached boundaries are not correctly updated.
              * svg/SVGClipPathElement.cpp:
              (WebCore::SVGClipPathElement::svgAttributeChanged): Don't use invalidateResourceClients(), it's not needed anymore, only call setNeedsLayout() on the renderer.
              (WebCore::SVGClipPathElement::childrenChanged): Ditto.
              * svg/SVGClipPathElement.h:
              (WebCore::SVGClipPathElement::needsPendingResourceHandling): Return false, buildPendingResource() logic not needed anymore for resources, handled by RenderSVGResourceContainer.
              * svg/SVGElement.cpp:
              (WebCore::SVGElement::insertedIntoDocument): Only execute buildPendingResource() logic, if needsPendingResourceHandling() returns true. Cleaned up code a bit, to deploy early returns.
              * svg/SVGElement.h:
              (WebCore::SVGElement::needsPendingResourceHandling): Return true (default). Only needed by SVGTextPathElement/SVGUseElement, and should be removed in future.
              * svg/SVGFilterElement.cpp:
              (WebCore::SVGFilterElement::SVGFilterElement): Initialize m_followLink=true.
              (WebCore::SVGFilterElement::setFilterRes): Don't use invalidateResourceClients(), it's not needed anymore, only call setNeedsLayout() on the renderer.
              (WebCore::SVGFilterElement::svgAttributeChanged): Ditto.
              (WebCore::SVGFilterElement::childrenChanged): Ditto.
              * svg/SVGFilterElement.h:
              (WebCore::SVGFilterElement::needsPendingResourceHandling): Return false, buildPendingResource() logic not needed anymore for resources, handled by RenderSVGResourceContainer.
              (WebCore::SVGFilterElement::setFollowLink): Used by SVGResourcesCycleSolver, to stop following xlink:href links, if that leads to cyclic references.
              * svg/SVGFilterPrimitiveStandardAttributes.cpp:
              (WebCore::SVGFilterPrimitiveStandardAttributes::childrenChanged): Don't use invalidateResourceClients(), it's a no-op as effects don't have a renderer -> use invalidateFilter().
              * svg/SVGFilterPrimitiveStandardAttributes.h:
              (WebCore::SVGFilterPrimitiveStandardAttributes::invalidateFilter): Don't use invalidateResourceClients(), it's not needed anymore, only call setNeedsLayout() on the renderer.
              * svg/SVGGradientElement.cpp:
              (WebCore::SVGGradientElement::SVGGradientElement): Initialize m_followLink=true.
              (WebCore::SVGGradientElement::svgAttributeChanged): Don't use invalidateResourceClients(), it's not needed anymore, only call setNeedsLayout() on the renderer.
              (WebCore::SVGGradientElement::childrenChanged): Ditto.
              * svg/SVGGradientElement.h:
              (WebCore::SVGGradientElement::needsPendingResourceHandling): Return false, buildPendingResource() logic not needed anymore for resources, handled by RenderSVGResourceContainer.
              (WebCore::SVGGradientElement::setFollowLink): Used by SVGResourcesCycleSolver, to stop following xlink:href links, if that leads to cyclic references.
              * svg/SVGLinearGradientElement.cpp:
              (WebCore::SVGLinearGradientElement::svgAttributeChanged): Don't use invalidateResourceClients(), it's not needed anymore, only call setNeedsLayout() on the renderer.
              (WebCore::SVGLinearGradientElement::collectGradientProperties): Only follow xlink:href links if m_followLinks == true.
              * svg/SVGMarkerElement.cpp:
              (WebCore::SVGMarkerElement::svgAttributeChanged): Don't use invalidateResourceClients(), it's not needed anymore, only call setNeedsLayout() on the renderer.
              (WebCore::SVGMarkerElement::childrenChanged): Ditto.
              (WebCore::SVGMarkerElement::setOrientToAuto): Ditto.
              (WebCore::SVGMarkerElement::setOrientToAngle): Ditto.
              * svg/SVGMarkerElement.h:
              (WebCore::SVGMarkerElement::needsPendingResourceHandling): Return false, buildPendingResource() logic not needed anymore for resources, handled by RenderSVGResourceContainer.
              * svg/SVGMaskElement.cpp:
              (WebCore::SVGMaskElement::svgAttributeChanged): Don't use invalidateResourceClients(), it's not needed anymore, only call setNeedsLayout() on the renderer.
              (WebCore::SVGMaskElement::childrenChanged): Ditto.
              * svg/SVGMaskElement.h:
              (WebCore::SVGMaskElement::needsPendingResourceHandling): Return false, buildPendingResource() logic not needed anymore for resources, handled by RenderSVGResourceContainer.
              * svg/SVGPatternElement.cpp:
              (WebCore::SVGPatternElement::SVGPatternElement): Initialize m_followLink=true.
              (WebCore::SVGPatternElement::svgAttributeChanged): Don't use invalidateResourceClients(), it's not needed anymore, only call setNeedsLayout() on the renderer.
              (WebCore::SVGPatternElement::childrenChanged): Ditto.
              (WebCore::SVGPatternElement::collectPatternProperties): Only follow xlink:href links if m_followLinks == true.
              * svg/SVGPatternElement.h:
              (WebCore::SVGPatternElement::needsPendingResourceHandling): Return false, buildPendingResource() logic not needed anymore for resources, handled by RenderSVGResourceContainer.
              (WebCore::SVGPatternElement::setFollowLink): Used by SVGResourcesCycleSolver, to stop following xlink:href links, if that leads to cyclic references.
              * svg/SVGRadialGradientElement.cpp:
              (WebCore::SVGRadialGradientElement::svgAttributeChanged): Don't use invalidateResourceClients(), it's not needed anymore, only call setNeedsLayout() on the renderer.
              (WebCore::SVGRadialGradientElement::collectGradientProperties): Only follow xlink:href links if m_followLinks == true.
              * svg/SVGStyledElement.cpp:
              (WebCore::SVGStyledElement::attach): Call updateFromElement upon attach(), needed by all resource renderers. Defaults to a no-op in RenderObject.h
              * svg/SVGStyledElement.h: Remove invalidateResourceClients(), it's not needed anymore.
      2010-07-29  Nikolas Zimmermann  <nzimmermann@rim.com>
      
              Reviewed by Dirk Schulze.
      
              WebKit shouldn't ignore resource cycles, but break them as Opera does
              https://bugs.webkit.org/show_bug.cgi?id=43031
      
              Rebaseline results now that cycles are broken, instead of ignored.
      
              * platform/mac/svg/clip-path/clip-path-recursive-call-by-child-expected.txt:
              * platform/mac/svg/clip-path/clip-path-recursive-call-expected.checksum:
              * platform/mac/svg/clip-path/clip-path-recursive-call-expected.png:
              * platform/mac/svg/custom/circular-marker-reference-4-expected.txt:
              * platform/mac/svg/custom/gradient-cycle-detection-expected.checksum:
              * platform/mac/svg/custom/gradient-cycle-detection-expected.png:
              * platform/mac/svg/custom/recursive-clippath-expected.checksum:
              * platform/mac/svg/custom/recursive-clippath-expected.png:
              * platform/mac/svg/custom/recursive-clippath-expected.txt:
              * platform/mac/svg/custom/recursive-filter-expected.checksum:
              * platform/mac/svg/custom/recursive-filter-expected.png:
              * platform/mac/svg/custom/recursive-filter-expected.txt:
              * platform/mac/svg/custom/recursive-gradient-expected.checksum:
              * platform/mac/svg/custom/recursive-gradient-expected.png:
              * platform/mac/svg/custom/recursive-gradient-expected.txt:
              * platform/mac/svg/custom/recursive-mask-expected.checksum:
              * platform/mac/svg/custom/recursive-mask-expected.png:
              * platform/mac/svg/custom/recursive-mask-expected.txt:
              * platform/mac/svg/custom/recursive-pattern-expected.checksum:
              * platform/mac/svg/custom/recursive-pattern-expected.png:
              * platform/mac/svg/custom/recursive-pattern-expected.txt:
              * platform/mac/svg/custom/use-events-crash-expected.txt:
              * platform/mac/svg/dynamic-updates/SVGMarkerElement-dom-markerHeight-attr-expected.checksum:
              * platform/mac/svg/dynamic-updates/SVGMarkerElement-dom-markerHeight-attr-expected.png:
              * platform/mac/svg/dynamic-updates/SVGMarkerElement-dom-markerWidth-attr-expected.checksum:
              * platform/mac/svg/dynamic-updates/SVGMarkerElement-dom-markerWidth-attr-expected.png:
              * platform/mac/svg/dynamic-updates/SVGMarkerElement-svgdom-markerHeight-prop-expected.checksum:
              * platform/mac/svg/dynamic-updates/SVGMarkerElement-svgdom-markerHeight-prop-expected.png:
              * platform/mac/svg/dynamic-updates/SVGMarkerElement-svgdom-markerWidth-prop-expected.checksum:
              * platform/mac/svg/dynamic-updates/SVGMarkerElement-svgdom-markerWidth-prop-expected.png:
              * platform/mac/svg/dynamic-updates/SVGMaskElement-dom-height-attr-expected.checksum:
              * platform/mac/svg/dynamic-updates/SVGMaskElement-dom-height-attr-expected.png:
              * platform/mac/svg/dynamic-updates/SVGMaskElement-dom-maskContentUnits-attr-expected.checksum:
              * platform/mac/svg/dynamic-updates/SVGMaskElement-dom-maskContentUnits-attr-expected.png:
              * platform/mac/svg/dynamic-updates/SVGMaskElement-dom-maskUnits-attr-expected.checksum:
              * platform/mac/svg/dynamic-updates/SVGMaskElement-dom-maskUnits-attr-expected.png:
              * platform/mac/svg/dynamic-updates/SVGMaskElement-dom-width-attr-expected.checksum:
              * platform/mac/svg/dynamic-updates/SVGMaskElement-dom-width-attr-expected.png:
              * platform/mac/svg/dynamic-updates/SVGMaskElement-dom-x-attr-expected.checksum:
              * platform/mac/svg/dynamic-updates/SVGMaskElement-dom-x-attr-expected.png:
              * platform/mac/svg/dynamic-updates/SVGMaskElement-dom-y-attr-expected.checksum:
              * platform/mac/svg/dynamic-updates/SVGMaskElement-dom-y-attr-expected.png:
              * platform/mac/svg/dynamic-updates/SVGMaskElement-svgdom-height-prop-expected.checksum:
              * platform/mac/svg/dynamic-updates/SVGMaskElement-svgdom-height-prop-expected.png:
              * platform/mac/svg/dynamic-updates/SVGMaskElement-svgdom-maskContentUnits-prop-expected.checksum:
              * platform/mac/svg/dynamic-updates/SVGMaskElement-svgdom-maskContentUnits-prop-expected.png:
              * platform/mac/svg/dynamic-updates/SVGMaskElement-svgdom-maskUnits-prop-expected.checksum:
              * platform/mac/svg/dynamic-updates/SVGMaskElement-svgdom-maskUnits-prop-expected.png:
              * platform/mac/svg/dynamic-updates/SVGMaskElement-svgdom-width-prop-expected.checksum:
              * platform/mac/svg/dynamic-updates/SVGMaskElement-svgdom-width-prop-expected.png:
              * platform/mac/svg/dynamic-updates/SVGMaskElement-svgdom-x-prop-expected.checksum:
              * platform/mac/svg/dynamic-updates/SVGMaskElement-svgdom-x-prop-expected.png:
              * platform/mac/svg/dynamic-updates/SVGMaskElement-svgdom-y-prop-expected.checksum:
              * platform/mac/svg/dynamic-updates/SVGMaskElement-svgdom-y-prop-expected.png:
              * platform/mac/svg/hixie/error/017-expected.txt:
              * svg/clip-path/clip-path-recursive-call-by-child.svg: Rewrite test to match expectations, now that cycles are broken, not ignored. Looks like in Opera.
              * svg/custom/js-late-clipPath-and-object-creation.svg: Don't update from within the onload event, instead use zero-ms timeouts, to test updating reliable. It failed before this patch.
              * svg/custom/js-late-clipPath-creation.svg: Ditto.
              * svg/custom/js-late-gradient-and-object-creation.svg: Ditto.
              * svg/custom/js-late-gradient-creation.svg: Ditto.
              * svg/custom/js-late-marker-and-object-creation.svg: Ditto.
              * svg/custom/js-late-marker-creation.svg: Ditto.
              * svg/custom/js-late-mask-and-object-creation.svg: Ditto.
              * svg/custom/js-late-mask-creation.svg: Ditto.
              * svg/custom/js-late-pattern-and-object-creation.svg: Ditto.
              * svg/custom/js-late-pattern-creation.svg: Ditto.
              * svg/custom/recursive-clippath.svg: Add a reference rendering, side by side to the test, for the ease of comparision. Passes in WebKit + Opera.
              * svg/custom/recursive-filter.svg: Ditto.
              * svg/custom/recursive-gradient.svg: Ditto.
              * svg/custom/recursive-mask.svg: Ditto.
              * svg/custom/recursive-pattern.svg: Ditto.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@64275 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      b984a40e
    • commit-queue@webkit.org's avatar
      2010-07-29 Gyuyoung Kim <gyuyoung.kim@samsung.com> · 69e59f31
      commit-queue@webkit.org authored
              Reviewed by Kenneth Rohde Christiansen.
      
              [EFL] Support to enable WML in WebKit EFL
              https://bugs.webkit.org/show_bug.cgi?id=43178
      
              WebKit EFL cannot enable WML. WML files are added to CMakeLists.txt
              to enable WML in WebKit EFL.
      
              * CMakeLists.txt: Support to enable WML.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@64273 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      69e59f31
    • tonikitoo@webkit.org's avatar
      2010-07-21 Grace Kloba <klobag@gmail.com> , Antonio Gomes <tonikitoo@webkit.org> · 81c027d5
      tonikitoo@webkit.org authored
              Reviewed by David Hyatt.
      
              Enhance the hit testing to take a rectangle instead of a point
              https://bugs.webkit.org/show_bug.cgi?id=40197
      
              The primary goal of this change is to provide mechanisms for more precise tap
              actions by the users on mobile devices.
      
              Patch extends the hit testing system to work considering a rectangular area
              as input instead of a point, when applicable. For that, the HitTestResult class
              was modified to take a padding (IntSize). The padding specifies a fuzzy range for
              accepting input events in pixels coordinates for both vertical and horizontal
              orientations. In other words, it tells how much to expand the search rect
              around a supposed touch point.
      
              If it non-positive, hit testing will behavior as the current point based hit testing,
              and methods are no-op'ed to not regress this common behavior performance-wise.
              When positive IntSize is provided, the hit test result will keep record of all
              nodes that intersect the built up test area. The logic will continue searching when it
              finds a candidate until the rectangle is fully enclosed by the boundaries of a candidate.
              The result will be a list of nodes in the z-order they are hit-tested.
              Caller will decide how to process them.
      
              In order to expose the functionality, the patch:
      
              - Adds a nodesFromRect method to the Document class, exposing the funcionality
              to the DOM. Method returns a NodeList with all nodes that intersect the given
              hit-tested area.
              - Extends hitTestResultAtPoint method of the EventHandler with an extra 'padding'
              parameter, defaulting to IntSize(0, 0). The rect-based hit test is performed when a
              positive padding is passed in.
      
              Test: fast/dom/nodesFromRect-basic.html
      
              * WebCore.base.exp:
              * dom/Document.cpp:
              (WebCore::Document::nodesFromRect): This method exposes the rect based funcionality to
              the DOM. It works similarly to elementFromPoint, however receiving a rectangular area
              as input instead of a point, and returning a z-index ordered list of nodes (not elements)
              whose area intersect the hit test rect.
              * dom/Document.h: Ditto.
              * dom/Document.idl: Ditto.
              * page/EventHandler.cpp:
              (WebCore::EventHandler::hitTestResultAtPoint): The funcionality is also exposed through this
              method. Patch adds a additional IntSize parameter to work as the padding area, building up
              the hit test rect.
              * page/EventHandler.h: Ditto.
              * rendering/HitTestResult.cpp:
              (WebCore::HitTestResult::HitTestResult): Rect based hit test constructor. Receives a
              padding IntSize as parameter. It can be (0,0).
              (WebCore::HitTestResult::operator=): Modified to assign the m_rectBasedTestResult as well.
              (WebCore::HitTestResult::append): Merge to HitTestResult objects in a way that the
              list node's of both objects get amended.
              (WebCore::HitTestResult::addNodeToRectBasedTestResult): Adds a given Node to the list of
              hit nodes.
              * rendering/HitTestResult.h:
              (WebCore::HitTestResult::padding): Returns the padding as an IntSize.
              (WebCore::HitTestResult::isRectBasedTest): Returns if the HitTestResult is rect based or not.
              (WebCore::HitTestResult::.rectBasedTestResult): Returns the list nodes hit.
              (WebCore::HitTestResult::rectFromPoint): Returns the hit test rect given the hit test point
              and padding.
              * rendering/RenderLayer.cpp:
              (WebCore::RenderLayer::hitTestLayer):
              (WebCore::RenderLayer::hitTestList):
              (WebCore::RenderLayer::hitTestChildLayerColumns):
              * rendering/EllipsisBox.cpp:
              (WebCore::EllipsisBox::nodeAtPoint): Method is modified to support rect based hit test extension.
              Now it not just checks if the boundary of the node being hit-tested contains a hit test point, but
              instead it checks if the boundary of the node intersects a hit test rect. It is implemented so
              that the common case (point based hit test) works as previously.
              * rendering/InlineFlowBox.cpp:
              (WebCore::InlineFlowBox::nodeAtPoint): Ditto.
              * rendering/InlineTextBox.cpp:
              (WebCore::InlineTextBox::nodeAtPoint): Ditto.
              * rendering/RenderBlock.cpp:
              (WebCore::RenderBlock::nodeAtPoint): Ditto.
              (WebCore::RenderBlock::hitTestColumns): Ditto.
              * rendering/RenderBox.cpp:
              (WebCore::RenderBox::nodeAtPoint): Ditto.
              * rendering/RenderImage.cpp:
              (WebCore::RenderImage::nodeAtPoint): Ditto.
              * rendering/RenderLineBoxList.cpp:
              (WebCore::RenderLineBoxList::hitTest):
              * rendering/RenderSVGRoot.cpp:
              (WebCore::RenderSVGRoot::nodeAtPoint): Ditto.
              * rendering/RenderTable.cpp:
              (WebCore::RenderTable::nodeAtPoint): Ditto.
              * rendering/RenderTableSection.cpp:
              (WebCore::RenderTableSection::nodeAtPoint): Ditto.
              * rendering/RenderWidget.cpp:
              (WebCore::RenderWidget::nodeAtPoint): Ditto.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@64272 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      81c027d5
    • steveblock@google.com's avatar
      2010-07-29 Steve Block <steveblock@google.com> · 47068b30
      steveblock@google.com authored
              Reviewed by Jeremy Orlow.
      
              Add LayoutTestController methods to test DeviceOrientation
              https://bugs.webkit.org/show_bug.cgi?id=39589
      
              * fast/dom/DeviceOrientation/basic-operation-expected.txt: Added.
              * fast/dom/DeviceOrientation/basic-operation.html: Added.
              * fast/dom/DeviceOrientation/script-tests/basic-operation.js: Added.
              * platform/gtk/Skipped:
      2010-07-29  Steve Block  <steveblock@google.com>
      
              Reviewed by Jeremy Orlow.
      
              Add LayoutTestController methods to test DeviceOrientation
              https://bugs.webkit.org/show_bug.cgi?id=39589
      
              This patch does not hook up the new LayoutTestController method to WebKit
              for any platform. This will be done in later patches.
              https://bugs.webkit.org/show_bug.cgi?id=43181 tracks this for Mac.
      
              Test: fast/dom/DeviceOrientation/basic-operation.html
      
              * WebCore/WebCore.exp.in:
              * WebCore.xcodeproj/project.pbxproj:
              * dom/DeviceOrientationClient.h:
              (WebCore::DeviceOrientationClient::~DeviceOrientationClient):
              * dom/DeviceOrientationController.cpp:
              (WebCore::DeviceOrientationController::DeviceOrientationController):
              * dom/DeviceOrientationEvent.cpp:
              * platform/mock/DeviceOrientationClientMock.cpp: Added.
              (WebCore::DeviceOrientationClientMock::DeviceOrientationClientMock):
              (WebCore::DeviceOrientationClientMock::setController):
              (WebCore::DeviceOrientationClientMock::startUpdating):
              (WebCore::DeviceOrientationClientMock::stopUpdating):
              (WebCore::DeviceOrientationClientMock::setOrientation):
              (WebCore::DeviceOrientationClientMock::timerFired):
              * platform/mock/DeviceOrientationClientMock.h: Added.
              (WebCore::DeviceOrientationClientMock::lastOrientation):
      2010-07-29  Steve Block  <steveblock@google.com>
      
              Reviewed by Jeremy Orlow.
      
              Add LayoutTestController methods to test DeviceOrientation
              https://bugs.webkit.org/show_bug.cgi?id=39589
      
              * DumpRenderTree/LayoutTestController.cpp:
              (setMockDeviceOrientationCallback):
              (LayoutTestController::staticFunctions):
              * DumpRenderTree/LayoutTestController.h:
              * DumpRenderTree/chromium/LayoutTestController.cpp:
              * DumpRenderTree/chromium/LayoutTestController.h:
              * DumpRenderTree/gtk/LayoutTestControllerGtk.cpp:
              (LayoutTestController::setMockDeviceOrientation):
              * DumpRenderTree/mac/LayoutTestControllerMac.mm:
              (LayoutTestController::setMockDeviceOrientation):
              * DumpRenderTree/qt/LayoutTestControllerQt.cpp:
              (LayoutTestController::setMockDeviceOrientation):
              * DumpRenderTree/qt/LayoutTestControllerQt.h:
              * DumpRenderTree/win/LayoutTestControllerWin.cpp:
              (LayoutTestController::setMockDeviceOrientation):
              * DumpRenderTree/wx/LayoutTestControllerWx.cpp:
              (LayoutTestController::setMockDeviceOrientation):
              * Scripts/build-webkit:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@64270 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      47068b30
    • commit-queue@webkit.org's avatar
      2010-07-29 Satish Sampath <satish@chromium.org> · cbdf2948
      commit-queue@webkit.org authored
              Reviewed by Steve Block.
      
              Runtime feature switch for speech input.
              https://bugs.webkit.org/show_bug.cgi?id=43146
      
              Add a runtime feature switch that decides whether speech input attributes are available or not.
              Defaults to true.
      
              * bindings/generic/RuntimeEnabledFeatures.cpp:
              * bindings/generic/RuntimeEnabledFeatures.h:
              (WebCore::RuntimeEnabledFeatures::setSpeechInputEnabled):
              (WebCore::RuntimeEnabledFeatures::speechInputEnabled):
              (WebCore::RuntimeEnabledFeatures::speechEnabled):
              * html/HTMLInputElement.idl:
      2010-07-29  Satish Sampath  <satish@chromium.org>
      
              Reviewed by Steve Block.
      
              Runtime feature switch for speech input
              https://bugs.webkit.org/show_bug.cgi?id=43146
      
              Add a runtime feature switch that decides whether speech input attributes are available or not.
              Defaults to true.
      
              * public/WebRuntimeFeatures.h:
              * src/SpeechInputClientImpl.cpp:
              (WebKit::SpeechInputClientImpl::SpeechInputClientImpl):
              * src/WebRuntimeFeatures.cpp:
              (WebKit::WebRuntimeFeatures::enableSpeechInput):
              (WebKit::WebRuntimeFeatures::isSpeechInputEnabled):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@64269 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      cbdf2948
    • apavlov@chromium.org's avatar
      2010-07-27 Alexander Pavlov <apavlov@chromium.org> · e77a48d9
      apavlov@chromium.org authored
              Reviewed by Pavel Feldman.
      
              Inspector should display CDATA section data
              https://bugs.webkit.org/show_bug.cgi?id=16259
      
              WebCore:
              * inspector/InspectorDOMAgent.cpp:
              (WebCore::InspectorDOMAgent::buildObjectForNode):
              * inspector/front-end/ElementsTreeOutline.js:
              ():
      
              LayoutTests:
              * inspector/elements-panel-xhtml-structure-expected.txt:
              * inspector/elements-panel-xhtml-structure.xhtml:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@64267 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      e77a48d9
  2. 28 Jul, 2010 26 commits
    • commit-queue@webkit.org's avatar
      2010-07-28 Kavita Kanetkar <kkanetkar@chromium.org> · 5865be8f
      commit-queue@webkit.org authored
              Reviewed by Pavel Feldman.
      
              Web Inspector: Enable UI for chromium's appcache inspection.
              https://bugs.webkit.org/show_bug.cgi?id=43098
      
              * inspector/front-end/Settings.js: Removed appCacheEnabled.
              * inspector/front-end/StoragePanel.js: Removed appCacheEnabled condition.
              (WebInspector.StoragePanel):
              (WebInspector.StoragePanel.prototype.reset):
              (WebInspector.StoragePanel.prototype.addApplicationCache):
      2010-07-28  Kavita Kanetkar  <kkanetkar@chromium.org>
      
              Reviewed by Pavel Feldman.
      
              Web Inspector: Enable UI for chromium's appcache inspection.
              https://bugs.webkit.org/show_bug.cgi?id=43098
      
              * src/js/DevTools.js:
              (WebInspector.loaded):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@64265 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      5865be8f
    • commit-queue@webkit.org's avatar
      2010-07-28 Bryan Gislason <bgislason@rim.com> · 15f93030
      commit-queue@webkit.org authored
              Reviewed by Nate Chapin.
      
              Minor compile errors in loadMediaPlayerProxyPlugin
              https://bugs.webkit.org/show_bug.cgi?id=43141
      
              * WebCore/loader/SubframeLoader.cpp:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@64262 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      15f93030
    • commit-queue@webkit.org's avatar
      2010-07-28 Dominic Mazzoni <dmazzoni@google.com> · 915e3128
      commit-queue@webkit.org authored
              Reviewed by Dimitri Glazkov.
      
              Add a missing dependency.
              https://bugs.webkit.org/show_bug.cgi?id=43044
      
              * css/CSSPrimitiveValueMappings.h:
      2010-07-28  Dominic Mazzoni  <dmazzoni@google.com>
      
              Reviewed by Dimitri Glazkov.
      
              Add access to the computed style display to WebAccessibilityObject.
              https://bugs.webkit.org/show_bug.cgi?id=43044
      
              * public/WebAccessibilityObject.h:
              * src/WebAccessibilityObject.cpp:
              (WebKit::WebAccessibilityObject::hasComputedStyle):
              (WebKit::WebAccessibilityObject::computedStyleDisplay):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@64260 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      915e3128
    • victorw@chromium.org's avatar
      2010-07-28 Alex Nicolaou <anicolao@chromium.org> · 60c3ccc9
      victorw@chromium.org authored
              Reviewed by Ojan Vafai.
      
              Set incorrect but close expectations for mask-colorspace.svg on mac
              https://bugs.webkit.org/show_bug.cgi?id=43102
      
              Blocks:
                [chromium] r63450 caused some svg mask tests to fail pixel tests
                https://bugs.webkit.org/show_bug.cgi?id=42403
      
              ImageBufferCG.cpp uses CoreGraphics to do the transform of SVG masks
              into LinearRGB, but only for MAC which means not for CHROMIUM, so I
              have changed the #if to account for both platforms. I am assuming this
              isn't in for windows because it's missing in CG itself, but I didn't
              verify that.
      
              * platform/graphics/cg/ImageBufferCG.cpp:
              (WebCore::ImageBuffer::ImageBuffer):
      2010-07-28  Alex Nicolaou  <anicolao@chromium.org>
      
              Reviewed by Ojan Vafai.
      
              Set incorrect but close expectations for mask-colorspace.svg on mac
              https://bugs.webkit.org/show_bug.cgi?id=43102
      
              Blocks:
                [chromium] r63450 caused some svg mask tests to fail pixel tests
                https://bugs.webkit.org/show_bug.cgi?id=42403
      
              On my Mac, after my best efforts, the mask colorspace doesn't 
              seem to come out right. Though the pixel values in the test 
              rectangle should be 111, they come out to 104, and ultimately
              it is because the pixel values coming out of ImageBufferCG are
              not linearized properly. Checking in this expected result because
              visually the colours are close enough and I want to catch other
              regressions, but if this starts to fail because the first image
              has color 111,111,111 in the rectange and 76,76,76 or 78,78,78 in
              the circle, the actual problem will have been corrected. (111 and
              78 are the correct values).
      
              Also removed fail expectations for those tests that are now
              passing on my Mac.
      
              * platform/chromium/test_expectations.txt:
              * platform/mac/svg/custom/mask-colorspace-expected.checksum:
              * platform/mac/svg/custom/mask-colorspace-expected.png:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@64254 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      60c3ccc9
    • tkent@chromium.org's avatar
      [Chromium] Improve read-only arrow button appearance · bb1ecd23
      tkent@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=43108
      
      Reviewed by Darin Fisher.
      
      No new tests. This is a fix for fast/forms/
      input-appearance-spinbutton-disabled-readonly.html
      
      * platform/chromium/PlatformThemeChromiumGtk.cpp:
      (WebCore::PlatformThemeChromiumGtk::paintArrowButton):
      If the button has ReadOnlyState, paint the button as same as it is disabled.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@64250 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      bb1ecd23
    • tony@chromium.org's avatar
      2010-07-28 Tony Chang <tony@chromium.org> · 55406a79
      tony@chromium.org authored
              Reviewed by Ojan Vafai.
      
              implement getData('text/html') for webkit win
              https://bugs.webkit.org/show_bug.cgi?id=37981
      
              * platform/win/Skipped: 2 tests now pass
      2010-07-28  Tony Chang  <tony@chromium.org>
      
              Reviewed by Ojan Vafai.
      
              implement getData('text/html') for webkit win
              https://bugs.webkit.org/show_bug.cgi?id=37981
      
              * platform/win/ClipboardUtilitiesWin.cpp:
              (WebCore::extractMarkupFromCFHTML):
              (WebCore::getCFHTML):
              (WebCore::fragmentFromCFHTML):
              (WebCore::fragmentFromHTML):
              * platform/win/ClipboardUtilitiesWin.h:
              * platform/win/ClipboardWin.cpp:
              (WebCore::):
              (WebCore::clipboardTypeFromMIMEType):
              (WebCore::ClipboardWin::getData):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@64242 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      55406a79
    • abarth@webkit.org's avatar
      2010-07-28 Adam Barth <abarth@webkit.org> · e0cd6d0c
      abarth@webkit.org authored
              Reviewed by Eric Seidel.
      
              Update numbered header element closing to match recent spec change
              https://bugs.webkit.org/show_bug.cgi?id=43072
      
              * html5lib/runner-expected-html5.txt:
      2010-07-28  Adam Barth  <abarth@webkit.org>
      
              Reviewed by Eric Seidel.
      
              Update numbered header element closing to match recent spec change
              https://bugs.webkit.org/show_bug.cgi?id=43072
      
              Pretty straightforward transcription of the spec change.
      
              * html/HTMLElementStack.cpp:
              (WebCore::HTMLNames::isNumberedHeaderElement):
              (WebCore::HTMLElementStack::popUntilNumberedHeaderElementPopped):
              (WebCore::HTMLElementStack::hasOnlyHTMLElementsInScope):
              (WebCore::HTMLElementStack::hasNumberedHeaderElementInScope):
              * html/HTMLElementStack.h:
              * html/HTMLTreeBuilder.cpp:
              (WebCore::HTMLTreeBuilder::HTMLTreeBuilder):
              (WebCore::HTMLTreeBuilder::processEndTagForInBody):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@64237 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      e0cd6d0c
    • andersca@apple.com's avatar
      Add support for calling NPObject methods · 5b2497cf
      andersca@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=43145
      
      Reviewed by Sam Weinig.
      
      WebCore:
      
      * WebCore.exp.in:
      Export JSHTMLElement::s_info and pluginScriptObject.
      
      * WebCore.xcodeproj/project.pbxproj:
      Make JSHTMLElement.h and JSPluginElementFunctions.h private headers.
      
      * bindings/js/JSPluginElementFunctions.cpp:
      (WebCore::pluginScriptObject):
      * bindings/js/JSPluginElementFunctions.h:
      Make pluginScriptObject a public function.
      
      WebKit2:
      
      * WebKit2.xcodeproj/project.pbxproj:
      Add JSNPMethod.cpp and JSNPMethod.h
      
      * WebProcess/Plugins/JSNPMethod.cpp: Added.
      * WebProcess/Plugins/JSNPMethod.h: Added.
      * WebProcess/Plugins/JSNPObject.cpp:
      (WebKit::):
      Add a ClassInfo static variable for JSNPObject.
      
      (WebKit::JSNPObject::callMethod):
      Convert the passed in arguments, call the method and convert the result back.
      
      (WebKit::JSNPObject::getOwnPropertySlot):
      Check if the NPObject has a method.
      
      (WebKit::JSNPObject::methodGetter):
      Return a new JSNPMethod.
      
      * WebProcess/Plugins/JSNPObject.h:
      (WebKit::JSNPObject::classInfo):
      Return the s_info.
      
      * WebProcess/Plugins/NPJSObject.cpp:
      (WebKit::NPJSObject::getProperty):
      Get the property from the JSObject.
      
      * WebProcess/Plugins/NPRuntimeObjectMap.cpp:
      (WebKit::NPRuntimeObjectMap::convertJSValueToNPVariant):
      Convert the given JSValue to an NPVariant.
      
      * win/WebKit2.vcproj:
      Add JSNPMethod.cpp and JSNPMethod.h
      
      LayoutTests:
      
      * platform/mac-wk2/Skipped:
      Remove plugins/npruntime/get-int-identifier-special-values.html since it passes now.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@64231 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      5b2497cf
    • jamesr@google.com's avatar
      2010-07-28 James Robinson <jamesr@chromium.org> · 3f7faa19
      jamesr@google.com authored
              Reviewed by Darin Fisher.
      
              [chromium] Add a bool to Settings to control accelerated 2d canvas
              https://bugs.webkit.org/show_bug.cgi?id=43094
      
              * public/WebSettings.h:
              * src/WebSettingsImpl.cpp:
              (WebKit::WebSettingsImpl::setAccelerated2dCanvasEnabled):
              * src/WebSettingsImpl.h:
      2010-07-28  James Robinson  <jamesr@chromium.org>
      
              Reviewed by Darin Fisher.
      
              [chromium] Add a bool to Settings to control accelerated 2d canvas
              https://bugs.webkit.org/show_bug.cgi?id=43094
      
              Currently this doesn't control anything, but it will soon.
      
              * page/Settings.cpp:
              (WebCore::Settings::Settings):
              (WebCore::Settings::setAccelerated2dCanvasEnabled):
              * page/Settings.h:
              (WebCore::Settings::accelerated2dCanvasEnabled):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@64230 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      3f7faa19
    • kevino@webkit.org's avatar
      Reviewed by Kevin Ollivier. · 02dbe358
      kevino@webkit.org authored
      Add DOM bindings support for wx port.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@64229 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      02dbe358
    • senorblanco@chromium.org's avatar
      2010-07-28 Stephen White <senorblanco@chromium.org> · af7756d6
      senorblanco@chromium.org authored
              Reviewed by Darin Fisher.
      
              Hook the GLES2 rendering path up to GraphicsContextSkia.
              https://bugs.webkit.org/show_bug.cgi?id=43119
              
              This connects the state-setting and drawing calls implemented in
              so far in GLES2Canvas, and calls PlatformContextSkia's
              prepareForSoftwareDraw() for all the non-accelerated paths.
      
              * platform/graphics/skia/GraphicsContextSkia.cpp:
              (WebCore::GraphicsContext::addInnerRoundedRectClip):
              (WebCore::GraphicsContext::addPath):
              (WebCore::GraphicsContext::beginPath):
              (WebCore::GraphicsContext::clip):
              (WebCore::GraphicsContext::drawConvexPolygon):
              (WebCore::GraphicsContext::drawEllipse):
              (WebCore::GraphicsContext::drawFocusRing):
              (WebCore::GraphicsContext::drawLine):
              (WebCore::GraphicsContext::drawLineForMisspellingOrBadGrammar):
              (WebCore::GraphicsContext::drawLineForText):
              (WebCore::GraphicsContext::drawRect):
              (WebCore::GraphicsContext::fillPath):
              (WebCore::GraphicsContext::fillRoundedRect):
              (WebCore::GraphicsContext::strokeArc):
              (WebCore::GraphicsContext::strokePath):
              (WebCore::GraphicsContext::strokeRect):
              These calls are software-only; call preSoftwareDraw() for these.
              (WebCore::GraphicsContext::savePlatformState):
              (WebCore::GraphicsContext::restorePlatformState):
              (WebCore::GraphicsContext::setAlpha):
              (WebCore::GraphicsContext::setCompositeOperation):
              (WebCore::GraphicsContext::setPlatformFillColor):
              (WebCore::GraphicsContext::scale):
              (WebCore::GraphicsContext::rotate):
              (WebCore::GraphicsContext::translate):
              (WebCore::GraphicsContext::concatCTM):
              These ones set state on both Skia and GLES2Canvas.
              (WebCore::GraphicsContext::clearRect):
              (WebCore::GraphicsContext::fillRect):
              These ones have a GLES2 implementation; call through to it if PlatformContextSkia's useGPU() flag is set and the state permits.
              * platform/graphics/skia/PlatformContextSkia.cpp:
              (PlatformContextSkia::prepareForSoftwareDraw):
              (PlatformContextSkia::prepareForHardwareDraw):
              Rename preXXXDraw() -> prepareForXXXDraw().
              * platform/graphics/skia/PlatformContextSkia.h:
              (PlatformContextSkia::prepareForSoftwareDraw):
              (PlatformContextSkia::prepareForHardwareDraw):
              Rename preXXXDraw() -> prepareForXXXDraw().
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@64227 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      af7756d6
    • jamesr@google.com's avatar
      2010-07-28 fsamuel@chromium.org <fsamuel@chromium.org> · b426623e
      jamesr@google.com authored
              Reviewed by David Hyatt.
      
              REGRESSION (r63994): Bank of America's home page is horribly mis-rendered
              https://bugs.webkit.org/show_bug.cgi?id=42993
      
              Fixed bug introduced by patch for bug 40775.
      
              The new table rendering code did not take into account table layouts starting
              during a partial construction of the table render tree. As such,
              multiple layouts on the same table resulted in more columns being generated.
              This patch solves this issue.
      
              * rendering/AutoTableLayout.cpp:
              (WebCore::AutoTableLayout::recalcColumn):
              * rendering/RenderTable.cpp:
              (WebCore::RenderTable::cellAbove):
              (WebCore::RenderTable::cellBelow):
              (WebCore::RenderTable::cellBefore):
              * rendering/RenderTableSection.cpp:
              (WebCore::RenderTableSection::ensureRows):
              (WebCore::RenderTableSection::addCell):
              (WebCore::RenderTableSection::setCellWidths):
              (WebCore::RenderTableSection::calcRowHeight):
              (WebCore::RenderTableSection::layoutRows):
              (WebCore::RenderTableSection::paintObject):
              (WebCore::RenderTableSection::appendColumn):
              (WebCore::RenderTableSection::splitColumn):
              * rendering/RenderTableSection.h:
              (WebCore::RenderTableSection::CellStruct::CellStruct):
      2010-07-28  fsamuel@chromium.org  <fsamuel@chromium.org>
      
              Reviewed by David Hyatt.
      
              REGRESSION (r63994): Bank of America's home page is horribly mis-rendered
              https://bugs.webkit.org/show_bug.cgi?id=42993
      
              Restored the expectation for the slashdot logo table test.
      
              Added a new layout test to check for the correctness of early table layout.
      
              * fast/table/early-table-layout.html: Added.
              * platform/chromium/test_expectations.txt:
              * platform/gtk/fast/table/early-table-layout-expected.checksum: Added.
              * platform/gtk/fast/table/early-table-layout-expected.png: Added.
              * platform/gtk/fast/table/early-table-layout-expected.txt: Added.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@64225 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      b426623e
    • tonyg@chromium.org's avatar
      2010-07-28 Tony Gentilcore <tonyg@chromium.org> · 0d412ebb
      tonyg@chromium.org authored
              Reviewed by Pavel Feldman.
      
              Exclude DNS and SSL time from connect time
              https://bugs.webkit.org/show_bug.cgi?id=43083
      
              The ResourceLoadTiming API's definition of the connect phase includes
              DNS and SSL time. However, the Web Timing spec wants just the TCP time.
              So this patch subtracts those phases out.
      
              No new tests because ResourceLoadTiming fields are not populated by
              TestShell yet.
      
              * page/Timing.cpp:
              (WebCore::Timing::connectStart):
              (WebCore::Timing::connectEnd):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@64213 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      0d412ebb
    • steveblock@google.com's avatar
      2010-07-26 Steve Block <steveblock@google.com> · a00d0f43
      steveblock@google.com authored
              Reviewed by Jeremy Orlow.
      
              Page clients should be passed to Page constructor via structure of pointers
              https://bugs.webkit.org/show_bug.cgi?id=42834
      
              * src/WebViewImpl.cpp:
              (WebKit::WebViewImpl::WebViewImpl):
      2010-07-26  Steve Block  <steveblock@google.com>
      
              Reviewed by Jeremy Orlow.
      
              Page clients should be passed to Page constructor via structure of pointers
              https://bugs.webkit.org/show_bug.cgi?id=42834
      
              * Api/qwebpage.cpp:
              (QWebPagePrivate::QWebPagePrivate):
      2010-07-26  Steve Block  <steveblock@google.com>
      
              Reviewed by Jeremy Orlow.
      
              Page clients should be passed to Page constructor via structure of pointers
              https://bugs.webkit.org/show_bug.cgi?id=42834
      
              * webkit/webkitwebview.cpp:
              (webkit_web_view_init):
      2010-07-26  Steve Block  <steveblock@google.com>
      
              Reviewed by Jeremy Orlow.
      
              Page clients should be passed to Page constructor via structure of pointers
              https://bugs.webkit.org/show_bug.cgi?id=42834
      
              * WebView.cpp:
              (WebView::initWithFrame):
      2010-07-26  Steve Block  <steveblock@google.com>
      
              Reviewed by Jeremy Orlow.
      
              Page clients should be passed to Page constructor via structure of pointers
              https://bugs.webkit.org/show_bug.cgi?id=42834
      
              * WebView.cpp:
              (wxWebView::Create):
      2010-07-26  Steve Block  <steveblock@google.com>
      
              Reviewed by Jeremy Orlow.
      
              Page clients should be passed to Page constructor via structure of pointers
              https://bugs.webkit.org/show_bug.cgi?id=42834
      
              * WebView/WebView.mm:
              (-[WebView _commonInitializationWithFrameName:groupName:usesDocumentViews:]):
      2010-07-26  Steve Block  <steveblock@google.com>
      
              Reviewed by Jeremy Orlow.
      
              Page clients should be passed to Page constructor via structure of pointers
              https://bugs.webkit.org/show_bug.cgi?id=42834
      
              * ewk/ewk_view.cpp:
              (_ewk_view_priv_new):
      2010-07-26  Steve Block  <steveblock@google.com>
      
              Reviewed by Jeremy Orlow.
      
              Page clients should be passed to Page constructor via structure of pointers
              https://bugs.webkit.org/show_bug.cgi?id=42834
      
              No new tests, refactoring only.
      
              * WebCore.exp.in:
              * page/Page.cpp:
              (WebCore::Page::Page):
              * page/Page.h:
              (WebCore::Page::PageClients::PageClients):
              * svg/graphics/SVGImage.cpp:
              (WebCore::SVGImage::dataChanged):
      2010-07-26  Steve Block  <steveblock@google.com>
      
             Reviewed by Jeremy Orlow.
      
             Page clients should be passed to Page constructor via structure of pointers
             https://bugs.webkit.org/show_bug.cgi?id=42834
      
             * WebKit2/WebProcess/WebPage/WebPage.cpp:
             (WebPage::WebPage):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@64208 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      a00d0f43
    • commit-queue@webkit.org's avatar
      2010-07-28 Xianzhu Wang <phnixwxz@gmail.com> · 1fd43b24
      commit-queue@webkit.org authored
              Reviewed by Dan Bernstein.
      
              Line not wrapped at certain punctuations
              https://bugs.webkit.org/show_bug.cgi?id=37698
      
              * fast/text/line-breaks-after-closing-punctuations-expected.txt: Added.
              * fast/text/line-breaks-after-closing-punctuations.html: Added.
      2010-07-28  Xianzhu Wang  <phnixwxz@gmail.com>
      
              Reviewed by Dan Bernstein.
      
              Line not wrapped at certain punctuations
              https://bugs.webkit.org/show_bug.cgi?id=37698
              Added a line breaking table for all printable ASCII chars to replace
              the original line breaking table for only '?'.
      
              Test: fast/text/line-breaks-after-closing-punctuations.html
      
              * rendering/break_lines.cpp:
              (WebCore::isBreakableSpace):
              (WebCore::):
              (WebCore::shouldBreakAfter):
              (WebCore::needsLineBreakIterator):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@64207 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      1fd43b24
    • leandro@webkit.org's avatar
      2010-07-28 Lucas De Marchi <lucas.demarchi@profusion.mobi> · 32e62911
      leandro@webkit.org authored
              Unreviewed build fix.
      
              Fix EFL build with SHARED_CORE=ON after r64124.
      
              * CMakeLists.txt:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@64206 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      32e62911
    • jcivelli@chromium.org's avatar
      2010-07-28 Jay Civelli <jcivelli@chromium.org> · 2fe11482
      jcivelli@chromium.org authored
              Reviewed by Kent Tamura.
      
              [Chromium] The popup now layouts properly its rows by
              taking into account the label width.
              https://bugs.webkit.org/show_bug.cgi?id=42910
      
              * platform/chromium/PopupMenuChromium.cpp:
              (WebCore::PopupListBox::layout):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@64205 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      2fe11482
    • pfeldman@chromium.org's avatar
      2010-07-28 Pavel Feldman <pfeldman@chromium.org> · b62285bd
      pfeldman@chromium.org authored
              Not reviewed: chromium tests fix.
              Chromium Dev Tools: [REGRESSION] Pause is not working.
      
              https://bugs.webkit.org/show_bug.cgi?id=43118
      
              * src/js/DevTools.js:
              (InspectorBackend.pause):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@64204 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      b62285bd
    • loislo@chromium.org's avatar
      2010-07-28 Ilya Tikhonovsky <loislo@chromium.org> · e81e1b09
      loislo@chromium.org authored
              Reviewed by Pavel Feldman.
      
              WebInspector: Navigating to anchor prior to opening WebInspector
              makes resource have 'other' type.
              https://bugs.webkit.org/show_bug.cgi?id=43110
      
              * inspector/InspectorResource.cpp:
              (WebCore::InspectorResource::type):
              (WebCore::InspectorResource::resourceData):
              * inspector/front-end/ResourceView.js:
              (WebInspector.ResourceView.prototype._innerSelectContentTab):
      
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@64203 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      e81e1b09
    • andreas.kling@nokia.com's avatar
      2010-07-28 Andreas Kling <andreas.kling@nokia.com> · 599b8278
      andreas.kling@nokia.com authored
              Reviewed by Kenneth Rohde Christiansen.
      
              [Qt] putImageData(): Combine premultiplication and BGR->RGB
              https://bugs.webkit.org/show_bug.cgi?id=43114
      
              Further optimized putImageData() by doing BGR->RGB inside the
              premultiplication routine.
      
              * platform/graphics/qt/ImageBufferQt.cpp:
              (WebCore::premultiplyABGRtoARGB): Renamed from premultiply.
              (WebCore::putImageData):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@64202 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      599b8278
    • andreip@google.com's avatar
      2010-07-28 Andrei Popescu <andreip@google.com> · b78218e3
      andreip@google.com authored
              Reviewed by Jeremy Orlow.
      
              [IndexedDB] IDBKeyRange should be a runtime-enabled feature.
              https://bugs.webkit.org/show_bug.cgi?id=43116
      
              IDBKeyRange should be enabled at runtime only when IndexedDB is also
              enabled.
      
              No new tests needed, functionality not changed.
      
              * bindings/generic/RuntimeEnabledFeatures.h:
              (WebCore::RuntimeEnabledFeatures::iDBKeyRangeEnabled):
              * page/DOMWindow.idl:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@64201 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      b78218e3
    • zimmermann@webkit.org's avatar
      2010-07-28 Nikolas Zimmermann <nzimmermann@rim.com> · 5dc6dcfb
      zimmermann@webkit.org authored
              Not reviewed. Forgot to land GNUmakefile.am changes, broke build in r64196.
      
              * GNUmakefile.am: Add SVGResources.* / SVGResourcesCache.* / SVGResourcesCycleSolver.* to build.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@64200 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      5dc6dcfb
    • zimmermann@webkit.org's avatar
      2010-07-28 Nikolas Zimmermann <nzimmermann@rim.com> · f3125c71
      zimmermann@webkit.org authored
              Reviewed by Dirk Schulze.
      
              SVGMaskElement/SVGForeignObjectElement should not inherit from SVGURIReference
              https://bugs.webkit.org/show_bug.cgi?id=43113
      
              Remove wrong SVGURIReference inheritance for SVGMaskElement/SVGForeignObjectElement. Old copy/paste bug.
      
              * svg/SVGForeignObjectElement.cpp:
              (WebCore::SVGForeignObjectElement::synchronizeProperty):
              * svg/SVGForeignObjectElement.h:
              * svg/SVGMaskElement.cpp:
              (WebCore::SVGMaskElement::SVGMaskElement):
              (WebCore::SVGMaskElement::parseMappedAttribute):
              (WebCore::SVGMaskElement::svgAttributeChanged):
              (WebCore::SVGMaskElement::synchronizeProperty):
              * svg/SVGMaskElement.h:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@64197 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      f3125c71
    • zimmermann@webkit.org's avatar
      2010-07-28 Nikolas Zimmermann <nzimmermann@rim.com> · 032746a4
      zimmermann@webkit.org authored
              Reviewed by Dirk Schulze.
      
              WebKit shouldn't ignore resource cycles, but break them as Opera does
              https://bugs.webkit.org/show_bug.cgi?id=43031
      
              Don't ignore resources containing cyclic references, but break them, as discussed on SVG WG mailing lists - to be compatible with Opera which already does that.
      
              We used to lookup RenderSVGResourceContainers objects, by extracting the URI reference from the SVGRenderStyle, then utilizing getElementById() to lookup the
              node, and access its renderer. Opera ignores such references, if they point to resources that contain cyclic references. Ignoring them would mean we have
              to mutate the render style to empty the resource strings. That obviously doesn't work, as it would break expectations (getComputedStyle, etc.).
      
              Introduce a SVGResources class that stores pointers to all resources, that can be applied to a RenderObject (clipper/filter/markers/masker).
              Add a SVGResourcesCache class, which is basically a HashMap<RenderObject*, SVGResources*>. Whenever a RenderObject receives style, we extract the URI references
              from the SVGRenderStyle, look up the RenderSVGResourceContainer* objects, and store them in a SVGResources* class. Then we execute a cycle detection logic,
              which detects cyclic references and breaks them. Breaking them means just nulling the pointer to the resource in the SVGResources object. Those SVGResources
              objects are cached, and used throughout the render tree to access resources. This way it's guaranteed that all cyclic references are resolved until layout/paint
              phase begins.
      
              This is the first chunk, which just adds the new SVGResources/SVGResourcesCache/SVGResourcesCycleSolver files, and does minor cleanups.
              It's not yet glued in and doesn't affect any tests.
      
              * Android.mk: Add SVGResources.* / SVGResourcesCache.* / SVGResourcesCycleSolver.* to build.
              * CMakeLists.txt: Ditto.
              * WebCore.gypi: Ditto.
              * WebCore.pro: Ditto.
              * WebCore.vcproj/WebCore.vcproj: Ditto. 
              * WebCore.xcodeproj/project.pbxproj: Ditto.
              * rendering/RenderInline.h: Make styleDidChange protected, RenderSVGInline wants to override it.
              * rendering/RenderSVGAllInOne.cpp: Add SVGResources.* / SVGResourcesCache.* / SVGResourcesCycleSolver.* to build.
              * rendering/RenderSVGHiddenContainer.h:
              (WebCore::RenderSVGHiddenContainer::isSVGHiddenContainer): Make isSVGHiddenContainer() private and renderName() public.
              * rendering/RenderSVGResourceContainer.cpp: Added. Moved most methods from the header in the implementation file.
              (WebCore::RenderSVGResourceContainer::RenderSVGResourceContainer):
              (WebCore::RenderSVGResourceContainer::~RenderSVGResourceContainer):
              (WebCore::RenderSVGResourceContainer::idChanged):
              (WebCore::RenderSVGResourceContainer::transformOnNonScalingStroke):
              (WebCore::RenderSVGResourceContainer::containsCyclicReference):
              * rendering/RenderSVGResourceContainer.h: Add stubs, that SVGResourcesCache uses - a follow-up patch will add the logic.
              (WebCore::RenderSVGResourceContainer::addClient):
              (WebCore::RenderSVGResourceContainer::removeClient):
              * rendering/SVGResources.cpp: Added. Holds a list of resources applyable to a RenderObject (fill/stroke, mask/markers/clipper/filter)
              (WebCore::paintingResourceFromSVGPaint): Helper function looking up a RenderSVGResource for a SVGPaint object.
              (WebCore::registerPendingResource): Helper function that register a RenderSVGResource as pending in the SVGDocumentExtensions. 
              (WebCore::SVGResources::buildCachedResources): Build a list of resources for a RenderObject/RenderStyle pair, handles pending resources, if needed.
              (WebCore::SVGResources::invalidateClient): Helper function that calls invalidateClient() on all resources.
              (WebCore::SVGResources::resourceDestroyed): Helper function that calls invalidateClients() on a certain resource, and nulls it.
              (WebCore::SVGResources::buildSetOfResources): Helper function that stashes all resources present in the SVGResources members in a HashSet, used in SVGResourcesCycleSolver.
              (WebCore::SVGResources::resetClipper): Helper methods nulling a resource.
              (WebCore::SVGResources::resetFilter): Ditto.
              (WebCore::SVGResources::resetMarkerStart): Ditto.
              (WebCore::SVGResources::resetMarkerMid): Ditto.
              (WebCore::SVGResources::resetMarkerEnd): Ditto.
              (WebCore::SVGResources::resetMasker): Ditto.
              (WebCore::SVGResources::resetFill): Ditto.
              (WebCore::SVGResources::resetStroke): Ditto.
              (WebCore::SVGResources::dump):
              * rendering/SVGResources.h: Added.
              (WebCore::SVGResources::clipper): Accesor of the cached m_foo variable.
              (WebCore::SVGResources::filter): Ditto.
              (WebCore::SVGResources::markerStart): Ditto.
              (WebCore::SVGResources::markerMid): Ditto.
              (WebCore::SVGResources::markerEnd): Ditto.
              (WebCore::SVGResources::masker): Ditto.
              (WebCore::SVGResources::fill): Ditto.
              (WebCore::SVGResources::stroke): Ditto.
              * rendering/SVGResourcesCache.cpp: Added. Holds a HashMap<RenderObject*, SVGResources*> and utility functions that update/invalidate the cache.
              (WebCore::SVGResourcesCache::SVGResourcesCache):
              (WebCore::SVGResourcesCache::~SVGResourcesCache):
              (WebCore::SVGResourcesCache::addResourcesFromRenderObject): Build a SVGResources object for a RenderObject and adds it to the cache, then detects & breaks cycles using SVGResourcesCycleSolver.
              (WebCore::SVGResourcesCache::removeResourcesFromRenderObject): Remove a SVGResources object from the cache.
              (WebCore::resourcesCacheFromRenderObject): Helper function, retrieving a SVGResourcesCache method from a RenderObject.
              (WebCore::SVGResourcesCache::cachedResourcesForRenderObject): Returns a SVGResources object from the cache.
              (WebCore::SVGResourcesCache::clientLayoutChanged): (static) Calls invalidateClient() on all resources that are used by the passed RenderObject.
              (WebCore::SVGResourcesCache::clientStyleChanged): (static) Updates the cache (calling removeResourceFromRenderObject/addResourcesFrom...) and invalidates resources in the ancestor chain.
              (WebCore::SVGResourcesCache::clientUpdatedFromElement): (static) Does the same, without invalidating the ancestor chain.
              (WebCore::SVGResourcesCache::clientDestroyed): (static) Calls removeResourcesFromRenderObject() on the SVGResourcesCache, for the given renderer.
              (WebCore::SVGResourcesCache::resourceDestroyed): (static) Updates all SVGResources objects in the cache, that refer to the given resource.
              * rendering/SVGResourcesCache.h: Added.
              * rendering/SVGResourcesCycleSolver.cpp: Added. Detects and breaks cyclic references, just the way Opera handles it. Break cycles as they are detected.
              (WebCore::SVGResourcesCycleSolver::SVGResourcesCycleSolver):
              (WebCore::SVGResourcesCycleSolver::~SVGResourcesCycleSolver):
              (WebCore::SVGResourcesCycleSolver::resourceContainsCycles): Operates only on the render tree
              (WebCore::targetReferenceFromResource): Helper method for chainableResourceContainsCycles().
              (WebCore::setFollowLinkForChainableResource): Ditto.
              (WebCore::SVGResourcesCycleSolver::chainableResourceContainsCycles): Handles cycles for resources that are chainable through xlink:href (filter/gradient/pattern).
              (WebCore::SVGResourcesCycleSolver::resolveCycles): Main method executing the cycle breaking logic, utilizing (chainableResource)resourceContainsCycles.
              (WebCore::SVGResourcesCycleSolver::breakCycle): Nulls a resource in the given SVGResources* object, to avoid using an invalid resource while rendering/layouting.
              * rendering/SVGResourcesCycleSolver.h: Added.
              * svg/SVGDocumentExtensions.cpp:
              (WebCore::SVGDocumentExtensions::SVGDocumentExtensions): Create SVGResourcesCache object once per SVGDocumentExtensions.
              * svg/SVGDocumentExtensions.h:
              (WebCore::SVGDocumentExtensions::resourcesCache): Expose accesor method for the SVGResourcesCache.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@64196 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      032746a4
    • zherczeg@webkit.org's avatar
      SVGFilterElement & SVGFE*Element don't support dynamic invalidation, when attributes change · 5557e9b5
      zherczeg@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=42244
      
      Reviewed by Nikolas Zimmermann.
      
      WebCore: 
      
      Implementing svgAttributeChanged for SVGFEOffsetElement object.
      
      Tests: svg/dynamic-updates/SVGFEOffsetElement-dom-dx-attr.html
             svg/dynamic-updates/SVGFEOffsetElement-dom-dy-attr.html
             svg/dynamic-updates/SVGFEOffsetElement-dom-in-attr.html
             svg/dynamic-updates/SVGFEOffsetElement-svgdom-dx-prop.html
             svg/dynamic-updates/SVGFEOffsetElement-svgdom-dy-prop.html
             svg/dynamic-updates/SVGFEOffsetElement-svgdom-in-prop.html
      
      * svg/SVGFEOffsetElement.cpp:
      (WebCore::SVGFEOffsetElement::svgAttributeChanged):
      * svg/SVGFEOffsetElement.h:
      
      LayoutTests: 
      
      * platform/mac/svg/dynamic-updates/SVGFEOffsetElement-dom-dx-attr-expected.checksum: Added.
      * platform/mac/svg/dynamic-updates/SVGFEOffsetElement-dom-dx-attr-expected.png: Added.
      * platform/mac/svg/dynamic-updates/SVGFEOffsetElement-dom-dy-attr-expected.checksum: Added.
      * platform/mac/svg/dynamic-updates/SVGFEOffsetElement-dom-dy-attr-expected.png: Added.
      * platform/mac/svg/dynamic-updates/SVGFEOffsetElement-dom-in-attr-expected.checksum: Added.
      * platform/mac/svg/dynamic-updates/SVGFEOffsetElement-dom-in-attr-expected.png: Added.
      * platform/mac/svg/dynamic-updates/SVGFEOffsetElement-svgdom-dx-prop-expected.checksum: Added.
      * platform/mac/svg/dynamic-updates/SVGFEOffsetElement-svgdom-dx-prop-expected.png: Added.
      * platform/mac/svg/dynamic-updates/SVGFEOffsetElement-svgdom-dy-prop-expected.checksum: Added.
      * platform/mac/svg/dynamic-updates/SVGFEOffsetElement-svgdom-dy-prop-expected.png: Added.
      * platform/mac/svg/dynamic-updates/SVGFEOffsetElement-svgdom-in-prop-expected.checksum: Added.
      * platform/mac/svg/dynamic-updates/SVGFEOffsetElement-svgdom-in-prop-expected.png: Added.
      * svg/dynamic-updates/SVGFEOffsetElement-dom-dx-attr-expected.txt: Added.
      * svg/dynamic-updates/SVGFEOffsetElement-dom-dx-attr.html: Added.
      * svg/dynamic-updates/SVGFEOffsetElement-dom-dy-attr-expected.txt: Added.
      * svg/dynamic-updates/SVGFEOffsetElement-dom-dy-attr.html: Added.
      * svg/dynamic-updates/SVGFEOffsetElement-dom-in-attr-expected.txt: Added.
      * svg/dynamic-updates/SVGFEOffsetElement-dom-in-attr.html: Added.
      * svg/dynamic-updates/SVGFEOffsetElement-svgdom-dx-prop-expected.txt: Added.
      * svg/dynamic-updates/SVGFEOffsetElement-svgdom-dx-prop.html: Added.
      * svg/dynamic-updates/SVGFEOffsetElement-svgdom-dy-prop-expected.txt: Added.
      * svg/dynamic-updates/SVGFEOffsetElement-svgdom-dy-prop.html: Added.
      * svg/dynamic-updates/SVGFEOffsetElement-svgdom-in-prop-expected.txt: Added.
      * svg/dynamic-updates/SVGFEOffsetElement-svgdom-in-prop.html: Added.
      * svg/dynamic-updates/script-tests/SVGFEOffsetElement-dom-dx-attr.js: Added.
      (executeTest):
      * svg/dynamic-updates/script-tests/SVGFEOffsetElement-dom-dy-attr.js: Added.
      (executeTest):
      * svg/dynamic-updates/script-tests/SVGFEOffsetElement-dom-in-attr.js: Added.
      (executeTest):
      * svg/dynamic-updates/script-tests/SVGFEOffsetElement-svgdom-dx-prop.js: Added.
      (executeTest):
      * svg/dynamic-updates/script-tests/SVGFEOffsetElement-svgdom-dy-prop.js: Added.
      (executeTest):
      * svg/dynamic-updates/script-tests/SVGFEOffsetElement-svgdom-in-prop.js: Added.
      (executeTest):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@64192 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      5557e9b5
    • zherczeg@webkit.org's avatar
      SVGFilterElement & SVGFE*Element don't support dynamic invalidation, when attributes change · 7c3ba634
      zherczeg@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=42244
      
      Reviewed by Nikolas Zimmermann.
      
      WebCore: 
      
      Implementing svgAttributeChanged for SVGFEDiffuseLightingElement object.
      
      Tests: svg/dynamic-updates/SVGFEDiffuseLightingElement-dom-diffuseConstant-attr.html
             svg/dynamic-updates/SVGFEDiffuseLightingElement-dom-in-attr.html
             svg/dynamic-updates/SVGFEDiffuseLightingElement-dom-lighting-color-attr.html
             svg/dynamic-updates/SVGFEDiffuseLightingElement-dom-surfaceScale-attr.html
             svg/dynamic-updates/SVGFEDiffuseLightingElement-lighting-color-css-prop.html
             svg/dynamic-updates/SVGFEDiffuseLightingElement-svgdom-diffuseConstant-prop.html
             svg/dynamic-updates/SVGFEDiffuseLightingElement-svgdom-in-prop.html
             svg/dynamic-updates/SVGFEDiffuseLightingElement-svgdom-surfaceScale-prop.html
      
      * svg/SVGFEDiffuseLightingElement.cpp:
      (WebCore::SVGFEDiffuseLightingElement::svgAttributeChanged):
      * svg/SVGFEDiffuseLightingElement.h:
      
      LayoutTests: 
      
      * platform/mac/svg/dynamic-updates/SVGFEDiffuseLightingElement-dom-diffuseConstant-attr-expected.checksum: Added.
      * platform/mac/svg/dynamic-updates/SVGFEDiffuseLightingElement-dom-diffuseConstant-attr-expected.png: Added.
      * platform/mac/svg/dynamic-updates/SVGFEDiffuseLightingElement-dom-in-attr-expected.checksum: Added.
      * platform/mac/svg/dynamic-updates/SVGFEDiffuseLightingElement-dom-in-attr-expected.png: Added.
      * platform/mac/svg/dynamic-updates/SVGFEDiffuseLightingElement-dom-lighting-color-attr-expected.checksum: Added.
      * platform/mac/svg/dynamic-updates/SVGFEDiffuseLightingElement-dom-lighting-color-attr-expected.png: Added.
      * platform/mac/svg/dynamic-updates/SVGFEDiffuseLightingElement-dom-surfaceScale-attr-expected.checksum: Added.
      * platform/mac/svg/dynamic-updates/SVGFEDiffuseLightingElement-dom-surfaceScale-attr-expected.png: Added.
      * platform/mac/svg/dynamic-updates/SVGFEDiffuseLightingElement-lighting-color-css-prop-expected.checksum: Added.
      * platform/mac/svg/dynamic-updates/SVGFEDiffuseLightingElement-lighting-color-css-prop-expected.png: Added.
      * platform/mac/svg/dynamic-updates/SVGFEDiffuseLightingElement-svgdom-diffuseConstant-prop-expected.checksum: Added.
      * platform/mac/svg/dynamic-updates/SVGFEDiffuseLightingElement-svgdom-diffuseConstant-prop-expected.png: Added.
      * platform/mac/svg/dynamic-updates/SVGFEDiffuseLightingElement-svgdom-in-prop-expected.checksum: Added.
      * platform/mac/svg/dynamic-updates/SVGFEDiffuseLightingElement-svgdom-in-prop-expected.png: Added.
      * platform/mac/svg/dynamic-updates/SVGFEDiffuseLightingElement-svgdom-surfaceScale-prop-expected.checksum: Added.
      * platform/mac/svg/dynamic-updates/SVGFEDiffuseLightingElement-svgdom-surfaceScale-prop-expected.png: Added.
      * svg/dynamic-updates/SVGFEDiffuseLightingElement-dom-diffuseConstant-attr-expected.txt: Added.
      * svg/dynamic-updates/SVGFEDiffuseLightingElement-dom-diffuseConstant-attr.html: Added.
      * svg/dynamic-updates/SVGFEDiffuseLightingElement-dom-in-attr-expected.txt: Added.
      * svg/dynamic-updates/SVGFEDiffuseLightingElement-dom-in-attr.html: Added.
      * svg/dynamic-updates/SVGFEDiffuseLightingElement-dom-lighting-color-attr-expected.txt: Added.
      * svg/dynamic-updates/SVGFEDiffuseLightingElement-dom-lighting-color-attr.html: Added.
      * svg/dynamic-updates/SVGFEDiffuseLightingElement-dom-surfaceScale-attr-expected.txt: Added.
      * svg/dynamic-updates/SVGFEDiffuseLightingElement-dom-surfaceScale-attr.html: Added.
      * svg/dynamic-updates/SVGFEDiffuseLightingElement-lighting-color-css-prop-expected.txt: Added.
      * svg/dynamic-updates/SVGFEDiffuseLightingElement-lighting-color-css-prop.html: Added.
      * svg/dynamic-updates/SVGFEDiffuseLightingElement-svgdom-diffuseConstant-prop-expected.txt: Added.
      * svg/dynamic-updates/SVGFEDiffuseLightingElement-svgdom-diffuseConstant-prop.html: Added.
      * svg/dynamic-updates/SVGFEDiffuseLightingElement-svgdom-in-prop-expected.txt: Added.
      * svg/dynamic-updates/SVGFEDiffuseLightingElement-svgdom-in-prop.html: Added.
      * svg/dynamic-updates/SVGFEDiffuseLightingElement-svgdom-surfaceScale-prop-expected.txt: Added.
      * svg/dynamic-updates/SVGFEDiffuseLightingElement-svgdom-surfaceScale-prop.html: Added.
      * svg/dynamic-updates/script-tests/SVGFEDiffuseLightingElement-dom-diffuseConstant-attr.js: Added.
      (executeTest):
      * svg/dynamic-updates/script-tests/SVGFEDiffuseLightingElement-dom-in-attr.js: Added.
      (executeTest):
      * svg/dynamic-updates/script-tests/SVGFEDiffuseLightingElement-dom-lighting-color-attr.js: Added.
      (executeTest):
      * svg/dynamic-updates/script-tests/SVGFEDiffuseLightingElement-dom-surfaceScale-attr.js: Added.
      (executeTest):
      * svg/dynamic-updates/script-tests/SVGFEDiffuseLightingElement-lighting-color-css-prop.js: Added.
      (executeTest):
      * svg/dynamic-updates/script-tests/SVGFEDiffuseLightingElement-svgdom-diffuseConstant-prop.js: Added.
      (executeTest):
      * svg/dynamic-updates/script-tests/SVGFEDiffuseLightingElement-svgdom-in-prop.js: Added.
      (executeTest):
      * svg/dynamic-updates/script-tests/SVGFEDiffuseLightingElement-svgdom-surfaceScale-prop.js: Added.
      (executeTest):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@64191 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      7c3ba634
  3. 27 Jul, 2010 5 commits