The material, including but not limited to all software, design, drawings,
technical specifications and other confidential information sent to you
("Material"), is the exclusive property of Opera Software ASA.
The Material is classified as strictly confidential information and is
internationally protected by copyright-, trademark- and other such laws.
The Material is sent to you for internal use only and shall only be used
as expressly instructed by Opera Software.
Any copying, reproduction, modification or distribution not in accordance with a special written license agreement with Opera Software is expressly prohibited, and may result in severe civil and criminal penalties. Opera Software actively and aggressively enforces its intellectual property rights to the fullest extent of the law.
| Date | Version | Status | Changes & comments | By |
| 20090415 | 0.1 | Draft | First version | Magnus Gasslander |
| 20090616 | 0.2 | Draft | Updated after input from Öyvinds | Magnus Gasslander |
| 20120217 | 0.3 | Draft | Increased TCTO_LINE_DIFF_THRESHOLD and TCTO_LINE_DIFF_VERTICAL_LIMIT values | Christian Kindahl |
The purpose of this document is to decribe the behaviour when detecting paragraph rectangles in a document. The paragraph rectangles can be used as hints when scrolling with gravity and adaptive zoom
This documentation is based on detecting paragraph rectangles using the TextContainerTraversalObject.
Patch bug CORE-18119 also contains an implementation for detecting interesting areas based on the ZoomTraversalObject, inspired by the AreaOfInterest callback. This provides similar functionality.
Paragraph rectangles are avaliable through the OpViewPortController::GetParagraphRects API.
The following constants are used.
| Name | Value |
|---|---|
| TCTO_LINE_DIFF_THRESHOLD | 160 |
| TCTO_LINE_DIFF_VERTICAL_LIMIT | 160 |
| TCTO_IMPORTANT_CONTENT_HORIZONTAL_THRESHOLD | 60 |
| TCTO_IMPORTANT_CONTENT_VERTICAL_THRESHOLD | 60 |
| TCTO_TITLE_HORIZONTAL_THRESHOLD | 40 |
| TCTO_TITLE_VERTICAL_THRESHOLD | 20 |
A paragraph rectangle is a rectangle including content that is deemed to be a piece of standalone content in the page. It may contain replaced content or a paragraph of text.
A paragraph rectangle will never span several blocks or table cells.
The TextContainerTraversalObject will create paragraph rectangles around the following content, in order of priority.