Reviewed by hyatt.
RichDraw demo does not live-update in Safari
(SVG elements should ignore CSS position)
http://bugs.webkit.org/show_bug.cgi?id=10364
* css/cssstyleselector.cpp:
(WebCore::CSSStyleSelector::adjustRenderStyle): ignore position for everything but <svg>
* ksvg2/svg/SVGStyledElement.cpp:
(WebCore::SVGStyledElement::rebuildRenderer): move path generation into layout()
* rendering/RenderContainer.cpp:
(WebCore::RenderContainer::layout): ASSERT kids marked as having completed layout
* rendering/RenderPath.cpp:
(WebCore::RenderPath::layout): move path generation into layout()
* rendering/RenderSVGContainer.cpp:
(WebCore::RenderSVGContainer::layout): ASSERT kids marked as having completed layout
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@18830
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2007-01-13 Eric Seidel <eric@webkit.org>
+
+ Reviewed by hyatt.
+
+ Test case for:
+ http://bugs.webkit.org/show_bug.cgi?id=10364
+
+ * svg/custom/svg-absolute-children-expected.checksum: Added.
+ * svg/custom/svg-absolute-children-expected.png: Added.
+ * svg/custom/svg-absolute-children-expected.txt: Added.
+ * svg/custom/svg-absolute-children.svg: Added.
+
2007-01-12 David Kilzer <ddkilzer@kilzer.net>
Reviewed by Maciej.
* fast/css-generated-content/reset-content-to-initial-expected.txt: Added.
* fast/css-generated-content/reset-content-to-initial.html: Added.
-2006-12-31 Eric Seidel <eric@eseidel.com>
+2006-12-31 Eric Seidel <eric@webkit.org>
Reviewed by mitz.
* svg/custom/path-getTotalLength-expected.txt:
* svg/custom/path-getTotalLength.svg:
-2006-12-31 Eric Seidel <eric@eseidel.com>
+2006-12-31 Eric Seidel <eric@webkit.org>
Reviewed by weinig.
* svg/custom/viewbox-syntax-expected.txt: Added.
* svg/custom/viewbox-syntax.svg: Added.
-2006-12-29 Eric Seidel <eric@eseidel.com>
+2006-12-29 Eric Seidel <eric@webkit.org>
Reviewed by olliej.
--- /dev/null
+16310588467cfc20d551635abc59b784
\ No newline at end of file
--- /dev/null
+layer at (0,0) size 800x600
+ RenderView at (0,0) size 800x600
+ RenderSVGContainer {svg} at (0,0) size 100x100
+ RenderPath {rect} at (0,0) size 100x100 [fill={[type=SOLID] [color=#FF0000]}] [data="M0.00,0.00L100.00,0.00L100.00,100.00L0.00,100.00"]
+ RenderPath {rect} at (0,0) size 100x100 [fill={[type=SOLID] [color=#008000]}] [data="M0.00,0.00L100.00,0.00L100.00,100.00L0.00,100.00"]
--- /dev/null
+<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" style="position: static">
+ <rect width="100" height="100" fill="red" />
+ <rect id="rect" width="1" height="1" fill="green" style="position: absolute" />
+ <script>
+ <![CDATA[
+ if (window.layoutTestController)
+ layoutTestController.waitUntilDone();
+
+ var test = function() {
+ var rect = document.getElementById('rect');
+ rect.setAttribute("width", "100");
+ rect.setAttribute("height", "100");
+ if (window.layoutTestController)
+ layoutTestController.notifyDone();
+ }
+ window.setTimeout(test, 0);
+ ]]>
+ </script>
+</svg>
+2007-01-13 Eric Seidel <eric@eseidel.com>
+
+ Reviewed by hyatt.
+
+ RichDraw demo does not live-update in Safari
+ (SVG elements should ignore CSS position)
+ http://bugs.webkit.org/show_bug.cgi?id=10364
+
+ * css/cssstyleselector.cpp:
+ (WebCore::CSSStyleSelector::adjustRenderStyle): ignore position for everything but <svg>
+ * ksvg2/svg/SVGStyledElement.cpp:
+ (WebCore::SVGStyledElement::rebuildRenderer): move path generation into layout()
+ * rendering/RenderContainer.cpp:
+ (WebCore::RenderContainer::layout): ASSERT kids marked as having completed layout
+ * rendering/RenderPath.cpp:
+ (WebCore::RenderPath::layout): move path generation into layout()
+ * rendering/RenderSVGContainer.cpp:
+ (WebCore::RenderSVGContainer::layout): ASSERT kids marked as having completed layout
+
2007-01-12 David Hyatt <hyatt@apple.com>
Add support for column rules.
#ifdef SVG_SUPPORT
#include "XLinkNames.h"
+#include "SVGNames.h"
#endif
using namespace std;
style->setOverflowX(OHIDDEN);
else if (style->overflowX() == OAUTO)
style->setOverflowX(OVISIBLE);
+
+ // Only the root <svg> element in an SVG document fragment tree honors css position
+ if (!(e->hasTagName(SVGNames::svgTag) && e->parentNode() && !e->parentNode()->isSVGElement()))
+ style->setPosition(RenderStyle::initialPosition());
}
#endif
}
if (!renderer() || !renderer()->isRenderPath())
return;
- RenderPath* renderPath = static_cast<RenderPath*>(renderer());
- bool renderSection = false;
-
+ RenderPath* renderPath = static_cast<RenderPath*>(renderer());
SVGElement* parentElement = svg_dynamic_cast(parentNode());
if (parentElement && parentElement->renderer() && parentElement->isStyled()
&& parentElement->childShouldCreateRenderer(const_cast<SVGStyledElement*>(this)))
- renderSection = true;
-
- renderPath->setPath(toPathData());
-
- if (renderSection)
renderPath->setNeedsLayout(true);
}
RenderObject* child = m_firstChild;
while (child) {
child->layoutIfNeeded();
+ ASSERT(!child->needsLayout());
child = child->nextSibling();
}
setNeedsLayout(false);
bool checkForRepaint = checkForRepaintDuringLayout();
if (selfNeedsLayout() && checkForRepaint)
oldBounds = m_absoluteBounds;
-
- // FIXME: Until JSSVGPathSeg* relies on the genericContext<> hack for update
- // notifications, we can't really disable this. It would break js-update-path-changes.svg
- // if (m_path.isEmpty() && m_fillBBox.isEmpty() && m_strokeBbox.isEmpty())
- static_cast<SVGStyledElement*>(element())->rebuildRenderer();
+
+ setPath(static_cast<SVGStyledElement*>(element())->toPathData());
m_absoluteBounds = getAbsoluteRepaintRect();
child->setNeedsLayout(true);
child->layoutIfNeeded();
+ ASSERT(!child->needsLayout());
child = child->nextSibling();
}