Live data from Hacker News

Google Docs will now use canvas based rendering

workspaceupdates.googleblog.com

261–270 of 953 posts

Re: Google Docs will now use canvas based rendering

#261
post #246

Earlier quoted context omitted.

Pi-hole wont protect you here, they will send the entire page, ads and all as an encrypted binary blob. Decrypting it is illegal, and since the data is coming from a single source Pi-hole can't block it. Pi-hole (and ad-blocking) days are numbered. Hopefully that day is further out than I dread.

Wait, how is decrypting the WASM blob illegal?

I should have chosen my words more carefully, but the blobs with ads will have some sort of DRM on them, which is technically illegal to decrypt and cut out.

Re: Google Docs will now use canvas based rendering

#262

I think this is actually one of the few cases where canvas-based rendering makes sense as a replacement for the DOM. Docs is a full-featured application which already has to re-implement a lot of DOM-like features in order to fulfill its primary function (things like text formatting and layout, spell checking, etc). Doing it all in canvas doesn't sound significantly more difficult than what they're already doing. The…

> We're certainly not there yet though.

Won’t it be too late when we are there?

Re: Google Docs will now use canvas based rendering

#263
post #17

Maybe because I am out of loop with web development, but this sounds like a huge change to me. So instead of HTML elements, there will be just one big element, and everything will be rendered there? How will text selection work for example? Will Google Docs basically implement a GUI library like GTK, which renders everything itself, but for the web?

I think they already have with Flutter

This tech is called CanvasKit, and it scares the shit out of me. Google has, in this case, carefully written a proprietary custom API to take the role of Web Extensions (albeit with far more controls/restrictions/less flexibility) for Docs, but as more and more web properties switch to using Flutter with CanvasKit, we'll see less and less of the web be hypertext, less of the web be scrapeable, less of the web have good accessibility, less of the web be able to use extensions.

To me, pushing pixels in people's faces is not the web. The web implies hypertext, the web implies user-agents that fulfill the user's desired agencies. Developers switching to Canvas obstructs everything good, unique, & empowering about the web, converts it to the same terrible awful anti-user mess that everything else in tech is.

Re: Google Docs will now use canvas based rendering

#264

I don't build extensions or work on much front end web lately but this reads like Google wants more control over their stuff. The web is becoming less open. > By moving away from HTML-based rendering to a canvas-based rendering, some Chrome extensions may not function as intended on docs.google.com and may need to be updated. > If you are building your own integrations with Google Docs, we recommend using Google Work…

>Google wants more control over their stuff. The web is becoming less open.

That's because the old problem "web-document vs web-application" hasn't been solved properly. HTML was designed for documents. It wasn't designed for applications. No wonder as applications become more sophisticated they try to squeeze out HTML/DOM where possible.

Re: Google Docs will now use canvas based rendering

#266

This reminds me a lot of those websites that used to be implemented in Flash. It's just one giant opaque blob that gets downloaded and can do whatever it wants. When this stuff inevitably starts being used by every news and shopping website I wonder how search engines will be able to index it.

Does not make much sense. If search engines can't index it, no news website will do it.

If news websites can use this to bypass ad blockers then it might still be worthwhile, and I imagine a lot of traffic comes from social media sites these days.

Re: Google Docs will now use canvas based rendering

#267

Earlier quoted context omitted.

And all the problems solved by HTML and CSS will be new again, there will be many new incompatible frameworks for handling layout and styling, a blinking cursor will again take 200x the CPU it should to implement. Ugh.

I for one would welcome the death of HTML and CSS. Unfortunately I suspect they will merely be re-used for this.

I don't, we are going to have hundreds of different accessibility and IME implementations, all with different quirks and bugs and many websites won't care at all so even writing letters with accents will be a hassle (if possible at all). Or think about websites assuming your keyboard layout is US QWERTY. Or websites not properly handling subpixel rendering or retina displays (and looking upscaled and blurry). Those are all solved problems with HTML and CSS that will have to be solved again, this time not by 3 rendering engine dev teams but by each web dev for each website.

Re: Google Docs will now use canvas based rendering

#268
post #180
post #129

Earlier quoted context omitted.

Or through scripting

Assuming they allow you programmatic access to the elements inside their binary blob rendered in the canvas. My bet is they won't.

They couldn't stop you: either the interaction is handled in JS (in which case you can programmatically call the JS) or it is handled in WASM (in which case the interaction is actually still handled in JS, and exposed WASM functions are called).

In neither case can programmability be blocked.

Re: Google Docs will now use canvas based rendering

#269

Earlier quoted context omitted.

And all the problems solved by HTML and CSS will be new again, there will be many new incompatible frameworks for handling layout and styling, a blinking cursor will again take 200x the CPU it should to implement. Ugh.

I for one would welcome the death of HTML and CSS. Unfortunately I suspect they will merely be re-used for this.

Why? They are the best layouting tools we have to this day. Or do you want to go back to

  TextElement textElement = new TextElement(); 
  textElement.position(100, 100);
  textElement.color(Colors.RED);
  textElement.alignment(Alignment.CENTER);
  ...

and the likes? These kind of descriptional ui tools are horrible in my opinion.

Re: Google Docs will now use canvas based rendering

#270
post #103
post #99

Ever since WebAssembly was first introduced, I thought it was obvious[1][2] that the end game for those that want to control the web is sending opaque binary blobs of code that only use the browser for the canvas tag's framebuffer. Font rendering and layout can all easily be accomplished by embedding libraries like freetype. This breaks all forms of user control - like ad blockers - and turns the web back into cable…

It's a bad thing in terms of openness but a good thing in terms of performance and making web applications more like real desktop applications. A lot of DOM work is a nightmare, so I sort of welcome to the Canvas based approach.

> making web applications more like real desktop applications

You mean, abandoning web applications and migrating to network-delivered desktop applications?

Because nothing 'web' remains about them: no HTML, no links, no open standards.

Post reply on HN