summaryrefslogtreecommitdiffstats
path: root/src/sp-style-elem.cpp
diff options
context:
space:
mode:
authorJabier Arraiza Cenoz <jabier.arraiza@marker.es>2015-03-18 18:07:14 +0000
committerJabiertxof <jtx@jtx.marker.es>2015-03-18 18:07:14 +0000
commite77956b4dbd029c9f6949f81fe083606f995c624 (patch)
tree74adda4df8986d65f70efb341c6235277361fd35 /src/sp-style-elem.cpp
parentupdated code to work on 0.92 code (diff)
parentLatvian translation update (diff)
downloadinkscape-e77956b4dbd029c9f6949f81fe083606f995c624.tar.gz
inkscape-e77956b4dbd029c9f6949f81fe083606f995c624.zip
update to trunk
(bzr r12588.1.39)
Diffstat (limited to 'src/sp-style-elem.cpp')
-rw-r--r--src/sp-style-elem.cpp23
1 files changed, 7 insertions, 16 deletions
diff --git a/src/sp-style-elem.cpp b/src/sp-style-elem.cpp
index da17b08d9..80e45677c 100644
--- a/src/sp-style-elem.cpp
+++ b/src/sp-style-elem.cpp
@@ -7,16 +7,6 @@
#include "style.h"
using Inkscape::XML::TEXT_NODE;
-#include "sp-factory.h"
-
-namespace {
- SPObject* createStyle() {
- return new SPStyleElem();
- }
-
- bool styleRegistered = SPFactory::instance().registerObject("svg:style", createStyle);
-}
-
SPStyleElem::SPStyleElem() : SPObject() {
media_set_all(this->media);
this->is_css = false;
@@ -319,13 +309,14 @@ void SPStyleElem::read_content() {
//requestDisplayUpdate(SP_OBJECT_MODIFIED_FLAG);
// Style references via class= do not, and actually cannot, use autoupdating URIReferences.
- // Therefore, if an object refers to a stylesheet which has not yet loaded when the object is being loaded
- // (e.g. if the stylesheet is below or inside the object in XML), its class= has no effect (bug 1491639).
- // Below is a partial hack that fixes this for a single case: when the <style> is a child of the object
- // that uses a style from it. It just forces the parent of <style> to reread its style as soon as the stylesheet
- // is fully loaded. Naturally, this won't work if the user of the stylesheet is its grandparent or precedent.
+ // Therefore, if an object refers to a stylesheet which has not yet loaded when the object is
+ // being loaded (e.g. if the stylesheet is below or inside the object in XML), its class= has
+ // no effect (bug 1491639). Below is a partial hack that fixes this for a single case: when
+ // the <style> is a child of the object that uses a style from it. It just forces the parent of
+ // <style> to reread its style as soon as the stylesheet is fully loaded. Naturally, this won't
+ // work if the user of the stylesheet is its grandparent or precedent.
if ( parent ) {
- sp_style_read_from_object(parent->style, parent);
+ parent->style->readFromObject( parent );
}
}