Commit graph

1862 commits

Author SHA1 Message Date
Rob Moen c656f831d1 Bug 36200 - VisualEditor: Sticky selection popup
Clearing context icon when editor loses focus.
-Reproduce problem by selecting text, then click outside of
the editor.  Selection is lost, and context icon is stuck.

Change-Id: I4b321f16cea73ec0e51540c0e71f265ab47514e9
2012-07-26 16:34:51 -07:00
Gabriel Wicke 065bb50369 Merge "Rename data-rt to data-parsoid" 2012-07-26 22:48:56 +00:00
GWicke 96c9d4cb67 Merge "Minor: trace output tweak + code refactoring" 2012-07-26 22:45:49 +00:00
Gabriel Wicke cd6f8ecbbe Fix parserTests include paths
The recent directory move broke parserTests, fix it for now. Will need
refixing once me migrate to our own repo.

Change-Id: I014001cd6904d1dea3f9417c9cde9c80ab079232
2012-07-26 15:42:22 -07:00
Gabriel Wicke 72c5efedb8 Rename data-rt to data-parsoid
* Quite unique according to google, and more obvious
* Also adjust parserTests to ignore mw:Nowiki and mw:Placeholder spans

Change-Id: I340e85092b60a65b4053a40bf8c238e26cb49c96
2012-07-26 15:27:32 -07:00
Catrope 0a8fc3838d Merge "Code and comment cleanup in the ve module" 2012-07-26 20:50:11 +00:00
Subramanya Sastry 1d46cdae08 Minor: trace output tweak + code refactoring
Change-Id: Ic8f51749e84edb7741f5bcea467d647682ef1958
2012-07-26 15:43:02 -05:00
Trevor Parscal cd185cef1f Merge "Bug 38657 - VisualEditor: User should be able to select text in the save dialog." 2012-07-26 20:42:00 +00:00
GWicke f798c6048a Merge "First pass porting PHP's sanitizer to Parsoid" 2012-07-26 20:24:02 +00:00
Trevor Parscal 12d3afa85c Merge "(bug 37905) Make unlisting unlist all list levels" 2012-07-26 18:53:00 +00:00
Rob Moen 2ae174f805 Bug 38657 - VisualEditor: User should be able to select text in the save dialog.
- Attaching save dialog to toolbar wrapper vs toolbar itself.
- Attaching surface specific toolbar wrapper vs all toolbar wrappers
in the case of multiple editors on the page.

Change-Id: Ic81f5a680f5593c71c27b7d47fe246487eebd4a3
2012-07-26 11:47:11 -07:00
Trevor Parscal d12beec67b Code and comment cleanup in the ve module
Change-Id: Ifec72c3992db2ad222a1a89c5172d4089afd865b
2012-07-26 11:42:33 -07:00
Subramanya Sastry 25419d028a First pass porting PHP's sanitizer to Parsoid
* Ported attribute sanitization code (and related functions) from
  core/includes/Sanitizer.php
* Added dummy flags and set to true (use of rdfa, microdata attrs,
  and html5 mode).
* Removed couple whitelisted sanitizer tests.
* A few sanitizer tests now pass.
* More work to be done.

Change-Id: I19c92bbfcb57f3e97a7af1b7c5f63772e427dae4
2012-07-26 11:35:55 -05:00
Trevor Parscal b9af72e7e3 Merge "Switching to localStorage for copy and paste, remove test" 2012-07-26 00:08:10 +00:00
Christian Williams 9723bf51e5 Switching to localStorage for copy and paste, remove test
Change-Id: I555b8756afb53680d60f2068b8615787c60e9d8f
2012-07-25 17:07:08 -07:00
Trevor Parscal 94c68e6c4b Merge "Bug 33088 - VisualEditor: Editing a part of text of a link doesn't work" 2012-07-25 23:51:51 +00:00
Rob Moen df0fa5159c Bug 33088 - VisualEditor: Editing a part of text of a link doesn't work
(or this shouldn't be allowed)

-Revised method for for returning all link annotations in a
selection.  Now properly clearning all selected links.

-Trimming whitespace from selection
-Modifying selection if it doesn't contain annotated range
-Disabled link creation only if target is blank.  This allows
Existing link text to be modified while having the same target.

Change-Id: I7255dcf1c88fa1cd6e7edbc3baa82cd4c72a95d1
2012-07-25 16:49:34 -07:00
Trevor Parscal c244efe1ac Merge "Fix position of context icons." 2012-07-25 23:41:12 +00:00
Catrope 1a573480f7 Moved text node test to the correct directory
Change-Id: I6c2146cd051e9e992e6a30a2d5f83d337d454387
2012-07-25 14:49:48 -07:00
Catrope 23e3726a04 Merge "Added the missing "Node" to alien dm class names" 2012-07-25 21:45:39 +00:00
Catrope e9cfdd0230 Merge "Move test files" 2012-07-25 21:43:08 +00:00
Rob Moen 277e0f8b86 Fix position of context icons.
-Added RL embed for images

Change-Id: Id92e3cfe31376e18a924acc983ab17a2bcca837a
2012-07-25 14:41:25 -07:00
Trevor Parscal c03c52e762 Merge "Fix bug in getCoveredSiblingGroups(): forgot to decrement i at the end" 2012-07-25 21:38:06 +00:00
Trevor Parscal 76bac7d152 Move test files
Change-Id: Id0a0bd5b4a91f702cad34e9f5e7f2121763abffd
2012-07-25 14:35:49 -07:00
Catrope 639c9c189c (bug 37905) Make unlisting unlist all list levels
This means that when unlisting (unwrapping) a list, all of its child
lists are unwrapped too.

Change-Id: I7456ddf289dc15a662a4e1fabdeae283d31cd311
2012-07-25 14:24:39 -07:00
Catrope ce84277287 Fix bug in getCoveredSiblingGroups(): forgot to decrement i at the end
Change-Id: Iaba268e01000ac5a7ccfc6dfe23db624408e5234
2012-07-25 14:22:22 -07:00
Trevor Parscal a5b7d6d7c7 Merge "Parsoid: move tests/parser to modules/parser/test" 2012-07-25 21:14:13 +00:00
Gabriel Wicke 63cdfdc2c7 Merge "Add generic attribute accessors" 2012-07-25 20:50:23 +00:00
Trevor Parscal a05381dce7 Merge "Inspector box shadow was a bit too dramatic, adjusted styles." 2012-07-25 19:50:29 +00:00
Trevor Parscal abe32945d1 Merge "Bug 38655 - VisualEditor: White box syndrome strikes back!" 2012-07-25 19:49:45 +00:00
Rob Moen 99ff0d5f6c Inspector box shadow was a bit too dramatic, adjusted styles.
Change-Id: Ie0f066f62b363df645c072ee174000991258574e
2012-07-25 12:47:04 -07:00
Rob Moen 5a41f77b99 Bug 38655 - VisualEditor: White box syndrome strikes back!
-Hide / show inspector with visibility vs display property
for iframe cross browser compatibility.

Change-Id: Ibdd0250872c42d74d6ff7d22abdf9d838962acc1
2012-07-25 12:40:56 -07:00
Trevor Parscal c88cc63b81 Merge "Restore arrow-down to original size because it is needed in context menu." 2012-07-25 19:33:16 +00:00
Trevor Parscal 565432d4aa Merge "Fix childNodeTypes for table" 2012-07-25 19:30:19 +00:00
Catrope 13ba9b7de8 (bug 37980) Cutting all text and repasting it breaks the editor
This was caused by a bug in fixupInsertion that caused it to believe
that inserting something like "a</p><p>b</p><p>c" into the middle of an
empty paragraph was invalid.

This commit fixes the fixupInsertion bug, which fixes the
select-all-cut-paste behavior in Chrome. It's still broken in Firefox
because of selection-related issues, but I'll split that out into a
different bug report.

Change-Id: I767f5d37ec7e511778ae9ca8283ec4b26c728298
2012-07-25 12:29:19 -07:00
Rob Moen 3c9a4e7027 Restore arrow-down to original size because it is needed in context menu.
Add element for arrow icon in dropdown tool and new css rules which
support RTL.

Change-Id: I4193f9cac7af7b84cf8400e9bdcbcb4967b57932
2012-07-25 12:18:51 -07:00
Gabriel Wicke e3af50ea68 Add generic attribute accessors
* addAttribute and getAttribute do the obvious and simple thing
* addNormalizedAttribute remembers an unnormalized version of an attribute and
  supports change detection for the normalized attribute
* getAttributeSource retrieves the original attribute if there was a
  normalized version which was not changed, or the current value (potentially
  based on the normalized version) otherwise. For use by the
  WikitextSerializer.

Change-Id: I72533cf6cfff1ddb88be2501653c7c47d270898c
2012-07-25 11:58:24 -07:00
Trevor Parscal f43eeac80e Added the missing "Node" to alien dm class names
Change-Id: Ia18d3ede612e2ab8054feb6d94d3587a605e47c2
2012-07-25 11:54:54 -07:00
Carl Fürstenberg dca609e3f9 Parsoid: move tests/parser to modules/parser/test
In preparation for the big extraction of Parsoid out of VisualEditor,
we'll start by moving the tests into the parsoid location.

Change-Id: I4a926ee4aad1490d4f769d44e91af80842b881f0
2012-07-25 02:29:25 +02:00
Gabriel Wicke c4e7544f60 Merge "Use various RDFa types for links" 2012-07-24 20:17:42 +00:00
GWicke dfe082a258 Merge "Added html2wt command-line option to parse.js" 2012-07-24 18:26:50 +00:00
Subramanya Sastry 01d6f17a3e Renamed ext.Util.js to mediawiki.Util.js
Change-Id: I909847686c8239a0b00cbaa9a0b1583826ee1487
2012-07-24 13:07:53 -05:00
Subramanya Sastry 85fb2ab9ed Addressed review comments from recently merged debug_output branch.
* Got rid of mergeProperties monkey-patch from core-upgrade.
* Reformatted class defns in mediawiki.parser.defines.js.
* Protected unconditional tokenization of list handler output with an
  env.trace check.
* Other minor formatting fixes to respect 80-100 column code width
  guideline.

Change-Id: Ida769e0e239b01a813b2d30a65aba60216262a43
2012-07-24 13:05:04 -05:00
Gabriel Wicke fe97271394 Use various RDFa types for links
* the used RDFa types for links are now identical to those listed in
  http://www.mediawiki.org/wiki/Parsoid/RDFa_vocabulary, and are supported for
  serialization
* Editors are responsible for adjusting the type when converting between link
  types. Adding a caption to an mw:UrlLink for example should convert it into
  an mw:ExtLink.

Update: rebased on top of trace patches

Change-Id: Ie1b882e2b3fbad08be94769e1167dccd8dfea65d
2012-07-24 10:59:31 -07:00
Gabriel Wicke 9aa22ca0e2 Implement plain image mw:Image and eliminate data-gen
* Source-based round-tripping now uses typeof="mw:Placeholder" instead of
  data-gen.
* mw:Image is supported for round-tripping, but not yet for modifications as
  it is still source-based

Change-Id: Ie5cf4e54de0163168c25c2b5c09380657a15970f
2012-07-24 10:55:12 -07:00
GWicke 8f2c82289a Merge changes Ife2f840b,I657b1f33,I9d6a03cc,Ib81f96b8,Ia7469b4f,I160ba0c4,I03ae705b,I8343e5c0,I3ab637b7,I50346029
* changes:
  Additional work on readable tokenizer debug output
  Added 'href' key to anonymous KV wikilink and isbn attribute.
  Removed utility functions from mediawiki.parser.environment
  Added utility methods to ext.Util.js
  Added missing var keyword
  In trace mode, wrap transform to output trace info
  Output chunk tokens to console only in trace mode
  Further refinement of readable pretty-printing of tokens.
  More fixes on the way to readable debug/trace output.
  Added mergeProperties function to Object.prototype
2012-07-24 17:01:17 +00:00
Subramanya Sastry ddc6899b1b Added html2wt command-line option to parse.js
* A quick way to see how a html fragment serializes
* Minor JSHint tweaks.

Change-Id: I901398ec15700905c53de6f39cde93400b2f964a
2012-07-24 10:30:44 -05:00
Catrope f3f7715553 Merge "(bug 38545) Fix RTL position of the drop-down arrow" 2012-07-24 02:32:43 +00:00
Amir E. Aharoni fd0af6541b (bug 38545) Fix RTL position of the drop-down arrow
In RTL interface the drop-down arrow overlaps with the text.

The arrow was positioned explicitly in relation to the left margin, and this
can't work in a flipped RTL environment. I changed the position to "right"
and modified the arrow image a bit.

Some visual tweaks to the arrow may still be needed. Another option can be
to convert the image to SVG or to use a character like ▼.

Change-Id: Ib09a2a20b150de6e8a9531fc0db7dfffe4e95525
2012-07-23 19:27:53 -07:00
Krinkle 0949c5b9df Merge "Remove trailing commas" 2012-07-24 02:16:14 +00:00