document
document copied to clipboard
js玄学
# 浏览器的渲染过程2.0 — Composite ### 前言 上一篇文章: [《浏览器的渲染机制》][1]里,大概介绍了浏览器从下载完第一份document文件,到渲染出整个页面所发生的事情(也称作:``关键路径渲染``),其中包括:1、构建对象模型(DOM,CSSOM),2、构建渲染树(RenderTree),3、布局,4、渲染。 这一篇文章我们将参考chrome浏览器的内核WebKit, 详细介绍下浏览器呈现引擎的一些概念和渲染中的一个关键环节:**Composite(渲染层合并)**,它所做的事情和带来的效果。 ### 浏览器的主要结构 市面上主流的几款浏览器,基本上都是由下面几个结构组成:  1. **用户界面** - 包括地址栏、前进/后退按钮、书签菜单等。除了浏览器主窗口显示的您请求的页面外,其他显示的各个部分都属于用户界面。 2. **浏览器引擎** - 在用户界面和呈现引擎之间传送指令。 3. **呈现引擎** - 负责显示请求的内容。如果请求的内容是 HTML,它就负责解析 HTML 和 CSS...
Bumps [moment-timezone](https://github.com/moment/moment-timezone) from 0.5.27 to 0.5.37. Release notes Sourced from moment-timezone's releases. Release 0.5.34 Updated data to IANA TZDB 2021e Release 0.5.33 Updated data to IANA TZDB 2021a Release 0.5.32...
Bumps [moment](https://github.com/moment/moment) from 2.24.0 to 2.29.4. Changelog Sourced from moment's changelog. 2.29.4 Release Jul 6, 2022 #6015 [bugfix] Fix ReDoS in preprocessRFC2822 regex 2.29.3 Full changelog Release Apr 17, 2022...
### 如何优雅的进行版本回退 > 平时合代码时,难免会将一些不需要的代码合到主分支里。 > > 像我就经常遇到合完qa_test后,又和我说这个功能今天上不了了,希望我能把这部分功能从qa_test里踢出去。以前我的做法都是找到那条合代码的commit记录,checkout到之前版本,在新起个分支作为这次上线的qa_test,就怕莫名其妙的删除和回滚导致后面代码合不上去…. > > 后来弄懂了git reset 和 git revert,才知道自己的做法是多么的傻逼。 #### 回滚的常用两个命令 ```js git reset git revert ``` 这两个命令具体有什么区别呢?怎么用他们做回滚呢? #### [git reset][1] 假设我们系统里有下面这些提交记录:  A版本和B版本是我们正常的提交,C版本和D版本是错误提交,现在我们希望回退到B版本。 此时,HEAD指针指向D(5lk4er),我们只要将HEAD指针指向B(a0fvf8),就OK了,于是:...
Bumps [path-parse](https://github.com/jbgutierrez/path-parse) from 1.0.6 to 1.0.7. Commits See full diff in compare view [](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter...
Bumps [normalize-url](https://github.com/sindresorhus/normalize-url) from 4.5.0 to 4.5.1. Commits See full diff in compare view [](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter...
Bumps [hosted-git-info](https://github.com/npm/hosted-git-info) from 2.8.5 to 2.8.9. Changelog Sourced from hosted-git-info's changelog. 2.8.9 (2021-04-07) Bug Fixes backport regex fix from #76 (29adfe5), closes #84 2.8.8 (2020-02-29) Bug Fixes #61 & #65...
Bumps [lodash](https://github.com/lodash/lodash) from 4.17.15 to 4.17.21. Commits f299b52 Bump to v4.17.21 c4847eb Improve performance of toNumber, trim and trimEnd on large input strings 3469357 Prevent command injection through _.template's variable...
Bumps [ssri](https://github.com/npm/ssri) from 6.0.1 to 6.0.2. Changelog Sourced from ssri's changelog. 6.0.2 (2021-04-07) Bug Fixes backport regex change from 8.0.1 (b30dfdb), closes #19 Commits b7c8c7c chore(release): 6.0.2 b30dfdb fix: backport...
Bumps [y18n](https://github.com/yargs/y18n) from 3.2.1 to 3.2.2. Commits See full diff in compare view Maintainer changes This version was pushed to npm by oss-bot, a new releaser for y18n since your...