Commit graph

9233 commits

Author SHA1 Message Date
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
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
Ed Sanders 7ff516d76c Fix clipboard DM for transclusion nodes starting with invisible tags
<link> and <meta> tags are thrown away by the clipboard so make sure the
data-mw element is converted to a span.

Bug: T86401
Change-Id: Ia2869b9496ea5ce4f474e254bb4125f85152c7cf
2015-02-16 16:52:07 +00:00
Ed Sanders ec4acecf33 Correctly tag clipboard DM from MWTransclusionNodes
Iff in clipboard mode:
* Set data-ve-no-generated-contents on the main element
  regardless of whether we are using orignal DOM elements.
* Set data-ve-ignore on siblings, again, regardless or
  where they came from.

Bug: T89658
Change-Id: I82ad60f0b90e0c6ce88c42737bd36d1a289bcf34
2015-02-16 16:52:04 +00:00
Alex Monk 7475141a2c Don't try to get X-Cache header if it's not set
It's set if Parsoid is behind Varnish, and this was fine until I2342fa5b

Change-Id: I4480506bf1393c4c02a10377a5269a5c85cbf23d
2015-02-16 01:13:54 +00:00
James D. Forrester 284a6f838b Update VE core submodule to master (331116b)
New changes:
a497abe IMETests: Group them with CE tests again
586e443 Preserve nodes better during IME tests
2891dc6 Use node type constants in ve.ce.getDomHash
6a6a7d4 Ignore block slugs in ve.ce.getHash
842dfdb ve.utils: Cover insertIntoArray with unit test
1f020df ve.utils: Clean up escapeHtml
8e28f84 Localisation updates from https://translatewiki.net.
ab568e6 Fix typos in ve.dm.example.js

Change-Id: Id895b0035ee7dbdc9726dbda99383395aaf8b457
2015-02-15 14:14:05 -08:00
jenkins-bot f64b977eeb Merge "Rename test modules to stop confusing QUnit" 2015-02-14 00:23:04 +00:00
Roan Kattouw 3528aeb8d3 Rename test modules to stop confusing QUnit
Some modules had the same name as test modules in VE core,
and this broke expand/collapse behavior in QUnit.

Change-Id: I7fd0b454b3377b7c289ddebbf91146fcbe5945c4
2015-02-13 16:12:03 -08:00
Translation updater bot dd599c5ae3 Localisation updates from https://translatewiki.net.
Change-Id: I7740a73a2a5b1efbfb99d5abf73ef13a85fb5850
2015-02-13 22:23:04 +01:00
jenkins-bot e738abff3f Merge "Move svgMaxSize and namespacesWithSubpages to site config" 2015-02-13 18:44:25 +00:00
Moriel Schottlender d1ff9e125e Make sure category widget methods call parent class methods
Mouseover and click events in the category widget should also call
their parent method.

Depends on the ooui change Ie576f4422

Change-Id: I73b574b28a5a60e4f046f3008407dbf4b1323b58
2015-02-13 18:29:20 +00:00
Timo Tijhof 5bf0ac251a Move svgMaxSize and namespacesWithSubpages to site config
These are currently in page-specific mw.config. As these are
not related any page, they should be in the global export.

This is needed to have our tests (and code base) run error-free
without a MediaWiki page.

Bug: T89434
Change-Id: Ic42bcd14028772ff0c06e28c76ffaf156f8b985f
2015-02-13 08:20:26 +00:00
Translation updater bot d5530b87ff Localisation updates from https://translatewiki.net.
Change-Id: I3bf03d302d3731c98ce7f0c94a534e4f7510f231
2015-02-12 21:37:41 +01:00
Cmcmahon df1013b7da [BrowserTest] Remove unused steps and locators
No more iframes

Change-Id: I3d6420f2a017a132d5695921daa5efb5117f3176
2015-02-12 11:53:58 -07:00
Cmcmahon 5d03721bb7 [BrowserTest] Update transclusion test for better locator
Also remove unused step and element

Change-Id: If99cde6a3ec1f0fb87628e5d8600a83034e11ee1
2015-02-12 11:27:40 -07:00
Cmcmahon 7d3e8a8ac5 [BrowserTest] Cite message no longer in iframe
Change-Id: I027bf87c0eb91edb7dc6218c3bc8f66a8c1aa69e
2015-02-12 10:54:02 -07:00
jenkins-bot eaddd87020 Merge "Defend against empty file pages in media dialog search" 2015-02-12 17:01:23 +00:00
Trevor Parscal a65148d69e Update VE core submodule to master (9240a51)
New changes:
50ccb23 Localisation updates from https://translatewiki.net.
9240a51 Update OOjs UI to v0.7.0

Local changes:
* MWTemplateDialog: Stop waiting for removed loading promise to
  finish, as in OOjs UI I2bfa013 the loading promise is removed
  since iframes were the only reason we needed it.

Change-Id: I1500f480d40d06e417366014b9c2a76f7ce9c29b
2015-02-11 16:50:45 -08:00
Moriel Schottlender 65d0a9d7e7 Defend against empty file pages in media dialog search
Empty file pages are returned as results in search but have no
useful information, and, more importantly, no 'imageinfo' property.
Make sure these are skipped by the provider.

Bug: T89303
Change-Id: I3374f7373efc1f5751acb16819973594abf56a56
2015-02-11 23:23:38 +00:00
jenkins-bot 0d3bd68431 Merge "Display image uploader and artist correctly in the media dialog" 2015-02-11 21:50:17 +00:00