Subramanya Sastry has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/199164

Change subject: T93369: Propagate null values without updating them
......................................................................

T93369: Propagate null values without updating them

* Null values are set when we enter templates and there is no
  reason to continue propagating them.

* Looks like we had a missed (ce !== null) check for a mw:Placeholder
  span that caused the flurry of negative DSR warnings seen in production,
  especially on frwiki where the "isDisplayHack" space before a colon
  seems to be used a lot.

* Eliminates all negative DSR warnings on frwiki:Aubaine and frwiki:Balot
  seen in Kibana logs.

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


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/parsoid 
refs/changes/64/199164/1

diff --git a/lib/dom.computeDSR.js b/lib/dom.computeDSR.js
index ba67bd0..89110a1 100644
--- a/lib/dom.computeDSR.js
+++ b/lib/dom.computeDSR.js
@@ -343,7 +343,7 @@
                                cs = ce - dp.src.length;
                        } else {
                                var tagWidths, newDsr, ccs, cce;
-                               if (/^mw:Placeholder(\/\w*)?$/.test(cTypeOf) && 
dp.src) {
+                               if (/^mw:Placeholder(\/\w*)?$/.test(cTypeOf) && 
ce !== null && dp.src) {
                                        cs = ce - dp.src.length;
                                } else {
                                        // Non-meta tags

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I488b287b8dcbc59fa6edebc484563f88c3484d29
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/parsoid
Gerrit-Branch: master
Gerrit-Owner: Subramanya Sastry <[email protected]>

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

Reply via email to