angular-cn/tools
Miško Hevery 9bd9590767 refactor(ivy): change styling to use programmatic API on updates (#34804)
Previously we would write to class/style as strings `element.className` and `element.style.cssText`. Turns out that approach is good for initial render but not good for updates. Updates using this approach are problematic because we have to check to see if there was an out of bound write to style and than perform reconciliation. This also requires the browser to bring up CSS parser which is expensive.

Another problem with old approach is that we had to queue the DOM writes and flush them twice. Once on element advance instruction and once in `hostBindings`. The double flushing is expensive but it also means that a directive can observe that styles are not yet written (they are written after directive executes.)

The new approach uses `element.classList.add/remove` and `element.style.setProperty/removeProperty` API for updates only (it continues to use `element.className` and `element.style.cssText` for initial render as it is cheaper.) The other change is that the styling changes are applied immediately (no queueing). This means that it is the instruction which computes priority. In some circumstances it may result in intermediate writes which are than overwritten with new value. (This should be rare)

Overall this change deletes most of the previous code and replaces it with new simplified implement. The simplification results in code savings.

PR Close #34804
2020-01-24 12:23:19 -08:00
..
brotli-cli build: switch to @build_bazel_rules_nodejs//:index.bzl load point (#33433) 2019-10-28 10:10:48 -07:00
browsers build: fixes for cross-platform RBE (#33708) 2019-11-15 10:49:55 -08:00
build build: remove obsolete build related tools and helper scripts (#34058) 2019-12-02 10:52:21 -08:00
circular_dependency_test build: create bazel marco to test for circular dependencies (#34774) 2020-01-23 11:36:40 -08:00
components-repo-ci ci: rename `material-unit-tests` job to `components-repo-unit-tests` (#34898) 2020-01-23 13:29:02 -08:00
gulp-tasks build: create bazel marco to test for circular dependencies (#34774) 2020-01-23 11:36:40 -08:00
ng_rollup_bundle build: should use $(execpath) in npm_package_bin args (#34736) 2020-01-15 14:58:07 -05:00
ngcontainer build: use bazel version from node modules (#26691) 2018-10-30 16:19:13 -04:00
npm style: add file header (#28871) 2019-02-28 12:06:36 -08:00
public_api_guard refactor(ivy): change styling to use programmatic API on updates (#34804) 2020-01-24 12:23:19 -08:00
rxjs build: update to rules_nodejs 0.32.2 (#31325) 2019-07-01 14:16:42 -07:00
size-tracking build: update scripting and tooling to rely on define=angular_ivy_enabled instream of define=compile (#33983) 2019-11-26 16:38:40 -05:00
source-map-test build: update npm dependencies (#19328) 2017-09-22 13:20:52 -07:00
symbol-extractor build: update scripting and tooling to rely on define=angular_ivy_enabled instream of define=compile (#33983) 2019-11-26 16:38:40 -05:00
testing build: update to rules_nodejs 1.1.0 (#34736) 2020-01-15 14:58:07 -05:00
ts-api-guardian ci: bump release version of ts-api-guardian (#34933) 2020-01-23 13:24:53 -08:00
tslint build: remove unused rollup.config.js files (#28646) 2019-02-14 19:28:08 +00:00
validate-commit-message build: remove the deprecated `aio` commit message scope (#32341) 2019-08-27 09:06:35 -07:00
yarn build: upgrade yarn to 1.3.2 (#21406) 2018-01-10 12:32:26 -08:00
BUILD.bazel build: add tsconfig-test to dependency for tsconfig in core/test/strict_types (#31471) 2019-07-12 11:38:16 -04:00
bazel_stamp_vars.js build: add pre-release check that validates the version name (#29551) 2019-03-27 12:26:13 -07:00
check-environment.js build: update to Node 10 (#25822) 2018-09-06 14:58:30 -07:00
defaults.bzl build: update to rules_nodejs 1.1.0 (#34736) 2020-01-15 14:58:07 -05:00
jasmine-seed-generator.js test: run unit tests in random order (#19904) 2018-07-06 13:48:02 -07:00
jsconfig.json chore(vscode): add jsconfig.json and remove .settings dir 2015-10-29 13:53:21 +00:00
ng_benchmark.bzl ci: do not run ng_benchmarks on CI (#34057) 2019-11-26 16:10:09 -08:00
postinstall-patches.js build: delete rxjs d.ts files referencing rxjs-compat (#33786) 2019-11-13 13:33:05 -08:00
rebase-pr.js ci: fix remote name in rebase instructions (#34432) 2019-12-16 10:44:42 -08:00
tsconfig-test.json build(bazel): use fine-grained npm deps (#26111) (#26488) 2018-10-19 20:59:29 -07:00
tsconfig.json build: ts-api-guardian tsconfig warning with bazel (#27583) 2018-12-13 11:01:48 -08:00
types.d.ts build(bazel): use bazel managed node_modules for downstream angular from source build support (#24663) 2018-07-26 17:02:21 -07:00
utils.inc feat(bundle): add script to push bundles to code.angularjs.org 2015-04-14 14:50:53 -07:00
verify-codeownership.js ci: check code-ownership on CI (#32577) 2019-09-10 17:30:55 -04:00