jenkins-bot has submitted this change and it was merged.

Change subject: Revert "DSR: Remove stale/dead conditions in LTR propagation"
......................................................................


Revert "DSR: Remove stale/dead conditions in LTR propagation"

There is actually a subtle bug here ( a <= b when a is null is 
true, but we don't want that) + this exposed a bug in the
migrateTrailingNLs DOM pass which is a separate fix.

This reverts commit dd00a5c8211eec2faf4ffffbefc6a7468797323b.

Change-Id: I1a4cd1e60eab7a5347ae9261a87efa87c046a7b9
---
M lib/dom.computeDSR.js
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  Cscott: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/lib/dom.computeDSR.js b/lib/dom.computeDSR.js
index c4692a3..5229ffe 100644
--- a/lib/dom.computeDSR.js
+++ b/lib/dom.computeDSR.js
@@ -496,7 +496,7 @@
                                                newCE = newCE + 
DU.decodedCommentLength(sibling);
                                        } else if (nType === node.ELEMENT_NODE) 
{
                                                var siblingDP = 
DU.getDataParsoid(sibling);
-                                               if (siblingDP.dsr && 
siblingDP.dsr[0] <= newCE) {
+                                               if (siblingDP.dsr && 
siblingDP.tsr && siblingDP.dsr[0] <= newCE && e !== null) {
                                                        // sibling's dsr wont 
change => ltr propagation stops here.
                                                        break;
                                                }

-- 
To view, visit https://gerrit.wikimedia.org/r/246863
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I1a4cd1e60eab7a5347ae9261a87efa87c046a7b9
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/services/parsoid
Gerrit-Branch: master
Gerrit-Owner: Subramanya Sastry <[email protected]>
Gerrit-Reviewer: Cscott <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to