I was wondering if the different approach to childIndexOf()
implemented in PHP in b8d7a75c34 would
be faster in JS as well, and yes, it is.
Our test suite now takes (on my machine):
* Chrome: 8337 ms → 7355 ms (average over 5 tries)
* Firefox: 5321 ms → 5044 ms (average over 5 tries)
Change-Id: I71963eeb92dcea9bfd59cbf01a7aa0b7de5d9cf1
When there is a wrapper element whose range matches the range of
a comment, any replies will now be added outside of that wrapper,
instead of directly after the comment (inside the wrapper).
Bug: T250126
Change-Id: I6b42c4db019ae998e91eebd324f9cbd2aa791b4f
When the preview loads, the "Reply" / "Cancel" buttons shift downwards,
which looks ugly. Try to wait for the preview before showing the source
editor interface.
Bug: T234403
Change-Id: I70989fb9fbcac17e1a0672eda8d34bf26003bb96
* Reset to content dir for preview.
* <textarea> gets dir from the `.sitedir-* textarea` rule.
* VE already sets the content dir in the editor.
Bug: T253255
Change-Id: I76df093490e86a730ccd5610c43c9b3fc7e07a54
Ensures that MW target sets the correct dir and lang on the document.
We should consider upstreaming this.
Bug: T253258
Change-Id: Ibc9ae7b4b105055291c941ce932f499bd6e13657
It was useful when I was debugging those parts of the code, but now
it's usually annoying.
The warnings can still sometimes be useful for understanding how the
tool parses some discussion, though. To keep that functionality, add
displaying warnings for each comment in the debug mode.
Change-Id: I2d218a8a394f179bcc0990ff988a0567c275ccf2
Follow-up to Ic1438d516e223db462cb227f6668e856672f538c.
Minor corrections and comment improvements in PHP parser,
and "backporting" some changes to JS parser that I like.
Change-Id: I5e54121914ec6b323e556dd133bcb71b3aefbb61
This method shouldn't be required on the server. Leave comments
relating to it in addListItem so JS & PHP can be kept in sync.
Change-Id: I849fac660faf6e750272c20776f96b9250f96b1b
It appears PHP's DOM library always uses CDATA nodes for the contents of
<style> tags, even if there is no such markup in the source HTML.
Change-Id: Id04b27086c5e7a0b016a3a440b2b4895d6b13c93
Exceptions were being treated like API errors, resulting in the
incorrect message "Invalid response from server." being shown to the
user. Instead show the error message.
Bug: T252238
Change-Id: Idbaee7d2b710812673992d30a17a9b5fe856a5a6
We used to rely on this happening in onInputChange but
that listener is now detached.
Bug: T252176
Change-Id: I6654d68dc6107cd78172c455db9cba6cb9eabddf
This allows the unload handler to trigger on these links.
Depends-On: If52aa9d619eac08456874fc75c0f6e1adff01246
Bug: T244942
Change-Id: I9904e8af4a60b0f5e9a6e263cd4fd8e1e3fd1f98