- fixed <rdar://problem/
3804665> REGRESSION: WebCore framework now has many init routines
* khtml/xml/dom_nodeimpl.h: Changed anyQName declaration to not use the inline function
makeId. Surprisingly, the inline function was not "constant-folded" and we ended up with
a copy of the function in each file as an init routine for the framework.
* khtml/ecma/kjs_html.cpp: (Gradient::colorStops): Get rid of initialized ColorStop
globals; their constructors were showing up as init routines for the framework.
* khtml/rendering/render_style.h: Got rid of inline initialDashboardRegions function.
* khtml/rendering/render_style.cpp: (RenderStyle::initialDashboardRegions): Made this
a normal function. When it was an inline function, the constructors for the per-file
copies of the globals were showing up as init routines for the framework.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7797
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2004-10-09 Darin Adler <darin@apple.com>
+
+ Reviewed by Kevin.
+
+ - fixed <rdar://problem/3804665> REGRESSION: WebCore framework now has many init routines
+
+ * khtml/xml/dom_nodeimpl.h: Changed anyQName declaration to not use the inline function
+ makeId. Surprisingly, the inline function was not "constant-folded" and we ended up with
+ a copy of the function in each file as an init routine for the framework.
+
+ * khtml/ecma/kjs_html.cpp: (Gradient::colorStops): Get rid of initialized ColorStop
+ globals; their constructors were showing up as init routines for the framework.
+
+ * khtml/rendering/render_style.h: Got rid of inline initialDashboardRegions function.
+ * khtml/rendering/render_style.cpp: (RenderStyle::initialDashboardRegions): Made this
+ a normal function. When it was an inline function, the constructors for the per-file
+ copies of the globals were showing up as init routines for the framework.
+
2004-10-09 Chris Blumenberg <cblu@apple.com>
Fixed:
return 0;
}
-// If not specified use default start (stop 0) and end (stop 1)
-// colors. This color will be transparent black.
-static ColorStop defaultStartStop = ColorStop(0.f, 0.f, 0.f, 0.f, 1.f);
-static ColorStop defaultEndStop = ColorStop(1.f, 0.f, 0.f, 0.f, 1.f);
-
// Return a sorted array of stops guaranteed to contain a 0 and 1 stop.
const ColorStop *Gradient::colorStops(int *count) const
{
adjustedStops = (ColorStop *)malloc(adjustedStopCount * sizeof(ColorStop));
memcpy (haveZeroStop ? adjustedStops : adjustedStops+1,
stops, stopCount*sizeof(ColorStop));
+
+ // If not specified use default start (stop 0) and end (stop 1) colors.
+ // This color will be transparent black.
if (!haveZeroStop) {
- adjustedStops[0] = defaultStartStop;
+ adjustedStops[0] = ColorStop(0.f, 0.f, 0.f, 0.f, 1.f);
}
if (!haveOneStop) {
- adjustedStops[adjustedStopCount-1] = defaultEndStop;
+ adjustedStops[adjustedStopCount-1] = ColorStop(1.f, 0.f, 0.f, 0.f, 1.f);
}
}
return x == o.x && y == o.y && blur == o.blur && color == o.color;
}
+
+const QValueList<StyleDashboardRegion>& RenderStyle::initialDashboardRegions()
+{
+ static QValueList<StyleDashboardRegion> emptyList;
+ return emptyList;
+}
// Keep these at the end.
static int initialLineClamp() { return -1; }
static bool initialTextSizeAdjust() { return true; }
- static const QValueList<StyleDashboardRegion>& initialDashboardRegions() {
- static QValueList<StyleDashboardRegion> emptyList;
- return emptyList;
- }
+ static const QValueList<StyleDashboardRegion>& initialDashboardRegions();
#endif
};
inline Q_UINT16 localNamePart(Q_UINT32 i) { return i; }
inline Q_UINT32 makeId(Q_UINT16 n, Q_UINT16 l) { return (n << 16) | l; }
-const Q_UINT32 anyQName = makeId(anyNamespace, anyLocalName);
+// Can't use makeId here because it results in an "initroutine".
+const Q_UINT32 anyQName = anyNamespace << 16 | anyLocalName;
class DocumentPtr : public khtml::Shared<DocumentPtr>
{