summaryrefslogtreecommitdiffstats
path: root/WebCore/rendering/RenderPath.cpp
diff options
context:
space:
mode:
authorKristian Monsen <kristianm@google.com>2010-09-08 12:18:00 +0100
committerKristian Monsen <kristianm@google.com>2010-09-11 12:08:58 +0100
commit5ddde30071f639962dd557c453f2ad01f8f0fd00 (patch)
tree775803c4ab35af50aa5f5472cd1fb95fe9d5152d /WebCore/rendering/RenderPath.cpp
parent3e63d9b33b753ca86d0765d1b3d711114ba9e34f (diff)
downloadexternal_webkit-5ddde30071f639962dd557c453f2ad01f8f0fd00.zip
external_webkit-5ddde30071f639962dd557c453f2ad01f8f0fd00.tar.gz
external_webkit-5ddde30071f639962dd557c453f2ad01f8f0fd00.tar.bz2
Merge WebKit at r66666 : Initial merge by git.
Change-Id: I57dedeb49859adc9c539e760f0e749768c66626f
Diffstat (limited to 'WebCore/rendering/RenderPath.cpp')
-rw-r--r--WebCore/rendering/RenderPath.cpp23
1 files changed, 13 insertions, 10 deletions
diff --git a/WebCore/rendering/RenderPath.cpp b/WebCore/rendering/RenderPath.cpp
index 86a12c8..0f31df1 100644
--- a/WebCore/rendering/RenderPath.cpp
+++ b/WebCore/rendering/RenderPath.cpp
@@ -101,28 +101,39 @@ void RenderPath::layout()
LayoutRepainter repainter(*this, m_everHadLayout && checkForRepaintDuringLayout());
SVGStyledTransformableElement* element = static_cast<SVGStyledTransformableElement*>(node());
+ bool updateCachedBoundariesInParents = false;
+
bool needsPathUpdate = m_needsPathUpdate;
if (needsPathUpdate) {
m_path = element->toPathData();
m_needsPathUpdate = false;
+ updateCachedBoundariesInParents = true;
}
if (m_needsTransformUpdate) {
m_localTransform = element->animatedLocalTransform();
m_needsTransformUpdate = false;
+ updateCachedBoundariesInParents = true;
}
+ if (m_needsBoundariesUpdate)
+ updateCachedBoundariesInParents = true;
+
// Invalidate all resources of this client if our layout changed.
if (m_everHadLayout && selfNeedsLayout())
SVGResourcesCache::clientLayoutChanged(this);
// At this point LayoutRepainter already grabbed the old bounds,
- // recalculate them now so repaintAfterLayout() uses the new bounds
+ // recalculate them now so repaintAfterLayout() uses the new bounds.
if (needsPathUpdate || m_needsBoundariesUpdate) {
updateCachedBoundaries();
m_needsBoundariesUpdate = false;
}
+ // If our bounds changed, notify the parents.
+ if (updateCachedBoundariesInParents)
+ RenderSVGModelObject::setNeedsBoundariesUpdate();
+
repainter.repaintAfterLayout();
setNeedsLayout(false);
}
@@ -172,8 +183,7 @@ void RenderPath::paint(PaintInfo& paintInfo, int, int)
return;
FloatRect boundingBox = repaintRectInLocalCoordinates();
- FloatRect nonLocalBoundingBox = m_localTransform.mapRect(boundingBox);
- if (!nonLocalBoundingBox.intersects(paintInfo.rect))
+ if (!SVGRenderSupport::paintInfoIntersectsRepaintRect(boundingBox, m_localTransform, paintInfo))
return;
PaintInfo childPaintInfo(paintInfo);
@@ -270,13 +280,6 @@ FloatRect RenderPath::calculateMarkerBoundsIfNeeded()
return m_markerLayoutInfo.calculateBoundaries(markerStart, markerMid, markerEnd, svgStyle->strokeWidth().value(svgElement), m_path);
}
-void RenderPath::styleWillChange(StyleDifference diff, const RenderStyle* newStyle)
-{
- if (diff == StyleDifferenceLayout)
- setNeedsBoundariesUpdate();
- RenderSVGModelObject::styleWillChange(diff, newStyle);
-}
-
void RenderPath::updateCachedBoundaries()
{
if (m_path.isEmpty()) {