Webpage display method and device
First Claim
Patent Images
1. A webpage display method, the method comprising:
- acquiring source code of a webpage to be displayed;
parsing the source code to form tree-shaped nodes;
composing the tree-shaped nodes according to style specifications of the source code;
determining at least a primary container according to the composed tree-shaped nodes, wherein the determining a primary container according to the composed tree-shaped nodes comprises;
judging whether a parent node of the current node is the primary container;
upon judging that the parent node of the current node is the primary container, judging whether the width of the current node is greater than or equal to a first percentage of the width of a root node and greater than or equal to a second percentage of the width of the parent node of the current node;
upon judging that the width of the current node is greater than or equal to the first percentage of the width of the root node and greater than or equal to the second percentage of the width of the parent node of the current node, judging whether the height of the current node is a fixed value; and
upon judging that the height of the current node is not the fixed value, determining the current node as the primary container;
determining a plurality of secondary containers in the primary container, wherein each of the secondary containers contains some of elements of the webpage to be displayed;
determining an area of each of the secondary containers in the primary container and a threshold value associated with areas of the secondary containers;
adjusting the area of one or more of the secondary containers that is greater than the threshold value to be scaled up and the area of other one or more of the secondary containers to be scaled down; and
displaying the elements of the webpage to be displayed which are contained in the adjusted secondary containers on a screen of a terminal.
2 Assignments
0 Petitions
Accused Products
Abstract
A webpage display method includes: acquiring source code of a webpage; parsing the source code to form tree-shaped nodes; composing the tree-shaped nodes; determining a primary container according to the composed tree-shaped nodes; determining at least one secondary container in the primary container; adjusting the area of the secondary container; and drawing the adjusted secondary container and displaying the elements of the adjusted secondary containers on the screen.
-
Citations
15 Claims
-
1. A webpage display method, the method comprising:
-
acquiring source code of a webpage to be displayed; parsing the source code to form tree-shaped nodes; composing the tree-shaped nodes according to style specifications of the source code; determining at least a primary container according to the composed tree-shaped nodes, wherein the determining a primary container according to the composed tree-shaped nodes comprises; judging whether a parent node of the current node is the primary container; upon judging that the parent node of the current node is the primary container, judging whether the width of the current node is greater than or equal to a first percentage of the width of a root node and greater than or equal to a second percentage of the width of the parent node of the current node; upon judging that the width of the current node is greater than or equal to the first percentage of the width of the root node and greater than or equal to the second percentage of the width of the parent node of the current node, judging whether the height of the current node is a fixed value; and upon judging that the height of the current node is not the fixed value, determining the current node as the primary container; determining a plurality of secondary containers in the primary container, wherein each of the secondary containers contains some of elements of the webpage to be displayed; determining an area of each of the secondary containers in the primary container and a threshold value associated with areas of the secondary containers; adjusting the area of one or more of the secondary containers that is greater than the threshold value to be scaled up and the area of other one or more of the secondary containers to be scaled down; and displaying the elements of the webpage to be displayed which are contained in the adjusted secondary containers on a screen of a terminal. - View Dependent Claims (2, 3, 4)
-
-
5. A webpage display device, the device comprising:
-
one or more processors; and memory storing instructions, when executed by the one or more processors, configured to cause the one or more processors to; acquire source code of a webpage to be displayed; parse the source code to form tree-shaped nodes; compose the tree-shaped nodes according to style specifications of the source code; locate at least a primary container according to the tree-shaped nodes, wherein the determining a primary container according to the composed tree-shaped nodes comprises; judging whether a parent node of the current node is the primary container; upon judging that the parent node of the current node is the primary container, judging whether the width of the current node is greater than or equal to a first percentage of the width of a root node and greater than or equal to a second percentage of the width of the parent node of the current node; upon judging that the width of the current node is greater than or equal to the first percentage of the width of the root node and greater than or equal to the second percentage of the width of the parent node of the current node, judging whether the height of the current node is a fixed value; and upon judging that the height of the current node is not the fixed value, determining the current node as the primary container; locate a plurality of secondary containers in the primary container, wherein each of the secondary containers contains some of elements of the webpage to be displayed; determine an area of each of the secondary containers in the primary container and a threshold value associated with areas of the secondary containers; adjust the area of one or more of the secondary containers that is greater than the threshold value to be scaled up and the area of other one or more of the secondary containers to be scaled down; and display the elements of the webpage to be displayed which are contained in the adjusted secondary containers on a screen of a terminal. - View Dependent Claims (6, 7, 8)
-
-
9. A non-transitory computer readable medium with processor executable program code, when executed, the program code causing a processor to execute the following steps of:
-
acquiring source code of a webpage to be displayed; parsing the source code to form tree-shaped nodes; composing the tree-shaped nodes according to style specifications of the source code; determining at least a primary container according to the composed tree-shaped nodes, wherein the determining a primary container according to the composed tree-shaped nodes comprises; judging whether a parent node of the current node is the primary container; upon judging that the parent node of the current node is the primary container, judging whether the width of the current node is greater than or equal to a first percentage of the width of a root node and greater than or equal to a second percentage of the width of the parent node of the current node; upon judging that the width of the current node is greater than or equal to the first percentage of the width of the root node and greater than or equal to the second percentage of the width of the parent node of the current node, judging whether the height of the current node is a fixed value; and upon judging that the height of the current node is not the fixed value, determining the current node as the primary container; determining a plurality of secondary containers in the primary container, wherein each of the secondary containers contains some of elements of the webpage to be displayed; determining an area of each of the secondary containers in the primary container and a threshold value associated with areas of the secondary containers; adjusting the area of one or more of the secondary containers that is greater than the threshold value to be scaled up and the area of other one or more of the secondary containers to be scaled down; and displaying the elements of the webpage to be displayed which are contained in the adjusted secondary containers on a screen of a terminal.
-
-
10. A webpage display method, the method comprising:
-
composing tree-shaped nodes according to style specifications of source code of a webpage to be displayed, wherein the tree-shaped nodes are formed after the source code is parsed; determining at least a primary container and a plurality of secondary containers in the primary container according to the composed tree-shaped nodes, wherein each secondary container contains some elements in the webpage to be displayed, wherein the determining at least one secondary container contained in the primary container comprises; judging whether a parent node of the current node is the primary container; upon judging that the parent node of the current node is the primary container, judging whether the width of the current node belongs to a preset value range, wherein two endpoint values of the preset value range are respectively a product of the width of the parent node of the current node and a third percentage and a product of the width of the parent node of the current node and a fourth percentage, and the third percentage is smaller than the fourth percentage; and upon judging that the width belongs to the preset value range, determining the current node as the secondary container; determining an area of each of the secondary containers in the primary container and a threshold value associated with areas of the secondary containers; adjusting the area of one or more of the secondary containers that is greater than the threshold value to be scaled up and the area of other one or more of the secondary containers to be scaled down; and displaying the elements of the webpage to be displayed which are contained in the adjusted secondary containers on a screen of a terminal. - View Dependent Claims (11, 12, 13, 14, 15)
-
Specification