I know that setting the style properties causes browser reflows . Is it possible that browser reflow also happens while accessing layout properties .If yes can you please give a specific example why that would cause a browser reflow ?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Of course it depends on implementation, but generally a browser triggers a reflow upon reading an element’s property if it thinks that layout data needs to be re-queried (i.e. some layout-related properties on this element or any parent element changed).
You can find a list of affected properties for WebKit here: How (not) to trigger a layout in WebKit.
A more general article with examples: Rendering: repaint, reflow/relayout, restyle