[MSXML3] Sync with Wine Staging 2.2. CORE-12823

45dd9d1 msxml3: Accept AllowXsltScript and AllowDocumentFunction properties.
2191d97 msxml3: Duplicate stylesheet document before passing it to libxslt.
1242648 msxml3: Remove dead initialization (clang).

svn path=/trunk/; revision=73969
This commit is contained in:
Amine Khaldi 2017-02-26 19:07:55 +00:00
parent ee4765946d
commit 4d858698cd
3 changed files with 14 additions and 8 deletions

View file

@ -51,6 +51,8 @@ static const WCHAR PropertyNewParserW[] = {'N','e','w','P','a','r','s','e','r',0
static const WCHAR PropValueXPathW[] = {'X','P','a','t','h',0};
static const WCHAR PropValueXSLPatternW[] = {'X','S','L','P','a','t','t','e','r','n',0};
static const WCHAR PropertyResolveExternalsW[] = {'R','e','s','o','l','v','e','E','x','t','e','r','n','a','l','s',0};
static const WCHAR PropertyAllowXsltScriptW[] = {'A','l','l','o','w','X','s','l','t','S','c','r','i','p','t',0};
static const WCHAR PropertyAllowDocumentFunctionW[] = {'A','l','l','o','w','D','o','c','u','m','e','n','t','F','u','n','c','t','i','o','n',0};
/* Anything that passes the test_get_ownerDocument()
* tests can go here (data shared between all instances).
@ -3052,7 +3054,9 @@ static HRESULT WINAPI domdoc_setProperty(
}
else if (lstrcmpiW(p, PropertyProhibitDTDW) == 0 ||
lstrcmpiW(p, PropertyNewParserW) == 0 ||
lstrcmpiW(p, PropertyResolveExternalsW) == 0)
lstrcmpiW(p, PropertyResolveExternalsW) == 0 ||
lstrcmpiW(p, PropertyAllowXsltScriptW) == 0 ||
lstrcmpiW(p, PropertyAllowDocumentFunctionW) == 0)
{
/* Ignore */
FIXME("Ignoring property %s, value %s\n", debugstr_w(p), debugstr_variant(&value));

View file

@ -810,7 +810,7 @@ static xmlChar* do_get_text(xmlNodePtr node, BOOL trim, DWORD *first, DWORD *las
case XML_DOCUMENT_FRAG_NODE:
if (trim && !preserving)
{
xmlChar* ret = str;
xmlChar* ret;
int len;
if (!str)
@ -1301,6 +1301,7 @@ HRESULT node_transform_node_params(const xmlnode *This, IXMLDOMNode *stylesheet,
{
#ifdef SONAME_LIBXSLT
xsltStylesheetPtr xsltSS;
xmlDocPtr sheet_doc;
HRESULT hr = S_OK;
xmlnode *sheet;
@ -1312,8 +1313,9 @@ HRESULT node_transform_node_params(const xmlnode *This, IXMLDOMNode *stylesheet,
sheet = get_node_obj(stylesheet);
if(!sheet) return E_FAIL;
xsltSS = pxsltParseStylesheetDoc(sheet->node->doc);
if(xsltSS)
sheet_doc = xmlCopyDoc(sheet->node->doc, 1);
xsltSS = pxsltParseStylesheetDoc(sheet_doc);
if (xsltSS)
{
const char **xslparams = NULL;
xmlDocPtr result;
@ -1358,11 +1360,11 @@ HRESULT node_transform_node_params(const xmlnode *This, IXMLDOMNode *stylesheet,
hr = node_transform_write_to_bstr(xsltSS, result, p);
xmlFreeDoc(result);
}
/* libxslt "helpfully" frees the XML document the stylesheet was
generated from, too */
xsltSS->doc = NULL;
pxsltFreeStylesheet(xsltSS);
}
else
xmlFreeDoc(sheet_doc);
if(!*p) *p = SysAllocStringLen(NULL, 0);

View file

@ -129,7 +129,7 @@ reactos/dll/win32/msvfw32 # Synced to WineStaging-2.2
reactos/dll/win32/msvidc32 # Synced to WineStaging-1.9.11
reactos/dll/win32/msxml # Synced to WineStaging-1.9.11
reactos/dll/win32/msxml2 # Synced to WineStaging-1.9.11
reactos/dll/win32/msxml3 # Synced to WineStaging-1.9.16
reactos/dll/win32/msxml3 # Synced to WineStaging-2.2
reactos/dll/win32/msxml4 # Synced to WineStaging-1.9.11
reactos/dll/win32/msxml6 # Synced to WineStaging-1.9.11
reactos/dll/win32/nddeapi # Synced to WineStaging-1.9.11