[webkit-changes] cvs commit: SVGSupport/ksvg2/svg
SVGClipPathElementImpl.cpp SVGGradientElementImpl.cpp
Eric
eseidel at opensource.apple.com
Mon Nov 21 18:22:08 PST 2005
eseidel 05/11/21 18:22:08
Modified: . ChangeLog
WebCore.xcodeproj project.pbxproj
ksvg2/svg SVGClipPathElementImpl.cpp
SVGGradientElementImpl.cpp
Log:
Bug #: none
Submitted by: eseidel
Reviewed by: No review required, svg target only.
Fixed (hacked?) gradient stop style inheritance since style is not
currently resolved for nodes which do not create renderers,
breaking style resolution across resource-creating nodes
such as gradients, patterns, use, filters, etc.
Also fixed SVG CSS values to be case-insensitive.
* WebCore.xcodeproj/project.pbxproj: case insensitivity
* ksvg2/svg/SVGClipPathElementImpl.cpp:
(SVGClipPathElementImpl::canvasResource): alternative style call
* ksvg2/svg/SVGGradientElementImpl.cpp:
(SVGGradientElementImpl::rebuildStops): manual style resolution
Revision Changes Path
1.391 +18 -0 WebCore/ChangeLog
Index: ChangeLog
===================================================================
RCS file: /cvs/root/WebCore/ChangeLog,v
retrieving revision 1.390
retrieving revision 1.391
diff -u -r1.390 -r1.391
--- ChangeLog 22 Nov 2005 00:08:56 -0000 1.390
+++ ChangeLog 22 Nov 2005 02:22:00 -0000 1.391
@@ -2,6 +2,24 @@
No review required, svg target only.
+ No additional test cases needed, this fixes 5 or so existing tests
+
+ Fixed (hacked?) gradient stop style inheritance since style is not
+ currently resolved for nodes which do not create renderers,
+ breaking style resolution across resource-creating nodes
+ such as gradients, patterns, use, filters, etc.
+ Also fixed SVG CSS values to be case-insensitive.
+
+ * WebCore.xcodeproj/project.pbxproj: case insensitivity
+ * ksvg2/svg/SVGClipPathElementImpl.cpp:
+ (SVGClipPathElementImpl::canvasResource): alternative style call
+ * ksvg2/svg/SVGGradientElementImpl.cpp:
+ (SVGGradientElementImpl::rebuildStops): manual style resolution
+
+2005-11-21 eseidel <eseidel at apple.com>
+
+ No review required, svg target only.
+
No additional test cases needed, this fixes 30 or so existing tests
Standardized all isFoo() methods to use const, which actually
1.45 +1 -1 WebCore/WebCore.xcodeproj/project.pbxproj
Index: project.pbxproj
===================================================================
RCS file: /cvs/root/WebCore/WebCore.xcodeproj/project.pbxproj,v
retrieving revision 1.44
retrieving revision 1.45
diff -u -r1.44 -r1.45
--- project.pbxproj 21 Nov 2005 11:59:57 -0000 1.44
+++ project.pbxproj 22 Nov 2005 02:22:05 -0000 1.45
@@ -6561,7 +6561,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
- shellScript = "echo \"First checking for duplicate cssvalues between html and SVG...\"\ncat khtml/css/cssvalues.in ksvg2/css/cssvalues.in | sort | uniq -c | grep -v 1 | awk '{print $2;}' | grep -E '^[^#]'\nif [ $? -eq 0 ]; then\n\techo \"Duplicate value!\";\n\texit 1;\nfi\n\ncat ksvg2/css/cssvalues.in > \"$DERIVED_FILE_DIR/ksvgcssvalues.in\"\ncd \"$DERIVED_FILE_DIR\"\n\"$SRCROOT/ksvg2/scripts/cssmakevalues\" -n KSVG -f ksvgcssvalues.in";
+ shellScript = "echo \"First checking for duplicate cssvalues between html and SVG...\"\ncat khtml/css/cssvalues.in ksvg2/css/cssvalues.in | sort | uniq -c | grep -v 1 | awk '{print $2;}' | grep -E '^[^#]'\nif [ $? -eq 0 ]; then\n\techo \"Duplicate value!\";\n\texit 1;\nfi\n\n# Lower case all the values, as CSS values are case-insensitive\ncat ksvg2/css/cssvalues.in | perl -pe '$_ = lc;' > \"$DERIVED_FILE_DIR/ksvgcssvalues.in\"\ncd \"$DERIVED_FILE_DIR\"\n\"$SRCROOT/ksvg2/scripts/cssmakevalues\" -n KSVG -f ksvgcssvalues.in";
};
A83C867D0911AA19009BF4A7 /* XSLTProcessor.lut.h */ = {
isa = PBXShellScriptBuildPhase;
1.8 +1 -1 SVGSupport/ksvg2/svg/SVGClipPathElementImpl.cpp
Index: SVGClipPathElementImpl.cpp
===================================================================
RCS file: /cvs/root/SVGSupport/ksvg2/svg/SVGClipPathElementImpl.cpp,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- SVGClipPathElementImpl.cpp 21 Nov 2005 08:29:35 -0000 1.7
+++ SVGClipPathElementImpl.cpp 22 Nov 2005 02:22:07 -0000 1.8
@@ -96,7 +96,7 @@
if(e && e->isStyled())
{
SVGStyledElementImpl *styled = static_cast<SVGStyledElementImpl *>(e);
- SVGRenderStyle *style = getDocument()->styleSelector()->styleForElement(this)->svgStyle();
+ SVGRenderStyle *style = styleForRenderer(parentNode()->renderer())->svgStyle();
m_clipper->addClipData(styled->toPathData(), (KCWindRule) style->clipRule(), bbox);
}
}
1.10 +2 -1 SVGSupport/ksvg2/svg/SVGGradientElementImpl.cpp
Index: SVGGradientElementImpl.cpp
===================================================================
RCS file: /cvs/root/SVGSupport/ksvg2/svg/SVGGradientElementImpl.cpp,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- SVGGradientElementImpl.cpp 22 Nov 2005 00:09:05 -0000 1.9
+++ SVGGradientElementImpl.cpp 22 Nov 2005 02:22:07 -0000 1.10
@@ -155,13 +155,14 @@
if (m_resource && !ownerDocument()->parsing()) {
KCSortedGradientStopList &stops = m_resource->gradientStops();
stops.clear();
+ khtml::RenderStyle *gradientStyle = const_cast<SVGGradientElementImpl *>(this)->styleForRenderer(parent()->renderer());
for (KDOM::NodeImpl *n = firstChild(); n; n = n->nextSibling()) {
SVGElementImpl *element = svg_dynamic_cast(n);
if (element && element->isGradientStop()) {
SVGStopElementImpl *stop = static_cast<SVGStopElementImpl *>(element);
float stopOffset = stop->offset()->baseVal();
- SVGRenderStyle *stopStyle = getDocument()->styleSelector()->styleForElement(stop)->svgStyle();
+ SVGRenderStyle *stopStyle = getDocument()->styleSelector()->styleForElement(stop, gradientStyle)->svgStyle();
QColor c = stopStyle->stopColor();
float opacity = stopStyle->stopOpacity();
More information about the webkit-changes
mailing list