~ubuntu-branches/ubuntu/lucid/webkit/lucid-updates

« back to all changes in this revision

Viewing changes to WebCore/xml/XSLStyleSheetLibxslt.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Gustavo Noronha Silva
  • Date: 2010-02-04 19:30:57 UTC
  • mfrom: (1.2.8 upstream) (4.3.9 sid)
  • Revision ID: james.westby@ubuntu.com-20100204193057-d3018lm1fipb0703
* New upstream release
* debian/copyright:
- Updated with changes since 1.1.19.

Show diffs side-by-side

added added

removed removed

Lines of Context:
55
55
 
56
56
namespace WebCore {
57
57
 
58
 
XSLStyleSheet::XSLStyleSheet(XSLImportRule* parentRule, const String& href)
59
 
    : StyleSheet(parentRule, href)
 
58
XSLStyleSheet::XSLStyleSheet(XSLImportRule* parentRule, const String& href, const KURL& baseURL)
 
59
    : StyleSheet(parentRule, href, baseURL)
60
60
    , m_ownerDocument(0)
61
61
    , m_embedded(false)
62
62
    , m_processed(false) // Child sheets get marked as processed when the libxslt engine has finally seen them.
66
66
{
67
67
}
68
68
 
69
 
XSLStyleSheet::XSLStyleSheet(Node* parentNode, const String& href,  bool embedded)
70
 
    : StyleSheet(parentNode, href)
 
69
XSLStyleSheet::XSLStyleSheet(Node* parentNode, const String& href, const KURL& baseURL,  bool embedded)
 
70
    : StyleSheet(parentNode, href, baseURL)
71
71
    , m_ownerDocument(parentNode->document())
72
72
    , m_embedded(embedded)
73
73
    , m_processed(true) // The root sheet starts off processed.
168
168
    }
169
169
 
170
170
    m_stylesheetDoc = xmlCtxtReadMemory(ctxt, buffer, size,
171
 
        href().utf8().data(),
 
171
        putativeBaseURL().string().utf8().data(),
172
172
        BOMHighByte == 0xFF ? "UTF-16LE" : "UTF-16BE",
173
173
        XML_PARSE_NOENT | XML_PARSE_DTDATTR | XML_PARSE_NOWARNING | XML_PARSE_NOCDATA);
174
174
    xmlFreeParserCtxt(ctxt);
192
192
    if (m_embedded) {
193
193
        // We have to locate (by ID) the appropriate embedded stylesheet element, so that we can walk the
194
194
        // import/include list.
195
 
        xmlAttrPtr idNode = xmlGetID(document(), (const xmlChar*)(href().utf8().data()));
 
195
        xmlAttrPtr idNode = xmlGetID(document(), (const xmlChar*)(putativeBaseURL().string().utf8().data()));
196
196
        if (!idNode)
197
197
            return;
198
198
        stylesheetRoot = idNode->parent;