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

Change subject: Balancer: remove unnecessary extra argument
......................................................................


Balancer: remove unnecessary extra argument

The full HTML5 spec clones element attributes when they are added to
the ActiveFormattingElements list, so that when an element on that
list is later cloned and reinserted the attributes are the *original*
attributes, not reflecting any changes which embedded JavaScript
in an inline <script> block may have made to them since the element
was pushed.

However, the PHP implementation doesn't run any JavaScript so there's
no way the attributes could change during balancing and there is
thus no reason to keep extra copies of the attributes around.

Change-Id: I89647aeb90c64701d77e862ea9e3d22b19bbdedc
---
M includes/tidy/Balancer.php
1 file changed, 2 insertions(+), 4 deletions(-)

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



diff --git a/includes/tidy/Balancer.php b/includes/tidy/Balancer.php
index aef73c7..1346e1c 100644
--- a/includes/tidy/Balancer.php
+++ b/includes/tidy/Balancer.php
@@ -2603,8 +2603,7 @@
                        case 'tt':
                        case 'u':
                                $this->afe->reconstruct( $this->stack );
-                               // FIXME: only takes one parameter
-                               $this->afe->push( 
$this->stack->insertHTMLElement( $value, $attribs ), $attribs );
+                               $this->afe->push( 
$this->stack->insertHTMLElement( $value, $attribs ) );
                                return true;
 
                        case 'nobr':
@@ -2613,8 +2612,7 @@
                                        $this->inBodyMode( 'endtag', 'nobr' );
                                        $this->afe->reconstruct( $this->stack );
                                }
-                               // FIXME: only takes one parameter
-                               $this->afe->push( 
$this->stack->insertHTMLElement( $value, $attribs ), $attribs );
+                               $this->afe->push( 
$this->stack->insertHTMLElement( $value, $attribs ) );
                                return true;
 
                        case 'applet':

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I89647aeb90c64701d77e862ea9e3d22b19bbdedc
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: C. Scott Ananian <canan...@wikimedia.org>
Gerrit-Reviewer: Legoktm <legoktm.wikipe...@gmail.com>
Gerrit-Reviewer: Tim Starling <tstarl...@wikimedia.org>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to