New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 722393 link

Starred by 5 users

Issue metadata

Status: Fixed
Owner:
Closed: May 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Feature

Blocked on:
issue 722511



Sign in to add a comment

Add support for font rendering on OffscreenCanvas/Workers

Project Member Reported by fs...@chromium.org, May 15 2017

Issue description

This is a tracking bug for font rendering on OFC and OFC/Worker.

For Main thread OFC, it's as simple as updating the spec/IDL for OFCRenderingContext2D to support text rendering:
https://html.spec.whatwg.org/#the-offscreen-2d-rendering-context

but that depends on OFC/Worker working.

For that:
- add support for the FonfFace interface on Worker. It's already spec'ed out (even thought the spec is a bit outdated and could use an update: https://drafts.csswg.org/css-font-loading/#fontfacesource-workers)
- enable OFC/Worker font rendering

I'll create separate bugs for FontFace and text rendering, but I'll keep this as an overall tracking bug.


 

Comment 1 by fs...@chromium.org, May 15 2017

More subtasks:
- Add FontFaceSource interface to Document
- Add FontFaceSource/FontFaceSet to Workers
- Add FontFace to Worker

Comment 2 by fs...@chromium.org, May 15 2017

Blockedon: 722511
Project Member

Comment 4 by bugdroid1@chromium.org, Aug 1 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/77b3367ad5640838255d942a529ae48e6f67a389

commit 77b3367ad5640838255d942a529ae48e6f67a389
Author: Fernando Serboncini <fserb@chromium.org>
Date: Tue Aug 01 17:13:27 2017

Adds text rendering support for OffscreenCanvas

This allows OffscreenCanvas to render (and measure) builtin fonts on both 
Document and Worker contexts.

Bug:  722393 
Change-Id: Ic3ef2e64c27a1fa301b0df0053b7cdb5ae1408cc
Reviewed-on: https://chromium-review.googlesource.com/574644
Commit-Queue: Fernando Serboncini <fserb@chromium.org>
Reviewed-by: Justin Novosad <junov@chromium.org>
Cr-Commit-Position: refs/heads/master@{#491026}
[add] https://crrev.com/77b3367ad5640838255d942a529ae48e6f67a389/third_party/WebKit/LayoutTests/fast/canvas/OffscreenCanvas-text-rendering-expected.html
[add] https://crrev.com/77b3367ad5640838255d942a529ae48e6f67a389/third_party/WebKit/LayoutTests/fast/canvas/OffscreenCanvas-text-rendering-in-worker-expected.html
[add] https://crrev.com/77b3367ad5640838255d942a529ae48e6f67a389/third_party/WebKit/LayoutTests/fast/canvas/OffscreenCanvas-text-rendering-in-worker.html
[add] https://crrev.com/77b3367ad5640838255d942a529ae48e6f67a389/third_party/WebKit/LayoutTests/fast/canvas/OffscreenCanvas-text-rendering.html
[modify] https://crrev.com/77b3367ad5640838255d942a529ae48e6f67a389/third_party/WebKit/LayoutTests/http/tests/serviceworker/webexposed/global-interface-listing-service-worker-expected.txt
[modify] https://crrev.com/77b3367ad5640838255d942a529ae48e6f67a389/third_party/WebKit/LayoutTests/virtual/service-worker-navigation-preload-disabled/http/tests/serviceworker/webexposed/global-interface-listing-service-worker-expected.txt
[modify] https://crrev.com/77b3367ad5640838255d942a529ae48e6f67a389/third_party/WebKit/LayoutTests/virtual/service-worker-navigation-preload-disabled/webexposed/global-interface-listing-dedicated-worker-expected.txt
[modify] https://crrev.com/77b3367ad5640838255d942a529ae48e6f67a389/third_party/WebKit/LayoutTests/virtual/service-worker-navigation-preload-disabled/webexposed/global-interface-listing-expected.txt
[modify] https://crrev.com/77b3367ad5640838255d942a529ae48e6f67a389/third_party/WebKit/LayoutTests/virtual/service-worker-navigation-preload-disabled/webexposed/global-interface-listing-shared-worker-expected.txt
[modify] https://crrev.com/77b3367ad5640838255d942a529ae48e6f67a389/third_party/WebKit/LayoutTests/webexposed/global-interface-listing-dedicated-worker-expected.txt
[modify] https://crrev.com/77b3367ad5640838255d942a529ae48e6f67a389/third_party/WebKit/LayoutTests/webexposed/global-interface-listing-expected.txt
[modify] https://crrev.com/77b3367ad5640838255d942a529ae48e6f67a389/third_party/WebKit/LayoutTests/webexposed/global-interface-listing-shared-worker-expected.txt
[modify] https://crrev.com/77b3367ad5640838255d942a529ae48e6f67a389/third_party/WebKit/Source/modules/canvas2d/BaseRenderingContext2D.cpp
[modify] https://crrev.com/77b3367ad5640838255d942a529ae48e6f67a389/third_party/WebKit/Source/modules/canvas2d/BaseRenderingContext2D.h
[modify] https://crrev.com/77b3367ad5640838255d942a529ae48e6f67a389/third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2D.cpp
[modify] https://crrev.com/77b3367ad5640838255d942a529ae48e6f67a389/third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2D.h
[modify] https://crrev.com/77b3367ad5640838255d942a529ae48e6f67a389/third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2DState.cpp
[modify] https://crrev.com/77b3367ad5640838255d942a529ae48e6f67a389/third_party/WebKit/Source/modules/offscreencanvas2d/OffscreenCanvasRenderingContext2D.cpp
[modify] https://crrev.com/77b3367ad5640838255d942a529ae48e6f67a389/third_party/WebKit/Source/modules/offscreencanvas2d/OffscreenCanvasRenderingContext2D.h
[modify] https://crrev.com/77b3367ad5640838255d942a529ae48e6f67a389/third_party/WebKit/Source/modules/offscreencanvas2d/OffscreenCanvasRenderingContext2D.idl

Project Member

Comment 5 by bugdroid1@chromium.org, Aug 2 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/91f7231b54ddc5b7c967103ae7ba87053e6b49e7

commit 91f7231b54ddc5b7c967103ae7ba87053e6b49e7
Author: Fernando Serboncini <fserb@chromium.org>
Date: Wed Aug 02 20:15:20 2017

Add invalidation update methods to FontSelector

This is a simple refactor to allow more classes to accept FontSelector
instead of CSSFontSelector.
Most changes are due to s/FontSelector/GetFontSelector/ on StyleEngine.
This builds up ground so we can have a WorkerFontSelector.

Bug:  722393 
Change-Id: Ib4e891706d306a6fd5d4cf6d3ebb9567f4f8cbfb
Reviewed-on: https://chromium-review.googlesource.com/596675
Commit-Queue: Fernando Serboncini <fserb@chromium.org>
Reviewed-by: Justin Novosad <junov@chromium.org>
Cr-Commit-Position: refs/heads/master@{#491480}
[modify] https://crrev.com/91f7231b54ddc5b7c967103ae7ba87053e6b49e7/third_party/WebKit/Source/core/css/BUILD.gn
[modify] https://crrev.com/91f7231b54ddc5b7c967103ae7ba87053e6b49e7/third_party/WebKit/Source/core/css/CSSFontSelector.cpp
[modify] https://crrev.com/91f7231b54ddc5b7c967103ae7ba87053e6b49e7/third_party/WebKit/Source/core/css/CSSFontSelector.h
[delete] https://crrev.com/d68025ec1b431429a939e80cacceeae20dd9ff4a/third_party/WebKit/Source/core/css/CSSFontSelectorClient.h
[modify] https://crrev.com/91f7231b54ddc5b7c967103ae7ba87053e6b49e7/third_party/WebKit/Source/core/css/FontFace.cpp
[modify] https://crrev.com/91f7231b54ddc5b7c967103ae7ba87053e6b49e7/third_party/WebKit/Source/core/css/FontFaceSet.cpp
[modify] https://crrev.com/91f7231b54ddc5b7c967103ae7ba87053e6b49e7/third_party/WebKit/Source/core/css/resolver/FontBuilderTest.cpp
[modify] https://crrev.com/91f7231b54ddc5b7c967103ae7ba87053e6b49e7/third_party/WebKit/Source/core/css/resolver/ScopedStyleResolver.cpp
[modify] https://crrev.com/91f7231b54ddc5b7c967103ae7ba87053e6b49e7/third_party/WebKit/Source/core/css/resolver/StyleResolver.cpp
[modify] https://crrev.com/91f7231b54ddc5b7c967103ae7ba87053e6b49e7/third_party/WebKit/Source/core/dom/Document.cpp
[modify] https://crrev.com/91f7231b54ddc5b7c967103ae7ba87053e6b49e7/third_party/WebKit/Source/core/dom/StyleEngine.cpp
[modify] https://crrev.com/91f7231b54ddc5b7c967103ae7ba87053e6b49e7/third_party/WebKit/Source/core/dom/StyleEngine.h
[modify] https://crrev.com/91f7231b54ddc5b7c967103ae7ba87053e6b49e7/third_party/WebKit/Source/core/html/forms/InternalPopupMenu.cpp
[modify] https://crrev.com/91f7231b54ddc5b7c967103ae7ba87053e6b49e7/third_party/WebKit/Source/core/layout/svg/LayoutSVGInlineText.cpp
[modify] https://crrev.com/91f7231b54ddc5b7c967103ae7ba87053e6b49e7/third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2D.cpp
[modify] https://crrev.com/91f7231b54ddc5b7c967103ae7ba87053e6b49e7/third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2DState.cpp
[modify] https://crrev.com/91f7231b54ddc5b7c967103ae7ba87053e6b49e7/third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2DState.h
[modify] https://crrev.com/91f7231b54ddc5b7c967103ae7ba87053e6b49e7/third_party/WebKit/Source/platform/BUILD.gn
[modify] https://crrev.com/91f7231b54ddc5b7c967103ae7ba87053e6b49e7/third_party/WebKit/Source/platform/fonts/FontSelector.h
[add] https://crrev.com/91f7231b54ddc5b7c967103ae7ba87053e6b49e7/third_party/WebKit/Source/platform/fonts/FontSelectorClient.h
[modify] https://crrev.com/91f7231b54ddc5b7c967103ae7ba87053e6b49e7/third_party/WebKit/Source/platform/testing/FontTestHelpers.cpp

Project Member

Comment 6 by bugdroid1@chromium.org, Aug 8 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/87b9c7ab5e1cdab66efd8cd1668fef9040bc1add

commit 87b9c7ab5e1cdab66efd8cd1668fef9040bc1add
Author: Fernando Serboncini <fserb@chromium.org>
Date: Tue Aug 08 20:48:39 2017

Allows GenericFontFamilySettings resolution outside main thread

We now keep a global copy of GFFsettings that is copied to each thread.
This allow for global FontCache resolution, while still keeping the
the current behavior.

Bug:  722393 
Change-Id: Ic2ea5d7c1250cb99ea32936e13be0033e62f1a9b
Reviewed-on: https://chromium-review.googlesource.com/583773
Commit-Queue: Fernando Serboncini <fserb@chromium.org>
Reviewed-by: Koji Ishii <kojii@chromium.org>
Reviewed-by: Jeremy Roman <jbroman@chromium.org>
Reviewed-by: Justin Novosad <junov@chromium.org>
Cr-Commit-Position: refs/heads/master@{#492747}
[modify] https://crrev.com/87b9c7ab5e1cdab66efd8cd1668fef9040bc1add/third_party/WebKit/LayoutTests/fast/canvas/OffscreenCanvas-text-rendering-in-worker-expected.html
[modify] https://crrev.com/87b9c7ab5e1cdab66efd8cd1668fef9040bc1add/third_party/WebKit/LayoutTests/fast/canvas/OffscreenCanvas-text-rendering-in-worker.html
[modify] https://crrev.com/87b9c7ab5e1cdab66efd8cd1668fef9040bc1add/third_party/WebKit/Source/core/css/BUILD.gn
[modify] https://crrev.com/87b9c7ab5e1cdab66efd8cd1668fef9040bc1add/third_party/WebKit/Source/core/css/CSSFontSelector.cpp
[add] https://crrev.com/87b9c7ab5e1cdab66efd8cd1668fef9040bc1add/third_party/WebKit/Source/core/css/OffscreenFontSelector.cpp
[add] https://crrev.com/87b9c7ab5e1cdab66efd8cd1668fef9040bc1add/third_party/WebKit/Source/core/css/OffscreenFontSelector.h
[modify] https://crrev.com/87b9c7ab5e1cdab66efd8cd1668fef9040bc1add/third_party/WebKit/Source/core/workers/WorkerGlobalScope.cpp
[modify] https://crrev.com/87b9c7ab5e1cdab66efd8cd1668fef9040bc1add/third_party/WebKit/Source/core/workers/WorkerSettings.cpp
[modify] https://crrev.com/87b9c7ab5e1cdab66efd8cd1668fef9040bc1add/third_party/WebKit/Source/core/workers/WorkerSettings.h
[modify] https://crrev.com/87b9c7ab5e1cdab66efd8cd1668fef9040bc1add/third_party/WebKit/Source/modules/offscreencanvas2d/OffscreenCanvasRenderingContext2D.cpp
[modify] https://crrev.com/87b9c7ab5e1cdab66efd8cd1668fef9040bc1add/third_party/WebKit/Source/modules/offscreencanvas2d/OffscreenCanvasRenderingContext2D.h
[modify] https://crrev.com/87b9c7ab5e1cdab66efd8cd1668fef9040bc1add/third_party/WebKit/Source/platform/BUILD.gn
[add] https://crrev.com/87b9c7ab5e1cdab66efd8cd1668fef9040bc1add/third_party/WebKit/Source/platform/fonts/FontSelector.cpp
[modify] https://crrev.com/87b9c7ab5e1cdab66efd8cd1668fef9040bc1add/third_party/WebKit/Source/platform/fonts/FontSelector.h
[modify] https://crrev.com/87b9c7ab5e1cdab66efd8cd1668fef9040bc1add/third_party/WebKit/Source/platform/fonts/GenericFontFamilySettings.cpp
[modify] https://crrev.com/87b9c7ab5e1cdab66efd8cd1668fef9040bc1add/third_party/WebKit/Source/platform/fonts/GenericFontFamilySettings.h

Project Member

Comment 7 by bugdroid1@chromium.org, Aug 10 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/70b0521dbebecd7f2bf132786b5480c1ef4f59da

commit 70b0521dbebecd7f2bf132786b5480c1ef4f59da
Author: Fernando Serboncini <fserb@chromium.org>
Date: Thu Aug 10 00:44:17 2017

WorkerGlobalContext now has a font selector

CRCHost now exposes FontSelector.
OffscreenFontSelector now updates its font settings (as oppose 
to use a created one)

Bug:  722393 
Change-Id: I1032b75dbb8bdc1246fb0cd8d3b13ba9da324d42
Reviewed-on: https://chromium-review.googlesource.com/609107
Reviewed-by: Justin Novosad <junov@chromium.org>
Commit-Queue: Fernando Serboncini <fserb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#493192}
[modify] https://crrev.com/70b0521dbebecd7f2bf132786b5480c1ef4f59da/third_party/WebKit/Source/core/css/OffscreenFontSelector.cpp
[modify] https://crrev.com/70b0521dbebecd7f2bf132786b5480c1ef4f59da/third_party/WebKit/Source/core/css/OffscreenFontSelector.h
[modify] https://crrev.com/70b0521dbebecd7f2bf132786b5480c1ef4f59da/third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp
[modify] https://crrev.com/70b0521dbebecd7f2bf132786b5480c1ef4f59da/third_party/WebKit/Source/core/html/HTMLCanvasElement.h
[modify] https://crrev.com/70b0521dbebecd7f2bf132786b5480c1ef4f59da/third_party/WebKit/Source/core/html/canvas/CanvasRenderingContextHost.h
[modify] https://crrev.com/70b0521dbebecd7f2bf132786b5480c1ef4f59da/third_party/WebKit/Source/core/offscreencanvas/OffscreenCanvas.cpp
[modify] https://crrev.com/70b0521dbebecd7f2bf132786b5480c1ef4f59da/third_party/WebKit/Source/core/offscreencanvas/OffscreenCanvas.h
[modify] https://crrev.com/70b0521dbebecd7f2bf132786b5480c1ef4f59da/third_party/WebKit/Source/core/workers/WorkerGlobalScope.cpp
[modify] https://crrev.com/70b0521dbebecd7f2bf132786b5480c1ef4f59da/third_party/WebKit/Source/core/workers/WorkerGlobalScope.h
[modify] https://crrev.com/70b0521dbebecd7f2bf132786b5480c1ef4f59da/third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2D.cpp
[modify] https://crrev.com/70b0521dbebecd7f2bf132786b5480c1ef4f59da/third_party/WebKit/Source/modules/offscreencanvas2d/OffscreenCanvasRenderingContext2D.cpp
[modify] https://crrev.com/70b0521dbebecd7f2bf132786b5480c1ef4f59da/third_party/WebKit/Source/modules/offscreencanvas2d/OffscreenCanvasRenderingContext2D.h

Comment 8 by fs...@chromium.org, May 24 2018

Status: Fixed (was: Started)

Sign in to add a comment