SlideShare a Scribd company logo
INTRODUCTION TO FRONT END WEB DEVELOPMENT
INDEX
How browsers work
Level 1: HTML
Level 2: CSS
Level 3: Layouts
Level 4: Advanced HTML
Level 5: CSS Ninja
Level 6: JavaScript Beginner
OBJECTIVE
A complete page, using Bootstrap, no JavaScript
INTRODUCTION TO FRONT END WEB DEVELOPMENT
0) HOW BROWSERS WORK
MAIN DESKTOP BROWSERS
MAIN MOBILE BROWSERS
OTHER BROWSERS
BROWSER COMPONENTS
1. The user interface
2. The browser engine
3. The rendering engine
4. Networking
5. UI backend
6. JavaScript interpreter.
7. Data storage.
BROWSER COMPONENTS
3. The rendering engine
1. The user interface
2. The browser engine
4. Networking
5. UI backend
6. JavaScript interpreter.
7. Data storage.
THE RENDERING ENGINE FLOW
PAGE.HTML
<!DOCTYPE html>
<html>
<head>
<link href="style.css" rel="stylesheet">
<title>Title</title>
</head>
<body>
<p>Hello <span>world!</span></p>
<div>
<img src="photo.jpg">
</div>
</body>
</html>
STYLE.CSS
body {
font-size: 16px;
}
p {
font-weight: bold;
}
p span {
display: none;
}
img {
float: right;
}
1) PROCESS HTML MARKUP AND BUILD THE DOM TREE
1) PROCESS HTML MARKUP AND BUILD THE DOM TREE
1. The browser sends a request to the server and reads the
raw bytes of the HTML file.
20 20 20 20 26 6c 74 3b 21 44 4f 43 54 59 50 45 20 68 74 6d
6c 3e 20 20 20 20 20 20 26 6c 74 3b 68 74 6d 6c 3e 20 20 20 20 20 20
26 6c 74 3b 68 65 61 64 3e 20 20 20 20 68 72 65 66 3d 5c 22 73 74 79
6c 65 2e 63 73 73 5c 22 20 72 65 6c 3d 5c 22 73 74 79 6c 65 73 68 65
65 74 5c 22 3e 20 20 20 20 20 20 3c
1) PROCESS HTML MARKUP AND BUILD THE DOM TREE
2. it translates them to individual characters based on
specified encoding of the file (e.g. UTF-8).
1. The browser sends a request to the server and reads the
raw bytes of the HTML file.
<html><head>...</head><body><p>Hello <span>world!</span></p
></body>...
1) PROCESS HTML MARKUP AND BUILD THE DOM TREE
3. it converts strings of characters into distinct tokens
specified by the W3C HTML5 standard - e.g. <html>,
<body>.
1. The browser sends a request to the server and reads the
raw bytes of the HTML file.
2. it translates them to individual characters based on
specified encoding of the file (e.g. UTF-8).
1) PROCESS HTML MARKUP AND BUILD THE DOM TREE
4. it converts the tokens into objects which define their
properties and rules.
1. The browser sends a request to the server and reads the
raw bytes of the HTML file.
2. it translates them to individual characters based on
specified encoding of the file (e.g. UTF-8).
3. it converts strings of characters into distinct tokens
specified by the W3C HTML5 standard - e.g. <html>,
<body>.
1) PROCESS HTML MARKUP AND BUILD THE DOM TREE
5. it links the created objects in a tree data structure that
also captures the parent-child relationships defined in the
original markup.
The DOM tree is created.
1. The browser sends a request to the server and reads the
raw bytes of the HTML file.
2. it translates them to individual characters based on
specified encoding of the file (e.g. UTF-8).
3. it converts strings of characters into distinct tokens
specified by the W3C HTML5 standard - e.g. <html>,
<body>.
4. it converts the tokens into objects which define their
properties and rules.
THE DOCUMENT OBJECT MODEL TREE
It is the object presentation of the HTML document and the interface of HTML
elements to the outside world, e.g. JavaScript.
1) PROCESS HTML MARKUP AND BUILD THE DOM TREE
The browser builds up the DOM incrementally.
The root of the tree is the Document object.
HTML is quite forgiving by nature, almost one to one
relation to the markup.
CSS, images and scripts are downloaded as soon as
possible by the HTML parser.
JavaScript execution blocks on CSSOM, scripts should go
at the end of the page and CSS at the top or inline.
JavaScript blocks DOM construction unless explicitly
declared as async.
CURRENT OUTPUT
2)PROCESS CSS MARKUP AND BUILD THE CSSOM TREE
2)PROCESS CSS MARKUP AND BUILD THE CSSOM TREE
THE CSSOM TREE
2)PROCESS CSS MARKUP AND BUILD THE CSSOM TREE
The CSSOM cannot be built incrementally like the DOM.
DOM and CSSOM are independent data structures.
By default, CSS is treated as a render blocking resource.
All CSS resources, regardless of blocking or non-blocking
behavior, are downloaded and combined.
Complexity around matching rules.
More nesting in the CSS affects performance, we need to
optimize selectors.
CURRENT OUTPUT
3)COMBINE THE DOM AND CSSOM INTO A RENDER TREE
3)COMBINE THE DOM AND CSSOM INTO A RENDER TREE
DOM tree CSSOM tree
3)COMBINE THE DOM AND CSSOM INTO A RENDER TREE
3)COMBINE THE DOM AND CSSOM INTO A RENDER TREE
It is the visual rapresentation of the document.
It enables the browser to paint elements in the screen in
the right order.
Each element in the tree is called renderer or render-
object or frame.
A renderer knows how to layout and paint itself and it's
children.
A renderer represents a rectangular area and contains
geometric informations such as width, height, position.
Every DOM element has a reference to the node in the
render tree.
Elements with display:none; or head tags are in the DOM
but not in the render tree. Not one to one with the DOM.
CURRENT OUTPUT
4) RUN LAYOUT ON THE RENDER TREE TO COMPUTE GEOMETRY OF EACH NODE
4) RUN LAYOUT ON THE RENDER TREE TO COMPUTE GEOMETRY OF EACH NODE
The browser begins at the root of the render tree and
traverses it to compute the geometry of each object on the
page.
This stage is also known as reflow.
When the changes affect the document contents or
structure, or an element position, a reflow (or relayout)
happens.
When changing element styles which don't affect the
element's position on a page (such as background-color,
border-color, visibility), a repaint happens.
Batch changes, intelligent reflow.
Reflow only dirty trees in the tree.
Accessing certain properties, e.g. with JS will immediately
reflow.
4) RUN LAYOUT ON THE RENDER TREE TO COMPUTE GEOMETRY OF EACH NODE
<html>
<head>
<title>Layout example</title>
</head>
<body>
<div style="width: 50%">
<div style="width: 50%">Hello!</div>
</div>
</body>
</html>
4) RUN LAYOUT ON THE RENDER TREE TO COMPUTE GEOMETRY OF EACH NODE
REFLOW IN SLOW-MOTION
1:22
CURRENT OUTPUT
RECAP: THE RENDERING ENGINE FLOW
1. PROCESS HTML MARKUP AND BUILD THE DOM TREE
2. PROCESS CSS MARKUP AND BUILD THE CSSOM TREE
3. COMBINE THE DOM AND CSSOM INTO A RENDER TREE
4. RUN LAYOUT ON THE RENDER TREE TO COMPUTE GEOMETRY OF EACH NODE
5. PAINT THE INDIVIDUAL NODES TO THE SCREEN
5) PAINT THE INDIVIDUAL NODES TO THE SCREEN
5) PAINT THE INDIVIDUAL NODES TO THE SCREEN
The process has visual information about every element of
the render tree.
it will create layers, from bottom to top.
absolute positioned elements and children has their own
layers.
incremental process, builds up over 12 phases, first
background, then borders etc.
it produces bitmaps, upload them in the gpu as a texture,
composites them into a final image to render to the screen.
FINAL OUTPUT
FINAL OUTPUT

More Related Content

PDF
Introduction to WEB HTML, CSS
University of Technology
 
KEY
HTML/CSS Lecture 1
Lee Lundrigan
 
PPT
HTML & CSS Workshop Notes
Pamela Fox
 
PPT
Introduction to HTML
Amit Tyagi
 
PDF
HTML Lecture Part 1 of 2
Sharon Wasden
 
PPT
Xhtml 2010
guest0f1e7f
 
PDF
Web I - 02 - XHTML Introduction
Randy Connolly
 
PPTX
Html and Xhtml
Chhom Karath
 
Introduction to WEB HTML, CSS
University of Technology
 
HTML/CSS Lecture 1
Lee Lundrigan
 
HTML & CSS Workshop Notes
Pamela Fox
 
Introduction to HTML
Amit Tyagi
 
HTML Lecture Part 1 of 2
Sharon Wasden
 
Xhtml 2010
guest0f1e7f
 
Web I - 02 - XHTML Introduction
Randy Connolly
 
Html and Xhtml
Chhom Karath
 

What's hot (19)

PPT
Origins and evolution of HTML and XHTML
Howpk
 
PPTX
4. html css-java script-basics
Nikita Garg
 
PPTX
Css, xhtml, javascript
Trần Khải Hoàng
 
PPT
HTML 5 Complete Reference
EPAM Systems
 
PDF
HTML 5 Step By Step - Ebook
Scottperrone
 
PPTX
05 RD PoSD Tutorial_xhtml_to_html5_2016
Rich Dron
 
PPTX
Introduction to html course digital markerters
SEO SKills
 
PPTX
Html css java script basics All about you need
Dipen Parmar
 
PPTX
HTML, CSS and Java Scripts Basics
Sun Technlogies
 
PPTX
Web page concept final ppt
Sukanya Sen Sharma
 
PPT
Web Development using HTML & CSS
Shashank Skills Academy
 
PDF
What is HTML - An Introduction to HTML (Hypertext Markup Language)
Ahsan Rahim
 
PPTX
Css presentation lecture 1
Mudasir Syed
 
PPTX
Dhtml
Sadhana28
 
PDF
Intro to HTML & CSS
Syed Sami
 
PPTX
Basics of HTML 5 for Beginners
MediaLinkers Kennesaw
 
PDF
Introduction to XML, XHTML and CSS
Jussi Pohjolainen
 
PPTX
HTML - 5 - Introduction
Aayushi Chhabra
 
PDF
3. tutorial html web desain
faizibra
 
Origins and evolution of HTML and XHTML
Howpk
 
4. html css-java script-basics
Nikita Garg
 
Css, xhtml, javascript
Trần Khải Hoàng
 
HTML 5 Complete Reference
EPAM Systems
 
HTML 5 Step By Step - Ebook
Scottperrone
 
05 RD PoSD Tutorial_xhtml_to_html5_2016
Rich Dron
 
Introduction to html course digital markerters
SEO SKills
 
Html css java script basics All about you need
Dipen Parmar
 
HTML, CSS and Java Scripts Basics
Sun Technlogies
 
Web page concept final ppt
Sukanya Sen Sharma
 
Web Development using HTML & CSS
Shashank Skills Academy
 
What is HTML - An Introduction to HTML (Hypertext Markup Language)
Ahsan Rahim
 
Css presentation lecture 1
Mudasir Syed
 
Dhtml
Sadhana28
 
Intro to HTML & CSS
Syed Sami
 
Basics of HTML 5 for Beginners
MediaLinkers Kennesaw
 
Introduction to XML, XHTML and CSS
Jussi Pohjolainen
 
HTML - 5 - Introduction
Aayushi Chhabra
 
3. tutorial html web desain
faizibra
 
Ad

Viewers also liked (7)

PDF
Working with Grids - Evaluating Bootstrap's grid system
Albino Tonnina
 
PDF
Modular HTML & CSS Workshop
Shay Howe
 
PDF
HTML & CSS
lexinamer
 
PDF
Web Performance Optimization @Develer
Massimo Iacolare
 
PDF
Show Me The Page - 介紹 Critical rendering path
Yvonne Yu
 
PDF
Women in ITM Workshop: Intro to HTML and CSS
Shanta Nathwani
 
PDF
Landing Page Workshop Lean Startup
Saverio Bruno
 
Working with Grids - Evaluating Bootstrap's grid system
Albino Tonnina
 
Modular HTML & CSS Workshop
Shay Howe
 
HTML & CSS
lexinamer
 
Web Performance Optimization @Develer
Massimo Iacolare
 
Show Me The Page - 介紹 Critical rendering path
Yvonne Yu
 
Women in ITM Workshop: Intro to HTML and CSS
Shanta Nathwani
 
Landing Page Workshop Lean Startup
Saverio Bruno
 
Ad

Similar to Html css workshop, lesson 0, how browsers work (20)

PPTX
Web technologies part-2
Michael Anthony
 
PPT
Document Object Model
chomas kandar
 
PPT
Document Object Model
chomas kandar
 
PDF
Exploring Critical Rendering Path
Raphael Amorim
 
PPTX
Web performance
Islam AlZatary
 
PPTX
Break out of The Box - Part 2
Karl-Henry Martinsson
 
PDF
GDG-USAR Tech winter break 2024 USAR.pdf
raiaryan174
 
PPTX
Building high performing web pages
Nilesh Bafna
 
PDF
Mobile Browser Internal (Blink Rendering Engine)
Hyungwook Lee
 
PPT
Responsive content
honzie
 
PDF
Vision academy sachinsir_9822506209_html_java_script_notes (1)
ShraddhaGurav7
 
PDF
Zotero Framework Translators
adam3smith
 
PPTX
Ajax xml json
Andrii Siusko
 
PPTX
Document Object Model
Mayur Mudgal
 
PDF
Performance (browser)
aquarius070287
 
PDF
Intro to mobile web application development
zonathen
 
PPTX
Browsers. Magic is inside.
Devexperts
 
ODP
Moving from Web 1.0 to Web 2.0
Estelle Weyl
 
DOCX
How Browsers Work -By Tali Garsiel and Paul Irish
Nagamurali Reddy
 
Web technologies part-2
Michael Anthony
 
Document Object Model
chomas kandar
 
Document Object Model
chomas kandar
 
Exploring Critical Rendering Path
Raphael Amorim
 
Web performance
Islam AlZatary
 
Break out of The Box - Part 2
Karl-Henry Martinsson
 
GDG-USAR Tech winter break 2024 USAR.pdf
raiaryan174
 
Building high performing web pages
Nilesh Bafna
 
Mobile Browser Internal (Blink Rendering Engine)
Hyungwook Lee
 
Responsive content
honzie
 
Vision academy sachinsir_9822506209_html_java_script_notes (1)
ShraddhaGurav7
 
Zotero Framework Translators
adam3smith
 
Ajax xml json
Andrii Siusko
 
Document Object Model
Mayur Mudgal
 
Performance (browser)
aquarius070287
 
Intro to mobile web application development
zonathen
 
Browsers. Magic is inside.
Devexperts
 
Moving from Web 1.0 to Web 2.0
Estelle Weyl
 
How Browsers Work -By Tali Garsiel and Paul Irish
Nagamurali Reddy
 

Recently uploaded (20)

PDF
Jenkins: An open-source automation server powering CI/CD Automation
SaikatBasu37
 
PPTX
Services offered by Dynamic Solutions in Pakistan
DaniyaalAdeemShibli1
 
PDF
QAware_Mario-Leander_Reimer_Architecting and Building a K8s-based AI Platform...
QAware GmbH
 
PPTX
AI-Ready Handoff: Auto-Summaries & Draft Emails from MQL to Slack in One Flow
bbedford2
 
PPTX
Presentation of Computer CLASS 2 .pptx
darshilchaudhary558
 
PDF
On Software Engineers' Productivity - Beyond Misleading Metrics
Romén Rodríguez-Gil
 
PPTX
Role Of Python In Programing Language.pptx
jaykoshti048
 
PDF
Key Features to Look for in Arizona App Development Services
Net-Craft.com
 
PDF
IEEE-CS Tech Predictions, SWEBOK and Quantum Software: Towards Q-SWEBOK
Hironori Washizaki
 
PDF
The Role of Automation and AI in EHS Management for Data Centers.pdf
TECH EHS Solution
 
PDF
PFAS Reporting Requirements 2026 Are You Submission Ready Certivo.pdf
Certivo Inc
 
PPTX
Presentation about variables and constant.pptx
kr2589474
 
PDF
ShowUs: Pharo Stream Deck (ESUG 2025, Gdansk)
ESUG
 
PDF
Protecting the Digital World Cyber Securit
dnthakkar16
 
PPTX
Web Testing.pptx528278vshbuqffqhhqiwnwuq
studylike474
 
PDF
Community & News Update Q2 Meet Up 2025
VictoriaMetrics
 
PPTX
ConcordeApp: Engineering Global Impact & Unlocking Billions in Event ROI with AI
chastechaste14
 
PDF
Exploring AI Agents in Process Industries
amoreira6
 
DOCX
The Future of Smart Factories Why Embedded Analytics Leads the Way
Varsha Nayak
 
PPTX
Why Use Open Source Reporting Tools for Business Intelligence.pptx
Varsha Nayak
 
Jenkins: An open-source automation server powering CI/CD Automation
SaikatBasu37
 
Services offered by Dynamic Solutions in Pakistan
DaniyaalAdeemShibli1
 
QAware_Mario-Leander_Reimer_Architecting and Building a K8s-based AI Platform...
QAware GmbH
 
AI-Ready Handoff: Auto-Summaries & Draft Emails from MQL to Slack in One Flow
bbedford2
 
Presentation of Computer CLASS 2 .pptx
darshilchaudhary558
 
On Software Engineers' Productivity - Beyond Misleading Metrics
Romén Rodríguez-Gil
 
Role Of Python In Programing Language.pptx
jaykoshti048
 
Key Features to Look for in Arizona App Development Services
Net-Craft.com
 
IEEE-CS Tech Predictions, SWEBOK and Quantum Software: Towards Q-SWEBOK
Hironori Washizaki
 
The Role of Automation and AI in EHS Management for Data Centers.pdf
TECH EHS Solution
 
PFAS Reporting Requirements 2026 Are You Submission Ready Certivo.pdf
Certivo Inc
 
Presentation about variables and constant.pptx
kr2589474
 
ShowUs: Pharo Stream Deck (ESUG 2025, Gdansk)
ESUG
 
Protecting the Digital World Cyber Securit
dnthakkar16
 
Web Testing.pptx528278vshbuqffqhhqiwnwuq
studylike474
 
Community & News Update Q2 Meet Up 2025
VictoriaMetrics
 
ConcordeApp: Engineering Global Impact & Unlocking Billions in Event ROI with AI
chastechaste14
 
Exploring AI Agents in Process Industries
amoreira6
 
The Future of Smart Factories Why Embedded Analytics Leads the Way
Varsha Nayak
 
Why Use Open Source Reporting Tools for Business Intelligence.pptx
Varsha Nayak
 

Html css workshop, lesson 0, how browsers work

  • 1. INTRODUCTION TO FRONT END WEB DEVELOPMENT
  • 2. INDEX How browsers work Level 1: HTML Level 2: CSS Level 3: Layouts Level 4: Advanced HTML Level 5: CSS Ninja Level 6: JavaScript Beginner
  • 3. OBJECTIVE A complete page, using Bootstrap, no JavaScript
  • 4. INTRODUCTION TO FRONT END WEB DEVELOPMENT 0) HOW BROWSERS WORK
  • 5. MAIN DESKTOP BROWSERS MAIN MOBILE BROWSERS
  • 7. BROWSER COMPONENTS 1. The user interface 2. The browser engine 3. The rendering engine 4. Networking 5. UI backend 6. JavaScript interpreter. 7. Data storage.
  • 8. BROWSER COMPONENTS 3. The rendering engine 1. The user interface 2. The browser engine 4. Networking 5. UI backend 6. JavaScript interpreter. 7. Data storage.
  • 10. PAGE.HTML <!DOCTYPE html> <html> <head> <link href="style.css" rel="stylesheet"> <title>Title</title> </head> <body> <p>Hello <span>world!</span></p> <div> <img src="photo.jpg"> </div> </body> </html>
  • 11. STYLE.CSS body { font-size: 16px; } p { font-weight: bold; } p span { display: none; } img { float: right; }
  • 12. 1) PROCESS HTML MARKUP AND BUILD THE DOM TREE
  • 13. 1) PROCESS HTML MARKUP AND BUILD THE DOM TREE 1. The browser sends a request to the server and reads the raw bytes of the HTML file. 20 20 20 20 26 6c 74 3b 21 44 4f 43 54 59 50 45 20 68 74 6d 6c 3e 20 20 20 20 20 20 26 6c 74 3b 68 74 6d 6c 3e 20 20 20 20 20 20 26 6c 74 3b 68 65 61 64 3e 20 20 20 20 68 72 65 66 3d 5c 22 73 74 79 6c 65 2e 63 73 73 5c 22 20 72 65 6c 3d 5c 22 73 74 79 6c 65 73 68 65 65 74 5c 22 3e 20 20 20 20 20 20 3c
  • 14. 1) PROCESS HTML MARKUP AND BUILD THE DOM TREE 2. it translates them to individual characters based on specified encoding of the file (e.g. UTF-8). 1. The browser sends a request to the server and reads the raw bytes of the HTML file. <html><head>...</head><body><p>Hello <span>world!</span></p ></body>...
  • 15. 1) PROCESS HTML MARKUP AND BUILD THE DOM TREE 3. it converts strings of characters into distinct tokens specified by the W3C HTML5 standard - e.g. <html>, <body>. 1. The browser sends a request to the server and reads the raw bytes of the HTML file. 2. it translates them to individual characters based on specified encoding of the file (e.g. UTF-8).
  • 16. 1) PROCESS HTML MARKUP AND BUILD THE DOM TREE 4. it converts the tokens into objects which define their properties and rules. 1. The browser sends a request to the server and reads the raw bytes of the HTML file. 2. it translates them to individual characters based on specified encoding of the file (e.g. UTF-8). 3. it converts strings of characters into distinct tokens specified by the W3C HTML5 standard - e.g. <html>, <body>.
  • 17. 1) PROCESS HTML MARKUP AND BUILD THE DOM TREE 5. it links the created objects in a tree data structure that also captures the parent-child relationships defined in the original markup. The DOM tree is created. 1. The browser sends a request to the server and reads the raw bytes of the HTML file. 2. it translates them to individual characters based on specified encoding of the file (e.g. UTF-8). 3. it converts strings of characters into distinct tokens specified by the W3C HTML5 standard - e.g. <html>, <body>. 4. it converts the tokens into objects which define their properties and rules.
  • 18. THE DOCUMENT OBJECT MODEL TREE It is the object presentation of the HTML document and the interface of HTML elements to the outside world, e.g. JavaScript.
  • 19. 1) PROCESS HTML MARKUP AND BUILD THE DOM TREE The browser builds up the DOM incrementally. The root of the tree is the Document object. HTML is quite forgiving by nature, almost one to one relation to the markup. CSS, images and scripts are downloaded as soon as possible by the HTML parser. JavaScript execution blocks on CSSOM, scripts should go at the end of the page and CSS at the top or inline. JavaScript blocks DOM construction unless explicitly declared as async.
  • 21. 2)PROCESS CSS MARKUP AND BUILD THE CSSOM TREE
  • 22. 2)PROCESS CSS MARKUP AND BUILD THE CSSOM TREE
  • 24. 2)PROCESS CSS MARKUP AND BUILD THE CSSOM TREE The CSSOM cannot be built incrementally like the DOM. DOM and CSSOM are independent data structures. By default, CSS is treated as a render blocking resource. All CSS resources, regardless of blocking or non-blocking behavior, are downloaded and combined. Complexity around matching rules. More nesting in the CSS affects performance, we need to optimize selectors.
  • 26. 3)COMBINE THE DOM AND CSSOM INTO A RENDER TREE
  • 27. 3)COMBINE THE DOM AND CSSOM INTO A RENDER TREE DOM tree CSSOM tree
  • 28. 3)COMBINE THE DOM AND CSSOM INTO A RENDER TREE
  • 29. 3)COMBINE THE DOM AND CSSOM INTO A RENDER TREE It is the visual rapresentation of the document. It enables the browser to paint elements in the screen in the right order. Each element in the tree is called renderer or render- object or frame. A renderer knows how to layout and paint itself and it's children. A renderer represents a rectangular area and contains geometric informations such as width, height, position. Every DOM element has a reference to the node in the render tree. Elements with display:none; or head tags are in the DOM but not in the render tree. Not one to one with the DOM.
  • 31. 4) RUN LAYOUT ON THE RENDER TREE TO COMPUTE GEOMETRY OF EACH NODE
  • 32. 4) RUN LAYOUT ON THE RENDER TREE TO COMPUTE GEOMETRY OF EACH NODE The browser begins at the root of the render tree and traverses it to compute the geometry of each object on the page. This stage is also known as reflow. When the changes affect the document contents or structure, or an element position, a reflow (or relayout) happens. When changing element styles which don't affect the element's position on a page (such as background-color, border-color, visibility), a repaint happens. Batch changes, intelligent reflow. Reflow only dirty trees in the tree. Accessing certain properties, e.g. with JS will immediately reflow.
  • 33. 4) RUN LAYOUT ON THE RENDER TREE TO COMPUTE GEOMETRY OF EACH NODE <html> <head> <title>Layout example</title> </head> <body> <div style="width: 50%"> <div style="width: 50%">Hello!</div> </div> </body> </html>
  • 34. 4) RUN LAYOUT ON THE RENDER TREE TO COMPUTE GEOMETRY OF EACH NODE
  • 37. RECAP: THE RENDERING ENGINE FLOW 1. PROCESS HTML MARKUP AND BUILD THE DOM TREE 2. PROCESS CSS MARKUP AND BUILD THE CSSOM TREE 3. COMBINE THE DOM AND CSSOM INTO A RENDER TREE 4. RUN LAYOUT ON THE RENDER TREE TO COMPUTE GEOMETRY OF EACH NODE 5. PAINT THE INDIVIDUAL NODES TO THE SCREEN
  • 38. 5) PAINT THE INDIVIDUAL NODES TO THE SCREEN
  • 39. 5) PAINT THE INDIVIDUAL NODES TO THE SCREEN The process has visual information about every element of the render tree. it will create layers, from bottom to top. absolute positioned elements and children has their own layers. incremental process, builds up over 12 phases, first background, then borders etc. it produces bitmaps, upload them in the gpu as a texture, composites them into a final image to render to the screen.