Commit Graph

20 Commits (a18d94099e76232454ed3feefa837cfe8da532ab)

Author SHA1 Message Date
Mark Haines 6ccc825f0d Cache the tinted SVGs for MFileBody as data URLs (#559)
* Use a list of callbacks for things that need tinting.

Rather than gutwrenching the internals of TintableSVG inside the Tinter.

* Share a data: url for the tinted download svg in MFileBody

* Check image exists before tinting

* Add comments

* Use fetch+DomParser rather than XMLHttpRequest

* Remove comment about XMLHttpRequest
2016-11-16 14:16:51 +00:00
Richard van der Hoff 6246fdee7c Fix room tinting
Looks like the cachebuster stuff in
https://github.com/vector-im/vector-web/pull/2515 broke room tinting. Add a
fix, along with some ranting.
2016-10-26 23:11:34 +01:00
Matthew Hodgson 1c1c31eafc fix tinter for LeftPanel 2016-09-16 02:53:41 +01:00
Matthew Hodgson 8db14bde60 switch Tinter from using dispatch to a synchronous update when changing the colourscheme, to avoid CSS getting out of sync with SVG colours 2016-04-16 01:00:10 +01:00
Matthew Hodgson 4d7eb5795c tint border-left 2016-02-18 00:32:46 +00:00
Matthew Hodgson 3fd7dff264 unbreak safari 2016-02-09 15:08:04 +00:00
Matthew Hodgson bb0051f24f fix another NPE; apparently some stylesheets don't have href attributes (wtf?) 2016-01-24 11:46:25 +00:00
Matthew Hodgson 28fddef5f9 only try to tint our CSS, otherwise random extensions which have inserted CSS may cause untrappable XSS SecurityErrors to throw 2016-01-23 19:46:00 +00:00
Matthew Hodgson 001b9ad7cc try to trap SecurityError exceptions for linux FFs who don't like you calling .contentDocument on an SVG (assuming that's where the error comes from) 2016-01-23 18:59:37 +00:00
Matthew Hodgson add8ef3c59 trap for ss.cssRules mysteriously returning null 2016-01-22 19:59:41 +00:00
Matthew Hodgson 161cdef36e tint bottom borders 2016-01-20 17:24:09 +00:00
Matthew Hodgson 27d72fb1dc tint Dave's read-up-to marker 2016-01-09 01:05:43 +00:00
Matthew Hodgson ef00a1624d fix up RoomSettings somewhat and implement room colors 2016-01-08 03:22:38 +00:00
Matthew Hodgson 296b626ed9 oops, we actually need to cache the fixups in TintableSvg 2016-01-07 03:59:09 +00:00
Matthew Hodgson 0f52c0a514 make TintableSvgs responsible for updating their own tints, and stop storing SVG DOM fragments in Tinter to avoid leaking them 2016-01-07 03:39:00 +00:00
Matthew Hodgson 8c1bb90347 add fixme 2016-01-06 02:41:10 +00:00
Matthew Hodgson f499c60b12 sundry PR feedback 2016-01-06 02:29:08 +00:00
Matthew Hodgson 509ea7c4f3 factor out tintable SVGs into their own component, and use plain DOM onload rather than react synthetic events 2016-01-06 02:11:07 +00:00
Matthew Hodgson 001dc8612b support fixing up dynamically loaded SVGs 2016-01-05 03:34:52 +00:00
Matthew Hodgson 555abdae30 wire up Tinter.js 2016-01-05 00:46:52 +00:00