Last modified: 2014-08-25 16:56:08 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T53202, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 51202 - VisualEditor: Draw highlights using SVG polygons
VisualEditor: Draw highlights using SVG polygons
Status: ASSIGNED
Product: VisualEditor
Classification: Unclassified
ContentEditable (Other open bugs)
unspecified
All All
: High enhancement
: ---
Assigned To: Ed Sanders
:
Depends on:
Blocks: ve-performance
  Show dependency treegraph
 
Reported: 2013-07-11 21:54 UTC by Trevor Parscal
Modified: 2014-08-25 16:56 UTC (History)
4 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Trevor Parscal 2013-07-11 21:54:42 UTC
Shields/phantoms are currently recursively applying to protected elements and positioning additional elements inside them. This causes 2 major problems:

1. Very slow, the CSS selectors use * and adding and controlling all these elements takes a lot of time as well.

2. We are limited to a single rectangle per protected node, which for inline elements is especially problematic since they are meant to wrap.

Using getClientRect and getClientRects (for inline stuff) can give us bounding box information that we can then cache, and render polygon click blocks for using an SVG layer. SVG's pointer-events: none works across browsers (unlike using this property in HTML) so we can control which elements in the SVG rendering block or pass through.
Comment 1 Inez Korczyński 2013-07-11 22:05:20 UTC
@Trevor: Thanks for writing it down. I'm pretty excited about working on it. Btw. in the meantime, I'm working on shields/phantoms performance optimization here: https://gerrit.wikimedia.org/r/#/c/72113/
Comment 2 Ed Sanders 2014-08-25 16:56:08 UTC
We are now using getBoundingClientRect and getClientRects. The only part missing from this bug is to use SVG. We should investigate the performance benefits/losses of doing so.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links