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

Review URL: https://codereview.chromium.org/715633006

git-svn-id: svn://svn.chromium.org/blink/trunk@189488 bbb929c8-8fbe-4397-9dbb-9b2b20218538
8 files changed
tree: d37d3a50241b151674b5c1cb13e5853d6512b8da
  1. third_party/