Bug 314985. Merge adjacent textnodes when the document is going to be transformed by XSLT. r/sr=peterv
git-svn-id: svn://10.0.0.236/trunk@193669 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
e628fe45d0
commit
750f907d8b
@ -1046,6 +1046,12 @@ NS_IMETHODIMP
|
||||
nsXMLContentSink::HandleCDataSection(const PRUnichar *aData,
|
||||
PRUint32 aLength)
|
||||
{
|
||||
// XSLT doesn't differentiate between text and cdata and wants adjacent
|
||||
// textnodes merged, so add as text.
|
||||
if (mXSLTProcessor) {
|
||||
return AddText(aData, aLength);
|
||||
}
|
||||
|
||||
FlushText();
|
||||
|
||||
if (mInTitle) {
|
||||
@ -1356,7 +1362,8 @@ nsXMLContentSink::AddText(const PRUnichar* aText,
|
||||
amount = aLength;
|
||||
}
|
||||
if (0 == amount) {
|
||||
if (mConstrainSize) {
|
||||
// XSLT wants adjacent textnodes merged.
|
||||
if (mConstrainSize && !mXSLTProcessor) {
|
||||
nsresult rv = FlushText();
|
||||
if (NS_OK != rv) {
|
||||
return rv;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user