Explanation for content rect and overflow rect.

24 views
Skip to first unread message

Muthuraj Ramalinga kumar

unread,
Feb 25, 2021, 1:12:02 PMFeb 25
to blink-dev

Hi,
I was reading this doc, Would like to know the meaning for the following terms:
1) box
2) overflow rect
3) content rect.

Thank you

Ian Kilpatrick

unread,
Feb 25, 2021, 1:43:12 PMFeb 25
to Muthuraj Ramalinga kumar, blink-dev
Hi,

Broadly speaking in the context of the document:
 - A "box" is an element, with a width/height.
 - A "content rect" is the size of that "box", but subtracting border/scrollbar/padding which might be on that element.
 - A "overflow rect" is the size of how large the scrollable area is (if an element has "overflow: scroll" on it). E.g. how much the element can scroll in any particular direction.

The calculation of the "overflow rect" calculation occurs in this class is: third_party/blink/renderer/core/layout/ng/ng_layout_overflow_calculator.cc

Ian

--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/c43eaa5b-3035-40f7-8092-6e838cc54e4an%40chromium.org.

Muthuraj Ramalinga kumar

unread,
Mar 2, 2021, 9:57:46 AMMar 2
to Ian Kilpatrick, blink-dev
Great Thanks
Reply all
Reply to author
Forward
0 new messages