Consistent Scaling of Web-Based Content Across Devices Having Different Screen Metrics
First Claim
1. A method for scaling web content, the method comprising performing, by a computing device, operations for:
- receiving web content for presentation, via a hybrid application executing on the computing device, on a screen component of the computing device, the web content comprising markup language code and style sheet code;
polling a rendering engine for screen metrics of a screen component of the computing device;
determining whether the screen metrics from the rendering engine are consistent;
in response to determining the screen metrics from the rendering engine are consistent, calculating an average of the screen metrics;
determining a generalized screen size for the screen component of the computing device based upon the average of the screen metrics;
selecting a scaling factor for the generalized screen size;
calculating a value based upon the scaling factor and the average of the screen metrics;
applying the value to a font size property of a root document object model (“
DOM”
) node of the web content; and
scaling the web content based upon the value of the font size property and rem units defined in the style sheet code.
1 Assignment
0 Petitions
Accused Products
Abstract
Concepts and technologies are described herein for consistent scaling of web content across devices having different screen metrics. According to some of the concepts and technologies disclosed herein, a computing device may receive web content and select a scaling factor for scaling the web content for presentation on a screen component associated with the computing device. The computing device may select a scaling factor for scaling the web content and utilize the scaling factor and a screen metric of the screen component to calculate a value, which the computing device may then apply to a font size property of a root document object model (“DOM”) node of the web content. The computing device may then scale the web content for presentation on the screen component based upon the value of the font size property and rem units defined in the web content.
25 Citations
23 Claims
-
1. A method for scaling web content, the method comprising performing, by a computing device, operations for:
-
receiving web content for presentation, via a hybrid application executing on the computing device, on a screen component of the computing device, the web content comprising markup language code and style sheet code; polling a rendering engine for screen metrics of a screen component of the computing device; determining whether the screen metrics from the rendering engine are consistent; in response to determining the screen metrics from the rendering engine are consistent, calculating an average of the screen metrics; determining a generalized screen size for the screen component of the computing device based upon the average of the screen metrics; selecting a scaling factor for the generalized screen size; calculating a value based upon the scaling factor and the average of the screen metrics; applying the value to a font size property of a root document object model (“
DOM”
) node of the web content; andscaling the web content based upon the value of the font size property and rem units defined in the style sheet code. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10)
-
-
11. A method for scaling web content, the method comprising performing, by a computing device, operations for:
-
receiving web content for presentation, via a hybrid application executing on the computing device, on a screen component of the computing device, the web content comprising markup language code and style sheet code; calling a screen metrics application programming interface (“
API”
);receiving screen metrics from the screen metrics API; selecting a scaling factor based upon the screen metrics of the screen component; calculating a value based upon the scaling factor and the screen metrics; applying the value to a font size property of a root document object model (“
DOM”
) node of the web content; andscaling the web content based upon the value of the font size property of the root DOM node and rem units defined in the style sheet code. - View Dependent Claims (12, 13, 14)
-
-
15. A computing device configured to scale web content, the computing device comprising:
-
a screen component; at least one processor; and a computer-readable storage medium having computer-executable instructions stored thereon which, when executed on the at least one processor, cause the computing device to receive web content, select a scaling factor for scaling the web content for presentation on the screen component, calculate a value utilizing the scaling factor and a screen metric of the screen component, apply the value to a font size property of a root document object model (“
DOM”
) node of the web content, andscale the web content for presentation on the screen component based upon the value of the font size property of the root DOM node and a relative unit defined in the web content. - View Dependent Claims (16, 17, 18, 19, 20, 21, 22, 23)
-
Specification