[webkit-changes] cvs commit:
WebCore/layout-tests/fast/css-generated-content
013-expected.txt 013.html
Allan Sandfeld Jensen
kde at carewolf.com
Fri Jun 10 03:18:42 PDT 2005
On Friday 10 June 2005 08:47, David wrote:
> Index: cssstyleselector.cpp
> ===================================================================
> RCS file: /cvs/root/WebCore/khtml/css/cssstyleselector.cpp,v
> retrieving revision 1.183
> retrieving revision 1.184
> diff -u -r1.183 -r1.184
> --- cssstyleselector.cpp 11 May 2005 05:49:34 -0000 1.183
> +++ cssstyleselector.cpp 10 Jun 2005 06:47:36 -0000 1.184
> @@ -3042,8 +3042,12 @@
> // just the hardcoded HTML set. Can a namespace be
> specified for // an attr(foo)?
> int attrID = element->getDocument()->attrId(0,
> val->getStringValue().implementation(), false); - if
> (attrID)
> -
> style->setContent(element->getAttribute(attrID).implementation(), i != 0);
> + if (attrID) {
> + DOMStringImpl* v =
> element->getAttribute(attrID).implementation(); + if
> (!v)
> + v = DOMStringImpl::empty(); // Don't allow v to
> be null, since we want to concatenate this string even if it's empty. +
> style->setContent(v, i != 0);
> + }
> }
> else if (val->primitiveType()==CSSPrimitiveValue::CSS_URI)
> {
Wouldn't be better solved by allowing to concatenate to 0 content in
render_style.cpp?
Index: render_style.cpp
===================================================================
--- render_style.cpp (revision 423202)
+++ render_style.cpp (working copy)
@@ -668,10 +668,7 @@
lastContent = lastContent->_nextContent;
bool reuseContent = !add;
- if (add) {
- if (!lastContent)
- return; // Something's wrong. We had no previous content, and we
should have.
-
+ if (add && lastContent) {
if (lastContent->_contentType == CONTENT_TEXT) {
// We can augment the existing string and share this ContentData
node.
DOMStringImpl* oldStr = lastContent->_content.text;
`Allan
More information about the webkit-changes
mailing list