Commit graph

9251 commits

Author SHA1 Message Date
Amir E. Aharoni dd99b50735 [BrowserTest] Remove outdated offenses from .rubocop_todo.yml
HashSyntax and StringLiterals were appearing in lib/ve,
but this was fixed there.

Change-Id: I6f6131efee17b4d40e993aa475f59920392849cf
2015-02-20 13:39:18 +02:00
Amir E. Aharoni a993be469b [BrowserTest] Remove extra empty line to make Rubocop pass
Change-Id: I0628cb5af5a716740150d78fce29c97f8c3cf85d
2015-02-20 13:37:56 +02:00
Roan Kattouw f55d346148 Update VE core submodule to master (c65f3bd)
New changes:
8b7d159 Separate out toolbar attachment in overridable method
a167a45 Prevent the default action for uncollapsed linear delete
c65f3bd Localisation updates from https://translatewiki.net.

Change-Id: I3b01db40a51ddd652a932848398b825d9ac39c2b
2015-02-19 18:17:37 -08:00
James D. Forrester fc92e5aaf8 Update VE core submodule to master (a7cd696)
New changes:
181561b Support generic data transfer handlers
ecdb379 Only replace selection when we know it has changed
afb37fd Remove some errant references to MediaWiki/Parsoid that don't belong
82f57e0 Update OOjs UI to v0.8.0
489ff8a Simplify AlignableNode by inheriting from ClassAttributeNode
bac7e30 Try html/plain text drop if no file handlers found

Change-Id: Id75692418c331191ea638128fe835350e334837d
2015-02-19 17:44:15 -08:00
Roan Kattouw 888b5eb889 Add dependency on ext.ve.mw in ext.ve.mwreference
MWReferenceDialog uses ve.init.mw.Target in its setup code,
so it needs this dependency. Otherwise the tests fail intermittently;
usually only when loading from localStorage for some reason.

Change-Id: I6c0f66263e2cf6ffcf926fefaac4de1e53eac130
2015-02-19 17:44:15 -08:00
Ori Livneh 7e6eba0fe8 Add a warning about $wgVisualEditorPluginModules race condition
Warn developers not to delist a plugin module and remove it in a single
deployment, since the relevant cache layers are not synchronized, making a race
condition possible. See I627a0d5d8 for an example.

Change-Id: I488bafa08a5eab6b40fa73bb5ca031fb5a6aa9ed
2015-02-19 15:30:26 -08:00
jenkins-bot f91974ed0f Merge "Update ve.init.mw.trackSubscriber to emit 'wgVersion'" 2015-02-19 22:48:44 +00:00
Translation updater bot 5c363859c1 Localisation updates from https://translatewiki.net.
Change-Id: I7f633f9b44a2122c33defd4c6ce9cd5d2673b6d1
2015-02-19 22:12:06 +01:00
jenkins-bot cd05fb0fc4 Merge "extension.json: Rebuild using maintenance/convertExtensionToRegistration.php" 2015-02-19 20:20:41 +00:00
Ori Livneh 429d55cda8 Update ve.init.mw.trackSubscriber to emit 'wgVersion'
Depends on I6cebac796: Update Edit schema to revision 11319708.

Change-Id: I31ce78a573ef0cdab1162c6b78142fd511b9e0ec
2015-02-19 11:20:53 -08:00
James D. Forrester d11dacaade extension.json: Rebuild using maintenance/convertExtensionToRegistration.php
Mostly re-ordering of the file, plus factoring out of remoteExtPath.

Change-Id: I7f592e370bca889e6f77d461f896993535a99293
2015-02-19 11:15:14 -08:00
Vikas S Yaligar b960e4c999 [BrowserTest] Edited language screenshot steps which had iframe elements
Bug: T89370
Change-Id: If87d30fc23bfc867e6c62a3edefc8b2591c6ce48
2015-02-19 23:46:22 +05:30
Amir E. Aharoni 710da1547b [BrowserTest] Move the screenshot uploading to a gem
* The methods from upload.rb are moved to a newly created gem:
  https://rubygems.org/gems/commons_upload
* upload.rb is changed to simply call the method from the Gem.
* Gemfile is updated accordingly.

Bug: T89718
Change-Id: I229fbcd1b8c3cb03885947509aef27f0ae583a1c
2015-02-19 12:28:43 +02:00
jenkins-bot 7c838d839c Merge "Don't log against undefined target constructor name" 2015-02-19 00:55:38 +00:00
Ori Livneh 4cf393da54 Update VE core submodule to master (032c9a4)
New changes:
dc3b1f8 Replace ve.dm.Model#matchesAttributeSpec

Local changes:
Replace ve.dm.Model#matchesAttributeSpec

Change-Id: I2a107999974309304b59697dad0f7374110b9ab5
2015-02-18 16:32:19 -08:00
Roan Kattouw 3611664663 Update VE core submodule to master (7d2a68e)
New changes:
0ceafd5 Fix V8 deopt for ve.ce.BranchNode#onSplice
01d2d4b [BREAKING CHANGE] Store originalDomElements instead of htmlAttributes
96005a7 Localisation updates from https://translatewiki.net.
42e672e ve.ui.Toolbar: Don't call #updateToolState from #initialize
373562d Localisation updates from https://translatewiki.net.

Local changes:
Update for htmlAttributes going away

Change-Id: I576a1e5d5883b03d1fff6666926f80a5682a280f
2015-02-18 15:35:46 -08:00
Roan Kattouw 71a26929e4 In setupSurface, build the model tree separately
Otherwise it gets built lazily when building the view tree,
and that makes it difficult to instrument it separately.

Change-Id: Ie8c2027e87a87e59323165f0edbba49c4a66d1b3
2015-02-18 21:12:36 +00:00
Roan Kattouw 70db70bc0e Add a bunch of trace.foo.{enter|exit} events logged through ve.track()
Tracked stages are:
* activate: wraps the entire activation
* domLoad: API request for Parsoid HTML
* parseResponse: parse HTML, interpret things like link cache data
* convertModelFromDom: create linear model from Parsoid DOM
* createSurface: build DM and CE trees, create DM, CE and UI surfaces
* initializeSurface: initialize UI and CE surfaces, and CE nodes
* setupToolbar: toolbar setup and attachment
* initializeToolbar: toolbar initialization (deferred so not wrapped by activate)

Bug: T89536
Change-Id: Ife5664e872bad68dcf3c123f274f9c8a38a06031
2015-02-18 21:11:25 +00:00
Translation updater bot d6608fb174 Localisation updates from https://translatewiki.net.
Change-Id: I730f874e8928bd46055257203d30d0ffe432fa48
2015-02-18 22:07:32 +01:00
Roan Kattouw 237bb053d6 Remove the sanity check
It's slow, especially on large pages, and it's triggered
very infrequently these days, and only for known bugs.

In the future we should replace this with a debugging
interface that displays the DOM diff between the original
DOM and the round-tripped DOM, as opposed to the boolean
interface we have now.

By extension, this also means the visualeditor-needcheck
tag won't be applied to new edits any more, although
its registration and messages are kept around because
edits with this tag still exist in page histories.

Bug: T87161
Change-Id: I909153492a5786b4b69fccd42ce3c1d4bdb3a059
2015-02-17 17:14:34 -08:00
jenkins-bot 3dcad4e567 Merge "mw.Target: Hopefully fix plugin garbage removal code" 2015-02-17 23:55:40 +00:00
Roan Kattouw 70c64e0613 mw.Target: Hopefully fix plugin garbage removal code
Follows-up 0547d8c8.

It's still very difficult to test whether this code works, but
doing $( newDoc ).remove( 'selector1' ).remove( 'selector2' )...
demonstrably doesn't work, because 1) the selector passed to remove()
filters the collection, it doesn't descend into it, and 2) remove()
returns the collection of removed items, so chaining it doesn't work.

Instead, use $( newDoc ).find( 'selector1, selector2, ...' ).remove();

Also normalise selectors.

Change-Id: I97f3b28c4d5120f08e5d7fbf4598ddc0c01d4ecf
2015-02-17 23:52:41 +00:00
jenkins-bot 549d1e89c6 Merge "Update VE core submodule to master (4d6cd42)" 2015-02-17 23:41:31 +00:00
Translation updater bot 9239f950d8 Localisation updates from https://translatewiki.net.
Change-Id: Ibd23d06187c606a901d8c7b7e55368137a1db40e
2015-02-17 21:54:56 +01:00
Alex Monk 77b59981fa Don't log against undefined target constructor name
This targetName property is expected by the trackSubscriber code for mwtiming.

Bug: T89735
Change-Id: Ie75054a4eb3387f0be0decfe5499af40eea8c6c0
2015-02-17 20:30:52 +00:00
jenkins-bot 761fdbb5dc Merge "Normalize external links from the API" 2015-02-17 20:12:25 +00:00
Moriel Schottlender 07034a7774 Normalize external links from the API
In beta labs some local files displayed their links without http://
make sure they all are normalized to have the prefix.

Change-Id: Ia19de9b31e234138603495f06750d202654a8788
2015-02-17 11:05:48 -08:00
James D. Forrester 55e4d9ae1e Update VE core submodule to master (4d6cd42)
New changes:
9a0ef06 ve.dm.ElementLinearData: Remove unused rules.removeStyles feature
6174608 Remove a Rubocop exception that doesn't produce offenses
5612b8f Make the Gemfile more like the one in the MW repo
75d20ca Add round-trip test to getModelFromDom tests
f4ac9ac ElementLinearData tests: compare stores more elegantly
d00a4b9 Add fromDataBody property for DomFromModel tests
ccb5452 Remove data-parsoid hack in ve.dm.Annotation#isGenerated
166e0e2 Fix the Rubocop offense SpaceAroundOperators
e1abdbb Fix the Rubocop offense StringLiterals
da95fc0 Use OO.initClass() rather than setting .static manually
f3146c3 Ignore duplicates when comparing class lists

Change-Id: Ic068b09f1975830e49e49bfdf83f503845e27741
2015-02-17 10:59:54 -08:00
jenkins-bot ff96d8a623 Merge "Add tests for MW node variants (heading/table/pre)" 2015-02-17 18:50:00 +00:00
jenkins-bot eacf5e2ce5 Merge "ve.dm.MWImageNode: Fix indentation" 2015-02-17 16:12:26 +00:00
Ed Sanders b9addfc1da ve.dm.MWImageNode: Fix indentation
Change-Id: Ice223d19904f02709a64799cc6b81f8718a92a40
2015-02-17 16:10:33 +00:00
jenkins-bot 06e2ff3d0d Merge "[BrowserTest] Add parentheses to regexp parameters" 2015-02-17 15:13:36 +00:00
jenkins-bot a02e5d362a Merge "[BrowserTest] Fix ParenthesesAsGroupedExpression Rubocop failures" 2015-02-17 15:11:55 +00:00
jenkins-bot a1d337406a Merge "[BrowserTest] Remove an empty line to make Rubocop pass" 2015-02-17 14:19:52 +00:00
jenkins-bot 94e2bf3618 Merge "ce.MWTransclusionNode: Protect against race condition in GCN rendering" 2015-02-17 13:11:41 +00:00
Ed Sanders d735130d8d Add tests for MW node variants (heading/table/pre)
Requires more model registry hacking.

Bug: T74398
Change-Id: I6d27dba0b9a198fc3b450914ce06267c9039ba35
2015-02-17 13:03:59 +00:00
Amir E. Aharoni efc8d0bcbd [BrowserTest] Add parentheses to regexp parameters
This fixes the AmbiguousRegexpLiteral Rubocop offenses.

Change-Id: Ief9e5e4904637b2cc863e7fd99404e0630fe0de3
2015-02-17 13:24:59 +02:00
Amir E. Aharoni 26763e7731 [BrowserTest] Fix ParenthesesAsGroupedExpression Rubocop failures
Change-Id: I7a6fbe0aefdd9abe3b0e7c42cc372487255f581b
2015-02-17 13:24:52 +02:00
Amir E. Aharoni 5a715d05ad [BrowserTest] Remove an empty line to make Rubocop pass
Change-Id: I110fef0f98ee7a2c5b74971b1e068bca0869e912
2015-02-17 10:20:12 +00:00
Amir E. Aharoni c37fe8fe5e [BrowserTest] Move screenshot taking functionality to a gem
* Screenshot taking logic and rspec tests are deleted from this repo
  and moved to
  https://rubygems.org/gems/screenshot
* Dependency on chunky_png is removed from VisualEditor
  (and added to the screenshot gem).
* The method calls are renamed accordingly.

Change-Id: I6a0e2cc770a07f36f63bc536db109b63d38a4fd2
2015-02-17 09:57:44 +00:00
jenkins-bot 2e9080c063 Merge "[BrowserTest] Remove most exceptions from .rubocop_todo.yml" 2015-02-17 09:43:27 +00:00
Roan Kattouw ee886cd8f8 ce.MWTransclusionNode: Protect against race condition in GCN rendering
If an MWTransclusionNode is inserted, then immediately modified,
a race condition can occur where the GCN rendering arrives for the old
node, which is already detached and doesn't have a ModelHtmlDocument
any more. Protect against this happening so we don't cause a JS error
by passing null for the document parameter to ve.resolveUrl()

Change-Id: I1964baa3a9b294b130620e9b34a695584fc55143
2015-02-16 19:21:00 -08:00
James D. Forrester 3558334262 Update VE core submodule to master (e56418a)
New changes:
a883ed5 Localisation updates from https://translatewiki.net.
e56418a Native backspace and delete

Change-Id: Ic3cc6b362915024e79c0bd9e523a59c3b1006049
2015-02-16 18:33:48 -08:00
jenkins-bot 13a978d413 Merge "Correct the license URL in the media dialog" 2015-02-16 23:29:08 +00:00
Moriel Schottlender a06df576b3 Correct the license URL in the media dialog
The license url read the response object instead of the response
value itself.

Bug: T89544
Change-Id: Ibb22e47e0097e012279e21211e1c7e2f1545f2b1
2015-02-16 14:49:12 -08:00
Translation updater bot e12431efbf Localisation updates from https://translatewiki.net.
Change-Id: I234c89aa7c844f248f30bd531a3688bbcee9bbe3
2015-02-16 21:58:33 +01:00
Roan Kattouw 9a4c192c44 Update VE core submodule to master (f86c97c)
New changes:
e325520 Create APIResultsProvider and APIResultsQueue and add tests
4ead645 Make newFromAnnotation test construct doc2 from data, not HTML
804fb17 Remove useless getDataElementFromDomElement / getDomElementsFromDataElement tests
c2fc6a0 DomFromModelTest: Call modify() on the document, not the data
1535331 Inline ve.ce.View#renderAttributes

Local changes:
Update modify callbacks to work on document instead of data.

Change-Id: Ia875d11627adc38f78dd5010f9ab03e8b083b448
2015-02-16 11:44:34 -08:00
jenkins-bot 28daf3f65a Merge "Fix clipboard DM for transclusion nodes starting with invisible tags" 2015-02-16 18:42:12 +00:00
jenkins-bot 387bc2d794 Merge "Correctly tag clipboard DM from MWTransclusionNodes" 2015-02-16 18:27:01 +00:00
jenkins-bot 93f7a41017 Merge "Update VE core submodule to master (331116b)" 2015-02-16 18:23:39 +00:00