Selective rendering of electronic messages by an electronic device
AssigneeBlackBerry Limited
InventorsTerrill Mark Dent, Ryan Gregory Wood
Life of this patent
Estimating the term…
Abstract
An electronic device or system and method are provided for selectively normalizing or modifying content element attributes that are defined using absolute values, such as absolute font sizes expressed in length measurements such as points and pixels. A document containing structured content, such as an HTML-formatted email message or webpage, is obtained. When any such content element attributes are included with the document, a determination is made whether those attributes can be changed for that document. The determination may be dependent on the complexity of the structured document. If so, the absolute values are converted to relative values, and the document is subsequently rendered for display.
Claims17
A method comprising:
- obtaining a document for display at an electronic device, the document comprising a text content element having a font size specified in absolute value by an associated formatting directive, the font size being defined in either a body or a header of the document, and wherein the document comprises an email message;
- determining a count of a number of structural elements in a Document Object Model (DOM) tree structure of the document;
- determining that the document has a simple content layout structure based on detecting one or more indicators in the body or the header of the document, wherein one of the indicators indicates that the count of the number of structural elements in the DOM tree structure of the document is less than a threshold number;
- in response to determining that the document has a simple content layout structure, converting the formatting directive from an absolute value to a corresponding relative value, the relative value referencing a base value for the font size defined for the electronic device;
- and
- rendering the document for display at the electronic device using the formatting directive thus converted.
An electronic device, comprising:
- a display interface;
- and
- a processor in communication with the display interface, the processor being configured to:
- obtain a document for display at an electronic device, the document comprising a text content element having a font size specified in absolute value by an associated formatting directive, the font size being defined in either a body or a header of the document, and wherein the document comprises an email message;
- determine a count of a number of structural elements in a Document Object Model (DOM) tree structure of the document;
- determine that the document has a simple content layout structure based on detecting one or more indicators in the body or the header of the document, wherein one of the indicators indicates that the count of the number of structural elements in the DOM tree structure of the document is less than a threshold number;
- in response to determining that the document has a simple content layout structure, convert the formatting directive from an absolute value to a corresponding relative value, the relative value referencing a base value for the font size defined for the electronic device;
- and
- render the document for display for the display screen using the formatting directive thus converted.
A non-transitory electronic device-readable medium bearing code which, when executed by a processor of an electronic device, causes the electronic device to carry out the method of:
- obtaining a document for display at an electronic device, the document comprising a text content element having a font size specified in absolute value by an associated formatting directive, the font size being defined in either a body or a header of the document, and wherein the document comprises an email message;
- determining a count of a number of structural elements in a Document Object Model (DOM) tree structure of the document;
- determining that the document has a simple content layout structure based on detecting one or more indicators in the body or the header of the document, wherein one of the indicators indicates that the count of the number of structural elements in the DOM tree structure of the document is less than a threshold number;
- in response to determining that the document has a simple content layout structure, converting the formatting directive from an absolute value to a corresponding relative value, the relative value referencing a base value for the font size defined for the electronic device;
- and
- rendering the document for display for the display screen using the formatting directive thus converted.
Dependencies are inferred from the claim text.