[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: branches/work/khtml-svg
From: Rob Buis <buis () kde ! org>
Date: 2006-04-01 12:47:05
Message-ID: 1143895625.886981.31890.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 525250 by buis:
Fix the placement of handling svg css stylesheets, now
style selecting using stylesheets should work for svg.
M +4 -0 css/cssstyleselector.cpp
M +25 -25 xml/dom_docimpl.cpp
--- branches/work/khtml-svg/css/cssstyleselector.cpp #525249:525250
@@ -1091,6 +1091,10 @@
if (localName <= ID_LAST_TAG && e->isHTMLElement())
ns = xhtmlNamespace; // FIXME: Really want to move away from this \
complicated hackery and just
// switch tags and attr names over to \
AtomicStrings. +#ifdef SVG_SUPPORT
+ else if (e->isSVGElement())
+ selNS = anyNamespace;
+#endif
if ((selLocalName != anyLocalName && localName != selLocalName) ||
(selNS != anyNamespace && ns != selNS))
--- branches/work/khtml-svg/xml/dom_docimpl.cpp #525249:525250
@@ -2220,31 +2220,6 @@
}
}
}
-#if SVG_SUPPORT
- else if (n->isSVGElement() && n->id() == SVGID_STYLE) {
- QString title;
- // <STYLE> element
- KSVG::SVGStyleElementImpl *s = \
static_cast<KSVG::SVGStyleElementImpl*>(n);
- if (!s->isLoading()) {
- sheet = s->sheet();
- if(sheet)
- title = s->getAttribute(SVGID_TITLE).string();
- }
-
- if (!title.isEmpty() && m_preferredStylesheetSet.isEmpty())
- m_preferredStylesheetSet = title;
-
- if (!title.isEmpty()) {
- if (title != m_preferredStylesheetSet)
- sheet = 0; // don't use it
-
- title = title.replace('&', "&&");
-
- if (!m_availableSheets.contains(title))
- m_availableSheets.append(title);
- }
- }
-#endif
else {
// <STYLE> element
HTMLStyleElementImpl* s = static_cast<HTMLStyleElementImpl*>(n);
@@ -2266,6 +2241,31 @@
m_availableSheets.append( title );
}
}
+#if SVG_SUPPORT
+ else if (n->isSVGElement() && n->id() == SVGID_STYLE) {
+ QString title;
+ // <STYLE> element
+ KSVG::SVGStyleElementImpl *s = \
static_cast<KSVG::SVGStyleElementImpl*>(n); + if (!s->isLoading()) {
+ sheet = s->sheet();
+ if(sheet)
+ title = s->getAttribute(SVGID_TITLE).string();
+ }
+
+ if (!title.isEmpty() && m_preferredStylesheetSet.isEmpty())
+ m_preferredStylesheetSet = title;
+
+ if (!title.isEmpty()) {
+ if (title != m_preferredStylesheetSet)
+ sheet = 0; // don't use it
+
+ title = title.replace('&', "&&");
+
+ if (!m_availableSheets.contains(title))
+ m_availableSheets.append(title);
+ }
+ }
+#endif
else if (n->isHTMLElement() && n->id() == ID_BODY) {
// <BODY> element (doesn't contain styles as such but vlink="..." \
and friends // are treated as style declarations)
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic