Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(51)

Issue 715633006: Remove FontDescriptionChangeScope, and let FontBuilder partially apply values. (Closed)

Created:
6 years, 1 month ago by andersr
Modified:
5 years, 10 months ago
Reviewers:
dglazkov, rune
CC:
blink-reviews, blink-reviews-css, ed+blinkwatch_opera.com, dglazkov+blink, apavlov+blink_chromium.org, darktears, rwlbuis
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Target Ref:
refs/heads/master
Project:
blink
Visibility:
Public.

Description

Remove FontDescriptionChangeScope, and let FontBuilder partially apply values. FontBuilder is now so simple that we don't need a scoped object to keep track of changes to the FontDescription. This patch adds a PropertySetFlag for each property on FontBuilder/FontDescription, such that we only write the touched values to the output FontDescription. Hence, the FontDescription we base the output FontDescription on is provided at the time of FontBuilder::createFont, rather than during FontBuilder construction. This has the benefit of callers not having to update FontBuilder's FontDescription whenever the FontDescription of the output RenderStyle changes, as we currently have to do in e.g. StyleResolverState::setStyle. Notes: * Calculating the specified size from a keyword size has been delayed to createFont, since it depends on the font family. * Re-calculating the specified size from a keyword is no longer necessary in setFamilyDescription. * The parent style is no longer passed to the FontBuilder, because the parent FontDescription is effectively available through the current RenderStyle at the time of createFont. * Removed unused FontBuilder::inheritFrom. * Changed FontBuilder::checkForOrientationChange (now updateOrientation), to always update the flags. Not doing so just adds extra comparisons, even before this patch. R=dglazkov@chromium.org Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=189488

Patch Set 1 #

Patch Set 2 : Rebase. (Added fontDirty check in createAnimatableValueSnapshot). #

Patch Set 3 : Use partial Font building. #

Patch Set 4 : Fix size/family ordering. #

Total comments: 5

Patch Set 5 : Rebase. #

Patch Set 6 : Remove bool params from didChange*. #

Patch Set 7 : IsSetFlag -> PropertySetFlag. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+317 lines, -127 lines) Patch
M Source/core/core.gypi View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M Source/core/css/resolver/FontBuilder.h View 1 2 3 4 5 6 4 chunks +31 lines, -24 lines 0 comments Download
M Source/core/css/resolver/FontBuilder.cpp View 1 2 3 4 5 6 8 chunks +89 lines, -86 lines 0 comments Download
A Source/core/css/resolver/FontBuilderTest.cpp View 1 2 3 1 chunk +166 lines, -0 lines 0 comments Download
M Source/core/css/resolver/StyleResolver.cpp View 1 2 3 4 5 5 chunks +4 lines, -6 lines 0 comments Download
M Source/core/css/resolver/StyleResolverState.h View 1 2 3 4 5 2 chunks +21 lines, -5 lines 0 comments Download
M Source/core/dom/Document.cpp View 1 2 3 4 1 chunk +0 lines, -1 line 0 comments Download
M Source/platform/fonts/FontDescription.h View 1 2 3 4 1 chunk +5 lines, -5 lines 0 comments Download

Messages

Total messages: 12 (2 generated)
dglazkov
lgtm
6 years, 1 month ago (2014-11-18 15:37:02 UTC) #1
andersr
PTAL when you return. Description updated. (Warning: Patch #3/4 is quite different from #1/#2). Had ...
6 years ago (2014-12-18 13:01:59 UTC) #2
andersr
@rune, summary: * Yes, this makes FontBuilder more complicated, but: * Much less FontDescription creation/copying ...
5 years, 10 months ago (2015-02-03 11:44:24 UTC) #4
rune
https://codereview.chromium.org/715633006/diff/60001/Source/core/css/resolver/FontBuilder.h File Source/core/css/resolver/FontBuilder.h (right): https://codereview.chromium.org/715633006/diff/60001/Source/core/css/resolver/FontBuilder.h#newcode48 Source/core/css/resolver/FontBuilder.h:48: void didChangeWritingMode(bool); I would have removed the bool parameters ...
5 years, 10 months ago (2015-02-03 12:25:40 UTC) #5
andersr
https://codereview.chromium.org/715633006/diff/60001/Source/core/css/resolver/FontBuilder.h File Source/core/css/resolver/FontBuilder.h (right): https://codereview.chromium.org/715633006/diff/60001/Source/core/css/resolver/FontBuilder.h#newcode48 Source/core/css/resolver/FontBuilder.h:48: void didChangeWritingMode(bool); On 2015/02/03 12:25:40, rune wrote: > I ...
5 years, 10 months ago (2015-02-03 15:35:08 UTC) #6
rune
On 2015/02/03 15:35:08, andersr wrote: > https://codereview.chromium.org/715633006/diff/60001/Source/core/css/resolver/FontBuilder.h > File Source/core/css/resolver/FontBuilder.h (right): > > https://codereview.chromium.org/715633006/diff/60001/Source/core/css/resolver/FontBuilder.h#newcode48 > ...
5 years, 10 months ago (2015-02-03 21:52:35 UTC) #7
andersr
On 2015/02/03 21:52:35, rune wrote: > On 2015/02/03 15:35:08, andersr wrote: > > > https://codereview.chromium.org/715633006/diff/60001/Source/core/css/resolver/FontBuilder.h ...
5 years, 10 months ago (2015-02-04 09:06:43 UTC) #8
rune
lgtm
5 years, 10 months ago (2015-02-04 09:32:26 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/715633006/120001
5 years, 10 months ago (2015-02-04 10:16:58 UTC) #11
commit-bot: I haz the power
5 years, 10 months ago (2015-02-04 11:49:20 UTC) #12
Message was sent while issue was closed.
Committed patchset #7 (id:120001) as
https://src.chromium.org/viewvc/blink?view=rev&revision=189488

Powered by Google App Engine
This is Rietveld 408576698