DescriptionRemove 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. #
Messages
Total messages: 12 (2 generated)
|