[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc
zimmermann at webkit.org
zimmermann at webkit.org
Wed Dec 22 12:54:04 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit 41e5b7d882b5da32c4aa816471da20d210253fa3
Author: zimmermann at webkit.org <zimmermann at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Wed Sep 1 07:15:17 2010 +0000
2010-08-31 Nikolas Zimmermann <nzimmermann at rim.com>
Reviewed by Dirk Schulze.
Prepare RenderSVGContainer culling patch
https://bugs.webkit.org/show_bug.cgi?id=44955
Add styleWillChange methods for all SVG renderers, that call setNeedsBoundariesUpdate().
It's currently a no-op, but will be used once the containers cache their boundaries, which
happens in a follow-up patch.
* rendering/RenderSVGBlock.cpp:
(WebCore::RenderSVGBlock::styleWillChange): Call setNeedsBoundariesUpdate().
* rendering/RenderSVGBlock.h:
* rendering/RenderSVGImage.cpp:
(WebCore::RenderSVGImage::styleWillChange): Ditto.
* rendering/RenderSVGImage.h:
* rendering/RenderSVGInline.cpp:
(WebCore::RenderSVGInline::styleWillChange): Ditto.
* rendering/RenderSVGInline.h:
* rendering/RenderSVGModelObject.cpp:
(WebCore::RenderSVGModelObject::styleWillChange): Ditto.
* rendering/RenderSVGModelObject.h:
* rendering/RenderSVGRoot.cpp:
(WebCore::RenderSVGRoot::styleWillChange): Ditto.
* rendering/RenderSVGRoot.h:
* rendering/SVGRenderSupport.cpp:
(WebCore::SVGRenderSupport::computeContainerBoundingBox): Skip hidden containers, not necessary to traverse them.
* rendering/style/SVGRenderStyle.cpp:
(WebCore::SVGRenderStyle::diff): svg-shadow changes need to cause relayouts, not only repaints, once container bounds are cached.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@66584 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index b9e5da8..707f855 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,34 @@
+2010-08-31 Nikolas Zimmermann <nzimmermann at rim.com>
+
+ Reviewed by Dirk Schulze.
+
+ Prepare RenderSVGContainer culling patch
+ https://bugs.webkit.org/show_bug.cgi?id=44955
+
+ Add styleWillChange methods for all SVG renderers, that call setNeedsBoundariesUpdate().
+ It's currently a no-op, but will be used once the containers cache their boundaries, which
+ happens in a follow-up patch.
+
+ * rendering/RenderSVGBlock.cpp:
+ (WebCore::RenderSVGBlock::styleWillChange): Call setNeedsBoundariesUpdate().
+ * rendering/RenderSVGBlock.h:
+ * rendering/RenderSVGImage.cpp:
+ (WebCore::RenderSVGImage::styleWillChange): Ditto.
+ * rendering/RenderSVGImage.h:
+ * rendering/RenderSVGInline.cpp:
+ (WebCore::RenderSVGInline::styleWillChange): Ditto.
+ * rendering/RenderSVGInline.h:
+ * rendering/RenderSVGModelObject.cpp:
+ (WebCore::RenderSVGModelObject::styleWillChange): Ditto.
+ * rendering/RenderSVGModelObject.h:
+ * rendering/RenderSVGRoot.cpp:
+ (WebCore::RenderSVGRoot::styleWillChange): Ditto.
+ * rendering/RenderSVGRoot.h:
+ * rendering/SVGRenderSupport.cpp:
+ (WebCore::SVGRenderSupport::computeContainerBoundingBox): Skip hidden containers, not necessary to traverse them.
+ * rendering/style/SVGRenderStyle.cpp:
+ (WebCore::SVGRenderStyle::diff): svg-shadow changes need to cause relayouts, not only repaints, once container bounds are cached.
+
2010-08-31 Justin Garcia <justin.garcia at apple.com>
Reviewed by Dan Bernstein.
diff --git a/WebCore/rendering/RenderSVGBlock.cpp b/WebCore/rendering/RenderSVGBlock.cpp
index d6022b5..b2d727a 100644
--- a/WebCore/rendering/RenderSVGBlock.cpp
+++ b/WebCore/rendering/RenderSVGBlock.cpp
@@ -81,6 +81,13 @@ void RenderSVGBlock::destroy()
RenderBlock::destroy();
}
+void RenderSVGBlock::styleWillChange(StyleDifference diff, const RenderStyle* newStyle)
+{
+ if (diff == StyleDifferenceLayout)
+ setNeedsBoundariesUpdate();
+ RenderBlock::styleWillChange(diff, newStyle);
+}
+
void RenderSVGBlock::styleDidChange(StyleDifference diff, const RenderStyle* oldStyle)
{
RenderBlock::styleDidChange(diff, oldStyle);
diff --git a/WebCore/rendering/RenderSVGBlock.h b/WebCore/rendering/RenderSVGBlock.h
index c4337cc..c1379da 100644
--- a/WebCore/rendering/RenderSVGBlock.h
+++ b/WebCore/rendering/RenderSVGBlock.h
@@ -40,6 +40,7 @@ private:
virtual void absoluteRects(Vector<IntRect>&, int tx, int ty);
virtual void destroy();
+ virtual void styleWillChange(StyleDifference, const RenderStyle* newStyle);
virtual void styleDidChange(StyleDifference, const RenderStyle* oldStyle);
virtual void updateFromElement();
};
diff --git a/WebCore/rendering/RenderSVGImage.cpp b/WebCore/rendering/RenderSVGImage.cpp
index 6214ffe..31ff8cb 100644
--- a/WebCore/rendering/RenderSVGImage.cpp
+++ b/WebCore/rendering/RenderSVGImage.cpp
@@ -117,6 +117,13 @@ void RenderSVGImage::destroy()
RenderImage::destroy();
}
+void RenderSVGImage::styleWillChange(StyleDifference diff, const RenderStyle* newStyle)
+{
+ if (diff == StyleDifferenceLayout)
+ setNeedsBoundariesUpdate();
+ RenderImage::styleWillChange(diff, newStyle);
+}
+
void RenderSVGImage::styleDidChange(StyleDifference diff, const RenderStyle* oldStyle)
{
RenderImage::styleDidChange(diff, oldStyle);
diff --git a/WebCore/rendering/RenderSVGImage.h b/WebCore/rendering/RenderSVGImage.h
index 38e3a13..105f0ab 100644
--- a/WebCore/rendering/RenderSVGImage.h
+++ b/WebCore/rendering/RenderSVGImage.h
@@ -65,6 +65,7 @@ private:
virtual void paint(PaintInfo&, int parentX, int parentY);
virtual void destroy();
+ virtual void styleWillChange(StyleDifference, const RenderStyle* newStyle);
virtual void styleDidChange(StyleDifference, const RenderStyle* oldStyle);
virtual void updateFromElement();
diff --git a/WebCore/rendering/RenderSVGInline.cpp b/WebCore/rendering/RenderSVGInline.cpp
index 93e6a06..bc6bc12 100644
--- a/WebCore/rendering/RenderSVGInline.cpp
+++ b/WebCore/rendering/RenderSVGInline.cpp
@@ -99,6 +99,13 @@ void RenderSVGInline::destroy()
RenderInline::destroy();
}
+void RenderSVGInline::styleWillChange(StyleDifference diff, const RenderStyle* newStyle)
+{
+ if (diff == StyleDifferenceLayout)
+ setNeedsBoundariesUpdate();
+ RenderInline::styleWillChange(diff, newStyle);
+}
+
void RenderSVGInline::styleDidChange(StyleDifference diff, const RenderStyle* oldStyle)
{
RenderInline::styleDidChange(diff, oldStyle);
diff --git a/WebCore/rendering/RenderSVGInline.h b/WebCore/rendering/RenderSVGInline.h
index 56d911f..fb38f1b 100644
--- a/WebCore/rendering/RenderSVGInline.h
+++ b/WebCore/rendering/RenderSVGInline.h
@@ -56,6 +56,7 @@ private:
virtual InlineFlowBox* createInlineFlowBox();
virtual void destroy();
+ virtual void styleWillChange(StyleDifference, const RenderStyle* newStyle);
virtual void styleDidChange(StyleDifference, const RenderStyle* oldStyle);
virtual void updateFromElement();
};
diff --git a/WebCore/rendering/RenderSVGModelObject.cpp b/WebCore/rendering/RenderSVGModelObject.cpp
index 5a19749..28760a0 100644
--- a/WebCore/rendering/RenderSVGModelObject.cpp
+++ b/WebCore/rendering/RenderSVGModelObject.cpp
@@ -87,6 +87,13 @@ void RenderSVGModelObject::destroy()
RenderObject::destroy();
}
+void RenderSVGModelObject::styleWillChange(StyleDifference diff, const RenderStyle* newStyle)
+{
+ if (diff == StyleDifferenceLayout)
+ setNeedsBoundariesUpdate();
+ RenderObject::styleWillChange(diff, newStyle);
+}
+
void RenderSVGModelObject::styleDidChange(StyleDifference diff, const RenderStyle* oldStyle)
{
RenderObject::styleDidChange(diff, oldStyle);
diff --git a/WebCore/rendering/RenderSVGModelObject.h b/WebCore/rendering/RenderSVGModelObject.h
index 35c4dc3..87717c2 100644
--- a/WebCore/rendering/RenderSVGModelObject.h
+++ b/WebCore/rendering/RenderSVGModelObject.h
@@ -61,6 +61,7 @@ public:
virtual void destroy();
virtual void mapLocalToContainer(RenderBoxModelObject* repaintContainer, bool useTransforms, bool fixed, TransformState&) const;
+ virtual void styleWillChange(StyleDifference, const RenderStyle* newStyle);
virtual void styleDidChange(StyleDifference, const RenderStyle* oldStyle);
virtual void updateFromElement();
diff --git a/WebCore/rendering/RenderSVGRoot.cpp b/WebCore/rendering/RenderSVGRoot.cpp
index 5995668..cb2dfe1 100644
--- a/WebCore/rendering/RenderSVGRoot.cpp
+++ b/WebCore/rendering/RenderSVGRoot.cpp
@@ -196,6 +196,13 @@ void RenderSVGRoot::destroy()
RenderBox::destroy();
}
+void RenderSVGRoot::styleWillChange(StyleDifference diff, const RenderStyle* newStyle)
+{
+ if (diff == StyleDifferenceLayout)
+ setNeedsBoundariesUpdate();
+ RenderBox::styleWillChange(diff, newStyle);
+}
+
void RenderSVGRoot::styleDidChange(StyleDifference diff, const RenderStyle* oldStyle)
{
RenderBox::styleDidChange(diff, oldStyle);
diff --git a/WebCore/rendering/RenderSVGRoot.h b/WebCore/rendering/RenderSVGRoot.h
index b90113c..459e43a 100644
--- a/WebCore/rendering/RenderSVGRoot.h
+++ b/WebCore/rendering/RenderSVGRoot.h
@@ -58,6 +58,7 @@ private:
virtual void paint(PaintInfo&, int parentX, int parentY);
virtual void destroy();
+ virtual void styleWillChange(StyleDifference, const RenderStyle* newStyle);
virtual void styleDidChange(StyleDifference, const RenderStyle* oldStyle);
virtual void updateFromElement();
diff --git a/WebCore/rendering/SVGRenderSupport.cpp b/WebCore/rendering/SVGRenderSupport.cpp
index fc99c91..e6cc032 100644
--- a/WebCore/rendering/SVGRenderSupport.cpp
+++ b/WebCore/rendering/SVGRenderSupport.cpp
@@ -166,6 +166,9 @@ FloatRect SVGRenderSupport::computeContainerBoundingBox(const RenderObject* cont
FloatRect boundingBox;
for (RenderObject* current = container->firstChild(); current; current = current->nextSibling()) {
+ if (current->isSVGHiddenContainer())
+ continue;
+
FloatRect childBoundingBox;
switch (mode) {
diff --git a/WebCore/rendering/style/SVGRenderStyle.cpp b/WebCore/rendering/style/SVGRenderStyle.cpp
index 51d2f20..7d1ad3b 100644
--- a/WebCore/rendering/style/SVGRenderStyle.cpp
+++ b/WebCore/rendering/style/SVGRenderStyle.cpp
@@ -162,6 +162,10 @@ StyleDifference SVGRenderStyle::diff(const SVGRenderStyle* other) const
|| svg_inherited_flags._joinStyle != other->svg_inherited_flags._joinStyle)
return StyleDifferenceLayout;
+ // Shadow changes require relayouts, as they affect the repaint rects.
+ if (shadowSVG != other->shadowSVG)
+ return StyleDifferenceLayout;
+
// Some stroke properties, requires relayouts, as the cached stroke boundaries need to be recalculated.
if (stroke != other->stroke) {
if (stroke->width != other->stroke->width
@@ -178,10 +182,6 @@ StyleDifference SVGRenderStyle::diff(const SVGRenderStyle* other) const
// NOTE: All comparisions below may only return StyleDifferenceRepaint
- // Shadow changes need to cause repaints.
- if (shadowSVG != other->shadowSVG)
- return StyleDifferenceRepaint;
-
// Painting related properties only need repaints.
if (miscNotEqual) {
if (misc->floodColor != other->misc->floodColor
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list